How to save work in progress
Emulator of the 8-bit computers Sharp MZ-800 / MZ-700
Brought to you by:
chaky
Hello, I am using this emulator for long time. I write programs in Z80 machine codes and I need a way to save my work as a file, preferrably with mzf extension. I tried to use S command (Filename? Top Addrs? End Addrs? Exec Addrss?) and program gives me an Ok! message, but I cannot locate the file anywhere. Is there a better way of doing this?
Hi,
From what you describe, I believe you are trying to save your code with the “S” command in the MONITOR 9Z-504M — using this method the program is saved to the virtual CMT in WAV format. The following procedure will work exactly the same from the MONITOR, BASIC, CP/M, or any other MZ-700/800 system that uses CMT:
Disable the CMT hack: Menu → CMT → Use CMT Hack
Open the virtuál cassette-player window with Alt + C
Click the “recording” button, and a prompt will open asking you to create a new PC .wav file (be careful not to overwrite an existing file!)
As soon as you choose the new file, the virtual CMT will stay in "recording" + "pause" mode, and the cassette deck will wait for the motor start impulse.
Now, in the window of the emulated computer execute the "S" command — this will start the motor and begin storing the data.
Notes:
a) Filename — this is the MZ name that will be saved into the MZF header, not the name of the file on your PC.
b) If CPU boost is enabled for the virtual CMT, then the emulator’s speed will be set to MAX whenever the CMT motor is running.
c) It’s rare, but some programs that work with CMT cannot start the motor themselves. In such cases, you must start the motor manuály before executing the save command.
d) When you save a program via the MONITOR routines, the program data block is saved on the tape twice; in addition, there is a short motor-stop between the header block and the body of the file.
Once saving is finished, the MONITOR will display OK! and stop the motor. You can then either save something else, or stop the recording in the virtual cassette deck by pressing the Stop button. If you want to close the WAV file, press Eject on the virtual cassette deck.
The resulting WAV file can later be loaded back into the emulated computer via the virtual CMT. Alternatively, you can take the recorded WAV and convert its contents to MZF using a separate program — the current emulator does not perform that conversion.
There is a slightly more advanced procedure that allows saving a specific memory region as an MZF file. However, this is not possible in version 2.0.0-preview, because the debugger module is not yet available in that version.
Open the Memory Browser window with Alt + E
Select the memory type with which the browser should work (you will probably need to switch to RAM)
Press the Save button at the top, and in the dialog specify the parameters needed to create the MZF header
I hope this helps you.
Best regards, Michal Hučík
Hi,I am writing now some programs for MZ-800, which use the graphic screen. In the course of this, I decided I want to use the hardware scroll features. Unfortunately the description in Technical Reference manual is quite confusing, so I need some additional info. Do you happen to have something like an assembly listing of a program that uses hardware scroll? Many thanks in advance.Alex.
On Wednesday, October 8, 2025 at 07:09:18 AM EDT, Michal Hucik chaky@users.sourceforge.net wrote:
Hi,
From what you describe, I believe you are trying to save your code with the “S” command in the MONITOR 9Z-504M — using this method the program is saved to the virtual CMT in WAV format. The following procedure will work exactly the same from the MONITOR, BASIC, CP/M, or any other MZ-700/800 system that uses CMT:
Disable the CMT hack: Menu → CMT → Use CMT Hack
Open the virtuál cassette-player window with Alt + C
Click the “recording” button, and a prompt will open asking you to create a new PC .wav file (be careful not to overwrite an existing file!)
As soon as you choose the new file, the virtual CMT will stay in "recording" + "pause" mode, and the cassette deck will wait for the motor start impulse.
Now, in the window of the emulated computer execute the "S" command — this will start the motor and begin storing the data.
Notes:
a) Filename — this is the MZ name that will be saved into the MZF header, not the name of the file on your PC.
b) If CPU boost is enabled for the virtual CMT, then the emulator’s speed will be set to MAX whenever the CMT motor is running.
c) It’s rare, but some programs that work with CMT cannot start the motor themselves. In such cases, you must start the motor manuály before executing the save command.
d) When you save a program via the MONITOR routines, the program data block is saved on the tape twice; in addition, there is a short motor-stop between the header block and the body of the file.
Once saving is finished, the MONITOR will display OK! and stop the motor. You can then either save something else, or stop the recording in the virtual cassette deck by pressing the Stop button. If you want to close the WAV file, press Eject on the virtual cassette deck.
The resulting WAV file can later be loaded back into the emulated computer via the virtual CMT. Alternatively, you can take the recorded WAV and convert its contents to MZF using a separate program — the current emulator does not perform that conversion.
There is a slightly more advanced procedure that allows saving a specific memory region as an MZF file. However, this is not possible in version 2.0.0-preview, because the debugger module is not yet available in that version.
Open the Memory Browser window with Alt + E
Select the memory type with which the browser should work (you will probably need to switch to RAM)
Press the Save button at the top, and in the dialog specify the parameters needed to create the MZF header
I hope this helps you.
Best regards, Michal Hučík
[tickets:#3] How to save work in progress
Status: open
Milestone: 1.0
Created: Tue Oct 07, 2025 11:05 PM UTC by Alexander Shakhnovich
Last Updated: Tue Oct 07, 2025 11:05 PM UTC
Owner: nobody
Hello, I am using this emulator for long time. I write programs in Z80 machine codes and I need a way to save my work as a file, preferrably with mzf extension. I tried to use S command (Filename? Top Addrs? End Addrs? Exec Addrss?) and program gives me an Ok! message, but I cannot locate the file anywhere. Is there a better way of doing this?
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/mz800emu/tickets/3/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets:
#3Hi Alex,
I'm sorry, but I don't have time to look for ready-made samples or write new demo code for HW scroll right now. But I found an older project at SDCC where I have a simple text terminal in MZ-800 mode — it uses "full screen scroll up" when the cursor is on the last line (cursor coordinates are not part of the code; they are just 2 bytes X/Y). I'm attaching the files scroll.s and scroll.h.
Hardware scroll on MZ-800 only works in MZ-800 modes (bitmap 320×200 or 640×200). It is controlled by four GDG registers:
SSA – Scroll Start Address (7 bits)
SEA – Scroll End Address (7 bits)
SW – Scroll Width (7 bits), always SW = SEA − SSA
SOF – Scroll Offset (10 bits; lower 8 bits in SOF1 and upper 2 bits in SOF2)
Basic rules / limits:
The step of all these registers is $05 (after “microlines”).
Typical ranges: SSA: $00…$78, SEA: $05…$7D, SW: $05…$7D.
SOF is 10-bit with a step of $05 and a range of $000…$3E8.
The following must apply: SEA > SSA, SW = SEA − SSA and SOF ≤ SW (otherwise the scroll will not be performed).
You do smooth shifts by changing SOF in steps of $05 (e.g. $00→$05 moves the image up 1 line).
Register addressing is "indirect" via the CFh port:
before writing, set B to the subregister index and then do OUT (C),A with C = CFh. Practical map:
(further e.g. B=6 border, B=7 CKSW; B=0 palette).
Notes on behavior: HW scroll on the MZ-800 is implemented by remapping VRAM addresses by lines, so it is programmable in the vertical direction (y-axis); the x-axis is fixed. That is, entire microlines in a defined section (SSA..SEA) are shifted. It can't do fine horizontal scrolling; "side scrolling" only works in large jumps and is typically not suitable for everyday use.
Hopefully this helps — good luck!
Best regards,
Michal Hučík
Thanks, Michal I will try to make this work
Sent from the all new AOL app for iOS
On Sunday, November 16, 2025, 4:49 AM, Michal Hucik chaky@users.sourceforge.net wrote:
Hi Alex,
I'm sorry, but I don't have time to look for ready-made samples or write new demo code for HW scroll right now. But I found an older project at SDCC where I have a simple text terminal in MZ-800 mode — it uses "full screen scroll up" when the cursor is on the last line (cursor coordinates are not part of the code; they are just 2 bytes X/Y). I'm attaching the files scroll.s and scroll.h.
Hardware scroll on MZ-800 only works in MZ-800 modes (bitmap 320×200 or 640×200). It is controlled by four GDG registers:
SSA – Scroll Start Address (7 bits)
SEA – Scroll End Address (7 bits)
SW – Scroll Width (7 bits), always SW = SEA − SSA
SOF – Scroll Offset (10 bits; lower 8 bits in SOF1 and upper 2 bits in SOF2)
Basic rules / limits:
The step of all these registers is $05 (after “microlines”).
Typical ranges: SSA: $00…$78, SEA: $05…$7D, SW: $05…$7D.
SOF is 10-bit with a step of $05 and a range of $000…$3E8.
The following must apply: SEA > SSA, SW = SEA − SSA and SOF ≤ SW (otherwise the scroll will not be performed).
You do smooth shifts by changing SOF in steps of $05 (e.g. $00→$05 moves the image up 1 line).
Register addressing is "indirect" via the CFh port:
before writing, set B to the subregister index and then do OUT (C),A with C = CFh. Practical map:
(further e.g. B=6 border, B=7 CKSW; B=0 palette).
Notes on behavior: HW scroll on the MZ-800 is implemented by remapping VRAM addresses by lines, so it is programmable in the vertical direction (y-axis); the x-axis is fixed. That is, entire microlines in a defined section (SSA..SEA) are shifted. It can't do fine horizontal scrolling; "side scrolling" only works in large jumps and is typically not suitable for everyday use.
Hopefully this helps — good luck!
Best regards,
Michal Hučík
Attachments:
[tickets:#3] How to save work in progress
Status: open
Milestone: 1.0
Created: Tue Oct 07, 2025 11:05 PM UTC by Alexander Shakhnovich
Last Updated: Wed Oct 08, 2025 11:09 AM UTC
Owner: nobody
Hello, I am using this emulator for long time. I write programs in Z80 machine codes and I need a way to save my work as a file, preferrably with mzf extension. I tried to use S command (Filename? Top Addrs? End Addrs? Exec Addrss?) and program gives me an Ok! message, but I cannot locate the file anywhere. Is there a better way of doing this?
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/mz800emu/tickets/3/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets:
#3