100 Commits
Author SHA1 Message Date
Keir Fraser e157ca3585 Merge per-board msel_pins with user_pins
This allows users to modify pins that they are not using for MSEL
purposes. Additionally it allows any defined user pin to be used
for MSEL purposes. Specifically, this will allow user pin 6 to be
used as a fourth drive-select line on the Shugart bus.
2025-10-27 16:51:36 +00:00
Keir Fraser a9856039d3 Makefile: Remove old flash/serial targets 2024-12-10 11:02:02 +00:00
Keir Fraser 5d1d1ee516 dist: Create DFU files in addition to HEX 2024-12-10 11:02:02 +00:00
Keir Fraser 955ccb910d usb: Do not delay 500ms when mode-switching (USB disconnect/reconnect)
This is not required by the USB spec and in fact seems to make
re-connection *more* unreliable when connected via a USB hub.

Refs keirf/greaseweazle#338
2024-12-05 09:30:07 +00:00
Keir Fraser 23b19de571 Use raw strings for regexes; fixes SyntaxWarning: invalid escape sequence 2024-12-05 08:23:00 +00:00
Keir Fraser 98fc55679d gnumake: Provide cc_rule and as_rule constructors
Use these to dynamically construct a rule for at32f4/fpec.o
2024-11-21 15:53:41 +00:00
Keir Fraser b1fa16d429 DWC OTG: Fix an assertion check on rx buffer allocation 2024-11-03 15:22:29 +00:00
Keir Fraser 45821dee07 New intrinsic "unreachable()" to indicate unreachable code points
This allows better compiler optimisation, while also including an
ASSERT() for debug builds.

Refs #7
2024-11-03 10:26:15 +00:00
Keir Fraser c839984a5f Update to v1.6 2024-09-28 08:34:53 +01:00
Keir Fraser 8b8d4a61cf WRITE_FLUX: Hard-sector index detection
Expected sector timing is specified to the WRITE_FLUX command. This
allows detection of short sector times, which indicate the true
track start ("track index"). This allows write cueing as for
soft-sectored disks.
2024-09-28 00:58:30 +01:00
Keir Fraser 5b0857791f New delay parameter: index_mask
Allows configuration of post-trigger INDEX mask time in microseconds
(0-65535). Some drives may need much longer than the default, if
there is sensor-switch bounce on trailing edge of the INDEX pulse.

Fixes keirf/greaseweazle#7
2024-09-24 18:38:36 +01:00
Keir Fraser 1da90a030d github: Update workflow actions to latest versions 2024-09-23 12:24:27 +01:00
Keir Fraser d45f4243f2 Implement asynchronous operation delays between seek/head/read/write
Also implement the pre- and post-write delays required by many floppy
drive specs.

Refs keirf/greaseweazle#491
2024-09-23 12:23:41 +01:00
Keir Fraser 2b1c541380 Remove arbitrary 100-cylinder constraint on seek commands. 2024-01-30 16:41:16 +00:00
Keir Fraser 4b5db978e9 Update to v1.5 2023-12-19 07:17:48 +00:00
Keir Fraser 191d68f41b usb: Fix device_qualifier descriptor length
The descriptor was missing the bReserved field, which must be zero.
This resulted in an out-of-bounds array copy when transmitting the
device_qualifier descriptor, and possible transmission of garbage
for the bReserved field.

This is based on PR #5 created by kimstik@github
2023-10-03 18:41:36 +01:00
Keir Fraser b41091017c Fix GCC 12 infinite loop in strlen
Strlen was jumping to strlen as part of -ftree-loop-distribute-patterns.
Seems this sort of issue can be common and generally fixed with
-fno-builtin. However, some of those optimizations may be useful and I
don't think our semantics for the functions are wildly different than
the standard, so I'm fixing this surgically with
-ftree-loop-distribute-patterns to just util.c. That may be the wrong
call, so if this bites us again, let's go more aggressive.

[Above is commit message from FlashFloppy, which also references
FlashFloppy GitHub issue 660.]
2023-10-03 18:23:57 +01:00
Keir Fraser 2d1a14247b GCC12: Convert array comparisons to pointer-to-first-element comparisons.
These are equivalent, but the former is deprecated in C++20 and warned by GCC12.

[The above message is from an earlier equivalent commit in FlashFloppy.
It is also equivalent to part of PR #5 created by kimstik@github]
2023-10-03 17:57:21 +01:00
Keir Fraser 12c2c357c8 STM32F1, AT32F4, USB: Simplify ISTR handling
We should only clear set bits, and we should only do that in the
ISTR central dispatcher.
2023-08-17 17:38:01 +01:00
Keir Fraser c5b6894a64 CMD_GET_INFO: New field 'usb_buf_kb' 2023-08-17 17:09:44 +01:00
Keir Fraser 34daf529c7 Allow 16-bit cylinder number. 2023-08-16 19:56:34 +01:00
Keir Fraser 1a35995046 AT32F403A: Extend SRAM to 224kB 2023-08-16 19:56:22 +01:00
Keir Fraser 1b742920a5 Update to v1.4 2023-07-22 21:50:52 +01:00
Keir Fraser 80b899925c AT32F4: Support new board V4.1 2023-07-21 11:01:58 +01:00
Keir Fraser c0bc1b190a Upgrade gh-actions to Ubuntu 22.04
The newer GCC does a better job of reducing code size.
2023-07-17 18:23:55 +01:00
Keir Fraser 0a38ab8846 V4: Further restrict duplication of Act LED to TXO
Only the original V4 board requires this. The V4.1 board has a pin
header for the original Act signal.

Also make it clear that the duplication happens only on 403(A)
MCUs. It is not possible on 415 as it affects USB operation.
2023-07-14 14:26:06 +01:00
Keir Fraser f2a0ed4094 STM32F7, AT32F4: Replace open-coded references to PB13 with {gpio_led, pin_led} 2023-07-14 14:26:01 +01:00
Keir Fraser ee02a86e80 time: Proactive pull from FlashFloppy for 32-bit timebase update period
Make the period proportional to systick rate by updating the timebase
every 2^23 systicks. This will always be safe, no matter how high the
systick rate.
2023-07-14 14:24:03 +01:00
Keir Fraser ca7447ceac timer: Proactive pull from FlashFloppy for coarse-deadline handling
Set the coarse deadline only 1ms early, as 1ms is sure to be within
range of 2^16 systicks (at up to approx 500MHz core clock).
2023-07-14 14:18:28 +01:00
Keir Fraser f3a0110eea README.md: Update links 2023-06-03 15:21:12 +01:00
Keir Fraser 44ed7fca95 Update to v1.3 2023-02-18 09:22:05 +00:00
Keir Fraser 71dc5838bf usb: Handle GET_REQUEST (Device) as required by USB specification.
Fixes greaseweazle issue 282
2023-02-18 09:17:12 +00:00
Keir Fraser 42d38e8a9d Makefile: Fix the flash-to-device helper rules 2023-02-08 10:43:42 +00:00
Keir Fraser 09f777ea49 AT32F403A: Run main firmware at 216MHz. Clock USB from auto-calibrated HSI clock. 2023-01-05 10:30:42 +00:00
Keir Fraser a7cfcf0482 blinky: Fix serial baud rate. Should be 115200. 2022-11-15 07:56:27 +00:00
Keir Fraser 651bffae95 console: All chips run USART1 on APB2 at APB2 speed. 2022-11-14 16:58:48 +00:00
Keir Fraser eef5390657 Define AHB, APB1, APB2 bus speeds as numeric constants for all supported chips. 2022-11-14 16:56:57 +00:00
Keir Fraser 89c67939b6 at32f4: Make the f4.h header file stand alone. 2022-11-14 16:46:29 +00:00
Keir Fraser f570dd5cfe github: Rewrite release creation rules 2022-11-07 08:26:50 +00:00
Keir Fraser db12862cc6 github: Use latest supported actions and rewrite usage of obsolete set-output command 2022-11-06 19:53:46 +00:00
Keir Fraser 0854bebcea Update to v1.2 2022-07-18 10:50:43 +01:00
Keir Fraser fd07efedcf GETINFO_FIRMWARE: Return MCU information 2022-07-18 10:29:43 +01:00
Keir Fraser 8ecea89ea8 Support AT32F403A MCU on F1 board 2022-07-18 09:42:58 +01:00
Keir Fraser bd91422c2d Support AT32F403A MCU on V4 board 2022-07-18 09:42:30 +01:00
Keir Fraser 0d3b45c2ad Makefile: Replace rsync with individual mkdir in pattern rule
Also add + to mkdir lines to fix --dry-run.
2022-07-10 10:31:08 +01:00
Keir Fraser b6f2860726 RELEASE_NOTES: Fix Greaseweazle VID 1201 -> 1209.
Fixes #2
2022-04-21 11:02:22 +01:00
Keir Fraser b593fa973c Reserve BUSTYPE ID 3 for Adafruit_Floppy project 2022-04-19 21:30:45 +01:00
Keir Fraser dda1748080 Remove 'v' prefix from version number in packaging. 2022-04-03 17:01:16 +01:00
Keir Fraser 73e20a36eb Clean up the assembly of update files a little. 2022-03-15 18:01:31 +00:00
Keir Fraser 324be08fe9 Makefile: Get rid of dodgy use of $eval within rules. 2022-03-15 13:18:33 +00:00
Keir Fraser 1f6d6c7dcf Modify build system to place artefacts in separate out/ folder 2022-03-15 12:48:35 +00:00
Keir Fraser 3f81408812 Update to v1.1 2022-02-27 11:31:02 +00:00
Keir Fraser 04343e64e3 GET_INFO: New subtypes GET_DRIVE and GET_CURRENT_DRIVE 2022-02-26 15:48:09 +00:00
Keir Fraser ebe7a03a37 CMD_READ_FLUX: Do not timeout on missing Index if read doesn't terminate on Index. 2022-01-31 08:05:27 +00:00
Keir Fraser c2441a7ae3 CMD_GET_PIN: Accept all pins accepted by CMD_SET_PIN. 2022-01-25 17:12:36 +00:00
Keir Fraser f88ccf9ef9 github workflows: Remove obsolete prerequisites. 2022-01-25 17:12:36 +00:00
Keir Fraser 4697163304 V4: Duplicate Act LED on TX pin when not in debug mode.
Fixes #1
2022-01-25 17:12:31 +00:00
Keir Fraser b4227182b3 Create a plain-text README file for release distribution. 2021-12-27 09:14:36 +00:00
Keir Fraser 3f8a8301e7 Update to v1.0 2021-12-26 12:30:42 +00:00
Keir Fraser 0669e6c13a Change project name and fix up GitHub CI/CD 2021-12-26 12:20:18 +00:00
Keir Fraser 554e078967 Remove tools from the new firmware repository. 2021-12-26 11:55:26 +00:00
Keir Fraser 4b730495f5 Repo names renamed to all lower case 2021-12-23 10:53:36 +00:00
Keir Fraser 32e3c9d85d Image: New helper method, max_cylinder() 2021-12-22 19:24:22 +00:00
Keir Fraser c06ea0ee76 SCP: Import Supercard Pro generated C64 images with halftracks. 2021-12-22 19:24:17 +00:00
Keir Fraser c7aec389e8 Various bugfixes for format handling in conjunction with raw (HFE,SCP,KF) files 2021-12-16 11:08:44 +00:00
Keir Fraser b134ae8da7 Update to v0.33 2021-12-15 13:36:24 +00:00
Keir Fraser 4236aa11b0 Implement IPF auto-verification 2021-12-15 12:51:47 +00:00
Keir Fraser b181fd3153 Acorn image types ADS ADM ADL 2021-12-15 08:38:27 +00:00
Keir Fraser 089ea42114 Acorn ADFS format specifiers 2021-12-15 08:24:26 +00:00
Keir Fraser c96ba1aa69 Support read/write Acorn DFS (single density) images. 2021-12-14 17:32:34 +00:00
Keir Fraser d7b926f895 Suport read/write Amiga HD ADF files 2021-12-14 14:33:31 +00:00
Keir Fraser 077110cdaa Update to v0.32 2021-12-14 10:22:53 +00:00
Keir Fraser bf613ebe7d D81 default format type. Add format option list to gw read and write help texts. 2021-12-14 08:45:06 +00:00
Keir Fraser d3752d9563 More IBM format specifiers. 2021-12-13 15:58:56 +00:00
Keir Fraser 753d4f5a00 New Commodore 1581 format specifier and *.D81 image support 2021-12-13 15:49:05 +00:00
Keir Fraser f76a2c0037 New Atari ST format specifiers 2021-12-13 15:30:11 +00:00
Keir Fraser 7b8bf48702 New --format specifier for IBM tracks ibm.720 and ibm.1440 2021-12-13 09:07:31 +00:00
Keir Fraser a938da99ac intrinsics: Remove unused definitions 2021-11-11 08:39:34 +00:00
Keir Fraser 884461fdf0 Update to v0.31 2021-10-08 07:54:17 +01:00
Keir Fraser 08916f8129 STM32F1, AT32F4: Dynamic USB buffer sizing.
Also tweak firmware update with useful error messages if updates
don't fit in SRAM (bootloader updates) or Flash (main firmware updates).
2021-10-04 10:35:09 +01:00
Keir Fraser 6f45c298ad blinky: LED permanently illuminated for a working Low-Density device. 2021-10-02 18:00:56 +01:00
Keir Fraser 67e888a61f gw: Clean up "unknown file suffix" message a little. 2021-10-02 17:47:31 +01:00
Keir Fraser a202a64124 blinky: Make blinky more useful for Low-Density devices.
It will fail, but serial will show whether only expected missing
peripherals fail. Correct Flash/SRAM is tested.
2021-10-02 17:44:04 +01:00
Keir FraserandGitHub 418fc8cbb8 Merge pull request #121 from barbeque/master
Present list of supported image types when asking for one that doesn't exist
2021-09-03 07:58:21 +01:00
Keir Fraser 7f6b8d4748 Update to v0.30 2021-08-12 13:42:50 +01:00
Keir Fraser ec553a0d4e Support new board V4 Slim 2021-08-12 13:35:28 +01:00
Keir Fraser 4102d57e97 F7 Slim: Support /DSKCHG signal as "pin 34" 2021-08-09 11:41:20 +01:00
Keir Fraser a40c2f247a Update to v0.29 2021-07-29 10:02:52 +01:00
Keir Fraser 91259d80a8 scp_info: Fix large flux values. Improve the plot. 2021-07-20 21:41:40 +01:00
Keir Fraser 7fca1c9315 Implement 64:32->32 division and use it to avoid arithmetic overflow in time_from_samples() 2021-07-20 14:32:01 +01:00
Keir Fraser de22d1b0c3 Fix memory leak in C optimised Python extension. PyList_Append() makes a new item reference.
Thanks to Andre Eberhard / aewatt95.
Refs #105
2021-07-19 13:36:04 +01:00
Keir Fraser 8f88cd94ef Purchase ebay link 2021-07-02 13:38:33 +01:00
Keir Fraser 5b79e9e79b F1 Plus: Support testmode 2021-06-30 15:58:04 +01:00
Keir Fraser 4b82ef4741 gw bandwidth: Check integrity of USB comms during bandwidth test. 2021-06-28 14:27:34 +01:00
Keir Fraser b5a02294ce New board: F1 Plus (Unbuffered) 2021-06-27 19:18:17 +01:00
Keir Fraser b30db8e3a0 Update to v0.28 2021-06-22 10:34:24 +01:00
Keir Fraser 910a5635b4 AT32F415: Increase clock speed to 144MHz 2021-06-22 10:27:16 +01:00
Keir Fraser 5f05d8f487 AT32F403: Work around broken double-buffered endpoints using an ISR to
quickly post new buffers.
2021-06-22 09:51:58 +01:00
Keir Fraser 9dac3e110e AT32F403: Increase core clock speed to 144MHz. 2021-06-22 09:51:17 +01:00
Keir Fraser c894f9f02b New firmware command CMD_NOCLICK_STEP. Used by WinUAE floppy bridge. 2021-06-09 15:54:17 +01:00