Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/coolgirl-multirom-builder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-11-16 14:38:15 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-11-16 14:38:15 +0300
commita8845d10c2b1a01859bee71305f5f96bbe71c43b (patch)
treebda1eb32335554c9328064899b4b21810c14bb76 /flash.asm
parent98a7ed7ba76d7226d44ca1901a49232054b97395 (diff)
Mostly refactoring
Diffstat (limited to 'flash.asm')
-rw-r--r--flash.asm12
1 files changed, 6 insertions, 6 deletions
diff --git a/flash.asm b/flash.asm
index f7030d4..f5cde83 100644
--- a/flash.asm
+++ b/flash.asm
@@ -6,6 +6,9 @@ flash_detect:
lda #0
sta <FLASH_TYPE
jsr enable_flash_write
+ ; reset flash
+ lda #$F0
+ sta $8000
; enter flash CFI mode
lda #$98
sta $8AAA ; $98 -> $0AAA
@@ -70,14 +73,11 @@ write_flash:
sta $8AAA ; $A0 -> $0AAA
lda [COPY_SOURCE_ADDR], y
sta [COPY_DEST_ADDR], y
-.check1:
- lda [COPY_DEST_ADDR], y
+.wait:
cmp [COPY_SOURCE_ADDR], y
- bne .check1
-.check2:
- lda [COPY_DEST_ADDR], y
+ bne .wait
cmp [COPY_SOURCE_ADDR], y
- bne .check2
+ bne .wait
iny
bne .loop
inc <COPY_SOURCE_ADDR+1