From 86234caa4ec8b1cb7274cfb0b2ae1bcebd4a0867 Mon Sep 17 00:00:00 2001 From: theoddone33 <> Date: Mon, 14 Feb 2005 02:14:58 +0000 Subject: [PATCH] Clean up ui.asm a little: - "welcome" symbol removed - refernces to 'welcome' for version checking replaced with references to versionNumber uint - versionNumber added - Other stuff. --- zsnes/src/cpu/execute.asm | 14 -------------- zsnes/src/gui/gui.asm | 2 +- zsnes/src/gui/guimisc.inc | 2 +- zsnes/src/gui/guinetpl.inc | 25 +++++++++++++------------ zsnes/src/init.asm | 8 +++++--- zsnes/src/ui.asm | 26 ++++++-------------------- zsnes/src/uic.c | 1 + 7 files changed, 27 insertions(+), 51 deletions(-) diff --git a/zsnes/src/cpu/execute.asm b/zsnes/src/cpu/execute.asm index 0d612afd..cae6e866 100644 --- a/zsnes/src/cpu/execute.asm +++ b/zsnes/src/cpu/execute.asm @@ -975,24 +975,10 @@ reexecuteb2: jnz near endprog jmp StartGUI -SECTION .data -NEWSYM EndMessage -db ' ',13,10,0 -SECTION .text - NEWSYM endprog call deinitvideo cmp byte[previdmode],3 - jne .noendmessage - mov byte[EndMessage+13],',' - mov eax,[welcome+9] - mov [EndMessage+9],eax - mov ax,[welcome+7] - mov [EndMessage+7],ax - mov edx,EndMessage - call PrintStr -.noendmessage ; mov eax,[opcd] ; mov eax,[numinst] ;Temporary diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 49edf449..a040097d 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -93,6 +93,7 @@ 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,spchalted +EXTSYM versionNumber EXTSYM NextLineCache,VidStartDraw,ResetTripleBuf,GUINGVID EXTSYM ScanCodeListing,AdjustFrequency,GUISaveVars,Init_Mouse EXTSYM Get_MouseData,Set_MouseXMax,Set_MouseYMax,Set_MousePosition,Get_MousePositionDisplacement @@ -104,7 +105,6 @@ EXTSYM printnum EXTSYM MMXCheck EXTSYM SaveCombFile EXTSYM NetSent,valuea -EXTSYM welcome EXTSYM showinfogui EXTSYM BackupCVFrame, tempedx, tempesi, tempedi, tempebp EXTSYM Wait1SecWin,ClearUDPStuff diff --git a/zsnes/src/gui/guimisc.inc b/zsnes/src/gui/guimisc.inc index 21fc4372..3ab7dedf 100644 --- a/zsnes/src/gui/guimisc.inc +++ b/zsnes/src/gui/guimisc.inc @@ -81,7 +81,7 @@ MovieRecord: .noappend mov al,[soundon] mov [RecData],al - mov eax,[welcome+8] + mov eax,[versionNumber] mov [RecData+1],eax mov byte[RecData+2],1 mov eax,[timer2upd] diff --git a/zsnes/src/gui/guinetpl.inc b/zsnes/src/gui/guinetpl.inc index 674e1cf7..49abb68a 100644 --- a/zsnes/src/gui/guinetpl.inc +++ b/zsnes/src/gui/guinetpl.inc @@ -530,14 +530,15 @@ SECTION .text call RemoteSendChar mov al,222 call RemoteSendChar - mov al,[welcome+7] - call RemoteSendChar - mov al,[welcome+9] - call RemoteSendChar - mov al,[welcome+10] - call RemoteSendChar - mov al,[welcome+11] - call RemoteSendChar + ; Dan - Change this from looking into the welcome message forthe version. + mov al,[versionNumber + 0] + call RemoteSendChar + mov al,[versionNumber + 1] + call RemoteSendChar + mov al,[versionNumber + 2] + call RemoteSendChar + mov al,[versionNumber + 3] + call RemoteSendChar mov al,[soundon] call RemoteSendChar cmp al,byte[CNetType] @@ -580,28 +581,28 @@ SECTION .text .nocheck3 cmp byte[IDCheckPos],3 jne .nocheck4 - cmp dl,[welcome+7] + cmp dl,[versionNumber + 0] jne near .invversion mov byte[IDCheckPos],4 ret .nocheck4 cmp byte[IDCheckPos],4 jne .nocheck5 - cmp dl,[welcome+9] + cmp dl,[versionNumber + 1] jne near .invversion mov byte[IDCheckPos],5 ret .nocheck5 cmp byte[IDCheckPos],5 jne .nocheck6 - cmp dl,[welcome+10] + cmp dl,[versionNumber + 2] jne .invversion mov byte[IDCheckPos],6 ret .nocheck6 cmp byte[IDCheckPos],6 jne .nocheck7 - cmp dl,[welcome+11] + cmp dl,[versionNumber + 3] jne .invversion mov byte[IDCheckPos],9 ret diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index 17ee905a..8c1922a8 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -25,7 +25,7 @@ EXTSYM makesprprtable,romloadskip,start65816,startdebugger,SfxR0 EXTSYM MovieProcessing EXTSYM MovieFileHand,filefound,inittable,SA1inittable EXTSYM MessageOn,Msgptr,MsgCount,sndrot,GenerateBank0Table,SnowTimer -EXTSYM inittableb,inittablec,newgfx16b,cfgreinittime,EndMessage +EXTSYM inittableb,inittablec,newgfx16b,cfgreinittime 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,InitDSP EXTSYM Remove_Dir,Change_Single_Dir,Create_Dir,Get_Memfree,Create_File @@ -322,7 +322,9 @@ NEWSYM init mov byte[newengen],1 mov byte[cfgnewgfx],1 .noforce - + ; Dan - I don't know what this is, but all it seems to do is update + ; EndMessage which I've nuked. +%if 0 mov ebx,ebm mov eax,EndMessage mov dh,17h @@ -344,7 +346,7 @@ NEWSYM init inc ebx dec ch jnz .loopen - +%endif cmp byte[yesoutofmemory],1 jne .noout diff --git a/zsnes/src/ui.asm b/zsnes/src/ui.asm index 188a323c..3aabbfe4 100644 --- a/zsnes/src/ui.asm +++ b/zsnes/src/ui.asm @@ -20,11 +20,11 @@ %include "macros.mac" -EXTSYM getcfg,soundon,SBHDMA,StereoSound,init,GUIRestoreVars,GUIClick,MouseDis -EXTSYM ConvertJoyMap,ConvertJoyMap1,ConvertJoyMap2,printhex,InitSPC +EXTSYM getcfg,SBHDMA,StereoSound,init,GUIRestoreVars,GUIClick,MouseDis +EXTSYM ConvertJoyMap,ConvertJoyMap1,ConvertJoyMap2,printhex EXTSYM StartUp,PrintStr,WaitForKey,PrintChar,ZFileSystemInit -EXTSYM SPCDisable,SystemInit,allocmem -EXTSYM FPSOn,FPSAtStart,cfgsoundon +EXTSYM SystemInit,allocmem +EXTSYM cfgsoundon EXTSYM xa EXTSYM ram7fa,wramdataa EXTSYM malloc,free @@ -42,18 +42,14 @@ EXTSYM frameskip,BitConv32Ptr,spcBuffera,spritetablea,vcache2bs EXTSYM vcache4bs,vcache8bs,RGBtoYUVPtr,newgfx16b,vidbuffer,vidbufferofsa EXTSYM vidbufferofsmos,ngwinptr,vidbufferofsb,headdata,romdata,sfxramdata EXTSYM setaramdata,wramdata,ram7f,vram,sram,debugbuf,regptr,regptw,vcache2b -EXTSYM vcache4b,vcache8b,fname,fnames,fnamest,filefound,vidbufferofsc,DSPDisable -EXTSYM gammalevel,gammalevel16b,Sup48mbit,Sup16mbit,guioff +EXTSYM vcache4b,vcache8b,fname,fnames,fnamest,filefound,vidbufferofsc +EXTSYM Sup48mbit,Sup16mbit,guioff %ifdef __LINUX__ EXTSYM LinuxExit EXTSYM GetFilename %endif -%ifdef OPENSPC -EXTSYM OSPC_Init -%endif - ; Function 0501h ; User Interface @@ -71,16 +67,6 @@ SECTION .data NEWSYM mydebug, db '',13,10,0 NEWSYM outofmem, db 'You don',39,'t have enough memory to run this program!',13,10,0 -NEWSYM welcome - db 'ZSNES v',ZVERSION,' (c) 1997-2005, ZSNES Team',13,10,13,10 - db 'Be sure to check http://www.zsnes.com/ for the latest version.',13,10 - db 'Please report crashes to zsnes-devel@lists.sourceforge.net.',13,10,13,10 - db 'ZSNES is written by the ZSNES Team (See AUTHORS.TXT)',13,10 - db 'ZSNES comes with ABSOLUTELY NO WARRANTY. This is free software,',10,13 - db 'and you are welcome to redistribute it under certain conditions;',10,13 - db 'please read ',39,'LICENSE.TXT',39,' thoroughly before doing so.',10,13,10,13 - db 'Use ZSNES -? for command line definitions.',13,10,13,10,0 - ;cpuidfname db 'nocpuzid.dat',0 ;cpuidtext db 'NOTE: If ZSNES crashes here, then please re-run. ',0 ;cpuidtext2 db 13,' ',13,0 diff --git a/zsnes/src/uic.c b/zsnes/src/uic.c index e1c8811a..6c77181c 100644 --- a/zsnes/src/uic.c +++ b/zsnes/src/uic.c @@ -199,6 +199,7 @@ extern unsigned char spcon; extern unsigned char FPSOn; extern unsigned char FPSAtStart; +const unsigned int versionNumber = 0x00000143; const char* ZVERSION = "Pre 1.43"; void zstart ()