Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (604)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  mame emulator in java (arcadeflex)  (Read 2374 times)
0 Members and 3 Guests are viewing this topic.
Offline gmoralis
« Posted 2014-07-30 14:07:31 »

I am working for the past 2 years on a java port of mame emulator (arcadeflex)  based on old mame 0.36 src

I have succesfully ported a number of drivers (most noticeable - pang , double dragon , pkladies , 1942 )

source is available in github

https://github.com/georgemoralis/arcadeflex036

If anyone interesting on helping just drop a note . Looking for help mostly in sound part (none of the drivers has sound yet)
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #1 - Posted 2014-07-30 18:44:43 »

I just love emulation Smiley
I've made a few myself (with collaborators), probably most notably JEmu2. It emulates lots of arcade games (up to games like Galaxy Force 2, Rail Chase, After Burner and Outrun), and a few consoles and home computers (Sega Master System, MSX, MSX2, Spectrum) and it supports sound.

A few questions though:
Any reason why you're porting such an old MAME release? Is it because later releases started to depend on macros and such so much?

And why a direct port? I haven't looked at your code yet, but I found that following MAME to the letter will make the code very rigid and 'static'. In JEmu2 I would never have been able to implement things like 'VirtuArcade' (i.e. 20 arcades running in parallel in 3D) if JEmu2 was a straight MAME port.

If I were to write an emulator again, I'd not follow MAME too closely but just make some helper classes to make porting MAME drivers easier. MAME is a beautiful piece of code that despite its age is still quite well designed and is an invaluable treasure of knowledge. But IMHO it doesn't translate that well into java, especially if you want to take emulators further than MAME.

Anyway, I'll check out your project and see if I can merge some of my sound code in there.

Offline gmoralis
« Reply #2 - Posted 2014-07-30 22:36:54 »

I just love emulation Smiley
I've made a few myself (with collaborators), probably most notably JEmu2. It emulates lots of arcade games (up to games like Galaxy Force 2, Rail Chase, After Burner and Outrun), and a few consoles and home computers (Sega Master System, MSX, MSX2, Spectrum) and it supports sound.

A few questions though:
Any reason why you're porting such an old MAME release? Is it because later releases started to depend on macros and such so much?

And why a direct port? I haven't looked at your code yet, but I found that following MAME to the letter will make the code very rigid and 'static'. In JEmu2 I would never have been able to implement things like 'VirtuArcade' (i.e. 20 arcades running in parallel in 3D) if JEmu2 was a straight MAME port.

If I were to write an emulator again, I'd not follow MAME too closely but just make some helper classes to make porting MAME drivers easier. MAME is a beautiful piece of code that despite its age is still quite well designed and is an invaluable treasure of knowledge. But IMHO it doesn't translate that well into java, especially if you want to take emulators further than MAME.

Anyway, I'll check out your project and see if I can merge some of my sound code in there.

yah i have seen jemu2 nice work Smiley

0.36 was an random choice mostly ( and it has less macros true) . Most of the games i wish to see on arcadeflex exists there so why go to much more complex code?

Direct port sure has some disadvantages but it's benefits are also a lot . I have also made a parser to translate most of mame drivers to java code automatically ( i will put it on github soon).

Thanks for the helping offer . it would be amazing if you can figure out how to add sound Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gmoralis
« Reply #3 - Posted 2014-07-31 13:03:08 »

