On the console or with an emulator that checks that VDP2's cycle pattern allow the display of an NBG, the line scroll demo displays nothing.
The graphics is initialized on NBG1 with a 16 bpp bitmap when jo_core_init calls jo_core_init_vdp that calls __jo_init_vdp2.
NBG1 is then set to an 8bpp tilemap when jo_set_background_8bits_sprite calls jo_vdp2_set_nbg1_8bits_image.
The problem is that jo_vdp2_set_nbg1_8bits_image doesn't update VDP2's cycle pattern that remains set to the value that allows the display of NBG1 as a 16 bpp bitmap. Cycle pattern value displayed by Kronos v2.6.1 in VDP2 debug screen :
On the console or with an emulator that checks that VDP2's cycle pattern allow the display of an NBG, the line scroll demo displays nothing.
The graphics is initialized on NBG1 with a 16 bpp bitmap when
jo_core_init
callsjo_core_init_vdp
that calls__jo_init_vdp2
. NBG1 is then set to an 8bpp tilemap whenjo_set_background_8bits_sprite
callsjo_vdp2_set_nbg1_8bits_image
.The problem is that
jo_vdp2_set_nbg1_8bits_image
doesn't update VDP2's cycle pattern that remains set to the value that allows the display of NBG1 as a 16 bpp bitmap. Cycle pattern value displayed by Kronos v2.6.1 in VDP2 debug screen :What prevents the display of NBG1 8bpp tilemap is that there's no access for its pattern name (it would show as a nibble set to1).
Adding a call to
slScrAutoDisp
at the end ofjo_vdp2_set_nbg1_8bits_image
in vdp2.c solves that issue :Resulting cycle pattern :
In fact,
slScrAutoDisp
should be called each timescreen_flags
is modified, which isn't the case in NBG1 related functions in vdp2.c.