Pursuing Tom Ram

Game available in Itch.io.

Soruce code in Github.

Programming adventures in VIC-20.


Portability to PET

Sadly, I did not make the code run in a PET Commodore (BASIC 4.0). Game starts and instructions appear on screen but, then, there is an error and the game ends.

PETs have almost the same BASIC and Kernal ROMs than VIC-20 and C.-64 so it should be easy to make the game run. I need to take some extra time and search as much documentation as possible.

My first try was the same than with C-64. I changed the starting address and the address of the subroutines for the PET. You have the code next.

  
   *=$0801
        BYTE    $0B, $08, $0A, $00, $9E, $32, $30, $36, $31, $00
        BYTE    $00, $00
	; Subroutines
	PRNSTR = $AB1E
	CHROUT = $FFD2 
	CHIN = $FFCF 
	CLEAR = $E544 

  

Portability to Commodore-16

Commodore introduced deep changes in C-16 and PLUS/4 model. However, the conversion of Pursuing tom Ram is as easy as the C-64 version.

I only have to change the addresses for ROM subroutines to make this game ruining in a C-16.

Starting address RAM is the same than CVIC-20, so no need to change the BASIC loader.

  
; C-16 unecpanded RAM has same address than VIC-20
*=$1001

; If RAM address is the sae, this loader (SYS 4109) remains the same too
        BYTE    $0B, $10, $0A, $00, $9E, $34, $31, $30, $39, $00
        BYTE    $00, $00

; Subrutines
PRTSTR = $9088
CHROUT = $ffd2 ; The same in all C machines 
CHIN = $FFCF ; The same in all C machines
CLEAR = $c567 ; CLR Screen


  

Remember that CHROUT and CHIN uses the jump vector at the end of the memory. Those vectors allows compatibility so I do not have to change the addresses.