mkst / sm64-port

My mirror of the sm64-port. You probably want to look at the 3DS port branch: https://github.com/mkst/sm64-port/tree/3ds-port
https://discord.gg/7bcNTPK
251 stars 34 forks source link

Cia build crashes on real hardware #41

Closed currall closed 4 years ago

currall commented 4 years ago

compiled latest build and it crashes. The 3dsx version works fine, but no option to use anti aliasing. Cia version also works on citra

mkst commented 4 years ago

Did you compile with ENABLE_N3DS_3D_MODE=1 ? AA is disabled when compiling with the 3D version as there's not enough RAM to create the top 2 frame-buffers + 1 for the bottom screen.

CIA crashing, not sure. You're the first to raise it. O3DS or N3DS?

currall commented 4 years ago

I have done builds with and without n3ds 3d mode, the latest being without.

It crashes on my new 3ds. When i launch it both screens are completely black and do nothing, home button doesnt work, only thing that works is rosalina menu and holding power button for 10 secs

dmbd2019 commented 4 years ago

I'm having the same issue. With CIA, the screen stays black. With 3DSX, I get a crash screen. I've tried both with and without 3D mode. I compiled using Ubuntu.

mkst commented 4 years ago

Just built the .3dsx this morning which worked fine:

$ sha256sum build/us_3ds/sm64.us.f3dex2e.3dsx
2cf55cf34912ede08049c4100ed3d694f279ab340916b7bafb18b41ed02c0f39  build/us_3ds/sm64.us.f3dex2e.3dsx

The .cia just black screens

$ sha256sum sm64.cia 
d0cb13afa70ab1b3ae0792baac114a56afe9e85a860d17beeb14ade6579e90c8  sm64.cia

I guess this is due to the audio changes, i.e. using the 3rd CPU.

When you get the crash screen is it because you first did a make and then did a make ENABLE_N3DS_3D_MODE ? You need to do a make clean between compiling with 3D mode otherwise, yes, it crashes out immediately.

currall commented 4 years ago

So i deleted the entire build folder and everything in it between compilations today. I then ran "make VERSION=us --jobs 4", with no patches (e.g. 60fps, puppycam etc.) . I tested both a 3dsx and cia.

The 3dsx worked perfectly with aa or 800px or both enabled. The cia version had a black screen.

kenelm-ng commented 4 years ago

I have the same issue, 3dsx version works fine with 800px + 3D enabled on my new 3ds xl, but the cia version just gave me a black screen and no button responded, I have to force the new 3ds xl to turn off by holding the power button. No patches applied.

JL2210 commented 4 years ago

I get a black screen on my N3DS XL as well, with all 3 patches applied. Same as others, I have to hold down the power button to turn off the console. When is this going to be fixed?

currall commented 4 years ago

I get a black screen on my N3DS XL as well, with all 3 patches applied. Same as others, I have to hold down the power button to turn off the console. When is this going to be fixed?

So I figured out the problem was in cxitool. Converting the .elf file to a CIA works perfectly, but using cxitool and any method of converting the cxi will result in black screen. I tried multiple versions of cxitool and they all got a black screen. This happens with no other 3dsx, but happens on every combination of patches in mario 64.

What I think is happening is there is some part of the mario 64 port independent of patches and compile flags which causes incompatiblities with whatever cxitool is doing. Best solution I have is Google elf to CIA converter, as there should be both a 3dsx and elf once compiled.

willowwizard commented 4 years ago

Can confirm, putting the elf binary into a CIA using makerom works fine. sm64-port-cia.zip Run ./build.sh <path to elf binary> (needs makerom to be in PATH)

mkst commented 4 years ago

@willowwizard is there anything copyright in that zip? the audio.wav doesnt make a sound on my laptop for some reason so I can't figure out if it's some Super Mario sound.

If it's all clean then I'll add the files to the repo and add an extra build parameter (e.g. make cia) that will execute makerom.

Thanks for your investigation too @currall.

willowwizard commented 4 years ago

@mkst No, there is no copyrighted material included. The icon and banner/.bnr files are generated with the PNGs and WAVs in the src directory using bannertool.

About the WAV file, it's meant to be the audio that plays when you select the game on the home screen. I didn't have any audio to use so this is just silence. If you want to replace it with something else, you'll have to use bannertool to recreate the .bnr file with the new .wav file.

mkst commented 4 years ago

@willowwizard Silence is great. I will raise an issue for a better icon/banner/audio - I lack the creative skills, but hopefully someone can contribute to add some polish to the port.

I'll also update the README with the additional steps to make the cia.

mkst commented 4 years ago

Closing via https://github.com/mkst/sm64-port/commit/da40a339572359ad07cfbc7d46b16e7e3738156b