Friday, December 1, 2023

Welcome to reZet80!

reZet80 stands for "Reset me back to the 80s with the Z80".
reZet80 features a set of retro projects to develop computing and arcade systems that resemble the Z80 machines of the late 70s and early 80s.
All systems are built from scratch and not copies of any other Z80 system.
The development process includes hardware design and software programming in Assembler.
I started reZet80 back in 2016.
Off-topic note: The letter Z stands for the company Zilog and the Z80 CPU. The Z is in NO WAY related to the Russian war against Ukraine!

reZet80 projects:

reZet80 releases (including documentation, schematics and source code at GitHub):
  • 2023-10: reZet80 PIONEER R1 (Haunted House-only release)
  • 2022-12: reZet80 SCOUT R0 (prototype, unfinished code)
  • 2022-06: reZet80 PIONEER R0
  • 2021-06: reZet80 HWDK R0
  • 2021-02: reZet80 DEV R1 (unfinished code)
  • 2020-11: reZet80 DEV R0

Thursday, November 2, 2023

FCFC part 2

Fake chips from China (FCFC): faulty 8279 chips

The 8279 Programmable Keyboard/Display Interface from Intel is a device from 1976 that controls a keyboard and a 16-digit display. I use the 8279 in my PIONEER project.
Front and back side of a 8279 chip
An oscilloscope capture of a "good" 8279 chip looks like this:
It's selecting diplay digits 0 to 15 again and again.
A dead chip does nothing at all:
Expected interrupt signal after a key press:
Actually dead (no response on key press):
The front side after using nail polish remover, too easy to remove the markings:
IMO it's very hard to get fully functioning original chips almost 50 years later.
Some of my chips have a working diplay but fail to recognize key presses, others are completely dead.
For the next release of my PIONEER project I'll work on an 8279 replacement.

Monday, October 2, 2023

reZet80 PIONEER - 8279 PKDI

As of R1 the reZet80 PIONEER uses the 8279 PKDI (Programmable Keyboard / Display Interface) device to access the keyboard and a 16-digit display. This 7-segment LED display shows 16 alphanumericals ("0"-"9", "A"-"Z") and punctuation symbols. The display has been designed for common cathode LED displays.
The 8279 PKDI board provides a 20-key keyboard including special keys (ENTER, BACK, ESC and SHIFT).
I defined the 7-segment font in order to obtain unique, unambiguous shapes for all alphanumericals and punctuation symbols. Well, almost, there are some exceptions.
The 8279 device was available from Intel, NEC, Mitsubishi and other manufacturers.
Sorry for the bad quality of the images of the LED display of my prototype system.

Saturday, September 16, 2023

Haunted House

Welcome to a thrill-packed game of mystery and adventure!
Haunted House is a simple interactive text adventure horror game for the reZet80 PIONEER.
It was first published in 1979 for the TRS-80 on cassette tape.
The original file size was 6356 bytes (after removing all tape structures).
I completely rewrote the game in Assembler and implemented some simplifications to save ROM space.
And I also made modifications to adapt to the 16-character display.
The game size is now 2236 bytes. But it still does not fit in a 2 KiB UVEPROM.
I fixed none of the original bugs and even introduced one or two more.
Objectives of the game:
  • Solve the mysteries of the house
  • Survive the hidden dangers
  • Find and explore secret rooms
  • Search for the only escape to get out of the house alive
Do not bother about treasures, there are none to find.
The game is easy to play: Use "N", "S", "E" and "W" to walk around (north, south, east, west).
Type "I" to view your inventory.
To find out where you are type "L" (look).
Otherwise, issue simple commands (verb and noun).
So to open a door enter "OPEN DOOR" or just "O D".
The descriptive text is short and the dictionary is very limited.
The exits are not described so if moving in any direction brings you back to the same location that direction is not available.
If you die, the game starts all over again.
There is no time limit and no score.
Please feel encouraged to draw a map of the house for yourself.
Now travel back to the late 70s!
After reset the display reads "HAUNTED HOUSE".
Press any key to start the game.
Because only 16 characters can be displayed at the same time sentences have to be split on several lines. Keep pressing any key until the sentence is finished and you see the prompt.
The prompt looks like this: "0_".
Well, "_" is the prompt and "0" shows the active key block.
The SHIFT key serves the purpose of switching between the blocks of available characters and punctuation symbols as only 16 keys are available at a time.
The first (default) key block (prompt is "0_"):
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"
After the first SHIFT key press the prompt changes to "G_" and these characters are available:
"G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V"
After the second SHIFT key press the prompt changes to "W_" and these characters and punctuation symbols are available:
"W", "X", "Y", "Z", " ", ".", ",", "'", "_"
Pressing the SHIFT key a third time returns you to the default key block.
From the original game:
Generations have passed since the McDaniel family mysteriously disappeared. It is said that a stranger came to visit on that cold, autumn day many years ago, but no one knows for sure. Their house has been vacant for decades now. Its two story image is forlorn and looming, visible only from the narrow, winding road that has been distorted by vegetation from the surrounding forest. The stone wall that encompasses the house is discolored and broken from years of neglect, its iron gate rusty and worn by angry seasons. The windows are boarded - the house is quiet and contented, not accustomed to visitors. The wind is restless today, blowing fallen leaves in all directions. As you walk towards the entrance of the house, the wind grows distant and weak. Suddenly, the calm and silence is broken by sounds from within the house! Do you have the courage to enter?

