diff --git a/zsnes/src/cpu/execute.asm b/zsnes/src/cpu/execute.asm index 94046683..b7f4bfc8 100644 --- a/zsnes/src/cpu/execute.asm +++ b/zsnes/src/cpu/execute.asm @@ -36,7 +36,7 @@ EXTSYM KeyOnStA,KeyOnStB,ProcessKeyOn,printnum,sramsavedis,DSPDisable,C4Enable EXTSYM IRQHack,HIRQLoc,Offby1line,splitflags,joinflags,KeyQuickSnapShot EXTSYM csounddisable,videotroub,Open_File,Close_File,Read_File,ResetTripleBuf EXTSYM Write_File,Output_Text,Create_File,Check_Key,Get_Key,Change_Dir,InitPreGame -EXTSYM OSPort +;EXTSYM OSPort ; EXTSYM tempblah,romdata EXTSYM Curtableaddr,DeInitSPC,InitSB,PICMaskP,SBHandler,SBInt EXTSYM SBIrq,curcyc,debugdisble,dmadata,guioff,memtabler8,SetupPreGame @@ -1394,10 +1394,12 @@ NEWSYM endprog je .nodeinitmodem call DeInitModem .nodeinitmodem - cmp byte[OSPort],1 - jae .nodeinitipx +; cmp byte[OSPort],1 +; jae .nodeinitipx +%ifdef __MSDOS__ call deinitipx -.nodeinitipx +%endif +;.nodeinitipx jmp OSExit .blah db 'dsptrace.dat',0 diff --git a/zsnes/src/dos/dosintrf.asm b/zsnes/src/dos/dosintrf.asm index ebd8094b..0d49a018 100644 --- a/zsnes/src/dos/dosintrf.asm +++ b/zsnes/src/dos/dosintrf.asm @@ -80,7 +80,7 @@ EXTSYM GUINetTextk2 SECTION .data -NEWSYM OSPort, db 0 ; 0 = DOS (C), 1 = DOS (ASM), 2 = Linux, 3 = Win95 +;NEWSYM OSPort, db 0 ; 0 = DOS (C), 1 = DOS (ASM), 2 = Linux, 3 = Win95 SECTION .text NEWSYM StartUp @@ -1580,7 +1580,7 @@ NEWSYM StartSound NEWSYM SoundProcess ; This function is called ~60 times/s at full speed - cmp byte[OSPort],1 ; Do not call in the dos port +; cmp byte[OSPort],1 ; Do not call in the dos port ; ja .notdos .nosound ret diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index ab3e1c7d..9bbd5cca 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -90,7 +90,8 @@ EXTSYM File_Seek,File_Seek_End,Open_File_Write,Get_Date,Check_Key,Get_Key EXTSYM Change_Drive,Change_Single_Dir,Change_Dir,Get_Dir,Get_First_Entry EXTSYM Get_Next_Entry,Set_DTA_Address,timer2upd,curexecstate,TripBufAvail EXTSYM nmiprevaddrl,nmiprevaddrh,nmirept,nmiprevline,nmistatus,spcnumread -EXTSYM NextLineCache,OSPort,VidStartDraw,ResetTripleBuf,GUINGVID +EXTSYM NextLineCache,VidStartDraw,ResetTripleBuf,GUINGVID +;EXTSYM OSPort EXTSYM ScanCodeListing,AdjustFrequency,GUISaveVars,Init_Mouse EXTSYM Get_MouseData,Set_MouseXMax,Set_MouseYMax,Set_MousePosition,Get_MousePositionDisplacement EXTSYM GUIInit,GUIDeInit,SpecialLine @@ -672,7 +673,7 @@ NEWSYM GUICMessage, dd 0 NEWSYM GUICTimer, dd 0 NEWSYM GUIOn, db 0 NEWSYM GUIOn2, db 0 -GOSPort db 0 +;GOSPort db 0 NEWSYM StartLL, dd 0 NEWSYM StartLR, dd 0 @@ -685,17 +686,21 @@ NEWSYM NetLoadState, db 0 ;ModemPTimer db 0 ; Timer for modem process %macro stim 0 - cmp byte[OSPort],1 - ja %%nosti +; cmp byte[OSPort],1 +; ja %%nosti +%ifdef __MSDOS__ sti -%%nosti +%endif +;%%nosti %endmacro %macro clim 0 - cmp byte[OSPort],1 - ja %%nocli +; cmp byte[OSPort],1 +; ja %%nocli +%ifdef __MSDOS__ cli -%%nocli +%endif +;%%nocli %endmacro @@ -744,19 +749,22 @@ GUIQuickLoadUpdate: mov byte[GUIPrevMenuData.onoff+17],'F' .on mov esi,prevloadfnamel - cmp byte[OSPort],2 - jae .notdos +; cmp byte[OSPort],2 +; jae .notdos +%ifdef __MSDOS__ mov esi,prevloadnames -.notdos +%endif +;.notdos mov edi,GUIPrevMenuData+3 mov edx,10 .mainloop mov ecx,25 - cmp byte[OSPort],2 - jae .notdos3 +; cmp byte[OSPort],2 +; jae .notdos3 +%ifdef __MSDOS__ mov ecx,16 -.notdos3 - +%endif +;.notdos3 push edi push esi cmp byte[esi],32 @@ -795,10 +803,12 @@ GUIQuickLoadUpdate: pop esi pop edi add esi,512 ;16 - cmp byte[OSPort],2 - jae .notdos2 +; cmp byte[OSPort],2 +; jae .notdos2 +%ifdef __MSDOS__ sub esi,512-16 -.notdos2 +%endif +;.notdos2 add edi,32 dec edx jnz near .mainloop @@ -1424,10 +1434,12 @@ NEWSYM TestSent NEWSYM StartGUI - cmp byte[OSPort],1 - jbe .dosport +; cmp byte[OSPort],1 +; jbe .dosport +%ifndef __MSDOS__ mov byte[sampratenext+3],0 -.dosport +%endif +;.dosport mov ecx,64 mov eax,SpecialLine .slloop @@ -1435,11 +1447,13 @@ NEWSYM StartGUI add eax,4 loop .slloop ; Change GUI to suit the Win32 port - cmp byte[OSPort],3 - jne .nowinport +; cmp byte[OSPort],3 +; jne .nowinport +%ifndef __MSDOS__ mov dword[GUIGUIOptnsText8+12],' GUI' mov byte[GUIGUIOptnsText8+16],0 -.nowinport +%endif +;.nowinport cmp byte[OldWinPos],0 jne .okayow xor esi,esi @@ -1455,18 +1469,19 @@ NEWSYM StartGUI mov eax,[pl1p209b] mov [pl1p209],eax .okayow - - mov al,[OSPort] - mov [GOSPort],al - cmp byte[GOSPort],3 - jne .notwinport +; mov al,[OSPort] +; mov [GOSPort],al +; cmp byte[GOSPort],3 +; jne .notwinport +%ifndef __MSDOS__ mov dword[GUINetPlayMenuData+1],'INTE' mov dword[GUINetPlayMenuData+5],'RNET' mov dword[GUINetPlayMenuData+1+14],'----' mov dword[GUINetPlayMenuData+5+14],'----' mov byte[MenuDat5],0 mov byte[MenuDat5+1],2 -.notwinport +%endif +;.notwinport ; copy old quickfilename to new quickfilename cmp byte[prevloadl],0 jne .noconvertlfqm @@ -3037,11 +3052,11 @@ GUITryMenuItem: jne .noreset mov byte[GUICResetPos],1 .noreset - cmp byte[OSPort],3 - je .win32state +; cmp byte[OSPort],3 +; je .win32state ; cmp byte[CNetType],20 ; je near .noromloaded -.win32state +;.win32state cmp byte[CNetType],21 je near .noromloaded cmp byte[CNetType],22 @@ -3121,8 +3136,9 @@ GUITryMenuItem: .nocheat cmp byte[GUIcmenupos],5 jne near .nonet - cmp byte[GOSPort],3 - je near .win32 +; cmp byte[GOSPort],3 +; je near .win32 +%ifdef __MSDOS__ cmp byte[CNetType],10 jae .nomod mov byte[CNetType],0 @@ -3139,7 +3155,8 @@ GUITryMenuItem: jne near .nonet mov byte[CNetType],1 jmp .nonet -.win32 +%endif +;.win32 GUICheckMenuItem 8, 0 cmp byte[CNetType],10 jae near .nonet @@ -3562,32 +3579,37 @@ DisplayMenu: GUIBox 0,14,229,14,70 GUIBox 0,15,229,15,71 - cmp byte[OSPort],3 - jne near .notwinpressa +; cmp byte[OSPort],3 +; jne near .notwinpressa %ifdef __LINUX__ GUIShadow 238,9,247,20 + GUIShadow 249,9,257,20 %endif %ifdef __WIN32__ GUIShadow 238,9,247,14 GUIShadow 238,16,247,20 - %endif GUIShadow 249,9,257,20 + %endif .notwinpressa - cmp byte[OSPort],3 - jne near .notwinpressb +; cmp byte[OSPort],3 +; jne near .notwinpressb + %ifdef __LINUX__ mov byte[GUIMenuItem+36],247 GUIDMHelpB 233,242,GUIMenuItem+36,1 + mov byte[GUIMenuItem+36],'x' + GUIDMHelpB 244,253,GUIMenuItem+36,2 %endif + %ifdef __WIN32__ mov byte[GUIMenuItem+36],249 GUIDMHelpB2 233,242,GUIMenuItem+36,1 mov byte[GUIMenuItem+36],248 GUIDMHelpB3 233,242,GUIMenuItem+36,3 - %endif mov byte[GUIMenuItem+36],'x' GUIDMHelpB 244,253,GUIMenuItem+36,2 + %endif .notwinpressb ; Display upper-left box @@ -3630,11 +3652,13 @@ DisplayMenu: .nomenu4 cmp byte[GUIcmenupos],5 jne near .nomenu5 - cmp byte[GOSPort],3 - je near .menu5b +; cmp byte[GOSPort],3 +; je near .menu5b +%ifdef __MSDOS__ GUIDrawMenuM 140,16,10,2,GUINetPlayMenuData,142,145,22,39,48 ;19+2*10 mov dword[GUICYLocPtr],MenuDat5 jmp .nomenu5 +%endif .menu5b GUIDrawMenuM 140,16,10,1,GUINetPlayMenuData,142,145,22,29,48 ;19+2*10 mov dword[GUICYLocPtr],MenuDat5 diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 815a8a8d..68b829a0 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -162,8 +162,9 @@ GUIgetcurrentinput: GUIqcheckkeys 1 GUIqcheckkeys 1Ch - cmp byte[OSPort],3 - jne near .notwinport +; cmp byte[OSPort],3 +; jne near .notwinport +%ifndef __MSDOS__ GUIqcheckkeys 0C8h GUIqcheckkeys 0D0h GUIqcheckkeys 0CBh @@ -173,6 +174,7 @@ GUIgetcurrentinput: GUIqcheckkeys 0C7h GUIqcheckkeys 0CFh GUIqcheckkeys 09Ch +%endif .notwinport cmp byte[JoyPad1Move],0 @@ -215,23 +217,30 @@ GUIgetcurrentinput: mov al,cl .notextkb - cmp byte[OSPort],3 - jne near .notwinport2 +; cmp byte[OSPort],3 +; jne near .notwinport2 + ; GUIgetprkeys 0C8h,72 ; GUIgetprkeys 0D0h,80 %ifdef __LINUX__ GUIgetprkeys 05Ch,92 GUIgetprkeys 05Eh,94 -%else - GUIgetprkeys 0CBh,75 - GUIgetprkeys 0CDh,77 -%endif GUIgetprkeys 0C9h,73 GUIgetprkeys 0D1h,81 GUIgetprkeys 0C7h,71 GUIgetprkeys 0CFh,79 GUIgetprkeys 09Ch,13 -.notwinport2 +%endif +%ifdef __WIN32__ + GUIgetprkeys 0CBh,75 + GUIgetprkeys 0CDh,77 + GUIgetprkeys 0C9h,73 + GUIgetprkeys 0D1h,81 + GUIgetprkeys 0C7h,71 + GUIgetprkeys 0CFh,79 + GUIgetprkeys 09Ch,13 +%endif +;.notwinport2 cmp byte[JoyPad1Move],0 je near .nopad1b @@ -296,8 +305,8 @@ GUIgetcurrentinput: jmp .nonetwin .yesnet15 mov byte[CNetType],0 - cmp byte[OSPort],1 - je .nodeinitipx +; cmp byte[OSPort],1 +; je .nodeinitipx call deinitipx .nodeinitipx jmp .closewin diff --git a/zsnes/src/gui/guiload.inc b/zsnes/src/gui/guiload.inc index d43b5c8d..f1caeabd 100644 --- a/zsnes/src/gui/guiload.inc +++ b/zsnes/src/gui/guiload.inc @@ -574,10 +574,10 @@ GetNormalEntries2: GUIGetEntry2 GUIfindUSA GUIGetEntry2 GUIfindJAP GUIGetEntry2 GUIfindBIN - cmp byte[OSPort],1 - je near .noasm +; cmp byte[OSPort],1 +; je near .noasm GUIGetEntry2 GUIfindZIP -.noasm +;.noasm GUIGetEntry2 GUIfind1 jmp .guiNext .guishowall @@ -598,10 +598,10 @@ GetNormalEntries: GUIGetEntry GUIfindUSA GUIGetEntry GUIfindJAP GUIGetEntry GUIfindBIN - cmp byte[OSPort],1 - je near .noasm +; cmp byte[OSPort],1 +; je near .noasm GUIGetEntry GUIfindZIP -.noasm +;.noasm GUIGetEntry GUIfind1 jmp .guiNext .guishowall @@ -1118,15 +1118,17 @@ GetLoadData: mov dword[GUIcurrentdircursloc],0 mov edi,spcRamcmp mov byte[Win95Failed],0 - cmp byte[OSPort],1 - ja .notdos +; cmp byte[OSPort],1 +; ja .notdos +%ifdef __MSDOS__ cmp byte[GUIloadfntype],2 jne .nowin95lfn clc mov ax,7100h int 21h jc .nowin95lfn -.notdos +%endif +;.notdos mov byte[GUIloadfntype],0 .nowin95lfn cmp byte[GUIloadfntype],2 diff --git a/zsnes/src/gui/guimisc.inc b/zsnes/src/gui/guimisc.inc index a9c53e86..7cc3de55 100644 --- a/zsnes/src/gui/guimisc.inc +++ b/zsnes/src/gui/guimisc.inc @@ -403,11 +403,13 @@ SetDevice: mov byte[GUICBHold],0 xor eax,eax mov al,[cplayernum] - cmp byte[OSPort],1 - ja .notdos +; cmp byte[OSPort],1 +; ja .notdos +%ifdef __MSDOS__ cmp byte[pl1p209+eax],0 jne .port209 -.notdos +%endif +;.notdos mov dword[CalibXmin],0 mov ecx,[DevicePtr+eax*4] mov eax,[GUIInputRefP+eax*4] diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index 263850c9..d256a8e1 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -300,8 +300,9 @@ ProcessMouseButtons: jmp .noclick .noclicked - cmp byte[OSPort],3 - jne .noclick +; cmp byte[OSPort],3 +; jne .noclick +%ifndef __MSDOS__ mov byte[GUIpclicked],1 mov byte[GUIHold],255 mov eax,[GUImouseposy] @@ -316,6 +317,7 @@ ProcessMouseButtons: mov al,[GUIcmenupos] mov [GUIpmenupos],al mov byte[GUIcmenupos],0 +%endif .noclick mov byte[GUIpclicked],1 xor eax,eax @@ -454,31 +456,46 @@ ProcessMouseButtons: mov byte[GUIpclicked],0 mov byte[GUIHold],0 - cmp byte[OSPort],3 - jne .notwinpressa +; cmp byte[OSPort],3 +; jne .notwinpressa + +%ifdef __LINUX__ cmp byte[GUIcwinpress],1 jne .notwinpressa mov byte[GUIcwinpress],0 cmp word[GUImouseposy],3 jb .notwinpressa - %ifdef __LINUX__ cmp word[GUImouseposy],13 ja .notwinpressa - %endif - %ifdef __WIN32__ - cmp word[GUImouseposy],7 - ja .notwinpressa - %endif cmp word[GUImouseposx],233 jb .notwinpressa cmp word[GUImouseposx],242 ja .notwinpressa call SwitchFullScreen ret +%endif + +%ifdef __WIN32__ + cmp byte[GUIcwinpress],1 + jne .notwinpressa + mov byte[GUIcwinpress],0 + cmp word[GUImouseposy],3 + jb .notwinpressa + cmp word[GUImouseposy],7 + ja .notwinpressa + cmp word[GUImouseposx],233 + jb .notwinpressa + cmp word[GUImouseposx],242 + ja .notwinpressa + call SwitchFullScreen + ret +%endif + .notwinpressa - cmp byte[OSPort],3 - jne .notwinpressb +; cmp byte[OSPort],3 +; jne .notwinpressb +%ifndef __MSDOS__ cmp byte[GUIcwinpress],2 jne .notwinpressb mov byte[GUIcwinpress],0 @@ -494,8 +511,8 @@ ProcessMouseButtons: ret .notwinpressb - cmp byte[OSPort],3 - jne .notwinpressc +; cmp byte[OSPort],3 +; jne .notwinpressc cmp byte[GUIcwinpress],3 jne .notwinpressc mov byte[GUIcwinpress],0 @@ -507,6 +524,7 @@ ProcessMouseButtons: jb .notwinpressc cmp word[GUImouseposx],242 ja .notwinpressc +%endif %ifdef __WIN32__ pushad call MinimizeWindow @@ -764,8 +782,9 @@ ProcessMouseButtons: GUIProcVideo: mov al,[GUIcurrentvideocursloc] - cmp byte[OSPort],2 - jae .yes16b +; cmp byte[OSPort],2 +; jae .yes16b +%ifdef __MSDOS__ cmp al,3 je .yes16b cmp al,5 @@ -776,6 +795,7 @@ GUIProcVideo: je .yes16b cmp al,8 jne .no16b +%endif .yes16b ; mov byte[newengen],0 ; mov byte[cfgnewgfx],0 @@ -1193,14 +1213,16 @@ GUIWinClicked: cmp byte[En2xSaI],0 jne %%nomodeq call ClearScreen - cmp byte[OSPort],2 - jae %%nomodeq +; cmp byte[OSPort],2 +; jae %%nomodeq +%ifdef __MSDOS__ cmp byte[cvidmode],1 jne %%nomodeq mov byte[cbitmode],1 call initvideo2 mov byte[cbitmode],0 call GUISetPal +%endif %%nomodeq ret %%noclick @@ -1833,14 +1855,16 @@ DisplayGUIMovieClick: cmp ebx,3Bh je %%cancelkey mov %3,ebx - cmp byte[OSPort],3 - jne %%notwin32 +; cmp byte[OSPort],3 +; jne %%notwin32 +%ifndef __MSDOS__ cmp dword[keycontrolval],0 je %%notwin32 push ebx mov ebx,[keycontrolval] mov byte[ebx],1 pop ebx +%endif %%notwin32 ret %%cancelkey @@ -1936,10 +1960,12 @@ DisplayGUIInputClick: ;x,y,x2,y2,currentwin,vpos,#entries,starty,y/entry,cpos,winval,win#,dclicktick# GUIWinControl 5,36,107,34+5*8,GUIBlankVar,GUIcurrentinputviewloc,GUINumValue,35,8,GUIcurrentinputcursloc,4,3,0 GUIPHoldbutton 125,34,155,45,14 - cmp byte[OSPort],3 - je near .win32 +; cmp byte[OSPort],3 +; je near .win32 +%ifdef __MSDOS__ GUIPHoldbutton 125,50,185,61,15 -.win32 +%endif +;.win32 GUIPHoldbutton 125,66,185,77,40 mov edi,pl1selk mov dword[keycontrolval],pl1contrl @@ -2038,10 +2064,12 @@ DisplayGUIOptionClick: GUIClickCButton2 11,46,byte[vsyncon],byte[cfgvsync],1 GUIClickCButton2 11,56,byte[FPUCopy],byte[cfgcopymethod],2 GUIClickCButtonM 11,66,byte[pl12s34] - cmp byte[OSPort],3 - je near .win32config +; cmp byte[OSPort],3 +; je near .win32config +%ifdef __MSDOS__ GUIClickCButton 11,76,byte[SidewinderFix] -.win32config +%endif +;.win32config %ifdef __WIN32__ GUIClickCButton 11,76,byte[HighPriority] %endif @@ -2160,10 +2188,12 @@ DisplayGUISoundClick: GUIClickCButton 11,39,byte[RaisePitch] GUIClickCButton 11,101,byte[SoundNoiseDis] GUIClickCButtonS 11,111,byte[RevStereo] - cmp byte[OSPort],3 - je near .win32sound +; cmp byte[OSPort],3 +; je near .win32sound +%ifdef __MSDOS__ GUIClickCButton 11,121,byte[Surround] -.win32sound +%endif +;.win32sound %ifdef __WIN32__ GUIClickCButton 11,121,byte[LargeSoundBuf] %endif @@ -2522,10 +2552,12 @@ DisplayGameOptnsClick: DGOptnsProcBox 178,68,[KeyVolDown] DGOptnsProcBox 178,76,[KeyFRateUp] DGOptnsProcBox 178,84,[KeyFRateDown] - cmp byte[OSPort],3 - jne near .notwin32 +; cmp byte[OSPort],3 +; jne near .notwin32 +%ifndef __MSDOS__ DGOptnsProcBox 178,44,[KeyRewind] -.notwin32 +%endif +;.notwin32 DGOptnsProcBox 178,52,[KeyFastFrwrd] DGOptnsProcBox 27,112,[KeyDisableSC0] DGOptnsProcBox 27+45,112,[KeyDisableSC1] @@ -2635,10 +2667,12 @@ DisplayGUIOptnsClick: ret DisplayGUIAboutClick: - cmp byte[OSPort],3 - jne near .nowin32 +; cmp byte[OSPort],3 +; jne near .nowin32 +%ifndef __MSDOS__ GUIPHoldbutton 5,117,74,128,65 -.nowin32 +%endif +;.nowin32 ret %macro ComboBoxProc 5 diff --git a/zsnes/src/gui/guinetpl.inc b/zsnes/src/gui/guinetpl.inc index b7ab8fd2..42959c30 100644 --- a/zsnes/src/gui/guinetpl.inc +++ b/zsnes/src/gui/guinetpl.inc @@ -250,8 +250,8 @@ ProcessModem: pop es call .writehex ; ipx - cmp byte[OSPort],1 - je .noinitipx +; cmp byte[OSPort],1 +; je .noinitipx call initipx .noinitipx cmp ax,0 @@ -273,8 +273,8 @@ ProcessModem: cmp dword[ModemPTimer],0 jne .nolookforconnect mov dword[ModemPTimer],36 - cmp byte[OSPort],1 - je .noipxlook +; cmp byte[OSPort],1 +; je .noipxlook call ipxlookforconnect .noipxlook cmp byte[IPXSearchval],0 diff --git a/zsnes/src/gui/guitools.inc b/zsnes/src/gui/guitools.inc index 3b86ff8b..be3373ae 100644 --- a/zsnes/src/gui/guitools.inc +++ b/zsnes/src/gui/guitools.inc @@ -430,11 +430,13 @@ GUIOutputStringwinl: mov ecx,[cloadmaxlen] .more mov al,[edi] - cmp byte[OSPort],1 - jbe .noperc +; cmp byte[OSPort],1 +; jbe .noperc +%ifndef __MSDOS__ cmp al,'%' jne .noperc call ConvertPercValue +%endif .noperc or al,al jz .nomore diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index cdc7700c..a95ec334 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -440,11 +440,13 @@ DisplayGUILoad: mov byte[GUItextcolor],211 .zero sub byte[GUItextcolor],15 - cmp byte[OSPort],2 - jae near .noloadtypeb +; cmp byte[OSPort],2 +; jae near .noloadtypeb +%ifdef __MSDOS__ GUIOuttextwin2 1,21,166,GUILoadText3 GUIOuttextwin2 1,21,174,GUILoadText4 GUIOuttextwin2 1,21,182,GUILoadText5 +%endif .noloadtypeb GUIOuttextwin2 1,21,192,GUILoadText6 GUIOuttextwin2 1,6,16,GUILoadText7 @@ -454,21 +456,25 @@ DisplayGUILoad: mov dword[cloadmaxlen],39 cmp dword[GUIcurrentfilewin],0 jne .nofiles - cmp byte[OSPort],2 - jb .nofiles +; cmp byte[OSPort],2 +; jb .nofiles +%ifndef __MSDOS__ mov eax,[GUIcurrentcursloc] mov eax,[spcRamcmp+eax*4] inc eax mov [cloadnpos],eax GUIOuttextwin2l 1,6,158,[cloadnpos] +%endif .nofiles add byte[GUItextcolor],15 - cmp byte[OSPort],2 - jae near .noloadtypec +; cmp byte[OSPort],2 +; jae near .noloadtypec +%ifdef __MSDOS__ GUIOuttextwin2 1,20,165,GUILoadText3 GUIOuttextwin2 1,20,173,GUILoadText4 GUIOuttextwin2 1,20,181,GUILoadText5 +%endif .noloadtypec GUIOuttextwin2 1,20,191,GUILoadText6 GUIOuttextwin2 1,5,15,GUILoadText7 @@ -478,22 +484,26 @@ DisplayGUILoad: mov dword[cloadmaxlen],39 cmp dword[GUIcurrentfilewin],0 jne .nofilesb - cmp byte[OSPort],2 - jb .nofilesb +; cmp byte[OSPort],2 +; jb .nofilesb +%ifndef __MSDOS__ mov eax,[GUIcurrentcursloc] mov eax,[spcRamcmp+eax*4] inc eax mov [cloadnpos],eax GUIOuttextwin2l 1,5,157,[cloadnpos] +%endif .nofilesb DrawGUIButton 1,186,167,228,178,GUILoadText9,1,0,0 mov al,[GUIWincol] mov byte[GUItextcolor],al ; GUIOuttextwin2 1,6,16,GUILoadText1 - cmp byte[OSPort],2 - jae near .noloadtypee +; cmp byte[OSPort],2 +; jae near .noloadtypee +%ifdef __MSDOS__ GUIOuttextwin2 1,6,157,GUILoadText2 +%endif .noloadtypee mov byte[GUItextcolor],163 cmp byte[GUIWincoladd],0 @@ -501,9 +511,11 @@ DisplayGUILoad: mov byte[GUItextcolor],164 .zero3 ; GUIOuttextwin2 1,5,15,GUILoadText1 - cmp byte[OSPort],2 - jae near .noloadtyped +; cmp byte[OSPort],2 +; jae near .noloadtyped +%ifdef __MSDOS__ GUIOuttextwin2 1,5,156,GUILoadText2 +%endif .noloadtyped DrawGUIWinBox 1,5,25,144,134,167 ; 126 = 6 * 21, 112 = 7 * 16 DrawGUIWinBox 1,160,25,228,134,167 ; 78 = 6 * 13 @@ -666,11 +678,13 @@ DisplayGUILoad: mov bl,[GUILoadPos] mov byte[GUILoadTextA+ebx],0 - cmp byte[OSPort],2 - jae near .noloadtype +; cmp byte[OSPort],2 +; jae near .noloadtype +%ifdef __MSDOS__ GUIDisplayButtonHole 1,9,163,byte[GUIloadfntype],0 GUIDisplayButtonHole 1,9,171,byte[GUIloadfntype],1 GUIDisplayButtonHole 1,9,179,byte[GUIloadfntype],2 +%endif .noloadtype mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[showallext],1 @@ -1063,9 +1077,11 @@ DisplayGUIInput: GUIDisplayIconWin 3,5,162,[GUITemp] %endif DrawGUIButton 3,125,34,155,45,GUIInputTextV,14,0,0 - cmp byte[OSPort],3 - je near .win32 +; cmp byte[OSPort],3 +; je near .win32 +%ifdef __MSDOS__ DrawGUIButton 3,125,50,185,61,GUIInputTexta,15,0,0 +%endif .win32 DrawGUIButton 3,125,66,179,77,GUIInputTexta2,15,0,0 mov al,[GUIWincol] @@ -1310,16 +1326,20 @@ DisplayGUIOption: GUIOuttextwin2 4,6,16,[GUITemp] GUIOuttextwin2u 4,26,31,GUIOptionText2,0 GUIOuttextwin2u 4,26,41,GUIOptionText4,0 - cmp byte[OSPort],3 - je near .win32b +; cmp byte[OSPort],3 +; je near .win32b +%ifdef __MSDOS__ GUIOuttextwin2u 4,26,51,GUIOptionText5,0 -.win32b +%endif +;.win32b GUIOuttextwin2u 4,26,61,GUIOptionText6,0 GUIOuttextwin2u 4,26,71,GUIOptionText7,0 - cmp byte[OSPort],3 - je near .win32b2 +; cmp byte[OSPort],3 +; je near .win32b2 +%ifdef __MSDOS__ GUIOuttextwin2u 4,26,81,GUIOptionTextA,0 -.win32b2 +%endif +;.win32b2 %ifdef __WIN32__ GUIOuttextwin2u 4,26,81,GUIOptionTextAb,0 %endif @@ -1338,16 +1358,20 @@ DisplayGUIOption: GUIOuttextwin2 4,5,15,[GUITemp] GUIOuttextwin2 4,25,30,GUIOptionText2 GUIOuttextwin2 4,25,40,GUIOptionText4 - cmp byte[OSPort],3 - je near .win32c +; cmp byte[OSPort],3 +; je near .win32c +%ifdef __MSDOS__ GUIOuttextwin2 4,25,50,GUIOptionText5 -.win32c +%endif +;.win32c GUIOuttextwin2 4,25,60,GUIOptionText6 GUIOuttextwin2 4,25,70,GUIOptionText7 - cmp byte[OSPort],3 - je near .win32c2 +; cmp byte[OSPort],3 +; je near .win32c2 +%ifdef __MSDOS__ GUIOuttextwin2 4,25,80,GUIOptionTextA -.win32c2 +%endif +;.win32c2 %ifdef __WIN32__ GUIOuttextwin2 4,25,80,GUIOptionTextAb %endif @@ -1386,10 +1410,12 @@ DisplayGUIOption: je .nocheckbox2 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox2 - cmp byte[OSPort],3 - je near .win32 +; cmp byte[OSPort],3 +; je near .win32 +%ifdef __MSDOS__ GUIDisplayIconWin 4,11,46,[GUITemp] -.win32 +%endif +;.win32 mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[FPUCopy],2 jne .nocheckbox3 @@ -1407,10 +1433,12 @@ DisplayGUIOption: je .nocheckbox5 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox5 - cmp byte[OSPort],3 - je near .win322 +; cmp byte[OSPort],3 +; je near .win322 +%ifdef __MSDOS__ GUIDisplayIconWin 4,11,76,[GUITemp] -.win322 +%endif +;.win322 %ifdef __WIN32__ mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[HighPriority],0 @@ -1578,13 +1606,15 @@ DisplayGUIVideo: .zero sub byte[GUItextcolor],15 - cmp byte[OSPort],3 - jne near .nowin32pt2 +; cmp byte[OSPort],3 +; jne near .nowin32pt2 +%ifndef __MSDOS__ GUIOuttextwin2 5,12,76,GUIVideoTextw0 GUIOuttextwin2 5,12,86,GUIVideoTextw1 GUIOuttextwin2 5,12,96,GUIVideoTextw2 GUIOuttextwin2 5,12,106,GUIVideoTextw3 -.nowin32pt2 +%endif +;.nowin32pt2 xor eax,eax mov al,[cvidmode] @@ -1656,13 +1686,15 @@ DisplayGUIVideo: add byte[GUItextcolor],15 - cmp byte[OSPort],3 - jne near .nowin32pt +; cmp byte[OSPort],3 +; jne near .nowin32pt +%ifndef __MSDOS__ GUIOuttextwin2 5,11,75,GUIVideoTextw0 GUIOuttextwin2 5,11,85,GUIVideoTextw1 GUIOuttextwin2 5,11,95,GUIVideoTextw2 GUIOuttextwin2 5,11,105,GUIVideoTextw3 -.nowin32pt +%endif +;.nowin32pt xor eax,eax mov al,[cvidmode] cmp byte[GUISLVID+eax],0 @@ -2015,16 +2047,20 @@ DisplayGUISound: ; R = Sample Rate GUIOuttextwin2u 6,26,26,GUISoundText1,0 GUIOuttextwin2u 6,26,35,GUISoundText3,0 - cmp byte[OSPort],3 - je near .win32b +; cmp byte[OSPort],3 +; je near .win32b +%ifdef __MSDOS__ GUIOuttextwin2 6,26,44,GUISoundText2b -.win32b +%endif +;.win32b GUIOuttextwin2u 6,26,106,GUISoundText4,8 GUIOuttextwin2u 6,26,116,GUISoundTextH,2 - cmp byte[OSPort],3 - je near .win32s2 +; cmp byte[OSPort],3 +; je near .win32s2 +%ifdef __MSDOS__ GUIOuttextwin2 6,26,126,GUISoundTextI -.win32s2 +%endif +;.win32s2 %ifdef __WIN32__ GUIOuttextwin2 6,26,126,GUISoundTextIb %endif @@ -2035,16 +2071,20 @@ DisplayGUISound: add byte[GUItextcolor],15 GUIOuttextwin2 6,25,25,GUISoundText1 GUIOuttextwin2 6,25,34,GUISoundText3 - cmp byte[OSPort],3 - je near .win32c +; cmp byte[OSPort],3 +; je near .win32c +%ifdef __MSDOS__ GUIOuttextwin2 6,25,43,GUISoundText2b -.win32c +%endif +;.win32c GUIOuttextwin2 6,25,105,GUISoundText4 GUIOuttextwin2 6,25,115,GUISoundTextH - cmp byte[OSPort],3 - je near .win32s +; cmp byte[OSPort],3 +; je near .win32s +%ifdef __MSDOS__ GUIOuttextwin2 6,25,125,GUISoundTextI -.win32s +%endif +;.win32s %ifdef __WIN32__ GUIOuttextwin2 6,25,125,GUISoundTextIb %endif @@ -2082,10 +2122,12 @@ DisplayGUISound: je .nocheckbox1b mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox1b - cmp byte[OSPort],3 - je near .win32 +; cmp byte[OSPort],3 +; je near .win32 +%ifdef __MSDOS__ GUIDisplayIconWin 6,11,39,[GUITemp] -.win32 +%endif +;.win32 mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[SoundNoiseDis],0 je .nocheckbox2 @@ -2098,14 +2140,16 @@ DisplayGUISound: mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox3 GUIDisplayIconWin 6,11,111,[GUITemp] - cmp byte[OSPort],3 - je near .nocheckbox42 +; cmp byte[OSPort],3 +; je near .nocheckbox42 +%ifdef __MSDOS__ mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[Surround],0 je .nocheckbox4 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox4 GUIDisplayIconWin 6,11,121,[GUITemp] +%endif .nocheckbox42 %ifdef __WIN32__ mov dword[GUITemp],GUIIconDataCheckBoxUC @@ -4261,10 +4305,12 @@ DisplayGameOptns: GUIOuttextwin2 9,9,78,GUIGameOptnsTextF GUIOuttextwin2 9,9,86,GUIGameOptnsTextG GUIOuttextwin2 9,9,94,GUIGameOptnsTextT - cmp byte[OSPort],3 - jne near .notwin32 +; cmp byte[OSPort],3 +; jne near .notwin32 +%ifndef __MSDOS__ GUIOuttextwin2 9,109,46,GUIGameOptnsTextS -.notwin32 +%endif +;.notwin32 GUIOuttextwin2 9,109,54,GUIGameOptnsTextH GUIOuttextwin2 9,109,62,GUIGameOptnsTextM GUIOuttextwin2 9,109,70,GUIGameOptnsTextN @@ -4362,10 +4408,12 @@ DisplayGameOptns: GUIOuttextwin2 9,8,77,GUIGameOptnsTextF GUIOuttextwin2 9,8,85,GUIGameOptnsTextG GUIOuttextwin2 9,8,94,GUIGameOptnsTextT - cmp byte[OSPort],3 - jne near .notwin32b +; cmp byte[OSPort],3 +; jne near .notwin32b +%ifndef __MSDOS__ GUIOuttextwin2 9,108,45,GUIGameOptnsTextS -.notwin32b +%endif +;.notwin32b GUIOuttextwin2 9,108,53,GUIGameOptnsTextH GUIOuttextwin2 9,108,61,GUIGameOptnsTextM GUIOuttextwin2 9,108,69,GUIGameOptnsTextN @@ -4443,10 +4491,12 @@ DisplayGameOptns: DGOptnsDrawBox 78,76,[KeyWinDisble] DGOptnsDrawBox 78,84,[KeyOffsetMSw] DGOptnsDrawBox 78,92,[KeySlowDown] - cmp byte[OSPort],3 - jne near .notwin32c +; cmp byte[OSPort],3 +; jne near .notwin32c +%ifndef __MSDOS__ DGOptnsDrawBox 178,44,[KeyRewind] -.notwin32c +%endif +;.notwin32c DGOptnsDrawBox 178,52,[KeyFastFrwrd] DGOptnsDrawBox 178,60,[KeyVolUp] DGOptnsDrawBox 178,68,[KeyVolDown] diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index eaa42830..4928f90c 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -26,7 +26,7 @@ EXTSYM inittableb,inittablec,FPUCopy,newgfx16b,cfgreinittime,EndMessage EXTSYM Open_File,Read_File,Write_File,Close_File,Output_Text,Get_Key,CNetType EXTSYM Delete_File,Get_First_Entry,Get_Next_Entry,Change_Dir,Get_Dir,InitDSP EXTSYM Remove_Dir,Change_Single_Dir,Create_Dir,Get_Memfree,Create_File -EXTSYM OSPort +;EXTSYM OSPort EXTSYM SPCDisable,osm2dis,CurRecv,BackupSystemVars EXTSYM SnowData,SnowVelDist EXTSYM cvidmode, newengen, cfgnewgfx, GUI16VID @@ -3647,14 +3647,14 @@ InvalidZip db 'ZSNES Version A does not support .ZIP files.',13,10,'Please use V ZipError db 0 UnZipFile: - cmp byte[OSPort],1 - jne .noasm - mov ax,03h - int 10h - mov edx,InvalidZip - call PrintStr - jmp DosExit -.noasm +; cmp byte[OSPort],1 +; jne .noasm +; mov ax,03h +; int 10h +; mov edx,InvalidZip +; call PrintStr +; jmp DosExit +;.noasm ; get Drive/Dir %ifdef __LINUX__ mov ebx,GUIcurrentdir diff --git a/zsnes/src/linux/sdlintrf.asm b/zsnes/src/linux/sdlintrf.asm index b43e414a..ae73c6f0 100644 --- a/zsnes/src/linux/sdlintrf.asm +++ b/zsnes/src/linux/sdlintrf.asm @@ -145,7 +145,7 @@ NEWSYM WinIntRFAsmStart SECTION .data -NEWSYM OSPort, db 3 ; 0 = DOS (C), 1 = DOS (ASM), 2 = Linux, 3 = Win95 +;NEWSYM OSPort, db 3 ; 0 = DOS (C), 1 = DOS (ASM), 2 = Linux, 3 = Win95 SECTION .text NEWSYM StartUp diff --git a/zsnes/src/win/winintrf.asm b/zsnes/src/win/winintrf.asm index 01b8cc52..4a1ea292 100644 --- a/zsnes/src/win/winintrf.asm +++ b/zsnes/src/win/winintrf.asm @@ -152,7 +152,7 @@ EXTSYM _imp__GetLocalTime@4 SECTION .data -NEWSYM OSPort, db 3 ; 0 = DOS (C), 1 = DOS (ASM), 2 = Linux, 3 = Win95 +;NEWSYM OSPort, db 3 ; 0 = DOS (C), 1 = DOS (ASM), 2 = Linux, 3 = Win95 SECTION .text NEWSYM StartUp