forked from Apple-2-Tools/jace
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
|
||||
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;
|
||||
if (rowStart < 0) {
|
||||
rowStart = pos;
|
||||
}
|
||||
colorActive[xOffset * 2] = colorActive[xOffset * 2 + 1] = true;
|
||||
int data = ((RAM128k) computer.getMemory()).getMainMemory().readByte(rowAddress + xOffset) & 0x0FF;
|
||||
colorActive[xOffset * 2] = true;
|
||||
colorActive[xOffset * 2 + 1] = true;
|
||||
if ((xOffset & 1) == 0) {
|
||||
int pat = scanline[pos] & 0x0fffc000;
|
||||
if ((y & 7) < 4) {
|
||||
data &= 15;
|
||||
} else {
|
||||
data >>= 4;
|
||||
}
|
||||
int pat = data | data << 4 | data << 8 | (data & 3) << 12;
|
||||
pat |= data | data << 4 | data << 8 | (data & 3) << 12;
|
||||
scanline[pos] = pat;
|
||||
} else {
|
||||
int pat = scanline[pos];
|
||||
int pat = scanline[pos] & 0x03fff;
|
||||
if ((y & 7) < 4) {
|
||||
data &= 15;
|
||||
} else {
|
||||
|
@ -164,7 +164,7 @@ public abstract class Video extends Device {
|
||||
x = -1;
|
||||
}
|
||||
} else {
|
||||
if (!isVblank && x < (APPLE_CYCLES_PER_LINE-1)) {
|
||||
if (!isVblank && x < APPLE_CYCLES_PER_LINE) {
|
||||
draw();
|
||||
}
|
||||
if (x >= APPLE_CYCLES_PER_LINE - 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user