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 > Unexpected linecrunch
2016-09-06 08:58
ChristopherJam

Registered: Aug 2004
Posts: 1378
Unexpected linecrunch

I'm sure in the past I've displayed full screen FLI just by writing a new value to $d011 every 23 cycles, and using some of the intervening time to update $d018 (ie, writing to $d011 on what vic artikel refers to as cycle 14).
However, if I have sprites zero to five enabled, and am only writing d011 every second line, it appears that I need to perform the first $d011 write for new char rows at least one cycle earlier, lest I get a linecrunch.

Any idea what's going on here?

(every two lines, I'm running something like this:
	lda#efy0+ 71:sta $d007
	lda#d18v0
	ldx#$38+1
	ldy#0
	sta $d018
	sty VM0+$3f8:iny
	sty VM0+$3f9:iny
	sty VM0+$3fa:iny
	sty VM0+$3fb:iny
	sty VM0+$3fc:iny
	sty VM0+$3fd:nop
	stx $d011


Also: not sure if it's relevant, but I stabilise the interrupt by forcing a DMA one and a half lines before the first such block of code is run, ie the first block is preceded by
	sta $d011 ; trigger badline just before effct starts; this one's just to stabilise
	nop:nop:nop:nop:nop:nop  ;extra nops because there's no sprite DMA at the end of the above DMA
2016-09-06 09:49
Oswald

Registered: Apr 2002
Posts: 5017
sprite 0-3 is fetched in left side IIRC, so they interfere with your timing I guess.

+

BA goes low three cycles before the VIC access. After that,
AEC remains low during the second phase and the VIC performs the
accesses. Why three cycles? BA is connected to the RDY line of the
processor as mentioned, but this line is ignored on write accesses
(the CPU can only be interrupted on reads), and the 6510 never does
more than three writes in sequence (see [5]).
2016-09-06 11:24
ChristopherJam

Registered: Aug 2004
Posts: 1378
Nah, right side, though six sprites doesn't leave much time before the visible area.
victimer gives the following:
[Onyx:~/c64/victimer/victimer] ./victimer -s 63 
  |                  1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 |
0 |1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 |
  |                   |===========01020304050607080910111213141516171819202122232425262728293031323334 353637383940===========|   |
--|----------------------------------------------------------------------------- -------------------------------------------------|
  |             x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x W W w            |
  |                    r r r r r g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g                 |
ss|3sss4sss5sss6   7                                                                                                 0sss1sss2sss|
  |              i   i                                                                                           i i             |
--|----------------------------------------------------------------------------- -------------------------------------------------|
  |                                ^(close sideborder)                                                           ^(open sideborder)
  |                           ^---FLI----------------->                                                      ^-----^(double line)  
  |                             ^---DMA Delay--------------------------------------------------------------^                       

 sprenable=3f 
CPU: 48 (+ 2=50) 
VIC: 12 (+ 1=13)
     63

x    - CPU regular cycles
W    - CPU write cycles
w    - CPU 3rd write cycle
c    - VIC video ram
g    - VIC color ram
0..7 - VIC sprite pointer fetches
s    - VIC sprite data accesses
i    - VIC idle accesses


I should probably see if I can duplicate the effect with sprites disabled mind.

Main thing that's confusing me is I thought linecrunch came from cancelling a DMA, not triggering a new one..
2016-09-06 20:01
JackAsser

Registered: Jun 2002
Posts: 1989
You can't "cancel" a DMA. If it started the CPU is locked until the DMA is completed. If you postpone a DMA you effectively get FLD. If you induce a DMA you get, depending on timing, line crunch or VSP. Right?
2016-09-06 20:40
lft

Registered: Jul 2007
Posts: 369
Actually, I concur with ChristopherJam on the terminology: Linecrunch cancels DMA (before it starts).

When you FLI on line 7 of a char row, VIC will be in badline state during cycle 58 (as numbered according to the VIC article). This causes RC to wrap to 0, and VIC remains in display state.

But when you FLI on every other line, line 7 will be a normal display line. During cycle 58, VIC will be in display state (not badline state). This causes VIC to enter the idle state and RC to remain at 7.

Then, if you try to FLI on the following line, you will actually trigger a VSP with offset 0. This looks like a linecrunch (VC is incremented by 40), except for some side effects (DMA, after which RC is incremented to zero). Move the "FLI" one cycle earlier, and you instead set up a regular badline, where RC is cleared on cycle 14.



Get the PDF

Hope this helps!
2016-09-06 21:35
Count Zero

Registered: Jan 2003
Posts: 1822
Idiot crackers such as me are never helped enough. Lovely thread! (gotta print the PDF in large and pin it near the mirror over my bed (next to the face of lft :) ) !!1!)
2016-09-07 04:50
ChristopherJam

Registered: Aug 2004
Posts: 1378
Quoting lft
But when you FLI on every other line, line 7 will be a normal display line. During cycle 58, VIC will be in display state (not badline state). This causes VIC to enter the idle state and RC to remain at 7.

Then, if you try to FLI on the following line, you will actually trigger a VSP with offset 0. This looks like a linecrunch (VC is incremented by 40), except for some side effects (DMA, after which RC is incremented to zero)


Ah! OK, that makes sense. TBH I should have known something was up when I needed to perform the very first DMA for the effect area one cycle earlier too; the situation is the same.

This is my first every-second-line effect and it's kind of showing. I need to study that diagram some more.

Thanks for the help :)
2016-09-07 06:28
Oswald

Registered: Apr 2002
Posts: 5017
so while the cycle counters are watching I'd like to hijack the thread :)

is it possible to repeat full char rows endlessly with one d011 write per 8 rasterlines ? about what cycle which row inside char, and what to write to d011 ? :)
2016-09-07 07:33
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: so while the cycle counters are watching I'd like to hijack the thread :)

is it possible to repeat full char rows endlessly with one d011 write per 8 rasterlines ? about what cycle which row inside char, and what to write to d011 ? :)


Yes, I did that in the chess roto zoomer in Andropolis. Or rather every 7th actually, but I suppose every 8th works as well?
2016-09-07 08:01
Radiant

Registered: Sep 2004
Posts: 639
I think it has to be every seventh. The way you do it is by triggering a badline during cycles 54-57 (IIRC) when RC=7.
2016-09-07 08:02
Radiant

Registered: Sep 2004
Posts: 639
I did it just now in "The Social Demo". :-)
2016-09-07 08:05
Radiant

Registered: Sep 2004
Posts: 639
Now that I think about it it does seem a little strange, as if one line would be lost... But that was the first thing I coded for the demo, don't remember the implementation details.
2016-09-07 09:17
lft

Registered: Jul 2007
Posts: 369
The way you normally repeat a char row is to enable the badline condition in cycle 54-57. In order to do this every 8 lines, it follows that you have to write the same number into d011 every time. But you also have to prevent the badline condition before cycle 54, so you have to write something else to d011 in between. In conclusion, you can't do it with one write per char row.

I don't immediately see how this could be done in cycle 54-57 with one write every 7th line. It seems like RC would be 6 the second time. What am I missing?

However, I think it could be possible to repeat rows by switching off the badline condition in cycle 14. This would work with partial rows, e.g. every 7th line. Then you'd utilise the resetting of RC that happens in the first half of that cycle. Is that how you do it?
2016-09-07 09:22
Radiant

Registered: Sep 2004
Posts: 639
I don't remember - it's possible I did two d011 writes for every doubled row. Will have to check my code. :-)
2016-09-07 09:26
Radiant

Registered: Sep 2004
Posts: 639
You can restart the current row by triggering a badline condition before cycle 14 (IIRC) when RC > 0. It's one way of doing FPP (if you don't mind wasting 40 cycles on a badline), though I haven't found any real use for it just by thinking about it.
2016-09-07 11:58
lft

Registered: Jul 2007
Posts: 369
Yes, but then you get DMA. The benefit of FPP with badlines is that you can select among 128 different lines per VIC bank, whereas if you do it without badlines you only get 8. But normally, the point of repeating a row is that you want to avoid badlines/DMA.
2016-09-07 13:35
Oswald

Registered: Apr 2002
Posts: 5017
dma or no dma doesnt matter, the Q is if its possible? :) could be 2 d011 writes too...
2016-09-07 13:49
Radiant

Registered: Sep 2004
Posts: 639
Quote: Yes, but then you get DMA. The benefit of FPP with badlines is that you can select among 128 different lines per VIC bank, whereas if you do it without badlines you only get 8. But normally, the point of repeating a row is that you want to avoid badlines/DMA.

I don't see how you'd get access to more possible FPP lines, given that VC doesn't change when you retrigger a line?
2016-09-07 14:31
lft

Registered: Jul 2007
Posts: 369
The trick is to put different lines in different parts of the font. For instance, (the top line of) chars 0-39 in each of the 8 font banks gives 8 different lines to choose from. Chars 40-79 give 8 more lines, etc. Then you put different chars in the top row of each of the 16 video-matrix banks. In principle, this would give you 48 different full-width lines to choose between, just by writing a different value into d018. However, you'll actually get slightly less because you have to leave room for 2x40 bytes of video matrix inside each font, so that takes away 10 chars.

If you then massage the data a bit more, you could make use of all the 128 unique values that could be written into d018. This requires re-using chars in multiple lines.

I used this technique for the wavy chessboard in Shards of Fancy, with (IIRC) 64 different lines, each with a maximum usable width of 32 chars.
2016-09-07 14:50
Radiant

Registered: Sep 2004
Posts: 639
Thanks for the explaination; makes sense! Now I just need to figure out something novel to do with it. :-)
2016-09-07 16:21
Fresh

Registered: Jan 2005
Posts: 101
Quote:

In principle, this would give you 48 different full-width lines to choose between, just by writing a different value into d018. However, you'll actually get slightly less because you have to leave room for 2x40 bytes of video matrix inside each font, so that takes away 10 chars.

Actually you always get at least 48 different full-width lines because there are 246 (256-10) available chars, thats more than 6x40. If you need even only one more, like you said, you need to either use shorter lines or check for repeatable chars.
2016-09-07 17:23
lft

Registered: Jul 2007
Posts: 369
Quoting lft
However, I think it could be possible to repeat rows by switching off the badline condition in cycle 14.


Oh, silly me. Of course we can't do it that way. The explanation is left as an exercise for the reader.
2016-09-07 18:13
Oswald

Registered: Apr 2002
Posts: 5017
"The way you normally repeat a char row is to enable the badline condition in cycle 54-57. In order to do this every 8 lines, it follows that you have to write the same number into d011 every time. But you also have to prevent the badline condition before cycle 54, so you have to write something else to d011 in between. In conclusion, you can't do it with one write per char row."

so 8th row of char row, trigger badline in cycle 54-57, then write something else ? cycle 58, is fine for that ?

Radiant, did you manage 8 lines high chars ?

benefit of this would be soft bitmapmode, with page aligned rows. or to put in another way where the HI byte changes inside row, it happens always on the same column :)

the reason I want to repeat first row is that I also want tripple buffering and fullscreen, and having 3 screens in each bank is too expensive.

so one could reserve a charset for each row, 128 chars for each row, then 40 chars inside row for each buffer.
2016-09-07 18:31
Radiant

Registered: Sep 2004
Posts: 639
Let's see now. Yes, I'm resetting d011 again on the line after the doubling, which happens on cycle 54 of each line where RC=7 (that is, each eighth line).

You'd be hard pressed to squeeze in a write cycle on cycle 58 immediately after doubling. :-) But on the next line is of course ok. I do the resetting on cycle 56 on the line after the doubling.
2016-09-07 18:46
Oswald

Registered: Apr 2002
Posts: 5017
so you have all 8 lines repeated with this? as many times as you want ?
2016-09-07 19:04
Radiant

Registered: Sep 2004
Posts: 639
25 char rows, a single badline in the very beginning of the screen.
2016-09-07 19:10
lft

Registered: Jul 2007
Posts: 369
Quoting Radiant
You'd be hard pressed to squeeze in a write cycle on cycle 58 immediately after doubling. :-) But on the next line is of course ok.


It has to be on a different line, actually. Otherwise you'd get a spurious badline somewhere during the following row. (Because YSCROLL has to have some value, and that value is going to match the raster position at some point.)
2016-09-07 19:12
Oswald

Registered: Apr 2002
Posts: 5017
okay thanks for the hints guys.
2016-09-07 20:12
Radiant

Registered: Sep 2004
Posts: 639
Idea: If you do linecrunch on the very first line of the screen and then retrigger the badline on cycle 54-57, what will happen?
2016-09-08 19:41
Digger

Registered: Mar 2005
Posts: 421
...and even forcing VIC to display 26 charlines :)
2016-09-09 10:06
Oswald

Registered: Apr 2002
Posts: 5017


It seems to be working top 3 row is the same row.

no stable raster, so I guess cycle 54-57 is not crucial. main is plotting the first char row in an endless loop, then I added some lda (),y lda (,x) shit to make sure it doesnt need stable.

$1a->d011:

4 cycles before the raster col changes on right side

$1b->d011:

in the next rasterline about on the same place (4cycles before raster col changes)


(sta d011 sta d020)

edit: stable is needed, I had jmp * instead of jmp main :P
2016-09-09 11:21
Oswald

Registered: Apr 2002
Posts: 5017
"64k ram system" doesnt gets pushed down, stays vertically in its place is this normal ?
2016-09-09 13:30
HCL

Registered: Feb 2003
Posts: 716
http://codebase64.org/doku.php?id=base:repeating_char-lines

..and as a plus, you don't necessarily need a badline at the top of the screen.. You can reuse the last charline from previous frame. Crest made a demo about that.. Which one was it?!? hmm..

<edit>Ah.. here it is :) Just an Illusion </edit>
2016-09-09 16:23
Frantic

Registered: Mar 2003
Posts: 1627
Hehe.. that was a nice one (from that codebase article):

        ldx #0 ; Make raster unstable again :)
        inc *-1
        inx
	bne *-1
2016-09-09 19:21
Oswald

Registered: Apr 2002
Posts: 5017
HCL, nice ! Timing seems to be the same as in my routine. Guess you cooked it up in 5 minutes, I needed an hour of "I have no idea what I'm doing" :)
2016-09-09 20:49
Digger

Registered: Mar 2005
Posts: 421
So, doing it Crossbow's way, it would be possible to use charset for chars 0-4 (that would be otherwise used for 40 screen chars for that line). Once VIC reads it, it can be filled again with charset data.

Trying to think of what would be the practical use for that other than memory saving... Could do a huge 256x25 chars side mover that takes virtually no rastertime... Or hires 64x25 char with ECM... Any other ideas?
2016-09-10 05:25
Oswald

Registered: Apr 2002
Posts: 5017
digger, Jackasser did horizontal twisters with this, so to change column's twist phase you only update the char pointer on top. He says tho he only used 7 line high rows doubling method.
2016-09-10 05:46
ChristopherJam

Registered: Aug 2004
Posts: 1378
Quoting Digger
So, doing it Crossbow's way, it would be possible to use charset for chars 0-4 (that would be otherwise used for 40 screen chars for that line). Once VIC reads it, it can be filled again with charset data.


Eh, if you use char indices 5-44 then definitions 0 to 4 are never used anyway :)

Quote:
Trying to think of what would be the practical use for that other than memory saving... Could do a huge 256x25 chars side mover that takes virtually no rastertime... Or hires 64x25 char with ECM... Any other ideas?


It's also handy if you just don't have enough CPU cycles free to DMA the indices; Reutastic spends the first 3/4 of each raster updating the sprite colours for the free-colour graphic on the right; the colour attributes for the stretch effect on the left are only fetched once at the start of the screen (the stretch itself is just REU blatting, mind).
2016-09-10 07:10
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: digger, Jackasser did horizontal twisters with this, so to change column's twist phase you only update the char pointer on top. He says tho he only used 7 line high rows doubling method.

That was my bro and he used 8 lines. I used similar tricks in my rotozoomer (Andropolis) but 7 lines because I wanted a bad line but still be on 00-39 offsets. During the 7 lines I calculate the new chars and since I know the offset always is 00-39 the inner-loop becomes much faster (Krill's idea, my implementation). That's also why the effect isn't full width, I only had time for lik 35 chars or so. As I side effect I can scroll the whole screen sideways almost for free.
2016-09-10 07:49
Oswald

Registered: Apr 2002
Posts: 5017
Jackie, you lost me big time.

"I wanted a bad line but still be on 00-39 offsets"

why do you need a bad line if it just reloads the very same offsets ?

"During the 7 lines I calculate the new chars "

7 lines is not enough to redraw 35 complete chars, but if you calc new char pointers, how if its a fixed 00-39 ?! :)
2016-09-10 08:07
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: Jackie, you lost me big time.

"I wanted a bad line but still be on 00-39 offsets"

why do you need a bad line if it just reloads the very same offsets ?

"During the 7 lines I calculate the new chars "

7 lines is not enough to redraw 35 complete chars, but if you calc new char pointers, how if its a fixed 00-39 ?! :)


You can refetch the char pointers, I.e. Badline without moving forward (if u do it on < line 7). Indeed I update char pointers but always on offset 00-39
2016-09-10 08:08
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: You can refetch the char pointers, I.e. Badline without moving forward (if u do it on < line 7). Indeed I update char pointers but always on offset 00-39

It's called FLI... ;) or may be not, I dunno. :P
2016-09-10 09:41
Oswald

Registered: Apr 2002
Posts: 5017
ah I get it, awesome trick. :)
2016-09-10 17:18
ChristopherJam

Registered: Aug 2004
Posts: 1378
Quoting JackAsser
During the 7 lines I calculate the new chars and since I know the offset always is 00-39 the inner-loop becomes much faster (Krill's idea, my implementation).


I did something similar with Jam Ball 2, but for different reasons. The decruncher spits out a new set of char indices every five rasters, always to the same 15 locations. Address calculation wasn't an issue as the decruncher was completely unrolled, but this way I could put all of the screen chars in zero page. Saved 15 cycles per row, and also saved 984 bytes of RAM.

(hmm, that unrolled loop would have taken a lot more ram.. Must.. resist.. revisiting..)
2016-09-11 22:38
Cruzer

Registered: Dec 2001
Posts: 1048
Great thread! I should check the CSDB forums more often. 😊
2016-09-13 11:13
HCL

Registered: Feb 2003
Posts: 716
..back to the original topic for a moment. FLI-timing *is* strange, if you start to fiddle with it. The usual FLI (each line) somehow works well with a periodic (23 cycle) write to $d011 to trigger badline. ..but if you reduce it to every 2:nd line or every 4:th line i recall the timing doesn't work the same way. I always wondered why, and i'm sure all those charts and diagrams explain why, but i rather just hammer on until it works and then i forget it :).
2016-09-13 12:27
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: ..back to the original topic for a moment. FLI-timing *is* strange, if you start to fiddle with it. The usual FLI (each line) somehow works well with a periodic (23 cycle) write to $d011 to trigger badline. ..but if you reduce it to every 2:nd line or every 4:th line i recall the timing doesn't work the same way. I always wondered why, and i'm sure all those charts and diagrams explain why, but i rather just hammer on until it works and then i forget it :).

Same here, the pragmatic approach.
2016-09-13 12:32
Radiant

Registered: Sep 2004
Posts: 639
I like hammering until it works, then I figure out why, and then I forget everything until next time. Repeat.
2016-09-13 12:33
Radiant

Registered: Sep 2004
Posts: 639
(A.k.a. the idiotic approach.)
2016-09-13 12:45
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: (A.k.a. the idiotic approach.)

nah, still pragmatic
2016-09-13 13:30
Conjuror

Registered: Aug 2004
Posts: 168
Or "brute force and ignorance" - works too.
2016-09-13 18:08
Digger

Registered: Mar 2005
Posts: 421
Seems like sideborder effect has been accidentally discovered by this code:
inc $d016
jmp *-3
2016-09-14 05:57
HCL

Registered: Feb 2003
Posts: 716
Anyone knows of a hotel in Amsterdam to sleep after the pre-party? The hotel-boat we stayed at last time was fully booked.. by c64-sceners i suppose ;). Presets:
- Walking distance from central station
- Fairly cheap but not dirty ;)
- It has to be a boat or? It's Amsterdam after all :)

<edit> FCUK, wasn't i reading the x-2016 thread!?!? </edit>
2016-09-14 09:02
chatGPZ

Registered: Dec 2001
Posts: 11115
suddenly: unexpected boat people :)
2016-09-14 09:26
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: suddenly: unexpected boat people :)

Groepaz: Time to moderate the fuck out of this thread! :D
2016-09-14 09:33
ChristopherJam

Registered: Aug 2004
Posts: 1378
Damn sceners, stealing our jobs, failing to integrate, living in enclaves, sleeping on concrete floors in abandoned milk factories.

Oh hang on, that's me…
2016-09-14 09:41
Frantic

Registered: Mar 2003
Posts: 1627
@Christopher: Yes is was nice that you showed up at the BFP in the milk factory, migrating all the way from Australia. :)
2016-09-14 10:51
ChristopherJam

