Converting my game to the MAX Machine / Ultimax cartridge format


After watching a fun and interesting video by 8-Bit Show And Tell about the Commodore MAX Machine, I got inspired to convert one of my own games to the cartridge format used by that system. Also, the Commodore 64 has a memory configuration called Ultimax which is compatible with MAX cartridges.

My game Wave Hero was an obvious candidate for such a cartridge conversion, because the program size is small (less than 6KB uncompressed), and the game doesn't use a lot of RAM when running. (The MAX Machine only has 2KB of RAM available, in addition to color RAM.)

Here's basically what I had to do to convert the game to the MAX Machine cartridge format:

  • Re-arrange the memory (move code, data and graphics to the 8KB ROM bank at $e000, and align it properly)
  • Replace some self-modifying code (use additional variables in zero page instead)
  • Add some initialization code for I/O (the MAX Machine has no ROMs, and thus no chip initialization is done on reset)
  • Adjust the raster interrupt code (some code for dispatching IRQ routines is now located in zero page)

I don't have a MAX Machine or any EPROM programming hardware myself, so I'm unable to make and test an actual physical cartridge with the game. However, the cartridge image file (CRT) seems to work as expected in the VICE emulator, using various model settings (MAX Machine, C64 NTSC and C64 PAL.)

RAM usage (2 KB)

StartEndDescription
$0002$001bIRQ dispatch code (copied from ROM at startup)
$001c$0033Last and best distances
$0034$009cGame variables
$009d$00ffUnused
$0100$01ffCPU stack
$0200$02ffUnused
$0300$033fBlank sprite
$0340$03ffDynamic sprites (PWC driver and distance travelled)
$0400$07ffScreen and sprite pointers

ROM usage (8KB)

StartEndDescription
$e000$eb2eGame code
$eb2f$f023Game data
$f024$f8ffUnused (the game could certainly be enhanced!)
$f900$fbffSprite graphics
$fc00$ff9fCharacter graphics
$ffa0$fff9Unused
$fffa$fffbNMI vector
$fffc$fffdReset vector
$fffe$ffffIRQ vector

Files

WaveHero_Ultimax_v1.0.crt 8 kB
Sep 03, 2022
WaveHero_Ultimax_v1.2.crt 8 kB
22 days ago

Get Wave Hero

Comments

Log in with itch.io to leave a comment.

I tried to make a 8K ultimax cartridge to test on a real MAX and no luck.


Tried with Old Mine Hoist (16k) and it was working.

Any clue?

Not sure why Wave Hero will not work, when Old Mine Hoist does. They use mostly the same startup code (for initializing I/O etc.)

If you want to give it another go, I've attached a v1.1 .crt file above. This version sets various border colors during the startup sequence, so it should be possible to determine if any cartridge code runs at all.

V1.1 not working, it does nothing, the same as 1.0

OK, thanks for testing! If the screen just remains black, I guess that means that no cartridge code is being run at all. (The first thing the cart code in v1.1 does, after making sure the VIC-II chip is enabled, it to set the border color to blue, and then it changes the color several times during the initial startup sequence.)

At least it's useful for me to know that although a cart image works as it should in the VICE emulator (with "MAX Machine" as the selected Model in Settings), that doesn't mean that it will work on an actual MAX Machine. (I'm assuming that everything about the physical cartridge itself, and the pinouts, are appropriate for the MAX in this instance.)

(+1)

A new version v1.2 is now available, where I've made some further adjustments (e.g. removed a PAL/NTSC check, which means there will be a little sprite glitch near the left border on PAL C64s. But the MAX is NTSC only anyway.)

But I fully understand if you don't want to spend any more time on testing this game on MAX, though.

(2 edits)

V1.2 not working in MAX.

I have tested all 3 versions in C64 and all 3 are working, as you know all MAX cartridges run on a C64, but not the other way around.

The cartridge's hardware must be fine because I can run other 8K MAX games on it. I followed the same process that with OLD MINE, first converting the CRT file to BIN (The file needed to burn a EPROM). For this used WinVICE's cartconv.exe

cartconv -i WaveHero.crt -o WaveHero.bin
And then burning the EPROM with the BIN file.

The hardware is configured in 8K ultimax: #EXROM=1, #GAME=0 : start $E000-$FFFF #ROMH

I will have a look to the crt format when I have more time.

Thank you for testing again, and for providing all the details of the process you use. I see nothing wrong there.

I've verified that the output file from the cartconv command you mention is binary identical to the ROM file I used when creating the .crt file, so the crt header/format seems to be correct.

That's cool