https://github.com/fstark/sg4b-reverse
Texscan MSI SpectraGen 4B ROM reverse engineering
https://github.com/fstark/sg4b-reverse
Last synced: 4 months ago
JSON representation
Texscan MSI SpectraGen 4B ROM reverse engineering
- Host: GitHub
- URL: https://github.com/fstark/sg4b-reverse
- Owner: fstark
- Created: 2024-04-28T19:29:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T11:56:32.000Z (about 2 years ago)
- Last Synced: 2025-09-24T03:36:24.663Z (9 months ago)
- Language: Assembly
- Size: 5.22 MB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sg4b-reverse
Texscan MSI SpectraGen 4B ROM reverse engineering
Supports reverse engineering of the Texscan MSI SpectraGen 4B ROM version 5.7, to understand how to connect with it (does not aim at full reverse).
# Texscan
https://cg-wiki.org/texscan_msi/sg4b
# ROMs:
U20.BIN : Main Boot ROM, 16K, mapped 0x0000 - 0x3fff
U21.BIN : 16K, mapped 0x8000 - 0x7fff
U22.BIN : Mostly data, 16K, mapped 0xc000 - 0xffff
# How to use
Under linux, install ``pasmo``. Run the ``doit.sh`` script and start hacking the ``rom-57.asm`` file. Any discrepancy in generation will immediately be highligted in the terminal.
# Personal notes on the initial generation of assembly files
First, generation of a simple assembly file at correct address
Then assembly of this file to generate the correct symbol file
Then concatenation of all symbol file to get a symbol accross all ROMs
Then re-generation of assembly files with all symbols
z80dasm -l -a -t -g 0x8000 ROMs/U21-57.BIN > u21-57.asm
pasmo --alocal u21-57.asm u21-57.bin u21-57.sys
z80dasm -l -a -t -g 0xc000 ROMs/U22-57.BIN > u22-57.asm
pasmo --alocal u22-57.asm u22-57.bin u22-57.sys
cat u20-57.sys u21-57.sys u22-57.sys | sed -e 's/[ \t]*EQU 0\(....\)H/: equ 0x\1/g' > all.sym
z80dasm -l -a -t -g 0x8000 -S all.sym ROMs/U21-57.BIN > u21-57.asm
z80dasm -l -a -t -g 0xc000 -S all.sym ROMs/U22-57.BIN > u22-57.asm
pasmo --alocal u21-57.asm u21-57.bin u21-57.sys
pasmo --alocal rom.asm rom.bin rom.sys