You are not logged in.
Pages: 1
In jwibagi's post about Repeating the Palette Byte in Primary Header, I saw the following information:
Time of Day
This value is split into its two nibbles:
0xX0: According to time, either morning, day, or night.
0xX1: Day
0xX2: Night
0xX3: Morning
0xX4: Cave. FLASH can be used once to activate night palettes.
0xX5: According to time, either morning, day, or night.
0xX6: According to time, either morning, day, or night.
0xX7: According to time, either morning, day, or night.
0xNX: N = 0: telephone reception; N<>0: no telephone reception[...]
I know that each palette does not have its own pointer. Rather, the palettes are just loaded starting where the 2-byte pointer at B676 (Gold)/B21A (Crystal) points to in the order of Morning-Day-Night-FlashCave-Indoors.
I'd like to know how I could use bytes X5, X6, and X7 to refer to actual palettes instead of just displaying the palette appropriate for the current time.
Last edited by Munchulax (2013-03-12 02:04:06)
“To live is the rarest thing in the world. Most people exist, that is all.” ― Oscar Wilde
Offline
Well, you've got the asm routine straigth where that "pointer" is (ld de, $775E).
It's kind long one but after looking at it for a few minutes, I'd say the part you're interested in starts at 02:764C.
Close to it, ld hl, $76CE looks for a table of 8 rom addresses (in 2-byte form) of which values are brought to hl with instruction set:
ldi a, (hl)
ld h, (hl)
ld l, a
*Before this, I think there was two add hl,de instructions.
Also, ram address D568 seems to maintain the palette byte loaded from the map's primary header.
Last edited by Miksy91 (2013-03-12 06:05:50)
Offline
Pages: 1