(2012-12-08, 06:34)paendorz Wrote: Ok, grabbed the source and compiled it. (Win8/VS2012)
There seems to be some audio delay (about +1 sec or something like that) and the genesis-plus libretro port shows some weird colors.
RGB565 support for textures might not be available in XBMC - it is generally assumed by now that the libretro frontend supports either XRGB8888 (for 32bit color mode) or RGB565 (for 16bit color mode). A libretro port can choose either RGB565, XRGB8888 or RGB1555 as its preferred color format (the latter is deprecated though and will mostly always lead to color conversion, so it's discouraged to use this as anything other than a last resort). Catering to all of them is usually not done - if the preferred format 'fails' (ie. RGB565 or XRGB8888), then it would resort to RGB1555 - and you'd have to convert colors in your libretro frontend.
If RGB565 support is not available, you can 'revert' back to RGB1555 (the way it was before) by compiling - say - Genesis Plus GX without FRONTEND_SUPPORTS_RGB565 defined.
Be warned though - the entire reason we made this switch to RGB565 was because RGB565 is a native image/texture format on Android and other lower-specced systems - forcing RGB1555 on it led to internal color conversion and dreadful performance.
If the best performance possible is not a priority and XBMC runs in 32bit mode for its context and textures, you could resort to color conversion - maister made SSE-optimized code which could be reused if needed (and NEON possibly later for ARMv7a+ systems). To do that, you would have to implement your 'environ callback' to set the color format in such a way that RGB565 and/or XRGB888 are not supported if they're queried by the libretro frontend - then it would default to RGB1555.
If you guys need any help sorting this out me and maister would be glad to help.
As for audio delay - it smacks of A/V sync issues. Our input/audio/video drivers are optimized for games/emus - your drivers are probably optimized with movies in mind. We ran into similar issues when we tried to port FFmpeg/mplayer to libretro - we found that our frontend drivers were not really suitable for movies and were too game-specific - the reverse might be the case here. I guess what you could try in the interim is to fiddle around with audio/video latency - if that doesn't work you might have to look into making XBMC's video/audio drivers more suitable for realtime usecases.
Other things that could contribute to audio delay/latency on the audio front could be the audio resampler, float to int/integer to float conversion, and the like. Maister is pretty good at audio and has written Altivec/SSE/NEON-optimized resamplers and audio conversion routines.