Un émulateur de MZ-800 / MZ-700 / MZ-1500 pour Windows.

Les changements principaux sont:
– The emulator can now be built on macOS as well (guide: docs/build_osx.md). Thanks to Mathias Olsson for the contribution.
– BUGFIX: macOS – the emulator crashed shortly after start while updating the main window title. (GitHub issue #2)
– BUGFIX: Debugger – a MEM_W/MEM_R breakpoint incorrectly triggered already when an instruction at the watched address was executed.
– BUGFIX: Debugger – MEM_W/MEM_R and IORQ breakpoints only worked while the Disassembled window was open. They now work without the Disassembled #1 window open too.
– Debugger – for a memory-access breakpoint in the memory bank zone (MMEXT_BANK) you can now choose how the entered address is read: either as an address in the CPU view (0000-FFFF), or as an offset within the bank (e.g. 0000-1FFF). The offset within the bank catches an access to that bank regardless of which CPU window the bank is currently mapped into.
– BUGFIX: Trace Suite – turning recording off (or changing a channel mode) from the menu while emulation was running could crash the emulator. Recording is now started and stopped safely on the emulation thread.
– CHANGE: Trace-suite recording now has a default size cap of 2 GB per channel (previously unlimited) so a long recording (mainly CPU Track) cannot fill the disk. When reached, the channel stops; the cap is configurable (max_total_mb, 0 = unlimited).
– BUGFIX: fixed timing in the z80-mz800 CPU core – the CPU executed an interrupt immediately after EI instead of after the following instruction. The bug was introduced in version v2.0.2
– BUGFIX: In IM 2 mode, when an interrupt that did not originate from the PIO-Z80 arrived, we previously returned the vector 0x00 incorrectly. Now the « bus ghost » value is returned. A minor fix was also added in the I/O Ports window and the Events window. Snapshot: loading a snapshot corrupted the Unicard SD root dir configuration.
– MCP server – events are now available over TCP as well (previously only over the pipe). Typed breakpoints (MEM_W, MEM_R, IORQ…) can be created. Instruction tracing can be fully controlled over MCP (start/stop/reset/save, with channel selection). MCP tools now always return an error message instead of an empty response on error.
– BUGFIX: MCP server – sending keys to the emulator now reports whether the keys actually landed. Previously the tool could report success even when the machine did not accept them.
– Tracing can now be limited to an address range (PC filter).
– A breakpoint action can run additional commands – control tracing and CDL recording (start/stop/reset/save) and save a snapshot or a memory segment right from the breakpoint (including a continuing one), with a file name template.
– BUGFIX: MCP server – emu_run now stops emulation deterministically (exactly at the requested frame count). Previously the asynchronous pause stopped it at a variable point, so tracing over MCP could nondeterministically affect timing-sensitive programs.
– MCP server – the emu_run response now includes a stopped_by field (why the emulation stopped: ran the full frame count, breakpoint, pause or timeout); the complete field is now true only when the full requested frame count was reached.
– SPEEDUP: The emulation is significantly faster in MAX SPEED mode. Thanks to Z80 core and memory access optimizations it now runs about 42 % faster (up to ~47 % on memory-heavy code). Specifically: a per-step Z80 core variant without the internal register cache (+27 %) and direct (inline) access to plain RAM instead of going through a function pointer (+11.6 % to +15.6 %).
– BUGFIX: Unicard – the short file name field (8.3 format) in the directory listing and file status contained only a truncated long name instead of a valid 8.3 name for long file names. The emulation now generates the same 8.3 name as a real card.
IMPORTANT: it turned out that each Unicard firmware version fills this field DIFFERENTLY – and the emulation now reproduces BOTH variants. Firmware uc1 (MZ800UKP1) preserves letter case (e.g. « seesharp.mzf » stays lowercase); firmware uc3 (Unicard3) uses uppercase only. The emulation picks the correct variant based on the active firmware.
– BUGFIX: Unicard – the binary directory listing and file status now also faithfully fill the long name field and its length, according to the active firmware (uc1 and uc3 fill these fields differently – on uc1 the long name is sent only for files that actually have one, on uc3 this field carries the primary name). As a result, code tested against the emulator also works on real HW. Firmware uc1 additionally sends a « .. » entry in subdirectories (uc3 does not – its manager adds it itself).
– CHANGE: A bug was found in the Unicard uc3 (Unicard3) firmware – in the binary directory listing it does not fill the long file name (LFN) field. In this point the emulator deliberately behaves CONTRARY to the accurate-emulation principle: it emulates uc3 the way we believe it should behave IF the bug were not there (i.e. filling the LFN correctly). For this reason, uc1 (which is faithful to the real HW) is now the default Unicard firmware for MZ-800.
– BUGFIX: the main window was not placed at the center of the screen at startup on lower-resolution displays when a startup window size other than « Native » was selected. The window is now centered for all sizes, including after leaving full-screen mode.
– BUGFIX: MCP server – direct physical memory access (region_read/region_write and the file_load/save_from_region composites) was unreliable in some situations: reading large regions (around 64 KB) over TCP stalled the connection, and region IO failed until the debugger was opened. It now works reliably even for full 64 KB regions and right after startup; on error it returns a clear message instead of an empty response.
– BUGFIX: On-the-fly reads from the CTC 8253 occasionally returned a wrong value. The bug was introduced in v2.0.2 when the emulation was split into the DBG and HOT paths.

























