• Please review our updated Terms and Rules here

Project to create an ATX 80286 mainboard based on the IBM 5170

I'm familiar with seeing listings for Tulip computers. I agree, I really like their form factor. Some of their vision 386sx line uses VLSI TOPCAT too. I think it might be the intel cobranded chips.

OK, I don't have a topcat 286 nor is it on any emulator (i think) so this is not something I can test easily. I examined the code and looked through it. There is definitely a flag 0x40 at bios address 0x281 which seems to be used to toggle 286/386 version of the bios. I checked a 286 version of a topcat bios and found that flag on. If we're very lucky, this will control everything for "286 vs 386sx" versions of features and support, but maybe it won't be that easy. Nonetheless I figure we should give it a try. Attached is a bios with that flag enabled. There should only be two bytes changed from the one you sent me. There are some other feature flags but I am not yet sure what they do. Maybe it's not important if this works well.

EDIT: oops wrong bios. should be this one
 

Attachments

OK, I don't have a topcat 286 nor is it on any emulator (i think) so this is not something I can test easily. I examined the code and looked through it. There is definitely a flag 0x40 at bios address 0x281 which seems to be used to toggle 286/386 version of the bios. I checked a 286 version of a topcat bios and found that flag on. If we're very lucky, this will control everything for "286 vs 386sx" versions of features and support, but maybe it won't be that easy. Nonetheless I figure we should give it a try. Attached is a bios with that flag enabled. There should only be two bytes changed from the one you sent me. There are some other feature flags but I am not yet sure what they do. Maybe it's not important if this works well.
Thanks for looking into this Patrick. I have tested the file you posted however no luck yet.

It's actually even weirder than I realized before because the BIOS is beeping 9 times, which is supposed to indicate a BIOS ROM checksum error.
However, since the file which works on a 386SX now starts beeping the BIOS ROM checksum error beep code I suspect that the BIOS is doing this because some other check is failing or the checking method itself fails to run on the 286. Otherwise the checksum would also happen on the 386SX so I wonder how the 386SX executes the checksum calculation differently.

So the check fails and the BIOS goes to some routine for doing the 9 short beeps.
Since the ROM is identical between two processors, beeping a ROM checksum is not valid so the reason must be something else failing a check, which is different between the 286 and 386SX.

Apparently when a early AMI BIOS, like the 286 or 386SX versions, is modified for other reasons, this has also been known to cause the 9 beep situation.
The checksum matter is also confusing because the original checksum of this BIOS results in 8C from the original BIOS version, which in itself seems already weird to get that value.
Possibly some different checking method is used where they do the checksum test differently and this seems to involve the 386SX doing the test.

I have seen some posts about changing 74 to BE to change a conditional jump into a regular jump which has been described as a checksum bypass.
However doing that also didn't work out either.
It's weird, they refer to address 819A however in the ROM the mentioned 74 hex byte is found at offset 819B.
Anyway they have mentioned it for example in this thread about PS/2 mouse support:

Tomorrow I will do more testing for example to retest the MSI 386SX board with the updated versions and original.
I just want to confirm once again that the beeping doesn't happen on the MSI 386SX.
I clearly have the file folder marked as "best version for MSI 386SX", in fact it's in two folders and the BIOS file is identical between them.
Anyway what I want to do besides rechecking is also to test your modified version on the MSI board.

It's pretty weird what's going on with those checksum checks.
Apparently the jump instruction for the successful check should be at location 819A in the ROM file however I am seeing 74h at 819B.
So they change the conditional jump 74 to a normal jump BE.

I will update on the results on that MSI board.

Another weird thing I should mention is that generally apparently the checksum is fixed in the last byte of the ROM, however in the AMI BIOS that byte is 00.
Which appears like it's not a fixing byte.
With the MR BIOS for example I fixed the checksum in the end of the blank space I used for the shadow copy.
And that worked fine.

Kind regards,

Rodney
 
Darn okay. I realize I can also compare to the 286 bios a little deeper so I will try that. Also knowing if my modified one works on the 386 might be helpful. I will see if I can find the beep function and backwards trace to something calling it with a 9 argument.

It’s not impossible that there is a secondary bios checksum routine outside of the IBM standard method. This is done by some developers to make it harder to modify their bios. I think I modified one of the last two bytes of the BIOS in my case.
 
Also knowing if my modified one works on the 386 might be helpful.
I tested your modified topcat16.bin on the MSI 386SX board and it is also doing the repeating 9 beeps.

So both the code integrity check and 286/386SX check apparently end up in a 9 beeps routine.
Maybe it's the same routine, I am not sure.
I wonder how many checks are coded to end up in the 9 beeps sequence.
It seems like a multi purpose stop point to prevent a POST from happening.

Anyway so apparently some users had some success to patch a AMI BIOS for changing PS/2 mouse support after they disabled the checksum routine. So it would appear that after fixing the checksum not to be performed, then the code could be patched at will, it would make things a lot easier.

So I am guessing that the jump instruction to jump to a "test passed" location if the test passes may be in different locations between different AMI versions. That jump apparently goes to the "continue to POST" entry point. The reason for different locations of the jump instruction could of course simply be that some BIOS have more or less check routines which end with that jump instruction. So if the routines differ, so will the final "OK" jump instruction location. Maybe the BIOS POST entry point is a fixed location so jumps to that could be traced. But if it's a relative jump that would be more difficult.

Maybe fixing the code for a 286 CPU also needs to include to prevent going to the 9 beeps routine for the reason of not approving the CPU type.
If we knew how AMI checks for the right CPU that could be useful to track certain instructions.
It seems that finding the 9 beeps routine is important and then finding the code leading to that location may be found even if a relative jump.
Like a final condition pass/fail before the POST.

Kind regards,

Rodney
 
OK this is definitely an alternate checksum routine (not the standard IBM one), it doesn't sound hard and I should be able to find and patch it soon given the hints from other people's work on it.

(10 minutes later)

OK, I hadnt disassembled ~0x8100 area (misidentified as data) but here seems to be the routine:

Code:
0x081e0:  8C C8                mov       ax, cs
0x081e2:  8E D0                mov       ss, ax
0x081e4:  33 C0                xor       ax, ax
0x081e6:  8E D8                mov       ds, ax
0x081e8:  8E C0                mov       es, ax
0x081ea:  33 DB                xor       bx, bx
0x081ec:  B9 00 80             mov       cx, 0x8000
0x081ef:  33 F6                xor       si, si
0x081f1:  2E AD                lodsw     ax, word ptr cs:[si]
0x081f3:  03 D8                add       bx, ax
0x081f5:  E2 FA                loop      0x81f1
0x081f7:  74 06                je        0x81ff
0x081f9:  BD 09 00             mov       bp, 9
0x081fc:  E9 94 72             jmp       0xf493

0xF493 seems to do some stuff with port 0x61, i think it is the beep routine probably... so 81F7 is the magic address in our case.

Aha, it's checksum-16, adding words not bytes.

Well whatever, lets change that from 74 to EB, and i changed the last two bytes to 3C 49 to make it add up to 0 just in case (in little endian checksum 16). But not checksum-8 to 0 anymore, I hope that doesn't cause trouble in an alternate check.

Attached is the new version, let me know how it goes.
 

Attachments

0xF493 seems to do some stuff with port 0x61, i think it is the beep routine probably... so 81F7 is the magic address in our case.
Great news Patrick!
Yes port 0x61 is the PC/AT "PORT B" and bits 0 and 1 are registers for speaker control.
I will test your new version shortly and update about it.

Today I also started a very exhaustive BIOS test, I found a few more BIOS versions since my first tests so I made a folder with 7 candidates.

It was a huge work and I made some remarkable discoveries, I am just not 100% sure yet how these will definitively bring us forward in the 286 design.

I need to process the results and also do more checking of the MSI board. Maybe I am missing some bank configuration difference or something else like some passives to tweak fast signals, it's very weird! I am not sure whether it's purely the different CPU or something else. So I am looking into this in much more detail now.

So I have these 7 candidate BIOS versions which I initially tested on the MSI board:
AMI_050591 82340sx-16-63c00df7d6911253072552 AMI COLOR BIOS 050791/6B05 30-0501-428027-00101111-050591-ITOPSX-8
AMI_050591_MULTITRONIC_PC AMI COLOR BIOS 050591 30-05T1-425004-00101111-050591-ITOPSX-8
AMI_061891 TriGem TG286EPLUS AMI B/W ONLY STD SETUP + DIAGS D286-6080-061891-K8
AMI_070791 82340SX_V2 AMI COLOR BIOS ADV24X CHIPS34X 121091/6B05-J 30-0901-428027-00101111-070791-ITOPSX-8
AMI_070791 Kentech Electronic KT-O286-V6 AMI COLOR BIOS ADV22X CHIPS35X 102391/6B45 20-0901-428027-00101111-070791-ITOP286-8
AMI_071590 ABC COMPUTER COMPANY 3286 SLOW! B/W ONLY STD SETUP + DIAGS D342-5004-071590-K8
AMI_101590_OCTEK_PANTHER_old_adv_reg_setup_386SX
All of these work with the MSI 386SX board, though the ABC one is very slow.

So these two BIOS versions are potentially very interesting for us:
AMI_070791 82340SX_V2 121091/6B05-J 30-0901-428027-00101111-070791-ITOPSX-8
AMI_070791 Kentech 102391/6B45 20-0901-428027-00101111-070791-ITOP286-8

As you can see, these are identical version numbers, dates and the main difference in the version codes is 386SX or 286.
Comparing these two with each other I did find that there are a lot of similarities in the code.
And remarkable the code seems to at least be in the same locations for both versions. The differences are all in the same locations too.
So the address positions of these two BIOS versions are the same.
In lots of areas there are differences but this side by side comparison may be able to reveal more about what's different between the two CPUs in the AMI BIOS.

So I proceeded to test the Kentech 286 BIOS which seems similar to the TOPCAT V2 version in the ATX 286 TOPCAT system.
Well at first I was not able to get an init, then I started to exchange the keyboard controller and to my surprise this did give a variation of differences for the INIT(!):
- AMI GOLD LABEL "486SX BIOS" 1991 KEYBOARD CONTROLLER INIT is happening!!! INTEL AMI CONTROLLER
- AMI SILVER LABEL 1986-1990 DOES NOT WORK, NO INIT!! M5L8042 MITSUBISHI
- VIA VT82C42 6 BEEPS!!
- INTEL KBC INIT!!!
- CERAMIC OLD CONTROLLER: INIT!!
- VIA KBC V II 6 BEEPS!!!
So of these 6 keyboard controllers with three I get an INIT and with three I don't.
I thought I remembered that the keyboard controller sometimes was specific with other BIOS versions and indeed this is now also the case with the Kentech BIOS.

Okay however this V2 BIOS is not ideal, it has much less performance with the 386SX.
And after the initial cheer about the INIT, I started to try to boot with the ATX system and all sorts of weirdness was happening.

I still think the first SX BIOS you are modifying is the best one.
If we can get that one to work with the 286 I think it has a better chance to be the ideal BIOS.

Otherwise I am getting inconsistent memory detection results so I will look into this in more detail.
I was only able to get a partial boot going and it was unstable for a while.
Maybe the parameter programming is not suitable for a 286.
Perhaps if we had a chipset register dump program, we could compare all the timing programming.
So after testing the 7 versions on the MSI, I will do the same with the ATX V1 TOPCAT system.
Maybe I still need to make more modifications related to timing.

I just can't be sure whether it's the 286 or something else.
It's a completely different CPU so either way I don't have a reference TOPCAT 286 system which is really the main problem.
If I could find a Kentech or similar one that would be really ideal.
But I won't give up yet, maybe I can find some passive components like series termination or filtering to be added which could prove to be necessary to get the interaction between 320 and 331 to improve.

I will first test your patched version and get back with the results shortly.
I have attached the two very similar BIOS versions for 386SX and 286.
These do have the advanced setups present in the menus.
Possibly the slow performance can be corrected by copying the parameters.
I will also look into that when I get around to this.
I now have the 286 built up for a range of tests.

Kind regards,

Rodney
 

Attachments

Last edited:
This might not be anything important or maybe its exactly related to what youre talking about. I am not super knowledgable about keyboard programming and configuration, but 0x280 seems like another configuration byte. It may have to do with certain keyboard things, it seems to come into play with A20 failur error (6 error beeps, the code for this is right after the checksum check).

By the way i see a lot of post card writes (port 0x80) in the code around the keyboard test section. If you have a post card or can see whats written to port 0x80 in one of these failures i may be able to guess what code is failing. But I'm guessing some configuration bytes might have something to do with it. Don't know what to imagine though - I don't think TOPCAT supports PS/2 like SCAMP, so i don't think the bios can be misconfigured for that.
 
This might not be anything important or maybe its exactly related to what youre talking about. I am not super knowledgable about keyboard programming and configuration, but 0x280 seems like another configuration byte. It may have to do with certain keyboard things, it seems to come into play with A20 failur error (6 error beeps, the code for this is right after the checksum check).
I see, yes it seems that this is what the 6 beeps mean. The GATE_A20 function is handled by the keyboard controller, 320 and 331 together.
The keyboard controller signals the GATE_A20 output on pin 22 (P21) to the 320, which then internally handles the gating, and signals to the /BLKA20 output that the 331 also needs to block the A20 line as well. However it is also possible to control the gate A20 function through "PORT A" or reading port EEh. I will check the documentation for the alternative ports. Maybe some of these functions are not handled right by the VIA controllers and one AMI controller. I am still not entirely sure what is happening exactly. I will be repeating the keyboard controller test with the MSI mainboard and same Kentech BIOS.

Attached is the new version, let me know how it goes.
So I have tested the attached BIOS you patched with the TOPCAT REV1 system, and at first I was getting three short beeps.
Which means the 64kb base critical RAM failed the test.
So a RAM failure generally.
I then removed the SIMMs from the second bank and left only two SIMMs in bank 0.
Then I was suddenly getting a POST and the VGA came up!
So it appears this BIOS is getting a lot further now!
However again I was getting the RAM issues where the BIOS seemed to fail to count the RAM capacity also with 2 SIMMs.

