Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Marksman ! (Registered 2017-10-23) You are not logged in 
CSDb User Forums


Forums > C64 Coding > VSP bug with DEN manipulation
2017-10-04 11: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
 
... 7 posts hidden. Click here to view all posts....
 
2017-10-05 17:57
Oswald

Registered: Apr 2002
Posts: 4094
iirc you can do vsp anywhere outside of the display area so no need to jump trough hoops to hide fli dma shit ? but even when I did it mid screen by "tearing" an idle line with FLD to do it there (hence otherwise wont work) I dont remember having to linecrunch.
2017-10-05 19:32
Krill

Registered: Apr 2002
Posts: 843
Quoting Oswald
no need to jump trough hoops [...] I dont remember having to linecrunch.
That's because you probably used a black background! :D
2017-10-05 20:14
Oswald

Registered: Apr 2002
Posts: 4094
Quote: Quoting Oswald
no need to jump trough hoops [...] I dont remember having to linecrunch.
That's because you probably used a black background! :D


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 :)
2017-10-05 21:04
lft

Registered: Jul 2007
Posts: 303
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 21:15
JackAsser

Registered: Jun 2002
Posts: 1243
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 21:19
JackAsser

Registered: Jun 2002
Posts: 1243
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 21:35
JackAsser

Registered: Jun 2002
Posts: 1243
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 10:23
Oswald

Registered: Apr 2002
Posts: 4094
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 10:25
Oswald

Registered: Apr 2002
Posts: 4094
screen produced:

2017-10-06 10:55
JackAsser

Registered: Jun 2002
Posts: 1243
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
Trash
Steel/SCS & TRC/G★P
LocalH/BCI
Kakka/Extend, Damone..
pcollins/Excess
Scooby/Light
JEZ
Jazzcat/Onslaught
Metal Maniac/Dual Crew
Grue
Tom-Cat/Nostalgia
Skrjablin/Hokuto Force
Guests online: 63
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Lunatico  (9.6)
6 Quad Core 100%  (9.5)
7 Comaland 100%  (9.5)
8 Incoherent Nightmare  (9.5)
9 Wonderland XII  (9.5)
10 Comaland  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.6)
2 Synthesis  (9.6)
3 Dawnfall V1.1  (9.5)
4 Daah, Those Acid Pil..  (9.5)
5 Treu Love [reu]  (9.4)
6 Field Sort  (9.4)
7 Dawnfall  (9.3)
8 KAOS 64  (9.3)
9 Hardware Accelerated..  (9.2)
10 Globe 2016 [reu]  (9.2)
Top Groups
1 Booze Design  (9.4)
2 Pond  (9.4)
3 Censor Design  (9.4)
4 Oxyron  (9.4)
5 Crest  (9.3)
Top Mega Swappers
1 Nightshade  (9.4)
2 Aslive  (9.3)
3 R.C.S.  (9.3)
4 Calypso  (9.2)
5 Dishy  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.52 sec.