Desdoblo aplicaciones BACK32M y UPGR32M en BACKZX2/BACKZXD y UPGRZX2/UPGRZXD respectivamente

This commit is contained in:
antoniovillena 2021-01-12 17:55:47 +01:00
parent b1d6122c59
commit cdd2060d81
6 changed files with 38 additions and 2 deletions

BIN
utils/BACKZXD Normal file

Binary file not shown.

BIN
utils/UPGRZXD Normal file

Binary file not shown.

View File

@ -1,4 +1,10 @@
output BACK32M
define zxdos 1
IF zxdos=1
output BACKZX2
ELSE
output BACKZXD
ENDIF
include zxuno.inc
@ -54,10 +60,18 @@ SDCard ld b, FA_WRITE | FA_OPEN_AL ; B = modo de apertura
ld (handle+1), a
jr nc, FileFound
call Print
IF zxdos=1
dz 'Can\'t open FLASH.ZX2'
ELSE
dz 'Can\'t open FLASH.ZXD'
ENDIF
ret
FileFound call Print
IF zxdos=1
dz 'Backing up FLASH.ZX2 to SD', 13
ELSE
dz 'Backing up FLASH.ZXD to SD', 13
ENDIF
call write16m
wreg flash_cs, 0 ; activamos spi, enviando un 0
wreg flash_spi, 6 ; envío write enable
@ -167,4 +181,8 @@ rst28 ld bc, zxuno_port + $100
outi
jp (hl)
IF zxdos=1
FileName dz 'FLASH.ZX2'
ELSE
FileName dz 'FLASH.ZXD'
ENDIF

View File

@ -1,4 +1,10 @@
output UPGR32M
define zxdos 1
IF zxdos=1
output UPGRZX2
ELSE
output UPGRZXD
ENDIF
include zxuno.inc
@ -54,10 +60,18 @@ SDCard ld b, FA_READ ; B = modo de apertura
ld (handle+1), a
jr nc, FileFound
call Print
IF zxdos=1
dz 'Can\'t open FLASH.ZX2'
ELSE
dz 'Can\'t open FLASH.ZXD'
ENDIF
ret
FileFound call Print
IF zxdos=1
dz 'Upgrading FLASH.ZX2 from SD', 13
ELSE
dz 'Upgrading FLASH.ZXD from SD', 13
ENDIF
call read16m
wreg flash_cs, 0 ; activamos spi, enviando un 0
wreg flash_spi, 6 ; envío write enable
@ -200,4 +214,8 @@ rst28 ld bc, zxuno_port + $100
outi
jp (hl)
IF zxdos=1
FileName dz 'FLASH.ZX2'
ELSE
FileName dz 'FLASH.ZXD'
ENDIF