PCjr Acting Flaky

Hardware questions and modifications
DoctorOctal
Posts: 94
Joined: Mon Mar 02, 2020 12:41 pm

Re: PCjr Acting Flaky

Post by DoctorOctal »

jason wrote: Wed Nov 10, 2021 5:03 pmAfter a bit of A/B testing…I’m even more confused… the spare system exhibits VERY similar issues as the first system…even with no shared components! I tried the spare system with the only working 5 1/4" drive I have and the jrIDE with no floppy drive.
If I’m reading you correctly, your two systems do have shared components:
  • power supply
  • diskette drive
  • diskettes
  • jr-IDE
The problem happens with or without the jr-IDE (at least for Thexder, I presume), so let’s set that aside.

I wonder if you have corrupted diskettes or a drive that’s not reading them correctly, but it would be surprising if you had errors on both diskettes that were escaping error detection, and the drive seems to have passed its tests.

That leaves the power supply. You said above that switching from the picoATX to the original board consistently fixed the King’s Quest problem. That should not be the case; good power supplies should run the machine equivalently and not affect the logical operation in any way.

So, at this point, I’d be taking a careful look at the power supplies to see how their outputs differ.

If you have a spare PCjr power board, definitely try it and compare.
1) For testing, I’ve had my monitor about 6-10 inches to the left of the system. Is there any reason to believe there could be any interference here? I am using the PCjr color monitor.
That shouldn’t be a problem. You can confirm by testing with the monitor farther away.
2) Could the pico ATX power supply be doing anything weird by not having enough load on it?
Maybe, but it’s hard to know without testing. Take a look at the voltages on the motherboard when powered by the picoATX.
3) Is there some basic autoexec.bat/config.sys setup I should be using with the jrIDE?
Get JrConfig 3.10 and put this in your config.sys:

Code: Select all

DEVICE=JRCONFIG.SYS /V64 /L
This should work for all memory expansions, not just the jr-IDE.
I hadn’t had time to set up a basic config for it yet and I didn’t think it would matter for what I’m testing, but maybe I’m mistaken.
It shouldn’t matter for King’s Quest. It might for Thexder. Have you successfully run Thexder on this machine before?

Without JrConfig, the jr-IDE’s RAM is unavailable to DOS programs. DOS needs the free memory to be contiguous, and the video memory is standing in the way at the top of the first 128 KB. Thus, you'll only have a 128 KB system (minus the video RAM) as far as DOS is concerned, and well-behaved DOS programs will only get their memory allocations from DOS. I haven’t tried Thexder and don’t know off hand whether it would do something dumb, but its MobyGames listing indicates that it requires 256 KB.

Now that I see Thexder’s memory requirement, I have to wonder: have your problems running Thexder been due to lack of memory all along? If you use the original power supply card and configure the jr-IDE memory correctly, will both King’s Quest and Thexder work?
jason
Posts: 110
Joined: Tue Aug 26, 2008 3:48 pm

Re: PCjr Acting Flaky

Post by jason »

DoctorOctal wrote: Thu Nov 11, 2021 3:49 am If I’m reading you correctly, your two systems do have shared components:
  • power supply
  • diskette drive
  • diskettes
  • jr-IDE
I do have a jrATX power supply and the original long board, so I do have 2 different power supplies, although the King's Quest problem follows the jrATX every time (almost, I did get it to work with the jrATX one time only).

I only have one working 5 1/4" drive at the moment, there is another thread here where I am attempting to determine what the issue is with the second drive.
The problem happens with or without the jr-IDE (at least for Thexder, I presume), so let’s set that aside.

I wonder if you have corrupted diskettes or a drive that’s not reading them correctly, but it would be surprising if you had errors on both diskettes that were escaping error detection, and the drive seems to have passed its tests.

That leaves the power supply. You said above that switching from the picoATX to the original board consistently fixed the King’s Quest problem. That should not be the case; good power supplies should run the machine equivalently and not affect the logical operation in any way.

So, at this point, I’d be taking a careful look at the power supplies to see how their outputs differ.
I am beginning to wonder the same about my King's Quest disk, although I still find it very suspicious that when I use the long board, the game loads up just fine every single time, but with the jrATX, I've only been able to get it to start correctly one time. I do have a Kryoflux dump of the KQ1 disk so I may be able to create a new copy....I may try that.

Putting my meter on the jrATX/picoATX output I see +5 and +12 volts DC. I don't have a scope to see how noisy the signal is.
If you have a spare PCjr power board, definitely try it and compare.
Yeah, I just have the 1 long board and the 1 jrATX. But as I said the KQ problem seems to follow the jrATX. The one time I got the jrATX to load it correctly was when I had installed all my side cars and my extra PC Enterprises 5 1/4" HD drive. However, I just tried that again a little bit ago and it's back to not loading although I may have had a slightly different configuration of side cars (i.e. PC Enterprises 512k sidecard instead of jrIDE). It's still suspicous.
1) For testing, I’ve had my monitor about 6-10 inches to the left of the system. Is there any reason to believe there could be any interference here? I am using the PCjr color monitor.
That shouldn’t be a problem. You can confirm by testing with the monitor farther away.
I switched to using an external video converter through an MCEVGA/OSSC to HDMI, no effect, so at least I'm not power cycling my working monitor now :).
2) Could the pico ATX power supply be doing anything weird by not having enough load on it?
Maybe, but it’s hard to know without testing. Take a look at the voltages on the motherboard when powered by the picoATX.
Is there a good/easy place to pull the voltage off the MB? I was pulling it off a space molex connector that is directly attached to the picoATX when I measured earlier.
3) Is there some basic autoexec.bat/config.sys setup I should be using with the jrIDE?
Get JrConfig 3.10 and put this in your config.sys:

Code: Select all

DEVICE=JRCONFIG.SYS /V64 /L
This should work for all memory expansions, not just the jr-IDE.
I hadn’t had time to set up a basic config for it yet and I didn’t think it would matter for what I’m testing, but maybe I’m mistaken.
It shouldn’t matter for King’s Quest. It might for Thexder. Have you successfully run Thexder on this machine before?

Without JrConfig, the jr-IDE’s RAM is unavailable to DOS programs. DOS needs the free memory to be contiguous, and the video memory is standing in the way at the top of the first 128 KB. Thus, you'll only have a 128 KB system (minus the video RAM) as far as DOS is concerned, and well-behaved DOS programs will only get their memory allocations from DOS. I haven’t tried Thexder and don’t know off hand whether it would do something dumb, but its MobyGames listing indicates that it requires 256 KB.

Now that I see Thexder’s memory requirement, I have to wonder: have your problems running Thexder been due to lack of memory all along? If you use the original power supply card and configure the jr-IDE memory correctly, will both King’s Quest and Thexder work?
[/quote]

Welp, that solves stupid mistake number one. My memory was that Thexder did not require much memory, and I apparently missed that page you linked when I looked over Moby Games the other night to see if had the memory requirement on it... So we can chalk Thexder up to me forgetting that it didn't run on a basic 128k system. So that solved the issue with Thexder running, thank you so much; I figured I was forgetting something about how I used to run things on the system. Thexder now works from the jrIDE, from the original 5 1/4" disk, and from the Kryoflux copy I made (with either power supply).

So...long story short, things are looking good now except for KQ. As mentioned previously the issue seems to follow the jrATX/picoATX around. Is there any way I can gently/easily load the jrATX a little bit more to see if it clears up? The one time I seemed to get it to work with KQ was when I had the system loaded back up to the most side-cars/drives the system has ever run with.

The other possibility I will investigate is if the disk could be marginal. I'll see if I can create another copy based on an older Kryoflux image and see how it behaves. I still find it odd that the game boots up perfectly every time I use the original long board power supply...but who knows.
DoctorOctal
Posts: 94
Joined: Mon Mar 02, 2020 12:41 pm

Re: PCjr Acting Flaky

Post by DoctorOctal »

jason wrote: Thu Nov 11, 2021 4:59 pmIs there a good/easy place to pull the voltage off the MB? I was pulling it off a space molex connector that is directly attached to the picoATX when I measured earlier.
Checking at the Molex connector on the ATX adapter is good. That shows what’s coming from the picoATX, though the connector doesn’t have the -12 V rail (which shouldn’t matter for the stability issues anyway).

If you test the voltages on the motherboard, that will show the how the rails droop with distance (though the effect should be roughly constant no matter what power supply you’re using). Every 74xx logic chip will have +5 V on the upper left pin and ground on the lower right pin when the chip’s notch is to the left. Most of the capacitors on the board, particularly those right next to the ICs, are bypass capacitors connected directly between ground and another power rail.

Your KQ disk is probably OK. It wouldn’t work with the long board power supply otherwise.

Now that we’ve established that Thexder is working and that your diskette drive and KQ disk are probably OK, the remaining issue is the power supply. The fact that KQ works with the original PSU but not with the picoATX is a red flag.

