Made battery for SFX more meaningful, fixed SRAM not being cleared.
This commit is contained in:
@@ -1394,17 +1394,17 @@ NEWSYM endprog
|
|||||||
call Write_File
|
call Write_File
|
||||||
call Close_File
|
call Close_File
|
||||||
.nosram
|
.nosram
|
||||||
cmp byte[SFXSRAM],0
|
cmp byte[SFXBATT],0
|
||||||
je .nosfxsram
|
je .nosfxbatt
|
||||||
mov edx,fnames+1
|
mov edx,fnames+1
|
||||||
call Create_File
|
call Create_File
|
||||||
jc .nosfxsram
|
jc .nosfxbatt
|
||||||
mov bx,ax
|
mov bx,ax
|
||||||
mov ecx,65536
|
mov ecx,65536
|
||||||
mov edx,[sfxramdata]
|
mov edx,[sfxramdata]
|
||||||
call Write_File
|
call Write_File
|
||||||
call Close_File
|
call Close_File
|
||||||
.nosfxsram
|
.nosfxbatt
|
||||||
|
|
||||||
cmp byte[SETAEnable],0
|
cmp byte[SETAEnable],0
|
||||||
je .nosetasram
|
je .nosetasram
|
||||||
@@ -1521,7 +1521,7 @@ NEWSYM initaddrl, dd 0 ; initial address location
|
|||||||
NEWSYM NetSent, dd 0
|
NEWSYM NetSent, dd 0
|
||||||
NEWSYM nextframe, dd 0 ; tick count for timer
|
NEWSYM nextframe, dd 0 ; tick count for timer
|
||||||
NEWSYM curfps, db 0 ; frame/sec for current screen
|
NEWSYM curfps, db 0 ; frame/sec for current screen
|
||||||
NEWSYM SFXSRAM, db 0
|
NEWSYM SFXBATT, db 0
|
||||||
NEWSYM newgfxerror, db 'NEED MEMORY FOR GFX ENGINE',0
|
NEWSYM newgfxerror, db 'NEED MEMORY FOR GFX ENGINE',0
|
||||||
NEWSYM newgfxerror2, db 'NEED 320x240 FOR NEW GFX 16B',0
|
NEWSYM newgfxerror2, db 'NEED 320x240 FOR NEW GFX 16B',0
|
||||||
;newgfxerror db 'NEW GFX IN 16BIT IS N/A',0
|
;newgfxerror db 'NEW GFX IN 16BIT IS N/A',0
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
;along with this program; if not, write to the Free Software
|
;along with this program; if not, write to the Free Software
|
||||||
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
|
||||||
; Sorry. The GUI code is a total mess. One problem I encountered is that
|
; Sorry. The GUI code is a total mess. One problem I encountered is that
|
||||||
; there seems to be a bug in nasm with using math calculations combined
|
; there seems to be a bug in nasm with using math calculations combined
|
||||||
; with macros within macros, so in some macro definitions, I had to
|
; with macros within macros, so in some macro definitions, I had to
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
; ButtonProcess - routines that processes boxed buttons
|
; ButtonProcess - routines that processes boxed buttons
|
||||||
; CheatCodeSearchInit
|
; CheatCodeSearchInit
|
||||||
; guiwincontrol
|
; guiwincontrol
|
||||||
|
|
||||||
|
|
||||||
%include "macros.mac"
|
%include "macros.mac"
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ EXTSYM Voice0Status, Voice1Status, Voice2Status, Voice3Status, Voice4Status
|
|||||||
EXTSYM Voice5Status, Voice6Status, Voice7Status, romtype, SetIRQVectors
|
EXTSYM Voice5Status, Voice6Status, Voice7Status, romtype, SetIRQVectors
|
||||||
EXTSYM ClearScreen, statesaver, loadstate2, vidbuffer, ASCII2Font, hirestiledat
|
EXTSYM ClearScreen, statesaver, loadstate2, vidbuffer, ASCII2Font, hirestiledat
|
||||||
EXTSYM showallext, ROMTypeNOTFound, scanlines,statefileloc,pl1selk,pl2selk
|
EXTSYM showallext, ROMTypeNOTFound, scanlines,statefileloc,pl1selk,pl2selk
|
||||||
EXTSYM fnamest,sprlefttot,spritetablea,fnames,SFXSRAM,sfxramdata,setaramdata,SETAEnable,cgram,srama
|
EXTSYM fnamest,sprlefttot,spritetablea,fnames,SFXBATT,sfxramdata,setaramdata,SETAEnable,cgram,srama
|
||||||
EXTSYM tempco0,prevbright,maxbr,prevpal,coladdr,coladdg,coladdb
|
EXTSYM tempco0,prevbright,maxbr,prevpal,coladdr,coladdg,coladdb
|
||||||
EXTSYM scaddtype,ScreenScale,vesa2red10,initvideo2,initvideo,pressed,UpdateDevices
|
EXTSYM scaddtype,ScreenScale,vesa2red10,initvideo2,initvideo,pressed,UpdateDevices
|
||||||
EXTSYM memtabler8,memtablew8,writeon,pl1contrl,pl2contrl,JoyRead,SetInputDevice
|
EXTSYM memtabler8,memtablew8,writeon,pl1contrl,pl2contrl,JoyRead,SetInputDevice
|
||||||
@@ -145,7 +145,7 @@ EXTSYM CReadHead,ReadHead,CFWriteHead,CFWriteStart
|
|||||||
EXTSYM JoyX,JoyY,JoyMinX,JoyMinY,JoyMaxX,JoyMaxY,JoyMinX209,JoyMaxX209
|
EXTSYM JoyX,JoyY,JoyMinX,JoyMinY,JoyMaxX,JoyMaxY,JoyMinX209,JoyMaxX209
|
||||||
EXTSYM JoyMinY209,JoyMaxY209,GetCoords,GetCoords3
|
EXTSYM JoyMinY209,JoyMaxY209,GetCoords,GetCoords3
|
||||||
EXTSYM MultiTap,SFXEnable
|
EXTSYM MultiTap,SFXEnable
|
||||||
EXTSYM RestoreSystemVars
|
EXTSYM RestoreSystemVars
|
||||||
EXTSYM TCPIPStartServer
|
EXTSYM TCPIPStartServer
|
||||||
EXTSYM TCPIPInitConnectToServer
|
EXTSYM TCPIPInitConnectToServer
|
||||||
EXTSYM TCPIPWaitForConnection
|
EXTSYM TCPIPWaitForConnection
|
||||||
@@ -807,8 +807,6 @@ clearsram:
|
|||||||
inc eax
|
inc eax
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .loop
|
jnz .loop
|
||||||
cmp byte[SFXSRAM],0
|
|
||||||
je .nosfxsram
|
|
||||||
mov eax,[sfxramdata]
|
mov eax,[sfxramdata]
|
||||||
mov ecx,65536
|
mov ecx,65536
|
||||||
.loop2
|
.loop2
|
||||||
@@ -816,7 +814,6 @@ clearsram:
|
|||||||
inc eax
|
inc eax
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .loop2
|
jnz .loop2
|
||||||
.nosfxsram
|
|
||||||
|
|
||||||
cmp byte[SETAEnable],0
|
cmp byte[SETAEnable],0
|
||||||
je .nosetasram
|
je .nosetasram
|
||||||
@@ -1784,8 +1781,6 @@ NEWSYM StartGUI
|
|||||||
|
|
||||||
call SaveSramData
|
call SaveSramData
|
||||||
|
|
||||||
cmp byte[SFXSRAM],0
|
|
||||||
je .nosfxsram
|
|
||||||
clim
|
clim
|
||||||
mov edx,fnames+1
|
mov edx,fnames+1
|
||||||
call Create_File
|
call Create_File
|
||||||
@@ -1797,7 +1792,6 @@ NEWSYM StartGUI
|
|||||||
call Close_File
|
call Close_File
|
||||||
.nosfxramwrite
|
.nosfxramwrite
|
||||||
stim
|
stim
|
||||||
.nosfxsram
|
|
||||||
|
|
||||||
cmp byte[SETAEnable],0
|
cmp byte[SETAEnable],0
|
||||||
je .nosetasram
|
je .nosetasram
|
||||||
|
|||||||
@@ -1422,7 +1422,7 @@ SECTION .data
|
|||||||
SECTION .text
|
SECTION .text
|
||||||
|
|
||||||
transfersram:
|
transfersram:
|
||||||
cmp byte[SFXSRAM],0
|
cmp byte[SFXBATT],0
|
||||||
jne .nosram
|
jne .nosram
|
||||||
cmp byte[SA1Enable],1
|
cmp byte[SA1Enable],1
|
||||||
je .nosram
|
je .nosram
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ EXTSYM SRAMDir,SRAMDrive,cfgloadsdir,fnamest,statefileloc
|
|||||||
EXTSYM ForcePal,ForceROMTiming,ForceHiLoROM,InitDir,InitDrive,enterpress,frameskip
|
EXTSYM ForcePal,ForceROMTiming,ForceHiLoROM,InitDir,InitDrive,enterpress,frameskip
|
||||||
EXTSYM maxromspace,curromspace,infoloc, patchfile
|
EXTSYM maxromspace,curromspace,infoloc, patchfile
|
||||||
EXTSYM gotoroot,headdata,printnum,romispal
|
EXTSYM gotoroot,headdata,printnum,romispal
|
||||||
EXTSYM InitFxTables,SFXSRAM,SfxR1,SfxR2,SfxSCMR,SfxSFR,finterleave
|
EXTSYM InitFxTables,SFXBATT,SfxR1,SfxR2,SfxSCMR,SfxSFR,finterleave
|
||||||
EXTSYM initregr,initregw,memtabler16,DSP1Read16b3F,memaccessbankr16
|
EXTSYM initregr,initregw,memtabler16,DSP1Read16b3F,memaccessbankr16
|
||||||
EXTSYM memtabler8,DSP1Read8b3F,memaccessbankr8,memtablew16,DSP1Write16b
|
EXTSYM memtabler8,DSP1Read8b3F,memaccessbankr8,memtablew16,DSP1Write16b
|
||||||
EXTSYM memaccessbankw16,memtablew8,DSP1Write8b,memaccessbankw8,DSP1Write16b3F
|
EXTSYM memaccessbankw16,memtablew8,DSP1Write8b,memaccessbankw8,DSP1Write16b3F
|
||||||
@@ -294,7 +294,7 @@ NEWSYM init
|
|||||||
; above (by placing two digits in the extension). This is so
|
; above (by placing two digits in the extension). This is so
|
||||||
; as not to break any other code later on which depends
|
; as not to break any other code later on which depends
|
||||||
; on it being present.
|
; on it being present.
|
||||||
mov ebx,[statefileloc]
|
mov ebx,[statefileloc]
|
||||||
%ifdef __LINUX__
|
%ifdef __LINUX__
|
||||||
mov word[fnamest+ebx-1],'st'
|
mov word[fnamest+ebx-1],'st'
|
||||||
%else
|
%else
|
||||||
@@ -4424,7 +4424,7 @@ NEWSYM CheckROMType
|
|||||||
mov byte[RTCEnable],0
|
mov byte[RTCEnable],0
|
||||||
mov byte[SA1Enable],0
|
mov byte[SA1Enable],0
|
||||||
mov byte[SDD1Enable],0
|
mov byte[SDD1Enable],0
|
||||||
mov byte[SFXSRAM],0
|
mov byte[SFXBATT],0
|
||||||
mov byte[OBCEnable],0
|
mov byte[OBCEnable],0
|
||||||
mov byte[CHIPSRAM],0
|
mov byte[CHIPSRAM],0
|
||||||
mov byte[SGBEnable],0
|
mov byte[SGBEnable],0
|
||||||
@@ -4507,14 +4507,14 @@ int 3h
|
|||||||
cmp ax,01520h
|
cmp ax,01520h
|
||||||
jne .notSFXC
|
jne .notSFXC
|
||||||
mov byte[SFXEnable],1
|
mov byte[SFXEnable],1
|
||||||
mov byte[SFXSRAM],1 ;Contains Battery
|
mov byte[SFXBATT],1 ;Contains Battery
|
||||||
jmp .endchpdtct
|
jmp .endchpdtct
|
||||||
.notSFXC
|
.notSFXC
|
||||||
cmp ax,01A20h
|
cmp ax,01A20h
|
||||||
jne .notSFXD
|
jne .notSFXD
|
||||||
mov byte[SFXEnable],1
|
mov byte[SFXEnable],1
|
||||||
|
mov byte[SFXBATT],1 ;Contains Battery
|
||||||
mov byte[SFXIRQFlag],1
|
mov byte[SFXIRQFlag],1
|
||||||
mov byte[SFXSRAM],1 ;Contains Battery
|
|
||||||
jmp .endchpdtct
|
jmp .endchpdtct
|
||||||
.notSFXD
|
.notSFXD
|
||||||
cmp ax,05535h
|
cmp ax,05535h
|
||||||
|
|||||||
Reference in New Issue
Block a user