diff options
Diffstat (limited to 'src/mame/machine/model1.cpp')
-rw-r--r-- | src/mame/machine/model1.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mame/machine/model1.cpp b/src/mame/machine/model1.cpp index 66185ad8849..5cf0749eb53 100644 --- a/src/mame/machine/model1.cpp +++ b/src/mame/machine/model1.cpp @@ -156,18 +156,19 @@ READ32_MEMBER(model1_state::copro_ramadr_r) WRITE32_MEMBER(model1_state::copro_ramdata_w) { - m_check_pram.emplace_back(racc{ m_copro_ram_adr[offset >> 3], data, true }); - COMBINE_DATA(&m_copro_ram_data[m_copro_ram_adr[offset >> 3] & 0x1fff]); + if(m_copro_ram_adr[offset >> 3] & 0x40000) { + COMBINE_DATA(&m_copro_ram_data[0x1000 | (m_copro_ram_adr[offset >> 3] & 0x1fff)]); + } else { + COMBINE_DATA(&m_copro_ram_data[m_copro_ram_adr[offset >> 3] & 0x1fff]); + } m_copro_ram_adr[offset >> 3] ++; } READ32_MEMBER(model1_state::copro_ramdata_r) { - u32 val = m_copro_ram_data[m_copro_ram_adr[offset >> 3] & 0x1fff]; - if(!machine().side_effects_disabled()) { - m_check_pram.emplace_back(racc{ m_copro_ram_adr[offset >> 3], val, false }); + u32 val = (m_copro_ram_adr[offset >> 3] & 0x40000) ? m_copro_ram_data[0x1000 | (m_copro_ram_adr[offset >> 3] & 0x1fff)] : m_copro_ram_data[m_copro_ram_adr[offset >> 3] & 0x1fff]; + if(!machine().side_effects_disabled()) m_copro_ram_adr[offset >> 3] ++; - } return val; } @@ -231,7 +232,7 @@ WRITE32_MEMBER(model1_state::copro_atan_w) READ32_MEMBER(model1_state::copro_atan_r) { - u32 idx = m_copro_atan_base[3]; + u32 idx = m_copro_atan_base[3] & 0xffff; if(idx & 0xc000) idx = 0x3fff; u32 result = m_copro_tables[idx | 0x4000]; @@ -239,20 +240,20 @@ READ32_MEMBER(model1_state::copro_atan_r) // Correct for table bug, it seems that the hardware does something equivalent somehow, // or maybe there are boards with updated opr roms - u16 dt = (result >> 16) + result; - if(dt & 0x001) { + u16 dt = (result >> 16) + result; + if(dt & 0x001) { if((result & 0x00f) == 0x00e) result -= 0x00000001; else result -= 0x00010000; } - if(dt & 0x010) { + if(dt & 0x010) { if((result & 0x0f0) == 0x0e0) result -= 0x00000010; else result -= 0x00100000; } - if(dt & 0x100) { + if(dt & 0x100) { if((result & 0xf00) == 0xe00) result -= 0x00000100; else |