Jump to content
IGNORED

Js99'er


Asmusr

Recommended Posts

20 hours ago, Asmusr said:

After the change, the performance in Firefox is little better overall, but it's still running at about half the frame rate for no apparent reason. I would like to find a solution, but currently I don't consider Firefox a supported browser.

 

@InsaneMultitasker and @retroclouds could you please check performance and report back?

I am using the latest Edge.

The frame rate improved; title screen is maximum fps while Monkey Island demo with F18A is a steady 55 to 56 fps.  However, I have had no luck with TIPI emulation via a physical RPi3.  I tried http (not https) and now for whatever reason I am stuck with a green screen no matter what options I select. CTRL-F5 didn't help neither did a browser restart. 

FYI, Firefox is still slow and is at 47fps at the title screen, and is even slower while running an f18a-enabled program. The only benefit is that TIPI emulation works in Firefox. 

 

Edit: I disabled the Edge automatic https and tried again. js99er still tries to start with https and will not let me use http.  On the other hand, Firefox opens with http and indicates the connection is not secure.  By comparison, I can open the TIPI logs in http with Edge. See final screenshot.  I don't quite know what this all means but I hope it is helpful.

image.png.d140954128ec54dc08a14bba4cffbb29.png

image.png.956a97c76a52a344361fdf74d6d0735a.pngwith

image.thumb.png.2caa21f232403eee8a630c321b9ebc94.png

image.png.9ad374cf7b351d0902db96b2f14ba301.png

Link to comment
Share on other sites

14 hours ago, InsaneMultitasker said:

I tried http (not https) and now for whatever reason I am stuck with a green screen no matter what options I select. CTRL-F5 didn't help neither did a browser restart. 

I don't have a real TIPI, but the TIPI emulation works for me in Edge even though I'm using accessing js99er over https (the TIPI emulation is running at ws://localhost:9901/tipi).

If you open the developer console (F12), do you see any errors?

Link to comment
Share on other sites

I'm running on Safari on my M2 mba and seeing the following while idling on the reset screen (with the color bars).

 

Approx. 28% of 1 CPU core.

 

These framerates:

Screenshot2023-12-26at7_26_54AM.thumb.png.1efc7f1180f7bbf070750f5514ae3660.png

 

What do the FPS numbers mean?

 

Why is it 56.2 out of a possible 58.8 FPS?  Shouldn't it be 58.8 / 58.8 if it was running full speed?  Also why not 60hz?  

 

 

Link to comment
Share on other sites

7 hours ago, Asmusr said:

I don't have a real TIPI, but the TIPI emulation works for me in Edge even though I'm using accessing js99er over https (the TIPI emulation is running at ws://localhost:9901/tipi).

If you open the developer console (F12), do you see any errors?

Hello @Asmusr, thank you.  I think you know this already but just to be sure, the reason I am/was using http is for use with my real RPI, as per the TIPI site's information: 

 

image.thumb.png.b2de90c02d8b368f1d769e0691677b47.png

 

I noticed that if I open a private browsing session, the https works until I try to use http.  After I use http once, js99er never again will load until I start a new private session.  

 

Here is the F12 console information from just the regular (not private) session with TIPI emulation enabled: 

image.png.046ca10af57bff0b9a42bd1aa686343d.png

 

Interestingly, I just now disabled the TIPI emulation and js99er was able to start.  This didn't happen for me yesterday. Here is what the F12 console shows today:

image.png.0b0ba4bd774f3088f77487a73f8cd93b.png

 

 

Link to comment
Share on other sites

8 hours ago, retrodroid said:

Why is it 56.2 out of a possible 58.8 FPS?  Shouldn't it be 58.8 / 58.8 if it was running full speed?  Also why not 60hz?  

I can see why this is confusing, but the explanation is that JavaScript only allows scheduling with a precision of milliseconds, and 1000 ms / 60 = 16.66 ms, so we choose 17 as the number of milliseconds between each frame. But 1000 / 17 = 58.82 so that's the actual frame rate were after if the host CPU can run the emulation at full speed. The log shows how many frames it actually manages to perform. Since JavaScript is single threaded it won't start a new frame until the last one has completed. 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

6 hours ago, InsaneMultitasker said:

Interestingly, I just now disabled the TIPI emulation and js99er was able to start.  This didn't happen for me yesterday. Here is what the F12 console shows today

There's nothing remarkable in that log, but I think the reason I can access the TIPI even though I use https is that my TIPI is at the same IP (localhost) instead of at another IP (your RPi). But accessing http://js99er.net in Edge also works fine for me. I understand why the browsers insist on using https, but there's nothing in js99er that would benefit from https since no data are sent to the server.

  • Like 2
Link to comment
Share on other sites

16 hours ago, Asmusr said:

I can see why this is confusing, but the explanation is that JavaScript only allows scheduling with a precision of milliseconds, and 1000 ms / 60 = 16.66 ms, so we choose 17 as the number of milliseconds between each frame. But 1000 / 17 = 58.82 so that's the actual frame rate were after if the host CPU can run the emulation at full speed. The log shows how many frames it actually manages to perform. Since JavaScript is single threaded it won't start a new frame until the last one has completed. 

Thanks for the explanation. Makes sense.  I see on Edge I get pretty much full performance (58.9 / 58.8 sometimes) and on Firefox slightly worse performance than on Safari (52/58.8 fps).

 

Edited by retrodroid
Link to comment
Share on other sites

22 hours ago, InsaneMultitasker said:

Hello @Asmusr, thank you.  I think you know this already but just to be sure, the reason I am/was using http is for use with my real RPI, as per the TIPI site's information: 

 

image.thumb.png.b2de90c02d8b368f1d769e0691677b47.png

 

I noticed that if I open a private browsing session, the https works until I try to use http.  After I use http once, js99er never again will load until I start a new private session.  

 

Here is the F12 console information from just the regular (not private) session with TIPI emulation enabled: 

image.png.046ca10af57bff0b9a42bd1aa686343d.png

 

Interestingly, I just now disabled the TIPI emulation and js99er was able to start.  This didn't happen for me yesterday. Here is what the F12 console shows today:

image.png.0b0ba4bd774f3088f77487a73f8cd93b.png

 

 

this clearly shows the https:  so something is making you go back to https:  mixed content is not allowed by default on modern chrome browsers  and the websocket is http: so you must be http loading the page ..

 

Link to comment
Share on other sites

On 12/27/2023 at 9:49 AM, arcadeshopper said:

this clearly shows the https:  so something is making you go back to https:  mixed content is not allowed by default on modern chrome browsers  and the websocket is http: so you must be http loading the page ..

 

So something in js99er is forcing https even if I specify http?  Are you able to use edge or chrome with js99er to connect to a real RPI via websocket?  Firefox works but it is not a supported browser for js99er, and it is also much slower. 

Link to comment
Share on other sites

2 hours ago, Asmusr said:

JS99er is not forcing use of https - it's your browser that's forcing it. For me, Chrome is forcing https, and Edge and Firefox are not. The Firefox bug is described here: https://bugzilla.mozilla.org/show_bug.cgi?id=1838761. I will try to think of a workaround for Firefox.

That's quite interesting.  I downloaded Chrome and successfully used http and was able to access TIPI via the real RPI via websocket.  My current fps in the F18A demo Monkey Island ran at 55.8, which is comparable to Edge. I spent an hour trying to find a solution to the Edge issue - no combination of flags changed Edge's http/https operation so for now, I'll use Chrome.  Thanks for the redirect. ;)  Hopefully, Chrome won't start enforcing https. I read somewhere that hsts settings may do this after a timeout period but I don't know whether that applies in this situation.

Link to comment
Share on other sites

39 minutes ago, Asmusr said:

I have uploaded a version where the performance issue Firefox should be fixed. The only downside is that it always stops when you switch to another tab in Firefox (as if you select the option "Pause when window loses focus").

This is fantastic - Firefox now renders at a full 60 fps on my system, better than any other browser!

 

My game relies on some per-frame rendering tricks and they render at a much higher quality on Firefox now than on any other browser with js99er or even with classic99 (via Wine).  Thanks!

 

  • Like 2
Link to comment
Share on other sites

5 hours ago, InsaneMultitasker said:

That's quite interesting.  I downloaded Chrome and successfully used http and was able to access TIPI via the real RPI via websocket.  My current fps in the F18A demo Monkey Island ran at 55.8, which is comparable to Edge. I spent an hour trying to find a solution to the Edge issue - no combination of flags changed Edge's http/https operation so for now, I'll use Chrome.  Thanks for the redirect. ;)  Hopefully, Chrome won't start enforcing https. I read somewhere that hsts settings may do this after a timeout period but I don't know whether that applies in this situation.

I've found in chrome that you need to check for the "Not secure" at the url address bar before proceeding.. if it doesn't say that it's https: you then need to click on the url and change it to http

  • Like 1
Link to comment
Share on other sites

On 12/25/2023 at 5:01 PM, retroclouds said:

Having said that, there's a way to do that though (independent of the JS99er version). The bigger the log file gets, the slower it gets in the end. This is then when it starts to behave sluggish.

So there's 2 topics that help getting the log to get very big: 1) The periodic framerate display,  2) The disk I/O messages in the log. This makes it especially noticeable when reading/writing large files, e.g. > 100KB

I have now limited the number of lines in the log to 4096 (an arbitrary size that I guess is sufficient for most purposes). 

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Hi Rasmus

I have a bug report:

Saving to Cassette is not working properly.  (makes a horrid garbled and high pitched sound, very similar to Yoko Ono singing)

It seems to load cassettes that have already been made.  It loaded my latest one fine (saved in mame) but did the "press cassette stop and press enter" before the loading sounds had even stopped.

 

 

 

  • Haha 1
Link to comment
Share on other sites

4 hours ago, Necrospect said:

Saving to Cassette is not working properly.  (makes a horrid garbled and high pitched sound, very similar to Yoko Ono singing)

It's working for me. Which browser are you using? How many FSP does the log show?

 

4 hours ago, Necrospect said:

It seems to load cassettes that have already been made.  It loaded my latest one fine (saved in mame) but did the "press cassette stop and press enter" before the loading sounds had even stopped.

It's difficult to sync the sound to the CPU emulation in this case.

Edited by Asmusr
Link to comment
Share on other sites

1 hour ago, Asmusr said:

It's working for me. Which browser are you using? How many FSP does the log show?

I'm on Google Chrome, and the log shows a steady 58.8 fps consistent.  

It's only just started happening.  Trying to record a cassette is the only issue, it loads other cassettes fine

Link to comment
Share on other sites

1 hour ago, Retrospect said:

I'm on Google Chrome, and the log shows a steady 58.8 fps consistent.  

It's only just started happening.  Trying to record a cassette is the only issue, it loads other cassettes fine

Hmm, did you try to restart the computer? 🙂

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...