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 > VSP bug with DEN manipulation
2017-10-04 09:24
Senbei

Registered: Dec 2014
Posts: 1
VSP bug with DEN manipulation

Ciriciao,
the whole VSP bug detection/fixing/avoiding is extremely catching, but there's one thing I'm not sure of and can't find it in the discussions so far: the VIC-II article mentions that VSP (or DMA delay) can also be achieved by manipulating DEN in line #30 (display enable, bit 4 of D011) instead of YSCROLL.
With this technique YSCROLL stays at 000 the whole time and the bad line is triggered at the right cycle by another means.
Does the VSP bug happens also in this case?

SNB
 
... 10 posts hidden. Click here to view all posts....
 
2017-10-05 19:04
lft

Registered: Jul 2007
Posts: 369
Oswald, that's the yscroll method.

JackAsser, I think perhaps Monte Carlos is talking about how to test for VSP crashiness, like VSP Lab is doing. Depending on what bits you change in yscroll, the timing is slightly different. But I don't agree with his conclusion. I'd say that the DEN method is one extra case to check for (not eight; yscroll must be 0 when using the DEN method), so now there are 57 test cases.
2017-10-05 19:15
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Oswald, that's the yscroll method.

JackAsser, I think perhaps Monte Carlos is talking about how to test for VSP crashiness, like VSP Lab is doing. Depending on what bits you change in yscroll, the timing is slightly different. But I don't agree with his conclusion. I'd say that the DEN method is one extra case to check for (not eight; yscroll must be 0 when using the DEN method), so now there are 57 test cases.


Ahh ok, yeah he probably meant that!
2017-10-05 19:19
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: probably, but if one doesnt vsp mid screen this problem shouldnt arise.

btw I always just did dec d011 inc d011, is that den bit or yscroll? I saw it somewhere and just went with it :)


:)

dec $d011 = vsp
inc $d011 = line crunch

So yeah, you also did it but didn’t know about it. Try leave out the inc and watch the FLI bug.
2017-10-05 19:35
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: :)

dec $d011 = vsp
inc $d011 = line crunch

So yeah, you also did it but didn’t know about it. Try leave out the inc and watch the FLI bug.


(Sorry for being OT, this is the y-scroll method. Just want to illustrate it a bit)

Here's a little snippet to illustrate it Oswaldo. Just wrote it into the monitor. It performs VSP without the line crunch activated. I opened the borders so that you see what's going on properly:

.C:c000  78          SEI
.C:c001  2C 11 D0    BIT $D011
.C:c004  10 FB       BPL $C001
.C:c006  2C 11 D0    BIT $D011
.C:c009  30 FB       BMI $C006
.C:c00b  A9 1B       LDA #$1B
.C:c00d  8D 11 D0    STA $D011
.C:c010  A9 32       LDA #$32
.C:c012  CD 12 D0    CMP $D012
.C:c015  D0 FB       BNE $C012
.C:c017  48          PHA
.C:c018  68          PLA
.C:c019  48          PHA
.C:c01a  68          PLA
.C:c01b  48          PHA
.C:c01c  68          PLA
.C:c01d  CE 11 D0    DEC $D011
.C:c020  EA          NOP
.C:c021  EA          NOP
.C:c022  EA          NOP
.C:c023  A9 FA       LDA #$FA
.C:c025  CD 12 D0    CMP $D012
.C:c028  D0 FB       BNE $C025
.C:c02a  A9 13       LDA #$13
.C:c02c  8D 11 D0    STA $D011
.C:c02f  A9 00       LDA #$00
.C:c031  8D FF 3F    STA $3FFF
.C:c034  4C 01 C0    JMP $C001


Replace c020 with INC $d011 to activate the line crunch and squish the FLI-bug into one raster line, well hidden under the border. If done mid-screen one might want to use illegal gfx-mode on that line to have it all black. I did that in the scroller for the hidden line vector part in the 1990-demo, where you see one line of black between the vector and the scroller.
2017-10-06 08:23
Oswald

Registered: Apr 2002
Posts: 5094
nice, that explains why vsp always seemed to eat away one char row for me, thank you :) I always thought only dec has effect and inc just restores the value.

more questions:

- why is the fli bug teared up horizontally
- why it ends up on the left side on screen
- where do chars come from on top row, left from the fli bug?
2017-10-06 08:25
Oswald

Registered: Apr 2002
Posts: 5094
screen produced:

2017-10-06 08:55
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: nice, that explains why vsp always seemed to eat away one char row for me, thank you :) I always thought only dec has effect and inc just restores the value.

more questions:

- why is the fli bug teared up horizontally
- why it ends up on the left side on screen
- where do chars come from on top row, left from the fli bug?


- why is the fli bug teared up horizontally
Dunno

- why it ends up on the left side on screen
Dunno

- where do chars come from on top row, left from the fli bug?
It's the last bad line fetch from the previous frame. Try the following to illustrate:
> 7c0 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
Previous - 1 | 2 - 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
csabanw
crayon/Hokuto Force
goto80/HT
DanPhillips
Peacemaker/CENSOR/Hi..
Guests online: 95
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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