If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

# Notes:Alien Storm (Genesis)

## Credits Select

After entering a successful button sequence in Options (more on that in a moment), bit 0x01 is set in memory address \$FFFF29. This bit is checked for when entering the Sound Test, and if it's set, bit 0x02 is set in \$FFFF29, unlocking the credits select in Options.

Most games store their button cheats as a sequence of bytes (e.g., 0x01, 0x02, 0x04, 0x08 for Up, Down, Left, Right). This game uses instead XOR and bit shifting operations instead and checks for word #\$3929 in \$FFFF1C.

The programming looks like this:

```00:2DF8  B1 41  EOR.W   D0,D1
00:2DFA  E2 49  LSR.W   #1,D1
00:2DFC  64 00  BCC     #\$0006 [00:2E04]
00:2E00  0A 41  EORI.W  #\$8810,D1
00:2E04  31 C1  MOVE.w  D1,(\$FF1C)
00:2E08  B2 7A  CMP.W   \$01FA(PC),D1

00003004 3929

```
• First, XOR the controller button press (D0) with the word at memory address \$FFFF1C (D1).
• Next, shift right D1 once.
• If bit 0x0001 is set at the time of the shift, XOR D1 with #\$8810.
• Repeat these steps until D1 is #\$3929, then you're done.

A program, like the C++ one found here, can be used to solve the problem.

Below is a detailed look at one possible button sequence that will work:

```Button Sequence: Up, Down, C, Down, B, B, B, Up, C
Hex Byte values: 01, 02, 10, 02, 40, 40, 40, 01, 10

Up   0001 ^ 0000 = 0001
0001 >> 0001 = 0000
0000 ^ 8810 = 8810

Down 0002 ^ 8810 = 8812
8812 >> 0001 = 4409

C    0010 ^ 4409 = 4419
4419 >> 0001 = 220C
220C ^ 8810 = AA1C

Down 0002 ^ AA1C = AA1E
AA1E >> 0001 = 550F

B    0040 ^ 550F = 554F
554F >> 0001 = 2AA7
2AA7 ^ 8810 = A2B7

B    0040 ^ A2B7 = A2F7
A2F7 >> 0001 = 517B
517B ^ 8810 = D96B

B    0040 ^ D96B = D92B
D92B >> 0001 = 6C95
6C95 ^ 8810 = E485

Up   0001 ^ E485 = E484
E484 >> 0001 = 7242

C    0010 ^ 7242 = 7252
7252 >> 0001 = 3929```

No solution exists that uses less than 9 button presses.

Some button sequences will inadvertently remap the control pad setup at the bottom of the options screen, resulting in a failed cheat. Any sequence that doesn't involve D-Pad Left or Right is guaranteed to work.

### Solutions

There are a total of 1,724 solutions of minimum length, 89 of which don't require D-Pad Left/Right presses. A full CSV listing of them can be downloaded here and here, respectively.

In general, there is no maximum limit on the number of presses, though. This opens the door for some creative ways to solve the problem, like using a controller with auto rapid-fire enabled on a single button to rack up tens of thousands of presses towards an eventual solution (37,757 total presses for button A, 63,671 for B, or 57,625 for C).

(Source: JLukas (initial research and algorithms), WaluigiBSOD (solutions listing and related C++ program))