This shows you the differences between two versions of the page.
— |
blog:pushbx:2024:0612_early_june_work [2024-06-12 21:47:10 +0200 Jun Wed] (current) ecm created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Early June work ====== | ||
+ | |||
+ | |||
+ | **2024-06-09** | ||
+ | |||
+ | |||
+ | ===== lDebug ===== | ||
+ | |||
+ | The load_unit_flags equates [[https:// | ||
+ | |||
+ | |||
+ | ===== instsect ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Not yet uploaded: Detect doubles in the LBA search strings, and eventually avoid writing them. | ||
+ | |||
+ | |||
+ | ===== ldosboot ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ===== Enhanced DR-DOS ===== | ||
+ | |||
+ | ==== UMBs not enabled on JemmEx ==== | ||
+ | |||
+ | Today [[https:// | ||
+ | |||
+ | |||
+ | ==== LBA not used properly (CD bug) ==== | ||
+ | |||
+ | A user on the BTTR Software forum [[https:// | ||
+ | |||
+ | This turned out to be wrong, but by creating a file system with a directory beyond 64 Ki clusters I was able to reproduce the problem proper on qemu. Confusingly enough, not moving the directory that far up made my tests succeed, so I initially guessed the assumption might be correct. | ||
+ | |||
+ | This led me to fruitlessly trace the int 21h handler for function 3Bh (change directory) for a while, looking for unexpected behaviour. This was made more difficult by the fact I do not have trace listing files for the kernel yet, so TracList cannot be used. That meant a lot of manual look up of source files while tracing. | ||
+ | |||
+ | Another problem was with my method of tracing: I would trace to a certain handler, then use proceed steps (P command in lDebug) to try processing a function call. If this caused the critical error, I would break on another breakpoint and Go to the last callsite before the error, then Trace into it. | ||
+ | |||
+ | This failed when the same function was called repeatedly during the change directory system call, but with the first call actually succeeding. So that wasted a bunch of time. | ||
+ | |||
+ | Another problem was that I needed to run int3.com between attempts to arm the conditional int 21h breakpoint again. This is due to an lDebug design fault. Using multiple permanent breakpoints can work around this problem. | ||
+ | |||
+ | Eventually I traced the problem into the BIO's block device' | ||
+ | |||
+ | Tracing the CHS routines, I found that the int 13h function 02h call used the wrong address. I determined this using a residently-installed chstool Extension for lDebug. In fact, using the chstool.eld with the input tuple '' | ||
+ | |||
+ | However, both the size of the file system and the chosen MBR partition type should make the kernel chose LBA access. From this insight it was a quick way to finding out: | ||
+ | |||
+ | I booted into lDebug and ran '' | ||
+ | |||
+ | < | ||
+ | @if (ri13p == 550) then goto :eof | ||
+ | @a 0:550 | ||
+ | @ jmp (ri13s): | ||
+ | @ . | ||
+ | @r dword [0:13*4] = 550 | ||
+ | @bp new ptr ri13p | ||
+ | @bl at ptr ri13p</ | ||
+ | |||
+ | (Did I forget setting VFF here? Very possible. Asides, putting a nop before the jump would be of use sometimes.) | ||
+ | |||
+ | Then I loaded EDR-DOS using '' | ||
+ | |||
+ | The next breakpoint hit was in the BIO's file system detection. So we use '' | ||
+ | |||
+ | This eventually pointed to the instruction that cleared the LBA flag, making the kernel fall back to trying to access the block device' | ||
+ | |||
+ | Another idea is to check for CHS overflows before trying to read the sector. I believe the BIO does not do this yet. | ||
+ | |||
+ | The lack of a trace listing file [[https:// | ||
+ | |||
+ | {{tag> | ||
+ | |||
+ | |||
+ | ~~DISCUSSION~~ | ||