====== More work on partition scanning ====== **2025-08-17** This blog post is a week late, albeit I did prepare it as usual. This happened due to personal reasons. ===== patchini ===== * [[https://hg.pushbx.org/ecm/patchini/rev/d37fe8f77856|Copy patchdeb.c source text file]] to patchsca.c * [[https://hg.pushbx.org/ecm/patchini/rev/a787818986fd|Implement patchsca]] * [[https://hg.pushbx.org/ecm/patchini/rev/e270eda7025e|Add patchsca.exe]] to mak.sh * [[https://hg.pushbx.org/ecm/patchini/rev/7234ab37cb57|Add display of extnames]] to command help of patchsca * [[https://hg.pushbx.org/ecm/patchini/rev/dbf87ebb2f58|Display current mode]] as a decimal and hexadecimal number ==== scanptab ===== * [[https://hg.pushbx.org/ecm/scanptab/rev/ca3524829894|Split scanptab.mac]] with the mode equates from the main source file. * [[https://hg.pushbx.org/ecm/scanptab/rev/575fa89fd671|Fix a bug]] where scan_subsequent_primary incorrectly checked the piBoot flag when it just wanted to detect the first (lowest) primary partition, eg when the priority active mode was not enabled. This came up during testing of the lDOS kernel. ===== lDebug ===== * [[https://hg.pushbx.org/ecm/ldebug/rev/8456b3290aad|Empty commit to cause rebuild]] of chstool.eld after the scanptab bugfix. ===== bootimg ===== * [[https://hg.pushbx.org/ecm/bootimg/rev/bcf1bd2275ec|Add another example to the partdisk.asm usage comment]], with an extended partition containing a logical partition, a nested extended partition, and finally a second logical partition. This is useful to test that the traditional order of logical partitions or ignoring subsequent logical partitions (after a nested extended partition) work as intended. ===== lDOS / lMS-DOS ===== * [[https://hg.pushbx.org/ecm/msdos4/rev/29015bb48a1d|Add scanptab files]] to the lDOS source tree. * [[https://hg.pushbx.org/ecm/msdos4/rev/8abf8871f9a6|Use scanptab scanner to replace the DOHARD and DoMini scanners]] in msbio/msinit.nas * [[https://hg.pushbx.org/ecm/msdos4/rev/ad869cf80319|Add lDOS scan mode field]] to lCFG block, to be written by patchini/patchsca utility. * [[https://hg.pushbx.org/ecm/msdos4/rev/4dbbc0252acd|Same bugfix as for scanptab]]. * Optimise handle_each_partition: [[https://hg.pushbx.org/ecm/msdos4/rev/b4b074004f09|Push registers after load_is_known indicates success]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/675a42ae798f|Reject attempts to log in duplicate drives on the same partition]], displaying an error. (This would have been activated by the scanptab bug.) * [[https://hg.pushbx.org/ecm/msdos4/rev/3314ffb3a0eb|Display scan errors as "Boot error:"]] rather than "Boot failure:" * [[https://hg.pushbx.org/ecm/msdos4/rev/056ae31b261b|Use DOSENTRY:DiskSector for reading partition tables]], eliminating the sector allocated for Init_BootSeg. * [[https://hg.pushbx.org/ecm/msdos4/rev/dc31908c2e5c|Update the error message for read error]] during partition table read, and drop unused message. * In load_is_known [[https://hg.pushbx.org/ecm/msdos4/rev/8f682a2cceda|do not set up di to point to the UPB template]], directly address it. * [[https://hg.pushbx.org/ecm/msdos4/rev/893a0c6fb157|Ignore type 15 (0Fh) extended partitions if no LBA access is supported]]. I'm not entirely happy with this yet but for now it is done this way. This allows to exactly emulate the lDOS 2024 behaviour using the scan mode variable. * [[https://hg.pushbx.org/ecm/msdos4/rev/c63d5903aa8a|Fix ZR check for partition ending]] at the end of the (32-bit) address space. This is pretty useless, likely a holdover from the MS-DOS v3.30 and lower kernels that only supported a 16-bit address space for block devices. * [[https://hg.pushbx.org/ecm/msdos4/rev/a9cf989cd010|Delete several variables no longer used]], and comment on the dynamic configuration. The latter only knows two different end addresses for the resident DOSENTRY section now. * [[https://hg.pushbx.org/ecm/msdos4/rev/64ddbeba378e|Correct a typo]] (Waring instead of Warning) on the ENDATROM label. * [[https://hg.pushbx.org/ecm/msdos4/rev/85f18470cb8a|Drop obsolete]] extern directive, setting DS before SYSIN that's redundant, and a comment on moving the DOS. * [[https://hg.pushbx.org/ecm/msdos4/rev/6d7026922ab9|Start to update doc/ksection.txt file]] for new section layout. * [[https://hg.pushbx.org/ecm/msdos4/rev/2a672504103f|Move init_cmdline_terminators and parse_config into the DOSENTRY section]]. This is in preparation to allowing overriding the CheckDebugger variable from the kernel command line, before the debugger check happens. * [[https://hg.pushbx.org/ecm/msdos4/rev/4fab5c1d1f85|Fix unknown command display]] to not repeat the first text byte. * [[https://hg.pushbx.org/ecm/msdos4/rev/d668d98db67c|Add function pointers (in DOSENTRY)]] to the command line name table. Also add the names for CHECKDEBUGGER and SCANMODE, which are no-ops as yet. * [[https://hg.pushbx.org/ecm/msdos4/rev/51eb87b692ae|Add number parsing]] from [[https://hg.pushbx.org/ecm/x2b2/file/3951e2fb753e/x2b2.asm#l335|x2b2 repo]] to msbio/msinit.nas * [[https://hg.pushbx.org/ecm/msdos4/rev/6757690ed979|Implement the CHECKDEBUGGER and SCANMODE commands for the kernel command line]], allowing to override their respective lCFG variables. * doc: [[https://hg.pushbx.org/ecm/msdos4/rev/a2618cb2d05f|List the lzexedat utility as a possible packer]] for inicomp use. * [[https://hg.pushbx.org/ecm/msdos4/rev/b67ba50d9cb4|Fix cmdline_scanmode.clr to use a NOT on the whole of DX]], not only DL. * doc: [[https://hg.pushbx.org/ecm/msdos4/rev/e7d951637d57|Update manual on patchini tools]], their supported values, and the two new kernel command line commands to override patchdeb and patchsca fields. Also change supported file systems to list the new default scan mode (multiple primary, extended, and logical partitions supported). {{tag>patchini scanptab ldebug chstool.eld bootimg ldos}} ~~DISCUSSION~~