Javanaise/mrboom-libretro

libretro-build-psp failing

frranck opened this issue · 14 comments

seems it's connected with the victories... @SimpleTease

btw we need to be carefull with casting not to break the high endian platforms...

Using some unaligned structs to get by compiler, but big-endian (Gamecube) is not working correctly. Might be better to revert until / if it gets sorted.

Making good progress. Can likely solve this.

OK I will revert.
I think the best solution would be to patch the real assembly code, then I run asm2c. It shouldn't be hard now since you know what to do...

I mean it's fine to add a C function and do some goto but manipulating pointers data from the assembly in C seems like a bad idea.

I can do the asm2c conversion, simply post the assembly you would change here
https://github.com/bparker06/mrboom30/blob/master/BOMB.INC#L3859

Oups I reverted the team thing instead of the victories?

I reverted the revert for the team and reverted the victories. You should check if I didn't get the changes in MrboomHelper.cpp wrong.

OK got pretty confused, is this code the victories then? https://github.com/bparker06/mrboom30/blob/master/BOMB.INC#L3859

That asm is the routine. I boiled it down to this so far. Still mucky but works on Gamecube and PSP compiles.

dd victorySpritePtr;

victorySpritePtr = (dd)&m + (dd)m.liste_couleur[victoryPlayer];

((unaligned_dd_t*)(m.donnee4 + (9*4+4*0)))->value = m.ooo546[victoryPlayer] + (dd)read_dw(victorySpritePtr+0);
((unaligned_dd_t*)(m.donnee4 + (9*4+4*1)))->value = m.ooo546[victoryPlayer] + (dd)read_dw(victorySpritePtr+2);
((unaligned_dd_t*)(m.donnee4 + (9*4+4*2)))->value = m.ooo546[victoryPlayer] + (dd)read_dw(victorySpritePtr+4);
((unaligned_dd_t*)(m.donnee4 + (9*4+4*3)))->value = m.ooo546[victoryPlayer] + (dd)read_dw(victorySpritePtr+6);

*(m.donnee4 + (9*4+4*4) +0) = (db)m.dummy1392[victoryPlayer];
*(m.donnee4 + (9*4+4*4) +1) = (db)m.dummy1393[victoryPlayer];

With ASM code, where would I handle the extra temporary values like the victoryPlayer lcv and victoryNumWinners?

we can add extra variables in assembly too.

btw I will release a version soon, to be safe with the Debian freeze that happens mid January.