...
A simple cart storing a program less than 8 KB in size can just run from 0.8000.
A cart larger than 8 KB in size will need a bootstrap routine to set up memory as desired. All cartridge hardware lines are available at 400.xxxx, so the actual bootstrap code will depend on the cartridge hardware platform.
EasyFlash 1 can store up to 1 megabyte, making 16 KB visible at a time in two 8 KB chunks at 400.8000 (ROML) and 400.E000 (ROMH). Only EF bank 0 ROML is DMA’d to 0.8000 during cart start-up. The cart’s bootstrap code can write to the 400.DE00 EasyFlash bank register to select one of 64 banks to replace ROML and ROMH. This does not change 0.8000 automatically: the cart’s bootstrap needs to decide how to access and install cart data read from 400.xxxx.
Gmod2 can store up to 512 KB, making 16 KB visible at a time in one 16 KB chunk at 400.8000. Only the first 8 KB is DMA’d to 0.8000 during cart start-up.
Custom hardware must serve a DMA’able bootstrap program at $8000-9FFF.
CRT files
...
Someone writing software intended to be installed on an EasyFlash 1CR cart is likely to distribute that software as a file that an end user can install on their own EF1CR hardware. For C64/C128 carts, software is distributed as a CRT file, which can also be run in the VICE emulator. The end user uses EasySplit and EasyProg to write the CRT to the EF1CR using their C64.
We don’t yet have comparable tools for MEGA65 carts, but it’s worth discussing the appropriate format extensions while we’re figuring out the rest of it.
...
RFC: Use a CRT signature of: MEGA65 CARTRIDGE
...
Other format changes might be justified if this is added to the CRT standard by the VICE team, e.g. incrementing the format version bytes.
We would define these cartridge types, similar to the C64 and C128 cartridge types:
[DRAFT PROPOSAL]
In the C64/128 ecosystem, CRT files are used to capture data from common cartridge types, for use with recreation hardware based on EEPROMs or flash memory (EasyFlash, Gmod2), and for use by emulators like VICE. We will define a CRT extension for similar purposes with MEGA65 carts. Minimal changes to the CRT format are needed.
MEGA65 CRT files begin with this 16-byte signature: MEGA65 CARTRIDGE
Cartridge types:
0: generic
16KiB ROML at $8000-BFFF, 16 KiB ROMH at $C000-$FFFF, non-banking
One or two CHIP packets, one for each of ROML and ROMH
See
C128 generic“C128 generic” for reference
1: EasyFlash
8KiB ROML at $8000, 8KiB ROMH at $E000, with banking
See
EasyFlash“EasyFlash” for reference
2: Gmod2
16KiB banks, always mapped to ROML at $8000-BFFF
See
Gmod2“Gmod2-
128 for reference128” for reference
Other format changes might be justified if this is added to the CRT standard by the VICE team, e.g. incrementing the format version bytes.
CRT files and EasyProg
Someone writing software intended to be installed on an EasyFlash 1CR cart is likely to distribute that software as a CRT file that an end user can install on their own EF1CR hardware. With C64/C128 carts, the end user uses EasySplit and EasyProg to write the CRT to the EF1CR using their C64.
We don’t yet have comparable tools for MEGA65 carts, but it’s worth discussing tool needs.
A fork of EasyProg would be required to recognize the CRT signature and install the
M65
cart header described above.A fork of bin2efcrt would be useful for developers. The change to the CRT signature would be straightforward.
I have not yet tested EasyProg from GO64 mode. It works well with the C64 core.
Ideally we’d have a new version of EasyProg that runs in MEGA65 mode and can read full CRT files off the SD card, but that’ll be a big project. In the meantime, it should be possible to use a forked EasyProg with the C64 core to make MEGA65 carts.
External References
World of Jani: Making a C64 Cartridge and Making a C128 Cartridge
Test Cartridge download
ROM implementation issue: MEGA65 cart support #62
bin2efcrt program
...