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

Mounting the archive as a CD ROM drive (DosBox) #26

Closed
ahtoh68 opened this Issue Feb 6, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@ahtoh68
Copy link

commented Feb 6, 2018

In the emulator it is possible to mount the archive as a CD ROM drive?
Is there a solution for such tasks?

@db48x

This comment has been minimized.

Copy link
Owner

commented Feb 7, 2018

Yes, you can mount an ISO. Simply use mountFile as normal to download the ISO file, then use extraArgs to give DosBox an imgmount command using that ISO (http://www.dosbox.com/wiki/IMGMOUNT).

For example:

new DosBoxLoader(DosBoxLoader.mountFile("example.iso",
                                        DosBoxLoader.fetchFile("Game File",
                                                               "path/to/example.iso")),
                 DosBoxLoader.extraArgs(["-c", "imgmount d /emulator/example.iso -t iso"]),
@ahtoh68

This comment has been minimized.

Copy link
Author

commented Feb 7, 2018

thanks for the answer

In the console makes an error:
Uncaught TypeError: DosBoxLoader.extraArgs is not a function

As far as I can judge from the information TECHNICAL.md, the extraArgs function is only applicable for working with the emulator JSMESS:

MMAME
MAMELoader.driver(driverName)
MAMELoader.extraArgs(args)
MAMELoader.peripheral(name, filename)
JSMESS
JSMESSLoader is merely a synonym for MAMELoader, and is provided so that we don't break existing users.

And in the file loader.js I did not find the function extraArgs, which interacts with dosbox. Perhaps I have an outdated version. Despite the fact that I use files from this repository.

@db48x

This comment has been minimized.

Copy link
Owner

commented Feb 7, 2018

You're right; I don't know how I ever overlooked that. I've committed a change that adds an extraArgs method to the DosBoxLoader.

@ahtoh68

This comment has been minimized.

Copy link
Author

commented Feb 7, 2018

Does not want to process the command "imgmount d /emulator/example.iso -t iso"
My code looks like this:

var emulator = new Emulator(document.querySelector("#canvas"),
	null,
	new DosBoxLoader(DosBoxLoader.emulatorJS("emulators/em-dosbox/dosbox-sync.js"),
		DosBoxLoader.locateAdditionalEmulatorJS(locateAdditionalFiles),
		DosBoxLoader.nativeResolution(640, 400),
		DosBoxLoader.mountZip("c",
				DosBoxLoader.fetchFile("Game File",
							"examples/base/bd.zip")),
		DosBoxLoader.mountFile("bdcd.iso",
				DosBoxLoader.fetchFile("Game File",
							"examples/base/bdcd.iso")),
				DosBoxLoader.extraArgs(["-c", "imgmount d /emulator/bdcd.iso -t iso"]),
		DosBoxLoader.startExe("START.BAT")))
	emulator.start({ waitAfterDownloading: false});

function locateAdditionalFiles(filename) {
	if (filename === "dosbox.html.mem") {
		return "emulators/em-dosbox/dosbox-sync.mem";
	}
	return "emulators/em-dosbox/"+ filename;
}

DOSBOX prints this code to me:
Z:\mount undefined /emulatorbdcd.iso
photo errors: https://i.imgur.com/8bxfjkS.png

@db48x

This comment has been minimized.

Copy link
Owner

commented Feb 7, 2018

Nice, you found another interesting bug. I've pushed a fix; let me know how it goes.

@ahtoh68

This comment has been minimized.

Copy link
Author

commented Feb 8, 2018

Many thanks !!! Everything works fine !!!

@ahtoh68 ahtoh68 closed this Feb 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.