• Please review our updated Terms and Rules here

Back to school

leeb

Veteran Member
Joined
Jan 21, 2009
Messages
709
Location
Palm Springs CA
I have (re)learned alot about CP/M... specifically Montezuma Micro's... and feel comfortable doing just about anything I need to... even to making it boot an IDE drive on my Model 4p...
but
Now I am attempting to learn CP/M3(plus) IOT:
1) Get it transferred to my 4p and its single 3.5" floppy (from SSDD RS format 154k disks), and
2) To learn enough to rewrite the PLUS bios for a new machine that I am designing/building.

Right now I can only run PLUS from the emulator since I cannot transfer to physical media... guess I should have kept those 5.25 drives!

Any insights into 'intricate details' needed to accomplish this daunting task will be appreciated! :D
 
Wow... 67 views and not a peep! :shock:

I do have PDFs of the CPM3 manuals, but...

ANY info regarding cpm3 would likely be helpful... even those not Tandy-based...
Specifically any details about the drive info area(s)...

Edit:
I think I will also work on completing the BOOTROM reader program I started some time back.... having that data might be useful in the future, if not to anyone running the Kiel emulator that sees the same problem I did with the RS cpm3... that being that the 'fake' bootrom supplied with the emulator does not work with cpm3 unless the emulator is set to 'non-4p' mode...

:satisfie:
 
Last edited:
Sorry for the delay... and thanks for any input you can provide!!

I think I already know the answer to this... have been delving into the CPM3.sys file that I finally got hold of...

The CPM3.sys file.... is 'backward' and loaded into memory from the 'top-down'?
It SEEMS to be true from what Ive seen in the file... it appears that each 128-byte 'block' is placed AFTER the 'following' block... such as this:

1D80: 22 43 22 20 54 4F 20 43 41 4E 43 45 4C 1B 4B 07 "C" TO CANCEL.K.
1D90: 00 20 20 20 28 57 52 49 54 45 20 50 52 4F 54 45 . (WRITE PROTE
1DA0: 43 54 45 44 29 00 00 FF 0F 20 20 20 53 55 42 4D CTED).... SUBM
1DB0: 49 54 20 57 41 52 4D 0D 3E 3E 3E 3E 3E 3E 3E 3E IT WARM.>>>>>>>>
1DC0: 3E 3E 3E 3E 3E 3E 3E 3E 20 42 49 4F 53 20 46 49 >>>>>>>> BIOS FI
1DD0: 45 4C 44 53 20 3E 3E 3E 3E 3E 3E 3E 00 00 03 00 ELDS >>>>>>>....
1DE0: 01 00 00 01 00 00 00 00 86 31 2E 2E 2E 00 32 2E .........1....2.
1DF0: 2E 2E 00 78 B1 C8 3A BF D8 B7 CA AE D8 AF 32 BF ...x..:.......2.
1E00: 20 45 52 52 4F 52 3A 20 20 20 20 1B 4B 00 1B 59 ERROR: .K..Y
1E10: 36 20 1B 7A 1B 59 37 20 1B 7A 1B 6B 00 44 52 49 6 .z.Y7 .z.k.DRI
1E20: 56 45 20 00 2C 54 52 41 43 4B 3D 00 2C 48 45 41 VE .,TRACK=.,HEA
1E30: 44 3D 00 2C 53 45 43 54 4F 52 3D 00 3A 20 53 54 D=.,SECTOR=.: ST
1E40: 41 54 55 53 3D 00 1B 59 37 20 1B 61 1B 59 37 20 ATUS=..Y7 .a.Y7
1E50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 xxxxxxxxxxxxxxxT
1E60: 59 50 45 20 41 4E 59 20 4B 45 59 20 54 4F 20 52 YPE ANY KEY TO R
1E70: 45 54 52 59 20 4F 52 20 43 4F 4E 54 52 4F 4C 20 ETRY OR CONTROL


Please notice the 'CONTROL C to cancel'...
(the little xes are there to keep the display 'kosher'...)

