The IDA Pro tools for the Sega Genesis/MegaDrive romhackers
IDA_DIR
, IDA_SDK
)vcpkg
as described in the Tutorial: Install and use packages with MSBuild in Visual Studio step 1.build.py
from IDA Pro QT distro. Add: "-nomake", "examples",
after "-nomake", "tests",
jom
from: https://ftp.funet.fi/pub/mirrors/download.qt-project.org/official_releases/jom/jom_1_1_4.zippython build.py -j 16 -v
loaders
dir into the corresponding IDA folderplugins
dir into the corresponding IDA folderGensIDA debugger plugin
or Z80 debugger plugin
debuggerF9
to start a debugging processgens_68k.exe
or gens_z80.exe
from gens
folder, choose a ROMShift+J
to choose how to mark your data range. Or mark it by yourself using available methods (listed below)File->Produce file->Create LST file...
. Save .lst
listing file.lst
file. You can also use assemble_as.bat
, assemble_vasm.bat
or assemble_asm68k.bat
for thatAll methods are specified like START_TAG
- END_TAG
(except ORG
tag), where START_TAG
must be specified using Anterior comment (Ins
) at the first line of your data, and END_TAG
must be inserted using Posterior comment (Shift+Ins
).
Available TAGS:
BIN "relative/path.bin"
. This tag allows you to save some data array (or even code) to the "relative/path.bin"
during the extraction. It also inserts binclude "relative/path.bin"
line to your listing.INC_START "relative/path.inc"
- INC_END
. The same as the previous item, except it just stores copies all lines between these tags as is and inserts the following line: include "relative/path.inc"
.DEL_START
- DEL_END
. These tags can be used if you want to cut some lines from the resulting asm listing.ORG $SIZE
. This tag inserts org $size
directive line in the output.VDP VRAM
, VDP CRAM
, VDP VSRAM
NOTE: this works for DMA operations as well.
Once you are debugging, in the IDA View click 'g' and go to either: | Memory type | Address | Alternative address |
---|---|---|---|
VRAM | 0x00D00000 | DBG_VDP_VRAM:00D00000 | |
CRAM | 0x00D10000 | DBG_VDP_CRAM:00D10000 | |
VSRAM | 0x00D20000 | DBG_VDP_VSRAM:00D20000 |
Find the address or addresses you want, offsetted from the above. Then select it / them . Right click. a prompt will come up. Click "Add Beakpoint" , or press F2 after selecting. A "Breakpoint Settings" window will come up. Select either read or write or both under Hardware breakpoint mode and set the size. You can enable other settings like actions etc.
General Registers can be seen while running the debugger in IDA Pro by going to Debugger -> Debugger Windows -> General Registers.
D0-D7
, A0-A7
, PC
, SP
, SR
, DMA_LEN
, DMA_SRC
and VDP_DST
are all shown here
VDP Registers can be seen while running the debugger in IDA pro by doign to Debugger -> Debugger Windows -> VDP Registers
Pass -nodebug 1
to gens_xxx.exe
.