VOGONS


Reply 20 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

I beleive the IDE controller is part of the SiS 496/497 chipset duo. I didn't see a 640 chip on the board. The primary IDE port works perfectly fine.

The Holtek manual shows different wiring for the keyboard controller for in AT keyboard mode and for keyboard + PS/2 mouse mode. I followed the latter wiring diagram. I think the BIOS is responsible for switching the AT vs PS/2 mode via the "enable PS/2 suport" check box in the BIOS. I don't really know what exact action is being done to enable the switching though.

I'm going to go pin-by-pin on the keyboard controller, BIOS, and chipset of both DTK and 4DPS boards to see what pin might not be wired correctly. How do I wire-up IRQ12 to the keyboard controller?

How do I see if the BIOS has propery set INT 11? mouse.com correctly things a PS/2 mouse is connected instead of a COM1 mouse.

I'm a novice to BIOS mods. If the 4DPS BIOS works well with the PS/2 mouse, and that is the BIOS I am using, I figured it should work if every piece of hardware is wired the same on the DTK board. There's a few more items I have to try out with awbedit and modbin.

EDIT: Ok, IRQ12 is pin #8 on the 497 chipset. Any idea how it should be wired to the keyboard controller? If not, I'll just figure it out based on how the 4DPS is wired.

Plan your life wisely, you'll be dead before you know it.

Reply 21 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

SiS 497 pin 8 should be connected to pin 36 of the keyboard controller (MS-OBFO pin). I hope this is the only missing link. On the DTK board, there is no connection here, whereas the 4DPS board has this connection made. I've had to pack my stuff for the weekend, but will re-test this as soon as possible.

Plan your life wisely, you'll be dead before you know it.

Reply 22 of 539, by NJRoadfan

User metadata
Rank Oldbie
Rank
Oldbie

The value for the equipment ID bit is stored at 0:0410h. Just reading it should give you the value. I think wiring IRQ12 can be done by running a wire from the "mouse IRQ" pin on the keyboard controller to the IRQ12 on an ISA slot (its easier to solder than direct to the chipset). I suspect motherboards that came with PS/2 mouse support would reroute the IRQ line to the ISA bus or the controller depending on the BIOS setting with extra electronics which are likely not present on your board.

Reply 23 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

Here are the HEX values for the 4DPS BIOS, with native PS/2 support:
4dPS-v1.72 410h: 75 47 7C 04 EB 49 E9 55 92 EA 8C 8E 68 3D C6 E2

The original DTK BIOS w/out PS/2 support is:
DTK-origl 410h: 44 88 6A 13 BA 38 3c 02 57 26 B6 11 0f 41 89 3D

The DTK BIOS using Modbin to "enable PS/2 mouse support" is (no change):
DTK-ps/2 410h: 44 88 6A 13 BA 38 3C 02 57 26 B6 11 0F 41 89 3D

What are we looking for here?

Plan your life wisely, you'll be dead before you know it.

Reply 24 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

PS/2 SUCCESS! - I am now working on integrating the PS/2 circuit onto the motherboard in a discrete manner. Unfortunately, there is only one inverter free on the 7406 so I'll need to use a second 7406 inverter package - EDIT, actually, you can cut the pins off the onboard one and use a single inverter package.

IRQ12 was the missing link. Thanks to NJRoadfan for thinking of this! I'll need to find a clean way to integrate the extra inverter IC and PS/2 header onto this board somehow.

Now if only I can figure out how to get IRQ15 routed to the 4th PCI slot. Seeing how the secondary IDE controller doesn't seem to work, IRQ15 should be free. Is there a particular HEX address in the BIOS which controls the PCI IRQ routing table?

EDIT1: IRQ15 is indeed free. I can use the VGA controller on IRQ15 by setting the PCI priority order. So my remaining task for this board is to somehow inject a 4th PCI slot into the BIOSes routing table and call it device number 9, as was the case for the original DTK BIOS.

