Dragon 32 USR0x incompatible with Dragon 64
Posted: Sun Dec 19, 2010 12:58 am
The Dragon 32 has a bug in the USR routine which causes USR1 to USR9 to be always read as USR0. The work-around is to use USR01-USR09 instead. This bug was fixed for the Dragon 64, but unfortunately USR0x now returns a Syntax Error causing a BASIC incompatiblity. As a result of this, games such as Tim Love's Cricket, and Kriegspiel are not compatible with the Dragon 64.
Here's a routine which allows you to get round this problem, and play games like Tim Love's Cricket, and Kriegspiel on a Dragon 64. You can save the machine code to cassette or disk, and load it before loading the game you want to play, or add lines 20 and 30 to your own BASIC program. EXECing the start address connects/disconnects the routine from the BASIC operating system. The machine code routine is position independent.
Cassette compatible version:
DOS compatible version:
Here's a routine which allows you to get round this problem, and play games like Tim Love's Cricket, and Kriegspiel on a Dragon 64. You can save the machine code to cassette or disk, and load it before loading the game you want to play, or add lines 20 and 30 to your own BASIC program. EXECing the start address connects/disconnects the routine from the BASIC operating system. The machine code routine is position independent.
Cassette compatible version:
Code: Select all
0 'USR32 V1.0
1 'FOR THE DRAGON 64
2 'BY STEPHEN J WOOLHAM
3 '
10 CLS:PRINT"WRITING MACHINE CODE..."
20 MC$="CE00EA1193A9270BDFA9308D000BC60F7EB7CC8EBB269FA9398C82922606813026020E9F7EBB26"
30 X=1:FOR I=20480 TO 20518:POKE I,VAL("&H"+MID$(MC$,X,2)):X=X+2:NEXT
40 POKE144,2:POKE145,0:CLS
50 PRINT"START ADDRESS = 20480"
60 PRINT"END ADDRESS = 20518"
70 PRINT"EXEC ADDRESS = 20480"
Code: Select all
0 'USR32DOS V1.0
1 'FOR THE DRAGON 64
2 'BY STEPHEN J WOOLHAM
3 '
10 CLS:PRINT"WRITING MACHINE CODE..."
20 MC$="CE03EB1193A9270BDFA9308D000BC60F7EB7CC8EBB269FA9398C82922606813026020E9F7EBB26"
30 X=1:FOR I=20480 TO 20518:POKE I,VAL("&H"+MID$(MC$,X,2)):X=X+2:NEXT
40 POKE144,2:POKE145,0:CLS
50 PRINT"START ADDRESS = 20480"
60 PRINT"END ADDRESS = 20518"
70 PRINT"EXEC ADDRESS = 20480"