mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-04-02 10:42:14 -04:00
byuu says: Changelog: - converted Emulator::Interface::Bind to Emulator::Platform - temporarily disabled SGB hooks - SMS: emulated Game Gear palette (latching word-write behavior not implemented yet) - SMS: emulated Master System 'Reset' button, Game Gear 'Start' button - SMS: removed reset() functionality, driven by the mappable input now instead - SMS: split interface class in two: one for Master System, one for Game Gear - SMS: emulated Game Gear video cropping to 160x144 - PCE: started on HuC6280 CPU core—so far only registers, NOP instruction has been implemented Errata: - Super Game Boy support is broken and thus disabled - if you switch between Master System and Game Gear without restarting, bad things happen: - SMS→GG, no video output on the GG - GG→SMS, no input on the SMS I'm not sure what's causing the SMS\<-\>GG switch bug, having a hard time debugging it. Help would be very much appreciated, if anyone's up for it. Otherwise I'll keep trying to track it down on my end.
41 lines
1 KiB
C++
41 lines
1 KiB
C++
#pragma once
|
|
|
|
//license: GPLv3
|
|
//started: 2011-09-05
|
|
|
|
#include <emulator/emulator.hpp>
|
|
#include <emulator/thread.hpp>
|
|
#include <emulator/scheduler.hpp>
|
|
#include <emulator/cheat.hpp>
|
|
|
|
#include <processor/r6502/r6502.hpp>
|
|
|
|
namespace Famicom {
|
|
#define platform Emulator::platform
|
|
using File = Emulator::File;
|
|
using Scheduler = Emulator::Scheduler;
|
|
using Cheat = Emulator::Cheat;
|
|
extern Scheduler scheduler;
|
|
extern Cheat cheat;
|
|
|
|
struct Thread : Emulator::Thread {
|
|
auto create(auto (*entrypoint)() -> void, double frequency) -> void {
|
|
Emulator::Thread::create(entrypoint, frequency);
|
|
scheduler.append(*this);
|
|
}
|
|
|
|
inline auto synchronize(Thread& thread) -> void {
|
|
if(clock() >= thread.clock()) scheduler.resume(thread);
|
|
}
|
|
};
|
|
|
|
#include <fc/controller/controller.hpp>
|
|
#include <fc/system/system.hpp>
|
|
#include <fc/memory/memory.hpp>
|
|
#include <fc/cartridge/cartridge.hpp>
|
|
#include <fc/cpu/cpu.hpp>
|
|
#include <fc/apu/apu.hpp>
|
|
#include <fc/ppu/ppu.hpp>
|
|
}
|
|
|
|
#include <fc/interface/interface.hpp>
|