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 > Left/Right Border switching in middle of rasterline
2016-10-22 19:58
Monte Carlos

Registered: Jun 2004
Posts: 351
Left/Right Border switching in middle of rasterline

The last days i experimented a little with bit 3 of $d016. I had the brainfart to broaden the border on the left and keep it normal on the right. Disappointingly, this seems to work only in every non badline. If i try to switch bit 3 of $d016 during a badline i either get both left and right borders equal or i turn off the border completely for the next rasterline. Does somebody have an explanation in terms of internal VIC timing? I also tried modifying the timing with sprites or HSP to be able to write to $d016 in the correct cycle.
 
... 42 posts hidden. Click here to view all posts....
 
2016-10-22 21:30
lft

Registered: Jul 2007
Posts: 369
Nope, then you want the vic to "miss" both occasions where the border might be turned on. So you reconfigure it during cycle 56. In your scenario, you want it to "hit" the first occasion.
2016-10-22 21:50
Monte Carlos

Registered: Jun 2004
Posts: 351
So in cycle 55 DMA is still going on while in cycle 56 it's already over. That's why cpu can't access $d016 in cycle 55.
Perhaps one should try this with RamEx or SCPU?
2016-10-22 22:54
chatGPZ

Registered: Dec 2001
Posts: 11111
that doesnt enable you to write to registers when a DMA is going on either :)
2016-10-23 05:10
Monte Carlos

Registered: Jun 2004
Posts: 351
No, i meant using reu and dma transfer to $d016
2016-10-23 06:33
Oswald

Registered: Apr 2002
Posts: 5017
VICII will either read those 40 bytes on a badline or display garbage. guess which will happen with REU attached ?

btw why the fuck do anyone call that DMA ? its a total misuse of the term:

Direct Memory Access (DMA) is a capability provided by some computer bus architectures that allows data to be sent directly from an attached device (such as a disk drive) to the memory on the computer's motherboard. The microprocessor is freed from involvement with the data transfer, thus speeding up overall computer operation.
2016-10-23 07:59
Rastah Bar

Registered: Oct 2012
Posts: 336
Maybe you could postpone the badline condition until after the left border edge? Then you may be able to change $d016 in the left border and change it back again after it. Then force a badline condition. This will mess with the graphics on the badlines, I suppose. (If I understand it correctly, this is VSP, isn't it?).
2016-10-23 08:09
lft

Registered: Jul 2007
Posts: 369
Quoting Oswald
btw why the fuck do anyone call that DMA ? its a total misuse of the term


It's correct usage of the term. DMA can also be in the direction from memory to peripheral (as in the case with the VIC accessing main memory without CPU involvement). I don't know why the definition you quoted says otherwise.
2016-10-23 08:13
lft

Registered: Jul 2007
Posts: 369
Quoting Monte Carlos
So in cycle 55 DMA is still going on while in cycle 56 it's already over. That's why cpu can't access $d016 in cycle 55.
Perhaps one should try this with RamEx or SCPU?


No, DMA is going on until (including) cycle 54. But you can't write anything on the first available cycle, because that write is swallowed up during the three write-only cycles (normally 12-14).

All of this is described quite clearly in the vic article.
2016-10-23 08:41
lft

Registered: Jul 2007
Posts: 369
Quoting Color Bar
Maybe you could postpone the badline condition until after the left border edge? Then you may be able to change $d016 in the left border and change it back again after it. Then force a badline condition.


Yes, that should work.

Quote:
"Color Bar"]This will mess with the graphics on the badlines, I suppose. (If I understand it correctly, this is VSP, isn't it?).


It is VSP if the badline condition was triggered in idle mode. But you could also trigger it from display mode. For instance, you could use the "repeat row" trick to go from RC=7 to RC=0 without having a new badline. Then in the middle of that line, you can force a badline condition, which creates a partial FLI line (with the FLI bug somewhere in the middle of the line).
2016-10-23 09:02
Oswald

Registered: Apr 2002
Posts: 5017
Quote: Quoting Oswald
btw why the fuck do anyone call that DMA ? its a total misuse of the term


It's correct usage of the term. DMA can also be in the direction from memory to peripheral (as in the case with the VIC accessing main memory without CPU involvement). I don't know why the definition you quoted says otherwise.


its not correct usage, DMA is a technique to speed up I/O, esp. ment to ease up the CPU from the grunt work of copying bytes. The VICII is nor a peripheral, nor there's anything to speed up. Its wired into the system from day 0. There's no cpu job to speed up. There's no I/O. There's no peripheral.

DMA was invented after the c64 was released. How could it have DMA then ? But if you insist then we should call cpu mem accesses DMA too. Eventho it implies there's a no direct mem access too, which isnt there..

DMA stands for Direct Memory Access, a capability in modern computers that allows peripheral devices to send data to the motherboard’s memory without intervention from the CPU.

Computers that have DMA channels can transfer data to and from devices with much less CPU overhead than computers without DMA channels
Previous - 1 | 2 | 3 | 4 | 5 | 6 - 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
Martin Piper
Guests online: 123
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 Bromance  (9.6)
10 Memento Mori  (9.6)
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 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (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 Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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