Then this issue is really weird. When powering on the system I get a long beep and three short beeps.
However the VGA comes up.
Then the system detects only 64KB base memory.
Next I cannot boot, and press CTRL-ALT-DEL
after which I get another error this time again that the CMOS memory amount is wrong.
So F1 enter BIOS and saved again.
Then time I see the boot summary, floppy seek, and get the full boot and supporting 2MB of RAM.

So after loading the Power on Default settings, very conservative numbers, then tweaking a few values I am now able to power up the system with all 4MB installed. And I am able to boot and run RealDOOM 0.87 after first starting and exiting the SCAMP version which I almost forgot but that also works with the 0.87 release so that's great. The Demo is now running.

So as I thought the issue is some timing thing, and possibly the timing is totally different with a 286.
Which explains that some tweaking can help.
That's not to say that these things cannot be further improved, probably they can.
So maybe the series termination resistors can help on the memory bus.

Anyway Patrick thanks for the patching, at least I can now run this SX BIOS.
And we achieved the purpose as discussed, of now being able to tweak all the RAS and CAS values, bus clock division, SYNC bus ASYNC bus, shadow copy option ROM, DRAM bus drive strength, many things. Possibly it's all the possible values even. It can be a starting point for testing and trying to move forward. The performance with conservative settings is slow, but we can further look into the timing how to improve this, and possibly improve by testing series termination resistors on the DRAM input lines.

This is a huge step forward from the previous black and white AMI ABC computer BIOS which also displayed the memory count issues where I had to CTRL-ALT-DEL to get out and finally the mem test passed and I could boot. So now thanks to tweaking more timing the system even can power up without any errors, just hearing the memory tick sound and then a normal boot.
And weirdly enough, now I can use the VIA V-II keyboard controller without issues as well.
So this may be related to how a specific BIOS tests the Gate A20 function.
I still like these VIA controllers the most because these can be bought without any specific branding keyboard software in them.
You don't want to be dependent on AMI software in the keyboard controller because that severely limits the number of controllers that can be used.

I will do more testing but at least it's a starting point now.
Maybe you can make some notes about how you fixed this BIOS Patrick, it's pretty cool.

I will have another critical examination of the MSI board however I believe that possibly it's also a big factor that the 386SX CPU is on the board.
So there are possibly several factors at play.
Without a decent reference 286 board I can't be certain yet one way or the other.
So I may opt to add a 386SX footprint on the V2 mainboard.
Possibly by switching the CPU RESET over, we could even switch between two CPUs present on the board.
Though this can only be done when the system is powered off according to the datasheet.
So this is not to be used as a dynamic switch and with some care to be observed by switching only while powered off.
So the option should not be wired as a easy switch as a precaution for not accidentally switching.
I don't know what would happen then.
Anyway I will give that some serious thought.

I will share the additional test results with the TOPCAT REV1 ATX board.
And I may look into doing some series termination etc modifications on the board if the layout can permit this in a reasonable way.

At least we moved a step forward to be able to tweak all the timing, and it's also clear proof that the chipset programming is what makes all the difference to get the system operating normally. As mentioned, the system powers up in a critical timing mode, and then proceeds to load the stored register values from the CMOS. If those values are functional, there are no more issues with POST and booting.
What range of timing is possible may depend on series termination and other possible tweaks.
So I will look into the MSI design to find some clues what they have done, maybe it also can help our system.
But there is also a chance it will not make a difference, which I would not be surprised to find out.
I will also do some scope measurements to try to spot smoother edges on series terminated DRAM signals.
They also did this with MEMW and MEMR on the slots however that would only affect the option ROM and VGA cycles for a TOPCAT system.
In the new layout I will add as many series termination resistors as the MSI has, and then we can choose to populate these or some of them, and just solder zero ohms into those we don't want to series terminate. It's a bit more work to assemble but maybe it can result in some improvements.
So I will try to find out in this board if I can solder those resistors into the DRAM traces.

Kind regards,

Rodney
 
Rodney, this question: How difficult would it be to author your own unique BIOS?
Hi Tom,

I believe it would be pretty difficult because of all the specific entry address points that need to be in fixed places in the BIOS.
Space is limited and there are lots of restrictions involved.

Your question also brings up what I am considering these days when encountering all the difficulties with the AMI BIOS versions.
Thanks to the work Patrick did on patching the AMI BIOS we wanted to be able to use, we now at least have a version which we can work normally with, which is a lot more than we had before. Those older black and white AMI BIOS versions were a lot worse.

And what I want to bring up is also that the MR BIOS is really the most reliable and responsive BIOS on a 286 I know of.
So I am still thinking about whether we could program the TOPCAT from a sequence in ROM using a small INIT routine.
And then we would be able to use the MR BIOS generic 286 BIOS which works much better and faster than the AMI etc.
I mean, it's only writing a few bytes into the registers and that's it.
After finding some good values, this is not something you would want to change all the time anyway.
Basically we want to find the best possible performance and then use that from then on.

What would be really useful is to have a TOPCAT version of something like SCAMPCFG.EXE where we can create a dump of the current register values, copy this into a MR BIOS ROM file and program the TOPCAT at INIT before the POST.
Maybe Patrick could find the AMI routines writing into the TOPCAT registers, and these routines could even be duplicated to run at INIT time with a MR BIOS generic 286 BIOS and read the values somewhere from the ROM in one of the blank spaces. But basically the routines may be simple just load the values from a fixed location in the ROM and IO writing these into the TOPCAT registers using some loops similar to the shadow copy routine.

There is a MR BIOS for TOPCAT 386SX/DX, V019B301, however this BIOS is severely limited what you can tweak in it.
So that will be nowhere near the necessary ability to set all the values.

Anyway, I am making a list of all the TOPCAT registers that need to be programmed just in case we need this in the future.

If this could be tackled transparently outside of the BIOS and during the INIT, that would provide a most universal way to INIT and POST the TOPCAT system using a very generic and super stable/fast BIOS, and no longer being dependent on specific BIOS versions that support writing to registers. Such a BIOS register loading method also can be used for other chipsets like the SCAMP. With a certain known optimized hardware configuration, the timing register values can be programmed from a known set of values.

Kind regards,

Rodney
 
Very cool, ok this is all falling together. Some of these configuration bits must determine presence of the different VLSI accessory chips among some other things. I am reminded topcat has "ps/2 compatibility" for ways of doing some things, and I'm sure a big part of that is keyboard, reset, a20 integrations. Theres around a dozen flags... maybe it includes the number of physical banks of ram, or something related to address line configuration which could explain why it's not playing nice with your board with 4 sticks. Did you ever use 4 sticks in the 386sx topcat? Maybe also the bios also just sets up RAMMAP/RAMMOV in a way physically incompatible with your design?

Anyway if i look hard at the BIOS for a while I can probably figure that out what these flags mean eventually. I will start to work through documenting what is going on as the POST codes are written and when the flags are read and what is going on... maybe I can figure it out. A lot of questions still remain, I'll wait for your investigations and examine the BIOS


Possibly by switching the CPU RESET over, we could even switch between two CPUs present on the board.

Wow... that would be really cool!

Anyway, once we figure out the best performing values, maybe it's possible to program defaults to be those.


Maybe you can make some notes about how you fixed this BIOS Patrick, it's pretty cool.

I really only needed to change two bytes, the flag at 0x281 and then the checksum routine. It was not too hard, we just had to find the right things to modify I guess.
 
I am reminded topcat has "ps/2 compatibility" for ways of doing some things, and I'm sure a big part of that is keyboard, reset, a20 integrations.
Certainly, parts of the PS/2 registers may be present in the TOPCAT. It is probably capable of handling the "Fast A20" method which uses a chipset register instead of letting the slow keyboard controller handle the function. So the keyboard controller may be tested as a self test and these all may result in the 6 beeps fault and stop the POST.

Also, let's keep in mind that the entire slow cycle timing is programmable in various ways in the chipset. So this also influences the X-data bus which contains externally the system ROM in 8 bit mode and the keyboard controller. So if the X-bus timing is too fast or too slow, the keyboard controller may also fail the self test.

Well, let's go by what the tests indicate. If any obstacles I will examine in detail and we can try to find code if the code is to blame.
Most of the weirdness has in fact been a chipset programming issue where the timing as programmed could not be met by the system configuration(yet).

Okay, so just for clarity, the BIOS has two sets of default timing values, one is the BIOS default and the other is the Power on default. The power on default is much more conservative and probably similar to the critical power up configuration of the TOPCAT chipset itself. It will default to something that is considered to always work. I also checked the CPU clock on the MSI board during the power on time to see whether there is some power on adjustment of the clock speed, however that is not the case in the MSI. So the power on depends on the critical power on internal registry settings of the TOPCAT and then quickly the BIOS loads the registers with it's saved state or default state depending on whether the CMOS was previously set correctly.
maybe it includes the number of physical banks of ram, or something related to address line configuration which could explain why it's not playing nice with your board with 4 sticks. Did you ever use 4 sticks in the 386sx topcat? Maybe also the bios also just sets up RAMMAP/RAMMOV in a way physically incompatible with your design?
I also suspected this at some point when the tests were unclear, however it's not the case since after adjusting the timing into a functional range, the full RAM is seen, and at power on there is no more erratic detection going on.

So it has been the load/impedance on the memory bus of 4 SIMMs at play which skewed the timing too much and prevented the POST from being executed sufficiently to initialize the VGA. After I removed 2 SIMMs from the bus, the timing response improved enough to get VGA cycles going and read the VGA BIOS. When VGA cycles were running, the memory bus was still not in completely functional timing. So after loading the Power on defaults the memory bus stabilized and the full memory is properly detected by the BIOS.

Ideally we would want to have as little load on the memory bus as possible. So that involves in case of the TOPCAT REV2 two 72 pin SIMMs.
Here in REV1 we have 1 megabit DRAMs so each SIMM puts 9 DRAMs onto the bus, which totals to 36 DRAM chips on the memory bus.
The reason is, if we use 4 megabit DRAMs, we cut the number of DRAMs on the bus in half when populating 8MB, and we can cut it in 4 when populating only a single 72 SIMM of 4 MB which contains two banks on the SIMM. Reducing the bus load by 4 is very significant and it explains why overclocking is much more successful with 4 megabit chips as found on 72 pin SIMMs.

Ideally you would want to use even 8 megabit DRAMs if possible, which is an additional reduction of two times less the bus load. A lean bus with few DRAMs on it has a much better frequency response and will be able to perform much faster. The more DRAMs are added, the more the impedance will rise on the memory bus and make it become more slow in the frequency response.

Having the 72 pin SIMMs increases our possibility to reduce the DRAM bus further. If we find some single sided 16MB 72 pin SIMMS, or make some, we could populate 16MB with only a two banks in the 72 pin SIMM. So the system theoretically still can perform at zero wait states in ideal conditions with a single sided 72 pin SIMM. Certainly it's also the "early cycle" setting in the AMI BIOS that potentially helps to enable zero wait state timing. So when testing if this option is able to function that also indicates a faster DRAM bus.
And let's not forget, it's also the DRAM chip load on the bus, which may be much less with larger DRAMs which are of better chip fabrication.
So the address inputs may pose much less of a load on the DRAM bus with larger DRAM types if some good chips can be found.

Wow... that would be really cool!
I am still thinking how I will do this, because the SX chip is soldered down. So adding it onto the board would be permanent which we would not want. Ideally you would want to be able to unplug the chip if needed just like removing the 286 from the socket, so featuring it on a very small module is best. And when socketing the 286, we can conveniently exchange chips and use the other CPU type.

I can't predict the bus load of adding a second CPU which is under RESET. Maybe it's minimal when in tri state RESET, or maybe not, who knows. So the best way would be to be to unplug it. I am thinking some pin footprint around the 286 socket where the SX CPU can sit level on the board using some two row pinheaders around it. The tiny module PCB can perhaps accommodate the 286 pin positions more closely and so the layout can be simpler and more straight on the mainboard at least.

And doing it that way, we would not need to switch any option, just remove the 286 from the socket and plug the 386SX into the board. The CPU module can also do the reconfigure of the TOPCAT for SX mode by connecting pins using the SX module. This also eliminates that a user could accidentally flip the TOPCAT input wrongly which we don't know what will happen and we don't want to damage the TOPCAT in any case. I can configure the module to hold the 286 in RESET if accidentally left in the socket underneath.

I really only needed to change two bytes, the flag at 0x281 and then the checksum routine. It was not too hard, we just had to find the right things to modify I guess.
Very cool! Removing the checksum enables us to have more freedom to change additional things in the BIOS without needing to worry about fixing weird and impractical checksum constructions.

I will form a list of chipset registers so in the future we may use a MR BIOS as well by doing the INIT with a small code sequence reading the register values from a single string in the empty BIOS space. This is really my ideal for the future system. After using MR BIOS, it's really the most cool BIOS that exists for a 286. Very informative, looks much cooler and is much faster to initialize. And the BIOS doesn't get in the way of using the system. It's just there to perform the functions. A warm boot is practically instantaneous which is incredible.

In addition I will do some tweaking and try to find some 33 ohm resistors, unfortunately I didn't order those from mouser last time.
I saw some on the useless stripped Hyundai 386/486 board but they are pretty large 1206 ones.
There also unfortunately many of those through hole resistor packs.

Kind regards,

Rodney
 
Okay reading the datasheet in more detail regarding the DRAM timing register values, I am already seeing clear evidence that the 286 timing will differ from the 386SX timing with the same values programmed into the registers.

So depending on the register and specific timing value, with a 286 the period will be 1/2 clock longer or shorter than programmed with certain settings. There are several mentions of this for shorter or longer real timings with a 286.
So when we look at a default programming, where a value is 1 clock, then decreased by 1/2 clock in reality because it's a 286, it looks like that is possibly not going to be functional.

And after reading about this, I am sure the actual timing differences will be more elaborate than just these notes in the datasheet, which does explain at least part of the weird stuff which I have been seeing. Things are becoming much more clear as we go forward now.

So I made a more detailed list of all values with the shorter/longer than set info with a 286 for those differences that were mentioned in the datasheet.
So copying from the 386SX to the 286 is not a 100% sure thing either way and needs to be checked.
Besides how the timing works out differently, it's a different CPU of course.

So in the combined 286/386SX system we will need to take this into account to load different values for each CPU because of their inherent timing differences. Maybe we can use a larger ROM like 1 megabit and we could switch two banks which contain the settings pre programmed for each CPU. I think the 1 megabit ROMS are also more modern ICs than those 64KB ones I am currently using.

Basically with a 286 comparing DRAM control to a 386SX we need to see the situation as a completely different system because all the timing will differ. And let's not forget that the DRAMs are on the CPU data bus, so the drive strength of each CPU may be different too on their native unbuffered data bus. This may influence cycles to be marginal with certain more critically pushed timing settings.

Okay so I have done more exhaustive testing thanks to being able to use this AMI BIOS now, here are my best test settings so far at 22.4MHz in the attachment screenshots. It's a big step forward from the black and white AMI BIOS I used before.
The TOPCAT system feels much more fast and responsive now.

RASTMA BANK 0/1(07h) default=FF
D7 RAS TO COLUMN ADDRESS DELAY (ADDSEL DELAY) 1/2 CLK2 set -> works
D6 RAS TO CAS DELAY 2 CLK2S set
D4-D3 RAS PRECHARGE TIME 2-5 CLK2S [286 longer 1/2 CLK2] 2 CLK2S set -> works
D2-D0 RASBK ACTIVE TIME 2-7 CLK2S [286 shorter 1/2 CLK2] 4 set (1 more than example)

CASTMA BANK 0/1(08h) DEFAULT=B7h
D7-D6 CAS ACTIVE TIME WR 1-4 CLK2S [286 shorter 1/2 CLK2] 1 set (same as example) -> works
D5 PRE-CAS DELAY 3 OR 4 CLK2S 3 set (same as example) -> works
D4-D3 CAS PRECHARGE 1-3 CLK2S [286 longer 1/2 CLK2] 1 set (same as example) -> works
D1-D0 CAS ACTIVE TIME RD 2-5CLK2S [286 shorter 1/2 CLK2] 2 set (same as example) -> works

RASTMB2/3(09h) same settings as above
CASTMB2/3(0Ah) same settings as above

REFRESH DIVIDER set to /16 -> works

BUS CLOCK DIVIDER changed from /2 TO /1 -> works
However this change seemed slightly marginal for a moment.
And at 22.4MHz compared to 20MHz this improved a lot again.

CD00 option ROM shadow -> works

so I tested RealDOOM 0.87 demo 3 at 22.4MHz. It ran at 6.85 fps.
3D bench: 8.6 fps
The VGA cycles are somewhat conservative in speed so this impacts the VGA speed.
I still can test async 331 clocking mode but before this was always slower.
I was not able to run early cycle start, possibly this won't work with a 286, I am not sure yet.

So in conclusion apparently only the RAS active time needed to be raised by 1 CLK2 compared to the 386SX.

And the maximum clock so far is 22.4MHz.
Possibly with the new design this could end up higher.
And we will be testing the 320A vs the 320.

And here also like with the REV3D and REV3E, with 22.4MHz we have reached some sweet spot in the timing because this actually works better and more stable than 20MHz.

Kind regards,

Rodney

PS below my rough notes about all the chipset registers Patrick
There you also can see notes about the PS/2 compatible registers.
These apparently are using the same internal registers as other methods for some IO ports/bits, I wrote this in the notes.

Code:
ECh = CONFIGURATION INDEX PORT
EDh = CONFIGURATION DATA PORT (R/W)

RAMMAP (03) BIT D7 D6 D5 = 1 D4-D0 = MAP NUMBER SEE TABLE
RAMMOV (04) BIT D7 D6 D5 = 1 D4-D0 = REMAP NUMBER SEE TABLE
RAMSET (05) D7-D6=DRIVE STRENGTH 150-600 11=600pF, D5=0 EARLY CYCSTART, D3=1 BANKA PAGE, D2=1 BANKB PAGE, D1=1 BANKA INTLV, D0=1 BANKB INTLV
REFCTL (06) D7 = DECOUPLE, D6-D4 IS SLOW REFRESH DIVIDER ONBOARD DRAM, D3 - 10/16 BIT IO, D2-D0 = SLOT REFRESH DIVIDER
000 =/1 (Default)
001 =/2
010 =/4
011 =/8
100 =/16

RASTMA0/1(07h) DEFAULT=FF D7=RAS TO COLUMN ADDRESS DELAY, D6=RAS TO CAS DELAY, D4-D3=RAS PRECHARGE 2-5CLK2,
(!!) IN 286 MODE THESE TIMES MAY BE 1/2 CLK2 LONGER THAN  PROGRAMMED!!
D2-D0: /RASBK ACTIVE TIME 2-7CLK2S,

CASTMA0/1(08h) DEFAULT=B7h, D7-D6 CAS ACTIVE TIME 1-4CLK2S 286 SHORTER, D5=PRE-CAS DELAY 3 OR 4CLK2S, D4-D3=CAS PRECHARGE 1-3CLK2S 286 LONGER, D1-D0: CAS ACTIVE FOR READS 2-5CLK2S 286 SHORTER,
(!!) IN 286 MODE THESE TIMES MAY BE 1/2 CLK2 LONGER OR SHORTER THAN  PROGRAMMED!! CHECK THE TEXT AND HERE WHEN WORKING ON THIS!
RASTMB2/3(09h)
CASTMB2/3(0Ah)



SLTPTR (02) D7=A23 .... D0=A16 NOT RELEVANT AND SHOULD BE SET HIGH FF
EMSEN1 (0Bh) D7=EMS ENABLE, D6=BACKFILL ENABLE, D5 IS RESERVED, D4=EMS WINDOW MAP0 OR 1, D3(EMS PAGE 11)=B/EC000, D2(EMS PAGE 10)=B/E8000, D1(EMS PAGE 9)=B/E4000, D0(EMS PAGE 8)=B/E000
EMSEN2 (0Ch) D7(PAGE 7)=DC000, D6=D8000, D5=D4000, D4=D000, D3=A/CC000, D2=A/C8000, D1=A/C4000, D0(EMS PAGE 0)=A/C0000
E8h = EMS REGISTER INDEX PORT D7 = STD(0)/ALT(1), D6=AUTO-INC, D5=A5, D4=A4, D3=A3, D2=A2, D1=A1, D0=A0
AAXS (0Dh) D7/D6=AC000 ACCESS, D5/D4=A8000 ACCESS, D3/2=A4000 ACCESS, D1/0=A0000 ACCESS
BAXS (0Eh) D7/D6=BC000 ACCESS, D5/D4=B8000 ACCESS, D3/2=B4000 ACCESS, D1/0=B0000 ACCESS
CAXS (0Fh) D7/D6=CC000 ACCESS, D5/D4=C8000 ACCESS, D3/2=C4000 ACCESS, D1/0=C0000 ACCESS
DAXS (10h) D7/D6=DC000 ACCESS, D5/D4=D8000 ACCESS, D3/2=D4000 ACCESS, D1/0=D0000 ACCESS
EAXS (11h) D7/D6=EC000 ACCESS, D5/D4=E8000 ACCESS, D3/2=E4000 ACCESS, D1/0=E0000 ACCESS
FAXS (12h) D7/D6=FC000 ACCESS, D5/D4=F8000 ACCESS, D3/2=F4000 ACCESS, D1/0=F0000 ACCESS
00=R/W SLOT
10=READ BRD, WRITE SLOT
11=R/W BRD
01=READ SLOT OR ROMCS, WRITE BRD
CAREFUL FOR CONFLICTS WITH EMS SYSTEM (4-27 OF MANUAL)
EBh HIGH ADDRESS MAPPING PER PAGE D15-D11=1, D10-D8=A23-A22
EAh LOW ADDRESS MAPPING PER PAGE D7-D0=A21-A14



A CPU reset without a coprocessor reset can occur for one of two reasons.
The first is usually done in order to switch from real to protected mode.
The signal which causes it is shown as "Hot" reset.
It is triggered by setting bit 0 of I/O port 92h to a 1, by a read of I/O
port EFh, or by receipt of an external -RC signal(8042 KBC)

E9h = EMS REGISTER SET: READ=STANDARD EMS REGISTER SET, WRITE=ALTERNATE EMS REGISTER SET
EEh = FAST A20: READ EEh= ENABLE (FAST) A20, WRITE EEh= DISABLE (FAST) A20
POWER ON: FAST A20=DISABLED!
92h = PS/2 FAST A20 I/O REGISTER D1=1 A20 IS ACTIVE, D1=0 A20 IS BLOCKED/DISABLED
READ EEh AND 92h BIT 1 ARE IDENTICAL VALUES WHEN ACCESSING EITHER METHOD
MISCSET (14) D7=1 DISABLE FAST A20 AT EEh, FAST CPU RESET AT EFh, SPEED SWITCHING
                   OF CPU CLOCK AND DISABLE PROTECTING/UNPROTECTING CHIPSET REGS.
EFh(92h=PS/2) = FAST RESET
WRITE F4h = SLOW CPU
WRITE F5h = FAST CPU

EFh READ = RESET CPU
92h D0=1 RESET CPU (PS/2 COMPATIBLE VERSION)

(!) WRITE 03 TO PORT 92h ENABLES A20 FOR RESET, AND RESETS CPU
SO A20 MUST BE ENABLED BEFORE ISSUEING THE CPU-ONLY RESET

WRITE FBh = WRITE ENABLE CHIPSET REGISTERS E8h-EFh
WRITE F9h = PROTECT CHIPSET REGISTERS E8h-EFh

SLEEP (13) D7=1 ENABLE SLEEP, D6-D4= SLOWDOWN FACTOR

MISCSET (14) D7=FX ENABLE 0=ENABLE SF, D6=F1 CTRL, D5= SD DRIVE, D4-D3=SLOW CLK2 DIVIDER, D2-D1=BUS CLK DIVIDER, D0=BUS MODE

TURBO PIN COULD BE CONN TO KBC FOR CTRL-ALT-+ AND -

REFRESH decoupling simply means that different refresh timing can be programmed for the slot /REFRESH and REFRESH in the 320.
And when coupled, both values need to be updated to become effective, otherwise the lesser division will be used.
 

Attachments

  • Advanced chipset best settings 22.4mhz.jpg
    Advanced chipset best settings 22.4mhz.jpg
    219.7 KB · Views: 2
  • Advanced cmos best settings 22,4 mhz.jpg
    Advanced cmos best settings 22,4 mhz.jpg
    238.5 KB · Views: 2
Last edited:
I've also been going through the code. I found a handful of things like shadow bios code, shadow rom code. I think I have found some of the defaults code but it's incredibly obfuscated and annoying. I will keep digging though. I have commited a lot of my notes on the github. Some short notes:

0x281 flag 0x40 is the 286/386 toggle
0x281 flag 0x80 is a toggle to print "EVALUATION COPY NOT FOR SALE". This is an encoded/obfuscated string.

0x284 is a byte value which controls the length of a certain delay after POST CODE 2, which i guess is power on delay. Maybe they raise this number on faster cpus to delay longer,
0x285 is another byte value, possibly with a delay between writes/reads to various ports..

0x280 has a lot of flags i have not determined yet. It might be related to power on defauts, not sure.

One thing that comes to mind on timings - generally speaking 286 machines always seem to run a little bit faster running 16 bit code than 386sx of the same clock speed and chipset. I always assumed this had to do with timings/wait states, because the cycle counts do not necessarily favor the 286, but I have no real evidence. So actually I was surprised the 286 had to run with more conservative RAS timings after all.

I will read through your notes. I'm aware of a lot of the registers due to writing scamp/topcat drivers, and I encountered a lot of these in my bios work too.

8.6 on 3d bench is not bad. I think my SCAT router board with 4-way interleave would get 9.3 with that clock speed. I think the TOPCAT could maybe achieve similar performance. Maybe it's the conservative VGA timings, maybe its the RAS delay, maybe a little of both.

Just curious, did I ever send you this dram refresh lowering program? It just simply programs the PIT to run a very very low dram refresh count which improves performance. I have never had trouble with it whether on a 5150 or a fast 286. I will include it here for you. I just stick it in my autoexec usually, but you can also run it manually.
 

Attachments

So actually I was surprised the 286 had to run with more conservative RAS timings
I suspect this has more to do with the internal operation of the 320 how it connects its logic in timing to the 286 status signals.
That is not necessarily a speed thing but may also simply be related to timing and duration derived from the different timing of the 286 status lines and how these drive the internal logic for RAS output generation timing.

Otherwise I was pleasantly surprised that the 286 is able to run such fast DRAM timing.
The most notable value is the CAS duration for reads and writes.
This literally translates in wait state alike speed differences.
So those are much more important and critical for the performance than the RAS stuff.
Though one RAS value I was able to lower it which gained a slight speed increase.
In the end when raising the clock, I got another speed boost.
Maybe if we use a better ROM chip like the more modern EEPROM 1 megabit chips, this can allow the system to INIT with higher clock speeds.
And then everything can be re-tweaked again.
If we didn't have this AMI BIOS, we would not have those options at all.

I'm aware of a lot of the registers due to writing scamp/topcat drivers
Right, these are really very similar with each other.
So much so that your SCAMP EMS driver also works with the TOPCAT.

Comparing a SCAMP system with a TOPCAT one, the biggest difference between these is that with the TOPCAT they split the system control between the 320 and 331.
The 331 can do it's own system control which can run synchronous or asynchronous with the 320 clock timing.
Well since the SCAMP system has a single system controller, maybe such a design is superior in the maximum overclock ranges it can achieve.
Though I still reserve this for future testing when we can use 4 megabit 4 bit wide or better DRAMs on the TOPCAT.
Other optimizations may yet yield big improvements in the maximum clock range, which has definitely some good reasons behind expecting that.
Reducing the DRAM address bus load is very important for the maximum timing of all the DRAMs combined in the system.
It's not necessarily even the DRAM nanosecond rating but also the lesser impedance load on the address lines.

