Page 4 of 4

Re: Oricutron or Euphoric in the browser anyone ?

Posted: Mon Nov 21, 2022 2:13 pm
by jumpjack
As filename is read by emulator from sessionStorage, where it is stored upon clicking a link in the caller page, and file contents is stored into IndexedDb, into a database named "/readrwitefs", table "FILE_DATA" my page loads a file from local file system and populates sessionStorage.file variable with filename and "/readwritefs" indexdDb with file contents, which has this format:

Code: Select all

		
		fileobject = {
			contents: filecontents, // UInt8array
			mode: 33206,
			timestamp: new Date()
		};
I see there are two DBs, "/readwritefs" and "emscripten_filesystem", created by emulator, but the second one is apparently never used by the emulator, so I just ignore it.

Successfully tested in Windows 10 with Chrome and Edge.

On Firefox sometime it works, other it does not... Sometimes I'm getting your same error. Please try loading the space1999-en.dks file in "standard" way (click on the link), then go back to the page and try loading a local file. Maybe I forgot intiializing something, besides filename and fileocontents? Possibily "emscripten_filesystem", which I don't know how to populate, I can't see anything inside it in developer console.

Note: Github enabled some times ago the "discussion" feature, to... well, discuss features separately from issues; you can enable it in repo settings just by clicking its checkbox.

Re: Oricutron or Euphoric in the browser anyone ?

Posted: Fri Nov 25, 2022 8:07 am
by jumpjack
New version, more robust, should solve the issue.
Note that the URL has changed: I don't use anymore a "caller page", everything is into oricutron.html page.

https://jumpjack.github.io/oricutronJS/oricutron.html

At first run, with storage, IndexedDB and emulator filesystem empty, emulator should start anyway, regardless of some error messages in output panel.

Then it is possible to:
- load a local file
- restart emulator using one of previously loaded disks

Some debug buttons are available for testing.

Re: Oricutron or Euphoric in the browser anyone ?

Posted: Fri Dec 09, 2022 2:43 pm
by Hialmar
I still get errors in the console :

Code: Select all

oricutron.html:186 ubsan: shift-out-of-bounds
printErr @ oricutron.html:186
oricutron.html:186 Assertion failed: undefined
printErr @ oricutron.html:186
Oricutron.js:964 Uncaught RuntimeError: abort(Assertion failed: undefined). Build with -s ASSERTIONS=1 for more info.
    at abort (Oricutron.js:963:10)
    at assert (Oricutron.js:641:3)
    at Oricutron.js:1209:4
    at doCallback (Oricutron.js:2896:11)
    at done (Oricutron.js:2903:13)
    at Oricutron.js:2261:21
    at Oricutron.js:2367:12
    at req.onsuccess (Oricutron.js:2300:4)
It's Chrome on Macos.

Edit : Resetting the filesystem solved the problem.

Re: Oricutron or Euphoric in the browser anyone ?

Posted: Fri Dec 09, 2022 2:49 pm
by Hialmar
I have some problems with the merge with the changes from the master branch that I first need to solve.

Then I can add what you did to the www branch.