Welcome!

Final Burn Neo => FBN Development => Topic started by: barbudreadmon on May 22, 2018, 06:47:44 AM

Title: raiden2 driver issue in libretro-fbalpha Wii U (PowerPC Big Endian cpu)
Post by: barbudreadmon on May 22, 2018, 06:47:44 AM
Here is a screenshot from zeroteam on wii u : https://pasteboard.co/HmleZOq.jpg

I guess the same happens in raiden2 (i didn't get the confirmation yet).

Could it be a big endian issue ? It doesn't seem to happen in other systems involving the nec cpus.
Title: Re: raiden2 driver issue in libretro-fbalpha Wii U (PowerPC Big Endian cpu)
Post by: dink on May 22, 2018, 08:34:35 AM
Here is a screenshot from zeroteam on wii u : https://pasteboard.co/HmleZOq.jpg

I guess the same happens in raiden2 (i didn't get the confirmation yet).

Could it be a big endian issue ? It doesn't seem to happen in other systems involving the nec cpus.

Looks like it :)
Title: Re: raiden2 driver issue in libretro-fbalpha Wii U (PowerPC Big Endian cpu)
Post by: dink on May 22, 2018, 08:39:55 AM
Things to try: (find and replace)
draw_layer AND draw_txt_layer:
      INT32 attr = vram[offs];
change to:
      INT32 attr = BURN_ENDIAN_SWAP_INT16(vram[offs]);

draw_sprites:
...
change to:
Code: [Select]
INT32 tile_number = BURN_ENDIAN_SWAP_INT16(source[1]);
INT32 sx = BURN_ENDIAN_SWAP_INT16(source[2]);
INT32 sy = BURN_ENDIAN_SWAP_INT16(source[3]);
INT32 colr;
INT32 xtiles, ytiles;
INT32 ytlim, xtlim;
INT32 xflip, yflip;
INT32 xstep, ystep;
INT32 pri;

ytlim = (BURN_ENDIAN_SWAP_INT16(source[0]) >> 12) & 0x7;
xtlim = (BURN_ENDIAN_SWAP_INT16(source[0]) >> 8 ) & 0x7;

xflip = (BURN_ENDIAN_SWAP_INT16(source[0]) >> 15) & 0x1;
yflip = (BURN_ENDIAN_SWAP_INT16(source[0]) >> 11) & 0x1;

colr = BURN_ENDIAN_SWAP_INT16(source[0]) & 0x3f;

pri = (BURN_ENDIAN_SWAP_INT16(source[0]) >> 6) & 3;

best regards,
- dink