johannes-fetz / joengine

Jo Engine is an open source 2D and 3D game engine for the Sega Saturn written in C under MIT license
http://jo-engine.org/
MIT License
205 stars 32 forks source link

480i 8bit TGA demo #58

Closed slinga-homebrew closed 2 years ago

slinga-homebrew commented 3 years ago

Modified 8bit TGA demo to run as 480i. It's probably better to move:

    // enable 480i
    // makefile needs to set JO_NTSC=1 and JO_480i=1
    #if defined(JO_480i)

    VDP2_CRAOFB = 0x0010 | (VDP2_CRAOFB & 0xFF0F);

    // double the size of the fonts printed by jo_printf()
    slZoomNbg0(32768, 32768);
    #endif

from main.c into core.c instead. Please let me know what you think. Credit to fafling and Ponut64 for showing me how to do this.

retrohead commented 3 years ago

Maybe use JO_VDP2_CRAOFB instead of VDP2_CRAOFB ?

slinga-homebrew commented 3 years ago

That's good advice. I switched it to JO_VDP2_CRAOFB but it causes issues. The image is no longer displaying correctly. Not sure why.

retrohead commented 3 years ago

480i corruption

Had a test, major palette issues going on here. The screenshot shows me trying to force a different palette, which is output in the printf but the 2nd palette doesn't take effect.

It doesn't seem like we would be able to load more than one palette with this and only indexed TGA's seem to work. I also tried with the hardcoded image demo and the spaceship doesn't display properly and there is some pixel warping going on.

Such a shame

johannes-fetz commented 3 years ago

I will check this Pull Request tomorrow :)

johannes-fetz commented 2 years ago

I added the code inside core.c in WIP and added PAL support, but I have to continue the implementation, because many demos doesn't work properly. Thx everyone ! :)