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: How to remove games from Mame compile?  (Read 6295 times)

0 Members and 1 Guest are viewing this topic.

JoyMonkey

  • Voodoo Wiki Master . . .
  • Wiki Master
  • Trade Count: (+5)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2899
  • Last login:June 16, 2025, 09:16:27 pm
  • Candy is Dandy but Liquor is Quicker
    • JoyMonkey.com
How to remove games from Mame compile?
« on: March 25, 2004, 08:21:12 pm »
I'm trying to squeeze down an old DOS MAME 0.36 by only including the games I really really want. The reason I'd like to do this is so I can fit as much as possible onto a 16mb compact flash card (boot info, dos front-end, mame.exe, roms and snaps).

I've plucked out 95 chosen games and now I want to build a Mame.exe that only includes those 95 games. I haven't attempted compiling in years, but I can follow the official 'how to compile mame 0.36 final' guide no problem.

So what do I do? Do I just delete all the .c files that I don't want from the drivers folder? Or do I remove the unwanted game's lines from driver.c ????

Anyone...   anyone...    ?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:How to remove games from Mame compile?
« Reply #1 on: March 25, 2004, 08:39:15 pm »
Short answer.... it doesn't work that way.....


You can take out games by commenting them out, but it gets a little hairy when you start physically removing files.  The trouble is the fact that several games are linked to a single driver file.  With 95 games you have potentially 95 driver files that you have to keep.  Since there are only about 200 you'd be wasting a lot of time for negligable size decrease.

Your best bet is to use a really really old build of mame.  


Also compact flash is cheap as can be right now so why not just get a 64 or 128mb card and sae yourself soem hassle?


Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re:How to remove games from Mame compile?
« Reply #2 on: March 26, 2004, 03:45:33 am »
Would be rad if there was a utility to automatically build a custom build of Mame when you tell it what game drivers you want included...

JoyMonkey

  • Voodoo Wiki Master . . .
  • Wiki Master
  • Trade Count: (+5)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2899
  • Last login:June 16, 2025, 09:16:27 pm
  • Candy is Dandy but Liquor is Quicker
    • JoyMonkey.com
Re:How to remove games from Mame compile?
« Reply #3 on: March 26, 2004, 07:01:14 am »
Would be rad if there was a utility to automatically build a custom build of Mame when you tell it what game drivers you want included...

I was just thinking the same thing. Wish I knew anything about it.

PacManFan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 858
  • Last login:December 06, 2005, 12:18:56 pm
    • Kymaera Home Page
Re:How to remove games from Mame compile?
« Reply #4 on: March 26, 2004, 10:11:01 am »
That would shave off only 1MB or so from the size of the MAME executable. After you run UPX to compress the exe, It's not that big. I really don't see and advantage of taking drivers out of MAME. I could be wrong though....

-PMF
All Hail Smezznar! The Giant purple centipede of Omnicron 5. Regail him with your odiferous offerings of onion powder!

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:How to remove games from Mame compile?
« Reply #5 on: March 26, 2004, 11:00:44 am »
Would be rad if there was a utility to automatically build a custom build of Mame when you tell it what game drivers you want included...

That would be cool. I want to play Pac-Man, not Puck-Man.

Eliminating the unused code and ROMS would be pretty complicated, though. Like Howard said, there are often many games associated with a given driver file. It's not as easy as scanning the driver file for only the desired games, either. There's a lot of inheritance that goes on. Many of the ROMS are shared between games, too.

