MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Pages: 1

franciscohs
M.A.M.E. fan
Reged: 10/04/08
Posts: 174
Loc: Argentina
Send PM


Please somone explain dependency between galaga and qwak drivers
#228183 - 07/25/10 12:43 AM


I'm building a custom MAME for my own use with fewer games than the normal build. However I'm not using the tiny build, since I'm keeping hundreds of games anyway, so I was only deleting the games I don't want from mamedriv.c

I know this way I will still compile lots of things I don't want, but that's not a problem for me.

The strange thing is that while doing this I discovered that I cannot leave only the driver "galaga" without also having the "qwak" driver, since the compilation will fail while linking:

Compiling src/mame/mamedriv.c...
Compiling src/version.c...
Linking mame64...
obj/sdl/mame64/mame/namco.a(galaga.o):(.rodata+0x72f8): undefined reference to `device_get_config_atari_vg_earom(device_config const*, unsigned int, deviceinfo*)'
obj/sdl/mame64/mame/namco.a(galaga.o):(.rodata+0xb5b8): undefined reference to `atari_vg_earom_r(running_device*, unsigned int)'
obj/sdl/mame64/mame/namco.a(galaga.o):(.rodata+0xb5c8): undefined reference to `atari_vg_earom_w(running_device*, unsigned int, unsigned char)'
obj/sdl/mame64/mame/namco.a(galaga.o):(.rodata+0xb5f8): undefined reference to `atari_vg_earom_ctrl_w(running_device*, unsigned int, unsigned char)'
collect2: ld returned 1 exit status
make: *** [mame64] Error 1


Once I also add the "qwak" driver it compiles fine. I think there are other cases of dependencies like these.

Can someone explain why does this happen and what would be the workaround? Is this expected behavior?

(A clean compile didn't solve the problem)



Lord Nightmare
Speech Synth Berzerker
Reged: 03/08/04
Posts: 855
Loc: PA, USA
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: franciscohs]
#228192 - 07/25/10 05:00 AM


> Once I also add the "qwak" driver it compiles fine. I think there are other cases of
> dependencies like these.
Its a dependency issue. galaga.c #includes atari_vg.h, but unless atari_vg.c is actually compiled into mame (which it may not be due to a makefile dependency issue), you will get an error. Compiling qwak compiles in runaway.c, which correctly causes atari_vg.c to be compiled.
>
> Can someone explain why does this happen and what would be the workaround? Is this
> expected behavior?
You should probably report it on mametesters as a galaga driver bug.

LN



"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"



franciscohs
M.A.M.E. fan
Reged: 10/04/08
Posts: 174
Loc: Argentina
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: Lord Nightmare]
#228550 - 07/30/10 01:37 AM


> > Once I also add the "qwak" driver it compiles fine. I think there are other cases
> of
> > dependencies like these.
> Its a dependency issue. galaga.c #includes atari_vg.h, but unless atari_vg.c is
> actually compiled into mame (which it may not be due to a makefile dependency issue),
> you will get an error. Compiling qwak compiles in runaway.c, which correctly causes
> atari_vg.c to be compiled.
> >
> > Can someone explain why does this happen and what would be the workaround? Is this
> > expected behavior?
> You should probably report it on mametesters as a galaga driver bug.
>
> LN

Thanks LN, I added (machine)/atari_vg.o to the galaga.c line and everything worked as expected. Not sure if this is the correct solution thou... if I find some time later I will look similar cases (which I already spotted) and report to mametesters.



TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: franciscohs]
#228554 - 07/30/10 02:12 AM


> > > Once I also add the "qwak" driver it compiles fine. I think there are other cases
> > of
> > > dependencies like these.
> > Its a dependency issue. galaga.c #includes atari_vg.h, but unless atari_vg.c is
> > actually compiled into mame (which it may not be due to a makefile dependency
> issue),
> > you will get an error. Compiling qwak compiles in runaway.c, which correctly causes
> > atari_vg.c to be compiled.
> > >
> > > Can someone explain why does this happen and what would be the workaround? Is
> this
> > > expected behavior?
> > You should probably report it on mametesters as a galaga driver bug.
> >
> > LN
>
> Thanks LN, I added (machine)/atari_vg.o to the galaga.c line and everything worked as
> expected. Not sure if this is the correct solution thou... if I find some time later
> I will look similar cases (which I already spotted) and report to mametesters.

I don't think this is an error. There are some sets of Dig Dug which use this same atari_vg routine. There is a bit of crossover on things like that - but I would talk it out first before reporting to MT, honestly. MAME wouldn't be dependent for something if it wasn't needed.



Lord Nightmare
Speech Synth Berzerker
Reged: 03/08/04
Posts: 855
Loc: PA, USA
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: Tafoid]
#228806 - 08/01/10 07:46 PM


> > > > Once I also add the "qwak" driver it compiles fine. I think there are other
> cases
> > > of
> > > > dependencies like these.
> > > Its a dependency issue. galaga.c #includes atari_vg.h, but unless atari_vg.c is
> > > actually compiled into mame (which it may not be due to a makefile dependency
> > issue),
> > > you will get an error. Compiling qwak compiles in runaway.c, which correctly
> causes
> > > atari_vg.c to be compiled.
> > > >
> > > > Can someone explain why does this happen and what would be the workaround? Is
> > this
> > > > expected behavior?
> > > You should probably report it on mametesters as a galaga driver bug.
> > >
> > > LN
> >
> > Thanks LN, I added (machine)/atari_vg.o to the galaga.c line and everything worked
> as
> > expected. Not sure if this is the correct solution thou... if I find some time
> later
> > I will look similar cases (which I already spotted) and report to mametesters.
>
> I don't think this is an error. There are some sets of Dig Dug which use this same
> atari_vg routine. There is a bit of crossover on things like that - but I would talk
> it out first before reporting to MT, honestly. MAME wouldn't be dependent for
> something if it wasn't needed.

