PDA

View Full Version : Slowing down an IBM AT



Tr3vor
March 6th, 2017, 07:59 AM
So I just recently got an AT, the 8mhz model and I was wondering if there was a possible way to slow it down. I see on minuszerodegrees.net that the BIOS checks the speed of the CPU before booting to make sure there is no overclocking, and I would assume the bios would also throw a fit if there were to be a slower clock crystal as well. I can't remember where I saw it (I think it was minuszerodegrees), but I think I saw something about upgrades existing for these newer ATs that would change the clock speed after the computer booted to avoid the BIOS's double check. Can't really say if that's credible, since I can't find where I saw it, but I'm wondering if I could wire up some sort of switch between two oscillators, have one selected for the booting process and then switch it into "slow mode", which is for obviously running old speed sensitive PC software.

Hopefully its not some continuous check otherwise this idea will be a no go. Also I wonder if running the computer way slower, say @3mhz or something would cause the system to become unstable. Another thing is, I wonder if switching clock speeds while the computer is running would cause hardware damage or issues with software. I'm not anywhere near experienced enough with computer hardware/software to answer these questions, and I don't want to poke around randomly and blow up my new oversized calculator.

Has anyone tried anything like this? Any help would be appreciated.

Trixter
March 6th, 2017, 08:43 AM
If your only goal is a modest slowdown to make very old games playable, there are software programs that can "busywait" the system. Mo'Slo (http://www.hpaa.com/moslo/) is one, AT-SLOW (http://www.oldskool.org/guides/oldonnew/resources/atslo410.zip) is another. AT-SLOW uses the RTC interrupt to achieve slowdown for AT+ systems (as its name implies) without touching the system timer interrupt, so I recommend that over Mo'Slo.

If you run one of the above, you may want to benchmark your system to see where its effective speed lies. (plug)I created a benchmarking program/database specifically for that purpose called TOPBENCH (http://dosbenchmark.wordpress.com)(/plug); select (B)enchmark->(R)ealtime when starting the program to see which system in the database your newly-slowed system is closest to. Ideally, the only speed target you need to shoot for (unless you're trying to cheat at games, heh) is a 4.77 MHz 8088 PC or clone.

There were hardware products that allowed "overclocking" of the hardware, although their names escape me at the moment. I have one somewhere that includes an adjustable POT for speed (up to 10MHz). All of these commercial products were for speeding the system up, however, not slowing it down.

David_M
March 6th, 2017, 08:51 AM
You cant just switch clocks unless they are synchronized. You tend to get short clock pulses that glitch RAM or ROM access that crashes the CPU.
Many years ago it was common to put a double speed mod in a trs-80, most mods just used a simple switch that would almost always crash the computer. I did my own mod that syncronized the clocks and only made the switch on the rising edge of the slower clock.

There used to be a program do waste cpu cycles in an AT to slow the machine to XT speeds to make some of the older games that were hard coded for XT speeds playable.
It would be simpler to track that program down or write one. The program is fairly trivial, basically what you do is hook the int 1Ch user timer interrupt and waste time with a loop before returning.

Edit: While writing this somebody posted a link to a program that does what you need.

Tr3vor
March 6th, 2017, 09:12 AM
If your only goal is a modest slowdown to make very old games playable, there are software programs that can "busywait" the system. Mo'Slo (http://www.hpaa.com/moslo/) is one, AT-SLOW (http://www.oldskool.org/guides/oldonnew/resources/atslo410.zip) is another. AT-SLOW uses the RTC interrupt to achieve slowdown for AT+ systems (as its name implies) without touching the system timer interrupt, so I recommend that over Mo'Slo.

If you run one of the above, you may want to benchmark your system to see where its effective speed lies. (plug)I created a benchmarking program/database specifically for that purpose called TOPBENCH (http://dosbenchmark.wordpress.com)(/plug); select (B)enchmark->(R)ealtime when starting the program to see which system in the database your newly-slowed system is closest to. Ideally, the only speed target you need to shoot for (unless you're trying to cheat at games, heh) is a 4.77 MHz 8088 PC or clone.

There were hardware products that allowed "overclocking" of the hardware, although their names escape me at the moment. I have one somewhere that includes an adjustable POT for speed (up to 10MHz). All of these commercial products were for speeding the system up, however, not slowing it down.

Alright, I haven't tried AT-SLOW before. I'll give that one a shot.

I tried Mo'Slo before, but for some reason it didn't want to install, but it was probably just where I got that version from. I didn't try too hard to get it working because I've heard questionable things about how, well I guess it was somthing about the consistency of the speed being out of whack.

But yeah, I'm just trying to get it down to around 4.77mhz 8088 speeds.

Chuck(G)
March 6th, 2017, 09:28 AM
I'm going to dissent here a bit.

Back in the bad old 5170 6MHz days, you could buy one or a set of crystals for the 5170 (just look in the back section of CW for examples) and at least one outfit even offered a continuously-variable (it had a knob) PLL synthesized oscillator for inclusion into the 5170. Substituting a 16MHz crystal for the 12MHz one was very common with the first BIOS. I'd heard reports of people bolstering the CPU with a big heatsink and going to a 24MHz crystal. Overclocking at its best.

So, assuming that you can keep the DRAM refresh rate to tolerances, I see no reason that you couldn't halve the speed of an 8MHz genuine 5170 by going to an 8 MHz crystal.

Just bear in mind that a slower clock will also slow down your peripheral device access.

Tr3vor
March 6th, 2017, 10:03 AM
I'm going to dissent here a bit.

Back in the bad old 5170 6MHz days, you could buy one or a set of crystals for the 5170 (just look in the back section of CW for examples) and at least one outfit even offered a continuously-variable (it had a knob) PLL synthesized oscillator for inclusion into the 5170. Substituting a 16MHz crystal for the 12MHz one was very common with the first BIOS. I'd heard reports of people bolstering the CPU with a big heatsink and going to a 24MHz crystal. Overclocking at its best.

So, assuming that you can keep the DRAM refresh rate to tolerances, I see no reason that you couldn't halve the speed of an 8MHz genuine 5170 by going to an 8 MHz crystal.

Just bear in mind that a slower clock will also slow down your peripheral device access.

I'm pretty sure that this newer version of the bios would not boot if you had an 8mhz crystal in there because it checks to make sure the CPU speed is correct before POST, so that's why I was asking about making a switch to change to a lower speed after booting.

otherwise, AT-SLOW seems to be working pretty well.

One off topic question about the AT real quick, don't think it needs a whole new thread:
The original 30mb hard drive in the 339 model, does it automatically park the heads when its shut off? I'm not sure if I should be using the PARK.COM utility before shutting it off, and I'd like to maximize its life span.

Trixter
March 6th, 2017, 10:05 AM
BTW I would be remiss if I didn't plug Hargle's SlowDOS (http://www.oldskool.org/pc/throttle/DOS/) (see bottom of page). It performs slowdown using the same method a AT-SLOW, using the clock timer present in AT+ systems. Source included.


I tried Mo'Slo before, but for some reason it didn't want to install, but it was probably just where I got that version from. I didn't try too hard to get it working because I've heard questionable things about how, well I guess it was somthing about the consistency of the speed being out of whack.

While I haven't looked into Mo'Slo specifically, that is the problem with trying to use the 1Ch system timer method; it only activates 18.2 times a second which is hardly a granular slowdown. (This might be the method VARISLOW used, although I'd have to disassemble it to check.) Other programs would reprogram the PIT so that INT 08h fires a lot faster, and would do a small busywait during each tick; this was smoother.

(For the very smoothest slowdown, I've toyed with the idea of writing a TSR that enables the trap flag (halts the CPU after every instruction) and ACKs it. That would be very smooth, but quite extreme, slowdown... The drawback is that it would only be useful for programs/games that didn't need to read the timer to time things, because the trap flag only halts the CPU, not the PIT. Any program needing timer reads to pace itself would act erratically though, due to more real time passing and the program being aware of it.)

For anyone reading this thread with a system from 1996 or later, there is Throttle (http://www.oldskool.org/pc/throttle), which achieves slowdown by disabling L1 and L2 caches, and slowing down the PCI bus. A Windows 9x version exists as well as DOS.



at least one outfit even offered a continuously-variable (it had a knob) PLL synthesized oscillator for inclusion into the 5170.

I can corroborate this, as I own one (see above).

Scali
March 6th, 2017, 10:37 AM
It performs slowdown using the same method a AT-SLOW, using the clock timer present in AT+ systems. Source included.

Some background for people not at home with hardware at this level:
The original PC/XT models had only a single timer, the 8253 (or 8254) PIT, which can generate an interrupt at frequencies from 18.2 Hz to roughly 1 MHz. The BIOS would install a default handler, and run it at 18.2 Hz, to keep time and such. Certain TSRs would also hook into this timer.
Some software would reprogram the PIT to other rates and use it for other things, such as timing for audio/video in games and such.

In the AT, the new 'CMOS realtime clock' was introduced, a Motorola MC146818. This chip was battery-powered, so the clock could keep running when the system was switched off, so it always kept time (before then, you had to enter date and time whenever you booted DOS).
This chip also had its own timer, which also could generate an interrupt.

Now, the thing is, a lot of early software would only use the PIT for timing, either because the software was developed before the AT was around, or because they wanted to remain compatible with the PC/XTs and clones out there.
So a slowdown utility that uses the CMOS timer to periodically 'steal' some CPU time is 'ideal' in this sense: it leaves the PIT alone for the other software.
One could argue that software that uses (and thus requires) the CMOS timer, will be written when ATs were commonplace, and it won't be speed-sensitive, since at that time, various different clones and speed grades existed, and programmers learnt to write their software defensively.

If I were to develop such a utility, I would also use the CMOS timer, and I'd set it to a high frequency (I believe 8 kHz is doable), and do a short busy-loop to steal some CPU time, spreading it out as evenly as possible.
I'd make the amount of iterations in the busy-loops configurable, so it would allow you to throttle a wide range of speeds.

Stone
March 6th, 2017, 11:01 AM
The original 30mb hard drive in the 339 model, does it automatically park the heads when its shut off? I'm not sure if I should be using the PARK.COM utility before shutting it off, and I'd like to maximize its life span.Park is useful if you physically move the drive. Its primary purpose is to prevent damage caused by physical or inertial force. If you're expecting an earthquake tonight by all means, use it.

evildragon
March 6th, 2017, 11:11 AM
Park is useful if you physically move the drive. Its primary purpose is to prevent damage caused by physical or inertial force. If you're expecting an earthquake tonight by all means, use it.

I'd park it anyway, particularly if the desk the computer is on, can be easily kicked on accident. I'm so used to typing shutdown or halt on other machines to power them off, that I have my parking utility named halt, just to remember it like habit.