mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 22:52:34 +01:00
byuu says: Changelog: - added preliminary WASAPI driver (it's really terrible, though. Patches most welcome.) - all of processor/ updated to auto fn() -> ret syntax - all of gb/ updated to auto fn() -> ret syntax If you want to test the WASAPI driver, then edit ui-tomoko/GNUmakefile, and replace audio.xaudio2 with audio.wasapi Note that the two drivers are incompatible and cannot co-exist (yet. We can probably make it work in the future.) All that's left for the auto fn() -> ret syntax is the NES core and the balanced/performance SNES components. This is kind of a big deal because this syntax change causes diffs between WIPs to go crazy. So the sooner we get this done and out of the way, the better. It's also nice from a consistency standpoint, of course.
59 lines
1.0 KiB
C++
59 lines
1.0 KiB
C++
//Hitachi HG51B169 (HG51BS family/derivative?)
|
|
|
|
#ifndef PROCESSOR_HG51B_HPP
|
|
#define PROCESSOR_HG51B_HPP
|
|
|
|
namespace Processor {
|
|
|
|
struct HG51B {
|
|
auto exec(uint24 addr) -> void;
|
|
virtual auto bus_read(uint24 addr) -> uint8 = 0;
|
|
virtual auto bus_write(uint24 addr, uint8 data) -> void = 0;
|
|
|
|
auto power() -> void;
|
|
auto serialize(serializer&) -> void;
|
|
|
|
//uint16 programROM[2][256];
|
|
uint24 dataROM[1024];
|
|
uint8 dataRAM[3072];
|
|
|
|
protected:
|
|
auto push() -> void;
|
|
auto pull() -> void;
|
|
auto sa() -> uint;
|
|
auto ri() -> uint;
|
|
auto np() -> uint;
|
|
auto instruction() -> void;
|
|
|
|
//registers.cpp
|
|
auto reg_read(uint8 addr) const -> uint24;
|
|
auto reg_write(uint8 addr, uint24 data) -> void;
|
|
|
|
struct Registers {
|
|
bool halt;
|
|
|
|
uint24 pc;
|
|
uint16 p;
|
|
bool n;
|
|
bool z;
|
|
bool c;
|
|
|
|
uint24 a;
|
|
uint24 acch;
|
|
uint24 accl;
|
|
uint24 busdata;
|
|
uint24 romdata;
|
|
uint24 ramdata;
|
|
uint24 busaddr;
|
|
uint24 ramaddr;
|
|
uint24 gpr[16];
|
|
} regs;
|
|
|
|
uint24 stack[8];
|
|
uint16 opcode;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|