Registered: Aug 2004
Posts: 1378
Can't believe that was ten years ago! Good times.
2016-09-14 19:37
HCL

Registered: Feb 2003
Posts: 716
..so noone wants to talk FLI and unexpected linecrunch anymore?! ..and worst thing is, everyone will blame me and my mis-post for it :P
2016-09-18 08:46
Peacemaker

Registered: Sep 2004
Posts: 243
hcl, you destroy the discussion ;)
2016-09-18 09:11
lft

Registered: Jul 2007
Posts: 369
Well, back on topic then. Here's a neat idea:

If you want FLI on every other line, and consistent timing for all line pairs, then my suggestion is to do FLI on the "other" lines, i.e. when RC is 1, 3, 5 and 7. Doing FLI on line 7 will then also trigger a repeat-row effect, so the subsequent line 0 will be in display mode, with VCBASE updated for the next row but with the old row contents still in the row buffer.

Use e.g. linecrunch to get started at the top of the screen.
2016-09-18 10:36
ChristopherJam

Registered: Aug 2004
Posts: 1378
Quoting lft
If you want FLI on every other line, and consistent timing for all line pairs, then my suggestion is to do FLI on the "other" lines, i.e. when RC is 1, 3, 5 and 7. Doing FLI on line 7 will then also trigger a repeat-row effect, so the subsequent line 0 will be in display mode, with VCBASE updated for the next row but with the old row contents still in the row buffer..


Ah, nice! If that works, I can free up a couple of cycles for a 7th sprite…
2016-09-19 08:16
HCL

Registered: Feb 2003
Posts: 716
Quote:
when RC is 1, 3, 5 and 7.
Yeah, that's how i usualy end up doing it.. and i guess most others also.

Another way is of course to trigger badline on line 2, 4, and 6. ..and on line 6 you directly store $d011 (and $d018?) to trigger badline on line 0 also (common 4x4-timing-style). Non-symetric code, but sometimes a good choice..
2016-09-22 04:27
ChristopherJam

Registered: Aug 2004
Posts: 1378
I've been studying the diagram Lft posted, and playing with a little sample program, and have a nice example of enabling a badline at around cycle 55 of line 7 in order to start a char row repetition after some normal display lines (thinking about doing a DMA every 3 lines for Reasons).

But it got me thinking - is there any practical reason why you might want to start a badline at the start of line 7, but then abort it in the three cycles before cycle 58? And could you even do that if you wanted to? (I'm not clear on how the cycle stealing interacts..)

Theoretically that would put you into idle mode, setting you up for an VSP immediately after a badline. I guess you might want to scroll an area directly below a FLI image with only a single black line of pixels between then?
2016-09-24 22:22
Digger

Registered: Mar 2005
Posts: 421
Is it possible to somehow delay Color RAM reads vs Screen RAM reads with this? Or does CR + SR read always come in sync?
2016-09-25 06:35
ChristopherJam

Registered: Aug 2004
Posts: 1378
Quote: Is it possible to somehow delay Color RAM reads vs Screen RAM reads with this? Or does CR + SR read always come in sync?

Doubtful I'm afraid. They happen on exactly the same cycle (there's a 12 bit wide data bus on the chip), so the reads aren't even interleaved.
2016-09-25 06:54
Oswald

Registered: Apr 2002
Posts: 5017
thats a topic I've never thought of, how does the VIC manage to adress screen and color mem at the SAME time ? lower adress lines doubled to d800 ?
2016-09-25 08:29
ChristopherJam

Registered: Aug 2004
Posts: 1378
Quoting Oswald
thats a topic I've never thought of, how does the VIC manage to adress screen and color mem at the SAME time ? lower address lines doubled to d800 ?


Pretty much, though the details are a bit messy.

Main address bus is multiplexed low byte/high byte, so the same latch that holds the low 8 bits for ROM access also feeds d800, and address bits 8 to 11 leaving VIC are also duplicated non-multiplexed, for reading from d800 and charrom; at least if I'm reading the circuit diagram from the back of the c64 PRG correctly. The D800 chip only has 10 address line inputs, of course.
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
TPM/Silicon Ltd
Andy/AEG
fox/bonzai
Krill/Plush
Arcane/Glance
JEZ
Alta
Jetboy/Elysium
Guests online: 146
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Antitrack  (9.8)
4 Mr Zero Page  (9.8)
5 OTD  (9.8)

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