The current URL is datacrystal.tcrf.net.
Fantasia (Genesis)/ROM map: Difference between revisions
No edit summary |
No edit summary |
||
Line 70: | Line 70: | ||
* <tt>04</tt>: vertical RLE. The tile is built by columns (from top to bottom, then left to right). Each subsequent bytes is <tt>nnnnvvvv</tt> where n is the number of pixels and v their color index. | * <tt>04</tt>: vertical RLE. The tile is built by columns (from top to bottom, then left to right). Each subsequent bytes is <tt>nnnnvvvv</tt> where n is the number of pixels and v their color index. | ||
* <tt>06</tt>: same, but horizontal (pattern is built from left to right, then top to bottom) | * <tt>06</tt>: same, but horizontal (pattern is built from left to right, then top to bottom) | ||
===Animation breakdown and timings=== | |||
Offsets to animations breakdowns table is located at 0xd84a: | |||
0000d7e2 ; 00: idle | |||
0000d7ea ; | |||
0000d7f4 ; | |||
0000d7fe ; | |||
0000d800 ; | |||
0000d80c ; | |||
0000d80e ; | |||
0000d812 ; | |||
0000d814 ; | |||
0000d816 ; | |||
0000d818 ; | |||
0000d81e ; | |||
0000d826 ; | |||
0000d82e ; | |||
0000d836 ; | |||
0000d83e ; | |||
0000d846 ; | |||
0000d9b0 ; | |||
0000d9b8 ; | |||
0000d9c0 ; | |||
For each animation, a sequence of frames (bytes) is given, terminated by a 0xff. Example for animation 0 (idle animation) at 0xd7e2: | |||
00 01 02 01 00 01 02 ff | |||
The timings of animations are located in RAM, at 0xff042a. It is copied from ROM address 0x7c42a. Each entry is 2 bytes, the first is a counter (obviously 00 in the ROM data) and the second controls the duration of the animation. In particular, all frames in a given animation are displayed the same number of frames. | |||
Note : the walking animation speed can change when acquirring speed and varies from 4 to 2. The speed is adjusted by the instruction at 0x2754. | |||
00/06 ; 00: idle animation plays at 60/6 = 10 fps | |||
00/04 ; 01: walking animation plays at 60/4 = 15 fps | |||
00/03 ; 02: | |||
00/07 ; 03: | |||
00/06 ; 04: | |||
00 03 ; 05: | |||
00 01 ; 06: | |||
00 04 ; 07: | |||
00 04 ; 08: | |||
00 04 ; 09: | |||
00 01 ; 0a: | |||
00 03 ; 0b: | |||
00 03 ; 0c: | |||
00 03 ; 0d: | |||
00 02 ; 0e: | |||
00 01 ; 0f: turnover animation plays at 60 fps | |||
00 02 ; 10: | |||
00 04 ; 11: | |||
00 04 ; 12: | |||
00 04 ; 13: | |||
==Mickey Physics== | ==Mickey Physics== |
Revision as of 17:27, 30 January 2024
This is a sub-page of Fantasia (Genesis).
Mickey sprites and animation
Animations Frames
Informations about Mickey animations frames are stored in a table of pointers at 0xd89a:
00ff27ac ; 00: idle 00ff26a4 ; 01: walk 00ff26d8 ; 02: cast big spell 00ff272c ; 03: jump 00ff282c ; 04: ? (corrupted?) 00ff272c ; 05: jump 00ff272c ; 06: jump 00ff272c ; 07: jump 00ff272c ; 08: jump 00ff272c ; 09: jump 00ff272c ; 0a: jump 00ff270c ; 0b: ? (corrupted?) 00ff2780 ; 0c: cast small spell 00ff2760 ; 0d: cast spell while jumping 00ff27cc ; 0e: ? (corrupted?) 00ff27ec ; 0f: turnover 00ff280c ; 10: ? (corrupted?) 00ff2858 ; 11: afraid of falling 00ff2858 ; 12: afraid of falling 00ff272c ; 13: jump
These pointers are in RAM, but the 0xff0000 - 0xff3fff area in RAM is a copy of the 0x7f000 - 0x7ffff area in ROM. So, for example, data about animation #00 can be found at ROM offset 0x7e7ac:
0003 ; number of frames in the animation 00000000 ; used for static sprites (GUI) 0039 ; number of patterns for the whole animation 0001CF2E ; pointer to patterns data 0000 ; 0000 ; 0020 ; width of the sprite (used for hfliping) 0028 ; height of the sprite 0001CEF8 ; pointer to frame description of frame #0 0001CF0A ; pointer to frame description of frame #1 0001CF1C ; pointer to frame description of frame #2
Patterns data located in ROM at offsets 0x18354, 0x1d95e, 0x1928e, 0x1c480 and 0x1cf2e are compressed with a RLE scheme described below. Otherwise, they are uncompressed.
Frame description have the following format:
0002 ; nb of hardware sprites ; ; hardware sprite #1 0018 ; dy (counted upwards) 0f ; size (0000HHVV) 01 ; id of the hardware sprite 0000 ; offset to first pattern 0000 ; dx ; ; hardware sprite #2 0020 08 02 0010 0000 0002
Gfx Compression scheme
Compressed data is a stream of instruction code with variable arguments. Each instruction decompress into one pattern (32 bytes).
- 00: end of the stream
- 02: copy the 32 next bytes (i.e. pattern is not compressed)
- 04: vertical RLE. The tile is built by columns (from top to bottom, then left to right). Each subsequent bytes is nnnnvvvv where n is the number of pixels and v their color index.
- 06: same, but horizontal (pattern is built from left to right, then top to bottom)
Animation breakdown and timings
Offsets to animations breakdowns table is located at 0xd84a:
0000d7e2 ; 00: idle 0000d7ea ; 0000d7f4 ; 0000d7fe ; 0000d800 ; 0000d80c ; 0000d80e ; 0000d812 ; 0000d814 ; 0000d816 ; 0000d818 ; 0000d81e ; 0000d826 ; 0000d82e ; 0000d836 ; 0000d83e ; 0000d846 ; 0000d9b0 ; 0000d9b8 ; 0000d9c0 ;
For each animation, a sequence of frames (bytes) is given, terminated by a 0xff. Example for animation 0 (idle animation) at 0xd7e2:
00 01 02 01 00 01 02 ff
The timings of animations are located in RAM, at 0xff042a. It is copied from ROM address 0x7c42a. Each entry is 2 bytes, the first is a counter (obviously 00 in the ROM data) and the second controls the duration of the animation. In particular, all frames in a given animation are displayed the same number of frames.
Note : the walking animation speed can change when acquirring speed and varies from 4 to 2. The speed is adjusted by the instruction at 0x2754.
00/06 ; 00: idle animation plays at 60/6 = 10 fps 00/04 ; 01: walking animation plays at 60/4 = 15 fps 00/03 ; 02: 00/07 ; 03: 00/06 ; 04: 00 03 ; 05: 00 01 ; 06: 00 04 ; 07: 00 04 ; 08: 00 04 ; 09: 00 01 ; 0a: 00 03 ; 0b: 00 03 ; 0c: 00 03 ; 0d: 00 02 ; 0e: 00 01 ; 0f: turnover animation plays at 60 fps 00 02 ; 10: 00 04 ; 11: 00 04 ; 12: 00 04 ; 13:
Mickey Physics
Music and Sfx
Internal Data for Fantasia (Genesis)
| |
---|---|