Commodore 128 Programmer's Reference Manual page 501

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
! i
CP/M 3.0 ON THE COMMODORE 128
491
i I
I
!
The memory map is limited to 64K at any one point in time. However, the RAM
bank can be selected and then different ROM areas can overlay the RAM (with
j|
bleed-through on write operations). The actual memory map is controlled by the MMU. The
' '
MMU can be accessed in the I/O area (only when I/O is enabled in Z80 space) or
through the Load Configuration Register located at FF00 through FF04..
H
If the Load Configuration Registers are read, then the current value is read. A
j i
write to FF00 changes the configuration after completing the current instruction. A
write to FF01 to FF04 updates the current configuration to the value stored in the
^-
Preconfiguration Registers (the data written is not used). The MMU page pointers have
t
both a low (page) and a high (page) pointer. The high is written first and latched in the
MMU; the high value is updated from the latch when the low byte is written. The MMU
Control Registers are listed in Chapter 13.
DISK ORGANIZATION
n
j
i
CP/M 3.0 supports a number of different disk formats, including three Commodore
formats and a number of MFM formats. (MFM is the industry standard format.) The
first Commodore format is single-sided Commodore GCR, which is compatible with the
CP/M 2.2 that runs on the Commodore 64. With this format, the File Control Block
(FCB) is set up as 32 tracks of 17 sectors each and a track offset of 2. The BIOS routine
adds a 1 to tracks greater than 18 (this is the C64 directory track).
The second format, known as the C128 CP/M Plus disk format, is new and is also
single-sided. This format, which is also a GCR format, takes advantage of the full disk
capacity by setting up the FCB with 638 tracks of 1 sector each and a track offset of 0.
This has the effect of having CP/M set the track to the block number relative to
the beginning of the disk, with the sector always set to 0. The following algorithm is
used to convert the requested TRACK to a real track and sector number.
REQUESTED TRACK
000 > = TRACK :
355 > = TRACK :
487 > = TRACK :
595 > = TRACK :
680 > = TRACK :
>355
>487
>595
> 680
> 1360
ACTUAL TRACK
((TRACK + 2)/21) +
((TRACK - 354)/19) +
((TRACK - 487)/18) +
((TRACK - 595)/17) +
SET SIDE 2 TRACK =
1
18
25
31
= TRACK - 680

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents