Now Reading
The 100 MHz 6502 · e-basteln

The 100 MHz 6502 · e-basteln

2024-01-27 15:58:46

Vintage Computing
65F02

The 6502 was the CPU in my first laptop (an Apple II plus), in addition to many different well-liked house computer systems of the late Seventies and 80s. It lived on nicely into the Nineteen Nineties in sport consoles and chess computer systems, largely in its up to date “65C02” CMOS model. Right here’s a re-implementation of the 65C02 in an FPGA, in a pin-compatible format that allows you to improve these previous computer systems and video games to 100 MHz clock fee!

The thought of implementing a CPU core inside an FPGA isn’t new, in fact. Actually, the CPU core I’m utilizing isn’t my very own, however was developed as a 6502 core by Arlet Ottens, and prolonged to cowl the 65C02 opcodes by Ed Spittles and David Banks. An enormous thank-you to Arlet, Ed, and Dave for growing the core and sharing it freely! Hyperlinks to their authentic work are on the
Files & Links web page.

I packaged this in a Spartan-6 FPGA (with 64 kByte on-chip RAM), on a small circuit board which is simply the dimensions of a 40-pin twin inline package deal, with pins matching the 65C02 pinout. I added logic contained in the FPGA which might entry the exterior 65C02 bus with the proper timing, based mostly on no matter clock is coming in from the host system. Contained in the FPGA, the CPU core runs at 100 MHz. I dubbed this the “65F02”, the place the “F” would possibly stand for FPGA or for “Quick”. 😉


65F02 circuit board

The 65F02 circuit board: identical footprint and pinout as the unique 6502 and 65C02 CPU.

The thought is to make use of this as a “common” accelerator for 6502 and 65C02-based host computer systems – simply plug it into the CPU socket. The one factor the FPGA board must learn about its host is the reminiscence map: The place does the host have memory-mapped I/O? As much as 16 totally different reminiscence maps might be saved within the FPGA, and chosen through a mini DIP swap. Upon power-on, the 65F02 grabs the entire RAM and ROM content material from the host and copies it into the on-chip RAM, aside from the I/O space. Then the CPU will get going, utilizing the inner reminiscence at 100 MHz for all bus accesses aside from any I/O addresses – for these, the inner CPU pauses, and an exterior bus cycle is began at regardless of the exterior clock pace is.

Kudos to Roland Langfeld, who prompt this elegant approach of integrating an accelerator into virtually any host, and has contributed quite a bit throughout the testing and debugging effort. Roland’s authentic curiosity was in 6502-based chess computer systems (there have been some very nice ones within the Nineteen Eighties). However we have now efficiently examined the prototype 65F02s in an Apple II and a Commodore 8032, in addition to varied chess computer systems.


65F02 prototype with logic analyzer probes

Thanks go to Roland Langfeld, for the concept for the 65F02 and lots of hours of debugging and testing in Mephisto chess computer systems and the Commodore 8032.


65F02 installed in Mephisto Milano chess computer

The primary compact 65F02 put in in a Mephisto Milano chess laptop. The populated circuit board is lower than a millimeter greater than the unique chip package deal, therefore additionally matches into tight enclosures.

Chess computer systems

We’ve got targeted on Mephisto chess computer systems first, since these are on the middle of Roland’s collector’s curiosity. However many others are on the wishlist, together with Constancy (Elite A/S Budapest and Glasgow, Status, Avantgarde), Novag (Tremendous Constellation, Tremendous Professional C), SciSys (Turbostar), …

  • Mephisto MM II and B&P
  • Mephisto MM IV, MM V, Insurgent Portoroz (MM X)
  • Mephisto Polgar
  • Mephisto Milano and Nigel Brief
  • Mephisto Rebell 5.0
  • Novag Constellation Forte A/B
  • Chafitz ARB (varied Sargon variations) and MGS

Microcomputers

To this point, we’re supporting the 2 6502-based members of the traditional 1977 “Trinity” of house computer systems – the Apple II and the Commodore PET sequence. It could be doable and worthwhile to additionally assist some barely later machines: The Acorn BBC Micro, Atari 400 and 800, and perhaps the Commodore C64 come to thoughts. I don’t have any of those computer systems although. Please contact me if you’re to assist with an adaptation of the 65F02!

  • Apple II, together with the II plus and europlus, and presumably the //e. Fairly a little bit of {hardware} and software program trickery by Steve Wozniak, and the older fashions don’t assist an actual 65C02 – however the 65F02 is a little more beneficiant in its bus timing and works properly. The Disk II floppy drive works properly beneath DOS 3.3; assist for the language card is beneath improvement.

  • Commodore PET/CBM as much as 8032. A really clear and “by the ebook” design. The identical reminiscence map ought to work for all fashions from the PET 2001, the 3000 and 4000 sequence, and the 8000 sequence as much as the 8032. (However excluding the 8096 and past, which require reminiscence financial institution switching.) To this point we have now examined this on the 8032 solely; the 8050 floppy drive works.

A caveat is so as right here. The house computer systems, with their flexibility and expandability on each the {hardware} and software program facet, are sure to come across limitations and incompatibilities:

Reminiscence growth boards and financial institution switching have to be identified to and emulated by the 65F02; and because the 65F02 solely has 64 kByte of RAM on board, it can’t absolutely speed up the prolonged reminiscence. Additionally, whereas the 65F02 makes an effort to detect the entry to time-critical peripheral gadgets, and swap again to the unique gradual pace briefly, there’ll most likely be incompatible software program or add-on {hardware}. And eventually, some software program you merely don’t need to be accelerated – strive an motion online game at 100 MHz to grasp that concern…

The 65F02 helps an elective {hardware} swap to disable the acceleration. This manner, one can nonetheless choose between accelerated operation and authentic pace earlier than one begins the host laptop. In non-accelerated mode, the 65F02 must be absolutely appropriate with any software program or add-on {hardware}. (Effectively; until the software program makes use of undocumented 6502 opcodes…)

It is a passion venture, and I’ve no plans in the mean time to take it industrial.

A number of of the small-form-factor PCBs have been assembled, and have been efficiently examined within the above-mentioned computer systems. The examined computer systems embrace environments with TTL and CMOS logic ranges, and clock charges starting from 1 to five MHz. IRQs and NMIs are used within the hosts; among the Mephisto chess computer systems actively use the READY sign to decelerate the CPU, and the 65F02 respects that properly. We’ve got not used the SO (set overflow) enter in earnest, however consider it to work.

The chess laptop neighborhood has put the 65F02 via its paces and located some very good enhancements in enjoying energy for the previous chess computer systems. Video games and commentary might be discovered within the German
schachcomputer.info forum, specifically within the threads
here,
here, and
here.

If in case you have concepts for the 65F02, want to assist in growing assist for extra computer systems, want to write about it, please contact me through the e-mail deal with offered within the About part.

Replace, July 2022: The worldwide electronics provide bottlenecks have an effect on this venture too. The Xilinx Spartan-6 FPGA (within the required package deal and pace grade) has moved from a lead time of multiple 12 months to “we don’t know”. The 65F02 will sit on the again burner till the provision state of affairs hopefully returns to regular.


65F02 with original 6502 CPU

The 65F02 can straight change a 6502 or 65C02 of their 40-pin DIP socket.


65F02 prototype with logic analyzer probes

The underside facet of the circuit board. Left to proper: clock oscillator, decoupling capacitors, stage converters for 5V enter indicators, voltage regulators.

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top