Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Compiling trimmed down mame/advmame?  (Read 2440 times)

0 Members and 1 Guest are viewing this topic.

maraxle

  • Guest
  • Trade Count: (0)
Compiling trimmed down mame/advmame?
« on: February 14, 2004, 09:27:47 am »
Does anyone know which files I would have to change in order to build a version of MAME/AdvanceMAME with support for fewer games?  Specifically, I would like to go through my roms collection and only support the ones I have.  That way I could strip out the drivers for stuff I will never play, and build a smaller executable.

Brad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
  • Last login:August 03, 2018, 05:43:23 pm
    • www.emuchrist.org
Re:Compiling trimmed down mame/advmame?
« Reply #1 on: February 14, 2004, 04:35:57 pm »
You want to build a Tiny Mame then. That file is  SRC\Tiny.mak

Beware Tiny Comiles are a pain to do but they can be fun. It's just soritng the dependencies is a problem. After you've waded through the CPUS, SOUNDS, Driver and OBJ files to compile a win32 version type from the src dir

make TARGET=tiny

Brad
Theres so many questions to doing a tiny compile though

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4419
  • Last login:Today at 02:10:40 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re:Compiling trimmed down mame/advmame?
« Reply #2 on: February 15, 2004, 12:26:29 am »
not worth the time. No speed gain for doing it too.
I'm sure you have 20MB of space the EXE file.
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

maraxle

  • Guest
  • Trade Count: (0)
Re:Compiling trimmed down mame/advmame?
« Reply #3 on: February 15, 2004, 09:05:57 am »
not worth the time. No speed gain for doing it too.
I'm sure you have 20MB of space the EXE file.
Actually, I will get a speed gain.  I am running FreeDOS, so my bottleneck is disk I/O.  Therefore, smaller executable = quicker load time.  I have actually tested that theory by UPX packing the executable, which in theory should make it take longer to load as it has to be unpacked in memory, but due to the slow disk I/O (but fast RAM access) in FreeDOS, has the opposite effect.

Brad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
  • Last login:August 03, 2018, 05:43:23 pm
    • www.emuchrist.org
Re:Compiling trimmed down mame/advmame?
« Reply #4 on: February 15, 2004, 10:00:11 pm »
An example of a "Classics" tiny.mak file:

-----------------------------

### The previous 95 games, minus a few drivers, minus ladybug, popeye, punchout
# a tiny compile is without Neogeo games
COREDEFS += -DTINY_COMPILE=1
COREDEFS += -DTINY_NAME="    driver_1942, driver_amidars,
 driver_archrivl, driver_arkanoid, driver_armora,
driver_asteroid, driver_atarifb, driver_barrier, driver_berzerk,
 driver_blaster, driver_blstroid, driver_boothill, driver_bosco,
driver_boxingb, driver_bubbles, driver_bwidow, driver_bzone,
 driver_ccastles, driver_centiped, driver_cloak, driver_crater,
driver_crush, driver_defender, driver_demoderb,
driver_demon, driver_digdug, driver_digdug2, driver_dkong,
 driver_dkongjr, driver_domino, driver_dotron, driver_fantasy,
 driver_foodf, driver_frenzy, driver_frogger, driver_galaga,
driver_galaxian, driver_gravitar, driver_gyruss,
driver_invaders, driver_invadpt2, driver_journey, driver_joust,
 driver_kick, driver_klax, driver_lrescue, driver_mappy,
driver_mario, driver_maxrpm, driver_mhavoc,
driver_mhavocrv, driver_missile, driver_mooncrst,
driver_mrdo, driver_mspacman, driver_mspacpls,
driver_nibbler, driver_omegrace, driver_pacman,
driver_pballoon, driver_phoenix, driver_piranha,
driver_pleiads, driver_powerdrv, driver_quantum,
driver_rampage, driver_rbtapper, driver_redbaron,
driver_ripoff, driver_robotron, driver_sarge, driver_scobra,
driver_scramble, driver_shollow, driver_sinista1,
driver_sinistar, driver_snowbros, driver_solarq,
driver_spacduel, driver_spacewar, driver_spectar,
driver_speedfrk, driver_splat, driver_spyhunt, driver_ssi,
driver_starcas, driver_stargate, driver_starhawk,
driver_starwars, driver_sundance, driver_tailg, driver_tapper,
 driver_targ, driver_tempest, driver_temptube, driver_theend,
 driver_timber, driver_timeplt, driver_toobin, driver_tron,
driver_tutankhm, driver_twotiger, driver_vanguard,
driver_vulgus, driver_wacko, driver_warrior, driver_wotw,
driver_xenophob, driver_yiear, driver_zerozone"
COREDEFS += -DTINY_POINTER="&driver_1942,&driver_amidars,&driver_archrivl,
&driver_arkanoid,&driver_armora,&driver_asteroid,&driver_atarifb,
&driver_barrier,&driver_berzerk,&driver_blaster,&driver_blstroid,
&driver_boothill,&driver_bosco,&driver_boxingb,&driver_bubbles,
&driver_bwidow,&driver_bzone,&driver_ccastles,&driver_centiped,
&driver_cloak,&driver_crater,&driver_crush,&driver_defender,
&driver_demoderb,&driver_demon,&driver_digdug,&driver_digdug2,
&driver_dkong,&driver_dkongjr,&driver_domino,&driver_dotron,
&driver_fantasy,&driver_foodf,&driver_frenzy,&driver_frogger,
&driver_galaga,&driver_galaxian,&driver_gravitar,&driver_gyruss,
&driver_invaders,&driver_invadpt2,&driver_journey,&driver_joust,
&driver_kick,&driver_klax,&driver_lrescue,&driver_mappy,
&driver_mario,&driver_maxrpm,&driver_mhavoc,&driver_mhavocrv,
&driver_missile,&driver_mooncrst,&driver_mrdo,&driver_mspacman,
&driver_mspacpls,&driver_nibbler,&driver_omegrace,&driver_pacman,
&driver_pballoon,&driver_phoenix,&driver_piranha,&driver_pleiads,
&driver_powerdrv,&driver_quantum,&driver_rampage,&driver_rbtapper,
&driver_redbaron,&driver_ripoff,&driver_robotron,&driver_sarge,
&driver_scobra,&driver_scramble,&driver_shollow,&driver_sinista1,
&driver_sinistar,&driver_snowbros,&driver_solarq,&driver_spacduel,
&driver_spacewar,&driver_spectar,&driver_speedfrk,&driver_splat,
&driver_spyhunt,&driver_ssi,&driver_starcas,&driver_stargate,
&driver_starhawk,&driver_starwars,&driver_sundance,&driver_tailg,
&driver_tapper,&driver_targ,&driver_tempest,&driver_temptube,
&driver_theend,&driver_timber,&driver_timeplt,&driver_toobin,
&driver_tron,&driver_tutankhm,&driver_twotiger,&driver_vanguard,
&driver_vulgus,&driver_wacko,&driver_warrior,&driver_wotw,
&driver_xenophob,&driver_yiear,&driver_zerozone"

# uses these CPUs
CPUS+=Z80@
CPUS+=8080@
CPUS+=8085A@
CPUS+=M6502@
CPUS+=N2A03@
CPUS+=I8035@
CPUS+=I8039@
CPUS+=M6800@
CPUS+=M6802@
CPUS+=M6808@
CPUS+=M68705@
CPUS+=M6809@
CPUS+=M68000@
CPUS+=M68010@
CPUS+=S2650@
CPUS+=CCPU@
CPUS+=G65816@
CPUS+=SPC700@

# uses these SOUNDs
SOUNDS+=CUSTOM@
SOUNDS+=SAMPLES@
SOUNDS+=DAC@
SOUNDS+=DISCRETE@
SOUNDS+=AY8910@
SOUNDS+=YM2203@
SOUNDS+=YM2151_ALT@
SOUNDS+=YM2610@
SOUNDS+=YM2610B@
SOUNDS+=YM3812@
SOUNDS+=SN76477@
SOUNDS+=SN76496@
SOUNDS+=POKEY@
SOUNDS+=NES@
SOUNDS+=NAMCO@
SOUNDS+=TMS36XX@
SOUNDS+=TMS5110@
SOUNDS+=TMS5220@
SOUNDS+=VLM5030@
SOUNDS+=ADPCM@
SOUNDS+=OKIM6295@
SOUNDS+=HC55516@
SOUNDS+=CEM3394@
SOUNDS+=QSOUND@
SOUNDS+=SP0250@

