Post AtnXvpdHgN0TbLLsWW by tomjennings@tldr.nettime.org
(DIR) More posts by tomjennings@tldr.nettime.org
(DIR) Post #Atn4C58Ip62BgPh1kW by tomjennings@tldr.nettime.org
2025-05-05T17:16:09Z
0 likes, 0 repeats
#cpm #retrocomputing I've got a nerdly question about the boot process of CP/M-80 2.2 --Does CP/M always boot into drive A:? Was it ever possible to boot from other than A, where A is not-in-place or (to the point) not yet formatted?I've got a machine that I want A: to be a "hard disk" and new machines that will be unformatted. So boot from removable B: or C: to run the formatter etc.The Alteration Guide says WBOOT... "CPM.. loaded from first two tracks of drive A ..." oh what do they know, lol. BDOS is perfectly fine with CCP/BDOS loaded from B: but nonetheless, CCP does something with A: each time, foiling my goal...If I remember right -- 40 fkn yrs ago -- the 1978 solution is to have a second BIOS/boot disk that includes only B : and C:, and the formatter binary would do it's thing to the raw hardware. But it's 2025, I don't wanna have two boot disks!I'm trying to avoid implementing a drive-table swapping scheme, where I map selDisk such that drive 0 is B, 1 is C (both removable) and 2 is ahrd disk. I'm greedy and want a one-bios solution. Am I unreasonable?Is there a CP/M forum around? I've never found one.
(DIR) Post #Atn9dPr6NubPXhV7AX by trcwm@mastodon.social
2025-05-05T18:17:05Z
0 likes, 0 repeats
@tomjennings maybe @soldergirl knows!
(DIR) Post #AtnBqIe6hW2Cr5h4hk by tomjennings@tldr.nettime.org
2025-05-05T18:41:52Z
0 likes, 0 repeats
@trcwm I wrote them, thanks for the suggestion!
(DIR) Post #AtnBvMwO9zEPcif6nI by geoffl@mastodon.me.uk
2025-05-05T18:42:43Z
0 likes, 0 repeats
@tomjennings CP/M didn't know or control what drive it was booting from. Most machines defaulted to booting from A but some, such as the Osborne OCC1, would let you boot from another drive it you pressed CTRL-B or other ket combination on power up or reset.
(DIR) Post #AtnCsF9MlkNWXwo0lk by tomjennings@tldr.nettime.org
2025-05-05T18:53:25Z
0 likes, 0 repeats
@geoffl Well it seems to reference A: after booting from B: ('boot' here means load bootsec and warm boot from B:) and the Alteration Guide specifically mentions A:, not "boot drive".I am not convinced that I am right! But it's what I observe happening. My BIOS isn't touching A:, and it's a BDOS/CCP error message ("Bdos Err on A: Bad Sector").Sequence of events is:ROM Monitor loads B: boot, loads system (ccp, bdos, bios) from B:, cold boot, which calls warm boot (my code) which observably loads warmboot stuff from B:. Wboot code puts CDRIVE into reg C, debugger shows that it is 01 for B:, jumps to BDOS or CCP whatever it is, then I get the BDOS error above.
(DIR) Post #AtnGqHoaI30c35PJnk by trcwm@mastodon.social
2025-05-05T19:37:52Z
0 likes, 0 repeats
@tomjennings the Discord mentioned here is also a good resource: https://github.com/Z80-Retro
(DIR) Post #AtnM5BMP4NgA939FZ2 by tth@mastodon.tetaneutral.net
2025-05-05T20:36:33Z
0 likes, 0 repeats
@tomjennings : The newsgroup comp.os.cpm on #Usenet ?
(DIR) Post #AtnNfmeVznP8BRdWzY by geoffl@mastodon.me.uk
2025-05-05T20:54:23Z
0 likes, 0 repeats
@tomjennings That's odd. It wouldn't normally, in my experience, look anywhere other than the boot drive unless specifically instructed to, A: shouldnt be hard coded. In a system with 2 floppy drives I could boot from either with the same disc without problems.
(DIR) Post #AtnNtiT2Lvb3G2uZ3Q by lproven@social.vivaldi.net
2025-05-05T20:56:47Z
0 likes, 0 repeats
@tomjennings Generally with CP/M, from my dusty old tech support memories from the late 1980s, the drive it boots from becomes A: and the other drives are lettered sequentially from then on. 1 floppy 1 HDD:Boot from floppy, A: = FDD, B: = HDDBoot from hard disk, A: = HDD, B: = FDD 2 floppies 1 HDD:Boot from floppy, A: = FDD 1, B: = FDD 2, C: = HDDBoot from hard disk, A: = HDD, B: = FDD 1, C: = FDD 2This made it hard to write config files and so on, so when SCP wrote DOS, it hardwired A: & B: to the FDDs and C: to the first hard disk. After that they're assigned sequentially. That was still problematic when you could dual boot a PC with a DOS-based OS such as Win98 and an NT based OS, as they might see different drives and give them different letters, so NT threw this away after Win2K or so, and it assigned its own letters as it saw fit. You can even manually reassign them.
(DIR) Post #AtnW5O72ekUVEkhRjc by geoffl@mastodon.me.uk
2025-05-05T21:20:37Z
0 likes, 0 repeats
@tomjennings Can you check the drive number in zero page (0x0004 = current selected drive 9=A...15=P) matches register C, in that it's set to 1.
(DIR) Post #AtnW5PRHiyHHLpB7vU by tomjennings@tldr.nettime.org
2025-05-05T22:28:40Z
0 likes, 0 repeats
@geoffl Yeah, did that. It correctly passes the boot drive from cold start through wboot to the bdos/ccp. Checked it with a ROM debugger.
(DIR) Post #AtnW5W6yurCE2sjVke by geoffl@mastodon.me.uk
2025-05-05T21:25:08Z
0 likes, 0 repeats
@tomjennings Gping off memory here. I'll need a refresh with some books.
(DIR) Post #AtnXaY8rW7wfH1ySTw by tomjennings@tldr.nettime.org
2025-05-05T22:45:31Z
0 likes, 0 repeats
@lproven Hmm that's not my experience.When I boot from B>, it loads bootsec and the entire system (ccp, bdos, bios) to RAM from B drive. It then follows the Alteration Guide to the letter, passing the boot drive in reg C (is 1) to CBOOT, stores in loc. 4, low mem is set up, control passes to BDOS, with boot drive in reg. C. I verified that with a ROM debugger.BDOS then scans the A drive's directory (I have a log of every disk access from the back side) then scans B's directory, and drops control at the CCP's prompt -- B>.I'm working with new code -- which I could have screwed up of course! -- and the original D.R. manuals. But it appears that this is how it works -- that there must always exist a drive "CPM" knows as A drive.I guess that if it's 1978 and you have a hard disk (lucky or rich person) you either make it not-A, or you have two BIOSs/boot disks, one with the HD and one without, and you use the without to format and sysgen etc A.That's certainly what I would ahve done in 1978.
(DIR) Post #AtnXm2V8ywpIcJsJ3w by tomjennings@tldr.nettime.org
2025-05-05T22:47:36Z
0 likes, 0 repeats
@lproven Late 80s, wasn't that CP/M 3.0 by then? Yeah, boot stuff in the age of must-format-raw-alien-hardware was problematic as hell!
(DIR) Post #AtnXvpdHgN0TbLLsWW by tomjennings@tldr.nettime.org
2025-05-05T22:49:23Z
0 likes, 0 repeats
@geoffl An implied question I have is, did CP/M version 2.2 machines ever/could they ever, NOT have an A drive. I think the answer is no, there was always an A drive. But I don't know for sure!
(DIR) Post #AtnYoGPULAKyHtr15U by tomjennings@tldr.nettime.org
2025-05-05T22:59:11Z
0 likes, 0 repeats
@peteri Ooh, yeah that's a smart approach. I'm emulating drives on the "other side" of the Z80s IO ports, to files on a vfat SD card. I could do that! But what I was trying to avoid, and the more this thread goes on, my goal seems sillier and sillier, is to retain the desired A B C order and meaning of the drives, where A is the hard disk, and B and C are removeable.* If I reverse the order -- A, B are removable, C is hard disk -- all my problems go away. <whine>but i don't want to need to boot from a removable drive</whine>* If I have two boot disk types -- A-HD B,C removable, vs. A,B removable, C HD -- then my life is MUCH easier, and a wee bit uglier.But! all of this nonsense only covers the ONE CASE where the machine is brand new (HD not bootable) and so a special "bring up the HD" boot disk is not unreasonable.
(DIR) Post #AtnZb0nPBN5W3CHmvQ by tomjennings@tldr.nettime.org
2025-05-05T23:08:00Z
0 likes, 0 repeats
@Kroc Yeah, sysgen just copies sectors to/from diskettes. I'm trying to figure out what the BDOS software is up to, internally. Or maybe I/we figured it out, but I'm resisting the knowledge because I don't like it, lol.
(DIR) Post #Atnasq1M59r7nbsJGK by geoffl@mastodon.me.uk
2025-05-05T23:22:26Z
0 likes, 0 repeats
@tomjennings I don't know if any machines intentionally had no A drive as the first/only (zeroth) drive installed would normally be A. AFAIR I had an Osborne 1 with a faulty A drive that would successfully boot and run from B so it should work, unless Osborne had used some other trickery and CP/M handles drives inconsistantly. I'm on the other side of the pond and the clock has struck 12 so it'll be tomorrow before I can look further into what's awry.
(DIR) Post #AtnbYtqCGmYfoEiDx2 by geoffl@mastodon.me.uk
2025-05-05T23:30:00Z
0 likes, 0 repeats
@tomjennings You could test that by setting register C and memory location 4 to 0 before the failure.
(DIR) Post #Atnt2dr9xjdg8tvl2W by elb@social.sdf.org
2025-05-06T02:45:45Z
0 likes, 0 repeats
@tomjennings there are a lot of replies, but I didn't see this one, apologies if it's a dupe.The Osborne 1 ROM requires you to push a key to boot from the drive. If you push the " key, the ROM somehow remaps its drive routines to swap the A and B drives in BIOS; I'm fairly sure the BDOS just doesn't even know it happened.
(DIR) Post #AtoGzi2OMHNp8pJpce by lproven@social.vivaldi.net
2025-05-06T07:14:13Z
0 likes, 0 repeats
@tomjennings I only owned 1 CP/M machine myself, an Amstrad PCW9512. It ran CP/M 3, yes. But in my first job I supported a few production machines with CP/M-80, CP/M-86, CCP/M & the like.
(DIR) Post #AtoHWUpEVBpXijnWrY by lproven@social.vivaldi.net
2025-05-06T07:20:09Z
0 likes, 0 repeats
@tomjennings Oh well. Feel free to ignore me. I am reasonably confident in what I wrote. I don't usually misremember tech stuff.But the thing is that it was the Wild West back then with virtually no standardisation, and hard disk handling was even worse as they were so scarce...
(DIR) Post #Atp53Ab3d090IDNRPk by tomjennings@tldr.nettime.org
2025-05-06T16:35:08Z
0 likes, 0 repeats
@amoroso Ahh thanks! I will go find.
(DIR) Post #Atp57XVmNBwgWJzYJM by tomjennings@tldr.nettime.org
2025-05-06T16:35:58Z
0 likes, 0 repeats
@trcwmOh right I forgot to pursue that!
(DIR) Post #Atp5L1fFZqG3nmqv8i by tomjennings@tldr.nettime.org
2025-05-06T16:38:24Z
0 likes, 0 repeats
@elb Ahh that's what I'm suspecting, that Trickery was done to get results. I'm fact that's what I'm coding now, to make the driver reorder itself...
(DIR) Post #Atp5YYTCuw8zJOfeLo by tomjennings@tldr.nettime.org
2025-05-06T16:40:51Z
0 likes, 0 repeats
@lproven Oh yeah, I'm not discounting what you wrote! Not ignoring you, experience matters. I'm suspecting system makers played games at the driver level to make things work. But I just don't know. I followed my install with the debugger, and something on bdos went to A drive. That's all I know for sure.
(DIR) Post #Atp5f9b9mwWWCUXH1c by tomjennings@tldr.nettime.org
2025-05-06T16:42:02Z
0 likes, 0 repeats
@lproven I'm thinking more and more this was trickery in the low-level drivers, and meddling with the disk def tables eg seldisk.
(DIR) Post #AtpINOojlSgBapkggi by geoffl@mastodon.me.uk
2025-05-06T19:04:26Z
0 likes, 0 repeats
@tomjenningsNpte: While that is a BDOS error, it's in response to the BIOS failing to read the disc or trying to read somewhere unexpected.
(DIR) Post #AtqHIWdVMSXbbBZPn6 by tomjennings@tldr.nettime.org
2025-05-07T06:27:07Z
0 likes, 0 repeats
Ok I figured out a solution. It's easy but disgusting. Simply rearrange the disk definition table. It's gross, coping little tables around. Conditional compilation would do this but not at run time. By rearranging the table while in cboot, before it's used, all the logical to physical relationships are maintained, and I can make the HDD first last or whatever. Then literally all other code and data remains unchanged. Tables are 16 bytes and there's only 3 of them.