emularity icon indicating copy to clipboard operation
emularity copied to clipboard

Specify multiple disks using vmac-colormac?

Open gingerbeardman opened this issue 4 years ago • 12 comments

Forgive me if this is in the docs(?)

How can I set two disks when using Emulator: vmac-colormac on Internet Archive?

  1. customised System 7 start-up disk
  2. External CD-ROM data disk

It's the type of game that checks for it's files on the external disk.

I've seen examples of PCE using two disks, but not vmac-colormac.

Any help appreciated.

gingerbeardman avatar Jul 28 '21 16:07 gingerbeardman

Any thoughts on this?

gingerbeardman avatar Oct 31 '21 11:10 gingerbeardman

I am in nearly this same situation. Trying to use the loader to load a HDD image of 7.0.1 and also a CD Iso.

Coming up a blank on it.

minivmac2.js here.

MarkYoungIW avatar Feb 14 '22 19:02 MarkYoungIW

The command–line arguments for Mini vMac are documented online at https://www.gryphel.com/c/minivmac/control.html#command_line. When using Emularity directly, you can use mountFile for each file you need, and then mention both file names in the extraArgs. The examples only do this for one file, but doing it for two would look something like this:

    var emulator = new Emulator(document.querySelector("#canvas"),
                                null,
                                new NP2Loader(…,
                                              NP2Loader.mountFile("foo.dsk",
                                                                  NP2Loader.fetchFile("Disk Image 1",
                                                                                      "examples/foo.dsk")),
                                              NP2Loader.mountFile("bar.dsk",
                                                                  NP2Loader.fetchFile("Disk Image 2",
                                                                                      "examples/bar.dsk")),
                                              NP2Loader.extraArgs(["foo.dsk", "bar.dsk"]),
                                             ));

When uploading an item to the Internet Archive, then both disk images should be downloaded automatically provided they both have the same extension and you specified the emulator_ext metadata item correctly.

db48x avatar Feb 14 '22 20:02 db48x

Not sure what to make of it. Both the Hard Drive Image and the CD image upload OK, and the Hard Drive image runs (loading up System 7.0.1), but it immediately produces:

Message Type (C) to continue Open Failed I could not open the disk image

And after this it only shows the HD image mounted, and not the CD image. Both images load and run fine in the windows version of the emulator.

I did try changing the file extensions to .dsk .img for both files in their zips and my config but exactly the same.

My config is:

      NP2Loader.mountZip("minivmac",
        NP2Loader.fetchFile("Mac ROM files",
          "macii.zip")),
     NP2Loader.mountZip("minivmac/test7",
        NP2Loader.fetchFile("Hard Disc Image",
          "disk/test7.zip")),         
     NP2Loader.mountZip("minivmac/EcoDisc",
        NP2Loader.fetchFile("CD Rom (156.5MiB)",
          "disk/EcoDisc.zip")),
 NP2Loader.extraArgs(["/emulator/minivmac/test7/test7.dsk", "/emulator/minivmac/EcoDisc/EcoDisc.iso"]),
     ));  

MarkYoungIW avatar Feb 14 '22 23:02 MarkYoungIW

As a troubleshooting step, can you go to the javascript console and type FS.readdirSync('/emulator/minivmac/EcoDisc') and paste what it outputs?

db48x avatar Feb 15 '22 00:02 db48x

Strange. I am getting:

Uncaught Type Error: FS.readdirSync is not a function at :1:4

Before I input the command I am getting this though:

/favicon.ico:1 Failed to load resource: the server responded with a status of 404 () 6The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. <URL> minivmac2.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu openAudioContext @ minivmac2.js:1 minivmac2.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu (anonymous) @ minivmac2.js:1 minivmac2.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu (anonymous) @ minivmac2.js:1 minivmac2.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu (anonymous) @ minivmac2.js:1 minivmac2.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu (anonymous) @ minivmac2.js:1 minivmac2.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu (anonymous) @ minivmac2.js:1 DevTools failed to load source map: Could not load content for https://festive-mestorf-c7bee5.netlify.app/browserfs.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

MarkYoungIW avatar Feb 15 '22 10:02 MarkYoungIW

To add complexity to the problem, my goal is to do this on Internet Archive with their in-browser emulation

gingerbeardman avatar Feb 15 '22 11:02 gingerbeardman

Sorry, just FS.readdir('/emulator/minivmac/EcoDisc'). The errors about audio contexts, favicon.ico, and source maps don’t matter.

db48x avatar Feb 15 '22 15:02 db48x

It came back with:

ErrnoError {node: undefined, errno: 2, code: 'ENOENT', message: 'No such file or directory', setErrno: ƒ, …}

When I attempted FS.readdir('/emulator/minivmac'), it then came back with:

(5) ['MacII.ROM', 'test7', 'ecodisc', '.', '..'] 0: "MacII.ROM" 1: "test7" 2: "ecodisc" 3: "." 4: ".."

I am not sure why, but it seems it doesn't like the capital letters when it comes down to the disc images, but it doesn't mind them for the rom images. For my part now I have just changed everything to lowercase and the problem is solved. It has now loaded up the iso perfectly.

Thank you for all the help.

MarkYoungIW avatar Feb 15 '22 16:02 MarkYoungIW

Well, I didn’t expect that. I see from the documentation that we could pass in an optional name. I guess we could use that to override the default if we wanted.

Glad you got it working though.

db48x avatar Feb 16 '22 00:02 db48x

To add complexity to the problem, my goal is to do this on Internet Archive with their in-browser emulation

You should just be able to do that. What have you tried?

db48x avatar Feb 16 '22 00:02 db48x

I'll try again soon.

gingerbeardman avatar Feb 16 '22 13:02 gingerbeardman