Simbuino4Web released (was Simbuino emulator running in...)

Libraries, utilities, bootloaders...

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Sorunome » Tue May 17, 2016 7:56 pm

Sutchig wrote:Many thanks :)

tested with current Firefox and:
simple sd.init() sketch (SDFat) :P
wolf3d (petitfatfs)
current loader.hex (SDFat)
all works fine :)

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)

GBFat is derived from TinyFAT

Also, if this is working i might have to write some scripts to automatically generate IMG files so that i can acutally test the community RPG thing in an emulator, heehee
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Quirby64 » Wed May 18, 2016 4:01 am

I don't check the forum for a bit but then this! Heck yeah :)
I'll attempt playing this on my tablet later, seems cool.
User avatar
Quirby64
 
Posts: 131
Joined: Thu Nov 13, 2014 4:23 am
Location: USA

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Sutchig » Mon Jun 06, 2016 11:03 am

I played a little bit with the js-code and added I2C-Master mode (kind of) and a (very basic) mockup of an ADXL345-accelerometer device.
Thanks to the very good code (my opinion ;)) and comments by Myndale in the original Simbuino4Web-code, the real problem was to read the atmel-spec according TWI "backwards" :)
the fake device will not use any of the settings made by setting registers to the device (for instance: range, powermode, interval, doubletap threshold (it doesnt even support doubletap ;)) The only flag used is "powerup" to add the JS event listener.

http://www.scmar.de/Simbuino4Web.htm

I added a "I2C-Accel-Test" button with a little "game": try to get all balls in the hole... no startscreen (for use with smartphones), no gameover, no ..., just a test :)
it needs a device with builtin accelerometer (as most smartphones/tablets/convertibles) has, and a browser which supports deviceMotion event. (FF/Chrome...). You may want to lock screen orientation ;)

Oh, and for debugging purposes i redirected Serial.write()... to console.log().
Sutchig
 
Posts: 67
Joined: Sat May 23, 2015 3:48 pm

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby erico » Mon Jun 13, 2016 4:37 am

Performs greatly on my note II.
It rocks on an average of 15-20 fps, reads the accelerometer perfectly. :)
edit:better img size ;)
Attachments
PICT0068.JPG
PICT0068.JPG (213.33 KiB) Viewed 2745 times
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Leonskibeat » Mon Jun 13, 2016 3:47 pm

Excellent work Myndale, thank you.
Quick question, I have an Apple MacBook, and have been successfully running Simbuino4Web today, however is there an offline emulator I could use on my Mac?

Leonskibeat :ugeek:
User avatar
Leonskibeat
 
Posts: 11
Joined: Sat Jun 11, 2016 2:38 pm
Location: Bulverhythe, UK

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Sutchig » Mon Jun 13, 2016 4:37 pm

Hi :)
You can save the website local and load from there. There is no interaction with any server.
Sutchig
 
Posts: 67
Joined: Sat May 23, 2015 3:48 pm

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Leonskibeat » Mon Jun 13, 2016 8:02 pm

Yet again, thank you Sutchig - you're such a star!
I never knew that downloading a page as archive would include the code to run things;
all this time I just thought it was text/images/formatting..
Darn I learned something today - thank you Sutchig, thank you Myndale!

Kind regards - Leonskibeat :ugeek:
User avatar
Leonskibeat
 
Posts: 11
Joined: Sat Jun 11, 2016 2:38 pm
Location: Bulverhythe, UK

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Quirby64 » Mon Jun 13, 2016 9:40 pm

OK, I tested the emulator in Microsoft Edge, what I normally use. The screen is blurred, and two or more channels playing at the same time sounds...kind of like an an Atari 2600, or similar. It's still pretty awesome though. :P
User avatar
Quirby64
 
Posts: 131
Joined: Thu Nov 13, 2014 4:23 am
Location: USA

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby frakasss » Thu May 04, 2017 9:34 am

Hi Myndale,

I'm using your emulator quite often to test my devs. That's a great app!
Based on what you already did, I'm trying to think about a way to propose our visitors to play games directly on our website, without downloading hex files, and load them again after.

Something like a combo-box (replacing the file input field) where you could select the game you want to play to, and then just click 'Load' to launch the emulator.
That, or directly load a .img containing all the games...

Is that something feasible, or am I dreaming? :)
User avatar
frakasss
 
Posts: 97
Joined: Thu Dec 11, 2014 10:20 am
Location: France

Re: Simbuino4Web released (was Simbuino emulator running in.

Postby Myndale » Fri May 05, 2017 7:49 am

Putting games in a drop-down list would be very easy, but you'd need to know some Javascript. I'm already including jquery and jquery ui so you could easily use that for the list itself along with a handler that gets called when the user selects a new game.

The main change would involve replacing the OnLoadHex function in Simulation.js. As it stands that function currently creates a 'FileReader' object to read the HEX file off disk:

Code: Select all
var reader = new FileReader();
reader.onload = function (e) {
   try
   {
      self.CurrentFirmware = reader.result.replaceAll("\r", "").split("\n")
   // game gets loaded here with the HEX data in self.CurrentFirmware


To load games off a web site all you'd have to do is replace this with an AJAX call to pull the game off a web site instead, so something like this:

Code: Select all
$.get( URL_OF_YOUR_HEX_FILE, function(data) {
   self.CurrentFirmware = data;
   // load game here as per usual
});
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

PreviousNext

Return to Software Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron