lsnes rr2-β24
[lsnes.git] / src / emulation / sky / memory.map
blob9557daab09341fe4b259d6a9c644ef1d5befffc7
1 00000   Byte            Demo mode:
2                         0 => Player control.
3                         1 => Recorded demo.
4                         2 => DEMO.REC demo.
5 00001   65535           Buffer containing demo data.
6 10000   Word            Length
7 10002   Word            Gravity
8 10004   Word            Amount of Oxygen
9 10006   Word            Amount of Fuel
10 10008   72xDword        Palette (65536 * r + 256 * g + b)
11                         0 => Unused.
12                         1-15 => Floor top colors
13                         16-30 => Floor front colors
14                         31-45 => Floor right edge colors
15                         46-60 => Floor left edge colors
16                         61 => Block top color 0.
17                         62 => Block front.
18                         63 => Block right
19                         64 => Block left.
20                         65 => Block inside (tunnel)
21                         66 => Pipe front.
22                         67 => Pipe inside.
23                         68 => Pipe right 1
24                         69 => Pipe left 1 / right 2
25                         70 => Pipe left 2 / right 3
26                         71 => Pipe left 3
27 10128   32620xWord      Level tile data.
28                         Bits 0-3: Lower floor type (0 => No lower floor)
29                         Bits 4-7: Upper floor type (only meaningful if block type 2-5)
30                         Bits 8-11: Block type
31                         0000 => No block
32                         0001 => Pipe
33                         0010 => Short block
34                         0011 => Short block with tunnel.
35                         0100 => Tall block
36                         0101 => Tall block with tunnel.
37 20000   qword           Number of subsamples left in current sound.
38 20008   dword           Sound data pointer.
39 2000C   dword           Current subsample in sound.
40 20010   dword           (Unused)
41 20014   word            (unused)
42 20016   byte            Current byte from sound data.
43 20017   byte            Rate constant (256 - 1MHz / sampling_rate)
44 20018   32xByte         RNG state
45 20038   dword           Frame counter
46 2003C   dword           Death frame number.
47 20040   dword           Longitudial position.
48 20044   dword           Projected longitudial position.
49 20048   dword           Longitudial speed.
50 2004C   dword           Longitudial speed bias.
51 20050   word            Frame in explosion (0 => Not exploded).
52 20052   word            Number of frames post death.
53 20054   word            Acceleration of gravity (negative).
54 20056   word            Horizontal position.
55 20058   word            Vertical position.
56 2005A   word            Horizontal projected position.
57 2005C   word            Vertical projected position.
58 2005E   word            Horizontal speed.
59 20060   word            Vertical speed.
60 20062   word            Drift speed.
61 20064   word            Jump ground level.
62 20066   word            Amount of no support.
63 20068   word            Balance of no support.
64 2006A   word            Fuel left.
65 2006C   word            O2 left.
66 2006E   word            Gravity.
67 20070   word            O2 use per frame.
68 20072   word            Fuel use factor.
69 20074   word            Minimum speed for bounce.
70 20076   word            Level amount of O2.
71 20078   word            Level amount of fuel.
72 2007A   byte            Cause of death:
73                         0 => Still alive.
74                         1 => Burned by floor
75                         2 => Fell into pit
76                         3 => Ran out of fuel
77                         4 => Ran out of oxygen.
78                         5 => Collided with wall.
79                         6 => Escaped the level.
80                         255 => Finished the level.
81 2007B   byte            Flags:
82                         Bit 0: In locked jump.
83                         Bit 1: Tried to lock this jump.
84                         Bit 2: In jump.
85                         Bit 3: Landed on floor.
86                         Bit 4: Slippery floor in effect.
87                         Bit 5: Sticky floor in effect.
88                         Bit 6: On blank tile.
89                         Bit 7: Level disables jumping.
90 2007C   dword           (unused)
91 20080   qword           Position in background music (samples)
92 20088   qword           Total frames ran.
93 20090   dowrd           Current background song number.
94 20094   word            In menu: Amount of frames waited.
95                         In level: Timeattack frame count.
96 20096   byte            Paused flag.
97 20097   byte            Indicated speed.
98 20098   byte            Indicated O2
99 20099   byte            Indicated fuel.
100 2009A   byte            Indicated distance
101 2009B   byte            Lock indicator flag.
102 2009C   byte            Out of O2/Fuel flash phase.
103 2009D   byte            State of game.
104                         0 => Menu fading in
105                         1 => In menu
106                         2 => Menu fading out
107                         3 => Loading level
108                         4 => Level fading in
109                         5 => Playing level
110                         6 => Level complete
111                         7 => Level fading out (going to menu)
112                         8 => Loading menu
113                         9 => Level unavailable
114                         10 => Demo unavailable
115                         11 => Level fading out (going to retry)
116                         12 => Loading level (without reloading music)
117                         13 => Lockup
118 2009E   byte            Fade counter.
119 2009F   byte            Current stage number (0-30)
120 200A0   byte            Menu old stage number
121 200A1   byte            Menu saved stage number.
122 200A2   byte            Demo flag.
123                         0 => Loaded level will have player control.
124                         1 => Run level demo.
125                         2 => Run DEMO.REC.
126 200A3   byte            Last frame pressed keys.
127 200A4   byte            Secret flag (bit 7 if active, bits 0-6 give level id).
128 200A5   byte            Time attack flag.
129 200A6   word            (unused)
130 200A8   32*byte         Number of times each level has been completed (SRAM).
131 200C8