English Amiga Board


Go Back   English Amiga Board > Other Projects > project.CARE

 
 
Thread Tools
Old 26 December 2008, 03:40   #1
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
MAME + tile saving edition

I modified MAME v0.128 (debug version) to allow to save the tiles and palettes:

http://pagesperso-orange.fr/franck.charlet/mamed_ts.zip

In the palette view using 'S' key will create a directory (if necessary) with the current game name & save the current palette into it as a .pal file.

In the tiles view using 'S' key will create a directory (if necessary) with the current game name & save all the tiles with all the possible palettes.

I also added a 'windowzoom' option in mame.ini to allow to magnify the window when it's not maximized or in full screen mode, this can be used to obtain a bigger window without the distorted pixels.

Here is an example with tiles and sprites from the game Side Arms (converted to .png):

http://pagesperso-orange.fr/franck.charlet/sidearms.zip

As you can see, all different possibilities are saved side by side as .bmp format (files are optimized during saving but can become pretty big anyway, so beware), the layout (number of tiles/row) follows the one chosen by the user.

Notice that the files can be saved several times during a session without the older ones being overwritten (new ones will be created with different numbers), i implemented it that way because sometimes it's necessary due to changes in the palette (mostly between game levels).

What's left is to spot in games which tiles or sprites are used with what palette and to keep the right ones, it's not perfect but it makes ripping gfx from arcade games it a lot easier than before.

Last edited by hitchhikr; 26 December 2008 at 09:25.
hitchhikr is offline  
Old 26 December 2008, 15:06   #2
dlfrsilver
CaptainM68K-SPS France
 
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 46
Posts: 10,412
Send a message via MSN to dlfrsilver
absolutely great !!! thank you very much !!!!
dlfrsilver is offline  
Old 27 December 2008, 05:52   #3
dlfrsilver
CaptainM68K-SPS France
 
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 46
Posts: 10,412
Send a message via MSN to dlfrsilver
hi again, could it be possible for you to modify a bit this mame custom ?

In order to make a save PER palette change made ?

This would make editable tiles
dlfrsilver is offline  
Old 27 December 2008, 10:14   #4
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
What do you mean ?
hitchhikr is offline  
Old 27 December 2008, 15:30   #5
dlfrsilver
CaptainM68K-SPS France
 
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 46
Posts: 10,412
Send a message via MSN to dlfrsilver
the files are huge, because all series of sprites are put in the files with all palettes possibilities.......

I asked if you could make this mame version save each paletted series of sprites apart
instead of having them in the same file ?

it would make it easier to get the tiles
dlfrsilver is offline  
Old 27 December 2008, 17:53   #6
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Separate files are what i did at first but after some considerations i opted for that grouped solution as browsing through all the tiles scattered in multiple files to find the one with the right palette can really be a pain.

Note that if you're dealing with games that are bigger than 2 megabytes it may be very hard to correctly rip the tiles & sprites as there probably will be too many of them anyway.

I'll consider re-introducing the option, tho.
hitchhikr is offline  
Old 29 December 2008, 23:07   #7
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
'Left Shift'+'S' added to save tiles as several files. Also 'G' key support added to turn the gap between tiles on/off. See readme.txt for more infos.
hitchhikr is offline  
Old 02 January 2009, 01:06   #8
musashi9
Registered User
 
musashi9's Avatar
 
Join Date: Jul 2003
Location: Japan
Posts: 178
Send a message via ICQ to musashi9
Excellent new feature !
I must say keeping the Shift + S options was a good idea
(Pang gave me a 400mb Bitmap file without it ) :P


BTW I get an error when trying to save the tiles from Street Fighter II The World Warrior
I guess this is because the game is bigger than 2MB ?

------------------------------------------------
Exception at EIP=00B3AB77: ACCESS VIOLATION
While attempting to read memory at 07194000
------------------------------------------------
EAX=7191000 EBX=7194000 ECX=00000000 EDX=FFFF2244
ESI=7191000 EDI=00000000 EBP=0022EF88 ESP=0022EAA0

Last edited by musashi9; 02 January 2009 at 10:12.
musashi9 is offline  
Old 03 January 2009, 12:44   #9
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Nope, it's because there's a bug in MAME's tiles viewer itself if you try the left arrow when in palette 0 it will crash in some games. It occurs in the regular MAME too when the debugger is available (mamed).
hitchhikr is offline  
Old 03 January 2009, 14:25   #10
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
There, it should be fixed now (same url). I also added a couple of commands:

