Jump to content
mytek

Overclocking the Stock 6502c: Is it Possible?

Recommended Posts

I know we live in the age of 7, 14, and even up to 20 Mhz 65816 upgrades for our trusty A8, but has anyone ever tried overclocking the stock 6502c (Sally)?

 

Overclocked.jpg.61b9c99f13528a643601424445495c67.jpg

 

It's been speculated that the stock CPU might be rated for up to 3 Mhz which isn't that far away from the primary oscillator speed (NTSC: 3.58 Mhz, PAL: 3.55 Mhz). Understandably trying to run the CPU above its specification is undoubtedly going to create considerably more heat, but perhaps with a good heat sink and a small fan that can be tolerated. If this could work, it would be a fairly simple way to double the clock speed and yield some acceleration, doing nothing more than swapping the existing CPU clock input for the one feeding the GTIA.

 

So back to my question... has anyone attempted this?

 

  • Like 2

Share this post


Link to post
Share on other sites

Many problems would ensue concerning the CPU's interactions with the rest of the system. Here's a discussion of some of them:

Ten years later, Rapidus arrived. :)

 

  • Like 4

Share this post


Link to post
Share on other sites

Thanks for the link, that proved to be informative 😀 .

 

So after perusing that thread, the info on what probably needs to happen allowed me to proceed with the first test on real hardware. I chose my 1088XLD since it already had 64K of 15 ns SRAM for the base memory. So my first stab was based on this supposedly glitch free clock switching circuit that only allows the high speed clock to come online when the SRAM is being accessed. So all other actions would be at the standard clock speed. In other words stick to the standard speed for all operations other than accessing the base 64K RAM.

 

45625_CPUClockSwitcher.thumb.png.20058e8db0f0dea6c6bf157c1e133890.png

 

Well it sort of tried to work, but I think I see my mistake in that I need to be more specific and when Antic is accessing memory, disallowing the high speed clock. As it is now both the CPU or Antic base RAM access will trigger the high speed clock into action. Back to the drawing board 🤔 .

 

  • Like 6

Share this post


Link to post
Share on other sites
1 hour ago, _The Doctor__ said:

antic can HALT that for sure... although sep antic access might present a timing challenge

Tangentially off-topic but of interest to the same concept - the team behind the amazing 7800 homebrew RIKKI & VIKKI which was released ~6 months ago use a clever (cheap!) microcontroller and new bankswitching scheme to allow SALLY and MARIA to access memory independently. If you have played or seen the game, that's part of the way they create such an amazingly advanced title on 1984-era hardware. Seriously, it looks like an SNES or Genesis title. Go check out a YT video and be blown away. 

  • Like 7

Share this post


Link to post
Share on other sites

Clock multiplying by an integer value would be handy in that it'd reduce the complexity vs something like a 1.5 multiplier.

 

Later machines DRams would likely handle it (chip suffix -12 and below) but many machines they'd be too slow.  ROM, hard to say - the 7800 has slower Rom vs Ram access speed (3 x 7.2 MHz cycles vs 2 or something? )

 

So bottom line, you'd want to induce wait states for ROM and IO space accesses and you'd need to provide the stock clock to the chipset.  You'd probably want to just replace the standard RAM entirely with an SRAM module.  So while doing that and since the speed is altered, may as well build it such that refresh cycles are ignored.

Maybe build in some compatibility smarts - how about something that senses when WSYNC has been hit, then holds the CPU to stock speed for a certain duration of time so that DLI code is less likely to have glitching.

 

  • Like 1

Share this post


Link to post
Share on other sites

Could you also gain benefits by not having ANTIC steal refresh cycles since the system is now SRAM based (1088 XEL and XLD that is)?  That could net up to 30% increases in some cases.

  • Like 1

Share this post


Link to post
Share on other sites

Yes, though I do suspect modification of the board would probably be required to keep the bus inactive at that time.

 

In the case of an SRAM replacement such logic could be built into the addon itself since much of the existing Ram select logic isn't used.

Edited by Rybags

Share this post


Link to post
Share on other sites
8 hours ago, mytek said:

I know we live in the age of 7, 14, and even up to 20 Mhz 65816 upgrades for our trusty A8, but has anyone ever tried overclocking the stock 6502c (Sally)?

 

Overclocked.jpg.61b9c99f13528a643601424445495c67.jpg

 

It's been speculated that the stock CPU might be rated for up to 3 Mhz which isn't that far away from the primary oscillator speed (NTSC: 3.58 Mhz, PAL: 3.55 Mhz). Understandably trying to run the CPU above its specification is undoubtedly going to create considerably more heat, but perhaps with a good heat sink and a small fan that can be tolerated. If this could work, it would be a fairly simple way to double the clock speed and yield some acceleration, doing nothing more than swapping the existing CPU clock input for the one feeding the GTIA.

 

So back to my question... has anyone attempted this?

 

 

Respectfully request you contact Jim Drew of CBMStuff.com (http://www.cbmstuff.com).  He recently posted on the Apple II Enthusiasts Group on Facebook about a 6502 Accelerator board he is working on that could work not only in the Commodore 8-bit computers, but also the 8-bit Apple II and Atari computers.  Here is the Facebook link:

 

 

Maybe you and he can share information and/or ideas about 6502 Acceleration, and how best to implement it in (in our case) in our beloved Atari computers?

 

  • Like 3

Share this post


Link to post
Share on other sites
3 hours ago, Stephen said:

Could you also gain benefits by not having ANTIC steal refresh cycles since the system is now SRAM based (1088 XEL and XLD that is)?  That could net up to 30% increases in some cases.

 

I was thinking of that same idea a while back, but I believe the problem would be needing to cache any writes into the SRAM by the CPU that the intended target was for the Antic chip to pick it up and use it. Depending upon how much stuff got backed up, there would always be the possibility of running out of cache memory, unless that memory was rather substantial. Then there would be the added problem of this cache having to be dual ported, which I suspect could get pricey.

 

 

1 hour ago, irich2 said:

 

Respectfully request you contact Jim Drew of CBMStuff.com (http://www.cbmstuff.com).  He recently posted on the Apple II Enthusiasts Group on Facebook about a 6502 Accelerator board he is working on that could work not only in the Commodore 8-bit computers, but also the 8-bit Apple II and Atari computers.  Here is the Facebook link:

 

 

Maybe you and he can share information and/or ideas about 6502 Acceleration, and how best to implement it in (in our case) in our beloved Atari computers?

 

 

I'll have to check that out. It certainly looks intriguing, but if it is to be used for our A8 systems it would need to also support the HALT line to pull itself off the bus.

 

I'm no expert, so other than what I just mentioned there is really nothing more I could add, but I can pass the information on by contacting him if you don't wish to. It would be nice to see something like this for our systems, especially if the price were right. Rapidus is just way too expensive for us folks in the Americas.

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Looks good though information is a bit short.  Seems it has internal Ram which can act as cache and you can set which areas are bus access (slow) or not.

XL/XE of course would probably need a different one to everyone else to cater for /HALT - the stretched out clock cycle that older machines produce would probably be sufficient to keep this guy off the bus when required.

 

Maybe this sort of thing is the way to go though with memory fencing and the like, you can have really good performance but the compatibility issues creep up a whole lot sooner.

Share this post


Link to post
Share on other sites
6 hours ago, DrVenkman said:

Tangentially off-topic but of interest to the same concept - the team behind the amazing 7800 homebrew RIKKI & VIKKI which was released ~6 months ago use a clever (cheap!) microcontroller and new bankswitching scheme to allow SALLY and MARIA to access memory independently. If you have played or seen the game, that's part of the way they create such an amazingly advanced title on 1984-era hardware. Seriously, it looks like an SNES or Genesis title. Go check out a YT video and be blown away. 

Just check out that game on YT. I didn't know of it's existence until you mentioned it, but then I sold my 7800 about a decade ago, so I don't keep up with the scene much anymore. I do think it's time to get another 7800 though! 

The only thing I don't like about it is the limited use of color. The 7800 is capable of many more on-screen colors and I wonder why this game is so limited there...probably not the place to discuss it though, just curious...

  • Like 2

Share this post


Link to post
Share on other sites

I have 6502 and gtia working on digimax. It’s a max10 fpga board like pokeymax but pure digital io.

 

I have some spare, so if that would help experiments let me know.

 

It’d be fairly trivial to speed up the cpu then add some glue logic in there to allow fast accesses only to ram. There isn’t much internal block ram so it would still need external sram.

  • Like 2

Share this post


Link to post
Share on other sites

If you or someone can test a Sally to it's outer extreme I'd be interested in the results.

My guestimate is that it'd probably top out somewhere around 2.5 MHz.

Share this post


Link to post
Share on other sites
5 hours ago, Gunstar said:

Just check out that game on YT. I didn't know of it's existence until you mentioned it, but then I sold my 7800 about a decade ago, so I don't keep up with the scene much anymore. I do think it's time to get another 7800 though! 

The only thing I don't like about it is the limited use of color. The 7800 is capable of many more on-screen colors and I wonder why this game is so limited there...probably not the place to discuss it though, just curious...

There are a couple threads in the 7800 forum about the game - one in the main forum and another one or two in the programming forums. Long story short, it’s because of the high-res background plus the large sprites. 

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, ZuluGula said:

Doesn't EclaireXL 6502 run at 20MHz?

58MHz, with wait state on read from ram(so effectively half that). It is a reimplementation though, I doubt the original Sally goes that fast. Perhaps cooled to near absolute 0 ;)

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, foft said:

I have 6502 and gtia working on digimax. It’s a max10 fpga board like pokeymax but pure digital io.

 

I have some spare, so if that would help experiments let me know.

 

It’d be fairly trivial to speed up the cpu then add some glue logic in there to allow fast accesses only to ram. There isn’t much internal block ram so it would still need external sram.

Very impressive accomplishment, and thank you for the offer. However I'm taking an old school approach with my experiments, basically doing it in a way that could have easily been done back in the day (no CPLDs, FPGAs, or modern day micros)

 

If believe that Rybags is correct on the limit for Sally being 2.5 Mhz, so I might switch over to a 65816 as I take this farther. It's fairly trivial to allow for the use of the /HALT line to tri-state this device, and of course there is no limitation on the clock speed as compared to the Sally.

 

Share this post


Link to post
Share on other sites
2 hours ago, Larry said:

Look back through the Atari Classics.  Bob Woolley outlined some steps that he tried.

Larry can you post some scans or links to any of these articles if they are already on-line?

 

Share this post


Link to post
Share on other sites
Just now, mytek said:

Larry can you post some scans or linked to any of these articles if they are already on-line?

 

I think Bob has actually posted about some of this stuff fairly recently, like in the last couple months. Didn’t someone bump up a ten year old thread about it and he discussed it some? 

Share this post


Link to post
Share on other sites
17 hours ago, flashjazzcat said:

Many problems would ensue concerning the CPU's interactions with the rest of the system. Here's a discussion of some of them:

Ten years later, Rapidus arrived. :)

 

 

Hmmm. What should I wish for next....

 

  • Like 3

Share this post


Link to post
Share on other sites
5 minutes ago, DrVenkman said:

I think Bob has actually posted about some of this stuff fairly recently, like in the last couple months. Didn’t someone bump up a ten year old thread about it and he discussed it some? 

Yes there was some discussion, but I don't recall much in the way of the nitty gritty of such, or any schematics being posted. If the SLCC articles go into more detail about the hardware clock switching side of things, that is what's really needed.

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...