News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Suit Flash pt 2

Started by Mentlegen, November 18, 2017, 06:46:26 PM

Previous topic - Next topic

Mentlegen

With some help from Quote58, I was able to locate the address that controlled the suit collection flashes.

only problem is, When i edit the bytes highlighted below, i can't seem to figure out how they relate to the colors that appear during the flashes.

I need some help identifying how one byte can be used to represent a color or how these bytes function.



Any help is appretiated.


here is the code from a previous post that is said to control the suit collection flashes. bytes in orange are the ones i need clarification on.

$91D4EA A9 30         LDA #$30
$91D4EC 8D F0 0D    STA $0DF0  [$7E:0DF0]
$91D4EF A9 50         LDA #$50
$91D4F1 8D F1 0D    STA $0DF1  [$7E:0DF1]
$91D4F4 A9 80         LDA #$80
$91D4F6 8D F2 0D    STA $0DF2  [$7E:0DF2]
$91D4F9 9C F3 0D    STZ $0DF3  [$7E:0DF3]

And this is gravity:
$91D5C0 A9 30         LDA #$30
$91D5C2 8D F0 0D    STA $0DF0  [$7E:0DF0]
$91D5C5 A9 49         LDA #$49
$91D5C7 8D F1 0D    STA $0DF1  [$7E:0DF1]
$91D5CA A9 90         LDA #$90
$91D5CC 8D F2 0D    STA $0DF2  [$7E:0DF2]
$91D5CF A9 01          LDA #$01
$91D5D1 8D F3 0D    STA $0DF3  [$7E:0DF3]

PHOSPHOTiDYL

I think it's the snes color math??

Open windows calculator in programmer mode & enter the value as hex.
It'll show the binary values (ex. #$30 = 00110000).

Those are values for what bits to set for the register.
7E:0074              Value 1 for $2132 with 'A' Fixed Color Data abcddddd a = Blue b = Green c = Red ddddd = Color Data
7E:0075              Value 2 for $2132 with 'A' Fixed Color Data abcddddd a = Blue b = Green c = Red ddddd = Color Data
7E:0076              Value 3 for $2132 with 'A' Fixed Color Data abcddddd a = Blue b = Green c = Red ddddd = Color Data


At least that's what I think from finding this...
$88E035 AD F0 0D    LDA $0DF0  [$7E:0DF0]
$88E038 85 74       STA $74    [$7E:0074]
$88E03A AD F1 0D    LDA $0DF1  [$7E:0DF1]
$88E03D 85 75       STA $75    [$7E:0075]
$88E03F AD F2 0D    LDA $0DF2  [$7E:0DF2]
$88E042 85 76       STA $76    [$7E:0076]


$2132 info for the last five bytes...
ADDRESS  : $2132
NAME     : coldata
CONTENTS : fixed color data for fixed color addition/subtraction

d7 blue
d6 green
d5 red
bit for selecting desired color

d4-d0 color brilliance data
set the color constant data for color constant
addition/subtraction

* r/g/b brightness should be set by the data of each 5-bit.

[example] red   : c0h, 3fh (b=00h, g=00h, r=1fh)
green : a0h, 5fh (b=00h, g=1fh, r=00h)
blue  : 60h, 9fh (b=1fh, g=00h, r=00h)
white : ffh
black : 00


Could also be 100% wrong on this...

Mentlegen

could you clarify how to edit these values? i think i understand what these values do now but i'm not sure how i would go about making the flash blue.

PHOSPHOTiDYL

I have no idea I have no experience with this.
The first three bits seem like a main color channel, where 100 is blue, 010 is green & 001 is red.
I'm guessing it's similar to the tileset palette editor.

000 = black.
001 = red.
010 = green.
011 = yellow.
100 = blue.
101 = purple.
110 = teal.
111 = white.

Just a thought though...

The last five bits are like the intensity of the color. You can somehow achive transparency using black.
Maybe a basic blue would be #$84 = 10000100?