EDIT2: The original DTK BIOS with the Modbin mod "enable PS/2 mouse" also works with the PS/2 mouse. PCI slot 4 and Secondary IDE controllers also work fine. The problem with the original DTK BIOS is that it doesn't work with 64 MB SIMMs. And using 4x32MB SIMMs is unstable at 40 MHz. It does fine with 4x16MB SIMMs at 40 MHz, but I am set on getting a 486 board working with 128MB RAM, 1024K-WB, PS/2, 4 PCI slots, and stable at 40 MHz w/fastest timings. So far I can achieve all of this, except only 3 PCI slots when using the hacked 4DPS-v1.72 BIOS on the DTK board. I figure modding the 4DPS BIOSes IRQ routing table for the 4th PCI slot would be easier than figuring out how to add 64MB SIMM support to the DTK BIOS. Note that the manual for the Gemlight board (GMB-486SPS) mentions this board supports 2x64MB SIMMs. The DTK PKM-0033S board I am using is supposed to be the same as the GMB-486SPS. I wonder if the BIOS files for these two boards were programmed differently? Anyone have the BIOS image from an official Gemlight GMB-486SPS branded board instead of the DTK branded board?

EDIT3: I figured out why the 4DPS BIOS doesn't seem to work with the second onboard IDE port on the DTK PKM-0033S. I just realised that the DTK board uses a Winbond W83769F chip as its IDE controller, whereas the 4DPS board is using the SiS 496 as the IDE controller. Here's a quote from the SiS datasheet,

The built-in IDE controller of 85C496 acts as a VL-target, all control pins to IDE-drives are shared with PCI AD bus.
Due to this restriction, IDE cycle and PCI cycle cannot be executed concurrently.

But DTK's onboard primary IDE channel still seems to function with the 4DPS BIOS.

Something else of concern in the SiS manual,

85C496 supports VESA VL-bus standard target interfaces. To enable VESA target cycles, register 57[3] must be set to
enable the LBD#, LRDY# pin. Note that if VL bus is employed, then 85C496 supports only three PCI masters instead
of four.

Does this mean that even if I manage to copy the IRQ table from the DTK BIOS into the 4DPS BIOS that I still can only use 3 PCI slots?

Perhaps it is best to adapt only the aspect of the 4DPS code which allows for the use of 64 MB SIMMs and inject this into the DTK's BIOS. Does anyone have any idea how to do this? 4DPS v1.72 BIOS uses AWARD 4.51PG, DTK uses AWARD 4.50PG.

Alternately, does anyone know of another SiS 496/497 motherboard which has 4 PCI slots, 1024K cache, 0 VLB slots, and uses a Windbond W83769F as the IDE controller?

Much appreciated!

EDIT 4: Has anyone ever found the assembly language source code for BIOSes? Alternately, does anyone know someone who is familiar enough with machine code of the BIOS to reverse engineer it, or in the least, know how to add 64 MB SIMM support to the DTK BIOS? I wonder if the sheer act of updating your BIOS from AWARD 4.50GP to AWARD 4.51GP is enough to enable 64 MB SIMM support. Anyone know how to do this?

Last edited by feipoa on 2013-07-14, 00:05. Edited 1 time in total.

Plan your life wisely, you'll be dead before you know it.

Reply 25 of 539, by JaNoZ

User metadata
Rank Member
Rank
Member

I am sorry, time for a stupid question.
Why so obsessed with the ps2 enabled mouse port? what is the benefit to a rs232 mouse, enlighten me please.
Is it because of ps2rate?

Reply 26 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

For me, it means that I can use one PS/2 mouse for 4 computers on my PS/2 KVM w/audio. Those KVM's with PS/2-to-serial protocal converters have lagged tracking response (they also don't have the audio feature).

Also, the smoothness of the tracking of the PS/2 mouse vs. the serial on this DTK board was like night and day. Maybe it is this particular serial implementation on this board DTK board? I don't recall my UMC-based board having such poor serial mouse tracking quality, but it has been many years since I really used them regularly in Windows.

For others, it means they can use an all optical PS/2 mice (no trackball), without having to use some USB card and USB mouse. PS/2 mice work natively in DOS and Windows.

Lastly, I've never run across a PCI 486 motherboard w/1024K capability which had a working PS/2 mouse port. This custom job will be the first such example I've seen. Some may point to the HOT-433 v1-3 as an example, but nobody has been able to get PS/2 working on this board.

Plan your life wisely, you'll be dead before you know it.

Reply 27 of 539, by Anonymous Coward

User metadata
Rank l33t
Rank
l33t

Ah, I'm glad you've finally managed to get this going. I think it's going to open up a lot of possibilities for boards without PS/2 ports. I would like to try getting this working on older 486 and 386 boards as well. I believe it should be possible to do so without an award BIOS that has ps/2 enable options. I seem to recall you just need to send the keyboard controller the right command to kick it into ps/2 mode. A simple DOS TSR should do the trick.

"Will the highways on the internets become more few?" -Gee Dubya
V'Ger XT|Upgraded AT|Ultimate 386|Super VL/EISA 486|SMP VL/EISA Pentium

Reply 28 of 539, by NJRoadfan

User metadata
Rank Oldbie
Rank
Oldbie
Anonymous Coward wrote:

I seem to recall you just need to send the keyboard controller the right command to kick it into ps/2 mode. A simple DOS TSR should do the trick.

I wish I knew how to do this. All 3 of my EISA boards have PS/2 Mouse compatible keyboard controllers. The AMI datasheets state that the AMIKEY controller has "AT Compatible" and "EISA-PS/2 Mode" (Holtek just calls this PS/2 Mode). I wish I could just assume that being an EISA board that the keyboard controller is already in a PS/2 mouse compatible mode, but I don't see why an EISA board even needs a special mode. Does a similar BIOS editor exist for AMI Hi-Flex that will allow me to add in the PS/2 mouse menu options?

feipoa wrote:
Here are the HEX values for the 4DPS BIOS, with native PS/2 support: 4dPS-v1.72 410h: 75 47 7C 04 EB 49 E9 55 92 EA 8C 8E 68 3D […]
Show full quote

Here are the HEX values for the 4DPS BIOS, with native PS/2 support:
4dPS-v1.72 410h: 75 47 7C 04 EB 49 E9 55 92 EA 8C 8E 68 3D C6 E2

The original DTK BIOS w/out PS/2 support is:
DTK-origl 410h: 44 88 6A 13 BA 38 3c 02 57 26 B6 11 0f 41 89 3D

The DTK BIOS using Modbin to "enable PS/2 mouse support" is (no change):
DTK-ps/2 410h: 44 88 6A 13 BA 38 3C 02 57 26 B6 11 0F 41 89 3D

What are we looking for here?

I meant 0x410h in main memory. Taking a peek of that location with DOS debug will show you the value of that register. CuteMouse (and likely several other DOS mouse drivers) uses it to determine if a PS/2 mouse is available.

Regarding the PCI slot IRQ routing assignments. It might take some searching of those INTA/B/C/D values to determine where they are stored in the BIOS image. The SIS manual seems to imply that the built in IDE controller is VL-Bus as opposed to PCI, which might complicate things as you mentioned. The documentation seems to imply that ANY enabling of the VL-Bus support on that chipset will disable one of the PCI IRQ lines. It might be why DTK went with a separate PCI controller.

Reply 29 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

Pins 27 and 39 are wired differently for AT and PS/2 modes. I wonder if this different wiring is all that is required to set the keyboard controller into PS/2 mode. I should try disabling "enable PS/2 mouse support" and see if the PS/2 mouse still works on this DTK board; I did not try this scenario.

When I have time, I'll try to delve into the fine art of BIOS reverse engineering. For now, I'll probably have to live with 3 working PCI slots and using the 4DPS BIOS. With a working PS/2 mouse, the 4th PCI port is not so important. I'm surprised that the Primary IDE port works fine. WinNT 4.0, which is fairly fussy, had no issues with the 4DPS BIOS.

Alternately, I have also ordered some different 32MB and 64MB FPM SIMMs to see if I can get the DTK BIOS working with 128MB at 40 MHz. I recall that the original 4DPS BIOSes also didn't work with 64MB SIMMs as well - this was fixed with v1.72f from Funworld (4.51PG).

Plan your life wisely, you'll be dead before you know it.

Reply 30 of 539, by Anonymous Coward

User metadata
Rank l33t
Rank
l33t

Feipoa, did you end up running IRQ12 off the UMC chip, or is it possible to bum the signal off an ISA slot?

"Will the highways on the internets become more few?" -Gee Dubya
V'Ger XT|Upgraded AT|Ultimate 386|Super VL/EISA 486|SMP VL/EISA Pentium

Reply 31 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

The DTK PKM-0033S uses a SiS 496/497 chipset. There is not a single UMC chip on this board. The IRQ pins on the chipset are directly shorted to the IRQ's on the ISA slot, so I ran the wire to the ISA slot because they are both through-hole solders.

Attached is an image of the circuit diagram to implement.

Holtek_HT6542B.png
Filename
Holtek_HT6542B.png
File size
29.25 KiB
Views
5301 views
File license
Fair use/fair dealing exception
Last edited by feipoa on 2014-11-10, 05:10. Edited 2 times in total.

Plan your life wisely, you'll be dead before you know it.

Reply 32 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

Here are some photos of the final PS/2 job. I wanted to keep the mess on the underside of the motherboard. I was able to use the existing 6-pack inverter IC on the board but had to insulate pins 9 & 10 of the IC so that they do not touch the motherboard through-hole contacts. The original design was to use use two inverters in series to create a buffer. The PS/2 design uses inverters only, so some pins could be re-routed to free up this inverter. I did not want to cut PCB traces, so I insulated pins 9 & 10 of the inverter IC and pin 39 of the Holtek keyboard controller. It is not obvious from the photos though.

DIP sockets were used for both the inverter and the keyboard controller. There is just enough clearance for adding PCI and ISA cards.

The PS/2 header is epoxied to the board's surface. The surface was scratched lightly with sand paper to improve adhesion.

There is an excess of flux on solder pins. I soldered/desoldered a few times before I got it the way I wanted it. I should get some flux cleaner.

A CR2032 CMOS battery was added. It pretty much fit right into the barrel battery through-holes. I just had to move 3 caps out of the way and lift up diode, D3.

Attachments

Last edited by feipoa on 2013-07-17, 05:05. Edited 1 time in total.

Plan your life wisely, you'll be dead before you know it.

Reply 33 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

More photos...

Attachments

Plan your life wisely, you'll be dead before you know it.

Reply 34 of 539, by Anonymous Coward

User metadata
Rank l33t
Rank
l33t

It's a little messier than I imagined. I was kind of hoping it would be possible to build an adapter that stacked under the keyboard controller with a single cable feeding off IRQ12. Once I get all of my tools and parts back I'll have to look into this.

It's interesting you had to desolder the KB BIOS. One most of my boards it's in a socket.

"Will the highways on the internets become more few?" -Gee Dubya
V'Ger XT|Upgraded AT|Ultimate 386|Super VL/EISA 486|SMP VL/EISA Pentium

Reply 35 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

I originally used a separate inverter package and did place it in the cubbyhole under the keyboard controller, but it still requires rewiring of the existing inverter and keyboard pins. Also, with the inverter under the keyboard controller, the keyboard controller would sit about 1 mm higher. This was enough to prevent full insertion of an ISA card. A little bit of mess on the underside of the motherboard doesn't bother me much.

With the second inverter under the keyboard controller, you can probably hide the keyboard re-routing wires between the keyboard controller and the PCB.

I'd recommend sourcing some SMD 47 pF and 10k-ohm parts to reduce the height of the sandwiched inverter IC. You may also want to source a 2-package inverter IC instead of a 6-package.

Based on the different keyboard controller wiring, I'd like to figure out what went wrong with the HOT-433 and why inserting a keyboard controller and 7406 inverter doesn't seem to allow PS/2 mouse control. The HOT's keyboard is wired to the chipset. I wonder if the keyboard controller can be used for a PS/2 mouse only? I wonder if the DIP sockets are wired correctly? That's another project...

As an update on the BIOS mod work. I was able to disassemble the BIOS into assembly. There's over 60,000 lines of assembly code. Anyone have experience programming a BIOS?

Plan your life wisely, you'll be dead before you know it.

Reply 36 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

I couldn't let this one rest - I decided to test whether or not enabling "PS/2 Mouse Support" in Modbin/Awdbedit is really required to have a functional PS/2 mouse port on the PS/2-capable keyboard controller. I used a 4DPS board as my test subject. The test results proved that "PS/2 Mouse Support" is required. mouse.com cannot find the PS/2 mouse without this BIOS mod, even with a command to force PS/2 mode "mouse.com /p"

It is noted in the source code for awdbedit (sysbios_options.cpp),

// ps/2 mouse support, 0x1FFEC bit 7 set (if not v6.00PG, 0x1E6FA bit 2 is also set) to enable

So for whatever reason, if you do not use modbin or awdbedit to enable PS/2 mouse support, you will need to extract original.tmp and modify with a HEX editor 0x1FFEC to a value of 81h (10000001) and 0x1E6FA to a value of 74 (01110100). The non-PS/2 enabled values would be 01h (01 binary) and 70 (0110000) for 0x1FFEC and 0X1E6FA, respectively. This is probably only true for AWARD BIOSes. For AMI, you'd have to determine which location in the BIOS corresponds to enabling the PS/2 mouse function.

I also checked to see if keyboard controllers which do not specifically mention PS/2 mice in their datasheets will work with PS/2 mice. The Winbond W83C42 I tested did not work; the motherboard didn't even show signs of life with this keyboard controller inserted.

Plan your life wisely, you'll be dead before you know it.

Reply 37 of 539, by NJRoadfan

User metadata
Rank Oldbie
Rank
Oldbie

Test Windows NT or Linux with PS/2 mouse support removed from the BIOS image, as both should directly probe the keyboard controller to determine if a PS/2 mouse is present. If it works and detects the mouse, all the BIOS setting does is modify that INT 11 "Equipment ID" value I mentioned earlier.

Info I found online indicates that an AMIBIOS can be modded to add the required mouse entries. The problem is I have yet to find AMI BCP 2.1 to modify the old 06/06/92 Hi Flex cores. More info on that here: www.memotech.franken.de/NexGen/Bios.html‎

Reply 38 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++
NJRoadfan wrote:

Test Windows NT or Linux with PS/2 mouse support removed from the BIOS image, as both should directly probe the keyboard controller to determine if a PS/2 mouse is present. If it works and detects the mouse, all the BIOS setting does is modify that INT 11 "Equipment ID" value I mentioned earlier.

Would an NT test be any different than forcing PS/2 mode with mouse.com?
EDIT1: I have tested with NT 4.0 and the PS/2 mouse does not function unless the BIOS mod is performed.

NJRoadfan wrote:

Info I found online indicates that an AMIBIOS can be modded to add the required mouse entries. The problem is I have yet to find AMI BCP 2.1 to modify the old 06/06/92 Hi Flex cores.

The oldest BCP version I have is 3.3. Do you know what is the latest version to support the 10/10/94 AMI BIOS?

If we know the address, could we simply modify the BIOS image directly with a hex editor and save it to enable AMI PS/2 mouse support?

EDIT2: I am also unable to get 4 PCI slots functioning even with the original DTK BIOS.

Plan your life wisely, you'll be dead before you know it.

Reply 39 of 539, by feipoa

User metadata
Rank l33t++
Rank
l33t++

For anyone considering this mod, there is a guy on eBay selling these HOLTEK keyboard controllers for $4. I have tested them out personally and they work. http://www.ebay.com/itm/370729991720

My next PS/2 mod will be on a 386 with an AWARD 4.20 BIOS. Modbin seems to be able to alter the "PS/2 support" for this BIOS, though not the default CMOS settings.

Plan your life wisely, you'll be dead before you know it.