|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.co.javagear.Vdp
public final class Vdp
SMS and GG VDP Emulation.
Field Summary | |
---|---|
private boolean[] |
bgPriority
Background priorites. |
private int |
commandByte
Command word first byte latch. |
private int |
counter
Vertical line interrupt counter. |
private int[] |
cRam
Colour RAM. |
private int[] |
display
Pointer to current display. |
private int[] |
display1
Frame 1. |
private int[] |
display2
Frame 2. |
private boolean |
displayBackgroundLayer
Generate background layer. |
private boolean |
displaySpriteLayer
Generate sprite layer. |
private boolean |
firstByte
First or second byte of command word. |
private boolean |
frameint
Frame interrupt pending. |
private static int[] |
GG_JAVA1
GG Colours. |
private static int[] |
GG_JAVA2
|
private InterruptLine |
irq
Connection to Z80 interrupt line. |
private int |
line
Current line number. |
private boolean |
lineint
Line interrupt pending. |
private int |
location
Location in VRAM. |
private boolean |
ntsc
NTSC/PAL. |
private int[] |
oldDisplay
Pointer to previous frame. |
private int |
operation
Store type of operation taking place. |
private int |
readBuffer
Buffer VRAM reads. |
private Setup |
setup
Pointer to general parameters. |
private static int[] |
SMS_JAVA
SMS Colours converted into Java RGB for speed purposes. |
private boolean[] |
spritecol
Sprite collisions. |
private int |
status
Status Register. |
private int[] |
vdpreg
VDP Registers. |
private byte[] |
vRam
Video RAM. |
Constructor Summary | |
---|---|
Vdp(Setup set,
InterruptLine i)
Vdp Constructor. |
Method Summary | |
---|---|
private void |
blankColumn(int lineno)
Deprecated. now, faster fillRect method used. |
int |
controlRead()
Read VDP control port ( 0xBF ). |
void |
controlWrite(int value)
Write to VDP control port ( 0xBF ). |
int |
dataRead()
Read VDP data port ( 0xBE ). |
void |
dataWrite(int value)
Write to VDP data port ( 0xBE ). |
private void |
drawBg(int lineno)
Render line of background layer. |
private void |
drawBGColour(int lineno)
Draw a line of the current background colour. |
void |
drawLine(int lineno)
Render line of SMS/GG display. |
private void |
drawSprite(int lineno)
Render line of sprite layer. |
void |
flagChanges(boolean[] pixelUpdate)
Compare this frame with the previous frame, and flag what lines have been changed. |
int |
getCounter()
Get line interrupt counter. |
int[] |
getDisplay()
Returns the value of property display . |
boolean |
getFrameIntPending()
Get frame interrupt pending flag. |
boolean |
getIrqStatus()
Get interruptLine status. |
boolean |
getLineIntPending()
Get line interrupt pending flag. |
int |
getLineNo()
Get line number under generation. |
int |
getReg(int index)
Get a VDP register. |
boolean |
getSpriteOverflow()
Get sprite overflow status. |
int |
getVCount()
Read vertical port. |
void |
interrupts(int lineno)
Generate VDP interrupts. |
private void |
plotSpritePixel(int x,
int y,
int location,
int address,
int bit)
Plot single sprite pixel. |
void |
reset()
Reset VDP. |
void |
setBackgroundLayer()
Toggle background layer generation on/off. |
void |
setDisplay(int[] display)
Sets the value of property display . |
void |
setNTSC(boolean b)
Set NTSC / PAL VDP Mode. |
void |
setSpriteLayer()
Toggle Sprite Layer Generation On/Off. |
private int |
unsigned(byte b)
Unsign an integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private InterruptLine irq
private Setup setup
private byte[] vRam
private int[] cRam
private int[] vdpreg
private int status
private boolean firstByte
private int commandByte
private int location
private int operation
private int readBuffer
private int line
private int counter
private boolean lineint
private boolean frameint
private boolean[] bgPriority
private boolean[] spritecol
private int[] display
private int[] oldDisplay
private int[] display1
private int[] display2
private boolean displayBackgroundLayer
private boolean displaySpriteLayer
private boolean ntsc
private static final int[] SMS_JAVA
private static final int[] GG_JAVA1
private static final int[] GG_JAVA2
Constructor Detail |
---|
public Vdp(Setup set, InterruptLine i)
set
- pointer to general parametersi
- pointer to Z80 interrupt lineMethod Detail |
---|
public void reset()
public void setNTSC(boolean b)
b
- true
if NTSC, false
if PAL.public int[] getDisplay()
display
. The pointer to the current display.
display
.public void setDisplay(int[] display)
display
. The pointer to the current display.
display
- the new value of property display
.public void setBackgroundLayer()
public void setSpriteLayer()
public int getReg(int index)
index
- index of register.
public int getLineNo()
public int getCounter()
public boolean getLineIntPending()
true
if pending.public boolean getFrameIntPending()
true
if pending.public boolean getIrqStatus()
true
if pending.public boolean getSpriteOverflow()
true
if overflow has occurred.public int getVCount()
public void controlWrite(int value)
0xBF
).
value
- value to write.public int controlRead()
0xBF
).
public void dataWrite(int value)
0xBE
).
value
- value to writepublic int dataRead()
0xBE
).
public void interrupts(int lineno)
lineno
- line to check for interrupts.public void drawLine(int lineno)
lineno
- line number to render.private void drawSprite(int lineno)
lineno
- line number to render.private void plotSpritePixel(int x, int y, int location, int address, int bit)
x
- x coordinate of pixel (for location array).y
- y coordinate of pixel.location
- coordinates to plot pixel at x+(y*256)
.address
- VRAM address of pixel plane.bit
- bit of plane to plot.private void drawBg(int lineno)
lineno
- line number to render.private void drawBGColour(int lineno)
lineno
- line number to render.private void blankColumn(int lineno)
fillRect
method used.
lineno
- line number to render.private int unsigned(byte b)
b
- value to unsign.
public void flagChanges(boolean[] pixelUpdate)
pixelUpdate
- array to flag changes in.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |