Neo6502- Open Source Hardware Modern Retro Computer Project

I will admit, I have a sentiment for retro computers. This is probably because my career in IT started many years ago with the Bulgarian Apple ][ clone called IMKO2, later renamed to Pravetz 82.

This is also one of the reasons Olimex stepped into the AgonLight production.

AgonLight sparked a lot of enthusiasm and activity, not only here at Olimex. Bernardo Kastrup hit the sweet spot of the Retro Computer maniacs by offering them a small, fast, feature-packed real Z80 machine with plenty of memory. The Facebook group already has close to 1000 members!

There are a lot of posts about why not having a 6502-based machine, and Kyle (mos_8502), Rebecca (RenewedRebecca) and Bernardo (TheByteAttic) are already working on a W65C265 version using the same ESP32 FabGL-based video and audio system.

Two weeks ago, I started thinking, as an engineering challenge, is it possible to build a modern peripheral 6502 computer that is with the lowest possible cost.

Then I put the minimal requirements for my 6502 computer:

  • It must have a real 6502 processor.
  • It must have a minimum of 64KB of RAM.
  • This computer must run as fast as possible. People confirm that the W65C02 from WDC can be overclocked up to 16Mhz. On the other hand, a lot of software depends on instruction execution time for loops, so the possibility to run at a lower 1Mhz clock will ensure backward software compatibility. This can be achieved with a variable clock that can be set by 6502 software.
  • The computer must have a modern video interface like DVI/HDMI so that you can connect it to your home TV or modern monitor.
  • Support for a modern USB keyboard.
  • A sound synthesizer like the popular C64 SID.
  • The power supply should be via a USB-C connector so that you can use any phone charger with a USB-C cable.
  • A UEXT connector with modern interfaces like UART, I2C, SPI.
  • Disk storage for code.
  • The 6502 bus should be available on a slot/connector so that additional hardware can be easily added on.

The final requirement is to design such a system to be at the lowest possible price, making it an easy purchase decision, similar to what the Raspberry Pi did with a price of $25-30.

This is a good hardware engineering challenge!

After some research I have decided to use the Raspberry Pi’s new dual-core Cortex-M0 RP2040 as an emulator for everything except the 6502.

The RP2040 will emulate:

  • The RAM memory. The RP2040 has 264KB of RAM, which is plenty of RAM to hold the emulator code and at least 64KB for the 6502. As the RP2040 runs at 133 MHz, there will be no issue serving the slow 6502 with memory read/write operations. If there is more RAM left, we can implement some kind of bank switching, such as 56KB of continuous RAM from $2000-FFFF and switchable RAM banks for $0000-1FFFF. Alternatively, we can define a pointer and block size somewhere in the upper memory location, which can overlap different RAM segments at any address at any time. After all, what the RP2040 will serve at a given address depends only on the pointer, which will show where this data needs to be fetched from.
  • Initially, I thought of using the Si5153 programmable oscillator, which can clock from 250kHz up to 100MHz, but after checking the RP2040 PWM specs, I found that the RP2040 can also generate a programmable clock for the 6502 from 0 up to 100MHz. This saves us one more IC!
  • There is already a DVI generation project with RP2040 called picoDVI, which supports 640×480 pixel resolution with RGB565 16-bit color depth. This project loads about 60% of one of the cores in RP2040.
  • RP2040 has USB host capability, so there are no issues whatsoever in connecting a USB keyboard to it.
  • There are already RP2040 SID player projects that exist and can be reused for sound generation, such as picoSID.
  • Although the UART, I2C, and SPI are interfaces that the 6502 originally did not have, we can catch memory location read/write exceptions with RP2040 and emulate a classic PIA or ACIA. Alternatively, we can define some API in memory to access I2C and SPI buffers.
  • As for disk storage, RP2040 will have 2MB of external SPI flash to hold the firmware, but there will be a lot of free space. The Apple ][ 5″ floppy was holding the humble 114KB, so around 10 classic floppy discs could fit in a little more than 1MB.

One week ago, I posted my idea on the Homebrew 6502 Facebook group and received more than 100 replies with valuable comments and suggestions.

To summarize all the feedback and prevent redundant discussions, here are the FAQ:

Q: Why not emulate the 6502 with RP2040 as well?
A: Emulating memory or ACIA PIA is simple, but the 6502 is a complex state machine, and an emulator will never be 100% accurate. Even N6502 and W65C02 have differences, and we want to have a REAL processor.

Q: Have you checked the CommanderX16 project? You may get inspiration from it.
A: I have seen this project, but it is over-complicated, expensive, lacks modern peripherals, and is slower compared to what I want to achieve. This is going to be a MODERN 6502 computer. The CommanderX16 has no modern interfaces like USB keyboard, HDMI, SID Sound, or SPI/I2C. Additionally, the CommanderX16 costs $500, while we aim to target a $25-30 board.

Q: Why not make it with VGA? I have one in the basement.
A: We want Neo6502 to be a MODERN computer, and VGA is 40 years old technology.

Q: Why not use W65C265S or W65C816S, etc.?
A: These are not 8-bit and have more address lines to deal with, which will make the design more complex and far from the rock bottom price goal. For those who want a W65C625 computer, Kyle, Becky and Bernardo are already working on Agon X65.

Q: Why not Kickstart it?
A: Although Kickstarter is a great advertising platform, it has its cost. Kickstarter/PayPal combination takes 20-30% of the collected funds. We target rock bottom costs for our customers and count every cent, so we will not inflate the prices with 20-30% to use the platform.

Q: Do you have firmware developers for it?
A: Not yet, so any help and collaboration are welcome. I have already obtained all the parts together and will have a proof of concept on a breadboard this weekend. Then, we will design PCB and some prototypes in a few weeks. If you want to participate in software/firmware development for both RP2040 and 6502, you are welcome to join us! We will have some free early prototypes to send to developers. Send us email to info at olimex dot com.

Tsvetan

AgonLight Open Source Hardware Retro Computer Running BBC Basic was captured in KiCad and updated by Olimex

AgonLight is a well-documented small computer based on the Z80 family and running BBC BASIC.

With a VGA output and a PS2 Keyboard this is a stand alone retro style computer.

The project is open source hardware and software.

AgonLight may be also seen as an embedded BASIC computer as it has plenty of GPIOs available to interact with other components and modules.

The AgonLight was designed by Bernardo Kastrup and the Quark firmware is developed by Dean Belfield.

The project has an active Facebook group https://www.facebook.com/groups/agoncomputer/

We got a few inquiries from customers asking if Olimex is interested in making this project and we hesitated at first due to having the bad experience in the past with Maximite pseudo open source project.

After exchanging a few words with Bernardo via Twitter, we became confident that this is a true open source hardware project.

We checked the schematic and decided to do some small changes.

  • We decided to re-capture the design in KiCad instead of EasyEDA
  • The power of the original AgonLight is delivered by a USB-A connector which is quite odd and USB-A to USB-A cables are less popular. We decided to replace it with USB-C connector which is used in all new phones, tablets and devices due to the new EU directive. Usually everyone has such a cable at home to charge and transfer files to their cell phone.
  • We replaced the Linear voltage regulator with DCDC which delivers up to 2A current.
  • We added a battery LiPo charger and step-up converter which allows operations even if external power supply is interrupted.
  • The original design had a PS2 connector for a keyboard and required a USB to PS2 adapter to operate with the more available USB keyboards. We replaced the PS2 connector with a USB-A connector so a normal USB keyboard (which supports PS2) can be directly plugged-in to AgonLight
  • We routed the AS7C34096A-10TCTR SRAM with 40 ohm impedance lines as per the datasheet
  • Fixed a wrong signal naming in the ESP32-PICO-D4, which now is updated in the original AgonLight documentation.
  • Replaced the bare header 32-pin connector with a plastic boxed 34-pin connector following the same layout and adding two additional signals Vbat and Vin which allow AgonLight to be powered by this connector too.
  • Added a UEXT connector (https://www.olimex.com/Products/Modules/) which allows AgonLight to be connected to: temperature sensors, environmental air quality sensors, pressure, humidity, gyroscope, light, RS485, LCDs, LED matrix, relays, Bluettooth, Zigbee, Lora, GSM, RFID reader, GPS, Pulse, EKG, RTC etc.

We changed most of the components to our component base, which we source and stock in large quantities and allow us to bring the cost down.

The design was completed 1 week ago:

Today the first blank PCBs arrived:

Next week we will assemble 5 pcs to test by ourselves and then send to the original AgonLight developers.


AgonLight will be put on our web and available for pre-order next week with a special Christmas price of EUR 50 for a completely assembled, programmed and tested computer.


If the prottotypes are good mass production will follow and all pre-orders taken to 23.12.2022 will be shipped by the end of January.

We plan to make metal case and other accessories in the near future.

RETRO COMPUTER MEMORIES: Acorn BBC Micro model B and Acorn BBC electron

Image

Image

BBC Micro and Acorn Electron – I like these two computers from my retro vintage computers collection as there is interesting story around them.

Everyone has heard for ARM processors, the fastest growing architecture, they are everywhere: in phones, tablets, handheld devices, GPS navigators, media players, set top boxes and in most of Android devices. Nova days we have even Cortex-M0 ARM processors for $0.30 which penetrates the holy territory of the 8-bit processors.

If you now ask yourself What ARM processors do have with the above retro computers, the answer is simple, because of these computers ARM processors were designed in first place.

How this happend:

Back in 1970s Chris Curry is Cambridge University professor with interest in the microprocessors, he launched together with his friend Herman Hauser two companies: first with research in the microcprocessors named Cambridge Processor Unit Ltd (CPU) and another named Acorn Microcomputer with aim to make mini computer based on the CPU processors.

According to Curry the Acorn name was choosen so it appear before Apple in the telephone directory, which show which company they were influenced at that time.

Some engineers joined to work in Acorn Computers and one of them Sophie Wilson designed few computer systems there. These were primary laboratory oriented kits with LCDs, keyboards, processors which allow laboratory exercises to be completed with students – looking same as Olimex’s development boards now 🙂

In 1979 Curry influenced by ZX81 computer launch decided also to move to home computer design and this is how Acorn Atom was build. Based on 6502 as any other home computer at that time.
After the Atom was released Curry and the team started thinking for more powerful processor, Hauser suggested compromise 6502 with enhanced peripheral co-processor which to unload 6502 from the part of the tasks so they designed the next version Proton.

BBC in 1981 selected Proton for their educational program and the computer was renamed to BBC micro. Acorn sold more than 1.5 million BBC microcomputers and this helped the company to make enough profit to start working on their own processor. With the launch of IBM PC in 1981 and the Apple Lisa Acorn saw that they need more powerful processor, first attempt was to contact Intel to licensee 268 and improve it, but Intel refused so they as University professors decided that its not so hard to make their own 🙂

At that time everyone has put efforts to make processors which machine language is close to higher level programming languages i.e. so named CISC (complex instruction set computing) processors. The idea was that programming language would be easy to translate and execute faster if the machine language instructions are close to it. This lead to very complex implementation of the processor, long signal paths, which didn’t allow high frequencies (most processors at that time run at 1-2Mhz) and it was taking about 100 man years to develop something like 6502. Acorn had no such resources so they went to different route – to make RISC (reduced instruction set computing) processor which was easier to develop with smaller budged and team. Sophie Wilson set about developing the instruction set, writing a simulation of the processor in BBC Basic that ran on a BBC Micro with a 6502 second processor. Another benefit from the RISC architecture came the smaller paths to implement and the higher frequencies and lower power supply the RISC processor required compared to CISC processor. First RISC processors were running at 4Mhz and the power consumption was less than CISC.  Smaller size also means less cost to manufacture.

It convinced the Acorn engineers that they were on the right track. Before they could go any further, however, they would need more resources. It was time for Wilson to approach Hauser and explain what was afoot. Once the go-ahead had been given, a small team was put together to implement Wilson’s model in hardware.
The official Acorn RISC Machine (ARM) project started in October 1983, with Acorn spending GBP 5 million on it by 1987. VLSI Technology, Inc were chosen as silicon partner, since they already supplied Acorn with ROMs and some custom chips. VLSI produced the first ARM silicon on 26 April 1985 — it worked first time and came to be known as ARM1. Its first practical application was as a second processor to the BBC Micro, where it was used to develop the simulation software to finish work on the support chips (VIDC, IOC, MEMC) and to speed up the operation of the CAD software used in developing ARM2. The ARM evaluation system was promoted as a means for developers to try the system for themselves. This system was used with a BBC Micro and a PC compatible version was also planned. Advertising was aimed at those with technical expertise, rather than consumers and the education market, with a number of technical specifications listed in the main text of the adverts. Wilson subsequently coded BBC Basic in ARM assembly language, and the in-depth knowledge obtained from designing the instruction set allowed the code to be very dense, making ARM BBC Basic an extremely good test for any ARM emulator.

In 1982 Acorn released budged version with lower cost of BBC micro called BBC Electron, it was with co-processor IC ULA which had inside all logic and peripherals of BBC implemented.

Unfortunately Electron come to the market late as meantime Commodore 64 wiped all competitors in 8-bit scene, Atari and many others went in bancrupcy in 1985, Apple was about to sink also, same happen with Acorn. Olivetti take it over, but the new processor activity was kept in such secret that Olivetti even didn’t know that they buy it.

Good move from Acorn management was to present the new ARM processors to Apple and they decided to use it in their handheld Newton device as were impressed by the price, power and performance of this new chip, so Apple and Acorn began to collaborate of developing the ARM so they formed new company ARM Ltd in November 1990 where Acorn Group and Apple had each x 43% and the VLSI was both investor and first ARM licensee.

Now back to our retro computers:

Image

Here is how BBC Micro looks on bot:

Image

and back:

Image

Note the many peripheral chips, this was one of most advanced computers at that time, it had, LAN, Graphics co-processor, Audio co-processor, needles to say some of most interesting games were on BBC micro 😉

Image

The BBC Electron

Image

bot:

Image

inside:

Image

as you can see all glue logic and peripheral were fit inside custom chip :

Image

which allow BBC Electron to be sold under 200 GBP, sure this didn’t help to complete the mighty Commodore 64 which wiped all 8-bit market, but the research to make newer faster better processor for the Acorn computers lead to the design of one of most successful architecture at our time ARM