Skip to content

Fix AliM1543C sector calculation and read race - #117

Merged
RaymiiOrg merged 2 commits into
lenticularis39:mainfrom
hvolkmer:fix-ide-boot-issue
Apr 15, 2026
Merged

RaymiiOrg merged 2 commits into
lenticularis39:mainfrom
hvolkmer:fix-ide-boot-issue

Conversation

@hvolkmer

@hvolkmer hvolkmer commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Next sector needs to be data size divided by and not multiplied by sector size. This got it to work some time, but there was also a race for status (2nd commit).

This fixes #115 (I verified. Boot failed with the error mentioned and succeeds after fix)

and potentially these as well (not verified)

hvolkmer added 2 commits April 9, 2026 18:34
Next sector needs to be data size divided by and not multiplied by sector size
This register returned a cached value (alt_status) that was only updated at specific points via UPDATE_ALT_STATUS(). When the controller thread completed a read command and set busy=false, drq=true, the alt_status still showed the old busy=true. The SRM would poll, see busy, time out, and report "failed to send Read".

Compute alt_status live from the current status flags instead of returning the stale cached copy.
@hvolkmer hvolkmer changed the title Fix AliM1543C sector calculation Fix AliM1543C sector calculation and read race Apr 10, 2026
@RaymiiOrg
RaymiiOrg merged commit 59a115c into lenticularis39:main Apr 15, 2026
0 of 5 checks passed
ostrich pushed a commit to ostrich/axpbox that referenced this pull request Apr 17, 2026
Fix AliM1543C sector calculation and read race
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cant boot from disk image

2 participants