It is an error, and here's why:
digdug (atari), in galaga.c, depends on EAROM to store highscores/etc
the EAROM handlers are in atari_vg.o
hence galaga.c needs to depend on atari_vg.o

What probably SHOULD be done is split EAROM handling out of atari_vg.c and put it into /machine/earom.c or something

LN



"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"



etabeta
Reged: 08/25/04
Posts: 2035
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: Lord Nightmare]
#229029 - 08/03/10 05:29 PM


> > > > > Once I also add the "qwak" driver it compiles fine. I think there are other
> > cases
> > > > of
> > > > > dependencies like these.
> > > > Its a dependency issue. galaga.c #includes atari_vg.h, but unless atari_vg.c is
> > > > actually compiled into mame (which it may not be due to a makefile dependency
> > > issue),
> > > > you will get an error. Compiling qwak compiles in runaway.c, which correctly
> > causes
> > > > atari_vg.c to be compiled.
> > > > >
> > > > > Can someone explain why does this happen and what would be the workaround? Is
> > > this
> > > > > expected behavior?
> > > > You should probably report it on mametesters as a galaga driver bug.
> > > >
> > > > LN
> > >
> > > Thanks LN, I added (machine)/atari_vg.o to the galaga.c line and everything
> worked
> > as
> > > expected. Not sure if this is the correct solution thou... if I find some time
> > later
> > > I will look similar cases (which I already spotted) and report to mametesters.
> >
> > I don't think this is an error. There are some sets of Dig Dug which use this same
> > atari_vg routine. There is a bit of crossover on things like that - but I would
> talk
> > it out first before reporting to MT, honestly. MAME wouldn't be dependent for
> > something if it wasn't needed.
>
> It is an error, and here's why:
> digdug (atari), in galaga.c, depends on EAROM to store highscores/etc
> the EAROM handlers are in atari_vg.o
> hence galaga.c needs to depend on atari_vg.o
>
> What probably SHOULD be done is split EAROM handling out of atari_vg.c and put it
> into /machine/earom.c or something
>
> LN

notice that galaga.c includes properly atari_vg.c and the original poster was saying that a reduced makefile (e.g. a tiny build) might miss this dependency. the problem would not be solved by splitting earom from atari_vg since one should still add the earom source in the makefile

the whole issue is not really an error (while it would have been if atari_vg was not compiled in the full makefile, but it is), just one of the main difficulties of creating tiny builds for such a large scale project like MAME/MESS.



Lord Nightmare
Speech Synth Berzerker
Reged: 03/08/04
Posts: 855
Loc: PA, USA
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: etabeta]
#229049 - 08/03/10 11:10 PM



> the whole issue is not really an error (while it would have been if atari_vg was not
> compiled in the full makefile, but it is), just one of the main difficulties of
> creating tiny builds for such a large scale project like MAME/MESS.

But shouldn't the makefile specifcially have atari_vg.o as a dependency for galaga.o? that wouldn't break the main build and would fix the tiny one as well.

LN



"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"



etabeta
Reged: 08/25/04
Posts: 2035
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: Lord Nightmare]
#229111 - 08/04/10 09:06 AM


from what I can see, MAME/MESS makefile only explicitly gives dependencies for components which use no .h file (like most snes add-on chips and some model2/model3 video routines) and hence are directly included into other source files

otherwise, files got only compiled once without dependencies and at linking stage all the pieces are glued together. in this specific case, atari_vg.c is compiled in atari.a.

to make easier spotting subtle dependencies, in MESS makefile there is a shared.a entry which collects components used by multiple systems, but I'm not sure if MAME has one as well, neither if it makes sense to have it (in the sense that I'm not so sure shared.a would make easier the creation of tiny.mak to average users)



franciscohs
M.A.M.E. fan
Reged: 10/04/08
Posts: 174
Loc: Argentina
Send PM


Re: Please somone explain dependency between galaga and qwak drivers new [Re: etabeta]
#229259 - 08/05/10 10:10 PM


> from what I can see, MAME/MESS makefile only explicitly gives dependencies for
> components which use no .h file (like most snes add-on chips and some model2/model3
> video routines) and hence are directly included into other source files
>
> otherwise, files got only compiled once without dependencies and at linking stage all
> the pieces are glued together. in this specific case, atari_vg.c is compiled in
> atari.a.
>
> to make easier spotting subtle dependencies, in MESS makefile there is a shared.a
> entry which collects components used by multiple systems, but I'm not sure if MAME
> has one as well, neither if it makes sense to have it (in the sense that I'm not so
> sure shared.a would make easier the creation of tiny.mak to average users)

Soo, if I do what I did, adding (machine)/atari_vg.o to the galaga line, would mean that atari_vg.c is compiled twice as per the makefile or this is detected and the second time is not compiled? (in the case I was compiling everything, I know in my case it was not being compiled the first time)


Pages: 1

MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 5 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 4475