public class Screen0 extends Screen
This object contains a "vramBufffer" containing the screen memory as SMSQE sees it, and a BufferedImage containing the corresponding RGB data. "Drawing" on the screen is done by copying the image back to the screen. The "video ram" data structure is an array of short : in QL modes 4 and 8, pixels are addressed as words (8 or 4 pixels per word)
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
black, blue, copyMode, cyan, dataBuffer, divisior, green, isDirty, isDouble, isMac, magenta, mode, monitor, nbrOfBytesPerLine, orange, pixelmask4, pixelmask8, QLmode, raster, red, screenImage, startAddress, stopAddress, vibrantColours, white, xsize, yellow, ysize
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
Screen0(int xsize,
int ysize,
int vrambase,
Monitor monitor,
boolean isMac)
Creates the object.
|
Modifier and Type | Method and Description |
---|---|
void |
clearScreen()
Clears the entire screen
|
void |
combineBlocks(MC68000Cpu cpu)
This combines two blocks with alpha blending - not implemented here.
|
void |
displayRegion(MC68000Cpu cpu,
int start,
int nbrOfBytes)
Displays a region if bytes were loaded directly to the screen memory.
|
void |
fillBlock(MC68000Cpu cpu,
boolean resolveStipple)
Fills a block with colour - not implemented here.
|
int |
getScreenSizeInBytes()
Gets size, in bytes, of the vram.
|
boolean |
isQLScreen()
Checks whether this is a QL type screen
|
void |
moveBlock(MC68000Cpu cpu,
boolean copyFromScreen)
This is called when a block of memory was copied to the vram..
|
void |
setMode(int mode)
Sets the screen mode when in Ql compatible mode.
|
void |
setVibrantColours(boolean b,
short[] s)
Sets whether brighter colours should be used.
|
void |
setVramBase(int vrambase)
Sets the new Vrambase for the screen buffer if we are in QL compatible mode (this implies that the CPU or its memory changed).
|
void |
writeByteToScreen(int address,
int value,
int wordValue)
Writes a byte to the "screen memory" and paints the corresponding pixel on the screen.
|
void |
writeLongToScreen(int addr,
int value)
Writes a long word to the java screen.
|
void |
writeWordToScreen(int addr,
int value)
Writes a word to screen memory, and paints the corresponding pixel on the screen.
|
void |
xorBlock(MC68000Cpu cpu,
boolean resolveStrip)
XORS a block with colour - not implemented here.
|
copyScreen, fillScreen, fillScreen, getDivisor, getImageSize, getLineSize, getMode, getMonitor, getPreferredSize, getScreenBase, getScreenTop, getXSize, getYSize, isVibrantColours, mouseInScreen, paintComponent, screenPanelKeyPressed, screenPanelKeyReleased, screenPanelKeyTyped, screenPanelMouseEntered, screenPanelMouseExited, screenPanelMouseMoved, screenPanelMousePressed, screenPanelMouseReleased, setDisplayRegion, setDoubleSize, setEmuMode, setFullSize, setIsMac, setMonitor, setMouseClickDelay, setMousePosition, setPixels, setQLEmulationMode
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public Screen0(int xsize, int ysize, int vrambase, Monitor monitor, boolean isMac)
xsize
- the xsize of the screen in pixelsysize
- the ysize of the screen in pixels. If they are both - 1, then use a QL screen.vrambase
- the start of the "videoram" as far as the CPU is concerned.monitor
- the monitor running the cpu.isMac
- true if we're running on a mac.public void writeByteToScreen(int address, int value, int wordValue)
writeByteToScreen
in class Screen
address
- where to write to. This is the SMSQE address, where it thinks video memory lies.
It has already been checked that the address is in my memory space.value
- the value to write.wordValue
- the value to write into the word this byte is part ofpublic void writeWordToScreen(int addr, int value)
writeWordToScreen
in class Screen
addr
- the address where to write to. It is presumed that it has been checked that this is in screen mem.value
- the value to write to screen mem.public void writeLongToScreen(int addr, int value)
writeLongToScreen
in class Screen
addr
- where to write tovalue
- the valuepublic void setMode(int mode)
public void clearScreen()
clearScreen
in class Screen
public void fillBlock(MC68000Cpu cpu, boolean resolveStipple)
public void xorBlock(MC68000Cpu cpu, boolean resolveStrip)
public void combineBlocks(MC68000Cpu cpu)
combineBlocks
in class Screen
cpu
- the CPU usedpublic void moveBlock(MC68000Cpu cpu, boolean copyFromScreen)
public void displayRegion(MC68000Cpu cpu, int start, int nbrOfBytes)
displayRegion
in class Screen
cpu
- the cpu used.start
- where the bytes were loaded to.nbrOfBytes
- how many bytes were loaded.public void setVramBase(int vrambase)
setVramBase
in class Screen
vrambase
- the new video ram base.public void setVibrantColours(boolean b, short[] s)
setVibrantColours
in class Screen
b
- true
if brighter colours should be used.s
- ignoredpublic final int getScreenSizeInBytes()
getScreenSizeInBytes
in class Screen
public boolean isQLScreen()
isQLScreen
in class Screen