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.
This commit is contained in:
theoddone33
2005-02-14 02:14:58 +00:00
parent d8c162bbb0
commit 86234caa4e
7 changed files with 27 additions and 51 deletions

View File

@@ -975,24 +975,10 @@ reexecuteb2:
jnz near endprog jnz near endprog
jmp StartGUI jmp StartGUI
SECTION .data
NEWSYM EndMessage
db ' ',13,10,0
SECTION .text
NEWSYM endprog NEWSYM endprog
call deinitvideo call deinitvideo
cmp byte[previdmode],3 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,[opcd]
; mov eax,[numinst] ;Temporary ; mov eax,[numinst] ;Temporary

View File

@@ -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 Change_Drive,Change_Single_Dir,Change_Dir,Get_Dir,Get_First_Entry
EXTSYM Get_Next_Entry,Set_DTA_Address,timer2upd,curexecstate,TripBufAvail EXTSYM Get_Next_Entry,Set_DTA_Address,timer2upd,curexecstate,TripBufAvail
EXTSYM nmiprevaddrl,nmiprevaddrh,nmirept,nmiprevline,nmistatus,spcnumread,spchalted EXTSYM nmiprevaddrl,nmiprevaddrh,nmirept,nmiprevline,nmistatus,spcnumread,spchalted
EXTSYM versionNumber
EXTSYM NextLineCache,VidStartDraw,ResetTripleBuf,GUINGVID EXTSYM NextLineCache,VidStartDraw,ResetTripleBuf,GUINGVID
EXTSYM ScanCodeListing,AdjustFrequency,GUISaveVars,Init_Mouse EXTSYM ScanCodeListing,AdjustFrequency,GUISaveVars,Init_Mouse
EXTSYM Get_MouseData,Set_MouseXMax,Set_MouseYMax,Set_MousePosition,Get_MousePositionDisplacement EXTSYM Get_MouseData,Set_MouseXMax,Set_MouseYMax,Set_MousePosition,Get_MousePositionDisplacement
@@ -104,7 +105,6 @@ EXTSYM printnum
EXTSYM MMXCheck EXTSYM MMXCheck
EXTSYM SaveCombFile EXTSYM SaveCombFile
EXTSYM NetSent,valuea EXTSYM NetSent,valuea
EXTSYM welcome
EXTSYM showinfogui EXTSYM showinfogui
EXTSYM BackupCVFrame, tempedx, tempesi, tempedi, tempebp EXTSYM BackupCVFrame, tempedx, tempesi, tempedi, tempebp
EXTSYM Wait1SecWin,ClearUDPStuff EXTSYM Wait1SecWin,ClearUDPStuff

View File

@@ -81,7 +81,7 @@ MovieRecord:
.noappend .noappend
mov al,[soundon] mov al,[soundon]
mov [RecData],al mov [RecData],al
mov eax,[welcome+8] mov eax,[versionNumber]
mov [RecData+1],eax mov [RecData+1],eax
mov byte[RecData+2],1 mov byte[RecData+2],1
mov eax,[timer2upd] mov eax,[timer2upd]

View File

@@ -530,13 +530,14 @@ SECTION .text
call RemoteSendChar call RemoteSendChar
mov al,222 mov al,222
call RemoteSendChar call RemoteSendChar
mov al,[welcome+7] ; Dan - Change this from looking into the welcome message forthe version.
mov al,[versionNumber + 0]
call RemoteSendChar call RemoteSendChar
mov al,[welcome+9] mov al,[versionNumber + 1]
call RemoteSendChar call RemoteSendChar
mov al,[welcome+10] mov al,[versionNumber + 2]
call RemoteSendChar call RemoteSendChar
mov al,[welcome+11] mov al,[versionNumber + 3]
call RemoteSendChar call RemoteSendChar
mov al,[soundon] mov al,[soundon]
call RemoteSendChar call RemoteSendChar
@@ -580,28 +581,28 @@ SECTION .text
.nocheck3 .nocheck3
cmp byte[IDCheckPos],3 cmp byte[IDCheckPos],3
jne .nocheck4 jne .nocheck4
cmp dl,[welcome+7] cmp dl,[versionNumber + 0]
jne near .invversion jne near .invversion
mov byte[IDCheckPos],4 mov byte[IDCheckPos],4
ret ret
.nocheck4 .nocheck4
cmp byte[IDCheckPos],4 cmp byte[IDCheckPos],4
jne .nocheck5 jne .nocheck5
cmp dl,[welcome+9] cmp dl,[versionNumber + 1]
jne near .invversion jne near .invversion
mov byte[IDCheckPos],5 mov byte[IDCheckPos],5
ret ret
.nocheck5 .nocheck5
cmp byte[IDCheckPos],5 cmp byte[IDCheckPos],5
jne .nocheck6 jne .nocheck6
cmp dl,[welcome+10] cmp dl,[versionNumber + 2]
jne .invversion jne .invversion
mov byte[IDCheckPos],6 mov byte[IDCheckPos],6
ret ret
.nocheck6 .nocheck6
cmp byte[IDCheckPos],6 cmp byte[IDCheckPos],6
jne .nocheck7 jne .nocheck7
cmp dl,[welcome+11] cmp dl,[versionNumber + 3]
jne .invversion jne .invversion
mov byte[IDCheckPos],9 mov byte[IDCheckPos],9
ret ret

View File

@@ -25,7 +25,7 @@ EXTSYM makesprprtable,romloadskip,start65816,startdebugger,SfxR0
EXTSYM MovieProcessing EXTSYM MovieProcessing
EXTSYM MovieFileHand,filefound,inittable,SA1inittable EXTSYM MovieFileHand,filefound,inittable,SA1inittable
EXTSYM MessageOn,Msgptr,MsgCount,sndrot,GenerateBank0Table,SnowTimer 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 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 Delete_File,Get_First_Entry,Get_Next_Entry,Change_Dir,InitDSP
EXTSYM Remove_Dir,Change_Single_Dir,Create_Dir,Get_Memfree,Create_File EXTSYM Remove_Dir,Change_Single_Dir,Create_Dir,Get_Memfree,Create_File
@@ -322,7 +322,9 @@ NEWSYM init
mov byte[newengen],1 mov byte[newengen],1
mov byte[cfgnewgfx],1 mov byte[cfgnewgfx],1
.noforce .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 ebx,ebm
mov eax,EndMessage mov eax,EndMessage
mov dh,17h mov dh,17h
@@ -344,7 +346,7 @@ NEWSYM init
inc ebx inc ebx
dec ch dec ch
jnz .loopen jnz .loopen
%endif
cmp byte[yesoutofmemory],1 cmp byte[yesoutofmemory],1
jne .noout jne .noout

View File

@@ -20,11 +20,11 @@
%include "macros.mac" %include "macros.mac"
EXTSYM getcfg,soundon,SBHDMA,StereoSound,init,GUIRestoreVars,GUIClick,MouseDis EXTSYM getcfg,SBHDMA,StereoSound,init,GUIRestoreVars,GUIClick,MouseDis
EXTSYM ConvertJoyMap,ConvertJoyMap1,ConvertJoyMap2,printhex,InitSPC EXTSYM ConvertJoyMap,ConvertJoyMap1,ConvertJoyMap2,printhex
EXTSYM StartUp,PrintStr,WaitForKey,PrintChar,ZFileSystemInit EXTSYM StartUp,PrintStr,WaitForKey,PrintChar,ZFileSystemInit
EXTSYM SPCDisable,SystemInit,allocmem EXTSYM SystemInit,allocmem
EXTSYM FPSOn,FPSAtStart,cfgsoundon EXTSYM cfgsoundon
EXTSYM xa EXTSYM xa
EXTSYM ram7fa,wramdataa EXTSYM ram7fa,wramdataa
EXTSYM malloc,free EXTSYM malloc,free
@@ -42,18 +42,14 @@ EXTSYM frameskip,BitConv32Ptr,spcBuffera,spritetablea,vcache2bs
EXTSYM vcache4bs,vcache8bs,RGBtoYUVPtr,newgfx16b,vidbuffer,vidbufferofsa EXTSYM vcache4bs,vcache8bs,RGBtoYUVPtr,newgfx16b,vidbuffer,vidbufferofsa
EXTSYM vidbufferofsmos,ngwinptr,vidbufferofsb,headdata,romdata,sfxramdata EXTSYM vidbufferofsmos,ngwinptr,vidbufferofsb,headdata,romdata,sfxramdata
EXTSYM setaramdata,wramdata,ram7f,vram,sram,debugbuf,regptr,regptw,vcache2b EXTSYM setaramdata,wramdata,ram7f,vram,sram,debugbuf,regptr,regptw,vcache2b
EXTSYM vcache4b,vcache8b,fname,fnames,fnamest,filefound,vidbufferofsc,DSPDisable EXTSYM vcache4b,vcache8b,fname,fnames,fnamest,filefound,vidbufferofsc
EXTSYM gammalevel,gammalevel16b,Sup48mbit,Sup16mbit,guioff EXTSYM Sup48mbit,Sup16mbit,guioff
%ifdef __LINUX__ %ifdef __LINUX__
EXTSYM LinuxExit EXTSYM LinuxExit
EXTSYM GetFilename EXTSYM GetFilename
%endif %endif
%ifdef OPENSPC
EXTSYM OSPC_Init
%endif
; Function 0501h ; Function 0501h
; User Interface ; User Interface
@@ -71,16 +67,6 @@ SECTION .data
NEWSYM mydebug, db '',13,10,0 NEWSYM mydebug, db '',13,10,0
NEWSYM outofmem, db 'You don',39,'t have enough memory to run this program!',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 ;cpuidfname db 'nocpuzid.dat',0
;cpuidtext db 'NOTE: If ZSNES crashes here, then please re-run. ',0 ;cpuidtext db 'NOTE: If ZSNES crashes here, then please re-run. ',0
;cpuidtext2 db 13,' ',13,0 ;cpuidtext2 db 13,' ',13,0

View File

@@ -199,6 +199,7 @@ extern unsigned char spcon;
extern unsigned char FPSOn; extern unsigned char FPSOn;
extern unsigned char FPSAtStart; extern unsigned char FPSAtStart;
const unsigned int versionNumber = 0x00000143;
const char* ZVERSION = "Pre 1.43"; const char* ZVERSION = "Pre 1.43";
void zstart () void zstart ()