summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2016-06-01 21:25:34 +0200
committerLeo C2016-06-01 21:25:34 +0200
commite34ae6198426a0fd0186b29f8518a914dcb1a94c (patch)
tree04e62a09d871bd7372c9bb03e90c337b89ab991c
parent2b3aff48bde947894e51da5f95c3ffe0e60cabac (diff)
downloadz180-stamp-e34ae6198426a0fd0186b29f8518a914dcb1a94c.zip
Implement media change flag
-rw-r--r--avr/z180-serv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/avr/z180-serv.c b/avr/z180-serv.c
index a49c9f9..d8e412f 100644
--- a/avr/z180-serv.c
+++ b/avr/z180-serv.c
@@ -256,6 +256,13 @@ int drv_detach(uint8_t drv)
p->opt = 0;
p->flags &= ~DRV_FLG_DIRTY;
p->img_name = NULL;
+
+ uint32_t scb = getenv_ulong(ENV_CPM3_SCB, 16, 0);
+ if (scb && (z80_bus_cmd(Request) & ZST_ACQUIRED)) {
+ z80_write(scb + 0xf0, 0xff);
+ z80_write(p->dph + 11, 0xff);
+ z80_bus_cmd(Release);
+ }
}
}
return 0;