OBJS =  $(OBJ)/drivers/pacman.o $(OBJ)/machine/mspacman.o \
   $(OBJ)/machine/pacplus.o $(OBJ)/machine/jumpshot.o \
   $(OBJ)/machine/theglobp.o \
   $(OBJ)/machine/acitya.o \
   $(OBJ)/vidhrdw/pengo.o $(OBJ)/drivers/pengo.o \
   $(OBJ)/drivers/epos.o $(OBJ)/vidhrdw/epos.o \
   $(OBJ)/vidhrdw/cclimber.o $(OBJ)/sndhrdw/cclimber.o $(OBJ)/drivers/cclimber.o \
   $(OBJ)/vidhrdw/phoenix.o $(OBJ)/sndhrdw/phoenix.o $(OBJ)/drivers/phoenix.o \
   $(OBJ)/sndhrdw/pleiads.o \
   $(OBJ)/vidhrdw/galaxian.o $(OBJ)/sndhrdw/galaxian.o $(OBJ)/drivers/galaxian.o \
   $(OBJ)/machine/bosco.o $(OBJ)/sndhrdw/bosco.o $(OBJ)/vidhrdw/bosco.o $(OBJ)/drivers/bosco.o \
   $(OBJ)/machine/galaga.o $(OBJ)/vidhrdw/galaga.o $(OBJ)/drivers/galaga.o \
   $(OBJ)/machine/digdug.o $(OBJ)/vidhrdw/digdug.o $(OBJ)/drivers/digdug.o \
   $(OBJ)/machine/mappy.o $(OBJ)/vidhrdw/mappy.o $(OBJ)/drivers/mappy.o \
   $(OBJ)/vidhrdw/ladybug.o $(OBJ)/drivers/ladybug.o \
   $(OBJ)/vidhrdw/mrdo.o $(OBJ)/drivers/mrdo.o \
   $(OBJ)/vidhrdw/dkong.o $(OBJ)/sndhrdw/dkong.o $(OBJ)/drivers/dkong.o \
   $(OBJ)/machine/strtheat.o \
   $(OBJ)/vidhrdw/mario.o $(OBJ)/sndhrdw/mario.o $(OBJ)/drivers/mario.o \
   $(OBJ)/machine/snes.o $(OBJ)/vidhrdw/snes.o \
   $(OBJ)/sndhrdw/snes.o $(OBJ)/drivers/nss.o \
   $(OBJ)/machine/8080bw.o \
   $(OBJ)/vidhrdw/8080bw.o $(OBJ)/sndhrdw/8080bw.o $(OBJ)/drivers/8080bw.o \
   $(OBJ)/vidhrdw/m79amb.o $(OBJ)/drivers/m79amb.o $(OBJ)/drivers/rotaryf.o \
   $(OBJ)/drivers/cvs.o $(OBJ)/vidhrdw/cvs.o $(OBJ)/vidhrdw/s2636.o \
   $(OBJ)/machine/mcr.o $(OBJ)/sndhrdw/mcr.o \
   $(OBJ)/vidhrdw/mcr12.o $(OBJ)/vidhrdw/mcr3.o \
   $(OBJ)/drivers/mcr1.o $(OBJ)/drivers/mcr2.o $(OBJ)/drivers/mcr3.o \
   $(OBJ)/vidhrdw/mcr68.o $(OBJ)/drivers/mcr68.o \
   $(OBJ)/vidhrdw/balsente.o $(OBJ)/machine/balsente.o $(OBJ)/drivers/balsente.o \
   $(OBJ)/machine/arkanoid.o $(OBJ)/vidhrdw/arkanoid.o $(OBJ)/drivers/arkanoid.o \
   $(OBJ)/vidhrdw/taitoic.o $(OBJ)/sndhrdw/taitosnd.o \
   $(OBJ)/vidhrdw/taito_x.o $(OBJ)/drivers/taito_x.o $(OBJ)/machine/cchip.o \
   $(OBJ)/vidhrdw/taito_f2.o $(OBJ)/drivers/taito_f2.o \
   $(OBJ)/vidhrdw/snowbros.o $(OBJ)/drivers/snowbros.o \
   $(OBJ)/machine/williams.o $(OBJ)/vidhrdw/williams.o $(OBJ)/sndhrdw/williams.o $(OBJ)/drivers/williams.o \
   $(OBJ)/vidhrdw/vulgus.o $(OBJ)/drivers/vulgus.o \
   $(OBJ)/vidhrdw/1942.o $(OBJ)/drivers/1942.o \
   $(OBJ)/vidhrdw/1943.o $(OBJ)/drivers/1943.o \
   $(OBJ)/machine/kabuki.o \
   $(OBJ)/vidhrdw/cps1.o $(OBJ)/drivers/cps1.o $(OBJ)/drivers/cps2.o \
   $(OBJ)/machine/segacrpt.o $(OBJ)/sndhrdw/segasnd.o \
   $(OBJ)/machine/btime.o $(OBJ)/vidhrdw/btime.o $(OBJ)/drivers/btime.o \
   $(OBJ)/machine/scramble.o $(OBJ)/sndhrdw/scramble.o $(OBJ)/drivers/scramble.o \
   $(OBJ)/drivers/frogger.o \
   $(OBJ)/drivers/scobra.o \
   $(OBJ)/drivers/amidar.o \
   $(OBJ)/sndhrdw/timeplt.o \
   $(OBJ)/vidhrdw/tutankhm.o $(OBJ)/drivers/tutankhm.o \
   $(OBJ)/vidhrdw/timeplt.o $(OBJ)/drivers/timeplt.o \
   $(OBJ)/sndhrdw/gyruss.o $(OBJ)/vidhrdw/gyruss.o $(OBJ)/drivers/gyruss.o \
   $(OBJ)/machine/konami.o $(OBJ)/vidhrdw/trackfld.o $(OBJ)/sndhrdw/trackfld.o $(OBJ)/drivers/trackfld.o \
   $(OBJ)/vidhrdw/yiear.o $(OBJ)/drivers/yiear.o \
   $(OBJ)/vidhrdw/konamiic.o \
   $(OBJ)/vidhrdw/exidy.o $(OBJ)/sndhrdw/exidy.o $(OBJ)/drivers/exidy.o \
   $(OBJ)/sndhrdw/targ.o \
   $(OBJ)/vidhrdw/circus.o $(OBJ)/drivers/circus.o \
   $(OBJ)/vidhrdw/victory.o $(OBJ)/drivers/victory.o \
   $(OBJ)/machine/atari_vg.o \
   $(OBJ)/machine/asteroid.o $(OBJ)/sndhrdw/asteroid.o \
   $(OBJ)/sndhrdw/llander.o $(OBJ)/drivers/asteroid.o \
   $(OBJ)/drivers/bwidow.o \
   $(OBJ)/sndhrdw/bzone.o   $(OBJ)/drivers/bzone.o \
   $(OBJ)/sndhrdw/redbaron.o \
   $(OBJ)/drivers/tempest.o \
   $(OBJ)/machine/starwars.o \
   $(OBJ)/drivers/starwars.o $(OBJ)/sndhrdw/starwars.o \
   $(OBJ)/machine/mhavoc.o $(OBJ)/drivers/mhavoc.o \
   $(OBJ)/drivers/quantum.o \
   $(OBJ)/machine/atarifb.o $(OBJ)/vidhrdw/atarifb.o $(OBJ)/drivers/atarifb.o \
   $(OBJ)/vidhrdw/centiped.o $(OBJ)/drivers/centiped.o \
   $(OBJ)/machine/missile.o $(OBJ)/vidhrdw/missile.o $(OBJ)/drivers/missile.o \
   $(OBJ)/vidhrdw/foodf.o $(OBJ)/drivers/foodf.o \
   $(OBJ)/vidhrdw/ccastles.o $(OBJ)/drivers/ccastles.o \
   $(OBJ)/vidhrdw/cloak.o $(OBJ)/drivers/cloak.o \
   $(OBJ)/machine/atarigen.o $(OBJ)/sndhrdw/atarijsa.o \
   $(OBJ)/vidhrdw/atarimo.o $(OBJ)/vidhrdw/atarirle.o \
   $(OBJ)/machine/slapstic.o \
   $(OBJ)/vidhrdw/atarisy1.o $(OBJ)/drivers/atarisy1.o \
   $(OBJ)/vidhrdw/gauntlet.o $(OBJ)/drivers/gauntlet.o \
   $(OBJ)/vidhrdw/toobin.o $(OBJ)/drivers/toobin.o \
   $(OBJ)/vidhrdw/vindictr.o $(OBJ)/drivers/vindictr.o \
   $(OBJ)/vidhrdw/klax.o $(OBJ)/drivers/klax.o \
   $(OBJ)/vidhrdw/blstroid.o $(OBJ)/drivers/blstroid.o \
   $(OBJ)/vidhrdw/eprom.o $(OBJ)/drivers/eprom.o \
   $(OBJ)/vidhrdw/thunderj.o $(OBJ)/drivers/thunderj.o \
   $(OBJ)/vidhrdw/rockola.o $(OBJ)/sndhrdw/rockola.o $(OBJ)/drivers/rockola.o \
   $(OBJ)/machine/berzerk.o $(OBJ)/vidhrdw/berzerk.o $(OBJ)/sndhrdw/berzerk.o $(OBJ)/drivers/berzerk.o \
   $(OBJ)/sndhrdw/cinemat.o $(OBJ)/drivers/cinemat.o \
   $(OBJ)/machine/bagman.o $(OBJ)/vidhrdw/bagman.o $(OBJ)/drivers/bagman.o \
   $(OBJ)/vidhrdw/zerozone.o $(OBJ)/drivers/zerozone.o \
   $(OBJ)/vidhrdw/crtc6845.o \
   $(OBJ)/drivers/omegrace.o \

