db48x / emularity

easily embed emulators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specify multiple disks using vmac-colormac?

gingerbeardman opened this issue · 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.

Any thoughts on this?

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.

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.

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"]),
     ));  

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

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.
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

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

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

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.

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.

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?

I'll try again soon.