GD: My Sonic Wings 2 reverse engineer & Strats

For posting and requesting strategic gameplay tips on shmups!
Post Reply
User avatar
ProjectAKo
Posts: 434
Joined: Mon Nov 24, 2014 8:13 pm

GD: My Sonic Wings 2 reverse engineer & Strats

Post by ProjectAKo »

I wasn't sure what subforum this should in. "Discoveries" and all, doesn't really fit any of the topic types, but here's what I found out in the last 4-5 hours poking around in a debugger reversing the custom bytecode of sonic wings 2.


First what is bytecode? Basically it's a mini scripting language you program to make your game easier to design and change. It's a good idea to use something like this, rather than hardcoding everything when designing a game.

Anyway after some hours figuring out lots of RAM addresses inside the game, most importantly the function pointers which run the enemy AI, I was led to the one which runs the final boss. In the future if anyone ever needs to know, it starts here at 072410

Image

There's basically 7 numbers in the script here to be concerned with when trying to learn about how Mambo spawns, and forgive this shitty math

0138 - This means "Roll a random number between 0 and 65535, and change behavior if it's less than"
0007259E - This is the location of Tenuki's (ghost boss) behavior
5555 - In decimal this is 21845, or one third of 65535
0007242C - This is the location of Lar's (eye boss) behavior
FCFC - In decimal this is 64764, or eighty-four eighty-fifths of 65535
0132 - Just change behavior without rolling a number
00072710 - It's Mambo's behavior!

So in English the script becomes this: First of all, you have a 33% chance of getting Tenuki immediately. If not, check for Lar and Mambo. When checking for Lar and Mambo, you have a 1.17% chance of getting mambo, and doesn't look like it can be manipulated in any meaningful way. :(

TL;DR the chances are as bad as they always seemed, requiring first a win at 66% and then another at 1.17%

Also, here's a dumb image of when I replaced the first boss's function pointer with mambo's. He's ascended to godhood.

Image

I hope someone found that interesting. I want to try routing for score on this game. Information of sw2 seems scarce, even on 2ch, and there's barely 5 videos of it on niconico video. All I could find was a scant few japanese posts from 2007ish discussing the second loop a little bit. To think the WR for this is 20 years old and still standing strong... did HKR get the godly double-Mambo spawn?


-- EDIT --

I also checked the level ordering code today. TL;DR: There's probably no way to affect that either...

In the part of program ROM around 2B7C0, there are several lists of fixed level orders

Image

You can see there the stuff like 0001 (japan) 0004 (usa) 0003, 0002, 0005, up to 000A (space). These are the level numbers in lists. When you push start you get 1 of these 6 lists immediately. Since they're fixed in ROM, I highly doubt there's any other secret way of choosing what level you get. Also, the pointer to your current level list gets saved in RAM address 10E50C.
Last edited by ProjectAKo on Sat Dec 20, 2014 7:11 pm, edited 1 time in total.
User avatar
Gemant
Posts: 407
Joined: Sat Jan 29, 2005 10:27 am
Location: TRIESTE ( ITALY )

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by Gemant »

Very interesting, so Mambo appear with 1.17% of chances? yeah. In my best replay of 1.7m I have defeat Mambo at the end of first loop and HKR the same once.
User avatar
Gemant
Posts: 407
Joined: Sat Jan 29, 2005 10:27 am
Location: TRIESTE ( ITALY )

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by Gemant »

You can use this program to discover the extra appearance in Sonic Wings 3! (Bosses, strange staff etc.). This game is famous because there are some strange objects with low % chance of appareance during the game. I try to search all objects from 1995 but is very difficult and I see only few. Here there are some of them:

Image

Image

Image

Image

There are many other unknown (I not have photos)

Can you help me to find them?
User avatar
ProjectAKo
Posts: 434
Joined: Mon Nov 24, 2014 8:13 pm

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by ProjectAKo »

1.7m? That's really awesome. I'm practicing scoring sw2 every day as well. I'm focusing on trying 2-ALL for now, but it's really hard... I have only reached 2-4 (and only 1.1m...), but I have only practiced first loop. So it's true HKR had mambo spawning in the record?

I've played SW3 a few times. There's a lot of secrets in it huh! I got the huge sea monster to appear only once. I would like to check it out more one day.
User avatar
Gemant
Posts: 407
Joined: Sat Jan 29, 2005 10:27 am
Location: TRIESTE ( ITALY )

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by Gemant »

ProjectAKo wrote:1.7m? That's really awesome. I'm practicing scoring sw2 every day as well. I'm focusing on trying 2-ALL for now, but it's really hard... I have only reached 2-4 (and only 1.1m...), but I have only practiced first loop. So it's true HKR had mambo spawning in the record?

I've played SW3 a few times. There's a lot of secrets in it huh! I got the huge sea monster to appear only once. I would like to check it out more one day.
HKR is impossible to beat because him have Mambu x 1. Player D.I is more strong with average score of 2.970.000 / 2.995.000 but without Mambu. HKR average score is 200.000 less than D.I..
User avatar
ProjectAKo
Posts: 434
Joined: Mon Nov 24, 2014 8:13 pm

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by ProjectAKo »

I made a route for 2-2 2-4 and 2-5 levels, needing only 4 or 5 bombs (including bombs you find in those stages and 2-3), and I made it to 2-6 finally. But 2-6 is really ridiculous. I don't know how to beat this boss reliably either...