I had found some HD info in the file (it appears that RS's cpm3 has HD capability built-in), but it was/is confusing as some of what appeared to be sectran info was itself 'skewed'...

I am now meticulously relocating the above dump into 'bottom-up' format so I can keep my brain from melting any more than necessary! :D

The 'bottom' of the file seems to contain info regarding locations but Im not sure I understand what they explain... an example:

0180: 0D 0A 20 42 4E 4B 42 49 4F 53 33 20 53 50 52 20 .. BNKBIOS3 SPR
0190: 20 44 33 30 30 20 20 32 31 30 30 0D 0A 20 42 4E D300 2100.. BN
01A0: 4B 42 49 4F 53 33 20 53 50 52 20 20 37 41 30 30 KBIOS3 SPR 7A00
01B0: 20 20 30 36 30 30 0D 0A 20 52 45 53 42 44 4F 53 0600.. RESBDOS

The first 'bnkbios' portion loads at D300 and is 2100(h) bytes long?

... I guess that's actually 2 questions...
Time to go back to the 'rearranging'! :mrgreen:

EDIT:
I am now officially cross-eyed!!
After re-arranging 92 PAGES of data...
SHEESH!!! :shock:
Now, to remove the SID dump data and decode what's left! :D
 
Last edited:
Based on my own experience from many years ago, Leeb, that doesn't sound right. Are you certain that you're not confusing a disk interleave with file data ordering?
 
Based on my own experience from many years ago, Leeb, that doesn't sound right. Are you certain that you're not confusing a disk interleave with file data ordering?

The source disk SEEMS to read properly in the emulator and the file was directly xferred from there to a disk that I have never had issue reading/writing before... and from there thru 22disk to the PC...
However, the SID dump I did was done from WITHIN the emulator... 'printed' to a PC file as the emulator can (printed.prn) and played with from there...
But, simply put, I dont know enuf about the CPM3.sys file to say ANYTHING for certain... I cannot say where the loader begins/ends altho I THINK I know where (some of) the BDOS begins... and possibly the BIOS..

I did not keep a non-reordered version of the dump, but if you are interested/willing I will send you a copy of the 'reordered' SID dump I have...
I did not (yet) remove the location values from the front of the lines...

Radio Shack did not (naturally) supply anything but the generic 'start-from-scratch-with-examples-that-are-nowhere-close-to-your-machine' sources that come with CPM3 itself, so I can only go by what appears to be correct, text-wise...

The '3' system is simply so different from the MM 2.2 version Im used to working with that I am literally starting from scratch.
If I werent intending to build a new system for the machine Im designing as well as wanting to use it on the 4p it is likely that I would simply stay with 2.2 and modify it...

But... that wouldnt be.... fun! :D

EDIT:
From one of the CPM3 PDFs... regarding GENCPM:
Display Load Table at Cold Boot (Y) ?
Enter Y - On Cold Boot the system displays the load table containing the
filename, filetype, hex starting address, length of system modules, and the TPA
size.

That answers that! :mrgreen:

EDIT2:

More from the PDF...

Table D-1. CPM3.SYS File Format
Record Contents
0 Header Record (128 bytes)
1 Print Record (128 bytes)
2-n CP/M 3 operating system in reverse order, top down.
Table D-2. Header Record Definition
Byte Contents
0 Top page plus one, at which the resident
portion of CP/M 3 is to be loaded top down.

1 Length in pages (256 bytes) of the resident
portion of CP/M 3.
2 Top page plus one, at which the banked portion
of CP/M 3 is to be loaded top down.
3 Length in pages (256 bytes) of the banked
portion of CP/M 3.
4-5 Address of CP/M 3 Cold Boot entry point.
6-15 Reserved.
16-51 Copyright Message.
52 Reserved.
53-58 Serial Number.
59-127 Reserved.

I read the above to mean that the file is loaded from FFFF down to whatever (presuming FFFF is the 'top' being used).

Or am I attempting to read 'something else'? :roll:
EDIT AGAIN:
That looks to be right according to what I have here...

0100: F4 27 80 34 00 D3 00 00 00 00 00 00 00 00 00 00 .'.4............
0110: 43 6F 70 79 72 69 67 68 74 20 28 43 29 20 31 39 Copyright (C) 19
0120: 38 32 2C 20 44 69 67 69 74 61 6C 20 52 65 73 65 82, Digital Rese
0130: 61 72 63 68 00 00 00 00 00 01 30 00 00 00 00 00 arch......0.....
0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
That, I believe, is the Header Record (bold is the cold boot entry point [D300]), and

0180: 0D 0A 20 42 4E 4B 42 49 4F 53 33 20 53 50 52 20 .. BNKBIOS3 SPR
0190: 20 44 33 30 30 20 20 32 31 30 30 0D 0A 20 42 4E D300 2100.. BN
01A0: 4B 42 49 4F 53 33 20 53 50 52 20 20 37 41 30 30 KBIOS3 SPR 7A00
01B0: 20 20 30 36 30 30 0D 0A 20 52 45 53 42 44 4F 53 0600.. RESBDOS
01C0: 33 20 53 50 52 20 20 43 44 30 30 20 20 30 36 30 3 SPR CD00 060
01D0: 30 0D 0A 20 42 4E 4B 42 44 4F 53 33 20 53 50 52 0.. BNKBDOS3 SPR
01E0: 20 20 34 43 30 30 20 20 32 45 30 30 0D 0A 20 0A 4C00 2E00.. .
01F0: 0D 20 35 31 4B 20 54 50 41 0A 0D 24 24 24 24 24 . 51K TPA..$$$$$
is supposed to be the PRINT record...
I guess I will have to put this back into 'normal' order to see it fully, but it DOES seem to run from 'high' to 'low' and the 'end of file' is at the beginning...

Wow... :shock:
 
Last edited:
I've got an Amstrad Joyce CP/M 3.0 sample if that would help...

Funny, I don't recall this at all, but then, I did a CP/M 3 port, then dropped it and went straight to MP/M.
 
Sure, more information can only help...

Or send me to the nuthouse! :mrgreen:

But right now Im overdue for my 'nap' (work nites)...
Catch you later?
 
Um...

whose image format is .EMS?
Or is it simply a binary sector-dump? I do not see much in the way of sector formatting in it... but it is possible that it isnt supposed to need it... ?

EDIT:
Okay... this does seem to be the CPM3.SYS file... although it seems to be 'nonstandard'...
At the bottom is 2x128b block of 00s,
THEN in the next block the copyright exists in the 2nd half...

This is gonna be FUN!!! :shock:
:D
(but first I have to rebuild the 'TV computer'... NOT fun! :mad:)

EDIT:

(Light comes on!!)
Okay. This is a NON-BANKED CP/M3... Correct? That would explain the blank page at the bottom w/o the 'locator info' in it...
Ah!!! 'I can see clearly now, the light is on!' :mrgreen:
 
Last edited:
The Amstrad format is 9x512x2, just like a standard 720K DOS drive. There's a one-sector boot loader (attached) that loads any .EMS file.

The Amstrad Joyce is fairly cool for a low-priced Z80 box. It supports 512K of DRAM and, as a video display, has only bit-mapped graphics. There are no character generator ROMs and not much in the way of BIOS ROM (the printer controller actually forces some code onto the bus at boot time).

I picked the Anstrad because the EMS file is loaded verbatim--the entire boot is contained therein and so should give you an idea of what's going on.
 

Attachments

  • amsboot.zip
    608 bytes · Views: 1
Thanks again! I will have plenty to look over while at work tonite! :)

