Brought back the undesyncability of ZSNES 0.9xx movies! Reset during movies now work.

This commit is contained in:
n-a-c-h
2005-04-04 17:41:27 +00:00
parent d8b3548d33
commit 24dcd1a8c0
2 changed files with 35 additions and 41 deletions

View File

@@ -108,8 +108,8 @@ EXTSYM SfxSFR,nosprincr
EXTSYM cpucycle,debstop,switchtovirqdeb,debstop3,switchtonmideb
EXTSYM NetPlayNoMore,MovieSeekBehind
EXTSYM statefileloc,CHIPBATT,SaveSramData,BackupCVFrame,RestoreCVFrame,loadstate
EXTSYM KeyInsrtChap,KeyNextChap,KeyPrevChap,MovieInsertChapter,MovieSeekAhead,ResetDuringMovie,MovieExitLoop
EXTSYM EMUPauseKey,INCRFrameKey
EXTSYM KeyInsrtChap,KeyNextChap,KeyPrevChap,MovieInsertChapter,MovieSeekAhead,ResetDuringMovie
EXTSYM EMUPauseKey,INCRFrameKey,MovieWaiting
%ifdef __MSDOS__
EXTSYM dssel
@@ -894,16 +894,6 @@ reexecuteb2:
call DeInitPostGame
.skippostgame
cmp byte[MovieExitLoop],1
jne .notmoviereset
mov byte[MovieExitLoop],0
;mov byte[MovieProcessing],0
call GUIDoReset
mov byte[MovieProcessing],1
mov byte[ReturnFromSPCStall],0
jmp continueprog
.notmoviereset
; clear all keys
call Check_Key
cmp al,0
@@ -2003,6 +1993,25 @@ NEWSYM cpuover
cmp byte[EMUPause],1
je .nonewgfx
.noemupause
cmp byte[MovieProcessing],0
je .noprocmovie
pushad
call ProcessMovies
popad
cmp byte[GUIReset],1
jne .notreset
mov byte[MovieWaiting],1
mov eax,[KeyQuickRst]
mov byte[pressed+eax],01h
jnz near exitloop
.notreset
cmp byte[MovieProcessing],0
jne .noprocmovie
cmp byte[ZMVZClose],1
jne .noprocmovie
jmp OSExit
.noprocmovie
call UpdateRewind
@@ -2763,23 +2772,6 @@ NEWSYM cpuover
jmp exitloop
.noquitb
cmp byte[MovieProcessing],0
je .noprocmovie
pushad
call ProcessMovies
popad
cmp byte[MovieProcessing],0
jne .notmoviedone
cmp byte[ZMVZClose],1
jne .notmoviedone
jmp OSExit
.notmoviedone
cmp byte[MovieExitLoop],1
jne .noprocmovie
mov byte[MovieProcessing],0
jmp reexecuteb
.noprocmovie
test byte[INTEnab],1
jz .noresetjoy
mov eax,[JoyAOrig]

View File

@@ -882,14 +882,12 @@ static bool zmv_open(char *filename)
return(false);
}
//If this returns true, the caller should not proccess another input
static bool zmv_replay_command(enum zmv_commands command)
{
switch (command)
{
case zmv_command_reset:
GUIReset = 1;
return(true);
default:
break;
}
return(false);
@@ -942,11 +940,18 @@ static bool zmv_replay()
if (flag & BIT(0)) //Command
{
if (zmv_replay_command(flag >> 1));
unsigned char command = flag >> 1;
if (command == zmv_command_reset)
{
GUIReset = 1;
ReturnFromSPCStall = 0;
return(true);
}
if (zmv_replay_command(command));
{
return(zmv_replay());
}
return(zmv_replay());
return(false);
}
if (flag & BIT(1)) //RLE
@@ -1556,6 +1561,7 @@ static size_t MovieSub_GetDuration()
/////////////////////////////////////////////////////////
bool MovieWaiting = false;
enum MovieStatus { MOVIE_OFF = 0, MOVIE_PLAYBACK, MOVIE_RECORD, MOVIE_OLD_PLAY };
#define SetMovieMode(mode) (MovieProcessing = (unsigned char)mode)
@@ -1805,17 +1811,12 @@ void Replay()
}
}
bool MovieExitLoop = false;
void ProcessMovies()
{
switch (MovieProcessing)
{
case MOVIE_PLAYBACK:
Replay();
if (GUIReset == 1)
{
MovieExitLoop = true;
}
break;
case MOVIE_RECORD:
zmv_record(SloMo50 ? true : false, ComboCounter);
@@ -1841,7 +1842,7 @@ void SkipMovie()
void MovieStop()
{
if (MovieProcessing)
if (MovieProcessing && !MovieWaiting)
{
switch (MovieProcessing)
{
@@ -1870,6 +1871,7 @@ void MovieStop()
SetMovieMode(MOVIE_OFF);
SRAMState = PrevSRAMState;
}
MovieWaiting = false;
}
void MoviePlay()