Herwig Siebenhofer
 / Home / C64
C 64

    Memory Map
    Float Map
    ROM Map
    Basic ROM
    Kernal ROM
    Char ROM
    CPU 6510
    VIC 6569
    SID 6581
    CIA 6526
    sonstige Ports

    Schematik 1
    Schematik 2

C 1541  Floppy

    Memory Map
    Rom Listing
    VIA 6522

C 1581  Floppy

    Memory Map
    Rom Listing
    CIA 8520
    WD 1772


    Mouse 1531
    Chip 74xx

C1541-Floppy Memory Map

RAM   0000-07FF
0000Command code for buffer 0
0001Command code for buffer 1
0002Command code for buffer 2
0003Command code for buffer 3
0004Command code for buffer 4
0005Command code for buffer 5 (unused)
0006-0007    Track and sector for buffer 0
0008-0009Track and sector for buffer 1
000A-000BTrack and sector for buffer 2
000C-000DTrack and sector for buffer 3
000E-000FTrack and sector for buffer 4
0010-0011Track and sector for buffer 5 (unused)
0012-0013Disk ID, drive 0
0014-0015Disk ID, drive 1
0016Header block: ID
0018Header block: Track
0019Header block: Sector
001aHeader block: Parity
001bNot used (Disk Controller work)
001cFlag for disk change, drive 0
001dFlag for disk change, drive 1
001eFlag for write protect sense, drive 0
001fFlag for write protect sense, drive 1
0020Drive 0 status (disk and step motor)
    bit 7: Disk drive ready (1 = No, 0 = Yes)
    bit 6: Read/Write head moving (1 = Yes, 0= No)
    bit 5: Motor on (1 = Yes, 0 = No)
    bit 4: Switch off motor (1 = Yes, 0 = No)
0021Drive 1 status (disk and step motor)
0022Current track for drive 0
0023Flag for 1541 (0), 1540 (not 0)
0024Scratch pad of GCR conversion /BIN -> GCR conversions)
002E-002FPointer for temporary storage
0030-0031Buffer pointer for disk controller
0032Pointer: *** active track
0033Pointer: *** active sector
0034Pointer to last converted byte
0035Not used (decode error, GCR)
0036Byte counter for GCR/BIN conversion
0037Not used (bit counter)
0038Constant 7, ID mark for start of data block
0039Constant 8, ID mark for start of block header
003AParity for data buffer
003BNot directly used
003CNot directly used
003DMotor flag – Disk drive number, on 1541 always 00
003EActive drive (FF, if not active)
003FBuffer number for disk controller – Previous work place in queue (0 - 5)
0040Byte counter for GCR conversion
0041Number of next work in queue (0 - 5)
0042Destination track (to move R/W head to)
0043Number of sectors per track for formatting
0044Temp. work area; Scratch pad
0045Work code temp. storage
0046Not used
0047Data block ID char, default 07. By changing this value, a data block can be written with different ID. The value must be less than 10.
0048Counter for head movement. Timer: R/W head acceleration
0049Stack pointer temp. storage
004AStep counter for head transport. Values 0 - 127 move the head outside and values over 128 move towards the centre.
004BTemp. storage
004CLast read sector
004DNext sector
004E-004FPointer to buffer for GCR->BIN conversion
0050Flag for GCR format (0=BIN, 1=GCR)
0051Current track number for formatting
0052-0055Storage for 4 BIN bytes for GCR coding
0056-005DStorage for 5 GCR bytes
005ENumber of steps for head motor accelerating/decl.
005Faccelerating/decl. factor
0062-0063Pointer to routine for head movement [FA05]
0064Minimum number of steps
0065-0066UI vector [$EB22]
0067Flag: NMI
0068Flag for disk initialisation. Automatic disk initialisation if ID MISMATCH occurred (1 = no, 0 = yes)
0069Step size for sector division. Sector number interleave for SEQ files, default 0A
006ANumber of read attempts [5]
006B-006CPointer: Start of Jump table for U commands [FFEA]
006D-006EPointer: Start of bitmap [0400]
006F-0070Pointer to address for M & B commands
0071Temp. work area
0072Temp. work area [FF]
0073Temp. work area
0074Temp. work area
0075-0076Indirect pointer [0100]
0077Listener address (Device number + $20) [28]
0078Talker address (Device number + $40) [48]
0079Flag: Active listener
007AFlag: Active talker
007CFlag for ATN from serial bus receiving
007DFlag for ATN on serial bus active
007ELast handled program
007FDrive number (on 1541 always 00)
0080Current Track number
0081Current Sector number
0082Channel number (Logical index)
0083Secondary address
0084Original Secondary address [6F]
0085Current Data byte [3F]
0086-008ATemp Results
008B-008EWork storage for division. Result, Multiply and divide
0094-0095Pointer: Current directory buffer (0204)
0099-009APointer: Next byte in buffer 0 [0300]
009B-009CPointer: Next byte in buffer 1 [0400]
009D-009EPointer: Next byte in buffer 2 [0500]
009F-00A0Pointer: Next byte in buffer 3 [0600]
00A1-00A2Pointer: Next byte in buffer 4 [0700]
00A3-00A4Pointer: Next byte in command buffer [0200]
00A5-00A6Pointer: Next byte in error message buffer [02D6]
00A7-00ADTable: Non-active channel numbers for each buffer
00B5-00BATable: Record # low , block # low
00BB-00C0Table: Record # high, block # high
00C1-00C6Write pointer for REL file. Table: next record numbers
00C7-00CCTable: Record length for REL file
00CD-00D2Table: Side sectors
00D4Pointer in record for REL file
00D5Side sector number
00D6Pointer to data block in side sector
00D7Pointer to record in REL file
00D8-00DCDirectory sectors
00DD-00E1Index: Directory
00E2-00E6Default disk drive [00]
00E7-00EBFile type (wild cards, @, closed)
00EC-00F1File type (channel)
00F2-00F7Channel status
00F8Flag for EOI
00F9Current work (Buffer number)
00FA-00FELast used table
00FFFlag: FF = drive 0 not ready (No disk), 00 = ready
0100Flag: FF = drive 1 not ready (No disk), 00 = ready
0101Format marker, drive 0 – DOS version (from track 18 sector 0)
0102Format marker, drive 1
0103Not used
0104-01FFStack area
01BABuffer for GCR code
0200-0029Buffer for command string
022ACommand code
022B-022DArray: Logical index (LINDX) – Array of status bytes for each channel (secondary address). Possible values:
    FF = inactive
    81 = opened for writing
    41 = read/write
    01 = opened for reading
022BLogical index, channel 0
022CLogical index, channel 1
022DLogical index, channel 2
022E-0243Last read/written byte for each channel
0244-0249Pointer: Last char on channel. Points to the last character read/written in buffer.
024AType of active file
024BString length
024CTemp. channel number (secondary address)
024DCurrent work with drive number
024EWork area to find the best sector
024F-0250Buffer allocated
0251Flag: BAM changed, drive 0
0252Flag: BAM changed, drive 1
0253Flag for directory entry found (FF = Not found, 00 = Found)
0254Flag for directory output
0255Flag: Waiting for command
0257Last used buffer
0258Record length
0259Track of side sector
025ASector of side sector
025B-025FLast work (buffers)
0260-0265Directory sector (buffers)
0266-026BFile's index in directory (buffers)
026CCounter for LED flash
026DError LED
026EDrive for last program
026Fsector for last program
0270Write LINDX
0271Read LINDX
0272-0073Number of blocks (temp)
0274Length of input line
0275Char to interpret
0276Index: End of filename in command buffer
0278Number of file names
027A-027FPointer table: Filenames
0280-0284Track of a file
0285-0289Sector of a file
028AFlag: wild cards
028CNumber of drive(s ?) to look for
028DFlag: Looking for drive
028Edrive with last write/open error, used as default drive
028FFlag: Found in directory
0290Directory sector
0291Sector for first available file
0292Index (in directory) for first available file
0293For the last directory entry 0
0294Current buffer-index
0295Counter: Files
0296Flag: Name matching wild cards
0297Active operating mode (R or W)
0298Flag: Work return
0299Pointer: Re-read error
029ATotal tracks
029B-009CPointer: BAM last update
029D-00A0BAM: image sector (drives 0 and 1)
02A1-00B0BAM image
02B1-00D4Buffer for directory output
02D5-00F8Buffer for error message
02F9Flag: Don't write BAM. This flag is reset to zero before and after each command
02FA-02FBNumber of free blocks, low byte for drives 0 ja 1
02FC-02FDNumber of free blocks, hi byte for drives 0 ja 1
02FE-02FFStepper motor sequence
0300-03FFBuffer 0
0400-04FFBuffer 1
0500-05FFBuffer 2
0600Buffer 3
0621-0622Formatting counter
0700-07FFBuffer 4
Controller chips
1800-1805VIA 1 – MOS 6522 : port for serial bus
1C00-1C05VIA 2 – MOS 6522 : port for motor and read/write head control
C100-E4FBFile Manager Routines
F259-FE84Disk Controller Routines
FE85-FFE9Constands for disk format
FFFC-FFFFHardware vectors