Page 2 of 8
Updated Web Emulator
Posted: Sat May 09, 2020 7:36 pm
by JimmyDansbo
@SebastianVoges Any chance you could help me understand why this does not work?
https://sebastianvog.github.io/x16-emulator/x16emu.html?manifest=https://cx16.dk/cx16maze/ It just stays at the loading screen
Thanks in advance
Updated Web Emulator
Posted: Sat May 09, 2020 8:44 pm
by SebastianVoges
5 hours ago, JimmyDansbo said:
@SebastianVoges Any chance you could help me understand why this does not work?
https://sebastianvog.github.io/x16-emulator/x16emu.html?manifest=https://cx16.dk/cx16maze/ It just stays at the loading screen
Thanks in advance
The following exception happened in the browser:
"Access to fetch at 'https://cx16.dk/cx16maze/manifest.json' from origin 'https://sebastianvog.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
This is a CORS issue. Basically the browser not allowing to fetch the resources from a different domain.
Not sure how much control you have over your backend, but can you configure the server to allow cross origin requests? This resource might help
https://enable-cors.org/server.html Oh and additionally: I made a mistake in my original post. it has to be a
manifest.json file not a
manifest.xml but i still think CORS issue need to be fixed as well.
Also, I don't mind hosting for the short-term:
https://sebastianvog.github.io/x16-emulator/x16emu.html?manifest=https://x16repos.s3.amazonaws.com/cx16maze/
Updated Web Emulator
Posted: Sat May 09, 2020 8:48 pm
by Perifractic
Once we can get the emulator on the final web domain it should then work for any apps uploaded to the software library at the same domain.
Updated Web Emulator
Posted: Thu Jun 04, 2020 11:42 am
by Main Administrator
@SebastianVogesWe have some uploads that are pure BASIC files. Is there a way to load them too via a manifest or does it only work with PRG files?
Updated Web Emulator
Posted: Thu Jun 04, 2020 8:15 pm
by SebastianVoges
@MattGrandisBasic files I think it might not work currently due to how I pass it to the emulator. I can check later to see how this is implemented. there might need to be an adjustment done, but the same concept should work.
I am also working on just supplying a .zip file to the emulator which can contain all the assets and manifest. I think that would be a bit easier to maintain instead of having to deal with folders. I am halfway done with it but stopped work on that a while ago. I will pick it up over the weekend.
Updated Web Emulator
Posted: Thu Jun 04, 2020 8:38 pm
by Main Administrator
Passing a zip file would be great! We've already added a note to our implementation that it only works with PRG files. It is a fantastic feature nonetheless! Thanks for your work!
Updated Web Emulator
Posted: Sun Jun 07, 2020 8:00 pm
by SebastianVoges
@MattGrandis @Perifractic I have an updated version here:
https://x16emu.s3.amazonaws.com/x16emu.html?manifest=https://x16repos.s3.amazonaws.com/chase.zip Support for zip files in the ?manifest parameter was added. (the old way should also still work)
The emulator expects the manifest.json in the root of the zip.
Support for Basic programs was added:
In the manifest, the basic file has to be specified with
"start_bas": "HELLO.BAS" I also added error logging in the javascript console. If the emulator doesn't start as expected, the logging should hopefully point to the area of failure.
Lastly , I took some work-in-progress speed optimization code from
@StephenHorn and Michael Browns Pull Request to make web emulator a lot more usable.
The zipped assets for the web emulator are under
https://github.com/sebastianvog/x16-emulator/releases/tag/1.0.0-beta.2 By next weekend I hope to clean up the code, add some general readme for the manifest.json format, and create a pull request to get this back into the main x16 GitHub repo.
Cheers,
Sebastian
Updated Web Emulator
Posted: Sun Jun 07, 2020 8:22 pm
by Perifractic
Updated Web Emulator
Posted: Sun Jun 07, 2020 8:31 pm
by Main Administrator
Amazing work,
@SebastianVoges! I'll upload that version to our site ASAP. It's going to make handling zip files so much easier for us, we definitely owe you a beverage of your choice!
Updated Web Emulator
Posted: Sun Jun 07, 2020 9:14 pm
by Main Administrator
I'm adding the new functionality now. I'll have to adapt some code on the server to add dealing with zip files, so until further notice, the Try it now function might break! I'll give notice here when everything's back to normal again.