Files
bsnes/snesreader/Makefile
Tim Allen a59ecb3dd4 Include all the code from the bsnes v068 tarball.
byuu describes the changes since v067:

This release officially introduces the accuracy and performance cores,
alongside the previously-existing compatibility core. The accuracy core
allows the most accurate SNES emulation ever seen, with every last
processor running at the lowest possible clock synchronization level.
The performance core allows slower computers the chance to finally use
bsnes. It is capable of attaining 60fps in standard games even on an
entry-level Intel Atom processor, commonly found in netbooks.

The accuracy core is absolutely not meant for casual gaming at all. It
is meant solely for getting as close to 100% perfection as possible, no
matter the cost to speed. It should only be used for testing,
development or debugging.

The compatibility core is identical to bsnes v067 and earlier, but is
now roughly 10% faster. This is the default and recommended core for
casual gaming.

The performance core contains an entirely new S-CPU core, with
range-tested IRQs; and uses blargg's heavily-optimized S-DSP core
directly. Although there are very minor accuracy tradeoffs to increase
speed, I am confident that the performance core is still more accurate
and compatible than any other SNES emulator. The S-CPU, S-SMP, S-DSP,
SuperFX and SA-1 processors are all clock-based, just as in the accuracy
and compatibility cores; and as always, there are zero game-specific
hacks. Its compatibility is still well above 99%, running even the most
challenging games flawlessly.

If you have held off from using bsnes in the past due to its system
requirements, please give the performance core a try. I think you will
be impressed. I'm also not finished: I believe performance can be
increased even further.

I would also strongly suggest Windows Vista and Windows 7 users to take
advantage of the new XAudio2 driver by OV2. Not only does it give you
a performance boost, it also lowers latency and provides better sound by
way of skipping an API emulation layer.

Changelog:
- Split core into three profiles: accuracy, compatibility and
  performance
- Accuracy core now takes advantage of variable-bitlength integers (eg
  uint24_t)
- Performance core uses a new S-CPU core, written from scratch for speed
- Performance core uses blargg's snes_dsp library for S-DSP emulation
- Binaries are now compiled using GCC 4.5
- Added a workaround in the SA-1 core for a bug in GCC 4.5+
- The clock-based S-PPU renderer has greatly improved OAM emulation;
  fixing Winter Gold and Megalomania rendering issues
- Corrected pseudo-hires color math in the clock-based S-PPU renderer;
  fixing Super Buster Bros backgrounds
- Fixed a clamping bug in the Cx4 16-bit triangle operation [Jonas
  Quinn]; fixing Mega Man X2 "gained weapon" star background effect
- Updated video renderer to properly handle mixed-resolution screens
  with interlace enabled; fixing Air Strike Patrol level briefing screen
- Added mightymo's 2010-08-19 cheat code pack
- Windows port: added XAudio2 output support [OV2]
- Source: major code restructuring; virtual base classes for processor
- cores removed, build system heavily modified, etc.
2010-10-20 22:30:34 +11:00

188 lines
5.5 KiB
Makefile
Executable File

