Move devices into devices folder

This commit is contained in:
Byron Lathi
2022-04-16 21:47:54 -05:00
parent c5f1b64cba
commit 238a4b6f98
17 changed files with 10 additions and 9 deletions

32
sw/devices/mapper.s Normal file
View File

@@ -0,0 +1,32 @@
.include "io.inc65"
.importzp sp, sreg
.export _mapper_enable
.export _mapper_read, _mapper_write
.autoimport on
.code
; void mapper_enable(uint8_t en)
_mapper_enable:
sta MM_CTRL
rts
_mapper_read:
phx
tax
lda MM_DATA,x
ldx #$00
rts
_mapper_write:
phx
tax
jsr popa
sta MM_DATA,x
plx
rts