Skip to content

Commit d88ab20

Browse files
committed
(libretro) Hook currently broken mips3 x64 drc + some fixes
1 parent e64761f commit d88ab20

11 files changed

+687
-78
lines changed

makefile

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ INCLUDE_7Z_SUPPORT = 1
3939
# Include AVI recording support (uses Video For Windows)
4040
INCLUDE_AVI_RECORDING = 1
4141

42-
# Include Files that require C++11 (Killer Instinct, IDE module and MIPS3 core) - requires C++11 support
43-
INCLUDE_CPLUSPLUS11_FILES = 1
44-
4542
# Include symbols and other debug information in the executable
4643
#SYMBOL = 1
4744

makefile.burn_rules

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
alldir = burn burn/devices burn/snd burn/drv burn/drv/atari burn/drv/capcom burn/drv/cave burn/drv/coleco burn/drv/cps3 burn/drv/dataeast \
22
burn/drv/galaxian burn/drv/irem burn/drv/konami burn/drv/megadrive burn/drv/midway burn/drv/pce burn/drv/pst90s burn/drv/pre90s burn/drv/neogeo \
33
burn/drv/pgm burn/drv/psikyo burn/drv/sega burn/drv/sg1000 burn/drv/sms burn/drv/msx burn/drv/snes burn/drv/spectrum burn/drv/taito \
4-
burn/drv/toaplan cpu cpu/a68k cpu/arm cpu/arm7 cpu/h6280 cpu/hd6309 cpu/i8039 cpu/i8x41 cpu/i8051 cpu/adsp2100 cpu/konami cpu/m68k cpu/m6502 cpu/m6800 \
5-
cpu/m6805 cpu/m6809 cpu/nec cpu/pic16c5x cpu/s2650 cpu/tlcs90 cpu/sh2 cpu/tms32010 cpu/tms34010 cpu/upd7725 cpu/upd7810 cpu/v60 cpu/z80 cpu/z180
4+
burn/drv/toaplan cpu cpu/a68k cpu/arm cpu/arm7 cpu/h6280 cpu/hd6309 cpu/i8039 cpu/i8x41 cpu/i8051 cpu/adsp2100 cpu/konami cpu/mips3 cpu/m68k \
5+
cpu/m6502 cpu/m6800 cpu/m6805 cpu/m6809 cpu/nec cpu/pic16c5x cpu/s2650 cpu/tlcs90 cpu/sh2 cpu/tms32010 cpu/tms34010 cpu/upd7725 cpu/upd7810 \
6+
cpu/v60 cpu/z80 cpu/z180
67

78
drvsrc = d_arcadecl.cpp d_atarig1.cpp d_badlands.cpp d_batman.cpp d_blstroid.cpp d_eprom.cpp d_gauntlet.cpp d_klax.cpp d_offtwall.cpp d_rampart.cpp \
89
d_relief.cpp d_shuuz.cpp d_skullxbo.cpp d_thunderj.cpp d_toobin.cpp d_vindictr.cpp d_xybots.cpp \
@@ -31,7 +32,7 @@ drvsrc = d_arcadecl.cpp d_atarig1.cpp d_badlands.cpp d_batman.cpp d_blstroid.cp
3132
d_rollerg.o d_sbasketb.o d_scotrsht.o d_shaolins.o d_simpsons.o d_spy.o d_surpratk.o d_thunderx.o d_timeplt.o d_tmnt.o d_tp84.o d_trackfld.o \
3233
d_tutankhm.o d_twin16.o d_ultraman.o d_vendetta.o d_xexex.o d_xmen.o d_yiear.o \
3334
\
34-
d_tunit.o d_wunit.o \
35+
d_kinst.o d_tunit.o d_wunit.o \
3536
\
3637
d_neogeo.o \
3738
\
@@ -95,10 +96,6 @@ drvsrc = d_arcadecl.cpp d_atarig1.cpp d_badlands.cpp d_batman.cpp d_blstroid.cp
9596
\
9697
d_spectrum.o
9798

