When compiling my games with VBCC I am experiencing some random behaviors with VDU commands.
Sometimes VDU commands are missed depending on the optimization options selected with the VBCC.
It looks like a compiler bug but... maybe it is the hardware... So I ask the experts here.
Does the 6845 require some time to be ready to process new commands? I ask because this is the case with some other VDP graphics chips.
Do I need to insert one NOP instructions after each call to $FFEE? or worse do I need to check (somehow) that the chip is ready?
I have included a simple test program that fails when compiled with (default) no optimization and does work with the -O1 option.
The attached pictures show the wrong and expected result.
The test program needs a linker cfg for mode 5:
(i.e., same as default linker cfg vlink.cmd but with HIMEM = 0x5800; )
I am also getting a weird glitch in one of my games even with -O1. So -O1 is not going to fix all issues.
Sometimes VDU commands are missed depending on the optimization options selected with the VBCC.
It looks like a compiler bug but... maybe it is the hardware... So I ask the experts here.
Does the 6845 require some time to be ready to process new commands? I ask because this is the case with some other VDP graphics chips.
Do I need to insert one NOP instructions after each call to $FFEE? or worse do I need to check (somehow) that the chip is ready?
I have included a simple test program that fails when compiled with (default) no optimization and does work with the -O1 option.
The attached pictures show the wrong and expected result.
The test program needs a linker cfg for mode 5:
(i.e., same as default linker cfg vlink.cmd but with HIMEM = 0x5800; )
I am also getting a weird glitch in one of my games even with -O1. So -O1 is not going to fix all issues.
Statistics: Posted by Fabrizio — Tue Nov 12, 2024 1:11 am