mirror of
https://github.com/exoticorn/microw8.git
synced 2026-11-13 23:17:19 +01:00
add frame counter at memory location 72
This commit is contained in:
1 parent
b85f96b0bb
commit
fb3fd5e8bb
5 files changed
+18
-9
No files matched your search
@@ -240,6 +240,7 @@ export default function MicroW8(screen, config = {}) {
|
||||
await audioReadyPromise;
|
||||
|
||||
let startTime = Date.now();
|
||||
let frameCounter = 0;
|
||||
|
||||
const timePerFrame = 1000 / 60;
|
||||
|
||||
@@ -306,6 +307,7 @@ export default function MicroW8(screen, config = {}) {
|
||||
let time = Date.now() - startTime;
|
||||
u32Mem[16] = time;
|
||||
u32Mem[17] = pad | gamepad;
|
||||
u32Mem[18] = frameCounter++;
|
||||
if(instance.exports.upd) {
|
||||
instance.exports.upd();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user