Would be possible Mame on Arm Soc like ScummVM?

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Lroby74
Captain Atari
Captain Atari
Posts: 156
Joined: Sun Sep 04, 2016 8:35 pm

Would be possible Mame on Arm Soc like ScummVM?

Postby Lroby74 » Fri Jun 14, 2019 6:28 pm

Hello,
just wondering if would be possible to have a working version of Mame on Arm SoC, like is actually ScummVM (no need to do it on FPGA).

I think it would be wonderfull..

NegSol
Captain Atari
Captain Atari
Posts: 324
Joined: Sat Dec 05, 2015 9:22 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby NegSol » Fri Jun 14, 2019 7:23 pm

I smell someone trolling 8)

Nevermind ....

Lroby74
Captain Atari
Captain Atari
Posts: 156
Joined: Sun Sep 04, 2016 8:35 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Lroby74 » Fri Jun 14, 2019 10:55 pm

why trolling?

Just asking..

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 173
Joined: Wed Sep 26, 2018 6:03 am

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby kitrinx » Fri Jun 14, 2019 11:14 pm

no-way.jpg
You do not have the required permissions to view the files attached to this post.

Hewhoisred
Atari freak
Atari freak
Posts: 51
Joined: Sun Dec 09, 2018 6:53 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Hewhoisred » Sat Jun 15, 2019 12:10 am

In all seriousness, is it possible? Yes, almost certainly, but it sort of goes against the spirit of MiSTer-- reproducing existing hardware on the FPGA--- hardware replication vs software emulation.

This is one of those cases where a Raspberry Pi, which has a much stronger ARM processor than the DE10 can do this job so much better, and for much cheaper.

That said, similar to the SCUMM situation, nothing is stopping anyone from porting MAME or any other Linux app to the MiSTer platform, but be aware that it will almost certainly never officially be a part of the main MiSTer project.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Sorgelig » Sat Jun 15, 2019 12:25 am

Hewhoisred wrote:much stronger ARM

DE10 has similar to RPi 2 CPU performance. So, it's not "much".

Hewhoisred wrote:but it sort of goes against the spirit of MiSTer

No such thing.

Hewhoisred wrote:but be aware that it will almost certainly never officially be a part of the main MiSTer project.

Does it matter to be an official part?


Most likely MAME needs some sort of 2D graphics acceleration to have a good speed of emulation.
But it would be interesting to see the MAME port and it's performance.

Hewhoisred
Atari freak
Atari freak
Posts: 51
Joined: Sun Dec 09, 2018 6:53 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Hewhoisred » Sat Jun 15, 2019 1:12 am

Hewhoisred wrote:but it sort of goes against the spirit of MiSTer


Sorgelig wrote:No such thing.


I'm not sure that's true, especially after having read this article "Why FPGA"?
https://github.com/MiSTer-devel/Main_MiSTer/wiki/Why-FPGA

As the project lead, you must have a vision for where you want this project to go?

Of course, we can see all manner of ports on the ARM. Anyone contribute to the project and I understand your hesitation to discourage anyone from doing that, but certainly there should be some things that you don't want/need to see on the platform.

User avatar
Newsdee
Atari God
Atari God
Posts: 1482
Joined: Fri Sep 19, 2014 8:40 am

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Newsdee » Sat Jun 15, 2019 4:32 am

To be done right, it would have to be more than just a port; an attempt to get the best performance out of it by doing a hybrid approach.
It's certainly interesting, but it would need a very motivated developer(s) that know both MAME and Verilog very well.

I don't think a direct port would be against "the spirit" of the board, but I don't see the point in the effort when a $35 RPi board can run the same thing, and it will overlap with functionality of cores. ScummVM is at least is something a bit different, that even MAME does not do.

Lroby74
Captain Atari
Captain Atari
Posts: 156
Joined: Sun Sep 04, 2016 8:35 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Lroby74 » Sat Jun 15, 2019 6:39 am

When I read that a Raspberry can do things like Mame, well I have a Windows PC workstation with a dual LCD monitor (one of which is a 16: 9 placed vertically for games like 1943), and a double USB arcade joystick where the Mame runs perfectly, but I love the dualism of the Mister and I also like the idea that a single device can potentially run the best of the 2 worlds, FPGA and ARM..

