“What I cannot create, I do not understand.” – Richard Feynman

A Home Made Calculator

From nothing more than a sea of gates, to a modern scientific calculator

An FPGA-based, implemented with a fully custom CPU, scientific calculator with 13 digits of precision and all extended trigonometric and logarithmic functions (and much more).

  • Normal, scientific, and engineering display notation; also, select a number of digits to display
  • Basic algebraic functions (including powers and roots)
  • Trigonometric and inverse trig, in both radians and degrees
  • Logarithmic and antilog, both decimal and e base
  • Hyperbolic sin, cos, tan, and their inverse
  • Statistical mode with mean, sum, the sum of squares, and standard and population deviation
  • Combinatorial and probability: nCr and nPr
  • Conversions: between degrees and radians, between polar and Cartesian coordinate systems, between Fahrenheit and Celsius
  • Factorial, percentage, and percentage of change functions
  • Memory value store, and recall, value add to a store register

The idea for this project came about during a week of freezing arctic winter events here in Austin, Texas, with a failed power grid (as well as the Texas government) while keeping close to a gas fireplace, the only source of heat and light, for a few days. With weak internet over a phone data line, I could only do some preliminary searches and mainly work out various details on a writing pad, and with a growing feeling that this kind of project may be personally exciting and practically doable.

Note: The calculator has been completed, but I am still tinkering. Above all, I am behind in documenting it and publishing the source code.

  1. Introduction to the idea
  2. Basic Four Functions and Verification
  3. Practical Numerical Methods, more advanced algorithms
  4. The Framework for Development
  5. … (to document)
  6. The calculator is complete and running!

You can see how it works in on this video; since then, I have added code to print to an HP 82240 printer, which you can see in in this video. You can try a WebAssembly runnable version here.


Z80 Explorer

An advanced, visual netlist-level simulator

Z80 Explorer is a Zilog Z80 netlist-level simulator capable of running Z80 machine code and also an educational tool with features that help reverse engineer and understand this chip better. Read more…

The open source project is on GitHub: https://github.com/gdevic/Z80Explorer, and a brief overview on YouTube


The A-Z80 CPU

A novel implementation of an old CPU

This article contains a brief overview and introduction to the A-Z80 CPU created for FPGA and a ZX Spectrum implementation tied to it. Read more…

A Z80 From the Ground Up 

Zilog Z80

A-Z80 is a conceptual implementation of the venerable Zilog Z80 processor targeted to synthesize and run on a modern FPGA device. It differs from existing Z80 implementations in that it is designed from the ground up through schematics and low-level gates. This set of articles describes its design and implementation.

  1. Introduction
  2. The Heart
  3. The Mind
  4. The Soul
  5. Gratitude…
  6. Z80 (and retro) Library

Open source project at GitHubhttps://github.com/gdevic/A-Z80

and OpenCoreshttp://opencores.org/project,a-z80

Sinclair ZX Spectrum on the A-Z80 CPU

Avalon

It is time to do something useful with the A-Z80 CPU, so why not implement a Sinclair ZX Spectrum computer, kick back, and do some retro gaming?

Read more…


PlayZX

PlayZX is an Android app to search, download and play ZX Spectrum games, as sound files, directly into your Speccy.

The application works with a large database of games (over 12,000 titles!). You simply select a game you want to “play,” within a few seconds, the image should be downloaded, converted to a sound file, and then played through the audio output on your device.

Read more…

Get it on Google Play

ZX Spectrum ROM mods

In this blog, I show how to interface an Atari-style joystick to the Altera DE1 FPGA board running a Spectrum implementation, how to change the ROM to enable you to input some game-cheat pokes, and a few games I eventually completed using this setup. Read more…

The Anatomy of a Z80 Gate

Z80 data gate layout

The data bus on the Z80 processor carrying information within the chip itself does not simply connect to package pins and out to the world – the gate circuitry of each bit is quite complex. This article presents a transistor-level schematic of a data bit’s gate, which I reverse-engineered from a die photograph.

Read more…

