News: 11 March 2016 - Forum Rules

Author Topic: Files in Genesis rom  (Read 3420 times)

ThegreatBen

  • Hero Member
  • *****
  • Posts: 811
    • View Profile
Files in Genesis rom
« on: August 29, 2015, 09:41:42 am »
What kind of program would I need to download in order to view and extract all the files in a genesis rom? Most specifically compressed graphics. I use Crystaltile 2 for DS and it works great but sadly it only works for DS.

FAST6191

  • Hero Member
  • *****
  • Posts: 3342
    • View Profile
Re: Files in Genesis rom
« Reply #1 on: August 29, 2015, 10:36:45 am »
You don't. The DS is pretty unique for a cartridge based system in using a file system (the GBA before it did not, at least outside of homebrew). Older systems will tend to bundle the files/sections together.
There are various tricks you can do to find things on various non filesystem based systems; things like the GBA binary finding technique, fingerprinting (again on the GBA there is the sappy sound format that can be detected and some of the really advanced game specific stuff will go a step further still for all sorts of formats) and right through to tracing, backwards searching (take the palette from memory and search the ROM for it), not to mention good old relative search and just pressing page down a lot in a tile editor. At no point though will you be able to explode it into various files and put it back together later.

Theoretically one of the older systems could have had a file system made for a game, it would not really pose much in the way of a technical challenge, but I am struggling to think of a single non homebrew example for any system that did not have one by default.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7253
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Files in Genesis rom
« Reply #2 on: August 30, 2015, 01:09:29 am »
Don't expect a filesystem on any pre-32-bit cart-based console games.

Usually games were written in pure assembly code with file data inserted as pure binary data.
"My watch says 30 chickens" Google, 2018

ThegreatBen

  • Hero Member
  • *****
  • Posts: 811
    • View Profile
Re: Files in Genesis rom
« Reply #3 on: August 30, 2015, 12:34:43 pm »
Damn that makes things alot harder, but the starting line of the compressed graphics I want is known so how can I extract them for editing?

FAST6191

  • Hero Member
  • *****
  • Posts: 3342
    • View Profile
Re: Files in Genesis rom
« Reply #4 on: August 30, 2015, 01:08:49 pm »
If it is a known location then 90% of the time the compression type will also be known. Hopefully there is also a decoder and encoder for the compression somewhere in http://www.romhacking.net/utilities/ , the megadrive/genesis, and general 16 bit and older systems for that matter, did not have a set type of compression like the GBA and DS BIOS compressions so it might well be a bit custom.

From there it will depend upon your compression tool -- some will be able to be pointed at an offset within a ROM, others will want you to slice that section out of the ROM to feed it to it. Inserting it again can be tricky if the new compressed file is larger than the original and the next section starts right after it. Fortunately the megadrive did not see as much in the way of mappers/memory banks/pages and for most games then basically the whole ROM is visible in memory. To that end you can probably get away with shoving it at the end of the ROM and repointing if it is something relatively small.

tryphon

  • Hero Member
  • *****
  • Posts: 736
    • View Profile
Re: Files in Genesis rom
« Reply #5 on: August 30, 2015, 05:28:44 pm »
What would be as useful as the data location is the compression scheme used.

You should have a look to the Sega Data Compressor here, which handles 4 of the more often used compression algorithms. From my experience, Nemesis is used in maybe 80% of MD games with compressed graphisms.

There are other compressors for some specific games.

If you don't find happiness, you'll have to learn asm and a debugger to locate and understand the decompression routine.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7253
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Files in Genesis rom
« Reply #6 on: August 31, 2015, 02:18:04 am »
From what I've read while there were few Genesis mappers, it sounds like it was pretty common for games with SRAM to map the ROM to the first 2MB (0-1FFFFF) and then SRAM to the second 2MB (200000-3FFFFF. Though saves didn't need that much space, I'd assume it was simpler for the PCB design).
Though games greater than 2MB with SRAM would need some sort of mapper, I suppose (I can only think of PS4 and Beyond Oasis fitting that combination). Though I think there were only a handful of >2MB Genesis cart games as it was.
"My watch says 30 chickens" Google, 2018

goldenband

  • Sr. Member
  • ****
  • Posts: 378
    • View Profile
Re: Files in Genesis rom
« Reply #7 on: August 31, 2015, 09:09:52 pm »
Though I think there were only a handful of >2MB Genesis cart games as it was.

There are ~50-55, not counting protos, pirates, or compilation carts. (My count might be low, I don't have every single one of the sports games in my folder.)

You're right, though -- the only RPGs I spot are Beyond Oasis and PSIV, and at least at a glance, all the other games that save are sports.

ThegreatBen

  • Hero Member
  • *****
  • Posts: 811
    • View Profile
Re: Files in Genesis rom
« Reply #8 on: September 01, 2015, 08:45:42 pm »
Thanks for all the replies, though it does mean that this out of my skill range.