Monday, August 7, 2023

PIONEER R1 update

These are the changes for the 2nd release R1 of my PIONEER project:
  • I extended the 6-char 7-segment LED display to 16 characters
  • I introduced Intel's 8279 Programmable Keyboard/Display Interface
  • The first PIONEER game is available: Haunted House text adventure
  • Alphanumericals ("0"-"9", "A"-"Z") and punctuation symbols are available now
  • I moved to rasm assembler because of support for undocumented instructions
  • I provide binary ROM and Intel hex format images
Unfortunately I finished the R1 release more than one year ago but due to other life projects unrelated to retrocomputing I didn't manage to update the documentation and clean up the code until now. Hopefully there will be no complaints :-)

A few comments:
  • Intel's 8279 PKDI device is used to access the 20-key keyboard and the 16-character display
  • Haunted House is Robert Arnstein's text adventure published in 1979 for the TRS-80
  • It's impossible to obtain a unique, unambiguous representation of all letters of the Latin alphabet with a 7-segment code but the correct interpretation results from the context
  • PIONEER R1 is a Haunted House-only release

A detailed description of all changes will follow soon.

Thursday, July 20, 2023

Early reZet80 history - stage 6

It was time for my first PCB design. I tried 3 different boards, 2 complex and one simple PCB.
The reZet80 HWDK (hardware development kit)
the CPU card (R2, release 2)
An adapter for the RC2014 bus in order to check the functionality of my cards in both worlds

Even though it's still a long way ahead it feels like the work of the past 6 years has been worth it!
Next stage: building the reZet80 PIONEER and the reZet80 SCOUT.

Thursday, June 1, 2023

Early reZet80 history - stage 5

There were so many hardware pieces to explore so I moved on:
I added an 8-digit 7-segment display and a 20-key keypad (I desperately needed an ENTER key).
I'm using 16-bit I/O now so only one 8-bit port is used per peripheral module.
The stage remains unfinished, I have to complete documentation and clean up software.
But I had to move on with the hardware.

Tuesday, May 2, 2023

Early reZet80 history - stage 4

It was time to get serious. The reZet80 DEV was on its way.
Again I soldered all boards from scratch and developed new hardware/functionality.
A separate I/O board with LEDs to keep track of the port being accessed
A 16-key keypad
A real-time clock (RTC)
And two LCD displays (16x1 and 20x4 chars)
I extended the bus to 80 lines.
I used separate ROM and RAM chips for the first time (32 KiB each).
The power supervisor started to cause trouble from time to time so made it optional.
Operation was stable all the time. This was my proof of concept for the hardware design!

Sunday, April 23, 2023

Early reZet80 history - stage 3

I needed to enhance my debug experience so I soldered a TIL311 debug board.
Having the TIL311 display the hexadecimal numbers read/written from/to ROM/RAM and inputed/outputed from/to I/O ports was a tremendous step forwards.
I also added a new blinkenlights PCB (I was prepared for 16 bits).
Also experimented with some LCD displays.
And built my own power supply for 3.3V, 5V and 12V.
Keeping my sessions reproducible was some proof of stability.

Saturday, March 18, 2023

Early reZet80 history - stage 2

This time I moved to bigger PCBs.
I used a ZIF socket in order to use both NMOS and CMOS CPUs.
I sticked to the nonvolatile SRAM chip and managed to keep my program alive in the RAM.
I also sticked to the single stepper and blinkenlights.
But I controlled all data, address and control lines via DIP switches.
I introduced the reZet80 bus.
And my power supply for 5V and 3.3V got an update.
Soldering didn't get much easier even with bigger sized PCBs.

