Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphical Corruption with Rage 128 on B&W G3 #3

Closed
Compgeke opened this issue Jul 13, 2024 · 31 comments
Closed

Graphical Corruption with Rage 128 on B&W G3 #3

Compgeke opened this issue Jul 13, 2024 · 31 comments

Comments

@Compgeke
Copy link

Another fun not-Powerbook bug. The factory Rage 128 does not seem to be functioning as intended with the ATI driver support. The display has vertical lines through and text is both massive and wrapping. Image is attached.

G3_NT4_GraphicalCorruption
G3_NT4_GraphicalCorruption2

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

I'll reverse the OS9 driver for that card when I get time, to see if I'm missing anything in particular, but given that I don't have the hardware, there's only so much I'll be able to do.

What does open firmware fcode set up the card to be? I just blindly try to set 32bpp, so if some card comes up in 1024x768 and doesn't have enough vram to handle 32bpp in that resolution I'm sure there will be issues there.

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

(some reversing later)

...turns out the various MMIO registers are in totally different positions on these cards! no wonder the modeswitch isn't working correctly lol

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

Can you try the latest release? Hopefully it will at least try to modeswitch, but without having the hardware there's not much else I can suggest other than experimenting with the timing registers...

@Compgeke
Copy link
Author

No such luck, actually seems to have made it a bit worse. I'll see if I can poke around a bit later once I get some free time. If there's anything you'd like me to poke at with the real hardware I can definitely try.

G3_NT4_GraphicalCorruption_0 2

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

Can you try this? This adds a write to the hsync start/width register, which I only didn't implement because I observed no difference on lombard, but probably is important on desktops lol.

nt_arcfw_grackle_fwonly_test20240713_1731.zip

@Compgeke
Copy link
Author

Unfortunately no luck with that either, exact same thing.

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

Yeah, I just found out that the MMIO base address for the rage4 cards are at a different assigned-address.

Try this one.
nt_arcfw_grackle_fwonly_test20240713_1955.zip

@Compgeke
Copy link
Author

Good news, that one's actually improved it a bit! It's not 100% perfect but it's no longer wrapped, just blue and triplicated.

G3_NT4_GraphicalCorruption3

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

yeah, that's probably DSP timing issues...

can you try this one?

nt_arcfw_grackle_fwonly_test20240713_2005.zip

@Compgeke
Copy link
Author

Got the same result with it.

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

ok, so the hsync register doesn't matter it seems?

can you try this?

nt_arcfw_grackle_fwonly_test20240713_2013.zip

@Compgeke
Copy link
Author

With this version, we've got the same triplicating/blue lines but now the display's actually all black. No more readable text or anything.
G3_NT4_GraphicalCorruption4

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

ok, can you try this one? just want to see what it does when the DSP timing registers aren't touched:

nt_arcfw_grackle_fwonly_test20240713_2024.zip

@Compgeke
Copy link
Author

With that one back to the normal blue/triplicate stuff.

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

looking at the register documentation again, one of the DSP registers are slightly different on rage4, two of the fields changed positions.

try this one:

nt_arcfw_grackle_fwonly_test20240713_2037.zip

@Compgeke
Copy link
Author

This one's actually getting a bit closer. The entire display is now blue, although there's still broken text and some duplication.

G3_NT4_GraphicalCorruption5

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

ok, so it is DSP timing stuff...

just saw an issue with the DAC gamma table, so hopefully this at least fixes the colours:

nt_arcfw_grackle_fwonly_test20240713_2045.zip

@Compgeke
Copy link
Author

That is correct! Now have proper color.
G3_NT4_GraphicalCorruption6

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

ok, can you try this one?

nt_arcfw_grackle_fwonly_test20240713_2225.zip

@Compgeke
Copy link
Author

Getting closer. Now the colors are correct and the text is readable.
G3_NT4_GraphicalCorruption7

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

this is now just trial and error of dsp timing register changes and observing the output:

nt_arcfw_grackle_fwonly_test20240713_2239.zip

@Compgeke
Copy link
Author

This one lost the color lines, but we're back to the same missing text as the 2nd previous test.

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

@Compgeke
Copy link
Author

G3_NT4_GraphicalCorruption8

@Wack0
Copy link
Owner

Wack0 commented Jul 13, 2024

tried reimplementing how the linux driver sets the DSP timings, along with reimplementing how the OS9 driver gets the vclk

nt_arcfw_grackle_fwonly_test20240713_2331.zip

@Compgeke
Copy link
Author

Good news! That one's fixed it. We now have properly functioning Rage 128 graphics.
G3_NT4_GraphicalCorruption89

@JonObst
Copy link

JonObst commented Jul 14, 2024

With this latest test zip, NT bootloader freezes here during initial isntall:

image

Not sure if this was supposed to be a fully working ISO or if it has bits missing, apologies if it is the latter. Also I see that the instructions say to install "PowerMac General HID & Storage" but it appears to be named "ADB and USB" in this build.

@Compgeke
Copy link
Author

Just curious, did you get through the text-mode setup and all that jazz yet? I'm not able to actually make it through the setup at all, documented here: #5

@JonObst
Copy link

JonObst commented Jul 14, 2024

No, I only got as far as loading the drivers - I hadn't yet been asked to select a keyboard layout. Happy to turn this into a new issue or add to #5 to get it out of this now resolved topic.

@Wack0
Copy link
Owner

Wack0 commented Jul 14, 2024

OK, this crash on boot looks like HAL dying early. Possibly PCI related, which I tried to work around as I read somewhere that blindly enumerating the PCI bus on these systens can freeze, but I probably didn't do it right due to lack of real hardware to test with. Different issue anyway.

(And yes, the driver name is different, due to being my own test ISO rather than a properly cleaned up release build.)

Regarding this specific issue, I'll clean things up for commit and release later.

@Wack0
Copy link
Owner

Wack0 commented Jul 14, 2024

This is fixed by cc6fe49 although I'd rather wait to fix #8 before making another release. In any case, closing this issue now.

@Wack0 Wack0 closed this as completed Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants