4646#include " machine/z80sio.h"
4747
4848// Debugging
49- #undef VERBOSE
50- #define VERBOSE 0
49+ // #define VERBOSE 1
5150#include " logmacro.h"
5251
5352namespace {
@@ -154,7 +153,7 @@ class base_98628_9_device :
154153 bool m_rt_in;
155154 uint8_t m_modem_ctrl;
156155 uint8_t m_modem_status;
157- uint8_t m_low_ram[ LOW_RAM_SIZE ];
156+ uint8_t m_low_ram[LOW_RAM_SIZE];
158157};
159158
160159base_98628_9_device::base_98628_9_device (const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
@@ -385,14 +384,16 @@ void base_98628_9_device::cpu_io_mem_map(address_map &map)
385384
386385void base_98628_9_device::install_68k_map (offs_t base_addr)
387386{
388- dio ().install_memory (0x0000 + base_addr,
389- 0x0007 + base_addr,
390- read16sm_delegate (*this , [this ](offs_t addr) { return reg_r (addr); }, " " ),
391- write16sm_delegate (*this , [this ](offs_t addr, uint16_t data) { reg_w (addr, uint8_t (data)); }, " " ));
392- dio ().install_memory (0x4000 + base_addr,
393- 0x7fff + base_addr,
394- read16sm_delegate (*this , FUNC (base_98628_9_device::low_ram_r_68k)),
395- write16sm_delegate (*this , FUNC (base_98628_9_device::low_ram_w_68k)));
387+ dio ().install_memory (
388+ 0x0000 + base_addr,
389+ 0x0007 + base_addr,
390+ read16sm_delegate (*this , NAME ([this ] (offs_t addr) { return reg_r (addr); })),
391+ write16sm_delegate (*this , NAME ([this ] (offs_t addr, uint16_t data) { reg_w (addr, uint8_t (data)); })));
392+ dio ().install_memory (
393+ 0x4000 + base_addr,
394+ 0x7fff + base_addr,
395+ read16sm_delegate (*this , FUNC (base_98628_9_device::low_ram_r_68k)),
396+ write16sm_delegate (*this , FUNC (base_98628_9_device::low_ram_w_68k)));
396397}
397398
398399uint8_t base_98628_9_device::reg_r (offs_t addr)
@@ -503,7 +504,7 @@ uint8_t base_98628_9_device::low_ram_r_z80(offs_t addr)
503504 m_sio->ctsb_w (m_ctsb);
504505 LOG (" CTSB 0\n " );
505506 }
506- return m_low_ram[ addr & (LOW_RAM_SIZE - 1 ) ];
507+ return m_low_ram[addr & (LOW_RAM_SIZE - 1 )];
507508}
508509
509510uint16_t base_98628_9_device::low_ram_r_68k (offs_t addr)
@@ -514,7 +515,7 @@ uint16_t base_98628_9_device::low_ram_r_68k(offs_t addr)
514515 update_irq ();
515516 LOG (" IRQ 0\n " );
516517 }
517- return m_low_ram[ addr & (LOW_RAM_SIZE - 1 ) ];
518+ return m_low_ram[addr & (LOW_RAM_SIZE - 1 )];
518519}
519520
520521void base_98628_9_device::low_ram_w_z80 (offs_t addr, uint8_t data)
@@ -525,7 +526,7 @@ void base_98628_9_device::low_ram_w_z80(offs_t addr, uint8_t data)
525526 LOG (" IRQ 1\n " );
526527 update_irq ();
527528 }
528- m_low_ram[ addr & (LOW_RAM_SIZE - 1 ) ] = data;
529+ m_low_ram[addr & (LOW_RAM_SIZE - 1 )] = data;
529530}
530531
531532void base_98628_9_device::low_ram_w_68k (offs_t addr, uint16_t data)
@@ -536,7 +537,7 @@ void base_98628_9_device::low_ram_w_68k(offs_t addr, uint16_t data)
536537 LOG (" CTSB 1\n " );
537538 m_sio->ctsb_w (m_ctsb);
538539 }
539- m_low_ram[ addr & (LOW_RAM_SIZE - 1 ) ] = uint8_t (data);
540+ m_low_ram[addr & (LOW_RAM_SIZE - 1 )] = uint8_t (data);
540541}
541542
542543uint8_t base_98628_9_device::sio_r (offs_t addr)
@@ -873,7 +874,7 @@ class dio16_98629_device :
873874 bool m_tx;
874875 bool m_last_tt;
875876 uint8_t m_sr;
876- uint8_t m_high_ram[ HIGH_RAM_SIZE ];
877+ uint8_t m_high_ram[HIGH_RAM_SIZE];
877878};
878879
879880void dio16_98629_device::device_start ()
@@ -995,20 +996,21 @@ void dio16_98629_device::cpu_program_mem_map(address_map &map)
995996void dio16_98629_device::install_68k_map (offs_t base_addr)
996997{
997998 base_98628_9_device::install_68k_map (base_addr);
998- dio ().install_memory (0x8000 + base_addr,
999- 0xbfff + base_addr,
1000- read16sm_delegate (*this , [this ](offs_t addr) { return high_ram_r_z80 (addr); }, " " ),
1001- write16sm_delegate (*this , [this ](offs_t addr, uint16_t data) { high_ram_w_z80 (addr, uint8_t (data)); }, " " ));
999+ dio ().install_memory (
1000+ 0x8000 + base_addr,
1001+ 0xbfff + base_addr,
1002+ read16sm_delegate (*this , NAME ([this ] (offs_t addr) { return high_ram_r_z80 (addr); })),
1003+ write16sm_delegate (*this , NAME ([this ] (offs_t addr, uint16_t data) { high_ram_w_z80 (addr, uint8_t (data)); })));
10021004}
10031005
10041006uint8_t dio16_98629_device::high_ram_r_z80 (offs_t addr)
10051007{
1006- return m_high_ram[ addr & (HIGH_RAM_SIZE - 1 ) ];
1008+ return m_high_ram[addr & (HIGH_RAM_SIZE - 1 )];
10071009}
10081010
10091011void dio16_98629_device::high_ram_w_z80 (offs_t addr, uint8_t data)
10101012{
1011- m_high_ram[ addr & (HIGH_RAM_SIZE - 1 ) ] = data;
1013+ m_high_ram[addr & (HIGH_RAM_SIZE - 1 )] = data;
10121014}
10131015
10141016void dio16_98629_device::tx_out (int state)
0 commit comments