DerKoun / bsnes-hd

bsnes fork that adds HD video features
GNU General Public License v3.0
626 stars 35 forks source link

Can't seem to compile on macOS/Clang #1

Closed Kaleidosium closed 5 years ago

Kaleidosium commented 5 years ago

I tried to compile this program on macOS, it seems to have some issues. Here's the output https://pastebin.com/raw/iyypKuCa

DerKoun commented 5 years ago

Thanks for reporting. If you can enable any verbose settings please do so and post the complete log? Also, can you compile the previous beta ( https://www.reddit.com/r/emulation/comments/bmc9t9/bsneshd_beta_5_bsnes_1073_formally_hd_mode_7_mod/ ) or vanilla bsnes 107r3 ( https://download.byuu.org/bsnes_v107r3-source.7z ) in the same environment? If so, a verbose log of these, to compare, may also help.

Kaleidosium commented 5 years ago

Here's the verbose output for Beta 6. Here's BSNES v107r3. Beta 5 is now broken on my machine for some reason, I guess this is a machine specific bug?

Screwtapello commented 5 years ago

See this Reddit comment

Kaleidosium commented 5 years ago

Thanks Screwtapello, unfortunately it gives me this error now

➜  bsnes git:(master) ✗ make
Compiling ../hiro/hiro.cpp ...
Compiling ../ruby/ruby.cpp ...
Compiling ../libco/libco.c ...
Compiling emulator/emulator.cpp ...
Compiling sfc/interface/interface.cpp ...
Compiling sfc/system/system.cpp ...
Compiling sfc/controller/controller.cpp ...
Compiling sfc/cartridge/cartridge.cpp ...
Compiling sfc/memory/memory.cpp ...
Compiling sfc/cpu/cpu.cpp ...
Compiling sfc/smp/smp.cpp ...
Compiling sfc/dsp/dsp.cpp ...
Compiling sfc/ppu/ppu.cpp ...
Compiling sfc/ppu-fast/ppu.cpp ...
In file included from sfc/ppu-fast/ppu.cpp:12:
sfc/ppu-fast/mode7hd.cpp:6:16: error: variable-sized object may not be
      initialized
  uint sampTmp[(256+2*ppufast.widescreen()) * 4 * scale/sampScale] = {};
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/sfc-ppu-fast.o] Error 1
DerKoun commented 5 years ago

Thanks @Screwtapello, we got significantly further. @IamRifki: Could you replace the offending line "mode7hd.cpp:6" (uint sampTmp[(256+2*ppufast.widescreen()) * 4 * scale/sampScale] = {};) with the following to see if it works? int sampSize = sampScale < 2 ? 0 : (256+2*ppufast.widescreen()) * 4 * scale/sampScale; uint *sampTmp = new uint[sampSize]; memory::fill<uint>(sampTmp, sampSize);

Kaleidosium commented 5 years ago

It compiled. bsnes-hd_beta6_macos.zip

DerKoun commented 5 years ago

added the binary to the release, thanks both fixes will be in the next beta

DerKoun commented 5 years ago

A quick macOS specific question: In Settings/Drivers: What video and audio output options do you have? thanks