Class NESPictureProcessingUnit

java.lang.Object
  |
  +--NESPictureProcessingUnit
Direct Known Subclasses:
Video

public class NESPictureProcessingUnit
extends java.lang.Object

This class only contains all the variables of the NES Picture Processing Unit, also known as PPU.
This code is GPL. :o) Copyright (c) 2000 Brice Fines.

  • This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
  • This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  • Version:
    0.2005 06/06/00
    Author:
    Jarod CANAL
    See Also:
    "The Gnu Public License."

    Field Summary
    protected  boolean AddressMode
              Indicates if byte is first or second half address.
    protected  int BackgroundClipping
              Indicates if background is visible in the left 8-pixel column.
    protected  char BackgroundPatternTableAddress
              Indicates background pattern table address base which can be 0 or 0x100 (for cache implementation purpose).
    protected  boolean BackgroundVisibility
              Indicates if background is visible.
    protected  byte ColorIntensity
              Indicates which color component (R, G, B) should be intensified.
    protected  byte FullBackgroundColor
              Indicates background color for monochrome display mode.
    protected  char HalfVRAMAddress
              First half of the VRAM address (high byte).
    protected  boolean IsDisplayTypeColorDisplay
              Indicates which display type is used: color or monochrome.
    protected  boolean IsExecuteNMIOnVBlankEnabled
              Indicates if NMI can be executed during VBlank.
    protected  boolean IsPPUSlave
              Indicates the PPU configuration.
    protected  boolean IsThereMoreThanEightSpritesOnScanline
               
    protected  char[] Memory
              Video RAM, also known as VRAM.
    protected  char NameTable1
              Indicates nameTable 1 address according to mirroring (vertical or horizontal, specified in the NES file header).
    protected  char NameTable2
              Indicates nameTable 2 address according to mirroring (vertical or horizontal, specified in the NES file header).
    protected  char Scanline
              Current scanline.
    protected  int SpriteClipping
              Indicates if sprites are visible in the left 8-pixel column.
    protected  char SpritePatternTableAddress
              Indicates sprite pattern table address base which can be 0 or 0x100 (for cache implementation purpose).
    protected  char[] SpriteRam
              Sprite RAM.
    protected  byte SpriteSize
              Indicates sprite size which can be 8 or 16.
    protected  boolean SpriteVisibility
              Indicates if sprites are visible.
    protected  char TempVRAMAddressRegister
              Temp VRam Address register.
    protected  char VRAMAddress
              Complete VRAM address (word).
    protected  byte VRAMAddressIncrement
              Indicates which value should be added to VRAM address: 1 or 32.
    protected  char VRAMAddressRegister
              VRAM address register ($2006).
    protected  char VRAMDataBuffer
              Buffer used to access VRAM data (except for color palette).
    protected  boolean WasSpriteZeroHit
              Indicates if sprite 0 was hit.
    protected  int XOffset
              Used in scroll effects.
     
    Constructor Summary
    NESPictureProcessingUnit()
               
     
    Method Summary
     void NESPictureProcessingUnit()
              Constructor.
     
    Methods inherited from class java.lang.Object
    , clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
     

    Field Detail

    Memory

    protected char[] Memory
    Video RAM, also known as VRAM.
    0x4000 bytes of RAM.

    SpriteRam

    protected char[] SpriteRam
    Sprite RAM.
    0x100 bytes of RAM.

    IsExecuteNMIOnVBlankEnabled

    protected boolean IsExecuteNMIOnVBlankEnabled
    Indicates if NMI can be executed during VBlank.
    True: execute NMI on VBlank.
    False: do not execute NMI on VBlank.

    IsPPUSlave

    protected boolean IsPPUSlave
    Indicates the PPU configuration.
    True: PPU is slave.
    False: PPU is master.
    This feature is unused by the NES.

    SpriteSize

    protected byte SpriteSize
    Indicates sprite size which can be 8 or 16.

    BackgroundPatternTableAddress

    protected char BackgroundPatternTableAddress
    Indicates background pattern table address base which can be 0 or 0x100 (for cache implementation purpose).

    SpritePatternTableAddress

    protected char SpritePatternTableAddress
    Indicates sprite pattern table address base which can be 0 or 0x100 (for cache implementation purpose).

    VRAMAddressIncrement

    protected byte VRAMAddressIncrement
    Indicates which value should be added to VRAM address: 1 or 32.

    IsDisplayTypeColorDisplay

    protected boolean IsDisplayTypeColorDisplay
    Indicates which display type is used: color or monochrome.

    BackgroundClipping

    protected int BackgroundClipping
    Indicates if background is visible in the left 8-pixel column.
    Values will be used to optimize code.

    SpriteClipping

    protected int SpriteClipping
    Indicates if sprites are visible in the left 8-pixel column.
    Values will be used to optimize code.

    BackgroundVisibility

    protected boolean BackgroundVisibility
    Indicates if background is visible.
    True: background is visible.
    False: background is invisible.

    SpriteVisibility

    protected boolean SpriteVisibility
    Indicates if sprites are visible.
    True: sprites are visible.
    False: sprites are invisible.

    ColorIntensity

    protected byte ColorIntensity
    Indicates which color component (R, G, B) should be intensified.
    Values will be used to optimize code.
    This feature is incomplete.

    FullBackgroundColor

    protected byte FullBackgroundColor
    Indicates background color for monochrome display mode.
    Values will be used to optimize code.
    This feature is incomplete.

    AddressMode

    protected boolean AddressMode
    Indicates if byte is first or second half address.
    True: first write (high byte).
    False: second write (low byte).
    Mainly used to control writes to 0x2005 and 0x2006 (they share this indicator).

    WasSpriteZeroHit

    protected boolean WasSpriteZeroHit
    Indicates if sprite 0 was hit.
    True: sprite 0 has been hit.
    False: sprite 0 has not been hit.
    This feature is incomplete.

    IsThereMoreThanEightSpritesOnScanline

    protected boolean IsThereMoreThanEightSpritesOnScanline

    VRAMDataBuffer

    protected char VRAMDataBuffer
    Buffer used to access VRAM data (except for color palette).

    HalfVRAMAddress

    protected char HalfVRAMAddress
    First half of the VRAM address (high byte).

    VRAMAddress

    protected char VRAMAddress
    Complete VRAM address (word).

    VRAMAddressRegister

    protected char VRAMAddressRegister
    VRAM address register ($2006).

    TempVRAMAddressRegister

    protected char TempVRAMAddressRegister
    Temp VRam Address register.
    xYYYXXXXXXXXXXXX where
    XXXXXXXXXXXX is nametable address (-$2000)
    YYY is tile Y offset
    x is unsued.

    XOffset

    protected int XOffset
    Used in scroll effects.
    Control the horizontal scroll (0 to 7 pixels).

    Scanline

    protected char Scanline
    Current scanline.
    Possible values are 0 to 255.

    NameTable1

    protected char NameTable1
    Indicates nameTable 1 address according to mirroring (vertical or horizontal, specified in the NES file header).
    Value can be 0x2000 or 0x2400, current implementation is imcomplete.

    NameTable2

    protected char NameTable2
    Indicates nameTable 2 address according to mirroring (vertical or horizontal, specified in the NES file header).
    Value can be 0x2000 or 0x2400, current implementation is incomplete.
    Constructor Detail

    NESPictureProcessingUnit

    public NESPictureProcessingUnit()
    Method Detail

    NESPictureProcessingUnit

    public void NESPictureProcessingUnit()
    Constructor.