[Coco] CCASM 5.4 and ROM patching
Roger Taylor
operator at coco3.com
Sun May 8 22:47:36 EDT 2011
It's time for a CCASM refreshing. You can download this awesome
6809/6309 cross assembler here:
http://www.coco3.com/community/download/cm54.exe
I haven't updated the PDF docs in a while but you can use the 2006.2
docs for 99% accuracy. I added the ROM patcher feature and the
MMUINC statement which lets you merge huge chunks of data into your
codestream and specify where to load them the CoCo 3 memory map. The
result is a single LOADM file containing all of your game or app
resources/content if you like.
To use cm54.exe with the older Portal-9 or Rainbow IDE you might have
to rename it to cm.exe and copy over your other cm.exe. Or from
Rainbow you can probably just point to cm54.exe to be your new CCASM version.
CCASM 5.4 command line switches
useage: cm SourceFile{.asm} -options
SourceFile=EDTASM-style source code file
default output object = SourceFile{.bin}
options:
--------------------------------------------------------------
-bin (assemble as multi-origin CoCo LOADM'able file)
-sr (assemble as single-origin object {CoCo LOADM})
-singlerecord (assemble as single-origin object {CoCo LOADM})
-nr (assemble as contiguous object output)
-raw (assemble as contiguous object output)
-loadm (same as -bin {default})
-sloadm (assemble as CoCo single-origin LOADM'able file
-cloadm (assemble as CoCo single-origin CLOADM'able file
-rom=#K (assemble as ROM image [1k,2k,4k,{8k},16k,32k,64k,128k,256k])
-srecord (assemble as S-Record object)
-s19 (assemble as S-Record object)
--------------------------------------------------------------
-o={filename} (force the output object filename)
-o{filename} (force the output object filename)
-l (generate opcode listing to stdout)
-s (dump symbol table to stdout)
-sa (dump symbol table, including locals)
-h (show help messages along with any errors)
-d (show debug messages)
-q (quiet mode)
-v (hide title)
-e (EDTASM compatibility mode)
-de=filename (dump errors to filename
-el (dump errors to {sourcefile}.log)
--------------------------------------------------------------
-patchrom = {path to original ROM image file}
-rombase = {base address of ROM}
-patchedrom ={filename (without extension) for new patched ROM}
The CoCoNet ROM is a super patched copy of Disk BASIC 1.1. How do I
do the patchwork in one click? Here's how to take somebody else's
ROM image and overlay your own code and produce a new ROM, including
a Disto MPROM EPROM loader ROM format (LOADM'able)! This way the ROM
images can be deposited to the MPROM distro .dsk and loaded from the
remote CoCo which is connected to the PC. For example, we can click
GO from Phoenix and within a few seconds have a new CoCoNet ROM being
burned to an EPROM on the CoCo.
cm coconet.asm -patchrom=decb11.rom -rombase=49152 -patchedrom=coconet
(coconet.asm is the patch code, decb11.rom is a copy of Disk BASIC 1.1,
49152 is the base address of DECB, coconet(.rom) and coconet(.mp) are the
new ROM images written)
You can patch game ROMs, Color BASIC, Extended Color BASIC, Super
ECB, etc. if you have the original ROM image and know what bytes you
need to change. The good part is you don't need to patch by bytes
only. Just specify the ORG and issue the 6809 instructions to be
replaced starting at that address, paying attention to what you're
replacing, of course.
Have fun.
--
~ Roger Taylor
More information about the Coco
mailing list