mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 14:42:33 +01:00
byuu says: Changelog: - Master System: merged Bus into CPU - Mega Drive: merged BusCPU into CPU; BusAPU into AU - Mega Drive: added TMSS emulation; disabled by default [hex\_usr] - VDP lockout not yet emulated - processor/arm7tdmi: renamed interrupt() to exception() - processor/arm7tdmi: CPSR.F (FIQ disable) flag is set on reset - processor/arm7tdmi: pipeline decode stage caches CPSR.T (THUMB mode) [MerryMage] - fixes `msr_tests.gba` test F - processor/arm7tdmi/disassembler: add PC address to left of currently executing instruction - processor/arm7tdmi: stop forcing CPSR.M (mode flags) bit 4 high (I don't know what really happens here) - processor/arm7tdmi: undefined instructions now generate Undefined 0x4 exception - processor/arm7tdmi: thumbInstructionAddRegister masks PC by &~3 instead of &~2 - hopefully this is correct; &~2 felt very wrong - processor/arm7tdmi: thumbInstructionStackMultiple can use sequential timing for PC/LR PUSH/POP [Cydrak] - systems/Mega Drive.sys: added tmss.rom; enable with cpu version=1 - tomoko: detect when a ruby video/audio/input driver crashes higan; disable it on next program startup v104 blockers: - Mega Drive: support 8-bit SRAM (even if we don't support 16-bit; don't force 8-bit to 16-bit) - Mega Drive: add region detection support to icarus - ruby: add default audio device information so certain drivers won't default to silence out of the box
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
#pragma once
|
|
|
|
//license: GPLv3
|
|
//started: 2016-07-08
|
|
|
|
#include <emulator/emulator.hpp>
|
|
#include <emulator/thread.hpp>
|
|
#include <emulator/scheduler.hpp>
|
|
#include <emulator/cheat.hpp>
|
|
|
|
#include <processor/m68k/m68k.hpp>
|
|
#include <processor/z80/z80.hpp>
|
|
|
|
namespace MegaDrive {
|
|
#define platform Emulator::platform
|
|
namespace File = Emulator::File;
|
|
using Scheduler = Emulator::Scheduler;
|
|
using Cheat = Emulator::Cheat;
|
|
extern Scheduler scheduler;
|
|
extern Cheat cheat;
|
|
|
|
struct Wait {
|
|
enum : uint {
|
|
VDP_DMA = 1 << 0,
|
|
};
|
|
};
|
|
|
|
struct Thread : Emulator::Thread {
|
|
auto create(auto (*entrypoint)() -> void, double frequency) -> void {
|
|
Emulator::Thread::create(entrypoint, frequency);
|
|
scheduler.append(*this);
|
|
wait = 0;
|
|
}
|
|
|
|
inline auto synchronize(Thread& thread) -> void {
|
|
if(clock() >= thread.clock()) scheduler.resume(thread);
|
|
}
|
|
|
|
uint wait = 0;
|
|
};
|
|
|
|
struct Region {
|
|
inline static auto NTSCJ() -> bool;
|
|
inline static auto NTSCU() -> bool;
|
|
inline static auto PAL() -> bool;
|
|
};
|
|
|
|
#include <md/controller/controller.hpp>
|
|
|
|
#include <md/cpu/cpu.hpp>
|
|
#include <md/apu/apu.hpp>
|
|
#include <md/vdp/vdp.hpp>
|
|
#include <md/psg/psg.hpp>
|
|
#include <md/ym2612/ym2612.hpp>
|
|
|
|
#include <md/system/system.hpp>
|
|
#include <md/cartridge/cartridge.hpp>
|
|
}
|
|
|
|
#include <md/interface/interface.hpp>
|