Yoshi's Cookie/RAM map

From Data Crystal
Revision as of 21:12, 8 February 2024 by Lelegofrog (talk | contribs)
Jump to navigation Jump to search
Cacti removal is best done with gloves. Very thick gloves.
This page or file is awaiting consideration for deletion.
Please make sure it is not linked anywhere before deleting it!
Reason for deletion request: Duplicate of Yoshi's Cookie (NES)/RAM map

Chip tiny.png The following article is a RAM map for Yoshi's Cookie.

RAM Map

Address Size    Description
------- ----    -----------
0000       2    mode jump address (LSB)
00A0       1    speed (01=low, 02=med, 03=hi)
0200     768    playfield matrix
0300      32    playfield dropping row
0320      32    playfield dropping column
0340       4    playfield dropping corner
03D9       1    mode
03E2       1    cursorY * 2
03E3       1    cursorX * 2
048E       1    00=playing, 02=paused
040B       1    round (01--0A)
040C       1    stage (01--0A)
0490       1    buttons pressed (bits)
0492       1    title screen option (01=1P, 02=VS)
04A0       1    00=playing, FF=demo
04A8       1    1P menu option (01=round, 02=speed, 03=music type)
05E4       1    continue (01=yes, 02=no)

Playfield

The playfield is an 8×8 matrix stored in 768 bytes starting at address $0200.  Each element is represented by 4 bytes, each of which corresponds to a pattern table entry.  In other words, each cookie or Mario character is a 2×2 meta-tile; the upper 2 and the lower 2 bytes are adjacent in memory and the upper and lower pairs are separated by 16 bytes.  Each element can be one of 8 possible values:

empty
00 00
00 00

green koopa troopa shell
08 09
0A 0B

heart / super mushroom
10 11
20 21

flower / boo buddy
12 13
22 23

diamond / goomba
14 15
24 25

check / jumpin' piranha plant
16 17
26 27

circle / bloober
18 19
28 29

yoshi
1A 1B
2A 2B

The dropping row is stored in 32 bytes starting at address $0300. Each element is in the same 2×2 meta-tile format as the playfield matrix.

The dropping column is stored in 32 bytes starting at address $0320. However, unlike the playfield matrix and the dropping row, the 4 bytes of each element are stored sequentially.

The dropping corner element is stored as 4 bytes starting at address $0340. Like the dropping column, its 4 bytes are stored sequentially.

Mode

A single byte at $03D9 indicates the current game mode:

01 = title / continue
02 = playing / demo
03 = rotating rows / columns
04 = round X
05 = 1P mario enter animation
06 = game over
07 = clearing rows / columns
08 = shuffling rows / columns
09 = AxB points
0D = clearing rows / columns
0F = stage clear
12 = 1P menu
13 = 1P menu animation
14 = stage start push start
15 = paused
19 = adding rows / columns
1C = demo
36 = interstitial
37 = easy ending
38 = hard ending

A jump address is injected into $0000 when the mode changes (see ROM Map).