Random Hack/Mini Project Thread

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

  1. Briraka

    Briraka

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

    <a href="http://www.sendspace.com/file/h7cn60" target="_blank">http://www.sendspace.com/file/h7cn60</a>

    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

    PsychoSk8r

    HighKnights Oldbie
    2,580
    0
    0
    Walsall, 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

    Ravenfreak

    Sucks at sprite art Tech Member
    2,835
    25
    28
    O'Fallon Mo
    Hacking Sonic Drift
    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: <a href="http://www.mediafire.com/?gwnb2k8q5h47mv4" target="_blank">http://www.mediafire.com/?gwnb2k8q5h47mv4</a> And a Fusion savestate to play as Tails: <a href="http://www.mediafire.com/?2fozq25sefdn071" target="_blank">http://www.mediafire.com/?2fozq25sefdn071</a> 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
    1,286
    2
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    <!--quoteo(post=513413:date=Oct 3 2010, 10:00 PM:name=FraGag)--><div class='quotetop'>QUOTE (FraGag @ Oct 3 2010, 10:00 PM) <a href="index.php?act=findpost&pid=513413"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=513298:date=Oct 3 2010, 06:03 AM:name=FraGag)--><div class='quotetop'>QUOTE (FraGag @ Oct 3 2010, 06:03 AM) <a href="index.php?act=findpost&pid=513298"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><a href="http://www.fileden.com/files/2008/5/26/1929849/Sonic%201%20Reversed%20Frequencies.bin" target="_blank">Sonic 1</a>
    <a href="http://www.hapisan.com/Sonic%202%20Reversed%20Frequencies.bin" target="_blank">Sonic 2</a> (by Cinossu)
    <a href="http://www.fileden.com/files/2008/5/26/1929849/Sonic%20The%20Hedgehog%203%20Reversed%20Frequencies.bin" target="_blank">Sonic 3</a>
    <a href="http://www.fileden.com/files/2008/5/26/1929849/Sonic%20and%20Knuckles%20Reversed%20Frequencies.bin" target="_blank">Sonic & Knuckles</a><!--QuoteEnd--></div><!--QuoteEEnd-->
    Fixed download links.
    <!--QuoteEnd--></div><!--QuoteEEnd-->

    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 <a href="http://project2612.org/details.php?id=460" target="_blank">Itchy and Scratchy Beta</a> music lmfao.
     
  5. Lapper

    Lapper

    Member
    1,558
    54
    28
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy: WW, Freedom Planet
    <!--quoteo(post=559807:date=Feb 18 2011, 04:37 AM:name=Mr Lange)--><div class='quotetop'>QUOTE (Mr Lange @ Feb 18 2011, 04:37 AM) <a href="index.php?act=findpost&pid=559807"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=513413:date=Oct 3 2010, 10:00 PM:name=FraGag)--><div class='quotetop'>QUOTE (FraGag @ Oct 3 2010, 10:00 PM) <a href="index.php?act=findpost&pid=513413"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=513298:date=Oct 3 2010, 06:03 AM:name=FraGag)--><div class='quotetop'>QUOTE (FraGag @ Oct 3 2010, 06:03 AM) <a href="index.php?act=findpost&pid=513298"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><a href="http://www.fileden.com/files/2008/5/26/1929849/Sonic%201%20Reversed%20Frequencies.bin" target="_blank">Sonic 1</a>
    <a href="http://www.hapisan.com/Sonic%202%20Reversed%20Frequencies.bin" target="_blank">Sonic 2</a> (by Cinossu)
    <a href="http://www.fileden.com/files/2008/5/26/1929849/Sonic%20The%20Hedgehog%203%20Reversed%20Frequencies.bin" target="_blank">Sonic 3</a>
    <a href="http://www.fileden.com/files/2008/5/26/1929849/Sonic%20and%20Knuckles%20Reversed%20Frequencies.bin" target="_blank">Sonic & Knuckles</a><!--QuoteEnd--></div><!--QuoteEEnd-->
    Fixed download links.
    <!--QuoteEnd--></div><!--QuoteEEnd-->

    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 <a href="http://project2612.org/details.php?id=460" target="_blank">Itchy and Scratchy Beta</a> music lmfao.
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    I like Marble zone's music the best, it's whole mood has been reversed.
     
  6. muteKi

    muteKi

    Fuck it Member
    7,573
    2
    18
    I find Oil Ocean's change <I>fascinating</I>. 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

    Ravenfreak

    Sucks at sprite art Tech Member
    2,835
    25
    28
    O'Fallon Mo
    Hacking Sonic Drift
    RF here again with yet another mini-hack. :v: <span style='color:#000000;background:#000000'>I think I post in here too much. xP</span> And yes, it's Sonic Chaos, this time I edited the ring values and lives. Here's the link:
    <a href="http://www.mediafire.com/?2j9tima0w8a4mlf" target="_blank">http://www.mediafire.com/?2j9tima0w8a4mlf</a>
     
  8. Max Firestorm

    Max Firestorm

    Pyrodramatic Member
    <!--quoteo(post=560301:date=Feb 19 2011, 11:40 AM:name=Ravenfreak)--><div class='quotetop'>QUOTE (Ravenfreak @ Feb 19 2011, 11:40 AM) <a href="index.php?act=findpost&pid=560301"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->RF here again with yet another mini-hack. :v: <span style='color:#000000;background:#000000'>I think I post in here too much. xP</span> And yes, it's Sonic Chaos, this time I edited the ring values and lives. Here's the link:
    <a href="http://www.mediafire.com/?2j9tima0w8a4mlf" target="_blank">http://www.mediafire.com/?2j9tima0w8a4mlf</a><!--QuoteEnd--></div><!--QuoteEEnd-->

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

    GT Koopa

    Member
    1,999
    0
    16
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    <!--quoteo(post=556969:date=Feb 10 2011, 06:35 AM:name=Ravenfreak)--><div class='quotetop'>QUOTE (Ravenfreak @ Feb 10 2011, 06:35 AM) <a href="index.php?act=findpost&pid=556969"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->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: <a href="http://www.mediafire.com/?gwnb2k8q5h47mv4" target="_blank">http://www.mediafire.com/?gwnb2k8q5h47mv4</a> And a Fusion savestate to play as Tails: <a href="http://www.mediafire.com/?2fozq25sefdn071" target="_blank">http://www.mediafire.com/?2fozq25sefdn071</a> And of course if you don't use Fusion, you can just make a Gens savestate and use that. xP<!--QuoteEnd--></div><!--QuoteEEnd-->

    Tried it and beat it, though it was hard. Didn't get all emeralds though.
     
  10. FraGag

    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.

    <a href="http://www.fileden.com/files/2008/5/26/1929849/s1upsidedown.7z" target="_blank">Sonic the Hedgehog: Upside Down</a>

    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 href="http://www.fileden.com/files/2008/5/26/1929849/s1spritesupsidedown.7z" target="_blank">a prototype version in which only the sprites are upside down</a>! 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

    Selbi

    Impaled with Extreme Prejudice Member
    1,482
    0
    0
    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

    Hanoch

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

    Animemaster

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

    Cinossu

    Administrator
    2,819
    8
    18
    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

    FraGag

    Tech Member
    <!--quoteo(post=563092:date=Feb 26 2011, 01:59 PM:name=Cinossu)--><div class='quotetop'>QUOTE (Cinossu @ Feb 26 2011, 01:59 PM) <a href="index.php?act=findpost&pid=563092"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->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?<!--QuoteEnd--></div><!--QuoteEEnd-->
    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 <I>visible</I> 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:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    loc_160E:
    <span style="color: #00bfff;">andi</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">7FFF</span>,<span style="font-weight:bold;">d2</span>
    <span style="color: #00CC66;">if</span> FlipLayers=<span style="color: #ff0000;">0</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="font-weight:bold;">d2</span>,<span style="">(</span>f_plc_execute<span style="">)</span>.<span style="color: #00bfff;">w</span>
    <span style="color: #00CC66;">endif</span>
    <span style="color: #00bfff;">bsr</span>.<span style="color: #00bfff;">w</span> NemDec4
    <span style="color: #00CC66;">if</span> FlipLayers
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="font-weight:bold;">d2</span>,<span style="">(</span>f_plc_execute<span style="">)</span>.<span style="color: #00bfff;">w</span>
    <span style="color: #00CC66;">endif</span>
    &nbsp;</pre><!--gc2--><!--CmxvY18xNjBFOgoJCWFuZGkudwkjJiMwMzY7N0ZGRixkMgoJaWYgRmxpcExheWVycz0wCgkJbW92ZS53
    CWQyLChmX3BsY19leGVjdXRlKS53CgllbmRpZgoJCWJzci53CU5lbURlYzQKCWlmIEZsaXBMYXllcnMKC
    Qltb3ZlLncJZDIsKGZfcGxjX2V4ZWN1dGUpLncKCWVuZGlmCg==--><!--egc2--><!--g2--></div><!--eg2-->
    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.

    <!--quoteo(post=562992:date=Feb 26 2011, 09:37 AM:name=Hanoch)--><div class='quotetop'>QUOTE (Hanoch @ Feb 26 2011, 09:37 AM) <a href="index.php?act=findpost&pid=562992"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Someone should make a Sonic 1 Wall edition: Everything is flipped in 90 degrees.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Good luck dealing with the different aspect ratio. :P
     
  16. nineko

    nineko

    I am the Holy Cat Tech Member
    <!--quoteo(post=563164:date=Feb 26 2011, 10:46 PM:name=FraGag)--><div class='quotetop'>QUOTE (FraGag @ Feb 26 2011, 10:46 PM) <a href="index.php?act=findpost&pid=563164"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->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.<!--QuoteEnd--></div><!--QuoteEEnd-->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

    FraGag

    Tech Member
    <!--quoteo(post=565210:date=Mar 4 2011, 07:13 AM:name=nineko)--><div class='quotetop'>QUOTE (nineko @ Mar 4 2011, 07:13 AM) <a href="index.php?act=findpost&pid=565210"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=563164:date=Feb 26 2011, 10:46 PM:name=FraGag)--><div class='quotetop'>QUOTE (FraGag @ Feb 26 2011, 10:46 PM) <a href="index.php?act=findpost&pid=563164"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->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.<!--QuoteEnd--></div><!--QuoteEEnd-->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.
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    Done: <a href="http://info.sonicretro.org/SCHG How-to:Fix a race condition with Pattern Load Cues" target="_blank" style="background: url(http://info.sonicretro.org/images/5/50/Reticon.png) right no-repeat; padding-right: 20px; border-bottom: 1px dotted #3366BB; color: #3366BB; cursor:pointer; text-decoration:none;" class="wiki">SCHG How-to:Fix a race condition with Pattern Load Cues</a>. 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 <a href="http://info.sonicretro.org/SCHG How-to:Guide" target="_blank" style="background: url(http://info.sonicretro.org/images/5/50/Reticon.png) right no-repeat; padding-right: 20px; border-bottom: 1px dotted #3366BB; color: #3366BB; cursor:pointer; text-decoration:none;" class="wiki">SCHG How-to:Guide</a> to group the guides for Sonic 1 and Sonic 2 in categories. A new hacker will probably want to follow the <b>Fixing bugs</b> guides before adding new features.
     
  18. kazade

    kazade

    Member
    64
    0
    0
    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
    1,286
    2
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    Oh noes.
    Sonic Upside Down + Sonic Return to Origin =
    <img src="http://images.encyclopediadramatica.com/images/4/41/Nuclear1.jpg" border="0" class="linked-image" />
     
  20. Ravenfreak

    Ravenfreak

    Sucks at sprite art Tech Member
    2,835
    25
    28
    O'Fallon Mo
    Hacking Sonic Drift
    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 <a href="http://www.mediafire.com/?rwj5hs183z04u3j" target="_blank">http://www.mediafire.com/?rwj5hs183z04u3j</a>