My homebrew game doesn't work! (Help needed)

All your homebrew software needs & discussion
Post Reply
Yoshimaster96
Posts: 17
Joined: Fri Jan 09, 2015 3:09 pm

My homebrew game doesn't work! (Help needed)

Post by Yoshimaster96 » Wed Jun 07, 2017 11:50 pm

The game I made doesn't work (at least in Dolphin 5.0), as it shows a black screen. Even changing the background color variable does nothing. What am I doing wrong?

Source code
User avatar
Aleron Ives
Posts: 90
Joined: Thu Oct 13, 2016 3:56 am
Location: California

Re: My homebrew game doesn't work! (Help needed)

Post by Aleron Ives » Thu Jun 08, 2017 2:38 am

Does it work on real hardware? If so, it's just an emulation bug, of which Dolphin has many.
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: My homebrew game doesn't work! (Help needed)

Post by tueidj » Thu Jun 08, 2017 5:54 am

You seem to be setting the vertex descriptors to GX_DIRECT but passing indices as data.
Yoshimaster96
Posts: 17
Joined: Fri Jan 09, 2015 3:09 pm

Re: My homebrew game doesn't work! (Help needed)

Post by Yoshimaster96 » Thu Jun 08, 2017 1:20 pm

Aleron Ives wrote:Does it work on real hardware? If so, it's just an emulation bug, of which Dolphin has many.
I am unable to test on real hardware.
tueidj wrote:You seem to be setting the vertex descriptors to GX_DIRECT but passing indices as data.
Still does nothing when changed to GX_INDEX16.
Yoshimaster96
Posts: 17
Joined: Fri Jan 09, 2015 3:09 pm

Re: My homebrew game doesn't work! (Help needed)

Post by Yoshimaster96 » Tue Jun 20, 2017 11:30 pm

Managed to install the Homebrew Channel on my Wii, and modified the code slightly to use Wii headers. And... yeah, it crashes my Wii.

Updated source code in first post by the way.
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: My homebrew game doesn't work! (Help needed)

Post by tueidj » Thu Jun 22, 2017 7:26 am

When reading the indices from face_bin[] you don't seem to be skipping over the first four bytes (the numFaces count).

The way you're loading the textures might not work because the pixel data needs to be 32-byte aligned.
Yoshimaster96
Posts: 17
Joined: Fri Jan 09, 2015 3:09 pm

Re: My homebrew game doesn't work! (Help needed)

Post by Yoshimaster96 » Sun Jun 25, 2017 7:33 pm

Fixed the alignment issue with __attribute__((align(32))), still crashes. I think it has something to do with the fancy stuff I'm doing with TEV stages and whatnot. Here's what Dolphin gives:

================

GFX FIFO: Unknown Opcode (0x4a @ 0x7f6369dfee01, preprocess=false).
This means one of the following:
* The emulated GPU got desynced, disabling dual core can help
* Command stream corrupted by some spurious memory bug
* This really is an unknown opcode (unlikely)
* Some other sort of bug

Further errors will be sent to the Video Backend log and
Dolphin will now likely crash or hang. Enjoy.

================

Illegal command 4a
CPBase: 0x0028ce80
CPEnd: 0x002cce60
CPHiWatermark: 0x0003c000
CPLoWatermark: 0x00020000
CPReadWriteDistance: 0x00000020
CPWritePointer: 0x0028dca0
CPReadPointer: 0x0028dc80
CPBreakpoint: 0x00000000
bFF_GPReadEnable: true
bFF_BPEnable: false
bFF_BPInt: false
bFF_Breakpoint: false
bFF_GPLinkEnable: true
bFF_HiWatermarkInt: true
bFF_LoWatermarkInt: false

================

An error occurred.

Line: 30
File: /build/dolphin-emu-l7HzRg/dolphin-emu-5.0+r1~30~ubuntu14.04.1/Source/Core/VideoCommon/VertexShaderGen.cpp

Ignore and continue?

================

The fact that VertexShaderGen.cpp was mentioned suggests that it fails when processing the TEV stages, direct and indirect TEXGENs, and/or other related things.
Post Reply