MS Dos emulator for Z8001 (Z8,000 Seg Cpu)

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
So one of my hobbies is building and programing Z8001 based systems. Anyhow now that I've perfected the hardware design and written an assembler/debugger and _CPM like_ OS (which is superficially more MPE like) I think it would be fun to be able to run old text only DOS programs written for Intel processors:) Cuz it's a lot easier than porting all those programs and throughput isn't important:)

So b4 I do work of writing emulator I'm just asking if anyone knows of availability of open source MS DOS emulator written for Z8k? So I know I'll have to completely rewrite io and memory interface that's no problem! But just having emulator to start with would save a lot of work! Tnx in advance:)!

PS being open source isn't totally necessary but it would make it easiero_O!
 

JohnInTX

Joined Jun 26, 2012
4,361
I'm not sure why anyone would have ported 8086 assembler-based MS-DOS to the Z8001 which never really got traction but it would be an interesting addition to 'Completed Projects' if you can pull it off.

This won't affect the progress of EHT will it?
 

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
This won't affect the progress of EHT will it?
Johnintx I say nothing can slow progress on EHT tutorials more than they are:( But I say there's hope yet cuz we're making progress behind the scenes:)!

Anyhow my Z8001 based HP3000 _feel alike_ isn't new project at all so no problems:)!
 

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
You are emulating the HP3000 with the Z8001? Nice! My first programming experience was on a 3000
@JohnInTX I had old HP3000 series III (huge like 6' metal towers for processor and tape drives plus free standing HDDs almost as large as laundry washers) running MPE V when I was young (like 12 through 15 yoa) and even w/o graphics and only RS232 peripheral IO and all that I say it was nicest computer I ever owned:)! So the 3000 was @Hypatia's Protege's fave machine too so she gave me one on condition of it being for as long as it lasted w/o her having to repair it.

But it didn't run MS-DOS??
Johnintx that's right but I have to have some application software to run and there's lots of text based DOS programs still floating around:)! I discovered text adventure genre on that machine and played for hours at a time and it made me wonder how ppl could like graphic games at all which are totally lame by comparison! So I still feel like that:cool:!

I miss text-based computing sometimes..
HP always says GUIs were the great dumbdown and I see her point but I have to admit I'm way too acclimated to modern software to make the extended visit to command line world:eek::D
 

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
I'm not sure why anyone would have ported 8086 assembler-based MS-DOS to the Z8001 which never really got traction
Johnintx it doesn't have to be an assembler source cuz I can decompile just executable code if necessary but that can get to be work cuz of hassle of reconstructing data structures and like that:rolleyes:! But it's still a lot less work than starting from scratch:)!

Now if a DOS emulator isn't available, then just a C++ compiler for Z8k would be vry nice too cuz it would take most of the work out of writing emulator:)!
 

JohnInTX

Joined Jun 26, 2012
4,361
Johnintx that's right but I have to have some application software to run and there's lots of text based DOS programs still floating around:)! I discovered text adventure genre on that machine and played for hours at a time and it made me wonder how ppl could like graphic games at all which are totally lame by comparison! So I still feel like that:cool:!
I miss the old text stuff like Zork et. al. Wumpus and Adventure on the PDP-11. A lot of that stuff is available with emulation for the PC.

Johnintx it doesn't have to be an assembler source cuz I can decompile just executable code if necessary but that can get to be work cuz of hassle of reconstructing data structures and like that:rolleyes:! But it's still a lot less work than starting from scratch:)!
Disassembling is hard enough. Decompiling is rough since you have to deal with not only the disassembly and deciphering structures and the like but how the compiler and linker decided to put it all together. Given the task, I think I'd roll my own. JMOHO

HP3000- gotta love the woodgrain panels!
 
Last edited:

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
I miss the old text stuff like Zork et. al. Wumpus and Adventure
Johnintx HP started me on Advent (Adventure) and at first I thought what a drag:rolleyes:! But then I got totally addicted cuz there's like a magic to it that graphics games don't have at all:)! Even with primitive parser it's totally more like escaping to another reality and being on a real adventure than with graphic interface:cool:!

A lot of that stuff is available with emulation for the PC.
Johnintx that's right! I have a huge collection of dos based text adventures which is big motivation for me to finish z8k dos 6.0 emulator project so I can play them in like their _natural habitat_:cool: also even games with graphic _flourishes_ are easy to adapt by just trapping out non rs232 io references. So I say that's why I like emulators when throughput isn't a big deal cuz of total control:cool: So I wrote my Z8k based HP3000 emulator (which is more just interpreter than emulator:oops:) to exclusively use HP3000 instruction set:) which was pretty simple except for irritating part of figuring out how to implement HP3000's SCW/SCU with Z8k's DJNZ instruction cuz Zilog didn't document that on Z8k DJNZ only branches backwards which totally makes sense for looping instruction but since DJNZ instruction on Z80 (which is 8 bit Zilog processor) was bidirectional and since almost everybody using Z8K started on Z80 I say Zilog could have clued us in cuz not everybody was using Zilog supplied assembler:rolleyes: So if anybody else reading this likes to play with antique chips now you can relax cuz Z8k is supposed to work that way:D!

