20 May 2023, 23:14 | #1 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Emularity - Amiga features and performance?
Not sure this is the right forum category. I apologize in advance if it is misplaced.
I have been tinkering with emulating Amiga games through the browser-based Emularity framework. There isn't a lot of documentation available, I have pretty much just followed the example available in the code repository. I'm using real Kickstart 1.3 (for OCS) / 3.1 (for AGA). Unfortunately, performance is a major issue. Even on OCS action games, there are noticeable slowdowns. Sound is stuttering, music clearly affected by overload as well. Does anyone have any experience with this, any hints how to improve? Second, lacking documentation, I did not find any way to load games than through ADF floppy images. In many cases, this renders the games unplayable, as they (the games) do not support more than one floppy drive and the emulator won't allow to switch disks. Plus, in any case, this gives quite a bad impression on the state of loading Amiga games these days. I mean, who still wants to wait for floppy load times when WHDLoad has been out for decades? Does anyone know if there is support for virtual harddisks, either through filesystem or HDFs, in this emulator (and if so, how to use it)? Or any other way to use WHDLoad packages (like in FS-UAE)? |
21 May 2023, 01:08 | #2 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,711
|
It's Javascript running in a browser, so of course performance will be terrible compared to an emulator implemented in machine code.
|
21 May 2023, 14:49 | #3 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
So far, so true. I'm not questioning why it is slow compared to a natively running emulator. I'm asking whether it is possible, in spite of unfavourable circumstances, to emulate at least an A500 at full (or "bearable") speed in such a setup. Regardless of relative performance compared to other solutions.
|
21 May 2023, 15:12 | #4 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,503
|
I might be wrong, but I think this is also using JavaScript: https://classicreload.com/amiga_demodisk.html
So it should be possible to get Amiga (500) emulation running in a browser at bearable speeds. |
21 May 2023, 16:01 | #5 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Thanks for this link! Maybe I should check raw SAE out as well. It seems to play fairly well.
However, even on that site, the music of the Soccer Kid demo sounds like a broken record. |
21 May 2023, 16:37 | #6 |
Registered User
Join Date: May 2012
Location: moon
Posts: 211
|
you could give vAmigaWeb a try as it is roughly twice as efficient compared to SAE …
See also https://eab.abime.net/showthread.php?t=106882&page=4 https://vamigaweb.github.io/doc/about.html Or run it in PWA mode by saving https://vamigaweb.github.io/ to homescreen … |
22 May 2023, 16:54 | #7 |
cheeky scoundrel
Join Date: Nov 2004
Location: Spijkenisse/Netherlands
Age: 43
Posts: 7,092
|
I could scarcely believe that this would be full javascript, I would expect a large component of WebAssembly in there. But I can't find any proof this is the case.
Yeah then I can imagine that the performance is broken, Javascript engines are optimisation monsters but there are limits. Quite an achievement though. |
24 May 2023, 20:22 | #8 | |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Quote:
|
|
24 May 2023, 21:57 | #9 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,659
|
|
10 June 2023, 15:07 | #10 | |
Registered User
Join Date: May 2012
Location: moon
Posts: 211
|
Quote:
the sound rendering is done in a separate thread via the browsers AudioWorklet API and graphics rendering is done in javascript currently via requestAnimationFrame and a WebGL2 context ... when WebGPU is coming soon we could try that too... there is a documentation of how to embed it with preloading games on your own websites... https://github.com/vAmigaWeb/vAmigaWeb/wiki should we open a new thread for it ? what should be the title ? vAmigaWeb ? or vAmiga as there is also a native Mac version of it ? vAmiga is not based on a UAE core so it is not a otherUAE ... so where should the new thread be placed then ? |
|
11 June 2023, 16:09 | #11 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
I've been experimenting with it. Is there any documentation how to set it up fully on another server? By default, I'm blocking all access to third party resources in my clients. Wouldn't want to expect anything else from other visitors.
|
11 June 2023, 21:21 | #12 |
Registered User
Join Date: May 2012
Location: moon
Posts: 211
|
You are right... there is a third party cookie blocking in the browser settings which is meant for cookies. But that does not hinder you at all to run basic emulation features... only when it comes to saving snapshots ... yeah that is possibly blocked then because a third party js wants to write to your local browser storage...
Concerning request to non same site web resources ... these are differently handled by the browsers CORS policies... they are blocked by default when demanded by direct javascript fetch commands unless the third party website sets e.g. an Access-Control-Allow-Origin: * response header but there are ways to embed vAmigaWeb hosted on is github.io adress even when CORS is not allowed an example is https://proofofconcept.nl/portfolio/hoi/ which embeds the https://vamigaweb.github.io via an iFrame from an cross origin you could try to run that on your clients to see what is blocked how that embedding works is described in https://github.com/vAmigaWeb/vAmigaW...migaWeb_player finally you may also opt to use it by cloning all files from its binary deployment https://github.com/vAmigaWeb/vAmigaWeb.github.io and copy them over to your website - and change also the property vAmigaWeb_url inside the vamigawebplayer component to your website - that way you can avoid CORS completely but you will then not receive any update. Last edited by yesplease; 11 June 2023 at 22:15. |
14 June 2023, 22:04 | #13 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Is there any way to control the default size of the embedded, emulated screen? The "player_container" seems to set itself according to the size of the element it replaces, although the parent element is much wider. [Edit: solved it by changing the code in vAmigaWeb_player.js]
Second, it seems that a number of handy features cannot be preconfigured, particularly floppy drive speed and number of floppy drives. Am I missing something? Third, how would I go about pre-defining more than one disk to be inserted in the different virtual drives? Last edited by Mr Creosote; 14 June 2023 at 22:43. |
14 June 2023, 23:14 | #14 |
Registered User
Join Date: Apr 2023
Location: Washington/USA
Posts: 36
|
Currently, some emulator parameters like floppy drive speed and number aren't preconfigurable through the interface. You'd have to modify the JavaScript directly for that. It's a bit of a hassle, I know.
As for your third question, pre-defining more than one disk can be done by adjusting the insert function in the script. You can call this function for each drive, passing the drive number and disk file as parameters. |
15 June 2023, 10:35 | #15 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Thanks for the confirmation, I may need to get back on those points later.
In the meantime, I noticed another issue. I checked out what you call the "binary release" and put it on a website, modifying the URI. Upon simple start, I receive the following two errors in the console: navigator.serviceWorker is undefined [...] audioContext.audioWorklet == undefined None of the two appear when booting https://vamigaweb.github.io/ Indeed, when loading a game, only floppy drive sounds can be heard, no music or sound effects generated by the game. Same game, same browser, on the official website deployed version, there is music. Not sure where to look. |
15 June 2023, 23:17 | #16 |
Registered User
Join Date: May 2012
Location: moon
Posts: 211
|
1. size of emulated amiga screen
this is controlled by the "outer" container in which the player is spawned. --- The player swaps the element _this_ when calling vAmigaWeb_player.load(this by an iframe, outer container is the container where the element _this_ resides --- The player creates an iframe with a 100% width and a 100% height i.e. the container element controls the size not the player component. you don't need to alter the player just give the outer container the desired width and height the iframe created by the vamigaweb_player.js will fill that one 100% 2. @Sani11 is right. I did not yet define extra parameters for drive speed and drive numbers. But as he said you could write a mini startup script for that... see also https://github.com/vAmigaWeb/vAmigaWeb/issues/137 you could also start from snapshots ... the would be an instant load see also https://github.com/vAmigaWeb/vAmigaWeb/issues/167 3. audioContext.audioWorklet == undefined is likely due to http ... some browser require https for this i.e. chrome ... see also https://github.com/vAmigaWeb/vAmigaWeb/issues/150 @Mr_Creosote hope that helps a bit ... and have fun ! Last edited by yesplease; 15 June 2023 at 23:39. |
17 June 2023, 09:23 | #17 | |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Quote:
|
|
17 June 2023, 21:59 | #18 |
Evil Mastermind
Join Date: Jul 2002
Location: Home
Posts: 740
|
Alright, I changed many of the default settings using this script method. This is very useful. However, I fail to grasp the way to pre-inject floppy images beyond the url parameter.
What I'm trying to achieve: * Provide a ZIP file * Automatically mount the ADF files contained therein into DFx in alphabetical order By default, when providing a ZIP file with several files inside, the emulator prompts the user what to do with them. Can this be preconfigured through the hosting website in any way? If impossible with a ZIP, is there a description for dummies how to pre-configure several ADFs? |
17 June 2023, 23:51 | #19 |
Registered User
Join Date: May 2012
Location: moon
Posts: 211
|
I opened a new thread as you suggested…
https://eab.abime.net/showthread.php?t=114802 I will post the answer to your last question there |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wishlist for features of another Amiga music tracker | no9 | Amiga scene | 12 | 18 March 2021 00:18 |
Features requests for vscode amiga assembly extension ? | prb28 | Coders. General | 0 | 27 December 2018 16:19 |
OSNEWS Features AROS: Onboard the Last Train to Amiga Neverland | Ultron | News | 0 | 14 September 2006 08:01 |
Amiga features in next Retogamer magazine (UK) | fiath | Amiga scene | 4 | 24 October 2004 18:03 |
What features are on Amiga Emulators | alex2000 | support.WinUAE | 9 | 02 May 2004 05:19 |
|
|