public class Screen32 extends Screen
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, 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 |
---|
Screen32(int xsize,
int ysize,
int vrambase,
boolean vibrantColours,
Monitor monitor,
boolean isMac)
Creates the object.
|
Modifier and Type | Method and Description |
---|---|
void |
clearScreen()
Clears the entire screen, on screen as well as in VramBuffer
|
void |
combineBlocks(MC68000Cpu cpu)
This combines two blocks (source 1, source2) with alpha blending and puts the result into the destination array.
|
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 : this updates the memory AND the underlying image data (if block i =s actually within screen).
|
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 |
setVibrantColours(boolean b,
short[] vramBuffer)
Sets whether brighter colours should be used.
|
void |
setVramBase(int vrambase)
Sets the new Vrambase.
|
void |
writeByteToScreen(int address,
int value,
int val2)
Writes a byte to the "screen memory" and paints the corresponding pixel on the screen.
|
void |
writeLongToScreen(int addr,
int value)
Paints two pixels on the screen by setting the RGB values in the image dataBuffer.
|
void |
writeWordToScreen(int addr,
int value)
Paints the pixel on the screen by setting the RGB value in the image dataBuffer.
|
void |
xorBlock(MC68000Cpu cpu,
boolean resolveStipple)
XORs a block with colour : this updates the memory AND the underlying image data (if block i =s actually within screen).
|
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, setMode, 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 Screen32(int xsize, int ysize, int vrambase, boolean vibrantColours, Monitor monitor, boolean isMac)
xsize
- the xsize of the screen in pixels.ysize
- the ysize of the screen in pixels.vrambase
- the start of the "videoram" as far as the CPU is concerned.vibrantColours
- if true brighter colours are used (ie. the lover 3 bits of each R, G, B byte are set to 1).monitor
- the monitor.isMac
- true if screen is on a mac.public void writeByteToScreen(int address, int value, int val2)
writeByteToScreen
in class Screen
address
- where to write to. This is the SMSQE address, where it thinks video memory lies.value
- the value to write.val2
- ignoredpublic 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, a word in GGGBBBBB RRRRRGGG format.public void writeLongToScreen(int addr, int value)
writeLongToScreen
in class Screen
addr
- where to write to.value
- the value for 2 pixels (high word|low word, both in GGGBBBBB RRRRRGGG format).public void clearScreen()
clearScreen
in class Screen
public void fillBlock(MC68000Cpu cpu, boolean resolveStipple)
fillBlock
in class Screen
cpu
- the CPU used.resolveStipple
- true if we need to convert a stipple number in d6 into colours in d6/d7
The block size and origin are assumed to have been adjusted for
correct position within the area to be set.
Registers:
Entry Exit
D0 smashed
D1 block size smashed
D2 block origin smashed
D3-D5 smashed
D6 stipple Nbr (cn_block) OR long word colour for even row (bm_block)
D7 colour mask in long word (cn_block)
or long word colour for odd row (bm_block) smashed
A1 area base address smashed
A2 area row increment smashed
stipples are such that they affect a block of 2*2 pixels even row : p1p2
odd row : p3p4
where each of the 4 pixels may be one of two colours.
Hence the colours in D6 and D7 are the colours for two consecutive pixels :p1 and p2 in D6, p3 and p4 in D7.
This is why there may be a leading and a trailing colour. And this is why there are two different colours
for even and odd rows.public void xorBlock(MC68000Cpu cpu, boolean resolveStipple)
xorBlock
in class Screen
cpu
- the CPU used.resolveStipple
- true if we need to convert a stipple number in d6 into colours in d6/d7
The block size and origin are assumed to have been adjusted for
correct position within the area to be set.
Registers:
Entry Exit
D0 smashed
D1 block size smashed
D2 block origin smashed
D3-D5 smashed
D6 stipple Nbr (cn_block) OR long word colour for even row (bm_block)
D7 colour mask in long word (cn_block)
or long word colour for odd row (bm_block) smashed
A1 area base address smashed
A2 area row increment smashed
stipples are such that they affect a block of 2*2 pixels even row : p1p2
odd row : p3p4
where each of the 4 pixels may be one of two colours.
Hence the colours in D6 and D7 are the colours for two consecutive pixels :p1 and p2 in D6, p3 and p4 in D7.
This is why there may be a leading and a trailing colour. And this is why there are two different colours
for even and odd rows.public void moveBlock(MC68000Cpu cpu, boolean copyFromScreen)
public void displayRegion(MC68000Cpu cpu, int start, int nbrOfBytes)
displayRegion
in class Screen
start
- where the bytes were loaded to.nbrOfBytes
- how many bytes were loaded.cpu
- .public void combineBlocks(MC68000Cpu cpu)
combineBlocks
in class Screen
cpu
- the CPU used.public void setVramBase(int vrambase)
setVramBase
in class Screen
vrambase
- the new vrambase, the start address of the vram.public void setVibrantColours(boolean b, short[] vramBuffer)
setVibrantColours
in class Screen
b
- true
if brighter colours should be used.vramBuffer
- where data is stored.public final int getScreenSizeInBytes()
getScreenSizeInBytes
in class Screen
public boolean isQLScreen()
isQLScreen
in class Screen