Changes

Programming:Cartridges

319 bytes added, 08:32, 30 May 2022
|}
When a ROM bank is mapped into lower ROM (0x0000) or higher ROM (0xC000), reads will go to ROM and writes will go to RAM and mapped ROM is only seen by the CPU. This is important because the gate array can only see RAM when drawing the screen.
The idea is mapping on higher ROM any of the banks as we need them, and we can use that data with RAM from 0x4000 to 0xffff, leaving on lower ROM the bank 0 with our code.
It is '''easy to support both CPC+ and Dandanator from a single code baseImportant''' using macros: when mapping data on high ROM with video RAM on 0xc000 you won't be able to draw masked sprites directly from that mapped ROM (reading video RAM is required to apply the mask). Either don't use 0xc000 for video memory or make a copy of those sprites to RAM from 0x4000 to 0xc000 and draw them from there.
Then It is '''easy to support both CPC+ and Dandanator from a single code base''' using macros and generating both CPR and Dandanator ROMs is trivial. For example, these [https://github.com/reidrac/cpr-tools simple tools to make/dump CPC+ CPR cartridge files] can generate both formats (use RAW and padding flags to get a Dandanator ROM).
== Dandanator ==
43
edits