(Honestly, I only use Raspberry only for the Bare Metal C64 system (which does not use Linux as an operating system) placed inside the body of a real C64 with the LED turned on, using the keyboard of the real C64 and also using the true DB9 joysticks, connected to the same CRT 14" monitor of the real C64 with composite audio video cable and it's great, for other things it doesn't exist for me)

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 173
Joined: Wed Sep 26, 2018 6:03 am

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby kitrinx » Sat Jun 15, 2019 1:38 pm

No matter how much you torture the code, you're not going to performance even as good as a raspberry pi 2. "Hybrid" emulation is fairy dust at this point, the effort of making someone elses software work with fpga hardware is probably more difficult than just rewriting the core in HDL fully. While the CPU of the Pi2 and the FPGA arm are roughly equivalent, the RPI has an VideoCore IV GPU which can support GLES 2.0 for hardware accelerated rendering. On MiSTer the best you can do is framebuffer blitting at low resolutions. So in the end, while you might be able to make such a thing limp in and partially work, it would just end up being an embarrassment for the project that runs poorly and is complex to set up. The kind of thing where you say to your friend "oh.. no don't pick that one, try the SNES core instead".

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Sorgelig » Sat Jun 15, 2019 1:56 pm

I think GLES is not used for many arcade emulators.
Still interesting to see performance of arcade HW like M72. Does it really needs GLES?

olin
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 106
Joined: Tue Nov 21, 2017 8:57 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby olin » Sat Jun 15, 2019 2:46 pm

Sorgelig wrote:Most likely MAME needs some sort of 2D graphics acceleration to have a good speed of emulation. But it would be interesting to see the MAME port and it's performance.

Depends which machines are emulated. By my experience from porting MAME on BananaPi (Dual Cortex-A7 at 1GHz) 2D machines up to year 1990 work fine (with exceptions of machines that have far too many chips to emulate). Acceleration certainly helps, I used Neon asm for scaling blitter, but in MiSTer case the FPGA scaler can do the grunt work. The second ARM core helps as well (offloads some blitting tasks and sound buffer feeding).
3D machines and software emulation of 3D is VERY slow and unplayable on BPi MAME. The port used direct access to frame buffer (not DirectFB though, just by using ioctl to /dev/fb device ) for video and Alsa for audio. Should not be a problem to recompile for MiSTer. Sourcecode is available if anybody would like to try.
Last edited by olin on Sat Jun 15, 2019 3:02 pm, edited 1 time in total.

olin
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 106
Joined: Tue Nov 21, 2017 8:57 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby olin » Sat Jun 15, 2019 3:01 pm

Sorgelig wrote:I think GLES is not used for many arcade emulators.
Still interesting to see performance of arcade HW like M72. Does it really needs GLES?


GLEs is not required. MAME has a software renderer (it is used for saving screen shots) that renders the graphics primitives into a memory buffer and then it is up to the programmer what (s)he does with the buffer. It can be scaled and blit to screen frame-buffer or saved to a file or compressed and sent to a remote display etc. The software renderer is fully fledged, supports even 3D primitives.

M72 should run just about fine, it's using just 3 chips relatively low clocked. As written before, systems like CPS1 with main CPU up to 10MHz, 1 sound cpu at 4MHz and an FM chip run at 60fps on BPi. Cortex A9 (Cyclone V) is out-of-order architecture and should be a bit quicker than Cortex-A7 on the same frequency (about 10 - 15%).

Edit: What I would see as a benefit is to implement custom arcade videomodes with exact FPS for these machines. For example M72 machines usually outputs video at 55Hz and on a regular PC (vithout Gsync) that runs on 60Hz there is significant screen judder during scrolling. MAME itself does support non-standard FPS, it is usually the port (DirecX, SDL) that depends on HW that can not output video at custom refresh rate. MiSTer can of course generate video signal at whatever vertical frequency via FPGA code, so that would produce butter smooth arcade experience.
Last edited by olin on Sat Jun 15, 2019 3:15 pm, edited 1 time in total.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Sorgelig » Sat Jun 15, 2019 3:08 pm

Currently MiSTer's frame buffer has only one buffer. For performance it's possible to add dual buffer, so it won't need to copy the final buffer, but construct the scene directly. Framebuffer of MiSTer is a system memory, so it's possible for MAME just to draw directly in-place.

olin
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 106
Joined: Tue Nov 21, 2017 8:57 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby olin » Sat Jun 15, 2019 3:27 pm

The source code for FB and Alsa port of MAME is here if anybody would like to try:
https://app.box.com/s/n6conw1bb4f83nqgytrefggmx6lcdbsa

unpack on target ARM machine and run ./compile_fb.sh which should produce an executable if compiler, all headers and libraries (alsa) are installed.

onaryc29
Atari User
Atari User
Posts: 41
Joined: Mon Dec 10, 2018 9:47 am

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby onaryc29 » Sat Jun 15, 2019 4:59 pm

The pb is that latest mame needs a powerfull PC to run and RPI ports are done with old source version. ScummVM is based on the last version, run fullspeed (well seems to) so, imho, that makes sense.

I do not think that it is that interesting to have an inferior version (inaccurate, high input lag, ...) running on the mister (unless someone is able, as said before, to mix the FPGA/arm to have a low input lag accuracy port, but that seems unlikely).

djmartins
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 120
Joined: Wed Nov 21, 2018 10:26 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby djmartins » Sat Jun 15, 2019 10:55 pm

onaryc29 wrote:I do not think that it is that interesting to have an inferior version (inaccurate, high input lag, ...) running on the mister (unless someone is able, as said before, to mix the FPGA/arm to have a low input lag accuracy port, but that seems unlikely).


So true.
Better off spending your time writing FPGA code for arcade boards that have a few games on them.

Locutus73
Captain Atari
Captain Atari
Posts: 493
Joined: Wed Feb 07, 2018 6:13 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Locutus73 » Sun Jun 16, 2019 7:06 am

Sorgelig wrote:
Hewhoisred wrote:but it sort of goes against the spirit of MiSTer

No such thing.

That’s the gist: it’s an open source project/platform, not a closed source product. Every developer is free to explore and test whatever he/she likes, and every user is free to use whatever he/she likes. What won’t be used probably will be Darwinian abandoned. Restricting the project to one single blessed direction like a product (i.e. an Apple product, and don’t get me wrong, I love their products) IMHO will harm the openness of the project more than imposing one (even if successful) view.
When I buy an Apple product I want a strongly controlled product.
When I fiddle with an open source project I want freedom and all possibilities explored.

My 2 cents.

Regards.

Locutus73

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby brNX » Sun Jun 16, 2019 11:47 am

Locutus73 wrote:
Sorgelig wrote:
Hewhoisred wrote:but it sort of goes against the spirit of MiSTer

No such thing.

That’s the gist: it’s an open source project/platform, not a closed source product. Every developer is free to explore and test whatever he/she likes, and every user is free to use whatever he/she likes. What won’t be used probably will be Darwinian abandoned. Restricting the project to one single blessed direction like a product (i.e. an Apple product, and don’t get me wrong, I love their products) IMHO will harm the openness of the project more than imposing one (even if successful) view.
When I buy an Apple product I want a strongly controlled product.
When I fiddle with an open source project I want freedom and all possibilities explored.

My 2 cents.

Regards.

Locutus73



I should probably ignore this, but I won't, projects usually have a goal, any projects, so that's why you don't see someone adding doom to libreoffice and an audio analyzer to gimp. The goal sometimes changes and/or gets expanded (like it is happening right now) , so if this is the case sure, but if it doesn't fit the project I see why people won't like it, and again it's open you can fork it , do whatever you want with it, if the changes don't fit the devs vision of it I can see why it isn't accepted or integrated in an "official" way.

tl;dr projects have a goal , if the goal expands I'm fine with it, but no chaos isn't good

Cheers

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5240
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Sorgelig » Sun Jun 16, 2019 12:02 pm

There is no chaos. Mostly vapour fights :)
MiSTer recently opened ability to create Linux apps having graphics and audio. I have no idea yet where it will lead to. It's good to explore the ability and performance of simple emulators and graphics capability overall. If it will allow to use some software emulators with good performance, then why not? It's not about replacing the RPi, but extending versatility of MiSTer.
And more Linux side will be used, more chance will be for true hybrid use. Hybrid emulation is pretty much hard to make due to lack of experience - it's pretty much new technology, so it needs experience. Who will make the first hybrid emulator: those who usually write soft emulators or FPGA cores? I don't know - time will tell.
Time after time i see excuses from those who call themselves as developers: "FPGA is completely new area.. if it could be a traditional programming, then i would help." So.. Here we are: traditional Linux development. Show your master :)

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby brNX » Sun Jun 16, 2019 12:39 pm

Sorgelig wrote:There is no chaos. Mostly vapour fights :)
MiSTer recently opened ability to create Linux apps having graphics and audio. I have no idea yet where it will lead to. It's good to explore the ability and performance of simple emulators and graphics capability overall. If it will allow to use some software emulators with good performance, then why not? It's not about replacing the RPi, but extending versatility of MiSTer.
And more Linux side will be used, more chance will be for true hybrid use. Hybrid emulation is pretty much hard to make due to lack of experience - it's pretty much new technology, so it needs experience. Who will make the first hybrid emulator: those who usually write soft emulators or FPGA cores? I don't know - time will tell.
Time after time i see excuses from those who call themselves as developers: "FPGA is completely new area.. if it could be a traditional programming, then i would help." So.. Here we are: traditional Linux development. Show your master :)


I completely agree, the chaos bit was about the "anything goes it's open source" "argument".

Myself, what I really want to see is people develop new things for the platform, explore the strong points of both sides, use it as a tool to develop and use to make a good user experience instead of simply porting/compiling existing software. I understand that usually the first step to make something new is to make the old one work, so I'm fine with it. If I wanted something existing I would get an RPi (again my own opinion, use-case).

Opening development to new people is a good thing, I agree with you on that point, there are no excuses anymore.

Locutus73
Captain Atari
Captain Atari
Posts: 493
Joined: Wed Feb 07, 2018 6:13 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Locutus73 » Sun Jun 16, 2019 12:41 pm