I think JoyMonkey's best bet would be to do a tiny compile. Even though there will be some code that will be unused, he'll get the 95 games he wants without all the chaff. The amount of time saved will pay for the cost of buying a 128MB flash disk. (They're only $50 or so).

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!

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re:How to remove games from Mame compile?
« Reply #6 on: March 26, 2004, 11:46:46 am »
Unfortunately you cannot have Pac-Man without Puck-Man.  Puck-Man is the original (parent) and Pac-Man is the clone.

You can merge the sets, IIRC, and there is a way to hide the original, but I'm not sure how it's done.

JoyMonkey

  • Voodoo Wiki Master . . .
  • Wiki Master
  • Trade Count: (+5)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2899
  • Last login:June 16, 2025, 09:16:27 pm
  • Candy is Dandy but Liquor is Quicker
    • JoyMonkey.com
Re:How to remove games from Mame compile?
« Reply #7 on: March 26, 2004, 01:14:14 pm »
Unfortunately you cannot have Pac-Man without Puck-Man.  Puck-Man is the original (parent) and Pac-Man is the clone.

You can merge the sets, IIRC, and there is a way to hide the original, but I'm not sure how it's done.

Actually, in the olden days using Mame0.36 (which I'm using for this project), pacman was the parent rom and there was no need for puckman at all. Ahhh, those were the days.

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:May 05, 2025, 06:18:51 pm
Re:How to remove games from Mame compile?
« Reply #8 on: March 26, 2004, 06:42:00 pm »
You can do a tiny compile.

Look take a look at tiny.mak

You may want to ask this at the mameworld.com compiling board.

http://www.mameworld.info/ubbthreads/postlist.php?Cat=&Board=compiling

Also check out vcmame.net

This is especially good if you are developing on an older PC as the object code size is massively reduced so there is a much quicker build turnaround. To use it - add in the drivers you want in src/vc/vctiny.h then manually enable the C files you want to compile (uncheck 'Exclude From Build' in settings).






Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:How to remove games from Mame compile?
« Reply #9 on: March 27, 2004, 11:26:36 am »
I'm trying to squeeze down an old DOS MAME 0.36 by only including the games I really really want. The reason I'd like to do this is so I can fit as much as possible onto a 16mb compact flash card (boot info, dos front-end, mame.exe, roms and snaps).

I've plucked out 95 chosen games and now I want to build a Mame.exe that only includes those 95 games. I haven't attempted compiling in years, but I can follow the official 'how to compile mame 0.36 final' guide no problem.

So what do I do? Do I just delete all the .c files that I don't want from the drivers folder? Or do I remove the unwanted game's lines from driver.c ????

Anyone...   anyone...    ?
I do this all the time . . .

For an older build, just change the driver line to read  TESTDRIVER insted of DRIVER in driver.c for any game you don't wan't to know about.

For newer builds, testdrivers are enabled, so you have to comment out the drivers you want to skip.

It's a good idea to include parents of any clones you want to keep, but not totally required.

For example, if you were to leave pacman in and comment out puckman, initially, pacman probably wouldn't work, b/c most sets use split roms, so MAME would want the puckman rom files.  If you had both roms MAME wouldn't care.

If you run CLRMAME, though, I think it would say that pacman did not have a parent and it wanted to remove the parent clone relationship, then it might want to delete your puckman rom, and add files to your pacman rom.  It will eventually work though.

Also, if you use Emuloader, remember Parental Lock is your friend.  You can leave the roms for puckman and pacman on your computer, add puckman to parental lock, and as far as the front-end is concerned, puckman doesn't exist.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:How to remove games from Mame compile?
« Reply #10 on: March 27, 2004, 05:40:48 pm »
Tiger I hate to interrupt, but he wants to physically remove games from the source to save harddrive space (which we've already agreed upon being a bad idea).  How would commenting out games save any space?


You would have to also remove the physical driver files to save any space.  

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:How to remove games from Mame compile?
« Reply #11 on: March 27, 2004, 05:45:18 pm »
Tiger I hate to interrupt, but he wants to physically remove games from the source to save harddrive space (which we've already agreed upon being a bad idea).  How would commenting out games save any space?


You would have to also remove the physical driver files to save any space.  
I thought that if you commented out all the games for a particular driver, the compiler skipped that driver and the compiled mame.exe was smaller.

Not sure exactly how it works or whether that is true or not.

There also seemed to be other posters in the thread interested in just not having games in MAME and I thought the info would be useful to them.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:How to remove games from Mame compile?
« Reply #12 on: March 27, 2004, 06:39:12 pm »
doh! Good point.... in theory this is true, but it doesn't always work that way.  

It has a lot to do with mame's over-use of macros.  It would get somewhat smaller, but not as much as physically removing the file.  The driver file still gets called for things like screensetup, and rom finding, which occur prior to launching the game.  To get rid of that you also have to comment out the entire "system" entry, and then it gets super tricky as a few systems are cross-referenced.