reenigne wrote on 2023-07-21, 07:16:
I'm following the thread but I don't know what the problem is, or even if you've fixed it already.
Well, the intro (the old vs new CGA screen) is fixed now(the bug with vertical total adjust line I mentioned, the code in my last post containing code).
The cycle-accurate parts are still going wrong.
8088 MPH's racing the beam still shows those interesting patterns (see the video I made). It looks like bars (2 scanlines high) of about 4 or 2 clocks being rendered, sometimes both black, sometimes blue, sometimes flipflopping black/blue on frames (producing a flashing/blinking effect). They seem to be moving left and right with the top of the Kefrens effect in the foreground(the sinus effect from top to bottom), which is displayed in a scanline displayed on the first (even) scanline, overscan color on each second (odd) scanline, whose overscan always matches the 'background' that's the same for the entire scanline. Almost like A13 always mapping to zeroed RAM in interlaced graphics modes on the CGA during the effect with a character height of 2(1 stored in the register)? But that might be due to 808x being off a certain fixed amount of clocks on all scanlines?
What I mean with blocks of 2 scanlines high is probably one scanline being rendered in the demo with such a displacement on the raster that the ends of said scanline meet for 2 or 4 character clocks, causing such an effect.
And the blocks moving roughly in sync (more speed away from the Kefrens, less movement when close to the Kefrens), both moving right and left at the same time. So if it's Kefrens moving to the right by 8 pixels, the displacement moves to the right by 8 as well. And when the movement of the Kefrens slows down (say 4 pixels), the displaced background does too, but almost like an exponential curve faster (so moving Kefrens 8 character clocks, displacement also moves 8 character clocks. Moving Kefrens 4 character clocks, displacement moves 2 character clocks in the same direction instead). So the Kefrens sinus movement and the displacement position seem related in a exponential curve kind of way?
I also notice that on the flying saucer in Area 5150 at the end of the effect the saurcer suddenly snaps to the top of the screen and animation freezes for about 1-2 seconds before the next effect of the demo starts. It probably should do that black area over it somehow (those 2 or 3 black areas widening on top of it as in the Youtube recordings), but that doesn't happen in UniPCemu? Any idea what it's trying to do there that's failing?
Also, the effect on Chaplin and credits of Area 5150 improved a bit, although seems to display lots of black scanline on every 2nd row? That's probably the same issue as with the Kefrens on 8088 MPH, but this time it's not moving the start of the scanline vertically(it's at a fixed spot, not moving other than the effects). Of course it not moving is a good thing (stable output), but the next (each 2nd?) scanline seeming to start too early? Perhaps the 8088 being too fast (not enough cycles in some instructions) is the issue here, causing the perceived horizontal display end to be too soon/late by a fixed amount on every scanline?