Palette Indexes [BUG?]

Post Reply
SuperFXMaster
Posts: 2
Joined: Tue May 21, 2013 9:46 pm

Palette Indexes [BUG?]

Post by SuperFXMaster » Tue May 21, 2013 9:50 pm

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

SuperFXMaster
Posts: 2
Joined: Tue May 21, 2013 9:46 pm

Re: Palette Indexes [BUG?]

Post by SuperFXMaster » Wed May 22, 2013 6:42 pm

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

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: Palette Indexes [BUG?]

Post by sverx » Thu May 23, 2013 12:50 pm

If you try using

Code: Select all

-pn7
removing

Code: Select all

-ps8
-pe14
do you get it correct?

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: Palette Indexes [BUG?]

Post by sverx » Thu May 23, 2013 4:29 pm

btw you should either use -pn or -pe

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests