Klasse PALEmulationTeaVM

java.lang.Object
client.teavm.common.video.PALEmulationTeaVM
Alle implementierten Schnittstellen:
IPALEmulation

public class PALEmulationTeaVM extends Object implements IPALEmulation
RGBA (MSB to LSB) pixel data big endian.
  • Felddetails

    • vicPaletteNoPal

      private final int[] vicPaletteNoPal
      RGBA 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[] combinedLinesEven
      Table for looking up color using a packed 2x8 value for even rasterlines
    • combinedLinesOdd

      private final int[] combinedLinesOdd
      Table for looking up color using a packed 2x8 value for odd rasterlines
    • linePaletteEven

      private final byte[] linePaletteEven
      VIC color palette for even rasterlines
    • linePaletteOdd

      private final byte[] linePaletteOdd
      VIC color palette for odd rasterlines
    • previousLineDecodedColor

      private final byte[] previousLineDecodedColor
      Last line's color
    • combinedLinesCurrent

      private int[] combinedLinesCurrent
      Prevailing table for looking up color for current line (odd/even)
    • linePaletteCurrent

      private byte[] linePaletteCurrent
      Prevailing VIC color palette for current line (odd/even)
    • previousLineIndex

      private int previousLineIndex
      Index into last line
    • oldGraphicsData

      private int oldGraphicsData
      Previous sequencer data
    • n

      private int n
    • pixels

      private ByteBuffer 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:
      determineCurrentPalette in Schnittstelle IPALEmulation
      Parameter:
      rasterY - current raster line
      isFrameStart - 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:
      drawPixels in Schnittstelle IPALEmulation
      Parameter:
      graphicsDataBuffer - eight pixels each of 4 bits (VIC color value range 0x0-0xF)
    • updatePalette

      public void updatePalette()
      Beschreibung aus Schnittstelle kopiert: IPALEmulation
      Updates the palette using the current palette settings.
      Angegeben von:
      updatePalette in Schnittstelle IPALEmulation
    • setPalEmulationEnable

      public void setPalEmulationEnable(boolean palEmulationEnable)
      Angegeben von:
      setPalEmulationEnable in Schnittstelle IPALEmulation
    • setVicPaletteNoPal

      public void setVicPaletteNoPal(int[] vicPaletteNoPal)
      Angegeben von:
      setVicPaletteNoPal in Schnittstelle IPALEmulation
    • getPalette

      public IPalette getPalette()
      Beschreibung aus Schnittstelle kopiert: IPALEmulation
      Gets the currently used palette.
      Angegeben von:
      getPalette in Schnittstelle IPALEmulation
      Gibt zurück:
      The currently used palette.
    • getNthFrame

      public int getNthFrame()
    • getPixels

      public ByteBuffer getPixels()
      Angegeben von:
      getPixels in Schnittstelle IPALEmulation
      Gibt zurück:
      Output RGBA screen buffer as int32 array. MSB to LSB -> red, green, blue, alpha
    • getPixelsAsIntBuffer

      public IntBuffer getPixelsAsIntBuffer()
      Angegeben von:
      getPixelsAsIntBuffer in Schnittstelle IPALEmulation
    • reset

      public void reset()
      Angegeben von:
      reset in Schnittstelle IPALEmulation