From 1ca508dc2ed6e61af1b5bba1da8c44c59b4b89b5 Mon Sep 17 00:00:00 2001 From: b1ackmai1er <39449559+b1ackmai1er@users.noreply.github.com> Date: Mon, 10 Jun 2019 22:54:24 +0800 Subject: [PATCH] Invalid BIOS (signature missing) DS1210 datasheet "The fourth function the DS1210 performs is a battery status warning so that potential data loss is avoided. Each time that the circuit is powered up the battery voltage is checked with a precision comparator. If the battery voltage is less than 2.0 volts, the second memory cycle is inhibited. Battery status can, therefore, be determined by performing a read cycle after power-up to any location in memory, verifying that memory location content. A subsequent write cycle can then be executed to the same memory location altering the data. If the next read cycle fails to verify the written data, then the batteries are less than 2.0V and data is in danger of being corrupted" This also works: LD HL,HBX_IMG-2 LD DE,HBX_LOC-2 LD BC,HBX_SIZ+2 LDIR Regards Phil --- Source/HBIOS/hbios.asm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 3773112a..c3b97ab1 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -866,9 +866,11 @@ HB_START: ; LD HL,(HBX_IMG) ; LD (X2),HL - LD HL,HBX_IMG - LD DE,HBX_LOC - LD BC,HBX_SIZ + LD DE,HBX_LOC ; IF A DS1210 POWER CONTROLLER IS INSTALLED AND BATTERY BACKUP IS NOT + LD A,(DE) ; INSTALLED OR IS LESS THAN 2V THEN THE DS1210 WILL BLOCK THE SECOND RAM + LD A,(DE) ; ACCESS. PERFORM TWO DUMMY READS TO RAM TO ENSURE WE BYPASS THIS FEATURE + LD HL,HBX_IMG ; SO THAT THE ROM ID BYTES ARE COPIED CORRECTLY AND CP/M APPLICATIONS + LD BC,HBX_SIZ ; START CORRECTLY WHEN THEY CHECK THE ROM ID VERSION BYTES. LDIR ; LD HL,(HBX_IMG)