'spcRam' -> 'SPCRAM'. Prerequisite for new SPC stuff.

This commit is contained in:
grinvader
2005-07-16 21:42:52 +00:00
parent 9bb7d64292
commit ffaf266913
19 changed files with 210 additions and 234 deletions

View File

@@ -1158,7 +1158,7 @@ section .data
.fname2 db 9,'vram2.dat',0 .fname2 db 9,'vram2.dat',0
section .text section .text
EXTSYM spcRam EXTSYM SPCRAM
section .data section .data
NEWSYM ewj2hack, dd 0 NEWSYM ewj2hack, dd 0
section .text section .text
@@ -1180,8 +1180,8 @@ NEWSYM hdmatype2indirect
xor ebx,ebx xor ebx,ebx
xor ecx,ecx xor ecx,ecx
xor edx,edx xor edx,edx
mov ax,[spcRam+021h] ; load dest offset mov ax,[SPCRAM+021h] ; load dest offset
mov dword[.dest],spcRam mov dword[.dest],SPCRAM
add [.dest],eax add [.dest],eax
mov dl,[esi+10] ; number of bytes to transfer mov dl,[esi+10] ; number of bytes to transfer
sub dl,80h sub dl,80h

View File

@@ -20,7 +20,7 @@
%include "macros.mac" %include "macros.mac"
EXTSYM spcRam,spcPCRam,spcRamDP,spcS,spcX,RevStereo EXTSYM SPCRAM,spcPCRam,spcRamDP,spcS,spcX,RevStereo
EXTSYM Invalidopcode,RSPCRegF0,RSPCRegF1,RSPCRegF2,RSPCRegF3 EXTSYM Invalidopcode,RSPCRegF0,RSPCRegF1,RSPCRegF2,RSPCRegF3
EXTSYM RSPCRegF4,RSPCRegF5,RSPCRegF6,RSPCRegF7,RSPCRegF8,RSPCRegF9 EXTSYM RSPCRegF4,RSPCRegF5,RSPCRegF6,RSPCRegF7,RSPCRegF8,RSPCRegF9
EXTSYM RSPCRegFA,RSPCRegFB,RSPCRegFC,RSPCRegFD,RSPCRegFE,RSPCRegFF EXTSYM RSPCRegFA,RSPCRegFB,RSPCRegFC,RSPCRegFD,RSPCRegFE,RSPCRegFF
@@ -692,7 +692,7 @@ NEWSYM InitSPC
dec ecx dec ecx
jnz .nextvol jnz .nextvol
mov eax,spcRam mov eax,SPCRAM
mov ebx,0EFh mov ebx,0EFh
.loop2 .loop2
mov byte[eax],0 mov byte[eax],0
@@ -703,12 +703,12 @@ NEWSYM InitSPC
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx
mov ebp,spcRam mov ebp,SPCRAM
mov ax,0FFC0h mov ax,0FFC0h
add ebp,eax add ebp,eax
mov [spcPCRam],ebp mov [spcPCRam],ebp
mov dword[spcS],1EFh mov dword[spcS],1EFh
mov dword[spcRamDP],spcRam mov dword[spcRamDP],SPCRAM
; initialize all the SPC write registers ; initialize all the SPC write registers
mov dword[spcWptr+0],SPCRegF0 mov dword[spcWptr+0],SPCRegF0
@@ -1925,7 +1925,7 @@ BRRDecode:
mov eax,[curvoice] mov eax,[curvoice]
mov esi,[Voice0LoopPtr+eax*4] mov esi,[Voice0LoopPtr+eax*4]
add esi,spcRam add esi,SPCRAM
.dlpf_fill .dlpf_fill
push dword[prev0] push dword[prev0]
@@ -2973,10 +2973,10 @@ SECTION .text
mov ah,[DSPMem+5Dh] mov ah,[DSPMem+5Dh]
add ax,dx add ax,dx
xor ebx,ebx xor ebx,ebx
mov bx,[spcRam+eax] mov bx,[SPCRAM+eax]
mov [Voice0Ptr+%1*4],ebx mov [Voice0Ptr+%1*4],ebx
xor ebx,ebx xor ebx,ebx
mov bx,[spcRam+eax+2] mov bx,[SPCRAM+eax+2]
mov [Voice0LoopPtr+%1*4],ebx mov [Voice0LoopPtr+%1*4],ebx
pop edx pop edx
pop ebx pop ebx
@@ -3046,10 +3046,10 @@ NEWSYM Voice7Start
mov ah,[DSPMem+5Dh] mov ah,[DSPMem+5Dh]
add ax,dx add ax,dx
xor ebx,ebx xor ebx,ebx
mov bx,[spcRam+eax] mov bx,[SPCRAM+eax]
mov [Voice0Ptr+%1*4],ebx mov [Voice0Ptr+%1*4],ebx
xor ebx,ebx xor ebx,ebx
mov bx,[spcRam+eax+2] mov bx,[SPCRAM+eax+2]
mov [Voice0LoopPtr+%1*4],ebx mov [Voice0LoopPtr+%1*4],ebx
mov ax,[DSPMem+02h+%1*10h] mov ax,[DSPMem+02h+%1*10h]
cmp word[Voice0Pitch+%1*2],ax cmp word[Voice0Pitch+%1*2],ax
@@ -4735,7 +4735,7 @@ NEWSYM EchoStereo
mov edi,esi mov edi,esi
inc edi inc edi
shl edi,2 shl edi,2
add esi,spcRam add esi,SPCRAM
add edi,[spcBuffera] add edi,[spcBuffera]
mov eax,[Voice0Prev0+%1*4] mov eax,[Voice0Prev0+%1*4]
mov [Voice0BufPtr+%1*4],edi mov [Voice0BufPtr+%1*4],edi
@@ -4833,10 +4833,10 @@ NEWSYM EchoStereo
; mov ah,[DSPMem+5Dh] ; mov ah,[DSPMem+5Dh]
; add ax,dx ; add ax,dx
; xor ebx,ebx ; xor ebx,ebx
; mov bx,[spcRam+eax] ; mov bx,[SPCRAM+eax]
; mov dword[Voice0Ptr+%1*4],ebx ; mov dword[Voice0Ptr+%1*4],ebx
; xor ebx,ebx ; xor ebx,ebx
; mov bx,[spcRam+eax+2] ; mov bx,[SPCRAM+eax+2]
; mov dword[Voice0LoopPtr+%1*4],ebx ; mov dword[Voice0LoopPtr+%1*4],ebx
; pop ebx ; pop ebx
; pop edx ; pop edx

View File

@@ -22,7 +22,7 @@
EXTSYM initsfxregsw,reg420Bw,reg420Cw,regptw,initSA1regsw,SDD1Reset EXTSYM initsfxregsw,reg420Bw,reg420Cw,regptw,initSA1regsw,SDD1Reset
EXTSYM SPC7110Reset,RTCReset2,debstop,NextLineCache,vidmemch2,vidmemch4 EXTSYM SPC7110Reset,RTCReset2,debstop,NextLineCache,vidmemch2,vidmemch4
EXTSYM vidmemch8,vrama,nmirept,sndwrit,spcRam,HIRQCycNext,HIRQNextExe,HIRQSkip EXTSYM vidmemch8,vrama,nmirept,sndwrit,SPCRAM,HIRQCycNext,HIRQNextExe,HIRQSkip
EXTSYM cycpb268,cycpb358,cycpbl,cycpblt,opexec268,opexec268cph,opexec358 EXTSYM cycpb268,cycpb358,cycpbl,cycpblt,opexec268,opexec268cph,opexec358
EXTSYM opexec358cph,hdmarestart,printhex8 EXTSYM opexec358cph,hdmarestart,printhex8
@@ -1220,7 +1220,7 @@ reg2140w:
jne .n jne .n
mov byte[nmirept],0 mov byte[nmirept],0
.n .n
mov [spcRam+0F4h],al mov [SPCRAM+0F4h],al
inc dword[SPC700write] inc dword[SPC700write]
reenablespc reenablespc
ret ret
@@ -1234,7 +1234,7 @@ reg2140w:
; Sound Register #2 ; Sound Register #2
reg2141w: reg2141w:
mov byte[sndwrit],1 mov byte[sndwrit],1
mov [spcRam+0F5h],al mov [SPCRAM+0F5h],al
inc dword[SPC700write] inc dword[SPC700write]
reenablespc reenablespc
ret ret
@@ -1248,7 +1248,7 @@ reg2141w:
; Sound Register #3 ; Sound Register #3
reg2142w: reg2142w:
mov byte[sndwrit],1 mov byte[sndwrit],1
mov [spcRam+0F6h],al mov [SPCRAM+0F6h],al
inc dword[SPC700write] inc dword[SPC700write]
reenablespc reenablespc
ret ret
@@ -1262,7 +1262,7 @@ reg2142w:
; Sound Register #4 ; Sound Register #4
reg2143w: reg2143w:
mov byte[sndwrit],1 mov byte[sndwrit],1
mov [spcRam+0F7h],al mov [SPCRAM+0F7h],al
inc dword[SPC700write] inc dword[SPC700write]
reenablespc reenablespc
ret ret

View File

@@ -19,14 +19,8 @@
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
EXTSYM Sflagnz, Sflago, Sflagc,dmadata
;EXTSYM spcRamDP,spcRamDPb,spcRam
EXTSYM IRAM
EXTSYM Sflagnz,Sflago,Sflagc,dmadata,IRAM
;******************************************************* ;*******************************************************
; Flag Setting Macros ; Flag Setting Macros
@@ -1577,5 +1571,3 @@ COPemulmode
mov word[stackor],0100h mov word[stackor],0100h
endloop endloop
%endmacro %endmacro

View File

@@ -44,7 +44,7 @@ ALIGN32
;spcBuffer times 65536*4 db 0 ; The buffer of brr blocks... 4 bits -> 16 bits ;spcBuffer times 65536*4 db 0 ; The buffer of brr blocks... 4 bits -> 16 bits
;spcRamcmp times 65536 db 0 ; SPC Ram compare buffer ;spcRamcmp times 65536 db 0 ; SPC Ram compare buffer
;spcPrevbf times 65536 db 0 ; SPC PrevX compare buffer ;spcPrevbf times 65536 db 0 ; SPC PrevX compare buffer
NEWSYM spcRam, times 65472 db 0FFh ; Pointer to the SPC's RAM NEWSYM SPCRAM, times 65472 db 0FFh ; Pointer to the SPC's RAM
; copy #1 ; copy #1
; THE SPC ROM :) ; THE SPC ROM :)
db 0CDh,0EFh,0BDh,0E8h,000h,0C6h,01Dh,0D0h,0FCh,08Fh,0AAh,0F4h,08Fh,0BBh,0F5h,078h db 0CDh,0EFh,0BDh,0E8h,000h,0C6h,01Dh,0D0h,0FCh,08Fh,0AAh,0F4h,08Fh,0BBh,0F5h,078h
@@ -54,7 +54,7 @@ NEWSYM spcRam, times 65472 db 0FFh ; Pointer to the SPC's RAM
db 0AAh,0BBh,0CCh,0DDh,0EEh,0FFh,000h,011h,022h,033h,044h,055h,066h,077h,088h,099h db 0AAh,0BBh,0CCh,0DDh,0EEh,0FFh,000h,011h,022h,033h,044h,055h,066h,077h,088h,099h
NEWSYM spcPCRam, NEWSYM spcPCRam,
dd 0 ; Program Counter (with spcRam added) dd 0 ; Program Counter (with SPCRAM added)
NEWSYM spcA, NEWSYM spcA,
db 0 ; The A register (general purpose) db 0 ; The A register (general purpose)
db 0 db 0
@@ -111,7 +111,7 @@ NEWSYM spcextraram, times 64 db 0 ; extra ram, used for tcall
NEWSYM FutureExpandS, times 256-64 db 0 NEWSYM FutureExpandS, times 256-64 db 0
spcsave equ $-spcRam spcsave equ $-SPCRAM
; pharos equ hack *sigh* ; pharos equ hack *sigh*
NEWSYM PHspcsave, dd spcsave NEWSYM PHspcsave, dd spcsave
@@ -125,20 +125,20 @@ NEWSYM SPCROM
SECTION .text SECTION .text
%macro WriteByte 0 %macro WriteByte 0
cmp ebx,0ffh+spcRam cmp ebx,0ffh+SPCRAM
ja %%extramem ja %%extramem
cmp ebx,0f0h+spcRam cmp ebx,0f0h+SPCRAM
jb %%normalmem jb %%normalmem
sub ebx,spcRam sub ebx,SPCRAM
push dword %%finished push dword %%finished
jmp dword near [spcWptr+ebx*4-0f0h*4] jmp dword near [spcWptr+ebx*4-0f0h*4]
; call dword near [spcWptr+ebx*4-0f0h*4] ; call dword near [spcWptr+ebx*4-0f0h*4]
; jmp .finished ; jmp .finished
%%extramem %%extramem
cmp ebx,0ffc0h+spcRam cmp ebx,0ffc0h+SPCRAM
jb %%normalmem jb %%normalmem
mov [spcextraram+ebx-0FFC0h-spcRam],al mov [spcextraram+ebx-0FFC0h-SPCRAM],al
test byte[spcRam+0F1h],80h test byte[SPCRAM+0F1h],80h
jnz %%finished jnz %%finished
; push ecx ; push ecx
; mov cl,[DSPMem+06Ch] ; mov cl,[DSPMem+06Ch]
@@ -151,21 +151,21 @@ SECTION .text
%endmacro %endmacro
%macro ReadByte 0 %macro ReadByte 0
cmp ebx,0f0h+spcRam cmp ebx,0f0h+SPCRAM
jb %%normalmem2 jb %%normalmem2
cmp ebx,0ffh+spcRam cmp ebx,0ffh+SPCRAM
ja %%normalmem ja %%normalmem
sub ebx,spcRam sub ebx,SPCRAM
push dword %%finished push dword %%finished
jmp dword near [spcRptr+ebx*4-0f0h*4] jmp dword near [spcRptr+ebx*4-0f0h*4]
; call dword near [spcRptr+ebx*4-0f0h*4] ; call dword near [spcRptr+ebx*4-0f0h*4]
; jmp .rfinished ; jmp .rfinished
%%normalmem %%normalmem
; cmp ebx,0ffc0h+spcRam ; cmp ebx,0ffc0h+SPCRAM
; jb .rnormalmem2 ; jb .rnormalmem2
; test byte[DSPMem+6Ch],10h ; test byte[DSPMem+6Ch],10h
; jz .rnormalmem2 ; jz .rnormalmem2
; mov al,[spcextraram+ebx-0FFC0h-spcRam] ; mov al,[spcextraram+ebx-0FFC0h-SPCRAM]
; jmp .rfinished ; jmp .rfinished
%%normalmem2 %%normalmem2
mov al,[ebx] mov al,[ebx]
@@ -173,20 +173,20 @@ SECTION .text
%endmacro %endmacro
%macro ReadByte2 0 %macro ReadByte2 0
cmp ebx,0f0h+spcRam cmp ebx,0f0h+SPCRAM
jb %%normalmem2 jb %%normalmem2
cmp ebx,0ffh+spcRam cmp ebx,0ffh+SPCRAM
ja %%normalmem ja %%normalmem
sub ebx,spcRam sub ebx,SPCRAM
call dword near [spcRptr+ebx*4-0f0h*4] call dword near [spcRptr+ebx*4-0f0h*4]
add ebx,spcRam add ebx,SPCRAM
jmp %%finished jmp %%finished
%%normalmem %%normalmem
; cmp ebx,0ffc0h+spcRam ; cmp ebx,0ffc0h+SPCRAM
; jb .rnormalmem2 ; jb .rnormalmem2
; test byte[DSPMem+6Ch],10h ; test byte[DSPMem+6Ch],10h
; jz .rnormalmem2 ; jz .rnormalmem2
; mov al,[spcextraram+ebx-0FFC0h-spcRam] ; mov al,[spcextraram+ebx-0FFC0h-SPCRAM]
; jmp .rfinished ; jmp .rfinished
%%normalmem2 %%normalmem2
mov al,[ebx] mov al,[ebx]
@@ -223,10 +223,10 @@ NEWSYM updatetimer
jz .noin0 jz .noin0
dec byte[timinl0] dec byte[timinl0]
jnz .noin0 jnz .noin0
inc byte[spcRam+0FDh] inc byte[SPCRAM+0FDh]
mov al,[timincr0] mov al,[timincr0]
mov [timinl0],al mov [timinl0],al
cmp byte[spcRam+0FDh],1 cmp byte[SPCRAM+0FDh],1
jne .noin0 jne .noin0
cmp byte[spchalted],0 cmp byte[spchalted],0
jz .noin0 jz .noin0
@@ -237,10 +237,10 @@ NEWSYM updatetimer
jz .noin1 jz .noin1
dec byte[timinl1] dec byte[timinl1]
jnz .noin1 jnz .noin1
inc byte[spcRam+0FEh] inc byte[SPCRAM+0FEh]
mov al,[timincr1] mov al,[timincr1]
mov [timinl1],al mov [timinl1],al
cmp byte[spcRam+0FEh],1 cmp byte[SPCRAM+0FEh],1
jne .noin1 jne .noin1
cmp byte[spchalted+1],0 cmp byte[spchalted+1],0
jz .noin1 jz .noin1
@@ -252,10 +252,10 @@ NEWSYM updatetimer
jz near .noin2d2 jz near .noin2d2
dec byte[timinl2] dec byte[timinl2]
jnz .noin2 jnz .noin2
inc byte[spcRam+0FFh] inc byte[SPCRAM+0FFh]
mov al,[timincr2] mov al,[timincr2]
mov [timinl2],al mov [timinl2],al
cmp byte[spcRam+0FFh],1 cmp byte[SPCRAM+0FFh],1
jne .noin2 jne .noin2
cmp byte[spchalted+2],0 cmp byte[spchalted+2],0
jz .noin2 jz .noin2
@@ -264,10 +264,10 @@ NEWSYM updatetimer
.noin2 .noin2
dec byte[timinl2] dec byte[timinl2]
jnz .noin2b jnz .noin2b
inc byte[spcRam+0FFh] inc byte[SPCRAM+0FFh]
mov al,[timincr2] mov al,[timincr2]
mov [timinl2],al mov [timinl2],al
cmp byte[spcRam+0FFh],1 cmp byte[SPCRAM+0FFh],1
jne .noin2b jne .noin2b
cmp byte[spchalted+2],0 cmp byte[spchalted+2],0
jz .noin2b jz .noin2b
@@ -276,10 +276,10 @@ NEWSYM updatetimer
.noin2b .noin2b
dec byte[timinl2] dec byte[timinl2]
jnz .noin2c jnz .noin2c
inc byte[spcRam+0FFh] inc byte[SPCRAM+0FFh]
mov al,[timincr2] mov al,[timincr2]
mov [timinl2],al mov [timinl2],al
cmp byte[spcRam+0FFh],1 cmp byte[SPCRAM+0FFh],1
jne .noin2c jne .noin2c
cmp byte[spchalted+2],0 cmp byte[spchalted+2],0
jz .noin2c jz .noin2c
@@ -288,10 +288,10 @@ NEWSYM updatetimer
.noin2c .noin2c
dec byte[timinl2] dec byte[timinl2]
jnz .noin2d jnz .noin2d
inc byte[spcRam+0FFh] inc byte[SPCRAM+0FFh]
mov al,[timincr2] mov al,[timincr2]
mov [timinl2],al mov [timinl2],al
cmp byte[spcRam+0FFh],1 cmp byte[SPCRAM+0FFh],1
jne .noin2d jne .noin2d
cmp byte[spchalted+2],0 cmp byte[spchalted+2],0
jz .noin2d jz .noin2d
@@ -319,20 +319,20 @@ NEWSYM updatetimer
; SPC Write Registers ; SPC Write Registers
; DO NOT MODIFY DX OR ECX! ; DO NOT MODIFY DX OR ECX!
NEWSYM SPCRegF0 NEWSYM SPCRegF0
mov [spcRam+0F0h],al mov [SPCRAM+0F0h],al
ret ret
NEWSYM SPCRegF1 NEWSYM SPCRegF1
cmp byte[disablespcclr],1 cmp byte[disablespcclr],1
je .No23Clear je .No23Clear
test al,10h test al,10h
jz .No01Clear jz .No01Clear
mov byte[spcRam+0F4h],0 mov byte[SPCRAM+0F4h],0
mov byte[spcRam+0F5h],0 mov byte[SPCRAM+0F5h],0
.No01Clear .No01Clear
test al,20h test al,20h
jz .No23Clear jz .No23Clear
mov byte[spcRam+0F6h],0 mov byte[SPCRAM+0F6h],0
mov byte[spcRam+0F7h],0 mov byte[SPCRAM+0F7h],0
.No23Clear .No23Clear
cmp byte[SPCSkipXtraROM],1 cmp byte[SPCSkipXtraROM],1
je near .AfterNoROM je near .AfterNoROM
@@ -343,7 +343,7 @@ NEWSYM SPCRegF1
xor eax,eax xor eax,eax
.loopa .loopa
mov bl,[SPCROM+eax] mov bl,[SPCROM+eax]
mov [spcRam+0FFC0h+eax],bl mov [SPCRAM+0FFC0h+eax],bl
inc eax inc eax
cmp eax,040h cmp eax,040h
jne .loopa jne .loopa
@@ -356,36 +356,36 @@ NEWSYM SPCRegF1
xor eax,eax xor eax,eax
.loopb .loopb
mov bl,[spcextraram+eax] mov bl,[spcextraram+eax]
mov [spcRam+0FFC0h+eax],bl mov [SPCRAM+0FFC0h+eax],bl
inc eax inc eax
cmp eax,040h cmp eax,040h
jne .loopb jne .loopb
pop ebx pop ebx
pop eax pop eax
.AfterNoROM .AfterNoROM
mov [spcRam+0F1h],al mov [SPCRAM+0F1h],al
and al,0Fh and al,0Fh
mov [timeron],al mov [timeron],al
ret ret
NEWSYM SPCRegF2 NEWSYM SPCRegF2
mov [spcRam+0F2h],al mov [SPCRAM+0F2h],al
push eax push eax
push ebx push ebx
xor eax,eax xor eax,eax
mov al,[spcRam+0F2h] mov al,[SPCRAM+0F2h]
mov bl,[DSPMem+eax] mov bl,[DSPMem+eax]
mov [spcRam+0F3h],bl mov [SPCRAM+0F3h],bl
pop ebx pop ebx
pop eax pop eax
ret ret
NEWSYM SPCRegF3 NEWSYM SPCRegF3
push ebx push ebx
xor ebx,ebx xor ebx,ebx
mov bl,[spcRam+0F2h] mov bl,[SPCRAM+0F2h]
and bl,07fh and bl,07fh
call dword near [dspWptr+ebx*4] call dword near [dspWptr+ebx*4]
pop ebx pop ebx
mov [spcRam+ebx],al mov [SPCRAM+ebx],al
ret ret
NEWSYM SPCRegF4 NEWSYM SPCRegF4
mov [reg1read],al mov [reg1read],al
@@ -404,10 +404,10 @@ NEWSYM SPCRegF7
inc dword[spc700read] inc dword[spc700read]
ret ret
NEWSYM SPCRegF8 NEWSYM SPCRegF8
mov [spcRam+ebx],al mov [SPCRAM+ebx],al
ret ret
NEWSYM SPCRegF9 NEWSYM SPCRegF9
mov [spcRam+ebx],al mov [SPCRAM+ebx],al
ret ret
NEWSYM SPCRegFA NEWSYM SPCRegFA
mov [timincr0],al mov [timincr0],al
@@ -415,7 +415,7 @@ NEWSYM SPCRegFA
jne .nowrite jne .nowrite
mov [timinl0],al mov [timinl0],al
.nowrite .nowrite
mov [spcRam+ebx],al mov [SPCRAM+ebx],al
ret ret
NEWSYM SPCRegFB NEWSYM SPCRegFB
mov [timincr1],al mov [timincr1],al
@@ -423,7 +423,7 @@ NEWSYM SPCRegFB
jne .nowrite jne .nowrite
mov [timinl1],al mov [timinl1],al
.nowrite .nowrite
mov [spcRam+ebx],al mov [SPCRAM+ebx],al
ret ret
NEWSYM SPCRegFC NEWSYM SPCRegFC
mov [timincr2],al mov [timincr2],al
@@ -431,7 +431,7 @@ NEWSYM SPCRegFC
jne .nowrite jne .nowrite
mov [timinl2],al mov [timinl2],al
.nowrite .nowrite
mov [spcRam+ebx],al mov [SPCRAM+ebx],al
ret ret
NEWSYM SPCRegFD NEWSYM SPCRegFD
ret ret
@@ -444,16 +444,16 @@ NEWSYM SPCRegFF
; DO NOT MODIFY ANY REG! ; DO NOT MODIFY ANY REG!
; return data true al ; return data true al
NEWSYM RSPCRegF0 NEWSYM RSPCRegF0
mov al,[spcRam+0f0h] mov al,[SPCRAM+0f0h]
ret ret
NEWSYM RSPCRegF1 NEWSYM RSPCRegF1
mov al,[spcRam+0f1h] mov al,[SPCRAM+0f1h]
ret ret
NEWSYM RSPCRegF2 NEWSYM RSPCRegF2
mov al,[spcRam+0f2h] mov al,[SPCRAM+0f2h]
ret ret
NEWSYM RSPCRegF3 NEWSYM RSPCRegF3
mov al,[spcRam+0f3h] mov al,[SPCRAM+0f3h]
ret ret
%ifdef SPCDUMP %ifdef SPCDUMP
@@ -490,43 +490,43 @@ EXTSYM SPCSave_dump, SPCSave_handle, Write_File
%endif %endif
NEWSYM RSPCRegF4 NEWSYM RSPCRegF4
mov al,[spcRam+0f4h] mov al,[SPCRAM+0f4h]
%ifdef SPCDUMP %ifdef SPCDUMP
spcdump 0 spcdump 0
%endif %endif
ret ret
NEWSYM RSPCRegF5 NEWSYM RSPCRegF5
mov al,[spcRam+0f5h] mov al,[SPCRAM+0f5h]
%ifdef SPCDUMP %ifdef SPCDUMP
spcdump 1 spcdump 1
%endif %endif
ret ret
NEWSYM RSPCRegF6 NEWSYM RSPCRegF6
mov al,[spcRam+0f6h] mov al,[SPCRAM+0f6h]
%ifdef SPCDUMP %ifdef SPCDUMP
spcdump 2 spcdump 2
%endif %endif
ret ret
NEWSYM RSPCRegF7 NEWSYM RSPCRegF7
mov al,[spcRam+0f7h] mov al,[SPCRAM+0f7h]
%ifdef SPCDUMP %ifdef SPCDUMP
spcdump 3 spcdump 3
%endif %endif
ret ret
NEWSYM RSPCRegF8 NEWSYM RSPCRegF8
mov al,0 ;[spcRam+0f8h] mov al,0 ;[SPCRAM+0f8h]
ret ret
NEWSYM RSPCRegF9 NEWSYM RSPCRegF9
mov al,0 ;[spcRam+0f9h] mov al,0 ;[SPCRAM+0f9h]
ret ret
NEWSYM RSPCRegFA NEWSYM RSPCRegFA
mov al,[spcRam+0fah] mov al,[SPCRAM+0fah]
ret ret
NEWSYM RSPCRegFB NEWSYM RSPCRegFB
mov al,[spcRam+0fbh] mov al,[SPCRAM+0fbh]
ret ret
NEWSYM RSPCRegFC NEWSYM RSPCRegFC
mov al,[spcRam+0fch] mov al,[SPCRAM+0fch]
ret ret
%macro skipmacro 1 %macro skipmacro 1
@@ -566,31 +566,31 @@ NEWSYM haltspc
ret ret
NEWSYM RSPCRegFD NEWSYM RSPCRegFD
mov al,[spcRam+0fdh] mov al,[SPCRAM+0fdh]
and al,0Fh and al,0Fh
cmp byte[spcRam+0fdh],0 cmp byte[SPCRAM+0fdh],0
je .spcnextskip je .spcnextskip
mov byte[spcRam+0fdh],0 mov byte[SPCRAM+0fdh],0
mov byte[spcnumread],0 mov byte[spcnumread],0
ret ret
skipmacro 0 skipmacro 0
NEWSYM RSPCRegFE NEWSYM RSPCRegFE
mov al,[spcRam+0feh] mov al,[SPCRAM+0feh]
and al,0Fh and al,0Fh
cmp byte[spcRam+0feh],0 cmp byte[SPCRAM+0feh],0
je .spcnextskip je .spcnextskip
mov byte[spcRam+0feh],0 mov byte[SPCRAM+0feh],0
mov byte[spcnumread+1],0 mov byte[spcnumread+1],0
ret ret
skipmacro 1 skipmacro 1
NEWSYM RSPCRegFF NEWSYM RSPCRegFF
mov al,[spcRam+0ffh] mov al,[SPCRAM+0ffh]
and al,0Fh and al,0Fh
cmp byte[spcRam+0ffh],0 cmp byte[SPCRAM+0ffh],0
je .spcnextskip je .spcnextskip
mov byte[spcRam+0ffh],0 mov byte[SPCRAM+0ffh],0
mov byte[spcnumread+2],0 mov byte[spcnumread+2],0
ret ret
skipmacro 2 skipmacro 2
@@ -799,13 +799,13 @@ NEWSYM Op2F ; BRA rel branch always ...
; CLRP 20 1 2 clear direct page flag ..0..... ; CLRP 20 1 2 clear direct page flag ..0.....
NEWSYM Op20 ; CLRP Clear direct page flag NEWSYM Op20 ; CLRP Clear direct page flag
and byte[spcP],11011111b and byte[spcP],11011111b
mov dword[spcRamDP],spcRam mov dword[spcRamDP],SPCRAM
ret ret
; SETP 40 1 2 set dorect page flag ..1..0.. ; SETP 40 1 2 set dorect page flag ..1..0..
NEWSYM Op40 ; SETP Set Direct Page Flag (Also clear interupt flag?) NEWSYM Op40 ; SETP Set Direct Page Flag (Also clear interupt flag?)
or byte[spcP],00100000b or byte[spcP],00100000b
and byte[spcP],11111011b and byte[spcP],11111011b
mov dword[spcRamDP],spcRam mov dword[spcRamDP],SPCRAM
add dword[spcRamDP],100h add dword[spcRamDP],100h
ret ret
; CLRC 60 1 2 clear carry flag .......0 ; CLRC 60 1 2 clear carry flag .......0
@@ -1415,7 +1415,7 @@ NEWSYM OpC5 ; MOV labs,A A -> (abs) ........
mov bx,[ebp] mov bx,[ebp]
mov al, [spcA] mov al, [spcA]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
WriteByte WriteByte
ret ret
@@ -1424,7 +1424,7 @@ NEWSYM OpD5 ; MOV labs+X,A A -> (abs+X) ........
add bx,[ebp] add bx,[ebp]
mov al, [spcA] mov al, [spcA]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
WriteByte WriteByte
ret ret
@@ -1440,7 +1440,7 @@ NEWSYM OpD6 ; MOV labs+Y,A A -> (abs+Y) ........
mov al, [spcA] mov al, [spcA]
add bx,[ebp] add bx,[ebp]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
WriteByte WriteByte
ret ret
@@ -1452,7 +1452,7 @@ NEWSYM OpC7 ; MOV (dp+X),A A -> ((dp+X+1)(dp+X)) ........
inc ebp inc ebp
mov ax, [ebx] mov ax, [ebx]
mov ebx,eax mov ebx,eax
add ebx,spcRam add ebx,SPCRAM
mov al, [spcA] mov al, [spcA]
WriteByte WriteByte
ret ret
@@ -1465,7 +1465,7 @@ NEWSYM OpD7 ; MOV (dp)+Y,A A -> ((dp+1)(dp)+Y) ........
mov ax, [ebx] mov ax, [ebx]
add ax,[spcY] add ax,[spcY]
mov ebx,eax mov ebx,eax
add ebx,spcRam add ebx,SPCRAM
mov al, [spcA] mov al, [spcA]
WriteByte WriteByte
ret ret
@@ -1495,13 +1495,13 @@ NEWSYM OpC9 ; MOV labs,X X -> (abs) ........
mov bx,[ebp] mov bx,[ebp]
mov al, [spcX] mov al, [spcX]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
WriteByte WriteByte
ret ret
NEWSYM OpE9 ; MOV X,labs X <- (abs) N......Z NEWSYM OpE9 ; MOV X,labs X <- (abs) N......Z
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
add ebp,2 add ebp,2
mov [spcX], al mov [spcX], al
@@ -1567,13 +1567,13 @@ NEWSYM OpCC ; MOV labs,Y Y -> (abs) ........
mov bx,[ebp] mov bx,[ebp]
mov al, [spcY] mov al, [spcY]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
WriteByte WriteByte
ret ret
NEWSYM OpEC ; MOV Y,labs Y <- (abs) N......Z NEWSYM OpEC ; MOV Y,labs Y <- (abs) N......Z
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
add ebp,2 add ebp,2
mov [spcY],al mov [spcY],al
@@ -1677,7 +1677,7 @@ NEWSYM OpAD ; CMP Y,#inm Y-inm N......ZC
NEWSYM Op1E ; CMP X,labs X-(abs) N......ZC NEWSYM Op1E ; CMP X,labs X-(abs) N......ZC
mov bx,[ebp] mov bx,[ebp]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
cmp byte[spcX], al cmp byte[spcX], al
cmc cmc
@@ -1694,7 +1694,7 @@ NEWSYM Op3E ; CMP X,dp X-(dp) N......ZC
NEWSYM Op5E ; CMP Y,labs Y-(abs) N......ZC NEWSYM Op5E ; CMP Y,labs Y-(abs) N......ZC
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
add ebp,2 add ebp,2
cmp byte[spcY], al cmp byte[spcY], al
@@ -1887,7 +1887,7 @@ NEWSYM OpDAb
; shr bx,3 ; shr bx,3
; and cl,00000111b ; and cl,00000111b
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
shr al,cl shr al,cl
and al,01h and al,01h
@@ -1917,7 +1917,7 @@ NEWSYM Op4A ; AND1 C,mem.bit C <- C AND (mem.bit) ........C
; shr bx,3 ; shr bx,3
; and cl,00000111b ; and cl,00000111b
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
shr al,cl shr al,cl
or al,0FEh or al,0FEh
@@ -1937,7 +1937,7 @@ NEWSYM Op6A ; AND1 C,/mem.bit C <- C AND !(mem.bit) ........C
; shr bx,3 ; shr bx,3
; and cl,00000111b ; and cl,00000111b
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
shr al,cl shr al,cl
or al,0FEh or al,0FEh
@@ -1974,7 +1974,7 @@ NEWSYM OpCA ; MOV1 mem.bit,C C -> (mem.bit) .........
and al,01h and al,01h
add ebp,2 add ebp,2
shl al,cl shl al,cl
add ebx,spcRam add ebx,SPCRAM
; al = carry flag positioned in correct location, ah = 1 positioned ; al = carry flag positioned in correct location, ah = 1 positioned
mov cl,al mov cl,al
xor ah,0FFh xor ah,0FFh
@@ -1999,7 +1999,7 @@ NEWSYM OpEA ; NOT1 mem.bit complement (mem.bit) .........
shl ah,cl shl ah,cl
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
ReadByte2 ReadByte2
xor al,ah xor al,ah
WriteByte WriteByte
@@ -2053,7 +2053,7 @@ NEWSYM Op5B ; LSR dp+X 0 >> (dp+X) <<C N......ZC
NEWSYM Op0C ; ASL labs C << (abs) <<0 N......ZC NEWSYM Op0C ; ASL labs C << (abs) <<0 N......ZC
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
ReadByte2 ReadByte2
shl al,1 shl al,1
@@ -2063,7 +2063,7 @@ NEWSYM Op0C ; ASL labs C << (abs) <<0 N......ZC
NEWSYM Op4C ; LSR labs 0 >> (abs) <<C N......ZC NEWSYM Op4C ; LSR labs 0 >> (abs) <<C N......ZC
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
ReadByte2 ReadByte2
shr al,1 shr al,1
@@ -2179,7 +2179,7 @@ NEWSYM Op7Bb
NEWSYM Op2C ; ROL labs C << (abs) <<C N......ZC NEWSYM Op2C ; ROL labs C << (abs) <<C N......ZC
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
test byte[spcP],01h test byte[spcP],01h
jnz near Op2Cb jnz near Op2Cb
@@ -2197,7 +2197,7 @@ NEWSYM Op2Cb
NEWSYM Op6C ; ROR labs C >> (abs) <<C N......ZC NEWSYM Op6C ; ROR labs C >> (abs) <<C N......ZC
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
test byte[spcP],01h test byte[spcP],01h
jnz near Op6Cb jnz near Op6Cb
@@ -2315,7 +2315,7 @@ NEWSYM OpBB ; INC dp+X ++ (dp+X) N......Z.
NEWSYM Op8C ; DEC labs -- (abs) N......Z. NEWSYM Op8C ; DEC labs -- (abs) N......Z.
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
ReadByte2 ReadByte2
dec al dec al
@@ -2325,7 +2325,7 @@ NEWSYM Op8C ; DEC labs -- (abs) N......Z.
NEWSYM OpAC ; INC labs ++ (abs) N......Z. NEWSYM OpAC ; INC labs ++ (abs) N......Z.
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
ReadByte2 ReadByte2
inc al inc al
@@ -2382,45 +2382,45 @@ NEWSYM Op0D ; PUSH PSW push PSW to stack .........
cmp byte[spcNZ],0 cmp byte[spcNZ],0
je .ZeroSet je .ZeroSet
dec byte[spcS] dec byte[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
ret ret
.NegSet .NegSet
or bl,80h or bl,80h
dec byte[spcS] dec byte[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
ret ret
.ZeroSet .ZeroSet
or bl,02h or bl,02h
dec byte[spcS] dec byte[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
ret ret
NEWSYM Op2D ; PUSH A push A to stack ......... NEWSYM Op2D ; PUSH A push A to stack .........
mov eax,[spcS] mov eax,[spcS]
mov bl,[spcA] mov bl,[spcA]
dec byte[spcS] dec byte[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
ret ret
NEWSYM Op4D ; PUSH X push X to stack ......... NEWSYM Op4D ; PUSH X push X to stack .........
mov eax,[spcS] mov eax,[spcS]
mov bl,[spcX] mov bl,[spcX]
dec byte[spcS] dec byte[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
ret ret
NEWSYM Op6D ; PUSH Y push Y to stack ......... NEWSYM Op6D ; PUSH Y push Y to stack .........
mov eax,[spcS] mov eax,[spcS]
mov bl,[spcY] mov bl,[spcY]
dec byte[spcS] dec byte[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
ret ret
NEWSYM Op8E ; POP PSW pop PSW from stack (Restored) NEWSYM Op8E ; POP PSW pop PSW from stack (Restored)
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov byte[spcNZ],0 mov byte[spcNZ],0
mov bl,[spcRam+eax] mov bl,[SPCRAM+eax]
mov [spcP],bl mov [spcP],bl
test byte[spcP],2 test byte[spcP],2
jnz .ZeroYes jnz .ZeroYes
@@ -2430,7 +2430,7 @@ NEWSYM Op8E ; POP PSW pop PSW from stack (Restored)
or byte[spcNZ],80h or byte[spcNZ],80h
.NoNeg .NoNeg
.ZeroYes .ZeroYes
mov dword[spcRamDP],spcRam mov dword[spcRamDP],SPCRAM
test byte[spcP],32 test byte[spcP],32
jnz .setpage1 jnz .setpage1
ret ret
@@ -2441,21 +2441,21 @@ NEWSYM Op8E ; POP PSW pop PSW from stack (Restored)
NEWSYM OpAE ; POP A pop A from stack ......... NEWSYM OpAE ; POP A pop A from stack .........
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov bl,[spcRam+eax] mov bl,[SPCRAM+eax]
mov [spcA],bl mov [spcA],bl
ret ret
NEWSYM OpCE ; POP X pop X from stack ......... NEWSYM OpCE ; POP X pop X from stack .........
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov bl,[spcRam+eax] mov bl,[SPCRAM+eax]
mov [spcX],bl mov [spcX],bl
ret ret
NEWSYM OpEE ; POP Y pop Y from stack ......... NEWSYM OpEE ; POP Y pop Y from stack .........
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov bl,[spcRam+eax] mov bl,[SPCRAM+eax]
mov [spcY],bl mov [spcY],bl
ret ret
@@ -2465,7 +2465,7 @@ NEWSYM OpEE ; POP Y pop Y from stack .........
NEWSYM Op0E ; TSET1 labs test and set bits with A N......Z. NEWSYM Op0E ; TSET1 labs test and set bits with A N......Z.
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
add ebp,2 add ebp,2
ReadByte2 ReadByte2
mov ah,al mov ah,al
@@ -2566,8 +2566,8 @@ NEWSYM Op1F ; JMP (labs+X) PC <- (abs+X+1)(abs+X) ...
add bx,[spcX] add bx,[spcX]
xor eax,eax xor eax,eax
add ebp,2 add ebp,2
mov ax, [spcRam+ebx] mov ax,[SPCRAM+ebx]
mov ebp,spcRam mov ebp,SPCRAM
add ebp,eax add ebp,eax
ret ret
@@ -2575,16 +2575,16 @@ NEWSYM Op3F ; CALL labs subroutine call ........
; calculate PC ; calculate PC
mov ecx,ebp mov ecx,ebp
add ecx,2 add ecx,2
sub ecx,spcRam sub ecx,SPCRAM
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],ch mov [SPCRAM+eax],ch
dec byte[spcS] dec byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],cl mov [SPCRAM+eax],cl
dec byte[spcS] dec byte[spcS]
; set new PC ; set new PC
mov cx,[ebp] mov cx,[ebp]
add ecx,spcRam add ecx,SPCRAM
mov ebp,ecx mov ebp,ecx
xor ecx,ecx xor ecx,ecx
ret ret
@@ -2593,17 +2593,17 @@ NEWSYM Op4F ; PCALL upage upage call ........
; calculate PC ; calculate PC
mov ecx,ebp mov ecx,ebp
inc ecx inc ecx
sub ecx,spcRam sub ecx,SPCRAM
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],ch mov [SPCRAM+eax],ch
dec byte[spcS] dec byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],cl mov [SPCRAM+eax],cl
dec byte[spcS] dec byte[spcS]
; set new PC ; set new PC
xor ecx,ecx xor ecx,ecx
mov cl,[ebp] mov cl,[ebp]
add ecx,spcRam add ecx,SPCRAM
add ecx,0ff00h add ecx,0ff00h
mov ebp,ecx mov ebp,ecx
xor ecx,ecx xor ecx,ecx
@@ -2614,7 +2614,7 @@ NEWSYM Op4F ; PCALL upage upage call ........
NEWSYM Op5F ; JMP labs jump to new location ... NEWSYM Op5F ; JMP labs jump to new location ...
mov bx,[ebp] mov bx,[ebp]
add ebp,2 add ebp,2
mov ebp,spcRam mov ebp,SPCRAM
add ebp,ebx add ebp,ebx
ret ret
@@ -2622,11 +2622,11 @@ NEWSYM Op6F ; ret ret from subroutine ........
xor ecx,ecx xor ecx,ecx
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov cl,[spcRam+eax] mov cl,[SPCRAM+eax]
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov ch,[spcRam+eax] mov ch,[SPCRAM+eax]
add ecx,spcRam add ecx,SPCRAM
mov ebp,ecx mov ebp,ecx
xor ecx,ecx xor ecx,ecx
ret ret
@@ -2637,7 +2637,7 @@ NEWSYM Op7F ; ret1 return from interrupt (Restored)
xor ecx,ecx xor ecx,ecx
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov cl,[spcRam+eax] mov cl,[SPCRAM+eax]
mov [spcP],cl mov [spcP],cl
test byte[spcP],80h test byte[spcP],80h
jz .NoNeg jz .NoNeg
@@ -2652,14 +2652,14 @@ NEWSYM Op7F ; ret1 return from interrupt (Restored)
.YesZero .YesZero
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov cl,[spcRam+eax] mov cl,[SPCRAM+eax]
inc byte[spcS] inc byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov ch,[spcRam+eax] mov ch,[SPCRAM+eax]
add ecx,spcRam add ecx,SPCRAM
mov ebp,ecx mov ebp,ecx
; set direct page ; set direct page
mov dword[spcRamDP],spcRam mov dword[spcRamDP],SPCRAM
test byte[spcP],32 test byte[spcP],32
jz .nodp jz .nodp
add dword[spcRamDP],100h add dword[spcRamDP],100h

View File

@@ -20,12 +20,6 @@
; A,DP addressing mode ; A,DP addressing mode
%macro SPCaddr_DP 0 %macro SPCaddr_DP 0
mov bl,[ebp] mov bl,[ebp]
@@ -44,7 +38,7 @@
%macro SPCaddr_LABS 0 %macro SPCaddr_LABS 0
mov bx,[ebp] mov bx,[ebp]
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
add ebp,2 add ebp,2
%endmacro %endmacro
@@ -53,7 +47,7 @@
mov bl,[spcX] mov bl,[spcX]
add bx,[ebp] add bx,[ebp]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
%endmacro %endmacro
@@ -69,7 +63,7 @@
mov bl,[spcY] mov bl,[spcY]
add bx,[ebp] add bx,[ebp]
add ebp,2 add ebp,2
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
%endmacro %endmacro
@@ -82,7 +76,7 @@
inc ebp inc ebp
mov ax, [ebx] mov ax, [ebx]
mov ebx,eax mov ebx,eax
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
%endmacro %endmacro
@@ -94,8 +88,6 @@
mov ax,[ebx] mov ax,[ebx]
add ax,[spcY] add ax,[spcY]
mov ebx,eax mov ebx,eax
add ebx,spcRam add ebx,SPCRAM
ReadByte ReadByte
%endmacro %endmacro

View File

@@ -20,11 +20,6 @@
; move al at address ebx ; move al at address ebx
; branch instructions ; branch instructions
@@ -41,19 +36,19 @@
; tcall instruction ; tcall instruction
%macro spctcall 1 %macro spctcall 1
mov ebx,ebp mov ebx,ebp
sub ebx,spcRam sub ebx,SPCRAM
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],bh mov [SPCRAM+eax],bh
dec byte[spcS] dec byte[spcS]
mov eax,[spcS] mov eax,[spcS]
mov [spcRam+eax],bl mov [SPCRAM+eax],bl
dec byte[spcS] dec byte[spcS]
mov bx,[spcextraram+%1] mov bx,[spcextraram+%1]
test byte[spcRam+0F1h],80h test byte[SPCRAM+0F1h],80h
jnz %%finished jnz %%finished
mov bx,[spcRam+0FFC0h+%1] mov bx,[SPCRAM+0FFC0h+%1]
%%finished %%finished
add ebx,spcRam add ebx,SPCRAM
mov ebp,ebx mov ebp,ebx
ret ret
%endmacro %endmacro
@@ -168,5 +163,3 @@
mov [spcNZ],al mov [spcNZ],al
ret ret
%endmacro %endmacro

View File

@@ -32,7 +32,7 @@ EXTSYM writeon,curcyc,dmadata,execsingle,initaddrl,memtabler8,pdh,debugloadstate
EXTSYM regaccessbankr8,selcB800,snesmap2,snesmmap,ram7f,StringLength,exiter EXTSYM regaccessbankr8,selcB800,snesmap2,snesmmap,ram7f,StringLength,exiter
EXTSYM CurrentCPU,SA1RegP,curypos,xa,xd,xdb,xe,xp,xpb,xpc,xs,xx,xy,SA1xpb,SA1xpc EXTSYM CurrentCPU,SA1RegP,curypos,xa,xd,xdb,xe,xp,xpb,xpc,xs,xx,xy,SA1xpb,SA1xpc
EXTSYM SA1xa,SA1xx,SA1xy,SA1xd,SA1xdb,SA1xs,cycpbl,debugbuf,soundon,spcA,spcNZ EXTSYM SA1xa,SA1xx,SA1xy,SA1xd,SA1xdb,SA1xs,cycpbl,debugbuf,soundon,spcA,spcNZ
EXTSYM spcP,spcPCRam,spcRam,spcS,spcX,spcY EXTSYM spcP,spcPCRam,SPCRAM,spcS,spcX,spcY
; debstop at regsw.asm 2118/2119 ; debstop at regsw.asm 2118/2119
@@ -144,7 +144,7 @@ NEWSYM loadtempstuff
; call Read_File ; call Read_File
; Load SPC stuff ; Load SPC stuff
mov ecx,[PHspcsave] mov ecx,[PHspcsave]
mov edx,spcRam mov edx,SPCRAM
call Read_File call Read_File
; Load DSP stuff ; Load DSP stuff
mov ecx,[PHdspsave] mov ecx,[PHdspsave]
@@ -173,7 +173,7 @@ NEWSYM loadtempstuff
mov [spcP],al mov [spcP],al
mov al,[ssdatst+43] mov al,[ssdatst+43]
mov [spcS],al mov [spcS],al
add dword[spcPCRam],spcRam add dword[spcPCRam],SPCRAM
; Assemble N/Z flags into P ; Assemble N/Z flags into P
mov byte[spcNZ],0 mov byte[spcNZ],0
test byte[spcP],02h test byte[spcP],02h
@@ -186,15 +186,15 @@ NEWSYM loadtempstuff
.noneg .noneg
; Init separate variables ; Init separate variables
xor eax,eax xor eax,eax
mov al,[spcRam+0F1h] mov al,[SPCRAM+0F1h]
mov [timeron],al mov [timeron],al
mov al,[spcRam+0FAh] mov al,[SPCRAM+0FAh]
mov [timincr0],al mov [timincr0],al
mov [timinl0],al mov [timinl0],al
mov al,[spcRam+0FBh] mov al,[SPCRAM+0FBh]
mov [timincr1],al mov [timincr1],al
mov [timinl1],al mov [timinl1],al
mov al,[spcRam+0FCh] mov al,[SPCRAM+0FCh]
mov [timincr2],al mov [timincr2],al
mov [timinl2],al mov [timinl2],al
ret ret
@@ -379,7 +379,7 @@ NEWSYM debugdump
call Create_File call Create_File
mov bx,ax mov bx,ax
mov ecx,65536 mov ecx,65536
mov edx,spcRam mov edx,SPCRAM
call Write_File call Write_File
call Close_File call Close_File
mov edx,.fname2 mov edx,.fname2
@@ -870,7 +870,7 @@ NEWSYM SPCmodify
xor ebx,ebx xor ebx,ebx
mov cx,dx mov cx,dx
mov bx,dx mov bx,dx
add ebx,spcRam add ebx,SPCRAM
mov [.value],cx mov [.value],cx
mov al,[ebx] mov al,[ebx]
; set cursor to (12,46) ; set cursor to (12,46)
@@ -911,7 +911,7 @@ NEWSYM SPCmodify
xor ebx,ebx xor ebx,ebx
xor ecx,ecx xor ecx,ecx
mov bx,[.value] mov bx,[.value]
add ebx,spcRam add ebx,SPCRAM
mov [ebx],al mov [ebx],al
.exit .exit
pop es pop es
@@ -1354,7 +1354,7 @@ NEWSYM SPCbreakops
int 10h int 10h
xor eax,eax xor eax,eax
mov ax,cx mov ax,cx
add eax,spcRam add eax,SPCRAM
mov [breakarea],eax mov [breakarea],eax
mov byte[wx],14 mov byte[wx],14
@@ -1453,7 +1453,7 @@ NEWSYM breakatsign
int 10h int 10h
xor eax,eax xor eax,eax
mov ax,cx mov ax,cx
add eax,spcRam add eax,SPCRAM
mov [breakarea],eax mov [breakarea],eax
mov byte[wx],14 mov byte[wx],14
@@ -1558,7 +1558,7 @@ NEWSYM breakatsignlog
int 10h int 10h
xor eax,eax xor eax,eax
mov ax,cx mov ax,cx
add eax,spcRam add eax,SPCRAM
mov [breakarea],eax mov [breakarea],eax
mov byte[wx],14 mov byte[wx],14
@@ -1655,7 +1655,7 @@ NEWSYM breakatsignlog
cmp al,27 cmp al,27
je .skipc je .skipc
.skipa .skipa
; cmp byte[spcRam+6],40h ; cmp byte[SPCRAM+6],40h
; je .skipc ; je .skipc
mov eax,[ram7f] mov eax,[ram7f]
; jmp .loopa ; jmp .loopa
@@ -1785,7 +1785,7 @@ NEWSYM breakatsignb
cmp al,27 cmp al,27
je .skipc je .skipc
.skipa .skipa
cmp byte[spcRam+6],40h cmp byte[SPCRAM+6],40h
je .skipc je .skipc
cmp byte[keyonsn],1 cmp byte[keyonsn],1
jne .loopa jne .loopa
@@ -1869,7 +1869,7 @@ NEWSYM breakatsignc
cmp al,27 cmp al,27
je .skipc je .skipc
.skipa .skipa
cmp byte[spcRam+6],40h cmp byte[SPCRAM+6],40h
je .skipc je .skipc
cmp byte[sndwrit],1 cmp byte[sndwrit],1
jne .loopa jne .loopa
@@ -3733,7 +3733,7 @@ NEWSYM nextspcopcode
; output spc pc & opcode # ; output spc pc & opcode #
mov eax,[spcPCRam] mov eax,[spcPCRam]
sub eax,spcRam sub eax,SPCRAM
call .printhex16 call .printhex16
mov al,'/' mov al,'/'
stosb stosb
@@ -3980,7 +3980,7 @@ NEWSYM nextspcopcode
movsx eax,byte[ebx+1] movsx eax,byte[ebx+1]
add eax,2 add eax,2
add eax,[spcPCRam] add eax,[spcPCRam]
sub eax,spcRam sub eax,SPCRAM
call .printhex16 call .printhex16
add esi,3 add esi,3
jmp .donext jmp .donext
@@ -4019,7 +4019,7 @@ NEWSYM nextspcopcode
movsx eax,byte[ebx+1] movsx eax,byte[ebx+1]
add eax,2 add eax,2
add eax,[spcPCRam] add eax,[spcPCRam]
sub eax,spcRam sub eax,SPCRAM
call .printhex16 call .printhex16
add esi,2 add esi,2
jmp .donext jmp .donext
@@ -4028,7 +4028,7 @@ NEWSYM nextspcopcode
movsx eax,byte[ebx+2] movsx eax,byte[ebx+2]
add eax,2 add eax,2
add eax,[spcPCRam] add eax,[spcPCRam]
sub eax,spcRam sub eax,SPCRAM
call .printhex16 call .printhex16
add esi,2 add esi,2
jmp .donext jmp .donext

View File

@@ -21,7 +21,7 @@
%include "macros.mac" %include "macros.mac"
EXTSYM ProcessSoundBuffer,DosExit,getenv,PrintStr,printhex,printnum,WaitForKey EXTSYM ProcessSoundBuffer,DosExit,getenv,PrintStr,printhex,printnum,WaitForKey
EXTSYM SBHDMA,soundon,csounddisable,DisplayS,spcRam,DSPMem EXTSYM SBHDMA,soundon,csounddisable,DisplayS,SPCRAM,DSPMem
EXTSYM Surround,StereoSound,SoundQuality,SoundSpeeds,SBToSPCSpeeds2 EXTSYM Surround,StereoSound,SoundQuality,SoundSpeeds,SBToSPCSpeeds2
EXTSYM SoundSpeedt,DSPBuffer,BufferSize,BufferSizes,BufferSizeB EXTSYM SoundSpeedt,DSPBuffer,BufferSize,BufferSizes,BufferSizeB
EXTSYM BufferSizeW,dssel EXTSYM BufferSizeW,dssel
@@ -364,11 +364,11 @@ NEWSYM handlersbseg
.sbend .sbend
xor byte[SBswitch],1 xor byte[SBswitch],1
; move the good data at spcRam+0f3h ; move the good data at SPCRAM+0f3h
xor eax,eax xor eax,eax
mov al,[spcRam+0F2h] mov al,[SPCRAM+0F2h]
mov bl,[DSPMem+eax] mov bl,[DSPMem+eax]
mov [spcRam+0F3h],bl mov [SPCRAM+0F3h],bl
; acknowledge SB for IRQing ; acknowledge SB for IRQing
mov dx,[SBPort] mov dx,[SBPort]
add dl,0Eh add dl,0Eh

View File

@@ -33,7 +33,7 @@ extern unsigned int spcnumread, spchalted, opcd, HIRQCycNext, oamaddr;
extern unsigned int SfxR0, *setaramdata, ramsize, *sram; extern unsigned int SfxR0, *setaramdata, ramsize, *sram;
extern unsigned int tempesi, tempedi, tempedx, tempebp; extern unsigned int tempesi, tempedi, tempedx, tempebp;
extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2; extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2;
extern unsigned char sndrot, spcRam[65472], DSPMem[256], SA1Status, *SA1RAMArea; extern unsigned char sndrot, SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea;
extern unsigned char DSP1Type, DSP1COp, prevoamptr, BRRBuffer[32], *romdata; extern unsigned char DSP1Type, DSP1COp, prevoamptr, BRRBuffer[32], *romdata;
extern unsigned char curcyc, echoon0; extern unsigned char curcyc, echoon0;
extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096]; extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096];

View File

@@ -19,6 +19,7 @@
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; Sorry. The GUI code is a total mess. One problem I encountered is that ; Sorry. The GUI code is a total mess. One problem I encountered is that
; there seems to be a bug in nasm with using math calculations combined ; there seems to be a bug in nasm with using math calculations combined
; with macros within macros, so in some macro definitions, I had to ; with macros within macros, so in some macro definitions, I had to
@@ -71,7 +72,7 @@ EXTSYM smallscreenon,soundon,StereoSound,SoundQuality,MusicRelVol,endprog
EXTSYM continueprog,spcBuffera,spcRamcmp,cbitmode,makepal,t1cc,LoadDir,LoadDrive EXTSYM continueprog,spcBuffera,spcRamcmp,cbitmode,makepal,t1cc,LoadDir,LoadDrive
EXTSYM SRAMDir,SRAMChdir,SRAMDirCurDir,initsnes,fname,makeextension,sram EXTSYM SRAMDir,SRAMChdir,SRAMDirCurDir,initsnes,fname,makeextension,sram
EXTSYM loadfileGUI,GUIloadfailed,romloadskip,SetupROM,romdata,ramsize EXTSYM loadfileGUI,GUIloadfailed,romloadskip,SetupROM,romdata,ramsize
EXTSYM cfgloadsdir,init65816,procexecloop,spcRam,spcPCRam,spcS,spcRamDP,spcA EXTSYM cfgloadsdir,init65816,procexecloop,SPCRAM,spcPCRam,spcS,spcRamDP,spcA
EXTSYM spcX,spcY,spcP,spcNZ,Voice0Status,Voice1Status,Voice2Status,Voice3Status EXTSYM spcX,spcY,spcP,spcNZ,Voice0Status,Voice1Status,Voice2Status,Voice3Status
EXTSYM Voice4Status,Voice5Status,Voice6Status,Voice7Status,ClearScreen EXTSYM Voice4Status,Voice5Status,Voice6Status,Voice7Status,ClearScreen
EXTSYM statesaver,loadstate2,vidbuffer,ASCII2Font,hirestiledat,showallext EXTSYM statesaver,loadstate2,vidbuffer,ASCII2Font,hirestiledat,showallext

View File

@@ -20,7 +20,6 @@
; GUI Keyboard Routines ; GUI Keyboard Routines
%macro GUIqcheckkeys 1 %macro GUIqcheckkeys 1
@@ -3168,5 +3167,3 @@ WaitForKey:
.mousedis2 .mousedis2
mov byte[GUIpclicked],1 mov byte[GUIpclicked],1
ret ret

View File

@@ -19,6 +19,7 @@
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; GUI File (Game) Loader ; GUI File (Game) Loader
%macro GUIGetEntry 1 %macro GUIGetEntry 1
@@ -1559,5 +1560,3 @@ loadquickfname:
SECTION .bss SECTION .bss
.temp resd 256 .temp resd 256
SECTION .text SECTION .text

View File

@@ -379,12 +379,12 @@ NEWSYM GUIDoReset
popad popad
xor eax,eax xor eax,eax
mov edx,spcRam mov edx,SPCRAM
mov ax,0FFC0h mov ax,0FFC0h
add edx,eax add edx,eax
mov [spcPCRam],edx mov [spcPCRam],edx
mov dword[spcS],1EFh mov dword[spcS],1EFh
mov dword[spcRamDP],spcRam mov dword[spcRamDP],SPCRAM
mov byte[spcA],0 mov byte[spcA],0
mov byte[spcX],0 mov byte[spcX],0
mov byte[spcY],0 mov byte[spcY],0

View File

@@ -18,6 +18,8 @@
;along with this program; if not, write to the Free Software ;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
SECTION .text SECTION .text
; Window Display Routines ; Window Display Routines

View File

@@ -26,7 +26,7 @@ EXTSYM DSPMem,FPSOn,Makemode7Table,MessageOn,vesa2red10,scanlines,smallscreenon
EXTSYM MsgCount,Msgptr,OutputGraphicString,OutputGraphicString16b,vidbuffer EXTSYM MsgCount,Msgptr,OutputGraphicString,OutputGraphicString16b,vidbuffer
EXTSYM PrepareSaveState,ResetState,breakatsignb,cvidmode,cbitmode,copyvid EXTSYM PrepareSaveState,ResetState,breakatsignb,cvidmode,cbitmode,copyvid
EXTSYM curblank,drawhline,drawhline16b,drawvline,drawvline16b,fnames,frameskip EXTSYM curblank,drawhline,drawhline16b,drawvline,drawvline16b,fnames,frameskip
EXTSYM mode7tab,pressed,spcA,spcBuffera,spcNZ,spcP,spcPCRam,spcRam,spcS,spcX EXTSYM mode7tab,pressed,spcA,spcBuffera,spcNZ,spcP,spcPCRam,SPCRAM,spcS,spcX
EXTSYM spcY,spcon,vesa2_bpos,vesa2_clbit,vesa2_gpos,vesa2_rpos,vesa2selec EXTSYM spcY,spcon,vesa2_bpos,vesa2_clbit,vesa2_gpos,vesa2_rpos,vesa2selec
EXTSYM spritetablea,sprlefttot,newengen,spcextraram,resolutn,Open_File EXTSYM spritetablea,sprlefttot,newengen,spcextraram,resolutn,Open_File
EXTSYM Close_File,Write_File,Create_File,Get_Key,Get_Date,continueprognokeys EXTSYM Close_File,Write_File,Create_File,Get_Key,Get_Date,continueprognokeys
@@ -818,7 +818,7 @@ NEWSYM menudrawcursor16b
ret ret
NEWSYM savespcdata NEWSYM savespcdata
sub dword[spcPCRam],spcRam sub dword[spcPCRam],SPCRAM
; Assemble N/Z flags into P ; Assemble N/Z flags into P
and byte[spcP],0FDh and byte[spcP],0FDh
test byte[spcNZ],0FFh test byte[spcNZ],0FFh
@@ -842,7 +842,7 @@ NEWSYM savespcdata
mov [ssdatst+42],al mov [ssdatst+42],al
mov al,[spcS] mov al,[spcS]
mov [ssdatst+43],al mov [ssdatst+43],al
add dword[spcPCRam],spcRam add dword[spcPCRam],SPCRAM
.savestuff .savestuff
ChangeDir SPCPath ChangeDir SPCPath
pushad pushad
@@ -983,7 +983,7 @@ NEWSYM savespcdata
; Save SPC stuff ; Save SPC stuff
mov ecx,65536 mov ecx,65536
mov edx,spcRam mov edx,SPCRAM
call Write_File call Write_File
mov ecx,256 mov ecx,256
mov edx,DSPMem mov edx,DSPMem
@@ -1007,7 +1007,7 @@ NEWSYM savespcdata
mov byte[SPCSave_dump],1 mov byte[SPCSave_dump],1
mov eax, [spcRam+0F4h] mov eax, [SPCRAM+0F4h]
mov [SPCSave_ports], eax mov [SPCSave_ports], eax
xor eax, eax xor eax, eax
mov [SPCSave_buffer], eax mov [SPCSave_buffer], eax

