jmacz
Well-known member
Another month, another Spectrum video card issue This time the card is a SuperMac Spectrum 24 PDQ+. I have reached a point debugging where I could use some additional ideas. @MacOSMonkey has been super helpful giving me lots of insight separately (thanks!!!)
Symptom:
Card works great except one issue: whenever you highlight any text, the highlighted area has artifacts displayed. Image of the issue happening regardless of the color chosen for the highlight color chosen in the Color control panel.
Basic Debugging Done (with no change in behavior):
The above is a screenshot from the machine with the card in it. The fact that the artifacts are showing up in the screenshot suggests the artifacts are written to VRAM. So this does not seem to be an output issue (ie. not the DAC, etc).
What is the call that's causing it?
I wrote a simple program in an attempt to reproduce the issue, and I am able to reproduce 100% of the time using this program. So what is the call? It's an InvertRect call but ONLY when the HiliteMode bit is set. When this bit is set, special handling is done to utilize the selected highlight color.
The issue happens everywhere HiliteMode is used. This includes the Finder (while editing a file's name for example), in SimpleText (when you highlight text), in my test program (which actually is inverting a line of text rendered using DrawString by setting the HiliteMode bit and then calling InvertRect).
Current Test Setup
If I have my test window spanning both monitors and invoke the call to InvertRect+HiliteMode, I see the highlighted area with no artifacts on the internal video side but I see the highlighted area with artifacts on the PDQ+ side.
Stepped Through Debugger
I stepped through what's happening inside InvertRect with MacsBug for the following four scenarios:
a.) Internal Video and InvertRect without HiliteMode set
b.) Internal Video and InvertRect with HiliteMode set
c.) PDQ+ and InvertRect without HiliteMode set
d.) PDQ+ and InvertRect with HiliteMode set
All four paths end up calling RgnBlt but diverge after that.
For paths A and B which are for the internal video, once it calls RgnBlt I see it branch and go to a very different address range and continue there. The code path taken is slightly different depending on whether HiliteMode is set. But eventually it blits the image and all is good.
For paths C and D which are for the PDQ+, once it calls RgnBlt, it stays within the same general address range as the RgnBlt. The code path taken is different depending on whether HiliteMode is set. Path C (no HiliteMode) results in the correct image. But path D (HiliteMode) causes a render with artifacts.
My assumption here is that RgnBlt has been patched with the PDQ+ present in the machine. The first few instructions in the patch RgnBlt determine whether the device is the one with the PDQ+ or not. If not, it jumps back to the original non-patched RgnBlt. That's my guess. Edit: confirmed, the call's location changes if the card is present.
Instructions Before the Artifacts Show Up
Screenshot from my phone of the instructions executed right before the artifact filled region appears on the screen. The operation in red is the one that looks like generates the blit.
Current Status
At this point it looks like it's an issue in the card. This issue happens with or without acceleration but only under 24 bit color. Given acceleration does not change the behavior, I believe something's going on with the SMT-02 chip, not the SQD-01 chip.
The PDQ+ board layout and design is extremely similar to the Spectrum 24 Series IV and Spectrum 24 Series V. I have mapped out a lot of those two boards (series IV and V). Based on that mapping, I don't really see anything that would be instruction specific with regards to traces on the video card.
I would not suspect a VRAM issue as everything seems fine except for things with the HiliteMode set.
Trying to figure out what could cause a single operation (that I'm aware of) to be busted like this. Next step, look through the patched RgnBlt and see if that gives me any insight.
Symptom:
Card works great except one issue: whenever you highlight any text, the highlighted area has artifacts displayed. Image of the issue happening regardless of the color chosen for the highlight color chosen in the Color control panel.
Basic Debugging Done (with no change in behavior):
- Tested in a IIci, IIfx, Quadra 700, same behavior.
- Tested in System 7.1.1 and System 7.5.5, same behavior.
- Tested using ROM version 1.292, 3.0, Thunder 3.1, same behavior.
- Tested using different versions of the SuperVideo control panel, same behavior.
- Tested on different monitors, same behavior.
- Tested with acceleration on the PDQ+ enabled/disabled, same behavior.
- Issue only happens in 24 bit color.
The above is a screenshot from the machine with the card in it. The fact that the artifacts are showing up in the screenshot suggests the artifacts are written to VRAM. So this does not seem to be an output issue (ie. not the DAC, etc).
What is the call that's causing it?
I wrote a simple program in an attempt to reproduce the issue, and I am able to reproduce 100% of the time using this program. So what is the call? It's an InvertRect call but ONLY when the HiliteMode bit is set. When this bit is set, special handling is done to utilize the selected highlight color.
The issue happens everywhere HiliteMode is used. This includes the Finder (while editing a file's name for example), in SimpleText (when you highlight text), in my test program (which actually is inverting a line of text rendered using DrawString by setting the HiliteMode bit and then calling InvertRect).
Current Test Setup
- Quadra 700 running System 7.5.5
- Primary Video: internal Quadra video outputting to Apple 13" monitor
- Secondary Video: Spectrum 24 PDQ+ with Thunder ROM 3.1 and SuperVideo 3.1 outputting to a second Apple 13" monitor
If I have my test window spanning both monitors and invoke the call to InvertRect+HiliteMode, I see the highlighted area with no artifacts on the internal video side but I see the highlighted area with artifacts on the PDQ+ side.
Stepped Through Debugger
I stepped through what's happening inside InvertRect with MacsBug for the following four scenarios:
a.) Internal Video and InvertRect without HiliteMode set
b.) Internal Video and InvertRect with HiliteMode set
c.) PDQ+ and InvertRect without HiliteMode set
d.) PDQ+ and InvertRect with HiliteMode set
All four paths end up calling RgnBlt but diverge after that.
For paths A and B which are for the internal video, once it calls RgnBlt I see it branch and go to a very different address range and continue there. The code path taken is slightly different depending on whether HiliteMode is set. But eventually it blits the image and all is good.
For paths C and D which are for the PDQ+, once it calls RgnBlt, it stays within the same general address range as the RgnBlt. The code path taken is different depending on whether HiliteMode is set. Path C (no HiliteMode) results in the correct image. But path D (HiliteMode) causes a render with artifacts.
My assumption here is that RgnBlt has been patched with the PDQ+ present in the machine. The first few instructions in the patch RgnBlt determine whether the device is the one with the PDQ+ or not. If not, it jumps back to the original non-patched RgnBlt. That's my guess. Edit: confirmed, the call's location changes if the card is present.
Instructions Before the Artifacts Show Up
Screenshot from my phone of the instructions executed right before the artifact filled region appears on the screen. The operation in red is the one that looks like generates the blit.
Current Status
At this point it looks like it's an issue in the card. This issue happens with or without acceleration but only under 24 bit color. Given acceleration does not change the behavior, I believe something's going on with the SMT-02 chip, not the SQD-01 chip.
The PDQ+ board layout and design is extremely similar to the Spectrum 24 Series IV and Spectrum 24 Series V. I have mapped out a lot of those two boards (series IV and V). Based on that mapping, I don't really see anything that would be instruction specific with regards to traces on the video card.
I would not suspect a VRAM issue as everything seems fine except for things with the HiliteMode set.
Trying to figure out what could cause a single operation (that I'm aware of) to be busted like this. Next step, look through the patched RgnBlt and see if that gives me any insight.
Last edited: