PDA

View Full Version : CP/M source code



BobApplegate
March 2nd, 2013, 01:11 PM
Short explanation: I'm bringing up a new S-100 machine and am trying to get CP/M 2.2 running. The starting point is CP/M source files (disassembled and claimed to have a bug fix). After several attempts at a BIOS that all seem to exhibit the same odd behavior, I'm trying to narrow down what the problem is and want to start with a known-good image of CP/M.

Does anyone have assembly source that are known to produce good CCP and BDOS? How about a hex file that I can just load onto my machine, drop my BIOS onto, and test with?

Thanks,

Bob

Chuck(G)
March 2nd, 2013, 01:27 PM
I'm not following you. Doesn't Gaby have several OEM binaries on her site?

AFAIK, CP/M-80 was never distributed in Intel hex format--just in raw binary. If you're really lost, I can grab some stuff from my copy of the CP/M 2.2 OEM redistribution disk, which also includes serial numbering information.

BobApplegate
March 3rd, 2013, 07:09 AM
I'm not following you. Doesn't Gaby have several OEM binaries on her site?

AFAIK, CP/M-80 was never distributed in Intel hex format--just in raw binary. If you're really lost, I can grab some stuff from my copy of the CP/M 2.2 OEM redistribution disk, which also includes serial numbering information.

Correct, it was never distributed as a hex file, but there are sources (disassembled and commented) on Gaby's site, so my goal was to grab that code, assemble, then download the hex file via my monitor program. After that, I download my BIOS as a hex file and get CP/M running.

The problem is that I always seem to have the same exact symptom every time I try using the disk. This points to a BIOS blocking/deblocking problem, so I've switched from my home written BIOS to two different BIOSes written by different people and simply swapping in my debugged low-level read/write code. No change, always exactly the same sort of problem.

So the question is whether the code on Gaby's site produces a good BDOS or not. I was hoping someone else has built their CCP/BDOS from source files and would be willing to share their source or at least a HEX file of their output that I can try my BIOS with.

Chuck(G)
March 3rd, 2013, 08:17 AM
I'll compare the binaries with known-good ones if you'd like. My suspicion is that you've missed something. If you'd like, I'll have a look at your CBIOS code--I did a couple of production BIOSes for 2.2 (and even an XIOS for MP/M) a bit more than 30 years ago.

As far as building CCP and BDOS from source, the number of people who did that would be close to the null set. Most OEMs never saw source to the best of my knowledge--and there would be no point to recompiling even if source were available.

BobApplegate
March 3rd, 2013, 09:46 AM
I'll compare the binaries with known-good ones if you'd like. My suspicion is that you've missed something. If you'd like, I'll have a look at your CBIOS code--I did a couple of production BIOSes for 2.2 (and even an XIOS for MP/M) a bit more than 30 years ago.

As far as building CCP and BDOS from source, the number of people who did that would be close to the null set. Most OEMs never saw source to the best of my knowledge--and there would be no point to recompiling even if source were available.

I'm convinced this source code is no good.

I brought up my system, loaded 0100H-0FFFH with a known pattern. Cold-booted CP/M with breakpoints at various routines in the BIOS. Did a "SAVE 1 TEST.TXT" and stepped through every disk write and everything was written properly. A DIR at CP/M shows the file. Then I did a "SAVE 1 TEST2.TXT" and watched all the breakpoints get hit except for the final one where the directory entry should have been updated with the block where the file's contents were. Ie, the BDOS didn't do any update of the directory after the second save.

The reason I chose the assembly path was that it's easier for me since I have no media with the disk image to patch my BIOS onto, and my monitor supports downloading HEX files.

To use a pure binary image, I need to get that image as a file, then write a very small program that can load onto my system, download the CP/M image and write it to disk.

Now to see if I can find the CP/M image as a file...

Oscar
March 3rd, 2013, 09:57 AM
Bob,


Does anyone have assembly source that are known to produce good CCP and BDOS? How about a hex file that I can just load onto my machine, drop my BIOS onto, and test with?

I've used the sources in this link twice:
http://z80cpu.eu/mirrors/www.vegeneering.com/eZ80_CPM/index.html
Once for compiling a full CP/M for the ez80, once for my own homebrew Z80. So yes, I am sure this source code for CCP, BDOS & BIOS works!

Regards,

Oscar.

Chuck(G)
March 3rd, 2013, 10:11 AM
Bob, if you'd like, I'll extract the files from the redistribution disk and post them.

Note that there is a utility, known by various names, but mostly by BINHEX that can perform the conversion to Intel hex. Some of the issues that people have in writing a custom CBIOS is due to misunderstanding of what the System Alteration Guide really says. You really do have to start out by booting up a minimal CP/M system, then reassembling your CBIOS and boot loader for the target size and using MOVCPM to relocate the BDOS and CCP.

BobApplegate
March 3rd, 2013, 10:50 AM
Bob, if you'd like, I'll extract the files from the redistribution disk and post them.

Note that there is a utility, known by various names, but mostly by BINHEX that can perform the conversion to Intel hex. Some of the issues that people have in writing a custom CBIOS is due to misunderstanding of what the System Alteration Guide really says. You really do have to start out by booting up a minimal CP/M system, then reassembling your CBIOS and boot loader for the target size and using MOVCPM to relocate the BDOS and CCP.


How about a different problem: are the manuals for Dave Dunfields ASM80 on-line someplace? There are a lot of references, lots of copies on various disk images, but I can't figure out how to generate a list file other than length zero. -i produces an Intel hex file, but the list file generation eludes me.

BobApplegate
March 3rd, 2013, 11:43 AM
How about a different problem: are the manuals for Dave Dunfields ASM80 on-line someplace? There are a lot of references, lots of copies on various disk images, but I can't figure out how to generate a list file other than length zero. -i produces an Intel hex file, but the list file generation eludes me.

Another experiment failed miserably, so I give in. Where can I get an image of the boot tracks as a hex (or binary) file? As long as it's gen'ed for a system with 60K or less, I can load it up, drop my BIOS on top to see if things work, then use my existing PUTSYS to write it to boot sectors.

I've got a putsys, a relocator and a boot loader already working, but the CP/M image itself is apparently no good.

I'll look around and see about getting the boot image as a file on-line somewhere.

Chuck(G)
March 3rd, 2013, 12:25 PM
I don't know about Dave's assembler--you might want to use the original CP/M tools under an emulator.

The old DRI ASM command-line syntax was a bit strange. It was ASM file.xyz, where x is the letter of the drive that the .ASM (extension assumed) file resided on, y was the letter of the drive that the .HEX file was to be placed on, and z, the letter of the drive that the .LST file (or was it .PRN?) was to be placed on. "Z" as a drive letter meant "no file".

However, I doubt that there's much wrong with the CP/M files out there--others have certainly used them. My suspicion is that you're missing something important.