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: Idea: Modular MAME  (Read 2471 times)

0 Members and 1 Guest are viewing this topic.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Idea: Modular MAME
« on: October 13, 2004, 05:35:05 am »
As many of you have noticed, whenever a newer version of MAME is released, things slow down, even some old games.

What happens is that when more games are added, MAME has to load and deal with hundreds of new processor chips and new features, making even Pac-man run slow on a P133.

It also sucks up the memory.
50 MB for me, even on the simplest games.

What I propose is to simply not load the features that are not needed.  When would you ever need to use the latest graphic chips while playing a game of Tron?

The MAME files (CPUs, GPUs, and the like) should be located in seperate files, loading each on an on-demand basis.
This would eliminate using up the ram.

Also, there should be built-in feature blocking.  If a game doesn't use 32bit sprites, don't load the code for it.

Alas, I have no experience in either c, c++, or the MAME source.
Unless someone here is feeling generous, we may be stuck with dozens of MAME versions forever.

(Note: Please correct me if I have anything wrong here.)

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Idea: Modular MAME
« Reply #1 on: October 13, 2004, 06:12:19 am »
Well the drivers are all separate in source, so you can just remove ones you don't want and compile.  So in effect you can already do what you want.

Of course the MAME core will remain the same, probably slower than previous versions, but that's progress for ya...

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:Idea: Modular MAME
« Reply #2 on: October 13, 2004, 10:40:40 am »
btw, this already happens... Windows only loads the sections of the code in memory being used...

UNLESS you use UPX to compress the binary (which mame does).  UPX compresses the executable, adds its own uncompress code at the beginning.  It then loads the entire file (6.x mg for mame) into memory, then uncompresses the chunks it needs into memory.

What you want to do is compile your own, or use UPX to uncompress the binary..

Either way, the memory footprint with dramatically be reduced...

BUT.. on some systems... the increase in file size (even for the parts being loaded) will increase load time I've heard... I personally think it speeds it up considerably.


lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:May 05, 2025, 06:18:51 pm
Re:Idea: Modular MAME
« Reply #3 on: October 13, 2004, 10:43:50 am »
This gets suggested every couple of weeks on the mame boards.
The main arguments against it seem to be.

1) There is no need to do so. Since most modern OS will keep in memory the code that is used and the rest will be swapped to disk. (note that this is only true if mame is not UPX if mame is UPXed then the whole thing stays in memory)

2) Memory is cheap.


arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Re:Idea: Modular MAME
« Reply #4 on: October 13, 2004, 11:03:47 am »
While its true that that a larger code footprint will affect load times its not neccessarily true that new/other features that are unused by a particular driver will make it run slower.

I think in general its been increased functionality/flexibility in the core of mame, put there to support more drivers, that has added to the drop in performance over the earlier versions.

I suppose an example might be that of multiple CPU cores. Adding the functionality to support multiple cpu drivers probably had a negative impact (to some extent) on performance (even on single cpu games) when it was added. Taking out drivers that use multiple cpus wouldnt speed single cpu games at this point as its the core that has the extra overhead.

The memory subsystem provided by the core has gone through many changes to support different target platforms and the requirements of different drivers and I'm sure there has been a loss of speed there but you cant have the benefits it enables (more drivers/games) without the down sides.

Cheers

Andy

As many of you have noticed, whenever a newer version of MAME is released, things slow down, even some old games.

What happens is that when more games are added, MAME has to load and deal with hundreds of new processor chips and new features, making even Pac-man run slow on a P133.

It also sucks up the memory.
50 MB for me, even on the simplest games.

What I propose is to simply not load the features that are not needed.  When would you ever need to use the latest graphic chips while playing a game of Tron?

The MAME files (CPUs, GPUs, and the like) should be located in seperate files, loading each on an on-demand basis.
This would eliminate using up the ram.

Also, there should be built-in feature blocking.  If a game doesn't use 32bit sprites, don't load the code for it.

Alas, I have no experience in either c, c++, or the MAME source.
Unless someone here is feeling generous, we may be stuck with dozens of MAME versions forever.

(Note: Please correct me if I have anything wrong here.)


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19433
  • Last login:Today at 02:08:44 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Idea: Modular MAME
