[Coco] No MPI - any suggestions?
Arthur Flexser
flexser at fiu.edu
Fri Oct 5 13:21:08 EDT 2007
On Fri, 5 Oct 2007, Frank Swygert wrote:
> Right in the CoCo book I wrote years ago.... "A program stored in a ROM
> for the CoCo is normally a machine language program. BASIC programs can
> be stored in a ROM, but must include a m/l loader to move them into an
> area where BASIC can run them. The computer detects the presence of a
> ROM Pak through the CTS (cartridge select) signal on the expansion port
> or MPI. The CART (cartridge detect interrupt) line senses the presence
> of a ROM Pak also, and auto executes it. Auto execution can therefore be
> deterred in all but a very few ROM Paks by taping over pin eight on the
> cartridge itself. The ROM can then be executed by typing EXEC 49152
> (CoCo 1/2 ONLY) or EXEC 57360 (CoCo 3 ONLY), or the information can be
> saved to tape with: CSAVEM (name),49152, 65279, 49152 This will save a
> standard 16K ROM Pak (all CoCo 1/2 Paks are only 16K) to tape. A special
> program or patch has to be used to save and run the larger ROM Paks from
> RAM. Patches for some are available from Delphi or FARNA Systems." So
> it's only program paks that are over 16K that require special loader
> programs.
Actually, they all do, if you are loading it from disk, since the cartridge code
will overwrite the Disk Basic ROM code that is required for a loadm. (In a CoCo
1/2, you'd also need to transfer the ROMs to RAM first, since you can't loadm to
ROM.) So, the way it is done is to loadm the code to some location like $2000
using an offset and then, after loading is complete and Disk Basic is no longer
needed, block move it to its normal location at $C000 (49152) and execute it.
Many Rompacks need more than this, since they are "protected" with checks to
ensure they are running from ROM rather than RAM, such as code that attempts to
change the contents of a key location (that would be unchangeable if it was
ROM), or pokes to $FFDE that put the machine back in ROM mode.
Art
More information about the Coco
mailing list