Some questions about Wii GX and RGB data or endianness (QuakeGX)

yummt

Member
OP
Newcomer
Joined
Mar 8, 2024
Messages
6
Trophies
0
Age
25
XP
52
Country
United States
Hello,

I've been working on the QuakeGX port and ported over some features from better engines such as HLBSP, Skybox, Fog(I have a lot of questions about fog but I'll save that for later) and now I'm working on porting colored lighting.

GitHub Link to my QuakeGX mod

It's been a process for me to port over these features, and along the way I encountered dealing with endianness of the Wii, I have never worked with a Big Endian machine so this was new to me.

It started with half life textures. At first they were red, I eventually realized the RGB values were flipped. So after flipping the rgb values the textures loaded properly. Then encountered the same problem with skyboxes. Every image I loaded into system memory had flipped RGB values. I was able to fix this by flipping the byte order of the entire image after it was loaded into memory.

Now, I'm working on porting .lit support to the engine, and expanding the white light to 3 color RGB. Behold, when I load a lit file and expand the color, the RGB values are flipped yet again.
However, this time I'm not able to flip them back for some reason. I've tried to reverse the byte order of the lit data,but that didn't do anything. I can't seem to extract the correct RGB values from the data, and I'm not sure where to begin. HalfLife lightmaps are also loading into memory incorrectly. I'm not sure if it's related to all of this.

My question is, why is this happening? Is it because of the endianness of the machine, or is it that Wii reads RGB as BGR somewhere in the pipeline?

Has anyone else encountered these issues? I can't find much of anything on the internet. I've researched the Wii as much as I possibly can, used multiple search engines, even found the sdk kit and read through documentation and examples there. At this point I'm stumped and just hoping someone else could have some more understanding of what's going on here. What gives..?

Thank you for taking the time to read this! Cheers.

Here are some before and after example images of what I did manage to fix.

image3.pngimage2.pngimage.pngimage-6.png

and here is the colored lighting bug:
image-2.png
 
Last edited by yummt,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    I've been taking fiber pills, eating more grapes, switched to wheat bread in hopes to lower it
    +1
  • BigOnYa @ BigOnYa:
    I like wheat bread, I even like the chunky wheat bread with pieces of whole grain in it.
  • K3Nv2 @ K3Nv2:
    Been getting this honey wheat bread from aldis pretty decent not very sweet to out do it
  • K3Nv2 @ K3Nv2:
    Me making any food at home is an improvement to how I use to be
    +1
  • BigOnYa @ BigOnYa:
    I have an bread machine and use it alot, better than breads you buy, but don't last as long, cause no bs preservatives
  • K3Nv2 @ K3Nv2:
    I got compliments about my weight loss and thought well guess I can pig out again now I'm the piggy
  • BigOnYa @ BigOnYa:
    My biggest prob is alcohol, definitely is fattening
  • K3Nv2 @ K3Nv2:
    I know when to stop at least honestly don't get those that go and go with food
  • BigOnYa @ BigOnYa:
    Or those that order 2 big macs , large fry, ice cream sundie, then a diet coke
  • K3Nv2 @ K3Nv2:
    I might get downing two big macs but nah that's it
  • BigOnYa @ BigOnYa:
    Ok that will be $15.99, cash or charge?
  • K3Nv2 @ K3Nv2:
    My go to orders usually a mcdouble and a mcchicken and I'm happy rarely mess with fries
  • K3Nv2 @ K3Nv2:
    Pro tip ask for that clowns jizzmac sauce on your mcdouble
    +1
  • BigOnYa @ BigOnYa:
    Do they charge extra when you add sauce,etc? I know burger king used to not, but don't know nowadays
  • K3Nv2 @ K3Nv2:
    They may squrit it for free if you ask nice
    +1
  • K3Nv2 @ K3Nv2:
    Last time I got bk it was 35c per sauce fuck you king of my nutsack
    +1
  • K3Nv2 @ K3Nv2:
    I'll buy a bottle of baby rays BBQ for $2 and add it from home out of spite
    +1
  • BigOnYa @ BigOnYa:
    I like baby rays, my favorite is KC masterpiece tho. Figured all you could buy is that there.
  • K3Nv2 @ K3Nv2:
    The metro doesn't discriminate good sauce
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Baby Rays isn't that what killed the crocodile hunter?
  • Psionic Roshambo @ Psionic Roshambo:
    If only he had done an endorsement for them....
  • Psionic Roshambo @ Psionic Roshambo:
    Oy mate don't let a bad bbq sauce kill your party! Baby Rays are killing it!! The flavor hits you right in the chest!
    +1
  • Xdqwerty @ Xdqwerty:
    My phone only has 13% battery so i don't have much time left
  • Xdqwerty @ Xdqwerty:
    Now 12%
  • BigOnYa @ BigOnYa:
    Happy birthday, btw
    BigOnYa @ BigOnYa: Happy birthday, btw