Yeah. It's weird because I had this and it broke:Sour wrote:So you're saying adding a printf statement fixes the problem? That's never a good sign... FYI I have not tested the 32-bit builds of Mesen-S at all (libretro or not) - the way I setup the configuration between the UI and the core doesn't like the 32-bit builds, and I haven't had the time to either find a solution or implement a workaround. That being said, I don't see why this would fail in x86 but not x64...klurey wrote:And this behaves like expected:
Code: Select all
case 0x4219: case 0x421B: case 0x421D: case 0x421F:
printf("4129: %04x %04x %04x = %04x %04x %04xn",
(addr & 0x0E), (addr & 0x0E) - 8, ((addr & 0x0E) - 8) >> 1,
_controllerData[((addr & 0x0E) - 8) >> 1], _controllerData[((addr & 0x0E) - 8) >> 1] >> 8,
(uint8_t) (_controllerData[((addr & 0x0E) - 8) >> 1] >> 8)
);
return (uint8_t)(_controllerData[((addr & 0x0E) - 8) >> 1] >> 8);
Code: Select all
case 0x4219: case 0x421B: case 0x421D: case 0x421F:
printf("%04x: %04x %04x %04x = %04x %04x %04xn",
addr,
(addr & 0x0E), (addr & 0x0E) - 8, ((addr & 0x0E) - 8) >> 1,
_controllerData[((addr & 0x0E) - 8) >> 1], _controllerData[((addr & 0x0E) - 8) >> 1] >> 8,
(uint8_t) (_controllerData[((addr & 0x0E) - 8) >> 1] >> 8)
);
return (uint8_t)(_controllerData[((addr & 0x0E) - 8) >> 1] >> 8);
I also tried splitting the values and it still failed:
Code: Select all
addr = ((addr & 0x0E) - 8) >> 1;
return (uint8_t)(_controllerData[addr] >> 8);
If the buildbot had a 32-bit build, I could've just tried that since it's gcc built.