View File

@@ -47,7 +47,7 @@ EXTSYM JoyAPos,JoyBPos,NMIEnab,SPCROM,VIRQLoc,coladdb,coladdg,coladdr,doirqnext
EXTSYM forceblnk,nmiprevaddrh,nmiprevaddrl,nmiprevline,nmirept,nmistatus EXTSYM forceblnk,nmiprevaddrh,nmiprevaddrl,nmiprevline,nmirept,nmistatus
EXTSYM opexec268,opexec268b,opexec268cph,opexec268cphb,opexec358,opexec358b EXTSYM opexec268,opexec268b,opexec268cph,opexec268cphb,opexec358,opexec358b
EXTSYM opexec358cph,spcextraram,opexec358cphb,prevoamptr,reg1read,reg2read EXTSYM opexec358cph,spcextraram,opexec358cphb,prevoamptr,reg1read,reg2read
EXTSYM reg3read,reg4read,resolutn,romdata,scrndis,spcP,spcRam,spcnumread EXTSYM reg3read,reg4read,resolutn,romdata,scrndis,spcP,SPCRAM,spcnumread
EXTSYM spchalted,tableD,timeron,vidbright,SPC700read,SPC700write,spc700read EXTSYM spchalted,tableD,timeron,vidbright,SPC700read,SPC700write,spc700read
EXTSYM GUIReset,InitC4,SA1Reset,SetAddressingModesSA1,SDD1BankA,SPC7110init EXTSYM GUIReset,InitC4,SA1Reset,SetAddressingModesSA1,SDD1BankA,SPC7110init
EXTSYM RTCinit,InitOBC,memaccessspc7110r8,memaccessspc7110r16,memaccessspc7110w8 EXTSYM RTCinit,InitOBC,memaccessspc7110r8,memaccessspc7110r16,memaccessspc7110w8
@@ -1124,7 +1124,7 @@ NEWSYM init65816
.loopa .loopa
mov al,[SPCROM+esi] mov al,[SPCROM+esi]
mov byte[spcextraram+esi],0FFh mov byte[spcextraram+esi],0FFh
mov [spcRam+0FFC0h+esi],al mov [SPCRAM+0FFC0h+esi],al
inc esi inc esi
cmp esi,040h cmp esi,040h
jne .loopa jne .loopa
@@ -1163,10 +1163,10 @@ NEWSYM init65816
call headerhack call headerhack
popad popad
mov byte[spcRam+0F4h],0 mov byte[SPCRAM+0F4h],0
mov byte[spcRam+0F5h],0 mov byte[SPCRAM+0F5h],0
mov byte[spcRam+0F6h],0 mov byte[SPCRAM+0F6h],0
mov byte[spcRam+0F7h],0 mov byte[SPCRAM+0F7h],0
mov byte[reg1read],0 mov byte[reg1read],0
mov byte[reg2read],0 mov byte[reg2read],0
mov byte[reg3read],0 mov byte[reg3read],0

View File

@@ -1327,7 +1327,7 @@ extern unsigned char pal16b[1024];
extern unsigned char pal16bcl[1024]; extern unsigned char pal16bcl[1024];
extern unsigned char pal16bclha[1024]; extern unsigned char pal16bclha[1024];
extern unsigned char pal16bxcl[256]; extern unsigned char pal16bxcl[256];
extern unsigned char spcRam[65472]; extern unsigned char SPCRAM[65472];
extern unsigned char *sram; extern unsigned char *sram;
extern unsigned char *vidbuffer; extern unsigned char *vidbuffer;
@@ -1354,8 +1354,8 @@ void clearSPCRAM()
unsigned int i; unsigned int i;
for (i = 0; i < 65472; i += 0x40) for (i = 0; i < 65472; i += 0x40)
{ {
memset(spcRam+i, 0, 0x20); memset(SPCRAM+i, 0, 0x20);
memset(spcRam+i+0x20, 0xFF, 0x20); memset(SPCRAM+i+0x20, 0xFF, 0x20);
} }
} }

View File

@@ -61,7 +61,7 @@ static void copy_snes_data(unsigned char **buffer, void (*copy_func)(unsigned ch
static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t)) static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t))
{ {
//SPC stuff, DSP stuff //SPC stuff, DSP stuff
copy_func(buffer, spcRam, PHspcsave); copy_func(buffer, SPCRAM, PHspcsave);
copy_func(buffer, &BRRBuffer, PHdspsave); copy_func(buffer, &BRRBuffer, PHdspsave);
copy_func(buffer, &DSPMem, sizeof(DSPMem)); copy_func(buffer, &DSPMem, sizeof(DSPMem));
} }
@@ -386,8 +386,8 @@ extern unsigned int spcPCRam, spcRamDP;
void PrepareSaveState() void PrepareSaveState()
{ {
spcPCRam -= (unsigned int)spcRam; spcPCRam -= (unsigned int)SPCRAM;
spcRamDP -= (unsigned int)spcRam; spcRamDP -= (unsigned int)SPCRAM;
Voice0BufPtr -= spcBuffera; Voice0BufPtr -= spcBuffera;
Voice1BufPtr -= spcBuffera; Voice1BufPtr -= spcBuffera;
@@ -454,8 +454,8 @@ void RestoreSA1()
void ResetState() void ResetState()
{ {
spcPCRam += (unsigned int)spcRam; spcPCRam += (unsigned int)SPCRAM;
spcRamDP += (unsigned int)spcRam; spcRamDP += (unsigned int)SPCRAM;
ResState(Voice0BufPtr); ResState(Voice0BufPtr);
ResState(Voice1BufPtr); ResState(Voice1BufPtr);