87Fermer89
HPMANLe 01/11/2016 à 16:10
NeoHomeBrew (./86) :
1.) SC1Put - function

Since there is no example available how to use this function, I am not sure if this way is correct?

SC1Put(0x0000+64+6, 0x08, 20, bg_shadow.maps[0]); // VRAM SC1 start + sprite-number*64 + tile-number*2, tile count, palette-number, tile-map pointer of source image

This example copies to sprite strip 1 into the 4th tile the data of 8 tiles with palette-number 20 of the source image "bg_shadow".
But it starts always from the first tile of the source image - how I could start copying for instance from 5th tile of the source image?
uint *shadowMap; shadowMap=(uint*)bg_shadow.maps[0]; SC1Put(0x0000+64+6,0x08,20,&shadowMap[4]); //5th tile

NeoHomeBrew (./86) :
2.) SC234Put - function

palJobPut(24, bg_shadow_Palettes.palCount, bg_shadow_Palettes.data); // set-up palette 24
SC234Put(0x0000+512+7, 0x1800); // VRAM SC1 start + sprite-nr*64 + tile number*2+1, first 2 digits of the WORD is the palette-no. in hex

In this example I want to write the data of palette number 24 to the palette of the 4th tile of spritestrip 8 (which contains the same image like "bg_shadow" but with a regular (brighter) palette). It works but the order of the colors seems to be wrong and it results in a messed-up palette - is there a way to assign the colors of the palette in a correct order?

Did you generate palettes separately? You can't be sure how colors end up sorted with buildchar with two different files.
If your picture is 16 colors, process a single picture, and have first two tiles hold palettes (just draw a 15px color strip). Have color order sorted accordingly into thoses color strips. Ii will generate a single picture with the two palettes.
Not sure if that's clear fou