PeterTillema / ICE

ICE Compiler for the TI-84 Plus CE
22 stars 1 forks source link

Custom Palette Not Displaying Correctly #139

Closed programmer2514 closed 5 years ago

programmer2514 commented 5 years ago

I tried to use a custom palette, but instead of getting the top-left tile in this: TileMap_Small I got this: effect I will post more info in the comments

programmer2514 commented 5 years ago

Here is the source code:

iDGNDTCTV
"000020E6250714C7831F00002528A0E7A0E7A0E78CCB08CB94840C63A0E688AB18C510A508CB9CC588CB21298C649CC60CEC90851CE6254B8822A50894A6A10904218CCC1D0990EC0CEC8CCBA52A9CE894C798A514A588431085296C31AD9063296C148408CB31AE98C7B9F090ED18E8108418A439EF88AA42538C4298C6AD6CCA964EB60CEB35CF0CEC8CEC252A98C814C79463C232110D9C83A94B31AD18E7A0E708CBCA9631AD35CE20A4CEB63E321CE852F89CE84AB690ECD2D83A1114A5B9CF0CECAD8DB1AE4AB6D6F92D8DA9281D09112F2CA2DB1AA1082D8C4A9518C6B1AE52D7B5AE90EC35F046958CCBAD6DA54B18634A95D2D7A0C60CECC2111550CEB731CFA0E7AD8D9442294AD6F92D8D110EB4C5902298E8BCE3C675AD8D8C014EB6CA95A96C4ED7C674E318CA95182131AEB18DCA952CC452F80CECCE96FEE0571904AAB5AF410131CE6DE4CEB74EB6C6959CA546743905C501CEB7C253C653E9A208CB2D8DDD824EB6B8C14EB5D14241235719ACA418E7DB1A0D0D9001AD8D298D5F3ACA95CA96298C7A0220E64EB64674CA9631AEE5C47625C921B1AE20624A95516488CB56F818420CED1C61A063EB9DB1AF5F5B4A956E05DB1A4A95A4C44D412DAE5B3B31AE2D8D10C7D985DB3ADAD66F7BDF3B8CA7637C4D43F1E24A964D228CEC5AF7E739FA67E33B0CEDD2950C220CC9C54410EB24E64E73FEC78CCA"→PALETTE
LoadData("DDTILES",0,3)→TILEA
det(0
det(4,PALETTE,512,0
det(57,TILEA,0,0
Pause 
det(1

convpng.ini:

#AppvarICE          : DDTILES
#PNGImages          :
 TileMap_Small

#GroupICE           : tileset_gfx
#OutputPaletteArray : true
#Tilemap            : 32,32,true
#PNGImages          :
 TileMap_Small

convpng.log:

opened convpng.ini

--- tileset_gfx (ICE) ---
building palette with [256] available indices ...
built palette with [256] indices.
palette quality : 100.00%
1:
 TileMap_Small : 100.00%

exporting appvar: DDTILES.8xv
 TileMap_Small

converted in 0 s

finished!

tileset_gfx.txt:

| convpng v7.1
| this file contains all the converted graphics

tileset_gfx_pallete | 512 bytes
"000020E6250714C7831F00002528A0E7A0E7A0E78CCB08CB94840C63A0E688AB18C510A508CB9CC588CB21298C649CC60CEC90851CE6254B8822A50894A6A10904218CCC1D0990EC0CEC8CCBA52A9CE894C798A514A588431085296C31AD9063296C148408CB31AE98C7B9F090ED18E8108418A439EF88AA42538C4298C6AD6CCA964EB60CEB35CF0CEC8CEC252A98C814C79463C232110D9C83A94B31AD18E7A0E708CBCA9631AD35CE20A4CEB63E321CE852F89CE84AB690ECD2D83A1114A5B9CF0CECAD8DB1AE4AB6D6F92D8DA9281D09112F2CA2DB1AA1082D8C4A9518C6B1AE52D7B5AE90EC35F046958CCBAD6DA54B18634A95D2D7A0C60CECC2111550CEB731CFA0E7AD8D9442294AD6F92D8D110EB4C5902298E8BCE3C675AD8D8C014EB6CA95A96C4ED7C674E318CA95182131AEB18DCA952CC452F80CECCE96FEE0571904AAB5AF410131CE6DE4CEB74EB6C6959CA546743905C501CEB7C253C653E9A208CB2D8DDD824EB6B8C14EB5D14241235719ACA418E7DB1A0D0D9001AD8D298D5F3ACA95CA96298C7A0220E64EB64674CA9631AEE5C47625C921B1AE20624A95516488CB56F818420CED1C61A063EB9DB1AF5F5B4A956E05DB1A4A95A4C44D412DAE5B3B31AE2D8D10C7D985DB3ADAD66F7BDF3B8CA7637C4D43F1E24A964D228CEC5AF7E739FA67E33B0CEDD2950C220CC9C54410EB24E64E73FEC78CCA"

Please tell me if I'm doing anything wrong. Thanks.

PeterTillema commented 5 years ago

I'm sorry to say, but this is not an ICE bug. ICE correctly sets the palette you gave it, so please report this to Mateo instead.

mateoconlechuga commented 5 years ago

Use convpng 7.3 and later: https://github.com/mateoconlechuga/convpng/releases/tag/v7.3

programmer2514 commented 5 years ago

I used the version included in the latest version of CEdev.

PeterTillema commented 5 years ago

Yes, that's wrong:

<@P_T> In which order do you write the palette to the output in ICE? Big endian or little endian?
07:40:05 <MateoC> big
07:40:12 <@P_T> And in C format?
07:40:14 <MateoC> little
07:40:32 <MateoC> I was never given specs for ICE
07:40:33 <MateoC> :P
07:40:39 <@P_T> >.>
07:40:49 <@P_T> Well, there is your issue :P
07:40:52 <MateoC> fine :P
07:40:55 <MateoC> P_T++
07:41:26 <MateoC> https://github.com/mateoconlechuga/convpng/blob/master/ice_format.c#L56
07:42:06 <MateoC> Also it's not little or big P_T.
07:42:20 <MateoC> It's a palette
07:42:33 <MateoC> meh, I guess I'll have to fix it
07:42:53 <@P_T> Whatever, do something until it works :P
programmer2514 commented 5 years ago

OK. Thanks