2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::pio() -> uint8 {
|
2010-08-11 00:40:59 +00:00
|
|
|
return status.pio;
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::joylatch() -> bool {
|
2010-10-11 10:36:00 +00:00
|
|
|
return status.joypad_strobe_latch;
|
2010-08-11 00:40:59 +00:00
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::interrupt_pending() -> bool {
|
2010-08-11 00:40:59 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::port_read(uint8 port) -> uint8 {
|
2010-08-11 00:40:59 +00:00
|
|
|
return port_data[port & 3];
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::port_write(uint8 port, uint8 data) -> void {
|
2010-08-11 00:40:59 +00:00
|
|
|
port_data[port & 3] = data;
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::op_io() -> void {
|
2010-08-11 00:40:59 +00:00
|
|
|
add_clocks(6);
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::op_read(uint addr) -> uint8 {
|
Update to higan and icarus v095r17 release.
byuu says:
higan supports Event mapping again.
Further, icarus can now detect Event ROMs and MSU1 games.
Event ROMs must be named "program.rom", "slot-(1,2,3).rom" MSU1 games
must contain "msu1.rom"; and tracks must be named "track-#.pcm"
When importing the CC'92, PF'94 ROMs, the program.rom and
slot-(1,2,3).rom files must be concatenated. The DSP firmware can
optionally be separate, but I'd recommend you go ahead and merge it all
to one file. Especially since that common "higan DSP pack" floating
around on the web left out the DSP1 ROMs (only has DSP1B) for god knows
what reason.
There is no support for loading "game.sfc+game.msu+game-*.pcm", because
I'm not going to support trying to pull in all of those files through
importing. Games will have to be distributed as game folders to use
MSU1. The MSU1 icarus support is simply so your game folders won't
require an unstable manifest.bml file to be played. So once they're in
there, they are good for life.
Note: the Event sizes in icarus' SFC heuristics are wrong for appended
firmware. Change from 0xXX8000 to 0xXX2000 and it works fine. Will be
fixed in r18.
Added Sintendo's flickering fixes. The window one's a big help for
regular controls, but the ListView double buffering does nothing for me
on Windows 7 :( Fairly sure I know why, but too lazy to try and fix that
now.
Also fixes the mMenu thing.
2015-12-20 02:53:40 +00:00
|
|
|
regs.mdr = bus.read(addr, regs.mdr);
|
2010-08-11 00:40:59 +00:00
|
|
|
add_clocks(speed(addr));
|
|
|
|
return regs.mdr;
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::op_write(uint addr, uint8 data) -> void {
|
2010-08-11 00:40:59 +00:00
|
|
|
add_clocks(speed(addr));
|
|
|
|
bus.write(addr, regs.mdr = data);
|
|
|
|
}
|
|
|
|
|
2015-12-06 21:11:41 +00:00
|
|
|
auto CPU::speed(uint addr) const -> uint {
|
2010-08-11 00:40:59 +00:00
|
|
|
if(addr & 0x408000) {
|
|
|
|
if(addr & 0x800000) return status.rom_speed;
|
|
|
|
return 8;
|
|
|
|
}
|
|
|
|
if((addr + 0x6000) & 0x4000) return 8;
|
|
|
|
if((addr - 0x4000) & 0x7e00) return 6;
|
|
|
|
return 12;
|
|
|
|
}
|