PDA

View Full Version : Compiling MAME4ALL for Dreamcast with DCDev R2 ISO



marton
May 2nd, 2006, 20:51
I need a bit of help with the subject...
I installed the DCDev environment with the ISO with no problems.
I then extracted MAME4ALL to my home folder in c:/cygwin/home/user/mame4all
Then renamed makefile.dc to makefile and typed make. This is what it shows up:

User@Laptop /home/user/mame
$ make
kos-c++ -c src/mame.cpp -o src/mame.o
In file included from src/sdl/gp2x_mame.h:13,
from src/driver.h:15,
from src/mame.cpp:1:
src/sdl/minimal.h:23:17: SDL.h: No such file or directory
In file included from src/sdl/gp2x_mame.h:13,
from src/driver.h:15,
from src/mame.cpp:1:
src/sdl/minimal.h:72: error: expected init-declarator before '*' token
src/sdl/minimal.h:72: error: expected `,' or `;' before '*' token
src/mame.cpp: In function `int updatescreen()':
src/mame.cpp:385: error: `SDL_Delay' undeclared (first use this function)
src/mame.cpp:385: error: (Each undeclared identifier is reported only once for e
ach function it appears in.)
make: *** [src/mame.o] Error 1

User@Laptop /home/user/mame
$

Can someone please tell me what I am doing wrong or point me in the right direction?

I also tried compiling the GP2X version by renaming makefile.gp2x to makefile. This is what it shows up this time:

User@Laptop /home/user/mame
$ make
arm-linux-g++ -mcpu=arm920 -mtune=arm920t -msoft-float -mstructure-size-boundar
y=8 -DGP2X -IE:/tmp/franxis/devkitGP2X/sysroot/usr/include -O3 -DDATA_PREFIX=\"d
ata/\" -DROM_PREFIX=\"example\" -O3 -fstrict-aliasing -fexpensive-optimizations
-falign-functions -fweb -frename-registers -fomit-frame-pointer -ffast-math -fi
nline -finline-functions -fno-builtin -fno-common -Isrc -Isrc/gp2x -DLSB_FIRST -
DSIGNED_SAMPLES -DACORN -DINLINE="static __inline__" -Isrc/z80 -Isrc/m6502 -Isrc
/m6809 -Isrc/i86 -Isrc/tms34010 -Isrc/tms9900 -DUSE_Z80_GP -DNO_DRIVER_GENERIC_
8BIT -DNO_DRIVER_TMS -DUSE_M68000_GP -DUSE_CYCLONE -DNO_DRIVER_TMNT -DNO_DRIVER_
SYSTEM16 -DUSE_M6809_GP -DUSE_M6502_GP -DNO_DRIVER_CPS1 -DUSE_I8039_GP -DUSE_I80
85_GP -DNO_DRIVER_NEOGEO -DUSE_YM2151_GP -DUSE_YM2XXX_GP -DUSE_AY8910_GP -DUSE_A
DPCM_GP -DUSE_OKIM6295_GP -DUSE_MSM5205_GP -DMITSHM -DGP2X_SDLWRAPPER_NODOUBLEBU
FFER -DNO_Z80_BIG_FLAGS_ARRAY -DNO_SPLASH -DUSE_CPLUS -DSND_CHANNELS_REDUCTION -
DFAME_N_ENTRIES=64 -DUNZIP_SUPPORT -DZLIB -DHAVE_MKSTEMP -DHAVE_STRINGS_H '-DACC
EPT_SIZE_T=int' -c -o src/mame.o src/mame.cpp
/bin/sh: arm-linux-g++: command not found
make: *** [src/mame.o] Error 127

User@Laptop /home/user/mame
$

I'm fighting with devkitGP2X this time. I changed the makefile so it says DEVKIT=/home/user/devkitGP2X/
But it still doesn't find arm-linux-g++.
Any clues?

TIA

marton
May 2nd, 2006, 22:34
Ok, got the devkitGP2X part sorted out, now it compiles well but fails when linking the objects with loads of errors, for example:
ym3812.cpp:(.text+0x14): undefined reference to `gp2x_malloc(unsigned long)'
ym3812.cpp:(.text+0x2c8): undefined reference to `gp2x_malloc(unsigned long)'
Those are only two... it scrolls like 20 pages with errors like such, and no mame_gp2x.gpe is generated. Any advise? What am I missing to get it linked?

Thanks!

marton
May 2nd, 2006, 23:12
All those errors I got were when trying to build MAME4ALL sources. I tried compiling the ones by Franxis and they compiled and linked at the first try without any errors. Tried running it on my GP2X and it worked like a charm, so there is something wrong with the makefile from the MAME4ALL sources I guess.
Now I need to get it building for the DC and I'll be more than happy.

Thanks!!

Marton

fackue
May 2nd, 2006, 23:13
I believe MAME4ALL uses chui port of SDL. The ISO contains beros SDL port.

quzar
May 2nd, 2006, 23:27
chui modifies kos and has his own version of sdl. for the most part anything he releases is un-compilable without major work.

marton
May 3rd, 2006, 04:35
May I know why is that?
Maybe chui could release the parts that need to be replaced from the ISO to have it compiling? Or any directions on how to do it?

Thanks for the replies!!

Marton

