Javanaise / mrboom-libretro

Mr.Boom is an 8 player Bomberman clone for RetroArch/Libretro
http://mrboom.mumblecore.org
MIT License
204 stars 61 forks source link

libretro-build-psp failing #86

Closed frranck closed 3 years ago

frranck commented 3 years ago

https://git.libretro.com/libretro/mrboom-libretro/-/pipelines/5106/failures

frranck commented 3 years ago

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

frranck commented 3 years ago

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

SimpleTease commented 3 years ago

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.

SimpleTease commented 3 years ago

Making good progress. Can likely solve this.

frranck commented 3 years ago

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...

frranck commented 3 years ago

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.

frranck commented 3 years ago

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

frranck commented 3 years ago

Oups I reverted the team thing instead of the victories?

frranck commented 3 years ago

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.

frranck commented 3 years ago

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

SimpleTease commented 3 years ago

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?

frranck commented 3 years ago

we can add extra variables in assembly too.

SimpleTease commented 3 years ago

Green checkmark. https://git.libretro.com/libretro/mrboom-libretro/-/pipelines/5188

frranck commented 3 years ago

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