Skip to content

Instantly share code, notes, and snippets.

@grendell
Created May 17, 2015 07:43
Show Gist options
  • Save grendell/50a50c6b3365a0703575 to your computer and use it in GitHub Desktop.
Save grendell/50a50c6b3365a0703575 to your computer and use it in GitHub Desktop.
Axiom Verge Cheat System Explanation
Any password that begins with the letters AXIO will be treated as a cheat code.
This is how the game evaluates cheat codes.
1. Map the remaining eight characters to an integer value.
0 - 9 maps to 0 - 9 and A - Z maps to 10 - 35.
2. Multiply each value with a power of 36, determined by position,
and take the sum of those calculations.
x = 36^7 * v0 + 36^6 * v1 + 36^5 * v2 + 36^4 * v3 +
36^3 * v4 + 36^2 * v5 + 36^1 * v6 + 36^0 * v7
3. Subtract (36^8 - 0x20000000000) from x, so that x may never be greater than 0x1ffffffffff.
x = x - (36^8 - 0x20000000000)
4. Take the max of x and 0, so that x may never be less than 0x90d7410000.
Notably, this means no valid AXIO cheat code can have a 0-7 in the v0 position.
x = max(x, 0)
5. Retain the highest bit, 0x10000000000,
swap all other nibbles (4-bit groups) in their respective byte, and re-apply the highest bit.
6. Swap the following bits: (0, 9), (1, 36), (2, 19), (4, 25), (5, 29), (6, 13), (8, 40)
7. Find the category value and the amount.
There is special logic per category for how to interpret the amount,
but it's always based on the lowest 9 bits.
category = x >> 9
amount = x & 0x1ff
8. Look for this category in the hardcoded list of categories and apply the amount as appropriate.
Concrete example: AXIOJWMAU568, found in the credits.
J => 19, W => 32, M => 22, A => 10, U => 30, 5 => 5, 6 => 6, 8 => 8
x = 36^7 * 19 + 36^6 * 32 + 36^5 * 22 + 36^4 * 10 + 36^3 * 30 + 36^2 * 5 + 36^1 * 6 + 36^0 * 8
x = 1559924610992 = 0x16b32c097b0
x = 1559924610992 - (36^8 - 0x20000000000)
x = 937837959088 = 0x0da5b7f97b0
x = max(x, 0)
x = 937837959088 = 0x0da5b7f97b0
x = 0x0adb5f7790b
4 3 2 2 1 1
0 6 9 5 9 3 98 654 210
x = 0b 0000 1010 1101 1011 0101 1111 0111 0111 1001 0000 1011
x = 0b 0001 1011 1101 1001 0101 1111 0111 0101 1010 0110 1000
x = 0x1bd95f75a68
category = x >> 9
category = 0x1bd95f75a68 >> 9 = 0xdecafbad = 3737844653
amount = x & 0x1ff
amount = 0x1bd95f75a68 & 0x1ff = 0x68 = 104
In this case, 3737844653 is in the list under the obfuscated enum 'a'.
Following the logic under case 'a':
amount = 4.0 * (amount / 0x1ff)
amount = 4.0 * 0.2035 = 0.8141
Given that we have the complete list of categories and know how the amounts are applied in each
category, we can perform these steps in reverse and factor out the powers of 36 to generate all
possible AXIO passwords!
AXIOJW-MAU568
Allows Trace to jump slightly higher. Found in the game's credits.
Gravity Applied to Trace (Defaults to 1)
Max (4): AXIOXZ-Y9F83C
Min: AXIOJW-LQV48G
Zero: AXIOJW-LQUXWW
Upward Force Applied to Trace Per Jump Press (Defaults to 1)
Max (4): AXIOQB-17KOFJ
Min: AXIOC7-OP0KKN
Zero: AXIOC7-OP0E93
This will add upward force to Trace even in the air until he hits something above him.
Trace's Initial Jump Power (Defaults to 1)
Max (8): AXIOUS-Y50PTK
Min: AXIOGP-LMGLYO
Zero: AXIOGP-LMGFN4
Gravity Applied to Drone (Defaults to 1)
Max (4): AXIOMW-RGJDNE
Min: AXIO8T-EXZ9SI
Zero: AXIO8T-EXZ3GY
Upward Force Applied to Drone Per Jump Press (Defaults to 1)
Max (4): AXIOZ6-P8M56L
Min: AXIOL3-CQ21BP
Zero: AXIOL3-CQ1V05
This will add upward force to the drone even in the air until it hits something above it.
Drone Jump Power (Defaults to 1)
Max (8): AXIOQC-P4CX4V
Min: AXIOC9-CLST9Z
Zero: AXIOC9-CLSMYF
Bioflux Accelerator Cooldown (Defaults to 1)
Max (2): AXIOMH-1DXGGP
Min: AXIO8D-OVDCLT
Zero: AXIO8D-OVD6A9
Projectile Speed (Defaults to 1)
Max (8): AXIOPG-LP62E1
Min: AXIOBD-96LYJ5
Zero: AXIOBD-96LS7L
Damage Dealt (Defaults to 1)
Max (10): AXIOP8-3NX3M5
Min: AXIOB4-R5CZR9
Zero: AXIOB4-R5CTFP
Damage Taken (Defaults to 1)
Max (10): AXIOV1-A2IN4Q
Min: AXIOGX-XJYJ9U
Zero: AXIOGX-XJYCYA
Projectile Size Bonus (Defaults to 0)
Max (15): AXIO8F-JNLYHE
Min: AXIO8D-KHI3PU
Zero: AXIO8D-KHHXEA
Weapon Range Bonus (Defaults to 0)
Max (15): AXIOJU-YPX52T
Min: AXIOJS-ZJTAB9
Zero: AXIOJS-ZJT3ZP
Bonus Health Bar Size (Not Fillable) (Defaults to 0)
Max (1500): AXIO8C-PV80W3
Min: AXIO8A-QP464J
Zero: AXIO8A-QP3ZSZ
Bonus Address Bomb Slots (Not Fillable) (Defaults to 0)
Max (15): AXIO8V-HIOMFM
Min: AXIO8T-ICKRO2
Zero: AXIO8T-ICKLCI
Enemy Health Drop Frequency (Defaults to 1)
Max (100): AXIOP0-RAY9JX
Min: AXIOAX-ESE5P1
Zero: AXIOAX-ESDZDH
Enemy Health Drop Size (Defaults to 1)
Max (100): AXIONC-N1QUVD
Min: AXIO99-AJ6R0H
Zero: AXIO99-AJ6KOX
Power Node Bonus (Defaults to 0)
Max (15): AXIOA2-V0TUVK
Min: AXIOA0-VUQ040
Zero: AXIOA0-VUPTSG
Drone Launch Multiplier (Defaults to 1)
Max (8): AXIOMW-QCMG0P
Min: AXIO8T-DU2C5T
Zero: AXIO8T-DU25U9
Other passwords I discovered in the decompiled code:
CUTSCE-NE0000 - CUTSCE-NE0044
Plays the appropriate cutscene immediately. Only decimal values accepted.
TRACK0-000000 - TRACK0-000018
Plays the appropriate music track immediately. Only decimal values accepted.
AXIOAA-OETYZA
Allows Trace to walk on water.
AAOETYZA was actually a Game Genie code with similar effects for Zelda 2!
Please note: since the code I wrote to generate these passwords was heavily based upon decompiled
commercial code, I do not plan to release it without Tom Happ's permission.
@scotthorn
Copy link

A few of the more interesting cutscene passwords:

CUTSCE-NE0011
After enabling the power filter, Elsenova briefly describes Sudra and Athetos.

CUTSCE-NE0024
(During hallucination sequence)
That's odd; the drone won't launch.
The rest of the gun seems to be working, though.
(Included because I don't recognize this, and the hallucination sequence is linear afaik)

CUTSCE-NE0027
Hallucination self dies, then the game hangs.

CUTSCE-NE0030
After ending clone's life. Elsenova kills you, even with this code.

CUTSCE-NE0037
Meet Athetos

CUTSCE-NE0040
Opening Cutscene

CUTSCE-NE0041
After hallucination, remembering sequence. Freezes after.

CUTSCE-NE0042
Ending cutscene

CUTSCE-NE0043
High completion post-credit bonus

CUTSCE-NE0044
Low time post-credit bonus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment