In order to get OCS/ECS behavior right for the demo mentioned in #799 (OCS must show splash screens, ECS must not), Denise needs a more accurate border processing logic:
First proposal:
Add:
u8 borderMask[]
bool borderMaskIsDirty
A ring buffer for keeping track of DIWSTRT, DIWSTOP, and DIWHIGH changes.
Such buffers exist already, e.g., for keeping track of color register changes.
In Denise::setDIWSTRT, Denise::setDIWSTOP, Denise::setDIWHIGH:
Record the register change
Mark border mask as dirty
In void Denise::hsyncHandler():
If the border mask is dirty, update the mask.
Draw the border (with new code using the mask).
Note: If there was a register change in line n, the border mask must be updated again in line n+1.
Deprecations:
hflopOn, hflopOff, hpos, hflopPrev, hflopOnPrev, hflopOffPrev will be obsolete.
Pros:
Using a border mask has precise semantics, as opposed to storing certain trigger events in multiple variables.
Cons:
Performance may degrade a bit
Updating the border mask is not a big issue, as DIW register changes are rare
Drawing the border using a mask might impact performance because the number of memory accesses increases.
In order to get OCS/ECS behavior right for the demo mentioned in #799 (OCS must show splash screens, ECS must not), Denise needs a more accurate border processing logic:
First proposal:
Add:
u8 borderMask[]
bool borderMaskIsDirty
DIWSTRT
,DIWSTOP
, andDIWHIGH
changes. Such buffers exist already, e.g., for keeping track of color register changes.In
Denise::setDIWSTRT
,Denise::setDIWSTOP
,Denise::setDIWHIGH
:In
void Denise::hsyncHandler()
:Note: If there was a register change in line n, the border mask must be updated again in line n+1.
Deprecations:
hflopOn
,hflopOff
,hpos
,hflopPrev
,hflopOnPrev
,hflopOffPrev
will be obsolete.Pros:
Cons: