diff --git a/Makefile b/Makefile index 1cf3d8a..0fed2ea 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,10 @@ all: dasm/ bins/ labels/ \ dasm/sf_rom-qd_file1_postcopy.asm \ dasm/sf_slow_rom_file1_precopy.asm \ dasm/sf_slow_rom_file1_postcopy.asm \ + dasm/sf_slow_qd_file1_precopy.asm \ + dasm/sf_slow_qd_file1_postcopy.asm \ labels/sf_slow_rom_file1_postcopy.mlb \ + labels/sf_slow_qd_file1_postcopy.mlb \ labels/sf_rom-qd_file1_postcopy.mlb dasm/dk3_file4.asm: bins/dk3_file4.bin @@ -22,6 +25,8 @@ 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 +dasm/sf_slow_qd_file1_precopy.asm: bins/sf_slow_qd_file1.bin +dasm/sf_slow_qd_file1_postcopy.asm: bins/sf_slow_qd_file1.bin clean: -rm dasm/* bins/* labels/* @@ -46,3 +51,6 @@ bins/sf_rom-qd_file1.bin: roms/sf_rom-qd.fds bins/sf_slow_rom_file1.bin: roms/sf_slow_rom.fds fdsextract --side 0 --file-num 1 --output $@ $^ + +bins/sf_slow_qd_file1.bin: roms/sf_slow_qd.fds + fdsextract --side 0 --file-num 1 --output $@ $^ diff --git a/notes.txt b/notes.txt index de8b1c5..b7359c4 100644 --- a/notes.txt +++ b/notes.txt @@ -5,6 +5,7 @@ $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 +$8C 1000_1100 // written before jump to qd RESET vector (FDS BIOS reset vector) $9D 1001_1101 // written before jump to rom RESET vector 0011_1011 3B diff --git a/sf_slow_qd_file1_postcopy.cfg b/sf_slow_qd_file1_postcopy.cfg new file mode 100644 index 0000000..4666547 --- /dev/null +++ b/sf_slow_qd_file1_postcopy.cfg @@ -0,0 +1,87 @@ +global { + cpu "6502"; + inputname "bins/sf_slow_qd_file1.bin"; + startaddr $5100; + commentcolumn 50; + comments 3; +}; + +label { addr $5100; name "Postcopy_Entry"; }; + +range { start $51E4; end $5219; name "SF_rom_copy"; type code; }; +label { addr $5204; name "SF_copy_source"; }; +label { addr $5207; name "SF_copy_destination"; }; + +label { addr $515A; name "SF_write_reg_fromVar"; }; +label { addr $515D; name "SF_write_reg_fromA"; }; + +label { addr $53A2; name "SF_menu_init"; }; +label { addr $52AF; name "SF_FDS_reset"; }; +# +label { addr $52C9; name "SF_eject_check_loop"; }; +# +label { addr $52F7; name "SF_DrawText"; comment "Draw text via FDS_VRAMStructWrite.\n; Write struct address to $5306.w before calling"; }; +label { addr $53D6; name "SF_draw_done"; }; +range { start $5302; end $5303; name "cv5302"; type addrtable; }; + +label { addr $512F; name "SF_CopyData"; comment "Copies the last page "; }; + +range { start $5348; end $5349; type addrtable; }; +range { start $534A; end $5361; type bytetable; }; +# +#label { addr $548A; name "SF_SlowNMI"; }; +range { start $548A; end $558C; name "SF_SlowNMI"; type code; }; +# +range { start $558D; end $58F5; type bytetable; }; + +range { start $5161; end $51E3; type code; }; +label { addr $5179; name "L5179_loop"; }; +# +range { start $524C; end $5261; type code; }; +# +range { start $5296; end $52AE; 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 $52A5; name "L52A5_loop"; }; +label { addr $51A1; name "L51A1_loop"; }; +label { addr $51DE; name "L51DE_next"; }; +# +label { addr $52BA; name "SF_ScreenEject"; comment "Promts the user to eject the disk and waits for it to be ejected."; }; +label { addr $5307; name "SF_ScreenSlowLevel"; comment "Promts the user for the slowdown speed."; }; +label { addr $5161; 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 $5185; name "cv5185"; size 2; }; +label { addr $5199; name "cv5199"; size 2; }; +label { addr $51A5; name "cv51A5"; 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 $52DD; end $52DE; type addrtable; name "VRAM_Addr_EjectDisk"; }; +range { start $52DF; end $52F6; 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 $6FFA; name "SF_NMI_Mirror"; size 2; }; +label { addr $54E0; name "SF_NMI_Orig"; size 2; }; +label { addr $54D4; name "SF_NMI_Hop"; comment "Run the original NMI routine"; }; + +label { addr $5FD0; name "SF_loop_counter"; }; + +range { start $53E0; end $5489; type bytetable; }; +range { start $5152; end $5159; type bytetable; unit 4; }; + diff --git a/sf_slow_qd_file1_precopy.cfg b/sf_slow_qd_file1_precopy.cfg new file mode 100644 index 0000000..fe4a508 --- /dev/null +++ b/sf_slow_qd_file1_precopy.cfg @@ -0,0 +1,11 @@ +global { + cpu "6502"; + inputname "bins/sf_slow_qd_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"; }; diff --git a/sf_slow_rom_file1_postcopy.cfg b/sf_slow_rom_file1_postcopy.cfg index 63e8817..d381ea2 100644 --- a/sf_slow_rom_file1_postcopy.cfg +++ b/sf_slow_rom_file1_postcopy.cfg @@ -24,13 +24,15 @@ label { addr $52FB; name "SF_DrawText"; comment "Draw text via FDS_VRAMStructWr label { addr $53DA; name "SF_draw_done"; }; range { start $5306; end $5307; type addrtable; }; +label { addr $512C; name "SF_CopyData"; comment "Copies the last page "; }; + 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; }; +range { start $5598; end $58F5; type bytetable; }; #label { addr $5165; name "L5165"; paramsize 3; }; range { start $5165; end $51D2; type code; };