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 > VIC features at 2MHz
2005-12-01 11:46
Cybernator

Registered: Jun 2002
Posts: 154
VIC features at 2MHz

I'm curious as to how 2MHz change things relating the VIC features/timing. As the DOT clock is exactly 8 times the phi-2 clock, two things can happen:

1. Increase the DOT clock to 2*2MHz (~16 MHz), so that the nr. of cycles per frame doesn't change, but we have faster screen refresh.
2. Leave the DOT clock at ~8 MHz, and have more CPU cycles per rasterline.

Now that I have access to a C128 (:-DDDD) I can see the first case is incorrect. (*)

Since on C64 I can _move_ the write access in 8-pixel steps, that means on C128 I can do that in 4-pixel steps. On the other hand, VIC's I/O accesses are synced to the phi-2 clock (which is now at 2 MHz), not the DOT clock. That would mean there're still 63 cycles per rasterline, i.e. the second case is wrong as well, but then the first case would have to be correct. ;P

Another possibility is to leave VIC at 1Mhz, while the CPU is at 2MHz. But then there would be access-conflict between VIC and CPU, I guess.

Hope you understand what I'm thinking of. ;)

Btw, the CPU clock on C64 is not exactly 1 MHz, but 0.985 MHz (IIRC). Thus I guess the CPU clock on C128 is not exactly 2 MHz. So what's the exact frequency then?

Also, are there any VDC features?

Would be cool to do something with this monster sometime. ;)

Btw2, how can I use CPM? Is there a disk image available for download, and can it work with a 1541? Is there anything cool I can do with Z80 that I can't do with 8502?

--
(*) Though I'm not exactly sure
2005-12-01 13:05
Oswald

Registered: Apr 2002
Posts: 5031
imagine a 1mhz square signal.

in 1mhz mode the cpu can use the bus in the upper phases of the square wave, and the vic accesses it in the lower phases (or vice versa).

if you turn 2mhz mode on cpu will acess the buss in both cases. this means vic can no more read (and display) what it wants, it will read what the cpu has (or leaves) on the bus.

You cannot change d021 each 4 pixel. as the vic's dot clock wont change in 2 mhz mode either, but that will be clearly explained by some vic guru instead of me.

usage for vic trix the 2mhz mode was seen in risen for oblivion where xbow turned 2mhz mode on, on the sideborders, so he could display more sprites.


cpm: you just need a cartridge or a disk for the real thing, but cant help where you find any of those.

z80: AFAIK it runs too slow to compensate the drawback of its many cycle intructions. (at 1mhz?)
2005-12-01 15:55
Compyx

Registered: Jan 2005
Posts: 631
About the Z80:

In the C-128 it runs at 2 MHz, later versions of the Z-80 ran at speeds of up to 20MHz. The instruction set has some interesting instructions that can for example CMP and INC at the same time and it has 4-bit shift instructions (4x LSR/ASL/ROL/ROR in one instruction!).

Unfortunately I haven't done much coding with Z-80's so I can't really tell how it would compare to the 65xx85/xx-family of processors.
2005-12-01 17:04
CyberBrain
Administrator

Posts: 392
Sorry for going off-topic:

Can the 8502 and the Z80 run in parallel?
It could be pretty kewl to have 3 processors (incl. the diskdrive) doing some heavy math at the same time.
2005-12-01 17:09
Oswald

Registered: Apr 2002
Posts: 5031
Quote: Sorry for going off-topic:

Can the 8502 and the Z80 run in parallel?
It could be pretty kewl to have 3 processors (incl. the diskdrive) doing some heavy math at the same time.


no.
2005-12-01 17:57
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
i think Steve Judd did a comparison, from memory a 3.5MHz Z80a only manages to be about twice as fast as a 1MHz 6502 when command times are taken into consideration so the clock down that the C128 does means it's going to be crawling.
2005-12-01 20:03
TNT
Account closed

Registered: Oct 2004
Posts: 189
You could find some use for Z80 repeated memory copy/compare commands (LDDR/LDIR, CPDR/CPIR), all taking 21 T-states to copy/compare one byte, repeating max. 65536 times.
2005-12-01 20:24
Graham
Account closed

Registered: Dec 2002
Posts: 990
The Z80 memory copy/fill commands are slower than normal Z80 memcopy/fill with normal opcodes which again is slower than 8502 LDA/STA.
2005-12-05 14:12
Cybernator

Registered: Jun 2002
Posts: 154
Thanks for the replies so far.

So this 2MHz mode was not as cool as I imagined it. I'm curious as to how to switch between the CPUs, and how to access RAM above 64k? Also how can I do keyboard scan at lowlevel (talking about the additional keys).

Project64 seems to be poor on C128 stuff. I just downloaded "c128 System Guide.txt" which seems to be a large text file, but haven't looked at it yet.

Btw, another question comes to mind. How do I turn the MMU into 64 mode? (Since in 128 mode you can disable ROM images/shadows which VIC sees, and you can use different color memory banks)
2005-12-05 15:14
Ninja

Registered: Jan 2002
Posts: 407
Unlike VDC, the MMU is not available in C64-Mode.

And for the extended keys, check register $D02F (http://unusedino.de/ec64/technical/aay/c64/vic47.htm). Couldn't you imagine, that these extra-keys are accessible through the VIC? ;))
2005-12-05 15:37
Oswald

Registered: Apr 2002
Posts: 5031
also the test bit in d030 does wild things, you can get 60hz screen, and have the normal screen displayed in the top /bottom borders. Check risen from oblivion if you have a 128.
 
... 28 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 - 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
psych
Guests online: 92
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 No Bounds  (9.6)
7 Aliens in Wonderland  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Happy Birthday Dr.J  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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