Frame-by-frame prev-prev rewind loading made more convenient to use. Panic key now resets emuspeed throttle.

This commit is contained in:
grinvader
2005-08-30 10:42:04 +00:00
parent 60fdcfd30e
commit f8088ce1e8
3 changed files with 20 additions and 27 deletions

View File

@@ -517,17 +517,18 @@ NEWSYM cachevideo
test byte[pressed+eax],1 test byte[pressed+eax],1
je .nodis6 je .nodis6
mov byte[pressed+eax],2 mov byte[pressed+eax],2
mov byte[Voice0Disable],01h mov byte[Voice0Disable],1
mov byte[Voice1Disable],01h mov byte[Voice1Disable],1
mov byte[Voice2Disable],01h mov byte[Voice2Disable],1
mov byte[Voice3Disable],01h mov byte[Voice3Disable],1
mov byte[Voice4Disable],01h mov byte[Voice4Disable],1
mov byte[Voice5Disable],01h mov byte[Voice5Disable],1
mov byte[Voice6Disable],01h mov byte[Voice6Disable],1
mov byte[Voice7Disable],01h mov byte[Voice7Disable],1
mov byte[scrndis],00h mov byte[scrndis],0
mov byte[disableeffects],0 mov byte[disableeffects],0
mov byte[osm2dis],0 mov byte[osm2dis],0
mov byte[EmuSpeed],29
push eax push eax
mov al,[snesinputdefault] mov al,[snesinputdefault]
mov [snesmouse],al mov [snesmouse],al

View File

@@ -47,13 +47,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define mkdir(path) mkdir(path, (S_IRWXU|S_IRWXG|S_IRWXO)) //0777 #define mkdir(path) mkdir(path, (S_IRWXU|S_IRWXG|S_IRWXO)) //0777
#endif #endif
extern unsigned int versionNumber, CRC32, cur_zst_size; extern unsigned int versionNumber, CRC32, cur_zst_size, MsgCount, MessageOn;
extern unsigned int JoyAOrig, JoyBOrig, JoyCOrig, JoyDOrig, JoyEOrig; extern unsigned int JoyAOrig, JoyBOrig, JoyCOrig, JoyDOrig, JoyEOrig;
extern unsigned char pl1contrl, pl2contrl, pl3contrl, pl4contrl, pl5contrl; extern unsigned char pl1contrl, pl2contrl, pl3contrl, pl4contrl, pl5contrl;
extern unsigned int MsgCount, MessageOn;
extern unsigned char MovieStartMethod, GUIReset, ReturnFromSPCStall, GUIQuit; extern unsigned char MovieStartMethod, GUIReset, ReturnFromSPCStall, GUIQuit;
extern unsigned char MovieProcessing; extern unsigned char MovieProcessing, CMovieExt, EmuSpeed;
extern unsigned char CMovieExt;
extern char *Msgptr, fnamest[512]; extern char *Msgptr, fnamest[512];
extern bool romispal; extern bool romispal;
@@ -1431,8 +1429,8 @@ static void zmv_prev_chapter()
} }
//Code to go back before the previous chapter if the previous chapter was loaded recently //Code to go back before the previous chapter if the previous chapter was loaded recently
if (zmv_open_vars.frames_replayed - zmv_open_vars.last_chapter_frame < 150) //2.5 seconds NTSC if ((zmv_open_vars.frames_replayed - zmv_open_vars.last_chapter_frame) < 5*(EmuSpeed+1))
{ { //2.5 seconds NTSC when in 100% speed - altered to make slowmo nicer
size_t pprev = prev-1; size_t pprev = prev-1;
size_t pprev_internal = internal_chapter_lesser(&zmv_vars.internal_chapters, pprev); size_t pprev_internal = internal_chapter_lesser(&zmv_vars.internal_chapters, pprev);
size_t pprev_external = internal_chapter_lesser(&zmv_open_vars.external_chapters, pprev); size_t pprev_external = internal_chapter_lesser(&zmv_open_vars.external_chapters, pprev);
@@ -2396,7 +2394,6 @@ void MoviePlay()
} }
else else
{ {
printf(fnamest+1);
Msgptr = "MOVIE COULD NOT BE OPENED."; Msgptr = "MOVIE COULD NOT BE OPENED.";
MessageOn = MsgCount; MessageOn = MsgCount;
} }

View File

@@ -197,9 +197,7 @@ static void memcpyrinc(unsigned char **src, void *dest, size_t len)
} }
extern unsigned int RewindTimer; extern unsigned int RewindTimer;
extern unsigned char RewindStates; extern unsigned char RewindStates, EMUPause, PauseRewind, EmuSpeed;
extern unsigned char EMUPause, PauseRewind;
unsigned char *StateBackup = 0; unsigned char *StateBackup = 0;
unsigned char AllocatedRewindStates, LatestRewindPos, EarliestRewindPos; unsigned char AllocatedRewindStates, LatestRewindPos, EarliestRewindPos;
@@ -207,8 +205,7 @@ bool RewindPosPassed;
size_t rewind_state_size, cur_zst_size, old_zst_size; size_t rewind_state_size, cur_zst_size, old_zst_size;
extern unsigned char RewindFrames, romispal; extern unsigned char RewindFrames, romispal, MovieProcessing;
extern unsigned char MovieProcessing;
void zmv_rewind_save(size_t, bool); void zmv_rewind_save(size_t, bool);
void zmv_rewind_load(size_t, bool); void zmv_rewind_load(size_t, bool);
@@ -245,7 +242,8 @@ void RestorePauseFrame()
PauseFrameMode = 0; PauseFrameMode = 0;
} }
#define ActualRewindFrames (RewindFrames * (romispal ? 10 : 12)) #define ActualRewindFrames ((EMUPause) ? 1 : (RewindFrames * (romispal ? 10 : 12)))
// emu paused -> save rewind every frame
void BackupCVFrame() void BackupCVFrame()
{ {
@@ -601,7 +599,6 @@ void statesaver()
INSERT_POSITION_NUMBER(txtsavemsg, txtsavenum); INSERT_POSITION_NUMBER(txtsavemsg, txtsavenum);
INSERT_POSITION_NUMBER(txtrrsvmsg, txtrrsvnum); INSERT_POSITION_NUMBER(txtrrsvmsg, txtrrsvnum);
//Save State code //Save State code
#ifdef __UNIXSDL__ #ifdef __UNIXSDL__
SRAMChdir(); SRAMChdir();
@@ -629,7 +626,8 @@ void statesaver()
{ {
switch (fnamest[statefileloc]) switch (fnamest[statefileloc])
{ {
case 't': case 't': // ZST state
case 'v': // ZMV movie
fnamest[statefileloc] = '1'; fnamest[statefileloc] = '1';
break; break;
case '9': case '9':
@@ -863,7 +861,6 @@ void stateloader (char *statename, unsigned char keycheck, unsigned char xferche
INSERT_POSITION_NUMBER(txtnfndmsg, txtnfndnum); INSERT_POSITION_NUMBER(txtnfndmsg, txtnfndnum);
INSERT_POSITION_NUMBER(txtrrldmsg, txtrrldnum); INSERT_POSITION_NUMBER(txtrrldmsg, txtrrldnum);
#ifdef __UNIXSDL__ #ifdef __UNIXSDL__
SRAMChdir(); SRAMChdir();
#endif #endif
@@ -876,7 +873,6 @@ void stateloader (char *statename, unsigned char keycheck, unsigned char xferche
MessageOn = MsgCount; MessageOn = MsgCount;
} }
switch (MovieProcessing) switch (MovieProcessing)
{ {
bool mzt_load(char *, bool); bool mzt_load(char *, bool);
@@ -895,7 +891,6 @@ void stateloader (char *statename, unsigned char keycheck, unsigned char xferche
case 2: case 2:
if (mzt_load(statename, false)) if (mzt_load(statename, false))
{ {
Msgptr = txtrrldmsg; Msgptr = txtrrldmsg;
MessageOn = MsgCount; MessageOn = MsgCount;