VIPManager Class Reference

#include <VIPManager.h>

Inheritance diagram for VIPManager:
ListenerObject

# Public Types

enum  VIPMultiplexedInterrupts
typedef const ColumnTableSpec ColumnTableROMSpec
typedef const BrightnessRepeatSpec BrightnessRepeatROMSpec

# Protected Member Functions

void reset ()
 Reset the manager's state.
void configure (uint8 backgroundColor, const Brightness *brightness, const BrightnessRepeatSpec *brightnessRepeat, const PaletteConfig *paletteConfig, PostProcessingEffect *postProcessingEffects)
void startMemoryRefresh ()
 Start memore refresh cycle.
void waitForFRAMESTART ()
 Wait for the next FCLK signal.
void startDrawing ()
 Start VIP drawing operations.
void resumeDrawing ()
 Resume VIP drawing operations.
void suspendDrawing ()
 Suspend VIP drawing operations.
void stopDrawing ()
 Stop VIP drawing operations.
void startDisplaying ()
 Start VIP displaying operations.
void stopDisplaying ()
 Stop VIP displaying operations.
void allowInterrupts (bool allowInterrupts)
uint32 getCurrentDrawingFrameBufferSet ()
 Retrieve inded of the frame buffers set using during the current game frame.

# Static Protected Member Functions

static void interruptHandler ()
 Interrupt handler for timer's interrupts.
static void pushFrontPostProcessingEffect (PostProcessingEffect postProcessingEffect, Entity entity)
static void pushBackPostProcessingEffect (PostProcessingEffect postProcessingEffect, Entity entity)
static void removePostProcessingEffect (PostProcessingEffect postProcessingEffect, Entity entity)
static void removePostProcessingEffects ()
 Remove all a post-processing effects.
static void enableCustomInterrupts (uint16 customInterrupts)
static void enableMultiplexedInterrupts (uint32 enabledMultiplexedInterrupts)
static void setDrawingStrategy (uint32 drawingStrategy)
static uint32 getDrawingStrategy ()
static void configurePalettes (const PaletteConfig *paletteConfig)
static void setupColumnTable (const ColumnTableSpec *columnTableSpec)
static void configureBrightness (const Brightness *brightness)
static void configureBrightnessRepeat (const BrightnessRepeatSpec *brightnessRepeat)
static void configureBackgroundColor (uint8 color)
static void upBrightness ()
 Up the brightness to the maximum.
static void lowerBrightness ()
 Lower the brightness to the minimum.
static uint16 getCurrentInterrupt ()
static uint16 getGameFrameDuration ()
static void setFrameCycle (uint8 frameCycle)
static void print (int16 x, int16 y)

# Protected Attributes

VirtualList postProcessingEffects
uint32 currentDrawingFrameBufferSet
 Frame buffers set using during the current game frame.
uint32 enabledMultiplexedInterrupts
 Enum that determines which multiplexed interrupts are allowed.
uint32 drawingStrategy
uint16 customInterrupts
 Allows VIP interrupts that the engine doesn't use.
uint16 currrentInterrupt
 Register of the interrupts being processed.
uint16 gameFrameDuration
bool isDrawingAllowed
 If true, XPEN is raised.
bool allowInterrupts
 If false, no interrupts are enable.
volatile bool processingGAMESTART
 If true, a VIP interrupt happened while in the midst of GAMESTART.
volatile bool processingXPEND
 If true, a VIP interrupt happened while in the midst of XPEND.
volatile bool FRAMESTARTDuringXPEND
 If true, FRAMESTART happened during XPEND.

# Additional Inherited Members

- Private Member Functions inherited from ListenerObject
void constructor ()
 Class' constructor.
void destructor ()
 Class' destructor.
void addEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListeners (uint16 eventCode)
void removeAllEventListeners ()
 Remove all listener objects.
bool hasActiveEventListeners ()
void fireEvent (uint16 eventCode)
void sendMessageTo (ListenerObject receiver, uint32 message, uint32 delay, uint32 randomDelay)
void sendMessageToSelf (uint32 message, uint32 delay, uint32 randomDelay)
void discardAllMessages ()
 Discard all messages, both to be sent and to be received.
void discardMessages (uint32 message)
virtual bool onEvent (ListenerObject eventFirer, uint16 eventCode)
virtual bool handleMessage (Telegram telegram)
- Private Attributes inherited from ListenerObject
VirtualList events
 List of registered events.
int8 eventFirings
 Counter that keeps track of the number of fired events to prevent race conditions in nested firings.

# Detailed Description

Class VIPManager

Inherits from ListenerObject

Manages the VIP.

Definition at line 140 of file VIPManager.h.

# Member Typedef Documentation

# BrightnessRepeatROMSpec

A BrightnessRepeat spec that is stored in ROM

Definition at line 69 of file VIPManager.h.

# ColumnTableROMSpec

A ColumnTable spec that is stored in ROM

Definition at line 52 of file VIPManager.h.

# Member Enumeration Documentation

# VIPMultiplexedInterrupts

Enums used to control VIP interrupts

Definition at line 110 of file VIPManager.h.

# Member Function Documentation

# allowInterrupts()

void VIPManager::allowInterrupts ( bool allowInterrupts)
protected

Set the enabling of interrupts.

Parameters
allowInterruptsIf true, interrupts are enabled when drawing starts

# configure()

secure void VIPManager::configure ( uint8 backgroundColor,
const Brightness * brightness,
const BrightnessRepeatSpec * brightnessRepeat,
const PaletteConfig * paletteConfig,
PostProcessingEffect * postProcessingEffects )
protected

Configure the manager's state.

Parameters
backgroundColorColor to apply to the background
brightnessBrightness configuration
brightnessRepeatBrightness configuration
paletteConfigPalettes configuration
postProcessingEffectsArray of postprocessing effects Configure the brightness registers with the provided configuration.

Definition at line 476 of file VIPManager.c.

# configureBackgroundColor()

static void VIPManager::configureBackgroundColor ( uint8 color)
staticprotected

Configure the background color.

Parameters
colorColor to apply to the background

Definition at line 388 of file VIPManager.c.

# configureBrightness()

static void VIPManager::configureBrightness ( const Brightness * brightness)
staticprotected

Configure the brightness registers with the provided configuration.

Parameters
brightnessBrightness configuration

Definition at line 350 of file VIPManager.c.

# configureBrightnessRepeat()

static void VIPManager::configureBrightnessRepeat ( const BrightnessRepeatSpec * brightnessRepeat)
staticprotected

Configure the column table brightness repeat values.

Parameters
brightnessRepeatBrightness configuration

Definition at line 361 of file VIPManager.c.

# configurePalettes()

static void VIPManager::configurePalettes ( const PaletteConfig * paletteConfig)
staticprotected

Configure the VIP's palettes with the provided configuration.

Parameters
paletteConfigPalettes configuration

Definition at line 311 of file VIPManager.c.

# enableCustomInterrupts()

static void VIPManager::enableCustomInterrupts ( uint16 customInterrupts)
staticprotected

Enable VIP interrupts that the engine doesn't use.

Parameters
customInterruptsInterrupts to enable

Definition at line 247 of file VIPManager.c.

# enableMultiplexedInterrupts()

static void VIPManager::enableMultiplexedInterrupts ( uint32 enabledMultiplexedInterrupts)
staticprotected

Set the multiplexed interrupts that are allowed

Parameters
enabledMultiplexedInterruptsMultiplexed interrupts to allow

Definition at line 256 of file VIPManager.c.

# getCurrentDrawingFrameBufferSet()

uint32 VIPManager::getCurrentDrawingFrameBufferSet ( )
protected

Retrieve inded of the frame buffers set using during the current game frame.

Definition at line 582 of file VIPManager.c.

# getCurrentInterrupt()

uint16 VIPManager::getCurrentInterrupt ( )
staticprotected

Retrieve the registry of the interrupts being processed.

Returns
The registry of the interrupts being processed

Definition at line 432 of file VIPManager.c.

# getDrawingStrategy()

static uint32 VIPManager::getDrawingStrategy ( )
staticprotected

Retrieve the drawing management drawingStrategy interrupts that are allowed

Returns
Value that controls the suspension and resuming of drawing

Definition at line 283 of file VIPManager.c.

# getGameFrameDuration()

uint16 VIPManager::getGameFrameDuration ( )
staticprotected

Retrieve the time in milliseconds that each game frame lasts.

Returns
Time in milliseconds that the game frame last according to the FRMCYC configuration

Definition at line 441 of file VIPManager.c.

# interruptHandler()

static void VIPManager::interruptHandler ( )
staticprotected

Interrupt handler for timer's interrupts.

Definition at line 132 of file VIPManager.c.

# lowerBrightness()

static void VIPManager::lowerBrightness ( )
staticprotected

Lower the brightness to the minimum.

Definition at line 422 of file VIPManager.c.

# print()

static void VIPManager::print ( int16 x,
int16 y )
staticprotected

Print the status of the VIP registers.

Parameters
xScreen x coordinate where to print
yScreen y coordinate where to print

Definition at line 589 of file VIPManager.c.

# pushBackPostProcessingEffect()

static void VIPManager::pushBackPostProcessingEffect ( PostProcessingEffect postProcessingEffect,
Entity entity )
staticprotected

Push a post processing effect at the end of the list of effects.

Parameters
postProcessingEffectPost-processing effect function
entityPost-processing effect function's scope

Definition at line 192 of file VIPManager.c.

# pushFrontPostProcessingEffect()

static void VIPManager::pushFrontPostProcessingEffect ( PostProcessingEffect postProcessingEffect,
Entity entity )
staticprotected

Push a post processing effect at the start of the list of effects.

Parameters
postProcessingEffectPost-processing effect function
entityPost-processing effect function's scope

Definition at line 169 of file VIPManager.c.

# removePostProcessingEffect()

static void VIPManager::removePostProcessingEffect ( PostProcessingEffect postProcessingEffect,
Entity entity )
staticprotected

Remove a post-processing effect from the list of effects.

