The Definitions I have for the NABU are as Follows:
Code:
BEGIN NAB1 Nabu PC - SSDD 5.25" 48 tpi - 1024 x 5
DENSITY MFM, LOW
CYLINDERS 40 SIDES 1 SECTORS 5,1024
SIDE1 0 1,3,5,2,4
BSH 3 BLM 7 EXM 0 DSM 194 DRM 95 AL0 0E0H AL1 0 OFS 1
END
#cpmtools definition
# NAB1 Nabu PC - SSDD 5.25" 48 tpi - 1024 x 5
diskdef nab1
seclen 1024
tracks 40
sectrk 5
blocksize 1024
maxdir 96
skew 2
boottrk 1
os 3
end
#libdsk definition
[nab1]
description = NAB1 Nabu PC - SSDD 5.25" 48 tpi - 1024 x 5
cylinders = 40
heads = 1
secsize = 1024
sectors = 5
secbase = 1
datarate = DD
#Flashfloppy/GOTEK definition
[nab1]
cyls = 40
heads = 1
secs = 5
interleave = 2
bps = 1024
id = 1
#rpm = 360
rpm = 300
rate = 250
mode = mfm
iam = no
The directory is located at 0x1400 = 5120 Decimal = Start of Track #1 and appears Valid
03,04,05,06 Tells us 8 Bit values vs 16 Bit values for the Allocation units.
00001400 00 48 45 4C 50 20 20 20 20 48 4C 50 00 00 00 80 .HELP HLP....
00001410
03 04 05 06 20 21 22 23 24 25 26 27 28 29 2A 2B .... !"#$%&'()*+
00001420 00 43 50 4D 33 20 20 20 20 53 59 53 00 00 00 78 .CPM3 SYS...x
00001430 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 00 ................
00001440 00 42 41 43 4B 55 50 20 20 43 4F 4D 00 00 00 20 .BACKUP COM...
00001450 16 17 18 19 00 00 00 00 00 00 00 00 00 00 00 00 ................
00001460 00 46 4F 52 4D 41 54 20 20 43 4F 4D 00 00 00 22 .FORMAT COM..."
00001470 1A 1B 1C 45 46 00 00 00 00 00 00 00 00 00 00 00 ...EF...........
00001480 00 43 4F 50 59 53 59 53 20 43 4F 4D 00 00 00 11 .COPYSYS COM....
00001490 1D 1E 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000014A0 00 48 45 4C 50 20 20 20 20 48 4C 50 01 00 00 80 .HELP HLP....
000014B0 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B ,-./0123456789:;
000014C0 00 48 45 4C 50 20 20 20 20 48 4C 50 02 00 00 45 .HELP HLP...E
000014D0 3C 3D 3E 3F 40 41 42 43 44 00 00 00 00 00 00 00 <=>?@ABCD.......
000014E0 00 43 48 45 43 4B 20 20 20 43 4F 4D 00 00 00 13 .CHECK COM....
000014F0 47 48 49 00 00 00 00 00 00 00 00 00 00 00 00 00 GHI.............
00001500 00 53 45 54 20 20 20 20 20 43 4F 4D 00 00 00 53 .SET COM...S
00001510 4F 50 51 52 53 54 BA BB BC BD BE 00 00 00 00 00 OPQRST..........
00001520 00 48 45 4C 50 20 20 20 20 43 4F 4D 00 00 00 38 .HELP COM...8
00001530 55 56 57 58 59 5A 5B 00 00 00 00 00 00 00 00 00 UVWXYZ[.........
The DPB information is stored in the Image as follows:
The Disk Parameter Block (DPB) for each drive is:
Code:
+-----+------+-------+-------+-------+-------+------+------+------+-----+
|SPT.|BSH...|BLM....|EXM....|DSM...,|DRM....|AL0...|AL1...|CKS...|OFF..|
+-----+------+-------+-------+-------+-------+------+------+------+-----+
16B 8B 8B 8B 16B 16B 8B 8B 16B 16B
EXAMPLE:
RPT = 0024 = The number of 128 byte records per track = 32
BSH = 04 = The block shift count = 4
BLM = 0F = The block mask = 15
EXM = 01 = The extent mask
DSM = 0054 = Disk storage maximum (the largest block number).
DRM = 007F = Directory maximum (the largest directory entry).
DAB = C000= Directory Allocation Block AL0: = C0 & AL1: = 00
CKS = 0020 = Directory check size.
OFF = 0002 = Track offset (number of reserved tracks).
SPT: Number of sectors per track. May differ from RPT if physical sectors are other than
128 bytes in size.
SSZ: Sector size code:
0 = 128 bytes per sector
1 = 256 bytes per sector
2 = 512 bytes per sector
3 = 1024 bytes per sector
NTK: Number of tracks (35, 40, 77, or 80). The number of tracks can be determined by formatting
a Floppy, or with Anadisk. Anadisk will also tell you the sector size and SKEW.
The NABUPER1 Image has:
00003E80 XX XX XX XX XX XX XX XX 20 00 03 07 00 97 00 3F
00003E90 00 C0 00 00 10 01 00 02 03 00 00 28 00 03 07 00
00003EA0 C0 00 3F 00 C0 00 00 10 01 00 02 03 00 00 XX XX
00003E808 00 20 ??
03
07
00
00 97
00 3F
C0 00
00 10
00 01
00003E9B 00 28 Seems correct
03
07
00
00 C0
00 3F
C0 00
00 10
00 01
0x3E808
RPT = 0020 = The number of 128 byte records per track = 32 <--- Doesn't seem correct (1024 * 5) / 128 = 40
BSH = 03 = The block shift count = 3
BLM = 07 = The block mask = 7
EXM = 00 = The extent mask
DSM = 0097 = Disk storage maximum (the largest block number) = 151
DRM = 003F = Directory maximum (the largest directory entry) = 63
DAB = C000= Directory Allocation Block AL0: = C0 & AL1: = 00
CKS = 0010 = Directory check size.
OFF = 0001 = Track offset (number of reserved tracks).
ox3E9B
RPT = 0028 = The number of 128 byte records per track = 40 <---Seems correct (1024 * 5) / 128 = 40
BSH = 03 = The block shift count = 3
BLM = 07 = The block mask = 7
EXM = 00 = The extent mask
DSM = 00C0 = Disk storage maximum (the largest block number) = 192
DRM = 003F = Directory maximum (the largest directory entry) = 63
DAB = C000= Directory Allocation Block AL0: = CO & AL1: = 00
CKS = 0010 = Directory check size.
OFF = 0001 = Track offset (number of reserved tracks).
So, I checked the NABUPER1.IMD and NABUPER1.RAW Images with libdsk's dskid to see what it gives:
$ dskid -type imd NABUPER1.IMD
NABUPER1.IMD:
Driver: IMD file driver
Sidedness: Alt
Cylinders: 40
Heads: 1
Sectors: 5
First sector: 1
Sector size: 1024
Data rate: DD
Record mode: MFM
Complement: No
R/W gap: 0x2a
Format gap: 0x52
Drive status: 0x20
Comment: Nabu Personal Computer
Disk 1
CP/M User
larry@debian:~/IMDs/nabupc/nabupc$ dskid -type raw NABUPER1.RAW
NABUPER1.RAW:
Driver: Raw file driver (alternate sides)
Sidedness: Alt
Cylinders: 40
Heads: 1
Sectors: 5
First sector: 1
Sector size: 1024
Data rate: DD
Record mode: MFM
Complement: No
R/W gap: 0x2a
Format gap: 0x50
Drive status: 0x20
Filesystem parameters:
CP/M:BSH: 0x03
CP/M:BLM: 0x07
CP/M:EXM: 0x00
CP/M:DSM: 0x9b = 155
CP/M:DRM: 0x3f = 63
CP/M:AL0: 0xC0 = 192
CP/M:AL1: 0x00
CP/M:CKS: 0x10
CP/M:OFF: 0x01
Which doesn't exactly match what I manually decoded. So, which is correct so the Floppy Boots?
The directory listing appears sane.
Code:
$ cpmls -f nab1 -T raw,nab1 -D NABUPER1.RAW
Name Bytes Recs Attr update create
------------ ------ ------ ---- ----------------- -----------------
BACKUP .COM 4K 32
CCP .COM 4K 25
CHECK .COM 3K 19
CLEAN .COM 3K 18
COPYSYS .COM 3K 17
CPM3 .SYS 15K 120
DATE .COM 3K 22
DEVICE .COM 8K 58
DIR .COM 15K 114
DUMP .COM 1K 8
ERASE .COM 4K 29
FORMAT .COM 5K 34
GET .COM 7K 51
HELP .COM 7K 56
HELP .HLP 41K 325
NABUSHOW.COM 3K 21
PATCH .COM 3K 19
PIP .COM 9K 68
PUT .COM 7K 55
RENAME .COM 3K 23
SAVE .COM 2K 14
SET .COM 11K 83
SETDEF .COM 4K 32
SHOW .COM 9K 66
SUBMIT .COM 6K 42
TYPE .COM 3K 24
26 Files occupying 183K, 9K Free.
Larry