Maybe it's the conservative VGA timings, maybe its the RAS delay, maybe a little of both.
Indeed it must be both, as there is constant reading from system RAM and writing to VGA RAM.
So in my tests it was revealed that the VGA write cycles are really much slower than other systems I have tested.
I think the SCAT was much better, maybe almost twice the VGA write speed of the TOPCAT.
Unfortunately, the VGA write speed largely depends on the 331 system control timing, which can be somewhat influenced by the "BUS clock" sent from the 320 to the 331.
So any means to raise that clock if the system can still keep running, would probably improve the Cirrus Logic card performance a lot with the TOPCAT.
A way to increase the 331 system control speed may be to increase the BUS clock input oscillator speed, and setting the bus clock mode to asynchronous.
So this oscillator could be exchanged, though I would have to see about the floppy controller how to then handle that.
And the IO wait states can be slightly increased to keep the slot cards stable, while the slot memory operations (VGA and option ROM) may be increased in speed.
Especially when shadowing the option ROM, it can be taken out of the equation probably.
Maybe it's better to provide different clocks for the bus clock and floppy controller.
That way the bus clock can be raised to improve the VGA cycle speeds with the 331 system control.
However I did notice before that asynchronous mode may decrease performance compared to synchronous mode.
Though the clock increase may make up for this as well.
Still some stuff to be tested in the future.

Just curious, did I ever send you this dram refresh lowering program? It just simply programs the PIT to run a very very low dram refresh count which improves performance. I have never had trouble with it whether on a 5150 or a fast 286. I will include it here for you. I just stick it in my autoexec usually, but you can also run it manually.
Cool, thanks, I did not use this tool before!

Slowing the refresh timing definitely provides a performance boost as I could see with the TOPCAT tests where the maximum refresh slowdown is /16.
Indeed lowering the timer frequency seems like another way.
Though I am not sure how they slow the refresh in the 320.
If that is a division from the timer frequency, it could indeed be further lowered.
I think these DRAMs have very good retention since I even got garbled screens when powering back up too fast.
So some level of data was retained even after seconds.

I will review my other notes about the MSI board regarding the passives for bus series termination etc.
I don't plan to use caps on the IRQs like they did since this won't bring anything but other stuff I can include so it's easier to solder in these parts just to see how this affects the speed results.
And I want to do some scope measurements, though I am slightly skeptical whether my cheap scope is able to show the better edges.
When zooming into signals, at some stage the display becomes pretty rough and spiky and I doubt this is accurate anymore.
Anyway, it is what it is.
We can see from test speeds whether passive components can add anything positive.
About this I am also still skeptical but I am now willing to at least try this out.

I remember seeing such a huge difference in responsiveness of the system when powering on the MSI board.
At the time this was frustrating with the TOPCAT REV1.
Thankfully because of this cool AMI BIOS, at least the ATX TOPCAT REV1 now feels roughly the same!
Again, thanks for your modifications Patrick.
One day when you build your own TOPCAT board I think you will also appreciate being able to use this cool AMI BIOS, it's very useful!
If you can find other improvements that would be great too.
Maybe if you could find the setup default register values that the BIOS is loading.
If we could replace these with our best scenario, that could instantly load the optimal performance values.
And the "power on defaults" can be used for being able to initialize the system.
There is even a third set of register values at play which the 320 and 331 load by themselves when powering up.
And it's cool that the 331 is a sort of "slave" or "shadow" device when programming the registers, and listens to certain bits to setup itself as well.

I am not surprised with your findings of obfuscated stuff in the AMI BIOS.
This was surely also in part because of the times where a lot of commercial factors were at play.
It's a pity now of course since these systems are purely enthusiast hobby and historic value stuff, and if we can reduce this now, that will be much better of course to get rid of some things.

After your mentions of port 80, I am wondering if we are not better off using a nice large 208 pin CPLD and include a cool POST display on the board.
When soldering the TOPCAT chips on, the larger CPLD is no different in this regard.

I have been working on a somewhat straight forward interfacing of the PicoGUS in the mainboard which is of course different from an adapter card as it originally is developed on.
So I want to use some of the CPLD logic to do all the PicoGUS control mechanisms, and mostly use the bus switch ICs for the level adjustments to connect with the pico.

So the PicoGUS is always under development and it can do all sorts of emulation including Sound blaster, so maybe I should wire a few more interrupts to the larger CPLD just to increase the options for interrupts.
I don't see any gain in doing 16 bit DMA channel support since the sound data bus is 8 bits.
So DMA channel 1 seems enough.
I don't like jumpers really so it would be better to use the CPLD programming to setup stuff.
And a few register bits can be used to flip some interrupts too.
The IO decoder doesn't need many registers by itself anyway.

Kind regards,

Rodney
 
Last edited:
I had a brief look at your disassembly in the GitHub.
Very cool to look through this.

I saw a lot of out FBh (enable) and out F9h (disable) which stood out, these are enabling and disabling of TOPCAT register write access.
 
I have worked hard on the layout for the TOPCAT REV2 micro ATX mainboard.

So we now have the following changes:
- 386SX as a second CPU option on an optional module
- two IDE ports instead of one
- POST display
- integrated PicoGUS with separate USB device connector on the back
- LPT port
- separate BUSCLK oscillator

I tried to add a LPT port since the IO decoder had enough spare pins and at first I thought it was not able to fit in that area but finally I managed to make enough space. The LPT port is featured on two separate 10 pin FDC connectors, one connector features the data port and the other the control port. It's a bit of a tight fit however at least we now have the LPT port for those who want it. I have not yet tested the LPT port as also featured in the REV3D and REV3E. As far as I know this should work, and the port is correctly detected by the MR BIOS.

The IO Decoder CPLD will handle a lot of the PicoGUS control logic and some signal inversions.

In addition, the IO decoder will control the CPU options selected by a jumper.
The CPU choice mode switch controls:
- BIOS ROM bank selection for separate BIOS option for both CPUs
- switching the VLSI TOPCAT 320 system controller into the correct CPU mode
- switching over the CPU RESET control between 286 or 386SX CPU and disabling the inactive CPU by keeping it in RESET.

For BUSCLK I have added a dedicated clock oscillator. This will allow us to change the BUSCLK to any test frequency without affecting the clock of the FDC and keyboard controller. In addition, we can leave out the BUSCLK oscillator which may force the 320 and 331 to operate in synchronous bus mode.
When the cycles are synchronous it's my theory that this increases the efficiency of the whole system because less clocks may be involved to cover the periods between cycles of the 331 and 320 so the CPU is able to receive READY and start with the subsequent cycles much faster.

In attachment a rough preview of the PCB which may be close to definitive now, I will probably only work on optimizing the layout so I am working towards the final version which I will release on GitHub.

So we have two 72 pin SIMM slots which provide the 4 RAS banks with each a high and low byte CAS. I have wired in the respective parity bits in case these are present on the module.

NMI is purposely not wired to the 320 so any false parity errors due to missing parity DRAMs will not be able to trigger a NMI fault routine.

