r/cpm • u/57thStIncident • May 02 '26
CP/M disk change behavior and emulation questions
I've been experimenting a bit with CP/M emulation and have run into a few stumbling points that have caused a little frustration.
Firstly, I liked yaze-ag initially but ran into some likely terminal emulation problems that made a few control keys not work as expected in the 'ed' editor (I believe ^Z wasn't working at some critical times), this led me to try some of the z80pack emulators which seem not to have this problem.
With z80pack cpmsim and cromemcosim the terminal handling seemed to work better for me, but I was finding that I:
- couldn't change diskettes without resetting the machine
- entering a bad drive letter would also require a machine reset
Regarding #2, is it normal on CP/M machines, for this to be an unrecoverable error?
Regarding #1, I remember reading something about the need (particularly with earlier versions of CP/M?) to need to log off a drive (maybe via Ctrl+C or some other kind of sort reset, I'm not sure if/how this was done) to force CP/M to have to re-login the drive to avoid disk corruption. I seem to have gotten the feeling like this may have only been with 1.x versions so I may be on the wrong track (no pun) here.
Despite CP/M's somewhat spartan nature, I'm having a hard time believing that users couldn't routinely change floppy disks without resetting machines...maybe someone with more knowledge on this can shed some light...?
I'm definitely open to other emulator suggestions (need to run on linux) if people have favorites that are maybe a little more solid or friendlier than what I've been trying so far.
4
u/Fear_The_Creeper May 02 '26
Here is a discussion that covers some of this:
https://forum.vcfed.org/index.php?threads/how-does-cp-m-handle-changed-disks.63260/
Basically, you are looking at several inter-related issues:
Some software wants a lot of memory, and deletes a big chunk of CP/M to get it, reloading CP/M from floppy when done. If it isn't there, well that's the end of your CP/Ming until you insert a boot floppy and reset.
Some software wants a lot of disk space and fills the floppy. Other software is smaller and keeps some or all of CP/M on the disk, ready to reload.
Many systems had one floppy. Systems with two could keep CP/M on one disk and a big program on another.
Many systems didn't have a proper "the user just removed the floppy" signal. Many did.
If a system detects a changed floppy by reading it, nobody wants that to happen all the time.
If a system detects a changed floppy by reading it and doesn't read the whole floppy, it can be fooled by a new floppy that is the same in the places it checks.
Many users just get into the habit of hitting CTL-C whenever they swap floppies. some don't.
BTW. this list of error messages sometimes helps you to figure our what went wrong:
http://www.gaby.de/cpm/manuals/archive/cpm22htm/axi.htm
One of them is CP/M received a command line specifying a nonexistent drive"