Skip to content

Commit 0263d1e

Browse files
authored
Merge pull request #1 from rkurbatov/adaptec-284x-patch-2.00
Adaptec 284xA BIOS v2.0 patch
2 parents 406005c + 57192da commit 0263d1e

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ jobs:
2020
run: |
2121
jwasm -Zm -Fo274x-211.obj 274x-211.asm
2222
jwasm -Zm -Fo284x-101.obj 284x-101.asm
23+
jwasm -Zm -Fo284x-200.obj 284x-200.asm
2324
jwasm -Zm -Foa7-142.obj a7-142.asm
2425
- uses: actions/upload-artifact@v2
2526
with:
2627
name: scsi_edd
2728
path: |
2829
274x-211.obj
2930
284x-101.obj
31+
284x-200.obj
3032
a7-142.obj
3133
bios16k.map
3234
bios1632.map

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.idea
12
*.obj
23
*.lst
34
*.bin

284x-200.asm

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ResetLocalStateOfs = 0CA8h
2+
SetTargetOfs = 0CDCh
3+
ExecuteCommandOfs = 0E94h
4+
SetDataAddressOfs = 0F52h
5+
Int13_DispatchOfs = 12D8h
6+
I13_DispatcherOfs = 147Bh
7+
Func_UnsupportedOfs = 14ABh
8+
Func09_AlwaysOKOfs = 17BAh
9+
MyInt15Ofs = 1910h
10+
MyInt15InstallOfs = 2D74h ; Not really. This function is missing, but there
11+
; is a lot of empty space in the 284x BIOS
12+
VersionOfs = 4068h
13+
14+
PATCH_VERSION MACRO
15+
;db "/2842VL BIOS v1.01 "
16+
db " BIOS v2.0/EDD 1.0 "
17+
ENDM
18+
19+
INCLUDE aic7770.asm
20+
21+
END

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ To apply an object file as patch, my tool [omfpatch](https://github.com/karcherm
1212

1313
Patches for following SCSI BIOSes is included
1414

15-
Controller | Version | patch object | map file | ROM chip size
16-
-----------|---------|--------------|--------------|---------------
17-
AHA-274x | 2.11 | 274x-211.obj | bios16k.map | 32KB (256kBit)
18-
AHA-284x | 1.01 | 284x-101.obj | bios1632.map | 64KB (512kBit)
15+
Controller | Version | patch object | map file | ROM chip size
16+
-----------|---------|---------------|--------------|---------------
17+
AHA-274x | 2.11 | 274x-211.obj | bios16k.map | 32KB (256kBit)
18+
AHA-284x | 1.01 | 284x-101.obj | bios1632.map | 64KB (512kBit)
19+
AHA-284x | 2.0 | 284x-20.obj | bios1632.map | 64KB (512kBit)
1920

2021
Furthermore, a patch for the following ASPI driver is included
2122

@@ -24,12 +25,28 @@ Driver | Version | patch object | map file | file size
2425
ASPI7DOS.SYS | 1.42 | a7-142.obj | a7-142.map | 36160 bytes
2526

2627
Note that the latest 274x BIOS (2.11) seems to not be available for download from the Adaptec / MicroSemi. Their page has version 2.10. This patch *does not apply to version 2.10*. You can obtain the ROM image by reading it from an controller that has the latest version. The ROM chip is an OTP chip labelled `549306-00 D BIOS 7D00 (c) 1993`.
28+
The same applies to 284x - only BIOS version 1.01 is available on Adaptec site while controller may have version 2.0. Please note that BIOS version "downgrade" (even non-patched one) can cause problems in controller behavior and use the same or newer BIOS versions than you currently have.
2729

2830
You can run `omfpatch 274x-211.bin bios16k.map 274x-211.obj` to create a patched BIOS image for the 2740.
29-
You can run `omfpatch 284x-101.bin bios1632.map 284x-101.obj` to create a patched BIOS image for the 2840.
31+
You can run `omfpatch 284x-101.bin bios1632.map 284x-101.obj` to create a patched BIOS image for the 2840 BIOS v1.01.
32+
You can run `omfpatch 284x-20.bin bios1632.map 284x-20.obj` to create a patched BIOS image for the 2840 BIOS v2.0.
3033

3134
The patched BIOS identifies itself as "2.11 EDD 1.0" instead of just "2.11 Release" to indicate the *extended disk drive* specification.
3235

36+
Patches for new BIOS versions
37+
-----------------------------
38+
39+
If your BIOS version doesn't match any of the provided patches you can try creating your own patch by finding the corresponding offsets in your BIOS image. That's an example how 284x 2.00 patch was created:
40+
1. Create copy of asm file for similar controller model (for example 284x-201.asm).
41+
2. Get the data located within offset variable in known BIOS version, 4 bytes is enough.
42+
`ResetLocalStateOfs = 0C80h` - in version 1.01 of the BIOS you can find such values: `06 51 8A 46`
43+
3. Find the offset of these 4 bytes in your BIOS version - they should be not far from the original offset.
44+
In BIOS v2.0 these files are located within offset `0CA8h` - 28h or 40dec bytes later.
45+
4. Replace the offset in your asm file with the value you just found.
46+
5. Repeat steps 2-4 for every variable, usually if you find the first offset "delta" every other will be the same or similar.
47+
48+
To compile your new patch file use the command `jwasm -Zm 284x-201.asm`.
49+
3350
Disclaimer
3451
----------
3552

0 commit comments

Comments
 (0)