Skip to navigation

Screen buffer: SetBufferAddress

Name: SetBufferAddress [Show more] Type: Subroutine Category: Screen buffer Summary: Set screenBufferAddr(1 0) to the address from which the interrupt handler should fetch new content to scroll onto the screen
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * DrawUpdatedObject calls SetBufferAddress

Arguments: Y The direction of scrolling that we are applying: * 0 = pan right * 1 = pan left * 2 = pan up * 3 = pan down
.SetBufferAddress LDA screenBufferLo,Y \ Set screenBufferAddr(1 0) to the Y-th entry from the STA screenBufferAddr \ screenBufferHi and screenBufferLo lookup tables LDA screenBufferHi,Y \ STA screenBufferAddr+1 \ This sets screenBufferAddr(1 0) to the address from \ which the interrupt handler should start pulling \ screen content to scroll onto the screen, so: \ \ * When panning right: The left column of the \ column-shaped screen buffer appears first as the \ new content scrolls in from the right \ \ * When panning left: The right column of the \ column-shaped screen buffer appears first as the \ new content scrolls in from the right \ \ * When panning up: The bottom row of the row-shaped \ screen buffer appears first as the new content \ scrolls in from above \ \ * When panning down: The top row of the row-shaped \ screen buffer appears first as the new content \ scrolls in from below \ \ So this sets screenBufferAddr(1 0) to the address \ where the interrupt handler should start fetching new \ content to scroll onto the screen \ \ See the documentation for screenBufferHi for a \ deeper look into the exact values that are set RTS \ Return from the subroutine