2018山东两会 新华网

Anything C64-related not covered below.
百度 从下周一(3月26日)开始,成都将按照《道路交通安全法》等相关法规,对此类在驾车过程中有会妨碍安全行车的违法行为,进行罚款200元记2分的处罚。

Moderator: Lemoners

Post Reply
vol.litwr
William Wobbler
William Wobbler
Posts: 117
Joined: Sat Aug 04, 2012 5:16 pm

6502 actual speed

Post by vol.litwr »

What is the real 6502 speed at the different computer systems? I've made all calculations for the C16/116/+4/232/364. 6502 often uses double frequency mode with the mentioned computers. See the next tables.

Code: Select all

PAL
  frequency             0.887 MHz
  total cycles          312*57 = 17784
  normal screen cycles  112*109 + 150*65 + 50*22..25 = 23058 + 150?
  screen blank cycles   312*109 = 34008
  screen blank with NTSC bit on         312*109*1.25 = 42510

  average CPU freq
          norm           1.154 MHz
          blank          1.7 MHz
          ntsc           2.12 MHz

NTSC
  frequency             0.895 MHz
  total cycles          262*57 = 14934
  normal screen cycles  62*109 + 150*65 + 50*22..25 = 17608 + 150?
  screen blank cycles   262*109 = 28558

  average CPU freq
          norm           1.061 MHz
          blank          1.711 MHz
My knowledge about c64 is not perfect but I've also made the same calculations for it.

Code: Select all

PAL
  frequency             0.985 MHz
  total cycles          312*63 = 19656
  normal screen w/o sprites cycles   287*63 + 25*20..23 = 18581 + 150?
  screen blank cycles   312*63 = 19656

  average CPU freq
          norm           0.933 MHz
          blank          0.985 MHz
        with sprites     ?

NTSC
  frequency             1.023 MHz
  total cycles          262*63 = 16506
  normal screen w/o sprites cycles    237*63 + 25*20..23 = 15431 + 150?
  screen blank cycles   262*63 = 16506

  average CPU freq
          norm           0.958 MHz
          blank          1.023 MHz
     with sprites        ?
So C16/+4 PAL standard (after power on) CPU frequency is about 1.154 MHz, the maximum frequency with disabled screen may be more than 2.12 MHz! :)

It looks like that c64 is the slowest 6502 system. :? Can anybody help with www links or calculations for the C128, VIC-20, Atari 800, Apple ][, BBC Micro? What is the effective C64 CPU speed with sprites? Thanks in advance.
2x2=4
User avatar
stu232
Zorro
Zorro
Posts: 1092
Joined: Tue Jul 31, 2012 12:15 am
Location: Glasgow
Age: 54

Post by stu232 »

C64 uses a 6510 MPU not the 6502. ;)
6581 Baby!
User avatar
Fr?hn
Rick Dangerous
Rick Dangerous
Posts: 2035
Joined: Mon Jan 13, 2003 9:01 pm

Re: 6502 actual speed

Post by Fr?hn »

vol.litwr wrote:

Code: Select all

PAL
  total cycles          312*63 = 19656
  normal screen w/o sprites cycles   287*63 + 25*20..23 = 18581 + 150?
  screen blank cycles   312*63 = 19656
This is not entirely correct, the BA for the badlines may cost 3-1 cycles not 3-0, and 1 is a rare case unless you actually force that situation.

So: You got 312*63 = 19656 cycles per frame, except for 41-43 cycles lost on 25 rasterlines. 43 is the most common case, 42 happens sometimes and 41 is rare. So basically you can use 18581 cycles for calculations, might be 18586 at times but thats not a big difference.

Code: Select all

NTSC
  total cycles          262*63 = 16506
  normal screen w/o sprites cycles    237*63 + 25*20..23 = 15431 + 150?
  screen blank cycles   262*63 = 16506
Based on wrong numbers. A normal NTSC VIC2 has 263 rasterlines and 65 cycles per rasterline. Means:

17095 cycles on a blank screen, 16020 cycles on a normal 40x25 screen.
It looks like that c64 is the slowest 6502 system.
Slow in CPU speed maybe, but if you consider the lesser CPU workload due to big and flexible hardware sprites + SID, it is more powerful than a lot other 8 bit machines for many jobs.
What is the effective C64 CPU speed with sprites? Thanks in advance.
Depends on how many sprites you use (sprites can be multiplexed by software too so the limit is not 8. It depends on which vertical positions they have, if Y-expansion is enabled etc etc. Impossible question to answer.

Examples: If you display 112 sprites (yes that has been done), you are left with ~13000 clock cycles. If you only display 8 sprites, it depends on multiple factors. Clock cycles left are between 17741 and 18224.
User avatar
Fr?hn
Rick Dangerous
Rick Dangerous
Posts: 2035
Joined: Mon Jan 13, 2003 9:01 pm

Re: 6502 actual speed

Post by Fr?hn »

vol.litwr wrote:Can anybody help with www links or calculations for the C128, VIC-20, Atari 800, Apple ][, BBC Micro?
Ok let's start:

C128 is similar to C64, but in 2 MHz mode you have to take 5 DRAM refresh cycles per rasterline into account:

Code: Select all

C128 PAL

blank screen: 312*(126-5) = 37752 -> 1.892 MHz

normal screen with 2 MHz enabled in border area:
200*63 + 112*(126-5) - 43*25 - x = 25077 - x -> less than 1.257 MHz

(x is the amount of cycles needed to switch between 2 MHz mode and 1 MHz mode by software)
VIC20 is easy: No difference between blanked and normal screen.
User avatar
Fr?hn
Rick Dangerous
Rick Dangerous
Posts: 2035
Joined: Mon Jan 13, 2003 9:01 pm

Post by Fr?hn »

Now A800, this one is VERY difficult because it has 14 different screenmodes and many of them have entirely different DMA uses. So let's limit to 40x24 character mode which is pretty much standard text mode there:

312 rasterlines * 114 cycles per line = 35568 cycles per frame.

Since 9 DRAM refresh cycles are used per rasterline, it's 312*9 less: 32760

Bitmap DMA is per displayed rasterline, usually 40 bytes so it's 24*8*40 less: 25080

Now character mode also has badlines, like on C64 or C16 which are 40 cycles per character line, so it's 24*40 less again: 24120

On each badline, not 9 but only 1 refresh cycles are done, so we have to add 24*8 cycles again: 24312

Endresult is 1.212 MHz for a normal screen and 1.633 MHz for a blanked screen (PAL).
vol.litwr
William Wobbler
William Wobbler
Posts: 117
Joined: Sat Aug 04, 2012 5:16 pm

Post by vol.litwr »

[Fr?hn] Thank you very much! :D Sorry for the wrong NTSC numbers. Did you say that vic-20 doesn't have bad lines at all? Does it have 312*63 cycles per screen?
It looks like that c/plus4 is the fastest 6502-based computer for the calculations. It is even faster than C128. Wow! 8O
2x2=4
User avatar
Fr?hn
Rick Dangerous
Rick Dangerous
Posts: 2035
Joined: Mon Jan 13, 2003 9:01 pm

Post by Fr?hn »

vol.litwr wrote:Did you say that vic-20 doesn't have bad lines at all? Does it have 312*63 cycles per screen?
The VIC20 doesn't have any badlines. That's a result of the twice as low resolution.
It looks like that c/plus4 is the fastest 6502-based computer for the calculations. It is even faster than C128. Wow! 8O
Not in the C128s 80 column mode, that one uses a 2nd video chip which has it's own RAM, so you can have 2 MHz enabled all the time during display without interfering with the 80 column video chip DMA.
vol.litwr
William Wobbler
William Wobbler
Posts: 117
Joined: Sat Aug 04, 2012 5:16 pm

Post by vol.litwr »

But C/Plus4 (PAL) gives more than 2 MHz with easy but a bit dirty trick with NTSC bit. So if you want to solve a big set of equations it will be 5% faster than C128 @ 2Mhz. :wink: Maybe only Apple IIc Plus @4MHz will be faster. But it is late 1988 accelerated computer.
2x2=4
User avatar
Lando
Jack The Nipper
Jack The Nipper
Posts: 895
Joined: Tue Jan 01, 2002 11:19 pm
Location: UK
Age: 54
Contact:

Post by Lando »

Have a look at what a 264 can do with this speed: Metamerism


Yeah... impressive. More so if you can copy it over and see it running on the real hardware but emulators like Yape do a fantastic job with it too. Has to be seen to be believed! :wink:

Just for the record tho we love both machines and never think otherwise. Just some friendly discussion of the C64's sister machine.
Cheers! :D
Rybags
Mikie
Mikie
Posts: 533
Joined: Fri Mar 17, 2006 1:21 am

Post by Rybags »

Atari Lynx does around 3.6 - 4 MHz.

Fastest standard 6502 computer from the factory, without tricks or screen blanking/distortion would be probably be the BBC Model B.

Ram access is supposedly @ 4 MHz which allows non-intrusive interleaving of CPU/graphics/refresh access, so the CPU runs at the full 2 MHz regardless of graphics mode.
I did a test program decades ago vs Atari/C64 and it seems to confirm it (3 deep loop decrementing A,X,Y - BBC was quickest)

Note that switching a Plus4 to NTSC mode could mean generating a non-displayable screen, or at the least one that strays far from defined standards.
adric22
Jack The Nipper
Jack The Nipper
Posts: 652
Joined: Mon Sep 07, 2009 3:48 pm
Location: Fort Worth, TX
Age: 50
Contact:

Post by adric22 »

Lando wrote:Have a look at what a 264 can do with this speed: Metamerism
Wow! I've never seen that one before! That was one of the most impressive Plus/4 demos I've ever seen! I especially liked the "glossy" surfaces on some of the animations, that really brought them to life. I felt like I was watching something for the Amiga or PC.
vol.litwr
William Wobbler
William Wobbler
Posts: 117
Joined: Sat Aug 04, 2012 5:16 pm

Post by vol.litwr »

[Rybags] To use Atari Lynx for the calculations?! 8O It is interesting to test speed of BBC Micro and C128. :idea:
2x2=4
User avatar
thierry
Joe Blade
Joe Blade
Posts: 268
Joined: Mon Jan 19, 2009 2:59 am
Location: Argentina
Age: 50
Contact:

Post by thierry »

dont forget the PAL-N version ( Drean Commodore ) i think is the fastest C64
Post Reply

Who is online

Users browsing this forum: maximillian and 4 guests