fstbt: added sector ranges available through the recent standard delivery changes

This commit is contained in:
Rob McMullen 2017-07-07 12:19:04 -07:00
parent d3ade18e06
commit 27c38a3ec8
2 changed files with 18 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# generated file - recompile fstbt.s to make changes
# append jump target (lo, hi) and sector address list before saving to disk
fstbt = b"\x01\xa8\x8dP\xc0\x8dR\xc0\x8dW\xc0\xee\x0f\x08\xadl\x08\xc9\xc0\xf0U\xc9\xd0\xf0\xf2\xc9\xd1\xd0\x05\x8dT\xc0\xf0\xe9\xc9\xd2\xd0\x05\x8dU\xc0\xf0\xe0\x85'\xc8\xc0\x10\x90\t\xf0\x05 M\x08\xa8,\xa0\x01\x84=\xc8\xa5'\xf0\xc9\x8a {\xf8\t\xc0H\xa9[H`\xe6A\x06@ U\x08\x18 Z\x08\xe6@\xa5@)\x03*\x05+\xa8\xb9\x80\xc0\xa90L\xa8\xfcL"
fstbt = b"\x01\xa8\x8dP\xc0\x8dR\xc0\x8dW\xc0\xd0\t\xc6\xfe\x106\xa9\xd0\x8d\x0b\x08\xee\x1a\x08\xad\x86\x08\xc9\xc0\xf0d\xc9\xd0\xf0\xf2\xc9\xd1\xd0\x05\x8dT\xc0\xf0\xe9\xc9\xd2\xd0\x05\x8dU\xc0\xf0\xe0\xc9\xe0\x90\x0b)\x1f\x85\xfe\xa9$\x8d\x0b\x08\x10\xc6\x85'\xc8\xc0\x10\x90\t\xf0\x05 g\x08\xa8,\xa0\x01\x84=\xc8\xa5'\xf0\xba\x8a {\xf8\t\xc0H\xa9[H`\xe6A\x06@ o\x08\x18 t\x08\xe6@\xa5@)\x03*\x05+\xa8\xb9\x80\xc0\xa90L\xa8\xfcL"

View File

@ -82,7 +82,8 @@ class StandardDeliveryImage(DiskImageBase):
chunk = np.zeros([size], dtype=np.uint8)
chunk[padding:padding + len(s)] = s[:]
chunks.append((chunk_start, chunk))
print("segment: %s, chunk=%s" % (str(s), str(chunks[-1])))
print("segment: %s, pages=%d" % (str(s), len(chunk) // 256))
log.debug(" last chunk=%s" % str(chunks[-1]))
# break up the chunks into sectors
@ -111,8 +112,20 @@ class StandardDeliveryImage(DiskImageBase):
# Assume this is an HGR screen, use interesting load effect,
# not the usual venetian blind
chunk_hi = [0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 0x38, 0x3c, 0x21, 0x25, 0x29, 0x2d, 0x31, 0x35, 0x39, 0x3d, 0x22, 0x26, 0x2a, 0x2e, 0x32, 0x36, 0x3a, 0x3e, 0x23, 0x27, 0x2b, 0x2f, 0x33, 0x37, 0x3b, 0x3f]
address_order = chunk_hi
else:
chunk_hi = range(chunk_start, chunk_start + count)
if len(chunk_hi) > 2:
address_order = []
for n in range(0, count, 32):
subset = chunk_hi[n:n+32]
if len(subset) > 2:
address_order.extend([chunk_hi[n], 0xe0 + len(subset) - 1])
else:
address_order.extend(subset)
else:
address_order = chunk_hi
for n in range(count):
i = (chunk_hi[n] - chunk_start) * 256
sector = dsk.header.create_sector(chunk_data[i:i+256])
@ -120,19 +133,19 @@ class StandardDeliveryImage(DiskImageBase):
count += 1
#sector.sector_num = count
sector_list.append(sector)
address_list.append(chunk_hi[n])
# sector.data[0] = sector.sector_num
# sector.data[1] = hi
# sector.data[2:16] = 0xff
print("%s at %02x00: %s ..." % (sector_list[-1], address_list[-1], " ".join(["%02x" % h for h in chunk_data[i:i + 16]])))
log.debug("%s at %02x00: %s ..." % (sector_list[-1], address_list[-1], " ".join(["%02x" % h for h in chunk_data[i:i + 16]])))
index += 1
if index >= len(sector_order):
index = 0
track += 1
address_list.extend(address_order)
if chunk_start == 0x40:
address_list.append(0xd2)
print("address list %s" % str(address_list))
print("fstbt commands: %s" % ", ".join(["%02x" % i for i in address_list]))
boot_code = get_fstbt_code(boot_sector.data, address_list, run_addr)
dsk.write_sector_list(sector_list)