mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-16 17:30:27 +00:00
astrocade: support mid-screen updates w/ palette changes
This commit is contained in:
parent
96131f6cd0
commit
11957bb086
@ -156,7 +156,6 @@ TODO:
|
||||
- switching platform of a repo?
|
||||
- make sure to flatten subdirs
|
||||
- astrocade
|
||||
- what if update earlier part of screen with different palette? it'd be nice to have instant updates when debugging tho...
|
||||
- ctrl+alt+l on ubuntu locks screen
|
||||
|
||||
WEB WORKER FORMAT
|
||||
|
@ -103,14 +103,20 @@ const _BallyAstrocadePlatform = function(mainElement, arcade) {
|
||||
var palette = new Uint32Array(8);
|
||||
var palinds = new Uint8Array(8);
|
||||
var refreshlines = 0;
|
||||
var dirtylines = new Uint8Array(arcade ? 262 : 131);
|
||||
var vidactive = false;
|
||||
var rotdata = new Uint8Array(4);
|
||||
var rotcount = 0;
|
||||
var intst = 0;
|
||||
|
||||
function ramwrite(a:number, v:number) {
|
||||
// set RAM
|
||||
ram.mem[a] = v;
|
||||
ramupdate(a, v);
|
||||
// mark scanline as dirty
|
||||
dirtylines[Math.floor((a & 0xfff)/swbytes)] = 1;
|
||||
// this was old behavior where we updated instantly
|
||||
// but it had problems if we had mid-screen palette changes
|
||||
//ramupdate(a, v);
|
||||
}
|
||||
|
||||
function ramupdate(a:number, v:number) {
|
||||
@ -386,9 +392,14 @@ const _BallyAstrocadePlatform = function(mainElement, arcade) {
|
||||
}
|
||||
// refresh this line in frame buffer?
|
||||
if (sl < sheight && refreshlines>0) {
|
||||
dirtylines[sl] = 0;
|
||||
refreshline(sl);
|
||||
refreshlines--;
|
||||
}
|
||||
else if (dirtylines[sl]) {
|
||||
dirtylines[sl] = 0;
|
||||
refreshline(sl);
|
||||
}
|
||||
}
|
||||
if (!novideo) {
|
||||
video.updateFrame(0, 0, 0, 0, swidth, verbl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user