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