Z80 Instruction Register deciphered

Zooming in on one bit of instruction register latch

Deciphering a chip die-shot into meaningful logic gates may be hard, but it is both challenging and interesting. It is not too difficult if you follow certain guidelines, which I describe in this post.

Read more…

Arduino and ZiLOG Z80

Z80 dongle for Arduino Mega

If you want to find out exactly what a venerable Z80 is doing on its bus while executing instructions, in this post, I outline a dongle for Arduino and the software that will let you see that. 

Read more… or read about tests…

A Poem by FPGA

FPGA board with Altera Cyclone II on it

This post is about making an FPGA to display text on a VGA monitor.


Do It Yourself: Making a Printed Circuit Board

This is a set of articles on DIY making of a PCB board.

"Hello, World!"

We build a board from scratch with the Atmel SAM3 MCU on it. We complete the project with the necessary software programming, starting with the initial board requirement stage, through the design, and then “in-garage” manufacturing.

  1. Introduction
  2. Get Started
  3. Schematics
  4. Layout
  5. The Mask
  6. Cut a Board
  7. Expose and Develop
  8. Etching
  9. Tinning
  10. Drilling holes
  11. Solder parts
  12. Protection and Sealing
  13. Enclosure
  14. Testing and Troubleshooting
  15. Software
  16. Conclusion

Development PC Setup

This blog post describes the various tools I use for work and hobby projects on my development PC. Read more…

GitForce – A visual git client

Git is a popular source revision control system; GitForce is one of the visual front-ends to the git command line tool with the look and feel of Perforce SCM.

I wrote GitForce to help people – who are already familiar with Perforce – to transition to using git with a minimal learning curve.

Read more…

Open source project at SourceForgehttp://sourceforge.net/projects/gitforce

Sources are at GitHub: GitHub – gdevic/GitForce: A visual front-end to git

Flight Sim Remote Panel

Flight Sim Remote Panel 2 is an Android application that shows a basic general aviation instrument set (basic-6 and radios) on your Android phone or tablet.

This application extends the general airplane instrument panel onto an Android device; you can completely close your instrument panel on the X-Plane display and use that extra space for a larger view or to show different instruments.

Read more…

Get it on Google Play

VMSim – An Attempt at Virtualization

VMSim

The x86 virtualization became a mainstream technology, but it was not always that way. Intel CPU architecture was not designed for virtualization, so it was relatively recent that clever software methods were devised to successfully implement it.

In this post I want to share some interesting technologies I’ve discovered while writing a proprietary virtualization solution. Read more…

 Debugging Linux kernel using LinICE

I wanted to write a Linux driver for an FM-radio card I purchased but then I got very disappointed with the existing Linux debugging tools – and their inferiority to Windows debuggers. So, instead of writing a driver, I wrote a source-level kernel debugger for Linux instead.

Read more…

Open source project at SourceForgehttp://sourceforge.net/projects/linice


Fixing Convergence on TV

tv-broken

Just before the Wold Cup the most horrific thing happened: our Mitsubishi WS-65819 broke!

Now, most people would run to the nearest store and purchase a brand new TV without blinking, but this mishap presented an opportunity to see what’s inside that box and perhaps try to fix it. Read more…

Building a Custom Picture Frame

June2009 002

For a long time, I wanted to get an internet radio to get access to thousands of stations from all over the world. I ended up building a custom “radio” that can do that – and more.

Read more…


Ambient Weather WS-2080 hang fix

A programmable USB dongle

A weather station, Ambient Weather WS-2080 has a nasty hardware issue: occasionally, its USB interface would hard hang. Once it happens, nothing short of a power reset of the receiver unit would fix it. I’ve finally got around to fix it. If you have a similar problem with that weather station, read more…


Sinclair ZX81 lives on!
Parallel Port Logic Analyzer
Software Scope using a Sound Card
RS232 and Raspberry Pi (1)
RS232 and Arduino (2)
Accuracy of Arduino’s ADC
Printing from Eagle
Etching the PCB: Copper etchant calculator


Comments are closed.