Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - MEKA on the OpenPandora

Reply to topic
Author Message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
MEKA on the OpenPandora
Post Posted: Thu Jan 03, 2013 9:08 pm
Hi,

I have ported MEKA v0.73 to the OpenPandora.
The OpenPandora is Handheld device, moved by a ARM processor (Cortex-A8, 600Mhz by default, now on 1GHz, with a screen resolution of 800x480), running Linux.

To port the 0.73, only few modification where needed (remove 2 blitter, Eagle and HQ2x, that where assembler only), and some tweaking to the make file to adadpt to the compile env (I compile on the Pandora itself).

The build runs well, speed is good, and works well (I can't post link to the official OpenPandora boards, uses google if you are interested)

Problem is when I tried the v0.80. This one compile with no problems, expect, it use Allegro 5. And Allegro 5 need OpenGL. And OpenGL is not available on most Handheld / ARM device. Only GLES is available. So I tried Allegro 5.1, which is supposed to have GLES support. But then, MEKA won't start. It cannot load the first ressource (some .tga in the data folder).
Does anybody had some succes with Meka on GLES ?
preview4.png (70.81 KB)
Screenshot taken from the OpenPandora
preview4.png

  View user's profile Send private message
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Fri Jan 04, 2013 6:05 am
I have the same issues with allegro and my raspberryPi.

MEKA does not work with allegro 5.1 (yet).
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Fri Jan 04, 2013 9:44 am
Ok, thanks for the info.

I'll look at the tga loading onthe new Allegro 5.1, just to see if something has been changed...
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Fri Jan 04, 2013 1:06 pm
And another question: does somebody have compiled and run Meka 0.80 with Allegro 5.1 (not Allegro 5.0) on a Linux x86 ?

This is to know if the problem is more in Allegro 5.1 or just the GLES part.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Fri Jan 04, 2013 2:57 pm
I haven't looked into Allegro 5.1 yet but I guess I could try updating to it..
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Fri Jan 04, 2013 7:15 pm
Hum, just tested on Linux x86 machine, and it does works. It looks like it's a problem with Allegro 5.1, not GLES (yet).
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Fri Jan 04, 2013 7:56 pm
In fact, Allegro 5.1 doens't like the loading of Bitmap with the flag ALLEGRO_VIDEO_BITMAP.
I used ALLEGRO_CONVERT_BITMAP and it goes further... but it then Segfault after loading icon_trans_jp_us.tga

And same result with ALLEGRO_MEMORY_BITMAP

will continue to dig..
  View user's profile Send private message
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Fri Jan 04, 2013 8:35 pm
On linux x86 MEKA works fine with 5.0 but not with 5.1 it seems they changed something that is not fully backwards compatible.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Fri Jan 04, 2013 9:01 pm
I am doing test on linux x86 for now (it compile waaaayyyy faster then my little Pandora).

I confirm that, changing all ALLEGRO_VIDEO_BITMAP to ALLEGRO_CONVERT_BITMAP makes meka go a step further... Now, I have a Assertion triggered by allegro :

/opengl/ogl_lock.c:54: ogl_pixel_alignment: Assertion `0' failed.
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Sat Jan 05, 2013 7:41 am
I have it runing now, with Allegro 5.1 !!!
I think the problem is Allegro 5.1 has no real default driver, so all loading/init done before the al_create_display are hum ... not good
So, what I have done is:

1./ Change all ALLEGRO_VIDEO_BITMAP to ALLEGRO_CONVERT_BITMAP (in blit.c, g_box.c, g_init.c and video.c).

2./ init video.c, I added a global variable:
int video_started = 0;

then in static int Video_ChangeMode( ... )
after the success of al_create_display(w, h)
I added a
video_started = 1;

and finally, in void Screenbuffer_AquireLock(void)
I added at the begginig
if (!video_started) return;

dirthy but work, at least on linux... Will try that on the Pandora now.
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Sat Jan 05, 2013 8:05 am
Forgot on ALLEGRO_VIDEO_BITMAP in data.c

It works on the Pandora now !

But it is wayyy tooo slow. I have to see if it's really using GLES now (or still MesaGL).
  View user's profile Send private message
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Sat Jan 05, 2013 12:54 pm
i'll try these changes and see if i can get it running on the raspberry pi with these modifications.
  View user's profile Send private message Visit poster's website
  • Joined: 04 Nov 2011
  • Posts: 95
  • Location: Scotland
Reply with quote
Post Posted: Sat Jan 05, 2013 1:43 pm
Does that mean that, in theory at least, Meka could run on the Caanoo as well?

There's a port of DrSMS on the Caanoo but it's not 100% and the dev who built it isn't interested in doing any more work on it as it runs all the games he/she plays.
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Sat Jan 05, 2013 1:49 pm
Probably yes. But I don't have a Cannoo, so I can't tell.
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Sat Jan 05, 2013 4:41 pm
Hum, I was rendering with software MesaGL, that why it was slow... Recompiling with GLES only...
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Tue Jan 08, 2013 9:32 pm
markvt wrote
i'll try these changes and see if i can get it running on the raspberry pi with these modifications.


so, did it worked?
On my side, I'm still fighting with Allegro5 to have GLES on the Pandora. I think I will copy the RaspeberyPI port of it to have something running.
  View user's profile Send private message
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Wed Jan 09, 2013 7:11 pm
Didn't have time to try it yet, maybe you can send me the changed meka files so i can try it faster ;)
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Wed Jan 09, 2013 11:10 pm
Sure.

Here are the files:
video.c (15.21 KB)
allegro5.1 compatible
blit.c (12.29 KB)
allegro5.1 compatible
g_box.c (13.79 KB)
allegro5.1 compatible
g_init.c (4.61 KB)
allegro5.1 compatible
data.c (9.62 KB)
allegro5.1 compatible

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Thu Jan 10, 2013 10:45 am
ptitSeb wrote
Sure.

Here are the files:

Can you clarify which SVN revision you based them on? It's better to post patches. I'm happy to look at changes and integrate them.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Thu Jan 10, 2013 8:42 pm
This is based on rev 405 of the svn.
  View user's profile Send private message
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Thu Jan 17, 2013 8:20 pm
This code fixes allegro 5.1 issues on my ubuntu linux - did not try it on the raspberry Pi yet as i need to compile allegro there and that takes ages ;)
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Fri Jan 18, 2013 7:43 am
Ah, that's nice.

Also, I'm curious: does Allegro 5.1 compile and run fine (I mean Hardware accelerated) on the Pi? I'll try to use Pi code to get hardware acceleration on Allegro on the Pandora.
  View user's profile Send private message
  • Joined: 03 Jan 2013
  • Posts: 15
Reply with quote
Post Posted: Sat Feb 16, 2013 1:54 pm
Some news for those interested.

I finally got Allegro 5.1 running on GLES on the OpenPandora. I (badly and dirthly) hacked the RPi support...

So, now I can compile the latest meka on the Pandora. But it doesn't work yet. First, I had to remove the Loading of the MouseCursor (I must have break something on the Allegro side, nothing important, I can still see a mouse)
Now, meka launch, but I have a black screen (with a mouse). The GUI is not showing up.
But if I press ESC, the fullscreen display works ! I can play games using command line loading and ESC (it's smooth, but speed control doesn't looks fine, I can hear the speed is too fast sometimes).
So more work to have a meka 0.80 running on the Pandora
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Sat Feb 16, 2013 6:19 pm
Excellent news! Let me know if you have any patch to provide. I'd have to look at Allegro 5.1 myself at some point.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!