VIDC1 / RO3.1 frame store emulation
Jeffrey Lee (213) 6048 posts |
I see plenty of comments there ;-) ; Calculate corresponding Y offset to use LDR r0, mbbase SUB r0, r1, r0 LDR r1, mbpitch DivRem r2, r0, r1, lr Get the desired byte offset from the base of the screen memory, then divide it by the row pitch to work out the row number to scroll to ; Clamp CMP r2, #0 MOVLT r2, #0 LDR r0, mbyvres LDR r1, mbyres SUB r0, r0, r1 CMP r2, r0 MOVLE r0, r2 Clamp row number such that 0 <= row < (buffer height – screen height) ; Same as current? LDR r2, mbyoff CMP r0, r2 EXIT EQ Don’t trigger an update if we’re already scrolled to that position ; Set flag requesting update STR r0, mbyoff STR pc, UpdateNeeded EXIT Store the position we want to scroll to and set UpdateNeeded to a non-zero value in order to trigger a message to be sent to the GPU the next time the update function runs (which is triggered by a repeating timer IRQ) MergeUpdate is the function which sends the scroll message to the GPU. It generates it from a template message (mergetags). X offset is always 0, Y offset is set to mbyoff. |
Jeffrey Lee (213) 6048 posts |
Could GraphicsV be extended so graphics driver restrictions can be discovered? The start alignment and width modulus differ across video drivers, but there’s no way of discovering what they are. That kind of stuff will probably be coming at some point, yeah. |