6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 21, 2024 12:53 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Jul 08, 2016 7:16 am 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
There are a number of 6502 JavaScript emulators out there will give you a pretty decent performance on a PC.

Recently I got eager to know what the performance would be of a JavaScript emulator on a mobile device like an Android or an iPhone.

Obviously on a mobile device you will not have as much horsepower as on a desktop pc.

Has anyone attempted to write a JavaScript emulator that runs smoothly on a mobile device?

Any thoughts/stories welcome.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 08, 2016 7:55 am 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 277
fastgear wrote:
There are a number of 6502 JavaScript emulators out there will give you a pretty decent performance on a PC.

Recently I got eager to know what the performance would be of a JavaScript emulator on a mobile device like an Android or an iPhone.

Obviously on a mobile device you will not have as much horsepower as on a desktop pc.

Has anyone attempted to write a JavaScript emulator that runs smoothly on a mobile device?

Any thoughts/stories welcome.


Given that a typical modern mobile device (smartphone or tablet) has more than 2 times the performance of a Cray X-MP, I don't think that lack of horsepower should be a concern.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 08, 2016 8:39 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
I think support for a touch interface might be the biggest problem.

There's a list of JavaScript emulators at
https://github.com/fcambus/jsemu#emulat ... javascript
many of which are 6502.

(I did run the visual6502 on a Kindle at one time...)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 08, 2016 9:26 am 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
@rwiker: It seems that a native emulator like Frodo64 does run very smooth on a mobile device indeed. It does however seems that despite of recent improvements to JavaScript exceution in browsers, there is still a bit of an overhead. This overhead is not so noticeable when you run something like visual6502, as mentioned by BigEd. It is more noticeable when you play a game.

I did a test the other day on an core I7 pc. I first run Vice and looked at its cpu utilisation. It was constantly at 0%. I then fire up the C64 Javascript emulator I am developing in another post in Chrome. The Chrome task was utilising about 3% cpu. This might give an idea on what a mobile device might need to cope with.

@BigEd: Jip the touch screen is really a challenge. It is virtually impossible in Javascript to bring up the native system touch keyboard on demand. So, one is left to implement element responding to touchenter and touchleave events. It interesting, I haven't actually encountered any machine specific javascript emulator (e.g. C64 and so on) catering for a touch screen.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 08, 2016 10:01 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
C1Pjs seems to do reasonably well at managing focus on the ipad. Possibly it does it using contenteditable:true??
http://www.pcjs.org/docs/c1pjs/


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 08, 2016 6:43 pm 
Offline

Joined: Tue Jul 24, 2012 2:27 am
Posts: 672
I would assume that sticking to asm.js would give you realtime speed on handheld browsers, but of course that's abandoning most of the JS concepts for a more C-like model.

_________________
WFDis Interactive 6502 Disassembler
AcheronVM: A Reconfigurable 16-bit Virtual CPU for the 6502 Microprocessor


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: