diskimage.c
/* return number of free blocks in track */
return number of free blocks in track
return number of free blocks in track
int di_track_blocks_free(DiskImage *di, int track) {
  unsigned char *bam;
  switch (di->type) {
  default:
  case D64:
    bam = get_ts_addr(di, di->bam);
    break;
  case D71:
    bam = get_ts_addr(di, di->bam);
    if (track >= 36) {
      return(bam[track + 185]);
    }
    break;
  case D81:
    if (track <= 40) {
      bam = get_ts_addr(di, di->bam);
    } else {
      bam = get_ts_addr(di, di->bam2);
      track -= 40;
    }
    return(bam[track * 6 + 10]);
    break;
  }
  return(bam[track * 4]);
}
int di_track_blocks_free ( DiskImage * di , int track ) { unsigned char * bam ; switch ( di -> type ) { default : case D64 : bam = get_ts_addr ( di , di -> bam ) ; break ; case D71 : bam = get_ts_addr ( di , di -> bam ) ; if ( track >= 36 ) { return ( bam [ track + 185 ] ) ; } break ; case D81 : if ( track <= 40 ) { bam = get_ts_addr ( di , di -> bam ) ; } else { bam = get_ts_addr ( di , di -> bam2 ) ; track -= 40 ; } return ( bam [ track * 6 + 10 ] ) ; break ; } return ( bam [ track * 4 ] ) ; }
return number of free blocks in track
return number of free blocks in track