WRITEROM: System ROM Extraction (and R47 Prerelease archive)

Post Reply
voidstar
Posts: 445
Joined: Thu Apr 15, 2021 8:05 am

WRITEROM: System ROM Extraction (and R47 Prerelease archive)

Post by voidstar »

This is a BASLOAD example program to read the current System ROM and write them to a file. This can be used to help validate what your system currently has (such in case the HELP info refers to a git commit that you're unable to find - you extract your ROM and have it backed up prior to loading any new ROM).

Also attached is the "official" initial released ROM. This is the same as what is available in the /SYSTEM/ROM-UPDATE folder of the SD card. However, for those who don't have their system yet and want to use this same ROM in the X16 emulator environment (to ensure they are developing with a matching System ROM, or to try out the new BASLOAD features that are not yet available in any official git hub ROM release).

Copy the ROM BIN to your emulator folder and invoke the emulator using the -rom command line argument. For example:

Code: Select all

E:\X16\x16emu_win64-r45>x16emu.exe -rom ROM_R47_Prerelease_wBASLOAD.BIN
The .PRG is already tokenized and ready to run. The .BASL.TXT file is by BASLOAD "WRITEROM.BASL.TXT" then RUN.
The code here is pretty slow, it will take several minutes to write the ROM content. Note that System ROM indexes are reserved from 0-31 but this code is only going 0-15 to cover the currently defined set of ROMs (up to and including BASLOAD).
Attachments
WRITEROM.PRG
(399 Bytes) Downloaded 520 times
WRITEROM.BASL.TXT
(1.05 KiB) Downloaded 542 times
ROM_R47_Prerelease_wBASLOAD.BIN
(256 KiB) Downloaded 563 times
Last edited by voidstar on Sun Jan 14, 2024 2:18 am, edited 1 time in total.
voidstar
Posts: 445
Joined: Thu Apr 15, 2021 8:05 am

Re: WRITEROM: System ROM Extraction (and R47 Prerelease archive)

Post by voidstar »

Here is the MS-DOS script I use to combine the resulting files back into a single ROM BIN:

Code: Select all

copy /b ROM-0.BIN + ROM-1.BIN + ROM-2.BIN + ROM-3.BIN + ROM-4.BIN + ROM-5.BIN + ROM-6.BIN + ROM-7.BIN + ROM-8.BIN + ROM-9.BIN            R1.BIN
copy /b ROM-10.BIN + ROM-11.BIN + ROM-12.BIN + ROM-13.BIN + ROM-14.BIN + ROM-15.BIN + ROM-16.BIN + ROM-17.BIN + ROM-18.BIN + ROM-19.BIN  R2.BIN
copy /b ROM-20.BIN + ROM-21.BIN + ROM-22.BIN + ROM-23.BIN + ROM-24.BIN + ROM-25.BIN + ROM-26.BIN + ROM-27.BIN + ROM-28.BIN + ROM-29.BIN  R3.BIN
copy /b ROM-30.BIN + ROM-31.BIN + ROM-32.BIN + ROM-33.BIN + ROM-34.BIN + ROM-35.BIN + ROM-36.BIN + ROM-37.BIN + ROM-38.BIN + ROM-39.BIN  R4.BIN
copy /b ROM-40.BIN + ROM-41.BIN + ROM-42.BIN + ROM-43.BIN + ROM-44.BIN + ROM-45.BIN + ROM-46.BIN + ROM-47.BIN + ROM-48.BIN + ROM-49.BIN  R5.BIN
copy /b ROM-50.BIN + ROM-51.BIN + ROM-52.BIN + ROM-53.BIN + ROM-54.BIN + ROM-55.BIN + ROM-56.BIN + ROM-57.BIN + ROM-58.BIN + ROM-59.BIN  R6.BIN 
copy /b ROM-60.BIN + ROM-61.BIN + ROM-62.BIN + ROM-63.BIN                                                                                R7.BIN
copy /b R1.BIN + R2.BIN + R3.BIN + R4.BIN + R5.BIN + R6.BIN + R7.BIN ROM.BIN

Post Reply