98-
ifdef INCLUDE_CPLUSPLUS11_FILES
99-
drvsrc += d_kinst.o
100-
endif
101-
10299
depobj = burn.o burn_bitmap.o burn_gun.o burn_led.o burn_shift.o burn_memory.o burn_pal.o burn_sound.o burn_sound_c.o cheat.o debug_track.o hiscore.o \
103100
load.o tilemap_generic.o tiles_generic.o timer.o vector.o \
104101
\
@@ -112,12 +109,15 @@ depobj = burn.o burn_bitmap.o burn_gun.o burn_led.o burn_shift.o burn_memory.o
112109
tms5110.o tms5220.o tms36xx.o phoenixsound.o pleiadssound.o pokey.o redbaron.o rf5c68.o saa1099.o samples.o segapcm.o sn76477.o sn76496.o \
113110
upd7759.o vlm5030.o wiping.o x1010.o ym2151.o ym2413.o ymdeltat.o ymf278b.o ymz280b.o snk6502_sound.o sp0250.o sp0256.o \
114111
\
115-
adsp2100.o adsp2100_intf.o arm7_intf.o arm_intf.o h6280_intf.o hd6309_intf.o konami_intf.o m6502_intf.o m6800_intf.o m6805_intf.o m6809_intf.o m68000_intf.o nec_intf.o \
116-
pic16c5x_intf.o s2650_intf.o tlcs90_intf.o tms34010.o tms34010_optable.o tms34010_intf.o z80_intf.o z180_intf.o \
112+
adsp2100.o adsp2100_intf.o arm7_intf.o arm_intf.o h6280_intf.o hd6309_intf.o konami_intf.o m6502_intf.o m6800_intf.o m6805_intf.o m6809_intf.o \
113+
m68000_intf.o mips3_intf.o nec_intf.o pic16c5x_intf.o s2650_intf.o tlcs90_intf.o tms34010.o tms34010_optable.o tms34010_intf.o z80_intf.o \
114+
z180_intf.o \
117115
\
118116
arm.o arm7.o h6280.o hd6309.o i8039.o i8x41.o mcs51.o konami.o m6502.o m6800.o m6805.o m6809.o nec.o pic16c5x.o s2650.o sh2.o tms32010.o tlcs90.o \
119117
upd7725.o upd7810.o v25.o v60.o z80.o z80daisy.o z180.o \
120118
\
119+
cop0.o cop1.o mips3.o \
120+
\
121121
cave.o cave_palette.o cave_sprite.o cave_tile.o \
122122
\
123123
cps2_crpt.o cps.o cps_config.o cps_draw.o cps_mem.o cps_obj.o cps_pal.o cps_run.o cps_rw.o cps_scr.o cpsr.o cpsrd.o cpst.o ctv.o fcrash_snd.o \
@@ -134,7 +134,7 @@ depobj = burn.o burn_bitmap.o burn_gun.o burn_led.o burn_shift.o burn_memory.o
134134
k007121.o k007342_k007420.o k051316.o k051733.o k051960.o k052109.o k053245.o k053247.o k053250.o k053251.o k053936.o k054000.o k054338.o \
135135
k055555.o k056832.o konamigx.o konamiic.o timeplt_snd.o \
136136
\
137-
dcs2k.o midwayic.o midtunit.o midwunit.o \
137+
dcs2k.o ide.o midwayic.o midtunit.o midwunit.o \
138138
\
139139
neo_decrypt.o neo_palette.o neo_run.o neo_sprite.o neo_text.o neo_upd4990a.o neogeo.o \
140140
\
@@ -168,12 +168,7 @@ ifdef BUILD_X86_ASM
168168
autobj += burn_sound_a.o
169169
endif
170170

171-
172-
ifdef INCLUDE_CPLUSPLUS11_FILES
173-
alldir += cpu/mips3
174-
depobj += ide.o cop0.o cop1.o mips3.o mips3_intf.o
175171
ifdef BUILD_X64_EXE
176172
alldir += cpu/mips3/x64
177173
depobj += mips3_x64.o
178-
endif
179174
endif

makefile.libretro

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ USE_SPEEDHACKS = 1
1111
EXTERNAL_ZLIB = 0
1212
INCLUDE_7Z_SUPPORT = 1
1313
PTR64 ?= 1
14-
INCLUDE_CPLUSPLUS11_FILES = 0
15-
BUILD_X64_EXE = 0
14+
# enable x86_64 dynarec, however it's not working properly atm
15+
USE_X64_DRC = 0
1616
AUTOGEN_DATS = 0
1717
HAVE_NEON = 0
1818
USE_EXPERIMENTAL_FLAGS = 0

makefile.libretro_common

+36-43
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,6 @@ ifeq ($(NO_NEOGEO), 1)
121121
NEOGEO_DIR :=
122122
endif
123123

124-
ifeq ($(INCLUDE_CPLUSPLUS11_FILES), 1)
125-
ifeq (,$(findstring msvc,$(platform)))
126-
CXXFLAGS += -std=gnu++11
127-
endif
128-
ifeq ($(BUILD_X64_EXE), 1)
129-
FBA_DEFINES += -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
130-
else
131-
MIPS3_X64_DYNAREC_DIR :=
132-
endif
133-
else
134-
ifeq (,$(findstring msvc,$(platform)))
135-
CXXFLAGS += -std=gnu++98
136-
endif
137-
MIPS3_X64_DYNAREC_DIR :=
138-
endif
139-
140124
FBA_BURN_DRIVERS_DIRS := $(CAPCOM_DIR) \
141125
$(ATARI_DIR) \
142126
$(FBA_BURN_DRIVERS_DIR)/cave \
@@ -185,7 +169,6 @@ FBA_CPU_DIRS := $(FBA_CPU_DIR) \
185169
$(FBA_CPU_DIR)/m6809 \
186170
$(M68K_DIR) \
187171
$(MIPS3_DIR) \
188-
$(MIPS3_X64_DYNAREC_DIR) \
189172
$(FBA_CPU_DIR)/nec \
190173
$(FBA_CPU_DIR)/pic16c5x \
191174
$(FBA_CPU_DIR)/s2650 \
@@ -203,31 +186,6 @@ FBA_INTERFACE_DIRS := $(FBA_INTERFACE_DIR)/audio
203186

204187
FBA_SRC_DIRS := $(FBA_BURNER_DIR) $(FBA_BURN_DIRS) $(FBA_CPU_DIRS) $(FBA_BURNER_DIRS) $(FBA_INTERFACE_DIRS)
205188

