|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object legacy.VideoAdapter
public abstract class VideoAdapter
VideoAdapter.class VideoAdapter handles graphics and graphics device functions and prepiration. Hêbê is deigned to allow operation comparible to classical games and operates on a maximin bit resolution of 8Bits or 256 Colors. This mode operates on initial tests at over 40% faster than a 32bit resolution. in fact initial tests clocked a simple test at opertating at a peak of 1288fps (frames per second). Considering this one should have ample power to rebith classic titles on the java platform. Note. refresh rates are set to operate at 60Htz by new standard models this would be considerd 60p(Progresive) not 60i(interlaced) or 30P(Progresive) and equates to 60fps so reaching this rate would be running in excess of the actual hardwares capabilites and not recomended. In addition Verticle Syncronization (VSync) is not adheard to so operating at this limit will produce Atrifacts.
RGB
Field Summary | |
---|---|
protected int[] |
activeBufferPagePixels
active buffer to be pushed ont to the source |
protected int |
bufferPageSize
size of page buffer |
protected static RGB[] |
lookupPallet
Internal pallet structure holds pallet data before Initialization. |
static java.lang.Object |
MemoryModelPalletized1Bit
Reference Object for monochrome color pallet, required by Configuration to determin correct graphics enviroment example |
static java.lang.Object |
MemoryModelPalletized4Bit
Reference Object for 16 color pallet, required by Configuration to determin correct graphics enviroment example |
static java.lang.Object |
MemoryModelPalletized6Bit
Reference Object for 64 color pallet, required by Configuration to determin correct graphics enviroment example |
static java.lang.Object |
MemoryModelPalletized8Bit
Reference Object for 256 color pallet, required by Configuration to determin correct graphics enviroment example |
Constructor Summary | |
---|---|
protected |
VideoAdapter()
VideoAdapter() is the default constructor and calls register wich must be called before any other class or method invocation. |
protected |
VideoAdapter(int width,
int height,
java.lang.String standard)
VideoAdapter(int width, int height, String standard) constucts a video standard with supplied paramiters for later use. |
Method Summary | |
---|---|
abstract void |
clearScreen(int color)
clearScreen(int color) clears the active video buffer to a color index |
protected void |
close()
close() should be called by legacy to ensure graphics are correctly disposed of |
protected static RGB[] |
createMemoryModel(java.lang.Object memoryModel)
createMemoryModel prepairs the pallet for use. |
protected static VideoAdapter |
getAdapter(int width,
int height)
getAdapter(int width, int height) caution when using this method. |
int |
getClosetColor(int r,
int g,
int b)
Returns the closest color in the existing pallet |
int |
getClosetColor(RGB rgb)
Returns the closest color in the existing pallet |
abstract int |
getHeight()
getHeight() returns the height of the active VideoAdapter |
RGB |
getPalletIndex(int index)
getPalletIndex(int) returns the color currently set for the pallet at index of |
int |
getPalletSize()
getPalletSize() simply returns the size of the Pallet |
float |
getRatio()
getRatio() returns the ratio of the resolution eg VGA has an aspect ratio or [4:3] so 480x [4:3] would equate to 480*(4/3=1.333)=640 |
static float |
getRatioFloat(java.lang.String s)
getRatioFloat(String s) parses a ratio ie [16:9] to it ratio where [16:9] = 16/9=1.77777...8 |
static java.lang.String |
getRatioString(float r)
getRatioString(float r) coverts a decimal fraction to a ration string where applicable |
protected VideoAdapter |
getRenderer()
getRenderer() called exclusivly from within the legacy kernal to flip the page and return this Video Interface |
java.lang.String |
getStandard()
getStandard() returns a |
static VideoAdapter |
getStandardFor(int width,
int height)
getStandardFor() returns a DisplayAdapters or video mode compatible with this machine provided it matched width and height parameters |
static VideoAdapter[] |
getStandards()
getStandards() returns a list of DisplayAdapters or video modes compatible with this machine |
abstract int |
getWidth()
getWidth() returns the width of the active VideoAdapter |
boolean |
isActive()
isActive() returns weather this VideoAdaptor is active and therfore sucessfully prepaired |
abstract void |
putPixel(int x,
int y,
int color)
putPixel(int x, int y, int color) places a pixel on the active video buffer |
protected void |
render()
render() pushes the current video buffer or page into the video device |
void |
setPalletIndex(int index,
RGB color)
setPalletIndex(int, RGB) sets a color in this pallet at index to a specific color |
java.lang.String |
toString()
Generic fucntion. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object MemoryModelPalletized8Bit
public Object getVideoMemoryModel(){ return adaptor.MemoryModelPalletized8Bit; }
Configuration
public static final java.lang.Object MemoryModelPalletized6Bit
public Object getVideoMemoryModel(){ return adaptor.MemoryModelPalletized6Bit; }
Configuration
public static final java.lang.Object MemoryModelPalletized4Bit
public Object getVideoMemoryModel(){ return adaptor.MemoryModelPalletized4Bit; }
Configuration
public static final java.lang.Object MemoryModelPalletized1Bit
public Object getVideoMemoryModel(){ return adaptor.MemoryModelPalletized1Bit; }
Configuration
protected static RGB[] lookupPallet
protected int bufferPageSize
protected int[] activeBufferPagePixels
Constructor Detail |
---|
protected VideoAdapter()
protected VideoAdapter(int width, int height, java.lang.String standard)
width
- scanline lenghtheight
- width supplied to detrmin ratiostandard
- known standard nameMethod Detail |
---|
protected static VideoAdapter getAdapter(int width, int height)
width
- requested widthheight
- requested height
getStandards()
protected static RGB[] createMemoryModel(java.lang.Object memoryModel)
memoryModel
- refererence to acceptable modelprotected final VideoAdapter getRenderer()
protected final void render()
public static java.lang.String getRatioString(float r)
r
- the decimal; fractio o parse must not be NaN
public static float getRatioFloat(java.lang.String s)
s
- ratio to parse
public abstract int getWidth()
public abstract int getHeight()
public abstract void putPixel(int x, int y, int color)
x
- coordinatey
- coordinatecolor
- as pallet indexpublic abstract void clearScreen(int color)
color
- as pallet indexpublic final int getPalletSize()
public final void setPalletIndex(int index, RGB color)
setPalletIndex
in interface VideoCodecToolkit
index
- index of coloecolor
- color to setpublic final RGB getPalletIndex(int index)
getPalletIndex
in interface VideoCodecToolkit
index
- of color
public final int getClosetColor(RGB rgb)
getClosetColor
in interface VideoCodecToolkit
rgb
- the RGB triplet to match
public final int getClosetColor(int r, int g, int b)
getClosetColor
in interface VideoCodecToolkit
r
- Red component to matchg
- Green component to matchb
- Blue component to match
public float getRatio()
public java.lang.String getStandard()
public static VideoAdapter[] getStandards()
public static VideoAdapter getStandardFor(int width, int height)
width
- parameter to matchheight
- parameter to match
public boolean isActive()
public java.lang.String toString()
toString
in class java.lang.Object
getStandard()
protected void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |