Altair 8800 simulator
Ein CP/M-Simulator von Peter Schorn, basierend auf dem SIMH-Projekt. Emuliert wird ein 8080, Z80, diverse Floppy-Controller, MMU, etc.
the simulator features 8 simulated hard disks with a capacity of 8MB (HDSK0 to HDSK7). Currently only CP/M supports two hard disks as devices I: and J:.
Bedienung
Start:
altairz80.exe <conf>
z.B.
altairz80.exe cpm22
Ende:
^E q{uit} or by{e} or exi{t}
statt ^E für die SIMH-Taste (WRU genannt), kann ein anderer Steuercode gesetzt werden, z.B.
; SIMH Key to ^G (orig 005 ^E) SET CONSOLE WRU=007
cpmtools
das dskdef-Format für die 8MByte HDISK (Standardformat 8megAltairSIM, es gibt noch andere Formate, s. Quellcode!)
HDSK (standard simulated AltairZ80 hard disk with 8’192 kB capacity) 8 MByte HD Format:
# ALTAIRZ80 SIMH *dsk 8MB Harddisk (Type AZ80 HDSK) diskdef 8megAltairSIMH seclen 128 tracks 2048 sectrk 32 blocksize 4096 maxdir 1024 skew 0 boottrk 6 os 2.2 end # ALTAIRZ80 SIMH *dsk MITS 88-DISK 137 Byte/Sektor # speedball (copylib) skewtable diskdef simh seclen 128 tracks 254 sectrk 32 blocksize 2048 maxdir 256 skew 17 boottrk 6 os 2.2 libdsk:type simh end
Image file format
The file format is that of SimH: a file image is just a stream of blocks.
d tracks[0-7] 254
The 88-DISK controller The MITS 88-DISK is a simple programmed I/O interface to the MITS 8-inch floppy drive, which was basically a Pertec FD-400 with a power supply and buffer board built-in. The controller supports neither interrupts nor DMA, so floppy access required the sustained attention of the CPU. The standard I/O addresses were 8, 9, and 0A (hex), and we follow the standard. Details on controlling this hardware are in the altairz80_dsk.c source file. The only difference is that the simulated disks may be larger than the original ones: The original disk had 77 tracks while the simulated disks support up to 254 tracks (only relevant for CP/M). You can change the number of tracks per disk by setting the appropriate value in TRACKS[..]. For example „D TRACKS[0] 77“ sets the number of tracks for disk 0 to the original number of 77. The command „D TRACKS[0-7] 77“ changes the highest track number for all disks to 77.
The 88_DISK is a 8-inch floppy controller which can control up to 16 daisy-chained Pertec FD-400 hard-sectored floppy drives. Each diskette has physically 77 tracks of 32 137-byte sectors each.
CPM 3 Byte Header + 128 Byte Daten + 6 Byte Trailer
1113536 = 2^6*127*137
libdsk unterstützt das Format mit Type „simh“
/* The SIMH disc image is assumed to be in a single fixed format, like the * MYZ80 disc image. * * Geometry: * 254 tracks (presumed to be 127 cylinders, 2 heads) * 32 sectors / track * 137 bytes/sector: 3 bytes header, 128 bytes data, 6 bytes Trailer
d:\user\pohlers\AltairSIMH>dskid.exe -type simh cpm2.dsk cpm2.dsk: Driver: SIMH disc image driver Sidedness: 0 Cylinders: 127 Heads: 2 Sectors: 32 First sector: 0 Sector size: 128 Data rate: 1 Record mode: MFM R/W gap: 0x2a Format gap: 0x52 Drive status: 0x28 Filesystem parameters: CP/M:BSH: 0x04 CP/M:BLM: 0x0f CP/M:EXM: 0x00 CP/M:DSM: 0x1ef CP/M:DRM: 0xff CP/M:AL0: 0xf0 CP/M:AL1: 0x00 CP/M:CKS: 0x40 CP/M:OFF: 0x06 d:\user\pohlers\AltairSIMH>dskutil.exe -type simh cpm2.dsk LibDsk Disk Utility v1.3.5 :# Statistics for cpm2.dsk: Cylinders: 127 7f Heads: 2 02 Tracks: 254 fe Sec/cyl: 32 20 Sec/track: 64 40 1st sec: 0 00 Sec size: 128 0080 Data rate: 300 Encoding: MFM :$ sides=0 cylinders=127 heads=2 sectors=32 secbase=0 secsize=128 datarate=DD (300 kbit) rwgap=2a fmtgap=52 fm=N nomulti=N noskip=N cpmtools: libdsk-Type "simh" ist wichtig! cpmls -f simh -T simh cpm22.dsk