-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fdefe7
commit 3f0f41f
Showing
22 changed files
with
475 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ build/* | |
gfx/nemesis/*.smd | ||
gfx/segard/*.smd | ||
rom/* | ||
smps/* |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
clear_vsram: ; CODE XREF: vdp_setup+38 p | ||
move.l #$40000010,d7 ; DO_WRITE_TO_VSRAM_AT_$0000_ADDR | ||
; DO_OPERATION_WITHOUT_DMA | ||
moveq #$28,d6 ; '(' | ||
loc_4682: ; CODE XREF: vdp_setup+54 j | ||
moveq #0,d5 | ||
move.l d7,(VDP_CTRL).l | ||
loc_468A: ; CODE XREF: clear_vsram+16 j | ||
move.w d5,(VDP_DATA).l | ||
dbf d6,loc_468A | ||
rts | ||
; End of function clear_vsram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
draw_text: ; CODE XREF: ROM:0000BC00 p | ||
; ROM:0000BF30 p ... | ||
move.w (word_FFB106).w,d6 | ||
; End of function draw_text | ||
sub_47F4: ; CODE XREF: ROM:0000BC0C p | ||
move.l (a6)+,d7 | ||
loc_47F6: ; CODE XREF: ROM:0000C0A6 p | ||
; sub_C1EC+22 j | ||
; DATA XREF: ... | ||
move.l d7,(VDP_CTRL).l | ||
loc_47FC: ; CODE XREF: sub_47F4+12 j | ||
move.b (a6)+,d6 | ||
beq.s locret_4808 | ||
move.w d6,(VDP_DATA).l | ||
bra.s loc_47FC | ||
; --------------------------------------------------------------------------- | ||
locret_4808: ; CODE XREF: sub_47F4+A j | ||
rts | ||
; End of function sub_47F4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
init_joypad: ; CODE XREF: Reset+B0 p | ||
moveq #$40,d0 ; '@' | ||
move.b d0,(IO_CT1_CTRL+1).l | ||
move.b d0,(IO_CT2_CTRL+1).l | ||
move.b d0,(IO_EXT_CTRL+1).l | ||
rts | ||
; End of function init_joypad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
loc_4924: ; CODE XREF: reset_z80+3A j | ||
btst #0,(IO_Z80BUS).l | ||
bne.s loc_4924 | ||
transfer_sounddriver_to_z80: ; CODE XREF: reset_z80+28 j | ||
; play_bgm+34 j | ||
clr.l (dword_FFFE1A).w | ||
clr.w (word_FFFE26).w | ||
lea (z80snd_driver).l,a5 | ||
lea (Z80_RAM).l,a6 | ||
move.w #$1CB,d0 | ||
loc_4946: ; CODE XREF: reset_z80+74 j | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
dbf d0,loc_4946 | ||
lea (byte_A01D03).l,a6 | ||
lea (dword_FFFE20).w,a5 | ||
move.b (a5),(a6)+ | ||
move.b (a5),(a6)+ | ||
loc_4978: ; CODE XREF: play_bgm+B2 j | ||
move.w #0,(IO_Z80RES).l ; Disable the Z80 reset | ||
move.w #0,(IO_Z80BUS).l ; Give the Z80 the bus back | ||
moveq #9,d0 | ||
loc_498A: ; CODE XREF: reset_z80+9A j | ||
nop | ||
dbf d0,loc_498A | ||
move.w #$100,(IO_Z80RES).l ; Reset the Z80 | ||
rts | ||
; End of function reset_z80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
load_dacdriver_to_z80: ; CODE XREF: play_bgm+6 j | ||
bclr #7,(dword_FFFE1A).w | ||
move.w (dword_FFFE1A).w,d0 | ||
add.w d0,d0 | ||
add.w (dword_FFFE1A).w,d0 | ||
add.w d0,d0 | ||
lea loc_4A46+4(pc,d0.w),a5 | ||
move.w (a5)+,d0 | ||
movea.l (a5),a5 | ||
move.w (word_FFFE1E).w,d7 | ||
move.w #$100,(IO_Z80BUS).l | ||
loc_4A12: ; CODE XREF: play_bgm+80 j | ||
btst #0,(IO_Z80BUS).l | ||
bne.s loc_4A12 | ||
lea (Z80_RAM).l,a6 | ||
loc_4A22: ; CODE XREF: play_bgm+A8 j | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
move.b (a5)+,(a6)+ | ||
dbf d0,loc_4A22 | ||
loc_4A46: ; DATA XREF: play_bgm+64 o | ||
move.b d7,(byte_A0017F).l | ||
bra.w loc_4978 | ||
; End of function play_bgm | ||
; --------------------------------------------------------------------------- | ||
dacdriver_list: dc.w $1C4 ; entries.size | ||
dc.l dacdriver_1 ; entries.offset | ||
dc.w $1E8 ; entries.size | ||
dc.l dacdriver_2 ; entries.offset | ||
dc.w $1F6 ; entries.size | ||
dc.l dacdriver_3 ; entries.offset | ||
dc.w $1F8 ; entries.size | ||
dc.l dacdriver_4 ; entries.offset | ||
dc.w $1D3 ; entries.size | ||
dc.l dacdriver_5 ; entries.offset | ||
dc.w $1F8 ; entries.size | ||
dc.l dacdriver_6 ; entries.offset |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
play_bgm: ; CODE XREF: VBLANK+6E p | ||
tst.w (dword_FFFE1A).w | ||
beq.s locret_49DA | ||
bmi.s load_dacdriver_to_z80 | ||
move.b (dword_FFFE20).w,d0 | ||
andi.w #$7F,d0 | ||
cmpi.w #$F,d0 | ||
bhi.s loc_49B6 | ||
move.b bgm_list(pc,d0.w),(dword_FFFE20).w | ||
loc_49B6: ; CODE XREF: play_bgm+14 j | ||
move.w #$100,(IO_Z80BUS).l ; Send the Z80 a bus request | ||
loc_49BE: ; CODE XREF: play_bgm+2C j | ||
btst #0,(IO_Z80BUS).l | ||
bne.s loc_49BE | ||
tst.b (byte_A0017F).l | ||
beq.w transfer_sounddriver_to_z80 | ||
move.w #0,(IO_Z80BUS).l ; Give the Z80 the bus back | ||
locret_49DA: ; CODE XREF: play_bgm+4 j | ||
rts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
read_joypad: ; CODE XREF: VBLANK:loc_A7BC p | ||
lea (JOYPAD_STATE).w,a0 | ||
lea ((IO_CT1_DATA+1)).l,a1 | ||
bsr.w sub_484E | ||
lea ((IO_CT2_DATA+1)).l,a1 | ||
; End of function read_joypad | ||
sub_484E: ; CODE XREF: read_joypad+A p | ||
move.b #0,(a1) | ||
nop | ||
nop | ||
nop | ||
move.b (a1),d1 | ||
nop | ||
nop | ||
nop | ||
move.b #$40,(a1) ; '@' | ||
asl.w #2,d1 | ||
move.w d1,d2 | ||
move.b (a1),d0 | ||
andi.w #$30,d2 ; '0' | ||
beq.w loc_4876 | ||
move.w #$FF,d1 | ||
loc_4876: ; CODE XREF: sub_484E+20 j | ||
andi.w #$3F,d0 ; '?' | ||
andi.w #$C0,d1 | ||
or.w d1,d0 | ||
not.w d0 | ||
eor.b d0,(a0) | ||
move.b (a0),d1 | ||
move.b d0,(a0)+ | ||
and.w d1,d0 | ||
move.b d0,(a0)+ | ||
rts | ||
; End of function sub_484E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
reset_z80: ; CODE XREF: Reset+AA p | ||
; ROM:screen_segalogo p ... | ||
move.l #$80000000,(dword_FFFE20).w | ||
loc_48FA: ; CODE XREF: ROM:0000BAE4 p | ||
; DATA XREF: ROM:0000BAE4 o | ||
move.w #$100,(IO_Z80BUS).l ; Send the Z80 a bus request | ||
move.w #0,(IO_Z80RES).l ; Disable the Z80 reset | ||
moveq #9,d0 | ||
loc_490C: ; CODE XREF: reset_z80+1C j | ||
nop | ||
dbf d0,loc_490C | ||
move.w #$100,(IO_Z80RES).l ; Reset the Z80 | ||
bra.s transfer_sounddriver_to_z80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
write_z80ram_1d03: ; CODE XREF: ROM:00004F52 j | ||
; ROM:00008D12 j ... | ||
tst.w (dword_FFFE1A).w | ||
bne.s loc_4AEC | ||
move.w #$100,(IO_Z80BUS).l | ||
loc_4AD4: ; CODE XREF: write_z80ram_1d03+16 j | ||
btst #0,(IO_Z80BUS).l | ||
bne.s loc_4AD4 | ||
move.b d7,(byte_A01D03).l | ||
move.w #0,(IO_Z80BUS).l | ||
loc_4AEC: ; CODE XREF: write_z80ram_1d03+4 j | ||
move.b d7,(dword_FFFE20).w | ||
rts | ||
; End of function write_z80ram_1d03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
write_z80ram_1d05: ; CODE XREF: ROM:00000382 p | ||
; ROM:0000039C p ... | ||
tst.l (dword_FFFE1A).w | ||
bne.s locret_4B40 | ||
move.w #$100,(IO_Z80BUS).l | ||
loc_4B28: ; CODE XREF: write_z80ram_1d05+16 j | ||
btst #0,(IO_Z80BUS).l | ||
bne.s loc_4B28 | ||
move.b d7,(byte_A01D05).l | ||
move.w #0,(IO_Z80BUS).l | ||
locret_4B40: ; CODE XREF: write_z80ram_1d05+4 j | ||
rts | ||
; End of function write_z80ram_1d05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
write_z80ram_1d06: ; CODE XREF: ROM:00000F82 p | ||
; ROM:00004D36 p ... | ||
tst.l (dword_FFFE1A).w | ||
bne.s locret_4B18 | ||
move.w #$100,(IO_Z80BUS).l | ||
loc_4B00: ; CODE XREF: write_z80ram_1d06+16 j | ||
btst #0,(IO_Z80BUS).l | ||
bne.s loc_4B00 | ||
move.b d7,(byte_A01D06).l | ||
move.w #0,(IO_Z80BUS).l | ||
locret_4B18: ; CODE XREF: write_z80ram_1d06+4 j | ||
rts | ||
; End of function write_z80ram_1d06 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Trap15: ; CODE XREF: Trap15 j | ||
; DATA XREF: ROM:00000080 o ... | ||
; DATA XREF: ROM:off_80 o ... | ||
bra.s Trap15 | ||
; End of function Trap15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters