Libraries, utilities, bootloaders...
by erico » Fri May 06, 2016 1:28 am
Works like a charm on the desktop, it even makes those faster games easier to play.
I can also run it on chrome on my galaxy note II at about 25fps.
I can´t play obviously because of lack of keyboard but it works fine. Sound stuttered a bit probably cause of the fps.
Great work there!
-
![User avatar](./download/file.php?avatar=293_1411019334.png)
erico
-
- Posts: 671
- Joined: Thu Mar 27, 2014 9:29 pm
- Location: Brazil
-
by Sorunome » Fri May 06, 2016 5:12 am
Have you considered using emscfipten for this project?
Or, well, on of the c# to js compilers
-
![User avatar](./download/file.php?avatar=1544_1461863552.png)
Sorunome
-
- Posts: 629
- Joined: Sun Mar 01, 2015 1:58 pm
-
by Sutchig » Tue May 10, 2016 8:29 am
tested Digger with Firefox and it works great
![Smile :)](./images/smilies/icon_e_smile.gif)
What does the fps mean? If its above 20fps, then not slower than Gamebuino? I guess so, just wanna be sure
![Wink ;)](./images/smilies/icon_e_wink.gif)
I have problems with sd-card access.
Tested b-rally and loader with an image which works well in Simbuino (Win).
Firefox&Chrome, Win10
There is no error at the JS-Console (except missing PortRegister.htm)
The image is loaded (verified via taskmanager -> RAM usage), but loader prints: insert sd-card, and b-rally "hangs"
![Sad :(](./images/smilies/icon_e_sad.gif)
what game should work?
-
Sutchig
-
- Posts: 67
- Joined: Sat May 23, 2015 3:48 pm
by Myndale » Wed May 11, 2016 2:25 am
Sorunome wrote:Have you considered using emscfipten for this project? Or, well, on of the c# to js compilers
Haven't used either, to be honest. Have you had much experience with them yourself?
-
Myndale
-
- Posts: 507
- Joined: Sat Mar 01, 2014 1:25 am
by Myndale » Wed May 11, 2016 2:35 am
Sutchig wrote:What does the fps mean? If its above 20fps, then not slower than Gamebuino? I guess so, just wanna be sure
![Wink ;)](./images/smilies/icon_e_wink.gif)
The FPS is a bit of an arbitrary metric I use in the absence of proper display refresh circuitry, if it's running at the same speed as Gamebuino then it should show around 60. On other platforms the game update rate is typically tied to the refresh rate in order to minimize tearing, which historically has been at least 60 (the exception being when you decouple the world modelling rate from the graphics, but I digress). The 5110 LCD device doesn't support refresh notification or even have a fixed frame rate, and while Rodot's library drives the screen at a default of 20 some games do change it for greyscale etc. So what this version of Simbuino does instead is simulate CPU cycles in chunks of 1/60th of a second i.e. ~267k cycles per "frame", and the LCD just updates as-and-when it receives the data. This gives a standard way of measuring performance irrespective of actual frame rate and ensures that responsiveness of the key press handling is never delayed by more than 17ms, just as if you were running at "60fps". If the simulator says 60fps then it means it's running at 100% speed (i.e. ~16,000,000 CPU cycles per second). On slower machines it'll drop under that and the sound will start to break up, on faster machines the frame rate will be clamped.
Sutchig wrote:I have problems with sd-card access.
Sorry about that, there's a bug in the IMG code and I accidentally pushed a version out with all that stuff enabled before it was working properly. Thanks for the heads-up, gimme a day or two and I'll post back here when it's fixed.
-
Myndale
-
- Posts: 507
- Joined: Sat Mar 01, 2014 1:25 am
by Sorunome » Wed May 11, 2016 7:30 am
Myndale wrote:Sorunome wrote:Have you considered using emscfipten for this project? Or, well, on of the c# to js compilers
Haven't used either, to be honest. Have you had much experience with them yourself?
No, I don't have any experience with that, sorry.
However, if they take use of asm.js (i know emscripten does) then you have near-native speed with your compiled JS.
Also, due to compiler optimizations compiled JS usually performs better that self-written JS.
Another way to increase performance would be to minify the JS
![Razz :P](./images/smilies/icon_razz.gif)
-
![User avatar](./download/file.php?avatar=1544_1461863552.png)
Sorunome
-
- Posts: 629
- Joined: Sun Mar 01, 2015 1:58 pm
-
by Myndale » Sat May 14, 2016 6:04 am
Sutchig wrote:I have problems with sd-card access.
This has been fixed now. I've also added the bootloader and support for the SPM instruction, so LOADER.HEX is can now list games and from an IMG file and flash them to memory. However, I still haven't gotten around to implementing the watchdog timer, so although the games are actually being written to memory the bootloader has no way of resetting the device in order to start them. Oh well, one thing at a time...for now though reading data files off SD should work fine.
-
Myndale
-
- Posts: 507
- Joined: Sat Mar 01, 2014 1:25 am
by Sutchig » Sat May 14, 2016 7:23 pm
Thanks, SD-card access with petitfatfs works with Firefox (Win10)
![Smile :)](./images/smilies/icon_e_smile.gif)
Tested with b-rally and the old loader you included.
Thanks
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
whats not working is access with the new loader (sdfat library??). It doesn't work with Win-simbuino too. Maybe the library uses some different sdcard commands?
-
Sutchig
-
- Posts: 67
- Joined: Sat May 23, 2015 3:48 pm
by Myndale » Tue May 17, 2016 7:32 am
Sutchig wrote:whats not working is access with the new loader (sdfat library??). It doesn't work with Win-simbuino too. Maybe the library uses some different sdcard commands?
Actually it was due to my IMG code presenting the card physically as an early generation device, which I did in the (evidently) mistaken belief that it would increase the likelihood of compatibility with all SD libs. For some reason sdfat just doesn't like it. Fixed now in the HTML5 version, I'll roll it out to the Windows version sometime tomorrow. Thanks for the help with testing!
-
Myndale
-
- Posts: 507
- Joined: Sat Mar 01, 2014 1:25 am
by Sutchig » Tue May 17, 2016 7:07 pm
Many thanks
![Smile :)](./images/smilies/icon_e_smile.gif)
tested with current Firefox and:
simple sd.init() sketch (SDFat)
![Razz :P](./images/smilies/icon_razz.gif)
wolf3d (petitfatfs)
current loader.hex (SDFat)
all works fine
![Smile :)](./images/smilies/icon_e_smile.gif)
GB-fat by Sorunome (
viewtopic.php?f=13&t=3392) should work, too. As its derived from SDFat if i remember correctly.
Will test it as soon as possible.
I'm really impressed what possible with JavaScript and Browsers today. (like JSLinux)
//edit: simple tinyFAT-test-sketch (open file and read 80bytes) works
![Smile :)](./images/smilies/icon_e_smile.gif)
Last edited by
Sutchig on Wed May 18, 2016 6:07 pm, edited 1 time in total.
-
Sutchig
-
- Posts: 67
- Joined: Sat May 23, 2015 3:48 pm
Return to Software Development
Who is online
Users browsing this forum: No registered users and 100 guests