diff options
author | 2019-03-25 23:13:40 +0100 | |
---|---|---|
committer | 2019-03-25 23:13:40 +0100 | |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/video/ef9345.cpp | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/video/ef9345.cpp')
-rw-r--r-- | src/devices/video/ef9345.cpp | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp index 1daf7b5fde7..006d92855ba 100644 --- a/src/devices/video/ef9345.cpp +++ b/src/devices/video/ef9345.cpp @@ -35,8 +35,7 @@ DEFINE_DEVICE_TYPE(TS9347, ts9347_device, "ts9347", "TS9347") // default address map void ef9345_device::ef9345(address_map &map) { - if (!has_configured_map(0)) - map(0x0000, 0x3fff).ram(); + map(0x0000, 0x3fff).ram(); } //------------------------------------------------- @@ -114,7 +113,7 @@ ef9345_device::ef9345_device(const machine_config &mconfig, device_type type, co device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), - m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(ef9345_device::ef9345), this)), + m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(ef9345_device::ef9345), this)), m_charset(*this, DEVICE_SELF), m_variant(variant), m_palette(*this, finder_base::DUMMY_TAG) @@ -213,7 +212,7 @@ void ef9345_device::device_timer(emu_timer &timer, device_timer_id id, int param void ef9345_device::set_busy_flag(int period) { m_bf = 1; - m_busy_timer->adjust(attotime::from_nsec(period)); + m_busy_timer->adjust(attotime::from_usec(period)); } // draw a char in 40 char line mode @@ -754,7 +753,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) { case 0x00: //KRF: R1,R2,R3->ram case 0x01: //KRF: R1,R2,R3->ram + increment - set_busy_flag(4000); + set_busy_flag(4); m_videoram->write_byte(a, m_registers[1]); m_videoram->write_byte(a + 0x0800, m_registers[2]); m_videoram->write_byte(a + 0x1000, m_registers[3]); @@ -762,14 +761,14 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x02: //KRG: R1,R2->ram case 0x03: //KRG: R1,R2->ram + increment - set_busy_flag(5500); + set_busy_flag(5.5); m_videoram->write_byte(a, m_registers[1]); m_videoram->write_byte(a + 0x0800, m_registers[2]); if (cmd&1) inc_x(7); break; case 0x08: //KRF: ram->R1,R2,R3 case 0x09: //KRF: ram->R1,R2,R3 + increment - set_busy_flag(7500); + set_busy_flag(7.5); m_registers[1] = m_videoram->read_byte(a); m_registers[2] = m_videoram->read_byte(a + 0x0800); m_registers[3] = m_videoram->read_byte(a + 0x1000); @@ -777,14 +776,14 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x0a: //KRG: ram->R1,R2 case 0x0b: //KRG: ram->R1,R2 + increment - set_busy_flag(7500); + set_busy_flag(7.5); m_registers[1] = m_videoram->read_byte(a); m_registers[2] = m_videoram->read_byte(a + 0x0800); if (cmd&1) inc_x(7); break; case 0x30: //OCT: R1->RAM, main pointer case 0x31: //OCT: R1->RAM, main pointer + inc - set_busy_flag(4000); + set_busy_flag(4); m_videoram->write_byte(indexram(7), m_registers[1]); if (cmd&1) @@ -796,7 +795,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x34: //OCT: R1->RAM, aux pointer case 0x35: //OCT: R1->RAM, aux pointer + inc - set_busy_flag(4000); + set_busy_flag(4); m_videoram->write_byte(indexram(5), m_registers[1]); if (cmd&1) @@ -804,7 +803,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x38: //OCT: RAM->R1, main pointer case 0x39: //OCT: RAM->R1, main pointer + inc - set_busy_flag(4500); + set_busy_flag(4.5); m_registers[1] = m_videoram->read_byte(indexram(7)); if (cmd&1) @@ -817,7 +816,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x3c: //OCT: RAM->R1, aux pointer case 0x3d: //OCT: RAM->R1, aux pointer + inc - set_busy_flag(4500); + set_busy_flag(4.5); m_registers[1] = m_videoram->read_byte(indexram(5)); if (cmd&1) @@ -825,7 +824,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x50: //KRL: 80 uint8_t - 12 bits write case 0x51: //KRL: 80 uint8_t - 12 bits write + inc - set_busy_flag(12500); + set_busy_flag(12.5); m_videoram->write_byte(a, m_registers[1]); switch((a / 0x0800) & 1) { @@ -851,7 +850,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x58: //KRL: 80 uint8_t - 12 bits read case 0x59: //KRL: 80 uint8_t - 12 bits read + inc - set_busy_flag(11500); + set_busy_flag(11.5); m_registers[1] = m_videoram->read_byte(a); switch((a / 0x0800) & 1) { @@ -880,7 +879,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) case 0x83: //IND: R1->PAT case 0x84: //IND: R1->DOR case 0x87: //IND: R1->ROR - set_busy_flag(2000); + set_busy_flag(2); switch(cmd&7) { case 1: m_tgs = m_registers[1]; break; @@ -898,7 +897,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) case 0x8b: //IND: PAT->R1 case 0x8c: //IND: DOR->R1 case 0x8f: //IND: ROR->R1 - set_busy_flag(3500); + set_busy_flag(3.5); switch(cmd&7) { case 0: m_registers[1] = m_charset[indexrom(7) & 0x1fff]; break; @@ -916,7 +915,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) case 0x99: //VSM: vertical sync mask set break; case 0xb0: //INY: increment Y - set_busy_flag(2000); + set_busy_flag(2); inc_y(6); m_state &= 0x8f; //reset S4(LXa), S5(LXm), S6(Al) break; @@ -937,7 +936,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) uint8_t n = (cmd>>4) - 0x0c; uint8_t r1 = (cmd&0x04) ? 7 : 5; uint8_t r2 = (cmd&0x04) ? 5 : 7; - int busy = 2000; + int busy = 2; for(i = 0; i < 1280; i++) { @@ -960,7 +959,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) inc_y(6); } - busy += 4000 * n; + busy += 4 * n; } m_state &= 0x8f; //reset S4(LXa), S5(LXm), S6(Al) set_busy_flag(busy); @@ -995,7 +994,7 @@ void ef9345_device::update_scanline(uint16_t scanline) if (scanline == 250) m_state &= 0xfb; - set_busy_flag(104000); + set_busy_flag(104); if (m_char_mode == MODE12x80 || m_char_mode == MODE8x80) { @@ -1048,7 +1047,7 @@ void ef9345_device::update_scanline(uint16_t scanline) } } -uint8_t ef9345_device::data_r(offs_t offset) +READ8_MEMBER( ef9345_device::data_r ) { if (offset & 7) return m_registers[offset & 7]; @@ -1061,7 +1060,7 @@ uint8_t ef9345_device::data_r(offs_t offset) return m_state; } -void ef9345_device::data_w(offs_t offset, uint8_t data) +WRITE8_MEMBER( ef9345_device::data_w ) { m_registers[offset & 7] = data; |