openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::VRAMObserver Class Referenceabstract

Interface that can be registered at VRAMWindow, to be called when the contents of the VRAM inside that window change. More...

#include <VRAMObserver.hh>

Inheritance diagram for openmsx::VRAMObserver:
Inheritance graph
[legend]

Public Member Functions

virtual void updateVRAM (unsigned offset, EmuTime::param time)=0
 Informs the observer of a change in VRAM contents.
 
virtual void updateWindow (bool enabled, EmuTime::param time)=0
 Informs the observer that the entire VRAM window will change.
 

Protected Member Functions

 ~VRAMObserver ()=default
 

Detailed Description

Interface that can be registered at VRAMWindow, to be called when the contents of the VRAM inside that window change.

Definition at line 11 of file VRAMObserver.hh.

Constructor & Destructor Documentation

◆ ~VRAMObserver()

openmsx::VRAMObserver::~VRAMObserver ( )
protecteddefault

Member Function Documentation

◆ updateVRAM()

virtual void openmsx::VRAMObserver::updateVRAM ( unsigned  offset,
EmuTime::param  time 
)
pure virtual

Informs the observer of a change in VRAM contents.

This update is sent just before the change, so the subcomponent can update itself to the given time based on the old contents.

Parameters
offsetOffset of byte that will change, relative to window base address.
timeThe moment in emulated time this change occurs.

Implemented in openmsx::DummyRenderer, openmsx::PixelRenderer, openmsx::SpriteChecker, and openmsx::DummyVRAMObserver.

Referenced by openmsx::VRAMWindow::notify().

◆ updateWindow()

virtual void openmsx::VRAMObserver::updateWindow ( bool  enabled,
EmuTime::param  time 
)
pure virtual

Informs the observer that the entire VRAM window will change.

This update is sent just before the change, so the subcomponent can update itself to the given time based on the old contents. This happens if the base/index masks are changed, or if the window becomes disabled. TODO: Separate enable/disable from window move?

Parameters
enabledWill the window be enabled after the change? If the observer keeps a cache which is based on VRAM contents, it is only necessary to flush the cache if the new window is enabled, because no reads are allowed from disabled windows.
timeThe moment in emulated time this change occurs.

Implemented in openmsx::DummyRenderer, openmsx::PixelRenderer, openmsx::SpriteChecker, and openmsx::DummyVRAMObserver.

Referenced by openmsx::VRAMWindow::disable(), and openmsx::VRAMWindow::setMask().


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