Friday 16 September 2011

MAME4droid: Infinate lives anyone?

An easy method to activate the cheat system has been posted by Seleuco, though the problem will likely be fixed soon in an upcoming build.  In the meantime, simply create a folder in sdcard/Roms/Mame4all called cheat or  cheats.  ('cheat' worked for me.)  Then move the installed cheat.dat into it. Start MAME4droid, load a game with cheats enabled, call up the Mame menu and navigate to cheats, then enable the cheats of your choice.   Tested and working!

Thursday 15 September 2011

MAME4droid: quick news

MAME4droid version 1.1.1 has been released through the Android Market.

September 14, 2011:
Version 1.1.1 Disabled ASM z80 ASM Core for Sound CPUs. It was causing problems with some ROMs.
 Also, Seleuco has confirmed MAME4droid's cheat system is currently not functioning as it should.

Yes its seems that mame cheat file is no read properly on MAME4droid (its work in iMAME4all)... i dig on it... and i will fix it.

Thanks!

Tuesday 13 September 2011

MAME4Droid documentation

So the features I found were not undocumented, they can be found in the Wiki section here.  It just hasn't been updated yet to mention MAME4droid.  The controls are as follows:

- Virtual pad: Movement in pad, mouse and analog control of the four players.
- Buttons B,X,A,Y,L,R: Buttons A,B,C,D,E,F.
- Button SELECT (1): Insert credits (UP+SELECT = 2P credits, RIGHT+SELECT = 3P credits, DOWN+SELECT = 4P credits).
- Button START (2): start (UP+START = 2P start, RIGHT+START = 3P start, DOWN+START = 4P start).
- Button L1+R1: Pause.
- Buttons L2: Exit to selection menu to select another game.
- Buttons L1+START simultaneously: Show profiler.
- Buttons START+SELECT simultaneously: Access to the MAME menu.
- Button R2: Open help & global options.
NOTE: To type OK when MAME requires it, press LEFT and then RIGHT.

On another note, there does appear to be a 'cheat.dat' file that is installed with MAME4droid.  I'm not sure if it is not functioning, or that the games I've tried are not covered by the cheat file.

Monday 12 September 2011

New MAME4droid v1.1

Two new versions of MAME4droid have been released since my last post.  Seleuco has been busy and times are good for Android gamers everywhere.


"DEVELOPMENT 

September 13, 2011: - Version 1.1. 
Speed boost in low-end machines. Added ASM 68xxx & z80 ASM Cores. Minor Bug Fixes. 

September 12, 2011: - Version 1.0.2. 
Minor Bug Fixes. Improve Honeycomb HW acceleration responsiveness ."

Insight on the immediate future of the program was posted by Seleuco in the Issues section of his website.

"I'm going to pause develop two weeks after the first release... I'm only fixing... But I have some things to do in future versions... The most important is the analog touch part that I develop to iPhone version... Far way from android control."

No noticeable changes with the wiimote controls with the latest updates.  The method of accessing the in-game MAME menu still works.  One of the great things this is handy for is setting a key for 'Pause'. 

raindog469 reports the Android code for MAME4droid is now available to view.  I just scanned MAME4all.java.  Glad I didn't have to come up with that.

Lastly, I attempted to use the in-game cheat find, but did not get very far with it.  It's very unlike other cheat searches found in emulators like Zsnes.  At any rate, I'm hoping for a cheat file option.
 
 

MAME4droid v1.01: Undocumented features?

I'm using a standard Wiimote when playing MAME4droid on my tab, but I kept hitting the controller's back button by accident, and exiting the game.  So I went into the settings and defined the back button to "SELECT' which I thought would be next to turning it off.  (Setting 'BACK' to another button only gave me two 'BACK' buttons.)  Turns out with this version of MAME4droid, 'SELECT' is actually 'add coin'!

But it gets better.

I had also set the 'A' button to 'START' on my Wiimote, and while playing today, accidentally hit 'START' and 'SELECT' together. The in-game options menu appeared!  We may not have save states, but we can cheat.

Unfortunately, it's Monday and have to get to work.  No time to test any of it out and questions remain:

Will a normal cheat file work?
What is a watchpoint?
Will MAME4droid remember the cheats I find?




