mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-11-29 11:51:14 +00:00
fstbt: option not to show HGR page; use $2001 or $4001 to trigger
This commit is contained in:
parent
f15b5527c0
commit
6df7031dc6
@ -78,10 +78,15 @@ class StandardDeliveryImage(DiskImageBase):
|
|||||||
# since the loader only deals with page boundaries
|
# since the loader only deals with page boundaries
|
||||||
origin = s.start_addr
|
origin = s.start_addr
|
||||||
chunk_start, padding = divmod(origin, 256)
|
chunk_start, padding = divmod(origin, 256)
|
||||||
|
if (chunk_start == 0x20 or chunk_start == 0x40) and padding == 1:
|
||||||
|
show_hgr = False
|
||||||
|
padding = 0
|
||||||
|
else:
|
||||||
|
show_hgr = True
|
||||||
size = ((len(s) + padding + 255) // 256) * 256
|
size = ((len(s) + padding + 255) // 256) * 256
|
||||||
chunk = np.zeros([size], dtype=np.uint8)
|
chunk = np.zeros([size], dtype=np.uint8)
|
||||||
chunk[padding:padding + len(s)] = s[:]
|
chunk[padding:padding + len(s)] = s[:]
|
||||||
chunks.append((chunk_start, chunk))
|
chunks.append((chunk_start, chunk, show_hgr))
|
||||||
print("segment: %s, pages=%d" % (str(s), len(chunk) // 256))
|
print("segment: %s, pages=%d" % (str(s), len(chunk) // 256))
|
||||||
log.debug(" last chunk=%s" % str(chunks[-1]))
|
log.debug(" last chunk=%s" % str(chunks[-1]))
|
||||||
|
|
||||||
@ -107,7 +112,7 @@ class StandardDeliveryImage(DiskImageBase):
|
|||||||
sector_list.append(boot_sector)
|
sector_list.append(boot_sector)
|
||||||
first_page_1 = True
|
first_page_1 = True
|
||||||
|
|
||||||
for chunk_start, chunk_data in chunks:
|
for chunk_start, chunk_data, show_hgr in chunks:
|
||||||
count = len(chunk_data) // 256
|
count = len(chunk_data) // 256
|
||||||
if chunk_start == 0x20 and count == 32 and first_page_1:
|
if chunk_start == 0x20 and count == 32 and first_page_1:
|
||||||
# Assume this is an HGR screen, use interesting load effect,
|
# Assume this is an HGR screen, use interesting load effect,
|
||||||
@ -143,6 +148,7 @@ class StandardDeliveryImage(DiskImageBase):
|
|||||||
index = 0
|
index = 0
|
||||||
track += 1
|
track += 1
|
||||||
address_list.extend(address_order)
|
address_list.extend(address_order)
|
||||||
|
if show_hgr:
|
||||||
if chunk_start == 0x40:
|
if chunk_start == 0x40:
|
||||||
address_list.append(0xd2)
|
address_list.append(0xd2)
|
||||||
elif chunk_start == 0x20:
|
elif chunk_start == 0x20:
|
||||||
|
Loading…
Reference in New Issue
Block a user