PDA

View Full Version : Some success with a age old GRiD problem



Klyball
February 29th, 2020, 07:59 AM
59458
59459
59460
59461

Dagwood
March 1st, 2020, 12:54 PM
Good job, it isn't easy! I modded my 1520 for a CF card awhile back and it took me several days to nuke the fingerprinting and brute force the HDD type and desired geometry. I'm now revisiting it to spiff it up a bit (autodetect geometry, no drive, etc.).

I'm curious if your 1530 used the same technique as my old 3/11/89 1520 BIOS? Basically it queries the drives ATA ID to memory, parses it for the Conner CPXXX model number string, compares that against a predefined data table of compatible hard drive model numbers, then sets the CMOS HDD Type accordingly. Is yours the same?

Once again... great job

Klyball
March 1st, 2020, 01:34 PM
As far as i can tell they use the same code more or less for all the 15xx models except i have one 1530 that has a stripped down bios with a jumper on the HD interface board 40 or 100mb that one is easy, just change the drive table.
all the rest you can either just set the drive table pointer and jump over the drive check or add in your drive along with the chs and keep the conner drive access also.
there is a bunch of ways to patch it when you find where to look. The easiest way would be set dx to the table right at the beginning and just jmp over

don't forget to add in your chs and fix the check sum

here are 2 examples of the code in question

1520


0000769e 53 push bx {var_4_1}
0000769f 51 push cx {var_6_1}
000076a0 1e push ds {var_8_1}
000076a1 56 push si {var_a_1}
000076a2 06 push es {var_c_1}
000076a3 57 push di {var_e_1}
000076a4 ba0000 mov dx, 0x0
000076a7 e8f7a7 call sub_1ea1 {Call to retrive drive 40 character drive id string}
000076aa 7306 jae 0x76b2

000076ac ba55aa mov dx, 0xaa55
000076af eb7b jmp 0x772c

000076b2 b92800 mov cx, 0x28 {set counter for the id string}

000076b5 26803d2d cmp byte [es:di], 0x2d {find the "-" in the string}
000076b9 7407 je 0x76c2

000076bb 47 inc di
000076bc e2f7 loop 0x76b5

000076be f8 clc
000076bf eb68 jmp 0x7729

000076c2 47 inc di

000076c3 26803d20 cmp byte [es:di], 0x20 {move past the " " to the first character of id}
000076c7 7505 jne 0x76ce

000076c9 47 inc di
000076ca e2f7 loop 0x76c3

000076cc eb5e jmp 0x772c

000076ce 8bdf mov bx, di
000076d0 ba0500 mov dx, 0x5
000076d3 8cc8 mov ax, cs
000076d5 8ed8 mov ds, ax
000076d7 be3cf6 mov si, 0xf63c {address of dive string}
000076da b90600 mov cx, 0x6 {"CP3022"} {lenght of string}
000076dd f3a6 rep cmpsb byte [si], [di] {0xf63c} {check string}
000076df 744b je 0x772c {jump if good or continue}

000076e1 ba0500 mov dx, 0x5
000076e4 8bfb mov di, bx
000076e6 be42f6 mov si, 0xf642
000076e9 b90600 mov cx, 0x6 {"CP3024"}
000076ec f3a6 rep cmpsb byte [si], [di] {0xf642}
000076ee 743c je 0x772c

000076f0 8bfb mov di, bx
000076f2 ba0600 mov dx, 0x6
000076f5 be54f6 mov si, 0xf654
000076f8 b90500 mov cx, 0x5 {"CP344"}
000076fb f3a6 rep cmpsb byte [si], [di] {0xf654}
000076fd 742d je 0x772c

000076ff ba0900 mov dx, 0x9
00007702 8bfb mov di, bx
00007704 be48f6 mov si, 0xf648
00007707 b90600 mov cx, 0x6 {"CP3044"}
0000770a f3a6 rep cmpsb byte [si], [di] {0xf648}
0000770c 741e je 0x772c

0000770e 8bfb mov di, bx
00007710 be4ef6 mov si, 0xf64e
00007713 b90600 mov cx, 0x6 {"CP3042"}
00007716 f3a6 rep cmpsb byte [si], [di] {0xf64e}
00007718 7412 je 0x772c

0000771a 8bfb mov di, bx
0000771c ba0700 mov dx, 0x7
0000771f be59f6 mov si, 0xf659
00007722 b90600 mov cx, 0x6 {"CP3104"}
00007725 f3a6 rep cmpsb byte [si], [di] {0xf659}
00007727 7403 je 0x772c

00007729 ba0000 mov dx, 0x0 {fail}

0000772c 1e push ds {var_10_1}
0000772d 50 push ax {var_12_1}
0000772e b84000 mov ax, 0x40
00007731 56 push si {var_14_1}
00007732 bec300 mov si, 0xc3
00007735 8bc2 mov ax, dx
00007737 ab stosw word [di]
00007738 5e pop si {var_14_1}
00007739 58 pop ax {var_12_1}
0000773a 1f pop ds {var_10_1}
0000773b 5f pop di {var_e_1}
0000773c 07 pop es {var_c_1}
0000773d 5e pop si {var_a_1}
0000773e 1f pop ds {var_8_1}
0000773f 59 pop cx {var_6_1}
00007740 5b pop bx {var_4_1}
00007741 e956ff jmp 0x769a

sub_7744:
00007744 1e push ds
00007745 2e8e1ed9c6 mov ds, word [cs:0xffffffffffffc6d9]
0000774a 8a16b200 mov dl, byte [0xb2]
0000774e 32e4 xor ah, ah
00007750 1f pop ds
00007751 c3 retn


1550sx


00013c80 53 push bx
00013c81 52 push dx
00013c82 1e push ds
00013c83 56 push si
00013c84 06 push es
00013c85 57 push di
00013c86 ba0000 mov dx, 0x0
00013c89 e8836a call sub_1a70f {Get Drive Info}
00013c8c 724e jb 0x13cdc

00013c8e b92800 mov cx, 0x28

00013c91 26803d2d cmp byte [es:di], 0x2d {Find the "-"}
00013c95 7405 je 0x13c9c

00013c97 47 inc di
00013c98 e2f7 loop 0x13c91

00013c9a eb40 jmp 0x13cdc

00013c9c 47 inc di

00013c9d 26803d20 cmp byte [es:di], 0x20 {look for " " then move to first character}
00013ca1 7505 jne 0x13ca8

00013ca3 47 inc di
00013ca4 e2f7 loop 0x13c9d

00013ca6 eb34 jmp 0x13cdc

00013ca8 8bdf mov bx, di
00013caa 8cc8 mov ax, cs
00013cac 8ed8 mov ds, ax
00013cae ba0900 mov dx, 0x9
00013cb1 bea73b mov si, data_3ba7
00013cb4 b90600 mov cx, 0x6
00013cb7 f3a6 rep cmpsb byte [si], [di] {cp3044}
00013cb9 7421 je 0x13cdc

00013cbb 8bfb mov di, bx
00013cbd ba0c00 mov dx, 0xc
00013cc0 bead3b mov si, data_3bad
00013cc3 b90700 mov cx, 0x7
00013cc6 f3a6 rep cmpsb byte [si], [di] {cp30104}
00013cc8 7412 je 0x13cdc

00013cca 8bfb mov di, bx
00013ccc ba1100 mov dx, 0x11
00013ccf beb43b mov si, data_3bb4
00013cd2 b90700 mov cx, 0x7
00013cd5 f3a6 rep cmpsb byte [si], [di] {cp30064}
00013cd7 7403 je 0x13cdc

00013cd9 ba0000 mov dx, 0x0

00013cdc 5f pop di
00013cdd 07 pop es {var_a}
00013cde 5e pop si
00013cdf 1f pop ds {var_6}
00013ce0 8bca mov cx, dx
00013ce2 5a pop dx
00013ce3 5b pop bx
00013ce4 b444 mov ah, 0x44
00013ce6 8ac1 mov al, cl
00013ce8 e8b3f8 call sub_1359e
00013ceb 33c0 xor ax, ax
00013ced c3 retn {__return_addr}

Dagwood
March 1st, 2020, 02:23 PM
Yep, same deal. I would be interested to find a newer version of the BIOS. When I examined CONF1520.EXE one thing that it does is get the BIOS date and sets a flag if it's older than 10/24/89 (Mine is 3/11/89). It then uses that flag to make choices during execution such as to skip some features that aren't supported on BIOS's older than 10/24/1989. I haven't examined the list deeply but some might just font related but I think some might relate to how it handles ROM's (which is something I've been toying with).

Paralel
April 5th, 2020, 09:31 AM
How did you guys dump the BIOS? On system, or using an external chip reader? I have a 1755 whose BIOS I'd like to evaluate.

Dagwood
April 5th, 2020, 03:11 PM
I yanked the two EPROM's and dumped them with my programmer but I have found software dumps usually work just fine too on 286 and 386 machines so you might use Navratil to dump the BIOS the easy way. Plus then it comes out as one nice 'ready to eat' file instead of two binaries that need to be interleaved.

thanman
April 9th, 2020, 07:41 AM
Wow! I've googled for a solution for a while now, and then I stumbled over this thread by chance! :D
I am trying to install a CF-card in my 1550sx, and I have gotten as far as ordering a programmer and some extra EPROMs.
My original plan, since I am a bit over my head with this, was to change one of the CPxxxx strings to the ID of my CF-card, but skipping the check in it's entirety seems like the better option.

@Klyball: Do you have the modified binary files for flashing the 1550sx?

And on a different subject; do any of you have any information on the expansion port in the battery bay? Is it a complete 16-bit ISA bus?

Klyball
April 10th, 2020, 10:38 AM
Changing the id string , is not enough , you need to change a bunch of things in the routine as it looks for the "-" and the " " in the string so those need to be adjusted to something in the cf string plus the length in cx of the word to check. Jumping is easiest but you still need to pick where you put the chs and point to it with dx and then the check sum need to be repaired on each rom after it is split back up.

Dagwood
May 3rd, 2020, 01:25 PM
Hey Kylball, taking a closer look at your photos I've not seen that particular ATA backplane. Would it be possible to see a picture of the front and back of it?

AmigaJules
May 18th, 2020, 04:14 PM
You got a 1530 to boot from a CF card?!? That's my holy grail!

I have one with an intermittent Conner failure (more down than up...) that occasionally still boots. I'd love to do what you did.

Any chance you can share your patched BIOS? I have a 512MB CF card, so am I right in assuming it would use the same C/H/S values yours did?

Klyball
May 19th, 2020, 01:42 PM
Hi I did not do a 1530 yet only 1520 and 1550 , the 1530 i did had a different interface then normal , it had jumpers to select the drive.a regular 1530 will have the same protection code , all the info is above, i found the CHS of the CF cards can very , hook it up to the grid and run IDESDI from floppy or any other pc that has auto detect to get the CHS.


You got a 1530 to boot from a CF card?!? That's my holy grail!

I have one with an intermittent Conner failure (more down than up...) that occasionally still boots. I'd love to do what you did.

Any chance you can share your patched BIOS? I have a 512MB CF card, so am I right in assuming it would use the same C/H/S values yours did?

Klyball
May 19th, 2020, 01:46 PM
Hey Kylball, taking a closer look at your photos I've not seen that particular ATA backplane. Would it be possible to see a picture of the front and back of it?

It is back in storage but i will when i dig it out. That 1530 has the conner routines stripped and you select the drive from a jumper on the backplane so all that is needed is the right CHS and any drive can work. all my other 1520,1530,1550 have the conner routines

AmigaJules
May 20th, 2020, 10:38 AM
Ah, I saw the photos and got over excited... I went back and re-read your post, now I get it.

Thanks for the tip on getting the CHS. I've got a cf > ide adapter on the way, as well as a couple of AM27C128 eproms for testing.

I pulled the BIOS on my 1530, dumped it and diff'd it with the odd & even files in the "1530 rom patch for any drive" archive that I pulled from RuGRiD before it went away.

The files are identical - it looks like that rom patch program prompts for drive ID string & CHS and writes out a modified BIOS - I'm afraid that doing that by hand is above my skill set, but hoping the program will handle it for me.

