Instead of:
LD A,(HL) ;8
ADD A,128 ;8
LD (HL),A ;8
I use
SET 7,(HL); 17
To subtract 128 I use RES 7,(HL)
you could save all the toggeling forth and back of the RAM nametable when you simply set bit 7 in every second copy to the vram nametable!
ah, good optimization! I always forget when optimizing that most operations can be done directly with (hl), without having to bring the data to a register
I think the best optimization would be reading uncompressed map directly from memory with an offset, so there will be no LDDR of "in RAM nametable" on 8th frame...
But a map of 256x32 tiles is 8Kb long. The map you all saw in video was 280x32. I think a good map would be 512 rows. So i need 16kb for every level of a hypothetical game. About 10 levels? so I need 160kbytes only for store maps.
A megarom? I think so. Someone can explain me how can I do it? Or link me somewhere
In that scenario you can keep the levels compressed as their permanent storage, but decompress them into a 16kb buffer before a level begins.
Yep, but still I don't know how create a ROM nor the best mem configuration. Someone will teach me, please?
A megarom? I think so. Someone can explain me how can I do it? Or link me somewhere
Here is a page that describes the different ROM mappers.
I’d suggest ASCII8 as a first choice.
The ROM binary you create is just cut into 8K chunks, and the chunk with the index you write to the bank registers of the mapper is visible in the corresponding memory region.
Thank you!
I feel as I am a donkey... is there any tutorial about creating a ROM file, how configure and manage it? A guide from A to Z, possibly with some code examples?
Here’s “Hello World” as a 16K ROM:
https://bitbucket.org/grauw/glass/src/@/examples/hellorom.asm
Here’s some official documentation:
MSX2 Technical Handbook: Developing cartridge software
In short: the signature starting with “AB” at the beginning provides the initialisation address. When you want to make a 32K ROM, only the first half is automatically paged in to page 1 (4000H-7FFFH). To page in the second half, determine the slot ID of page 1 with a GetSlot routine, and use ENASLT to also enable it in page 2. Then, if you want to use more than 32K by using a MegaROM mapper, write the segment number to the mapper’s corresponding memory address to select a bank.
That's the answer I was looking for! So I can start studying ROM stuff
Thank you VERY much Grauw! You are always a great help (in a lot of posts. yes, I'm reading them all, a bit every day. I'm at page 42 of development forum). I'll return ASAP with a ROM file (no more CAS for me XD)