Jun 14, 2016

CV3 Palette Mappings (RAM offsets cont.)

The palettes entry in the RAM offsets post was a bit confusing, I think. This post will be used to map out palette addressing in CV3. All addresses are in the ROM data itself; so yes, the palettes are near the very beginning of the ROM data.


The default room palette is 16 bytes - 4 bytes per palette
6DE-6ED Default Room Palette 

6EE BREAKPOINT

The individual room palettes are 9 bytes - 3 bytes per palette, first palette and first colors skipped.
6EF-6F7 BG Set 00
6F8-700 BG Set 01
701-709 BG Set 02
70A-712 BG Set 03 
713-71B BG Set 04
71C-724 BG Set 05
725-72D BG Set 06
72E-736 BG Set 07
737-73F BG Set 08
740-748 BG Set 09
749-751 BG Set 0A
752-75A BG Set 0B
75B-763 BG Set 0C
764-76C BG Set 0D
76D-775 BG Set 0E
776-77E BG Set 0F
77F-787 BG Set 10
788-790 BG Set 11
791-799 BG Set 12
79A-7A2 BG Set 13
7A3-7AB BG Set 14
7AC-7B4 BG Set 15
7B5-7BD BG Set 16
7BE-7C6 BG Set 17
7C7-7CF BG Set 18
7D0-7D8 BG Set 19
7D9-7E1 BG Set 1A
7E2-7EA BG Set 1B
7EB-7F3 BG Set 1C
7F4-7FC BG Set 1D
7FD-805 BG Set 1E
806-80E BG Set 1F
80F-817 BG Set 20
818-820 BG Set 21
821-829 BG Set 22
82A-832 BG Set 23
833-83B BG Set 24
83C-844 BG Set 25
845-84D BG Set 26
84E-856 BG Set 27
857-85E BG Set 28
85F-868 BG Set 29
869-871 BG Set 2A


The palette set to load for each room is indexed over three ranges. You can think of it as a set of laws. First you have the table of contents indexing each chapter; the start of each chapter indexes each article within it.
551-56E Stage-based Index Map


The stage is used to index the background and sprite palettes both. The first index is for the background, the second is for the sprites.
56F-5 Block-based Index Map

66F-6DB Room-based BG Set Map

872-8EC Room-based Sprite Set Map

Sprites have only one set per stage, since the other three entries (hero's palette, candles palette, item palette) are the same across stages. The first default palettes are defined with 4 colors.
8EF-8F2 Trevor Palette
8F3-8F6 Item Palette
8F7-8FA Placeholder
8FB-8FE Candle Palette
8FF BREAKPOINT
902-905 Grant Palette
906-912 Copy of other default values
915-918 Sypha Palette
919-925 Copy of other default values
928-92B Alucard Palette
92C-938 Copy of other default values

Since the transparent color doesn't need to change, only 3 colors are defined for the custom palettes.
939-93B Sprite Set 00
93C-93E Sprite Set 01
93F-941 Sprite Set 02
942-944 Sprite Set 03
945-947 Sprite Set 04
948-94A Sprite Set 05
94B-94D Sprite Set 06
94E-950 Sprite Set 07
951-953 Sprite Set 08
954-956 Sprite Set 09
957-959 Sprite Set 0A
95A-95C Sprite Set 0B
95D-95F Sprite Set 0C
960-962 Sprite Set 0D
963-965 Sprite Set 0E
966-968 Sprite Set 0F
969-96B Sprite Set 10
96C-96E Sprite Set 11
96F-971 Sprite Set 12
972-974 Sprite Set 13
975-977 Sprite Set 14
978-97A Sprite Set 15
97B-97D Sprite Set 16
97E-980 Sprite Set 17
981-983 Sprite Set 18

Miscellaneous palettes. In some cases, both background and sprite palettes are defined by sets of 4 colors one after the other, making finding them pretty easy.
6F1F-6F2A Prelude BG
6F2B-6F36 Prelude Sprite

18E8-18F7 Title Screen BG
18F8-1907 Title Screen Sprite

1A57-1A66 Entry Screen BG
1A67-1A76 Entry Screen Sprite

1A7A-1A89 Prayer BG
1A8A-1A99 Prayer Sprite

1997-19A6 Main Map BG
19AA-19B9 Fork Road 1 (Tower/Forest)
19BD-19CC Fork Road (Forest/Swamp)
19D0-19DF Fork Road 3 (Pass/Ruins)
20B9-20C0 Castle Map Beacon Sprites
20C1-20C4 Stage Map Grant Sprite
20C5-20C8 Stage Map Alucard Sprite
20C9-20D8 Stage Map BG
20D9-20E8 Stage Map Sprite

179B-17AA Reaper Transformation
17BF-17D0 Reaper Skull 1
17D4-17E3 Reaper Skull 2
17E7-17F6 Reaper Skull 3
 
28F04-28F07 Dracula's Cape
D8A4-D8AB Pazuzu BG

1A9D-1AAC Victory BG
1AB0-1ABF Victory Sprite 1
1AE9-1AF8 Epilogue BG
1AFC-1B0B Epilogue Sprite
1B35-1B44 End Title BG

17AE-17BD Konami Logo BG


There may be more I have missed because of all the fades and whatnot, which I always just assumed were arithmetic like in the battle with Death but may have in fact been scripted.

No comments:

Post a Comment

©TheouAegis Productions™. Powered by Blogger.