Libretro support

Rationale

It would be super cool to have Boytacean running on RetroArch. This should validate Boytacean as a proper library for Game Boy emulation that is both flexible and performant.

Description

It should be a question of integrating a series of input and display callbacks into the thing.

Source

The source code of the libretro can be found here https://github.com/libretro/libretro-common

Example

/// Tells the frontend which API version this [`Core`] implements.
#[no_mangle]
pub unsafe extern "C" fn retro_api_version() -> std::os::raw::c_uint {
    #[cfg(feature = "log")]
    log::trace!("retro_api_version()");

    RETRO_API_VERSION
}

from https://github.com/max-m/rust-libretro/blob/f8cb496b49b2debfbb5d7dd66893eb4dac35d145/rust-libretro/src/lib.rs#LL273

A very good example on how to put some data in the screen can be found in the samples repo here:

https://github.com/libretro/libretro-samples/blob/master/video/software/rendering_direct_to_vram/libretro-test.c

Another very good example implemented in C is the CHIP8 emulator JAXE - https://github.com/kurtjd/jaxe.

References

Edited by João Magalhães