Page 1 of 1

Dragon 32 USR0x incompatible with Dragon 64

Posted: Sun Dec 19, 2010 12:58 am
by zephyr
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:

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"
DOS compatible version:

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"

Re: Dragon 32 USR0x incompatible with Dragon 64

Posted: Sun Dec 19, 2010 11:35 am
by robcfg
Hey, great work!

I'm learning a lot on the Dragon just by reading your posts.

Keep up the good work!

Re: Dragon 32 USR0x incompatible with Dragon 64

Posted: Wed May 28, 2014 11:52 pm
by zephyr
NOTE: This routine is not needed if you are using Steve Woolham's Enhanced Dragon ROMs.

Re: Dragon 32 USR0x incompatible with Dragon 64

Posted: Thu Jun 12, 2014 12:22 pm
by zephyr
Dragon 32/64 compatible versions of Kriegspiel and Tim Love's Cricket are now available from the Uploads section.

viewtopic.php?f=7&t=4861

viewtopic.php?f=7&t=4825