db48x / emularity Goto Github PK
View Code? Open in Web Editor NEWeasily embed emulators
License: GNU General Public License v3.0
easily embed emulators
License: GNU General Public License v3.0
it always results in " Failed to download game data!", there is no working example anywhere i could find nor a guide how to implement - for example what should i put in the locateAdditionalFiles function? it would be great to even have a minimal explanation to the different emulators because without a working example in which i could at least inspect the code its unusable to anyone who doesnt understand it already.
Find a way to default to a symbolic keyboard. Not sure why VICE.js is defaulting to positional keyboard.
Is possible to change the dsk files in runtime? In example for Amstrad/Spectrum/MSX where a lot of games needs to replace the disk from the side A to side B in the same floppy drive to continue.
Awesome work, thanks!!
Hello emularity team,
First thank you for this wonderfull loader !
I've tested mamemegadriv.js driver (making some litlle modification to console example html) with a custom rom i've compiled from source and it works perfectly.
Now i'm trying to build mamemegadriv.js from mame source to test some parameters.
Folowing mame docs (in windows 10):
emmake make SUBTARGET=megadriv REGENIE=1 TOOLS=0 SOURCES=.\src\mame\drivers\megadriv.cpp -j5
in mame directoryI've managed to get mamemagadriv.js and wasm files. But when i try to run the same game with those files i get this error:
exception thrown: 12421456 loader.js:827:45
failed to asynchronously prepare wasm: 12421456
[from chrome dev console ]
My .wasm generated file is bigger than yours ~20 MB, on the other hand .js a file is smaller ~3MB.
Please, can you provide some more detailed instructions to build emulator files from mame source ?
Thanks !
In TECHNICAL.md has methods that allow you to work with the emulator object.
Once you have an emulator object, there are several methods you can call.
start()
requestFullScreen()
mute()
unmute()
toggleMute()
setSplashColors()
others…
I would like to know if there is a method that allows you to stop (destroy) the emulator object? Something like emulator.stop() or emulator.destroi() ...
And by the way. The mute(), unmute(), toggleMute() methods, when using DOSBox, cause the emulator freezes.
This can be observed here: https://archive.org/details/GobliiinsDemo
Hi I would like to know how can I load custom dosbox.conf in emdosbox-loader (emularity) (what the difrence between emularity and emdosbox-loader (emularity is better right??)
I was using this code to load file from zip
var emulator = new Emulator(document.querySelector("#canvas"), null, new DosBoxLoader(DosBoxLoader.emulatorJS("emulator/dosbox.js"), DosBoxLoader.nativeResolution(640, 400), DosBoxLoader.mountZip("c", DosBoxLoader.fetchFile("Game File", "emulator/win311-stock.zip")), DosBoxLoader.startExe("windows.bat"))) emulator.start({ waitAfterDownloading: true });
now I also have dosbox.conf in my zip so how can I load it in so emdosbox will recognize it?
Thanks for Anwsering and Best Regards
Might be useful for, say, disks full of utilities, where autoloading anything is the wrong choice.
The Archive.org in-browser emulation of the Game Boy (powered by MAME) doesn't play any sound in macOS 10.14.5/Safari 12.1.1.
To reproduce:
This doesn't happen in Firefox 67.0.4 on the same computer: sound works fine there.
i'd followed all the steps mentioned in dosbox-example.html, but now im getting this error:
dosbox-sync.js:1 Uncaught TypeError: Cannot read property 'timestamp' of null
at Object.fillGamepadEventData (dosbox-sync.js:1)
at _emscripten_get_gamepad_status (dosbox-sync.js:1)
at X5 (dosbox-sync.js:6)
at qwa (dosbox-sync.js:16)
at JH (dosbox-sync.js:9)
at ji (dosbox-sync.js:17)
at Object.kj [as _main] (dosbox-sync.js:8)
at Object.callMain (dosbox-sync.js:24)
at doRun (dosbox-sync.js:24)
at run (dosbox-sync.js:24)
how can i fix this?
For being able to switch between disks while emulation is running.
How to add custom logo without editing Loader.js file. Which command in embed HTML? Close if this is not applicable.
First of all i would like to thank you for your great work!
I would also like to ask how can i load the emulator js files compressed (.js.gz) ?
I can not get the example_arcade to work.
I have the file examples/targ.zip
And I have the emulator emulators/jsmess/mameexidy.js
But it does not work, I leave my code:
```
var emulator = new Emulator (document.querySelector ("# canvas"),
null,
new JSMAMELoader (JSMAMELoader.driver ("targ"),
JSMAMELoader.nativeResolution (256, 256),
JSMAMELoader.emulatorJS ("emulators / jsmess / mameexidy.js"),
JSMAMELoader.mountFile ("targ.zip",
JSMAMELoader.fetchFile ("Game File",
"examples / targ.zip"))))
emulator.setScale (2);
emulator.start ({waitAfterDownloading: true});
Hi I would like to know how can I use Runtime API found at TEHNICAL.md (what's the difrence between toggleMute() and mute(), unmute()) I would also like to know what does setSplashColors() do? (does it set custom image instead of emularity logo? (if not how can I do that?)
Thanks for Anwsering and Best Regards
I found the prevention of the space bar scrolling behaviour doesn't work in Google Chrome or IE.
I updated the function with a solution from Stack and it seems to work http://stackoverflow.com/questions/18522864/disable-scroll-down-when-spacebar-is-pressed-on-firefox
// stashes these event listeners so that we can remove them after
window.addEventListener('keydown', k = keyevent(resolve));
function keyevent(resolve) {
return function(e) {
if ((e.keycode || e.which) == 32) {
e.preventDefault();
resolve();
}
};
};
Hi, I was trying the emularity Mame example "example_aracade".
I downloaded messexidy.js.gz (the git-annex was not working for this file) and the targ.zip
I also added an undocumented gofullscreen element to the html.
But this error I could not solve. I think that something was added on Mame and was not updated at emularity:
ReferenceError: jsmess_set_mastervolume is not defined
http://localhost/emulators/jsmess/messexidy.js line 407 > eval
Line 1
Thanks for the project, I hope you continue. I´d like to share a few programs developed on an old coco2 to friends :)
Hello, I run example_arcade.html successfully. But i wanna run other games, How to set parameters?
What is driver?
new JSMAMELoader(JSMAMELoader.driver("targ"),
JSMAMELoader.nativeResolution(256, 256),
JSMAMELoader.emulatorJS("emulators/jsmess/mameexidy.js"),
JSMAMELoader.mountFile("targ.zip",
JSMAMELoader.fetchFile("Game File",
"targ.zip"))))
Hello, I run example_arcade.html successfully. But i wanna run other games, How to set parameters?
What is driver?
new JSMAMELoader(JSMAMELoader.driver("targ"),
JSMAMELoader.nativeResolution(256, 256),
JSMAMELoader.emulatorJS("emulators/jsmess/mameexidy.js"),
JSMAMELoader.mountFile("targ.zip",
JSMAMELoader.fetchFile("Game File",
"targ.zip"))))
so the current behavior is, after zip file loaded, it changes the title to something like DOSBox SVN, CPU speed: 3000 cycles, Frameskip 0, Program: xxx
.
I'm currently working on a project that runs in an electron app, so just wondering if it possible to add an option to disable this behavior to make the titlebar cleaner?
Thanks and really appreciate your amazing work!
netplay is working on emularity
Hi.
There are emulators in MAME that are not in here, e.g. 'bbcb' (The BBC Micro). Is this a simple job to request this to be added? Might also be worth considering using JSBeeb https://github.com/mattgodbolt/jsbeeb directly. I have a lot of items I'd like to upload to the Internet Archive which would greatly benefit from having an emulator available.
Thx.
Hey @db48x!
I just added the ability to construct additional FS modules and use them in the EmscriptenFS in v0.5.3.
Secondary FS modules function identically to the standard FS module, except that you can't do the following:
var secondaryFs = new BrowserFS.BFSRequire('fs').FS();
var writeFile = secondaryFs.writeFile;
writeFile(...) // will fail because secondaryFs is an object with state; writeFile needs to be invoked on it
To use a secondary FS module with the Emscripten FS, simply pass it in as the last argument to the EmscriptenFS constructor.
I hope this helps your modularity story! :)
Let me know if you have any issues or questions.
Please help. I have pulled the repo, did a git annex on the files requested in the example_dosbox.html file, uncompressed the gz files and cannot get the page to load. As a side note, one cannot downlod the files directly. Internet Archive says it doesn't know how to handle them.
When you start DOSBOX:
dosbox-sync.js:1 Uncaught TypeError: Cannot read property 'length' of undefined
at lengthBytesUTF8 (dosbox-sync.js:1)
at intArrayFromString (dosbox-sync.js:1)
at Object.callMain (dosbox-sync.js:24)
at doRun (dosbox-sync.js:24)
at run (dosbox-sync.js:24)
at runCaller (dosbox-sync.js:24)
at removeRunDependency (dosbox-sync.js:1)
at applyMemoryInitializer (dosbox-sync.js:24)
at XMLHttpRequest.xhr_onload (dosbox-sync.js:1)
lengthBytesUTF8 @ dosbox-sync.js:1
intArrayFromString @ dosbox-sync.js:1
callMain @ dosbox-sync.js:24
doRun @ dosbox-sync.js:24
run @ dosbox-sync.js:24
runCaller @ dosbox-sync.js:24
removeRunDependency @ dosbox-sync.js:1
applyMemoryInitializer @ dosbox-sync.js:24
xhr_onload @ dosbox-sync.js:1
XMLHttpRequest.send (async)
readAsync @ dosbox-sync.js:1
doBrowserLoad @ dosbox-sync.js:24
(anonymous) @ dosbox-sync.js:24
dosbox-sync.js:1 XHR finished loading: GET "http://localhost/bd/emulators/em-dosbox/dosbox-sync.mem".
Windows user
Would be cool to use that instead of MESS
To preface I am a very very junior 8 weeks into a web dev intensive through GA but want to do a project similar to this for purely selfish reasons, I want to be able to play original game boy games on any device specifically mobile.
I know that I am just starting but am willing to do anything to help.
Even if it is something that you would consider scut work the keystrokes and learning are more important to me than anything else.
Thanks,
Mike
This is a 'nice to have', but since MAME requires save states to be created on the same version of the emulator that they are loaded on, it's a bit of a pain that emularity's drivers are different versions - it means I need to make ZX Spectrum saves in 0.177, and Atari saves in 0.187, and so on. It would be cool if they were all on the same version.
neogeo snk game not working
if any guides
Hello, I run example_arcade.html successfully. But i wanna run other games, How to set parameters?
What is driver?
new JSMAMELoader(JSMAMELoader.driver("targ"),
JSMAMELoader.nativeResolution(256, 256),
JSMAMELoader.emulatorJS("emulators/jsmess/mameexidy.js"),
JSMAMELoader.mountFile("targ.zip",
JSMAMELoader.fetchFile("Game File",
"targ.zip"))))
i don't know if its the right place, sorry in advance.
The native_resolution in cpc6128.json is wrong -at least the height-
https://git.archive.org/db48x/emularity_engine_v1/blob/master/cpc6128.json
The measures have more sense here (check both native_resolution parameters)
https://git.archive.org/db48x/emularity_engine_v1/blob/master/cpc464.json
It causes the following problem running emularity as default.
https://archive.org/details/amstrad_abadia_del_crimen_64
By other side, Would nice if you know about how to pass the extra_args arguments into Archive.org in any meta tag because it's lack of examples.
The wiki seems obsolete since no reflect this emulator, seems the only popular old computer missing. Which is sad.
Proof and error is the only I have.
In archive,org forums they redirect me to [email protected] but nobody answered since a week. I hope to have luck in anyway.
The examples are not in the repo. Is that normal?
I am not able to run one example because of that.
Thanks for that awesome piece of technology!
Hello and thank you so much for your amazing work with emularity.
By modifying your example_arcade.html file, I managed to load the Neogeo bios.
I'm trying to read some game too but now I'm stuck.
This is my working code:
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new JSMAMELoader(JSMAMELoader.driver("neogeo"),
JSMAMELoader.nativeResolution(320, 224),
JSMAMELoader.emulatorJS("emulators/neogeo/mameneogeo.js"),
JSMAMELoader.mountFile("neogeo.zip",
JSMAMELoader.fetchFile("Bios",
"examples/neogeo.zip")),
JSMAMELoader.mountFile("mslug3.zip",
JSMAMELoader.fetchFile("Game",
"examples/mslug3.zip")),
JSMAMELoader.mountFile("neogeo.cfg",
JSMESSLoader.fetchFile("Config File",
"emulators/neogeo/neogeo.cfg")),
// JSMAMELoader.peripheral("cslot1", "mslug3.zip")
)
)
emulator.setScale(2);
emulator.start({ waitAfterDownloading: true });
The commented part (JSMAMELoader.peripheral) is where I'm stuck.
Is it possible to link game rom files to "cslot1" ?
Do I miss something maybe ?
Thanks!
Hello!
I tried to load over IALoader some dos games. For example, with this: var emulator = new IALoader(document.querySelector("#canvas"), "msdos_Alley_Cat_1984");
.
But i've got an HTTP error 503 with CORS.
But when I use this: var emulator = new IALoader(document.querySelector("#canvas"), "msdos_Alley_Cat_1984/Alley_Cat_1984.zip");
all works fine.
May be it need to add detection of zip archives to get_dosbox_files
function? Such as in get_mame_files
function.
Alt+Enter is only showing the game box in the middle of the screen.
Easy way to configure joystick emulation from metadata.
I successfully run PlayStation BIOS, but I dont know how to load bin file to cdrom, thanks for any guide。
The following code improperly assumes that there are files:
files.push(VICELoader.mountFile('/metadata_fliplist.vfl', VICELoader.localFile("Fliplist", fliplist)).files[0]);
Hello
Have you ever tested a network game? Like Worms 1995( 7? ) ( IPX game ) a client to server connection in a browser? Maybe with some kind of WebRTC layer?
I've been working on a simple site with the EM-DOSBOX version. I notice that there is a black screen between clicking on the emulator and it actually loading the emulator, sometimes up to 30 seconds. This fine, since it (so far) eventually loads.
I'm curious how to implement a loading icon while DOS BOX does its thing up until the game arrives?
I'm also curious if there is any documentation on making this mobile friendly? When I load it on my iphone or ipad, it doesn't do anything.
Here is my site: https://www.grantcchambers.com.
Any advise or help is greatly appreciated! Incase you haven't noticed, I am new to webdev, but learning!
The instructions in example_computer.html didn't work at first, with error
ReferenceError: jsmess_set_mastervolume is not defined
So I replaced messnapple2e.js with a version of mameapple2e.js compiled from the current build of MAME with emscripten, and got a different error
MAME exception: Unknown slot option '""' in slot 'sl4'
I changed the line
JSMESSLoader.extraArgs(["-sl6", "diskii", "-sl4", '""'])))
to
JSMESSLoader.extraArgs(["-sl6", "diskii"])))
After that, the machine successfully started and I was able to play HANG PERSON in Beagle Box.
console log for the first attempt with the copy of messnapple2e from git annex:
console-1.txt
console log for the second attempt with a fresh compile of mameapple2e:
console-2.txt
console log for successful start:
console-successful.txt
This is how IA remembers the user's choice, but may not be the best for everyone. I should leave the choice of mechanism up to the Emularity user by defaulting to unmuted, and making IA mute it during setup the same way it disables the splash screen delay during setup.
The JSMAME web audio code is now in the MAME source tree at https://github.com/mamedev/mame/blob/master/src/osd/modules/sound/js_sound.js and compiled into the mame______.js.gz files, so setup_jsmame_webaudio() is dead code and no longer needs to be in loader.js. This happened several version cycles ago so there should be nothing left on archive.org depending on it.
First of all, thank you for your amazing work.
I would like to configure my own keys to genesis emulator, there a problem with defaults keys, ALT key in Firefox show the menu, I can use config file, but don't works.
For example, this is Wiz n' Liz running in genesis emulator (Internet archive example), it have a configuration file:
The content of the file is:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="genesis">
<input>
<port tag=":PAD1_3B" type="P1_BUTTON2" mask="16" defvalue="16">
<newseq type="standard">
KEYCODE_X OR JOYCODE_1_BUTTON2
</newseq>
</port>
<port tag=":PAD1_3B" type="P1_BUTTON3" mask="32" defvalue="32">
<newseq type="standard">
KEYCODE_C OR JOYCODE_1_BUTTON3
</newseq>
</port>
<port tag=":PAD1_3B" type="P1_BUTTON1" mask="64" defvalue="64">
<newseq type="standard">
KEYCODE_Z OR JOYCODE_1_BUTTON1
</newseq>
</port>
</input>
</system>
</mameconfig>
Z --> Button A
X --> Button B
C --> Button C
But in the emulator don't works, only CTRL, ALT, ESPACE key is working. ¿Is it a known problem?
I use this parameter:
MAMELoader.mountFile("genesis.cfg",
MAMELoader.fetchFile("Config File",
"genesis.cfg")),
I use this configuration in local, but config file don't work too.
While trying the EM-DOSBOX example on on my website, I am getting the following error in the console (Chrome 32bit)
Failed to load resource: the server responded with a status of dosbox-sync.js.gz 404 (Not Found)
Any help in solving this would be great. I'm assuming the GZ folder needs extracted?
Load some sort of config file.
Sound lag(delay) all drivers and browsers. Or it's a question for the MAME developers? Thanks.
Example:
https://dosboxonline.github.io/games90s/segams/ninja-gaiden.html
https://dosboxonline.github.io/games90s/gamegear/arena-maze-of-death.html
es6, browser, loader files from this repo.
In the emulator it is possible to mount the archive as a CD ROM drive?
Is there a solution for such tasks?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.