Add NES building and adapt example functions

This commit is contained in:
2023-11-01 13:58:22 +01:00
parent 5c404b5faf
commit 9be90d7629
33 changed files with 3951 additions and 35 deletions

View File

@ -0,0 +1,41 @@
.importzp TEMP, PPU_CTRL_VAR, PPU_CTRL_VAR1, SCROLL_X1
.import popax
.include "nes.inc"
.include "zpvars.inc"
.export _split
;;void __fastcall__ split(unsigned int x,unsigned int y);
_split:
jsr popax
sta <SCROLL_X1
txa
and #$01
sta <TEMP
lda <PPU_CTRL_VAR
and #$fc
ora <TEMP
sta <PPU_CTRL_VAR1
@3:
bit PPU_STATUS
bvs @3
@4:
bit PPU_STATUS
bvc @4
lda <SCROLL_X1
sta PPU_SCROLL
lda #0
sta PPU_SCROLL
lda <PPU_CTRL_VAR1
sta PPU_CTRL
rts