When Super Mario met Super Hang-On

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,650CR
OK, so I've been spending some time recently reversing the Z80 code in Super Hang-On that drives the YM2151 sound chip in an attempt to better understand the tune structure and learn how to program the YM sound chip. I needed a tune to practice my new found skills with so what better than to take my favourite console character's signature tune and blend it into the code of my second favourite cab. The end result is :-

http://youtu.be/Y1OoF3HfUms

I need to thank mariopiano.com for the sheet music for the overworld theme, without which none of this would be possible.

The tune itself is about 3 minutes 12 seconds long and includes the game over tune at the very end. If you're half decent at Super Hang-On you should be able to get to the goal line just as the tune finishes (which would be good as it doesn't loop when it ends so if you don't make it to the goal line by the time it ends you'll be racing the final few seconds in silence!)

Every single byte of the tune had to be hand hex-edited into the rom image, it wasn't a particularly fun task but I think the end result is non too shabby. Just need a jump button for the bike now to jump over the other bikes!

If you want to try it yourself in MAME then you can download the edited rom below. MAME will complain that the CRC is wrong on the rom but will still run.

http://homepage.ntlworld.com/cmonkey/epr-10649c.88.zip
 

Alpha1

Do the Shake and 'VAC
Staff member
vacBacker
Feedback
95 (99%)
Credits
5,402CR
Very well done my friend! I really like that. So what's next?
smiley1.gif
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,650CR
Thanks for kind words guys!

@alpha1 - I think a rest is in order next, after the amount of time I crazily put into this mad endeavour!

@Equites - Hey Nad! How's things? Have you found me a nice condition Super Hang-On cab yet? lol The SHO reversing is coming along nicely, as this proves I guess! The sub-cpu code is completely reversed to the point that I can now re-assemble the source back to an exact binary image of the original eproms. The Z80 sound code is about 50% done (YM2151 code done, PCM sample code not done). The main cpu code is about 30-40% done, that'll be the big one. It's a thankless task and some days very little progress is made but it keeps me off the streets I guess!

@IDChappy - I agree, totally nuts!
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,650CR
I adore Super Hang-On! It's my second favourite cab after my beloved Out Run. And one day I WILL own my own Super Hang-On cab, no matter how long it takes.

I also like Mario games and needed a tune to practice what I'd learned in reversing the tune structure so I thought I'd implant the overworld theme into SHO just to prove to myself that I'd understood the structure of the tune well enough. It appears to have worked somewhat. One day I might transplant Splash Wave from Out Run into SHO, but at the moment I'm moving on to understanding the PCM sampled sound playback code so that I can implement percussion sounds in the next tune.

I also like a challenge, which is why I've decided to fully reverse, and more importantly, fully understand SHO.

Crazy, I know! That's me!
 

Alpha1

Do the Shake and 'VAC
Staff member
vacBacker
Feedback
95 (99%)
Credits
5,402CR
Hey dude nice work - looking forward to your next projects.

On a side note if you can make it play 'Club Tropicana' i'll personally Paypal you £50
 

Alpha1

Do the Shake and 'VAC
Staff member
vacBacker
Feedback
95 (99%)
Credits
5,402CR
cmonkey said:
Thanks for kind words guys!

@alpha1 - I think a rest is in order next, after the amount of time I crazily put into this mad endeavour!

@Equites - Hey Nad! How's things? Have you found me a nice condition Super Hang-On cab yet? lol The SHO reversing is coming along nicely, as this proves I guess! The sub-cpu code is completely reversed to the point that I can now re-assemble the source back to an exact binary image of the original eproms. The Z80 sound code is about 50% done (YM2151 code done, PCM sample code not done). The main cpu code is about 30-40% done, that'll be the big one. It's a thankless task and some days very little progress is made but it keeps me off the streets I guess!

@IDChappy - I agree, totally nuts!

Wow - missed this post! You are one clever dude!
 

Equites

Chief Sheesher®
vacBacker
Feedback
35 (100%)
Credits
3,309CR
cmonkey said:
@Equites - Hey Nad! How's things? Have you found me a nice condition Super Hang-On cab yet? lol The SHO reversing is coming along nicely, as this proves I guess! The sub-cpu code is completely reversed to the point that I can now re-assemble the source back to an exact binary image of the original eproms. The Z80 sound code is about 50% done (YM2151 code done, PCM sample code not done). The main cpu code is about 30-40% done, that'll be the big one. It's a thankless task and some days very little progress is made but it keeps me off the streets I guess!

Sounds great, I know its quite the task, and it does take quite the tech to even attempt this, but I think it is a great task.

I'm keeping my eye's peeled for a SHO for you.....
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,876CR
Wow! I've just found this after reading bbz's SHO sound fault thread!

This is excellent, and because this is the internet where people always want more, would you think about making a thread on your disassembly work?
smiley2.gif
I'm currently using Mitchell Gant's disassembly of Star Wars to study how the game was coded and try to help with the hack. Being able to take the hardware and the code to bits is pretty much my nerd nirvana.
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,650CR
And herein begins the grey area.....

As you probably already know reverse engineering is a legal minefield. Even though SHO is now 27 years old it's still actually making money for Sega in the form of the Nintendo 3DS eShop version (currently only available on the Japanese eShop). I doubt Sega's legal team would take too kindly to a fully annotated disassembly of a game which features in their current marketing portfolio.

It's a difficult one, I'm all for sharing knowledge of what I'm learning as I go along the disassembly process but I don't have the power (nor the will) to fight Sega should they start getting tetchy about it.

I don't like to speak for others but I wouldn't be surprised if that's how Chris White has felt about his work in reversing Out Run and subsequently rewriting the entire game in C++ in the form of Cannonball. He has, in effect, got around the minefield by not releasing any of the original disassembly of the Out Run code, but instead by rewriting it in C++.

I have no plans to rewrite SHO in any other language. I'm doing this primarily because I always thought the collision routines between your bike and the AI bikes was always a little bit biased towards the AI (i.e. you always seemed to come out of the collision worse off!) so I'm hopefully going to rectify that and even the balance a little!

Ultimately I guess it would be nice to be able to document the hardware enough that people can write their own homebrew based around the OR/SHO hardware. Although the potential audience of people who would actually DO something like that is probably so small that's it really does warrant the question as to whether it's worth doing so.
 
Top