s-macke / jor1k

Online OR1K Emulator running Linux
http://jor1k.com
BSD 2-Clause "Simplified" License
1.73k stars 196 forks source link

having terminal in non canvas / request animation frame in firefox 24 #67

Closed trabitboy closed 9 years ago

trabitboy commented 9 years ago

I have been trying to test from a place where the browser is locked to firefox 24, which normally supports requestAnimationFrame() but gives an error with the exact signature used in tty refresh.

Browsing the code I saw there is alternate/ legacy implementation that renders to a table, depending on the item type in the dom ; is it still supported ? is there an alternate index.html to try it .

Putting a small requestAnimationFrame test on my browser together, this api turns my brain around.

s-macke commented 9 years ago

Hi trabitboy actually it is working with a table. Try the following link: http://jor1k.com/jor1k/demos/termtable.html But the table version of the terminal also uses the requestAnimationFrame method at some point.

s-macke commented 9 years ago

I tried the current jor1k with Firefox 24 portable. Works without problems. What is the exact error message?

trabitboy commented 9 years ago

Tomorrow first thing, I am back on more recent FF for tonight :) Le 5 mai 2015 21:11, "Sebastian Macke" notifications@github.com a écrit :

I tried the current jor1k with Firefox 24 portable. Works without problems. What is the exact error message?

— Reply to this email directly or view it on GitHub https://github.com/s-macke/jor1k/issues/67#issuecomment-99187005.

trabitboy commented 9 years ago

sorry for incorrect report, version is firefox 22.0, error is :

[09:27:59.467] TypeError: window.requestAnimationFrame is not a function @ http://s-macke.github.io/jor1k/bin/jor1k-master-min.js:1034

trabitboy commented 9 years ago

you were right terminal version also blows up on request animation frame

but this seems to run so must use a slightly different / alternative api : http://jsperf.com/request-animation-frame-tests

trabitboy commented 9 years ago

no it gives an error too :) any chance of detecting the failure and putting the blit code in a setInterval() ? I can have a go myself . Trying to do a local setup of the emu for that.

trabitboy commented 9 years ago

Hi , I'll try to do a conditional lookup for (window.mozRequestAnimationFrame) window.mozRequestAnimationFrame(renderLoopRAF); as soon as I get a local version working ...

s-macke commented 9 years ago

Can you try the following link? http://jor1k.com/jor1k/demos/main.html I removed the requestanimationframe function.

trabitboy commented 9 years ago

It works ! That is awesome

On 7 May 2015 at 11:16, Sebastian Macke notifications@github.com wrote:

Can you try the following link? http://jor1k.com/jor1k/demos/main.html I removed the requestanimationframe function.

— Reply to this email directly or view it on GitHub https://github.com/s-macke/jor1k/issues/67#issuecomment-99787712.

s-macke commented 9 years ago

I removed the function requestanimationframe. Normally I wouldn't remove a feature just to support an old web browser. But the function call was never necessary and the patch makes the code easier to understand. https://github.com/s-macke/jor1k/commit/af6f3d83a820117b154ccaf3622e729190e851c9