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 > FLI Gray area
2015-06-30 06:43
Trash

Registered: Jan 2002
Posts: 122
FLI Gray area

Hello, I've got this idea and have no real machine to test it on.

I recently read up on how FLI actually works and found out how to manipulate the gray area of a FLI-picture using a SCPU. In principle the solution is that if you use the speed of the SCPU and write to an IO-registry once for each cycle of the three cycles that value would be seen as the colors parsed as multicolors for the left three characters.

Is this only possible since the SCPU runs async with the VIC-chip or is it possible to the same thing using a REU?

Using a REU would be something like this:
Set up transfer that is 4 bytes long, burst it into $d011, $d012, $d013 and $d014 (4 writes in 8 cycles) at the right moment. Would that result in d012-d014 would be written during the first three cycles (in the gray area) or would the behaviour be like d011 triggers badlinecondition, the vic takes over for 40 cycles and then we get our dma-transfer to d012-d014 at the right edge of the screen instead?
2015-06-30 08:37
Oswald

Registered: Apr 2002
Posts: 5022
AFAIK the grey comes from unconnected bus, thus not possible to manipulate.
2015-06-30 08:45
lft

Registered: Jul 2007
Posts: 369
The REU stalls as soon as VIC requests the bus, so I'm afraid it won't work. In principle, the REU would be allowed to perform three write cycles, but it doesn't.
2015-06-30 08:54
Trash

Registered: Jan 2002
Posts: 122
Quote: AFAIK the grey comes from unconnected bus, thus not possible to manipulate.

True, but the SCPU solution is to force values on the BUS by writing to the IO-registry that the VIC-chip sees even though the bus is unconnected.

More in detail the SCPU-code looks like this:
...
; Wait until cycle 14 on the row
lda d011table,x
sta $d011
; Takes one cycle (8 pixels) to complete
lda #colorpair
sta $d022 ;Force colorpair on bus
; Takes one cycle (8 pixels) to complete
lda #colorpair
sta $d022 ;Force colorpair on bus
; Takes one cycle (8 pixels) to complete
lda #colorpair
sta $d022 ;Force colorpair on bus
inx
...

My idea is that a REU should be able to accomplish the same thing by doing:
; Setup REU to transfer 4 bytes to $d011, $d012, $d013 and $d014
'''
ldx #$08
stx $d018
sta $df01 ; Start DMA-transfer with correct yscroll to $d011 (triggering badline at the correct place) and force colorvalues into the bus by writing to D012-d014, the DMA takes one cycle per write and should be equal to what the SCPU does
2015-06-30 08:56
Trash

Registered: Jan 2002
Posts: 122
Quote: The REU stalls as soon as VIC requests the bus, so I'm afraid it won't work. In principle, the REU would be allowed to perform three write cycles, but it doesn't.

Ok, so in theory my idea would have worked but in practice there is a no go since VIC hi-jacks the bus entirely?

To bad, towards new ideas then...
2015-06-30 10:17
Oswald

Registered: Apr 2002
Posts: 5022
too bad, scpu doom would have been better without fli bug :)
2015-06-30 16:03
Flavioweb

Registered: Nov 2011
Posts: 447
Maybe i'm wrong, but i think cpu power/speed has noting to do with FLI bug.
Simply VIC try to display, for three cycles, some gfx data that it can't have, because it can't access the bus because is in idle state.
So VIC displays value readed from $3FFF (or other addresses accordingly with mem config) using last value 'on the bus' as color data.
Unless is possible to change $3FFF value for each of these 3 idle cycles, but i guess there are some colors problems then...
2015-06-30 19:38
tlr

Registered: Sep 2003
Posts: 1717
Quote: Maybe i'm wrong, but i think cpu power/speed has noting to do with FLI bug.
Simply VIC try to display, for three cycles, some gfx data that it can't have, because it can't access the bus because is in idle state.
So VIC displays value readed from $3FFF (or other addresses accordingly with mem config) using last value 'on the bus' as color data.
Unless is possible to change $3FFF value for each of these 3 idle cycles, but i guess there are some colors problems then...


It's not from $3fff as it doesn't have the bus. I assume it's from the internal VIC-II bus which is $ff in idle.

If that is the case, it should be possible to manipulate the value assuming a read or write to the VIC-II can be achieved.
This is analogous to the sprite idle fetch discussed here: Sprite data fetch in sideborder
2015-06-30 21:57
Krill

Registered: Apr 2002
Posts: 2850
Trash: Sorry, i can't quite make out whether you actually succeeded in overcoming the FLI bug using an SCPU. Did you, or couldn't you test this on real hardware either?
2015-06-30 22:09
chatGPZ

Registered: Dec 2001
Posts: 11128
Quote:
If that is the case, it should be possible to manipulate the value assuming a read or write to the VIC-II can be achieved.

its the value that was last fetched and remains on the bus -> blackmail FLI editor
2015-06-30 22:29
Copyfault

Registered: Dec 2001
Posts: 466
Quoting Groepaz
Quote:
If that is the case, it should be possible to manipulate the value assuming a read or write to the VIC-II can be achieved.

its the value that was last fetched and remains on the bus -> blackmail FLI editor

But this value only gives colour information for the $d800-pixels, or am I wrong here?

I like the idea of forcing values on the VIC-II-Bus by means of a REU or SCPU. It breaks down to the question wether the corresponding write accesses are admitted also during blocked "="-cycles, but I guess the CPU is blocked as soon as the write cycle of the $D011-access occurs and it stays so until the end of the badline.


We badly need someone with time and hw to do the necessary tests ;))
 
... 8 posts hidden. Click here to view all posts....
 
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
Scrap/Genesis Project
REBEL 1
Unlock/Padua/Albion
Didi/Laxity
Kruthers
Jammer
Sentinel/Excess/TREX
Jetboy/Elysium
Brush/Elysium
Matt
Guests online: 134
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 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Elwix  (9.1)
5 A Life in Hell  (9.1)

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