1 diff -Nur xmame-0.104.orig/Makefile xmame-0.104/Makefile
2 --- xmame-0.104.orig/Makefile 2006-02-10 11:21:08.000000000 -0500
3 +++ xmame-0.104/Makefile 2006-05-08 08:03:45.000000000 -0400
5 ###########################################################################
7 # Uncomment one of these.
13 # example for a tiny compile
18 ###########################################################################
20 # means fewer frames to be skipped and better graphics, but `gcc' works
21 # just as well. However, stay away from the `cc' Ultrix compiler if
23 +RANLIB = bfin-uclinux-ranlib
25 +CC = bfin-uclinux-gcc
39 # Compiler for host compilations in cross-compiling environments (used
40 # in src/unix/unix.mak for m68k).
47 ###########################################################################
49 ###########################################################################
56 # GCC on x86 with some optimizations
57 # CFLAGS = -O2 -mtune=i686 -fomit-frame-pointer -fstrength-reduce -ffast-math
59 #########################################################################
61 # Check for C89 + GNU extensions compliance.
62 - CFLAGS += -std=gnu89
63 + #CFLAGS += -std=gnu89
69 # Don't warn about unused variables.
70 - CFLAGS += -Wno-unused
71 + #CFLAGS += -Wno-unused
73 # Warn about declarations after statements.
74 # CFLAGS += -Wdeclaration-after-statement
81 ###########################################################################
83 ###########################################################################
85 ###########################################################################
88 +ifeq ($(MY_CPU), bf537)
89 +LD = $(CC) -Wl,-elf2flt="-s 262144"
94 # For a Linux/PowerPC system.
95 # LD = $(CC) -Wl,-s,--relax
98 # Does your platform have ranlib? Leave this untouched unless you are
99 # using IRIX, Unixware 7, or the Intel C++ Compiler.
104 @@ -502,10 +516,10 @@
105 ###########################################################################
107 # Uncomment next line to build expat as part of the build.
111 # Uncomment next line to build zlib as part of the build.
115 # Does your system support the gettimeofday() function? If so, we
116 # encourage you to enable this feature. Otherwise, comment it out.
118 BINDIR = $(PREFIX)/bin
119 MANDIR = $(PREFIX)/man/man6
122 +MYROOT=/home/lee/mame/xmame-0.104/root
123 # This is the default path for ROMs and other data files.
124 -XMAMEROOT = $(PREFIX)/share/x$(TARGET)
125 +#XMAMEROOT = $(PREFIX)/share/x$(TARGET)
126 +XMAMEROOT = $(MYROOT)/x$(TARGET)
127 # This is the default path for system-wide configuration files.
128 SYSCONFDIR = $(XMAMEROOT)
131 ###########################################################################
132 # Architecture; choose your CPU (only one!!)
133 ###########################################################################
140 # i386, no asm -- needed for the Intel C++ compiler, which does not fully
141 # understand GCC's inline assembly syntax, though you may still enable
145 # SDL joystick support.
149 # This will enable the use of the Happ Controls UGCI(tm) USB devices'
150 # Coin/Start inputs using the libugci library available from
153 # SOUND_ARTS_TEIRA = 1
154 # SOUND_ARTS_SMOTEK = 1
160 @@ -701,10 +718,10 @@
163 # X11 (including Glide & OpenGL if enabled below)
164 -DISPLAY_METHOD = x11
165 +# DISPLAY_METHOD = x11
168 -# DISPLAY_METHOD = SDL
169 + DISPLAY_METHOD = SDL
171 # SVGALib, only supported under Linux
172 # DISPLAY_METHOD = svgalib
173 @@ -729,10 +746,10 @@
174 # Uncomment any extensions you wish to use.
176 # MIT-Shared Memory X Extensions
180 # Use Xv extension for hardware scaling.
184 # Enable XFree86 DGA. This also causes "make install" to set the suid bit
187 # X11LIB = -L/usr/lib/X11
189 # Standard location for XFree86
190 -X11INC = -I/usr/X11R6/include
191 -X11LIB = -L/usr/X11R6/lib
192 +#X11INC = -I/usr/X11R6/include
193 +#X11LIB = -L/usr/X11R6/lib
195 # Standard location for Sun systems
196 # X11INC = -I/usr/openwin/include
198 ##############################################################################
200 # The name of your sdl-config executable
201 -SDL_CONFIG = sdl-config
203 +#SDL_CONFIG = sdl-config
204 +SDL_CONFIG = './sdl_fake_config.sh'
206 ##############################################################################
207 # 3Dfx options (only needed when xfx or svgafx is the display method)
210 # If you wish you can add -DNOGLCHECKS for a small speedup, but this is not
211 # advised, or you can add -DGLDEBUG to get more verbose debugging messages.
213 +#GLCFLAGS += -D_X11_
215 # Uncomment to add more libraries that Mesa may require.
216 # GLLIBS += -lXmu -lXi
217 diff -Nur xmame-0.104.orig/makefile.unix xmame-0.104/makefile.unix
218 --- xmame-0.104.orig/makefile.unix 2006-02-10 11:21:08.000000000 -0500
219 +++ xmame-0.104/makefile.unix 2006-05-08 08:03:45.000000000 -0400
221 ###########################################################################
223 # Uncomment one of these.
229 # example for a tiny compile
234 ###########################################################################
236 # means fewer frames to be skipped and better graphics, but `gcc' works
237 # just as well. However, stay away from the `cc' Ultrix compiler if
239 +RANLIB = bfin-uclinux-ranlib
240 +AR = bfin-uclinux-ar
241 +CC = bfin-uclinux-gcc
255 # Compiler for host compilations in cross-compiling environments (used
256 # in src/unix/unix.mak for m68k).
263 ###########################################################################
265 ###########################################################################
272 # GCC on x86 with some optimizations
273 # CFLAGS = -O2 -mtune=i686 -fomit-frame-pointer -fstrength-reduce -ffast-math
274 @@ -183,13 +192,13 @@
275 #########################################################################
277 # Check for C89 + GNU extensions compliance.
278 - CFLAGS += -std=gnu89
279 + #CFLAGS += -std=gnu89
285 # Don't warn about unused variables.
286 - CFLAGS += -Wno-unused
287 + #CFLAGS += -Wno-unused
289 # Warn about declarations after statements.
290 # CFLAGS += -Wdeclaration-after-statement
297 ###########################################################################
299 ###########################################################################
301 ###########################################################################
304 +ifeq ($(MY_CPU), bf537)
305 +LD = $(CC) -Wl,-elf2flt="-s 262144"
310 # For a Linux/PowerPC system.
311 # LD = $(CC) -Wl,-s,--relax
314 # Does your platform have ranlib? Leave this untouched unless you are
315 # using IRIX, Unixware 7, or the Intel C++ Compiler.
320 @@ -502,10 +516,10 @@
321 ###########################################################################
323 # Uncomment next line to build expat as part of the build.
327 # Uncomment next line to build zlib as part of the build.
331 # Does your system support the gettimeofday() function? If so, we
332 # encourage you to enable this feature. Otherwise, comment it out.
334 BINDIR = $(PREFIX)/bin
335 MANDIR = $(PREFIX)/man/man6
338 +MYROOT=/home/lee/mame/xmame-0.104/root
339 # This is the default path for ROMs and other data files.
340 -XMAMEROOT = $(PREFIX)/share/x$(TARGET)
341 +#XMAMEROOT = $(PREFIX)/share/x$(TARGET)
342 +XMAMEROOT = $(MYROOT)/x$(TARGET)
343 # This is the default path for system-wide configuration files.
344 SYSCONFDIR = $(XMAMEROOT)
347 ###########################################################################
348 # Architecture; choose your CPU (only one!!)
349 ###########################################################################
356 # i386, no asm -- needed for the Intel C++ compiler, which does not fully
357 # understand GCC's inline assembly syntax, though you may still enable
361 # SDL joystick support.
365 # This will enable the use of the Happ Controls UGCI(tm) USB devices'
366 # Coin/Start inputs using the libugci library available from
369 # SOUND_ARTS_TEIRA = 1
370 # SOUND_ARTS_SMOTEK = 1
376 @@ -701,10 +718,10 @@
379 # X11 (including Glide & OpenGL if enabled below)
380 -DISPLAY_METHOD = x11
381 +# DISPLAY_METHOD = x11
384 -# DISPLAY_METHOD = SDL
385 + DISPLAY_METHOD = SDL
387 # SVGALib, only supported under Linux
388 # DISPLAY_METHOD = svgalib
389 @@ -729,10 +746,10 @@
390 # Uncomment any extensions you wish to use.
392 # MIT-Shared Memory X Extensions
396 # Use Xv extension for hardware scaling.
400 # Enable XFree86 DGA. This also causes "make install" to set the suid bit
403 # X11LIB = -L/usr/lib/X11
405 # Standard location for XFree86
406 -X11INC = -I/usr/X11R6/include
407 -X11LIB = -L/usr/X11R6/lib
408 +#X11INC = -I/usr/X11R6/include
409 +#X11LIB = -L/usr/X11R6/lib
411 # Standard location for Sun systems
412 # X11INC = -I/usr/openwin/include
414 ##############################################################################
416 # The name of your sdl-config executable
417 -SDL_CONFIG = sdl-config
419 +#SDL_CONFIG = sdl-config
420 +SDL_CONFIG = './sdl_fake_config.sh'
422 ##############################################################################
423 # 3Dfx options (only needed when xfx or svgafx is the display method)
426 # If you wish you can add -DNOGLCHECKS for a small speedup, but this is not
427 # advised, or you can add -DGLDEBUG to get more verbose debugging messages.
429 +#GLCFLAGS += -D_X11_
431 # Uncomment to add more libraries that Mesa may require.
432 # GLLIBS += -lXmu -lXi
433 diff -Nur xmame-0.104.orig/readme.537 xmame-0.104/readme.537
434 --- xmame-0.104.orig/readme.537 1969-12-31 19:00:00.000000000 -0500
435 +++ xmame-0.104/readme.537 2006-05-08 06:54:54.000000000 -0400
437 +1.edit sdl_fake_config.sh
441 \ No newline at end of file
442 diff -Nur xmame-0.104.orig/src/drivers/pacman.c xmame-0.104/src/drivers/pacman.c
443 --- xmame-0.104.orig/src/drivers/pacman.c 2006-02-10 11:20:48.000000000 -0500
444 +++ xmame-0.104/src/drivers/pacman.c 2006-05-08 08:05:51.000000000 -0400
445 @@ -4951,7 +4951,7 @@
446 GAME( 1983, sprglobp, suprglob, theglobp, theglobp, 0, ROT90, "Epos Corporation", "Super Glob (Pac-Man hardware)", GAME_SUPPORTS_SAVE )
447 GAME( 1984, beastf, suprglob, theglobp, theglobp, 0, ROT90, "Epos Corporation", "Beastie Feastie", GAME_SUPPORTS_SAVE )
448 GAME( 1984, drivfrcp, 0, drivfrcp, drivfrcp, 0, ROT90, "Shinkai Inc. (Magic Eletronics Inc. licence)", "Driving Force (Pac-Man conversion)", GAME_SUPPORTS_SAVE )
449 -GAME( 1985, 8bpm, 8ballact, 8bpm, 8bpm, 8bpm, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (Pac-Man conversion)", GAME_SUPPORTS_SAVE )
450 +//GAME( 1985, 8bpm, 8ballact, 8bpm, 8bpm, 8bpm, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (Pac-Man conversion)", GAME_SUPPORTS_SAVE )
451 GAME( 1985, porky, 0, porky, porky, porky, ROT90, "Shinkai Inc. (Magic Eletronics Inc. licence)", "Porky", GAME_NO_SOUND )
452 GAME( 1986, rocktrv2, 0, rocktrv2, rocktrv2, rocktrv2, ROT90, "Triumph Software Inc.", "MTV Rock-N-Roll Trivia (Part 2)", GAME_SUPPORTS_SAVE )
453 GAME( 1986, bigbucks, 0, bigbucks, bigbucks, 0, ROT90, "Dynasoft Inc.", "Big Bucks", GAME_SUPPORTS_SAVE )
454 diff -Nur xmame-0.104.orig/src/mame.mak xmame-0.104/src/mame.mak
455 --- xmame-0.104.orig/src/mame.mak 2006-02-10 11:20:48.000000000 -0500
456 +++ xmame-0.104/src/mame.mak 2006-05-08 08:04:44.000000000 -0400
500 @@ -103,57 +103,57 @@
589 diff -Nur xmame-0.104.orig/src/tiny.mak xmame-0.104/src/tiny.mak
590 --- xmame-0.104.orig/src/tiny.mak 2006-02-10 11:20:48.000000000 -0500
591 +++ xmame-0.104/src/tiny.mak 2006-05-08 08:04:44.000000000 -0400
593 # a tiny compile is without Neogeo games
594 -COREDEFS += -DTINY_NAME="driver_robby,driver_gridlee,driver_polyplay"
595 -COREDEFS += -DTINY_POINTER="&driver_robby,&driver_gridlee,&driver_polyplay"
596 +COREDEFS += -DTINY_NAME="driver_robby,driver_gridlee,driver_polyplay,driver_puckman,driver_mspacman,driver_pacman"
597 +COREDEFS += -DTINY_POINTER="&driver_robby,&driver_gridlee,&driver_polyplay,&driver_puckman,&driver_mspacman,&driver_pacman"
617 $(OBJ)/machine/astrocde.o $(OBJ)/vidhrdw/astrocde.o \
619 $(OBJ)/vidhrdw/gridlee.o $(OBJ)/sndhrdw/gridlee.o $(OBJ)/drivers/gridlee.o \
620 $(OBJ)/vidhrdw/polyplay.o $(OBJ)/sndhrdw/polyplay.o $(OBJ)/drivers/polyplay.o \
621 $(OBJ)/machine/random.o \
622 + $(OBJ)/drivers/pacman.o $(OBJ)/vidhrdw/pacman.o \
623 + $(OBJ)/machine/mspacman.o \
624 + $(OBJ)/machine/pacplus.o \
625 + $(OBJ)/machine/theglobp.o \
626 + $(OBJ)/machine/acitya.o \
627 + $(OBJ)/machine/jumpshot.o \
628 + $(OBJ)/drivers/epos.o $(OBJ)/vidhrdw/epos.o \
629 + $(OBJ)/machine/8255ppi.o \
633 # MAME specific core objs
634 -COREOBJS += $(OBJ)/tiny.o $(OBJ)/cheat.o
635 +COREOBJS += $(OBJ)/tiny.o
636 diff -Nur xmame-0.104.orig/src/unix/config.c xmame-0.104/src/unix/config.c
637 --- xmame-0.104.orig/src/unix/config.c 2006-02-16 23:32:44.000000000 -0500
638 +++ xmame-0.104/src/unix/config.c 2006-05-08 08:05:13.000000000 -0400
641 * get configuration from configfile and env.
644 +static char my_dir[]="/var";//lee 2006-4-22
646 int xmame_config_init(int argc, char *argv[])
648 char buffer[BUF_SIZE];
650 /* get the homedir */
651 if(!(home_dir = get_home_dir()))
655 + home_dir = my_dir;//lee 2006-4-22
657 + fprintf(stderr,"PATH_LEADER:%s,home_dir:%s,NAME:%s\n",PATH_LEADER,home_dir,NAME);
658 /* check that the required dirs exist, and create them if necessary */
659 snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s", home_dir, NAME);
660 if (check_and_create_dir(buffer))
661 diff -Nur xmame-0.104.orig/src/unix/devices.c xmame-0.104/src/unix/devices.c
662 --- xmame-0.104.orig/src/unix/devices.c 2006-02-10 11:20:58.000000000 -0500
663 +++ xmame-0.104/src/unix/devices.c 2006-05-08 08:05:14.000000000 -0400
668 -#if defined SDL || defined SDL_JOYSTICK
669 +//#if defined SDL || defined SDL_JOYSTICK/*lee 06-4-30*/
670 +#if defined SDL_JOYSTICK
674 diff -Nur xmame-0.104.orig/src/unix/unix.mak xmame-0.104/src/unix/unix.mak
675 --- xmame-0.104.orig/src/unix/unix.mak 2006-02-15 01:45:51.000000000 -0500
676 +++ xmame-0.104/src/unix/unix.mak 2006-05-08 08:05:30.000000000 -0400
679 # *** Comment out this line to get verbose make output, for debugging build
685 ##############################################################################
687 CFLAGS.risc = -DALIGN_INTS -DALIGN_SHORTS
688 CFLAGS.risc_lsb = -DALIGN_INTS -DALIGN_SHORTS -DLSB_FIRST
689 CFLAGS.mips = -DALIGN_INTS -DALIGN_SHORTS -DSGI_FIX_MWA_NOP
691 +CFLAGS.bf537 = -DLSB_FIRST -DALIGN_INTS -DALIGN_SHORTS
692 ##############################################################################
693 # Architecture-dependent settings
694 ##############################################################################
696 ifeq ($(TARGET), mess)
697 include mess/$(TARGET).mak
700 +ifeq ($(TARGET), tiny)
701 +include src/$(TARGET).mak
704 include src/cpu/cpu.mak
705 include src/sound/sound.mak
708 $(COREDEFS) $(SOUNDDEFS) $(CPUDEFS) $(ASMDEFS) \
709 $(INCLUDES) $(INCLUDE_PATH)
711 -MY_LIBS = $(LIBS) $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD)) -lz
714 +#MY_LIBS = $(LIBS) $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD)) -lz
715 +MY_LIBS = $(LIBS) $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD))
721 # The SDL target automatically includes the SDL joystick and audio drivers.
722 ifeq ($(DISPLAY_METHOD),SDL)
729 ##############################################################################
731 ##############################################################################
734 +ifeq ($(MY_CPU), bf537)
735 +CFLAGS.linux = -DSYSDEP_DSP_OSS -DSYSDEP_MIXER_OSS -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=32
737 CFLAGS.linux = -DSYSDEP_DSP_OSS -DSYSDEP_MIXER_OSS -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
739 CFLAGS.freebsd = -DSYSDEP_DSP_OSS -DSYSDEP_MIXER_OSS -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -DHAVE_STRLCAT
740 CFLAGS.netbsd = -DSYSDEP_DSP_NETBSD -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -DHAVE_STRLCAT
741 CFLAGS.openbsd = -DSYSDEP_DSP_NETBSD -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -DHAVE_STRLCAT
743 ##############################################################################
745 $(NAME).$(DISPLAY_METHOD): $(EXPAT) $(ZLIB) $(OBJS) $(UNIX_OBJS) $(OSDEPEND)
746 - $(CC_COMMENT) @echo 'Linking $@ ...'
747 - $(CC_COMPILE) $(LD) $(LDFLAGS) -o $@ $(OBJS) $(EXPAT) $(ZLIB) $(UNIX_OBJS) $(OSDEPEND) $(MY_LIBS)
749 + $(CC_COMMENT) @echo 'Linkinging $@ ...'
750 + $(CC_COMPILE) $(LD) $(LDFLAGS) -o $@ $(OBJS) $(EXPAT) $(ZLIB) $(UNIX_OBJS) $(OSDEPEND) $(MY_LIBS)
752 maketree: $(sort $(OBJDIRS))
757 imgtool: $(IMGTOOL_OBJS) $(ZLIB) $(PLATFORM_IMGTOOL_OBJS)
758 $(CC_COMMENT) @echo 'Compiling $@...'
759 - $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lz -o $@
762 +# $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lz -o $@
763 + $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -o $@
764 messtest: $(OBJS) $(MESSTEST_OBJS) \
767 @@ -638,12 +647,12 @@
770 $(CC_COMMENT) @echo 'Archiving $@ ...'
771 - $(CC_COMPILE) ar $(AR_OPTS) $@ $^
772 + $(CC_COMPILE) $(AR) $(AR_OPTS) $@ $^
773 $(CC_COMPILE) $(RANLIB) $@
775 $(OSDEPEND): $(UNIX_OBJS)
776 $(CC_COMMENT) @echo '[OSDEPEND] Archiving $@ ...'
777 - $(CC_COMPILE) ar $(AR_OPTS) $@ $(UNIX_OBJS)
778 + $(CC_COMPILE) $(AR) $(AR_OPTS) $@ $(UNIX_OBJS)
779 $(CC_COMPILE) $(RANLIB) $@
781 $(UNIX_OBJDIR)/%.o: src/unix/%.c src/unix/xmame.h
782 diff -Nur xmame-0.104.orig/src/unix/video-drivers/SDL.c xmame-0.104/src/unix/video-drivers/SDL.c
783 --- xmame-0.104.orig/src/unix/video-drivers/SDL.c 2006-02-10 11:21:07.000000000 -0500
784 +++ xmame-0.104/src/unix/video-drivers/SDL.c 2006-05-08 08:06:30.000000000 -0400
785 @@ -547,17 +553,22 @@
789 kevent.scancode = klookup[event.key.keysym.sym];
790 kevent.unicode = event.key.keysym.unicode;
791 sysdep_display_params.keyboard_handler(&kevent);
793 fprintf (stderr, "Unknown symbol 0x%x\n",
794 event.key.keysym.sym);
796 fprintf (stderr, "Key %s %ssed\n",
797 SDL_GetKeyName(event.key.keysym.sym),
798 kevent.press? "pres":"relea");
802 +if (event.key.keysym.sym == SDLK_q)/*lee 5-4:tmp exit*/
807 retval |= SYSDEP_DISPLAY_QUIT_REQUESTED;