Added SPC7110 logger

This commit is contained in:
zsknight
2001-04-15 08:19:09 +00:00
parent 3b458dbc68
commit 20cd13cec8
2 changed files with 41 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ EXTSYM SfxPBR,SCBRrel,SfxSCBR,SfxCOLR,hdmaearlstart,SFXCounter
EXTSYM fxbit01,fxbit01pcal,fxbit23,fxbit23pcal,fxbit45,fxbit45pcal,fxbit67,fxbit67pcal
EXTSYM SfxSFR
EXTSYM cpucycle,debstop,switchtovirqdeb,debstop3,switchtonmideb
EXTSYM ReadSPC7110log,WriteSPC7110log
NEWSYM ExecuteAsmStart
@@ -745,6 +746,7 @@ NetSaveState:
call UpdateDPage
call SA1UpdateDPage
call Makemode7Table
call ReadSPC7110log
cmp byte[SFXEnable],0
je .nosfxud
call UpdateSFX
@@ -1189,6 +1191,8 @@ reexecuteb2:
call DeInitPostGame
.skippostgame
call WriteSPC7110log
; clear all keys
call Check_Key
cmp al,0

View File

@@ -48,6 +48,7 @@ EXTSYM curypos,xa,xd,xdb,xe,xp,xpb,xpc,xs,xx,xy
EXTSYM SA1xpb,SA1xpc,SA1xa,SA1xx,SA1xy,SA1xd,SA1xdb,SA1xs
EXTSYM cycpbl,debugbuf,soundon,spcA,spcNZ,spcP,spcPCRam
EXTSYM spcRam,spcRamDP,spcS,spcX,spcY
EXTSYM CurPtrVal,SPC7110Enable
NEWSYM DebugAsmStart
@@ -242,6 +243,42 @@ NEWSYM debstop3, db 0
NEWSYM debstop4, db 0
SECTION .text
NEWSYM WriteSPC7110log
cmp byte[SPC7110Enable],0
je .nospc7110
mov edx,SPC7110fn
call Create_File
mov bx,ax
mov ecx,8
mov edx,DecompAPtr
call Write_File
mov edx,CurPtrVal
mov ecx,[DecompAPtr]
shl ecx,3
add ecx,27
call Write_File
call Close_File
.nospc7110
ret
NEWSYM ReadSPC7110log
cmp byte[SPC7110Enable],0
je .nospc7110
mov edx,SPC7110fn
call Open_File
jc .nospc7110
mov bx,ax
mov ecx,8
mov edx,DecompAPtr
call Read_File
mov edx,CurPtrVal
mov ecx,[DecompAPtr]
shl ecx,3
add ecx,27
call Read_File
call Close_File
.nospc7110
ret
SPC7110fn db 'SPC7110.dat',0
NEWSYM loadtempstuff
; Load stuff