Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Commodore 128
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== CP/M === [[file:c128cpmboot.jpg|thumb|Using CP/M mode requires use of a boot diskette. The diskette was included with the computer, which did not include a disk drive.]] The second of the C128's two CPUs is the Zilog Z80, which allows the C128 to run CP/M. The C128 was shipped with CP/M 3.0 (a.k.a. CP/M Plus, which is backward-compatible with CP/M 2.2) and ADM31/3A [[computer terminal|terminal]] emulation. A CP/M cartridge had been available for the C64, but it was expensive and of limited use since the 1541 drive cannot read the MFM-formatted disks that CP/M software was distributed on. Software had to be made available on Commodore-specific disks formatted using the [[Group coded recording|GCR]] encoding scheme.{{citation needed|date=December 2023}} Commodore made versions of ''PerfectCalc'' and the [[EMACS]]-derived ''PerfectWriter'' available,<ref>[http://www.commodore.ca/gallery/magazines/cpm/cp_m_compute_april85_d.jpg Compute! April 1985]</ref> and Commodore [[user group]]s sometimes had a selection of CP/M diskettes, but the limited software availability negated one of CP/M's chief attractions—its huge software library. In addition, the cartridges only work on early model C64s from 1982 and are incompatible with later units. Since they were also incompatible with the C128, the design team decided to support CP/M by putting the Z80 on the main system board.{{citation needed|date=December 2023}} The C128 runs CP/M noticeably slower than most dedicated CP/M systems, as the Z80 processor runs at an effective speed of only {{val|2|ul=MHz}}. This was because the C128's system bus was designed around the 65xx CPUs. These CPUs handle data and memory addressing very differently from the Z80. CP/M also ran more slowly for several reasons, such as needing to pass control to the 8502 for any I/O or interrupt processing. For these reasons, few users actually ran CP/M software on the C128.{{original research inline|date=December 2023}} When the C128 is powered on, the Z80 is active first and executes a small boot loader ROM at $0-$FFF to check for the presence of a CP/M disk. If one is not detected, control is passed to the 8502 and C128 native mode is started.{{citation needed|date=December 2023}} CP/M mode in practice requires a 1571 or 1581 drive to be useful, since a 1541 cannot read MFM disks and will run much slower due to not supporting the C128's burst mode. CP/M boot disks nonetheless must be in the drive's native GCR format; MFM disks cannot be booted from, only read once the user is already in CP/M. This is because the code necessary to operate the drive in MFM mode is loaded as part of the boot process. In addition, 80-column mode is generally required since most CP/M software expects an 80-column screen. The C128 emulates an [[ADM-3A]] terminal {{citation needed|date=September 2020}} in CP/M mode, so software will have to be set up for that. Aside from the standard ADM-3A terminal commands, a number of extra ones are available to use the VIC-II and VDC's features, including setting the text and background color. The CP/M command interpreter (although not application software) includes a safeguard to prevent the user from issuing a control code to make the text and background the same color, which would render text invisible and force the user to reset the computer. If this happens, it will default to a gray background with brown text.{{citation needed|date=December 2023}} CP/M mode is very different from the operating environments familiar to Commodore users. While [[Commodore DOS]] is built into the ROM of Commodore disk drives and is usually accessed through BASIC, CP/M requires the use of a boot diskette and requires entry of terse commands inherited from [[minicomputer]] platforms. CP/M programs tend to lack the [[user-friendly]] nature of most Commodore applications.{{original research inline|date=February 2025}} In CP/M mode, it is possible to run [[MBASIC]], Microsoft's release of BASIC-80 for CP/M. Compared with the native mode BASIC 7.0, MBASIC is terse and limited in its capabilities, requiring the use of terminal-style key combinations to edit program lines or move the text cursor and lacking any sound or graphics features. Moreover, Commodore BASIC has 40-bit floating point which serves as a middle ground between MBASIC's 32-bit floating point and 64-bit double precision variables. MBASIC also offers only 34k of free program space against BASIC 7.0's approximately 90k.{{citation needed|date=December 2023}} The CP/M CBIOS (the part of CP/M that interfaces with the hardware) does not directly interface with the hardware like on most CP/M implementations; rather, it calls the kernal routines for interrupt handling and I/O—when the kernel needs to be used, the Z80 uses routines at {{mono|$FFD0}}-{{mono|$FFEF}} to pass parameter data to the 8502, which is then activated and the Z80 deactivated. After the kernel routine is finished executing, control is passed back to the Z80. It was reported that the programmer in charge of porting CP/M to the C128 had intended to have the CBIOS interface with the hardware directly in Z80 machine language, but had great difficulty with the VDU chips as they were prone to overheating and self-destructing. The VDU also underwent numerous hardware revisions while the C128 was in development and the CP/M programmer was unable to get his code working properly, so the C128 engineering team requested instead that he simply rewrite the CBIOS to pass function calls to the 8502.<ref>{{cite web|url=https://retrocomputing.stackexchange.com/questions/2361/why-does-the-commodore-c128-perform-poorly-when-running-cp-m |title=Why does the Commodore C128 perform poorly when running CP/M? |website=Stack Exchange}}</ref><ref>{{cite web|url=http://web.mit.edu/randy/www/antigrav/supercharge.html|title=Supercharging CP/M|quote=C128 CP/M programmers who want to add or change operating system features should try to make changes to the BIOS. For one thing, BIOS source code is available, but not available for the BDOS or CCP.}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Commodore 128
(section)
Add topic