From a24b925057ba35d467b47d5c1f8e06fb13357be0 Mon Sep 17 00:00:00 2001 From: antoniovillena Date: Fri, 12 Aug 2016 11:32:40 +0200 Subject: [PATCH] Beta provisional que resuelve un bug al utilizar SDs con clusteres grandes --- firmware/firmware.asm | 18 +++++++++++++----- firmware/strings.asm | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/firmware/firmware.asm b/firmware/firmware.asm index 4307560..3ae188f 100644 --- a/firmware/firmware.asm +++ b/firmware/firmware.asm @@ -1584,7 +1584,7 @@ saba jr nz, erfnf ; wrong length ld l, (ix+$1a) ; first cluster of the file ld h, (ix+$1b) - ld ix, $c000 + ld ix, $e000 bucop push hl ; save current cluster ld b, e call calcs ; translate cluster to address @@ -1675,7 +1675,7 @@ sabe pop bc ld b, (ix+$14) ld l, (ix+$1a) ld h, (ix+$1b) - ld ix, $c000 + ld ix, $e000 bucap push hl call calcs call trans @@ -1771,6 +1771,14 @@ desc pop hl trans push bc ld a, (tmpbu2+$d) ld b, a + ld a, (tmpbu2+$1d) + or a + jr nz, otva + ld a, (tmpbu2+$1c) + rrca + cp b + jr nc, otva + ld b, a otva call readata inc ixh inc ixh @@ -1788,14 +1796,14 @@ otv2 sub 6 call prsta1 ld de, (tmpbu2+$1e) ; SPI address, initially 0000 exx - ld a, $40 - ld hl, $c000 + ld a, $20 + ld hl, $e000 exx call wrflsh inc de ld (tmpbu2+$1e), de exx - ld ix, $c000 + ld ix, $e000 pop de pop hl pop bc diff --git a/firmware/strings.asm b/firmware/strings.asm index 956580a..f645f54 100644 --- a/firmware/strings.asm +++ b/firmware/strings.asm @@ -1,6 +1,6 @@ cad0 defb 'Core: ',0 cad1 defm 'http://zxuno.speccy.org', 0 - defm 'ZX-Uno BIOS v0.48', 0 + defm 'ZX-Uno BIOS v0.49', 0 defm 'Copyleft ', 127, ' 2016 ZX-Uno Team', 0 defm 'Processor: Z80 3.5MHz', 0 defm 'Memory: 512K Ok', 0 @@ -37,7 +37,7 @@ cad8 defm $10, ' ', $10, ' ', $10, 0 cad9 defb $14, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11 defb $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $18, $11 defb $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $15, 0 - defb ' BIOS v0.48 ', $7f, '2016 ZX-Uno Team', 0 + defb ' BIOS v0.49 ', $7f, '2016 ZX-Uno Team', 0 IF recovery=0 cad10 defb 'Hardware tests', 0 defb $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11, $11