My WIP video game "Airport" will feature a 2-player mode, where screen is split horizontally. My intention was to perform the following steps:
1. Modify drawing environment to the left half of the screen;
2. Draw everything related to player 1's view.
3. Modify drawing environment to the right half of the screen.
4. Draw everything related to player 2's view.
5. Modify drawing environment to occupy the whole screen.
6. Draw common GUI elements (clock, score, etc.)
7. Go to step 1.
All instructions are being passed to the DMA, even modifying the drawing environment. While it works perfevtly under emulation, it makes screen flickering under real HW. I discovered the following statement on Nocash's PSX specs:
I've tried inserting NOPs (GP0(00h)) both before and after without success. See source code here:GP0(E3h..E5h) do not take up space in the FIFO, so they are probably executed immediately (even if there're still other commands in the FIFO). Best use them only if you are sure that the FIFO is empty (otherwise the new Drawing Area settings might accidently affect older Rendering Commands in the FIFO).
Game.c (see GameGraphics())
https://github.com/XaviDCR92/Airport/bl ... rce/Game.c
https://github.com/XaviDCR92/psxsdk-201 ... /src/gpu.c
Thanks for reading,