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 > $d011 trickery – duplicated text lines
2011-04-29 21:39
Digger

Registered: Mar 2005
Posts: 448
$d011 trickery – duplicated text lines

Does any one know the $d011 trick to repeat the first char row? I am trying to cancel badlines on the 8th line of each charline (between cycles 54-57) but it doesn't work. The first line gets duplicated but only twice.
 
... 57 posts hidden. Click here to view all posts....
 
2019-11-03 09:27
ChristopherJam

Registered: Aug 2004
Posts: 1424
Yes, except it doesn't actually fetch the characters, so the internal row buffer remains unchanged.
2019-11-03 10:03
Oswald

Registered: Apr 2002
Posts: 5127
ok while we're at it can you explain last row stretch with internal counters? I'm staring at the VIC article but the more I stare at it the less sense it makes. like RC is never incremented after reaching 7 by these rules:

"In the first phase of cycle 58, the VIC checks if RC=7. If so, the video
logic goes to idle state and VCBASE is loaded from VC (VC->VCBASE). If
the video logic is in display state afterwards (this is always the case
if there is a Bad Line Condition), RC is incremented."

so RC=7, we go to idle state, thus RC is not incremented hence it is only incremented in display state.

I'm thinking of stretching the last pixel row, to get the 8 high char line I want.

ok not possible hence my last is 7th not 8th, and that stretch only works on 8th.

only straw left is repeat 1st line but that adds only a badline, urgh.
2019-11-03 10:35
Oswald

Registered: Apr 2002
Posts: 5127
ok I guess I get it, if *sometime later* there is badline then will we go back to display state and increment rc. whenever.
2019-11-03 10:53
ChristopherJam

Registered: Aug 2004
Posts: 1424
Yup, exactly.

Lft's done a nice PDF of the timing, you can find it at https://www.linusakesson.net/programming/vic-timing/
2019-11-03 11:03
JackAsser

Registered: Jun 2002
Posts: 2038
Quote: Yup, exactly.

Lft's done a nice PDF of the timing, you can find it at https://www.linusakesson.net/programming/vic-timing/


Yes. Do read this. It takes a while to understand how to interpret it but once you learn it all VIC-tricks are easy to figure out.
2019-11-03 14:28
Oswald

Registered: Apr 2002
Posts: 5127
already used this pdf, but not the how rc /vc works part, that still needs a lot of thinking :)

fex, I can not explain how/why last row stretch works.
2021-11-20 19:31
Rastah Bar
Account closed

Registered: Oct 2012
Posts: 336
I noticed something strange, could someone explain this to me, please?

I create a badline after cycle 14 on every 4th rasterline, starting on line $30. I also opened the borders. In text mode you can see the memory wrap around: the last 5 rasterlines on the text screen start with the characters in memory locations $07e8 and so on, with colors from $dbe8 and so on.

On rasterline $30 the last byte from each character in $0400 ... is visible, but in the colors from $dbe8 and so on. This caught my attention since I expected the screen ram and color ram memory addresses to match.

If I do the same thing in hires bitmap mode, rasterline $30 now shows the colors from rasterline $f8, but in bitmap mode these colors are determined by screen ram.

So in plain text mode data from $0400 ... is shown in rasterline $30, while in bitmap mode data from $07e8 ... seems to be used.

I'm seeing this in VICE 3.5, Hoxs, and micro64.
2021-11-21 01:49
Krill

Registered: Apr 2002
Posts: 3098
Quoting Rastah Bar
On rasterline $30 the last byte from each character in $0400 ... is visible, but in the colors from $dbe8 and so on. This caught my attention since I expected the screen ram and color ram memory addresses to match.
Both addresses should match, as they're coming from one and the same counter in VIC.

It seems like you're linecrunching right from the top of the screen. When you do that, there is no badline DMA in line $30 (otherwise you'd see the first, not the last, pixel row of the characters). Instead, whatever was put in the line buffer in the previous frame is displayed.

But colours and characters should come from matching addresses. Are you sure there is a mismatch?
2021-11-21 04:20
Martin Piper

Registered: Nov 2007
Posts: 739
Perhaps a picture would help? :)
2021-11-21 11:33
Rastah Bar
Account closed

Registered: Oct 2012
Posts: 336
Yes, there is a mismatch as you can see in the pictures in text mode and bitmap mode.

https://i.postimg.cc/qvLzbQ3D/text-mode.png
https://i.postimg.cc/WbsVWVwj/hires-bitmap-mode.png

The first character row $0400 ... $0427 is filled with inverse space.
Addresses $dbe8 .. $dbff contain 0,1,2,3,4,5,7,8,0,1, ...
Addresses $07e8 .. $07ff contain 0,0,ff,ff,ff,ff,0,0,0,0,ff,ff,ff,ff, ...
The first stripe in the right border is at line $2f
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - 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
Han
Aomeba/Artline Desig..
REBEL 1/HF
kbs/Pht/Lxt
Sokratekk
Mason/Unicess
Guests online: 221
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Shine  (9.5)
4 Mermaid  (9.5)
5 Pal  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.054 sec.