5 #include <sys/farptr.h>
9 #include "dos-joystick.h"
10 #include "dos-video.h"
11 #include "dos-sound.h"
12 #include "../common/args.h"
13 #include "../common/config.h"
15 /* _CRT0_FLAG_LOCK_MEMORY might not always result in all memory being locked.
16 Bummer. I'll add code to explicitly lock the data touched by the sound
17 interrupt handler(and the handler itself), if necessary(though that might
18 be tricky...). I'll also to cover the data the keyboard
19 interrupt handler touches.
22 int _crt0_startup_flags = _CRT0_FLAG_FILL_SBRK_MEMORY | _CRT0_FLAG_LOCK_MEMORY | _CRT0_FLAG_USE_DOS_SLASHES;
29 CFGSTRUCT DriverConfig[]={
34 NACA("joybmap",joyBMap),
40 "-vmode x Select video mode(all are 8 bpp).\n\
41 1 = 256x240 6 = 256x224(with scanlines)\n\
42 2 = 256x256 8 = 256x224\n\
43 3 = 256x256(with scanlines)\n\
44 -vsync x Wait for the screen's vertical retrace before updating the\n\
45 screen. Refer to the documentation for caveats.\n\
50 Otherwise, x = playback rate.\n\
51 -f8bit x Force 8-bit sound.\n\
54 -joy x Joystick mapped to virtual joystick x(1-4).\n\
55 0 = Disabled, reset configuration.\n\
58 ARGPSTRUCT DriverArgs[]={
59 {"-vmode",0,&FCEUDvmode,0},
60 {"-sound",0,&soundo,0},
61 {"-f8bit",0,&f8bit,0},
63 {"-vsync",0,&eoptions,0x8004},
67 void DoDriverArgs(void)
69 if(!joy) memset(joyBMap,0,4);
78 soundo=InitSB(soundo,f8bit?0:1);
84 void WriteSound(int32 *Buffer, int Count, int NoWaiting)
86 WriteSBSound(Buffer,Count,NoWaiting);
95 void DOSMemSet(uint32 A, uint8 V, uint32 count)
105 void GetBaseDirectory(char *BaseDirectory)
110 for(x=strlen(arg0);x>=0;x--)
112 if(arg0[x]=='/' || arg0[x]=='\\')
114 strncpy(BaseDirectory,arg0,x);
122 int main(int argc, char *argv[])
124 puts("\nStarting FCE Ultra "VERSION_STRING"...\n");
126 return(CLImain(argc,argv));