mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
bus/bml3: standardize read/write function names
This commit is contained in:
parent
4a92506fd3
commit
4ab50f53c2
8 changed files with 21 additions and 21 deletions
|
@ -41,12 +41,12 @@ const tiny_rom_entry *bml3bus_kanji_device::device_rom_region() const
|
||||||
return ROM_NAME( kanji );
|
return ROM_NAME( kanji );
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t bml3bus_kanji_device::bml3_kanji_r(offs_t offset)
|
uint8_t bml3bus_kanji_device::read(offs_t offset)
|
||||||
{
|
{
|
||||||
return m_rom[((uint32_t)m_kanji_addr << 1) + offset];
|
return m_rom[((uint32_t)m_kanji_addr << 1) + offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
void bml3bus_kanji_device::bml3_kanji_w(offs_t offset, uint8_t data)
|
void bml3bus_kanji_device::write(offs_t offset, uint8_t data)
|
||||||
{
|
{
|
||||||
m_kanji_addr &= (0xff << (offset*8));
|
m_kanji_addr &= (0xff << (offset*8));
|
||||||
m_kanji_addr |= (data << ((offset^1)*8));
|
m_kanji_addr |= (data << ((offset^1)*8));
|
||||||
|
@ -77,7 +77,7 @@ void bml3bus_kanji_device::device_start()
|
||||||
void bml3bus_kanji_device::map_io(address_space_installer &space)
|
void bml3bus_kanji_device::map_io(address_space_installer &space)
|
||||||
{
|
{
|
||||||
// install into memory
|
// install into memory
|
||||||
space.install_readwrite_handler(0xff75, 0xff76, read8sm_delegate(*this, FUNC(bml3bus_kanji_device::bml3_kanji_r)), write8sm_delegate(*this, FUNC(bml3bus_kanji_device::bml3_kanji_w)));
|
space.install_readwrite_handler(0xff75, 0xff76, read8sm_delegate(*this, FUNC(bml3bus_kanji_device::read)), write8sm_delegate(*this, FUNC(bml3bus_kanji_device::write)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void bml3bus_kanji_device::device_reset()
|
void bml3bus_kanji_device::device_reset()
|
||||||
|
|
|
@ -27,8 +27,8 @@ public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
uint8_t bml3_kanji_r(offs_t offset);
|
uint8_t read(offs_t offset);
|
||||||
void bml3_kanji_w(offs_t offset, uint8_t data);
|
void write(offs_t offset, uint8_t data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
|
|
@ -79,12 +79,12 @@ const tiny_rom_entry *bml3bus_mp1802_device::device_rom_region() const
|
||||||
return ROM_NAME( mp1802 );
|
return ROM_NAME( mp1802 );
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t bml3bus_mp1802_device::bml3_mp1802_r()
|
uint8_t bml3bus_mp1802_device::read()
|
||||||
{
|
{
|
||||||
return (m_fdc->drq_r() ? 0x00 : 0x80) | (m_fdc->intrq_r() ? 0x00 : 0x40);
|
return (m_fdc->drq_r() ? 0x00 : 0x80) | (m_fdc->intrq_r() ? 0x00 : 0x40);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bml3bus_mp1802_device::bml3_mp1802_w(uint8_t data)
|
void bml3bus_mp1802_device::write(uint8_t data)
|
||||||
{
|
{
|
||||||
floppy_image_device *floppy = m_floppy[data & 0x03]->get_device();
|
floppy_image_device *floppy = m_floppy[data & 0x03]->get_device();
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void bml3bus_mp1802_device::device_start()
|
||||||
|
|
||||||
void bml3bus_mp1802_device::device_reset()
|
void bml3bus_mp1802_device::device_reset()
|
||||||
{
|
{
|
||||||
bml3_mp1802_w(0);
|
write(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bml3bus_mp1802_device::map_exrom(address_space_installer &space)
|
void bml3bus_mp1802_device::map_exrom(address_space_installer &space)
|
||||||
|
@ -139,5 +139,5 @@ void bml3bus_mp1802_device::map_io(address_space_installer &space)
|
||||||
{
|
{
|
||||||
// install into memory
|
// install into memory
|
||||||
space.install_readwrite_handler(0xff00, 0xff03, read8sm_delegate(*m_fdc, FUNC(mb8866_device::read)), write8sm_delegate(*m_fdc, FUNC(mb8866_device::write)));
|
space.install_readwrite_handler(0xff00, 0xff03, read8sm_delegate(*m_fdc, FUNC(mb8866_device::read)), write8sm_delegate(*m_fdc, FUNC(mb8866_device::write)));
|
||||||
space.install_readwrite_handler(0xff04, 0xff04, read8smo_delegate(*this, FUNC(bml3bus_mp1802_device::bml3_mp1802_r)), write8smo_delegate(*this, FUNC(bml3bus_mp1802_device::bml3_mp1802_w)));
|
space.install_readwrite_handler(0xff04, 0xff04, read8smo_delegate(*this, FUNC(bml3bus_mp1802_device::read)), write8smo_delegate(*this, FUNC(bml3bus_mp1802_device::write)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,8 @@ public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
bml3bus_mp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
bml3bus_mp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
uint8_t bml3_mp1802_r();
|
uint8_t read();
|
||||||
void bml3_mp1802_w(uint8_t data);
|
void write(uint8_t data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
|
|
@ -66,14 +66,14 @@ const tiny_rom_entry *bml3bus_mp1805_device::device_rom_region() const
|
||||||
return ROM_NAME( mp1805 );
|
return ROM_NAME( mp1805 );
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t bml3bus_mp1805_device::bml3_mp1805_r()
|
uint8_t bml3bus_mp1805_device::read()
|
||||||
{
|
{
|
||||||
// TODO: read supported or not?
|
// TODO: read supported or not?
|
||||||
// return mc6843_drq_r(m_mc6843) ? 0x00 : 0x80;
|
// return mc6843_drq_r(m_mc6843) ? 0x00 : 0x80;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bml3bus_mp1805_device::bml3_mp1805_w(uint8_t data)
|
void bml3bus_mp1805_device::write(uint8_t data)
|
||||||
{
|
{
|
||||||
// b7 b6 b5 b4 b3 b2 b1 b0
|
// b7 b6 b5 b4 b3 b2 b1 b0
|
||||||
// MT ? ? ? D3 D2 D1 D0
|
// MT ? ? ? D3 D2 D1 D0
|
||||||
|
@ -159,5 +159,5 @@ void bml3bus_mp1805_device::map_io(address_space_installer &space)
|
||||||
{
|
{
|
||||||
// install into memory
|
// install into memory
|
||||||
space.install_device(0xff18, 0xff1f, *m_mc6843, &mc6843_device::map);
|
space.install_device(0xff18, 0xff1f, *m_mc6843, &mc6843_device::map);
|
||||||
space.install_readwrite_handler(0xff20, 0xff20, read8smo_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_r)), write8smo_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_w)));
|
space.install_readwrite_handler(0xff20, 0xff20, read8smo_delegate(*this, FUNC(bml3bus_mp1805_device::read)), write8smo_delegate(*this, FUNC(bml3bus_mp1805_device::write)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
uint8_t bml3_mp1805_r();
|
uint8_t read();
|
||||||
void bml3_mp1805_w(uint8_t data);
|
void write(uint8_t data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
|
|
@ -35,7 +35,7 @@ void bml3bus_rtc_device::device_add_mconfig(machine_config &config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint8_t bml3bus_rtc_device::bml3_rtc_r(offs_t offset)
|
uint8_t bml3bus_rtc_device::read(offs_t offset)
|
||||||
{
|
{
|
||||||
uint8_t data = 0x00;
|
uint8_t data = 0x00;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ uint8_t bml3bus_rtc_device::bml3_rtc_r(offs_t offset)
|
||||||
return data | 0xf0; // return low nibble only
|
return data | 0xf0; // return low nibble only
|
||||||
}
|
}
|
||||||
|
|
||||||
void bml3bus_rtc_device::bml3_rtc_w(offs_t offset, uint8_t data)
|
void bml3bus_rtc_device::write(offs_t offset, uint8_t data)
|
||||||
{
|
{
|
||||||
switch (offset)
|
switch (offset)
|
||||||
{
|
{
|
||||||
|
@ -105,5 +105,5 @@ void bml3bus_rtc_device::device_start()
|
||||||
void bml3bus_rtc_device::map_io(address_space_installer &space)
|
void bml3bus_rtc_device::map_io(address_space_installer &space)
|
||||||
{
|
{
|
||||||
// install into memory
|
// install into memory
|
||||||
space.install_readwrite_handler(0xff38, 0xff3a, read8sm_delegate(*this, FUNC(bml3bus_rtc_device::bml3_rtc_r)), write8sm_delegate(*this, FUNC(bml3bus_rtc_device::bml3_rtc_w)));
|
space.install_readwrite_handler(0xff38, 0xff3a, read8sm_delegate(*this, FUNC(bml3bus_rtc_device::read)), write8sm_delegate(*this, FUNC(bml3bus_rtc_device::write)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
bml3bus_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
bml3bus_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
uint8_t bml3_rtc_r(offs_t offset);
|
uint8_t read(offs_t offset);
|
||||||
void bml3_rtc_w(offs_t offset, uint8_t data);
|
void write(offs_t offset, uint8_t data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
|
|
Loading…
Reference in a new issue