diff options
author | Maxwell Beck <max@rastertail.net> | 2024-12-28 19:09:06 -0600 |
---|---|---|
committer | Maxwell Beck <max@rastertail.net> | 2024-12-28 19:09:06 -0600 |
commit | bc3fbeb48dea39d7213fb257a56e35bcacba9e8d (patch) | |
tree | 9b0f0bbad177e4f73c8a6074e79b5a8f0332b63a /src/drive.h | |
parent | dbe367d5a302300e598187eaf4c369eb06f5ec48 (diff) |
Use multicore to meet timing
Diffstat (limited to 'src/drive.h')
-rw-r--r-- | src/drive.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/drive.h b/src/drive.h index b9fb1f2..c41712a 100644 --- a/src/drive.h +++ b/src/drive.h @@ -11,14 +11,14 @@ extern const uint8_t BITRATE_PER_TRACK[40]; extern const uint8_t GCR_CONV[16]; typedef struct drive_s { - bool spinning; + volatile bool spinning; uint8_t timer; uint8_t *image; - uint8_t track; - uint8_t halftrack; - uint32_t image_ptr; - uint8_t sector; + volatile uint8_t track; + volatile uint8_t halftrack; + volatile uint32_t image_ptr; + volatile uint8_t sector; uint8_t byte; uint16_t gcr_word; @@ -33,10 +33,10 @@ typedef struct drive_s { uint8_t current_idx; uint8_t lookahead_idx; - uint16_t unlatched[DRIVE_LOOKAHEAD]; - uint16_t latched[DRIVE_LOOKAHEAD]; - bool sync[DRIVE_LOOKAHEAD]; - bool byte_ready[DRIVE_LOOKAHEAD]; + volatile uint16_t unlatched[DRIVE_LOOKAHEAD]; + volatile uint16_t latched[DRIVE_LOOKAHEAD]; + volatile bool sync[DRIVE_LOOKAHEAD]; + volatile bool byte_ready[DRIVE_LOOKAHEAD]; } drive_t; void drive_init(drive_t *drive); |