Giter Club home page Giter Club logo

Comments (3)

scarybeasts avatar scarybeasts commented on June 14, 2024

Interesting. This command line uses -fast without -accurate, which uses a different paint path.

I think this might be a simple-ish fix: in video_paint_timer_fired(), if you move the line "p_video->has_paint_timer_triggered = 1;" outside of all "if" statements, does that work without any side-effects?

from beebjit.

scarybeasts avatar scarybeasts commented on June 14, 2024

(Also, it should in theory be possible to remove the -cycles command line parameter and rely on the -exit-on-max-frames to handle the exit.)

from beebjit.

ojwb avatar ojwb commented on June 14, 2024

I think this might be a simple-ish fix: in video_paint_timer_fired(), if you move the line "p_video->has_paint_timer_triggered = 1;" outside of all "if" statements, does that work without any side-effects?

It fixes my reduced testcase and my original testcase and it doesn't break BBCMicroBot's testsuite (though that's not all that thorough - for example, it doesn't currently test "clapperboard" mode, so didn't catch this breakage).

It looks like it probably doesn't make a difference exactly where this line gets moved to, but FWIW this is the exact patch I tested with:

diff --git a/video.c b/video.c
index 01c7d7e6..0245b052 100644
--- a/video.c
+++ b/video.c
@@ -1259,12 +1259,12 @@ video_paint_timer_fired(void* p) {
                timing_get_total_timer_ticks(p_video->p_timing));
   }
 
+  p_video->has_paint_timer_triggered = 1;
   if (!p_video->externally_clocked) {
     /* For accurate mode, this triggers the start of painting, and paint will
      * occur at the usual 50Hz virtual time.
      */
     if (timing_timer_is_running(p_timing, timer_id)) {
-      p_video->has_paint_timer_triggered = 1;
       video_wall_time_vsync_hit(p_video);
       /* A bunch of unconsumed framing changes will have built up. Clear the
        * the flag so the screen isn't immediately cleared after the first paint.

from beebjit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.