Commit Graph

405 Commits

Author SHA1 Message Date
Kenneth J Davis
b79f0003ac
only create list file if requested, avoids error due to duplicated command line option for generating list file 2023-12-17 22:10:32 -05:00
Kenneth J Davis
cfdd09963f
fix from boeckmann (Bernd Böckmann) for Format GitHub issue #1 - format divide by 0 due to kernel function 440D, subfunction 60 returning a zero for logical_sectors_per_fat as initdisk overflows and calculates incorrect value 2023-12-17 21:01:37 -05:00
Kenneth J Davis
f1249dcd6f
From bzt, initialize drive parameter head & sector values to avoid potential divisions by 0 2023-12-08 21:20:46 -05:00
Kenneth J Davis
5880d36ba9
add ability to adjust verboseness of messages during booting 2023-12-08 18:08:11 -05:00
Bernd Boeckmann
e4a62f239d fix exeflat not deleting temporary file 2023-12-08 17:00:17 -05:00
C. Masloch
95694f7e34 config: delete variable only if it makes enough space to write new 2023-08-30 06:59:41 -04:00
C. Masloch
6101fb2aed config: pass searchvar result to deletevar 2023-08-30 06:59:41 -04:00
C. Masloch
24d19cd05c config: allow to delete variable with empty SET command 2023-08-30 06:59:41 -04:00
C. Masloch
3dafa54e8b config: delete existing variable before writing new contents 2023-08-30 06:59:41 -04:00
C. Masloch
132a0a9f94 truename: fix array overrun (pick from fdpp)
Picked from the commit at fe1c4dc7fe

The referenced issue is at https://github.com/dosemu2/fdpp/issues/212

The patch was applied using unix2dos on the patch file
then `patch -p1 --binary` with the patch file as stdin.
The original used a new define for the maximum path length.
As there is no difference to our current SFTMAX define I
changed this hunk to retain the SFTMAX use.

This fixes a bug when eg function 3Dh receives a buffer
that starts with ".\" but the byte in memory before this
buffer happens to be also a dot. I ran into this problem
semi-randomly during building EDR-DOS with the most recent
WarpLink build. If WarpLink was placed somewhat low in the
Low Memory Area then one of its function 3Dh calls would
happen to have a dot before the pathname buffer. (I had to
load lCDebug using the last fit strategy then enter TSR mode,
to catch the bug without the presence of the debugger working
around the occurrence of the bug.)

Original commit Metadata:

From: Stas Sergeev <stsp@users.sourceforge.net>
Date: Wed, 1 Feb 2023 13:01:55 +0500
Subject: [PATCH] truename: fix array overrun [fixes #212]

src[-2] was peeking into a random memory location.
It seems entire truename() is written by some morons... :(
Its completely unreadable and full of bugs.
2023-08-26 21:32:19 -04:00
C. Masloch
29ccb6e454 main: insure master environment starts out empty 2023-07-03 07:37:00 -04:00
C. Masloch
a0549a395e config: make sure word marker trailing in environment is zero 2023-07-03 07:37:00 -04:00
C. Masloch
3d1ba0d486 config: build master environment during FDCONFIG.SYS processing
lDebug wants to access the environment while executing
as a device driver. Instead of building it in a variable
then copying it to 68h:0 after FDCONFIG.SYS processing,
just build it there to begin with.
2023-07-03 07:37:00 -04:00
Andrew Bird
afe7fbe068 inthndlr: align hma size to para
Based on a patch https://github.com/dosemu2/fdpp/commit/e7fe81d458
for FDDP by @stsp

[fixes #101]
2023-04-13 18:05:24 -04:00
C. Masloch
4973031b00 test: use new bootimg option _BOOTPATCHFILE
This will allow to use file system parameters other than
the default 1440 KiB 90mm diskette's default FAT12 FS.
2023-04-02 12:09:13 +02:00
C. Masloch
abc5ab7f0a update bootimg from hg 380400d3d48e
From https://hg.pushbx.org/ecm/bootimg/file/380400d3d48e
2023-04-02 12:09:13 +02:00
C. Masloch
cba5ee259d update ldosboot from hg 798e0b02fedc
From https://hg.pushbx.org/ecm/ldosboot/file/798e0b02fedc
2023-04-02 12:09:13 +02:00
C. Masloch
adbc31edea update lmacros from hg 99b01fa65007
From https://hg.pushbx.org/ecm/lmacros/file/99b01fa65007
2023-04-02 12:09:13 +02:00
C. Masloch
04353fe9e4 ci_test: do simple boot tests 2023-04-02 12:09:13 +02:00
C. Masloch
6d1ee95e10 ci_test: use bash for better error messages 2023-04-02 12:09:13 +02:00
C. Masloch
26607e9297 test: add a simple boot test using qemu, ldosboot, bootimg 2023-04-02 12:09:13 +02:00
C. Masloch
014111dc39 ci-build: install more packages in preparation for boot test 2023-04-02 12:09:13 +02:00
C. Masloch
a5e479c013 import bootimg from snapshot of hg ed7b734a8d06
From https://hg.pushbx.org/ecm/bootimg/file/ed7b734a8d06
2023-04-02 12:09:13 +02:00
C. Masloch
f84d9290b6 import ldosboot from snapshot of hg b9b7d2cf8971
From https://hg.pushbx.org/ecm/ldosboot/file/b9b7d2cf8971
2023-04-02 12:09:13 +02:00
C. Masloch
fb689c1372 import lmacros from snapshot of hg 9fa0e64034cd
From https://hg.pushbx.org/ecm/lmacros/file/9fa0e64034cd
2023-04-02 12:09:13 +02:00
C. Masloch
fd281799eb fix git attributes for test subdirectory 2023-04-02 12:09:13 +02:00
C. Masloch
559813c5fc ci_build: do not remove test subdirectory 2023-04-02 12:09:13 +02:00
Andrew Bird
fa3dc59367 DosGetExtFree: Use new redirector function 11a3
To be able to return free space on larger non local disks, the redirector
needs an extension. Dosemu2 has implemented this function and FDPP
has an almost identical patch to this. If the extension is not
implemented by your chosen redirector, then fallback to the standard
110c function is done for int21/7303.

With this patch up to 2TB (with Dosemu2 reporting in 512 blocks) can be
displayed.
2023-03-21 20:54:17 -04:00
Andrew Bird
4e23a63e72 CI: Use tagged release of Open Watcom
The current snapshot proved unreliable.
2023-03-21 20:54:17 -04:00
C. Masloch
384e68529a sys: detect small FAT32 as FAT32 (zero in word SPF)
Also checks that the total amount of clusters is possible
for the detected file system, erroring out otherwise.
Small FAT32 is displayed in the verbose output specifically.
2023-01-10 13:17:16 -05:00
C. Masloch
7115d69cd2 sys: support 256 sectors per cluster
This was overlooked in the earlier commits because SYS
uses its own BPB structures and name for the SPC field.
2023-01-10 13:17:16 -05:00
C. Masloch
2efe4ab9f4 boot: enable loading from file systems with 256 sectors per cluster
This should be Enhanced DR-DOS compatible.

oemboot.asm contains an optimisation to save 2 bytes,
by using mov instead of a lea with bp evaluating to
a constant value. This was needed to fit the addition
for 256 spc support. It is otherwise unrelated.

The LBA detection patch offsets in SYS have also been
updated to match the changed boot.asm offsets.
2023-01-04 19:38:57 -05:00
C. Masloch
28cd58688a fatfs.c: allow bpbSectorsPerCluster == 0 to mean 256
This should be compatible to Enhanced DR-DOS.

Tested by building a boot image like the following:

nasm ../ldosmbr/oldmbr.asm -o oldmbr.bin
nasm ../ldosboot/boot.asm -D_FAT16=1 -I ../lmacros/ \
 -D_LOAD_NAME="'LDEBUG'" -o boot16.bin
nasm bootimg.asm -I ../lmacros/ -o disk16.img \
 -D_MBR -D_ALIGNDATA -D_BOOTPATCHFILE=boot16.bin \
 -D_MBRPATCHFILE=oldmbr.bin -D_BPE=16 \
 -D_SPI='(_SPC * 5000)' -D_NUMROOT=512 -D_SPC=256 \
 -D_SPF='((_SPI / _SPC + 255) / 256)' \
 -D_PAYLOADFILE=../ldebug/bin/ldebug.com,quit.com,\
::rename,../k256spc/bin/kernel.sys,kernel.sys,\
command.com,::fill,1,32,autoexec.bat

The repos bootimg, ldosboot, ldosmbr, and lmacros are
available at https://hg.pushbx.org/ecm/

The file ldebug.com is a recent bootable lDebug debugger.
The file command.com is a recent FreeCOM. The file quit.com
is assembled with NASM from
https://hg.pushbx.org/ecm/ldebug/file/e6035c05670a/misc/quit.asm

Run like this:

qemu-system-i386 -hda disk16.img -boot order=c -display curses

To the lDebug prompt "-" enter "boot protocol freedos",
then a "q" command. On success, the quit.com command
can be run to quit the qemu VM.

Not yet done:

- initdisk.c:512 uses MAXCLUSTSIZE defined to 128. This is
not difficult to change but it is unclear whether this
should be changed.

- The boot loaders are not yet adjuscted, requiring use of
the ldosboot or lDebug loaders instead.

- A patch for FORMAT (copylefted) version 0.91u is available
from the Enhanced DR-DOS project. Mirrored in the directory at
https://pushbx.org/ecm/download/edrdos/freedos/
This should be easy enough to update to the most recent version.
2023-01-04 19:38:57 -05:00
C. Masloch
302b002adb sys: enable building without WITHFAT32 defined 2022-12-31 09:37:42 -05:00
C. Masloch
bf085a7ed6 sys: fix gcc build, int86 has to preserve ds
The int86 function is used to call interrupt 21h
service 32h in the reset_drive function. This
function returns a pointer using the ds register.
ds will usually point into the DOS data segment
then (for our kernel). However, the compiler
assumed ds to be unchanged.
2022-12-31 09:37:42 -05:00
Andrew Bird
bb1bbbb1cb CI: Update deprecated output method 2022-10-28 07:05:26 -04:00
Andrew Bird
ccf4367729 CI: Update std actions to avoid node version warnings 2022-10-28 07:05:26 -04:00
Kenneth J Davis
339256d6aa
revert changes to ci-build.yml 2022-10-25 07:12:50 -04:00
Kenneth J Davis
1c25390e49
update deprecated set-output 2022-10-25 07:01:09 -04:00
Kenneth J Davis
e1b22c7035
update comments
(from Geoff Chappell blog and RBIL)
2022-10-24 20:19:32 -04:00
Kenneth J Davis
6f6e44e1b5
fix OW warning W115 in config.c 2022-10-24 18:08:27 -04:00
Kenneth J Davis
af52b0c8c3
fix OW warning W115 in dsk.c 2022-10-24 18:01:50 -04:00
Kenneth J Davis
c152d551de
fix OW warning W115
cast array using pointer to first element [newboot] instead of pointer to whole array [&newboot] to avoid OW error W115 "&array may not produce intended result" since the address of operator "&" is not required for getting the address of an array.
2022-10-24 17:56:33 -04:00
Kenneth J Davis
9d799c2a1e
Update ci-build.yml
enable ability to manually run workflow
2022-10-24 17:28:56 -04:00
tkchia
7149a8efe4 FCB (int 21h func 29h): should not accept field separator as "drive letter" 2022-07-16 07:20:24 -04:00
tkchia
031f17068a FCB (int 21h func 29h): should keep parsing name even if drive letter invalid 2022-07-15 09:45:10 -04:00
Kenneth J Davis
0e6d90cf82
build fixes, declare variables at start of block, use size_t to avoid int vs long errors 2022-06-03 23:29:37 -04:00
Kenneth J Davis
bfd5328183
fix building on Windows with Open Watcom, using OWWIN helper tools built as win32 executables instead of DOS executables as done using WATCOM for COMPILER 2022-06-03 23:28:51 -04:00
C. Masloch
9343e00f9a exeflat: try to fix CI displaying upx output before exeflat output 2022-05-30 17:37:26 -04:00
C. Masloch
b5299924c2 exeflat: update comments before prepending entry header 2022-05-30 17:37:26 -04:00