ron
May 4th, 2006, 10:58
nothing to do if you dont download chui's SDL lib.

Make sure the #include <SDL.h> is #include <SDL/SDL.h>

Cheers

Nogginthenog
May 4th, 2006, 13:32
chui modifies kos and has his own version of sdl. for the most part anything he releases is un-compilable without major work.

I've had some problems compiling UAE4ALL. I think Chui must have some extra environment settings. I *think* Chui's Makefiles expect the CFLAGS variable to contain the KOS CFLAGS, but I could be wrong.

Looking at marton's post this doesn't look right:

kos-c++ -c src/mame.cpp -o src/mame.o

I would expect a loooong line with loads of optimisation flags etc.

P.S. Marton, you don''t need to rename the makefiles. You can just call it like this:

make -f makefile.gp2x
or:
make -f makefile.dc

marton
May 4th, 2006, 19:23
Thanks for the tip Ron!!!! I was missing that part!! The SDL lib from chui!!
Where do I need to modify that about SDL.h? because in the makefile one of the MORE_CFLAGS options shows -I$(KOS_BASE)/addons/include/SDL and that's where SDL.h is. Do I need to change it anyway?
The thing is... without modifying anything, I got it compiling and got the 3.7mb .bin file. Tried burning it, and the DC shows the sega selfboot logo but it resets after a while. If I burn the .bin downloadable from chui's site, the menu shows up well. I don't know what could be wrong at this point...

quzar
May 4th, 2006, 20:43
noggin, gcc simply doesn't show the optimization flags on every line. it shows all the flaags once when linking.

bfg
May 5th, 2006, 10:22
Thanks for the tip Ron!!!! I was missing that part!! The SDL lib from chui!!
Where do I need to modify that about SDL.h? because in the makefile one of the MORE_CFLAGS options shows -I$(KOS_BASE)/addons/include/SDL and that's where SDL.h is. Do I need to change it anyway?
The thing is... without modifying anything, I got it compiling and got the 3.7mb .bin file. Tried burning it, and the DC shows the sega selfboot logo but it resets after a while. If I burn the .bin downloadable from chui's site, the menu shows up well. I don't know what could be wrong at this point...

The .bin must be unscrambled to work in DC ... Have you unscrambled it ?

fackue
May 5th, 2006, 18:48
FYI, for selfbooting, it must be scrambled.

bfg
May 5th, 2006, 22:29
FYI, for selfbooting, it must be scrambled.

How ... Sorry ... I test everything with DemoMenu, ...
Sorry for the mistake.

marton
May 8th, 2006, 15:42
Hey hey hey... what's that about Scrambling/Unscrambling? I burned it and I confirmed it doesn't work. I see the sega logo (with the selfboot baddy thing) and after a while, the DC resets. If I burn any of the .bins at chui's site, it boots and I see the menu, but if I enter to a game, the controls don't do anything (maybe that's because it is alpha?). Chui's .bin is 3715260 bytes while the one I get when compiling is 3708624 bytes. Maybe the difference is because of the scrambling? Also when compiling I get plenty of "warning: comparison between signed and unsigned integer expressions" and "warning: unused variable xxxxx" (I know this last one is not a problem but I wonder if that about comparing different kind of variables is a problem or not)
To avoid having to burn and burn CDs (I can not use CDRWs because my DC doesn't want to read them), I tried running it on Chankast. I installed Daemon Tools 3.29 which is the only version that supports the CDIs generated with bin2boot. I can only boot and see MAME4ALL's menu if the "capcom hack" option is enabled, but I can't get into any game because it stops while loading the ROMs. Sometimes it hangs, sometimes it says error loading ROMs, press A button to get back to the menu (or something like that). I don't know why. Anyway this is just a comment but it would be nice to have it running on Chankast. That way testing is really easy and quick.
Now what do I need to do to scramble/unscramble the .bins?

Thanks!!

Marton

marton
May 8th, 2006, 15:55
Oh well... that was it. I found a checker tool that could scramble/unscramble .bins... After scrambling IT WORKED MY FRIENDS!!!! THANKS TO ALL FOR YOUR HELP!!!
Now I need to confirm: The controls are not functioning inside the games because MAME4ALL is alpha? Or I should check something else? I can move in the menu, and get into the games with no problems, but I can't start or add coins to play... I can't even get back to the menu so I have to restart each time.

Thanks again!!

Marton

marton
May 8th, 2006, 22:48
Found it out... the coins are added with the analog joystick, and I'm using a digital one... I guess I will have to modify the sources a bit to get it to suit my needs, and I think I'll have a hard time because the inputs are named as for the GP2X, so I will have to find which button does what by trial and error (I mean burning and error :( )

Cheers,
Marton

bfg
May 10th, 2006, 14:53
Found it out... the coins are added with the analog joystick, and I'm using a digital one... I guess I will have to modify the sources a bit to get it to suit my needs, and I think I'll have a hard time because the inputs are named as for the GP2X, so I will have to find which button does what by trial and error (I mean burning and error :( )

Cheers,
Marton

So i wasn't wrong, it was a (un)scramble problem ! :D :D :D

I've look at the control too, and i must admit, i don't understand at all !!! If you find something, i'm interested !

marton
May 11th, 2006, 13:47
I'll try... :D