An i8080 simulator

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Post Reply
fabrizio
Posts: 73
Joined: Sep 29, 2006 13:39
Location: Roma, Italy

An i8080 simulator

Post by fabrizio »

This is my self made 8bit asm coding playground.

It contains the i8080 simulator, called "8080 Box" and a (cross) assembler, called "8080 Assembler", both in FreeBasic with source files.

Please let me know what you think.

Bye,

fabrizio

http://file-pasta.com/d/2219.zip
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Post by yetifoot »

looks like nice work, I did a z80 emulator in the past, very similar to the 8080
fabrizio
Posts: 73
Joined: Sep 29, 2006 13:39
Location: Roma, Italy

Post by fabrizio »

You certainly worked a lot more than me: only 250 8080 instructions vs more than 700 Z80 instructions. My original goal was the Z80, but I grew tired earlier. If I was to start again now, I would opt for the 6502: ca 250 instructions but less repetitive because less registers and more addressing modes. You only discover these things after...
oyster
Posts: 274
Joined: Oct 11, 2005 10:46

Post by oyster »

hi, fabrizio
where does your program live now?
fabrizio
Posts: 73
Joined: Sep 29, 2006 13:39
Location: Roma, Italy

Post by fabrizio »

Hi, thanks for your interest in my prog.
The prog waited patiently in my USB key until now, beacause development ceased after the post.

I uploaded it here (thanks Kristopher).

http://freefile.kristopherw.us/uploads/ ... 80_box.zip

Please let me know what you think.
Bye,

fabrizio
Last edited by fabrizio on Nov 10, 2008 13:20, edited 1 time in total.
TheMG
Posts: 376
Joined: Feb 08, 2006 16:58

Post by TheMG »

I haven't tested this out or anything, but this sounds AWESOME! Mainly because I read a tutorial on compilers which coded with you as you go along. It was made a while ago, so the assembly output is for the 8080. I may be able to use your emulator for testing!
fabrizio
Posts: 73
Joined: Sep 29, 2006 13:39
Location: Roma, Italy

Post by fabrizio »

Wow. Glad if 8080box may be of any help.
(Please forgive any bugs you might find.)
Cherry
Posts: 358
Joined: Oct 23, 2007 12:06
Location: Austria
Contact:

Post by Cherry »

Why is your program using TEXT FILES with the bytes written as ASCII NUMBERS? Why don't you use binary files?
fabrizio
Posts: 73
Joined: Sep 29, 2006 13:39
Location: Roma, Italy

Post by fabrizio »

It was a deliberate choice. As much as possible had to be human readable. A simulator has this advantage over the real system, that you can actually stop a minute and look into it. So I let clarity prevail over adherence. The same applies to decimal numbers being used instead of the more obscure hex.

Furthermore, we are not suffering from the constraints in memory, storage or speed of the original systems, so we don't actually need to optimize: the simultaor will naturally run faster than the original.
Cherry
Posts: 358
Joined: Oct 23, 2007 12:06
Location: Austria
Contact:

Post by Cherry »

Yeah, but this way you can't run original binaries :)
fabrizio
Posts: 73
Joined: Sep 29, 2006 13:39
Location: Roma, Italy

Post by fabrizio »

Yes, well. Programs in assembler are closer to the actual hardware and mine is invented from scratch. I doubt an existing i8080 binary could run as-is in 8080box.

In fact all I wanted was to try and program in assembler like one could do on the seventies and eighties computer. So I put together a CPU and a memory map, a screen and a simple assembler.

I hoped that maybe I could go on and translate a small OS like that of the Sinclair ZX80 (4K). That was where I realized I didn't like to program in assembler in the first place...

Anyway, if you feel like loading binaries, it shouldn't be difficult to add.
oyster
Posts: 274
Joined: Oct 11, 2005 10:46

Post by oyster »

thanks fabrizio :)
your code and doc are very clear for study
Post Reply