The CPU module featuring a 386SX or compatible other type of CPU will connect to the mainboard using three pinheaders. This is mostly for layout reasons but also to provide a stable hold for the module on three sides.

Kind regards,

Rodney
 

Attachments

  • TOPCAT_286_MAINBOARD_REV2_IN_PROGRESS_03.png
    TOPCAT_286_MAINBOARD_REV2_IN_PROGRESS_03.png
    320.7 KB · Views: 13
I have now finished the TOPCAT REV2 mainboard layout.
The gerber files for ordering the board are now uploaded to the GitHub page.
I also added some support files such as component placements.
The values are all also on the silkscreens top and bottom.
This design aims to create a final version of a TOPCAT PC/AT where everything is optimized as much as possible and I don't plan to go beyond this design level since everything is included that I have been planning since the REV1 build and testing. If all goes well the board would only need a VGA card and would possibly be capable to handle the sound blaster audio onboard.

I did originally intend to convert DRAM support of the TOPCAT into SRAM and play around with this, however after reading more deeply into the more advanced mechanisms that are used under certain conditions in the 320 and 320A TOPCAT system controller, it started to dawn on me that this is really completely optimized for DRAM specifically and uses DRAM-only specific features where the DRAMs are capable to store the address bits in various ways and do repeat data transfers with only partial setup needed for the repeats, etc. This could be replicated using a CPLD however it would then be very limited and in addition would require a lot of pins to do this. Basically to support interleaved and fast page based operations this would require a separate store of address bits on each RAM bank to enable the same mechanisms because this would require separate address lines for each SRAM bank. Basically the DRAM to SRAM conversion will be able to work in a simple single bank configuration however this will eliminate the 320 from being able to configure the advanced and much faster cycles. Otherwise I suppose possibly adding a CPLD with sufficient pins on each SIMM format module would also be possible but that feels kind of extreme for what it would then accomplish. I don't see the gain in that idea.

So since the 320 and 320A are completely optimized for DRAM specifically, I decided to feature this mainboard in a DRAM configuration. From the SCAT mainboard Patrick sent me I got interested in featuring a 72 pin SIMM module which combines several typical advantages as a bonus such as using 4 times larger capacity DRAM chips which reduces the number of chips on the DRAM address bus by 4. Another advantage is that two banks can be combined on a single module when using a high and low CAS input for each bank. In other words, using two 72 pin SIMMs we can fully populate the TOPCAT 4 bank DRAM support in a much smaller footprint.

In addition I have decided to add a lot of series termination resistors and I also added some load capacitor footprints in other areas just in case I would want to use these. Builders of this project should not use the load capacitors by default because it all depends on testing and doing scope measurements on the signals involved. I hope my cheap scope will be able to sufficiently distinguish which wave shapes actually look better. Otherwise I will also go by the clock ranges that can be obtained to show any improvement by these additional passive components. If no difference is found, I can simply omit the series termination by soldering in zero ohms resistors, but at least this board design allows some testing and experimentation in this regard. So series termination resistors of in principle 33 ohms (same as seen on the MSI 386SX board) are added for the DRAM address and control bus, all the clock signals and the CLK2 related inputs and outputs of the 320. Also the /MEMR and /MEMW command signals going to the slots now contain series termination resistors. This is all pending testing and debugging after the board is built. I want to add that load capacitors are a relative concept since the board material itself also has it's own capacitance which may possibly be in the range of 5-10 pF. With a longer trace and lots of ground plane above and below because of using the 4 layer PCB, that all adds up to more capacitance everywhere.

As mentioned before, I have included the PicoGUS into the design and polpo is okay with this. Of course, this will be a non standard implementation so any proper operation is not certain until I am able to test this. So we will be able to test the PicoGUS design to see the limits in this particular configuration. Some of the PicoGUS control mechanisms are moved into the IO Decoder CPLD which may hopefully as a whole be able to go along with the desired bus speeds that we want. Basically I/O and DMA are slower and less critical operations than fast memory transfers already so that will be an advantage regardless, and of course I hope the test results will show us that this design can integrate well with the PC/AT systems I have been building. With systems like the REV3E we are also modifying the IO cycles to improve the IO cycle reliability.

I hope that in this new design I will be able to further tweak the VGA cycles using the separate oscillator for the 331 and possibly tune the chipset programming further. Testing with this new board will finally indicate whether a faster asynchronous 331 or a synchronous 331 will be the fastest solution for the VGA cycle speed. I will know more after testing. Also I will be using the newer production 320A and Intel branded 331 chips Patrick sent me which may provide even faster test results. Tests with the MSI board seemed to indicate that the newer chips are slightly faster than those that came on that board. In addition I want to test without the oscillator for the 331 in place which may lead to automatic synchronous operation of the 331. And possibly this may be more optimal to even eliminate the unused clock input signal if this mode is at all possible and functional. With the SCAMP this is possible, and the TOPCAT and SCAMP do have some similarities.

So combining this with the new memory layout, I am also very curious to see whether the 4 megabit DRAMs would be able to make it possible to clock the 286 CPU at even faster rates.
The new board features a socket for the 286 so it can be swapped and a 386SX can now be inserted on a module into 3 pinheaders. Basically the CPLD will control the CPU handling and enables to use a jumper input to switch between CPUs. The jumper or switch position needs to be changed while the system is powered off because the changed CPU needs to be properly synchronized to the clock during the power on phase before it starts reading and executing code or else it will probably not run in sync with the clock which may lead to unpredictable states. This is at least the case with a 286. So first the system needs to be powered down, and then the CPU type jumper or switch can be changed and then the system can be powered up again. The CPU support control will need testing because the initialization of the CPLD needs to happen before the system comes out of RESET. Thankfully I by default use two whole seconds to release RESET which should help.

I will modify the REV3E IO decoder CPLD project to suit this mainboard and I will upload that quartus project to GitHub shortly.

Kind regards,

Rodney
 
Very cool, I think I will add TOPCAT and REV3D boards into my next batch PCB order soon. Seems like I have a lot of parts to order too!
I hope to find time in the next month and a half or so to put the full boards together and test too. I'm excited to give these boards a try.
 
Very cool, I think I will add TOPCAT and REV3D boards into my next batch PCB order soon. Seems like I have a lot of parts to order too!
I hope to find time in the next month and a half or so to put the full boards together and test too. I'm excited to give these boards a try.
Amazing Patrick! I have done my utter best to further advance these projects for those enthusiasts who want to build one.

I hope you will also enjoy the experience of building these systems!

For a REV3 CPLD system I would recommend the REV3E because it is the next stage version of the REV3D and the SRAMs are moved onto the mainboard which is also much more convenient.
With the SRAMs onboard it's pretty simple to add more RAM at any time you want later on.

I also have plans to work on a new SCAMP micro ATX design, possibly even a few different types of SCAMP designs.

I may attempt to use CPLD technology and a few simple core AT controller chips to replace the more difficult to obtain companion chip to the SCAMP.
I think the CPLD can drive the address bus to the slot with very sufficient speeds.
I will give this more thought how to proceed.
Having a CPLD also will further enhance a more complete SCAMP based system with integrated IO decoding and possibly a PicoGUS.

Kind regards,

Rodney
 
Back
Top