From 16ac58b85c70c3998c02c65458983724e6a39e73 Mon Sep 17 00:00:00 2001 From: DirtBagXon Date: Wed, 21 Oct 2020 22:58:42 +0100 Subject: [PATCH] The correct fix for Badlands, that doesn't require global char reassignment https://retropie.org.uk/forum/topic/27426/request-add-daphne-singe-emulator/153 --- src/Makefile | 2 +- src/cpu/mc6809.cpp | 6 +++--- src/vldp2/Makefile.rp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index cd24ade..49cf1c1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -54,7 +54,7 @@ endif # Platform specific cflags defined in the Makefile.vars file -CFLAGS += ${PFLAGS} ${DEFINE_STATIC_VLDP} ${DEFINE_STATIC_SINGE} -Wall -fsigned-char +CFLAGS += ${PFLAGS} ${DEFINE_STATIC_VLDP} ${DEFINE_STATIC_SINGE} -Wall OBJS = ldp-out/*.o cpu/*.o game/*.o io/*.o timer/*.o ldp-in/*.o video/*.o \ sound/*.o daphne.o cpu/x86/*.o scoreboard/*.o ${SINGE_OBJS} ${VLDP_OBJS} diff --git a/src/cpu/mc6809.cpp b/src/cpu/mc6809.cpp index c85b2a6..01ae1bc 100644 --- a/src/cpu/mc6809.cpp +++ b/src/cpu/mc6809.cpp @@ -228,7 +228,7 @@ static unsigned char fetch_buffer[MC6809_FETCH_BUFFER_SIZE]; /* le caractère 8-bit du MC6809 impose l'utilisation de char pour la manipulation des opcodes qui sont des octets signés */ -static char *op; +static signed char *op; static int ad; static int *regist[4], *exreg[16]; static int illegal_instruction_flag; @@ -2010,7 +2010,7 @@ unsigned int mc6809_StepExec(unsigned int ncycles) /* on remplit le buffer de fetch */ FetchInstr(pc, fetch_buffer); - op=(char*) fetch_buffer; + op=(signed char*) fetch_buffer; /* on décode l'instruction */ r=(*(op++))&0xFF; @@ -2055,7 +2055,7 @@ int mc6809_TimeExec(mc6809_clock_t time_limit) /* on remplit le buffer de fetch */ FetchInstr(pc, fetch_buffer); - op=(char*) fetch_buffer; + op=(signed char*) fetch_buffer; /* on décode l'instruction */ r=(*(op++))&0xFF; diff --git a/src/vldp2/Makefile.rp b/src/vldp2/Makefile.rp index 3085d42..1203d51 100644 --- a/src/vldp2/Makefile.rp +++ b/src/vldp2/Makefile.rp @@ -1,7 +1,7 @@ # Makefile for VLDP2 # Written by Matt Ownby -CFLAGS += ${DFLAGS} -fPIC `sdl-config --cflags` -I./include -fsigned-char +CFLAGS += ${DFLAGS} -fPIC `sdl-config --cflags` -I./include LIBS = `sdl-config --libs` OBJS = vldp/vldp.o vldp/vldp_internal.o vldp/mpegscan.o \