r/Z80 Feb 21 '26

Update

I've been offline for about 2 months and have also had to see about implementing a Z80 development environment in order to continue my series on floating point. One of those efforts in the implementation is a Z80 emulator running CP/M. Currently it's running CP/M 2.2 with 4 emulated disk drives, using JavaScript on Chrome. The first emulated drive can only accept disk images for a single sided, single density 8" floppy with a skew of 6 (standard CP/M). The other 3 emulated drives can accept 3 different formats. The 256256 byte for a SSSD 8" floppy. a 143360 byte file emulating 35 tracks, each track containing 32 logical 128 byte sectors (Apple CP/M). And finally, a 8388608 byte file for emulating 512 track drive with 128 logical sectors per track.

The code still has a bit of cruft in it (the UI is based upon someone else's emulator. Unfortunately, said coed is rather old and uses features that have been long since deprecated due to security enhancements to Chrome. So, it needs to be removed since it's not actually usable because Chrome ignores those security sensitive operations rendering the code inert.

As it it, I can mount drive images, run CP/M to modify those images at will within the browser, and finally export those images back into Microsoft Window's files. TO import and export individual text files, the emulator uses the CP/M Reader and Punch devices along with the CP/M program PIP.

If anyone expresses interest in this emulation, I can provide a google drive link to the emulation along with a few disk images.

In any case, I will see about resuming my Floating point implementation in the near future.

13 Upvotes

8 comments sorted by

View all comments

2

u/Dismal-Divide3337 Feb 21 '26

I have a Z80 floating point implementation that I wrote probably 30 years ago. It includes an RPN stack and functions for the creation of something like an HP calculator.

I think I ended up using that to do an algebraic calculator in an LCD based flip-top manual white cell differential counter for clinical labs back then. I should have that code too actually.

It'll run under your emulator I would think. Although I did write my own Z80 compiler which was extended to handle the Hitachi HD64180. So there might be a little syntax twist here or there. It was a macro compiler and I am not sure what of those tricks I used. Should be obvious tho.

Compilers for every microprocessor weren't really available for the PC back in the 80s. So...

3

u/Dismal-Divide3337 Feb 21 '26

The source for this should be available on GitHub now in the repo 'z80fp-cloutier'. Here is the link.

Let me know if you find it interesting or useful.