EmuSpeed setting saved in config file and bound to current code... fastmotion is a bit overpowered. -_-;
This commit is contained in:
@@ -111,7 +111,7 @@ extern unsigned int newengen;
|
||||
extern char SRAMDrive[2];
|
||||
extern unsigned char DontSavePath;
|
||||
extern unsigned char guioff;
|
||||
extern unsigned int frameskip;
|
||||
extern unsigned char frameskip;
|
||||
extern unsigned char enterpress;
|
||||
extern unsigned char cvidmode;
|
||||
extern unsigned char antienab;
|
||||
|
||||
@@ -105,7 +105,7 @@ EXTSYM JoyMaxX209,JoyMinY209,JoyMaxY209,GetCoords,GetCoords3,MultiTap,SFXEnable
|
||||
EXTSYM RestoreSystemVars,GUIBIFIL,GUIHQ2X,GUIHQ3X,GUIHQ4X,firstsaveinc,nssdip1
|
||||
EXTSYM nssdip2,nssdip3,nssdip4,nssdip5,nssdip6,SkipMovie,MovieStop,MoviePlay
|
||||
EXTSYM MovieRecord,MovieInsertChapter,MovieSeekAhead,MovieSeekBehind
|
||||
EXTSYM ResetDuringMovie,MovieDumpRaw,EmuSpeed
|
||||
EXTSYM ResetDuringMovie,MovieDumpRaw
|
||||
|
||||
%ifdef __LINUX__
|
||||
EXTSYM numlockptr
|
||||
@@ -604,6 +604,7 @@ NEWSYM INCRFrameKey, dd 0
|
||||
NEWSYM PauseLoad, db 0
|
||||
NEWSYM PauseRewind, db 0
|
||||
NEWSYM KeyResetSpeed, dd 0
|
||||
NEWSYM EmuSpeed, db 29 ; 29 = 1x, 0 = /30 and 58 = 30x
|
||||
;end NEWSYM end
|
||||
|
||||
GUIsave equ $-GUIRAdd
|
||||
|
||||
@@ -6326,6 +6326,7 @@ DisplayGUISpeed: ;Speed Options
|
||||
|
||||
mov eax,dword[GUIwinposx+21*4] ;Slider
|
||||
mov ebx,dword[GUIwinposy+21*4]
|
||||
add eax,15
|
||||
add ebx,31
|
||||
mov ecx,eax
|
||||
add ecx,116
|
||||
|
||||
@@ -140,7 +140,6 @@ unsigned char *spc7110romptr;
|
||||
unsigned char MusicRelVol = 75;
|
||||
unsigned char MusicVol = 0;
|
||||
unsigned char MMXextSupport = 0;
|
||||
unsigned char EmuSpeed = 29; // 29 = 1x, 0 = /30 and 58 = 30x
|
||||
|
||||
void outofmemory();
|
||||
void init();
|
||||
|
||||
@@ -49,7 +49,7 @@ EXTSYM oamram,objhipr,objptr,objptrn,objsize1,objsize2,spritetablea,sprleftpr
|
||||
EXTSYM sprlefttot,vcache4b,objadds1,objadds2,objmovs1,objmovs2,tltype4b
|
||||
EXTSYM vidmemch4,vram,bgptr,bgptrc,bgptrd,curtileptr,vcache2b,vcache8b,vidmemch8
|
||||
EXTSYM offsetmshl,NextLineCache,tltype2b,tltype8b,objwlrpos,snesinputdefault
|
||||
EXTSYM cycleinputdevice,Change_Dir,LoadDrive,LoadDir
|
||||
EXTSYM cycleinputdevice,Change_Dir,LoadDrive,LoadDir,EmuSpeed
|
||||
|
||||
; Process stuff & Cache sprites
|
||||
|
||||
@@ -303,6 +303,7 @@ NEWSYM cachevideo
|
||||
mov dword[sramb4save],0
|
||||
.nofocussave
|
||||
|
||||
; fast forward goes over all other throttles
|
||||
cmp byte[FastFwdToggle],0
|
||||
jne .ffmode2
|
||||
mov eax,[KeyFastFrwrd]
|
||||
@@ -319,7 +320,7 @@ NEWSYM cachevideo
|
||||
cmp byte[FastForwardLock],1
|
||||
je near .fastfor
|
||||
.ffskip
|
||||
|
||||
; next up, check for slowdown
|
||||
cmp byte[FastFwdToggle],0
|
||||
jne .sdmode2
|
||||
mov eax,[KeySlowDown]
|
||||
@@ -337,13 +338,25 @@ NEWSYM cachevideo
|
||||
je near .slowdwn
|
||||
jmp .sdskip
|
||||
.slowdwn
|
||||
mov byte[SloMo],1 ; hardcoded 50% slowdown
|
||||
jmp .skipnoslowdown
|
||||
mov byte[SloMo],1 ; hardcoded /2 slowdown (for now)
|
||||
jmp .throttleskip
|
||||
.sdskip
|
||||
mov byte[SloMo],0
|
||||
.skipnoslowdown
|
||||
; now we can look at emuspeed
|
||||
cmp byte[EmuSpeed],30 ; 0-28 slow, 29 normal, 30-58 skip
|
||||
jb .noskipping
|
||||
inc byte[frskipper]
|
||||
push ebx
|
||||
mov bl,[EmuSpeed]
|
||||
sub bl,29 ; 30-58 -> 1-29 frames to skip, 2x-30x speed
|
||||
jmp .fastforb
|
||||
.noskipping
|
||||
mov byte[SloMo],29
|
||||
mov al,[EmuSpeed]
|
||||
sub byte[SloMo],al ; 0-29 -> repeat 29-0 times, /30-1x speed
|
||||
.throttleskip
|
||||
mov ax,[SloMo]
|
||||
inc ax ; total times frame is drawn
|
||||
inc ax ; total times frame is drawn
|
||||
|
||||
cmp byte[frameskip],0
|
||||
jne near .frameskip
|
||||
@@ -373,7 +386,7 @@ NEWSYM cachevideo
|
||||
.fastfor
|
||||
inc byte[frskipper]
|
||||
push ebx
|
||||
mov bl,10 ; hardcoded number of frames to skip
|
||||
mov bl,10 ; hardcoded 11x fastforward (for now)
|
||||
jmp .fastforb
|
||||
.frameskip
|
||||
inc byte[frskipper]
|
||||
|
||||
Reference in New Issue
Block a user