don't click here

How to find Hidden Unused Graphics?

Discussion in 'Engineering & Reverse Engineering' started by Nick Gemini, Jun 21, 2018.

  1. Apologies if this has been posted before, But what's a good method in finding unused graphics in S1 S2, S3&K?
     
  2. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    Sometimes, the unused graphics are loaded anyway (like the Eggman monitor in Sonic 1, for example): in those cases, looking at the VRAM in a suitable emulator is enough, at least as a starting point.

    More generally, though, the unused graphics won't be loaded, and might not even be referenced anywhere (like the Marble Zone music in the 8-bit version of Sonic 1, even if it's music it's the best example I can pull). In those cases, looking at the data itself is the only way to find things. A disassembly can help and it's the definitive solution, though some programs can try to retrieve data from ROMs, as long as the data uses some popular format.

    There is much more to say but I'm typing from my phone, so, consider this a quick 101 :U

    Besides, I don't think there's anything left to find in the main Sonic games, they've been dissected for years. Then again, the aforementioned Marble Zone music is a relatively recent discovery, so who knows...
     
  3. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Well, music is one thing.

    I feel like by the point we reached the disassemblies, the idea of finding new compressed graphics or material in the VDP is fairly minute.

    Especially because many of the graphics compression formats have headers that are fairly easy to recognize, even by hexadecimal.


    @Nick Gemini -

    First off, welcome to the community. I'm not particularly active here any more, (though I recently set these forums to my home page again for the first time in about 8 years), but I used to be a Tech Member and have messed with disassemblies and, back in the day, in particular, graphics formats, as I was working on the compression format for Sonic Crackers. (It was, at the time, kind an obsession. :)/> )

    Second off, while nineko is right, and S1, S2/S2B, S3/SK/S3K have pretty much been covered right-side up, upside-down, forwards, backwards, and (most importantly) inside-out, I recall also working with someone (I can't remember who! I'm sorry to whomever it was!) on, at the same time as the Crackers thing, the decompression format for Spinball, which I believe is a variant of Kosinski, if I remember correctly.

    The best advice I can give you is to take a peek at graphics compression formats, firstly, and then see how the headers are constructed.
    Then try to search through some less commonly known games (Spinball, Crackers, *maybe* Chaotix?, et cetera.) to see if you can't identify anything others may simply have missed, or just not given the time and research.

    Given enough time and dedication, who knows? Honestly, I can't imagine people have poured through *everything*, though I could be proven wrong!

    Here are some links to the Wiki with information about popular Genesis compression formats:

    Here's the one you'll want to start with, it's used in most of the popular Genesis Sonic games (S1, S2, S3, SK, S3K, SCD, Crackers, Chaotix, and non-Sonic games like Golden Axe, Phantasy Star, and Moonwalker!)
    https://segaretro.org/Nemesis_compression

    And then here is the far-less common Kosinski compression format:
    https://segaretro.org/Kosinski_compression

    And a tool for Windows to help you work with them!
    [snip, and replace, thanks, MainMemory...]
    Hope this helps! ^_^

    Side note:
    Geez, all this is taking me back to like 10-15 years ago when I used to be a dude and I used to study these graphics compression formats. o.o
    It shocks me how long I've stayed around here for, sometimes. How I'm even still alive is a mystery/miracle. :P
     
  4. Thanks! :) I Forgot to mention though, What can be used to view the unused Graphics? (For Example, The Unused Death Animation of Robotnik from Sonic 1)
     
  5. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Again, sorry, dear, I don't want to give you outdated information, so I'm probably talking out of ancient knowledge (but I guess I'm talking) - I used to use a tool on Windows called Tile Layer Pro to view the data and even toy with palettes, et cetera.

    I personally only use Linux/MacOS/iOS/Android, so it's partly why I got out of a lot of that more technical ROM hacking stuff, as many of the tools are Windows-based and don't necessarily run well in WINE.

    I do keep, of course, just a little Windows XP VM on my MacBook Pro just so I've got the ability to use these tools as needed.

    What's your OS, if you don't mind me asking?
     
  6. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,192
    404
    63
    Japan
    Sometimes you can find hidden things just by looking through the current disassemblies, there are things undocumented or completely missed by the individuals who disassembled the ROM.

    I've come across some myself a few years back while rearranging and redocumenting the disassemblies, not sure if anyone's aware, but I don't recall anyone mentioning it... Sonic 1's Special Stage palettes. There are normally two (one for the birds, and one for the fish), however, there are three extra entries in the array of data for palettes, a purple set, a muted/pale green set, and a greyish blue:

    Code (Text):
    1. SSAB_PaletteFG:
    2.  
    3.     ; --- Fish ---
    4.  
    5. SSAB_Fish:  dc.w    $0EEA, $0EE0, $0AA0, $0880, $0660, $0440    ; fish palette
    6.  
    7.         dc.w    $0EE0, $0AA0, $0440             ; blue fading...
    8.         dc.w    $0AA0, $0AA0, $0AA0             ; ''
    9.         dc.w    $0860, $0860, $0860             ; ''
    10.         dc.w    $0640, $0640, $0640             ; ''
    11.         dc.w    $0400, $0400, $0400             ; ''
    12.  
    13.     ; --- Birds ---
    14.  
    15. SSAB_Bird:  dc.w    $0AEC, $06EA, $04C6, $02A4, $0082, $0060    ; bird palette
    16.  
    17.         dc.w    $06EA, $04C6, $0060             ; green fading...
    18.         dc.w    $04C6, $04C6, $04C6             ; ''
    19.         dc.w    $0484, $0484, $0484             ; ''
    20.         dc.w    $0442, $0442, $0442             ; ''
    21.         dc.w    $0400, $0400, $0400             ; ''
    22.  
    23.     ; --- Unknown/Unused (Purple) ---
    24.  
    25. SSAB_Unk01: dc.w    $0ECC, $0E8A, $0C68, $0A46, $0824, $0602    ; character palette
    26.  
    27.         dc.w    $0E8A, $0C68, $0602             ; checker fades...
    28.         dc.w    $0C68, $0C68, $0C68             ; ''
    29.         dc.w    $0846, $0846, $0846             ; ''
    30.         dc.w    $0624, $0624, $0624             ; ''
    31.         dc.w    $0400, $0400, $0400             ; ''
    32.  
    33.     ; --- Unknown/Unused (Muted/pale green) ---
    34.  
    35. SSAB_Unk02: dc.w    $0AEC, $08CA, $06A8, $0486, $0264, $0042    ; character palette
    36.  
    37.         dc.w    $08CA, $06A8, $0042             ; checker fades...
    38.         dc.w    $06A8, $06A8, $06A8             ; ''
    39.         dc.w    $0684, $0684, $0684             ; ''
    40.         dc.w    $0442, $0442, $0442             ; ''
    41.         dc.w    $0400, $0400, $0400             ; ''
    42.  
    43.     ; --- Unknown/Unused (Greyish blue) ---
    44.  
    45. SSAB_Unk03: dc.w    $0EEC, $0CCA, $0AA8, $0886, $0664, $0442    ; character palette
    46.  
    47.         dc.w    $0CCA, $0AA8, $0442             ; checker fades...
    48.         dc.w    $0AA8, $0AA8, $0AA8             ; ''
    49.         dc.w    $0864, $0864, $0864             ; ''
    50.         dc.w    $0642, $0642, $0642             ; ''
    51.         dc.w    $0400, $0400, $0400             ; ''
    52.         even
    There is also a cycle palette set for Marble Zone's lava, which went unused, and looks as though it would have fit the old lava design from the beta shots, but it matches the palette of lava colours, so they used the same lava colours in the end anyway:

    Code (Text):
    1.     ; Originally written to FB64 - FB6F.  6 colours, 6 frames
    2.  
    3. PalData_MZLava:
    4.         dc.w    $0EEE, $0008, $000E, $004E, $008E, $00EE    ; frame 0
    5.         dc.w    $00EE, $0EEE, $0008, $000E, $004E, $008E    ; frame 1
    6.         dc.w    $008E, $00EE, $0EEE, $0008, $000E, $004E    ; frame 2
    7.         dc.w    $004E, $008E, $00EE, $0EEE, $0008, $000E    ; frame 3
    8.         dc.w    $000E, $004E, $008E, $00EE, $0EEE, $0008    ; frame 4
    9.         dc.w    $0008, $000E, $004E, $008E, $00EE, $0EEE    ; frame 5
    There are a few goodies inside I can only assume no-one's found yet, but the point is, searching what is already (apparently) documented can sometimes yield results. Until a ROM's source and data has been fully 100% documented, it is still possible to find something previously unknown.

    So try the disassembly itself perhaps if you are running dry on finding anything.
     
  7. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    ^ See, there you go!

    Thanks for backing me up there with the technical evidence - I've got a foggy memory. :P

    So, yeah! You can do the thing! Disassemblies and compression formats are a great place to start. Keep at it!
     
  8. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    One thing I haven't seen mentioned yet is the use of a trace logger. Several emulators have this feature which can be used to log access to areas of a ROM, and track whether they were read from or had code executed from them. I believe they aided in the creation of the original split disassembles, because you need some way to know what's code and what's data. Basically you play the game and try to do everything possible, such that all code gets executed at some point. Once you're done, this can also help to identify data regions leftover in a ROM that are not used at all.

    Several emulators support trace logging, which the most recent / actively updated being BizHawk.
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    Please don't use this, it's using ancient, buggy compression/decompression code. You can use the FW-KENSC Shell Extension to integrate compression support directly into Windows Explorer, or you can install the KensSharp package, which comes with a shell extension, a command-line program, and a GUI frontend. KensSharp should also work on Linux and OS X if you have Mono installed, minus the shell extension of course.
     
  10. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Thanks. I'll remove and replace that tool from my original post as to not potentially mislead or confuse other users. :)/> Like I said, this is all *ancient* memory to me at this point, heh./>

    EDIT: Done, and I tossed you credit for the suggestion to boot. :)
     
  11. Black Squirrel

    Black Squirrel

    no reverse gear Wiki Sysop
    8,543
    2,465
    93
    Northumberland, UK
    steamboat wiki
    Sonic 2 probably hasn't been completely covered, in the sense that betas 4-through-8 probably haven't been looked into that thoroughly.

    It's not so much to find new things, but to confirm exactly which prototypes have the unused graphics, because it was never written down. Some have more remnants of Hidden Palace than others, for example.


    (p.s. if TCRF has this I don't care - it needs to be on our wiki too)


    And then there's all the prototypes of Sonic Blast and Spinball on the Game Gear, which nobody seems to care about. Lot of wonky Chaotix prototypes too - most of these surface level differences weren't documented until recently.



    Sonic Jam on the Saturn is the one that gets me - they fixed bugs and changed layouts to people's favourite Sonic games, and the 3D engine turned into Sonic Adventure. The community should be all over it.
     
  12. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,218
    965
    93
    Long-term happiness
    With regards to Jam, it might simply be how much of an arse Saturn is to emulate properly.