'LEFT CONTROL'+'S' to save the current page of tiles with all the possible palettes within a single big (sometimes huge) file.

'LEFT CONTROL'+'LEFT SHIFT'+'S' to save the current page of tiles with all the possible palettes scattered as many files as there are possible palettes.
hitchhikr is offline  
Old 03 January 2009, 18:27   #11
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Some interesting stuff you have there. Consider your webpage bookmarked.
Photon is offline  
Old 08 January 2009, 22:38   #12
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Adapted my modifications to mame v0.129, same url.
hitchhikr is offline  
Old 09 January 2009, 22:21   #13
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
Excellent stuff! Be careful: the bastards from Orange have a tendency to disable webpages when files are not referenced in the index.html start page (or recursively).
It happened to me, I thought I should warn you. Just put the link on your tool on your main page if not already done.
jotd is offline  
Old 11 April 2015, 18:29   #14
zambot3
Registered User
 
Join Date: Feb 2008
Location: Italy
Posts: 98
Don't works! The .pal file can't recognized!
zambot3 is offline  
Old 13 April 2020, 17:56   #15
Cerno_b
Registered User
 
Join Date: Apr 2020
Location: Germany
Posts: 2
I just signed to tell you that you rock for writing this mod!

This improves the ripping process tremendously. Do you think this is going to be part of MAMEs master branch? I think it is very useful.

I have a question:

From testing the tool it seems that whenever I save the palette, that's the one single palette currently active in the game's current frame. If I save the sprite sheet, then the tool creates all versions with all palettes. What I don't really understand is how I can find out which of the sprite sheets uses the current pallete, except for trial and error. Do you think it would be possible to encode the palette id in the palette filename? That way it would be possible to quickly find the appropriate style sheets. Or maybe I missed something and there is an easy way to know which stylesheet uses the current palette.

Another question:

The pal format of the written palette is not recognised by Aseprite. Is this a different format with the same name? Can you name a tool that is able to read this format?


Again, awesome work, thanks man!
Cerno_b is offline  
Old 22 April 2020, 16:31   #16
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Hi,

Quote:
This improves the ripping process tremendously. Do you think this is going to be part of MAMEs master branch? I think it is very useful.
I had a look but in newer mame they changed the way to visualize the tiles: they only decode the ones that are currently viewed.

Quote:
From testing the tool it seems that whenever I save the palette, that's the one single palette currently active in the game's current frame. If I save the sprite sheet, then the tool creates all versions with all palettes. What I don't really understand is how I can find out which of the sprite sheets uses the current pallete, except for trial and error. Do you think it would be possible to encode the palette id in the palette filename? That way it would be possible to quickly find the appropriate style sheets. Or maybe I missed something and there is an easy way to know which stylesheet uses the current palette.
I don't think that's possible.

Quote:
The pal format of the written palette is not recognised by Aseprite. Is this a different format with the same name? Can you name a tool that is able to read this format?
The palette was saved in raw binary format, i changed it so they are saved in paint shop pro format (can be imported in gimp and probably other software aswell).

http://franck.charlet.pagesperso-orange.fr/mamed_ts.7z
hitchhikr is offline  
Old 26 April 2020, 19:53   #17
Cerno_b
Registered User
 
Join Date: Apr 2020
Location: Germany
Posts: 2
Quote:
Originally Posted by hitchhikr View Post
I had a look but in newer mame they changed the way to visualize the tiles: they only decode the ones that are currently viewed.
Ah, that's too bad. I really like to have the big image, but as long as I have your version, I'm safe

Quote:
The palette was saved in raw binary format, i changed it so they are saved in paint shop pro format (can be imported in gimp and probably other software aswell).

http://franck.charlet.pagesperso-orange.fr/mamed_ts.7z
Alright, thanks. I was playing around with the format by myself and found out how to read the old palette format, but it's still very awesome that you made an update!

The reason I find your mod so helpful is that I am currently writing a tool that allows to create sprites from discrete 8x8 or 16x16 tiles based on the image your mod creates. This would theoretically allow to fairly quickly extract all the sprites including their animations without having to faff about with manual screengrabs or pixel-precise sprite cutouts. I dream of having a complete archive of all the old arcade game sprites, and since the lexicon is pretty patchy at the moment, I figured the only way to achieve this is by offering better tooling to the rippers.

