Post Reply 
8080 Simulator
03-12-2016, 10:20 PM (This post was last modified: 03-12-2016 10:21 PM by smp.)
Post: #1
8080 Simulator
Hello all,

I have constructed an 8080 simulator and I would like to share it with you for your examination and comment.

You may have seen my "newbie" questions recently. I owe many thanks to Tim, Cyrille, Didier and DrD, for their patient responses to my questions.

This initial version of my 8080 simulator uses matrix M1 as a single column array containing the memory for the 8080. The opcodes must be entered into M1 as positive integers between 0 and 255 (decimal).

A few instructions are not yet implemented. If these opcodes are encountered, a message will be printed out to the Terminal. If an illegal opcode or a HLT is encountered, the program will halt and a dump of the 8080 registers, flags, and the temporary variables will be printed.

At present, the OUT opcode will print a message to the Terminal that indicates what value was output to what port. The IN opcode will print a message indicating that input was requested from a port, and it returns 0 to the running program.

My hope is to be able to create a M1 array containing a simple system monitor for the 8080 with memory inspect and change, etc., so that one could have a simple 8080 system running that will allow entry and execution of simple programs.

There is an interesting quirk with M1. There is no location 0 since the matrix starts at 1. So, you will see comments in my code for when I had to remember to deal with that.

Your comments and critique are welcome. I am not a strong programmer, so please do not expect anything elegant. Your suggestions for improvement are welcome.

smp


Attached File(s)
.txt  smp8080.txt (Size: 38.56 KB / Downloads: 91)
Find all posts by this user
Quote this message in a reply
03-13-2016, 07:55 AM (This post was last modified: 03-13-2016 08:09 AM by Mark Power.)
Post: #2
RE: 8080 Simulator
Nice work. Have a look at my Chip-8 (RCA1802) emulator. You could take the application framework that I've wrapped around the emulator so that you can load binary files directly into the emulator.

http://www.hpmuseum.org/forum/thread-475...l#pid39757

You might also want a quick read of the Chip-8 article I wrote for HPCC's Datafile:

http://hpcc.org/calculators/hpprime.html#datafile
Find all posts by this user
Quote this message in a reply
03-13-2016, 05:14 PM
Post: #3
RE: 8080 Simulator
Thanks very much, Mark!

Thanks also for the pointers. Your work looks very interesting, and also very impressive.

smp
Find all posts by this user
Quote this message in a reply
11-10-2017, 08:10 PM
Post: #4
RE: 8080 Simulator
After a lengthy hiatus, I got back with my 8080 simulator. I decided to try and put a simple program into M1 and get it to go. I then proceeded to find a few problems in my code for rotating the accumulator left (RAL) and fixed that. As well, I found a few errors in my code comments for the various return instructions, and I fixed those, too.

Attached is an updated text file of the 8080 simulator.

Can anyone tell me what is the procedure I should use to extract a copy of the M1 matrix that I used, so I can post a copy here?.

Thanks,
smp


Attached File(s)
.txt  smp8080.txt (Size: 38.37 KB / Downloads: 5)
Find all posts by this user
Quote this message in a reply
11-11-2017, 10:39 PM
Post: #5
RE: 8080 Simulator
In the connectivity kit, drag the M1 matrix from the calculator to the Content section below. Then you will find it in your connectivity kit Content folder called M1.hpmat. It appears to be a binary file so zip it and post it here.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)