When Is A 6502 Not Quite A 6502?

We all know that fake chips are a risk when it comes to buying parts on eBay or from Chinese markets such as AliExpress. It’s a simple enough scam, take a cheap chip and mark it as an expensive one, pocket the difference. It’s happened in several different forms, with everything from completely different devices through cheaper equivalents to incredibly, chips purpose fabricated to emulate better-known ones. We have a chance to see such a scam in action via [LinuxJedi], with a 6502 that wasn’t quite as it seemed.

The chip in question was a Rockwell 65C02 destined for an Acorn Atom, and when installed it failed to deliver the expected power consumption saving. Unsurprisingly when tested it turned out to be a fake, in this case a run-of-the-mill 6502 with new markings. The interesting part for Hackaday readers comes in the physical clues. The too-bright markings started to dissolve with a bit of acetone. A deeper investigation revealed the date and wafer codes did not agree with the branding. A new chip was secured which also turned out to be a fake, though in this case a real 65C02 rated for a lower clock speed than marked.

It’s evident that in-demand retro chips are likely to be an ever-greater minefield of fakes as time passes, and the number of survivors dwindles. It’s as well to be aware then and learn from any fakes like these posted online. It’s not the first fake chip we’ve brought you.

Three purple OshPark boards and a white bread board all attached using a number of jumper wires on a grey cutting mat.

An (Almost) Single-Chip Apple IIe

The Apple II is one of the most iconic microcomputers, and [James Lewis] decided to use the Mega-II “Apple IIe on a chip” from an Apple IIgs to build a tiny Apple IIe.

While there was an Apple II compatibility card using the related Gemini chip, it was initially unclear whether the Mega-II could even work outside of an Apple IIgs given the lack of documentation for either Apple II SOC. [Lewis] did finally get the Mega-II to boot after a great deal of effort in debugging and design. The system is built with three boards: the Mega-II and RAM board, a CPU board with a 65C02, and a video out board.

To simplify routing, the boards are all four layer PCBs. Unfortunately, the chips needed to make this system, especially the Mega-II, aren’t available on their own and must be harvested from an existing IIgs. [Lewis] took care to make sure any desoldering or other part removal was done in a way that it could be reversed. If you want to see all the nitty gritty details, check out his GitHub for the project.

If you want another 6502-based computer in a tiny package, why not try this one built on Perf+ boards?

Continue reading “An (Almost) Single-Chip Apple IIe”

A breadboard with a few DIP chips

Minimalist 6502 System Uses A CPU And Not Much Else

A central processing unit, or CPU, is the heart of any computer system. But it’s definitely not the only part: you also need RAM, ROM and at least some peripherals to turn it into a complete system that can actually do something useful. Modern microcontrollers typically have some or all of these functions integrated into a single chip, but classic CPUs don’t: they were meant to be placed on motherboards along with dozens of other chips. That’s why [c0pperdragon]’s latest project, the SingleBreadboardComputer, is such an amazing design: assisting its 6502 CPU are just four companion chips.

The entire system takes up just one strip of solderless breadboard. Next to the CPU we find 32 KB of SRAM, 32 KB of flash and a clock oscillator. The fifth chip is a 74HC00 quad two-input NAND gate, which is used as a very tiny piece of glue logic to connect everything together. Two of its NAND gates are used for address decoding logic, allowing either the ROM or RAM chip to be selected depending on the state of the CPU’s A15 line as well as blocking the RAM during the low phase of the system clock. The latter function is needed because the address lines are not guaranteed to be stable during the low phase and could cause writes to random memory locations.

The remaining two NAND gates are connected as an RS-flipflop in order to implement a serial output. This is needed because the CPU cannot keep its outputs in the same state for multiple clock cycles, which is required for a serial port. Instead, [c0pperdragon] uses the MLB pin, normally used to implement multiprocessor systems, to generate two-clock pulses, and stores the state in the flipflop for as long as needed. A few well-timed software routines can then be used to transmit and receive serial data without any further hardware.

Currently, the only software for this system is a simple demonstration that sends back data received on its serial port, but if you fancy a challenge you could write programs to do pretty much anything. You could probably find some inspiration in other minimalist 6502 boards, or projects that emulate a complete motherboard in an FPGA.

Here’s A 100 MHz Pin-Compatible 6502 Replacement

The MOS Technology 6502 CPU was a popular part in its day. In various modified versions, it powered everything from the Commodore 64 to the Nintendo Entertainment System, and showed up in a million other applications too. A popular variant is the 65C02, and [Jürgen] decided to whip up a pin-compatible FPGA version that runs at a blazing 100MHz.

The CPU core was borrowed from work by [Arlet Ottens] and extended with 65C02 functionality by [Ed Spittles] and [David Banks]. [Jürgen] then packaged that core in a Spartan-6 FPGA and placed it on a small PCB the size of the original 65C02’s 40-pin dual inline package.

The FPGA is set up to access the external CPU bus with the timing matched to the clock of the host machine. However, internally, the CPU core runs at 100MHz. It copies RAM and ROM from the host machine into its own internal 64 kilobyte RAM, minus the areas used for memory-mapped I/O by the host. The CPU then runs at full 100MHz speed except when it needs to talk to those I/O addresses.

It allows the chip to accelerate plenty of tasks without completely flipping out when used with older hardware that can’t run at anywhere near 100MHz. The pin-compatible design has been tested successfully in an Apple II and a Commodore 8032, as well as a variety of vintage chess computers.

We’ve seen the opposite before too, with a real 6502 paired with a FPGA acting as the rest of the computer. If you’ve got any cutting-edge 6502 hacks of your own (not a misprint!), let us know!

[Thanks to David Palmer for the tip]

David Murray and Kevin Williams with an early X16 prototype

Commander X16: A Dreamy 8 Bit Computer Comes Closer To Reality

Imagine the ultimate homage to 1980s 8-bit home computers. It might  look like [David Murray] aka The 8-Bit Guy’s Commander X16.

As a core group of geeks, hackers, and developers age, we yearn for the computers of our youth. VIC-20s, Commodore Pets, 64s, 128s, Ataris, Apple IIes, and the list goes on and on. For many of us, our first hands on experience with a computer was with such a machine that is now called “retro”. Sadly, many of these relics are getting more expensive as demand increases and supplies dwindle. Working examples are harder to find, and even those can break down. Original monitors, peripherals, and accessories are also getting scarcer. This is all quite understandable when we consider that some of these classics are over 40 years old.

What was it that we loved about these old rigs that makes them so attractive? [David] decided to distil what makes a classic a classic, and then turn that list into a spec list for what he calls his “Dream Computer”. He found that things like a printed and spiral bound manual were a big part of the charm and utility of these early home computers. Booting directly to a prompt and being able to directly control the hardware was another highly desirable trait.

[David] also took the time to determine what people don’t like about these retro machines: Wacky keyboard layouts, composite video output, and glacially slow storage. Swapping multiple floppies to load a program or respooling a cassette tape is just as undesirable in 2021 as it was in 1981. Who knew?

X16 Prototype #3
The X16’s’ prototyping is still in progress.

The result of [David]’s research is the Commander X16. Inspired by the VIC-20, it’s a fresh take on the retrocomputer that only uses parts that are currently available. You can see the first video in a series about the development of the X16 below the break. Be aware that a lot of progress has been made since the video came out in 2019, but it still provides an excellent starting point for learning about the project.

The X16’s specifications read like dream list made in the mid 80s: 256 color VGA, up to 2MB memory, an 8 MHz 6502, plenty of expansion ports, and even ports for SNES style controllers.  And what else will this dream machine include? You guessed it: A spiral bound manual!

It’s not possible to list all of the great features of the X16 in this space, so check out the Commander X16 FAQ for all the details. If this project makes your heart go pitter patter, you may be interested to know that they need help with software development! An emulator is available for development. The goal is to have a healthy software ecosystem in place when the X16 launches.

You may also enjoy reading about other 6502 retrocomputer reports such as this “Brain in a vat” 6502 computer, or a guided tour of the birthplace of the 6502 and the Commodore 64 with our very own Bil Herd.

Thank you to [Truth] for bringing us a report of this fine project via the Tip Line. Keep those tips coming!

Continue reading “Commander X16: A Dreamy 8 Bit Computer Comes Closer To Reality”

Gaming In Different Languages

One of the perks of using older hardware is its comparative simplicity and extensive documentation. After years or decades of users programming on a platform, the amount of knowledge available for it can become extensive. This is certainly the case with the 6502 microprocessor, used in old Apple computers and some video game systems from the ’80s. The extensive amount of resources available make it a prime candidate in exploring various programming languages, and their advantages and disadvantage.

This project looks into those differences using a robot game, which has been programmed four different ways in three languages. [Joey] created the game in Python first and then began to port it to the 65C02, a CMOS variant of the 6502. The first iteration is its assembly language, and then a second iteration with optimized assembly code. From there, he ports it to C and then finally to Forth. Each version of the game is available to play in a browser using an emulator to run the 6502 hardware.

Since the games run in the browser, other tools are available to examine the way the game runs in each language. Registers can be viewed in real time, as well as the values stored in the memory. It’s an interesting look at an old piece of hardware and of its inner workings. For an even deeper dive into the 6502, it’s possible to build a working computer on breadboards using one.

Review: Single Board 65C02 And 65C816 Computers

The 6502 is a classic piece of computing history. Versions of this CPU were found in everything from the Apple ][, to the Nintendo Entertainment System, and the Commodore 64. The history of the 6502 doesn’t end with video games; for the last forty years, this CPU has found its way into industrial equipment, medical devices, and everything else that doesn’t need to be redesigned every two years. Combine the longevity of the 6502 with the fact an entire generation of developers first cut their teeth on 6502 assembly, and you have the makings of a classic microprocessor that will, I’m sure, still be relevant in another forty years.

The cathedral of The 6502 is Western Design Center. For more than 35 years, WDC has been the home of 6502-related designs. Recently, WDC has been interested in the educational aspects of the 6502, with one of the VPs, [David Cramer], lending his time to an after-school club teaching opcodes.

The folks at WDC recently contacted me to see if I would give their hardware a close look, and after providing a few boards, this hardware proved to be both excellent. They’re great for educators adventurous enough to deviate from the Arduino, Processing, and Fritzing zeitgeist, and for anyone who wants to dip their toes into the world of 65xx development.

Continue reading “Review: Single Board 65C02 And 65C816 Computers”