Decompiling is rough since you have to deal with not only the disassembly and deciphering structures and the like but how the compiler and linker decided to put it all together.
Johnintx I agree that figuring out variables and non standard stack manipulation can be a PITA but resolving calls (which includes software interrupts), re-contexting overlays and like that is no biggie cuz it's easy to code a _link chaser_ to just scope it all out:)! o/c program has to be in native environment so libraries and hardware resources are accessible at decompile time:cool:!
So anyhow I say I learned virtue of patience writing decompilers on that old HP3000 cuz when I wrote program to decompile the SPL compiler itself I totally found out that over half of it is in the system SL:mad:!

Given the task, I think I'd roll my own. JMOHO
Johnintx if I had a C++ or Algol compiler for Z8k that's what I'd be doing right now:)!

So abt pics of series III system, I contacted HP cuz I remember she posted links to pics of series III on here somewhere so cuz she's away from home she connects to web by remote access to her private network but she doesn't trust teamviewer enough to send login credentials and like that so she can't login but she was still able to find these threads where she mentions how she played with HP3000 when she was teenager (so she wanted me to have same experience which I say proves following in parent's footsteps works great for hobbies just not so much for career:p!)

Anyhow they're not too helpful:( Cuz pic of processor tower has no perspective and description is exactly how I described mine (which is what I get for parroting the way she always described her series III system but since it's totally accurate I can't think of any better way of describing it:))
https://forum.allaboutcircuits.com/...t-the-future-of-computing.117037/#post-917446
So here's links FWIW
https://forum.allaboutcircuits.com/...t-the-future-of-computing.117037/#post-917446
https://forum.allaboutcircuits.com/threads/power-supply-voltage-drop.109297/page-2#post-841746


So here's pic I thought HP posted which is from HP3000 Museum so u can have perspective on tower size cuz of operator!

So operator is touching a switch register bit on processor tower and tower to left is tape drive



Here's pic of washing machine sized HDD Sry abt no perspective:(
 

Bruce Mardle

Joined Mar 14, 2020
11
Hi, Aleph(0), did you ever find or write a Z8001 emulator?
I built a Z8001/Z8010-based computer in the early '80s and have lately been thinking about getting it running again.
I wrote an assembler in Sinclair ZX Spectrum Basic and eventually ported it to Turbo Pascal on an Amstrad PCW8512. The latter version is languishing on 3" floppy disks. I recently turned my PCW on but it seems to be dead :( I guess the earlier version is on a cassette somewhere. The keyboard on my Spectrum is dead too!

It's interesting reading that the Z8000's DJNZ only accepts backward jumps. I never noticed that! Does that mean the offset is only 8 bits? (I don't have the Programmer's Manual with me.) 1 of the reasons I chose to make a Z8000-based computer was that I expected that my knowledge of Z80 assembly language (from the Spectrum) would be useful. I'm not sure it was. E.G., I kept forgetting that you have to specify a register to DJNZ(B) on the Z8k, unlike the Z80 :)
 

MrAl

Joined Jun 17, 2014
7,895
Hi,

A possibility might be to emulate the basic Intel architecture then load MS-DOS.
Might not be easy but nothing is, and you might need a lot of memory.

I loved the Z80. Made a microcontroller board from one and wrote all kinds of stuff for it.
Also modified the operating system of the TRS80 which was Z80 based. The problem was the maximum date allowed in the OS that came with it was year 1987 and i was working with it past that date so i needed to be able to store files with dates beyond that. Sure wasnt easy though, using all assembler.
 

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
Joeyd999 since you said ur already married I say u must have started _libations_ early:p! Now for Zilog they were great until they found out Exxon oil isn't substitute for _love_ oil:eek:!
 

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
Hi,

A possibility might be to emulate the basic Intel architecture then load MS-DOS.
Might not be easy but nothing is, and you might need a lot of memory.

I loved the Z80. Made a microcontroller board from one and wrote all kinds of stuff for it.
Also modified the operating system of the TRS80 which was Z80 based. The problem was the maximum date allowed in the OS that came with it was year 1987 and i was working with it past that date so i needed to be able to store files with dates beyond that. Sure wasn't easy though, using all assembler.
MrAl TNX! But I already wrote faux MPE V for Z8000 system's OS. So now I just need to write or port SPL compiler (which is basically Hewlett Packard's version of Algol) but finding time for hobbies can be hard:(!
 

Thread Starter

Aleph(0)

Joined Mar 14, 2015
597
Hi, Aleph(0), did you ever find or write a Z8001 emulator?
Not yet but it will be vry easy once I get around to writing SPL compiler! So for OS I just wrote C++ transcoder to write mock MPE V OS using PC b4 transcoding it to Z8001 system but since I totally insist on authenticity I need to write SPL to develop all other Z8000 software on actual Z8000 system:)!


