-
The Trials and Tribulations of Debugging Code
It works. Kind of? There comes a point in every programmer’s education/career where, after spending weeks writing and testing code, one excitedly compiles and runs their code, expecting great things. Often, there seems to be a bug that is causing the program to behave unexpectedly and worse, in the worst case, it seems impossible to…
-
Implementing controls for the 8080
The RST, IN, and OUT instructions Now that our team has an interrupt function that can interpret when an RST instruction is present, we can pause computation and interpretation of all other instructions until the RST call is resolved. Last time I mentioned that the processor has an internal “interrupt enable” bit, which is a…
-
Finally a working CPU! Now what?
Our team has just completed implementing the 50 opcodes necessary for our emulator to run Space Invaders. But how did we determine that our bare-bones CPU was complete and free of error? And what are the next steps now that we’re reasonably certain our CPU implementation is correct? As to the first question, our team…
-
(Not So) Stupid Binary Tricks
In lieu of diving into the specifics of implementing instructions for the 8080 emulator, I wanted to spend some time writing and thinking about binary arithmetic. Some people might say that delving deeply into this subject is a waste of effort, since there are programming structures like if-statements and loops to efficiently handle bit manipulation,…
-
Disambiguating and Disassembling the Space Invaders ROM
Dis-a-what? Simply put, a disassembler is a program that translates a stream of hex numbers back into assembly language source code. The disassembler will allow us to familiarize ourselves with 8080 instruction set. It might also be useful for debugging later on in this project! The Space Invaders ROM is available online as 4 separate…
-
The Legacy of the 8080 Processor
Introduction Who can run Space Invaders? Transform the PC industry anew? Use NMOS transistors, and a support chip or two? You may not know this, but the Intel 8080 might be directly responsible for starting the microcomputer industry as we know it today. It is also because of the 8080 that some of the most…