Author Topic: raiden2 driver issue in libretro-fbalpha Wii U (PowerPC Big Endian cpu)  (Read 3766 times)

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1091
  • Karma: +59/-1
  • Helper
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.

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
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 :)

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
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