Skip to content

Commit

Permalink
More library functions, now for ppuscroll
Browse files Browse the repository at this point in the history
  • Loading branch information
pubby committed Mar 9, 2023
1 parent 2fc4ffd commit 1078a30
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/nes.fab
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ fn ppu_reset_addr(UU addr)
{PPUADDR}(addr.b)
{PPUADDR}(addr.a)

// Assigns PPUSCROLL.
fn ppu_set_scroll(U x, U y)
: +inline
{PPUSCROLL}(x)
{PPUSCROLL}(y)

// Resets the address latch before assigning PPUSCROLL.
fn ppu_reset_scroll(U x, U y)
: +inline
{PPUSTATUS}()
{PPUADDR}(x)
{PPUADDR}(y)

///////////////////////////////////////////////////////////////////////////////
// NMI ////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 1078a30

Please sign in to comment.