Added force NTSC/PAL option to GUI

This commit is contained in:
pagefault
2001-08-11 21:40:19 +00:00
parent 930a947d05
commit dec0eaa0bf
6 changed files with 43 additions and 11 deletions

View File

@@ -584,6 +584,7 @@ NEWSYM DisableScreenSaver, db 0
NEWSYM TrapMouseCursor, db 1
NEWSYM KeyQuickClock, dd 0
NEWSYM KeyQuickMinimize, dd 0
NEWSYM ForceROMTiming, db 0
GUIsave equ $-GUIRAdd
@@ -601,9 +602,9 @@ ModemPTimer dd 0 ; Timer for modem process
ModemOKStat db 0 ; OK is detected on modem status
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
GUIwinposxo dd 0,5 ,60 ,30 ,5 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,20 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,148 ,244 ,8*16,224 ,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
GUIwinsizex dd 0,244 ,126 ,189 ,246 ,170 ,148 ,244 ,8*16,224 ,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,184 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60
GUIwinptr db 0

View File

@@ -872,7 +872,7 @@ GUIOptionKeys:
jne .nogameclock
xor byte[TimerEnable],1
.nogameclock
cmp dh,'T'
cmp dh,'G'
jne .nofastforward
xor byte[FastFwdToggle],1
.nofastforward
@@ -907,6 +907,14 @@ GUIOptionKeys:
call guimustrestartmsg
.noalttimer
%endif
cmp dh,'T'
jne .noforcentsc
GUIkeystoggleoptn byte[ForceROMTiming],1
.noforcentsc
cmp dh,'P'
jne .noforcepal
GUIkeystoggleoptn byte[ForceROMTiming],2
.noforcepal
ret
GUIGUIOptnsKeys:

View File

@@ -327,6 +327,9 @@ GUIloadfilename:
mov [ramsizeand],eax
; get pal/ntsc
mov al,[ForceROMTiming]
mov byte[ForcePal],al
xor al,al
mov al,[esi]
cmp byte[ForcePal],1
jne .nontsc

View File

@@ -2173,6 +2173,8 @@ DisplayGUIOptionClick:
GUIClickCButtonW 11,176,byte[DisableScreenSaver]
GUIClickCButtonat 11,186,byte[AlternateTimer]
%endif
GUIClickCButton6 145,26,byte[ForceROMTiming],1
GUIClickCButton6 145,36,byte[ForceROMTiming],2
; Frameskip = 0
cmp byte[frameskip],0
je near .autopress

View File

@@ -1351,9 +1351,6 @@ DisplayGUIOption:
GUIOuttextwin2u 4,26,31,GUIOptionText2,0
GUIOuttextwin2u 4,26,41,GUIOptionText4,0
; GUIOuttextwin2u 4,26,51,GUIOptionText5,0
%ifdef __WIN32__
GUIOuttextwin2u 4,26,191,GUIOptionTextL,1
%endif
GUIOuttextwin2u 4,26,61,GUIOptionText6,0
GUIOuttextwin2u 4,26,71,GUIOptionText7,0
%ifdef __MSDOS__
@@ -1361,12 +1358,11 @@ DisplayGUIOption:
%endif
%ifdef __WIN32__
GUIOuttextwin2u 4,26,81,GUIOptionTextAb,0
GUIOuttextwin2u 4,26,191,GUIOptionTextL,1
%endif
GUIOuttextwin2u 4,26,91,GUIOptionTextB,0
GUIOuttextwin2u 4,26,101,GUIOptionTextC,2
GUIOuttextwin2u 4,26,111,GUIOptionTextD,12
GUIOuttextwin2u 4,26,121,GUIOptionTextE,0
GUIOuttextwin2u 4,26,121,GUIOptionTextE,2
GUIOuttextwin2u 4,26,131,GUIOptionTextF,1
GUIOuttextwin2u 4,26,141,GUIOptionTextG,0
GUIOuttextwin2u 4,26,151,GUIOptionTextH,9
@@ -1374,7 +1370,10 @@ DisplayGUIOption:
GUIOuttextwin2u 4,26,171,GUIOptionTextJ,0
%ifdef __WIN32__
GUIOuttextwin2u 4,26,181,GUIOptionTextK,1
GUIOuttextwin2u 4,26,191,GUIOptionTextL,1
%endif
GUIOuttextwin2u 4,160,31,GUIOptionTextM,7
GUIOuttextwin2u 4,160,41,GUIOptionTextN,6
add byte[GUItextcolor],15
GUIOuttextwin2 4,5,15,[GUITemp]
GUIOuttextwin2 4,25,30,GUIOptionText2
@@ -1387,7 +1386,6 @@ DisplayGUIOption:
%endif
%ifdef __WIN32__
GUIOuttextwin2 4,25,80,GUIOptionTextAb
GUIOuttextwin2 4,25,190,GUIOptionTextL
%endif
GUIOuttextwin2 4,25,90,GUIOptionTextB
GUIOuttextwin2 4,25,100,GUIOptionTextC
@@ -1400,7 +1398,10 @@ DisplayGUIOption:
GUIOuttextwin2 4,25,170,GUIOptionTextJ
%ifdef __WIN32__
GUIOuttextwin2 4,25,180,GUIOptionTextK
GUIOuttextwin2 4,25,190,GUIOptionTextL
%endif
GUIOuttextwin2 4,159,30,GUIOptionTextM
GUIOuttextwin2 4,159,40,GUIOptionTextN
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[TimerEnable],0
je .nocheckboxt
@@ -1516,6 +1517,18 @@ DisplayGUIOption:
.win323
GUIDisplayIconWin 4,11,186,[GUITemp]
%endif
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[ForceROMTiming],1
jne .nocheckbox15
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox15
GUIDisplayIconWin 4,145,26,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[ForceROMTiming],2
jne .nocheckbox16
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox16
GUIDisplayIconWin 4,145,36,[GUITemp]
cmp byte[frameskip],0
je near .auto
DrawGUIWinBox 4,75,13,93,21,167
@@ -1577,9 +1590,11 @@ GUIOptionTextF db 'SRAM CHECK+SAVE',0
GUIOptionTextG db 'OLD GFX MODE 2',0
GUIOptionTextH db 'START AT LATEST SAVE',0
GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0
GUIOptionTextJ db 'DON',39,'T SAVE CURRENT PATH',0
GUIOptionTextJ db 'DON',39,'T SAVE CUR PATH',0
GUIOptionTextK db 'DISABLE SCREENSAVER',0
GUIOptionTextL db 'USE ALTERNATE TIMER',0
GUIOptionTextM db 'FORCE NTSC ROM',0
GUIOptionTextN db 'FORCE PAL ROM',0
GUIOptionText8 db '-',0
GUIOptionText9 db '+',0
GUIOptionText10 db '-',0

View File

@@ -93,7 +93,7 @@ EXTSYM GUIsmcfind,GUIsfcfind,GUIswcfind,GUIfigfind,GUIfind058,GUIfind078,GUIfind
EXTSYM GUIfindUSA,GUIfindJAP,GUIfindZIP,GUIfind1,DTALoc,GUIfindall
EXTSYM spc7110romptr,allocspc7110
EXTSYM SRAMDir,SRAMDrive,cfgloadsdir,fnamest,statefileloc
EXTSYM ForcePal,InitDir,InitDrive,enterpress,frameskip
EXTSYM ForcePal,ForceROMTiming,InitDir,InitDrive,enterpress,frameskip
EXTSYM gotoroot,headdata,printnum,romispal
EXTSYM InitFxTables,SFXSRAM,SfxR1,SfxR2,SfxSCMR,SfxSFR,finterleave
EXTSYM initregr,initregw,memtabler16,DSP1Read16b3F,memaccessbankr16
@@ -5274,6 +5274,9 @@ NEWSYM showinfo
mov edx,.kilobit
mov ah,9
call Output_Text
mov al,[ForceROMTiming]
mov byte[ForcePal],al
xor al,al
mov al,[esi]
cmp byte[ForcePal],1
jne .nontsc