Oricutron or Euphoric in the browser anyone ?

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Oricutron or Euphoric in the browser anyone ?

Post 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.
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Oricutron or Euphoric in the browser anyone ?

Post 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.
User avatar
Hialmar
Flight Lieutenant
Posts: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Oricutron or Euphoric in the browser anyone ?

Post 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.
Hialmar
CEO and Silicium member.
User avatar
Hialmar
Flight Lieutenant
Posts: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Oricutron or Euphoric in the browser anyone ?

Post 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.
Hialmar
CEO and Silicium member.
Post Reply