Next (6502 Wiring) ⭆

Chiplab Introduction

Also available on Youtube

Emulator development is difficult, and there are 3 key things that make it challenging. From easiest to hardest:

  1. Implementation
  2. Testing
  3. Specification

Lets talk a bit more about these. Implementation of an emulator can be tricky, particularly to ensure that the emulated system can run at “full speed”. And there tend to be many little details that can be tricky to implement. However, if you have a good specification, and a good way to test and detect issues, implementation tends the be the easier of these three.

Testing actually feeds into specification, so perhaps it doesn’t belong on its own. Testing is used both against the emulator in development, and against the original system in order to gain the original understanding of its behavior. When something “isnt working”, testing is how we find the correct behavior.

In the initial understanding of a system, ample testing is required to develop a model of how the system is meant to behave.

With the collection of these test results, one can finally produce a specification.

Specification of a system is producing a list of requirements for the behavior of the system. If the specification is complete, it should fully describe how a system should behave in a certain situation. If a fully correct and complete specification of a system is available, implementation is a breeze, and testing can be reduced to comparing against the specification.

A perfect specification is ideal, but cannot be achieved without a good way of testing.

I believe testing can be made much easier.

ChipLab idea

My plan is to build a system that makes it easy to set up experiments against a real integrated circuit. To use a bit of science fiction analogy, it is to resemble a sort of Matrix for chips. If the lab environment can fully set or examine each of the inputs and outputs for the chip, we can easily discover and document the expected behavior of a sytem.

This general approach can be applied to a variety of chips. Once I have something working for a very simple chip, I can work on adding additional chips to the system.

Planned support

There are two main types of experiment I would like to support. First is the ability to set and observe each of the input/output (IO) pins of the chip. This is extremely primitive, but gives the most flexibility and control when producing experiments.

Second is a bit more abstract, which is the ability to execute simple programs running against the chip. For chips which resemble CPUs, this more abstract view is on the appropriate level for reasoning about the chip. This support requires the ability to set each pin, of course.

Rough plan

There are a few pieces required to make this work. A rough sketch involves:

First Chip: 6502

First up is the 6502. This is a relatively simple 8 bit system. And its behavior is very well documented. If the chip were not already well known, issues could either come from poor understanding of the chip or issues within the ChipLab. A well known chip allows us to isolate issues to within the lab.

And thats it for the initial outline. Next I’m going to order a 6502 and start putting something together.

Next article: 6502 Wiring.

Next (6502 Wiring) ⭆

We publish about 1 post a week discussing emulation and retro systems. Join our email list to get notified when a new post is available. You can unsubscribe at any time.