File tree Expand file tree Collapse file tree 4 files changed +30
-1
lines changed
Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,17 @@ nav-scroll-rate = 80
267267# Values: 0 <= N <= 65535
268268nav-scroll-pause = 300
269269
270+ # #
271+ # # HFE OVERRIDES
272+
273+ # HFE step size
274+ # Values: 0 <= N <= 2; N=0: no override
275+ hfe-step = 0
276+
277+ # HFE rotation speed
278+ # Values: 0 <= N <= 1023; N=0: no override
279+ hfe-rpm = 0
280+
270281# #
271282# # MISCELLANEOUS
272283
Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ struct packed ff_cfg {
170170#define NOTIFY_volume_mask 15
171171#define NOTIFY_slotnr (1<<4)
172172 uint8_t notify_volume ;
173+ uint16_t hfe_rpm ;
174+ uint8_t hfe_step ;
173175};
174176
175177extern struct ff_cfg ff_cfg ;
Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ static bool_t hfe_open(struct image *im)
9797 return FALSE;
9898 }
9999
100- im -> hfe .double_step = !dhdr .single_step ;
100+ im -> hfe .double_step = (ff_cfg .hfe_step ? (ff_cfg .hfe_step == 2 )
101+ : !dhdr .single_step );
101102 im -> hfe .tlut_base = le16toh (dhdr .track_list_offset );
102103 im -> nr_cyls = dhdr .nr_tracks ;
103104 im -> step = im -> hfe .double_step ? 2 : 1 ;
@@ -131,6 +132,11 @@ static void hfe_seek_track(struct image *im, uint16_t track)
131132 if (im -> hfe .is_v3 && im -> tracklen_ticks ) {
132133 /* Opcodes in v3 make it difficult to predict the track's length. Keep
133134 * the previous track's value since this isn't the first seek. */
135+ } else if (!im -> hfe .is_v3 && ff_cfg .hfe_rpm ) {
136+ im -> stk_per_rev = ((uint32_t )stk_ms (200 ) * 300 ) / ff_cfg .hfe_rpm ;
137+ im -> ticks_per_cell = ((sampleclk_stk (im -> stk_per_rev ) * 16u )
138+ / im -> tracklen_bc );
139+ im -> write_bc_ticks = im -> ticks_per_cell / 16 ;
134140 } else {
135141 im -> tracklen_ticks = im -> tracklen_bc * im -> ticks_per_cell ;
136142 im -> stk_per_rev = stk_sampleclk (im -> tracklen_ticks / 16 );
Original file line number Diff line number Diff line change @@ -1269,6 +1269,16 @@ static void read_ff_cfg(void)
12691269 ff_cfg .nav_scroll_pause = strtol (opts .arg , NULL , 10 );
12701270 break ;
12711271
1272+ /* HFE OVERRIDES */
1273+
1274+ case FFCFG_hfe_step :
1275+ ff_cfg .hfe_step = strtol (opts .arg , NULL , 10 );
1276+ break ;
1277+
1278+ case FFCFG_hfe_rpm :
1279+ ff_cfg .hfe_rpm = strtol (opts .arg , NULL , 10 );
1280+ break ;
1281+
12721282 /* MISCELLANEOUS */
12731283
12741284 case FFCFG_step_volume : {
You can’t perform that action at this time.
0 commit comments