Apple 1 display circuit on an FPGA

5 posts / 0 new
Last post
Offline
Last seen: 2 months 4 days ago
Joined: Jul 25 2019 - 07:12
Posts: 6
Apple 1 display circuit on an FPGA

Hi everyone,

 

just want to share some photos from a little project I've been working on. I've been learning VHDL, and for my first "proper" project I decided to synthesize the Apple 1 display circuit. However, rather than just design something that functionally behaves more-or-less the same, I instead opted to synthesize the core TTL and logic chips that Wozniak used and then wire them together exactly as shown in the Apple 1 manual's schematic. The result is something that functionally behaves very similar to the original hardware:

 

 

The device I used for this was a FleaFPGA Uno with a MachXO2 chip...way overkill for a project like this, I could have used a $10 Cyclone or something and still only used a few percent of the chip.

 

 

 



The floor-plan and synthesis report show that it uses around 115 4x2-bit slices, although some of this is used by a UART->PIA adapter so that I can pipe data to it from my laptop via a serial port.

 

Shift registers are all implemented internally via distributed RAM blocks...a delicious irony, given that the whole reason Wozniak used them in the first place was to avoid the expense of RAM! A look at the RTL shows a layout that is, topologically at least, similar to the original circuit schematic:

 

 

The only parts of the circuit that can't be synthesized on an FPGA are the analog components:

1) the main 14.31818MHz oscillator circuit, I implemented this with the regular system clock and a PLL+divider.
2) the 555 timer circuit used for the cursor flash, I used a divider driven by the VBL to get a clock at the same frequency.
3) the active DAC used to generate the composite NTSC signal, I used a passive network (2 resistors).
4) the cross-talk interference between the theta-3 clock signal and the sync output.

The last one was just an experiment, given that it's not actually supposed to be part of the design. Still, when I allow some of that signal through to the DAC I do get that characteristic pattern when the brightness is turned up: 

 

 

Overall this has been a fun and educational project, in addition to the VHDL and tool-chain experience I also learned a truck load about how this particular circuit works. Wozniak's genius is clearly evident in many parts of his design, to say I'm blown away by what he achieved...especially given the resources he had available at the time...is an understatement. By recreating the Apple 1 display circuit in VHDL I've been able to study each part of it in detail using simulation and synthesis tools that he probably could have only dreamed of back when he was building this circuit for real:

 


I'll be making this publicly available of course for anyone that wants to have a play, I'll post back here once I've pushed everything to GitHub.
 

Online
Last seen: 1 hour 39 min ago
Joined: Oct 9 2011 - 12:54
Posts: 1226
OK, I'm confused... Did you

OK, I'm confused... Did you actually do something to create the cross talk between the lines to create the "dots" in the video?

Offline
Last seen: 2 months 4 days ago
Joined: Jul 25 2019 - 07:12
Posts: 6
Corey986 wrote:OK, I'm

Corey986 wrote:

OK, I'm confused... Did you actually do something to create the cross talk between the lines to create the "dots" in the video?

 

Yes, I just mixed the short, fast CLK03 pulse into the video signal. Obviously this isn't in the original schematic, it was just an experiment like I said. But it was an interesting confirmation of Mike WIllegal's original diagnosis as to the exact cause.

Offline
Last seen: 2 days 2 hours ago
Joined: Jun 5 2008 - 07:26
Posts: 420
Just a comment about the

Just a comment about the Apple 1 and it's rightful place in history.   In my mind, it is important mainly  for two reasons.

1). It is the machine that launched Apple Computer.  

2) The DRAM refresh circuit led directly to the extemely clever use of memory mapped video DRAM with automatic refresh in the Apple II.

The Apple 1 design is a combination of an improved TV Typewriter circuit along with a very basic 6502 circuit.  Some parts of the circuit barely worked.  It really would have needed fixing, should the design have turned into a more successful product. Just off the top of my head, areas for improvment include the power supply, particularly, the -5volt section, some parts of the video circuit and the cassette interface read logic.  

 

 In some sense, the Apple II, was a product improved Apple 1, with the major problems addressed and a vast array of new capabilities added.  The Apple II is an absolutely brilliant design, while the Apple 1 was a first step in that direction.

 

This is not intended as a slam against Woz's fantastic digital design capabilities, but solely as a measured assessment of what the Apple 1 really was, a one off hobbyist computer, that happened to launch an iconic business.  In my discussions with Howard Canton, the layout artist who did the PCB layout of the Apple 1 and the initial PCB layout of the Apple ][, he always called the Apple 1, a hobby computer.  I think he got it right.

 

regards,

Mike Willegal

Offline
Last seen: 2 months 4 days ago
Joined: Jul 25 2019 - 07:12
Posts: 6
Mike WIllegal wrote:The Apple

Mike WIllegal wrote:
The Apple 1 design is a combination of an improved TV Typewriter circuit along with a very basic 6502 circuit.

 

This is certainly the impression I got while reconstructing it. Rather than wire up the whole thing in one go I instead added things one chip at a time so that I could study exactly what each part was doing. This linear progression worked well for the early stages of the circuit....dot clock generator, char counters, sync signals etc....but it completely fell apart at the end. The whole "terminal" section (cursor/carriage return/scrolling etc) very much gives the impression of something that was bolted on to an existing circuit, almost as an afterthought. It's also extremely sensitive to any kind of modification, I suspect that trying to add any additional functionality like backspacing etc would have quickly turned into a nightmare with the design as it was.

Still, fascinating circuit to study.

Log in or register to post comments