summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h8/h8_timer16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/h8/h8_timer16.cpp')
-rw-r--r--src/devices/cpu/h8/h8_timer16.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp
index 5c4294e542c..fdb0e3ddd05 100644
--- a/src/devices/cpu/h8/h8_timer16.cpp
+++ b/src/devices/cpu/h8/h8_timer16.cpp
@@ -41,12 +41,12 @@ void h8_timer16_channel_device::set_info(int _tgr_count, int _tbr_count, const c
interrupt[5] = irq_base;
}
-READ8_MEMBER(h8_timer16_channel_device::tcr_r)
+uint8_t h8_timer16_channel_device::tcr_r()
{
return tcr;
}
-WRITE8_MEMBER(h8_timer16_channel_device::tcr_w)
+void h8_timer16_channel_device::tcr_w(uint8_t data)
{
update_counter();
tcr = data;
@@ -55,22 +55,22 @@ WRITE8_MEMBER(h8_timer16_channel_device::tcr_w)
recalc_event();
}
-READ8_MEMBER(h8_timer16_channel_device::tmdr_r)
+uint8_t h8_timer16_channel_device::tmdr_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_channel_device::tmdr_w)
+void h8_timer16_channel_device::tmdr_w(uint8_t data)
{
if(V>=1) logerror("tmdr_w %02x\n", data);
}
-READ8_MEMBER(h8_timer16_channel_device::tior_r)
+uint8_t h8_timer16_channel_device::tior_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_channel_device::tior_w)
+void h8_timer16_channel_device::tior_w(offs_t offset, uint8_t data)
{
if(V>=1) logerror("tior_w %d, %02x\n", offset, data);
}
@@ -89,12 +89,12 @@ void h8_timer16_channel_device::set_enable(bool enable)
recalc_event();
}
-READ8_MEMBER(h8_timer16_channel_device::tier_r)
+uint8_t h8_timer16_channel_device::tier_r()
{
return tier;
}
-WRITE8_MEMBER(h8_timer16_channel_device::tier_w)
+void h8_timer16_channel_device::tier_w(uint8_t data)
{
update_counter();
if(V>=1) logerror("tier_w %02x\n", data);
@@ -111,24 +111,24 @@ WRITE8_MEMBER(h8_timer16_channel_device::tier_w)
recalc_event();
}
-READ8_MEMBER(h8_timer16_channel_device::tsr_r)
+uint8_t h8_timer16_channel_device::tsr_r()
{
return isr_to_sr();
}
-WRITE8_MEMBER(h8_timer16_channel_device::tsr_w)
+void h8_timer16_channel_device::tsr_w(uint8_t data)
{
if(V>=1) logerror("tsr_w %02x\n", data);
isr_update(data);
}
-READ16_MEMBER(h8_timer16_channel_device::tcnt_r)
+uint16_t h8_timer16_channel_device::tcnt_r()
{
update_counter();
return tcnt;
}
-WRITE16_MEMBER(h8_timer16_channel_device::tcnt_w)
+void h8_timer16_channel_device::tcnt_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
update_counter();
COMBINE_DATA(&tcnt);
@@ -136,12 +136,12 @@ WRITE16_MEMBER(h8_timer16_channel_device::tcnt_w)
recalc_event();
}
-READ16_MEMBER(h8_timer16_channel_device::tgr_r)
+uint16_t h8_timer16_channel_device::tgr_r(offs_t offset)
{
return tgr[offset];
}
-WRITE16_MEMBER(h8_timer16_channel_device::tgr_w)
+void h8_timer16_channel_device::tgr_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
update_counter();
COMBINE_DATA(tgr + offset);
@@ -149,12 +149,12 @@ WRITE16_MEMBER(h8_timer16_channel_device::tgr_w)
recalc_event();
}
-READ16_MEMBER(h8_timer16_channel_device::tbr_r)
+uint16_t h8_timer16_channel_device::tbr_r(offs_t offset)
{
return tgr[offset+tgr_count];
}
-WRITE16_MEMBER(h8_timer16_channel_device::tbr_w)
+void h8_timer16_channel_device::tbr_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(tgr + offset + tgr_count);
if(V>=1) logerror("tbr%c_w %04x\n", 'a'+offset, tgr[offset]);
@@ -345,12 +345,12 @@ void h8_timer16_device::device_reset()
}
-READ8_MEMBER(h8_timer16_device::tstr_r)
+uint8_t h8_timer16_device::tstr_r()
{
return tstr;
}
-WRITE8_MEMBER(h8_timer16_device::tstr_w)
+void h8_timer16_device::tstr_w(uint8_t data)
{
if(V>=1) logerror("tstr_w %02x\n", data);
tstr = data;
@@ -358,57 +358,57 @@ WRITE8_MEMBER(h8_timer16_device::tstr_w)
timer_channel[i]->set_enable((tstr >> i) & 1);
}
-READ8_MEMBER(h8_timer16_device::tsyr_r)
+uint8_t h8_timer16_device::tsyr_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_device::tsyr_w)
+void h8_timer16_device::tsyr_w(uint8_t data)
{
if(V>=1) logerror("tsyr_w %02x\n", data);
}
-READ8_MEMBER(h8_timer16_device::tmdr_r)
+uint8_t h8_timer16_device::tmdr_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_device::tmdr_w)
+void h8_timer16_device::tmdr_w(uint8_t data)
{
if(V>=1) logerror("tmdr_w %02x\n", data);
}
-READ8_MEMBER(h8_timer16_device::tfcr_r)
+uint8_t h8_timer16_device::tfcr_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_device::tfcr_w)
+void h8_timer16_device::tfcr_w(uint8_t data)
{
if(V>=1) logerror("tfcr_w %02x\n", data);
}
-READ8_MEMBER(h8_timer16_device::toer_r)
+uint8_t h8_timer16_device::toer_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_device::toer_w)
+void h8_timer16_device::toer_w(uint8_t data)
{
if(V>=1) logerror("toer_w %02x\n", data);
}
-READ8_MEMBER(h8_timer16_device::tocr_r)
+uint8_t h8_timer16_device::tocr_r()
{
return 0x00;
}
-WRITE8_MEMBER(h8_timer16_device::tocr_w)
+void h8_timer16_device::tocr_w(uint8_t data)
{
if(V>=1) logerror("tocr_w %02x\n", data);
}
-READ8_MEMBER(h8_timer16_device::tisr_r)
+uint8_t h8_timer16_device::tisr_r(offs_t offset)
{
uint8_t r = 0;
for(int i=0; i<timer_count; i++)
@@ -421,24 +421,24 @@ READ8_MEMBER(h8_timer16_device::tisr_r)
return r;
}
-WRITE8_MEMBER(h8_timer16_device::tisr_w)
+void h8_timer16_device::tisr_w(offs_t offset, uint8_t data)
{
if(V>=1) logerror("tisr%c_w %02x\n", 'a'+offset, data);
for(int i=0; i<timer_count; i++)
timer_channel[i]->tisr_w(offset, data >> i);
}
-READ8_MEMBER(h8_timer16_device::tisrc_r)
+uint8_t h8_timer16_device::tisrc_r()
{
- return tisr_r(space, 2, mem_mask);
+ return tisr_r(2);
}
-WRITE8_MEMBER(h8_timer16_device::tisrc_w)
+void h8_timer16_device::tisrc_w(uint8_t data)
{
- tisr_w(space, 2, data, mem_mask);
+ tisr_w(2, data);
}
-WRITE8_MEMBER(h8_timer16_device::tolr_w)
+void h8_timer16_device::tolr_w(uint8_t data)
{
if(V>=1) logerror("tocr_w %02x\n", data);
}