Under the microscope: Shadow of the Beast II

Shadow of the Beast II was published for Amiga in 1990. A Genesis adaptation was released in 1992, and an enhanced Sega CD version appeared in 1994. In this edition, the two Sega ports go under the microscope.
Beast II is notoriously difficult. Here’s how it was described in GamePro:
This game’s challenge is hairy… Normal Mode is abnormally hard, and Ridiculous Mode is no laughing matter. Even Easy Mode will make intermediate players cry for their mommas.
Its predecessor, Shadow of the Beast, was similarly vexing. But it at least had an unlimited health cheat. Here’s how one GameFAQs guide (from user hellobatman) described it:
Play the game and get a high score… Enter your name as ZQX. Back at the title screen, hold A, B and C together and press Start. Now you are invincible! You will lose health but when you reach 0 you will just loop back around to 11.
I must say, there’s no shame in using the cheat. This game is so hard that crazy burnt out Vietnam veterans forget about their war experience and start having Beast flashbacks.
Is there anything similar in Beast II? Let’s check…
The Genesis version

The first thing I do when examining a new game is to identify the first few places where it checks for player input. For Beast II on Genesis, the first real check of the controller buttons is on the Psygnosis Presents screen:
; Check whether the Start button's bit is set.
btst.b #0x7,(0x1dd6,A6)
; If it is, bail out.
bne.b exit
; Otherwise, decrement the timer and loop again.
dbf D7w,wait_for_start_000682e4
This is just checking for the Start button, so it’s not anything cheat-related.

The second check is more interesting, however – it’s looking for A+B+C+Start.
; Load the input value
move.b (0x1dd6,A6),D0b
; Check whether it matches 0xf0
cmpi.b #0xf0,D0b
But this check is already known – pressing those buttons on the Psygnosis screen displays the staff credits.

The next checks are even more interesting. Just as the Psygnosis screen fades out, it looks to see whether A+C+Up+Start is being held. If it is, the value at memory address 00ff2279 gets updated.
; Load the input value
move.b (0x1dd6,A6),D0b
; Check whether it matches 0xe1
cmpi.b #0xe1,D0b
; Store the result
st (0x1e49,A6)
Then, at the title screen, we have a check for the button combination Down+B+Start. If those buttons are being held, a different memory address gets updated – but only if the one from above is nonzero.
; Load the input value
move.b (0x1dd6,A6)
; Check whether it matches 0x92
cmpi.b #0x92,D0b
; Bail out if not
bne.b 0x000682c8
; Check the whether the A+C+Up+Start effect is set
tst.b (0x1e49,A6)
; Bail out if not
beq.b 0x000682c8
; Store the result
move.b #0x1,(0x1df8,A6)
Putting those things together, you should:
- Start the game.
- Dismiss the Psygnosis logo by holding A+C+Up and pressing Start.
- At the title screen, hold Down+B and press Start.
If you got everything right, you’ll have unlimited health – enemy attacks won’t drain your health meter at all.

Intermediate players rejoice! You can now proceed without tears.
The Sega CD version

Now that Genesis players can cheat shamelessly, we can turn our attention to the Sega CD version of Beast II.
The input checks on this version’s logo screens weren’t remarkable. But there’s some notable code that runs on the Options screen. Here’s a translation of its logic into pseudo-Python.
# Check the just-pressed button against a static sequence
if pressed_button_0915 == sequence_00229494[index_20]:
# If there was a match, increment the check position in the sequence.
index_20 += 1
if index_20 == 30:
# If there were 30 matches, record the fact.
effect_090e = 0x46554232
...
else:
# If there wasn't a match, reset the sequence check position.
index_20 = 0
This is a run-of-the-mill cheat sequence detector. It’s looking for 30 correct button presses in a row.

The 30 buttons are:
Start, Up, Down, Left, Right,
Down, Up, Right, Left, Start,
Up (x4), Start (x1),
Down (x3), Start (x2),
Left (x2), Start (x3),
Right (x1), Start (x4)
Get them all right, and the screen border will turn from black to red.

And, as you might suspect, you’ll have unlimited health when playing the game.

You can now enjoy the Sega CD version’s enhanced music without it being interrupted by Game Over screens.
Outro
When you finish entering the cheat code in the Sega CD version, the value 0x46554232 gets stored in memory. If those bytes interpreted as ASCII characters, they represent the string FUB2. F— you, Beast II? We may never know.
This is my first foray into Sega CD reverse engineering – I hope there are more secrets lurking in games for that system. If you have any suggestions for where to look, leave a comment!







