Package client.teavm.common.video
Klasse PALEmulationTeaVM
java.lang.Object
client.teavm.common.video.PALEmulationTeaVM
- Alle implementierten Schnittstellen:
IPALEmulation
RGBA (MSB to LSB) pixel data big endian.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate int[]Prevailing table for looking up color for current line (odd/even)private final int[]Table for looking up color using a packed 2x8 value for even rasterlinesprivate final int[]Table for looking up color using a packed 2x8 value for odd rasterlinesprivate byte[]Prevailing VIC color palette for current line (odd/even)private final byte[]VIC color palette for even rasterlinesprivate final byte[]VIC color palette for odd rasterlinesprivate intprivate final intprivate intPrevious sequencer dataprivate booleanprivate ByteBufferprivate final byte[]Last line's colorprivate intIndex into last lineprivate final int[]RGBA pixel data (MSB to LSB) big endian. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungPALEmulationTeaVM(int nthFrame, CPUClock cpuClock, int[] combinedLinesEven, int[] combinedLinesOdd, byte[] linePaletteEven, byte[] linePaletteOdd) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoiddetermineCurrentPalette(int rasterY, boolean isFrameStart) Determine palette for current raster line.voiddrawPixels(int graphicsDataBuffer) Draw eight pixels at once.intGets the currently used palette.voidreset()voidsetPalEmulationEnable(boolean palEmulationEnable) voidsetVicPaletteNoPal(int[] vicPaletteNoPal) voidUpdates the palette using the current palette settings.
-
Felddetails
-
vicPaletteNoPal
private final int[] vicPaletteNoPalRGBA pixel data (MSB to LSB) big endian. VIC colors without PAL emulation. Use this palette for VIC colors 0-15. https://www.pepto.de/projects/colorvic/2001/ -
nthFrame
private final int nthFrame -
combinedLinesEven
private final int[] combinedLinesEvenTable for looking up color using a packed 2x8 value for even rasterlines -
combinedLinesOdd
private final int[] combinedLinesOddTable for looking up color using a packed 2x8 value for odd rasterlines -
linePaletteEven
private final byte[] linePaletteEvenVIC color palette for even rasterlines -
linePaletteOdd
private final byte[] linePaletteOddVIC color palette for odd rasterlines -
previousLineDecodedColor
private final byte[] previousLineDecodedColorLast line's color -
combinedLinesCurrent
private int[] combinedLinesCurrentPrevailing table for looking up color for current line (odd/even) -
linePaletteCurrent
private byte[] linePaletteCurrentPrevailing VIC color palette for current line (odd/even) -
previousLineIndex
private int previousLineIndexIndex into last line -
oldGraphicsData
private int oldGraphicsDataPrevious sequencer data -
n
private int n -
pixels
-
palEmulationEnable
private boolean palEmulationEnable
-
-
Konstruktordetails
-
PALEmulationTeaVM
public PALEmulationTeaVM(int nthFrame, CPUClock cpuClock, int[] combinedLinesEven, int[] combinedLinesOdd, byte[] linePaletteEven, byte[] linePaletteOdd)
-
-
Methodendetails
-
determineCurrentPalette
public void determineCurrentPalette(int rasterY, boolean isFrameStart) Determine palette for current raster line.- Angegeben von:
determineCurrentPalettein SchnittstelleIPALEmulation- Parameter:
rasterY- current raster lineisFrameStart- a new frame is about to start?
-
drawPixels
public void drawPixels(int graphicsDataBuffer) Draw eight pixels at once. Pixels arrive in 0x12345678 order (MSB to LSB).- Angegeben von:
drawPixelsin SchnittstelleIPALEmulation- Parameter:
graphicsDataBuffer- eight pixels each of 4 bits (VIC color value range 0x0-0xF)
-
updatePalette
public void updatePalette()Beschreibung aus Schnittstelle kopiert:IPALEmulationUpdates the palette using the current palette settings.- Angegeben von:
updatePalettein SchnittstelleIPALEmulation
-
setPalEmulationEnable
public void setPalEmulationEnable(boolean palEmulationEnable) - Angegeben von:
setPalEmulationEnablein SchnittstelleIPALEmulation
-
setVicPaletteNoPal
public void setVicPaletteNoPal(int[] vicPaletteNoPal) - Angegeben von:
setVicPaletteNoPalin SchnittstelleIPALEmulation
-
getPalette
Beschreibung aus Schnittstelle kopiert:IPALEmulationGets the currently used palette.- Angegeben von:
getPalettein SchnittstelleIPALEmulation- Gibt zurück:
- The currently used palette.
-
getNthFrame
public int getNthFrame() -
getPixels
- Angegeben von:
getPixelsin SchnittstelleIPALEmulation- Gibt zurück:
- Output RGBA screen buffer as int32 array. MSB to LSB -> red, green, blue, alpha
-
getPixelsAsIntBuffer
- Angegeben von:
getPixelsAsIntBufferin SchnittstelleIPALEmulation
-
reset
public void reset()- Angegeben von:
resetin SchnittstelleIPALEmulation
-