VOGONS


First post, by realnc

User metadata
Rank Member
Rank
Member

On some platforms, current SVN fails to build with:

../src/hardware/mame/fmopl.cpp: In member function 'void {anonymous}::FM_OPL::WriteReg(int, int)':
../src/hardware/mame/fmopl.cpp:1735:50: error: invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive]
CH->SLOT[SLOT1].connect1 = CH->SLOT[SLOT1].CON ? &output[0] : &phase_modulation;
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hardware/mame/fmopl.cpp: In member function 'void {anonymous}::FM_OPL::postload()':
../src/hardware/mame/fmopl.cpp:1838:29: error: invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive]
SLOT.connect1 = SLOT.CON ? &output[0] : &phase_modulation;

Similar for src/hardware/mame/ymf262.cpp.

The attached patch fixes it.

Attachments

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hi,

Thank you for the report and fix.
Do you have any more info on which platforms/compilers ?

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 3, by realnc

User metadata
Rank Member
Rank
Member

It's the toolchain that comes with devkit pro. It's a GCC cross-compiler targeting PPC intended for homebrew development for various Nintendo devices (like GameCube.) Unfortunately, I don't know which version of GCC is in use in this particular case. It's a buildbot that compiles a dosbox core for libretro, but I couldn't find anyone who knows which particular version of GCC is used.

Reply 3 of 3, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

I remember seeing this in other wii homebrew projects, it's because devkitppc uses a broken newlib configuration that derives int32_t/uint32_t from long instead of int. The history involves newlib and gcc both using kludges to influence the other's behavior that led to it.