User Tools

Site Tools


blog:pushbx:2024:0910_early_september_work

Early September work

2024-09-08

The prior week nothing changed and that Sunday I didn't get to write a blog post regardless. This week some changes did happen.

inicomp

The last two changes were actually added in a single changeset. They extend the inicomp to packed payload protocols as follows:

  • The uncompressed lCFG block is copied to the end of the resident INIT1 to preserve it during depacking. This buffer is called the transfer lCFG block.
  • For kernel and application mode, the transfer lCFG block address is passed in cx:di.
  • For device mode, the transfer lCFG block address is passed in the dword behind the strategy and interrupt entrypoints of the device header. It is expected that this dword should be pre-initialised to a zero value.

The suggested protocol is as follows:

  • Device mode entrypoint should check the dword in which inicomp writes the transfer lCFG block's address. If it isn't zero, assume we were loaded from inicomp and save the lCFG block from the transfer location to a buffer in the depacked program stage.
  • For the kernel mode and application mode, the entrypoint address that inicomp jumps to should be changed, for example by incrementing it by one. This allows the depacked program stage to detect if it was loaded from inicomp or without an inicomp stage (eg directly from iniload). If the former then the pointer in cx:diis valid, and should be used to access or copy the transfer lCFG block.

kernwrap

Add an option to generate and pass an lCFG block to the kernel. This uses the changes to inicomp and drkernpl. Like suggested for inicomp, this changes the _EXEC_OFFSET define in inicomp to 1 to signal to the drkernpl that it is being loaded from inicomp.

lDOS boot

Add options to drkernpl to pass lCFG block, copy an inicomp lCFG block, and to include an lCFG block within the drkernpl stage. The latter is only to be used if the kernel is not compressed with inicomp.

If the option to copy the inicomp transfer lCFG block is enabled, then inicomp entry is detected by being entered with ip equal to 1 instead of 0.

Similarly to the inicomp to drkernpl protocol, the drkernpl to drbio protocol is changed so that cx:di points to the lCFG block. For drkernpl its lCFG block always lives between 00600h and 00700h, which is conveniently always available. There is, however, no way for drbio to detect that an lCFG block is passed. It must be built to assume whether this is true or not.

patchini

Adds the patchdeb tool. This operates on Enhanced DR-DOS's "check debugger" byte in the lCFG block (at offset 20). The first revision copied the patchpro source text without changes. The second revision implemented patchdeb first, recognising only the flags 1 (check) and 2 (assume). Unlike the FreeDOS kernel, the EDR-DOS implementation treats these as flags, so 0 = do not check and assume no, 1 = check and assume no, 2 = do not check and assume yes, and 3 = check and assume yes.

The third revision added support for recognising the flags 4 (check only if vector is valid) and 8 (check only if vector points to an IBM Interrupt Sharing Protocol header). Of note is that patchdeb also allows setting or clearing flags in the configuration byte that it doesn't recognise, so a current patchdeb could be used to operate on future yet to be defined flags.

lDebug

x2b2

Do not call the Has_SS error/warning function twice if the /S switch is passed and both the SS and SP in the .exe header are nonzero. This switch is used for the amdpd build.

ident86

tractest convlist.pl

The TASM support was needed to create a complete trace listing file from the TASM listings of the amdpd driver, so that ident86 could be utilised to its fullest potential.

Enhanced DR-DOS

Two picks from the SvarDOS repo:

fixmem

amdpd

This is an AMD PCnet packet driver sourced from crynwr.com. It is free software under the GNU GPL v1-only. It supports the pcnet device of qemu.

I ported the entire driver to build with NASM, WarpLink, x2b2, and convlist.pl. During this work I also lightly optimised some segment uses in the original TASM source texts by adding some assume directives, to simplify the porting.

I used fixmem.pl and ident86 in large parts to do the porting, albeit I did do some replacements manually rather than adding handling for everything to fixmem.

I tested the final build with the ethflop client and server both running on FreeDOS in qemu.

ethflop

I made some suggestions to the ethernet diskette emulator, in the SvarDOS forum thread announcing it. I may work on it my self later as well.

wwwecm.scr

You could leave a comment if you were logged in.
blog/pushbx/2024/0910_early_september_work.txt · Last modified: 2024-09-10 19:06:11 +0200 Sep Tue by ecm