[Coco] How to trick Disk BASIC?, or Drivewire sans disk controller...

Arthur Flexser flexser at fiu.edu
Tue Feb 16 00:49:38 EST 2010


On Mon, Feb 15, 2010 at 8:12 PM, Joel Ewy <jcewy at swbell.net> wrote:

> A-ha!  That did it!  So the CART Auto-Start must jump to a different entry
> point than the beginning of the Disk BASIC ROM...


  The CART autostart jumps to $C000 after checking that the first two bytes
of the cartridge ROM are not ASCII "DK", which would indicate a disk
controller.
If "DK" is found, the jump is to $C002.  But, I really don't think the
two-byte difference in addresses accounts for your crash.  As I recall,
ASCII "DK" translates to something that falls through okay when executed and
takes you to into the Disk Basic startup code.  (Somebody could check my
recollection on this and report what happens when you do an EXEC &HC000 on a
real CoCo with a disk controller.  You see the Disk Basic startup message,
right, same as if you did EXEC &HC002?)  Instead, I believe that when "DK"
is detected, substantial initialization of Basic takes place before the jump
to $C002 occurs, and it is the lack of that which caused the crash.

An incidental bit of trivia:  at least one cartridge game
deliberately put a "DK" in its first two bytes, to fool Basic into mistaking
the game for a disk controller, in order to defeat the technique of taping
over a pin to defeat autostart for the purpose of saving the game's code
to another medium.

Art



More information about the Coco mailing list