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.
2012-03-18 12:35:53 +00:00
|
|
|
#include <gb/gb.hpp>
|
2010-12-28 06:03:02 +00:00
|
|
|
|
|
|
|
#define SCHEDULER_CPP
|
2012-04-26 10:51:13 +00:00
|
|
|
namespace GameBoy {
|
2010-12-28 06:03:02 +00:00
|
|
|
|
|
|
|
Scheduler scheduler;
|
|
|
|
|
|
|
|
void Scheduler::enter() {
|
|
|
|
host_thread = co_active();
|
|
|
|
co_switch(active_thread);
|
|
|
|
}
|
|
|
|
|
2011-01-07 11:11:56 +00:00
|
|
|
void Scheduler::exit(ExitReason reason) {
|
|
|
|
exit_reason = reason;
|
2010-12-28 06:03:02 +00:00
|
|
|
active_thread = co_active();
|
|
|
|
co_switch(host_thread);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scheduler::init() {
|
|
|
|
host_thread = co_active();
|
|
|
|
active_thread = cpu.thread;
|
|
|
|
}
|
|
|
|
|
|
|
|
Scheduler::Scheduler() {
|
2011-01-07 11:11:56 +00:00
|
|
|
exit_reason = ExitReason::UnknownEvent;
|
2013-05-05 09:21:30 +00:00
|
|
|
host_thread = nullptr;
|
|
|
|
active_thread = nullptr;
|
2010-12-28 06:03:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|