commented and formatted the code for the Chip Optns, Sound Optns, and Save Optns.

This commit is contained in:
ipher
2005-05-11 13:37:04 +00:00
parent 89a510a977
commit 89244cb92a

View File

@@ -2378,86 +2378,98 @@ SECTION .text
DisplayGUISound:
; Enable Sound/Sampling Rate/Stereo/Sound Buffering/Volume
GUIDrawWindowBox 6,GUISoundDisp
mov byte[GUItextcolor],217
;Text Display
mov byte[GUItextcolor],217 ; Shadows
cmp byte[GUIWincoladd],0
je .zero
mov byte[GUItextcolor],211
.zero
sub byte[GUItextcolor],15
; E = Enable Sound, S = Stereo Sound, B = Sound Buffering
; R = Sample Rate
GUIOuttextwin2u 6,26,26,GUISoundText1,0
GUIOuttextwin2u 6,26,35,GUISoundText3,0
GUIOuttextwin2u 6,26,26,GUISoundTextA1,0
GUIOuttextwin2u 6,26,35,GUISoundTextA2,0
%ifdef __MSDOS__
GUIOuttextwin2u 6,116,26,GUISoundText1b,0
GUIOuttextwin2u 6,26,44,GUISoundText2b,1
GUIOuttextwin2u 6,26,44,GUISoundTextA3,1
GUIOuttextwin2u 6,116,26,GUISoundTextA4,0
%endif
%ifdef __WIN32__
GUIOuttextwin2u 6,26,106,GUISoundTextE,4
GUIOuttextwin2u 6,26,106,GUISoundTextD1,4
%endif
GUIOuttextwin2u 6,26,116,GUISoundTextH,2
GUIOuttextwin2u 6,26,126,GUISoundTextI,1
GUIOuttextwin2u 6,26,136,GUISoundTextJ,6
GUIOuttextwin2u 6,26,146,GUISoundTextK,0
GUIOuttextwin2u 6,26,168,GUISoundTextQ,0
GUIOuttextwin2u 6,26,178,GUISoundTextR,0
GUIOuttextwin2u 6,26,116,GUISoundTextD2,2
GUIOuttextwin2u 6,26,126,GUISoundTextD3,1
GUIOuttextwin2u 6,26,136,GUISoundTextD4,6
GUIOuttextwin2u 6,26,146,GUISoundTextD5,0
GUIOuttextwin2u 6,26,168,GUISoundTextE1,0
GUIOuttextwin2u 6,26,178,GUISoundTextE2,0
%ifndef __MSDOS__
GUIOuttextwin2u 6,26,188,GUISoundTextS,0
GUIOuttextwin2u 6,26,188,GUISoundTextE3,0
%endif
GUIOuttextwin2u 6,126,168,GUISoundTextU,1
GUIOuttextwin2u 6,126,178,GUISoundTextV,1
GUIOuttextwin2u 6,126,168,GUISoundTextF1,1
GUIOuttextwin2u 6,126,178,GUISoundTextF2,1
%ifndef __MSDOS__
GUIOuttextwin2u 6,126,188,GUISoundTextW,0
GUIOuttextwin2u 6,126,188,GUISoundTextF3,0
%endif
add byte[GUItextcolor],15
GUIOuttextwin2 6,25,25,GUISoundText1
GUIOuttextwin2 6,25,34,GUISoundText3
add byte[GUItextcolor],15 ;Text
GUIOuttextwin2 6,25,25,GUISoundTextA1
GUIOuttextwin2 6,25,34,GUISoundTextA2
%ifdef __MSDOS__
GUIOuttextwin2 6,115,25,GUISoundText1b
GUIOuttextwin2 6,25,43,GUISoundText2b
GUIOuttextwin2 6,25,43,GUISoundTextA3
GUIOuttextwin2 6,115,25,GUISoundTextA4
%endif
%ifdef __WIN32__
GUIOuttextwin2 6,25,105,GUISoundTextE
GUIOuttextwin2 6,25,105,GUISoundTextD1
%endif
GUIOuttextwin2 6,25,115,GUISoundTextH
GUIOuttextwin2 6,25,125,GUISoundTextI
GUIOuttextwin2 6,25,135,GUISoundTextJ
GUIOuttextwin2 6,25,145,GUISoundTextK
GUIOuttextwin2 6,25,167,GUISoundTextQ
GUIOuttextwin2 6,25,177,GUISoundTextR
GUIOuttextwin2 6,25,115,GUISoundTextD2
GUIOuttextwin2 6,25,125,GUISoundTextD3
GUIOuttextwin2 6,25,135,GUISoundTextD4
GUIOuttextwin2 6,25,145,GUISoundTextD5
GUIOuttextwin2 6,25,167,GUISoundTextE1
GUIOuttextwin2 6,25,177,GUISoundTextE2
%ifndef __MSDOS__
GUIOuttextwin2 6,25,187,GUISoundTextS
GUIOuttextwin2 6,25,187,GUISoundTextE3
%endif
GUIOuttextwin2 6,125,167,GUISoundTextU
GUIOuttextwin2 6,125,177,GUISoundTextV
GUIOuttextwin2 6,125,167,GUISoundTextF1
GUIOuttextwin2 6,125,177,GUISoundTextF2
%ifndef __MSDOS__
GUIOuttextwin2 6,125,187,GUISoundTextW
GUIOuttextwin2 6,125,187,GUISoundTextF3
%endif
mov al,[GUIWincol]
mov al,[GUIWincol] ;Yellow Shadow
mov byte[GUItextcolor],al
GUIOuttextwin2 6,6,16,GUISoundText6
GUIOuttextwin2u 6,6,53,GUISoundText2,9
GUIOuttextwin2 6,6,76,GUISoundText5
GUIOuttextwin2 6,6,158,GUISoundTextP
GUIOuttextwin2 6,106,158,GUISoundTextT
mov byte[GUItextcolor],163
GUIOuttextwin2 6,6,16,GUISoundTextA
GUIOuttextwin2u 6,6,53,GUISoundTextB,9
GUIOuttextwin2 6,6,76,GUISoundTextC
GUIOuttextwin2 6,6,158,GUISoundTextE
GUIOuttextwin2 6,106,158,GUISoundTextF
mov byte[GUItextcolor],163 ;Yellow Text
cmp byte[GUIWincoladd],0
je .zero3
mov byte[GUItextcolor],164
.zero3
GUIOuttextwin2 6,5,15,GUISoundText6
GUIOuttextwin2 6,5,52,GUISoundText2
GUIOuttextwin2 6,5,75,GUISoundText5
GUIOuttextwin2 6,5,157,GUISoundTextP
GUIOuttextwin2 6,105,157,GUISoundTextT
GUIOuttextwin2 6,5,15,GUISoundTextA
GUIOuttextwin2 6,5,52,GUISoundTextB
GUIOuttextwin2 6,5,75,GUISoundTextC
GUIOuttextwin2 6,5,157,GUISoundTextE
GUIOuttextwin2 6,105,157,GUISoundTextF
;Checkboxes
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[cfgsoundon],0
je .nocheckbox
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox
GUIDisplayIconWin 6,11,21,[GUITemp]
%ifdef __MSDOS__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[cfgforce8b],0
@@ -2466,12 +2478,14 @@ DisplayGUISound:
.nocheckbox0
GUIDisplayIconWin 6,102,21,[GUITemp]
%endif
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[cfgStereoSound],0
je .nocheckbox1
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox1
GUIDisplayIconWin 6,11,30,[GUITemp]
%ifdef __MSDOS__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[RaisePitch],0
@@ -2480,42 +2494,49 @@ DisplayGUISound:
.nocheckbox1b
GUIDisplayIconWin 6,11,39,[GUITemp]
%endif
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[RevStereo],0
je .nocheckbox3
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox3
GUIDisplayIconWin 6,11,111,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[Surround],0
je .nocheckbox4
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox4
GUIDisplayIconWin 6,11,121,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SoundBufEn],0
je .nocheckbox5
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox5
GUIDisplayIconWin 6,11,131,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SPCDisable],0
je .nocheckbox6
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox6
GUIDisplayIconWin 6,11,141,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SoundInterpType],1
jne .nocheckbox7
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox7
GUIDisplayIconWin 6,11,163,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SoundInterpType],2
jne .nocheckbox8
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox8
GUIDisplayIconWin 6,11,173,[GUITemp]
%ifndef __MSDOS__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SoundInterpType],3
@@ -2524,18 +2545,21 @@ DisplayGUISound:
.nocheckbox9
GUIDisplayIconWin 6,11,183,[GUITemp]
%endif
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[LowPassFilterType],1
jne .nocheckbox10
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox10
GUIDisplayIconWin 6,111,163,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[LowPassFilterType],2
jne .nocheckbox11
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox11
GUIDisplayIconWin 6,111,173,[GUITemp]
%ifndef __MSDOS__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[LowPassFilterType],3
@@ -2544,6 +2568,7 @@ DisplayGUISound:
.nocheckbox12
GUIDisplayIconWin 6,111,183,[GUITemp]
%endif
%ifdef __WIN32__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[PrimaryBuffer],0
@@ -2553,7 +2578,19 @@ DisplayGUISound:
GUIDisplayIconWin 6,11,101,[GUITemp]
%endif
; Draw borders
;Sampling Rate Box
DrawGUIWinBox 6,15,61,69,69,167
mov dword[GUITemp],GUISoundTextB1
xor eax,eax
mov al,[cfgSoundQuality]
shl eax,3
add [GUITemp],eax
mov byte[GUItextcolor],223
GUIOuttextwin2 6,23,64,[GUITemp]
; Draw borders
mov dword[GUIWincol],148+10
cmp byte[cwindrawn],1
jne .noone3
@@ -2574,16 +2611,9 @@ DisplayGUISound:
mov dl,[GUIWincol]
add dl,3
DrawGUIWinBox 6,71,61,70,69,dl ;right
; End draw borders
DrawGUIWinBox 6,15,61,69,69,167
mov dword[GUITemp],GUISoundText7
xor eax,eax
mov al,[cfgSoundQuality]
shl eax,3
add [GUITemp],eax
mov byte[GUItextcolor],223
GUIOuttextwin2 6,23,64,[GUITemp]
; Volume Level Slider
mov byte[GUItextcolor],221
cmp byte[GUIWincoladd],0
je .zero4
@@ -2609,9 +2639,9 @@ DisplayGUISound:
mov dword[GUITemp],11
add [GUITemp],eax
GUIDisplayIconWin 6,[GUITemp],87,GUIIconDataSlideBar
mov dword[GUISoundTextD],' '
mov byte[GUISoundTextD+3],'%'
mov esi,GUISoundTextD+2
mov dword[GUISoundTextC1],' '
mov byte[GUISoundTextC1+3],'%'
mov esi,GUISoundTextC1+2
xor eax,eax
mov al,[MusicRelVol]
mov ebx,10
@@ -2645,35 +2675,40 @@ DisplayGUISound:
ret
SECTION .data
GUISoundText1 db 'ENABLE SOUND',0
GUISoundText1b db 'FORCE 8-BIT',0
GUISoundText2 db 'SAMPLING RATE :',0
GUISoundText2b db 'RAISE PITCH LEVEL',0
GUISoundText3 db 'STEREO SOUND',0
GUISoundText4 db '',0
GUISoundText5 db 'VOLUME LEVEL :',0
GUISoundText6 db 'SOUND SWITCHES :',0
GUISoundText7 db ' 8000HZ',0
GUISoundText8 db '11025HZ',0
GUISoundText9 db '22050HZ',0
GUISoundTextA db '44100HZ',0
GUISoundTextB db '16000HZ',0
GUISoundTextC db '32000HZ',0
GUISoundTextCb db '48000HZ',0
GUISoundTextD db '---%',0
GUISoundTextE db 'USE PRIMARY BUFFER',0
GUISoundTextH db 'REVERSE STEREO',0
GUISoundTextI db 'SURROUND SOUND',0
GUISoundTextJ db 'SOUND BUFFERING',0
GUISoundTextK db 'DISABLE SPC EMULATION',0
GUISoundTextP db 'INTERPOLATION :',0
GUISoundTextQ db 'GAUSSIAN',0
GUISoundTextR db 'CUBIC SPLINE',0
GUISoundTextS db '8-POINT',0
GUISoundTextT db 'LOWPASS :',0
GUISoundTextU db 'SIMPLE',0
GUISoundTextV db 'DYNAMIC',0
GUISoundTextW db 'HI QUALITY',0
GUISoundTextA db 'SOUND SWITCHES :',0
GUISoundTextA1 db 'ENABLE SOUND',0
GUISoundTextA2 db 'STEREO SOUND',0
GUISoundTextA3 db 'RAISE PITCH LEVEL',0 ; DOS Only
GUISoundTextA4 db 'FORCE 8-BIT',0 ; DOS Only
GUISoundTextB db 'SAMPLING RATE :',0
GUISoundTextB1 db ' 8000HZ',0
GUISoundTextB2 db '11025HZ',0
GUISoundTextB3 db '22050HZ',0
GUISoundTextB4 db '44100HZ',0
GUISoundTextB5 db '16000HZ',0
GUISoundTextB6 db '32000HZ',0
GUISoundTextB7 db '48000HZ',0
GUISoundTextC db 'VOLUME LEVEL :',0
GUISoundTextC1 db '---%',0
GUISoundTextD1 db 'USE PRIMARY BUFFER',0 ; Win Only
GUISoundTextD2 db 'REVERSE STEREO',0
GUISoundTextD3 db 'SURROUND SOUND',0
GUISoundTextD4 db 'SOUND BUFFERING',0
GUISoundTextD5 db 'DISABLE SPC EMULATION',0
GUISoundTextE db 'INTERPOLATION :',0
GUISoundTextE1 db 'GAUSSIAN',0
GUISoundTextE2 db 'CUBIC SPLINE',0
GUISoundTextE3 db '8-POINT',0 ; Non-DOS Only
GUISoundTextF db 'LOWPASS :',0
GUISoundTextF1 db 'SIMPLE',0
GUISoundTextF2 db 'DYNAMIC',0
GUISoundTextF3 db 'HI QUALITY',0 ; Non-DOS Only
SECTION .text
@@ -5510,14 +5545,16 @@ SECTION .text
DisplayGUIChipConfig:
GUIDrawWindowBox 18,GUIChipConfigDisp
mov byte[GUItextcolor],217
;Text Display
mov byte[GUItextcolor],217 ;Shadow
cmp byte[GUIWincoladd],0
je .zero
mov byte[GUItextcolor],211
.zero
sub byte[GUItextcolor],15
call EEMode
call EEMode ; You know it!
cmp eax,0
je near .noEE
GUIOuttextwin2 18,10,38,GUIChipText1Alt
@@ -5528,20 +5565,19 @@ DisplayGUIChipConfig:
GUIOuttextwin2 18,71,58,GUIChipText6Alt
GUIOuttextwin2 18,121,58,GUIChipText7Alt
jmp .endEE
.noEE
GUIOuttextwin2 18,10,38,GUIChipText1
GUIOuttextwin2u 18,21,48,GUIChipText2,4
GUIOuttextwin2u 18,71,48,GUIChipText3,4
GUIOuttextwin2u 18,121,48,GUIChipText4,4
GUIOuttextwin2u 18,21,58,GUIChipText5,4
GUIOuttextwin2u 18,71,58,GUIChipText6,4
GUIOuttextwin2u 18,121,58,GUIChipText7,4
.noEE ; Regular Window Shadow
GUIOuttextwin2u 18,21,48,GUIChipTextA1,4
GUIOuttextwin2u 18,71,48,GUIChipTextA2,4
GUIOuttextwin2u 18,121,48,GUIChipTextA3,4
GUIOuttextwin2u 18,21,58,GUIChipTextA4,4
GUIOuttextwin2u 18,71,58,GUIChipTextA5,4
GUIOuttextwin2u 18,121,58,GUIChipTextA6,4
.endEE
add byte[GUItextcolor],15
add byte[GUItextcolor],15 ; Text
call EEMode
cmp eax,0
je near .noEE2
je near .noEE2 ; You know it!
GUIOuttextwin2 18,9,37,GUIChipText1Alt
GUIOuttextwin2 18,20,47,GUIChipText2Alt
GUIOuttextwin2 18,70,47,GUIChipText3Alt
@@ -5550,46 +5586,73 @@ DisplayGUIChipConfig:
GUIOuttextwin2 18,70,57,GUIChipText6Alt
GUIOuttextwin2 18,120,57,GUIChipText7Alt
jmp .endEE2
.noEE2
GUIOuttextwin2 18,9,37,GUIChipText1
GUIOuttextwin2 18,20,47,GUIChipText2
GUIOuttextwin2 18,70,47,GUIChipText3
GUIOuttextwin2 18,120,47,GUIChipText4
GUIOuttextwin2 18,20,57,GUIChipText5
GUIOuttextwin2 18,70,57,GUIChipText6
GUIOuttextwin2 18,120,57,GUIChipText7
.noEE2 ; Regular Window Text
GUIOuttextwin2 18,20,47,GUIChipTextA1
GUIOuttextwin2 18,70,47,GUIChipTextA2
GUIOuttextwin2 18,120,47,GUIChipTextA3
GUIOuttextwin2 18,20,57,GUIChipTextA4
GUIOuttextwin2 18,70,57,GUIChipTextA5
GUIOuttextwin2 18,120,57,GUIChipTextA6
mov al,[GUIWincol] ;Yellow Shadow
mov [GUIGameOptnsColA],al
mov byte[GUIGameOptnsColB],202
cmp byte[GUIWincoladd],0
je .zero3
mov byte[GUIGameOptnsColB],196
.zero3
mov al,byte[GUIGameOptnsColA]
mov byte[GUItextcolor],al
GUIOuttextwin2 18,10,38,GUIChipTextA
mov byte[GUIGameOptnsColA],163 ;Yellow Text
mov byte[GUIGameOptnsColB],217
cmp byte[GUIWincoladd],0
je .zero8
mov byte[GUIGameOptnsColA],164
mov byte[GUIGameOptnsColB],211
.zero8
mov al,byte[GUIGameOptnsColA]
mov byte[GUItextcolor],al
GUIOuttextwin2 18,9,37,GUIChipTextA
.endEE2
;Checkboxes
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[nssdip1],0
je .nodip1
mov dword[GUITemp],GUIIconDataCheckBoxC
.nodip1
GUIDisplayIconWin 18,9,43,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[nssdip2],0
je .nodip2
mov dword[GUITemp],GUIIconDataCheckBoxC
.nodip2
GUIDisplayIconWin 18,59,43,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[nssdip3],0
je .nodip3
mov dword[GUITemp],GUIIconDataCheckBoxC
.nodip3
GUIDisplayIconWin 18,109,43,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[nssdip4],0
je .nodip4
mov dword[GUITemp],GUIIconDataCheckBoxC
.nodip4
GUIDisplayIconWin 18,9,53,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[nssdip5],0
je .nodip5
mov dword[GUITemp],GUIIconDataCheckBoxC
.nodip5
GUIDisplayIconWin 18,59,53,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[nssdip6],0
je .nodip6
@@ -5599,13 +5662,13 @@ DisplayGUIChipConfig:
ret
SECTION .data
GUIChipText1 db 'SUPER SYSTEM',0
GUIChipText2 db 'DIP 1',0
GUIChipText3 db 'DIP 2',0
GUIChipText4 db 'DIP 3',0
GUIChipText5 db 'DIP 4',0
GUIChipText6 db 'DIP 5',0
GUIChipText7 db 'DIP 6',0
GUIChipTextA db 'SUPER SYSTEM :',0
GUIChipTextA1 db 'DIP 1',0
GUIChipTextA2 db 'DIP 2',0
GUIChipTextA3 db 'DIP 3',0
GUIChipTextA4 db 'DIP 4',0
GUIChipTextA5 db 'DIP 5',0
GUIChipTextA6 db 'DIP 6',0
;EE
GUIChipText1Alt db 69,88,84,82,65,83,0
@@ -5890,95 +5953,101 @@ NEWSYM GUIBlinkCursor, times 2 db 0
DisplayGUISave:
GUIDrawWindowBox 20,GUISaveDisp
mov byte[GUItextcolor],217
;Text Display
mov byte[GUItextcolor],217 ;Shadow
cmp byte[GUIWincoladd],0
je .zero
mov byte[GUItextcolor],211
.zero
sub byte[GUItextcolor],15
GUIOuttextwin2 20,8,19,GUISaveText6
GUIOuttextwin2 20,8,31,GUISaveText7
GUIOuttextwin2u 20,26,44,GUISaveText1,5
GUIOuttextwin2u 20,26,54,GUISaveText2,5
GUIOuttextwin2u 20,26,64,GUISaveText3,0
GUIOuttextwin2u 20,26,74,GUISaveText4,0
GUIOuttextwin2u 20,26,84,GUISaveText5,0
GUIOuttextwin2u 20,26,94,GUISaveTextG,0
GUIOuttextwin2u 20,26,104,GUISaveTextH,12
GUIOuttextwin2 20,8,19,GUISaveTextA1
GUIOuttextwin2 20,8,31,GUISaveTextA2
add byte[GUItextcolor],15
GUIOuttextwin2 20,7,18,GUISaveText6
GUIOuttextwin2 20,7,30,GUISaveText7
GUIOuttextwin2 20,25,43,GUISaveText1
GUIOuttextwin2 20,25,53,GUISaveText2
GUIOuttextwin2 20,25,63,GUISaveText3
GUIOuttextwin2 20,25,73,GUISaveText4
GUIOuttextwin2 20,25,83,GUISaveText5
GUIOuttextwin2 20,25,93,GUISaveTextG
GUIOuttextwin2 20,25,103,GUISaveTextH
GUIOuttextwin2u 20,26,44,GUISaveTextB1,5
GUIOuttextwin2u 20,26,54,GUISaveTextB2,5
GUIOuttextwin2u 20,26,64,GUISaveTextB3,0
GUIOuttextwin2u 20,26,74,GUISaveTextB4,0
GUIOuttextwin2u 20,26,84,GUISaveTextB5,0
GUIOuttextwin2u 20,26,94,GUISaveTextB6,0
GUIOuttextwin2u 20,26,104,GUISaveTextB7,12
mov byte[GUItextcolor],217
cmp byte[GUIWincoladd],0
je .zero1
mov byte[GUItextcolor],211
.zero1
sub byte[GUItextcolor],15
mov byte[GUISaveText8+2],'0'
GUIOuttextwin2 20,9,123,GUISaveText8
mov byte[GUISaveText8+2],'1'
GUIOuttextwin2 20,9+45,123,GUISaveText8
mov byte[GUISaveText8+2],'2'
GUIOuttextwin2 20,9+45*2,123,GUISaveText8
mov byte[GUISaveText8+2],'3'
GUIOuttextwin2 20,9+45*3,123,GUISaveText8
mov byte[GUISaveText8+2],'4'
GUIOuttextwin2 20,9,132,GUISaveText8
mov byte[GUISaveText8+2],'5'
GUIOuttextwin2 20,9+45,132,GUISaveText8
mov byte[GUISaveText8+2],'6'
GUIOuttextwin2 20,9+45*2,132,GUISaveText8
mov byte[GUISaveText8+2],'7'
GUIOuttextwin2 20,9+45*3,132,GUISaveText8
mov byte[GUISaveText8+2],'8'
GUIOuttextwin2 20,9,141,GUISaveText8
mov byte[GUISaveText8+2],'9'
GUIOuttextwin2 20,9+45,141,GUISaveText8
GUIOuttextwin2 20,9+45*2,141,GUISaveTextC
GUIOuttextwin2 20,9+45*3,141,GUISaveTextD
GUIOuttextwin2 20,9,150,GUISaveText9
GUIOuttextwin2 20,9+57,150,GUISaveTextA
GUIOuttextwin2 20,9+114,150,GUISaveTextB
GUIOuttextwin2 20,9,159,GUISaveTextF
GUIOuttextwin2 20,9+45*3,141,GUISaveTextC4
GUIOuttextwin2 20,9,150,GUISaveTextC5
GUIOuttextwin2 20,9+57,150,GUISaveTextC6
GUIOuttextwin2 20,9+114,150,GUISaveTextC7
GUIOuttextwin2 20,9,159,GUISaveTextC8
add byte[GUItextcolor],15
mov byte[GUISaveText8+2],'0'
GUIOuttextwin2 20,8,122,GUISaveText8
mov byte[GUISaveText8+2],'1'
GUIOuttextwin2 20,8+45,122,GUISaveText8
mov byte[GUISaveText8+2],'2'
GUIOuttextwin2 20,8+45*2,122,GUISaveText8
mov byte[GUISaveText8+2],'3'
GUIOuttextwin2 20,8+45*3,122,GUISaveText8
mov byte[GUISaveText8+2],'4'
GUIOuttextwin2 20,8,131,GUISaveText8
mov byte[GUISaveText8+2],'5'
GUIOuttextwin2 20,8+45,131,GUISaveText8
mov byte[GUISaveText8+2],'6'
GUIOuttextwin2 20,8+45*2,131,GUISaveText8
mov byte[GUISaveText8+2],'7'
GUIOuttextwin2 20,8+45*3,131,GUISaveText8
mov byte[GUISaveText8+2],'8'
GUIOuttextwin2 20,8,140,GUISaveText8
mov byte[GUISaveText8+2],'9'
GUIOuttextwin2 20,8+45,140,GUISaveText8
GUIOuttextwin2 20,8+45*2,140,GUISaveTextC
GUIOuttextwin2 20,8+45*3,140,GUISaveTextD
GUIOuttextwin2 20,8,149,GUISaveText9
GUIOuttextwin2 20,8+57,149,GUISaveTextA
GUIOuttextwin2 20,8+114,149,GUISaveTextB
GUIOuttextwin2 20,8,158,GUISaveTextF
mov byte[GUISaveTextC2+2],'0' ; ST# Shadow
GUIOuttextwin2 20,9,123,GUISaveTextC2
mov byte[GUISaveTextC2+2],'1'
GUIOuttextwin2 20,9+45,123,GUISaveTextC2
mov byte[GUISaveTextC2+2],'2'
GUIOuttextwin2 20,9+45*2,123,GUISaveTextC2
mov byte[GUISaveTextC2+2],'3'
GUIOuttextwin2 20,9+45*3,123,GUISaveTextC2
mov byte[GUISaveTextC2+2],'4'
GUIOuttextwin2 20,9,132,GUISaveTextC2
mov byte[GUISaveTextC2+2],'5'
GUIOuttextwin2 20,9+45,132,GUISaveTextC2
mov byte[GUISaveTextC2+2],'6'
GUIOuttextwin2 20,9+45*2,132,GUISaveTextC2
mov byte[GUISaveTextC2+2],'7'
GUIOuttextwin2 20,9+45*3,132,GUISaveTextC2
mov byte[GUISaveTextC2+2],'8'
GUIOuttextwin2 20,9,141,GUISaveTextC2
mov byte[GUISaveTextC2+2],'9'
GUIOuttextwin2 20,9+45,141,GUISaveTextC2
mov byte[GUISaveTextC2+2],'+'
GUIOuttextwin2 20,9+45*2,141,GUISaveTextC2
mov byte[GUISaveTextC2+2],'-'
GUIOuttextwin2 20,9+45*2,141,GUISaveTextC2
mov al,[GUIWincol]
add byte[GUItextcolor],15 ;Text
GUIOuttextwin2 20,7,18,GUISaveTextA1
GUIOuttextwin2 20,7,30,GUISaveTextA2
GUIOuttextwin2 20,25,43,GUISaveTextB1
GUIOuttextwin2 20,25,53,GUISaveTextB2
GUIOuttextwin2 20,25,63,GUISaveTextB3
GUIOuttextwin2 20,25,73,GUISaveTextB4
GUIOuttextwin2 20,25,83,GUISaveTextB5
GUIOuttextwin2 20,25,93,GUISaveTextB6
GUIOuttextwin2 20,25,103,GUISaveTextB7
GUIOuttextwin2 20,8+45*3,140,GUISaveTextC4
GUIOuttextwin2 20,8,149,GUISaveTextC5
GUIOuttextwin2 20,8+57,149,GUISaveTextC6
GUIOuttextwin2 20,8+114,149,GUISaveTextC7
GUIOuttextwin2 20,8,158,GUISaveTextC8
mov byte[GUISaveTextC2+2],'0' ; ST# Text
GUIOuttextwin2 20,8,122,GUISaveTextC2
mov byte[GUISaveTextC2+2],'1'
GUIOuttextwin2 20,8+45,122,GUISaveTextC2
mov byte[GUISaveTextC2+2],'2'
GUIOuttextwin2 20,8+45*2,122,GUISaveTextC2
mov byte[GUISaveTextC2+2],'3'
GUIOuttextwin2 20,8+45*3,122,GUISaveTextC2
mov byte[GUISaveTextC2+2],'4'
GUIOuttextwin2 20,8,131,GUISaveTextC2
mov byte[GUISaveTextC2+2],'5'
GUIOuttextwin2 20,8+45,131,GUISaveTextC2
mov byte[GUISaveTextC2+2],'6'
GUIOuttextwin2 20,8+45*2,131,GUISaveTextC2
mov byte[GUISaveTextC2+2],'7'
GUIOuttextwin2 20,8+45*3,131,GUISaveTextC2
mov byte[GUISaveTextC2+2],'8'
GUIOuttextwin2 20,8,140,GUISaveTextC2
mov byte[GUISaveTextC2+2],'9'
GUIOuttextwin2 20,8+45,140,GUISaveTextC2
mov byte[GUISaveTextC2+2],'+'
GUIOuttextwin2 20,8+45*2,140,GUISaveTextC2
mov byte[GUISaveTextC2+2],'-'
GUIOuttextwin2 20,8+45*2,140,GUISaveTextC2
mov al,[GUIWincol] ;State Selects (Yellow) Shadow
mov [GUIGameOptnsColA],al
mov byte[GUIGameOptnsColB],202
cmp byte[GUIWincoladd],0
@@ -5987,9 +6056,9 @@ DisplayGUISave:
.zero3
mov al,byte[GUIGameOptnsColA]
mov byte[GUItextcolor],al
GUIOuttextwin2 20,6,112,GUISaveTextE
GUIOuttextwin2 20,6,112,GUISaveTextC1
mov byte[GUIGameOptnsColA],163
mov byte[GUIGameOptnsColA],163 ;State Selects (Yellow) Text
mov byte[GUIGameOptnsColB],217
cmp byte[GUIWincoladd],0
je .zero8
@@ -5998,44 +6067,51 @@ DisplayGUISave:
.zero8
mov al,byte[GUIGameOptnsColA]
mov byte[GUItextcolor],al
GUIOuttextwin2 20,5,111,GUISaveTextE
GUIOuttextwin2 20,5,111,GUISaveTextC1
;Checkboxes
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[AutoIncSaveSlot],0
je .nocheckbox
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox
GUIDisplayIconWin 20,11,40,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SRAMSave5Sec],0
je .nocheckbox1
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox1
GUIDisplayIconWin 20,11,50,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[LatestSave],0
je .nocheckbox2
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox2
GUIDisplayIconWin 20,11,60,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[AutoState],0
je .nocheckbox3
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox3
GUIDisplayIconWin 20,11,70,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SRAMState],0
je .nocheckbox4
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox4
GUIDisplayIconWin 20,11,80,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[PauseLoad],0
je .nocheckbox5
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox5
GUIDisplayIconWin 20,11,90,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[PauseRewind],0
je .nocheckbox6
@@ -6043,8 +6119,9 @@ DisplayGUISave:
.nocheckbox6
GUIDisplayIconWin 20,11,100,[GUITemp]
; Draw borders
mov dword[GUIWincol],148+10
; Draw borders
mov dword[GUIWincol],148+10 ; Setup for borders
cmp byte[cwindrawn],1
jne .noone3
mov dword[GUIWincol],148+5
@@ -6054,19 +6131,7 @@ DisplayGUISave:
mov dword[GUIWincol],148
.nozero3
mov dl,[GUIWincol]
DrawGUIWinBox 20,150,16,165,16,dl
mov dl,[GUIWincol]
add dl,1
DrawGUIWinBox 20,149,17,149,24,dl
mov dl,[GUIWincol]
add dl,4
DrawGUIWinBox 20,150,25,165,25,dl
mov dl,[GUIWincol]
add dl,3
DrawGUIWinBox 20,165,17,166,24,dl
mov dl,[GUIWincol]
mov dl,[GUIWincol] ; # of Rewind States (Border)
DrawGUIWinBox 20,150,28,165,28,dl
mov dl,[GUIWincol]
add dl,1
@@ -6078,52 +6143,38 @@ DisplayGUISave:
add dl,3
DrawGUIWinBox 20,165,29,166,36,dl
DGOptnsBorderBox 20,26,120
DGOptnsBorderBox 20,71,120
DGOptnsBorderBox 20,116,120
DGOptnsBorderBox 20,161,120
DGOptnsBorderBox 20,26,129
DGOptnsBorderBox 20,71,129
DGOptnsBorderBox 20,116,129
DGOptnsBorderBox 20,161,129
DGOptnsBorderBox 20,26,138
DGOptnsBorderBox 20,71,138
DGOptnsBorderBox 20,116,138
DGOptnsBorderBox 20,161,138
DGOptnsBorderBox 20,32,147
DGOptnsBorderBox 20,89,147
DGOptnsBorderBox 20,146,147
DGOptnsBorderBox 20,45,156
; End draw borders
mov dl,[GUIWincol] ; Second/Rewind (Border)
DrawGUIWinBox 20,150,16,165,16,dl
mov dl,[GUIWincol]
add dl,1
DrawGUIWinBox 20,149,17,149,24,dl
mov dl,[GUIWincol]
add dl,4
DrawGUIWinBox 20,150,25,165,25,dl
mov dl,[GUIWincol]
add dl,3
DrawGUIWinBox 20,165,17,166,24,dl
DrawGUIWinBox 20,150,29,165,36,167
xor ax,ax
mov ah,[RewindFrames]
mov al,48
add ah,48
.asciiloop2
cmp ah,58
jb .hex2asciidone2
add al,1
sub ah,10
jmp .asciiloop2
.hex2asciidone2
mov [GUISaveTextX],ax
mov byte[GUItextcolor],223
GUIOuttextwin2 20,154,31,GUISaveTextX
mov byte[GUItextcolor],221
cmp byte[GUIWincoladd],0
je .zero5
mov byte[GUItextcolor],222
.zero5
GUIOuttextwin2 20,153,30,GUISaveTextX
mov byte[GUItextcolor],217
cmp byte[GUIWincoladd],0
je .zero7
mov byte[GUItextcolor],211
.zero7
DGOptnsBorderBox 20,26,120 ; ST0
DGOptnsBorderBox 20,71,120 ; ST1
DGOptnsBorderBox 20,116,120 ; ST2
DGOptnsBorderBox 20,161,120 ; ST3
DGOptnsBorderBox 20,26,129 ; ST4
DGOptnsBorderBox 20,71,129 ; ST5
DGOptnsBorderBox 20,116,129 ; ST6
DGOptnsBorderBox 20,161,129 ; ST7
DGOptnsBorderBox 20,26,138 ; ST8
DGOptnsBorderBox 20,71,138 ; ST9
DGOptnsBorderBox 20,116,138 ; ST+
DGOptnsBorderBox 20,161,138 ; ST-
DGOptnsBorderBox 20,32,147 ; SAVE
DGOptnsBorderBox 20,89,147 ; LOAD
DGOptnsBorderBox 20,146,147 ; PICK
DGOptnsBorderBox 20,45,156 ; REWIND
DrawGUIWinBox 20,150,17,165,24,167
;Boxes
DrawGUIWinBox 20,150,17,165,24,167 ; Rewind States Box
xor ax,ax
mov ah,[RewindStates]
mov al,48
@@ -6135,28 +6186,49 @@ DisplayGUISave:
sub ah,10
jmp .asciiloop
.hex2asciidone
mov [GUISaveTextX],ax
mov [GUISaveTextZ3],ax
mov byte[GUItextcolor],223
GUIOuttextwin2 20,154,19,GUISaveTextX
GUIOuttextwin2 20,154,19,GUISaveTextZ3
mov byte[GUItextcolor],221
cmp byte[GUIWincoladd],0
je .zero4
mov byte[GUItextcolor],222
.zero4
GUIOuttextwin2 20,153,18,GUISaveTextX
GUIOuttextwin2 20,153,18,GUISaveTextZ3
mov byte[GUItextcolor],217
cmp byte[GUIWincoladd],0
je .zero6
mov byte[GUItextcolor],211
.zero6
DrawGUIButton 20,173,17,181,25,GUISaveTextY,70,-2,-1
DrawGUIButton 20,184,17,192,25,GUISaveTextZ,71,-2,-1
DrawGUIButton 20,173,29,181,37,GUISaveTextV,72,-2,-1
DrawGUIButton 20,184,29,192,37,GUISaveTextW,73,-2,-1
DrawGUIWinBox 20,150,29,165,36,167 ; Second/Rewind Box
xor ax,ax
mov ah,[RewindFrames]
mov al,48
add ah,48
.asciiloop2
cmp ah,58
jb .hex2asciidone2
add al,1
sub ah,10
jmp .asciiloop2
.hex2asciidone2
mov [GUISaveTextZ3],ax
mov byte[GUItextcolor],223
GUIOuttextwin2 20,154,31,GUISaveTextZ3
mov byte[GUItextcolor],221
cmp byte[GUIWincoladd],0
je .zero5
mov byte[GUItextcolor],222
.zero5
GUIOuttextwin2 20,153,30,GUISaveTextZ3
mov byte[GUItextcolor],217
cmp byte[GUIWincoladd],0
je .zero7
mov byte[GUItextcolor],211
.zero7
DDrawBox 20,27,121,[KeyStateSlc0]
DDrawBox 20,27,121,[KeyStateSlc0] ; Boxes for State section
DDrawBox 20,27+45,121,[KeyStateSlc1]
DDrawBox 20,27+45*2,121,[KeyStateSlc2]
DDrawBox 20,27+45*3,121,[KeyStateSlc3]
@@ -6174,29 +6246,38 @@ DisplayGUISave:
DDrawBox 20,8+38,157,[KeyRewind]
ret
;Buttons
DrawGUIButton 20,173,17,181,25,GUISaveTextZ1,70,-2,-1 ; + Rewind States
DrawGUIButton 20,184,17,192,25,GUISaveTextZ2,71,-2,-1 ; - Rewind States
DrawGUIButton 20,173,29,181,37,GUISaveTextZ1,72,-2,-1 ; + Second/Rewind
DrawGUIButton 20,184,29,192,37,GUISaveTextZ2,73,-2,-1 ; - Second/Rewind
SECTION .data
GUISaveText1 db 'AUTO INCRMNT SAVE SLOT',0
GUISaveText2 db 'SRAM CHECK+SAVE',0
GUISaveText3 db 'START AT LATEST SAVE',0
GUISaveText4 db 'AUTO STATE SAVE/LOAD',0
GUISaveText5 db 'LOAD SAVESTATE W/SRAM',0
GUISaveText6 db '# OF REWIND STATES',0
GUISaveText7 db '1/5 SECONDS PER REWIND',0
GUISaveText8 db 'ST#',0
GUISaveText9 db 'SAVE',0
GUISaveTextA db 'LOAD',0
GUISaveTextB db 'PICK',0
GUISaveTextC db 'ST+',0
GUISaveTextD db 'ST-',0
GUISaveTextE db 'STATE SELECTS :',0
GUISaveTextF db 'REWIND',0
GUISaveTextG db 'PAUSE AFTER LOADING STATE',0
GUISaveTextH db 'PAUSE AFTER REWIND',0
GUISaveTextV db '+',0
GUISaveTextW db '-',0
GUISaveTextX db ' ',0
GUISaveTextY db '+',0
GUISaveTextZ db '-',0
GUISaveTextA1 db '# OF REWIND STATES',0
GUISaveTextA2 db '1/5 SECONDS PER REWIND',0
GUISaveTextB1 db 'AUTO INCRMNT SAVE SLOT',0
GUISaveTextB2 db 'SRAM CHECK+SAVE',0
GUISaveTextB3 db 'START AT LATEST SAVE',0
GUISaveTextB4 db 'AUTO STATE SAVE/LOAD',0
GUISaveTextB5 db 'LOAD SAVESTATE W/SRAM',0
GUISaveTextB6 db 'PAUSE AFTER LOADING STATE',0
GUISaveTextB7 db 'PAUSE AFTER REWIND',0
GUISaveTextC1 db 'STATE SELECTS :',0
GUISaveTextC2 db 'ST#',0 ; Used for all numbers, 0-9
GUISaveTextC3 db 'ST+',0
GUISaveTextC4 db 'ST-',0
GUISaveTextC5 db 'SAVE',0
GUISaveTextC6 db 'LOAD',0
GUISaveTextC7 db 'PICK',0
GUISaveTextC8 db 'REWIND',0
GUISaveTextZ1 db '+',0
GUISaveTextZ2 db '-',0
GUISaveTextZ3 db ' ',0
;General data
GUILoadDisp db 'LOAD GAME',0