brNX wrote: projects usually have a goal, any projects, so that's why you don't see someone adding doom to libreoffice and an audio analyzer to gimp.

I don’t see exploring retro gaming possibilities on MiSTer chaotic as adding doom to libreoffice.
By the way:


brNX wrote:The goal sometimes changes and/or gets expanded (like it is happening right now) , so if this is the case sure, but if it doesn't fit the project I see why people won't like it, and again it's open you can fork it , do whatever you want with it, if the changes don't fit the devs vision of it I can see why it isn't accepted or integrated in an "official" way.

The fork logic applies to any reasoning: i.e. if you don’t like how MiSTer is kept open to experiments and you feel it chaotic, you can fork it and have a more focused project.

Regards.

Locutus73

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby brNX » Sun Jun 16, 2019 12:59 pm

@Locutus73 sure, deflect the issue like you want/will and troll how you want/will, my point was clear and still stands.

Open source != Anything goes

Cheers

Locutus73
Captain Atari
Captain Atari
Posts: 493
Joined: Wed Feb 07, 2018 6:13 pm

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby Locutus73 » Sun Jun 16, 2019 1:10 pm

brNX wrote:@Locutus73 sure, deflect the issue like you want/will and troll how you want/will, my point was clear and still stands.

Trolling?

brNX wrote:Open source != Anything goes

I agree in the sense of Anything=total random chaos as in Darwinian selection. But exploring retro gaming MiSTer possibilities doesn’t seem to me as exploring word processing MiSTer possibilities and freedom of exploring in open source is a strong characteristic.

Regards.

Locutus73

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Would be possible Mame on Arm Soc like ScummVM?

Postby brNX » Sun Jun 16, 2019 1:14 pm

Locutus73 wrote:
brNX wrote:@Locutus73 sure, deflect the issue like you want/will and troll how you want/will, my point was clear and still stands.

Trolling?

brNX wrote:Open source != Anything goes

I agree in the sense of Anything=total random chaos as in Darwinian selection. But exploring retro gaming MiSTer possibilities doesn’t seem to me as exploring word processing MiSTer possibilities and freedom of exploring in open source is a strong characteristic.

Regards.

Locutus73


just like this shows, arguing details till exhaustion and deflecting the big issue and "misunderstanding" things can be called trolling yes.

Cheers


Return to “MiSTer”

Who is online

Users browsing this forum: remowilliams and 6 guests