206-
ifeq ($(EXTERNAL_ZLIB), 1)
207-
FBA_DEFINES += -DEXTERNAL_ZLIB
208-
LDFLAGS += -lz
209-
else
210-
FBA_SRC_DIRS += $(FBA_LIB_DIR)/zlib
211-
endif
212-
213-
ifeq ($(INCLUDE_7Z_SUPPORT), 1)
214-
FBA_DEFINES += -DINCLUDE_7Z_SUPPORT
215-
FBA_SRC_DIRS += $(FBA_LIB_DIR)/lib7z
216-
BURN_BLACKLIST += $(FBA_LIB_DIR)/lib7z/LzFindMt.c \
217-
$(FBA_LIB_DIR)/lib7z/LzmaEnc.c \
218-
$(FBA_LIB_DIR)/lib7z/MtCoder.c \
219-
$(FBA_LIB_DIR)/lib7z/Lzma2Enc.c \
220-
$(FBA_LIB_DIR)/lib7z/Bcj2Enc.c \
221-
$(FBA_LIB_DIR)/lib7z/Threads.c \
222-
$(FBA_LIB_DIR)/lib7z/Lzma86Enc.c \
223-
$(FBA_LIB_DIR)/lib7z/LzmaLib.c \
224-
$(FBA_LIB_DIR)/lib7z/XzEnc.c
225-
else
226-
BURN_BLACKLIST += $(FBA_BURNER_DIR)/un7z.cpp
227-
endif
228-
229-
SOURCES_C += $(filter-out $(BURN_BLACKLIST),$(foreach dir,$(FBA_SRC_DIRS),$(wildcard $(dir)/*.c)))
230-
231189
ifneq ($(STATIC_LINKING), 1)
232190
SOURCES_C += $(LIBRETRO_COMM_DIR)/file/file_path.c \
233191
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
@@ -292,6 +250,18 @@ INCLUDE_DIRS := $(FBA_BURNER_DIR)/win32 \
292250

293251
ARM_FLAGS =
294252

253+
ifeq ($(USE_X64_DRC), 1)
254+
FBA_DEFINES += -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
255+
FBA_SRC_DIRS += $(MIPS3_X64_DYNAREC_DIR)
256+
ifeq (,$(findstring msvc,$(platform)))
257+
CXXFLAGS += -std=gnu++11
258+
endif
259+
else
260+
ifeq (,$(findstring msvc,$(platform)))
261+
CXXFLAGS += -std=gnu++98
262+
endif
263+
endif
264+
295265
ifeq ($(USE_CYCLONE), 1)
296266
FBA_DEFINES += -DUSE_CYCLONE
297267
INCLUDE_DIRS += $(FBA_CPU_DIR)/cyclone
@@ -309,7 +279,6 @@ ifeq ($(USE_CYCLONE), 1)
309279
CXXFLAGS += -fno-optimize-sibling-calls -funsafe-math-optimizations -fsingle-precision-constant
310280
else
311281
BURN_BLACKLIST += $(FBA_CPU_DIR)/c68000_intf.cpp
312-
SOURCES_S :=
313282
endif
314283

315284
NEON_FLAGS=
@@ -326,6 +295,30 @@ ifeq ($(HAVE_NEON), 1)
326295
SOURCES_S += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.S
327296
endif
328297

298+
ifeq ($(EXTERNAL_ZLIB), 1)
299+
FBA_DEFINES += -DEXTERNAL_ZLIB
300+
LDFLAGS += -lz
301+
else
302+
FBA_SRC_DIRS += $(FBA_LIB_DIR)/zlib
303+
endif
304+
305+
ifeq ($(INCLUDE_7Z_SUPPORT), 1)
306+
FBA_DEFINES += -DINCLUDE_7Z_SUPPORT
307+
FBA_SRC_DIRS += $(FBA_LIB_DIR)/lib7z
308+
BURN_BLACKLIST += $(FBA_LIB_DIR)/lib7z/LzFindMt.c \
309+
$(FBA_LIB_DIR)/lib7z/LzmaEnc.c \
310+
$(FBA_LIB_DIR)/lib7z/MtCoder.c \
311+
$(FBA_LIB_DIR)/lib7z/Lzma2Enc.c \
312+
$(FBA_LIB_DIR)/lib7z/Bcj2Enc.c \
313+
$(FBA_LIB_DIR)/lib7z/Threads.c \
314+
$(FBA_LIB_DIR)/lib7z/Lzma86Enc.c \
315+
$(FBA_LIB_DIR)/lib7z/LzmaLib.c \
316+
$(FBA_LIB_DIR)/lib7z/XzEnc.c
317+
else
318+
BURN_BLACKLIST += $(FBA_BURNER_DIR)/un7z.cpp
319+
endif
320+
321+
SOURCES_C += $(filter-out $(BURN_BLACKLIST),$(foreach dir,$(FBA_SRC_DIRS),$(wildcard $(dir)/*.c)))
329322
SOURCES_CXX += $(filter-out $(BURN_BLACKLIST),$(foreach dir,$(FBA_SRC_DIRS),$(wildcard $(dir)/*.cpp)))
330323
SOURCES_CXX += $(LIBRETRO_DIR)/libretro.cpp \
331324
$(LIBRETRO_DIR)/cd_emu.cpp \

makefile.mamemingw

+1-4
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,7 @@ ifdef BUILD_X86_ASM
240240
endif
241241

242242
ifdef BUILD_X64_EXE
243-
DEF := $(DEF) -DBUILD_X64_EXE
244-
ifdef INCLUDE_CPLUSPLUS11_FILES
245-
DEF := $(DEF) -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
246-
endif
243+
DEF := $(DEF) -DBUILD_X64_EXE -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
247244
endif
248245

249246
ifdef USE_SEGOE

makefile.mingw

+1-4
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,7 @@ ifdef BUILD_X86_ASM
351351
endif
352352

353353
ifdef BUILD_X64_EXE
354-
DEF := $(DEF) -DBUILD_X64_EXE
355-
ifdef INCLUDE_CPLUSPLUS11_FILES
356-
DEF := $(DEF) -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
357-
endif
354+
DEF := $(DEF) -DBUILD_X64_EXE -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
358355
endif
359356

360357
ifdef USE_SEGOE

0 commit comments

Comments
 (0)