Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > HSP/DMA delay and screen corruption
2008-03-06 02:30
gregg
Account closed

Registered: Apr 2005
Posts: 56
HSP/DMA delay and screen corruption

I'm currently experimenting with HSP/DMA delay e.g. horizontal scrolling with $d011. I'm doing it by switching on the DEN bit at the right time in line $30. So far, so good, but there's screen corruption in the first line:



It looks like the VIC doesn't fetch the correct color data. I don't understand why this is happening. Can anyone explain, please? And is it possible to avoid this?
 
... 12 posts hidden. Click here to view all posts....
 
2008-03-07 06:32
Oswald

Registered: Apr 2002
Posts: 5048
I did it with a dec/inc d011 pair. I dont understand you, resetting d011 only later will cause the vsp creating d011 write do a linecrunch aswell?
2008-03-07 08:02
JackAsser

Registered: Jun 2002
Posts: 1997
Quote: I did it with a dec/inc d011 pair. I dont understand you, resetting d011 only later will cause the vsp creating d011 write do a linecrunch aswell?

The DEC triggers the VSP-effect by forcing a bad line. The INC resets $d011 to it's original state, however since it's done immediately after the DEC the timing is correct for a line crunch.

However if you reset $d011 to it's original state somewhere much later, like in the bottom border you'll have the problems gregg is experiencing.
2008-03-07 08:08
HCL

Registered: Feb 2003
Posts: 726
@Oswald: You probably made your VSP on the very first line on top of the screen, and there you can (of some reason) perform this *glitch* without getting crap colors. Try somewhere else on the screen and you'll get it ;).
2008-03-07 12:37
JackAsser

Registered: Jun 2002
Posts: 1997
Quote: @Oswald: You probably made your VSP on the very first line on top of the screen, and there you can (of some reason) perform this *glitch* without getting crap colors. Try somewhere else on the screen and you'll get it ;).

Doing VSP somewhere else on the screen of course involves at least two lines of crap. First you must force the VIC into idle state $3fff-gfx using a simple inc $d011 (FLD). Then immediately dec $d011 + x-timing to force the VSP which will produce the crappy colors. Then to remove most of the crap, another inc $d011 (line crunch). This will give two very crappy raster lines that of course depending on situation can be quite nightmarish to fix.

Then again, I've never actually coded a VSP somewhere else on the screen and you have HCL. So hats of for the Tsunami XFLI AGSP mover. ;)

Practice vs Theory, Real men vs Wimps, 1337 vs Lamers etc... =)

Also one note on the "crap". It's basically the first gfx row repeated but with reusing the last char fetch. I.e. the bottom row's chars from the previous frame. This is emulated quite properly by VICE imo, it's how and where the FLI bug appears and in what color that's a bit uncertain.
2008-03-08 12:18
Oswald

Registered: Apr 2002
Posts: 5048
thanx, now its more clear.

btw.

"It's basically the first gfx row repeated but with reusing the last char fetch."

new screenmode ? ;)
2008-03-08 13:23
JackAsser

Registered: Jun 2002
Posts: 1997
Quote: thanx, now its more clear.

btw.

"It's basically the first gfx row repeated but with reusing the last char fetch."

new screenmode ? ;)


@Oswald: Used many times. F.e. if you want the same type of chars over and over again but only change the gfx in them and still use all 200 lines you can use this trick to prevent badlines alltogether for all frames. I.e. only one initial badline then NONE. I used it in Panta Rhei f.e.

It's also commonly used for kefrens bars.

Btw, it's the exact same trick to enable char row #26.
2024-05-20 21:18
JackAsser

Registered: Jun 2002
Posts: 1997
Necro-posting, but is it possible to DMA delay 40 cycles, or is 39 max? I bet 39 is max. So maximum width for a classic logo wanker is not 640, but 632. I have forgotten... please help me refresh my mind.
2024-05-20 22:07
Oswald

Registered: Apr 2002
Posts: 5048
I'm not completely sure but I seem to be getting 40

https://ibb.co/R9wCj5m

at bottom "a" is at $0400.

but its running at vice 2.4 and not x64sc :)
2024-05-20 22:21
JackAsser

Registered: Jun 2002
Posts: 1997
Quote: I'm not completely sure but I seem to be getting 40

https://ibb.co/R9wCj5m

at bottom "a" is at $0400.

but its running at vice 2.4 and not x64sc :)


Thanks Ozzie
2024-05-21 00:41
serato

Registered: Feb 2021
Posts: 7
Quoting JackAsser
…This will give two very crappy raster lines that of course depending on situation can be quite nightmarish to fix.

Huh, I only lose one line? e.g. vice-screen-2024052110335162.png
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Talent/Censor Design
Guests online: 101
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 AWE - Algo Wave Extr..  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 It's More Fun to Com..  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Lethargy  (9.3)
4 Offence  (9.3)
5 Booze Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Veto  (9.6)
3 Facet  (9.6)
4 The Sarge  (9.6)
5 Carrion  (9.5)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.047 sec.