Update to v095r12 release.

byuu says:

Got it. They broke in r05.

Changelog:
- fixed typo in sfc/cpu/timing.cpp that was breaking coprocessor games
  with clocks
- updated sfc/coprocessor/hitachidsp to not access Bus directly
This commit is contained in:
Tim Allen 2015-12-15 20:30:26 +11:00
parent f2a416aea9
commit 2c53d5fbc0
5 changed files with 32 additions and 13 deletions

View File

@ -7,7 +7,7 @@ using namespace nall;
namespace Emulator { namespace Emulator {
static const string Name = "higan"; static const string Name = "higan";
static const string Version = "095.11"; static const string Version = "095.12";
static const string Author = "byuu"; static const string Author = "byuu";
static const string License = "GPLv3"; static const string License = "GPLv3";
static const string Website = "http://byuu.org/"; static const string Website = "http://byuu.org/";

View File

@ -18,6 +18,8 @@
#define PATH_MAX 260 #define PATH_MAX 260
#endif #endif
using uint = unsigned;
namespace nall { namespace nall {
//UTF-8 to UTF-16 //UTF-8 to UTF-16
struct utf16_t { struct utf16_t {

View File

@ -16,8 +16,7 @@ auto HitachiDSP::enter() -> void {
if(mmio.dma) { if(mmio.dma) {
for(auto n : range(mmio.dma_length)) { for(auto n : range(mmio.dma_length)) {
//todo: access internally, not from Bus bus_write(mmio.dma_target + n, bus_read(mmio.dma_source + n));
bus.write(mmio.dma_target + n, bus.read(mmio.dma_source + n, 0));
step(2); step(2);
} }
mmio.dma = false; mmio.dma = false;

View File

@ -1,14 +1,32 @@
auto HitachiDSP::bus_read(uint24 addr) -> uint8 { auto HitachiDSP::bus_read(uint24 addr) -> uint8 {
//todo: read internally, not from Bus if((addr & 0x40e000) == 0x006000) { //$00-3f,80-bf:6000-7fff
if((addr & 0x408000) == 0x008000) return bus.read(addr, 0); //$00-3f,80-bf:6000-7fff return dsp_read(addr, 0x00);
if((addr & 0xf88000) == 0x700000) return bus.read(addr, 0); //$70-77:0000-7fff }
if((addr & 0x408000) == 0x008000) { //$00-3f,80-bf:8000-ffff
if(rom.size() == 0) return 0x00;
addr = ((addr & 0x3f0000) >> 1) | (addr & 0x7fff);
addr = bus.mirror(addr, rom.size());
return rom.read(addr, 0);
}
if((addr & 0xf88000) == 0x700000) { //$70-77:0000-7fff
if(ram.size() == 0) return 0x00;
addr = ((addr & 0x070000) >> 1) | (addr & 0x7fff);
addr = Bus::mirror(addr, ram.size());
return ram.read(addr);
}
return 0x00; return 0x00;
} }
auto HitachiDSP::bus_write(uint24 addr, uint8 data) -> void { auto HitachiDSP::bus_write(uint24 addr, uint8 data) -> void {
//todo: write internally, not to Bus if((addr & 0x40e000) == 0x006000) { //$00-3f,80-bf:6000-7fff
if((addr & 0x40e000) == 0x006000) return bus.write(addr, data); //$00-3f,80-bf:6000-7fff return dsp_write(addr & 0x1fff, data);
if((addr & 0xf88000) == 0x700000) return bus.write(addr, data); //$70-77:0000-7fff }
if((addr & 0xf88000) == 0x700000) { //$70-77:0000-7fff
if(ram.size() == 0) return;
addr = ((addr & 0x070000) >> 1) | (addr & 0x7fff);
addr = Bus::mirror(addr, ram.size());
return ram.write(addr, data);
}
} }
auto HitachiDSP::rom_read(uint addr, uint8 data) -> uint8 { auto HitachiDSP::rom_read(uint addr, uint8 data) -> uint8 {

View File

@ -27,9 +27,9 @@ auto CPU::add_clocks(uint clocks) -> void {
} }
#if defined(DEBUGGER) #if defined(DEBUGGER)
synchronize_smp(); synchronizeSMP();
synchronize_ppu(); synchronizePPU();
synchronize_coprocessors(); synchronizeCoprocessors();
#endif #endif
} }
@ -41,7 +41,7 @@ auto CPU::scanline() -> void {
//forcefully sync S-CPU to other processors, in case chips are not communicating //forcefully sync S-CPU to other processors, in case chips are not communicating
synchronizeSMP(); synchronizeSMP();
synchronizePPU(); synchronizePPU();
synchronizeDevices(); synchronizeCoprocessors();
system.scanline(); system.scanline();
if(vcounter() == 0) { if(vcounter() == 0) {