20-04-2026, 01:39 PM
I have been working on patching the ship, init, maintain utilities to allow the use of a 20Mb hard disk drive (612/4/17) - effectively the same geometry as the Teac SD-520.
I didn’t have access to the assembly source for any of the software so started by disassembling the executables and working with GPT to identify the routines that called
The ship.com utility was the easiest as it’s effectively a tiny assembly routine that performs a seek beyond the 612 cylinder and waits for power to be turned off or a keypress.
The init.com utility was a lot more complex - as there were values that weren’t as obvious as cylinder / head / sectors - the total # of cylinders was calculated and ‘guard-rails’ were used as validation - I could get the ship.com hard disk routine to format the drive to the size I wanted quite quickly.
What was more complex (and is still ongoing) is the partition definition - the logic within the init.com routine allowed a maximum of 10Mb to be divided up in 0.5Mb increments - this needed to be extended to 20Mb while maintaining a maximum partition size of 8Mb.
A minimum of three partitions is required on a 20Mb disk as it needs to fulfil the criteria of no partition can exceed maximum CP/M 2.2 size of 8Mb, and the remaining space is automatically added to the last partition if the full drive capacity has not been reached.
I have managed to get the interface to work correctly -but- what appears to be the final *Hopefully* issue is the calculations of the DPB and placement of the directory blocks with the right offsets from track 0 for the second and subsequent partitions - use of partition #3 causes the system to crash.
I didn’t have access to the assembly source for any of the software so started by disassembling the executables and working with GPT to identify the routines that called
The ship.com utility was the easiest as it’s effectively a tiny assembly routine that performs a seek beyond the 612 cylinder and waits for power to be turned off or a keypress.
The init.com utility was a lot more complex - as there were values that weren’t as obvious as cylinder / head / sectors - the total # of cylinders was calculated and ‘guard-rails’ were used as validation - I could get the ship.com hard disk routine to format the drive to the size I wanted quite quickly.
What was more complex (and is still ongoing) is the partition definition - the logic within the init.com routine allowed a maximum of 10Mb to be divided up in 0.5Mb increments - this needed to be extended to 20Mb while maintaining a maximum partition size of 8Mb.
A minimum of three partitions is required on a 20Mb disk as it needs to fulfil the criteria of no partition can exceed maximum CP/M 2.2 size of 8Mb, and the remaining space is automatically added to the last partition if the full drive capacity has not been reached.
I have managed to get the interface to work correctly -but- what appears to be the final *Hopefully* issue is the calculations of the DPB and placement of the directory blocks with the right offsets from track 0 for the second and subsequent partitions - use of partition #3 causes the system to crash.
