Commit graph

1141 commits

Author SHA1 Message Date
b3f96af97a
Fix a trivial typo in README 2024-04-15 13:59:31 -05:00
Keir Fraser
0351c481c0 FF.CFG: Get rid of single quotes around example config values
Single quotes are not accepted by the parser, so the extra punctuation
is unnecessary and confusing verbiage.

Refs #865
2024-03-19 10:31:56 +00:00
Keir Fraser
ca7144b454 Add an example IMG.CFG for the ZX Spectrum FDC-1 / Sandy FDD2 interfaces 2024-02-29 14:47:39 +00:00
Keir Fraser
e829d827da github: Update workflow actions to latest versions 2024-02-05 15:08:48 +00:00
Keir Fraser
c6310b803b Update to v3.42 2024-01-11 13:53:15 +00:00
Keir Fraser
3946e7f7a6 adf: More accurate value for write_bc_ticks 2024-01-11 13:26:58 +00:00
Keir Fraser
18ecd15be9 qd: Use sampleclk_ns() rather than hardcoding a sample count value 2024-01-11 13:26:12 +00:00
Keir Fraser
ae4245018d floppy: Gently de-jitter/precomp WDATA line
This can be enough to handle heavily-precompensated marginal write
signals.

Fixes #861
2024-01-11 13:16:30 +00:00
Keir Fraser
cbbac4e3c2 Add an example IMG.CFG configuration for GRiD Compass
Refs #862
2024-01-11 09:38:08 +00:00
Eric Anderson
69e2c545a3 hfe: Process HFEv3 opcodes when writing 2023-10-29 08:10:35 +00:00
Eric Anderson
959fd9a4a0 img, dsk: Stream writes to flash
This starts writes for larger sector sizes earlier, allowing large
sectors to be supported independent of the write_bc size.
It also allows some write latencies to be hidden by the time it takes to
receive the data.

This also makes better use of write_bc for buffering. Waiting for a full
sector means that space in write_bc is _not_ used for buffering
processing delays of the sector. Draining the sector data earlier frees
space earlier from the buffer.

[keirf: Minor tweaks and refactoring.]
2023-09-17 22:16:53 +01:00
Keir Fraser
da6188ae7e hfe: Clarify HFEv3 tracklen "caching" in hfe_seek_track(). 2023-09-17 22:04:16 +01:00
Keir Fraser
9ac66c313e hfe: On track setup, start_bc = start_ticks * max_bc / max_ticks
In essence, we take the rotational position from index as a fraction
(start_ticks/max_ticks) and start the bitstream at the same position.
This is especially important for HFEv3 where the track data may be
elongated by opcodes.

Original commit message by ejona86:

hfe: Compensate for opcodes during seeking

This reduces the worst-case observed skew from 3 ms to 50 us. There is a
risk that in the future an opcode is added that is numerous and not
evenly distributed, but that seems unlikely and we'd need to swap to a
more complicated/advanced scheme.
2023-09-17 22:03:09 +01:00
Keir Fraser
25742f6ecf util: New function udiv64(): 64/32 -> 32q 2023-09-17 08:31:59 +01:00
Eric Anderson
0c423fb9de dsk: Use constant CHUNK_SIZE
[keirf: Renamed BATCH_SIZE to CHUNK_SIZE.]
2023-09-16 21:35:43 +01:00
Eric Anderson
548c791cc2 img: Use constant CHUNK_SIZE
[keirf: renamed BATCH_SIZE to CHUNK_SIZE.]
2023-09-16 21:34:50 +01:00
Keir Fraser
11a2ea9e2c debug: Cut USBH trace verbosity to fix the build (firmware binary too large)
[keirf: Leave the trace messages intact in debug builds for now.]
2023-09-16 21:30:23 +01:00
Keir Fraser
e2f010c648 New logging macro log() prepends a LOG_PREFIX to log output 2023-09-16 21:27:30 +01:00
Eric Anderson
b34cb95543 Share debug strings between IMG and DSK 2023-09-16 21:15:38 +01:00
Keir Fraser
cc67ce5903 Merge very short fluxes when processing WDATA
Fluxes shorter than half a bitcell are definitely invalid and it
is reasonable to assume they are bogus. Instead of pushing a 1
bit for very short flux, instead merge the flux into the next.

Refs #827
2023-09-16 21:09:51 +01:00
Eric Anderson
dea7a6ae4d HFEv3: Reuse tracklen_ticks and stk_per_rev from previous track
This is a better guess than trying to account for, or totally
ignoring, opcode overhead every time we seek to a new track.

Note that this commit also initialises tracklen_ticks earlier, even
for regular HFE image files.

[keirf: commits squashed and commit messages amended]
2023-09-16 18:12:23 +01:00
Eric Anderson
78f93ea431 Avoid fake_fired for realtime seek/write
fake_fired inserts an index pulse to avoid host-side timeouts. However,
the realtime options don't carry any risk of host-side timeouts because
the index pulses occur at the normal rate.

