em-dosbox
em-dosbox copied to clipboard
Simple html
How to to display only the game? You can place a ready dosbox.html template?
Thanks
You can compile em-dosbox with --shell-file
argument. See emcc --help
for descriptions.
However, I don't know what @dreamlayers's opinion on replacing the default shell in this project.
I tried an approach of setting up a very simple HTML file. As I don't have a Linux system for building everything anew at hand, I searched and tried some prebuilt versions of emdosbox - some requiring dosbox.html.mem, some running without.
I get my image mounted and my dosbox conf loaded, but it seems like my simple approach is leaving out something essential. I understood that stopping emulation when typing to the console seems to be a "feature" depending on the emdosbox version and build setup, but this is no problem for my test. If I start my executable, it doesn't get beyond confirmation of the command. No timeout, no exception, nothing is issued. It looks the same with every prebuilt emdosbox version I tried, so I assume the problem is to be found in my minimalistic setup:
<canvas id="canvas" style="border: 0px none; display: block; margin: auto;"></canvas>
<script>
function loadFiles()
{
FS.createPreloadedFile('/', 'dosbox.conf', 'apps/dosbox.conf', true, true);
FS.createPreloadedFile('/', 'disk-image.ima', 'apps/kandoria.IMA', true, true);
}
var Module =
{
preRun: [loadFiles],
canvas: document.getElementById('canvas'),
};
</script>
<script src="js/dosbox.js"></script>
dosbox.conf: [autoexec] imgmount e disk-image.ima -t floppy e: kandoria.exe
Log: pre-main prep time: 75 ms DOSBox version af1fa29 built with Emscripten 1.29.6 80d92c0
Copyright 2002-2015 DOSBox Team, published under GNU GPL.
Calling stub instead of sigaction() Calling stub instead of sigaction() Calling stub instead of sigaction() CONFIG:Loading primary settings from config file dosbox.conf SDL:Current window pixel format: SDL_PIXELFORMAT_RGB888 MIXER:Got different values from SDL: freq 48000, blocksize 2048 MIDI:Opened device:none Mounted FAT volume is FAT12 with 2863 clusters (end)
Is there any documentation I oversaw on what else is needed? The repackager seems to do a lot of complex things... Why not repackager? I wanted to further play around with setting up my file system directly in the website.
Thanks for any hint in the right direction.