mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.12k stars 66 forks source link

Mount custom disk url images read/write #323

Closed jcgraybill closed 1 week ago

jcgraybill commented 1 week ago

👋 Mihai!

I've noticed that the behavior of custom disk urls seems to have changed at some point, such that they now mount read-only. This is a bummer, because some old Macintosh programs refuse to launch from a read-only volume.

Here's an example:

https://infinitemac.org/run?cdrom=https://img.classicmacdemos.com/starcraft.dsk&machine=Power+Macintosh+9500&ram=32M&saved_hd=true

I seem to remember these working at some point in the past - was this maybe a recent intentional or unintended change? The query parameter name "cdrom" certainly implies read-only, I guess. Maybe there could be a separate parameter that specified a read/write hard-disk-like volume to mount?

mihaip commented 1 week ago

The change happened in https://github.com/mihaip/infinite-mac/commit/0a8d13f2eeb2cfbd3f1955ff4ef320f1b7968b3a#diff-0e8c6ec6010b48e2c846822f664048823614386323b53aaf58dc371bf2ce55a8L908 (the addition of * to indicate a read-only volume), and as I best recall it was for technical correctness as opposed to being motivated by an actual compatibility issue. Will try reverting it and see what breaks.

mihaip commented 1 week ago

Looks like at least the 8.1 startup CD requires to be read-only, otherwise you get this:

Screenshot 2024-06-22 at 17 51 26@2x

Will add a heuristic based on extension for now (.dsk gets mounted read-write).