Only in xmame-0.102/: Makefile diff -ur xmame-0.102.orig/makefile.unix xmame-0.102/makefile.unix --- xmame-0.102.orig/makefile.unix 2005-11-25 07:28:30.000000000 +0000 +++ xmame-0.102/makefile.unix 2005-12-06 14:17:58.000000000 +0000 @@ -33,12 +33,12 @@ ########################################################################### # Uncomment one of these. -TARGET = mame +#TARGET = mame # TARGET = mess # TARGET = mage # TARGET = mmsnd # example for a tiny compile -# TARGET = tiny +TARGET = tiny ########################################################################### @@ -97,7 +97,8 @@ # just as well. However, stay away from the `cc' Ultrix compiler if # possible. -CC = gcc +#CC = gcc +CC = /opt/local/open2x_gcc/gcc-4.0.2-glibc-2.3.5/arm-open2x-linux/arm-open2x-linux/bin/gcc # CC = cc # CC = icc # CC = c89 @@ -127,7 +128,10 @@ ########################################################################### # GCC on x86 -CFLAGS = -O2 -Wall -Wno-unused +#CFLAGS = -O2 -Wall -Wno-unused + +# GP2X +CFLAGS = -O3 -Wall -Wno-unused -msoft-float -mcpu=arm920t -fomit-frame-pointer # GCC on x86 with some optimizations # CFLAGS = -O2 -Wall -Wno-unused -mtune=i686 -fomit-frame-pointer \ @@ -416,7 +420,8 @@ ########################################################################### # Normal linking. -LD = $(CC) -Wl,-s +#LD = $(CC) -Wl,-s +LD = $(CC) # For a Linux/PowerPC system. # LD = $(CC) -Wl,-s,--relax @@ -494,6 +499,8 @@ # UnixWare7 requires -lsocket. # LIBS = -L/usr/X11R6/lib -L/usr/local/lib # INCLUDES = -I/usr/X11R6/include -I/usr/local/include +INCLUDES = -I/opt/local/gp2x/include +LIBS = -static -L/opt/local/gp2x/lib ########################################################################### @@ -501,7 +508,7 @@ ########################################################################### # Uncomment next line to build expat as part of the build. -# BUILD_EXPAT = 1 +BUILD_EXPAT = 1 # Uncomment next line to build zlib as part of the build. # BUILD_ZLIB = 1 @@ -552,7 +559,7 @@ ########################################################################### # i386, GNU asm -MY_CPU = i386 +#MY_CPU = i386 # i386, no asm -- needed for the Intel C++ compiler, which does not fully # understand GCC's inline assembly syntax, though you may still enable @@ -584,6 +591,8 @@ # MIPS (generic RISC + SGI compiler bug workarounds) # MY_CPU = mips +MY_CPU = arm + ########################################################################### # Architecture; choose your OS (only one!!) @@ -659,7 +668,7 @@ # JOY_PS2 = 1 # SDL joystick support. -# JOY_SDL = 1 +JOY_SDL = 1 # This will enable the use of the Happ Controls UGCI(tm) USB devices' # Coin/Start inputs using the libugci library available from @@ -702,10 +711,10 @@ # use SDL. # X11 (including Glide & OpenGL if enabled below) -DISPLAY_METHOD = x11 +#DISPLAY_METHOD = x11 # SDL library -# DISPLAY_METHOD = SDL +DISPLAY_METHOD = SDL # SVGALib, only supported under Linux # DISPLAY_METHOD = svgalib @@ -785,7 +794,7 @@ ############################################################################## # The name of your sdl-config executable -SDL_CONFIG = sdl-config +SDL_CONFIG = /opt/local/gp2x/bin/arm-open2x-linux-sdl-config ############################################################################## Only in xmame-0.102/: mame.gpe diff -ur xmame-0.102.orig/src/tiny.mak xmame-0.102/src/tiny.mak --- xmame-0.102.orig/src/tiny.mak 2005-11-15 05:24:44.000000000 +0000 +++ xmame-0.102/src/tiny.mak 2005-12-05 22:09:47.000000000 +0000 @@ -1,23 +1,45 @@ # a tiny compile is without Neogeo games -COREDEFS += -DTINY_NAME="driver_robby,driver_gridlee,driver_polyplay" -COREDEFS += -DTINY_POINTER="&driver_robby,&driver_gridlee,&driver_polyplay" +#COREDEFS += -DTINY_NAME="driver_robby,driver_gridlee,driver_polyplay" +#COREDEFS += -DTINY_POINTER="&driver_robby,&driver_gridlee,&driver_polyplay" +COREDEFS += -DTINY_NAME="driver_robotron,driver_defender" +COREDEFS += -DTINY_POINTER="&driver_robotron,&driver_defender" # uses these CPUs -CPUS+=Z80@ +#CPUS+=Z80@ +CPUS+=M6808@ CPUS+=M6809@ # uses these SOUNDs SOUNDS+=CUSTOM@ -SOUNDS+=SN76496@ -SOUNDS+=SAMPLES@ -SOUNDS+=ASTROCADE@ +SOUNDS+=YM2151@ +SOUNDS+=HC55516@ +SOUNDS+=OKIM6295@ +SOUNDS+=DAC@ + +#SOUNDS+=SN76496@ +#SOUNDS+=SAMPLES@ +#SOUNDS+=ASTROCADE@ + +#OBJS = \ +# $(OBJ)/machine/astrocde.o $(OBJ)/vidhrdw/astrocde.o \ +# $(OBJ)/sndhrdw/wow.o $(OBJ)/sndhrdw/gorf.o $(OBJ)/drivers/astrocde.o \ +# $(OBJ)/vidhrdw/gridlee.o $(OBJ)/sndhrdw/gridlee.o $(OBJ)/drivers/gridlee.o \ +# $(OBJ)/vidhrdw/polyplay.o $(OBJ)/sndhrdw/polyplay.o $(OBJ)/drivers/polyplay.o \ +# $(OBJ)/machine/random.o \ + OBJS = \ - $(OBJ)/machine/astrocde.o $(OBJ)/vidhrdw/astrocde.o \ - $(OBJ)/sndhrdw/wow.o $(OBJ)/sndhrdw/gorf.o $(OBJ)/drivers/astrocde.o \ - $(OBJ)/vidhrdw/gridlee.o $(OBJ)/sndhrdw/gridlee.o $(OBJ)/drivers/gridlee.o \ - $(OBJ)/vidhrdw/polyplay.o $(OBJ)/sndhrdw/polyplay.o $(OBJ)/drivers/polyplay.o \ - $(OBJ)/machine/random.o \ + $(OBJ)/machine/ticket.o \ + $(OBJ)/machine/6821pia.o \ + $(OBJ)/vidhrdw/res_net.o \ + $(OBJ)/machine/williams.o $(OBJ)/vidhrdw/williams.o $(OBJ)/sndhrdw/williams.o $(OBJ)/drivers/williams.o + + #$(OBJ)/williams.a + +#$(OBJ)/williams.a: \ + # MAME specific core objs + COREOBJS += $(OBJ)/tiny.o $(OBJ)/cheat.o + diff -ur xmame-0.102.orig/src/unix/dirio.c xmame-0.102/src/unix/dirio.c --- xmame-0.102.orig/src/unix/dirio.c 2005-11-15 05:24:58.000000000 +0000 +++ xmame-0.102/src/unix/dirio.c 2005-12-06 14:21:55.000000000 +0000 @@ -363,7 +363,8 @@ */ char *get_home_dir(void) { - struct passwd *pw; + return "./mame"; + /*struct passwd *pw; char *s; if (!(pw = getpwuid(getuid()))) @@ -375,7 +376,7 @@ { fprintf(stderr, "error: malloc faild for homedir string\n"); return NULL; - } + }*/ /* * Convert The OpenVMS Formatted "$HOME" Directory Path Into Unix Format. diff -ur xmame-0.102.orig/src/unix/joystick-drivers/joy_SDL.c xmame-0.102/src/unix/joystick-drivers/joy_SDL.c --- xmame-0.102.orig/src/unix/joystick-drivers/joy_SDL.c 2005-11-15 05:24:58.000000000 +0000 +++ xmame-0.102/src/unix/joystick-drivers/joy_SDL.c 2005-12-05 14:08:21.000000000 +0000 @@ -143,6 +143,28 @@ for (j=0; j +#include +#include +#include + +short *fb; + int sysdep_display_init(void) { memset(sysdep_display_properties.mode_info, 0, @@ -84,6 +91,8 @@ fprintf (stderr, "SDL: Error: %s\n",SDL_GetError()); return 1; } + int fbdev=open("/dev/fb0", O_RDWR); + fb=(short *)mmap(0, 320*240*2, PROT_WRITE, MAP_SHARED, fbdev, 0); return 0; } @@ -278,7 +287,8 @@ (video_surface->format->BitsPerPixel != best_bpp)) { if(! (video_surface = SDL_SetVideoMode(best_width, best_height, best_bpp, - video_flags))) + //video_flags))) + 0))) { fprintf (stderr, "SDL: Error: Setting video mode failed\n"); return 1; @@ -326,6 +336,8 @@ startx &= ~3; /* clear the unused area of the screen */ + for(i=0; i<320*240; i++) fb[i]=0; +#if 0 for (i=0; i<2; i++) { unsigned char *video_mem; @@ -359,6 +371,7 @@ else break; } +#endif /* Setup input */ if (!reopen) @@ -371,11 +384,11 @@ } /* Hide/Show mouse cursor? */ - if ((sdl_input_grabbed == SDL_GRAB_ON) || !sdl_show_cursor || + /*if ((sdl_input_grabbed == SDL_GRAB_ON) || !sdl_show_cursor || sysdep_display_params.fullscreen) SDL_ShowCursor(0); else - SDL_ShowCursor(1); + SDL_ShowCursor(1);*/ /* Set window title */ SDL_WM_SetCaption(sysdep_display_params.title, NULL); @@ -423,8 +436,12 @@ first_update = 0; } - SDL_LockSurface(video_surface); + int x, y; + video_mem = (unsigned char *)fb; + video_mem += (starty*320*2)+(startx*2); + blit_func(bitmap, vis_in_dest_out, dirty_area, palette, video_mem, 320); +#if 0 video_mem = video_surface->pixels; video_mem += startx * video_surface->format->BytesPerPixel; video_mem += starty * video_surface->pitch; @@ -470,6 +487,7 @@ SDL_ShowCursor(1); } } +#endif return NULL; } @@ -479,6 +497,8 @@ int i, line; unsigned char *video_mem; + for(i=0; i<320*240; i++) fb[i]=0; +#if 0 for (i=0; i<2; i++) { SDL_LockSurface(video_surface); @@ -498,6 +518,7 @@ else break; } +#endif } /* shut up the display */ diff -ur xmame-0.102.orig/src/usrintrf.c xmame-0.102/src/usrintrf.c --- xmame-0.102.orig/src/usrintrf.c 2005-11-16 05:59:34.000000000 +0000 +++ xmame-0.102/src/usrintrf.c 2005-12-04 21:03:31.000000000 +0000 @@ -3636,13 +3636,13 @@ } } - for (in = Machine->input_ports; in && in->type != IPT_END; in++) + /*for (in = Machine->input_ports; in && in->type != IPT_END; in++) if ((in->type & 0xff) == IPT_ADJUSTER) { onscrd_fnc[item] = onscrd_adjuster; onscrd_arg[item] = in - Machine->input_ports; item++; - } + }*/ if (options.cheat) {