|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.monkeycoder.monkeynes.hardware.NesHardware
This represents the physical NES unit. It contains the CPU, PPU, memory banks, the ROM cartrige,
controller ports, the system clock, and a connection to the video screen. This class ties it
all together into a nice little bundle.
Originally part of the MonkeyNES project.
| Constructor Summary | |
NesHardware()
Creates a new NesHardware which in turn creates all if the internal components of the NES. |
|
| Method Summary | |
void |
connectController(NesController inController,
int inPort)
Connects a controller to the hardware through a specified controller port. |
void |
connectVideoScreen(VideoScreen inVidScreen)
Connects the video screen to the hardware. |
NesController |
getController(int inPortNum)
Returns the controller for the specified port. |
NesCpu |
getCpu()
Returns the CPU created by and in use by this hardware. |
NesMainMemory |
getMainMemory()
Returns the Main Memory bank created by and in use by this hardware. |
MemoryMapper |
getMemoryMapper()
Returns the MemoryMapper in use by the NesRom. |
NesPalette |
getPalette()
Returns the palette created by and in use by this hardware. |
NesPpu |
getPpu()
Returns the PPU created by and in use by this hardware. |
NesRom |
getRom()
Returns the NesRom currently in the ROM slot of this hardware. |
NesSpriteMemory |
getSpriteMemory()
Returns the Sprite Memory bank created by and in use by this hardware. |
NesVideoMemory |
getVideoMemory()
Returns the Video Memory bank created by and in use by this hardware. |
VideoScreen |
getVideoScreen()
Returns the VideoScreen that is attached to this hardware. |
void |
insertRom(NesRom inRom)
Puts a ROM cartrige into the front of the system. |
boolean |
isPowerOn()
Returns whether or not the power is on in the hardware. |
void |
powerOff()
Called to tell the hardware that power is now off. |
void |
powerOn()
Called to tell the hardware that power is now on. |
NesRom |
removeRom()
Removes a ROM cartrige fron the system. |
void |
reset()
Called to tell the hardware to reset. |
void |
run()
Threaded run method so the hardware can operate in it's own thread. |
void |
setClockSpeed(long inClockSpeed)
Sets the speed of the timer chip in the NES. |
String |
toString()
Creates a huge text readout detailing everything currently connected to the hardware. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NesHardware()
| Method Detail |
public void setClockSpeed(long inClockSpeed)
inClockSpeed - The speed of the timer in Hz.public void connectVideoScreen(VideoScreen inVidScreen)
inVidScreen - The video screen that will receive output from the PPU.
public void connectController(NesController inController,
int inPort)
inController - The controller that will be plugged into the port.inPort - The port the into which the controller will be plugged.public void insertRom(NesRom inRom)
inRom - The cartrige that is being inserted into the hardware.public NesRom removeRom()
public boolean isPowerOn()
public void powerOn()
public void powerOff()
public void reset()
public void run()
run in interface Runnablepublic NesCpu getCpu()
public NesPpu getPpu()
public VideoScreen getVideoScreen()
public NesRom getRom()
public MemoryMapper getMemoryMapper()
public NesMainMemory getMainMemory()
public NesVideoMemory getVideoMemory()
public NesSpriteMemory getSpriteMemory()
public NesPalette getPalette()
public NesController getController(int inPortNum)
inPortNum - The port number that will be returned.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||