354 Commits

Author SHA1 Message Date
Stefan Reinauer
4aedb46f01
Merge pull request #26 from reinauer/MBRnGPT
MBR and GPT support
2023-12-03 21:54:47 -08:00
Stefan Reinauer
d46a9af901
Merge pull request #28 from LIV2/mounter_checksum
Mounter: checksum must pay attention to SummedLongs
2023-12-03 21:48:06 -08:00
Stefan Reinauer
9ee67eccd2 bootmenu: consider string lengths in disk screen
After NULL terminating the drive names we have to also
consider the string lengths in the UI or we will see
NULL bytes in the output :)
2023-12-03 11:35:37 -08:00
Stefan Reinauer
1a1fc3b5d4 Support two filesystem slots
This change brings support for a second filesystem stored in the ROM
(if there's enough space)

The romfile code is fairly local so there was no point in keeping the
files around in a4091_save_t. Now the file state is kept locally in
init_romfiles() instead.

Since not all filesystem drivers contain a resident init structure, it
is now also possible to specify a DosType that is used to register the
filesystem in filesystem.resource.
2023-12-03 11:35:17 -08:00
317fd3f197 Mounter: checksum must pay attention to SummedLongs
The amount of checksummed longs doesn't always equal the device blocksize / 4.
When a disk is prepared by HDInstTool it checksums 256 bytes of RDB, PART, LSEG etc
This fix was provided by Olaf Barthel @obarthel

Thanks to Jasonsbeer and MichaelD for reporting this issue
2023-12-03 19:44:34 +01:00
Stefan Reinauer
557c759fb8
Merge pull request #27 from reinauer/main
bootmenu: Open libraries on demand only
2023-12-02 14:51:06 -08:00
Stefan Reinauer
562cda8d0e bootmenu: Open libraries on demand only
Previously we opened gadtools.library and intuition.library
unconditionally even if we wouldn't display the boot menu.
This can cause side effects, so change the code to open the
libraries only when needed.
2023-11-27 14:08:25 -08:00
Stefan Reinauer
53721c5be8 Clean up bootmenu code 2023-11-22 21:18:06 -08:00
Stefan Reinauer
e2ba93e148 mounter: Factor out processing of PatchFlags
The exact same code is duplicated three times.
2023-11-22 21:16:05 -08:00
Stefan Reinauer
61cae7785c Add support for MBR and GPT partitions 2023-11-22 21:15:40 -08:00
Stefan Reinauer
6c3f903806 Revert: Tighten Forbid()/Permit() times in mounter
Reverting 65a3c07 because it breaks the driver.
2023-11-22 12:49:49 -08:00
Stefan Reinauer
38646835b2 Change find_cdfs to find_filesystem
This can be called to find any filesystem by DosType.
2023-11-20 20:00:22 -08:00
Stefan Reinauer
65a3c07973 Tighten Forbid()/Permit() times in mounter
OpenResource() does not need to be within a Forbid() section.
2023-11-20 20:00:02 -08:00
Stefan Reinauer
4ca1532196 Simplify list_filesystems() 2023-11-20 19:59:45 -08:00
Chris Hooper
02756ed5cf
Merge pull request #25 from cdhooper/a4091-test
a4091 test fixes (-l, -c, ISTAT, ROM check)
2023-11-20 17:34:09 -08:00
Chris Hooper
b4c8c7eb66 a4091 test fixes (-l, -c, ISTAT, ROM check)
Fixed bug on "a4091 -c" reporting Zorro III board size incorrectly
Fixed possible infinite loop waiting for 53C710 ISTAT to clear
Fixed ignore of ROM version & revision fields in ROM test
Added "-l <count>" to specify the number of test iterations to run
2023-11-20 17:29:53 -08:00
Chris Hooper
f326c25fcb
Merge pull request #24 from tkurbad/main
Document basics of a4091 tool
2023-11-20 01:35:37 -08:00
Torsten Kurbad
d6e0f19d04 Document basics of a4091 tool 2023-11-20 10:27:57 +01:00
Stefan Reinauer
3a2f0eda18 Update propack submodule 2023-11-18 23:00:47 -08:00
Stefan Reinauer
9b1a4883bc Call list_filesystems() after mounter has completed
This way we can see which filesystems have been added
2023-11-18 22:47:50 -08:00
Stefan Reinauer
f8848c3e76 Don't assignment variable twice in sd_scsidirect()
Fix CID 330972 (Unused value)
2023-11-18 22:44:40 -08:00
Stefan Reinauer
fe318db18e Initialize variables in scsipi_completion_poll()
Fixes potential uninitialized pointer read (CID 330975)
2023-11-18 22:42:16 -08:00
Stefan Reinauer
80dc724ea8 Comment out dead code in scsiconf
Fixes CID 330978
2023-11-17 20:04:07 -08:00
Stefan Reinauer
daa0ec087b Explicitly mark fallthrough in cmdhandler
Fix CID 330964 and CID 330974
2023-11-17 20:02:24 -08:00
Stefan Reinauer
c0aea03831 cov-configure: template config 2023-11-17 19:39:46 -08:00
Stefan Reinauer
d15c25bf88 Fix cov-configure (again) 2023-11-17 19:32:30 -08:00
Stefan Reinauer
4fad0ce30c ncr53cxxx.c: Always initialize variables
Fixes Coverity CID 330961.
2023-11-17 19:17:48 -08:00
Stefan Reinauer
75749a3942 Fix cross compiler path for coverity 2023-11-17 19:12:22 -08:00
Stefan Reinauer
3517106fce Update propack submodule 2023-11-17 19:10:00 -08:00
Stefan Reinauer
102a24685c Update coverity workflow
- configure cross compiler
- checkout submodules
2023-11-17 18:36:02 -08:00
Stefan Reinauer
c8dcbe91a6 Can't run cov-configure 2023-11-16 22:37:18 -08:00
Stefan Reinauer
1f70bcf375 attach.c: Fix Unused value
CID #330963 found  that periph_dbflags is set twice in a row. This is
harmless, however let's clean it up anyways.
2023-11-16 22:18:42 -08:00
Stefan Reinauer
b299d6ae1e attach.c: Fix irq_handler()
In CID #330976 Coverity Scan found an uninitialized pointer read. This
is because the construct that sets save is not fully understood by
Coverity. It is better to rewrite the function to pass save in as a
parameter anyways.
Verified that thwe assembler code produced is identical before and after
(with Bebbo's gcc 6.5)
2023-11-16 22:16:29 -08:00
Stefan Reinauer
17179bea46 Add Coverity Scan workflow 2023-11-16 22:10:32 -08:00
Stefan Reinauer
30b54a7f23 bootmenu: Fix potential null pointer dereference
coverity CID #330977
2023-11-16 22:08:00 -08:00
Stefan Reinauer
41c436dce6
Merge pull request #22 from reinauer/CDFileSystem
CDFileSystem improvements
2023-11-12 09:56:22 -08:00
Stefan Reinauer
60045f78ad readblock: Only check checksum when ID specified
When reading blocks with a specific ID (e.g. blocks that are part of
the RDB) we want to verify the checksums. But if we are reading random
blocks off the disk, they might or might not use the same checksumming
mechanism. Hence don't calculate/verify the checksum for them.
2023-11-11 17:29:39 -08:00
Stefan Reinauer
f88316ce3d Make CDFileSystem code more resilient
Don't hard code 0x43443031 but instead use what the FileSysEntry
tells us.
2023-11-11 16:17:33 -08:00
Stefan Reinauer
74d5d1720d Add conforming CDFS ID string
If we are not loading CDFS through the resident rt_Init code, we need to
provide our own creator name. Make it follow the conventions of the other
filesystem drivers.
2023-11-11 11:04:17 -08:00
Stefan Reinauer
58de877be8 Improve CDFileSystem support
- Adds support for loading a filesystem without the need for a
  resident struct.
- Factor out debugging functions from the mounter code finding CDFS:
  scan_filesystems --> list_filesystems & find_cdfs
- Properly Forbid/Permit when operating on FileSystemEntries
2023-11-11 08:52:37 -08:00
Stefan Reinauer
a2837bfe32 Fix debug output when scanning filesystems 2023-11-09 21:30:51 -08:00
Stefan Reinauer
fed4bd7458
Merge pull request #21 from reinauer/Turn_off_after_Mounting
Disable drive motor after probing
2023-11-09 20:49:00 -08:00
Stefan Reinauer
a412b07092 Move Disabling drive motor out of ScanRDSK
We want non-RDSK drives turn off as well, ie.
CDROM drives.
2023-11-06 22:08:53 -08:00
Stefan Reinauer
89ef7b4e26 Improve detection of CDFileSystem in Makefile 2023-11-06 20:58:23 -08:00
Stefan Reinauer
5610ac4004
Merge pull request #20 from reinauer/DriveGeometry
Dynamically determine block size in mounter
2023-11-06 18:59:44 -08:00
Stefan Reinauer
f452bd28a3
Merge pull request #19 from reinauer/submodules
Automatically check out submodules
2023-11-06 09:10:15 -08:00
Stefan Reinauer
32eace9d1b Mounter: Honour de_TableSize when copying DosEnvec
From Matt Harlum
2023-11-06 08:15:28 -08:00
Stefan Reinauer
eb0010c66a Dynamically determine block size in mounter
Instead of hard coding block sizes, switch from dev_scsi_inquiry()
to dev_scsi_get_drivegeometry(), because in addition to the device
type it will also let us know the block size.
2023-11-06 07:57:38 -08:00
Stefan Reinauer
1c7add2972 AUtomatically check out submodules 2023-11-06 07:33:36 -08:00
Stefan Reinauer
98128d2a11 Fix serial number generation in rom.S
The serial number was intended to reflect the version of the driver
used to build the ROM. For example when building 42.27 the serial
number should show up as 0x002a001b. Instead it showed up as 0x00020001
because the calculations were a few bits off.

You can verify this fix with the a4091 utility:
1> a4091 -c
2023-11-05 21:49:44 -08:00