commit 5ddd2ed571b47555d08ffbe142e0237f3258b4dd
parent 9c78ab51930972d48f1814eff51212fad94d6b31
Author: Luxferre <3335173-suborg@users.noreply.gitlab.com>
Date: Fri, 29 Jul 2022 07:56:45 +0300
Updated the screen implementation according to the spec
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/web/esop-ext.js b/web/esop-ext.js
@@ -79,6 +79,8 @@ function ESOPExtensions() {
// also, we need to set up the screen vector
var rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame
rAF(function vecframe() {
+ //the order is: clear - vector - render
+ vm.setramblk(vramOffset, new Uint8Array(vramSize))
vm.triggerVector(0)
renderScreen()
if(vm.active)
diff --git a/web/uxncore.js b/web/uxncore.js
@@ -171,6 +171,7 @@ function UxnCore() {
getdev: function(port) {return mem.dev[port]},
getram: function(start, length) {return mem.ram.subarray(start, start+length)},
setram: function(addr, bVal) {mem.ram[addr] = bVal},
+ setramblk: function(addr, blk) {mem.ram.set(blk, addr)},
setWriteHook: function(port, cb) {
if(!cb) cb = function(){}
devWriteHooks[port] = cb