-
-
Notifications
You must be signed in to change notification settings - Fork 5
preconfig
this page explains how to preconfigure action buttons or even javascripts which may run in background within the URL of vc64web.
configuration is done with a JSON-String within the URL when vc64web is called
{"position":"bottom:0vh;left:0vw", "title":"[w]eapon", "key":"w", "script":"action('Space')"}
defines an action button in the bottom left corner, script is javascript language (default).
{"position":"top:0vh;right:0vw", "title":"[w]eapon", "key":"w", "lang":"actionscript", "script":"Space"}
defines an action button in the top right corner, script is the vc64web propriety actionscript language.
lets have a look at this example (key w is remapped to space)
lets have a look at this example (key a is remapped to b, button is not visible)
{"run":true, "script":"$('#alert_wait').show();await action('3000ms');$('#alert_wait').hide();"}
shows a progress bar right after start and hides it after 3 seconds.
JSON Strings go like this { "wide": true } for example expresses the property wide with the value true. For buttons and scripts there is the property { "buttons": [] } You see it is empty and buttons can be placed into the brackets. Lets do.
{ "buttons": [{"run":true,"script":"alert('hello world !')"}] }
let's try
did you notice the %20 between hello and world ? This is the url encoding for a space.
what if you have big scripts? Scripts with a lot of lines ... formatted lines ...
Well, in that case you go with the script_base64 property instead of script.
the above example becomes this.
if you don't know how to encode you may just put your script into here https://www.base64encode.org/ which will convert it for you. Then copy the encoded script into the script_base64.
run a more complex background script which interacts with the C64 hardware via peek and pokes accompanied with two visual action buttons for "next rss item" and "refresh latest rss content".
- 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