From 0d0f5fb182dd4f7d234b88ee884e11d466d48f4c Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sat, 18 Mar 2023 02:13:00 +0800 Subject: [PATCH] Update dma.asm cp/m fails to boot with the dma driver included but no dma hardware installed. This is because the default "dma_fail_flag" indicates that the dma is good to go. But in safe mode the dma initialization never takes place to find no dma and set this flag, so the memory driver hangs. This change is to make the default status of the flag the failed state so the memory driver will fallback to software in recovery mode. --- Source/HBIOS/dma.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/HBIOS/dma.asm b/Source/HBIOS/dma.asm index 62c4d092..c63412e1 100644 --- a/Source/HBIOS/dma.asm +++ b/Source/HBIOS/dma.asm @@ -72,7 +72,9 @@ DMA_INIT: di otir ; load dma ei + xor a ; set status + ld (DMA_FAIL_FLAG),a ; ok to use dma ; DMA_EXIT: DMAIOFULL @@ -94,7 +96,7 @@ DMA_NOTFOUND: jr DMA_EXIT ; DMA_FAIL_FLAG: - .db 0 + .db DMA_FAIL_FLAG ; ;================================================================================================== ; DMA PROBE - WRITE TO ADDRESS REGISTER AND READ BACK