Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions README.1ST
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
This Version includes an in-game mapping of SELECT and START keys to Joystick (XBox One Wireless) buttons.


The logging has been enhanced. A log file location can be configured.
An additional logging option in atari800.cfg can be used to find the right joystick button IDs to use.

Configuration:
Atari 800 Emulator, Version 3.1.0
LOGFILE=/home/retrouser/.emulationstation/atari800.log
LOG_DEBUG_SDL_BUTTONS=0 <-- put in "1" for log output of the pressed joystick buttons
...
...
SDL_JOY_0_SELECT=6 <-- these are my IDs for SELECT and START
SDL_JOY_0_START=7
...
...



RPI version for Atari 5200 emulation
------------------------------------

Expand Down
158 changes: 158 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
CC = gcc
RC = windres

DEFS = -DHAVE_CONFIG_H
LIBS = -lreadline -ltermcap -lm -lpng -lz -L/usr/lib/x86_64-linux-gnu -lSDL
TARGET_BASE_NAME = atari800
TARGET = $(TARGET_BASE_NAME)
CONFIGURE_TARGET =
CONFIGURE_HOST = linux
ifeq (linux, javanvm)
FINALTARGET = $(TARGET_BASE_NAME).jar
JAVAFLAGS =
JAVA = java
JAVACFLAGS =
JAVAC = javac
else
ifeq (,android)
FINALTARGET = android
else
FINALTARGET = $(TARGET)
endif
endif

CFLAGS = -O2 -Wall -ansi -pedantic -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Winline -Wredundant-decls -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
LDFLAGS =

INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} -s
INSTALL_DATA = ${INSTALL} -m 644

BIN_DIR = /usr/local/bin
MAN_DIR = /usr/local/share/man/man1
DOC_DIR = /usr/local/share/doc/atari800

DESTDIR =

OBJS = \
afile.o \
antic.o \
atari.o \
binload.o \
cartridge.o \
cassette.o \
compfile.o \
cfg.o \
cpu.o \
crc32.o \
devices.o \
emuos.o \
esc.o \
gtia.o \
img_tape.o \
log.o \
memory.o \
monitor.o \
pbi.o \
pia.o \
pokey.o \
rtime.o \
sio.o \
sysrom.o \
util.o \
sdl/init.o videomode.o sdl/main.o sdl/video.o sdl/video_sw.o sdl/input.o sdl/palette.o pbi_proto80.o af80.o input.o statesav.o ui_basic.o ui.o artifact.o colours.o colours_ntsc.o colours_pal.o colours_external.o screen.o cycle_map.o pbi_mio.o pbi_bb.o pbi_scsi.o sdl/sound.o pokeysnd.o mzpokeysnd.o remez.o sndsave.o sound.o pbi_xld.o voicebox.o votrax.o votraxsnd.o ide.o sdl/video_gl.o xep80.o xep80_fonts.o filter_ntsc.o atari_ntsc/atari_ntsc.o pal_blending.o



all: $(FINALTARGET)

# A special rule for SDL_win32_main.c to suppress warnings since this file is
# from SDL and should not have to be modified
SDL_win32_main.o: SDL_win32_main.c
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) -Wno-missing-declarations -Wno-missing-prototypes $<

# A special rule for win32 to not compile with -ansi -pedantic
win32/%.o: win32/%.c
$(CC) -c -o $@ $(DEFS) -I. $(patsubst -pedantic,,$(patsubst -ansi,,$(CFLAGS))) $<

ide.o: ide.c ide.h ide_internal.h
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS:-ansi=) $<

%.o: %.c
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) $<

%.ro: %.rc
$(RC) --define WIN32 --define __MINGW32__ --include-dir . $< $@

%.o: %.cpp
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) $<

%.o: %.S
$(CC) -c -o $@ $(DEFS) -I. $(CFLAGS) $<

ifeq ($(CONFIGURE_HOST),javanvm)
$(TARGET_BASE_NAME).class: javanvm/$(TARGET_BASE_NAME).java | $(TARGET_BASE_NAME)_runtime.class
$(JAVAC) -d . $(JAVACFLAGS) javanvm/$(TARGET_BASE_NAME).java
RUNTIME = _runtime
else
RUNTIME =
endif

