mirror of https://github.com/bsnes-emu/bsnes.git
Update to snes-20100807 release.
This represents a major code restructuring. The dot-based and scanline-based renderers are now split into two separate core libraries, asnes and bsnes. For now at least, these are -internal- names. I'm not entirely decided on how I'm going to handle releasing these two separate builds. Regardless, the folders need names. asnes has had all of the processor subfolders collapsed back into their parent folders. In other words, ppu's functions were moved into ppu/sppu, and then ppu was deleted, and then ppu/sppu became the new ppu. Repeat this for the cpu, smp and dsp and there you go. asnes/dsp also removed the DSP_STATE_MACHINE option. This was done for the sake of consistency with the rest of the core. asnes' debugger mode is currently extremely broken, but I will be fixing it in time. And for now, bsnes has kept the processor abstraction layer. I may keep it around, not sure yet. It doesn't hurt speed or anything, so I'm not too worried about making a decision right away. I may throw snesfilter, snesreader and supergameboy into this folder, just to have everything in one place. The alternate GUI forks are definitely going in there as dotnet, cocoa and python. Compiled output goes to the out/ folder now, to prevent conflicts with a file and folder named bsnes, for instance.
This commit is contained in:
parent
9ea739aec1
commit
81f43a4d01
|
@ -1,10 +1,11 @@
|
|||
include nall/Makefile
|
||||
ui := ui_qt
|
||||
snes := asnes
|
||||
ui := qt
|
||||
|
||||
# compiler
|
||||
c := $(compiler) -std=gnu99
|
||||
cpp := $(subst cc,++,$(compiler)) -std=gnu++0x
|
||||
flags := -O3 -fomit-frame-pointer -I.
|
||||
flags := -O3 -fomit-frame-pointer -I. -I$(snes)
|
||||
link :=
|
||||
objects :=
|
||||
|
||||
|
@ -43,7 +44,7 @@ compile = \
|
|||
|
||||
all: build;
|
||||
|
||||
include snes/Makefile
|
||||
include $(snes)/Makefile
|
||||
include $(ui)/Makefile
|
||||
|
||||
objects := $(patsubst %,obj/%.o,$(objects))
|
||||
|
@ -54,7 +55,7 @@ ifeq ($(platform),osx)
|
|||
test -d ../bsnes.app || mkdir -p ../bsnes.app/Contents/MacOS
|
||||
$(strip $(cpp) -o ../bsnes.app/Contents/MacOS/bsnes $(objects) $(link))
|
||||
else
|
||||
$(strip $(cpp) -o ../bsnes $(objects) $(link))
|
||||
$(strip $(cpp) -o out/$(snes) $(objects) $(link))
|
||||
endif
|
||||
|
||||
install:
|
||||
|
@ -84,4 +85,7 @@ clean: ui_clean
|
|||
-@$(call delete,*.pdb)
|
||||
-@$(call delete,*.manifest)
|
||||
|
||||
archive-all:
|
||||
tar -cjf snes-`date +%Y%m%d`.tar.bz2 asnes bsnes libco nall obj out qt ruby Makefile sync.sh
|
||||
|
||||
help:;
|
|
@ -0,0 +1,77 @@
|
|||
snes_objects := libco
|
||||
snes_objects += snes-system
|
||||
snes_objects += snes-cartridge snes-cheat
|
||||
snes_objects += snes-memory snes-cpucore snes-cpu snes-smpcore snes-smp snes-dsp snes-ppu
|
||||
snes_objects += snes-supergameboy snes-superfx snes-sa1
|
||||
snes_objects += snes-bsx snes-srtc snes-sdd1 snes-spc7110
|
||||
snes_objects += snes-cx4 snes-dsp1 snes-dsp2 snes-dsp3 snes-dsp4
|
||||
snes_objects += snes-obc1 snes-st0010 snes-st0011 snes-st0018
|
||||
snes_objects += snes-msu1 snes-serial
|
||||
objects += $(snes_objects)
|
||||
|
||||
obj/libco.o : libco/libco.c libco/*
|
||||
obj/libsnes.o: $(snes)/libsnes/libsnes.cpp $(snes)/libsnes/*
|
||||
|
||||
obj/snes-system.o : $(snes)/system/system.cpp $(call rwildcard,$(snes)/system/) $(call rwildcard,$(snes)/video/)
|
||||
obj/snes-memory.o : $(snes)/memory/memory.cpp $(snes)/memory/*
|
||||
obj/snes-cpucore.o : $(snes)/cpu/core/core.cpp $(call rwildcard,$(snes)/cpu/core/)
|
||||
obj/snes-cpu.o : $(snes)/cpu/cpu.cpp $(snes)/cpu/*
|
||||
obj/snes-smpcore.o : $(snes)/smp/core/core.cpp $(call rwildcard,$(snes)/smp/core/)
|
||||
obj/snes-smp.o : $(snes)/smp/smp.cpp $(snes)/smp/*
|
||||
obj/snes-dsp.o : $(snes)/dsp/dsp.cpp $(snes)/dsp/*
|
||||
obj/snes-ppu.o : $(snes)/ppu/ppu.cpp $(snes)/ppu/*
|
||||
obj/snes-cartridge.o: $(snes)/cartridge/cartridge.cpp $(snes)/cartridge/*
|
||||
obj/snes-cheat.o : $(snes)/cheat/cheat.cpp $(snes)/cheat/*
|
||||
|
||||
obj/snes-supergameboy.o: $(snes)/chip/supergameboy/supergameboy.cpp $(call rwildcard,$(snes)/chip/supergameboy/)
|
||||
obj/snes-superfx.o : $(snes)/chip/superfx/superfx.cpp $(call rwildcard,$(snes)/chip/superfx/)
|
||||
obj/snes-sa1.o : $(snes)/chip/sa1/sa1.cpp $(call rwildcard,$(snes)/chip/sa1/)
|
||||
obj/snes-bsx.o : $(snes)/chip/bsx/bsx.cpp $(snes)/chip/bsx/*
|
||||
obj/snes-srtc.o : $(snes)/chip/srtc/srtc.cpp $(snes)/chip/srtc/*
|
||||
obj/snes-sdd1.o : $(snes)/chip/sdd1/sdd1.cpp $(snes)/chip/sdd1/*
|
||||
obj/snes-spc7110.o : $(snes)/chip/spc7110/spc7110.cpp $(snes)/chip/spc7110/*
|
||||
obj/snes-cx4.o : $(snes)/chip/cx4/cx4.cpp $(snes)/chip/cx4/*
|
||||
obj/snes-dsp1.o : $(snes)/chip/dsp1/dsp1.cpp $(snes)/chip/dsp1/*
|
||||
obj/snes-dsp2.o : $(snes)/chip/dsp2/dsp2.cpp $(snes)/chip/dsp2/*
|
||||
obj/snes-dsp3.o : $(snes)/chip/dsp3/dsp3.cpp $(snes)/chip/dsp3/*
|
||||
obj/snes-dsp4.o : $(snes)/chip/dsp4/dsp4.cpp $(snes)/chip/dsp4/*
|
||||
obj/snes-obc1.o : $(snes)/chip/obc1/obc1.cpp $(snes)/chip/obc1/*
|
||||
obj/snes-st0010.o : $(snes)/chip/st0010/st0010.cpp $(snes)/chip/st0010/*
|
||||
obj/snes-st0011.o : $(snes)/chip/st0011/st0011.cpp $(snes)/chip/st0011/*
|
||||
obj/snes-st0018.o : $(snes)/chip/st0018/st0018.cpp $(snes)/chip/st0018/*
|
||||
obj/snes-msu1.o : $(snes)/chip/msu1/msu1.cpp $(snes)/chip/msu1/*
|
||||
obj/snes-serial.o : $(snes)/chip/serial/serial.cpp $(snes)/chip/serial/*
|
||||
|
||||
###########
|
||||
# library #
|
||||
###########
|
||||
|
||||
snes_objects := $(patsubst %,obj/%.o,$(snes_objects))
|
||||
|
||||
library: $(snes_objects) obj/libsnes.o
|
||||
ifeq ($(platform),x)
|
||||
ar rcs obj/libsnes.a $(snes_objects) obj/libsnes.o
|
||||
$(cpp) -o obj/libsnes.so -shared -Wl,-soname,libsnes.so.1 $(snes_objects) obj/libsnes.o
|
||||
else ifeq ($(platform),osx)
|
||||
ar rcs obj/libsnes.a $(snes_objects) obj/libsnes.o
|
||||
$(cpp) -o obj/libsnes.dylib -install_name @executable_path/../Libraries/libsnes.dylib -shared -dynamiclib $(snes_objects) obj/libsnes.o
|
||||
else ifeq ($(platform),win)
|
||||
$(cpp) -o obj/snes.dll -shared -Wl,--out-implib,libsnes.a $(snes_objects) obj/libsnes.o
|
||||
endif
|
||||
|
||||
library-install:
|
||||
ifeq ($(platform),x)
|
||||
install -D -m 755 obj/libsnes.a $(DESTDIR)$(prefix)/lib/libsnes.a
|
||||
install -D -m 755 obj/libsnes.so $(DESTDIR)$(prefix)/lib/libsnes.so
|
||||
ldconfig -n $(DESTDIR)$(prefix)/lib
|
||||
else ifeq ($(platform),osx)
|
||||
cp obj/libsnes.dylib /usr/local/lib/libsnes.dylib
|
||||
endif
|
||||
|
||||
library-uninstall:
|
||||
ifeq ($(platform),x)
|
||||
rm $(DESTDIR)$(prefix)/lib/libsnes.a
|
||||
rm $(DESTDIR)$(prefix)/lib/libsnes.so
|
||||
else ifeq ($(platform),osx)
|
||||
rm /usr/local/lib/libsnes.dylib
|
||||
endif
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#include <nall/crc32.hpp>
|
||||
#include <nall/sha256.hpp>
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define CHEAT_CPP
|
||||
namespace SNES {
|
|
@ -0,0 +1,8 @@
|
|||
#include <snes.hpp>
|
||||
|
||||
#define BSX_CPP
|
||||
namespace SNES {
|
||||
#include "bsx_base.cpp"
|
||||
#include "bsx_cart.cpp"
|
||||
#include "bsx_flash.cpp"
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
struct Coprocessor : Processor {
|
||||
alwaysinline void step(unsigned clocks);
|
||||
alwaysinline void synchronize_cpu();
|
||||
};
|
||||
|
||||
#include <chip/supergameboy/supergameboy.hpp>
|
||||
#include <chip/superfx/superfx.hpp>
|
||||
#include <chip/sa1/sa1.hpp>
|
||||
#include <chip/bsx/bsx.hpp>
|
||||
#include <chip/srtc/srtc.hpp>
|
||||
#include <chip/sdd1/sdd1.hpp>
|
||||
#include <chip/spc7110/spc7110.hpp>
|
||||
#include <chip/cx4/cx4.hpp>
|
||||
#include <chip/dsp1/dsp1.hpp>
|
||||
#include <chip/dsp2/dsp2.hpp>
|
||||
#include <chip/dsp3/dsp3.hpp>
|
||||
#include <chip/dsp4/dsp4.hpp>
|
||||
#include <chip/obc1/obc1.hpp>
|
||||
#include <chip/st0010/st0010.hpp>
|
||||
#include <chip/st0011/st0011.hpp>
|
||||
#include <chip/st0018/st0018.hpp>
|
||||
#include <chip/msu1/msu1.hpp>
|
||||
#include <chip/serial/serial.hpp>
|
||||
|
||||
void Coprocessor::step(unsigned clocks) {
|
||||
clock += clocks * (uint64)cpu.frequency;
|
||||
}
|
||||
|
||||
void Coprocessor::synchronize_cpu() {
|
||||
if(clock >= 0 && scheduler.sync != Scheduler::SynchronizeMode::All) co_switch(cpu.thread);
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
//Used in Rockman X2/X3 (Megaman X2/X3)
|
||||
//Portions (c) anomie, Overload, zsKnight, Nach, byuu
|
||||
|
||||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define CX4_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define DSP1_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define DSP2_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define DSP3_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define DSP4_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define MSU1_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define OBC1_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define SA1_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define SDD1_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define SERIAL_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define SPC7110_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define SRTC_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define ST0010_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define ST0011_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define ST0018_CPP
|
||||
namespace SNES {
|
|
@ -1,4 +1,4 @@
|
|||
#include <snes/snes.hpp>
|
||||
#include <snes.hpp>
|
||||
|
||||
#define SUPERFX_CPP
|
||||
namespace SNES {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue