New reminder text, short jump fixes, port of Rewind to C.

This commit is contained in:
grinvader
2005-01-19 18:49:15 +00:00
parent df7c057d7e
commit 20157f69d3
6 changed files with 333 additions and 245 deletions

View File

@@ -36,9 +36,9 @@ CHIPSOBJ=${CHIPDIR}/sfxproc.o ${CHIPDIR}/fxemu2.o ${CHIPDIR}/dsp1proc.o\
${CHIPDIR}/sdd1emu.o ${CHIPDIR}/sdd1emu.o
CPUOBJ=${CPUDIR}/addrni.o ${CPUDIR}/dma.o ${CPUDIR}/dsp.o ${CPUDIR}/dspproc.o\ CPUOBJ=${CPUDIR}/addrni.o ${CPUDIR}/dma.o ${CPUDIR}/dsp.o ${CPUDIR}/dspproc.o\
${CPUDIR}/execute.o ${CPUDIR}/irq.o ${CPUDIR}/memory.o \ ${CPUDIR}/execute.o ${CPUDIR}/executec.o ${CPUDIR}/irq.o\
${CPUDIR}/spc700.o ${CPUDIR}/stable.o ${CPUDIR}/table.o\ ${CPUDIR}/memory.o ${CPUDIR}/spc700.o ${CPUDIR}/stable.o\
${CPUDIR}/tableb.o ${CPUDIR}/tablec.o ${CPUDIR}/table.o ${CPUDIR}/tableb.o ${CPUDIR}/tablec.o
GUIOBJ=${GUIDIR}/gui.o ${GUIDIR}/menu.o GUIOBJ=${GUIDIR}/gui.o ${GUIDIR}/menu.o
@@ -124,6 +124,7 @@ version.o:version.c
${DOSDIR}/debug.o: ${DOSDIR}/debug.asm macros.mac ${DOSDIR}/debug.o: ${DOSDIR}/debug.asm macros.mac
${CPUDIR}/execute.o: ${CPUDIR}/execute.asm macros.mac ${CPUDIR}/execute.o: ${CPUDIR}/execute.asm macros.mac
${CPUDIR}/executec.o: ${CPUDIR}/executec.c
${CPUDIR}/table.o: ${CPUDIR}/table.asm ${CPUDIR}/65816d.inc\ ${CPUDIR}/table.o: ${CPUDIR}/table.asm ${CPUDIR}/65816d.inc\
${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\ ${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\
${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac\ ${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac\

View File

@@ -120,7 +120,7 @@ EXTSYM SfxSFR,nosprincr
EXTSYM cpucycle,debstop,switchtovirqdeb,debstop3,switchtonmideb EXTSYM cpucycle,debstop,switchtovirqdeb,debstop3,switchtonmideb
EXTSYM NetPlayNoMore EXTSYM NetPlayNoMore
EXTSYM statefileloc EXTSYM statefileloc
EXTSYM CHIPBATT,SaveSramData EXTSYM CHIPBATT,SaveSramData, BackupCVFrame, RestoreCVFrame
%ifdef OPENSPC %ifdef OPENSPC
EXTSYM OSPC_Run, ospc_cycle_frac EXTSYM OSPC_Run, ospc_cycle_frac
@@ -223,6 +223,9 @@ NEWSYM PPContrl3, times 16 dd 0 ; Previous Controller 3 Data
NEWSYM PPContrl4, times 16 dd 0 ; Previous Controller 4 Data NEWSYM PPContrl4, times 16 dd 0 ; Previous Controller 4 Data
NEWSYM PPContrl5, times 16 dd 0 ; Previous Controller 5 Data NEWSYM PPContrl5, times 16 dd 0 ; Previous Controller 5 Data
NEWSYM tempedx, dd 0 NEWSYM tempedx, dd 0
NEWSYM tempesi, dd 0
NEWSYM tempedi, dd 0
NEWSYM tempebp, dd 0
NEWSYM NetSent2, dd 0 NEWSYM NetSent2, dd 0
NEWSYM NetQuitter, dd 0 NEWSYM NetQuitter, dd 0
NEWSYM NetQuit, db 0 NEWSYM NetQuit, db 0
@@ -405,7 +408,7 @@ NEWSYM ProcessRewind
mov byte[pressed+eax],2 mov byte[pressed+eax],2
mov eax,[RewindOldPos] mov eax,[RewindOldPos]
cmp [RewindPos],eax cmp [RewindPos],eax
je .notokay je near .notokay
dec dword[RewindPos] dec dword[RewindPos]
and dword[RewindPos],0Fh and dword[RewindPos],0Fh
mov eax,[RewindOldPos] mov eax,[RewindOldPos]
@@ -417,7 +420,13 @@ NEWSYM ProcessRewind
mov [PBackupPos],eax mov [PBackupPos],eax
push ecx push ecx
push ebx push ebx
pushad
call RestoreCVFrame call RestoreCVFrame
emms
popad
mov esi,[tempesi]
mov edi,[tempedi]
mov ebp,[tempebp]
; Clear Cache Check ; Clear Cache Check
mov ebx,vidmemch2 mov ebx,vidmemch2
mov ecx,4096+4096+4096 mov ecx,4096+4096+4096
@@ -456,11 +465,13 @@ NEWSYM UpdateRewind
mov eax,[RewindPos] mov eax,[RewindPos]
mov [CBackupPos],eax mov [CBackupPos],eax
mov [tempedx],edx mov [tempedx],edx
push ecx mov [tempesi],esi
push ebx mov [tempedi],edi
mov [tempebp],ebp
pushad
call BackupCVFrame call BackupCVFrame
pop ebx emms
pop ecx popad
inc dword[RewindPos] inc dword[RewindPos]
and dword[RewindPos],0Fh and dword[RewindPos],0Fh
mov eax,[RewindOldPos] mov eax,[RewindOldPos]
@@ -521,208 +532,6 @@ NEWSYM RestoreSystemVars
popad popad
ret ret
NEWSYM BackupCVFrame
push edx
push eax
mov ebx,[CBackupPos]
shl ebx,19
add ebx,[StateBackup]
add ebx,1024
BackupCVMacB zsmesg,[PHnum2writecpureg]
BackupCVMac cycpbl,2
BackupCVMacB sndrot,3019
BackupCVMacM [wramdata],8192
BackupCVMacM [vram],4096
cmp byte[spcon],0
je .nospcon
BackupCVMacB spcRam,[PHspcsave]
BackupCVMacM DSPMem,16
.nospcon
cmp byte[C4Enable],1
jne .noc4
BackupCVMac [C4Ram],800h
.noc4
cmp byte[SFXEnable],1
jne .nosfx
BackupCVMacM [sfxramdata],8192
.nosfx
cmp byte[SA1Enable],1
jne near .nossa1
BackupCVMacB SA1Mode,[PHnum2writesa1reg]
BackupCVMacM [SA1RAMArea],8192
BackupCVMacB SA1Status,3
BackupCVMac prevedi,1
BackupCVMac SA1xpc,1
BackupCVMac SA1RAMArea,6
BackupCVMac sa1dmaptr,2
.nossa1
cmp byte[DSP1Type],0
je near .nodsp1type
BackupCVMacB DSP1COp,70+128
BackupCVMacB C4WFXVal,7*4+7*8+128
BackupCVMacB C41FXVal,5*4+128
BackupCVMacB Op00Multiplicand,3*4+128
BackupCVMacB Op10Coefficient,4*4+128
BackupCVMacB Op04Angle,4*4+128
BackupCVMacB Op08X,5*4+128
BackupCVMacB Op18X,5*4+128
BackupCVMacB Op28X,4*4+128
BackupCVMacB Op0CA,5*4+128
BackupCVMacB Op02FX,11*4+3*4+28*8+128
BackupCVMacB Op0AVS,5*4+14*8+128
BackupCVMacB Op06X,6*4+10*8+4+128
BackupCVMacB Op01m,4*4+128
BackupCVMacB Op0DX,6*4+128
BackupCVMacB Op03F,6*4+128
BackupCVMacB Op14Zr,9*4+128
BackupCVMacB Op0EH,4*4+128
.nodsp1type
BackupCVMacB soundcycleft,33
BackupCVMac spc700read,10
BackupCVMac timer2upd,1
BackupCVMac xa,14
BackupCVMacB spcnumread,4
BackupCVMacB spchalted,4
BackupCVMac opcd,6
BackupCVMacB HIRQCycNext,5
BackupCVMac oamaddr,14
BackupCVMacB prevoamptr,1
BackupCVMac ReadHead,1
cmp byte[SETAEnable],1
jne .noseta
BackupCVMacM [setaramdata],256
.noseta
mov edx,[sram]
mov ecx,[ramsize]
shr ecx,4
or ecx,ecx
jz .end
.loop
movq mm0,[edx]
movq mm1,[edx+8]
movq [ebx],mm0
movq [ebx+8],mm1
add edx,16
add ebx,16
dec ecx
jnz .loop
.end
pop eax
pop edx
mov [ebx],esi
mov [ebx+4],edi
mov ecx,[tempedx]
mov [ebx+8],ecx
mov [ebx+12],ebp
emms
ret
NEWSYM RestoreCVFrame
push edx
push eax
mov ebx,[PBackupPos]
shl ebx,19
add ebx,[StateBackup]
add ebx,1024
BackupCVRMacB zsmesg,[PHnum2writecpureg]
BackupCVRMac cycpbl,2
BackupCVRMacB sndrot,3019
BackupCVRMacM [wramdata],8192
BackupCVRMacM [vram],4096
cmp byte[spcon],0
je .nospcon
BackupCVRMacB spcRam,[PHspcsave]
BackupCVRMacM DSPMem,16
.nospcon
cmp byte[C4Enable],1
jne .noc4
BackupCVRMac [C4Ram],800h
.noc4
cmp byte[SFXEnable],1
jne .nosfx
BackupCVRMacM [sfxramdata],8192
.nosfx
cmp byte[SA1Enable],1
jne near .nossa1
BackupCVRMacB SA1Mode,[PHnum2writesa1reg]
BackupCVRMacM [SA1RAMArea],8192
BackupCVRMacB SA1Status,3
BackupCVRMac prevedi,1
BackupCVRMac SA1xpc,1
BackupCVRMac SA1RAMArea,6
BackupCVRMac sa1dmaptr,2
.nossa1
cmp byte[DSP1Type],0
je near .nodsp1type
BackupCVRMacB DSP1COp,70+128
BackupCVRMacB C4WFXVal,7*4+7*8+128
BackupCVRMacB C41FXVal,5*4+128
BackupCVRMacB Op00Multiplicand,3*4+128
BackupCVRMacB Op10Coefficient,4*4+128
BackupCVRMacB Op04Angle,4*4+128
BackupCVRMacB Op08X,5*4+128
BackupCVRMacB Op18X,5*4+128
BackupCVRMacB Op28X,4*4+128
BackupCVRMacB Op0CA,5*4+128
BackupCVRMacB Op02FX,11*4+3*4+28*8+128
BackupCVRMacB Op0AVS,5*4+14*8+128
BackupCVRMacB Op06X,6*4+10*8+4+128
BackupCVRMacB Op01m,4*4+128
BackupCVRMacB Op0DX,6*4+128
BackupCVRMacB Op03F,6*4+128
BackupCVRMacB Op14Zr,9*4+128
BackupCVRMacB Op0EH,4*4+128
.nodsp1type
BackupCVRMacB soundcycleft,33
BackupCVRMac spc700read,10
BackupCVRMac timer2upd,1
BackupCVRMac xa,14
BackupCVRMacB spcnumread,4
BackupCVRMacB spchalted,4
BackupCVRMac opcd,6
BackupCVRMacB HIRQCycNext,5
BackupCVRMac oamaddr,14
BackupCVRMacB prevoamptr,1
BackupCVRMac ReadHead,1
cmp byte[SETAEnable],1
jne .noseta
BackupCVRMacM [setaramdata],256
.noseta
mov edx,[sram]
mov ecx,[ramsize]
shr ecx,4
or ecx,ecx
jz .end
.loop
movq mm0,[ebx]
movq mm1,[ebx+8]
movq [edx],mm0
movq [edx+8],mm1
add edx,16
add ebx,16
dec ecx
jnz .loop
.end
pop eax
pop edx
mov esi,[ebx]
mov edi,[ebx+4]
mov ecx,[ebx+8]
mov [tempedx],ecx
mov ebp,[ebx+12]
call UpdateDPage
call SA1UpdateDPage
emms
ret
SECTION .bss SECTION .bss
NEWSYM MuteVoiceF, resb 0 NEWSYM MuteVoiceF, resb 0
SECTION .text SECTION .text
@@ -1822,6 +1631,7 @@ NEWSYM stateloader
call headerhack call headerhack
call initpitch call initpitch
ret ret
NEWSYM loadstate NEWSYM loadstate
mov byte[pressed+1],0 mov byte[pressed+1],0
mov eax,[KeyLoadState] mov eax,[KeyLoadState]
@@ -2982,13 +2792,19 @@ NEWSYM cpuover
jne near .latencyleft jne near .latencyleft
mov [tempedx],edx mov [tempedx],edx
mov [tempesi],esi
mov [tempedi],edi
mov [tempebp],ebp
push ecx push ecx
push ebx push ebx
%ifndef __MSDOS__ %ifndef __MSDOS__
cmp byte[BackState],1 cmp byte[BackState],1
jne .nobackstate jne .nobackstate
pushad
call BackupCVFrame call BackupCVFrame
emms
popad
.nobackupcvframe .nobackupcvframe
mov ebx,[CBackupPos] mov ebx,[CBackupPos]
inc ebx inc ebx
@@ -3180,7 +2996,13 @@ NEWSYM cpuover
and ebx,0Fh and ebx,0Fh
cmp ebx,[CBackupPos] cmp ebx,[CBackupPos]
je .noquit2 je .noquit2
pushad
call RestoreCVFrame call RestoreCVFrame
emms
popad
mov esi,[tempesi]
mov edi,[tempedi]
mov ebp,[tempebp]
add dword[NetSent],1000 add dword[NetSent],1000
.noquit2 .noquit2
pop edx pop edx
@@ -3197,7 +3019,13 @@ NEWSYM cpuover
and ebx,0Fh and ebx,0Fh
cmp ebx,[CBackupPos] cmp ebx,[CBackupPos]
je .noupdate je .noupdate
pushad
call RestoreCVFrame call RestoreCVFrame
emms
popad
mov esi,[tempesi]
mov edi,[tempedi]
mov ebp,[tempebp]
mov ebx,[PBackupPos] ; ***************** mov ebx,[PBackupPos] ; *****************
inc ebx inc ebx
and ebx,0Fh and ebx,0Fh

251
zsnes/src/cpu/executec.c Executable file
View File

@@ -0,0 +1,251 @@
/*
Copyright (C) 1997-2005 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach )
zsknight@zsnes.com
_demo_@zsnes.com
pagefault@zsnes.com
n-a-c-h@users.sf.net
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef __LINUX__
#include "gblhdr.h"
#define DIR_SLASH "/"
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define DIR_SLASH "\\"
#endif
#define memcpyinc(dest, src, size) memcpy(dest, src, size); dest += size;
#define memcpyrinc(src, dest, size) memcpy(dest, src, size); src += size;
/*Let's start converting stuff from execute.asm ^_^;
Big thanks to Nach and TRAC for helping me out on porting !!*/
extern unsigned int CBackupPos, PHnum2writecpureg, cycpbl;
extern unsigned int *wramdata, *vram, PHspcsave, *C4Ram, *sfxramdata;
extern unsigned int PHnum2writesa1reg, SA1Mode, prevedi, SA1xpc;
extern unsigned int sa1dmaptr, soundcycleft, spc700read, timer2upd, xa;
extern unsigned int spcnumread, spchalted, opcd, HIRQCycNext, oamaddr;
extern unsigned int ReadHead, *setaramdata, ramsize, *sram;
extern unsigned int tempesi, tempedi, tempedx, tempebp;
extern unsigned char *StateBackup, zsmesg[26], sndrot, spcon, spcRam[65472];
extern unsigned char DSPMem[256], C4Enable, SFXEnable, SA1Enable, SA1Status;
extern unsigned char *SA1RAMArea, DSP1Type, DSP1COp, prevoamptr, SETAEnable;
extern short C4WFXVal, C41FXVal, Op00Multiplicand, Op04Angle, Op08X, Op18X;
extern short Op28X, Op0CA, Op02FX, Op0AVS, Op06X, Op01m, Op0DX, Op03F, Op14Zr;
extern short Op0EH;
extern signed short Op10Coefficient;
void BackupCVFrame()
{
unsigned int ramsizew, i;
unsigned char *curpos;
curpos = StateBackup + (CBackupPos << 19) + 1024;
memcpyinc (curpos, zsmesg, PHnum2writecpureg);
memcpyinc (curpos, &cycpbl, 2*4);
memcpyinc (curpos, &sndrot, 3019);
memcpyinc (curpos, wramdata, 8192*16);
memcpyinc (curpos, vram, 4096*16);
if (spcon)
{
memcpyinc (curpos, spcRam, PHspcsave);
memcpyinc (curpos, DSPMem, 16*16);
}
if (C4Enable) { memcpyinc (curpos, C4Ram, 2048*4); }
if (SFXEnable) { memcpyinc (curpos, sfxramdata, 8192*16); }
if (SA1Enable)
{
memcpyinc (curpos, &SA1Mode, PHnum2writesa1reg);
memcpyinc (curpos, SA1RAMArea, 8192*16);
memcpyinc (curpos, &SA1Status, 3);
memcpyinc (curpos, &prevedi, 1*4);
memcpyinc (curpos, &SA1xpc, 1*4);
memcpyinc (curpos, &SA1RAMArea, 6*4);
memcpyinc (curpos, &sa1dmaptr, 2*4);
}
if (DSP1Type)
{
memcpyinc (curpos, &DSP1COp, 70+128);
memcpyinc (curpos, &C4WFXVal, 7*4+7*8+128);
memcpyinc (curpos, &C41FXVal, 5*4+128);
memcpyinc (curpos, &Op00Multiplicand, 3*4+128);
memcpyinc (curpos, &Op10Coefficient, 4*4+128);
memcpyinc (curpos, &Op04Angle, 4*4+128);
memcpyinc (curpos, &Op08X, 5*4+128);
memcpyinc (curpos, &Op18X, 5*4+128);
memcpyinc (curpos, &Op28X, 4*4+128);
memcpyinc (curpos, &Op0CA, 5*4+128);
memcpyinc (curpos, &Op02FX, 11*4+3*4+28*8+128);
memcpyinc (curpos, &Op0AVS, 5*4+14*8+128);
memcpyinc (curpos, &Op06X, 6*4+10*8+4+128);
memcpyinc (curpos, &Op01m, 4*4+128);
memcpyinc (curpos, &Op0DX, 6*4+128);
memcpyinc (curpos, &Op03F, 6*4+128);
memcpyinc (curpos, &Op14Zr, 9*4+128);
memcpyinc (curpos, &Op0EH, 4*4+128);
}
memcpyinc (curpos, &soundcycleft, 33);
memcpyinc (curpos, &spc700read, 10*4);
memcpyinc (curpos, &timer2upd, 1*4);
memcpyinc (curpos, &xa, 14*4);
memcpyinc (curpos, &spcnumread, 4);
memcpyinc (curpos, &spchalted, 4);
memcpyinc (curpos, &opcd, 6*4);
memcpyinc (curpos, &HIRQCycNext, 5);
memcpyinc (curpos, &oamaddr, 14*4);
memcpyinc (curpos, &prevoamptr, 1);
memcpyinc (curpos, &ReadHead, 1*4);
if (SETAEnable) { memcpyinc (curpos, setaramdata, 256*16); }
ramsizew = ramsize >> 4;
for (i = ramsizew ; i>0 ; i--)
{
memcpyinc (curpos, sram, 1*16);
}
memcpyinc (curpos, &tempesi, 4);
memcpyinc (curpos, &tempedi, 4);
memcpyinc (curpos, &tempedx, 4);
memcpyinc (curpos, &tempebp, 4);
}
extern unsigned int Bank0datr8[256], Bank0datr16[256], Bank0datw8[256];
extern unsigned int Bank0datw16[256], xd, DPageR8, DPageR16, DPageW8;
extern unsigned int DPageW16;
void UpdateDPageC()
{
DPageR8 = Bank0datr8[(xd >> 8) & 0xFF];
DPageR16 = Bank0datr16[(xd >> 8) & 0xFF];
DPageW8 = Bank0datw8[(xd >> 8) & 0xFF];
DPageW16 = Bank0datw16[(xd >> 8) & 0xFF];
}
extern unsigned int SA1xd, SA1DPageR8, SA1DPageR16, SA1DPageW8, SA1DPageW16;
void SA1UpdateDPageC()
{
SA1DPageR8 = Bank0datr8[(SA1xd >> 8) & 0xFF];
SA1DPageR16 = Bank0datr16[(SA1xd >> 8) & 0xFF];
SA1DPageW8 = Bank0datw8[(SA1xd >> 8) & 0xFF];
SA1DPageW16 = Bank0datw16[(SA1xd >> 8) & 0xFF];
}
extern unsigned int PBackupPos;
void RestoreCVFrame()
{
unsigned int ramsizew, i;
unsigned char *curpos;
curpos = StateBackup + (PBackupPos << 19) + 1024;
memcpyrinc (curpos, zsmesg, PHnum2writecpureg);
memcpyrinc (curpos, &cycpbl, 2*4);
memcpyrinc (curpos, &sndrot, 3019);
memcpyrinc (curpos, wramdata, 8192*16);
memcpyrinc (curpos, vram, 4096*16);
if (spcon)
{
memcpyrinc (curpos, spcRam, PHspcsave);
memcpyrinc (curpos, DSPMem, 16*16);
}
if (C4Enable) { memcpyrinc (curpos, C4Ram, 2048*4); }
if (SFXEnable) { memcpyrinc (curpos, sfxramdata, 8192*16); }
if (SA1Enable)
{
memcpyrinc (curpos, &SA1Mode, PHnum2writesa1reg);
memcpyrinc (curpos, SA1RAMArea, 8192*16);
memcpyrinc (curpos, &SA1Status, 3);
memcpyrinc (curpos, &prevedi, 1*4);
memcpyrinc (curpos, &SA1xpc, 1*4);
memcpyrinc (curpos, &SA1RAMArea, 6*4);
memcpyrinc (curpos, &sa1dmaptr, 2*4);
}
if (DSP1Type)
{
memcpyrinc (curpos, &DSP1COp, 70+128);
memcpyrinc (curpos, &C4WFXVal, 7*4+7*8+128);
memcpyrinc (curpos, &C41FXVal, 5*4+128);
memcpyrinc (curpos, &Op00Multiplicand, 3*4+128);
memcpyrinc (curpos, &Op10Coefficient, 4*4+128);
memcpyrinc (curpos, &Op04Angle, 4*4+128);
memcpyrinc (curpos, &Op08X, 5*4+128);
memcpyrinc (curpos, &Op18X, 5*4+128);
memcpyrinc (curpos, &Op28X, 4*4+128);
memcpyrinc (curpos, &Op0CA, 5*4+128);
memcpyrinc (curpos, &Op02FX, 11*4+3*4+28*8+128);
memcpyrinc (curpos, &Op0AVS, 5*4+14*8+128);
memcpyrinc (curpos, &Op06X, 6*4+10*8+4+128);
memcpyrinc (curpos, &Op01m, 4*4+128);
memcpyrinc (curpos, &Op0DX, 6*4+128);
memcpyrinc (curpos, &Op03F, 6*4+128);
memcpyrinc (curpos, &Op14Zr, 9*4+128);
memcpyrinc (curpos, &Op0EH, 4*4+128);
}
memcpyrinc (curpos, &soundcycleft, 33);
memcpyrinc (curpos, &spc700read, 10*4);
memcpyrinc (curpos, &timer2upd, 1*4);
memcpyrinc (curpos, &xa, 14*4);
memcpyrinc (curpos, &spcnumread, 4);
memcpyrinc (curpos, &spchalted, 4);
memcpyrinc (curpos, &opcd, 6*4);
memcpyrinc (curpos, &HIRQCycNext, 5);
memcpyrinc (curpos, &oamaddr, 14*4);
memcpyrinc (curpos, &prevoamptr, 1);
memcpyrinc (curpos, &ReadHead, 1*4);
if (SETAEnable) { memcpyrinc (curpos, setaramdata, 256*16); }
ramsizew = ramsize >> 4;
for (i = ramsizew ; i>0 ; i--)
{
memcpyrinc (curpos, sram, 1*16);
}
memcpyrinc (curpos, &tempesi, 4);
memcpyrinc (curpos, &tempedi, 4);
memcpyrinc (curpos, &tempedx, 4);
memcpyrinc (curpos, &tempebp, 4);
UpdateDPageC();
SA1UpdateDPageC();
}

View File

@@ -106,7 +106,7 @@ EXTSYM SaveCombFile
EXTSYM NetSent,valuea EXTSYM NetSent,valuea
EXTSYM welcome EXTSYM welcome
EXTSYM showinfogui EXTSYM showinfogui
EXTSYM BackupCVFrame EXTSYM BackupCVFrame, tempedx, tempesi, tempedi, tempebp
EXTSYM Wait1SecWin,ClearUDPStuff EXTSYM Wait1SecWin,ClearUDPStuff
EXTSYM DisableSUDPPacket,EnableSUDPPacket EXTSYM DisableSUDPPacket,EnableSUDPPacket
EXTSYM BackStateSize EXTSYM BackStateSize
@@ -1948,9 +1948,14 @@ NEWSYM StartGUI
%endif %endif
mov byte[RestoreValues],1 mov byte[RestoreValues],1
mov [tempedx],edx
mov [tempesi],esi
mov [tempedi],edi
mov [tempebp],ebp
pushad pushad
mov dword[CBackupPos],0 mov dword[CBackupPos],0
call BackupCVFrame call BackupCVFrame
emms
popad popad
call DisableSUDPPacket call DisableSUDPPacket
@@ -2338,6 +2343,10 @@ NEWSYM StartGUI
pushad pushad
mov dword[PBackupPos],0 mov dword[PBackupPos],0
call RestoreCVFrame call RestoreCVFrame
mov esi,[tempesi]
mov edi,[tempedi]
mov ebp,[tempebp]
emms
popad popad
.norestoreval .norestoreval
@@ -2611,22 +2620,22 @@ guifirsttimemsg:
GUIBox 43,75,43,163,161 GUIBox 43,75,43,163,161
GUIBox 213,75,213,163,159 GUIBox 213,75,213,163,159
GUIBox 43,163,213,163,158 GUIBox 43,163,213,163,158
GUIOuttext 56,81,guiftimemsg1,220-15 GUIOuttext 52,81,guiftimemsg1,220-15
GUIOuttext 55,80,guiftimemsg1,220 GUIOuttext 51,80,guiftimemsg1,220
GUIOuttext 56,96,guiftimemsg2,220-15 GUIOuttext 52,96,guiftimemsg2,220-15
GUIOuttext 55,95,guiftimemsg2,220 GUIOuttext 51,95,guiftimemsg2,220
GUIOuttext 56,104,guiftimemsg3,220-15 GUIOuttext 52,104,guiftimemsg3,220-15
GUIOuttext 55,103,guiftimemsg3,220 GUIOuttext 51,103,guiftimemsg3,220
GUIOuttext 56,112,guiftimemsg4,220-15 GUIOuttext 52,112,guiftimemsg4,220-15
GUIOuttext 55,111,guiftimemsg4,220 GUIOuttext 51,111,guiftimemsg4,220
GUIOuttext 56,120,guiftimemsg5,220-15 GUIOuttext 52,120,guiftimemsg5,220-15
GUIOuttext 55,119,guiftimemsg5,220 GUIOuttext 51,119,guiftimemsg5,220
GUIOuttext 56,128,guiftimemsg6,220-15 GUIOuttext 52,128,guiftimemsg6,220-15
GUIOuttext 55,127,guiftimemsg6,220 GUIOuttext 51,127,guiftimemsg6,220
GUIOuttext 56,136,guiftimemsg7,220-15 GUIOuttext 52,136,guiftimemsg7,220-15
GUIOuttext 55,135,guiftimemsg7,220 GUIOuttext 51,135,guiftimemsg7,220
GUIOuttext 56,151,guiftimemsg8,220-15 GUIOuttext 52,151,guiftimemsg8,220-15
GUIOuttext 55,150,guiftimemsg8,220 GUIOuttext 51,150,guiftimemsg8,220
call vidpastecopyscr call vidpastecopyscr
call GUIUnBuffer call GUIUnBuffer
call DisplayBoxes call DisplayBoxes
@@ -2653,14 +2662,14 @@ guifirsttimemsg:
ret ret
SECTION .data SECTION .data
guiftimemsg1 db 'ONE TIME USER REMINDER :',0 guiftimemsg1 db ' ONE-TIME USER REMINDER : ',0
guiftimemsg2 db ' PLEASE BE SURE TO READ',0 guiftimemsg2 db ' PLEASE BE SURE TO READ ',0
guiftimemsg3 db ' THE DOCUMENTATION THAT',0 guiftimemsg3 db 'THE DOCUMENTATION INCLUDED',0
guiftimemsg4 db ' COMES WITH ZSNES.',0 guiftimemsg4 db ' WITH ZSNES FOR IMPORTANT',0
guiftimemsg5 db 'MOST COMMON PROBLEMS ARE',0 guiftimemsg5 db ' INFORMATION AND ANSWERS',0
guiftimemsg6 db 'ANSWERED IN THE INCLUDED',0 guiftimemsg6 db ' TO COMMON PROBLEMS',0
guiftimemsg7 db ' DOCUMENTATION.',0 guiftimemsg7 db ' AND QUESTIONS.',0
guiftimemsg8 db 'PUSH SPACEBAR TO PROCEED.',0 guiftimemsg8 db 'PRESS SPACEBAR TO PROCEED.',0
SECTION .text SECTION .text
guimustrestartmsg: guimustrestartmsg:
@@ -5652,5 +5661,3 @@ db 137,176,166,37,192,241,169,84,32,85,112,168,154,7,247,146,183,225,246,173
db 57,103,110,236,113,118,203,200,22,87,251,7,138,37,12,84,221,171,51,209 db 57,103,110,236,113,118,203,200,22,87,251,7,138,37,12,84,221,171,51,209
db 242,37,89,73,151,162,139,189,131,209,221,96,107,144,175,79,199,123,98,138 db 242,37,89,73,151,162,139,189,131,209,221,96,107,144,175,79,199,123,98,138
db 226,86,221,254,72,14,126,180,200,171,85,94,120,124,196,225,150,57,219,158 db 226,86,221,254,72,14,126,180,200,171,85,94,120,124,196,225,150,57,219,158

View File

@@ -6560,7 +6560,7 @@ DisplayGUIAddOns:
call EEMode call EEMode
cmp eax,0 cmp eax,0
je .noEE je near .noEE
GUIOuttextwin2 17,21,18,GUIAddOnText1Alt GUIOuttextwin2 17,21,18,GUIAddOnText1Alt
GUIOuttextwin2 17,21,28,GUIAddOnText2Alt GUIOuttextwin2 17,21,28,GUIAddOnText2Alt
GUIOuttextwin2 17,21,38,GUIAddOnText3Alt GUIOuttextwin2 17,21,38,GUIAddOnText3Alt
@@ -6578,7 +6578,7 @@ DisplayGUIAddOns:
call EEMode call EEMode
cmp eax,0 cmp eax,0
je .noEE2 je near .noEE2
GUIOuttextwin2 17,20,17,GUIAddOnText1Alt GUIOuttextwin2 17,20,17,GUIAddOnText1Alt
GUIOuttextwin2 17,20,27,GUIAddOnText2Alt GUIOuttextwin2 17,20,27,GUIAddOnText2Alt
GUIOuttextwin2 17,20,37,GUIAddOnText3Alt GUIOuttextwin2 17,20,37,GUIAddOnText3Alt
@@ -6626,7 +6626,7 @@ DisplayGUIChipConfig:
call EEMode call EEMode
cmp eax,0 cmp eax,0
je .noEE je near .noEE
GUIOuttextwin2 18,10,38,GUIChipText1Alt GUIOuttextwin2 18,10,38,GUIChipText1Alt
GUIOuttextwin2 18,21,48,GUIChipText2Alt GUIOuttextwin2 18,21,48,GUIChipText2Alt
GUIOuttextwin2 18,71,48,GUIChipText3Alt GUIOuttextwin2 18,71,48,GUIChipText3Alt
@@ -6648,7 +6648,7 @@ DisplayGUIChipConfig:
call EEMode call EEMode
cmp eax,0 cmp eax,0
je .noEE2 je near .noEE2
GUIOuttextwin2 18,9,37,GUIChipText1Alt GUIOuttextwin2 18,9,37,GUIChipText1Alt
GUIOuttextwin2 18,20,47,GUIChipText2Alt GUIOuttextwin2 18,20,47,GUIChipText2Alt
GUIOuttextwin2 18,70,47,GUIChipText3Alt GUIOuttextwin2 18,70,47,GUIChipText3Alt

View File

@@ -111,9 +111,9 @@ CHIPSOBJ=${CHIPDIR}/dsp1emu${OE} ${CHIPDIR}/fxemu2${OE} ${CHIPDIR}/sfxproc${OE}\
${CHIPDIR}/sdd1emu${OE} ${CHIPDIR}/sdd1emu${OE}
CPUOBJ=${CPUDIR}/dma${OE} ${CPUDIR}/dsp${OE} ${CPUDIR}/dspproc${OE}\ CPUOBJ=${CPUDIR}/dma${OE} ${CPUDIR}/dsp${OE} ${CPUDIR}/dspproc${OE}\
${CPUDIR}/execute${OE} ${CPUDIR}/irq${OE} ${CPUDIR}/memory${OE}\ ${CPUDIR}/execute${OE} ${CPUDIR}/executec${OE} ${CPUDIR}/irq${OE}\
${CPUDIR}/spc700${OE} ${CPUDIR}/stable${OE} ${CPUDIR}/table${OE}\ ${CPUDIR}/memory${OE} ${CPUDIR}/spc700${OE} ${CPUDIR}/stable${OE}\
${CPUDIR}/tableb${OE} ${CPUDIR}/tablec${OE} ${CPUDIR}/table${OE} ${CPUDIR}/tableb${OE} ${CPUDIR}/tablec${OE}
GUIOBJ=${GUIDIR}/gui${OE} ${GUIDIR}/menu${OE} GUIOBJ=${GUIDIR}/gui${OE} ${GUIDIR}/menu${OE}
@@ -215,6 +215,7 @@ patch${OE}: $<
endmem${OE}: $< macros.mac endmem${OE}: $< macros.mac
${CPUDIR}/execute${OE}: $< macros.mac ${CPUDIR}/execute${OE}: $< macros.mac
${CPUDIR}/executec${OE}: $<
${CPUDIR}/table${OE}: $< ${CPUDIR}/65816d.inc ${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\ ${CPUDIR}/table${OE}: $< ${CPUDIR}/65816d.inc ${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816.inc\
${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac ${CPUDIR}/regsw.inc macros.mac ${CPUDIR}/regs.mac ${CPUDIR}/regs.inc ${CPUDIR}/regsw.mac ${CPUDIR}/regsw.inc macros.mac
${CPUDIR}/tableb${OE}: $< ${CPUDIR}/65816db.inc ${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816b.inc\ ${CPUDIR}/tableb${OE}: $< ${CPUDIR}/65816db.inc ${CPUDIR}/address.inc ${CPUDIR}/addrni.inc ${CPUDIR}/e65816b.inc\