mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 22:52:34 +01:00
byuu says: Changelog: - added higan/emulator/platform.hpp (moved out Emulator::Platform from emulator/interface.hpp) - moved gmake build paramter to nall/GNUmakefile; both higan and icarus use it now - added build=profile mode - MD: added the region select I/O register - MD: started to add region selection support internally (still no external select or PAL support) - PCE: added cycle stealing when reading/writing to the VDC or VCE; and when using ST# instructions - PCE: cleaned up PSG to match the behavior of Mednafen (doesn't improve sound at all ;_;) - note: need to remove loadWaveSample, loadWavePeriod - HuC6280: ADC/SBC decimal mode consumes an extra cycle; does not set V flag - HuC6280: block transfer instructions were taking one cycle too many - icarus: added code to strip out PC Engine ROM headers - hiro: added options support to BrowserDialog The last one sure ended in failure. The plan was to put a region dropdown directly onto hiro::BrowserDialog, and I had all the code for it working. But I forgot one important detail: the system loads cartridges AFTER powering on, so even though I could technically change the system region post-boot, I'd rather not do so. So that means we have to know what region we want before we even select a game. Shit.
48 lines
827 B
C++
48 lines
827 B
C++
auto HuC6280::load8(uint8 addr) -> uint8 {
|
|
step(r.cs);
|
|
return read(r.mpr[1], addr);
|
|
}
|
|
|
|
auto HuC6280::load16(uint16 addr) -> uint8 {
|
|
step(r.cs);
|
|
return read(r.mpr[addr.bits(13,15)], addr.bits(0,12));
|
|
}
|
|
|
|
auto HuC6280::store8(uint8 addr, uint8 data) -> void {
|
|
step(r.cs);
|
|
return write(r.mpr[1], addr, data);
|
|
}
|
|
|
|
auto HuC6280::store16(uint16 addr, uint8 data) -> void {
|
|
step(r.cs);
|
|
return write(r.mpr[addr.bits(13,15)], addr.bits(0,12), data);
|
|
}
|
|
|
|
//
|
|
|
|
auto HuC6280::io() -> void {
|
|
step(r.cs);
|
|
}
|
|
|
|
auto HuC6280::opcode() -> uint8 {
|
|
return load16(PC++);
|
|
}
|
|
|
|
auto HuC6280::operand() -> uint8 {
|
|
return load16(PC++);
|
|
}
|
|
|
|
//
|
|
|
|
auto HuC6280::push(uint8 data) -> void {
|
|
step(r.cs);
|
|
write(r.mpr[1], 0x0100 | S, data);
|
|
S--;
|
|
}
|
|
|
|
auto HuC6280::pull() -> uint8 {
|
|
step(r.cs);
|
|
S++;
|
|
return read(r.mpr[1], 0x0100 | S);
|
|
}
|