The PCjr was designed for and tested with a linear power supply, which should give very clean power. Switch-mode power supplies are inherently noisier, and I suspect the picoATX is noisier than usual as a trade-off for its small size. I don’t have one to test for myself, and the manual doesn’t give any noise specifications.

Here’s what I suspect is going on:

Though the picoATX’s voltages have checked out, the noise or ripple may be pushing the limits of the PCjr’s tolerance. (Normal operation of the logic adds noise to the power rails already, thus the need for all the bypass capacitors.) The picoATX might also be inducing noise electromagnetically, not just via the power rails. (When the PCjr was first introduced, the PCjr monitor wasn’t yet available—only the 5153 color monitor. Page 1-5 of the PCjr Guide to Operations advised keeping the monitor at least 6 inches away from the system unit to avoid diskette errors. I haven’t tested to see if the 5153 causes problems but have never had trouble with the 4863 PCjr monitor sitting on top of the system unit.)

Most of the time everything works, but occasionally the noise is enough under certain circumstances that a glitch occurs and things go wrong. You’ve run into that with King’s Quest, and I suspect you’d run into it with other programs if you spent a lot of time with the PCjr powered by the picoATX.

Adding load to a power supply normally increases its noise/ripple, but it could be that by adding expansions you added power filtering (in the form of capacitors) at a rate that exceeded the increase in noise. Then again, since it only worked for you once, it might have been just a fluke. The benefits of bypass capacitors diminish with distance, which is why there are a bunch of them sprinkled across the board instead of just one.

The above is speculation on my part, but something’s definitely wrong in the power department if swapping out the original power board for the picoATX leads to software failures.

I think it’s interesting that you see the same problem when using two different motherboards.

Things to try:
  • If you have a normal, full-size ATX power supply, try using it instead of the picoATX. The full-size supply probably has less noise, will be at a greater distance, and will be enclosed in a metal box.
  • Move the diskette drive as far away from the picoATX as you can.
  • Put some metal shielding around the picoATX. Connect the shielding to ground if you can, but be very careful not to short anything. If the picoATX is thin enough, perhaps you can borrow the shield from the 64 KB card. Otherwise, maybe form a shield out of aluminum foil covered with plastic wrap for insulation.
jason
Posts: 110
Joined: Tue Aug 26, 2008 3:48 pm

Re: PCjr Acting Flaky

Post by jason »

DoctorOctal wrote: Fri Nov 12, 2021 2:31 am I think it’s interesting that you see the same problem when using two different motherboards.

Things to try:
  • If you have a normal, full-size ATX power supply, try using it instead of the picoATX. The full-size supply probably has less noise, will be at a greater distance, and will be enclosed in a metal box.
  • Move the diskette drive as far away from the picoATX as you can.
  • Put some metal shielding around the picoATX. Connect the shielding to ground if you can, but be very careful not to short anything. If the picoATX is thin enough, perhaps you can borrow the shield from the 64 KB card. Otherwise, maybe form a shield out of aluminum foil covered with plastic wrap for insulation.
I had a chance to try a few of these and no luck so far.
I tried moving the floppy drive as far away as I could manage with the cables I have. I was successfully able to boot KQ once, but most of the time not. I also tried putting aluminum foil around the picoATX and grounding it temporarily and that did not seem to help either.

I will borrow an ATX power supply from one of my computers when I have time to pull one out and give it a go to see what happens.

Could it at all be related to the age of some of the electrolytic capacitors and the fact that both boards I have likely have original caps in them? Or could I somehow add a capacitor to the jrATX to reduce the ripple? I don't do circuit design so I really have no idea and it's been a long time since I did even basic circuit analysis.
DoctorOctal
Posts: 94
Joined: Mon Mar 02, 2020 12:41 pm

Re: PCjr Acting Flaky

Post by DoctorOctal »

jason wrote: Mon Nov 15, 2021 4:19 pmI tried moving the floppy drive as far away as I could manage with the cables I have. I was successfully able to boot KQ once, but most of the time not. I also tried putting aluminum foil around the picoATX and grounding it temporarily and that did not seem to help either.
OK, those results suggest that the problem isn’t electromagnetic coupling of noise.
I will borrow an ATX power supply from one of my computers when I have time to pull one out and give it a go to see what happens.
If using a normal ATX power supply allowed KQ to boot, that would lend support to the electrical noise hypothesis.
Could it at all be related to the age of some of the electrolytic capacitors and the fact that both boards I have likely have original caps in them?
If the motherboard had any bad bypass capacitors, that would reduce the noise-filtering on the board somewhat. Whether it would make a difference in this case, I couldn’t say for sure. Maybe, but I doubt it. If you have an in-circuit ESR meter, it certainly wouldn’t hurt to check all the electrolytics on the board.
Or could I somehow add a capacitor to the jrATX to reduce the ripple?
Sure, that’s another thing you can experiment with. If you have some caps on hand that are rated for at least 12 V (most will be), you can try putting them across the solder-side contacts of the molex connector. Focus on the 5 V rail, but try the 12 V rail also. Be very careful to get the polarity right and avoid shorts. Try different capacitance values, and try some smaller, non-electrolytic caps such as ceramic or polyester. For a switching supply like this, any noise or ripple will be well over 20 kHz, and smaller, non-electrolytic caps might actually work better.
jason
Posts: 110
Joined: Tue Aug 26, 2008 3:48 pm

