Page 1 of 1

Palette Indexes [BUG?]

Posted: Tue May 21, 2013 9:50 pm
by SuperFXMaster
Hi there guys,

To make things straight to the point, look at the Grit options I gave to it:

For one BG:

Code: Select all

# Tile format, 8BPP
-gt
-gB8

# 24 palette entries
-pn24

# Map data reduced for 8BPP, SBB format
-m
-mR8
-mLs
For another, working-together BG:

Code: Select all

# Tile format, 4BPP
-gt
-gB4

# 7 palette entries, indexes: [8, 14]
-pn7
-ps8
-pe14

# Map data reduced for 4BPP, SBB format
-m
-mR4
-mLs
Well, I am a lot surprised, because the palette output Grit gives me for the former BG is:

Code: Select all

	.section .rodata
	.align	2
	.global forestPal		@ 48 unsigned chars
forestPal:
	.hword 0x0010,0x0000,0x0C82,0x108B,0x20EF,0x1D46,0x1DA8,0x0DE5
	.hword 0x2D95,0x2D7F,0x2A18,0x16CD,0x26EC,0x465F,0x3EDD,0x033F
	.hword 0x2FB5,0x27D5,0x53FD,0x43FF,0x53FF,0x6FFF,0x7FFF,0x7FFF
All right, that's what I expect.

But, for the latter:

Code: Select all

	.section .rodata
	.align	2
	.global forest_backPal		@ 16 unsigned chars
forest_backPal:
	.hword 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
No, I did not zeroed all the palette entries. And I don't expect this output T_T
The reason I am doing this is to make the two BGs coexist, with the former occuping all the first 24 entries of the GBA BG palette, and the latter almost the space left in the 4BPP bank. Look at part of it:

Image

The red mark is where I want to put the latter palette. But it's all zeroed!!!

Correct me if I am wrong, but I think Grit has a bug.

Att.
SuperFXMaster

Re: Palette Indexes [BUG?]

Posted: Wed May 22, 2013 6:42 pm
by SuperFXMaster
Whoops, what a misunderstanding!!!!

The palette index options are indexing into the IMAGE file palette, not the output palette!!!
What I want to do has somethin to do with -pS, shared data.

Please, close the topic, and I am so sorry.

Att.
SuperFXMaster

Re: Palette Indexes [BUG?]

Posted: Thu May 23, 2013 12:50 pm
by sverx
If you try using

Code: Select all

-pn7
removing

Code: Select all

-ps8
-pe14
do you get it correct?

Re: Palette Indexes [BUG?]

Posted: Thu May 23, 2013 4:29 pm
by sverx
btw you should either use -pn or -pe