Author Topic: O2EM - Odyssey2 emulator (WIP)  (Read 58550 times)

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #20 on: October 13, 2014, 12:41:36 am »
1) the colors seem altered compared with the original hardware;

This seems to be due to me using 16bit graphics mode instead of the intended 8bit mode as 8bit is not supported by gcw, the colours are shifted towards the blue end of the spectrum.
« Last Edit: October 13, 2014, 12:47:01 am by David Knight »

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #21 on: October 13, 2014, 06:37:21 am »
This seems to be due to me using 16bit graphics mode instead of the intended 8bit mode as 8bit is not supported by gcw, the colours are shifted towards the blue end of the spectrum.

Indeed when you launch the emulator (Windows version) the OS displays a message which "says": new color profile set ...
« Last Edit: October 13, 2014, 08:31:08 am by Gab1975 »

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #22 on: October 13, 2014, 07:22:47 am »
The Odyssey 2 graphic interface should use a 16 colors palette (8 colors of two intensity)... I found the "hex-codes" of these colors, maybe they can be useful:

Character/Sprite Colors:
- Dark Grey (#5a6b6b)
- Red (#ff4252)
- Light Green (#39f77b)
- Orange (#dead5a)
- Light Blue (#6ba5ff)
- Violet (#ff9cff)
- Lighter Blue (#31ffff)
- White (#ffffff)

DARK BACK/GRID COLORS:
- Black (#000000)
- Dark Blue (#0839d6)
- Dark Green (#009c18)
- Blue (#00bdde)
- Dark Red (#c60008)
- Dark Violet (#ce10b5)
- Dark Orange (#9c8410)
- Light Grey (#e7dee7)

LIGHT BACK/GRID COLORS:
- Dark Grey (#5a6b6b)
- Light Blue (#6ba5ff)
- Light Green (#39f77b)
- Lighter Blue (#31ffff)
- Red (#ff4252)
- Violet (#ff9cff)
- Orange (#dead5a)
- White (#ffffff)

« Last Edit: October 13, 2014, 07:44:15 am by Gab1975 »

Xaijiqq

  • Posts: 450
Re: Port request/possibility: O2EM
« Reply #23 on: October 13, 2014, 10:45:04 am »
this is coming along nicely thanks!  all my fav games worked - the kc's, killer bees, pick axe pete, turtles :) hopefully the color issue can get resolved

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #24 on: October 15, 2014, 07:15:54 am »
Is it possible to add a splashscreen (like one below) before to enter in the Gmenu2X file browser? ... obviously it's not an important "task", however it can give a little contribute to enhance the release... ;)

Nebuleon

  • Guest
Re: Port request/possibility: O2EM
« Reply #25 on: October 15, 2014, 09:33:01 am »
Is it possible to add a splashscreen (like one below) before to enter in the Gmenu2X file browser? ... obviously it's not an important "task", however it can give a little contribute to enhance the release... ;)
I'd rather not have a splash screen that happens-before the selector, thank you very much. It's a waste of time, and splash screens are meant to show something during the loading time of an application. (see Visual Studio, Eclipse, Photoshop, older versions of Acrobat, etc.)

The gmenu2x file browser is still in gmenu2x, transferring control from itself to itself, so it'd be showing a splash screen for... loading the file list, lasting under 50 milliseconds?

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #26 on: October 15, 2014, 09:54:01 am »
Nebuleon got there first ;)

The behaviour prior to executing the rom is governed by Gmenu2x, not o2em.

My main concern is currently getting the colour palette right, 8bit colours are hard-coded so I'm have a hard time getting it to display correctly in 16bit.

There is a gp2x version of o2em with virtual keyboard, the author doesn't appear to have had the same issues with colour so it would be worth investigating the source code. There's also a wii port. Unfortunately none of the code appears to be available any more...

...however there is a fork of o2em called o2em2 which uses SDL instead of allegro which would solve the colour issues (SDL supports emulated 8bit in 32bit mode) so this looks promising.

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #27 on: October 15, 2014, 10:20:30 am »
There is a gp2x version of o2em with virtual keyboard, the author doesn't appear to have had the same issues with colour so it would be worth investigating the source code. There's also a wii port. Unfortunately none of the code appears to be available any more...

For the o2em_gp2x the sourcecode is inside the zip file...
http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,71,1840

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #28 on: October 15, 2014, 10:38:23 am »
Doh! How did I miss it? Anyway the vdc.c file is unaltered, the gp2x runs o2em in 8bit mode so no good to us. However the virtual keyboard emulation code is there.

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #29 on: October 15, 2014, 04:30:48 pm »
Doh! How did I miss it? Anyway the vdc.c file is unaltered, the gp2x runs o2em in 8bit mode so no good to us. However the virtual keyboard emulation code is there.

Did you try to use the 32 bit graphic mode instead of the 16 bit mode ? Maybe it can't solve the "issue", but it's interesting to see if something changes in the colors visualization !
« Last Edit: October 15, 2014, 04:32:30 pm by Gab1975 »

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #30 on: October 15, 2014, 09:52:32 pm »
Of course, that was my first thought. Unfortunately though colour representation was much worse, also pixel positioning seemed to be off as well.

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #31 on: October 15, 2014, 10:29:16 pm »
Unfortunately, as far as I know, the frame buffer driver doesn't support the 8 bit mode in no way... maybe some expert dingoonity user will be able to give an help to solve this "task" !

Nebuleon

  • Guest
Re: Port request/possibility: O2EM
« Reply #32 on: October 16, 2014, 03:40:35 am »
Unfortunately, as far as I know, the frame buffer driver doesn't support the 8 bit mode in no way... maybe some expert dingoonity user will be able to give an help to solve this "task" !
or let David Knight investigate o2em2 as in #26

pcercuei

  • Posts: 1728
    • My devblog
Re: Port request/possibility: O2EM
« Reply #33 on: October 16, 2014, 05:55:28 am »
Or just convert to 16/32bpp yourself.

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #34 on: October 16, 2014, 10:10:58 pm »
O2em2 is already compiled for gcw, I just haven't had a chance to test it yet.

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #35 on: October 17, 2014, 06:16:03 am »
O2em2 is already compiled for gcw, I just haven't had a chance to test it yet.

... so, in theory (fingers crossed ! ;) ), the colors' wrong assignment should be solved !

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #36 on: October 19, 2014, 08:14:10 pm »
I've had little time to dedicate to this recently, and not much time this week either :(

Colours are fixed, virtual keyboard is next to be implemented, expect a release later this week.

In case anyone's interested I've scrapped o2em in favour of o2em2. It's code is easier to understand, it uses SDL
(and allegro), bugs have been fixed and it is more likely to receive updates in future.
« Last Edit: October 19, 2014, 08:25:31 pm by David Knight »

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #37 on: October 24, 2014, 11:37:30 pm »
A little update on this fun project.

Colours are displaying correctly, graphical tearing is resolved and gameplay feels less jerky. However quite a bit of code hasn't been converted yet from allegro to sdl so I've spent the past few days porting functions.

I have still to reimplement voices and I have partially finished the virtual keyboard. I have completed the joystick selector so you can use the D pad and A normally, left shoulderpad switches between player 1 and 2.

Once I have completed the virtual keyboard I would appreciate any testers who are familiar with the original console giving feedback.

Btw I did play on this machine once as a child, I played turtles on it. I'd forgotten until I saw the graphics!

Gab1975 (OP)

  • Posts: 1165
Re: Port request/possibility: O2EM
« Reply #38 on: October 25, 2014, 06:41:18 am »
I'm glad to see that you make progress... so an official release should be out quite soon! ;)

David Knight

  • Posts: 577
Re: Port request/possibility: O2EM
« Reply #39 on: October 28, 2014, 11:40:49 pm »
Update:
Port to SDL going nicely now I've fixed a couple of memory leaks.

Colours - Fixed
Switch joystick and early state virtual keyboard are implemented

Controls now:
D-pad: movement
A: Fire/select character on virtual keyboard
Switch player - Left Shoulderpad
(hacky) Virtual Keyboard - Right Shoulderpad

Hold down right shoulderpad whilst using virtual keyboard, select the character with the "A" key and release right shoulderpad to go back.

e = enter
d = clear text (delete)

A few of the keys from the console are currently missing ("=", "YES", "NO", "RESET", "?"). I don't know how important they are as I haven't seen a need for them yet.

I still need to improve the keyboard but would appreciate anyone's feedback as to how best to do this.

I also would like to have a go at finishing porting voices although as this was an add-on and not part of the official console this only enhances a few roms. Currently voices are disabled.

btw, for those unfamiliar with the system (like me!), at the "SELECT GAME" screen you usually need to press "0" or "1" which you can now do with the virtual keyboard!

Latest beta (source code included):
https://drive.google.com/file/d/0BwYi4RGX-HSaOTVYS1VvSk92VU0/view?usp=sharing
New version out!

As before, a bios is required to run placed in the ~/.o2em/bios directory.
« Last Edit: November 01, 2014, 09:44:47 pm by David Knight »

 

Post a new topic