mirror of https://github.com/bsnes-emu/bsnes.git
Update to v087r04 release.
byuu says: Changelog: - gameboy/ -> gb/ - GameBoy -> GB - basic memory map for GBA - enough code to execute the first BIOS instruction (b 0x68) I have the code resetting r(15) to 0 on an exception just as a test. Since that flushes the pipeline, that means we're basically executing "b 0x68" at 8MHz, and nothing else. ... and I am getting __6 motherfucking FPS__ at 4.4GHz on an i7. Something is seriously, horribly, unfuckingbelievably wrong here, and I can't figure out what it is. My *fully complete* ARM core on the ST018 is even less efficient and runs at 21.47MHz, and yet I get 60fps even after emulating the SNES CPU+PPU @ 10+MHz each as well. ... I'm stuck. I can't proceed until we figure out what in the holy fuck is going on here. So ... if anyone can help, please do. If we can't fix this, the GBA emulation is dead. I was able to profile on Windows, and I've included that in this WIP under out/log.txt. But it looks normal to me. But yeah, there's NO. FUCKING. WAY. This code should be running this slowly.
This commit is contained in:
parent
8db134843f
commit
0f54be93b7
|
@ -1,18 +0,0 @@
|
||||||
options += gameboy
|
|
||||||
|
|
||||||
gameboy_objects := gameboy-interface gameboy-system gameboy-scheduler
|
|
||||||
gameboy_objects += gameboy-memory gameboy-cartridge
|
|
||||||
gameboy_objects += gameboy-cpu gameboy-apu gameboy-lcd
|
|
||||||
gameboy_objects += gameboy-cheat gameboy-video
|
|
||||||
objects += $(gameboy_objects)
|
|
||||||
|
|
||||||
obj/gameboy-interface.o: $(gameboy)/interface/interface.cpp $(call rwildcard,$(gameboy)/interface/)
|
|
||||||
obj/gameboy-system.o: $(gameboy)/system/system.cpp $(call rwildcard,$(gameboy)/system/)
|
|
||||||
obj/gameboy-scheduler.o: $(gameboy)/scheduler/scheduler.cpp $(call rwildcard,$(gameboy)/scheduler/)
|
|
||||||
obj/gameboy-cartridge.o: $(gameboy)/cartridge/cartridge.cpp $(call rwildcard,$(gameboy)/cartridge/)
|
|
||||||
obj/gameboy-memory.o: $(gameboy)/memory/memory.cpp $(call rwildcard,$(gameboy)/memory/)
|
|
||||||
obj/gameboy-cpu.o: $(gameboy)/cpu/cpu.cpp $(call rwildcard,$(gameboy)/cpu/)
|
|
||||||
obj/gameboy-apu.o: $(gameboy)/apu/apu.cpp $(call rwildcard,$(gameboy)/apu/)
|
|
||||||
obj/gameboy-lcd.o: $(gameboy)/lcd/lcd.cpp $(call rwildcard,$(gameboy)/lcd/)
|
|
||||||
obj/gameboy-cheat.o: $(gameboy)/cheat/cheat.cpp $(call rwildcard,$(gameboy)/cheat/)
|
|
||||||
obj/gameboy-video.o: $(gameboy)/video/video.cpp $(call rwildcard,$(gameboy)/video/)
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
options += gameboy
|
||||||
|
|
||||||
|
gb_objects := gb-interface gb-system gb-scheduler
|
||||||
|
gb_objects += gb-memory gb-cartridge
|
||||||
|
gb_objects += gb-cpu gb-apu gb-lcd
|
||||||
|
gb_objects += gb-cheat gb-video
|
||||||
|
objects += $(gb_objects)
|
||||||
|
|
||||||
|
obj/gb-interface.o: $(gb)/interface/interface.cpp $(call rwildcard,$(gb)/interface/)
|
||||||
|
obj/gb-system.o: $(gb)/system/system.cpp $(call rwildcard,$(gb)/system/)
|
||||||
|
obj/gb-scheduler.o: $(gb)/scheduler/scheduler.cpp $(call rwildcard,$(gb)/scheduler/)
|
||||||
|
obj/gb-cartridge.o: $(gb)/cartridge/cartridge.cpp $(call rwildcard,$(gb)/cartridge/)
|
||||||
|
obj/gb-memory.o: $(gb)/memory/memory.cpp $(call rwildcard,$(gb)/memory/)
|
||||||
|
obj/gb-cpu.o: $(gb)/cpu/cpu.cpp $(call rwildcard,$(gb)/cpu/)
|
||||||
|
obj/gb-apu.o: $(gb)/apu/apu.cpp $(call rwildcard,$(gb)/apu/)
|
||||||
|
obj/gb-lcd.o: $(gb)/lcd/lcd.cpp $(call rwildcard,$(gb)/lcd/)
|
||||||
|
obj/gb-cheat.o: $(gb)/cheat/cheat.cpp $(call rwildcard,$(gb)/cheat/)
|
||||||
|
obj/gb-video.o: $(gb)/video/video.cpp $(call rwildcard,$(gb)/video/)
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#define APU_CPP
|
#define APU_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
#include "square1/square1.cpp"
|
#include "square1/square1.cpp"
|
||||||
#include "square2/square2.cpp"
|
#include "square2/square2.cpp"
|
|
@ -1,9 +1,9 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#include <nall/crc32.hpp>
|
#include <nall/crc32.hpp>
|
||||||
|
|
||||||
#define CARTRIDGE_CPP
|
#define CARTRIDGE_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
#include "mbc0/mbc0.cpp"
|
#include "mbc0/mbc0.cpp"
|
||||||
#include "mbc1/mbc1.cpp"
|
#include "mbc1/mbc1.cpp"
|
|
@ -1,6 +1,6 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
Cheat cheat;
|
Cheat cheat;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#define CPU_CPP
|
#define CPU_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
#include "core/core.cpp"
|
#include "core/core.cpp"
|
||||||
#include "mmio/mmio.cpp"
|
#include "mmio/mmio.cpp"
|
|
@ -3,15 +3,15 @@
|
||||||
|
|
||||||
#include <base/base.hpp>
|
#include <base/base.hpp>
|
||||||
|
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
namespace Info {
|
namespace Info {
|
||||||
static const char Name[] = "bgameboy";
|
static const char Name[] = "bsgbc";
|
||||||
static const unsigned SerializerVersion = 3;
|
static const unsigned SerializerVersion = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bgameboy - Game Boy, Super Game Boy, and Game Boy Color emulator
|
bsgbc - Game Boy, Super Game Boy, and Game Boy Color emulator
|
||||||
author: byuu
|
author: byuu
|
||||||
license: GPLv3
|
license: GPLv3
|
||||||
project started: 2010-12-27
|
project started: 2010-12-27
|
||||||
|
@ -20,7 +20,7 @@ namespace GameBoy {
|
||||||
#include <libco/libco.h>
|
#include <libco/libco.h>
|
||||||
#include <nall/gameboy/cartridge.hpp>
|
#include <nall/gameboy/cartridge.hpp>
|
||||||
|
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
struct Processor {
|
struct Processor {
|
||||||
cothread_t thread;
|
cothread_t thread;
|
||||||
unsigned frequency;
|
unsigned frequency;
|
||||||
|
@ -46,15 +46,15 @@ namespace GameBoy {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <gameboy/memory/memory.hpp>
|
#include <gb/memory/memory.hpp>
|
||||||
#include <gameboy/system/system.hpp>
|
#include <gb/system/system.hpp>
|
||||||
#include <gameboy/scheduler/scheduler.hpp>
|
#include <gb/scheduler/scheduler.hpp>
|
||||||
#include <gameboy/cartridge/cartridge.hpp>
|
#include <gb/cartridge/cartridge.hpp>
|
||||||
#include <gameboy/cpu/cpu.hpp>
|
#include <gb/cpu/cpu.hpp>
|
||||||
#include <gameboy/apu/apu.hpp>
|
#include <gb/apu/apu.hpp>
|
||||||
#include <gameboy/lcd/lcd.hpp>
|
#include <gb/lcd/lcd.hpp>
|
||||||
#include <gameboy/cheat/cheat.hpp>
|
#include <gb/cheat/cheat.hpp>
|
||||||
#include <gameboy/video/video.hpp>
|
#include <gb/video/video.hpp>
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -1,6 +1,6 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
Interface *interface = nullptr;
|
Interface *interface = nullptr;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
//LY = 0-153
|
//LY = 0-153
|
||||||
//Raster = 0-143
|
//Raster = 0-143
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
//LX = 0-455
|
//LX = 0-455
|
||||||
|
|
||||||
#define LCD_CPP
|
#define LCD_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
#include "dmg.cpp"
|
#include "dmg.cpp"
|
||||||
#include "cgb.cpp"
|
#include "cgb.cpp"
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#define MEMORY_CPP
|
#define MEMORY_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
Unmapped unmapped;
|
Unmapped unmapped;
|
||||||
Bus bus;
|
Bus bus;
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#define SCHEDULER_CPP
|
#define SCHEDULER_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
Scheduler scheduler;
|
Scheduler scheduler;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#define SYSTEM_CPP
|
#define SYSTEM_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
#include "bootrom-dmg.cpp"
|
#include "bootrom-dmg.cpp"
|
||||||
#include "bootrom-sgb.cpp"
|
#include "bootrom-sgb.cpp"
|
|
@ -42,6 +42,6 @@ struct System : property<System> {
|
||||||
void serialize_init();
|
void serialize_init();
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <gameboy/interface/interface.hpp>
|
#include <gb/interface/interface.hpp>
|
||||||
|
|
||||||
extern System system;
|
extern System system;
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gameboy/gameboy.hpp>
|
#include <gb/gb.hpp>
|
||||||
|
|
||||||
#define VIDEO_CPP
|
#define VIDEO_CPP
|
||||||
namespace GameBoy {
|
namespace GB {
|
||||||
|
|
||||||
Video video;
|
Video video;
|
||||||
|
|
Loading…
Reference in New Issue