yoshisuga / MAME4iOS

Multiple Arcade Machine Emulator for iOS, iPadOS, tvOS, macOS (Catalyst)
Other
664 stars 105 forks source link

upgrade MAME to a more recent version #169

Open nuance1979 opened 4 years ago

nuance1979 commented 4 years ago

Hi guys,

Thank you so much for this awesome project! I really enjoyed it.

Sorry for bringing this up again (#98). I saw @yoshisuga had tried it and even contributed build configs to libretro. Even if the latest MAME versions (such as 0.219, 0.220) are too taxing on current iOS devices, would it be possible to upgrade to a somewhat newer versions? (See this chart.) Even better, how about revamping the build files so that we can check out a specific version of MAME and build this project against that version by, for example, borrowing from libretro?

Thanks, nuance1979

yoshisuga commented 4 years ago

Yes! I've been thinking of doing this for awhile and it's been on the back of my mind.

The latest MAME versions aren't too taxing on the newer iOS devices.

I've been thinking about supporting the latest MAME version for awhile, but it'd require some rework of the "osd" implementation for a custom UI, and although I haven't looked at it quite deeply yet, we probably need to rewrite a significant portion of the app to support it (maybe even a new app) while bringing over the new UI changes @ToddLa made.

The steps I'm thinking to support the latest MAME are:

  1. leverage the libretro method of building the core MAME binary - this involves that whole dance of running the Lua scripts to generate the make files necessary to compile the binary

  2. re-implement the OSD layer because the API has changed a bit since the 0.139 version. This can mirror what libretro is doing. A stretch goal would be to use the direct metal rendering path instead of CoreGraphics (which does use metal under the hood), and this would be to support custom shaders (I know @mrjschulte would love this)

  3. Update the UI layer (UIKit stuff) for the app and fix the input handling to match up with the new OSD implementation

ToddLa commented 4 years ago

I am working on a Metal layer now, I expect to have a simple shader up soon.

But yea the biggest part will be re-doing the OSD interface, the current one is a hack of global variables, but it is pretty stable.

The UICollectionView frontend can easily handle data coming from any source.

The nice thing about this code base is that it is simple and not a bunch of layers of cores and plugins....๐Ÿ˜„

nuance1979 commented 4 years ago

Cool! Thank both of you for your hard work! Let me know if I can be of any help.

mrjschulte commented 4 years ago
  1. re-implement the OSD layer because the API has changed a bit since the 0.139 version. This can mirror what libretro is doing. A stretch goal would be to use the direct metal rendering path instead of CoreGraphics (which does use metal under the hood), and this would be to support custom shaders (I know @mrjschulte would love this)

One of the things I've seen in moving other projects to MTL, or GLES, is that the exact frame timing experience for the Emulators sometimes get lost in the "Apple Dev Eco-soup" and the visual fidelity of the emulators temporal coherence isn't potentially as smooth as good 'ol CG.

ToddLa commented 4 years ago

Yea CG (really CoreAnimation) is designed for 60 (or 120!)Hz solid smooth animation. The more you get away from that the more complications and drift you can get......

01craft commented 4 years ago

With a newer (> .162?) MAME version, does that mean it would be possible to run some of the formerly MESS emulators? Retro home computers, etc.

mrjschulte commented 4 years ago

I think we would initially stick to supporting MAME, and leaving MESS for a later iteration.

ToddLa commented 4 years ago

Isn't MAME and MESS merged now....

ToddLa commented 4 years ago

Also when we move to a modern MAME version, we are gonna need to have the concept of media, like cartridges, floppies, and hdd images.

Right now we have a 1:1 mapping from romset to game, we show a single title image for each one.

When go down the machine+media path, the UI will need to reflect that.

chinarut commented 3 years ago

Isn't MAME and MESS merged now....

this is my understanding.

It sure would awesome to pull the 8 year out of me and keep developing my Color Computer 3 progs on my iPad Pro ๐Ÿ˜Š๐Ÿ˜‰

Short-term, I have no issues with mounting disk images using โ€œToggle UIโ€ menus in the emulator just like it works on desktop.

That said, I do agree some thought will have to be put into managing it all.

I must say, preserving old systems like this is nothing short of amazing - kudos to the whole community!