Closed AlinGheaja closed 1 month ago
Yes in the finishInitialization() function of script.js you can add a call to myApp.loadRom(true) under the line this.loading = false;
the only issue is that on some devices you won't have any audio. That is because most browsers require you to interact with the page before allowing audio to play, that is the main reason for the Start Computer button.
thank you. how can i have smaller hdd images or is there any other formats that i can use ? the minimum is 256 mb but some dos games have like 200 kb.
If you click on settings at the start page you can set the initial hard drive size to as low as 25mb. However you need press the clear button that will delete your current hard drive first. Make sure you take a backup before clearing if you want to save that old drive.
thank you so much is it possible istead of a hdd.img to use something else ? and not worry about ocupying to much ! 25 mb for a 200 kb game is a little to much. i love this project and i want to use it on my website. for now id like to start with 4 games unde 1 mb. i just want the user to just press "start computer"(rest of options like drag and drop removed) and the game sould start like "dave 2 haunted mansion"
If you edit index.html you can add your own hard drive sizes like this:
<select class="form-control" rv-value="data.initialHardDriveTemp" id="ddlInitialHD">
<option value="hd -size 1">1 MB</option>
<option value="hd -size 25">25 MB</option>
<option value="hd -size 50">50 MB</option>
i added the values but the minimum hdd size is 5mb. if i go lower then it shows an error. so far so good. thank you for your reply is there other way of "preloading" zip/iso so that "Start computer" works without hdd.img ? thank you again <3
I haven't added the ability to have a game list yet out of the box but you can do it with a little customization. Go to romlist.js and your list of games there which are on your server:
var ROMLIST = [
{url:"game1.zip",title:"Game1",skipiso:"true",ram:"128"},
{url:"game2.zip",title:"Game2",skipiso:"true",ram:"128"},
{url:"game3.zip",title:"Game3",skipiso:"true",ram:"128"},
];
then in Index.html delete the rv-if statement from ROM LIST
<div class="form-group mt-2 mb-4"
style="width: 300px;margin-left: auto; margin-right:auto;">
<select class="form-control" id="romselect">
<option rv-each-rom="data.romList" rv-skipiso="rom.skipiso"
rv-ram="rom.ram" rv-value="rom.url">{rom.title}</option>
</select>
</div>
that will get the dropdown to show up. finally look for any calls to "myApp.loadRom(true)" in index.html and change them to "myApp.loadRom()". if you follow through the code you can see what this is doing, basically you're telling it to always load with a file. then based on which game they select it will download that zip and load it in before starting.
i edited the files exactly and .. it doesnt work or maybe i did something wrong here is a link for a test with the files i edited https://retrotech.ro/toons/ inside the folder there is a game DAVE2.zip
romlist has this
var ROMLIST = [ /* {url:"DAVE2.zip",title:"Dave2",skipiso:"true",ram:"128"}, {url:"game2.iso",title:"Game2",skipiso:"true",ram:"128"}, {url:"game3.iso",title:"Game3",skipiso:"true",ram:"128"}, */ ];
you need to remove the / and / in romlist.js - that comments out everything inside
did that just now but nothing happens
var ROMLIST = [
{url:"DAVE2.zip",title:"Dave2",skipiso:"true",ram:"128"}, {url:"game2.iso",title:"Game2",skipiso:"true",ram:"128"}, {url:"game3.iso",title:"Game3",skipiso:"true",ram:"128"},
];
on the website you linked I still see comments around romlist
thats impossible !!! clear cookies ? here is a screenshot of the file live on the server
You removed the entire div -
<!-- ROM LIST -->
<div class="form-group mt-2 mb-4" DELETE THIS -> rv-if="data.loggedIn | ev '==true'"
style="width: 300px;margin-left: auto; margin-right:auto;">
<select class="form-control" id="romselect">
<option rv-each-rom="data.romList" rv-skipiso="rom.skipiso"
rv-ram="rom.ram" rv-value="rom.url">{rom.title}</option>
</select>
</div>
You need to put the div back and only remove the rv-if statement
damn :D my bad... i got it here but thats it
sir can you please tell me what to do next or why does it not go anywere from this ?
take a look at this commit - I did a proof of concept with all the modifications you need to make. in romlist.js add a property called "autostart" with the commands you want it to run after unzipping the game. you would use this instead of the startup script.
https://github.com/nbarkhina/DosWasmX/commit/1a3c8ef7f28e850b1f60b96774a5dce1c3196966
great !!! it works great ! inside your code is there an easy way to disable drag and drop/browse/settings without removing code from index.html ? thank you for your work <3
no - you would need to just remove it from the index.html
all good and working great! after saving a hdd and then launching it again, when it extracts from the zip it asks to overwrite files but does nothing without confirmation. what file to edit and where so it overwrites/skip without confirmation. thank you
one last question and i hope you can help me. is there a setting for autofit game screen inside index.html
take a look at this commit:
https://github.com/nbarkhina/DosWasmX/commit/5aace0ce22518c6e2d87f00404b01db3c218feb4
this should fix the issue where it keeps extracting the files for Overwrite after you saved the drive. now it will save each hard drive separately in the browser. for autofit you would need to play around with the width of the canvas, or set it to full screen.
thank you sir <3
hello i know you can create a Startup Script on the hdd and then save hdd.img once i upload hdd.img to my website and edit settings.js i still need to hit start computer. is there a way to autorun a hdd.img if someone opens the link or index.html file ? thank you