Parameters
postProcessingEffectPost-processing effect function
entityPost-processing effect function's scope

Definition at line 215 of file VIPManager.c.

# removePostProcessingEffects()

static void VIPManager::removePostProcessingEffects ( )
staticprotected

Remove all a post-processing effects.

Definition at line 238 of file VIPManager.c.

# reset()

secure void VIPManager::reset ( )
protected

Reset the manager's state.

Definition at line 456 of file VIPManager.c.

# resumeDrawing()

secure void VIPManager::resumeDrawing ( )
protected

Resume VIP drawing operations.

Definition at line 518 of file VIPManager.c.

# setDrawingStrategy()

static void VIPManager::setDrawingStrategy ( uint32 drawingStrategy)
staticprotected

Set the drawing management drawingStrategy interrupts that are allowed

Parameters
drawingStrategyValue to control the suspension and resuming of drawing

Definition at line 269 of file VIPManager.c.

# setFrameCycle()

static void VIPManager::setFrameCycle ( uint8 frameCycle)
staticprotected

Set the FRMCYC value

Parameters
frameCycleFRMCYC value

Definition at line 291 of file VIPManager.c.

# setupColumnTable()

static void VIPManager::setupColumnTable ( const ColumnTableSpec * columnTableSpec)
staticprotected

Setup the column table with the provided spec.

Parameters
columnTableSpecSpecification for the configuration of the column table

Definition at line 326 of file VIPManager.c.

# startDisplaying()

secure void VIPManager::startDisplaying ( )
protected

Start VIP displaying operations.

Definition at line 559 of file VIPManager.c.

# startDrawing()

secure void VIPManager::startDrawing ( )
protected

Start VIP drawing operations.

Definition at line 506 of file VIPManager.c.

# startMemoryRefresh()

secure void VIPManager::startMemoryRefresh ( )
protected

Start memore refresh cycle.

Definition at line 491 of file VIPManager.c.

# stopDisplaying()

secure void VIPManager::stopDisplaying ( )
protected

Stop VIP displaying operations.

Definition at line 567 of file VIPManager.c.

# stopDrawing()

secure void VIPManager::stopDrawing ( )
protected

Stop VIP drawing operations.

Definition at line 547 of file VIPManager.c.

# suspendDrawing()

secure void VIPManager::suspendDrawing ( )
protected

Suspend VIP drawing operations.

Definition at line 533 of file VIPManager.c.

# upBrightness()

static void VIPManager::upBrightness ( )
staticprotected

Up the brightness to the maximum.

Definition at line 412 of file VIPManager.c.

# waitForFRAMESTART()

secure void VIPManager::waitForFRAMESTART ( )
protected

Wait for the next FCLK signal.

Definition at line 499 of file VIPManager.c.

# Member Data Documentation

# allowInterrupts

secure void VIPManager::allowInterrupts
protected

If false, no interrupts are enable.

Definition at line 172 of file VIPManager.h.

# currentDrawingFrameBufferSet

uint32 VIPManager::currentDrawingFrameBufferSet
protected

Frame buffers set using during the current game frame.

Definition at line 149 of file VIPManager.h.

# currrentInterrupt

uint16 VIPManager::currrentInterrupt
protected

Register of the interrupts being processed.

Definition at line 162 of file VIPManager.h.

# customInterrupts

uint16 VIPManager::customInterrupts
protected

Allows VIP interrupts that the engine doesn't use.

Definition at line 159 of file VIPManager.h.

# drawingStrategy

uint32 VIPManager::drawingStrategy
protected

Enum to determine if the manager waits for the VIP before suspending/resuming the VIP's drawing operations

Definition at line 156 of file VIPManager.h.

# enabledMultiplexedInterrupts

uint32 VIPManager::enabledMultiplexedInterrupts
protected

Enum that determines which multiplexed interrupts are allowed.

Definition at line 152 of file VIPManager.h.

# FRAMESTARTDuringXPEND

volatile bool VIPManager::FRAMESTARTDuringXPEND
protected

If true, FRAMESTART happened during XPEND.

Definition at line 181 of file VIPManager.h.

# gameFrameDuration

uint16 VIPManager::gameFrameDuration
protected

Time in milliseconds that the game frame last according to the FRMCYC configuration

Definition at line 166 of file VIPManager.h.

# isDrawingAllowed

bool VIPManager::isDrawingAllowed
protected

If true, XPEN is raised.

Definition at line 169 of file VIPManager.h.

# postProcessingEffects

VirtualList VIPManager::postProcessingEffects
protected

Linked list of post processing effects to be applied after the VIP's drawing operations are completed

Definition at line 146 of file VIPManager.h.

# processingGAMESTART

volatile bool VIPManager::processingGAMESTART
protected

If true, a VIP interrupt happened while in the midst of GAMESTART.

Definition at line 175 of file VIPManager.h.

# processingXPEND

volatile bool VIPManager::processingXPEND
protected

If true, a VIP interrupt happened while in the midst of XPEND.

Definition at line 178 of file VIPManager.h.


The documentation for this class was generated from the following files: