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 > Colorram access within FLI_Bug_area
2005-02-14 15:08
Copyfault

Registered: Dec 2001
Posts: 478
Colorram access within FLI_Bug_area

Quite some time ago it was Hoogo who came up with the following idea: why not try to activate the colorram access in the FLI_bug_area?

How does one have such an idea? Well, the VIC_article tells us that the colordata is not read because the chip_select input of the colorram is not active - unless the processor doesn't _by chance_ want to read the next opcode from the colorram!

Hm, this was interesting enough to give it a try! So I made a routine that causes a badline on the correct cycles, but the opcode that does this write_access to $D011 is placed at $D7FE - yes, in an area normally occupied by SID_mirrors (this works with a little tweaking, at least on the machines I tested)! So the 6510 does read the next opcode from $D800... on purpose ;))

Unfortunatly I got a result that I do not really understand! The colorram access was not activated by this hack, but the VIC rather read the data for the color from RAM! This means in my code the lownibble of $D800 of the C64's RAM is responsible for the color, and the VIC always reads it from this position. I made further examinations and found out that WHENEVER your Opcode that causes the BL lies in the IO-area (e.g. by misusing the Sprite X/Y-Pos_regs for your code;)), the colordata is always read from the adress that follows after the write_opcode - but from the RAM!

Can anyone here explain this... "feature"?
 
... 40 posts hidden. Click here to view all posts....
 
2005-02-14 21:42
Cybernator

Registered: Jun 2002
Posts: 154
Apparently the VIC still accesses the memory (i.e. it doesn't read what has been left on the data bus), but it can't do proper addressing. In fact, it's the address bus that gets locked. Why doesn't the same happen with the screen memory? Instead it reads $ff... It has something to do with the processor's lines I guess, since that happens during phi2.
2005-02-14 21:50
Hoogo

Registered: Jun 2002
Posts: 105
-VICE shows the same behaviour as the original C64?
2005-02-14 21:59
Cybernator

Registered: Jun 2002
Posts: 154
Tell you what, kidnap Andreas and make him reveal everything.

Why's everyone looking at me like that? I'm just making a suggestion... For the sake of science. :)

Whether the VIC will read from RAM or from IO space, it depends on the DR ($01) register. I don't know how is this connected to the PLA, but maybe that's the reason the VIC reads the RAM (i.e. the PLA doesn't get the correct value).
2005-02-14 23:48
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Cybernator:

no, the processor port ($00/$01) has nothing to do with the VIC. the VIC will always read RAM except for $1000-$1FFF and $9000-$9FFF.

the reading of $FF reflects the reading of tristate. those bits are not actually read from the bus.


@copyfault:

why is it so puzzling? the first read cycle stops the cpu, but during that cycle the cpu still provides an adress while the VIC already told the PLA to enable VIC memory mapping.
2005-02-15 07:51
HCL

Registered: Feb 2003
Posts: 728
You guys think too much ;). Fullscreen (i)FLI == Royal Arte :D.
2005-02-15 08:43
Oswald

Registered: Apr 2002
Posts: 5094
"But what does the VIC prevent from reading the colorram_data? It has an own bus for accessing the colorram, and with this hack I made, even the chip select input of the colorram is active!"

colorram_data with own bus = $d800 for me, and that is read even under that strange 3 cycles. you mix up things.
2005-02-15 09:28
Cybernator

Registered: Jun 2002
Posts: 154
I mixed things up with $01. HCL's right afterall. :)

Ok, VIC reads the RAM, but the colorram is in the IO area. When it reads the color, it always accesses the colorram, not the RAM beneath. The puzzling thing is why doesn't the same happen during these 3 cycles.

This has to be tested in VICE. Copyfault, please send me the proggy when you can.

@Oswald: Nope, it's the bitmap that is read during those 3 cycles.
2005-02-15 12:45
Graham
Account closed

Registered: Dec 2002
Posts: 990
the question is rather why it reads opcodes for foreground color at all? it is wellknown and very proveable that the VIC indeed does that, but if you look at it's 12 bit bus this should be impossible since the $D800 ram never gets accessed through the lower 8 bits which are connected to the normal ram.
2005-02-15 14:03
Krill

Registered: Apr 2002
Posts: 2980
Quote: Hoogo wrote:
> Krill would say "...you guys think to much..."

I thought that was HCL. :)


No, i got the (C) (TM) on that sentence.

Well, i remember saying that sentence (i was referring to loader timing issues or so), but that does not prevent any co-incidental events like someone else (HCL) saying that same sentence, too ;)
2005-02-15 14:40
Copyfault

Registered: Dec 2001
Posts: 478
@Hoogo: yes, my code also runs under VICE; I already told you - did you forget;)?

@Graham: your explanation sounds good; the first read cycle stops the cpu, but during that cycle the adress to read the following op is already selected. Now the VIC told the PLA to switch to RAM on the half_cycle directly before. Voila, we get the colordata from RAM!

I think I am too much relying on the VIC_article; it says that the VIC would indeed try to get colorram_data over his colorram_bus! This simply seems to be wrong...

@Oswald:good point! What does the VIC actually access within those "X"_cycles? the normal g_accesses take place (it reads the bitmap), but all c_accesses seem to get lost! And the Colorram is also read during a c_access, isn't it?
Previous - 1 | 2 | 3 | 4 | 5 - 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
Bansai/BSILabs
MWR/Visdom
celticdesign/G★P/M..
Sychamis
VanessaE/Digital Aud..
Magic/Nah-Kolor
Shake/Role
Guests online: 109
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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