diff options
Diffstat (limited to 'src/devices/cpu/sh/sh7604_sci.cpp')
-rw-r--r-- | src/devices/cpu/sh/sh7604_sci.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/devices/cpu/sh/sh7604_sci.cpp b/src/devices/cpu/sh/sh7604_sci.cpp index 47b60dd8161..ae3ec5f4620 100644 --- a/src/devices/cpu/sh/sh7604_sci.cpp +++ b/src/devices/cpu/sh/sh7604_sci.cpp @@ -29,71 +29,71 @@ DEFINE_DEVICE_TYPE(SH7604_SCI, sh7604_sci_device, "sh7604sci", "SH7604 SCI Contr // LIVE DEVICE //************************************************************************** -READ8_MEMBER(sh7604_sci_device::serial_mode_r) +uint8_t sh7604_sci_device::serial_mode_r() { return m_smr; } -WRITE8_MEMBER(sh7604_sci_device::serial_mode_w) +void sh7604_sci_device::serial_mode_w(uint8_t data) { m_smr = data; - logerror("%s: serial mode set:\n",tag()); - logerror("\tCommunication Mode: %s mode\n",data & 0x80 ? "clocked synchronous" : "asynchronous"); - logerror("\tCharacter Length: %s mode\n",data & 0x40 ? "7-bit" : "8-bit"); - logerror("\tParity Enable: %s\n",data & 0x20 ? "yes" : "no"); - logerror("\tParity Mode: %s\n",data & 0x10 ? "Odd" : "Even"); - logerror("\tStop bits: %s\n",data & 0x08 ? "2" : "1"); - logerror("\tMultiprocessor mode: %s\n",data & 0x04 ? "yes" : "no"); - logerror("\tClock select: clock/%d\n",4 << ((data & 0x03)*2)); + logerror("%s: serial mode set:\n", tag()); + logerror("\tCommunication Mode: %s mode\n", data & 0x80 ? "clocked synchronous" : "asynchronous"); + logerror("\tCharacter Length: %s mode\n", data & 0x40 ? "7-bit" : "8-bit"); + logerror("\tParity Enable: %s\n", data & 0x20 ? "yes" : "no"); + logerror("\tParity Mode: %s\n", data & 0x10 ? "Odd" : "Even"); + logerror("\tStop bits: %s\n", data & 0x08 ? "2" : "1"); + logerror("\tMultiprocessor mode: %s\n", data & 0x04 ? "yes" : "no"); + logerror("\tClock select: clock/%d\n", 4 << ((data & 0x03) * 2)); } -READ8_MEMBER(sh7604_sci_device::serial_control_r) +uint8_t sh7604_sci_device::serial_control_r() { return m_scr; } -WRITE8_MEMBER(sh7604_sci_device::serial_control_w) +void sh7604_sci_device::serial_control_w(uint8_t data) { m_scr = data; - if(data & 0x30) - throw emu_fatalerror("%s: enabled serial control %02x\n", tag(),data); + if (data & 0x30) + throw emu_fatalerror("%s: enabled serial control %02x\n", tag(), data); } -READ8_MEMBER(sh7604_sci_device::serial_status_r) +uint8_t sh7604_sci_device::serial_status_r() { return m_ssr; } -WRITE8_MEMBER(sh7604_sci_device::serial_ack_w) +void sh7604_sci_device::serial_ack_w(uint8_t data) { // TODO: verify this m_ssr = (m_ssr & 0x06) | (m_ssr & data & 0xf9); } -READ8_MEMBER(sh7604_sci_device::bitrate_r ) +uint8_t sh7604_sci_device::bitrate_r() { return m_brr; } -WRITE8_MEMBER(sh7604_sci_device::bitrate_w ) +void sh7604_sci_device::bitrate_w(uint8_t data) { m_brr = data; } -READ8_MEMBER(sh7604_sci_device::transmit_data_r) +uint8_t sh7604_sci_device::transmit_data_r() { // ... return 0; } -WRITE8_MEMBER(sh7604_sci_device::transmit_data_w) +void sh7604_sci_device::transmit_data_w(uint8_t data) { // ... } -READ8_MEMBER(sh7604_sci_device::receive_data_r) +uint8_t sh7604_sci_device::receive_data_r() { // ... return 0; @@ -146,12 +146,12 @@ void sh7604_sci_device::device_reset() // READ/WRITE HANDLERS //************************************************************************** -READ8_MEMBER( sh7604_sci_device::read ) +uint8_t sh7604_sci_device::read(address_space &space, offs_t offset) { return space.read_byte(offset); } -WRITE8_MEMBER( sh7604_sci_device::write ) +void sh7604_sci_device::write(address_space &space, offs_t offset, uint8_t data) { - space.write_byte(offset,data); + space.write_byte(offset, data); } |