just posted on my github (https://github.com/georgemoralis/arcadeflex036/commits/master)  my automatic tool for converting mame 0.36 source files ( drivers , machine , vidhrdw , sndhrdw files) from c code to java .

The conversion is more than 70% most of the times (it will improve more) and saves a lot of time to manual conversion Wink
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #4 - Posted 2014-07-31 18:05:29 »

I'll see what I can do about sound. The sound code in JEmu2 should be quite easily integrated in arcadeflex, I think (it has been reused before).

It was a bit tricky to add JavaSound support in JEmu2; not so much because JavaSound is that hard to use, but to make it work well (and across platforms).
My problem was to keep latency as low as possible and avoid buffer under-runs, since JavaSound doesn't provide any (reliable) way to measure how many bytes are in the queue. So I ended up timing everything and keep adjusting whenever there is a buffer under-run.
IIRC I had to rely on System.currentTimeMillis, so I suppose going to nanoTime will help there.

Anyway, if you have a use for the JEmu2 sources, just PM me; you can use it however you like as long its my own parts of the code (most of it is, but some parts were written by collaborators, for example the Out Run driver and the M68000 CPU emulator, so I can't be sure about those parts).
But I have to warn you, emulators were sort of my Java 'Hello World' getting out of hand, so things can get a bit messy in places Wink

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #5 - Posted 2014-07-31 18:20:34 »

That conversion stuff is interesting BTW.
A guy named Julien Frelat has done something similar in a project called 'JAPE' (http://www.innoveware.com/projects.html). I think he's more into .net these days, but it might be worth it to hook up with him to exchange ideas on the subject. Very nice guy (I've worked with him on 'CottAge').

Offline gmoralis
« Reply #6 - Posted 2014-07-31 21:56:19 »

That conversion stuff is interesting BTW.
A guy named Julien Frelat has done something similar in a project called 'JAPE' (http://www.innoveware.com/projects.html). I think he's more into .net these days, but it might be worth it to hook up with him to exchange ideas on the subject. Very nice guy (I've worked with him on 'CottAge').

I just tried a few drivers with my latest fixes in automatic tool , for example timepilot84 (tp84) . For tp84 driver i have convertion rate over 90% , some small things to fix by hand (and done the imports) , machine driver was okay too , only vidhrdw needed a bit of work by hand but hmm i can improve the converter more Wink

I was motivated by JAPE , in fact my early versions ( JAPE last public version was porting 0.20 mame) was based on that ( arcadeflex first version was 0.28 mame and was mostly an improvement of JAPE) . For arcadeflex 0.36 i had to write most of the stuff for scratch since mame's API from 0.28 to 0.36 changed heavily...
Offline gmoralis
« Reply #7 - Posted 2014-08-08 10:11:57 »

new working 6502 cpu core , and i guess you all have played this game Wink



Offline gmoralis
« Reply #8 - Posted 2014-08-11 21:29:07 »

Hypersports support on last commit (of course there is already track and field )

Offline gmoralis
« Reply #9 - Posted 2014-08-13 23:10:20 »

Vulgus driver available in latest commit

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gmoralis
« Reply #10 - Posted 2014-08-14 12:11:27 »

and let's not forget ddragon , ddragon 2 Smiley

From my knowledge arcadeflex is the first java arcade emu that emulate these



Offline kevglass

« JGO Spiffy Duke »


Medals: 221
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #11 - Posted 2014-08-21 11:10:27 »

Looks so cool! Smiley

Kev

Offline gmoralis
« Reply #12 - Posted 2014-08-21 11:16:32 »

Thanks Wink

Working on custom konami video chips
K052109 , K051960 and i have more interesting games running (ignore the glitch on the right of the screen Tongue)

Offline death_angel
« Reply #13 - Posted 2014-08-21 11:40:56 »

Looks really really good  Pointing

Like a Boss Hacker
Offline gmoralis
« Reply #14 - Posted 2014-09-04 13:13:47 »

Botton of ninth on last commit . Game seems to have a few issues left with the zoom chips but okay results looks interesting Wink

Offline gmoralis
« Reply #15 - Posted 2014-12-19 17:51:52 »

After months of silence i finally managed to get an interesting update on arcaflex which is sound!

I have already emulated Namco chip , AY8910 , SN76496 , MSM5205  , OKI6295 , ADPCM  and progress will continue with yahama chips .

This is a quite interesting update considering that it's the first time arcadeflex has proper sound Wink

you can check the progress at official git page at :

https://github.com/georgemoralis/arcadeflex036
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Elsealabs (15 views)
2014-12-28 10:39:27

CopyableCougar4 (19 views)
2014-12-28 02:10:29

BurntPizza (24 views)
2014-12-27 22:38:51

Mr.CodeIt (14 views)
2014-12-27 04:03:04

TheDudeFromCI (19 views)
2014-12-27 02:14:49

Mr.CodeIt (26 views)
2014-12-23 03:34:11

rwatson462 (58 views)
2014-12-15 09:26:44

Mr.CodeIt (47 views)
2014-12-14 19:50:38

BurntPizza (96 views)
2014-12-09 22:41:13

BurntPizza (115 views)
2014-12-08 04:46:31
How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!