Skip to content

Commit

Permalink
Merge pull request #119 from Konamiman/fix/bad_mapdrv_on_device_chang…
Browse files Browse the repository at this point in the history
…e_and_mfrsd_driver
  • Loading branch information
Konamiman committed Nov 30, 2023
2 parents 7e8d5f8 + 3084861 commit bd871d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion source/kernel/bank4/partit.mac
Expand Up @@ -3138,7 +3138,7 @@ MAP_SPECIFIC:

MAP_DRV_UNK:
;Unknown change status: assume unchanged media.
;If it has changed, the boot checksum checksum
;If it has changed, the boot checksum
;mechanism will do the work of unassigning
;all other drives mapped to this device
;if necessary.
Expand All @@ -3148,6 +3148,7 @@ MAP_DRV_UNK:
MAP_DRV_CH:
push hl
push iy
push bc
ld e,(hl)
inc hl
ld d,(hl)
Expand All @@ -3157,6 +3158,7 @@ MAP_DRV_CH:
ld d,(iy+2)
ld e,(iy+3)
call UNMAPALL
pop bc
pop iy
pop hl

Expand Down
5 changes: 4 additions & 1 deletion source/kernel/drivers/MegaFlashRomSD/mfrsd.asm
Expand Up @@ -666,7 +666,7 @@ DEV_RW:

;ld hl,(#f9f0)
;inc hl
;ld (#f9f0),hl ; Cuenta lecturas
;ld (#f9f0),hl ; Count reads
call SD_OFF
ei
Expand All @@ -677,6 +677,9 @@ DEV_RW:
ret
.ok:
;A successful device access must reset the "device changed" flag
res BIT_SD_CHG,(ix+STATUS)

xor a ; Ok
ret

Expand Down

0 comments on commit bd871d4

Please sign in to comment.