[Wiki]Everything there is to know about TAS Mode

I’m getting a scrambled mess when I try to flip a sprite. Is the lasted femto pokittolib up to date?

This bug was fixed after the last FemtoIDE release. New FemtoIDE and PyInSky releases will be made later today.

2 Likes

Cool :sunglasses:

1 Like

PyInSky and PokittoPython examples updated. :+1:

4 Likes

@FManga
Looks like line endings have been lost (both in PyInsky and PokittoPython) for the “Tilemap” and “Tilemap TAS” projects. I checked that they are stille there in the zips I delivered.


Edit: Also “\” chars that should be before the line endings are missing.

1 Like

I don’t suppose there’s a 16 colour mode at all?

You can use 16-color bitmaps with TAS by calling Pokitto::Display::setColorDepth(4) and drawing them with drawBitmap. That’s how PyInSky works.

I tried to use 16-color tiles in TASMODE, but it does not look correct.
I called Pokitto::Display::setColorDepth(4) and changed my (only) tile to 16-color mode.

image

It works when using 256-color tiles and setColorDepth(8). This is how it should look like.
image

The Tilemap class would have to store the bpp per tile for that to work, which isn’t the case; additionally, TAS’s underlying screen tilemap isn’t storing either the bpp per cell (only a pointer to a 8bpp bitmap of the right size) as well.

I’m not aware of a global bpp that would allow it to run in 16-color either for all tiles.

@carbonacat: If the color depth is set to 4 when Pokitto::Display::update is called (ie, before calling Core::update()), then all the tiles are drawn in 16-color mode.

@Hanski: is that how you’re setting the depth?

2 Likes

I am calling setColorDepth(4) during the game initialization. Does something set it back to 8?

Found it. The pixelCopySolid4BPP() function actually treats 0 as a transparent pixel :wink:
Works after the change below.

void pixelCopySolid4BPP(uint8_t *line, const uint8_t *src, uint32_t w, uint32_t sx){
    while(w--){
        auto b = (sx&1)?
            src[sx>>1]&0xF:
            src[sx>>1]>>4;
        //!!HV if(b) *line = b;
	*line = b;
        line++;
        sx++;
    }
}

2 Likes