Saturday 10 September 2011

MAME4droid: A few screenshots

Tried to make a video, but have issues with my camcorder.  Until I figure it out, here are a few MAME4droid screen captures.

 title screen


Popeye (bootleg), landscape, original aspect ratio

Burgertime, portrait mode

Digdug, portrait mode, stretched to screen, no onscreen controls

Teenage Muntant Nnija Turtles

 The Simpsons

Friday 9 September 2011

Initial gameplay with MAME4droid

So the first few games I've tried seem to work well with
MAME4droid running on my Viewsonic g-tablet.  It's also compatible with my aftermarket rom, Vegantab.  My main problem at the moment is with my wiimote.  Only the directional pad, A, and the back button seem to register.  The wiimote is new and all the buttons show up when pressed in the wiimote controller app, so I'm doubting the problem is with the controller.  But when I try to define them in MAME4droid's settings, pressing 1, 2, +, -, or Home does nothing.  Could be a case of RTFM :)

Thursday 8 September 2011

Yes, we DO have MAME for Android!

I'm so excited, I want to leave work and go get my tab.  I haven't posted on this blog in quite a long while, because to be honest, I got really discouraged and turned to other interests.  But it seems I should have kept my chin up because MAME is now available for Android!



"MAME4droid v1.0b2 (New): MAME4droid is a port of iMAME4all for Android 2.1 and upper phone versions. Native Support for Android honeycomb tablets. Android 3.0 (Honeycomb) 2D Hardware Accelerated. Autorotate. HW Keys remapping supported. Selectable hide/show touch Controller. Smoothed image. Animated touch stick and more."

http://code.google.com/p/imame4all/

Thanks Seleuco (David Valdeita)!

I haven't yet tested it out, but it will be the first thing I do when I get home tonight to be sure. 

Monday 4 July 2011

Yes, we have no MAME for Android

Vacation is over, and unfortunately I have not made any progress in creating a Android port for MAME.  My search continues though and I'll continue to campaign for the cause.  I'm thinking of starting a collection to give out a reward to the first developer that is successful, but I'll have to check with the MAME guys first.

Dropping out of that C programming course is coming back to bite me in the ass.  Who knew?  At work, everyone thinks I'm a computer expert, but I feel like such an idiot when it comes to this stuff.  And I kinda liked the Android OS before I found out MAME wasn't ported and why.  I had high hopes knowing Android was derived from Linux, but instead Google puts the user in a bubble, the so called Dalvik virtual machine.

That's messed up if you think about it.  Like using WinXp running virtually on a Win7 PC to run ALL your programs, and being locked out of doing anything at the Win7 level.   Well, not really locked out, as some could rewrite the Android code...

But I digress.

Time for some fun.  I think some MAME gameplay videos are in order.  We must show the people why we want a port!

Thursday 30 June 2011

Just an idea

Maybe if we bought an Android device for one of the MAME developers, they might get interested in porting it.  The more I look into matter, the more it seems that the project requires someone who is familiar with the source code.  Another easier option on the personal level would be to just forget Andorid and buy another device that uses an OS that is more MAME friendly.  I really wish I could run a different OS on my gtab, but the options are limited.

I need to go through many more tutorials before I'll be ready to successfully program things together. Seeing as this may take years, I continue to explore other options.

Sunday 26 June 2011

My brain hurts

I've managed to create a library (a .so file) of the MAME source code with Cygwin and the Android NDK.  For this build I used an older source version (.067).  This may not be the right approach, but my reasoning is - less code, less chance of problems.  Anyhow, after modifying my app to call the native code and running the emulator, the app crashed at the point the call was made.  No idea why, but apparently there is a debugger addon for Eclipse/Android SDK native code which I will attempt to use next.

I wonder if it is safe to assume ndk-build will make a library of c/c++ source code, even if the code doesn't execute properly in Android?  There is also the possibility I'm not making a proper call in my java code.  I may drop MAME temporarily and try some source code for a simpler application.

Btw, even if you can't help on technical level, leave a comment below to show you want an Android port of Mame!

Saturday 25 June 2011

Progress report

Not much to report really.   I have been able to use the Android SDK to produce a simple frontend for MAME (basically just a command line prompt), but tackling the NDK is a different matter.  Without much experience compiling, I decided to try a normal compile of MAME on my vista machine first.  To do this successfully I had to use a repackaged version of MinGW called mingw-w64.  The Android NDK on the other hand uses it's own specialized toolchain, and I don't know if it's possible to incorporate mingw-w64, or if it is necessary.  I didn't even know what a toolchain was a couple of days ago.


A recent post by R. Belmont suggests there may also be other issues with porting MAME to Android.

I'm still not sure MAME's SDL backend could be used in any way.   Perhaps there's a modded Android system I could install on my pc that would give me a more open lynx environment.   It's just not possible to "build" anything from within my gtab.  But even if I could find an Android mod to compile in, what would I do with the binary? 

Another method that's always open is translating all the C++ code to Java, and writing all new sub routines to make up for tools found in mingw-w64.  Do we have any takers for this option?  Anyone?


My money is still on the Andorid NDK.  Until an answer is found (or someone builds a MAME for Android), I plan on exploring possibilities using of using older source code for MAME, or even the source from ports of MAME.  Something that compiles with a standard MinGW toolchain (if there is such a thing...).


Anyhow, thanks for reading and please spread the word!  Perhaps if someone who knows what their doing looks into this, we can get MAME on Android soon, rather than never!

Saturday 18 June 2011

It's a working MAME on Android...

... but it runs too slow to be playable on my gtab.

To try it on your Android device, you will need

- aDOSBox (available here)
- The DOS port of MAME found at Adroid@home(tm) (I used v0.63)
- CWSDPMI.EXE (I found one here in the csdpmi5b.zip package)
- patience

The rest is pretty easy.  Create a folder for dmame on  /sdcard and dump the contents of mame063b_dos.zip into it.  Copy CWSDPMI.EXE into the same folder.  Copy the game ROM(s) you want to test into the /roms sub folder.  I believe a MAME.CFG file is created after the first time dmame is run.  I edited mine to get rid of the scan lines.

Install and start up aDOSBox on your droid, and you will be presented with a C:> prompt.  Navigate (ex. cd dmame) to your dmame folder and start dmame with regular command line options.  I used:

dmame pacman -nosound

I disabled sound just to squeeze out whatever speed I could.  Sound might work with other DOS games, but I haven't tried it.

After you launch dmame be prepared to wait.  A good few minutes anyhow.  I thought the system was hung up, but after a bit I was presented with a menu for sound.  0 for none, and the game was launched!

It's far from perfect, but it's a promising start.  There are other problems as well, but I don't want to discourage you from trying it, so I won't mention them in this post.  Not sure what is happening with aDOSBox's development as Google killed their discussion group for some reason, and the homepage is in French.  Please post your experience in the comments section!

Here are some images I grabbed with Screenshot ER:



Wednesday 15 June 2011

More information

The "problems" I was having with Ctrl+Shift+O in Eclipse was not a problem at all.  There was nothing happening, because there was nothing to import.  This was the response given to my post at the Eclipse Community Forums when I asked for a sample to test the hotkeys shorcut:

> Thanks for your reply. Could you or someone provide some sample code I
> could paste into a new java project that would show me Ctrl+Shift+O in
> action?

List list = new ArrayList();

Ctrl+Shift+O should add these two lines near the top of the class:

import java.util.ArrayList;
import java.util.List;
 Sure enough.  It worked as advertised. Now I can continue with the Android SDK tutorials.

Also today, an encouraging email came in from Cesare Falco who runs the website SDLMAME for Ubuntu.

SDLMAME has evolved into the SDL backend now included in the main
MAME *source* archive (i.e. mamexxxxs.zip).

The packages on my site are *binaries* compiled against that SDL backend
and are Ubuntu-specific. Those named "source packages" on my site are
sets of archives in a specific format to enable build from source on
Ubuntu with the standard development tools.

In short: to try a build for Android, forget about my site. :p
Download the source .zip from the MAME site and have a peek at the
makefile: a lot of platform-specific options are now auto-detected.
I guess Android can be considered a flavour of Linux, so
make all
could work out of the box.