I hope I can pick your brain if I get stuck during the process.

I found an interesting thread at Vogons where someone did something similar for a Toshiba laptop BIOS (which have the same Conner limitations as some GRIDS) and added in XTIDE: https://www.vogons.org/viewtopic.php?f=46&t=57998

AmigaJules
May 30th, 2020, 06:25 AM
Some(?) progress:

I got the drive geometry & name/ID settings for a few CF cards (64MB, 512MB & 1GB) using another machine and the hddid.exe program.

I plugged the values for the 64MB card into the 1530ROM.BAS and wrote out the even & odd BIOS images. I burned them to new EPROMs.

I see the values for drive type 2 change to the correct values for my 64MB CF when I swap out the BIOS.

61227
61228

Unfortunately, even after setting drive type 2, after a reboot, setup shows no C drive.

61229
61230

Based on what I _think_ I understand of Klyball's post, the 1530ROM.BAS program I have may be for his type of 1530 (where you can just change the C/H/S).

Would any BIOS/Assembly Language gurus be willing to assist making Klyball's modifications to my BIOS image?

I'd love to retire the dying Conner drive in favor of a CF card.

Thank you!

AWPJudy
July 30th, 2020, 12:14 AM
i know in some ways it may seem like a slightly ridiculous approach, but as someone who stubbornly refuses to dive into x86 assembly..

what about manually changing a CF card geometry to match that of a conner, and then using a little cpld state machine or microcontroller to spoof the hardware ID any time it gets the identify drive command? it might be something people are interested in since some other machines of the era also had hard-coded drive lists.

Dagwood
July 31st, 2020, 01:23 PM
Patching the BIOS is old news. I did it, Klyball did it, and at least one other person that I know of, probably more. So the geo and ident issues have already been dealt with several times over. There are however other technical issues in which the bios won't reliably access modern devices. You will encounter the same issue if you use the hardware spoofing approach you mentioned. I have a functional but crude solution and am working on a quality solution which will be reliable under all circumstances.

SParent
August 21st, 2020, 07:39 AM
Hello,
I have a CF to IDE adapter I want to connect to my 1520. I guess it's not just a matter of plugging it in. How did you do it? Is there some kind of short cable to build to adapt the pinout of the 1520 to the IDE standard?
Thanks!

AmigaJules
August 21st, 2020, 07:45 AM
Hello,
I have a CF to IDE adapter I want to connect to my 1520. I guess it's not just a matter of plugging it in. How did you do it? Is there some kind of short cable to build to adapt the pinout of the 1520 to the IDE standard?
Thanks!

I don't know what the 1520 looks like, but the 1530 has a "backplane" for the drives with female connectors where the IDE drive & floppy plug in for data & power.

I got some right angle IDE connectors and modified my CF adapter so it plugs in just like the 3.5" hard disk. Also added a small custom molex power cable to feed power to the CF adapter.

SParent
August 22nd, 2020, 08:02 AM
Yes, the 1520 has a similar backplane. By looking at the geometry of the connectors (two female 40 pins, one on the backplane and one on the CF/IDE card) I think a simple male to male connector would result in an inversion of the top and bottom rows of pins (ie pin 1 would be on pin 2, pin 2 on pin 1, and so on). So I figure I have to make a male/male cable that inverts top and bottom rows. Am I correct?

AmigaJules
August 22nd, 2020, 03:27 PM
Yes, the 1520 has a similar backplane. By looking at the geometry of the connectors (two female 40 pins, one on the backplane and one on the CF/IDE card) I think a simple male to male connector would result in an inversion of the top and bottom rows of pins (ie pin 1 would be on pin 2, pin 2 on pin 1, and so on). So I figure I have to make a male/male cable that inverts top and bottom rows. Am I correct?

Here's a photo of my CF/IDE adapter & the right angle 40 pin connectors I bought.

63083

I desoldered the male connector on the adapter and soldered the right angle connector to it. No cable needed. It plugs in upside down onto the drive backplane in my 1530.

Now I just need a BIOS that can work with it.