include nall/Makefile
qtlibs := QtCore QtGui
include nall/qt/Makefile
c := $(compiler) -std=gnu99
cpp := $(subst cc,++,$(compiler)) -std=gnu++0x
flags := -O3 -I. -Iobj -fomit-frame-pointer
link :=
ifeq ($(platform),x)
flags := -fPIC $(flags)
link += -s
else ifeq ($(platform),osx)
flags := -fPIC $(flags)
endif
objects := snesreader
# fex
objects += Binary_Extractor blargg_common blargg_errors Data_Reader fex File_Extractor Gzip_Extractor Gzip_Reader Rar_Extractor Zip7_Extractor Zip_Extractor Zlib_Inflater
# zlib
objects += adler32 crc32 inffast inflate inftrees zutil
# 7-zip
objects += 7zAlloc 7zBuf 7zCrc 7zDecode 7zExtract 7zHeader 7zIn 7zItem 7zStream Bcj2 Bra86 LzmaDec
# unrar
objects += archive arcread coder crc encname extract getbits model rarvm rarvmtbl rawread suballoc unicode unpack unpack15 unpack20 unrar unrar_misc unrar_open
# micro-bunzip
objects += micro-bunzip
# jma
objects += jma jcrc32 lzmadecode 7zlzma iiostrm inbyte lzma winout
compile = \
$(strip \
$(if $(filter %.c,$<), \
$(c) $(flags) $1 -c $< -o $@, \
$(if $(filter %.cpp,$<), \
$(cpp) $(flags) $1 -c $< -o $@ \
) \
) \
)
%.o: $<; $(call compile)
all: build;
objects := $(patsubst %,obj/%.o,$(objects))
moc_headers := $(call rwildcard,./,%.moc.hpp)
moc_objects := $(foreach f,$(moc_headers),obj/$(notdir $(patsubst %.moc.hpp,%.moc,$f)))
# automatically run moc on all .moc.hpp (MOC header) files
%.moc: $<; $(moc) -i $< -o $@
# automatically generate %.moc build rules
__list = $(moc_headers)
$(foreach f,$(moc_objects), \
$(eval __file = $(word 1,$(__list))) \
$(eval __list = $(wordlist 2,$(words $(__list)),$(__list))) \
$(eval $f: $(__file)) \
)
##################
### snesreader ###
##################
obj/snesreader.o: snesreader.cpp *
$(call compile,$(qtinc))
###########
### fex ###
###########
obj/Binary_Extractor.o: fex/Binary_Extractor.cpp fex/*
obj/blargg_common.o : fex/blargg_common.cpp fex/*
obj/blargg_errors.o : fex/blargg_errors.cpp fex/*
obj/Data_Reader.o : fex/Data_Reader.cpp fex/*
obj/fex.o : fex/fex.cpp fex/*
obj/File_Extractor.o : fex/File_Extractor.cpp fex/*
obj/Gzip_Extractor.o : fex/Gzip_Extractor.cpp fex/*
obj/Gzip_Reader.o : fex/Gzip_Reader.cpp fex/*
obj/Rar_Extractor.o : fex/Rar_Extractor.cpp fex/*
obj/Zip7_Extractor.o : fex/Zip7_Extractor.cpp fex/*
obj/Zip_Extractor.o : fex/Zip_Extractor.cpp fex/*
obj/Zlib_Inflater.o : fex/Zlib_Inflater.cpp fex/*
############
### zlib ###
############
obj/adler32.o : zlib/adler32.c zlib/*
obj/crc32.o : zlib/crc32.c zlib/*
obj/inffast.o : zlib/inffast.c zlib/*
obj/inflate.o : zlib/inflate.c zlib/*
obj/inftrees.o: zlib/inftrees.c zlib/*
obj/zutil.o : zlib/zutil.c zlib/*
#############
### 7-zip ###
#############
obj/7zAlloc.o : 7z_C/7zAlloc.c 7z_C/*
obj/7zBuf.o : 7z_C/7zBuf.c 7z_C/*
obj/7zCrc.o : 7z_C/7zCrc.c 7z_C/*
obj/7zDecode.o : 7z_C/7zDecode.c 7z_C/*
obj/7zExtract.o: 7z_C/7zExtract.c 7z_C/*
obj/7zHeader.o : 7z_C/7zHeader.c 7z_C/*
obj/7zIn.o : 7z_C/7zIn.c 7z_C/*
obj/7zItem.o : 7z_C/7zItem.c 7z_C/*
obj/7zStream.o : 7z_C/7zStream.c 7z_C/*
obj/Bcj2.o : 7z_C/Bcj2.c 7z_C/*
obj/Bra86.o : 7z_C/Bra86.c 7z_C/*
obj/LzmaDec.o : 7z_C/LzmaDec.c 7z_C/*
####################
### micro-bunzip ###
####################
obj/micro-bunzip.o: micro-bunzip/micro-bunzip.c micro-bunzip/*
#############
### unrar ###
#############
obj/archive.o : unrar/archive.cpp unrar/*
obj/arcread.o : unrar/arcread.cpp unrar/*
obj/coder.o : unrar/coder.cpp unrar/*
obj/crc.o : unrar/crc.cpp unrar/*
obj/encname.o : unrar/encname.cpp unrar/*
obj/extract.o : unrar/extract.cpp unrar/*
obj/getbits.o : unrar/getbits.cpp unrar/*
obj/model.o : unrar/model.cpp unrar/*
obj/rarvm.o : unrar/rarvm.cpp unrar/*
obj/rarvmtbl.o : unrar/rarvmtbl.cpp unrar/*
obj/rawread.o : unrar/rawread.cpp unrar/*
obj/suballoc.o : unrar/suballoc.cpp unrar/*
obj/unicode.o : unrar/unicode.cpp unrar/*
obj/unpack.o : unrar/unpack.cpp unrar/*
obj/unpack15.o : unrar/unpack15.cpp unrar/*
obj/unpack20.o : unrar/unpack20.cpp unrar/*
obj/unrar.o : unrar/unrar.cpp unrar/*
obj/unrar_misc.o: unrar/unrar_misc.cpp unrar/*
obj/unrar_open.o: unrar/unrar_open.cpp unrar/*
##############
### libjma ###
##############
obj/jma.o : libjma/jma.cpp libjma/*
obj/jcrc32.o : libjma/jcrc32.cpp libjma/*
obj/lzmadecode.o: libjma/lzmadecode.cpp libjma/*
obj/7zlzma.o : libjma/7zlzma.cpp libjma/*
obj/iiostrm.o : libjma/iiostrm.cpp libjma/*
obj/inbyte.o : libjma/inbyte.cpp libjma/*
obj/lzma.o : libjma/lzma.cpp libjma/*
obj/winout.o : libjma/winout.cpp libjma/*
###############
### targets ###
###############
build: $(moc_objects) $(objects)
ifeq ($(platform),x)
ar rcs libsnesreader.a $(objects)
$(cpp) $(link) -o libsnesreader.so -shared -Wl,-soname,libsnesreader.so.1 $(objects) $(qtlib)
else ifeq ($(platform),osx)
ar rcs libsnesreader.a $(objects)
$(cpp) $(link) -o libsnesreader.dylib -shared -dynamiclib $(objects) $(qtlib)
else ifeq ($(platform),win)
$(cpp) $(link) -o snesreader.dll -shared -Wl,--out-implib,libsnesreader.a $(objects) $(qtlib)
endif
install:
ifeq ($(platform),x)
install -D -m 755 libsnesreader.a $(DESTDIR)$(prefix)/lib
install -D -m 755 libsnesreader.so $(DESTDIR)$(prefix)/lib
ldconfig -n $(DESTDIR)$(prefix)/lib
else ifeq ($(platform),osx)
cp libsnesreader.dylib /usr/local/lib/libsnesreader.dylib
endif
clean:
-@$(call delete,obj/*.o)
-@$(call delete,obj/*.moc)
-@$(call delete,libsnesreader.a)
-@$(call delete,libsnesreader.so)
-@$(call delete,libsnesreader.dylib)
-@$(call delete,snesreader.dll)