wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
462 stars 73 forks source link

Mega example only renders first frame on 0.12 #66

Closed elliottkember closed 3 years ago

elliottkember commented 3 years ago

I'm trying to update to the latest code, but just can't figure out how to make it work quite right :)

I got pretty far in my 0.12 implementation but got stuck at rendering only the first frame.

Going to keep investigating and see if I can figure out what changed.

https://stackblitz.com/edit/avr8js-mega-ws2812-mdzn4x?file=package.json

urish commented 3 years ago

From my testing so far, it seems like it gets broken starting from version 0.11.1 (0.11.0 works fine), can you confirm if you are observing the same?

urish commented 3 years ago

I think I spotted it - can you try changing the value of FLASH in execute.ts to 0x40000 and see if it helps?

elliottkember commented 3 years ago

I think I spotted it - can you try changing the value of FLASH in execute.ts to 0x40000 and see if it helps?

That works! ~It seems to be running quite slowly. I'll debug that and see whether that's something in my code.~ I moved it back into a worker and it's super fast! Thank you!

urish commented 3 years ago

Lovely!