From 43bcd26dca5a747953e3a3083d4d4b4bad8e1c7c Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Mon, 17 Dec 2012 19:55:41 -0500 Subject: Optimise for size. Allow the build process to use multiple CPU cores with make -jN. --- Makefile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 15964c3..cc24000 100644 --- a/Makefile +++ b/Makefile @@ -18,12 +18,11 @@ export OUTPUT := $(CURDIR)/$(TARGET) #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ - @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + $(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile #--------------------------------------------------------------------------------- clean: - @echo clean ... - @rm -fr $(BUILD) $(OUTPUT).plg + rm -fr $(BUILD) $(OUTPUT).plg #--------------------------------------------------------------------------------- @@ -59,8 +58,8 @@ EXTLIBS := $(DS2SDKPATH)/lib/libds2a.a INC := -I$(DS2SDKPATH)/include -I$(FS_DIR) -I$(CONSOLE_DIR) -I$(KEY_DIR) -I$(ZLIB_DIR) -CFLAGS := -mips32 -O3 -mno-abicalls -fno-pic -fno-builtin \ - -fno-exceptions -ffunction-sections -mlong-calls\ +CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ + -fno-exceptions -fno-function-sections -mlong-calls\ -fomit-frame-pointer -msoft-float -G 4 @@ -83,11 +82,12 @@ APP := sfc.elf all: $(APP) @echo $(INC) - $(OBJCOPY) -O binary $(APP) sfc.dat - $(OBJDUMP) -d $(APP) > sfc.dump - $(NM) $(APP) | sort > sfc.sym - $(OBJDUMP) -h $(APP) > sfc.map + $(OBJCOPY) -x -O binary $(APP) sfc.dat $(DS2SDKPATH)/tools/makeplug sfc.dat $(OUTPUT).plg +# but also, if you want to debug even more +# $(OBJDUMP) -d $(APP) > sfc.dump +# $(NM) $(APP) | sort > sfc.sym +# $(OBJDUMP) -h $(APP) > sfc.map $(APP): depend $(SOBJS) $(OBJS) $(STARTO) $(LINKS) $(EXTLIBS) $(CC) -nostdlib -static -T $(LINKS) -o $@ $(STARTO) $(SOBJS) $(OBJS) $(EXTLIBS) $(LIBS) @@ -111,10 +111,13 @@ clean: # depend: Makefile $(OBJS:.o=.c) $(SOBJS:.o=.S) -depend: Makefile +Makefile: depend + touch $@ + +depend: $(SSRC) $(SRC) $(CC) -MM $(CFLAGS) $(INC) $(SSRC) $(SRC) > $@ -sinclude depend +-include depend #1-1---------------------------------------------------------------------------- endif -- cgit v1.2.3 From 3b2e1bcf79e2592de9c6cd8138ade70917615083 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Mon, 17 Dec 2012 22:30:29 -0500 Subject: Makefile overhaul. --- Makefile | 202 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 97 insertions(+), 105 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cc24000..7cbb503 100644 --- a/Makefile +++ b/Makefile @@ -1,124 +1,116 @@ -#1-0---------------------------------------------------------------------------- - -DS2SDKPATH :=/opt/ds2sdk - -#The name final target -TARGET := CATSFC -#The directory where object files & intermediate files will be placed -BUILD := build - -#1-1---------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#------------------------------------------------------------------------------- - -export OUTPUT := $(CURDIR)/$(TARGET) - -.PHONY: $(BUILD) clean - -#--------------------------------------------------------------------------------- -$(BUILD): - @[ -d $@ ] || mkdir -p $@ - $(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile - -#--------------------------------------------------------------------------------- -clean: - rm -fr $(BUILD) $(OUTPUT).plg - -#--------------------------------------------------------------------------------- - -#1-1---------------------------------------------------------------------------- -else -#------------------------------------------------------------------------------- - -# CROSS :=# -CROSS := /opt/mipsel-4.1.2-nopic/bin/ - -CC = $(CROSS)mipsel-linux-gcc -AR = $(CROSS)mipsel-linux-ar rcsv -LD = $(CROSS)mipsel-linux-ld -OBJCOPY = $(CROSS)mipsel-linux-objcopy -NM = $(CROSS)mipsel-linux-nm -OBJDUMP = $(CROSS)mipsel-linux-objdump - -TOPDIR = ./.. -SFCDIR = $(TOPDIR)/source - -FS_DIR = $(DS2SDKPATH)/libsrc/fs -CONSOLE_DIR = $(DS2SDKPATH)/libsrc/console -KEY_DIR = $(DS2SDKPATH)/libsrc/key -ZLIB_DIR = $(DS2SDKPATH)/libsrc/zlib - -SRC := - - -SSRC := - -LIBS := $(DS2SDKPATH)/lib/libds2b.a -lc -lm -lgcc -EXTLIBS := $(DS2SDKPATH)/lib/libds2a.a - -INC := -I$(DS2SDKPATH)/include -I$(FS_DIR) -I$(CONSOLE_DIR) -I$(KEY_DIR) -I$(ZLIB_DIR) - +# - - - Modifiable paths - - - +DS2SDKPATH := /opt/ds2sdk +CROSS := /opt/mipsel-4.1.2-nopic/bin/mipsel-linux- + +# - - - Libraries and includes - - - +FS_DIR = $(DS2SDKPATH)/libsrc/fs +CONSOLE_DIR = $(DS2SDKPATH)/libsrc/console +KEY_DIR = $(DS2SDKPATH)/libsrc/key +ZLIB_DIR = $(DS2SDKPATH)/libsrc/zlib + +LIBS := $(DS2SDKPATH)/lib/libds2b.a -lc -lm -lgcc +EXTLIBS := $(DS2SDKPATH)/lib/libds2a.a + +INCLUDE := -Isource -Isource/unzip -Isource/nds -I$(DS2SDKPATH)/include \ + -I$(FS_DIR) -I$(CONSOLE_DIR) -I$(KEY_DIR) -I$(ZLIB_DIR) + +LINK_SPEC := $(DS2SDKPATH)/specs/link.xn +START_ASM := $(DS2SDKPATH)/specs/start.S +START_O := start.o + +# - - - Names - - - +OUTPUT := catsfc +PLUGIN_DIR := CATSFC + +# - - - Tools - - - +CC = $(CROSS)gcc +AR = $(CROSS)ar rcsv +LD = $(CROSS)ld +OBJCOPY = $(CROSS)objcopy +NM = $(CROSS)nm +OBJDUMP = $(CROSS)objdump + +# - - - Sources and objects - - - +C_SOURCES = source/unicode.c \ + source/unzip/explode.c source/unzip/unreduce.c \ + source/unzip/unshrink.c source/unzip/unzip.c \ + source/nds/bdf_font.c source/nds/bitmap.c source/nds/charsets.c \ + source/nds/draw.c source/nds/ds2_main.c source/nds/gcheat.c \ + source/nds/gui.c +CPP_SOURCES = source/apu.cpp source/apudebug.cpp source/c4.cpp \ + source/c4emu.cpp source/cheats2.cpp source/cheats.cpp \ + source/clip.cpp source/cpu.cpp source/cpuexec.cpp \ + source/cpuops.cpp source/data.cpp source/debug.cpp \ + source/dma.cpp source/dsp1.cpp \ + source/fxdbg.cpp source/fxemu.cpp source/fxinst.cpp \ + source/gfx.cpp source/globals.cpp source/loadzip.cpp \ + source/memmap.cpp source/movie.cpp source/netplay.cpp \ + source/obc1.cpp source/offsets.cpp source/ppu.cpp \ + source/sa1.cpp source/sa1cpu.cpp source/screenshot.cpp \ + source/sdd1.cpp source/sdd1emu.cpp source/server.cpp \ + source/seta010.cpp source/seta011.cpp source/seta018.cpp \ + source/seta.cpp source/snaporig.cpp source/snapshot.cpp \ + source/snes9x.cpp source/soundux.cpp \ + source/spc700.cpp source/spc7110.cpp \ + source/srtc.cpp \ + source/tile.cpp source/nds/cheats3.cpp \ + source/nds/displaymodes.cpp source/nds/entry.cpp +# spctool.cpp, sound.cpp, dsp* except dsp1.cpp, spc.cpp, spccycles.cpp have been deleted! +SOURCES = $(C_SOURCES) $(CPP_SOURCES) +C_OBJECTS = $(C_SOURCES:.c=.o) +CPP_OBJECTS = $(CPP_SOURCES:.cpp=.o) +OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS) + +# - - - Compilation flags - - - CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ - -fno-exceptions -fno-function-sections -mlong-calls\ - -fomit-frame-pointer -msoft-float -G 4 - - + -fno-exceptions -fno-function-sections -mlong-calls \ + -fomit-frame-pointer -msoft-float -G 4 -LINKS := $(DS2SDKPATH)/specs/link.xn -STARTS := $(DS2SDKPATH)/specs/start.S -STARTO := start.o +DEFS := -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \ + -DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \ + -DNO_INLINE_SET_GET -DNOASM -DHAVE_MKSTEMP '-DACCEPT_SIZE_T=size_t' \ + -DUNZIP_SUPPORT -include $(SFCDIR)/sfc.mk +.PHONY: clean makedirs +.SUFFIXES: .elf .dat .plg -OBJS := $(addsuffix .o , $(basename $(notdir $(SRC)))) -SOBJS := $(addsuffix .o , $(basename $(notdir $(SSRC)))) +all: $(OUTPUT).plg makedirs -# OBJS := $(SRC:.c=.o) -# SOBJS := $(SSRC:.S=.o) +# $< is the source (OUTPUT.dat); $@ is the target (OUTPUT.plg) +.dat.plg: + $(DS2SDKPATH)/tools/makeplug $< $@ +# $< is the source (OUTPUT.elf); $@ is the target (OUTPUT.dat) +.elf.dat: + $(OBJCOPY) -x -O binary $< $@ -APP := sfc.elf +$(OUTPUT).elf: Makefile $(OBJECTS) $(START_O) $(LINK_SPEC) $(EXTLIBS) + $(CC) -nostdlib -static -T $(LINK_SPEC) -o $@ $(START_O) $(OBJECTS) $(EXTLIBS) $(LIBS) +$(EXTLIBS): + $(MAKE) -C $(DS2SDKPATH)/source/ -all: $(APP) - @echo $(INC) - $(OBJCOPY) -x -O binary $(APP) sfc.dat - $(DS2SDKPATH)/tools/makeplug sfc.dat $(OUTPUT).plg -# but also, if you want to debug even more -# $(OBJDUMP) -d $(APP) > sfc.dump -# $(NM) $(APP) | sort > sfc.sym -# $(OBJDUMP) -h $(APP) > sfc.map +$(START_O): $(START_ASM) + $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< -$(APP): depend $(SOBJS) $(OBJS) $(STARTO) $(LINKS) $(EXTLIBS) - $(CC) -nostdlib -static -T $(LINKS) -o $@ $(STARTO) $(SOBJS) $(OBJS) $(EXTLIBS) $(LIBS) +makedirs: + -mkdir $(PLUGIN_DIR)/gamepak + -mkdir $(PLUGIN_DIR)/gamecht + -mkdir $(PLUGIN_DIR)/gamerts + -mkdir $(PLUGIN_DIR)/gamepic -$(EXTLIBS): - make -C $(DS2SDKPATH)/source/ - -$(STARTO): - $(CC) $(CFLAGS) $(INC) -o $@ -c $(STARTS) +clean: + -rm -rf $(OUTPUT).plg $(OUTPUT).dat $(OUTPUT).elf depend $(OBJECTS) .c.o: - $(CC) $(CFLAGS) $(INC) -o $@ -c $< + $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) -o $@ -c $< .cpp.o: - $(CC) $(CFLAGS) $(INC) -fno-rtti -o $@ -c $< -.S.o: - $(CC) $(CFLAGS) $(INC) -D_ASSEMBLER_ -D__ASSEMBLY__ -o $@ -c $< - -clean: - rm -fr *.o $(OBJS) $(OTHER) *.bin *.sym *.map *.dump *.lib - rm depend - -# depend: Makefile $(OBJS:.o=.c) $(SOBJS:.o=.S) + $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) -fno-rtti -o $@ -c $< Makefile: depend - touch $@ -depend: $(SSRC) $(SRC) - $(CC) -MM $(CFLAGS) $(INC) $(SSRC) $(SRC) > $@ +depend: $(SOURCES) + $(CC) -MM $(CFLAGS) $(INCLUDE) $(DEFS) $(SOURCES) > $@ + touch Makefile -include depend - -#1-1---------------------------------------------------------------------------- -endif -#------------------------------------------------------------------------------- -- cgit v1.2.3 From b935574e53ce56cc89691bfaff1905b0d1207739 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Mon, 17 Dec 2012 22:42:09 -0500 Subject: Remove more unneeded files. --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7cbb503..a972f16 100644 --- a/Makefile +++ b/Makefile @@ -50,12 +50,11 @@ CPP_SOURCES = source/apu.cpp source/apudebug.cpp source/c4.cpp \ source/sdd1.cpp source/sdd1emu.cpp source/server.cpp \ source/seta010.cpp source/seta011.cpp source/seta018.cpp \ source/seta.cpp source/snaporig.cpp source/snapshot.cpp \ - source/snes9x.cpp source/soundux.cpp \ + source/soundux.cpp \ source/spc700.cpp source/spc7110.cpp \ source/srtc.cpp \ source/tile.cpp source/nds/cheats3.cpp \ source/nds/displaymodes.cpp source/nds/entry.cpp -# spctool.cpp, sound.cpp, dsp* except dsp1.cpp, spc.cpp, spccycles.cpp have been deleted! SOURCES = $(C_SOURCES) $(CPP_SOURCES) C_OBJECTS = $(C_SOURCES:.c=.o) CPP_OBJECTS = $(CPP_SOURCES:.cpp=.o) -- cgit v1.2.3 From e708c127fa51beab567a9ce0e3ab53b58c997773 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Tue, 18 Dec 2012 22:53:49 -0500 Subject: Un-inline a bunch of stuff. With the MIPS instruction cache, this means that two consecutive SNES CPU instructions using e.g. the same addressing style or the same opcode have a chance that the second one will use the first one's code and that it will be cached. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a972f16..6bcaba6 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,8 @@ OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS) # - - - Compilation flags - - - CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ -fno-exceptions -fno-function-sections -mlong-calls \ - -fomit-frame-pointer -msoft-float -G 4 + -fomit-frame-pointer -msoft-float -G 4 \ + -fno-inline -fno-early-inlining DEFS := -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \ -DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \ -- cgit v1.2.3 From 6bab708c22e3c310d10a8f110161bf1691d01240 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Wed, 19 Dec 2012 00:28:32 -0500 Subject: Delete offsets.cpp, which is for a standalone tool that is unrelated to the emulator. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6bcaba6..590b482 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ CPP_SOURCES = source/apu.cpp source/apudebug.cpp source/c4.cpp \ source/fxdbg.cpp source/fxemu.cpp source/fxinst.cpp \ source/gfx.cpp source/globals.cpp source/loadzip.cpp \ source/memmap.cpp source/movie.cpp source/netplay.cpp \ - source/obc1.cpp source/offsets.cpp source/ppu.cpp \ + source/obc1.cpp source/ppu.cpp \ source/sa1.cpp source/sa1cpu.cpp source/screenshot.cpp \ source/sdd1.cpp source/sdd1emu.cpp source/server.cpp \ source/seta010.cpp source/seta011.cpp source/seta018.cpp \ @@ -100,7 +100,7 @@ makedirs: -mkdir $(PLUGIN_DIR)/gamepic clean: - -rm -rf $(OUTPUT).plg $(OUTPUT).dat $(OUTPUT).elf depend $(OBJECTS) + -rm -rf $(OUTPUT).plg $(OUTPUT).dat $(OUTPUT).elf depend $(OBJECTS) $(START_O) .c.o: $(CC) $(CFLAGS) $(INCLUDE) $(DEFS) -o $@ -c $< -- cgit v1.2.3 From 65b56543ab4bab2307fe3b29a15f43caaa88dfa1 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Wed, 19 Dec 2012 01:30:30 -0500 Subject: Raise the CPU's clock speed to 396 MHz while loading ROMs. Also raise the CPU's clock speed to 396 MHz by default, instead of 360 MHz, when emulating a ROM. --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 590b482..e4c6e45 100644 --- a/Makefile +++ b/Makefile @@ -62,9 +62,11 @@ OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS) # - - - Compilation flags - - - CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ - -fno-exceptions -fno-function-sections -mlong-calls \ + -fno-exceptions -ffunction-sections -mlong-calls \ -fomit-frame-pointer -msoft-float -G 4 \ - -fno-inline -fno-early-inlining + -fno-inline -fno-early-inlining \ + -fgcse-sm -fgcse-las -fgcse-after-reload \ + -fsched-spec-load -fsched-stalled-insns=0 -fweb DEFS := -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \ -DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \ -- cgit v1.2.3 From 83426640a6079021815e611ff0519d27ca3f9ce4 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Thu, 20 Dec 2012 02:01:07 -0500 Subject: Add back the -mlong-calls optimisation. It shortens the plugin's code a bit. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e4c6e45..6b05d8b 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS) # - - - Compilation flags - - - CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ - -fno-exceptions -ffunction-sections -mlong-calls \ + -fno-exceptions -ffunction-sections -mno-long-calls \ -fomit-frame-pointer -msoft-float -G 4 \ -fno-inline -fno-early-inlining \ -fgcse-sm -fgcse-las -fgcse-after-reload \ -- cgit v1.2.3 From 80858801300a2f48ad250721a79ebc7b1b0aba92 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Thu, 20 Dec 2012 18:10:38 -0500 Subject: Remove the SNES Open Bus behaviour by default. Also simplify translation again. SNES Open Bus is a quirk of the memory subsystem that allow reads of invalid addresses to return the last byte read from memory. However, it is seldom needed by a game, and it costs 1 to 3 MIPS instructions per SNES instruction to emulate. If you need SNES Open Bus, you can remove -DNO_OPEN_BUS from the Makefile. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6b05d8b..255cf39 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ DEFS := -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \ -DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \ -DNO_INLINE_SET_GET -DNOASM -DHAVE_MKSTEMP '-DACCEPT_SIZE_T=size_t' \ - -DUNZIP_SUPPORT + -DUNZIP_SUPPORT -DNO_OPEN_BUS .PHONY: clean makedirs .SUFFIXES: .elf .dat .plg -- cgit v1.2.3 From a0d0c5e7a5bdc396b4c370a750273b6e3b963bb0 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Fri, 21 Dec 2012 03:50:10 -0500 Subject: Eliminate the latency of button press recognition, which was bad enough to lose keys entirely sometimes, and could otherwise delay a button press or release by 200 ms. This was the entire reason I created the fork, and I finally did it! It syncs the controls every scanline of a frame, which costs about 60,000 MIPS instructions per frame to deal with. Luckily, the processor runs at 396 MHz, which means the cost of checking the controls is 1% of the CPU's power. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 255cf39..605d727 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ DEFS := -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \ -DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \ -DNO_INLINE_SET_GET -DNOASM -DHAVE_MKSTEMP '-DACCEPT_SIZE_T=size_t' \ - -DUNZIP_SUPPORT -DNO_OPEN_BUS + -DUNZIP_SUPPORT -DNO_OPEN_BUS -DSYNC_JOYPAD_AT_HBLANK .PHONY: clean makedirs .SUFFIXES: .elf .dat .plg -- cgit v1.2.3 From a194b850037c03f5fb3ac1ecc9f7a99f73b84104 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Sat, 22 Dec 2012 22:16:55 -0500 Subject: Preliminary Snes9x-based cheat code support. Not tested, because the file selection interface freezes when it gets to the folder containing Mightymo's cheat files, whereas it did not do this before with the converted Mightymo cheats. (335 files -> 679, though.) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 605d727..34a0148 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ CPP_SOURCES = source/apu.cpp source/apudebug.cpp source/c4.cpp \ source/soundux.cpp \ source/spc700.cpp source/spc7110.cpp \ source/srtc.cpp \ - source/tile.cpp source/nds/cheats3.cpp \ + source/tile.cpp \ source/nds/displaymodes.cpp source/nds/entry.cpp SOURCES = $(C_SOURCES) $(CPP_SOURCES) C_OBJECTS = $(C_SOURCES:.c=.o) -- cgit v1.2.3 From d1fe64aef0298514150e543b1b13fbf03f33c3e1 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Sun, 23 Dec 2012 16:13:54 -0500 Subject: Various optimisations in the CPU emulation. Run the opcode as a tail call from the address calculation. This cuts on the needed return instructions. Pass the opcode address as a parameter; this keeps it in a register most of the time and avoids memory stores. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 605d727..7243173 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS) CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \ -fno-exceptions -ffunction-sections -mno-long-calls \ -fomit-frame-pointer -msoft-float -G 4 \ - -fno-inline -fno-early-inlining \ + -fno-early-inlining \ -fgcse-sm -fgcse-las -fgcse-after-reload \ -fsched-spec-load -fsched-stalled-insns=0 -fweb -- cgit v1.2.3