don't click here

Random Hack/Mini Project Thread

Discussion in 'Engineering & Reverse Engineering' started by Malevolence, Jul 4, 2009.

  1. Briraka


    Bloody Robot
    So, after about a month of copypasting from the how-to section, here's a relatively finished build of my beginner hack, Sonic 20.

    The goal of this was to make a better Sonic 1 experience (but mostly for me :P ). Here's a list of things in this hack:

    Special Stage physics fixed (thanks to Mercury)
    Walk-jump bug fixed
    Speed cap removed
    Functioning Eggman monitors
    Removal of cheap badnik placement
    Graphical updates (Sonic's shoes aren't dirty anymore, his quills don't look like a mohawk)
    Pallet changes
    Marble Act 3 is now "more interesting"

    All I have to do is fix the level select. Criticism is welcome, because I would like to know what kind of things you guys would like in a new Sonic 1. Enjoy!
  2. PsychoSk8r


    PsychedelAnt | Tone Turner Oldbie
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    Sounds like what I had planned for Sonic: Modernisation Project before giving up on it. =P
    I'll give this a try a little bit later, let you know what I think.
  3. Ravenfreak


    I dunno what I should put here. Tech Member
    O'Fallon Mo
    Hacking Sonic Drift, Writer at Sonic Cage Dome
    Well, I guess I'll post my mini-hack that I posted on my Facebook. :v: It's a hack of Sonic Chaos in which the right button is automatically set to a held state. Though you can't play as Tails unless you have a Savestate. Here's the link: And a Fusion savestate to play as Tails: And of course if you don't use Fusion, you can just make a Gens savestate and use that. xP
  4. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    I am having so much fun playing these. Lots of untapped musical inspiration is hidden in things like this. I am taking notes.
    Listening to the effect this has on sound effects, I suddenly think back to dozens of other Genesis games and wonder if lots of shitty sounds could be improved this way lol.
    I wonder if the composer accidentally reversed the frequencies in the Itchy and Scratchy Beta music lmfao.
  5. Lapper


    Lappering Tech Member
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    I like Marble zone's music the best, it's whole mood has been reversed.
  6. muteKi


    Fuck it Member
    I find Oil Ocean's change fascinating. I love how EHZ2 sounds vaguely like what I'd think of as the "Teruhiko Nakagawa mix". Still upbeat, similar feeling, but everything is, of course, inverted. :P
  7. Ravenfreak


    I dunno what I should put here. Tech Member
    O'Fallon Mo
    Hacking Sonic Drift, Writer at Sonic Cage Dome
    RF here again with yet another mini-hack. :v: + - I think I post in here too much. xP   And yes, it's Sonic Chaos, this time I edited the ring values and lives. Here's the link:
  8. Max Firestorm

    Max Firestorm

    Pyrodramatic Member
    Well, it makes getting to the special stages easier :v:
  9. GT Koopa

    GT Koopa

    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Tried it and beat it, though it was hard. Didn't get all emeralds though.
  10. FraGag


    Tech Member
    Back in September (according to the timestamps on my files), I started working on a little hack in which I'd attempt to put the whole game upside down. It has practically complete for a while, but I had noticed that some tiles were being redrawn too late when Sonic was going too fast (most noticeably on the water slide in LZ3). I gave up on it, and looked back at it today. I experimented a little more but I couldn't find a way to fix that problem, so I'm just going to attribute this to lag (flipping all the tiles on the screen is slow!) and release the hack as is.

    Sonic the Hedgehog: Upside Down

    I can play through the levels just fine, probably because it feels a lot like gameplay with reversed gravity in S3K, but the special stages are totally confusing me.

    And here's a bonus: a prototype version in which only the sprites are upside down! It can be quite a challenge, because the level scrolls in one direction while the sprites move in the opposite direction, and because the level may hide some sprites depending on your position.
  11. Selbi


    The Euphonic Mess Member
    Northern Germany
    Sonic ERaZor
    Those special stages.... You're right, the levels itself are easy as usual, since you are basically still pressing the same buttons. Besides that, I wouldn't lie if I say I know GHZ1 by hard. =P

    Awesome POC! I once tried to make this myself, but I gave up after I found a way to flip the sprites. No idea how to flip everything else (I thought about something like "draw the screen backwards", no idea how to do that though).
  12. Hanoch


    Also known as TheKnock, Birashot Member
    Someone should make a Sonic 1 Wall edition: Everything is flipped in 90 degrees.
  13. Animemaster


    Prison bitch! Member
    Sonic 1 Revelation
    Holy.... thats definatly a mind masher. Very interesting indeed.
  14. Cinossu


    London, UK
    Sonic the Hedgehog Extended Edition
    Good god, those Special Stages.. the rest is easy enough to adjust to, but jesus XD; Also, how hard was it to do that/how much did you need to alter? Would it be possible to have both rightside-up and upside-down available via a bit in RAM or something without problems?
  15. FraGag


    Tech Member
    There were quite a few things that needed to be changed. In my disassembly, I used constants (FlipSprites and FlipLayers) to be able to revert to the original game in case something went horribly wrong. I could easily replace this with checking a bit in RAM, but to keep the game fast enough I might have to duplicate some code. I tried running the latest TAS of Sonic 1 and it desynchronizes at the beginning of GHZ2 because there's more lag.

    Flipping sprites is easy enough: the game engine already supports this with a flag, so what I did is simply swap a few branches. I also needed to add some code to reposition the sprites (basically, y=224-y). Then, I discovered that the special stages render the stage layout (which is made of sprites) separately from the normal objects, so I had to edit that code to flip their sprites and reposition them (at some point in development, I got them to be all at on a line in the middle of the screen :P).

    Flipping layers was quite harder and gave me a few headaches, mostly because the code that renders levels is not too well documented. Basically, I had to edit Calc_VRAM_Pos to make it return the location at the other end of the visible screen (because the plane is 256 pixels high in levels, I had to add 224 to the inverted position). Then, I had to edit DrawTiles to flip the blocks and the tiles (which is also something the game already supports). Then, I had to edit the deformation code (and if you didn't notice, this is based on REV01!) to match the new location of the art (basically, start at line 223 and go up instead of 0 and down). I also had to handle the water, since now the water is at the top of the screen! I did y=220-y instead of y=224-y here because I noticed in Regen that the palette doesn't change all at once, so I accounted for that.

    The special stage was a challenge to flip in itself, and I wrote a Gens/GS plug-in to show the raw planes in a window because I just couldn't understand what was going on anymore. Turns out that most of VRAM is used for planes, but only 2 of them are shown at a time. Since those planes take so much space, there are patterns in the invisible portions of those planes, so I had to move those at the top of the planes instead of at the bottom. The planes in the special stage are flipped with respect to the plane size (256 for the fish, birds and clouds, or 512 for the bubbles), not the screen size (224), because the deformation code was writing data for 256 lines and it was easier to just make it start at the bottom of the plane instead. After doing this I realized that I could have done the same for the main levels, but it didn't bring any advantage (in particular, it didn't solve the drawing problem in LZ3) so I just keep things as they were.

    There were also the tilemaps (e.g. the SEGA Screen, the emblem on the title screen and the special stage background) to flip.

    I also found and fixed a bug with PLCs; the bug that crashes the original game when you roll and look down after hitting the signpost in LZ1/LZ2. I had to fix it because the crash was occurring all the time when I was approaching the signpost in LZ1, unless I jumped. The bug is in RunPLC:
    Code (ASM):
    2. loc_160E:
    3.         andi.w  #$7FFF,d2
    4.     if FlipLayers=0
    5.         move.w  d2,(f_plc_execute).w
    6.     endif
    7.         bsr.w   NemDec4
    8.     if FlipLayers
    9.         move.w  d2,(f_plc_execute).w
    10.     endif
    The problem was that f_plc_execute was set before decompression started, so it was possible for the PLCs to start running (through VBlank) while decompression was still running. This caused problems later in sub_165E (which is called in VBlank), because v_ptrnemcode, which is moved to a3, was still 0, so when NemDec3 tried to jump to that address, it crashed the game.

    Good luck dealing with the different aspect ratio. :P
  16. nineko


    I am the Holy Cat Tech Member
    I think this bugfix should be documented somewhere (on the wiki?) because to my knowledge you're the first and only one who could successfully fix it.

    I've yet to play your hack, but I will make sure to do so later today, as it sounds fun from what I read here.
  17. FraGag


    Tech Member
    Done: SCHG How-to:Fix a race condition with Pattern Load Cues. The bug is also present in Sonic 2, but I don't know if there is a specific situation that actually makes it occur.

    By the way, I reorganized SCHG How-to:Guide to group the guides for Sonic 1 and Sonic 2 in categories. A new hacker will probably want to follow the Fixing bugs guides before adding new features.
  18. kazade


    A 2D Physics Engine
    OK, for some reason... I'm better at this version than the normal one...
  19. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    Oh noes.
    Sonic Upside Down + Sonic Return to Origin =
  20. Ravenfreak


    I dunno what I should put here. Tech Member
    O'Fallon Mo
    Hacking Sonic Drift, Writer at Sonic Cage Dome
    So I know someone in the past made Sonic 2 8-bit easy by adding rings in every 3rd act. But I made it even easier. xD Basically I hacked it to where Sonic can jump multiple times, without ever touching the ground. (Unless you want him to.) The only known bug is if you multi-jump over the lava pit just before the boss, the boss object won't load properly. :v: I might make a GG version too in the future, but for now just a SMS version. Here's the link, and have fun! xD