ROM Cartridge to Disk

6809 User '90

When Dragons were first brought out, quite a considerable amount of software came in "ROM" format, the cartridge, or as Tandy called them 'a plug in program pak'.

However cartridges do have a number of disadvantages, in time they do not make such a good fit as when they were first bought, and if the machine is expanded with a disk drive system it is extremely annoying to continually remove the DOS cartridge.

Hence little software is now produced in ROM format (also probably partly due to cost). How- ever rather than throw your cartridges is the cupboard somewhere to gather dust it is possible to transfer them to disk, enabling you to not only have the programs on a better format but also to be able to put the spare caerldge connectors to better use.

Firstly, your machine must have 64K since the loaded must reside in the same place in RAM as the cartridge would in ROM. Secondly it must have the minimum links wHh BASIC unless you can switch out your DOS with software (some newer versions allow this to take place).

Most Dragon cartridges are auto starting (i.e. you plug into the side of the machine, switch on and a short while later the program runs). You somehow need to disable this. When a cartridge is con- nected to the machine one of the connections made is to link one of the CPU's clock lines to the CART line. This has the effect that, when interrupts are enabled by the operating system at switch on, a fast interrupt request (FIRQ) is generated. This causes the operating system to pass control to the cartridge at address $C000. To prevent this happening, you need to 'break' the appropriate line.

Take the cartridge and turn it upside down. The CART line is the fourth from the left. Most cartridges do not have the first three lines actually connected so it is usually the first line from the left on the PCB. Stick a piece of cellotape over this line and wrap the tape tightly around the edge of the PCB (see figure).

Now plug the cartridge in and switch on. The normal BASIC startup message should greet you. If not, switch off, unplug and check that you have masked over the right line ( and it may be a good idea to check that the cartridge still works!).

Once you have the machine running type 'EXEC 49152' and the program should run as normal. When you have check that the cartridge appears to run, you need to save the memory it is occupying on tape for transferral, using CSAVEM"",49152,57344,49152

This will save only the first 8K; though most car- tridges are 8K EPROMS. (To check this, PEEK the locations 49152 & 57344: if they are the same then you have an 8K EPROM). Once you have saved the cartridge ROM you can switch off and plug in the DOS cartridge.

You will now need a piece of machine code to put the program in the appropriate place in RAM - the program CARTBOOT.BIN will perform this function.

Usage:

 
CLEAR 200,16000
LOAD "CARTBOOT.BIN",16000 
CLOADM"",32768

Which will load the program from tape When the tape stops save the program to disk using

SAVE "PROGNAME", 16000,24576,16000

Again this is for an 8K EPROM Typing EXEC 16000 should now run the cartridge program.

IMPORTANT: wait until the disk motors have stopped before EXECing the code otherwise they will never stop!

Problems: The routine used to copy the code into the appropriate place in RAM works with all of my cartridges but if the EXEC 16000 fails to work then it is possible that the ROM uses the BASIC ROM more heavily.

This could end up attempting to run code in what used to be the DOS ROM (see note on interactive ROMS) - although I have never seen this. The CARTBOOT program automatically resets all the RAM hook vectors to RTS instructions which can be a source of problems. The only other possible areas are the interrupt vectors and the BASIC token table (though this is unlikely).

Despite this, there is no guarantee that the soft- ware will run under these conditions. To see if it is at all possible try the cartboot program with the DOS unplugged; if it works sucessfully then you will have to persuade BASIC more strongly to 'lose' the DOS ties.

As previously mentioned. newer versions of DOS chips allow you to 'switch out' itself- hence you can use any cartridge (e.g. ROM based assemblers) using the same method with no clashes at all.

NOTE ON CoCo Cartridges: it appears that the few Coco cartridges that I have also appear to work on the DRAGON since they only interact with BASIC through th e indirect jump which is present on both machines though this may not not be the case with other cartridges

The other problem with this however is that joystick 'noise' occurs through the speaker whenever they are used on the Dragon. This does not happen on the CoCo (why I do not know) but the modified CARTBOOT program given should partially remedy the noise problem for CoCo cartridge owners.

Download Cartboot

cartboot.bin
cartboot.asc (DASM assembler source)

cartboot2.bin (CoCo noise mode)
cartboot2.asc