Page 1 of 5

Raster split and $9002

Posted: Sat Aug 05, 2017 11:40 am
by beamrider
Can someone elaborate on the effects of setting this register to zero from within an raster split IRQ as what I am observing isn't what I expected.

Within the IRQ handler, I set $9002 to zero, waste some CPU... then revert it.

I expected the lines to be skipped but it appears as though the rendering is being delayed instead (or at least some of it).

I tried setting $9000 to an off-screen location and reverting instead [which seems to be slightly better].

Any ideas?

Re: Raster split and $9002

Posted: Sat Aug 05, 2017 1:28 pm
by tokra
This would be a good starting point for your investigations I think:

http://sleepingelephant.com/ipw-web/bul ... 464#p80464

Have a look at 4mat's demo-part and see what he does with VICE-breakpoints.

Also see my post further down that thread and Mike's explanation of my FLI104-mode. There might be something in there to help you as well.

Please let us know what you find out.

Re: Raster split and $9002

Posted: Sun Aug 06, 2017 3:22 am
by beamrider
Thanks, that was interesting reading.

So it seems that the timing of adjustment of $9002 is crucial otherwise the character line gets repeated further down the screen. As mentioned I've had more success 'turning off' the display for a number of rasters by setting $9000 to a value just off the right edge of the screen.

It's taken me several weeks of experimentation to come up with a set of values that work, but I think this piece of the puzzle is solved at least. Thanks.

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 5:55 am
by beamrider
Image

Continuing my experiments, I have a raster split about 2/3 down the screen and wanted some stable status text in the area in red. I'm double buffering and smooth scrolling the top section so for various reasons I positioned the lower red screen area at $0000 in memory and rendered my text accordingly.

I already learned that the vertical position $9001 is only latched in the VBI therefore any text in the red area jumps around in tandem with the scrolling above, so I compensated by pixel offsetting the rendered characters with a converse shift.

I thought it was working [albeit with some unexplained flickering and occasional character corruption] as evident from the image above, but after testing on the real hardware I found that that the red status area is completely blank...

Any explanations..?

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 6:43 am
by Mike
If you can construct a minimal test case, which shows the difference between real h/w and current build of VICE, just file a bug report in the bug tracker of VICE.

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 8:23 am
by beamrider
see the attached demo [revised in later post]...

scroll around with joystick.

On a real Vic 20, the text is missing and there are a few flickery display artefacts just below the black line.

I'll maybe file a bug report later...

(n.b. the slight flickering/display corruption that occasionally occurs in the upper scroll region was introduced by rendering this static text, but this could well be my code).

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 9:28 am
by beamrider
:oops:

arghhh, turns out the text was being rendered outside the CRT display area in VICE.. Good job I hung off on that bug report.

[edit]
not entirely blameless though, the revised attachment displays perfectly in VICE (PAL), but on a real Vic-20 there appears some artefacts just below the black line and the bottom of the text flickers (as you scroll vertically).

Seems this is a game of trial and error, but with my real Vic in the garage and my PC in the spare bedroom, at least it's keeping me fit :D

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 10:30 am
by Mike
I'll only have the opportunity to test on my VIC-20 during next week.

Nonetheless, is there now a difference between VIC-20 and VICE, or did you just place the text so far in the overscan area that you just couldn't see it on real hardware with CRT?

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 10:50 am
by beamrider
think our posts overlapped (answered above)

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 11:02 am
by tokra
Real VIC20 PAL
Real VIC20 PAL
VICE 33524
VICE 33524
No flicker on real VIC-20 here, although I use a TFT which just MIGHT delete the flicker... the other artifacts are harder to explain. What is displayed here? Could it be memory that is initialized differently on real machines and VICE?

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 11:14 am
by beamrider
try moving left and right.... :D

Image

it's just a prototype scrolling routine at the moment that displays some random tile data I generated from my screen designer...

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 11:19 am
by beamrider
how does this one look...?

[attachment removed - use ex4.zip in later post]

(have to move left/right and up/down to initialise everything properly - just proto code)

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 11:21 am
by tokra
beamrider wrote:try moving left and right.... :D
How?

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 11:23 am
by beamrider
joystick

Re: Raster split and $9002

Posted: Sat Aug 19, 2017 11:32 am
by tokra
On a real VIC20 the text block skips position on up/down-movement 3 chars to the left and 1 char down and back again.

Are you sure you do not rely on pre-set values for VIA-registers (timers e.g.)? This might cause such issues easily.