Also I wonder where the extra million points comes from? If I could get to 2-8 with some bombs I know I can get a huge score boost from all the medals. But I don't know how HKR and D.I can score 3 million. Milking each boss only seems to be worth 10-20k each, and it's very difficult and tedious. Maybe there's an old scoring trick no one knows about anymore? I also checked many japanese sites and blogs. Virtually no one is able to even pass 2-4, and they don't know much scoring tricks...
User avatar
Gemant
Posts: 407
Joined: Sat Jan 29, 2005 10:27 am
Location: TRIESTE ( ITALY )

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by Gemant »

ProjectAKo wrote:I made a route for 2-2 2-4 and 2-5 levels, needing only 4 or 5 bombs (including bombs you find in those stages and 2-3), and I made it to 2-6 finally. But 2-6 is really ridiculous. I don't know how to beat this boss reliably either...

Also I wonder where the extra million points comes from? If I could get to 2-8 with some bombs I know I can get a huge score boost from all the medals. But I don't know how HKR and D.I can score 3 million. Milking each boss only seems to be worth 10-20k each, and it's very difficult and tedious. Maybe there's an old scoring trick no one knows about anymore? I also checked many japanese sites and blogs. Virtually no one is able to even pass 2-4, and they don't know much scoring tricks...
In western the best target was always loop 2-4. In 20 years I never see anyone after loop 2-4 except japanese or chinese players. This game not have secrets about score except the random Mambu Boss. Leeching is possible in some Boss but the rank increase, so the game become impossibile. The only strategy is collect all bombs (when you have 6, you win 10.000 pts for any new bomb).
User avatar
ProjectAKo
Posts: 434
Joined: Mon Nov 24, 2014 8:13 pm

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by ProjectAKo »

Ah. Still I would love to see the run of D.I or HKR to see how they play. I found some old gamest records and shortly after SW2 came out, the high score was only 2M, making it up to 2-9. Then some months later HKR was reaching 2.8m, and in 2009 D.I, but I don't know anything about their runs.

I read on 2ch it's possible to get 1.4m from the first loop without mambu, but I never quite got higher than 1.2m on the first loop...
User avatar
Gemant
Posts: 407
Joined: Sat Jan 29, 2005 10:27 am
Location: TRIESTE ( ITALY )

Re: GD: My Sonic Wings 2 scripting discoveries (Mambo's spaw

Post by Gemant »

D.I not share videos and there aren’t videos from HKR. So no super play for this game except for some old mame replay with low score (>2.400.000). At the end of first loop is possible 1.500.000 / 1.550.000 with leeching on every Boss and max bombs collection strategy (with F-15 or FSX).
User avatar
ProjectAKo
Posts: 434
Joined: Mon Nov 24, 2014 8:13 pm

Re: GD: My Sonic Wings 2 reverse engineer & Strats

Post by ProjectAKo »

That's a shame. It's hard to find many videos for SW2, and I'm too lazy to try and figure out how the few mame replays work. I'll try to upload some humble videos at some point.

Edit: I made it to 2-9! All of my strats finally worked together well. I know I can reach 2-10, but that stage is hell and will require many bombs. Also if you die on the 2-10 boss, you almost certainly lost and can't recover. I'll make some twitch VODs soon
User avatar
ProjectAKo
Posts: 434
Joined: Mon Nov 24, 2014 8:13 pm

Re: GD: My Sonic Wings 2 reverse engineer & Strats

Post by ProjectAKo »

There's one final thing that's been bugging me which I kind of solved.

In the 2-3 bonus stage, 2 helis drop bombs. They aren't there in 1-3. Yet, rarely you can get bombs in 1-3 anyway!

Image

But if you go through the entire stage looking for these helis, you won't find them. No helis in this stage drop bombs, no matter how hard you look. I believe 1-3 is bugged, because if you shoot in a certain spot at a certain time, with a weapon (subweapon) that can cause damage offscreen, you will hit some bugged invisible enemies which will drop the bombs. Maybe these are the bomb helis from 2-3, but disabled for 1-3 (maybe game devs didnt want to give away too many bombs too early). Still, it appears they are bugged. I believe the bomb helis might exist for 1 frame, and if you can hit them during that frame and there's room for more powerups on screen, you will get the bombs. You can even hear these invisible helis explode, but they won't ever appear.

The helis are in the same spot as in 2-3. If you watch both levels without shooting, you'll see they have the exact same layout, EXCEPT those two helis with bombs don't appear in 1-3.

These two invisible helis are also worth 800 points each. That's different from the 500 of the other helis from that section, making me further believe they are out of place.

It seems only some planes have the right weapon to get the bombs.

F-117: I can't seem to get them with the F-117. His sub firebombs don't seem to be able to hit off the screen, nor his bomb.
A-10: Missiles don't contact offscreen at all. Main bomb also doesn't seem to work.
FS-X: It seems the ninja laser bomb can easily get both bombs every time. Homing shurikens have no hope of doing it.
F-15: With proper timing, her sub lasers can get both bombs.
F-14: Doesn't seem to be possible.
YF-23: Seems impossible, or very hard to time.
Rafale: Missiles can't do it. With the main bomb I got one drop a few times. Seems tricky.
FRS-2: Can get both with a well-timed bomb, but the timing is very early.

By the way, I went to 2-3 and tested some things also. There's hidden helis there too, but just some normal ones with powerups. On the right side of the screen you'll notice certain helis aren't spawning in 2-3. I mean the ones that move only horizontally towards the end. You can hit them with an offscreen weapon just like the invisible bomb helis.
Post Reply