index-suppression=no causes behavior like write-drain=eot, since when
fake_fired is set during writing it also changes restart_pos. This
commit disables that behavior for write-drain=realtime, but not for
write-drain=instant which still carries timeout risk. Some users may be
depending on the implicit behavior.
2023-09-10 18:06:16 +01:00
Eric Anderson
9308d30b2e Upgrade gh-actions to Ubuntu 22.04
The newer GCC does a better job of reducing code size.
2023-07-17 18:18:49 +01:00
Keir Fraser
5e3e3a227f HFE, QD: Clarify respective rdata_flux() functions 2023-07-17 18:13:37 +01:00
Keir Fraser
fb3c7c03d8 Update to v3.41 2023-07-14 13:58:47 +01:00
Keir Fraser
5067e622ad time: Simplify calculation of 32-bit timebase update period
There is no need to convert to and from milliseconds.
2023-07-14 08:04:52 +01:00
Keir Fraser
7fd32fe437 LCD: Don't bother waiting for RAM to clear before enabling backlight
It's pointless since the display is so slow to update anyway. It
just delays full initialisation of the firmware.
2023-07-14 07:53:12 +01:00
Keir Fraser
fb58d39502 AT32F415: Fix timer logic for AT32F415 running at STK_MHZ=18
This MCU runs timers on a 16-bit hardware timer. Since the next
timer deadline may be longer than 65535 ticks, we set a coarser
deadline to fire before the actual event: When this triggers,
we expect to set a fine deadline to run the actual timer handler.

The problem is that this coarse deadline is set 5ms early, and this
*also* overflows 65535 ticks at 18MHz. An assumption in the timer
arithmetic gets broken and we end up setting a coarse-grained timer
deadline way in the future. This breaks the 32-bit timebase (which
itself relies on somewhat timely timer to extrapolate from the 24-bit
systick hardware timer). And all random hell breaks loose.

The solution is simple: Set the coarse deadline only 1ms early.

Refs #808
2023-07-13 18:30:38 +01:00
Keir Fraser
8a150d8750 Typo in release notes 2023-06-27 12:54:58 +01:00
Keir Fraser
47dbbdc1ec Update to v3.40 2023-06-27 12:48:15 +01:00
Keir Fraser
2935de98de xdf: Fix writes to side 1 (with bitcell-granularity track skew).
Fixes #802
2023-06-25 08:37:09 +01:00
Keir Fraser
fb49e98256 HFE, QD: Subdivide NFA regions at a smaller granularity
1. This makes the DMA ring less lumpy and potentially quicker to fill
   since the worst-case time values are reduced.
2. The tail value at the end of a sub-divided chain is guaranteed
   to be greater than 2^14 sampleclk ticks. This should make it
   easier to interrupt during the tail period to re-enable RDATA
   output.
3. By detecting overflow at 2^15 ticks we prevent a hard overflow
   at 2^16 ticks earlier in the {hfe,qd}_rdata_flux processing loop.

The motivation for this NFA work is the game Repton Thru Time for
the BBC Micro. An HFE dump of the original game disk has a long NFA
(>100ms) on Track 1.
2023-06-20 16:29:51 +01:00
Keir Fraser
9521a79ad9 HFE, QD: Subdivide long NFA regions so that the 16-bit timer does not overflow 2023-05-31 17:32:24 +01:00
Keir Fraser
82aaae8bf5 led_7seg: Add a code comment for the mapping of bit positions to segments. 2023-04-19 12:55:33 +01:00
Keir Fraser
484af134e6 QD: Add documentation for interfacing to ZX Spectrum Clive Drive 2023-04-03 08:35:55 +01:00
Keir Fraser
faf9137bdb QD: Re-indent mk_qd script and add new parameter to round up byte values to block size. 2023-03-31 14:50:19 +01:00
Keir Fraser
38aa3c9000 Fix typo in release notes. 2023-03-28 08:19:41 +01:00
Keir Fraser
007de2c8d6 LCD: Completely blank display when backlight is off.
Refs #774
2023-03-24 10:15:05 +00:00
Keir Fraser
410a7203cc QD: Reduce motor spinup to 1 second (previously 2 seconds) 2023-03-22 16:48:32 +00:00
Keir Fraser
3e219840d9 IMG.CFG: Update interleave for all disks for Roland MC-x line.
Confirmed by Chris Poacher.
2023-03-14 21:26:50 +00:00
Keir Fraser
38cf13cf23 IMG.CFG: Roland MC-500 2023-03-12 17:55:05 +00:00
Keir Fraser
c885f2cb49 release.yml: Fix RELEASE_NOTES link 2023-03-01 12:39:12 +00:00
Keir Fraser
e20b845c31 Update to v3.39 2023-03-01 12:32:48 +00:00
Keir Fraser
47c657dc34 HFEv3: Fix and simplify opcode handling
This reworking also naturally allows OP_Rand to follow OP_SkipBits,
as required for non-byte-sized weak regions.
2023-02-09 20:24:16 +00:00
Keir Fraser
e8c0942594 Makefile: Fix the flash-to-device helper rules 2023-02-08 11:01:50 +00:00
Keir Fraser
d572d26552 README.md: Banner picture 2023-02-05 16:42:37 +00:00
Keir Fraser
5be461fe26 IMG.CFG: New per-track parameter "img_bps"
Specifies bytes occupied per sector in the IMG image file.

Allows padding of short sectors for uniformly-indexed fiels.

Refs #751
2023-02-01 08:58:30 +00:00
Keir Fraser
13d743d9b5 mk_qd.py: Allow QD image lead-in to be configured on command line 2023-01-30 18:01:25 +00:00
Keir Fraser
a9b8f8d45b IMG.CFG: Fix scoping of per-track sector sizes.
Refs #751
2023-01-30 17:59:52 +00:00
Keir Fraser
d44a5e72ee FF.CFG: New option notify-volume= for notifying on insert/eject via speaker.
Refs #716
2023-01-17 16:01:26 +00:00