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 > Misaligned Char reads ?!
2019-01-02 23:56
Oswald

Registered: Apr 2002
Posts: 5094
Misaligned Char reads ?!

I was just fooling and found this.

the code does this:

near but well before the left border edge :

lda $d012 ;8
clc ;10
adc #$02 ;12
and #7 ;14
ora #$18 ;16
sta $d011

and 8 cycles after that:

lda $d012 ;8
clc ;10
adc #$00 ;12
and #7 ;14
ora #$18 ;16
sta $d011 ;20

as I add #2 to d011 in the first write I thought this could be used to rotate the characters, because the misalignment is exactly 2 lines, but the misalignment stays 2 even if I write 3 to d011 (while trying 0-7 in the 2nd d011 write, well most cases results in fld), or change starting rasterline 1 line lower, etc.

anyone can explain this?





yeah.. only tested in emulator. 3.3 x64sc has same results as older vice and non sc.
 
... 10 posts hidden. Click here to view all posts....
 
2019-01-05 07:21
Oswald

Registered: Apr 2002
Posts: 5094
* this originally repeated top 2 pixel lines of the first char row, the 2nd d011 write was an lda before I came back to this, what I've changed was to reinstall the 2nd d011 write and I removed the delay between those 2 d011 writes. then some random hacking of d011 values, maybe delay too dont remember.

My current theory is that there is 2 chars of vsp and maybe that can be connected to 2 lines of misalignment in the char reads. tho I dont rule out that whats visible is just a mere mix of already known VIC effects.
2019-01-05 15:57
Krill

Registered: Apr 2002
Posts: 2980
This appears to be a combination of repeated char rows and FLI, in this order.

Note that the apparent misalignment is 1 rasterline (not 2), such that a char seems to be rotated upwards by a line, with its first line displayed at its bottom.

Emphasis on "seems", as there is neither actual rotation nor misaligned char reads.

Look at the first and second char rows. The chars in the first row are displayed normally, while the first rasterline of the second char row shows the first line of the chars in the first row. Which means there are 9 rasterlines with the content of the first char row at the top of the screen.

Now, when going from a char row to the next, there is no badline initially, and the chars are repeated for the first rasterline of a char row.
In the next rasterline, DMA is forced by triggering a badline condition, but late enough to trigger FLI rather than a normal badline (note the 3 $ff chars).
Starting with the second rasterline of a char row, updated content is displayed, i.e., the new char row.
The first line will finally be displayed in the next char row.
2019-01-05 16:38
Martin Piper

Registered: Nov 2007
Posts: 722
How about these few lines of apparent 0xff?
2019-01-05 16:55
Krill

Registered: Apr 2002
Posts: 2980
FLI DMA is triggered a few cycles later there.

The timing is off for a few lines until it eventually settles thanks to repeated FLI DMA triggering (which can be used for stable raster purposes).

Note that you can control the amount of repeated chars (the first two columns in the original picture) and thus move the 3 $ff chars by adding or removing cycles in the loop.
2019-01-05 17:18
Oswald

Registered: Apr 2002
Posts: 5094
ah Gunnar you got it ! :) row doubling cancelled by fli.
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
St0rmfr0nt/Quantum
MWR/Visdom
Holy Moses/Role
Trap/Bonzai
Walt/Bonzai
iceout/Avatar/HF
grasstust/Hoaxers
Mike
Alakran_64
HOL2001/Quantum
Fred/Channel 4
Steffan/BOOM!
Airwolf/F4CG
The MeatBall
csio/monarchy c+4
Unlock/Padua/Albion
Case/Padua
DJ Gruby/TRiAD
Guests online: 133
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 Layers  (9.6)
2 No Listen  (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 Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

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