.area _COMMONMEM
-SECTORID .equ 0x08 ; FIXME - set real format up!
-CSUM .equ 0x0E ; FIXME ditto
+SECTORID .equ 0x01
+CSUM .equ 0x0E
nap_1ms: push de
ld de, #87
; Turn all motors off
;
mdv_motors_off: ld a, #0xff
+ ld bc, #0x08EF
jr mdv_motor_a
;
; Turn on motor for microdrive unit A
; int mdv_motors_off(void)
;
_mdv_motor_off: call mdv_motors_off
+ xor a
+ out (0xfe), a
ret0:
ld hl, #0
ret
ld a, (_mdv_page)
or a
push af
- call z, map_process_save
+ call nz, map_process_save
call mdv_fetch
- jr z, ret0
+ jr nz, poprete
+ xor a
+poprete:
ld l, a
xor a
ld h, a
pop af
- call z, map_kernel_restore
+ call nz, map_kernel_restore
ret
_mdv_bwrite: