Skip to content

Commit

Permalink
Get rid of "is_quickdisk" and "RAW_TRK_HEAD()" macros
Browse files Browse the repository at this point in the history
  • Loading branch information
keirf committed Jan 29, 2025
1 parent eaf6d0d commit 43a6194
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions inc/floppy.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
#define sampleclk_stk(x) ((x) * (SAMPLECLK_MHZ / STK_MHZ))
#define stk_sampleclk(x) ((x) / (SAMPLECLK_MHZ / STK_MHZ))

#if TARGET == TARGET_quickdisk
#define is_quickdisk TRUE
#else
#define is_quickdisk FALSE
#endif

#if TARGET == TARGET_apple2
#define WDATA_TOGGLE TRUE
#else
Expand Down Expand Up @@ -101,7 +95,6 @@ struct raw_trk {
int16_t gap_2, gap_3, gap_4a;
uint8_t interleave, cskew, hskew;
uint8_t has_iam:1, is_fm:1, invert_data:1;
#define RAW_TRK_HEAD(h) ((h)+1)
uint8_t head:2;
};

Expand Down
4 changes: 2 additions & 2 deletions src/image/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool_t image_valid(FILINFO *fp)

/* Check valid extension. */
filename_extension(fp->fname, ext, sizeof(ext));
if (!strcmp(ext, "adf") && !is_quickdisk) {
if ((TARGET == TARGET_shugart) && !strcmp(ext, "adf")) {
return (ff_cfg.host == HOST_acorn) || !(fp->fsize % (2*11*512));
} else {
const struct image_type *type;
Expand Down Expand Up @@ -323,7 +323,7 @@ uint32_t image_ticks_since_index(struct image *im)
uint32_t ticks = im->cur_ticks - im->ticks_since_flux;
if ((int32_t)ticks < 0)
ticks += im->tracklen_ticks;
if (!is_quickdisk)
if (TARGET != TARGET_quickdisk)
ticks >>= 4;
return ticks;
}
Expand Down

0 comments on commit 43a6194

Please sign in to comment.