LogicalVsPhysicalTrackCleanup
Jump to navigation
Jump to search
In some part of the code Logical Track numbers are used, when it should be physical tracks instead. (This mostly applies to 1571 and 8250 images and drives - where the DOS would use logical track numbers > 35 to access the second disk side). this makes it kindof hard an annoying to add support for images that use the upper tracks (35-40) in a generic way.
This page is used for notes and keeping track of some things while i am trying to get this worked out and under control Gpz (talk) 22:09, 14 October 2021 (CEST)
Functions
src/diskimage/diskimage.c: disk_image_speed_map(unsigned int format, unsigned int track) - input: logical track returns: speedzone for given track calls: - called by: disk_image_sector_per_track(unsigned int format, unsigned int track) - input not checked for 1571/d71, so either physical or logical returns: number of sectors for a given track disk_image_raw_track_size(unsigned int format, unsigned int track) - input: logical track returns: number of GCR bytes on a track disk_image_gap_size(unsigned int format, unsigned int track) - input: logical track returns: gap size for given track src/diskimage/fsimage-create.c:fsimage_create_gcr(disk_image_t *image) src/diskimage/fsimage-p64.c:fsimage_p64_read_half_track(const disk_image_t *image, unsigned int half_track, disk_track_t *raw) src/diskimage/fsimage-gcr.c:fsimage_gcr_write_half_track(disk_image_t *image, unsigned int half_track, const disk_track_t *raw)
src/diskimage/fsimage-check.c: int fsimage_check_sector(const disk_image_t *image, unsigned int track, unsigned int sector) returns: offset in sectors in a image for track/sector or -1 on error calls: disk_image_sector_per_track(unsigned int format, unsigned int track) - input not checked for 1571/d71, so either physical or logical returns: number of sectors for a given track called by: src/diskimage/diskimage.c: disk_image_check_sector(const disk_image_t *image, unsigned int track, unsigned int sector) returns: offset in sectors in a image for track/sector or -1 on error - ONLY IF (image->device == DISK_IMAGE_DEVICE_FS)
src/diskimage/fsimage-create.c: fsimage_create_gcr(disk_image_t *image) calls: disk_image_speed_map(unsigned int format, unsigned int track) - input: logical track disk_image_gap_size(unsigned int format, unsigned int track) - input: logical track disk_image_header_gap_size(unsigned int format, unsigned int track) - input: track (not used) disk_image_sync_size(unsigned int format, unsigned int track) - input: track (not used) disk_image_raw_track_size(unsigned int format, unsigned int track) - input: logical track disk_image_sector_per_track(unsigned int format, unsigned int track) - input not checked for 1571/d71, so either physical or logical
src/diskimage/fsimage-dxx.c: int fsimage_dxx_write_half_track(disk_image_t *image, unsigned int half_track, const disk_track_t *raw)
src/diskimage/fsimage-dxx.c: int fsimage_read_dxx_image(const disk_image_t *image)
src/diskimage/fsimage-dxx.c: int fsimage_dxx_read_sector(const disk_image_t *image, uint8_t *buf, const disk_addr_t *dadr)
src/diskimage/fsimage-dxx.c: int fsimage_dxx_write_sector(disk_image_t *image, const uint8_t *buf, const disk_addr_t *dadr)
src/drive/drive.c: drive_set_last_read(unsigned int track, unsigned int sector, uint8_t *buffer, struct diskunit_context_s *unit) calls: drive_gcr_data_writeback drive_set_half_track
src/drive/drive.c: void drive_set_half_track(int num, int side, drive_t *dptr) calls: -
src/drive/drive.c: void drive_gcr_data_writeback(drive_t *drive) calls: -
Things to test
- create G64/G71
- create D64/D71/D82/D81/D1M/D2M/D4M