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"?
2005-02-14 15:58
Cruzer

Registered: Dec 2001
Posts: 1048
interesting... i've never heard of these features/bugs b4.
2005-02-14 18:29
Graham
Account closed

Registered: Dec 2002
Posts: 990
that is because the VIC does not read any data from memory at that cycle, but it reads the data which has been on the bus the cycle before which always is the next opcode fetched. sorry to break your dreams, but it is indeed impossible to read $D800. the only thing you can do is use different opcodes and get different colors that way.
2005-02-14 19:57
Cybernator

Registered: Jun 2002
Posts: 154
Graham wrote:
> but it is indeed impossible to read $D800

Even the magic word fails after all these years. :)

@Copyfault: Ever considered writing an emulator? God knows what features you'll come up with if you start the project. :)
2005-02-14 20:14
Hoogo

Registered: Jun 2002
Posts: 105
I'm not too involved into copyfaults experiments, but I am a welcome victim to his bla $d011-tortures ;-)
If there are no stupid program-bugs in his routines, it seems that the "...color from last fetched opcode..." is not correct...
After the sid-thing he did a more simple test within the sprite-positions of the vic, that means he used the vic-registers like RAM and placed part of his FLI-Routine there. The routine worked, that means the processor fetched his opcodes from the VIC. But the color of the bug was taken from RAM beneath the VIC.
2005-02-14 20:37
Graham
Account closed

Registered: Dec 2002
Posts: 990
i dont believe in this mysterious ram access, because that would mean that VIC and 6510 use the same bus at the same time.

but i don't see the problem anyway: just generate the FLI-code according to the color required in the FLI-bug area that line and you're done.

http://www.oxyron.de/html/opcodes02.html

you find a fitting opcode for all 16 colors :)
2005-02-14 20:50
Hoogo

Registered: Jun 2002
Posts: 105
Well, you can still hope for a bug in copyfaults code until you try it yourself :-)
I did such a more colorful FLI about 10 years ago, so it's not a practical problem. Krill would say "...you guys think to much..."
2005-02-14 21:10
Graham
Account closed

Registered: Dec 2002
Posts: 990
@copyfault: my guess is that the value is fetched with PLA mapping for VIC:

$0000-$0FFF = RAM
$1000-$1FFF = CharROM
$2000-$8FFF = RAM
$9000-$9FFF = CharROM
$A000-$FFFF = RAM
2005-02-14 21:15
Cybernator

Registered: Jun 2002
Posts: 154
Hoogo wrote:
> Krill would say "...you guys think to much..."

I thought that was HCL. :)
2005-02-14 21:34
Hoogo

Registered: Jun 2002
Posts: 105
Maybe it was HCL... :-) At least I remembered that there was somebody who said something.
2005-02-14 21:40
Copyfault

Registered: Dec 2001
Posts: 478
Graham, you are the master of not-believing-things-that-are-not-understood-yet;))

My "dream" was not to write a FLI_routine with different colorram_values for every line, but to activate the_whole area_, meaning to have a colorram_access every 8 pixels. This has been proven impossible now - unfortunatly!

The only confusing thing is that the colornibble is taken from RAM(I can send sources,or feel free to test on your own!). The VIC_article indeed tells us that within the (BA=low & AEC=high)-phase, the 6510 is still considered the bus master! Only due to this line in the article I started the tests!

When I showed my results to Hoogo, his next guess was that after writing to $D011, the VIC would disturb the bus in a way so that also the processor reads from RAM, even if it should continue within the IO_area! This guess was very quickly proven wrong - so it must be due to the VIC's inner workings!

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! So I don't see why it does not work...
 
... 40 posts hidden. Click here to view all posts....
 
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
Andy/AEG
Devil/Clique
sln.pixelrat
DivertigO
rtiainen
Twilight/Excess/Arcade
E$G/HF ⭐ 7
t0m3000/hf^boom!^ibx
Alakran_64
wil/VCC^CTG
CA$H/TRiAD
psenough
The Syndrom/TIA/Pret..
DuncanTwain
csabanw
Bansai/BSILabs
MagerValp/G★P
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 Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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