mirror of
https://github.com/badvision/jace.git
synced 2024-11-28 10:52:33 +00:00
Cleared up funky behavior on lo-res graphics, and some improvement on rendering for Crazy Cycles demo
This commit is contained in:
parent
ca6a831020
commit
c261f0f103
@ -90,22 +90,24 @@ public class VideoNTSC extends VideoDHGR {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void displayLores(WritableImage screen, int xOffset, int y, int rowAddress) {
|
protected void displayLores(WritableImage screen, int xOffset, int y, int rowAddress) {
|
||||||
|
int data = ((RAM128k) computer.getMemory()).getMainMemory().readByte(rowAddress + xOffset) & 0x0FF;
|
||||||
int pos = xOffset >> 1;
|
int pos = xOffset >> 1;
|
||||||
if (rowStart < 0) {
|
if (rowStart < 0) {
|
||||||
rowStart = pos;
|
rowStart = pos;
|
||||||
}
|
}
|
||||||
colorActive[xOffset * 2] = colorActive[xOffset * 2 + 1] = true;
|
colorActive[xOffset * 2] = true;
|
||||||
int data = ((RAM128k) computer.getMemory()).getMainMemory().readByte(rowAddress + xOffset) & 0x0FF;
|
colorActive[xOffset * 2 + 1] = true;
|
||||||
if ((xOffset & 1) == 0) {
|
if ((xOffset & 1) == 0) {
|
||||||
|
int pat = scanline[pos] & 0x0fffc000;
|
||||||
if ((y & 7) < 4) {
|
if ((y & 7) < 4) {
|
||||||
data &= 15;
|
data &= 15;
|
||||||
} else {
|
} else {
|
||||||
data >>= 4;
|
data >>= 4;
|
||||||
}
|
}
|
||||||
int pat = data | data << 4 | data << 8 | (data & 3) << 12;
|
pat |= data | data << 4 | data << 8 | (data & 3) << 12;
|
||||||
scanline[pos] = pat;
|
scanline[pos] = pat;
|
||||||
} else {
|
} else {
|
||||||
int pat = scanline[pos];
|
int pat = scanline[pos] & 0x03fff;
|
||||||
if ((y & 7) < 4) {
|
if ((y & 7) < 4) {
|
||||||
data &= 15;
|
data &= 15;
|
||||||
} else {
|
} else {
|
||||||
|
@ -164,7 +164,7 @@ public abstract class Video extends Device {
|
|||||||
x = -1;
|
x = -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isVblank && x < (APPLE_CYCLES_PER_LINE-1)) {
|
if (!isVblank && x < APPLE_CYCLES_PER_LINE) {
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
if (x >= APPLE_CYCLES_PER_LINE - 1) {
|
if (x >= APPLE_CYCLES_PER_LINE - 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user