Wednesday, February 29, 2012

Replica 1 ROM and Hardware Ramblings

I should mention the software (technically firmware) that comes in the EEPROM of the Replica 1.

The Replica 1 has 8 kilobytes of ROM. ROM, of course, is Read Only Memory, memory which is persistent and remains when the system is powered off.

My system came with a 28HC64 EEPROM chip which is an Electrically Erasable Programmable Read Only Memory chip, one which can be reprogrammed (more about this in a later installment).

I understand that some Replica 1 kits shipped with a 27C64 EPROM which is also programmable but must be erased using ultraviolet light. These chips have a small window made of quartz glass so that the chip inside can be exposed to light. The 2864 and 2764 chips are electrically compatible other than the method of erasing.

The original Apple 1 had only 256 bytes of ROM. It contained the machine language monitor written by Steve Wozniak that allows displaying and modifying memory in hexadecimal and running programs. This was sufficient to allow a user to enter programs, typically that were hand assembled on paper and entered as hex numbers. While this sounds primitive, it was actually a great advance over other computers of the same era such as the Altair which required entering programs as ones and zeroes using switches on a front panel (the Altair, in fact, had no ROM at all).

Of the parts on the Replica 1, most are still manufactured. One of the exceptions is the 6502 chip. It is still, however, available from some suppliers as NOS (new old stock). The chip on my board is a Synertek 6502B and the date code on it is 8109, indicating it was manufactured in the 9th week of 1981. That makes it one of the original NMOS 6502 chips. Later a CMOS version called the 65C02 with new instructions was introduced. I'll talk about it in a future blog posting.

In the extra space available in the 8K ROM the Replica 1 includes the version of the BASIC language that Woz also wrote for the Apple 1 (which on a real Apple 1 was typically loaded from cassette tape using the optional tape interface).

It also contains the Krusader assembler written by Ken Wessen. This allows entering assembly language programs as English mnemonics rather than hex numbers, and also includes an disassembler and machine language mini monitor.

I made a few small hardware modifications to my Replica 1. Since there is no case, rubber feet on the bottom of the circuit board will keep it more stable on a surface, avoid scratching a desk, and avoid shorting it on a metal surface. You can get suitable adhesive rubber feet at most dollar stores.



While I was waiting for my missing crystal oscillator to arrive, and running it from the circuit I breadboarded, I ran my system at 2MHz (rather than 1) since I had a 2MHZ crystal and the 6502B chip in my system is rated up to 2MHz. I later installed a socket so I can put in a 1 or 2 MHz oscillator.

The serial port on the Replica 1, like the Apple 1, has no hardware handshaking, and even though it runs at only 2400 bps you need to add delays when transferrring files to ensure that data is not lost while the system is operating. This makes uploading of programs quite slow.

I made the high speed serial mod described here that allows the port to run at 115,200 bps with hardware handshaking while remaining software compatible with the Apple 1. The mod worked quite well for me. It requires reprogramming the Propeller chip which requires some care to do correctly. You also need to install 4 jumper wires. I highly recommend this as large programs now load in a few seconds which formerly took many minutes. I also found I can use the Linux minicom program to transfer files, which I was never able to use reliably without the serial mod.
Once minor annoyance is that the Replica 1, like the Apple 1, has no power on reset circuit. You need to hit the reset button after power up. Adding a power on reset would be a nice improvement although I haven't done it on my system. There would be room on the prototype area to add it. One possible circuit is the one used by the Apple 2 using a 555 type timer chip. In fact the first Apple 2 systems did not have a power on reset circuit and it was added in a later revision. Another option is a MAX707 chip as was done here.

Finally, on the subject of hardware, Briel Computers offers some add-on accessories for the Replica 1. The Multi I/O board adds a full serial port, 2 8-bit parallel ports, an EEPROM programmer, and space for an optional speech synthesis chip. I'll discuss this board in a future blog posting.

A Compact Flash Adapter board allows loading and saving programs to flash memory. Unfortunately, the supplier of these boards is not currently making them.

A slot 1 Expander provides 3 additional Apple 1-compatible expansion slots, so you can install multiple add-on boards.

Several people also offer replicas of the only option board offered for the original Apple 1, the casstte tape interface, so you can save and load programs using cassette tapes.

No comments:

Post a Comment