« Reply #5 on: October 14, 2004, 01:47:12 am »
Regardless.....  mame doesn't need to run on crappy systems anymore.  Why?  Because the more obsolete technology gets, the cheaper it gets.  For an even 200 bucks you can build a fairly powerful pc (leaving out a fancy sound card, video card and cdrom of course).  That means if you are on a budget, you can probably get a sub-gig pc for a song.  So if the average person can get, say a 900mhz for next to nothing why in the heck would the mame devs waste time making sure the core is still optimized for a p266?

In short... if you have really really old hardware you can:

a.  Stop being cheap, spend a few bucks and upgrade.

or

b.  Stick to the version of mame you already have on the system and quit your complaining.  



This isn't meant to be rude, I'm just putting things in perspective.


However, getting back to the point the other guys made... they are correct.  If you got any performance increase from making mame more modular it'd be minimal at best.  Worst case it'd actually slow mame down as it'd have to externally call dlls and such, which takes time.  

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re:Idea: Modular MAME
« Reply #6 on: October 14, 2004, 02:19:16 am »
But I like being cheap...

Where do you get 900MHz computers for next to nothing?

I thought MAME was designed to revitalise old computers that no one wants anymore.  I guess we'll just have to make more landfills.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re:Idea: Modular MAME
« Reply #7 on: October 14, 2004, 03:23:45 am »
Friends & neigbhors.

I've been given 4 or 5 500ish mhz PCs from friends, family members & coworkers for free.  

You could definitely get the 900s for little. I'm getting ready to put a new 3 ghz processor & mobo into my arcade machine for $350 or so, reusing the parts that I can. I've seen a number of slower machines for about $100.


That's pretty cheap in the grand scheme of things.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Idea: Modular MAME
« Reply #8 on: October 14, 2004, 05:10:30 am »
I thought MAME was designed to revitalise old computers that no one wants anymore.

I hardly think that is what MAME was designed for.  As Howard says, you can always just run an old version of MAME.  I have an old P2 333 kicking around which I just run MAME v0.36final on - works pretty well...

And there's always Vantage ;)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19433
  • Last login:Today at 02:08:44 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Idea: Modular MAME
« Reply #9 on: October 14, 2004, 09:34:12 pm »
Mame was designed to document old ARCADE HARDWARE before it dissappears.  Not a single goal in mame's objectives covers actually playing the games.  As it says clearly on the mame website, playability is just a nice side-effect of the documentation efforts.  

If you can't afford about 100 bucks then you are in the wrong hobby.  It never ceauses to amaze me how people will spend a ton of money on controls, and a cabinet, ect and want to get off cheap on the most important part, namely the pc.  It's what runs the games kiddies, give it some more love.  
« Last Edit: October 14, 2004, 09:34:39 pm by Howard_Casto »

GGKoul

  • Cheesecake Apprentice
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4707
  • Last login:May 26, 2024, 02:06:23 am
  • I was once a big man!! -4700 posts later...
Re:Idea: Modular MAME
« Reply #10 on: October 15, 2004, 12:09:22 am »
If you can't afford about 100 bucks then you are in the wrong hobby.  It never ceauses to amaze me how people will spend a ton of money on controls, and a cabinet, ect and want to get off cheap on the most important part, namely the pc.  It's what runs the games kiddies, give it some more love.  

About time someone said it...

wpcmame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 278
  • Last login:February 18, 2024, 01:27:00 pm
Re:Idea: Modular MAME
« Reply #11 on: October 15, 2004, 02:01:54 am »
1) There is no need to do so. Since most modern OS will keep in memory the code that is used and the rest will be swapped to disk. (note that this is only true if mame is not UPX if mame is UPXed then the whole thing stays in memory)
Even if mame is UPX:ed, unused parts will be swapped to disk. In modern OS:es memory is just a resource where parts are in L1,L2 cache, other parts are in primary RAM and the rest is on the disk. The OS tries to ensure that often used memory is in cache and primary RAM while unused parts gets swapped to disk.

The difference with UPX:ed mame is that the executable is first uncompressed and then gets swapped to disk while a non-upx:ed mame only loads the required parts in the first place and the rest stays on disk. Note that in linux, upx:ed files gets uncompressed to disk so there it will be no difference.