A better version of Koronis Rift
This is a description how to make an even better version of Koronis Rift with some additional tools. It takes quite a while to load the first program because my copy routine is inefficient and then it runs through a longer initialization which we also could skip. When we load the program and look at the start, there is a first JSR - lets set a breakpoint right behind it.

When you run the programm it stops after two seconds on $0823 and the screen looks still empty. With further experimentation you see that you can remove the breakpoint and return for the game to start correctly. But the initialization has unfortunately written some stuff into the $0400 space. So, after the break, we need to bank ram
and then s "rift-0823" 0 0400 ffff
to store this for further use.
My T64 loader would be capable of loading this file if you name it !0823 and replace the former !0820 with it and you save about two seconds init time. But you can also use other tools - either Pugsys snapshot tool CRT Linker or the (yet unreleased) OL64 tool from Statmat. Besides reducing load time as their copy routines can be a LOT faster, they also have other nice features. For CRT Linker we need a Vice snapshot, but we just can't take it now. The problem is that our loader is not installed. We need to find a couple of bytes for the init routine. For this we look at seemingly untouched memory areas. To confirm we fill that space with a nonsense value, start the original program, break at $0823 and check if our nonsense value is still there. With this we see that the init leaves the space from $0500 to $05ff untouched, so we can hide payload there.
We now need to know which bank we are starting with. I am using bank A because CRT Linker with a title screen uses banks 0 to 9 - that explains the LDA #$0A
.
.C:0500 A9 37 LDA #$37
.C:0502 85 01 STA $01
.C:0504 A9 0A LDA #$0A
.C:0506 8D 00 DE STA $DE00
.C:0509 20 8E 80 JSR $808E
.C:050c A9 80 LDA #$80
.C:050e 8D 00 DE STA $DE00
.C:0511 A9 35 LDA #$35
.C:0513 85 01 STA $01
.C:0515 4C 23 08 JMP $0823
The correct value for $01 before the jump out can be seen with the "r" command in vice after your break at $0823. You could also load it and restore it, but as this is no general code, just using the value we know must be written is fine.
The order to do things now is:
Load the original !0820 prg. Set a breakpoint at $0823, put the payload at $0500, NOW g 0820
, set a break at $0500, g 0500
, and write a snapshot now with the dump
command. Remember that for CRT Linker you need to have a name that follows the name.freeze.vsf format.
The title screen

The screen is available as an executable at [CSDb] - Koronis Rift by SIR (1985) and we need to freeze it with something like Action Replay to get a Koala paint version of this screen. Following the instructions you now put the freeze and the screen into CRT Linker. You will get a cartridge that shows the screen... and crashes.
Of course we need to add our T64 image with loader to it. We can now remove the !0820 program from the tape, making it a lot smaller, so our whole game, with title screen, still will fit into a 128K Magic Desk cartridge.
Adding it all together
At this stage we have a t64 file, a memory dump and a Koala file. These are the steps to glue them together:
- Use CRT Linker to convert the dump into a CRT which will of course not work yet.
cartconv -i koronis.crt -o koronis.bin
(make a pure binary of the CRT file)copy /b koronis.bin t64loadera.bin koronis.t64
(makes one large file)cartconv -i koronis.bin -o koronis.crt -t md -p
(and back to VICE format)
If anybody wants to automate all these steps, let me know. I am using a DOS batch file that is not ready for general use.
So where's the cartridge?
Due to my slightly exposed persona I will not upload a copyrighted game on my own website. I guess that others will use my instructions, build the image and release it on the Internet and by this will also find its way into a future release of the Oneload collection.