For further help, don't forget to check the SDLMAME forum:
http://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=8&page=1

Cheers,
Cesare.
I've previously compiled MAME on Debian through the terminal, but had to install missing libraries using apt-get.  I haven't had much luck getting apt-get to work in Android's terminal though.  Of course the last time I tried, my gtab wasn't rooted, so perhaps it's still possible.

The quest continues...

Tuesday 14 June 2011

A slow start

In my effort to bring MAME to Android, I must first learn how to use Eclipse.  So I'm going through the tutorials at the Adroid Developers website.  Unfortunately I've already hit a snag with one of the tips:

Tip: After you have pasted sample code into an Eclipse project, press Ctrl (or Cmd) + Shift + O to import the required packages.
But when I press those hotkeys I don't see anything happening in Eclipse and I'm not sure if that's normal or not.  So I posted the question at the Eclipse community forums and hopefully I'll get an answer soon so I can continue.   By reading other users comments on Eclipse, Ctrl+Shift+O seems to be a important feature.  I must be sure it's working as it should.

Speaking of forum posts, I've also made a post seeking help on compiling MAME on Android at the MAMEWorld Compiling Board.  As expected, no response yet, but at least that also means there isn't anyone so far that says it isn't possible.

Monday 13 June 2011

Let's do this!

Welcome!  This blog is to chronicle my efforts in bringing MAME (Multiple Arcade Machine Emulator) to the Android OS, and maybe encourage others to join the cause.

No MAME app for Android??

Currently, nothing I could find.  However, some limited alternatives have appeared.


What about TigerArcade(MAME)?

Whereas MAME emulates over a thousand gaming boards, TigerArcade only emulates CPS1,CPS2, and Neogeo game boards, and definitely nothing from the classic 80s era.  But kudos to the creator(s)!  3 boards is better than none.  It's also free, so give it a try.


What about Jrioni Arcade (or Jarcade)?

Though this app appears in the Market, when I try to purchase it, I get a server error.  The homepage blog has not been updated since 2009, so this project is (at the very least) on hiatus.  There also seems to have be the matter of having to convert roms to a certain set.  No idea why, but whatever works, right?  Other problems reported in the reviews.


What about Android Arcade Emulator?

Not currently available on the market.  At any rate, it didn't emulate many more game boards than TigerArcade(MAME), and maybe less.


Nothing else?

Well, there was another project called JAPE.  While not an Android app, it is written in Java, which is the programming language most apps for Android use.  If it supported any games, it may be worth compiling it for Android.  But after 5 years without an update, this project is probably abandoned.


So the only two options that are left to the wouldbe Android MAME players is to wait, or create the app themselves.  After some investigation, I'm confident that the major components needed to do the latter are available, and there is access to all the tools needed to create the rest.


So what needs to be done?

Mame is written in C++ mainly for Window/DOS based systems, but reportedly the current version of the source code has an SDL capability for compiling on non-windows based systems.  For instance, I've compiled an SDL version of MAME on my Debian notebook.  Android apps are written in java, but can have embedded native C code by using the Android NDK.

From SDL wiki:


Simple DirectMedia Layer for Android

Requirements:

Android SDK
http://developer.android.com/sdk/index.html

Android NDK r4 or later
http://developer.android.com/sdk/ndk/index.html

How the port works

- Android applications are Java-based, optionally with parts written in C
- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
the SDL library
- This means that your application C code must be placed inside an android
Java project, along with some C support code that communicates with Java
- This eventually produces a standard Android .apk package.

So the since main project needs to be written in Java, I think the first task is to create the menu skeleton of what will be the frontend / GUI to MAME.  I can worry about plugging in the C++ code later.  If it works, when MAME gets updated, the new code can be used to compile a new Android app version, without porting everything to Java each time.

To create the menu skeleton, I've installed Eclipse, the Android SDK, the Java Runtime Environment, plus all other addons and available packages (just be thorough).  This is my very first project however, so before I can start coding, I'm learning the system and currently going through the tutorials.  So far, I've created the obligatory "Hello World" program, with lots left to learn.  I'm optimistic though, and should have a basic menu soon.

Of course, if this is something you can do easily and want to help, please let me know!