Saturday, February 25, 2023

Early reZet80 history

In the 80s I coded in Z80 assembler on my Spectravideo SV-328 (MK 1).
I also had a Mini Expander (SV-602), an RS232 interface adapter (SV-805) and a serial dot matrix printer (I think it was a Seikosha but I'm still hunting for the proof photograph in the attic).
I remember being very excited about the available Z80 hardware but I never attempted to build my own (I guess coding in assembler was enough of a challenge for a 16-year old teenager in 1983).
Now that I started my reZet80 project in 2016 and I'm designing my own hardware I decided to document my early attempts at electronics.
Stage 1:
I built every component on its own PCB.
I used colored wires for address, data, control in, control out and clock signals I connected to a breadboard.
I used a nonvolatile SRAM chip so I didn't have to bother about keeping ROM and RAM apart.
Program was enterd via DIP switches on the debug board.
I used a sigle-step circuit as clock together with the blinkenlights board to debug every single instruction.
I used a power regulator right from the start.
And I connected my old competition pro mini as input port.
I was able to follow the CPU signals after every clock cycle. But somehow I managed to erase the nonvolatile memory from time to time. And my results were not reproducible all the time.

Monday, January 16, 2023

Understanding the DC characteristics of the Z80 CPU #2

In my last post regarding the DC characteristics of the Z80 CPU I analyzed its connection to 2114 (1Kx4) SRAM chips. Today I'll focus on the 2125 (1Kx1) SRAM chips.

Let's recall the 8 DC parameters of interest:
- VIL (input low voltage)
- IIL (input low current)
- VIH (input high voltage)
- IIH (input high current)
- VOL (output low voltage)
- IOL (output low current)
- VOH (output high voltage)
- IOH (output high current)

And the maximal and minimal values for the NMOS Z80 CPU:
- VIL = 0.8 V (max), IIL = 0.01 mA
- VIH = 2.0 V (min), IIH = 0.01 mA
- VOL = 0.4 V (max), IOL = 2.0 mA
- VOH = 2.4 V (min), IOH = 0.25 mA

The characteristic values for 2125 RAM chips (NMOS, fully TTL compatible):
- VIL = 0.8 V (max), IIL = 0.04 mA
- VIH = 2.1 V (min), IIH = 0.04 mA
- VOL = 0.45 V (max), IOL = 7.0 mA
- VOH = 2.4 V (min), IOH = 3.2 mA

The 2125 is a 1-bit chip.
So each of the CPU data lines D0-D7 is connected to one SRAM chip.
And the CPU address lines A0-A9 and the /WR pin are connected to all 8 RAM chips.
Let's ignore the /CE signal provided by the 74LS139 demultiplexer for the sake of simplicity.

When the CPU reads data from memory the values that apply are:
- for a logic "0":
  RAM: VOL = 0.45 V (max), IOL = 7.0 mA
  CPU: VIL = 0.8 V (max), IIL = 0.01 mA
The maximal output voltage of the memory chip is lower than the maximal accepted input voltage of the CPU. And the RAM chip could drive low 700 (7.0 / 0.01) Z80s.
- for a logic "1":
  RAM: VOH = 2.4 V (min), IOH = 3.2 mA
  CPU: VIH = 2.0 V (min), IIH = 0.01 mA
The minimal output voltage of the memory chip is higher than the minimal accepted input voltage of the CPU. And the RAM chip could drive high a minimum of 320 (3.2 / 0.01) Z80s.

When the CPU writes data to memory the values that apply are:
- for a logic "0":
  CPU: VOL = 0.4 V (max), IOL = 2.0 mA
  RAM: VIL = 0.8 V (max), IIL = 0.04 mA
The maximal output voltage of the CPU is lower than the maximal accepted input voltage of the memory chip. And the CPU could drive low a maximum of 50 (2.0 / 0.04) memory chips on every data, address and control line.
- for a logic "1":
  CPU: VOH = 2.4 V (min), IOH = 0.25 mA
  RAM: VIH = 2.1 V (min), IIH = 0.04 mA
The minimal output voltage of the CPU is higher than the minimal accepted input voltage of the memory chip. The CPU could drive high a maximum of 6.25 (0.25 / 0.04) memory chips on every data, address and control line.

Oops! 6 is less than the required 8 chips.
So how come the 1 KiB RAM card that uses the 2125 works without problems?
Because the typical values are much lower than the minimal and maximal values given in the datasheet. These are the absolute maximum ratings that can cause harm to the CPU.