Comments (5)
hi @agony09
First of all I want to say thank you for this great emulator. It's really a great thing. Thanks.
❤️
Would this be possible?
yes. the preparations for this depends a bit on your planned use case ...
use case: use emulator web app like a native app
when you just want to use it as an emulator app then you have to install it (in iOS save to Home Screen) If installed it will remember the chosen roms on subsequent starts automatically.
use case: embed some c64 programs on your own website
you will find a howto in the wiki which describe how to auto load your desired roms
https://github.com/vc64web/virtualc64web/wiki/vc64webplayer_roms
https://github.com/vc64web/virtualc64web/wiki/vc64webplayer_d64
or just peek how others do it
https://quipzz.bplaced.net/c644.html
https://englishclass.de/~wolf/ac/demos
can you tell us more about your use case ?🤓 then we might give you a more specific advise
from virtualc64web.
Yes, thanks,
I uploaded the script to a web space. And it also starts when I go to the website. But on first boot, it loads the MEGA65 ROMs.
Yes, I know that I can then select the other ROMs myself and he will remember that.
However, my goal is that the ROM's from my web directory "roms" are automatically loaded the first time the website is started.
And not those MEGA65 roms that come by default.
I thought I had to change that in the "vc64_ui.js" file?
I don't want to start a game automatically. But only,
that the emulator takes other ROMs as default settings.
Can I perhaps enter something in my index.html?
Thanks in advance.
from virtualc64web.
You have to set the samesite file with the addresses of the roms before loading the player. Additionally you might want to configure that it should not show the missing roms dialog on the very first start…
let config={
…
dialog_on_missing_roms:false,
…
};
This is both described in
https://github.com/vc64web/virtualc64web/wiki/vc64webplayer_roms
Where have you deployed your website? … when you send us a link then we can take a closer look what’s wrong with the rom loading
from virtualc64web.
ok thanks.
i use this script:
https://github.com/vc64web/vc64web.github.io
i upload it to a web-server.
and i start it with the index.html in this script.
from virtualc64web.
@agony09 ok now I see what you are trying to do… you just want to copy the installation of vc64web to your webspace and run it with original roms per default. I.e. not by embedding it via the player …
For this use case you need to patch the file vc64_ui.js
-
You duplicate the function
fetchOpenROMS()
and name it as you like … e.g. fetchOrigROMS() … then you adapt that function and point it to the roms you like to load. -
Next you have to find the word
MSG_ROM_MISSING
in the vc64_ui.js
It looks like this
else if(msg == "MSG_ROM_MISSING")
{
//try to load roms from local storage
setTimeout(async function() {
if(load_roms(true) == false)
{
get_parameter_link(); //just make sure the parameters are set
if(call_param_openROMS==true)
{
await fetchOpenROMS();
}
else if(call_param_dialog_on_missing_roms != false)
{
$('#modal_roms').modal();
}
}
},0);
}
Try to alter it to this
else if(msg == "MSG_ROM_MISSING")
{
//try to load roms from local storage
setTimeout(async function() {
if(load_roms(true) == false)
{
get_parameter_link(); //just make sure the parameters are set
await fetchOrigRoms(); //<—— your own implementation
}
},0);
}
You noticed that I removed the parts with fetchOpenRoms and also the code for opening the dialog to prompt the user for roms when they are missing…
Now whenever your vc64web copy is started and roms are missing i.e. not yet loaded to the local storage then it will fetch the roms you directed him to load in your own implementation of fetchOrigRoms() … and no rom dialog will popup
from virtualc64web.
Related Issues (20)
- Running C64-Cursor on iPad/Safari HOT 5
- compiling errors HOT 3
- cannot start D64 when building with latest emsdk HOT 5
- stuck physical keyboard on certain key combinations HOT 2
- Does not load basic programs properly HOT 13
- margin-bottom on virtual keyboard for modern iOS devices HOT 1
- Bruce Lee crashes (any version) after several levels HOT 27
- setting action buttons on top of nav bar HOT 1
- improve mapping of (short cut) keys HOT 2
- work on defining actions and keyboard mappings
- Touch controls in iPhone HOT 41
- How does one drag a link from csdb.dk into the drop zone? HOT 4
- Touch controls in iPhone Part2 HOT 12
- use HOT 1
- xbox wireless controllers axis sticks HOT 1
- Touch example crashes on touch devices HOT 3
- Unable to select c64 roms on iOS HOT 2
- reworked css based virtual keyboard HOT 3
- Datasette STOP and PLAY HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtualc64web.