Evito corrupción de flash

This commit is contained in:
antoniovillena 2016-06-08 21:35:13 +02:00
parent 1f980fa167
commit 83578fde0d
2 changed files with 7 additions and 20 deletions

View File

@ -1437,9 +1437,10 @@ tosd ld ix, cad75
; out (c), l
; call send1z
call mmcinit
sbc hl, hl ; read MBR
ld ix, tmpbu2
call inirea
call readat0
jr nz, errsd
ld a, (tmpbu2) ; read first type
sub $e0

View File

@ -1,23 +1,5 @@
define debug 0
inirea push hl
push bc
reinit call mmcinit
; push af
; ld a, SET_BLOCKLEN
; call cs_low
; out (c), a
; out (c), 0
; out (c), 0
; ld a, 2
; out (c), a
; call send1z
; call cs_high
; pop af
pop bc
pop hl
ret nz
; defb $32
readat0 ld e, 0
readata push hl
push bc
@ -42,7 +24,7 @@ mul2 ld a, e
out (c), l
call send1z
mul3 or a
jr nz, reinit
jr nz, waitq
waitl call waitr
sub $fe ; waits for the MMC to reply $FE (DATA TOKEN)
jr z, waitm
@ -52,6 +34,10 @@ waitm push ix
ld b, a
inir
inir
waitq ;push af
;in f, (c)
;in f, (c)
;pop af
pop bc
pop hl
ret