mauiaaron / apple2

Apple //e emulator
http://deadc0de.org/apple2ix
GNU General Public License v3.0
32 stars 3 forks source link

Graphics flickering is not always due to incorrect VBL/timing #16

Closed mauiaaron closed 5 years ago

mauiaaron commented 8 years ago

Some graphics "flickering" glitches are manifesting (Airheart, Karateka, ...) due to flaws in how the emulator renders to its internal framebuffer. Fixes are slated for next Android release and will be added to mainline develop branch hopefully "soon".

There are other deeper flickering glitches due to incorrect timings. Correcting these will not be trivial but are being considered ;-)

jvernet commented 8 years ago

Latests changes add flickering to TEXT mode (try the French Touch demos: they whre working before).

mauiaaron commented 8 years ago

Yes I just noticed that. So I won't be bringing that commit to the main develop branch for now. I believe it is due to improper synchronization between the render thread and VBL timing. Compiling with -DVM_TRACING=1 can see the French demos writing to Mockingboard and then switching between MAIN and AUX memory (RAMRD switch).

For now I won't bring that commit to main develop branch ... it will stay on my personal experimental rebase branch until fixed and more tests are written =)

mauiaaron commented 8 years ago

@jvernet : you can apply the following patch to locally fix NSCT.dsk. I will need to figure out a better mid-term solution of course which should include more platform tests =)

diff --git a/src/display.c b/src/display.c
index 07a3576..de2af47 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1232,6 +1232,7 @@ static inline void _currentPageAndBank(uint32_t currswitches, drawpage_mode_t mo

     *page = !!(currswitches & SS_PAGE2);
     *bank = !!(currswitches & SS_RAMRD);
+    *bank = 0;
 }

 uint8_t *video_currentFramebuffer(void) {
mauiaaron commented 5 years ago

Believe this is no longer an issue