diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2020-12-28 17:10:59 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2020-12-28 17:10:59 +0300 |
commit | 207d6f3a1bb8ac639e75cbb58a37d5061fa949b5 (patch) | |
tree | fb6d0cd83a75c63c7cd1809be45e83badb062304 /banking.asm | |
parent | cff47bf685ec183ce6c26adcff4f0fe6c2271f02 (diff) |
More refactoring
Diffstat (limited to 'banking.asm')
-rw-r--r-- | banking.asm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/banking.asm b/banking.asm index 5fbcff3..d2a2220 100644 --- a/banking.asm +++ b/banking.asm @@ -4,6 +4,7 @@ CHR_BANK .rs 1 ; CHR_A BANK PRG_RAM_BANK .rs 1 ; PRG RAM BANK CART_CONFIG .rs 1 ; variable to store last config PRG_RAM_BANKS .equ 4 ; number of PRG RAM banks +BANKS_TMP .rs 1 banking_init: ; set mirrong, disabe CHR writing, PRG-RAM and flash writing @@ -54,16 +55,16 @@ sync_banks: asl A asl A and #%10000000 - sta <TMP + sta <BANKS_TMP lda <PRG_BANK asl A asl A and #%01111100 - ora <TMP - sta <TMP + ora <BANKS_TMP + sta <BANKS_TMP lda <PRG_RAM_BANK and #%00000011 - ora <TMP + ora <BANKS_TMP sta $5005 ; for UNROM compatibility txa |