Re: [CommodoreOne] Help needed

From: Matthew Montchalin (
Date: 2001-09-03 10:22:27

On Mon, 3 Sep 2001, Ruud Baltissen wrote:

|Hallo allemaal,
|I'm busy in developing a new Kernal for the 1541/IDE combination. And as 
|I already thought, that's no peanuts. So now and then I could use some


|I am more a techie and the kind of help I need now is more mathematical
|orientated ie. number crunching.
|1) What I need is a conversion from "Track/Head/Sector" to a lineair
|number. And vica versa of course.
|Information you need:
|HDTRACKL = Low byte number of tracks on harddisk
|HDTRACKH = High byte number of tracks on harddisk

Are you implying there is a maximum of $ffff tracks on a hard drive?

|HDHEADS  = number of heads
|HDSECT   = number of sectors on a track.

Do you need an entire 8 bit byte to keep track of HDHEADS?  Or can it
be just 1 bit wide?  How many hard drive heads are there with an IDE
drive?  What legal values are permissible for HDSECT?

|Counting starts with track 0, head 0, sector 1. The next track to be
|read is track 0, head 1.
|2) This lineair number is needed to calculate the place of the bit
|representing the bit in the BAM-table.
|Information you need:
|BAMBYTES = needed bytes to represent the # of free sectors and the state
|           of each sector. The bytes form together a "unit".

I suggest reading in the byte that specifies Disk type to see how big
the BAM should be.

|BAMUNITS = number of units in a BAM-sector, only whole units are used
|The structure of a UNIT is conform the one of a 1541.

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.1.