-
-
Notifications
You must be signed in to change notification settings - Fork 5
vc64webplayer_roms
normally the vc64web emulator fetches its roms automatically from the openROMS website, but these do not include a 1541.rom which is needed for .d64 files. The rom-dialog UI is a way that lets the user choose his own roms. There could be situations where you want to automatically preload with your own specific set of roms instead of a user choosen ones.
so this chapter explains how to preload the emulator with your own specific roms ...
In case you have not yet read the chapter using the web player for embedding and controlling vc64web inside another webpage. You should read that one first before continue reading here.
you can preload urls
or you can preload the roms as base64 encoded strings
lets go with urls first
<script>
file_url='http://my-site.de/my_demo.d64';
floppy_url='http://my-site.de/floppy.rom';
kernal_url='http://my-site.de/kernal.rom';
basic_url='http://my-site.de/basic.rom';
charset_url='http://my-site.de/charset.rom';
</script>
you do this with
vc64web_player.samesite_file={
floppy_rom_url:floppy_url,
basic_rom_url:basic_url,
kernal_rom_url:kernal_url,
charset_rom_url:charset_url,
url:file_url,name:'my_demo.d64'
};
also we preconfig
- to not show dialogs when no rom has been loaded yet
- to not show dialogs when disk has been inserted, so forcing the user to type
load"$",8
by himself - to hide the navbar menu
with
let config={
dialog_on_missing_roms:false,
dialog_on_disk:false,
navbar:false
};
here is the complete code
<div>
<img
style="width:60vw" src="my_demo.gif"
onclick="
let config=
{
dialog_on_missing_roms:false,
dialog_on_disk:false,
navbar:false
};
vc64web_player.samesite_file=
{
floppy_rom_url:floppy_url,
basic_rom_url:basic_url,
kernal_rom_url:kernal_url,
charset_rom_url:charset_url,
url:file_url,name:'my_demo.d64'
};
vc64web_player.load(this,encodeURIComponent(JSON.stringify(config)));
return false;
"
/>
</div>
first define the variables which hold the base64 encoded roms
like so
<script>
floppy_base64_encoded='l6q...g=='; //the bas64 string has been shortened
...
</script>
and then you use them in the samesite_file
of the vc64web_player before the load command
vc64web_player.samesite_file={
floppy_rom_base64:floppy_base64_encoded,
...
};
maybe you like to see the next chapter ? We like to talk with the emulator ....
send scripts into the emulator via the webplayer
or you just missed here how to autoload/autorun any file from the disk ? then you may want to jump directly to how to preload original system roms and autostart a .d64 title
- simple hashtag preconfiguration
- preconfig with JSON notation
- using direct start links for sharing on social media
- preconfig of scripts and buttons
- scripting support for simple tasks
- scripting support for complex tasks like programming a game specific AI
lightweight integration into your own webpage (with only a few lines of code)
- using the web player for embedding and controlling vc64web inside another webpage
- preloading the web player with specific system roms
- send scripts into the emulator via the webplayer
- customizing the icon bar at the bottom of the webplayer
- how to preload original system roms and autostart a .d64 title
create a standalone package which contain all files to run your C64 program