It's interesting reading that the Z8000's DJNZ only accepts backward jumps. I never noticed that! Does that mean the offset is only 8 bits?
Bruce Mardle it's actually 7 bit value but cuz instruction automatically doubles it, it gives max offset of -252 bytes from _top_ of instruction so actually u could jump 3 bytes forward of which 2 would be over instruction itself but that's just silly NOP substitute:rolleyes:!
 
Last edited:

Bruce Mardle

Joined Mar 14, 2020
11
Not yet but it will be vry easy once I get around to writing SPL compiler! So for OS I just wrote C++ transcoder to write mock MPE V OS using PC b4 transcoding it to Z8001 system but since I totally insist on authenticity I need to write SPL to develop all other Z8000 software on actual Z8000 system
MAME includes emulators for the Olivetti M20/40 and P8000 systems.
https://www.mamedev.org/
http://www.knothusa.net/

I wrote a relatively simple compiler in 2006/7. targeted on my MC68HC11 robot controller board. Since I wasn't expecting to run any pre-existing code, I devised my own language, which is a cross between C and Algol68.
I've started porting the compiler to ARM. Someone's said he's going to send me a MC68012 SBC. Maybe I should target on that too. And Z8001 :) Argh! Too many processors!
 

zeususer

Joined Nov 25, 2020
2
Hello,

my first week of Unix experience was on a ZEUS powered System 8000, using learn(1) to learn... the file utilities, vi, and cc. Later I was assigned to a project where we would cross-compile z80 code on the S8000. That compiler hat a flaw optimizing switch statements with ordered cases, so our workaround was to unorder them...

I reread the processor specifications a few days ago. Hellishly complicated instruction set, like the Z80 which I know very well from earlier hobbyist projects, but at least with a regular binary representation (and timings)...

Unfortunately, too many hobbies nowadays, I don't have the space to put a full-fledged S8000. Maybe I'll look at an emulator.

C++ (contrary to C) for the 8k1, on the 8k1, is a hellish project, the address space for single program is very limited - it's a real 16bit machine with a bit of segmentation on top. Contrary to the slightly younger mc68000, which is a 32bit cpu with (originally) an 16bit external data bus.

As for an MS-DOS emulator... maybe take dosemu or dosbox, strip it of audio support and try to translate it? on a ZEUS or WEGA system, I'd certainly try that. Hm... dosbox needs c++, and dosemu insists on bison (not yacc) and gcc...
 

Bruce Mardle

Joined Mar 14, 2020
11
Cool!
I reread the processor specifications a few days ago. Hellishly complicated instruction set, like the Z80 which I know very well from earlier hobbyist projects, but at least with a regular binary representation (and timings)...
I don't remember the Z8000 instruction set being particularly complicated. Maybe compared with the MC68000, but not the i8086.
1 annoying feature of the Z8001 is that a lot of instructions let you choose from 5 addressing modes (this being a CISC) which include segmented address in instruction and 16-bit offset in register but NOT segmented address in register pair and fixed 16-bit offset in instruction, which I would have thought was much more useful (e.g. for accessing things in frames in a stack that uses multiple segments). (LD lets use use 13 different addressing modes.) (Of course, in nonsegmented mode, they're essentially the same addressing mode.)
<ramble>I built a very simple Z280 computer several years ago and, since I couldn't find an assembler I could afford, my own assembler. Not that *is* a complicated instruction set. Sometimes there are instructions with a long version with a 16-bit offset and a short version with an 8-bit, so the assembler has to select between those. And sometimes there's a short version of an instruction and a pointless, longer version, which can safely be ignored (though not by the disassembler!).
The Z280 seems to have some features copied from the Z80,000! Why anyone would want virtual memory on a processor with a 16-bit logical address space and a 24-bit physical address space, I can't imagine. (The other way round, yes.)
</ramble>
 

zeususer

Joined Nov 25, 2020
2
I don't remember the Z8000 instruction set being particularly complicated. Maybe compared with the MC68000, but not the i8086.
Well, yes. 8080 is 8008 with addons, which is 4004 with more bits.
z80 is 8080 with stuff added. (I know that one very well) While Zilogs mnemonics are regularized, the underlying instructions are not, and without knowing the history (and the Intel mnemonics) it's hard to remember what mnemonic-address mode combinations are available (and how fast they are).

z8000 is z80, regularized, but with all the instruction ideas carried over to 16bit register width (register file also regularized).
8086 is modeled as how to extend the 8080 to a 16bit segmented architecture (although in a different way than the z8000).
so both are bound to be complicated beasts.

What's especially complicated in my eyes is: seperate i/o instructions, all those special loop-repeating instructions. Ideas from the Z80.

Motorola went a different way - conceptually from the beginning 32bit address space, no fighting with segment boundaries. (and I've also played with powerpc and ARM and a small bit MIPS), so I'm bound to see both z8k and i8086 as complicated. I've never programmed the i'86 in assembler....
 
Top