$(TARGET_BASE_NAME)$(RUNTIME).class: $(TARGET)
#To compile using java bytecode directly:
# $(JAVA) $(JAVAFLAGS) org.ibex.nestedvm.Compiler -o UnixRuntime -outfile $@ $(TARGET_BASE_NAME)$(RUNTIME) $(TARGET)
$(JAVA) $(JAVAFLAGS) org.ibex.nestedvm.Compiler -o UnixRuntime -outformat javasource -outfile $(TARGET_BASE_NAME)$(RUNTIME).java $(TARGET_BASE_NAME)$(RUNTIME) $(TARGET)
$(JAVAC) -d . $(JAVACFLAGS) -J-Xmx256m $(TARGET_BASE_NAME)$(RUNTIME).java
##Also, -o UnixRuntime fixes directory browsing but requires /c:/-style paths

$(TARGET_BASE_NAME).jar: $(TARGET_BASE_NAME).class $(TARGET_BASE_NAME)$(RUNTIME).class
printf "Manifest-Version: 1.0\nMain-Class: $(TARGET_BASE_NAME)\nClass-Path: unix_runtime.jar\n" > .manifest
jar cfm $(TARGET_BASE_NAME).jar .manifest *.class

# Allow parallel execution in sub-make with '+'
android:
+ ndk-build -C android
ant -f android/build.xml debug
.PHONY: android

$(TARGET): $(OBJS)
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)

dep:
@if ! makedepend -Y $(DEFS) -I. ${OBJS:.o=.c} 2>/dev/null; \
then echo warning: makedepend failed; fi

