Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tomek ! (Registered 2024-11-24) 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: 358
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-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: 5086
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
2016-10-23 09:21
Rastah Bar
Account closed

Registered: Oct 2012
Posts: 336
Quoting lft

All of this is described quite clearly in the vic article.

Yes, but I'm afraid mastering it requires a lot of experimenting.
2016-10-23 10:00
lft

Registered: Jul 2007
Posts: 369
Quoting Oswald
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 video interface controller is clearly an output device. (Actually, it's doing lightpen input too, but that part doesn't benefit from DMA.)

The fact that VIC reads memory directly does offer a performance advantage over solutions that involve the CPU, such as the VDC in the C128.

Quoting Oswald
The VICII is nor a peripheral


Neither is the VDC. But the VIC uses DMA and the VDC doesn't. Also, peripherals on the cartridge port have access to DMA using the exact same lines that VIC uses, and for the exact same purpose, with one exception: The peripherals also need to stay out of the way when the VIC needs the bus, because the VIC has highest DMA priority.

Quoting Oswald
Its wired into the system from day 0. There's no cpu job to speed up.


There's no CPU job to speed up precisely because the VIC has direct access to the memory.

Quoting Oswald
DMA was invented after the c64 was released.


That's incorrect. I don't know exactly when it was invented, but in this patent from 1978 for a shared DMA controller, we can read:

The concept of direct memory access is well known in the art. Generally speaking, this concept allows a central processing unit to load a subsystem device controller with the instructions and data necessary to initiate and carry out a data transfer between the memory and the peripheral device connected to and controlled by the subsystem device controller.

Quoting Oswald
But if you insist then we should call cpu mem accesses DMA too.


No, because the CPU would be involved during such accesses.
2016-10-23 10:07
oziphantom

Registered: Oct 2014
Posts: 490
VSP puts you into 39x25 mode.
2016-10-23 10:26
oziphantom

Registered: Oct 2014
Posts: 490
DMA is where something gets data from memory with out it being moved by the CPU. So the VIC grabs the data it wants we don't have to load the data into one of its registers for it to display data. Like you do on the 2600. The 128s VDC also has DMA but it gets the data from its VRAM. The VDC has a programmable DMA engine in that you can get the VDC to DMA copy data from one part of its VRAM to another. The VIC has fixed DMA.

The SID does not have DMA and to change music we must use the CPU to change the SID's registers. Paula has DMA so when she needs more sample data she will take over the bus and get her data from RAM. So the VIC,VDC DMA, the CIAs,SID don't DMA.
2016-10-23 10:59
Flavioweb

Registered: Nov 2011
Posts: 463
I can't understand one thing:
how is possible to have left border opened and right closed?
If you open border at cycle 56, it "still open" since cycle 17 of next line.
If you set "CSEL=0 to CSEL=1 in cycle 17" border still open since next line cycle 17 (From Vic Aritcle: "Likewise the
horizontal border can be prevented from turning off by switching from CSEL=0 to CSEL=1 in cycle 17")...

Or i'm missing something?
2016-10-23 11:09
tlr

Registered: Sep 2003
Posts: 1787
Quote: I can't understand one thing:
how is possible to have left border opened and right closed?
If you open border at cycle 56, it "still open" since cycle 17 of next line.
If you set "CSEL=0 to CSEL=1 in cycle 17" border still open since next line cycle 17 (From Vic Aritcle: "Likewise the
horizontal border can be prevented from turning off by switching from CSEL=0 to CSEL=1 in cycle 17")...

Or i'm missing something?


It isn't possible. The OP was about having a one char wider border on left side but normal width on the right.
2016-10-23 11:15
Monte Carlos

Registered: Jun 2004
Posts: 358
In first place this question was about making the border broad at the left and small at the right. It's just when experimenting with adding and leaving cycles you occasionally end up in opening the border, instead.

About the VSP:
I tried to VSP in line $30 to delay all the internal vic timing for the whole screen. However this did not solve the puzzle because still i was not able to broaden the left border and make normal the right border.
Do you mean i should try VSP on the same line i want the border switched?
2016-10-23 11:20
soci

Registered: Sep 2003
Posts: 479
Just use a border coloured sprite on the left side for the same effect.
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
rambo/Therapy/ Resou..
Isildur/Samar
duce/extend
Steffan/BOOM!
Barfly/Extend
Chesoner/House Designs
TLF/Sonic Uproar
katon/Lepsi De
GeirS
The Human Co../Maste..
mutetus/Ald ^ Ons
Dr. TerrorZ
Murphy/Exceed
grasstust/Hoaxers
Mojzesh/TGR🇬🇧
McGurk/Coma
psych
Tom-Cat/Nostalgia
Jammer
Epyx/TSA
Ghostrider/No Name
iAN CooG/HVSC
Kakka/Extend, Damone..
DeMOSic/MS^LSD^ONS
Guests online: 173
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Halloweed 4 - Blow Y..  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Comaland 100%  (9.6)
10 The Demo Coder  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Censor Design  (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.044 sec.