Remapping arcade games palette to ST/STE in realtime using MAME

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 634
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Remapping arcade games palette to ST/STE in realtime using MAME

Postby Anima » Sat Nov 19, 2016 6:27 pm

This can be quite interesting for game development on the Atari ST/STE. Please find attached an archive containing MAME GLSL shaders which are able to remap the arcade games colours to a given 16 colours palette of the Atari ST/STE.

Prerequisites
MAME and some arcade ROMs to check out the remapping. :wink:

Installation
Copy the folder GlslRemap of the attached archive to the MAME folder.

Usage

Code: Select all

mame -video opengl -gl_glsl -glsl_shader_mame0 GlslRemap/remap_16e_ST -glsl_shader_mame1 GlslRemap/CRT-geom-halation -afs -pause_brightness 1 -skip_gameinfo ghouls

This example starts the MAME arcade game "Ghouls'n'Ghosts" using the shader to remap the game colours to a special Atari ST palette of 16 colours including some mixed (checkered) colors. So in fact the total number of remapped "virtual" colours in this case is 38.

This is the Atari ST palette (16 true colours + 22 mixed colours) being mapped to:
Image

Use the shader named

Code: Select all

remap_16e_ST
to use the 16 true colours only.

Shaders named

Code: Select all

remap_16e_STE
and

Code: Select all

remap_16_STE
use a slightly different palette for the Atari STE.

You can create and use your own palette using this online tool by uploading an image containing all colours of your palette and copy and paste the created shader snippet into the given code. This is a bit awkward but probably you may find it useful for your needs.
You do not have the required permissions to view the files attached to this post.

User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2034
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby calimero » Sat Nov 19, 2016 10:38 pm

This is usefull for some new projects?
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 634
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby Anima » Sun Nov 20, 2016 8:43 am

calimero wrote:This is usefull for some new projects?

Yes. :cheers:

I hope I'll find a way to capture OpenGL screens from MAME. So far I only get black images at least from my MacBook. Probably I should make a HD video to show the results for those who wonder how it looks like.

User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2034
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby calimero » Sun Nov 20, 2016 9:49 am

Shift+Command+3 does not capture screen?
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 634
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby Anima » Sun Nov 20, 2016 1:53 pm

calimero wrote:Shift+Command+3 does not capture screen?

Unfortunately that doesn't work. I think this is due to the nature of the GLSL display level.

User avatar
dlfrsilver
Atari God
Atari God
Posts: 1390
Joined: Mon Jan 31, 2005 1:41 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby dlfrsilver » Sun Nov 20, 2016 3:30 pm

What are you exactly planning to do anima ?

I can maybe lend a hand here :)
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 634
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby Anima » Mon Nov 21, 2016 9:48 am

dlfrsilver wrote:What are you exactly planning to do anima ?

I can maybe lend a hand here :)

I am investigating the possibilities of... well it's a secret. :wink:
Anyway thanks for your offer and I'll probably come back to you when the next (and more important) part will be addressed.

User avatar
dlfrsilver
Atari God
Atari God
Posts: 1390
Joined: Mon Jan 31, 2005 1:41 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby dlfrsilver » Mon Nov 21, 2016 5:52 pm

I have lately pulled out Rygar Arcade machine tiles and sprites as a whole for an Amiga conversion.

This is an 8 bits game, use 4 palettes of 256 colors. The fix layer is using 256 colors, The sprites are spanned on 256 unique colors, the foreground 256 and the background 256 too.

the game will not be easy to repalette, even on the amiga. We have right now 2 versions, one in 32 colors + copper effects, and the other in 64 colors.

I'm quite curious about repaletting a game using 1024 colors in 16 only :)
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 634
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby Anima » Tue Nov 22, 2016 6:17 am

dlfrsilver wrote:I have lately pulled out Rygar Arcade machine tiles and sprites as a whole for an Amiga conversion.

So do you have a special program for that? MAME has a tile viewer but I think that's quite a tedious task.

dlfrsilver wrote:I'm quite curious about repaletting a game using 1024 colors in 16 only :)

Yes, there are at least two approaches: use an universal palette or optimize it for the game. I hope to show some (moving) images soon.

User avatar
dlfrsilver
Atari God
Atari God
Posts: 1390
Joined: Mon Jan 31, 2005 1:41 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby dlfrsilver » Tue Nov 22, 2016 10:49 pm

Anima wrote:
dlfrsilver wrote:I have lately pulled out Rygar Arcade machine tiles and sprites as a whole for an Amiga conversion.

So do you have a special program for that? MAME has a tile viewer but I think that's quite a tedious task.

dlfrsilver wrote:I'm quite curious about repaletting a game using 1024 colors in 16 only :)

Yes, there are at least two approaches: use an universal palette or optimize it for the game. I hope to show some (moving) images soon.


I use Mame_TS, which allows to extract the tilemap viewer as PNG files, and i use TILED for the tile arrangement. This is my solution for getting perfect palettes.
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !

User avatar
dlfrsilver
Atari God
Atari God
Posts: 1390
Joined: Mon Jan 31, 2005 1:41 am
Contact:

Re: Remapping arcade games palette to ST/STE in realtime using MAME

Postby dlfrsilver » Fri Dec 02, 2016 9:28 pm

Anima wrote:
dlfrsilver wrote:What are you exactly planning to do anima ?

I can maybe lend a hand here :)

I am investigating the possibilities of... well it's a secret. :wink:
Anyway thanks for your offer and I'll probably come back to you when the next (and more important) part will be addressed.


You want to convert on Atari STE Ghouls'n'Ghosts Arcade ? lol
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 3 guests