Re: PCjr Acting Flaky

Post by jason »

DoctorOctal wrote: Tue Nov 23, 2021 4:33 pm
Or could I somehow add a capacitor to the jrATX to reduce the ripple?
Sure, that’s another thing you can experiment with. If you have some caps on hand that are rated for at least 12 V (most will be), you can try putting them across the solder-side contacts of the molex connector. Focus on the 5 V rail, but try the 12 V rail also. Be very careful to get the polarity right and avoid shorts. Try different capacitance values, and try some smaller, non-electrolytic caps such as ceramic or polyester. For a switching supply like this, any noise or ripple will be well over 20 kHz, and smaller, non-electrolytic caps might actually work better.
I finally got around to looking at the +5 V rail with my scope. Here's what it looks like. Is this an excesive amount of ripple? I really don't know how much is "too" much. And given this, any recommendation of what capacitor values to try out and how much I should expect this signal to get cleaned up? I assume the point is to get rid of or reduce the spikes?

Image

For reference, this is the Mini-Box picoPSU-90 with the jrATX. https://www.mini-box.com/picoPSU-90
jason
Posts: 110
Joined: Tue Aug 26, 2008 3:48 pm

Re: PCjr Acting Flaky

Post by jason »

DoctorOctal wrote: Tue Nov 23, 2021 4:33 pm If using a normal ATX power supply allowed KQ to boot, that would lend support to the electrical noise hypothesis.
I forgot to mention I did also try a normal/full size ATX power supply and it did not exhibit any of these issues with the KQ1 booter disk. So I believe the electrical noise hypothesis is really the issue here.
DoctorOctal
Posts: 94
Joined: Mon Mar 02, 2020 12:41 pm

Re: PCjr Acting Flaky

Post by DoctorOctal »

jason wrote: Tue Dec 28, 2021 6:09 pmI forgot to mention I did also try a normal/full size ATX power supply and it did not exhibit any of these issues with the KQ1 booter disk. So I believe the electrical noise hypothesis is really the issue here.
OK, good to know. I think we’re on the right track.
I finally got around to looking at the +5 V rail with my scope. Here’s what it looks like. Is this an excesive amount of ripple?
400 mV peak-to-peak ripple as shown in the screenshot would be pretty bad. It could indeed cause problems. However, I’m guessing you’re using your scope probe normally with the long ground lead, and that would exaggerate the noise level due to inductive coupling. Dave Jones has a video on power supply ripple measurement in which he demonstrates some of the pitfalls: EEVblog #594 - How To Measure Power Supply Ripple & Noise

That said, the big spikes and little spikes at a rate of 300 kHz are consistent with what one would expect from a buck converter in the PicoPSU. Coupled with the fact that a regular ATX power supply worked fine, I’d say that these spikes are likely the problem even if they aren’t really as extreme as they appear.

So you need a better low-pass output filter on your PicoPSU. Tacking capacitors across the rails is the certainly the simplest way to go, but will that suffice? Maybe. You’ll have to experiment.

I can’t really specify a capacitance value for you to use because other real-world variables will affect your results considerably. That’s why I suggest just trying some capacitors you have on hand. Carefully hold one across the PicoPSU 5 V output and see if KQ boots.

If capacitors were ideal, a larger value would be better. You could just put the largest cap you have across the 5 V rail and be done with it. In practice, however, electrolytic capacitors tend to have significant inductance because of their construction and will have high ESRs at high frequencies—the very frequencies you’re trying to filter out. Smaller caps such as ceramics will have lower ESRs but may be less effective just because of their smaller capacitance.

Things to try:
  • 10 µF aluminum or tantalum electrolytic
  • 100 nF ceramic, especially an NP0 type
  • 10 µF and 100 nF in parallel
  • A 10 µF MLCC (multi-layer ceramic capacitor), if you have one, might be the closest to ideal because of its high capacitance, small size, and low ESR across a broad frequency range.
Try to connect the capacitors directly at the PSU output and keep the leads short for minimum inductance. Surface-mount MLCCs are even better for minimizing inductance. In fact, a good long-term patch might be to bridge the 5 V and ground traces on Akbkuku’s adapter with a surface-mount MLCC.

Dave Jones has videos on this topic, too:
jason
Posts: 110
Joined: Tue Aug 26, 2008 3:48 pm

Re: PCjr Acting Flaky

Post by jason »

DoctorOctal wrote: Mon Jan 03, 2022 3:53 am
I finally got around to looking at the +5 V rail with my scope. Here’s what it looks like. Is this an excesive amount of ripple?
400 mV peak-to-peak ripple as shown in the screenshot would be pretty bad. It could indeed cause problems. However, I’m guessing you’re using your scope probe normally with the long ground lead, and that would exaggerate the noise level due to inductive coupling. Dave Jones has a video on power supply ripple measurement in which he demonstrates some of the pitfalls: EEVblog #594 - How To Measure Power Supply Ripple & Noise

That said, the big spikes and little spikes at a rate of 300 kHz are consistent with what one would expect from a buck converter in the PicoPSU. Coupled with the fact that a regular ATX power supply worked fine, I’d say that these spikes are likely the problem even if they aren’t really as extreme as they appear.

So you need a better low-pass output filter on your PicoPSU. Tacking capacitors across the rails is the certainly the simplest way to go, but will that suffice? Maybe. You’ll have to experiment.

I can’t really specify a capacitance value for you to use because other real-world variables will affect your results considerably. That’s why I suggest just trying some capacitors you have on hand. Carefully hold one across the PicoPSU 5 V output and see if KQ boots.

If capacitors were ideal, a larger value would be better. You could just put the largest cap you have across the 5 V rail and be done with it. In practice, however, electrolytic capacitors tend to have significant inductance because of their construction and will have high ESRs at high frequencies—the very frequencies you’re trying to filter out. Smaller caps such as ceramics will have lower ESRs but may be less effective just because of their smaller capacitance.

Things to try:
  • 10 µF aluminum or tantalum electrolytic
  • 100 nF ceramic, especially an NP0 type
  • 10 µF and 100 nF in parallel
  • A 10 µF MLCC (multi-layer ceramic capacitor), if you have one, might be the closest to ideal because of its high capacitance, small size, and low ESR across a broad frequency range.
Try to connect the capacitors directly at the PSU output and keep the leads short for minimum inductance. Surface-mount MLCCs are even better for minimizing inductance. In fact, a good long-term patch might be to bridge the 5 V and ground traces on Akbkuku’s adapter with a surface-mount MLCC.

Dave Jones has videos on this topic, too:
And yep, I definitely made the mistakes Dave shows in that first video, lol! Thanks for sharing! I'll need to watch the video again as I'm not sure how exactly the 50 ohm terminator is helping where he talks about using two single ended probes...other than without it you've got a completely floating ground on the scope vs. the power supply? I'll talk to some of the technicians at work when I have time and see if they can explain it to me. One of my friends wasn't sure it was necessary for what I'm trying to do but wanted to think about it some more as he doesn't do these types of measurements on a day to day basis.

I'll get another image posted when I have time and get some parts in to play around with it. I don't have any capacitors that small laying around to test with.
DoctorOctal
Posts: 94
Joined: Mon Mar 02, 2020 12:41 pm

Re: PCjr Acting Flaky

Post by DoctorOctal »

I don’t think you need to get fancy with your noise measurements in this case. What you showed is probably good enough. If you wanted, you could do better by using the little spring ground clip that came with your probe instead of the normal ground wire. But we’ve already got a pretty good picture of what’s going on. I found a TI application note on filtering output noise from buck converters that shows waveforms very similar to yours. The amplitude of the noise is probably exaggerated in your screenshot, but I expect that most of the noise is indeed coming from the PicoPSU and not external sources.

It’s hard to know how much noise the PCjr can tolerate and how much any given capacitor will help, so getting the computer working reliably is going to require experimentation more than measurement or calculation.
I’m not sure how exactly the 50 ohm terminator is helping where he talks about using two single ended probes
I think the idea is that by adding a 50 ohm pass-through terminator (which connects the input to ground via a 50 ohm resistor) you make your scope input low-impedance and thus insensitive to weak currents induced by external sources. Meanwhile the low-impedance power supply output (with the noise you’re trying to measure) can drive a 50 ohm load easily.
Post Reply