# MAME specific core objs
COREOBJS += $(OBJ)/driver.o $(OBJ)/cheat.o


# generated text files
TEXTS += gamelist.txt

gamelist.txt: $(EMULATOR)
   @echo Generating $@...
   @$(CURPATH)$(EMULATOR) -gamelist -noclones -sortname > docs/Retrocadelist.txt
------------------------------

Brad
« Last Edit: February 15, 2004, 10:02:41 pm by Brad »

maraxle

  • Guest
  • Trade Count: (0)
Re:Compiling trimmed down mame/advmame?
« Reply #5 on: February 15, 2004, 10:11:55 pm »
Cool.  Thanks, Brad!

Brad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
  • Last login:August 03, 2018, 05:43:23 pm
    • www.emuchrist.org
Re:Compiling trimmed down mame/advmame?
« Reply #6 on: February 16, 2004, 12:08:27 am »
No problem, just consider that there should be no line breaks between each driver and &driver name. I strecthed the board horizontally to hell and gone and had to add them in to stop it.

Need any help or pointers, gimme a yell.

Brad

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Compiling trimmed down mame/advmame?
« Reply #7 on: February 17, 2004, 10:30:08 am »
Does anyone know which files I would have to change in order to build a version of MAME/AdvanceMAME with support for fewer games?  Specifically, I would like to go through my roms collection and only support the ones I have.  That way I could strip out the drivers for stuff I will never play, and build a smaller executable.

What Brad said.

If you're really ambitious you can move some of the object files from core.mak into mame.mak that you won't need, such as chd.o. If you do this you'll have to do some #ifdefing as well. That'll make your code a bit smaller, too.

By the way, have you done a successful compile under FreeDOS? I thought it couldn't be done due to long file name restrictions. Also, what sound card are you using?

Brad, thanks for the sample, that helps me out.

Regards,
Buddabing
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

creatine28

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 481
  • Last login:July 26, 2012, 03:41:48 pm
  • Which way to the Arcade?
Re:Compiling trimmed down mame/advmame?
« Reply #8 on: February 17, 2004, 05:55:43 pm »
I think this is the command you can use to output all the game drivers you need for compiling?   Its usefully to help figure out things when you're making a tiny compile.

mame -listdetails > listdetails.txt

Thinks you can put it like this?

mame dkong > listdetails.txt

Haven't done it in a while,  so if I've made a mistake, please feel free to comment?


Ah ha!   Here's the link I was looking for!

http://www.ionpool.net/arcade/mame/tiny_compile.html
« Last Edit: February 17, 2004, 06:01:59 pm by creatine28 »