Skip to content

Instantly share code, notes, and snippets.

@JettMonstersGoBoom
Created September 25, 2019 16:59
Show Gist options
  • Save JettMonstersGoBoom/63c871d055ab8d46d5daf2a0b210221f to your computer and use it in GitHub Desktop.
Save JettMonstersGoBoom/63c871d055ab8d46d5daf2a0b210221f to your computer and use it in GitHub Desktop.
word x16_irq_address @$0314
volatile byte vsync
void irq() {
vsync = 0
asm {
pla
tay
pla
tax
pla
rti
}
}
void main() {
asm {sei}
x16_irq_address=irq.addr
asm {cli}
while true {
vsync+=1
while (vsync!=0) {}
// logic
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment