From a0edad74126fd360c4a1932dfd277b31368938b5 Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Mon, 19 Nov 2018 15:17:02 +0100 Subject: [PATCH] sgi: Fix some recent regressions, nw --- src/mame/drivers/4d20.cpp | 4 +--- src/mame/drivers/crimson.cpp | 4 +--- src/mame/drivers/indigo.cpp | 32 +++++++++++++++---------------- src/mame/drivers/indy_indigo2.cpp | 2 +- src/mame/drivers/ncdmips.cpp | 2 +- src/mame/drivers/o2.cpp | 1 + src/mame/drivers/octane.cpp | 4 +--- 7 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/mame/drivers/4d20.cpp b/src/mame/drivers/4d20.cpp index 119bf06506b..c6d00cd8e72 100644 --- a/src/mame/drivers/4d20.cpp +++ b/src/mame/drivers/4d20.cpp @@ -14,12 +14,10 @@ #include "emu.h" #include "cpu/mips/mips1.h" -#define ENABLE_ENTRY_GFX (1) - #define LOG_UNKNOWN (1 << 0) #define LOG_ALL (LOG_UNKNOWN) -#define VERBOSE (LOG_UNKNOWN) +#define VERBOSE (0) #include "logmacro.h" class ip15_state : public driver_device diff --git a/src/mame/drivers/crimson.cpp b/src/mame/drivers/crimson.cpp index 3af23b7a79f..2c608598744 100644 --- a/src/mame/drivers/crimson.cpp +++ b/src/mame/drivers/crimson.cpp @@ -14,12 +14,10 @@ #include "emu.h" #include "cpu/mips/mips3.h" -#define ENABLE_ENTRY_GFX (1) - #define LOG_UNKNOWN (1 << 0) #define LOG_ALL (LOG_UNKNOWN) -#define VERBOSE (LOG_UNKNOWN) +#define VERBOSE (0) #include "logmacro.h" class crimson_state : public driver_device diff --git a/src/mame/drivers/indigo.cpp b/src/mame/drivers/indigo.cpp index 66f9271de16..e4d2d2f3046 100644 --- a/src/mame/drivers/indigo.cpp +++ b/src/mame/drivers/indigo.cpp @@ -45,7 +45,6 @@ public: , m_hpc(*this, "hpc") , m_eeprom(*this, "eeprom") , m_share1(*this, "share1") - , m_dsp_ram(*this, "dspram") , m_palette(*this, "palette") { } @@ -143,9 +142,9 @@ protected: required_device m_hpc; required_device m_eeprom; - required_shared_ptr m_share1; - required_shared_ptr m_dsp_ram; + required_shared_ptr m_share1; required_device m_palette; + std::unique_ptr m_dsp_ram; address_space *m_space; @@ -187,7 +186,7 @@ protected: void mem_map(address_map &map); - DECLARE_WRITE32_MEMBER(write_ram); + DECLARE_WRITE64_MEMBER(write_ram); required_device m_maincpu; required_device m_mem_ctrl; @@ -195,6 +194,7 @@ protected: void indigo_state::machine_start() { + m_dsp_ram = std::make_unique(0x8000); m_framebuffer = std::make_unique(1024*768); save_item(NAME(m_lg1.m_config_sel)); @@ -218,6 +218,7 @@ void indigo_state::machine_start() save_item(NAME(m_lg1.m_palette_entry)); save_item(NAME(m_lg1.m_pix_read_mask)); + save_pointer(NAME(&m_dsp_ram[0]), 0x8000); save_pointer(NAME(&m_framebuffer[0]), 1024*768); } @@ -255,7 +256,7 @@ READ32_MEMBER(indigo_state::dsp_ram_r) WRITE32_MEMBER(indigo_state::dsp_ram_w) { LOGMASKED(LOG_DSP, "%s: DSP RAM Write: %08x = %08x & %08x\n", machine().describe_context(), 0x1fbe0000 + offset*4, data, mem_mask); - COMBINE_DATA(&m_dsp_ram[offset]); + m_dsp_ram[offset] = data; } READ32_MEMBER(indigo_state::entry_r) @@ -516,7 +517,7 @@ void indigo_state::indigo_map(address_map &map) map(0x1f3f0000, 0x1f3fffff).rw(FUNC(indigo_state::entry_r), FUNC(indigo_state::entry_w)); map(0x1fb80000, 0x1fb8ffff).rw(m_hpc, FUNC(hpc1_device::read), FUNC(hpc1_device::write)); map(0x1fbd9000, 0x1fbd903f).rw(FUNC(indigo_state::int_r), FUNC(indigo_state::int_w)); - map(0x1fbe0000, 0x1fbfffff).rw(FUNC(indigo_state::dsp_ram_r), FUNC(indigo_state::dsp_ram_w)).share("dspram"); + map(0x1fbe0000, 0x1fbfffff).rw(FUNC(indigo_state::dsp_ram_r), FUNC(indigo_state::dsp_ram_w)); } void indigo3k_state::mem_map(address_map &map) @@ -525,23 +526,22 @@ void indigo3k_state::mem_map(address_map &map) map(0x1fc00000, 0x1fc3ffff).rom().share("share10").region("user1", 0); } -WRITE32_MEMBER(indigo4k_state::write_ram) +WRITE64_MEMBER(indigo4k_state::write_ram) { - // if banks 2 or 3 are enabled, kill it, we only want 128MB - if (m_mem_ctrl->read(space, 0xc8/4, 0xffffffff) & 0x10001000) + // if banks 2 or 3 are enabled, do nothing, we don't support that much memory + if (m_mem_ctrl->get_mem_config(1) & 0x10001000) { // a random perturbation so the memory test fails - data ^= 0xffffffff; + data ^= 0xffffffffffffffffULL; } - // if banks 0 or 1 have 2 membanks, also kill it, we only want 128MB - if (m_mem_ctrl->read(space, 0xc0/4, 0xffffffff) & 0x40004000) + // if banks 0 or 1 have 2 membanks, also kill it, we only want 128 MB + if (m_mem_ctrl->get_mem_config(0) & 0x40004000) { // a random perturbation so the memory test fails - data ^= 0xffffffff; + data ^= 0xffffffffffffffffULL; } - - COMBINE_DATA(&m_share1[offset & 0x03ffffff]); + COMBINE_DATA(&m_share1[offset]); } void indigo4k_state::mem_map(address_map &map) @@ -605,7 +605,7 @@ ROM_START( indigo3k ) ROM_END ROM_START( indigo4k ) - ROM_REGION32_BE( 0x80000, "user1", 0 ) + ROM_REGION64_BE( 0x80000, "user1", 0 ) ROMX_LOAD( "ip20prom.070-8116-004.bin", 0x000000, 0x080000, CRC(940d960e) SHA1(596aba530b53a147985ff3f6f853471ce48c866c), ROM_GROUPDWORD | ROM_REVERSE ) ROM_END diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp index 09a9b1d8772..65b9517b87f 100644 --- a/src/mame/drivers/indy_indigo2.cpp +++ b/src/mame/drivers/indy_indigo2.cpp @@ -298,7 +298,7 @@ ROM_START( ip224613 ) ROM_END ROM_START( ip244415 ) - ROM_REGION32_BE( 0x80000, "user1", 0 ) + ROM_REGION64_BE( 0x80000, "user1", 0 ) ROMX_LOAD( "ip244415.bin", 0x000000, 0x080000, CRC(2f37825a) SHA1(0d48c573b53a307478820b85aacb57b868297ca3), ROM_GROUPDWORD | ROM_REVERSE ) ROM_END diff --git a/src/mame/drivers/ncdmips.cpp b/src/mame/drivers/ncdmips.cpp index f00505fb60d..bf133fd83a1 100644 --- a/src/mame/drivers/ncdmips.cpp +++ b/src/mame/drivers/ncdmips.cpp @@ -108,7 +108,7 @@ void ncd_mips_state::hmxpro_map(address_map &map) { map(0x00000000, 0x003fffff).ram(); // VRAM map(0x10000000, 0x103fffff).ram(); - map(0x18000028, 0x1900002b).r(FUNC(ncd_mips_state::unk_r)); + map(0x18000028, 0x1800002b).r(FUNC(ncd_mips_state::unk_r)); map(0x18000058, 0x1800005b).w(FUNC(ncd_mips_state::tty_w)); map(0x19000010, 0x19000013).r(FUNC(ncd_mips_state::unk_r)); map(0x1b000000, 0x1b00007f).rw(m_duart, FUNC(scn2681_device::read), FUNC(scn2681_device::write)).umask32(0xff000000); diff --git a/src/mame/drivers/o2.cpp b/src/mame/drivers/o2.cpp index e51be7cf112..ace64292de8 100644 --- a/src/mame/drivers/o2.cpp +++ b/src/mame/drivers/o2.cpp @@ -71,6 +71,7 @@ void o2_state::o2(machine_config &config) m_maincpu->set_icache_size(32768); m_maincpu->set_dcache_size(32768); m_maincpu->set_addrmap(AS_PROGRAM, &o2_state::mem_map); + m_maincpu->set_force_no_drc(true); SGI_MACE(config, m_mace, m_maincpu); diff --git a/src/mame/drivers/octane.cpp b/src/mame/drivers/octane.cpp index adf7a4a622c..c8c7e4e4bdc 100644 --- a/src/mame/drivers/octane.cpp +++ b/src/mame/drivers/octane.cpp @@ -14,12 +14,10 @@ #include "emu.h" #include "cpu/mips/mips3.h" -#define ENABLE_ENTRY_GFX (1) - #define LOG_UNKNOWN (1 << 0) #define LOG_ALL (LOG_UNKNOWN) -#define VERBOSE (LOG_UNKNOWN) +#define VERBOSE (0) #include "logmacro.h" class octane_state : public driver_device