eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

201
active users

#z80

5 posts4 participants0 posts today
Continued thread

That wasn't too hard either. Now I'm dealing with tape and floppy access stuff, but for the most part this is working surprisingly well.

I only had to adjust the translation of keypresses, so you can use a PC/Mac keyboard arrows and Tab=Edit and so on, but other than that, surprisingly straightforward when you start with a clean codebase.

ZX Spectrum: emulated

To be honest, I thought it was going to be a lot harder, and it would take a lot of debugging to get this done.

But ultimately, I only had to grab parts of the older Spectrum emulator I had started last year, remove the old spaghetti Z80 that didn't work well, and plug the new well-tested zen80.

I would call this a very successful weekend 🙂

zen80 update: improved tests

Apart from the already substantial unit tests, we now have two additional and rather stringent tests:

  1. This test loads the ZX Spectrum 128 ROMs (0 and 1) and runs that machine's initialisation process. Then it shows a statistical analysis of the instruction coverage that's been executed during rom initialisation. (total percentage of different opcodes executed for each instruction group)

  2. The second big test implements traps as barebones CP/M shims, loads ZEXDOC.COM and runs its extensive stress test (this can be long).

Work is ongoing to support ZEXALL.COM as well, an even more stringent version of zexdoc that also tests undocumented registers and quirks of the Z80, one of the hardest tests known. This will be next, after I'm certain that this passes all ZEXDOC tests without a hitch. So far so good!

zen80 is a simple Z80 emulator written in Go.

github.com/ha1tch/zen80

It's a preview version and it still doesn't pass all the tests, but it's starting to show some promise.

This is not a ZX Spectrum emulator, this is Z80 only (although some source examples show how to use zen80 to implement a running headless system).

The older hardcoded Spectrum emulator that has optimised screen display will be frankensteined with open heart surgery once I have the new zen80 ready and passing all the tests.

A Z80 emulator written in Go. Contribute to ha1tch/zen80 development by creating an account on GitHub.
GitHubGitHub - ha1tch/zen80: A Z80 emulator written in Go.A Z80 emulator written in Go. Contribute to ha1tch/zen80 development by creating an account on GitHub.

I have always treated Programming The Z80 book by Rodnay Zaks as the bible of #Z80 knowledge. So this morning I was surprised and excited to see this snippet of text

"The clock input θ &. The Z80 incorporates the clock oscillator within the microprocessor chip. Only a 330-ohm pull-up resistor is necessary externally. It is connected to the θ input and to 5 volts. However, at 4 MHz, an external clock driver is required."

Wow! The Z80 has an internal clock? I never knew that, but was really excited to read this!

Wee! I wrote a window manager for MP/M, four windows in the screen, dynamically resizeable, while program(s) are running.

Windows are virtually 24x80 "Heath H19" compatible, up to 30 x 90, so cursor ("curses") format windows shrunk to smallest visible, if dragged full size, draw the off-screen portions. Programs can be writing to the screen while resizing, the "VGA device" does the work.

The bottom line of each command line interpreter, I call the "hotspot", is always visible in a window; portions of the window larger than the box are virtually present, just not displayed.

The Z80 running MP/M or CP/M sees the screen as IO ports; one to write data to, one to specify the window. Magic keyboard keys (Fkeys) switch windows (MP/M: assigns keyboard to task window), arrow keys drag the "cursor" to resize all four at once, another key "maximizes" current screen (make largest; make 24x80; make tiny).

Lol, the cursor decided to not display for the video, there' still bugs to shake out etc.

You can resize the VGA display (480x640 to 1024x768) with program(s) running, and everything does exactly what you would expect. Can't do that with Xorg! Not that that's useful, lol, but the window buffering came out super clean.

This is event driven/task loop programming taken all the way; none of this is interrupt driven, it's all non-blocking task loops. Average task loop time (running through all dozen main tasks) is 5 - 10 uS, worst case 55 or so mS (large screen scrolling). I may unwind scrolling and drop that to a millisec or so but there's no downside I can determine.

MP/M will have four tasks, four "seats". on window per, and 48K per user/task, four running at once (and only four). MP/M performance will be very nice. Got the XIOS written, soon to test it...

#CP/M #cpm #mpm #MP/M #retrocomputing #z80

The lesson for today is that when you are bringing up a new design that you should check basic things like the clock frequency early on in the process.

Also learned that a 10MHz #Z80 clocked at 30MHz is unstable. 🤷

Soak testing new SAA1099P cards for RC2014 via a SAM-RC Bus Interface on my SAM Coupe computer.

With four cards, plus the SAA built into the SAM, that gives a total of 30 SAA sound channels... Hmmm...! 🤪

2014.samcoupe.com
for all the hardware I've designed for use with the RC2014 ecosystem and compatibles (inc. ZX Spectrum via a ZX-RC Bus Interface!)
- SID Soundchip Interface
- Graphic OLED
- SAA1099P Soundchip Interface
- ZX True Tone (for YM/AY soundcard)
- Bus Interfaces to use RC2014 peripherals with several home computers.