Commit Graph

61 Commits

Author SHA1 Message Date
Stephen Heumann
e1bb505f53 Tweak makefile to auto-generate macros if necessary. 2019-07-17 09:34:31 -05:00
Stephen Heumann
617c805160 Bump version of init and CDev to 1.0. 2019-07-15 20:26:22 -05:00
Stephen Heumann
524786856c Give a warning when using NetDisk with an old Marinetti version. 2019-07-15 20:13:11 -05:00
Stephen Heumann
ea0f70fc94 Make sure Marinetti is available before using NetDisk.
Also, add NetDiskError values used by the disk browser.
2019-07-15 17:12:27 -05:00
Stephen Heumann
c4a1733c25 Update system requirements in README. 2019-07-05 23:05:56 -05:00
Stephen Heumann
6c9d425484 Add LICENSE file. 2019-07-05 23:04:24 -05:00
Stephen Heumann
5956584cb1 Show NetDisk icon during boot. 2019-04-24 19:44:04 -05:00
Stephen Heumann
17eb3437c3 Update README to include discussion of the Archive.org Disk Browser.
Also, add mention of a possible compatibility issue with GUPP.
2019-04-20 13:58:01 -05:00
Stephen Heumann
a982557421 Update version numbers. 2019-04-20 13:53:10 -05:00
Stephen Heumann
f524630f1a Work around Marinetti bug 57.
This could cause Marinetti to return more data than it should, starting with valid data but then including corrupt data.

The workaround I'm using is to have Marinetti return a new handle and then copy the data out of it, using the size of the handle as the true size of the data that was read. Because of details of how Marinetti works, that size is correct.

This shouldn't have a major performance impact, because Marinetti would internally read data into a new handle and then copy it anyway.
2019-04-19 17:34:18 -05:00
Stephen Heumann
08fe7fe4b6 Add support for DiskCopy 4.2 image format. 2018-10-17 20:14:40 -05:00
Stephen Heumann
28367e196e Update README. 2018-10-08 22:20:46 -05:00
Stephen Heumann
11c47d0de3 Bump version numbers. 2018-10-08 21:23:00 -05:00
Stephen Heumann
65c6c68936 HTTP header parsing tweaks.
These should slightly improve performance.
2018-10-08 21:18:32 -05:00
Stephen Heumann
21465b7f7a Adjust format pop-up menu UI. 2018-10-08 18:14:12 -05:00
Stephen Heumann
f912d9230e Do actual auto-detection of DOS-order versus ProDOS-order.
The basic approach is just to see if GS/OS can understand the disk (i.e. if a VolumeGS call succeeds), and if not switch the order. We currently start with ProDOS order, then switch to DOS order if necessary. This is only currently done for 140k images.
2018-10-07 23:59:00 -05:00
Stephen Heumann
dcc069d5b8 Add support for image format selection and detection.
At the moment, the auto-detection of DOS vs. ProDOS order is just based on the size of the image (i.e. 5.25" images are DOS-order, anything else is ProDOS-order).
2018-10-07 22:22:09 -05:00
Stephen Heumann
d2f7ec3b64 Support DOS-order sector data in images.
Currently, this is only enabled for 2mg images where the header specifies DOS order.
2018-10-07 17:41:19 -05:00
Stephen Heumann
797b8d247f Add README. 2018-10-03 17:41:52 -05:00
Stephen Heumann
6f5f57c422 Support spaces in URLs.
This applies to both directly entered URLs and redirects. At least some servers (e.g. bit.ly) will send un-percent-encoded URLs that may contain spaces in the Location header.

Spaces are now percent-encoded in the HTTP request. Other characters that should be percent-encoded still aren't, but I think many servers can accept them as-is.
2018-10-03 17:40:08 -05:00
Stephen Heumann
92649e33ee Enhance mounturl command-line utility.
It now accepts a flag "-c" to disable caching, and can also print meaningful error messages.
2018-10-02 18:04:22 -05:00
Stephen Heumann
1ce645ec0d Add flag controlling whether to use cache. 2018-10-01 22:42:33 -05:00
Stephen Heumann
55b199f83b Add GS/OS block cache support. 2018-10-01 21:49:00 -05:00
Stephen Heumann
314f408b5e Report a disk switch if the length of the file changed.
Currently, the logic for this doesn't re-detect the file type, and it may not work correctly with some 2mg files, but it should work in most cases.
2018-10-01 18:18:34 -05:00
Stephen Heumann
28fd51d175 If the URL specifies HTTPS or FTP, offer to use HTTP instead. 2018-09-30 22:47:43 -05:00
Stephen Heumann
10cb54df5f Give meaningful error messages. 2018-09-26 00:17:31 -05:00
Stephen Heumann
fdd2657722 Use new icon for the CDev. 2018-09-25 22:20:46 -05:00
Stephen Heumann
dd228dff2d Add wrappers for GS/OS system service calls, and call SET_DISKSW on mount.
I think there should still be some disk-switched logic elsewhere, based on the somewhat complicated rules for it in the documentation, but at least this provides a notification when a new disk is mounted.
2018-08-16 21:39:23 -05:00
Stephen Heumann
3f3c14b8a1 Do sanity checks of input values for Driver_Read. 2018-08-15 21:56:36 -05:00
Stephen Heumann
8532c14ee1 Detect errors and timeouts when reading data from server. 2018-08-15 21:05:09 -05:00
Stephen Heumann
64ad28a740 Eject all our disks when the network goes down. 2018-08-15 19:46:23 -05:00
Stephen Heumann
525dbbb1c5 Include the device number as an output value in the MountURLRec structure.
This allows callers to conveniently access the newly-mounted device.
2018-08-14 22:40:42 -05:00
Stephen Heumann
85cb0c5971 CDev and mounturl tweaks.
The CDev connects to the network if not already connected, and it displays the arrow cursor in the "no NetDiskInit" alert from MachineCDEV.

The mounturl utility now has meaningful return values.
2018-08-14 20:44:08 -05:00
Stephen Heumann
d30dfd8631 Before sending a request, check if the remote side has closed the connection.
This avoids sending out requests that can't work, and also gives an opportunity to process packets from the old connection while it's still logged in, which may avoid some strange behavior.
2018-08-14 18:35:11 -05:00
Stephen Heumann
587d0c4e7e Consistently set transfer count when doing Get_Device_Status. 2018-08-13 18:40:24 -05:00
Stephen Heumann
77f16625c6 Report our devices as "MFM drives" so that Finder shows a 3.5" floppy icon.
Previously, we had actually been (erroneously) using the code for a generic hard drive, rather than a generic floppy as intended. The generic floppy code shows a 5.25" floppy icon, which seems less appropriate, so now we use the same code as 3.5" SuperDrives instead.
2018-08-13 18:36:24 -05:00
Stephen Heumann
2092e48694 Add support for reporting the disk's block count. 2018-08-13 01:28:32 -05:00
Stephen Heumann
084d44042a Prevent the CDev from running if NetDiskInit is not present. 2018-08-12 22:44:05 -05:00
Stephen Heumann
f3519b3eef Work around some cases where parts of LE caret may flash out of sync.
This could happen after the caret was partially obscured by the alert window.
2018-08-12 22:25:50 -05:00
Stephen Heumann
9fc13e108a Implement image mounting in the CDev. 2018-08-12 22:01:25 -05:00
Stephen Heumann
4dbfd93179 Implement request procedure for mounting a disk by URL. 2018-08-12 20:51:09 -05:00
Stephen Heumann
8b09d6bb7d Switch to using a struct for the MountURL DControl call.
This allows us to return a better error code and provides for future extensibility.
2018-08-12 18:45:08 -05:00
Stephen Heumann
8fe8bbdf7e Update .gitignore. 2018-08-12 17:59:34 -05:00
Stephen Heumann
4ac24d75f4 Keep our driver installed on switch back from P8. 2018-08-12 15:08:26 -05:00
Stephen Heumann
2d00030eba Add framework for NetDisk CDev.
The CDev currently runs and displays the UI, but doesn't actually do anything.
2018-08-11 16:33:18 -05:00
Stephen Heumann
610a638e5c Switch to unified set of error codes. Also, do more checks for 2IMG files. 2018-08-11 01:53:53 -05:00
Stephen Heumann
ccc9594412 Add support for ejecting NetDisk volumes. 2018-08-10 22:40:07 -05:00
Stephen Heumann
2670da4f59 Add basic support for 2img format. 2018-08-10 19:51:21 -05:00
Stephen Heumann
d718d82ff1 Initial support for mounting and reading a remote filesystem. 2018-08-10 17:53:09 -05:00
Stephen Heumann
e6b1c304d3 Split out non-trivial driver ops into separate functions. 2018-08-10 00:12:24 -05:00