Romhacking.net

Romhacking => Personal Projects => Topic started by: eskayelle on May 03, 2020, 02:51:58 pm

Title: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 03, 2020, 02:51:58 pm
(SKL 12/24/2020) Version 1.999.1, with bugfixes for Raph and Mike, is out now!  Grab it here (http://www.romhacking.net/hacks/5169)!


(SKL 5/27/2020) TMNT Final is here (http://www.romhacking.net/hacks/5169/)!  Thanks to all the folks who helped provide various levels of guidance that got me to the finish line!  Please be sure to check out the hack (http://www.romhacking.net/hacks/5169/), and keep reading this blog to see some of the fruits of my efforts (and some of how the hack was made...).



Given all the help I'd received from the RHDN community (and others!), I figured I'd do something a bit similar to my NBA Jam TE (https://www.romhacking.net/documents/790/) work and distribute some of the knowledge I've gained hacking Streets of Rage 2 so more folks can put out new hacks and perhaps make an update or two to some old ones.

At the same time, I'm polishing off my last mods in my TMNT of Rage series, having been able to achieve 90% or so of what I was hoping to accomplish with the hack.  So, as I'm putting the finishing touches on The Final Shell Shock (mostly playtesting), I figure every so often I'll update this thread with some screenshot and protips.

And away we go...



Title Screens
Yep, they're a pain, and you don't get a lot from them gameplay-wise, but they do put a nice set of polish on a mod and really make it your own.  With a fair amount of guidance from folks as to what to look for in the code (and where to hijack), I managed to crack that one for SoR2 and published a doc (https://www.romhacking.net/documents/807/) to help others get in on that sweet title screen action, too. 

To keep it simple, there are two (likely more) paths you can take to insert your own title screen:
1) Figure out the decompression scheme and build a tool that mimics it, reverses it, and effectively injects your title screen in the same place.  I haven't messed around much with that path, as I'm not much for compression schemes and utility building, but I can tell you the decompression routine starts around $30C0 in the US rom and is used for the title screen and end credits images, plus the enemy character sprites and likely the player portraits.

2) Hijack the spot where the title screen is decompressed and pushed to VRAM and instead send an already-decompressed image from expanded rom over. That linked doc above takes a bunch of guidance from folks in this forum, plus Zophar's Domain and the Sonic Retro (https://forums.sonicretro.org/index.php?threads/help-request-title-screen-replacement-streets-of-rage-2.38776/) forums, and walks through all the logic and code to get you there.

PROTIP: The US title screen's compressed image is at $39018, while the map for the image's plane B tiles is at $38B94.  Armed with those and the palette locations (in the area of $5D34; check out the doc), plus the doc, you should be able to get a nice title screen going.  I say this because Dha Lau Hoo's put out a number of revisions to his Final Fight and Street Fighter SoR2 hacks with the help of this guide.

And with that comes my first teaser screen:
(https://files.catbox.moe/al80w8.png)

Thanks to guidance from Yoni on how to get started with Tile Layer Pro, I managed to get more colors and more pop to the TMNT logo here, as compared to my previous mods' screens.  I used TileMolestor for those, which seems easier to use but causes a fair bit of color loss when comparing the output to the original bitmap.  I've been sticking with TLP for other edits in this new hack, but more on that later.



Player Select Screen Names
Let's do one more tidbit... the Player Select screen.  So many hacks don't correct for the Max, Axel, Blaze, and Skate tiles on the screen, despite some great sprite work in the hacks themselves.  Let's pull back the curtain on that.

An old Brawler's Avenue or SoR Online forum site had some guidance on how to revise those select screen tiles, but they seem to have been lost on the interwebs vacuum when that site went down or was changed out.  Thankfully, some folks held on to a copy of the instructions.  Dha Lau Hoo was kind enough to help me out with a set, and I want to pass that on as well (hoping here I'm not being too forward).

In any event, here's a version of those instructions I've passed along to any who've asked.

Code: [Select]
Addresses:
       Upper   Lower
MAX    73EA    73F4
AXEL   73FE    7408
BLAZE  7412    741C
SKATE  7426    7430

Tile indices:
 Upper half  Lower half   
    UL   UR   LL   LR
A   00   02   01   03
B   30   32   31   33
C   34   36   35   37
D   4C   4E   4D   4F
E   04   06   05   07
F   04   06   19   1B
G   08   0A   09   0B
H           
I   0C   0E   0D   0F
J           
K   38   3A   39   3B
L   3C   3E   3D   3F
M   10   12   11   13
N           
O   14   16   15   17
P   18   1A   19   1B
Q           
R   1C   1E   1D   1F
S   20   22   21   23
T   24   26   25   27
U   28   2A   29   2B
V   2C   2E   2D   2F
W           
X   40   42   41   43
Y   44   46   45   47
Z   48   4A   49   4B
Space   3E   3E   3E   3E

No code for H, J, N, Q, and W.
For H, use 02 02, 19 03.
For J, use 3E 2A, 29 2B.
For N, use 34 02, 03 03.
For dot, use 3E 3E, 03 3E.
Alternatively, use TLP to edit the tiles, the offset is approximately $32A00.

The letters are 4 tiles each, each letter being 2x2, and duplicates used to save rom space.  Changing the offsets above to the various bytes changes your titles, so you can then rename your characters. Maximum length is 5 letters still.

The end result?
(https://files.catbox.moe/xoe978.png)



Thanks for reading, and stay tuned for more!
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: Pleiades7 on May 04, 2020, 06:21:00 pm
Cool stuff.

Quick question: what's this version offer in the way of new stuff?

I noticed your other cool hack.

What will this add? What is "The final shellshock"? etc.
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: peixemacaco on May 05, 2020, 08:27:57 pm
Great, eskayelle!

I´m always interested on your rom hack knowledge. Great what you're doing with SoR and other games as you did with NBA Jam.

Do you have any intention to bring SoR 4 sprites to a new SoR 2 version?  And the stage backgrounds? I've decompressed some parts from SoR with Nemesis decompressor tool, but only a few parts of the background are visible.

****
Pleiades7 , Shell Shock is a common name in the TMNT "world"

Nelson
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 05, 2020, 09:09:26 pm
Thanks for the kind feedback, Pleiades7 and peixemacaco!   :beer:

To answer your questions...

Quote
what's this version offer in the way of new stuff?

Just about all will be revealed over the course of this blog, so I won't spoil too much just yet, but I can tell you that this game is a direct descendant of the TMNT of Rage and TMNT Remix games, so it won't have the difficulty of Kaizo by any means.  I messed a bit with the MDV utility, and with some guidance from Savok and Yoni dropped in a few more fun voices, including a Shredder laugh, a "Cowabunga!", and a few others!

Quote
Do you have any intention to bring SoR 4 sprites to a new SoR 2 version?  And the stage backgrounds?

Not at the moment.  Having pretty much set out what I planned to do with the TMNT, I'm more or less "retiring" from SoR2 hacking and may look for another game to mess with in time.  All the more reason to issue out everything I've learned, so other folks can take advantage and put together some sweet new hacks... like your SoR4 idea!

On to the blog...



Title Screens Revisited
Let’s take a few minutes to think about those snazzy new title screens we’re making.  They’ll work on our US rom, provided our region is North America. But… what if our friends outside of ‘Murica are playing the game in an emulator or actual hardware with a different region setting?  They could end up with the Bare Knuckle screen, since the developers had packed that into the rom.  Let’s fix that.

Remember that doc from my first post that provided instructions on how to change out the title screen?  It also gives the offset to the Bare Knuckle title screen, in case anyone were to want to apply some of the logic from that doc to that screen.

Or, we could be lazy and just take some of the work I already did!

…Does anyone ever read those readme files that come with software, or with RHDN romhacks generally?  Sure, some of them just provide credits or a website or are fairly limited in text, but others give some guidance on how to play a certain hack… and a few provide some of the “makings of” for hacks.

My readmes tend to document things I’ve learned, so that 1) I can use that knowledge later, and 2) the information ends up making it to the public, ensuring (likely) it isn’t lost later.

With that in mind, let’s jump over to my readme for TMNT Remix (https://www.romhacking.net/hacks/genesis/patches/4816readme.txt).  A million lines down, note this section:

Code: [Select]
::TMNT of Rage - Japanese Title Screen.ips
::Assembly hack to repoint references to the Bare Knuckle Screen over to the TMNT of Rage one!
::Now every region will see the TMNT of Rage title screen!

Instead of redoing all our hijacking, why not just change a pointer… and the palette assigned to the Bare Knuckle screen?

This patch (https://files.catbox.moe/3fuhau.ips) does that for us, but note that 1) it’s not tested on any hack besides these TMNT of Rage ones, and 2) it adjusts the title screen palette (at $5BC0, I believe) to mimic a TMNT one, so you’ll need to use HivePal, Palettes of Rage, or hex editing to fix that yourself.

So now our title screen will work in other regions, but our story text won’t.  Let’s get nitpicky and fix that too.  Jump back into that readme.  Look for this guy.

Code: [Select]
::TMNT Remix - Remove Region Lock.ips
::Revised hex to add the Game Genie master code and remove the region lock.
::This also removes the issue of a bad checksum not allowing the game to play.
::TMNT Remix - BTST #7,($00A10001), BNE to BRA (Rem JPN Text).ips
::Using tracelogs, searched for each instance in the ROM where the following command occurred: BTST #7,($00A10001). 
::Changed the next command from a BNE to a BRA to skip over any Japanese region screen commands.

You can take care of injecting the Game Genie code into hex via info on gamehacking.org if you want.  I’d rather focus on this bit test.  Based on a bunch of trace logging I did back when making TMNT Remix, there’s a certain flag the rom is looking for that every time it’s tripped, the system will understand to display the US version ASCII text versus the Japanese language tiles.  If you use a hex editor to find every instance of this bit test command and change each corresponding “branch not equal” command to a “branch always”, your text will be the English verbiage, regardless of region.

Makes sense?  If not, try this patch (https://files.catbox.moe/azlr35.ips).

Booyakasha!



Remember, I don’t guarantee these patches will work exactly as they did for my TMNT of Rage hacks, as you’ll need to modify palettes, and as I haven’t gone back to this stuff in quite some time (so I could be missing a patch from the readme), but they’re a good start if you want to mess around and see what they do for your hack.

Next on deck... Pancake 2...  Ciao for now!   :thumbsup:

May 09, 2020, 04:19:11 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Disassemblies Released!
Taking two seconds to provide a bit of a news flash; Red Crimson and gsaurus have agreed to release their IDA-based disassemblies of the Streets of Rage trilogy.  They can be found here (https://github.com/gsaurus/sor-disassemblies/).
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 13, 2020, 10:00:19 am
Fun with Pancake
Quote
From WWF Smackdown Commercial:
Dwyane “The Rock” Johnson: “I smell what you’re cookin.”
Actor: “Pancakes, Rock!  Pancakes!”

No, not those pancakes… today we’re working with gsaurus’ Pancake 2 sprite editor for Streets of Rage 2.

DID YOU KNOW? According to Savok, Barbon’s sprites are not actually compressed, as the editor notes.  If you go into Pancake2 > guides > default.txt and change the third Barbon line from a 1 to a 0, it should unlock him for editing. The fourth line may need to be removed upon further read of guidance as well.

I did manage to change out some character names for the uncompressed enemies so they’d generate in Pancake 2.  I also determined that, if you change those enemies’ palettes in the default.txt file to AE50, you’ll be able to more easily edit your newly imported sprites’ colors.  (Pancake 2 forces the rom to take on the same palette as Max/Axel/Blaze/Skate, so when you change their colors, any uncompressed bosses that you imported have to use that same palette.)

That brings me to this teaser…

(https://files.catbox.moe/71h0oh.PNG)

Also… many of the icons aren’t really compressed either, including the small character portraits for players and enemies that appear in game, and the icons for the 1up, apple, chicken, and some other pics.  With an editor like TLP and the right palette, you can easily edit those graphics to fit your game.

Thanks, to Yoni, for instance, I now have a pizza slice in TMNT Final, with a little plate added by me to line up with SoR2 style.

(https://files.catbox.moe/gzg024.png)

Here are some offsets for images, grabbed from the the ol’ Internet Archive Wayback Machine and the archived Streets of Rage Online site (originally produced by Red Crimson and Glisp)…

Code: [Select]
Character and Enemy Life Bar Portraits - $335E0-$341E0
1P and 2P? - $35FA8 - $36088
Player’s default shadow - $36088 - $36128
Hit Register 1 - $36128 - $36228
Hit Register 2 - $36228 - $36448
Dust cloud - $36448 - $365C8
Money Bag - $365C8 - $36648
Gold Bar - $36648 - $366C8
1up - $366C8 - $36748
Apple - $36748 - $367A8
Turkey - $367A8 - $368A8
"Go" Sign - $368A8 - $369A8

And… here’s the archived SoR2 main page for even more goodies:

Archived Streets of Rage Online site (https://web.archive.org/web/20160214070209/http://www.soronline.net/sor2.htm)



PROTIP:
Quote
"In order to use the boss palette when replacing bosses, just put the Alternative Palette checkbox in the SoR2 Level Editor." ~ Savok

(https://files.catbox.moe/kbom68.png)


Next up: credits screens...
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: Pleiades7 on May 13, 2020, 11:46:28 am
Fun with Pancake
No, not those pancakes%u2026 today we%u2019re working with gsaurus%u2019 Pancake 2 sprite editor for Streets of Rage 2.

DID YOU KNOW? According to Savok, Barbon%u2019s sprites are not actually compressed, as the editor notes.  If you go into Pancake2 > guides > default.txt and change the third Barbon line from a 1 to a 0, it should unlock him for editing. The fourth line may need to be removed upon further read of guidance as well.

I did manage to change out some character names for the uncompressed enemies so they%u2019d generate in Pancake 2.  I also determined that, if you change those enemies%u2019 palettes in the default.txt file to AE50, you%u2019ll be able to more easily edit your newly imported sprites%u2019 colors.  (Pancake 2 forces the rom to take on the same palette as Max/Axel/Blaze/Skate, so when you change their colors, any uncompressed bosses that you imported have to use that same palette.)

That brings me to this teaser%u2026

(https://files.catbox.moe/71h0oh.PNG)

Also%u2026 many of the icons aren%u2019t really compressed either, including the small character portraits for players and enemies that appear in game, and the icons for the 1up, apple, chicken, and some other pics.  With an editor like TLP and the right palette, you can easily edit those graphics to fit your game.

Thanks, to Yoni, for instance, I now have a pizza slice in TMNT Final, with a little plate added by me to line up with SoR2 style.

(https://files.catbox.moe/gzg024.png)

Here are some offsets for images, grabbed from the the ol%u2019 Internet Archive Wayback Machine and the archived Streets of Rage Online site (originally produced by Red Crimson and Glisp)%u2026

Code: [Select]
Character and Enemy Life Bar Portraits - $335E0-$341E0
1P and 2P? - $35FA8 - $36088
Player%u2019s default shadow - $36088 - $36128
Hit Register 1 - $36128 - $36228
Hit Register 2 - $36228 - $36448
Dust cloud - $36448 - $365C8
Money Bag - $365C8 - $36648
Gold Bar - $36648 - $366C8
1up - $366C8 - $36748
Apple - $36748 - $367A8
Turkey - $367A8 - $368A8
"Go" Sign - $368A8 - $369A8

And%u2026 here%u2019s the archived SoR2 main page for even more goodies:

Archived Streets of Rage Online site (https://web.archive.org/web/20160214070209/http://www.soronline.net/sor2.htm)



Next up: credits screens...


Awesome stuff.

How about some of the other bosses? Think we will ever get to change those up a bit?

I ask because one flaw of SOR2 that always bothered me is that the programmers were lazy (or rushed) and included a boss repeat, a red souther on the island level.

(https://files.catbox.moe/v57ad1.png)

My hope someday is to replace that boss with something new or original, as was done here in an openbor version of SOR2

(https://files.catbox.moe/k62e54.png)

In that case, they took a boss named "Hakikari" from Streets of Rage game gear and used him, which was cool because the camouflage pants made sense out of that environment, and he still looked enough like the red souther that it should feel familiar to die hard fans of the original.

Anyhow, in theory, could it be possible (uncompressed or not) to update that boss ever?
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 13, 2020, 01:31:19 pm
Well... Zamza himself is one of the 4 or 5 uncompressed bosses in the game that can be readily edited through Pancake 2; I believe Savok did this in his River City Girls.. of Rage hack here on RHDN.

I myself did fit Shredder in to replace Shiva, Rocksteady to replace R. Bear, and this guy to replace Abadede:

(https://files.catbox.moe/is112k.png)

I think, back then, the developers were probably hitting their limits on a 16-megabit cartridge, so they duplicated certain bosses and used palette swaps of them for regular enemies in order to simulate variety.  Since we can today expand our ROMs to at least 32-megabit and still play the games unhindered on actual hardware, I would think some ASM hacking plus another set of sprites, mapping, and AI attack patterns could be fit for a separate boss.  That ASM, however, is light years beyond me.  So yeah, doable, but you've got to find the right party who's interested in creating the new code, plus a good spriter.



While I'm here...

Potpourri

Quote
Practically every Jeopardy contestant ever: “I’ll take Potpourri for $200, Alex…”

This is a placeholder for a few quick hits to help with your rom hacks.  Also remember this site: Archived Streets of Rage Online site (https://web.archive.org/web/20160214070209/http://www.soronline.net/sor2.htm)

Palettes for the 2nd player in the Duel/Battling mode are at $1091A (Max); $1094A (Axel); $1095A (Blaze); and $1097A (Skate), respectively.

Per Dha Lau Hoo, if you set offset $B4D2 to #$4E71, this NOP command will allow players to move after beating a boss, the effect you see in the arcade game Cadillacs & Dinosaurs.

Per Dha Lau Hoo, the default difficulty setting is at offset $040F, and the default lives setting is at $0415.

Per Savok, if you set the set of 16 bytes starting at offset $C576 to #$00, this will prevent that weird shift forward that occurs during certain special and blitz moves performed by the Blaze character.

PROTIP: Always peruse readme files.  Most of this stuff is in one or more of my TMNT of Rage readmes.  There’s more offsets in those files, too!  (This includes music offsets in the MD+ hacks’ readmes.)

(...Yes... MD+ hacks.  Along with TMNT Final, I'll be issuing a TMNT Re-Shelled patch concurrently, which will allow everyone to play the game on a MegaSD cart with its MD+ functionality.) 
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: Pleiades7 on May 13, 2020, 06:10:40 pm
Well... Zamza himself is one of the 4 or 5 uncompressed bosses in the game that can be readily edited through Pancake 2; I believe Savok did this in his River City Girls.. of Rage hack here on RHDN.

I myself did fit Shredder in to replace Shiva, Rocksteady to replace R. Bear, and this guy to replace Abadede:

(https://files.catbox.moe/is112k.png)

I think, back then, the developers were probably hitting their limits on a 16-megabit cartridge, so they duplicated certain bosses and used palette swaps of them for regular enemies in order to simulate variety.  Since we can today expand our ROMs to at least 32-megabit and still play the games unhindered on actual hardware, I would think some ASM hacking plus another set of sprites, mapping, and AI attack patterns could be fit for a separate boss.  That ASM, however, is light years beyond me.  So yeah, doable, but you've got to find the right party who's interested in creating the new code, plus a good spriter.



While I'm here...

Potpourri

This is a placeholder for a few quick hits to help with your rom hacks.  Also remember this site: Archived Streets of Rage Online site (https://web.archive.org/web/20160214070209/http://www.soronline.net/sor2.htm)

Palettes for the 2nd player in the Duel/Battling mode are at $1091A (Max); $1094A (Axel); $1095A (Blaze); and $1097A (Skate), respectively.

Per Dha Lau Hoo, if you set offset $B4D2 to #$4E71, this NOP command will allow players to move after beating a boss, the effect you see in the arcade game Cadillacs & Dinosaurs.

Per Dha Lau Hoo, the default difficulty setting is at offset $040F, and the default lives setting is at $0415.

Per Savok, if you set the set of 16 bytes starting at offset $C576 to #$00, this will prevent that weird shift forward that occurs during certain special and blitz moves performed by the Blaze character.

PROTIP: Always peruse readme files.  Most of this stuff is in one or more of my TMNT of Rage readmes.  There’s more offsets in those files, too!  (This includes music offsets in the MD+ hacks’ readmes.)

(...Yes... MD+ hacks.  Along with TMNT Final, I'll be issuing a TMNT Re-Shelled patch concurrently, which will allow everyone to play the game on a MegaSD cart with its MD+ functionality.)

One future hacking goal I've always wanted for this game is the opportunity to add something between scenes to bring this all together. Nothing special, maybe a graphic of a map indicating progress. I'm thinking of the style of ghost and goblins or Shinobi. Even if that map graphic appeared on the black stage level screens that normally say Stage 1 and Stage 2, etc., that this would be a good final quality of life hack for the game.

I mention all that since one thing that always bothered me about the game is that you can tell the final product was rushed. Sega was doing their version of Final Fight but they were trying to get some game out there to steal back sales from the juggernaut phenomena that was Street fighter 2 on the SNES. So you get these scenes that don't entirely make sense. First we are in an amusement park, then a boat, then an Island. Yeah, you can make heads and tails of it on your own. But the nice thing about games like Shinobi, Revenge of Shinobi and Golden Axe is that they would find a creative way to bring it all together with that map scene, sometimes with a boss description.

To be clear, I'm not speaking of anything complicated like the cut scenes in Streets of Rage 3 or Streets of Rage remake.

But is there room or opportunities for something like that here? Again, can some graphic replace the black stage intro scenes that would accomplish that?

My 2 cents.

P.S. Also, love the work you did here! While you are at it, if it is not too much work, you should replace as much as possible here if the spirit moves you. If Zamza is replaceable, then why not do another TMNT villain to replace him like Baxter Stockman in fly form or some other appropriate character. Curious to see who you picked to replace Barbon since you mentioned him. Also my 2 cents. Thank you for this hack!
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 13, 2020, 06:57:21 pm
Thanks!

I get your point on the flow between scenes, but I also allow that it's supposed to be arcade-style, and a lot of those venues don't make much sense.  Like, in some beat-em-ups, the player teleports to 5 or 6 cities with no explanation.  Is what it is.

Now, SoR2 does have some continuity.  Start on the Streets (Stage 1), then another road (Stage 2) that leads to the amusement park (Stage 3).  I'm not a fan of the alien's lair; it really doesn't fit, even in an amusement park setting.  It's too... Contra-y.

From the amusement park, on to the Stadium (stage 4).  And in the background, you can see the amusement park where you were, so there's progression.

Could have been a harbor next, but you end up on a boat (Stage 5) that takes you to a beach (Stage 6) which is the island upon which Mr. X's factory (Stage 7) and penthouse suite (Stage 8 ) resides.  Meh, good enough for a classic quarter muncher!

I had thought about more mutant bosses for TMNT Final, but I feel like the fighting styles don't fit well.  Closest thing to Zamza would be Slash, but it's not a great fit.  Jet and Baxter could connect nicely, especially since Stage 2 kinda looks like Big Apple, 3am, but 1) Jet's sprites are compressed, making it difficult to edit and 2) you'd be stuck with him as a regular enemy too, and I'm not a fan of that.

I thought about using Tatsu, but his animations in Hyperstone Heist are too sparse.  Thought about Karai from Tournament Fighters, but her fighting style doesn't match well to my remaining bosses.  I wanted more human bosses to fit in with the SoR2 universe, which is my other reason for avoiding anything but the main mutants.

Thought about putting myself in place of Barbon, but that's more of fun thing for me than anyone else, and sprite edits are time consuming and sometimes not worth the effort...

I really like that idea of cutscenes or maps.  Hopefully someone in the future looks into hacking the stage screen and adding some code and tiles to make things interesting.



Almost forgot... a few teasers:

In-game Rocksteady:

(https://files.catbox.moe/22kx6w.png)

TMNT Re-Shelled title screen (font from the PS3 "phenomenon"):

(https://files.catbox.moe/3kuaxc.png)
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: peixemacaco on May 14, 2020, 04:32:05 am

My hope someday is to replace that boss with something new or original, as was done here in an openbor version of SOR2

(https://files.catbox.moe/k62e54.png)

In that case, they took a boss named "Hakikari" from Streets of Rage game gear and used him, which was cool because the camouflage pants made sense out of that environment, and he still looked enough like the red souther that it should feel familiar to die hard fans of the original.

Anyhow, in theory, could it be possible (uncompressed or not) to update that boss ever?

Pleiades just for your knowledge, this Hakikari boss is the same boss HaraKiri on Streets of Rage Mobile.

eskayelle, just great all your infos, me and all people keep appreciating..

Ciao,
Nelson
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: Pleiades7 on May 14, 2020, 11:08:20 am
Thanks!

I get your point on the flow between scenes, but I also allow that it's supposed to be arcade-style, and a lot of those venues don't make much sense.  Like, in some beat-em-ups, the player teleports to 5 or 6 cities with no explanation.  Is what it is.

Now, SoR2 does have some continuity.  Start on the Streets (Stage 1), then another road (Stage 2) that leads to the amusement park (Stage 3).  I'm not a fan of the alien's lair; it really doesn't fit, even in an amusement park setting.  It's too... Contra-y.

From the amusement park, on to the Stadium (stage 4).  And in the background, you can see the amusement park where you were, so there's progression.

Could have been a harbor next, but you end up on a boat (Stage 5) that takes you to a beach (Stage 6) which is the island upon which Mr. X's factory (Stage 7) and penthouse suite (Stage 8 ) resides.  Meh, good enough for a classic quarter muncher!

I had thought about more mutant bosses for TMNT Final, but I feel like the fighting styles don't fit well.  Closest thing to Zamza would be Slash, but it's not a great fit.  Jet and Baxter could connect nicely, especially since Stage 2 kinda looks like Big Apple, 3am, but 1) Jet's sprites are compressed, making it difficult to edit and 2) you'd be stuck with him as a regular enemy too, and I'm not a fan of that.

I thought about using Tatsu, but his animations in Hyperstone Heist are too sparse.  Thought about Karai from Tournament Fighters, but her fighting style doesn't match well to my remaining bosses.  I wanted more human bosses to fit in with the SoR2 universe, which is my other reason for avoiding anything but the main mutants.

Thought about putting myself in place of Barbon, but that's more of fun thing for me than anyone else, and sprite edits are time consuming and sometimes not worth the effort...

I really like that idea of cutscenes or maps.  Hopefully someone in the future looks into hacking the stage screen and adding some code and tiles to make things interesting.



Almost forgot... a few teasers:

In-game Rocksteady:

(https://files.catbox.moe/22kx6w.png)

TMNT Re-Shelled title screen (font from the PS3 "phenomenon"):

(https://files.catbox.moe/3kuaxc.png)

Slash would be perfect as a replacement for Barbon. You should at least do that to tip off this 'more-immersive-than-normal' SO2 romhack otherwise it would be lopsided and redundant like so many before it. Just my 2 cents.

Also, if possible, maybe change up at least one mook (i.e. a Garcia or Donovan type baddie) into a foot soldier. Seeing those guys running around with SO2 baddies would be cool and would complete the thought for me, at least.

In any case, happy hacking!
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 15, 2020, 09:09:58 am
Good stuff.  If you want more immersion, wait till we get to my end credits posts!  :thumbsup:



-----Intermission-----
Revisiting Kaizo – That Health Bar… WTF???

Quote
”STUPID JANK HACK!... Is there a way of, like, making it so eskayelle can’t make another romhack ever for the rest of his life, or something?” ~ Anthopants

So there’s a backstory behind the health bar in TMNT Kaizo, actually.  In the first versions of the game, I made a bunch of initial resets to make that hack have a “Kaizo” feel:

The details are all in the readme (https://www.romhacking.net/hacks/genesis/patches/5040readme.txt).

And then came the health bar decrease…

My original goal here was to create a puzzle, particularly in 2 player games, whereby on only the very first life, both players 1 and 2 would start with one health point.  They’d have to quickly work together to ensure one person got the chicken and the other the 1up.  This way, both would even out at 1 full life in the aftermath… unless someone got greedy or murderous.

Problem is… the code worked for player 1, but it didn’t for player 2; player 2 received full health from the start.  So there ended up being a disproportionate handicap that I wasn’t a fan of.

The puzzle still worked well in a 1 player game, particularly for those who hadn’t figured out the existence of the hidden 1up yet… but it felt too … unpolished… for a 2 player game.  So I scrapped it and looked for a more symmetrical challenge.  In my opinion, kaizo games are ridiculously hard, built more or less to kill the majority of players.  Winnable eventually but requiring a lot of precision and in turn fairly cheap... or at least unforgiving.  In that context, TMNT Kaizo, though cheaper than my original intent, is exactly as advertised: a kaizo game where the Shredder “WILL dine on turtle soup! (http://www.romhacking.net/news/2343/)”.

Care to give it a try? (http://www.romhacking.net/hacks/5040/)

For those interested, here’s my buggy code for the original puzzle:

Code: [Select]
;=========================================
;Streets of Rage 2
;Initial Health Code Modifications v7
;=========================================

;-----------------------------------------
;Purpose: Hijack the code before the 1st
;stage starts and send it to another area
;in ROM to add functionality to two more
;RAM bytes.
;-----------------------------------------
org $00005CBE ;offset to hijack
; lea ($00005D74),A6 ;4D F9 00 00 5D 74 ;original (hijacked) $5CBE code
jsr $00024E00 ;4E B9 00 02 4E 00 ;jump to new code location

;-----------------------------------------
;Purpose: Set two unused RAM bytes to zero
;before a game (stage 1) starts. 
;These bytes will be changed so the health
;value increases to 0x68 whenever a player
;dies, but the very first life should have
;a health value much less than the default
;0x68.
;-----------------------------------------
org $00024E00 ;offset to hijack
move.b #$00,$F0BE ;11 FC 00 00 F0 BE ;create a player 1 parameter (1 byte)
move.b #$00,$F0BF ;11 FC 00 00 F0 BF ;create a player 2 parameter (1 byte)
lea ($00005D74),A6 ;4D F9 00 00 5D 74 ;original (hijacked) $5CBE code
rts ;4E 75 ;return to hijacked location and continue code

;-----------------------------------------
;Purpose: The byte with the initial health
;value is at offset $7EC8.
;Need to modify this code to split the
;commands such that the initial value is
;reduced, but all lives after receive a
;larger health value (the old 0x68).
;-----------------------------------------
org $00007EC8 ;offset to hijack
; move.w #$0068,$0080(A2) ;35 7C 00 68 00 80 ;this is the original code at $7EC8
jsr $00024E50 ;4E B9 00 02 4E 50 ;jump to new code location

org $00024E50 ;new code to split out 0x68 health per player after death
addq.b,#1,$F0BE ;52 38 F0 BE ;increment new player 1 byte
addq.b,#1,$F0BF ;52 38 F0 BF ;increment new player 2 byte
cmpi.b #$01,$F0BE ;0C 38 00 01 F0 BE ;P1 RAM byte should be #$01 the first stage, first life
beq.s splithealth ;67 10 ;if equals #$01, give #$01 in health; else, give health of #$68
cmpi.b #$01,$F0BF ;0C 38 00 01 F0 BF ;P2 RAM byte should be #$01 the first stage, first life
beq.s splithealth ;67 08 ;if equals #$01, give #$01 in health; else, give health of #$68
move.w #$0068,$0080(A2) ;35 7C 00 68 00 80 ;this is the original code at $7EC8
rts ;4E 75 ;looking to jump back to $7ECE -- clr.w $00A8(A2)

splithealth:
; move.b #$68,$EF81 ;11 FC 00 68 EF 81 ;$EF81 appears to be where the default health value comes from; but $F081 is for player 2
; move.w #$0068,$0080(A2) ;35 7C 00 68 00 80 ;this is the original code at $7EC8; seems to do almost the same thing my code above would have
move.w #$0001,$0080(A2) ;35 7C 00 01 00 80 ;change #$68 to a lower number, so when $F0BE or $F0BF = #$01, that player starts game with less life
rts ;4E 75 ;looking to jump back to $7ECE -- clr.w $00A8(A2)
;
;------------------------------------------
;As written:
;When the ROM starts, P1 and P2 have RAM
;values of zero.
;When the first stage of the first game
;starts, the RAM values will increment to
;#$01.  The comparison will occur.
;The code will branch, and default health
;for both players will be 1 unit.
;Plus, both RAM values will increment.
;P1 and P2 will have RAM values of 2.
;So, whenever either dies, when this code
;runs again, it will not branch, and life
;points assigned will be #$68.
;
;When a game is reset (hard or soft),
;the RAM bytes should be assigned values
;of zero.
;
;Testing:
;Currently works for P1, but P2 starts
;with full life still.  This will be the
;puzzle, the test of friendship...
;
;Will the stronger player take P1?
;Will P2 let P1 take the 1up or make them
;take the suicide attempt to get to the
;chicken before Y. Signal kills them?
;------------------------------------------
;
;------------------------------------------
;-----------------NOTES--------------------
;FFEFA9 and FFF0A9 are the life counters
;FFEF80 is the total health value (max).
;$7ECB is the offset for how high health can go.
;
;Try FFFFF0BE and FFFFF0BF as unused RAM...
;
;...
;
;7EC8 move.w #$0068,$0080(A2) ;this is the original code for the default life points
;7ECE clr.w $00A8(A2) ;this is where I want the hijack to come back to
;7ED2 bra $00C6 [00:7F9A]
;
;...
;-------------------------------------------

PROTIP: If you're not a fan of the half-life meter and want to reset it back to the original unhacked value, the solution is simple.  Just open the rom, locate offset $7ECB, and change the value of the byte to #$68.  Then, fix the checksum if you want.  Tubular!  Drama averted!  :angel:


May 22, 2020, 08:41:28 am - (Auto Merged - Double Posts are not allowed before 7 days.)
The Ending Credits – First Foray

Quote
Parodius (Super Famicom) Voice: “Speed Up!”

I once found on YouTube a playthrough of TMNT Remix (http://www.romhacking.net/hacks/4816/) where someone posted in the comments wondering how I had managed to speed up the end credits sequence.  I don’t really have a YouTube account, so I figured I’d respond here…

Through trace logs, trial and error, writing a snippet of ASM code, causing bugs, and debugging/fixing them.

Let’s go back to my TMNT Remix  (https://www.romhacking.net/hacks/genesis/patches/4816readme.txt) readme, where all will be revealed.  There, we see this documentation:

Code: [Select]
::TMNT Remix - Kill End Screens 22098 BEQ 67.ips
::Using a trace log, located the offset by which the frame delay is present for the end credit screens.
::Changed a BNE to a BRA to immediately fade out the end screens.
::Then blacked out all their palettes except the last one.
::This is basically unfinished business, as I can't write code to point to new/different ending screens.
::The information on palette, screen picture, and tile mapping offset is located here:
::https://www.romhacking.net/forum/index.php?topic=29366.0
 

Now, the trouble with the images (https://www.romhacking.net/forum/index.php?topic=29366.0) themselves is a topic for another post, but in this documentation, I had run trace logs during the ending sequence to determine that there appears to be code that increments a value to a certain point, then when that point is reached, the next screen is generated, be it text credits or an ending sequence image. 

Here’s a quick snapshot of some other info I determined from my tracing exercises:
(https://files.catbox.moe/irsxcl.PNG)

From the above, I

1) found the six images and their palettes, and I set all the palette entries to the color black, giving the appearance of there not being images present.  But the time between screens was then clearly too long, so I

2) located that delay, hijacked the code, and added a duplicate line to it.  So instead of incrementing once, it incremented twice, cutting the delay in half.

Keep reading my readme.  The next section is the speed-up.

Code: [Select]
::TMNT Remix - 0235F8 #1.ips
::Using a trace log, located the offset relevant to the frame delay for the text credits.
::Code at $0235F8 is 53 79 00 FF 91 0E
::Using xvi32, replaced code as follows:
::4E B9 00 02 4C E0 (JSR $00024CE0)
::Then, at $024CE0, added the following:
::53 79 00 FF 91 0E
::53 79 00 FF 91 0E (basically doubles the increment, so it cuts the delay in half)
::4E 75 (RTS)


PROTIP: Always playtest everything you know about the game when making changes.  Changing one thing sometimes has unintended consequences.


Here’s the thing about a hack.  It’s a hack, and I’m not the original dev, nor do I have their notes.  I’m assuming what I’m doing will only affect one part of the game without understanding how the code I modified does or does not play into other parts of the game.  In playtesting, I learned pretty quickly that the delay code used for the ending credits is also used for the intro text.  So that text didn’t get to fully display before the next screen generated, and I’d created a bug.  So I needed a fix; I needed my extra increment to only happen during the end credits and not during the attract mode intro screens.

Enter the next part of the readme documentation…

Code: [Select]
::TMNT Remix - Fix First Line.ips
::But... the end credits [are] using the same function as the opening text,
::so the above match will cause it to end too quickly.
::Create[d] a revised patch...
::Revised code at $024CE0:
::53 79 00 FF 91 0E (the initial increment)
::0C 40 00 1C (CMPI.W #$001C,D0 - a comparison of D0 to #$1C) 
::67 02 (BEQ #$02 - If the comparison doesn't subtract to zero, increment again; else RTS)
::4E 75 (RTS)
::53 79 00 FF 91 0E (the second increment to speed up the end)
::4E 75 (RTS)

I needed a variable that was affected during one of the sequences, but not the other.  Having found that variable, I made a little branch using a comparison function.  Now, my end sequence delay is cut in half, and nothing happens to the intro sequences in attract mode.

And life is good again!

PROTIP: At this stage of the game, I was NOT using an assembler but added the hex by hand via a hex editor and using guides on the Sonic Retro site alongside SoR2 tracelogs to guestimate which hex values corresponded to the opcodes I needed.  Don’t do that.  Get an assembler…  (During my last mods to my TMNT Final hack (still coming soon!), I smartened up and got one to help me write code to fix a nasty bug that wiped out my high score table.  It became a huge timesaver.)



Up next: Those darn end credits screens...
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: Wild Striker on May 23, 2020, 08:31:04 am
Nice hack well done
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 23, 2020, 09:40:01 am
Thanks, Wild Striker!

Having put up such a long post yesterday (see the auto-merged post above), I realized I’d be remiss in my blogging if I didn’t take a moment to provide a few more teasers.  So, here are a couple glamour shots of the new 1up icons.  Enjoy!

(https://files.catbox.moe/eeysr3.png)

(https://files.catbox.moe/y6b4v6.png)

And one more of Bebop’s debut on the Genesis…

(https://files.catbox.moe/tyz4kh.png)

(For fun, I added some real warthog and rhino grunts for the mutants’ sound effects…)
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: cschifani on May 23, 2020, 11:14:16 am
This looks so cool! I can't wait to give this a spin. Keep up the great work!
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 24, 2020, 02:18:17 pm
Thanks for the support!  I'm actually in the homestretch, so here's a few more revelations...



The End is Nigh!

Recall in this thread that I had quite some difficulty figuring out how to insert my own TMNT ending screens into the rom.  I was able to gather through trace logs all the data regarding where the images were, where the palettes were, where the tile maps were… even what the decompression scheme was itself… but I never got any further…

And yet… I did manage to slip a single ending screen into TMNT Remix (http://www.romhacking.net/hacks/4816/).

Spoiler:
(https://files.catbox.moe/cnmzq3.jpg)

How???

Recall that I wrote previously the decompression scheme used for the ending images, the title screen and the character sprites are the same.  And… if someone were to construct a compressor based on that scheme, images could be inserted in the places of the compressed images, provided those compressed new images were of equal or lesser size.

Enter Sharpnull’s compression tool. (https://www.emu-land.net/forum/index.php?topic=83005.0)  While built for the purposes of editing compressed enemy sprites, I re-purposed it instead to drop in a rudimentary ending screen based on Mersox’s Rescue-Palooza game.  TileMolester being unfriendly with the color palette, and size being limited to that of the original SoR2 image, I worked a little artistic magic, and my end result made its way to TMNT Remix.

(And a new single ending screen, based on my process for TMNT Remix, ended up in TMNT Kaizo (http://www.romhacking.net/hacks/5040/).)

I revisited the issue months later with TMNT Final but never made it anywhere with being able to bypass the decompression and insert my own originally decompressed image.  I did, however, have greater success with palettes via TLP, and the end result is 6 all new images for the TMNT Final ending!

Here’s one quick teaser, and stay tuned for the release of the rom for the rest!

Spoiler:
(https://files.catbox.moe/0y55l8.png)



On deck: The big release of the hack, and the epilogue...
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: Pleiades7 on May 24, 2020, 03:12:20 pm
Any chance or desire to work in a foot clan soldier as a mook (ie basic enemy)? Also, hoping you decided to replace Barbon with something from TMNT, like Slash, etc.

Loving this and looking forward to trying it out! Good luck
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 24, 2020, 03:26:01 pm
Hey, Pleiades7.  It can be done, but the compressor I mentioned above doesn't decompress and compress 100% in conjunction with the actual algorithm in the rom, so there are a few pixels that'd end up out of place for Galsia, based on a decompress / recompress test I had done with it.  There may be a workaround when converting him to a foot soldier, but the level of effort isn't worth it for me to pursue.  I'm super pleased with how the game ended up coming out, regardless.  I basically hit everything on my wish list.

Plus, Galsia and Donovan share the same sprite tiles for their bottom halves, so to convert one means to covert both, or try to artistically create one of them with their classic top half but with foot soldier bottoms.  Not really worth it either.

Slash in TMNT IV doesn't have certain animations that are needed in SoR2 (e.g., a facing front animation, such as for behind the bar; or fall/get up animations), so it'd take away from the continuity of the game to try to shoehorn him in.  Personally, I like the level of immersion achieved having a region-agnostic TMNT title screen, Shredder, the truly most relevant mutants, the sound effects, the pizza and 1up icons, the revamped ending sequence, and a certain special unmentioned splash screen in the game (the subject of my next blog post...).  Plus, there's an option for TMNT music when using the Terraonion MegaSD, with the Re-Shelled patch being packed in with the TMNT Final patch and the sound pack available on MEGA (taken from this guy (http://www.romhacking.net/hacks/4975/)).

This will hands down be the most immersive SoR2 crossover to date!  :beer:
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: kmilloz on May 29, 2020, 12:41:00 pm
(SKL 5/27/2020) TMNT Final is here (http://www.romhacking.net/hacks/5169/)!  Thanks to all the folks who helped provide various levels of guidance that got me to the finish line!  Please be sure to check out the hack (http://www.romhacking.net/hacks/5169/), and keep reading this blog to seesome of the fruits of my efforts (and some of how the hack was made...).



Given all the help I'd received from the RHDN community (and others!), I figured I'd do something a bit similar to my NBA Jam TE (https://www.romhacking.net/documents/790/) work and distribute some of the knowledge I've gained hacking Streets of Rage 2 so more folks can put out new hacks and perhaps make an update or two to some old ones.

At the same time, I'm polishing off my last mods in my TMNT of Rage series, having been able to achieve 90% or so of what I was hoping to accomplish with the hack.  So, as I'm putting the finishing touches on The Final Shell Shock (mostly playtesting), I figure every so often I'll update this thread with some screenshot and protips.

And away we go...



Title Screens
Yep, they're a pain, and you don't get a lot from them gameplay-wise, but they do put a nice set of polish on a mod and really make it your own.  With a fair amount of guidance from folks as to what to look for in the code (and where to hijack), I managed to crack that one for SoR2 and published a doc (https://www.romhacking.net/documents/807/) to help others get in on that sweet title screen action, too. 

To keep it simple, there are two (likely more) paths you can take to insert your own title screen:
1) Figure out the decompression scheme and build a tool that mimics it, reverses it, and effectively injects your title screen in the same place.  I haven't messed around much with that path, as I'm not much for compression schemes and utility building, but I can tell you the decompression routine starts around $30C0 in the US rom and is used for the title screen and end credits images, plus the enemy character sprites and likely the player portraits.

2) Hijack the spot where the title screen is decompressed and pushed to VRAM and instead send an already-decompressed image from expanded rom over. That linked doc above takes a bunch of guidance from folks in this forum, plus Zophar's Domain and the Sonic Retro (https://forums.sonicretro.org/index.php?threads/help-request-title-screen-replacement-streets-of-rage-2.38776/) forums, and walks through all the logic and code to get you there.

PROTIP: The US title screen's compressed image is at $39018, while the map for the image's plane B tiles is at $38B94.  Armed with those and the palette locations (in the area of $5D34; check out the doc), plus the doc, you should be able to get a nice title screen going.  I say this because Dha Lau Hoo's put out a number of revisions to his Final Fight and Street Fighter SoR2 hacks with the help of this guide.

And with that comes my first teaser screen:
(https://files.catbox.moe/al80w8.png)

Thanks to guidance from Yoni on how to get started with Tile Layer Pro, I managed to get more colors and more pop to the TMNT logo here, as compared to my previous mods' screens.  I used TileMolestor for those, which seems easier to use but causes a fair bit of color loss when comparing the output to the original bitmap.  I've been sticking with TLP for other edits in this new hack, but more on that later.



Player Select Screen Names
Let's do one more tidbit... the Player Select screen.  So many hacks don't correct for the Max, Axel, Blaze, and Skate tiles on the screen, despite some great sprite work in the hacks themselves.  Let's pull back the curtain on that.

An old Brawler's Avenue or SoR Online forum site had some guidance on how to revise those select screen tiles, but they seem to have been lost on the interwebs vacuum when that site went down or was changed out.  Thankfully, some folks held on to a copy of the instructions.  Dha Lau Hoo was kind enough to help me out with a set, and I want to pass that on as well (hoping here I'm not being too forward).

In any event, here's a version of those instructions I've passed along to any who've asked.

Code: [Select]
Addresses:
       Upper   Lower
MAX    73EA    73F4
AXEL   73FE    7408
BLAZE  7412    741C
SKATE  7426    7430

Tile indices:
 Upper half  Lower half   
    UL   UR   LL   LR
A   00   02   01   03
B   30   32   31   33
C   34   36   35   37
D   4C   4E   4D   4F
E   04   06   05   07
F   04   06   19   1B
G   08   0A   09   0B
H           
I   0C   0E   0D   0F
J           
K   38   3A   39   3B
L   3C   3E   3D   3F
M   10   12   11   13
N           
O   14   16   15   17
P   18   1A   19   1B
Q           
R   1C   1E   1D   1F
S   20   22   21   23
T   24   26   25   27
U   28   2A   29   2B
V   2C   2E   2D   2F
W           
X   40   42   41   43
Y   44   46   45   47
Z   48   4A   49   4B
Space   3E   3E   3E   3E

No code for H, J, N, Q, and W.
For H, use 02 02, 19 03.
For J, use 3E 2A, 29 2B.
For N, use 34 02, 03 03.
For dot, use 3E 3E, 03 3E.
Alternatively, use TLP to edit the tiles, the offset is approximately $32A00.

The letters are 4 tiles each, each letter being 2x2, and duplicates used to save rom space.  Changing the offsets above to the various bytes changes your titles, so you can then rename your characters. Maximum length is 5 letters still.

The end result?
(https://files.catbox.moe/xoe978.png)



Thanks for reading, and stay tuned for more!


Hello, I made a SOR2 mod using the xmen chars, but I wanted to make the selection screen with the faces and names, but I'm a beginner in this, could you do a detailed tutorial on how to do it? Thank you.
(https://files.catbox.moe/qvdw13.bmp)
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on May 29, 2020, 01:31:31 pm
Hey, kmilloz.  Dha Lau Hoo actually already created that tutorial, which you'll find here (http://www.romhacking.net/documents/791/).  That's how I was able to get my turtle portraits into the game.

You might find one or two of these useful, too, though:
1) sor2palette.bin (https://files.catbox.moe/zvxyxb.bin)
2) sor2portraits.bin (https://files.catbox.moe/rky9q7.bin)
3) sor2tilespritemap.bin (https://files.catbox.moe/zaymxu.bin)

These are .bin files I created while working through the tutorial, but it's been a good year or so since I've done anything with them, so use at your own risk.



-----Epilogue – After the Release-----
A Brief History Lesson…
(https://files.catbox.moe/qmkwio.png)

Romhacking has been a fun process.  With each iteration I’ve developed, I’ve realized that there’s a few more things I can likely figure out and do.  And so, just like my NBA Jam TE (http://www.romhacking.net/hacks/4097/) series, one TMNT mod became another, and another, and another, each one improving more over the last, till I finally made it through The Final Shell Shock (http://www.romhacking.net/hacks/5169/).

Hopefully, you’ve some of these mods enjoyable too.  In the meantime, let’s get back to a little unfinished business…



Adding an Intro Screen

Quote
“If it ain’t broke, don’t fix it.” ~ Anonymous

I’m not the biggest fan of intro screens added to romhacks.  Unless they blend with the original spirit and style of the game, my thoughts are to leave them out.  I tried to keep that in mind when creating my NBA Jam TE (http://www.romhacking.net/hacks/4097/) mods by incorporating logos and fonts that clearly synched up with the game.  With TMNT Final (http://www.romhacking.net/hacks/5169/), given I was looking for the arcade Ninja Turtles feel, I couldn’t help but slip in an old-school “Winners Don’t Do Drugs!” logo.

(https://files.catbox.moe/powf21.png)

Other than TLP not being terribly friendly with the colors (TileMolester was again worse!), the screen itself was fairly easy to drop in using AddIntroGen (https://www.romhacking.net/utilities/1046/).  But… buyer beware… this utility is a general Genesis / Mega Drive tool not optimized for any specific game.  In using it, I found myself with two problems.

Of lesser concern, the intro only added code that exited the intro screen when pressing Start.  My preference was that it should also simply fade out to the next screen after a certain period of time, much like the SNES tutorials allow for that system.  A minor inconvenience, which I actually solved via writing some ASM (which ultimately conflicted; we’ll get to that in a bit).

Of much greater concern, something in the AddIntroGen code that the utility added reset the difficulty, lives, and stage select to values of 1 upon exiting to attract mode.  At the same time, it cleared all the values in RAM that created the high score table.  While none of that is detrimental to gameplay (settings can be changed in options), it doesn’t exactly make the game look polished at issuance.

My goal was to fix both issues.  Starting with trace logs to find where the Start button press occurred and next with research and chats on a Sega development Discord, I finally learned the value of ASM versus hex and grabbed an assembler.   I also learned a bit about the DBF function and how much time it could potentially save writing that versus commands to push 60+ bytes of data into RAM one byte at a time via the same MOVE command over and over again.  The end result was a fix to the high score table plus the default lives and difficulty values… but when incorporating those fixes with my additional code to move from the intro screen after a delay, those value were again lost in RAM.

(Oddly enough, the DBF function worked in one emulator and not another, so I ended up going the byte-by-byte route…)

I never did revise the Start button bit, as the integrity of the high score table was the more mission critical item.  For those who are curious, here is my code and some of the trace log (I ended up going with my option 3 to favor fixing the high score table over adding the intro screen delay):

Code: [Select]
;BTST is the Start button.
;BNE causes the jump to $000208, the initialization.
32:F8CC  08 00  BTST    #7,D0                   
32:F8D0  66 0C  BNE     #$0C [32:F8DE]           
;…
;Initialize the game
00:0208  4A B9  TST.L   ($00A10008)             
00:020E  66 06  BNE     #$06 [00:0216]           
00:0216  66 7C  BNE     #$7C [00:0294]           
00:0294  60 6C  BRA     #$6C [00:0302]           
00:0302  4A 79  TST.W   ($00C00004)             
00:0308  30 39  MOVE.W  ($00C00004),D0           
00:030E  08 00  BTST    #1,D0                   
00:0312  66 F4  BNE     #$F4 [00:0308]           
00:0314  4E B9  JSR     ($000015F4)             

;HIJACKS TO ADD--
;OPTION 1 - hijack start button press and add delay (does not recover hi score table)
org $32F8CC
4E F9 00 33 87 80 JMP ($00338780) - putting this at end of rom will cause the hi score table to revert to broken
org $338780
0C 42 00 60 CMPI.W #$0060,D2
66 06 BNE #$06
4E F9 00 00 02 08 JMP ($00000208)
52 42 ADDQ.W #1,D2
08 00 00 07 BTST #7,D0
67 06 BEQ #$06
4E F9 00 00 02 08 JMP ($00000208)
4E F9 00 32 F8 D2 JMP ($0032F8D2)

;OPTION 2 - remove start button press and go with delay only (does not recover hi score table)
org $32F8CC
4E F9 00 33 87 80 JMP ($00338780)
0C 42 00 60 CMPI.W #$0060,D2
66 06 BNE #$06
4E F9 00 00 02 08 JMP ($00000208)
52 42 ADDQ.W #1,D2
4E F9 00 32 F8 D2 JMP ($0032F8D2)

;DELAY ADD AT END OF INTRO SCREEN / BEFORE SEGA SCREEN
;RIGHT BEFORE SEGA LOGO
org $005924
4E F9 00 33 87 A0 JMP ($003387A0)
4E 71
;39 79 00 03 A4 A8 FF FC 39 79  MOVE.W  ($0003A4A8),$FFFC(A4)

org $3387A0
0C 42 7F FF CMPI.W #$7FFF,D2
66 0E BNE #$0E
39 79 00 03 A4 A8 FF FC 39 79  MOVE.W  ($0003A4A8),$FFFC(A4)  ; the hijacked code
4E F9 00 00 59 2C JMP ($0000592C)
52 42 ADDQ.W #1,D2
4E F9 00 33 87 A0 JMP ($003387A0); JMP to start of this code to loop

;OPTION 3 - USED
;RECOVER THE OVERWRITTEN RAM FROM THE INTRO SCREEN INSERT
org $32F8DE
4E F9 00 33 87 80 JMP ($00338780)

org $338780
31 FC 00 08 FD 06 MOVE.W #$0008,$FD06 ;lives
31 FC 00 06 FD 04 MOVE.W #$0006,$FD04 ;difficulty
20 7C 00 00 03 60 MOVE.L #$00000360,A0 ;the top high score table in rom
22 7C FF FF FD 30 MOVE.L #$FFFFFD30,A1 ; where the table is supposed to go in ram
20 3C 00 00 00 9F MOVE.L #$A0-1,D0 ;the decrement for the loop
E4 48 LSR.W #2,D0 ;a division by 4 to account for the long address
@RECOVERTABLE:
22 D8 MOVE.L (A0)+,(A1)+ ;160 bytes from $360 to $3FF need to go to $FFFFFD30 to $FFFFFDCF
51 C8 FF FC DBF D0, @RECOVERTABLE ;loop back to the label
4E F9 00 00 02 28 JMP ($00000208) ;the jump to the sega screen

;DELAY ADD AT END OF INTRO SCREEN / BEFORE SEGA SCREEN
;RIGHT BEFORE SEGA LOGO
org $005924
4E F9 00 33 87 AC JMP ($003387C0)
4E 71
;39 79 00 03 A4 A8 FF FC MOVE.W  ($0003A4A8),$FFFC(A4)

org $3387AC
0C 42 7F FF CMPI.W #$7FFF,D2
66 0E BNE #$0E
39 79 00 03 A4 A8 FF FC  MOVE.W  ($0003A4A8),$FFFC(A4)  ; the hijacked code
4E F9 00 00 59 2C JMP ($0000592C)
52 42 ADDQ.W #1,D2
4E F9 00 33 87 AC JMP ($003387AC); JMP to start of this code to loop



Thanks for reading this blog!  I may have other things I’ve learned while making these hacks and may look to slip them in from time to time as I recall them.  Otherwise, please feel free as well to keep the conversations going on this thread!  And… please be sure to try out my TMNT Final (http://www.romhacking.net/hacks/5169/) hack and give it a review!

Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: kmilloz on May 29, 2020, 01:39:55 pm
Hey, kmilloz.  Dha Lau Hoo actually already created that tutorial, which you'll find here (http://www.romhacking.net/documents/791/).  That's how I was able to get my turtle portraits into the game.

You might find one or two of these useful, too, though:
1) sor2palette.bin (https://files.catbox.moe/zvxyxb.bin)
2) sor2portraits.bin (https://files.catbox.moe/rky9q7.bin)
3) sor2tilespritemap.bin (https://files.catbox.moe/zaymxu.bin)

These are .bin files I created while working through the tutorial, but it's been a good year or so since I've done anything with them, so use at your own risk.



-----Epilogue – After the Release-----
A Brief History Lesson…
(https://files.catbox.moe/qmkwio.png)

Romhacking has been a fun process.  With each iteration I’ve developed, I’ve realized that there’s a few more things I can likely figure out and do.  And so, just like my NBA Jam TE (http://www.romhacking.net/hacks/4097/) series, one TMNT mod became another, and another, and another, each one improving more over the last, till I finally made it through The Final Shell Shock (http://www.romhacking.net/hacks/5169/).

Hopefully, you’ve some of these mods enjoyable too.  In the meantime, let’s get back to a little unfinished business…



Adding an Intro Screen

I’m not the biggest fan of intro screens added to romhacks.  Unless they blend with the original spirit and style of the game, my thoughts are to leave them out.  I tried to keep that in mind when creating my NBA Jam TE (http://www.romhacking.net/hacks/4097/) mods by incorporating logos and fonts that clearly synched up with the game.  With TMNT Final (http://www.romhacking.net/hacks/5169/), given I was looking for the arcade Ninja Turtles feel, I couldn’t help but slip in an old-school “Winners Don’t Do Drugs!” logo.

(https://files.catbox.moe/powf21.png)

Other than TLP not being terribly friendly with the colors (TileMolester was again worse!), the screen itself was fairly easy to drop in using AddIntroGen (https://www.romhacking.net/utilities/1046/).  But… buyer beware… this utility is a general Genesis / Mega Drive tool not optimized for any specific game.  In using it, I found myself with two problems.

Of lesser concern, the intro only added code that exited the intro screen when pressing Start.  My preference was that it should also simply fade out to the next screen after a certain period of time, much like the SNES tutorials allow for that system.  A minor inconvenience, which I actually solved via writing some ASM (which ultimately conflicted; we’ll get to that in a bit).

Of much greater concern, something in the AddIntroGen code that the utility added reset the difficulty, lives, and stage select to values of 1 upon exiting to attract mode.  At the same time, it cleared all the values in RAM that created the high score table.  While none of that is detrimental to gameplay (settings can be changed in options), it doesn’t exactly make the game look polished at issuance.

My goal was to fix both issues.  Starting with trace logs to find where the Start button press occurred and next with research and chats on a Sega development Discord, I finally learned the value of ASM versus hex and grabbed an assembler.   I also learned a bit about the DBF function and how much time it could potentially save writing that versus commands to push 60+ bytes of data into RAM one byte at a time via the same MOVE command over and over again.  The end result was a fix to the high score table plus the default lives and difficulty values… but when incorporating those fixes with my additional code to move from the intro screen after a delay, those value were again lost in RAM.

(Oddly enough, the DBF function worked in one emulator and not another, so I ended up going the byte-by-byte route…)

I never did revise the Start button bit, as the integrity of the high score table was the more mission critical item.  For those who are curious, here is my code and some of the trace log (I ended up going with my option 3 to favor fixing the high score table over adding the intro screen delay):

Code: [Select]
;BTST is the Start button.
;BNE causes the jump to $000208, the initialization.
32:F8CC  08 00  BTST    #7,D0                   
32:F8D0  66 0C  BNE     #$0C [32:F8DE]           
;…
;Initialize the game
00:0208  4A B9  TST.L   ($00A10008)             
00:020E  66 06  BNE     #$06 [00:0216]           
00:0216  66 7C  BNE     #$7C [00:0294]           
00:0294  60 6C  BRA     #$6C [00:0302]           
00:0302  4A 79  TST.W   ($00C00004)             
00:0308  30 39  MOVE.W  ($00C00004),D0           
00:030E  08 00  BTST    #1,D0                   
00:0312  66 F4  BNE     #$F4 [00:0308]           
00:0314  4E B9  JSR     ($000015F4)             

;HIJACKS TO ADD--
;OPTION 1 - hijack start button press and add delay (does not recover hi score table)
org $32F8CC
4E F9 00 33 87 80 JMP ($00338780) - putting this at end of rom will cause the hi score table to revert to broken
org $338780
0C 42 00 60 CMPI.W #$0060,D2
66 06 BNE #$06
4E F9 00 00 02 08 JMP ($00000208)
52 42 ADDQ.W #1,D2
08 00 00 07 BTST #7,D0
67 06 BEQ #$06
4E F9 00 00 02 08 JMP ($00000208)
4E F9 00 32 F8 D2 JMP ($0032F8D2)

;OPTION 2 - remove start button press and go with delay only (does not recover hi score table)
org $32F8CC
4E F9 00 33 87 80 JMP ($00338780)
0C 42 00 60 CMPI.W #$0060,D2
66 06 BNE #$06
4E F9 00 00 02 08 JMP ($00000208)
52 42 ADDQ.W #1,D2
4E F9 00 32 F8 D2 JMP ($0032F8D2)

;DELAY ADD AT END OF INTRO SCREEN / BEFORE SEGA SCREEN
;RIGHT BEFORE SEGA LOGO
org $005924
4E F9 00 33 87 A0 JMP ($003387A0)
4E 71
;39 79 00 03 A4 A8 FF FC 39 79  MOVE.W  ($0003A4A8),$FFFC(A4)

org $3387A0
0C 42 7F FF CMPI.W #$7FFF,D2
66 0E BNE #$0E
39 79 00 03 A4 A8 FF FC 39 79  MOVE.W  ($0003A4A8),$FFFC(A4)  ; the hijacked code
4E F9 00 00 59 2C JMP ($0000592C)
52 42 ADDQ.W #1,D2
4E F9 00 33 87 A0 JMP ($003387A0); JMP to start of this code to loop

;OPTION 3 - USED
;RECOVER THE OVERWRITTEN RAM FROM THE INTRO SCREEN INSERT
org $32F8DE
4E F9 00 33 87 80 JMP ($00338780)

org $338780
31 FC 00 08 FD 06 MOVE.W #$0008,$FD06 ;lives
31 FC 00 06 FD 04 MOVE.W #$0006,$FD04 ;difficulty
20 7C 00 00 03 60 MOVE.L #$00000360,A0 ;the top high score table in rom
22 7C FF FF FD 30 MOVE.L #$FFFFFD30,A1 ; where the table is supposed to go in ram
20 3C 00 00 00 9F MOVE.L #$A0-1,D0 ;the decrement for the loop
E4 48 LSR.W #2,D0 ;a division by 4 to account for the long address
@RECOVERTABLE:
22 D8 MOVE.L (A0)+,(A1)+ ;160 bytes from $360 to $3FF need to go to $FFFFFD30 to $FFFFFDCF
51 C8 FF FC DBF D0, @RECOVERTABLE ;loop back to the label
4E F9 00 00 02 28 JMP ($00000208) ;the jump to the sega screen

;DELAY ADD AT END OF INTRO SCREEN / BEFORE SEGA SCREEN
;RIGHT BEFORE SEGA LOGO
org $005924
4E F9 00 33 87 AC JMP ($003387C0)
4E 71
;39 79 00 03 A4 A8 FF FC MOVE.W  ($0003A4A8),$FFFC(A4)

org $3387AC
0C 42 7F FF CMPI.W #$7FFF,D2
66 0E BNE #$0E
39 79 00 03 A4 A8 FF FC  MOVE.W  ($0003A4A8),$FFFC(A4)  ; the hijacked code
4E F9 00 00 59 2C JMP ($0000592C)
52 42 ADDQ.W #1,D2
4E F9 00 33 87 AC JMP ($003387AC); JMP to start of this code to loop



Thanks for reading this blog!  I may have other things I’ve learned while making these hacks and may look to slip them in from time to time as I recall them.  Otherwise, please feel free as well to keep the conversations going on this thread!  And… please be sure to try out my TMNT Final (http://www.romhacking.net/hacks/5169/) hack and give it a review!

thanks I'll try
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on June 13, 2020, 09:29:20 am
Clarification
Quote
NOTE: The .zip file for this hack contains two .ips files: the  Final Shell Shock patch being playable on all hardware and in all emulators, with the Re-Shelled add-on allowing players a better sound experience when using the Terraonion MegaSD cartridge. Be sure to first patch a copy of your SoR2 rom with the Final Shell Shock patch to begin your TMNT experience.

I've gotten a few messages or seen a few notes this past couple weeks about some folks not being able to hear music when playing the game.  Let's fix that...

Are you playing the game in a Windows or Android-based emulator, including a Raspberry Pi?  If yes, do not apply the Re-Shelled patch.  Only apply the Final Shell Shock patch.

Are you playing the game using Terraonion's MegaSD cartridge?  The Re-Shelled patch is designed to allow you to hook the music tracks to new music, which you have to download and put on the same memory card that holds the .md Re-Shelled ROM.

First, apply the Final Shell Shock patch to a clean SoR2 ROM.  Then, apply the Re-Shelled patch to the same ROM.

You also need a .cue sheet and new music.  Download the .zip file with the music from MEGA.  Use this link: https://mega.nz/#!nB0z0SRC!2dJ9bYE3fo58F4ZkptIPSsOp_5tF2f0i9pXemTw4vqc (https://mega.nz/#!nB0z0SRC!2dJ9bYE3fo58F4ZkptIPSsOp_5tF2f0i9pXemTw4vqc)

For more instructions on how to get MD+ functionality on your MegaSD cartridge, please visit the Terraonion website (https://terraonion.com/en/producto/megasd/) or Zeldix (https://www.zeldix.net/).

MD+ functionality does not work on another current emulator in the wild... yet.  In the meantime, please be sure to try out that solo Final Shell Shock patch!


Shameless Plugs
Not sure you want to try out the game?  Why not take a look at a few gameplay videos?

https://www.youtube.com/watch?v=YXavDYoYGQ8 (https://www.youtube.com/watch?v=YXavDYoYGQ8)

https://www.youtube.com/watch?v=cIj0wLJWlhM (https://www.youtube.com/watch?v=cIj0wLJWlhM)

This dude had some fun with the music... perhaps they made their own .cue sheet for the MegaSD?
https://www.youtube.com/watch?v=m0jxhNBrVTg (https://www.youtube.com/watch?v=m0jxhNBrVTg)

Looks like there might be a live stream of gameplay June 18th?
https://www.youtube.com/watch?v=YN9yc8NbAfg (https://www.youtube.com/watch?v=YN9yc8NbAfg)


Love them turtles and think the two worlds mesh together pretty well?  Hate the game with a passion and think I ruined your childhood?  Why not put up a review on RHDN? (http://www.romhacking.net/hacks/5169/)

Thanks again for reading... and playing!
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: kaine23 on June 16, 2020, 08:47:17 am
I love this! Recently finished doing runs with all 4 turtles on streams. i wrote a review of this hack here:
https://kainetertainment.home.blog/2020/06/01/tmnt-of-rage-the-final-shell-shock-streets-of-rage-2-hack/
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on December 23, 2020, 11:03:29 pm
Aftermath
Having finalized and issued my NBA Jam 2K21 TE (http://www.romhacking.net/hacks/5585/) hack, I decided to take one more look at my TMNT Final (http://www.romhacking.net/hacks/5169/) mod, since it had been a while since I'd done a playthrough.  To be honest, I didn't think the reviews on the RHDN project page (http://www.romhacking.net/hacks/5169/) did the game as much justice to all the improvements as I'd hoped, as some of the items were more reviewer preference versus consideration/contemplation of artistic choice, but I did want to have a go at rectifying a couple items that had bothered me since the release.

For starters, I re-did the Re-Shelled patch, such that you no longer need to apply it to the TMNT Final one.  Now it's much clearer as to the purpose of each patch: If you want to use MD+ functionality with the Terraonion MegaSD, use the Re-Shelled patch.  If you don't have a MegaSD, go with TMNT Final.  One SoR2 rom, one patch. 

My next nit was with those moves that just didn't work, particularly in Raph's move set.  (Man, being a Mike fan, I did not realize how many Raph fans are out there!!!)  There had been an issue with Pancake 2 that I just couldn't resolve, in major part because I didn't have enough experience with or understanding of resizing animations and the resizer template.

With some brute force trial and error, and some guidance from savok, I recreated a resizer template for Raph based on what was currently in Pancake 2, but the goal being to force the application to open up hit box selection for those moves where either a weapon was held or a charge was performed. 

Based on a couple hours of trial and error, I landed on this:

Code: [Select]
4 0
4 0
6 0
5 0
1 0
-5 0
1 0
-7 0
4 0
4 0
1 0
1 0
4 0
2 0
1 0
1 0
-16 0
1 0
5 0
5 0
4 0
3 0
2 0
-11 0
7 0 1
8 0 1
5 0 1
1 0 1
1 0 1
4 0 1
7 0 1
7 0 1
-32 0 1
1 0 1
2 0 1
9 0 1
11 0 1
10 0 1
4 0 1
-25 0 0
4 0 0
2 0 0
3 0 1
3 0 1
4 0 0
-44 0 1
-44 0 1
-44 0 0
-44 0 0
-32 0 1

The problem then became that the resizer crashed Pancake 2 v1.6 every time I tried to load it.  Thankfully, after pushing the resizer into a test rom several times using v1.5, I finally caught a break... and Raph could now use his charge moves, as well as attack after confiscating a weapon.

(Note: The weapon confiscation is an artistic choice.  Why do the TMNT need to use weapons when they have their own?  So instead, they clean up the streets of these weapons, sheathing them upon pickup, with the option to still throw them at enemies as well.)

The updated patches are currently in the submission queue, so please be sure to check the project page over the next number of days to pick up those updates.  Feel free to continue to provide your thoughts as well, and thanks to all of you who've read this, tried out the game, and otherwise showed some love by letting others know it's out there! :beer:
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: M2_Game_Developer on February 06, 2021, 05:55:47 pm
Hey, kmilloz.  Dha Lau Hoo actually already created that tutorial, which you'll find here (http://www.romhacking.net/documents/791/).  That's how I was able to get my turtle portraits into the game.

You might find one or two of these useful, too, though:
1) sor2palette.bin (https://files.catbox.moe/zvxyxb.bin)
2) sor2portraits.bin (https://files.catbox.moe/rky9q7.bin)
3) sor2tilespritemap.bin (https://files.catbox.moe/zaymxu.bin)

These are .bin files I created while working through the tutorial, but it's been a good year or so since I've done anything with them, so use at your own risk.



-----Epilogue – After the Release-----
A Brief History Lesson…
(https://files.catbox.moe/qmkwio.png)

Romhacking has been a fun process.  With each iteration I’ve developed, I’ve realized that there’s a few more things I can likely figure out and do.  And so, just like my NBA Jam TE (http://www.romhacking.net/hacks/4097/) series, one TMNT mod became another, and another, and another, each one improving more over the last, till I finally made it through The Final Shell Shock (http://www.romhacking.net/hacks/5169/).

Hopefully, you’ve some of these mods enjoyable too.  In the meantime, let’s get back to a little unfinished business…



Adding an Intro Screen

I’m not the biggest fan of intro screens added to romhacks.  Unless they blend with the original spirit and style of the game, my thoughts are to leave them out.  I tried to keep that in mind when creating my NBA Jam TE (http://www.romhacking.net/hacks/4097/) mods by incorporating logos and fonts that clearly synched up with the game.  With TMNT Final (http://www.romhacking.net/hacks/5169/), given I was looking for the arcade Ninja Turtles feel, I couldn’t help but slip in an old-school “Winners Don’t Do Drugs!” logo.

(https://files.catbox.moe/powf21.png)

Other than TLP not being terribly friendly with the colors (TileMolester was again worse!), the screen itself was fairly easy to drop in using AddIntroGen (https://www.romhacking.net/utilities/1046/).  But… buyer beware… this utility is a general Genesis / Mega Drive tool not optimized for any specific game.  In using it, I found myself with two problems.

Of lesser concern, the intro only added code that exited the intro screen when pressing Start.  My preference was that it should also simply fade out to the next screen after a certain period of time, much like the SNES tutorials allow for that system.  A minor inconvenience, which I actually solved via writing some ASM (which ultimately conflicted; we’ll get to that in a bit).

Of much greater concern, something in the AddIntroGen code that the utility added reset the difficulty, lives, and stage select to values of 1 upon exiting to attract mode.  At the same time, it cleared all the values in RAM that created the high score table.  While none of that is detrimental to gameplay (settings can be changed in options), it doesn’t exactly make the game look polished at issuance.

My goal was to fix both issues.  Starting with trace logs to find where the Start button press occurred and next with research and chats on a Sega development Discord, I finally learned the value of ASM versus hex and grabbed an assembler.   I also learned a bit about the DBF function and how much time it could potentially save writing that versus commands to push 60+ bytes of data into RAM one byte at a time via the same MOVE command over and over again.  The end result was a fix to the high score table plus the default lives and difficulty values… but when incorporating those fixes with my additional code to move from the intro screen after a delay, those value were again lost in RAM.

(Oddly enough, the DBF function worked in one emulator and not another, so I ended up going the byte-by-byte route…)

I never did revise the Start button bit, as the integrity of the high score table was the more mission critical item.  For those who are curious, here is my code and some of the trace log (I ended up going with my option 3 to favor fixing the high score table over adding the intro screen delay):

Code: [Select]
;BTST is the Start button.
;BNE causes the jump to $000208, the initialization.
32:F8CC  08 00  BTST    #7,D0                   
32:F8D0  66 0C  BNE     #$0C [32:F8DE]           
;…
;Initialize the game
00:0208  4A B9  TST.L   ($00A10008)             
00:020E  66 06  BNE     #$06 [00:0216]           
00:0216  66 7C  BNE     #$7C [00:0294]           
00:0294  60 6C  BRA     #$6C [00:0302]           
00:0302  4A 79  TST.W   ($00C00004)             
00:0308  30 39  MOVE.W  ($00C00004),D0           
00:030E  08 00  BTST    #1,D0                   
00:0312  66 F4  BNE     #$F4 [00:0308]           
00:0314  4E B9  JSR     ($000015F4)             

;HIJACKS TO ADD--
;OPTION 1 - hijack start button press and add delay (does not recover hi score table)
org $32F8CC
4E F9 00 33 87 80 JMP ($00338780) - putting this at end of rom will cause the hi score table to revert to broken
org $338780
0C 42 00 60 CMPI.W #$0060,D2
66 06 BNE #$06
4E F9 00 00 02 08 JMP ($00000208)
52 42 ADDQ.W #1,D2
08 00 00 07 BTST #7,D0
67 06 BEQ #$06
4E F9 00 00 02 08 JMP ($00000208)
4E F9 00 32 F8 D2 JMP ($0032F8D2)

;OPTION 2 - remove start button press and go with delay only (does not recover hi score table)
org $32F8CC
4E F9 00 33 87 80 JMP ($00338780)
0C 42 00 60 CMPI.W #$0060,D2
66 06 BNE #$06
4E F9 00 00 02 08 JMP ($00000208)
52 42 ADDQ.W #1,D2
4E F9 00 32 F8 D2 JMP ($0032F8D2)

;DELAY ADD AT END OF INTRO SCREEN / BEFORE SEGA SCREEN
;RIGHT BEFORE SEGA LOGO
org $005924
4E F9 00 33 87 A0 JMP ($003387A0)
4E 71
;39 79 00 03 A4 A8 FF FC 39 79  MOVE.W  ($0003A4A8),$FFFC(A4)

org $3387A0
0C 42 7F FF CMPI.W #$7FFF,D2
66 0E BNE #$0E
39 79 00 03 A4 A8 FF FC 39 79  MOVE.W  ($0003A4A8),$FFFC(A4)  ; the hijacked code
4E F9 00 00 59 2C JMP ($0000592C)
52 42 ADDQ.W #1,D2
4E F9 00 33 87 A0 JMP ($003387A0); JMP to start of this code to loop

;OPTION 3 - USED
;RECOVER THE OVERWRITTEN RAM FROM THE INTRO SCREEN INSERT
org $32F8DE
4E F9 00 33 87 80 JMP ($00338780)

org $338780
31 FC 00 08 FD 06 MOVE.W #$0008,$FD06 ;lives
31 FC 00 06 FD 04 MOVE.W #$0006,$FD04 ;difficulty
20 7C 00 00 03 60 MOVE.L #$00000360,A0 ;the top high score table in rom
22 7C FF FF FD 30 MOVE.L #$FFFFFD30,A1 ; where the table is supposed to go in ram
20 3C 00 00 00 9F MOVE.L #$A0-1,D0 ;the decrement for the loop
E4 48 LSR.W #2,D0 ;a division by 4 to account for the long address
@RECOVERTABLE:
22 D8 MOVE.L (A0)+,(A1)+ ;160 bytes from $360 to $3FF need to go to $FFFFFD30 to $FFFFFDCF
51 C8 FF FC DBF D0, @RECOVERTABLE ;loop back to the label
4E F9 00 00 02 28 JMP ($00000208) ;the jump to the sega screen

;DELAY ADD AT END OF INTRO SCREEN / BEFORE SEGA SCREEN
;RIGHT BEFORE SEGA LOGO
org $005924
4E F9 00 33 87 AC JMP ($003387C0)
4E 71
;39 79 00 03 A4 A8 FF FC MOVE.W  ($0003A4A8),$FFFC(A4)

org $3387AC
0C 42 7F FF CMPI.W #$7FFF,D2
66 0E BNE #$0E
39 79 00 03 A4 A8 FF FC  MOVE.W  ($0003A4A8),$FFFC(A4)  ; the hijacked code
4E F9 00 00 59 2C JMP ($0000592C)
52 42 ADDQ.W #1,D2
4E F9 00 33 87 AC JMP ($003387AC); JMP to start of this code to loop



Thanks for reading this blog!  I may have other things I’ve learned while making these hacks and may look to slip them in from time to time as I recall them.  Otherwise, please feel free as well to keep the conversations going on this thread!  And… please be sure to try out my TMNT Final (http://www.romhacking.net/hacks/5169/) hack and give it a review!

I'm friends with Ayano Koshiro, program lead of the original Streets of Rage 2, and we enjoy some of these hacks!

I was hoping to ask some questions and we play around with some creative romhacking of our own. Please let us know if you are interested in inquiries we have. Thank you!
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on February 26, 2021, 04:20:19 pm
Unfinished Business
Quote
Even though you put in a whole new title screen, 6 new ending images, pizza icon, Bebop and Rocksteady, the Shredder, new sounds... you don't have foot soldiers, and you refuse to do it... so no, I don't recommend your game.  It’s just a beta, nothing interesting...

OK, so that quote's a bit of an exaggeration for fun on my part, but c'mon... foot soldiers?  That makes or breaks the immersive feel of a game???


PROTIP: When reading reviews, always consider what you know about your reviewers based on their profiles.  Check your reviewers' contributions.  If they haven't evidenced they've done a reasonable amount of romhacking, and they're giving you negative reviews, assume they may not understand the level of effort necessary to turn a game into your vision and go back to enjoying making your visions come true... with thicker skin...


Putting that and the spam bots / fake accounts aside, I have seen the question about feasibility of foot soldiers come up every now and then, so let's dig into what it takes to change out enemies in Streets of Rage 2.

Why do romhackers tend not to do it?  My personal opinion?  Because it's a lot of work and not a lot of payoff.  You see, Pancake 2 generously allows modders to take the original rom and edit the four protagonists plus a handful of the bosses.  But… all other enemies are compressed within the rom, and Pancake 2 does not provide for the decompression, alteration, re-compression, and insertion of new enemy sprites.  It allows you to work with uncompressed sprites.  And that’s a lot to be permitted to do!

Meanwhile, your basic enemies (Galsia/Donovan, the Signals, etc.) are compressed.  You could get your hands on that awesome Syndicate Wars hack and use it with Pancake 2 to modify those enemies, but what if your vision isn't to have all enemies be playable, or you don't want to introduce some of the softlocking bugs that modified rom has?

That brings us back to the original rom and Pancake 2.  You could get your hands on the compression and decompression routines by debugging the game (one such sequence is at $30C0), but 1) that's a lot of work to put into generating a new basic enemy, and 2) not everyone knows how to read and reverse compression routines (nor might they be motivated to do so just for a foot solider).  I myself fall into the category of not having a clue.

This next part is all theory, so feel free to try it, add theory to this blog, show your progress, share your newfound knowledge, etc., but here's one process by which you can probably get foot soldiers or some other enemy type in the rom.

1) Obtain and decrypt the enemy sprite tiles.  If you know the location of those sprites, you can use Pancake 2 and decompress and output the sprite tiles to a .bin file.  You can very likely find the location of the enemy you want using that archived SOR Online site (https://web.archive.org/web/20160214070209/http://www.soronline.net/sor2.htm).

2) With Galsia, if you open the .bin Pancake 2 gave you in Tile Layer Pro, and if you use the typical player palette, you'll get something like this.

(https://files.catbox.moe/gb6yqb.PNG)

This is where I throw my hands up and say "pass".  No can do, buckaroo!  If you're a good pixel artist and good with puzzles or the tile arranger in Tile Layer Pro, your next step is to

3) Find or make some good foot soldier sprites that use similar positions and animations as Galsia, and paste 8x8 tiles of them in the proper spots over the Galsia tiles above.

Here's a possible setback... Galsia and Donovan share the same bottom halves of their bodies.  The minute you change one, you're changing both.  Maybe you go with Y. Signal instead?  Up to you, but Galsia requires the least amount of edits, as he has the least amount of sprites.

One more challenge.  What will you do about palettes?  They follow the same ones as your protagonists, so you may not be guaranteeing yourself a purple foot soldier.  You'll need to dig out the palettes and perhaps how the code switches them and determine what can be done there. 

4) Let's say you now have your .bin with all foot solider tiles.  Kudos to you!  Let's get it into the game!

...
...
...

How???

Recall that Pancake 2 does not allow you to re-insert this tile set.  You need another way.

Enter Sharpnull's compressor. (https://www.romhacking.net/forum/index.php?topic=30593.msg394977#msg394977)


PROTIP: Always re-read blogs and forum posts that you find interesting.  You'll find some stuff in there, even if you're not working on that specific project... yet.


Remember in my previous posts that I needed a way to get my ending sequence images into TMNT Remix and TMNT Final?  I used that compressor, but for a different purpose than it was originally designed for, knowing that the compression routine for enemies, title screen, and ending images are the same.  That compressor's original purpose was to compress and re-insert enemies.  So go do that!

Quick caveat: Months ago, as a test, I took that Decompressed Galsia.bin above, and - as a proof in concept - used the compressor to insert those tiles back into the game.  The idea was to see that all the pixels landed in the same place, such that the compressor works.  And indeed... it does work.  (To prove it actually inserted the images, I put beards on all the Galsia faces to verify the file insertion.)  But... on at least one animation, part of Galsia's head (I think mostly the hair, maybe 3-4 vertically aligned pixels) end up 3-4 pixels to the left or right of where they're supposed to be.

What does this mean?  It means you'll be able to fit Galsia (or your foot soldier) back into the game, but you're going to need to edit at least one tile such that you only use transparent colors on part of the head, just so the pixels can't be seen as out of place.  You may have a lopsided lookin’ footsolider if you don’t then correct his head!

After all that… I think you’re done.  You now have a foot soldier in your game.

So… after reading all of the above, don't you want to go out there and make some new minions for your Streets of Rage 2 hacks???

[INSERT CRICKET SOUNDS]
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: kaine23 on February 26, 2021, 04:26:01 pm
between this and tmnt sor project this is my fav of the 2. i would love to see some foot around if it was possible.
Title: Re: TMNT of Rage - The Final Shell Shock (A Streets of Rage 2 Hacking Progress Blog)
Post by: eskayelle on February 26, 2021, 11:58:05 pm
Definitely appreciate that!  I'm obviously partial to TMNT Final as well, given all the time I put in to get it to fruition, but savok did a helluva job on the TMNT Streets animations, and it was fun to lend a hand with the title screen, end credits, other programming bits, and working title.  I always enjoy a good collab!

I'd like to create a foot soldier enemy eventually, but you can see the hurdles we're all up against there.  There's such a thing as diminishing returns, and it's evident for this one.



More Unfinished Business
Remember that TMNT Kaizo (http://www.romhacking.net/forum/index.php?topic=30593.msg393849#msg393849) custom code I was trying to develop to create an opening puzzle in the game?  Sometimes, you just need to get back to fundamentals, i.e., debugging and running breakpoints to give yourself a fresh look at what the code is actually doing versus what you expected it to do (thanks to Tony H. for providing that reminder over on the Help Wanted forum).

So... it turns out the increment that I created in the code tends to double, so my comparison value for player 2 was off by at least 50%.  The other tidbit I needed to rethink is that these increments to player 1 and 2 happen regardless of whether a 1-player or 2-player game is running.  By fixing the player 2 dilemma, and getting it to set itself to one health point only on the first life, I ended up breaking the player 1 code because it was trying to use increments not meant for it. 

I jumped into the disassembly to search for a RAM value that flagged when two players were present versus one.  While there's no flag that consistently does this, I was able to use the RAM offset $FFFC18 & 19, which denotes when a 2-player game is selected.  If a turtle jumps into a one-player game, that flag isn't set, but I was able to work around that just enough to have my original puzzle in place.

Grab the v1.666 Kaizo patch here (http://www.romhacking.net/hacks/5040/).  In the meantime, here's the code:
Code: [Select]
;=========================================
;Streets of Rage 2
;Initial Health Code Modifications v9
;by eskayelle, 2/27/2021
;=========================================

;-----------------------------------------
;Purpose: Hijack the code before the 1st
;stage starts and send it to another area
;in ROM to add functionality to two more
;RAM bytes.
;-----------------------------------------
org $00005CBE ;offset to hijack
; lea ($00005D74),A6 ;4D F9 00 00 5D 74 ;original (hijacked) $5CBE code
jsr $00024E00 ;4E B9 00 02 4E 00 ;jump to new code location

;-----------------------------------------
;Purpose: Set two unused RAM bytes to zero
;before a game (stage 1) starts. 
;These bytes will be changed so the health
;value increases to 0x68 whenever a player
;dies, but the very first life should have
;a health value much less than the default
;0x68.
;-----------------------------------------
org $00024E00 ;offset to hijack
move.b #$00,$F0BE ;11 FC 00 00 F0 BE ;create a player 1 parameter (1 byte)
move.b #$00,$F0BF ;11 FC 00 00 F0 BF ;create a player 2 parameter (1 byte)
lea ($00005D74),A6 ;4D F9 00 00 5D 74 ;original (hijacked) $5CBE code
rts ;4E 75 ;return to hijacked location and continue code

;-----------------------------------------
;Purpose: The byte with the initial health
;value is at offset $7EC8.
;Need to modify this code to split the
;commands such that the initial value is
;reduced, but all lives after receive a
;larger health value (the old 0x68).
;-----------------------------------------
org $00007EC8 ;offset to hijack
; move.w #$0068,$0080(A2) ;35 7C 00 68 00 80 ;this is the original code at $7EC8
jsr $00024E50 ;4E B9 00 02 4E 50 ;jump to new code location

org $00024E50 ;new code to split out 0x68 health per player after death
addq.b,#1,$F0BE ;52 38 F0 BE ;increment new player 1 byte
cmpi.b,#$01,$FC18 ;0C 38 00 01 FC 19 ;$FFFC18 is the 2 player game flag
bne.s no2p ;66 04 ;if that flag is not set, ignore incrementing player 2 byte
addq.b,#1,$F0BF ;52 38 F0 BF ;increment new player 2 byte
no2p:
cmpi.b #$01,$F0BE ;0C 38 00 01 F0 BE ;P1 RAM byte should be #$01 the first stage, first life
beq.s splithealth ;67 18 ;if equals #$01, give #$01 in health; else, give health of #$68
;it'll always increment up, so you'd need more than 256 deaths to roll this

cmpi.b #$01,$FC18 ;0C 38 00 01 FC 19 ;$FFFC18 is the 2 player game flag
bne.s stillno2p ;66 08 ;if that flag is not set, ignore doing any comparison work

cmpi.b #$02,$F0BF ;0C 38 00 02 F0 BF ;P2 RAM byte should be #$02 the first stage, first life
beq.s splithealth ;67 08 ;if equals #$02, give #$01 in health; else, give health of #$68
;in a two player game, starting value will be #$02
;in a two player game, where player 2 joined into one one player game,
;starting value will be #$00, and it'll never increment;
;rather, both players will share $F0BE
;in a one player game, starting value will be #$00, and it'll never increment

stillno2p:
move.w #$0068,$0080(A2) ;35 7C 00 68 00 80 ;this is the original code at $7EC8
rts ;4E 75 ;looking to jump back to $7ECE -- clr.w $00A8(A2)

splithealth:
; move.b #$68,$EF81 ;11 FC 00 68 EF 81 ;$EF81 appears to be where the default health value comes from; but $F081 is for player 2
; move.w #$0068,$0080(A2) ;35 7C 00 68 00 80 ;this is the original code at $7EC8; seems to do almost the same thing my code above would have
move.w #$0001,$0080(A2) ;35 7C 00 01 00 80 ;change #$68 to a lower number, so when $F0BE or $F0BF = #$01, that player starts game with less life
rts ;4E 75 ;looking to jump back to $7ECE -- clr.w $00A8(A2)

;-----------------NOTES--------------------
;FFEFA9 and FFF0A9 are the life counters
;FFEF80 is the total health value (max).
;$7ECB is the offset for how high health can go.
;FFFC18 (a two-byte value, so really FFFC19) determines 1P game or 2P.
;But... that FFFC19 flag won't set if P2 joins in on a 1P game!
;
;Try FFFFF0BE and FFFFF0BF as unused RAM...
;
;...
;
;7EC8 move.w #$0068,$0080(A2) ;this is the original code for the default life points
;7ECE clr.w $00A8(A2) ;this is where I want the hijack to come back to
;7ED2 bra $00C6 [00:7F9A]
;
;...
;-------------------------------------------