How to create a long ROM file

Page 2/2
1 |

By Thom

Hero (546)

Thom's picture

21-04-2019, 15:24

Thanks! That makes sense :-)

By Juan Luis

Resident (44)

Juan Luis's picture

21-04-2019, 16:52

Manel46 wrote:

I use Ascii16 normally. It is the best for large graphics.
I add link to my google drive with an example rom, based on Artrag's sources, of which I have learned a lot. It is an image on screen8
The assembler is Sjasm.
https://drive.google.com/file/d/1NyKgUosodk-n9F1bNK_DZl2YJGpOKcGj/view?usp=sharing

Manel46, thanks a lot for the code. I use to develop with pasmo, but sjasm has many advantages. You can define z80 pages with code and build rom files directly without intermediate steps. I'm learning many things about MSX rom files and ways of developing code.

Thanks again to all the persons who have answered this topic.

By Juan Luis

Resident (44)

Juan Luis's picture

25-04-2019, 04:27

Manel46 wrote:

I use Ascii16 normally. It is the best for large graphics.
I add link to my google drive with an example rom, based on Artrag's sources, of which I have learned a lot. It is an image on screen8
The assembler is Sjasm.
https://drive.google.com/file/d/1NyKgUosodk-n9F1bNK_DZl2YJGpOKcGj/view?usp=sharing

Manel46, one more thing. I have compiled your example with sjasm and it works fine in BlueMSX. I can see a picture an anemone (or something similar). However, I tried same ROM file output by sjasm in OpenMSX and I can only see a black screen. I suspect that OpenMSX doesn't detect this ROM file is an ASC16.

My questions are:
- Must I add any extension in OpenMSX catapult to support ASC16 ROM files?
- How the MSX emulator detect the type of ROM mapper of the ROM file? I have seen in real MegaROM mappers jumpers to specify the type of mapper, I don't know how to do this in the MSX emulator.
- What ROM mappers do each of emulators support?

By Juan Luis

Resident (44)

Juan Luis's picture

25-04-2019, 04:36

I have just discovered the option in OpenMSX. Clicking "Cart A" button I can specify type ROM. For any reason Automatic dectection works fine with ASC16 in blueMSX but it doesn't in OpenMSX, although if I specify ASC16 in OpenMSX then I can see the picture too.

Thanks to everybody.

By Manel46

Champion (409)

Manel46's picture

28-04-2019, 16:04

Juan Luis, This is a problem we have. In the Open msx you have to force ascii16 as you say, and when loading the rom in the MFR, you must do with: / A16.
But Guilliam told me a trick to avoid this. Put in the header of rom, before start, the following bytes:
DB 32h,0,70h,32h,0FFh,77h
And you do not have to do anything else.

By Juan Luis

Resident (44)

Juan Luis's picture

29-04-2019, 11:22

It's true. It works fine adding that even without specifying the type of rom mapper. Why? What do they bytes mean?

Anyway Manel46, thank you.

By RetroTechie

Paragon (1563)

RetroTechie's picture

30-04-2019, 04:28

It's 2 Z80 instructions:

    ld (7000h),a
    ld (77ffh),a

Each writes a byte to the address range that, for an ASCII 16KB rom mapper, switches block in 8000h-BFFFh range. When inserted near the beginning of a ROM (but not executed! Aka 'dead code'), many cartridge loaders or emulators will take that as a hint that ASCII 16KB type mapper is used. So that user doesn't have to specify manually.

If included in an assembly listing, for readability you could insert the above rather than "DB ..." stuff. The assembler doesn't care & will output the same bytes in either case.

By Manel46

Champion (409)

Manel46's picture

30-04-2019, 10:20

Well explained, RetroTechie. This is the reason. For the Openmsx, 77ffh is the address, to work without forcing ascii16.
Any address from the range of 7000h to 77ffh is valid for a megarom ascii16.

By Juan Luis

Resident (44)

Juan Luis's picture

30-04-2019, 10:15

RetroTechie wrote:

It's 2 Z80 instructions:

    ld (7000h),a
    ld (77ffh),a

Each writes a byte to the address range that, for an ASCII 16KB rom mapper, switches block in 8000h-BFFFh range. When inserted near the beginning of a ROM (but not executed! Aka 'dead code'), many cartridge loaders or emulators will take that as a hint that ASCII 16KB type mapper is used. So that user doesn't have to specify manually.

If included in an assembly listing, for readability you could insert the above rather than "DB ..." stuff. The assembler doesn't care & will output the same bytes in either case.

Ok, understood. I'll take it account in the future.

Page 2/2
1 |