davidgiven / cpmish

An open source sort-of CP/M 2.2 distribution.
http://cowlark.com/cpmish
Other
351 stars 38 forks source link

supporting banked memory #14

Open Allisontheolder opened 5 years ago

Allisontheolder commented 5 years ago

Banking has been one of the devils of CP/M for the various levels to 2.2. This is mostly due to there not being any standard. CP/M3 (aka CP/M+) and MPM made it desirable but not any specific form is called out.

It is possible to run CP/M 2 and ZS/ZRdos in banked systems as there are no prohibitions but generalized solutions of one size fits some are hard to come by due to wide variations in hardware. The PCW is one I have seen this side of the pond (scarce but not rare) and likely easier to find as well making it a good choice for implementation.

The most common applications of banking for any system is that bulky uses of memory like video buffers, ramdisk, and large disk buffers can be outside the nominal 64K map leaving as much space as possible for applications. General use is putting much of the BIOS as possible in banked space.

davidgiven commented 5 years ago

Yes, that's what I do for the NC200. There's a tiny stub BIOS which pages out the entire 64kB address space and calls the supervisor program to do the real work. This results in the CCP loading at 0xe800 and a maximum TPA of 0xf000, which compares well to CP/M 3; plus there's a 48kB disk cache, enough to store five complete tracks from floppy, which (usually) massively boosts performance.

I looked briefly at CP/M 3, but found it too overcomplicated. The directory hash table and automatic deblocking would be nice to have, particularly on big disks, but given that CP/M is supposed to be simple I decided against it.

Allisontheolder commented 5 years ago

Yes, that what I needed to do back 1978 with NorthStar system as the disk controller was at 0xE800 to 0xEBFF (moving was not an option due to booter in fuse prom) a but there was 6K unused above it and so at 0xEC00 was the video board (64chrx16 lines, looks like 1K of ram) and above that was bios and monitor integrated. Not banked but similar in the need to have the BIOS jump table below 0xE800 with linkage to elsewhere.

CP/M3 or MPM is a handful till you've done it once or twice. I haven't proved to myself it adds much save for when you go to multiuser or networked systems. All of the exxistant software for CP/M assumes 64K flat address and at least 32-58k of it usable by the application.

Alternate 3 is for the systems with CP/M3 (example is my Visual 1050) is to leave the BIOS and BDOS alone and replace just the CCP with ZCPR (all those were PD at their intro back well before GNU/MIT/Copyleft/CCC or the one used with ZS/ZRDOS. Source you have to dig for but since the WC-CP/M-CDR can be found on line its there. CP//M has been modular since V2 in that your not married to the provided CCP, or BDOS.

I wish we had a discussion area.

Allisontheolder commented 5 years ago

Zsdos has a follow on the B/P bios to help with banked and cross system hardware compatability.

http://www.classiccmp.org/cpmarchives/cpm/mirrors/home.att.net/~halbower/index.html#bpbios

That is also GLD work.