Half seconds per rewind now works.

This commit is contained in:
n-a-c-h
2005-02-14 10:30:02 +00:00
parent 414693f2aa
commit 66b48c9a6d
3 changed files with 7 additions and 4 deletions

View File

@@ -356,7 +356,6 @@ NEWSYM ProcessRewind
inc dword[RewindPos] inc dword[RewindPos]
and dword[RewindPos],0Fh and dword[RewindPos],0Fh
mov edx,[tempedx] mov edx,[tempedx]
mov dword[RewindTimer],60*3
.notokay .notokay
ret ret
.notokay2 .notokay2
@@ -395,7 +394,6 @@ NEWSYM UpdateRewind
inc dword[RewindOldPos] inc dword[RewindOldPos]
and dword[RewindOldPos],0Fh and dword[RewindOldPos],0Fh
.noteq .noteq
mov dword[RewindTimer],60*3
pop eax pop eax
%endif %endif
ret ret

View File

@@ -283,12 +283,16 @@ void SetupRewindBuffer()
*/ */
extern unsigned int CBackupPos, PBackupPos, RewindPos, RewindOldPos; extern unsigned int CBackupPos, PBackupPos, RewindPos, RewindOldPos;
extern unsigned char RewindFrames, romispal;
#define ActualRewindFrames (RewindFrames * (romispal ? 25 : 30))
void BackupCVFrame() void BackupCVFrame()
{ {
unsigned char *RewindBufferPos = StateBackup + CBackupPos*rewind_state_size; unsigned char *RewindBufferPos = StateBackup + CBackupPos*rewind_state_size;
//printf("Backing up rewind in slot #%u\n", CBackupPos); //printf("Backing up rewind in slot #%u\n", CBackupPos);
copy_state_data(RewindBufferPos, memcpyinc, false); copy_state_data(RewindBufferPos, memcpyinc, false);
RewindTimer = ActualRewindFrames;
} }
void RestoreCVFrame() void RestoreCVFrame()
@@ -296,6 +300,7 @@ void RestoreCVFrame()
unsigned char *RewindBufferPos = StateBackup + PBackupPos*rewind_state_size; unsigned char *RewindBufferPos = StateBackup + PBackupPos*rewind_state_size;
//printf("Restoring rewind in slot #%u\n", PBackupPos); //printf("Restoring rewind in slot #%u\n", PBackupPos);
copy_state_data(RewindBufferPos, memcpyrinc, true); copy_state_data(RewindBufferPos, memcpyrinc, true);
RewindTimer = ActualRewindFrames;
} }
void SetupRewindBuffer() void SetupRewindBuffer()
@@ -325,7 +330,7 @@ void InitRewindVars()
RewindPos = 0; RewindPos = 0;
RewindOldPos = 0; RewindOldPos = 0;
//RewindEarliestPos = 0; //RewindEarliestPos = 0;
RewindTimer = 60*4; RewindTimer = ActualRewindFrames;
#endif #endif
} }

View File

@@ -644,7 +644,7 @@ NEWSYM RomInfo, db 1
NEWSYM SRAMState, db 0 NEWSYM SRAMState, db 0
NEWSYM RewindStates, db 16 NEWSYM RewindStates, db 16
NEWSYM PrimaryBuffer, db 0 NEWSYM PrimaryBuffer, db 0
NEWSYM RewindFrames, db 1 NEWSYM RewindFrames, db 6
GUIsave equ $-GUIRAdd GUIsave equ $-GUIRAdd
section .bss section .bss