From cea07fb48f98c6c757e35393f09c9c62e5da6a4a Mon Sep 17 00:00:00 2001 From: Zorchenhimer Date: Fri, 26 Dec 2025 21:00:26 -0500 Subject: [PATCH] Add Slow for Rom; Label export - Added the config for the Slow for ROM disk - Added a bunch to the ROM-QD (backup) disk - Added a conversion util (in a separate repo, lol) to convert .cfg files to a Mesen label file (.mlb). - Added some notes --- .gitignore | 1 + Makefile | 33 +++-- disksys.cfg | 1 - labels.cfg | 222 +++++++++++++++++++++++++++++---- notes.txt | 63 ++++++++++ sf_rom-qd_file1_postcopy.cfg | 16 +-- sf_rom-qd_file1_precopy.cfg | 7 -- sf_slow_rom_file1_postcopy.cfg | 87 +++++++++++++ sf_slow_rom_file1_precopy.cfg | 18 +++ 9 files changed, 403 insertions(+), 45 deletions(-) create mode 100644 sf_slow_rom_file1_postcopy.cfg create mode 100644 sf_slow_rom_file1_precopy.cfg diff --git a/.gitignore b/.gitignore index cb247b1..eef6820 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ dasm/ bins/ +labels/ *.tmp diff --git a/Makefile b/Makefile index 97f0a57..1cf3d8a 100644 --- a/Makefile +++ b/Makefile @@ -2,32 +2,47 @@ export PATH := $(PATH):/home/nick/code/nes/go-fds/bin -all: dasm/ bins/ \ +LBL=../../go-dasm-labels/bin/dasm2lbl +DA=../../cc65/bin/da65 + +all: dasm/ bins/ labels/ \ dasm/disksys.asm \ dasm/dk3_file4.asm \ dasm/dk3_file4-post-copy.asm \ dasm/sf_rom-qd_file1_precopy.asm \ - dasm/sf_rom-qd_file1_postcopy.asm + dasm/sf_rom-qd_file1_postcopy.asm \ + dasm/sf_slow_rom_file1_precopy.asm \ + dasm/sf_slow_rom_file1_postcopy.asm \ + labels/sf_slow_rom_file1_postcopy.mlb \ + labels/sf_rom-qd_file1_postcopy.mlb -dasm/dk3_file4.asm: bins/dk3_file4.bin dk3_file4.cfg labels.cfg -dasm/dk3_file4-post-copy.asm: bins/dk3_file4.bin dk3_file4-post-copy.cfg labels.cfg -dasm/sf_rom-qd_file1_precopy.asm: bins/sf_rom-qd_file1.bin -dasm/sf_rom-qd_file1_postcopy.asm: bins/sf_rom-qd_file1.bin +dasm/dk3_file4.asm: bins/dk3_file4.bin +dasm/dk3_file4-post-copy.asm: bins/dk3_file4.bin +dasm/sf_rom-qd_file1_precopy.asm: bins/sf_rom-qd_file1.bin +dasm/sf_rom-qd_file1_postcopy.asm: bins/sf_rom-qd_file1.bin +dasm/sf_slow_rom_file1_precopy.asm: bins/sf_slow_rom_file1.bin +dasm/sf_slow_rom_file1_postcopy.asm: bins/sf_slow_rom_file1.bin clean: - -rm dasm/* bins/* + -rm dasm/* bins/* labels/* %/: - mkdir $@ + -mkdir $@ dasm/%.asm: %.cfg.tmp - da65 -i $< -o $@ + $(DA) -i $< -o $@ %.cfg.tmp: %.cfg labels.cfg cat $^ > $@ +labels/%.mlb: %.cfg.tmp + $(LBL) $^ $@ --rom-start 0xE000 --ram-start 0x5000 + bins/dk3_file4.bin: roms/sf_dk3.fds fdsextract --side 0 --file-num 4 --output $@ $^ bins/sf_rom-qd_file1.bin: roms/sf_rom-qd.fds fdsextract --side 0 --file-num 1 --output $@ $^ + +bins/sf_slow_rom_file1.bin: roms/sf_slow_rom.fds + fdsextract --side 0 --file-num 1 --output $@ $^ diff --git a/disksys.cfg b/disksys.cfg index b602d14..70e4ce0 100644 --- a/disksys.cfg +++ b/disksys.cfg @@ -8,7 +8,6 @@ global { }; range { - name "vectors"; type addrtable; start $FFFA; end $FFFF; diff --git a/labels.cfg b/labels.cfg index 679e1cb..ec3d706 100644 --- a/labels.cfg +++ b/labels.cfg @@ -1,27 +1,202 @@ -label { addr $0100; name "FDS_nmi_flags"; }; -label { addr $0101; name "FDS_irq_flags"; }; +## Standard Stuff +label { addr $2000; name "PPU_CTRL"; }; +label { addr $2001; name "PPU_MASK"; }; +label { addr $2002; name "PPU_STATUS"; }; +label { addr $2003; name "PPU_OAMADDR"; }; +label { addr $2004; name "PPU_OAMDATA"; }; +label { addr $2005; name "PPU_SCROLL"; }; +label { addr $2006; name "PPU_ADDR"; }; +label { addr $2007; name "PPU_DATA"; }; -label { addr $4020; name "FDS_4020_TimerIRQReloadLow"; }; -label { addr $4021; name "FDS_4021_TimerIRQReloadHigh"; }; -label { addr $4022; name "FDS_4022_TimerIRQControl"; }; -label { addr $4023; name "FDS_4023_MasterIO"; }; -label { addr $4024; name "FDS_4024_WriteData"; }; -label { addr $4025; name "FDS_4025_Control"; }; -label { addr $4026; name "FDS_4026_Ext"; }; -label { addr $4030; name "FDS_4030_DiskStatus"; }; -label { addr $4031; name "FDS_4031_ReadData"; }; -label { addr $4032; name "FDS_4032_DriveStatus"; }; -label { addr $4033; name "FDS_4032_ExtRead"; }; +label { addr $4000; name "APU_PULSE1"; size 4; }; +label { addr $4004; name "APU_PULSE2"; size 4; }; +label { addr $4008; name "APU_TRI"; size 4; }; +label { addr $400C; name "APU_NOISE"; size 4; }; -label { addr $E161; name "FDS_disable_drawing"; }; -label { addr $E153; name "FDS_delay"; }; -label { addr $E185; name "FDS_enable_bg"; }; -label { addr $E1B2; name "FDS_wait_for_vblank"; }; -label { addr $E237; name "FDS_append_file"; paramsize 4; }; -label { addr $E7BB; name "FDS_write_vram_data"; paramsize 2; }; -label { addr $EAEA; name "FDS_set_scroll_and_nametable"; }; -label { addr $F431; name "FDS_F431"; }; # ??? +label { addr $4010; name "DMC_FREQ"; }; +label { addr $4011; name "DMC_RAW"; }; +label { addr $4012; name "DMC_START"; }; +label { addr $4013; name "DMC_LEN"; }; + +label { addr $4014; name "OAM_DMA"; }; + +label { addr $4015; name "APU_STATUS"; }; + +label { addr $4016; name "JOY1"; }; +label { addr $4017; name "JOY2"; }; + +## FDS +label { addr $4020; name "FDS_IRQ_TIMER"; size 2; }; +label { addr $4022; name "FDS_IRQ_TIMER_CTRL"; }; +label { addr $4023; name "FDS_IO_ENABLE"; }; +label { addr $4024; name "FDS_WRITE_DATA"; }; +label { addr $4025; name "FDS_CTRL"; }; +label { addr $4026; name "FDS_EXT_OUT"; }; +label { addr $4030; name "FDS_STATUS"; }; +label { addr $4031; name "FDS_READ_DATA"; }; +label { addr $4032; name "FDS_DRIVE_STATUS"; }; +label { addr $4033; name "FDS_EXT_IN"; }; + +# Zero-page variables +label { addr $00; name "FDS_tempzp"; size 16; }; +label { addr $f1; name "FDS_joypad"; size 8; }; + +## Register mirrors +label { addr $f9; name "FDS_EXT_Mirror"; }; +label { addr $fa; name "FDS_CTRL_Mirror"; }; +label { addr $fb; name "FDS_JOY1_Mirror"; }; +label { addr $fc; name "FDS_Y_SCROLL_Mirror"; }; +label { addr $fd; name "FDS_X_SCROLL_Mirror"; }; +label { addr $fe; name "FDS_PPU_MASK_Mirror"; }; +label { addr $ff; name "FDS_PPU_CTRL_Mirror"; }; + +# Stack +label { addr $0100; name "FDS_NMI_FLAG"; }; +label { addr $0101; name "FDS_IRQ_FLAG"; }; +label { addr $0102; name "FDS_RESET_FLAG"; }; +label { addr $0103; name "FDS_RESET_TYPE"; }; + +# RAM +label { addr $0300; name "FDS_VRAMBuffer_Size"; }; +label { addr $0301; name "FDS_VRAMBuffer_End"; }; +label { addr $0302; name "FDS_VRAMBuffer"; size 253; }; + +# Data +range { start $e000; end $e000; type ByteTable; }; +range { name "FDS_CHRData"; start $e001; end $e148; type ByteTable; }; +range { name "FDS_FDSStr"; start $e6d5; end $e6e2; type TextTable; }; +range { name "FDS_Kyodaku"; start $ed37; end $ee16; type ByteTable; }; + +range { name "FDS_FileList"; start $eff5; end $effe; type ByteTable; }; +range { name "FDS_Unk_Data"; start $efff; end $f0b3; type ByteTable; }; + +range { start $f175; end $f178; type ByteTable; }; +range { start $f2e8; end $f2eb; type ByteTable; }; +range { start $f36e; end $f375; type ByteTable; }; +range { start $f484; end $f48b; type ByteTable; }; +range { start $f56b; end $f5b7; type ByteTable; }; +range { start $f635; end $fe35; type ByteTable; }; +range { start $ff00; end $ff5b; type ByteTable; }; +range { start $ff6f; end $ff7a; type ByteTable; }; +range { start $fff6; end $fff9; type ByteTable; }; + +# Routines + +## Disk I/O +label { addr $e1f8; name "FDS_LoadFiles"; paramsize 4; }; +label { addr $e237; name "FDS_AppendFile"; paramsize 4; }; +label { addr $e239; name "FDS_WriteFile"; paramsize 4; }; +label { addr $e2b7; name "FDS_CheckFileCount"; paramsize 2; }; +label { addr $e2bb; name "FDS_AdjustFileCount"; paramsize 2; }; +label { addr $e301; name "FDS_SetFileCount1"; paramsize 2; }; +label { addr $e305; name "FDS_SetFileCount"; paramsize 2; }; +label { addr $e32a; name "FDS_GetDiskInfo"; paramsize 2; }; + +## Low-level disk I/O +label { addr $e26b; name "FDS_WriteLastFile"; }; +label { addr $e290; name "FDS_CheckLastFile"; }; + +label { addr $e2ab; name "FDS_SetFileCnt"; }; +label { addr $e2f7; name "FDS_GetFileCount"; }; + +label { addr $e3e7; name "FDS_FetchDiskPtrs"; }; +label { addr $e3ea; name "FDS_FetchDiskPtrs_WriteProtectCheck"; }; + +label { addr $e445; name "FDS_CheckDiskHeader"; }; +label { addr $e484; name "FDS_GetNumFiles"; }; +label { addr $e492; name "FDS_SetNumFiles"; }; +label { addr $e4a0; name "FDS_FileMatchTest"; }; +label { addr $e4da; name "FDS_SkipFiles"; }; + +label { addr $e4f9; name "FDS_LoadData"; }; +label { addr $e506; name "FDS_ReadData"; }; +label { addr $e5b5; name "FDS_SaveData"; }; + +label { addr $e64d; name "FDS_WaitForReady"; }; + +label { addr $e685; name "FDS_StopMotor"; }; +label { addr $ee17; name "FDS_StartMotor"; }; + +label { addr $e68f; name "FDS_CheckBlockType"; }; +label { addr $e6b0; name "FDS_WriteBlockType"; }; + +label { addr $e6e3; name "FDS_StartXfer"; }; + +label { addr $e706; name "FDS_EndOfBlockRead"; }; +label { addr $e729; name "FDS_EndOfBlockWrite"; }; + +label { addr $e74c; name "FDS_CheckDiskSet"; }; + +label { addr $e761; name "FDS_ReadCRC_Unused"; }; + +label { addr $e794; name "FDS_Xfer1stByte"; }; +label { addr $e7a3; name "FDS_XferByte"; }; + +### Disk transfer return states +label { addr $e778; name "FDS_XferDone"; }; +label { addr $e77c; name "FDS_XferFailOnCarry"; }; +label { addr $e77f; name "FDS_XferFailOnNEQ"; }; +label { addr $e781; name "FDS_XferFail"; }; + +### Low-level helpers +label { addr $e3da; name "FDS_AddYtoPtrA"; }; +label { addr $e583; name "FDS_LoadSizeAndSrc"; }; +label { addr $e7a7; name "FDS_Inc0ADec0C"; }; +label { addr $e7ad; name "FDS_Dec0C"; }; + +## General purpose +label { addr $e149; name "FDS_Delay131"; }; +label { addr $e153; name "FDS_Delayms"; }; + +label { addr $e161; name "FDS_DisPFObj"; }; +label { addr $e16b; name "FDS_EnPFObj"; }; +label { addr $e171; name "FDS_DisObj"; }; +label { addr $e178; name "FDS_EnObj"; }; +label { addr $e17e; name "FDS_DisPF"; }; +label { addr $e185; name "FDS_EnPF"; }; + +label { addr $e1b2; name "FDS_VINTWait"; }; +label { addr $e7bb; name "FDS_VRAMStructWrite"; paramsize 2; }; +label { addr $e844; name "FDS_FetchDirectPtr"; }; +label { addr $e86a; name "FDS_WriteVRAMBuffer"; }; +label { addr $e8b3; name "FDS_ReadVRAMBuffer"; }; +label { addr $e8d2; name "FDS_PrepareVRAMString"; paramsize 2; }; +label { addr $e8e1; name "FDS_PrepareVRAMStrings"; paramsize 2; }; +label { addr $e94f; name "FDS_GetVRAMBufferByte"; }; +label { addr $e97d; name "FDS_Pixel2NamConv"; }; +label { addr $e997; name "FDS_PNam2PixelConv"; }; + +label { addr $e9b1; name "FDS_Random"; }; +label { addr $e9c8; name "FDS_SpriteDMA"; }; +label { addr $e9d3; name "FDS_CounterLogic"; }; + +label { addr $e9eb; name "FDS_ReadPads"; }; +label { addr $ea0d; name "FDS_OrPads"; }; +label { addr $ea1a; name "FDS_ReadDownPads"; }; +label { addr $ea1f; name "FDS_ReadOrDownPads"; }; +label { addr $ea36; name "FDS_ReadDownVerifyPads"; }; +label { addr $ea4c; name "FDS_ReadOrDownVerifyPads"; }; +label { addr $ea68; name "FDS_ReadDownExpPads"; }; + +label { addr $ea84; name "FDS_VRAMFill"; }; +label { addr $ead2; name "FDS_MemFill"; }; + +label { addr $eaea; name "FDS_SetScroll"; }; + +### Jump table implementation uses an inline pointer table of an arbitrary size, +### which can't be represented here... +label { addr $eafd; name "FDS_JumpEngine"; }; +label { addr $eb13; name "FDS_ReadKeyboard"; }; +label { addr $ebaf; name "FDS_LoadTileset"; paramsize 2; }; +label { addr $ec22; name "FDS_UploadObject"; }; + +# Hardware vectors +label { addr $e18b; name "NMI"; }; + +label { addr $ee24; name "Reset"; }; + +label { addr $e1c7; name "IRQ"; }; range { start $DFF6; end $DFFF; type addrtable; }; label { addr $DFF6; name "FDS_Vector_DiskNMI1"; size 2; }; @@ -31,3 +206,8 @@ label { addr $DFFC; name "FDS_Vector_DiskReset"; size 2; }; label { addr $DFFE; name "FDS_Vector_DiskIRQ"; size 2; }; label { addr $4C00; name "SF_4C00"; }; + +label { addr $FFFA; name "CPU_Vector_NMI"; }; +label { addr $FFFC; name "CPU_Vector_Reset"; }; +label { addr $FFFE; name "CPU_Vector_IRQ"; }; + diff --git a/notes.txt b/notes.txt index 36ffda0..de8b1c5 100644 --- a/notes.txt +++ b/notes.txt @@ -1,5 +1,68 @@ $00 +$01 0000_0001 // written on slow disk, before copy from $F000 to $5700 +$04 0000_0100 // written before copy $14 0001_0100 // written before jmp to ROM $4C 0100_1100 // $84 1000_0100 // written before copy loop into $E000 +$9D 1001_1101 // written before jump to rom RESET vector + +0011_1011 3B +0001_1101 1D + +0011_1011 + +5432 1098 7654 3210 +0000_0000 0000_0000 + +0100_1100 xxxx_xxxx $4Cxx +0100_1000 xxxx_xxxx $48xx + +$0000 $07FF sys ram +$5000 $5FFF SF ram (but only half) +$6000 $DFFF FDS ram +$E000 $FFFF FDS bios *OR* SF ram (all of it this time) + +7 bit 0 +--------- +LRDW ??PM +|||| |||| +|||| |||+- Disk/ROM mode (0 = current Disk/ROM switch, 1 = opposite of Disk/ROM switch) +|||| ||+-- PPU CIRAM /CE, A10, A13 mode (0 = current Disk/ROM switch, 1 = opposite of Disk/ROM switch) +|||| |+--- Fammy PRG-RAM mirroring (0 = $5000-$5FFF only?, 1 = map a mirror at $E000-$FFFF?) +|||| +---- Fammy PRG-RAM $E000 mirror mapping (0 = $E000-$FFFF, 1 = $F000-$FFFF only?) +|||+------ Disk CPU/PPU write control (0 = enable, 1 = disable writes to CHR-RAM and $8000-$FFFF?) +||+------- Disk M2 control (0 = current Disk/ROM switch, 1 = opposite of Disk/ROM switch) +|+-------- ROM M2 control (0 = current Disk/ROM switch, 1 = opposite of Disk/ROM switch) ++--------- On-board LED (0 = off, 1 = on) + +## Slow ROM + +- Copies patch to $5100 and jumps to it +- eject disk screen +- speed select screen +- copy $F000-$F7FF to $5700-$5EFF + - VINTWait before each outer loop itteration + - write $01 to reg before copy loop + - write $00 to reg after copy loop +- copy $5700-$5EFF to $F000-$F7FF + - VINTWait before each outer loop itteration + - write $04 to reg before copy loop + - write $00 to reg after copy loop + +// there's some bullshit happening here to change the NMI vector + +- copy $F800-$FFFF to $5700-$5EFF + - VINTWait before each outer loop itteration + - write $01 to reg before copy loop + - write $00 to reg after copy loop +- copy $5700-$5EFF to $F800-$FFFF + - VINTWait before each outer loop itteration + - write $01 to reg before copy loop + - write $00 to reg after copy loop +- write $9D to reg +- jmp ($FFFC) + +### NMI handler + +- write $0D to reg diff --git a/sf_rom-qd_file1_postcopy.cfg b/sf_rom-qd_file1_postcopy.cfg index 2acedf1..b693be4 100644 --- a/sf_rom-qd_file1_postcopy.cfg +++ b/sf_rom-qd_file1_postcopy.cfg @@ -15,13 +15,6 @@ label { addr $57C0; name "precopy_loop"; }; range { start $57E0; end $57F5; type bytetable; }; -range { start $57F6; end $57FF; type addrtable; }; -label { addr $57F6; name "FDS_VectorMirror_DiskNMI1"; size 2; }; -label { addr $57F8; name "FDS_VectorMirror_DiskNMI2"; size 2; }; -label { addr $57FA; name "FDS_VectorMirror_DiskNMI3"; size 2; }; -label { addr $57FC; name "FDS_VectorMirror_DiskReset"; size 2; }; -label { addr $57FE; name "FDS_VectorMirror_DiskIRQ"; size 2; }; - label { addr $5441; name "L5441_draw_screen"; }; label { addr $5436; name "L5436_ResetFDSIO"; }; label { addr $510A; name "L510A_wait_for_eject"; }; @@ -34,6 +27,8 @@ range { start $51FA; end $51FB; type addrtable; }; range { start $512D; end $512E; type addrtable; }; range { start $5196; end $5197; type addrtable; }; +range { start $541D; end $5435; type code; name "L541D_read_chr_from_cart"; }; + # VRAM structs range { start $5493; end $54A6; name "vram_data_01"; type bytetable; comment "palettes"; }; range { start $54A7; end $54C1; name "vram_data_02"; type bytetable; comment "tiles"; }; @@ -54,3 +49,10 @@ range { start $512F; end $5146; name "vram_data_12"; type bytetable; }; range { start $5198; end $51AF; name "vram_data_13"; type bytetable; comment "set new disk card text"; }; range { start $5253; end $525C; name "DiskID_5253"; type bytetable; }; + +range { start $57F6; end $57FF; type addrtable; }; +label { addr $57F6; name "FDS_VectorMirror_DiskNMI1"; size 2; }; +label { addr $57F8; name "FDS_VectorMirror_DiskNMI2"; size 2; }; +label { addr $57FA; name "FDS_VectorMirror_DiskNMI3"; size 2; }; +label { addr $57FC; name "FDS_VectorMirror_DiskReset"; size 2; }; +label { addr $57FE; name "FDS_VectorMirror_DiskIRQ"; size 2; }; diff --git a/sf_rom-qd_file1_precopy.cfg b/sf_rom-qd_file1_precopy.cfg index 5c460e7..a6f7dfe 100644 --- a/sf_rom-qd_file1_precopy.cfg +++ b/sf_rom-qd_file1_precopy.cfg @@ -7,13 +7,6 @@ global { }; -#range { -# name "vectors"; -# type addrtable; -# start $DFF6; -# end $DFFF; -#}; - range { start $DFE3; end $DFEF; type bytetable; }; range { start $DFC0; end $DFE0; type code; name "LDFC0_reset"; }; range { start $DF00; end $DF1B; type code; }; diff --git a/sf_slow_rom_file1_postcopy.cfg b/sf_slow_rom_file1_postcopy.cfg new file mode 100644 index 0000000..63e8817 --- /dev/null +++ b/sf_slow_rom_file1_postcopy.cfg @@ -0,0 +1,87 @@ +global { + cpu "6502"; + inputname "bins/sf_slow_rom_file1.bin"; + startaddr $5100; + commentcolumn 50; + comments 3; +}; + +label { addr $5100; name "Postcopy_Entry"; }; + +range { start $51E8; end $521D; name "SF_rom_copy"; type code; }; +label { addr $5208; name "SF_copy_source"; }; +label { addr $520B; name "SF_copy_destination"; }; + +label { addr $515F; name "SF_clear_reg"; }; +label { addr $5161; name "SF_write_reg"; }; + +label { addr $53A6; name "SF_menu_init"; }; +label { addr $52B3; name "SF_FDS_reset"; }; + +label { addr $52CD; name "SF_eject_check_loop"; }; + +label { addr $52FB; name "SF_DrawText"; comment "Draw text via FDS_VRAMStructWrite.\n; Write struct address to $5306.w before calling"; }; +label { addr $53DA; name "SF_draw_done"; }; +range { start $5306; end $5307; type addrtable; }; + +range { start $534C; end $534D; type addrtable; }; +range { start $534E; end $5365; type bytetable; }; + +label { addr $548E; name "SF_SlowNMI"; }; +range { start $548E; end $5597; type code; }; + +range { start $5697; end $58F5; type bytetable; }; + +#label { addr $5165; name "L5165"; paramsize 3; }; +range { start $5165; end $51D2; type code; }; +label { addr $517D; name "L517D_loop"; }; + +range { start $5250; end $5265; type code; }; + +range { start $529A; end $52B2; type code; name "SF_ReadPPUData"; comment "Read X bytes from PPU. Aligned to the bank.\n; $529B: PPU Hi Source\n; $52AE: CPU Hi Destination"; }; +label { addr $52A9; name "L52A9_loop"; }; +label { addr $51A5; name "L51A5_loop"; }; +label { addr $51E2; name "L51E2_next"; }; + +label { addr $52BE; name "SF_ScreenEject"; comment "Promts the user to eject the disk and waits for it to be ejected."; }; +label { addr $530B; name "SF_ScreenSlowLevel"; comment "Promts the user for the slowdown speed."; }; +label { addr $5165; name "SF_TransferData"; paramsize 3; comment "Transfers data based on a structure. Struct count and pointer are inline.\n; Bytes in struct:\n; RegValue, SrcPage, PageCount, DestPage"; }; + +label { addr $5189; name "cv5188"; size 2; }; +label { addr $519D; name "cv519D"; size 2; }; +label { addr $51A9; name "cv51A9"; size 3; }; + +# var_ labels are variables outside of the loaded disk file +label { addr $5FE0; name "var_5FE0"; }; +label { addr $5FDE; name "var_5FDE"; }; +label { addr $5F72; name "var_5F72"; }; +label { addr $5FFF; name "var_5FFF"; }; +label { addr $5FDF; name "var_5FDF_LoopCount"; }; +label { addr $5F70; name "var_5F07"; size 2; }; +label { addr $5F76; name "var_5F76"; size 8; }; + +label { addr $5F74; name "var_NMI_RegBackups"; size 2; }; + +# VRAM Structs + +range { start $52E1; end $52E2; type addrtable; name "VRAM_Addr_EjectDisk"; }; +range { start $52E3; end $52FA; type bytetable; name "VRAM_Data_EjectDisk"; }; + + +range { start $58F6; end $58FF; type addrtable; }; +label { addr $58F6; name "FDS_VectorMirror_DiskNMI1"; size 2; }; +label { addr $58F8; name "FDS_VectorMirror_DiskNMI2"; size 2; }; +label { addr $58FA; name "FDS_VectorMirror_DiskNMI3"; size 2; }; +label { addr $58FC; name "FDS_VectorMirror_DiskReset"; size 2; }; +label { addr $58FE; name "FDS_VectorMirror_DiskIRQ"; size 2; }; + +label { addr $5EFA; name "SF_NMI_Mirror"; size 2; }; +label { addr $54EB; name "SF_NMI_Orig"; size 2; }; + +label { addr $54DF; name "SF_NMI_Hop"; comment "Run the original NMI routine"; }; + +label { addr $5FD0; name "SF_loop_counter"; }; + +range { start $53E4; end $548D; type bytetable; }; +range { start $514F; end $515E; type bytetable; unit 4; }; + diff --git a/sf_slow_rom_file1_precopy.cfg b/sf_slow_rom_file1_precopy.cfg new file mode 100644 index 0000000..f5b9251 --- /dev/null +++ b/sf_slow_rom_file1_precopy.cfg @@ -0,0 +1,18 @@ +global { + cpu "6502"; + inputname "bins/sf_slow_rom_file1.bin"; + startaddr $D800; + commentcolumn 50; + comments 3; +}; + +label { addr $DFF0; name "Precopy_IRQ"; }; +label { addr $DFC0; name "Precopy_Entry"; }; + +range { start $DF00; end $DF1B; type code; name "precopy_memcpy"; }; + +# Code that's copied to a lower address +range { start $D000; end $DEFF; type bytetable; }; + +range { start $DF1E; end $DFBF; type bytetable; }; +range { start $DFE3; end $DFEF; type bytetable; };