Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify multiple disks using vmac-colormac? #84

Open
gingerbeardman opened this issue Jul 28, 2021 · 12 comments
Open

Specify multiple disks using vmac-colormac? #84

gingerbeardman opened this issue Jul 28, 2021 · 12 comments

Comments

@gingerbeardman
Copy link

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
Copy link
Author

Any thoughts on this?

@MarkYoungIW
Copy link

MarkYoungIW commented Feb 14, 2022

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.

@db48x
Copy link
Owner

db48x commented Feb 14, 2022

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 db48x closed this as completed Feb 14, 2022
@MarkYoungIW
Copy link

MarkYoungIW commented Feb 14, 2022

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

@db48x
Copy link
Owner

db48x commented Feb 15, 2022

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

@db48x db48x reopened this Feb 15, 2022
@MarkYoungIW
Copy link

MarkYoungIW commented Feb 15, 2022

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

@gingerbeardman
Copy link
Author

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

@db48x
Copy link
Owner

db48x commented Feb 15, 2022

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

@MarkYoungIW
Copy link

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.

@db48x
Copy link
Owner

db48x commented Feb 16, 2022

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
Copy link
Owner

db48x commented Feb 16, 2022

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?

@gingerbeardman
Copy link
Author

I'll try again soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants