mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-25 11:29:32 +00:00
Trying different colour palettes
This commit is contained in:
parent
e74e2f4a11
commit
1e1df8e633
|
@ -7,25 +7,45 @@ import com.bytezone.diskbrowser.utilities.HexFormatter;
|
|||
|
||||
public class DoubleHiResImage extends HiResImage
|
||||
{
|
||||
// private static final int BLACK = 0x000000;
|
||||
// private static final int MAGENTA = 0xFF00FF;
|
||||
// private static final int BROWN = 0x994C00;
|
||||
// private static final int ORANGE = 0xFF9933;
|
||||
// private static final int DARK_GREEN = 0x006600;
|
||||
// private static final int GRAY = 0xA0A0A0;
|
||||
// private static final int GREEN = 0x00CC00;
|
||||
// private static final int YELLOW = 0xFFFF33;
|
||||
// private static final int DARK_BLUE = 0x0066CC;
|
||||
// private static final int PURPLE = 0xCC00CC;
|
||||
// private static final int PINK = 0xFFCCE5;
|
||||
// private static final int MEDIUM_BLUE = 0x3399FF;
|
||||
// private static final int LIGHT_BLUE = 0x99CCFF;
|
||||
// private static final int AQUA = 0x99FFFF;
|
||||
// private static final int WHITE = 0xFFFFFF;
|
||||
|
||||
// private static int[] palette =
|
||||
// { BLACK, MAGENTA, BROWN, ORANGE, DARK_GREEN, GRAY, GREEN, YELLOW, DARK_BLUE, PURPLE,
|
||||
// GRAY, PINK, MEDIUM_BLUE, LIGHT_BLUE, AQUA, WHITE };
|
||||
|
||||
private static final int BLACK = 0x000000;
|
||||
private static final int MAGENTA = 0xFF00FF;
|
||||
private static final int BROWN = 0x994C00;
|
||||
private static final int ORANGE = 0xFF9933;
|
||||
private static final int DARK_GREEN = 0x006600;
|
||||
private static final int GRAY = 0xA0A0A0;
|
||||
private static final int GREEN = 0x00CC00;
|
||||
private static final int YELLOW = 0xFFFF33;
|
||||
private static final int DARK_BLUE = 0x0066CC;
|
||||
private static final int PURPLE = 0xCC00CC;
|
||||
private static final int PINK = 0xFFCCE5;
|
||||
private static final int MEDIUM_BLUE = 0x3399FF;
|
||||
private static final int LIGHT_BLUE = 0x99CCFF;
|
||||
private static final int AQUA = 0x99FFFF;
|
||||
private static final int MAGENTA = 0x722640;
|
||||
private static final int DARK_BLUE = 0x40337F;
|
||||
private static final int PURPLE = 0xE434FE;
|
||||
private static final int DARK_GREEN = 0x0E5940;
|
||||
private static final int GRAY = 0x808080;
|
||||
private static final int MEDIUM_BLUE = 0x1B9AEF;
|
||||
private static final int LIGHT_BLUE = 0xBFB3FF;
|
||||
private static final int BROWN = 0x404C00;
|
||||
private static final int ORANGE = 0xE46501;
|
||||
private static final int PINK = 0xF1A6BF;
|
||||
private static final int GREEN = 0x1BCB01;
|
||||
private static final int YELLOW = 0xBFCC80;
|
||||
private static final int AQUA = 0x8DD9BF;
|
||||
private static final int WHITE = 0xFFFFFF;
|
||||
|
||||
private static int[] palette =
|
||||
{ BLACK, MAGENTA, BROWN, ORANGE, DARK_GREEN, GRAY, GREEN, YELLOW, DARK_BLUE, PURPLE,
|
||||
GRAY, PINK, MEDIUM_BLUE, LIGHT_BLUE, AQUA, WHITE };
|
||||
{ BLACK, MAGENTA, DARK_BLUE, PURPLE, DARK_GREEN, GRAY, MEDIUM_BLUE, LIGHT_BLUE,
|
||||
BROWN, ORANGE, GRAY, PINK, GREEN, YELLOW, AQUA, WHITE };
|
||||
|
||||
private final byte[] auxBuffer;
|
||||
private DoubleScrunch doubleScrunch;
|
||||
|
|
|
@ -71,18 +71,8 @@ public class DoubleScrunch extends CPU
|
|||
mem_71D4 = sta ();
|
||||
plp ();
|
||||
|
||||
if (negative)
|
||||
{
|
||||
boolean finished = blockB ();
|
||||
if (finished)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean finished = blockA ();
|
||||
if (finished)
|
||||
break;
|
||||
}
|
||||
if (negative ? blockB () : blockA ())
|
||||
break;
|
||||
|
||||
zp_00 = inc (zp_00);
|
||||
if (zero)
|
||||
|
@ -138,8 +128,6 @@ public class DoubleScrunch extends CPU
|
|||
zp_00 = inc (zp_00);
|
||||
if (zero)
|
||||
zp_01 = inc (zp_01);
|
||||
|
||||
assert !zero;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,6 +146,8 @@ public class DoubleScrunch extends CPU
|
|||
|
||||
// switch page
|
||||
byte[] target = carry ? primaryBuffer : auxBuffer;
|
||||
|
||||
// store byte
|
||||
sta (target, indirectY (dst, zp_26, zp_27));
|
||||
|
||||
plp ();
|
||||
|
@ -172,7 +162,7 @@ public class DoubleScrunch extends CPU
|
|||
|
||||
lsr ();
|
||||
lsr ();
|
||||
ora (zp_26);
|
||||
ora (zp_26); // graphics page ($20 or $40)
|
||||
zp_26 = sta ();
|
||||
|
||||
txa ();
|
||||
|
@ -191,7 +181,7 @@ public class DoubleScrunch extends CPU
|
|||
|
||||
lda (zp_27);
|
||||
and ((byte) 0x1F); // clear bits 7-5
|
||||
ora (zp_E6);
|
||||
ora (zp_E6); // graphics page ($20 or $40)
|
||||
zp_27 = sta ();
|
||||
}
|
||||
|
||||
|
|
|
@ -79,8 +79,6 @@ public abstract class CPU
|
|||
negative = (tmp & 0x80) != 0;
|
||||
carry = (aReg & 0xFF) >= (value & 0xFF);
|
||||
debug ("CMP");
|
||||
if (debug)
|
||||
System.out.printf (" cmp a: %02X v: %02X%n", aReg, value);
|
||||
}
|
||||
|
||||
protected void cpx (byte value) // CPX
|
||||
|
@ -90,8 +88,6 @@ public abstract class CPU
|
|||
negative = (tmp & 0x80) != 0;
|
||||
carry = (xReg & 0xFF) >= (value & 0xFF);
|
||||
debug ("CPX");
|
||||
if (debug)
|
||||
System.out.printf (" cpx x: %02X v: %02X%n", xReg, value);
|
||||
}
|
||||
|
||||
protected void cpy (byte value) // CPY
|
||||
|
@ -101,8 +97,6 @@ public abstract class CPU
|
|||
negative = (tmp & 0x80) != 0;
|
||||
carry = (yReg & 0xFF) >= (value & 0xFF);
|
||||
debug ("CPY");
|
||||
if (debug)
|
||||
System.out.printf (" cpy y: %02X v: %02X%n", yReg, value);
|
||||
}
|
||||
|
||||
protected byte dec (byte value) // DEC
|
||||
|
@ -333,7 +327,10 @@ public abstract class CPU
|
|||
debug ("SEI");
|
||||
}
|
||||
|
||||
protected abstract String debugString ();
|
||||
protected String debugString ()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
protected void debug (String cmd)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user