Transforming into a blue-eyed monkey that spits energy projectiles might seem like a good idea to some people, but not Toki.
Address 0x00489 in the ROM holds a byte that's used as a debug flag. It's set to 00 in all versions, but if the following code is put in MAME's toki.xml cheat file, it'll change to 0F:
<cheat desc="Debug Mode"> <script state="on"> <action>maincpu.mb@489=0F</action> </script> <script state="off"> <action>maincpu.mb@489=00</action> </script> </cheat>
This enables four different debug features, each one controlled by a different bit in the debug flag:
- Bit 1: Displays an overlay during gameplay that shows some sprite-related values:
|A||Number of enemies on-screen|
|B||Number of enemies loaded in memory but not on-screen|
|M||Number of enemy projectiles/shots on-screen|
|T||Number of traps set on-screen|
|I||Number of items on-screen|
- Bit 2: Freezes the stage timer.
- Bit 4: Makes the player invulnerable to enemies and their projectiles. Falling down pits will still kill the player, though.
- Bit 8: Disables the invincible skull enemies that appear when the player idles around.
There's a flag in the main CPU (stored at 0x02B78 in the toki set) that would have enabled an object viewer if set to a non-zero value, but it's set to zero in each set. Place the following code in MAME's toki.xml cheat file to re-enable the object viewer:
<cheat desc="Object Viewer"> <script state="on"> <action>maincpu.mw@002B78=FFFF</action> </script> <script state="off"> <action>maincpu.mw@002B78=0000</action> </script> </cheat>
Press 1P Button 1 to increment and 1P Button 2 to decrement the current frame value. Valid values are 0000 to 08DF.
It's highly advised to use this code in conjuction with the debug mode code, since the object viewer will not disable the invincible flying skulls, give the player invincibility, or disable the timer.
Another debug function controlled by a ROM-based flag (0x1A026 in toki) is a partially functional demo recorder. Place the following code in toki.xml:
<cheat desc="Demo Recorder"> <script state="on"> <action>maincpu.mw@01A026=FFFF</action> </script> <script state="off"> <action>maincpu.mw@01A026=0000</action> </script> </cheat>
The player will now be able to move around freely in demos until time runs out (Demos run for 512 frames) or until the player dies. The game tries to write the player's input to the ROM each frame, but since it's Read-only Memory, you can imagine how successful it is at doing that.
...but there are a total of seven victory animations in the sprite graphics ROM! Support for these animation is partly coded in the game: The code for this starts at 0x02956 in the toki set. The victory animation subroutine has code that would have changed the animation based on what stage the player just cleared, but the table that stores the animation values (0x0297E) just has six copies of the default animation. Place the following code in MAME's toki.xml cheat file to restore the victory animations. Note that since there are only six stages, the default victory animation will be unused:
<cheat desc="Unused Victory Animations"> <script state="on"> <action>maincpu.mw@00297E=0807</action> <action>maincpu.mw@002980=0808</action> <action>maincpu.mw@002982=0809</action> <action>maincpu.mw@002984=080A</action> <action>maincpu.mw@002986=080B</action> <action>maincpu.mw@002988=080C</action> <action>maincpu.mw@00298A=080D</action> <action>maincpu.mw@00298C=0827</action> <action>maincpu.mw@00298E=0828</action> <action>maincpu.mw@002990=0829</action> <action>maincpu.mw@002992=082A</action> <action>maincpu.mw@002994=082B</action> </script> <script state="off"> <action>maincpu.mw@00297E=0805</action> <action>maincpu.mw@002980=0806</action> <action>maincpu.mw@002982=0805</action> <action>maincpu.mw@002984=0806</action> <action>maincpu.mw@002986=0805</action> <action>maincpu.mw@002988=0806</action> <action>maincpu.mw@00298A=0805</action> <action>maincpu.mw@00298C=0806</action> <action>maincpu.mw@00298E=0805</action> <action>maincpu.mw@002990=0806</action> <action>maincpu.mw@002992=0805</action> <action>maincpu.mw@002994=0806</action> </script> </cheat>
All of these graphics have assigned frame IDs and are visible with the in-game object viewer.
Frame IDs: 11A-120
This simple alligator / crocodile was likely the first enemy designed, as it's the first one by ID and the first one seen in the sprite graphics ROM. Doesn't seem like it would do much except lumber around. Good candidate for the Dark Jungle stage.
Frame IDs: 214-21B, 29D-29E, 31A-320, 33C-34B, 351-353
Another fairly generic enemy: A green snake. These snakes would have been used in the Labyrinth of Caves, burrowing out of the ground and falling from above, but they were cut due to lack of development time.
Frame IDs: 354-355, 3C5-3C6
An unused magic lamp power-up. What this would have done is a mystery.
Frame IDs: 81E-81F
The 16t weights are normally black, but there's an unused pink variant in the game data. These would fit with the pink see-saw platforms seen in the Dark Jungle.
Frame IDs: 85B-860
The frozen platforms seen in the Ice Palace have three frames of animation, but only the second frame is used in the final game. There's also a longer version of the platform that's entirely unused.
An alternate design for Toki appears at the very start of the object graphics ROM. This design has a slightly different forehead, no eyes, and an angrier expression.
This alternate design takes up a significant amount of ROM space, so it's no clear why they left all of it in.
One possible theory, based on a difference in the game's attract mode (seen below) is that the unused design would have been used in the Japanese version of the game.
The alternate version's climbing animation only has four frames of animation, with two frames being repeated to make up a six frame sequence. The newer design has six unique frames.
Toki's animation where he jumps off of a swinging rope has four frames of animation in the eyeless design. The final design repeats the first two frames twice; it looks awkward but it works.
Any animations that have popped eyes in the final design also have popped eyes in the alternate design. In this single frame, the eye was properly recolored from brown to blue; in all other frames, the eyes keep the brown color from the older design.
The alternate design even has proper victory animations! Actually, the eyeless design is what's stored first in the ROM, and then the eyes for the final design appear immediately after.
Toki's swimming animation is the only one that uses the older design's scowling face in the final game. However, there are two alternation swimming animations in the ROM: One that uses the final design's head but doesn't have goggles, and one with both goggles and green flippers.
The designs sans goggles doesn't have a shooting animation, while the flipper-wearing variant does.
Even the HUD icon has graphics for the alternate design!
Starting at 0x07C0 in the sprite graphics ROM are graphics for what seems to be a completely different game. The first of these is the world's most generic font.
The hearts that appear in the game's ending use a solid pink palette in the final game, but they actually have a good deal of shading in the sprite graphics ROM.
Spinning centipede wheels appear in the Dark Jungle. There are two unused designs for the wheel: A spiky caterpillar and a more harmless-looking worm.
There's a swimming section in the ice palace that has a mostly blank floor, but apparently this two-headed rock formation was meant to appear down there at some point. Maybe it's for the best that it wasn't.
The design of the monkey in the game intro is different depending on the game's region. In JuJu no Densetsu, the player is transformed into a scowling, eyeless monkey, while in all other regions, the standard design is used.
High Score Bug
An early US set (tokiu in MAME) will always display "00000000" as the top high score, regardless of what the actual top high score is. This is due to the top high score being stored at $60010 in RAM, rather than at $60008 like in the other versions. $60010 is used for other purposes by the code. This was fixed in a later US set (tokiua in MAME) by moving the top score value back to $60008.
The Toki series
|Genesis||Toki: Going Ape Spit|