Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
efd5938
Update libretro-core.c
Pecusx Apr 15, 2021
d4f131e
Modified buttons names
Pecusx Apr 15, 2021
f429a38
Better buttons names.
Pecusx Apr 15, 2021
5a156a7
Third (final??) attemp at a new Virtual Keyboard (#75)
Pecusx May 29, 2021
99821b2
Fixed PS3/Psl1ght build (#72)
crystalct May 29, 2021
7154963
add retrofw target (#77)
Poligraf Aug 3, 2021
d351e51
retrofw target remove findstring (#78)
Poligraf Aug 5, 2021
e7ad1cd
(zlib) Cleanups
inactive123 Oct 3, 2021
a8f05a2
Add .rom to the list of valid extensions (#81)
phcoder Mar 27, 2022
f9b00cb
Attempt to fix Vita build - GIT_VERSION seems not defined for
LibretroAdmin May 27, 2022
602129c
Update .gitlab-ci.yml
LibretroAdmin Jul 26, 2022
88bc406
Don't use C++ linker
LibretroAdmin Jul 26, 2022
844273d
Fix first run crashing on Xbox One. Added savestate support. Rewind …
greenchili2 Jul 31, 2023
2ef38bb
use static_linking for emscripten platform (#89)
JoeOsborn Nov 1, 2023
968d8ff
added ToadKing libco support that fixes emscripten build (#90)
gitGalu Nov 14, 2023
05f2de3
Fix type to enable compilation (#92)
pstef May 18, 2024
72070dd
Attempt to improve types between audio_cb and Sound_Callback (#99)
pstef Jul 25, 2024
897b6a4
Add Joy 2B+ support (#103)
jfroco Sep 6, 2024
102a5d6
Update Makefile + Update Libco + Change paths from sd:/ to fs:/vol/ex…
Ploggy Sep 6, 2024
c721424
Update Atari 800 carts hashes (#104)
jfroco Sep 13, 2024
e7288f1
Add XEGS emulation and Start Core without content (#105)
jfroco Sep 24, 2024
ce1a8e6
Enhanced cart auto-detection and more (#106)
jfroco Oct 1, 2024
e606bfc
Fix iOS build (#107)
warmenhoven Oct 6, 2024
cdcef0b
ios/tvos: properly set min supported version (#108)
warmenhoven Oct 21, 2024
7a0d502
Add AltirraOS 3.41 ROMs and disable legacy config (#109)
jfroco Oct 31, 2024
5a407ad
Correct audio, video and SYSROM_B_NTSC (#115)
jfroco Dec 4, 2025
5b47cd1
chore: Update .gitignore to exclude build artifacts and auto-generate…
jcarr71 Dec 18, 2025
95f567b
chore: Add copilot instructions to .gitignore
jcarr71 Dec 19, 2025
fd136d3
chore: Add push instructions for upstream-ready branch
jcarr71 Jan 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .bash_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd /developer
make -f Makefile.libretro platform=wiiu -j3 DEBUG_ALLOW_DIRTY_SUBMODULES=1
make -f Makefile platform=wiiu -j3 DEBUG_ALLOW_DIRTY_SUBMODULES=1
make clean
make -f Makefile platform=wiiu -j3 DEBUG_ALLOW_DIRTY_SUBMODULES=1
exit
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,21 @@
*.dll
*.bc
*.a
# Build artifacts and intermediate files
*.exe
*.obj
build/
dist/
*.swp
*.swo

# Auto-generated documentation and build logs
AUDIT.md
NEXT_STEPS.md
BUILD_REPORT.md
CROSS_PLATFORM_BUILD_RESULTS.md
BUILD_VERIFICATION_REPORT.md
build_*.txt

# AI/Copilot instructions (local development)
.github/copilot-instructions.md
22 changes: 21 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ include:
# tvOS (AppleTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-arm64.yml'

# OpenDingux
- project: 'libretro-infrastructure/ci-templates'
file: '/dingux-mips32.yml'

# OpenDingux (ARM)
- project: 'libretro-infrastructure/ci-templates'
file: '/dingux-arm32.yml'

#################################### MISC ##################################

Expand Down Expand Up @@ -123,7 +131,7 @@ libretro-build-linux-i686:
# MacOS 64-bit
libretro-build-osx-x64:
extends:
- .libretro-osx-x64-make-default
- .libretro-osx-x64-make-10-7
- .core-defs

# MacOS ARM 64-bit
Expand Down Expand Up @@ -223,3 +231,15 @@ libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-retroarch-master
- .core-defs

# RetroFW
libretro-build-retrofw-mips32:
extends:
- .libretro-retrofw-mips32-make-default
- .core-defs

# Miyoo
libretro-build-miyoo-arm32:
extends:
- .libretro-miyoo-arm32-make-default
- .core-defs
66 changes: 47 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ else ifneq (,$(findstring ios,$(platform)))
fpic := -fPIC
SHARED := -dynamiclib
MINVERSION :=
CFLAGS += -Wno-error=implicit-function-declaration -DHAVE_POSIX_MEMALIGN -DIOS -marm
CFLAGS += -Wno-error=implicit-function-declaration -DHAVE_POSIX_MEMALIGN -DIOS

ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
Expand All @@ -116,9 +116,9 @@ ifeq ($(platform),$(filter $(platform),ios-arm64))
CC_AS = cc -arch arm64 -isysroot $(IOSSDK)
CXX = c++ -arch arm64 -isysroot $(IOSSDK)
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
CC_AS = cc -arch armv7 -isysroot $(IOSSDK)
CXX = c++ -arch armv7 -isysroot $(IOSSDK)
CC = cc -marm -arch armv7 -isysroot $(IOSSDK)
CC_AS = cc -marm -arch armv7 -isysroot $(IOSSDK)
CXX = c++ -marm -arch armv7 -isysroot $(IOSSDK)
endif

CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
Expand All @@ -129,6 +129,7 @@ else
MINVERSION = -miphoneos-version-min=5.0
endif
PLATFORM_DEFINES := $(MINVERSION) -DIOS
LDFLAGS += $(MINVERSION)

# tvOS
else ifeq ($(platform), tvos-arm64)
Expand All @@ -147,6 +148,9 @@ else ifeq ($(platform), tvos-arm64)
CXX = c++ -arch arm64 -isysroot $(IOSSDK)

CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
MINVERSION = -mappletvos-version-min=11.0
PLATFORM_DEFINES := $(MINVERSION)
LDFLAGS += $(MINVERSION)

# Theos
else ifeq ($(platform), theos_ios)
Expand All @@ -171,13 +175,17 @@ else ifeq ($(platform), qnx)
PLATFORM_DEFINES := -D__BLACKBERRY_QNX__ -fexceptions -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp

# Lightweight PS3 Homebrew SDK
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_psl1ght.a
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CC_AS = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
PLATFORM_DEFINES :=
else ifneq (,$(filter $(platform), ps3 psl1ght))
ifeq ($(platform), psl1ght)
PLATFORM_DEFINES := -D__PS3__ -D__PSLIGHT__
else
PLATFORM_DEFINES := -D__PS3__
endif
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
CC_AS = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
CXX = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)g++$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)ar$(EXE_EXT)
STATIC_LINKING = 1
HAVE_COMPAT = 1

Expand Down Expand Up @@ -242,16 +250,15 @@ else ifneq (,$(filter $(platform), ngc wii wiiu))
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
PLATFORM_DEFINES += -DGEKKO -mcpu=750 -meabi -mhard-float -DHAVE_STRTOF_L -DHAVE_LOCALE
PLATFORM_DEFINES += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int -D_GNU_SOURCE
STATIC_LINKING = 1
HAVE_COMPAT = 1
ifneq (,$(findstring wiiu,$(platform)))
CFLAGS += -DDEFAULT_CFG_NAME="\"sd:/retroarch/cores/system/atari800.cfg\""
PLATFORM_DEFINES += -DWIIU -DHW_RVL
CFLAGS += -DDEFAULT_CFG_NAME="\"fs:/vol/external01/retroarch/cores/system/atari800.cfg\""
PLATFORM_DEFINES += -DWIIU -DHW_RVL -ffunction-sections -fdata-sections -D__wiiu__ -D__wut__ -D_GNU_SOURCE
else ifneq (,$(findstring wii,$(platform)))
PLATFORM_DEFINES += -DHW_RVL -mrvl
PLATFORM_DEFINES += -DHW_RVL -mrvl -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int -D_GNU_SOURCE
else ifneq (,$(findstring ngc,$(platform)))
PLATFORM_DEFINES += -DHW_DOL -mrvl
PLATFORM_DEFINES += -DHW_DOL -mrvl -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int -D_GNU_SOURCE
endif

# Nintendo Switch (libnx)
Expand Down Expand Up @@ -342,9 +349,31 @@ else ifeq ($(platform), classic_armv8_a35)
LDFLAGS += -static-libgcc -static-libstdc++
#######################################

#RETROFW
else ifeq ($(platform), retrofw)
TARGET := $(TARGET_NAME)_libretro.so
CC = /opt/retrofw-toolchain/usr/bin/mipsel-linux-gcc
CXX = /opt/retrofw-toolchain/usr/bin/mipsel-linux-g++
AR = /opt/retrofw-toolchain/usr/bin/mipsel-linux-ar
fpic := -fPIC
SHARED := -shared -Wl,-version-script=link.T -Wl,-no-undefined
CFLAGS += -fomit-frame-pointer -march=mips32 -mtune=mips32 -mhard-float
PLATFORM_DEFINES += -DRETROFW

#MIYOO
else ifeq ($(platform), miyoo)
TARGET := $(TARGET_NAME)_libretro.so
CC = /opt/miyoo/usr/bin/arm-linux-gcc
CXX = /opt/miyoo/usr/bin/arm-linux-g++
AR = /opt/miyoo/usr/bin/arm-linux-ar
fpic := -fPIC
SHARED := -shared -Wl,-version-script=link.T -Wl,-no-undefined
CFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s

# emscripten
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
STATIC_LINKING=1
# cross Windows
else ifeq ($(platform), wincross64)
TARGET := $(TARGET_NAME)_libretro.dll
Expand Down Expand Up @@ -482,8 +511,7 @@ ifeq ($(LOG_PERFORMANCE), 1)
endif


DEFINES := -D__LIBRETRO__ $(PLATFORM_DEFINES) -DINLINE="inline"
DEFINES += -DHAVE_CONFIG_H
DEFINES := -D__LIBRETRO__ $(PLATFORM_DEFINES) -DINLINE="inline" -DHAVE_CONFIG_H

CFLAGS += $(fpic) $(DEFINES)
CFLAGS += -Wall
Expand Down Expand Up @@ -511,7 +539,7 @@ ifneq (,$(findstring msvc,$(platform)))
LINKOUT = -out:
LD = link.exe
else ifneq ($(platform),genode)
LD = $(CXX)
LD = $(CC)
endif

%.o: %.cpp
Expand Down
13 changes: 12 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ SOURCES_C := \
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
$(LIBRETRO_COMM_DIR)/file/file_path.c \
$(LIBRETRO_COMM_DIR)/file/file_path_io.c \
$(LIBRETRO_COMM_DIR)/streams/memory_stream.c \
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
$(LIBRETRO_COMM_DIR)/time/rtime.c \
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c

SOURCES_C += \
$(CORE_DIR)/libretro/carts_hash.c \
$(CORE_DIR)/libretro/libretro-core.c \
$(CORE_DIR)/libretro/core-mapper.c \
$(CORE_DIR)/libretro/graph.c \
$(CORE_DIR)/libretro/vkbd.c
$(CORE_DIR)/libretro/vkbd.c \
$(CORE_DIR)/libretro/retro_strings.c \
$(CORE_DIR)/libretro/retro_utils.c \
$(CORE_DIR)/libretro/retro_disk_control.c

SOURCES_C += \
$(CORE_DIR)/atari800/src/afile.c \
Expand Down Expand Up @@ -85,6 +90,12 @@ SOURCES_C += \
# $(CORE_DIR)/atari800/src/videomode.c\
# $(CORE_DIR)/atari800/src/pal_blending.c \

SOURCES_C += \
$(CORE_DIR)/atari800/src/roms/altirraos_xl.c \
$(CORE_DIR)/atari800/src/roms/altirraos_800.c \
$(CORE_DIR)/atari800/src/roms/altirra_basic.c \
$(CORE_DIR)/atari800/src/roms/altirra_5200_os.c

ZLIB_INCFLAGS = -I$(DEPS_DIR)/zlib
ZLIB_SOURCES_C = \
$(DEPS_DIR)/zlib/adler32.c \
Expand Down
17 changes: 16 additions & 1 deletion atari800/src/afile.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
#include <zlib.h>
#endif
#include <stdio.h>

#ifdef __LIBRETRO__
#include "crc32.h"
#include "carts_hash.h"
#endif

int AFILE_DetectFileType(const char *filename)
{
Expand All @@ -48,6 +51,18 @@ int AFILE_DetectFileType(const char *filename)
FILE *fp = fopen(filename, "rb");
if (fp == NULL)
return AFILE_ERROR;

#ifdef __LIBRETRO__
// False positives - hack for raw images
ULONG crc;
CRC32_FromFile(fp, &crc);
Util_rewind(fp);
if (is_cart(crc)) {
fclose(fp);
return AFILE_ROM;
}
#endif // __LIBRETRO__

if (fread(header, 1, 4, fp) != 4) {
fclose(fp);
return AFILE_ERROR;
Expand Down
11 changes: 10 additions & 1 deletion atari800/src/android/jni/jni.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,16 @@ static jint JNICALL NativeRunAtariProgram(JNIEnv *env, jobject this,
CARTRIDGE_MEGA_2048_DESC,
CARTRIDGE_THECART_32M_DESC,
CARTRIDGE_THECART_64M_DESC,
CARTRIDGE_XEGS_8F_64_DESC
CARTRIDGE_XEGS_8F_64_DESC,
CARTRIDGE_ATRAX_128_DESC,
CARTRIDGE_ADAWLIAH_32_DESC,
CARTRIDGE_ADAWLIAH_64_DESC,
CARTRIDGE_5200_SUPER_64_DESC,
CARTRIDGE_5200_SUPER_128_DESC,
CARTRIDGE_5200_SUPER_256_DESC,
CARTRIDGE_5200_SUPER_512_DESC,
CARTRIDGE_ATMAX_NEW_1024_DESC,
CARTRIDGE_5200_40_ALT_DESC
};

const jbyte *img_utf = NULL;
Expand Down
57 changes: 57 additions & 0 deletions atari800/src/antic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4085,6 +4085,63 @@ case we have ANTIC_cpu2antic_ptr[ANTIC_WSYNC_C+1]-1 = 8 and in the 2nd =12 */

#ifndef BASIC

#if defined(__LIBRETRO__)
void Retro_ANTIC_StateSave(void)
{
Retro_SaveUBYTE(&ANTIC_DMACTL, 1);
Retro_SaveUBYTE(&ANTIC_CHACTL, 1);
Retro_SaveUBYTE(&ANTIC_HSCROL, 1);
Retro_SaveUBYTE(&ANTIC_VSCROL, 1);
Retro_SaveUBYTE(&ANTIC_PMBASE, 1);
Retro_SaveUBYTE(&ANTIC_CHBASE, 1);
Retro_SaveUBYTE(&ANTIC_NMIEN, 1);
Retro_SaveUBYTE(&ANTIC_NMIST, 1);
Retro_SaveUBYTE(&IR, 1);
Retro_SaveUBYTE(&anticmode, 1);
Retro_SaveUBYTE(&dctr, 1);
Retro_SaveUBYTE(&lastline, 1);
Retro_SaveUBYTE(&need_dl, 1);
Retro_SaveUBYTE(&vscrol_off, 1);

Retro_SaveUWORD(&ANTIC_dlist, 1);
Retro_SaveUWORD(&screenaddr, 1);

Retro_SaveINT(&ANTIC_xpos, 1);
Retro_SaveINT(&ANTIC_xpos_limit, 1);
Retro_SaveINT(&ANTIC_ypos, 1);
}

void Retro_ANTIC_StateRead(void)
{
Retro_ReadUBYTE(&ANTIC_DMACTL, 1);
Retro_ReadUBYTE(&ANTIC_CHACTL, 1);
Retro_ReadUBYTE(&ANTIC_HSCROL, 1);
Retro_ReadUBYTE(&ANTIC_VSCROL, 1);
Retro_ReadUBYTE(&ANTIC_PMBASE, 1);
Retro_ReadUBYTE(&ANTIC_CHBASE, 1);
Retro_ReadUBYTE(&ANTIC_NMIEN, 1);
Retro_ReadUBYTE(&ANTIC_NMIST, 1);
Retro_ReadUBYTE(&IR, 1);
Retro_ReadUBYTE(&anticmode, 1);
Retro_ReadUBYTE(&dctr, 1);
Retro_ReadUBYTE(&lastline, 1);
Retro_ReadUBYTE(&need_dl, 1);
Retro_ReadUBYTE(&vscrol_off, 1);

Retro_ReadUWORD(&ANTIC_dlist, 1);
Retro_ReadUWORD(&screenaddr, 1);

Retro_ReadINT(&ANTIC_xpos, 1);
Retro_ReadINT(&ANTIC_xpos_limit, 1);
Retro_ReadINT(&ANTIC_ypos, 1);

ANTIC_PutByte(ANTIC_OFFSET_DMACTL, ANTIC_DMACTL);
ANTIC_PutByte(ANTIC_OFFSET_CHACTL, ANTIC_CHACTL);
ANTIC_PutByte(ANTIC_OFFSET_PMBASE, ANTIC_PMBASE);
ANTIC_PutByte(ANTIC_OFFSET_CHBASE, ANTIC_CHBASE);
}
#endif /* __LIBRETRO__ */

void ANTIC_StateSave(void)
{
StateSav_SaveUBYTE(&ANTIC_DMACTL, 1);
Expand Down
5 changes: 5 additions & 0 deletions atari800/src/antic.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ void ANTIC_SetPrior(UBYTE prior);
void ANTIC_StateSave(void);
void ANTIC_StateRead(void);

#if defined(__LIBRETRO__)
void Retro_ANTIC_StateSave(void);
void Retro_ANTIC_StateRead(void);
#endif

/* Pointer to 16 KB seen by ANTIC in 0x4000-0x7fff.
If it's the same what the CPU sees (and what's in memory[0x4000..0x7fff],
then NULL. */
Expand Down
Loading