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: 359
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.
2016-10-22 20:02
Oswald

Registered: Apr 2002
Posts: 5094
r u sure you time it right? sounds like youre either too early or too late.
2016-10-22 20:09
Monte Carlos

Registered: Jun 2004
Posts: 359
no, i tested every cycle in the applicable range.
if i switch border to broad a rasterline earlier than the badline and then go every cycle through of setting border back to normal, then first left and right border are broad until i add one cycle and then both borders are normal.
Btw: X64 lets me switch during a badline, but X64sc and original hw not.
2016-10-22 21:07
lft

Registered: Jul 2007
Posts: 369
You'd have to reset to narrow border in cycle 55. (It needs to be wide during the badline DMA, then become narrow before the first half of cycle 56.) But you can't do that, since the write access will happen on cycle 12 instead.
2016-10-22 21:11
Monte Carlos

Registered: Jun 2004
Posts: 359
Ok, but what is the difference than to the other way round, when one opens the border?
Isn't it the same cycle the write has to be performed?
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: 359
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: 11386
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: 359
No, i meant using reu and dma transfer to $d016
2016-10-23 06:33
Oswald

Registered: Apr 2002
Posts: 5094
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
Account closed

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?).
 
... 42 posts hidden. Click here to view all posts....
 
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
E$G/HF ⭐ 7
Mason/Unicess
Smasher/F4CG
algorithm
acrouzet/G★P
csabanw
Guests online: 102
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (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.044 sec.