Cleaned up the source and fixed saving of config files on ALT-F4 exit. Commented some netplay stuff in zloader.c.
This commit is contained in:
@@ -40,7 +40,7 @@ EXTSYM GUIoldhand9s,GUIoldhand9o,GUIoldhand8s,GUIoldhand8o,GUIhandler9h
|
|||||||
EXTSYM GUIhandler8h,GUIinit18_2hz,dosmakepal,doschangepal,dosinitvideo
|
EXTSYM GUIhandler8h,GUIinit18_2hz,dosmakepal,doschangepal,dosinitvideo
|
||||||
EXTSYM dosinitvideo2,DosDrawScreen,cvidmode,vidbuffer,GUICPC,DosDrawScreenB
|
EXTSYM dosinitvideo2,DosDrawScreen,cvidmode,vidbuffer,GUICPC,DosDrawScreenB
|
||||||
EXTSYM DOSClearScreen,DosUpdateDevices,DOSJoyRead,pl1contrl,pl2contrl,pl3contrl
|
EXTSYM DOSClearScreen,DosUpdateDevices,DOSJoyRead,pl1contrl,pl2contrl,pl3contrl
|
||||||
EXTSYM pl4contrl,pl5contrl,BufferSizeW,BufferSizeB,ProcessSoundBuffer
|
EXTSYM pl4contrl,pl5contrl
|
||||||
EXTSYM GrayscaleMode
|
EXTSYM GrayscaleMode
|
||||||
|
|
||||||
; NOTE: For timing, Game60hzcall should be called at 50hz or 60hz (depending
|
; NOTE: For timing, Game60hzcall should be called at 50hz or 60hz (depending
|
||||||
@@ -1004,8 +1004,6 @@ NEWSYM UpdateDevices ; One-time input device init
|
|||||||
|
|
||||||
NEWSYM JoyRead
|
NEWSYM JoyRead
|
||||||
call DOSJoyRead
|
call DOSJoyRead
|
||||||
call SoundProcess ; Put the sound stuff here since it's
|
|
||||||
; called 60 times per second
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM SetInputDevice
|
NEWSYM SetInputDevice
|
||||||
@@ -1476,29 +1474,6 @@ NEWSYM StopSound
|
|||||||
NEWSYM StartSound
|
NEWSYM StartSound
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
NEWSYM SoundProcess ; This function is called ~60 times/s at full speed
|
|
||||||
.nosound
|
|
||||||
ret
|
|
||||||
.notdos
|
|
||||||
cmp byte[soundon],0
|
|
||||||
je .nosound
|
|
||||||
cmp byte[DSPDisable],1
|
|
||||||
je .nosound
|
|
||||||
mov eax,200 ; Size of 32-bit buffer in dwords
|
|
||||||
add eax,eax
|
|
||||||
mov dword[BufferSizeW],eax
|
|
||||||
add eax,eax
|
|
||||||
mov dword[BufferSizeB],eax
|
|
||||||
pushad
|
|
||||||
call ProcessSoundBuffer
|
|
||||||
popad
|
|
||||||
; DSPBuffer should contain the processed buffer in the specified size
|
|
||||||
; You will have to convert/clip it to 16-bit for actual sound process
|
|
||||||
ret
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NEWSYM Check60hz
|
NEWSYM Check60hz
|
||||||
; Call the timer update function here
|
; Call the timer update function here
|
||||||
ret
|
ret
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ EXTSYM Stop60HZ,initwinvideo,vesa2_rpos,vesa2_gpos,vesa2_bpos,vesa2_rposng
|
|||||||
EXTSYM vesa2_gposng,vesa2_bposng,vesa2_usbit,vesa2_clbit,vesa2_clbitng
|
EXTSYM vesa2_gposng,vesa2_bposng,vesa2_usbit,vesa2_clbit,vesa2_clbitng
|
||||||
EXTSYM vesa2_clbitng2,vesa2_clbitng3,vesa2red10,res640,res480,cbitmode,cvidmode
|
EXTSYM vesa2_clbitng2,vesa2_clbitng3,vesa2red10,res640,res480,cbitmode,cvidmode
|
||||||
EXTSYM vesa2_bits,vesa2_x,vesa2_y,genfulladdtab,GUICPC,drawscreenwin
|
EXTSYM vesa2_bits,vesa2_x,vesa2_y,genfulladdtab,GUICPC,drawscreenwin
|
||||||
EXTSYM ConvertToAFormat,UnusedBit,HalfTrans,UnusedBitXor,UnusedBit,UnusedBitXor
|
EXTSYM ConvertToAFormat,HalfTrans,UnusedBit,UnusedBitXor
|
||||||
EXTSYM ngrposng,nggposng,ngbposng,HalfTransB,HalfTransC,UpdateVFrame,GetMouseX
|
EXTSYM ngrposng,nggposng,ngbposng,HalfTransB,HalfTransC,UpdateVFrame,GetMouseX
|
||||||
EXTSYM GetMouseY,GetMouseMoveX,GetMouseMoveY,GetMouseButton,T36HZEnabled
|
EXTSYM GetMouseY,GetMouseMoveX,GetMouseMoveY,GetMouseButton,T36HZEnabled
|
||||||
EXTSYM MouseButton,Start36HZ,Stop36HZ,BufferSizeW,BufferSizeB,ProcessSoundBuffer
|
EXTSYM MouseButton,Start36HZ,Stop36HZ,BufferSizeW,BufferSizeB,ProcessSoundBuffer
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ EXTSYM vidbufferofsb,vidbuffer,clearwin,Stop60HZ,initwinvideo,vesa2_rpos
|
|||||||
EXTSYM vesa2_gpos,vesa2_bpos,vesa2_rposng,vesa2_gposng,vesa2_bposng,vesa2_usbit
|
EXTSYM vesa2_gpos,vesa2_bpos,vesa2_rposng,vesa2_gposng,vesa2_bposng,vesa2_usbit
|
||||||
EXTSYM vesa2_clbit,vesa2_clbitng,vesa2_clbitng2,vesa2_clbitng3,vesa2red10,res640
|
EXTSYM vesa2_clbit,vesa2_clbitng,vesa2_clbitng2,vesa2_clbitng3,vesa2red10,res640
|
||||||
EXTSYM res480,cbitmode,cvidmode,vesa2_bits,vesa2_x,vesa2_y,genfulladdtab,GUICPC
|
EXTSYM res480,cbitmode,cvidmode,vesa2_bits,vesa2_x,vesa2_y,genfulladdtab,GUICPC
|
||||||
EXTSYM drawscreenwin,ConvertToAFormat,UnusedBit,HalfTrans,UnusedBitXor,UnusedBit
|
EXTSYM drawscreenwin,ConvertToAFormat,HalfTrans,UnusedBitXor,UnusedBit
|
||||||
EXTSYM ngrposng,nggposng,ngbposng,HalfTransB,HalfTransC
|
EXTSYM ngrposng,nggposng,ngbposng,HalfTransB,HalfTransC
|
||||||
EXTSYM WinUpdateDevices,UpdateVFrame,GetMouseX,GetMouseY,GetMouseMoveX
|
EXTSYM WinUpdateDevices,UpdateVFrame,GetMouseX,GetMouseY,GetMouseMoveX
|
||||||
EXTSYM GetMouseMoveY,GetMouseButton,SetMouseMinX,SetMouseMaxX,SetMouseMinY
|
EXTSYM GetMouseMoveY,GetMouseButton,SetMouseMinX,SetMouseMaxX,SetMouseMinY
|
||||||
|
|||||||
@@ -526,14 +526,16 @@ aquireagain:;
|
|||||||
|
|
||||||
extern "C" void SaveSramData(void);
|
extern "C" void SaveSramData(void);
|
||||||
extern "C" void GUISaveVars(void);
|
extern "C" void GUISaveVars(void);
|
||||||
|
extern "C" void createnewcfg(void);
|
||||||
|
|
||||||
void ExitFunction()
|
void ExitFunction()
|
||||||
{
|
{
|
||||||
if (GUIOn2 == 0)
|
if (GUIOn2 == 0)
|
||||||
{
|
{
|
||||||
asm_call(SaveSramData);
|
asm_call(SaveSramData);
|
||||||
asm_call(GUISaveVars);
|
|
||||||
}
|
}
|
||||||
|
asm_call(GUISaveVars);
|
||||||
|
asm_call(createnewcfg);
|
||||||
|
|
||||||
// We need to clean up the debug window if it's running
|
// We need to clean up the debug window if it's running
|
||||||
|
|
||||||
|
|||||||
@@ -35,10 +35,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
#ifndef __MSDOS__
|
#ifndef __MSDOS__
|
||||||
extern unsigned char NetChatFirst, NetServer, NetNewNick, NetFilename[512], CmdLineTCPIPAddress,
|
extern unsigned char NetChatFirst, NetServer, NetNewNick, NetFilename[512], CmdLineTCPIPAddress,
|
||||||
NetQuitAfter, UDPConfig, CmdLineNetPlay;
|
NetQuitAfter, UDPConfig, CmdLineNetPlay;
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
void ImportDirectX();
|
void ImportDirectX();
|
||||||
@@ -184,6 +186,7 @@ static void display_help()
|
|||||||
#ifndef __LINUX__
|
#ifndef __LINUX__
|
||||||
put_line(" Microsoft-style options (/option) are also accepted");
|
put_line(" Microsoft-style options (/option) are also accepted");
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
#ifndef __MSDOS__
|
#ifndef __MSDOS__
|
||||||
put_line(" --Netplay Parameters--");
|
put_line(" --Netplay Parameters--");
|
||||||
put_line(" Commandline: /ABCDE <nickname> <fname> <IP Addy>");
|
put_line(" Commandline: /ABCDE <nickname> <fname> <IP Addy>");
|
||||||
@@ -201,6 +204,7 @@ static void display_help()
|
|||||||
put_line(" eg: zsnes /UCCN2 nickname /home/zuser/snesroms 202.36.124.28");
|
put_line(" eg: zsnes /UCCN2 nickname /home/zuser/snesroms 202.36.124.28");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user