2010-12-28 01:53:15 +00:00
|
|
|
//bgameboy
|
|
|
|
//author: byuu
|
|
|
|
//project started: 2010-12-27
|
|
|
|
|
|
|
|
namespace GameBoy {
|
|
|
|
namespace Info {
|
|
|
|
static const char Name[] = "bgameboy";
|
2011-01-05 09:59:22 +00:00
|
|
|
static const char Version[] = "000.09";
|
2010-12-28 01:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#include <libco/libco.h>
|
|
|
|
|
|
|
|
#include <nall/foreach.hpp>
|
|
|
|
#include <nall/property.hpp>
|
|
|
|
#include <nall/stdint.hpp>
|
|
|
|
#include <nall/string.hpp>
|
|
|
|
using namespace nall;
|
|
|
|
|
|
|
|
namespace GameBoy {
|
|
|
|
typedef int8_t int8;
|
|
|
|
typedef int16_t int16;
|
|
|
|
typedef int32_t int32;
|
|
|
|
typedef int64_t int64;
|
|
|
|
|
|
|
|
typedef uint8_t uint8;
|
|
|
|
typedef uint16_t uint16;
|
|
|
|
typedef uint32_t uint32;
|
|
|
|
typedef uint64_t uint64;
|
|
|
|
|
2010-12-28 06:03:02 +00:00
|
|
|
struct Processor {
|
|
|
|
cothread_t thread;
|
|
|
|
unsigned frequency;
|
|
|
|
int64 clock;
|
|
|
|
|
|
|
|
inline void create(void (*entrypoint_)(), unsigned frequency_) {
|
|
|
|
if(thread) co_delete(thread);
|
|
|
|
thread = co_create(65536 * sizeof(void*), entrypoint_);
|
|
|
|
frequency = frequency_;
|
|
|
|
clock = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline Processor() : thread(0) {}
|
|
|
|
};
|
|
|
|
|
2011-01-03 04:28:36 +00:00
|
|
|
#include <gameboy/system/system.hpp>
|
|
|
|
#include <gameboy/scheduler/scheduler.hpp>
|
|
|
|
#include <gameboy/memory/memory.hpp>
|
|
|
|
#include <gameboy/cartridge/cartridge.hpp>
|
|
|
|
#include <gameboy/cpu/cpu.hpp>
|
|
|
|
#include <gameboy/lcd/lcd.hpp>
|
2010-12-28 01:53:15 +00:00
|
|
|
};
|