News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Generic Utility For Finding Sprites By Byte?  (Read 632 times)

oblivioncth

  • Newbie
  • *
  • Posts: 3
    • View Profile
Generic Utility For Finding Sprites By Byte?
« on: October 10, 2019, 08:58:13 pm »
Can any one with experience let me know of any programs they are aware of that allow for something similar to the following?

A program where you can open any file and have it interpret the raw data as pixels with options that let you toggle between different known aspects of storing color/pixel information, such as byte count (color depth), endianess, RGB values stored as bits within a byte, compression methods, etc. that then displays this as a large contiguous image the same way a hex-editor would display each byte (ideally with adjustable pixel count width before a wrap occurs). Ultimately this would assist with trying to locate sprites in older games that don't have an obvious file system directly from a ROM image, individual files (for things like DOS games) or memory dumps.

So far I've found one tool that seems somewhat like what I'm looking for on this very site: https://www.romhacking.net/utilities/646/

but I wanted to know if anyone was aware of any others. I could, and will, search around google/the utility listing here but it is hard to use search terms that get hits while looking for this exact form of functionality. I only managed to find a link to that one tool because of someone linking to it on another forum I found while searching for something else. Additionally, since a lot of these tools use very specific names that I couldn't possibly know to search for, I figured I'd reach out to community of diversely experienced individuals to see what they've used.

I'm contemplating rewriting an old 2D windows 95/98 game from scratch but it would take a done of additional time on top of recreating the engine experimentally to rip all character/enemy sprites/animations from the game, as well as background (some use parallax) by recording footage and cutting each piece out one frame at a time. Such a method would also be more prone to mistakes being made.

Unfortunately though, this game is a port of a Genesis/32X game that was done using some kind of porting engine that stores most of the data in a few files with little clarity on what is stored where. So, I figured that such a tool would be the best way to try and find where/how at least some of the sprites are stored before moving on to much more time consuming and potentially fruitless methods.

I may write such a utility myself if none that exist are sufficient.

Thanks for your time.

nesrocks

  • Hero Member
  • *****
  • Posts: 638
    • View Profile
    • nesrocks.com
Re: Generic Utility For Finding Sprites By Byte?
« Reply #1 on: October 11, 2019, 08:48:36 am »
yy-chr

FAST6191

  • Hero Member
  • *****
  • Posts: 2665
    • View Profile
Re: Generic Utility For Finding Sprites By Byte?
« Reply #2 on: October 11, 2019, 10:33:52 am »
Many of the editors I have used will have either the option to set the start byte to an arbitrary number or be set to a bounding limit but shuffle it backwards or forwards with a little slider or something to effectively do the same.

In my case crystaltile2 and tiled2002 were editors here. They tend to focus more on console specific formats but most of the ones commonly seen should be covered as far as RGB/BGR/... ordering and bits per pixel (though alpha could be more tricky), and in the case of crystaltile2 also has some nice options like skip bytes in case each tile has a header or something fun.

oblivioncth

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Generic Utility For Finding Sprites By Byte?
« Reply #3 on: October 12, 2019, 05:36:27 pm »
Thanks to both of you. I'll try each of them out. TiledGGD doesn't seem to have an option for skipping bytes/pixles after each tile/section and this game does seem to have data between each so that feature should be quite helpful.

Colmines92

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Generic Utility For Finding Sprites By Byte?
« Reply #4 on: October 17, 2019, 02:59:59 pm »
I have written an utility for it, its name is EasySpriteExtractor, just let me see how can I upload it because I'm new on romhacking.net and I don't know how to upload it.
Here is a screenshot
https://www83.zippyshare.com/v/buNh10jQ/file.html

And for now you can download it at:
https://www83.zippyshare.com/v/dEpzIMdN/file.html


I leave you with the description of the software. I know it is not at all what you are looking for, but please tell me if this was useful for what you're trying to do.

Easy Sprite Editor (ese)
Is a simple tool with which as its name indicates,
sprites can be extracted from screenshots without
need to remove the background via emulator or other image edition
software. It is very useful when removing the background to
through the emulator the background color is the same as the color
of the sprite edges, which makes the extraction task very difficult.

It can be used through command lines (recommended).
To get more information about the commands, use /?

An example of how to use "ese" through command lines to extract the
sprites of multiple screenshots would be as follows:

ese.exe /ib "D:\Screenshots\SoM_BACK.png" /is "D:\Screenshots\SoM*.png" /x 108 /y 80 /w 24 /h 32 /e "D:\Export\export.png" /nogui

By using the / is (import sprite) command you can enter as many file names as you want, wildcards allowed (*).
If wildcards are used or more than one file is entered, using the /e (Export) command will add the file index between
the name and extension of each file successfully exported.

How it works?
It compares pixel by pixel on a specified area and outputs only unmatched pixels.
« Last Edit: October 17, 2019, 04:10:14 pm by Colmines92 »

oblivioncth

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Generic Utility For Finding Sprites By Byte?
« Reply #5 on: October 21, 2019, 03:41:48 pm »
-Snip-

Not the kind of tool I was talking about, but potentially useful nonetheless.