Boy! They've got that boot STUFFED!!! Not even a boot error message!
Will peruse it in ZSID tonight!
:D

Then again, maybe not... The 'TV computer/general-all-around-data-transfer-device' went down hard this AM, which is where the floppy drive is... until I rebuild it transferring into the emulator is pretty-much out of order.

Anyway, will get to it once I can get it running again! :D
 
Thanks again! I will have plenty to look over while at work tonite! :)

Boy! They've got that boot STUFFED!!! Not even a boot error message!
Will peruse it in ZSID tonight!

What good would an error message be? Remember the display is bitmapped graphics with no character generator ROMs--there's no way to display a text message until the necessary video drivers get loaded with character generator code. Just a beep or two and that's it for error messages.

FWIW, the floppy controller is a NEC 765. I've toyed with the idea of making the thing boot up in 1.44MB mode...
 
Well, I believe I have managed to get a copy of the boot ROM for the 4p...
Still have to xfer it into the emulator (and start the process of disassembling it), but if the emulator will come up in CPM3 AS the 4p then it will make things a tad easier...

... and I might go insane and rewrite the ROM for the IDE controller instead of the MFM units it is expecting... it will make boot-ups a bit more consistent...
 
NOW I can claim the above!

The 1st copy was some 'magic' arrangement.... which went 'POOF' yesterday! :(
Today, however, I managed to build a RELIABLE and REPEATABLE program that can retrieve the boot ROM... and has!
(Which also confirms proper operation of the 'loader module' I wrote to 'move things around'... :) )

Gonna put it in the emulator tonite and see if IT will then boot CPM+ w/o pretending to be the standard Model 4...
(Interesting that they bothered to put other languages into the ROM rather than simply making different 'images' that include different text...)
 
Well, I have found what appears to be the location of the DPBs and the translation table(s) but I have to decode the whole thing (I think) IOT get it to recognize that it is working with DS 80trk drives... It seems to be 'stuck' in the SS/DD/40trk mode...
... meaning that the FD driver is limited to its original FD design...

Im also interested to see how it is handling the (DUMB-AS-A-POST) keyboard... particularly in interrupt mode!

Montezuma 2.2, for all its limitations, IS actually a very 'flexible' design... and Im liking it more & more every day! :D

Welcome to a complete rewrite! :shock:
(This computer here at work has one of those redirect viruses... every time I hit this thread it tries to send me to 'back to school stuff'... At least it's not mine! :mrgreen:)
 
Last edited:
It looks like Im (partially) right...
While I have successfully modified the UNBANKED cpm3.sys file and can read/write to a MM cpm2 710k drive, it counts up to 80 tracks and blows up...
At that point I have to reformat in 2.2 and start over...

It must be the SS/DS issue... as I can confirm that it has no problem counting up to the 80 tracks (0-79. once it hits 80 [50h] it 'goes spastic')...

I have modified the BANKED cpm3.sys file as well, but there is something going on there... after a couple of DIR entries it locks up accessing track 2 which should be the directory...
It appears that the FD I/O routines are significantly different between the versions... so I will work with the UNBANKED first...
Once that one is useable redoing the BANKED version can wait... since I need to replace the 2nd 64k before then! :D
(It was originally the 1st 64k but I moved it when I got the 'good' RAM... and then got lazy. :blush: )
 
Back
Top