Browse Source

recipes/rc2014/eeprom: fix broken a28w args passing

That's why the command seemed slow! It's much faster than I thought.
pull/10/head
Virgil Dupras 5 years ago
parent
commit
c613f7b0ee
3 changed files with 6 additions and 6 deletions
  1. +3
    -3
      apps/at28w/main.asm
  2. +2
    -2
      recipes/rc2014/eeprom/README.md
  3. +1
    -1
      recipes/rc2014/eeprom/glue.asm

+ 3
- 3
apps/at28w/main.asm View File

@@ -26,7 +26,7 @@ at28wInner:
ld b, h ld b, h
ld c, l ld c, l
ld hl, AT28W_MEMSTART ld hl, AT28W_MEMSTART
call at28BCZero
call at28wBCZero
jr nz, .loop jr nz, .loop
; BC is zero, default to 0x2000 (8x, the size of the AT28) ; BC is zero, default to 0x2000 (8x, the size of the AT28)
ld bc, 0x2000 ld bc, 0x2000
@@ -55,7 +55,7 @@ at28wInner:
jr nz, .mismatch jr nz, .mismatch
inc hl inc hl
dec bc dec bc
call at28BCZero
call at28wBCZero
jr nz, .loop jr nz, .loop


.loopend: .loopend:
@@ -67,7 +67,7 @@ at28wInner:
ld a, AT28W_ERR_MISMATCH ld a, AT28W_ERR_MISMATCH
ret ret


at28BCZero:
at28wBCZero:
xor a xor a
cp b cp b
ret nz ret nz


+ 2
- 2
recipes/rc2014/eeprom/README.md View File

@@ -66,8 +66,8 @@ as at argument to `a28w`. You can run:
> seek 00 0000 > seek 00 0000
> a28w <size-of-contents> > a28w <size-of-contents>


It takes a while to write. About 1 second per byte (soon, I'll implement page
writing which should make it much faster).
It takes a little while to write. About 1 second per 0x100 bytes (soon, I'll
implement page writing which should make it much faster).


If the program doesn't report an error, you're all good! The program takes care If the program doesn't report an error, you're all good! The program takes care
of verifying each byte, so everything should be in place. You can verify of verifying each byte, so everything should be in place. You can verify


+ 1
- 1
recipes/rc2014/eeprom/glue.asm View File

@@ -62,7 +62,7 @@ init:
jp shellLoop jp shellLoop


a28wCmd: a28wCmd:
.db "a28w", 0b011, 0b001
.db "a28w", 0b011, 0b001, 0
ld a, (hl) ld a, (hl)
ld (AT28W_MAXBYTES+1), a ld (AT28W_MAXBYTES+1), a
inc hl inc hl


Loading…
Cancel
Save