The process to create a 1Mb 3.1 (pre 3.1.4) ROM is exactly the same as a 3.1.4 ROM except the patch is more complex as pre 3.1.4 exec used a scan table that that is referenced by a relative address (i.e. not an absolute address, “LEA nnnn(PC).A0”), luckily by using the disassembler functions Cap can search for effective address opcodes to save you disassembling it yourself.
So here’s the run-through to get a ROM capable of 1Mb using the CLI, note, this only creates an empty ROM with the exec.library prepared to act as a 1Mb ROM.
Create an empty ROM;
newrom 512k rombase 0xF80000 add "ROMs\TOSEC.Firmware\Kickstart v3.0 r39.106 (1992-09)(Commodore)(A1200)[!].rom" exec.library add components\BinaryChunks\1Mb_Scantable.bin
Locate the old scan table (this is pretty much the same for all 3.1 ROMs except CD32 which is already 1Mb capable)
find $exec.library 0x00F800000100000000F0000000F80000FFFFFFFF alias FIND add $ROMBASE alias FIND mid 4 alias OPCODE "LEA $FIND(PC),A0"
Locate the opcode (which will include the relative displacement reference)
findopcode $exec.library "$OPCODE" alias FIND add 2 alias REL $1Mb_Scantable.bin.(START) alias REL subtract $FIND alias REL mid 6
Patch the opcode to have the new relative displacement;
patch $FIND 0x$REL
Repeat for the second reference;
findopcode $exec.library "$OPCODE" alias FIND add 2 alias REL $1Mb_Scantable.bin.(START) alias REL subtract $FIND alias REL mid 6 patch $FIND 0x$REL
And you’re done, you can now add the rest of the components, for the 0xF8 ROM, create the second 0xE0 ROM, add the components and save.
The other big difference between 3.1 exec and 3.1.4 exec is that because an absolute displacement is used in 3.1.4, you can place the new scan table anywhere is ROM (as opposed to relative displacements using “words” can only be +/- 32k jumps), this means that the new scan table in 3.1 must be directly after exec.