One peculiarity about MAME games is giving me a headache though, and that is that each sprite seems to get assigned their own private palette from the set of available palettes which can easily range in the dozens. As you wrote, it does not seem to be possible to make the assignment from palette to sprite automatically, but I would at least like to give my tool a function that allows assigning each extracted sprite one of the available palettes manually.

I don't know if you see any merit in this but in order to do that, I would need two changes to your mod:

1) Save the sprite sheets as an indexed bmp instead of a RGB one. That way, I could just pick one of the sprite sheets and switch out the palette to get all the other sprite sheets. If possible, it would really help if the indices are compatible with all the palettes, e.g. a limited palette with only 4 colors will likely only save 4 pixel indices, whereas a larger palette would write more. So using the original sprite sheet indices would be very helpful here.
2) Instead of writing just the current palette, write all the palettes, which I would assume should be possible, since you already seem to apply all possible palettes when you write the sprite sheets currently.

Not sure you have the time for this or find this useful, though. Writing the sprite sheet as indexed would also reduce the file size to 1/3 according to a manual conversion I did as a test. So it may be a good improvement regardless of what I plan to do with the images.

If this plan failed, I could probably create what I need from the images your current mod produces, but if I wanted to release my tool if it gets finished, I wanted to make it as simple as possible for the users without having to run additional python scripts to set up everything. Ideally a user would be able to extract just a single sprite sheet image and a large bunch of palettes (instead of a lot of different images).

In any case, the current version of your mod is already a tremendous help for ripping sprites, especially once I get the palette thing to work. Thanks again for putting it out there.
Cerno_b is offline  
Old 17 September 2020, 00:14   #18
Scrollkidd
Registered User
 
Join Date: Sep 2020
Location: France
Posts: 2
Hey there,

I already sent a private message to hitchhikr about a trouble I am encountering on his Mame build (hoping an answer),
but I better share my experience on the thread too.

Here the issue: right after launching a ROM with this specific build my keyboard don't respond anymore.
I relaunched all my others Mame versions, and all works fine, keyboard is 100% Ok on 5 others versions I got.

However my joypad is working fine, it stills possible to reach the F4 key (tiles viewer) by assignating it to my joypad buttons via the Mame configuration menu,
but impossible to assign the needed keys inputs to save tiles ('S' or 'LEFT SHIFT'+'S').

So capturing assets is impossible to perform for me.
I run it on a Windows 7 64bits PC, but it's exactly the same issue on a PC running Windows 10.

Tried numerous other things but nothing worked:

- use differents PS/2 and USB keyboards
- change USB ports
- uninstall keyboard, then reinstall
- recreated a proper ini file with de cmd "mamed_ts -cc"
- changed ini entry "multikeyboard" with "0" and "1"
- Trying lower the desktop resolution to 800x600 (some Mame users fixed that problem like it, yeah sounds crazy)

If anyone have a clue of what going on, you're welcome =)

Cheers!

Last edited by Scrollkidd; 22 September 2020 at 21:31.
Scrollkidd is offline  
Old 13 October 2020, 23:07   #19
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Hi,

Never encountered such bug.

Here is the source code, if you can find why it bugs on your system, feel free to share your discoveries.

http://franck.charlet.pagesperso-ora...amed_ts_src.7z

Last edited by hitchhikr; 13 October 2020 at 23:14.
hitchhikr is offline  
Old 14 October 2020, 14:11   #20
Scrollkidd
Registered User
 
Join Date: Sep 2020
Location: France
Posts: 2
Quote:
Originally Posted by hitchhikr View Post
Hi,

Never encountered such bug.

Here is the source code, if you can find why it bugs on your system, feel free to share your discoveries.

http://franck.charlet.pagesperso-ora...amed_ts_src.7z

I will let you know and give a feedback here if we can fix the problem we are encountering.

Thank you so much for the sharing

Last edited by Scrollkidd; 14 October 2020 at 14:33.
Scrollkidd is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga 500 Limited Edition (Stefanie special edition) alkis21 Nostalgia & memories 60 08 December 2018 22:31
Tile map sample Blip Coders. General 1 18 July 2007 13:53
Tile Map Editor stainy request.Apps 4 04 April 2007 01:09
Harlequin Special Edition and Limited Edition Galaxy HOL contributions 1 20 December 2005 10:02
ALIEN BREED (Special Edition) - SAVING/LOADING GAMES alienbreedrules Retrogaming General Discussion 6 19 November 2005 21:52

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09391 seconds with 14 queries