clean:
rm -f *.o *.class .manifest $(TARGET) $(TARGET_BASE_NAME).jar $(TARGET_BASE_NAME)_runtime.java core *.bak *~
rm -f dos/*.o dos/*.bak dos/*~
rm -f falcon/*.o falcon/*.bak falcon/*~
rm -f sdl/*.o sdl/*.bak sdl/*~
rm -f win32/*.o win32/*.ro win32/*.bak win32/*~
rm -f javanvm/*.o javanvm/*.bak javanvm/*~
rm -f atari_ntsc/*.o atari_ntsc/*.bak atari_ntsc/*~
rm -rf android/libs android/obj android/bin android/gen


distclean: clean
-rm -f Makefile configure config.log config.status config.h android/jni/Android.mk
-rm -rf autom4te.cache

install: $(TARGET) installdirs
$(INSTALL_PROGRAM) $(TARGET) ${DESTDIR}${BIN_DIR}/$(TARGET)
$(INSTALL_DATA) atari800.man ${DESTDIR}${MAN_DIR}/atari800.1
# install also the documentation
$(INSTALL_DATA) ../COPYING ${DESTDIR}${DOC_DIR}/COPYING
$(INSTALL_DATA) ../README.1ST ${DESTDIR}${DOC_DIR}/README.1ST
$(INSTALL_DATA) ../DOC/README ${DESTDIR}${DOC_DIR}/README
$(INSTALL_DATA) ../DOC/INSTALL ${DESTDIR}${DOC_DIR}/INSTALL
$(INSTALL_DATA) ../DOC/USAGE ${DESTDIR}${DOC_DIR}/USAGE
$(INSTALL_DATA) ../DOC/NEWS ${DESTDIR}${DOC_DIR}/NEWS

readme.html: $(TARGET)
./$(TARGET) -help </dev/null | ../util/usage2html.pl \
../DOC/readme.html.in ../DOC/USAGE ./atari.h > $@

doc: readme.html

installdirs:
mkdir -p $(DESTDIR)$(BIN_DIR) $(DESTDIR)$(MAN_DIR) $(DESTDIR)$(DOC_DIR)
12 changes: 6 additions & 6 deletions src/af80.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int AF80_Initialise(int *argc, char *argv[])
else {
if (strcmp(argv[i], "-help") == 0) {
help_only = TRUE;
Log_print("\t-af80 Emulate the Austin Franklin 80 column board");
Log_println("\t-af80 Emulate the Austin Franklin 80 column board");
}
argv[j++] = argv[i];
}
Expand All @@ -137,29 +137,29 @@ int AF80_Initialise(int *argc, char *argv[])
return TRUE;

if (AF80_enabled) {
Log_print("Austin Franklin 80 enabled");
Log_println("Austin Franklin 80 enabled");
af80_rom = (UBYTE *)Util_malloc(0x1000);
if (!Atari800_LoadImage(af80_rom_filename, af80_rom, 0x1000)) {
free(af80_rom);
af80_rom = NULL;
AF80_enabled = FALSE;
Log_print("Couldn't load Austin Franklin ROM image");
Log_println("Couldn't load Austin Franklin ROM image");
return FALSE;
}
else {
Log_print("loaded Austin Franklin rom image");
Log_println("loaded Austin Franklin rom image");
}
af80_charset = (UBYTE *)Util_malloc(0x1000);
if (!Atari800_LoadImage(af80_charset_filename, af80_charset, 0x1000)) {
free(af80_charset);
free(af80_rom);
af80_charset = af80_rom = NULL;
AF80_enabled = FALSE;
Log_print("Couldn't load Austin Franklin charset image");
Log_println("Couldn't load Austin Franklin charset image");
return FALSE;
}
else {
Log_print("loaded Austin Franklin charset image");
Log_println("loaded Austin Franklin charset image");
}
af80_screen = (UBYTE *)Util_malloc(0x800);
af80_attrib = (UBYTE *)Util_malloc(0x800);
Expand Down
Binary file added src/af80.o
Binary file not shown.
Binary file added src/afile.o
Binary file not shown.
6 changes: 3 additions & 3 deletions src/antic.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,21 +956,21 @@ int ANTIC_Initialise(int *argc, char *argv[])
if (i_a) {
ANTIC_artif_mode = Util_sscandec(argv[++i]);
if (ANTIC_artif_mode < 0 || ANTIC_artif_mode > 4) {
Log_print("Invalid artifacting mode, using default.");
Log_println("Invalid artifacting mode, using default.");
ANTIC_artif_mode = 0;
}
}
else a_m = TRUE;
}
else {
if (strcmp(argv[i], "-help") == 0) {
Log_print("\t-artif <num> Set artifacting mode 0-4 (0 = disable)");
Log_println("\t-artif <num> Set artifacting mode 0-4 (0 = disable)");
}
argv[j++] = argv[i];
}

if (a_m) {
Log_print("Missing argument for '%s'", argv[i]);
Log_println("Missing argument for '%s'", argv[i]);
return FALSE;
}
}
Expand Down
Binary file added src/antic.o
Binary file not shown.
14 changes: 7 additions & 7 deletions src/artifact.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int ARTIFACT_Initialise(int *argc, char *argv[])
if (i_a) {
int idx = CFG_MatchTextParameter(argv[++i], mode_cfg_strings, ARTIFACT_SIZE);
if (idx < 0) {
Log_print("Invalid value for -ntsc-artif");
Log_println("Invalid value for -ntsc-artif");
return FALSE;
}
mode_ntsc = idx;
Expand All @@ -186,7 +186,7 @@ int ARTIFACT_Initialise(int *argc, char *argv[])
if (i_a) {
int idx = CFG_MatchTextParameter(argv[++i], mode_cfg_strings, ARTIFACT_SIZE);
if (idx < 0) {
Log_print("Invalid value for -pal-artif");
Log_println("Invalid value for -pal-artif");
return FALSE;
}
mode_pal = idx;
Expand All @@ -195,16 +195,16 @@ int ARTIFACT_Initialise(int *argc, char *argv[])

else {
if (strcmp(argv[i], "-help") == 0) {
Log_print("\t-ntsc-artif none|ntsc-old|ntsc-new|ntsc-full");
Log_print("\t Select video artifacts for NTSC");
Log_print("\t-pal-artif none|pal-simple|pal-accu");
Log_print("\t Select video artifacts for PAL");
Log_println("\t-ntsc-artif none|ntsc-old|ntsc-new|ntsc-full");
Log_println("\t Select video artifacts for NTSC");
Log_println("\t-pal-artif none|pal-simple|pal-accu");
Log_println("\t Select video artifacts for PAL");
}
argv[j++] = argv[i];
}

if (a_m) {
Log_print("Missing argument for '%s'", argv[i]);
Log_println("Missing argument for '%s'", argv[i]);
return FALSE;
}
}
Expand Down
Binary file added src/artifact.o
Binary file not shown.
Loading