diff --git a/Makefile.common b/Makefile.common index 9e4eb0a..45c6761 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1,7 +1,7 @@ INCFLAGS := -I$(CORE_DIR) \ -I$(CORE_DIR)/atari800/src \ - -I$(CORE_DIR)/libretro - + -I$(CORE_DIR)/libretro \ + -I$(CORE_DIR)/libretro/libco SOURCES_C := \ $(CORE_DIR)/libretro/libco/libco.c diff --git a/atari800/src/afile.c b/atari800/src/afile.c index a1c84a6..d4fe2e7 100644 --- a/atari800/src/afile.c +++ b/atari800/src/afile.c @@ -207,7 +207,9 @@ int AFILE_OpenFile(const char *filename, int reboot, int diskno, int readonly) return AFILE_ERROR; #else /* BASIC */ /* r > 0 */ -#ifndef ANDROID +//LIBRETRO HACK +//#ifndef ANDROID +#if !defined(ANDROID) || defined(__LIBRETRO__) CARTRIDGE_SetTypeAutoReboot(&CARTRIDGE_main, UI_SelectCartType(r)); #else return (r << 8) | AFILE_ROM; diff --git a/atari800/src/atari.c b/atari800/src/atari.c index 06b05e9..7dbb9d9 100644 --- a/atari800/src/atari.c +++ b/atari800/src/atari.c @@ -424,7 +424,9 @@ int Atari800_Initialise(int *argc, char *argv[]) } *argc = j; } -#ifndef ANDROID +//LIBRETRO HACK +//#ifndef ANDROID +#if !defined(ANDROID) || defined(__LIBRETRO__) got_config = CFG_LoadConfig(rtconfig_filename); #else got_config = TRUE; /* pretend we got a config file -- not needed in Android */ @@ -432,7 +434,13 @@ int Atari800_Initialise(int *argc, char *argv[]) /* try to find ROM images if the configuration file is not found or it does not specify some ROM paths (blank paths count as specified) */ -#ifndef ANDROID +//LIBRETRO HACK +//#ifndef ANDROID +#if !defined(ANDROID) || defined(__LIBRETRO__) +#if defined(__LIBRETRO__) && defined(ANDROID) +//FIXME USE RETROSYSDIR + SYSROM_FindInDir("/mnt/sdcard/atari800", TRUE); +#endif SYSROM_FindInDir(".", TRUE); /* current directory */ #if defined(unix) || defined(__unix__) || defined(__linux__) SYSROM_FindInDir("/usr/share/atari800", TRUE); diff --git a/libretro/core-mapper.c b/libretro/core-mapper.c index a483d68..2d02dc5 100644 --- a/libretro/core-mapper.c +++ b/libretro/core-mapper.c @@ -192,14 +192,18 @@ extern unsigned short int bmp[400*300]; extern unsigned atari_devices[ 2 ]; #include "pokeysnd.h" +extern int UI_is_active; void retro_sound_update() { int x,silent=POKEYSND_enable_new_pokey?24449:32768; + + if (! UI_is_active) { + POKEYSND_Process(SNDBUF,snd_sampler_pal*2); + for(x=0;x