mirror of
https://github.com/Pecusx/jataricart.git
synced 2026-05-20 22:33:22 +02:00
added libs for memchips
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
TRIGGER_FORMAT_28SF equ $30
|
||||||
|
C_FORMAT_28SF equ $30
|
||||||
|
C_BYTE_PROG_28SF equ $10
|
||||||
|
flashoppreamble
|
||||||
|
pha
|
||||||
|
lda #C_BYTE_PROG_28SF
|
||||||
|
scc
|
||||||
|
lda #C_FORMAT_28SF ; only if c set
|
||||||
|
flashoppreamble_acc ; 28SF0x0
|
||||||
|
sta $d500,x ; can be any address
|
||||||
|
sta $a000; command: FORMAT/ID_MODE/BYTE_PROG, any address
|
||||||
|
rts
|
||||||
|
flash_unlockchip
|
||||||
|
sta $D500,x
|
||||||
|
; read from 1823H, 1820H, 1822H, 0418H, 041BH, 0419H, 041AH
|
||||||
|
lda $B823
|
||||||
|
lda $B820
|
||||||
|
lda $B822
|
||||||
|
lda $A418
|
||||||
|
lda $A41B
|
||||||
|
lda $A419
|
||||||
|
lda $A41A
|
||||||
|
rts
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
TRIGGER_FORMAT_29F equ $10
|
||||||
|
C_FORMAT_29F equ $80
|
||||||
|
C_BYTE_PROG_29F equ $a0
|
||||||
|
flashoppreamble_29F
|
||||||
|
pha
|
||||||
|
lda #C_BYTE_PROG_29F
|
||||||
|
scc
|
||||||
|
lda #C_FORMAT_29F ; only if c set
|
||||||
|
sta command_ZP
|
||||||
|
pla
|
||||||
|
.byte {bit.w}
|
||||||
|
flashoppreamble_acc_29F ; 39sf0x0, 29F040
|
||||||
|
sta command_ZP
|
||||||
|
txa
|
||||||
|
pha
|
||||||
|
; when write byte x must be set to either 0 or 40 temporarily
|
||||||
|
and #$40
|
||||||
|
tax
|
||||||
|
sta $d502,x
|
||||||
|
mva #$aa $b555 ; $5555<$aa
|
||||||
|
sta $d501,x
|
||||||
|
mva #$55 $aaaa ; $2aaa<$55
|
||||||
|
; $5555<$80
|
||||||
|
sta $d502,x
|
||||||
|
mva command_ZPff $b555; will become command: FORMAT/ID_MODE/BYTE_PROG
|
||||||
|
cmp #C_FORMAT_29F
|
||||||
|
bne @+ ; if not FORMAT, procedure finishes
|
||||||
|
; FORMAT part, more to write
|
||||||
|
sta $d502,x
|
||||||
|
mva #$aa $b555 ; $5555<$aa
|
||||||
|
sta $d501,x
|
||||||
|
mva #$55 $aaaa ; $2aaa<$55
|
||||||
|
@ pla
|
||||||
|
tax
|
||||||
|
flash_unlockchip_29F
|
||||||
|
rts
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
TRIGGER_FORMAT_29SF equ $10
|
||||||
|
C_FORMAT_29SF equ $80
|
||||||
|
C_BYTE_PROG_29SF equ $a0
|
||||||
|
flashoppreamble_29SF
|
||||||
|
pha
|
||||||
|
lda #C_BYTE_PROG_29SF
|
||||||
|
scc
|
||||||
|
lda #C_FORMAT_29SF ; only if c set
|
||||||
|
sta command_ZP
|
||||||
|
pla
|
||||||
|
.byte {bit.w}
|
||||||
|
flashoppreamble_acc_29SF ; 29sf040
|
||||||
|
sta command_ZP
|
||||||
|
txa
|
||||||
|
pha
|
||||||
|
; when write byte x must be set to either 0 or 40 temporarily
|
||||||
|
and #$40
|
||||||
|
tax
|
||||||
|
sta $d500,x
|
||||||
|
mva #$aa $a555 ; $555<$aa
|
||||||
|
mva #$55 $a2aa ; $2aa<$55
|
||||||
|
; $555<command
|
||||||
|
mva command_ZPff $a555; will become command: FORMAT/ID_MODE/BYTE_PROG
|
||||||
|
cmp #C_FORMAT_29SF
|
||||||
|
bne @+ ; if not FORMAT, procedure finishes
|
||||||
|
; FORMAT part, more to write
|
||||||
|
mva #$aa $a555 ; $555<$aa
|
||||||
|
mva #$55 $a2aa ; $2aa<$55
|
||||||
|
; PREPARE FOR SECTOR TO ERASE
|
||||||
|
@ pla
|
||||||
|
tax
|
||||||
|
flash_unlockchip_29SF
|
||||||
|
rts
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
TRIGGER_FORMAT_39SF equ $10
|
||||||
|
C_FORMAT_39SF equ $80
|
||||||
|
C_BYTE_PROG_39SF equ $a0
|
||||||
|
flashoppreamble_39SF
|
||||||
|
pha
|
||||||
|
lda #C_BYTE_PROG_39SF
|
||||||
|
scc
|
||||||
|
lda #C_FORMAT_39SF ; only if c set
|
||||||
|
sta command_ZP
|
||||||
|
pla
|
||||||
|
.byte {bit.w}
|
||||||
|
flashoppreamble_acc_39SF ; 39sf0x0, 29F040
|
||||||
|
sta command_ZP
|
||||||
|
txa
|
||||||
|
pha
|
||||||
|
; when write byte x must be set to either 0 or 40 temporarily
|
||||||
|
and #$40
|
||||||
|
tax
|
||||||
|
sta $d502,x
|
||||||
|
mva #$aa $b555 ; $5555<$aa
|
||||||
|
sta $d501,x
|
||||||
|
mva #$55 $aaaa ; $2aaa<$55
|
||||||
|
; $5555<$80
|
||||||
|
sta $d502,x
|
||||||
|
mva command_ZP $b555; will become command: FORMAT/ID_MODE/BYTE_PROG
|
||||||
|
cmp #C_FORMAT_39SF
|
||||||
|
bne @+ ; if not FORMAT, procedure finishes
|
||||||
|
; FORMAT part, more to write
|
||||||
|
sta $d502,x
|
||||||
|
mva #$aa $b555 ; $5555<$aa
|
||||||
|
sta $d501,x
|
||||||
|
mva #$55 $aaaa ; $2aaa<$55
|
||||||
|
@ pla
|
||||||
|
tax
|
||||||
|
flash_unlockchip_39SF
|
||||||
|
rts
|
||||||
Reference in New Issue
Block a user