From ceb71bc35496cec4bb775776734f5dac0bf4ba80 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Tue, 12 May 2020 19:15:17 -0700 Subject: [PATCH 01/69] sgi_mips: fix a few issues --- hash/sgi_mips.xml | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/hash/sgi_mips.xml b/hash/sgi_mips.xml index cd44e794a22..98a7dd1a765 100644 --- a/hash/sgi_mips.xml +++ b/hash/sgi_mips.xml @@ -1398,7 +1398,7 @@ license:CC0 - + @@ -1411,7 +1411,7 @@ license:CC0 - + @@ -1681,19 +1681,6 @@ license:CC0 - - IRIX 6.5 Applications August 2001 - 2001 - Silicon Graphics - - - - - - - - - @@ -2074,6 +2061,7 @@ license:CC0 1995 Silicon Graphics + @@ -2108,19 +2096,6 @@ license:CC0 - - IRIX 5.3 for Indy R4000, R4400, R4600 (100-200 MHz) - 1995 - Silicon Graphics - - - - - - - - - IRIX 6.0.1 1994 From ee08de5a0303aff58b514bbd2d885be853794aa5 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 13 May 2020 14:49:02 +0200 Subject: [PATCH 02/69] i186.cpp: initialized variable as needed to avoid timing regression in some leland.cpp games in debug devnoclear builds (nw) --- src/devices/cpu/i86/i186.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp index 468283588e7..67b23280d86 100644 --- a/src/devices/cpu/i86/i186.cpp +++ b/src/devices/cpu/i86/i186.cpp @@ -677,6 +677,7 @@ void i80186_cpu_device::device_start() memset(&m_intr, 0, sizeof(intr_state)); memset(&m_mem, 0, sizeof(mem_state)); m_reloc = 0; + m_last_dma = 0; m_timer[0].int_timer = timer_alloc(TIMER_INT0); m_timer[1].int_timer = timer_alloc(TIMER_INT1); From 0670f5d5002630d47840f854202f5847d9fcff16 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Wed, 13 May 2020 23:11:02 +1000 Subject: [PATCH 03/69] (nw) super80: more cleaning --- src/mame/drivers/super80.cpp | 34 +++++++++++++++------------------- src/mame/includes/super80.h | 16 ++++++++-------- src/mame/video/super80.cpp | 16 ++++++++-------- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp index a2302dc96f5..fb5b369fdde 100644 --- a/src/mame/drivers/super80.cpp +++ b/src/mame/drivers/super80.cpp @@ -256,19 +256,15 @@ void super80v_state::super80v_map(address_map &map) map(0x0800, 0xbfff).ram(); map(0xc000, 0xc7ff).lr8 (NAME([this](u16 offset) { if (!machine().side_effects_disabled()) m_boot_in_progress = false; return m_rom[offset]; })); map(0xc800, 0xefff).lr8 (NAME([this](u16 offset) { return m_rom[offset+0x0800]; })); - map(0xf000, 0xf7ff).lrw8(NAME([this](u16 offset) { return super80v_state::low_r(offset); }), - NAME([this](u16 offset, u8 data) { super80v_state::low_w(offset, data); })); - map(0xf800, 0xffff).lrw8(NAME([this](u16 offset) { return super80v_state::high_r(offset); }), - NAME([this](u16 offset, u8 data) { super80v_state::high_w(offset, data); })); + map(0xf000, 0xf7ff).rw(FUNC(super80v_state::low_r), FUNC(super80v_state::low_w)); + map(0xf800, 0xffff).rw(FUNC(super80v_state::high_r), FUNC(super80v_state::high_w)); } void super80r_state::super80r_map(address_map &map) { super80v_map(map); - map(0xf000, 0xf7ff).lrw8(NAME([this](u16 offset) { return super80r_state::low_r(offset); }), - NAME([this](u16 offset, u8 data) { super80r_state::low_w(offset, data); })); - map(0xf800, 0xffff).lrw8(NAME([this](u16 offset) { return super80r_state::high_r(offset); }), - NAME([this](u16 offset, u8 data) { super80r_state::high_w(offset, data); })); + map(0xf000, 0xf7ff).rw(FUNC(super80r_state::low_r), FUNC(super80r_state::low_w)); + map(0xf800, 0xffff).rw(FUNC(super80r_state::high_r), FUNC(super80r_state::high_w)); } void super80_state::super80_io(address_map &map) @@ -276,10 +272,10 @@ void super80_state::super80_io(address_map &map) map.global_mask(0xff); map.unmap_value_high(); map(0xdc, 0xdc).r("cent_status_in", FUNC(input_buffer_device::read)); - map(0xdc, 0xdc).lw8(NAME([this](u8 data) { super80_state::portdc_w(data); })); - map(0xe0, 0xe0).mirror(0x14).lw8(NAME([this](u8 data) { super80_state::portf0_w(data); })); - map(0xe1, 0xe1).mirror(0x14).lw8(NAME([this](u8 data) { super80_state::portf1_w(data); })); - map(0xe2, 0xe2).mirror(0x14).lr8(NAME([this]() { return super80_state::portf2_r(); })); + map(0xdc, 0xdc).w(FUNC(super80_state::portdc_w)); + map(0xe0, 0xe0).mirror(0x14).w(FUNC(super80_state::portf0_w)); + map(0xe1, 0xe1).mirror(0x14).w(FUNC(super80_state::portf1_w)); + map(0xe2, 0xe2).mirror(0x14).r(FUNC(super80_state::portf2_r)); map(0xf8, 0xfb).mirror(0x04).rw(m_pio, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt)); } @@ -288,10 +284,10 @@ void super80_state::super80e_io(address_map &map) map.global_mask(0xff); map.unmap_value_high(); map(0xbc, 0xbc).r("cent_status_in", FUNC(input_buffer_device::read)); - map(0xbc, 0xbc).lw8(NAME([this](u8 data) { super80_state::portdc_w(data); })); - map(0xe0, 0xe0).mirror(0x14).lw8(NAME([this](u8 data) { super80_state::portf0_w(data); })); - map(0xe1, 0xe1).mirror(0x14).lw8(NAME([this](u8 data) { super80_state::portf1_w(data); })); - map(0xe2, 0xe2).mirror(0x14).lr8(NAME([this]() { return super80_state::portf2_r(); })); + map(0xbc, 0xbc).w(FUNC(super80_state::portdc_w)); + map(0xe0, 0xe0).mirror(0x14).w(FUNC(super80_state::portf0_w)); + map(0xe1, 0xe1).mirror(0x14).w(FUNC(super80_state::portf1_w)); + map(0xe2, 0xe2).mirror(0x14).r(FUNC(super80_state::portf2_r)); map(0xf8, 0xfb).mirror(0x04).rw(m_pio, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt)); } @@ -307,9 +303,9 @@ void super80v_state::super80v_io(address_map &map) map(0x3e, 0x3e).r(FUNC(super80v_state::port3e_r)); map(0x3f, 0x3f).w(FUNC(super80v_state::port3f_w)); map(0xdc, 0xdc).r("cent_status_in", FUNC(input_buffer_device::read)); - map(0xdc, 0xdc).lw8(NAME([this](u8 data) { super80v_state::portdc_w(data); })); - map(0xe0, 0xe0).mirror(0x14).lw8(NAME([this](u8 data) { super80v_state::portf0_w(data); })); - map(0xe2, 0xe2).mirror(0x14).lr8(NAME([this]() { return super80v_state::portf2_r(); })); + map(0xdc, 0xdc).w(FUNC(super80v_state::portdc_w)); + map(0xe0, 0xe0).mirror(0x14).w(FUNC(super80v_state::portf0_w)); + map(0xe2, 0xe2).mirror(0x14).r(FUNC(super80v_state::portf2_r)); map(0xf8, 0xfb).mirror(0x04).rw(m_pio, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt)); } diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h index 39e6d7a3ae8..940c312f423 100644 --- a/src/mame/includes/super80.h +++ b/src/mame/includes/super80.h @@ -157,10 +157,10 @@ protected: private: void machine_reset() override; void machine_start() override; - void low_w(u16 offset, u8 data); - void high_w(u16 offset, u8 data); - u8 low_r(u16 offset); - u8 high_r(u16 offset); + void low_w(offs_t offset, u8 data); + void high_w(offs_t offset, u8 data); + u8 low_r(offs_t offset); + u8 high_r(offs_t offset); }; class super80r_state : public super80v_state @@ -174,11 +174,11 @@ private: void machine_reset() override; void machine_start() override; - void low_w(u16 offset, u8 data); - void high_w(u16 offset, u8 data); + void low_w(offs_t offset, u8 data); + void high_w(offs_t offset, u8 data); void super80r_map(address_map &map); - u8 low_r(u16 offset); - u8 high_r(u16 offset); + u8 low_r(offs_t offset); + u8 high_r(offs_t offset); }; diff --git a/src/mame/video/super80.cpp b/src/mame/video/super80.cpp index 1763f36a2f6..ac91ecf3cc0 100644 --- a/src/mame/video/super80.cpp +++ b/src/mame/video/super80.cpp @@ -295,28 +295,28 @@ void super80_state::portf1_w(u8 data) ---------------------------------------------------------------*/ // we place the colour ram at m_ram[0x9000], and the videoram at m_ram[0x8000]. -u8 super80r_state::low_r(u16 offset) +u8 super80r_state::low_r(offs_t offset) { return m_ram[offset+0x8000]; } -void super80r_state::low_w(u16 offset, u8 data) +void super80r_state::low_w(offs_t offset, u8 data) { m_ram[offset+0x8000] = data; // video } -u8 super80r_state::high_r(u16 offset) +u8 super80r_state::high_r(offs_t offset) { return m_ram[offset+0x8800]; // video } -void super80r_state::high_w(u16 offset, u8 data) +void super80r_state::high_w(offs_t offset, u8 data) { m_ram[offset+0x8800] = data; // video m_ram[offset+0xf800] = data; // pcg } -u8 super80v_state::low_r(u16 offset) +u8 super80v_state::low_r(offs_t offset) { if (BIT(m_portf0, 2)) return m_ram[offset+0x8000]; // video @@ -324,7 +324,7 @@ u8 super80v_state::low_r(u16 offset) return m_ram[offset+0x9000]; // colour } -void super80v_state::low_w(u16 offset, u8 data) +void super80v_state::low_w(offs_t offset, u8 data) { if (BIT(m_portf0, 2)) m_ram[offset+0x8000] = data; // video @@ -332,7 +332,7 @@ void super80v_state::low_w(u16 offset, u8 data) m_ram[offset+0x9000] = data; // colour } -u8 super80v_state::high_r(u16 offset) +u8 super80v_state::high_r(offs_t offset) { if (!BIT(m_portf0, 2)) return m_ram[offset+0x9800]; // colour @@ -343,7 +343,7 @@ u8 super80v_state::high_r(u16 offset) return m_p_chargen[offset]; // char rom } -void super80v_state::high_w(u16 offset, u8 data) +void super80v_state::high_w(offs_t offset, u8 data) { if (!BIT(m_portf0, 2)) m_ram[offset+0x9800] = data; // colour From e3ca0602c51a93e0d754ad892695812b021e8472 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 13 May 2020 15:53:38 +0200 Subject: [PATCH 04/69] atarisy1: some of the bios roms were wrong (nw) --- src/mame/drivers/atarisy1.cpp | 59 ++++++++++++++--------------------- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index 9746a600f67..519e7344bfe 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -883,24 +883,24 @@ void atarisy1_state::roadb110(machine_config &config) ROM_LOAD16_BYTE_BIOS(0, "136032.205.l13", 0x00000, 0x04000, CRC(88d0be26) SHA1(d124045eccc562ff0423b23a240e27ad740fa0c9) ) \ ROM_LOAD16_BYTE_BIOS(0, "136032.206.l12", 0x00001, 0x04000, CRC(3c79ef05) SHA1(20fdca7131478e1ee12691bdafd2d5bb74cbd16f) ) \ ROM_SYSTEM_BIOS( 1, "ttl1", "TTL Motherboard (Rev 1)" ) \ - ROM_LOAD16_BYTE_BIOS(1, "136032.105.l13", 0x00000, 0x04000, CRC(690b37d3) SHA1(547372f1044a3442aa52fcd2b3546540aba59344) ) \ + ROM_LOAD16_BYTE_BIOS(1, "136032.105.l13", 0x00000, 0x04000, CRC(79021d3c) SHA1(85febd34bcb166fc3326b5e5e4e80e157b660a08) ) \ ROM_LOAD16_BYTE_BIOS(1, "136032.106.l12", 0x00001, 0x04000, CRC(76ee86c4) SHA1(cbcd424510435a04e9041967a13781fd19b0f2c4) ) \ ROM_SYSTEM_BIOS( 2, "lsi", "LSI Motherboard" ) \ ROM_LOAD16_BYTE_BIOS(2, "136032.114.j11", 0x00000, 0x04000, CRC(195c54ad) SHA1(d7cda3cd3db4c6f77074ca05e96ae11b62e048b7) ) \ - ROM_LOAD16_BYTE_BIOS(2, "136032.115.j10", 0x00001, 0x04000, CRC(7275b4dc) SHA1(0896ab37ea832a1335046353612c1b4c86d8d040) ) + ROM_LOAD16_BYTE_BIOS(2, "136032.115.j10", 0x00001, 0x04000, CRC(9af9fe29) SHA1(1d5077662e4111ece9f8a5124394dad8b1abdc13) ) #define MOTHERBOARD_ALPHA \ ROM_LOAD_BIOS(0, "136032.104.f5", 0x00000, 0x02000, CRC(7a29dc07) SHA1(72ba464da01bd6d3a91b8d9997d5ac14b6f47aad) ) \ ROM_LOAD_BIOS(1, "136032.104.f5", 0x00000, 0x02000, CRC(7a29dc07) SHA1(72ba464da01bd6d3a91b8d9997d5ac14b6f47aad) ) \ - ROM_LOAD_BIOS(2, "136032.107.b2", 0x00000, 0x02000, CRC(315e4bea) SHA1(a00ea23fbdbf075f8f3f184275be83387e8ac82b) ) /* is this bad? it just seems to be missing upper nibbles and hence some of the planes? */ + ROM_LOAD_BIOS(2, "136032.107.b2", 0x00000, 0x02000, CRC(7a29dc07) SHA1(72ba464da01bd6d3a91b8d9997d5ac14b6f47aad) ) #define MOTHERBOARD_PROMS \ - ROM_LOAD_BIOS(0, "136032.101.e3", 0x00000, 0x00100, CRC(7e84972a) SHA1(84d422b53547271e3a07342704a05ef481db3f99) ) \ - ROM_LOAD_BIOS(0, "136032.102.e5", 0x00000, 0x00100, CRC(ebf1e0ae) SHA1(2d327e78832edd67ca3909c25b8c8c839637a1ed) ) \ - ROM_LOAD_BIOS(0, "136032.103.f7.bin", 0x00000, 0x000eb, CRC(92d6a0b4) SHA1(0a42a4816c89447b16e1f3245409591efea98a4a) ) /* N82S153 */ \ - ROM_LOAD_BIOS(1, "136032.101.e3", 0x00000, 0x00100, CRC(7e84972a) SHA1(84d422b53547271e3a07342704a05ef481db3f99) ) \ - ROM_LOAD_BIOS(1, "136032.102.e5", 0x00000, 0x00100, CRC(ebf1e0ae) SHA1(2d327e78832edd67ca3909c25b8c8c839637a1ed) ) \ - ROM_LOAD_BIOS(1, "136032.103.f7.bin", 0x00000, 0x000eb, CRC(92d6a0b4) SHA1(0a42a4816c89447b16e1f3245409591efea98a4a) ) /* N82S153 */ + ROM_LOAD_BIOS(0, "136032.101.e3", 0x00000, 0x00100, CRC(7e84972a) SHA1(84d422b53547271e3a07342704a05ef481db3f99) ) \ + ROM_LOAD_BIOS(0, "136032.102.e5", 0x00000, 0x00100, CRC(ebf1e0ae) SHA1(2d327e78832edd67ca3909c25b8c8c839637a1ed) ) \ + ROM_LOAD_BIOS(0, "136032.103.f7", 0x00000, 0x000eb, CRC(92d6a0b4) SHA1(0a42a4816c89447b16e1f3245409591efea98a4a) ) /* N82S153 */ \ + ROM_LOAD_BIOS(1, "136032.101.e3", 0x00000, 0x00100, CRC(7e84972a) SHA1(84d422b53547271e3a07342704a05ef481db3f99) ) \ + ROM_LOAD_BIOS(1, "136032.102.e5", 0x00000, 0x00100, CRC(ebf1e0ae) SHA1(2d327e78832edd67ca3909c25b8c8c839637a1ed) ) \ + ROM_LOAD_BIOS(1, "136032.103.f7", 0x00000, 0x000eb, CRC(92d6a0b4) SHA1(0a42a4816c89447b16e1f3245409591efea98a4a) ) /* N82S153 */ ROM_START( atarisy1 ) ROM_REGION( 0x88000, "maincpu", 0 ) /* 8.5*64k for 68000 code & slapstic ROM */ @@ -1840,31 +1840,29 @@ Dumped from the original Atari // different IC positions and different GFX rom configuration. ROM_START( roadblstgu ) ROM_REGION( 0x88000, "maincpu", 0 ) /* 8.5*64k for 68000 code & slapstic ROM */ - // expects bios roms 114/115, does not work properly with others (corrupt insert coin text) - ROM_LOAD16_BYTE( "136032-114.j7", 0x00000, 0x04000, CRC(195c54ad) SHA1(d7cda3cd3db4c6f77074ca05e96ae11b62e048b7) ) - ROM_LOAD16_BYTE( "136032-115.j8", 0x00001, 0x04000, CRC(7275b4dc) SHA1(0896ab37ea832a1335046353612c1b4c86d8d040) ) + MOTHERBOARD_BIOS + ROM_DEFAULT_BIOS("lsi") // only works with LSI BIOS ROM_LOAD16_BYTE( "136048-1257.c11", 0x010000, 0x008000, CRC(604a5cc0) SHA1(a057a2e47ac7b7c727e9c1bfce28ba955ce75442) ) ROM_LOAD16_BYTE( "136048-1258.a11", 0x010001, 0x008000, CRC(3d10929d) SHA1(aa4d568e5d5b62fb8ea11094bad78bb8f713404e) ) ROM_LOAD16_BYTE( "136048-1259.c13", 0x020000, 0x008000, CRC(b9c807ac) SHA1(ca955790c98037045aa49425392581f21d33caa9) ) ROM_LOAD16_BYTE( "136048-1260.a13", 0x020001, 0x008000, CRC(eaeb1196) SHA1(82bf14244b342c97adde893f19a050baab30ab1e) ) - - ROM_LOAD16_BYTE( "136048-1163.c12", 0x050000, 0x008000, CRC(054273b2) SHA1(4c820c00d3b67825c361edc9615c89c2a9a1c6d3) )// - ROM_LOAD16_BYTE( "136048-1164.a12", 0x050001, 0x008000, CRC(49181bec) SHA1(79e042e4f079a9806ef12c5c8dfdc2e6e4f90011) )// - ROM_LOAD16_BYTE( "136048-1165.c14", 0x060000, 0x008000, CRC(f63dc29a) SHA1(e54637b9d0b271aa9b58e89a442ac03ec812e1eb) )// - ROM_LOAD16_BYTE( "136048-1166.a14", 0x060001, 0x008000, CRC(b1fc5955) SHA1(b860213a9b5ae7547c258812045e71795129598f) )// - ROM_LOAD16_BYTE( "136048-1167.c16", 0x070000, 0x008000, CRC(c6d30d6f) SHA1(acb552976b2dcfa585097ea246ca88034549c8ab) )// - ROM_LOAD16_BYTE( "136048-1168.a16", 0x070001, 0x008000, CRC(16951020) SHA1(5e5a6ad4ae87723060232c7ecb837f5fc2a9be68) )// - ROM_LOAD16_BYTE( "136048-2147.c17", 0x080000, 0x004000, CRC(5c1adf67) SHA1(53838a2f5059797991aa337a7bec32f7e694610a) )// - ROM_LOAD16_BYTE( "136048-2148.a17", 0x080001, 0x004000, CRC(d9ac8966) SHA1(7d056c1eb8184b4261c5713b0d5799b2fd8bde2a) )// + ROM_LOAD16_BYTE( "136048-1163.c12", 0x050000, 0x008000, CRC(054273b2) SHA1(4c820c00d3b67825c361edc9615c89c2a9a1c6d3) ) + ROM_LOAD16_BYTE( "136048-1164.a12", 0x050001, 0x008000, CRC(49181bec) SHA1(79e042e4f079a9806ef12c5c8dfdc2e6e4f90011) ) + ROM_LOAD16_BYTE( "136048-1165.c14", 0x060000, 0x008000, CRC(f63dc29a) SHA1(e54637b9d0b271aa9b58e89a442ac03ec812e1eb) ) + ROM_LOAD16_BYTE( "136048-1166.a14", 0x060001, 0x008000, CRC(b1fc5955) SHA1(b860213a9b5ae7547c258812045e71795129598f) ) + ROM_LOAD16_BYTE( "136048-1167.c16", 0x070000, 0x008000, CRC(c6d30d6f) SHA1(acb552976b2dcfa585097ea246ca88034549c8ab) ) + ROM_LOAD16_BYTE( "136048-1168.a16", 0x070001, 0x008000, CRC(16951020) SHA1(5e5a6ad4ae87723060232c7ecb837f5fc2a9be68) ) + ROM_LOAD16_BYTE( "136048-2147.c17", 0x080000, 0x004000, CRC(5c1adf67) SHA1(53838a2f5059797991aa337a7bec32f7e694610a) ) + ROM_LOAD16_BYTE( "136048-2148.a17", 0x080001, 0x004000, CRC(d9ac8966) SHA1(7d056c1eb8184b4261c5713b0d5799b2fd8bde2a) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ ROM_LOAD( "136048-1149.e14", 0x4000, 0x4000, CRC(2e54f95e) SHA1(5056ddec3c88384ada1d2ee9b1532b9ba9f34e08) ) - ROM_LOAD( "136048-1169.e15", 0x8000, 0x4000, CRC(ee318052) SHA1(f66ff39499697b7439dc62567e727fec769c1505) )// - ROM_LOAD( "136048-1170.e17", 0xc000, 0x4000, CRC(75dfec33) SHA1(3092348b98419bb23181d21406733d5d21cd3d82) )// + ROM_LOAD( "136048-1169.e15", 0x8000, 0x4000, CRC(ee318052) SHA1(f66ff39499697b7439dc62567e727fec769c1505) ) + ROM_LOAD( "136048-1170.e17", 0xc000, 0x4000, CRC(75dfec33) SHA1(3092348b98419bb23181d21406733d5d21cd3d82) ) ROM_REGION( 0x2000, "alpha", 0 ) - ROM_LOAD( "136032.107.b2", 0x00000, 0x02000, CRC(7a29dc07) SHA1(72ba464da01bd6d3a91b8d9997d5ac14b6f47aad) ) + MOTHERBOARD_ALPHA ROM_REGION( 0x380000, "tiles", ROMREGION_INVERT | ROMREGION_ERASEFF ) ROM_LOAD( "136048-1101.b4", 0x000000, 0x008000, CRC(fe342d27) SHA1(72deac16ab9b6b811f49d70d700d6bc3a904f9d5) ) /* bank 1, plane 0 */// @@ -1907,11 +1905,7 @@ ROM_START( roadblstgu ) ROM_LOAD( "136048-1174.a7", 0x000000, 0x000200, CRC(db4a4d53) SHA1(c5468f3585ec9bc23c9ee990b3ae3738b0309823) )// ROM_LOAD( "136048-1173.a5", 0x000200, 0x000200, CRC(c80574af) SHA1(9a3dc83f70e79915ce0db3e6e69b5dcfee3acb6f) )// - // FIXME: this game requires the LSI BIOS, so why are we loading the PROMs that are only present on TTL boards? ROM_REGION( 0x201, "motherbrd_proms", 0) /* Motherboard PROM's (Only used by TTL version.) */ - ROM_SYSTEM_BIOS( 0, "ttl", "TTL Motherboard (Rev 2)" ) - ROM_SYSTEM_BIOS( 1, "ttl1", "TTL Motherboard (Rev 1)" ) - ROM_SYSTEM_BIOS( 2, "lsi", "LSI Motherboard" ) MOTHERBOARD_PROMS ROM_END @@ -2332,8 +2326,8 @@ Note: The text on the board says "cocktail" but I suppose this is the cockpit ve ROM_START( roadblstcg ) ROM_REGION( 0x88000, "maincpu", 0 ) /* 8.5*64k for 68000 code & slapstic ROM */ - ROM_LOAD16_BYTE( "136032-117-l9", 0x000001, 0x004000, CRC(9af9fe29) SHA1(1d5077662e4111ece9f8a5124394dad8b1abdc13) ) // alt bios roms? (to put in bios structure, or are they specific to this set?) - ROM_LOAD16_BYTE( "136032-116.m9", 0x000000, 0x004000, CRC(195c54ad) SHA1(d7cda3cd3db4c6f77074ca05e96ae11b62e048b7) ) // + MOTHERBOARD_BIOS + ROM_DEFAULT_BIOS("lsi") // only works with LSI BIOS ROM_LOAD16_BYTE( "136048-1235.7p", 0x010000, 0x008000, CRC(58b2998f) SHA1(7e9f4ca2b15cf60c61e0615f214f9fcc518cb194) ) ROM_LOAD16_BYTE( "136048-1236.8p", 0x010001, 0x008000, CRC(02e23a40) SHA1(6525351669e95dab869c7adc7d992d12d9313aee) ) @@ -2348,7 +2342,6 @@ ROM_START( roadblstcg ) ROM_LOAD16_BYTE( "136048-2147.7k", 0x080000, 0x004000, CRC(5c1adf67) SHA1(53838a2f5059797991aa337a7bec32f7e694610a) ) ROM_LOAD16_BYTE( "136048-2148.8k", 0x080001, 0x004000, CRC(d9ac8966) SHA1(7d056c1eb8184b4261c5713b0d5799b2fd8bde2a) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ ROM_LOAD( "136048-1149.c8", 0x4000, 0x4000, CRC(2e54f95e) SHA1(5056ddec3c88384ada1d2ee9b1532b9ba9f34e08) ) // ROM_LOAD( "136048-1150.d7", 0x8000, 0x8000, CRC(e89e7fc8) SHA1(d944bc27de2f2f675680c62d999cacf84a08fd4b) ) @@ -2402,11 +2395,7 @@ ROM_START( roadblstcg ) ROM_LOAD( "136048-1174.12d", 0x000000, 0x000200, CRC(db4a4d53) SHA1(c5468f3585ec9bc23c9ee990b3ae3738b0309823) ) ROM_LOAD( "136048-1173.2d", 0x000200, 0x000200, CRC(c80574af) SHA1(9a3dc83f70e79915ce0db3e6e69b5dcfee3acb6f) ) - // FIXME: this game requires the LSI BIOS, so why are we loading the PROMs that are only present on TTL boards? ROM_REGION( 0x201, "motherbrd_proms", 0) /* Motherboard PROM's (Only used by TTL version.) */ - ROM_SYSTEM_BIOS( 0, "ttl", "TTL Motherboard (Rev 2)" ) - ROM_SYSTEM_BIOS( 1, "ttl1", "TTL Motherboard (Rev 1)" ) - ROM_SYSTEM_BIOS( 2, "lsi", "LSI Motherboard" ) MOTHERBOARD_PROMS ROM_END From 9200c573bfa2613bb4c944107072b94c765e1fe2 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 13 May 2020 16:07:59 +0200 Subject: [PATCH 05/69] atarisy1: roadblstc1 also expects LSI bios (nw) --- src/mame/drivers/atarisy1.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index 519e7344bfe..f92287789b2 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -2403,6 +2403,8 @@ ROM_END ROM_START( roadblstc1 ) ROM_REGION( 0x88000, "maincpu", 0 ) /* 8.5*64k for 68000 code & slapstic ROM */ MOTHERBOARD_BIOS + ROM_DEFAULT_BIOS("lsi") // only works with LSI BIOS + ROM_LOAD16_BYTE( "136048-2135.7p", 0x010000, 0x008000, CRC(c0ef86df) SHA1(7dd4d2acba55dc001e009c37fae5a97a53ea1e66) ) ROM_LOAD16_BYTE( "136048-2136.8p", 0x010001, 0x008000, CRC(9637e2f0) SHA1(86257e1316356c1a7d86bcf7b57bcaff33ac3df5) ) ROM_LOAD16_BYTE( "136048-2137.7r", 0x020000, 0x008000, CRC(5382ab85) SHA1(1511dfaf8537980e506e4180a23ffcfcfec81451) ) @@ -2540,7 +2542,7 @@ GAME( 1985, indytemp2, indytemp, indytemp, indytemp, atarisy1_state, init_indyt GAME( 1985, indytemp3, indytemp, indytemp, indytemp, atarisy1_state, init_indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 3)", MACHINE_IMPERFECT_SOUND ) GAME( 1985, indytemp4, indytemp, indytemp, indytemp, atarisy1_state, init_indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 4)", MACHINE_IMPERFECT_SOUND ) GAME( 1985, indytempd, indytemp, indytemp, indytemp, atarisy1_state, init_indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (German)", MACHINE_IMPERFECT_SOUND ) -GAME( 1985, indytempc, indytemp, indytemp, indytemc, atarisy1_state, init_indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (Cocktail)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1985, indytempc, indytemp, indytemp, indytemc, atarisy1_state, init_indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (cocktail)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1985, roadrunn, atarisy1, roadrunn, roadrunn, atarisy1r_state, init_roadrunn, ROT0, "Atari Games", "Road Runner (rev 2)", 0 ) GAME( 1985, roadrunn2, roadrunn, roadrunn, roadrunn, atarisy1r_state, init_roadrunn, ROT0, "Atari Games", "Road Runner (rev 1+)", 0 ) @@ -2554,6 +2556,6 @@ GAME( 1987, roadblst2, roadblst, roadb110, roadblst, atarisy1r_state, init_road GAME( 1987, roadblstg1, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 1)", 0 ) GAME( 1987, roadblst1, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 1)", 0 ) GAME( 1987, roadblstc, roadblst, roadb110, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 2)", 0 ) -GAME( 1987, roadblstcg, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, German, rev 1)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1987, roadblstc1, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 1)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1987, roadblstcg, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, German, rev 1)", 0 ) +GAME( 1987, roadblstc1, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 1)", 0 ) GAME( 1987, roadblstgu, roadblst, roadb109, roadblst, atarisy1r_state, init_roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev ?)", 0 ) From 14dde3b67994e0f0bdda3854bf299ad30ace40e1 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 14 May 2020 00:30:23 +1000 Subject: [PATCH 06/69] (nw) sb8085: notes --- src/mame/drivers/sb8085.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mame/drivers/sb8085.cpp b/src/mame/drivers/sb8085.cpp index 240f1ba3404..55c35f0e4a3 100644 --- a/src/mame/drivers/sb8085.cpp +++ b/src/mame/drivers/sb8085.cpp @@ -22,6 +22,14 @@ Space Byte also advertised a 16K static RAM board and a 2708/2716 EPROM programmer for use in this system. + Getting it to work: + 1. Slot CRT: choose Terminal + 2. Reboot + 3. Press E. It will autodetect the baud rate and start up + 4. Now you can enter commands (such as D000,FFF) + 5. If it says KEYBOARD ERROR it doesn't mean a problem with the + keyboard, it means you made a mistake. + ***************************************************************************/ #include "emu.h" From 04c5294ca0f2d3f3ba1e88405a793f9357f5ae01 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 13 May 2020 11:30:19 -0400 Subject: [PATCH 07/69] ams40041: Move PC1512 VDU emulation down into device --- scripts/target/mame/mess.lua | 3 +- src/devices/video/mc6845.cpp | 29 --- src/devices/video/mc6845.h | 11 -- src/mame/drivers/pc1512.cpp | 40 ++-- src/mame/includes/pc1512.h | 42 +---- src/mame/video/{pc1512.cpp => ams40041.cpp} | 191 +++++++++++++------- src/mame/video/ams40041.h | 70 +++++++ 7 files changed, 212 insertions(+), 174 deletions(-) rename src/mame/video/{pc1512.cpp => ams40041.cpp} (72%) create mode 100644 src/mame/video/ams40041.h diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 6141c773412..e5bd0013829 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -1666,7 +1666,8 @@ files { MAME_DIR .. "src/mame/includes/pc1512.h", MAME_DIR .. "src/mame/machine/pc1512kb.cpp", MAME_DIR .. "src/mame/machine/pc1512kb.h", - MAME_DIR .. "src/mame/video/pc1512.cpp", + MAME_DIR .. "src/mame/video/ams40041.cpp", + MAME_DIR .. "src/mame/video/ams40041.h", MAME_DIR .. "src/mame/drivers/pcw.cpp", MAME_DIR .. "src/mame/includes/pcw.h", MAME_DIR .. "src/mame/video/pcw.cpp", diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp index ba0334d8859..a1c371d1623 100644 --- a/src/devices/video/mc6845.cpp +++ b/src/devices/video/mc6845.cpp @@ -66,7 +66,6 @@ DEFINE_DEVICE_TYPE(HD6845S, hd6845s_device, "hd6845s", "Hitachi HD6845S CRTC" DEFINE_DEVICE_TYPE(SY6545_1, sy6545_1_device, "sy6545_1", "Synertek SY6545-1 CRTC") DEFINE_DEVICE_TYPE(SY6845E, sy6845e_device, "sy6845e", "Synertek SY6845E CRTC") DEFINE_DEVICE_TYPE(HD6345, hd6345_device, "hd6345", "Hitachi HD6345 CRTC") -DEFINE_DEVICE_TYPE(AMS40041, ams40041_device, "ams40041", "AMS40041 CRTC") DEFINE_DEVICE_TYPE(AMS40489, ams40489_device, "ams40489", "AMS40489 ASIC (CRTC)") DEFINE_DEVICE_TYPE(MOS8563, mos8563_device, "mos8563", "MOS 8563 VDC") DEFINE_DEVICE_TYPE(MOS8568, mos8568_device, "mos8568", "MOS 8568 VDC") @@ -1348,28 +1347,6 @@ void hd6345_device::device_start() } -void ams40041_device::device_start() -{ - mc6845_device::device_start(); - - m_horiz_char_total = 113; - m_horiz_disp = 80; - m_horiz_sync_pos = 90; - m_sync_width = 10; - m_vert_char_total = 127; - m_vert_total_adj = 6; - m_vert_disp = 100; - m_vert_sync_pos = 112; - m_mode_control = 2; - - m_supports_disp_start_addr_r = false; - m_supports_vert_sync_width = false; - m_supports_status_reg_d5 = false; - m_supports_status_reg_d6 = false; - m_supports_status_reg_d7 = false; - m_supports_transparent = false; -} - void ams40489_device::device_start() { mc6845_device::device_start(); @@ -1505,7 +1482,6 @@ void c6545_1_device::device_reset() { mc6845_device::device_reset(); } void sy6545_1_device::device_reset() { mc6845_device::device_reset(); } void sy6845e_device::device_reset() { mc6845_device::device_reset(); } void hd6345_device::device_reset() { mc6845_device::device_reset(); } -void ams40041_device::device_reset() { mc6845_device::device_reset(); } void ams40489_device::device_reset() { mc6845_device::device_reset(); } void mos8563_device::device_reset() @@ -1586,11 +1562,6 @@ hd6345_device::hd6345_device(const machine_config &mconfig, const char *tag, dev } -ams40041_device::ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : mc6845_device(mconfig, AMS40041, tag, owner, clock) -{ -} - ams40489_device::ams40489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mc6845_device(mconfig, AMS40489, tag, owner, clock) { diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h index 1cfd768cdeb..93cb4a41334 100644 --- a/src/devices/video/mc6845.h +++ b/src/devices/video/mc6845.h @@ -373,16 +373,6 @@ protected: virtual void device_reset() override; }; -class ams40041_device : public mc6845_device -{ -public: - ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - -protected: - virtual void device_start() override; - virtual void device_reset() override; -}; - class ams40489_device : public mc6845_device { public: @@ -481,7 +471,6 @@ DECLARE_DEVICE_TYPE(HD6845S, hd6845s_device) DECLARE_DEVICE_TYPE(SY6545_1, sy6545_1_device) DECLARE_DEVICE_TYPE(SY6845E, sy6845e_device) DECLARE_DEVICE_TYPE(HD6345, hd6345_device) -DECLARE_DEVICE_TYPE(AMS40041, ams40041_device) DECLARE_DEVICE_TYPE(AMS40489, ams40489_device) DECLARE_DEVICE_TYPE(MOS8563, mos8563_device) DECLARE_DEVICE_TYPE(MOS8568, mos8568_device) diff --git a/src/mame/drivers/pc1512.cpp b/src/mame/drivers/pc1512.cpp index da815ee458d..146baf1182b 100644 --- a/src/mame/drivers/pc1512.cpp +++ b/src/mame/drivers/pc1512.cpp @@ -96,6 +96,7 @@ PC1640-HD30: Western Digital 95038 [-chs 615,6,17 -ss 512] #include "includes/pc1512.h" #include "bus/rs232/rs232.h" #include "bus/isa/ega.h" +#include "screen.h" #include "softlist.h" #include "speaker.h" @@ -610,7 +611,7 @@ uint8_t pc1640_state::io_r(offs_t offset) void pc1512_state::pc1512_mem(address_map &map) { map(0x00000, 0x9ffff).ram(); - map(0xb8000, 0xbbfff).rw(FUNC(pc1512_state::video_ram_r), FUNC(pc1512_state::video_ram_w)); + map(0xb8000, 0xbbfff).rw(m_vdu, FUNC(ams40041_device::video_ram_r), FUNC(ams40041_device::video_ram_w)); map(0xfc000, 0xfffff).rom().region(I8086_TAG, 0); } @@ -635,7 +636,7 @@ void pc1512_state::pc1512_io(address_map &map) map(0x080, 0x083).w(FUNC(pc1512_state::dma_page_w)); map(0x0a1, 0x0a1).w(FUNC(pc1512_state::nmi_mask_w)); map(0x378, 0x37b).rw(FUNC(pc1512_state::printer_r), FUNC(pc1512_state::printer_w)); - map(0x3d0, 0x3df).rw(FUNC(pc1512_state::vdu_r), FUNC(pc1512_state::vdu_w)); + map(0x3d0, 0x3df).rw(m_vdu, FUNC(ams40041_device::vdu_r), FUNC(ams40041_device::vdu_w)); map(0x3f0, 0x3f7).m(m_fdc, FUNC(pc_fdc_xt_device::map)); map(0x3f8, 0x3ff).rw(m_uart, FUNC(ins8250_device::ins8250_r), FUNC(ins8250_device::ins8250_w)); } @@ -1092,18 +1093,6 @@ void pc1512_state::machine_start() address_space &program = m_maincpu->space(AS_PROGRAM); program.unmap_readwrite(ram_size, 0x9ffff); } - - // state saving - save_item(NAME(m_toggle)); - save_item(NAME(m_lpen)); - save_item(NAME(m_blink)); - save_item(NAME(m_cursor)); - save_item(NAME(m_blink_ctr)); - save_item(NAME(m_vdu_mode)); - save_item(NAME(m_vdu_color)); - save_item(NAME(m_vdu_plane)); - save_item(NAME(m_vdu_rdsel)); - save_item(NAME(m_vdu_border)); } void pc1512_base_state::machine_reset() @@ -1119,18 +1108,7 @@ void pc1512_state::machine_reset() { pc1512_base_state::machine_reset(); - m_toggle = 0; m_pit2 = 1; - - m_lpen = 0; - m_blink = 0; - m_cursor = 0; - m_blink_ctr = 0; - m_vdu_mode = 0; - m_vdu_color = 0; - m_vdu_rdsel = 0; - m_vdu_plane = 0x0f; - m_vdu_border = 0; } @@ -1163,7 +1141,13 @@ void pc1512_state::pc1512(machine_config &config) m_maincpu->set_irq_acknowledge_callback(I8259A2_TAG, FUNC(pic8259_device::inta_cb)); // video - pc1512_video(config); + screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER)); + screen.set_raw(28.636363_MHz_XTAL, 912, 0, 910, 262, 0, 260); + screen.set_screen_update(m_vdu, FUNC(ams40041_device::screen_update)); + + AMS40041(config, m_vdu, 28.636363_MHz_XTAL); + m_vdu->set_screen(SCREEN_TAG); + m_vdu->set_show_border_area(true); // sound SPEAKER(config, "mono").front_center(); @@ -1332,10 +1316,10 @@ void pc1640_state::pc1640(machine_config &config) m_dmac->out_dack_callback<2>().set(FUNC(pc1640_state::dack2_w)); m_dmac->out_dack_callback<3>().set(FUNC(pc1640_state::dack3_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(28.636363_MHz_XTAL / 24); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(28.636363_MHz_XTAL / 24); diff --git a/src/mame/includes/pc1512.h b/src/mame/includes/pc1512.h index d593db2d7fe..6f47c388025 100644 --- a/src/mame/includes/pc1512.h +++ b/src/mame/includes/pc1512.h @@ -23,8 +23,7 @@ #include "machine/pc_fdc.h" #include "machine/ram.h" #include "sound/spkrdev.h" -#include "video/mc6845.h" -#include "screen.h" +#include "video/ams40041.h" #include "formats/pc_dsk.h" @@ -202,31 +201,11 @@ public: pc1512_state(const machine_config &mconfig, device_type type, const char *tag) : pc1512_base_state(mconfig, type, tag) , m_vdu(*this, AMS40041_TAG) - , m_video_ram(*this, "video_ram") - , m_char_rom(*this, AMS40041_TAG) - , m_screen(*this, SCREEN_TAG) { } + { } virtual void machine_start() override; virtual void machine_reset() override; - virtual void video_start() override; - - uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - int get_display_mode(uint8_t mode); - offs_t get_char_rom_offset(); - int get_color(uint8_t data); - MC6845_UPDATE_ROW(draw_alpha); - MC6845_UPDATE_ROW(draw_graphics_1); - MC6845_UPDATE_ROW(draw_graphics_2); - MC6845_UPDATE_ROW(crtc_update_row); - - uint8_t video_ram_r(offs_t offset); - void video_ram_w(offs_t offset, uint8_t data); - uint8_t vdu_r(offs_t offset); - void vdu_w(offs_t offset, uint8_t data); - - void pc1512_video(machine_config &config); void pc1512hd(machine_config &config); void pc1512(machine_config &config); void pc1512dd(machine_config &config); @@ -234,21 +213,6 @@ public: void pc1512_mem(address_map &map); required_device m_vdu; - optional_shared_ptr m_video_ram; - required_memory_region m_char_rom; - required_device m_screen; - - // video state - int m_toggle; - int m_lpen; - int m_blink; - int m_cursor; - int m_blink_ctr; - uint8_t m_vdu_mode; - uint8_t m_vdu_color; - uint8_t m_vdu_plane; - uint8_t m_vdu_rdsel; - uint8_t m_vdu_border; }; class pc1640_state : public pc1512_base_state @@ -275,6 +239,4 @@ public: void pc1640_mem(address_map &map); }; -// ---------- defined in video/pc1512.c ---------- - #endif // MAME_INCLUDES_PC1512_H diff --git a/src/mame/video/pc1512.cpp b/src/mame/video/ams40041.cpp similarity index 72% rename from src/mame/video/pc1512.cpp rename to src/mame/video/ams40041.cpp index d9274132670..fd8dc8c0aed 100644 --- a/src/mame/video/pc1512.cpp +++ b/src/mame/video/ams40041.cpp @@ -1,17 +1,17 @@ // license:BSD-3-Clause // copyright-holders:Curt Coder #include "emu.h" -#include "includes/pc1512.h" +#include "ams40041.h" #include "screen.h" +#define VERBOSE 0 +#include "logmacro.h" //************************************************************************** // CONSTANTS //************************************************************************** -#define LOG 0 - static const rgb_t PALETTE_1512[] = { @@ -64,6 +64,92 @@ enum +//************************************************************************** +// AMS40041 DEVICE +//************************************************************************** + +DEFINE_DEVICE_TYPE(AMS40041, ams40041_device, "ams40041", "AMS40041 VDU") + +//------------------------------------------------- +// ams40041_device - constructor +//------------------------------------------------- + +ams40041_device::ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : mc6845_device(mconfig, AMS40041, tag, owner, clock) + , m_char_rom(*this, DEVICE_SELF) + , m_lk(*this, "^LK") // hack +{ + m_clk_scale = 32; + + set_char_width(8); + set_update_row_callback(*this, FUNC(ams40041_device::crtc_update_row)); +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ams40041_device::device_start() +{ + mc6845_device::device_start(); + + m_horiz_char_total = 113; + m_horiz_disp = 80; + m_horiz_sync_pos = 90; + m_sync_width = 10; + m_vert_char_total = 127; + m_vert_total_adj = 6; + m_vert_disp = 100; + m_vert_sync_pos = 112; + m_mode_control = 2; + + m_supports_disp_start_addr_r = false; + m_supports_vert_sync_width = false; + m_supports_status_reg_d5 = false; + m_supports_status_reg_d6 = false; + m_supports_status_reg_d7 = false; + m_supports_transparent = false; + + // allocate memory + m_video_ram = std::make_unique(0x10000); + + // state saving + save_pointer(NAME(m_video_ram), 0x10000); + save_item(NAME(m_toggle)); + save_item(NAME(m_lpen)); + save_item(NAME(m_blink)); + save_item(NAME(m_cursor)); + save_item(NAME(m_blink_ctr)); + save_item(NAME(m_vdu_mode)); + save_item(NAME(m_vdu_color)); + save_item(NAME(m_vdu_plane)); + save_item(NAME(m_vdu_rdsel)); + save_item(NAME(m_vdu_border)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void ams40041_device::device_reset() +{ + mc6845_device::device_reset(); + + m_toggle = 0; + m_lpen = 0; + m_blink = 0; + m_cursor = 0; + m_blink_ctr = 0; + m_vdu_mode = 0; + m_vdu_color = 0; + m_vdu_rdsel = 0; + m_vdu_plane = 0x0f; + m_vdu_border = 0; +} + + //************************************************************************** // VIDEO RAM ACCESS //************************************************************************** @@ -72,7 +158,7 @@ enum // video_ram_r - //------------------------------------------------- -uint8_t pc1512_state::video_ram_r(offs_t offset) +uint8_t ams40041_device::video_ram_r(offs_t offset) { uint8_t data = 0; @@ -100,7 +186,7 @@ uint8_t pc1512_state::video_ram_r(offs_t offset) // video_ram_w - //------------------------------------------------- -void pc1512_state::video_ram_w(offs_t offset, uint8_t data) +void ams40041_device::video_ram_w(offs_t offset, uint8_t data) { switch (get_display_mode(m_vdu_mode)) { @@ -130,14 +216,14 @@ void pc1512_state::video_ram_w(offs_t offset, uint8_t data) // vdu_r - //------------------------------------------------- -uint8_t pc1512_state::vdu_r(offs_t offset) +uint8_t ams40041_device::vdu_r(offs_t offset) { uint8_t data = 0; switch (offset) { case 1: case 3: case 5: case 7: - data = m_vdu->register_r(); + data = register_r(); break; case 0xa: // VDU Status @@ -167,11 +253,11 @@ uint8_t pc1512_state::vdu_r(offs_t offset) data |= 0x04; // vertical sync - //data |= m_vdu->vsync_r(); + //data |= vsync_r(); int flyback = 0; - if (m_screen->vpos() < VFP_LORES - 16) flyback = 1; - if (m_screen->vpos() > VFP_LORES + 200) flyback = 1; + if (screen().vpos() < VFP_LORES - 16) flyback = 1; + if (screen().vpos() > VFP_LORES + 200) flyback = 1; data |= flyback << 3; break; @@ -185,16 +271,16 @@ uint8_t pc1512_state::vdu_r(offs_t offset) // vdu_w - //------------------------------------------------- -void pc1512_state::vdu_w(offs_t offset, uint8_t data) +void ams40041_device::vdu_w(offs_t offset, uint8_t data) { switch (offset) { case 0: case 2: case 4: case 6: - m_vdu->address_w(data); + address_w(data); break; case 1: case 3: case 5: case 7: - m_vdu->register_w(data); + register_w(data); break; case 8: // VDU Mode Control @@ -213,7 +299,7 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) */ - if (LOG) logerror("VDU Mode Control %02x\n", data); + LOG("VDU Mode Control %02x\n", data); if ((get_display_mode(m_vdu_mode) != GRAPHICS_2) && (get_display_mode(data) == GRAPHICS_2)) { @@ -232,18 +318,21 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) { case ALPHA_40: case GRAPHICS_1: - m_vdu->set_hpixels_per_column(8); - m_vdu->set_unscaled_clock(XTAL(28'636'363)/32); + set_hpixels_per_column(8); + m_clk_scale = 32; + recompute_parameters(true); break; case ALPHA_80: - m_vdu->set_hpixels_per_column(8); - m_vdu->set_unscaled_clock(XTAL(28'636'363)/16); + set_hpixels_per_column(8); + m_clk_scale = 16; + recompute_parameters(true); break; case GRAPHICS_2: - m_vdu->set_hpixels_per_column(16); - m_vdu->set_unscaled_clock(XTAL(28'636'363)/32); + set_hpixels_per_column(16); + m_clk_scale = 32; + recompute_parameters(true); break; } } @@ -267,23 +356,23 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) */ - if (LOG) logerror("VDU Colour Select %02x\n", data); + LOG("VDU Colour Select %02x\n", data); m_vdu_color = data; break; case 0xb: // Clear Light Pen Latch - if (LOG) logerror("VDU Clear Light Pen Latch\n"); + LOG("VDU Clear Light Pen Latch\n"); m_lpen = 0; break; case 0xc: // Set Light Pen Latch - if (LOG) logerror("VDU Set Light Pen Latch\n"); + LOG("VDU Set Light Pen Latch\n"); if (!m_lpen) { - m_vdu->assert_light_pen_input(); + assert_light_pen_input(); } m_lpen = 1; @@ -305,7 +394,7 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) */ - if (LOG) logerror("VDU Colour Plane Write %01x\n", data & 0x0f); + LOG("VDU Colour Plane Write %01x\n", data & 0x0f); if (get_display_mode(m_vdu_mode) == GRAPHICS_2) { @@ -329,7 +418,7 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) */ - if (LOG) logerror("VDU Colour Plane Read %u\n", data & 0x03); + LOG("VDU Colour Plane Read %u\n", data & 0x03); if (get_display_mode(m_vdu_mode) == GRAPHICS_2) { @@ -353,7 +442,7 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) */ - if (LOG) logerror("VDU Graphics Mode 2 Border %u\n", data & 0x0f); + LOG("VDU Graphics Mode 2 Border %u\n", data & 0x0f); m_vdu_border = data; break; @@ -365,7 +454,7 @@ void pc1512_state::vdu_w(offs_t offset, uint8_t data) // mc6845 //------------------------------------------------- -int pc1512_state::get_display_mode(uint8_t mode) +int ams40041_device::get_display_mode(uint8_t mode) { if (mode & MODE_GRAPHICS) { @@ -391,12 +480,12 @@ int pc1512_state::get_display_mode(uint8_t mode) } } -offs_t pc1512_state::get_char_rom_offset() +offs_t ams40041_device::get_char_rom_offset() { return ((m_lk->read() >> 5) & 0x03) << 11; } -MC6845_UPDATE_ROW( pc1512_state::draw_alpha ) +MC6845_UPDATE_ROW( ams40041_device::draw_alpha ) { offs_t char_rom_offset = get_char_rom_offset(); uint32_t *p = &bitmap.pix32(y + vbp, hbp); @@ -424,7 +513,7 @@ MC6845_UPDATE_ROW( pc1512_state::draw_alpha ) } offs_t addr = char_rom_offset | (code << 3) | (ra & 0x07); - uint8_t data = m_char_rom->base()[addr & 0x1fff]; + uint8_t data = m_char_rom[addr & 0x1fff]; if ((column == cursor_x) && m_cursor) { @@ -442,7 +531,7 @@ MC6845_UPDATE_ROW( pc1512_state::draw_alpha ) } } -int pc1512_state::get_color(uint8_t data) +int ams40041_device::get_color(uint8_t data) { if (data == 0) return m_vdu_color & 0x0f; @@ -465,7 +554,7 @@ int pc1512_state::get_color(uint8_t data) return color; } -MC6845_UPDATE_ROW( pc1512_state::draw_graphics_1 ) +MC6845_UPDATE_ROW( ams40041_device::draw_graphics_1 ) { if (y > 199) return; @@ -485,7 +574,7 @@ MC6845_UPDATE_ROW( pc1512_state::draw_graphics_1 ) } } -MC6845_UPDATE_ROW( pc1512_state::draw_graphics_2 ) +MC6845_UPDATE_ROW( ams40041_device::draw_graphics_2 ) { if (y > 199) return; @@ -508,7 +597,7 @@ MC6845_UPDATE_ROW( pc1512_state::draw_graphics_2 ) } } -MC6845_UPDATE_ROW( pc1512_state::crtc_update_row ) +MC6845_UPDATE_ROW( ams40041_device::crtc_update_row ) { switch (get_display_mode(m_vdu_mode)) { @@ -528,14 +617,7 @@ MC6845_UPDATE_ROW( pc1512_state::crtc_update_row ) } -void pc1512_state::video_start() -{ - // allocate memory - m_video_ram.allocate(0x10000); -} - - -uint32_t pc1512_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t ams40041_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { if (m_vdu_mode & MODE_ENABLE_VIDEO) { @@ -578,7 +660,7 @@ uint32_t pc1512_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap break; } - m_vdu->screen_update(screen, bitmap, cliprect); + mc6845_device::screen_update(screen, bitmap, cliprect); } else { @@ -587,24 +669,3 @@ uint32_t pc1512_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap return 0; } - - -//------------------------------------------------- -// machine_config( pc1512 ) -//------------------------------------------------- - -void pc1512_state::pc1512_video(machine_config &config) -{ - SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_screen_update(FUNC(pc1512_state::screen_update)); - m_screen->set_size(80*8, 24*8); - m_screen->set_visarea(0, 80*8-1, 0, 24*8-1); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); - m_screen->set_refresh_hz(50); - - AMS40041(config, m_vdu, XTAL(28'636'363)/32); - m_vdu->set_screen(m_screen); - m_vdu->set_show_border_area(true); - m_vdu->set_char_width(8); - m_vdu->set_update_row_callback(FUNC(pc1512_state::crtc_update_row)); -} diff --git a/src/mame/video/ams40041.h b/src/mame/video/ams40041.h new file mode 100644 index 00000000000..34acdc077c6 --- /dev/null +++ b/src/mame/video/ams40041.h @@ -0,0 +1,70 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder + +#ifndef MAME_VIDEO_AMS40041_H +#define MAME_VIDEO_AMS40041_H + +#pragma once + +#include "video/mc6845.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> ams40041_device + +class ams40041_device : public mc6845_device +{ +public: + // device type constructor + ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // screen update callback + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + // memory handlers + uint8_t video_ram_r(offs_t offset); + void video_ram_w(offs_t offset, uint8_t data); + + // I/O handlers + uint8_t vdu_r(offs_t offset); + void vdu_w(offs_t offset, uint8_t data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + // VDU helpers + static int get_display_mode(uint8_t mode); + offs_t get_char_rom_offset(); + int get_color(uint8_t data); + MC6845_UPDATE_ROW(draw_alpha); + MC6845_UPDATE_ROW(draw_graphics_1); + MC6845_UPDATE_ROW(draw_graphics_2); + MC6845_UPDATE_ROW(crtc_update_row); + + std::unique_ptr m_video_ram; + required_region_ptr m_char_rom; + required_ioport m_lk; + + // video state + int m_toggle; + int m_lpen; + int m_blink; + int m_cursor; + int m_blink_ctr; + uint8_t m_vdu_mode; + uint8_t m_vdu_color; + uint8_t m_vdu_plane; + uint8_t m_vdu_rdsel; + uint8_t m_vdu_border; +}; + +// device type declaration +DECLARE_DEVICE_TYPE(AMS40041, ams40041_device) + +#endif // MAME_VIDEO_AMS40041_H From 0960d5406526ab73246f7d4d435829b9b23176d9 Mon Sep 17 00:00:00 2001 From: Rebecca Wallander Date: Wed, 13 May 2020 17:52:40 +0200 Subject: [PATCH 08/69] st_flop.xml: Add Street Fighter II: The World Warrior --- hash/st_flop.xml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/hash/st_flop.xml b/hash/st_flop.xml index c6a255b04f6..ae2ca3cd7be 100644 --- a/hash/st_flop.xml +++ b/hash/st_flop.xml @@ -4294,6 +4294,41 @@ license:CC0 + + Street Fighter II: The World Warrior (Euro) + 1992 + U.S. Gold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Strider (Euro, Les Chevaliers) From 56cf02734b424649b0e40770a502d2e2a6bb1a56 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 13 May 2020 18:25:16 +0200 Subject: [PATCH 09/69] simplified some handlers (nw) --- src/devices/bus/hp80_io/82937.cpp | 4 +- src/devices/bus/hp9845_io/98034.cpp | 4 +- src/devices/bus/hp_dio/human_interface.cpp | 2 +- src/devices/bus/ieee488/c2031.cpp | 2 +- src/devices/bus/ieee488/c2040.cpp | 2 +- src/devices/bus/ieee488/c8050.cpp | 2 +- src/devices/bus/ieee488/c8280.cpp | 2 +- src/devices/bus/ieee488/d9060.cpp | 2 +- src/devices/bus/ieee488/grid2102.cpp | 4 +- src/devices/bus/ieee488/hardbox.cpp | 2 +- src/devices/bus/ieee488/hp9122c.cpp | 2 +- src/devices/bus/ieee488/hp9895.cpp | 2 +- src/devices/bus/ieee488/ieee488.h | 6 +- src/devices/bus/ieee488/remote488.cpp | 2 +- src/devices/bus/ieee488/softbox.cpp | 2 +- src/devices/sound/l7a1045_l6028_dsp_a.h | 4 +- src/mame/audio/alesis.cpp | 2 +- src/mame/drivers/alesis.cpp | 22 +++---- src/mame/drivers/altos486.cpp | 4 +- src/mame/drivers/altos5.cpp | 36 +++++----- src/mame/drivers/altos8600.cpp | 4 +- src/mame/drivers/apricot.cpp | 36 +++++----- src/mame/drivers/atom.cpp | 18 ++--- src/mame/drivers/clayshoo.cpp | 16 ++--- src/mame/drivers/hh_amis2k.cpp | 8 +-- src/mame/drivers/mpc3000.cpp | 8 +-- src/mame/drivers/softbox.cpp | 4 +- src/mame/drivers/ssfindo.cpp | 8 +-- src/mame/drivers/stellafr.cpp | 20 +++--- src/mame/drivers/super6.cpp | 18 ++--- src/mame/drivers/tek405x.cpp | 4 +- src/mame/drivers/victor9k.cpp | 22 +++---- src/mame/drivers/z88.cpp | 2 +- src/mame/includes/alesis.h | 24 +++---- src/mame/includes/amiga.h | 4 +- src/mame/includes/atom.h | 18 ++--- src/mame/includes/bbc.h | 76 +++++++++++----------- src/mame/includes/super6.h | 18 ++--- src/mame/includes/z88.h | 2 +- src/mame/machine/bbc.cpp | 74 ++++++++++----------- src/mame/video/bbc.cpp | 2 +- 41 files changed, 246 insertions(+), 248 deletions(-) diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp index c9a699cf539..dbd5eaecf58 100644 --- a/src/devices/bus/hp80_io/82937.cpp +++ b/src/devices/bus/hp80_io/82937.cpp @@ -158,7 +158,7 @@ READ8_MEMBER(hp82937_io_card_device::dio_r) if (m_dio_out) { return 0xff; } else { - return m_ieee488->read_dio(); + return m_ieee488->dio_r(); } } @@ -252,7 +252,7 @@ void hp82937_io_card_device::device_reset() void hp82937_io_card_device::update_data_out() { - m_ieee488->write_dio(m_dio_out ? m_cpu->p2_r() : 0xff); + m_ieee488->host_dio_w(m_dio_out ? m_cpu->p2_r() : 0xff); } void hp82937_io_card_device::update_signals() diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp index bec3e84d3c0..92e98efd38f 100644 --- a/src/devices/bus/hp9845_io/98034.cpp +++ b/src/devices/bus/hp9845_io/98034.cpp @@ -245,7 +245,7 @@ READ8_MEMBER(hp98034_io_card_device::hpib_ctrl_r) READ8_MEMBER(hp98034_io_card_device::hpib_data_r) { - return ~m_ieee488->read_dio(); + return ~m_ieee488->dio_r(); } READ8_MEMBER(hp98034_io_card_device::idr_r) @@ -331,7 +331,7 @@ void hp98034_io_card_device::update_data_out() if (m_clr_hpib) { m_data_out = 0; } - m_ieee488->write_dio(~m_data_out); + m_ieee488->host_dio_w(~m_data_out); } void hp98034_io_card_device::update_ctrl_out() diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp index 0eddcde7f48..10ecb19e549 100644 --- a/src/devices/bus/hp_dio/human_interface.cpp +++ b/src/devices/bus/hp_dio/human_interface.cpp @@ -217,7 +217,7 @@ WRITE8_MEMBER(human_interface_device::gpib_w) if (m_ppoll_sc & PPOLL_IE) { LOG("%s: start parallel poll\n", __func__); - ieee488_dio_w(space, 0, m_ieee488->dio_r(space, 0)); + ieee488_dio_w(space, 0, m_ieee488->dio_r()); } break; case 4: diff --git a/src/devices/bus/ieee488/c2031.cpp b/src/devices/bus/ieee488/c2031.cpp index 20abb161352..98c8c237af8 100644 --- a/src/devices/bus/ieee488/c2031.cpp +++ b/src/devices/bus/ieee488/c2031.cpp @@ -94,7 +94,7 @@ READ8_MEMBER( c2031_device::via0_pa_r ) */ - return m_bus->read_dio(); + return m_bus->dio_r(); } WRITE8_MEMBER( c2031_device::via0_pa_w ) diff --git a/src/devices/bus/ieee488/c2040.cpp b/src/devices/bus/ieee488/c2040.cpp index 53a2f9f95e8..3684664325b 100644 --- a/src/devices/bus/ieee488/c2040.cpp +++ b/src/devices/bus/ieee488/c2040.cpp @@ -222,7 +222,7 @@ READ8_MEMBER( c2040_device::dio_r ) */ - return m_bus->read_dio(); + return m_bus->dio_r(); } WRITE8_MEMBER( c2040_device::dio_w ) diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp index 9594b26cf7e..81f64c271f0 100644 --- a/src/devices/bus/ieee488/c8050.cpp +++ b/src/devices/bus/ieee488/c8050.cpp @@ -274,7 +274,7 @@ READ8_MEMBER( c8050_device::dio_r ) */ - return m_bus->read_dio(); + return m_bus->dio_r(); } WRITE8_MEMBER( c8050_device::dio_w ) diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp index 63b5cbe2506..75e0d054874 100644 --- a/src/devices/bus/ieee488/c8280.cpp +++ b/src/devices/bus/ieee488/c8280.cpp @@ -127,7 +127,7 @@ READ8_MEMBER( c8280_device::dio_r ) */ - return m_bus->read_dio(); + return m_bus->dio_r(); } WRITE8_MEMBER( c8280_device::dio_w ) diff --git a/src/devices/bus/ieee488/d9060.cpp b/src/devices/bus/ieee488/d9060.cpp index 58a34acae64..9bf524d9f64 100644 --- a/src/devices/bus/ieee488/d9060.cpp +++ b/src/devices/bus/ieee488/d9060.cpp @@ -153,7 +153,7 @@ READ8_MEMBER( d9060_device_base::dio_r ) */ - return m_bus->read_dio(); + return m_bus->dio_r(); } diff --git a/src/devices/bus/ieee488/grid2102.cpp b/src/devices/bus/ieee488/grid2102.cpp index a903ef1dc3e..d15e5a4bcdb 100644 --- a/src/devices/bus/ieee488/grid2102.cpp +++ b/src/devices/bus/ieee488/grid2102.cpp @@ -160,7 +160,7 @@ void grid210x_device::ieee488_dav(int state) { // read data and wait for transfer end int atn = m_bus->atn_r() ^ 1; m_bus->nrfd_w(this, 0); - uint8_t data = m_bus->read_dio() ^ 0xFF; + uint8_t data = m_bus->dio_r() ^ 0xFF; int eoi = m_bus->eoi_r() ^ 1; LOG_BYTES("grid210x_device byte recv %02x atn %d eoi %d\n", data, atn, eoi); m_last_recv_byte = data; @@ -235,7 +235,7 @@ void grid210x_device::ieee488_dav(int state) { void grid210x_device::ieee488_nrfd(int state) { if (state == 1 && m_gpib_loop_state == GRID210X_GPIB_STATE_SEND_DATA_START) { // set dio and assert dav - m_bus->write_dio(m_byte_to_send ^ 0xFF); + m_bus->host_dio_w(m_byte_to_send ^ 0xFF); m_bus->eoi_w(this, m_send_eoi ^ 1); m_bus->dav_w(this, 0); m_bus->ndac_w(this, 1); diff --git a/src/devices/bus/ieee488/hardbox.cpp b/src/devices/bus/ieee488/hardbox.cpp index be648c1fa50..ed140734e13 100644 --- a/src/devices/bus/ieee488/hardbox.cpp +++ b/src/devices/bus/ieee488/hardbox.cpp @@ -131,7 +131,7 @@ void hardbox_device::hardbox_io(address_map &map) READ8_MEMBER( hardbox_device::ppi0_pa_r ) { - return m_bus->read_dio() ^ 0xff; + return m_bus->dio_r() ^ 0xff; } WRITE8_MEMBER( hardbox_device::ppi0_pb_w ) diff --git a/src/devices/bus/ieee488/hp9122c.cpp b/src/devices/bus/ieee488/hp9122c.cpp index 9217d9eda76..bef1fdd8ecb 100644 --- a/src/devices/bus/ieee488/hp9122c.cpp +++ b/src/devices/bus/ieee488/hp9122c.cpp @@ -257,7 +257,7 @@ void hp9122c_device::update_intsel() READ8_MEMBER(hp9122c_device::i8291a_dio_r) { - return m_bus->read_dio(); + return m_bus->dio_r(); } WRITE8_MEMBER(hp9122c_device::i8291a_dio_w) diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp index 89f64b75884..a1546668d3f 100644 --- a/src/devices/bus/ieee488/hp9895.cpp +++ b/src/devices/bus/ieee488/hp9895.cpp @@ -473,7 +473,7 @@ WRITE_LINE_MEMBER(hp9895_device::phi_ren_w) READ8_MEMBER(hp9895_device::phi_dio_r) { - return m_bus->read_dio(); + return m_bus->dio_r(); } WRITE8_MEMBER(hp9895_device::phi_dio_w) diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h index 67c5ca6be07..5a83d0fe927 100644 --- a/src/devices/bus/ieee488/ieee488.h +++ b/src/devices/bus/ieee488/ieee488.h @@ -61,8 +61,7 @@ public: void add_device(ieee488_slot_device *slot, device_t *target); // reads for both host and peripherals - uint8_t read_dio() { return get_data(); } - DECLARE_READ8_MEMBER( dio_r ) { return get_data(); } + uint8_t dio_r() { return get_data(); } DECLARE_READ_LINE_MEMBER( eoi_r ) { return get_signal(EOI); } DECLARE_READ_LINE_MEMBER( dav_r ) { return get_signal(DAV); } DECLARE_READ_LINE_MEMBER( nrfd_r ) { return get_signal(NRFD); } @@ -73,8 +72,7 @@ public: DECLARE_READ_LINE_MEMBER( ren_r ) { return get_signal(REN); } // writes for host (driver_device) - void write_dio(uint8_t data) { set_data(this, data); } - DECLARE_WRITE8_MEMBER( host_dio_w ) { set_data(this, data); } + void host_dio_w(uint8_t data) { set_data(this, data); } DECLARE_WRITE_LINE_MEMBER( host_eoi_w ) { set_signal(this, EOI, state); } DECLARE_WRITE_LINE_MEMBER( host_dav_w ) { set_signal(this, DAV, state); } DECLARE_WRITE_LINE_MEMBER( host_nrfd_w ) { set_signal(this, NRFD, state); } diff --git a/src/devices/bus/ieee488/remote488.cpp b/src/devices/bus/ieee488/remote488.cpp index b5eb0041632..233b5e9b758 100644 --- a/src/devices/bus/ieee488/remote488.cpp +++ b/src/devices/bus/ieee488/remote488.cpp @@ -707,7 +707,7 @@ void remote488_device::update_ah_fsm() if (m_bus->dav_r()) { m_ah_state = REM_AH_ACRS; } else if (!m_waiting_cp) { - uint8_t dio = ~m_bus->read_dio(); + uint8_t dio = ~m_bus->dio_r(); if (!m_bus->eoi_r()) { send_update(MSG_END_BYTE , dio); diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp index 8076a0d5432..ac2630c39cc 100644 --- a/src/devices/bus/ieee488/softbox.cpp +++ b/src/devices/bus/ieee488/softbox.cpp @@ -100,7 +100,7 @@ void softbox_device::softbox_io(address_map &map) READ8_MEMBER( softbox_device::ppi0_pa_r ) { - return m_bus->read_dio() ^ 0xff; + return m_bus->dio_r() ^ 0xff; } WRITE8_MEMBER( softbox_device::ppi0_pb_w ) diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.h b/src/devices/sound/l7a1045_l6028_dsp_a.h index e8d5fa415e5..98a1d52a39f 100644 --- a/src/devices/sound/l7a1045_l6028_dsp_a.h +++ b/src/devices/sound/l7a1045_l6028_dsp_a.h @@ -24,8 +24,8 @@ public: DECLARE_READ8_MEMBER(dma_r_cb); DECLARE_WRITE8_MEMBER(dma_w_cb); - DECLARE_READ16_MEMBER(dma_r16_cb) { m_voice[0].pos++; return 0; } - DECLARE_WRITE16_MEMBER(dma_w16_cb) { m_voice[0].pos++; } + uint16_t dma_r16_cb() { m_voice[0].pos++; return 0; } + void dma_w16_cb(uint16_t data) { m_voice[0].pos++; } DECLARE_WRITE_LINE_MEMBER(dma_hreq_cb); protected: diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp index 135a301dae7..ee62c0d6ab2 100644 --- a/src/mame/audio/alesis.cpp +++ b/src/mame/audio/alesis.cpp @@ -122,7 +122,7 @@ void alesis_dm3ag_device::device_timer(emu_timer &timer, device_timer_id id, int } } -WRITE8_MEMBER(alesis_dm3ag_device::write) +void alesis_dm3ag_device::write(uint8_t data) { if (LOG) logerror("DM3AG '%s' write: %02x\n", tag(), data); diff --git a/src/mame/drivers/alesis.cpp b/src/mame/drivers/alesis.cpp index 119803cb1cd..36759cd6af8 100644 --- a/src/mame/drivers/alesis.cpp +++ b/src/mame/drivers/alesis.cpp @@ -18,12 +18,12 @@ #include "screen.h" -WRITE8_MEMBER( alesis_state::kb_matrix_w ) +void alesis_state::kb_matrix_w(uint8_t data) { m_kb_matrix = data; } -READ8_MEMBER( alesis_state::kb_r ) +uint8_t alesis_state::kb_r() { uint8_t data = 0xff; @@ -43,7 +43,7 @@ READ8_MEMBER( alesis_state::kb_r ) return data; } -WRITE8_MEMBER( alesis_state::led_w ) +void alesis_state::led_w(uint8_t data) { m_patt_led = BIT(data, 0) ? 1 : 0; m_song_led = BIT(data, 0) ? 0 : 1; @@ -56,7 +56,7 @@ WRITE8_MEMBER( alesis_state::led_w ) m_midi_led = BIT(data, 7) ? 0 : 1; } -READ8_MEMBER( alesis_state::p3_r ) +uint8_t alesis_state::p3_r() { uint8_t data = 0xff; @@ -65,17 +65,17 @@ READ8_MEMBER( alesis_state::p3_r ) return data; } -WRITE8_MEMBER( alesis_state::p3_w ) +void alesis_state::p3_w(uint8_t data) { m_cassette->output(data & 0x04 ? -1.0 : +1.0); } -WRITE8_MEMBER( alesis_state::sr16_lcd_w ) +void alesis_state::sr16_lcd_w(uint8_t data) { m_lcdc->write(BIT(m_kb_matrix,7), data); } -WRITE8_MEMBER( alesis_state::mmt8_led_w ) +void alesis_state::mmt8_led_w(uint8_t data) { m_play_led = BIT(data, 0) ? 0 : 1; m_record_led = BIT(data, 1) ? 0 : 1; @@ -88,18 +88,18 @@ WRITE8_MEMBER( alesis_state::mmt8_led_w ) m_leds = data; } -READ8_MEMBER( alesis_state::mmt8_led_r ) +uint8_t alesis_state::mmt8_led_r() { return m_leds; } -WRITE8_MEMBER( alesis_state::track_led_w ) +void alesis_state::track_led_w(uint8_t data) { for (int i=0; i < 8; i++) m_track_led[i] = BIT(data, i); } -READ8_MEMBER( alesis_state::mmt8_p3_r ) +uint8_t alesis_state::mmt8_p3_r() { // ---- -x-- Tape in // ---- x--- Start/Stop input @@ -110,7 +110,7 @@ READ8_MEMBER( alesis_state::mmt8_p3_r ) return data; } -WRITE8_MEMBER( alesis_state::mmt8_p3_w ) +void alesis_state::mmt8_p3_w(uint8_t data) { // ---x ---- Tape out // --x- ---- Click out diff --git a/src/mame/drivers/altos486.cpp b/src/mame/drivers/altos486.cpp index 0e976201b97..34bfef9944d 100644 --- a/src/mame/drivers/altos486.cpp +++ b/src/mame/drivers/altos486.cpp @@ -28,7 +28,7 @@ public: void altos486(machine_config &config); private: - DECLARE_READ8_MEMBER(read_rmx_ack); + uint8_t read_rmx_ack(offs_t offset); DECLARE_READ16_MEMBER(mmu_ram_r); DECLARE_READ16_MEMBER(mmu_io_r); @@ -49,7 +49,7 @@ private: uint8_t m_prot[256]; }; -READ8_MEMBER(altos486_state::read_rmx_ack) +uint8_t altos486_state::read_rmx_ack(offs_t offset) { if(offset == 4) return m_maincpu->int_callback(*this, 0); diff --git a/src/mame/drivers/altos5.cpp b/src/mame/drivers/altos5.cpp index 59ccd2b936d..3c0d6f218c1 100644 --- a/src/mame/drivers/altos5.cpp +++ b/src/mame/drivers/altos5.cpp @@ -45,15 +45,15 @@ public: DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); private: - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); - DECLARE_READ8_MEMBER(port08_r); - DECLARE_READ8_MEMBER(port09_r); - DECLARE_WRITE8_MEMBER(port08_w); - DECLARE_WRITE8_MEMBER(port09_w); - DECLARE_WRITE8_MEMBER(port14_w); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); + uint8_t io_read_byte(offs_t offset); + void io_write_byte(offs_t offset, uint8_t data); + uint8_t port08_r(); + uint8_t port09_r(); + void port08_w(uint8_t data); + void port09_w(uint8_t data); + void port14_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(busreq_w); DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); @@ -210,31 +210,31 @@ static const z80_daisy_config daisy_chain_intf[] = // turns off IPL mode, removes boot rom from memory map -WRITE8_MEMBER( altos5_state::port14_w ) +void altos5_state::port14_w(uint8_t data) { m_ipl = 0; setup_banks(2); } -READ8_MEMBER(altos5_state::memory_read_byte) +uint8_t altos5_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -WRITE8_MEMBER(altos5_state::memory_write_byte) +void altos5_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); prog_space.write_byte(offset, data); } -READ8_MEMBER(altos5_state::io_read_byte) +uint8_t altos5_state::io_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_IO); return prog_space.read_byte(offset); } -WRITE8_MEMBER(altos5_state::io_write_byte) +void altos5_state::io_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_IO); prog_space.write_byte(offset, data); @@ -255,7 +255,7 @@ d2: unused configuration input (must be H to skip HD boot) d3: selected floppy is single(L) or double sided(H) d7: IRQ from FDC */ -READ8_MEMBER( altos5_state::port08_r ) +uint8_t altos5_state::port08_r() { uint8_t data = m_port08 | 0x87; if (m_floppy) @@ -266,7 +266,7 @@ READ8_MEMBER( altos5_state::port08_r ) /* d0: HD IRQ */ -READ8_MEMBER( altos5_state::port09_r ) +uint8_t altos5_state::port09_r() { return m_port09 & 0xfe; } @@ -276,7 +276,7 @@ d4: DDEN (H = double density) d5: DS (H = drive 2) d6: SS (H = side 2) */ -WRITE8_MEMBER( altos5_state::port08_w ) +void altos5_state::port08_w(uint8_t data) { m_port08 = data & 0x70; @@ -302,7 +302,7 @@ d3, 4: CPU bank select d5: H = Write protect of common area d6, 7: DMA bank select (not emulated) */ -WRITE8_MEMBER( altos5_state::port09_w ) +void altos5_state::port09_w(uint8_t data) { m_port09 = data; setup_banks(2); diff --git a/src/mame/drivers/altos8600.cpp b/src/mame/drivers/altos8600.cpp index 4fb3c4c8bb0..35fca787dc1 100644 --- a/src/mame/drivers/altos8600.cpp +++ b/src/mame/drivers/altos8600.cpp @@ -53,7 +53,7 @@ private: DECLARE_WRITE16_MEMBER(mmuaddr_w); DECLARE_READ16_MEMBER(mmuflags_r); DECLARE_WRITE16_MEMBER(mmuflags_w); - DECLARE_READ8_MEMBER(get_slave_ack); + u8 get_slave_ack(offs_t offset); DECLARE_READ16_MEMBER(fault_r); DECLARE_READ16_MEMBER(errlo_r); DECLARE_READ16_MEMBER(errhi_r); @@ -495,7 +495,7 @@ WRITE16_MEMBER(altos8600_state::mode_w) m_user = true; } -READ8_MEMBER(altos8600_state::get_slave_ack) +u8 altos8600_state::get_slave_ack(offs_t offset) { if(offset == 2) return m_pic[1]->acknowledge(); diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp index 4ddfc719a62..d782dd9111d 100644 --- a/src/mame/drivers/apricot.cpp +++ b/src/mame/drivers/apricot.cpp @@ -76,16 +76,16 @@ private: DECLARE_FLOPPY_FORMATS(floppy_formats); DECLARE_WRITE_LINE_MEMBER(i8086_lock_w); - DECLARE_WRITE8_MEMBER(i8089_ca1_w); - DECLARE_WRITE8_MEMBER(i8089_ca2_w); - DECLARE_WRITE8_MEMBER(i8255_portb_w); - DECLARE_READ8_MEMBER(i8255_portc_r); - DECLARE_WRITE8_MEMBER(i8255_portc_w); + void i8089_ca1_w(uint8_t data); + void i8089_ca2_w(uint8_t data); + void i8255_portb_w(uint8_t data); + uint8_t i8255_portc_r(); + void i8255_portc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); - DECLARE_READ8_MEMBER(sio_da_r); - DECLARE_READ8_MEMBER(sio_ca_r); - DECLARE_READ8_MEMBER(sio_db_r); - DECLARE_READ8_MEMBER(sio_cb_r); + uint8_t sio_da_r(); + uint8_t sio_ca_r(); + uint8_t sio_db_r(); + uint8_t sio_cb_r(); DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); @@ -133,14 +133,14 @@ private: // I/O //************************************************************************** -WRITE8_MEMBER( apricot_state::i8089_ca1_w ) +void apricot_state::i8089_ca1_w(uint8_t data) { m_iop->sel_w(0); m_iop->ca_w(1); m_iop->ca_w(0); } -WRITE8_MEMBER( apricot_state::i8089_ca2_w ) +void apricot_state::i8089_ca2_w(uint8_t data) { m_iop->sel_w(1); m_iop->ca_w(1); @@ -159,7 +159,7 @@ WRITE_LINE_MEMBER( apricot_state::write_centronics_perror ) m_centronics_perror = state; } -READ8_MEMBER( apricot_state::i8255_portc_r ) +uint8_t apricot_state::i8255_portc_r() { uint8_t data = 0; @@ -171,7 +171,7 @@ READ8_MEMBER( apricot_state::i8255_portc_r ) return data; } -WRITE8_MEMBER( apricot_state::i8255_portb_w ) +void apricot_state::i8255_portb_w(uint8_t data) { // bit 0, crt reset // bit 1, not connected @@ -200,14 +200,14 @@ WRITE8_MEMBER( apricot_state::i8255_portb_w ) // PB7 Centronics transceiver direction. 0 = output, 1 = input } -WRITE8_MEMBER( apricot_state::i8255_portc_w ) +void apricot_state::i8255_portc_w(uint8_t data) { // schematic page 294 says pc4 outputs to centronics pin 13, which is the "select" output from the printer. m_centronics->write_strobe(BIT(data, 5)); // schematic page 294 says pc6 outputs to centronics pin 15, which is unused } -READ8_MEMBER( apricot_state::sio_da_r ) +uint8_t apricot_state::sio_da_r() { if (m_bus_locked) return m_sio->m1_r(); @@ -215,7 +215,7 @@ READ8_MEMBER( apricot_state::sio_da_r ) return m_sio->da_r(); } -READ8_MEMBER( apricot_state::sio_ca_r ) +uint8_t apricot_state::sio_ca_r() { if (m_bus_locked) return m_sio->m1_r(); @@ -223,7 +223,7 @@ READ8_MEMBER( apricot_state::sio_ca_r ) return m_sio->ca_r(); } -READ8_MEMBER( apricot_state::sio_cb_r ) +uint8_t apricot_state::sio_cb_r() { if (m_bus_locked) return m_sio->m1_r(); @@ -231,7 +231,7 @@ READ8_MEMBER( apricot_state::sio_cb_r ) return m_sio->cb_r(); } -READ8_MEMBER( apricot_state::sio_db_r ) +uint8_t apricot_state::sio_db_r() { if (m_bus_locked) return m_sio->m1_r(); diff --git a/src/mame/drivers/atom.cpp b/src/mame/drivers/atom.cpp index 34d0327143d..775147a910a 100644 --- a/src/mame/drivers/atom.cpp +++ b/src/mame/drivers/atom.cpp @@ -183,7 +183,7 @@ QUICKLOAD_LOAD_MEMBER(atom_state::quickload_cb) eprom_r - EPROM slot select read -------------------------------------------------*/ -READ8_MEMBER( atomeb_state::eprom_r ) +uint8_t atomeb_state::eprom_r() { return m_eprom; } @@ -192,7 +192,7 @@ READ8_MEMBER( atomeb_state::eprom_r ) eprom_w - EPROM slot select write -------------------------------------------------*/ -WRITE8_MEMBER( atomeb_state::eprom_w ) +void atomeb_state::eprom_w(uint8_t data) { /* @@ -217,7 +217,7 @@ WRITE8_MEMBER( atomeb_state::eprom_w ) ext_r - read external roms at 0xa000 -------------------------------------------------*/ -READ8_MEMBER( atomeb_state::ext_r ) +uint8_t atomeb_state::ext_r(offs_t offset) { if (m_ext[m_eprom & 0x0f]->exists()) return m_ext[m_eprom & 0x0f]->read_rom(offset); @@ -229,7 +229,7 @@ READ8_MEMBER( atomeb_state::ext_r ) dor_r - read DOS roms at 0xe000 -------------------------------------------------*/ -READ8_MEMBER( atomeb_state::dos_r ) +uint8_t atomeb_state::dos_r(offs_t offset) { if (m_e0->exists() && !BIT(m_eprom, 7)) return m_e0->read_rom(offset); @@ -452,7 +452,7 @@ INPUT_PORTS_END I8255 interface -------------------------------------------------*/ -WRITE8_MEMBER( atom_state::ppi_pa_w ) +void atom_state::ppi_pa_w(uint8_t data) { /* @@ -479,7 +479,7 @@ WRITE8_MEMBER( atom_state::ppi_pa_w ) m_vdg->gm2_w(BIT(data, 7)); } -READ8_MEMBER( atom_state::ppi_pb_r ) +uint8_t atom_state::ppi_pb_r() { /* @@ -517,7 +517,7 @@ READ8_MEMBER( atom_state::ppi_pb_r ) return data; } -READ8_MEMBER( atom_state::ppi_pc_r ) +uint8_t atom_state::ppi_pc_r() { /* @@ -551,7 +551,7 @@ READ8_MEMBER( atom_state::ppi_pc_r ) return data; } -WRITE8_MEMBER( atom_state::ppi_pc_w ) +void atom_state::ppi_pc_w(uint8_t data) { /* @@ -629,7 +629,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atom_state::cassette_output_tick) mc6847 interface -------------------------------------------------*/ -READ8_MEMBER( atom_state::vdg_videoram_r ) +uint8_t atom_state::vdg_videoram_r(offs_t offset) { if (offset == ~0) return 0xff; diff --git a/src/mame/drivers/clayshoo.cpp b/src/mame/drivers/clayshoo.cpp index 7ee439fb337..87b59a9ad6f 100644 --- a/src/mame/drivers/clayshoo.cpp +++ b/src/mame/drivers/clayshoo.cpp @@ -35,10 +35,10 @@ public: void clayshoo(machine_config &config); protected: - DECLARE_WRITE8_MEMBER(analog_reset_w); - DECLARE_READ8_MEMBER(analog_r); - DECLARE_WRITE8_MEMBER(input_port_select_w); - DECLARE_READ8_MEMBER(input_port_r); + void analog_reset_w(uint8_t data); + uint8_t analog_r(); + void input_port_select_w(uint8_t data); + uint8_t input_port_r(); uint32_t screen_update_clayshoo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(reset_analog_bit); uint8_t difficulty_input_port_r(int bit); @@ -68,7 +68,7 @@ private: * *************************************/ -WRITE8_MEMBER(clayshoo_state::input_port_select_w) +void clayshoo_state::input_port_select_w(uint8_t data) { m_input_port_select = data; } @@ -92,7 +92,7 @@ uint8_t clayshoo_state::difficulty_input_port_r( int bit ) } -READ8_MEMBER(clayshoo_state::input_port_r) +uint8_t clayshoo_state::input_port_r() { uint8_t ret = 0; @@ -132,7 +132,7 @@ static attotime compute_duration( device_t *device, int analog_pos ) } -WRITE8_MEMBER(clayshoo_state::analog_reset_w) +void clayshoo_state::analog_reset_w(uint8_t data) { /* reset the analog value, and start the two times that will fire off in a short period proportional to the position of the @@ -145,7 +145,7 @@ WRITE8_MEMBER(clayshoo_state::analog_reset_w) } -READ8_MEMBER(clayshoo_state::analog_r) +uint8_t clayshoo_state::analog_r() { return m_analog_port_val; } diff --git a/src/mame/drivers/hh_amis2k.cpp b/src/mame/drivers/hh_amis2k.cpp index 0030abd77c2..67778048e8a 100644 --- a/src/mame/drivers/hh_amis2k.cpp +++ b/src/mame/drivers/hh_amis2k.cpp @@ -146,8 +146,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(write_d); - DECLARE_WRITE16_MEMBER(write_a); + void write_d(u8 data); + void write_a(u16 data); DECLARE_WRITE_LINE_MEMBER(write_f); void speaker_update(); @@ -190,14 +190,14 @@ void wildfire_state::update_display() m_display->matrix(~m_a, m_d); } -WRITE8_MEMBER(wildfire_state::write_d) +void wildfire_state::write_d(u8 data) { // D0-D7: led/7seg data m_d = bitswap<8>(data,7,0,1,2,3,4,5,6); update_display(); } -WRITE16_MEMBER(wildfire_state::write_a) +void wildfire_state::write_a(u16 data) { // A0-A2: digit select // A3-A11: led select diff --git a/src/mame/drivers/mpc3000.cpp b/src/mame/drivers/mpc3000.cpp index fddecf2138b..22bffe0c350 100644 --- a/src/mame/drivers/mpc3000.cpp +++ b/src/mame/drivers/mpc3000.cpp @@ -107,8 +107,8 @@ private: DECLARE_READ16_MEMBER(dsp_0008_hack_r); DECLARE_WRITE16_MEMBER(dsp_0008_hack_w); - DECLARE_READ16_MEMBER(dma_memr_cb); - DECLARE_WRITE16_MEMBER(dma_memw_cb); + uint16_t dma_memr_cb(offs_t offset); + void dma_memw_cb(offs_t offset, uint16_t data); void mpc3000_palette(palette_device &palette) const; }; @@ -161,13 +161,13 @@ void mpc3000_state::mpc3000_io_map(address_map &map) map(0x00f8, 0x00ff).rw("adcexp", FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff); } -READ16_MEMBER(mpc3000_state::dma_memr_cb) +uint16_t mpc3000_state::dma_memr_cb(offs_t offset) { //logerror("dma_memr_cb: offset %x\n", offset); return m_maincpu->space(AS_PROGRAM).read_word(offset); } -WRITE16_MEMBER(mpc3000_state::dma_memw_cb) +void mpc3000_state::dma_memw_cb(offs_t offset, uint16_t data) { m_maincpu->space(AS_PROGRAM).write_word(offset, data); } diff --git a/src/mame/drivers/softbox.cpp b/src/mame/drivers/softbox.cpp index f5c18764eff..939c39d54d8 100644 --- a/src/mame/drivers/softbox.cpp +++ b/src/mame/drivers/softbox.cpp @@ -170,12 +170,12 @@ INPUT_PORTS_END READ8_MEMBER( softbox_state::ppi0_pa_r ) { - return m_ieee->read_dio() ^ 0xff; + return m_ieee->dio_r() ^ 0xff; } WRITE8_MEMBER( softbox_state::ppi0_pb_w ) { - m_ieee->write_dio(data ^ 0xff); + m_ieee->host_dio_w(data ^ 0xff); } //------------------------------------------------- diff --git a/src/mame/drivers/ssfindo.cpp b/src/mame/drivers/ssfindo.cpp index 9da40d82f0c..9ad1e3d5b5f 100644 --- a/src/mame/drivers/ssfindo.cpp +++ b/src/mame/drivers/ssfindo.cpp @@ -195,8 +195,8 @@ private: void ppcar_map(address_map &map); void ssfindo_map(address_map &map); - DECLARE_READ8_MEMBER(iolines_r); - DECLARE_WRITE8_MEMBER(iolines_w); + uint8_t iolines_r(); + void iolines_w(uint8_t data); bool m_flash_bank_select; }; @@ -227,7 +227,7 @@ private: //TODO: eeprom 24c01 & 24c02 // TODO: untangle, kill hacks -READ8_MEMBER(ssfindo_state::iolines_r) +uint8_t ssfindo_state::iolines_r() { if(m_flashType == 1) return 0; @@ -235,7 +235,7 @@ READ8_MEMBER(ssfindo_state::iolines_r) return machine().rand(); } -WRITE8_MEMBER(ssfindo_state::iolines_w) +void ssfindo_state::iolines_w(uint8_t data) { if(data&0xc0) m_adrLatch=0; diff --git a/src/mame/drivers/stellafr.cpp b/src/mame/drivers/stellafr.cpp index 8e52d6f08bb..97c6c0cb781 100644 --- a/src/mame/drivers/stellafr.cpp +++ b/src/mame/drivers/stellafr.cpp @@ -29,11 +29,11 @@ public: void stellafr(machine_config &config); private: - DECLARE_WRITE8_MEMBER(write_8000c1); - DECLARE_READ8_MEMBER(read_800101); - DECLARE_WRITE8_MEMBER(write_800101); - DECLARE_WRITE8_MEMBER(duart_output_w); - DECLARE_WRITE8_MEMBER(ay8910_portb_w); + void write_8000c1(uint8_t data); + uint8_t read_800101(); + void write_800101(uint8_t data); + void duart_output_w(uint8_t data); + void ay8910_portb_w(uint8_t data); void mem_map(address_map &map); void fc7_map(address_map &map); @@ -44,24 +44,24 @@ private: }; -WRITE8_MEMBER(stellafr_state::write_8000c1) +void stellafr_state::write_8000c1(uint8_t data) { } -READ8_MEMBER(stellafr_state::read_800101) +uint8_t stellafr_state::read_800101() { return 0xff; } -WRITE8_MEMBER(stellafr_state::write_800101) +void stellafr_state::write_800101(uint8_t data) { } -WRITE8_MEMBER(stellafr_state::duart_output_w) +void stellafr_state::duart_output_w(uint8_t data) { } -WRITE8_MEMBER(stellafr_state::ay8910_portb_w) +void stellafr_state::ay8910_portb_w(uint8_t data) { } diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp index f34c23e9f42..0c10fc07470 100644 --- a/src/mame/drivers/super6.cpp +++ b/src/mame/drivers/super6.cpp @@ -100,7 +100,7 @@ void super6_state::bankswitch() // s100_w - S-100 bus extended address A16-A23 //------------------------------------------------- -WRITE8_MEMBER( super6_state::s100_w ) +void super6_state::s100_w(uint8_t data) { /* @@ -125,7 +125,7 @@ WRITE8_MEMBER( super6_state::s100_w ) // bank0_w - on-board memory control port #0 //------------------------------------------------- -WRITE8_MEMBER( super6_state::bank0_w ) +void super6_state::bank0_w(uint8_t data) { /* @@ -152,7 +152,7 @@ WRITE8_MEMBER( super6_state::bank0_w ) // bank1_w - on-board memory control port #1 //------------------------------------------------- -WRITE8_MEMBER( super6_state::bank1_w ) +void super6_state::bank1_w(uint8_t data) { /* @@ -184,7 +184,7 @@ WRITE8_MEMBER( super6_state::bank1_w ) // floppy_r - FDC synchronization/drive/density //------------------------------------------------- -READ8_MEMBER( super6_state::fdc_r ) +uint8_t super6_state::fdc_r() { /* @@ -211,7 +211,7 @@ READ8_MEMBER( super6_state::fdc_r ) // floppy_w - FDC synchronization/drive/density //------------------------------------------------- -WRITE8_MEMBER( super6_state::fdc_w ) +void super6_state::fdc_w(uint8_t data) { /* @@ -345,25 +345,25 @@ INPUT_PORTS_END // Z80DMA //------------------------------------------------- -READ8_MEMBER(super6_state::memory_read_byte) +uint8_t super6_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -WRITE8_MEMBER(super6_state::memory_write_byte) +void super6_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); prog_space.write_byte(offset, data); } -READ8_MEMBER(super6_state::io_read_byte) +uint8_t super6_state::io_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_IO); return prog_space.read_byte(offset); } -WRITE8_MEMBER(super6_state::io_write_byte) +void super6_state::io_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_IO); prog_space.write_byte(offset, data); diff --git a/src/mame/drivers/tek405x.cpp b/src/mame/drivers/tek405x.cpp index 46b12281e6c..3032ca8983c 100644 --- a/src/mame/drivers/tek405x.cpp +++ b/src/mame/drivers/tek405x.cpp @@ -697,7 +697,7 @@ WRITE8_MEMBER( tek4051_state::dio_w ) if (m_talk) { - m_gpib->write_dio(data); + m_gpib->host_dio_w(data); } } @@ -780,7 +780,7 @@ WRITE_LINE_MEMBER( tek4051_state::talk_w ) if (!m_talk) { - m_gpib->write_dio(0xff); + m_gpib->host_dio_w(0xff); m_gpib->host_nrfd_w(1); m_gpib->host_ndac_w(1); } diff --git a/src/mame/drivers/victor9k.cpp b/src/mame/drivers/victor9k.cpp index f5fac9fa3e3..fae63959c6e 100644 --- a/src/mame/drivers/victor9k.cpp +++ b/src/mame/drivers/victor9k.cpp @@ -122,18 +122,18 @@ private: virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_WRITE8_MEMBER( via1_pa_w ); + void via1_pa_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_nfrd ); DECLARE_WRITE_LINE_MEMBER( write_ndac ); - DECLARE_WRITE8_MEMBER( via1_pb_w ); + void via1_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( via1_irq_w ); DECLARE_WRITE_LINE_MEMBER( codec_vol_w ); - DECLARE_WRITE8_MEMBER( via2_pa_w ); - DECLARE_WRITE8_MEMBER( via2_pb_w ); + void via2_pa_w(uint8_t data); + void via2_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( via2_irq_w ); - DECLARE_WRITE8_MEMBER( via3_pb_w ); + void via3_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( via3_irq_w ); DECLARE_WRITE_LINE_MEMBER( fdc_irq_w ); @@ -367,7 +367,7 @@ WRITE_LINE_MEMBER( victor9k_state::ssda_sm_dtr_w ) } -WRITE8_MEMBER( victor9k_state::via1_pa_w ) +void victor9k_state::via1_pa_w(uint8_t data) { /* @@ -395,7 +395,7 @@ WRITE8_MEMBER( victor9k_state::via1_pa_w ) m_centronics->write_data7(BIT(data, 7)); // IEEE-488 - m_ieee488->write_dio(data); + m_ieee488->host_dio_w(data); } DECLARE_WRITE_LINE_MEMBER( victor9k_state::write_nfrd ) @@ -410,7 +410,7 @@ DECLARE_WRITE_LINE_MEMBER( victor9k_state::write_ndac ) m_via1->write_ca2(state); } -WRITE8_MEMBER( victor9k_state::via1_pb_w ) +void victor9k_state::via1_pb_w(uint8_t data) { /* @@ -452,7 +452,7 @@ WRITE_LINE_MEMBER( victor9k_state::via1_irq_w ) m_pic->ir3_w(m_ssda_irq || m_via1_irq || m_via3_irq || m_fdc_irq); } -WRITE8_MEMBER( victor9k_state::via2_pa_w ) +void victor9k_state::via2_pa_w(uint8_t data) { /* @@ -477,7 +477,7 @@ void victor9k_state::update_kback() m_kb->kback_w(kback); } -WRITE8_MEMBER( victor9k_state::via2_pb_w ) +void victor9k_state::via2_pb_w(uint8_t data) { /* @@ -541,7 +541,7 @@ WRITE_LINE_MEMBER( victor9k_state::via2_irq_w ) CB2 J5-50 */ -WRITE8_MEMBER( victor9k_state::via3_pb_w ) +void victor9k_state::via3_pb_w(uint8_t data) { // codec clock output m_ssda->rx_clk_w(!BIT(data, 7)); diff --git a/src/mame/drivers/z88.cpp b/src/mame/drivers/z88.cpp index 286d302cb1d..8ea8d8ab527 100644 --- a/src/mame/drivers/z88.cpp +++ b/src/mame/drivers/z88.cpp @@ -571,7 +571,7 @@ void z88_state::machine_reset() m_bank_type[0] = m_bank_type[1] = m_bank_type[2] = m_bank_type[3] = 0; } -READ8_MEMBER(z88_state::kb_r) +uint8_t z88_state::kb_r(offs_t offset) { uint8_t data = 0xff; diff --git a/src/mame/includes/alesis.h b/src/mame/includes/alesis.h index 088754efdad..b15a3c32ae8 100644 --- a/src/mame/includes/alesis.h +++ b/src/mame/includes/alesis.h @@ -28,7 +28,7 @@ public: alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device interface - DECLARE_WRITE8_MEMBER(write); + void write(uint8_t data); protected: // device-level overrides @@ -140,17 +140,17 @@ protected: virtual void machine_reset() override; void update_lcd_symbols(bitmap_ind16 &bitmap, uint8_t pos, uint8_t y, uint8_t x, int state); - DECLARE_WRITE8_MEMBER( led_w ); - DECLARE_WRITE8_MEMBER( mmt8_led_w ); - DECLARE_READ8_MEMBER( mmt8_led_r ); - DECLARE_WRITE8_MEMBER( track_led_w ); - DECLARE_WRITE8_MEMBER( kb_matrix_w ); - DECLARE_READ8_MEMBER( kb_r ); - DECLARE_READ8_MEMBER( p3_r ); - DECLARE_WRITE8_MEMBER( p3_w ); - DECLARE_READ8_MEMBER( mmt8_p3_r ); - DECLARE_WRITE8_MEMBER( mmt8_p3_w ); - DECLARE_WRITE8_MEMBER( sr16_lcd_w ); + void led_w(uint8_t data); + void mmt8_led_w(uint8_t data); + uint8_t mmt8_led_r(); + void track_led_w(uint8_t data); + void kb_matrix_w(uint8_t data); + uint8_t kb_r(); + uint8_t p3_r(); + void p3_w(uint8_t data); + uint8_t mmt8_p3_r(); + void mmt8_p3_w(uint8_t data); + void sr16_lcd_w(uint8_t data); HD44780_PIXEL_UPDATE(sr16_pixel_update); void hr16_io(address_map &map); diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h index 13d0eb4d51f..488ff56c410 100644 --- a/src/mame/includes/amiga.h +++ b/src/mame/includes/amiga.h @@ -366,12 +366,12 @@ public: m_chip_ram.write(byteoffs >> 1, data); } - DECLARE_READ16_MEMBER(chip_ram_r) + uint16_t chip_ram_r(offs_t offset, uint16_t mem_mask = ~0) { return read_chip_ram(offset & ~1) & mem_mask; } - DECLARE_WRITE16_MEMBER(chip_ram_w) + void chip_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { uint16_t val = read_chip_ram(offset & ~1) & ~mem_mask; write_chip_ram(offset & ~1, val | data); diff --git a/src/mame/includes/atom.h b/src/mame/includes/atom.h index f32cbb04441..846bc6cfbb3 100644 --- a/src/mame/includes/atom.h +++ b/src/mame/includes/atom.h @@ -90,11 +90,11 @@ public: virtual void machine_start() override; - DECLARE_WRITE8_MEMBER( ppi_pa_w ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_READ8_MEMBER( ppi_pc_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_READ8_MEMBER( vdg_videoram_r ); + void ppi_pa_w(uint8_t data); + uint8_t ppi_pb_r(); + uint8_t ppi_pc_r(); + void ppi_pc_w(uint8_t data); + uint8_t vdg_videoram_r(offs_t offset); DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); DECLARE_WRITE_LINE_MEMBER( atom_8271_interrupt_callback ); DECLARE_WRITE_LINE_MEMBER( motor_w ); @@ -138,10 +138,10 @@ public: virtual void machine_start() override; - DECLARE_READ8_MEMBER(eprom_r); - DECLARE_WRITE8_MEMBER(eprom_w); - DECLARE_READ8_MEMBER(ext_r); - DECLARE_READ8_MEMBER(dos_r); + uint8_t eprom_r(); + void eprom_w(uint8_t data); + uint8_t ext_r(offs_t offset); + uint8_t dos_r(offs_t offset); /* eprom state */ int m_eprom; diff --git a/src/mame/includes/bbc.h b/src/mame/includes/bbc.h index ee94d248bf1..c74cf7a4b5f 100644 --- a/src/mame/includes/bbc.h +++ b/src/mame/includes/bbc.h @@ -115,40 +115,40 @@ public: DECLARE_FLOPPY_FORMATS(floppy_formats); - DECLARE_READ8_MEMBER(bbc_ram_r); - DECLARE_WRITE8_MEMBER(bbc_ram_w); - DECLARE_READ8_MEMBER(bbc_romsel_r); - DECLARE_WRITE8_MEMBER(bbc_romsel_w); - DECLARE_READ8_MEMBER(bbc_paged_r); - DECLARE_WRITE8_MEMBER(bbc_paged_w); - DECLARE_READ8_MEMBER(bbc_mos_r); - DECLARE_WRITE8_MEMBER(bbc_mos_w); - DECLARE_READ8_MEMBER(bbc_fred_r); - DECLARE_WRITE8_MEMBER(bbc_fred_w); - DECLARE_READ8_MEMBER(bbc_jim_r); - DECLARE_WRITE8_MEMBER(bbc_jim_w); - DECLARE_READ8_MEMBER(bbcbp_fetch_r); - DECLARE_WRITE8_MEMBER(bbcbp_romsel_w); - DECLARE_READ8_MEMBER(bbcbp_paged_r); - DECLARE_WRITE8_MEMBER(bbcbp_paged_w); - DECLARE_READ8_MEMBER(bbcm_fetch_r); - DECLARE_READ8_MEMBER(bbcm_acccon_r); - DECLARE_WRITE8_MEMBER(bbcm_acccon_w); - DECLARE_WRITE8_MEMBER(bbcm_romsel_w); - DECLARE_READ8_MEMBER(bbcm_paged_r); - DECLARE_WRITE8_MEMBER(bbcm_paged_w); - DECLARE_READ8_MEMBER(bbcm_hazel_r); - DECLARE_WRITE8_MEMBER(bbcm_hazel_w); - DECLARE_READ8_MEMBER(bbcm_tube_r); - DECLARE_WRITE8_MEMBER(bbcm_tube_w); - DECLARE_READ8_MEMBER(bbcmc_paged_r); - DECLARE_WRITE8_MEMBER(bbcmc_paged_w); - DECLARE_WRITE8_MEMBER(bbcbp_drive_control_w); - DECLARE_WRITE8_MEMBER(bbcm_drive_control_w); - DECLARE_WRITE8_MEMBER(bbcmc_drive_control_w); - DECLARE_WRITE8_MEMBER(serial_ula_w); - DECLARE_WRITE8_MEMBER(video_ula_w); - DECLARE_READ8_MEMBER(bbc_fe_r) { return 0xfe; }; + uint8_t bbc_ram_r(offs_t offset); + void bbc_ram_w(offs_t offset, uint8_t data); + uint8_t bbc_romsel_r(offs_t offset); + void bbc_romsel_w(offs_t offset, uint8_t data); + uint8_t bbc_paged_r(offs_t offset); + void bbc_paged_w(offs_t offset, uint8_t data); + uint8_t bbc_mos_r(offs_t offset); + void bbc_mos_w(offs_t offset, uint8_t data); + uint8_t bbc_fred_r(offs_t offset); + void bbc_fred_w(offs_t offset, uint8_t data); + uint8_t bbc_jim_r(offs_t offset); + void bbc_jim_w(offs_t offset, uint8_t data); + uint8_t bbcbp_fetch_r(offs_t offset); + void bbcbp_romsel_w(offs_t offset, uint8_t data); + uint8_t bbcbp_paged_r(offs_t offset); + void bbcbp_paged_w(offs_t offset, uint8_t data); + uint8_t bbcm_fetch_r(offs_t offset); + uint8_t bbcm_acccon_r(); + void bbcm_acccon_w(uint8_t data); + void bbcm_romsel_w(offs_t offset, uint8_t data); + uint8_t bbcm_paged_r(offs_t offset); + void bbcm_paged_w(offs_t offset, uint8_t data); + uint8_t bbcm_hazel_r(offs_t offset); + void bbcm_hazel_w(offs_t offset, uint8_t data); + uint8_t bbcm_tube_r(offs_t offset); + void bbcm_tube_w(offs_t offset, uint8_t data); + uint8_t bbcmc_paged_r(offs_t offset); + void bbcmc_paged_w(offs_t offset, uint8_t data); + void bbcbp_drive_control_w(uint8_t data); + void bbcm_drive_control_w(uint8_t data); + void bbcmc_drive_control_w(uint8_t data); + void serial_ula_w(uint8_t data); + void video_ula_w(offs_t offset, uint8_t data); + uint8_t bbc_fe_r() { return 0xfe; }; DECLARE_VIDEO_START(bbc); @@ -165,10 +165,10 @@ public: DECLARE_WRITE_LINE_MEMBER(kbd_enable_w); DECLARE_WRITE_LINE_MEMBER(capslock_led_w); DECLARE_WRITE_LINE_MEMBER(shiftlock_led_w); - DECLARE_READ8_MEMBER(via_system_porta_r); - DECLARE_WRITE8_MEMBER(via_system_porta_w); - DECLARE_READ8_MEMBER(via_system_portb_r); - DECLARE_WRITE8_MEMBER(via_system_portb_w); + uint8_t via_system_porta_r(); + void via_system_porta_w(uint8_t data); + uint8_t via_system_portb_r(); + void via_system_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(lpstb_w); DECLARE_WRITE_LINE_MEMBER(bbc_hsync_changed); DECLARE_WRITE_LINE_MEMBER(bbc_vsync_changed); diff --git a/src/mame/includes/super6.h b/src/mame/includes/super6.h index 2aa8bd2621f..fb2189b93dd 100644 --- a/src/mame/includes/super6.h +++ b/src/mame/includes/super6.h @@ -52,17 +52,17 @@ private: virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_WRITE8_MEMBER( s100_w ); - DECLARE_WRITE8_MEMBER( bank0_w ); - DECLARE_WRITE8_MEMBER( bank1_w ); + uint8_t fdc_r(); + void fdc_w(uint8_t data); + void s100_w(uint8_t data); + void bank0_w(uint8_t data); + void bank1_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); + uint8_t io_read_byte(offs_t offset); + void io_write_byte(offs_t offset, uint8_t data); void super6_io(address_map &map); void super6_mem(address_map &map); diff --git a/src/mame/includes/z88.h b/src/mame/includes/z88.h index 90fb78de122..ade59a27a67 100644 --- a/src/mame/includes/z88.h +++ b/src/mame/includes/z88.h @@ -67,7 +67,7 @@ private: virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_READ8_MEMBER(kb_r); + uint8_t kb_r(offs_t offset); UPD65031_MEMORY_UPDATE(bankswitch_update); UPD65031_SCREEN_UPDATE(lcd_update); diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp index d022ae919e1..9c5ed4228b4 100644 --- a/src/mame/machine/bbc.cpp +++ b/src/mame/machine/bbc.cpp @@ -31,7 +31,7 @@ TIMER_CALLBACK_MEMBER(bbc_state::reset_timer_cb) BBC Model B memory handling functions ****************************************/ -READ8_MEMBER(bbc_state::bbc_ram_r) +uint8_t bbc_state::bbc_ram_r(offs_t offset) { if (m_internal && m_internal->overrides_ram()) return m_internal->ram_r(offset); @@ -39,7 +39,7 @@ READ8_MEMBER(bbc_state::bbc_ram_r) return m_ram->pointer()[offset & m_ram->mask()]; } -WRITE8_MEMBER(bbc_state::bbc_ram_w) +void bbc_state::bbc_ram_w(offs_t offset, uint8_t data) { if (m_internal && m_internal->overrides_ram()) m_internal->ram_w(offset, data); @@ -47,7 +47,7 @@ WRITE8_MEMBER(bbc_state::bbc_ram_w) m_ram->pointer()[offset & m_ram->mask()] = data; } -READ8_MEMBER(bbc_state::bbc_romsel_r) +uint8_t bbc_state::bbc_romsel_r(offs_t offset) { if (m_internal && m_internal->overrides_rom()) return m_internal->romsel_r(offset); @@ -55,7 +55,7 @@ READ8_MEMBER(bbc_state::bbc_romsel_r) return 0xfe; } -WRITE8_MEMBER(bbc_state::bbc_romsel_w) +void bbc_state::bbc_romsel_w(offs_t offset, uint8_t data) { /* no sideways expansion board fitted so address only the 4 on board ROM sockets */ m_romsel = data & 0x03; @@ -65,7 +65,7 @@ WRITE8_MEMBER(bbc_state::bbc_romsel_w) m_internal->romsel_w(offset, data); } -READ8_MEMBER(bbc_state::bbc_paged_r) +uint8_t bbc_state::bbc_paged_r(offs_t offset) { uint8_t data; @@ -88,7 +88,7 @@ READ8_MEMBER(bbc_state::bbc_paged_r) return data; } -WRITE8_MEMBER(bbc_state::bbc_paged_w) +void bbc_state::bbc_paged_w(offs_t offset, uint8_t data) { if (m_internal && m_internal->overrides_rom()) { @@ -103,7 +103,7 @@ WRITE8_MEMBER(bbc_state::bbc_paged_w) } } -READ8_MEMBER(bbc_state::bbc_mos_r) +uint8_t bbc_state::bbc_mos_r(offs_t offset) { if (m_internal && m_internal->overrides_mos()) return m_internal->mos_r(offset); @@ -111,13 +111,13 @@ READ8_MEMBER(bbc_state::bbc_mos_r) return m_region_mos->base()[offset]; } -WRITE8_MEMBER(bbc_state::bbc_mos_w) +void bbc_state::bbc_mos_w(offs_t offset, uint8_t data) { if (m_internal && m_internal->overrides_mos()) m_internal->mos_w(offset, data); } -READ8_MEMBER(bbc_state::bbc_fred_r) +uint8_t bbc_state::bbc_fred_r(offs_t offset) { uint8_t data = 0xff; @@ -131,7 +131,7 @@ READ8_MEMBER(bbc_state::bbc_fred_r) return data; } -WRITE8_MEMBER(bbc_state::bbc_fred_w) +void bbc_state::bbc_fred_w(offs_t offset, uint8_t data) { m_1mhzbus->fred_w(offset, data); @@ -141,7 +141,7 @@ WRITE8_MEMBER(bbc_state::bbc_fred_w) m_cart[1]->write(offset, data, 1, 0, m_romsel & 0x01, 0, 0); } -READ8_MEMBER(bbc_state::bbc_jim_r) +uint8_t bbc_state::bbc_jim_r(offs_t offset) { uint8_t data = 0xff; @@ -155,7 +155,7 @@ READ8_MEMBER(bbc_state::bbc_jim_r) return data; } -WRITE8_MEMBER(bbc_state::bbc_jim_w) +void bbc_state::bbc_jim_w(offs_t offset, uint8_t data) { m_1mhzbus->jim_w(offset, data); @@ -170,7 +170,7 @@ WRITE8_MEMBER(bbc_state::bbc_jim_w) BBC Model B+ memory handling functions ****************************************/ -READ8_MEMBER(bbc_state::bbcbp_fetch_r) +uint8_t bbc_state::bbcbp_fetch_r(offs_t offset) { switch (offset & 0xf000) { @@ -206,7 +206,7 @@ READ8_MEMBER(bbc_state::bbcbp_fetch_r) return m_maincpu->space(AS_PROGRAM).read_byte(offset); } -WRITE8_MEMBER(bbc_state::bbcbp_romsel_w) +void bbc_state::bbcbp_romsel_w(offs_t offset, uint8_t data) { /* the BBC Model B+ addresses all 16 ROM sockets and extra 12K of RAM at 0x8000 and 20K of shadow RAM at 0x3000 */ switch (offset & 0x07) @@ -229,7 +229,7 @@ WRITE8_MEMBER(bbc_state::bbcbp_romsel_w) m_internal->romsel_w(offset, data); } -READ8_MEMBER(bbc_state::bbcbp_paged_r) +uint8_t bbc_state::bbcbp_paged_r(offs_t offset) { uint8_t data; std::string region_tag; @@ -261,7 +261,7 @@ READ8_MEMBER(bbc_state::bbcbp_paged_r) return data; } -WRITE8_MEMBER(bbc_state::bbcbp_paged_w) +void bbc_state::bbcbp_paged_w(offs_t offset, uint8_t data) { if (m_paged_ram && offset < 0x3000) { @@ -319,7 +319,7 @@ WRITE8_MEMBER(bbc_state::bbcbp_paged_w) ANDY is the name of the 4K of RAM used by the MOS at &8000-&8FFF */ -READ8_MEMBER(bbc_state::bbcm_fetch_r) +uint8_t bbc_state::bbcm_fetch_r(offs_t offset) { if (m_acccon_x || (m_acccon_e && offset >= 0xc000 && offset <= 0xdfff)) { @@ -332,12 +332,12 @@ READ8_MEMBER(bbc_state::bbcm_fetch_r) return m_maincpu->space(AS_PROGRAM).read_byte(offset); } -READ8_MEMBER(bbc_state::bbcm_acccon_r) +uint8_t bbc_state::bbcm_acccon_r() { return m_acccon; } -WRITE8_MEMBER(bbc_state::bbcm_acccon_w) +void bbc_state::bbcm_acccon_w(uint8_t data) { m_acccon = data; @@ -372,7 +372,7 @@ WRITE8_MEMBER(bbc_state::bbcm_acccon_w) m_bankdev->set_bank(m_acccon_tst); } -WRITE8_MEMBER(bbc_state::bbcm_romsel_w) +void bbc_state::bbcm_romsel_w(offs_t offset, uint8_t data) { m_paged_ram = BIT(data, 7); m_romsel = data & 0x0f; @@ -382,7 +382,7 @@ WRITE8_MEMBER(bbc_state::bbcm_romsel_w) m_internal->romsel_w(offset, data); } -READ8_MEMBER(bbc_state::bbcm_paged_r) +uint8_t bbc_state::bbcm_paged_r(offs_t offset) { uint8_t data = 0xff; @@ -454,7 +454,7 @@ READ8_MEMBER(bbc_state::bbcm_paged_r) return data; } -WRITE8_MEMBER(bbc_state::bbcm_paged_w) +void bbc_state::bbcm_paged_w(offs_t offset, uint8_t data) { if (m_paged_ram && offset < 0x1000) { @@ -506,7 +506,7 @@ WRITE8_MEMBER(bbc_state::bbcm_paged_w) } } -READ8_MEMBER(bbc_state::bbcmc_paged_r) +uint8_t bbc_state::bbcmc_paged_r(offs_t offset) { uint8_t data = 0xff; @@ -553,7 +553,7 @@ READ8_MEMBER(bbc_state::bbcmc_paged_r) return data; } -WRITE8_MEMBER(bbc_state::bbcmc_paged_w) +void bbc_state::bbcmc_paged_w(offs_t offset, uint8_t data) { if (m_paged_ram && offset < 0x1000) { @@ -588,7 +588,7 @@ WRITE8_MEMBER(bbc_state::bbcmc_paged_w) } } -READ8_MEMBER(bbc_state::bbcm_hazel_r) +uint8_t bbc_state::bbcm_hazel_r(offs_t offset) { uint8_t data; @@ -607,7 +607,7 @@ READ8_MEMBER(bbc_state::bbcm_hazel_r) return data; } -WRITE8_MEMBER(bbc_state::bbcm_hazel_w) +void bbc_state::bbcm_hazel_w(offs_t offset, uint8_t data) { if (m_acccon_y) { @@ -615,7 +615,7 @@ WRITE8_MEMBER(bbc_state::bbcm_hazel_w) } } -READ8_MEMBER(bbc_state::bbcm_tube_r) +uint8_t bbc_state::bbcm_tube_r(offs_t offset) { uint8_t data = 0xfe; @@ -633,7 +633,7 @@ READ8_MEMBER(bbc_state::bbcm_tube_r) return data; } -WRITE8_MEMBER(bbc_state::bbcm_tube_w) +void bbc_state::bbcm_tube_w(offs_t offset, uint8_t data) { if (m_acccon_itu) { @@ -888,12 +888,12 @@ void bbc_state::mc146818_set() } -READ8_MEMBER(bbc_state::via_system_porta_r) +uint8_t bbc_state::via_system_porta_r() { return m_via_system_porta; } -WRITE8_MEMBER(bbc_state::via_system_porta_w) +void bbc_state::via_system_porta_w(uint8_t data) { m_via_system_porta = data; @@ -915,7 +915,7 @@ WRITE8_MEMBER(bbc_state::via_system_porta_w) } -READ8_MEMBER(bbc_state::via_system_portb_r) +uint8_t bbc_state::via_system_portb_r() { uint8_t data = 0xff; @@ -945,7 +945,7 @@ READ8_MEMBER(bbc_state::via_system_portb_r) return data; } -WRITE8_MEMBER(bbc_state::via_system_portb_w) +void bbc_state::via_system_portb_w(uint8_t data) { m_latch->write_nibble_d3(data); @@ -1233,7 +1233,7 @@ void bbc_state::cassette_motor(bool motor_state) 110 - 16MHz / 13 / 256 - 75 baud */ -WRITE8_MEMBER(bbc_state::serial_ula_w) +void bbc_state::serial_ula_w(uint8_t data) { static const int serial_clocks[8] = { @@ -1347,7 +1347,7 @@ WRITE_LINE_MEMBER(bbc_state::fdc_drq_w) 0 Drive select 0. */ -WRITE8_MEMBER(bbc_state::bbcbp_drive_control_w) +void bbc_state::bbcbp_drive_control_w(uint8_t data) { floppy_image_device *floppy = nullptr; @@ -1383,7 +1383,7 @@ WRITE8_MEMBER(bbc_state::bbcbp_drive_control_w) 0 Drive select 0. */ -WRITE8_MEMBER(bbc_state::bbcm_drive_control_w) +void bbc_state::bbcm_drive_control_w(uint8_t data) { floppy_image_device *floppy = nullptr; @@ -1403,7 +1403,7 @@ WRITE8_MEMBER(bbc_state::bbcm_drive_control_w) m_wd1770->mr_w(BIT(data, 2)); } -WRITE8_MEMBER(bbc_state::bbcmc_drive_control_w) +void bbc_state::bbcmc_drive_control_w(uint8_t data) { floppy_image_device *floppy = nullptr; @@ -1680,7 +1680,7 @@ void bbc_state::machine_reset() if (m_bbcconfig.read_safe(0) & 0x04) m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xfea0, 0xfebf, read8sm_delegate(*m_adlc, FUNC(mc6854_device::read)), write8sm_delegate(*m_adlc, FUNC(mc6854_device::write))); else - m_maincpu->space(AS_PROGRAM).install_read_handler(0xfea0, 0xfebf, read8_delegate(*this, FUNC(bbc_state::bbc_fe_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xfea0, 0xfebf, read8smo_delegate(*this, FUNC(bbc_state::bbc_fe_r))); /* power-on reset timer, should produce "boo...beep" startup sound before sn76496 is initialised */ //m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); diff --git a/src/mame/video/bbc.cpp b/src/mame/video/bbc.cpp index 24d8d0f5a4b..6970117aa5d 100644 --- a/src/mame/video/bbc.cpp +++ b/src/mame/video/bbc.cpp @@ -141,7 +141,7 @@ void bbc_state::set_pixel_lookup() } -WRITE8_MEMBER(bbc_state::video_ula_w) +void bbc_state::video_ula_w(offs_t offset, uint8_t data) { // Make sure vpos is never <0 int vpos = m_screen->vpos(); From 6524aea482d9995c315a277618f67f751ad47f23 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 13 May 2020 12:39:37 -0400 Subject: [PATCH 10/69] i8155: Allow writes to port registers to alter latches whether or not output mode is configured (nw) ams40041: Use make_unique_clear to initialize video RAM (nw) --- src/devices/machine/i8155.cpp | 4 ++-- src/mame/video/ams40041.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp index 4703fed8990..c42811248db 100644 --- a/src/devices/machine/i8155.cpp +++ b/src/devices/machine/i8155.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(I8156, i8156_device, "i8156", "Intel 8156 RAM, I/O & Timer") #define LOG_PORT (1U << 0) #define LOG_TIMER (1U << 1) -#define VERBOSE (0) +#define VERBOSE (LOG_PORT | LOG_TIMER) #include "logmacro.h" enum @@ -245,10 +245,10 @@ inline uint8_t i8155_device::read_port(int port) inline void i8155_device::write_port(int port, uint8_t data) { + m_output[port] = data; switch (get_port_mode(port)) { case PORT_MODE_OUTPUT: - m_output[port] = data; if (port == PORT_A) m_out_pa_cb((offs_t)0, m_output[port]); else if (port == PORT_B) diff --git a/src/mame/video/ams40041.cpp b/src/mame/video/ams40041.cpp index fd8dc8c0aed..fc0143efa91 100644 --- a/src/mame/video/ams40041.cpp +++ b/src/mame/video/ams40041.cpp @@ -112,7 +112,7 @@ void ams40041_device::device_start() m_supports_transparent = false; // allocate memory - m_video_ram = std::make_unique(0x10000); + m_video_ram = make_unique_clear(0x10000); // state saving save_pointer(NAME(m_video_ram), 0x10000); From f5c82c5530f22019a86e02c9cc136375fdbd1e6a Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 13 May 2020 19:15:36 +0200 Subject: [PATCH 11/69] cp1: use pwm_display for 7segs, regression fixed now (nw) --- src/mame/drivers/atarisy1.cpp | 4 +++- src/mame/drivers/cp1.cpp | 31 ++++++++++++------------------- src/mame/layout/cp1.lay | 34 +++++++++++++++++----------------- 3 files changed, 32 insertions(+), 37 deletions(-) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index f92287789b2..936e4035119 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -13,9 +13,11 @@ * Road Runner (1985) [3 sets] * Road Blasters (1987) [10 sets] - Known bugs: + TODO: * indytemp: "Welcome" doesn't play at start (regression). Code for speech (0x46) is written but fails to play due to timing issues. + * is MOTHERBOARD_ALPHA actually 16KB, or maybe only for the LSI version? + see romsets of indytempc, roadblstcg **************************************************************************** diff --git a/src/mame/drivers/cp1.cpp b/src/mame/drivers/cp1.cpp index 97f50ef2fe7..8aec2a4fe7b 100644 --- a/src/mame/drivers/cp1.cpp +++ b/src/mame/drivers/cp1.cpp @@ -13,10 +13,13 @@ ****************************************************************************/ #include "emu.h" + #include "cpu/mcs48/mcs48.h" #include "machine/i8155.h" #include "imagedev/cassette.h" #include "imagedev/snapquik.h" +#include "video/pwm.h" + #include "speaker.h" #include "cp1.lh" @@ -29,9 +32,9 @@ public: m_i8155(*this, "i8155"), m_i8155_cp3(*this, "i8155_cp3"), m_cassette(*this, "cassette"), + m_display(*this, "display"), m_io_lines(*this, "LINE%u", 0U), - m_io_config(*this, "CONFIG"), - m_digits(*this, "digit%u", 0U) + m_io_config(*this, "CONFIG") { } void cp1(machine_config &config); @@ -58,9 +61,9 @@ private: required_device m_i8155; required_device m_i8155_cp3; required_device m_cassette; + required_device m_display; required_ioport_array<5> m_io_lines; required_ioport m_io_config; - output_finder<6> m_digits; uint8_t m_7seg; uint8_t m_port2; @@ -153,19 +156,8 @@ WRITE8_MEMBER(cp1_state::i8155_write) WRITE8_MEMBER(cp1_state::i8155_porta_w) { - data &= 0x7f; // PA7 is not connected - - if (m_7seg) - { - if (!(m_matrix & 0x01)) m_digits[5] = data; - if (!(m_matrix & 0x02)) m_digits[4] = data; - if (!(m_matrix & 0x04)) m_digits[3] = data; - if (!(m_matrix & 0x08)) m_digits[2] = data | 0x80; // this digit has always the dot active - if (!(m_matrix & 0x10)) m_digits[1] = data; - if (!(m_matrix & 0x20)) m_digits[0] = data; - } - - m_7seg ^= 0x01; + m_7seg = data & 0x7f; // PA7 is not connected + m_display->matrix(~m_matrix, m_7seg); } READ8_MEMBER(cp1_state::i8155_portb_r) @@ -181,9 +173,9 @@ WRITE8_MEMBER(cp1_state::i8155_portb_w) WRITE8_MEMBER(cp1_state::i8155_portc_w) { - // --xx xxxx keyboard matrix - + // --xx xxxx keyboard matrix, 7seg select m_matrix = data & 0x3f; + m_display->matrix(~m_matrix, m_7seg); } @@ -232,7 +224,6 @@ INPUT_PORTS_END void cp1_state::machine_start() { - m_digits.resolve(); } void cp1_state::machine_reset() @@ -286,6 +277,8 @@ void cp1_state::cp1(machine_config &config) I8155(config, "i8155_cp3", 0); + PWM_DISPLAY(config, m_display).set_size(6, 7); + m_display->set_segmask(0x3f, 0x7f); config.set_default_layout(layout_cp1); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/layout/cp1.lay b/src/mame/layout/cp1.lay index ef864610165..3ad54c80ba6 100644 --- a/src/mame/layout/cp1.lay +++ b/src/mame/layout/cp1.lay @@ -3,41 +3,41 @@ license:CC0 --> + + + + - - - - - - - - - - - + + - + - + - + - + - + - + + + + + + From e2ddb46215acd78b0fcf3ece29b253e8afb61313 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 13 May 2020 22:02:22 +0200 Subject: [PATCH 12/69] QA a selection of Amiga OCS games (nw) --- hash/amigaocs_flop.xml | 322 +++++++++++++++++++++++++++++++++-------- 1 file changed, 262 insertions(+), 60 deletions(-) diff --git a/hash/amigaocs_flop.xml b/hash/amigaocs_flop.xml index a2d4c7048fd..8a8c8c36b7c 100644 --- a/hash/amigaocs_flop.xml +++ b/hash/amigaocs_flop.xml @@ -1436,6 +1436,7 @@ license:CC0 + Alien Breed (Euro) @@ -1759,6 +1760,7 @@ license:CC0 + Altered Beast (Euro) @@ -1825,6 +1827,7 @@ license:CC0 + The Amazing Spider-Man (Euro) @@ -1832,6 +1835,7 @@ license:CC0 1990 Empire + @@ -2287,6 +2291,7 @@ license:CC0 + Apidya (Euro) @@ -2503,6 +2508,7 @@ license:CC0 + Archipelagos (Euro) @@ -2806,6 +2812,7 @@ license:CC0 + Arnie (Euro) @@ -2820,6 +2827,7 @@ license:CC0 + Arnie 2 (Euro) @@ -2924,7 +2932,8 @@ license:CC0 - + + Aspar Master Grand Prix (Euro, Les Fous du Volant) @@ -3928,6 +3937,7 @@ license:CC0 + Barbarian (Euro, v16.3.88, Palace) @@ -3984,6 +3994,7 @@ license:CC0 + Barbarian II (Euro, Palace, v4.8.89) @@ -4525,6 +4536,7 @@ license:CC0 + Battle Squadron (Euro) @@ -4708,6 +4720,7 @@ license:CC0 + Beach Volley (Euro) @@ -5248,6 +5261,7 @@ license:CC0 + Beverly Hills Cop (Euro) @@ -6306,6 +6320,7 @@ license:CC0 + Bomber Bob (Euro) @@ -7002,13 +7017,15 @@ license:CC0 - + + Budokan - The Martial Spirit (Euro) 1990 Electronic Arts + @@ -7331,6 +7348,7 @@ license:CC0 + Cadaver (Euro, v0.01) @@ -7373,6 +7391,7 @@ license:CC0 + Cadaver - The Pay Off (Euro) @@ -7562,6 +7581,7 @@ license:CC0 + Cannon Fodder (Euro) @@ -7842,6 +7862,7 @@ license:CC0 + Captive (Euro, v1.2) @@ -8307,6 +8328,7 @@ license:CC0 + Centurion - Defender of Rome (USA) @@ -8314,6 +8336,7 @@ license:CC0 1991 Electronic Arts + @@ -10085,6 +10108,7 @@ license:CC0 + Cosmic Bouncer (Euro) @@ -11647,6 +11671,7 @@ license:CC0 + The Deep (Euro) @@ -11703,6 +11728,7 @@ license:CC0 + Defender of the Crown (Euro) @@ -11941,6 +11967,7 @@ license:CC0 + Desert Strike - Return to the Gulf (Euro) @@ -12328,6 +12355,7 @@ license:CC0 + Dogs Of War @@ -12479,6 +12507,7 @@ license:CC0 + Double Dragon (Euro, v2.16) @@ -12507,6 +12536,7 @@ license:CC0 + Double Dragon II (Euro, v4.01ECS) @@ -12552,6 +12582,7 @@ license:CC0 + Double Dragon 3 - The Rosetta Stone (Euro) @@ -12847,13 +12878,15 @@ license:CC0 - + + Dragon's Lair: Escape from Singe's Castle (Euro) 1990 Visionary + @@ -12925,6 +12958,7 @@ license:CC0 + Dragon's Lair (Euro) @@ -12970,6 +13004,7 @@ license:CC0 + Dragon's Lair II - Time Warp (Euro) @@ -13015,6 +13050,7 @@ license:CC0 + Dragon's Lair III: The Curse of Mordread (Euro) @@ -13439,6 +13475,7 @@ license:CC0 + Duck Tales - "The Quest for Gold" (Euro, v1.0) @@ -13446,6 +13483,7 @@ license:CC0 1990 Titus + @@ -13643,7 +13681,8 @@ license:CC0 - + + Dungeon Master (Euro, v3.6) @@ -13765,13 +13804,15 @@ license:CC0 - + + Dylan Dog - Ritorno al Crepuscolo (Ita) 1993 Simulmondo + @@ -14207,7 +14248,8 @@ license:CC0 - + + Elvira - Mistress of the Dark (Euro) @@ -14558,6 +14600,7 @@ license:CC0 + Emlyn Hughes International Soccer (Euro) @@ -14759,7 +14802,8 @@ license:CC0 - + + Escape from Colditz (Euro) @@ -15031,6 +15075,7 @@ license:CC0 + Exile (Euro) @@ -15469,7 +15514,8 @@ license:CC0 - + + F1 GP Circuits (Euro) @@ -16214,6 +16260,7 @@ license:CC0 + Final Fight (Euro, Super Fighter) @@ -17171,7 +17218,8 @@ license:CC0 - + + Fred (Euro) @@ -18191,6 +18239,7 @@ license:CC0 + Ghostbusters II (Euro) @@ -18289,6 +18338,8 @@ license:CC0 + + Ghouls 'n' Ghosts & Venus the Flytrap (Euro, Chart Attack) @@ -18660,6 +18711,7 @@ license:CC0 1991 U.S. Gold + @@ -18698,6 +18750,7 @@ license:CC0 + Gods (Euro, v1.00) @@ -18852,7 +18905,8 @@ license:CC0 - + + Graffiti Man (Euro, 5th Anniversary) @@ -19041,13 +19095,15 @@ license:CC0 - + + Great Courts 2 (Euro) 1991 Ubi Soft + @@ -19069,6 +19125,7 @@ license:CC0 + The Great Giana Sisters (Euro) @@ -19154,6 +19211,7 @@ license:CC0 + Grid Start (Euro, Sextett) @@ -19340,6 +19398,7 @@ license:CC0 + Guy Spy (Euro) @@ -20088,6 +20147,7 @@ license:CC0 + HeroQuest (Euro) @@ -20395,6 +20455,7 @@ license:CC0 + Hoi (Euro) @@ -21191,6 +21252,7 @@ license:CC0 + Hybris (USA, v0.95) @@ -21705,6 +21767,7 @@ license:CC0 + Indiana Jones and the Last Crusade (Euro, TAG) @@ -22494,6 +22557,7 @@ license:CC0 + It Came from the Desert (Euro) @@ -22543,6 +22607,7 @@ license:CC0 + Ivanhoe (Euro) @@ -23098,25 +23163,27 @@ license:CC0 + John Madden Football (Euro) 1992 + Electronic Arts - - - - - - + + + + + + @@ -23202,7 +23269,8 @@ license:CC0 - + + Journey to the Center of the Earth (Euro) @@ -23444,6 +23512,7 @@ license:CC0 + Katakis (Euro, v1.1) @@ -23596,6 +23665,7 @@ license:CC0 1992 Virgin + @@ -23688,6 +23758,7 @@ license:CC0 + Kick Off (Euro, v1.1) @@ -24135,6 +24206,7 @@ license:CC0 + Killing Machine (Euro) @@ -24411,6 +24483,7 @@ license:CC0 + The King of Chicago (Euro) @@ -24503,7 +24576,8 @@ license:CC0 - + + Knight Force (Euro) @@ -24552,6 +24626,7 @@ license:CC0 + Knights of the Crystallion (Euro) @@ -24870,6 +24945,7 @@ license:CC0 + Last Battle (Euro) @@ -24898,6 +24974,7 @@ license:CC0 + Last Ninja 2 - Back With A Vengeance (Euro) @@ -24912,6 +24989,7 @@ license:CC0 + Last Ninja 2 - Back With A Vengeance (Euro, Superheroes) @@ -25726,6 +25804,7 @@ license:CC0 + Lemmings (Euro) @@ -25845,6 +25924,7 @@ license:CC0 + Lemmings 2 - The Tribes (Euro) @@ -25934,6 +26014,7 @@ license:CC0 + Lethal Weapon (Euro) @@ -26017,6 +26098,7 @@ license:CC0 + Life and Death (Euro) @@ -26135,6 +26217,7 @@ license:CC0 + Lionheart (Euro) @@ -26168,7 +26251,8 @@ license:CC0 - + + Little Computer People (Euro) @@ -26298,6 +26382,7 @@ license:CC0 + Lombard RAC Rally (Euro) @@ -26306,17 +26391,17 @@ license:CC0 1988 Mandarin - - - - - - + + + + + + @@ -26347,13 +26432,15 @@ license:CC0 - + + Loom (Euro, v1.2 19900510) 1990 Lucasfilm + @@ -26537,6 +26624,7 @@ license:CC0 + Lords of the Rising Sun (Euro) @@ -26579,6 +26667,7 @@ license:CC0 + Lost Patrol (Euro) @@ -26600,6 +26689,7 @@ license:CC0 + Lost Patrol (USA) @@ -26729,6 +26819,7 @@ license:CC0 + Lotus Esprit Turbo Challenge (Euro) @@ -26771,6 +26862,7 @@ license:CC0 + Lotus III - The Ultimate Challenge (Euro) @@ -26792,6 +26884,7 @@ license:CC0 + Lotus Turbo Challenge 2 (Euro) @@ -27206,7 +27299,8 @@ license:CC0 - + + Major Motion (Euro) @@ -27687,6 +27781,7 @@ license:CC0 + Mayday Squad Heroes (Euro) @@ -28213,6 +28308,7 @@ license:CC0 + Micro Machines (Euro) @@ -28241,6 +28337,7 @@ license:CC0 + MicroProse Formula One Grand Prix (Euro) @@ -28274,6 +28371,7 @@ license:CC0 + MicroProse Soccer (Euro, Soccer Stars) @@ -28288,6 +28386,7 @@ license:CC0 + Midnight Resistance (Euro) @@ -28697,7 +28796,8 @@ license:CC0 - + + Moebius - The Orb of Celestial Harmony (USA) @@ -28711,6 +28811,7 @@ license:CC0 + Monkey Island 2 - LeChuck's Revenge (Euro, v1.0 19920408) @@ -29222,6 +29323,7 @@ license:CC0 + Motörhead (Euro) @@ -29503,6 +29605,7 @@ license:CC0 + 'Nam 1965-1975 (Euro) @@ -29567,6 +29670,7 @@ license:CC0 + Nathan Never (Euro) @@ -29636,6 +29740,7 @@ license:CC0 + Navy Seals (Euro) @@ -29937,6 +30042,7 @@ license:CC0 + Night Hunter (Euro, 10 Great Games) @@ -30111,6 +30217,7 @@ license:CC0 + Ninja Remix (Euro) @@ -30152,6 +30259,7 @@ license:CC0 + The Ninja Warriors (Euro) @@ -30261,6 +30369,7 @@ license:CC0 + No Exit (Euro) @@ -30268,6 +30377,7 @@ license:CC0 1990 Tomahawk + @@ -30344,7 +30454,8 @@ license:CC0 - + + North & South (Euro) @@ -30470,6 +30581,7 @@ license:CC0 + Odyssey (Euro, aud304312c 19970206) @@ -30491,6 +30603,7 @@ license:CC0 + Odyssey (Euro, aud304312b 19960201) @@ -30512,6 +30625,7 @@ license:CC0 + Odyssey (Euro, aud304312a 19950523) @@ -30725,7 +30839,8 @@ license:CC0 - + + Omega (Euro) @@ -30802,6 +30917,7 @@ license:CC0 + Onslaught (Euro) @@ -31304,6 +31420,7 @@ license:CC0 + Out Run (Euro) @@ -31346,6 +31463,7 @@ license:CC0 + Out Run Europa (Euro) @@ -31443,7 +31561,8 @@ license:CC0 - + + Over the Net (USA) @@ -31611,6 +31730,7 @@ license:CC0 + Pang (Euro) @@ -31625,6 +31745,7 @@ license:CC0 + Panza Kick Boxing (Euro) @@ -32578,6 +32699,7 @@ license:CC0 + Platoon (USA) @@ -32613,6 +32735,7 @@ license:CC0 + Player Manager (Euro) @@ -32641,6 +32764,7 @@ license:CC0 + Player Manager (Ita) @@ -32957,7 +33081,8 @@ license:CC0 - + + Ports of Call (Euro, v1.1, A600 Smart Start) @@ -33154,6 +33279,7 @@ license:CC0 + Predator 2 (Euro) @@ -35074,7 +35200,8 @@ license:CC0 - + + Retee! (Ita) @@ -35165,6 +35292,7 @@ license:CC0 + Rick Dangerous (Euro, MicroStyle re-release) @@ -35179,6 +35307,7 @@ license:CC0 + Rick Dangerous (Euro) @@ -35193,6 +35322,7 @@ license:CC0 + Rick Dangerous (Euro, Alt, Unlimited Lives?) @@ -35207,6 +35337,7 @@ license:CC0 + Rick Dangerous 2 (Euro) @@ -35221,6 +35352,7 @@ license:CC0 + Rick Dangerous 2 (Euro, Budget) @@ -35730,6 +35862,7 @@ license:CC0 + Rocket Ranger (Euro) @@ -35814,6 +35947,7 @@ license:CC0 + Rock 'n Roll (Euro) @@ -36365,6 +36499,7 @@ license:CC0 + The Saddam Hussein Game (USA) @@ -36435,6 +36570,7 @@ license:CC0 + SAS Combat Simulator (Euro) @@ -36477,6 +36613,7 @@ license:CC0 + Savage (Euro) @@ -36658,7 +36795,8 @@ license:CC0 - + + Seconds Out (Euro, Budget) @@ -36672,6 +36810,7 @@ license:CC0 + The Secret of Monkey Island (Euro, v1.2) @@ -36679,6 +36818,7 @@ license:CC0 1991 U.S. Gold + @@ -36858,6 +36998,7 @@ license:CC0 + Sensible Soccer (Euro, v1.0) @@ -36880,9 +37021,10 @@ license:CC0 - + + Sensible Soccer v1.1 (Euro) @@ -37089,6 +37231,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Sensible World of Soccer 96-97 (Euro) @@ -37266,6 +37409,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Shadow of the Beast (Euro) @@ -37322,6 +37466,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Shadow of the Beast II (Euro) @@ -37364,6 +37509,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Shadow of the Beast III (Euro) @@ -37439,7 +37585,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Shadow Warriors (Euro) @@ -37495,6 +37642,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Shadowlands (Euro) @@ -38028,13 +38176,15 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Sim City (Euro, v1.2) 1989 Infogrames + @@ -38670,7 +38820,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Skrull the Barbarian (Euro) @@ -38955,6 +39106,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Slip Stream (Euro) @@ -39004,6 +39156,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Snoopy - The Cool Computer Game (Euro) @@ -39018,6 +39171,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Snoopy - The Cool Computer Game (Euro, Alt) @@ -39093,6 +39247,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Soccer Pinball (Euro) @@ -39303,6 +39458,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Space Ace (Euro) @@ -39336,6 +39492,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Space Ace II - Borf's Revenge (Euro) @@ -39501,6 +39658,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Space Hulk (Euro) @@ -41031,6 +41189,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Stormlord (Euro) @@ -41169,6 +41328,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Strider (Euro) @@ -41183,7 +41343,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Strider II (Euro) @@ -41536,6 +41697,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Supaplex (Euro) @@ -41550,6 +41712,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Super Cars (Euro) @@ -41585,6 +41748,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Super Cars II (Euro) @@ -41662,6 +41826,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Super Monaco GP (Euro) @@ -41747,6 +41912,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Super Skidmarks (Euro, v2.2) @@ -41755,23 +41921,23 @@ Because according to available sources v1.1 was always boxed as 'European Champi 1995 Acid + + + + + + - + - - - - - - @@ -42005,6 +42171,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Superfrog (Euro) @@ -42193,6 +42360,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + SWIV (Euro, 19910228) @@ -42235,13 +42403,15 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Sword of Honour (Euro) 1992 Prestige + @@ -42256,6 +42426,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Sword of Sodan (Euro) @@ -42283,6 +42454,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Swords of Twilight (Euro) @@ -42291,17 +42463,17 @@ Because according to available sources v1.1 was always boxed as 'European Champi 1989 Electronic Arts - - - - - - + + + + + + @@ -42564,6 +42736,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Targhan (Euro) @@ -42677,6 +42850,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Teenage Mutant Ninja Turtles (Euro, Ultra Games) @@ -42684,6 +42858,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi 1990 Ultra Games + @@ -42880,7 +43055,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Terramex (Euro) @@ -43228,7 +43404,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Thexder (Euro) @@ -43613,6 +43790,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Time Runners 1 - Gateways in Time (Euro) @@ -43627,6 +43805,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Time Runners 2 - The Space Stone (Euro) @@ -44005,6 +44184,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Time Runners 30 - The Final Duel (Euro) @@ -44543,6 +44723,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Tournament Golf (Euro) @@ -44662,6 +44843,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Transarctica (Euro) @@ -44948,6 +45130,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Turrican (Euro) @@ -44976,6 +45159,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Turrican II (Euro) @@ -45006,6 +45190,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Turrican 3 (Euro) @@ -45656,9 +45841,9 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + The Untouchables (Euro) @@ -45901,6 +46086,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Vengeance of Excalibur (Euro) @@ -46104,6 +46290,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Vixen (Euro) @@ -46297,6 +46484,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Vyrus (Euro) @@ -47127,6 +47315,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Wild Streets (Euro) @@ -47293,6 +47482,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi 1990 Mirrorsoft + @@ -47328,6 +47518,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Wings of Fury (Euro) @@ -47650,6 +47841,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Wolfchild (Euro) @@ -47706,7 +47898,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Wonderland (Euro, v1.27i 19910422) @@ -47893,6 +48086,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Worms (Euro) @@ -47900,6 +48094,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi 1995 Ocean + @@ -48148,7 +48343,8 @@ Because according to available sources v1.1 was always boxed as 'European Champi - + + Xenon (Euro) @@ -48177,6 +48373,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Xenon 2 - Megablast (Euro) @@ -48445,6 +48642,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Zak McKracken and the Alien Mindbenders (Euro) @@ -48466,6 +48664,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Zak McKracken and the Alien Mindbenders (Fra) @@ -48487,6 +48686,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Zak McKracken and the Alien Mindbenders (Ger) @@ -48508,6 +48708,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Zany Golf (USA) @@ -48550,6 +48751,7 @@ Because according to available sources v1.1 was always boxed as 'European Champi + Zeewolf (Euro, v1.02) From 320b2f66b07c890fd3b4cf02785987ec0ed39d0a Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 13 May 2020 22:05:21 +0200 Subject: [PATCH 13/69] some more handlers simplified (nw) --- src/devices/bus/a1bus/a1cffa.cpp | 8 ++-- src/devices/bus/a2bus/a2cffa.cpp | 8 ++-- src/devices/bus/a2bus/a2vulcan.cpp | 12 ++--- src/devices/bus/a2bus/a2zipdrive.cpp | 20 ++++---- src/devices/bus/adam/ide.cpp | 10 ++-- src/devices/bus/amiga/zorro/buddha.cpp | 16 +++---- src/devices/bus/ata/ataintf.h | 13 ++---- src/devices/bus/bbc/1mhzbus/datacentre.cpp | 12 ++--- src/devices/bus/bbc/1mhzbus/ide.cpp | 16 +++---- src/devices/bus/c64/ide64.cpp | 8 ++-- src/devices/bus/cpc/symbfac2.cpp | 10 ++-- src/devices/bus/isa/side116.cpp | 12 ++--- src/devices/bus/isa/xtide.cpp | 12 ++--- src/devices/bus/kc/d004.cpp | 8 ++-- src/devices/bus/ql/qubide.cpp | 14 +++--- src/devices/bus/ti99/peb/tn_ide.cpp | 8 ++-- src/mame/drivers/amiga.cpp | 40 ++++++---------- src/mame/drivers/apf.cpp | 36 +++++++-------- src/mame/drivers/apple1.cpp | 16 +++---- src/mame/drivers/apple2e.cpp | 4 +- src/mame/drivers/apple2gs.cpp | 38 +++++++-------- src/mame/drivers/arsystems.cpp | 4 +- src/mame/drivers/cobra.cpp | 8 ++-- src/mame/drivers/cubo.cpp | 4 +- src/mame/drivers/firebeat.cpp | 16 +++---- src/mame/drivers/gscpm.cpp | 4 +- src/mame/drivers/kinst.cpp | 8 ++-- src/mame/drivers/konamigs.cpp | 12 ++--- src/mame/drivers/konamim2.cpp | 4 +- src/mame/drivers/ksys573.cpp | 6 +-- src/mame/drivers/lisa.cpp | 2 +- src/mame/drivers/lwriter.cpp | 16 +++---- src/mame/drivers/mac128.cpp | 16 +++---- src/mame/drivers/macpci.cpp | 2 +- src/mame/drivers/pc9801.cpp | 8 ++-- src/mame/drivers/pcw.cpp | 22 ++++----- src/mame/drivers/psattack.cpp | 6 +-- src/mame/drivers/taitotz.cpp | 4 +- src/mame/drivers/upscope.cpp | 24 +++++----- src/mame/drivers/viper.cpp | 24 +++++----- src/mame/includes/amiga.h | 6 +-- src/mame/includes/amstrad.h | 26 +++++------ src/mame/includes/apollo.h | 40 ++++++++-------- src/mame/includes/lisa.h | 4 +- src/mame/includes/mac.h | 44 +++++++++--------- src/mame/includes/macpci.h | 8 ++-- src/mame/includes/pcw.h | 20 ++++---- src/mame/machine/amiga.cpp | 6 +-- src/mame/machine/amstrad.cpp | 54 +++++++++++----------- src/mame/machine/apollo.cpp | 40 ++++++++-------- src/mame/machine/lisa.cpp | 4 +- src/mame/machine/mac.cpp | 44 +++++++++--------- src/mame/machine/macpci.cpp | 8 ++-- src/mame/video/turrett.cpp | 4 +- 54 files changed, 401 insertions(+), 418 deletions(-) diff --git a/src/devices/bus/a1bus/a1cffa.cpp b/src/devices/bus/a1bus/a1cffa.cpp index 8c68e818531..ff1668a8eb9 100644 --- a/src/devices/bus/a1bus/a1cffa.cpp +++ b/src/devices/bus/a1bus/a1cffa.cpp @@ -97,7 +97,7 @@ READ8_MEMBER(a1bus_cffa_device::cffa_r) break; case 0x8: - m_lastdata = m_ata->read_cs0((offset & 0xf) - 8, 0xff); + m_lastdata = m_ata->cs0_r((offset & 0xf) - 8, 0xff); return m_lastdata & 0x00ff; case 0x9: @@ -107,7 +107,7 @@ READ8_MEMBER(a1bus_cffa_device::cffa_r) case 0xd: case 0xe: case 0xf: - return m_ata->read_cs0((offset & 0xf) - 8, 0xff); + return m_ata->cs0_r((offset & 0xf) - 8, 0xff); } return 0xff; @@ -132,7 +132,7 @@ WRITE8_MEMBER(a1bus_cffa_device::cffa_w) case 0x8: - m_ata->write_cs0((offset & 0xf) - 8, data, 0xff); + m_ata->cs0_w((offset & 0xf) - 8, data, 0xff); break; case 0x9: @@ -142,7 +142,7 @@ WRITE8_MEMBER(a1bus_cffa_device::cffa_w) case 0xd: case 0xe: case 0xf: - m_ata->write_cs0((offset & 0xf) - 8, data, 0xff); + m_ata->cs0_w((offset & 0xf) - 8, data, 0xff); break; } diff --git a/src/devices/bus/a2bus/a2cffa.cpp b/src/devices/bus/a2bus/a2cffa.cpp index 42a55c6b81c..7f6104310be 100644 --- a/src/devices/bus/a2bus/a2cffa.cpp +++ b/src/devices/bus/a2bus/a2cffa.cpp @@ -145,7 +145,7 @@ uint8_t a2bus_cffa2000_device::read_c0nx(uint8_t offset) // Apple /// driver uses sta $c080,x when writing, which causes spurious reads of c088 if (!m_inwritecycle) { - m_lastreaddata = m_ata->read_cs0(offset - 8); + m_lastreaddata = m_ata->cs0_r(offset - 8); } return m_lastreaddata & 0xff; @@ -156,7 +156,7 @@ uint8_t a2bus_cffa2000_device::read_c0nx(uint8_t offset) case 0xd: case 0xe: case 0xf: - return m_ata->read_cs0(offset-8, 0xff); + return m_ata->cs0_r(offset-8, 0xff); } return 0xff; @@ -192,7 +192,7 @@ void a2bus_cffa2000_device::write_c0nx(uint8_t offset, uint8_t data) m_lastdata &= 0xff00; m_lastdata |= data; // printf("%02x to 8, m_lastdata = %x\n", data, m_lastdata); - m_ata->write_cs0(offset-8, m_lastdata); + m_ata->cs0_w(offset-8, m_lastdata); break; case 9: @@ -202,7 +202,7 @@ void a2bus_cffa2000_device::write_c0nx(uint8_t offset, uint8_t data) case 0xd: case 0xe: case 0xf: - m_ata->write_cs0(offset-8, data, 0xff); + m_ata->cs0_w(offset-8, data, 0xff); break; } } diff --git a/src/devices/bus/a2bus/a2vulcan.cpp b/src/devices/bus/a2bus/a2vulcan.cpp index 6bb4beaaf0a..dcc8e454a73 100644 --- a/src/devices/bus/a2bus/a2vulcan.cpp +++ b/src/devices/bus/a2bus/a2vulcan.cpp @@ -191,7 +191,7 @@ uint8_t a2bus_vulcanbase_device::read_c0nx(uint8_t offset) switch (offset) { case 0: - m_lastdata = m_ata->read_cs0(offset); + m_lastdata = m_ata->cs0_r(offset); // printf("IDE: read %04x\n", m_lastdata); m_last_read_was_0 = true; return m_lastdata&0xff; @@ -204,7 +204,7 @@ uint8_t a2bus_vulcanbase_device::read_c0nx(uint8_t offset) } else { - return m_ata->read_cs0(offset, 0xff); + return m_ata->cs0_r(offset, 0xff); } case 2: @@ -213,7 +213,7 @@ uint8_t a2bus_vulcanbase_device::read_c0nx(uint8_t offset) case 5: case 6: case 7: - return m_ata->read_cs0(offset, 0xff); + return m_ata->cs0_r(offset, 0xff); default: logerror("a2vulcan: unknown read @ C0n%x\n", offset); @@ -245,11 +245,11 @@ void a2bus_vulcanbase_device::write_c0nx(uint8_t offset, uint8_t data) m_lastdata &= 0x00ff; m_lastdata |= (data << 8); // printf("IDE: write %04x\n", m_lastdata); - m_ata->write_cs0(0, m_lastdata); + m_ata->cs0_w(0, m_lastdata); } else { - m_ata->write_cs0(offset, data, 0xff); + m_ata->cs0_w(offset, data, 0xff); } break; @@ -260,7 +260,7 @@ void a2bus_vulcanbase_device::write_c0nx(uint8_t offset, uint8_t data) case 6: case 7: // printf("%02x to IDE controller @ %x\n", data, offset); - m_ata->write_cs0(offset, data, 0xff); + m_ata->cs0_w(offset, data, 0xff); break; case 9: // ROM bank diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp index 6f76de550b0..fc06cb2a737 100644 --- a/src/devices/bus/a2bus/a2zipdrive.cpp +++ b/src/devices/bus/a2bus/a2zipdrive.cpp @@ -175,10 +175,10 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset) case 5: case 6: case 7: - return m_ata->read_cs0(offset, 0xff); + return m_ata->cs0_r(offset, 0xff); case 8: // data port - m_lastdata = m_ata->read_cs0(0, 0xffff); + m_lastdata = m_ata->cs0_r(0, 0xffff); // printf("%04x @ IDE data\n", m_lastdata); return m_lastdata&0xff; @@ -205,10 +205,10 @@ uint8_t a2bus_focusdrive_device::read_c0nx(uint8_t offset) case 0xd: case 0xe: case 0xf: - return m_ata->read_cs0(offset&7, 0xff); + return m_ata->cs0_r(offset&7, 0xff); case 0: // data port - m_lastdata = m_ata->read_cs0(0, 0xffff); + m_lastdata = m_ata->cs0_r(0, 0xffff); //printf("%04x @ IDE data\n", m_lastdata); return m_lastdata&0xff; @@ -240,7 +240,7 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data) case 6: case 7: // printf("%02x to IDE controller @ %x\n", data, offset); - m_ata->write_cs0(offset, data, 0xff); + m_ata->cs0_w(offset, data, 0xff); break; case 8: @@ -252,7 +252,7 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data) // printf("%02x to IDE data hi\n", data); m_lastdata &= 0x00ff; m_lastdata |= (data << 8); - m_ata->write_cs0(0, m_lastdata, 0xffff); + m_ata->cs0_w(0, m_lastdata, 0xffff); break; default: @@ -275,14 +275,14 @@ void a2bus_focusdrive_device::write_c0nx(uint8_t offset, uint8_t data) case 0xf: // due to a bug in the 6502 firmware, eat data if DRQ is set #if 0 - while (m_ata->read_cs0(7, 0xff) & 0x08) + while (m_ata->cs0_r(7, 0xff) & 0x08) { - m_ata->read_cs0(0, 0xffff); + m_ata->cs0_r(0, 0xffff); printf("eating 2 bytes to clear DRQ\n"); } #endif // printf("%02x to IDE controller @ %x\n", data, offset); - m_ata->write_cs0(offset & 7, data, 0xff); + m_ata->cs0_w(offset & 7, data, 0xff); break; case 0: @@ -294,7 +294,7 @@ void a2bus_focusdrive_device::write_c0nx(uint8_t offset, uint8_t data) // printf("%02x to IDE data hi\n", data); m_lastdata &= 0x00ff; m_lastdata |= (data << 8); - m_ata->write_cs0(0, m_lastdata, 0xffff); + m_ata->cs0_w(0, m_lastdata, 0xffff); break; default: diff --git a/src/devices/bus/adam/ide.cpp b/src/devices/bus/adam/ide.cpp index 98078003f4b..114e9eeb2e6 100644 --- a/src/devices/bus/adam/ide.cpp +++ b/src/devices/bus/adam/ide.cpp @@ -116,7 +116,7 @@ uint8_t powermate_ide_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, case 0x05: case 0x06: case 0x07: - data = m_ata->read_cs0(offset & 0x07, 0xff); + data = m_ata->cs0_r(offset & 0x07, 0xff); break; case 0x40: // Printer status @@ -137,7 +137,7 @@ uint8_t powermate_ide_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, break; case 0x58: - m_ata_data = m_ata->read_cs0(0); + m_ata_data = m_ata->cs0_r(0); data = m_ata_data & 0xff; break; @@ -147,7 +147,7 @@ uint8_t powermate_ide_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, break; case 0x5a: - data = m_ata->read_cs1(6, 0xff); + data = m_ata->cs1_r(6, 0xff); break; case 0x5b: // Digital Input Register @@ -176,7 +176,7 @@ void powermate_ide_device::adam_bd_w(offs_t offset, uint8_t data, int bmreq, int case 0x05: case 0x06: case 0x07: - m_ata->write_cs0(offset & 0x07, data, 0xff); + m_ata->cs0_w(offset & 0x07, data, 0xff); break; case 0x40: @@ -188,7 +188,7 @@ void powermate_ide_device::adam_bd_w(offs_t offset, uint8_t data, int bmreq, int case 0x58: m_ata_data |= data; - m_ata->write_cs0(0, m_ata_data); + m_ata->cs0_w(0, m_ata_data); break; case 0x59: diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp index 3cc14d9d1d0..57a251eb67c 100644 --- a/src/devices/bus/amiga/zorro/buddha.cpp +++ b/src/devices/bus/amiga/zorro/buddha.cpp @@ -248,7 +248,7 @@ WRITE16_MEMBER( buddha_device::ide_interrupt_enable_w ) READ16_MEMBER( buddha_device::ide_0_cs0_r ) { - uint16_t data = m_ata_0->read_cs0((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); + uint16_t data = m_ata_0->cs0_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); LOG("ide_0_cs0_r(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -263,12 +263,12 @@ WRITE16_MEMBER( buddha_device::ide_0_cs0_w ) mem_mask = (mem_mask << 8) | (mem_mask >> 8); data = (data << 8) | (data >> 8); - m_ata_0->write_cs0((offset >> 1) & 0x07, data, mem_mask); + m_ata_0->cs0_w((offset >> 1) & 0x07, data, mem_mask); } READ16_MEMBER( buddha_device::ide_0_cs1_r ) { - uint16_t data = m_ata_0->read_cs1((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); + uint16_t data = m_ata_0->cs1_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); LOG("ide_0_cs1_r(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -283,12 +283,12 @@ WRITE16_MEMBER( buddha_device::ide_0_cs1_w ) mem_mask = (mem_mask << 8) | (mem_mask >> 8); data = (data << 8) | (data >> 8); - m_ata_0->write_cs1((offset >> 1) & 0x07, data, mem_mask); + m_ata_0->cs1_w((offset >> 1) & 0x07, data, mem_mask); } READ16_MEMBER( buddha_device::ide_1_cs0_r ) { - uint16_t data = m_ata_1->read_cs0((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); + uint16_t data = m_ata_1->cs0_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); LOG("ide_1_cs0_r(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -303,12 +303,12 @@ WRITE16_MEMBER( buddha_device::ide_1_cs0_w ) mem_mask = (mem_mask << 8) | (mem_mask >> 8); data = (data << 8) | (data >> 8); - m_ata_1->write_cs0((offset >> 1) & 0x07, data, mem_mask); + m_ata_1->cs0_w((offset >> 1) & 0x07, data, mem_mask); } READ16_MEMBER( buddha_device::ide_1_cs1_r ) { - uint16_t data = m_ata_1->read_cs1((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); + uint16_t data = m_ata_1->cs1_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); LOG("ide_1_cs1_r(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -323,7 +323,7 @@ WRITE16_MEMBER( buddha_device::ide_1_cs1_w ) mem_mask = (mem_mask << 8) | (mem_mask >> 8); data = (data << 8) | (data >> 8); - m_ata_1->write_cs1((offset >> 1) & 0x07, data, mem_mask); + m_ata_1->cs1_w((offset >> 1) & 0x07, data, mem_mask); } } } } // namespace bus::amiga::zorro diff --git a/src/devices/bus/ata/ataintf.h b/src/devices/bus/ata/ataintf.h index ce2e501886a..423a8165d35 100644 --- a/src/devices/bus/ata/ataintf.h +++ b/src/devices/bus/ata/ataintf.h @@ -133,15 +133,10 @@ public: return *this; } - uint16_t read_cs0(offs_t offset, uint16_t mem_mask = 0xffff) { return internal_read_cs0(offset, mem_mask); } - uint16_t read_cs1(offs_t offset, uint16_t mem_mask = 0xffff) { return internal_read_cs1(offset, mem_mask); } - void write_cs0(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff) { internal_write_cs0(offset, data, mem_mask); } - void write_cs1(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff) { internal_write_cs1(offset, data, mem_mask); } - - DECLARE_READ16_MEMBER(cs0_r) { return read_cs0(offset, mem_mask); } - DECLARE_READ16_MEMBER(cs1_r) { return read_cs1(offset, mem_mask); } - DECLARE_WRITE16_MEMBER(cs0_w) { write_cs0(offset, data, mem_mask); } - DECLARE_WRITE16_MEMBER(cs1_w) { write_cs1(offset, data, mem_mask); } + uint16_t cs0_r(offs_t offset, uint16_t mem_mask = 0xffff) { return internal_read_cs0(offset, mem_mask); } + uint16_t cs1_r(offs_t offset, uint16_t mem_mask = 0xffff) { return internal_read_cs1(offset, mem_mask); } + void cs0_w(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff) { internal_write_cs0(offset, data, mem_mask); } + void cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff) { internal_write_cs1(offset, data, mem_mask); } }; DECLARE_DEVICE_TYPE(ATA_INTERFACE, ata_interface_device) diff --git a/src/devices/bus/bbc/1mhzbus/datacentre.cpp b/src/devices/bus/bbc/1mhzbus/datacentre.cpp index 71ea5c50767..05ba11a3bab 100644 --- a/src/devices/bus/bbc/1mhzbus/datacentre.cpp +++ b/src/devices/bus/bbc/1mhzbus/datacentre.cpp @@ -149,18 +149,18 @@ uint8_t bbc_datacentre_device::fred_r(offs_t offset) case 0x40: if (offset & 0x07) { - data = m_ide->read_cs0(offset & 0x07, 0xff); + data = m_ide->cs0_r(offset & 0x07, 0xff); } else { - m_ide_data = m_ide->read_cs0(offset & 0x07); + m_ide_data = m_ide->cs0_r(offset & 0x07); data = m_ide_data & 0xff; } break; case 0x48: if (offset & 0x04) { - data = m_ide->read_cs1(offset & 0x07, 0xff); + data = m_ide->cs1_r(offset & 0x07, 0xff); } else { @@ -206,18 +206,18 @@ void bbc_datacentre_device::fred_w(offs_t offset, uint8_t data) case 0x40: if (offset & 0x07) { - m_ide->write_cs0(offset & 0x07, data, 0xff); + m_ide->cs0_w(offset & 0x07, data, 0xff); } else { m_ide_data = (m_ide_data & 0xff00) | data; - m_ide->write_cs0(offset & 0x07, m_ide_data); + m_ide->cs0_w(offset & 0x07, m_ide_data); } break; case 0x48: if (offset & 0x04) { - m_ide->write_cs1(offset & 0x07, data, 0xff); + m_ide->cs1_w(offset & 0x07, data, 0xff); } else { diff --git a/src/devices/bus/bbc/1mhzbus/ide.cpp b/src/devices/bus/bbc/1mhzbus/ide.cpp index 0fa7d3ad069..d5fdafb000d 100644 --- a/src/devices/bus/bbc/1mhzbus/ide.cpp +++ b/src/devices/bus/bbc/1mhzbus/ide.cpp @@ -117,7 +117,7 @@ uint8_t bbc_ide8_device::fred_r(offs_t offset) switch (offset & 0xf8) { case 0x40: - data = m_ide->read_cs0(offset & 0x07, 0xff); + data = m_ide->cs0_r(offset & 0x07, 0xff); break; } @@ -129,7 +129,7 @@ void bbc_ide8_device::fred_w(offs_t offset, uint8_t data) switch (offset & 0xf8) { case 0x40: - m_ide->write_cs0(offset & 0x07, data, 0xff); + m_ide->cs0_w(offset & 0x07, data, 0xff); break; } } @@ -146,18 +146,18 @@ uint8_t bbc_beebide_device::fred_r(offs_t offset) case 0x40: if (offset & 0x07) { - data = m_ide->read_cs0(offset & 0x07, 0xff); + data = m_ide->cs0_r(offset & 0x07, 0xff); } else { - m_ide_data = m_ide->read_cs0(offset & 0x07); + m_ide_data = m_ide->cs0_r(offset & 0x07); data = m_ide_data & 0xff; } break; case 0x48: if (offset & 0x04) { - data = m_ide->read_cs1(offset & 0x07, 0xff); + data = m_ide->cs1_r(offset & 0x07, 0xff); } else { @@ -181,18 +181,18 @@ void bbc_beebide_device::fred_w(offs_t offset, uint8_t data) case 0x40: if (offset & 0x07) { - m_ide->write_cs0(offset & 0x07, data, 0xff); + m_ide->cs0_w(offset & 0x07, data, 0xff); } else { m_ide_data = (m_ide_data & 0xff00) | data; - m_ide->write_cs0(offset & 0x07, m_ide_data); + m_ide->cs0_w(offset & 0x07, m_ide_data); } break; case 0x48: if (offset & 0x04) { - m_ide->write_cs1(offset & 0x07, data, 0xff); + m_ide->cs1_w(offset & 0x07, data, 0xff); } else { diff --git a/src/devices/bus/c64/ide64.cpp b/src/devices/bus/c64/ide64.cpp index 1942ce466b5..73e14ea6b99 100644 --- a/src/devices/bus/c64/ide64.cpp +++ b/src/devices/bus/c64/ide64.cpp @@ -173,13 +173,13 @@ uint8_t c64_ide64_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sp if (io1_offset >= 0x20 && io1_offset < 0x28) { - m_ata_data = m_ata->read_cs0(offset & 0x07); + m_ata_data = m_ata->cs0_r(offset & 0x07); data = m_ata_data & 0xff; } else if (io1_offset >= 0x28 && io1_offset < 0x30) { - m_ata_data = m_ata->read_cs1(offset & 0x07); + m_ata_data = m_ata->cs1_r(offset & 0x07); data = m_ata_data & 0xff; } @@ -276,13 +276,13 @@ void c64_ide64_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int sphi2 { m_ata_data = (m_ata_data & 0xff00) | data; - m_ata->write_cs0(offset & 0x07, m_ata_data); + m_ata->cs0_w(offset & 0x07, m_ata_data); } else if (io1_offset >= 0x28 && io1_offset < 0x30) { m_ata_data = (m_ata_data & 0xff00) | data; - m_ata->write_cs1(offset & 0x07, m_ata_data); + m_ata->cs1_w(offset & 0x07, m_ata_data); } else if (io1_offset == 0x31) { diff --git a/src/devices/bus/cpc/symbfac2.cpp b/src/devices/bus/cpc/symbfac2.cpp index 8710717de6c..13edcad0aa6 100644 --- a/src/devices/bus/cpc/symbfac2.cpp +++ b/src/devices/bus/cpc/symbfac2.cpp @@ -133,27 +133,27 @@ READ8_MEMBER(cpc_symbiface2_device::ide_cs0_r) else { m_iohigh = true; - m_ide_data = m_ide->read_cs0(offset); + m_ide_data = m_ide->cs0_r(offset); return m_ide_data & 0xff; } } else - return m_ide->read_cs0(offset); + return m_ide->cs0_r(offset); } WRITE8_MEMBER(cpc_symbiface2_device::ide_cs0_w) { - m_ide->write_cs0(offset, data); + m_ide->cs0_w(offset, data); } READ8_MEMBER(cpc_symbiface2_device::ide_cs1_r) { - return m_ide->read_cs1(offset); + return m_ide->cs1_r(offset); } WRITE8_MEMBER(cpc_symbiface2_device::ide_cs1_w) { - m_ide->write_cs1(offset, data); + m_ide->cs1_w(offset, data); } // RTC (Dallas DS1287A) diff --git a/src/devices/bus/isa/side116.cpp b/src/devices/bus/isa/side116.cpp index e11b8588d60..d7c046e77de 100644 --- a/src/devices/bus/isa/side116.cpp +++ b/src/devices/bus/isa/side116.cpp @@ -135,13 +135,13 @@ READ8_MEMBER( side116_device::read ) if (offset == 0) { - uint16_t ide_data = m_ata->read_cs0(0); + uint16_t ide_data = m_ata->cs0_r(0); data = ide_data & 0xff; m_latch = ide_data >> 8; } else if (offset < 8) { - data = m_ata->read_cs0(offset & 7, 0xff); + data = m_ata->cs0_r(offset & 7, 0xff); } else if (offset == 8) { @@ -149,7 +149,7 @@ READ8_MEMBER( side116_device::read ) } else { - data = m_ata->read_cs1(offset & 7, 0xff); + data = m_ata->cs1_r(offset & 7, 0xff); } return data; @@ -160,11 +160,11 @@ WRITE8_MEMBER( side116_device::write ) if (offset == 0) { uint16_t ide_data = (m_latch << 8) | data; - m_ata->write_cs0(0, ide_data); + m_ata->cs0_w(0, ide_data); } else if (offset < 8) { - m_ata->write_cs0(offset & 7, data, 0xff); + m_ata->cs0_w(offset & 7, data, 0xff); } else if (offset == 8) { @@ -172,7 +172,7 @@ WRITE8_MEMBER( side116_device::write ) } else { - m_ata->write_cs1(offset & 7, data, 0xff); + m_ata->cs1_w(offset & 7, data, 0xff); } } diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp index 2a7898fc903..61e67104299 100644 --- a/src/devices/bus/isa/xtide.cpp +++ b/src/devices/bus/isa/xtide.cpp @@ -63,13 +63,13 @@ READ8_MEMBER( xtide_device::read ) if (offset == 0) { - uint16_t data16 = m_ata->read_cs0(offset & 7); + uint16_t data16 = m_ata->cs0_r(offset & 7); result = data16 & 0xff; m_d8_d15_latch = data16 >> 8; } else if (offset < 8) { - result = m_ata->read_cs0(offset & 7, 0xff); + result = m_ata->cs0_r(offset & 7, 0xff); } else if (offset == 8) { @@ -77,7 +77,7 @@ READ8_MEMBER( xtide_device::read ) } else { - result = m_ata->read_cs1(offset & 7, 0xff); + result = m_ata->cs1_r(offset & 7, 0xff); } // logerror("%s xtide_device::read: offset=%d, result=%2X\n",device->machine().describe_context(),offset,result); @@ -93,11 +93,11 @@ WRITE8_MEMBER( xtide_device::write ) { // Data register transfer low byte and latched high uint16_t data16 = (m_d8_d15_latch << 8) | data; - m_ata->write_cs0(offset & 7, data16); + m_ata->cs0_w(offset & 7, data16); } else if (offset < 8) { - m_ata->write_cs0(offset & 7, data, 0xff); + m_ata->cs0_w(offset & 7, data, 0xff); } else if (offset == 8) { @@ -105,7 +105,7 @@ WRITE8_MEMBER( xtide_device::write ) } else { - m_ata->write_cs1(offset & 7, data, 0xff); + m_ata->cs1_w(offset & 7, data, 0xff); } } diff --git a/src/devices/bus/kc/d004.cpp b/src/devices/bus/kc/d004.cpp index f07b6de1695..8f162bc3006 100644 --- a/src/devices/bus/kc/d004.cpp +++ b/src/devices/bus/kc/d004.cpp @@ -440,11 +440,11 @@ READ8_MEMBER(kc_d004_gide_device::gide_r) { if (ide_cs == 0 ) { - m_ata_data = m_ata->read_cs0(io_addr & 0x07); + m_ata_data = m_ata->cs0_r(io_addr & 0x07); } else { - m_ata_data = m_ata->read_cs1(io_addr & 0x07); + m_ata_data = m_ata->cs1_r(io_addr & 0x07); } } @@ -489,11 +489,11 @@ WRITE8_MEMBER(kc_d004_gide_device::gide_w) { if (ide_cs == 0) { - m_ata->write_cs0(io_addr & 0x07, m_ata_data); + m_ata->cs0_w(io_addr & 0x07, m_ata_data); } else { - m_ata->write_cs1(io_addr & 0x07, m_ata_data); + m_ata->cs1_w(io_addr & 0x07, m_ata_data); } } } diff --git a/src/devices/bus/ql/qubide.cpp b/src/devices/bus/ql/qubide.cpp index 10583d28023..7ed66ef8886 100644 --- a/src/devices/bus/ql/qubide.cpp +++ b/src/devices/bus/ql/qubide.cpp @@ -211,15 +211,15 @@ uint8_t qubide_device::read(offs_t offset, uint8_t data) switch (offset & 0x0f) { case 0: - data = m_ata->read_cs1(0x07, 0xff); + data = m_ata->cs1_r(0x07, 0xff); break; default: - data = m_ata->read_cs0(offset & 0x07, 0xff); + data = m_ata->cs0_r(offset & 0x07, 0xff); break; case 0x08: case 0x0a: case 0x0c: - m_ata_data = m_ata->read_cs0(0); + m_ata_data = m_ata->cs0_r(0); data = m_ata_data >> 8; break; @@ -229,7 +229,7 @@ uint8_t qubide_device::read(offs_t offset, uint8_t data) break; case 0x0e: case 0x0f: - data = m_ata->read_cs1(0x05, 0xff); + data = m_ata->cs1_r(0x05, 0xff); break; } } @@ -256,7 +256,7 @@ void qubide_device::write(offs_t offset, uint8_t data) switch (offset & 0x0f) { case 0: case 0x0e: case 0x0f: - m_ata->write_cs1(0x05, data, 0xff); + m_ata->cs1_w(0x05, data, 0xff); break; case 0x08: case 0x0a: case 0x0c: @@ -266,11 +266,11 @@ void qubide_device::write(offs_t offset, uint8_t data) case 0x09: case 0x0b: case 0x0d: m_ata_data = (m_ata_data & 0xff00) | data; - m_ata->write_cs0(0, m_ata_data); + m_ata->cs0_w(0, m_ata_data); break; default: - m_ata->write_cs0(offset & 0x07, data, 0xff); + m_ata->cs0_w(offset & 0x07, data, 0xff); break; } } diff --git a/src/devices/bus/ti99/peb/tn_ide.cpp b/src/devices/bus/ti99/peb/tn_ide.cpp index d729dd3a398..3482e38d57e 100644 --- a/src/devices/bus/ti99/peb/tn_ide.cpp +++ b/src/devices/bus/ti99/peb/tn_ide.cpp @@ -252,9 +252,9 @@ READ8Z_MEMBER(nouspikel_ide_card_device::readz) if (first && ((offset & 0x0010)==0)) { if (cs1fx) - atavalue = m_ata->read_cs0(reg); + atavalue = m_ata->cs0_r(reg); else - atavalue = m_ata->read_cs1(reg); + atavalue = m_ata->cs1_r(reg); LOGMASKED(LOG_ATA, "%s %02x -> %04x\n", cs1fx? "cs1" : "cs3", reg, atavalue); } @@ -420,9 +420,9 @@ void nouspikel_ide_card_device::write(offs_t offset, uint8_t data) LOGMASKED(LOG_ATA, "%s %02x <- %04x\n", cs1fx? "cs1" : "cs3", reg, atavalue); if (cs1fx) - m_ata->write_cs0(reg, atavalue); + m_ata->cs0_w(reg, atavalue); else - m_ata->write_cs1(reg, atavalue); + m_ata->cs1_w(reg, atavalue); } } } diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp index f63b98a889c..ab9945c8d88 100644 --- a/src/mame/drivers/amiga.cpp +++ b/src/mame/drivers/amiga.cpp @@ -347,13 +347,11 @@ public: DECLARE_READ16_MEMBER( clock_r ); DECLARE_WRITE16_MEMBER( clock_w ); - DECLARE_READ8_MEMBER( dmac_scsi_data_read ); - DECLARE_WRITE8_MEMBER( dmac_scsi_data_write ); - DECLARE_READ8_MEMBER( dmac_io_read ); - DECLARE_WRITE8_MEMBER( dmac_io_write ); + uint8_t dmac_scsi_data_read(offs_t offset); + void dmac_scsi_data_write(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER( dmac_int_w ); - DECLARE_WRITE8_MEMBER( tpi_port_b_write ); + void tpi_port_b_write(uint8_t data); DECLARE_WRITE_LINE_MEMBER( tpi_int_w ); void cdtv(machine_config &config); @@ -545,7 +543,7 @@ public: { } DECLARE_WRITE_LINE_MEMBER( akiko_int_w ); - DECLARE_WRITE8_MEMBER( akiko_cia_0_port_a_write ); + void akiko_cia_0_port_a_write(uint8_t data); void handle_joystick_cia(u8 pra, u8 dra); u16 handle_joystick_potgor(u16 potgor); @@ -613,7 +611,7 @@ WRITE16_MEMBER( a500p_state::clock_w ) // CD-ROM CONTROLLER //************************************************************************** -READ8_MEMBER( cdtv_state::dmac_scsi_data_read ) +uint8_t cdtv_state::dmac_scsi_data_read(offs_t offset) { if (offset >= 0xb0 && offset <= 0xbf) return m_tpi->read(offset); @@ -621,29 +619,19 @@ READ8_MEMBER( cdtv_state::dmac_scsi_data_read ) return 0xff; } -WRITE8_MEMBER( cdtv_state::dmac_scsi_data_write ) +void cdtv_state::dmac_scsi_data_write(offs_t offset, uint8_t data) { if (offset >= 0xb0 && offset <= 0xbf) m_tpi->write(offset, data); } -READ8_MEMBER( cdtv_state::dmac_io_read ) -{ - return m_cdrom->read(); -} - -WRITE8_MEMBER( cdtv_state::dmac_io_write ) -{ - m_cdrom->write(data); -} - WRITE_LINE_MEMBER( cdtv_state::dmac_int_w ) { m_dmac_irq = state; update_int2(); } -WRITE8_MEMBER( cdtv_state::tpi_port_b_write ) +void cdtv_state::tpi_port_b_write(uint8_t data) { m_cdrom->cmd_w(BIT(data, 0)); m_cdrom->enable_w(BIT(data, 1)); @@ -987,9 +975,9 @@ READ16_MEMBER( a4000_state::ide_r ) // this very likely doesn't respond to all the addresses, figure out which ones if (BIT(offset, 12)) - data = m_ata->read_cs1((offset >> 1) & 0x07, mem_mask); + data = m_ata->cs1_r((offset >> 1) & 0x07, mem_mask); else - data = m_ata->read_cs0((offset >> 1) & 0x07, mem_mask); + data = m_ata->cs0_r((offset >> 1) & 0x07, mem_mask); // swap data = (data << 8) | (data >> 8); @@ -1009,9 +997,9 @@ WRITE16_MEMBER( a4000_state::ide_w ) // this very likely doesn't respond to all the addresses, figure out which ones if (BIT(offset, 12)) - m_ata->write_cs1((offset >> 1) & 0x07, data, mem_mask); + m_ata->cs1_w((offset >> 1) & 0x07, data, mem_mask); else - m_ata->write_cs0((offset >> 1) & 0x07, data, mem_mask); + m_ata->cs0_w((offset >> 1) & 0x07, data, mem_mask); } WRITE_LINE_MEMBER( a4000_state::ide_interrupt_w ) @@ -1152,7 +1140,7 @@ READ_LINE_MEMBER( cd32_state::cd32_sel_mirror_input ) return (bits & 0x20)>>5; } -WRITE8_MEMBER( cd32_state::akiko_cia_0_port_a_write ) +void cd32_state::akiko_cia_0_port_a_write(uint8_t data) { // bit 0, cd audio mute m_cdda->set_output_gain(0, BIT(data, 0) ? 0.0 : 1.0); @@ -1823,8 +1811,8 @@ void cdtv_state::cdtv(machine_config &config) AMIGA_DMAC(config, m_dmac, amiga_state::CLK_7M_PAL); m_dmac->scsi_read_handler().set(FUNC(cdtv_state::dmac_scsi_data_read)); m_dmac->scsi_write_handler().set(FUNC(cdtv_state::dmac_scsi_data_write)); - m_dmac->io_read_handler().set(FUNC(cdtv_state::dmac_io_read)); - m_dmac->io_write_handler().set(FUNC(cdtv_state::dmac_io_write)); + m_dmac->io_read_handler().set(m_cdrom, FUNC(cr511b_device::read)); + m_dmac->io_write_handler().set(m_cdrom, FUNC(cr511b_device::write)); m_dmac->int_handler().set(FUNC(cdtv_state::dmac_int_w)); TPI6525(config, m_tpi, 0); diff --git a/src/mame/drivers/apf.cpp b/src/mame/drivers/apf.cpp index 7e76e51b7c3..2799abb6ec2 100644 --- a/src/mame/drivers/apf.cpp +++ b/src/mame/drivers/apf.cpp @@ -114,16 +114,16 @@ public: void apfimag(machine_config &config); private: - DECLARE_READ8_MEMBER(videoram_r); - DECLARE_READ8_MEMBER(pia0_porta_r); - DECLARE_WRITE8_MEMBER(pia0_portb_w); + uint8_t videoram_r(offs_t offset); + uint8_t pia0_porta_r(); + void pia0_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia0_ca2_w); - DECLARE_READ8_MEMBER(pia1_porta_r); - DECLARE_READ8_MEMBER(pia1_portb_r); - DECLARE_WRITE8_MEMBER(pia1_portb_w); - DECLARE_WRITE8_MEMBER(apf_dischw_w); - DECLARE_READ8_MEMBER(serial_r); - DECLARE_WRITE8_MEMBER(serial_w); + uint8_t pia1_porta_r(); + uint8_t pia1_portb_r(); + void pia1_portb_w(uint8_t data); + void apf_dischw_w(offs_t offset, uint8_t data); + uint8_t serial_r(offs_t offset); + void serial_w(offs_t offset, uint8_t data); void apfimag_map(address_map &map); void apfm1000_map(address_map &map); @@ -153,7 +153,7 @@ private: }; -READ8_MEMBER( apf_state::videoram_r ) +uint8_t apf_state::videoram_r(offs_t offset) { if (BIT(m_pad_data, 7)) // AG line { @@ -184,7 +184,7 @@ READ8_MEMBER( apf_state::videoram_r ) } } -READ8_MEMBER( apf_state::pia0_porta_r ) +uint8_t apf_state::pia0_porta_r() { uint8_t data = 0xff; @@ -195,7 +195,7 @@ READ8_MEMBER( apf_state::pia0_porta_r ) return data; } -WRITE8_MEMBER( apf_state::pia0_portb_w ) +void apf_state::pia0_portb_w(uint8_t data) { /* bit 7..6 video control */ m_crtc->ag_w(BIT(data, 7)); @@ -210,12 +210,12 @@ WRITE_LINE_MEMBER( apf_state::pia0_ca2_w ) m_ca2 = state; } -READ8_MEMBER( apf_state::pia1_porta_r ) +uint8_t apf_state::pia1_porta_r() { return m_key[m_keyboard_data]->read(); } -READ8_MEMBER( apf_state::pia1_portb_r ) +uint8_t apf_state::pia1_portb_r() { uint8_t data = m_portb; @@ -226,7 +226,7 @@ READ8_MEMBER( apf_state::pia1_portb_r ) } -WRITE8_MEMBER( apf_state::pia1_portb_w ) +void apf_state::pia1_portb_w(uint8_t data) { /* bits 2..0 = keyboard line */ /* bit 3 = cass audio enable */ @@ -284,7 +284,7 @@ void apf_state::machine_reset() } } -WRITE8_MEMBER( apf_state::apf_dischw_w) +void apf_state::apf_dischw_w(offs_t offset, uint8_t data) { /* bit 3 is index of drive to select */ uint8_t drive = BIT(data, 3); @@ -305,13 +305,13 @@ WRITE8_MEMBER( apf_state::apf_dischw_w) logerror("disc w %04x %04x\n",offset,data); } -READ8_MEMBER( apf_state::serial_r) +uint8_t apf_state::serial_r(offs_t offset) { logerror("serial r %04x\n",offset); return 0; } -WRITE8_MEMBER( apf_state::serial_w) +void apf_state::serial_w(offs_t offset, uint8_t data) { logerror("serial w %04x %04x\n",offset,data); } diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp index c6ecc243e96..5cf5e9c3e95 100644 --- a/src/mame/drivers/apple1.cpp +++ b/src/mame/drivers/apple1.cpp @@ -136,10 +136,10 @@ private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(ram_r); - DECLARE_WRITE8_MEMBER(ram_w); - DECLARE_READ8_MEMBER(pia_keyboard_r); - DECLARE_WRITE8_MEMBER(pia_display_w); + uint8_t ram_r(offs_t offset); + void ram_w(offs_t offset, uint8_t data); + uint8_t pia_keyboard_r(); + void pia_display_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_display_gate_w); DECLARE_SNAPSHOT_LOAD_MEMBER(snapshot_cb); TIMER_CALLBACK_MEMBER(ready_start_cb); @@ -414,7 +414,7 @@ void apple1_state::machine_reset() m_lastports[0] = m_lastports[1] = m_lastports[2] = m_lastports[3] = 0; } -READ8_MEMBER(apple1_state::ram_r) +uint8_t apple1_state::ram_r(offs_t offset) { if (offset < m_ram_size) { @@ -424,7 +424,7 @@ READ8_MEMBER(apple1_state::ram_r) return 0xff; } -WRITE8_MEMBER(apple1_state::ram_w) +void apple1_state::ram_w(offs_t offset, uint8_t data) { if (offset < m_ram_size) { @@ -440,12 +440,12 @@ void apple1_state::apple1_map(address_map &map) map(0xff00, 0xffff).rom().region(A1_CPU_TAG, 0); } -READ8_MEMBER(apple1_state::pia_keyboard_r) +uint8_t apple1_state::pia_keyboard_r() { return m_transchar | 0x80; // bit 7 is wired high, similar-ish to the Apple II } -WRITE8_MEMBER(apple1_state::pia_display_w) +void apple1_state::pia_display_w(uint8_t data) { data &= 0x7f; // D7 is ignored by the video h/w diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp index c003c713e70..97ec6f7d1b5 100644 --- a/src/mame/drivers/apple2e.cpp +++ b/src/mame/drivers/apple2e.cpp @@ -369,7 +369,7 @@ public: DECLARE_WRITE_LINE_MEMBER(ay3600_ako_w); DECLARE_READ8_MEMBER(memexp_r); DECLARE_WRITE8_MEMBER(memexp_w); - DECLARE_READ8_MEMBER(nsc_backing_r); + uint8_t nsc_backing_r(offs_t offset); void apple2cp(machine_config &config); void laser128ex2(machine_config &config); @@ -2380,7 +2380,7 @@ uint8_t apple2e_state::read_int_rom(int slotbias, int offset) return m_ds1315->read(slotbias + offset); } -READ8_MEMBER(apple2e_state::nsc_backing_r) { return m_rom_ptr[offset]; } +uint8_t apple2e_state::nsc_backing_r(offs_t offset) { return m_rom_ptr[offset]; } READ8_MEMBER(apple2e_state::c100_r) { return read_slot_rom(1, offset); } READ8_MEMBER(apple2e_state::c100_int_r) { return read_int_rom(0x100, offset); } diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp index 96f3550b3ef..9e8ae313691 100644 --- a/src/mame/drivers/apple2gs.cpp +++ b/src/mame/drivers/apple2gs.cpp @@ -485,7 +485,7 @@ private: DECLARE_WRITE_LINE_MEMBER(a2bus_inh_w); DECLARE_WRITE_LINE_MEMBER(doc_irq_w); DECLARE_WRITE_LINE_MEMBER(scc_irq_w); - DECLARE_READ8_MEMBER(doc_adc_read); + uint8_t doc_adc_read(); DECLARE_READ8_MEMBER(apple2gs_read_vector); #if !RUN_ADB_MICRO @@ -502,17 +502,17 @@ private: void keyglu_816_write(uint8_t offset, uint8_t data); void keyglu_regen_irqs(); - DECLARE_READ8_MEMBER(adbmicro_p0_in); - DECLARE_READ8_MEMBER(adbmicro_p1_in); - DECLARE_READ8_MEMBER(adbmicro_p2_in); - DECLARE_READ8_MEMBER(adbmicro_p3_in); - DECLARE_WRITE8_MEMBER(adbmicro_p0_out); - DECLARE_WRITE8_MEMBER(adbmicro_p1_out); - DECLARE_WRITE8_MEMBER(adbmicro_p2_out); - DECLARE_WRITE8_MEMBER(adbmicro_p3_out); + uint8_t adbmicro_p0_in(); + uint8_t adbmicro_p1_in(); + uint8_t adbmicro_p2_in(); + uint8_t adbmicro_p3_in(); + void adbmicro_p0_out(uint8_t data); + void adbmicro_p1_out(uint8_t data); + void adbmicro_p2_out(uint8_t data); + void adbmicro_p3_out(uint8_t data); offs_t dasm_trampoline(std::ostream &stream, offs_t pc, const util::disasm_interface::data_buffer &opcodes, const util::disasm_interface::data_buffer ¶ms); - DECLARE_WRITE8_MEMBER(wdm_trampoline) { }; //m_a2host->wdm_w(space, offset, data); } + void wdm_trampoline(offs_t offset, uint8_t data) { }; //m_a2host->wdm_w(space, offset, data); } private: bool m_is_rom3; @@ -3770,12 +3770,12 @@ void apple2gs_state::a2gs_es5503_map(address_map &map) http://www.llx.com/~nparker/a2/adb.html ***************************************************************************/ -READ8_MEMBER(apple2gs_state::adbmicro_p0_in) +uint8_t apple2gs_state::adbmicro_p0_in() { return m_glu_bus; } -READ8_MEMBER(apple2gs_state::adbmicro_p1_in) +uint8_t apple2gs_state::adbmicro_p1_in() { #if RUN_ADB_MICRO switch (m_glu_kbd_y) @@ -3805,7 +3805,7 @@ READ8_MEMBER(apple2gs_state::adbmicro_p1_in) return 0xff; } -READ8_MEMBER(apple2gs_state::adbmicro_p2_in) +uint8_t apple2gs_state::adbmicro_p2_in() { uint8_t rv = 0; @@ -3815,7 +3815,7 @@ READ8_MEMBER(apple2gs_state::adbmicro_p2_in) return rv; } -READ8_MEMBER(apple2gs_state::adbmicro_p3_in) +uint8_t apple2gs_state::adbmicro_p3_in() { uint8_t rv = 0; #if RUN_ADB_MICRO @@ -3832,16 +3832,16 @@ READ8_MEMBER(apple2gs_state::adbmicro_p3_in) return rv; } -WRITE8_MEMBER(apple2gs_state::adbmicro_p0_out) +void apple2gs_state::adbmicro_p0_out(uint8_t data) { m_glu_bus = data; } -WRITE8_MEMBER(apple2gs_state::adbmicro_p1_out) +void apple2gs_state::adbmicro_p1_out(uint8_t data) { } -WRITE8_MEMBER(apple2gs_state::adbmicro_p2_out) +void apple2gs_state::adbmicro_p2_out(uint8_t data) { if (!(data & 0x10)) { @@ -3860,7 +3860,7 @@ WRITE8_MEMBER(apple2gs_state::adbmicro_p2_out) } } -WRITE8_MEMBER(apple2gs_state::adbmicro_p3_out) +void apple2gs_state::adbmicro_p3_out(uint8_t data) { if (((data & 0x08) == 0x08) != m_adb_line) { @@ -4094,7 +4094,7 @@ WRITE_LINE_MEMBER(apple2gs_state::doc_irq_w) } } -READ8_MEMBER(apple2gs_state::doc_adc_read) +uint8_t apple2gs_state::doc_adc_read() { return 0x80; } diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp index 41608be4f40..ab846cbb586 100644 --- a/src/mame/drivers/arsystems.cpp +++ b/src/mame/drivers/arsystems.cpp @@ -91,7 +91,7 @@ public: DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game); template DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r); DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback); - DECLARE_WRITE8_MEMBER(arcadia_cia_0_portb_w); + void arcadia_cia_0_portb_w(uint8_t data); private: inline void generic_decode(const char *tag, int bit7, int bit6, int bit5, int bit4, int bit3, int bit2, int bit1, int bit0); @@ -142,7 +142,7 @@ WRITE16_MEMBER(arcadia_amiga_state::arcadia_multibios_change_game) * *************************************/ -WRITE8_MEMBER(arcadia_amiga_state::arcadia_cia_0_portb_w) +void arcadia_amiga_state::arcadia_cia_0_portb_w(uint8_t data) { /* writing a 0 in the low bit clears one of the coins */ if ((data & 1) == 0) diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp index 3c2339d98b8..0b8c552f7f0 100644 --- a/src/mame/drivers/cobra.cpp +++ b/src/mame/drivers/cobra.cpp @@ -1911,7 +1911,7 @@ READ16_MEMBER(cobra_state::sub_ata0_r) { mem_mask = ( mem_mask << 8 ) | ( mem_mask >> 8 ); - uint32_t data = m_ata->read_cs0(offset, mem_mask); + uint32_t data = m_ata->cs0_r(offset, mem_mask); data = ( data << 8 ) | ( data >> 8 ); return data; @@ -1922,14 +1922,14 @@ WRITE16_MEMBER(cobra_state::sub_ata0_w) mem_mask = ( mem_mask << 8 ) | ( mem_mask >> 8 ); data = ( data << 8 ) | ( data >> 8 ); - m_ata->write_cs0(offset, data, mem_mask); + m_ata->cs0_w(offset, data, mem_mask); } READ16_MEMBER(cobra_state::sub_ata1_r) { mem_mask = ( mem_mask << 8 ) | ( mem_mask >> 8 ); - uint32_t data = m_ata->read_cs1(offset, mem_mask); + uint32_t data = m_ata->cs1_r(offset, mem_mask); return ( data << 8 ) | ( data >> 8 ); } @@ -1939,7 +1939,7 @@ WRITE16_MEMBER(cobra_state::sub_ata1_w) mem_mask = ( mem_mask << 8 ) | ( mem_mask >> 8 ); data = ( data << 8 ) | ( data >> 8 ); - m_ata->write_cs1(offset, data, mem_mask); + m_ata->cs1_w(offset, data, mem_mask); } READ32_MEMBER(cobra_state::sub_comram_r) diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp index a8c5713533a..9f0f723f4b1 100644 --- a/src/mame/drivers/cubo.cpp +++ b/src/mame/drivers/cubo.cpp @@ -342,7 +342,7 @@ public: template DECLARE_READ_LINE_MEMBER(cd32_sel_mirror_input); DECLARE_WRITE_LINE_MEMBER( akiko_int_w ); - DECLARE_WRITE8_MEMBER( akiko_cia_0_port_a_write ); + void akiko_cia_0_port_a_write(uint8_t data); void init_cubo(); void init_mgprem11(); @@ -406,7 +406,7 @@ WRITE_LINE_MEMBER( cubo_state::akiko_int_w ) *************************************/ -WRITE8_MEMBER( cubo_state::akiko_cia_0_port_a_write ) +void cubo_state::akiko_cia_0_port_a_write(uint8_t data) { /* bit 0 = cd audio mute */ m_cdda->set_output_gain( 0, ( data & 1 ) ? 0.0 : 1.0 ); diff --git a/src/mame/drivers/firebeat.cpp b/src/mame/drivers/firebeat.cpp index 0bc5e606678..81a2327f7c0 100644 --- a/src/mame/drivers/firebeat.cpp +++ b/src/mame/drivers/firebeat.cpp @@ -335,12 +335,12 @@ READ32_MEMBER(firebeat_state::ata_command_r ) // printf("ata_command_r: %08X, %08X\n", offset, mem_mask); if (ACCESSING_BITS_16_31) { - r = m_ata->read_cs0(offset*2, BYTESWAP16((mem_mask >> 16) & 0xffff)); + r = m_ata->cs0_r(offset*2, BYTESWAP16((mem_mask >> 16) & 0xffff)); return BYTESWAP16(r) << 16; } else { - r = m_ata->read_cs0((offset*2) + 1, BYTESWAP16((mem_mask >> 0) & 0xffff)); + r = m_ata->cs0_r((offset*2) + 1, BYTESWAP16((mem_mask >> 0) & 0xffff)); return BYTESWAP16(r) << 0; } } @@ -351,11 +351,11 @@ WRITE32_MEMBER(firebeat_state::ata_command_w ) if (ACCESSING_BITS_16_31) { - m_ata->write_cs0(offset*2, BYTESWAP16((data >> 16) & 0xffff), BYTESWAP16((mem_mask >> 16) & 0xffff)); + m_ata->cs0_w(offset*2, BYTESWAP16((data >> 16) & 0xffff), BYTESWAP16((mem_mask >> 16) & 0xffff)); } else { - m_ata->write_cs0((offset*2) + 1, BYTESWAP16((data >> 0) & 0xffff), BYTESWAP16((mem_mask >> 0) & 0xffff)); + m_ata->cs0_w((offset*2) + 1, BYTESWAP16((data >> 0) & 0xffff), BYTESWAP16((mem_mask >> 0) & 0xffff)); } } @@ -367,12 +367,12 @@ READ32_MEMBER(firebeat_state::ata_control_r ) if (ACCESSING_BITS_16_31) { - r = m_ata->read_cs1(offset*2, BYTESWAP16((mem_mask >> 16) & 0xffff)); + r = m_ata->cs1_r(offset*2, BYTESWAP16((mem_mask >> 16) & 0xffff)); return BYTESWAP16(r) << 16; } else { - r = m_ata->read_cs1((offset*2) + 1, BYTESWAP16((mem_mask >> 0) & 0xffff)); + r = m_ata->cs1_r((offset*2) + 1, BYTESWAP16((mem_mask >> 0) & 0xffff)); return BYTESWAP16(r) << 0; } } @@ -381,11 +381,11 @@ WRITE32_MEMBER(firebeat_state::ata_control_w ) { if (ACCESSING_BITS_16_31) { - m_ata->write_cs1(offset*2, BYTESWAP16(data >> 16) & 0xffff, BYTESWAP16((mem_mask >> 16) & 0xffff)); + m_ata->cs1_w(offset*2, BYTESWAP16(data >> 16) & 0xffff, BYTESWAP16((mem_mask >> 16) & 0xffff)); } else { - m_ata->write_cs1((offset*2) + 1, BYTESWAP16(data >> 0) & 0xffff, BYTESWAP16((mem_mask >> 0) & 0xffff)); + m_ata->cs1_w((offset*2) + 1, BYTESWAP16(data >> 0) & 0xffff, BYTESWAP16((mem_mask >> 0) & 0xffff)); } } diff --git a/src/mame/drivers/gscpm.cpp b/src/mame/drivers/gscpm.cpp index 73f27fad0bd..903254d5eb7 100644 --- a/src/mame/drivers/gscpm.cpp +++ b/src/mame/drivers/gscpm.cpp @@ -71,12 +71,12 @@ void gscpm_state::gscpm_io(address_map &map) READ8_MEMBER( gscpm_state::cflash_r ) { - return m_ide->read_cs0(offset, 0xff); + return m_ide->cs0_r(offset, 0xff); } WRITE8_MEMBER( gscpm_state::cflash_w ) { - m_ide->write_cs0(offset, data, 0xff); + m_ide->cs0_w(offset, data, 0xff); } READ8_MEMBER( gscpm_state::sio_r ) diff --git a/src/mame/drivers/kinst.cpp b/src/mame/drivers/kinst.cpp index d5e753d990f..b2669e49b1e 100644 --- a/src/mame/drivers/kinst.cpp +++ b/src/mame/drivers/kinst.cpp @@ -374,25 +374,25 @@ INTERRUPT_GEN_MEMBER(kinst_state::irq0_start) READ32_MEMBER(kinst_state::ide_r) { - return m_ata->read_cs0(offset / 2, mem_mask); + return m_ata->cs0_r(offset / 2, mem_mask); } WRITE32_MEMBER(kinst_state::ide_w) { - m_ata->write_cs0(offset / 2, data, mem_mask); + m_ata->cs0_w(offset / 2, data, mem_mask); } READ32_MEMBER(kinst_state::ide_extra_r) { - return m_ata->read_cs1(6, 0xff); + return m_ata->cs1_r(6, 0xff); } WRITE32_MEMBER(kinst_state::ide_extra_w) { - m_ata->write_cs1(6, data, 0xff); + m_ata->cs1_w(6, data, 0xff); } diff --git a/src/mame/drivers/konamigs.cpp b/src/mame/drivers/konamigs.cpp index a2c9d0a47a0..bce6819bca9 100644 --- a/src/mame/drivers/konamigs.cpp +++ b/src/mame/drivers/konamigs.cpp @@ -203,9 +203,9 @@ READ16_MEMBER(gsan_state::cf_regs_r) offset *= 2; u16 data = 0; if (ACCESSING_BITS_0_7) - data |= m_ata->read_cs0(offset, 0xff) & 0xff; + data |= m_ata->cs0_r(offset, 0xff) & 0xff; if (ACCESSING_BITS_8_15) - data |= (m_ata->read_cs0(offset + 1, 0xff) << 8); + data |= (m_ata->cs0_r(offset + 1, 0xff) << 8); return data; } @@ -213,20 +213,20 @@ WRITE16_MEMBER(gsan_state::cf_regs_w) { offset *= 2; if (ACCESSING_BITS_0_7) - m_ata->write_cs0(offset, data & 0xff, 0xff); + m_ata->cs0_w(offset, data & 0xff, 0xff); if (ACCESSING_BITS_8_15) - m_ata->write_cs0(offset + 1, data >> 8, 0xff); + m_ata->cs0_w(offset + 1, data >> 8, 0xff); } READ16_MEMBER(gsan_state::cf_data_r) { - u16 data = m_ata->read_cs0(0, 0xffff); + u16 data = m_ata->cs0_r(0, 0xffff); return data; } WRITE16_MEMBER(gsan_state::cf_data_w) { - m_ata->write_cs0(0, data, 0xffff); + m_ata->cs0_w(0, data, 0xffff); } // misc I/O diff --git a/src/mame/drivers/konamim2.cpp b/src/mame/drivers/konamim2.cpp index 400814a14bf..68ec4d37f16 100644 --- a/src/mame/drivers/konamim2.cpp +++ b/src/mame/drivers/konamim2.cpp @@ -326,12 +326,12 @@ public: DECLARE_READ16_MEMBER(konami_ide_r) { - return swapendian_int16(m_ata->read_cs0(offset, mem_mask)); + return swapendian_int16(m_ata->cs0_r(offset, mem_mask)); } DECLARE_WRITE16_MEMBER(konami_ide_w) { - m_ata->write_cs0(offset, swapendian_int16(data), mem_mask); + m_ata->cs0_w(offset, swapendian_int16(data), mem_mask); } private: diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp index ca0541ca636..4003ac48221 100644 --- a/src/mame/drivers/ksys573.cpp +++ b/src/mame/drivers/ksys573.cpp @@ -734,15 +734,15 @@ TIMER_CALLBACK_MEMBER( ksys573_state::atapi_xfer_end ) for( int i = 0; i < m_atapi_xfersize; i++ ) { - uint32_t d = m_ata->read_cs0(0) << 0; - d |= m_ata->read_cs0(0) << 16; + uint32_t d = m_ata->cs0_r(0) << 0; + d |= m_ata->cs0_r(0) << 16; m_p_n_psxram[ m_atapi_xferbase / 4 ] = d; m_atapi_xferbase += 4; } /// HACK: konami80s only works if you dma more data than requested - if( ( m_ata->read_cs1(6) & 8 ) != 0 ) + if( ( m_ata->cs1_r(6) & 8 ) != 0 ) { m_atapi_timer->adjust( m_maincpu->cycles_to_attotime( ( ATAPI_CYCLES_PER_SECTOR * ( m_atapi_xfersize / 64 ) ) ) ); } diff --git a/src/mame/drivers/lisa.cpp b/src/mame/drivers/lisa.cpp index f2158394ae1..42ddd6762b0 100644 --- a/src/mame/drivers/lisa.cpp +++ b/src/mame/drivers/lisa.cpp @@ -2,7 +2,7 @@ // copyright-holders:Raphael Nabet /********************************************************************* - drivers/lisa.c + drivers/lisa.cpp Experimental LISA driver diff --git a/src/mame/drivers/lwriter.cpp b/src/mame/drivers/lwriter.cpp index a6c9633545b..5169db60198 100644 --- a/src/mame/drivers/lwriter.cpp +++ b/src/mame/drivers/lwriter.cpp @@ -120,11 +120,11 @@ private: DECLARE_WRITE16_MEMBER(bankedarea_w); DECLARE_WRITE8_MEMBER(led_out_w); DECLARE_WRITE8_MEMBER(fifo_out_w); - DECLARE_READ8_MEMBER(via_pa_r); - DECLARE_WRITE8_MEMBER(via_pa_w); + uint8_t via_pa_r(); + void via_pa_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(via_ca2_w); - DECLARE_READ8_MEMBER(via_pb_r); - DECLARE_WRITE8_MEMBER(via_pb_w); + uint8_t via_pb_r(); + void via_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(via_cb1_w); DECLARE_WRITE_LINE_MEMBER(via_cb2_w); DECLARE_WRITE_LINE_MEMBER(via_int_w); @@ -296,13 +296,13 @@ WRITE8_MEMBER(lwriter_state::fifo_out_w) } /* via stuff */ -READ8_MEMBER(lwriter_state::via_pa_r) +uint8_t lwriter_state::via_pa_r() { logerror(" VIA: Port A read!\n"); return 0xFF; } -WRITE8_MEMBER(lwriter_state::via_pa_w) +void lwriter_state::via_pa_w(uint8_t data) { logerror(" VIA: Port A written with data of 0x%02x!\n", data); } @@ -312,13 +312,13 @@ WRITE_LINE_MEMBER(lwriter_state::via_ca2_w) logerror(" VIA: CA2 written with %d!\n", state); } -READ8_MEMBER(lwriter_state::via_pb_r) +uint8_t lwriter_state::via_pb_r() { logerror(" VIA: Port B read!\n"); return 0xFF; } -WRITE8_MEMBER(lwriter_state::via_pb_w) +void lwriter_state::via_pb_w(uint8_t data) { logerror(" VIA: Port B written with data of 0x%02x!\n", data); /* Like early Mac models which had VIA A4 control overlaying, the diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp index c6799f2f564..14439cf1a28 100644 --- a/src/mame/drivers/mac128.cpp +++ b/src/mame/drivers/mac128.cpp @@ -233,10 +233,10 @@ private: DECLARE_WRITE_LINE_MEMBER(mac_kbd_clk_in); DECLARE_WRITE_LINE_MEMBER(mac_via_out_cb2); - DECLARE_READ8_MEMBER(mac_via_in_a); - DECLARE_READ8_MEMBER(mac_via_in_b); - DECLARE_WRITE8_MEMBER(mac_via_out_a); - DECLARE_WRITE8_MEMBER(mac_via_out_b); + uint8_t mac_via_in_a(); + uint8_t mac_via_in_b(); + void mac_via_out_a(uint8_t data); + void mac_via_out_b(uint8_t data); void mac128_state_load(); DECLARE_WRITE_LINE_MEMBER(mac_via_irq); int scan_keyboard(); @@ -690,12 +690,12 @@ READ16_MEMBER ( mac128_state::mac_autovector_r ) return 0; } -READ8_MEMBER(mac128_state::mac_via_in_a) +uint8_t mac128_state::mac_via_in_a() { return 0x80; } -READ8_MEMBER(mac128_state::mac_via_in_b) +uint8_t mac128_state::mac_via_in_b() { int val = 0x40; @@ -713,7 +713,7 @@ READ8_MEMBER(mac128_state::mac_via_in_b) return val; } -WRITE8_MEMBER(mac128_state::mac_via_out_a) +void mac128_state::mac_via_out_a(uint8_t data) { // printf("%s VIA1 OUT A: %02x (PC %x)\n", machine().describe_context().c_str(), data); @@ -735,7 +735,7 @@ WRITE8_MEMBER(mac128_state::mac_via_out_a) } } -WRITE8_MEMBER(mac128_state::mac_via_out_b) +void mac128_state::mac_via_out_b(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); diff --git a/src/mame/drivers/macpci.cpp b/src/mame/drivers/macpci.cpp index 834d710d338..d0fe8601b9d 100644 --- a/src/mame/drivers/macpci.cpp +++ b/src/mame/drivers/macpci.cpp @@ -2,7 +2,7 @@ // copyright-holders:R. Belmont /*************************************************************************** - macpci.c: second-generation Old World PowerMacs based on PCI instead of NuBus + macpci.cpp: second-generation Old World PowerMacs based on PCI instead of NuBus Preliminary driver by R. Belmont (based on pippin.c skeleton by Angelo Salese) diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp index 8a852deec3a..56739a1dc7a 100644 --- a/src/mame/drivers/pc9801.cpp +++ b/src/mame/drivers/pc9801.cpp @@ -499,22 +499,22 @@ WRITE8_MEMBER(pc9801_state::ide_ctrl_w) READ16_MEMBER(pc9801_state::ide_cs0_r) { - return m_ide[m_ide_sel]->read_cs0(offset, mem_mask); + return m_ide[m_ide_sel]->cs0_r(offset, mem_mask); } WRITE16_MEMBER(pc9801_state::ide_cs0_w) { - m_ide[m_ide_sel]->write_cs0(offset, data, mem_mask); + m_ide[m_ide_sel]->cs0_w(offset, data, mem_mask); } READ16_MEMBER(pc9801_state::ide_cs1_r) { - return m_ide[m_ide_sel]->read_cs1(offset, mem_mask); + return m_ide[m_ide_sel]->cs1_r(offset, mem_mask); } WRITE16_MEMBER(pc9801_state::ide_cs1_w) { - m_ide[m_ide_sel]->write_cs1(offset, data, mem_mask); + m_ide[m_ide_sel]->cs1_w(offset, data, mem_mask); } READ8_MEMBER( pc9801_state::sasi_data_r ) diff --git a/src/mame/drivers/pcw.cpp b/src/mame/drivers/pcw.cpp index 04b2563e543..a2041353726 100644 --- a/src/mame/drivers/pcw.cpp +++ b/src/mame/drivers/pcw.cpp @@ -224,7 +224,7 @@ void pcw_state::pcw_map(address_map &map) /* Keyboard is read by the MCU and sent as serial data to the gate array ASIC */ -READ8_MEMBER(pcw_state::pcw_keyboard_r) +uint8_t pcw_state::pcw_keyboard_r(offs_t offset) { return m_iptlines[offset]->read(); } @@ -753,20 +753,20 @@ TIMER_CALLBACK_MEMBER(pcw_state::pcw_pins_callback) m_printer_p2 |= 0x40; } -READ8_MEMBER(pcw_state::mcu_printer_p1_r) +uint8_t pcw_state::mcu_printer_p1_r() { LOGPRN("PRN: MCU reading data from P1\n"); return m_printer_pins & 0x00ff; } -WRITE8_MEMBER(pcw_state::mcu_printer_p1_w) +void pcw_state::mcu_printer_p1_w(uint8_t data) { m_printer_pins = (m_printer_pins & 0x0100) | data; LOGPRN("PRN: Print head position = %i", m_printer_headpos); LOGPRN("PRN: MCU writing %02x to P1 [%03x/%03x]\n", data,m_printer_pins, ~m_printer_pins & 0x1ff); } -READ8_MEMBER(pcw_state::mcu_printer_p2_r) +uint8_t pcw_state::mcu_printer_p2_r() { uint8_t ret = 0x00; LOGPRN("PRN: MCU reading data from P2\n"); @@ -777,7 +777,7 @@ READ8_MEMBER(pcw_state::mcu_printer_p2_r) return ret; } -WRITE8_MEMBER(pcw_state::mcu_printer_p2_w) +void pcw_state::mcu_printer_p2_w(uint8_t data) { LOGPRN("PRN: MCU writing %02x to P2\n", data); m_printer_p2 = data & 0x70; @@ -862,22 +862,22 @@ void pcw_state::mcu_transmit_serial(uint8_t bit) } } -READ8_MEMBER(pcw_state::mcu_kb_scan_r) +uint8_t pcw_state::mcu_kb_scan_r() { return m_kb_scan_row & 0xff; } -WRITE8_MEMBER(pcw_state::mcu_kb_scan_w) +void pcw_state::mcu_kb_scan_w(uint8_t data) { m_kb_scan_row = (m_kb_scan_row & 0xff00) | data; } -READ8_MEMBER(pcw_state::mcu_kb_scan_high_r) +uint8_t pcw_state::mcu_kb_scan_high_r() { return (m_kb_scan_row & 0xff00) >> 8; } -WRITE8_MEMBER(pcw_state::mcu_kb_scan_high_w) +void pcw_state::mcu_kb_scan_high_w(uint8_t data) { if((m_mcu_prev & 0x02) && !(data & 0x02)) // bit is transmitted on high-to-low clock transition { @@ -896,7 +896,7 @@ WRITE8_MEMBER(pcw_state::mcu_kb_scan_high_w) m_mcu_prev = data; } -READ8_MEMBER(pcw_state::mcu_kb_data_r) +uint8_t pcw_state::mcu_kb_data_r() { uint16_t scan_bits = ((m_kb_scan_row & 0xf000) >> 4) | (m_kb_scan_row & 0xff); int x; @@ -904,7 +904,7 @@ READ8_MEMBER(pcw_state::mcu_kb_data_r) for(x=0;x<12;x++) { if(!(scan_bits & 1)) - return pcw_keyboard_r(space,x); + return pcw_keyboard_r(x); else scan_bits >>= 1; } diff --git a/src/mame/drivers/psattack.cpp b/src/mame/drivers/psattack.cpp index 418aba795f4..5f83896b9d2 100644 --- a/src/mame/drivers/psattack.cpp +++ b/src/mame/drivers/psattack.cpp @@ -172,17 +172,17 @@ private: // TODO: wrong, likely PIC protected too READ8_MEMBER( psattack_state::cfcard_regs_r ) { - return m_ata->read_cs0(offset & 7, 0x000000ff); + return m_ata->cs0_r(offset & 7, 0x000000ff); } WRITE8_MEMBER( psattack_state::cfcard_regs_w ) { - m_ata->write_cs0(offset & 7, 0x000000ff); + m_ata->cs0_w(offset & 7, 0x000000ff); } READ16_MEMBER( psattack_state::cfcard_data_r ) { - return m_ata->read_cs0(0, 0x0000ffff); + return m_ata->cs0_r(0, 0x0000ffff); } WRITE32_MEMBER( psattack_state::output_w ) diff --git a/src/mame/drivers/taitotz.cpp b/src/mame/drivers/taitotz.cpp index 2bc46650338..7ebb2bc1ca8 100644 --- a/src/mame/drivers/taitotz.cpp +++ b/src/mame/drivers/taitotz.cpp @@ -2187,7 +2187,7 @@ WRITE8_MEMBER(taitotz_state::tlcs_rtc_w) READ16_MEMBER(taitotz_state::tlcs_ide0_r) { - uint16_t d = m_ata->read_cs0(offset, mem_mask); + uint16_t d = m_ata->cs0_r(offset, mem_mask); if (offset == 7) d &= ~0x2; // Type Zero doesn't like the index bit. It's defined as vendor-specific, so it probably shouldn't be up... // The status check explicitly checks for 0x50 (drive ready, seek complete). @@ -2196,7 +2196,7 @@ READ16_MEMBER(taitotz_state::tlcs_ide0_r) READ16_MEMBER(taitotz_state::tlcs_ide1_r) { - uint16_t d = m_ata->read_cs1(offset, mem_mask); + uint16_t d = m_ata->cs1_r(offset, mem_mask); if (offset == 6) d &= ~0x2; // Type Zero doesn't like the index bit. It's defined as vendor-specific, so it probably shouldn't be up... // The status check explicitly checks for 0x50 (drive ready, seek complete). diff --git a/src/mame/drivers/upscope.cpp b/src/mame/drivers/upscope.cpp index ed5685ede92..ee3feb55204 100644 --- a/src/mame/drivers/upscope.cpp +++ b/src/mame/drivers/upscope.cpp @@ -55,13 +55,13 @@ private: uint8_t m_nvram_address_latch; uint8_t m_nvram_data_latch; - DECLARE_READ8_MEMBER(upscope_cia_0_portb_r); - DECLARE_WRITE8_MEMBER(upscope_cia_0_portb_w); - DECLARE_READ8_MEMBER(upscope_cia_1_porta_r); - DECLARE_WRITE8_MEMBER(upscope_cia_1_porta_w); + uint8_t upscope_cia_0_portb_r(); + void upscope_cia_0_portb_w(uint8_t data); + uint8_t upscope_cia_1_porta_r(); + void upscope_cia_1_porta_w(uint8_t data); - DECLARE_WRITE8_MEMBER(lamps_w); - DECLARE_WRITE8_MEMBER(coin_counter_w); + void lamps_w(uint8_t data); + void coin_counter_w(uint8_t data); void a500_mem(address_map &map); @@ -99,12 +99,12 @@ void upscope_state::machine_reset() } -WRITE8_MEMBER( upscope_state::upscope_cia_0_portb_w ) +void upscope_state::upscope_cia_0_portb_w(uint8_t data) { m_parallel_data = data; } -READ8_MEMBER( upscope_state::upscope_cia_0_portb_r ) +uint8_t upscope_state::upscope_cia_0_portb_r() { return m_nvram_data_latch; } @@ -126,12 +126,12 @@ READ8_MEMBER( upscope_state::upscope_cia_0_portb_r ) * *************************************/ -READ8_MEMBER( upscope_state::upscope_cia_1_porta_r ) +uint8_t upscope_state::upscope_cia_1_porta_r() { return 0xf8 | (m_prev_cia1_porta & 0x07); } -WRITE8_MEMBER( upscope_state::upscope_cia_1_porta_w ) +void upscope_state::upscope_cia_1_porta_w(uint8_t data) { /* on a low transition of POUT, we latch stuff for the NVRAM */ if ((m_prev_cia1_porta & 2) && !(data & 2)) @@ -185,7 +185,7 @@ WRITE8_MEMBER( upscope_state::upscope_cia_1_porta_w ) m_prev_cia1_porta = data; } -WRITE8_MEMBER( upscope_state::lamps_w ) +void upscope_state::lamps_w(uint8_t data) { // 7------- bubble light // -6------ sight @@ -197,7 +197,7 @@ WRITE8_MEMBER( upscope_state::lamps_w ) // -------0 enemy right } -WRITE8_MEMBER( upscope_state::coin_counter_w ) +void upscope_state::coin_counter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 1); } diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp index 63159a13d6f..d9dfc56f065 100644 --- a/src/mame/drivers/viper.cpp +++ b/src/mame/drivers/viper.cpp @@ -1422,7 +1422,7 @@ READ64_MEMBER(viper_state::cf_card_data_r) { case 0x8: // Duplicate Even RD Data { - r |= m_ata->read_cs0(0, mem_mask >> 16) << 16; + r |= m_ata->cs0_r(0, mem_mask >> 16) << 16; break; } @@ -1443,7 +1443,7 @@ WRITE64_MEMBER(viper_state::cf_card_data_w) { case 0x8: // Duplicate Even RD Data { - m_ata->write_cs0(0, data >> 16, mem_mask >> 16); + m_ata->cs0_w(0, data >> 16, mem_mask >> 16); break; } @@ -1474,7 +1474,7 @@ READ64_MEMBER(viper_state::cf_card_r) case 0x6: // Select Card/Head case 0x7: // Status { - r |= m_ata->read_cs0(offset & 7, mem_mask >> 16) << 16; + r |= m_ata->cs0_r(offset & 7, mem_mask >> 16) << 16; break; } @@ -1483,13 +1483,13 @@ READ64_MEMBER(viper_state::cf_card_r) case 0xd: // Duplicate Error { - r |= m_ata->read_cs0(1, mem_mask >> 16) << 16; + r |= m_ata->cs0_r(1, mem_mask >> 16) << 16; break; } case 0xe: // Alt Status case 0xf: // Drive Address { - r |= m_ata->read_cs1(offset & 7, mem_mask >> 16) << 16; + r |= m_ata->cs1_r(offset & 7, mem_mask >> 16) << 16; break; } @@ -1539,7 +1539,7 @@ WRITE64_MEMBER(viper_state::cf_card_w) case 0x6: // Select Card/Head case 0x7: // Command { - m_ata->write_cs0(offset & 7, data >> 16, mem_mask >> 16); + m_ata->cs0_w(offset & 7, data >> 16, mem_mask >> 16); break; } @@ -1548,13 +1548,13 @@ WRITE64_MEMBER(viper_state::cf_card_w) case 0xd: // Duplicate Features { - m_ata->write_cs0(1, data >> 16, mem_mask >> 16); + m_ata->cs0_w(1, data >> 16, mem_mask >> 16); break; } case 0xe: // Device Ctl case 0xf: // Reserved { - m_ata->write_cs1(offset & 7, data >> 16, mem_mask >> 16); + m_ata->cs1_w(offset & 7, data >> 16, mem_mask >> 16); break; } @@ -1609,10 +1609,10 @@ READ64_MEMBER(viper_state::ata_r) switch(offset & 0x80) { case 0x00: - r |= m_ata->read_cs0(reg, mem_mask >> 16) << 16; + r |= m_ata->cs0_r(reg, mem_mask >> 16) << 16; break; case 0x80: - r |= m_ata->read_cs1(reg, mem_mask >> 16) << 16; + r |= m_ata->cs1_r(reg, mem_mask >> 16) << 16; break; } } @@ -1629,10 +1629,10 @@ WRITE64_MEMBER(viper_state::ata_w) switch(offset & 0x80) { case 0x00: - m_ata->write_cs0(reg, data >> 16, mem_mask >> 16); + m_ata->cs0_w(reg, data >> 16, mem_mask >> 16); break; case 0x80: - m_ata->write_cs1(reg, data >> 16, mem_mask >> 16); + m_ata->cs1_w(reg, data >> 16, mem_mask >> 16); break; } } diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h index 488ff56c410..65dcf561ee1 100644 --- a/src/mame/includes/amiga.h +++ b/src/mame/includes/amiga.h @@ -436,10 +436,10 @@ public: DECLARE_READ16_MEMBER( cia_r ); DECLARE_WRITE16_MEMBER( cia_w ); DECLARE_WRITE16_MEMBER( gayle_cia_w ); - DECLARE_WRITE8_MEMBER( cia_0_port_a_write ); + void cia_0_port_a_write(uint8_t data); DECLARE_WRITE_LINE_MEMBER( cia_0_irq ); - DECLARE_READ8_MEMBER( cia_1_port_a_read ); - DECLARE_WRITE8_MEMBER( cia_1_port_a_write ); + uint8_t cia_1_port_a_read(); + void cia_1_port_a_write(uint8_t data); DECLARE_WRITE_LINE_MEMBER( cia_1_irq ); DECLARE_WRITE_LINE_MEMBER( rs232_rx_w ); diff --git a/src/mame/includes/amstrad.h b/src/mame/includes/amstrad.h index 4019afdbd52..e757031cf87 100644 --- a/src/mame/includes/amstrad.h +++ b/src/mame/includes/amstrad.h @@ -193,14 +193,14 @@ public: unsigned char m_Psg_FunctionSelected; int m_previous_ppi_portc_w; uint8_t m_amx_mouse_data; - DECLARE_WRITE8_MEMBER(amstrad_plus_asic_4000_w); - DECLARE_WRITE8_MEMBER(amstrad_plus_asic_6000_w); - DECLARE_READ8_MEMBER(amstrad_plus_asic_4000_r); - DECLARE_READ8_MEMBER(amstrad_plus_asic_6000_r); - DECLARE_WRITE8_MEMBER(aleste_msx_mapper); - DECLARE_READ8_MEMBER(amstrad_cpc_io_r); - DECLARE_WRITE8_MEMBER(amstrad_cpc_io_w); - DECLARE_READ8_MEMBER(amstrad_psg_porta_read); + void amstrad_plus_asic_4000_w(offs_t offset, uint8_t data); + void amstrad_plus_asic_6000_w(offs_t offset, uint8_t data); + uint8_t amstrad_plus_asic_4000_r(offs_t offset); + uint8_t amstrad_plus_asic_6000_r(offs_t offset); + void aleste_msx_mapper(offs_t offset, uint8_t data); + uint8_t amstrad_cpc_io_r(offs_t offset); + void amstrad_cpc_io_w(offs_t offset, uint8_t data); + uint8_t amstrad_psg_porta_read(); void amstrad_plus_seqcheck(int data); DECLARE_MACHINE_START(amstrad); DECLARE_MACHINE_RESET(amstrad); @@ -230,13 +230,13 @@ public: DECLARE_WRITE_LINE_MEMBER(amstrad_plus_vsync_changed); DECLARE_WRITE_LINE_MEMBER(amstrad_de_changed); DECLARE_WRITE_LINE_MEMBER(amstrad_plus_de_changed); - DECLARE_READ8_MEMBER(amstrad_ppi_porta_r); - DECLARE_WRITE8_MEMBER(amstrad_ppi_porta_w); - DECLARE_READ8_MEMBER(amstrad_ppi_portb_r); - DECLARE_WRITE8_MEMBER(amstrad_ppi_portc_w); + uint8_t amstrad_ppi_porta_r(); + void amstrad_ppi_porta_w(uint8_t data); + uint8_t amstrad_ppi_portb_r(); + void amstrad_ppi_portc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( cpc_romdis ); - DECLARE_WRITE8_MEMBER(rom_select); + void rom_select(uint8_t data); DECLARE_FLOPPY_FORMATS( aleste_floppy_formats ); diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h index d4a36adb45d..352e02b9f69 100644 --- a/src/mame/includes/apollo.h +++ b/src/mame/includes/apollo.h @@ -167,10 +167,10 @@ public: DECLARE_READ8_MEMBER(apollo_dma_page_register_r); DECLARE_WRITE16_MEMBER(apollo_address_translation_map_w); DECLARE_READ16_MEMBER(apollo_address_translation_map_r); - DECLARE_READ8_MEMBER(apollo_dma_read_byte); - DECLARE_WRITE8_MEMBER(apollo_dma_write_byte); - DECLARE_READ8_MEMBER(apollo_dma_read_word); - DECLARE_WRITE8_MEMBER(apollo_dma_write_word); + uint8_t apollo_dma_read_byte(offs_t offset); + void apollo_dma_write_byte(offs_t offset, uint8_t data); + uint8_t apollo_dma_read_word(offs_t offset); + void apollo_dma_write_word(offs_t offset, uint8_t data); DECLARE_WRITE8_MEMBER(apollo_rtc_w); DECLARE_READ8_MEMBER(apollo_rtc_r); DECLARE_WRITE8_MEMBER(cache_control_register_w); @@ -226,27 +226,27 @@ public: DECLARE_WRITE_LINE_MEMBER( apollo_pic8259_master_set_int_line ); DECLARE_WRITE_LINE_MEMBER( apollo_pic8259_slave_set_int_line ); DECLARE_WRITE_LINE_MEMBER( sio_irq_handler ); - DECLARE_WRITE8_MEMBER( sio_output ); + void sio_output(uint8_t data); DECLARE_WRITE_LINE_MEMBER( sio2_irq_handler ); DECLARE_WRITE_LINE_MEMBER( apollo_ptm_irq_function ); DECLARE_WRITE_LINE_MEMBER( apollo_ptm_timer_tick ); - DECLARE_READ8_MEMBER( apollo_pic8259_get_slave_ack ); + uint8_t apollo_pic8259_get_slave_ack(offs_t offset); DECLARE_WRITE_LINE_MEMBER( apollo_rtc_irq_function ); - DECLARE_READ8_MEMBER(pc_dma8237_0_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_1_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_2_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_3_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_5_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_6_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_7_dack_r); - DECLARE_WRITE8_MEMBER(pc_dma8237_0_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_1_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_2_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_3_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_5_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_6_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_7_dack_w); + uint8_t pc_dma8237_0_dack_r(); + uint8_t pc_dma8237_1_dack_r(); + uint8_t pc_dma8237_2_dack_r(); + uint8_t pc_dma8237_3_dack_r(); + uint8_t pc_dma8237_5_dack_r(); + uint8_t pc_dma8237_6_dack_r(); + uint8_t pc_dma8237_7_dack_r(); + void pc_dma8237_0_dack_w(uint8_t data); + void pc_dma8237_1_dack_w(uint8_t data); + void pc_dma8237_2_dack_w(uint8_t data); + void pc_dma8237_3_dack_w(uint8_t data); + void pc_dma8237_5_dack_w(uint8_t data); + void pc_dma8237_6_dack_w(uint8_t data); + void pc_dma8237_7_dack_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pc_dack0_w); DECLARE_WRITE_LINE_MEMBER(pc_dack1_w); DECLARE_WRITE_LINE_MEMBER(pc_dack2_w); diff --git a/src/mame/includes/lisa.h b/src/mame/includes/lisa.h index c48acf1ee6e..7d6a3d87842 100644 --- a/src/mame/includes/lisa.h +++ b/src/mame/includes/lisa.h @@ -230,9 +230,9 @@ private: TIMER_CALLBACK_MEMBER(handle_mouse); TIMER_CALLBACK_MEMBER(read_COPS_command); TIMER_CALLBACK_MEMBER(set_COPS_ready); - DECLARE_WRITE8_MEMBER(COPS_via_out_a); + void COPS_via_out_a(uint8_t data); DECLARE_WRITE_LINE_MEMBER(COPS_via_out_ca2); - DECLARE_WRITE8_MEMBER(COPS_via_out_b); + void COPS_via_out_b(uint8_t data); DECLARE_WRITE_LINE_MEMBER(COPS_via_out_cb2); void field_interrupts(); diff --git a/src/mame/includes/mac.h b/src/mame/includes/mac.h index f653976e98f..0e8ace44344 100644 --- a/src/mame/includes/mac.h +++ b/src/mame/includes/mac.h @@ -568,28 +568,28 @@ private: TIMER_CALLBACK_MEMBER(mac_pmu_tick); // macadb.c DECLARE_WRITE_LINE_MEMBER(mac_via_out_cb2); DECLARE_WRITE_LINE_MEMBER(mac_adb_via_out_cb2); - DECLARE_READ8_MEMBER(mac_via_in_a); - DECLARE_READ8_MEMBER(mac_via_in_b); - DECLARE_READ8_MEMBER(mac_via_in_b_ii); - DECLARE_WRITE8_MEMBER(mac_via_out_a); - DECLARE_WRITE8_MEMBER(mac_via_out_b); - DECLARE_READ8_MEMBER(mac_via_in_a_pmu); - DECLARE_READ8_MEMBER(mac_via_in_b_pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_a_pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_b_pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_b_bbadb); - DECLARE_WRITE8_MEMBER(mac_via_out_b_egadb); - DECLARE_WRITE8_MEMBER(mac_via_out_b_cdadb); - DECLARE_READ8_MEMBER(mac_via_in_b_via2pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_b_via2pmu); - DECLARE_READ8_MEMBER(mac_via2_in_a); - DECLARE_READ8_MEMBER(mac_via2_in_b); - DECLARE_WRITE8_MEMBER(mac_via2_out_a); - DECLARE_WRITE8_MEMBER(mac_via2_out_b); - DECLARE_READ8_MEMBER(mac_via2_in_a_pmu); - DECLARE_READ8_MEMBER(mac_via2_in_b_pmu); - DECLARE_WRITE8_MEMBER(mac_via2_out_a_pmu); - DECLARE_WRITE8_MEMBER(mac_via2_out_b_pmu); + uint8_t mac_via_in_a(); + uint8_t mac_via_in_b(); + uint8_t mac_via_in_b_ii(); + void mac_via_out_a(uint8_t data); + void mac_via_out_b(uint8_t data); + uint8_t mac_via_in_a_pmu(); + uint8_t mac_via_in_b_pmu(); + void mac_via_out_a_pmu(uint8_t data); + void mac_via_out_b_pmu(uint8_t data); + void mac_via_out_b_bbadb(uint8_t data); + void mac_via_out_b_egadb(uint8_t data); + void mac_via_out_b_cdadb(uint8_t data); + uint8_t mac_via_in_b_via2pmu(); + void mac_via_out_b_via2pmu(uint8_t data); + uint8_t mac_via2_in_a(); + uint8_t mac_via2_in_b(); + void mac_via2_out_a(uint8_t data); + void mac_via2_out_b(uint8_t data); + uint8_t mac_via2_in_a_pmu(); + uint8_t mac_via2_in_b_pmu(); + void mac_via2_out_a_pmu(uint8_t data); + void mac_via2_out_b_pmu(uint8_t data); void mac_state_load(); DECLARE_WRITE_LINE_MEMBER(mac_via_irq); DECLARE_WRITE_LINE_MEMBER(mac_via2_irq); diff --git a/src/mame/includes/macpci.h b/src/mame/includes/macpci.h index d9454a6c9f0..ae953dc627b 100644 --- a/src/mame/includes/macpci.h +++ b/src/mame/includes/macpci.h @@ -154,10 +154,10 @@ private: emu_timer *m_scanline_timer; uint32_t screen_update_pippin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(mac_6015_tick); - DECLARE_READ8_MEMBER(mac_via_in_a); - DECLARE_READ8_MEMBER(mac_via_in_b); - DECLARE_WRITE8_MEMBER(mac_via_out_a); - DECLARE_WRITE8_MEMBER(mac_via_out_b); + uint8_t mac_via_in_a(); + uint8_t mac_via_in_b(); + void mac_via_out_a(uint8_t data); + void mac_via_out_b(uint8_t data); DECLARE_READ_LINE_MEMBER(mac_adb_via_in_cb2); DECLARE_WRITE_LINE_MEMBER(mac_adb_via_out_cb2); DECLARE_WRITE_LINE_MEMBER(mac_via_irq); diff --git a/src/mame/includes/pcw.h b/src/mame/includes/pcw.h index 70d669983eb..7c96c7637e6 100644 --- a/src/mame/includes/pcw.h +++ b/src/mame/includes/pcw.h @@ -84,7 +84,7 @@ public: emu_timer *m_prn_pins; emu_timer *m_pulse_timer; emu_timer *m_beep_setup_timer; - DECLARE_READ8_MEMBER(pcw_keyboard_r); + uint8_t pcw_keyboard_r(offs_t offset); DECLARE_READ8_MEMBER(pcw_keyboard_data_r); DECLARE_READ8_MEMBER(pcw_interrupt_counter_r); DECLARE_WRITE8_MEMBER(pcw_bank_select_w); @@ -100,17 +100,17 @@ public: DECLARE_WRITE8_MEMBER(pcw_printer_command_w); DECLARE_READ8_MEMBER(pcw_printer_data_r); DECLARE_READ8_MEMBER(pcw_printer_status_r); - DECLARE_READ8_MEMBER(mcu_printer_p1_r); - DECLARE_WRITE8_MEMBER(mcu_printer_p1_w); - DECLARE_READ8_MEMBER(mcu_printer_p2_r); - DECLARE_WRITE8_MEMBER(mcu_printer_p2_w); + uint8_t mcu_printer_p1_r(); + void mcu_printer_p1_w(uint8_t data); + uint8_t mcu_printer_p2_r(); + void mcu_printer_p2_w(uint8_t data); DECLARE_READ_LINE_MEMBER(mcu_printer_t1_r); DECLARE_READ_LINE_MEMBER(mcu_printer_t0_r); - DECLARE_READ8_MEMBER(mcu_kb_scan_r); - DECLARE_WRITE8_MEMBER(mcu_kb_scan_w); - DECLARE_READ8_MEMBER(mcu_kb_scan_high_r); - DECLARE_WRITE8_MEMBER(mcu_kb_scan_high_w); - DECLARE_READ8_MEMBER(mcu_kb_data_r); + uint8_t mcu_kb_scan_r(); + void mcu_kb_scan_w(uint8_t data); + uint8_t mcu_kb_scan_high_r(); + void mcu_kb_scan_high_w(uint8_t data); + uint8_t mcu_kb_data_r(); DECLARE_READ_LINE_MEMBER(mcu_kb_t1_r); DECLARE_READ_LINE_MEMBER(mcu_kb_t0_r); DECLARE_READ8_MEMBER(pcw9512_parallel_r); diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp index 1290fd28294..afb7e5ebb6f 100644 --- a/src/mame/machine/amiga.cpp +++ b/src/mame/machine/amiga.cpp @@ -1073,7 +1073,7 @@ CUSTOM_INPUT_MEMBER( amiga_state::floppy_drive_status ) return m_fdc->ciaapra_r(); } -WRITE8_MEMBER( amiga_state::cia_0_port_a_write ) +void amiga_state::cia_0_port_a_write(uint8_t data) { // bit 0, kickstart overlay m_overlay->set_bank(BIT(data, 0)); @@ -1091,7 +1091,7 @@ WRITE_LINE_MEMBER( amiga_state::cia_0_irq ) update_int2(); } -READ8_MEMBER( amiga_state::cia_1_port_a_read ) +uint8_t amiga_state::cia_1_port_a_read() { uint8_t data = 0; @@ -1109,7 +1109,7 @@ READ8_MEMBER( amiga_state::cia_1_port_a_read ) return data; } -WRITE8_MEMBER( amiga_state::cia_1_port_a_write ) +void amiga_state::cia_1_port_a_write(uint8_t data) { if (m_rs232) { diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp index ef35bac847b..0fecabe04f1 100644 --- a/src/mame/machine/amstrad.cpp +++ b/src/mame/machine/amstrad.cpp @@ -1160,10 +1160,10 @@ void amstrad_state::amstrad_setLowerRom() /* if ( m_asic.enabled && ( m_asic.rmr2 & 0x18 ) == 0x18 ) { - space.install_read_handler(0x4000, 0x5fff, read8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_r))); - space.install_read_handler(0x6000, 0x7fff, read8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_r))); - space.install_write_handler(0x4000, 0x5fff, write8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_w))); - space.install_write_handler(0x6000, 0x7fff, write8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_w))); + space.install_read_handler(0x4000, 0x5fff, read8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_r))); + space.install_read_handler(0x6000, 0x7fff, read8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_r))); + space.install_write_handler(0x4000, 0x5fff, write8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_w))); + space.install_write_handler(0x6000, 0x7fff, write8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_w))); } else { @@ -1383,7 +1383,7 @@ void amstrad_state::AmstradCPC_GA_SetRamConfiguration() */ -WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_4000_w) +void amstrad_state::amstrad_plus_asic_4000_w(offs_t offset, uint8_t data) { // logerror("ASIC: Write to register at &%04x\n",offset+0x4000); if ( m_asic.enabled && ( m_asic.rmr2 & 0x18 ) == 0x18 ) @@ -1396,7 +1396,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_4000_w) } -WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_6000_w) +void amstrad_state::amstrad_plus_asic_6000_w(offs_t offset, uint8_t data) { if ( m_asic.enabled && ( m_asic.rmr2 & 0x18 ) == 0x18 ) { @@ -1499,7 +1499,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_6000_w) } -READ8_MEMBER(amstrad_state::amstrad_plus_asic_4000_r) +uint8_t amstrad_state::amstrad_plus_asic_4000_r(offs_t offset) { // logerror("RAM: read from &%04x\n",offset+0x4000); if ( m_asic.enabled && ( m_asic.rmr2 & 0x18 ) == 0x18 ) @@ -1512,7 +1512,7 @@ READ8_MEMBER(amstrad_state::amstrad_plus_asic_4000_r) } -READ8_MEMBER(amstrad_state::amstrad_plus_asic_6000_r) +uint8_t amstrad_state::amstrad_plus_asic_6000_r(offs_t offset) { // logerror("RAM: read from &%04x\n",offset+0x6000); if ( m_asic.enabled && ( m_asic.rmr2 & 0x18 ) == 0x18 ) @@ -1711,7 +1711,7 @@ In the 464+ and 6128+ this function is performed by the ASIC or a memory expansi } -WRITE8_MEMBER(amstrad_state::aleste_msx_mapper) +void amstrad_state::aleste_msx_mapper(offs_t offset, uint8_t data) { int page = (offset & 0x0300) >> 8; int ramptr = (data & 0x3f) * 0x4000; @@ -1837,7 +1837,7 @@ Expansion Peripherals Read/Write - - - - - 0 - - - - - - */ -READ8_MEMBER(amstrad_state::amstrad_cpc_io_r) +uint8_t amstrad_state::amstrad_cpc_io_r(offs_t offset) { uint8_t data = 0xFF; unsigned int r1r0 = (unsigned int)((offset & 0x0300) >> 8); @@ -1987,7 +1987,7 @@ void amstrad_state::amstrad_plus_seqcheck(int data) m_prev_data = data; } -WRITE8_MEMBER(amstrad_state::rom_select) +void amstrad_state::rom_select(uint8_t data) { m_gate_array.upper_bank = data; // expansion devices know the selected ROM by monitoring I/O writes to DFxx @@ -2015,7 +2015,7 @@ WRITE8_MEMBER(amstrad_state::rom_select) } /* Offset handler for write */ -WRITE8_MEMBER(amstrad_state::amstrad_cpc_io_w) +void amstrad_state::amstrad_cpc_io_w(offs_t offset, uint8_t data) { cpc_multiface2_device* mface2; @@ -2023,7 +2023,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_cpc_io_w) { if(m_aleste_mode & 0x04) // Aleste mode { - aleste_msx_mapper(space, offset, data); + aleste_msx_mapper(offset, data); } else { @@ -2080,7 +2080,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_cpc_io_w) /* b13 = 0 : ROM select Write Selected*/ if ((offset & (1<<13)) == 0) { - rom_select(space,0,data); + rom_select(data); } /* b12 = 0 : Printer port Write Selected*/ @@ -2534,14 +2534,14 @@ void amstrad_state::update_psg() /* Read/Write 8255 PPI port A (connected to AY-3-8912 databus) */ -READ8_MEMBER(amstrad_state::amstrad_ppi_porta_r) +uint8_t amstrad_state::amstrad_ppi_porta_r() { update_psg(); return m_ppi_port_inputs[amstrad_ppi_PortA]; } -WRITE8_MEMBER(amstrad_state::amstrad_ppi_porta_w) +void amstrad_state::amstrad_ppi_porta_w(uint8_t data) { m_ppi_port_outputs[amstrad_ppi_PortA] = data; update_psg(); @@ -2578,7 +2578,7 @@ WRITE_LINE_MEMBER(amstrad_state::write_centronics_busy) m_centronics_busy = state; } -READ8_MEMBER(amstrad_state::amstrad_ppi_portb_r) +uint8_t amstrad_state::amstrad_ppi_portb_r() { int data = 0; /* Set b7 with cassette tape input */ @@ -2630,7 +2630,7 @@ Bit Description Usage /* previous_ppi_portc_w value */ -WRITE8_MEMBER(amstrad_state::amstrad_ppi_portc_w) +void amstrad_state::amstrad_ppi_portc_w(uint8_t data) { int changed_data; @@ -2679,7 +2679,7 @@ When port B is defined as input (bit 7 of register 7 is set to "0"), a read of t */ /* read PSG port A */ -READ8_MEMBER(amstrad_state::amstrad_psg_porta_read) +uint8_t amstrad_state::amstrad_psg_porta_read() { /* Read CPC Keyboard If keyboard matrix line 11-15 are selected, the byte is always &ff. @@ -3144,10 +3144,10 @@ MACHINE_RESET_MEMBER(amstrad_state,plus) AmstradCPC_GA_SetRamConfiguration(); amstrad_GateArray_write(0x081); // Epyx World of Sports requires upper ROM to be enabled by default - space.install_read_handler(0x4000, 0x5fff, read8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_r))); - space.install_read_handler(0x6000, 0x7fff, read8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_r))); - space.install_write_handler(0x4000, 0x5fff, write8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_w))); - space.install_write_handler(0x6000, 0x7fff, write8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_w))); + space.install_read_handler(0x4000, 0x5fff, read8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_r))); + space.install_read_handler(0x6000, 0x7fff, read8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_r))); + space.install_write_handler(0x4000, 0x5fff, write8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_w))); + space.install_write_handler(0x6000, 0x7fff, write8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_w))); // multiface_init(); timer_set(attotime::zero, TIMER_SET_RESOLUTION); @@ -3187,10 +3187,10 @@ MACHINE_RESET_MEMBER(amstrad_state,gx4000) AmstradCPC_GA_SetRamConfiguration(); amstrad_GateArray_write(0x081); // Epyx World of Sports requires upper ROM to be enabled by default // multiface_init(); - space.install_read_handler(0x4000, 0x5fff, read8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_r))); - space.install_read_handler(0x6000, 0x7fff, read8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_r))); - space.install_write_handler(0x4000, 0x5fff, write8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_w))); - space.install_write_handler(0x6000, 0x7fff, write8_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_w))); + space.install_read_handler(0x4000, 0x5fff, read8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_r))); + space.install_read_handler(0x6000, 0x7fff, read8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_r))); + space.install_write_handler(0x4000, 0x5fff, write8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_4000_w))); + space.install_write_handler(0x6000, 0x7fff, write8sm_delegate(*this, FUNC(amstrad_state::amstrad_plus_asic_6000_w))); timer_set(attotime::zero, TIMER_SET_RESOLUTION); } diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp index faeb7e9eca6..f01699170ff 100644 --- a/src/mame/machine/apollo.cpp +++ b/src/mame/machine/apollo.cpp @@ -386,7 +386,7 @@ READ16_MEMBER(apollo_state::apollo_address_translation_map_r){ return data; } -READ8_MEMBER(apollo_state::apollo_dma_read_byte){ +uint8_t apollo_state::apollo_dma_read_byte(offs_t offset){ uint8_t data; offs_t page_offset; @@ -408,7 +408,7 @@ READ8_MEMBER(apollo_state::apollo_dma_read_byte){ return data; } -WRITE8_MEMBER(apollo_state::apollo_dma_write_byte){ +void apollo_state::apollo_dma_write_byte(offs_t offset, uint8_t data){ offs_t page_offset; if (apollo_is_dn3000()) { page_offset = dma_page_register[channel2page_register[dn3000_dma_channel1]] << 16; @@ -427,7 +427,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_write_byte){ // logerror(" %02x", data); } -READ8_MEMBER(apollo_state::apollo_dma_read_word){ +uint8_t apollo_state::apollo_dma_read_word(offs_t offset){ uint16_t data; offs_t page_offset; @@ -448,7 +448,7 @@ READ8_MEMBER(apollo_state::apollo_dma_read_word){ return data; } -WRITE8_MEMBER(apollo_state::apollo_dma_write_word){ +void apollo_state::apollo_dma_write_word(offs_t offset, uint8_t data){ offs_t page_offset; SLOG1(("dma write word at offset %x = %02x", offset, data)); @@ -495,21 +495,21 @@ WRITE_LINE_MEMBER(apollo_state::apollo_dma_2_hrq_changed ) { m_dma8237_2->hack_w(state); } -READ8_MEMBER( apollo_state::pc_dma8237_0_dack_r ) { return m_isa->dack_r(0); } -READ8_MEMBER( apollo_state::pc_dma8237_1_dack_r ) { return m_isa->dack_r(1); } -READ8_MEMBER( apollo_state::pc_dma8237_2_dack_r ) { return m_isa->dack_r(2); } -READ8_MEMBER( apollo_state::pc_dma8237_3_dack_r ) { return m_isa->dack_r(3); } -READ8_MEMBER( apollo_state::pc_dma8237_5_dack_r ) { return m_isa->dack_r(5); } -READ8_MEMBER( apollo_state::pc_dma8237_6_dack_r ) { return m_isa->dack_r(6); } -READ8_MEMBER( apollo_state::pc_dma8237_7_dack_r ) { return m_isa->dack_r(7); } +uint8_t apollo_state::pc_dma8237_0_dack_r() { return m_isa->dack_r(0); } +uint8_t apollo_state::pc_dma8237_1_dack_r() { return m_isa->dack_r(1); } +uint8_t apollo_state::pc_dma8237_2_dack_r() { return m_isa->dack_r(2); } +uint8_t apollo_state::pc_dma8237_3_dack_r() { return m_isa->dack_r(3); } +uint8_t apollo_state::pc_dma8237_5_dack_r() { return m_isa->dack_r(5); } +uint8_t apollo_state::pc_dma8237_6_dack_r() { return m_isa->dack_r(6); } +uint8_t apollo_state::pc_dma8237_7_dack_r() { return m_isa->dack_r(7); } -WRITE8_MEMBER( apollo_state::pc_dma8237_0_dack_w ){ m_isa->dack_w(0, data); } -WRITE8_MEMBER( apollo_state::pc_dma8237_1_dack_w ){ m_isa->dack_w(1, data); } -WRITE8_MEMBER( apollo_state::pc_dma8237_2_dack_w ){ m_isa->dack_w(2, data); } -WRITE8_MEMBER( apollo_state::pc_dma8237_3_dack_w ){ m_isa->dack_w(3, data); } -WRITE8_MEMBER( apollo_state::pc_dma8237_5_dack_w ){ m_isa->dack_w(5, data); } -WRITE8_MEMBER( apollo_state::pc_dma8237_6_dack_w ){ m_isa->dack_w(6, data); } -WRITE8_MEMBER( apollo_state::pc_dma8237_7_dack_w ){ m_isa->dack_w(7, data); } +void apollo_state::pc_dma8237_0_dack_w(uint8_t data){ m_isa->dack_w(0, data); } +void apollo_state::pc_dma8237_1_dack_w(uint8_t data){ m_isa->dack_w(1, data); } +void apollo_state::pc_dma8237_2_dack_w(uint8_t data){ m_isa->dack_w(2, data); } +void apollo_state::pc_dma8237_3_dack_w(uint8_t data){ m_isa->dack_w(3, data); } +void apollo_state::pc_dma8237_5_dack_w(uint8_t data){ m_isa->dack_w(5, data); } +void apollo_state::pc_dma8237_6_dack_w(uint8_t data){ m_isa->dack_w(6, data); } +void apollo_state::pc_dma8237_7_dack_w(uint8_t data){ m_isa->dack_w(7, data); } WRITE_LINE_MEMBER( apollo_state::pc_dack0_w ) { select_dma_channel(0, state); } WRITE_LINE_MEMBER( apollo_state::pc_dack1_w ) { select_dma_channel(1, state); } @@ -591,7 +591,7 @@ u16 apollo_state::apollo_pic_get_vector() * pic8259 configuration *************************************************************/ -READ8_MEMBER( apollo_state::apollo_pic8259_get_slave_ack ) +uint8_t apollo_state::apollo_pic8259_get_slave_ack(offs_t offset) { MLOG1(("apollo_pic8259_get_slave_ack: offset=%x", offset)); @@ -799,7 +799,7 @@ WRITE_LINE_MEMBER(apollo_state::sio_irq_handler) apollo_pic_set_irq_line(APOLLO_IRQ_SIO1, state); } -WRITE8_MEMBER(apollo_state::sio_output) +void apollo_state::sio_output(uint8_t data) { // CLOG2(("apollo_sio - sio_output %02x", data)); diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp index e4b1290c8a1..5fc4807d645 100644 --- a/src/mame/machine/lisa.cpp +++ b/src/mame/machine/lisa.cpp @@ -633,7 +633,7 @@ void lisa_state::init_COPS() CA1 (I) : COPS sending valid data CA2 (O) : VIA -> COPS handshake */ -WRITE8_MEMBER(lisa_state::COPS_via_out_a) +void lisa_state::COPS_via_out_a(uint8_t data) { // printf("VIA A = %02x\n", data); m_COPS_command = data; @@ -664,7 +664,7 @@ WRITE_LINE_MEMBER(lisa_state::COPS_via_out_ca2) CB2 (O) : sound output */ -WRITE8_MEMBER(lisa_state::COPS_via_out_b) +void lisa_state::COPS_via_out_b(uint8_t data) { /* pull-up */ data |= (~ m_via0->read(via6522_device::VIA_DDRA)) & 0x01; diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp index 6b04f1546cd..b19c3e9cff9 100644 --- a/src/mame/machine/mac.cpp +++ b/src/mame/machine/mac.cpp @@ -1279,7 +1279,7 @@ WRITE_LINE_MEMBER(mac_state::mac_adb_via_out_cb2) #define PA2 0x04 #define PA1 0x02 -READ8_MEMBER(mac_state::mac_via_in_a) +uint8_t mac_state::mac_via_in_a() { // printf("%s VIA1 IN_A\n", machine().describe_context().c_str()); @@ -1335,7 +1335,7 @@ READ8_MEMBER(mac_state::mac_via_in_a) } } -READ8_MEMBER(mac_state::mac_via_in_a_pmu) +uint8_t mac_state::mac_via_in_a_pmu() { // printf("%s VIA1 IN_A\n", machine().describe_context().c_str()); @@ -1345,7 +1345,7 @@ READ8_MEMBER(mac_state::mac_via_in_a_pmu) return m_pm_data_recv; } -READ8_MEMBER(mac_state::mac_via_in_b) +uint8_t mac_state::mac_via_in_b() { int val = 0; /* video beam in display (! VBLANK && ! HBLANK basically) */ @@ -1388,7 +1388,7 @@ READ8_MEMBER(mac_state::mac_via_in_b) return val; } -READ8_MEMBER(mac_state::mac_via_in_b_ii) +uint8_t mac_state::mac_via_in_b_ii() { int val = 0; @@ -1417,7 +1417,7 @@ READ8_MEMBER(mac_state::mac_via_in_b_ii) return val; } -READ8_MEMBER(mac_state::mac_via_in_b_via2pmu) +uint8_t mac_state::mac_via_in_b_via2pmu() { int val = 0; // TODO: is this valid for VIA2 PMU machines? @@ -1432,7 +1432,7 @@ READ8_MEMBER(mac_state::mac_via_in_b_via2pmu) return val; } -READ8_MEMBER(mac_state::mac_via_in_b_pmu) +uint8_t mac_state::mac_via_in_b_pmu() { int val = 0; // printf("Read VIA B: PM_ACK %x\n", m_pm_ack); @@ -1443,7 +1443,7 @@ READ8_MEMBER(mac_state::mac_via_in_b_pmu) return val; } -WRITE8_MEMBER(mac_state::mac_via_out_a) +void mac_state::mac_via_out_a(uint8_t data) { // printf("%s VIA1 OUT A: %02x\n", machine().describe_context().c_str(), data); @@ -1475,7 +1475,7 @@ WRITE8_MEMBER(mac_state::mac_via_out_a) } } -WRITE8_MEMBER(mac_state::mac_via_out_a_pmu) +void mac_state::mac_via_out_a_pmu(uint8_t data) { // printf("%s VIA1 OUT A: %02x\n", machine().describe_context().c_str(), data); @@ -1485,7 +1485,7 @@ WRITE8_MEMBER(mac_state::mac_via_out_a_pmu) m_pm_data_send = data; } -WRITE8_MEMBER(mac_state::mac_via_out_b) +void mac_state::mac_via_out_b(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); @@ -1520,7 +1520,7 @@ void mac_state::update_volume(void) } } -WRITE8_MEMBER(mac_state::mac_via_out_b_bbadb) +void mac_state::mac_via_out_b_bbadb(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); @@ -1556,7 +1556,7 @@ WRITE8_MEMBER(mac_state::mac_via_out_b_bbadb) m_rtc->clk_w((data >> 1) & 0x01); } -WRITE8_MEMBER(mac_state::mac_via_out_b_egadb) +void mac_state::mac_via_out_b_egadb(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); @@ -1567,7 +1567,7 @@ WRITE8_MEMBER(mac_state::mac_via_out_b_egadb) m_egret->set_sys_session((data&0x20) ? 1 : 0); } -WRITE8_MEMBER(mac_state::mac_via_out_b_cdadb) +void mac_state::mac_via_out_b_cdadb(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); @@ -1578,12 +1578,12 @@ WRITE8_MEMBER(mac_state::mac_via_out_b_cdadb) m_cuda->set_tip((data&0x20) ? 1 : 0); } -WRITE8_MEMBER(mac_state::mac_via_out_b_via2pmu) +void mac_state::mac_via_out_b_via2pmu(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); } -WRITE8_MEMBER(mac_state::mac_via_out_b_pmu) +void mac_state::mac_via_out_b_pmu(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); @@ -1723,7 +1723,7 @@ WRITE16_MEMBER ( mac_state::mac_via2_w ) } -READ8_MEMBER(mac_state::mac_via2_in_a) +uint8_t mac_state::mac_via2_in_a() { uint8_t result; @@ -1739,12 +1739,12 @@ READ8_MEMBER(mac_state::mac_via2_in_a) return result; } -READ8_MEMBER(mac_state::mac_via2_in_a_pmu) +uint8_t mac_state::mac_via2_in_a_pmu() { return m_pm_data_recv; } -READ8_MEMBER(mac_state::mac_via2_in_b) +uint8_t mac_state::mac_via2_in_b() { // logerror("%s VIA2 IN B\n", machine().describe_context()); @@ -1761,7 +1761,7 @@ READ8_MEMBER(mac_state::mac_via2_in_b) return 0xcf; // indicate no NuBus transaction error } -READ8_MEMBER(mac_state::mac_via2_in_b_pmu) +uint8_t mac_state::mac_via2_in_b_pmu() { // logerror("%s VIA2 IN B\n", machine().describe_context()); @@ -1775,18 +1775,18 @@ READ8_MEMBER(mac_state::mac_via2_in_b_pmu) } } -WRITE8_MEMBER(mac_state::mac_via2_out_a) +void mac_state::mac_via2_out_a(uint8_t data) { // logerror("%s VIA2 OUT A: %02x\n", machine().describe_context(), data); } -WRITE8_MEMBER(mac_state::mac_via2_out_a_pmu) +void mac_state::mac_via2_out_a_pmu(uint8_t data) { // logerror("%s VIA2 OUT A: %02x\n", machine().describe_context(), data); m_pm_data_send = data; } -WRITE8_MEMBER(mac_state::mac_via2_out_b) +void mac_state::mac_via2_out_b(uint8_t data) { // logerror("%s VIA2 OUT B: %02x\n", machine().describe_context(), data); @@ -1800,7 +1800,7 @@ WRITE8_MEMBER(mac_state::mac_via2_out_b) } } -WRITE8_MEMBER(mac_state::mac_via2_out_b_pmu) +void mac_state::mac_via2_out_b_pmu(uint8_t data) { // logerror("%s VIA2 OUT B PMU: %02x\n", machine().describe_context(), data); diff --git a/src/mame/machine/macpci.cpp b/src/mame/machine/macpci.cpp index cbc31a32dd2..518d632e047 100644 --- a/src/mame/machine/macpci.cpp +++ b/src/mame/machine/macpci.cpp @@ -30,14 +30,14 @@ WRITE_LINE_MEMBER(macpci_state::mac_via_irq) { } -READ8_MEMBER(macpci_state::mac_via_in_a) +uint8_t macpci_state::mac_via_in_a() { // printf("VIA1 IN_A (PC %x)\n", mac->m_maincpu->pc()); return 0x80; } -READ8_MEMBER(macpci_state::mac_via_in_b) +uint8_t macpci_state::mac_via_in_b() { int val = 0; val |= m_cuda->get_treq()<<3; @@ -47,12 +47,12 @@ READ8_MEMBER(macpci_state::mac_via_in_b) return val; } -WRITE8_MEMBER(macpci_state::mac_via_out_a) +void macpci_state::mac_via_out_a(uint8_t data) { // printf("VIA1 OUT A: %02x (PC %x)\n", data, m_maincpu->pc()); } -WRITE8_MEMBER(macpci_state::mac_via_out_b) +void macpci_state::mac_via_out_b(uint8_t data) { // printf("VIA1 OUT B: %02x (PC %x)\n", data, m_maincpu->pc()); diff --git a/src/mame/video/turrett.cpp b/src/mame/video/turrett.cpp index 517f23e84b6..377830b7f15 100644 --- a/src/mame/video/turrett.cpp +++ b/src/mame/video/turrett.cpp @@ -312,7 +312,7 @@ WRITE32_MEMBER( turrett_state::dma_w ) while (words--) { - ram[addr & DIMM_BANK_MASK] = m_ata->read_cs0(0); + ram[addr & DIMM_BANK_MASK] = m_ata->cs0_r(0); ++addr; } @@ -324,7 +324,7 @@ WRITE32_MEMBER( turrett_state::dma_w ) { while (words--) { - uint16_t data = m_ata->read_cs0(0); + uint16_t data = m_ata->cs0_r(0); // TODO: Verify if this is correct if ((data & 0xc400) == 0xc400) From 229c0aea58ce5b68b340f5c1abc2d937f954f0a5 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 13 May 2020 18:28:36 -0400 Subject: [PATCH 14/69] pc1512: Remove PC_FDC_XT (nw) i8155: Turn logging back off (nw) --- src/devices/machine/i8155.cpp | 2 +- src/mame/drivers/pc1512.cpp | 52 ++++++++++++++++++++++++++--------- src/mame/includes/pc1512.h | 17 ++++++------ 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp index c42811248db..996faed2f42 100644 --- a/src/devices/machine/i8155.cpp +++ b/src/devices/machine/i8155.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(I8156, i8156_device, "i8156", "Intel 8156 RAM, I/O & Timer") #define LOG_PORT (1U << 0) #define LOG_TIMER (1U << 1) -#define VERBOSE (LOG_PORT | LOG_TIMER) +#define VERBOSE (0) #include "logmacro.h" enum diff --git a/src/mame/drivers/pc1512.cpp b/src/mame/drivers/pc1512.cpp index 146baf1182b..172db10ea9f 100644 --- a/src/mame/drivers/pc1512.cpp +++ b/src/mame/drivers/pc1512.cpp @@ -567,8 +567,8 @@ uint8_t pc1640_state::io_r(offs_t offset) else if (addr >= 0x078 && addr <= 0x07f) { data = mouse_r(offset & 0x07); decoded = true; } else if (addr >= 0x378 && addr <= 0x37b) { data = printer_r(offset & 0x03); decoded = true; } else if (addr >= 0x3b0 && addr <= 0x3df) { decoded = true; } - else if (addr >= 0x3f4 && addr <= 0x3f4) { data = m_fdc->fdc->msr_r(); decoded = true; } - else if (addr >= 0x3f5 && addr <= 0x3f5) { data = m_fdc->fdc->fifo_r(); decoded = true; } + else if (addr >= 0x3f4 && addr <= 0x3f4) { data = m_fdc->msr_r(); decoded = true; } + else if (addr >= 0x3f5 && addr <= 0x3f5) { data = m_fdc->fifo_r(); decoded = true; } else if (addr >= 0x3f8 && addr <= 0x3ff) { data = m_uart->ins8250_r(offset & 0x07); decoded = true; } if (decoded) @@ -637,7 +637,8 @@ void pc1512_state::pc1512_io(address_map &map) map(0x0a1, 0x0a1).w(FUNC(pc1512_state::nmi_mask_w)); map(0x378, 0x37b).rw(FUNC(pc1512_state::printer_r), FUNC(pc1512_state::printer_w)); map(0x3d0, 0x3df).rw(m_vdu, FUNC(ams40041_device::vdu_r), FUNC(ams40041_device::vdu_w)); - map(0x3f0, 0x3f7).m(m_fdc, FUNC(pc_fdc_xt_device::map)); + map(0x3f2, 0x3f2).w(FUNC(pc1512_state::drive_select_w)); + map(0x3f4, 0x3f5).m(m_fdc, FUNC(upd765a_device::map)); map(0x3f8, 0x3ff).rw(m_uart, FUNC(ins8250_device::ins8250_r), FUNC(ins8250_device::ins8250_w)); } @@ -670,8 +671,8 @@ void pc1640_state::pc1640_io(address_map &map) map(0x080, 0x083).w(FUNC(pc1640_state::dma_page_w)); map(0x0a1, 0x0a1).w(FUNC(pc1640_state::nmi_mask_w)); map(0x378, 0x37b).w(FUNC(pc1640_state::printer_w)); - map(0x3f2, 0x3f2).w(m_fdc, FUNC(pc_fdc_xt_device::dor_w)); - map(0x3f5, 0x3f5).w(PC_FDC_XT_TAG ":upd765", FUNC(upd765_family_device::fifo_w)); + map(0x3f2, 0x3f2).w(FUNC(pc1640_state::drive_select_w)); + map(0x3f5, 0x3f5).w(m_fdc, FUNC(upd765a_device::fifo_w)); map(0x3f8, 0x3ff).w(m_uart, FUNC(ins8250_device::ins8250_w)); } @@ -984,6 +985,27 @@ WRITE_LINE_MEMBER( pc1512_base_state::fdc_drq_w ) update_fdc_drq(); } +void pc1512_base_state::drive_select_w(uint8_t data) +{ + m_fdc->set_floppy((data & 0x03) < 2 ? m_floppy[data & 0x03]->get_device() : nullptr); + for (int n = 0; n < 2; n++) + { + floppy_image_device *img = m_floppy[n]->get_device(); + if (img != nullptr) + img->mon_w((data & 0x03) == n && BIT(data, n + 4) ? 0 : 1); + } + + if (m_dreset != BIT(data, 2)) + { + m_dreset = BIT(data, 2); + m_fdc->soft_reset(); + } + + m_nden = BIT(data, 3); + update_fdc_int(); + update_fdc_drq(); +} + //------------------------------------------------- // centronics_interface centronics_intf //------------------------------------------------- @@ -1069,6 +1091,7 @@ void pc1512_base_state::machine_start() save_item(NAME(m_nden)); save_item(NAME(m_dint)); save_item(NAME(m_ddrq)); + save_item(NAME(m_dreset)); save_item(NAME(m_neop)); save_item(NAME(m_ack_int_enable)); save_item(NAME(m_centronics_ack)); @@ -1098,6 +1121,7 @@ void pc1512_state::machine_start() void pc1512_base_state::machine_reset() { m_nmi_enable = 0; + drive_select_w(0); m_kb_bits = 0; m_kb->data_w(1); @@ -1195,11 +1219,12 @@ void pc1512_state::pc1512(machine_config &config) MC146818(config, m_rtc, 32.768_kHz_XTAL); m_rtc->irq().set(m_pic, FUNC(pic8259_device::ir2_w)); - PC_FDC_XT(config, m_fdc, 0); + UPD765A(config, m_fdc, 24_MHz_XTAL / 6, false, false); + // SED9420CAC (dedicated 16 MHz XTAL) is used as read data separator only m_fdc->intrq_wr_callback().set(FUNC(pc1512_state::fdc_int_w)); m_fdc->drq_wr_callback().set(FUNC(pc1512_state::fdc_drq_w)); - FLOPPY_CONNECTOR(config, PC_FDC_XT_TAG ":0", pc1512_floppies, "525dd", pc1512_base_state::floppy_formats); - FLOPPY_CONNECTOR(config, PC_FDC_XT_TAG ":1", pc1512_floppies, nullptr, pc1512_base_state::floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy[0], pc1512_floppies, "525dd", pc1512_base_state::floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy[1], pc1512_floppies, nullptr, pc1512_base_state::floppy_formats); INS8250(config, m_uart, 1.8432_MHz_XTAL); m_uart->out_tx_callback().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -1257,7 +1282,7 @@ void pc1512_state::pc1512(machine_config &config) void pc1512_state::pc1512dd(machine_config &config) { pc1512(config); - subdevice(PC_FDC_XT_TAG ":1")->set_default_option("525dd"); + m_floppy[1]->set_default_option("525dd"); } @@ -1330,11 +1355,12 @@ void pc1640_state::pc1640(machine_config &config) MC146818(config, m_rtc, 32.768_kHz_XTAL); m_rtc->irq().set(m_pic, FUNC(pic8259_device::ir2_w)); - PC_FDC_XT(config, m_fdc, 0); + UPD765A(config, m_fdc, 24_MHz_XTAL / 6, false, false); + // FDC91C36 (clocked by CK8K) is used as read data separator only m_fdc->intrq_wr_callback().set(FUNC(pc1512_base_state::fdc_int_w)); m_fdc->drq_wr_callback().set(FUNC(pc1512_base_state::fdc_drq_w)); - FLOPPY_CONNECTOR(config, PC_FDC_XT_TAG ":0", pc1512_floppies, "525dd", pc1512_base_state::floppy_formats); - FLOPPY_CONNECTOR(config, PC_FDC_XT_TAG ":1", pc1512_floppies, nullptr, pc1512_base_state::floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy[0], pc1512_floppies, "525dd", pc1512_base_state::floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy[1], pc1512_floppies, nullptr, pc1512_base_state::floppy_formats); INS8250(config, m_uart, 1.8432_MHz_XTAL); m_uart->out_tx_callback().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -1394,7 +1420,7 @@ void pc1640_state::pc1640(machine_config &config) void pc1640_state::pc1640dd(machine_config &config) { pc1640(config); - subdevice(PC_FDC_XT_TAG ":1")->set_default_option("525dd"); + m_floppy[1]->set_default_option("525dd"); } diff --git a/src/mame/includes/pc1512.h b/src/mame/includes/pc1512.h index 6f47c388025..036f64c8f7c 100644 --- a/src/mame/includes/pc1512.h +++ b/src/mame/includes/pc1512.h @@ -20,7 +20,7 @@ #include "machine/pic8259.h" #include "machine/pit8253.h" #include "machine/pc1512kb.h" -#include "machine/pc_fdc.h" +#include "machine/upd765.h" #include "machine/ram.h" #include "sound/spkrdev.h" #include "video/ams40041.h" @@ -34,7 +34,7 @@ #define I8259A2_TAG "ic109" #define I8253_TAG "ic114" #define MC146818_TAG "ic134" -#define PC_FDC_XT_TAG "ic112" +#define UPD765A_TAG "ic112" #define INS8250_TAG "ic106" #define AMS40041_TAG "ic126" #define CENTRONICS_TAG "centronics" @@ -52,15 +52,14 @@ public: m_pic(*this, I8259A2_TAG), m_pit(*this, I8253_TAG), m_rtc(*this, MC146818_TAG), - m_fdc(*this, PC_FDC_XT_TAG), + m_fdc(*this, UPD765A_TAG), m_uart(*this, INS8250_TAG), m_centronics(*this, CENTRONICS_TAG), m_cent_data_out(*this, "cent_data_out"), m_speaker(*this, "speaker"), m_kb(*this, PC1512_KEYBOARD_TAG), m_ram(*this, RAM_TAG), - m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ), - m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ), + m_floppy(*this, UPD765A_TAG ":%u", 0U), m_bus(*this, ISA_BUS_TAG), m_lk(*this, "LK"), m_pit1(0), @@ -76,6 +75,7 @@ public: m_nden(1), m_dint(0), m_ddrq(0), + m_dreset(1), m_fdc_dsr(0), m_neop(0), m_ack_int_enable(1), @@ -88,15 +88,14 @@ public: required_device m_pic; required_device m_pit; required_device m_rtc; - required_device m_fdc; + required_device m_fdc; required_device m_uart; required_device m_centronics; required_device m_cent_data_out; required_device m_speaker; required_device m_kb; required_device m_ram; - required_device m_floppy0; - optional_device m_floppy1; + required_device_array m_floppy; required_device m_bus; required_ioport m_lk; @@ -139,6 +138,7 @@ public: DECLARE_FLOPPY_FORMATS( floppy_formats ); DECLARE_WRITE_LINE_MEMBER( fdc_int_w ); DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); + void drive_select_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_centronics_ack ); DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); DECLARE_WRITE_LINE_MEMBER( write_centronics_perror ); @@ -178,6 +178,7 @@ public: int m_nden; int m_dint; int m_ddrq; + int m_dreset; uint8_t m_fdc_dsr; int m_neop; From 26f7bc68ff747593063cb03cbc448e6d32cde53d Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Wed, 13 May 2020 15:34:52 -0700 Subject: [PATCH 15/69] apple2gs.cpp: respond to keyboard mode-set [Peter Ferrie] --- src/mame/drivers/apple2gs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp index 9e8ae313691..5816891f935 100644 --- a/src/mame/drivers/apple2gs.cpp +++ b/src/mame/drivers/apple2gs.cpp @@ -1079,6 +1079,7 @@ void apple2gs_state::adb_write_datareg(uint8_t data) break; case 0xf2: + adb_post_response_1(0x80); break; default: From deb00c5f59f7ae22e0e37f8d71ef36ca689fe07d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 14 May 2020 10:21:32 +1000 Subject: [PATCH 16/69] (nw) amigaocs_flop.xml: validation error --- hash/amigaocs_flop.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/amigaocs_flop.xml b/hash/amigaocs_flop.xml index 8a8c8c36b7c..daebf09d756 100644 --- a/hash/amigaocs_flop.xml +++ b/hash/amigaocs_flop.xml @@ -23170,8 +23170,8 @@ license:CC0 1992 - Electronic Arts + From 940981d2a4f6cda78b56c93aab7d68d65be2a04d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 14 May 2020 10:24:21 +1000 Subject: [PATCH 17/69] (nw) eacc: small cleanup --- src/mame/drivers/eacc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/eacc.cpp b/src/mame/drivers/eacc.cpp index 3a126dc3056..db1814c700c 100644 --- a/src/mame/drivers/eacc.cpp +++ b/src/mame/drivers/eacc.cpp @@ -104,7 +104,7 @@ void eacc_state::eacc_mem(address_map &map) map.global_mask(0xc7ff); // A11,A12,A13 not connected map(0x0000, 0x001f).ram().share("nvram"); // inside cpu, battery-backed map(0x0020, 0x007f).ram(); // inside cpu - map(0x4000, 0x47ff).rom().mirror(0x8000); + map(0x4000, 0x47ff).rom().mirror(0x8000).region("maincpu",0); map(0x8000, 0x8003).mirror(0x7fc).rw(m_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); } @@ -277,8 +277,8 @@ void eacc_state::eacc(machine_config &config) ******************************************************************************/ ROM_START(eacc) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("eacc.bin", 0x4000, 0x0800, CRC(287a63c0) SHA1(f61b397d33ea40e5742e34d5f5468572125e8b39) ) + ROM_REGION(0x0800, "maincpu", 0) + ROM_LOAD("eacc.bin", 0x0000, 0x0800, CRC(287a63c0) SHA1(f61b397d33ea40e5742e34d5f5468572125e8b39) ) ROM_END From 824477fd8ab5c48df687383ae53890177ef2ffd2 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 14 May 2020 15:22:28 +0200 Subject: [PATCH 18/69] New working machines -------------------- Mephisto Junior (1982 version) [hap, Berger, Achim] --- src/mame/drivers/aci_ggm.cpp | 24 ++- src/mame/drivers/mephisto_brikett.cpp | 110 ++++++++++--- src/mame/layout/mephisto_1.lay | 14 ++ src/mame/layout/mephisto_esb2.lay | 14 ++ src/mame/layout/mephisto_junior.lay | 223 ++++++++++++++++++++++++++ src/mame/layout/saitek_minichess.lay | 48 +++--- src/mame/mame.lst | 1 + 7 files changed, 373 insertions(+), 61 deletions(-) create mode 100644 src/mame/layout/mephisto_junior.lay diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp index b76a7599a55..1a028605d89 100644 --- a/src/mame/drivers/aci_ggm.cpp +++ b/src/mame/drivers/aci_ggm.cpp @@ -113,22 +113,17 @@ private: void shift_clock_w(int state); void shift_data_w(int state); - u8 m_inp_mux; - u16 m_digit_data; - u8 m_shift_data; - u8 m_shift_clock; - u32 m_cart_mask; - u8 m_overlay; + u8 m_inp_mux = 0; + u16 m_digit_data = 0; + u8 m_shift_data = 0; + u8 m_shift_clock = 0; + + u32 m_cart_mask = 0; + u8 m_overlay = 0; }; void ggm_state::machine_start() { - // zerofill - m_inp_mux = 0; - m_digit_data = 0; - m_shift_data = 0; - m_shift_clock = 0; - // register for savestates save_item(NAME(m_inp_mux)); save_item(NAME(m_digit_data)); @@ -176,9 +171,8 @@ DEVICE_IMAGE_LOAD_MEMBER(ggm_state::cartridge) m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); - // keypad overlay - std::string overlay(image.get_feature("overlay")); - m_overlay = std::stoul(overlay, nullptr, 0) & 0xf; + // keypad overlay (will return 0 if it's not defined) + m_overlay = strtoul(image.get_feature("overlay"), nullptr, 0) & 0xf; // extra ram (optional) if (image.get_feature("ram")) diff --git a/src/mame/drivers/mephisto_brikett.cpp b/src/mame/drivers/mephisto_brikett.cpp index 66c0bb63ac9..f41cfabf655 100644 --- a/src/mame/drivers/mephisto_brikett.cpp +++ b/src/mame/drivers/mephisto_brikett.cpp @@ -3,7 +3,7 @@ // thanks-to:Berger /****************************************************************************** -Hegener + Glaser Mephisto (I)/1X/II/ESB II/III +Hegener + Glaser Mephisto (I)/1X/II/ESB II/III/Junior The base device is nicknamed the "Brikett" Mephisto is the 1st chess computer by H+G, chess engine by Thomas Nitsche & Elmar Henne. @@ -19,6 +19,7 @@ Hardware notes: - 8*MWS5101L3 (256x4 RAM) - 4-digit 7seg LCD - piezo, TTL, 16-button keypad +- module slot 2nd model (Mephisto II 1982, Mephisto III): (listed differences) - PCB label: DH 4005-101 01 @@ -26,6 +27,13 @@ Hardware notes: - 2 XTALs (3.579MHz and 6.144MHz), lower speed when running on battery - 2*TC5514P (1KBx4 RAM), unpopulated on some Mephisto III +Mephisto Junior: (listed differences) +- 2 PCBs: RAWE 003010 B(computer), RAWE 003010 A(LCD/keypad) + (RAWE = Rawe Datentechnik GmbH) +- CDP1802ACE @ 4.194MHz +- 1KB RAM (2*MWS5114E1), 8KB ROM (SMM2365C) +- no module slot, I/O chip, or external port + Mephisto program module: - PCB label: DF 4003-B - 6*CDP1833CE (1KB ROM) @@ -74,6 +82,7 @@ is completely different, based on a 68000. #include "mephisto_1.lh" // clickable #include "mephisto_esb2.lh" // clickable #include "mephisto_3.lh" // clickable +#include "mephisto_junior.lh" // clickable namespace { @@ -97,6 +106,7 @@ public: // machine configs void mephisto(machine_config &config); + void mephistoj(machine_config &config); void mephisto2(machine_config &config); void mephisto2e(machine_config &config); void mephisto3(machine_config &config); @@ -108,7 +118,7 @@ protected: private: // devices/pointers required_device m_maincpu; - required_device m_extport; + optional_device m_extport; optional_device m_board; required_device m_display; required_device m_dac; @@ -117,10 +127,12 @@ private: // address maps void mephisto_map(address_map &map); + void mephistoj_map(address_map &map); void mephisto2_map(address_map &map); void mephisto2e_map(address_map &map); void mephisto3_map(address_map &map); void mephisto_io(address_map &map); + void mephistoj_io(address_map &map); void set_cpu_freq(); @@ -180,11 +192,15 @@ void brikett_state::machine_reset() void brikett_state::set_cpu_freq() { + u8 inp = m_inputs[4]->read(); + if (~inp & 0x40) + return; + inp = inp >> 4 & inp; + // 2nd hardware model has 2 XTALs, it will increase CPU voltage (and speed) when running on mains power, // the 3.579545MHz XTAL is still used for IRQ. Mephisto III could be fitted with a 12MHz XTAL instead of 6.144MHz // and a newer CDP1805CE CPU by Hobby Computer Centrale on request. // (It is unexpected that the 1805 accepts such a high overclock, but tests show that it is indeed twice faster) - u8 inp = m_inputs[4]->read() >> 4 & m_inputs[4]->read(); m_maincpu->set_unscaled_clock((inp & 2) ? 12_MHz_XTAL : ((inp & 1) ? 6.144_MHz_XTAL : 3.579545_MHz_XTAL)); } @@ -307,6 +323,12 @@ void brikett_state::mephisto_map(address_map &map) map(0xfff0, 0xffff).r(FUNC(brikett_state::input_r)); } +void brikett_state::mephistoj_map(address_map &map) +{ + mephisto_map(map); + map(0x0000, 0x1fff).rom(); +} + void brikett_state::mephisto2_map(address_map &map) { mephisto_map(map); @@ -333,6 +355,11 @@ void brikett_state::mephisto_io(address_map &map) map(0x02, 0x02).w(m_extport, FUNC(cdp1852_device::write)); } +void brikett_state::mephistoj_io(address_map &map) +{ + map(0x01, 0x01).r(FUNC(brikett_state::sound_r)); +} + /****************************************************************************** @@ -343,11 +370,11 @@ static INPUT_PORTS_START( mephisto ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A / 1") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENT") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("ENT") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B / 2 / Pawn") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("STA") // enter move + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("STA") // enter move PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C / 3 / Knight") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LEV") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D / 4 / Bishop") @@ -368,12 +395,22 @@ static INPUT_PORTS_START( mephisto ) PORT_CONFNAME( 0x03, 0x01, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, brikett_state, switch_cpu_freq, 0) PORT_CONDITION("IN.4", 0x30, NOTEQUALS, 0x00) PORT_CONFSETTING( 0x00, "3.579MHz (Battery)" ) PORT_CONFSETTING( 0x01, "6.144MHz (Mains)" ) - PORT_CONFNAME( 0x30, 0x00, "Base Hardware" ) PORT_CHANGED_MEMBER(DEVICE_SELF, brikett_state, switch_cpu_freq, 0) - PORT_CONFSETTING( 0x00, "1st Model (1980)" ) - PORT_CONFSETTING( 0x30, "2nd Model (1982)" ) + PORT_CONFNAME( 0x70, 0x40, "Base Hardware" ) PORT_CHANGED_MEMBER(DEVICE_SELF, brikett_state, switch_cpu_freq, 0) + PORT_CONFSETTING( 0x40, "1st Model (1980)" ) + PORT_CONFSETTING( 0x70, "2nd Model (1982)" ) PORT_START("RESET") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("RES") PORT_CHANGED_MEMBER(DEVICE_SELF, brikett_state, reset_button, 0) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("RES") PORT_CHANGED_MEMBER(DEVICE_SELF, brikett_state, reset_button, 0) +INPUT_PORTS_END + +static INPUT_PORTS_START( mephistoj ) + PORT_INCLUDE( mephisto ) + + PORT_MODIFY("IN.4") // 1 XTAL + PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_MODIFY("RESET") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END static INPUT_PORTS_START( mephisto2e ) @@ -388,6 +425,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( mephisto3 ) PORT_INCLUDE( mephisto2e ) + PORT_MODIFY("IN.0") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENT") + PORT_MODIFY("IN.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("INFO") @@ -404,7 +444,7 @@ static INPUT_PORTS_START( mephisto3 ) PORT_CONFSETTING( 0x00, "3.579MHz (Battery)" ) PORT_CONFSETTING( 0x01, "6.144MHz (Mains)" ) PORT_CONFSETTING( 0x02, "12MHz (Special)" ) - PORT_BIT(0x30, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x70, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END @@ -413,14 +453,39 @@ INPUT_PORTS_END Machine Configs ******************************************************************************/ -void brikett_state::mephisto(machine_config &config) +void brikett_state::mephistoj(machine_config &config) { /* basic machine hardware */ - CDP1802(config, m_maincpu, 3.579545_MHz_XTAL); // see set_cpu_freq - m_maincpu->set_addrmap(AS_PROGRAM, &brikett_state::mephisto_map); - m_maincpu->set_addrmap(AS_IO, &brikett_state::mephisto_io); + CDP1802(config, m_maincpu, 4.194304_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &brikett_state::mephistoj_map); + m_maincpu->set_addrmap(AS_IO, &brikett_state::mephistoj_io); m_maincpu->clear_cb().set(FUNC(brikett_state::clear_r)); m_maincpu->q_cb().set(FUNC(brikett_state::q_w)).invert(); + + const attotime irq_period = attotime::from_hz(4.194304_MHz_XTAL / 0x10000); // through SAJ300T + m_maincpu->set_periodic_int(FUNC(brikett_state::interrupt), irq_period); + + /* video hardware */ + PWM_DISPLAY(config, m_display).set_size(4, 8); + m_display->set_segmask(0xf, 0x7f); + config.set_default_layout(layout_mephisto_junior); + + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); + VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); + + TIMER(config, m_speaker_off).configure_generic(FUNC(brikett_state::speaker_off)); +} + +void brikett_state::mephisto(machine_config &config) +{ + mephistoj(config); + + /* basic machine hardware */ + m_maincpu->set_clock(3.579545_MHz_XTAL); // see set_cpu_freq + m_maincpu->set_addrmap(AS_PROGRAM, &brikett_state::mephisto_map); + m_maincpu->set_addrmap(AS_IO, &brikett_state::mephisto_io); m_maincpu->tpb_cb().set(m_extport, FUNC(cdp1852_device::clock_w)); m_maincpu->ef1_cb().set_constant(0); // external port m_maincpu->ef3_cb().set_constant(0); // external port, but unused @@ -432,17 +497,7 @@ void brikett_state::mephisto(machine_config &config) m_extport->mode_cb().set_constant(1); m_extport->do_cb().set_nop(); - /* video hardware */ - PWM_DISPLAY(config, m_display).set_size(4, 8); - m_display->set_segmask(0xf, 0x7f); config.set_default_layout(layout_mephisto_1); - - /* sound hardware */ - SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); - VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); - - TIMER(config, m_speaker_off).configure_generic(FUNC(brikett_state::speaker_off)); } void brikett_state::mephisto2(machine_config &config) @@ -498,7 +553,6 @@ ROM_START( mephisto ) ROM_LOAD("89815", 0x1400, 0x0400, CRC(072e0b01) SHA1(5b1074932b3f21ab01392250061c093de4af3624) ) // " ROM_END - ROM_START( mephisto1x ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("3-2911_adi.1", 0x0000, 0x1000, CRC(0d62fa67) SHA1(b4bd934fec595f37f99b74eb341d220c511c07a5) ) // CM3200-2 @@ -506,6 +560,11 @@ ROM_START( mephisto1x ) ROM_LOAD("3-2841_adk.3", 0x2000, 0x1000, CRC(5dd05a5d) SHA1(372ed83a936fb0720b68590ca6ff4a02c80f4bab) ) // " ROM_END +ROM_START( mephistoj ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("smm2365c.7", 0x0000, 0x2000, CRC(f2f46583) SHA1(960b6f781e4c3d98db85a1bb4f90df4a133f06ba) ) // SMM2365C, no label +ROM_END + ROM_START( mephisto2 ) // cartridge s/n 0302446 ROM_REGION( 0x10000, "maincpu", 0 ) @@ -553,6 +612,7 @@ ROM_END CONS( 1980, mephisto, 0, 0, mephisto, mephisto, brikett_state, empty_init, "Hegener + Glaser", "Mephisto", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1981, mephisto1x, 0, 0, mephisto2, mephisto, brikett_state, empty_init, "Hegener + Glaser", "Mephisto 1X", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1982, mephistoj, 0, 0, mephistoj, mephistoj, brikett_state, empty_init, "Hegener + Glaser", "Mephisto Junior (1982 version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // there's also a "Mephisto Junior" from 1990 CONS( 1981, mephisto2, 0, 0, mephisto2, mephisto, brikett_state, empty_init, "Hegener + Glaser", "Mephisto II (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1981, mephisto2a, mephisto2, 0, mephisto2, mephisto, brikett_state, empty_init, "Hegener + Glaser", "Mephisto II (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/layout/mephisto_1.lay b/src/mame/layout/mephisto_1.lay index f41a8a9d8b8..facf4477005 100644 --- a/src/mame/layout/mephisto_1.lay +++ b/src/mame/layout/mephisto_1.lay @@ -80,6 +80,11 @@ license:CC0 + + + + + @@ -152,6 +157,15 @@ license:CC0 + + + + + + + + + diff --git a/src/mame/layout/mephisto_esb2.lay b/src/mame/layout/mephisto_esb2.lay index 3b91bb28e61..c94237ea25a 100644 --- a/src/mame/layout/mephisto_esb2.lay +++ b/src/mame/layout/mephisto_esb2.lay @@ -456,6 +456,11 @@ license:CC0 + + + + + @@ -528,6 +533,15 @@ license:CC0 + + + + + + + + + diff --git a/src/mame/layout/mephisto_junior.lay b/src/mame/layout/mephisto_junior.lay new file mode 100644 index 00000000000..35493e17a91 --- /dev/null +++ b/src/mame/layout/mephisto_junior.lay @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/saitek_minichess.lay b/src/mame/layout/saitek_minichess.lay index 3d56ff9e6ec..1dee94f2370 100644 --- a/src/mame/layout/saitek_minichess.lay +++ b/src/mame/layout/saitek_minichess.lay @@ -10,14 +10,29 @@ license:CC0 + + + + + + + + + + + + + + + @@ -41,19 +56,6 @@ license:CC0 - - - - - - - - - - - - - @@ -116,17 +118,21 @@ license:CC0 - - + + - - - + + + + + - - - + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 533b1c9ad03..7685675eb13 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -22159,6 +22159,7 @@ mephisto2a mephisto2e mephisto3 mephisto3b +mephistoj @source:mephisto_glasgow.cpp amsterd // Amsterdam From 062276b0f8a6704259f730b9f41563c2297fe603 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 00:27:37 +1000 Subject: [PATCH 19/69] (nw) zorba: removed no-longer-needed comment. --- src/mame/drivers/zorba.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mame/drivers/zorba.cpp b/src/mame/drivers/zorba.cpp index 5281f2ca767..1e49f411576 100644 --- a/src/mame/drivers/zorba.cpp +++ b/src/mame/drivers/zorba.cpp @@ -46,7 +46,6 @@ ToDo: - Dump Telcon and Gemini BIOSes - Emulate the Co-Power-88 expansion (allows PC-DOS, CP/M-86, etc. to be used) - Probably lots of other things -- Press F3 and screen turns into garbage. This breakage started in the 0.198 to 0.199 cycle. *************************************************************************************************************/ From 9197ca48267731fc47d431e46eba017d4c0cd60d Mon Sep 17 00:00:00 2001 From: Frank Palazzolo Date: Thu, 14 May 2020 11:17:01 -0400 Subject: [PATCH 20/69] (nw) i8085.cpp: Remove leftover logerror() (#6698) --- src/devices/cpu/i8085/i8085.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp index aae072b6cb7..ab4c439871b 100644 --- a/src/devices/cpu/i8085/i8085.cpp +++ b/src/devices/cpu/i8085/i8085.cpp @@ -878,7 +878,6 @@ void i8085a_cpu_device::execute_run() check_for_interrupts(); m_in_acknowledge = false; - logerror("PC=%04X\n", m_PC.d); debugger_instruction_hook(m_PC.d); /* here we go... */ From a2ccc0af667a21447f2b534fdd8c7528eb94d987 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 12:04:53 -0400 Subject: [PATCH 21/69] New machines marked as NOT_WORKING ---------------------------------- Korg DVP-1 Digital Voice Processor [DBWBP] --- scripts/target/mame/mess.lua | 1 + src/mame/drivers/korgdvp1.cpp | 67 +++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 3 ++ src/mame/mess.flt | 1 + 4 files changed, 72 insertions(+) create mode 100644 src/mame/drivers/korgdvp1.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index e5bd0013829..1211b8eb7a2 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -2674,6 +2674,7 @@ createMESSProjects(_target, _subtarget, "korg") files { MAME_DIR .. "src/mame/drivers/korgds8.cpp", MAME_DIR .. "src/mame/drivers/korgdss1.cpp", + MAME_DIR .. "src/mame/drivers/korgdvp1.cpp", MAME_DIR .. "src/mame/drivers/korgdw8k.cpp", MAME_DIR .. "src/mame/drivers/korgm1.cpp", MAME_DIR .. "src/mame/drivers/korgz3.cpp", diff --git a/src/mame/drivers/korgdvp1.cpp b/src/mame/drivers/korgdvp1.cpp new file mode 100644 index 00000000000..f803e181e29 --- /dev/null +++ b/src/mame/drivers/korgdvp1.cpp @@ -0,0 +1,67 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/**************************************************************************** + + Skeleton driver for Korg DVP-1 MIDI vocoder. + +****************************************************************************/ + +#include "emu.h" +//#include "bus/midi/midi.h" +#include "cpu/upd7810/upd7810.h" +#include "cpu/tms32010/tms32010.h" +#include "machine/nvram.h" + +class korgdvp1_state : public driver_device +{ +public: + korgdvp1_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_dsp(*this, "dsp%u", 1U) + { + } + + void dvp1(machine_config &config); + +private: + void main_map(address_map &map); + + required_device m_maincpu; + required_device_array m_dsp; +}; + + +void korgdvp1_state::main_map(address_map &map) +{ + map(0x0000, 0x7fff).rom().region("program", 0); + map(0x8000, 0x87ff).mirror(0x1800).ram().share("nvram"); +} + + +static INPUT_PORTS_START(dvp1) +INPUT_PORTS_END + +void korgdvp1_state::dvp1(machine_config &config) +{ + UPD7810(config, m_maincpu, 12_MHz_XTAL); // µPD7811-161-36 (according to parts list) but with both mode pins pulled up + m_maincpu->set_addrmap(AS_PROGRAM, &korgdvp1_state::main_map); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // HM6116LP-4 + 3V lithium battery + + TMS32010(config, m_dsp[0], 20_MHz_XTAL).set_disable(); + TMS32010(config, m_dsp[1], 20_MHz_XTAL).set_disable(); +} + +ROM_START(dvp1) + ROM_REGION(0x8000, "program", 0) // Version: SEP 28, 1985 + ROM_LOAD("850803.ic6", 0x0000, 0x8000, CRC(1170db85) SHA1(4ce773dd22c56982b9493f89dce62111eec596b3)) // MBM27256-25 + + ROM_REGION16_LE(0xc00, "dsp1", 0) // 1536 x 16 internal bootloader + ROM_LOAD("tms320m10nl.ic9", 0x000, 0xc00, NO_DUMP) + + ROM_REGION16_LE(0xc00, "dsp2", 0) // 1536 x 16 internal bootloader (almost certainly identical to DSP 1) + ROM_LOAD("tms320m10nl.ic8", 0x000, 0xc00, NO_DUMP) +ROM_END + +SYST(1985, dvp1, 0, 0, dvp1, dvp1, korgdvp1_state, empty_init, "Korg", "DVP-1 Digital Voice Processor", MACHINE_IS_SKELETON) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7685675eb13..bbb2d8cdd68 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -18849,6 +18849,9 @@ korg707 // dss1 // dssmsrk // +@source:korgdvp1.cpp +dvp1 // + @source:korgdw8k.cpp dw8000 // dw8000ex // diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 152498c92f2..6913666b253 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -462,6 +462,7 @@ kim1.cpp konin.cpp korgds8.cpp korgdss1.cpp +korgdvp1.cpp korgdw8k.cpp korgm1.cpp korgz3.cpp From ee733be818c72558a34fde7668e94149da9778f6 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 02:08:47 +1000 Subject: [PATCH 22/69] (nw) instruct: added pwm device --- src/mame/drivers/instruct.cpp | 27 ++++++++++++--------------- src/mame/layout/instruct.lay | 16 ++++++++-------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/mame/drivers/instruct.cpp b/src/mame/drivers/instruct.cpp index cb7d4a0ff2e..9a33c8ede39 100644 --- a/src/mame/drivers/instruct.cpp +++ b/src/mame/drivers/instruct.cpp @@ -48,6 +48,7 @@ #include "imagedev/cassette.h" #include "imagedev/snapquik.h" #include "speaker.h" +#include "video/pwm.h" #include "instruct.lh" @@ -62,7 +63,8 @@ public: , m_p_smiram(*this, "smiram") , m_p_extram(*this, "extram") , m_cass(*this, "cassette") - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) { } void instruct(machine_config &config); @@ -86,10 +88,9 @@ private: void mem_map(address_map &map); virtual void machine_reset() override; - virtual void machine_start() override { m_digits.resolve(); } uint16_t m_lar; uint8_t m_digit; - bool m_valid_digit; + u8 m_seg; bool m_cassin; bool m_irqstate; required_device m_maincpu; @@ -97,7 +98,8 @@ private: required_shared_ptr m_p_smiram; required_shared_ptr m_p_extram; required_device m_cass; - output_finder<129> m_digits; + required_device m_display; + required_ioport_array<6> m_io_keyboard; }; // flag led @@ -131,16 +133,15 @@ WRITE8_MEMBER( instruct_state::portf8_w ) // segment output WRITE8_MEMBER( instruct_state::portf9_w ) { - if (m_valid_digit) - m_digits[m_digit] = data; - m_valid_digit = false; + m_seg = data; + m_display->matrix(m_digit, m_seg); } // digit & keyrow-scan select WRITE8_MEMBER( instruct_state::portfa_w ) { m_digit = data; - m_valid_digit = true; + m_display->matrix(m_digit, m_seg); } // user switches @@ -165,14 +166,8 @@ READ8_MEMBER( instruct_state::portfd_r ) READ8_MEMBER( instruct_state::portfe_r ) { for (uint8_t i = 0; i < 6; i++) - { if (BIT(m_digit, i)) - { - char kbdrow[6]; - sprintf(kbdrow,"X%X",i); - return ioport(kbdrow)->read(); - } - } + return m_io_keyboard[i]->read(); return 0xf; } @@ -432,6 +427,8 @@ void instruct_state::instruct(machine_config &config) /* video hardware */ config.set_default_layout(layout_instruct); + PWM_DISPLAY(config, m_display).set_size(8, 8); + m_display->set_segmask(0xff, 0xff); /* quickload */ QUICKLOAD(config, "quickload", "pgm", attotime::from_seconds(1)).set_load_callback(FUNC(instruct_state::quickload_cb)); diff --git a/src/mame/layout/instruct.lay b/src/mame/layout/instruct.lay index edd7fc21927..0d9d61c56cf 100644 --- a/src/mame/layout/instruct.lay +++ b/src/mame/layout/instruct.lay @@ -32,28 +32,28 @@ copyright-holders:Robbbert - + - + - + - + - + - + - + - + From 3cb753fa557b7807ccabc5c1a42b5e7359388fbc Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 02:20:50 +1000 Subject: [PATCH 23/69] (nw) 68ksbc: save some memory --- src/mame/drivers/68ksbc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/68ksbc.cpp b/src/mame/drivers/68ksbc.cpp index 40d635d8d35..ab7f60956ba 100644 --- a/src/mame/drivers/68ksbc.cpp +++ b/src/mame/drivers/68ksbc.cpp @@ -83,7 +83,7 @@ void c68ksbc_state::c68ksbc(machine_config &config) /* ROM definition */ ROM_START( 68ksbc ) - ROM_REGION(0x1000000, "maincpu", 0) + ROM_REGION(0x3000, "maincpu", 0) ROM_LOAD( "t68k.bin", 0x0000, 0x2f78, CRC(20a8d0d0) SHA1(544fd8bd8ed017115388c8b0f7a7a59a32253e43) ) ROM_END From 91baf82605b595026e9d315606d756daff005765 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 14 May 2020 18:30:59 +0200 Subject: [PATCH 24/69] lots of files: simplified handlers (nw) --- src/devices/bus/cgenie/parallel/parallel.cpp | 8 +- src/devices/bus/cgenie/parallel/parallel.h | 8 +- src/devices/bus/comx35/exp.cpp | 2 +- src/devices/bus/comx35/exp.h | 2 +- src/devices/sound/dac.h | 12 +-- src/devices/sound/mos7360.cpp | 4 +- src/devices/sound/mos7360.h | 4 +- src/mame/audio/cinemat.cpp | 8 +- src/mame/audio/starwars.cpp | 4 +- src/mame/drivers/a2600.cpp | 36 +++---- src/mame/drivers/actfancr.cpp | 4 +- src/mame/drivers/adam.cpp | 12 +-- src/mame/drivers/argo.cpp | 4 +- src/mame/drivers/aristmk4.cpp | 104 +++++++++---------- src/mame/drivers/astrohome.cpp | 5 +- src/mame/drivers/at.cpp | 10 +- src/mame/drivers/atari400.cpp | 14 +-- src/mame/drivers/atarigt.cpp | 2 +- src/mame/drivers/atarist.cpp | 16 +-- src/mame/drivers/atetris.cpp | 6 +- src/mame/drivers/atpci.cpp | 4 +- src/mame/drivers/ave_arb.cpp | 16 +-- src/mame/drivers/battlera.cpp | 8 +- src/mame/drivers/bebox.cpp | 6 +- src/mame/drivers/bfm_sc4.cpp | 8 +- src/mame/drivers/bfm_sc5.cpp | 4 +- src/mame/drivers/big10.cpp | 17 +-- src/mame/drivers/blackt96.cpp | 20 ++-- src/mame/drivers/blktiger.cpp | 4 +- src/mame/drivers/bmcbowl.cpp | 26 ++--- src/mame/drivers/boogwing.cpp | 2 +- src/mame/drivers/btime.cpp | 2 +- src/mame/drivers/bw12.cpp | 4 +- src/mame/drivers/bw2.cpp | 12 +-- src/mame/drivers/c128.cpp | 60 +++++------ src/mame/drivers/c64.cpp | 94 ++++++++--------- src/mame/drivers/c65.cpp | 16 +-- src/mame/drivers/c80.cpp | 6 +- src/mame/drivers/caswin.cpp | 28 ++--- src/mame/drivers/cat.cpp | 4 +- src/mame/drivers/cbm2.cpp | 80 +++++++------- src/mame/drivers/centiped.cpp | 2 +- src/mame/drivers/cfx9850.cpp | 39 +++---- src/mame/drivers/chanbara.cpp | 8 +- src/mame/drivers/chessmate.cpp | 12 +-- src/mame/drivers/cidelsa.cpp | 16 +-- src/mame/drivers/cinemat.cpp | 2 +- src/mame/drivers/cit101.cpp | 24 ++--- src/mame/drivers/clcd.cpp | 8 +- src/mame/drivers/cninja.cpp | 4 +- src/mame/drivers/compgolf.cpp | 6 +- src/mame/drivers/comx35.cpp | 2 +- src/mame/drivers/conic_cchess2.cpp | 20 ++-- src/mame/drivers/cops.cpp | 20 ++-- src/mame/drivers/ct486.cpp | 10 +- src/mame/drivers/cxg_dominator.cpp | 16 +-- src/mame/drivers/cxg_sphinx40.cpp | 28 ++--- src/mame/drivers/cz101.cpp | 9 +- src/mame/drivers/dassault.cpp | 2 +- src/mame/drivers/ddenlovr.cpp | 96 ++++++++--------- src/mame/drivers/dec8.cpp | 14 +-- src/mame/drivers/dectalk.cpp | 8 +- src/mame/drivers/dragrace.cpp | 4 +- src/mame/drivers/dynax.cpp | 22 ++-- src/mame/drivers/eva.cpp | 24 ++--- src/mame/drivers/firefox.cpp | 8 +- src/mame/drivers/foodf.cpp | 2 +- src/mame/drivers/forte2.cpp | 12 ++- src/mame/drivers/ht6000.cpp | 4 +- src/mame/drivers/intellect02.cpp | 12 +-- src/mame/drivers/jack.cpp | 2 +- src/mame/drivers/jtc.cpp | 12 +-- src/mame/drivers/jupace.cpp | 16 +-- src/mame/drivers/kenseim.cpp | 32 +++--- src/mame/drivers/kramermc.cpp | 12 +-- src/mame/drivers/madalien.cpp | 4 +- src/mame/drivers/mappy.cpp | 42 ++++---- src/mame/drivers/mc1000.cpp | 12 +-- src/mame/drivers/metalmx.cpp | 2 +- src/mame/drivers/mpu3.cpp | 66 ++++++------ src/mame/drivers/mpu4vid.cpp | 4 +- src/mame/drivers/nanos.cpp | 12 +-- src/mame/drivers/nightmare.cpp | 4 +- src/mame/drivers/okean240.cpp | 34 +++--- src/mame/drivers/pb1000.cpp | 55 +++------- src/mame/drivers/pcm.cpp | 8 +- src/mame/drivers/pet.cpp | 44 ++++---- src/mame/drivers/pk8000.cpp | 20 ++-- src/mame/drivers/plus4.cpp | 40 +++---- src/mame/drivers/pofo.cpp | 4 +- src/mame/drivers/quantum.cpp | 24 +++-- src/mame/drivers/rainbow.cpp | 8 +- src/mame/drivers/rastersp.cpp | 8 +- src/mame/drivers/royalmah.cpp | 72 ++++++------- src/mame/drivers/runaway.cpp | 2 +- src/mame/drivers/rz1.cpp | 28 ++--- src/mame/drivers/sfkick.cpp | 28 ++--- src/mame/drivers/shootout.cpp | 4 +- src/mame/drivers/sm1800.cpp | 16 +-- src/mame/drivers/super80.cpp | 8 +- src/mame/drivers/sv8000.cpp | 44 ++++---- src/mame/drivers/tamag1.cpp | 4 +- src/mame/drivers/tempest.cpp | 8 +- src/mame/drivers/tigeroad.cpp | 10 +- src/mame/drivers/tourtabl.cpp | 12 +-- src/mame/drivers/tumbleb.cpp | 10 +- src/mame/drivers/tunhunt.cpp | 14 +-- src/mame/drivers/tvboy.cpp | 11 +- src/mame/drivers/unior.cpp | 40 +++---- src/mame/drivers/vcs80.cpp | 4 +- src/mame/drivers/vic20.cpp | 24 ++--- src/mame/drivers/vt240.cpp | 4 +- src/mame/drivers/wrinkles.cpp | 8 +- src/mame/includes/a2600.h | 20 ++-- src/mame/includes/ac1.h | 8 +- src/mame/includes/actfancr.h | 4 +- src/mame/includes/adam.h | 12 +-- src/mame/includes/arcadia.h | 4 +- src/mame/includes/atarigt.h | 2 +- src/mame/includes/atarist.h | 16 +-- src/mame/includes/atetris.h | 6 +- src/mame/includes/b2m.h | 16 +-- src/mame/includes/battlera.h | 8 +- src/mame/includes/bebox.h | 7 +- src/mame/includes/bfm_sc4.h | 8 +- src/mame/includes/bfm_sc5.h | 4 +- src/mame/includes/blktiger.h | 4 +- src/mame/includes/boogwing.h | 2 +- src/mame/includes/btime.h | 2 +- src/mame/includes/bw12.h | 4 +- src/mame/includes/bw2.h | 12 +-- src/mame/includes/c80.h | 6 +- src/mame/includes/centiped.h | 2 +- src/mame/includes/cidelsa.h | 20 ++-- src/mame/includes/cinemat.h | 10 +- src/mame/includes/cninja.h | 4 +- src/mame/includes/compgolf.h | 10 +- src/mame/includes/comx35.h | 2 +- src/mame/includes/concept.h | 8 +- src/mame/includes/dai.h | 4 +- src/mame/includes/dassault.h | 2 +- src/mame/includes/dec0.h | 10 +- src/mame/includes/dec8.h | 14 +-- src/mame/includes/decocass.h | 8 +- src/mame/includes/dgn_beta.h | 24 ++--- src/mame/includes/dragrace.h | 4 +- src/mame/includes/dynax.h | 50 ++++----- src/mame/includes/foodf.h | 2 +- src/mame/includes/harddriv.h | 10 +- src/mame/includes/jack.h | 2 +- src/mame/includes/llc.h | 16 +-- src/mame/includes/lviv.h | 28 ++--- src/mame/includes/madalien.h | 4 +- src/mame/includes/mappy.h | 2 +- src/mame/includes/mbee.h | 50 ++++----- src/mame/includes/metalmx.h | 2 +- src/mame/includes/mikro80.h | 8 +- src/mame/includes/mpu4.h | 38 +++---- src/mame/includes/msx.h | 14 +-- src/mame/includes/pecom.h | 2 +- src/mame/includes/pk8000.h | 6 +- src/mame/includes/runaway.h | 2 +- src/mame/includes/shootout.h | 4 +- src/mame/includes/starwars.h | 4 +- src/mame/includes/super80.h | 8 +- src/mame/includes/tigeroad.h | 9 +- src/mame/includes/tumbleb.h | 10 +- src/mame/includes/tunhunt.h | 16 +-- src/mame/includes/ut88.h | 6 +- src/mame/includes/vcs80.h | 4 +- src/mame/includes/vector06.h | 18 ++-- src/mame/machine/ac1.cpp | 8 +- src/mame/machine/b2m.cpp | 16 +-- src/mame/machine/bebox.cpp | 21 +--- src/mame/machine/concept.cpp | 8 +- src/mame/machine/dai.cpp | 4 +- src/mame/machine/dec0.cpp | 10 +- src/mame/machine/decioga.cpp | 4 +- src/mame/machine/decioga.h | 4 +- src/mame/machine/decocass.cpp | 8 +- src/mame/machine/dgn_beta.cpp | 24 ++--- src/mame/machine/harddriv.cpp | 10 +- src/mame/machine/llc.cpp | 16 +-- src/mame/machine/lviv.cpp | 28 ++--- src/mame/machine/mbee.cpp | 36 +++---- src/mame/machine/mikro80.cpp | 8 +- src/mame/machine/mpu4.cpp | 38 +++---- src/mame/machine/msx.cpp | 14 +-- src/mame/machine/pecom.cpp | 2 +- src/mame/machine/tigeroad.cpp | 6 +- src/mame/machine/ut88.cpp | 6 +- src/mame/machine/vector06.cpp | 18 ++-- src/mame/video/arcadia.cpp | 4 +- src/mame/video/cidelsa.cpp | 4 +- src/mame/video/compgolf.cpp | 4 +- src/mame/video/dynax.cpp | 32 +++--- src/mame/video/mbee.cpp | 22 ++-- src/mame/video/pk8000.cpp | 6 +- src/mame/video/tunhunt.cpp | 2 +- 199 files changed, 1404 insertions(+), 1477 deletions(-) diff --git a/src/devices/bus/cgenie/parallel/parallel.cpp b/src/devices/bus/cgenie/parallel/parallel.cpp index 27a5bba5a3a..2d08f27a1e5 100644 --- a/src/devices/bus/cgenie/parallel/parallel.cpp +++ b/src/devices/bus/cgenie/parallel/parallel.cpp @@ -56,7 +56,7 @@ void cg_parallel_slot_device::device_start() // I/O PORTS //************************************************************************** -READ8_MEMBER( cg_parallel_slot_device::pa_r ) +uint8_t cg_parallel_slot_device::pa_r() { if (m_cart) return m_cart->pa_r(); @@ -64,13 +64,13 @@ READ8_MEMBER( cg_parallel_slot_device::pa_r ) return 0xff; } -WRITE8_MEMBER( cg_parallel_slot_device::pa_w ) +void cg_parallel_slot_device::pa_w(uint8_t data) { if (m_cart) m_cart->pa_w(data); } -READ8_MEMBER( cg_parallel_slot_device::pb_r ) +uint8_t cg_parallel_slot_device::pb_r() { if (m_cart) return m_cart->pb_r(); @@ -78,7 +78,7 @@ READ8_MEMBER( cg_parallel_slot_device::pb_r ) return 0xff; } -WRITE8_MEMBER( cg_parallel_slot_device::pb_w ) +void cg_parallel_slot_device::pb_w(uint8_t data) { if (m_cart) m_cart->pb_w(data); diff --git a/src/devices/bus/cgenie/parallel/parallel.h b/src/devices/bus/cgenie/parallel/parallel.h index cf96a4faaef..74fb8b7a50b 100644 --- a/src/devices/bus/cgenie/parallel/parallel.h +++ b/src/devices/bus/cgenie/parallel/parallel.h @@ -49,12 +49,12 @@ public: virtual ~cg_parallel_slot_device(); // IOA - DECLARE_READ8_MEMBER(pa_r); - DECLARE_WRITE8_MEMBER(pa_w); + uint8_t pa_r(); + void pa_w(uint8_t data); // IOB - DECLARE_READ8_MEMBER(pb_r); - DECLARE_WRITE8_MEMBER(pb_w); + uint8_t pb_r(); + void pb_w(uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/comx35/exp.cpp b/src/devices/bus/comx35/exp.cpp index 6931eecfda0..9c5095e5fd1 100644 --- a/src/devices/bus/comx35/exp.cpp +++ b/src/devices/bus/comx35/exp.cpp @@ -157,7 +157,7 @@ READ_LINE_MEMBER(comx_expansion_slot_device::ef4_r) // sc_w - state code/N0-N2 write //------------------------------------------------- -WRITE8_MEMBER(comx_expansion_slot_device::sc_w) +void comx_expansion_slot_device::sc_w(offs_t offset, uint8_t data) { if (m_card != nullptr) m_card->comx_sc_w(offset, data); diff --git a/src/devices/bus/comx35/exp.h b/src/devices/bus/comx35/exp.h index 75ff26f77ce..8f99edae4fd 100644 --- a/src/devices/bus/comx35/exp.h +++ b/src/devices/bus/comx35/exp.h @@ -73,7 +73,7 @@ public: DECLARE_WRITE_LINE_MEMBER(irq_w) { m_write_irq(state); } - DECLARE_WRITE8_MEMBER(sc_w); + void sc_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(tpb_w); protected: diff --git a/src/devices/sound/dac.h b/src/devices/sound/dac.h index 613886a5c0e..ba0c5bc5915 100644 --- a/src/devices/sound/dac.h +++ b/src/devices/sound/dac.h @@ -27,21 +27,21 @@ class dac_bit_interface { public: virtual DECLARE_WRITE_LINE_MEMBER(write) = 0; - virtual DECLARE_WRITE8_MEMBER(data_w) = 0; + virtual void data_w(uint8_t data) = 0; }; class dac_byte_interface { public: virtual void write(unsigned char data) = 0; - virtual DECLARE_WRITE8_MEMBER(data_w) = 0; + virtual void data_w(uint8_t data) = 0; }; class dac_word_interface { public: virtual void write(unsigned short data) = 0; - virtual DECLARE_WRITE16_MEMBER(data_w) = 0; + virtual void data_w(uint16_t data) = 0; }; template @@ -213,7 +213,7 @@ public: } virtual WRITE_LINE_MEMBER(write) override { this->setCode(state); } - virtual WRITE8_MEMBER(data_w) override { this->setCode(data); } + virtual void data_w(uint8_t data) override { this->setCode(data); } }; template @@ -228,7 +228,7 @@ public: } virtual void write(unsigned char data) override { this->setCode(data); } - virtual DECLARE_WRITE8_MEMBER(data_w) override { this->setCode(data); } + virtual void data_w(uint8_t data) override { this->setCode(data); } }; template @@ -243,7 +243,7 @@ public: } virtual void write(unsigned short data) override { this->setCode(data); } - virtual DECLARE_WRITE16_MEMBER(data_w) override { this->setCode(data); } + virtual void data_w(uint16_t data) override { this->setCode(data); } }; constexpr double dac_gain_r2r = 1.0; diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp index 2c3f6cbd26d..09f0a310b45 100644 --- a/src/devices/sound/mos7360.cpp +++ b/src/devices/sound/mos7360.cpp @@ -818,7 +818,7 @@ void mos7360_device::soundport_w(int offset, int data) // read - register read //------------------------------------------------- -uint8_t mos7360_device::read(address_space &space, offs_t offset, int &cs0, int &cs1) +uint8_t mos7360_device::read(offs_t offset, int &cs0, int &cs1) { uint8_t val = m_last_data; @@ -902,7 +902,7 @@ uint8_t mos7360_device::read(address_space &space, offs_t offset, int &cs0, int // write - register write //------------------------------------------------- -void mos7360_device::write(address_space &space, offs_t offset, uint8_t data, int &cs0, int &cs1) +void mos7360_device::write(offs_t offset, uint8_t data, int &cs0, int &cs1) { int old; diff --git a/src/devices/sound/mos7360.h b/src/devices/sound/mos7360.h index d73f711cd76..93ec30b2277 100644 --- a/src/devices/sound/mos7360.h +++ b/src/devices/sound/mos7360.h @@ -83,8 +83,8 @@ public: virtual space_config_vector memory_space_config() const override; - uint8_t read(address_space &space, offs_t offset, int &cs0, int &cs1); - void write(address_space &space, offs_t offset, uint8_t data, int &cs0, int &cs1); + uint8_t read(offs_t offset, int &cs0, int &cs1); + void write(offs_t offset, uint8_t data, int &cs0, int &cs1); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/audio/cinemat.cpp b/src/mame/audio/cinemat.cpp index e624ab6e8d5..421bb09ca30 100644 --- a/src/mame/audio/cinemat.cpp +++ b/src/mame/audio/cinemat.cpp @@ -1314,20 +1314,20 @@ WRITE_LINE_MEMBER(demon_state::demon_sound4_w) } -READ8_MEMBER(demon_state::sound_porta_r) +uint8_t demon_state::sound_porta_r() { /* bits 0-3 are the sound data; bit 4 is the data ready */ return m_sound_fifo[m_sound_fifo_out] | ((m_sound_fifo_in != m_sound_fifo_out) << 4); } -READ8_MEMBER(demon_state::sound_portb_r) +uint8_t demon_state::sound_portb_r() { return m_last_portb_write; } -WRITE8_MEMBER(demon_state::sound_portb_w) +void demon_state::sound_portb_w(uint8_t data) { /* watch for a 0->1 edge on bit 0 ("shift out") to advance the data pointer */ if ((data & 1) != (m_last_portb_write & 1) && (data & 1) != 0) @@ -1345,7 +1345,7 @@ WRITE8_MEMBER(demon_state::sound_portb_w) m_last_portb_write = data; } -WRITE8_MEMBER(demon_state::sound_output_w) +void demon_state::sound_output_w(uint8_t data) { logerror("sound_output = %02X\n", data); } diff --git a/src/mame/audio/starwars.cpp b/src/mame/audio/starwars.cpp index 2f9074f2f56..4f590f1d45f 100644 --- a/src/mame/audio/starwars.cpp +++ b/src/mame/audio/starwars.cpp @@ -19,7 +19,7 @@ * *************************************/ -READ8_MEMBER(starwars_state::r6532_porta_r) +uint8_t starwars_state::r6532_porta_r() { /* Configured as follows: */ /* d7 (in) Main Ready Flag */ @@ -38,7 +38,7 @@ READ8_MEMBER(starwars_state::r6532_porta_r) } -WRITE8_MEMBER(starwars_state::r6532_porta_w) +void starwars_state::r6532_porta_w(uint8_t data) { /* handle 5220 read */ m_tms->rsq_w((data & 2)>>1); diff --git a/src/mame/drivers/a2600.cpp b/src/mame/drivers/a2600.cpp index 5ba1f18924e..6145048bcc7 100644 --- a/src/mame/drivers/a2600.cpp +++ b/src/mame/drivers/a2600.cpp @@ -115,7 +115,7 @@ WRITE8_MEMBER(a2600_state::cart_over_all_w) /* 0x300 - 0x3ff already masked out */ } -WRITE8_MEMBER(a2600_base_state::switch_A_w) +void a2600_base_state::switch_A_w(uint8_t data) { /* Left controller port */ m_joy1->joy_w( data >> 4 ); @@ -131,7 +131,7 @@ WRITE8_MEMBER(a2600_base_state::switch_A_w) // } } -READ8_MEMBER(a2600_base_state::switch_A_r) +uint8_t a2600_base_state::switch_A_r() { uint8_t val = 0; @@ -144,7 +144,7 @@ READ8_MEMBER(a2600_base_state::switch_A_r) return val; } -WRITE8_MEMBER(a2600_base_state::switch_B_w) +void a2600_base_state::switch_B_w(uint8_t data) { } @@ -152,13 +152,7 @@ WRITE_LINE_MEMBER(a2600_base_state::irq_callback) { } -READ8_MEMBER(a2600_base_state::riot_input_port_8_r) -{ - return m_swb->read(); -} - - -READ16_MEMBER(a2600_base_state::a2600_read_input_port) +uint16_t a2600_base_state::a2600_read_input_port(offs_t offset) { switch (offset) { @@ -192,7 +186,7 @@ READ16_MEMBER(a2600_base_state::a2600_read_input_port) Q-Bert's Qubes (NTSC,F6) at 0x1594 Berzerk at 0xF093. */ -READ8_MEMBER(a2600_base_state::a2600_get_databus_contents) +uint8_t a2600_base_state::a2600_get_databus_contents(offs_t offset) { uint16_t last_address, prev_address; uint8_t last_byte, prev_byte; @@ -230,11 +224,9 @@ static const rectangle visarea[4] = { }; #endif -WRITE16_MEMBER(a2600_base_state::a2600_tia_vsync_callback) +void a2600_base_state::a2600_tia_vsync_callback(uint16_t data) { - int i; - - for ( i = 0; i < ARRAY_LENGTH(supported_screen_heights); i++ ) + for ( int i = 0; i < ARRAY_LENGTH(supported_screen_heights); i++ ) { if ( data >= supported_screen_heights[i] - 3 && data <= supported_screen_heights[i] + 3 ) { @@ -247,11 +239,9 @@ WRITE16_MEMBER(a2600_base_state::a2600_tia_vsync_callback) } } -WRITE16_MEMBER(a2600_base_state::a2600_tia_vsync_callback_pal) +void a2600_base_state::a2600_tia_vsync_callback_pal(uint16_t data) { - int i; - - for ( i = 0; i < ARRAY_LENGTH(supported_screen_heights); i++ ) + for ( int i = 0; i < ARRAY_LENGTH(supported_screen_heights); i++ ) { if ( data >= supported_screen_heights[i] - 3 && data <= supported_screen_heights[i] + 3 ) { @@ -530,14 +520,14 @@ void a2600_state::a2600(machine_config &config) MOS6532_NEW(config, m_riot, MASTER_CLOCK_NTSC / 3); m_riot->pa_rd_callback().set(FUNC(a2600_state::switch_A_r)); m_riot->pa_wr_callback().set(FUNC(a2600_state::switch_A_w)); - m_riot->pb_rd_callback().set(FUNC(a2600_state::riot_input_port_8_r)); + m_riot->pb_rd_callback().set_ioport("SWB"); m_riot->pb_wr_callback().set(FUNC(a2600_state::switch_B_w)); m_riot->irq_wr_callback().set(FUNC(a2600_state::irq_callback)); #else RIOT6532(config, m_riot, MASTER_CLOCK_NTSC / 3); m_riot->in_pa_callback().set(FUNC(a2600_state::switch_A_r)); m_riot->out_pa_callback().set(FUNC(a2600_state::switch_A_w)); - m_riot->in_pb_callback().set(FUNC(a2600_state::riot_input_port_8_r)); + m_riot->in_pb_callback().set_ioport("SWB"); m_riot->out_pb_callback().set(FUNC(a2600_state::switch_B_w)); m_riot->irq_callback().set(FUNC(a2600_state::irq_callback)); #endif @@ -575,14 +565,14 @@ void a2600_state::a2600p(machine_config &config) MOS6532_NEW(config, m_riot, MASTER_CLOCK_PAL / 3); m_riot->pa_rd_callback().set(FUNC(a2600_state::switch_A_r)); m_riot->pa_wr_callback().set(FUNC(a2600_state::switch_A_w)); - m_riot->pb_rd_callback().set(FUNC(a2600_state::riot_input_port_8_r)); + m_riot->pb_rd_callback().set_ioport("SWB"); m_riot->pb_wr_callback().set(FUNC(a2600_state::switch_B_w)); m_riot->irq_wr_callback().set(FUNC(a2600_state::irq_callback)); #else RIOT6532(config, m_riot, MASTER_CLOCK_PAL / 3); m_riot->in_pa_callback().set(FUNC(a2600_state::switch_A_r)); m_riot->out_pa_callback().set(FUNC(a2600_state::switch_A_w)); - m_riot->in_pb_callback().set(FUNC(a2600_state::riot_input_port_8_r)); + m_riot->in_pb_callback().set_ioport("SWB"); m_riot->out_pb_callback().set(FUNC(a2600_state::switch_B_w)); m_riot->irq_callback().set(FUNC(a2600_state::irq_callback)); #endif diff --git a/src/mame/drivers/actfancr.cpp b/src/mame/drivers/actfancr.cpp index 14dc844e182..496d0bbb17a 100644 --- a/src/mame/drivers/actfancr.cpp +++ b/src/mame/drivers/actfancr.cpp @@ -30,12 +30,12 @@ /******************************************************************************/ -WRITE8_MEMBER(actfancr_state::triothep_control_select_w) +void actfancr_state::triothep_control_select_w(uint8_t data) { m_trio_control_select = data; } -READ8_MEMBER(actfancr_state::triothep_control_r) +uint8_t actfancr_state::triothep_control_r() { switch (m_trio_control_select) { diff --git a/src/mame/drivers/adam.cpp b/src/mame/drivers/adam.cpp index ad9e5f8a402..eb4b4e4387b 100644 --- a/src/mame/drivers/adam.cpp +++ b/src/mame/drivers/adam.cpp @@ -701,7 +701,7 @@ WRITE8_MEMBER( adam_state::adamnet_w ) // m6801_p1_w - //------------------------------------------------- -WRITE8_MEMBER( adam_state::m6801_p1_w ) +void adam_state::m6801_p1_w(uint8_t data) { /* @@ -726,7 +726,7 @@ WRITE8_MEMBER( adam_state::m6801_p1_w ) // m6801_p2_r - //------------------------------------------------- -READ8_MEMBER( adam_state::m6801_p2_r ) +uint8_t adam_state::m6801_p2_r() { /* @@ -753,7 +753,7 @@ READ8_MEMBER( adam_state::m6801_p2_r ) // m6801_p2_w - //------------------------------------------------- -WRITE8_MEMBER( adam_state::m6801_p2_w ) +void adam_state::m6801_p2_w(uint8_t data) { /* @@ -782,7 +782,7 @@ WRITE8_MEMBER( adam_state::m6801_p2_w ) // m6801_p3_r - //------------------------------------------------- -READ8_MEMBER( adam_state::m6801_p3_r ) +uint8_t adam_state::m6801_p3_r() { /* @@ -807,7 +807,7 @@ READ8_MEMBER( adam_state::m6801_p3_r ) // m6801_p3_w - //------------------------------------------------- -WRITE8_MEMBER( adam_state::m6801_p3_w ) +void adam_state::m6801_p3_w(uint8_t data) { /* @@ -832,7 +832,7 @@ WRITE8_MEMBER( adam_state::m6801_p3_w ) // m6801_p4_w - //------------------------------------------------- -WRITE8_MEMBER( adam_state::m6801_p4_w ) +void adam_state::m6801_p4_w(uint8_t data) { /* diff --git a/src/mame/drivers/argo.cpp b/src/mame/drivers/argo.cpp index 64da55393f1..162f58d5929 100644 --- a/src/mame/drivers/argo.cpp +++ b/src/mame/drivers/argo.cpp @@ -70,7 +70,7 @@ private: DECLARE_WRITE_LINE_MEMBER(z0_w); DECLARE_WRITE_LINE_MEMBER(hrq_w); void argo_palette(palette_device &palette) const; - DECLARE_READ8_MEMBER(dma_r); + uint8_t dma_r(offs_t offset); I8275_DRAW_CHARACTER_MEMBER(display_pixels); TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); @@ -234,7 +234,7 @@ WRITE_LINE_MEMBER(argo_state::z0_w) // read - incoming 2514Hz } -READ8_MEMBER(argo_state::dma_r) +uint8_t argo_state::dma_r(offs_t offset) { if (offset < 0xf800) return m_maincpu->space(AS_PROGRAM).read_byte(offset); diff --git a/src/mame/drivers/aristmk4.cpp b/src/mame/drivers/aristmk4.cpp index f9faaf5c073..f852ec51479 100644 --- a/src/mame/drivers/aristmk4.cpp +++ b/src/mame/drivers/aristmk4.cpp @@ -418,35 +418,35 @@ private: int m_printer_motor; emu_timer *m_power_timer; - DECLARE_READ8_MEMBER(ldsw); - DECLARE_READ8_MEMBER(cgdrr); - DECLARE_WRITE8_MEMBER(cgdrw); - DECLARE_WRITE8_MEMBER(u3_p0); - DECLARE_READ8_MEMBER(u3_p2); - DECLARE_READ8_MEMBER(u3_p3); - DECLARE_READ8_MEMBER(bv_p0); - DECLARE_READ8_MEMBER(bv_p1); - DECLARE_READ8_MEMBER(mkiv_pia_ina); - DECLARE_WRITE8_MEMBER(mkiv_pia_outa); - DECLARE_WRITE8_MEMBER(mlamps); - DECLARE_READ8_MEMBER(cashcade_r); - DECLARE_WRITE8_MEMBER(mk4_printer_w); - DECLARE_READ8_MEMBER(mk4_printer_r); + uint8_t ldsw(); + uint8_t cgdrr(); + void cgdrw(uint8_t data); + void u3_p0(uint8_t data); + uint8_t u3_p2(); + uint8_t u3_p3(); + uint8_t bv_p0(); + uint8_t bv_p1(); + uint8_t mkiv_pia_ina(); + void mkiv_pia_outa(uint8_t data); + void mlamps(uint8_t data); + uint8_t cashcade_r(); + void mk4_printer_w(uint8_t data); + uint8_t mk4_printer_r(); DECLARE_WRITE_LINE_MEMBER(mkiv_pia_ca2); DECLARE_WRITE_LINE_MEMBER(mkiv_pia_cb2); - DECLARE_WRITE8_MEMBER(mkiv_pia_outb); - DECLARE_READ8_MEMBER(via_a_r); - DECLARE_READ8_MEMBER(via_b_r); - DECLARE_WRITE8_MEMBER(via_a_w); - DECLARE_WRITE8_MEMBER(via_b_w); + void mkiv_pia_outb(uint8_t data); + uint8_t via_a_r(); + uint8_t via_b_r(); + void via_a_w(uint8_t data); + void via_b_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(via_ca2_w); DECLARE_WRITE_LINE_MEMBER(via_cb2_w); - DECLARE_WRITE8_MEMBER(pblp_out); - DECLARE_WRITE8_MEMBER(pbltlp_out); - DECLARE_WRITE8_MEMBER(zn434_w); - DECLARE_READ8_MEMBER(pa1_r); - DECLARE_READ8_MEMBER(pb1_r); - DECLARE_READ8_MEMBER(pc1_r); + void pblp_out(uint8_t data); + void pbltlp_out(uint8_t data); + void zn434_w(uint8_t data); + uint8_t pa1_r(); + uint8_t pb1_r(); + uint8_t pc1_r(); virtual void machine_start() override; virtual void machine_reset() override; @@ -539,7 +539,7 @@ uint32_t aristmk4_state::screen_update_aristmk4(screen_device &screen, bitmap_rg return 0; } -READ8_MEMBER(aristmk4_state::ldsw) +uint8_t aristmk4_state::ldsw() { int U3_p2_ret= ioport("5002")->read(); if(U3_p2_ret & 0x1) @@ -549,7 +549,7 @@ READ8_MEMBER(aristmk4_state::ldsw) return m_cgdrsw = ioport("5005")->read(); } -READ8_MEMBER(aristmk4_state::cgdrr) +uint8_t aristmk4_state::cgdrr() { if(m_cgdrsw) // is the LC closed { @@ -558,12 +558,12 @@ READ8_MEMBER(aristmk4_state::cgdrr) return 0x0; // otherwise the counter outputs are set low. } -WRITE8_MEMBER(aristmk4_state::cgdrw) +void aristmk4_state::cgdrw(uint8_t data) { m_ripple = data; } -WRITE8_MEMBER(aristmk4_state::u3_p0) +void aristmk4_state::u3_p0(uint8_t data) { m_u3_p0_w = data; @@ -575,7 +575,7 @@ WRITE8_MEMBER(aristmk4_state::u3_p0) //logerror("u3_p0_w: %02X\n",m_u3_p0_w); } -READ8_MEMBER(aristmk4_state::u3_p2) +uint8_t aristmk4_state::u3_p2() { int u3_p2_ret= ioport("5002")->read(); int u3_p3_ret= ioport("5003")->read(); @@ -600,7 +600,7 @@ READ8_MEMBER(aristmk4_state::u3_p2) return u3_p2_ret; } -READ8_MEMBER(aristmk4_state::u3_p3) +uint8_t aristmk4_state::u3_p3() { int u3_p3_ret= ioport("5003")->read(); @@ -621,7 +621,7 @@ TIMER_CALLBACK_MEMBER(aristmk4_state::note_input_reset) m_insnote=0; //reset note input after 150msec } -READ8_MEMBER(aristmk4_state::bv_p0) +uint8_t aristmk4_state::bv_p0() { int bv_p0_ret=0x00; @@ -644,7 +644,7 @@ READ8_MEMBER(aristmk4_state::bv_p0) } -READ8_MEMBER(aristmk4_state::bv_p1) +uint8_t aristmk4_state::bv_p1() { int bv_p1_ret=0x00; @@ -676,7 +676,7 @@ PORTB - MECHANICAL METERS ******************************************************************************/ //input a -READ8_MEMBER(aristmk4_state::mkiv_pia_ina) +uint8_t aristmk4_state::mkiv_pia_ina() { /* uncomment this code once RTC is fixed */ @@ -685,7 +685,7 @@ READ8_MEMBER(aristmk4_state::mkiv_pia_ina) } //output a -WRITE8_MEMBER(aristmk4_state::mkiv_pia_outa) +void aristmk4_state::mkiv_pia_outa(uint8_t data) { if(m_rtc_data_strobe) { @@ -714,7 +714,7 @@ WRITE_LINE_MEMBER(aristmk4_state::mkiv_pia_cb2) } //output b -WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb) +void aristmk4_state::mkiv_pia_outb(uint8_t data) { uint8_t emet[5]; int i = 0; @@ -792,7 +792,7 @@ TIMER_CALLBACK_MEMBER(aristmk4_state::hopper_reset) } // Port A read (SW1) -READ8_MEMBER(aristmk4_state::via_a_r) +uint8_t aristmk4_state::via_a_r() { int psg_ret=0; @@ -810,7 +810,7 @@ READ8_MEMBER(aristmk4_state::via_a_r) return psg_ret; } -READ8_MEMBER(aristmk4_state::via_b_r) +uint8_t aristmk4_state::via_b_r() { int ret=ioport("via_port_b")->read(); @@ -861,13 +861,13 @@ READ8_MEMBER(aristmk4_state::via_b_r) return ret; } -WRITE8_MEMBER(aristmk4_state::via_a_w) +void aristmk4_state::via_a_w(uint8_t data) { //logerror("VIA port A write %02X\n",data); m_psg_data = data; } -WRITE8_MEMBER(aristmk4_state::via_b_w) +void aristmk4_state::via_b_w(uint8_t data) { m_ay8910_1 = ( data & 0x0F ) ; //only need first 4 bits per schematics //NOTE: when bit 4 is off, we write to AY1, when bit 4 is on, we write to AY2 @@ -963,7 +963,7 @@ WRITE_LINE_MEMBER(aristmk4_state::via_cb2_w) // Lamp output -WRITE8_MEMBER(aristmk4_state::pblp_out) +void aristmk4_state::pblp_out(uint8_t data) { m_lamps[ 1] = BIT(data, 0); m_lamps[ 5] = BIT(data, 1); @@ -976,7 +976,7 @@ WRITE8_MEMBER(aristmk4_state::pblp_out) //logerror("Lights port A %02X\n",data); } -WRITE8_MEMBER(aristmk4_state::pbltlp_out) +void aristmk4_state::pbltlp_out(uint8_t data) { m_lamps[ 8] = BIT(data, 0); m_lamps[12] = BIT(data, 1); @@ -989,32 +989,32 @@ WRITE8_MEMBER(aristmk4_state::pbltlp_out) //logerror("Lights port B: %02X\n",data); } -WRITE8_MEMBER(aristmk4_state::mlamps) +void aristmk4_state::mlamps(uint8_t data) { /* TAKE WIN AND GAMBLE LAMPS */ m_lamps[18] = BIT(data, 5); m_lamps[13] = BIT(data, 6); } -WRITE8_MEMBER(aristmk4_state::zn434_w) +void aristmk4_state::zn434_w(uint8_t data) { - // Introducted to prevent warning in log for write to AY1 PORT B - // this is a write to the ZN434 DA convertors.. + // Introduced to prevent warning in log for write to AY1 PORT B + // this is a write to the ZN434 DA converters.. } -READ8_MEMBER(aristmk4_state::cashcade_r) +uint8_t aristmk4_state::cashcade_r() { /* work around for cashcade games */ return cashcade_p[(m_cashcade_c++)%15]; } -WRITE8_MEMBER(aristmk4_state::mk4_printer_w) +void aristmk4_state::mk4_printer_w(uint8_t data) { //logerror("Printer: %c %d\n",data,data); } -READ8_MEMBER(aristmk4_state::mk4_printer_r) +uint8_t aristmk4_state::mk4_printer_r() { return 0; } @@ -1685,17 +1685,17 @@ GFXDECODE_END /* read m/c number */ -READ8_MEMBER(aristmk4_state::pa1_r) +uint8_t aristmk4_state::pa1_r() { return (ioport("SW3")->read() << 4) + ioport("SW4")->read(); } -READ8_MEMBER(aristmk4_state::pb1_r) +uint8_t aristmk4_state::pb1_r() { return (ioport("SW5")->read() << 4) + ioport("SW6")->read(); } -READ8_MEMBER(aristmk4_state::pc1_r) +uint8_t aristmk4_state::pc1_r() { return 0; } diff --git a/src/mame/drivers/astrohome.cpp b/src/mame/drivers/astrohome.cpp index dddcea45f54..931510dffdf 100644 --- a/src/mame/drivers/astrohome.cpp +++ b/src/mame/drivers/astrohome.cpp @@ -37,8 +37,9 @@ public: { } void astrocde(machine_config &config); + private: - DECLARE_READ8_MEMBER(inputs_r); + uint8_t inputs_r(offs_t offset); DECLARE_MACHINE_START(astrocde); void astrocade_io(address_map &map); @@ -105,7 +106,7 @@ void astrocde_home_state::astrocade_io(address_map &map) * *************************************/ -READ8_MEMBER(astrocde_home_state::inputs_r) +uint8_t astrocde_home_state::inputs_r(offs_t offset) { if (BIT(offset, 2)) return m_keypad[offset & 3]->read(); diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp index facffe41658..06b8b047e0d 100644 --- a/src/mame/drivers/at.cpp +++ b/src/mame/drivers/at.cpp @@ -241,10 +241,10 @@ private: required_device m_isabus; required_device m_speaker; - DECLARE_READ16_MEMBER( wd7600_ior ); - DECLARE_WRITE16_MEMBER( wd7600_iow ); + uint16_t wd7600_ior(offs_t offset); + void wd7600_iow(offs_t offset, uint16_t data); DECLARE_WRITE_LINE_MEMBER( wd7600_hold ); - DECLARE_WRITE8_MEMBER( wd7600_tc ) { m_isabus->eop_w(offset, data); } + void wd7600_tc(offs_t offset, uint8_t data) { m_isabus->eop_w(offset, data); } DECLARE_WRITE_LINE_MEMBER( wd7600_spkr ) { m_speaker->level_w(state); } void megapc_io(address_map &map); void megapc_map(address_map &map); @@ -383,7 +383,7 @@ void at_vrom_fix_state::init_megapcpla() ROM[0x3ffff] = 0x41; // to correct checksum } -READ16_MEMBER( megapc_state::wd7600_ior ) +uint16_t megapc_state::wd7600_ior(offs_t offset) { if (offset < 4) return m_isabus->dack_r(offset); @@ -391,7 +391,7 @@ READ16_MEMBER( megapc_state::wd7600_ior ) return m_isabus->dack16_r(offset); } -WRITE16_MEMBER( megapc_state::wd7600_iow ) +void megapc_state::wd7600_iow(offs_t offset, uint16_t data) { if (offset < 4) m_isabus->dack_w(offset, data); diff --git a/src/mame/drivers/atari400.cpp b/src/mame/drivers/atari400.cpp index 8330ea22bfc..b87e7ab7a47 100644 --- a/src/mame/drivers/atari400.cpp +++ b/src/mame/drivers/atari400.cpp @@ -285,17 +285,17 @@ private: DECLARE_MACHINE_RESET(a400); - DECLARE_WRITE8_MEMBER(gtia_cb); + void gtia_cb(uint8_t data); - DECLARE_WRITE8_MEMBER(a600xl_pia_pb_w); - DECLARE_WRITE8_MEMBER(a800xl_pia_pb_w); + void a600xl_pia_pb_w(uint8_t data); + void a800xl_pia_pb_w(uint8_t data); DECLARE_READ8_MEMBER(read_d5xx); // at least one cart type can enable/disable roms when reading DECLARE_WRITE8_MEMBER(disable_cart); // these are needed to handle carts which can disable ROM without // installing/disinstalling continuously RAM and ROM (with e.g. big - // preformance hit in Williams carts) + // performance hit in Williams carts) DECLARE_READ8_MEMBER(special_read_8000); DECLARE_WRITE8_MEMBER(special_write_8000); DECLARE_READ8_MEMBER(special_read_a000); @@ -2078,7 +2078,7 @@ MACHINE_START_MEMBER( a400_state, a5200 ) * **************************************************************/ -WRITE8_MEMBER(a400_state::gtia_cb) +void a400_state::gtia_cb(uint8_t data) { m_dac->write(BIT(data, 3)); } @@ -2089,12 +2089,12 @@ WRITE8_MEMBER(a400_state::gtia_cb) * **************************************************************/ -WRITE8_MEMBER(a400_state::a600xl_pia_pb_w) +void a400_state::a600xl_pia_pb_w(uint8_t data) { m_mmu = data; } -WRITE8_MEMBER(a400_state::a800xl_pia_pb_w) +void a400_state::a800xl_pia_pb_w(uint8_t data) { if (m_pia->port_b_z_mask() != 0xff) { diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index 91d4f8a0ce7..e17cbfc0c1e 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -126,7 +126,7 @@ void atarigt_state::machine_start() * *************************************/ -WRITE8_MEMBER(atarigt_state::cage_irq_callback) +void atarigt_state::cage_irq_callback(uint8_t data) { m_maincpu->set_input_line(M68K_IRQ_3, data != 0 ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp index 84330de60d4..5d31a1442ab 100644 --- a/src/mame/drivers/atarist.cpp +++ b/src/mame/drivers/atarist.cpp @@ -521,7 +521,7 @@ void st_state::mouse_tick() // ikbd_port1_r - //------------------------------------------------- -READ8_MEMBER( st_state::ikbd_port1_r ) +uint8_t st_state::ikbd_port1_r() { /* @@ -565,7 +565,7 @@ READ8_MEMBER( st_state::ikbd_port1_r ) // ikbd_port2_r - //------------------------------------------------- -READ8_MEMBER( st_state::ikbd_port2_r ) +uint8_t st_state::ikbd_port2_r() { /* @@ -592,7 +592,7 @@ READ8_MEMBER( st_state::ikbd_port2_r ) // ikbd_port2_w - //------------------------------------------------- -WRITE8_MEMBER( st_state::ikbd_port2_w ) +void st_state::ikbd_port2_w(uint8_t data) { /* @@ -618,7 +618,7 @@ WRITE8_MEMBER( st_state::ikbd_port2_w ) // ikbd_port3_w - //------------------------------------------------- -WRITE8_MEMBER( st_state::ikbd_port3_w ) +void st_state::ikbd_port3_w(uint8_t data) { /* @@ -647,7 +647,7 @@ WRITE8_MEMBER( st_state::ikbd_port3_w ) // ikbd_port4_r - //------------------------------------------------- -READ8_MEMBER( st_state::ikbd_port4_r ) +uint8_t st_state::ikbd_port4_r() { /* @@ -681,7 +681,7 @@ READ8_MEMBER( st_state::ikbd_port4_r ) // ikbd_port4_w - //------------------------------------------------- -WRITE8_MEMBER( st_state::ikbd_port4_w ) +void st_state::ikbd_port4_w(uint8_t data) { /* @@ -1698,7 +1698,7 @@ INPUT_PORTS_END // ay8910_interface psg_intf //------------------------------------------------- -WRITE8_MEMBER( st_state::psg_pa_w ) +void st_state::psg_pa_w(uint8_t data) { /* @@ -1742,7 +1742,7 @@ WRITE8_MEMBER( st_state::psg_pa_w ) // ay8910_interface stbook_psg_intf //------------------------------------------------- -WRITE8_MEMBER( stbook_state::psg_pa_w ) +void stbook_state::psg_pa_w(uint8_t data) { /* diff --git a/src/mame/drivers/atetris.cpp b/src/mame/drivers/atetris.cpp index 65ead905379..42a3ead991f 100644 --- a/src/mame/drivers/atetris.cpp +++ b/src/mame/drivers/atetris.cpp @@ -237,7 +237,7 @@ void atetris_mcu_state::atetrisb3_map(address_map &map) * *************************************/ -READ8_MEMBER(atetris_mcu_state::mcu_bus_r) +uint8_t atetris_mcu_state::mcu_bus_r() { switch (m_mcu->p2_r() & 0xf0) { @@ -252,13 +252,13 @@ READ8_MEMBER(atetris_mcu_state::mcu_bus_r) } } -WRITE8_MEMBER(atetris_mcu_state::mcu_p2_w) +void atetris_mcu_state::mcu_p2_w(uint8_t data) { if ((data & 0xc0) == 0x80) m_sn[(data >> 4) & 3]->write(m_mcu->p1_r()); } -WRITE8_MEMBER(atetris_mcu_state::mcu_reg_w) +void atetris_mcu_state::mcu_reg_w(offs_t offset, uint8_t data) { // FIXME: a lot of sound writes seem to get lost this way; why doesn't that hurt? m_soundlatch[0]->write(offset | 0x20); diff --git a/src/mame/drivers/atpci.cpp b/src/mame/drivers/atpci.cpp index e7c4c3e46d0..38811b20388 100644 --- a/src/mame/drivers/atpci.cpp +++ b/src/mame/drivers/atpci.cpp @@ -27,7 +27,7 @@ public: protected: void at_softlists(machine_config &config); - DECLARE_WRITE8_MEMBER(boot_state_w); + void boot_state_w(uint8_t data); void tx_config(device_t *device); void sb_config(device_t *device); @@ -40,7 +40,7 @@ private: required_device m_maincpu; }; -WRITE8_MEMBER(at586_state::boot_state_w) +void at586_state::boot_state_w(uint8_t data) { logerror("Boot state %02x\n", data); printf("[%02X]",data); diff --git a/src/mame/drivers/ave_arb.cpp b/src/mame/drivers/ave_arb.cpp index 47349ee1fdf..0f376257b99 100644 --- a/src/mame/drivers/ave_arb.cpp +++ b/src/mame/drivers/ave_arb.cpp @@ -100,14 +100,14 @@ private: // cartridge DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - DECLARE_READ8_MEMBER(cartridge_r); + u8 cartridge_r(offs_t offset); u32 m_cart_mask; // I/O handlers void update_display(); - DECLARE_WRITE8_MEMBER(leds_w); - DECLARE_WRITE8_MEMBER(control_w); - DECLARE_READ8_MEMBER(input_r); + void leds_w(u8 data); + void control_w(u8 data); + u8 input_r(); u16 m_inp_mux; u16 m_led_select; @@ -156,7 +156,7 @@ DEVICE_IMAGE_LOAD_MEMBER(arb_state::cart_load) return image_init_result::PASS; } -READ8_MEMBER(arb_state::cartridge_r) +u8 arb_state::cartridge_r(offs_t offset) { return m_cart->read_rom(offset & m_cart_mask); } @@ -175,14 +175,14 @@ void arb_state::update_display() m_display->matrix(m_led_select | 0x200, m_led_data); } -WRITE8_MEMBER(arb_state::leds_w) +void arb_state::leds_w(u8 data) { // PA0-PA7: led latch input m_led_latch = ~data & 0xff; update_display(); } -WRITE8_MEMBER(arb_state::control_w) +void arb_state::control_w(u8 data) { // PB0-PB3: 74145 A-D // 74145 0-8: input mux, led row select @@ -197,7 +197,7 @@ WRITE8_MEMBER(arb_state::control_w) m_dac->write(BIT(data, 7)); } -READ8_MEMBER(arb_state::input_r) +u8 arb_state::input_r() { u8 data = 0; diff --git a/src/mame/drivers/battlera.cpp b/src/mame/drivers/battlera.cpp index 5f4defc2fc1..c7402d1ed4d 100644 --- a/src/mame/drivers/battlera.cpp +++ b/src/mame/drivers/battlera.cpp @@ -113,12 +113,12 @@ void battlera_state::machine_reset() /******************************************************************************/ -WRITE8_MEMBER(battlera_state::control_data_w) +void battlera_state::control_data_w(uint8_t data) { m_control_port_select=data; } -READ8_MEMBER(battlera_state::control_data_r) +uint8_t battlera_state::control_data_r() { switch (m_control_port_select) { @@ -162,12 +162,12 @@ WRITE_LINE_MEMBER(battlera_state::adpcm_int) m_audiocpu->set_input_line(1, HOLD_LINE); } -WRITE8_MEMBER(battlera_state::adpcm_data_w) +void battlera_state::adpcm_data_w(uint8_t data) { m_msm5205next = data; } -WRITE8_MEMBER(battlera_state::adpcm_reset_w) +void battlera_state::adpcm_reset_w(uint8_t data) { m_msm->reset_w(0); } diff --git a/src/mame/drivers/bebox.cpp b/src/mame/drivers/bebox.cpp index ebe7675ec85..24c93e75ef5 100644 --- a/src/mame/drivers/bebox.cpp +++ b/src/mame/drivers/bebox.cpp @@ -166,8 +166,8 @@ void bebox_state::bebox_peripherals(machine_config &config) m_dma8237[0]->out_eop_callback().set(FUNC(bebox_state::bebox_dma8237_out_eop)); m_dma8237[0]->in_memr_callback().set(FUNC(bebox_state::bebox_dma_read_byte)); m_dma8237[0]->out_memw_callback().set(FUNC(bebox_state::bebox_dma_write_byte)); - m_dma8237[0]->in_ior_callback<2>().set(FUNC(bebox_state::bebox_dma8237_fdc_dack_r)); - m_dma8237[0]->out_iow_callback<2>().set(FUNC(bebox_state::bebox_dma8237_fdc_dack_w)); + m_dma8237[0]->in_ior_callback<2>().set(m_smc37c78, FUNC(smc37c78_device::dma_r)); + m_dma8237[0]->out_iow_callback<2>().set(m_smc37c78, FUNC(smc37c78_device::dma_w)); m_dma8237[0]->out_dack_callback<0>().set(FUNC(bebox_state::pc_dack0_w)); m_dma8237[0]->out_dack_callback<1>().set(FUNC(bebox_state::pc_dack1_w)); m_dma8237[0]->out_dack_callback<2>().set(FUNC(bebox_state::pc_dack2_w)); @@ -178,7 +178,7 @@ void bebox_state::bebox_peripherals(machine_config &config) PIC8259(config, m_pic8259[0], 0); m_pic8259[0]->out_int_callback().set(FUNC(bebox_state::bebox_pic8259_master_set_int_line)); m_pic8259[0]->in_sp_callback().set_constant(1); - m_pic8259[0]->read_slave_ack_callback().set(FUNC(bebox_state::get_slave_ack)); + m_pic8259[0]->read_slave_ack_callback().set(m_pic8259[1], FUNC(pic8259_device::acknowledge)); PIC8259(config, m_pic8259[1], 0); m_pic8259[1]->out_int_callback().set(FUNC(bebox_state::bebox_pic8259_slave_set_int_line)); diff --git a/src/mame/drivers/bfm_sc4.cpp b/src/mame/drivers/bfm_sc4.cpp index 89a8fc15435..fc346f97d84 100644 --- a/src/mame/drivers/bfm_sc4.cpp +++ b/src/mame/drivers/bfm_sc4.cpp @@ -846,13 +846,13 @@ WRITE_LINE_MEMBER(sc4_state::bfm_sc4_duart_txa) -READ8_MEMBER(sc4_state::bfm_sc4_duart_input_r) +uint8_t sc4_state::bfm_sc4_duart_input_r() { // printf("bfm_sc4_duart_input_r\n"); return m_optic_pattern; } -WRITE8_MEMBER(sc4_state::bfm_sc4_duart_output_w) +void sc4_state::bfm_sc4_duart_output_w(uint8_t data) { // logerror("bfm_sc4_duart_output_w\n"); m_reel56_latch = data; @@ -876,13 +876,13 @@ WRITE_LINE_MEMBER(sc4_state::m68307_duart_txa) logerror("m68307_duart_tx %02x\n", state); } -READ8_MEMBER(sc4_state::m68307_duart_input_r) +uint8_t sc4_state::m68307_duart_input_r() { logerror("m68307_duart_input_r\n"); return 0x00; } -WRITE8_MEMBER(sc4_state::m68307_duart_output_w) +void sc4_state::m68307_duart_output_w(uint8_t data) { logerror("m68307_duart_output_w %02x\n", data); } diff --git a/src/mame/drivers/bfm_sc5.cpp b/src/mame/drivers/bfm_sc5.cpp index 2a91c2bc2e6..b4b64fba746 100644 --- a/src/mame/drivers/bfm_sc5.cpp +++ b/src/mame/drivers/bfm_sc5.cpp @@ -323,13 +323,13 @@ WRITE_LINE_MEMBER(bfm_sc5_state::bfm_sc5_duart_txa) logerror("bfm_sc5_duart_tx\n"); } -READ8_MEMBER(bfm_sc5_state::bfm_sc5_duart_input_r) +uint8_t bfm_sc5_state::bfm_sc5_duart_input_r() { logerror("bfm_sc5_duart_input_r\n"); return 0xff; } -WRITE8_MEMBER(bfm_sc5_state::bfm_sc5_duart_output_w) +void bfm_sc5_state::bfm_sc5_duart_output_w(uint8_t data) { logerror("bfm_sc5_duart_output_w\n"); } diff --git a/src/mame/drivers/big10.cpp b/src/mame/drivers/big10.cpp index 25f46b8bae7..5a1a602c000 100644 --- a/src/mame/drivers/big10.cpp +++ b/src/mame/drivers/big10.cpp @@ -78,12 +78,7 @@ public: void big10(machine_config &config); protected: - virtual void machine_start() override { m_lamp.resolve(); } - void main_io(address_map &map); - void main_map(address_map &map); - - DECLARE_READ8_MEMBER(mux_r); - DECLARE_WRITE8_MEMBER(mux_w); + virtual void machine_start() override { save_item(NAME(m_mux_data)); m_lamp.resolve(); } private: uint8_t m_mux_data; @@ -91,6 +86,12 @@ private: required_device m_hopper; required_ioport_array<6> m_in; output_finder<> m_lamp; + + void main_io(address_map &map); + void main_map(address_map &map); + + uint8_t mux_r(); + void mux_w(uint8_t data); }; @@ -103,14 +104,14 @@ private: ****************************************/ -WRITE8_MEMBER(big10_state::mux_w) +void big10_state::mux_w(uint8_t data) { m_mux_data = ~data; m_hopper->motor_w(BIT(data, 6)); m_lamp = BIT(~data, 7); // maybe a coin counter? } -READ8_MEMBER(big10_state::mux_r) +uint8_t big10_state::mux_r() { uint8_t result = 0xff; for (int b = 0; b < 6; b++) diff --git a/src/mame/drivers/blackt96.cpp b/src/mame/drivers/blackt96.cpp index 8107526fe62..900be856020 100644 --- a/src/mame/drivers/blackt96.cpp +++ b/src/mame/drivers/blackt96.cpp @@ -108,11 +108,11 @@ public: DECLARE_WRITE8_MEMBER(sound_cmd_w); DECLARE_WRITE16_MEMBER(tx_vram_w); - DECLARE_WRITE8_MEMBER(blackt96_soundio_port_a_w); - DECLARE_READ8_MEMBER(blackt96_soundio_port_b_r); - DECLARE_WRITE8_MEMBER(blackt96_soundio_port_b_w); - DECLARE_READ8_MEMBER(blackt96_soundio_port_c_r); - DECLARE_WRITE8_MEMBER(blackt96_soundio_port_c_w); + void blackt96_soundio_port_a_w(uint8_t data); + uint8_t blackt96_soundio_port_b_r(); + void blackt96_soundio_port_b_w(uint8_t data); + uint8_t blackt96_soundio_port_c_r(); + void blackt96_soundio_port_c_w(uint8_t data); DECLARE_READ16_MEMBER( random_r ) // todo, get rid of this once we work out where reads are from { @@ -393,33 +393,33 @@ static GFXDECODE_START( gfx_blackt96 ) GFXDECODE_END -WRITE8_MEMBER(blackt96_state::blackt96_soundio_port_a_w) +void blackt96_state::blackt96_soundio_port_a_w(uint8_t data) { // soundbank logerror("%s: blackt96_soundio_port_a_w (set soundbank %02x)\n", machine().describe_context().c_str(), data); m_oki1bank->set_entry(data & 0x07); } -READ8_MEMBER(blackt96_state::blackt96_soundio_port_b_r) +uint8_t blackt96_state::blackt96_soundio_port_b_r() { //logerror("%s: blackt96_soundio_port_b_r (data read is %02x)\n", machine().describe_context().c_str(), m_port_b_latch); return m_port_b_latch; } -WRITE8_MEMBER(blackt96_state::blackt96_soundio_port_b_w) +void blackt96_state::blackt96_soundio_port_b_w(uint8_t data) { m_port_b_latch = data; //logerror("%s: blackt96_soundio_port_b_w (set latch to %02x)\n", machine().describe_context().c_str(), m_port_b_latch); } -READ8_MEMBER(blackt96_state::blackt96_soundio_port_c_r) +uint8_t blackt96_state::blackt96_soundio_port_c_r() { // bit 0x40 = sound command ready? if (m_soundcmd_ready) return 0x40; return 0x00; } -WRITE8_MEMBER(blackt96_state::blackt96_soundio_port_c_w) +void blackt96_state::blackt96_soundio_port_c_w(uint8_t data) { // logerror("%s: blackt96_soundio_port_c_w (PREV DATA %02x CURR DATA %02x)\n", machine().describe_context().c_str(), m_port_c_data, data); // data & 0x80 unuused? diff --git a/src/mame/drivers/blktiger.cpp b/src/mame/drivers/blktiger.cpp index d5cc4cc9d31..d986e70e341 100644 --- a/src/mame/drivers/blktiger.cpp +++ b/src/mame/drivers/blktiger.cpp @@ -43,14 +43,14 @@ WRITE8_MEMBER(blktiger_state::blktiger_to_mcu_w) m_z80_latch = data; } -READ8_MEMBER(blktiger_state::blktiger_from_main_r) +uint8_t blktiger_state::blktiger_from_main_r() { m_mcu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE); //printf("%02x read\n",latch); return m_z80_latch; } -WRITE8_MEMBER(blktiger_state::blktiger_to_main_w) +void blktiger_state::blktiger_to_main_w(uint8_t data) { //printf("%02x write\n",data); m_i8751_latch = data; diff --git a/src/mame/drivers/bmcbowl.cpp b/src/mame/drivers/bmcbowl.cpp index 45125c983e8..d0e0ebd6aec 100644 --- a/src/mame/drivers/bmcbowl.cpp +++ b/src/mame/drivers/bmcbowl.cpp @@ -138,12 +138,11 @@ private: uint8_t random_read(); DECLARE_READ16_MEMBER(protection_r); DECLARE_WRITE16_MEMBER(scroll_w); - DECLARE_READ8_MEMBER(via_b_in); - DECLARE_WRITE8_MEMBER(via_a_out); - DECLARE_WRITE8_MEMBER(via_b_out); + void via_a_out(uint8_t data); + void via_b_out(uint8_t data); DECLARE_WRITE_LINE_MEMBER(via_ca2_out); - DECLARE_READ8_MEMBER(dips1_r); - DECLARE_WRITE8_MEMBER(input_mux_w); + uint8_t dips1_r(); + void input_mux_w(uint8_t data); void int_ack_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void init_stats(const uint8_t *table, int table_len, int address); @@ -236,19 +235,12 @@ WRITE16_MEMBER(bmcbowl_state::scroll_w) //TODO - scroll } - -READ8_MEMBER(bmcbowl_state::via_b_in) -{ - return ioport("IN3")->read(); -} - - -WRITE8_MEMBER(bmcbowl_state::via_a_out) +void bmcbowl_state::via_a_out(uint8_t data) { // related to video hw ? BG scroll ? } -WRITE8_MEMBER(bmcbowl_state::via_b_out) +void bmcbowl_state::via_b_out(uint8_t data) { //used } @@ -446,7 +438,7 @@ static INPUT_PORTS_START( bmcbowl ) INPUT_PORTS_END -READ8_MEMBER(bmcbowl_state::dips1_r) +uint8_t bmcbowl_state::dips1_r() { switch(m_selected_input) { @@ -458,7 +450,7 @@ READ8_MEMBER(bmcbowl_state::dips1_r) } -WRITE8_MEMBER(bmcbowl_state::input_mux_w) +void bmcbowl_state::input_mux_w(uint8_t data) { m_selected_input = data; } @@ -507,7 +499,7 @@ void bmcbowl_state::bmcbowl(machine_config &config) /* via */ via6522_device &via(VIA6522(config, "via6522_0", XTAL(3'579'545) / 4)); // clock not verified (controls music tempo) - via.readpb_handler().set(FUNC(bmcbowl_state::via_b_in)); + via.readpb_handler().set_ioport("IN3"); via.writepa_handler().set(FUNC(bmcbowl_state::via_a_out)); via.writepb_handler().set(FUNC(bmcbowl_state::via_b_out)); via.ca2_handler().set(FUNC(bmcbowl_state::via_ca2_out)); diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp index 5eea1b374c1..687957c58e5 100644 --- a/src/mame/drivers/boogwing.cpp +++ b/src/mame/drivers/boogwing.cpp @@ -301,7 +301,7 @@ void boogwing_state::machine_reset() m_priority = 0; } -WRITE8_MEMBER(boogwing_state::sound_bankswitch_w) +void boogwing_state::sound_bankswitch_w(uint8_t data) { m_oki[1]->set_rom_bank((data & 2) >> 1); m_oki[0]->set_rom_bank(data & 1); diff --git a/src/mame/drivers/btime.cpp b/src/mame/drivers/btime.cpp index f4e059b90b5..ceda47a9c61 100644 --- a/src/mame/drivers/btime.cpp +++ b/src/mame/drivers/btime.cpp @@ -176,7 +176,7 @@ WRITE8_MEMBER(btime_state::audio_nmi_enable_w) m_audionmi->in_w<0>(BIT(data, 0)); } -WRITE8_MEMBER(btime_state::ay_audio_nmi_enable_w) +void btime_state::ay_audio_nmi_enable_w(uint8_t data) { /* port A bit 0, when 1, inhibits the NMI */ if (m_audio_nmi_enable_type == AUDIO_ENABLE_AY8910) diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp index 7bcc6580078..93337ce0e5b 100644 --- a/src/mame/drivers/bw12.cpp +++ b/src/mame/drivers/bw12.cpp @@ -124,7 +124,7 @@ WRITE_LINE_MEMBER(bw12_state::motor1_w) floppy_motor_on_off(); } -READ8_MEMBER( bw12_state::ls259_r ) +uint8_t bw12_state::ls259_r(offs_t offset) { if (!machine().side_effects_disabled()) m_latch->write_bit(offset >> 1, BIT(offset, 0)); @@ -346,7 +346,7 @@ WRITE_LINE_MEMBER( bw12_state::write_centronics_perror ) m_centronics_perror = state; } -READ8_MEMBER( bw12_state::pia_pa_r ) +uint8_t bw12_state::pia_pa_r() { /* diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp index c573744b49a..a6db1e20bb0 100644 --- a/src/mame/drivers/bw2.cpp +++ b/src/mame/drivers/bw2.cpp @@ -59,7 +59,7 @@ enum // read - //------------------------------------------------- -READ8_MEMBER( bw2_state::read ) +uint8_t bw2_state::read(offs_t offset) { int rom = 1, vram = 1, ram1 = 1, ram2 = 1, ram3 = 1, ram4 = 1, ram5 = 1, ram6 = 1; @@ -116,7 +116,7 @@ READ8_MEMBER( bw2_state::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( bw2_state::write ) +void bw2_state::write(offs_t offset, uint8_t data) { int vram = 1, ram1 = 1, ram2 = 1, ram3 = 1, ram4 = 1, ram5 = 1, ram6 = 1; @@ -370,7 +370,7 @@ WRITE_LINE_MEMBER( bw2_state::write_centronics_busy ) // I8255A interface //------------------------------------------------- -WRITE8_MEMBER( bw2_state::ppi_pa_w ) +void bw2_state::ppi_pa_w(uint8_t data) { /* @@ -400,7 +400,7 @@ WRITE8_MEMBER( bw2_state::ppi_pa_w ) m_centronics->write_strobe(BIT(data, 7)); } -READ8_MEMBER( bw2_state::ppi_pb_r ) +uint8_t bw2_state::ppi_pb_r() { /* @@ -425,7 +425,7 @@ READ8_MEMBER( bw2_state::ppi_pb_r ) return data; } -WRITE8_MEMBER( bw2_state::ppi_pc_w ) +void bw2_state::ppi_pc_w(uint8_t data) { /* @@ -439,7 +439,7 @@ WRITE8_MEMBER( bw2_state::ppi_pc_w ) m_bank = data & 0x07; } -READ8_MEMBER( bw2_state::ppi_pc_r ) +uint8_t bw2_state::ppi_pc_r() { /* diff --git a/src/mame/drivers/c128.cpp b/src/mame/drivers/c128.cpp index aa92864ba67..4b187ace728 100644 --- a/src/mame/drivers/c128.cpp +++ b/src/mame/drivers/c128.cpp @@ -144,29 +144,29 @@ public: DECLARE_READ_LINE_MEMBER( mmu_exrom_r ); DECLARE_READ_LINE_MEMBER( mmu_sense40_r ); - DECLARE_WRITE8_MEMBER( vic_k_w ); + void vic_k_w(uint8_t data); - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); + uint8_t sid_potx_r(); + uint8_t sid_poty_r(); DECLARE_WRITE_LINE_MEMBER( cia1_cnt_w ); DECLARE_WRITE_LINE_MEMBER( cia1_sp_w ); - DECLARE_READ8_MEMBER( cia1_pa_r ); - DECLARE_WRITE8_MEMBER( cia1_pa_w ); - DECLARE_READ8_MEMBER( cia1_pb_r ); - DECLARE_WRITE8_MEMBER( cia1_pb_w ); + uint8_t cia1_pa_r(); + void cia1_pa_w(uint8_t data); + uint8_t cia1_pb_r(); + void cia1_pb_w(uint8_t data); - DECLARE_READ8_MEMBER( cia2_pa_r ); - DECLARE_WRITE8_MEMBER( cia2_pa_w ); + uint8_t cia2_pa_r(); + void cia2_pa_w(uint8_t data); - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); + uint8_t cpu_r(); + void cpu_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( iec_srq_w ); DECLARE_WRITE_LINE_MEMBER( iec_data_w ); - DECLARE_READ8_MEMBER( exp_dma_cd_r ); - DECLARE_WRITE8_MEMBER( exp_dma_cd_w ); + uint8_t exp_dma_cd_r(offs_t offset); + void exp_dma_cd_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER( exp_dma_w ); DECLARE_WRITE_LINE_MEMBER( exp_reset_w ); @@ -175,8 +175,8 @@ public: DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_c128); - DECLARE_READ8_MEMBER( cia2_pb_r ); - DECLARE_WRITE8_MEMBER( cia2_pb_w ); + uint8_t cia2_pb_r(); + void cia2_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_user_pa2 ) { m_user_pa2 = state; } DECLARE_WRITE_LINE_MEMBER( write_user_pb0 ) { if (state) m_user_pb |= 1; else m_user_pb &= ~1; } @@ -1091,7 +1091,7 @@ GFXDECODE_END // MOS8564_INTERFACE( vic_intf ) //------------------------------------------------- -WRITE8_MEMBER( c128_state::vic_k_w ) +void c128_state::vic_k_w(uint8_t data) { m_vic_k = data; } @@ -1101,7 +1101,7 @@ WRITE8_MEMBER( c128_state::vic_k_w ) // MOS6581_INTERFACE( sid_intf ) //------------------------------------------------- -READ8_MEMBER( c128_state::sid_potx_r ) +uint8_t c128_state::sid_potx_r() { uint8_t data = 0xff; @@ -1128,7 +1128,7 @@ READ8_MEMBER( c128_state::sid_potx_r ) return data; } -READ8_MEMBER( c128_state::sid_poty_r ) +uint8_t c128_state::sid_poty_r() { uint8_t data = 0xff; @@ -1160,7 +1160,7 @@ READ8_MEMBER( c128_state::sid_poty_r ) // MOS6526_INTERFACE( cia1_intf ) //------------------------------------------------- -READ8_MEMBER( c128_state::cia1_pa_r ) +uint8_t c128_state::cia1_pa_r() { /* @@ -1208,7 +1208,7 @@ READ8_MEMBER( c128_state::cia1_pa_r ) return data; } -WRITE8_MEMBER( c128_state::cia1_pa_w ) +void c128_state::cia1_pa_w(uint8_t data) { /* @@ -1228,7 +1228,7 @@ WRITE8_MEMBER( c128_state::cia1_pa_w ) m_joy2->joy_w(data & 0x1f); } -READ8_MEMBER( c128_state::cia1_pb_r ) +uint8_t c128_state::cia1_pb_r() { /* @@ -1272,7 +1272,7 @@ READ8_MEMBER( c128_state::cia1_pb_r ) return data; } -WRITE8_MEMBER( c128_state::cia1_pb_w ) +void c128_state::cia1_pb_w(uint8_t data) { /* @@ -1315,7 +1315,7 @@ WRITE_LINE_MEMBER( c128_state::cia1_sp_w ) // MOS6526_INTERFACE( cia2_intf ) //------------------------------------------------- -READ8_MEMBER( c128_state::cia2_pa_r ) +uint8_t c128_state::cia2_pa_r() { /* @@ -1344,7 +1344,7 @@ READ8_MEMBER( c128_state::cia2_pa_r ) return data; } -WRITE8_MEMBER( c128_state::cia2_pa_w ) +void c128_state::cia2_pa_w(uint8_t data) { /* @@ -1376,12 +1376,12 @@ WRITE8_MEMBER( c128_state::cia2_pa_w ) update_iec(); } -READ8_MEMBER( c128_state::cia2_pb_r ) +uint8_t c128_state::cia2_pb_r() { return m_user_pb; } -WRITE8_MEMBER( c128_state::cia2_pb_w ) +void c128_state::cia2_pb_w(uint8_t data) { m_user->write_c((data>>0)&1); m_user->write_d((data>>1)&1); @@ -1397,7 +1397,7 @@ WRITE8_MEMBER( c128_state::cia2_pb_w ) // M6510_INTERFACE( cpu_intf ) //------------------------------------------------- -READ8_MEMBER( c128_state::cpu_r) +uint8_t c128_state::cpu_r() { /* @@ -1424,7 +1424,7 @@ READ8_MEMBER( c128_state::cpu_r) return data; } -WRITE8_MEMBER( c128_state::cpu_w ) +void c128_state::cpu_w(uint8_t data) { /* @@ -1501,7 +1501,7 @@ WRITE_LINE_MEMBER( c128_state::iec_data_w ) // C64_EXPANSION_INTERFACE( expansion_intf ) //------------------------------------------------- -READ8_MEMBER( c128_state::exp_dma_cd_r ) +uint8_t c128_state::exp_dma_cd_r(offs_t offset) { int ba = 0, aec = 1, z80io = 1; offs_t vma = 0; @@ -1509,7 +1509,7 @@ READ8_MEMBER( c128_state::exp_dma_cd_r ) return read_memory(offset, vma, ba, aec, z80io); } -WRITE8_MEMBER( c128_state::exp_dma_cd_w ) +void c128_state::exp_dma_cd_w(offs_t offset, uint8_t data) { int ba = 0, aec = 1, z80io = 1; offs_t vma = 0; diff --git a/src/mame/drivers/c64.cpp b/src/mame/drivers/c64.cpp index 7847994757c..3753fdf91f0 100644 --- a/src/mame/drivers/c64.cpp +++ b/src/mame/drivers/c64.cpp @@ -102,28 +102,28 @@ public: void check_interrupts(); int read_pla(offs_t offset, offs_t va, int rw, int aec, int ba); - uint8_t read_memory(address_space &space, offs_t offset, offs_t va, int aec, int ba); - void write_memory(address_space &space, offs_t offset, uint8_t data, int aec, int ba); + uint8_t read_memory(offs_t offset, offs_t va, int aec, int ba); + void write_memory(offs_t offset, uint8_t data, int aec, int ba); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); DECLARE_READ8_MEMBER( vic_videoram_r ); DECLARE_READ8_MEMBER( vic_colorram_r ); - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); + uint8_t sid_potx_r(); + uint8_t sid_poty_r(); - DECLARE_READ8_MEMBER( cia1_pa_r ); - DECLARE_WRITE8_MEMBER( cia1_pa_w ); - DECLARE_READ8_MEMBER( cia1_pb_r ); - DECLARE_WRITE8_MEMBER( cia1_pb_w ); + uint8_t cia1_pa_r(); + void cia1_pa_w(uint8_t data); + uint8_t cia1_pb_r(); + void cia1_pb_w(uint8_t data); - DECLARE_READ8_MEMBER( cia2_pa_r ); - DECLARE_WRITE8_MEMBER( cia2_pa_w ); + uint8_t cia2_pa_r(); + void cia2_pa_w(uint8_t data); - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); + uint8_t cpu_r(); + void cpu_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_restore ); DECLARE_WRITE_LINE_MEMBER( exp_dma_w ); @@ -131,8 +131,8 @@ public: DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_c64); - DECLARE_READ8_MEMBER( cia2_pb_r ); - DECLARE_WRITE8_MEMBER( cia2_pb_w ); + uint8_t cia2_pb_r(); + void cia2_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_user_pa2 ) { m_user_pa2 = state; } DECLARE_WRITE_LINE_MEMBER( write_user_pb0 ) { if (state) m_user_pb |= 1; else m_user_pb &= ~1; } @@ -179,8 +179,8 @@ public: : c64_state(mconfig, type, tag) { } - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); + uint8_t cpu_r(); + void cpu_w(uint8_t data); void ntsc_sx(machine_config &config); void ntsc_dx(machine_config &config); void pal_sx(machine_config &config); @@ -205,11 +205,11 @@ public: : c64c_state(mconfig, type, tag) { } - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); + uint8_t cpu_r(); + void cpu_w(uint8_t data); - DECLARE_READ8_MEMBER( cia1_pa_r ); - DECLARE_READ8_MEMBER( cia1_pb_r ); + uint8_t cia1_pa_r(); + uint8_t cia1_pb_r(); void pal_gs(machine_config &config); }; @@ -459,7 +459,7 @@ int c64_state::read_pla(offs_t offset, offs_t va, int rw, int aec, int ba) // read_memory - //------------------------------------------------- -uint8_t c64_state::read_memory(address_space &space, offs_t offset, offs_t va, int aec, int ba) +uint8_t c64_state::read_memory(offs_t offset, offs_t va, int aec, int ba) { int rw = 1; int io1 = 1, io2 = 1; @@ -550,7 +550,7 @@ uint8_t c64_state::read_memory(address_space &space, offs_t offset, offs_t va, i // write_memory - //------------------------------------------------- -void c64_state::write_memory(address_space &space, offs_t offset, uint8_t data, int aec, int ba) +void c64_state::write_memory(offs_t offset, uint8_t data, int aec, int ba) { int rw = 0; offs_t va = 0; @@ -622,14 +622,14 @@ void c64_state::write_memory(address_space &space, offs_t offset, uint8_t data, // read - //------------------------------------------------- -READ8_MEMBER( c64_state::read ) +uint8_t c64_state::read(offs_t offset) { int aec = 1, ba = 1; // VIC address bus is floating offs_t va = 0x3fff; - return read_memory(space, offset, va, aec, ba); + return read_memory(offset, va, aec, ba); } @@ -637,11 +637,11 @@ READ8_MEMBER( c64_state::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( c64_state::write ) +void c64_state::write(offs_t offset, uint8_t data) { int aec = 1, ba = 1; - write_memory(space, offset, data, aec, ba); + write_memory(offset, data, aec, ba); } @@ -657,7 +657,7 @@ READ8_MEMBER( c64_state::vic_videoram_r ) // A15/A14 are not connected to VIC so they are floating //offset |= 0xc000; - return read_memory(space, offset, va, aec, ba); + return read_memory(offset, va, aec, ba); } @@ -861,7 +861,7 @@ INPUT_PORTS_END // MOS6581_INTERFACE( sid_intf ) //------------------------------------------------- -READ8_MEMBER( c64_state::sid_potx_r ) +uint8_t c64_state::sid_potx_r() { uint8_t data = 0xff; @@ -888,7 +888,7 @@ READ8_MEMBER( c64_state::sid_potx_r ) return data; } -READ8_MEMBER( c64_state::sid_poty_r ) +uint8_t c64_state::sid_poty_r() { uint8_t data = 0xff; @@ -920,7 +920,7 @@ READ8_MEMBER( c64_state::sid_poty_r ) // MOS6526_INTERFACE( cia1_intf ) //------------------------------------------------- -READ8_MEMBER( c64_state::cia1_pa_r ) +uint8_t c64_state::cia1_pa_r() { /* @@ -968,7 +968,7 @@ READ8_MEMBER( c64_state::cia1_pa_r ) return data; } -WRITE8_MEMBER( c64_state::cia1_pa_w ) +void c64_state::cia1_pa_w(uint8_t data) { /* @@ -988,7 +988,7 @@ WRITE8_MEMBER( c64_state::cia1_pa_w ) m_joy2->joy_w(data & 0x1f); } -READ8_MEMBER( c64_state::cia1_pb_r ) +uint8_t c64_state::cia1_pb_r() { /* @@ -1028,7 +1028,7 @@ READ8_MEMBER( c64_state::cia1_pb_r ) return data; } -WRITE8_MEMBER( c64_state::cia1_pb_w ) +void c64_state::cia1_pb_w(uint8_t data) { /* @@ -1050,7 +1050,7 @@ WRITE8_MEMBER( c64_state::cia1_pb_w ) m_vic->lp_w(BIT(data, 4)); } -READ8_MEMBER( c64gs_state::cia1_pa_r ) +uint8_t c64gs_state::cia1_pa_r() { /* @@ -1078,7 +1078,7 @@ READ8_MEMBER( c64gs_state::cia1_pa_r ) return data; } -READ8_MEMBER( c64gs_state::cia1_pb_r ) +uint8_t c64gs_state::cia1_pb_r() { /* @@ -1111,7 +1111,7 @@ READ8_MEMBER( c64gs_state::cia1_pb_r ) // MOS6526_INTERFACE( cia2_intf ) //------------------------------------------------- -READ8_MEMBER( c64_state::cia2_pa_r ) +uint8_t c64_state::cia2_pa_r() { /* @@ -1140,7 +1140,7 @@ READ8_MEMBER( c64_state::cia2_pa_r ) return data; } -WRITE8_MEMBER( c64_state::cia2_pa_w ) +void c64_state::cia2_pa_w(uint8_t data) { /* @@ -1170,12 +1170,12 @@ WRITE8_MEMBER( c64_state::cia2_pa_w ) m_iec->host_data_w(!BIT(data, 5)); } -READ8_MEMBER( c64_state::cia2_pb_r ) +uint8_t c64_state::cia2_pb_r() { return m_user_pb; } -WRITE8_MEMBER( c64_state::cia2_pb_w ) +void c64_state::cia2_pb_w(uint8_t data) { m_user->write_c((data>>0)&1); m_user->write_d((data>>1)&1); @@ -1191,7 +1191,7 @@ WRITE8_MEMBER( c64_state::cia2_pb_w ) // M6510_INTERFACE( cpu_intf ) //------------------------------------------------- -READ8_MEMBER( c64_state::cpu_r ) +uint8_t c64_state::cpu_r() { /* @@ -1213,7 +1213,7 @@ READ8_MEMBER( c64_state::cpu_r ) return data; } -WRITE8_MEMBER( c64_state::cpu_w ) +void c64_state::cpu_w(uint8_t data) { /* @@ -1245,7 +1245,7 @@ WRITE8_MEMBER( c64_state::cpu_w ) // M6510_INTERFACE( sx64_cpu_intf ) //------------------------------------------------- -READ8_MEMBER( sx64_state::cpu_r ) +uint8_t sx64_state::cpu_r() { /* @@ -1263,7 +1263,7 @@ READ8_MEMBER( sx64_state::cpu_r ) return 0x07; } -WRITE8_MEMBER( sx64_state::cpu_w ) +void sx64_state::cpu_w(uint8_t data) { /* @@ -1289,7 +1289,7 @@ WRITE8_MEMBER( sx64_state::cpu_w ) // M6510_INTERFACE( c64gs_cpu_intf ) //------------------------------------------------- -READ8_MEMBER( c64gs_state::cpu_r ) +uint8_t c64gs_state::cpu_r() { /* @@ -1307,7 +1307,7 @@ READ8_MEMBER( c64gs_state::cpu_r ) return 0x07; } -WRITE8_MEMBER( c64gs_state::cpu_w ) +void c64gs_state::cpu_w(uint8_t data) { /* diff --git a/src/mame/drivers/c65.cpp b/src/mame/drivers/c65.cpp index d826c3f1828..f393f81ce47 100644 --- a/src/mame/drivers/c65.cpp +++ b/src/mame/drivers/c65.cpp @@ -84,10 +84,10 @@ public: DECLARE_WRITE8_MEMBER(DMAgic_w); DECLARE_READ8_MEMBER(CIASelect_r); DECLARE_WRITE8_MEMBER(CIASelect_w); - DECLARE_READ8_MEMBER(cia0_porta_r); - DECLARE_WRITE8_MEMBER(cia0_porta_w); - DECLARE_READ8_MEMBER(cia0_portb_r); - DECLARE_WRITE8_MEMBER(cia0_portb_w); + uint8_t cia0_porta_r(); + void cia0_porta_w(uint8_t data); + uint8_t cia0_portb_r(); + void cia0_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(cia0_irq); DECLARE_READ8_MEMBER(dummy_r); @@ -439,12 +439,12 @@ WRITE8_MEMBER(c65_state::CIASelect_w) } -READ8_MEMBER(c65_state::cia0_porta_r) +uint8_t c65_state::cia0_porta_r() { return 0xff; } -READ8_MEMBER(c65_state::cia0_portb_r) +uint8_t c65_state::cia0_portb_r() { static const char *const c64ports[] = { "C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7" }; static const char *const c65ports[] = { "C8", "C9" }; @@ -470,13 +470,13 @@ READ8_MEMBER(c65_state::cia0_portb_r) return res; } -WRITE8_MEMBER(c65_state::cia0_porta_w) +void c65_state::cia0_porta_w(uint8_t data) { m_keyb_c0_c7 = ~data; // printf("%02x\n",m_keyb_c0_c7); } -WRITE8_MEMBER(c65_state::cia0_portb_w) +void c65_state::cia0_portb_w(uint8_t data) { } diff --git a/src/mame/drivers/c80.cpp b/src/mame/drivers/c80.cpp index ea2924cfe28..c76c2c9d4fa 100644 --- a/src/mame/drivers/c80.cpp +++ b/src/mame/drivers/c80.cpp @@ -126,7 +126,7 @@ INPUT_PORTS_END /* Z80-PIO Interface */ -READ8_MEMBER( c80_state::pio1_pa_r ) +uint8_t c80_state::pio1_pa_r() { /* @@ -162,7 +162,7 @@ READ8_MEMBER( c80_state::pio1_pa_r ) return data; } -WRITE8_MEMBER( c80_state::pio1_pa_w ) +void c80_state::pio1_pa_w(uint8_t data) { /* @@ -189,7 +189,7 @@ WRITE8_MEMBER( c80_state::pio1_pa_w ) m_cassette->output(BIT(data, 6) ? +1.0 : -1.0); } -WRITE8_MEMBER( c80_state::pio1_pb_w ) +void c80_state::pio1_pb_w(uint8_t data) { /* diff --git a/src/mame/drivers/caswin.cpp b/src/mame/drivers/caswin.cpp index d161ef96880..1a623a4f0d6 100644 --- a/src/mame/drivers/caswin.cpp +++ b/src/mame/drivers/caswin.cpp @@ -92,13 +92,13 @@ public: void vvillage(machine_config &config); protected: - DECLARE_WRITE8_MEMBER(sc0_vram_w); - DECLARE_WRITE8_MEMBER(sc0_attr_w); - DECLARE_WRITE8_MEMBER(vvillage_scroll_w); - DECLARE_WRITE8_MEMBER(vvillage_vregs_w); - DECLARE_READ8_MEMBER(vvillage_rng_r); - DECLARE_WRITE8_MEMBER(vvillage_output_w); - DECLARE_WRITE8_MEMBER(vvillage_lamps_w); + void sc0_vram_w(offs_t offset, uint8_t data); + void sc0_attr_w(offs_t offset, uint8_t data); + void vvillage_scroll_w(uint8_t data); + void vvillage_vregs_w(uint8_t data); + uint8_t vvillage_rng_r(); + void vvillage_output_w(uint8_t data); + void vvillage_lamps_w(uint8_t data); TILE_GET_INFO_MEMBER(get_sc0_tile_info); void caswin_palette(palette_device &palette) const; uint32_t screen_update_vvillage(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -141,27 +141,27 @@ uint32_t caswin_state::screen_update_vvillage(screen_device &screen, bitmap_ind1 return 0; } -WRITE8_MEMBER(caswin_state::sc0_vram_w) +void caswin_state::sc0_vram_w(offs_t offset, uint8_t data) { m_sc0_vram[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(caswin_state::sc0_attr_w) +void caswin_state::sc0_attr_w(offs_t offset, uint8_t data) { m_sc0_attr[offset] = data; m_sc0_tilemap->mark_tile_dirty(offset); } /*These two are tested during the two cherry sub-games.I really don't know what is supposed to do...*/ -WRITE8_MEMBER(caswin_state::vvillage_scroll_w) +void caswin_state::vvillage_scroll_w(uint8_t data) { //... } /*---- --x- window effect? */ /*---- ---x flip screen */ -WRITE8_MEMBER(caswin_state::vvillage_vregs_w) +void caswin_state::vvillage_vregs_w(uint8_t data) { flip_screen_set(data & 1); } @@ -172,12 +172,12 @@ WRITE8_MEMBER(caswin_state::vvillage_vregs_w) * **********************/ -READ8_MEMBER(caswin_state::vvillage_rng_r) +uint8_t caswin_state::vvillage_rng_r() { return machine().rand(); } -WRITE8_MEMBER(caswin_state::vvillage_output_w) +void caswin_state::vvillage_output_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0,data & 1); machine().bookkeeping().coin_counter_w(1,data & 1); @@ -186,7 +186,7 @@ WRITE8_MEMBER(caswin_state::vvillage_output_w) machine().bookkeeping().coin_lockout_w(1,data & 0x20); } -WRITE8_MEMBER(caswin_state::vvillage_lamps_w) +void caswin_state::vvillage_lamps_w(uint8_t data) { /* ---x ---- lamp button 5 diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp index c4b6ad042ba..a0aba3460c2 100644 --- a/src/mame/drivers/cat.cpp +++ b/src/mame/drivers/cat.cpp @@ -297,7 +297,7 @@ public: DECLARE_WRITE_LINE_MEMBER(cat_duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(cat_duart_txa); DECLARE_WRITE_LINE_MEMBER(cat_duart_txb); - DECLARE_WRITE8_MEMBER(cat_duart_output); + void cat_duart_output(uint8_t data); DECLARE_WRITE_LINE_MEMBER(prn_ack_ff); DECLARE_READ16_MEMBER(cat_floppy_control_r); @@ -1032,7 +1032,7 @@ WRITE_LINE_MEMBER(cat_state::cat_duart_txb) // memit sends stuff here; connects * OP6: TD01 " * OP7: TD00 " */ -WRITE8_MEMBER(cat_state::cat_duart_output) +void cat_state::cat_duart_output(uint8_t data) { #ifdef DEBUG_DUART_OUTPUT_LINES fprintf(stderr,"Duart output io lines changed to: %02X\n", data); diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp index d9eb765e244..75d4fdd336a 100644 --- a/src/mame/drivers/cbm2.cpp +++ b/src/mame/drivers/cbm2.cpp @@ -162,31 +162,31 @@ public: DECLARE_READ8_MEMBER( ext_read ); DECLARE_WRITE8_MEMBER( ext_write ); - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); + uint8_t sid_potx_r(); + uint8_t sid_poty_r(); - DECLARE_READ8_MEMBER( tpi1_pa_r ); - DECLARE_WRITE8_MEMBER( tpi1_pa_w ); - DECLARE_READ8_MEMBER( tpi1_pb_r ); - DECLARE_WRITE8_MEMBER( tpi1_pb_w ); + uint8_t tpi1_pa_r(); + void tpi1_pa_w(uint8_t data); + uint8_t tpi1_pb_r(); + void tpi1_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( tpi1_ca_w ); DECLARE_WRITE_LINE_MEMBER( tpi1_cb_w ); - DECLARE_WRITE8_MEMBER( tpi2_pa_w ); - DECLARE_WRITE8_MEMBER( tpi2_pb_w ); - DECLARE_READ8_MEMBER( tpi2_pc_r ); + void tpi2_pa_w(uint8_t data); + void tpi2_pb_w(uint8_t data); + uint8_t tpi2_pc_r(); - DECLARE_READ8_MEMBER( cia_pa_r ); - DECLARE_WRITE8_MEMBER( cia_pa_w ); - DECLARE_READ8_MEMBER( cia_pb_r ); + uint8_t cia_pa_r(); + void cia_pa_w(uint8_t data); + uint8_t cia_pb_r(); - DECLARE_READ8_MEMBER( ext_tpi_pb_r ); - DECLARE_WRITE8_MEMBER( ext_tpi_pb_w ); - DECLARE_WRITE8_MEMBER( ext_tpi_pc_w ); + uint8_t ext_tpi_pb_r(); + void ext_tpi_pb_w(uint8_t data); + void ext_tpi_pc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( ext_cia_irq_w ); - DECLARE_READ8_MEMBER( ext_cia_pb_r ); - DECLARE_WRITE8_MEMBER( ext_cia_pb_w ); + uint8_t ext_cia_pb_r(); + void ext_cia_pb_w(uint8_t data); MC6845_UPDATE_ROW( crtc_update_row ); @@ -240,7 +240,7 @@ public: virtual void read_pla(offs_t offset, int ras, int cas, int refen, int eras, int ecas, int *casseg1, int *casseg2, int *casseg3, int *casseg4, int *rasseg1, int *rasseg2, int *rasseg3, int *rasseg4) override; - DECLARE_READ8_MEMBER( tpi2_pc_r ); + uint8_t tpi2_pc_r(); void b256hp(machine_config &config); void b128hp(machine_config &config); void cbm710(machine_config &config); @@ -296,8 +296,8 @@ public: DECLARE_WRITE_LINE_MEMBER( tpi1_ca_w ); DECLARE_WRITE_LINE_MEMBER( tpi1_cb_w ); - DECLARE_READ8_MEMBER( tpi2_pc_r ); - DECLARE_WRITE8_MEMBER( tpi2_pc_w ); + uint8_t tpi2_pc_r(); + void tpi2_pc_w(uint8_t data); DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_p500); // video state @@ -1441,7 +1441,7 @@ MC6845_UPDATE_ROW( cbm2_state::crtc_update_row ) // MOS6581_INTERFACE( sid_intf ) //------------------------------------------------- -READ8_MEMBER( cbm2_state::sid_potx_r ) +uint8_t cbm2_state::sid_potx_r() { uint8_t data = 0xff; @@ -1468,7 +1468,7 @@ READ8_MEMBER( cbm2_state::sid_potx_r ) return data; } -READ8_MEMBER( cbm2_state::sid_poty_r ) +uint8_t cbm2_state::sid_poty_r() { uint8_t data = 0xff; @@ -1500,7 +1500,7 @@ READ8_MEMBER( cbm2_state::sid_poty_r ) // tpi6525_interface tpi1_intf //------------------------------------------------- -READ8_MEMBER( cbm2_state::tpi1_pa_r ) +uint8_t cbm2_state::tpi1_pa_r() { /* @@ -1530,7 +1530,7 @@ READ8_MEMBER( cbm2_state::tpi1_pa_r ) return data; } -WRITE8_MEMBER( cbm2_state::tpi1_pa_w ) +void cbm2_state::tpi1_pa_w(uint8_t data) { /* @@ -1561,7 +1561,7 @@ WRITE8_MEMBER( cbm2_state::tpi1_pa_w ) m_ieee2->nrfd_w(BIT(data, 7)); } -READ8_MEMBER( cbm2_state::tpi1_pb_r ) +uint8_t cbm2_state::tpi1_pb_r() { /* @@ -1594,7 +1594,7 @@ READ8_MEMBER( cbm2_state::tpi1_pb_r ) return data; } -WRITE8_MEMBER( cbm2_state::tpi1_pb_w ) +void cbm2_state::tpi1_pb_w(uint8_t data) { /* @@ -1671,17 +1671,17 @@ uint8_t cbm2_state::read_keyboard() return data; } -WRITE8_MEMBER( cbm2_state::tpi2_pa_w ) +void cbm2_state::tpi2_pa_w(uint8_t data) { m_tpi2_pa = data; } -WRITE8_MEMBER( cbm2_state::tpi2_pb_w ) +void cbm2_state::tpi2_pb_w(uint8_t data) { m_tpi2_pb = data; } -READ8_MEMBER( cbm2_state::tpi2_pc_r ) +uint8_t cbm2_state::tpi2_pc_r() { /* @@ -1701,7 +1701,7 @@ READ8_MEMBER( cbm2_state::tpi2_pc_r ) return (m_ntsc << 6) | (read_keyboard() & 0x3f); } -READ8_MEMBER( cbm2hp_state::tpi2_pc_r ) +uint8_t cbm2hp_state::tpi2_pc_r() { /* @@ -1721,7 +1721,7 @@ READ8_MEMBER( cbm2hp_state::tpi2_pc_r ) return read_keyboard(); } -READ8_MEMBER( p500_state::tpi2_pc_r ) +uint8_t p500_state::tpi2_pc_r() { /* @@ -1741,7 +1741,7 @@ READ8_MEMBER( p500_state::tpi2_pc_r ) return read_keyboard(); } -WRITE8_MEMBER( p500_state::tpi2_pc_w ) +void p500_state::tpi2_pc_w(uint8_t data) { /* @@ -1765,7 +1765,7 @@ WRITE8_MEMBER( p500_state::tpi2_pc_w ) // MOS6526_INTERFACE( cia_intf ) //------------------------------------------------- -READ8_MEMBER( cbm2_state::cia_pa_r ) +uint8_t cbm2_state::cia_pa_r() { /* @@ -1797,7 +1797,7 @@ READ8_MEMBER( cbm2_state::cia_pa_r ) return data; } -WRITE8_MEMBER( cbm2_state::cia_pa_w ) +void cbm2_state::cia_pa_w(uint8_t data) { /* @@ -1824,7 +1824,7 @@ WRITE8_MEMBER( cbm2_state::cia_pa_w ) m_cia_pa = data; } -READ8_MEMBER( cbm2_state::cia_pb_r ) +uint8_t cbm2_state::cia_pb_r() { /* @@ -1876,7 +1876,7 @@ void cbm2_state::set_busy2(int state) } } -READ8_MEMBER( cbm2_state::ext_tpi_pb_r ) +uint8_t cbm2_state::ext_tpi_pb_r() { /* @@ -1907,7 +1907,7 @@ READ8_MEMBER( cbm2_state::ext_tpi_pb_r ) return data; } -WRITE8_MEMBER( cbm2_state::ext_tpi_pb_w ) +void cbm2_state::ext_tpi_pb_w(uint8_t data) { /* @@ -1936,7 +1936,7 @@ WRITE8_MEMBER( cbm2_state::ext_tpi_pb_w ) m_ext_cia->flag_w(BIT(data, 6)); } -WRITE8_MEMBER( cbm2_state::ext_tpi_pc_w ) +void cbm2_state::ext_tpi_pc_w(uint8_t data) { /* @@ -1969,7 +1969,7 @@ WRITE_LINE_MEMBER( cbm2_state::ext_cia_irq_w ) m_tpi1->i3_w(!state); } -READ8_MEMBER( cbm2_state::ext_cia_pb_r ) +uint8_t cbm2_state::ext_cia_pb_r() { /* @@ -2000,7 +2000,7 @@ READ8_MEMBER( cbm2_state::ext_cia_pb_r ) return data; } -WRITE8_MEMBER( cbm2_state::ext_cia_pb_w ) +void cbm2_state::ext_cia_pb_w(uint8_t data) { /* diff --git a/src/mame/drivers/centiped.cpp b/src/mame/drivers/centiped.cpp index 6e6488571fd..ebfbd314f7f 100644 --- a/src/mame/drivers/centiped.cpp +++ b/src/mame/drivers/centiped.cpp @@ -616,7 +616,7 @@ READ8_MEMBER(centiped_state::bullsdrt_data_port_r) * *************************************/ -READ8_MEMBER(centiped_state::caterplr_unknown_r) +uint8_t centiped_state::caterplr_unknown_r() { return machine().rand() % 0xff; } diff --git a/src/mame/drivers/cfx9850.cpp b/src/mame/drivers/cfx9850.cpp index 9d40a746014..ffed4490e53 100644 --- a/src/mame/drivers/cfx9850.cpp +++ b/src/mame/drivers/cfx9850.cpp @@ -44,27 +44,28 @@ public: , m_opt(0) { } - DECLARE_WRITE8_MEMBER(kol_w); - DECLARE_WRITE8_MEMBER(koh_w); - DECLARE_WRITE8_MEMBER(port_w); - DECLARE_WRITE8_MEMBER(opt_w); - DECLARE_READ8_MEMBER(ki_r); - DECLARE_READ8_MEMBER(in0_r); + void cfx9850(machine_config &config); + +private: required_shared_ptr m_video_ram; required_shared_ptr m_display_ram; - void cfx9850_palette(palette_device &palette) const; - u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - void cfx9850(machine_config &config); - void cfx9850_mem(address_map &map); -protected: required_ioport_array<12> m_ko_port; required_device m_maincpu; -private: u16 m_ko; // KO lines KO1 - KO14 u8 m_port; // PORT lines PORT0 - PORT7 (serial I/O) u8 m_opt; // OPT lines OPT0 - OPT7 (contrast) + + void kol_w(u8 data); + void koh_w(u8 data); + void port_w(u8 data); + void opt_w(u8 data); + u8 ki_r(); + u8 in0_r(); + void cfx9850_palette(palette_device &palette) const; + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void cfx9850_mem(address_map &map); }; @@ -81,14 +82,14 @@ void cfx9850_state::cfx9850_mem(address_map &map) } -WRITE8_MEMBER(cfx9850_state::kol_w) +void cfx9850_state::kol_w(u8 data) { m_ko = (m_ko & 0xff00) | data; logerror("KO is now %04x\n", m_ko); } -WRITE8_MEMBER(cfx9850_state::koh_w) +void cfx9850_state::koh_w(u8 data) { m_ko = (m_ko & 0x00ff) | (data << 8); logerror("KO is now %04x\n", m_ko); @@ -103,7 +104,7 @@ WRITE8_MEMBER(cfx9850_state::koh_w) // -----2-- PORT2 - NC / CP29 // ------1- PORT1 - NC / CP30 // -------0 PORT0 - display (enable?) related? + CP31 -WRITE8_MEMBER(cfx9850_state::port_w) +void cfx9850_state::port_w(u8 data) { m_port = data; logerror("PORT is now %02x\n", m_port); @@ -118,14 +119,14 @@ WRITE8_MEMBER(cfx9850_state::port_w) // -----2-- OPT2 - contrast (TC74HC4066AFS pin 6) // ------1- OPT1 - contrast (TC74HC4066AFS pin 5) // -------0 OPT0 - contrast (TC74HC4066AFS pin 13) -WRITE8_MEMBER(cfx9850_state::opt_w) +void cfx9850_state::opt_w(u8 data) { m_opt = data; logerror("OPT is now %02x\n", m_opt); } -READ8_MEMBER(cfx9850_state::ki_r) +u8 cfx9850_state::ki_r() { u8 data = 0; @@ -141,7 +142,7 @@ READ8_MEMBER(cfx9850_state::ki_r) } -READ8_MEMBER(cfx9850_state::in0_r) +u8 cfx9850_state::in0_r() { // battery level? // bit4 -> if reset CPU keeps restarting (several unknown instructions before jumping to 0) diff --git a/src/mame/drivers/chanbara.cpp b/src/mame/drivers/chanbara.cpp index 6e131a7d82c..bba5826c4c6 100644 --- a/src/mame/drivers/chanbara.cpp +++ b/src/mame/drivers/chanbara.cpp @@ -88,8 +88,8 @@ private: DECLARE_WRITE8_MEMBER(chanbara_colorram_w); DECLARE_WRITE8_MEMBER(chanbara_videoram2_w); DECLARE_WRITE8_MEMBER(chanbara_colorram2_w); - DECLARE_WRITE8_MEMBER(chanbara_ay_out_0_w); - DECLARE_WRITE8_MEMBER(chanbara_ay_out_1_w); + void chanbara_ay_out_0_w(uint8_t data); + void chanbara_ay_out_1_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_bg2_tile_info); void chanbara_palette(palette_device &palette) const; @@ -363,14 +363,14 @@ GFXDECODE_END /***************************************************************************/ -WRITE8_MEMBER(chanbara_state::chanbara_ay_out_0_w) +void chanbara_state::chanbara_ay_out_0_w(uint8_t data) { //printf("chanbara_ay_out_0_w %02x\n",data); m_scroll = data; } -WRITE8_MEMBER(chanbara_state::chanbara_ay_out_1_w) +void chanbara_state::chanbara_ay_out_1_w(uint8_t data) { //printf("chanbara_ay_out_1_w %02x\n",data); diff --git a/src/mame/drivers/chessmate.cpp b/src/mame/drivers/chessmate.cpp index e6083139533..b89352c7076 100644 --- a/src/mame/drivers/chessmate.cpp +++ b/src/mame/drivers/chessmate.cpp @@ -90,9 +90,9 @@ private: // I/O handlers void update_display(); - DECLARE_WRITE8_MEMBER(control_w); - DECLARE_WRITE8_MEMBER(digit_w); - DECLARE_READ8_MEMBER(input_r); + void control_w(u8 data); + void digit_w(u8 data); + u8 input_r(); u8 m_inp_mux; u8 m_7seg_data; @@ -134,7 +134,7 @@ void chmate_state::update_display() m_display->matrix_partial(0, 4, 1 << m_inp_mux, m_7seg_data); } -WRITE8_MEMBER(chmate_state::control_w) +void chmate_state::control_w(u8 data) { // d0-d2: 74145 to input mux/digit select m_inp_mux = data & 7; @@ -151,13 +151,13 @@ WRITE8_MEMBER(chmate_state::control_w) m_maincpu->set_input_line(M6502_IRQ_LINE, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); } -WRITE8_MEMBER(chmate_state::digit_w) +void chmate_state::digit_w(u8 data) { m_7seg_data = data; update_display(); } -READ8_MEMBER(chmate_state::input_r) +u8 chmate_state::input_r() { u8 data = 0; diff --git a/src/mame/drivers/cidelsa.cpp b/src/mame/drivers/cidelsa.cpp index 4e998a5bc26..f95ab22ae49 100644 --- a/src/mame/drivers/cidelsa.cpp +++ b/src/mame/drivers/cidelsa.cpp @@ -17,7 +17,7 @@ WRITE_LINE_MEMBER( cidelsa_state::q_w ) /* Sound Interface */ -WRITE8_MEMBER( draco_state::sound_bankswitch_w ) +void draco_state::sound_bankswitch_w(uint8_t data) { /* @@ -35,7 +35,7 @@ WRITE8_MEMBER( draco_state::sound_bankswitch_w ) membank("bank1")->set_entry(bank); } -WRITE8_MEMBER( draco_state::sound_g_w ) +void draco_state::sound_g_w(uint8_t data) { /* @@ -64,24 +64,24 @@ WRITE8_MEMBER( draco_state::sound_g_w ) } } -READ8_MEMBER( draco_state::sound_in_r ) +uint8_t draco_state::sound_in_r() { return ~(m_sound) & 0x07; } -READ8_MEMBER( draco_state::psg_r ) +uint8_t draco_state::psg_r() { return m_psg_latch; } -WRITE8_MEMBER( draco_state::psg_w ) +void draco_state::psg_w(uint8_t data) { m_psg_latch = data; } /* Read/Write Handlers */ -WRITE8_MEMBER( cidelsa_state::destryer_out1_w ) +void cidelsa_state::destryer_out1_w(uint8_t data) { /* bit description @@ -99,7 +99,7 @@ WRITE8_MEMBER( cidelsa_state::destryer_out1_w ) /* CDP1852 Interfaces */ -WRITE8_MEMBER( cidelsa_state::altair_out1_w ) +void cidelsa_state::altair_out1_w(uint8_t data) { /* bit description @@ -119,7 +119,7 @@ WRITE8_MEMBER( cidelsa_state::altair_out1_w ) m_leds[2] = BIT(data, 5); // FIRE } -WRITE8_MEMBER( draco_state::out1_w ) +void draco_state::out1_w(uint8_t data) { /* bit description diff --git a/src/mame/drivers/cinemat.cpp b/src/mame/drivers/cinemat.cpp index d3f78ab5202..21f2c49bfe2 100644 --- a/src/mame/drivers/cinemat.cpp +++ b/src/mame/drivers/cinemat.cpp @@ -146,7 +146,7 @@ WRITE_LINE_MEMBER(cinemat_state::mux_select_w) * *************************************/ -READ8_MEMBER(cinemat_state::joystick_read) +uint8_t cinemat_state::joystick_read() { if (machine().phase() != machine_phase::RUNNING) return 0; diff --git a/src/mame/drivers/cit101.cpp b/src/mame/drivers/cit101.cpp index 5d1049db3c2..0ac8d542236 100644 --- a/src/mame/drivers/cit101.cpp +++ b/src/mame/drivers/cit101.cpp @@ -94,10 +94,8 @@ private: DECLARE_WRITE8_MEMBER(screen_control_w); DECLARE_WRITE8_MEMBER(brightness_w); - DECLARE_WRITE8_MEMBER(nvr_address_w); - DECLARE_READ8_MEMBER(nvr_data_r); - DECLARE_WRITE8_MEMBER(nvr_data_w); - DECLARE_WRITE8_MEMBER(nvr_control_w); + void nvr_address_w(u8 data); + void nvr_control_w(u8 data); void mem_map(address_map &map); void io_map(address_map &map); @@ -276,23 +274,13 @@ WRITE8_MEMBER(cit101_state::brightness_w) m_brightness = pal5bit(~data & 0x1f); } -WRITE8_MEMBER(cit101_state::nvr_address_w) +void cit101_state::nvr_address_w(u8 data) { m_nvr->set_address(data & 0x3f); m_nvr->set_clk(BIT(data, 6)); } -READ8_MEMBER(cit101_state::nvr_data_r) -{ - return m_nvr->data(); -} - -WRITE8_MEMBER(cit101_state::nvr_data_w) -{ - m_nvr->set_data(data); -} - -WRITE8_MEMBER(cit101_state::nvr_control_w) +void cit101_state::nvr_control_w(u8 data) { m_nvr->set_control(BIT(data, 5), !BIT(data, 4), BIT(data, 7), BIT(data, 6)); } @@ -391,8 +379,8 @@ void cit101_state::cit101(machine_config &config) i8255_device &ppi(I8255A(config, "ppi", 0)); ppi.out_pa_callback().set(FUNC(cit101_state::nvr_address_w)); - ppi.in_pb_callback().set(FUNC(cit101_state::nvr_data_r)); - ppi.out_pb_callback().set(FUNC(cit101_state::nvr_data_w)); + ppi.in_pb_callback().set(m_nvr, FUNC(er2055_device::data)); + ppi.out_pb_callback().set(m_nvr, FUNC(er2055_device::set_data)); ppi.in_pc_callback().set("comm", FUNC(rs232_port_device::cts_r)).lshift(0); ppi.in_pc_callback().append("comm", FUNC(rs232_port_device::dcd_r)).lshift(1); // tied to DSR for loopback test ppi.in_pc_callback().append("comm", FUNC(rs232_port_device::ri_r)).lshift(2); // tied to CTS for loopback test diff --git a/src/mame/drivers/clcd.cpp b/src/mame/drivers/clcd.cpp index 4535395e18f..f1179caf4f3 100644 --- a/src/mame/drivers/clcd.cpp +++ b/src/mame/drivers/clcd.cpp @@ -385,12 +385,12 @@ public: m_lcd_size = data; } - WRITE8_MEMBER(via0_pa_w) + void via0_pa_w(uint8_t data) { m_key_column = data; } - WRITE8_MEMBER(via0_pb_w) + void via0_pb_w(uint8_t data) { write_key_poll((data >> 0) & 1); m_rtc->cs2_w((data >> 1) & 1); @@ -439,7 +439,7 @@ public: } } - WRITE8_MEMBER(via1_pa_w) + void via1_pa_w(uint8_t data) { m_rtc->d0_w(BIT(data, 0)); m_centronics->write_data0(BIT(data, 0)); @@ -465,7 +465,7 @@ public: m_centronics->write_data7(BIT(data, 7)); } - WRITE8_MEMBER(via1_pb_w) + void via1_pb_w(uint8_t data) { //int centronics_unknown = !BIT(data,5); } diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp index 6e3d6d5a4b6..6e0fecf13ef 100644 --- a/src/mame/drivers/cninja.cpp +++ b/src/mame/drivers/cninja.cpp @@ -682,13 +682,13 @@ GFXDECODE_END /**********************************************************************************/ -WRITE8_MEMBER(cninja_state::sound_bankswitch_w) +void cninja_state::sound_bankswitch_w(uint8_t data) { /* the second OKIM6295 ROM is bank switched */ m_oki2->set_rom_bank(data & 1); } -WRITE8_MEMBER(cninja_state::cninjabl2_oki_bank_w) +void cninja_state::cninjabl2_oki_bank_w(uint8_t data) { m_okibank->set_entry(data & 7); } diff --git a/src/mame/drivers/compgolf.cpp b/src/mame/drivers/compgolf.cpp index 14c334fee6f..273370c4579 100644 --- a/src/mame/drivers/compgolf.cpp +++ b/src/mame/drivers/compgolf.cpp @@ -27,17 +27,17 @@ * *************************************/ -WRITE8_MEMBER(compgolf_state::compgolf_scrollx_lo_w) +void compgolf_state::compgolf_scrollx_lo_w(uint8_t data) { m_scrollx_lo = data; } -WRITE8_MEMBER(compgolf_state::compgolf_scrolly_lo_w) +void compgolf_state::compgolf_scrolly_lo_w(uint8_t data) { m_scrolly_lo = data; } -WRITE8_MEMBER(compgolf_state::compgolf_ctrl_w) +void compgolf_state::compgolf_ctrl_w(uint8_t data) { /* bit 4 and 6 are always set */ diff --git a/src/mame/drivers/comx35.cpp b/src/mame/drivers/comx35.cpp index e5a76dd6d9d..688cf20f5a4 100644 --- a/src/mame/drivers/comx35.cpp +++ b/src/mame/drivers/comx35.cpp @@ -485,7 +485,7 @@ WRITE_LINE_MEMBER( comx35_state::q_w ) m_exp->q_w(state); } -WRITE8_MEMBER( comx35_state::sc_w ) +void comx35_state::sc_w(uint8_t data) { switch (data) { diff --git a/src/mame/drivers/conic_cchess2.cpp b/src/mame/drivers/conic_cchess2.cpp index dcb90d16121..2b56ffd24ba 100644 --- a/src/mame/drivers/conic_cchess2.cpp +++ b/src/mame/drivers/conic_cchess2.cpp @@ -78,11 +78,11 @@ private: // I/O handlers void update_display(); void update_dac(); - DECLARE_WRITE8_MEMBER(pia0_pa_w); - DECLARE_WRITE8_MEMBER(pia0_pb_w); - DECLARE_READ8_MEMBER(pia1_pa_r); - DECLARE_READ8_MEMBER(pia1_pb_r); - DECLARE_WRITE8_MEMBER(pia1_pb_w); + void pia0_pa_w(u8 data); + void pia0_pb_w(u8 data); + u8 pia1_pa_r(); + u8 pia1_pb_r(); + void pia1_pb_w(u8 data); u8 m_inp_mux = 0; u8 m_led_data = 0; @@ -112,7 +112,7 @@ void cchess2_state::update_dac() m_dac->write(m_dac_on & BIT(m_inp_mux, 1)); } -WRITE8_MEMBER(cchess2_state::pia0_pa_w) +void cchess2_state::pia0_pa_w(u8 data) { // d0-d7: input mux/led select // d1: dac data @@ -121,14 +121,14 @@ WRITE8_MEMBER(cchess2_state::pia0_pa_w) update_dac(); } -WRITE8_MEMBER(cchess2_state::pia0_pb_w) +void cchess2_state::pia0_pb_w(u8 data) { // d0-d7: led data m_led_data = data; update_display(); } -READ8_MEMBER(cchess2_state::pia1_pa_r) +u8 cchess2_state::pia1_pa_r() { u8 data = 0; @@ -140,7 +140,7 @@ READ8_MEMBER(cchess2_state::pia1_pa_r) return ~data; } -READ8_MEMBER(cchess2_state::pia1_pb_r) +u8 cchess2_state::pia1_pb_r() { u8 data = 0; @@ -152,7 +152,7 @@ READ8_MEMBER(cchess2_state::pia1_pb_r) return data; } -WRITE8_MEMBER(cchess2_state::pia1_pb_w) +void cchess2_state::pia1_pb_w(u8 data) { // d7: dac on m_dac_on = BIT(data, 7); diff --git a/src/mame/drivers/cops.cpp b/src/mame/drivers/cops.cpp index f27f2e9f957..15b1665a721 100644 --- a/src/mame/drivers/cops.cpp +++ b/src/mame/drivers/cops.cpp @@ -95,11 +95,11 @@ public: void update_dacia_irq(); DECLARE_WRITE8_MEMBER(dacia_w); DECLARE_READ8_MEMBER(dacia_r); - DECLARE_WRITE8_MEMBER(via1_b_w); - DECLARE_WRITE8_MEMBER(via1_cb1_w); - DECLARE_WRITE8_MEMBER(cdrom_data_w); - DECLARE_WRITE8_MEMBER(cdrom_ctrl_w); - DECLARE_READ8_MEMBER(cdrom_data_r); + void via1_b_w(uint8_t data); + void via1_cb1_w(uint8_t data); + void cdrom_data_w(uint8_t data); + void cdrom_ctrl_w(uint8_t data); + uint8_t cdrom_data_r(); void init_cops(); int m_irq; @@ -202,7 +202,7 @@ uint32_t cops_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, * *************************************/ -WRITE8_MEMBER(cops_state::cdrom_data_w) +void cops_state::cdrom_data_w(uint8_t data) { const char *regs[4] = { "CMD", "PARAM", "WRITE", "CTRL" }; m_cdrom_data = bitswap<8>(data,0,1,2,3,4,5,6,7); @@ -210,13 +210,13 @@ WRITE8_MEMBER(cops_state::cdrom_data_w) if (LOG_CDROM) logerror("%s:cdrom_data_w(reg = %s, data = %02x)\n", machine().describe_context(), regs[reg & 0x03], m_cdrom_data); } -WRITE8_MEMBER(cops_state::cdrom_ctrl_w) +void cops_state::cdrom_ctrl_w(uint8_t data) { if (LOG_CDROM) logerror("%s:cdrom_ctrl_w(%02x)\n", machine().describe_context(), data); m_cdrom_ctrl = data; } -READ8_MEMBER(cops_state::cdrom_data_r) +uint8_t cops_state::cdrom_data_r() { const char *regs[4] = { "STATUS", "RESULT", "READ", "FIFOST" }; uint8_t reg = ((m_cdrom_ctrl & 4) >> 1) | ((m_cdrom_ctrl & 8) >> 3); @@ -760,7 +760,7 @@ WRITE_LINE_MEMBER(cops_state::via1_irq) m_maincpu->set_input_line(M6502_IRQ_LINE, m_irq ? ASSERT_LINE : CLEAR_LINE); } -WRITE8_MEMBER(cops_state::via1_b_w) +void cops_state::via1_b_w(uint8_t data) { m_sn_data = bitswap<8>(data,0,1,2,3,4,5,6,7); if (m_sn_cb1) @@ -769,7 +769,7 @@ WRITE8_MEMBER(cops_state::via1_b_w) } } -WRITE8_MEMBER(cops_state::via1_cb1_w) +void cops_state::via1_cb1_w(uint8_t data) { m_sn_cb1 = data; } diff --git a/src/mame/drivers/ct486.cpp b/src/mame/drivers/ct486.cpp index 144e4b9f89f..310ad4d86fa 100644 --- a/src/mame/drivers/ct486.cpp +++ b/src/mame/drivers/ct486.cpp @@ -47,10 +47,10 @@ public: virtual void machine_start() override; - DECLARE_READ16_MEMBER( cs4031_ior ); - DECLARE_WRITE16_MEMBER( cs4031_iow ); + uint16_t cs4031_ior(offs_t offset); + void cs4031_iow(offs_t offset, uint16_t data); DECLARE_WRITE_LINE_MEMBER( cs4031_hold ); - DECLARE_WRITE8_MEMBER( cs4031_tc ) { m_isabus->eop_w(offset, data); } + void cs4031_tc(offs_t offset, uint8_t data) { m_isabus->eop_w(offset, data); } DECLARE_WRITE_LINE_MEMBER( cs4031_spkr ) { m_speaker->level_w(state); } void ct486(machine_config &config); void ct486_io(address_map &map); @@ -66,7 +66,7 @@ void ct486_state::machine_start() { } -READ16_MEMBER( ct486_state::cs4031_ior ) +uint16_t ct486_state::cs4031_ior(offs_t offset) { if (offset < 4) return m_isabus->dack_r(offset); @@ -74,7 +74,7 @@ READ16_MEMBER( ct486_state::cs4031_ior ) return m_isabus->dack16_r(offset); } -WRITE16_MEMBER( ct486_state::cs4031_iow ) +void ct486_state::cs4031_iow(offs_t offset, uint16_t data) { if (offset < 4) m_isabus->dack_w(offset, data); diff --git a/src/mame/drivers/cxg_dominator.cpp b/src/mame/drivers/cxg_dominator.cpp index ff1e72eb1f3..eafc0d5ab7f 100644 --- a/src/mame/drivers/cxg_dominator.cpp +++ b/src/mame/drivers/cxg_dominator.cpp @@ -71,10 +71,10 @@ private: void main_map(address_map &map); // I/O handlers - DECLARE_WRITE64_MEMBER(lcd_s_w); - DECLARE_WRITE8_MEMBER(control_w); - DECLARE_WRITE8_MEMBER(leds_w); - DECLARE_READ8_MEMBER(input_r); + void lcd_s_w(offs_t offset, u64 data); + void control_w(u8 data); + void leds_w(offs_t offset, u8 data); + u8 input_r(offs_t offset); }; void dominator_state::machine_start() @@ -91,7 +91,7 @@ void dominator_state::machine_start() // LC7582 LCD -WRITE64_MEMBER(dominator_state::lcd_s_w) +void dominator_state::lcd_s_w(offs_t offset, u64 data) { u8 d[4]; @@ -115,7 +115,7 @@ WRITE64_MEMBER(dominator_state::lcd_s_w) // TTL -WRITE8_MEMBER(dominator_state::control_w) +void dominator_state::control_w(u8 data) { // d0: LC7582 DATA // d1: LC7582 CLK @@ -128,13 +128,13 @@ WRITE8_MEMBER(dominator_state::control_w) m_dac->write(BIT(data, 3)); } -WRITE8_MEMBER(dominator_state::leds_w) +void dominator_state::leds_w(offs_t offset, u8 data) { // led data m_display->matrix(1 << offset, data); } -READ8_MEMBER(dominator_state::input_r) +u8 dominator_state::input_r(offs_t offset) { u8 data = 0; diff --git a/src/mame/drivers/cxg_sphinx40.cpp b/src/mame/drivers/cxg_sphinx40.cpp index 0c689f19412..b421d629582 100644 --- a/src/mame/drivers/cxg_sphinx40.cpp +++ b/src/mame/drivers/cxg_sphinx40.cpp @@ -96,16 +96,16 @@ private: void nvram_map(address_map &map); // I/O handlers - DECLARE_WRITE64_MEMBER(lcd_seg_w); + void lcd_seg_w(u64 data); void update_display(); - DECLARE_WRITE8_MEMBER(cb_mux_w); - DECLARE_WRITE8_MEMBER(cb_leds_w); - DECLARE_READ8_MEMBER(cb_r); + void cb_mux_w(u8 data); + void cb_leds_w(u8 data); + u8 cb_r(); - DECLARE_READ8_MEMBER(input_r); - DECLARE_WRITE8_MEMBER(input_w); - DECLARE_WRITE8_MEMBER(lcd_w); + u8 input_r(); + void input_w(u8 data); + void lcd_w(u8 data); u8 m_cb_mux = 0; u8 m_led_data = 0; @@ -131,7 +131,7 @@ void sphinx40_state::machine_start() // HD61603 LCD -WRITE64_MEMBER(sphinx40_state::lcd_seg_w) +void sphinx40_state::lcd_seg_w(u64 data) { // output individual segments for (int i = 0; i < 64; i++) @@ -153,14 +153,14 @@ void sphinx40_state::update_display() m_display->matrix(m_cb_mux, m_led_data); } -WRITE8_MEMBER(sphinx40_state::cb_mux_w) +void sphinx40_state::cb_mux_w(u8 data) { // PA0-PA7: chessboard input/led mux m_cb_mux = ~data; update_display(); } -WRITE8_MEMBER(sphinx40_state::cb_leds_w) +void sphinx40_state::cb_leds_w(u8 data) { // PB0-PB7: chessboard leds m_led_data = ~data; @@ -170,7 +170,7 @@ WRITE8_MEMBER(sphinx40_state::cb_leds_w) // TTL -READ8_MEMBER(sphinx40_state::cb_r) +u8 sphinx40_state::cb_r() { u8 data = 0; @@ -182,13 +182,13 @@ READ8_MEMBER(sphinx40_state::cb_r) return data; } -WRITE8_MEMBER(sphinx40_state::input_w) +void sphinx40_state::input_w(u8 data) { // d0-d3: input mux (buttons) m_inp_mux = ~data & 0xf; } -READ8_MEMBER(sphinx40_state::input_r) +u8 sphinx40_state::input_r() { u8 data = 0; @@ -200,7 +200,7 @@ READ8_MEMBER(sphinx40_state::input_r) return ~data & 0x1f; } -WRITE8_MEMBER(sphinx40_state::lcd_w) +void sphinx40_state::lcd_w(u8 data) { // d0-d3: HD61603 data m_lcd->data_w(data & 0xf); diff --git a/src/mame/drivers/cz101.cpp b/src/mame/drivers/cz101.cpp index f21ba712804..c34c37936cf 100644 --- a/src/mame/drivers/cz101.cpp +++ b/src/mame/drivers/cz101.cpp @@ -57,9 +57,8 @@ private: void maincpu_map(address_map &map); - DECLARE_WRITE8_MEMBER(port_b_w); - DECLARE_READ8_MEMBER(port_c_r); - DECLARE_WRITE8_MEMBER(port_c_w); + void port_b_w(uint8_t data); + void port_c_w(uint8_t data); DECLARE_WRITE8_MEMBER(led_1_w); DECLARE_WRITE8_MEMBER(led_2_w); @@ -322,7 +321,7 @@ READ8_MEMBER( cz101_state::keys_r ) // ---4---- music lsi irq input // ----3210 key select output -WRITE8_MEMBER( cz101_state::port_b_w ) +void cz101_state::port_b_w(uint8_t data) { LOG("port_b_w: %02x\n", data); @@ -338,7 +337,7 @@ WRITE8_MEMBER( cz101_state::port_b_w ) // ------1- midi input // -------0 midi output -WRITE8_MEMBER( cz101_state::port_c_w ) +void cz101_state::port_c_w(uint8_t data) { LOG("port_c_w: %02x\n", data); diff --git a/src/mame/drivers/dassault.cpp b/src/mame/drivers/dassault.cpp index 5b53a00c76b..c7327511c1b 100644 --- a/src/mame/drivers/dassault.cpp +++ b/src/mame/drivers/dassault.cpp @@ -504,7 +504,7 @@ GFXDECODE_END /**********************************************************************************/ -WRITE8_MEMBER(dassault_state::sound_bankswitch_w) +void dassault_state::sound_bankswitch_w(uint8_t data) { /* the second OKIM6295 ROM is bank switched */ m_oki2->set_rom_bank(data & 1); diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp index fcfb9f20ae5..2f14b88c7bd 100644 --- a/src/mame/drivers/ddenlovr.cpp +++ b/src/mame/drivers/ddenlovr.cpp @@ -287,8 +287,8 @@ private: DECLARE_WRITE8_MEMBER(ddenlovr_transparency_mask2_w); DECLARE_READ8_MEMBER(unk_r); DECLARE_READ16_MEMBER(unk16_r); - DECLARE_WRITE8_MEMBER(ddenlovr_select2_w); - DECLARE_READ8_MEMBER(rongrong_input2_r); + void ddenlovr_select2_w(uint8_t data); + uint8_t rongrong_input2_r(); DECLARE_READ16_MEMBER(quiz365_input2_r); DECLARE_WRITE8_MEMBER(quiz365_coincounter_w); DECLARE_READ16_MEMBER(quiz365_protection_r); @@ -303,10 +303,10 @@ private: DECLARE_WRITE8_MEMBER(nettoqc_coincounter_w); DECLARE_READ16_MEMBER(ultrchmp_protection2_r); DECLARE_WRITE16_MEMBER(ultrchmp_protection2_w); - DECLARE_READ8_MEMBER(rongrong_input_r); - DECLARE_WRITE8_MEMBER(rongrong_select_w); + uint8_t rongrong_input_r(); + void rongrong_select_w(uint8_t data); DECLARE_READ8_MEMBER(magic_r); - DECLARE_WRITE8_MEMBER(mmpanic_rombank_w); + void mmpanic_rombank_w(uint8_t data); DECLARE_WRITE8_MEMBER(mmpanic_blitter2_w); DECLARE_WRITE_LINE_MEMBER(mmpanic_blitter_irq); DECLARE_WRITE8_MEMBER(mmpanic_leds_w); @@ -316,16 +316,16 @@ private: DECLARE_READ8_MEMBER(funkyfig_busy_r); DECLARE_WRITE8_MEMBER(funkyfig_blitter_w); DECLARE_WRITE_LINE_MEMBER(funkyfig_blitter_irq); - DECLARE_WRITE8_MEMBER(funkyfig_rombank_w); - DECLARE_READ8_MEMBER(funkyfig_dsw_r); + void funkyfig_rombank_w(uint8_t data); + uint8_t funkyfig_dsw_r(); DECLARE_READ8_MEMBER(funkyfig_coin_r); DECLARE_READ8_MEMBER(funkyfig_key_r); DECLARE_WRITE8_MEMBER(funkyfig_lockout_w); - DECLARE_WRITE8_MEMBER(hanakanz_rombank_w); - DECLARE_WRITE8_MEMBER(hanakanz_keyb_w); + void hanakanz_rombank_w(uint8_t data); + void hanakanz_keyb_w(uint8_t data); DECLARE_WRITE8_MEMBER(hanakanz_dsw_w); DECLARE_READ8_MEMBER(hanakanz_keyb_r); - DECLARE_READ8_MEMBER(hanakanz_dsw_r); + uint8_t hanakanz_dsw_r(); DECLARE_READ8_MEMBER(hanakanz_busy_r); DECLARE_READ8_MEMBER(hanakanz_gfxrom_r); DECLARE_WRITE8_MEMBER(hanakanz_coincounter_w); @@ -341,13 +341,13 @@ private: DECLARE_READ8_MEMBER(mjchuuka_gfxrom_1_r); DECLARE_WRITE8_MEMBER(mjchuuka_palette_w); DECLARE_WRITE8_MEMBER(mjchuuka_coincounter_w); - DECLARE_WRITE8_MEMBER(mjmyster_rambank_w); + void mjmyster_rambank_w(uint8_t data); DECLARE_WRITE8_MEMBER(mjmyster_select2_w); DECLARE_READ8_MEMBER(mjmyster_coins_r); DECLARE_READ8_MEMBER(mjmyster_keyb_r); DECLARE_READ8_MEMBER(mjmyster_dsw_r); DECLARE_WRITE8_MEMBER(mjmyster_coincounter_w); - DECLARE_WRITE8_MEMBER(hginga_rombank_w); + void hginga_rombank_w(uint8_t data); DECLARE_READ8_MEMBER(hginga_protection_r); DECLARE_WRITE8_MEMBER(hginga_input_w); DECLARE_READ8_MEMBER(hginga_coins_r); @@ -360,9 +360,9 @@ private: DECLARE_WRITE8_MEMBER(hgokou_input_w); DECLARE_READ8_MEMBER(hgokou_protection_r); DECLARE_READ8_MEMBER(hgokbang_input_r); - DECLARE_WRITE8_MEMBER(hparadis_select_w); + void hparadis_select_w(uint8_t data); DECLARE_READ8_MEMBER(hparadis_input_r); - DECLARE_READ8_MEMBER(hparadis_dsw_r); + uint8_t hparadis_dsw_r(); DECLARE_WRITE8_MEMBER(hparadis_coin_w); DECLARE_READ8_MEMBER(mjmywrld_coins_r); DECLARE_READ16_MEMBER(akamaru_protection1_r); @@ -373,7 +373,7 @@ private: DECLARE_READ16_MEMBER(akamaru_dsw_r); DECLARE_READ16_MEMBER(akamaru_blitter_r); DECLARE_READ16_MEMBER(akamaru_e0010d_r); - DECLARE_WRITE8_MEMBER(mjflove_rombank_w); + void mjflove_rombank_w(uint8_t data); DECLARE_READ8_MEMBER(mjflove_protection_r); DECLARE_READ8_MEMBER(mjflove_keyb_r); DECLARE_WRITE_LINE_MEMBER(mjflove_blitter_irq); @@ -384,8 +384,8 @@ private: DECLARE_WRITE8_MEMBER(mjgnight_protection_w); DECLARE_WRITE8_MEMBER(mjgnight_coincounter_w); DECLARE_READ8_MEMBER(sryudens_keyb_r); - DECLARE_WRITE8_MEMBER(sryudens_coincounter_w); - DECLARE_WRITE8_MEMBER(sryudens_rambank_w); + void sryudens_coincounter_w(uint8_t data); + void sryudens_rambank_w(uint8_t data); DECLARE_READ8_MEMBER(daimyojn_keyb1_r); DECLARE_READ8_MEMBER(daimyojn_keyb2_r); DECLARE_WRITE8_MEMBER(daimyojn_protection_w); @@ -405,21 +405,21 @@ private: DECLARE_WRITE8_MEMBER(htengoku_rombank_w); DECLARE_WRITE8_MEMBER(htengoku_blit_romregion_w); DECLARE_VIDEO_START(htengoku); - DECLARE_WRITE8_MEMBER(htengoku_dsw_w); - DECLARE_READ8_MEMBER(htengoku_dsw_r); + void htengoku_dsw_w(uint8_t data); + uint8_t htengoku_dsw_r(); DECLARE_WRITE8_MEMBER(quizchq_oki_bank_w); DECLARE_WRITE8_MEMBER(ddenlovr_oki_bank_w); DECLARE_WRITE_LINE_MEMBER(quiz365_oki_bank1_w); DECLARE_WRITE_LINE_MEMBER(quiz365_oki_bank2_w); - DECLARE_WRITE8_MEMBER(ddenlovr_select_w); - DECLARE_READ8_MEMBER(quiz365_input_r); + void ddenlovr_select_w(uint8_t data); + uint8_t quiz365_input_r(); DECLARE_WRITE8_MEMBER(nettoqc_oki_bank_w); DECLARE_WRITE8_MEMBER(hanakanz_oki_bank_w); - DECLARE_WRITE8_MEMBER(mjchuuka_oki_bank_w); - DECLARE_READ8_MEMBER(hginga_dsw_r); + void mjchuuka_oki_bank_w(uint8_t data); + uint8_t hginga_dsw_r(); DECLARE_WRITE8_MEMBER(mjflove_okibank_w); DECLARE_WRITE8_MEMBER(jongtei_okibank_w); - DECLARE_READ8_MEMBER(seljan2_dsw_r); + uint8_t seljan2_dsw_r(); DECLARE_WRITE8_MEMBER(daimyojn_okibank_w); void ddenlovr_flipscreen_w( uint8_t data ); @@ -1868,17 +1868,17 @@ READ16_MEMBER(ddenlovr_state::unk16_r) } -WRITE8_MEMBER(ddenlovr_state::ddenlovr_select_w ) +void ddenlovr_state::ddenlovr_select_w(uint8_t data) { m_dsw_sel = data; } -WRITE8_MEMBER(ddenlovr_state::ddenlovr_select2_w) +void ddenlovr_state::ddenlovr_select2_w(uint8_t data) { m_input_sel = data; } -READ8_MEMBER(ddenlovr_state::rongrong_input2_r) +uint8_t ddenlovr_state::rongrong_input2_r() { // logerror("%04x: input2_r offset %d select %x\n", m_maincpu->pc(), offset, m_input_sel); /* 0 and 1 are read from offset 1, 2 from offset 0... */ @@ -1892,7 +1892,7 @@ READ8_MEMBER(ddenlovr_state::rongrong_input2_r) } -READ8_MEMBER(ddenlovr_state::quiz365_input_r ) +uint8_t ddenlovr_state::quiz365_input_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); @@ -2263,7 +2263,7 @@ void ddenlovr_state::ultrchmp_map(address_map &map) Rong Rong ***************************************************************************/ -READ8_MEMBER(ddenlovr_state::rongrong_input_r) +uint8_t ddenlovr_state::rongrong_input_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); @@ -2273,7 +2273,7 @@ READ8_MEMBER(ddenlovr_state::rongrong_input_r) return 0xff; } -WRITE8_MEMBER(ddenlovr_state::rongrong_select_w) +void ddenlovr_state::rongrong_select_w(uint8_t data) { //logerror("%04x: rongrong_select_w %02x\n",m_maincpu->pc(),data); @@ -2387,7 +2387,7 @@ READ8_MEMBER(ddenlovr_state::magic_r) return 0x01; } -WRITE8_MEMBER(ddenlovr_state::mmpanic_rombank_w) +void ddenlovr_state::mmpanic_rombank_w(uint8_t data) { membank("bank1")->set_entry(data & 0x7); /* Bit 4? */ @@ -2550,7 +2550,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::funkyfig_blitter_irq) m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0); // Z80 } -WRITE8_MEMBER(ddenlovr_state::funkyfig_rombank_w) +void ddenlovr_state::funkyfig_rombank_w(uint8_t data) { m_dsw_sel = data; @@ -2559,7 +2559,7 @@ WRITE8_MEMBER(ddenlovr_state::funkyfig_rombank_w) membank("bank2")->set_entry(((data & 0xe0) >> 5)); } -READ8_MEMBER(ddenlovr_state::funkyfig_dsw_r) +uint8_t ddenlovr_state::funkyfig_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); @@ -2658,7 +2658,7 @@ void ddenlovr_state::funkyfig_sound_portmap(address_map &map) ***************************************************************************/ -WRITE8_MEMBER(ddenlovr_state::hanakanz_rombank_w) +void ddenlovr_state::hanakanz_rombank_w(uint8_t data) { membank("bank1")->set_entry(data & 0x0f); membank("bank2")->set_entry(((data & 0xf0) >> 4)); @@ -2673,7 +2673,7 @@ void ddenlovr_state::hanakanz_map(address_map &map) } -WRITE8_MEMBER(ddenlovr_state::hanakanz_keyb_w) +void ddenlovr_state::hanakanz_keyb_w(uint8_t data) { m_keyb = data; } @@ -2697,7 +2697,7 @@ READ8_MEMBER(ddenlovr_state::hanakanz_keyb_r) return val; } -READ8_MEMBER(ddenlovr_state::hanakanz_dsw_r) +uint8_t ddenlovr_state::hanakanz_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); @@ -3007,7 +3007,7 @@ WRITE8_MEMBER(ddenlovr_state::mjchuuka_coincounter_w) #endif } -WRITE8_MEMBER(ddenlovr_state::mjchuuka_oki_bank_w ) +void ddenlovr_state::mjchuuka_oki_bank_w(uint8_t data) { // data & 0x08 ? m_oki->set_rom_bank(data & 1); @@ -3113,7 +3113,7 @@ void ddenlovr_state::mjmyster_map(address_map &map) map(0xf200, 0xffff).nopw(); // "" } -WRITE8_MEMBER(ddenlovr_state::mjmyster_rambank_w) +void ddenlovr_state::mjmyster_rambank_w(uint8_t data) { membank("bank2")->set_entry(data & 0x07); //logerror("%04x: rambank = %02x\n", m_maincpu->pc(), data); @@ -3218,7 +3218,7 @@ void ddenlovr_state::mjmyster_portmap(address_map &map) Hanafuda Hana Ginga ***************************************************************************/ -WRITE8_MEMBER(ddenlovr_state::hginga_rombank_w) +void ddenlovr_state::hginga_rombank_w(uint8_t data) { membank("bank1")->set_entry(data & 0x7); m_hginga_rombank = data; @@ -3245,7 +3245,7 @@ void ddenlovr_state::hginga_map(address_map &map) map(0xf700, 0xf706).nopw(); } -READ8_MEMBER(ddenlovr_state::hginga_dsw_r ) +uint8_t ddenlovr_state::hginga_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW4")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW3")->read(); @@ -3552,7 +3552,7 @@ void ddenlovr_state::hgokbang_portmap(address_map &map) Super Hana Paradise ***************************************************************************/ -WRITE8_MEMBER(ddenlovr_state::hparadis_select_w) +void ddenlovr_state::hparadis_select_w(uint8_t data) { m_dsw_sel = data; m_keyb = 0; @@ -3580,7 +3580,7 @@ READ8_MEMBER(ddenlovr_state::hparadis_input_r) return 0xff; } -READ8_MEMBER(ddenlovr_state::hparadis_dsw_r) +uint8_t ddenlovr_state::hparadis_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); @@ -3782,7 +3782,7 @@ void ddenlovr_state::akamaru_map(address_map &map) Mahjong Fantasic Love ***************************************************************************/ -WRITE8_MEMBER(ddenlovr_state::mjflove_rombank_w) +void ddenlovr_state::mjflove_rombank_w(uint8_t data) { membank("bank1")->set_entry(data & 0xf); // bit 4 enables palette ram @@ -3988,7 +3988,7 @@ READ8_MEMBER(ddenlovr_state::sryudens_keyb_r) return val; } -WRITE8_MEMBER(ddenlovr_state::sryudens_coincounter_w) +void ddenlovr_state::sryudens_coincounter_w(uint8_t data) { // bit 0 = coin counter // bit 1 = out counter @@ -4008,7 +4008,7 @@ WRITE8_MEMBER(ddenlovr_state::sryudens_coincounter_w) #endif } -WRITE8_MEMBER(ddenlovr_state::sryudens_rambank_w) +void ddenlovr_state::sryudens_rambank_w(uint8_t data) { membank("bank2")->set_entry(data & 0x0f); //logerror("%04x: rambank = %02x\n", m_maincpu->pc(), data); @@ -4135,7 +4135,7 @@ WRITE8_MEMBER(ddenlovr_state::seljan2_palette_w) logerror("%s: warning, palette_w with palette disabled, %04x <- %02x\n", machine().describe_context(), offset, data); } -READ8_MEMBER(ddenlovr_state::seljan2_dsw_r ) +uint8_t ddenlovr_state::seljan2_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); @@ -4222,12 +4222,12 @@ WRITE8_MEMBER(ddenlovr_state::htengoku_select_w) m_keyb = 0; } -WRITE8_MEMBER(ddenlovr_state::htengoku_dsw_w) +void ddenlovr_state::htengoku_dsw_w(uint8_t data) { m_dsw_sel = data; } -READ8_MEMBER(ddenlovr_state::htengoku_dsw_r) +uint8_t ddenlovr_state::htengoku_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW0")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW1")->read(); diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp index e053f627c3c..63c8d0f352c 100644 --- a/src/mame/drivers/dec8.cpp +++ b/src/mame/drivers/dec8.cpp @@ -725,27 +725,27 @@ void dec8_state::csilver_s_map(address_map &map) */ -READ8_MEMBER(dec8_state::i8751_port0_r) +uint8_t dec8_state::i8751_port0_r() { return m_i8751_port0; } -WRITE8_MEMBER(dec8_state::i8751_port0_w) +void dec8_state::i8751_port0_w(uint8_t data) { m_i8751_port0 = data; } -READ8_MEMBER(dec8_state::i8751_port1_r) +uint8_t dec8_state::i8751_port1_r() { return m_i8751_port1; } -WRITE8_MEMBER(dec8_state::i8751_port1_w) +void dec8_state::i8751_port1_w(uint8_t data) { m_i8751_port1 = data; } -WRITE8_MEMBER(dec8_state::gondo_mcu_to_main_w) +void dec8_state::gondo_mcu_to_main_w(uint8_t data) { // P2 - controls latches for main CPU communication if ((data&0x10)==0) @@ -763,7 +763,7 @@ WRITE8_MEMBER(dec8_state::gondo_mcu_to_main_w) m_i8751_p2 = data; } -WRITE8_MEMBER(dec8_state::shackled_mcu_to_main_w) +void dec8_state::shackled_mcu_to_main_w(uint8_t data) { // P2 - controls latches for main CPU communication if ((data&0x10)==0) @@ -796,7 +796,7 @@ WRITE8_MEMBER(dec8_state::shackled_mcu_to_main_w) Super Real Darwin is similar but only appears to have a single port */ -WRITE8_MEMBER(dec8_state::srdarwin_mcu_to_main_w) +void dec8_state::srdarwin_mcu_to_main_w(uint8_t data) { // P2 - controls latches for main CPU communication if ((data & 0x10) == 0) diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp index 8351036a2b0..cfac359b976 100644 --- a/src/mame/drivers/dectalk.cpp +++ b/src/mame/drivers/dectalk.cpp @@ -299,8 +299,8 @@ private: required_device m_dac; DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(duart_txa); - DECLARE_READ8_MEMBER(duart_input); - DECLARE_WRITE8_MEMBER(duart_output); + uint8_t duart_input(); + void duart_output(uint8_t data); DECLARE_READ8_MEMBER(nvram_recall); DECLARE_WRITE8_MEMBER(led_write); DECLARE_WRITE8_MEMBER(nvram_store); @@ -338,7 +338,7 @@ WRITE_LINE_MEMBER(dectalk_state::duart_irq_handler) m_maincpu->set_input_line(M68K_IRQ_6, state); } -READ8_MEMBER(dectalk_state::duart_input) +uint8_t dectalk_state::duart_input() { uint8_t data = 0; data |= m_duart_inport&0xf; @@ -348,7 +348,7 @@ READ8_MEMBER(dectalk_state::duart_input) return data; } -WRITE8_MEMBER(dectalk_state::duart_output) +void dectalk_state::duart_output(uint8_t data) { m_duart_outport = data; #ifdef SERIAL_TO_STDERR diff --git a/src/mame/drivers/dragrace.cpp b/src/mame/drivers/dragrace.cpp index 876a8a1527c..5cfa432e01f 100644 --- a/src/mame/drivers/dragrace.cpp +++ b/src/mame/drivers/dragrace.cpp @@ -40,7 +40,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(dragrace_state::dragrace_frame_callback) } -WRITE8_MEMBER(dragrace_state::speed1_w) +void dragrace_state::speed1_w(uint8_t data) { unsigned freq = ~data & 0x1f; m_discrete->write(DRAGRACE_MOTOR1_DATA, freq); @@ -49,7 +49,7 @@ WRITE8_MEMBER(dragrace_state::speed1_w) output().set_value("tachometer", freq); } -WRITE8_MEMBER(dragrace_state::speed2_w) +void dragrace_state::speed2_w(uint8_t data) { unsigned freq = ~data & 0x1f; m_discrete->write(DRAGRACE_MOTOR2_DATA, freq); diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp index de6a7c383d2..ecae7f5a1d3 100644 --- a/src/mame/drivers/dynax.cpp +++ b/src/mame/drivers/dynax.cpp @@ -1108,12 +1108,12 @@ READ8_MEMBER(dynax_state::tenkai_ip_r) } -WRITE8_MEMBER(dynax_state::tenkai_dswsel_w) +void dynax_state::tenkai_dswsel_w(uint8_t data) { m_dsw_sel = data; } -READ8_MEMBER(dynax_state::tenkai_dsw_r) +uint8_t dynax_state::tenkai_dsw_r() { if (!BIT(m_dsw_sel, 0)) return ioport("DSW0")->read(); if (!BIT(m_dsw_sel, 1)) return ioport("DSW1")->read(); @@ -1151,28 +1151,28 @@ void dynax_state::tenkai_update_rombank() // logerror("rombank = %02x\n", m_rombank); } -READ8_MEMBER(dynax_state::tenkai_p3_r) +uint8_t dynax_state::tenkai_p3_r() { return 0x00; } -WRITE8_MEMBER(dynax_state::tenkai_p3_w) +void dynax_state::tenkai_p3_w(uint8_t data) { m_rombank = ((data & 0x04) << 1) | (m_rombank & 0x07); tenkai_update_rombank(); } -WRITE8_MEMBER(dynax_state::tenkai_p4_w) +void dynax_state::tenkai_p4_w(uint8_t data) { m_rombank = (m_rombank & 0x08) | ((data & 0x0e) >> 1); tenkai_update_rombank(); } -READ8_MEMBER(dynax_state::tenkai_p5_r) +uint8_t dynax_state::tenkai_p5_r() { return m_tenkai_p5_val; } -WRITE8_MEMBER(dynax_state::tenkai_p6_w) +void dynax_state::tenkai_p6_w(uint8_t data) { m_tenkai_p5_val &= 0x0f; @@ -1180,7 +1180,7 @@ WRITE8_MEMBER(dynax_state::tenkai_p6_w) m_tenkai_p5_val |= (1 << 4); } -WRITE8_MEMBER(dynax_state::tenkai_p7_w) +void dynax_state::tenkai_p7_w(uint8_t data) { m_tenkai_p5_val &= 0xf0; @@ -1188,13 +1188,13 @@ WRITE8_MEMBER(dynax_state::tenkai_p7_w) m_tenkai_p5_val |= (1 << 3); } -WRITE8_MEMBER(dynax_state::tenkai_p8_w) +void dynax_state::tenkai_p8_w(uint8_t data) { m_rombank = ((data & 0x08) << 1) | (m_rombank & 0x0f); tenkai_update_rombank(); } -READ8_MEMBER(dynax_state::tenkai_p8_r) +uint8_t dynax_state::tenkai_p8_r() { return 0x00; } @@ -1297,7 +1297,7 @@ WRITE8_MEMBER(dynax_state::gekisha_hopper_w) // popmessage("%02x %02x", gekisha_val[0], gekisha_val[1]); } -WRITE8_MEMBER(dynax_state::gekisha_p4_w) +void dynax_state::gekisha_p4_w(uint8_t data) { m_bankdev->set_bank((data >> 2) & 3); } diff --git a/src/mame/drivers/eva.cpp b/src/mame/drivers/eva.cpp index d5c71f0db77..a0a6a32b452 100644 --- a/src/mame/drivers/eva.cpp +++ b/src/mame/drivers/eva.cpp @@ -62,9 +62,9 @@ private: // devices required_device m_maincpu; - DECLARE_READ8_MEMBER(read_k); - DECLARE_WRITE16_MEMBER(write_o); - DECLARE_WRITE16_MEMBER(write_r); + u8 read_k(); + void write_o(u16 data); + void write_r(u16 data); }; class eva24_state : public base_state @@ -85,9 +85,9 @@ private: // devices required_device m_maincpu; - DECLARE_READ8_MEMBER(read_g); - DECLARE_WRITE8_MEMBER(write_g); - DECLARE_WRITE8_MEMBER(write_d); + u8 read_g(); + void write_g(u8 data); + void write_d(u8 data); u8 m_g = 0; }; @@ -105,19 +105,19 @@ void eva24_state::machine_start() // EVA-24 -WRITE8_MEMBER(eva24_state::write_g) +void eva24_state::write_g(u8 data) { // G3: TMS5100 PDC pin m_tms5100->pdc_w(data >> 3 & 1); m_g = data; } -READ8_MEMBER(eva24_state::read_g) +u8 eva24_state::read_g() { return m_g; } -WRITE8_MEMBER(eva24_state::write_d) +void eva24_state::write_d(u8 data) { // D3210: TMS5100 CTL8421 m_tms5100->ctl_w(data & 0xf); @@ -126,19 +126,19 @@ WRITE8_MEMBER(eva24_state::write_d) // EVA-11 -WRITE16_MEMBER(eva11_state::write_r) +void eva11_state::write_r(u16 data) { // R7: TMS5100 PDC pin m_tms5100->pdc_w(data >> 7 & 1); } -WRITE16_MEMBER(eva11_state::write_o) +void eva11_state::write_o(u16 data) { // O3210: TMS5100 CTL8421 m_tms5100->ctl_w(data & 0xf); } -READ8_MEMBER(eva11_state::read_k) +u8 eva11_state::read_k() { // K84: TMS5100 CTL81(O30) u8 ctl = m_tms5100->ctl_r(); diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp index 8e94da7359d..057cd731b97 100644 --- a/src/mame/drivers/firefox.cpp +++ b/src/mame/drivers/firefox.cpp @@ -96,8 +96,8 @@ private: DECLARE_WRITE8_MEMBER(self_reset_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_right_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_left_w); - DECLARE_READ8_MEMBER(riot_porta_r); - DECLARE_WRITE8_MEMBER(riot_porta_w); + uint8_t riot_porta_r(); + void riot_porta_w(uint8_t data); TILE_GET_INFO_MEMBER(bgtile_get_info); uint32_t screen_update_firefox(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(video_timer_callback); @@ -345,7 +345,7 @@ WRITE_LINE_MEMBER(firefox_state::sound_reset_w) * *************************************/ -READ8_MEMBER(firefox_state::riot_porta_r) +uint8_t firefox_state::riot_porta_r() { /* bit 7 = MAINFLAG */ /* bit 6 = SOUNDFLAG */ @@ -359,7 +359,7 @@ READ8_MEMBER(firefox_state::riot_porta_r) return (m_soundlatch->pending_r() ? 0x80 : 0x00) | (m_soundlatch2->pending_r() ? 0x40 : 0x00) | 0x10 | (m_tms->readyq_r() << 2); } -WRITE8_MEMBER(firefox_state::riot_porta_w) +void firefox_state::riot_porta_w(uint8_t data) { /* handle 5220 read */ m_tms->rsq_w((data>>1) & 1); diff --git a/src/mame/drivers/foodf.cpp b/src/mame/drivers/foodf.cpp index d23a6b336bb..6f3f3ce2e85 100644 --- a/src/mame/drivers/foodf.cpp +++ b/src/mame/drivers/foodf.cpp @@ -326,7 +326,7 @@ GFXDECODE_END * *************************************/ -READ8_MEMBER(foodf_state::pot_r) +uint8_t foodf_state::pot_r(offs_t offset) { return (ioport("DSW")->read() >> offset) << 7; } diff --git a/src/mame/drivers/forte2.cpp b/src/mame/drivers/forte2.cpp index ff12238af46..b9ffadaca49 100644 --- a/src/mame/drivers/forte2.cpp +++ b/src/mame/drivers/forte2.cpp @@ -55,14 +55,16 @@ public: void init_pesadelo(); void pesadelo(machine_config &config); -private: +protected: virtual void machine_start() override; virtual void machine_reset() override; + +private: void io_mem(address_map &map); void program_mem(address_map &map); - DECLARE_READ8_MEMBER(ay8910_read_input); - DECLARE_WRITE8_MEMBER(ay8910_set_input_mask); + uint8_t ay8910_read_input(); + void ay8910_set_input_mask(uint8_t data); required_device m_maincpu; @@ -101,12 +103,12 @@ static INPUT_PORTS_START( pesadelo ) INPUT_PORTS_END -READ8_MEMBER(forte2_state::ay8910_read_input) +uint8_t forte2_state::ay8910_read_input() { return ioport("IN0")->read() | (m_input_mask & 0x3f); } -WRITE8_MEMBER(forte2_state::ay8910_set_input_mask) +void forte2_state::ay8910_set_input_mask(uint8_t data) { /* PSG reg 15, writes 0 at coin insert, 0xff at boot and game over */ m_input_mask = data; diff --git a/src/mame/drivers/ht6000.cpp b/src/mame/drivers/ht6000.cpp index 557736b4f89..c679a55b1d9 100644 --- a/src/mame/drivers/ht6000.cpp +++ b/src/mame/drivers/ht6000.cpp @@ -42,7 +42,7 @@ private: void maincpu_map(address_map &map); - DECLARE_WRITE8_MEMBER(port_a_w); + void port_a_w(uint8_t data); DECLARE_WRITE8_MEMBER(music_w); DECLARE_WRITE8_MEMBER(pg1_w); @@ -223,7 +223,7 @@ INPUT_PORTS_END // MACHINE EMULATION //************************************************************************** -WRITE8_MEMBER( ht6000_state::port_a_w ) +void ht6000_state::port_a_w(uint8_t data) { logerror("port_a_w: %02x\n", data); m_port_a = data; diff --git a/src/mame/drivers/intellect02.cpp b/src/mame/drivers/intellect02.cpp index cd18f788260..ef6a345d858 100644 --- a/src/mame/drivers/intellect02.cpp +++ b/src/mame/drivers/intellect02.cpp @@ -88,9 +88,9 @@ private: // I/O handlers void update_display(); - DECLARE_READ8_MEMBER(input_r); - DECLARE_WRITE8_MEMBER(digit_w); - DECLARE_WRITE8_MEMBER(control_w); + u8 input_r(); + void digit_w(u8 data); + void control_w(u8 data); u8 m_digit_data; u8 m_led_select; @@ -128,7 +128,7 @@ void intel02_state::update_display() m_display->matrix(m_led_select, m_digit_data); } -READ8_MEMBER(intel02_state::input_r) +u8 intel02_state::input_r() { // d0-d3: buttons through a maze of logic gates // basically giving each button its own 4-bit scancode @@ -138,14 +138,14 @@ READ8_MEMBER(intel02_state::input_r) return data | (~m_inputs[1]->read() << 4 & 0xf0); } -WRITE8_MEMBER(intel02_state::digit_w) +void intel02_state::digit_w(u8 data) { // d0-d6: digit segment data, d7: N/C m_digit_data = bitswap<7>(data,0,1,2,3,4,5,6); update_display(); } -WRITE8_MEMBER(intel02_state::control_w) +void intel02_state::control_w(u8 data) { // d0-d5: select digit/leds m_led_select = data; diff --git a/src/mame/drivers/jack.cpp b/src/mame/drivers/jack.cpp index 55c17ff96ee..51846a21063 100644 --- a/src/mame/drivers/jack.cpp +++ b/src/mame/drivers/jack.cpp @@ -96,7 +96,7 @@ Stephh's Notes: * *************************************/ -READ8_MEMBER(jack_state::timer_r) +uint8_t jack_state::timer_r() { /* wrong! there should be no need for timer_rate, the same function */ /* should work for both games */ diff --git a/src/mame/drivers/jtc.cpp b/src/mame/drivers/jtc.cpp index 47e3b5627c6..5b98e9513ee 100644 --- a/src/mame/drivers/jtc.cpp +++ b/src/mame/drivers/jtc.cpp @@ -51,9 +51,9 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER( p2_w ); - DECLARE_READ8_MEMBER( p3_r ); - DECLARE_WRITE8_MEMBER( p3_w ); + void p2_w(uint8_t data); + uint8_t p3_r(); + void p3_w(uint8_t data); void es40_palette(palette_device &palette) const; DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); @@ -123,7 +123,7 @@ private: /* Read/Write Handlers */ -WRITE8_MEMBER( jtc_state::p2_w ) +void jtc_state::p2_w(uint8_t data) { /* @@ -148,7 +148,7 @@ DECLARE_WRITE_LINE_MEMBER( jtc_state::write_centronics_busy ) m_centronics_busy = state; } -READ8_MEMBER( jtc_state::p3_r ) +uint8_t jtc_state::p3_r() { /* @@ -169,7 +169,7 @@ READ8_MEMBER( jtc_state::p3_r ) return data; } -WRITE8_MEMBER( jtc_state::p3_w ) +void jtc_state::p3_w(uint8_t data) { /* diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp index b6d6f08826b..3cc27b6af46 100644 --- a/src/mame/drivers/jupace.cpp +++ b/src/mame/drivers/jupace.cpp @@ -114,8 +114,8 @@ private: DECLARE_WRITE8_MEMBER( ppi_pc_w ); DECLARE_READ8_MEMBER( ppi_control_r ); DECLARE_WRITE8_MEMBER( ppi_control_w ); - DECLARE_READ8_MEMBER( pio_pa_r ); - DECLARE_WRITE8_MEMBER( pio_pa_w ); + uint8_t pio_pa_r(); + void pio_pa_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(set_irq); TIMER_DEVICE_CALLBACK_MEMBER(clear_irq); @@ -127,8 +127,8 @@ private: DECLARE_WRITE8_MEMBER(pio_bd_w); DECLARE_WRITE8_MEMBER(pio_ac_w); DECLARE_WRITE8_MEMBER(pio_bc_w); - DECLARE_READ8_MEMBER(sby_r); - DECLARE_WRITE8_MEMBER(ald_w); + uint8_t sby_r(); + void ald_w(uint8_t data); DECLARE_SNAPSHOT_LOAD_MEMBER(snapshot_cb); void ace_io(address_map &map); @@ -626,7 +626,7 @@ uint32_t ace_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c // I8255A interface //------------------------------------------------- -READ8_MEMBER(ace_state::sby_r) +uint8_t ace_state::sby_r() { /* @@ -646,7 +646,7 @@ READ8_MEMBER(ace_state::sby_r) return m_sp0256->sby_r(); } -WRITE8_MEMBER(ace_state::ald_w) +void ace_state::ald_w(uint8_t data) { /* @@ -673,7 +673,7 @@ WRITE8_MEMBER(ace_state::ald_w) // Z80PIO //------------------------------------------------- -READ8_MEMBER( ace_state::pio_pa_r ) +uint8_t ace_state::pio_pa_r() { /* @@ -693,7 +693,7 @@ READ8_MEMBER( ace_state::pio_pa_r ) return 0; } -WRITE8_MEMBER( ace_state::pio_pa_w ) +void ace_state::pio_pa_w(uint8_t data) { /* diff --git a/src/mame/drivers/kenseim.cpp b/src/mame/drivers/kenseim.cpp index 315e852c589..156aa887a6d 100644 --- a/src/mame/drivers/kenseim.cpp +++ b/src/mame/drivers/kenseim.cpp @@ -217,21 +217,21 @@ private: // certain - DECLARE_WRITE8_MEMBER(mb8936_portc_w); // 20x LEDs + void mb8936_portc_w(uint8_t data); // 20x LEDs // uncertain - DECLARE_WRITE8_MEMBER(cpu_portc_w); // 4 bit out (lamps, coinlock etc.?) + void cpu_portc_w(uint8_t data); // 4 bit out (lamps, coinlock etc.?) - DECLARE_READ8_MEMBER(cpu_portd_r); // 4 bit in (comms flags from 68k) + uint8_t cpu_portd_r(); // 4 bit in (comms flags from 68k) - DECLARE_WRITE8_MEMBER(cpu_portd_w); // 4 bit out (command flags to 68k?) - DECLARE_WRITE8_MEMBER(cpu_porte_w); // 8 bit out (command to 68k?) + void cpu_portd_w(uint8_t data); // 4 bit out (command flags to 68k?) + void cpu_porte_w(uint8_t data); // 8 bit out (command to 68k?) - WRITE8_MEMBER(mb8936_porta_w); // maybe molesa output? (6-bits?) - WRITE8_MEMBER(mb8936_portb_w); // maybe molesb output? (6-bits?) - WRITE8_MEMBER(mb8936_portf_w); // maybe strobe output? + void mb8936_porta_w(uint8_t data); // maybe molesa output? (6-bits?) + void mb8936_portb_w(uint8_t data); // maybe molesb output? (6-bits?) + void mb8936_portf_w(uint8_t data); // maybe strobe output? void set_leds(uint32_t ledstates); @@ -269,7 +269,7 @@ void kenseim_state::set_leds(uint32_t ledstates) } // could be wrong -WRITE8_MEMBER(kenseim_state::mb8936_portc_w) +void kenseim_state::mb8936_portc_w(uint8_t data) { // I'm guessing these are the 20 'power meter' LEDs, 10 for each player? (it writes 42 times, with the last write being some terminator?) @@ -306,7 +306,7 @@ WRITE8_MEMBER(kenseim_state::mb8936_portc_w) } -WRITE8_MEMBER(kenseim_state::mb8936_porta_w) // maybe molesa output? (6-bits?) +void kenseim_state::mb8936_porta_w(uint8_t data) // maybe molesa output? (6-bits?) { //if (data&0xc0) printf("%s mb8936 write %02x to port A (mole output 1?)\n", machine().describe_context().c_str(), data); @@ -325,7 +325,7 @@ WRITE8_MEMBER(kenseim_state::mb8936_porta_w) // maybe molesa output? (6-bits?) } -WRITE8_MEMBER(kenseim_state::mb8936_portb_w) // maybe molesb output? (6-bits?) +void kenseim_state::mb8936_portb_w(uint8_t data) // maybe molesb output? (6-bits?) { //if (data&0xc0) printf("%s mb8936 write %02x to port B (mole output 2?)\n", machine().describe_context().c_str(), data); @@ -343,14 +343,14 @@ WRITE8_MEMBER(kenseim_state::mb8936_portb_w) // maybe molesb output? (6-bits?) } -WRITE8_MEMBER(kenseim_state::mb8936_portf_w) +void kenseim_state::mb8936_portf_w(uint8_t data) { // typically written when the 'moles' output is, maybe the 2 strobes? //printf("%s mb8936 write %02x to port F (strobe?)\n", machine().describe_context().c_str(), data); } -WRITE8_MEMBER(kenseim_state::cpu_portc_w) +void kenseim_state::cpu_portc_w(uint8_t data) { // port direction is set to 4-in 4-out // d4: coin counter @@ -422,7 +422,7 @@ WRITE16_MEMBER(kenseim_state::cps1_kensei_w) /* Z80 side COMMS reads */ -READ8_MEMBER(kenseim_state::cpu_portd_r) +uint8_t kenseim_state::cpu_portd_r() { // port direction is set to 4-in 4-out // d4: ACK @@ -434,7 +434,7 @@ READ8_MEMBER(kenseim_state::cpu_portd_r) /* Z80 side COMMS writes */ -WRITE8_MEMBER(kenseim_state::cpu_portd_w) +void kenseim_state::cpu_portd_w(uint8_t data) { // port direction is set to 4-in 4-out // d0: D9 @@ -446,7 +446,7 @@ WRITE8_MEMBER(kenseim_state::cpu_portd_w) m_to_68k_cmd_LVm = data >> 2 & 1; } -WRITE8_MEMBER(kenseim_state::cpu_porte_w) +void kenseim_state::cpu_porte_w(uint8_t data) { // DT1-DT8 m_to_68k_cmd_low = data; diff --git a/src/mame/drivers/kramermc.cpp b/src/mame/drivers/kramermc.cpp index d57a46d4efa..4e926af8ab2 100644 --- a/src/mame/drivers/kramermc.cpp +++ b/src/mame/drivers/kramermc.cpp @@ -84,9 +84,9 @@ private: virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_kramermc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(port_a_r); - DECLARE_READ8_MEMBER(port_b_r); - DECLARE_WRITE8_MEMBER(port_a_w); + uint8_t port_a_r(); + uint8_t port_b_r(); + void port_a_w(uint8_t data); required_device m_maincpu; required_device m_gfxdecode; required_shared_ptr m_videoram; @@ -187,18 +187,18 @@ static INPUT_PORTS_START( kramermc ) PORT_BIT(0xFF, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END -READ8_MEMBER(kramermc_state::port_a_r) +uint8_t kramermc_state::port_a_r() { return m_porta; } -READ8_MEMBER(kramermc_state::port_b_r) +uint8_t kramermc_state::port_b_r() { u8 key_row = (m_porta >> 1) & 7; return m_io_keyboard[key_row]->read(); } -WRITE8_MEMBER(kramermc_state::port_a_w) +void kramermc_state::port_a_w(uint8_t data) { m_porta = data; m_speaker->level_w(BIT(data, 5)); diff --git a/src/mame/drivers/madalien.cpp b/src/mame/drivers/madalien.cpp index fcd20dcfb1b..08134094254 100644 --- a/src/mame/drivers/madalien.cpp +++ b/src/mame/drivers/madalien.cpp @@ -57,11 +57,11 @@ WRITE8_MEMBER(madalien_state::madalien_output_w) } -WRITE8_MEMBER(madalien_state::madalien_portA_w) +void madalien_state::madalien_portA_w(uint8_t data) { m_discrete->write(MADALIEN_8910_PORTA, data); } -WRITE8_MEMBER(madalien_state::madalien_portB_w) +void madalien_state::madalien_portB_w(uint8_t data) { m_discrete->write(MADALIEN_8910_PORTB, data); } diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp index 1847673a668..2f7342b0dc7 100644 --- a/src/mame/drivers/mappy.cpp +++ b/src/mame/drivers/mappy.cpp @@ -681,6 +681,23 @@ void mappy_state::superpac_cpu2_map(address_map &map) map(0xe000, 0xffff).rom(); } +/* + The speech in Grobda might not be a standard Namco sound feature, but rather a hack. + The hardware automatically cycles the bottom 6 address lines of sound RAM, so they + probably added a latch loaded when the bottom 4 lines are 0010 (which corresponds + to locations not used by the sound hardware). + The program writes the same value to 0x02, 0x12, 0x22 and 0x32. + However, removing the 15XX from the board causes sound to disappear completely, so + the 15XX may still play some part in conveying speech to the DAC. +*/ + +void mappy_state::grobda_cpu2_map(address_map &map) +{ + superpac_cpu2_map(map); + + map(0x0002, 0x0002).w("dac", FUNC(dac_byte_interface::data_w)); +} + void mappy_state::phozon_cpu2_map(address_map &map) { map(0x0000, 0x03ff).rw(m_namco_15xx, FUNC(namco_15xx_device::sharedram_r), FUNC(namco_15xx_device::sharedram_w)); /* shared RAM with the main CPU + sound registers */ @@ -1401,6 +1418,8 @@ void mappy_state::grobda(machine_config &config) { superpac_common(config); + m_subcpu->set_addrmap(AS_PROGRAM, &mappy_state::grobda_cpu2_map); + NAMCO_58XX(config, m_namcoio[0], 0); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); @@ -2053,23 +2072,6 @@ ROM_START( motos ) ROM_END - -void mappy_state::init_grobda() -{ - /* The speech in Grobda might not be a standard Namco sound feature, but rather a hack. - The hardware automatically cycles the bottom 6 address lines of sound RAM, so they - probably added a latch loaded when the bottom 4 lines are 0010 (which corresponds - to locations not used by the sound hardware). - The program writes the same value to 0x02, 0x12, 0x22 and 0x32. - However, removing the 15XX from the board causes sound to disappear completely, so - the 15XX may still play some part in conveying speech to the DAC. - */ - write8_delegate dac_w(*this); - dac_w.set(*m_dac, FUNC(dac_byte_interface::data_w)); - m_subcpu->space(AS_PROGRAM).install_write_handler(0x0002, 0x0002, dac_w); -} - - void mappy_state::init_digdug2() { /* appears to not use the watchdog */ @@ -2083,9 +2085,9 @@ GAME( 1982, superpacm, superpac, superpac, superpac, mappy_state, empty_init, GAME( 1983, pacnpal, 0, pacnpal, pacnpal, mappy_state, empty_init, ROT90, "Namco", "Pac & Pal", MACHINE_SUPPORTS_SAVE ) GAME( 1983, pacnpal2, pacnpal, pacnpal, pacnpal, mappy_state, empty_init, ROT90, "Namco", "Pac & Pal (older)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, pacnchmp, pacnpal, pacnpal, pacnpal, mappy_state, empty_init, ROT90, "Namco", "Pac-Man & Chomp Chomp", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, grobda, 0, grobda, grobda, mappy_state, init_grobda, ROT90, "Namco", "Grobda (New Ver.)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, grobda2, grobda, grobda, grobda, mappy_state, init_grobda, ROT90, "Namco", "Grobda (Old Ver. set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, grobda3, grobda, grobda, grobda, mappy_state, init_grobda, ROT90, "Namco", "Grobda (Old Ver. set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, grobda, 0, grobda, grobda, mappy_state, empty_init, ROT90, "Namco", "Grobda (New Ver.)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, grobda2, grobda, grobda, grobda, mappy_state, empty_init, ROT90, "Namco", "Grobda (Old Ver. set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, grobda3, grobda, grobda, grobda, mappy_state, empty_init, ROT90, "Namco", "Grobda (Old Ver. set 2)", MACHINE_SUPPORTS_SAVE ) /* 3x6809, static tilemap, 2bpp sprites (Gaplus type) */ GAME( 1983, phozon, 0, phozon, phozon, mappy_state, empty_init, ROT90, "Namco", "Phozon (Japan)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp index 7fde774196d..b11f5caaab2 100644 --- a/src/mame/drivers/mc1000.cpp +++ b/src/mame/drivers/mc1000.cpp @@ -97,9 +97,9 @@ private: DECLARE_WRITE8_MEMBER( mc6847_attr_w ); DECLARE_WRITE_LINE_MEMBER( fs_w ); DECLARE_WRITE_LINE_MEMBER( hs_w ); - DECLARE_READ8_MEMBER( videoram_r ); - DECLARE_WRITE8_MEMBER( keylatch_w ); - DECLARE_READ8_MEMBER( keydata_r ); + uint8_t videoram_r(offs_t offset); + void keylatch_w(uint8_t data); + uint8_t keydata_r(); DECLARE_READ8_MEMBER( rom_banking_r ); void bankswitch(); @@ -389,7 +389,7 @@ WRITE_LINE_MEMBER( mc1000_state::hs_w ) m_hsync = state; } -READ8_MEMBER( mc1000_state::videoram_r ) +uint8_t mc1000_state::videoram_r(offs_t offset) { if (offset == ~0) return 0xff; @@ -400,14 +400,14 @@ READ8_MEMBER( mc1000_state::videoram_r ) /* AY-3-8910 Interface */ -WRITE8_MEMBER( mc1000_state::keylatch_w ) +void mc1000_state::keylatch_w(uint8_t data) { m_keylatch = data; m_cassette->output(BIT(data, 7) ? -1.0 : +1.0); } -READ8_MEMBER( mc1000_state::keydata_r ) +uint8_t mc1000_state::keydata_r() { uint8_t data = 0xff; diff --git a/src/mame/drivers/metalmx.cpp b/src/mame/drivers/metalmx.cpp index a702481129f..cbd88a338eb 100644 --- a/src/mame/drivers/metalmx.cpp +++ b/src/mame/drivers/metalmx.cpp @@ -355,7 +355,7 @@ WRITE32_MEMBER(metalmx_state::sound_data_w) m_cage->main_w(data >> 16); } -WRITE8_MEMBER(metalmx_state::cage_irq_callback) +void metalmx_state::cage_irq_callback(uint8_t data) { /* TODO */ } diff --git a/src/mame/drivers/mpu3.cpp b/src/mame/drivers/mpu3.cpp index 2da8102b82f..79b301e6b08 100644 --- a/src/mame/drivers/mpu3.cpp +++ b/src/mame/drivers/mpu3.cpp @@ -203,30 +203,30 @@ public: private: template DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); } - DECLARE_WRITE8_MEMBER(characteriser_w); - DECLARE_READ8_MEMBER(characteriser_r); - DECLARE_WRITE8_MEMBER(mpu3ptm_w); - DECLARE_READ8_MEMBER(mpu3ptm_r); + void characteriser_w(offs_t offset, uint8_t data); + uint8_t characteriser_r(offs_t offset); + void mpu3ptm_w(offs_t offset, uint8_t data); + uint8_t mpu3ptm_r(offs_t offset); DECLARE_WRITE_LINE_MEMBER(ic2_o1_callback); DECLARE_WRITE_LINE_MEMBER(ic2_o2_callback); DECLARE_WRITE_LINE_MEMBER(ic2_o3_callback); - DECLARE_READ8_MEMBER(pia_ic3_porta_r); - DECLARE_WRITE8_MEMBER(pia_ic3_portb_w); + uint8_t pia_ic3_porta_r(); + void pia_ic3_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_ic3_ca2_w); - DECLARE_READ8_MEMBER(pia_ic4_porta_r); - DECLARE_WRITE8_MEMBER(pia_ic4_porta_w); - DECLARE_WRITE8_MEMBER(pia_ic4_portb_w); + uint8_t pia_ic4_porta_r(); + void pia_ic4_porta_w(uint8_t data); + void pia_ic4_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_ic4_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic4_cb2_w); - DECLARE_WRITE8_MEMBER(pia_ic5_porta_w); - DECLARE_READ8_MEMBER(pia_ic5_portb_r); - DECLARE_WRITE8_MEMBER(pia_ic5_portb_w); + void pia_ic5_porta_w(uint8_t data); + uint8_t pia_ic5_portb_r(); + void pia_ic5_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_ic5_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic5_cb2_w); - DECLARE_READ8_MEMBER(pia_ic6_porta_r); - DECLARE_READ8_MEMBER(pia_ic6_portb_r); - DECLARE_WRITE8_MEMBER(pia_ic6_porta_w); - DECLARE_WRITE8_MEMBER(pia_ic6_portb_w); + uint8_t pia_ic6_porta_r(); + uint8_t pia_ic6_portb_r(); + void pia_ic6_porta_w(uint8_t data); + void pia_ic6_portb_w(uint8_t data); TIMER_CALLBACK_MEMBER(ic21_timeout); TIMER_DEVICE_CALLBACK_MEMBER(gen_50hz); TIMER_DEVICE_CALLBACK_MEMBER(ic10_callback); @@ -406,7 +406,7 @@ TIMER_CALLBACK_MEMBER(mpu3_state::ic21_timeout) ic21_output(0); } -READ8_MEMBER(mpu3_state::pia_ic3_porta_r) +uint8_t mpu3_state::pia_ic3_porta_r() { static const char *const portnames[] = { "ORANGE1", "ORANGE2", "BLACK1", "BLACK2", "DIL1", "DIL1", "DIL2", "DIL2" }; int data=0,swizzle; @@ -449,7 +449,7 @@ READ8_MEMBER(mpu3_state::pia_ic3_porta_r) return data; } -WRITE8_MEMBER(mpu3_state::pia_ic3_portb_w) +void mpu3_state::pia_ic3_portb_w(uint8_t data) { LOG(("%s: IC3 PIA Port B Set to %2x (Triac)\n", machine().describe_context(),data)); m_triac_ic3 =data; @@ -464,7 +464,7 @@ WRITE_LINE_MEMBER(mpu3_state::pia_ic3_ca2_w) ic11_update(); } -READ8_MEMBER(mpu3_state::pia_ic4_porta_r) +uint8_t mpu3_state::pia_ic4_porta_r() { if (m_ic11_active) { @@ -478,7 +478,7 @@ READ8_MEMBER(mpu3_state::pia_ic4_porta_r) } /* IC4, 7 seg leds */ -WRITE8_MEMBER(mpu3_state::pia_ic4_porta_w) +void mpu3_state::pia_ic4_porta_w(uint8_t data) { LOG(("%s: IC4 PIA Port A Set to %2x (DISPLAY PORT)\n", machine().describe_context(),data)); m_ic4_input_a=data; @@ -511,7 +511,7 @@ WRITE8_MEMBER(mpu3_state::pia_ic4_porta_w) } } -WRITE8_MEMBER(mpu3_state::pia_ic4_portb_w) +void mpu3_state::pia_ic4_portb_w(uint8_t data) { LOG(("%s: IC4 PIA Port B Set to %2x (Lamp)\n", machine().describe_context(),data)); if (m_ic11_active) @@ -544,7 +544,7 @@ WRITE_LINE_MEMBER(mpu3_state::pia_ic4_cb2_w) } /* IC5, AUX ports, coin lockouts and AY sound chip select (MODs below 4 only) */ -WRITE8_MEMBER(mpu3_state::pia_ic5_porta_w) +void mpu3_state::pia_ic5_porta_w(uint8_t data) { LOG(("%s: IC5 PIA Port A Set to %2x (Reel)\n", machine().describe_context(),data)); m_reels[0]->update( data & 0x03); @@ -557,7 +557,7 @@ WRITE8_MEMBER(mpu3_state::pia_ic5_porta_w) awp_draw_reel(machine(),"reel4", *m_reels[3]); } -READ8_MEMBER(mpu3_state::pia_ic5_portb_r) +uint8_t mpu3_state::pia_ic5_portb_r() { if (m_ic3_data & 0x80 ) { @@ -571,7 +571,7 @@ READ8_MEMBER(mpu3_state::pia_ic5_portb_r) -WRITE8_MEMBER(mpu3_state::pia_ic5_portb_w) +void mpu3_state::pia_ic5_portb_w(uint8_t data) { m_ic3_data = data; } @@ -591,18 +591,18 @@ WRITE_LINE_MEMBER(mpu3_state::pia_ic5_cb2_w) /* IC6, AUX ports*/ -READ8_MEMBER(mpu3_state::pia_ic6_porta_r) +uint8_t mpu3_state::pia_ic6_porta_r() { return (ioport("AUX1")->read())|m_aux1_input; } -READ8_MEMBER(mpu3_state::pia_ic6_portb_r) +uint8_t mpu3_state::pia_ic6_portb_r() { return (ioport("AUX2")->read())|m_aux2_input; } -WRITE8_MEMBER(mpu3_state::pia_ic6_porta_w) +void mpu3_state::pia_ic6_porta_w(uint8_t data) { LOG(("%s: IC6 PIA Port A Set to %2x (Alpha)\n", machine().describe_context(),data)); m_vfd->por((data & 0x08)); @@ -610,7 +610,7 @@ WRITE8_MEMBER(mpu3_state::pia_ic6_porta_w) m_vfd->sclk((data & 0x10) >>4); } -WRITE8_MEMBER(mpu3_state::pia_ic6_portb_w) +void mpu3_state::pia_ic6_portb_w(uint8_t data) { LOG(("%s: IC6 PIA Port B Set to %2x (AUX2)\n", machine().describe_context(),data)); m_aux2_input = data; @@ -739,7 +739,7 @@ The MPU3 characteriser is surprisingly simple to simulate, as it operates a call address of the PAL in memory varies between games. Once found, the memory location of the data table is easily found from the X register of the CPU. */ -WRITE8_MEMBER(mpu3_state::characteriser_w) +void mpu3_state::characteriser_w(offs_t offset, uint8_t data) { int x; int call=data; @@ -769,7 +769,7 @@ WRITE8_MEMBER(mpu3_state::characteriser_w) } -READ8_MEMBER(mpu3_state::characteriser_r) +uint8_t mpu3_state::characteriser_r(offs_t offset) { if (!m_current_chr_table) fatalerror("No Characteriser Table @ %04x\n", m_maincpu->pcbase()); @@ -802,12 +802,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(mpu3_state::ic10_callback) m_pia4->ca1_w(m_ic10_output); } -WRITE8_MEMBER(mpu3_state::mpu3ptm_w) +void mpu3_state::mpu3ptm_w(offs_t offset, uint8_t data) { m_ptm2->write(offset >>2,data);//((offset & 0x1f) >>2),data); } -READ8_MEMBER(mpu3_state::mpu3ptm_r) +uint8_t mpu3_state::mpu3ptm_r(offs_t offset) { return m_ptm2->read(offset >>2); } @@ -907,7 +907,7 @@ void mpu3_state::init_m3hprvpr() m_disp_func = METER_PORT; m_current_chr_table = hprvpr_data; - space.install_readwrite_handler(0xc000, 0xc000, read8_delegate(*this, FUNC(mpu3_state::characteriser_r)), write8_delegate(*this, FUNC(mpu3_state::characteriser_w))); + space.install_readwrite_handler(0xc000, 0xc000, read8sm_delegate(*this, FUNC(mpu3_state::characteriser_r)), write8sm_delegate(*this, FUNC(mpu3_state::characteriser_w))); } ROM_START( m3tst ) diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp index d29e1fb6681..abe00bc44b4 100644 --- a/src/mame/drivers/mpu4vid.cpp +++ b/src/mame/drivers/mpu4vid.cpp @@ -290,7 +290,7 @@ private: DECLARE_WRITE_LINE_MEMBER(vid_o1_callback); DECLARE_WRITE_LINE_MEMBER(vid_o2_callback); DECLARE_WRITE_LINE_MEMBER(vid_o3_callback); - DECLARE_READ8_MEMBER(pia_ic5_porta_track_r); + uint8_t pia_ic5_porta_track_r(); void mpu4vid_char_cheat( int address); DECLARE_WRITE_LINE_MEMBER(update_mpu68_interrupts); DECLARE_READ16_MEMBER( mpu4_vid_vidram_r ); @@ -531,7 +531,7 @@ READ8_MEMBER(mpu4vid_state::bt471_r ) * *************************************/ -READ8_MEMBER(mpu4vid_state::pia_ic5_porta_track_r) +uint8_t mpu4vid_state::pia_ic5_porta_track_r() { /* The SWP trackball interface connects a standard trackball to the AUX1 port on the MPU4 mainboard. As per usual, they've taken the cheap route here, reading and processing the diff --git a/src/mame/drivers/nanos.cpp b/src/mame/drivers/nanos.cpp index 02946e1ca25..43ed2d29351 100644 --- a/src/mame/drivers/nanos.cpp +++ b/src/mame/drivers/nanos.cpp @@ -65,9 +65,9 @@ private: DECLARE_WRITE_LINE_MEMBER(ctc_z2_w); TIMER_DEVICE_CALLBACK_MEMBER(keyboard_callback); DECLARE_WRITE_LINE_MEMBER(z80daisy_interrupt); - DECLARE_READ8_MEMBER(port_a_r); - DECLARE_READ8_MEMBER(port_b_r); - DECLARE_WRITE8_MEMBER(port_b_w); + uint8_t port_a_r(); + uint8_t port_b_r(); + void port_b_w(uint8_t data); DECLARE_FLOPPY_FORMATS(floppy_formats); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -302,7 +302,7 @@ uint32_t nanos_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -READ8_MEMBER(nanos_state::port_a_r) +uint8_t nanos_state::port_a_r() { if (m_key_command==0) { return m_key_pressed; @@ -313,13 +313,13 @@ READ8_MEMBER(nanos_state::port_a_r) } } -READ8_MEMBER(nanos_state::port_b_r) +uint8_t nanos_state::port_b_r() { return 0xff; } -WRITE8_MEMBER(nanos_state::port_b_w) +void nanos_state::port_b_w(uint8_t data) { m_key_command = BIT(data,1); if (BIT(data,7)) { diff --git a/src/mame/drivers/nightmare.cpp b/src/mame/drivers/nightmare.cpp index 5ec73035356..8993b05edb7 100644 --- a/src/mame/drivers/nightmare.cpp +++ b/src/mame/drivers/nightmare.cpp @@ -240,7 +240,7 @@ protected: DECLARE_READ_LINE_MEMBER( ef1_r ); DECLARE_READ_LINE_MEMBER( ef2_r ); DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_WRITE8_MEMBER( ic10_w ); + void ic10_w(uint8_t data); DECLARE_WRITE8_MEMBER( unkout_w ); void nightmare_map(address_map &map); @@ -316,7 +316,7 @@ READ_LINE_MEMBER( nightmare_state::ef2_r ) } -WRITE8_MEMBER( nightmare_state::ic10_w ) +void nightmare_state::ic10_w(uint8_t data) { /* 7 - EEPROM Di diff --git a/src/mame/drivers/okean240.cpp b/src/mame/drivers/okean240.cpp index 3faf605f317..5a2f8c05b45 100644 --- a/src/mame/drivers/okean240.cpp +++ b/src/mame/drivers/okean240.cpp @@ -91,15 +91,15 @@ private: DECLARE_READ8_MEMBER(okean240_kbd_status_r); DECLARE_READ8_MEMBER(okean240a_kbd_status_r); DECLARE_READ8_MEMBER(term_status_r); - DECLARE_READ8_MEMBER(term_r); - DECLARE_READ8_MEMBER(okean240_port40_r); - DECLARE_READ8_MEMBER(okean240_port41_r); - DECLARE_WRITE8_MEMBER(okean240_port42_w); - DECLARE_READ8_MEMBER(okean240a_port40_r); - DECLARE_READ8_MEMBER(okean240a_port41_r); - DECLARE_READ8_MEMBER(okean240a_port42_r); + uint8_t term_r(); + uint8_t okean240_port40_r(); + uint8_t okean240_port41_r(); + void okean240_port42_w(uint8_t data); + uint8_t okean240a_port40_r(); + uint8_t okean240a_port41_r(); + uint8_t okean240a_port42_r(); void kbd_put(u8 data); - DECLARE_WRITE8_MEMBER(scroll_w); + void scroll_w(uint8_t data); uint32_t screen_update_okean240(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void okean240_io(address_map &map); @@ -154,20 +154,20 @@ READ8_MEMBER(okean240_state::term_status_r) return (m_term_data) ? 3 : 1; } -READ8_MEMBER(okean240_state::okean240_port40_r) +uint8_t okean240_state::okean240_port40_r() { // port 40 (get ascii key value) - return term_r(space, offset); + return term_r(); } -READ8_MEMBER(okean240_state::okean240_port41_r) +uint8_t okean240_state::okean240_port41_r() { // port 41 bit 1 (test rom status bit) m_tog ^= 6; return m_tog; } -READ8_MEMBER(okean240_state::okean240a_port40_r) +uint8_t okean240_state::okean240a_port40_r() { // port 40 (get a column) for (uint8_t i = 0; i < 11; i++) @@ -184,7 +184,7 @@ READ8_MEMBER(okean240_state::okean240a_port40_r) return 0; } -READ8_MEMBER(okean240_state::okean240a_port41_r) +uint8_t okean240_state::okean240a_port41_r() { // port 41 bits 6&7 (modifier keys), and bit 1 (test rom status bit) { @@ -193,7 +193,7 @@ READ8_MEMBER(okean240_state::okean240a_port41_r) } } -READ8_MEMBER(okean240_state::okean240a_port42_r) +uint8_t okean240_state::okean240a_port42_r() { // port 42 (get a row) for (uint8_t i = 0; i < 11; i++) @@ -206,21 +206,21 @@ READ8_MEMBER(okean240_state::okean240a_port42_r) // This is a keyboard acknowledge pulse, it goes high then // straightaway low, if reading port 40 indicates a key is pressed. -WRITE8_MEMBER(okean240_state::okean240_port42_w) +void okean240_state::okean240_port42_w(uint8_t data) { // okean240: port 42 bit 7 // okean240a: port 42 bit 4 } // for test rom -READ8_MEMBER(okean240_state::term_r) +uint8_t okean240_state::term_r() { uint8_t ret = m_term_data; m_term_data = 0; return ret; } -WRITE8_MEMBER(okean240_state::scroll_w) +void okean240_state::scroll_w(uint8_t data) { m_scroll = data; } diff --git a/src/mame/drivers/pb1000.cpp b/src/mame/drivers/pb1000.cpp index 001c41881f4..a9b9f4b52da 100644 --- a/src/mame/drivers/pb1000.cpp +++ b/src/mame/drivers/pb1000.cpp @@ -65,16 +65,13 @@ private: memory_region *m_card2_reg; virtual void machine_start() override; - DECLARE_WRITE16_MEMBER( gatearray_w ); - DECLARE_WRITE8_MEMBER( lcd_control ); - DECLARE_READ8_MEMBER( lcd_data_r ); - DECLARE_WRITE8_MEMBER( lcd_data_w ); - DECLARE_READ16_MEMBER( pb1000_kb_r ); - DECLARE_READ16_MEMBER( pb2000c_kb_r ); - DECLARE_WRITE8_MEMBER( kb_matrix_w ); - DECLARE_READ8_MEMBER( pb1000_port_r ); - DECLARE_READ8_MEMBER( pb2000c_port_r ); - DECLARE_WRITE8_MEMBER( port_w ); + void gatearray_w(offs_t offset, uint16_t data); + uint16_t pb1000_kb_r(); + uint16_t pb2000c_kb_r(); + void kb_matrix_w(uint8_t data); + uint8_t pb1000_port_r(); + uint8_t pb2000c_port_r(); + void port_w(uint8_t data); uint16_t read_touchscreen(uint8_t line); void pb1000_palette(palette_device &palette) const; TIMER_CALLBACK_MEMBER(keyboard_timer); @@ -330,7 +327,7 @@ static GFXDECODE_START( gfx_pb1000 ) GFXDECODE_ENTRY( "hd44352", 0x0000, pb1000_charlayout, 0, 1 ) GFXDECODE_END -WRITE16_MEMBER( pb1000_state::gatearray_w ) +void pb1000_state::gatearray_w(offs_t offset, uint16_t data) { m_gatearray[offset] = data&0xff; @@ -342,24 +339,6 @@ WRITE16_MEMBER( pb1000_state::gatearray_w ) membank("bank1")->set_base(m_rom_reg->base()); } -WRITE8_MEMBER( pb1000_state::lcd_control ) -{ - m_hd44352->control_write(data); -} - - -READ8_MEMBER( pb1000_state::lcd_data_r ) -{ - return m_hd44352->data_read(); -} - - -WRITE8_MEMBER( pb1000_state::lcd_data_w ) -{ - m_hd44352->data_write(data); -} - - uint16_t pb1000_state::read_touchscreen(uint8_t line) { uint8_t x = ioport("POSX")->read()/0x40; @@ -375,7 +354,7 @@ uint16_t pb1000_state::read_touchscreen(uint8_t line) } -READ16_MEMBER( pb1000_state::pb1000_kb_r ) +uint16_t pb1000_state::pb1000_kb_r() { static const char *const bitnames[] = {"NULL", "KO1", "KO2", "KO3", "KO4", "KO5", "KO6", "KO7", "KO8", "KO9", "KO10", "KO11", "KO12", "NULL", "NULL", "NULL"}; uint16_t data = 0; @@ -399,7 +378,7 @@ READ16_MEMBER( pb1000_state::pb1000_kb_r ) return data; } -READ16_MEMBER( pb1000_state::pb2000c_kb_r ) +uint16_t pb1000_state::pb2000c_kb_r() { static const char *const bitnames[] = {"NULL", "KO1", "KO2", "KO3", "KO4", "KO5", "KO6", "KO7", "KO8", "KO9", "KO10", "KO11", "KO12", "NULL", "NULL", "NULL"}; uint16_t data = 0; @@ -421,7 +400,7 @@ READ16_MEMBER( pb1000_state::pb2000c_kb_r ) return data; } -WRITE8_MEMBER( pb1000_state::kb_matrix_w ) +void pb1000_state::kb_matrix_w(uint8_t data) { if (data & 0x80) { @@ -442,19 +421,19 @@ WRITE8_MEMBER( pb1000_state::kb_matrix_w ) m_kb_matrix = data; } -READ8_MEMBER( pb1000_state::pb1000_port_r ) +uint8_t pb1000_state::pb1000_port_r() { //TODO return 0x00; } -READ8_MEMBER( pb1000_state::pb2000c_port_r ) +uint8_t pb1000_state::pb2000c_port_r() { //TODO return 0xfc; } -WRITE8_MEMBER( pb1000_state::port_w ) +void pb1000_state::port_w(uint8_t data) { m_beeper->set_state((BIT(data,7) ^ BIT(data,6))); //printf("%x\n", data); @@ -487,9 +466,9 @@ void pb1000_state::pb1000(machine_config &config) /* basic machine hardware */ HD61700(config, m_maincpu, 910000); m_maincpu->set_addrmap(AS_PROGRAM, &pb1000_state::pb1000_mem); - m_maincpu->lcd_ctrl().set(FUNC(pb1000_state::lcd_control)); - m_maincpu->lcd_read().set(FUNC(pb1000_state::lcd_data_r)); - m_maincpu->lcd_write().set(FUNC(pb1000_state::lcd_data_w)); + m_maincpu->lcd_ctrl().set(m_hd44352, FUNC(hd44352_device::control_write)); + m_maincpu->lcd_read().set(m_hd44352, FUNC(hd44352_device::data_read)); + m_maincpu->lcd_write().set(m_hd44352, FUNC(hd44352_device::data_write)); m_maincpu->kb_read().set(FUNC(pb1000_state::pb1000_kb_r)); m_maincpu->kb_write().set(FUNC(pb1000_state::kb_matrix_w)); m_maincpu->port_read().set(FUNC(pb1000_state::pb1000_port_r)); diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp index 738d713a819..957c677a08b 100644 --- a/src/mame/drivers/pcm.cpp +++ b/src/mame/drivers/pcm.cpp @@ -86,9 +86,9 @@ public: void pcm(machine_config &config); private: - DECLARE_READ8_MEMBER( pcm_85_r ); + uint8_t pcm_85_r(); DECLARE_WRITE_LINE_MEMBER( pcm_82_w ); - DECLARE_WRITE8_MEMBER( pcm_85_w ); + void pcm_85_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void pcm_io(address_map &map); @@ -139,7 +139,7 @@ There is also a HALT LED, connected directly to the processor. */ -READ8_MEMBER( pcm_state::pcm_85_r ) +uint8_t pcm_state::pcm_85_r() { uint8_t data = m_85 & 0x7f; @@ -149,7 +149,7 @@ READ8_MEMBER( pcm_state::pcm_85_r ) return data; } -WRITE8_MEMBER( pcm_state::pcm_85_w ) +void pcm_state::pcm_85_w(uint8_t data) { if (BIT(data, 5)) m_cass->change_state(CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR); diff --git a/src/mame/drivers/pet.cpp b/src/mame/drivers/pet.cpp index 1e7cfbfda0a..944f39c3d7f 100644 --- a/src/mame/drivers/pet.cpp +++ b/src/mame/drivers/pet.cpp @@ -241,18 +241,18 @@ public: void pet2001(machine_config &config); void pet2001n32(machine_config &config); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); - DECLARE_WRITE8_MEMBER( via_pa_w ); - DECLARE_READ8_MEMBER( via_pb_r ); - DECLARE_WRITE8_MEMBER( via_pb_w ); + void via_pa_w(uint8_t data); + uint8_t via_pb_r(); + void via_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( via_ca2_w ); DECLARE_WRITE_LINE_MEMBER( via_cb2_w ); - DECLARE_READ8_MEMBER( pia1_pa_r ); - DECLARE_READ8_MEMBER( pia1_pb_r ); - DECLARE_WRITE8_MEMBER( pia1_pa_w ); + uint8_t pia1_pa_r(); + uint8_t pia1_pb_r(); + void pia1_pa_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( pia1_ca2_w ); DECLARE_WRITE_LINE_MEMBER( user_diag_w ); @@ -366,7 +366,7 @@ public: void pet4016(machine_config &config); protected: - DECLARE_READ8_MEMBER( pia1_pb_r ); + uint8_t pia1_pb_r(); }; @@ -446,8 +446,8 @@ private: int &cswff, int &cs9, int &csa, int &csio, int &cse, int &cskb, int &fa12, int &casena1); void read_pla2_eprom(offs_t offset, int phi2, int brw, int casena1, int &endra, int &noscreen, int &casena2, int &fa15); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); uint8_t m_cr; void cbm8296_mem(address_map &map); @@ -494,7 +494,7 @@ void pet_state::update_speaker() // read - //------------------------------------------------- -READ8_MEMBER( pet_state::read ) +uint8_t pet_state::read(offs_t offset) { int sel = offset >> 12; int norom = m_exp->norom_r(offset, sel); @@ -592,7 +592,7 @@ READ8_MEMBER( pet_state::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( pet_state::write ) +void pet_state::write(offs_t offset, uint8_t data) { int sel = offset >> 12; @@ -723,7 +723,7 @@ void cbm8296_state::read_pla2_eprom(offs_t offset, int phi2, int brw, int casena // read - //------------------------------------------------- -READ8_MEMBER( cbm8296_state::read ) +uint8_t cbm8296_state::read(offs_t offset) { int norom = m_exp->norom_r(offset, offset >> 12) && !BIT(m_cr, 7); int phi2 = 1, brw = 1, noscreen = 1, noio = BIT(m_cr, 6); @@ -804,7 +804,7 @@ READ8_MEMBER( cbm8296_state::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( cbm8296_state::write ) +void cbm8296_state::write(offs_t offset, uint8_t data) { int norom = m_exp->norom_r(offset, offset >> 12) && !BIT(m_cr, 7); int phi2 = 1, brw = 0, noscreen = 1, noio = BIT(m_cr, 6); @@ -1121,7 +1121,7 @@ INPUT_PORTS_END // DEVICE CONFIGURATION //************************************************************************** -WRITE8_MEMBER( pet_state::via_pa_w ) +void pet_state::via_pa_w(uint8_t data) { m_user->write_c((data>>0)&1); m_user->write_d((data>>1)&1); @@ -1135,7 +1135,7 @@ WRITE8_MEMBER( pet_state::via_pa_w ) m_via_pa = data; } -READ8_MEMBER( pet_state::via_pb_r ) +uint8_t pet_state::via_pb_r() { /* @@ -1165,7 +1165,7 @@ READ8_MEMBER( pet_state::via_pb_r ) return data; } -WRITE8_MEMBER( pet_state::via_pb_w ) +void pet_state::via_pb_w(uint8_t data) { /* @@ -1206,7 +1206,7 @@ WRITE_LINE_MEMBER( pet_state::via_cb2_w ) } -READ8_MEMBER( pet_state::pia1_pa_r ) +uint8_t pet_state::pia1_pa_r() { /* @@ -1241,7 +1241,7 @@ READ8_MEMBER( pet_state::pia1_pa_r ) return data; } -WRITE8_MEMBER( pet_state::pia1_pa_w ) +void pet_state::pia1_pa_w(uint8_t data) { /* @@ -1266,7 +1266,7 @@ WRITE8_MEMBER( pet_state::pia1_pa_w ) update_speaker(); } -READ8_MEMBER( pet_state::pia1_pb_r ) +uint8_t pet_state::pia1_pb_r() { uint8_t data = 0xff; @@ -1287,7 +1287,7 @@ READ8_MEMBER( pet_state::pia1_pb_r ) return data; } -READ8_MEMBER( pet2001b_state::pia1_pb_r ) +uint8_t pet2001b_state::pia1_pb_r() { uint8_t data = 0xff; diff --git a/src/mame/drivers/pk8000.cpp b/src/mame/drivers/pk8000.cpp index 2c4c86631d4..0378f3394db 100644 --- a/src/mame/drivers/pk8000.cpp +++ b/src/mame/drivers/pk8000.cpp @@ -51,11 +51,11 @@ public: private: uint8_t m_keyboard_line; - DECLARE_READ8_MEMBER(joy_1_r); - DECLARE_READ8_MEMBER(joy_2_r); - DECLARE_WRITE8_MEMBER(_80_porta_w); - DECLARE_READ8_MEMBER(_80_portb_r); - DECLARE_WRITE8_MEMBER(_80_portc_w); + uint8_t joy_1_r(); + uint8_t joy_2_r(); + void _80_porta_w(uint8_t data); + uint8_t _80_portb_r(); + void _80_portc_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; @@ -149,12 +149,12 @@ void pk8000_state::set_bank(uint8_t data) break; } } -WRITE8_MEMBER(pk8000_state::_80_porta_w) +void pk8000_state::_80_porta_w(uint8_t data) { set_bank(data); } -READ8_MEMBER(pk8000_state::_80_portb_r) +uint8_t pk8000_state::_80_portb_r() { if(m_keyboard_line>9) { return 0xff; @@ -162,7 +162,7 @@ READ8_MEMBER(pk8000_state::_80_portb_r) return m_keyboard[m_keyboard_line]->read(); } -WRITE8_MEMBER(pk8000_state::_80_portc_w) +void pk8000_state::_80_portc_w(uint8_t data) { m_keyboard_line = data & 0x0f; @@ -172,13 +172,13 @@ WRITE8_MEMBER(pk8000_state::_80_portc_w) m_cassette->output((BIT(data, 6)) ? +1.0 : 0.0); } -READ8_MEMBER(pk8000_state::joy_1_r) +uint8_t pk8000_state::joy_1_r() { uint8_t retVal = (m_cassette->input() > 0.0038 ? 0x80 : 0); retVal |= m_io_joy1->read() & 0x7f; return retVal; } -READ8_MEMBER(pk8000_state::joy_2_r) +uint8_t pk8000_state::joy_2_r() { uint8_t retVal = (m_cassette->input() > 0.0038 ? 0x80 : 0); retVal |= m_io_joy2->read() & 0x7f; diff --git a/src/mame/drivers/plus4.cpp b/src/mame/drivers/plus4.cpp index 138418eeca5..0baa1aebd41 100644 --- a/src/mame/drivers/plus4.cpp +++ b/src/mame/drivers/plus4.cpp @@ -75,7 +75,7 @@ public: void plus4(machine_config &config); - DECLARE_WRITE8_MEMBER( cpu_w ); + void cpu_w(uint8_t data); protected: required_device m_maincpu; @@ -102,15 +102,15 @@ protected: virtual void machine_reset() override; void bankswitch(offs_t offset, int phi0, int mux, int ras, int *scs, int *phi2, int *user, int *_6551, int *addr_clk, int *keyport, int *kernal); - uint8_t read_memory(address_space &space, offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal); + uint8_t read_memory(offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( ted_videoram_r ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); + uint8_t ted_videoram_r(offs_t offset); - DECLARE_READ8_MEMBER( cpu_r ); + uint8_t cpu_r(); - DECLARE_READ8_MEMBER( ted_k_r ); + uint8_t ted_k_r(offs_t offset); DECLARE_WRITE_LINE_MEMBER( write_kb0 ) { if (state) m_kb |= 1; else m_kb &= ~1; } DECLARE_WRITE_LINE_MEMBER( write_kb1 ) { if (state) m_kb |= 2; else m_kb &= ~2; } @@ -165,7 +165,7 @@ public: void plus4n(machine_config &config); private: - DECLARE_READ8_MEMBER( cpu_r ); + uint8_t cpu_r(); }; @@ -271,10 +271,10 @@ void plus4_state::bankswitch(offs_t offset, int phi0, int mux, int ras, int *scs // read_memory - //------------------------------------------------- -uint8_t plus4_state::read_memory(address_space &space, offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal) +uint8_t plus4_state::read_memory(offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal) { int cs0 = 1, cs1 = 1, c1l = 1, c1h = 1, c2l = 1, c2h = 1; - uint8_t data = m_ted->read(space, offset, cs0, cs1); + uint8_t data = m_ted->read(offset, cs0, cs1); //logerror("offset %04x user %u 6551 %u addr_clk %u keyport %u kernal %u cs0 %u cs1 %u\n", offset,user,_6551,addr_clk,keyport,kernal,cs0,cs1); @@ -378,14 +378,14 @@ uint8_t plus4_state::read_memory(address_space &space, offs_t offset, int ba, in // read - //------------------------------------------------- -READ8_MEMBER( plus4_state::read ) +uint8_t plus4_state::read(offs_t offset) { int phi0 = 1, mux = 0, ras = 0, ba = 1; int scs, phi2, user, _6551, addr_clk, keyport, kernal; bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal); - return read_memory(space, offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal); + return read_memory(offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal); } @@ -393,7 +393,7 @@ READ8_MEMBER( plus4_state::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( plus4_state::write ) +void plus4_state::write(offs_t offset, uint8_t data) { int scs, phi2, user, _6551, addr_clk, keyport, kernal; int phi0 = 1, mux = 0, ras = 0, ba = 1; @@ -401,7 +401,7 @@ WRITE8_MEMBER( plus4_state::write ) bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal); - m_ted->write(space, offset, data, cs0, cs1); + m_ted->write(offset, data, cs0, cs1); //logerror("write offset %04x data %02x user %u 6551 %u addr_clk %u keyport %u kernal %u cs0 %u cs1 %u\n", offset,data,user,_6551,addr_clk,keyport,kernal,cs0,cs1); @@ -438,14 +438,14 @@ WRITE8_MEMBER( plus4_state::write ) // ted_videoram_r - //------------------------------------------------- -READ8_MEMBER( plus4_state::ted_videoram_r ) +uint8_t plus4_state::ted_videoram_r(offs_t offset) { int phi0 = 1, mux = 0, ras = 1, ba = 0; int scs, phi2, user, _6551, addr_clk, keyport, kernal; bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal); - return read_memory(space, offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal); + return read_memory(offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal); } @@ -603,7 +603,7 @@ INPUT_PORTS_END // M6510_INTERFACE( cpu_intf ) //------------------------------------------------- -READ8_MEMBER( plus4_state::cpu_r ) +uint8_t plus4_state::cpu_r() { /* @@ -634,7 +634,7 @@ READ8_MEMBER( plus4_state::cpu_r ) return data; } -READ8_MEMBER( c16_state::cpu_r ) +uint8_t c16_state::cpu_r() { /* @@ -665,7 +665,7 @@ READ8_MEMBER( c16_state::cpu_r ) return data; } -WRITE8_MEMBER( plus4_state::cpu_w ) +void plus4_state::cpu_w(uint8_t data) { /* @@ -705,7 +705,7 @@ WRITE8_MEMBER( plus4_state::cpu_w ) // ted7360_interface ted_intf //------------------------------------------------- -READ8_MEMBER( plus4_state::ted_k_r ) +uint8_t plus4_state::ted_k_r(offs_t offset) { /* diff --git a/src/mame/drivers/pofo.cpp b/src/mame/drivers/pofo.cpp index c9e4ca36fa7..693e1910b79 100644 --- a/src/mame/drivers/pofo.cpp +++ b/src/mame/drivers/pofo.cpp @@ -145,7 +145,7 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); TIMER_DEVICE_CALLBACK_MEMBER(system_tick); TIMER_DEVICE_CALLBACK_MEMBER(counter_tick); - DECLARE_READ8_MEMBER(hd61830_rd_r); + uint8_t hd61830_rd_r(offs_t offset); IRQ_CALLBACK_MEMBER(portfolio_int_ack); required_device m_maincpu; @@ -937,7 +937,7 @@ void portfolio_state::portfolio_palette(palette_device &palette) const // HD61830_INTERFACE( lcdc_intf ) //------------------------------------------------- -READ8_MEMBER( portfolio_state::hd61830_rd_r ) +uint8_t portfolio_state::hd61830_rd_r(offs_t offset) { offs_t address = ((offset & 0xff) << 4) | ((offset >> 12) & 0x0f); uint8_t data = m_char_rom[address]; diff --git a/src/mame/drivers/quantum.cpp b/src/mame/drivers/quantum.cpp index 89d16712a6e..f71fd25ad1c 100644 --- a/src/mame/drivers/quantum.cpp +++ b/src/mame/drivers/quantum.cpp @@ -73,13 +73,15 @@ public: void quantum(machine_config &config); -private: +protected: virtual void machine_start() override { m_leds.resolve(); } - DECLARE_READ16_MEMBER(trackball_r); - DECLARE_WRITE16_MEMBER(led_w); - DECLARE_WRITE16_MEMBER(nvram_recall_w); - DECLARE_READ8_MEMBER(input_1_r); - DECLARE_READ8_MEMBER(input_2_r); + +private: + uint16_t trackball_r(); + void led_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nvram_recall_w(uint16_t data); + uint8_t input_1_r(offs_t offset); + uint8_t input_2_r(offs_t offset); void main_map(address_map &map); required_device m_maincpu; @@ -99,19 +101,19 @@ static constexpr XTAL CLOCK_3KHZ = MASTER_CLOCK / 4096; * *************************************/ -READ16_MEMBER(quantum_state::trackball_r) +uint16_t quantum_state::trackball_r() { return (ioport("TRACKY")->read() << 4) | ioport("TRACKX")->read(); } -READ8_MEMBER(quantum_state::input_1_r) +uint8_t quantum_state::input_1_r(offs_t offset) { return (ioport("DSW0")->read() << (7 - (offset - pokey_device::POT0_C))) & 0x80; } -READ8_MEMBER(quantum_state::input_2_r) +uint8_t quantum_state::input_2_r(offs_t offset) { return (ioport("DSW1")->read() << (7 - (offset - pokey_device::POT0_C))) & 0x80; } @@ -124,7 +126,7 @@ READ8_MEMBER(quantum_state::input_2_r) * *************************************/ -WRITE16_MEMBER(quantum_state::led_w) +void quantum_state::led_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -146,7 +148,7 @@ WRITE16_MEMBER(quantum_state::led_w) } } -WRITE16_MEMBER(quantum_state::nvram_recall_w) +void quantum_state::nvram_recall_w(uint16_t data) { m_nvram->recall(1); m_nvram->recall(0); diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp index 9104616d519..969abc51896 100644 --- a/src/mame/drivers/rainbow.cpp +++ b/src/mame/drivers/rainbow.cpp @@ -515,7 +515,7 @@ protected: DECLARE_WRITE8_MEMBER(rtc_w); - DECLARE_READ8_MEMBER(read_video_ram_r); + uint8_t read_video_ram_r(offs_t offset); DECLARE_WRITE_LINE_MEMBER(video_interrupt); DECLARE_READ8_MEMBER(diagnostic_r); @@ -574,7 +574,7 @@ protected: DECLARE_WRITE_LINE_MEMBER(mpsc_irq); DECLARE_WRITE8_MEMBER(comm_bitrate_w); DECLARE_WRITE8_MEMBER(printer_bitrate_w); - DECLARE_WRITE8_MEMBER(bitrate_counter_w); + void bitrate_counter_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(dbrg_fr_w); DECLARE_WRITE_LINE_MEMBER(dbrg_ft_w); @@ -1437,7 +1437,7 @@ WRITE_LINE_MEMBER(rainbow_base_state::dbrg_ft_w) m_mpsc->txca_w(state); } -WRITE8_MEMBER(rainbow_base_state::bitrate_counter_w) +void rainbow_base_state::bitrate_counter_w(uint8_t data) { bool prt_rxtxc = BIT(data, 7 - m_printer_bitrate); bool kbd_rxtxc = BIT(data, 1); @@ -2520,7 +2520,7 @@ WRITE8_MEMBER(rainbow_base_state::z80_diskcontrol_w) } // --------- END OF Z80 -------------------- -READ8_MEMBER(rainbow_base_state::read_video_ram_r) +uint8_t rainbow_base_state::read_video_ram_r(offs_t offset) { return m_p_ram[offset]; } diff --git a/src/mame/drivers/rastersp.cpp b/src/mame/drivers/rastersp.cpp index aee37db812a..c710d312b08 100644 --- a/src/mame/drivers/rastersp.cpp +++ b/src/mame/drivers/rastersp.cpp @@ -129,8 +129,8 @@ private: DECLARE_WRITE32_MEMBER(dsp_486_int_w); DECLARE_READ32_MEMBER(dsp_speedup_r); DECLARE_WRITE32_MEMBER(dsp_speedup_w); - DECLARE_READ32_MEMBER(ncr53c700_read); - DECLARE_WRITE32_MEMBER(ncr53c700_write); + uint32_t ncr53c700_read(offs_t offset, uint32_t mem_mask = ~0); + void ncr53c700_write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(scsi_irq); TIMER_CALLBACK_MEMBER(tms_timer1); @@ -842,12 +842,12 @@ INPUT_PORTS_END * *************************************/ -READ32_MEMBER(rastersp_state::ncr53c700_read) +uint32_t rastersp_state::ncr53c700_read(offs_t offset, uint32_t mem_mask) { return m_maincpu->space(AS_PROGRAM).read_dword(offset, mem_mask); } -WRITE32_MEMBER(rastersp_state::ncr53c700_write) +void rastersp_state::ncr53c700_write(offs_t offset, uint32_t data, uint32_t mem_mask) { m_maincpu->space(AS_PROGRAM).write_dword(offset, data, mem_mask); } diff --git a/src/mame/drivers/royalmah.cpp b/src/mame/drivers/royalmah.cpp index 3502ecc4d29..33ebd9e4900 100644 --- a/src/mame/drivers/royalmah.cpp +++ b/src/mame/drivers/royalmah.cpp @@ -163,8 +163,8 @@ public: void init_janptr96(); private: - DECLARE_READ8_MEMBER(player_1_port_r); - DECLARE_READ8_MEMBER(player_2_port_r); + uint8_t player_1_port_r(); + uint8_t player_2_port_r(); DECLARE_WRITE8_MEMBER(input_port_select_w); DECLARE_WRITE8_MEMBER(royalmah_palbank_w); @@ -206,8 +206,8 @@ private: DECLARE_READ8_MEMBER(jansou_6405_r); DECLARE_WRITE8_MEMBER(jansou_sound_w); - DECLARE_WRITE8_MEMBER(janptr96_dswsel_w); - DECLARE_READ8_MEMBER(janptr96_dsw_r); + void janptr96_dswsel_w(uint8_t data); + uint8_t janptr96_dsw_r(); DECLARE_WRITE8_MEMBER(janptr96_rombank_w); DECLARE_WRITE8_MEMBER(janptr96_rambank_w); DECLARE_READ8_MEMBER(janptr96_unknown_r); @@ -217,31 +217,31 @@ private: DECLARE_READ8_MEMBER(mjifb_rom_io_r); DECLARE_WRITE8_MEMBER(mjifb_rom_io_w); DECLARE_WRITE8_MEMBER(mjifb_videoram_w); - DECLARE_READ8_MEMBER(mjifb_p3_r); - DECLARE_READ8_MEMBER(mjifb_p5_r); - DECLARE_READ8_MEMBER(mjifb_p6_r); - DECLARE_READ8_MEMBER(mjifb_p7_r); - DECLARE_READ8_MEMBER(mjifb_p8_r); - DECLARE_WRITE8_MEMBER(mjifb_p3_w); - DECLARE_WRITE8_MEMBER(mjifb_p4_w); - DECLARE_WRITE8_MEMBER(mjifb_p8_w); + uint8_t mjifb_p3_r(); + uint8_t mjifb_p5_r(); + uint8_t mjifb_p6_r(); + uint8_t mjifb_p7_r(); + uint8_t mjifb_p8_r(); + void mjifb_p3_w(uint8_t data); + void mjifb_p4_w(uint8_t data); + void mjifb_p8_w(uint8_t data); DECLARE_READ8_MEMBER(mjdejavu_rom_io_r); DECLARE_WRITE8_MEMBER(mjdejavu_rom_io_w); - DECLARE_READ8_MEMBER(mjtensin_p3_r); - DECLARE_WRITE8_MEMBER(mjtensin_p4_w); + uint8_t mjtensin_p3_r(); + void mjtensin_p4_w(uint8_t data); DECLARE_WRITE8_MEMBER(mjtensin_6ff3_w); - DECLARE_WRITE8_MEMBER(cafetime_p4_w); - DECLARE_WRITE8_MEMBER(cafetime_p3_w); + void cafetime_p4_w(uint8_t data); + void cafetime_p3_w(uint8_t data); DECLARE_WRITE8_MEMBER(cafetime_dsw_w); DECLARE_READ8_MEMBER(cafetime_dsw_r); DECLARE_READ8_MEMBER(cafetime_7fe4_r); DECLARE_WRITE8_MEMBER(cafetime_7fe3_w); - DECLARE_WRITE8_MEMBER(mjvegasa_p4_w); - DECLARE_WRITE8_MEMBER(mjvegasa_p3_w); + void mjvegasa_p4_w(uint8_t data); + void mjvegasa_p3_w(uint8_t data); DECLARE_WRITE8_MEMBER(mjvegasa_rombank_w); DECLARE_READ8_MEMBER(mjvegasa_rom_io_r); DECLARE_WRITE8_MEMBER(mjvegasa_rom_io_w); @@ -450,7 +450,7 @@ WRITE8_MEMBER(royalmah_state::input_port_select_w) m_input_port_select = data; } -READ8_MEMBER(royalmah_state::player_1_port_r) +uint8_t royalmah_state::player_1_port_r() { int ret = (ioport("KEY0")->read() & 0xc0) | 0x3f; @@ -463,7 +463,7 @@ READ8_MEMBER(royalmah_state::player_1_port_r) return ret; } -READ8_MEMBER(royalmah_state::player_2_port_r) +uint8_t royalmah_state::player_2_port_r() { int ret = (ioport("KEY5")->read() & 0xc0) | 0x3f; @@ -1000,14 +1000,14 @@ void royalmah_state::janptr96_map(address_map &map) map(0x8000, 0xffff).writeonly().share("videoram"); } -WRITE8_MEMBER(royalmah_state::janptr96_dswsel_w) +void royalmah_state::janptr96_dswsel_w(uint8_t data) { // 0x20 = 0 -> hopper on // 0x40 ? m_dsw_select = data; } -READ8_MEMBER(royalmah_state::janptr96_dsw_r) +uint8_t royalmah_state::janptr96_dsw_r() { if (~m_dsw_select & 0x01) return ioport("DSW4")->read(); if (~m_dsw_select & 0x02) return ioport("DSW3")->read(); @@ -1126,36 +1126,36 @@ void royalmah_state::mjifb_map(address_map &map) // map(0xc000, 0xffff).rom().writeonly(); This should, but doesn't work } -READ8_MEMBER(royalmah_state::mjifb_p3_r) +uint8_t royalmah_state::mjifb_p3_r() { return ioport("PORT3_5")->read() >> 6; } -READ8_MEMBER(royalmah_state::mjifb_p5_r) +uint8_t royalmah_state::mjifb_p5_r() { return ioport("PORT3_5")->read(); } -READ8_MEMBER(royalmah_state::mjifb_p6_r) +uint8_t royalmah_state::mjifb_p6_r() { return ioport("PORT6_7")->read(); } -READ8_MEMBER(royalmah_state::mjifb_p7_r) +uint8_t royalmah_state::mjifb_p7_r() { return ioport("PORT6_7")->read() >> 4; } -READ8_MEMBER(royalmah_state::mjifb_p8_r) +uint8_t royalmah_state::mjifb_p8_r() { return 0xff; } -WRITE8_MEMBER(royalmah_state::mjifb_p3_w) +void royalmah_state::mjifb_p3_w(uint8_t data) { m_rombank = (m_rombank & 0x0f) | ((data & 0x0c) << 2); } -WRITE8_MEMBER(royalmah_state::mjifb_p4_w) +void royalmah_state::mjifb_p4_w(uint8_t data) { m_rombank = (m_rombank & 0xf0) | (data & 0x0f); } -WRITE8_MEMBER(royalmah_state::mjifb_p8_w) +void royalmah_state::mjifb_p8_w(uint8_t data) { m_mjifb_rom_enable = (data & 0x08); } @@ -1221,7 +1221,7 @@ void royalmah_state::mjdejavu_map(address_map &map) Mahjong Tensinhai ****************************************************************************/ -READ8_MEMBER(royalmah_state::mjtensin_p3_r) +uint8_t royalmah_state::mjtensin_p3_r() { return 0xff; } @@ -1230,7 +1230,7 @@ void royalmah_state::mjtensin_update_rombank() { m_mainbank->set_base(memregion("maincpu")->base() + 0x10000 + m_rombank * 0x8000 ); } -WRITE8_MEMBER(royalmah_state::mjtensin_p4_w) +void royalmah_state::mjtensin_p4_w(uint8_t data) { m_rombank = (m_rombank & 0xf0) | (data & 0x0f); mjtensin_update_rombank(); @@ -1267,12 +1267,12 @@ void royalmah_state::cafetime_update_rombank() { m_mainbank->set_base(memregion("maincpu")->base() + 0x10000 + m_rombank * 0x8000 ); } -WRITE8_MEMBER(royalmah_state::cafetime_p4_w) +void royalmah_state::cafetime_p4_w(uint8_t data) { m_rombank = (m_rombank & 0xf0) | (data & 0x0f); cafetime_update_rombank(); } -WRITE8_MEMBER(royalmah_state::cafetime_p3_w) +void royalmah_state::cafetime_p3_w(uint8_t data) { m_rombank = (m_rombank & 0x0f) | ((data & 0x0c) << 2); cafetime_update_rombank(); @@ -1329,11 +1329,11 @@ void royalmah_state::cafetime_map(address_map &map) Mahjong Vegas ****************************************************************************/ -WRITE8_MEMBER(royalmah_state::mjvegasa_p4_w) +void royalmah_state::mjvegasa_p4_w(uint8_t data) { m_rombank = (m_rombank & 0xf8) | ((data & 0x0e) >> 1); } -WRITE8_MEMBER(royalmah_state::mjvegasa_p3_w) +void royalmah_state::mjvegasa_p3_w(uint8_t data) { m_rombank = (m_rombank & 0xf7) | ((data & 0x04) << 1); } diff --git a/src/mame/drivers/runaway.cpp b/src/mame/drivers/runaway.cpp index 527cd6ffb89..3178cb9926f 100644 --- a/src/mame/drivers/runaway.cpp +++ b/src/mame/drivers/runaway.cpp @@ -66,7 +66,7 @@ READ8_MEMBER(runaway_state::runaway_input_r) } -READ8_MEMBER(runaway_state::runaway_pot_r) +uint8_t runaway_state::runaway_pot_r(offs_t offset) { return (ioport("7000")->read() << (7 - offset)) & 0x80; } diff --git a/src/mame/drivers/rz1.cpp b/src/mame/drivers/rz1.cpp index 85d1dd30ed8..24c1455e953 100644 --- a/src/mame/drivers/rz1.cpp +++ b/src/mame/drivers/rz1.cpp @@ -81,15 +81,15 @@ private: void map(address_map &map); - DECLARE_READ8_MEMBER(port_a_r); - DECLARE_WRITE8_MEMBER(port_a_w); - DECLARE_WRITE8_MEMBER(port_b_w); - DECLARE_READ8_MEMBER(port_c_r); - DECLARE_WRITE8_MEMBER(port_c_w); + uint8_t port_a_r(); + void port_a_w(uint8_t data); + void port_b_w(uint8_t data); + uint8_t port_c_r(); + void port_c_w(uint8_t data); - DECLARE_READ8_MEMBER(upd934g_c_data_r); + uint8_t upd934g_c_data_r(offs_t offset); DECLARE_WRITE8_MEMBER(upd934g_c_w); - DECLARE_READ8_MEMBER(upd934g_b_data_r); + uint8_t upd934g_b_data_r(offs_t offset); DECLARE_WRITE8_MEMBER(upd934g_b_w); DECLARE_READ8_MEMBER(key_r); DECLARE_WRITE8_MEMBER(leds_w); @@ -209,7 +209,7 @@ HD44780_PIXEL_UPDATE( rz1_state::lcd_pixel_update ) bitmap.pix16(1 + y, 1 + line*8*6 + pos*6 + x) = state ? 1 : 2; } -READ8_MEMBER( rz1_state::upd934g_c_data_r ) +uint8_t rz1_state::upd934g_c_data_r(offs_t offset) { if (offset < 0x8000) return m_samples[1]->base()[offset]; @@ -222,7 +222,7 @@ READ8_MEMBER( rz1_state::upd934g_c_data_r ) } } -READ8_MEMBER( rz1_state::upd934g_b_data_r ) +uint8_t rz1_state::upd934g_b_data_r(offs_t offset) { if (offset < 0x8000) return m_samples[0]->base()[offset]; @@ -240,7 +240,7 @@ WRITE8_MEMBER( rz1_state::upd934g_b_w ) m_pg[1]->write(offset >> 8, data); } -READ8_MEMBER( rz1_state::port_a_r ) +uint8_t rz1_state::port_a_r() { if ((BIT(m_port_b, 7) == 0) && (BIT(m_port_b, 6) == 1)) { @@ -252,7 +252,7 @@ READ8_MEMBER( rz1_state::port_a_r ) return 0; } -WRITE8_MEMBER( rz1_state::port_a_w ) +void rz1_state::port_a_w(uint8_t data) { m_port_a = data; @@ -269,7 +269,7 @@ WRITE8_MEMBER( rz1_state::port_a_w ) // ------1- change-over signal tom3/bd // -------0 change-over signal tom1/tom2 -WRITE8_MEMBER( rz1_state::port_b_w ) +void rz1_state::port_b_w(uint8_t data) { if (0) logerror("port_b_w: %02x\n", data); @@ -286,12 +286,12 @@ WRITE8_MEMBER( rz1_state::port_b_w ) // ------1- midi in // -------0 midi out -READ8_MEMBER( rz1_state::port_c_r ) +uint8_t rz1_state::port_c_r() { return 0; } -WRITE8_MEMBER( rz1_state::port_c_w ) +void rz1_state::port_c_w(uint8_t data) { logerror("port_c_w: %02x\n", data); } diff --git a/src/mame/drivers/sfkick.cpp b/src/mame/drivers/sfkick.cpp index 3baff492897..825517c15b3 100644 --- a/src/mame/drivers/sfkick.cpp +++ b/src/mame/drivers/sfkick.cpp @@ -193,13 +193,13 @@ public: void init_sfkick(); private: - DECLARE_WRITE8_MEMBER(page0_w); - DECLARE_WRITE8_MEMBER(page1_w); - DECLARE_WRITE8_MEMBER(page2_w); - DECLARE_WRITE8_MEMBER(page3_w); - DECLARE_READ8_MEMBER(ppi_port_b_r); - DECLARE_WRITE8_MEMBER(ppi_port_a_w); - DECLARE_WRITE8_MEMBER(ppi_port_c_w); + void page0_w(offs_t offset, uint8_t data); + void page1_w(offs_t offset, uint8_t data); + void page2_w(offs_t offset, uint8_t data); + void page3_w(offs_t offset, uint8_t data); + uint8_t ppi_port_b_r(); + void ppi_port_a_w(uint8_t data); + void ppi_port_c_w(uint8_t data); virtual void machine_reset() override; void sfkick_remap_banks(); void sfkick_bank_set(int num, int data); @@ -239,7 +239,7 @@ private: #define MASTER_CLOCK XTAL(21'477'272) -READ8_MEMBER(sfkick_state::ppi_port_b_r) +uint8_t sfkick_state::ppi_port_b_r() { switch(m_input_mux&0x0f) { @@ -377,7 +377,7 @@ void sfkick_state::sfkick_remap_banks() } } -WRITE8_MEMBER(sfkick_state::ppi_port_a_w) +void sfkick_state::ppi_port_a_w(uint8_t data) { m_bank_cfg=data; sfkick_remap_banks(); @@ -394,7 +394,7 @@ void sfkick_state::sfkick_bank_set(int num, int data) sfkick_remap_banks(); } -WRITE8_MEMBER(sfkick_state::page0_w) +void sfkick_state::page0_w(offs_t offset, uint8_t data) { if((m_bank_cfg&3)==2) { @@ -409,7 +409,7 @@ WRITE8_MEMBER(sfkick_state::page0_w) } } -WRITE8_MEMBER(sfkick_state::page1_w) +void sfkick_state::page1_w(offs_t offset, uint8_t data) { if(((m_bank_cfg>>2)&3)==2) { @@ -424,7 +424,7 @@ WRITE8_MEMBER(sfkick_state::page1_w) } } -WRITE8_MEMBER(sfkick_state::page2_w) +void sfkick_state::page2_w(offs_t offset, uint8_t data) { if(((m_bank_cfg>>4)&3)==2) { @@ -439,7 +439,7 @@ WRITE8_MEMBER(sfkick_state::page2_w) } } -WRITE8_MEMBER(sfkick_state::page3_w) +void sfkick_state::page3_w(offs_t offset, uint8_t data) { if(((m_bank_cfg>>6)&3)==2) { @@ -502,7 +502,7 @@ void sfkick_state::sfkick_sound_io_map(address_map &map) map(0x04, 0x05).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); } -WRITE8_MEMBER(sfkick_state::ppi_port_c_w) +void sfkick_state::ppi_port_c_w(uint8_t data) { m_input_mux=data; } diff --git a/src/mame/drivers/shootout.cpp b/src/mame/drivers/shootout.cpp index 82713d8b766..e9399add2e8 100644 --- a/src/mame/drivers/shootout.cpp +++ b/src/mame/drivers/shootout.cpp @@ -53,7 +53,7 @@ /*******************************************************************************/ -WRITE8_MEMBER(shootout_state::bankswitch_w) +void shootout_state::bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 0x0f); } @@ -73,7 +73,7 @@ WRITE8_MEMBER(shootout_state::sound_cpu_command_w) m_maincpu->spin_until_time(attotime::from_usec(200)); } -WRITE8_MEMBER(shootout_state::flipscreen_w) +void shootout_state::flipscreen_w(uint8_t data) { flip_screen_set(data & 0x01); } diff --git a/src/mame/drivers/sm1800.cpp b/src/mame/drivers/sm1800.cpp index e2ae4f81e9d..6754a5af21b 100644 --- a/src/mame/drivers/sm1800.cpp +++ b/src/mame/drivers/sm1800.cpp @@ -44,10 +44,10 @@ private: required_device m_ppi; required_device m_crtc; required_device m_palette; - DECLARE_WRITE8_MEMBER(sm1800_8255_portb_w); - DECLARE_WRITE8_MEMBER(sm1800_8255_portc_w); - DECLARE_READ8_MEMBER(sm1800_8255_porta_r); - DECLARE_READ8_MEMBER(sm1800_8255_portc_r); + void sm1800_8255_portb_w(uint8_t data); + void sm1800_8255_portc_w(uint8_t data); + uint8_t sm1800_8255_porta_r(); + uint8_t sm1800_8255_portc_r(); uint8_t m_irq_state; virtual void machine_reset() override; void sm1800_palette(palette_device &palette) const; @@ -115,20 +115,20 @@ I8275_DRAW_CHARACTER_MEMBER( sm1800_state::crtc_display_pixels ) bitmap.pix32(y, x + i) = palette[(pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0]; } -WRITE8_MEMBER( sm1800_state::sm1800_8255_portb_w ) +void sm1800_state::sm1800_8255_portb_w(uint8_t data) { } -WRITE8_MEMBER( sm1800_state::sm1800_8255_portc_w ) +void sm1800_state::sm1800_8255_portc_w(uint8_t data) { } -READ8_MEMBER( sm1800_state::sm1800_8255_porta_r ) +uint8_t sm1800_state::sm1800_8255_porta_r() { return 0xff; } -READ8_MEMBER( sm1800_state::sm1800_8255_portc_r ) +uint8_t sm1800_state::sm1800_8255_portc_r() { return 0; } diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp index fb5b369fdde..fd6e91d8200 100644 --- a/src/mame/drivers/super80.cpp +++ b/src/mame/drivers/super80.cpp @@ -642,25 +642,25 @@ WRITE_LINE_MEMBER( super80v_state::busreq_w ) m_dma->bai_w(state); // tell dma that bus has been granted } -READ8_MEMBER(super80v_state::memory_read_byte) +uint8_t super80v_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -WRITE8_MEMBER(super80v_state::memory_write_byte) +void super80v_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); prog_space.write_byte(offset, data); } -READ8_MEMBER(super80v_state::io_read_byte) +uint8_t super80v_state::io_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_IO); return prog_space.read_byte(offset); } -WRITE8_MEMBER(super80v_state::io_write_byte) +void super80v_state::io_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_IO); prog_space.write_byte(offset, data); diff --git a/src/mame/drivers/sv8000.cpp b/src/mame/drivers/sv8000.cpp index f04d23ed7fa..c8a263236fc 100644 --- a/src/mame/drivers/sv8000.cpp +++ b/src/mame/drivers/sv8000.cpp @@ -56,19 +56,19 @@ public: private: DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load ); - DECLARE_READ8_MEMBER( ay_port_a_r ); - DECLARE_READ8_MEMBER( ay_port_b_r ); - DECLARE_WRITE8_MEMBER( ay_port_a_w ); - DECLARE_WRITE8_MEMBER( ay_port_b_w ); + uint8_t ay_port_a_r(); + uint8_t ay_port_b_r(); + void ay_port_a_w(uint8_t data); + void ay_port_b_w(uint8_t data); - DECLARE_READ8_MEMBER( i8255_porta_r ); - DECLARE_WRITE8_MEMBER( i8255_porta_w ); - DECLARE_READ8_MEMBER( i8255_portb_r ); - DECLARE_WRITE8_MEMBER( i8255_portb_w ); - DECLARE_READ8_MEMBER( i8255_portc_r ); - DECLARE_WRITE8_MEMBER( i8255_portc_w ); + uint8_t i8255_porta_r(); + void i8255_porta_w(uint8_t data); + uint8_t i8255_portb_r(); + void i8255_portb_w(uint8_t data); + uint8_t i8255_portc_r(); + void i8255_portc_w(uint8_t data); - DECLARE_READ8_MEMBER( mc6847_videoram_r ); + uint8_t mc6847_videoram_r(offs_t offset); virtual void machine_start() override; virtual void machine_reset() override; @@ -219,20 +219,20 @@ DEVICE_IMAGE_LOAD_MEMBER( sv8000_state::cart_load ) } -READ8_MEMBER( sv8000_state::i8255_porta_r ) +uint8_t sv8000_state::i8255_porta_r() { //logerror("i8255_porta_r\n"); return m_io_joy->read(); } -WRITE8_MEMBER( sv8000_state::i8255_porta_w ) +void sv8000_state::i8255_porta_w(uint8_t data) { //logerror("i8255_porta_w: %02X\n", data); } -READ8_MEMBER( sv8000_state::i8255_portb_r ) +uint8_t sv8000_state::i8255_portb_r() { uint8_t data = 0xff; @@ -254,27 +254,27 @@ READ8_MEMBER( sv8000_state::i8255_portb_r ) } -WRITE8_MEMBER( sv8000_state::i8255_portb_w ) +void sv8000_state::i8255_portb_w(uint8_t data) { //logerror("i8255_portb_w: %02X\n", data); } -READ8_MEMBER( sv8000_state::i8255_portc_r ) +uint8_t sv8000_state::i8255_portc_r() { //logerror("i8255_portc_r\n"); return 0xff; } -WRITE8_MEMBER( sv8000_state::i8255_portc_w ) +void sv8000_state::i8255_portc_w(uint8_t data) { //logerror("i8255_portc_w: %02X\n", data); m_column = data; } -READ8_MEMBER( sv8000_state::ay_port_a_r ) +uint8_t sv8000_state::ay_port_a_r() { uint8_t data = 0xff; @@ -283,7 +283,7 @@ READ8_MEMBER( sv8000_state::ay_port_a_r ) } -READ8_MEMBER( sv8000_state::ay_port_b_r ) +uint8_t sv8000_state::ay_port_b_r() { uint8_t data = 0xff; @@ -320,7 +320,7 @@ READ8_MEMBER( sv8000_state::ay_port_b_r ) // beamgala: // 0x5A 01011010 graphics 3KB in 6KB mode? // -WRITE8_MEMBER( sv8000_state::ay_port_a_w ) +void sv8000_state::ay_port_a_w(uint8_t data) { //logerror("ay_port_a_w: %02X\n", data); @@ -341,12 +341,12 @@ WRITE8_MEMBER( sv8000_state::ay_port_a_w ) } -WRITE8_MEMBER( sv8000_state::ay_port_b_w ) +void sv8000_state::ay_port_b_w(uint8_t data) { //logerror("ay_port_b_w: %02X\n", data); } -READ8_MEMBER( sv8000_state::mc6847_videoram_r ) +uint8_t sv8000_state::mc6847_videoram_r(offs_t offset) { if (offset == ~0) return 0xff; diff --git a/src/mame/drivers/tamag1.cpp b/src/mame/drivers/tamag1.cpp index b3d68ec3921..10afb70906b 100644 --- a/src/mame/drivers/tamag1.cpp +++ b/src/mame/drivers/tamag1.cpp @@ -33,7 +33,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(input_changed); private: - DECLARE_WRITE8_MEMBER(speaker_w); + void speaker_w(uint8_t data); void tama_palette(palette_device &palette) const; E0C6S46_PIXEL_UPDATE(pixel_update); @@ -96,7 +96,7 @@ void tamag1_state::tama_palette(palette_device &palette) const ***************************************************************************/ -WRITE8_MEMBER(tamag1_state::speaker_w) +void tamag1_state::speaker_w(uint8_t data) { // R43: speaker out m_speaker->level_w(data >> 3 & 1); diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp index ea741eeae87..b44f2e12f1c 100644 --- a/src/mame/drivers/tempest.cpp +++ b/src/mame/drivers/tempest.cpp @@ -326,8 +326,8 @@ protected: DECLARE_WRITE8_MEMBER(wdclr_w); DECLARE_WRITE8_MEMBER(tempest_led_w); DECLARE_WRITE8_MEMBER(tempest_coin_w); - DECLARE_READ8_MEMBER(input_port_1_bit_r); - DECLARE_READ8_MEMBER(input_port_2_bit_r); + uint8_t input_port_1_bit_r(offs_t offset); + uint8_t input_port_2_bit_r(offs_t offset); DECLARE_READ8_MEMBER(earom_read); DECLARE_WRITE8_MEMBER(earom_write); @@ -399,13 +399,13 @@ READ_LINE_MEMBER(tempest_state::clock_r) } -READ8_MEMBER(tempest_state::input_port_1_bit_r) +uint8_t tempest_state::input_port_1_bit_r(offs_t offset) { return (m_in1->read() & (1 << offset)) ? 0 : 228; } -READ8_MEMBER(tempest_state::input_port_2_bit_r) +uint8_t tempest_state::input_port_2_bit_r(offs_t offset) { return (m_in2->read() & (1 << offset)) ? 0 : 228; } diff --git a/src/mame/drivers/tigeroad.cpp b/src/mame/drivers/tigeroad.cpp index 8ea7feca160..ef14b999775 100644 --- a/src/mame/drivers/tigeroad.cpp +++ b/src/mame/drivers/tigeroad.cpp @@ -73,13 +73,7 @@ WRITE8_MEMBER(tigeroad_state::msm5205_w) m_msm->vclk_w(0); } - -WRITE8_MEMBER(f1dream_state::out1_w) -{ - m_soundlatch->write(data); -} - -WRITE8_MEMBER(f1dream_state::out3_w) +void f1dream_state::out3_w(uint8_t data) { if ((m_old_p3 & 0x20) != (data & 0x20)) { @@ -681,7 +675,7 @@ void f1dream_state::f1dream(machine_config &config) I8751(config, m_mcu, XTAL(10'000'000)); /* ??? */ m_mcu->set_addrmap(AS_IO, &f1dream_state::f1dream_mcu_io); - m_mcu->port_out_cb<1>().set(FUNC(f1dream_state::out1_w)); + m_mcu->port_out_cb<1>().set(m_soundlatch, FUNC(generic_latch_8_device::write)); m_mcu->port_out_cb<3>().set(FUNC(f1dream_state::out3_w)); } diff --git a/src/mame/drivers/tourtabl.cpp b/src/mame/drivers/tourtabl.cpp index 50e28dd9f87..d11940961b5 100644 --- a/src/mame/drivers/tourtabl.cpp +++ b/src/mame/drivers/tourtabl.cpp @@ -31,9 +31,9 @@ public: private: virtual void machine_start() override { m_leds.resolve(); } - DECLARE_WRITE8_MEMBER(tourtabl_led_w); - DECLARE_READ16_MEMBER(tourtabl_read_input_port); - DECLARE_READ8_MEMBER(tourtabl_get_databus_contents); + void tourtabl_led_w(uint8_t data); + uint16_t tourtabl_read_input_port(offs_t offset); + uint8_t tourtabl_get_databus_contents(offs_t offset); void main_map(address_map &map); required_device m_maincpu; @@ -44,7 +44,7 @@ private: #define MASTER_CLOCK XTAL(3'579'545) -WRITE8_MEMBER(tourtabl_state::tourtabl_led_w) +void tourtabl_state::tourtabl_led_w(uint8_t data) { m_leds[0] = BIT(data, 6); /* start 1 */ m_leds[1] = BIT(data, 5); /* start 2 */ @@ -55,14 +55,14 @@ WRITE8_MEMBER(tourtabl_state::tourtabl_led_w) } -READ16_MEMBER(tourtabl_state::tourtabl_read_input_port) +uint16_t tourtabl_state::tourtabl_read_input_port(offs_t offset) { static const char *const tianames[] = { "PADDLE4", "PADDLE3", "PADDLE2", "PADDLE1", "TIA_IN4", "TIA_IN5" }; return ioport(tianames[offset])->read(); } -READ8_MEMBER(tourtabl_state::tourtabl_get_databus_contents) +uint8_t tourtabl_state::tourtabl_get_databus_contents(offs_t offset) { return offset; } diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp index c4e3bb4138e..04bc2354cd6 100644 --- a/src/mame/drivers/tumbleb.cpp +++ b/src/mame/drivers/tumbleb.cpp @@ -850,7 +850,7 @@ WRITE16_MEMBER(tumbleb_state::semicom_soundcmd_w) } } -WRITE8_MEMBER(tumbleb_state::oki_sound_bank_w) +void tumbleb_state::oki_sound_bank_w(uint8_t data) { uint8_t *oki = memregion("oki")->base(); memcpy(&oki[0x30000], &oki[(data * 0x10000) + 0x40000], 0x10000); @@ -899,7 +899,7 @@ void tumbleb_state::jumpkids_main_map(address_map &map) map(0x342400, 0x34247f).nopw(); } -WRITE8_MEMBER(tumbleb_state::jumpkids_oki_bank_w) +void tumbleb_state::jumpkids_oki_bank_w(uint8_t data) { uint8_t* sound1 = memregion("oki")->base(); uint8_t* sound2 = memregion("oki2")->base(); @@ -921,7 +921,7 @@ void tumbleb_state::jumpkids_sound_map(address_map &map) /* Semicom AT89C52 MCU */ // probably not endian safe -WRITE8_MEMBER(tumbleb_state::prot_p0_w) +void tumbleb_state::prot_p0_w(uint8_t data) { uint16_t word = m_mainram[(m_protbase/2) + m_semicom_prot_offset]; word = (word & 0xff00) | (data << 0); @@ -929,14 +929,14 @@ WRITE8_MEMBER(tumbleb_state::prot_p0_w) } // probably not endian safe -WRITE8_MEMBER(tumbleb_state::prot_p1_w) +void tumbleb_state::prot_p1_w(uint8_t data) { uint16_t word = m_mainram[(m_protbase/2) + m_semicom_prot_offset]; word = (word & 0x00ff) | (data << 8); m_mainram[(m_protbase/2) + m_semicom_prot_offset] = word; } -WRITE8_MEMBER(tumbleb_state::prot_p2_w) +void tumbleb_state::prot_p2_w(uint8_t data) { m_semicom_prot_offset = data; } diff --git a/src/mame/drivers/tunhunt.cpp b/src/mame/drivers/tunhunt.cpp index b425aec34e6..5ed459098b3 100644 --- a/src/mame/drivers/tunhunt.cpp +++ b/src/mame/drivers/tunhunt.cpp @@ -60,7 +60,7 @@ * *************************************/ -WRITE8_MEMBER(tunhunt_state::control_w) +void tunhunt_state::control_w(uint8_t data) { /* 0x01 coin counter#2 "right counter" @@ -86,38 +86,38 @@ WRITE8_MEMBER(tunhunt_state::control_w) * *************************************/ -READ8_MEMBER(tunhunt_state::button_r) +uint8_t tunhunt_state::button_r(offs_t offset) { int data = ioport("IN0")->read(); return ((data>>offset)&1)?0x00:0x80; } -READ8_MEMBER(tunhunt_state::dsw2_0r) +uint8_t tunhunt_state::dsw2_0r() { return (ioport("DSW")->read()&0x0100)?0x80:0x00; } -READ8_MEMBER(tunhunt_state::dsw2_1r) +uint8_t tunhunt_state::dsw2_1r() { return (ioport("DSW")->read()&0x0200)?0x80:0x00; } -READ8_MEMBER(tunhunt_state::dsw2_2r) +uint8_t tunhunt_state::dsw2_2r() { return (ioport("DSW")->read()&0x0400)?0x80:0x00; } -READ8_MEMBER(tunhunt_state::dsw2_3r) +uint8_t tunhunt_state::dsw2_3r() { return (ioport("DSW")->read()&0x0800)?0x80:0x00; } -READ8_MEMBER(tunhunt_state::dsw2_4r) +uint8_t tunhunt_state::dsw2_4r() { return (ioport("DSW")->read()&0x1000)?0x80:0x00; } diff --git a/src/mame/drivers/tvboy.cpp b/src/mame/drivers/tvboy.cpp index f2274efc939..becb1da2785 100644 --- a/src/mame/drivers/tvboy.cpp +++ b/src/mame/drivers/tvboy.cpp @@ -29,11 +29,12 @@ public: void tvboyii(machine_config &config); -private: +protected: virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_WRITE8_MEMBER(bank_write); +private: + void bank_write(offs_t offset, uint8_t data); void rom_map(address_map &map); void tvboy_mem(address_map &map); @@ -54,7 +55,7 @@ void tvboy_state::machine_reset() a2600_base_state::machine_reset(); } -WRITE8_MEMBER(tvboy_state::bank_write) +void tvboy_state::bank_write(offs_t offset, uint8_t data) { logerror("banking (?) write %04x, %02x\n", offset, data); if ((offset & 0xff00) == 0x0800) @@ -101,14 +102,14 @@ void tvboy_state::tvboyii(machine_config &config) MOS6532_NEW(config, m_riot, MASTER_CLOCK_PAL / 3); m_riot->pa_rd_callback().set(FUNC(tvboy_state::switch_A_r)); m_riot->pa_wr_callback().set(FUNC(tvboy_state::switch_A_w)); - m_riot->pb_rd_callback().set(FUNC(tvboy_state::riot_input_port_8_r)); + m_riot->pb_rd_callback().set_ioport("SWB"); m_riot->pb_wr_callback().set(FUNC(tvboy_state::switch_B_w)); m_riot->irq_wr_callback().set(FUNC(tvboy_state::irq_callback)); #else RIOT6532(config, m_riot, MASTER_CLOCK_PAL / 3); m_riot->in_pa_callback().set(FUNC(tvboy_state::switch_A_r)); m_riot->out_pa_callback().set(FUNC(tvboy_state::switch_A_w)); - m_riot->in_pb_callback().set(FUNC(tvboy_state::riot_input_port_8_r)); + m_riot->in_pb_callback().set_ioport("SWB"); m_riot->out_pb_callback().set(FUNC(tvboy_state::switch_B_w)); m_riot->irq_callback().set(FUNC(tvboy_state::irq_callback)); #endif diff --git a/src/mame/drivers/unior.cpp b/src/mame/drivers/unior.cpp index 287099417bf..e8fc7557c14 100644 --- a/src/mame/drivers/unior.cpp +++ b/src/mame/drivers/unior.cpp @@ -69,19 +69,19 @@ public: void unior(machine_config &config); private: - DECLARE_WRITE8_MEMBER(vram_w); - DECLARE_WRITE8_MEMBER(scroll_w); - DECLARE_READ8_MEMBER(ppi0_b_r); - DECLARE_WRITE8_MEMBER(ppi0_b_w); - DECLARE_READ8_MEMBER(ppi1_a_r); - DECLARE_READ8_MEMBER(ppi1_b_r); - DECLARE_READ8_MEMBER(ppi1_c_r); - DECLARE_WRITE8_MEMBER(ppi1_a_w); - DECLARE_WRITE8_MEMBER(ppi1_c_w); + void vram_w(offs_t offset, uint8_t data); + void scroll_w(uint8_t data); + uint8_t ppi0_b_r(); + void ppi0_b_w(uint8_t data); + uint8_t ppi1_a_r(); + uint8_t ppi1_b_r(); + uint8_t ppi1_c_r(); + void ppi1_a_w(uint8_t data); + void ppi1_c_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(hrq_w); DECLARE_WRITE_LINE_MEMBER(ctc_z1_w); void unior_palette(palette_device &palette) const; - DECLARE_READ8_MEMBER(dma_r); + uint8_t dma_r(offs_t offset); I8275_DRAW_CHARACTER_MEMBER(display_pixels); TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); @@ -262,13 +262,13 @@ static GFXDECODE_START( gfx_unior ) GFXDECODE_ENTRY( "chargen", 0x0000, unior_charlayout, 0, 1 ) GFXDECODE_END -WRITE8_MEMBER( unior_state::vram_w ) +void unior_state::vram_w(offs_t offset, uint8_t data) { m_p_vram[offset] = data; } // pulses a 1 to scroll -WRITE8_MEMBER( unior_state::scroll_w ) +void unior_state::scroll_w(uint8_t data) { if (data) memmove(m_p_vram, m_p_vram+80, 24*80); @@ -353,22 +353,22 @@ WRITE_LINE_MEMBER(unior_state::ctc_z1_w) } -READ8_MEMBER( unior_state::ppi0_b_r ) +uint8_t unior_state::ppi0_b_r() { return 0; } // Bit 4 - cassette relay? -WRITE8_MEMBER( unior_state::ppi0_b_w ) +void unior_state::ppi0_b_w(uint8_t data) { } -READ8_MEMBER( unior_state::ppi1_a_r ) +uint8_t unior_state::ppi1_a_r() { return m_4c; } -READ8_MEMBER( unior_state::ppi1_b_r ) +uint8_t unior_state::ppi1_b_r() { u8 t = m_4c & 15; if (t < 11) @@ -377,12 +377,12 @@ READ8_MEMBER( unior_state::ppi1_b_r ) return 0xff; } -READ8_MEMBER( unior_state::ppi1_c_r ) +uint8_t unior_state::ppi1_c_r() { return m_4e; } -WRITE8_MEMBER( unior_state::ppi1_a_w ) +void unior_state::ppi1_a_w(uint8_t data) { m_4c = data; } @@ -394,7 +394,7 @@ d5 = unknown d6 = connect to A7 of the palette prom d7 = not used */ -WRITE8_MEMBER( unior_state::ppi1_c_w ) +void unior_state::ppi1_c_w(uint8_t data) { m_4e = data; m_pit->write_gate2(BIT(data, 4)); @@ -406,7 +406,7 @@ WRITE8_MEMBER( unior_state::ppi1_c_w ) *************************************************/ -READ8_MEMBER(unior_state::dma_r) +uint8_t unior_state::dma_r(offs_t offset) { if (offset < 0xf800) return m_maincpu->space(AS_PROGRAM).read_byte(offset); diff --git a/src/mame/drivers/vcs80.cpp b/src/mame/drivers/vcs80.cpp index c1e7dc5d051..61ac9e6ea5b 100644 --- a/src/mame/drivers/vcs80.cpp +++ b/src/mame/drivers/vcs80.cpp @@ -131,7 +131,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(vcs80_state::vcs80_keyboard_tick) m_keyclk = !m_keyclk; } -READ8_MEMBER( vcs80_state::pio_pa_r ) +uint8_t vcs80_state::pio_pa_r() { /* @@ -164,7 +164,7 @@ READ8_MEMBER( vcs80_state::pio_pa_r ) return data; } -WRITE8_MEMBER( vcs80_state::pio_pb_w ) +void vcs80_state::pio_pb_w(uint8_t data) { /* diff --git a/src/mame/drivers/vic20.cpp b/src/mame/drivers/vic20.cpp index 86f8bfa2e9b..af31fae0b82 100644 --- a/src/mame/drivers/vic20.cpp +++ b/src/mame/drivers/vic20.cpp @@ -100,13 +100,13 @@ private: DECLARE_WRITE_LINE_MEMBER( write_user_light_pen ); DECLARE_WRITE_LINE_MEMBER( write_user_cassette_switch ); - DECLARE_READ8_MEMBER( via1_pa_r ); - DECLARE_WRITE8_MEMBER( via1_pa_w ); - DECLARE_WRITE8_MEMBER( via1_pb_w ); + uint8_t via1_pa_r(); + void via1_pa_w(uint8_t data); + void via1_pb_w(uint8_t data); - DECLARE_READ8_MEMBER( via2_pa_r ); - DECLARE_READ8_MEMBER( via2_pb_r ); - DECLARE_WRITE8_MEMBER( via2_pb_w ); + uint8_t via2_pa_r(); + uint8_t via2_pb_r(); + void via2_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( via2_ca2_w ); DECLARE_WRITE_LINE_MEMBER( via2_cb2_w ); @@ -537,7 +537,7 @@ INPUT_PORTS_END // DEVICE CONFIGURATION //************************************************************************** -READ8_MEMBER( vic20_state::via1_pa_r ) +uint8_t vic20_state::via1_pa_r() { /* @@ -576,7 +576,7 @@ READ8_MEMBER( vic20_state::via1_pa_r ) return data; } -WRITE8_MEMBER( vic20_state::via1_pa_w ) +void vic20_state::via1_pa_w(uint8_t data) { /* @@ -602,7 +602,7 @@ WRITE8_MEMBER( vic20_state::via1_pa_w ) m_iec->host_atn_w(!BIT(data, 7)); } -WRITE8_MEMBER( vic20_state::via1_pb_w ) +void vic20_state::via1_pb_w(uint8_t data) { m_user->write_c((data>>0)&1); m_user->write_d((data>>1)&1); @@ -614,7 +614,7 @@ WRITE8_MEMBER( vic20_state::via1_pb_w ) m_user->write_l((data>>7)&1); } -READ8_MEMBER( vic20_state::via2_pa_r ) +uint8_t vic20_state::via2_pa_r() { /* @@ -641,7 +641,7 @@ READ8_MEMBER( vic20_state::via2_pa_r ) return data; } -READ8_MEMBER( vic20_state::via2_pb_r ) +uint8_t vic20_state::via2_pb_r() { /* @@ -668,7 +668,7 @@ READ8_MEMBER( vic20_state::via2_pb_r ) return data; } -WRITE8_MEMBER( vic20_state::via2_pb_w ) +void vic20_state::via2_pb_w(uint8_t data) { /* diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp index 8262b6c96f9..924dc90a65c 100644 --- a/src/mame/drivers/vt240.cpp +++ b/src/mame/drivers/vt240.cpp @@ -74,7 +74,7 @@ private: DECLARE_WRITE8_MEMBER(t11_comm_w); DECLARE_READ8_MEMBER(duart_r); DECLARE_WRITE8_MEMBER(duart_w); - DECLARE_WRITE8_MEMBER(duartout_w); + void duartout_w(uint8_t data); DECLARE_READ8_MEMBER(mem_map_cs_r); DECLARE_WRITE8_MEMBER(mem_map_cs_w); DECLARE_READ8_MEMBER(ctrl_r); @@ -280,7 +280,7 @@ WRITE8_MEMBER(vt240_state::duart_w) m_duart->write(offset >> 1, data); } -WRITE8_MEMBER(vt240_state::duartout_w) +void vt240_state::duartout_w(uint8_t data) { m_host->write_rts(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE); m_host->write_dtr(BIT(data, 2) ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/wrinkles.cpp b/src/mame/drivers/wrinkles.cpp index 170bc86f349..8249ea8bcb6 100644 --- a/src/mame/drivers/wrinkles.cpp +++ b/src/mame/drivers/wrinkles.cpp @@ -42,8 +42,8 @@ private: void main_map(address_map &map); // I/O handlers - DECLARE_WRITE8_MEMBER(sensor_w); - DECLARE_READ8_MEMBER(sensor_r); + void sensor_w(u8 data); + u8 sensor_r(); }; void wrinkles_state::machine_start() @@ -56,11 +56,11 @@ void wrinkles_state::machine_start() I/O ******************************************************************************/ -WRITE8_MEMBER(wrinkles_state::sensor_w) +void wrinkles_state::sensor_w(u8 data) { } -READ8_MEMBER(wrinkles_state::sensor_r) +u8 wrinkles_state::sensor_r() { // sensors here // d1: hold down for power-off? diff --git a/src/mame/includes/a2600.h b/src/mame/includes/a2600.h index ebdb7c477a2..a8ad468beef 100644 --- a/src/mame/includes/a2600.h +++ b/src/mame/includes/a2600.h @@ -47,21 +47,19 @@ protected: m_riot(*this, "riot"), m_joy1(*this, CONTROL1_TAG), m_joy2(*this, CONTROL2_TAG), - m_screen(*this, "screen"), - m_swb(*this, "SWB") + m_screen(*this, "screen") { } virtual void machine_start() override; - DECLARE_WRITE8_MEMBER(switch_A_w); - DECLARE_READ8_MEMBER(switch_A_r); - DECLARE_WRITE8_MEMBER(switch_B_w); + void switch_A_w(uint8_t data); + uint8_t switch_A_r(); + void switch_B_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(irq_callback); - DECLARE_READ8_MEMBER(riot_input_port_8_r); - DECLARE_READ16_MEMBER(a2600_read_input_port); - DECLARE_READ8_MEMBER(a2600_get_databus_contents); - DECLARE_WRITE16_MEMBER(a2600_tia_vsync_callback); - DECLARE_WRITE16_MEMBER(a2600_tia_vsync_callback_pal); + uint16_t a2600_read_input_port(offs_t offset); + uint8_t a2600_get_databus_contents(offs_t offset); + void a2600_tia_vsync_callback(uint16_t data); + void a2600_tia_vsync_callback_pal(uint16_t data); void a2600_mem(address_map &map); @@ -79,8 +77,6 @@ protected: private: uint16_t m_current_screen_height; - - required_ioport m_swb; }; diff --git a/src/mame/includes/ac1.h b/src/mame/includes/ac1.h index b8edbccb24d..9f97eb8c1b3 100644 --- a/src/mame/includes/ac1.h +++ b/src/mame/includes/ac1.h @@ -31,10 +31,10 @@ public: virtual void video_start() override; uint32_t screen_update_ac1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_ac1_32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(ac1_port_b_r); - DECLARE_READ8_MEMBER(ac1_port_a_r); - DECLARE_WRITE8_MEMBER(ac1_port_a_w); - DECLARE_WRITE8_MEMBER(ac1_port_b_w); + uint8_t ac1_port_b_r(); + uint8_t ac1_port_a_r(); + void ac1_port_a_w(uint8_t data); + void ac1_port_b_w(uint8_t data); void ac1_32(machine_config &config); void ac1(machine_config &config); diff --git a/src/mame/includes/actfancr.h b/src/mame/includes/actfancr.h index f4f36c9306c..d8b05b1d102 100644 --- a/src/mame/includes/actfancr.h +++ b/src/mame/includes/actfancr.h @@ -38,8 +38,8 @@ public: required_device m_spritegen; required_device m_soundlatch; - DECLARE_WRITE8_MEMBER(triothep_control_select_w); - DECLARE_READ8_MEMBER(triothep_control_r); + void triothep_control_select_w(uint8_t data); + uint8_t triothep_control_r(); DECLARE_WRITE8_MEMBER(buffer_spriteram_w); DECLARE_MACHINE_START(triothep); DECLARE_MACHINE_RESET(triothep); diff --git a/src/mame/includes/adam.h b/src/mame/includes/adam.h index 2c6cb6a39b5..7ccb8923f44 100644 --- a/src/mame/includes/adam.h +++ b/src/mame/includes/adam.h @@ -79,12 +79,12 @@ public: DECLARE_READ8_MEMBER( mioc_r ); DECLARE_WRITE8_MEMBER( mioc_w ); - DECLARE_WRITE8_MEMBER( m6801_p1_w ); - DECLARE_READ8_MEMBER( m6801_p2_r ); - DECLARE_WRITE8_MEMBER( m6801_p2_w ); - DECLARE_READ8_MEMBER( m6801_p3_r ); - DECLARE_WRITE8_MEMBER( m6801_p3_w ); - DECLARE_WRITE8_MEMBER( m6801_p4_w ); + void m6801_p1_w(uint8_t data); + uint8_t m6801_p2_r(); + void m6801_p2_w(uint8_t data); + uint8_t m6801_p3_r(); + void m6801_p3_w(uint8_t data); + void m6801_p4_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( vdc_int_w ); diff --git a/src/mame/includes/arcadia.h b/src/mame/includes/arcadia.h index cf54c0e6a13..935cf77dfcf 100644 --- a/src/mame/includes/arcadia.h +++ b/src/mame/includes/arcadia.h @@ -57,8 +57,8 @@ public: protected: DECLARE_READ_LINE_MEMBER(vsync_r); - DECLARE_READ8_MEMBER(video_r); - DECLARE_WRITE8_MEMBER(video_w); + uint8_t video_r(offs_t offset); + void video_w(offs_t offset, uint8_t data); virtual void machine_start() override; virtual void video_start() override; diff --git a/src/mame/includes/atarigt.h b/src/mame/includes/atarigt.h index e4a3f741e6d..b914be2cc18 100644 --- a/src/mame/includes/atarigt.h +++ b/src/mame/includes/atarigt.h @@ -94,7 +94,7 @@ public: DECLARE_WRITE32_MEMBER(colorram_protection_w); DECLARE_WRITE32_MEMBER(tmek_pf_w); - DECLARE_WRITE8_MEMBER(cage_irq_callback); + void cage_irq_callback(uint8_t data); void atarigt_colorram_w(offs_t address, uint16_t data, uint16_t mem_mask); uint16_t atarigt_colorram_r(offs_t address); diff --git a/src/mame/includes/atarist.h b/src/mame/includes/atarist.h index 6d2b662f50c..600939053f7 100644 --- a/src/mame/includes/atarist.h +++ b/src/mame/includes/atarist.h @@ -230,16 +230,16 @@ protected: DECLARE_WRITE8_MEMBER( mmu_w ); DECLARE_READ16_MEMBER( berr_r ); DECLARE_WRITE16_MEMBER( berr_w ); - DECLARE_READ8_MEMBER( ikbd_port1_r ); - DECLARE_READ8_MEMBER( ikbd_port2_r ); - DECLARE_WRITE8_MEMBER( ikbd_port2_w ); - DECLARE_WRITE8_MEMBER( ikbd_port3_w ); - DECLARE_READ8_MEMBER( ikbd_port4_r ); - DECLARE_WRITE8_MEMBER( ikbd_port4_w ); + uint8_t ikbd_port1_r(); + uint8_t ikbd_port2_r(); + void ikbd_port2_w(uint8_t data); + void ikbd_port3_w(uint8_t data); + uint8_t ikbd_port4_r(); + void ikbd_port4_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_WRITE8_MEMBER( psg_pa_w ); + void psg_pa_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( ikbd_tx_w ); @@ -474,7 +474,7 @@ public: DECLARE_READ16_MEMBER( config_r ); DECLARE_WRITE16_MEMBER( lcd_control_w ); - DECLARE_WRITE8_MEMBER( psg_pa_w ); + void psg_pa_w(uint8_t data); DECLARE_READ8_MEMBER( mfp_gpio_r ); void stbook_map(address_map &map); protected: diff --git a/src/mame/includes/atetris.h b/src/mame/includes/atetris.h index cda95e72691..e3801bba620 100644 --- a/src/mame/includes/atetris.h +++ b/src/mame/includes/atetris.h @@ -81,9 +81,9 @@ public: void atetrisb3(machine_config &config); private: - DECLARE_READ8_MEMBER(mcu_bus_r); - DECLARE_WRITE8_MEMBER(mcu_p2_w); - DECLARE_WRITE8_MEMBER(mcu_reg_w); + uint8_t mcu_bus_r(); + void mcu_p2_w(uint8_t data); + void mcu_reg_w(offs_t offset, uint8_t data); void atetrisb3_map(address_map &map); diff --git a/src/mame/includes/b2m.h b/src/mame/includes/b2m.h index 67075a29215..2961d4daa7d 100644 --- a/src/mame/includes/b2m.h +++ b/src/mame/includes/b2m.h @@ -46,14 +46,14 @@ public: uint32_t screen_update_b2m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(b2m_vblank_interrupt); DECLARE_WRITE_LINE_MEMBER(bm2_pit_out1); - DECLARE_WRITE8_MEMBER(b2m_8255_porta_w); - DECLARE_WRITE8_MEMBER(b2m_8255_portb_w); - DECLARE_WRITE8_MEMBER(b2m_8255_portc_w); - DECLARE_READ8_MEMBER(b2m_8255_portb_r); - DECLARE_WRITE8_MEMBER(b2m_ext_8255_portc_w); - DECLARE_READ8_MEMBER(b2m_romdisk_porta_r); - DECLARE_WRITE8_MEMBER(b2m_romdisk_portb_w); - DECLARE_WRITE8_MEMBER(b2m_romdisk_portc_w); + void b2m_8255_porta_w(uint8_t data); + void b2m_8255_portb_w(uint8_t data); + void b2m_8255_portc_w(uint8_t data); + uint8_t b2m_8255_portb_r(); + void b2m_ext_8255_portc_w(uint8_t data); + uint8_t b2m_romdisk_porta_r(); + void b2m_romdisk_portb_w(uint8_t data); + void b2m_romdisk_portc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(b2m_fdc_drq); DECLARE_FLOPPY_FORMATS( b2m_floppy_formats ); diff --git a/src/mame/includes/battlera.h b/src/mame/includes/battlera.h index cbaae364261..2a367aff57f 100644 --- a/src/mame/includes/battlera.h +++ b/src/mame/includes/battlera.h @@ -34,10 +34,10 @@ public: int m_msm5205next; int m_toggle; - DECLARE_WRITE8_MEMBER(control_data_w); - DECLARE_READ8_MEMBER(control_data_r); - DECLARE_WRITE8_MEMBER(adpcm_data_w); - DECLARE_WRITE8_MEMBER(adpcm_reset_w); + void control_data_w(uint8_t data); + uint8_t control_data_r(); + void adpcm_data_w(uint8_t data); + void adpcm_reset_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(adpcm_int); virtual void machine_start() override; diff --git a/src/mame/includes/bebox.h b/src/mame/includes/bebox.h index 7b787a212f1..542b2b99c44 100644 --- a/src/mame/includes/bebox.h +++ b/src/mame/includes/bebox.h @@ -73,10 +73,7 @@ public: virtual void machine_reset() override; DECLARE_WRITE_LINE_MEMBER(bebox_pic8259_master_set_int_line); DECLARE_WRITE_LINE_MEMBER(bebox_pic8259_slave_set_int_line); - DECLARE_READ8_MEMBER(get_slave_ack); DECLARE_WRITE_LINE_MEMBER(bebox_dma_hrq_changed); - DECLARE_READ8_MEMBER(bebox_dma8237_fdc_dack_r); - DECLARE_WRITE8_MEMBER(bebox_dma8237_fdc_dack_w); DECLARE_WRITE_LINE_MEMBER(bebox_dma8237_out_eop); DECLARE_WRITE_LINE_MEMBER(pc_dack0_w); DECLARE_WRITE_LINE_MEMBER(pc_dack1_w); @@ -101,8 +98,8 @@ public: DECLARE_WRITE8_MEMBER(bebox_flash_w); DECLARE_READ8_MEMBER(at_dma8237_1_r); DECLARE_WRITE8_MEMBER(at_dma8237_1_w); - DECLARE_READ8_MEMBER(bebox_dma_read_byte); - DECLARE_WRITE8_MEMBER(bebox_dma_write_byte); + uint8_t bebox_dma_read_byte(offs_t offset); + void bebox_dma_write_byte(offs_t offset, uint8_t data); DECLARE_READ64_MEMBER(scsi53c810_r); DECLARE_WRITE64_MEMBER(scsi53c810_w); DECLARE_READ64_MEMBER(bb_slave_64be_r); diff --git a/src/mame/includes/bfm_sc4.h b/src/mame/includes/bfm_sc4.h index e1d63b729bc..8a80b640a3d 100644 --- a/src/mame/includes/bfm_sc4.h +++ b/src/mame/includes/bfm_sc4.h @@ -182,12 +182,12 @@ public: DECLARE_WRITE_LINE_MEMBER(bfm_sc4_duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(bfm_sc4_duart_txa); - DECLARE_READ8_MEMBER(bfm_sc4_duart_input_r); - DECLARE_WRITE8_MEMBER(bfm_sc4_duart_output_w); + uint8_t bfm_sc4_duart_input_r(); + void bfm_sc4_duart_output_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(m68307_duart_txa); - DECLARE_READ8_MEMBER(m68307_duart_input_r); - DECLARE_WRITE8_MEMBER(m68307_duart_output_w); + uint8_t m68307_duart_input_r(); + void m68307_duart_output_w(uint8_t data); void init_sc4(); void init_sc4mbus(); diff --git a/src/mame/includes/bfm_sc5.h b/src/mame/includes/bfm_sc5.h index aba4445eebf..1a59bb8b572 100644 --- a/src/mame/includes/bfm_sc5.h +++ b/src/mame/includes/bfm_sc5.h @@ -35,8 +35,8 @@ protected: DECLARE_WRITE_LINE_MEMBER(bfm_sc5_duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(bfm_sc5_duart_txa); - DECLARE_READ8_MEMBER(bfm_sc5_duart_input_r); - DECLARE_WRITE8_MEMBER(bfm_sc5_duart_output_w); + uint8_t bfm_sc5_duart_input_r(); + void bfm_sc5_duart_output_w(uint8_t data); }; INPUT_PORTS_EXTERN( bfm_sc5 ); diff --git a/src/mame/includes/blktiger.h b/src/mame/includes/blktiger.h index 29931735e6a..abac0a027b0 100644 --- a/src/mame/includes/blktiger.h +++ b/src/mame/includes/blktiger.h @@ -55,8 +55,8 @@ public: required_device m_audiocpu; DECLARE_READ8_MEMBER(blktiger_from_mcu_r); DECLARE_WRITE8_MEMBER(blktiger_to_mcu_w); - DECLARE_READ8_MEMBER(blktiger_from_main_r); - DECLARE_WRITE8_MEMBER(blktiger_to_main_w); + uint8_t blktiger_from_main_r(); + void blktiger_to_main_w(uint8_t data); DECLARE_WRITE8_MEMBER(blktiger_bankswitch_w); DECLARE_WRITE8_MEMBER(blktiger_coinlockout_w); DECLARE_WRITE8_MEMBER(blktiger_txvideoram_w); diff --git a/src/mame/includes/boogwing.h b/src/mame/includes/boogwing.h index 9f1113b2181..fc1411b2b63 100644 --- a/src/mame/includes/boogwing.h +++ b/src/mame/includes/boogwing.h @@ -51,7 +51,7 @@ public: bitmap_ind16 m_temp_bitmap; bitmap_ind16 m_alpha_tmap_bitmap; - DECLARE_WRITE8_MEMBER(sound_bankswitch_w); + void sound_bankswitch_w(uint8_t data); DECLARE_WRITE16_MEMBER(priority_w); void init_boogwing(); virtual void machine_reset() override; diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 0d91d97ede7..40fa11d8ddd 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -101,7 +101,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_irq_hi); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_irq_lo); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_nmi_lo); - DECLARE_WRITE8_MEMBER(ay_audio_nmi_enable_w); + void ay_audio_nmi_enable_w(uint8_t data); void init_btime(); void init_tisland(); diff --git a/src/mame/includes/bw12.h b/src/mame/includes/bw12.h index 02021209d7b..d12c9253a53 100644 --- a/src/mame/includes/bw12.h +++ b/src/mame/includes/bw12.h @@ -74,8 +74,8 @@ private: DECLARE_WRITE_LINE_MEMBER( motor0_w ); DECLARE_WRITE_LINE_MEMBER( motor1_w ); - DECLARE_READ8_MEMBER( ls259_r ); - DECLARE_READ8_MEMBER( pia_pa_r ); + uint8_t ls259_r(offs_t offset); + uint8_t pia_pa_r(); DECLARE_WRITE_LINE_MEMBER( pia_cb2_w ); DECLARE_WRITE_LINE_MEMBER( pit_out2_w ); DECLARE_READ_LINE_MEMBER( ay3600_shift_r ); diff --git a/src/mame/includes/bw2.h b/src/mame/includes/bw2.h index 31ef65e4ae6..7757af9689a 100644 --- a/src/mame/includes/bw2.h +++ b/src/mame/includes/bw2.h @@ -64,13 +64,13 @@ public: virtual void machine_start() override; - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); - DECLARE_WRITE8_MEMBER( ppi_pa_w ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_READ8_MEMBER( ppi_pc_r ); + void ppi_pa_w(uint8_t data); + uint8_t ppi_pb_r(); + void ppi_pc_w(uint8_t data); + uint8_t ppi_pc_r(); DECLARE_WRITE_LINE_MEMBER( mtron_w ); diff --git a/src/mame/includes/c80.h b/src/mame/includes/c80.h index ed174ea8e58..05122066232 100644 --- a/src/mame/includes/c80.h +++ b/src/mame/includes/c80.h @@ -39,9 +39,9 @@ public: virtual void machine_start() override; - DECLARE_READ8_MEMBER( pio1_pa_r ); - DECLARE_WRITE8_MEMBER( pio1_pa_w ); - DECLARE_WRITE8_MEMBER( pio1_pb_w ); + uint8_t pio1_pa_r(); + void pio1_pa_w(uint8_t data); + void pio1_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( pio1_brdy_w ); DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h index be9dc38a15b..15e5f462a4c 100644 --- a/src/mame/includes/centiped.h +++ b/src/mame/includes/centiped.h @@ -99,7 +99,7 @@ private: DECLARE_READ8_MEMBER(earom_read); DECLARE_WRITE8_MEMBER(earom_write); void earom_control_w(uint8_t data); - DECLARE_READ8_MEMBER(caterplr_unknown_r); + uint8_t caterplr_unknown_r(); DECLARE_WRITE8_MEMBER(caterplr_AY8910_w); DECLARE_READ8_MEMBER(caterplr_AY8910_r); DECLARE_READ8_MEMBER(multiped_eeprom_r); diff --git a/src/mame/includes/cidelsa.h b/src/mame/includes/cidelsa.h index 0cf8a12f6a1..a75e93eb298 100644 --- a/src/mame/includes/cidelsa.h +++ b/src/mame/includes/cidelsa.h @@ -52,9 +52,9 @@ public: , m_leds(*this, "led%u", 0U) { } - DECLARE_WRITE8_MEMBER( cdp1869_w ); - DECLARE_WRITE8_MEMBER( destryer_out1_w ); - DECLARE_WRITE8_MEMBER( altair_out1_w ); + void cdp1869_w(offs_t offset, uint8_t data); + void destryer_out1_w(uint8_t data); + void altair_out1_w(uint8_t data); DECLARE_READ_LINE_MEMBER( clear_r ); @@ -109,13 +109,13 @@ public: m_psg(*this, AY8910_TAG) { } - DECLARE_READ8_MEMBER( sound_in_r ); - DECLARE_READ8_MEMBER( psg_r ); - DECLARE_WRITE8_MEMBER( sound_bankswitch_w ); - DECLARE_WRITE8_MEMBER( sound_g_w ); - DECLARE_WRITE8_MEMBER( psg_w ); - DECLARE_WRITE8_MEMBER( out1_w ); - DECLARE_WRITE8_MEMBER( psg_pb_w ); + uint8_t sound_in_r(); + uint8_t psg_r(); + void sound_bankswitch_w(uint8_t data); + void sound_g_w(uint8_t data); + void psg_w(uint8_t data); + void out1_w(uint8_t data); + void psg_pb_w(uint8_t data); CDP1869_CHAR_RAM_READ_MEMBER(draco_charram_r); CDP1869_CHAR_RAM_WRITE_MEMBER(draco_charram_w); diff --git a/src/mame/includes/cinemat.h b/src/mame/includes/cinemat.h index 5edd10a6e89..241b4672cab 100644 --- a/src/mame/includes/cinemat.h +++ b/src/mame/includes/cinemat.h @@ -77,7 +77,7 @@ public: DECLARE_READ8_MEMBER(speedfrk_wheel_r); DECLARE_READ8_MEMBER(speedfrk_gear_r); virtual DECLARE_WRITE_LINE_MEMBER(vector_control_w); - DECLARE_READ8_MEMBER(joystick_read); + uint8_t joystick_read(); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); void init_speedfrk(); uint32_t screen_update_cinemat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -250,10 +250,10 @@ public: protected: TIMER_CALLBACK_MEMBER(synced_sound_w); DECLARE_WRITE_LINE_MEMBER(demon_sound4_w); - DECLARE_READ8_MEMBER(sound_porta_r); - DECLARE_READ8_MEMBER(sound_portb_r); - DECLARE_WRITE8_MEMBER(sound_portb_w); - DECLARE_WRITE8_MEMBER(sound_output_w); + uint8_t sound_porta_r(); + uint8_t sound_portb_r(); + void sound_portb_w(uint8_t data); + void sound_output_w(uint8_t data); virtual void sound_start() override; virtual void sound_reset() override; diff --git a/src/mame/includes/cninja.h b/src/mame/includes/cninja.h index a88f1b979bc..28174d7ccc7 100644 --- a/src/mame/includes/cninja.h +++ b/src/mame/includes/cninja.h @@ -58,8 +58,8 @@ public: uint16_t m_priority; template DECLARE_WRITE16_MEMBER(cninja_pf_control_w); - DECLARE_WRITE8_MEMBER(sound_bankswitch_w); - DECLARE_WRITE8_MEMBER(cninjabl2_oki_bank_w); + void sound_bankswitch_w(uint8_t data); + void cninjabl2_oki_bank_w(uint8_t data); void init_mutantf(); void init_cninjabl2(); DECLARE_MACHINE_START(robocop2); diff --git a/src/mame/includes/compgolf.h b/src/mame/includes/compgolf.h index 1f537f56b1f..3b18e5fb190 100644 --- a/src/mame/includes/compgolf.h +++ b/src/mame/includes/compgolf.h @@ -41,11 +41,11 @@ public: /* misc */ int m_bank; - DECLARE_WRITE8_MEMBER(compgolf_ctrl_w); - DECLARE_WRITE8_MEMBER(compgolf_video_w); - DECLARE_WRITE8_MEMBER(compgolf_back_w); - DECLARE_WRITE8_MEMBER(compgolf_scrollx_lo_w); - DECLARE_WRITE8_MEMBER(compgolf_scrolly_lo_w); + void compgolf_ctrl_w(uint8_t data); + void compgolf_video_w(offs_t offset, uint8_t data); + void compgolf_back_w(offs_t offset, uint8_t data); + void compgolf_scrollx_lo_w(uint8_t data); + void compgolf_scrolly_lo_w(uint8_t data); void init_compgolf(); TILE_GET_INFO_MEMBER(get_text_info); TILEMAP_MAPPER_MEMBER(back_scan); diff --git a/src/mame/includes/comx35.h b/src/mame/includes/comx35.h index 458128ebeaa..2ea2d0fcee7 100644 --- a/src/mame/includes/comx35.h +++ b/src/mame/includes/comx35.h @@ -76,7 +76,7 @@ public: DECLARE_READ_LINE_MEMBER( ef2_r ); DECLARE_READ_LINE_MEMBER( ef4_r ); DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_WRITE8_MEMBER( sc_w ); + void sc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( irq_w ); DECLARE_WRITE_LINE_MEMBER( prd_w ); DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); diff --git a/src/mame/includes/concept.h b/src/mame/includes/concept.h index 8471f0c7eb6..3dd6b89f7dd 100644 --- a/src/mame/includes/concept.h +++ b/src/mame/includes/concept.h @@ -64,10 +64,10 @@ private: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(via_in_a); - DECLARE_WRITE8_MEMBER(via_out_a); - DECLARE_READ8_MEMBER(via_in_b); - DECLARE_WRITE8_MEMBER(via_out_b); + uint8_t via_in_a(); + void via_out_a(uint8_t data); + uint8_t via_in_b(); + void via_out_b(uint8_t data); DECLARE_WRITE_LINE_MEMBER(via_out_cb2); DECLARE_WRITE_LINE_MEMBER(via_irq_func); DECLARE_WRITE_LINE_MEMBER(ioc_interrupt); diff --git a/src/mame/includes/dai.h b/src/mame/includes/dai.h index 4bceae6060a..dbb16e37288 100644 --- a/src/mame/includes/dai.h +++ b/src/mame/includes/dai.h @@ -62,8 +62,8 @@ private: DECLARE_WRITE8_MEMBER(dai_amd9511_w); DECLARE_READ8_MEMBER(dai_pit_r); DECLARE_WRITE8_MEMBER(dai_pit_w); - DECLARE_READ8_MEMBER(dai_keyboard_r); - DECLARE_WRITE8_MEMBER(dai_keyboard_w); + uint8_t dai_keyboard_r(); + void dai_keyboard_w(uint8_t data); void dai_palette(palette_device &palette) const; uint32_t screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void dai_update_memory(int dai_rom_bank); diff --git a/src/mame/includes/dassault.h b/src/mame/includes/dassault.h index 5bcad8a2c8f..0d40debec59 100644 --- a/src/mame/includes/dassault.h +++ b/src/mame/includes/dassault.h @@ -61,7 +61,7 @@ private: DECLARE_READ16_MEMBER(dassault_control_r); DECLARE_WRITE16_MEMBER(dassault_control_w); DECLARE_READ16_MEMBER(dassault_sub_control_r); - DECLARE_WRITE8_MEMBER(sound_bankswitch_w); + void sound_bankswitch_w(uint8_t data); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_dassault(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/dec0.h b/src/mame/includes/dec0.h index 9712948f85b..35409944e54 100644 --- a/src/mame/includes/dec0.h +++ b/src/mame/includes/dec0.h @@ -123,11 +123,11 @@ private: DECLARE_READ16_MEMBER(midres_controls_r); DECLARE_READ8_MEMBER(hippodrm_prot_r); DECLARE_WRITE8_MEMBER(hippodrm_prot_w); - DECLARE_READ8_MEMBER(dec0_mcu_port0_r); - DECLARE_WRITE8_MEMBER(dec0_mcu_port0_w); - DECLARE_WRITE8_MEMBER(dec0_mcu_port1_w); - DECLARE_WRITE8_MEMBER(dec0_mcu_port2_w); - DECLARE_WRITE8_MEMBER(dec0_mcu_port3_w); + uint8_t dec0_mcu_port0_r(); + void dec0_mcu_port0_w(uint8_t data); + void dec0_mcu_port1_w(uint8_t data); + void dec0_mcu_port2_w(uint8_t data); + void dec0_mcu_port3_w(uint8_t data); DECLARE_READ16_MEMBER(hippodrm_68000_share_r); DECLARE_WRITE16_MEMBER(hippodrm_68000_share_w); DECLARE_WRITE16_MEMBER(sprite_mirror_w); diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index 031e557c59d..5815794feec 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -148,13 +148,13 @@ private: DECLARE_WRITE8_MEMBER(sub_irq_off_w); DECLARE_WRITE8_MEMBER(sub_firq_off_w); DECLARE_WRITE8_MEMBER(flip_screen_w); - DECLARE_READ8_MEMBER(i8751_port0_r); - DECLARE_WRITE8_MEMBER(i8751_port0_w); - DECLARE_READ8_MEMBER(i8751_port1_r); - DECLARE_WRITE8_MEMBER(i8751_port1_w); - DECLARE_WRITE8_MEMBER(gondo_mcu_to_main_w); - DECLARE_WRITE8_MEMBER(shackled_mcu_to_main_w); - DECLARE_WRITE8_MEMBER(srdarwin_mcu_to_main_w); + uint8_t i8751_port0_r(); + void i8751_port0_w(uint8_t data); + uint8_t i8751_port1_r(); + void i8751_port1_w(uint8_t data); + void gondo_mcu_to_main_w(uint8_t data); + void shackled_mcu_to_main_w(uint8_t data); + void srdarwin_mcu_to_main_w(uint8_t data); DECLARE_WRITE8_MEMBER(dec8_bg_data_w); DECLARE_READ8_MEMBER(dec8_bg_data_r); DECLARE_WRITE8_MEMBER(dec8_videoram_w); diff --git a/src/mame/includes/decocass.h b/src/mame/includes/decocass.h index 63e1f073a33..df5b855a856 100644 --- a/src/mame/includes/decocass.h +++ b/src/mame/includes/decocass.h @@ -172,10 +172,10 @@ private: DECLARE_WRITE8_MEMBER(decocass_e900_w); - DECLARE_WRITE8_MEMBER(i8041_p1_w); - DECLARE_READ8_MEMBER(i8041_p1_r); - DECLARE_WRITE8_MEMBER(i8041_p2_w); - DECLARE_READ8_MEMBER(i8041_p2_r); + void i8041_p1_w(uint8_t data); + uint8_t i8041_p1_r(); + void i8041_p2_w(uint8_t data); + uint8_t i8041_p2_r(); void decocass_machine_state_save_init(); diff --git a/src/mame/includes/dgn_beta.h b/src/mame/includes/dgn_beta.h index 46d97a465e1..b5e66e5512f 100644 --- a/src/mame/includes/dgn_beta.h +++ b/src/mame/includes/dgn_beta.h @@ -195,23 +195,23 @@ private: virtual void machine_reset() override; void dgn_beta_palette(palette_device &palette) const; - DECLARE_READ8_MEMBER(d_pia0_pa_r); - DECLARE_WRITE8_MEMBER(d_pia0_pa_w); - DECLARE_READ8_MEMBER(d_pia0_pb_r); - DECLARE_WRITE8_MEMBER(d_pia0_pb_w); + uint8_t d_pia0_pa_r(); + void d_pia0_pa_w(uint8_t data); + uint8_t d_pia0_pb_r(); + void d_pia0_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(d_pia0_cb2_w); DECLARE_WRITE_LINE_MEMBER(d_pia0_irq_a); DECLARE_WRITE_LINE_MEMBER(d_pia0_irq_b); - DECLARE_READ8_MEMBER(d_pia1_pa_r); - DECLARE_WRITE8_MEMBER(d_pia1_pa_w); - DECLARE_READ8_MEMBER(d_pia1_pb_r); - DECLARE_WRITE8_MEMBER(d_pia1_pb_w); + uint8_t d_pia1_pa_r(); + void d_pia1_pa_w(uint8_t data); + uint8_t d_pia1_pb_r(); + void d_pia1_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(d_pia1_irq_a); DECLARE_WRITE_LINE_MEMBER(d_pia1_irq_b); - DECLARE_READ8_MEMBER(d_pia2_pa_r); - DECLARE_WRITE8_MEMBER(d_pia2_pa_w); - DECLARE_READ8_MEMBER(d_pia2_pb_r); - DECLARE_WRITE8_MEMBER(d_pia2_pb_w); + uint8_t d_pia2_pa_r(); + void d_pia2_pa_w(uint8_t data); + uint8_t d_pia2_pb_r(); + void d_pia2_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(d_pia2_irq_a); DECLARE_WRITE_LINE_MEMBER(d_pia2_irq_b); DECLARE_WRITE_LINE_MEMBER(dgnbeta_fdc_intrq_w); diff --git a/src/mame/includes/dragrace.h b/src/mame/includes/dragrace.h index 80a08bbbf59..1ca05f7c273 100644 --- a/src/mame/includes/dragrace.h +++ b/src/mame/includes/dragrace.h @@ -51,8 +51,8 @@ public: void dragrace(machine_config &config); private: - DECLARE_WRITE8_MEMBER(speed1_w); - DECLARE_WRITE8_MEMBER(speed2_w); + void speed1_w(uint8_t data); + void speed2_w(uint8_t data); DECLARE_READ8_MEMBER(dragrace_input_r); DECLARE_READ8_MEMBER(dragrace_steering_r); DECLARE_READ8_MEMBER(dragrace_scanline_r); diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index f7e9fb1d09b..2bdcc86b658 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -79,9 +79,9 @@ public: DECLARE_WRITE_LINE_MEMBER(layer_half2_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); - DECLARE_WRITE8_MEMBER(hnoridur_blit_pixel_w); - DECLARE_WRITE8_MEMBER(dynax_blit_scrollx_w); - DECLARE_WRITE8_MEMBER(dynax_blit_scrolly_w); + void hnoridur_blit_pixel_w(offs_t offset, uint8_t data); + void dynax_blit_scrollx_w(uint8_t data); + void dynax_blit_scrolly_w(uint8_t data); protected: required_device m_maincpu; @@ -103,7 +103,7 @@ protected: DECLARE_VIDEO_START(hnoridur); DECLARE_WRITE8_MEMBER(dynax_vblank_ack_w); - DECLARE_WRITE8_MEMBER(dynax_blit_dest_w); + void dynax_blit_dest_w(uint8_t data); DECLARE_WRITE8_MEMBER(dynax_blit_romregion_w); DECLARE_WRITE8_MEMBER(dynax_extra_scrollx_w); DECLARE_WRITE8_MEMBER(dynax_extra_scrolly_w); @@ -161,21 +161,21 @@ private: DECLARE_READ8_MEMBER(tenkai_ip_r); DECLARE_READ8_MEMBER(tenkai_palette_r); DECLARE_WRITE8_MEMBER(tenkai_palette_w); - DECLARE_READ8_MEMBER(tenkai_p3_r); - DECLARE_WRITE8_MEMBER(tenkai_p3_w); - DECLARE_WRITE8_MEMBER(tenkai_p4_w); - DECLARE_READ8_MEMBER(tenkai_p5_r); - DECLARE_WRITE8_MEMBER(tenkai_p6_w); - DECLARE_WRITE8_MEMBER(tenkai_p7_w); - DECLARE_WRITE8_MEMBER(tenkai_p8_w); - DECLARE_READ8_MEMBER(tenkai_p8_r); + uint8_t tenkai_p3_r(); + void tenkai_p3_w(uint8_t data); + void tenkai_p4_w(uint8_t data); + uint8_t tenkai_p5_r(); + void tenkai_p6_w(uint8_t data); + void tenkai_p7_w(uint8_t data); + void tenkai_p8_w(uint8_t data); + uint8_t tenkai_p8_r(); DECLARE_WRITE_LINE_MEMBER(tenkai_6c_w); DECLARE_WRITE_LINE_MEMBER(tenkai_70_w); DECLARE_WRITE8_MEMBER(tenkai_blit_romregion_w); DECLARE_READ8_MEMBER(gekisha_keyboard_0_r); DECLARE_READ8_MEMBER(gekisha_keyboard_1_r); DECLARE_WRITE8_MEMBER(gekisha_hopper_w); - DECLARE_WRITE8_MEMBER(gekisha_p4_w); + void gekisha_p4_w(uint8_t data); //DECLARE_WRITE8_MEMBER(dynax_blit_pen_w); DECLARE_WRITE8_MEMBER(dynax_blit2_dest_w); DECLARE_WRITE8_MEMBER(tenkai_blit_dest_w); @@ -197,16 +197,16 @@ private: DECLARE_WRITE_LINE_MEMBER(mjdialq2_layer0_enable_w); DECLARE_WRITE_LINE_MEMBER(mjdialq2_layer1_enable_w); DECLARE_WRITE8_MEMBER(dynax_blit2_romregion_w); - DECLARE_WRITE8_MEMBER(hanamai_blit_pixel_w); - DECLARE_WRITE8_MEMBER(cdracula_blit_pixel_w); - DECLARE_WRITE8_MEMBER(drgpunch_blit_pixel_w); - DECLARE_WRITE8_MEMBER(jantouki_blit_pixel_w); - DECLARE_WRITE8_MEMBER(jantouki_blit2_pixel_w); - DECLARE_WRITE8_MEMBER(mjdialq2_blit_pixel_w); - DECLARE_WRITE8_MEMBER(dynax_blit2_scrollx_w); - DECLARE_WRITE8_MEMBER(dynax_blit2_scrolly_w); - DECLARE_WRITE8_MEMBER(tenkai_blit_scrollx_w); - DECLARE_WRITE8_MEMBER(tenkai_blit_scrolly_w); + void hanamai_blit_pixel_w(offs_t offset, uint8_t data); + void cdracula_blit_pixel_w(offs_t offset, uint8_t data); + void drgpunch_blit_pixel_w(offs_t offset, uint8_t data); + void jantouki_blit_pixel_w(offs_t offset, uint8_t data); + void jantouki_blit2_pixel_w(offs_t offset, uint8_t data); + void mjdialq2_blit_pixel_w(offs_t offset, uint8_t data); + void dynax_blit2_scrollx_w(uint8_t data); + void dynax_blit2_scrolly_w(uint8_t data); + void tenkai_blit_scrollx_w(uint8_t data); + void tenkai_blit_scrolly_w(uint8_t data); DECLARE_WRITE8_MEMBER(hanamai_priority_w); DECLARE_WRITE8_MEMBER(tenkai_priority_w); DECLARE_WRITE8_MEMBER(mjembase_priority_w); @@ -230,8 +230,8 @@ private: DECLARE_MACHINE_RESET(adpcm); DECLARE_WRITE8_MEMBER(adpcm_reset_w); DECLARE_WRITE_LINE_MEMBER(adpcm_reset_kludge_w); - DECLARE_WRITE8_MEMBER(tenkai_dswsel_w); - DECLARE_READ8_MEMBER(tenkai_dsw_r); + void tenkai_dswsel_w(uint8_t data); + uint8_t tenkai_dsw_r(); DECLARE_WRITE_LINE_MEMBER(tenkai_blitter_irq_w); DECLARE_WRITE_LINE_MEMBER(tenkai_blitter_ack_w); DECLARE_MACHINE_START(hanamai); diff --git a/src/mame/includes/foodf.h b/src/mame/includes/foodf.h index 7a4d2c03695..aea50fa7a24 100644 --- a/src/mame/includes/foodf.h +++ b/src/mame/includes/foodf.h @@ -44,7 +44,7 @@ private: DECLARE_WRITE8_MEMBER(digital_w); DECLARE_WRITE16_MEMBER(foodf_paletteram_w); void foodf_set_flip(int flip); - DECLARE_READ8_MEMBER(pot_r); + uint8_t pot_r(offs_t offset); TILE_GET_INFO_MEMBER(get_playfield_tile_info); uint32_t screen_update_foodf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(scanline_update_timer); diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 92780fe5c92..0c32918bc2c 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -207,7 +207,7 @@ protected: DECLARE_WRITE16_MEMBER( hdgsp_paletteram_hi_w ); /* DSK board */ - DECLARE_WRITE32_MEMBER(hddsk_update_pif); + void hddsk_update_pif(uint32_t data); /* DS III/IV board */ TIMER_DEVICE_CALLBACK_MEMBER( ds3sdsp_internal_timer_callback ); @@ -262,12 +262,12 @@ protected: DECLARE_WRITE_LINE_MEMBER(hdds3sdsp_timer_enable_callback); - DECLARE_WRITE32_MEMBER(hdds3sdsp_serial_tx_callback); - DECLARE_READ32_MEMBER(hdds3sdsp_serial_rx_callback); + void hdds3sdsp_serial_tx_callback(uint32_t data); + uint32_t hdds3sdsp_serial_rx_callback(); DECLARE_WRITE_LINE_MEMBER(hdds3xdsp_timer_enable_callback); - DECLARE_WRITE32_MEMBER(hdds3xdsp_serial_tx_callback); - DECLARE_READ32_MEMBER(hdds3xdsp_serial_rx_callback); + void hdds3xdsp_serial_tx_callback(uint32_t data); + uint32_t hdds3xdsp_serial_rx_callback(); void adsp_data_map(address_map &map); diff --git a/src/mame/includes/jack.h b/src/mame/includes/jack.h index ff3a62715fb..9e1d4e897b3 100644 --- a/src/mame/includes/jack.h +++ b/src/mame/includes/jack.h @@ -76,7 +76,7 @@ private: DECLARE_WRITE8_MEMBER(jack_colorram_w); DECLARE_READ8_MEMBER(jack_flipscreen_r); DECLARE_WRITE8_MEMBER(jack_flipscreen_w); - DECLARE_READ8_MEMBER(timer_r); + uint8_t timer_r(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILEMAP_MAPPER_MEMBER(tilemap_scan_cols_flipy); diff --git a/src/mame/includes/llc.h b/src/mame/includes/llc.h index 96f5b47c5cf..259c1b1adf1 100644 --- a/src/mame/includes/llc.h +++ b/src/mame/includes/llc.h @@ -43,14 +43,14 @@ private: DECLARE_WRITE8_MEMBER(llc2_rom_disable_w); DECLARE_WRITE8_MEMBER(llc2_basic_enable_w); void kbd_put(u8 data); - DECLARE_READ8_MEMBER(llc1_port1_a_r); - DECLARE_READ8_MEMBER(llc1_port2_a_r); - DECLARE_READ8_MEMBER(llc1_port2_b_r); - DECLARE_WRITE8_MEMBER(llc1_port1_a_w); - DECLARE_WRITE8_MEMBER(llc1_port1_b_w); - DECLARE_READ8_MEMBER(llc2_port1_b_r); - DECLARE_READ8_MEMBER(llc2_port2_a_r); - DECLARE_WRITE8_MEMBER(llc2_port1_b_w); + uint8_t llc1_port1_a_r(); + uint8_t llc1_port2_a_r(); + uint8_t llc1_port2_b_r(); + void llc1_port1_a_w(uint8_t data); + void llc1_port1_b_w(uint8_t data); + uint8_t llc2_port1_b_r(); + uint8_t llc2_port2_a_r(); + void llc2_port1_b_w(uint8_t data); DECLARE_MACHINE_START(llc1); DECLARE_MACHINE_RESET(llc1); DECLARE_MACHINE_RESET(llc2); diff --git a/src/mame/includes/lviv.h b/src/mame/includes/lviv.h index 4ec63dab2f3..904b1782870 100644 --- a/src/mame/includes/lviv.h +++ b/src/mame/includes/lviv.h @@ -46,22 +46,22 @@ private: void lviv_palette(palette_device &palette) const; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(io_r); - DECLARE_WRITE8_MEMBER(io_w); + uint8_t io_r(offs_t offset); + void io_w(offs_t offset, uint8_t data); - DECLARE_READ8_MEMBER(ppi_0_porta_r); - DECLARE_READ8_MEMBER(ppi_0_portb_r); - DECLARE_READ8_MEMBER(ppi_0_portc_r); - DECLARE_READ8_MEMBER(ppi_1_porta_r); - DECLARE_READ8_MEMBER(ppi_1_portb_r); - DECLARE_READ8_MEMBER(ppi_1_portc_r); + uint8_t ppi_0_porta_r(); + uint8_t ppi_0_portb_r(); + uint8_t ppi_0_portc_r(); + uint8_t ppi_1_porta_r(); + uint8_t ppi_1_portb_r(); + uint8_t ppi_1_portc_r(); - DECLARE_WRITE8_MEMBER(ppi_0_porta_w); - DECLARE_WRITE8_MEMBER(ppi_0_portb_w); - DECLARE_WRITE8_MEMBER(ppi_0_portc_w); - DECLARE_WRITE8_MEMBER(ppi_1_porta_w); - DECLARE_WRITE8_MEMBER(ppi_1_portb_w); - DECLARE_WRITE8_MEMBER(ppi_1_portc_w); + void ppi_0_porta_w(uint8_t data); + void ppi_0_portb_w(uint8_t data); + void ppi_0_portc_w(uint8_t data); + void ppi_1_porta_w(uint8_t data); + void ppi_1_portb_w(uint8_t data); + void ppi_1_portc_w(uint8_t data); DECLARE_SNAPSHOT_LOAD_MEMBER(snapshot_cb); diff --git a/src/mame/includes/madalien.h b/src/mame/includes/madalien.h index aa675e08a0d..ab50214d5a3 100644 --- a/src/mame/includes/madalien.h +++ b/src/mame/includes/madalien.h @@ -74,8 +74,8 @@ private: DECLARE_WRITE8_MEMBER(madalien_output_w); DECLARE_WRITE8_MEMBER(madalien_videoram_w); DECLARE_WRITE8_MEMBER(madalien_charram_w); - DECLARE_WRITE8_MEMBER(madalien_portA_w); - DECLARE_WRITE8_MEMBER(madalien_portB_w); + void madalien_portA_w(uint8_t data); + void madalien_portB_w(uint8_t data); TILEMAP_MAPPER_MEMBER(scan_mode0); TILEMAP_MAPPER_MEMBER(scan_mode1); TILEMAP_MAPPER_MEMBER(scan_mode2); diff --git a/src/mame/includes/mappy.h b/src/mame/includes/mappy.h index 7a5845b9e28..2ab96fc6d92 100644 --- a/src/mame/includes/mappy.h +++ b/src/mame/includes/mappy.h @@ -42,7 +42,6 @@ public: void superpac(machine_config &config); void todruaga(machine_config &config); - void init_grobda(); void init_digdug2(); protected: @@ -104,6 +103,7 @@ private: void mappy_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *spriteram_base); void phozon_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *spriteram_base); + void grobda_cpu2_map(address_map &map); void mappy_cpu1_map(address_map &map); void mappy_cpu2_map(address_map &map); void phozon_cpu1_map(address_map &map); diff --git a/src/mame/includes/mbee.h b/src/mame/includes/mbee.h index cc8fd0fa0fe..b363fa1446a 100644 --- a/src/mame/includes/mbee.h +++ b/src/mame/includes/mbee.h @@ -86,34 +86,34 @@ private: TIMER_MBEE_NEWKB }; - DECLARE_WRITE8_MEMBER(port04_w); - DECLARE_WRITE8_MEMBER(port06_w); - DECLARE_READ8_MEMBER(port07_r); - DECLARE_READ8_MEMBER(port08_r); - DECLARE_WRITE8_MEMBER(port08_w); - DECLARE_WRITE8_MEMBER(port0a_w); - DECLARE_WRITE8_MEMBER(port0b_w); - DECLARE_READ8_MEMBER(port18_r); - DECLARE_READ8_MEMBER(port1c_r); - DECLARE_WRITE8_MEMBER(port1c_w); - DECLARE_WRITE8_MEMBER(mbee128_50_w); - DECLARE_WRITE8_MEMBER(mbee256_50_w); - DECLARE_READ8_MEMBER(telcom_low_r); - DECLARE_READ8_MEMBER(telcom_high_r); - DECLARE_READ8_MEMBER(speed_low_r); - DECLARE_READ8_MEMBER(speed_high_r); - DECLARE_WRITE8_MEMBER(m6545_index_w); - DECLARE_WRITE8_MEMBER(m6545_data_w); - DECLARE_READ8_MEMBER(video_low_r); - DECLARE_READ8_MEMBER(video_high_r); - DECLARE_WRITE8_MEMBER(video_low_w); - DECLARE_WRITE8_MEMBER(video_high_w); - DECLARE_WRITE8_MEMBER(pio_port_b_w); + void port04_w(uint8_t data); + void port06_w(uint8_t data); + uint8_t port07_r(); + uint8_t port08_r(); + void port08_w(uint8_t data); + void port0a_w(uint8_t data); + void port0b_w(uint8_t data); + uint8_t port18_r(); + uint8_t port1c_r(); + void port1c_w(uint8_t data); + void mbee128_50_w(uint8_t data); + void mbee256_50_w(uint8_t data); + uint8_t telcom_low_r(); + uint8_t telcom_high_r(); + uint8_t speed_low_r(); + uint8_t speed_high_r(); + void m6545_index_w(uint8_t data); + void m6545_data_w(uint8_t data); + uint8_t video_low_r(offs_t offset); + uint8_t video_high_r(offs_t offset); + void video_low_w(offs_t offset, uint8_t data); + void video_high_w(offs_t offset, uint8_t data); + void pio_port_b_w(uint8_t data); uint8_t pio_port_b_r(); DECLARE_WRITE_LINE_MEMBER(pio_ardy); DECLARE_WRITE_LINE_MEMBER(crtc_vs); - DECLARE_READ8_MEMBER(fdc_status_r); - DECLARE_WRITE8_MEMBER(fdc_motor_w); + uint8_t fdc_status_r(); + void fdc_motor_w(uint8_t data); DECLARE_MACHINE_RESET(mbee); DECLARE_VIDEO_START(mono); DECLARE_VIDEO_START(standard); diff --git a/src/mame/includes/metalmx.h b/src/mame/includes/metalmx.h index 09924d182d9..56a0b6d47a9 100644 --- a/src/mame/includes/metalmx.h +++ b/src/mame/includes/metalmx.h @@ -47,7 +47,7 @@ private: DECLARE_READ32_MEMBER(host_vram_r); DECLARE_WRITE32_MEMBER(host_vram_w); DECLARE_WRITE32_MEMBER(timer_w); - DECLARE_WRITE8_MEMBER(cage_irq_callback); + void cage_irq_callback(uint8_t data); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_metalmx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/mikro80.h b/src/mame/includes/mikro80.h index f05a86919d2..a78ced1c7ef 100644 --- a/src/mame/includes/mikro80.h +++ b/src/mame/includes/mikro80.h @@ -58,10 +58,10 @@ private: int m_keyboard_mask; int m_key_mask; DECLARE_WRITE8_MEMBER(radio99_sound_w); - DECLARE_READ8_MEMBER(mikro80_8255_portb_r); - DECLARE_READ8_MEMBER(mikro80_8255_portc_r); - DECLARE_WRITE8_MEMBER(mikro80_8255_porta_w); - DECLARE_WRITE8_MEMBER(mikro80_8255_portc_w); + uint8_t mikro80_8255_portb_r(); + uint8_t mikro80_8255_portc_r(); + void mikro80_8255_porta_w(uint8_t data); + void mikro80_8255_portc_w(uint8_t data); DECLARE_READ8_MEMBER(mikro80_keyboard_r); DECLARE_WRITE8_MEMBER(mikro80_keyboard_w); DECLARE_WRITE8_MEMBER(mikro80_tape_w); diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h index 0fc99573837..8cc95a8c6fc 100644 --- a/src/mame/includes/mpu4.h +++ b/src/mame/includes/mpu4.h @@ -275,37 +275,37 @@ protected: DECLARE_WRITE_LINE_MEMBER(ic2_o1_callback); DECLARE_WRITE_LINE_MEMBER(ic2_o2_callback); DECLARE_WRITE_LINE_MEMBER(ic2_o3_callback); - DECLARE_WRITE8_MEMBER(pia_ic3_porta_w); - DECLARE_WRITE8_MEMBER(pia_ic3_portb_w); + void pia_ic3_porta_w(uint8_t data); + void pia_ic3_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_ic3_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic3_cb2_w); - DECLARE_WRITE8_MEMBER(pia_ic4_porta_w); - DECLARE_WRITE8_MEMBER(pia_ic4_portb_w); - DECLARE_READ8_MEMBER(pia_ic4_portb_r); + void pia_ic4_porta_w(uint8_t data); + void pia_ic4_portb_w(uint8_t data); + uint8_t pia_ic4_portb_r(); DECLARE_WRITE_LINE_MEMBER(pia_ic4_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic4_cb2_w); - DECLARE_READ8_MEMBER(pia_ic5_porta_r); - DECLARE_WRITE8_MEMBER(pia_ic5_porta_w); - DECLARE_WRITE8_MEMBER(pia_ic5_portb_w); - DECLARE_READ8_MEMBER(pia_ic5_portb_r); + uint8_t pia_ic5_porta_r(); + void pia_ic5_porta_w(uint8_t data); + void pia_ic5_portb_w(uint8_t data); + uint8_t pia_ic5_portb_r(); DECLARE_WRITE_LINE_MEMBER(pia_ic5_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic5_cb2_w); - DECLARE_WRITE8_MEMBER(pia_ic6_portb_w); - DECLARE_WRITE8_MEMBER(pia_ic6_porta_w); + void pia_ic6_portb_w(uint8_t data); + void pia_ic6_porta_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_ic6_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic6_cb2_w); - DECLARE_WRITE8_MEMBER(pia_ic7_porta_w); - DECLARE_WRITE8_MEMBER(pia_ic7_portb_w); - DECLARE_READ8_MEMBER(pia_ic7_portb_r); + void pia_ic7_porta_w(uint8_t data); + void pia_ic7_portb_w(uint8_t data); + uint8_t pia_ic7_portb_r(); DECLARE_WRITE_LINE_MEMBER(pia_ic7_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic7_cb2_w); - DECLARE_READ8_MEMBER(pia_ic8_porta_r); - DECLARE_WRITE8_MEMBER(pia_ic8_portb_w); + uint8_t pia_ic8_porta_r(); + void pia_ic8_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia_ic8_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_ic8_cb2_w); - DECLARE_WRITE8_MEMBER(pia_gb_porta_w); - DECLARE_WRITE8_MEMBER(pia_gb_portb_w); - DECLARE_READ8_MEMBER(pia_gb_portb_r); + void pia_gb_porta_w(uint8_t data); + void pia_gb_portb_w(uint8_t data); + uint8_t pia_gb_portb_r(); DECLARE_WRITE_LINE_MEMBER(pia_gb_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia_gb_cb2_w); diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h index 3554623932e..e53a87532ba 100644 --- a/src/mame/includes/msx.h +++ b/src/mame/includes/msx.h @@ -292,15 +292,15 @@ protected: DECLARE_READ8_MEMBER(msx_sec_slot_r); DECLARE_READ8_MEMBER(msx_kanji_r); DECLARE_WRITE8_MEMBER(msx_kanji_w); - DECLARE_WRITE8_MEMBER(msx_ppi_port_a_w); - DECLARE_WRITE8_MEMBER(msx_ppi_port_c_w); - DECLARE_READ8_MEMBER(msx_ppi_port_b_r); + void msx_ppi_port_a_w(uint8_t data); + void msx_ppi_port_c_w(uint8_t data); + uint8_t msx_ppi_port_b_r(); DECLARE_READ8_MEMBER(msx_mem_read); DECLARE_WRITE8_MEMBER(msx_mem_write); - DECLARE_READ8_MEMBER(msx_psg_port_a_r); - DECLARE_READ8_MEMBER(msx_psg_port_b_r); - DECLARE_WRITE8_MEMBER(msx_psg_port_a_w); - DECLARE_WRITE8_MEMBER(msx_psg_port_b_w); + uint8_t msx_psg_port_a_r(); + uint8_t msx_psg_port_b_r(); + void msx_psg_port_a_w(uint8_t data); + void msx_psg_port_b_w(uint8_t data); private: void msx_memory_map_all(); diff --git a/src/mame/includes/pecom.h b/src/mame/includes/pecom.h index d6195617535..8b20ab27ca7 100644 --- a/src/mame/includes/pecom.h +++ b/src/mame/includes/pecom.h @@ -48,7 +48,7 @@ protected: DECLARE_READ_LINE_MEMBER(clear_r); DECLARE_READ_LINE_MEMBER(ef2_r); DECLARE_WRITE_LINE_MEMBER(q_w); - DECLARE_WRITE8_MEMBER( sc_w ); + void sc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pecom_prd_w); CDP1869_CHAR_RAM_READ_MEMBER(pecom_char_ram_r); CDP1869_CHAR_RAM_WRITE_MEMBER(pecom_char_ram_w); diff --git a/src/mame/includes/pk8000.h b/src/mame/includes/pk8000.h index 6bd85f76204..829b8434628 100644 --- a/src/mame/includes/pk8000.h +++ b/src/mame/includes/pk8000.h @@ -15,9 +15,9 @@ public: , m_maincpu(*this, "maincpu") { } - DECLARE_READ8_MEMBER(_84_porta_r); - DECLARE_WRITE8_MEMBER(_84_porta_w); - DECLARE_WRITE8_MEMBER(_84_portc_w); + uint8_t _84_porta_r(); + void _84_porta_w(uint8_t data); + void _84_portc_w(uint8_t data); protected: DECLARE_READ8_MEMBER(video_color_r); diff --git a/src/mame/includes/runaway.h b/src/mame/includes/runaway.h index d57ec35406e..d1686e9e1a6 100644 --- a/src/mame/includes/runaway.h +++ b/src/mame/includes/runaway.h @@ -36,7 +36,7 @@ private: DECLARE_WRITE8_MEMBER(runaway_paletteram_w); DECLARE_WRITE8_MEMBER(runaway_video_ram_w); DECLARE_WRITE_LINE_MEMBER(tile_bank_w); - DECLARE_READ8_MEMBER(runaway_pot_r); + uint8_t runaway_pot_r(offs_t offset); TILE_GET_INFO_MEMBER(runaway_get_tile_info); TILE_GET_INFO_MEMBER(qwak_get_tile_info); DECLARE_VIDEO_START(qwak); diff --git a/src/mame/includes/shootout.h b/src/mame/includes/shootout.h index 8fd6e1e580c..eb3eba877fa 100644 --- a/src/mame/includes/shootout.h +++ b/src/mame/includes/shootout.h @@ -48,10 +48,10 @@ private: int m_ccnt_old_val; - DECLARE_WRITE8_MEMBER(bankswitch_w); + void bankswitch_w(uint8_t data); DECLARE_READ8_MEMBER(sound_cpu_command_r); DECLARE_WRITE8_MEMBER(sound_cpu_command_w); - DECLARE_WRITE8_MEMBER(flipscreen_w); + void flipscreen_w(uint8_t data); DECLARE_WRITE8_MEMBER(coincounter_w); DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(textram_w); diff --git a/src/mame/includes/starwars.h b/src/mame/includes/starwars.h index ec1cd37a17b..01b6b185feb 100644 --- a/src/mame/includes/starwars.h +++ b/src/mame/includes/starwars.h @@ -92,8 +92,8 @@ private: DECLARE_WRITE8_MEMBER(quad_pokeyn_w); virtual void machine_reset() override; TIMER_CALLBACK_MEMBER(math_run_clear); - DECLARE_READ8_MEMBER(r6532_porta_r); - DECLARE_WRITE8_MEMBER(r6532_porta_w); + uint8_t r6532_porta_r(); + void r6532_porta_w(uint8_t data); void starwars_mproc_init(); void starwars_mproc_reset(); diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h index 940c312f423..4198336b2a2 100644 --- a/src/mame/includes/super80.h +++ b/src/mame/includes/super80.h @@ -140,10 +140,10 @@ protected: void port3f_w(u8 data); u8 port3e_r(); DECLARE_WRITE_LINE_MEMBER(busreq_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); + uint8_t io_read_byte(offs_t offset); + void io_write_byte(offs_t offset, uint8_t data); MC6845_UPDATE_ROW(crtc_update_row); uint32_t screen_update_super80v(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); required_device m_crtc; diff --git a/src/mame/includes/tigeroad.h b/src/mame/includes/tigeroad.h index 26fd3646a43..5d4d9ce4eef 100644 --- a/src/mame/includes/tigeroad.h +++ b/src/mame/includes/tigeroad.h @@ -102,9 +102,9 @@ private: DECLARE_WRITE16_MEMBER(pushman_mcu_comm_w); DECLARE_WRITE16_MEMBER(bballs_mcu_comm_w); - DECLARE_WRITE8_MEMBER(mcu_pa_w); - DECLARE_WRITE8_MEMBER(mcu_pb_w); - DECLARE_WRITE8_MEMBER(mcu_pc_w); + void mcu_pa_w(uint8_t data); + void mcu_pb_w(uint8_t data); + void mcu_pc_w(uint8_t data); void bballs_map(address_map &map); void pushman_map(address_map &map); @@ -135,8 +135,7 @@ private: void f1dream_map(address_map &map); void f1dream_mcu_io(address_map &map); - DECLARE_WRITE8_MEMBER(out1_w); - DECLARE_WRITE8_MEMBER(out3_w); + void out3_w(uint8_t data); DECLARE_READ8_MEMBER(mcu_shared_r); DECLARE_WRITE8_MEMBER(mcu_shared_w); diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index 5a71044dd55..e95c575e11b 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -104,11 +104,11 @@ protected: DECLARE_READ16_MEMBER(semibase_unknown_r); DECLARE_WRITE16_MEMBER(jumpkids_sound_w); DECLARE_WRITE16_MEMBER(semicom_soundcmd_w); - DECLARE_WRITE8_MEMBER(oki_sound_bank_w); - DECLARE_WRITE8_MEMBER(jumpkids_oki_bank_w); - DECLARE_WRITE8_MEMBER(prot_p0_w); - DECLARE_WRITE8_MEMBER(prot_p1_w); - DECLARE_WRITE8_MEMBER(prot_p2_w); + void oki_sound_bank_w(uint8_t data); + void jumpkids_oki_bank_w(uint8_t data); + void prot_p0_w(uint8_t data); + void prot_p1_w(uint8_t data); + void prot_p2_w(uint8_t data); DECLARE_READ16_MEMBER(bcstory_1a0_read); DECLARE_WRITE16_MEMBER(bcstory_tilebank_w); DECLARE_WRITE16_MEMBER(chokchok_tilebank_w); diff --git a/src/mame/includes/tunhunt.h b/src/mame/includes/tunhunt.h index 1b6c948028c..f4a830a02e3 100644 --- a/src/mame/includes/tunhunt.h +++ b/src/mame/includes/tunhunt.h @@ -28,14 +28,14 @@ public: void tunhunt(machine_config &config); private: - DECLARE_WRITE8_MEMBER(control_w); - DECLARE_READ8_MEMBER(button_r); - DECLARE_WRITE8_MEMBER(videoram_w); - DECLARE_READ8_MEMBER(dsw2_0r); - DECLARE_READ8_MEMBER(dsw2_1r); - DECLARE_READ8_MEMBER(dsw2_2r); - DECLARE_READ8_MEMBER(dsw2_3r); - DECLARE_READ8_MEMBER(dsw2_4r); + void control_w(uint8_t data); + uint8_t button_r(offs_t offset); + void videoram_w(offs_t offset, uint8_t data); + uint8_t dsw2_0r(); + uint8_t dsw2_1r(); + uint8_t dsw2_2r(); + uint8_t dsw2_3r(); + uint8_t dsw2_4r(); TILE_GET_INFO_MEMBER(get_fg_tile_info); diff --git a/src/mame/includes/ut88.h b/src/mame/includes/ut88.h index 3a19639d0cb..ad1b571680d 100644 --- a/src/mame/includes/ut88.h +++ b/src/mame/includes/ut88.h @@ -76,9 +76,9 @@ private: DECLARE_READ8_MEMBER(keyboard_r); DECLARE_WRITE8_MEMBER(keyboard_w); DECLARE_WRITE8_MEMBER(sound_w); - DECLARE_READ8_MEMBER(ppi_portb_r); - DECLARE_READ8_MEMBER(ppi_portc_r); - DECLARE_WRITE8_MEMBER(ppi_porta_w); + uint8_t ppi_portb_r(); + uint8_t ppi_portc_r(); + void ppi_porta_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/vcs80.h b/src/mame/includes/vcs80.h index 51646edecb1..a94063fa5d5 100644 --- a/src/mame/includes/vcs80.h +++ b/src/mame/includes/vcs80.h @@ -46,8 +46,8 @@ private: DECLARE_READ8_MEMBER( pio_r ); DECLARE_WRITE8_MEMBER( pio_w ); - DECLARE_READ8_MEMBER( pio_pa_r ); - DECLARE_WRITE8_MEMBER( pio_pb_w ); + uint8_t pio_pa_r(); + void pio_pb_w(uint8_t data); uint8_t mem_r(offs_t offset) { diff --git a/src/mame/includes/vector06.h b/src/mame/includes/vector06.h index d535114ca9d..36fa3dd322c 100644 --- a/src/mame/includes/vector06.h +++ b/src/mame/includes/vector06.h @@ -61,17 +61,17 @@ public: private: DECLARE_FLOPPY_FORMATS(floppy_formats); - DECLARE_READ8_MEMBER(vector06_8255_portb_r); - DECLARE_READ8_MEMBER(vector06_8255_portc_r); - DECLARE_WRITE8_MEMBER(vector06_8255_porta_w); - DECLARE_WRITE8_MEMBER(vector06_8255_portb_w); + uint8_t vector06_8255_portb_r(); + uint8_t vector06_8255_portc_r(); + void vector06_8255_porta_w(uint8_t data); + void vector06_8255_portb_w(uint8_t data); DECLARE_WRITE8_MEMBER(vector06_color_set); - DECLARE_READ8_MEMBER(vector06_romdisk_portb_r); - DECLARE_WRITE8_MEMBER(vector06_romdisk_portb_w); - DECLARE_WRITE8_MEMBER(vector06_romdisk_porta_w); - DECLARE_WRITE8_MEMBER(vector06_romdisk_portc_w); + uint8_t vector06_romdisk_portb_r(); + void vector06_romdisk_portb_w(uint8_t data); + void vector06_romdisk_porta_w(uint8_t data); + void vector06_romdisk_portc_w(uint8_t data); DECLARE_WRITE8_MEMBER(vector06_disc_w); - DECLARE_WRITE8_MEMBER(vector06_status_callback); + void vector06_status_callback(uint8_t data); DECLARE_WRITE8_MEMBER(vector06_ramdisk_w); DECLARE_WRITE_LINE_MEMBER(speaker_w); void vector06_set_video_mode(int width); diff --git a/src/mame/machine/ac1.cpp b/src/mame/machine/ac1.cpp index e12a0b6c726..342f77e5b60 100644 --- a/src/mame/machine/ac1.cpp +++ b/src/mame/machine/ac1.cpp @@ -13,7 +13,7 @@ #include "imagedev/cassette.h" #include "includes/ac1.h" -READ8_MEMBER(ac1_state::ac1_port_b_r) +uint8_t ac1_state::ac1_port_b_r() { uint8_t data = 0x7f; @@ -25,7 +25,7 @@ READ8_MEMBER(ac1_state::ac1_port_b_r) #define BNOT(x) ((x) ? 0 : 1) -READ8_MEMBER(ac1_state::ac1_port_a_r) +uint8_t ac1_state::ac1_port_a_r() { uint8_t line0 = m_io_line[0]->read(); uint8_t line1 = m_io_line[1]->read(); @@ -75,11 +75,11 @@ READ8_MEMBER(ac1_state::ac1_port_a_r) return td0 + (td1 << 1) +(td2 << 2) +(td3 << 3) +(td4 << 4) +(td5 << 5) +(td6 << 6) +(tast << 7); } -WRITE8_MEMBER(ac1_state::ac1_port_a_w) +void ac1_state::ac1_port_a_w(uint8_t data) { } -WRITE8_MEMBER(ac1_state::ac1_port_b_w) +void ac1_state::ac1_port_b_w(uint8_t data) { /* diff --git a/src/mame/machine/b2m.cpp b/src/mame/machine/b2m.cpp index be10c86bf73..0ae0242c9ad 100644 --- a/src/mame/machine/b2m.cpp +++ b/src/mame/machine/b2m.cpp @@ -146,24 +146,24 @@ WRITE_LINE_MEMBER(b2m_state::bm2_pit_out1) m_speaker->level_w(state); } -WRITE8_MEMBER(b2m_state::b2m_8255_porta_w) +void b2m_state::b2m_8255_porta_w(uint8_t data) { m_b2m_8255_porta = data; } -WRITE8_MEMBER(b2m_state::b2m_8255_portb_w) +void b2m_state::b2m_8255_portb_w(uint8_t data) { m_b2m_video_scroll = data; } -WRITE8_MEMBER(b2m_state::b2m_8255_portc_w) +void b2m_state::b2m_8255_portc_w(uint8_t data) { m_b2m_8255_portc = data; b2m_set_bank(m_b2m_8255_portc & 7); m_b2m_video_page = (m_b2m_8255_portc >> 7) & 1; } -READ8_MEMBER(b2m_state::b2m_8255_portb_r) +uint8_t b2m_state::b2m_8255_portb_r() { return m_b2m_video_scroll; } @@ -176,7 +176,7 @@ WRITE_LINE_MEMBER( b2m_state::b2m_fdc_drq ) } -WRITE8_MEMBER(b2m_state::b2m_ext_8255_portc_w) +void b2m_state::b2m_ext_8255_portc_w(uint8_t data) { uint8_t drive = ((data >> 1) & 1) ^ 1; uint8_t side = (data & 1) ^ 1; @@ -207,18 +207,18 @@ WRITE8_MEMBER(b2m_state::b2m_ext_8255_portc_w) } } -READ8_MEMBER(b2m_state::b2m_romdisk_porta_r) +uint8_t b2m_state::b2m_romdisk_porta_r() { uint8_t *romdisk = memregion("maincpu")->base() + 0x12000; return romdisk[m_b2m_romdisk_msb*256+m_b2m_romdisk_lsb]; } -WRITE8_MEMBER(b2m_state::b2m_romdisk_portb_w) +void b2m_state::b2m_romdisk_portb_w(uint8_t data) { m_b2m_romdisk_lsb = data; } -WRITE8_MEMBER(b2m_state::b2m_romdisk_portc_w) +void b2m_state::b2m_romdisk_portc_w(uint8_t data) { m_b2m_romdisk_msb = data & 0x7f; } diff --git a/src/mame/machine/bebox.cpp b/src/mame/machine/bebox.cpp index 96379ce3b5b..e8bb4eecf71 100644 --- a/src/mame/machine/bebox.cpp +++ b/src/mame/machine/bebox.cpp @@ -370,12 +370,6 @@ WRITE_LINE_MEMBER(bebox_state::bebox_pic8259_slave_set_int_line) m_pic8259[0]->ir2_w(state); } -READ8_MEMBER(bebox_state::get_slave_ack) -{ - return m_pic8259[1]->acknowledge(); -} - - /************************************* * * Floppy/IDE/ATA @@ -536,7 +530,7 @@ WRITE_LINE_MEMBER(bebox_state::bebox_dma_hrq_changed) } -READ8_MEMBER(bebox_state::bebox_dma_read_byte ) +uint8_t bebox_state::bebox_dma_read_byte(offs_t offset) { address_space& prog_space = m_ppc[0]->space(AS_PROGRAM); // get the right address space offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) @@ -545,7 +539,7 @@ READ8_MEMBER(bebox_state::bebox_dma_read_byte ) } -WRITE8_MEMBER(bebox_state::bebox_dma_write_byte ) +void bebox_state::bebox_dma_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_ppc[0]->space(AS_PROGRAM); // get the right address space offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) @@ -553,17 +547,6 @@ WRITE8_MEMBER(bebox_state::bebox_dma_write_byte ) prog_space.write_byte(page_offset + offset, data); } - -READ8_MEMBER(bebox_state::bebox_dma8237_fdc_dack_r){ - return m_smc37c78->dma_r(); -} - - -WRITE8_MEMBER(bebox_state::bebox_dma8237_fdc_dack_w){ - m_smc37c78->dma_w(data); -} - - WRITE_LINE_MEMBER(bebox_state::bebox_dma8237_out_eop){ m_smc37c78->tc_w(state); } diff --git a/src/mame/machine/concept.cpp b/src/mame/machine/concept.cpp index 06c064aec74..b412ce093fd 100644 --- a/src/mame/machine/concept.cpp +++ b/src/mame/machine/concept.cpp @@ -113,13 +113,13 @@ void concept_state::concept_set_interrupt(int level, int state) 6: DCD1 (I) 7: IOX (O) */ -READ8_MEMBER(concept_state::via_in_a) +uint8_t concept_state::via_in_a() { LOG(("via_in_a: VIA port A (Omninet and COMM port status) read\n")); return 1; /* omninet ready always 1 */ } -WRITE8_MEMBER(concept_state::via_out_a) +void concept_state::via_out_a(uint8_t data) { LOG(("via_out_a: VIA port A status written: data=0x%2.2x\n", data)); /*iox = (data & 0x80) != 0;*/ @@ -137,7 +137,7 @@ WRITE8_MEMBER(concept_state::via_out_a) 6: boot switch 0 (I) 7: boot switch 1 (I) */ -READ8_MEMBER(concept_state::via_in_b) +uint8_t concept_state::via_in_b() { uint8_t status; @@ -146,7 +146,7 @@ READ8_MEMBER(concept_state::via_in_b) return status; } -WRITE8_MEMBER(concept_state::via_out_b) +void concept_state::via_out_b(uint8_t data) { VLOG(("via_out_b: VIA port B (Video Control and COMM rate select) written: data=0x%2.2x\n", data)); } diff --git a/src/mame/machine/dai.cpp b/src/mame/machine/dai.cpp index 90045015511..095e8c320d8 100644 --- a/src/mame/machine/dai.cpp +++ b/src/mame/machine/dai.cpp @@ -53,7 +53,7 @@ void dai_state::dai_update_memory(int dai_rom_bank) } -READ8_MEMBER(dai_state::dai_keyboard_r) +uint8_t dai_state::dai_keyboard_r() { uint8_t data = 0x00; static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; @@ -67,7 +67,7 @@ READ8_MEMBER(dai_state::dai_keyboard_r) return data; } -WRITE8_MEMBER(dai_state::dai_keyboard_w) +void dai_state::dai_keyboard_w(uint8_t data) { m_keyboard_scan_mask = data; } diff --git a/src/mame/machine/dec0.cpp b/src/mame/machine/dec0.cpp index 9b5a396dc14..7a97398ffe3 100644 --- a/src/mame/machine/dec0.cpp +++ b/src/mame/machine/dec0.cpp @@ -151,7 +151,7 @@ WRITE16_MEMBER(dec0_state::hippodrm_68000_share_w) */ -READ8_MEMBER(dec0_state::dec0_mcu_port0_r) +uint8_t dec0_state::dec0_mcu_port0_r() { uint8_t result = 0xff; @@ -164,18 +164,18 @@ READ8_MEMBER(dec0_state::dec0_mcu_port0_r) return result; } -WRITE8_MEMBER(dec0_state::dec0_mcu_port0_w) +void dec0_state::dec0_mcu_port0_w(uint8_t data) { m_i8751_ports[0] = data; } -WRITE8_MEMBER(dec0_state::dec0_mcu_port1_w) +void dec0_state::dec0_mcu_port1_w(uint8_t data) { logerror("dec0_mcu_port1_w: %02x\n", data); m_i8751_ports[1] = data; } -WRITE8_MEMBER(dec0_state::dec0_mcu_port2_w) +void dec0_state::dec0_mcu_port2_w(uint8_t data) { if (!BIT(data, 2) && BIT(m_i8751_ports[2], 2)) m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE); @@ -189,7 +189,7 @@ WRITE8_MEMBER(dec0_state::dec0_mcu_port2_w) m_i8751_ports[2] = data; } -WRITE8_MEMBER(dec0_state::dec0_mcu_port3_w) +void dec0_state::dec0_mcu_port3_w(uint8_t data) { logerror("dec0_mcu_port3_w: %02x\n", data); m_i8751_ports[3] = data; diff --git a/src/mame/machine/decioga.cpp b/src/mame/machine/decioga.cpp index 46c2a204e10..b0a8939214d 100644 --- a/src/mame/machine/decioga.cpp +++ b/src/mame/machine/decioga.cpp @@ -164,13 +164,13 @@ void dec_ioga_device::set_dma_space(address_space *space) m_maincpu_space = space; } -READ16_MEMBER(dec_ioga_device::lance_dma_r) +u16 dec_ioga_device::lance_dma_r(offs_t offset) { LOGMASKED(LOG_LANCE_DMA, "lance_dma_r: %08x (phys %08x)\n", offset, (offset<<1) + (m_dmaptrs[2]>>3)); return m_maincpu_space->read_word((offset<<1) + (m_dmaptrs[2]>>3)); } -WRITE16_MEMBER(dec_ioga_device::lance_dma_w) +void dec_ioga_device::lance_dma_w(offs_t offset, u16 data) { LOGMASKED(LOG_LANCE_DMA, "lance_dma_w: %04x to %08x\n", data, offset); m_maincpu_space->write_word((offset<<1) + (m_dmaptrs[2]>>3), data); diff --git a/src/mame/machine/decioga.h b/src/mame/machine/decioga.h index 25ec5fe5e40..fa0a5b3f9f8 100644 --- a/src/mame/machine/decioga.h +++ b/src/mame/machine/decioga.h @@ -30,8 +30,8 @@ public: // DMA interface void set_dma_space(address_space *space); - DECLARE_READ16_MEMBER(lance_dma_r); - DECLARE_WRITE16_MEMBER(lance_dma_w); + u16 lance_dma_r(offs_t offset); + void lance_dma_w(offs_t offset, u16 data); protected: virtual void device_start() override; diff --git a/src/mame/machine/decocass.cpp b/src/mame/machine/decocass.cpp index 43cc85dad2f..eeb7bac79b5 100644 --- a/src/mame/machine/decocass.cpp +++ b/src/mame/machine/decocass.cpp @@ -1636,7 +1636,7 @@ void decocass_widel_state::machine_reset() * ***************************************************************************/ -WRITE8_MEMBER(decocass_state::i8041_p1_w) +void decocass_state::i8041_p1_w(uint8_t data) { if (data != m_i8041_p1_write_latch) { @@ -1670,7 +1670,7 @@ WRITE8_MEMBER(decocass_state::i8041_p1_w) m_i8041_p1 = data; } -READ8_MEMBER(decocass_state::i8041_p1_r) +uint8_t decocass_state::i8041_p1_r() { uint8_t data = m_i8041_p1; @@ -1693,7 +1693,7 @@ READ8_MEMBER(decocass_state::i8041_p1_r) return data; } -WRITE8_MEMBER(decocass_state::i8041_p2_w) +void decocass_state::i8041_p2_w(uint8_t data) { if (data != m_i8041_p2_write_latch) { @@ -1714,7 +1714,7 @@ WRITE8_MEMBER(decocass_state::i8041_p2_w) m_i8041_p2 = (m_i8041_p2 & 0xe0) | (data & ~0xe0); } -READ8_MEMBER(decocass_state::i8041_p2_r) +uint8_t decocass_state::i8041_p2_r() { uint8_t data; diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp index b71b4ec121f..7b85873b59b 100644 --- a/src/mame/machine/dgn_beta.cpp +++ b/src/mame/machine/dgn_beta.cpp @@ -436,17 +436,17 @@ int dgn_beta_state::GetKeyRow(dgn_beta_state *state, int RowNo) CB1 I36/39/6845(Horz Sync) CB2 Keyboard (out) Low loads input shift reg */ -READ8_MEMBER(dgn_beta_state::d_pia0_pa_r) +uint8_t dgn_beta_state::d_pia0_pa_r() { // The hardware has pullup resistors on port A. return 0xff; } -WRITE8_MEMBER(dgn_beta_state::d_pia0_pa_w) +void dgn_beta_state::d_pia0_pa_w(uint8_t data) { } -READ8_MEMBER(dgn_beta_state::d_pia0_pb_r) +uint8_t dgn_beta_state::d_pia0_pb_r() { int RetVal; int Idx; @@ -487,7 +487,7 @@ READ8_MEMBER(dgn_beta_state::d_pia0_pb_r) return RetVal; } -WRITE8_MEMBER(dgn_beta_state::d_pia0_pb_w) +void dgn_beta_state::d_pia0_pb_w(uint8_t data) { int InClkState; //int OutClkState; @@ -557,13 +557,13 @@ WRITE_LINE_MEMBER(dgn_beta_state::d_pia0_irq_b) Baud rate PB1..PB5 ???? */ -READ8_MEMBER(dgn_beta_state::d_pia1_pa_r) +uint8_t dgn_beta_state::d_pia1_pa_r() { // The hardware has pullup resistors on port A. return 0xff; } -WRITE8_MEMBER(dgn_beta_state::d_pia1_pa_w) +void dgn_beta_state::d_pia1_pa_w(uint8_t data) { int HALT_DMA; @@ -609,12 +609,12 @@ WRITE8_MEMBER(dgn_beta_state::d_pia1_pa_w) LOG_DISK(("Set density %s\n", BIT(data, 6) ? "low" : "high")); } -READ8_MEMBER(dgn_beta_state::d_pia1_pb_r) +uint8_t dgn_beta_state::d_pia1_pb_r() { return 0; } -WRITE8_MEMBER(dgn_beta_state::d_pia1_pb_w) +void dgn_beta_state::d_pia1_pb_w(uint8_t data) { int HALT_CPU; @@ -657,13 +657,13 @@ WRITE_LINE_MEMBER(dgn_beta_state::d_pia1_irq_b) Graphics control PB0..PB7 ??? VSYNC interrupt CB2 */ -READ8_MEMBER(dgn_beta_state::d_pia2_pa_r) +uint8_t dgn_beta_state::d_pia2_pa_r() { // The hardware has pullup resistors on port A. return 0xff; } -WRITE8_MEMBER(dgn_beta_state::d_pia2_pa_w) +void dgn_beta_state::d_pia2_pa_w(uint8_t data) { int OldTask; int OldEnableMap; @@ -728,12 +728,12 @@ WRITE8_MEMBER(dgn_beta_state::d_pia2_pa_w) LOG_TASK(("TaskReg=$%02X PIATaskReg=$%02X\n", m_TaskReg, m_PIATaskReg)); } -READ8_MEMBER(dgn_beta_state::d_pia2_pb_r) +uint8_t dgn_beta_state::d_pia2_pb_r() { return 0; } -WRITE8_MEMBER(dgn_beta_state::d_pia2_pb_w) +void dgn_beta_state::d_pia2_pb_w(uint8_t data) { /* Update top video address lines */ dgnbeta_vid_set_gctrl(data); diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp index 5ef10fbb81d..839bddee9c6 100644 --- a/src/mame/machine/harddriv.cpp +++ b/src/mame/machine/harddriv.cpp @@ -1333,7 +1333,7 @@ TIMER_CALLBACK_MEMBER(harddriv_state::xsdp_sport1_irq_off_callback) } -WRITE32_MEMBER(harddriv_state::hdds3sdsp_serial_tx_callback) +void harddriv_state::hdds3sdsp_serial_tx_callback(uint32_t data) { if ((m_ds3sdsp_regs[0x1f] & 0xc00) != 0xc00) return; @@ -1345,7 +1345,7 @@ WRITE32_MEMBER(harddriv_state::hdds3sdsp_serial_tx_callback) } -READ32_MEMBER(harddriv_state::hdds3sdsp_serial_rx_callback) +uint32_t harddriv_state::hdds3sdsp_serial_rx_callback() { if ((m_ds3sdsp_regs[0x1f] & 0xc00) != 0xc00) return 0xff; @@ -1354,7 +1354,7 @@ READ32_MEMBER(harddriv_state::hdds3sdsp_serial_rx_callback) } -WRITE32_MEMBER(harddriv_state::hdds3xdsp_serial_tx_callback) +void harddriv_state::hdds3xdsp_serial_tx_callback(uint32_t data) { if ((m_ds3xdsp_regs[0x1f] & 0xc00) != 0xc00) return; @@ -1363,7 +1363,7 @@ WRITE32_MEMBER(harddriv_state::hdds3xdsp_serial_tx_callback) } -READ32_MEMBER(harddriv_state::hdds3xdsp_serial_rx_callback) +uint32_t harddriv_state::hdds3xdsp_serial_rx_callback() { m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, ASSERT_LINE); m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, CLEAR_LINE); @@ -1515,7 +1515,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_program_w ) * *************************************/ -WRITE32_MEMBER(harddriv_state::hddsk_update_pif) +void harddriv_state::hddsk_update_pif(uint32_t data) { m_sound_int_state = ((data & DSP32_OUTPUT_PIF) != 0); update_interrupts(); diff --git a/src/mame/machine/llc.cpp b/src/mame/machine/llc.cpp index 437ef3e52b2..caeb0838fd9 100644 --- a/src/mame/machine/llc.cpp +++ b/src/mame/machine/llc.cpp @@ -14,7 +14,7 @@ // LLC1 BASIC keyboard -READ8_MEMBER(llc_state::llc1_port2_b_r) +uint8_t llc_state::llc1_port2_b_r() { uint8_t retVal = 0; @@ -29,13 +29,13 @@ READ8_MEMBER(llc_state::llc1_port2_b_r) return retVal; } -READ8_MEMBER(llc_state::llc1_port2_a_r) +uint8_t llc_state::llc1_port2_a_r() { return 0; } // LLC1 Monitor keyboard -READ8_MEMBER(llc_state::llc1_port1_a_r) +uint8_t llc_state::llc1_port1_a_r() { uint8_t data = 0; if (!BIT(m_porta, 4)) @@ -64,12 +64,12 @@ READ8_MEMBER(llc_state::llc1_port1_a_r) return data; } -WRITE8_MEMBER(llc_state::llc1_port1_a_w) +void llc_state::llc1_port1_a_w(uint8_t data) { m_porta = data; } -WRITE8_MEMBER(llc_state::llc1_port1_b_w) +void llc_state::llc1_port1_b_w(uint8_t data) { static uint8_t count = 0, digit = 0; @@ -168,18 +168,18 @@ WRITE8_MEMBER(llc_state::llc2_basic_enable_w) } -READ8_MEMBER(llc_state::llc2_port1_b_r) +uint8_t llc_state::llc2_port1_b_r() { return 0; } -WRITE8_MEMBER(llc_state::llc2_port1_b_w) +void llc_state::llc2_port1_b_w(uint8_t data) { m_speaker->level_w(BIT(data, 6)); m_rv = BIT(data, 5); } -READ8_MEMBER(llc_state::llc2_port2_a_r) +uint8_t llc_state::llc2_port2_a_r() { return 0; // bit 2 low or hangs on ^Z^X^C sequence } diff --git a/src/mame/machine/lviv.cpp b/src/mame/machine/lviv.cpp index 72eea7d8365..5520728e2a4 100644 --- a/src/mame/machine/lviv.cpp +++ b/src/mame/machine/lviv.cpp @@ -41,17 +41,17 @@ INPUT_CHANGED_MEMBER(lviv_state::reset_button) machine().schedule_soft_reset(); } -READ8_MEMBER(lviv_state::ppi_0_porta_r) +uint8_t lviv_state::ppi_0_porta_r() { return 0xff; } -READ8_MEMBER(lviv_state::ppi_0_portb_r) +uint8_t lviv_state::ppi_0_portb_r() { return 0xff; } -READ8_MEMBER(lviv_state::ppi_0_portc_r) +uint8_t lviv_state::ppi_0_portc_r() { uint8_t data = m_ppi_port_outputs[0][2] & 0x0f; if (m_cassette->input() > 0.038) @@ -61,18 +61,18 @@ READ8_MEMBER(lviv_state::ppi_0_portc_r) return data; } -WRITE8_MEMBER(lviv_state::ppi_0_porta_w) +void lviv_state::ppi_0_porta_w(uint8_t data) { m_ppi_port_outputs[0][0] = data; } -WRITE8_MEMBER(lviv_state::ppi_0_portb_w) +void lviv_state::ppi_0_portb_w(uint8_t data) { m_ppi_port_outputs[0][1] = data; update_palette(data&0x7f); } -WRITE8_MEMBER(lviv_state::ppi_0_portc_w)/* tape in/out, video memory on/off */ +void lviv_state::ppi_0_portc_w(uint8_t data)/* tape in/out, video memory on/off */ { m_ppi_port_outputs[0][2] = data; if (m_ppi_port_outputs[0][1]&0x80) @@ -81,12 +81,12 @@ WRITE8_MEMBER(lviv_state::ppi_0_portc_w)/* tape in/out, video memory on/off */ update_memory(); } -READ8_MEMBER(lviv_state::ppi_1_porta_r) +uint8_t lviv_state::ppi_1_porta_r() { return 0xff; } -READ8_MEMBER(lviv_state::ppi_1_portb_r)/* keyboard reading */ +uint8_t lviv_state::ppi_1_portb_r()/* keyboard reading */ { return ((m_ppi_port_outputs[1][0] & 0x01) ? 0xff : m_key[0]->read()) & ((m_ppi_port_outputs[1][0] & 0x02) ? 0xff : m_key[1]->read()) & @@ -98,7 +98,7 @@ READ8_MEMBER(lviv_state::ppi_1_portb_r)/* keyboard reading */ ((m_ppi_port_outputs[1][0] & 0x80) ? 0xff : m_key[7]->read()); } -READ8_MEMBER(lviv_state::ppi_1_portc_r)/* keyboard reading */ +uint8_t lviv_state::ppi_1_portc_r()/* keyboard reading */ { return ((m_ppi_port_outputs[1][2] & 0x01) ? 0xff : m_key[ 8]->read()) & ((m_ppi_port_outputs[1][2] & 0x02) ? 0xff : m_key[ 9]->read()) & @@ -106,24 +106,24 @@ READ8_MEMBER(lviv_state::ppi_1_portc_r)/* keyboard reading */ ((m_ppi_port_outputs[1][2] & 0x08) ? 0xff : m_key[11]->read()); } -WRITE8_MEMBER(lviv_state::ppi_1_porta_w)/* kayboard scaning */ +void lviv_state::ppi_1_porta_w(uint8_t data)/* kayboard scaning */ { m_ppi_port_outputs[1][0] = data; } -WRITE8_MEMBER(lviv_state::ppi_1_portb_w) +void lviv_state::ppi_1_portb_w(uint8_t data) { m_ppi_port_outputs[1][1] = data; } -WRITE8_MEMBER(lviv_state::ppi_1_portc_w)/* kayboard scaning */ +void lviv_state::ppi_1_portc_w(uint8_t data)/* kayboard scaning */ { m_ppi_port_outputs[1][2] = data; } /* I/O */ -READ8_MEMBER(lviv_state::io_r) +uint8_t lviv_state::io_r(offs_t offset) { if (m_startup_mem_map) { @@ -147,7 +147,7 @@ READ8_MEMBER(lviv_state::io_r) } } -WRITE8_MEMBER(lviv_state::io_w) +void lviv_state::io_w(offs_t offset, uint8_t data) { address_space &cpuspace = m_maincpu->space(AS_PROGRAM); if (m_startup_mem_map) diff --git a/src/mame/machine/mbee.cpp b/src/mame/machine/mbee.cpp index f8225e1074f..937e0c3f918 100644 --- a/src/mame/machine/mbee.cpp +++ b/src/mame/machine/mbee.cpp @@ -40,7 +40,7 @@ WRITE_LINE_MEMBER( mbee_state::pio_ardy ) m_centronics->write_strobe((state) ? 0 : 1); } -WRITE8_MEMBER( mbee_state::pio_port_b_w ) +void mbee_state::pio_port_b_w(uint8_t data) { /* PIO port B - d5..d2 not emulated d7 interrupt from network or rtc or vsync or not used (see config switch) @@ -101,7 +101,7 @@ WRITE_LINE_MEMBER( mbee_state::fdc_drq_w ) m_fdc_rq = (m_fdc_rq & 1) | (state << 1); } -READ8_MEMBER( mbee_state::fdc_status_r ) +uint8_t mbee_state::fdc_status_r() { /* d7 indicate if IRQ or DRQ is occurring (1=happening) d6..d0 not used */ @@ -109,7 +109,7 @@ READ8_MEMBER( mbee_state::fdc_status_r ) return m_fdc_rq ? 0xff : 0x7f; } -WRITE8_MEMBER( mbee_state::fdc_motor_w ) +void mbee_state::fdc_motor_w(uint8_t data) { /* d7..d4 not used d3 density (1=MFM) @@ -190,7 +190,7 @@ TIMER_CALLBACK_MEMBER( mbee_state::timer_newkb ) timer_set(attotime::from_hz(50), TIMER_MBEE_NEWKB); } -READ8_MEMBER( mbee_state::port18_r ) +uint8_t mbee_state::port18_r() { uint8_t i, data = m_mbee256_q[0]; // get oldest key @@ -211,13 +211,13 @@ READ8_MEMBER( mbee_state::port18_r ) ************************************************************/ -READ8_MEMBER( mbee_state::speed_low_r ) +uint8_t mbee_state::speed_low_r() { m_maincpu->set_unscaled_clock(3375000); return 0xff; } -READ8_MEMBER( mbee_state::speed_high_r ) +uint8_t mbee_state::speed_high_r() { m_maincpu->set_unscaled_clock(6750000); return 0xff; @@ -231,17 +231,17 @@ READ8_MEMBER( mbee_state::speed_high_r ) ************************************************************/ -WRITE8_MEMBER( mbee_state::port04_w ) // address +void mbee_state::port04_w(uint8_t data) // address { m_rtc->write(0, data); } -WRITE8_MEMBER( mbee_state::port06_w ) // write +void mbee_state::port06_w(uint8_t data) // write { m_rtc->write(1, data); } -READ8_MEMBER( mbee_state::port07_r ) // read +uint8_t mbee_state::port07_r() // read { return m_rtc->read(1); } @@ -309,8 +309,8 @@ void mbee_state::setup_banks(uint8_t data, bool first_time, uint8_t b_mask) if (!BIT(b_byte, 4)) { // select video - mem.install_read_handler (b_vid, b_vid + 0x7ff, read8_delegate(*this, FUNC(mbee_state::video_low_r))); - mem.install_read_handler (b_vid + 0x800, b_vid + 0xfff, read8_delegate(*this, FUNC(mbee_state::video_high_r))); + mem.install_read_handler (b_vid, b_vid + 0x7ff, read8sm_delegate(*this, FUNC(mbee_state::video_low_r))); + mem.install_read_handler (b_vid + 0x800, b_vid + 0xfff, read8sm_delegate(*this, FUNC(mbee_state::video_high_r))); } else { @@ -341,8 +341,8 @@ void mbee_state::setup_banks(uint8_t data, bool first_time, uint8_t b_mask) if (!BIT(b_byte, 4)) { // select video - mem.install_write_handler (b_vid, b_vid + 0x7ff, write8_delegate(*this, FUNC(mbee_state::video_low_w))); - mem.install_write_handler (b_vid + 0x800, b_vid + 0xfff, write8_delegate(*this, FUNC(mbee_state::video_high_w))); + mem.install_write_handler (b_vid, b_vid + 0x7ff, write8sm_delegate(*this, FUNC(mbee_state::video_low_w))); + mem.install_write_handler (b_vid + 0x800, b_vid + 0xfff, write8sm_delegate(*this, FUNC(mbee_state::video_high_w))); } else { @@ -360,7 +360,7 @@ void mbee_state::setup_banks(uint8_t data, bool first_time, uint8_t b_mask) } } -WRITE8_MEMBER( mbee_state::mbee256_50_w ) +void mbee_state::mbee256_50_w(uint8_t data) { setup_banks(data, 0, 7); } @@ -378,7 +378,7 @@ WRITE8_MEMBER( mbee_state::mbee256_50_w ) ************************************************************/ -WRITE8_MEMBER( mbee_state::mbee128_50_w ) +void mbee_state::mbee128_50_w(uint8_t data) { setup_banks(data, 0, 3); } @@ -399,7 +399,7 @@ WRITE8_MEMBER( mbee_state::mbee128_50_w ) ************************************************************/ -WRITE8_MEMBER( mbee_state::port0a_w ) +void mbee_state::port0a_w(uint8_t data) { m_0a = data; @@ -407,7 +407,7 @@ WRITE8_MEMBER( mbee_state::port0a_w ) m_pak->set_entry(data & 15); } -READ8_MEMBER( mbee_state::telcom_low_r ) +uint8_t mbee_state::telcom_low_r() { /* Read of port 0A - set Telcom rom to first half */ if (m_telcom) @@ -416,7 +416,7 @@ READ8_MEMBER( mbee_state::telcom_low_r ) return m_0a; } -READ8_MEMBER( mbee_state::telcom_high_r ) +uint8_t mbee_state::telcom_high_r() { /* Read of port 10A - set Telcom rom to 2nd half */ if (m_telcom) diff --git a/src/mame/machine/mikro80.cpp b/src/mame/machine/mikro80.cpp index ad2d9299f0c..9ac6f8e252e 100644 --- a/src/mame/machine/mikro80.cpp +++ b/src/mame/machine/mikro80.cpp @@ -30,7 +30,7 @@ void mikro80_state::init_radio99() m_key_mask = 0xff; } -READ8_MEMBER(mikro80_state::mikro80_8255_portb_r) +uint8_t mikro80_state::mikro80_8255_portb_r() { uint8_t key = 0xff; if ((m_keyboard_mask & 0x01)!=0) { key &= m_io_line0->read(); } @@ -44,17 +44,17 @@ READ8_MEMBER(mikro80_state::mikro80_8255_portb_r) return key & m_key_mask; } -READ8_MEMBER(mikro80_state::mikro80_8255_portc_r) +uint8_t mikro80_state::mikro80_8255_portc_r() { return m_io_line8->read(); } -WRITE8_MEMBER(mikro80_state::mikro80_8255_porta_w) +void mikro80_state::mikro80_8255_porta_w(uint8_t data) { m_keyboard_mask = data ^ 0xff; } -WRITE8_MEMBER(mikro80_state::mikro80_8255_portc_w) +void mikro80_state::mikro80_8255_portc_w(uint8_t data) { } diff --git a/src/mame/machine/mpu4.cpp b/src/mame/machine/mpu4.cpp index dfb871d00d7..f8260d7a230 100644 --- a/src/mame/machine/mpu4.cpp +++ b/src/mame/machine/mpu4.cpp @@ -563,7 +563,7 @@ WRITE_LINE_MEMBER(mpu4_state::ic2_o3_callback) /* 6821 PIA handlers */ /* IC3, lamp data lines + alpha numeric display */ -WRITE8_MEMBER(mpu4_state::pia_ic3_porta_w) +void mpu4_state::pia_ic3_porta_w(uint8_t data) { int i; LOG_IC3(("%s: IC3 PIA Port A Set to %2x (lamp strobes 1 - 9)\n", machine().describe_context(),data)); @@ -585,7 +585,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic3_porta_w) } } -WRITE8_MEMBER(mpu4_state::pia_ic3_portb_w) +void mpu4_state::pia_ic3_portb_w(uint8_t data) { int i; LOG_IC3(("%s: IC3 PIA Port B Set to %2x (lamp strobes 10 - 17)\n", machine().describe_context(),data)); @@ -714,7 +714,7 @@ void mpu4_state::device_timer(emu_timer &timer, device_timer_id id, int param, v /* IC4, 7 seg leds, 50Hz timer reel sensors, current sensors */ -WRITE8_MEMBER(mpu4_state::pia_ic4_porta_w) +void mpu4_state::pia_ic4_porta_w(uint8_t data) { if(m_ic23_active) { @@ -733,7 +733,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic4_porta_w) } } -WRITE8_MEMBER(mpu4_state::pia_ic4_portb_w) +void mpu4_state::pia_ic4_portb_w(uint8_t data) { if (m_reel_mux) { @@ -749,7 +749,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic4_portb_w) } } -READ8_MEMBER(mpu4_state::pia_ic4_portb_r) +uint8_t mpu4_state::pia_ic4_portb_r() { /// TODO: this shouldn't be clocked from a read callback if ( m_serial_data ) @@ -824,7 +824,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic4_cb2_w) } /* IC5, AUX ports, coin lockouts and AY sound chip select (MODs below 4 only) */ -READ8_MEMBER(mpu4_state::pia_ic5_porta_r) +uint8_t mpu4_state::pia_ic5_porta_r() { if (m_lamp_extender == LARGE_CARD_A) { @@ -861,7 +861,7 @@ READ8_MEMBER(mpu4_state::pia_ic5_porta_r) } } -WRITE8_MEMBER(mpu4_state::pia_ic5_porta_w) +void mpu4_state::pia_ic5_porta_w(uint8_t data) { int i; if (m_hopper == HOPPER_NONDUART_A) @@ -1020,7 +1020,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic5_porta_w) } } -WRITE8_MEMBER(mpu4_state::pia_ic5_portb_w) +void mpu4_state::pia_ic5_portb_w(uint8_t data) { if (m_hopper == HOPPER_NONDUART_B) { @@ -1033,7 +1033,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic5_portb_w) } } -READ8_MEMBER(mpu4_state::pia_ic5_portb_r) +uint8_t mpu4_state::pia_ic5_portb_r() { if (m_hopper == HOPPER_NONDUART_B) {/* @@ -1141,7 +1141,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic5_cb2_w) /* IC6, Reel A and B and AY registers (MODs below 4 only) */ -WRITE8_MEMBER(mpu4_state::pia_ic6_portb_w) +void mpu4_state::pia_ic6_portb_w(uint8_t data) { LOG(("%s: IC6 PIA Port B Set to %2x (Reel A and B)\n", machine().describe_context(),data)); @@ -1162,7 +1162,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic6_portb_w) } -WRITE8_MEMBER(mpu4_state::pia_ic6_porta_w) +void mpu4_state::pia_ic6_porta_w(uint8_t data) { LOG(("%s: IC6 PIA Write A %2x\n", machine().describe_context(),data)); if (m_mod_number <4) @@ -1198,7 +1198,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic6_cb2_w) /* IC7 Reel C and D, mechanical meters/Reel E and F, input strobe bit A */ -WRITE8_MEMBER(mpu4_state::pia_ic7_porta_w) +void mpu4_state::pia_ic7_porta_w(uint8_t data) { LOG(("%s: IC7 PIA Port A Set to %2x (Reel C and D)\n", machine().describe_context(),data)); if (m_reel_mux == SEVEN_REEL) @@ -1217,7 +1217,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic7_porta_w) } } -WRITE8_MEMBER(mpu4_state::pia_ic7_portb_w) +void mpu4_state::pia_ic7_portb_w(uint8_t data) { if (m_hopper == HOPPER_DUART_A) { @@ -1231,7 +1231,7 @@ WRITE8_MEMBER(mpu4_state::pia_ic7_portb_w) m_mmtr_data = data; } -READ8_MEMBER(mpu4_state::pia_ic7_portb_r) +uint8_t mpu4_state::pia_ic7_portb_r() { /* The meters are connected to a voltage drop sensor, where current flowing through them also passes through pin B7, meaning that when @@ -1276,7 +1276,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic7_cb2_w) /* IC8, Inputs, TRIACS, alpha clock */ -READ8_MEMBER(mpu4_state::pia_ic8_porta_r) +uint8_t mpu4_state::pia_ic8_porta_r() { LOG_IC8(("%s: IC8 PIA Read of Port A (MUX input data)\n", machine().describe_context())); /* The orange inputs are polled twice as often as the black ones, for reasons of efficiency. @@ -1294,7 +1294,7 @@ READ8_MEMBER(mpu4_state::pia_ic8_porta_r) } -WRITE8_MEMBER(mpu4_state::pia_ic8_portb_w) +void mpu4_state::pia_ic8_portb_w(uint8_t data) { if (m_hopper == HOPPER_DUART_B) { @@ -1331,13 +1331,13 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic8_cb2_w) // universal sampled sound program card PCB 683077 // Sampled sound card, using a PIA and PTM for timing and data handling -WRITE8_MEMBER(mpu4_state::pia_gb_porta_w) +void mpu4_state::pia_gb_porta_w(uint8_t data) { LOG_SS(("%s: GAMEBOARD: PIA Port A Set to %2x\n", machine().describe_context(),data)); m_msm6376->write(data); } -WRITE8_MEMBER(mpu4_state::pia_gb_portb_w) +void mpu4_state::pia_gb_portb_w(uint8_t data) { int changed = m_expansion_latch^data; @@ -1366,7 +1366,7 @@ WRITE8_MEMBER(mpu4_state::pia_gb_portb_w) m_msm6376->ch2_w(data&0x02); m_msm6376->st_w(data&0x01); } -READ8_MEMBER(mpu4_state::pia_gb_portb_r) +uint8_t mpu4_state::pia_gb_portb_r() { LOG_SS(("%s: GAMEBOARD: PIA Read of Port B\n",machine().describe_context())); int data=0; diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp index 901bd07c75e..f261fa155b3 100644 --- a/src/mame/machine/msx.cpp +++ b/src/mame/machine/msx.cpp @@ -209,7 +209,7 @@ INTERRUPT_GEN_MEMBER(msx_state::msx_interrupt) */ -READ8_MEMBER(msx_state::msx_psg_port_a_r) +uint8_t msx_state::msx_psg_port_a_r() { uint8_t data = (m_cassette->input() > 0.0038 ? 0x80 : 0); @@ -255,16 +255,16 @@ READ8_MEMBER(msx_state::msx_psg_port_a_r) return data; } -READ8_MEMBER(msx_state::msx_psg_port_b_r) +uint8_t msx_state::msx_psg_port_b_r() { return m_psg_b; } -WRITE8_MEMBER(msx_state::msx_psg_port_a_w) +void msx_state::msx_psg_port_a_w(uint8_t data) { } -WRITE8_MEMBER(msx_state::msx_psg_port_b_w) +void msx_state::msx_psg_port_b_w(uint8_t data) { /* Arabic or kana mode led */ if ( (data ^ m_psg_b) & 0x80) @@ -307,7 +307,7 @@ READ8_MEMBER( msx2_state::msx_rtc_reg_r ) ** The PPI functions */ -WRITE8_MEMBER( msx_state::msx_ppi_port_a_w ) +void msx_state::msx_ppi_port_a_w(uint8_t data) { m_primary_slot = data; @@ -316,7 +316,7 @@ WRITE8_MEMBER( msx_state::msx_ppi_port_a_w ) msx_memory_map_all (); } -WRITE8_MEMBER( msx_state::msx_ppi_port_c_w ) +void msx_state::msx_ppi_port_c_w(uint8_t data) { m_keylatch = data & 0x0f; @@ -339,7 +339,7 @@ WRITE8_MEMBER( msx_state::msx_ppi_port_c_w ) m_port_c_old = data; } -READ8_MEMBER( msx_state::msx_ppi_port_b_r ) +uint8_t msx_state::msx_ppi_port_b_r() { uint8_t result = 0xff; int row, data; diff --git a/src/mame/machine/pecom.cpp b/src/mame/machine/pecom.cpp index 90d23931929..880b6474982 100644 --- a/src/mame/machine/pecom.cpp +++ b/src/mame/machine/pecom.cpp @@ -145,7 +145,7 @@ WRITE_LINE_MEMBER(pecom_state::q_w) m_cassette->output(state ? -1.0 : +1.0); } -WRITE8_MEMBER(pecom_state::sc_w ) +void pecom_state::sc_w(uint8_t data) { switch (data) { diff --git a/src/mame/machine/tigeroad.cpp b/src/mame/machine/tigeroad.cpp index fd58b706705..5690504a996 100644 --- a/src/mame/machine/tigeroad.cpp +++ b/src/mame/machine/tigeroad.cpp @@ -42,17 +42,17 @@ WRITE16_MEMBER(pushman_state::bballs_mcu_comm_w) m_mcu->set_input_line(M68705_IRQ_LINE, ASSERT_LINE); } -WRITE8_MEMBER(pushman_state::mcu_pa_w) +void pushman_state::mcu_pa_w(uint8_t data) { m_mcu_output = (m_mcu_output & 0xff00) | (u16(data) & 0x00ff); } -WRITE8_MEMBER(pushman_state::mcu_pb_w) +void pushman_state::mcu_pb_w(uint8_t data) { m_mcu_output = (m_mcu_output & 0x00ff) | (u16(data) << 8); } -WRITE8_MEMBER(pushman_state::mcu_pc_w) +void pushman_state::mcu_pc_w(uint8_t data) { if (BIT(data, 0)) { diff --git a/src/mame/machine/ut88.cpp b/src/mame/machine/ut88.cpp index da3f4687010..8f9478185c5 100644 --- a/src/mame/machine/ut88.cpp +++ b/src/mame/machine/ut88.cpp @@ -53,7 +53,7 @@ void ut88mini_state::device_timer(emu_timer &timer, device_timer_id id, int para } } -READ8_MEMBER( ut88_state::ppi_portb_r ) +uint8_t ut88_state::ppi_portb_r() { uint8_t data = 0xff; @@ -77,12 +77,12 @@ READ8_MEMBER( ut88_state::ppi_portb_r ) return data; } -READ8_MEMBER( ut88_state::ppi_portc_r ) +uint8_t ut88_state::ppi_portc_r() { return m_io_line8->read(); } -WRITE8_MEMBER( ut88_state::ppi_porta_w ) +void ut88_state::ppi_porta_w(uint8_t data) { m_keyboard_mask = data ^ 0xff; } diff --git a/src/mame/machine/vector06.cpp b/src/mame/machine/vector06.cpp index 2208fc5024a..b44e0a01eb2 100644 --- a/src/mame/machine/vector06.cpp +++ b/src/mame/machine/vector06.cpp @@ -14,7 +14,7 @@ #include "screen.h" -READ8_MEMBER( vector06_state::vector06_8255_portb_r ) +uint8_t vector06_state::vector06_8255_portb_r() { uint8_t key = 0xff; if (BIT(m_keyboard_mask, 0)) key &= m_line[0]->read(); @@ -28,7 +28,7 @@ READ8_MEMBER( vector06_state::vector06_8255_portb_r ) return key; } -READ8_MEMBER( vector06_state::vector06_8255_portc_r ) +uint8_t vector06_state::vector06_8255_portc_r() { uint8_t ret = m_line[8]->read(); @@ -38,7 +38,7 @@ READ8_MEMBER( vector06_state::vector06_8255_portc_r ) return ret; } -WRITE8_MEMBER( vector06_state::vector06_8255_porta_w ) +void vector06_state::vector06_8255_porta_w(uint8_t data) { m_keyboard_mask = data ^ 0xff; } @@ -49,7 +49,7 @@ void vector06_state::vector06_set_video_mode(int width) m_screen->configure(width+64, 256+64, visarea, m_screen->frame_period().attoseconds()); } -WRITE8_MEMBER( vector06_state::vector06_8255_portb_w ) +void vector06_state::vector06_8255_portb_w(uint8_t data) { m_color_index = data & 0x0f; if ((data & 0x10) != m_video_mode) @@ -68,7 +68,7 @@ WRITE8_MEMBER( vector06_state::vector06_color_set ) } -READ8_MEMBER( vector06_state::vector06_romdisk_portb_r ) +uint8_t vector06_state::vector06_romdisk_portb_r() { uint16_t addr = ((m_romdisk_msb & 0x7f) << 8) | m_romdisk_lsb; if ((m_romdisk_msb & 0x80) && m_cart->exists() && addr < m_cart->get_rom_size()) @@ -77,17 +77,17 @@ READ8_MEMBER( vector06_state::vector06_romdisk_portb_r ) return m_ay->data_r(); } -WRITE8_MEMBER(vector06_state::vector06_romdisk_portb_w) +void vector06_state::vector06_romdisk_portb_w(uint8_t data) { m_aylatch = data; } -WRITE8_MEMBER( vector06_state::vector06_romdisk_porta_w ) +void vector06_state::vector06_romdisk_porta_w(uint8_t data) { m_romdisk_lsb = data; } -WRITE8_MEMBER( vector06_state::vector06_romdisk_portc_w ) +void vector06_state::vector06_romdisk_portc_w (uint8_t data) { if (data & 4) m_ay->address_data_w((data >> 1) & 1, m_aylatch); @@ -173,7 +173,7 @@ WRITE8_MEMBER(vector06_state::vector06_ramdisk_w) update_mem(); } -WRITE8_MEMBER(vector06_state::vector06_status_callback) +void vector06_state::vector06_status_callback(uint8_t data) { const bool oldstate = m_stack_state; m_stack_state = bool(data & i8080_cpu_device::STATUS_STACK); diff --git a/src/mame/video/arcadia.cpp b/src/mame/video/arcadia.cpp index 972f5346b48..25df7782347 100644 --- a/src/mame/video/arcadia.cpp +++ b/src/mame/video/arcadia.cpp @@ -311,7 +311,7 @@ void arcadia_state::video_start() } } -READ8_MEMBER( arcadia_state::video_r ) +uint8_t arcadia_state::video_r(offs_t offset) { uint8_t data=0; switch (offset) @@ -373,7 +373,7 @@ READ8_MEMBER( arcadia_state::video_r ) return data; } -WRITE8_MEMBER( arcadia_state::video_w ) +void arcadia_state::video_w(offs_t offset, uint8_t data) { m_reg.data[offset]=data; switch (offset) diff --git a/src/mame/video/cidelsa.cpp b/src/mame/video/cidelsa.cpp index e8737cb969a..6bb3d33ce46 100644 --- a/src/mame/video/cidelsa.cpp +++ b/src/mame/video/cidelsa.cpp @@ -7,7 +7,7 @@ /* Register Access */ -WRITE8_MEMBER( cidelsa_state::cdp1869_w ) +void cidelsa_state::cdp1869_w(offs_t offset, uint8_t data) { uint16_t ma = m_maincpu->get_memory_address(); @@ -130,7 +130,7 @@ void cidelsa_state::video_start() /* AY-3-8910 */ -WRITE8_MEMBER( draco_state::psg_pb_w ) +void draco_state::psg_pb_w(uint8_t data) { /* diff --git a/src/mame/video/compgolf.cpp b/src/mame/video/compgolf.cpp index e29aab20ab2..310126b5933 100644 --- a/src/mame/video/compgolf.cpp +++ b/src/mame/video/compgolf.cpp @@ -35,13 +35,13 @@ void compgolf_state::compgolf_palette(palette_device &palette) const } } -WRITE8_MEMBER(compgolf_state::compgolf_video_w) +void compgolf_state::compgolf_video_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_text_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(compgolf_state::compgolf_back_w) +void compgolf_state::compgolf_back_w(offs_t offset, uint8_t data) { m_bg_ram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); diff --git a/src/mame/video/dynax.cpp b/src/mame/video/dynax.cpp index 671dcdfcce0..797e1f62df4 100644 --- a/src/mame/video/dynax.cpp +++ b/src/mame/video/dynax.cpp @@ -89,7 +89,7 @@ WRITE8_MEMBER(dynax_state::dynax_extra_scrolly_w) /* Destination Layers */ -WRITE8_MEMBER(dynax_state::dynax_blit_dest_w) +void dynax_state::dynax_blit_dest_w(uint8_t data) { m_blit_dest = data; if (m_layer_layout == LAYOUT_HNORIDUR) @@ -106,7 +106,7 @@ WRITE8_MEMBER(dynax_state::dynax_blit2_dest_w) WRITE8_MEMBER(dynax_state::tenkai_blit_dest_w) { - dynax_blit_dest_w(space, 0, bitswap<8>(data, 7, 6, 5, 4, 0, 1, 2, 3)); + dynax_blit_dest_w(bitswap<8>(data, 7, 6, 5, 4, 0, 1, 2, 3)); } /* @@ -115,7 +115,7 @@ mjembase: b d e -> - 2 4 8 */ WRITE8_MEMBER(dynax_state::mjembase_blit_dest_w) { - dynax_blit_dest_w(space, 0, bitswap<8>(data, 7, 6, 5, 4, 2, 3, 1, 0)); + dynax_blit_dest_w(bitswap<8>(data, 7, 6, 5, 4, 2, 3, 1, 0)); } @@ -291,7 +291,7 @@ WRITE8_MEMBER(dynax_state::dynax_blit2_romregion_w) } -WRITE8_MEMBER(dynax_state::hanamai_blit_pixel_w) +void dynax_state::hanamai_blit_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -308,7 +308,7 @@ WRITE8_MEMBER(dynax_state::hanamai_blit_pixel_w) } } -WRITE8_MEMBER(dynax_state::cdracula_blit_pixel_w) +void dynax_state::cdracula_blit_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -322,7 +322,7 @@ WRITE8_MEMBER(dynax_state::cdracula_blit_pixel_w) } } -WRITE8_MEMBER(dynax_state::hnoridur_blit_pixel_w) +void dynax_state::hnoridur_blit_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -340,7 +340,7 @@ WRITE8_MEMBER(dynax_state::hnoridur_blit_pixel_w) } } -WRITE8_MEMBER(dynax_state::drgpunch_blit_pixel_w) +void dynax_state::drgpunch_blit_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -355,7 +355,7 @@ WRITE8_MEMBER(dynax_state::drgpunch_blit_pixel_w) } // two blitters/screens -WRITE8_MEMBER(dynax_state::jantouki_blit_pixel_w) +void dynax_state::jantouki_blit_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -369,7 +369,7 @@ WRITE8_MEMBER(dynax_state::jantouki_blit_pixel_w) } } -WRITE8_MEMBER(dynax_state::jantouki_blit2_pixel_w) +void dynax_state::jantouki_blit2_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -383,7 +383,7 @@ WRITE8_MEMBER(dynax_state::jantouki_blit2_pixel_w) } } -WRITE8_MEMBER(dynax_state::mjdialq2_blit_pixel_w) +void dynax_state::mjdialq2_blit_pixel_w(offs_t offset, uint8_t data) { if (m_flipscreen) offset ^= 0xffff; @@ -395,33 +395,33 @@ WRITE8_MEMBER(dynax_state::mjdialq2_blit_pixel_w) -WRITE8_MEMBER(dynax_state::dynax_blit_scrollx_w) +void dynax_state::dynax_blit_scrollx_w(uint8_t data) { m_blit_scroll_x = data; } -WRITE8_MEMBER(dynax_state::dynax_blit_scrolly_w) +void dynax_state::dynax_blit_scrolly_w(uint8_t data) { m_blit_scroll_y = data; } -WRITE8_MEMBER(dynax_state::dynax_blit2_scrollx_w) +void dynax_state::dynax_blit2_scrollx_w(uint8_t data) { m_blit2_scroll_x = data; } -WRITE8_MEMBER(dynax_state::dynax_blit2_scrolly_w) +void dynax_state::dynax_blit2_scrolly_w(uint8_t data) { m_blit2_scroll_y = data; } // inverted scroll values -WRITE8_MEMBER(dynax_state::tenkai_blit_scrollx_w) +void dynax_state::tenkai_blit_scrollx_w(uint8_t data) { m_blit_scroll_x = ((data ^ 0xff) + 1) & 0xff; } -WRITE8_MEMBER(dynax_state::tenkai_blit_scrolly_w) +void dynax_state::tenkai_blit_scrolly_w(uint8_t data) { m_blit_scroll_y = data ^ 0xff; } diff --git a/src/mame/video/mbee.cpp b/src/mame/video/mbee.cpp index 61f8c8c2a92..ecfef145428 100644 --- a/src/mame/video/mbee.cpp +++ b/src/mame/video/mbee.cpp @@ -104,7 +104,7 @@ void mbee_state::sy6545_cursor_configure() ************************************************************/ -READ8_MEMBER( mbee_state::video_low_r ) +uint8_t mbee_state::video_low_r(offs_t offset) { if (m_is_premium && ((m_1c & 0x9f) == 0x90)) return m_p_attribram[offset]; @@ -115,7 +115,7 @@ READ8_MEMBER( mbee_state::video_low_r ) return m_p_videoram[offset]; } -WRITE8_MEMBER( mbee_state::video_low_w ) +void mbee_state::video_low_w(offs_t offset, uint8_t data) { if (BIT(m_1c, 4)) { @@ -127,7 +127,7 @@ WRITE8_MEMBER( mbee_state::video_low_w ) m_p_videoram[offset] = data; } -READ8_MEMBER( mbee_state::video_high_r ) +uint8_t mbee_state::video_high_r(offs_t offset) { if (BIT(m_08, 6)) return m_p_colorram[offset]; @@ -135,7 +135,7 @@ READ8_MEMBER( mbee_state::video_high_r ) return m_p_gfxram[(((m_1c & 15) + 1) << 11) | offset]; } -WRITE8_MEMBER( mbee_state::video_high_w ) +void mbee_state::video_high_w(offs_t offset, uint8_t data) { if (BIT(m_08, 6) && (~m_0b & 1)) m_p_colorram[offset] = data; @@ -143,27 +143,27 @@ WRITE8_MEMBER( mbee_state::video_high_w ) m_p_gfxram[(((m_1c & 15) + 1) << 11) | offset] = data; } -WRITE8_MEMBER( mbee_state::port0b_w ) +void mbee_state::port0b_w(uint8_t data) { m_0b = data & 1; } -READ8_MEMBER( mbee_state::port08_r ) +uint8_t mbee_state::port08_r() { return m_08; } -WRITE8_MEMBER( mbee_state::port08_w ) +void mbee_state::port08_w(uint8_t data) { m_08 = data & 0x4e; } -READ8_MEMBER( mbee_state::port1c_r ) +uint8_t mbee_state::port1c_r() { return m_1c; } -WRITE8_MEMBER( mbee_state::port1c_w ) +void mbee_state::port1c_w(uint8_t data) { /* d7 extended graphics (1=allow attributes and pcg banks) d5 bankswitch basic rom @@ -252,14 +252,14 @@ void mbee_state::oldkb_scan( uint16_t param ) ************************************************************/ -WRITE8_MEMBER ( mbee_state::m6545_index_w ) +void mbee_state::m6545_index_w(uint8_t data) { data &= 0x1f; m_sy6545_ind = data; m_crtc->address_w(data); } -WRITE8_MEMBER ( mbee_state::m6545_data_w ) +void mbee_state::m6545_data_w(uint8_t data) { static const uint8_t sy6545_mask[32]={0xff,0xff,0xff,0x0f,0x7f,0x1f,0x7f,0x7f,3,0x1f,0x7f,0x1f,0x3f,0xff,0x3f,0xff,0,0,0x3f,0xff}; diff --git a/src/mame/video/pk8000.cpp b/src/mame/video/pk8000.cpp index 5b7fda9fda2..02e4cba5c31 100644 --- a/src/mame/video/pk8000.cpp +++ b/src/mame/video/pk8000.cpp @@ -87,17 +87,17 @@ void pk8000_base_state::pk8000_palette(palette_device &palette) const palette.set_pen_colors(0, pk8000_pens); } -READ8_MEMBER(pk8000_base_state::_84_porta_r) +uint8_t pk8000_base_state::_84_porta_r() { return m_video_mode; } -WRITE8_MEMBER(pk8000_base_state::_84_porta_w) +void pk8000_base_state::_84_porta_w(uint8_t data) { m_video_mode = data; } -WRITE8_MEMBER(pk8000_base_state::_84_portc_w) +void pk8000_base_state::_84_portc_w(uint8_t data) { m_video_enable = BIT(data, 4); } diff --git a/src/mame/video/tunhunt.cpp b/src/mame/video/tunhunt.cpp index 4d1aedf3d07..588f6253274 100644 --- a/src/mame/video/tunhunt.cpp +++ b/src/mame/video/tunhunt.cpp @@ -50,7 +50,7 @@ /****************************************************************************************/ -WRITE8_MEMBER(tunhunt_state::videoram_w) +void tunhunt_state::videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); From e2a789555c6118f0bc7916a6b2ca1d41f599a1db Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 03:08:30 +1000 Subject: [PATCH 25/69] (nw) savia84: added pwm device --- src/mame/drivers/savia84.cpp | 34 +++++++++++++++------------------- src/mame/layout/savia84.lay | 16 ++++++++-------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/mame/drivers/savia84.cpp b/src/mame/drivers/savia84.cpp index d618753ee4b..98eb05cfb55 100644 --- a/src/mame/drivers/savia84.cpp +++ b/src/mame/drivers/savia84.cpp @@ -23,14 +23,12 @@ Here is a test program. Copy the text and Paste into the emulator. -1800^3E^55^D3^F9^76^XX1800^ - ToDo: - - Make better artwork - ****************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" +#include "video/pwm.h" #include "savia84.lh" @@ -41,7 +39,8 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_ppi8255(*this, "ppi8255") - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) { } void savia84(machine_config &config); @@ -56,14 +55,13 @@ private: void mem_map(address_map &map); uint8_t m_kbd; - uint8_t m_segment; + uint8_t m_seg; uint8_t m_digit; - uint8_t m_digit_last; virtual void machine_reset() override; - virtual void machine_start() override { m_digits.resolve(); } required_device m_maincpu; required_device m_ppi8255; - output_finder<9> m_digits; + required_device m_display; + required_ioport_array<9> m_io_keyboard; }; void savia84_state::mem_map(address_map &map) @@ -137,15 +135,12 @@ INPUT_PORTS_END void savia84_state::machine_reset() { - m_digit_last = 0; } WRITE8_MEMBER( savia84_state::savia84_8255_porta_w ) // OUT F8 - output segments on the selected digit { - m_segment = ~data & 0x7f; - if (m_digit && (m_digit != m_digit_last)) - m_digits[m_digit] = m_segment; - m_digit_last = m_digit; + m_seg = ~data; + m_display->matrix(m_digit, m_seg); } WRITE8_MEMBER( savia84_state::savia84_8255_portb_w ) // OUT F9 - light the 8 leds down the left side @@ -167,16 +162,15 @@ WRITE8_MEMBER( savia84_state::savia84_8255_portc_w ) // OUT FA - set keyboard sc else if ((m_kbd > 1) && (m_kbd < 9)) m_digit = m_kbd; + if (m_digit) + m_digit = 1 << (m_digit-1); + m_display->matrix(m_digit, m_seg); } READ8_MEMBER( savia84_state::savia84_8255_portc_r ) // IN FA - read keyboard { if (m_kbd < 9) - { - char kbdrow[6]; - sprintf(kbdrow,"X%d",m_kbd); - return ioport(kbdrow)->read(); - } + return m_io_keyboard[m_kbd]->read(); else return 0xff; } @@ -190,6 +184,8 @@ void savia84_state::savia84(machine_config &config) /* video hardware */ config.set_default_layout(layout_savia84); + PWM_DISPLAY(config, m_display).set_size(8, 7); + m_display->set_segmask(0xff, 0x7f); /* Devices */ I8255(config, m_ppi8255); @@ -201,7 +197,7 @@ void savia84_state::savia84(machine_config &config) /* ROM definition */ ROM_START( savia84 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD("savia84.bin", 0x0000, 0x0800, CRC(fa8f1fcf) SHA1(b08404469ed988d96c0413416b6a66f3e5b997a3)) // Note - the below is a bad dump and does not work diff --git a/src/mame/layout/savia84.lay b/src/mame/layout/savia84.lay index 4f1613e53a2..9b4c1b98305 100644 --- a/src/mame/layout/savia84.lay +++ b/src/mame/layout/savia84.lay @@ -25,28 +25,28 @@ license:CC0 - + - + - + - + - + - + - + - + From 06ee4cb8d127e2a60d106505697d413bb0e6536c Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 03:11:50 +1000 Subject: [PATCH 26/69] (nw) instruct: kbd correction --- src/mame/drivers/instruct.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/instruct.cpp b/src/mame/drivers/instruct.cpp index 9a33c8ede39..df6be37b7a3 100644 --- a/src/mame/drivers/instruct.cpp +++ b/src/mame/drivers/instruct.cpp @@ -165,11 +165,13 @@ READ8_MEMBER( instruct_state::portfd_r ) // read keyboard READ8_MEMBER( instruct_state::portfe_r ) { + u8 data = 15; + for (uint8_t i = 0; i < 6; i++) if (BIT(m_digit, i)) - return m_io_keyboard[i]->read(); + data &= m_io_keyboard[i]->read(); - return 0xf; + return data; } From 0ad6cbc9a1a647dc50e7455e627a4ad977cfc38d Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 13:45:37 -0400 Subject: [PATCH 27/69] dvp1: Add some logging (nw) --- src/mame/drivers/korgdvp1.cpp | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/mame/drivers/korgdvp1.cpp b/src/mame/drivers/korgdvp1.cpp index f803e181e29..dd8ba17808f 100644 --- a/src/mame/drivers/korgdvp1.cpp +++ b/src/mame/drivers/korgdvp1.cpp @@ -25,6 +25,12 @@ public: void dvp1(machine_config &config); private: + u8 inputs_r(); + u8 dsp_int_r(); + void control_w(u8 data); + void leds_w(offs_t offset, u8 data); + void dsp_w(offs_t offset, u8 data); + void main_map(address_map &map); required_device m_maincpu; @@ -32,10 +38,47 @@ private: }; +u8 korgdvp1_state::inputs_r() +{ + return 0xff; +} + +u8 korgdvp1_state::dsp_int_r() +{ + // PB3 = BUSY + // PB6 = INT0 + // PB7 = INT1 + return 0xff; +} + +void korgdvp1_state::control_w(u8 data) +{ + // PB0, PB1 = input select (HC139) + // PB2 = MUTE + // PB4 = DSP RES + // PB5 = ROM/RAM +} + +void korgdvp1_state::leds_w(offs_t offset, u8 data) +{ + for (int i = 0; i < 8; i++) + if (BIT(offset, i)) + logerror("%s: Writing %02X to A%d LEDs\n", machine().describe_context(), data, i); +} + +void korgdvp1_state::dsp_w(offs_t offset, u8 data) +{ + for (int i = 0; i < 2; i++) + if (!BIT(offset, 9 - i)) + logerror("%s: Writing %02X to DSP %d\n", machine().describe_context(), data, i + 1); +} + void korgdvp1_state::main_map(address_map &map) { map(0x0000, 0x7fff).rom().region("program", 0); map(0x8000, 0x87ff).mirror(0x1800).ram().share("nvram"); + map(0xa000, 0xa0ff).mirror(0x1f00).w(FUNC(korgdvp1_state::leds_w)); + map(0xc000, 0xc000).select(0x300).mirror(0x1cff).w(FUNC(korgdvp1_state::dsp_w)); } @@ -46,6 +89,9 @@ void korgdvp1_state::dvp1(machine_config &config) { UPD7810(config, m_maincpu, 12_MHz_XTAL); // µPD7811-161-36 (according to parts list) but with both mode pins pulled up m_maincpu->set_addrmap(AS_PROGRAM, &korgdvp1_state::main_map); + m_maincpu->pa_in_cb().set(FUNC(korgdvp1_state::inputs_r)); + m_maincpu->pb_in_cb().set(FUNC(korgdvp1_state::dsp_int_r)); + m_maincpu->pb_out_cb().set(FUNC(korgdvp1_state::control_w)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // HM6116LP-4 + 3V lithium battery From a6f28597af94031768a10c5153bf6ca82471b435 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 04:10:56 +1000 Subject: [PATCH 28/69] (nw) minor matters --- src/mame/drivers/pimps.cpp | 4 ++-- src/mame/drivers/sacstate.cpp | 2 +- src/mame/drivers/z80dev.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/pimps.cpp b/src/mame/drivers/pimps.cpp index e7d2cbf5918..6370b8c3724 100644 --- a/src/mame/drivers/pimps.cpp +++ b/src/mame/drivers/pimps.cpp @@ -4,7 +4,7 @@ P.I.M.P.S. (Personal Interactive MicroProcessor System) -06/12/2009 Skeleton driver. +2009-12-06 Skeleton driver. No schematics or hardware info available. @@ -57,7 +57,7 @@ Assembler: 8-bit values MUST contain two hex digits or one quoted character. 16-bit constants MUST contain four hex digits or two quoted characters. - Use 'S' instead if 'SP', eg: LXI S,$1000 + Use 'S' instead of 'SP', eg: LXI S,$1000 Only EQU, DB, DW and END directives are supported. An END statement is REQUIRED (otherwise you get the message '?tab-ful' as it fills the symbol diff --git a/src/mame/drivers/sacstate.cpp b/src/mame/drivers/sacstate.cpp index 5f0e7a9c912..ac758bab949 100644 --- a/src/mame/drivers/sacstate.cpp +++ b/src/mame/drivers/sacstate.cpp @@ -147,7 +147,7 @@ void sacstate_state::sacstate(machine_config &config) /* ROM definition */ ROM_START( sacstate ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "sacst1.bin", 0x0700, 0x0100, CRC(ba020160) SHA1(6337cdf65583808768664653c937e50040aec6d4)) ROM_LOAD( "sacst2.bin", 0x0600, 0x0100, CRC(26f3e505) SHA1(3526060dbd1bf885c2e686bc9a6082387630952a)) ROM_LOAD( "sacst3.bin", 0x0500, 0x0100, CRC(965b3474) SHA1(6d9142e68d375fb000fd6ea48369d0801274ded6)) diff --git a/src/mame/drivers/z80dev.cpp b/src/mame/drivers/z80dev.cpp index 2f64375d8d0..e52897c9f13 100644 --- a/src/mame/drivers/z80dev.cpp +++ b/src/mame/drivers/z80dev.cpp @@ -136,7 +136,7 @@ void z80dev_state::z80dev(machine_config &config) /* ROM definition */ ROM_START( z80dev ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "z80dev.bin", 0x0000, 0x0800, CRC(dd5b9cd9) SHA1(97c176fcb63674f0592851b7858cb706886b5857)) ROM_END From 3a69b091915a2e2d01d2e3fd460688d99863a3b6 Mon Sep 17 00:00:00 2001 From: smf- Date: Thu, 14 May 2020 19:11:34 +0100 Subject: [PATCH 29/69] New working clone ------------------ Vampire Savior: The Lord of Vampire (Brazil 970519) [Renan Eler, Roberto Louzada, Filipe Nascimento, CPS Raptor group, SHVB] --- src/mame/drivers/cps2.cpp | 35 +++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 36 insertions(+) diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp index 0795c89dcfa..3404ddf2680 100644 --- a/src/mame/drivers/cps2.cpp +++ b/src/mame/drivers/cps2.cpp @@ -8910,6 +8910,40 @@ ROM_START( vsavh ) ROM_LOAD( "vsavh.key", 0x000000, 0x000014, CRC(a7dd6409) SHA1(5c60390e540ea538b1cd0b31635a8ffa1844fa24) ) ROM_END +ROM_START( vsavb ) + ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ + ROM_LOAD16_WORD_SWAP( "vm3b.03d", 0x000000, 0x080000, CRC(22ffba4b) SHA1(2c214c43115fc0978d5ebb814a19b8ee23faab3f) ) + ROM_LOAD16_WORD_SWAP( "vm3b.04d", 0x080000, 0x080000, CRC(88624909) SHA1(052c8f49ac3bc3d231cfea38c5bad89c3380834e) ) + ROM_LOAD16_WORD_SWAP( "vm3.05a", 0x100000, 0x080000, CRC(4118e00f) SHA1(94ce8abc5ff547667f4c6022d84d0ed4cd062d7e) ) + ROM_LOAD16_WORD_SWAP( "vm3.06a", 0x180000, 0x080000, CRC(2f4fd3a9) SHA1(48549ff0121312ea4a18d0fa167a32f905c14c9f) ) + ROM_LOAD16_WORD_SWAP( "vm3.07b", 0x200000, 0x080000, CRC(cbda91b8) SHA1(31b20aa92422384b1d7a4706ad4c01ea2bd0e0d1) ) + ROM_LOAD16_WORD_SWAP( "vm3.08a", 0x280000, 0x080000, CRC(6ca47259) SHA1(485d8f3a132ccb3f7930cae74de8662d2d44e412) ) + ROM_LOAD16_WORD_SWAP( "vm3.09b", 0x300000, 0x080000, CRC(f4a339e3) SHA1(abd101a55f7d9ddb8aba04fe8d3f0f5d2006c925) ) + ROM_LOAD16_WORD_SWAP( "vm3.10b", 0x380000, 0x080000, CRC(fffbb5b8) SHA1(38aecb820bd1cbd17287848c3ffb013e1d464ddf) ) + + ROM_REGION( 0x2000000, "gfx", 0 ) + ROM_LOAD64_WORD( "vm3.13m", 0x0000000, 0x400000, CRC(fd8a11eb) SHA1(21b9773959e17976ff46b75a6a405042836b2c5f) ) + ROM_LOAD64_WORD( "vm3.15m", 0x0000002, 0x400000, CRC(dd1e7d4e) SHA1(30476e061cdebdb1838b83f4ebd5efae12b7dbfb) ) + ROM_LOAD64_WORD( "vm3.17m", 0x0000004, 0x400000, CRC(6b89445e) SHA1(2abd489839d143c46e25f4fc3db476b70607dc03) ) + ROM_LOAD64_WORD( "vm3.19m", 0x0000006, 0x400000, CRC(3830fdc7) SHA1(ebd3f559c254d349e256c9feb3477f1ed7518206) ) + ROM_LOAD64_WORD( "vm3.14m", 0x1000000, 0x400000, CRC(c1a28e6c) SHA1(012803af33174c0602649d2a2d84f6ee79f54ad2) ) + ROM_LOAD64_WORD( "vm3.16m", 0x1000002, 0x400000, CRC(194a7304) SHA1(a19a9a6fb829953b054dc5c3b0dc017f60d37928) ) + ROM_LOAD64_WORD( "vm3.18m", 0x1000004, 0x400000, CRC(df9a9f47) SHA1(ce29ff00cf4b6fdd9b3b1ed87823534f1d364eab) ) + ROM_LOAD64_WORD( "vm3.20m", 0x1000006, 0x400000, CRC(c22fc3d9) SHA1(df7538c05b03a4ad94d369f8083799979e6fac42) ) + + ROM_REGION( QSOUND_SIZE, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */ + ROM_LOAD( "vm3.01", 0x00000, 0x08000, CRC(f778769b) SHA1(788ce1ad8a322179f634df9e62a31ad776b96762) ) + ROM_CONTINUE( 0x10000, 0x18000 ) + ROM_LOAD( "vm3.02", 0x28000, 0x20000, CRC(cc09faa1) SHA1(2962ef0ceaf7e7279de3c421ea998763330eb43e) ) + + ROM_REGION( 0x800000, "qsound", 0 ) /* QSound samples */ + ROM_LOAD16_WORD_SWAP( "vm3.11m", 0x000000, 0x400000, CRC(e80e956e) SHA1(74181fca4b764fb3c56ceef2cb4c6fd6c18ec4b6) ) + ROM_LOAD16_WORD_SWAP( "vm3.12m", 0x400000, 0x400000, CRC(9cd71557) SHA1(7059db25698a0b286314c5961c618f6d2e6f24a1) ) + + ROM_REGION( 0x20, "key", 0 ) + ROM_LOAD( "vsavb.key", 0x000000, 0x000014, CRC(5274e635) SHA1(4a36bc9cc4497bdfaecf7dd638b5deace131c111) ) +ROM_END + ROM_START( vsav2 ) ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "vs2j.03", 0x000000, 0x80000, CRC(89fd86b4) SHA1(a52f40618d7f12f1df5862ad8e15fea60bef22a2) ) @@ -10242,6 +10276,7 @@ GAME( 1997, vsavu, vsav, cps2, cps2_2p6b, cps2_state, init_cps2, RO GAME( 1997, vsavj, vsav, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Japan 970519)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, vsava, vsav, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Asia 970519)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, vsavh, vsav, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Hispanic 970519)", MACHINE_SUPPORTS_SAVE ) +GAME( 1997, vsavb, vsav, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Brazil 970519)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, mshvsf, 0, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Euro 970625)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, mshvsfu, mshvsf, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970827)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, mshvsfu1, mshvsf, cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970625)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index bbb2d8cdd68..5f3725b371c 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -11137,6 +11137,7 @@ vsav // 19/05/1997 (c) 1997 (Euro) vsav2 // 13/09/1997 (c) 1997 (Japan) vsav2d // vsava // 19/05/1997 (c) 1997 (Asia) +vsavb // 19/05/1997 (c) 1997 (Brazil) vsavd // vsavh // 19/05/1997 (c) 1997 (Hispanic) vsavj // 19/05/1997 (c) 1997 (Japan) From b686ad854cb6f863d5620be0392893514c05ea86 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 14 May 2020 20:23:41 +0200 Subject: [PATCH 30/69] ssystem4: add internal layout (nw) --- src/mame/drivers/saitek_ssystem3.cpp | 10 +- src/mame/layout/saitek_ssystem4.lay | 183 +++++++++++++++++++++++++++ 2 files changed, 190 insertions(+), 3 deletions(-) create mode 100644 src/mame/layout/saitek_ssystem4.lay diff --git a/src/mame/drivers/saitek_ssystem3.cpp b/src/mame/drivers/saitek_ssystem3.cpp index ecb6f00e87b..52ca087e903 100644 --- a/src/mame/drivers/saitek_ssystem3.cpp +++ b/src/mame/drivers/saitek_ssystem3.cpp @@ -55,7 +55,6 @@ TODO: - dump/add chessboard lcd and printer unit - dump/add ssystem3 1980 program revision, were the BTANB fixed? - ssystem4 softwarelist if a prototype cartridge is ever dumped -- ssystem4 internal artwork (same button functions, different look) BTANB (ssystem3): - If the TIME switch is held up, it will sometimes recognize the wrong input when @@ -80,6 +79,7 @@ BTANB (ssystem3): // internal artwork #include "saitek_ssystem3.lh" // clickable +#include "saitek_ssystem4.lh" // clickable namespace { @@ -272,7 +272,7 @@ static INPUT_PORTS_START( ssystem3 ) PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F) PORT_NAME("F 6 / Knight / Clock") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_LEFT) PORT_NAME("E 5 / Bishop / Left") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE / Interrupt") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_I) PORT_NAME("CE / Interrupt") PORT_START("IN.2") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") @@ -304,6 +304,10 @@ INPUT_PORTS_END static INPUT_PORTS_START( ssystem4 ) PORT_INCLUDE( ssystem3 ) + PORT_MODIFY("IN.0") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9 / EP / C.Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0 / MD / C.Board") + PORT_MODIFY("IN.3") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_CODE(KEYCODE_T) PORT_NAME("Time") @@ -341,7 +345,7 @@ void ssystem3_state::ssystem4(machine_config &config) PWM_DISPLAY(config, m_display).set_size(5, 9); m_display->set_bri_levels(0.25); - config.set_default_layout(layout_saitek_ssystem3); + config.set_default_layout(layout_saitek_ssystem4); /* sound hardware */ SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/layout/saitek_ssystem4.lay b/src/mame/layout/saitek_ssystem4.lay new file mode 100644 index 00000000000..46a4bdaa72c --- /dev/null +++ b/src/mame/layout/saitek_ssystem4.lay @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 45b9a3fcf1f676f57936f8e8976c80f60a5fd0f0 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 14:26:11 -0400 Subject: [PATCH 31/69] eurit30: Add LCD screen --- src/mame/drivers/eurit.cpp | 48 +++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index a651376e047..71b9164d16d 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -9,6 +9,9 @@ #include "emu.h" #include "cpu/m37710/m37710.h" #include "machine/am79c30.h" +#include "video/hd44780.h" +#include "emupal.h" +#include "screen.h" class eurit_state : public driver_device { @@ -22,25 +25,19 @@ public: void eurit30(machine_config &mconfig); private: - void p4_w(u8 data); - void p6_w(u8 data); + HD44780_PIXEL_UPDATE(lcd_pixel_update); void mem_map(address_map &map); - required_device m_maincpu; + void palette_init(palette_device &palette); - u8 m_p4 = 0; + required_device m_maincpu; }; -void eurit_state::p4_w(u8 data) +HD44780_PIXEL_UPDATE(eurit_state::lcd_pixel_update) { - m_p4 = data; -} - -void eurit_state::p6_w(u8 data) -{ - if (BIT(data, 6)) - logerror("%s: Writing $%X to LCDC %s register\n", machine().describe_context(), (m_p4 & 0xf0) >> 4, BIT(data, 4) ? "data" : "instruction"); + if (x < 5 && y < 8 && line < 2 && pos < 20) + bitmap.pix16(line * 8 + y, pos * 6 + x) = state; } @@ -56,15 +53,38 @@ void eurit_state::mem_map(address_map &map) static INPUT_PORTS_START(eurit30) INPUT_PORTS_END +void eurit_state::palette_init(palette_device &palette) +{ + palette.set_pen_color(0, rgb_t(131, 136, 139)); + palette.set_pen_color(1, rgb_t( 92, 83, 88)); +} + void eurit_state::eurit30(machine_config &config) { M37730S2(config, m_maincpu, 8'000'000); // type and clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &eurit_state::mem_map); - m_maincpu->p4_out_cb().set(FUNC(eurit_state::p4_w)); - m_maincpu->p6_out_cb().set(FUNC(eurit_state::p6_w)); + m_maincpu->p4_out_cb().set("lcdc", FUNC(hd44780_device::db_w)); + m_maincpu->p6_out_cb().set("lcdc", FUNC(hd44780_device::e_w)).bit(6); + m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rw_w)).bit(5); + m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rs_w)).bit(4); am79c30a_device &dsc(AM79C30A(config, "dsc", 12'288'000)); dsc.int_callback().set_inputline(m_maincpu, M37710_LINE_IRQ0); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update)); + screen.set_size(6*20, 8*2); + screen.set_visarea_full(); + screen.set_palette("palette"); + + PALETTE(config, "palette", FUNC(eurit_state::palette_init), 2); + + hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + lcdc.set_lcd_size(2, 20); + lcdc.set_pixel_update_cb(FUNC(eurit_state::lcd_pixel_update)); + lcdc.set_busy_factor(0.01); } From 24b1f64a7067bd50e6ca8391d4d64f6754de4fbb Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 14 May 2020 20:54:41 +0200 Subject: [PATCH 32/69] savia84: simplify prev commit (nw) --- src/mame/drivers/savia84.cpp | 30 +++++++++++------------------- src/mame/layout/savia84.lay | 14 +++++++------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/mame/drivers/savia84.cpp b/src/mame/drivers/savia84.cpp index 98eb05cfb55..d15716612f7 100644 --- a/src/mame/drivers/savia84.cpp +++ b/src/mame/drivers/savia84.cpp @@ -7,6 +7,7 @@ More data at : http://www.nostalcomp.cz/pdfka/savia84.pdf http://www.nostalcomp.cz/savia.php + (use archive.org) 05/02/2011 Skeleton driver. 11/10/2011 Found a new rom. Working [Robbbert] @@ -54,9 +55,8 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_kbd; - uint8_t m_seg; uint8_t m_digit; + uint8_t m_seg; virtual void machine_reset() override; required_device m_maincpu; required_device m_ppi8255; @@ -140,7 +140,7 @@ void savia84_state::machine_reset() WRITE8_MEMBER( savia84_state::savia84_8255_porta_w ) // OUT F8 - output segments on the selected digit { m_seg = ~data; - m_display->matrix(m_digit, m_seg); + m_display->matrix(1 << m_digit, m_seg); } WRITE8_MEMBER( savia84_state::savia84_8255_portb_w ) // OUT F9 - light the 8 leds down the left side @@ -155,22 +155,14 @@ WRITE8_MEMBER( savia84_state::savia84_8255_portb_w ) // OUT F9 - light the 8 led WRITE8_MEMBER( savia84_state::savia84_8255_portc_w ) // OUT FA - set keyboard scanning row; set digit to display { - m_digit = 0; - m_kbd = data & 15; - if (m_kbd == 0) - m_digit = 1; - else - if ((m_kbd > 1) && (m_kbd < 9)) - m_digit = m_kbd; - if (m_digit) - m_digit = 1 << (m_digit-1); - m_display->matrix(m_digit, m_seg); + m_digit = data & 15; + m_display->matrix(1 << m_digit, m_seg); } READ8_MEMBER( savia84_state::savia84_8255_portc_r ) // IN FA - read keyboard { - if (m_kbd < 9) - return m_io_keyboard[m_kbd]->read(); + if (m_digit < 9) + return m_io_keyboard[m_digit]->read(); else return 0xff; } @@ -184,8 +176,8 @@ void savia84_state::savia84(machine_config &config) /* video hardware */ config.set_default_layout(layout_savia84); - PWM_DISPLAY(config, m_display).set_size(8, 7); - m_display->set_segmask(0xff, 0x7f); + PWM_DISPLAY(config, m_display).set_size(9, 7); + m_display->set_segmask(0x1fd, 0x7f); /* Devices */ I8255(config, m_ppi8255); @@ -206,5 +198,5 @@ ROM_END /* Driver */ -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1984, savia84, 0, 0, savia84, savia84, savia84_state, empty_init, "JT Hyan", "Savia 84", MACHINE_NO_SOUND_HW) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1984, savia84, 0, 0, savia84, savia84, savia84_state, empty_init, "J.T. Hyan", "Savia 84", MACHINE_NO_SOUND_HW) diff --git a/src/mame/layout/savia84.lay b/src/mame/layout/savia84.lay index 9b4c1b98305..1e821eb7f8a 100644 --- a/src/mame/layout/savia84.lay +++ b/src/mame/layout/savia84.lay @@ -28,25 +28,25 @@ license:CC0 - + - + - + - + - + - + - + From d53adb01e3772b4565f95694231566b2cc065a84 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 14 May 2020 21:01:52 +0200 Subject: [PATCH 33/69] various drivers: simplified some more handlers (nw) --- src/devices/bus/scv/rom.cpp | 8 +++---- src/devices/bus/scv/rom.h | 8 +++---- src/devices/bus/scv/slot.cpp | 4 ++-- src/devices/bus/scv/slot.h | 4 ++-- src/devices/machine/i8087.cpp | 4 ++-- src/devices/machine/i8087.h | 4 ++-- src/mame/drivers/advision.cpp | 2 +- src/mame/drivers/dblcrown.cpp | 12 +++++------ src/mame/drivers/dvk_ksm.cpp | 8 +++---- src/mame/drivers/eispc.cpp | 16 +++++++------- src/mame/drivers/enmirage.cpp | 12 +++++------ src/mame/drivers/eolith.cpp | 8 +++---- src/mame/drivers/esq1.cpp | 8 +++---- src/mame/drivers/esq5505.cpp | 12 +++++------ src/mame/drivers/esqasr.cpp | 4 ++-- src/mame/drivers/esqkt.cpp | 8 +++---- src/mame/drivers/esqmr.cpp | 4 ++-- src/mame/drivers/ghosteo.cpp | 40 +++++++++++++++++------------------ src/mame/drivers/hx20.cpp | 24 ++++++++++----------- src/mame/drivers/junior.cpp | 16 +++++++------- src/mame/drivers/maxaflex.cpp | 26 +++++++++++------------ src/mame/drivers/ms6102.cpp | 12 +++++------ src/mame/drivers/qx10.cpp | 33 +++++++++-------------------- src/mame/drivers/sag.cpp | 24 ++++++++++----------- src/mame/drivers/scv.cpp | 18 ++++++++-------- src/mame/drivers/vegaeo.cpp | 12 +++++------ src/mame/drivers/witch.cpp | 12 +++++------ src/mame/includes/advision.h | 18 ++++++++-------- src/mame/includes/carpolo.h | 12 +++++------ src/mame/includes/eolith.h | 8 +++---- src/mame/includes/gamepock.h | 8 +++---- src/mame/includes/hx20.h | 24 ++++++++++----------- src/mame/includes/sorcerer.h | 8 +++---- src/mame/includes/vertigo.h | 2 +- src/mame/includes/witch.h | 12 +++++------ src/mame/machine/advision.cpp | 16 +++++++------- src/mame/machine/carpolo.cpp | 12 +++++------ src/mame/machine/gamepock.cpp | 8 +++---- src/mame/machine/sorcerer.cpp | 8 +++---- src/mame/machine/vertigo.cpp | 2 +- 40 files changed, 234 insertions(+), 247 deletions(-) diff --git a/src/devices/bus/scv/rom.cpp b/src/devices/bus/scv/rom.cpp index be0dc7aea2c..027d94d9075 100644 --- a/src/devices/bus/scv/rom.cpp +++ b/src/devices/bus/scv/rom.cpp @@ -154,7 +154,7 @@ WRITE8_MEMBER(scv_rom32ram8_device::write_cart) m_ram[offset & 0x1fff] = data; } -WRITE8_MEMBER(scv_rom32ram8_device::write_bank) +void scv_rom32ram8_device::write_bank(uint8_t data) { m_ram_enabled = BIT(data, 5); } @@ -165,7 +165,7 @@ READ8_MEMBER(scv_rom64_device::read_cart) return m_rom[offset + (m_bank_base * 0x8000)]; } -WRITE8_MEMBER(scv_rom64_device::write_bank) +void scv_rom64_device::write_bank(uint8_t data) { m_bank_base = BIT(data, 5); } @@ -176,7 +176,7 @@ READ8_MEMBER(scv_rom128_device::read_cart) return m_rom[offset + (m_bank_base * 0x8000)]; } -WRITE8_MEMBER(scv_rom128_device::write_bank) +void scv_rom128_device::write_bank(uint8_t data) { m_bank_base = (data >> 5) & 0x03; } @@ -196,7 +196,7 @@ WRITE8_MEMBER(scv_rom128ram4_device::write_cart) m_ram[offset & 0xfff] = data; } -WRITE8_MEMBER(scv_rom128ram4_device::write_bank) +void scv_rom128ram4_device::write_bank(uint8_t data) { m_bank_base = (data >> 5) & 0x03; m_ram_enabled = BIT(data, 6); diff --git a/src/devices/bus/scv/rom.h b/src/devices/bus/scv/rom.h index 4a6b90b39a1..16799084ddf 100644 --- a/src/devices/bus/scv/rom.h +++ b/src/devices/bus/scv/rom.h @@ -65,7 +65,7 @@ public: // reading and writing virtual DECLARE_READ8_MEMBER(read_cart) override; virtual DECLARE_WRITE8_MEMBER(write_cart) override; - virtual DECLARE_WRITE8_MEMBER(write_bank) override; + virtual void write_bank(uint8_t data) override; protected: // device-level overrides @@ -91,7 +91,7 @@ public: // reading and writing virtual DECLARE_READ8_MEMBER(read_cart) override; - virtual DECLARE_WRITE8_MEMBER(write_bank) override; + virtual void write_bank(uint8_t data) override; private: uint8_t m_bank_base; @@ -108,7 +108,7 @@ public: // reading and writing virtual DECLARE_READ8_MEMBER(read_cart) override; - virtual DECLARE_WRITE8_MEMBER(write_bank) override; + virtual void write_bank(uint8_t data) override; protected: // device-level overrides @@ -131,7 +131,7 @@ public: // reading and writing virtual DECLARE_READ8_MEMBER(read_cart) override; virtual DECLARE_WRITE8_MEMBER(write_cart) override; - virtual DECLARE_WRITE8_MEMBER(write_bank) override; + virtual void write_bank(uint8_t data) override; protected: // device-level overrides diff --git a/src/devices/bus/scv/slot.cpp b/src/devices/bus/scv/slot.cpp index 3144fe30089..412c9c5818f 100644 --- a/src/devices/bus/scv/slot.cpp +++ b/src/devices/bus/scv/slot.cpp @@ -284,8 +284,8 @@ WRITE8_MEMBER(scv_cart_slot_device::write_cart) write_bank -------------------------------------------------*/ -WRITE8_MEMBER(scv_cart_slot_device::write_bank) +void scv_cart_slot_device::write_bank(uint8_t data) { if (m_cart) - m_cart->write_bank(space, offset, data); + m_cart->write_bank(data); } diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h index 97c49af8be4..7394cd401e3 100644 --- a/src/devices/bus/scv/slot.h +++ b/src/devices/bus/scv/slot.h @@ -37,7 +37,7 @@ public: // reading and writing virtual DECLARE_READ8_MEMBER(read_cart) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_cart) { } - virtual DECLARE_WRITE8_MEMBER(write_bank) { } + virtual void write_bank(uint8_t data) { } void rom_alloc(uint32_t size, const char *tag); void ram_alloc(uint32_t size); @@ -103,7 +103,7 @@ public: // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); virtual DECLARE_WRITE8_MEMBER(write_cart); - virtual DECLARE_WRITE8_MEMBER(write_bank); + virtual void write_bank(uint8_t data); protected: // device-level overrides diff --git a/src/devices/machine/i8087.cpp b/src/devices/machine/i8087.cpp index 82fd0348514..9d2327bd3af 100644 --- a/src/devices/machine/i8087.cpp +++ b/src/devices/machine/i8087.cpp @@ -259,13 +259,13 @@ void i8087_device::execute() m_timer->adjust(attotime::from_hz((m_icount ? m_icount : 1) * clock())); } -WRITE32_MEMBER(i8087_device::insn_w) +void i8087_device::insn_w(uint32_t data) { m_ppc = m_pc; m_pc = data; } -WRITE32_MEMBER(i8087_device::addr_w) +void i8087_device::addr_w(uint32_t data) { m_ea = data; execute(); diff --git a/src/devices/machine/i8087.h b/src/devices/machine/i8087.h index aab97cd3305..4ee28a095bf 100644 --- a/src/devices/machine/i8087.h +++ b/src/devices/machine/i8087.h @@ -19,8 +19,8 @@ public: auto irq() { return m_int_handler.bind(); } auto busy() { return m_busy_handler.bind(); } - DECLARE_WRITE32_MEMBER(insn_w); // the real 8087 sniffs the bus watching for esc, can't do that here so provide a poke spot - DECLARE_WRITE32_MEMBER(addr_w); + void insn_w(uint32_t data); // the real 8087 sniffs the bus watching for esc, can't do that here so provide a poke spot + void addr_w(uint32_t data); protected: i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); diff --git a/src/mame/drivers/advision.cpp b/src/mame/drivers/advision.cpp index 89b2a7affaa..65bbce03615 100644 --- a/src/mame/drivers/advision.cpp +++ b/src/mame/drivers/advision.cpp @@ -26,7 +26,7 @@ /* Memory Maps */ -READ8_MEMBER( advision_state::rom_r ) +uint8_t advision_state::rom_r(offs_t offset) { offset += 0x400; return m_cart->read_rom(offset & 0xfff); diff --git a/src/mame/drivers/dblcrown.cpp b/src/mame/drivers/dblcrown.cpp index 55eab934533..ede808fea5e 100644 --- a/src/mame/drivers/dblcrown.cpp +++ b/src/mame/drivers/dblcrown.cpp @@ -83,7 +83,7 @@ private: // screen updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(bank_w); + void bank_w(uint8_t data); DECLARE_READ8_MEMBER(irq_source_r); DECLARE_WRITE8_MEMBER(irq_source_w); DECLARE_READ8_MEMBER(palette_r); @@ -92,11 +92,11 @@ private: DECLARE_WRITE8_MEMBER(vram_w); DECLARE_READ8_MEMBER(vram_bank_r); DECLARE_WRITE8_MEMBER(vram_bank_w); - DECLARE_WRITE8_MEMBER(mux_w); + void mux_w(uint8_t data); DECLARE_READ8_MEMBER(in_mux_r); DECLARE_READ8_MEMBER(in_mux_type_r); DECLARE_WRITE8_MEMBER(output_w); - DECLARE_WRITE8_MEMBER(lamps_w); + void lamps_w(uint8_t data); DECLARE_WRITE8_MEMBER(watchdog_w); TIMER_DEVICE_CALLBACK_MEMBER(dblcrown_irq_scanline); @@ -169,7 +169,7 @@ uint32_t dblcrown_state::screen_update( screen_device &screen, bitmap_ind16 &bit return 0; } -WRITE8_MEMBER( dblcrown_state::bank_w) +void dblcrown_state::bank_w(uint8_t data) { m_bank = data; membank("rom_bank")->set_entry(m_bank & 0x1f); @@ -251,7 +251,7 @@ WRITE8_MEMBER( dblcrown_state::vram_bank_w) printf("vram bank = %02x\n",data); } -WRITE8_MEMBER( dblcrown_state::mux_w) +void dblcrown_state::mux_w(uint8_t data) { m_mux_data = data; } @@ -305,7 +305,7 @@ WRITE8_MEMBER( dblcrown_state::output_w ) } -WRITE8_MEMBER( dblcrown_state::lamps_w ) +void dblcrown_state::lamps_w(uint8_t data) { /* bits 7654 3210 diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp index 4a5a84b1b33..37dc73a84e8 100644 --- a/src/mame/drivers/dvk_ksm.cpp +++ b/src/mame/drivers/dvk_ksm.cpp @@ -123,8 +123,8 @@ private: DECLARE_WRITE_LINE_MEMBER(write_brgb); DECLARE_WRITE_LINE_MEMBER(write_brgc); - DECLARE_WRITE8_MEMBER(ksm_ppi_porta_w); - DECLARE_WRITE8_MEMBER(ksm_ppi_portc_w); + void ksm_ppi_porta_w(uint8_t data); + void ksm_ppi_portc_w(uint8_t data); void ksm_io(address_map &map); void ksm_mem(address_map &map); @@ -247,13 +247,13 @@ void ksm_state::video_start() m_brg = timer_alloc(TIMER_ID_BRG); } -WRITE8_MEMBER(ksm_state::ksm_ppi_porta_w) +void ksm_state::ksm_ppi_porta_w(uint8_t data) { LOG("PPI port A line %d\n", data); m_video.line = data; } -WRITE8_MEMBER(ksm_state::ksm_ppi_portc_w) +void ksm_state::ksm_ppi_portc_w(uint8_t data) { brgc = (data >> 5) & 3; diff --git a/src/mame/drivers/eispc.cpp b/src/mame/drivers/eispc.cpp index 2168bae6b31..dd4de0ae963 100644 --- a/src/mame/drivers/eispc.cpp +++ b/src/mame/drivers/eispc.cpp @@ -148,8 +148,8 @@ private: DECLARE_WRITE_LINE_MEMBER(dreq0_ck_w); DECLARE_WRITE_LINE_MEMBER( epc_dma_hrq_changed ); DECLARE_WRITE_LINE_MEMBER( epc_dma8237_out_eop ); - DECLARE_READ8_MEMBER( epc_dma_read_byte ); - DECLARE_WRITE8_MEMBER( epc_dma_write_byte ); + uint8_t epc_dma_read_byte(offs_t offset); + void epc_dma_write_byte(offs_t offset, uint8_t data); template uint8_t epc_dma8237_io_r(offs_t offset); template void epc_dma8237_io_w(offs_t offset, uint8_t data); template DECLARE_WRITE_LINE_MEMBER(epc_dack_w); @@ -164,8 +164,8 @@ private: // PPI required_device m_ppi8255; - DECLARE_WRITE8_MEMBER(ppi_portb_w); - DECLARE_READ8_MEMBER(ppi_portc_r); + void ppi_portb_w(uint8_t data); + uint8_t ppi_portc_r(); uint8_t m_ppi_portb; required_ioport m_io_dsw; required_ioport m_io_j10; @@ -695,7 +695,7 @@ WRITE_LINE_MEMBER(epc_state::speaker_ck_w) * **********************************************************/ -READ8_MEMBER( epc_state::ppi_portc_r ) +uint8_t epc_state::ppi_portc_r() { uint8_t data; @@ -710,7 +710,7 @@ READ8_MEMBER( epc_state::ppi_portc_r ) return data; } -WRITE8_MEMBER( epc_state::ppi_portb_w ) +void epc_state::ppi_portb_w(uint8_t data) { LOGPPI("PPI Port B write: %02x\n", data); LOGPPI(" PB0 - Enable beeper : %d\n", (data & 0x01) ? 1 : 0); @@ -987,7 +987,7 @@ WRITE_LINE_MEMBER( epc_state::epc_dma_hrq_changed ) } -READ8_MEMBER( epc_state::epc_dma_read_byte ) +uint8_t epc_state::epc_dma_read_byte(offs_t offset) { if ((m_dma_active & 0x0f) == 0) { @@ -999,7 +999,7 @@ READ8_MEMBER( epc_state::epc_dma_read_byte ) return m_maincpu->space(AS_PROGRAM).read_byte(offset | u32(m_dma_segment[seg]) << 16); } -WRITE8_MEMBER( epc_state::epc_dma_write_byte ) +void epc_state::epc_dma_write_byte(offs_t offset, uint8_t data) { if ((m_dma_active & 0x0f) == 0) { diff --git a/src/mame/drivers/enmirage.cpp b/src/mame/drivers/enmirage.cpp index a03e24c239c..4d5a226e1d7 100644 --- a/src/mame/drivers/enmirage.cpp +++ b/src/mame/drivers/enmirage.cpp @@ -77,10 +77,10 @@ private: DECLARE_FLOPPY_FORMATS( floppy_formats ); - DECLARE_WRITE8_MEMBER(mirage_via_write_porta); - DECLARE_WRITE8_MEMBER(mirage_via_write_portb); + void mirage_via_write_porta(uint8_t data); + void mirage_via_write_portb(uint8_t data); DECLARE_WRITE_LINE_MEMBER(mirage_doc_irq); - DECLARE_READ8_MEMBER(mirage_adc_read); + uint8_t mirage_adc_read(); void mirage_map(address_map &map); @@ -109,7 +109,7 @@ WRITE_LINE_MEMBER(enmirage_state::mirage_doc_irq) // m_maincpu->set_input_line(M6809_IRQ_LINE, state); } -READ8_MEMBER(enmirage_state::mirage_adc_read) +uint8_t enmirage_state::mirage_adc_read() { return 0x00; } @@ -137,7 +137,7 @@ void enmirage_state::mirage_map(address_map &map) // bits 0-2: column select from 0-7 // bits 3/4 = right and left LED enable // bits 5/6/7 keypad rows 0/1/2 return -WRITE8_MEMBER(enmirage_state::mirage_via_write_porta) +void enmirage_state::mirage_via_write_porta(uint8_t data) { u8 segdata = data & 7; m_display->matrix(((data >> 3) & 3) ^ 3, (1<serial_in(data); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp index 87b2fda19dd..4f3fd8c0f4e 100644 --- a/src/mame/drivers/esq1.cpp +++ b/src/mame/drivers/esq1.cpp @@ -421,9 +421,9 @@ private: DECLARE_WRITE8_MEMBER(mapper_w); DECLARE_WRITE8_MEMBER(analog_w); - DECLARE_WRITE8_MEMBER(duart_output); + void duart_output(uint8_t data); - DECLARE_READ8_MEMBER(esq1_adc_read); + uint8_t esq1_adc_read(); DECLARE_READ8_MEMBER(es5503_sample_r); @@ -453,7 +453,7 @@ void esq1_state::sq80_es5503_map(address_map &map) map(0x000000, 0x1ffff).r(FUNC(esq1_state::es5503_sample_r)); } -READ8_MEMBER(esq1_state::esq1_adc_read) +uint8_t esq1_state::esq1_adc_read() { return m_adc_value[m_adc_target]; } @@ -560,7 +560,7 @@ void esq1_state::sq80_map(address_map &map) // OP5 = metronome hi // OP6/7 = tape out -WRITE8_MEMBER(esq1_state::duart_output) +void esq1_state::duart_output(uint8_t data) { int bank = m_adc_target = ((data >> 1) & 0x7); // printf("DP [%02x]: %d mlo %d mhi %d tape %d\n", data, data&1, (data>>4)&1, (data>>5)&1, (data>>6)&3); diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp index 7b961a884bc..5e385e8f08f 100644 --- a/src/mame/drivers/esq5505.cpp +++ b/src/mame/drivers/esq5505.cpp @@ -248,13 +248,13 @@ private: DECLARE_READ16_MEMBER(lower_r); DECLARE_WRITE16_MEMBER(lower_w); - DECLARE_READ16_MEMBER(analog_r); - DECLARE_WRITE16_MEMBER(analog_w); + uint16_t analog_r(); + void analog_w(offs_t offset, uint16_t data); DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(duart_tx_a); DECLARE_WRITE_LINE_MEMBER(duart_tx_b); - DECLARE_WRITE8_MEMBER(duart_output); + void duart_output(uint8_t data); void es5505_clock_changed(u32 data); @@ -470,13 +470,13 @@ void esq5505_state::es5505_clock_changed(u32 data) m_pump->set_unscaled_clock(data); } -WRITE16_MEMBER(esq5505_state::analog_w) +void esq5505_state::analog_w(offs_t offset, uint16_t data) { offset &= 0x7; m_analog_values[offset] = data; } -READ16_MEMBER(esq5505_state::analog_r) +uint16_t esq5505_state::analog_r() { return m_analog_values[m_duart_io & 7]; } @@ -495,7 +495,7 @@ WRITE_LINE_MEMBER(esq5505_state::duart_irq_handler) update_irq_to_maincpu(); } -WRITE8_MEMBER(esq5505_state::duart_output) +void esq5505_state::duart_output(uint8_t data) { floppy_image_device *floppy = m_floppy_connector ? m_floppy_connector->get_device() : nullptr; diff --git a/src/mame/drivers/esqasr.cpp b/src/mame/drivers/esqasr.cpp index 890748050b0..af0c49e5f22 100644 --- a/src/mame/drivers/esqasr.cpp +++ b/src/mame/drivers/esqasr.cpp @@ -75,7 +75,7 @@ private: virtual void machine_reset() override; DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq); - DECLARE_READ16_MEMBER(esq5506_read_adc); + u16 esq5506_read_adc(); void es5506_clock_changed(u32 data); void asr_map(address_map &map); @@ -107,7 +107,7 @@ WRITE_LINE_MEMBER(esqasr_state::esq5506_otto_irq) { } -READ16_MEMBER(esqasr_state::esq5506_read_adc) +u16 esqasr_state::esq5506_read_adc() { return 0; } diff --git a/src/mame/drivers/esqkt.cpp b/src/mame/drivers/esqkt.cpp index d537b16d0bd..681e76d41b8 100644 --- a/src/mame/drivers/esqkt.cpp +++ b/src/mame/drivers/esqkt.cpp @@ -134,13 +134,13 @@ private: DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(duart_tx_a); DECLARE_WRITE_LINE_MEMBER(duart_tx_b); - DECLARE_WRITE8_MEMBER(duart_output); + void duart_output(u8 data); u8 m_duart_io; bool m_bCalibSecondByte; DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq); - DECLARE_READ16_MEMBER(esq5506_read_adc); + u16 esq5506_read_adc(); void es5506_clock_changed(u32 data); void kt_map(address_map &map); void ts_map(address_map &map); @@ -190,7 +190,7 @@ WRITE_LINE_MEMBER(esqkt_state::esq5506_otto_irq) #endif } -READ16_MEMBER(esqkt_state::esq5506_read_adc) +u16 esqkt_state::esq5506_read_adc() { switch ((m_duart_io & 7) ^ 7) { @@ -224,7 +224,7 @@ WRITE_LINE_MEMBER(esqkt_state::duart_irq_handler) m_maincpu->set_input_line(M68K_IRQ_3, state); } -WRITE8_MEMBER(esqkt_state::duart_output) +void esqkt_state::duart_output(u8 data) { m_duart_io = data; diff --git a/src/mame/drivers/esqmr.cpp b/src/mame/drivers/esqmr.cpp index 93c3352479c..e5bbe345e73 100644 --- a/src/mame/drivers/esqmr.cpp +++ b/src/mame/drivers/esqmr.cpp @@ -231,7 +231,7 @@ private: virtual void machine_reset() override; DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq); - DECLARE_READ16_MEMBER(esq5506_read_adc); + u16 esq5506_read_adc(); DECLARE_WRITE_LINE_MEMBER(duart_tx_a); DECLARE_WRITE_LINE_MEMBER(duart_tx_b); @@ -265,7 +265,7 @@ WRITE_LINE_MEMBER(esqmr_state::esq5506_otto_irq) { } -READ16_MEMBER(esqmr_state::esq5506_read_adc) +u16 esqmr_state::esq5506_read_adc() { return 0; } diff --git a/src/mame/drivers/ghosteo.cpp b/src/mame/drivers/ghosteo.cpp index 61c4e0dbf31..628fa176224 100644 --- a/src/mame/drivers/ghosteo.cpp +++ b/src/mame/drivers/ghosteo.cpp @@ -122,20 +122,20 @@ private: DECLARE_READ32_MEMBER(bballoon_speedup_r); DECLARE_READ32_MEMBER(touryuu_port_10000000_r); - DECLARE_WRITE8_MEMBER(qs1000_p1_w); - DECLARE_WRITE8_MEMBER(qs1000_p2_w); - DECLARE_WRITE8_MEMBER(qs1000_p3_w); + void qs1000_p1_w(uint8_t data); + void qs1000_p2_w(uint8_t data); + void qs1000_p3_w(uint8_t data); int m_rom_pagesize; virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_READ32_MEMBER(s3c2410_gpio_port_r); - DECLARE_WRITE32_MEMBER(s3c2410_gpio_port_w); - DECLARE_READ32_MEMBER(s3c2410_core_pin_r); - DECLARE_WRITE8_MEMBER(s3c2410_nand_command_w ); - DECLARE_WRITE8_MEMBER(s3c2410_nand_address_w ); - DECLARE_READ8_MEMBER(s3c2410_nand_data_r ); - DECLARE_WRITE8_MEMBER(s3c2410_nand_data_w ); + uint32_t s3c2410_gpio_port_r(offs_t offset); + void s3c2410_gpio_port_w(offs_t offset, uint32_t data); + uint32_t s3c2410_core_pin_r(offs_t offset); + void s3c2410_nand_command_w(uint8_t data); + void s3c2410_nand_address_w(uint8_t data); + uint8_t s3c2410_nand_data_r(); + void s3c2410_nand_data_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(s3c2410_i2c_scl_w ); DECLARE_READ_LINE_MEMBER(s3c2410_i2c_sda_r ); DECLARE_WRITE_LINE_MEMBER(s3c2410_i2c_sda_w ); @@ -168,15 +168,15 @@ NAND Flash Controller (4KB internal buffer) 24-ch external interrupts Controller (Wake-up source 16-ch) */ -WRITE8_MEMBER( ghosteo_state::qs1000_p1_w ) +void ghosteo_state::qs1000_p1_w(uint8_t data) { } -WRITE8_MEMBER( ghosteo_state::qs1000_p2_w ) +void ghosteo_state::qs1000_p2_w(uint8_t data) { } -WRITE8_MEMBER( ghosteo_state::qs1000_p3_w ) +void ghosteo_state::qs1000_p3_w(uint8_t data) { // .... .xxx - Data ROM bank (64kB) // ...x .... - ? @@ -193,7 +193,7 @@ WRITE8_MEMBER( ghosteo_state::qs1000_p3_w ) static const uint8_t security_data[] = { 0x01, 0xC4, 0xFF, 0x22, 0xFF, 0xFF, 0xFF, 0xFF }; -READ32_MEMBER(ghosteo_state::s3c2410_gpio_port_r) +uint32_t ghosteo_state::s3c2410_gpio_port_r(offs_t offset) { uint32_t data = m_bballoon_port[offset]; switch (offset) @@ -213,7 +213,7 @@ READ32_MEMBER(ghosteo_state::s3c2410_gpio_port_r) return data; } -WRITE32_MEMBER(ghosteo_state::s3c2410_gpio_port_w) +void ghosteo_state::s3c2410_gpio_port_w(offs_t offset, uint32_t data) { uint32_t old_value = m_bballoon_port[offset]; m_bballoon_port[offset] = data; @@ -258,7 +258,7 @@ NCON : NAND flash memory address step selection */ -READ32_MEMBER(ghosteo_state::s3c2410_core_pin_r) +uint32_t ghosteo_state::s3c2410_core_pin_r(offs_t offset) { int data = 0; switch (offset) @@ -272,7 +272,7 @@ READ32_MEMBER(ghosteo_state::s3c2410_core_pin_r) // NAND -WRITE8_MEMBER(ghosteo_state::s3c2410_nand_command_w ) +void ghosteo_state::s3c2410_nand_command_w(uint8_t data) { struct nand_t &nand = m_nand; #if NAND_LOG @@ -296,7 +296,7 @@ WRITE8_MEMBER(ghosteo_state::s3c2410_nand_command_w ) } } -WRITE8_MEMBER(ghosteo_state::s3c2410_nand_address_w ) +void ghosteo_state::s3c2410_nand_address_w(uint8_t data) { struct nand_t &nand = m_nand; #if NAND_LOG @@ -330,7 +330,7 @@ WRITE8_MEMBER(ghosteo_state::s3c2410_nand_address_w ) } } -READ8_MEMBER(ghosteo_state::s3c2410_nand_data_r ) +uint8_t ghosteo_state::s3c2410_nand_data_r() { struct nand_t &nand = m_nand; uint8_t data = 0; @@ -376,7 +376,7 @@ READ8_MEMBER(ghosteo_state::s3c2410_nand_data_r ) return data; } -WRITE8_MEMBER(ghosteo_state::s3c2410_nand_data_w ) +void ghosteo_state::s3c2410_nand_data_w(uint8_t data) { #if NAND_LOG logerror( "s3c2410_nand_data_w %02X\n", data); diff --git a/src/mame/drivers/hx20.cpp b/src/mame/drivers/hx20.cpp index 75facfb4d05..d01df0211a2 100644 --- a/src/mame/drivers/hx20.cpp +++ b/src/mame/drivers/hx20.cpp @@ -173,7 +173,7 @@ WRITE8_MEMBER( hx20_state::lcd_data_w ) // main_p1_r - main CPU port 1 read //------------------------------------------------- -READ8_MEMBER( hx20_state::main_p1_r ) +uint8_t hx20_state::main_p1_r() { /* @@ -210,7 +210,7 @@ READ8_MEMBER( hx20_state::main_p1_r ) // main_p1_w - main CPU port 1 write //------------------------------------------------- -WRITE8_MEMBER( hx20_state::main_p1_w ) +void hx20_state::main_p1_w(uint8_t data) { /* @@ -233,7 +233,7 @@ WRITE8_MEMBER( hx20_state::main_p1_w ) // main_p2_r - main CPU port 2 read //------------------------------------------------- -READ8_MEMBER( hx20_state::main_p2_r ) +uint8_t hx20_state::main_p2_r() { /* @@ -268,7 +268,7 @@ READ8_MEMBER( hx20_state::main_p2_r ) // main_p2_w - main CPU port 2 write //------------------------------------------------- -WRITE8_MEMBER( hx20_state::main_p2_w ) +void hx20_state::main_p2_w(uint8_t data) { /* @@ -302,7 +302,7 @@ WRITE8_MEMBER( hx20_state::main_p2_w ) // slave_p1_r - slave CPU port 1 read //------------------------------------------------- -READ8_MEMBER( hx20_state::slave_p1_r ) +uint8_t hx20_state::slave_p1_r() { /* @@ -329,7 +329,7 @@ READ8_MEMBER( hx20_state::slave_p1_r ) // slave_p1_w - slave CPU port 1 write //------------------------------------------------- -WRITE8_MEMBER( hx20_state::slave_p1_w ) +void hx20_state::slave_p1_w(uint8_t data) { /* @@ -355,7 +355,7 @@ WRITE8_MEMBER( hx20_state::slave_p1_w ) // slave_p2_r - slave CPU port 2 read //------------------------------------------------- -READ8_MEMBER( hx20_state::slave_p2_r ) +uint8_t hx20_state::slave_p2_r() { /* @@ -385,7 +385,7 @@ READ8_MEMBER( hx20_state::slave_p2_r ) // slave_p2_w - slave CPU port 2 write //------------------------------------------------- -WRITE8_MEMBER( hx20_state::slave_p2_w ) +void hx20_state::slave_p2_w(uint8_t data) { /* @@ -411,7 +411,7 @@ WRITE8_MEMBER( hx20_state::slave_p2_w ) // slave_p3_r - slave CPU port 3 read //------------------------------------------------- -READ8_MEMBER( hx20_state::slave_p3_r ) +uint8_t hx20_state::slave_p3_r() { /* @@ -438,7 +438,7 @@ READ8_MEMBER( hx20_state::slave_p3_r ) // slave_p3_w - slave CPU port 3 write //------------------------------------------------- -WRITE8_MEMBER( hx20_state::slave_p3_w ) +void hx20_state::slave_p3_w(uint8_t data) { /* @@ -467,7 +467,7 @@ WRITE8_MEMBER( hx20_state::slave_p3_w ) // slave_p4_r - slave CPU port 4 read //------------------------------------------------- -READ8_MEMBER( hx20_state::slave_p4_r ) +uint8_t hx20_state::slave_p4_r() { /* @@ -497,7 +497,7 @@ READ8_MEMBER( hx20_state::slave_p4_r ) // slave_p4_w - slave CPU port 4 write //------------------------------------------------- -WRITE8_MEMBER( hx20_state::slave_p4_w ) +void hx20_state::slave_p4_w(uint8_t data) { /* diff --git a/src/mame/drivers/junior.cpp b/src/mame/drivers/junior.cpp index fc161fa3611..bd051e85493 100644 --- a/src/mame/drivers/junior.cpp +++ b/src/mame/drivers/junior.cpp @@ -48,10 +48,10 @@ public: void junior(machine_config &config); private: - DECLARE_READ8_MEMBER(junior_riot_a_r); - DECLARE_READ8_MEMBER(junior_riot_b_r); - DECLARE_WRITE8_MEMBER(junior_riot_a_w); - DECLARE_WRITE8_MEMBER(junior_riot_b_w); + uint8_t junior_riot_a_r(); + uint8_t junior_riot_b_r(); + void junior_riot_a_w(uint8_t data); + void junior_riot_b_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; @@ -136,7 +136,7 @@ INPUT_PORTS_END -READ8_MEMBER( junior_state::junior_riot_a_r ) +uint8_t junior_state::junior_riot_a_r() { uint8_t data = 0xff; @@ -154,7 +154,7 @@ READ8_MEMBER( junior_state::junior_riot_a_r ) } -READ8_MEMBER( junior_state::junior_riot_b_r ) +uint8_t junior_state::junior_riot_b_r() { if ( m_port_b & 0x20 ) return 0xFF; @@ -164,7 +164,7 @@ READ8_MEMBER( junior_state::junior_riot_b_r ) } -WRITE8_MEMBER( junior_state::junior_riot_a_w ) +void junior_state::junior_riot_a_w(uint8_t data) { uint8_t idx = ( m_port_b >> 1 ) & 0x0f; @@ -178,7 +178,7 @@ WRITE8_MEMBER( junior_state::junior_riot_a_w ) } -WRITE8_MEMBER( junior_state::junior_riot_b_w ) +void junior_state::junior_riot_b_w(uint8_t data) { uint8_t idx = ( data >> 1 ) & 0x0f; diff --git a/src/mame/drivers/maxaflex.cpp b/src/mame/drivers/maxaflex.cpp index 9c4785416d6..bb7a3d01754 100644 --- a/src/mame/drivers/maxaflex.cpp +++ b/src/mame/drivers/maxaflex.cpp @@ -57,13 +57,13 @@ public: DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); private: - DECLARE_READ8_MEMBER(mcu_porta_r); - DECLARE_WRITE8_MEMBER(mcu_porta_w); - DECLARE_WRITE8_MEMBER(mcu_portb_w); - DECLARE_WRITE8_MEMBER(mcu_portc_w); - DECLARE_READ8_MEMBER(pia_pa_r); - DECLARE_READ8_MEMBER(pia_pb_r); - WRITE8_MEMBER(pia_pb_w) { mmu(data); } + uint8_t mcu_porta_r(); + void mcu_porta_w(uint8_t data); + void mcu_portb_w(uint8_t data); + void mcu_portc_w(uint8_t data); + uint8_t pia_pa_r(); + uint8_t pia_pb_r(); + void pia_pb_w(uint8_t data) { mmu(data); } WRITE_LINE_MEMBER(pia_cb2_w) { } // This is used by Floppy drive on Atari 8bits Home Computers TIMER_DEVICE_CALLBACK_MEMBER(mf_interrupt); @@ -123,7 +123,7 @@ void maxaflex_state::mmu(uint8_t new_mmu) 7 (out) AUDIO */ -READ8_MEMBER(maxaflex_state::mcu_porta_r) +uint8_t maxaflex_state::mcu_porta_r() { return ((m_dsw->read() << 0) & 0x0f) | @@ -132,7 +132,7 @@ READ8_MEMBER(maxaflex_state::mcu_porta_r) 0xc0; } -WRITE8_MEMBER(maxaflex_state::mcu_porta_w) +void maxaflex_state::mcu_porta_w(uint8_t data) { m_speaker->level_w(BIT(data, 7)); } @@ -148,7 +148,7 @@ WRITE8_MEMBER(maxaflex_state::mcu_porta_w) 7 (out) TOFF - enables/disables user controls */ -WRITE8_MEMBER(maxaflex_state::mcu_portb_w) +void maxaflex_state::mcu_portb_w(uint8_t data) { const uint8_t diff = data ^ m_portb_out; m_portb_out = data; @@ -180,7 +180,7 @@ WRITE8_MEMBER(maxaflex_state::mcu_portb_w) 2 (out) lamp START 3 (out) lamp OVER */ -WRITE8_MEMBER(maxaflex_state::mcu_portc_w) +void maxaflex_state::mcu_portc_w(uint8_t data) { /* uses a 7447A, which is equivalent to an LS47/48 */ constexpr static uint8_t ls48_map[16] = @@ -283,12 +283,12 @@ static INPUT_PORTS_START( a600xl ) INPUT_PORTS_END -READ8_MEMBER(maxaflex_state::pia_pa_r) +uint8_t maxaflex_state::pia_pa_r() { return atari_input_disabled() ? 0xff : m_joy01.read_safe(0); } -READ8_MEMBER(maxaflex_state::pia_pb_r) +uint8_t maxaflex_state::pia_pb_r() { return atari_input_disabled() ? 0xff : m_joy23.read_safe(0); } diff --git a/src/mame/drivers/ms6102.cpp b/src/mame/drivers/ms6102.cpp index 6c19ee88001..ce5a1d474fc 100644 --- a/src/mame/drivers/ms6102.cpp +++ b/src/mame/drivers/ms6102.cpp @@ -97,8 +97,8 @@ private: DECLARE_WRITE8_MEMBER(pic_w); IRQ_CALLBACK_MEMBER(ms6102_int_ack); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(vdack_w); + u8 memory_read_byte(offs_t offset); + void vdack_w(u8 data); DECLARE_READ8_MEMBER(crtc_r); DECLARE_WRITE8_MEMBER(crtc_w); @@ -106,7 +106,7 @@ private: DECLARE_READ8_MEMBER(misc_status_r); u16 m_dmaaddr; - DECLARE_WRITE8_MEMBER(kbd_uart_clock_w); + void kbd_uart_clock_w(u8 data); required_shared_ptr m_p_videoram; required_device m_maincpu; @@ -175,7 +175,7 @@ WRITE_LINE_MEMBER(ms6102_state::irq_w) m_maincpu->set_input_line(I8085_INTR_LINE, ASSERT_LINE); } -READ8_MEMBER(ms6102_state::memory_read_byte) +u8 ms6102_state::memory_read_byte(offs_t offset) { m_dmaaddr = offset; return m_maincpu->space(AS_PROGRAM).read_byte(offset); @@ -219,7 +219,7 @@ READ8_MEMBER(ms6102_state::misc_status_r) return status; } -WRITE8_MEMBER(ms6102_state::kbd_uart_clock_w) +void ms6102_state::kbd_uart_clock_w(u8 data) { m_kbd_uart->write_tcp(BIT(data, 1)); m_kbd_uart->write_rcp(BIT(data, 1)); @@ -236,7 +236,7 @@ WRITE8_MEMBER(ms6102_state::pic_w) m_pic->b_sgs_w(~data); } -WRITE8_MEMBER(ms6102_state::vdack_w) +void ms6102_state::vdack_w(u8 data) { if(m_dmaaddr & 1) m_crtc1->dack_w(data); diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp index a9f9e235009..6585086a209 100644 --- a/src/mame/drivers/qx10.cpp +++ b/src/mame/drivers/qx10.cpp @@ -104,12 +104,10 @@ private: DECLARE_WRITE8_MEMBER( prom_sel_w ); DECLARE_WRITE8_MEMBER( cmos_sel_w ); DECLARE_WRITE_LINE_MEMBER( qx10_upd765_interrupt ); - DECLARE_READ8_MEMBER( fdc_dma_r ); - DECLARE_WRITE8_MEMBER( fdc_dma_w ); DECLARE_WRITE8_MEMBER( fdd_motor_w ); DECLARE_READ8_MEMBER( qx10_30_r ); - DECLARE_READ8_MEMBER( gdc_dack_r ); - DECLARE_WRITE8_MEMBER( gdc_dack_w ); + uint8_t gdc_dack_r(); + void gdc_dack_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( tc_w ); DECLARE_READ8_MEMBER( mc146818_r ); DECLARE_WRITE8_MEMBER( mc146818_w ); @@ -119,8 +117,8 @@ private: DECLARE_WRITE8_MEMBER( vram_bank_w ); DECLARE_READ16_MEMBER( vram_r ); DECLARE_WRITE16_MEMBER( vram_w ); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(keyboard_clk); DECLARE_WRITE_LINE_MEMBER(keyboard_irq); @@ -298,17 +296,6 @@ void qx10_state::update_memory_mapping() } } -READ8_MEMBER( qx10_state::fdc_dma_r ) -{ - return m_fdc->dma_r(); -} - -WRITE8_MEMBER( qx10_state::fdc_dma_w ) -{ - m_fdc->dma_w(data); -} - - WRITE8_MEMBER( qx10_state::qx10_18_w ) { m_membank = (data >> 4) & 0x0f; @@ -423,13 +410,13 @@ WRITE_LINE_MEMBER(qx10_state::dma_hrq_changed) m_dma_1->hack_w(state); } -READ8_MEMBER( qx10_state::gdc_dack_r ) +uint8_t qx10_state::gdc_dack_r() { logerror("GDC DACK read\n"); return 0; } -WRITE8_MEMBER( qx10_state::gdc_dack_w ) +void qx10_state::gdc_dack_w(uint8_t data) { logerror("GDC DACK write %02x\n", data); } @@ -446,13 +433,13 @@ WRITE_LINE_MEMBER( qx10_state::tc_w ) Channel 2: GDC Channel 3: Option slots */ -READ8_MEMBER(qx10_state::memory_read_byte) +uint8_t qx10_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -WRITE8_MEMBER(qx10_state::memory_write_byte) +void qx10_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.write_byte(offset, data); @@ -796,10 +783,10 @@ void qx10_state::qx10(machine_config &config) m_dma_1->out_eop_callback().set(FUNC(qx10_state::tc_w)); m_dma_1->in_memr_callback().set(FUNC(qx10_state::memory_read_byte)); m_dma_1->out_memw_callback().set(FUNC(qx10_state::memory_write_byte)); - m_dma_1->in_ior_callback<0>().set(FUNC(qx10_state::fdc_dma_r)); + m_dma_1->in_ior_callback<0>().set(m_fdc, FUNC(upd765a_device::dma_r)); m_dma_1->in_ior_callback<1>().set(FUNC(qx10_state::gdc_dack_r)); //m_dma_1->in_ior_callback<2>().set(m_hgdc, FUNC(upd7220_device::dack_r)); - m_dma_1->out_iow_callback<0>().set(FUNC(qx10_state::fdc_dma_w)); + m_dma_1->out_iow_callback<0>().set(m_fdc, FUNC(upd765a_device::dma_w)); m_dma_1->out_iow_callback<1>().set(FUNC(qx10_state::gdc_dack_w)); //m_dma_1->out_iow_callback<2>().set(m_hgdc, FUNC(upd7220_device::dack_w)); AM9517A(config, m_dma_2, MAIN_CLK/4); diff --git a/src/mame/drivers/sag.cpp b/src/mame/drivers/sag.cpp index f43d917bca4..d87392f4997 100644 --- a/src/mame/drivers/sag.cpp +++ b/src/mame/drivers/sag.cpp @@ -85,13 +85,13 @@ private: u16 m_grid = 0; u16 m_plate = 0; - DECLARE_WRITE8_MEMBER(hmcs40_write_r); - DECLARE_WRITE16_MEMBER(hmcs40_write_d); - DECLARE_READ16_MEMBER(hmcs40_read_d); + void hmcs40_write_r(offs_t offset, u8 data); + void hmcs40_write_d(u16 data); + u16 hmcs40_read_d(); - DECLARE_WRITE16_MEMBER(tms1k_write_r); - DECLARE_WRITE16_MEMBER(tms1k_write_o); - DECLARE_READ8_MEMBER(tms1k_read_k); + void tms1k_write_r(u16 data); + void tms1k_write_o(u16 data); + u8 tms1k_read_k(); }; void sag_state::machine_start() @@ -206,7 +206,7 @@ void sag_state::speaker_w(int state) // cartridge type 1: HD38800 -WRITE8_MEMBER(sag_state::hmcs40_write_r) +void sag_state::hmcs40_write_r(offs_t offset, u8 data) { // R0x-R3x: vfd plate int shift = offset * 4; @@ -214,7 +214,7 @@ WRITE8_MEMBER(sag_state::hmcs40_write_r) update_display(); } -WRITE16_MEMBER(sag_state::hmcs40_write_d) +void sag_state::hmcs40_write_d(u16 data) { // D0: speaker out speaker_w(data & 1); @@ -224,7 +224,7 @@ WRITE16_MEMBER(sag_state::hmcs40_write_d) update_display(); } -READ16_MEMBER(sag_state::hmcs40_read_d) +u16 sag_state::hmcs40_read_d() { // D13-D15: multiplexed inputs return input_r() << 13; @@ -233,7 +233,7 @@ READ16_MEMBER(sag_state::hmcs40_read_d) // cartridge type 2: TMS1670 -WRITE16_MEMBER(sag_state::tms1k_write_r) +void sag_state::tms1k_write_r(u16 data) { // R0: speaker out speaker_w(data & 1); @@ -245,14 +245,14 @@ WRITE16_MEMBER(sag_state::tms1k_write_r) update_display(); } -WRITE16_MEMBER(sag_state::tms1k_write_o) +void sag_state::tms1k_write_o(u16 data) { // O0-O7: vfd plate 4-11 m_plate = (m_plate & 0xf) | data << 4; update_display(); } -READ8_MEMBER(sag_state::tms1k_read_k) +u8 sag_state::tms1k_read_k() { // K1-K4: multiplexed inputs return input_r(); diff --git a/src/mame/drivers/scv.cpp b/src/mame/drivers/scv.cpp index 4467b27d585..3a69a469bee 100644 --- a/src/mame/drivers/scv.cpp +++ b/src/mame/drivers/scv.cpp @@ -41,10 +41,10 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - DECLARE_WRITE8_MEMBER(porta_w); - DECLARE_READ8_MEMBER(portb_r); - DECLARE_READ8_MEMBER(portc_r); - DECLARE_WRITE8_MEMBER(portc_w); + void porta_w(uint8_t data); + uint8_t portb_r(); + uint8_t portc_r(); + void portc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(upd1771_ack_w); void scv_palette(palette_device &palette) const; uint32_t screen_update_scv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -174,13 +174,13 @@ static INPUT_PORTS_START( scv ) INPUT_PORTS_END -WRITE8_MEMBER( scv_state::porta_w ) +void scv_state::porta_w(uint8_t data) { m_porta = data; } -READ8_MEMBER( scv_state::portb_r ) +uint8_t scv_state::portb_r() { uint8_t data = 0xff; @@ -194,7 +194,7 @@ READ8_MEMBER( scv_state::portb_r ) } -READ8_MEMBER( scv_state::portc_r ) +uint8_t scv_state::portc_r() { uint8_t data = m_portc; @@ -204,11 +204,11 @@ READ8_MEMBER( scv_state::portc_r ) } -WRITE8_MEMBER( scv_state::portc_w ) +void scv_state::portc_w(uint8_t data) { //logerror("%04x: scv_portc_w: data = 0x%02x\n", m_maincpu->pc(), data ); m_portc = data; - m_cart->write_bank(space, 0, m_portc); + m_cart->write_bank(m_portc); m_upd1771c->pcm_write(m_portc & 0x08); } diff --git a/src/mame/drivers/vegaeo.cpp b/src/mame/drivers/vegaeo.cpp index 1fa59a8173f..5b3ef25af1a 100644 --- a/src/mame/drivers/vegaeo.cpp +++ b/src/mame/drivers/vegaeo.cpp @@ -51,23 +51,23 @@ private: DECLARE_READ8_MEMBER(vram_r); DECLARE_WRITE32_MEMBER(vega_misc_w); DECLARE_READ32_MEMBER(vegaeo_custom_read); - DECLARE_WRITE8_MEMBER(qs1000_p1_w); - DECLARE_WRITE8_MEMBER(qs1000_p2_w); - DECLARE_WRITE8_MEMBER(qs1000_p3_w); + void qs1000_p1_w(uint8_t data); + void qs1000_p2_w(uint8_t data); + void qs1000_p3_w(uint8_t data); uint32_t screen_update_vega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void vega_map(address_map &map); }; -WRITE8_MEMBER( vegaeo_state::qs1000_p1_w ) +void vegaeo_state::qs1000_p1_w(uint8_t data) { } -WRITE8_MEMBER( vegaeo_state::qs1000_p2_w ) +void vegaeo_state::qs1000_p2_w(uint8_t data) { } -WRITE8_MEMBER( vegaeo_state::qs1000_p3_w ) +void vegaeo_state::qs1000_p3_w(uint8_t data) { // .... .xxx - Data ROM bank (64kB) // ...x .... - ? diff --git a/src/mame/drivers/witch.cpp b/src/mame/drivers/witch.cpp index 5c9759cdf12..35922066615 100644 --- a/src/mame/drivers/witch.cpp +++ b/src/mame/drivers/witch.cpp @@ -397,7 +397,7 @@ READ8_MEMBER(witch_state::gfx1_cram_r) return m_gfx1_cram[offset]; } -READ8_MEMBER(witch_state::read_a000) +uint8_t witch_state::read_a000() { switch (m_reg_a002 & 0x3f) { @@ -413,7 +413,7 @@ READ8_MEMBER(witch_state::read_a000) } } -WRITE8_MEMBER(witch_state::write_a002) +void witch_state::write_a002(uint8_t data) { //A002 bit 7&6 = m_bank ???? m_reg_a002 = data; @@ -421,7 +421,7 @@ WRITE8_MEMBER(witch_state::write_a002) m_mainbank->set_entry((data >> 6) & 3); } -WRITE8_MEMBER(keirinou_state::write_keirinou_a002) +void keirinou_state::write_keirinou_a002(uint8_t data) { uint8_t new_bg_bank; m_reg_a002 = data; @@ -437,7 +437,7 @@ WRITE8_MEMBER(keirinou_state::write_keirinou_a002) // m_mainbank->set_entry((data >> 6) & 3); } -WRITE8_MEMBER(witch_state::write_a006) +void witch_state::write_a006(uint8_t data) { // don't write when zeroed on reset if (data == 0) @@ -486,7 +486,7 @@ READ8_MEMBER(witch_state::prot_read_700x) return memregion("sub")->base()[0x7000+offset]; } -WRITE8_MEMBER(witch_state::xscroll_w) +void witch_state::xscroll_w(uint8_t data) { m_scrollx = data; // need to mark tiles dirty here, as the tilemap writes are affected by scrollx, see FIX_OFFSET macro. @@ -495,7 +495,7 @@ WRITE8_MEMBER(witch_state::xscroll_w) m_gfx1_tilemap->mark_all_dirty(); } -WRITE8_MEMBER(witch_state::yscroll_w) +void witch_state::yscroll_w(uint8_t data) { m_scrolly = data; } diff --git a/src/mame/includes/advision.h b/src/mame/includes/advision.h index f55de1ba076..98ff4ee0fca 100644 --- a/src/mame/includes/advision.h +++ b/src/mame/includes/advision.h @@ -49,18 +49,18 @@ public: void vh_write(int data); void vh_update(int x); - DECLARE_READ8_MEMBER( rom_r ); - DECLARE_READ8_MEMBER( ext_ram_r ); - DECLARE_WRITE8_MEMBER( ext_ram_w ); - DECLARE_READ8_MEMBER( controller_r ); - DECLARE_WRITE8_MEMBER( bankswitch_w ); - DECLARE_WRITE8_MEMBER( av_control_w ); + uint8_t rom_r(offs_t offset); + uint8_t ext_ram_r(offs_t offset); + void ext_ram_w(offs_t offset, uint8_t data); + uint8_t controller_r(); + void bankswitch_w(uint8_t data); + void av_control_w(uint8_t data); DECLARE_READ_LINE_MEMBER( vsync_r ); TIMER_CALLBACK_MEMBER( sound_cmd_sync ); - DECLARE_READ8_MEMBER( sound_cmd_r ); - DECLARE_WRITE8_MEMBER( sound_g_w ); - DECLARE_WRITE8_MEMBER( sound_d_w ); + uint8_t sound_cmd_r(); + void sound_g_w(uint8_t data); + void sound_d_w(uint8_t data); memory_region *m_cart_rom; diff --git a/src/mame/includes/carpolo.h b/src/mame/includes/carpolo.h index 182a1a12928..05ad10fb525 100644 --- a/src/mame/includes/carpolo.h +++ b/src/mame/includes/carpolo.h @@ -120,11 +120,11 @@ private: DECLARE_WRITE_LINE_MEMBER(coin2_interrupt_clear_w); DECLARE_WRITE_LINE_MEMBER(coin3_interrupt_clear_w); DECLARE_WRITE_LINE_MEMBER(coin4_interrupt_clear_w); - DECLARE_WRITE8_MEMBER(pia_0_port_a_w); - DECLARE_WRITE8_MEMBER(pia_0_port_b_w); - DECLARE_READ8_MEMBER(pia_0_port_b_r); - DECLARE_READ8_MEMBER(pia_1_port_a_r); - DECLARE_READ8_MEMBER(pia_1_port_b_r); + void pia_0_port_a_w(uint8_t data); + void pia_0_port_b_w(uint8_t data); + uint8_t pia_0_port_b_r(); + uint8_t pia_1_port_a_r(); + uint8_t pia_1_port_b_r(); DECLARE_WRITE_LINE_MEMBER(ttl7474_2s_1_q_cb); DECLARE_WRITE_LINE_MEMBER(ttl7474_2s_2_q_cb); DECLARE_WRITE_LINE_MEMBER(ttl7474_2u_1_q_cb); @@ -132,7 +132,7 @@ private: DECLARE_WRITE_LINE_MEMBER(ls153_za_w); DECLARE_WRITE_LINE_MEMBER(ls153_zb_w); - DECLARE_WRITE8_MEMBER(ttl74148_3s_cb); + void ttl74148_3s_cb(uint8_t data); void timer_tick(); void remap_sprite_code(int bank, int code, int *remapped_code, int *flipy); diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h index 27a19b6a9d9..ce03a2c6913 100644 --- a/src/mame/includes/eolith.h +++ b/src/mame/includes/eolith.h @@ -60,10 +60,10 @@ private: template DECLARE_READ32_MEMBER(hidctch3_pen_r); DECLARE_WRITE16_MEMBER(eolith_vram_w); DECLARE_READ16_MEMBER(eolith_vram_r); - DECLARE_WRITE8_MEMBER(sound_p1_w); - DECLARE_READ8_MEMBER(qs1000_p1_r); - DECLARE_WRITE8_MEMBER(qs1000_p1_w); - DECLARE_WRITE8_MEMBER(soundcpu_to_qs1000); + void sound_p1_w(uint8_t data); + uint8_t qs1000_p1_r(); + void qs1000_p1_w(uint8_t data); + void soundcpu_to_qs1000(uint8_t data); DECLARE_MACHINE_RESET(eolith); DECLARE_VIDEO_START(eolith); diff --git a/src/mame/includes/gamepock.h b/src/mame/includes/gamepock.h index dab81cc33d3..dd16f46a6f6 100644 --- a/src/mame/includes/gamepock.h +++ b/src/mame/includes/gamepock.h @@ -35,10 +35,10 @@ private: void hd44102ch_init(int which); void lcd_update(); - DECLARE_WRITE8_MEMBER( port_a_w ); - DECLARE_READ8_MEMBER( port_b_r ); - DECLARE_WRITE8_MEMBER( port_b_w ); - DECLARE_READ8_MEMBER( port_c_r ); + void port_a_w(uint8_t data); + uint8_t port_b_r(); + void port_b_w(uint8_t data); + uint8_t port_c_r(); uint32_t screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(gamepock_to_w); void gamepock_mem(address_map &map); diff --git a/src/mame/includes/hx20.h b/src/mame/includes/hx20.h index aef16a6752e..b22c3ef250d 100644 --- a/src/mame/includes/hx20.h +++ b/src/mame/includes/hx20.h @@ -76,19 +76,19 @@ private: DECLARE_WRITE8_MEMBER( lcd_cs_w ); DECLARE_WRITE8_MEMBER( lcd_data_w ); - DECLARE_READ8_MEMBER( main_p1_r ); - DECLARE_WRITE8_MEMBER( main_p1_w ); - DECLARE_READ8_MEMBER( main_p2_r ); - DECLARE_WRITE8_MEMBER( main_p2_w ); + uint8_t main_p1_r(); + void main_p1_w(uint8_t data); + uint8_t main_p2_r(); + void main_p2_w(uint8_t data); - DECLARE_READ8_MEMBER( slave_p1_r ); - DECLARE_WRITE8_MEMBER( slave_p1_w ); - DECLARE_READ8_MEMBER( slave_p2_r ); - DECLARE_WRITE8_MEMBER( slave_p2_w ); - DECLARE_READ8_MEMBER( slave_p3_r ); - DECLARE_WRITE8_MEMBER( slave_p3_w ); - DECLARE_READ8_MEMBER( slave_p4_r ); - DECLARE_WRITE8_MEMBER( slave_p4_w ); + uint8_t slave_p1_r(); + void slave_p1_w(uint8_t data); + uint8_t slave_p2_r(); + void slave_p2_w(uint8_t data); + uint8_t slave_p3_r(); + void slave_p3_w(uint8_t data); + uint8_t slave_p4_r(); + void slave_p4_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( rtc_irq_w ); diff --git a/src/mame/includes/sorcerer.h b/src/mame/includes/sorcerer.h index 9fb8a19fa15..1f605198010 100644 --- a/src/mame/includes/sorcerer.h +++ b/src/mame/includes/sorcerer.h @@ -113,10 +113,10 @@ private: DECLARE_SNAPSHOT_LOAD_MEMBER(snapshot_cb); DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); DECLARE_WRITE_LINE_MEMBER(busreq_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); + uint8_t io_read_byte(offs_t offset); + void io_write_byte(offs_t offset, uint8_t data); void machine_start_common(u16 endmem); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h index fe70c5c47cd..ab6c37ef362 100644 --- a/src/mame/includes/vertigo.h +++ b/src/mame/includes/vertigo.h @@ -51,7 +51,7 @@ private: TIMER_CALLBACK_MEMBER(sound_command_w); DECLARE_WRITE_LINE_MEMBER(v_irq4_w); DECLARE_WRITE_LINE_MEMBER(v_irq3_w); - DECLARE_WRITE8_MEMBER(update_irq); + void update_irq(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/witch.h b/src/mame/includes/witch.h index 6167c05f594..e2ebb68bb56 100644 --- a/src/mame/includes/witch.h +++ b/src/mame/includes/witch.h @@ -62,14 +62,14 @@ public: DECLARE_WRITE8_MEMBER(gfx1_cram_w); DECLARE_READ8_MEMBER(gfx1_vram_r); DECLARE_READ8_MEMBER(gfx1_cram_r); - DECLARE_READ8_MEMBER(read_a000); - DECLARE_WRITE8_MEMBER(write_a002); - DECLARE_WRITE8_MEMBER(write_a006); + uint8_t read_a000(); + void write_a002(uint8_t data); + void write_a006(uint8_t data); DECLARE_WRITE8_MEMBER(main_write_a008); DECLARE_WRITE8_MEMBER(sub_write_a008); DECLARE_READ8_MEMBER(prot_read_700x); - DECLARE_WRITE8_MEMBER(xscroll_w); - DECLARE_WRITE8_MEMBER(yscroll_w); + void xscroll_w(uint8_t data); + void yscroll_w(uint8_t data); protected: void common_map(address_map &map); @@ -129,7 +129,7 @@ private: void keirinou_main_map(address_map &map); void keirinou_sub_map(address_map &map); - DECLARE_WRITE8_MEMBER(write_keirinou_a002); + void write_keirinou_a002(uint8_t data); DECLARE_WRITE8_MEMBER(palette_w); TILE_GET_INFO_MEMBER(get_keirinou_gfx1_tile_info); diff --git a/src/mame/machine/advision.cpp b/src/mame/machine/advision.cpp index 9604b3ac7e8..be2f3f673ce 100644 --- a/src/mame/machine/advision.cpp +++ b/src/mame/machine/advision.cpp @@ -71,7 +71,7 @@ void advision_state::machine_reset() /* Bank Switching */ -WRITE8_MEMBER( advision_state::bankswitch_w ) +void advision_state::bankswitch_w(uint8_t data) { m_ea_bank = BIT(data, 2); m_rambank = (data & 0x03) << 8; @@ -83,7 +83,7 @@ WRITE8_MEMBER( advision_state::bankswitch_w ) /* External RAM */ -READ8_MEMBER( advision_state::ext_ram_r ) +uint8_t advision_state::ext_ram_r(offs_t offset) { uint8_t data = m_ext_ram[m_rambank + offset]; @@ -98,7 +98,7 @@ READ8_MEMBER( advision_state::ext_ram_r ) return data; } -WRITE8_MEMBER( advision_state::ext_ram_w ) +void advision_state::ext_ram_w(offs_t offset, uint8_t data) { m_ext_ram[m_rambank + offset] = data; } @@ -110,7 +110,7 @@ TIMER_CALLBACK_MEMBER( advision_state::sound_cmd_sync ) m_sound_cmd = param; } -READ8_MEMBER( advision_state::sound_cmd_r ) +uint8_t advision_state::sound_cmd_r() { return m_sound_cmd; } @@ -121,14 +121,14 @@ void advision_state::update_dac() m_dac->write(translate[(m_sound_g << 1) | m_sound_d]); } -WRITE8_MEMBER( advision_state::sound_g_w ) +void advision_state::sound_g_w(uint8_t data) { m_sound_g = data & 0x01; update_dac(); } -WRITE8_MEMBER( advision_state::sound_d_w ) +void advision_state::sound_d_w(uint8_t data) { m_sound_d = data & 0x01; @@ -137,7 +137,7 @@ WRITE8_MEMBER( advision_state::sound_d_w ) /* Video */ -WRITE8_MEMBER( advision_state::av_control_w ) +void advision_state::av_control_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(advision_state::sound_cmd_sync), this), data >> 4); @@ -174,7 +174,7 @@ READ_LINE_MEMBER( advision_state::vsync_r ) /* Input */ -READ8_MEMBER( advision_state::controller_r ) +uint8_t advision_state::controller_r() { // Get joystick switches uint8_t in = m_joy->read(); diff --git a/src/mame/machine/carpolo.cpp b/src/mame/machine/carpolo.cpp index e2159091cb6..fa646234294 100644 --- a/src/mame/machine/carpolo.cpp +++ b/src/mame/machine/carpolo.cpp @@ -57,7 +57,7 @@ #define CAR_BORDER_EXTRA_BITS 0x50 -WRITE8_MEMBER(carpolo_state::ttl74148_3s_cb) +void carpolo_state::ttl74148_3s_cb(uint8_t data) { m_maincpu->set_input_line(M6502_IRQ_LINE, m_ttl74148_3s->output_valid_r() ? CLEAR_LINE : ASSERT_LINE); } @@ -333,7 +333,7 @@ WRITE_LINE_MEMBER( carpolo_state::ls153_zb_w ) m_ls153_zb = state; } -WRITE8_MEMBER(carpolo_state::pia_0_port_a_w) +void carpolo_state::pia_0_port_a_w(uint8_t data) { /* bit 0 - Coin counter bit 1 - Player 4 crash sound @@ -354,7 +354,7 @@ WRITE8_MEMBER(carpolo_state::pia_0_port_a_w) } -WRITE8_MEMBER(carpolo_state::pia_0_port_b_w) +void carpolo_state::pia_0_port_b_w(uint8_t data) { /* bit 0 - Strobe speed bits sound bit 1 - Speed bit 0 sound @@ -367,7 +367,7 @@ WRITE8_MEMBER(carpolo_state::pia_0_port_b_w) m_ttl74153_1k->s1_w(BIT(data, 7)); } -READ8_MEMBER(carpolo_state::pia_0_port_b_r) +uint8_t carpolo_state::pia_0_port_b_r() { /* bit 4 - Pedal bit 0 bit 5 - Pedal bit 1 */ @@ -376,7 +376,7 @@ READ8_MEMBER(carpolo_state::pia_0_port_b_r) } -READ8_MEMBER(carpolo_state::pia_1_port_a_r) +uint8_t carpolo_state::pia_1_port_a_r() { uint8_t ret; @@ -399,7 +399,7 @@ READ8_MEMBER(carpolo_state::pia_1_port_a_r) } -READ8_MEMBER(carpolo_state::pia_1_port_b_r) +uint8_t carpolo_state::pia_1_port_b_r() { uint8_t ret; diff --git a/src/mame/machine/gamepock.cpp b/src/mame/machine/gamepock.cpp index af9967db0b2..66de6c28dcb 100644 --- a/src/mame/machine/gamepock.cpp +++ b/src/mame/machine/gamepock.cpp @@ -89,7 +89,7 @@ void gamepock_state::lcd_update() } -WRITE8_MEMBER( gamepock_state::port_a_w ) +void gamepock_state::port_a_w(uint8_t data) { uint8_t old_port_a = m_port_a; @@ -102,20 +102,20 @@ WRITE8_MEMBER( gamepock_state::port_a_w ) } -WRITE8_MEMBER( gamepock_state::port_b_w ) +void gamepock_state::port_b_w(uint8_t data) { m_port_b = data; } -READ8_MEMBER( gamepock_state::port_b_r ) +uint8_t gamepock_state::port_b_r() { logerror("gamepock_port_b_r: not implemented\n"); return 0xFF; } -READ8_MEMBER( gamepock_state::port_c_r ) +uint8_t gamepock_state::port_c_r() { uint8_t data = 0xFF; diff --git a/src/mame/machine/sorcerer.cpp b/src/mame/machine/sorcerer.cpp index df575373021..acf2dc8da91 100644 --- a/src/mame/machine/sorcerer.cpp +++ b/src/mame/machine/sorcerer.cpp @@ -290,25 +290,25 @@ WRITE_LINE_MEMBER( sorcerer_state::busreq_w ) m_dma->bai_w(state); // tell dma that bus has been granted } -READ8_MEMBER(sorcerer_state::memory_read_byte) +uint8_t sorcerer_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -WRITE8_MEMBER(sorcerer_state::memory_write_byte) +void sorcerer_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); prog_space.write_byte(offset, data); } -READ8_MEMBER(sorcerer_state::io_read_byte) +uint8_t sorcerer_state::io_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_IO); return prog_space.read_byte(offset); } -WRITE8_MEMBER(sorcerer_state::io_write_byte) +void sorcerer_state::io_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_IO); prog_space.write_byte(offset, data); diff --git a/src/mame/machine/vertigo.cpp b/src/mame/machine/vertigo.cpp index 887b2a52fab..cb864343a73 100644 --- a/src/mame/machine/vertigo.cpp +++ b/src/mame/machine/vertigo.cpp @@ -19,7 +19,7 @@ * *************************************/ -WRITE8_MEMBER(vertigo_state::update_irq) +void vertigo_state::update_irq(uint8_t data) { if (m_irq_state < 7) m_maincpu->set_input_line(m_irq_state ^ 7, CLEAR_LINE); From 7061c233f723bdcc3fe45e5a562b14eeab798f2f Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Thu, 14 May 2020 21:02:51 +0200 Subject: [PATCH 34/69] New working clones (#6697) * New working clones ------------------ Hot Blocks - Tetrix II (set 2) [jordigahan, ClawGrip] Hot Blocks - Tetrix II (set 3) [Victor Fernandez (City Game), ClawGrip] --- src/mame/drivers/hotblock.cpp | 119 +++++++++++++++++++++++----------- src/mame/mame.lst | 4 +- 2 files changed, 84 insertions(+), 39 deletions(-) diff --git a/src/mame/drivers/hotblock.cpp b/src/mame/drivers/hotblock.cpp index 56cab2e41fa..40f73692962 100644 --- a/src/mame/drivers/hotblock.cpp +++ b/src/mame/drivers/hotblock.cpp @@ -1,46 +1,61 @@ // license:BSD-3-Clause // copyright-holders:David Haywood /* + HotBlock board Tetris with naughty bits - |||||||||||||||| -+-------++++++++++++++++-------+ -| | -| YM2149 TESTSW | -| | -| 62256 62256 6116 6116 | -| | -| 24mhz TPC1020AFN 24c04a | -| | -| PAL | -| P8088-1 IC4 IC5 62256 62256 | -| | -+------------------------------+ + _________________________________________________________________ + | ___________ ___________ ___________ ___________ | + | |_74LS273N_| |MCM2018AN45 |SN74LS245N| |SN74LS245N| | + | ___________| + __| ___________ |SN74LS245N|| + |__ |_74LS273N_| ___________ ____ ___________ _______________| + |__ |MCM2018AN45 24C02 |_GAL16V8B_| |D43256AC-85L || + |__ ______ ________ |NEC___________|| + |__ 74HC32P 74LS132N _______________| + |__ __________ |D43256AC-85L || + |__ |_74F374N_| _____________ |NEC___________|| + |__ __________ |IC30 | ________________| + |__ TEST SW |_74F374N_| |ACTEL | |IC5 - ROM2 || + |__ ______ _______________ |A1020A | |_______________|| + |__ |IC17 | |D43256AC-85L | |PL84C 9244 | ________________| + |__ Microchip |NEC___________| | | |IC4 - ROM1 || + |__ AY38910A/P _______________ |____________| |_______________|| + |__ | | |D43256AC-85L | | + |__ | | |NEC___________| | + |__ | | __________ __________ __________| + |__ | | |74LS245N_| ______ |74LS373N_| |74LS245N_|| + |__ |_____| __________ XTAL __________ __________| + | |74LS245N_| 24.000 MHz |74LS373N_| |74LS373N_|| + | ______ __________ _________________ | + | TDA2003 |74LS74AN_| |NEC 070108C V20 | | + | |________________| | + |________________________________________________________________| + +IC30 can be also a TPC1020AFN-084 330ohm resistor packs for colours - -- -there are a variety of test modes which can be obtained -by resetting while holding down player 2 buttons +There are a variety of test modes which can be obtained +by resetting while holding down player 2 buttons. -most sources say this is a game by Nics but I believe Nics +Most sources say this is a game by Nics but I believe Nics to be a company from Korea, this game is quite clearly a Spanish game, we know for a fact that NIX are from Spain -so it could be by them instead +so it could be by them instead. For some reason the game isn't saving scores to the EEPROM. Settings and statistics are saved however. The option "AUTO SAVE SCORES" doesn't seem to be honored - the game writes the value to RAM but never reads it. - */ #include "emu.h" -#include "cpu/i86/i86.h" +#include "cpu/nec/nec.h" #include "machine/bankdev.h" #include "machine/i2cmem.h" #include "sound/ay8910.h" @@ -48,7 +63,6 @@ to be honored - the game writes the value to RAM but never reads it. #include "screen.h" #include "speaker.h" - class hotblock_state : public driver_device { public: @@ -64,16 +78,16 @@ public: void hotblock(machine_config &config); private: - /* devices */ + // Devices required_device m_maincpu; required_device m_palette; required_device m_video_bank; required_device m_i2cmem; - /* misc */ - int m_port0; + // Misc + int m_port0; - /* memory */ + // Memory required_shared_ptr m_vram; u8 eeprom_r(); @@ -116,18 +130,17 @@ void hotblock_state::hotblock_io(address_map &map) { map(0x0000, 0x0000).w(FUNC(hotblock_state::port0_w)); map(0x0004, 0x0004).rw(FUNC(hotblock_state::eeprom_r), FUNC(hotblock_state::eeprom_w)); - map(0x8000, 0x8001).w("aysnd", FUNC(ym2149_device::address_data_w)); - map(0x8001, 0x8001).r("aysnd", FUNC(ym2149_device::data_r)); + map(0x8000, 0x8001).w("aysnd", FUNC(ay8910_device::address_data_w)); + map(0x8001, 0x8001).r("aysnd", FUNC(ay8910_device::data_r)); } -/* right?, anything else?? */ +// Right?, Anything else? void hotblock_state::banked_video_map(address_map &map) { map(0x000000, 0x00ffff).mirror(0x9f0000).ram().share("vram"); // port 0 = 88 c8 map(0x200000, 0x2001ff).mirror(0x9f0000).ram().w(m_palette, FUNC(palette_device::write8)).share("palette"); // port 0 = a8 e8 -- palette } - void hotblock_state::video_start() { save_item(NAME(m_port0)); @@ -153,7 +166,6 @@ uint32_t hotblock_state::screen_update(screen_device &screen, bitmap_ind16 &bitm return 0; } - static INPUT_PORTS_START( hotblock ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -176,19 +188,18 @@ static INPUT_PORTS_START( hotblock ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // used to get test mode INPUT_PORTS_END - void hotblock_state::hotblock(machine_config &config) { - /* basic machine hardware */ - I8088(config, m_maincpu, 24_MHz_XTAL / 3); // Unknown clock + // Basic machine hardware + V20(config, m_maincpu, 24_MHz_XTAL / 3); // Unknown clock // Some boards may use an 8088 m_maincpu->set_addrmap(AS_PROGRAM, &hotblock_state::hotblock_map); m_maincpu->set_addrmap(AS_IO, &hotblock_state::hotblock_io); - I2C_24C04(config, "i2cmem", 0); // 24C04A + I2C_24C02(config, "i2cmem", 0); // 24C02B1 // Some boards may use a 24C04, but using just half its capacity ADDRESS_MAP_BANK(config, m_video_bank).set_map(&hotblock_state::banked_video_map).set_options(ENDIANNESS_LITTLE, 8, 24, 0x10000); - /* video hardware */ + // Video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(24_MHz_XTAL / 3, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal??? screen.set_screen_update(FUNC(hotblock_state::screen_update)); @@ -197,10 +208,10 @@ void hotblock_state::hotblock(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x200/2); - /* sound hardware */ + // Sound hardware SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 24_MHz_XTAL / 24)); + ay8910_device &aysnd(AY8910(config, "aysnd", 24_MHz_XTAL / 24)); // Some boards may use a YM2149 aysnd.port_a_read_callback().set_ioport("P1"); aysnd.port_b_read_callback().set_ioport("P2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); @@ -210,6 +221,38 @@ ROM_START( hotblock ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD( "hotblk5.ic4", 0x000000, 0x080000, CRC(5f90f776) SHA1(5ca74714a7d264b4fafaad07dc11e57308828d30) ) ROM_LOAD( "hotblk6.ic5", 0x080000, 0x080000, CRC(3176d231) SHA1(ac22fd0e9820c6714f51a3d8315eb5d43ef91eeb) ) + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8.ic10", 0x000, 0x117, NO_DUMP ) ROM_END -GAME( 1993, hotblock, 0, hotblock, hotblock, hotblock_state, empty_init, ROT0, "NIX?", "Hot Blocks - Tetrix II", MACHINE_SUPPORTS_SAVE ) +ROM_START( hotblocka ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD( "1.ic4", 0x000000, 0x080000, CRC(82b839d6) SHA1(9cd88f002d56491d39ca26abbf0873da43c5d127) ) + ROM_LOAD( "2.ic5", 0x080000, 0x080000, CRC(3176d231) SHA1(ac22fd0e9820c6714f51a3d8315eb5d43ef91eeb) ) + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8.ic10", 0x000, 0x117, NO_DUMP ) +ROM_END + +// PCB with different layout and four PLDs (one of them with its surface scratched out) instead of one PLD and a CPLD. +// This set doesn't auto clear the I2CMEM device and the high scores are invalid by default, so we load it from a ROM file. +// Does not support English on the test mode. +ROM_START( hotblockb ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD( "1.bin", 0x000000, 0x080000, CRC(1c22fad7) SHA1(9e9a32dfaa41e550920688ae1438105333566039) ) + ROM_LOAD( "2.bin", 0x080000, 0x080000, CRC(3176d231) SHA1(ac22fd0e9820c6714f51a3d8315eb5d43ef91eeb) ) + + ROM_REGION( 0x0100, "i2cmem", 0) + ROM_LOAD( "24c02b1.bin", 0x0000, 0x0100, CRC(d1c44081) SHA1(f592a04d7bd9f3a7812738505de04973ee79eb2f) ) + + ROM_REGION( 0x573, "plds", 0 ) + ROM_LOAD( "palce16v8.0", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "palce16v8.1", 0x117, 0x117, NO_DUMP ) + ROM_LOAD( "palce16v8.2", 0x345, 0x117, NO_DUMP ) + ROM_LOAD( "pld.3", 0x45c, 0x117, NO_DUMP ) // Type unknown, surface scratched out +ROM_END + +GAME( 1993, hotblock, 0, hotblock, hotblock, hotblock_state, empty_init, ROT0, "NIX?", "Hot Blocks - Tetrix II (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, hotblocka, hotblock, hotblock, hotblock, hotblock_state, empty_init, ROT0, "NIX?", "Hot Blocks - Tetrix II (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, hotblockb, hotblock, hotblock, hotblock, hotblock_state, empty_init, ROT0, "NIX?", "Hot Blocks - Tetrix II (set 3)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 5f3725b371c..006768e3db3 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16224,7 +16224,9 @@ terabrst // GX715 (c)1998 USA UEL 1998/07/17 terabrsta // GX715 (c)1998 Asia AAA 1998/02/25 @source:hotblock.cpp -hotblock // (c) 1993 Nics? / Nix? +hotblock // (c) 1993 Nics? / NIX? +hotblocka // (c) 1993 Nics? / NIX? +hotblockb // (c) 1993 Nics? / NIX? @source:hotstuff.cpp hotstuff // From f3b419b406f45d5776bf2ce46880972c1e26378f Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 15:10:52 -0400 Subject: [PATCH 35/69] eurit30: Underclock to keep accurate time (nw) --- src/mame/drivers/eurit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index 71b9164d16d..0f4ebc4debe 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -43,7 +43,7 @@ HD44780_PIXEL_UPDATE(eurit_state::lcd_pixel_update) void eurit_state::mem_map(address_map &map) { - map(0x000480, 0x007fff).ram(); + map(0x000480, 0x007fff).ram(); // probably NVRAM (0x000480 counts seconds for software RTC) map(0x008000, 0x00ffff).rom().region("firmware", 0x8000); map(0x040000, 0x05ffff).rom().region("firmware", 0); map(0x0c0000, 0x0c0007).rw("dsc", FUNC(am79c30a_device::read), FUNC(am79c30a_device::write)); @@ -61,7 +61,7 @@ void eurit_state::palette_init(palette_device &palette) void eurit_state::eurit30(machine_config &config) { - M37730S2(config, m_maincpu, 8'000'000); // type and clock unknown + M37730S2(config, m_maincpu, 4'096'000); m_maincpu->set_addrmap(AS_PROGRAM, &eurit_state::mem_map); m_maincpu->p4_out_cb().set("lcdc", FUNC(hd44780_device::db_w)); m_maincpu->p6_out_cb().set("lcdc", FUNC(hd44780_device::e_w)).bit(6); From bfaafd7bbc7f13f2d00a3a8a7213d170afc5a36d Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 14 May 2020 21:29:19 +0200 Subject: [PATCH 36/69] Machines promoted to working ---------------------------- Tetris + Cherry Master (Corsica, v8.01, set 2) [Ioannis Bampoulas] --- src/mame/drivers/goldstar.cpp | 40 ++++++----------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp index 50a9ffe1de9..19c29292fbd 100644 --- a/src/mame/drivers/goldstar.cpp +++ b/src/mame/drivers/goldstar.cpp @@ -16773,31 +16773,6 @@ ROM_END ROM_START( cmtetrsa ) ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "cm89-tetri-9.u81", 0x10000, 0x10000, CRC(75e0c101) SHA1(6dc4f7c43f0f4e21d621f3c42cb1709d6b730c53) ) -/* - Need checks and fixes - - 3800+ --> 5800+ - 9800+ --> 3800+ - -*/ -// ROM_COPY( "maincpu", 0x1c000, 0x0000, 0x1000 ) /* src-dest-size ok */ -// ROM_COPY( "maincpu", 0x16000, 0x1000, 0x1000 ) /* src-dest-size ok */ -// ROM_COPY( "maincpu", 0x14000, 0x2000, 0x1000 ) /* src-dest-size ok */ -// ROM_COPY( "maincpu", 0x1a000, 0x3000, 0x1000 ) /* src-dest-size ok (some calls to high 5xxx appear here, maybe split in 0x800?) */ -// ROM_COPY( "maincpu", 0x15000, 0x4000, 0x1000 ) /* src-dest-size ok */ -// ROM_COPY( "maincpu", 0x11000, 0x6000, 0x1000 ) /* src-dest-size ok */ -// ROM_COPY( "maincpu", 0x13000, 0x8000, 0x1000 ) /* src-dest-size ok */ - -// ROM_COPY( "maincpu", 0x17000, 0x5000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x10000, 0x7000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x18000, 0x9000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x19000, 0xa000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x12000, 0xb000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x1b000, 0xc000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x1d000, 0xd000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x1e000, 0xe000, 0x1000 ) /* src-dest-size */ -// ROM_COPY( "maincpu", 0x1f000, 0xf000, 0x1000 ) /* src-dest-size */ - ROM_COPY( "maincpu", 0x1c000, 0x0000, 0x0800 ) /* src-dest-size */ // #01 ROM_COPY( "maincpu", 0x19800, 0x0800, 0x0800 ) /* src-dest-size */ // #02 ROM_COPY( "maincpu", 0x16000, 0x1000, 0x0800 ) /* src-dest-size */ // #03 @@ -16807,14 +16782,14 @@ ROM_START( cmtetrsa ) ROM_COPY( "maincpu", 0x1a000, 0x3000, 0x0800 ) /* src-dest-size */ // #07 ROM_COPY( "maincpu", 0x18800, 0x3800, 0x0800 ) /* src-dest-size */ // #08 ROM_COPY( "maincpu", 0x10000, 0x4000, 0x0800 ) /* src-dest-size */ // #09 - ROM_COPY( "maincpu", 0x15000, 0x4800, 0x0800 ) /* src-dest-size */ // #10 - ROM_COPY( "maincpu", 0x14800, 0x5000, 0x0800 ) /* src-dest-size */ // #11 + ROM_COPY( "maincpu", 0x15800, 0x4800, 0x0800 ) /* src-dest-size */ // #10 + ROM_COPY( "maincpu", 0x13000, 0x5000, 0x0800 ) /* src-dest-size */ // #11 ROM_COPY( "maincpu", 0x1a800, 0x5800, 0x0800 ) /* src-dest-size */ // #12 ROM_COPY( "maincpu", 0x11000, 0x6000, 0x0800 ) /* src-dest-size */ // #13 ROM_COPY( "maincpu", 0x11800, 0x6800, 0x0800 ) /* src-dest-size */ // #14 ROM_COPY( "maincpu", 0x1b000, 0x7000, 0x0800 ) /* src-dest-size */ // #15 - ROM_COPY( "maincpu", 0x1f000, 0x7800, 0x0800 ) /* src-dest-size */ // #16 - ROM_COPY( "maincpu", 0x1f800, 0x8000, 0x0800 ) /* src-dest-size */ // #17 + ROM_COPY( "maincpu", 0x16800, 0x7800, 0x0800 ) /* src-dest-size */ // #16 + ROM_COPY( "maincpu", 0x17000, 0x8000, 0x0800 ) /* src-dest-size */ // #17 ROM_COPY( "maincpu", 0x13800, 0x8800, 0x0800 ) /* src-dest-size */ // #18 ROM_COPY( "maincpu", 0x19000, 0x9000, 0x0800 ) /* src-dest-size */ // #19 ROM_COPY( "maincpu", 0x1b800, 0x9800, 0x0800 ) /* src-dest-size */ // #20 @@ -16822,7 +16797,8 @@ ROM_START( cmtetrsa ) ROM_COPY( "maincpu", 0x10800, 0xa800, 0x0800 ) /* src-dest-size */ // #22 ROM_COPY( "maincpu", 0x18000, 0xb000, 0x0800 ) /* src-dest-size */ // #23 ROM_COPY( "maincpu", 0x12800, 0xb800, 0x0800 ) /* src-dest-size */ // #24 - ROM_COPY( "maincpu", 0x13000, 0xc000, 0x0800 ) /* src-dest-size */ // #25 + ROM_COPY( "maincpu", 0x15000, 0xc000, 0x0800 ) /* src-dest-size */ // #25 + ROM_COPY( "maincpu", 0x14800, 0xc800, 0x0800 ) /* src-dest-size */ // #26 ROM_REGION( 0x18000, "gfx1", 0 ) ROM_LOAD( "cm89-tetri-7.u16", 0x00000, 0x8000, CRC(2f5c94bd) SHA1(d99bcaa788f8abf5c75b29572d53be109b20c4bb) ) @@ -16838,7 +16814,6 @@ ROM_START( cmtetrsa ) ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "cm89-tetri-8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) - /* proms taken from cmv4, probably wrong */ ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "82s129.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) ROM_LOAD( "82s129.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) @@ -16847,7 +16822,6 @@ ROM_START( cmtetrsa ) ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) ROM_END - /* Tetris + Cherry Master (+K, Canada Version, encrypted) stealth game... @@ -19327,7 +19301,7 @@ GAME( 200?, ss2001, 0, ss2001, cmaster, cmaster_state, empty_init GAMEL( 198?, cmpacman, 0, cm, cmpacman, cmaster_state, init_cm, ROT0, "", "Super Pacman (v1.2) + Cherry Master (Corsica, v8.31, set 1)", 0, layout_cmpacman ) // need to press K to switch between games... GAMEL( 198?, cmpacmana, cmpacman, cm, cmpacman, cmaster_state, init_cm, ROT0, "", "Super Pacman (v1.2) + Cherry Master (Corsica, v8.31, set 2)", 0, layout_cmpacman ) // need to press K to switch between games... GAMEL( 198?, cmtetris, 0, cm, cmtetris, cmaster_state, init_cm, ROT0, "", "Tetris + Cherry Master (Corsica, v8.01, set 1)", 0, layout_cmpacman ) // need to press K/L to switch between games... -GAMEL( 198?, cmtetrsa, 0, cm, cmtetris, cmaster_state, init_cm, ROT0, "", "Tetris + Cherry Master (Corsica, v8.01, set 2)", MACHINE_NOT_WORKING, layout_cmpacman ) // seems banked... +GAMEL( 198?, cmtetrsa, 0, cm, cmtetris, cmaster_state, init_cm, ROT0, "", "Tetris + Cherry Master (Corsica, v8.01, set 2)", 0, layout_cmpacman ) GAMEL( 198?, cmtetrsb, 0, cm, cmtetris, cmaster_state, init_cm, ROT0, "", "Tetris + Cherry Master (+K, Canada Version, encrypted)", MACHINE_NOT_WORKING, layout_cmpacman ) // different Tetris game. press insert to throttle and see the attract running. GAMEL( 1997, crazybon, 0, crazybon, crazybon, goldstar_state, empty_init, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002 (Ver. 1, set 1)", MACHINE_IMPERFECT_COLORS, layout_crazybon ) // Windows ME desktop... but not found the way to switch it. GAMEL( 1997, crazybona, crazybon, crazybon, crazybon, goldstar_state, empty_init, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002 (Ver. 1, set 2)", MACHINE_IMPERFECT_COLORS, layout_crazybon ) From 5b09aec8b8eb88a0b52c08ca7b194461d3a5e6f8 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 15:51:14 -0400 Subject: [PATCH 37/69] hd44780: Allow function set register to be updated again right after changing the data length eurit30: Eliminate busy timing hack (nw) --- src/devices/video/hd44780.cpp | 1 + src/mame/drivers/eurit.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index 46291961f7b..a55569d4e3e 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -479,6 +479,7 @@ void hd44780_device::control_write(u8 data) logerror("HD44780: function set cannot be executed after other instructions unless the interface data length is changed\n"); return; } + m_first_cmd = true; m_char_size = BIT(m_ir, 2) ? 10 : 8; m_data_len = BIT(m_ir, 4) ? 8 : 4; diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index 0f4ebc4debe..d7a7e35b69a 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -63,9 +63,10 @@ void eurit_state::eurit30(machine_config &config) { M37730S2(config, m_maincpu, 4'096'000); m_maincpu->set_addrmap(AS_PROGRAM, &eurit_state::mem_map); + m_maincpu->p4_in_cb().set("lcdc", FUNC(hd44780_device::db_r)); // not actually used for input? m_maincpu->p4_out_cb().set("lcdc", FUNC(hd44780_device::db_w)); m_maincpu->p6_out_cb().set("lcdc", FUNC(hd44780_device::e_w)).bit(6); - m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rw_w)).bit(5); + m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rw_w)).bit(5); // not actually used for read mode? m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rs_w)).bit(4); am79c30a_device &dsc(AM79C30A(config, "dsc", 12'288'000)); @@ -84,7 +85,6 @@ void eurit_state::eurit30(machine_config &config) hd44780_device &lcdc(HD44780(config, "lcdc", 0)); lcdc.set_lcd_size(2, 20); lcdc.set_pixel_update_cb(FUNC(eurit_state::lcd_pixel_update)); - lcdc.set_busy_factor(0.01); } From 4b654dc9c04a27590923dabe242a6a21aa5f8e8c Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 18:07:30 -0400 Subject: [PATCH 38/69] eurit30: Add preliminary inputs --- src/mame/drivers/eurit.cpp | 85 +++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index d7a7e35b69a..f96f0bfb38e 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -19,21 +19,37 @@ public: eurit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_keys(*this, "KEY%c", 'A') + , m_key_scan(0x1f) { } void eurit30(machine_config &mconfig); +protected: + virtual void machine_start() override; + private: HD44780_PIXEL_UPDATE(lcd_pixel_update); + void key_scan_w(u8 data); + u8 key_matrix_r(); + void mem_map(address_map &map); void palette_init(palette_device &palette); required_device m_maincpu; + required_ioport_array<5> m_keys; + + u8 m_key_scan; }; +void eurit_state::machine_start() +{ + save_item(NAME(m_key_scan)); +} + HD44780_PIXEL_UPDATE(eurit_state::lcd_pixel_update) { if (x < 5 && y < 8 && line < 2 && pos < 20) @@ -41,6 +57,22 @@ HD44780_PIXEL_UPDATE(eurit_state::lcd_pixel_update) } +void eurit_state::key_scan_w(u8 data) +{ + m_key_scan = data >> 3; +} + +u8 eurit_state::key_matrix_r() +{ + u8 ret = 0xff; + for (int i = 0; i < 5; i++) + if (!BIT(m_key_scan, i)) + ret &= m_keys[i]->read(); + + return ret; +} + + void eurit_state::mem_map(address_map &map) { map(0x000480, 0x007fff).ram(); // probably NVRAM (0x000480 counts seconds for software RTC) @@ -51,6 +83,55 @@ void eurit_state::mem_map(address_map &map) static INPUT_PORTS_START(eurit30) + PORT_START("KEYA") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key A0") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key A1") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("#") PORT_CODE(KEYCODE_EQUALS) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("0 0...9") PORT_CODE(KEYCODE_0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("*") PORT_CODE(KEYCODE_MINUS) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ESC") PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("R") PORT_CODE(KEYCODE_R) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key A7") // phone off hook? + + PORT_START("KEYB") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z2") PORT_CODE(KEYCODE_X) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Menu") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9 YZ") PORT_CODE(KEYCODE_9) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("8 VWX") PORT_CODE(KEYCODE_8) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("7 STU") PORT_CODE(KEYCODE_7) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key B5") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("L") PORT_CODE(KEYCODE_L) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MIC") PORT_CODE(KEYCODE_M) + + PORT_START("KEYC") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z6") PORT_CODE(KEYCODE_N) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z3") PORT_CODE(KEYCODE_C) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6 PQR") PORT_CODE(KEYCODE_6) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5 MNO") PORT_CODE(KEYCODE_5) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4 JKL") PORT_CODE(KEYCODE_4) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key C5") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key C6") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key C7") + + PORT_START("KEYD") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z4") PORT_CODE(KEYCODE_V) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z5") PORT_CODE(KEYCODE_B) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3 GHI") PORT_CODE(KEYCODE_3) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2 DEF") PORT_CODE(KEYCODE_2) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1 ABC") PORT_CODE(KEYCODE_1) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key D5") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key D6") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key D7") + + PORT_START("KEYE") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key E0") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Left") PORT_CODE(KEYCODE_S) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key E2") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Right") PORT_CODE(KEYCODE_F) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Right") PORT_CODE(KEYCODE_G) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Center") PORT_CODE(KEYCODE_D) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Left") PORT_CODE(KEYCODE_A) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z1") PORT_CODE(KEYCODE_Z) INPUT_PORTS_END void eurit_state::palette_init(palette_device &palette) @@ -65,6 +146,8 @@ void eurit_state::eurit30(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &eurit_state::mem_map); m_maincpu->p4_in_cb().set("lcdc", FUNC(hd44780_device::db_r)); // not actually used for input? m_maincpu->p4_out_cb().set("lcdc", FUNC(hd44780_device::db_w)); + m_maincpu->p4_out_cb().append(FUNC(eurit_state::key_scan_w)); + m_maincpu->p5_in_cb().set(FUNC(eurit_state::key_matrix_r)); m_maincpu->p6_out_cb().set("lcdc", FUNC(hd44780_device::e_w)).bit(6); m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rw_w)).bit(5); // not actually used for read mode? m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rs_w)).bit(4); @@ -94,4 +177,4 @@ ROM_START(eurit30) ROM_END -SYST(1996, eurit30, 0, 0, eurit30, eurit30, eurit_state, empty_init, "Ascom", "Eurit 30", MACHINE_IS_SKELETON) +SYST(1996, eurit30, 0, 0, eurit30, eurit30, eurit_state, empty_init, "Ascom", "Eurit 30", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND) From bd22bb5f40051c239d6fb2b9fc6e2aafde5d0868 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Mon, 11 May 2020 16:42:16 -0700 Subject: [PATCH 39/69] sgi_mips: new software list additions --- hash/sgi_mips.xml | 227 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 204 insertions(+), 23 deletions(-) diff --git a/hash/sgi_mips.xml b/hash/sgi_mips.xml index 98a7dd1a765..826c506d7ee 100644 --- a/hash/sgi_mips.xml +++ b/hash/sgi_mips.xml @@ -7,6 +7,18 @@ license:CC0 + + Alias|Wavefront Advanced Visualizer 4.2 + 199? + Alias|Wavefront + + + + + + + + Barco Creator 7.2 1999 @@ -169,6 +181,18 @@ license:CC0 + + Discreet Effect 6.1.3 + 2000 + Discreet + + + + + + + + ENlightenDSM 1.1 for UNIX and NT 1998 @@ -222,6 +246,31 @@ license:CC0 + + Discreet Flame 4.0.2 + 1996 + Discreet Logic + + + + + + + + + + + Discreet Flame 7.6 + 2002 + Discreet Logic + + + + + + + + Freeware 2.0 - Unsupported Software compatible with IRIX 6.2 and later 1996 @@ -392,6 +441,18 @@ license:CC0 + + Alias|Wavefront Maya Composer 5.5 + 1999 + Alias|Wavefront + + + + + + + + MineSet 2.0.1 for IRIX 6.2 and later 1998 @@ -592,7 +653,7 @@ license:CC0 O2 Out of Box Experience 2.4 for IRIX 6.5 and later 2000 - Silicon Graphics + SGI @@ -757,6 +818,48 @@ license:CC0 + + Alias|Wavefront PowerAnimator 7.51 + 1996 + Alias|Wavefront + + + + + + + + + + Alias|Wavefront PowerAnimator 8.2 + 1997 + Alias|Wavefront + + + + + + + + + + + + + + + + PRISMS 6.4 + 1997 + Side Effects Software + + + + + + + + Samba 2.0.0 for IRIX for IRIX 6.5 and later 1998 @@ -773,7 +876,7 @@ license:CC0 Silicon Graphics General and Platform Demos 6.5.12 2001 - Silicon Graphics + SGI @@ -848,7 +951,7 @@ license:CC0 Silicon Graphics MultiLink Adapter Documentation 2000 - Silicon Graphics + SGI @@ -2580,7 +2683,7 @@ license:CC0 IRIX 6.5.7 2000 - Silicon Graphics + SGI @@ -2634,7 +2737,7 @@ license:CC0 IRIX 6.5.8 2000 - Silicon Graphics + SGI @@ -2688,7 +2791,7 @@ license:CC0 IRIX 6.5.9 2000 - Silicon Graphics + SGI @@ -2750,7 +2853,7 @@ license:CC0 IRIX 6.5.10 2000 - Silicon Graphics + SGI @@ -2780,7 +2883,7 @@ license:CC0 IRIX 6.5.11 2001 - Silicon Graphics + SGI @@ -2810,7 +2913,7 @@ license:CC0 IRIX 6.5.12 2001 - Silicon Graphics + SGI @@ -2848,7 +2951,7 @@ license:CC0 IRIX 6.5.13 2001 - Silicon Graphics + SGI @@ -2886,7 +2989,7 @@ license:CC0 IRIX 6.5.14 2001 - Silicon Graphics + SGI @@ -2916,7 +3019,7 @@ license:CC0 IRIX 6.5.15 2002 - Silicon Graphics + SGI @@ -2962,7 +3065,7 @@ license:CC0 IRIX 6.5.16 2002 - Silicon Graphics + SGI @@ -3000,7 +3103,7 @@ license:CC0 IRIX 6.5.17 2002 - Silicon Graphics + SGI @@ -3038,7 +3141,7 @@ license:CC0 IRIX 6.5.18 2002 - Silicon Graphics + SGI @@ -3089,10 +3192,88 @@ license:CC0 + + IRIX 6.5.19 + 2003 + SGI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IRIX 6.5.21 2003 - Silicon Graphics + SGI @@ -3130,7 +3311,7 @@ license:CC0 IRIX 6.5.22 2003 - Silicon Graphics + SGI @@ -3168,7 +3349,7 @@ license:CC0 IRIX 6.5.23 2004 - Silicon Graphics + SGI @@ -3198,7 +3379,7 @@ license:CC0 IRIX 6.5.26 2004 - Silicon Graphics + SGI @@ -3244,7 +3425,7 @@ license:CC0 IRIX 6.5.27 2005 - Silicon Graphics + SGI @@ -3274,7 +3455,7 @@ license:CC0 IRIX 6.5.28 2005 - Silicon Graphics + SGI @@ -3304,7 +3485,7 @@ license:CC0 IRIX 6.5.29 2006 - Silicon Graphics + SGI @@ -3358,7 +3539,7 @@ license:CC0 IRIX 6.5.30 2006 - Silicon Graphics + SGI From a4fb8f437657ac166cda537afcbc86cbefb5835a Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 22:02:59 -0400 Subject: [PATCH 40/69] m37710: Rename some registers to agree with Mitsubishi documentation --- src/devices/cpu/m37710/m37710.cpp | 110 +++++++++--------- src/devices/cpu/m37710/m37710.h | 31 +++-- src/devices/cpu/m37710/m37710cm.h | 6 +- src/devices/cpu/m37710/m37710il.h | 26 ++--- src/devices/cpu/m37710/m37710op.h | 174 ++++++++++++++--------------- src/devices/cpu/m37710/m7700ds.cpp | 16 +-- 6 files changed, 180 insertions(+), 183 deletions(-) diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp index fba67830b1b..5b199497ddd 100644 --- a/src/devices/cpu/m37710/m37710.cpp +++ b/src/devices/cpu/m37710/m37710.cpp @@ -644,14 +644,14 @@ uint16_t m37710_cpu_device::ad_result_r(offs_t offset) { uint16_t result = m_ad_result[offset]; - LOGMASKED(LOG_AD, "ad_result_r from %02x: A/D %d = %x (PC=%x)\n", (int)(offset * 2) + 0x20, offset, result, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_AD, "ad_result_r from %02x: A/D %d = %x (PC=%x)\n", (int)(offset * 2) + 0x20, offset, result, REG_PG | REG_PC); return result; } uint8_t m37710_cpu_device::uart0_mode_r() { - LOGMASKED(LOG_UART, "uart0_mode_r: UART0 transmit/recv mode = %x (PC=%x)\n", m_uart_mode[0], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart0_mode_r: UART0 transmit/recv mode = %x (PC=%x)\n", m_uart_mode[0], REG_PG | REG_PC); return m_uart_mode[0]; } @@ -665,7 +665,7 @@ void m37710_cpu_device::uart0_mode_w(uint8_t data) uint8_t m37710_cpu_device::uart1_mode_r() { - LOGMASKED(LOG_UART, "uart1_mode_r: UART1 transmit/recv mode = %x (PC=%x)\n", m_uart_mode[1], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart1_mode_r: UART1 transmit/recv mode = %x (PC=%x)\n", m_uart_mode[1], REG_PG | REG_PC); return m_uart_mode[1]; } @@ -703,7 +703,7 @@ void m37710_cpu_device::uart1_tbuf_w(uint16_t data) uint8_t m37710_cpu_device::uart0_ctrl_reg0_r() { - LOGMASKED(LOG_UART, "uart0_ctrl_reg0_r: UART0 transmit/recv ctrl 0 = %x (PC=%x)\n", m_uart_ctrl_reg0[0], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart0_ctrl_reg0_r: UART0 transmit/recv ctrl 0 = %x (PC=%x)\n", m_uart_ctrl_reg0[0], REG_PG | REG_PC); return m_uart_ctrl_reg0[0]; } @@ -718,7 +718,7 @@ void m37710_cpu_device::uart0_ctrl_reg0_w(uint8_t data) uint8_t m37710_cpu_device::uart1_ctrl_reg0_r() { - LOGMASKED(LOG_UART, "uart1_ctrl_reg0_r: UART1 transmit/recv ctrl 0 = %x (PC=%x)\n", m_uart_ctrl_reg0[1], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart1_ctrl_reg0_r: UART1 transmit/recv ctrl 0 = %x (PC=%x)\n", m_uart_ctrl_reg0[1], REG_PG | REG_PC); return m_uart_ctrl_reg0[1]; } @@ -733,7 +733,7 @@ void m37710_cpu_device::uart1_ctrl_reg0_w(uint8_t data) uint8_t m37710_cpu_device::uart0_ctrl_reg1_r() { - LOGMASKED(LOG_UART, "uart0_ctrl_reg1_r: UART0 transmit/recv ctrl 1 = %x (PC=%x)\n", m_uart_ctrl_reg1[0], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart0_ctrl_reg1_r: UART0 transmit/recv ctrl 1 = %x (PC=%x)\n", m_uart_ctrl_reg1[0], REG_PG | REG_PC); return m_uart_ctrl_reg1[0]; } @@ -747,7 +747,7 @@ void m37710_cpu_device::uart0_ctrl_reg1_w(uint8_t data) uint8_t m37710_cpu_device::uart1_ctrl_reg1_r() { - LOGMASKED(LOG_UART, "uart1_ctrl_reg1_r: UART1 transmit/recv ctrl 1 = %x (PC=%x)\n", m_uart_ctrl_reg1[1], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart1_ctrl_reg1_r: UART1 transmit/recv ctrl 1 = %x (PC=%x)\n", m_uart_ctrl_reg1[1], REG_PG | REG_PC); return m_uart_ctrl_reg1[1]; } @@ -761,21 +761,21 @@ void m37710_cpu_device::uart1_ctrl_reg1_w(uint8_t data) uint16_t m37710_cpu_device::uart0_rbuf_r() { - LOGMASKED(LOG_UART, "uart0_rbuf_r: UART0 recv buf (PC=%x)\n", REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart0_rbuf_r: UART0 recv buf (PC=%x)\n", REG_PG | REG_PC); return 0; } uint16_t m37710_cpu_device::uart1_rbuf_r() { - LOGMASKED(LOG_UART, "uart1_rbuf_r: UART1 recv buf (PC=%x)\n", REG_PB<<16 | REG_PC); + LOGMASKED(LOG_UART, "uart1_rbuf_r: UART1 recv buf (PC=%x)\n", REG_PG | REG_PC); return 0; } uint8_t m37710_cpu_device::count_start_r() { - LOGMASKED(LOG_TIMER, "count_start_r: Count start = %x (PC=%x)\n", m_count_start, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_TIMER, "count_start_r: Count start = %x (PC=%x)\n", m_count_start, REG_PG | REG_PC); return m_count_start; } @@ -801,7 +801,7 @@ void m37710_cpu_device::one_shot_start_w(uint8_t data) uint8_t m37710_cpu_device::up_down_r() { - LOGMASKED(LOG_TIMER, "up_down_r: Up-down register = %x (PC=%x)\n", m_up_down_reg, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_TIMER, "up_down_r: Up-down register = %x (PC=%x)\n", m_up_down_reg, REG_PG | REG_PC); // bits 7-5 read back as 0 return m_up_down_reg & 0x1f; @@ -828,7 +828,7 @@ void m37710_cpu_device::timer_reg_w(offs_t offset, uint16_t data, uint16_t mem_m uint8_t m37710_cpu_device::timer_mode_r(offs_t offset) { - LOGMASKED(LOG_TIMER, "timer_mode_r from %02x: Timer %s mode = %x (PC=%x)\n", (int)offset + 0x56, m37710_tnames[offset], m_timer_mode[offset], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_TIMER, "timer_mode_r from %02x: Timer %s mode = %x (PC=%x)\n", (int)offset + 0x56, m37710_tnames[offset], m_timer_mode[offset], REG_PG | REG_PC); return m_timer_mode[offset]; } @@ -842,7 +842,7 @@ void m37710_cpu_device::timer_mode_w(offs_t offset, uint8_t data) uint8_t m37710_cpu_device::proc_mode_r(offs_t offset) { - LOGMASKED(LOG_GENERAL, "proc_mode_r: Processor mode = %x (PC=%x)\n", m_proc_mode, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_GENERAL, "proc_mode_r: Processor mode = %x (PC=%x)\n", m_proc_mode, REG_PG | REG_PC); return m_proc_mode & 0xf7; } @@ -873,7 +873,7 @@ void m37710_cpu_device::watchdog_freq_w(uint8_t data) uint8_t m37710_cpu_device::waveform_mode_r() { - LOGMASKED(LOG_GENERAL, "waveform_mode_r: Waveform output mode (PC=%x)\n", REG_PB<<16 | REG_PC); + LOGMASKED(LOG_GENERAL, "waveform_mode_r: Waveform output mode (PC=%x)\n", REG_PG | REG_PC); return 0; } @@ -885,7 +885,7 @@ void m37710_cpu_device::waveform_mode_w(uint8_t data) uint8_t m37710_cpu_device::rto_control_r() { - LOGMASKED(LOG_GENERAL, "rto_control_r: Real-time output control = %x (PC=%x)\n", m_rto_control, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_GENERAL, "rto_control_r: Real-time output control = %x (PC=%x)\n", m_rto_control, REG_PG | REG_PC); return m_rto_control; } @@ -899,7 +899,7 @@ void m37710_cpu_device::rto_control_w(uint8_t data) uint8_t m37710_cpu_device::dram_control_r() { - LOGMASKED(LOG_GENERAL, "dram_control_r: DRAM control = %x (PC=%x)\n", m_dram_control, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_GENERAL, "dram_control_r: DRAM control = %x (PC=%x)\n", m_dram_control, REG_PG | REG_PC); return m_dram_control; } @@ -932,7 +932,7 @@ uint8_t m37710_cpu_device::get_int_control(int level) { assert(level < M37710_MASKABLE_INTERRUPTS); - //LOGMASKED(LOG_INT, "int_control_r: %s IRQ ctrl = %x (PC=%x)\n", m37710_intnames[level], m_int_control[level], REG_PB<<16 | REG_PC); + //LOGMASKED(LOG_INT, "int_control_r: %s IRQ ctrl = %x (PC=%x)\n", m37710_intnames[level], m_int_control[level], REG_PG | REG_PC); uint8_t result = m_int_control[level]; @@ -1025,7 +1025,7 @@ void m37710_cpu_device::m37710i_update_irqs() if (!FLAG_I && thispri > curpri && thispri > m_ipl) { // mark us as the best candidate - LOGMASKED(LOG_INT, "%s interrupt active with priority %d (PC=%x)\n", m37710_intnames[curirq], thispri, REG_PB<<16 | REG_PC); + LOGMASKED(LOG_INT, "%s interrupt active with priority %d (PC=%x)\n", m37710_intnames[curirq], thispri, REG_PG | REG_PC); wantedIRQ = curirq; curpri = thispri; } @@ -1033,7 +1033,7 @@ void m37710_cpu_device::m37710i_update_irqs() else { // non-maskable - LOGMASKED(LOG_INT, "%s interrupt active (PC=%x)\n", m37710_intnames[curirq], REG_PB<<16 | REG_PC); + LOGMASKED(LOG_INT, "%s interrupt active (PC=%x)\n", m37710_intnames[curirq], REG_PG | REG_PC); wantedIRQ = curirq; curpri = 7; break; // no more processing, NMIs always win @@ -1054,16 +1054,16 @@ void m37710_cpu_device::m37710i_update_irqs() // let's do it... // push PB, then PC, then status CLK(13); - m37710i_push_8(REG_PB>>16); + m37710i_push_8(REG_PG>>16); m37710i_push_16(REG_PC); m37710i_push_8(m_ipl); - m37710i_push_8(m37710i_get_reg_p()); + m37710i_push_8(m37710i_get_reg_ps()); // set I to 1, set IPL to the interrupt we're taking FLAG_I = IFLAG_SET; m_ipl = curpri; - // then PB=0, PC=(vector) - REG_PB = 0; + // then PG=0, PC=(vector) + REG_PG = 0; REG_PC = m37710_read_16(m37710_irq_vectors[wantedIRQ]); } } @@ -1131,9 +1131,9 @@ void m37710_cpu_device::device_reset() IRQ_DELAY = 0; /* 37710 boots in full native mode */ - REG_D = 0; - REG_PB = 0; - REG_DB = 0; + REG_DPR = 0; + REG_PG = 0; + REG_DT = 0; REG_S = (REG_S & 0xff) | 0x100; REG_XH = REG_X & 0xff00; REG_X &= 0xff; REG_YH = REG_Y & 0xff00; REG_Y &= 0xff; @@ -1268,9 +1268,9 @@ void m37710_cpu_device::device_start() m_s = 0; m_pc = 0; m_ppc = 0; - m_pb = 0; - m_db = 0; - m_d = 0; + m_pg = 0; + m_dt = 0; + m_dpr = 0; m_flag_e = 0; m_flag_m = 0; m_flag_x = 0; @@ -1339,9 +1339,9 @@ void m37710_cpu_device::device_start() save_item(NAME(m_s)); save_item(NAME(m_pc)); save_item(NAME(m_ppc)); - save_item(NAME(m_pb)); - save_item(NAME(m_db)); - save_item(NAME(m_d)); + save_item(NAME(m_pg)); + save_item(NAME(m_dt)); + save_item(NAME(m_dpr)); save_item(NAME(m_flag_e)); save_item(NAME(m_flag_m)); save_item(NAME(m_flag_x)); @@ -1390,11 +1390,11 @@ void m37710_cpu_device::device_start() machine().save().register_postload(save_prepost_delegate(save_prepost_delegate(FUNC(m37710_cpu_device::m37710_restore_state), this))); state_add( M37710_PC, "PC", m_pc).formatstr("%04X"); - state_add( M37710_PB, "PB", m_debugger_pb).callimport().callexport().formatstr("%02X"); - state_add( M37710_DB, "DB", m_debugger_db).callimport().callexport().formatstr("%02X"); - state_add( M37710_D, "D", m_d).formatstr("%04X"); + state_add( M37710_PG, "PG", m_debugger_pg).callimport().callexport().formatstr("%02X"); + state_add( M37710_DT, "DT", m_debugger_dt).callimport().callexport().formatstr("%02X"); + state_add( M37710_DPR, "DPR", m_dpr).formatstr("%04X"); state_add( M37710_S, "S", m_s).formatstr("%04X"); - state_add( M37710_P, "P", m_debugger_p).callimport().callexport().formatstr("%04X"); + state_add( M37710_PS, "PS", m_debugger_ps).callimport().callexport().formatstr("%04X"); state_add( M37710_E, "E", m_flag_e).formatstr("%01X"); state_add( M37710_A, "A", m_debugger_a).callimport().callexport().formatstr("%04X"); state_add( M37710_B, "B", m_debugger_b).callimport().callexport().formatstr("%04X"); @@ -1404,7 +1404,7 @@ void m37710_cpu_device::device_start() state_add( STATE_GENPC, "GENPC", m_debugger_pc ).callimport().callexport().noshow(); state_add( STATE_GENPCBASE, "CURPC", m_debugger_pc ).callimport().callexport().noshow(); - state_add( STATE_GENFLAGS, "GENFLAGS", m_debugger_p ).formatstr("%8s").noshow(); + state_add( STATE_GENFLAGS, "GENFLAGS", m_debugger_ps ).formatstr("%8s").noshow(); set_icountptr(m_ICount); } @@ -1414,17 +1414,17 @@ void m37710_cpu_device::state_import(const device_state_entry &entry) { switch (entry.index()) { - case M37710_PB: - m37710_set_reg(M37710_PB, m_debugger_pb); + case M37710_PG: + m37710_set_reg(M37710_PG, m_debugger_pg); break; - case M37710_DB: - m37710_set_reg(M37710_DB, m_debugger_db); + case M37710_DT: + m37710_set_reg(M37710_DT, m_debugger_dt); break; - case M37710_P: - m37710_set_reg(M37710_P, m_debugger_p&0xff); - m_ipl = (m_debugger_p>>8)&0xff; + case M37710_PS: + m37710_set_reg(M37710_PS, m_debugger_ps&0xff); + m_ipl = (m_debugger_ps>>8)&0xff; break; case M37710_A: @@ -1437,7 +1437,7 @@ void m37710_cpu_device::state_import(const device_state_entry &entry) case STATE_GENPC: case STATE_GENPCBASE: - REG_PB = m_debugger_pc & 0xff0000; + REG_PG = m_debugger_pc & 0xff0000; m37710_set_pc(m_debugger_pc & 0xffff); break; } @@ -1448,16 +1448,16 @@ void m37710_cpu_device::state_export(const device_state_entry &entry) { switch (entry.index()) { - case M37710_PB: - m_debugger_pb = m_pb >> 16; + case M37710_PG: + m_debugger_pg = m_pg >> 16; break; - case M37710_DB: - m_debugger_db = m_db >> 16; + case M37710_DT: + m_debugger_dt = m_dt >> 16; break; - case M37710_P: - m_debugger_p = (m_flag_n&0x80) | ((m_flag_v>>1)&0x40) | m_flag_m | m_flag_x | m_flag_d | m_flag_i | ((!m_flag_z)<<1) | ((m_flag_c>>8)&1) | (m_ipl<<8); + case M37710_PS: + m_debugger_ps = (m_flag_n&0x80) | ((m_flag_v>>1)&0x40) | m_flag_m | m_flag_x | m_flag_d | m_flag_i | ((!m_flag_z)<<1) | ((m_flag_c>>8)&1) | (m_ipl<<8); break; case M37710_A: @@ -1470,7 +1470,7 @@ void m37710_cpu_device::state_export(const device_state_entry &entry) case STATE_GENPC: case STATE_GENPCBASE: - m_debugger_pc = (REG_PB | REG_PC); + m_debugger_pc = (REG_PG | REG_PC); break; } } @@ -1549,12 +1549,12 @@ void m37710_cpu_device::m37710i_set_execution_mode(uint32_t mode) void m37710_cpu_device::m37710i_interrupt_software(uint32_t vector) { CLK(13); - m37710i_push_8(REG_PB>>16); + m37710i_push_8(REG_PG>>16); m37710i_push_16(REG_PC); m37710i_push_8(m_ipl); - m37710i_push_8(m37710i_get_reg_p()); + m37710i_push_8(m37710i_get_reg_ps()); FLAG_I = IFLAG_SET; - REG_PB = 0; + REG_PG = 0; REG_PC = m37710_read_16(vector); } diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h index e409b3a2247..5ddac905305 100644 --- a/src/devices/cpu/m37710/m37710.h +++ b/src/devices/cpu/m37710/m37710.h @@ -83,8 +83,8 @@ enum /* Registers - used by m37710_set_reg() and m37710_get_reg() */ enum { - M37710_PC=1, M37710_S, M37710_P, M37710_A, M37710_B, M37710_X, M37710_Y, - M37710_PB, M37710_DB, M37710_D, M37710_E, + M37710_PC=1, M37710_S, M37710_PS, M37710_A, M37710_B, M37710_X, M37710_Y, + M37710_PG, M37710_DT, M37710_DPR, M37710_E, M37710_NMI_STATE, M37710_IRQ_STATE }; @@ -247,9 +247,9 @@ private: uint32_t m_s; /* Stack Pointer */ uint32_t m_pc; /* Program Counter */ uint32_t m_ppc; /* Previous Program Counter */ - uint32_t m_pb; /* Program Bank (shifted left 16) */ - uint32_t m_db; /* Data Bank (shifted left 16) */ - uint32_t m_d; /* Direct Register */ + uint32_t m_pg; /* Program Bank (shifted left 16) */ + uint32_t m_dt; /* Data Bank (shifted left 16) */ + uint32_t m_dpr; /* Direct Page Register */ uint32_t m_flag_e; /* Emulation Mode Flag */ uint32_t m_flag_m; /* Memory/Accumulator Select Flag */ uint32_t m_flag_x; /* Index Select Flag */ @@ -308,19 +308,16 @@ private: uint16_t m_dmac_control; // DMA - uint32_t m_dma0_src, m_dma0_dst, m_dma0_cnt, m_dma0_mode; - uint32_t m_dma1_src, m_dma1_dst, m_dma1_cnt, m_dma1_mode; - uint32_t m_dma2_src, m_dma2_dst, m_dma2_cnt, m_dma2_mode; - uint32_t m_dma3_src, m_dma3_dst, m_dma3_cnt, m_dma3_mode; + uint32_t m_dma_src[4], m_dma_dst[4], m_dma_cnt[4], m_dma_mode[4]; // interrupt controller uint8_t m_int_control[M37710_MASKABLE_INTERRUPTS]; // for debugger uint32_t m_debugger_pc; - uint32_t m_debugger_pb; - uint32_t m_debugger_db; - uint32_t m_debugger_p; + uint32_t m_debugger_pg; + uint32_t m_debugger_dt; + uint32_t m_debugger_ps; uint32_t m_debugger_a; uint32_t m_debugger_b; @@ -407,17 +404,17 @@ private: void m37710i_jump_24(uint32_t address); void m37710i_branch_8(uint32_t offset); void m37710i_branch_16(uint32_t offset); - uint32_t m37710i_get_reg_p(); + uint32_t m37710i_get_reg_ps(); void m37710i_set_reg_ipl(uint32_t value); void m37710i_interrupt_software(uint32_t vector); void m37710i_set_flag_m0x0(uint32_t value); void m37710i_set_flag_m0x1(uint32_t value); void m37710i_set_flag_m1x0(uint32_t value); void m37710i_set_flag_m1x1(uint32_t value); - void m37710i_set_reg_p_m0x0(uint32_t value); - void m37710i_set_reg_p_m0x1(uint32_t value); - void m37710i_set_reg_p_m1x0(uint32_t value); - void m37710i_set_reg_p_m1x1(uint32_t value); + void m37710i_set_reg_ps_m0x0(uint32_t value); + void m37710i_set_reg_ps_m0x1(uint32_t value); + void m37710i_set_reg_ps_m1x0(uint32_t value); + void m37710i_set_reg_ps_m1x1(uint32_t value); uint32_t EA_IMM8(); uint32_t EA_IMM16(); uint32_t EA_IMM24(); diff --git a/src/devices/cpu/m37710/m37710cm.h b/src/devices/cpu/m37710/m37710cm.h index 8f5bd029d14..1fa3c45f14f 100644 --- a/src/devices/cpu/m37710/m37710cm.h +++ b/src/devices/cpu/m37710/m37710cm.h @@ -73,9 +73,9 @@ static inline int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;} #define REG_S m_s /* Stack Pointer */ #define REG_PC m_pc /* Program Counter */ #define REG_PPC m_ppc /* Previous Program Counter */ -#define REG_PB m_pb /* Program Bank */ -#define REG_DB m_db /* Data Bank */ -#define REG_D m_d /* Direct Register */ +#define REG_PG m_pg /* Program Bank */ +#define REG_DT m_dt /* Data Bank */ +#define REG_DPR m_dpr /* Direct Page Register */ #define FLAG_M m_flag_m /* Memory/Accumulator Select Flag */ #define FLAG_X m_flag_x /* Index Select Flag */ #define FLAG_N m_flag_n /* Negative Flag */ diff --git a/src/devices/cpu/m37710/m37710il.h b/src/devices/cpu/m37710/m37710il.h index 92e3fc6765f..52d418a2739 100644 --- a/src/devices/cpu/m37710/m37710il.h +++ b/src/devices/cpu/m37710/m37710il.h @@ -142,7 +142,7 @@ inline void m37710_cpu_device::m37710i_jump_16(uint32_t address) inline void m37710_cpu_device::m37710i_jump_24(uint32_t address) { - REG_PB = address&0xff0000; + REG_PG = address&0xff0000; REG_PC = MAKE_UINT_16(address); } @@ -161,7 +161,7 @@ inline void m37710_cpu_device::m37710i_branch_16(uint32_t offset) /* ============================ STATUS REGISTER =========================== */ /* ======================================================================== */ -inline uint32_t m37710_cpu_device::m37710i_get_reg_p() +inline uint32_t m37710_cpu_device::m37710i_get_reg_ps() { return (FLAG_N&0x80) | ((FLAG_V>>1)&0x40) | @@ -183,26 +183,26 @@ inline void m37710_cpu_device::m37710i_set_reg_ipl(uint32_t value) /* ============================= ADDRESS MODES ============================ */ /* ======================================================================== */ -inline uint32_t m37710_cpu_device::EA_IMM8() {REG_PC += 1; return REG_PB | MAKE_UINT_16(REG_PC-1);} -inline uint32_t m37710_cpu_device::EA_IMM16() {REG_PC += 2; return REG_PB | MAKE_UINT_16(REG_PC-2);} -inline uint32_t m37710_cpu_device::EA_IMM24() {REG_PC += 3; return REG_PB | MAKE_UINT_16(REG_PC-3);} -inline uint32_t m37710_cpu_device::EA_D() {if(MAKE_UINT_8(REG_D)) CLK(1); return MAKE_UINT_16(REG_D + OPER_8_IMM());} -inline uint32_t m37710_cpu_device::EA_A() {return REG_DB | OPER_16_IMM();} +inline uint32_t m37710_cpu_device::EA_IMM8() {REG_PC += 1; return REG_PG | MAKE_UINT_16(REG_PC-1);} +inline uint32_t m37710_cpu_device::EA_IMM16() {REG_PC += 2; return REG_PG | MAKE_UINT_16(REG_PC-2);} +inline uint32_t m37710_cpu_device::EA_IMM24() {REG_PC += 3; return REG_PG | MAKE_UINT_16(REG_PC-3);} +inline uint32_t m37710_cpu_device::EA_D() {if(MAKE_UINT_8(REG_DPR)) CLK(1); return MAKE_UINT_16(REG_DPR + OPER_8_IMM());} +inline uint32_t m37710_cpu_device::EA_A() {return REG_DT | OPER_16_IMM();} inline uint32_t m37710_cpu_device::EA_AL() {return OPER_24_IMM();} -inline uint32_t m37710_cpu_device::EA_DX() {return MAKE_UINT_16(REG_D + OPER_8_IMM() + REG_X);} -inline uint32_t m37710_cpu_device::EA_DY() {return MAKE_UINT_16(REG_D + OPER_8_IMM() + REG_Y);} +inline uint32_t m37710_cpu_device::EA_DX() {return MAKE_UINT_16(REG_DPR + OPER_8_IMM() + REG_X);} +inline uint32_t m37710_cpu_device::EA_DY() {return MAKE_UINT_16(REG_DPR + OPER_8_IMM() + REG_Y);} inline uint32_t m37710_cpu_device::EA_AX() {uint32_t tmp = EA_A(); if((tmp^(tmp+REG_X))&0xff00) CLK(1); return tmp + REG_X;} inline uint32_t m37710_cpu_device::EA_ALX() {return EA_AL() + REG_X;} inline uint32_t m37710_cpu_device::EA_AY() {uint32_t tmp = EA_A(); if((tmp^(tmp+REG_X))&0xff00) CLK(1); return tmp + REG_Y;} -inline uint32_t m37710_cpu_device::EA_DI() {return REG_DB | OPER_16_D();} +inline uint32_t m37710_cpu_device::EA_DI() {return REG_DT | OPER_16_D();} inline uint32_t m37710_cpu_device::EA_DLI() {return OPER_24_D();} inline uint32_t m37710_cpu_device::EA_AI() {return read_16_A(OPER_16_IMM());} inline uint32_t m37710_cpu_device::EA_ALI() {return OPER_24_A();} -inline uint32_t m37710_cpu_device::EA_DXI() {return REG_DB | OPER_16_DX();} -inline uint32_t m37710_cpu_device::EA_DIY() {uint32_t tmp = REG_DB | OPER_16_D(); if((tmp^(tmp+REG_X))&0xff00) CLK(1); return tmp + REG_Y;} +inline uint32_t m37710_cpu_device::EA_DXI() {return REG_DT | OPER_16_DX();} +inline uint32_t m37710_cpu_device::EA_DIY() {uint32_t tmp = REG_DT | OPER_16_D(); if((tmp^(tmp+REG_X))&0xff00) CLK(1); return tmp + REG_Y;} inline uint32_t m37710_cpu_device::EA_DLIY() {return OPER_24_D() + REG_Y;} inline uint32_t m37710_cpu_device::EA_AXI() {return read_16_AXI(MAKE_UINT_16(OPER_16_IMM() + REG_X));} inline uint32_t m37710_cpu_device::EA_S() {return MAKE_UINT_16(REG_S + OPER_8_IMM());} -inline uint32_t m37710_cpu_device::EA_SIY() {return MAKE_UINT_16(read_16_SIY(REG_S + OPER_8_IMM()) + REG_Y) | REG_DB;} +inline uint32_t m37710_cpu_device::EA_SIY() {return MAKE_UINT_16(read_16_SIY(REG_S + OPER_8_IMM()) + REG_Y) | REG_DT;} #endif /* __M37710IL_H__ */ diff --git a/src/devices/cpu/m37710/m37710op.h b/src/devices/cpu/m37710/m37710op.h index a05c0a2a758..f6f493f31dc 100644 --- a/src/devices/cpu/m37710/m37710op.h +++ b/src/devices/cpu/m37710/m37710op.h @@ -7,28 +7,28 @@ #undef FLAG_SET_M #undef FLAG_SET_X #undef m37710i_set_flag_mx -#undef m37710i_set_reg_p +#undef m37710i_set_reg_ps #if EXECUTION_MODE == EXECUTION_MODE_M0X0 #define FLAG_SET_M 0 #define FLAG_SET_X 0 #define m37710i_set_flag_mx m37710i_set_flag_m0x0 -#define m37710i_set_reg_p m37710i_set_reg_p_m0x0 +#define m37710i_set_reg_ps m37710i_set_reg_ps_m0x0 #elif EXECUTION_MODE == EXECUTION_MODE_M0X1 #define FLAG_SET_M 0 #define FLAG_SET_X 1 #define m37710i_set_flag_mx m37710i_set_flag_m0x1 -#define m37710i_set_reg_p m37710i_set_reg_p_m0x1 +#define m37710i_set_reg_ps m37710i_set_reg_ps_m0x1 #elif EXECUTION_MODE == EXECUTION_MODE_M1X0 #define FLAG_SET_M 1 #define FLAG_SET_X 0 #define m37710i_set_flag_mx m37710i_set_flag_m1x0 -#define m37710i_set_reg_p m37710i_set_reg_p_m1x0 +#define m37710i_set_reg_ps m37710i_set_reg_ps_m1x0 #elif EXECUTION_MODE == EXECUTION_MODE_M1X1 #define FLAG_SET_M 1 #define FLAG_SET_X 1 #define m37710i_set_flag_mx m37710i_set_flag_m1x1 -#define m37710i_set_reg_p m37710i_set_reg_p_m1x1 +#define m37710i_set_reg_ps m37710i_set_reg_ps_m1x1 #endif /* ======================================================================== */ @@ -82,7 +82,7 @@ void m37710_cpu_device::m37710i_set_flag_mx(uint32_t value) } -void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) +void m37710_cpu_device::m37710i_set_reg_ps(uint32_t value) { FLAG_N = value; FLAG_V = value << 1; @@ -115,13 +115,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) if (SRC&0x8) \ { m37710i_push_8(REG_Y); CLK(2); } \ if (SRC&0x10) \ - { m37710i_push_16(REG_D); CLK(2); } \ + { m37710i_push_16(REG_DPR); CLK(2); } \ if (SRC&0x20) \ - { m37710i_push_8(REG_DB>>16); CLK(1); } \ + { m37710i_push_8(REG_DT>>16); CLK(1); } \ if (SRC&0x40) \ - { m37710i_push_8(REG_PB>>16); CLK(1); } \ + { m37710i_push_8(REG_PG>>16); CLK(1); } \ if (SRC&0x80) \ - { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_p()); CLK(2); } + { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_ps()); CLK(2); } #else // FLAG_SET_X #define OP_PSH(MODE) \ SRC = OPER_8_##MODE(); \ @@ -135,13 +135,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) if (SRC&0x8) \ { m37710i_push_16(REG_Y); CLK(2); } \ if (SRC&0x10) \ - { m37710i_push_16(REG_D); CLK(2); } \ + { m37710i_push_16(REG_DPR); CLK(2); } \ if (SRC&0x20) \ - { m37710i_push_8(REG_DB>>16); CLK(1); } \ + { m37710i_push_8(REG_DT>>16); CLK(1); } \ if (SRC&0x40) \ - { m37710i_push_8(REG_PB>>16); CLK(1); } \ + { m37710i_push_8(REG_PG>>16); CLK(1); } \ if (SRC&0x80) \ - { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_p()); CLK(2); } + { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_ps()); CLK(2); } #endif // FLAG_SET_X #else // FLAG_SET_M #if FLAG_SET_X @@ -157,13 +157,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) if (SRC&0x8) \ { m37710i_push_8(REG_Y); CLK(2); } \ if (SRC&0x10) \ - { m37710i_push_16(REG_D); CLK(2); } \ + { m37710i_push_16(REG_DPR); CLK(2); } \ if (SRC&0x20) \ - { m37710i_push_8(REG_DB>>16); CLK(1); } \ + { m37710i_push_8(REG_DT>>16); CLK(1); } \ if (SRC&0x40) \ - { m37710i_push_8(REG_PB>>16); CLK(1); } \ + { m37710i_push_8(REG_PG>>16); CLK(1); } \ if (SRC&0x80) \ - { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_p()); CLK(2); } + { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_ps()); CLK(2); } #else // FLAG_SET_X #define OP_PSH(MODE) \ SRC = OPER_8_##MODE(); \ @@ -177,13 +177,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) if (SRC&0x8) \ { m37710i_push_16(REG_Y); CLK(2); } \ if (SRC&0x10) \ - { m37710i_push_16(REG_D); CLK(2); } \ + { m37710i_push_16(REG_DPR); CLK(2); } \ if (SRC&0x20) \ - { m37710i_push_8(REG_DB>>16); CLK(1); } \ + { m37710i_push_8(REG_DT>>16); CLK(1); } \ if (SRC&0x40) \ - { m37710i_push_8(REG_PB>>16); CLK(1); } \ + { m37710i_push_8(REG_PG>>16); CLK(1); } \ if (SRC&0x80) \ - { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_p()); CLK(2); } + { m37710i_push_8(m_ipl); m37710i_push_8(m37710i_get_reg_ps()); CLK(2); } #endif // FLAG_SET_X #endif // FLAG_SET_M @@ -194,12 +194,12 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) SRC = OPER_8_##MODE(); \ CLK(14); \ if (SRC&0x80) \ - { m37710i_set_reg_p(m37710i_pull_8()); m37710i_set_reg_ipl(m37710i_pull_8()); CLK(3); } \ + { m37710i_set_reg_ps(m37710i_pull_8()); m37710i_set_reg_ipl(m37710i_pull_8()); CLK(3); } \ if (SRC&0x20) \ - { REG_DB = m37710i_pull_8() << 16; CLK(3); } \ + { REG_DT = m37710i_pull_8() << 16; CLK(3); } \ if (SRC&0x10) \ - { REG_D = m37710i_pull_16(); CLK(4); } \ - if (m37710i_get_reg_p() & XFLAG_SET) \ + { REG_DPR = m37710i_pull_16(); CLK(4); } \ + if (m37710i_get_reg_ps() & XFLAG_SET) \ { \ if (SRC&0x8) \ { REG_Y = m37710i_pull_8(); CLK(3); } \ @@ -213,7 +213,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) if (SRC&0x4) \ { REG_X = m37710i_pull_16(); CLK(3); } \ } \ - if (m37710i_get_reg_p() & MFLAG_SET) \ + if (m37710i_get_reg_ps() & MFLAG_SET) \ { \ if (SRC&0x2) \ { REG_BA = m37710i_pull_8(); CLK(3); } \ @@ -462,7 +462,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_BRK #define OP_BRK() \ REG_PC++; CLK(CLK_OP + CLK_R8 + CLK_IMM); \ - logerror("error M37710: BRK at PC=%06x\n", REG_PB|REG_PC); \ + logerror("error M37710: BRK at PC=%06x\n", REG_PG|REG_PC); \ m37710i_interrupt_software(0xfffa) /* M37710 Branch Always */ @@ -704,7 +704,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_JMPAXI #define OP_JMPAXI() \ CLK(CLK_OP + CLK_AXI); \ - m37710i_jump_16(read_16_AXI(REG_PB | (MAKE_UINT_16(OPER_16_IMM() + REG_X)))) + m37710i_jump_16(read_16_AXI(REG_PG | (MAKE_UINT_16(OPER_16_IMM() + REG_X)))) /* M37710 Jump absolute long */ #undef OP_JMPAL @@ -717,7 +717,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_JSL(MODE) \ CLK(CLK_OP + CLK_W24 + CLK_##MODE + 1); \ DST = EA_##MODE(); \ - m37710i_push_8(REG_PB>>16); \ + m37710i_push_8(REG_PG>>16); \ m37710i_push_16(REG_PC); \ m37710i_jump_24(DST) @@ -733,7 +733,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_JSRAXI #define OP_JSRAXI() \ CLK(CLK_OP + CLK_W16 + CLK_AXI); \ - DST = read_16_AXI(REG_PB | (MAKE_UINT_16(OPER_16_IMM() + REG_X))); \ + DST = read_16_AXI(REG_PG | (MAKE_UINT_16(OPER_16_IMM() + REG_X))); \ m37710i_push_16(REG_PC); \ m37710i_jump_16(DST) @@ -769,14 +769,14 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_LDM(MODE) \ CLK(CLK_OP + CLK_R8 + CLK_##MODE); \ REG_IM2 = EA_##MODE(); \ - REG_IM = read_8_IMM(REG_PB | REG_PC); \ + REG_IM = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ write_8_##MODE(REG_IM2, REG_IM) #else #define OP_LDM(MODE) \ CLK(CLK_OP + CLK_R16 + CLK_##MODE); \ REG_IM2 = EA_##MODE(); \ - REG_IM = read_16_IMM(REG_PB | REG_PC); \ + REG_IM = read_16_IMM(REG_PG | REG_PC); \ REG_PC+=2; \ write_16_##MODE(REG_IM2, REG_IM) #endif @@ -787,7 +787,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_BBS(MODE) \ CLK(CLK_OP + CLK_R8 + CLK_##MODE); \ REG_IM2 = read_8_NORM(EA_##MODE()); \ - REG_IM = read_8_IMM(REG_PB | REG_PC); \ + REG_IM = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ DST = OPER_8_IMM(); \ if ((REG_IM2 & REG_IM) == REG_IM) \ @@ -800,7 +800,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_BBS(MODE) \ CLK(CLK_OP + CLK_R16 + CLK_##MODE); \ REG_IM2 = read_16_NORM(EA_##MODE()); \ - REG_IM = read_16_IMM(REG_PB | REG_PC); \ + REG_IM = read_16_IMM(REG_PG | REG_PC); \ REG_PC++; \ REG_PC++; \ DST = OPER_8_IMM(); \ @@ -818,7 +818,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_BBC(MODE) \ CLK(CLK_OP + CLK_R8 + CLK_##MODE); \ REG_IM2 = read_8_NORM(EA_##MODE()); \ - REG_IM = read_8_IMM(REG_PB | REG_PC); \ + REG_IM = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ DST = OPER_8_IMM(); \ if ((REG_IM2 & REG_IM) == 0) \ @@ -831,7 +831,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_BBC(MODE) \ CLK(CLK_OP + CLK_R16 + CLK_##MODE); \ REG_IM2 = read_16_NORM(EA_##MODE()); \ - REG_IM = read_16_IMM(REG_PB | REG_PC); \ + REG_IM = read_16_IMM(REG_PG | REG_PC); \ REG_PC++; \ REG_PC++; \ DST = OPER_8_IMM(); \ @@ -933,7 +933,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_MVN() \ DST = OPER_8_IMM()<<16; \ SRC = OPER_8_IMM()<<16; \ - REG_DB = DST; \ + REG_DT = DST; \ REG_A |= REG_B; \ CLK(7); \ if (REG_A > 0) \ @@ -963,7 +963,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_MVN() \ DST = OPER_8_IMM()<<16; \ SRC = OPER_8_IMM()<<16; \ - REG_DB = DST; \ + REG_DT = DST; \ REG_A |= REG_B; \ CLK(7); \ if (REG_A > 0) \ @@ -997,7 +997,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_MVP() \ DST = OPER_8_IMM()<<16; \ SRC = OPER_8_IMM()<<16; \ - REG_DB = DST; \ + REG_DT = DST; \ REG_A |= REG_B; \ CLK(7); \ if (REG_A > 0) \ @@ -1027,7 +1027,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_MVP() \ DST = OPER_8_IMM()<<16; \ SRC = OPER_8_IMM()<<16; \ - REG_DB = DST; \ + REG_DT = DST; \ REG_A |= REG_B; \ CLK(7); \ if (REG_A > 0) \ @@ -1145,26 +1145,26 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_PHT #define OP_PHT() \ CLK(CLK_OP + CLK_W8 + 1); \ - m37710i_push_8(REG_DB>>16) + m37710i_push_8(REG_DT>>16) -/* M37710 Push direct register */ +/* M37710 Push direct page register */ #undef OP_PHD #define OP_PHD() \ CLK(CLK_OP + CLK_W16 + 1); \ - m37710i_push_16(REG_D) + m37710i_push_16(REG_DPR) /* M37710 Push program bank register */ #undef OP_PHK #define OP_PHK() \ CLK(CLK_OP + CLK_W8 + 1); \ - m37710i_push_8(REG_PB>>16) + m37710i_push_8(REG_PG>>16) /* M37710 Push the Processor Status Register to the stack */ #undef OP_PHP #define OP_PHP() \ CLK(CLK_OP + CLK_W8 + 1); \ m37710i_push_8(m_ipl); \ - m37710i_push_8(m37710i_get_reg_p()) + m37710i_push_8(m37710i_get_reg_ps()) /* M37710 Pull accumulator from the stack */ #undef OP_PLA @@ -1210,19 +1210,19 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #define OP_PLT() \ CLK(CLK_OP + CLK_R8 + 2); \ FLAG_N = FLAG_Z = m37710i_pull_8(); \ - REG_DB = FLAG_Z << 16 + REG_DT = FLAG_Z << 16 -/* M37710 Pull direct register */ +/* M37710 Pull direct page register */ #undef OP_PLD #define OP_PLD() \ CLK(CLK_OP + CLK_R16 + 2); \ - REG_D = m37710i_pull_16() + REG_DPR = m37710i_pull_16() /* M37710 Pull the Processor Status Register from the stack */ #undef OP_PLP #define OP_PLP() \ CLK(CLK_OP + CLK_R8 + 2); \ - m37710i_set_reg_p(m37710i_pull_8()); \ + m37710i_set_reg_ps(m37710i_pull_8()); \ m37710i_set_reg_ipl(m37710i_pull_8()); \ m37710i_update_irqs() @@ -1230,14 +1230,14 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_REP #define OP_REP() \ CLK(CLK_OP + CLK_R8 + 1); \ - m37710i_set_reg_p(m37710i_get_reg_p() & ~OPER_8_IMM()); \ + m37710i_set_reg_ps(m37710i_get_reg_ps() & ~OPER_8_IMM()); \ m37710i_update_irqs() /* M37710 Clear "M" status bit */ #undef OP_CLM #define OP_CLM() \ CLK(CLK_OP + CLK_R8 + 1); \ - m37710i_set_reg_p(m37710i_get_reg_p() & ~FLAGPOS_M) + m37710i_set_reg_ps(m37710i_get_reg_ps() & ~FLAGPOS_M) /* M37710 Rotate Left the accumulator */ #undef OP_ROL @@ -1360,10 +1360,10 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_RTI #define OP_RTI() \ CLK(8); \ - m37710i_set_reg_p(m37710i_pull_8()); \ + m37710i_set_reg_ps(m37710i_pull_8()); \ m37710i_set_reg_ipl(m37710i_pull_8()); \ m37710i_jump_16(m37710i_pull_16()); \ - REG_PB = m37710i_pull_8() << 16; \ + REG_PG = m37710i_pull_8() << 16; \ m37710i_update_irqs() /* M37710 Return from Subroutine Long */ @@ -1513,13 +1513,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_SEP #define OP_SEP() \ CLK(CLK_OP + CLK_R8 + 1); \ - m37710i_set_reg_p(m37710i_get_reg_p() | OPER_8_IMM()) + m37710i_set_reg_ps(m37710i_get_reg_ps() | OPER_8_IMM()) /* M37710 Set "M" status bit */ #undef OP_SEM #define OP_SEM() \ CLK(CLK_OP + CLK_R8 + 1); \ - m37710i_set_reg_p(m37710i_get_reg_p() | FLAGPOS_M) + m37710i_set_reg_ps(m37710i_get_reg_ps() | FLAGPOS_M) /* M37710 Store accumulator to memory */ #undef OP_STA @@ -1648,59 +1648,59 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) FLAG_N = NFLAG_16(FLAG_Z) #endif -/* M37710 Transfer accumulator to direct register */ +/* M37710 Transfer accumulator to direct page register */ #undef OP_TAD #if FLAG_SET_M #define OP_TAD() \ CLK(CLK_OP + CLK_IMPLIED); \ - REG_D = REG_A | REG_B + REG_DPR = REG_A | REG_B #else #define OP_TAD() \ CLK(CLK_OP + CLK_IMPLIED); \ - REG_D = REG_A + REG_DPR = REG_A #endif -/* M37710 Transfer accumulator B to direct register */ +/* M37710 Transfer accumulator B to direct page register */ #undef OP_TBD #if FLAG_SET_M #define OP_TBD() \ CLK(CLK_OP + CLK_IMPLIED); \ - REG_D = REG_BA | REG_BB + REG_DPR = REG_BA | REG_BB #else #define OP_TBD() \ CLK(CLK_OP + CLK_IMPLIED); \ - REG_D = REG_BA + REG_DPR = REG_BA #endif -/* M37710 Transfer direct register to accumulator */ +/* M37710 Transfer direct page register to accumulator */ #undef OP_TDA #if FLAG_SET_M #define OP_TDA() \ CLK(CLK_OP + CLK_IMPLIED); \ - FLAG_Z = REG_D; \ + FLAG_Z = REG_DPR; \ FLAG_N = NFLAG_16(FLAG_Z); \ - REG_A = MAKE_UINT_8(REG_D); \ - REG_B = REG_D & 0xff00 + REG_A = MAKE_UINT_8(REG_DPR); \ + REG_B = REG_DPR & 0xff00 #else #define OP_TDA() \ CLK(CLK_OP + CLK_IMPLIED); \ - FLAG_Z = REG_A = REG_D; \ + FLAG_Z = REG_A = REG_DPR; \ FLAG_N = NFLAG_16(FLAG_Z) #endif -/* M37710 Transfer direct register to accumulator B */ +/* M37710 Transfer direct page register to accumulator B */ #undef OP_TDB #if FLAG_SET_M #define OP_TDB() \ CLK(CLK_OP + CLK_IMPLIED); \ - FLAG_Z = REG_D; \ + FLAG_Z = REG_DPR; \ FLAG_N = NFLAG_16(FLAG_Z); \ - REG_BA = MAKE_UINT_8(REG_D); \ - REG_BB = REG_D & 0xff00 + REG_BA = MAKE_UINT_8(REG_DPR); \ + REG_BB = REG_DPR & 0xff00 #else #define OP_TDB() \ CLK(CLK_OP + CLK_IMPLIED); \ - FLAG_Z = REG_BA = REG_D; \ + FLAG_Z = REG_BA = REG_DPR; \ FLAG_N = NFLAG_16(FLAG_Z) #endif @@ -1821,7 +1821,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) CLK(CLK_OP + CLK_RMW8 + CLK_W_##MODE); \ DST = EA_##MODE(); \ REG_IM = read_8_##MODE(DST); \ - REG_IM2 = read_8_IMM(REG_PB | REG_PC); \ + REG_IM2 = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ write_8_##MODE(DST, REG_IM & ~REG_IM2); #else @@ -1829,7 +1829,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) CLK(CLK_OP + CLK_RMW16 + CLK_W_##MODE); \ DST = EA_##MODE(); \ REG_IM = read_16_##MODE(DST); \ - REG_IM2 = read_16_IMM(REG_PB | REG_PC); \ + REG_IM2 = read_16_IMM(REG_PG | REG_PC); \ REG_PC+=2; \ write_16_##MODE(DST, REG_IM & ~REG_IM2); #endif @@ -1841,7 +1841,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) CLK(CLK_OP + CLK_RMW8 + CLK_W_##MODE); \ DST = EA_##MODE(); \ REG_IM = read_8_##MODE(DST); \ - REG_IM2 = read_8_IMM(REG_PB | REG_PC); \ + REG_IM2 = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ write_8_##MODE(DST, REG_IM | REG_IM2); #else @@ -1849,7 +1849,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) CLK(CLK_OP + CLK_RMW16 + CLK_W_##MODE); \ DST = EA_##MODE(); \ REG_IM = read_16_##MODE(DST); \ - REG_IM2 = read_16_IMM(REG_PB | REG_PC); \ + REG_IM2 = read_16_IMM(REG_PG | REG_PC); \ REG_PC+=2; \ write_16_##MODE(DST, REG_IM | REG_IM2); #endif @@ -1864,7 +1864,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_LDT #define OP_LDT(MODE) \ CLK(CLK_OP + CLK_R8 + CLK_##MODE); \ - REG_DB = OPER_8_##MODE()<<16; + REG_DT = OPER_8_##MODE()<<16; /* M37710 prefix for B accumulator (0x42) */ @@ -1872,7 +1872,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) #undef OP_PFB #define OP_PFB() \ CLK(2); \ - REG_IR = read_8_IMM(REG_PB | REG_PC); \ + REG_IR = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ (this->*m_opcodes42[REG_IR])(); @@ -1880,7 +1880,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) /* M37710 prefix for multiply / divide instructions (0x89) */ #undef OP_PFXM #define OP_PFXM() \ - REG_IR = read_8_IMM(REG_PB | REG_PC); \ + REG_IR = read_8_IMM(REG_PG | REG_PC); \ REG_PC++; \ (this->*m_opcodes89[REG_IR])(); @@ -1888,7 +1888,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value) /* M37710 unimplemented opcode */ #undef OP_UNIMP #define OP_UNIMP() \ - logerror("error M37710: UNIMPLEMENTED OPCODE! K=%x PC=%x\n", REG_PB, REG_PPC); + logerror("error M37710: UNIMPLEMENTED OPCODE! K=%x PC=%x\n", REG_PG, REG_PPC); /* ======================================================================== */ /* ======================== OPCODE & FUNCTION TABLES ====================== */ @@ -2497,10 +2497,10 @@ TABLE_FUNCTION(uint32_t, get_reg, (int regnum)) case M37710_Y: return REG_Y; case M37710_S: return REG_S; case M37710_PC: return REG_PC; - case M37710_PB: return REG_PB >> 16; - case M37710_DB: return REG_DB >> 16; - case M37710_D: return REG_D; - case M37710_P: return m37710i_get_reg_p(); + case M37710_PG: return REG_PG >> 16; + case M37710_DT: return REG_DT >> 16; + case M37710_DPR: return REG_DPR; + case M37710_PS: return m37710i_get_reg_ps(); case M37710_IRQ_STATE: return LINE_IRQ; case STATE_GENPCBASE: return REG_PPC; } @@ -2513,7 +2513,7 @@ TABLE_FUNCTION(void, set_reg, (int regnum, uint32_t val)) { case M37710_PC: REG_PC = MAKE_UINT_16(val); break; case M37710_S: REG_S = MAKE_UINT_16(val); break; - case M37710_P: m37710i_set_reg_p(val); break; + case M37710_PS: m37710i_set_reg_ps(val); break; #if FLAG_SET_M case M37710_A: REG_A = MAKE_UINT_8(val); REG_B = val&0xff00; break; case M37710_B: REG_BA = MAKE_UINT_8(val); REG_BB = val&0xff00; break; @@ -2540,9 +2540,9 @@ TABLE_FUNCTION(int, execute, (int clocks)) do { REG_PPC = REG_PC; - M37710_CALL_DEBUGGER(REG_PB | REG_PC); + M37710_CALL_DEBUGGER(REG_PG | REG_PC); REG_PC++; - REG_IR = read_8_IMM(REG_PB | REG_PPC); + REG_IR = read_8_IMM(REG_PG | REG_PPC); (this->*m_opcodes[REG_IR])(); } while(CLOCKS > 0); return clocks - CLOCKS; diff --git a/src/devices/cpu/m37710/m7700ds.cpp b/src/devices/cpu/m37710/m7700ds.cpp index bf8f791935b..12478d32903 100644 --- a/src/devices/cpu/m37710/m7700ds.cpp +++ b/src/devices/cpu/m37710/m7700ds.cpp @@ -319,9 +319,9 @@ offs_t m7700_disassembler::disassemble(std::ostream &stream, offs_t pc, const da uint32_t flags = 0; offs_t address = pc; - u32 pb = pc & 0xffff0000; + u32 pg = pc & 0xff0000; pc &= 0xffff; - address = pc | pb; + address = pc | pg; instruction = opcodes.r8(address); @@ -370,13 +370,13 @@ offs_t m7700_disassembler::disassemble(std::ostream &stream, offs_t pc, const da case RELB: varS = opcodes.r8(address + 1); length++; - util::stream_format(stream, " %06x (%s)", pb | ((pc + length + varS)&0xffff), int_8_str(varS)); + util::stream_format(stream, " %06x (%s)", pg | ((pc + length + varS)&0xffff), int_8_str(varS)); break; case RELW: case PER : var = opcodes.r16(address + 1); length += 2; - util::stream_format(stream, " %06x (%s)", pb | ((pc + length + var)&0xffff), int_16_str(var)); + util::stream_format(stream, " %06x (%s)", pg | ((pc + length + var)&0xffff), int_16_str(var)); break; case IMM : if((opcode->flag == M && !m_flag) || (opcode->flag == X && !x_flag)) @@ -395,13 +395,13 @@ offs_t m7700_disassembler::disassemble(std::ostream &stream, offs_t pc, const da { varS = opcodes.r8(address + 4); length += 4; - util::stream_format(stream, " #$%04x, $%02x, %06x (%s)", opcodes.r16(address + 2), opcodes.r8(address + 1), pb | ((pc + length + varS)&0xffff), int_8_str(varS)); + util::stream_format(stream, " #$%04x, $%02x, %06x (%s)", opcodes.r16(address + 2), opcodes.r8(address + 1), pg | ((pc + length + varS)&0xffff), int_8_str(varS)); } else { varS = opcodes.r8(address + 3); length += 3; - util::stream_format(stream, " #$%02x, $%02x, %06x (%s)", opcodes.r8(address + 2), opcodes.r8(address + 1), pb | ((pc + length + varS)&0xffff), int_8_str(varS)); + util::stream_format(stream, " #$%02x, $%02x, %06x (%s)", opcodes.r8(address + 2), opcodes.r8(address + 1), pg | ((pc + length + varS)&0xffff), int_8_str(varS)); } break; case BBCA: @@ -409,13 +409,13 @@ offs_t m7700_disassembler::disassemble(std::ostream &stream, offs_t pc, const da { length += 5; varS = opcodes.r8(address + 5); - util::stream_format(stream, " #$%04x, $%04x, %06x (%s)", opcodes.r16(address + 3), opcodes.r16(address + 1), pb | ((pc + length + varS)&0xffff), int_8_str(varS)); + util::stream_format(stream, " #$%04x, $%04x, %06x (%s)", opcodes.r16(address + 3), opcodes.r16(address + 1), pg | ((pc + length + varS)&0xffff), int_8_str(varS)); } else { length += 4; varS = opcodes.r8(address + 4); - util::stream_format(stream, " #$%02x, $%04x, %06x (%s)", opcodes.r8(address + 3), opcodes.r16(address + 1), pb | ((pc + length + varS)&0xffff), int_8_str(varS)); + util::stream_format(stream, " #$%02x, $%04x, %06x (%s)", opcodes.r8(address + 3), opcodes.r16(address + 1), pg | ((pc + length + varS)&0xffff), int_8_str(varS)); } break; case LDM4: From 85f39bfeab3073cf55898824ac20cafe727bc428 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 22:26:25 -0400 Subject: [PATCH 41/69] am79c30: Correct a few debug logging statements (nw) eurit30: Add two more buttons (nw) --- src/devices/machine/am79c30.cpp | 12 +++++++----- src/mame/drivers/eurit.cpp | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/devices/machine/am79c30.cpp b/src/devices/machine/am79c30.cpp index 77b87733044..ed31a517398 100644 --- a/src/devices/machine/am79c30.cpp +++ b/src/devices/machine/am79c30.cpp @@ -386,7 +386,7 @@ void am79c30a_device::set_lmr1(u8 data) if (BIT(data, 6) != BIT(m_lmr1, 6)) LOG("%s: LIU receiver/transmitter %sabled\n", machine().describe_context(), BIT(data, 6) ? "en" : "dis"); if (BIT(data, 7)) - logerror("%s: LMR1 reserved bit 7 set\n"); + logerror("%s: LMR1 reserved bit 7 set\n", machine().describe_context()); m_lmr1 = data; } @@ -414,7 +414,7 @@ void am79c30a_device::set_lmr2(u8 data) if (BIT(data, 6) != BIT(m_lmr2, 6)) LOG("%s: F7 change of state interrupt %sabled\n", machine().describe_context(), BIT(data, 6) ? "en" : "dis"); if (BIT(data, 7)) - logerror("%s: LMR2 reserved bit 7 set\n"); + logerror("%s: LMR2 reserved bit 7 set\n", machine().describe_context()); m_lmr2 = data; } @@ -492,9 +492,9 @@ void am79c30a_device::set_mcr(unsigned n, u8 data) if (data == 0) LOG("%s: No connect (MCR%d)\n", machine().describe_context(), n + 1); else if ((data & 0xf0) >> 4 == (data & 0x0f)) - LOG("%s: %s loopback (MCR%d)\n", machine().describe_context(), data & 0x0f, n + 1); + LOG("%s: %s loopback (MCR%d)\n", machine().describe_context(), s_mcr_channels[data & 0x0f], n + 1); else - LOG("%s: %s <-> %s (MCR%d)\n", machine().describe_context(), (data & 0xf0) >> 4, data & 0x0f, n + 1); + LOG("%s: %s <-> %s (MCR%d)\n", machine().describe_context(), s_mcr_channels[(data & 0xf0) >> 4], s_mcr_channels[data & 0x0f], n + 1); } m_mcr[n] = data; @@ -753,7 +753,9 @@ void am79c30a_device::set_stra(u8 data) else { u8 a = 15 - ((data & 0xf0) >> 4); - LOG("%s: Secondary tone ringer %.2f V peak-to-peak, %d dB relative\n", BIT(a, 0) ? 3.53553390593274 : 5.0 / (1 << (a / 2)), a * -3); + LOG("%s: Secondary tone ringer %.2f V peak-to-peak, %d dB relative\n", machine().describe_context(), + BIT(a, 0) ? 3.53553390593274 : 5.0 / (1 << (a / 2)), + a * -3); } } diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index f96f0bfb38e..f78d91840b4 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -120,8 +120,8 @@ static INPUT_PORTS_START(eurit30) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2 DEF") PORT_CODE(KEYCODE_2) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1 ABC") PORT_CODE(KEYCODE_1) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key D5") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key D6") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key D7") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_START("KEYE") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key E0") From 8bcd33e6a213fe6dff03b9ac0a8cb56b2e0d7e8d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 12:53:46 +1000 Subject: [PATCH 42/69] (nw) cvicny: added pwm device --- src/mame/drivers/cvicny.cpp | 66 +++++++++++++++++------------------- src/mame/drivers/savia84.cpp | 5 --- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/src/mame/drivers/cvicny.cpp b/src/mame/drivers/cvicny.cpp index 7d5dca51587..cb824eb7250 100644 --- a/src/mame/drivers/cvicny.cpp +++ b/src/mame/drivers/cvicny.cpp @@ -2,38 +2,36 @@ // copyright-holders:Robbbert /*************************************************************************** - CVICNY8080 - Practice-z80 - a homebrew from Czechoslavakia. +CVICNY8080 - Practice-z80 - a homebrew from Czechoslavakia. - More data at : - http://www.nostalcomp.cz/cvicny8080.php +More data at : + https://web.archive.org/web/20190202185251/http://www.nostalcomp.cz/cvicny8080.php - 21/OCT/2011 New working driver. [Robbbert] +2011-10-21 New working driver. [Robbbert] - Keys: - 0-9,A-F : hexadecimal numbers - ADR : enter an address to work with. After the 4 digits are entered, - the data at that address shows, and you can modify the data. - + (inc) : Enter the data into memory, and increment the address by 1. - GO : execute the program located at the current address. +Keys: + 0-9,A-F : hexadecimal numbers + ADR : enter an address to work with. After the 4 digits are entered, + the data at that address shows, and you can modify the data. + + (inc) : Enter the data into memory, and increment the address by 1. + GO : execute the program located at the current address. - Pasting: - 0-F : as is - + (inc) : ^ - ADR : - - GO : X +Pasting: + 0-F : as is + + (inc) : ^ + ADR : - + GO : X - Test Paste: - 11^22^33^44^55^66^77^88^99^-0800 - Now press up-arrow to confirm the data has been entered. +Test Paste: + 11^22^33^44^55^66^77^88^99^-0800 + Now press up-arrow to confirm the data has been entered. - ToDo: - - When ADR is pressed, sometimes a segment stays alight. Bug? - - Blank the display if digits aren't being refreshed ****************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" +#include "video/pwm.h" #include "cvicny.lh" class cvicny_state : public driver_device @@ -41,9 +39,9 @@ class cvicny_state : public driver_device public: cvicny_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_digit_last(0) , m_maincpu(*this, "maincpu") - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) { } void cvicny(machine_config &config); @@ -53,31 +51,27 @@ public: DECLARE_WRITE8_MEMBER(segment_w ); private: uint8_t m_digit; - uint8_t m_digit_last; - virtual void machine_start() override { m_digits.resolve(); } + uint8_t m_seg; required_device m_maincpu; - output_finder<8> m_digits; + required_device m_display; + required_ioport_array<8> m_io_keyboard; }; WRITE8_MEMBER( cvicny_state::segment_w ) // output segments on the selected digit { - if (m_digit != m_digit_last) - m_digits[m_digit] = data; - - m_digit_last = m_digit; + m_seg = data; + m_display->matrix(1<matrix(1<read(); + u8 data = m_io_keyboard[m_digit]->read(); return ((data << 4) ^ 0xf0) | data; } @@ -143,11 +137,13 @@ void cvicny_state::cvicny(machine_config &config) /* video hardware */ config.set_default_layout(layout_cvicny); + PWM_DISPLAY(config, m_display).set_size(8, 8); + m_display->set_segmask(0xff, 0xff); } /* ROM definition */ ROM_START( cvicny ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD("cvicny8080.bin", 0x0000, 0x05ea, CRC(e6119052) SHA1(d03c2cbfd047f0d090a787fbbde6353593cc2dd8) ) ROM_END diff --git a/src/mame/drivers/savia84.cpp b/src/mame/drivers/savia84.cpp index d15716612f7..2a4c3c86b71 100644 --- a/src/mame/drivers/savia84.cpp +++ b/src/mame/drivers/savia84.cpp @@ -57,7 +57,6 @@ private: uint8_t m_digit; uint8_t m_seg; - virtual void machine_reset() override; required_device m_maincpu; required_device m_ppi8255; required_device m_display; @@ -133,10 +132,6 @@ static INPUT_PORTS_START( savia84 ) INPUT_PORTS_END -void savia84_state::machine_reset() -{ -} - WRITE8_MEMBER( savia84_state::savia84_8255_porta_w ) // OUT F8 - output segments on the selected digit { m_seg = ~data; From c7434c5e466dbaf81feba86129717bda8a61dccd Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 14 May 2020 23:00:28 -0400 Subject: [PATCH 43/69] eurit30: Add two more keys (nw) --- src/mame/drivers/eurit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index f78d91840b4..483f1e2393a 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -110,7 +110,7 @@ static INPUT_PORTS_START(eurit30) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5 MNO") PORT_CODE(KEYCODE_5) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4 JKL") PORT_CODE(KEYCODE_4) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key C5") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key C6") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("+") PORT_CODE(KEYCODE_UP) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key C7") PORT_START("KEYD") @@ -126,7 +126,7 @@ static INPUT_PORTS_START(eurit30) PORT_START("KEYE") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key E0") PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Left") PORT_CODE(KEYCODE_S) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key E2") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("-") PORT_CODE(KEYCODE_DOWN) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Right") PORT_CODE(KEYCODE_F) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Right") PORT_CODE(KEYCODE_G) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Center") PORT_CODE(KEYCODE_D) From 8c7eee4ccc4de46795d58dc5777b2182df83e1b2 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 13:20:42 +1000 Subject: [PATCH 44/69] (nw) babbage: added pwm device --- src/mame/drivers/babbage.cpp | 34 +++++++++++++++------------------- src/mame/layout/babbage.lay | 12 ++++++------ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/mame/drivers/babbage.cpp b/src/mame/drivers/babbage.cpp index 2681cdb1cbe..dafc874de14 100644 --- a/src/mame/drivers/babbage.cpp +++ b/src/mame/drivers/babbage.cpp @@ -17,8 +17,6 @@ Copy the text and Paste into the emulator. =3E^=0F^=D3^=13^=3E^=07^=D3^=13^=3E^=00^=D3^=12^=76^-1000X - ToDo: - - Blank the display if digits aren't being refreshed ***************************************************************************/ @@ -28,6 +26,7 @@ #include "machine/z80ctc.h" #include "machine/z80pio.h" #include "machine/z80daisy.h" +#include "video/pwm.h" #include "babbage.lh" #define MAIN_CLOCK 25e5 @@ -41,13 +40,13 @@ public: , m_pio_1(*this, "z80pio_1") , m_pio_2(*this, "z80pio_2") , m_ctc(*this, "z80ctc") - , m_keyboard(*this, "X%u", 0) - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) { } void babbage(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(pio2_a_r); DECLARE_WRITE8_MEMBER(pio1_b_w); DECLARE_WRITE8_MEMBER(pio2_b_w); @@ -59,18 +58,16 @@ protected: void babbage_io(address_map &map); void babbage_map(address_map &map); -private: - uint8_t m_segment; + uint8_t m_seg; uint8_t m_key; uint8_t m_prev_key; bool m_step; - virtual void machine_start() override { m_digits.resolve(); } required_device m_maincpu; required_device m_pio_1; required_device m_pio_2; required_device m_ctc; - required_ioport_array<4> m_keyboard; - output_finder<33> m_digits; + required_device m_display; + required_ioport_array<4> m_io_keyboard; }; @@ -172,18 +169,15 @@ READ8_MEMBER( babbage_state::pio2_a_r ) WRITE8_MEMBER( babbage_state::pio2_b_w ) { if (BIT(data, 7)) - { m_step = false; - } - else if (!m_step) + else + if (!m_step) { - m_segment = data; + m_seg = data; m_step = true; } else - { - m_digits[data] = m_segment; - } + m_display->matrix(data, m_seg); } static const z80_daisy_config babbage_daisy_chain[] = @@ -200,7 +194,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(babbage_state::keyboard_callback) for (u8 i = 0; i < 4; i++) { - inp = m_keyboard[i]->read(); + inp = m_io_keyboard[i]->read(); for (u8 j = 0; j < 5; j++) if (BIT(inp, j)) @@ -240,6 +234,8 @@ void babbage_state::babbage(machine_config &config) /* video hardware */ config.set_default_layout(layout_babbage); + PWM_DISPLAY(config, m_display).set_size(6, 8); + m_display->set_segmask(0x3f, 0xff); /* Devices */ Z80CTC(config, m_ctc, MAIN_CLOCK); @@ -268,7 +264,7 @@ void babbage_state::babbage(machine_config &config) ***************************************************************************/ ROM_START(babbage) - ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF) + ROM_REGION(0x0800, "maincpu", ROMREGION_ERASEFF) ROM_LOAD("mon.rom", 0x0000, 0x0200, CRC(469bd607) SHA1(8f3489a0f96de6a03b05c1ee01b89d9848f4b152) ) ROM_END diff --git a/src/mame/layout/babbage.lay b/src/mame/layout/babbage.lay index 5e7202a4bc2..5fb9738a286 100644 --- a/src/mame/layout/babbage.lay +++ b/src/mame/layout/babbage.lay @@ -25,22 +25,22 @@ license:CC0 - + - + - + - + - + - + From d47530f1e693f35d0a8e8d068c0702401dc9728d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 13:55:35 +1000 Subject: [PATCH 45/69] (nw) datum: added pwm device --- src/mame/drivers/datum.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/datum.cpp b/src/mame/drivers/datum.cpp index a49a560fe80..8f2bbd13732 100644 --- a/src/mame/drivers/datum.cpp +++ b/src/mame/drivers/datum.cpp @@ -55,6 +55,7 @@ Z1000G #include "machine/6821pia.h" #include "machine/6850acia.h" #include "bus/rs232/rs232.h" +#include "video/pwm.h" #include "datum.lh" @@ -66,9 +67,9 @@ public: , m_pia1(*this, "pia1") , m_pia2(*this, "pia2") , m_acia(*this, "acia") - , m_keyboard(*this, "X%u", 0) , m_maincpu(*this, "maincpu") - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) { } void datum(machine_config &config); @@ -82,13 +83,12 @@ private: void datum_mem(address_map &map); uint8_t m_keydata; virtual void machine_reset() override; - virtual void machine_start() override { m_digits.resolve(); } required_device m_pia1; required_device m_pia2; required_device m_acia; - required_ioport_array<4> m_keyboard; required_device m_maincpu; - output_finder<16> m_digits; + required_device m_display; + required_ioport_array<4> m_io_keyboard; }; @@ -162,7 +162,7 @@ void datum_state::machine_reset() READ8_MEMBER( datum_state::pa_r ) { if (m_keydata < 4) - return m_keyboard[m_keydata]->read(); + return m_io_keyboard[m_keydata]->read(); return 0xff; } @@ -173,7 +173,7 @@ WRITE8_MEMBER( datum_state::pa_w ) data ^= 0xff; if (m_keydata > 3) { - m_digits[m_keydata] = bitswap<8>(data & 0x7f, 7, 0, 5, 6, 4, 2, 1, 3); + m_display->matrix(1<(data, 7, 0, 5, 6, 4, 2, 1, 3)); m_keydata = 0; } @@ -196,6 +196,8 @@ void datum_state::datum(machine_config &config) /* video hardware */ config.set_default_layout(layout_datum); + PWM_DISPLAY(config, m_display).set_size(10, 7); + m_display->set_segmask(0x3f0, 0x7f); /* Devices */ PIA6821(config, m_pia1, 0); // keyboard & display From c6549e644d09a9b055cd7ad3800ad5addd55d0e8 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 14:18:29 +1000 Subject: [PATCH 46/69] (nw) dauphin: added pwm device --- src/mame/drivers/dolphunk.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/dolphunk.cpp b/src/mame/drivers/dolphunk.cpp index f6b6140985b..f1dc5ef5647 100644 --- a/src/mame/drivers/dolphunk.cpp +++ b/src/mame/drivers/dolphunk.cpp @@ -86,6 +86,7 @@ #include "machine/timer.h" #include "sound/spkrdev.h" #include "speaker.h" +#include "video/pwm.h" #include "dolphunk.lh" @@ -98,7 +99,7 @@ public: , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") , m_cass(*this, "cassette") - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") { } void dauphin(machine_config &config); @@ -117,11 +118,10 @@ private: bool m_cassbit; bool m_cassold; bool m_speaker_state; - virtual void machine_start() override { m_digits.resolve(); } required_device m_maincpu; required_device m_speaker; required_device m_cass; - output_finder<4> m_digits; + required_device m_display; }; READ_LINE_MEMBER( dauphin_state::cass_r ) @@ -131,7 +131,7 @@ READ_LINE_MEMBER( dauphin_state::cass_r ) WRITE8_MEMBER( dauphin_state::port00_w ) { - m_digits[offset] = data; + m_display->matrix(1<set_segmask(0x0f, 0xff); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -250,7 +252,7 @@ void dauphin_state::dauphin(machine_config &config) /* ROM definition */ ROM_START( dauphin ) - ROM_REGION( 0x8000, "maincpu", 0 ) + ROM_REGION( 0x1000, "maincpu", 0 ) ROM_LOAD( "dolphin_mo.rom", 0x0000, 0x0100, CRC(a8811f48) SHA1(233c629dc20fac286c8c1559e461bb0b742a675e) ) // This one is used in winarcadia but it is a bad dump, we use the corrected one above //ROM_LOAD( "dolphin_mo.rom", 0x0000, 0x0100, BAD_DUMP CRC(1ac4ac18) SHA1(62a63de6fcd6cd5fcee930d31c73fe603647f06c) ) From 1726cfe706d87669df4e8a8a63d6c95fe094b7ee Mon Sep 17 00:00:00 2001 From: smf- Date: Fri, 15 May 2020 07:31:44 +0100 Subject: [PATCH 47/69] fix for vs2019, expression does not evaluate to a constant (nw) --- src/devices/bus/ieee488/grid2102.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/bus/ieee488/grid2102.cpp b/src/devices/bus/ieee488/grid2102.cpp index d15e5a4bcdb..5505d6533ba 100644 --- a/src/devices/bus/ieee488/grid2102.cpp +++ b/src/devices/bus/ieee488/grid2102.cpp @@ -91,9 +91,9 @@ void grid210x_device::device_start() { void grid210x_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { if (m_floppy_loop_state == GRID210X_STATE_READING_DATA) { - uint8_t data[io_size]; + std::unique_ptr data(new uint8_t[io_size]); fseek(floppy_sector_number * 512, SEEK_SET); - fread(data, io_size); + fread(data.get(), io_size); for (int i = 0; i < io_size; i++) { m_output_data_buffer.push(data[i]); } From a8a043cfad150a070014ba588901a8d595a3fea5 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 17:25:40 +1000 Subject: [PATCH 48/69] (nw) emma2: added pwm device --- src/mame/drivers/emma2.cpp | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/src/mame/drivers/emma2.cpp b/src/mame/drivers/emma2.cpp index e348dd17dc8..b8446b2772e 100644 --- a/src/mame/drivers/emma2.cpp +++ b/src/mame/drivers/emma2.cpp @@ -52,6 +52,7 @@ To Do: #include "machine/6821pia.h" #include "imagedev/cassette.h" #include "speaker.h" +#include "video/pwm.h" #include "emma2.lh" @@ -64,8 +65,8 @@ public: , m_cassette(*this, "cassette") , m_via(*this, "via") , m_pia(*this, "pia") - , m_keyboard(*this, "X%u", 0) - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) { } void emma2(machine_config &config); @@ -75,18 +76,16 @@ private: DECLARE_WRITE8_MEMBER(digit_w); DECLARE_READ8_MEMBER(keyboard_r); virtual void machine_reset() override; - virtual void machine_start() override; void mem_map(address_map &map); uint8_t m_digit; - bool m_dig_change; required_device m_maincpu; required_device m_cassette; required_device m_via; required_device m_pia; - required_ioport_array<8> m_keyboard; - output_finder<8> m_digits; + required_device m_display; + required_ioport_array<8> m_io_keyboard; }; void emma2_state::mem_map(address_map &map) @@ -156,38 +155,24 @@ WRITE8_MEMBER( emma2_state::digit_w ) m_cassette->output( BIT(data, 6) ? +1.0 : -1.0); data &= 7; - if (data != m_digit) - { - m_digit = data; - m_dig_change = true; - } + m_digit = data; } WRITE8_MEMBER( emma2_state::segment_w ) { - if (m_dig_change) - { - m_dig_change = false; - m_digits[m_digit] = data; - } + m_display->matrix(1<read(); + u8 data = m_io_keyboard[m_digit]->read(); data |= ((m_cassette)->input() < 0.0) ? 0x80 : 0; return data; } -void emma2_state::machine_start() -{ - m_digits.resolve(); -} - void emma2_state::machine_reset() { m_digit = 0; - m_dig_change = 0; } void emma2_state::emma2(machine_config &config) @@ -198,6 +183,8 @@ void emma2_state::emma2(machine_config &config) /* video hardware */ config.set_default_layout(layout_emma2); + PWM_DISPLAY(config, m_display).set_size(8, 8); + m_display->set_segmask(0xff, 0xff); /* Devices */ VIA6522(config, m_via, 1'000'000); // #2 from cpu From 5133ecb173a072fbd0c137d8f9aa622eff01f05d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 15 May 2020 17:46:18 +1000 Subject: [PATCH 49/69] (nw) mk14: added pwm device --- src/mame/drivers/mk14.cpp | 44 ++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/src/mame/drivers/mk14.cpp b/src/mame/drivers/mk14.cpp index 67c0c101e5f..44ec47ce11c 100644 --- a/src/mame/drivers/mk14.cpp +++ b/src/mame/drivers/mk14.cpp @@ -39,6 +39,7 @@ TODO: #include "sound/dac.h" #include "sound/volt_reg.h" #include "speaker.h" +#include "video/pwm.h" #include "mk14.lh" @@ -49,11 +50,11 @@ public: mk14_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_keyboard(*this, "X.%u", 0) , m_cass(*this, "cassette") , m_dac(*this, "dac") - , m_digits(*this, "digit%u", 0U) - { } + , m_display(*this, "display") + , m_io_keyboard(*this, "X%u", 0U) + { } void mk14(machine_config &config); @@ -65,13 +66,11 @@ private: DECLARE_READ_LINE_MEMBER(cass_r); void mem_map(address_map &map); - virtual void machine_reset() override; - virtual void machine_start() override; required_device m_maincpu; - required_ioport_array<8> m_keyboard; required_device m_cass; required_device m_dac; - output_finder<8> m_digits; + required_device m_display; + required_ioport_array<8> m_io_keyboard; }; /* @@ -95,7 +94,7 @@ F00-FFF 256 bytes RAM (Standard) / VDU RAM Decoded by 1111 READ8_MEMBER( mk14_state::keyboard_r ) { if (offset < 8) - return m_keyboard[offset]->read(); + return m_io_keyboard[offset]->read(); else return 0xff; } @@ -103,7 +102,7 @@ READ8_MEMBER( mk14_state::keyboard_r ) WRITE8_MEMBER( mk14_state::display_w ) { if (offset < 8 ) - m_digits[offset] = data; + m_display->matrix(1< m_maincpu; required_device m_cass; required_ioport_array<6> m_io_keyboard; - output_finder<6> m_digits; + required_device m_display; }; TIMER_DEVICE_CALLBACK_MEMBER( pro80_state::kansas_r ) @@ -95,7 +94,7 @@ WRITE8_MEMBER( pro80_state::segment_w ) { for (u8 i = 0; i < 6; i++) if (!BIT(m_digit_sel, i)) - m_digits[i] = data; + m_display->matrix(1<set_segmask(0x3f, 0xff); Z80PIO(config, "pio", XTAL(4'000'000) / 2); @@ -196,7 +197,7 @@ void pro80_state::pro80(machine_config &config) /* ROM definition */ ROM_START( pro80 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0400, "maincpu", 0 ) // This rom dump is taken out of manual for this machine ROM_LOAD( "pro80.bin", 0x0000, 0x0400, CRC(1bf6e0a5) SHA1(eb45816337e08ed8c30b589fc24960dc98b94db2)) ROM_END From d01c23cdc8f0291d7f65ca9f55c927d80836b313 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 15 May 2020 11:26:14 +0200 Subject: [PATCH 51/69] datum,emma2: small fix to matrix() calls (nw) --- src/mame/drivers/datum.cpp | 14 +++++--------- src/mame/drivers/emma2.cpp | 9 ++++++--- src/mame/layout/saitek_ssystem4.lay | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/mame/drivers/datum.cpp b/src/mame/drivers/datum.cpp index 8f2bbd13732..4e86ef3bf2e 100644 --- a/src/mame/drivers/datum.cpp +++ b/src/mame/drivers/datum.cpp @@ -82,6 +82,7 @@ private: DECLARE_WRITE8_MEMBER(pb_w); void datum_mem(address_map &map); uint8_t m_keydata; + uint8_t m_seg; virtual void machine_reset() override; required_device m_pia1; required_device m_pia2; @@ -156,6 +157,7 @@ INPUT_CHANGED_MEMBER( datum_state::trigger_nmi ) void datum_state::machine_reset() { m_keydata = 0; + m_seg = 0; } // read keyboard @@ -170,21 +172,15 @@ READ8_MEMBER( datum_state::pa_r ) // write display segments WRITE8_MEMBER( datum_state::pa_w ) { - data ^= 0xff; - if (m_keydata > 3) - { - m_display->matrix(1<(data, 7, 0, 5, 6, 4, 2, 1, 3)); - m_keydata = 0; - } - - return; + m_seg = bitswap<8>(~data, 7, 0, 5, 6, 4, 2, 1, 3); + m_display->matrix(1<(data, 7, 6, 5, 4, 0, 1, 2, 3) & 15; - return; + m_display->matrix(1< m_maincpu; required_device m_cassette; required_device m_via; @@ -153,13 +154,14 @@ WRITE8_MEMBER( emma2_state::digit_w ) { m_cassette->output( BIT(data, 6) ? +1.0 : -1.0); - data &= 7; - m_digit = data; + m_digit = data & 7; + m_display->matrix(1 << m_digit, m_seg); } WRITE8_MEMBER( emma2_state::segment_w ) { - m_display->matrix(1<matrix(1 << m_digit, m_seg); } READ8_MEMBER( emma2_state::keyboard_r ) @@ -171,6 +173,7 @@ READ8_MEMBER( emma2_state::keyboard_r ) void emma2_state::machine_reset() { + m_seg = 0; m_digit = 0; } diff --git a/src/mame/layout/saitek_ssystem4.lay b/src/mame/layout/saitek_ssystem4.lay index 46a4bdaa72c..9a317d17d33 100644 --- a/src/mame/layout/saitek_ssystem4.lay +++ b/src/mame/layout/saitek_ssystem4.lay @@ -87,7 +87,7 @@ license:CC0 - + From 88edd7c665358de5c23d42637e4c17f878c1e275 Mon Sep 17 00:00:00 2001 From: couriersud Date: Thu, 14 May 2020 11:58:42 +0200 Subject: [PATCH 52/69] netlist: code cleanup and development stage tristate [Couriersud] Code cleanup to better separate the following stages: - parsing - setup - run In addition preliminary native tristate support was added. Not yet production ready, please don't use it. --- scripts/src/netlist.lua | 2 + src/devices/machine/netlist.cpp | 36 ++--- src/devices/machine/netlist.h | 10 +- src/lib/netlist/analog/nld_bjt.cpp | 59 ++++---- src/lib/netlist/analog/nlid_twoterm.cpp | 24 ++- src/lib/netlist/analog/nlid_twoterm.h | 4 + src/lib/netlist/build/makefile | 3 +- src/lib/netlist/devices/net_lib.cpp | 2 + src/lib/netlist/devices/nld_74125.cpp | 122 +++++++++++++++ src/lib/netlist/devices/nld_74125.h | 92 +++++++++++ src/lib/netlist/devices/nlid_proxy.cpp | 45 +++--- src/lib/netlist/devices/nlid_proxy.h | 2 +- src/lib/netlist/examples/74125.cpp | 40 +++++ src/lib/netlist/nl_base.cpp | 61 +++----- src/lib/netlist/nl_base.h | 64 ++++++-- src/lib/netlist/nl_setup.cpp | 151 ++++++++++++------- src/lib/netlist/nl_setup.h | 49 +++--- src/lib/netlist/plib/palloc.h | 54 ++++--- src/lib/netlist/plib/pmempool.h | 12 ++ src/lib/netlist/prg/nltool.cpp | 3 +- src/lib/netlist/solver/nld_matrix_solver.cpp | 8 +- src/lib/netlist/solver/nld_matrix_solver.h | 2 +- 22 files changed, 606 insertions(+), 239 deletions(-) create mode 100644 src/lib/netlist/devices/nld_74125.cpp create mode 100644 src/lib/netlist/devices/nld_74125.h create mode 100644 src/lib/netlist/examples/74125.cpp diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 20420d87a6c..566bb3ad624 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -158,6 +158,8 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_74107.h", MAME_DIR .. "src/lib/netlist/devices/nld_74123.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74123.h", + MAME_DIR .. "src/lib/netlist/devices/nld_74125.cpp", + MAME_DIR .. "src/lib/netlist/devices/nld_74125.h", MAME_DIR .. "src/lib/netlist/devices/nld_74153.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74153.h", MAME_DIR .. "src/lib/netlist/devices/nld_74161.cpp", diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 1c903b7b928..d39bb899d67 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -639,9 +639,9 @@ netlist::setup_t &netlist_mame_device::setup() return m_netlist->setup(); } -void netlist_mame_device::register_memregion_source(netlist::nlparse_t &setup, device_t &dev, const char *name) +void netlist_mame_device::register_memregion_source(netlist::nlparse_t &parser, device_t &dev, const char *name) { - setup.register_source(dev, pstring(name)); + parser.register_source(dev, pstring(name)); } void netlist_mame_analog_input_device::write(const double val) @@ -781,16 +781,14 @@ void netlist_mame_analog_output_device::custom_netlist_additions(netlist::netlis { const pstring pin(m_in); pstring dname = pstring("OUT_") + pin; - pstring dfqn = nlstate.parser().build_fqn(dname); /* ignore if no running machine -> called within device_validity_check context */ if (owner()->has_running_machine()) m_delegate.resolve(); - auto dev = nlstate.make_object(nlstate, dfqn); - //static_cast(dev.get())->register_callback(std::move(m_delegate)); + auto dev = nlstate.make_object(nlstate, dname); dev->register_callback(std::move(m_delegate)); - nlstate.register_device(dfqn, std::move(dev)); + nlstate.register_device(dname, std::move(dev)); nlstate.parser().register_link(dname + ".IN", pin); } @@ -816,15 +814,14 @@ void netlist_mame_logic_output_device::custom_netlist_additions(netlist::netlist { pstring pin(m_in); pstring dname = "OUT_" + pin; - pstring dfqn = nlstate.parser().build_fqn(dname); /* ignore if no running machine -> called within device_validity_check context */ if (owner()->has_running_machine()) m_delegate.resolve(); - auto dev = nlstate.make_object(nlstate, dfqn); + auto dev = nlstate.make_object(nlstate, dname); dev->register_callback(std::move(m_delegate)); - nlstate.register_device(dfqn, std::move(dev)); + nlstate.register_device(dname, std::move(dev)); nlstate.parser().register_link(dname + ".IN", pin); } @@ -1086,14 +1083,14 @@ void netlist_mame_device::common_dev_start(netlist::netlist_state_t *lnetlist) c bool err=false; bool v = plib::pstonum_ne(p, err); if (err) - lsetup.parser().log().warning("NL_STATS: invalid value {1}", p); + lsetup.log().warning("NL_STATS: invalid value {1}", p); else lnetlist->exec().enable_stats(v); } // register additional devices - nl_register_devices(lsetup); + nl_register_devices(lsetup.parser()); /* let sub-devices add sources and do stuff prior to parsing */ for (device_t &d : subdevices()) @@ -1102,7 +1099,7 @@ void netlist_mame_device::common_dev_start(netlist::netlist_state_t *lnetlist) c if( sdev != nullptr ) { LOGDEVCALLS("Preparse subdevice %s/%s\n", d.name(), d.shortname()); - sdev->pre_parse_action(*lnetlist); + sdev->pre_parse_action(lsetup.parser()); } } @@ -1112,7 +1109,6 @@ void netlist_mame_device::common_dev_start(netlist::netlist_state_t *lnetlist) c m_setup_func(lsetup.parser()); -#if 1 /* let sub-devices tweak the netlist */ for (device_t &d : subdevices()) { @@ -1123,8 +1119,6 @@ void netlist_mame_device::common_dev_start(netlist::netlist_state_t *lnetlist) c sdev->custom_netlist_additions(*lnetlist); } } - lsetup.prepare_to_run(); -#endif } plib::unique_ptr netlist_mame_device::base_validity_check(validity_checker &valid) const @@ -1135,6 +1129,7 @@ plib::unique_ptr netlist_mame_device::base_validity_ch // enable validation mode lnetlist->set_extended_validation(true); common_dev_start(lnetlist.get()); + lnetlist->setup().prepare_to_run(); for (device_t &d : subdevices()) { @@ -1184,6 +1179,7 @@ void netlist_mame_device::device_start() } common_dev_start(m_netlist.get()); + m_netlist->setup().prepare_to_run(); m_netlist->save(*this, m_rem, pstring(this->name()), "m_rem"); m_netlist->save(*this, m_div, pstring(this->name()), "m_div"); @@ -1334,9 +1330,9 @@ void netlist_mame_cpu_device::device_start() } -void netlist_mame_cpu_device::nl_register_devices(netlist::setup_t &lsetup) const +void netlist_mame_cpu_device::nl_register_devices(netlist::nlparse_t &parser) const { - lsetup.parser().factory().add( "NETDEV_CALLBACK", "-", __FILE__); + parser.factory().add( "NETDEV_CALLBACK", "-", __FILE__); } uint64_t netlist_mame_cpu_device::execute_clocks_to_cycles(uint64_t clocks) const noexcept @@ -1487,10 +1483,10 @@ void netlist_mame_sound_device::device_start() } -void netlist_mame_sound_device::nl_register_devices(netlist::setup_t &lsetup) const +void netlist_mame_sound_device::nl_register_devices(netlist::nlparse_t &parser) const { - lsetup.parser().factory().add("NETDEV_SOUND_OUT", "+CHAN", __FILE__); - lsetup.parser().factory().add("NETDEV_SOUND_IN", "-", __FILE__); + parser.factory().add("NETDEV_SOUND_OUT", "+CHAN", __FILE__); + parser.factory().add("NETDEV_SOUND_IN", "-", __FILE__); } void netlist_mame_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h index 9b11b1b5549..c447174353d 100644 --- a/src/devices/machine/netlist.h +++ b/src/devices/machine/netlist.h @@ -78,7 +78,7 @@ public: void update_icount(netlist::netlist_time_ext time) noexcept; void check_mame_abort_slice() noexcept; - static void register_memregion_source(netlist::nlparse_t &setup, device_t &dev, const char *name); + static void register_memregion_source(netlist::nlparse_t &parser, device_t &dev, const char *name); int m_icount; @@ -99,7 +99,7 @@ protected: netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); // Custom to netlist ... - virtual void nl_register_devices(netlist::setup_t &lsetup) const { } + virtual void nl_register_devices(netlist::nlparse_t &parser) const { } // device_t overrides virtual void device_config_complete() override; @@ -178,7 +178,7 @@ public: protected: // netlist_mame_device - virtual void nl_register_devices(netlist::setup_t &lsetup) const override; + virtual void nl_register_devices(netlist::nlparse_t &parser) const override; // device_t overrides virtual void device_start() override; @@ -238,7 +238,7 @@ public: protected: // netlist_mame_device - virtual void nl_register_devices(netlist::setup_t &lsetup) const override; + virtual void nl_register_devices(netlist::nlparse_t &parser) const override; // device_t overrides virtual void device_start() override; @@ -269,7 +269,7 @@ public: } virtual void custom_netlist_additions(netlist::netlist_state_t &nlstate) { } - virtual void pre_parse_action(netlist::netlist_state_t &nlstate) { } + virtual void pre_parse_action(netlist::nlparse_t &parser) { } virtual void validity_helper(validity_checker &valid, netlist::netlist_state_t &nlstate) const { } diff --git a/src/lib/netlist/analog/nld_bjt.cpp b/src/lib/netlist/analog/nld_bjt.cpp index 47985c7a2d4..0a8936d0885 100644 --- a/src/lib/netlist/analog/nld_bjt.cpp +++ b/src/lib/netlist/analog/nld_bjt.cpp @@ -47,6 +47,11 @@ namespace analog // nld_Q - Base classes // ----------------------------------------------------------------------------- + enum class bjt_type { + BJT_NPN, + BJT_PNP + }; + /// \brief Class representing the bjt model parameters. /// /// This is the model representation of the bjt model. Typically, SPICE uses @@ -101,7 +106,8 @@ namespace analog { public: bjt_model_t(param_model_t &model) - : m_IS (model, "IS") + : m_type((model.type() == "NPN") ? bjt_type::BJT_NPN : bjt_type::BJT_PNP) + , m_IS (model, "IS") , m_BF (model, "BF") , m_NF (model, "NF") , m_BR (model, "BR") @@ -110,6 +116,7 @@ namespace analog , m_CJC(model, "CJC") {} + bjt_type m_type; param_model_t::value_t m_IS; //!< transport saturation current param_model_t::value_t m_BF; //!< ideal maximum forward beta param_model_t::value_t m_NF; //!< forward current emission coefficient @@ -125,14 +132,10 @@ namespace analog NETLIB_BASE_OBJECT(QBJT) { public: - enum q_type { - BJT_NPN, - BJT_PNP - }; NETLIB_CONSTRUCTOR_EX(QBJT, const pstring &model = "NPN") , m_model(*this, "MODEL", model) - , m_qtype(BJT_NPN) + , m_qtype(bjt_type::BJT_NPN) { } @@ -141,14 +144,14 @@ namespace analog //NETLIB_RESETI(); NETLIB_UPDATEI(); - q_type qtype() const noexcept { return m_qtype; } - bool is_qtype(q_type atype) const noexcept { return m_qtype == atype; } - void set_qtype(q_type atype) noexcept { m_qtype = atype; } + bjt_type qtype() const noexcept { return m_qtype; } + bool is_qtype(bjt_type atype) const noexcept { return m_qtype == atype; } + void set_qtype(bjt_type atype) noexcept { m_qtype = atype; } protected: param_model_t m_model; private: - q_type m_qtype; + bjt_type m_qtype; }; // ----------------------------------------------------------------------------- @@ -172,13 +175,14 @@ namespace analog NETLIB_OBJECT_DERIVED(QBJT_switch, QBJT) { NETLIB_CONSTRUCTOR(QBJT_switch) - , m_RB(*this, "m_RB", true) - , m_RC(*this, "m_RC", true) - , m_BC(*this, "m_BC", true) - , m_gB(nlconst::cgmin()) - , m_gC(nlconst::cgmin()) - , m_V(nlconst::zero()) - , m_state_on(*this, "m_state_on", 0U) + , m_modacc(m_model) + , m_RB(*this, "m_RB", true) + , m_RC(*this, "m_RC", true) + , m_BC(*this, "m_BC", true) + , m_gB(nlconst::cgmin()) + , m_gC(nlconst::cgmin()) + , m_V(nlconst::zero()) + , m_state_on(*this, "m_state_on", 0U) { register_subalias("B", m_RB.P()); register_subalias("E", m_RB.N()); @@ -195,6 +199,7 @@ namespace analog NETLIB_UPDATE_TERMINALSI(); private: + bjt_model_t m_modacc; nld_twoterm m_RB; nld_twoterm m_RC; nld_twoterm m_BC; @@ -314,15 +319,13 @@ namespace analog NETLIB_UPDATE_PARAM(QBJT_switch) { - bjt_model_t model(m_model); - - nl_fptype IS = model.m_IS; - nl_fptype BF = model.m_BF; - nl_fptype NF = model.m_NF; - //nl_fptype VJE = model.dValue("VJE", 0.75); + nl_fptype IS = m_modacc.m_IS; + nl_fptype BF = m_modacc.m_BF; + nl_fptype NF = m_modacc.m_NF; + //nl_fptype VJE = m_modacc.dValue("VJE", 0.75); // FIXME: check for PNP as well and bail out - set_qtype((m_model.type() == "NPN") ? BJT_NPN : BJT_PNP); + set_qtype(m_modacc.m_type); nl_fptype alpha = BF / (nlconst::one() + BF); @@ -347,7 +350,7 @@ namespace analog NETLIB_UPDATE_TERMINALS(QBJT_switch) { - const nl_fptype m = (is_qtype( BJT_NPN) ? 1 : -1); + const nl_fptype m = (is_qtype( bjt_type::BJT_NPN) ? 1 : -1); const unsigned new_state = (m_RB.deltaV() * m > m_V ) ? 1 : 0; if (m_state_on ^ new_state) @@ -398,7 +401,7 @@ namespace analog NETLIB_UPDATE_TERMINALS(QBJT_EB) { - const nl_fptype polarity(qtype() == BJT_NPN ? nlconst::one() : -nlconst::one()); + const nl_fptype polarity(qtype() == bjt_type::BJT_NPN ? nlconst::one() : -nlconst::one()); m_gD_BE.update_diode(-m_D_EB.deltaV() * polarity); m_gD_BC.update_diode(-m_D_CB.deltaV() * polarity); @@ -430,10 +433,10 @@ namespace analog nl_fptype NF = m_modacc.m_NF; nl_fptype BR = m_modacc.m_BR; nl_fptype NR = m_modacc.m_NR; - //nl_fptype VJE = m_model.dValue("VJE", 0.75); + //nl_fptype VJE = m_m_modacc.dValue("VJE", 0.75); // FIXME: check for PNP as well and bail out - set_qtype((m_model.type() == "NPN") ? BJT_NPN : BJT_PNP); + set_qtype(m_modacc.m_type); m_alpha_f = BF / (nlconst::one() + BF); m_alpha_r = BR / (nlconst::one() + BR); diff --git a/src/lib/netlist/analog/nlid_twoterm.cpp b/src/lib/netlist/analog/nlid_twoterm.cpp index 1981b1c6e12..a449e19b078 100644 --- a/src/lib/netlist/analog/nlid_twoterm.cpp +++ b/src/lib/netlist/analog/nlid_twoterm.cpp @@ -145,9 +145,8 @@ namespace analog NETLIB_RESET(D) { - diode_model_t modacc(m_model); - nl_fptype Is = modacc.m_IS; - nl_fptype n = modacc.m_N; + nl_fptype Is = m_modacc.m_IS; + nl_fptype n = m_modacc.m_N; m_D.set_param(Is, n, exec().gmin(), nlconst::T0()); set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq()); @@ -155,9 +154,8 @@ namespace analog NETLIB_UPDATE_PARAM(D) { - diode_model_t modacc(m_model); - nl_fptype Is = modacc.m_IS; - nl_fptype n = modacc.m_N; + nl_fptype Is = m_modacc.m_IS; + nl_fptype n = m_modacc.m_N; m_D.set_param(Is, n, exec().gmin(), nlconst::T0()); } @@ -178,21 +176,19 @@ namespace analog NETLIB_RESET(Z) { - zdiode_model_t modacc(m_model); - nl_fptype IsBV = modacc.m_IBV / (plib::exp(modacc.m_BV / nlconst::np_VT(modacc.m_NBV)) - nlconst::one()); + nl_fptype IsBV = m_modacc.m_IBV / (plib::exp(m_modacc.m_BV / nlconst::np_VT(m_modacc.m_NBV)) - nlconst::one()); - m_D.set_param(modacc.m_IS, modacc.m_N, exec().gmin(), nlconst::T0()); - m_R.set_param(IsBV, modacc.m_NBV, exec().gmin(), nlconst::T0()); + m_D.set_param(m_modacc.m_IS, m_modacc.m_N, exec().gmin(), nlconst::T0()); + m_R.set_param(IsBV, m_modacc.m_NBV, exec().gmin(), nlconst::T0()); set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq()); } NETLIB_UPDATE_PARAM(Z) { - zdiode_model_t modacc(m_model); - nl_fptype IsBV = modacc.m_IBV / (plib::exp(modacc.m_BV / nlconst::np_VT(modacc.m_NBV)) - nlconst::one()); + nl_fptype IsBV = m_modacc.m_IBV / (plib::exp(m_modacc.m_BV / nlconst::np_VT(m_modacc.m_NBV)) - nlconst::one()); - m_D.set_param(modacc.m_IS, modacc.m_N, exec().gmin(), nlconst::T0()); - m_R.set_param(IsBV, modacc.m_NBV, exec().gmin(), nlconst::T0()); + m_D.set_param(m_modacc.m_IS, m_modacc.m_N, exec().gmin(), nlconst::T0()); + m_R.set_param(IsBV, m_modacc.m_NBV, exec().gmin(), nlconst::T0()); set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq()); } diff --git a/src/lib/netlist/analog/nlid_twoterm.h b/src/lib/netlist/analog/nlid_twoterm.h index 14fad2cf051..87411ee8109 100644 --- a/src/lib/netlist/analog/nlid_twoterm.h +++ b/src/lib/netlist/analog/nlid_twoterm.h @@ -488,6 +488,7 @@ namespace analog public: NETLIB_CONSTRUCTOR_EX(D, const pstring &model = "D") , m_model(*this, "MODEL", model) + , m_modacc(m_model) , m_D(*this, "m_D") { register_subalias("A", P()); @@ -504,6 +505,7 @@ namespace analog private: param_model_t m_model; + diode_model_t m_modacc; generic_diode m_D; }; @@ -516,6 +518,7 @@ namespace analog public: NETLIB_CONSTRUCTOR_EX(Z, const pstring &model = "D") , m_model(*this, "MODEL", model) + , m_modacc(m_model) , m_D(*this, "m_D") , m_R(*this, "m_R") { @@ -533,6 +536,7 @@ namespace analog private: param_model_t m_model; + zdiode_model_t m_modacc; generic_diode m_D; // REVERSE diode generic_diode m_R; diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 7ca0c8de42e..037e6e966c8 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -73,7 +73,7 @@ TIDY_DB = $(OBJ)/compile_commands.json # LTO = -flto=4 -fuse-linker-plugin -flto-partition=balanced -Wodr -CCOREFLAGS = -g -O3 -std=c++14 -I$(CURDIR)/.. -I$(CURDIR)/../.. +CCOREFLAGS = -g -O3 -std=c++17 -I$(CURDIR)/.. -I$(CURDIR)/../.. CFLAGS = $(LTO) $(CCOREFLAGS) $(CEXTRAFLAGS) @@ -162,6 +162,7 @@ NLOBJS := \ $(NLOBJ)/devices/nld_7497.o \ $(NLOBJ)/devices/nld_74107.o \ $(NLOBJ)/devices/nld_74123.o \ + $(NLOBJ)/devices/nld_74125.o \ $(NLOBJ)/devices/nld_74153.o \ $(NLOBJ)/devices/nld_74161.o \ $(NLOBJ)/devices/nld_74164.o \ diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 0741c598517..1616bae4ece 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -109,6 +109,8 @@ namespace devices LIB_ENTRY(74107A) // FIXME: implement missing DIP LIB_ENTRY(74123) LIB_ENTRY(74123_dip) + LIB_ENTRY(74125) + LIB_ENTRY(74126) LIB_ENTRY(74153) LIB_ENTRY(74153_dip) LIB_ENTRY(74161) diff --git a/src/lib/netlist/devices/nld_74125.cpp b/src/lib/netlist/devices/nld_74125.cpp new file mode 100644 index 00000000000..bac94c18d22 --- /dev/null +++ b/src/lib/netlist/devices/nld_74125.cpp @@ -0,0 +1,122 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74125.c + * + */ + +#include "nld_74125.h" +#include "nl_base.h" + +namespace netlist +{ + template + struct uptr : public unique_pool_ptr + { + uptr() = default; + + using base_type = unique_pool_ptr; + + template::value>::type> + uptr(O &owner, const pstring &name, Args&&... args) + : unique_pool_ptr(static_cast(owner).state().make_object(owner, name, std::forward(args)...)) + { } + + template + uptr(typename std::enable_if< + std::is_base_of::value, O>::type &owner, const pstring &name, Args&&... args) + : unique_pool_ptr(static_cast(owner).make_object(owner, name, std::forward(args)...)) + { } + + C14CONSTEXPR auto operator ()() noexcept -> decltype((*unique_pool_ptr::get())()) { return (*this->get())(); } + constexpr auto operator ()() const noexcept -> const decltype((*unique_pool_ptr::get())()) { return (*this->get())(); } + }; + + namespace devices + { + + template + NETLIB_OBJECT(74125_base) + { + NETLIB_CONSTRUCTOR(74125_base) + , m_A(*this, "A", NETLIB_DELEGATE(74125_base, A)) + , m_G(*this, "G", NETLIB_DELEGATE(74125_base, G)) + , m_Y(*this, "Y", NLTIME_FROM_NS(11), NLTIME_FROM_NS(13)) + , m_power_pins(*this) + { + } + + private: + NETLIB_RESETI() + { + } + + NETLIB_UPDATEI() + { + // this one is only called during startup. Ensure all outputs + // are in a consistent state. + m_Y.set_tristate(m_G() ^ INVERT_G); + m_Y.push(m_A(), m_A() ? NLTIME_FROM_NS(8) : NLTIME_FROM_NS(12)); + } + + NETLIB_HANDLERI(A) + { + m_Y.push(m_A(), m_A() ? NLTIME_FROM_NS(8) : NLTIME_FROM_NS(12)); + } + + NETLIB_HANDLERI(G) + { + m_Y.set_tristate(m_G() ^ INVERT_G); + } + + logic_input_t m_A; + uptr m_G; + tristate_output_t m_Y; + nld_power_pins m_power_pins; + }; + +#if 0 + template + NETLIB_OBJECT(74125_dip_base) + { + NETLIB_CONSTRUCTOR(74125_dip_base) + , A(*this, "A") + { + this->register_subalias("1", "A.CLRQ"); + this->register_subalias("2", "A.CLK"); + this->register_subalias("3", "A.A"); + this->register_subalias("4", "A.B"); + this->register_subalias("5", "A.C"); + this->register_subalias("6", "A.D"); + this->register_subalias("7", "A.ENP"); + this->register_subalias("8", "A.GND"); + + this->register_subalias("9", "A.LOADQ"); + this->register_subalias("10", "A.ENT"); + this->register_subalias("11", "A.QD"); + this->register_subalias("12", "A.QC"); + this->register_subalias("13", "A.QB"); + this->register_subalias("14", "A.QA"); + this->register_subalias("15", "A.RC"); + this->register_subalias("16", "A.VCC"); + } + private: + NETLIB_SUB(74125_base) A; + }; + using NETLIB_NAME(74163) = NETLIB_NAME(74125_base); + using NETLIB_NAME(74125_dip) = NETLIB_NAME(74125_dip_base); + using NETLIB_NAME(74163_dip) = NETLIB_NAME(74125_dip_base); + NETLIB_DEVICE_IMPL(74125_dip, "TTL_74125_DIP", "") + + NETLIB_DEVICE_IMPL(74163, "TTL_74163", "+CLK,+ENP,+ENT,+CLRQ,+LOADQ,+A,+B,+C,+D,@VCC,@GND") + NETLIB_DEVICE_IMPL(74163_dip, "TTL_74163_DIP", "") +#endif + using NETLIB_NAME(74125) = NETLIB_NAME(74125_base)<1>; + using NETLIB_NAME(74126) = NETLIB_NAME(74125_base)<0>; + + NETLIB_DEVICE_IMPL(74125, "TTL_74125", "") + NETLIB_DEVICE_IMPL(74126, "TTL_74126", "") + + } //namespace devices +} // namespace netlist diff --git a/src/lib/netlist/devices/nld_74125.h b/src/lib/netlist/devices/nld_74125.h new file mode 100644 index 00000000000..38f9f245a9a --- /dev/null +++ b/src/lib/netlist/devices/nld_74125.h @@ -0,0 +1,92 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74125.h + * + * DM74125: Synchronous 4-Bit Counters + * + * +--------------+ + * /CLEAR |1 ++ 16| VCC + * CLOCK |2 15| RC (Ripple Carry) + * A |3 14| QA + * B |4 74125 13| QB + * C |5 12| QC + * D |6 11| QD + * Enable P |7 10| Enable T + * GND |8 9| /LOAD + * +--------------+ + * + * Counter Sequence + * + * +-------++----+----+----+----+----+ + * | COUNT || QD | QC | QB | QA | RC | + * +=======++====+====+====+====+====+ + * | 0 || 0 | 0 | 0 | 0 | 0 | + * | 1 || 0 | 0 | 0 | 1 | 0 | + * | 2 || 0 | 0 | 1 | 0 | 0 | + * | 3 || 0 | 0 | 1 | 1 | 0 | + * | 4 || 0 | 1 | 0 | 0 | 0 | + * | 5 || 0 | 1 | 0 | 1 | 0 | + * | 6 || 0 | 1 | 1 | 0 | 0 | + * | 7 || 0 | 1 | 1 | 1 | 0 | + * | 8 || 1 | 0 | 0 | 0 | 0 | + * | 9 || 1 | 0 | 0 | 1 | 0 | + * | 10 || 1 | 0 | 1 | 0 | 0 | + * | 11 || 1 | 0 | 1 | 1 | 0 | + * | 12 || 1 | 1 | 0 | 0 | 0 | + * | 13 || 1 | 1 | 0 | 1 | 0 | + * | 14 || 1 | 1 | 1 | 0 | 0 | + * | 15 || 1 | 1 | 1 | 1 | 1 | + * +-------++----+----+----+----+----+ + * + * Reset count function: Please refer to + * National Semiconductor datasheet (timing diagram) + * + * Naming conventions follow National Semiconductor datasheet + * + * TODO: DM74161 is compatible to DM74125 (both asynchronous clear) + * DM74163 has asynchronous clear (on L to H transition of clock) + */ + +#ifndef NLD_74125_H_ +#define NLD_74125_H_ + +#include "netlist/nl_setup.h" + +#if 0 +#define TTL_74125(name, cCLK, cENP, cENT, cCLRQ, cLOADQ, cA, cB, cC, cD) \ + NET_REGISTER_DEV(TTL_74125, name) \ + NET_CONNECT(name, GND, GND) \ + NET_CONNECT(name, VCC, VCC) \ + NET_CONNECT(name, CLK, cCLK) \ + NET_CONNECT(name, ENP, cENP) \ + NET_CONNECT(name, ENT, cENT) \ + NET_CONNECT(name, CLRQ, cCLRQ) \ + NET_CONNECT(name, LOADQ, cLOADQ) \ + NET_CONNECT(name, A, cA) \ + NET_CONNECT(name, B, cB) \ + NET_CONNECT(name, C, cC) \ + NET_CONNECT(name, D, cD) + +#define TTL_74163(name, cCLK, cENP, cENT, cCLRQ, cLOADQ, cA, cB, cC, cD) \ + NET_REGISTER_DEV(TTL_74163, name) \ + NET_CONNECT(name, GND, GND) \ + NET_CONNECT(name, VCC, VCC) \ + NET_CONNECT(name, CLK, cCLK) \ + NET_CONNECT(name, ENP, cENP) \ + NET_CONNECT(name, ENT, cENT) \ + NET_CONNECT(name, CLRQ, cCLRQ) \ + NET_CONNECT(name, LOADQ, cLOADQ) \ + NET_CONNECT(name, A, cA) \ + NET_CONNECT(name, B, cB) \ + NET_CONNECT(name, C, cC) \ + NET_CONNECT(name, D, cD) + +#define TTL_74125_DIP(name) \ + NET_REGISTER_DEV(TTL_74125_DIP, name) + +#define TTL_74163_DIP(name) \ + NET_REGISTER_DEV(TTL_74163_DIP, name) +#endif + +#endif /* NLD_74125_H_ */ diff --git a/src/lib/netlist/devices/nlid_proxy.cpp b/src/lib/netlist/devices/nlid_proxy.cpp index bebc1c66a47..fb0ba84c5a8 100644 --- a/src/lib/netlist/devices/nlid_proxy.cpp +++ b/src/lib/netlist/devices/nlid_proxy.cpp @@ -120,7 +120,7 @@ namespace netlist , m_I(*this, "I") , m_RP(*this, "RP") , m_RN(*this, "RN") - , m_last_state(*this, "m_last_var", -1) + , m_last_state(*this, "m_last_var", terminal_t::OUT_TRISTATE()) { register_subalias("Q", m_RN.P()); @@ -144,7 +144,7 @@ namespace netlist void nld_d_to_a_proxy::reset() { //m_Q.initial(0.0); - m_last_state = -1; + m_last_state = terminal_t::OUT_TRISTATE(); m_RN.reset(); m_RP.reset(); m_RN.set_G_V_I(plib::reciprocal(logic_family()->R_low()), @@ -156,27 +156,38 @@ namespace netlist NETLIB_UPDATE(d_to_a_proxy) { - const auto state = static_cast(m_I()); + const auto state = m_I(); if (state != m_last_state) { // RN, RP are connected ... m_RN.change_state([this, &state]() { - if (state) + switch (state) { - m_RN.set_G_V_I(G_OFF, - nlconst::zero(), - nlconst::zero()); - m_RP.set_G_V_I(plib::reciprocal(logic_family()->R_high()), - logic_family()->high_offset_V(), nlconst::zero()); - } - else - { - m_RN.set_G_V_I(plib::reciprocal(logic_family()->R_low()), - logic_family()->low_offset_V(), nlconst::zero()); - m_RP.set_G_V_I(G_OFF, - nlconst::zero(), - nlconst::zero()); + case 0: + m_RN.set_G_V_I(plib::reciprocal(logic_family()->R_low()), + logic_family()->low_offset_V(), nlconst::zero()); + m_RP.set_G_V_I(G_OFF, + nlconst::zero(), + nlconst::zero()); + break; + case 1: + m_RN.set_G_V_I(G_OFF, + nlconst::zero(), + nlconst::zero()); + m_RP.set_G_V_I(plib::reciprocal(logic_family()->R_high()), + logic_family()->high_offset_V(), nlconst::zero()); + break; + case terminal_t::OUT_TRISTATE(): + m_RN.set_G_V_I(G_OFF, + nlconst::zero(), + nlconst::zero()); + m_RP.set_G_V_I(G_OFF, + nlconst::zero(), + nlconst::zero()); + break; + default: + printf("this should never happen!"); } }); m_last_state = state; diff --git a/src/lib/netlist/devices/nlid_proxy.h b/src/lib/netlist/devices/nlid_proxy.h index 1425e61bfdf..161bd56970d 100644 --- a/src/lib/netlist/devices/nlid_proxy.h +++ b/src/lib/netlist/devices/nlid_proxy.h @@ -118,7 +118,7 @@ namespace devices logic_input_t m_I; analog::NETLIB_NAME(twoterm) m_RP; analog::NETLIB_NAME(twoterm) m_RN; - state_var m_last_state; + state_var m_last_state; }; } // namespace devices diff --git a/src/lib/netlist/examples/74125.cpp b/src/lib/netlist/examples/74125.cpp new file mode 100644 index 00000000000..807d8bf27c8 --- /dev/null +++ b/src/lib/netlist/examples/74125.cpp @@ -0,0 +1,40 @@ +// license:CC0 +// copyright-holders:Couriersud + +/* + * 74125.cpp + * + */ + +//! [74125_example] +#include "netlist/devices/net_lib.h" + +// ./nltool -c run -l RL.1 src/lib/netlist/examples/74125.cpp +// RL.1 : Output + +NETLIST_START(main) + + SOLVER(Solver, 48000) // could be 1 in this example + + ANALOG_INPUT(VCC, 5.0) + + TTL_74125(X1) + TTL_74126(X2) + + CLOCK(C1, 100) + CLOCK(C2, 300) + CLOCK(C3, 5) + + RES(RL, 1000) + + NET_C(C1.Q, X1.A) + NET_C(C2.Q, X2.A) + NET_C(C3.Q, X1.G, X2.G) + + NET_C(X1.Y, X2.Y, RL.1) + + NET_C(GND, RL.2, C1.GND, C2.GND, C3.GND, X1.GND, X2.GND) + NET_C(VCC, C1.VCC, C2.VCC, C3.VCC, X1.VCC, X2.VCC) + +NETLIST_END() +//! [74125_example] diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index 6a12a40355d..3da7fa70ba9 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -194,7 +194,10 @@ namespace netlist void netlist_state_t::compile_defines(std::vector> &defs) { - #define ENTRY(x) if (pstring(#x) != PSTRINGIFY(x)) defs.emplace_back(std::pair(#x, PSTRINGIFY(x))); + #define ENTRY(x) if (pstring(#x) != PSTRINGIFY(x)) \ + defs.emplace_back(std::pair(#x, PSTRINGIFY(x))); \ + else defs.emplace_back(std::pair(#x, "")); + #define ENTRY_EX(x) defs.emplace_back(std::pair(#x, plib::pfmt("{}")(x))); ENTRY(NL_VERSION_MAJOR) ENTRY(NL_VERSION_MINOR) ENTRY(NL_VERSION_PATCHLEVEL) @@ -242,6 +245,15 @@ namespace netlist ENTRY(__unix__) ENTRY(__linux__) + ENTRY_EX(sizeof(base_device_t)) + ENTRY_EX(sizeof(device_t)) + ENTRY_EX(sizeof(logic_input_t)) + ENTRY_EX(sizeof(logic_output_t)) + ENTRY_EX(sizeof(param_model_t)) + ENTRY_EX(sizeof(param_logic_t)) + ENTRY_EX(sizeof(state_var)) + ENTRY_EX(sizeof(pstring)) + #undef ENTRY } @@ -275,6 +287,8 @@ namespace netlist void netlist_state_t::reset() { + m_setup = nullptr; + // Reset all nets once ! log().verbose("Call reset on all nets:"); for (auto & n : nets()) @@ -649,41 +663,6 @@ namespace netlist } } - void detail::net_t::add_terminal(detail::core_terminal_t &terminal) noexcept(false) - { - for (auto &t : core_terms()) - if (t == &terminal) - { - state().log().fatal(MF_NET_1_DUPLICATE_TERMINAL_2(name(), t->name())); - throw nl_exception(MF_NET_1_DUPLICATE_TERMINAL_2(name(), t->name())); - } - - terminal.set_net(this); - - core_terms().push_back(&terminal); - } - - void detail::net_t::remove_terminal(detail::core_terminal_t &terminal) noexcept(false) - { - if (plib::container::contains(core_terms(), &terminal)) - { - terminal.set_net(nullptr); - plib::container::remove(core_terms(), &terminal); - } - else - { - state().log().fatal(MF_REMOVE_TERMINAL_1_FROM_NET_2(terminal.name(), this->name())); - throw nl_exception(MF_REMOVE_TERMINAL_1_FROM_NET_2(terminal.name(), this->name())); - } - } - - void detail::net_t::move_connections(detail::net_t &dest_net) - { - for (auto &ct : core_terms()) - dest_net.add_terminal(*ct); - core_terms().clear(); - } - // ---------------------------------------------------------------------------------------- // logic_net_t // ---------------------------------------------------------------------------------------- @@ -868,13 +847,13 @@ namespace netlist param_str_t::param_str_t(core_device_t &device, const pstring &name, const pstring &val) : param_t(&device, name) { - m_param = device.state().setup().get_initial_param_val(this->name(),val); + m_param = plib::make_unique(device.state().setup().get_initial_param_val(this->name(),val)); } param_str_t::param_str_t(netlist_state_t &state, const pstring &name, const pstring &val) : param_t(nullptr, name) { - m_param = state.setup().get_initial_param_val(this->name(),val); + m_param = plib::make_unique(state.setup().get_initial_param_val(this->name(),val)); } void param_str_t::changed() noexcept @@ -893,18 +872,18 @@ namespace netlist pstring param_model_t::type() { - auto mod = state().parser().models().get_model(str()); + auto mod = state().setup().models().get_model(str()); return mod.type(); } pstring param_model_t::value_str(const pstring &entity) { - return state().parser().models().get_model(str()).value_str(entity); + return state().setup().models().get_model(str()).value_str(entity); } nl_fptype param_model_t::value(const pstring &entity) { - return state().parser().models().get_model(str()).value(entity); + return state().setup().models().get_model(str()).value(entity); } diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 8693f9e54e4..90f1ea88d2e 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -627,12 +627,17 @@ namespace netlist /// Going forward setting this to 8 will allow 8-bit signal /// busses to be used in netlist, e.g. for more complex memory /// arrangements. - static constexpr const unsigned int INP_BITS = 1; + /// Mimimum value is 2 here to support tristate output on proxies. + static constexpr const unsigned int INP_BITS = 2; static constexpr const unsigned int INP_MASK = (1 << INP_BITS) - 1; static constexpr const unsigned int INP_HL_SHIFT = 0; static constexpr const unsigned int INP_LH_SHIFT = INP_BITS; + static constexpr netlist_sig_t OUT_TRISTATE() { return INP_MASK; } + + static_assert(INP_BITS * 2 <= sizeof(netlist_sig_t) * 8, "netlist_sig_t size not sufficient"); + enum state_e { STATE_INP_PASSIVE = 0, STATE_INP_HL = (INP_MASK << INP_HL_SHIFT), @@ -747,14 +752,10 @@ namespace netlist // setup stuff - void add_terminal(core_terminal_t &terminal) noexcept(false); - void remove_terminal(core_terminal_t &terminal) noexcept(false); - bool is_logic() const noexcept; bool is_analog() const noexcept; void rebuild_list(); // rebuild m_list after a load - void move_connections(net_t &dest_net); std::vector &core_terms() noexcept { return m_core_terms; } @@ -1018,6 +1019,47 @@ namespace netlist logic_net_t m_my_net; }; + // ----------------------------------------------------------------------------- + // tristate_output_t + // ----------------------------------------------------------------------------- + + class tristate_output_t : public logic_output_t + { + public: + + tristate_output_t(device_t &dev, const pstring &aname, + netlist_time ts_off_on, netlist_time ts_on_off) + : logic_output_t(dev, aname) + , m_last_logic(dev, name() + "." + "m_last_logic", 2) // force change + , m_tristate(dev, name() + "." + "m_tristate", 2) // force change + , m_ts_off_on(ts_off_on) + , m_ts_on_off(ts_on_off) + {} + + void push(netlist_sig_t newQ, netlist_time delay) noexcept + { + if (!m_tristate) + logic_output_t::push(newQ, delay); + m_last_logic = newQ; + } + + void set_tristate(bool v) noexcept + { + if (v != m_tristate) + { + logic_output_t::push(v ? OUT_TRISTATE() : m_last_logic, v ? m_ts_off_on : m_ts_on_off); + m_tristate = v; + } + } + + private: + using logic_output_t::initial; + using logic_output_t::set_Q_time; + state_var m_last_logic; + state_var m_tristate; + const netlist_time m_ts_off_on; + const netlist_time m_ts_on_off; + }; // ----------------------------------------------------------------------------- // analog_output_t // ----------------------------------------------------------------------------- @@ -1161,22 +1203,22 @@ namespace netlist const pstring &operator()() const noexcept { return str(); } void set(const pstring ¶m) { - if (m_param != param) + if (*m_param != param) { - m_param = param; + *m_param = param; changed(); update_param(); } } pstring valstr() const override { - return m_param; + return *m_param; } protected: virtual void changed() noexcept; - const pstring &str() const noexcept { return m_param; } + const pstring &str() const noexcept { return *m_param; } private: - pstring m_param; + plib::unique_ptr m_param; }; // ----------------------------------------------------------------------------- @@ -2021,6 +2063,8 @@ namespace netlist inline void detail::net_t::push_to_queue(netlist_time delay) noexcept { + // FIXME: checking for has_connection doesn't have any noticable effect + // on performance. if (has_connections()) { m_next_scheduled_time = exec().time() + delay; diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp index 206a75c4127..675cbae5360 100755 --- a/src/lib/netlist/nl_setup.cpp +++ b/src/lib/netlist/nl_setup.cpp @@ -19,8 +19,9 @@ namespace netlist // nl_parse_t // ---------------------------------------------------------------------------------------- - nlparse_t::nlparse_t(log_type &log) + nlparse_t::nlparse_t(log_type &log, abstract_t &abstract) : m_factory(log) + , m_abstract(abstract) , m_log(log) , m_frontier_cnt(0) { } @@ -344,12 +345,12 @@ namespace netlist pstring pinfn = build_fqn(pin); bool found = false; - for (auto link = result().m_links.begin(); link != result().m_links.end(); ) + for (auto link = m_abstract.m_links.begin(); link != m_abstract.m_links.end(); ) { if ((link->first == pinfn) || (link->second == pinfn)) { log().verbose("removing connection: {1} <==> {2}\n", link->first, link->second); - link = result().m_links.erase(link); + link = m_abstract.m_links.erase(link); found = true; } else @@ -362,6 +363,17 @@ namespace netlist } } + void nlparse_t::register_model(const pstring &model_in) + { + auto pos = model_in.find(' '); + if (pos == pstring::npos) + throw nl_exception(MF_UNABLE_TO_PARSE_MODEL_1(model_in)); + pstring model = plib::ucase(plib::trim(plib::left(model_in, pos))); + pstring def = plib::trim(model_in.substr(pos + 1)); + if (!m_abstract.m_models.insert({model, def}).second) + throw nl_exception(MF_MODEL_ALREADY_EXISTS_1(model_in)); + } + // ---------------------------------------------------------------------------------------- // Sources @@ -382,8 +394,10 @@ namespace netlist setup_t::setup_t(netlist_state_t &nlstate) - : m_parser(nlstate.log()) + : m_abstract() + , m_parser(nlstate.log(), m_abstract) , m_nlstate(nlstate) + , m_models(m_abstract.m_models) // FIXME : parse abstract_t only , m_netlist_params(nullptr) , m_proxy_cnt(0) { @@ -405,8 +419,8 @@ pstring setup_t::termtype_as_str(detail::core_terminal_t &in) pstring setup_t::get_initial_param_val(const pstring &name, const pstring &def) const { - auto i = m_parser.result().m_param_values.find(name); - pstring v = (i != m_parser.result().m_param_values.end()) ? i->second : def; + auto i = m_abstract.m_param_values.find(name); + pstring v = (i != m_abstract.m_param_values.end()) ? i->second : def; //printf("%s -> %s\n", name.c_str(), v.c_str()); @@ -474,8 +488,8 @@ pstring setup_t::resolve_alias(const pstring &name) const // FIXME: Detect endless loop do { ret = temp; - auto p = m_parser.result().m_alias.find(ret); - temp = (p != m_parser.result().m_alias.end() ? p->second : ""); + auto p = m_abstract.m_alias.find(ret); + temp = (p != m_abstract.m_alias.end() ? p->second : ""); } while (temp != "" && temp != ret); log().debug("{1}==>{2}\n", name, ret); @@ -491,7 +505,7 @@ pstring setup_t::de_alias(const pstring &alias) const do { ret = temp; temp = ""; - for (const auto &e : m_parser.result().m_alias) + for (const auto &e : m_abstract.m_alias) { // FIXME: this will resolve first one found if (e.second == ret) @@ -519,7 +533,7 @@ std::vector setup_t::get_terminals_for_device_name(const pstring &devna } } - for (const auto & t : m_parser.result().m_alias) + for (const auto & t : m_abstract.m_alias) { if (plib::startsWith(t.first, devname)) { @@ -602,15 +616,12 @@ detail::core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, param_ref_t setup_t::find_param(const pstring ¶m_in) const { - // FIXME: examine use cases - const pstring param_in_fqn = m_parser.build_fqn(param_in); - - const pstring outname(resolve_alias(param_in_fqn)); + const pstring outname(resolve_alias(param_in)); auto ret(m_params.find(outname)); if (ret == m_params.end()) { - log().fatal(MF_PARAMETER_1_2_NOT_FOUND(param_in_fqn, outname)); - throw nl_exception(MF_PARAMETER_1_2_NOT_FOUND(param_in_fqn, outname)); + log().fatal(MF_PARAMETER_1_2_NOT_FOUND(param_in, outname)); + throw nl_exception(MF_PARAMETER_1_2_NOT_FOUND(param_in, outname)); } return ret->second; } @@ -647,7 +658,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(const detail::core_terminal_t &o } out.net().core_terms().clear(); - out.net().add_terminal(new_proxy->in()); + add_terminal(out.net(), new_proxy->in()); auto *proxy(new_proxy.get()); if (!m_proxies.insert({&out, proxy}).second) @@ -701,7 +712,7 @@ devices::nld_base_proxy *setup_t::get_a_d_proxy(detail::core_terminal_t &inp) } inp.net().core_terms().clear(); // clear the list } - ret->out().net().add_terminal(inp); + add_terminal(ret->out().net(), inp); m_nlstate.register_device(new_proxy->name(), std::move(new_proxy)); return ret; } @@ -742,7 +753,7 @@ void setup_t::merge_nets(detail::net_t &thisnet, detail::net_t &othernet) } else { - othernet.move_connections(thisnet); + move_connections(othernet, thisnet); } } @@ -754,7 +765,7 @@ void setup_t::connect_input_output(detail::core_terminal_t &in, detail::core_ter { auto *proxy = get_a_d_proxy(in); - out.net().add_terminal(proxy->proxy_term()); + add_terminal(out.net(), proxy->proxy_term()); } else if (out.is_logic() && in.is_analog()) { @@ -768,7 +779,7 @@ void setup_t::connect_input_output(detail::core_terminal_t &in, detail::core_ter if (in.has_net()) merge_nets(out.net(), in.net()); else - out.net().add_terminal(in); + add_terminal(out.net(), in); } } @@ -812,7 +823,7 @@ void setup_t::connect_terminal_output(terminal_t &in, detail::core_terminal_t &o merge_nets(out.net(), in.net()); } else - out.net().add_terminal(in); + add_terminal(out.net(), in); } else if (out.is_logic()) { @@ -838,12 +849,12 @@ void setup_t::connect_terminals(detail::core_terminal_t &t1,detail::core_termina else if (t2.has_net()) { log().debug("T2 has net\n"); - t2.net().add_terminal(t1); + add_terminal(t2.net(), t1); } else if (t1.has_net()) { log().debug("T1 has net\n"); - t1.net().add_terminal(t2); + add_terminal(t1.net(), t2); } else { @@ -853,8 +864,8 @@ void setup_t::connect_terminals(detail::core_terminal_t &t1,detail::core_termina auto *anetp = anet.get(); m_nlstate.register_net(std::move(anet)); t1.set_net(anetp); - anetp->add_terminal(t2); - anetp->add_terminal(t1); + add_terminal(*anetp, t2); + add_terminal(*anetp, t1); } } @@ -1005,16 +1016,16 @@ void setup_t::resolve_inputs() tries--; } #else - while (!m_parser.result().m_links.empty() && tries > 0) + while (!m_abstract.m_links.empty() && tries > 0) { - for (std::size_t i = 0; i < m_parser.result().m_links.size(); ) + for (std::size_t i = 0; i < m_abstract.m_links.size(); ) { - const pstring t1s(m_parser.result().m_links[i].first); - const pstring t2s(m_parser.result().m_links[i].second); + const pstring t1s(m_abstract.m_links[i].first); + const pstring t2s(m_abstract.m_links[i].second); detail::core_terminal_t *t1 = find_terminal(t1s); detail::core_terminal_t *t2 = find_terminal(t2s); if (connect(*t1, *t2)) - m_parser.result().m_links.erase(m_parser.result().m_links.begin() + static_cast(i)); + m_abstract.m_links.erase(m_abstract.m_links.begin() + static_cast(i)); else i++; } @@ -1023,7 +1034,7 @@ void setup_t::resolve_inputs() #endif if (tries == 0) { - for (auto & link : m_parser.result().m_links) + for (auto & link : m_abstract.m_links) log().warning(MF_CONNECTING_1_TO_2(de_alias(link.first), de_alias(link.second))); log().fatal(MF_LINK_TRIES_EXCEEDED(m_netlist_params->m_max_link_loops())); @@ -1077,6 +1088,42 @@ void setup_t::resolve_inputs() } +void setup_t::add_terminal(detail::net_t &net, detail::core_terminal_t &terminal) noexcept(false) +{ + for (auto &t : net.core_terms()) + if (t == &terminal) + { + log().fatal(MF_NET_1_DUPLICATE_TERMINAL_2(net.name(), t->name())); + throw nl_exception(MF_NET_1_DUPLICATE_TERMINAL_2(net.name(), t->name())); + } + + terminal.set_net(&net); + + net.core_terms().push_back(&terminal); +} + +void setup_t::remove_terminal(detail::net_t &net, detail::core_terminal_t &terminal) noexcept(false) +{ + if (plib::container::contains(net.core_terms(), &terminal)) + { + terminal.set_net(nullptr); + plib::container::remove(net.core_terms(), &terminal); + } + else + { + log().fatal(MF_REMOVE_TERMINAL_1_FROM_NET_2(terminal.name(), net.name())); + throw nl_exception(MF_REMOVE_TERMINAL_1_FROM_NET_2(terminal.name(), net.name())); + } +} + +void setup_t::move_connections(detail::net_t &net, detail::net_t &dest_net) +{ + for (auto &ct : net.core_terms()) + add_terminal(dest_net, *ct); + net.core_terms().clear(); +} + + log_type &setup_t::log() noexcept { return m_nlstate.log(); } const log_type &setup_t::log() const noexcept { return m_nlstate.log(); } @@ -1085,20 +1132,9 @@ const log_type &setup_t::log() const noexcept { return m_nlstate.log(); } // Models // ---------------------------------------------------------------------------------------- -void models_t::register_model(const pstring &model_in) -{ - auto pos = model_in.find(' '); - if (pos == pstring::npos) - throw nl_exception(MF_UNABLE_TO_PARSE_MODEL_1(model_in)); - pstring model = plib::ucase(plib::trim(plib::left(model_in, pos))); - pstring def = plib::trim(model_in.substr(pos + 1)); - if (!m_models.insert({model, def}).second) - throw nl_exception(MF_MODEL_ALREADY_EXISTS_1(model_in)); -} - //NOLINTNEXTLINE(misc-no-recursion) -void models_t::model_parse(const pstring &model_in, model_map_t &map) +void models_t::model_parse(const pstring &model_in, map_t &map) { pstring model = model_in; std::size_t pos = 0; @@ -1144,7 +1180,7 @@ void models_t::model_parse(const pstring &model_in, model_map_t &map) } } -pstring models_t::model_t::model_string(const model_map_t &map) +pstring models_t::model_t::model_string(const map_t &map) { // operator [] has no const implementation pstring ret = map.at("COREMODEL") + "("; @@ -1156,7 +1192,7 @@ pstring models_t::model_t::model_string(const model_map_t &map) models_t::model_t models_t::get_model(const pstring &model) { - model_map_t &map = m_cache[model]; + map_t &map = m_cache[model]; if (map.empty()) model_parse(model , map); @@ -1305,7 +1341,7 @@ const logic_family_desc_t *setup_t::family_from_model(const pstring &model) { family_type ft(family_type::CUSTOM); - auto mod(m_parser.models().get_model(model)); + auto mod(m_models.get_model(model)); family_model_t modv(mod); if (!ft.set_from_string(modv.m_TYPE())) @@ -1367,7 +1403,7 @@ void setup_t::prepare_to_run() // create defparams! - for (auto & e : m_parser.result().m_defparams) + for (auto & e : m_abstract.m_defparams) { auto param(plib::make_unique(nlstate(), e.first, e.second)); register_param_t(*param); @@ -1376,7 +1412,7 @@ void setup_t::prepare_to_run() // make sure the solver and parameters are started first! - for (auto & e : m_parser.result().m_device_factory) + for (auto & e : m_abstract.m_device_factory) { if ( m_parser.factory().is_class(e.second) || m_parser.factory().is_class(e.second)) @@ -1392,13 +1428,14 @@ void setup_t::prepare_to_run() // set default model parameters - m_parser.models().register_model(plib::pfmt("NMOS_DEFAULT _(CAPMOD={1})")(m_netlist_params->m_mos_capmodel())); - m_parser.models().register_model(plib::pfmt("PMOS_DEFAULT _(CAPMOD={1})")(m_netlist_params->m_mos_capmodel())); + // FIXME: this is not optimal + m_parser.register_model(plib::pfmt("NMOS_DEFAULT _(CAPMOD={1})")(m_netlist_params->m_mos_capmodel())); + m_parser.register_model(plib::pfmt("PMOS_DEFAULT _(CAPMOD={1})")(m_netlist_params->m_mos_capmodel())); // create devices log().debug("Creating devices ...\n"); - for (auto & e : m_parser.result().m_device_factory) + for (auto & e : m_abstract.m_device_factory) { if ( !m_parser.factory().is_class(e.second) && !m_parser.factory().is_class(e.second)) @@ -1410,7 +1447,7 @@ void setup_t::prepare_to_run() int errcnt(0); log().debug("Looking for unknown parameters ...\n"); - for (auto &p : m_parser.result().m_param_values) + for (auto &p : m_abstract.m_param_values) { auto f = m_params.find(p.first); if (f == m_params.end()) @@ -1439,8 +1476,8 @@ void setup_t::prepare_to_run() { if (use_deactivate) { - auto p = m_parser.result().m_param_values.find(d.second->name() + sHINT_NO_DEACTIVATE); - if (p != m_parser.result().m_param_values.end()) + auto p = m_abstract.m_param_values.find(d.second->name() + sHINT_NO_DEACTIVATE); + if (p != m_abstract.m_param_values.end()) { //FIXME: check for errors ... bool err(false); @@ -1477,8 +1514,8 @@ void setup_t::prepare_to_run() { log().info(MI_REMOVE_DEVICE_1_CONNECTED_ONLY_TO_RAILS_2_3( t->name(), t->N().net().name(), t->P().net().name())); - t->setup_N().net().remove_terminal(t->setup_N()); - t->setup_P().net().remove_terminal(t->setup_P()); + remove_terminal(t->setup_N().net(), t->setup_N()); + remove_terminal(t->setup_P().net(), t->setup_P()); m_nlstate.remove_device(t); } } diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h index 2315f48f359..f86326be8c4 100644 --- a/src/lib/netlist/nl_setup.h +++ b/src/lib/netlist/nl_setup.h @@ -222,11 +222,12 @@ namespace netlist class models_t { public: - using model_map_t = std::unordered_map; + using raw_map_t = std::unordered_map; + using map_t = std::unordered_map; class model_t { public: - model_t(const pstring &model, const model_map_t &map) + model_t(const pstring &model, const map_t &map) : m_model(model), m_map(map) { } pstring value_str(const pstring &entity) const; @@ -236,22 +237,24 @@ namespace netlist pstring type() const { return value_str("COREMODEL"); } private: - static pstring model_string(const model_map_t &map); + static pstring model_string(const map_t &map); const pstring m_model; // only for error messages - const model_map_t &m_map; + const map_t &m_map; }; - void register_model(const pstring &model_in); + models_t(const raw_map_t &models) + : m_models(models) + {} model_t get_model(const pstring &model); private: - void model_parse(const pstring &model, model_map_t &map); + void model_parse(const pstring &model, map_t &map); - std::unordered_map m_models; - std::unordered_map m_cache; + const raw_map_t &m_models; + std::unordered_map m_cache; }; // ---------------------------------------------------------------------------------------- @@ -268,6 +271,7 @@ namespace netlist std::unordered_map m_alias; std::vector m_links; std::unordered_map m_param_values; + models_t::raw_map_t m_models; // need to preserve order of device creation ... std::vector> m_device_factory; @@ -275,9 +279,9 @@ namespace netlist std::vector> m_defparams; }; - nlparse_t(log_type &log); + nlparse_t(log_type &log, abstract_t &abstract); - void register_model(const pstring &model_in) { m_models.register_model(model_in); } + void register_model(const pstring &model_in); void register_alias(const pstring &alias, const pstring &out); void register_alias_nofqn(const pstring &alias, const pstring &out); void register_dip_alias_arr(const pstring &terms); @@ -368,26 +372,19 @@ namespace netlist log_type &log() noexcept { return m_log; } const log_type &log() const noexcept { return m_log; } - models_t &models() noexcept { return m_models; } - const models_t &models() const noexcept { return m_models; } - plib::psource_t::stream_ptr get_data_stream(const pstring &name); - abstract_t &result() { return m_abstract; } - const abstract_t &result() const { return m_abstract; } - private: // FIXME: stale? - remove later void remove_connections(const pstring &pin); plib::ppreprocessor::defines_map_type m_defines; plib::psource_collection_t<> m_includes; - models_t m_models; std::stack m_namespace_stack; plib::psource_collection_t<> m_sources; // FIXME: convert to hash and deal with sorting in nltool factory::list_t m_factory; - abstract_t m_abstract; + abstract_t &m_abstract; log_type &m_log; unsigned m_frontier_cnt; @@ -439,6 +436,9 @@ namespace netlist void prepare_to_run(); + models_t &models() noexcept { return m_models; } + const models_t &models() const noexcept { return m_models; } + netlist_state_t &nlstate() { return m_nlstate; } const netlist_state_t &nlstate() const { return m_nlstate; } @@ -448,11 +448,13 @@ namespace netlist log_type &log() noexcept; const log_type &log() const noexcept; + // FIXME: needed from matrix_solver_t + void add_terminal(detail::net_t &net, detail::core_terminal_t &terminal) noexcept(false); + private: void resolve_inputs(); pstring resolve_alias(const pstring &name) const; - void delete_empty_nets(); void merge_nets(detail::net_t &thisnet, detail::net_t &othernet); @@ -469,9 +471,18 @@ namespace netlist devices::nld_base_proxy *get_a_d_proxy(detail::core_terminal_t &inp); detail::core_terminal_t &resolve_proxy(detail::core_terminal_t &term); + // net manipulations + + void remove_terminal(detail::net_t &net, detail::core_terminal_t &terminal) noexcept(false); + void move_connections(detail::net_t &net, detail::net_t &dest_net); + void delete_empty_nets(); + + nlparse_t::abstract_t m_abstract; nlparse_t m_parser; netlist_state_t &m_nlstate; + models_t m_models; + // FIXME: currently only used during setup devices::nld_netlistparams *m_netlist_params; diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h index 9136a82a42a..4f341252a62 100644 --- a/src/lib/netlist/plib/palloc.h +++ b/src/lib/netlist/plib/palloc.h @@ -30,47 +30,61 @@ namespace plib { // Standard arena_deleter //============================================================ - template + template struct arena_deleter { - //using arena_storage_type = P *; - using arena_storage_type = typename std::conditional::type; - template - typename std::enable_if::type getref(X *x) const noexcept - { return *x;} + }; - template - typename std::enable_if::type::is_stateless, X&>::type - getref(X &x, Y y = nullptr) const noexcept - { - unused_var(y); - return x; - } + + template + struct arena_deleter::type> + { + using arena_storage_type = P *; constexpr arena_deleter(arena_storage_type a = arena_storage_type()) noexcept : m_a(a) { } -#if 1 template::value>::type> arena_deleter(const arena_deleter &rhs) noexcept : m_a(rhs.m_a) { } -#else - template::value>::type> - arena_deleter(const arena_deleter &rhs) : m_a(rhs.m_a) { } -#endif + void operator()(T *p) noexcept { // call destructor p->~T(); - getref(m_a).deallocate(p, sizeof(T)); + m_a->deallocate(p, sizeof(T)); } //private: arena_storage_type m_a; }; + template + struct arena_deleter::type> + { + using arena_storage_type = P; + + constexpr arena_deleter(arena_storage_type a = arena_storage_type()) noexcept + { + plib::unused_var(a); + } + + template::value>::type> + arena_deleter(const arena_deleter &rhs) noexcept + { + plib::unused_var(rhs); + } + + void operator()(T *p) noexcept + { + // call destructor + p->~T(); + P::deallocate(p, sizeof(T)); + } + }; + //============================================================ // owned_ptr: smart pointer with ownership information //============================================================ diff --git a/src/lib/netlist/plib/pmempool.h b/src/lib/netlist/plib/pmempool.h index 72a07613315..2490913dc20 100644 --- a/src/lib/netlist/plib/pmempool.h +++ b/src/lib/netlist/plib/pmempool.h @@ -45,6 +45,7 @@ namespace plib { , m_stat_cur_alloc(0) , m_stat_max_alloc(0) { + icount()++; } PCOPYASSIGNMOVE(mempool, delete) @@ -62,6 +63,11 @@ namespace plib { aligned_arena::free(b); //::operator delete(b->m_data); } + if (icount()-- == 1) + { + if (sinfo().size() != 0) + plib::perrlogger("Still found {} info blocks after last mempool deleted\n", sinfo().size()); + } } void *allocate(size_t align, size_t size) @@ -231,6 +237,12 @@ namespace plib { return spinfo; } + static std::size_t &icount() + { + static std::size_t count = 0; + return count; + } + size_t m_min_alloc; size_t m_min_align; diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index b88d3a41c73..0ac02df201c 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -446,9 +446,10 @@ void tool_app_t::run() opt_logs(), m_defines, opt_rfolders(), opt_includes()); + // Inputs must be read before reset -> will clear setup and parser + inps = read_input(nt.setup(), opt_inp()); nt.exec().reset(); - inps = read_input(nt.setup(), opt_inp()); ttr = netlist::netlist_time_ext::from_fp(opt_ttr()); } diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp index 291f56100a8..11c8a60df60 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.cpp +++ b/src/lib/netlist/solver/nld_matrix_solver.cpp @@ -56,7 +56,7 @@ namespace solver log().fatal(MF_ERROR_CONNECTING_1_TO_2(m_fb_sync.name(), m_Q_sync.name())); throw nl_exception(MF_ERROR_CONNECTING_1_TO_2(m_fb_sync.name(), m_Q_sync.name())); } - setup_base(nets); + setup_base(anetlist.setup(), nets); // now setup the matrix setup_matrix(); @@ -67,7 +67,7 @@ namespace solver return &state().setup().get_connected_terminal(*term)->net(); } - void matrix_solver_t::setup_base(const analog_net_t::list_t &nets) + void matrix_solver_t::setup_base(setup_t &setup, const analog_net_t::list_t &nets) { log().debug("New solver setup\n"); std::vector step_devices; @@ -125,7 +125,7 @@ namespace solver net_proxy_output = net_proxy_output_u.get(); m_inps.emplace_back(std::move(net_proxy_output_u)); } - net_proxy_output->net().add_terminal(*p); + setup.add_terminal(net_proxy_output->net(), *p); // FIXME: repeated calling - kind of brute force net_proxy_output->net().rebuild_list(); log().debug("Added input {1}", net_proxy_output->name()); @@ -581,7 +581,7 @@ namespace solver { log().verbose("=============================================="); log().verbose("Solver {1}", this->name()); - log().verbose(" ==> {1} nets", this->m_terms.size()); //, (*(*groups[i].first())->m_core_terms.first())->name()); + log().verbose(" ==> {1} nets", this->m_terms.size()); log().verbose(" has {1} dynamic elements", this->dynamic_device_count()); log().verbose(" has {1} timestep elements", this->timestep_device_count()); log().verbose(" {1:6.3} average newton raphson loops", diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h index 4d9dcbbd9af..ffecbfbe72c 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.h +++ b/src/lib/netlist/solver/nld_matrix_solver.h @@ -304,7 +304,7 @@ namespace solver std::size_t m_ops; // base setup - called from constructor - void setup_base(const analog_net_t::list_t &nets) noexcept(false); + void setup_base(setup_t &setup, const analog_net_t::list_t &nets) noexcept(false); void sort_terms(matrix_sort_type_e sort); From cfc3a76d043f5ea2beb692992fb733bcaf5b685e Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 15 May 2020 00:32:55 -0700 Subject: [PATCH 53/69] netlist: Add support for empty #defines to preprocessor. [Aaron Giles] Also add detection and reporting of re-definitions. --- src/lib/netlist/plib/ppreprocessor.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/netlist/plib/ppreprocessor.cpp b/src/lib/netlist/plib/ppreprocessor.cpp index 44ad423c8b7..177599da924 100644 --- a/src/lib/netlist/plib/ppreprocessor.cpp +++ b/src/lib/netlist/plib/ppreprocessor.cpp @@ -556,7 +556,14 @@ namespace plib { pstring n = args.next(); if (!is_valid_token(n)) error("define expected identifier"); - if (args.next_ws() == "(") + auto prevdef = get_define(n); + if (lti.size() == 2) + { + if (prevdef != nullptr && prevdef->m_replace != "") + error("redefinition of " + n); + m_defines.insert({n, define_t(n, "")}); + } + else if (args.next_ws() == "(") { define_t def(n); def.m_has_params = true; @@ -576,6 +583,8 @@ namespace plib { while (!args.eod()) r += args.next_ws(); def.m_replace = r; + if (prevdef != nullptr && prevdef->m_replace != r) + error("redefinition of " + n); m_defines.insert({n, def}); } else @@ -583,6 +592,8 @@ namespace plib { pstring r; while (!args.eod()) r += args.next_ws(); + if (prevdef != nullptr && prevdef->m_replace != r) + error("redefinition of " + n); m_defines.insert({n, define_t(n, r)}); } } From 5739043ced4866b978f07aa5755683c1540617dd Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 13 May 2020 09:58:48 -0700 Subject: [PATCH 54/69] netlist: Add 74377/74378/74379 devices to netlist. [Aaron Giles] --- scripts/src/netlist.lua | 2 + src/lib/netlist/build/makefile | 3 +- src/lib/netlist/devices/net_lib.cpp | 3 + src/lib/netlist/devices/net_lib.h | 1 + src/lib/netlist/devices/nld_74377.cpp | 256 ++++++++++++++++++++++++++ src/lib/netlist/devices/nld_74377.h | 69 +++++++ src/lib/netlist/devices/nld_devinc.h | 15 ++ 7 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 src/lib/netlist/devices/nld_74377.cpp create mode 100644 src/lib/netlist/devices/nld_74377.h diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 566bb3ad624..905a081cd4a 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -180,6 +180,8 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_74193.h", MAME_DIR .. "src/lib/netlist/devices/nld_74194.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74194.h", + MAME_DIR .. "src/lib/netlist/devices/nld_74377.cpp", + MAME_DIR .. "src/lib/netlist/devices/nld_74377.h", MAME_DIR .. "src/lib/netlist/devices/nld_74393.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74393.h", MAME_DIR .. "src/lib/netlist/devices/nld_74365.cpp", diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 037e6e966c8..aaf6dca96ec 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -73,7 +73,7 @@ TIDY_DB = $(OBJ)/compile_commands.json # LTO = -flto=4 -fuse-linker-plugin -flto-partition=balanced -Wodr -CCOREFLAGS = -g -O3 -std=c++17 -I$(CURDIR)/.. -I$(CURDIR)/../.. +CCOREFLAGS = -g -O3 -std=c++14 -I$(CURDIR)/.. -I$(CURDIR)/../.. CFLAGS = $(LTO) $(CCOREFLAGS) $(CEXTRAFLAGS) @@ -174,6 +174,7 @@ NLOBJS := \ $(NLOBJ)/devices/nld_74193.o \ $(NLOBJ)/devices/nld_74194.o \ $(NLOBJ)/devices/nld_74365.o \ + $(NLOBJ)/devices/nld_74377.o \ $(NLOBJ)/devices/nld_74393.o \ $(NLOBJ)/devices/nld_74ls629.o \ $(NLOBJ)/devices/nld_82S16.o \ diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 1616bae4ece..9cbaea79bc5 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -129,6 +129,9 @@ namespace devices LIB_ENTRY(74193) LIB_ENTRY(74194) LIB_ENTRY(74365) + LIB_ENTRY(74377_dip) + LIB_ENTRY(74378_dip) + LIB_ENTRY(74379_dip) LIB_ENTRY(74393) LIB_ENTRY(74393_dip) //ENTRY(74279, TTL_74279, "") // only dip available diff --git a/src/lib/netlist/devices/net_lib.h b/src/lib/netlist/devices/net_lib.h index 1eccd867cb6..9da245d3008 100644 --- a/src/lib/netlist/devices/net_lib.h +++ b/src/lib/netlist/devices/net_lib.h @@ -64,6 +64,7 @@ #include "nld_74193.h" #include "nld_74194.h" #include "nld_74365.h" +#include "nld_74377.h" #include "nld_74393.h" #include "nld_7448.h" #include "nld_7450.h" diff --git a/src/lib/netlist/devices/nld_74377.cpp b/src/lib/netlist/devices/nld_74377.cpp new file mode 100644 index 00000000000..6521d33764c --- /dev/null +++ b/src/lib/netlist/devices/nld_74377.cpp @@ -0,0 +1,256 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74377.c + * + */ + +#include "nld_74377.h" +#include "netlist/nl_base.h" + +namespace netlist +{ + namespace devices + { + + constexpr const std::array delay = { NLTIME_FROM_NS(25), NLTIME_FROM_NS(25) }; + + NETLIB_OBJECT(74377_gate) + { + NETLIB_CONSTRUCTOR(74377_gate) + , m_E(*this, "E") + , m_D(*this, "D") + , m_CP(*this, "CP") + , m_Q(*this, "Q") + , m_QQ(*this, "QQ") + , m_cp(*this, "m_cp", 0) + , m_power_pins(*this) + { + } + + NETLIB_RESETI() + { + } + NETLIB_UPDATEI() + { + netlist_sig_t last_cp = m_cp; + + m_cp = m_CP(); + + if (!m_E() && !last_cp && m_cp) + { + netlist_sig_t d = m_D(); + m_Q.push(d, delay[d]); + m_QQ.push(d ^ 1, delay[d ^ 1]); + } + } + + friend class NETLIB_NAME(74377_dip); + friend class NETLIB_NAME(74378_dip); + friend class NETLIB_NAME(74379_dip); + private: + logic_input_t m_E; + logic_input_t m_D; + logic_input_t m_CP; + logic_output_t m_Q; + logic_output_t m_QQ; + + state_var_sig m_cp; + nld_power_pins m_power_pins; + }; + + NETLIB_OBJECT(74377_dip) + { + NETLIB_CONSTRUCTOR(74377_dip) + , m_A(*this, "A") + , m_B(*this, "B") + , m_C(*this, "C") + , m_D(*this, "D") + , m_E(*this, "E") + , m_F(*this, "F") + , m_G(*this, "G") + , m_H(*this, "H") + { + register_subalias("1", m_A.m_E); + register_subalias("2", m_A.m_Q); + register_subalias("3", m_A.m_D); + register_subalias("4", m_B.m_D); + register_subalias("5", m_B.m_Q); + register_subalias("6", m_C.m_Q); + register_subalias("7", m_C.m_D); + register_subalias("8", m_D.m_D); + register_subalias("9", m_D.m_Q); + register_subalias("10", "A.GND"); + + register_subalias("11", m_A.m_CP); + register_subalias("12", m_E.m_Q); + register_subalias("13", m_E.m_D); + register_subalias("14", m_F.m_D); + register_subalias("15", m_F.m_Q); + register_subalias("16", m_G.m_Q); + register_subalias("17", m_G.m_D); + register_subalias("18", m_H.m_D); + register_subalias("19", m_H.m_Q); + register_subalias("20", "A.VCC"); + + connect("A.GND", "B.GND"); + connect("A.GND", "C.GND"); + connect("A.GND", "D.GND"); + connect("A.GND", "E.GND"); + connect("A.GND", "F.GND"); + connect("A.GND", "G.GND"); + connect("A.GND", "H.GND"); + connect("A.VCC", "B.VCC"); + connect("A.VCC", "C.VCC"); + connect("A.VCC", "D.VCC"); + connect("A.VCC", "E.VCC"); + connect("A.VCC", "F.VCC"); + connect("A.VCC", "G.VCC"); + connect("A.VCC", "H.VCC"); + connect(m_A.m_E, m_B.m_E); + connect(m_A.m_E, m_C.m_E); + connect(m_A.m_E, m_D.m_E); + connect(m_A.m_E, m_E.m_E); + connect(m_A.m_E, m_F.m_E); + connect(m_A.m_E, m_G.m_E); + connect(m_A.m_E, m_H.m_E); + connect(m_A.m_CP, m_B.m_CP); + connect(m_A.m_CP, m_C.m_CP); + connect(m_A.m_CP, m_D.m_CP); + connect(m_A.m_CP, m_E.m_CP); + connect(m_A.m_CP, m_F.m_CP); + connect(m_A.m_CP, m_G.m_CP); + connect(m_A.m_CP, m_H.m_CP); + } + //NETLIB_RESETI(); + //NETLIB_UPDATEI(); + + protected: + NETLIB_SUB(74377_gate) m_A; + NETLIB_SUB(74377_gate) m_B; + NETLIB_SUB(74377_gate) m_C; + NETLIB_SUB(74377_gate) m_D; + NETLIB_SUB(74377_gate) m_E; + NETLIB_SUB(74377_gate) m_F; + NETLIB_SUB(74377_gate) m_G; + NETLIB_SUB(74377_gate) m_H; + }; + + NETLIB_OBJECT(74378_dip) + { + NETLIB_CONSTRUCTOR(74378_dip) + , m_A(*this, "A") + , m_B(*this, "B") + , m_C(*this, "C") + , m_D(*this, "D") + , m_E(*this, "E") + , m_F(*this, "F") + { + register_subalias("1", m_A.m_E); + register_subalias("2", m_A.m_Q); + register_subalias("3", m_A.m_D); + register_subalias("4", m_B.m_D); + register_subalias("5", m_B.m_Q); + register_subalias("6", m_C.m_D); + register_subalias("7", m_C.m_Q); + register_subalias("8", "A.GND"); + + register_subalias("9", m_A.m_CP); + register_subalias("10", m_D.m_Q); + register_subalias("11", m_D.m_D); + register_subalias("12", m_E.m_Q); + register_subalias("13", m_E.m_D); + register_subalias("14", m_F.m_D); + register_subalias("15", m_F.m_Q); + register_subalias("16", "A.VCC"); + + connect("A.GND", "B.GND"); + connect("A.GND", "C.GND"); + connect("A.GND", "D.GND"); + connect("A.GND", "E.GND"); + connect("A.GND", "F.GND"); + connect("A.VCC", "B.VCC"); + connect("A.VCC", "C.VCC"); + connect("A.VCC", "D.VCC"); + connect("A.VCC", "E.VCC"); + connect("A.VCC", "F.VCC"); + connect(m_A.m_E, m_B.m_E); + connect(m_A.m_E, m_C.m_E); + connect(m_A.m_E, m_D.m_E); + connect(m_A.m_E, m_E.m_E); + connect(m_A.m_E, m_F.m_E); + connect(m_A.m_CP, m_B.m_CP); + connect(m_A.m_CP, m_C.m_CP); + connect(m_A.m_CP, m_D.m_CP); + connect(m_A.m_CP, m_E.m_CP); + connect(m_A.m_CP, m_F.m_CP); + } + //NETLIB_RESETI(); + //NETLIB_UPDATEI(); + + protected: + NETLIB_SUB(74377_gate) m_A; + NETLIB_SUB(74377_gate) m_B; + NETLIB_SUB(74377_gate) m_C; + NETLIB_SUB(74377_gate) m_D; + NETLIB_SUB(74377_gate) m_E; + NETLIB_SUB(74377_gate) m_F; + }; + + NETLIB_OBJECT(74379_dip) + { + NETLIB_CONSTRUCTOR(74379_dip) + , m_A(*this, "A") + , m_B(*this, "B") + , m_C(*this, "C") + , m_D(*this, "D") + { + register_subalias("1", m_A.m_E); + register_subalias("2", m_A.m_Q); + register_subalias("3", m_A.m_QQ); + register_subalias("4", m_A.m_D); + register_subalias("5", m_B.m_D); + register_subalias("6", m_B.m_QQ); + register_subalias("7", m_B.m_Q); + register_subalias("8", "A.GND"); + + register_subalias("9", m_A.m_CP); + register_subalias("10", m_C.m_Q); + register_subalias("11", m_C.m_QQ); + register_subalias("12", m_C.m_D); + register_subalias("13", m_D.m_D); + register_subalias("14", m_D.m_QQ); + register_subalias("15", m_D.m_Q); + register_subalias("16", "A.VCC"); + + connect("A.GND", "B.GND"); + connect("A.GND", "C.GND"); + connect("A.GND", "D.GND"); + connect("A.VCC", "B.VCC"); + connect("A.VCC", "C.VCC"); + connect("A.VCC", "D.VCC"); + connect(m_A.m_E, m_B.m_E); + connect(m_A.m_E, m_C.m_E); + connect(m_A.m_E, m_D.m_E); + connect(m_A.m_CP, m_B.m_CP); + connect(m_A.m_CP, m_C.m_CP); + connect(m_A.m_CP, m_D.m_CP); + } + //NETLIB_RESETI(); + //NETLIB_UPDATEI(); + + protected: + NETLIB_SUB(74377_gate) m_A; + NETLIB_SUB(74377_gate) m_B; + NETLIB_SUB(74377_gate) m_C; + NETLIB_SUB(74377_gate) m_D; + }; + + + NETLIB_DEVICE_IMPL(74377_gate, "TTL_74377_GATE", "") + NETLIB_DEVICE_IMPL(74377_dip, "TTL_74377_DIP", "") + NETLIB_DEVICE_IMPL(74378_dip, "TTL_74378_DIP", "") + NETLIB_DEVICE_IMPL(74379_dip, "TTL_74379_DIP", "") + + } //namespace devices +} // namespace netlist diff --git a/src/lib/netlist/devices/nld_74377.h b/src/lib/netlist/devices/nld_74377.h new file mode 100644 index 00000000000..87646d150d3 --- /dev/null +++ b/src/lib/netlist/devices/nld_74377.h @@ -0,0 +1,69 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud,Aaron Giles +/* + * nld_74377.h + * + * DM74377: Octal D Flip-Flop With Enable + * + * +--------------+ + * /E |1 ++ 20| VCC + * Q0 |2 19| Q7 + * D0 |3 18| D7 + * D1 |4 74377 17| D6 + * Q1 |5 16| Q6 + * Q2 |6 15| Q5 + * D2 |7 14| D5 + * D3 |8 13| D4 + * Q3 |9 12| Q4 + * GND |10 11| CP + * +--------------+ + * + * DM74378: Hex D Flip-Flop With Enable + * + * +--------------+ + * /E |1 ++ 16| VCC + * Q0 |2 15| Q5 + * D0 |3 14| D5 + * D1 |4 74378 13| D4 + * Q1 |5 12| Q4 + * D2 |6 11| D3 + * Q2 |7 10| Q3 + * GND |8 9| CP + * +--------------+ + * + * DM74379: 4-bit D Flip-Flop With Enable + * + * +--------------+ + * /E |1 ++ 16| VCC + * Q0 |2 15| Q3 + * /Q0 |3 14| /Q3 + * D0 |4 74379 13| D3 + * D1 |5 12| D2 + * /Q1 |6 11| /Q2 + * Q1 |7 10| Q2 + * GND |8 9| CP + * +--------------+ + * + * Naming conventions follow Motorola datasheet + * + */ + +#ifndef NLD_74377_H_ +#define NLD_74377_H_ + +#include "netlist/nl_setup.h" + +#define TTL_74377_GATE(name) \ + NET_REGISTER_DEV(TTL_74377_GATE, name) + +#define TTL_74377_DIP(name) \ + NET_REGISTER_DEV(TTL_74377_DIP, name) + +#define TTL_74378_DIP(name) \ + NET_REGISTER_DEV(TTL_74378_DIP, name) + +#define TTL_74379_DIP(name) \ + NET_REGISTER_DEV(TTL_74379_DIP, name) + + +#endif /* NLD_74377_H_ */ diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h index bd453dad8f3..f42fa126fa5 100644 --- a/src/lib/netlist/devices/nld_devinc.h +++ b/src/lib/netlist/devices/nld_devinc.h @@ -426,6 +426,21 @@ #define TTL_74365(name, pG1Q, pG2Q, pA1, pA2, pA3, pA4, pA5, pA6) \ NET_REGISTER_DEVEXT(TTL_74365, name, pG1Q, pG2Q, pA1, pA2, pA3, pA4, pA5, pA6) +// --------------------------------------------------------------------- +// Source: src/lib/netlist/devices/nld_74377.cpp +// --------------------------------------------------------------------- +#define TTL_74377_GATE(name) \ + NET_REGISTER_DEVEXT(TTL_74377_GATE, name) + +#define TTL_74377_DIP(name) \ + NET_REGISTER_DEVEXT(TTL_74377_DIP, name) + +#define TTL_74378_DIP(name) \ + NET_REGISTER_DEVEXT(TTL_74378_DIP, name) + +#define TTL_74379_DIP(name) \ + NET_REGISTER_DEVEXT(TTL_74379_DIP, name) + // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_74393.cpp // --------------------------------------------------------------------- From 333329e54ccf00a9a3b7e3b5724e3d8ade764b9a Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 13 May 2020 19:40:15 -0700 Subject: [PATCH 55/69] netlist: Re-do the 74377/8/9 as macros. [Aaron Giles] --- src/lib/netlist/devices/net_lib.cpp | 4 +- src/lib/netlist/devices/nld_74377.cpp | 200 +------------------------- src/lib/netlist/devices/nld_74377.h | 10 +- src/lib/netlist/devices/nld_devinc.h | 18 +-- src/lib/netlist/macro/nlm_ttl74xx.cpp | 90 ++++++++++++ src/lib/netlist/macro/nlm_ttl74xx.h | 9 ++ 6 files changed, 113 insertions(+), 218 deletions(-) diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 9cbaea79bc5..ae380e6804b 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -129,9 +129,7 @@ namespace devices LIB_ENTRY(74193) LIB_ENTRY(74194) LIB_ENTRY(74365) - LIB_ENTRY(74377_dip) - LIB_ENTRY(74378_dip) - LIB_ENTRY(74379_dip) + LIB_ENTRY(74377_GATE) LIB_ENTRY(74393) LIB_ENTRY(74393_dip) //ENTRY(74279, TTL_74279, "") // only dip available diff --git a/src/lib/netlist/devices/nld_74377.cpp b/src/lib/netlist/devices/nld_74377.cpp index 6521d33764c..127803acb42 100644 --- a/src/lib/netlist/devices/nld_74377.cpp +++ b/src/lib/netlist/devices/nld_74377.cpp @@ -15,9 +15,9 @@ namespace netlist constexpr const std::array delay = { NLTIME_FROM_NS(25), NLTIME_FROM_NS(25) }; - NETLIB_OBJECT(74377_gate) + NETLIB_OBJECT(74377_GATE) { - NETLIB_CONSTRUCTOR(74377_gate) + NETLIB_CONSTRUCTOR(74377_GATE) , m_E(*this, "E") , m_D(*this, "D") , m_CP(*this, "CP") @@ -45,9 +45,6 @@ namespace netlist } } - friend class NETLIB_NAME(74377_dip); - friend class NETLIB_NAME(74378_dip); - friend class NETLIB_NAME(74379_dip); private: logic_input_t m_E; logic_input_t m_D; @@ -59,198 +56,7 @@ namespace netlist nld_power_pins m_power_pins; }; - NETLIB_OBJECT(74377_dip) - { - NETLIB_CONSTRUCTOR(74377_dip) - , m_A(*this, "A") - , m_B(*this, "B") - , m_C(*this, "C") - , m_D(*this, "D") - , m_E(*this, "E") - , m_F(*this, "F") - , m_G(*this, "G") - , m_H(*this, "H") - { - register_subalias("1", m_A.m_E); - register_subalias("2", m_A.m_Q); - register_subalias("3", m_A.m_D); - register_subalias("4", m_B.m_D); - register_subalias("5", m_B.m_Q); - register_subalias("6", m_C.m_Q); - register_subalias("7", m_C.m_D); - register_subalias("8", m_D.m_D); - register_subalias("9", m_D.m_Q); - register_subalias("10", "A.GND"); - - register_subalias("11", m_A.m_CP); - register_subalias("12", m_E.m_Q); - register_subalias("13", m_E.m_D); - register_subalias("14", m_F.m_D); - register_subalias("15", m_F.m_Q); - register_subalias("16", m_G.m_Q); - register_subalias("17", m_G.m_D); - register_subalias("18", m_H.m_D); - register_subalias("19", m_H.m_Q); - register_subalias("20", "A.VCC"); - - connect("A.GND", "B.GND"); - connect("A.GND", "C.GND"); - connect("A.GND", "D.GND"); - connect("A.GND", "E.GND"); - connect("A.GND", "F.GND"); - connect("A.GND", "G.GND"); - connect("A.GND", "H.GND"); - connect("A.VCC", "B.VCC"); - connect("A.VCC", "C.VCC"); - connect("A.VCC", "D.VCC"); - connect("A.VCC", "E.VCC"); - connect("A.VCC", "F.VCC"); - connect("A.VCC", "G.VCC"); - connect("A.VCC", "H.VCC"); - connect(m_A.m_E, m_B.m_E); - connect(m_A.m_E, m_C.m_E); - connect(m_A.m_E, m_D.m_E); - connect(m_A.m_E, m_E.m_E); - connect(m_A.m_E, m_F.m_E); - connect(m_A.m_E, m_G.m_E); - connect(m_A.m_E, m_H.m_E); - connect(m_A.m_CP, m_B.m_CP); - connect(m_A.m_CP, m_C.m_CP); - connect(m_A.m_CP, m_D.m_CP); - connect(m_A.m_CP, m_E.m_CP); - connect(m_A.m_CP, m_F.m_CP); - connect(m_A.m_CP, m_G.m_CP); - connect(m_A.m_CP, m_H.m_CP); - } - //NETLIB_RESETI(); - //NETLIB_UPDATEI(); - - protected: - NETLIB_SUB(74377_gate) m_A; - NETLIB_SUB(74377_gate) m_B; - NETLIB_SUB(74377_gate) m_C; - NETLIB_SUB(74377_gate) m_D; - NETLIB_SUB(74377_gate) m_E; - NETLIB_SUB(74377_gate) m_F; - NETLIB_SUB(74377_gate) m_G; - NETLIB_SUB(74377_gate) m_H; - }; - - NETLIB_OBJECT(74378_dip) - { - NETLIB_CONSTRUCTOR(74378_dip) - , m_A(*this, "A") - , m_B(*this, "B") - , m_C(*this, "C") - , m_D(*this, "D") - , m_E(*this, "E") - , m_F(*this, "F") - { - register_subalias("1", m_A.m_E); - register_subalias("2", m_A.m_Q); - register_subalias("3", m_A.m_D); - register_subalias("4", m_B.m_D); - register_subalias("5", m_B.m_Q); - register_subalias("6", m_C.m_D); - register_subalias("7", m_C.m_Q); - register_subalias("8", "A.GND"); - - register_subalias("9", m_A.m_CP); - register_subalias("10", m_D.m_Q); - register_subalias("11", m_D.m_D); - register_subalias("12", m_E.m_Q); - register_subalias("13", m_E.m_D); - register_subalias("14", m_F.m_D); - register_subalias("15", m_F.m_Q); - register_subalias("16", "A.VCC"); - - connect("A.GND", "B.GND"); - connect("A.GND", "C.GND"); - connect("A.GND", "D.GND"); - connect("A.GND", "E.GND"); - connect("A.GND", "F.GND"); - connect("A.VCC", "B.VCC"); - connect("A.VCC", "C.VCC"); - connect("A.VCC", "D.VCC"); - connect("A.VCC", "E.VCC"); - connect("A.VCC", "F.VCC"); - connect(m_A.m_E, m_B.m_E); - connect(m_A.m_E, m_C.m_E); - connect(m_A.m_E, m_D.m_E); - connect(m_A.m_E, m_E.m_E); - connect(m_A.m_E, m_F.m_E); - connect(m_A.m_CP, m_B.m_CP); - connect(m_A.m_CP, m_C.m_CP); - connect(m_A.m_CP, m_D.m_CP); - connect(m_A.m_CP, m_E.m_CP); - connect(m_A.m_CP, m_F.m_CP); - } - //NETLIB_RESETI(); - //NETLIB_UPDATEI(); - - protected: - NETLIB_SUB(74377_gate) m_A; - NETLIB_SUB(74377_gate) m_B; - NETLIB_SUB(74377_gate) m_C; - NETLIB_SUB(74377_gate) m_D; - NETLIB_SUB(74377_gate) m_E; - NETLIB_SUB(74377_gate) m_F; - }; - - NETLIB_OBJECT(74379_dip) - { - NETLIB_CONSTRUCTOR(74379_dip) - , m_A(*this, "A") - , m_B(*this, "B") - , m_C(*this, "C") - , m_D(*this, "D") - { - register_subalias("1", m_A.m_E); - register_subalias("2", m_A.m_Q); - register_subalias("3", m_A.m_QQ); - register_subalias("4", m_A.m_D); - register_subalias("5", m_B.m_D); - register_subalias("6", m_B.m_QQ); - register_subalias("7", m_B.m_Q); - register_subalias("8", "A.GND"); - - register_subalias("9", m_A.m_CP); - register_subalias("10", m_C.m_Q); - register_subalias("11", m_C.m_QQ); - register_subalias("12", m_C.m_D); - register_subalias("13", m_D.m_D); - register_subalias("14", m_D.m_QQ); - register_subalias("15", m_D.m_Q); - register_subalias("16", "A.VCC"); - - connect("A.GND", "B.GND"); - connect("A.GND", "C.GND"); - connect("A.GND", "D.GND"); - connect("A.VCC", "B.VCC"); - connect("A.VCC", "C.VCC"); - connect("A.VCC", "D.VCC"); - connect(m_A.m_E, m_B.m_E); - connect(m_A.m_E, m_C.m_E); - connect(m_A.m_E, m_D.m_E); - connect(m_A.m_CP, m_B.m_CP); - connect(m_A.m_CP, m_C.m_CP); - connect(m_A.m_CP, m_D.m_CP); - } - //NETLIB_RESETI(); - //NETLIB_UPDATEI(); - - protected: - NETLIB_SUB(74377_gate) m_A; - NETLIB_SUB(74377_gate) m_B; - NETLIB_SUB(74377_gate) m_C; - NETLIB_SUB(74377_gate) m_D; - }; - - - NETLIB_DEVICE_IMPL(74377_gate, "TTL_74377_GATE", "") - NETLIB_DEVICE_IMPL(74377_dip, "TTL_74377_DIP", "") - NETLIB_DEVICE_IMPL(74378_dip, "TTL_74378_DIP", "") - NETLIB_DEVICE_IMPL(74379_dip, "TTL_74379_DIP", "") + NETLIB_DEVICE_IMPL(74377_GATE, "TTL_74377_GATE", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_74377.h b/src/lib/netlist/devices/nld_74377.h index 87646d150d3..6f5a3aed14e 100644 --- a/src/lib/netlist/devices/nld_74377.h +++ b/src/lib/netlist/devices/nld_74377.h @@ -53,17 +53,9 @@ #include "netlist/nl_setup.h" + #define TTL_74377_GATE(name) \ NET_REGISTER_DEV(TTL_74377_GATE, name) -#define TTL_74377_DIP(name) \ - NET_REGISTER_DEV(TTL_74377_DIP, name) - -#define TTL_74378_DIP(name) \ - NET_REGISTER_DEV(TTL_74378_DIP, name) - -#define TTL_74379_DIP(name) \ - NET_REGISTER_DEV(TTL_74379_DIP, name) - #endif /* NLD_74377_H_ */ diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h index f42fa126fa5..af0d1a26d4b 100644 --- a/src/lib/netlist/devices/nld_devinc.h +++ b/src/lib/netlist/devices/nld_devinc.h @@ -432,15 +432,6 @@ #define TTL_74377_GATE(name) \ NET_REGISTER_DEVEXT(TTL_74377_GATE, name) -#define TTL_74377_DIP(name) \ - NET_REGISTER_DEVEXT(TTL_74377_DIP, name) - -#define TTL_74378_DIP(name) \ - NET_REGISTER_DEVEXT(TTL_74378_DIP, name) - -#define TTL_74379_DIP(name) \ - NET_REGISTER_DEVEXT(TTL_74379_DIP, name) - // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_74393.cpp // --------------------------------------------------------------------- @@ -894,6 +885,15 @@ #define TTL_74279_DIP(name) \ NET_REGISTER_DEVEXT(TTL_74279_DIP, name) +#define TTL_74377_DIP(name) \ + NET_REGISTER_DEVEXT(TTL_74377_DIP, name) + +#define TTL_74378_DIP(name) \ + NET_REGISTER_DEVEXT(TTL_74378_DIP, name) + +#define TTL_74379_DIP(name) \ + NET_REGISTER_DEVEXT(TTL_74379_DIP, name) + #define DM9312_DIP(name) \ NET_REGISTER_DEVEXT(DM9312_DIP, name) diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 33c516f9766..21b2b6775f9 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -828,6 +828,93 @@ static NETLIST_START(TTL_74279_DIP) ) NETLIST_END() +/* + * DM74377: Octal D Flip-Flop With Enable + * DM74378: Hex D Flip-Flop With Enable + * DM74379: 4-bit D Flip-Flop With Enable + * + */ + +static NETLIST_START(TTL_74377_DIP) + TTL_74377_GATE(A) + TTL_74377_GATE(B) + TTL_74377_GATE(C) + TTL_74377_GATE(D) + TTL_74377_GATE(E) + TTL_74377_GATE(F) + TTL_74377_GATE(G) + TTL_74377_GATE(H) + + NET_C(A.VCC, B.VCC, C.VCC, D.VCC, E.VCC, F.VCC, G.VCC, H.VCC) + NET_C(A.GND, B.GND, C.GND, D.GND, E.GND, F.GND, G.GND, H.GND) + NET_C(A.CP, B.CP, C.CP, D.CP, E.CP, F.CP, G.CP, H.CP) + NET_C(A.E, B.E, C.E, D.E, E.E, F.E, G.E, H.E) + + DIPPINS( /* +--------------+ */ + A.E, /* /E |1 ++ 20| VCC */ A.VCC, + A.Q, /* Q0 |2 19| Q7 */ H.Q, + A.D, /* D0 |3 18| D7 */ H.D, + B.D, /* D1 |4 74377 17| D6 */ G.D, + B.Q, /* Q1 |5 16| Q6 */ G.Q, + C.Q, /* Q2 |6 15| Q5 */ F.Q, + C.D, /* D2 |7 14| D5 */ F.D, + D.D, /* D3 |8 13| D4 */ E.D, + D.Q, /* Q3 |9 12| Q4 */ E.D, + A.GND,/* GND |10 11| CP */ A.CP + /* +--------------+ */ + ) +NETLIST_END() + +static NETLIST_START(TTL_74378_DIP) + TTL_74377_GATE(A) + TTL_74377_GATE(B) + TTL_74377_GATE(C) + TTL_74377_GATE(D) + TTL_74377_GATE(E) + TTL_74377_GATE(F) + + NET_C(A.VCC, B.VCC, C.VCC, D.VCC, E.VCC, F.VCC) + NET_C(A.GND, B.GND, C.GND, D.GND, E.GND, F.GND) + NET_C(A.CP, B.CP, C.CP, D.CP, E.CP, F.CP) + NET_C(A.E, B.E, C.E, D.E, E.E, F.E) + + DIPPINS( /* +--------------+ */ + A.E, /* /E |1 ++ 16| VCC */ A.VCC, + A.Q, /* Q0 |2 15| Q5 */ F.Q, + A.D, /* D0 |3 14| D5 */ F.D, + B.D, /* D1 |4 74378 13| D4 */ E.D, + B.Q, /* Q1 |5 12| Q4 */ E.Q, + C.D, /* D2 |6 11| D3 */ D.D, + C.Q, /* Q2 |7 10| Q3 */ D.Q, + A.GND,/* GND |8 9| CP */ A.CP + /* +--------------+ */ + ) +NETLIST_END() + +static NETLIST_START(TTL_74379_DIP) + TTL_74377_GATE(A) + TTL_74377_GATE(B) + TTL_74377_GATE(C) + TTL_74377_GATE(D) + + NET_C(A.VCC, B.VCC, C.VCC, D.VCC) + NET_C(A.GND, B.GND, C.GND, D.GND) + NET_C(A.CP, B.CP, C.CP, D.CP) + NET_C(A.E, B.E, C.E, D.E) + + DIPPINS( /* +--------------+ */ + A.E, /* /E |1 ++ 16| VCC */ A.VCC, + A.Q, /* Q0 |2 15| Q3 */ D.Q, + A.QQ, /* /Q0 |3 14| /Q3 */ D.QQ, + A.D, /* D0 |4 74379 13| D3 */ D.D, + B.D, /* D1 |5 12| D2 */ C.D, + B.QQ, /* /Q1 |6 11| /Q2 */ C.QQ, + B.Q, /* Q1 |7 10| Q2 */ C.Q, + A.GND,/* GND |8 9| CP */ A.CP + /* +--------------+ */ + ) +NETLIST_END() + /* * DM9312: One of Eight Line Data Selectors/Multiplexers * @@ -1434,5 +1521,8 @@ NETLIST_START(TTL74XX_lib) LOCAL_LIB_ENTRY(TTL_74156_DIP) LOCAL_LIB_ENTRY(TTL_74260_DIP) LOCAL_LIB_ENTRY(TTL_74279_DIP) + LOCAL_LIB_ENTRY(TTL_74377_DIP) + LOCAL_LIB_ENTRY(TTL_74378_DIP) + LOCAL_LIB_ENTRY(TTL_74379_DIP) LOCAL_LIB_ENTRY(DM9312_DIP) NETLIST_END() diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index 17fd32f885a..c2eb075d938 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -293,6 +293,15 @@ #define TTL_74279_DIP(name) \ NET_REGISTER_DEV(TTL_74279_DIP, name) +#define TTL_74377_DIP(name) \ + NET_REGISTER_DEV(TTL_74377_DIP, name) + +#define TTL_74378_DIP(name) \ + NET_REGISTER_DEV(TTL_74378_DIP, name) + +#define TTL_74379_DIP(name) \ + NET_REGISTER_DEV(TTL_74379_DIP, name) + #define DM9312(name, cA, cB, cC, cSTROBE, cD0, cD1, cD2, cD3, cD4, cD5, cD6, cD7) \ NET_REGISTER_DEV(DM9312, name) \ NET_CONNECT(name, VCC, VCC) \ From 4dd350a000fccea6246bf15ba58987dc3b1d9476 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 13 May 2020 09:59:12 -0700 Subject: [PATCH 56/69] netlist: Fix typo in netlist macros. (nw) --- src/lib/netlist/macro/nlm_ttl74xx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 21b2b6775f9..8485ce86c86 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -296,7 +296,7 @@ static NETLIST_START(TTL_7414_DIP) NET_C(A.VCC, B.VCC, C.VCC, D.VCC, E.VCC, F.VCC) DIPPINS( /* +--------------+ */ - A.A, /* A1 |1 ++ 14| VCC */ VCC.I, + A.A, /* A1 |1 ++ 14| VCC */ A.VCC, A.Q, /* Y1 |2 13| A6 */ F.A, B.A, /* A2 |3 12| Y6 */ F.Q, B.Q, /* Y2 |4 7414 11| A5 */ E.A, @@ -319,7 +319,7 @@ static NETLIST_START(TTL_74LS14_DIP) NET_C(A.VCC, B.VCC, C.VCC, D.VCC, E.VCC, F.VCC) DIPPINS( /* +--------------+ */ - A.A, /* A1 |1 ++ 14| VCC */ VCC.I, + A.A, /* A1 |1 ++ 14| VCC */ A.VCC, A.Q, /* Y1 |2 13| A6 */ F.A, B.A, /* A2 |3 12| Y6 */ F.Q, B.Q, /* Y2 |4 74LS14 11| A5 */ E.A, From 62f1a3169d91aefcefbf3cab2839814bd64840f3 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 15 May 2020 10:30:46 -0400 Subject: [PATCH 57/69] hd44780: Add Epson SED1278-0B variant with European character generator ROM --- src/devices/video/hd44780.cpp | 13 +++++++++++++ src/devices/video/hd44780.h | 11 +++++++++++ src/mame/drivers/eurit.cpp | 4 ++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index a55569d4e3e..7abf8e0a979 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -23,6 +23,7 @@ //************************************************************************** DEFINE_DEVICE_TYPE(HD44780, hd44780_device, "hd44780_a00", "Hitachi HD44780 A00 LCD Controller") +DEFINE_DEVICE_TYPE(SED1278_0B, sed1278_0b_device, "sed1278_0b", "Epson SED1278-0B LCD Controller") // packaged as either SED1278F0B or SED1278D0B DEFINE_DEVICE_TYPE(KS0066_F05, ks0066_f05_device, "ks0066_f05", "Samsung KS0066 F05 LCD Controller") @@ -35,6 +36,11 @@ ROM_START( hd44780_a00 ) ROM_LOAD( "hd44780_a00.bin", 0x0000, 0x1000, BAD_DUMP CRC(01d108e2) SHA1(bc0cdf0c9ba895f22e183c7bd35a3f655f2ca96f)) // from page 17 of the HD44780 datasheet ROM_END +ROM_START( sed1278_0b ) + ROM_REGION( 0x1000, "cgrom", 0 ) + ROM_LOAD( "sed1278_0b.bin", 0x0000, 0x1000, BAD_DUMP CRC(eef342fa) SHA1(d6ac58a48e428e7cff26fb9c8ea9b4eeaa853038)) // from page 9-33 of the SED1278 datasheet +ROM_END + ROM_START( ks0066_f05 ) ROM_REGION( 0x1000, "cgrom", 0 ) ROM_LOAD( "ks0066_f05.bin", 0x0000, 0x1000, BAD_DUMP CRC(af9e7bd6) SHA1(0196e871584ee5d370856e7307c0f9d1466e3e51)) // from page 51 of the KS0066 datasheet @@ -67,6 +73,12 @@ hd44780_device::hd44780_device(const machine_config &mconfig, device_type type, { } +sed1278_0b_device::sed1278_0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + hd44780_device(mconfig, SED1278_0B, tag, owner, clock) +{ + set_charset_type(CHARSET_SED1278_0B); +} + ks0066_f05_device::ks0066_f05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : hd44780_device(mconfig, KS0066_F05, tag, owner, clock) { @@ -83,6 +95,7 @@ const tiny_rom_entry *hd44780_device::device_rom_region() const switch (m_charset_type) { case CHARSET_HD44780_A00: return ROM_NAME( hd44780_a00 ); + case CHARSET_SED1278_0B: return ROM_NAME( sed1278_0b ); case CHARSET_KS0066_F05: return ROM_NAME( ks0066_f05 ); } diff --git a/src/devices/video/hd44780.h b/src/devices/video/hd44780.h index 71b88f6f6b4..b8d79236955 100644 --- a/src/devices/video/hd44780.h +++ b/src/devices/video/hd44780.h @@ -66,6 +66,7 @@ protected: enum { CHARSET_HD44780_A00, + CHARSET_SED1278_0B, CHARSET_KS0066_F05 /*, CHARSET_HD44780_A01, CHARSET_HD44780_A02, @@ -138,6 +139,15 @@ private: enum { DDRAM, CGRAM }; }; +// ======================> sed1278_0b_device + +class sed1278_0b_device : public hd44780_device +{ +public: + // construction/destruction + sed1278_0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +}; + // ======================> ks0066_f05_device class ks0066_f05_device : public hd44780_device @@ -149,6 +159,7 @@ public: // device type definition DECLARE_DEVICE_TYPE(HD44780, hd44780_device) +DECLARE_DEVICE_TYPE(SED1278_0B, sed1278_0b_device) DECLARE_DEVICE_TYPE(KS0066_F05, ks0066_f05_device) #endif // MAME_VIDEO_HD44780_H diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index 483f1e2393a..0b18eab27f8 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -165,7 +165,7 @@ void eurit_state::eurit30(machine_config &config) PALETTE(config, "palette", FUNC(eurit_state::palette_init), 2); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(SED1278_0B(config, "lcdc", 0)); lcdc.set_lcd_size(2, 20); lcdc.set_pixel_update_cb(FUNC(eurit_state::lcd_pixel_update)); } @@ -177,4 +177,4 @@ ROM_START(eurit30) ROM_END -SYST(1996, eurit30, 0, 0, eurit30, eurit30, eurit_state, empty_init, "Ascom", "Eurit 30", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND) +SYST(1996, eurit30, 0, 0, eurit30, eurit30, eurit_state, empty_init, "Ascom", "Eurit 30", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) From 9b839978af5f47d2d6c2d5d6056acd966cea3428 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 16 May 2020 00:41:45 +1000 Subject: [PATCH 58/69] (nw) tk80, zapcomp: minor cleanup --- src/mame/drivers/tk80.cpp | 11 +++++----- src/mame/drivers/zapcomputer.cpp | 36 ++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/mame/drivers/tk80.cpp b/src/mame/drivers/tk80.cpp index 5af308256a4..1bf75be4579 100644 --- a/src/mame/drivers/tk80.cpp +++ b/src/mame/drivers/tk80.cpp @@ -385,34 +385,35 @@ void tk80_state::ics8080(machine_config &config) /* ROM definition */ ROM_START( tk80 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0300, "maincpu", 0 ) ROM_LOAD( "tk80-1.bin", 0x0000, 0x0100, CRC(897295e4) SHA1(50fb42b07252fc48044830e2f228e218fc59481c)) ROM_LOAD( "tk80-2.bin", 0x0100, 0x0100, CRC(d54480c3) SHA1(354962aca1710ac75b40c8c23a6c303938f9d596)) ROM_LOAD( "tk80-3.bin", 0x0200, 0x0100, CRC(8d4b02ef) SHA1(2b5a1ee8f97db23ffec48b96f12986461024c995)) ROM_END ROM_START( ics8080 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x2000, "maincpu", 0 ) ROM_LOAD( "amtsmnonv27.rom1", 0x0000, 0x0800, CRC(82d40dc5) SHA1(9215457101c3b9b8706dbebe902196494993a282) ) ROM_LOAD( "thmcplv11.rom2", 0x0800, 0x0800, CRC(51784f70) SHA1(c05c75d566c4ff8f681eba29cd48e72b95be89e0) ) ROM_LOAD( "tunev08.rom3", 0x1000, 0x0800, CRC(aae2344b) SHA1(b02b22cadb43c7ac26c43d443688b9b19d465973) ) ROM_LOAD( "mtrspdv12.rom4", 0x1800, 0x0800, CRC(920dda33) SHA1(631ee5e6314d9788e7be0ae00a97b55693eeb855) ) + ROM_FILL(0x2be,1,0x7c) // Fix display of B ROM_END ROM_START( mikrolab ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) /* these dumps are taken from PDF so need check with real device */ ROM_LOAD( "rom-1.bin", 0x0000, 0x0200, BAD_DUMP CRC(eed5f23b) SHA1(c82f7a16ce44c4fcbcb333245555feae1fcdf058)) ROM_LOAD( "rom-2.bin", 0x0200, 0x0200, BAD_DUMP CRC(726a224f) SHA1(7ed8d2c6dd4fb7836475e207e1972e33a6a91d2f)) ROM_END ROM_START( nectk85 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "tk85.bin", 0x0000, 0x0800, CRC(8a0b6d7e) SHA1(6acc8c04990692b08929043ccf638761b7301def)) ROM_END ROM_START( nd80z ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "ndf.bin", 0x0000, 0x0800, CRC(fe829f1d) SHA1(6fff31884b8d984076d4450ca3a3e48efadeb648)) ROM_END diff --git a/src/mame/drivers/zapcomputer.cpp b/src/mame/drivers/zapcomputer.cpp index e718367412d..3fd03a781e1 100644 --- a/src/mame/drivers/zapcomputer.cpp +++ b/src/mame/drivers/zapcomputer.cpp @@ -13,7 +13,7 @@ published by BYTE/McGRAW-HILL Basic usage instructions: - SHIFT + 0: view and edit memory values + SHIFT + 0: view and edit memory values (Enter to escape) SHIFT + 1: view and edit register values SHIFT + 2: execution mode @@ -24,6 +24,10 @@ Currently missing features in this driver: * hookup RS232 support * maybe also support video terminal described in chapter 9 + + Here is a test to paste in: + -0400^11^22^33^44^55^66^77^88^99^X-0400 + You can confirm the entries by pressing UP */ @@ -61,7 +65,7 @@ uint8_t zapcomp_state::decode7seg(uint8_t data) //into the status of the segments of the 7 segment displays //controlled by a 82S23 PROM - uint8_t patterns[16] = { + static uint8_t patterns[16] = { 0x77, 0x41, 0x6e, 0x6b, 0x59, 0x3b, 0x3f, 0x61, 0x7f, 0x79, 0x7d, 0x1f, @@ -107,7 +111,7 @@ READ8_MEMBER( zapcomp_state::keyboard_r ) void zapcomp_state::zapcomp_mem(address_map &map) { - map(0x0000, 0x03ff).rom().region("roms", 0); /* system monitor */ + map(0x0000, 0x03ff).rom(); /* system monitor */ map(0x0400, 0x07ff).ram(); /* mandatory 1 kilobyte bank #0 */ map(0x0800, 0x0bff).ram(); /* extra 1 kilobyte bank #1 (optional) */ map(0x0c00, 0x0fff).ram(); /* extra 1 kilobyte bank #2 (optional) */ @@ -127,9 +131,9 @@ void zapcomp_state::zapcomp_io(address_map &map) static INPUT_PORTS_START( zapcomp ) PORT_START("X0") - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('-') + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('R') + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('Z') PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') @@ -137,17 +141,17 @@ static INPUT_PORTS_START( zapcomp ) PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') - PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') - PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') - PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') - PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') + PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') + PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_START("X1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("EXEC") PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT") PORT_CODE(KEYCODE_RIGHT) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("EXEC") PORT_CODE(KEYCODE_ENTER) PORT_CHAR('X') + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT") PORT_CODE(KEYCODE_UP) PORT_CHAR('^') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) INPUT_PORTS_END void zapcomp_state::machine_start() @@ -167,7 +171,7 @@ void zapcomp_state::zapcomp(machine_config &config) } ROM_START( zapcomp ) - ROM_REGION( 0x10000, "roms", 0 ) + ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD("zap.rom", 0x0000, 0x0400, CRC(3f4416e9) SHA1(d6493707bfba1a1e1e551f8144194afa5bda3316) ) ROM_END From 502bf866baf059e4bf77487223c6edd6150758d2 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 15 May 2020 17:55:40 +0200 Subject: [PATCH 59/69] renaissa: add lcd screen (nw) --- src/mame/drivers/novag_diablo.cpp | 21 +++++----- src/mame/drivers/novag_sexpert.cpp | 21 +++++----- src/mame/drivers/saitek_exchess.cpp | 2 + src/mame/drivers/saitek_renaissance.cpp | 52 +++++++++++++++++++++---- src/mame/layout/saitek_renaissance.lay | 4 +- 5 files changed, 71 insertions(+), 29 deletions(-) diff --git a/src/mame/drivers/novag_diablo.cpp b/src/mame/drivers/novag_diablo.cpp index 5674f04ba19..cca701f3bf8 100644 --- a/src/mame/drivers/novag_diablo.cpp +++ b/src/mame/drivers/novag_diablo.cpp @@ -294,16 +294,6 @@ void diablo_state::diablo68k(machine_config &config) m_irq_on->set_start_delay(irq_period - attotime::from_nsec(1100)); // active for 1.1us TIMER(config, "irq_off").configure_periodic(FUNC(diablo_state::irq_off), irq_period); - MOS6551(config, m_acia).set_xtal(1.8432_MHz_XTAL); - m_acia->irq_handler().set_inputline("maincpu", M68K_IRQ_IPL2); - m_acia->rts_handler().set("acia", FUNC(mos6551_device::write_cts)); - m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); - m_acia->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); - - RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); - m_rs232->rxd_handler().set("acia", FUNC(mos6551_device::write_rxd)); - m_rs232->dsr_handler().set("acia", FUNC(mos6551_device::write_dsr)); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS); @@ -332,6 +322,17 @@ void diablo_state::diablo68k(machine_config &config) SPEAKER(config, "mono").front_center(); BEEP(config, m_beeper, 32.768_kHz_XTAL/32); // 1024Hz m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25); + + /* uart (configure after video) */ + MOS6551(config, m_acia).set_xtal(1.8432_MHz_XTAL); + m_acia->irq_handler().set_inputline("maincpu", M68K_IRQ_IPL2); + m_acia->rts_handler().set("acia", FUNC(mos6551_device::write_cts)); + m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); + m_acia->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); + + RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); + m_rs232->rxd_handler().set("acia", FUNC(mos6551_device::write_rxd)); + m_rs232->dsr_handler().set("acia", FUNC(mos6551_device::write_dsr)); } void diablo_state::scorpio68k(machine_config &config) diff --git a/src/mame/drivers/novag_sexpert.cpp b/src/mame/drivers/novag_sexpert.cpp index f0d565618c6..a82b622d704 100644 --- a/src/mame/drivers/novag_sexpert.cpp +++ b/src/mame/drivers/novag_sexpert.cpp @@ -419,16 +419,6 @@ void sexpert_state::sexpert(machine_config &config) m_irq_on->set_start_delay(irq_period - attotime::from_nsec(21500)); // active for 21.5us TIMER(config, "irq_off").configure_periodic(FUNC(sexpert_state::irq_off), irq_period); - MOS6551(config, m_acia).set_xtal(1.8432_MHz_XTAL); // R65C51P2 - RTS to CTS, DCD to GND - m_acia->irq_handler().set_inputline("maincpu", m65c02_device::NMI_LINE); - m_acia->rts_handler().set("acia", FUNC(mos6551_device::write_cts)); - m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); - m_acia->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); - - RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); - m_rs232->rxd_handler().set("acia", FUNC(mos6551_device::write_rxd)); - m_rs232->dsr_handler().set("acia", FUNC(mos6551_device::write_dsr)); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS); @@ -457,6 +447,17 @@ void sexpert_state::sexpert(machine_config &config) SPEAKER(config, "mono").front_center(); BEEP(config, m_beeper, 32.768_kHz_XTAL/32); // 1024Hz m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25); + + /* uart (configure after video) */ + MOS6551(config, m_acia).set_xtal(1.8432_MHz_XTAL); // R65C51P2 - RTS to CTS, DCD to GND + m_acia->irq_handler().set_inputline("maincpu", m65c02_device::NMI_LINE); + m_acia->rts_handler().set("acia", FUNC(mos6551_device::write_cts)); + m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); + m_acia->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); + + RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); + m_rs232->rxd_handler().set("acia", FUNC(mos6551_device::write_rxd)); + m_rs232->dsr_handler().set("acia", FUNC(mos6551_device::write_dsr)); } void sforte_state::sforte(machine_config &config) diff --git a/src/mame/drivers/saitek_exchess.cpp b/src/mame/drivers/saitek_exchess.cpp index e7ae6082ab7..e471bca197a 100644 --- a/src/mame/drivers/saitek_exchess.cpp +++ b/src/mame/drivers/saitek_exchess.cpp @@ -14,10 +14,12 @@ Hardware notes: ******************************************************************************/ #include "emu.h" + #include "cpu/f8/f8.h" #include "machine/f3853.h" #include "video/hlcd0538.h" #include "video/pwm.h" + #include "screen.h" // internal artwork diff --git a/src/mame/drivers/saitek_renaissance.cpp b/src/mame/drivers/saitek_renaissance.cpp index cd349ed44d7..eb6ff898a1a 100644 --- a/src/mame/drivers/saitek_renaissance.cpp +++ b/src/mame/drivers/saitek_renaissance.cpp @@ -22,8 +22,8 @@ The LCD screen is fairly large, it's the same one as in Saitek Simultano, so a chessboard display + 7seg info. TODO: -- LCD (need SVG screen) - not sure about comm/module leds +- finish internal artwork - make it a subdriver of saitek_leonardo.cpp? or too many differences - same TODO list as saitek_leonardo.cpp @@ -38,6 +38,7 @@ TODO: #include "video/pwm.h" #include "video/sed1500.h" +#include "screen.h" #include "speaker.h" // internal artwork @@ -53,9 +54,10 @@ public: driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_board(*this, "board"), - m_display(*this, "display"), + m_display(*this, "display%u", 0), m_dac(*this, "dac"), - m_inputs(*this, "IN.%u", 0) + m_inputs(*this, "IN.%u", 0), + m_out_lcd(*this, "s%u.%u", 0U, 0U) { } // machine configs @@ -68,12 +70,16 @@ private: // devices/pointers required_device m_maincpu; required_device m_board; - required_device m_display; + required_device_array m_display; optional_device m_dac; required_ioport_array<8+1> m_inputs; + output_finder<16, 34> m_out_lcd; void main_map(address_map &map); + void lcd_pwm_w(offs_t offset, u8 data); + void lcd_output_w(offs_t offset, u64 data); + void update_display(); void mux_w(u8 data); void leds_w(u8 data); @@ -93,6 +99,8 @@ private: void ren_state::machine_start() { + m_out_lcd.resolve(); + save_item(NAME(m_inp_mux)); save_item(NAME(m_led_data)); } @@ -103,12 +111,25 @@ void ren_state::machine_start() I/O ******************************************************************************/ +// LCD + +void ren_state::lcd_pwm_w(offs_t offset, u8 data) +{ + m_out_lcd[offset & 0x3f][offset >> 6] = data; +} + +void ren_state::lcd_output_w(offs_t offset, u64 data) +{ + m_display[1]->write_row(offset, data); +} + + // misc void ren_state::update_display() { - m_display->matrix_partial(0, 9, 1 << (m_inp_mux & 0xf), (m_inp_mux << 4 & 0x100) | m_led_data[0], false); - m_display->matrix_partial(9, 1, 1, (m_inp_mux >> 2 & 0x30) | m_led_data[1], true); + m_display[0]->matrix_partial(0, 9, 1 << (m_inp_mux & 0xf), (m_inp_mux << 4 & 0x100) | m_led_data[0], false); + m_display[0]->matrix_partial(9, 1, 1, (m_inp_mux >> 2 & 0x30) | m_led_data[1], true); } void ren_state::mux_w(u8 data) @@ -292,8 +313,17 @@ void ren_state::ren(machine_config &config) m_board->set_delay(attotime::from_msec(150)); /* video hardware */ - SED1502(config, "lcd", 32768); - PWM_DISPLAY(config, m_display).set_size(9+1, 9); + PWM_DISPLAY(config, m_display[0]).set_size(9+1, 9); + + SED1502(config, "lcd", 32768).write_segs().set(FUNC(ren_state::lcd_output_w)); + PWM_DISPLAY(config, m_display[1]).set_size(16, 34); + m_display[1]->output_x().set(FUNC(ren_state::lcd_pwm_w)); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); + screen.set_refresh_hz(60); + screen.set_size(873/2, 1080/2); + screen.set_visarea_full(); + config.set_default_layout(layout_saitek_renaissance); /* sound hardware */ @@ -311,11 +341,17 @@ void ren_state::ren(machine_config &config) ROM_START( renaissa ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("sw7_518d_u3.u3", 0x8000, 0x8000, CRC(21d2405f) SHA1(6ddcf9bdd30aa446fcaeab919a8f950dc3428365) ) // HN27C256AG-10 + + ROM_REGION( 795951, "screen", 0 ) + ROM_LOAD("renaissa.svg", 0, 795951, CRC(ac9942bb) SHA1(f9252e5bf7b8af698a403c3f8f5ea9e475e0bf0b) ) ROM_END ROM_START( renaissaa ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("sx7_518b.u3", 0x8000, 0x8000, CRC(a0c3ffe8) SHA1(fa170a6d4d54d41de77e0bb72f969219e6f376af) ) // MBM27C256H-10 + + ROM_REGION( 795951, "screen", 0 ) + ROM_LOAD("renaissa.svg", 0, 795951, CRC(ac9942bb) SHA1(f9252e5bf7b8af698a403c3f8f5ea9e475e0bf0b) ) ROM_END } // anonymous namespace diff --git a/src/mame/layout/saitek_renaissance.lay b/src/mame/layout/saitek_renaissance.lay index a01c5522791..5509b3b4286 100644 --- a/src/mame/layout/saitek_renaissance.lay +++ b/src/mame/layout/saitek_renaissance.lay @@ -391,7 +391,7 @@ license:CC0 - + @@ -399,6 +399,8 @@ license:CC0 + + From 761d726697721751ecbe1e972b7760dad5d11ff9 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 15 May 2020 18:01:57 +0200 Subject: [PATCH 60/69] netlist: fix breakout SLOW_BUT_ACCURATE. (nw) --- src/mame/machine/nl_breakout.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mame/machine/nl_breakout.cpp b/src/mame/machine/nl_breakout.cpp index 059d4a5c228..5610c008f2d 100644 --- a/src/mame/machine/nl_breakout.cpp +++ b/src/mame/machine/nl_breakout.cpp @@ -73,15 +73,13 @@ NETLIST_START(breakout) #if (SLOW_BUT_ACCURATE) - //SOLVER(Solver, 48000) SOLVER(Solver, 16000) - PARAM(Solver.ACCURACY, 1e-7) // less accuracy and diode will not work + PARAM(Solver.RELTOL, 5e-4) // less accuracy and diode will not work PARAM(Solver.DYNAMIC_TS, 1) - PARAM(Solver.DYNAMIC_LTE, 1e-2) - PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 1e-8) + PARAM(Solver.DYNAMIC_LTE, 1e0) + PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 1e-7) PARAM(Solver.METHOD, "MAT_CR") #else - //SOLVER(Solver, 48000) SOLVER(Solver, 16000) PARAM(Solver.ACCURACY, 1e-4) PARAM(Solver.DYNAMIC_TS, 1) From 27bcc7ae1eb80ee41e48fe2b84e04b26091ef47a Mon Sep 17 00:00:00 2001 From: Rebecca Wallander Date: Fri, 15 May 2020 18:04:43 +0200 Subject: [PATCH 61/69] compis.xml: add seven more dumps --- hash/compis.xml | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/hash/compis.xml b/hash/compis.xml index 8f71e7e6157..6ceebfc0601 100644 --- a/hash/compis.xml +++ b/hash/compis.xml @@ -330,4 +330,96 @@ Systemskiva för hÃ¥rdskiveenhet [version 7242] + + + MätEtt (enanvändare) + 1987 + Esselte Studium + + + + + + + + + + + + Millikans försök (enanvändare) + 1987 + Esselte Studium + + + + + + + + + + + RitEtt (enanvändare) + 1986 + Esselte Studium + + + + + + + + + + + Datorn i matematik (nät/skollicens) + 1986 + Esselte Studium + + + + + + + + + + + Mät energi (enanvändare) + 1986 + Esselte Studium + + + + + + + + + + + Internationella ord frÃ¥n latinet (nät/skollicens) + 1988 + Almqvist & Wiksell + + + + + + + + + + + Internationella ord frÃ¥n grekiskan (nät/skollicens) + 1988 + Almqvist & Wiksell + + + + + + + + From 7fd817a1d637d1c7c40da14dade8f63460d1b3a4 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 15 May 2020 18:15:39 +0200 Subject: [PATCH 62/69] various drivers: READ/WRITE macros removal (nw) --- src/devices/cpu/clipper/clipper.cpp | 2 +- src/devices/cpu/clipper/clipper.h | 4 +- src/devices/machine/phi.cpp | 2 +- src/devices/machine/phi.h | 2 +- src/mame/audio/scramble.cpp | 14 +- src/mame/drivers/88games.cpp | 2 +- src/mame/drivers/abc1600.cpp | 10 +- src/mame/drivers/abc80.cpp | 6 +- src/mame/drivers/ajax.cpp | 4 +- src/mame/drivers/aliens.cpp | 6 +- src/mame/drivers/astrocde.cpp | 4 +- src/mame/drivers/atlantis.cpp | 8 +- src/mame/drivers/b16.cpp | 8 +- src/mame/drivers/baraduke.cpp | 10 +- src/mame/drivers/barata.cpp | 16 +- src/mame/drivers/basic52.cpp | 8 +- src/mame/drivers/bladestl.cpp | 2 +- src/mame/drivers/blockhl.cpp | 4 +- src/mame/drivers/blueprnt.cpp | 2 +- src/mame/drivers/bml3.cpp | 4 +- src/mame/drivers/bottom9.cpp | 4 +- src/mame/drivers/cabaret.cpp | 12 +- src/mame/drivers/cgang.cpp | 66 ++--- src/mame/drivers/chqflag.cpp | 4 +- src/mame/drivers/cmi.cpp | 32 +-- src/mame/drivers/combatsc.cpp | 2 +- src/mame/drivers/compucolor.cpp | 8 +- src/mame/drivers/crimfght.cpp | 8 +- src/mame/drivers/csplayh5.cpp | 4 +- src/mame/drivers/ddribble.cpp | 4 +- src/mame/drivers/djboy.cpp | 16 +- src/mame/drivers/drw80pkr.cpp | 24 +- src/mame/drivers/dunhuang.cpp | 8 +- src/mame/drivers/enigma2.cpp | 8 +- src/mame/drivers/et3400.cpp | 28 +- src/mame/drivers/exerion.cpp | 6 +- src/mame/drivers/fastfred.cpp | 4 +- src/mame/drivers/fastlane.cpp | 4 +- src/mame/drivers/fccpu30.cpp | 48 ++-- src/mame/drivers/fidel_card.cpp | 12 +- src/mame/drivers/fidel_cc1.cpp | 12 +- src/mame/drivers/fidel_cc10.cpp | 16 +- src/mame/drivers/fidel_csc.cpp | 28 +- src/mame/drivers/fidel_elite.cpp | 28 +- src/mame/drivers/fidel_excel.cpp | 12 +- src/mame/drivers/fidel_sc6.cpp | 12 +- src/mame/drivers/fidel_vcc.cpp | 24 +- src/mame/drivers/fidel_vsc.cpp | 36 +-- src/mame/drivers/finalizr.cpp | 2 +- src/mame/drivers/flkatck.cpp | 2 +- src/mame/drivers/fm7.cpp | 14 +- src/mame/drivers/fmtowns.cpp | 12 +- src/mame/drivers/fruitpc.cpp | 8 +- src/mame/drivers/funworld.cpp | 8 +- src/mame/drivers/gaelco3d.cpp | 4 +- src/mame/drivers/galaga.cpp | 6 +- src/mame/drivers/galaxian.cpp | 38 +-- src/mame/drivers/gameplan.cpp | 13 +- src/mame/drivers/gaplus.cpp | 4 +- src/mame/drivers/gatron.cpp | 4 +- src/mame/drivers/gmaster.cpp | 44 +-- src/mame/drivers/goldart.cpp | 8 +- src/mame/drivers/goldstar.cpp | 12 +- src/mame/drivers/gradius3.cpp | 2 +- src/mame/drivers/guab.cpp | 44 +-- src/mame/drivers/gyruss.cpp | 22 +- src/mame/drivers/h8.cpp | 4 +- src/mame/drivers/hcastle.cpp | 2 +- src/mame/drivers/hexion.cpp | 2 +- src/mame/drivers/hh_hmcs40.cpp | 340 +++++++++++------------ src/mame/drivers/hh_pic16.cpp | 164 +++++------ src/mame/drivers/himesiki.cpp | 4 +- src/mame/drivers/hp49gp.cpp | 8 +- src/mame/drivers/hp80.cpp | 8 +- src/mame/drivers/hunter2.cpp | 16 +- src/mame/drivers/husky.cpp | 20 +- src/mame/drivers/hvyunit.cpp | 28 +- src/mame/drivers/ibm6580.cpp | 24 +- src/mame/drivers/igs009.cpp | 12 +- src/mame/drivers/igspoker.cpp | 4 +- src/mame/drivers/interpro.cpp | 8 +- src/mame/drivers/iqblock.cpp | 2 +- src/mame/drivers/ironhors.cpp | 9 +- src/mame/drivers/isbc.cpp | 8 +- src/mame/drivers/itech8.cpp | 6 +- src/mame/drivers/jackie.cpp | 8 +- src/mame/drivers/jongkyo.cpp | 8 +- src/mame/drivers/jpmimpct.cpp | 8 +- src/mame/drivers/jpmmps.cpp | 12 +- src/mame/drivers/jpmsys5.cpp | 4 +- src/mame/drivers/junofrst.cpp | 12 +- src/mame/drivers/kdt6.cpp | 20 +- src/mame/drivers/koikoi.cpp | 8 +- src/mame/drivers/konamim2.cpp | 12 +- src/mame/drivers/konmedal.cpp | 2 +- src/mame/drivers/ksys573.cpp | 32 +-- src/mame/drivers/lordgun.cpp | 14 +- src/mame/drivers/m63.cpp | 8 +- src/mame/drivers/mainevt.cpp | 2 +- src/mame/drivers/maygay1b.cpp | 38 ++- src/mame/drivers/maygayv1.cpp | 28 +- src/mame/drivers/megazone.cpp | 8 +- src/mame/drivers/mephisto_brikett.cpp | 4 +- src/mame/drivers/mephisto_mondial68k.cpp | 4 +- src/mame/drivers/meritm.cpp | 36 +-- src/mame/drivers/metro.cpp | 12 +- src/mame/drivers/nemesis.cpp | 4 +- src/mame/drivers/newbrain.cpp | 8 +- src/mame/drivers/odyssey2.cpp | 36 +-- src/mame/drivers/pandoras.cpp | 6 +- src/mame/drivers/parodius.cpp | 2 +- src/mame/drivers/pcat_dyn.cpp | 4 +- src/mame/drivers/peplus.cpp | 4 +- src/mame/drivers/quickpick5.cpp | 4 +- src/mame/drivers/rollerg.cpp | 2 +- src/mame/drivers/rotaryf.cpp | 16 +- src/mame/drivers/sbc6510.cpp | 24 +- src/mame/drivers/sdk86.cpp | 12 +- src/mame/drivers/sf.cpp | 2 +- src/mame/drivers/sitcom.cpp | 18 +- src/mame/drivers/slc1a.cpp | 12 +- src/mame/drivers/splus.cpp | 8 +- src/mame/drivers/spoker.cpp | 12 +- src/mame/drivers/spy.cpp | 4 +- src/mame/drivers/suprgolf.cpp | 36 +-- src/mame/drivers/surpratk.cpp | 2 +- src/mame/drivers/test_t400.cpp | 4 +- src/mame/drivers/timeplt.cpp | 2 +- src/mame/drivers/tmnt.cpp | 2 +- src/mame/drivers/toratora.cpp | 20 +- src/mame/drivers/trvquest.cpp | 4 +- src/mame/drivers/twin16.cpp | 2 +- src/mame/drivers/vendetta.cpp | 2 +- src/mame/drivers/videopkr.cpp | 40 +-- src/mame/drivers/wecleman.cpp | 2 +- src/mame/drivers/wink.cpp | 4 +- src/mame/includes/88games.h | 2 +- src/mame/includes/abc1600.h | 10 +- src/mame/includes/abc80.h | 6 +- src/mame/includes/abc80x.h | 2 +- src/mame/includes/ajax.h | 4 +- src/mame/includes/aliens.h | 6 +- src/mame/includes/astrocde.h | 4 +- src/mame/includes/baraduke.h | 10 +- src/mame/includes/bladestl.h | 2 +- src/mame/includes/blueprnt.h | 2 +- src/mame/includes/bottom9.h | 4 +- src/mame/includes/chqflag.h | 4 +- src/mame/includes/combatsc.h | 2 +- src/mame/includes/crimfght.h | 6 +- src/mame/includes/ddribble.h | 4 +- src/mame/includes/digdug.h | 2 +- src/mame/includes/djboy.h | 16 +- src/mame/includes/exerion.h | 6 +- src/mame/includes/fastfred.h | 4 +- src/mame/includes/fastlane.h | 4 +- src/mame/includes/finalizr.h | 2 +- src/mame/includes/flkatck.h | 2 +- src/mame/includes/fm7.h | 4 - src/mame/includes/fmtowns.h | 12 +- src/mame/includes/funworld.h | 8 +- src/mame/includes/gaelco3d.h | 4 +- src/mame/includes/galaga.h | 6 +- src/mame/includes/galaxian.h | 34 +-- src/mame/includes/galaxold.h | 2 +- src/mame/includes/gameplan.h | 17 +- src/mame/includes/gaplus.h | 4 +- src/mame/includes/gatron.h | 6 +- src/mame/includes/goldstar.h | 12 +- src/mame/includes/gradius3.h | 2 +- src/mame/includes/gyruss.h | 18 +- src/mame/includes/hcastle.h | 2 +- src/mame/includes/hexion.h | 2 +- src/mame/includes/himesiki.h | 4 +- src/mame/includes/homerun.h | 8 +- src/mame/includes/hp48.h | 12 +- src/mame/includes/iqblock.h | 2 +- src/mame/includes/ironhors.h | 3 +- src/mame/includes/itech8.h | 6 +- src/mame/includes/jpmimpct.h | 8 +- src/mame/includes/jpmsys5.h | 4 +- src/mame/includes/kaypro.h | 6 +- src/mame/includes/lordgun.h | 14 +- src/mame/includes/mainevt.h | 2 +- src/mame/includes/maygay1b.h | 32 +-- src/mame/includes/megazone.h | 8 +- src/mame/includes/metro.h | 12 +- src/mame/includes/nemesis.h | 4 +- src/mame/includes/newbrain.h | 8 +- src/mame/includes/pandoras.h | 6 +- src/mame/includes/parodius.h | 2 +- src/mame/includes/rollerg.h | 2 +- src/mame/includes/scramble.h | 14 +- src/mame/includes/simpsons.h | 2 +- src/mame/includes/spy.h | 4 +- src/mame/includes/surpratk.h | 2 +- src/mame/includes/timeplt.h | 2 +- src/mame/includes/tmnt.h | 2 +- src/mame/includes/tutankhm.h | 2 +- src/mame/includes/twin16.h | 2 +- src/mame/includes/vendetta.h | 2 +- src/mame/includes/wecleman.h | 2 +- src/mame/machine/abc1600mac.h | 24 +- src/mame/machine/hp48.cpp | 12 +- src/mame/machine/interpro_ioga.cpp | 4 +- src/mame/machine/interpro_ioga.h | 4 +- src/mame/machine/kaypro.cpp | 8 +- src/mame/machine/simpsons.cpp | 2 +- src/mame/video/abc800.cpp | 2 +- src/mame/video/digdug.cpp | 2 +- src/mame/video/gameplan.cpp | 8 +- src/mame/video/gatron.cpp | 2 +- src/mame/video/homerun.cpp | 8 +- src/mame/video/tutankhm.cpp | 2 +- 214 files changed, 1273 insertions(+), 1301 deletions(-) diff --git a/src/devices/cpu/clipper/clipper.cpp b/src/devices/cpu/clipper/clipper.cpp index a18fcd2fc92..6b2704b5150 100644 --- a/src/devices/cpu/clipper/clipper.cpp +++ b/src/devices/cpu/clipper/clipper.cpp @@ -333,7 +333,7 @@ bool clipper_device::memory_translate(int spacenum, int intention, offs_t &addre return ((intention & TRANSLATE_TYPE_MASK) == TRANSLATE_FETCH ? get_icammu() : get_dcammu()).memory_translate(m_ssw, spacenum, intention, address); } -WRITE16_MEMBER(clipper_device::set_exception) +void clipper_device::set_exception(u16 data) { LOGMASKED(LOG_EXCEPTION, "external exception 0x%04x triggered\n", data); diff --git a/src/devices/cpu/clipper/clipper.h b/src/devices/cpu/clipper/clipper.h index 47d035ec3b0..3e78a5fdfff 100644 --- a/src/devices/cpu/clipper/clipper.h +++ b/src/devices/cpu/clipper/clipper.h @@ -18,8 +18,8 @@ class clipper_device : public cpu_device { public: - DECLARE_WRITE8_MEMBER(set_ivec) { m_ivec = data; } - DECLARE_WRITE16_MEMBER(set_exception); + void set_ivec(u8 data) { m_ivec = data; } + void set_exception(u16 data); // branch conditions (first description for comparison, second for move/logical) enum branch_conditions : u8 diff --git a/src/devices/machine/phi.cpp b/src/devices/machine/phi.cpp index 4e1e4ea8c6b..5c1028c01c1 100644 --- a/src/devices/machine/phi.cpp +++ b/src/devices/machine/phi.cpp @@ -243,7 +243,7 @@ WRITE_LINE_MEMBER(phi_device::ren_w) set_ext_signal(PHI_488_REN , state); } -WRITE8_MEMBER(phi_device::bus_dio_w) +void phi_device::bus_dio_w(uint8_t data) { update_pp(); } diff --git a/src/devices/machine/phi.h b/src/devices/machine/phi.h index 33def593315..dc3d0d76fd2 100644 --- a/src/devices/machine/phi.h +++ b/src/devices/machine/phi.h @@ -60,7 +60,7 @@ public: DECLARE_WRITE_LINE_MEMBER(atn_w); DECLARE_WRITE_LINE_MEMBER(ren_w); - DECLARE_WRITE8_MEMBER(bus_dio_w); + void bus_dio_w(uint8_t data); void set_ext_signal(phi_488_signal_t signal , int state); diff --git a/src/mame/audio/scramble.cpp b/src/mame/audio/scramble.cpp index d6970d34c53..b2c6f43e029 100644 --- a/src/mame/audio/scramble.cpp +++ b/src/mame/audio/scramble.cpp @@ -45,7 +45,7 @@ static const int scramble_timer[10] = 0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0 }; -READ8_MEMBER( scramble_state::scramble_portB_r ) +uint8_t scramble_state::scramble_portB_r() { return scramble_timer[(m_audiocpu->total_cycles()/512) % 10]; } @@ -74,12 +74,12 @@ static const int frogger_timer[10] = 0x00, 0x10, 0x08, 0x18, 0x40, 0x90, 0x88, 0x98, 0x88, 0xd0 }; -READ8_MEMBER( scramble_state::hustler_portB_r ) +uint8_t scramble_state::hustler_portB_r() { return frogger_timer[(m_audiocpu->total_cycles()/512) % 10]; } -WRITE8_MEMBER( scramble_state::scramble_sh_irqtrigger_w ) +void scramble_state::scramble_sh_irqtrigger_w(uint8_t data) { /* the complement of bit 3 is connected to the flip-flop's clock */ m_konami_7474->clock_w((~data & 0x08) >> 3); @@ -88,7 +88,7 @@ WRITE8_MEMBER( scramble_state::scramble_sh_irqtrigger_w ) machine().sound().system_mute((data & 0x10) >> 4); } -WRITE8_MEMBER( scramble_state::mrkougar_sh_irqtrigger_w ) +void scramble_state::mrkougar_sh_irqtrigger_w(uint8_t data) { /* the complement of bit 3 is connected to the flip-flop's clock */ m_konami_7474->clock_w((~data & 0x08) >> 3); @@ -114,12 +114,12 @@ WRITE_LINE_MEMBER(scramble_state::scramble_sh_7474_q_callback) m_audiocpu->set_input_line(0, !state ? ASSERT_LINE : CLEAR_LINE); } -WRITE8_MEMBER(scramble_state::hotshock_sh_irqtrigger_w) +void scramble_state::hotshock_sh_irqtrigger_w(uint8_t data) { m_audiocpu->set_input_line(0, ASSERT_LINE); } -READ8_MEMBER( scramble_state::hotshock_soundlatch_r ) +uint8_t scramble_state::hotshock_soundlatch_r() { m_audiocpu->set_input_line(0, CLEAR_LINE); return m_soundlatch->read(); @@ -139,7 +139,7 @@ READ8_MEMBER(scramble_state::harem_digitalker_intr_r) return m_digitalker->digitalker_0_intr_r(); } -WRITE8_MEMBER(scramble_state::harem_digitalker_control_w) +void scramble_state::harem_digitalker_control_w(uint8_t data) { m_digitalker->digitalker_0_cs_w (data & 1 ? ASSERT_LINE : CLEAR_LINE); m_digitalker->digitalker_0_cms_w(data & 2 ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp index 2672faf4087..32999e0d1e2 100644 --- a/src/mame/drivers/88games.cpp +++ b/src/mame/drivers/88games.cpp @@ -252,7 +252,7 @@ INPUT_PORTS_END * *************************************/ -WRITE8_MEMBER( _88games_state::banking_callback ) +void _88games_state::banking_callback(uint8_t data) { logerror("%s: bank select %02x\n", machine().describe_context(), data); diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp index faa75435354..01d1f86e677 100644 --- a/src/mame/drivers/abc1600.cpp +++ b/src/mame/drivers/abc1600.cpp @@ -641,7 +641,7 @@ WRITE8_MEMBER( abc1600_state::cio_w ) m_cio->write(A2_A1, data); } -READ8_MEMBER( abc1600_state::cio_pa_r ) +uint8_t abc1600_state::cio_pa_r() { /* @@ -672,7 +672,7 @@ READ8_MEMBER( abc1600_state::cio_pa_r ) return data; } -READ8_MEMBER( abc1600_state::cio_pb_r ) +uint8_t abc1600_state::cio_pb_r() { /* @@ -700,7 +700,7 @@ READ8_MEMBER( abc1600_state::cio_pb_r ) return data; } -WRITE8_MEMBER( abc1600_state::cio_pb_w ) +void abc1600_state::cio_pb_w(uint8_t data) { /* @@ -724,7 +724,7 @@ WRITE8_MEMBER( abc1600_state::cio_pb_w ) m_dart->rxca_w(prbr); } -READ8_MEMBER( abc1600_state::cio_pc_r ) +uint8_t abc1600_state::cio_pc_r() { /* @@ -745,7 +745,7 @@ READ8_MEMBER( abc1600_state::cio_pc_r ) return data; } -WRITE8_MEMBER( abc1600_state::cio_pc_w ) +void abc1600_state::cio_pc_w(uint8_t data) { /* diff --git a/src/mame/drivers/abc80.cpp b/src/mame/drivers/abc80.cpp index 54d3d332575..028f9e1e142 100644 --- a/src/mame/drivers/abc80.cpp +++ b/src/mame/drivers/abc80.cpp @@ -219,7 +219,7 @@ void abc80_state::abc80_io(address_map &map) // Z80PIO //------------------------------------------------- -READ8_MEMBER( abc80_state::pio_pa_r ) +uint8_t abc80_state::pio_pa_r() { /* @@ -247,7 +247,7 @@ READ8_MEMBER( abc80_state::pio_pa_r ) return data; } -READ8_MEMBER( abc80_state::pio_pb_r ) +uint8_t abc80_state::pio_pb_r() { /* @@ -283,7 +283,7 @@ READ8_MEMBER( abc80_state::pio_pb_r ) return data; } -WRITE8_MEMBER( abc80_state::pio_pb_w ) +void abc80_state::pio_pb_w(uint8_t data) { /* diff --git a/src/mame/drivers/ajax.cpp b/src/mame/drivers/ajax.cpp index 1d984639dcc..cba3c579e0e 100644 --- a/src/mame/drivers/ajax.cpp +++ b/src/mame/drivers/ajax.cpp @@ -151,7 +151,7 @@ WRITE8_MEMBER(ajax_state::sound_bank_w) m_k007232_2->set_bank(bank_A, bank_B); } -WRITE8_MEMBER(ajax_state::volume_callback0) +void ajax_state::volume_callback0(uint8_t data) { m_k007232_1->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_1->set_volume(1, 0, (data & 0x0f) * 0x11); @@ -163,7 +163,7 @@ WRITE8_MEMBER(ajax_state::k007232_extvol_w) m_k007232_2->set_volume(0, (data & 0x0f) * 0x11/2, (data & 0x0f) * 0x11/2); } -WRITE8_MEMBER(ajax_state::volume_callback1) +void ajax_state::volume_callback1(uint8_t data) { /* channel B volume/pan */ m_k007232_2->set_volume(1, (data & 0x0f) * 0x11/2, (data >> 4) * 0x11/2); diff --git a/src/mame/drivers/aliens.cpp b/src/mame/drivers/aliens.cpp index c0712544c42..ddf4af77576 100644 --- a/src/mame/drivers/aliens.cpp +++ b/src/mame/drivers/aliens.cpp @@ -48,7 +48,7 @@ WRITE8_MEMBER(aliens_state::aliens_sh_irqtrigger_w) m_audiocpu->set_input_line(0, HOLD_LINE); } -WRITE8_MEMBER(aliens_state::aliens_snd_bankswitch_w) +void aliens_state::aliens_snd_bankswitch_w(uint8_t data) { /* b1: bank for chanel A */ /* b0: bank for chanel B */ @@ -172,7 +172,7 @@ INPUT_PORTS_END ***************************************************************************/ -WRITE8_MEMBER(aliens_state::volume_callback) +void aliens_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data & 0x0f) * 0x11, 0); m_k007232->set_volume(1, 0, (data >> 4) * 0x11); @@ -189,7 +189,7 @@ void aliens_state::machine_reset() m_bank0000->set_bank(0); } -WRITE8_MEMBER( aliens_state::banking_callback ) +void aliens_state::banking_callback(uint8_t data) { m_rombank->set_entry(data & 0x1f); } diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index e17eef39264..f3123075e8a 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -220,7 +220,7 @@ WRITE8_MEMBER(seawolf2_state::sound_2_w)// Port 41 * *************************************/ -READ8_MEMBER(astrocde_state::input_mux_r) +uint8_t astrocde_state::input_mux_r(offs_t offset) { return m_handle[offset & 3].read_safe(0xff); } @@ -395,7 +395,7 @@ WRITE8_MEMBER(tenpindx_state::lights_w) * *************************************/ -WRITE8_MEMBER(astrocde_state::votrax_speech_w) +void astrocde_state::votrax_speech_w(uint8_t data) { m_votrax->inflection_w(data >> 6); m_votrax->write(data & 0x3f); diff --git a/src/mame/drivers/atlantis.cpp b/src/mame/drivers/atlantis.cpp index 0dc5af430bf..f7c40ac8d6f 100644 --- a/src/mame/drivers/atlantis.cpp +++ b/src/mame/drivers/atlantis.cpp @@ -149,8 +149,8 @@ private: READ8_MEMBER (exprom_r); WRITE8_MEMBER(exprom_w); - WRITE32_MEMBER(user_io_output); - READ32_MEMBER(user_io_input); + void user_io_output(uint32_t data); + uint32_t user_io_input(); int m_user_io_state; // Board Ctrl Reg Offsets @@ -387,13 +387,13 @@ WRITE32_MEMBER(atlantis_state::dcs3_fifo_full_w) /************************************* * PCI9050 User I/O handlers *************************************/ -WRITE32_MEMBER(atlantis_state::user_io_output) +void atlantis_state::user_io_output(uint32_t data) { m_user_io_state = data; logerror("atlantis_state::user_io_output m_user_io_state = %1x\n", m_user_io_state); } -READ32_MEMBER(atlantis_state::user_io_input) +uint32_t atlantis_state::user_io_input() { // user io 0: 6016 nCONFIG -- output // user io 1: 6016 nSTATUS -- input diff --git a/src/mame/drivers/b16.cpp b/src/mame/drivers/b16.cpp index 2b044eda37f..fb9c96f70c9 100644 --- a/src/mame/drivers/b16.cpp +++ b/src/mame/drivers/b16.cpp @@ -57,8 +57,8 @@ private: DECLARE_WRITE8_MEMBER(b16_6845_data_w); DECLARE_READ8_MEMBER(unk_dev_r); DECLARE_WRITE8_MEMBER(unk_dev_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -253,13 +253,13 @@ static GFXDECODE_START( gfx_b16 ) GFXDECODE_ENTRY( "pcg", 0x0000, b16_charlayout, 0, 1 ) GFXDECODE_END -READ8_MEMBER(b16_state::memory_read_byte) +uint8_t b16_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset); } -WRITE8_MEMBER(b16_state::memory_write_byte) +void b16_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.write_byte(offset, data); diff --git a/src/mame/drivers/baraduke.cpp b/src/mame/drivers/baraduke.cpp index 5633b8fdc3c..edf66797a63 100644 --- a/src/mame/drivers/baraduke.cpp +++ b/src/mame/drivers/baraduke.cpp @@ -116,7 +116,7 @@ DIP locations verified for: #include "speaker.h" -WRITE8_MEMBER(baraduke_state::inputport_select_w) +void baraduke_state::inputport_select_w(uint8_t data) { if ((data & 0xe0) == 0x60) m_inputport_selected = data & 0x07; @@ -128,7 +128,7 @@ WRITE8_MEMBER(baraduke_state::inputport_select_w) } } -READ8_MEMBER(baraduke_state::inputport_r) +uint8_t baraduke_state::inputport_r() { switch (m_inputport_selected) { @@ -151,13 +151,13 @@ READ8_MEMBER(baraduke_state::inputport_r) } } -WRITE8_MEMBER(baraduke_state::baraduke_lamps_w) +void baraduke_state::baraduke_lamps_w(uint8_t data) { m_lamps[0] = BIT(data, 3); m_lamps[1] = BIT(data, 4); } -WRITE8_MEMBER(baraduke_state::baraduke_irq_ack_w) +void baraduke_state::baraduke_irq_ack_w(uint8_t data) { m_maincpu->set_input_line(0, CLEAR_LINE); } @@ -177,7 +177,7 @@ void baraduke_state::baraduke_map(address_map &map) map(0x6000, 0xffff).rom(); /* ROM */ } -READ8_MEMBER(baraduke_state::soundkludge_r) +uint8_t baraduke_state::soundkludge_r() { return ((m_counter++) >> 4) & 0xff; } diff --git a/src/mame/drivers/barata.cpp b/src/mame/drivers/barata.cpp index 6e3e193ca05..2f32dd90b95 100644 --- a/src/mame/drivers/barata.cpp +++ b/src/mame/drivers/barata.cpp @@ -53,10 +53,10 @@ public: , m_lamps(*this, "lamp%u", 0U) { } - DECLARE_WRITE8_MEMBER(fpga_w); - DECLARE_WRITE8_MEMBER(port0_w); - DECLARE_WRITE8_MEMBER(port2_w); - DECLARE_READ8_MEMBER(port2_r); + void fpga_w(uint8_t data); + void port0_w(uint8_t data); + void port2_w(uint8_t data); + uint8_t port2_r(); void barata(machine_config &config); private: unsigned char row_selection; @@ -274,7 +274,7 @@ void barata_state::fpga_send(unsigned char cmd) } } -WRITE8_MEMBER(barata_state::fpga_w) +void barata_state::fpga_w(uint8_t data) { static unsigned char old_data = 0; if (!BIT(old_data, 5) && BIT(data, 5)){ @@ -284,17 +284,17 @@ WRITE8_MEMBER(barata_state::fpga_w) old_data = data; } -WRITE8_MEMBER(barata_state::port0_w) +void barata_state::port0_w(uint8_t data) { row_selection = data; } -WRITE8_MEMBER(barata_state::port2_w) +void barata_state::port2_w(uint8_t data) { /* why does it write to PORT2 ? */ } -READ8_MEMBER(barata_state::port2_r) +uint8_t barata_state::port2_r() { if (!BIT(row_selection, 0)) return ioport("PLAYER1_ROW1")->read(); if (!BIT(row_selection, 1)) return ioport("PLAYER1_ROW2")->read(); diff --git a/src/mame/drivers/basic52.cpp b/src/mame/drivers/basic52.cpp index 907cf613ab2..30d92570710 100644 --- a/src/mame/drivers/basic52.cpp +++ b/src/mame/drivers/basic52.cpp @@ -52,8 +52,8 @@ public: protected: void kbd_put(u8 data); - DECLARE_READ8_MEMBER(unk_r); - DECLARE_READ8_MEMBER(from_term); + uint8_t unk_r(); + uint8_t from_term(); void basic52_io(address_map &map); void basic52_mem(address_map &map); uint8_t m_term_data; @@ -87,12 +87,12 @@ static INPUT_PORTS_START( basic52 ) INPUT_PORTS_END -READ8_MEMBER(basic52_state::from_term) +uint8_t basic52_state::from_term() { return m_term_data; } -READ8_MEMBER( basic52_state::unk_r) +uint8_t basic52_state::unk_r() { return m_term_data; // won't boot without this } diff --git a/src/mame/drivers/bladestl.cpp b/src/mame/drivers/bladestl.cpp index 94ebb553f50..c3158356de4 100644 --- a/src/mame/drivers/bladestl.cpp +++ b/src/mame/drivers/bladestl.cpp @@ -86,7 +86,7 @@ WRITE8_MEMBER(bladestl_state::bladestl_bankswitch_w) } -WRITE8_MEMBER(bladestl_state::bladestl_port_B_w) +void bladestl_state::bladestl_port_B_w(uint8_t data) { // bits 3-5 = ROM bank select m_upd7759->set_rom_bank((data & 0x38) >> 3); diff --git a/src/mame/drivers/blockhl.cpp b/src/mame/drivers/blockhl.cpp index 318fba0869f..ba110574629 100644 --- a/src/mame/drivers/blockhl.cpp +++ b/src/mame/drivers/blockhl.cpp @@ -58,7 +58,7 @@ public: DECLARE_WRITE8_MEMBER(sound_irq_w); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); void blockhl(machine_config &config); void audio_map(address_map &map); @@ -194,7 +194,7 @@ void blockhl_state::machine_start() m_rombank->configure_entries(0, 4, memregion("maincpu")->base(), 0x2000); } -WRITE8_MEMBER( blockhl_state::banking_callback ) +void blockhl_state::banking_callback(uint8_t data) { // bits 0-1 = ROM bank m_rombank->set_entry(data & 0x03); diff --git a/src/mame/drivers/blueprnt.cpp b/src/mame/drivers/blueprnt.cpp index 54b7007b4c5..7795f327f4e 100644 --- a/src/mame/drivers/blueprnt.cpp +++ b/src/mame/drivers/blueprnt.cpp @@ -65,7 +65,7 @@ * *************************************/ -WRITE8_MEMBER(blueprnt_state::dipsw_w) +void blueprnt_state::dipsw_w(uint8_t data) { m_dipsw = data; } diff --git a/src/mame/drivers/bml3.cpp b/src/mame/drivers/bml3.cpp index 67ccb984eba..ab94c778a4e 100644 --- a/src/mame/drivers/bml3.cpp +++ b/src/mame/drivers/bml3.cpp @@ -102,7 +102,7 @@ public: DECLARE_WRITE8_MEMBER(vram_attr_w); DECLARE_READ8_MEMBER(beep_r); DECLARE_WRITE8_MEMBER(beep_w); - DECLARE_WRITE8_MEMBER(piaA_w); + void piaA_w(uint8_t data); DECLARE_READ8_MEMBER(keyb_nmi_r); DECLARE_WRITE8_MEMBER(firq_mask_w); DECLARE_READ8_MEMBER(firq_status_r); @@ -776,7 +776,7 @@ void bml3_state::machine_reset() m_firq_mask = -1; // disable firq } -WRITE8_MEMBER(bml3_state::piaA_w) +void bml3_state::piaA_w(uint8_t data) { address_space &mem = m_maincpu->space(AS_PROGRAM); /* ROM banking: diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp index 92f954c9ed4..8276aca6732 100644 --- a/src/mame/drivers/bottom9.cpp +++ b/src/mame/drivers/bottom9.cpp @@ -262,13 +262,13 @@ INPUT_PORTS_END -WRITE8_MEMBER(bottom9_state::volume_callback0) +void bottom9_state::volume_callback0(uint8_t data) { m_k007232_1->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_1->set_volume(1, 0, (data & 0x0f) * 0x11); } -WRITE8_MEMBER(bottom9_state::volume_callback1) +void bottom9_state::volume_callback1(uint8_t data) { m_k007232_2->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_2->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/cabaret.cpp b/src/mame/drivers/cabaret.cpp index 4b3dbe20342..6e52b3976be 100644 --- a/src/mame/drivers/cabaret.cpp +++ b/src/mame/drivers/cabaret.cpp @@ -52,9 +52,9 @@ public: DECLARE_WRITE8_MEMBER(bg_tile_w); DECLARE_WRITE8_MEMBER(fg_tile_w); DECLARE_WRITE8_MEMBER(fg_color_w); - DECLARE_WRITE8_MEMBER(nmi_and_coins_w); - DECLARE_WRITE8_MEMBER(ppi2_b_w); - DECLARE_WRITE8_MEMBER(ppi2_c_w); + void nmi_and_coins_w(uint8_t data); + void ppi2_b_w(uint8_t data); + void ppi2_c_w(uint8_t data); void show_out(); void init_cabaret(); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -163,7 +163,7 @@ void cabaret_state::show_out() #endif } -WRITE8_MEMBER(cabaret_state::nmi_and_coins_w) +void cabaret_state::nmi_and_coins_w(uint8_t data) { if ((m_nmi_enable ^ data) & (~0xdd)) { @@ -184,13 +184,13 @@ WRITE8_MEMBER(cabaret_state::nmi_and_coins_w) show_out(); } -WRITE8_MEMBER(cabaret_state::ppi2_b_w) +void cabaret_state::ppi2_b_w(uint8_t data) { m_out[1] = data; show_out(); } -WRITE8_MEMBER(cabaret_state::ppi2_c_w) +void cabaret_state::ppi2_c_w(uint8_t data) { m_out[2] = data; show_out(); diff --git a/src/mame/drivers/cgang.cpp b/src/mame/drivers/cgang.cpp index a166a5f23a4..5748098cf03 100644 --- a/src/mame/drivers/cgang.cpp +++ b/src/mame/drivers/cgang.cpp @@ -165,26 +165,26 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(door_motor_tick); void refresh_motor_output(); - DECLARE_READ8_MEMBER(ppi1_b_r); - DECLARE_READ8_MEMBER(ppi1_c_r); - DECLARE_READ8_MEMBER(ppi2_a_r); - DECLARE_READ8_MEMBER(ppi2_b_r); - DECLARE_WRITE8_MEMBER(ppi2_c_w); - DECLARE_WRITE8_MEMBER(ppi3_a_w); - DECLARE_WRITE8_MEMBER(ppi3_b_w); - DECLARE_WRITE8_MEMBER(ppi3_c_w); + u8 ppi1_b_r(); + u8 ppi1_c_r(); + u8 ppi2_a_r(); + u8 ppi2_b_r(); + void ppi2_c_w(u8 data); + void ppi3_a_w(u8 data); + void ppi3_b_w(u8 data); + void ppi3_c_w(u8 data); void set_en_sol(int i, int state); - DECLARE_WRITE8_MEMBER(ppi4_a_w); - DECLARE_WRITE8_MEMBER(ppi4_b_w); - DECLARE_WRITE8_MEMBER(ppi4_c_w); + void ppi4_a_w(u8 data); + void ppi4_b_w(u8 data); + void ppi4_c_w(u8 data); - template DECLARE_WRITE8_MEMBER(adpcm_w); - DECLARE_WRITE8_MEMBER(spot_w); - DECLARE_WRITE8_MEMBER(output_spot_w) { m_spot_lamps[offset >> 6] = data; } + template void adpcm_w(u8 data); + void spot_w(u8 data); + void output_spot_w(offs_t offset, u8 data) { m_spot_lamps[offset >> 6] = data; } - DECLARE_WRITE8_MEMBER(ppi5_a_w); - DECLARE_WRITE8_MEMBER(ppi5_b_w); - DECLARE_READ8_MEMBER(ppi5_c_r); + void ppi5_a_w(u8 data); + void ppi5_b_w(u8 data); + u8 ppi5_c_r(); int m_watchdog_clk = 0; int m_main_irq = 0; @@ -359,7 +359,7 @@ void cgang_state::refresh_motor_output() // maincpu (PPI1-PPI4) -READ8_MEMBER(cgang_state::ppi1_b_r) +u8 cgang_state::ppi1_b_r() { u8 data = 0xff; @@ -376,7 +376,7 @@ READ8_MEMBER(cgang_state::ppi1_b_r) return data; } -READ8_MEMBER(cgang_state::ppi1_c_r) +u8 cgang_state::ppi1_c_r() { u8 data = 0x7f; @@ -396,7 +396,7 @@ READ8_MEMBER(cgang_state::ppi1_c_r) return data; } -READ8_MEMBER(cgang_state::ppi2_a_r) +u8 cgang_state::ppi2_a_r() { u8 data = 0x60; @@ -424,7 +424,7 @@ READ8_MEMBER(cgang_state::ppi2_a_r) return data; } -READ8_MEMBER(cgang_state::ppi2_b_r) +u8 cgang_state::ppi2_b_r() { u8 data = 0x1f; @@ -436,7 +436,7 @@ READ8_MEMBER(cgang_state::ppi2_b_r) return data; } -WRITE8_MEMBER(cgang_state::ppi2_c_w) +void cgang_state::ppi2_c_w(u8 data) { // PC0: coincounter // PC1: coinlock solenoid @@ -449,7 +449,7 @@ WRITE8_MEMBER(cgang_state::ppi2_c_w) m_misc_lamps[1] = BIT(data, 3); } -WRITE8_MEMBER(cgang_state::ppi3_a_w) +void cgang_state::ppi3_a_w(u8 data) { // PA0-PA4: cosmogang motor direction m_cg_motor_dir = data & 0x1f; @@ -459,7 +459,7 @@ WRITE8_MEMBER(cgang_state::ppi3_a_w) m_misc_lamps[i + 6] = BIT(data, i + 5); } -WRITE8_MEMBER(cgang_state::ppi3_b_w) +void cgang_state::ppi3_b_w(u8 data) { // PB0-PB4: cosmogang motor power m_cg_motor_on = data & 0x1f; @@ -471,7 +471,7 @@ WRITE8_MEMBER(cgang_state::ppi3_b_w) m_misc_lamps[i + 8] = BIT(data, i + 5); } -WRITE8_MEMBER(cgang_state::ppi3_c_w) +void cgang_state::ppi3_c_w(u8 data) { // PC0-PC3: 7448 // PC4-PC7: 7445 @@ -488,7 +488,7 @@ void cgang_state::set_en_sol(int i, int state) m_sol_filter[i]->adjust(attotime::from_msec(1), i << 1 | state); } -WRITE8_MEMBER(cgang_state::ppi4_a_w) +void cgang_state::ppi4_a_w(u8 data) { // PA2-PA4: round leds for (int i = 0; i < 3; i++) @@ -499,7 +499,7 @@ WRITE8_MEMBER(cgang_state::ppi4_a_w) set_en_sol(i, BIT(data, i + 5)); } -WRITE8_MEMBER(cgang_state::ppi4_b_w) +void cgang_state::ppi4_b_w(u8 data) { // PB0,PB1: energy crate solenoids (4-5) for (int i = 0; i < 2; i++) @@ -513,7 +513,7 @@ WRITE8_MEMBER(cgang_state::ppi4_b_w) m_misc_lamps[5] = BIT(data, 7); } -WRITE8_MEMBER(cgang_state::ppi4_c_w) +void cgang_state::ppi4_c_w(u8 data) { // PC0,PC1: gun xenon lamps for (int i = 0; i < 2; i++) @@ -538,7 +538,7 @@ WRITE8_MEMBER(cgang_state::ppi4_c_w) // audiocpu template -WRITE8_MEMBER(cgang_state::adpcm_w) +void cgang_state::adpcm_w(u8 data) { m_adpcm[N]->port_w(data); @@ -547,7 +547,7 @@ WRITE8_MEMBER(cgang_state::adpcm_w) m_adpcm[N]->start_w(1); } -WRITE8_MEMBER(cgang_state::spot_w) +void cgang_state::spot_w(u8 data) { // d0-d2: ufo boss spotlights // d3-d7: cosmo spotlights @@ -555,7 +555,7 @@ WRITE8_MEMBER(cgang_state::spot_w) m_spot->matrix(1, data); } -WRITE8_MEMBER(cgang_state::ppi5_a_w) +void cgang_state::ppi5_a_w(u8 data) { // PA0,PA1: ADPCM reset m_adpcm[0]->reset_w(BIT(data, 0)); @@ -573,14 +573,14 @@ WRITE8_MEMBER(cgang_state::ppi5_a_w) m_ufo_sol = BIT(data, 7); } -WRITE8_MEMBER(cgang_state::ppi5_b_w) +void cgang_state::ppi5_b_w(u8 data) { // PB0-PB7: ufo lamps for (int i = 0; i < 8; i++) m_ufo_lamps[i] = BIT(data, i); } -READ8_MEMBER(cgang_state::ppi5_c_r) +u8 cgang_state::ppi5_c_r() { u8 data = 0; diff --git a/src/mame/drivers/chqflag.cpp b/src/mame/drivers/chqflag.cpp index d5a94d0f287..239192f4e47 100644 --- a/src/mame/drivers/chqflag.cpp +++ b/src/mame/drivers/chqflag.cpp @@ -255,7 +255,7 @@ INPUT_PORTS_END -WRITE8_MEMBER(chqflag_state::volume_callback0) +void chqflag_state::volume_callback0(uint8_t data) { // volume/pan for one of the channels on this chip // which channel and which bits are left/right is a guess @@ -269,7 +269,7 @@ WRITE8_MEMBER(chqflag_state::k007232_extvolume_w) m_k007232[0]->set_volume(1, (data & 0x0f) * 0x11/2, (data >> 4) * 0x11/2); } -WRITE8_MEMBER(chqflag_state::volume_callback1) +void chqflag_state::volume_callback1(uint8_t data) { m_k007232[1]->set_volume(0, (data >> 4) * 0x11, 0); m_k007232[1]->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp index bdfdf088c84..2a54d3e6f1b 100644 --- a/src/mame/drivers/cmi.cpp +++ b/src/mame/drivers/cmi.cpp @@ -257,9 +257,9 @@ public: DECLARE_WRITE8_MEMBER( aic_ad565_msb_w ); DECLARE_WRITE8_MEMBER( aic_ad565_lsb_w ); - DECLARE_READ8_MEMBER( q133_1_porta_r ); - DECLARE_WRITE8_MEMBER( q133_1_porta_w ); - DECLARE_WRITE8_MEMBER( q133_1_portb_w ); + uint8_t q133_1_porta_r(); + void q133_1_porta_w(uint8_t data); + void q133_1_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( cmi_iix_vblank ); IRQ_CALLBACK_MEMBER( cpu1_interrupt_callback ); @@ -268,10 +268,10 @@ public: // Video-related DECLARE_READ8_MEMBER( video_r ); DECLARE_READ8_MEMBER( lightpen_r ); - DECLARE_READ8_MEMBER( pia_q219_b_r ); + uint8_t pia_q219_b_r(); DECLARE_WRITE8_MEMBER( video_w ); - DECLARE_WRITE8_MEMBER( vscroll_w ); - DECLARE_WRITE8_MEMBER( video_attr_w ); + void vscroll_w(uint8_t data); + void video_attr_w(uint8_t data); DECLARE_READ8_MEMBER( vram_r ); DECLARE_WRITE8_MEMBER( vram_w ); DECLARE_READ8_MEMBER( tvt_r ); @@ -311,8 +311,8 @@ public: // Master card DECLARE_READ8_MEMBER( cmi02_r ); DECLARE_WRITE8_MEMBER( cmi02_w ); - DECLARE_WRITE8_MEMBER( cmi02_chsel_w ); - DECLARE_WRITE8_MEMBER( master_tune_w ); + void cmi02_chsel_w(uint8_t data); + void master_tune_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_irq ); DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_o2 ); DECLARE_WRITE_LINE_MEMBER( cmi02_pia2_irqa_w ); @@ -594,7 +594,7 @@ READ8_MEMBER( cmi_state::lightpen_r ) return m_lp_x >> 1; } -READ8_MEMBER( cmi_state::pia_q219_b_r ) +uint8_t cmi_state::pia_q219_b_r() { return ((m_lp_x << 7) & 0x80) | m_q219_b_touch; } @@ -606,12 +606,12 @@ WRITE8_MEMBER( cmi_state::video_w ) video_write(offset); } -WRITE8_MEMBER( cmi_state::vscroll_w ) +void cmi_state::vscroll_w(uint8_t data) { // TODO: Partial updates. Also, this should be done through a PIA } -WRITE8_MEMBER( cmi_state::video_attr_w ) +void cmi_state::video_attr_w(uint8_t data) { // TODO } @@ -1277,12 +1277,12 @@ WRITE_LINE_MEMBER( cmi_state::wd1791_drq ) 28 - 2B = PIA */ -WRITE8_MEMBER( cmi_state::master_tune_w ) +void cmi_state::master_tune_w(uint8_t data) { // double mfreq = (double)data * ((double)MASTER_OSCILLATOR / 2.0) / 256.0; } -WRITE8_MEMBER( cmi_state::cmi02_chsel_w ) +void cmi_state::cmi02_chsel_w(uint8_t data) { m_cmi02_pia_chsel = data; } @@ -1725,7 +1725,7 @@ WRITE_LINE_MEMBER( cmi_state::pia_q219_irqb ) IRQA/B = /RTINT? */ -READ8_MEMBER( cmi_state::q133_1_porta_r ) +uint8_t cmi_state::q133_1_porta_r() { if (BIT(m_q133_pia[0]->b_output(), 1)) { @@ -1734,13 +1734,13 @@ READ8_MEMBER( cmi_state::q133_1_porta_r ) return 0xff; } -WRITE8_MEMBER( cmi_state::q133_1_porta_w ) +void cmi_state::q133_1_porta_w(uint8_t data) { m_msm5832_addr = data & 0xf; m_msm5832->address_w(data & 0x0f); } -WRITE8_MEMBER( cmi_state::q133_1_portb_w ) +void cmi_state::q133_1_portb_w(uint8_t data) { m_msm5832->hold_w(BIT(data, 0)); m_msm5832->read_w(BIT(data, 1)); diff --git a/src/mame/drivers/combatsc.cpp b/src/mame/drivers/combatsc.cpp index 86ecbabcfd3..82a119c776d 100644 --- a/src/mame/drivers/combatsc.cpp +++ b/src/mame/drivers/combatsc.cpp @@ -329,7 +329,7 @@ WRITE8_MEMBER(combatsc_state::combatsc_voice_reset_w) m_upd7759->reset_w(data & 1); } -WRITE8_MEMBER(combatsc_state::combatsc_portA_w) +void combatsc_state::combatsc_portA_w(uint8_t data) { /* unknown. always write 0 */ } diff --git a/src/mame/drivers/compucolor.cpp b/src/mame/drivers/compucolor.cpp index 7be709ab659..f5dc5662f4b 100644 --- a/src/mame/drivers/compucolor.cpp +++ b/src/mame/drivers/compucolor.cpp @@ -72,8 +72,8 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( xi_r ); - DECLARE_WRITE8_MEMBER( xo_w ); + uint8_t xi_r(); + void xo_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( xmt_w ); IRQ_CALLBACK_MEMBER( int_ack ); @@ -299,7 +299,7 @@ uint32_t compucolor2_state::screen_update(screen_device &screen, bitmap_rgb32 &b return 0; } -READ8_MEMBER( compucolor2_state::xi_r ) +uint8_t compucolor2_state::xi_r() { uint8_t data = 0xff; @@ -321,7 +321,7 @@ READ8_MEMBER( compucolor2_state::xi_r ) return data; } -WRITE8_MEMBER( compucolor2_state::xo_w ) +void compucolor2_state::xo_w(uint8_t data) { /* diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp index 147f8619994..4a382ffd5c7 100644 --- a/src/mame/drivers/crimfght.cpp +++ b/src/mame/drivers/crimfght.cpp @@ -68,9 +68,9 @@ IRQ_CALLBACK_MEMBER( crimfght_state::audiocpu_irq_ack ) return 0xff; } -WRITE8_MEMBER(crimfght_state::ym2151_ct_w) +void crimfght_state::ym2151_ct_w(uint8_t data) { - // ne output from the 007232 is connected to a ls399 which + // one output from the 007232 is connected to a ls399 which // has inputs connected to the ct1 and ct2 outputs from // the ym2151 used to select the bank @@ -260,7 +260,7 @@ INPUT_PORTS_END ***************************************************************************/ -WRITE8_MEMBER(crimfght_state::volume_callback) +void crimfght_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data & 0x0f) * 0x11, 0); m_k007232->set_volume(1, 0, (data >> 4) * 0x11); @@ -272,7 +272,7 @@ void crimfght_state::machine_start() m_rombank->set_entry(0); } -WRITE8_MEMBER( crimfght_state::banking_callback ) +void crimfght_state::banking_callback(uint8_t data) { m_rombank->set_entry(data & 0x0f); diff --git a/src/mame/drivers/csplayh5.cpp b/src/mame/drivers/csplayh5.cpp index 52a4809eaa7..593b2fd1a3b 100644 --- a/src/mame/drivers/csplayh5.cpp +++ b/src/mame/drivers/csplayh5.cpp @@ -63,7 +63,7 @@ public: DECLARE_READ16_MEMBER(csplayh5_mux_r); DECLARE_WRITE16_MEMBER(csplayh5_mux_w); - DECLARE_WRITE16_MEMBER(tmp68301_parallel_port_w); + void tmp68301_parallel_port_w(uint16_t data); #if USE_H8 DECLARE_READ16_MEMBER(test_r); @@ -342,7 +342,7 @@ WRITE_LINE_MEMBER(csplayh5_state::ide_irq) } #endif -WRITE16_MEMBER(csplayh5_state::tmp68301_parallel_port_w) +void csplayh5_state::tmp68301_parallel_port_w(uint16_t data) { /* -x-- ---- used during ROM check, h8 reset assert? diff --git a/src/mame/drivers/ddribble.cpp b/src/mame/drivers/ddribble.cpp index 0d2a055b07e..20270a163fd 100644 --- a/src/mame/drivers/ddribble.cpp +++ b/src/mame/drivers/ddribble.cpp @@ -68,7 +68,7 @@ WRITE8_MEMBER(ddribble_state::ddribble_coin_counter_w) machine().bookkeeping().coin_counter_w(1,(data >> 1) & 0x01); } -READ8_MEMBER(ddribble_state::ddribble_vlm5030_busy_r) +uint8_t ddribble_state::ddribble_vlm5030_busy_r() { return machine().rand(); /* patch */ /* FIXME: remove ? */ @@ -78,7 +78,7 @@ READ8_MEMBER(ddribble_state::ddribble_vlm5030_busy_r) #endif } -WRITE8_MEMBER(ddribble_state::ddribble_vlm5030_ctrl_w) +void ddribble_state::ddribble_vlm5030_ctrl_w(uint8_t data) { /* b7 : vlm data bus OE */ diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp index edd0580fc6b..d006205fddf 100644 --- a/src/mame/drivers/djboy.cpp +++ b/src/mame/drivers/djboy.cpp @@ -263,13 +263,13 @@ void djboy_state::soundcpu_port_am(address_map &map) /******************************************************************************/ -READ8_MEMBER(djboy_state::beast_p0_r) +uint8_t djboy_state::beast_p0_r() { // ? return 0; } -WRITE8_MEMBER(djboy_state::beast_p0_w) +void djboy_state::beast_p0_w(uint8_t data) { if (!BIT(m_beast_p0, 1) && BIT(data, 1)) { @@ -282,7 +282,7 @@ WRITE8_MEMBER(djboy_state::beast_p0_w) m_beast_p0 = data; } -READ8_MEMBER(djboy_state::beast_p1_r) +uint8_t djboy_state::beast_p1_r() { if (BIT(m_beast_p0, 0) == 0) return m_beastlatch->read(); @@ -290,12 +290,12 @@ READ8_MEMBER(djboy_state::beast_p1_r) return 0; // ? } -WRITE8_MEMBER(djboy_state::beast_p1_w) +void djboy_state::beast_p1_w(uint8_t data) { m_beast_p1 = data; } -READ8_MEMBER(djboy_state::beast_p2_r) +uint8_t djboy_state::beast_p2_r() { switch ((m_beast_p0 >> 2) & 3) { @@ -306,12 +306,12 @@ READ8_MEMBER(djboy_state::beast_p2_r) } } -WRITE8_MEMBER(djboy_state::beast_p2_w) +void djboy_state::beast_p2_w(uint8_t data) { m_beast_p2 = data; } -READ8_MEMBER(djboy_state::beast_p3_r) +uint8_t djboy_state::beast_p3_r() { uint8_t dsw = 0; uint8_t dsw1 = ~m_port_dsw[0]->read(); @@ -327,7 +327,7 @@ READ8_MEMBER(djboy_state::beast_p3_r) return (dsw << 4) | (m_beastlatch->pending_r() ? 0x0 : 0x4) | (m_slavelatch->pending_r() ? 0x8 : 0x0); } -WRITE8_MEMBER(djboy_state::beast_p3_w) +void djboy_state::beast_p3_w(uint8_t data) { m_beast_p3 = data; m_slavecpu->set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/drw80pkr.cpp b/src/mame/drivers/drw80pkr.cpp index 6807e990f74..fa768209258 100644 --- a/src/mame/drivers/drw80pkr.cpp +++ b/src/mame/drivers/drw80pkr.cpp @@ -78,16 +78,16 @@ private: required_device m_aysnd; required_memory_bank m_mainbank; - DECLARE_WRITE8_MEMBER(p1_w); - DECLARE_WRITE8_MEMBER(p2_w); + void p1_w(uint8_t data); + void p2_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(prog_w); - DECLARE_WRITE8_MEMBER(bus_w); + void bus_w(uint8_t data); DECLARE_WRITE8_MEMBER(io_w); DECLARE_READ_LINE_MEMBER(t0_r); DECLARE_READ_LINE_MEMBER(t1_r); - DECLARE_READ8_MEMBER(p1_r); - DECLARE_READ8_MEMBER(p2_r); - DECLARE_READ8_MEMBER(bus_r); + uint8_t p1_r(); + uint8_t p2_r(); + uint8_t bus_r(); DECLARE_READ8_MEMBER(io_r); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -111,12 +111,12 @@ void drw80pkr_state::machine_start() * Write Handlers * ******************/ -WRITE8_MEMBER(drw80pkr_state::p1_w) +void drw80pkr_state::p1_w(uint8_t data) { m_p1 = data; } -WRITE8_MEMBER(drw80pkr_state::p2_w) +void drw80pkr_state::p2_w(uint8_t data) { m_p2 = data; } @@ -134,7 +134,7 @@ WRITE_LINE_MEMBER(drw80pkr_state::prog_w) } } -WRITE8_MEMBER(drw80pkr_state::bus_w) +void drw80pkr_state::bus_w(uint8_t data) { m_bus = data; } @@ -204,17 +204,17 @@ READ_LINE_MEMBER(drw80pkr_state::t1_r) return m_t1; } -READ8_MEMBER(drw80pkr_state::p1_r) +uint8_t drw80pkr_state::p1_r() { return m_p1; } -READ8_MEMBER(drw80pkr_state::p2_r) +uint8_t drw80pkr_state::p2_r() { return m_p2; } -READ8_MEMBER(drw80pkr_state::bus_r) +uint8_t drw80pkr_state::bus_r() { return m_bus; } diff --git a/src/mame/drivers/dunhuang.cpp b/src/mame/drivers/dunhuang.cpp index dc487f2307f..dc902f5df72 100644 --- a/src/mame/drivers/dunhuang.cpp +++ b/src/mame/drivers/dunhuang.cpp @@ -100,11 +100,11 @@ private: DECLARE_WRITE8_MEMBER(block_addr_hi_w); DECLARE_WRITE8_MEMBER(block_h_w); DECLARE_WRITE8_MEMBER(layers_w); - DECLARE_WRITE8_MEMBER(input_w); + void input_w(uint8_t data); DECLARE_READ8_MEMBER(service_r); DECLARE_READ8_MEMBER(input_r); DECLARE_WRITE8_MEMBER(rombank_w); - DECLARE_READ8_MEMBER(dsw_r); + uint8_t dsw_r(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void dunhuang_io_map(address_map &map); @@ -439,7 +439,7 @@ void dunhuang_state::dunhuang_map(address_map &map) // Inputs -WRITE8_MEMBER(dunhuang_state::input_w) +void dunhuang_state::input_w(uint8_t data) { m_input = data; } @@ -452,7 +452,7 @@ READ8_MEMBER(dunhuang_state::service_r) ; } -READ8_MEMBER(dunhuang_state::dsw_r) +uint8_t dunhuang_state::dsw_r() { if (!(m_input & 0x01)) return m_dsw[0]->read(); if (!(m_input & 0x02)) return m_dsw[1]->read(); diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp index cc0609461aa..1f2ffe31567 100644 --- a/src/mame/drivers/enigma2.cpp +++ b/src/mame/drivers/enigma2.cpp @@ -105,8 +105,8 @@ private: DECLARE_READ8_MEMBER(dip_switch_r); DECLARE_WRITE8_MEMBER(sound_data_w); DECLARE_WRITE8_MEMBER(enigma2_flip_screen_w); - DECLARE_READ8_MEMBER(sound_latch_r); - DECLARE_WRITE8_MEMBER(protection_data_w); + uint8_t sound_latch_r(); + void protection_data_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_enigma2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -411,13 +411,13 @@ WRITE8_MEMBER(enigma2_state::sound_data_w) } -READ8_MEMBER(enigma2_state::sound_latch_r) +uint8_t enigma2_state::sound_latch_r() { return bitswap<8>(m_sound_latch,0,1,2,3,4,5,6,7); } -WRITE8_MEMBER(enigma2_state::protection_data_w) +void enigma2_state::protection_data_w(uint8_t data) { if (LOG_PROT) logerror("%s: Protection Data Write: %x\n", machine().describe_context(), data); m_protection_data = data; diff --git a/src/mame/drivers/et3400.cpp b/src/mame/drivers/et3400.cpp index 6cf98f4d71a..ad007626b8c 100644 --- a/src/mame/drivers/et3400.cpp +++ b/src/mame/drivers/et3400.cpp @@ -57,13 +57,13 @@ private: virtual void machine_start() override; - DECLARE_READ8_MEMBER(keypad_r); - DECLARE_WRITE8_MEMBER(display_w); - template DECLARE_WRITE8_MEMBER(led_w); - DECLARE_READ8_MEMBER(pia_ar); - DECLARE_WRITE8_MEMBER(pia_aw); - DECLARE_READ8_MEMBER(pia_br); - DECLARE_WRITE8_MEMBER(pia_bw); + uint8_t keypad_r(offs_t offset); + void display_w(offs_t offset, uint8_t data); + template void led_w(uint8_t data); + uint8_t pia_ar(); + void pia_aw(uint8_t data); + uint8_t pia_br(); + void pia_bw(uint8_t data); void mem_map(address_map &map); @@ -84,7 +84,7 @@ void et3400_state::machine_start() } -READ8_MEMBER(et3400_state::keypad_r) +uint8_t et3400_state::keypad_r(offs_t offset) { uint8_t data = 0xff; @@ -95,7 +95,7 @@ READ8_MEMBER(et3400_state::keypad_r) return data; } -WRITE8_MEMBER(et3400_state::display_w) +void et3400_state::display_w(offs_t offset, uint8_t data) { // A6-A4 decoded by IC22 (74LS42); D0 inverted by one gate of IC21 (74S00) uint8_t digit = (offset >> 4) & 7; @@ -104,7 +104,7 @@ WRITE8_MEMBER(et3400_state::display_w) } template -WRITE8_MEMBER(et3400_state::led_w) +void et3400_state::led_w(uint8_t data) { // This computer sets each segment, one at a time. m_digit[Digit - 1] = bitswap<8>(~data, 7, 0, 1, 2, 3, 4, 5, 6); @@ -113,25 +113,25 @@ WRITE8_MEMBER(et3400_state::led_w) // d1,2,3 = Baud rate // d4 = gnd // d7 = rs232 in -READ8_MEMBER(et3400_state::pia_ar) +uint8_t et3400_state::pia_ar() { return ioport("BAUD")->read() | (m_rs232->rxd_r() << 7); } // d0 = rs232 out -WRITE8_MEMBER(et3400_state::pia_aw) +void et3400_state::pia_aw(uint8_t data) { m_rs232->write_txd(BIT(data, 0)); } // d7 = cass in -READ8_MEMBER(et3400_state::pia_br) +uint8_t et3400_state::pia_br() { return (m_cass->input() > +0.0) << 7; } // d0 = cass out -WRITE8_MEMBER(et3400_state::pia_bw) +void et3400_state::pia_bw(uint8_t data) { m_cass->output(BIT(data, 0) ? -1.0 : +1.0); } diff --git a/src/mame/drivers/exerion.cpp b/src/mame/drivers/exerion.cpp index f89a3242dd4..8fe90169a96 100644 --- a/src/mame/drivers/exerion.cpp +++ b/src/mame/drivers/exerion.cpp @@ -158,14 +158,14 @@ INPUT_CHANGED_MEMBER(exerion_state::coin_inserted) /* This is the first of many Exerion "features". No clue if it's */ /* protection or some sort of timer. */ -READ8_MEMBER(exerion_state::exerion_porta_r) +uint8_t exerion_state::exerion_porta_r() { m_porta ^= 0x40; return m_porta; } -WRITE8_MEMBER(exerion_state::exerion_portb_w) +void exerion_state::exerion_portb_w(uint8_t data) { /* pull the expected value from the ROM */ m_porta = memregion("maincpu")->base()[0x5f76]; @@ -175,7 +175,7 @@ WRITE8_MEMBER(exerion_state::exerion_portb_w) } -READ8_MEMBER(exerion_state::exerion_protection_r) +uint8_t exerion_state::exerion_protection_r(offs_t offset) { if (m_maincpu->pc() == 0x4143) return memregion("maincpu")->base()[0x33c0 + (m_main_ram[0xd] << 2) + offset]; diff --git a/src/mame/drivers/fastfred.cpp b/src/mame/drivers/fastfred.cpp index 1fb0df22581..3bb840559f0 100644 --- a/src/mame/drivers/fastfred.cpp +++ b/src/mame/drivers/fastfred.cpp @@ -149,7 +149,7 @@ WRITE_LINE_MEMBER(fastfred_state::imago_dma_irq_w) m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); } -WRITE8_MEMBER(fastfred_state::imago_sprites_bank_w) +void fastfred_state::imago_sprites_bank_w(uint8_t data) { m_imago_sprites_bank = (data & 2) >> 1; } @@ -184,7 +184,7 @@ WRITE_LINE_MEMBER(fastfred_state::nmi_mask_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -WRITE8_MEMBER(fastfred_state::sound_nmi_mask_w) +void fastfred_state::sound_nmi_mask_w(uint8_t data) { m_sound_nmi_mask = data & 1; } diff --git a/src/mame/drivers/fastlane.cpp b/src/mame/drivers/fastlane.cpp index bac17f048fc..dfb52a86d35 100644 --- a/src/mame/drivers/fastlane.cpp +++ b/src/mame/drivers/fastlane.cpp @@ -180,13 +180,13 @@ GFXDECODE_END ***************************************************************************/ -WRITE8_MEMBER(fastlane_state::volume_callback0) +void fastlane_state::volume_callback0(uint8_t data) { m_k007232_1->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_1->set_volume(1, 0, (data & 0x0f) * 0x11); } -WRITE8_MEMBER(fastlane_state::volume_callback1) +void fastlane_state::volume_callback1(uint8_t data) { m_k007232_2->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_2->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp index 4d390cde0b1..7b91ee74e07 100644 --- a/src/mame/drivers/fccpu30.cpp +++ b/src/mame/drivers/fccpu30.cpp @@ -97,7 +97,7 @@ * - A32/D32 VMEbus master/slave interface with system controller function (VMEchip ASIC) * - Ethernet transceiver interface (AM79C90) * - SCSI bus interface with independent data bus on P2 connector (MB87033/34) - * - Flopyy disk interface on P2 connector (FCD37C65C) + * - Floppy disk interface on P2 connector (FCD37C65C) * - Four serial ports (DUSCC SCN68562 x 2) * - 20 bit digital i/o for user applications( 2 x 68230 PI/T ) * - Real-Time Clock with interrupt (72423) @@ -107,7 +107,7 @@ * * Address Map * -------------------------------------------------------------------------- - * Range Decscription + * Range Desccription * -------------------------------------------------------------------------- * 00000000-0xxFFFFF Shared DRAM D8-D32 xx=0x1F-0x03 for 32Mb-4Mb * 0yy00000-FAFFFFFF VME A32 D8-D32 yy=xx+1 @@ -287,16 +287,16 @@ private: int fga_irq_level; /* Rotary switch PIT input */ - DECLARE_READ8_MEMBER (rotary_rd); - DECLARE_READ8_MEMBER (flop_dmac_r); - DECLARE_WRITE8_MEMBER (flop_dmac_w); - DECLARE_READ8_MEMBER (pit1c_r); - DECLARE_WRITE8_MEMBER (pit1c_w); - DECLARE_READ8_MEMBER (pit2a_r); - DECLARE_WRITE8_MEMBER (pit2a_w); - DECLARE_READ8_MEMBER (board_mem_id_rd); - DECLARE_READ8_MEMBER (pit2c_r); - DECLARE_WRITE8_MEMBER (pit2c_w); + uint8_t rotary_rd(); + uint8_t flop_dmac_r(); + void flop_dmac_w(uint8_t data); + uint8_t pit1c_r(); + void pit1c_w(uint8_t data); + uint8_t pit2a_r(); + void pit2a_w(uint8_t data); + uint8_t board_mem_id_rd(); + uint8_t pit2c_r(); + void pit2c_w(uint8_t data); /* VME bus accesses */ //DECLARE_READ16_MEMBER (vme_a24_r); @@ -487,42 +487,42 @@ WRITE32_MEMBER (cpu30_state::bootvect_w){ * * "To start VMEPROM, the rotary switches must both be set to 'F':" Hmm... */ -READ8_MEMBER (cpu30_state::rotary_rd){ +uint8_t cpu30_state::rotary_rd(){ LOG("%s\n", FUNCNAME); return 0xff; // TODO: make this configurable from commandline or artwork } // PIT#1 Port B TODO: implement floppy and dma control -READ8_MEMBER (cpu30_state::flop_dmac_r){ +uint8_t cpu30_state::flop_dmac_r(){ LOG("%s\n", FUNCNAME); return 0xff; } -WRITE8_MEMBER (cpu30_state::flop_dmac_w){ +void cpu30_state::flop_dmac_w(uint8_t data){ LOG("%s(%02x)\n", FUNCNAME, data); } #define FPCP_SENSE 0x40 /* Port C bit 6 is low if a Floating Point Co Processor is installed */ // PIT#1 Port C TODO: implement timer+port interrupts // TODO: Connect PC0, PC1, PC4 and PC7 to B5 and/or P2 connector -READ8_MEMBER (cpu30_state::pit1c_r){ +uint8_t cpu30_state::pit1c_r(){ LOG("%s\n", FUNCNAME); m_maincpu->set_fpu_enable(1); // Lets assume the FPCP is always installed ( which is default for 68030 atm ) return 0xff & ~FPCP_SENSE; // Should really be command line for the edge cases... } -WRITE8_MEMBER (cpu30_state::pit1c_w){ +void cpu30_state::pit1c_w(uint8_t data){ LOG("%s(%02x)\n", FUNCNAME, data); } // PIT#2 Port A TODO: Connect to B5 and /or P2 connector -READ8_MEMBER (cpu30_state::pit2a_r){ +uint8_t cpu30_state::pit2a_r(){ LOG("%s\n", FUNCNAME); logerror("Unsupported user i/o on PIT2 port A detected\n"); return 0xff; } -WRITE8_MEMBER (cpu30_state::pit2a_w){ +void cpu30_state::pit2a_w(uint8_t data){ LOG("%s(%02x)\n", FUNCNAME, data); logerror("Unsupported user i/o on PIT2 port A detected\n"); } @@ -541,11 +541,11 @@ WRITE8_MEMBER (cpu30_state::pit2a_w){ * contain the same identification number. In the case of the CPU-30 R4, the * number is 0x0a * - * The speed of the board is meassured by looping some instructions and meassure the time it takes with a timer + * The speed of the board is measured by looping some instructions and measure the time it takes with a timer * Currently this doesn't work so the wrong speed is displayed on the screen. To fix this timing needs to be more exact. - * Speed meassure subroutine is at address 0xffe033c4 in the FGA-002 firmware with CRC (faa38972) (for example) + * Speed measure subroutine is at address 0xffe033c4 in the FGA-002 firmware with CRC (faa38972) (for example) */ -READ8_MEMBER (cpu30_state::board_mem_id_rd) +uint8_t cpu30_state::board_mem_id_rd() { int sz; LOG("%s\n", FUNCNAME); @@ -591,12 +591,12 @@ READ8_MEMBER (cpu30_state::board_mem_id_rd) } // PIT#2 Port C TODO: implement timer interrupt, DMA i/o, memory control and Hardware ID -READ8_MEMBER (cpu30_state::pit2c_r){ +uint8_t cpu30_state::pit2c_r(){ LOG("%s\n", FUNCNAME); return 0xfe; } -WRITE8_MEMBER (cpu30_state::pit2c_w){ +void cpu30_state::pit2c_w(uint8_t data){ LOG("%s(%02x)\n", FUNCNAME, data); } diff --git a/src/mame/drivers/fidel_card.cpp b/src/mame/drivers/fidel_card.cpp index 215fd9daa26..9717115c937 100644 --- a/src/mame/drivers/fidel_card.cpp +++ b/src/mame/drivers/fidel_card.cpp @@ -237,9 +237,9 @@ private: // I/O handlers void update_display(); - DECLARE_WRITE8_MEMBER(speech_w); - DECLARE_WRITE8_MEMBER(mcu_p1_w); - DECLARE_READ8_MEMBER(mcu_p2_r); + void speech_w(u8 data); + void mcu_p1_w(u8 data); + u8 mcu_p2_r(); DECLARE_READ_LINE_MEMBER(mcu_t0_r); template void ioexp_port_w(uint8_t data); }; @@ -278,7 +278,7 @@ void card_state::update_display() m_dac->write(BIT(~m_inp_mux, 7) & BIT(m_vfd_data, 13)); } -WRITE8_MEMBER(card_state::speech_w) +void card_state::speech_w(u8 data) { if (m_speech == nullptr) return; @@ -326,14 +326,14 @@ void card_state::ioexp_port_w(uint8_t data) // I8041 MCU -WRITE8_MEMBER(card_state::mcu_p1_w) +void card_state::mcu_p1_w(u8 data) { // P10-P17: input mux, digit select m_inp_mux = data; update_display(); } -READ8_MEMBER(card_state::mcu_p2_r) +u8 card_state::mcu_p2_r() { // P20-P23: I8243 P2 u8 data = m_i8243->p2_r() & 0x0f; diff --git a/src/mame/drivers/fidel_cc1.cpp b/src/mame/drivers/fidel_cc1.cpp index eb1ec8ce428..902b3c0d3d5 100644 --- a/src/mame/drivers/fidel_cc1.cpp +++ b/src/mame/drivers/fidel_cc1.cpp @@ -107,9 +107,9 @@ private: // I/O handlers void update_display(); - DECLARE_READ8_MEMBER(ppi_porta_r); - DECLARE_WRITE8_MEMBER(ppi_portb_w); - DECLARE_WRITE8_MEMBER(ppi_portc_w); + u8 ppi_porta_r(); + void ppi_portb_w(u8 data); + void ppi_portc_w(u8 data); u8 m_led_select; u8 m_7seg_data; @@ -140,7 +140,7 @@ void cc1_state::update_display() m_display->matrix(m_led_select, m_7seg_data); } -READ8_MEMBER(cc1_state::ppi_porta_r) +u8 cc1_state::ppi_porta_r() { // 74148(priority encoder) I0-I7: inputs // d0-d2: 74148 S0-S2, d3: 74148 GS @@ -153,14 +153,14 @@ READ8_MEMBER(cc1_state::ppi_porta_r) return data | ((m_delay->enabled()) ? 0x10 : 0); } -WRITE8_MEMBER(cc1_state::ppi_portb_w) +void cc1_state::ppi_portb_w(u8 data) { // d0-d6: digit segment data m_7seg_data = bitswap<7>(data,0,1,2,3,4,5,6); update_display(); } -WRITE8_MEMBER(cc1_state::ppi_portc_w) +void cc1_state::ppi_portc_w(u8 data) { // d6: trigger monostable 555 (R=15K, C=1uF) if (~data & m_led_select & 0x40 && !m_delay->enabled()) diff --git a/src/mame/drivers/fidel_cc10.cpp b/src/mame/drivers/fidel_cc10.cpp index 701bcfe3d8e..03b2cab3b19 100644 --- a/src/mame/drivers/fidel_cc10.cpp +++ b/src/mame/drivers/fidel_cc10.cpp @@ -89,10 +89,10 @@ private: // I/O handlers void update_display(); - DECLARE_WRITE8_MEMBER(ppi_porta_w); - DECLARE_WRITE8_MEMBER(ppi_portb_w); - DECLARE_READ8_MEMBER(ppi_portc_r); - DECLARE_WRITE8_MEMBER(ppi_portc_w); + void ppi_porta_w(u8 data); + void ppi_portb_w(u8 data); + u8 ppi_portc_r(); + void ppi_portc_w(u8 data); u8 m_inp_mux; u8 m_led_select; @@ -126,7 +126,7 @@ void ccx_state::update_display() m_display->matrix(m_led_select, m_7seg_data); } -WRITE8_MEMBER(ccx_state::ppi_porta_w) +void ccx_state::ppi_porta_w(u8 data) { // d7: enable beeper on falling edge (556 monostable) (unpopulated on ACR) if (m_beeper != nullptr && ~data & m_7seg_data & 0x80 && !m_beeper_off->enabled()) @@ -140,7 +140,7 @@ WRITE8_MEMBER(ccx_state::ppi_porta_w) update_display(); } -WRITE8_MEMBER(ccx_state::ppi_portb_w) +void ccx_state::ppi_portb_w(u8 data) { // d0: lose led, d1: check(win) led // d2-d5: digit select @@ -148,7 +148,7 @@ WRITE8_MEMBER(ccx_state::ppi_portb_w) update_display(); } -READ8_MEMBER(ccx_state::ppi_portc_r) +u8 ccx_state::ppi_portc_r() { u8 data = 0; @@ -160,7 +160,7 @@ READ8_MEMBER(ccx_state::ppi_portc_r) return ~data & 0xf; } -WRITE8_MEMBER(ccx_state::ppi_portc_w) +void ccx_state::ppi_portc_w(u8 data) { // d4-d7: input mux (inverted) m_inp_mux = ~data >> 4 & 0xf; diff --git a/src/mame/drivers/fidel_csc.cpp b/src/mame/drivers/fidel_csc.cpp index d78062c2ba5..eb707d0ff7f 100644 --- a/src/mame/drivers/fidel_csc.cpp +++ b/src/mame/drivers/fidel_csc.cpp @@ -270,18 +270,18 @@ protected: u16 read_inputs(); void update_display(); void update_sound(); - DECLARE_READ8_MEMBER(speech_r); + u8 speech_r(offs_t offset); - DECLARE_WRITE8_MEMBER(pia0_pa_w); - DECLARE_WRITE8_MEMBER(pia0_pb_w); - DECLARE_READ8_MEMBER(pia0_pa_r); + void pia0_pa_w(u8 data); + void pia0_pb_w(u8 data); + u8 pia0_pa_r(); DECLARE_WRITE_LINE_MEMBER(pia0_ca2_w); DECLARE_WRITE_LINE_MEMBER(pia0_cb2_w); DECLARE_READ_LINE_MEMBER(pia0_ca1_r); DECLARE_READ_LINE_MEMBER(pia0_cb1_r); - DECLARE_WRITE8_MEMBER(pia1_pa_w); - DECLARE_WRITE8_MEMBER(pia1_pb_w); - DECLARE_READ8_MEMBER(pia1_pb_r); + void pia1_pa_w(u8 data); + void pia1_pb_w(u8 data); + u8 pia1_pb_r(); DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w); u8 m_led_data; @@ -398,7 +398,7 @@ void csc_state::update_sound() m_dac->write(BIT(1 << m_inp_mux, 9)); } -READ8_MEMBER(csc_state::speech_r) +u8 csc_state::speech_r(offs_t offset) { return m_speech_rom[m_speech_bank << 12 | offset]; } @@ -406,13 +406,13 @@ READ8_MEMBER(csc_state::speech_r) // 6821 PIA 0 -READ8_MEMBER(csc_state::pia0_pa_r) +u8 csc_state::pia0_pa_r() { // d0-d5: button row 0-5 return (read_inputs() & 0x3f) | 0xc0; } -WRITE8_MEMBER(csc_state::pia0_pa_w) +void csc_state::pia0_pa_w(u8 data) { // d6,d7: 7442 A0,A1 m_inp_mux = (m_inp_mux & ~3) | (data >> 6 & 3); @@ -420,7 +420,7 @@ WRITE8_MEMBER(csc_state::pia0_pa_w) update_sound(); } -WRITE8_MEMBER(csc_state::pia0_pb_w) +void csc_state::pia0_pb_w(u8 data) { // d0-d7: led row data m_led_data = data; @@ -458,7 +458,7 @@ WRITE_LINE_MEMBER(csc_state::pia0_ca2_w) // 6821 PIA 1 -WRITE8_MEMBER(csc_state::pia1_pa_w) +void csc_state::pia1_pa_w(u8 data) { // d0-d5: TSI C0-C5 m_speech->data_w(data & 0x3f); @@ -468,7 +468,7 @@ WRITE8_MEMBER(csc_state::pia1_pa_w) update_display(); } -WRITE8_MEMBER(csc_state::pia1_pb_w) +void csc_state::pia1_pb_w(u8 data) { // d0: speech ROM A12 m_speech->force_update(); // update stream to now @@ -481,7 +481,7 @@ WRITE8_MEMBER(csc_state::pia1_pb_w) m_speech->set_output_gain(0, (data & 0x10) ? 0.25 : 1.0); } -READ8_MEMBER(csc_state::pia1_pb_r) +u8 csc_state::pia1_pb_r() { // d2: printer? u8 data = 0x04; diff --git a/src/mame/drivers/fidel_elite.cpp b/src/mame/drivers/fidel_elite.cpp index 0b18d43a514..216b84c21c1 100644 --- a/src/mame/drivers/fidel_elite.cpp +++ b/src/mame/drivers/fidel_elite.cpp @@ -134,13 +134,13 @@ protected: // I/O handlers void update_display(); - DECLARE_READ8_MEMBER(speech_r); - DECLARE_WRITE8_MEMBER(segment_w); - DECLARE_WRITE8_MEMBER(led_w); - DECLARE_READ8_MEMBER(input_r); - DECLARE_WRITE8_MEMBER(ppi_porta_w); - DECLARE_READ8_MEMBER(ppi_portb_r); - DECLARE_WRITE8_MEMBER(ppi_portc_w); + u8 speech_r(offs_t offset); + void segment_w(offs_t offset, u8 data); + void led_w(offs_t offset, u8 data); + u8 input_r(); + void ppi_porta_w(u8 data); + u8 ppi_portb_r(); + void ppi_portc_w(u8 data); bool m_rotate; u8 m_led_data; @@ -209,12 +209,12 @@ void elite_state::update_display() m_display->matrix(1 << m_inp_mux, m_led_data << 8 | seg_data); } -READ8_MEMBER(elite_state::speech_r) +u8 elite_state::speech_r(offs_t offset) { return m_speech_rom[m_speech_bank << 12 | offset]; } -WRITE8_MEMBER(elite_state::segment_w) +void elite_state::segment_w(offs_t offset, u8 data) { // a0-a2,d7: digit segment u8 mask = 1 << offset; @@ -222,14 +222,14 @@ WRITE8_MEMBER(elite_state::segment_w) update_display(); } -WRITE8_MEMBER(elite_state::led_w) +void elite_state::led_w(offs_t offset, u8 data) { // a0-a2,d0: led data m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset); update_display(); } -READ8_MEMBER(elite_state::input_r) +u8 elite_state::input_r() { u8 data = 0; @@ -254,7 +254,7 @@ READ8_MEMBER(elite_state::input_r) // 8255 PPI (PC: done with TTL instead) -WRITE8_MEMBER(elite_state::ppi_porta_w) +void elite_state::ppi_porta_w(u8 data) { // d0-d5: TSI C0-C5 // d6: TSI START line @@ -264,7 +264,7 @@ WRITE8_MEMBER(elite_state::ppi_porta_w) // d7: printer? (black wire to LED pcb) } -WRITE8_MEMBER(elite_state::ppi_portc_w) +void elite_state::ppi_portc_w(u8 data) { // d0-d3: 7442 a0-a3 // 7442 0-8: led select, input mux @@ -286,7 +286,7 @@ WRITE8_MEMBER(elite_state::ppi_portc_w) m_rombank->set_entry(data >> 6 & 3); } -READ8_MEMBER(elite_state::ppi_portb_r) +u8 elite_state::ppi_portb_r() { // d0: printer? white wire from LED pcb u8 data = 1; diff --git a/src/mame/drivers/fidel_excel.cpp b/src/mame/drivers/fidel_excel.cpp index 6a5db5bc199..868fb8b22ed 100644 --- a/src/mame/drivers/fidel_excel.cpp +++ b/src/mame/drivers/fidel_excel.cpp @@ -202,9 +202,9 @@ private: template TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); } // I/O handlers - DECLARE_READ8_MEMBER(speech_r); - DECLARE_WRITE8_MEMBER(ttl_w); - DECLARE_READ8_MEMBER(ttl_r); + u8 speech_r(offs_t offset); + void ttl_w(offs_t offset, u8 data); + u8 ttl_r(offs_t offset); u8 m_select; u8 m_7seg_data; @@ -242,7 +242,7 @@ INPUT_CHANGED_MEMBER(excel_state::speech_bankswitch) m_speech_bank = (m_speech_bank & 1) | newval << 1; } -READ8_MEMBER(excel_state::speech_r) +u8 excel_state::speech_r(offs_t offset) { // TSI A11 is A12, program controls A11, user controls A13,A14(language switches) offset = (offset & 0x7ff) | (offset << 1 & 0x1000); @@ -252,7 +252,7 @@ READ8_MEMBER(excel_state::speech_r) // TTL -WRITE8_MEMBER(excel_state::ttl_w) +void excel_state::ttl_w(offs_t offset, u8 data) { // a0-a2,d0: 74259(1) u8 mask = 1 << offset; @@ -294,7 +294,7 @@ WRITE8_MEMBER(excel_state::ttl_w) } } -READ8_MEMBER(excel_state::ttl_r) +u8 excel_state::ttl_r(offs_t offset) { u8 sel = m_select & 0xf; u8 d7 = 0x80; diff --git a/src/mame/drivers/fidel_sc6.cpp b/src/mame/drivers/fidel_sc6.cpp index 927f3a2928f..f396a449d19 100644 --- a/src/mame/drivers/fidel_sc6.cpp +++ b/src/mame/drivers/fidel_sc6.cpp @@ -69,11 +69,11 @@ private: // I/O handlers void update_display(); - DECLARE_WRITE8_MEMBER(mux_w); - DECLARE_WRITE8_MEMBER(select_w); + void mux_w(u8 data); + void select_w(u8 data); u8 read_inputs(); - DECLARE_READ8_MEMBER(input_r); + u8 input_r(); DECLARE_READ_LINE_MEMBER(input6_r); DECLARE_READ_LINE_MEMBER(input7_r); @@ -106,7 +106,7 @@ void sc6_state::update_display() m_display->matrix(m_led_select, 1 << m_inp_mux); } -WRITE8_MEMBER(sc6_state::mux_w) +void sc6_state::mux_w(u8 data) { // P24-P27: 7442 A-D // 7442 0-8: input mux, 7seg data @@ -117,7 +117,7 @@ WRITE8_MEMBER(sc6_state::mux_w) m_dac->write(BIT(1 << m_inp_mux, 9)); } -WRITE8_MEMBER(sc6_state::select_w) +void sc6_state::select_w(u8 data) { // P16,P17: digit select m_led_select = ~data >> 6 & 3; @@ -139,7 +139,7 @@ u8 sc6_state::read_inputs() return ~data; } -READ8_MEMBER(sc6_state::input_r) +u8 sc6_state::input_r() { // P10-P15: multiplexed inputs low return (read_inputs() & 0x3f) | 0xc0; diff --git a/src/mame/drivers/fidel_vcc.cpp b/src/mame/drivers/fidel_vcc.cpp index ffaededb2fe..3ea064afb4c 100644 --- a/src/mame/drivers/fidel_vcc.cpp +++ b/src/mame/drivers/fidel_vcc.cpp @@ -152,12 +152,12 @@ private: // I/O handlers void update_display(); - DECLARE_READ8_MEMBER(speech_r); - DECLARE_WRITE8_MEMBER(ppi_porta_w); - DECLARE_READ8_MEMBER(ppi_portb_r); - DECLARE_WRITE8_MEMBER(ppi_portb_w); - DECLARE_READ8_MEMBER(ppi_portc_r); - DECLARE_WRITE8_MEMBER(ppi_portc_w); + u8 speech_r(offs_t offset); + void ppi_porta_w(u8 data); + u8 ppi_portb_r(); + void ppi_portb_w(u8 data); + u8 ppi_portc_r(); + void ppi_portc_w(u8 data); u8 m_led_select; u8 m_7seg_data; @@ -199,7 +199,7 @@ void vcc_state::update_display() m_display->matrix(m_led_select >> 2 & 0xf, outdata); } -READ8_MEMBER(vcc_state::speech_r) +u8 vcc_state::speech_r(offs_t offset) { return m_speech_rom[m_speech_bank << 12 | offset]; } @@ -207,7 +207,7 @@ READ8_MEMBER(vcc_state::speech_r) // I8255 PPI -WRITE8_MEMBER(vcc_state::ppi_porta_w) +void vcc_state::ppi_porta_w(u8 data) { // d0-d6: digit segment data, bits are xABCDEFG m_7seg_data = bitswap<8>(data,7,0,1,2,3,4,5,6); @@ -227,13 +227,13 @@ WRITE8_MEMBER(vcc_state::ppi_porta_w) } } -READ8_MEMBER(vcc_state::ppi_portb_r) +u8 vcc_state::ppi_portb_r() { // d7: TSI BUSY line return (m_speech->busy_r()) ? 0x80 : 0x00; } -WRITE8_MEMBER(vcc_state::ppi_portb_w) +void vcc_state::ppi_portb_w(u8 data) { // d0,d2-d5: digit/led select // _d6: enable language switches @@ -241,7 +241,7 @@ WRITE8_MEMBER(vcc_state::ppi_portb_w) update_display(); } -READ8_MEMBER(vcc_state::ppi_portc_r) +u8 vcc_state::ppi_portc_r() { u8 data = 0; @@ -258,7 +258,7 @@ READ8_MEMBER(vcc_state::ppi_portc_r) return ~data & 0xf; } -WRITE8_MEMBER(vcc_state::ppi_portc_w) +void vcc_state::ppi_portc_w(u8 data) { // d4-d7: input mux (inverted) m_inp_mux = ~data >> 4 & 0xf; diff --git a/src/mame/drivers/fidel_vsc.cpp b/src/mame/drivers/fidel_vsc.cpp index 7542d07aa62..5dba5bf8982 100644 --- a/src/mame/drivers/fidel_vsc.cpp +++ b/src/mame/drivers/fidel_vsc.cpp @@ -202,8 +202,8 @@ private: // address maps void main_map(address_map &map); void main_io(address_map &map); - DECLARE_READ8_MEMBER(main_io_trampoline_r); - DECLARE_WRITE8_MEMBER(main_io_trampoline_w); + u8 main_io_trampoline_r(offs_t offset); + void main_io_trampoline_w(offs_t offset, u8 data); // periodic interrupts template TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); } @@ -211,13 +211,13 @@ private: // I/O handlers void update_display(); - DECLARE_READ8_MEMBER(speech_r); - DECLARE_WRITE8_MEMBER(ppi_porta_w); - DECLARE_WRITE8_MEMBER(ppi_portb_w); - DECLARE_WRITE8_MEMBER(ppi_portc_w); - DECLARE_READ8_MEMBER(pio_porta_r); - DECLARE_READ8_MEMBER(pio_portb_r); - DECLARE_WRITE8_MEMBER(pio_portb_w); + u8 speech_r(offs_t offset); + void ppi_porta_w(u8 data); + void ppi_portb_w(u8 data); + void ppi_portc_w(u8 data); + u8 pio_porta_r(); + u8 pio_portb_r(); + void pio_portb_w(u8 data); u8 m_led_data; u8 m_7seg_data; @@ -260,7 +260,7 @@ void vsc_state::update_display() m_display->matrix(m_cb_mux, m_led_data << 8 | m_7seg_data); } -READ8_MEMBER(vsc_state::speech_r) +u8 vsc_state::speech_r(offs_t offset) { return m_speech_rom[m_speech_bank << 12 | offset]; } @@ -268,7 +268,7 @@ READ8_MEMBER(vsc_state::speech_r) // I8255 PPI -WRITE8_MEMBER(vsc_state::ppi_porta_w) +void vsc_state::ppi_porta_w(u8 data) { // d0-d5: TSI C0-C5 m_speech->data_w(data & 0x3f); @@ -278,14 +278,14 @@ WRITE8_MEMBER(vsc_state::ppi_porta_w) update_display(); } -WRITE8_MEMBER(vsc_state::ppi_portb_w) +void vsc_state::ppi_portb_w(u8 data) { // d0-d7: led row data m_led_data = data; update_display(); } -WRITE8_MEMBER(vsc_state::ppi_portc_w) +void vsc_state::ppi_portc_w(u8 data) { // d0-d3: select digits // d0-d7: select leds, chessboard input mux @@ -296,7 +296,7 @@ WRITE8_MEMBER(vsc_state::ppi_portc_w) // Z80 PIO -READ8_MEMBER(vsc_state::pio_porta_r) +u8 vsc_state::pio_porta_r() { u8 data = 0; @@ -318,7 +318,7 @@ READ8_MEMBER(vsc_state::pio_porta_r) return data; } -READ8_MEMBER(vsc_state::pio_portb_r) +u8 vsc_state::pio_portb_r() { u8 data = 0; @@ -328,7 +328,7 @@ READ8_MEMBER(vsc_state::pio_portb_r) return data; } -WRITE8_MEMBER(vsc_state::pio_portb_w) +void vsc_state::pio_portb_w(u8 data) { // d0,d1: keypad input mux // d5: enable language switch @@ -361,7 +361,7 @@ void vsc_state::main_map(address_map &map) } // VSC io: A2 is 8255 _CE, A3 is Z80 PIO _CE - in theory, both chips can be accessed simultaneously -READ8_MEMBER(vsc_state::main_io_trampoline_r) +u8 vsc_state::main_io_trampoline_r(offs_t offset) { u8 data = 0xff; // open bus if (~offset & 4) @@ -372,7 +372,7 @@ READ8_MEMBER(vsc_state::main_io_trampoline_r) return data; } -WRITE8_MEMBER(vsc_state::main_io_trampoline_w) +void vsc_state::main_io_trampoline_w(offs_t offset, u8 data) { if (~offset & 4) m_ppi8255->write(offset & 3, data); diff --git a/src/mame/drivers/finalizr.cpp b/src/mame/drivers/finalizr.cpp index 0e94cf52187..f02cf728002 100644 --- a/src/mame/drivers/finalizr.cpp +++ b/src/mame/drivers/finalizr.cpp @@ -65,7 +65,7 @@ WRITE8_MEMBER(finalizr_state::finalizr_i8039_irq_w) m_audiocpu->set_input_line(0, ASSERT_LINE); } -WRITE8_MEMBER(finalizr_state::i8039_irqen_w) +void finalizr_state::i8039_irqen_w(uint8_t data) { /* bit 0x80 goes active low, indicating that the external IRQ being serviced is complete diff --git a/src/mame/drivers/flkatck.cpp b/src/mame/drivers/flkatck.cpp index a184903a2be..972eaa21f96 100644 --- a/src/mame/drivers/flkatck.cpp +++ b/src/mame/drivers/flkatck.cpp @@ -188,7 +188,7 @@ static GFXDECODE_START( gfx_flkatck ) GFXDECODE_ENTRY( "gfx1", 0, gfxlayout, 0, 32 ) GFXDECODE_END -WRITE8_MEMBER(flkatck_state::volume_callback) +void flkatck_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data >> 4) * 0x11, 0); m_k007232->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp index 30fe9cfb9d9..4db7f63ebb3 100644 --- a/src/mame/drivers/fm7.cpp +++ b/src/mame/drivers/fm7.cpp @@ -965,16 +965,6 @@ READ8_MEMBER(fm7_state::fm7_fmirq_r) return ret; } -READ8_MEMBER(fm7_state::fm77av_joy_1_r) -{ - return m_joy1->read(); -} - -READ8_MEMBER(fm7_state::fm77av_joy_2_r) -{ - return m_joy2->read(); -} - READ8_MEMBER(fm7_state::fm7_unknown_r) { // Port 0xFDFC is read by Dig Dug. Controller port, perhaps? @@ -2145,8 +2135,8 @@ void fm7_state::fm77av(machine_config &config) SPEAKER(config, "mono").front_center(); YM2203(config, m_ym, 4.9152_MHz_XTAL / 4); m_ym->irq_handler().set(FUNC(fm7_state::fm77av_fmirq)); - m_ym->port_a_read_callback().set(FUNC(fm7_state::fm77av_joy_1_r)); - m_ym->port_b_read_callback().set(FUNC(fm7_state::fm77av_joy_2_r)); + m_ym->port_a_read_callback().set_ioport("joy1"); + m_ym->port_b_read_callback().set_ioport("joy2"); m_ym->add_route(ALL_OUTPUTS,"mono", 1.00); BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp index bea9210ef2f..c9988667c6a 100644 --- a/src/mame/drivers/fmtowns.cpp +++ b/src/mame/drivers/fmtowns.cpp @@ -656,12 +656,12 @@ WRITE8_MEMBER(towns_state::towns_floppy_w) } } -READ16_MEMBER(towns_state::towns_fdc_dma_r) +uint16_t towns_state::towns_fdc_dma_r() { uint16_t data = m_fdc->data_r(); return data; } -WRITE16_MEMBER(towns_state::towns_fdc_dma_w) +void towns_state::towns_fdc_dma_w(uint16_t data) { m_fdc->data_w(data); } @@ -1734,7 +1734,7 @@ void towns_state::towns_cdrom_execute_command(cdrom_image_device* device) } } -READ16_MEMBER(towns_state::towns_cdrom_dma_r) +uint16_t towns_state::towns_cdrom_dma_r() { if(m_towns_cd.buffer_ptr >= 2048) return 0x00; @@ -2012,12 +2012,12 @@ WRITE_LINE_MEMBER(towns_state::rtc_busy_w) } // SCSI controller - I/O ports 0xc30 and 0xc32 -READ16_MEMBER(towns_state::towns_scsi_dma_r) +uint16_t towns_state::towns_scsi_dma_r() { return m_scsi->fmscsi_data_r(); } -WRITE16_MEMBER(towns_state::towns_scsi_dma_w) +void towns_state::towns_scsi_dma_w(uint16_t data) { m_scsi->fmscsi_data_w(data & 0xff); } @@ -2783,7 +2783,7 @@ void towns_state::machine_reset() m_towns_fm_irq_flag = 0; } -READ8_MEMBER(towns_state::get_slave_ack) +uint8_t towns_state::get_slave_ack(offs_t offset) { if (offset==7) { // IRQ = 7 return m_pic_slave->acknowledge(); diff --git a/src/mame/drivers/fruitpc.cpp b/src/mame/drivers/fruitpc.cpp index af5436ecd82..1987638c7d8 100644 --- a/src/mame/drivers/fruitpc.cpp +++ b/src/mame/drivers/fruitpc.cpp @@ -38,14 +38,14 @@ private: required_device m_isabus; required_ioport_array<4> m_inp; - DECLARE_READ8_MEMBER(fruit_inp_r); - DECLARE_WRITE8_MEMBER(dma8237_1_dack_w); + uint8_t fruit_inp_r(offs_t offset); + void dma8237_1_dack_w(uint8_t data); static void fruitpc_sb_conf(device_t *device); void fruitpc_io(address_map &map); void fruitpc_map(address_map &map); }; -READ8_MEMBER(fruitpc_state::fruit_inp_r) +uint8_t fruitpc_state::fruit_inp_r(offs_t offset) { return m_inp[offset & 0x03]->read(); } @@ -98,7 +98,7 @@ static INPUT_PORTS_START( fruitpc ) INPUT_PORTS_END //TODO: use atmb device -WRITE8_MEMBER( fruitpc_state::dma8237_1_dack_w ){ m_isabus->dack_w(1, data); } +void fruitpc_state::dma8237_1_dack_w(uint8_t data) { m_isabus->dack_w(1, data); } static void fruitpc_isa8_cards(device_slot_interface &device) { diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index e31ae730960..c399dbb34c6 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -658,7 +658,7 @@ * Read/Write Handlers * **********************/ -WRITE8_MEMBER(funworld_state::funworld_lamp_a_w) +void funworld_state::funworld_lamp_a_w(uint8_t data) { /* - bits - 7654 3210 @@ -686,7 +686,7 @@ WRITE8_MEMBER(funworld_state::funworld_lamp_a_w) // popmessage("Lamps A: %02X", (data ^ 0xff)); } -WRITE8_MEMBER(funworld_state::funworld_lamp_b_w) +void funworld_state::funworld_lamp_b_w(uint8_t data) { /* - bits - 7654 3210 @@ -2966,12 +2966,12 @@ GFXDECODE_END */ /* these ports are set to output anyway, but this quietens the log */ -READ8_MEMBER(funworld_state::funquiz_ay8910_a_r) +uint8_t funworld_state::funquiz_ay8910_a_r() { return 0x00; } -READ8_MEMBER(funworld_state::funquiz_ay8910_b_r) +uint8_t funworld_state::funquiz_ay8910_b_r() { return 0x00; } diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp index effd653945a..90009bc79d7 100644 --- a/src/mame/drivers/gaelco3d.cpp +++ b/src/mame/drivers/gaelco3d.cpp @@ -388,7 +388,7 @@ WRITE32_MEMBER(gaelco3d_state::tms_m68k_ram_w) } -WRITE8_MEMBER(gaelco3d_state::tms_iack_w) +void gaelco3d_state::tms_iack_w(offs_t offset, uint8_t data) { if (LOG) logerror("iack_w(%d) - %06X\n", data, offset); @@ -551,7 +551,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(gaelco3d_state::adsp_autobuffer_irq) m_adsp->set_state_int(ADSP2100_I0 + m_adsp_ireg, reg); } -WRITE32_MEMBER(gaelco3d_state::adsp_tx_callback) +void gaelco3d_state::adsp_tx_callback(offs_t offset, uint32_t data) { /* check if it's for SPORT1 */ if (offset != 1) diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp index 6c3a47d90bb..83523b472ea 100644 --- a/src/mame/drivers/galaga.cpp +++ b/src/mame/drivers/galaga.cpp @@ -759,7 +759,7 @@ WRITE_LINE_MEMBER(galaga_state::nmion_w) m_sub2_nmi_mask = !state; } -WRITE8_MEMBER(galaga_state::out) +void galaga_state::out(uint8_t data) { m_leds[1] = BIT(data, 0); m_leds[0] = BIT(data, 1); @@ -772,7 +772,7 @@ WRITE_LINE_MEMBER(galaga_state::lockout) machine().bookkeeping().coin_lockout_global_w(state); } -READ8_MEMBER(galaga_state::namco_52xx_rom_r) +uint8_t galaga_state::namco_52xx_rom_r(offs_t offset) { uint32_t length = memregion("52xx")->bytes(); //printf("ROM read %04X\n", offset); @@ -787,7 +787,7 @@ READ8_MEMBER(galaga_state::namco_52xx_rom_r) return (offset < length) ? memregion("52xx")->base()[offset] : 0xff; } -READ8_MEMBER(galaga_state::namco_52xx_si_r) +uint8_t galaga_state::namco_52xx_si_r() { /* pulled to GND */ return 0; diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 962de624fa0..caafede0388 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -770,7 +770,7 @@ WRITE8_MEMBER(galaxian_state::konami_ay8910_w) } -WRITE8_MEMBER(galaxian_state::konami_sound_control_w) +void galaxian_state::konami_sound_control_w(uint8_t data) { uint8_t old = m_konami_sound_control; m_konami_sound_control = data; @@ -785,7 +785,7 @@ WRITE8_MEMBER(galaxian_state::konami_sound_control_w) } -READ8_MEMBER(galaxian_state::konami_sound_timer_r) +uint8_t galaxian_state::konami_sound_timer_r() { /* The timer is clocked at KONAMI_SOUND_CLOCK and cascades through a @@ -845,13 +845,13 @@ WRITE8_MEMBER(galaxian_state::konami_sound_filter_w) } -WRITE8_MEMBER(galaxian_state::konami_portc_0_w) +void galaxian_state::konami_portc_0_w(uint8_t data) { logerror("%s:ppi0_portc_w = %02X\n", machine().describe_context(), data); } -WRITE8_MEMBER(galaxian_state::konami_portc_1_w) +void galaxian_state::konami_portc_1_w(uint8_t data) { logerror("%s:ppi1_portc_w = %02X\n", machine().describe_context(), data); } @@ -881,13 +881,13 @@ WRITE8_MEMBER(galaxian_state::theend_ppi8255_w) } -WRITE8_MEMBER(galaxian_state::theend_coin_counter_w) +void galaxian_state::theend_coin_counter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 0x80); } -WRITE8_MEMBER(galaxian_state::theend_protection_w) +void galaxian_state::theend_protection_w(uint8_t data) { /* Handled by a PAL16VR8(?) at 6J. Both inputs and outputs are a nibble. @@ -926,7 +926,7 @@ WRITE8_MEMBER(galaxian_state::theend_protection_w) } -READ8_MEMBER(galaxian_state::theend_protection_r) +uint8_t galaxian_state::theend_protection_r() { return m_protection_result; } @@ -954,7 +954,7 @@ WRITE8_MEMBER(galaxian_state::explorer_sound_control_w) } -READ8_MEMBER(galaxian_state::explorer_sound_latch_r) +uint8_t galaxian_state::explorer_sound_latch_r() { m_audiocpu->set_input_line(0, CLEAR_LINE); return m_soundlatch->read(); @@ -985,7 +985,7 @@ WRITE8_MEMBER(galaxian_state::sfx_sample_io_w) } -WRITE8_MEMBER(galaxian_state::sfx_sample_control_w) +void galaxian_state::sfx_sample_control_w(uint8_t data) { uint8_t old = m_sfx_sample_control; m_sfx_sample_control = data; @@ -1030,7 +1030,7 @@ void galaxian_state::monsterz_set_latch() } -WRITE8_MEMBER(galaxian_state::monsterz_porta_1_w) +void galaxian_state::monsterz_porta_1_w(uint8_t data) { // d7 high: set latch + advance address high bits (and reset low bits?) if (data & 0x80) @@ -1040,7 +1040,7 @@ WRITE8_MEMBER(galaxian_state::monsterz_porta_1_w) } } -WRITE8_MEMBER(galaxian_state::monsterz_portb_1_w) +void galaxian_state::monsterz_portb_1_w(uint8_t data) { // d3 high: set latch + advance address low bits if (data & 0x08) @@ -1050,7 +1050,7 @@ WRITE8_MEMBER(galaxian_state::monsterz_portb_1_w) } } -WRITE8_MEMBER(galaxian_state::monsterz_portc_1_w) +void galaxian_state::monsterz_portc_1_w(uint8_t data) { } @@ -1098,10 +1098,10 @@ WRITE8_MEMBER(galaxian_state::frogger_ay8910_w) } -READ8_MEMBER(galaxian_state::frogger_sound_timer_r) +uint8_t galaxian_state::frogger_sound_timer_r() { /* same as regular Konami sound but with bits 3,5 swapped */ - uint8_t konami_value = konami_sound_timer_r(space, 0); + uint8_t konami_value = konami_sound_timer_r(); return bitswap<8>(konami_value, 7,6,3,4,5,2,1,0); } @@ -1186,7 +1186,7 @@ WRITE8_MEMBER(galaxian_state::scorpion_ay8910_w) } -READ8_MEMBER(galaxian_state::scorpion_protection_r) +uint8_t galaxian_state::scorpion_protection_r() { uint16_t paritybits; uint8_t parity = 0; @@ -1201,7 +1201,7 @@ READ8_MEMBER(galaxian_state::scorpion_protection_r) } -WRITE8_MEMBER(galaxian_state::scorpion_protection_w) +void galaxian_state::scorpion_protection_w(uint8_t data) { /* bit 5 low is a reset */ if (!(data & 0x20)) @@ -1211,7 +1211,7 @@ WRITE8_MEMBER(galaxian_state::scorpion_protection_w) if (!(data & 0x10)) { /* each clock shifts left one bit and ORs in the inverse of the parity */ - m_protection_state = (m_protection_state << 1) | (~scorpion_protection_r(space, 0) & 1); + m_protection_state = (m_protection_state << 1) | (~scorpion_protection_r() & 1); } } @@ -1220,7 +1220,7 @@ READ8_MEMBER(galaxian_state::scorpion_digitalker_intr_r) return m_digitalker->digitalker_0_intr_r(); } -WRITE8_MEMBER(galaxian_state::scorpion_digitalker_control_w) +void galaxian_state::scorpion_digitalker_control_w(uint8_t data) { m_digitalker->digitalker_0_cs_w(data & 1 ? ASSERT_LINE : CLEAR_LINE); m_digitalker->digitalker_0_cms_w(data & 2 ? ASSERT_LINE : CLEAR_LINE); @@ -1486,7 +1486,7 @@ READ8_MEMBER(galaxian_state::dingoe_3001_r) * *************************************/ -WRITE8_MEMBER(galaxian_state::moonwar_port_select_w) +void galaxian_state::moonwar_port_select_w(uint8_t data) { m_moonwar_port_select = data & 0x10; } diff --git a/src/mame/drivers/gameplan.cpp b/src/mame/drivers/gameplan.cpp index 8e63b24593b..fbb59b0cd2b 100644 --- a/src/mame/drivers/gameplan.cpp +++ b/src/mame/drivers/gameplan.cpp @@ -91,7 +91,7 @@ TODO: * *************************************/ -WRITE8_MEMBER(gameplan_state::io_select_w) +void gameplan_state::io_select_w(uint8_t data) { switch (data) { @@ -105,7 +105,7 @@ WRITE8_MEMBER(gameplan_state::io_select_w) } -READ8_MEMBER(gameplan_state::io_port_r) +uint8_t gameplan_state::io_port_r() { static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "DSW0", "DSW1" }; @@ -138,7 +138,7 @@ WRITE_LINE_MEMBER(gameplan_state::audio_reset_w) } -WRITE8_MEMBER(gameplan_state::audio_cmd_w) +void gameplan_state::audio_cmd_w(uint8_t data) { m_riot->porta_in_set(data, 0x7f); } @@ -165,11 +165,6 @@ WRITE_LINE_MEMBER(gameplan_state::r6532_irq) } -WRITE8_MEMBER(gameplan_state::r6532_soundlatch_w) -{ - m_soundlatch->write(data); -} - /************************************* * @@ -967,7 +962,7 @@ void gameplan_state::gameplan(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &gameplan_state::gameplan_audio_map); RIOT6532(config, m_riot, GAMEPLAN_AUDIO_CPU_CLOCK); - m_riot->out_pb_callback().set(FUNC(gameplan_state::r6532_soundlatch_w)); + m_riot->out_pb_callback().set(m_soundlatch, FUNC(generic_latch_8_device::write)); m_riot->irq_callback().set(FUNC(gameplan_state::r6532_irq)); /* video hardware */ diff --git a/src/mame/drivers/gaplus.cpp b/src/mame/drivers/gaplus.cpp index 8c0630c1db3..3188074a7e9 100644 --- a/src/mame/drivers/gaplus.cpp +++ b/src/mame/drivers/gaplus.cpp @@ -484,7 +484,7 @@ static const char *const gaplus_sample_names[] = ***************************************************************************/ -WRITE8_MEMBER(gaplus_state::out_lamps0) +void gaplus_state::out_lamps0(uint8_t data) { m_lamps[0] = BIT(data, 0); m_lamps[1] = BIT(data, 1); @@ -492,7 +492,7 @@ WRITE8_MEMBER(gaplus_state::out_lamps0) machine().bookkeeping().coin_counter_w(0, ~data & 8); } -WRITE8_MEMBER(gaplus_state::out_lamps1) +void gaplus_state::out_lamps1(uint8_t data) { machine().bookkeeping().coin_counter_w(1, ~data & 1); } diff --git a/src/mame/drivers/gatron.cpp b/src/mame/drivers/gatron.cpp index 78c4691b1c3..ac428dd0e67 100644 --- a/src/mame/drivers/gatron.cpp +++ b/src/mame/drivers/gatron.cpp @@ -345,7 +345,7 @@ * Read/Write Handlers * ****************************/ -WRITE8_MEMBER(gatron_state::output_port_0_w) +void gatron_state::output_port_0_w(uint8_t data) { /*--------------- Poker 4-1 lamps @@ -422,7 +422,7 @@ WRITE8_MEMBER(gatron_state::output_port_0_w) } -WRITE8_MEMBER(gatron_state::output_port_1_w) +void gatron_state::output_port_1_w(uint8_t data) { /*---------------- Lamps & Counters diff --git a/src/mame/drivers/gmaster.cpp b/src/mame/drivers/gmaster.cpp index 578c4373e6d..76e5f116817 100644 --- a/src/mame/drivers/gmaster.cpp +++ b/src/mame/drivers/gmaster.cpp @@ -34,17 +34,17 @@ public: private: void gmaster_palette(palette_device &palette) const; - DECLARE_READ8_MEMBER(gmaster_io_r); - DECLARE_WRITE8_MEMBER(gmaster_io_w); - DECLARE_READ8_MEMBER(gmaster_portb_r); - DECLARE_READ8_MEMBER(gmaster_portc_r); - DECLARE_READ8_MEMBER(gmaster_portd_r); - DECLARE_READ8_MEMBER(gmaster_portf_r); - DECLARE_WRITE8_MEMBER(gmaster_porta_w); - DECLARE_WRITE8_MEMBER(gmaster_portb_w); - DECLARE_WRITE8_MEMBER(gmaster_portc_w); - DECLARE_WRITE8_MEMBER(gmaster_portd_w); - DECLARE_WRITE8_MEMBER(gmaster_portf_w); + uint8_t gmaster_io_r(offs_t offset); + void gmaster_io_w(offs_t offset, uint8_t data); + uint8_t gmaster_portb_r(); + uint8_t gmaster_portc_r(); + uint8_t gmaster_portd_r(); + uint8_t gmaster_portf_r(); + void gmaster_porta_w(uint8_t data); + void gmaster_portb_w(uint8_t data); + void gmaster_portc_w(uint8_t data); + void gmaster_portd_w(uint8_t data); + void gmaster_portf_w(uint8_t data); uint32_t screen_update_gmaster(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void gmaster_mem(address_map &map); @@ -68,7 +68,7 @@ private: }; -READ8_MEMBER(gmaster_state::gmaster_io_r) +uint8_t gmaster_state::gmaster_io_r(offs_t offset) { uint8_t data = 0; @@ -101,7 +101,7 @@ READ8_MEMBER(gmaster_state::gmaster_io_r) #define BLITTER_Y ((m_ports[2]&4)|(m_video.data[0]&3)) -WRITE8_MEMBER(gmaster_state::gmaster_io_w) +void gmaster_state::gmaster_io_w(offs_t offset, uint8_t data) { if (m_ports[2] & 1) { @@ -164,7 +164,7 @@ WRITE8_MEMBER(gmaster_state::gmaster_io_w) } -READ8_MEMBER(gmaster_state::gmaster_portb_r) +uint8_t gmaster_state::gmaster_portb_r() { // uint8_t data = m_ports[1]; uint8_t data = 0xff; @@ -174,7 +174,7 @@ READ8_MEMBER(gmaster_state::gmaster_portb_r) return data; } -READ8_MEMBER(gmaster_state::gmaster_portc_r) +uint8_t gmaster_state::gmaster_portc_r() { // uint8_t data = m_ports[2]; uint8_t data = 0xff; @@ -184,7 +184,7 @@ READ8_MEMBER(gmaster_state::gmaster_portc_r) return data; } -READ8_MEMBER(gmaster_state::gmaster_portd_r) +uint8_t gmaster_state::gmaster_portd_r() { // uint8_t data = m_ports[3]; uint8_t data = 0xff; @@ -194,7 +194,7 @@ READ8_MEMBER(gmaster_state::gmaster_portd_r) return data; } -READ8_MEMBER(gmaster_state::gmaster_portf_r) +uint8_t gmaster_state::gmaster_portf_r() { // uint8_t data = m_ports[4]; uint8_t data = 0xff; @@ -205,19 +205,19 @@ READ8_MEMBER(gmaster_state::gmaster_portf_r) } -WRITE8_MEMBER(gmaster_state::gmaster_porta_w) +void gmaster_state::gmaster_porta_w(uint8_t data) { m_ports[0] = data; logerror("%.4x port A written %.2x\n", m_maincpu->pc(), data); } -WRITE8_MEMBER(gmaster_state::gmaster_portb_w) +void gmaster_state::gmaster_portb_w(uint8_t data) { m_ports[1] = data; logerror("%.4x port B written %.2x\n", m_maincpu->pc(), data); } -WRITE8_MEMBER(gmaster_state::gmaster_portc_w) +void gmaster_state::gmaster_portc_w(uint8_t data) { m_ports[2] = data; logerror("%.4x port C written %.2x\n", m_maincpu->pc(), data); @@ -226,13 +226,13 @@ WRITE8_MEMBER(gmaster_state::gmaster_portc_w) m_speaker->level_w(BIT(data, 4)); } -WRITE8_MEMBER(gmaster_state::gmaster_portd_w) +void gmaster_state::gmaster_portd_w(uint8_t data) { m_ports[3] = data; logerror("%.4x port D written %.2x\n", m_maincpu->pc(), data); } -WRITE8_MEMBER(gmaster_state::gmaster_portf_w) +void gmaster_state::gmaster_portf_w(uint8_t data) { m_ports[4] = data; logerror("%.4x port F written %.2x\n", m_maincpu->pc(), data); diff --git a/src/mame/drivers/goldart.cpp b/src/mame/drivers/goldart.cpp index cd2387a53f0..b7d4601ee19 100644 --- a/src/mame/drivers/goldart.cpp +++ b/src/mame/drivers/goldart.cpp @@ -70,8 +70,8 @@ private: required_device m_palette; required_region_ptr m_data; - DECLARE_WRITE8_MEMBER(mcu_port1_w); - DECLARE_READ8_MEMBER(mcu_port1_r); + void mcu_port1_w(uint8_t data); + uint8_t mcu_port1_r(); uint32_t screen_update_goldart(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect); @@ -87,13 +87,13 @@ private: DECLARE_WRITE8_MEMBER(hostmem_w); }; -WRITE8_MEMBER(goldart_state::mcu_port1_w) +void goldart_state::mcu_port1_w(uint8_t data) { logerror("%s: mcu_port1_w %02x\n", machine().describe_context(), data); m_port1 = data; } -READ8_MEMBER(goldart_state::mcu_port1_r) +uint8_t goldart_state::mcu_port1_r() { uint8_t ret = m_port1; logerror("%s: mcu_port1_r %02x\n", machine().describe_context(), ret); diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp index 19c29292fbd..300d8b799f0 100644 --- a/src/mame/drivers/goldstar.cpp +++ b/src/mame/drivers/goldstar.cpp @@ -1106,7 +1106,7 @@ WRITE8_MEMBER(wingco_state::magodds_outb860_w) // popmessage("magodds_outb860_w %02x\n", data); } -WRITE8_MEMBER(wingco_state::fl7w4_outc802_w) +void wingco_state::fl7w4_outc802_w(uint8_t data) { m_fl7w4_id->write((data >> 6) & 0x01); } @@ -8509,19 +8509,19 @@ static GFXDECODE_START( gfx_cm97 ) GFXDECODE_END -WRITE8_MEMBER(wingco_state::system_outputa_w) +void wingco_state::system_outputa_w(uint8_t data) { //popmessage("system_outputa_w %02x",data); } -WRITE8_MEMBER(wingco_state::system_outputb_w) +void wingco_state::system_outputb_w(uint8_t data) { //popmessage("system_outputb_w %02x",data); } -WRITE8_MEMBER(wingco_state::system_outputc_w) +void wingco_state::system_outputc_w(uint8_t data) { m_nmi_enable = data & 8; m_vidreg = data & 2; @@ -8531,12 +8531,12 @@ WRITE8_MEMBER(wingco_state::system_outputc_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -WRITE8_MEMBER(goldstar_state::ay8910_outputa_w) +void goldstar_state::ay8910_outputa_w(uint8_t data) { //popmessage("ay8910_outputa_w %02x",data); } -WRITE8_MEMBER(goldstar_state::ay8910_outputb_w) +void goldstar_state::ay8910_outputb_w(uint8_t data) { //popmessage("ay8910_outputb_w %02x",data); } diff --git a/src/mame/drivers/gradius3.cpp b/src/mame/drivers/gradius3.cpp index 06aacaae97e..33a3aef3e68 100644 --- a/src/mame/drivers/gradius3.cpp +++ b/src/mame/drivers/gradius3.cpp @@ -233,7 +233,7 @@ static INPUT_PORTS_START( gradius3 ) INPUT_PORTS_END -WRITE8_MEMBER(gradius3_state::volume_callback) +void gradius3_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data >> 4) * 0x11, 0); m_k007232->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp index 76cafe36e3d..20feb659669 100644 --- a/src/mame/drivers/guab.cpp +++ b/src/mame/drivers/guab.cpp @@ -98,17 +98,17 @@ private: DECLARE_READ16_MEMBER(tms34061_r); uint32_t screen_update_guab(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(output1_w); - DECLARE_WRITE8_MEMBER(output2_w); - DECLARE_WRITE8_MEMBER(output3_w); - DECLARE_WRITE8_MEMBER(output4_w); - DECLARE_WRITE8_MEMBER(output5_w); - DECLARE_WRITE8_MEMBER(output6_w); - DECLARE_READ8_MEMBER(sn76489_ready_r); - DECLARE_WRITE8_MEMBER(sn76489_buffer_w); - DECLARE_WRITE8_MEMBER(system_w); - DECLARE_READ8_MEMBER(watchdog_r); - DECLARE_WRITE8_MEMBER(watchdog_w); + void output1_w(uint8_t data); + void output2_w(uint8_t data); + void output3_w(uint8_t data); + void output4_w(uint8_t data); + void output5_w(uint8_t data); + void output6_w(uint8_t data); + uint8_t sn76489_ready_r(); + void sn76489_buffer_w(uint8_t data); + void system_w(uint8_t data); + uint8_t watchdog_r(); + void watchdog_w(uint8_t data); DECLARE_FLOPPY_FORMATS(floppy_formats); @@ -313,20 +313,20 @@ void guab_state::machine_start() m_fdc->set_floppy(m_floppy->get_device()); } -READ8_MEMBER( guab_state::watchdog_r ) +uint8_t guab_state::watchdog_r() { // only read after writing the sequence below return 0xff; } -WRITE8_MEMBER( guab_state::watchdog_w ) +void guab_state::watchdog_w(uint8_t data) { // watchdog? // writes b 3 1 5 d a 2 0 4 0 8 b 3 1 5 d a 2 0 4 0 8 // then later toggles between 0 and f } -WRITE8_MEMBER( guab_state::system_w ) +void guab_state::system_w(uint8_t data) { // bit 0, sound latch if (m_sound_latch != bool(BIT(data, 0))) @@ -363,7 +363,7 @@ INPUT_CHANGED_MEMBER( guab_state::coin_inserted ) } } -WRITE8_MEMBER( guab_state::output1_w ) +void guab_state::output1_w(uint8_t data) { m_leds[0] = BIT(data, 0); // cash in (ten up: cash in) m_leds[1] = BIT(data, 1); // cash out (ten up: cash out) @@ -375,7 +375,7 @@ WRITE8_MEMBER( guab_state::output1_w ) m_leds[7] = BIT(data, 7); } -WRITE8_MEMBER( guab_state::output2_w ) +void guab_state::output2_w(uint8_t data) { m_leds[8] = BIT(data, 0); m_leds[9] = BIT(data, 1); @@ -387,7 +387,7 @@ WRITE8_MEMBER( guab_state::output2_w ) m_leds[15] = BIT(data, 7); // lamp b (ten up: pass) } -WRITE8_MEMBER( guab_state::output3_w ) +void guab_state::output3_w(uint8_t data) { m_leds[16] = BIT(data, 0); // select (ten up: collect) m_leds[17] = BIT(data, 1); // (ten up: feature 14) @@ -399,7 +399,7 @@ WRITE8_MEMBER( guab_state::output3_w ) m_leds[23] = BIT(data, 7); } -WRITE8_MEMBER( guab_state::output4_w ) +void guab_state::output4_w(uint8_t data) { m_leds[24] = BIT(data, 0); // feature 1 (ten up: feature 1) m_leds[25] = BIT(data, 1); // feature 2 (ten up: feature 10) @@ -411,7 +411,7 @@ WRITE8_MEMBER( guab_state::output4_w ) m_leds[31] = BIT(data, 7); // feature 8 (ten up: feature 5) } -WRITE8_MEMBER( guab_state::output5_w ) +void guab_state::output5_w(uint8_t data) { m_leds[32] = BIT(data, 0); m_leds[33] = BIT(data, 1); @@ -423,7 +423,7 @@ WRITE8_MEMBER( guab_state::output5_w ) m_leds[39] = BIT(data, 7); // mech lamp (ten up: mech lamp) } -WRITE8_MEMBER( guab_state::output6_w ) +void guab_state::output6_w(uint8_t data) { m_leds[40] = BIT(data, 0); m_leds[41] = BIT(data, 1); @@ -449,13 +449,13 @@ DEVICE_INPUT_DEFAULTS_END // AUDIO //************************************************************************** -READ8_MEMBER( guab_state::sn76489_ready_r ) +uint8_t guab_state::sn76489_ready_r() { // bit 7 connected to sn76489 ready output (0 = ready) return ~(m_sn->ready_r() << 7); } -WRITE8_MEMBER( guab_state::sn76489_buffer_w ) +void guab_state::sn76489_buffer_w(uint8_t data) { m_sound_buffer = data; } diff --git a/src/mame/drivers/gyruss.cpp b/src/mame/drivers/gyruss.cpp index 198a7707af5..473281d7ed0 100644 --- a/src/mame/drivers/gyruss.cpp +++ b/src/mame/drivers/gyruss.cpp @@ -111,23 +111,23 @@ static const int gyruss_timer[10] = 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x0a, 0x0b, 0x0a, 0x0d }; -READ8_MEMBER(gyruss_state::gyruss_portA_r) +uint8_t gyruss_state::gyruss_portA_r() { return gyruss_timer[(m_audiocpu->total_cycles() / 1024) % 10]; } -WRITE8_MEMBER(gyruss_state::gyruss_dac_w) +void gyruss_state::gyruss_dac_w(uint8_t data) { m_discrete->write(NODE(16), data); } -WRITE8_MEMBER(gyruss_state::gyruss_irq_clear_w) +void gyruss_state::gyruss_irq_clear_w(uint8_t data) { m_audiocpu_2->set_input_line(0, CLEAR_LINE); } -void gyruss_state::filter_w(address_space &space, int chip, int data ) +void gyruss_state::filter_w(int chip, int data ) { //printf("chip %d - %02x\n", chip, data); for (int i = 0; i < 3; i++) @@ -139,24 +139,24 @@ void gyruss_state::filter_w(address_space &space, int chip, int data ) } } -WRITE8_MEMBER(gyruss_state::gyruss_filter0_w) +void gyruss_state::gyruss_filter0_w(uint8_t data) { - filter_w(space, 0, data); + filter_w(0, data); } -WRITE8_MEMBER(gyruss_state::gyruss_filter1_w) +void gyruss_state::gyruss_filter1_w(uint8_t data) { - filter_w(space, 1, data); + filter_w(1, data); } -WRITE8_MEMBER(gyruss_state::gyruss_sh_irqtrigger_w) +void gyruss_state::gyruss_sh_irqtrigger_w(uint8_t data) { /* writing to this register triggers IRQ on the sound CPU */ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 } -WRITE8_MEMBER(gyruss_state::gyruss_i8039_irq_w) +void gyruss_state::gyruss_i8039_irq_w(uint8_t data) { m_audiocpu_2->set_input_line(0, ASSERT_LINE); } @@ -168,7 +168,7 @@ WRITE_LINE_MEMBER(gyruss_state::master_nmi_mask_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -WRITE8_MEMBER(gyruss_state::slave_irq_mask_w) +void gyruss_state::slave_irq_mask_w(uint8_t data) { m_slave_irq_mask = data & 1; if (!m_slave_irq_mask) diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp index 3798c8fc3c4..61224c0f22d 100644 --- a/src/mame/drivers/h8.cpp +++ b/src/mame/drivers/h8.cpp @@ -78,7 +78,7 @@ private: DECLARE_READ8_MEMBER(portf0_r); DECLARE_WRITE8_MEMBER(portf0_w); DECLARE_WRITE8_MEMBER(portf1_w); - DECLARE_WRITE8_MEMBER(h8_status_callback); + void h8_status_callback(uint8_t data); DECLARE_WRITE_LINE_MEMBER(h8_inte_callback); TIMER_DEVICE_CALLBACK_MEMBER(h8_irq_pulse); TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); @@ -258,7 +258,7 @@ WRITE_LINE_MEMBER( h8_state::h8_inte_callback ) m_irq_ctl &= 0x7f | ((state) ? 0 : 0x80); } -WRITE8_MEMBER( h8_state::h8_status_callback ) +void h8_state::h8_status_callback(uint8_t data) { /* This is rather messy, but basically there are 2 D flipflops, one drives the other, the data is /INTE while the clock is /M1. If the system is in Single Instruction mode, diff --git a/src/mame/drivers/hcastle.cpp b/src/mame/drivers/hcastle.cpp index 65097d75925..a0f37eefb02 100644 --- a/src/mame/drivers/hcastle.cpp +++ b/src/mame/drivers/hcastle.cpp @@ -158,7 +158,7 @@ GFXDECODE_END /*****************************************************************************/ -WRITE8_MEMBER(hcastle_state::volume_callback) +void hcastle_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data >> 4) * 0x11, 0); m_k007232->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/hexion.cpp b/src/mame/drivers/hexion.cpp index fa5c8bc14cf..cc0d76738e6 100644 --- a/src/mame/drivers/hexion.cpp +++ b/src/mame/drivers/hexion.cpp @@ -115,7 +115,7 @@ WRITE_LINE_MEMBER(hexion_state::nmi_ack_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -WRITE8_MEMBER(hexion_state::ccu_int_time_w) +void hexion_state::ccu_int_time_w(uint8_t data) { logerror("ccu_int_time rewritten with value of %02x\n", data); m_ccu_int_time = data; diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index def4ce9a854..db020140c25 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -271,15 +271,15 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u8 input_r(); void bambball(machine_config &config); }; // handlers -WRITE8_MEMBER(bambball_state::plate_w) +void bambball_state::plate_w(offs_t offset, u8 data) { // R1x-R3x(,D0-D3): vfd plate int shift = (offset - 1) * 4; @@ -290,7 +290,7 @@ WRITE8_MEMBER(bambball_state::plate_w) m_display->matrix(m_grid, plate); } -WRITE16_MEMBER(bambball_state::grid_w) +void bambball_state::grid_w(u16 data) { // D4: speaker out m_speaker->level_w(data >> 4 & 1); @@ -302,10 +302,10 @@ WRITE16_MEMBER(bambball_state::grid_w) m_grid = data >> 7 & 0x1ff; // D0-D3: more plates (update display there) - plate_w(space, 3 + 1, data & 0xf); + plate_w(3 + 1, data & 0xf); } -READ8_MEMBER(bambball_state::input_r) +u8 bambball_state::input_r() { // R0x: multiplexed inputs return read_inputs(4); @@ -396,9 +396,9 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u8 input_r(); void bmboxing(machine_config &config); }; @@ -411,7 +411,7 @@ void bmboxing_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(bmboxing_state::plate_w) +void bmboxing_state::plate_w(offs_t offset, u8 data) { // R1x-R3x: vfd plate int shift = (offset - 1) * 4; @@ -419,7 +419,7 @@ WRITE8_MEMBER(bmboxing_state::plate_w) update_display(); } -WRITE16_MEMBER(bmboxing_state::grid_w) +void bmboxing_state::grid_w(u16 data) { // D13: speaker out m_speaker->level_w(data >> 13 & 1); @@ -432,7 +432,7 @@ WRITE16_MEMBER(bmboxing_state::grid_w) update_display(); } -READ8_MEMBER(bmboxing_state::input_r) +u8 bmboxing_state::input_r() { // R0x: multiplexed inputs return read_inputs(4); @@ -543,8 +543,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int1(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); } @@ -560,7 +560,7 @@ void bfriskyt_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(bfriskyt_state::plate_w) +void bfriskyt_state::plate_w(offs_t offset, u8 data) { // R0x-R3x: vfd plate int shift = offset * 4; @@ -568,7 +568,7 @@ WRITE8_MEMBER(bfriskyt_state::plate_w) update_display(); } -WRITE16_MEMBER(bfriskyt_state::grid_w) +void bfriskyt_state::grid_w(u16 data) { // D6: speaker out m_speaker->level_w(data >> 6 & 1); @@ -677,15 +677,15 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ16_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u16 input_r(); void packmon(machine_config &config); }; // handlers -WRITE8_MEMBER(packmon_state::plate_w) +void packmon_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D0-D3): vfd plate int shift = offset * 4; @@ -697,7 +697,7 @@ WRITE8_MEMBER(packmon_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(packmon_state::grid_w) +void packmon_state::grid_w(u16 data) { // D4: speaker out m_speaker->level_w(data >> 4 & 1); @@ -709,10 +709,10 @@ WRITE16_MEMBER(packmon_state::grid_w) m_grid = data >> 6 & 0x3ff; // D0-D3: plate 9-12 (update display there) - plate_w(space, 4, data & 0xf); + plate_w(4, data & 0xf); } -READ16_MEMBER(packmon_state::input_r) +u16 packmon_state::input_r() { // D5: multiplexed inputs return read_inputs(5) & 0x20; @@ -794,8 +794,8 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int1(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); } @@ -804,7 +804,7 @@ public: // handlers -WRITE8_MEMBER(bzaxxon_state::plate_w) +void bzaxxon_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D0-D2): vfd plate int shift = offset * 4; @@ -816,7 +816,7 @@ WRITE8_MEMBER(bzaxxon_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(bzaxxon_state::grid_w) +void bzaxxon_state::grid_w(u16 data) { // D4: speaker out m_speaker->level_w(data >> 4 & 1); @@ -833,7 +833,7 @@ WRITE16_MEMBER(bzaxxon_state::grid_w) m_grid = data >> 5 & 0x7ff; // D0-D2: plate 7-9 (update display there) - plate_w(space, 4, data & 7); + plate_w(4, data & 7); } void bzaxxon_state::update_int1() @@ -919,8 +919,8 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int0(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); } @@ -929,7 +929,7 @@ public: // handlers -WRITE8_MEMBER(zackman_state::plate_w) +void zackman_state::plate_w(offs_t offset, u8 data) { // R0x-R6x(,D0,D1): vfd plate int shift = offset * 4; @@ -941,7 +941,7 @@ WRITE8_MEMBER(zackman_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(zackman_state::grid_w) +void zackman_state::grid_w(u16 data) { // D2: speaker out m_speaker->level_w(data >> 2 & 1); @@ -958,7 +958,7 @@ WRITE16_MEMBER(zackman_state::grid_w) m_grid = data >> 8 & 0xff; // D0,D1: plate 12,13 (update display there) - plate_w(space, 7, data & 3); + plate_w(7, data & 3); } void zackman_state::update_int0() @@ -1044,8 +1044,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int0(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); } @@ -1061,7 +1061,7 @@ void bpengo_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(bpengo_state::plate_w) +void bpengo_state::plate_w(offs_t offset, u8 data) { // R0x-R6x: vfd plate int shift = offset * 4; @@ -1069,7 +1069,7 @@ WRITE8_MEMBER(bpengo_state::plate_w) update_display(); } -WRITE16_MEMBER(bpengo_state::grid_w) +void bpengo_state::grid_w(u16 data) { // D10: speaker out m_speaker->level_w(data >> 10 & 1); @@ -1177,8 +1177,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int0(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); } @@ -1194,7 +1194,7 @@ void bbtime_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(bbtime_state::plate_w) +void bbtime_state::plate_w(offs_t offset, u8 data) { // R0x-R6x: vfd plate int shift = offset * 4; @@ -1202,7 +1202,7 @@ WRITE8_MEMBER(bbtime_state::plate_w) update_display(); } -WRITE16_MEMBER(bbtime_state::grid_w) +void bbtime_state::grid_w(u16 data) { // D3: speaker out m_speaker->level_w(data >> 3 & 1); @@ -1305,14 +1305,14 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void bdoramon(machine_config &config); }; // handlers -WRITE8_MEMBER(bdoramon_state::plate_w) +void bdoramon_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D0-D3): vfd plate int shift = offset * 4; @@ -1324,7 +1324,7 @@ WRITE8_MEMBER(bdoramon_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(bdoramon_state::grid_w) +void bdoramon_state::grid_w(u16 data) { // D7: speaker out m_speaker->level_w(data >> 7 & 1); @@ -1333,7 +1333,7 @@ WRITE16_MEMBER(bdoramon_state::grid_w) m_grid = data >> 8 & 0xff; // D0-D3: plate 15-18 (update display there) - plate_w(space, 4, data & 0xf); + plate_w(4, data & 0xf); } // config @@ -1414,14 +1414,14 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void bultrman(machine_config &config); }; // handlers -WRITE8_MEMBER(bultrman_state::plate_w) +void bultrman_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D0-D2): vfd plate int shift = offset * 4; @@ -1433,7 +1433,7 @@ WRITE8_MEMBER(bultrman_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(bultrman_state::grid_w) +void bultrman_state::grid_w(u16 data) { // D7: speaker out m_speaker->level_w(data >> 7 & 1); @@ -1442,7 +1442,7 @@ WRITE16_MEMBER(bultrman_state::grid_w) m_grid = data >> 8 & 0xff; // D0-D2: plate 15-17 (update display there) - plate_w(space, 4, data & 7); + plate_w(4, data & 7); } // config @@ -1516,8 +1516,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void machiman(machine_config &config); }; @@ -1529,7 +1529,7 @@ void machiman_state::update_display() m_display->matrix(m_grid, plate); } -WRITE8_MEMBER(machiman_state::plate_w) +void machiman_state::plate_w(offs_t offset, u8 data) { // R0x-R3x,R6012: vfd plate int shift = (offset == 6) ? 16 : offset * 4; @@ -1537,7 +1537,7 @@ WRITE8_MEMBER(machiman_state::plate_w) update_display(); } -WRITE16_MEMBER(machiman_state::grid_w) +void machiman_state::grid_w(u16 data) { // D13: speaker out m_speaker->level_w(data >> 13 & 1); @@ -1626,13 +1626,13 @@ public: required_device_array m_soundlatch; void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u8 input_r(); - DECLARE_WRITE8_MEMBER(sound_w); - DECLARE_WRITE8_MEMBER(sound2_w); - DECLARE_WRITE16_MEMBER(speaker_w); + void sound_w(u8 data); + void sound2_w(u8 data); + void speaker_w(u16 data); void pairmtch(machine_config &config); }; @@ -1643,7 +1643,7 @@ void pairmtch_state::update_display() m_display->matrix(m_grid, m_plate); } -WRITE8_MEMBER(pairmtch_state::plate_w) +void pairmtch_state::plate_w(offs_t offset, u8 data) { // R2x,R3x,R6x: vfd plate int shift = (offset == 6) ? 8 : (offset-2) * 4; @@ -1651,7 +1651,7 @@ WRITE8_MEMBER(pairmtch_state::plate_w) update_display(); } -WRITE16_MEMBER(pairmtch_state::grid_w) +void pairmtch_state::grid_w(u16 data) { // D7: sound reset (to audiocpu reset line) m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE); @@ -1667,13 +1667,13 @@ WRITE16_MEMBER(pairmtch_state::grid_w) update_display(); } -READ8_MEMBER(pairmtch_state::input_r) +u8 pairmtch_state::input_r() { // R4x: multiplexed inputs return read_inputs(2); } -WRITE8_MEMBER(pairmtch_state::sound_w) +void pairmtch_state::sound_w(u8 data) { // R5x: soundlatch (to audiocpu R2x) m_soundlatch[0]->write(bitswap<8>(data,7,6,5,4,0,1,2,3)); @@ -1681,13 +1681,13 @@ WRITE8_MEMBER(pairmtch_state::sound_w) // handlers: audiocpu side -WRITE8_MEMBER(pairmtch_state::sound2_w) +void pairmtch_state::sound2_w(u8 data) { // R2x: soundlatch (to maincpu R5x) m_soundlatch[1]->write(bitswap<8>(data,7,6,5,4,0,1,2,3)); } -WRITE16_MEMBER(pairmtch_state::speaker_w) +void pairmtch_state::speaker_w(u16 data) { // D0: speaker out m_speaker->level_w(data & 1); @@ -1793,15 +1793,15 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ16_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u16 input_r(); void alnattck(machine_config &config); }; // handlers -WRITE8_MEMBER(alnattck_state::plate_w) +void alnattck_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D0-D3): vfd plate int shift = offset * 4; @@ -1812,7 +1812,7 @@ WRITE8_MEMBER(alnattck_state::plate_w) m_display->matrix(m_grid, plate); } -WRITE16_MEMBER(alnattck_state::grid_w) +void alnattck_state::grid_w(u16 data) { // D4: speaker out m_speaker->level_w(data >> 4 & 1); @@ -1824,10 +1824,10 @@ WRITE16_MEMBER(alnattck_state::grid_w) m_grid = data >> 6 & 0x3ff; // D0-D3: plate 16-19 (update display there) - plate_w(space, 4, data & 0xf); + plate_w(4, data & 0xf); } -READ16_MEMBER(alnattck_state::input_r) +u16 alnattck_state::input_r() { // D5: multiplexed inputs return read_inputs(7) & 0x20; @@ -1917,8 +1917,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void speaker_update(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); @@ -1962,7 +1962,7 @@ void cdkong_state::update_display() m_display->matrix(m_grid, plate); } -WRITE8_MEMBER(cdkong_state::plate_w) +void cdkong_state::plate_w(offs_t offset, u8 data) { // R13: speaker on m_r[offset] = data; @@ -1974,7 +1974,7 @@ WRITE8_MEMBER(cdkong_state::plate_w) update_display(); } -WRITE16_MEMBER(cdkong_state::grid_w) +void cdkong_state::grid_w(u16 data) { // D3: speaker out m_d = data; @@ -2073,9 +2073,9 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(grid_w); - DECLARE_WRITE16_MEMBER(plate_w); - DECLARE_READ8_MEMBER(input_r); + void grid_w(offs_t offset, u8 data); + void plate_w(u16 data); + u8 input_r(); DECLARE_INPUT_CHANGED_MEMBER(player_switch); void cgalaxn(machine_config &config); @@ -2097,7 +2097,7 @@ INPUT_CHANGED_MEMBER(cgalaxn_state::player_switch) update_display(); } -WRITE8_MEMBER(cgalaxn_state::grid_w) +void cgalaxn_state::grid_w(offs_t offset, u8 data) { // R10,R11: input mux if (offset == 1) @@ -2109,7 +2109,7 @@ WRITE8_MEMBER(cgalaxn_state::grid_w) update_display(); } -WRITE16_MEMBER(cgalaxn_state::plate_w) +void cgalaxn_state::plate_w(u16 data) { // D0: speaker out m_speaker->level_w(data & 1); @@ -2121,7 +2121,7 @@ WRITE16_MEMBER(cgalaxn_state::plate_w) update_display(); } -READ8_MEMBER(cgalaxn_state::input_r) +u8 cgalaxn_state::input_r() { // R0x: multiplexed inputs return read_inputs(2); @@ -2215,15 +2215,15 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u8 input_r(); void cpacman(machine_config &config); }; // handlers -WRITE8_MEMBER(cpacman_state::plate_w) +void cpacman_state::plate_w(offs_t offset, u8 data) { // R1x-R6x(,D1,D2): vfd plate int shift = (offset - 1) * 4; @@ -2235,7 +2235,7 @@ WRITE8_MEMBER(cpacman_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(cpacman_state::grid_w) +void cpacman_state::grid_w(u16 data) { // D0: speaker out m_speaker->level_w(data & 1); @@ -2247,10 +2247,10 @@ WRITE16_MEMBER(cpacman_state::grid_w) m_grid = data >> 5 & 0x7ff; // D1,D2: plate 8,14 (update display there) - plate_w(space, 6 + 1, data >> 1 & 3); + plate_w(6 + 1, data >> 1 & 3); } -READ8_MEMBER(cpacman_state::input_r) +u8 cpacman_state::input_r() { // R0x: multiplexed inputs return read_inputs(3); @@ -2351,15 +2351,15 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u8 input_r(); void cmspacmn(machine_config &config); }; // handlers -WRITE8_MEMBER(cmspacmn_state::plate_w) +void cmspacmn_state::plate_w(offs_t offset, u8 data) { // R1x-R6x(,D0,D1): vfd plate int shift = (offset - 1) * 4; @@ -2371,7 +2371,7 @@ WRITE8_MEMBER(cmspacmn_state::plate_w) m_display->matrix(grid, u64(BIT(m_plate,15)) << 32 | plate); } -WRITE16_MEMBER(cmspacmn_state::grid_w) +void cmspacmn_state::grid_w(u16 data) { // D2: speaker out m_speaker->level_w(data >> 2 & 1); @@ -2383,10 +2383,10 @@ WRITE16_MEMBER(cmspacmn_state::grid_w) m_grid = data >> 5 & 0x7ff; // D0,D1: more plates (update display there) - plate_w(space, 6 + 1, data & 3); + plate_w(6 + 1, data & 3); } -READ8_MEMBER(cmspacmn_state::input_r) +u8 cmspacmn_state::input_r() { // R0x: multiplexed inputs return read_inputs(3); @@ -2476,9 +2476,9 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u8 input_r(); void egalaxn2(machine_config &config); }; @@ -2491,7 +2491,7 @@ void egalaxn2_state::update_display() m_display->matrix(grid, plate); } -WRITE16_MEMBER(egalaxn2_state::grid_w) +void egalaxn2_state::grid_w(u16 data) { // D0: speaker out m_speaker->level_w(data & 1); @@ -2504,7 +2504,7 @@ WRITE16_MEMBER(egalaxn2_state::grid_w) update_display(); } -WRITE8_MEMBER(egalaxn2_state::plate_w) +void egalaxn2_state::plate_w(offs_t offset, u8 data) { // R1x-R6x: vfd plate int shift = (offset - 1) * 4; @@ -2512,7 +2512,7 @@ WRITE8_MEMBER(egalaxn2_state::plate_w) update_display(); } -READ8_MEMBER(egalaxn2_state::input_r) +u8 egalaxn2_state::input_r() { // R0x: multiplexed inputs return read_inputs(4); @@ -2702,9 +2702,9 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ16_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u16 input_r(); void einvader2(machine_config &config); }; @@ -2715,7 +2715,7 @@ void einvader2_state::update_display() m_display->matrix(m_grid, m_plate); } -WRITE8_MEMBER(einvader2_state::plate_w) +void einvader2_state::plate_w(offs_t offset, u8 data) { // R0x-R3x: vfd plate int shift = offset * 4; @@ -2723,7 +2723,7 @@ WRITE8_MEMBER(einvader2_state::plate_w) update_display(); } -WRITE16_MEMBER(einvader2_state::grid_w) +void einvader2_state::grid_w(u16 data) { // D0: speaker out m_speaker->level_w(data & 1); @@ -2736,7 +2736,7 @@ WRITE16_MEMBER(einvader2_state::grid_w) update_display(); } -READ16_MEMBER(einvader2_state::input_r) +u16 einvader2_state::input_r() { // D13-D15: multiplexed inputs return read_inputs(3) << 13; @@ -2827,14 +2827,14 @@ public: required_device m_audiocpu; virtual void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); u8 m_cop_irq; DECLARE_WRITE_LINE_MEMBER(speaker_w); - DECLARE_WRITE8_MEMBER(cop_irq_w); - DECLARE_READ8_MEMBER(cop_latch_r); - DECLARE_READ8_MEMBER(cop_ack_r); + void cop_irq_w(u8 data); + u8 cop_latch_r(); + u8 cop_ack_r(); void update_int(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int(); } @@ -2861,7 +2861,7 @@ void eturtles_state::update_display() m_display->matrix(grid, plate | (grid >> 5 & 8)); // grid 8 also forces plate 3 high } -WRITE8_MEMBER(eturtles_state::plate_w) +void eturtles_state::plate_w(offs_t offset, u8 data) { m_r[offset] = data; @@ -2871,7 +2871,7 @@ WRITE8_MEMBER(eturtles_state::plate_w) update_display(); } -WRITE16_MEMBER(eturtles_state::grid_w) +void eturtles_state::grid_w(u16 data) { m_d = data; @@ -2904,20 +2904,20 @@ WRITE_LINE_MEMBER(eturtles_state::speaker_w) m_speaker->level_w(!state); } -WRITE8_MEMBER(eturtles_state::cop_irq_w) +void eturtles_state::cop_irq_w(u8 data) { // D0: maincpu INT0 (active low) m_cop_irq = ~data & 1; update_int(); } -READ8_MEMBER(eturtles_state::cop_latch_r) +u8 eturtles_state::cop_latch_r() { // L0-L3: soundlatch from maincpu R0x return m_r[0]; } -READ8_MEMBER(eturtles_state::cop_ack_r) +u8 eturtles_state::cop_ack_r() { // G0: ack from maincpu D0 return m_d & 1; @@ -3026,7 +3026,7 @@ public: { } virtual void update_display() override; - DECLARE_READ8_MEMBER(cop_data_r); + u8 cop_data_r(); void estargte(machine_config &config); }; @@ -3039,7 +3039,7 @@ void estargte_state::update_display() m_display->matrix(grid, plate); } -READ8_MEMBER(estargte_state::cop_data_r) +u8 estargte_state::cop_data_r() { // L0-L3: soundlatch from maincpu R0x // L7: ack from maincpu D0 @@ -3149,15 +3149,15 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_READ16_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + u16 input_r(); void ghalien(machine_config &config); }; // handlers -WRITE8_MEMBER(ghalien_state::plate_w) +void ghalien_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D10-D13): vfd plate int shift = offset * 4; @@ -3169,7 +3169,7 @@ WRITE8_MEMBER(ghalien_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(ghalien_state::grid_w) +void ghalien_state::grid_w(u16 data) { // D14: speaker out m_speaker->level_w(data >> 14 & 1); @@ -3181,10 +3181,10 @@ WRITE16_MEMBER(ghalien_state::grid_w) m_grid = data & 0x3ff; // D10-D13: more plates (update display there) - plate_w(space, 4, data >> 10 & 0xf); + plate_w(4, data >> 10 & 0xf); } -READ16_MEMBER(ghalien_state::input_r) +u16 ghalien_state::input_r() { // D15: multiplexed inputs return read_inputs(7) & 0x8000; @@ -3276,8 +3276,8 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int1(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); } @@ -3286,7 +3286,7 @@ public: // handlers -WRITE8_MEMBER(gckong_state::plate_w) +void gckong_state::plate_w(offs_t offset, u8 data) { // R0x-R3x(,D0,D1): vfd plate int shift = offset * 4; @@ -3298,7 +3298,7 @@ WRITE8_MEMBER(gckong_state::plate_w) m_display->matrix(grid, plate); } -WRITE16_MEMBER(gckong_state::grid_w) +void gckong_state::grid_w(u16 data) { // D2: speaker out m_speaker->level_w(data >> 2 & 1); @@ -3315,7 +3315,7 @@ WRITE16_MEMBER(gckong_state::grid_w) m_grid = data >> 5 & 0x7ff; // D0,D1: more plates (update display there) - plate_w(space, 4, data & 3); + plate_w(4, data & 3); } void gckong_state::update_int1() @@ -3405,8 +3405,8 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int1(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); } @@ -3415,7 +3415,7 @@ public: // handlers -WRITE8_MEMBER(gdigdug_state::plate_w) +void gdigdug_state::plate_w(offs_t offset, u8 data) { // R0x-R6x(,D0-D3): vfd plate int shift = offset * 4; @@ -3426,7 +3426,7 @@ WRITE8_MEMBER(gdigdug_state::plate_w) m_display->matrix(m_grid, plate); } -WRITE16_MEMBER(gdigdug_state::grid_w) +void gdigdug_state::grid_w(u16 data) { // D6: speaker out m_speaker->level_w(data >> 6 & 1); @@ -3443,7 +3443,7 @@ WRITE16_MEMBER(gdigdug_state::grid_w) m_grid = data >> 7 & 0x1ff; // D0-D3: more plates (update display there) - plate_w(space, 7, data & 0xf); + plate_w(7, data & 0xf); } void gdigdug_state::update_int1() @@ -3536,10 +3536,10 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); - DECLARE_WRITE8_MEMBER(speaker_w); - DECLARE_READ8_MEMBER(input_r); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); + void speaker_w(u8 data); + u8 input_r(); void mwcbaseb(machine_config &config); }; @@ -3551,7 +3551,7 @@ void mwcbaseb_state::update_display() m_display->matrix(grid, m_plate); } -WRITE8_MEMBER(mwcbaseb_state::plate_w) +void mwcbaseb_state::plate_w(offs_t offset, u8 data) { // R1x-R3x,R6x: vfd plate int shift = (offset == 6) ? 12 : (offset - 1) * 4; @@ -3559,7 +3559,7 @@ WRITE8_MEMBER(mwcbaseb_state::plate_w) update_display(); } -WRITE16_MEMBER(mwcbaseb_state::grid_w) +void mwcbaseb_state::grid_w(u16 data) { // D9-D15: input mux m_inp_mux = data >> 9 & 0x7f; @@ -3569,13 +3569,13 @@ WRITE16_MEMBER(mwcbaseb_state::grid_w) update_display(); } -WRITE8_MEMBER(mwcbaseb_state::speaker_w) +void mwcbaseb_state::speaker_w(u8 data) { // R50,R51+R52(tied together): speaker out m_speaker->level_w(data & 7); } -READ8_MEMBER(mwcbaseb_state::input_r) +u8 mwcbaseb_state::input_r() { // R4x: multiplexed inputs return read_inputs(7); @@ -3710,8 +3710,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int0(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); } @@ -3727,7 +3727,7 @@ void msthawk_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(msthawk_state::plate_w) +void msthawk_state::plate_w(offs_t offset, u8 data) { // R0x-R3x: vfd plate int shift = offset * 4; @@ -3735,7 +3735,7 @@ WRITE8_MEMBER(msthawk_state::plate_w) update_display(); } -WRITE16_MEMBER(msthawk_state::grid_w) +void msthawk_state::grid_w(u16 data) { // D5: speaker out m_speaker->level_w(data >> 5 & 1); @@ -3842,14 +3842,14 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void pbqbert(machine_config &config); }; // handlers -WRITE8_MEMBER(pbqbert_state::plate_w) +void pbqbert_state::plate_w(offs_t offset, u8 data) { // R0x-R6x(,D8): vfd plate int shift = offset * 4; @@ -3860,7 +3860,7 @@ WRITE8_MEMBER(pbqbert_state::plate_w) m_display->matrix(m_grid, plate); } -WRITE16_MEMBER(pbqbert_state::grid_w) +void pbqbert_state::grid_w(u16 data) { // D14: speaker out m_speaker->level_w(data >> 14 & 1); @@ -3869,7 +3869,7 @@ WRITE16_MEMBER(pbqbert_state::grid_w) m_grid = data & 0xff; // D8: plate 25 (update display there) - plate_w(space, 7, data >> 8 & 1); + plate_w(7, data >> 8 & 1); } // config @@ -3942,8 +3942,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int1(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); } @@ -3959,7 +3959,7 @@ void tmtron_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(tmtron_state::plate_w) +void tmtron_state::plate_w(offs_t offset, u8 data) { // R0x-R3x: vfd plate int shift = offset * 4; @@ -3967,7 +3967,7 @@ WRITE8_MEMBER(tmtron_state::plate_w) update_display(); } -WRITE16_MEMBER(tmtron_state::grid_w) +void tmtron_state::grid_w(u16 data) { // D4: speaker out m_speaker->level_w(data >> 4 & 1); @@ -4068,8 +4068,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void update_int0(); DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); } @@ -4085,7 +4085,7 @@ void kingman_state::update_display() m_display->matrix(grid, plate); } -WRITE8_MEMBER(kingman_state::plate_w) +void kingman_state::plate_w(offs_t offset, u8 data) { // R0x-R3x: vfd plate int shift = offset * 4; @@ -4093,7 +4093,7 @@ WRITE8_MEMBER(kingman_state::plate_w) update_display(); } -WRITE16_MEMBER(kingman_state::grid_w) +void kingman_state::grid_w(u16 data) { // D6: speaker out m_speaker->level_w(data >> 6 & 1); @@ -4197,14 +4197,14 @@ public: hh_hmcs40_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(plate_w); - DECLARE_WRITE16_MEMBER(grid_w); + void plate_w(offs_t offset, u8 data); + void grid_w(u16 data); void vinvader(machine_config &config); }; // handlers -WRITE8_MEMBER(vinvader_state::plate_w) +void vinvader_state::plate_w(offs_t offset, u8 data) { // R1x-R3x(,D4-D6): vfd plate int shift = (offset - 1) * 4; @@ -4215,7 +4215,7 @@ WRITE8_MEMBER(vinvader_state::plate_w) m_display->matrix(m_grid, plate); } -WRITE16_MEMBER(vinvader_state::grid_w) +void vinvader_state::grid_w(u16 data) { // D0: speaker out m_speaker->level_w(data & 1); @@ -4224,7 +4224,7 @@ WRITE16_MEMBER(vinvader_state::grid_w) m_grid = data >> 7 & 0x1ff; // D4-D6: more plates (update display there) - plate_w(space, 3 + 1, data >> 4 & 7); + plate_w(3 + 1, data >> 4 & 7); } // config diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp index a1c763be43f..8fb36a746c4 100644 --- a/src/mame/drivers/hh_pic16.cpp +++ b/src/mame/drivers/hh_pic16.cpp @@ -204,9 +204,9 @@ public: void update_display(); void update_speaker(); - DECLARE_READ8_MEMBER(read_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + u8 read_a(); + void write_b(u8 data); + void write_c(u8 data); void touchme(machine_config &config); }; @@ -222,13 +222,13 @@ void touchme_state::update_speaker() m_speaker->level_w((m_b >> 7 & 1) | (m_c >> 6 & 2)); } -READ8_MEMBER(touchme_state::read_a) +u8 touchme_state::read_a() { // A: multiplexed inputs return read_inputs(3, 0xf); } -WRITE8_MEMBER(touchme_state::write_b) +void touchme_state::write_b(u8 data) { // B0-B2: input mux m_inp_mux = data & 7; @@ -242,7 +242,7 @@ WRITE8_MEMBER(touchme_state::write_b) update_speaker(); } -WRITE8_MEMBER(touchme_state::write_c) +void touchme_state::write_c(u8 data) { // C0-C6: digit segments m_c = data; @@ -327,8 +327,8 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + void write_b(u8 data); + void write_c(u8 data); void pabball(machine_config &config); }; @@ -345,14 +345,14 @@ void pabball_state::update_display() m_display->matrix(sel, m_b); } -WRITE8_MEMBER(pabball_state::write_b) +void pabball_state::write_b(u8 data) { // B: led data m_b = ~data; update_display(); } -WRITE8_MEMBER(pabball_state::write_c) +void pabball_state::write_c(u8 data) { // C2: RTCC pin m_maincpu->set_input_line(PIC16C5x_RTCC, data >> 2 & 1); @@ -433,27 +433,27 @@ public: hh_pic16_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_READ8_MEMBER(read_c); - DECLARE_WRITE8_MEMBER(write_c); + void write_b(u8 data); + u8 read_c(); + void write_c(u8 data); void melodym(machine_config &config); }; // handlers -WRITE8_MEMBER(melodym_state::write_b) +void melodym_state::write_b(u8 data) { // B2-B6: input mux m_inp_mux = data >> 2 & 0x1f; } -READ8_MEMBER(melodym_state::read_c) +u8 melodym_state::read_c() { // C0-C4: multiplexed inputs return read_inputs(5, 0x1f) | 0xe0; } -WRITE8_MEMBER(melodym_state::write_c) +void melodym_state::write_c(u8 data) { // C6: both lamps m_display->matrix(1, ~data >> 6 & 1); @@ -561,8 +561,8 @@ public: void update_display(); void update_speaker(); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + void write_b(u8 data); + void write_c(u8 data); void maniac(machine_config &config); }; @@ -580,7 +580,7 @@ void maniac_state::update_speaker() m_speaker->level_w((m_b >> 7 & 1) | (m_c >> 6 & 2)); } -WRITE8_MEMBER(maniac_state::write_b) +void maniac_state::write_b(u8 data) { // B0-B6: left 7seg m_b = data; @@ -590,7 +590,7 @@ WRITE8_MEMBER(maniac_state::write_b) update_speaker(); } -WRITE8_MEMBER(maniac_state::write_c) +void maniac_state::write_c(u8 data) { // C0-C6: right 7seg m_c = data; @@ -674,9 +674,9 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_READ8_MEMBER(read_c); - DECLARE_WRITE8_MEMBER(write_c); + void write_b(u8 data); + u8 read_c(); + void write_c(u8 data); void speaker_decay_reset(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); @@ -720,7 +720,7 @@ void flash_state::update_display() m_display->matrix(~m_b >> 4 & 3, (~m_c >> 1 & 0x7f) | (~m_b << 7 & 0x780)); } -WRITE8_MEMBER(flash_state::write_b) +void flash_state::write_b(u8 data) { // B0-B3: led data // B4,B5: led select @@ -733,13 +733,13 @@ WRITE8_MEMBER(flash_state::write_b) m_speaker->level_w(data >> 7 & 1); } -READ8_MEMBER(flash_state::read_c) +u8 flash_state::read_c() { // C1-C7: buttons return (m_c & 1) ? 0xff : m_inputs[1]->read(); } -WRITE8_MEMBER(flash_state::write_c) +void flash_state::write_c(u8 data) { // C0: enable buttons // C1-C7: digit segments @@ -822,9 +822,9 @@ public: hh_pic16_state(mconfig, type, tag) { } - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); - DECLARE_READ8_MEMBER(read_c); + void write_b(u8 data); + void write_c(u8 data); + u8 read_c(); void set_clock(); DECLARE_INPUT_CHANGED_MEMBER(speed_switch) { set_clock(); } @@ -849,13 +849,13 @@ void matchme_state::set_clock() m_maincpu->set_unscaled_clock((m_inputs[4]->read() & 1) ? 1300000 : 1200000); } -WRITE8_MEMBER(matchme_state::write_b) +void matchme_state::write_b(u8 data) { // B0-B7: lamps m_display->matrix(1, data); } -READ8_MEMBER(matchme_state::read_c) +u8 matchme_state::read_c() { // C0-C3: multiplexed inputs from C4-C6 m_inp_mux = m_c >> 4 & 7; @@ -868,7 +868,7 @@ READ8_MEMBER(matchme_state::read_c) return lo | hi << 4 | 0x80; } -WRITE8_MEMBER(matchme_state::write_c) +void matchme_state::write_c(u8 data) { // C0-C6: input mux m_c = data; @@ -980,9 +980,9 @@ public: hh_pic16_state(mconfig, type, tag) { } - DECLARE_READ8_MEMBER(read_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + u8 read_a(); + void write_b(u8 data); + void write_c(u8 data); void speaker_decay_reset(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); @@ -1019,19 +1019,19 @@ TIMER_DEVICE_CALLBACK_MEMBER(leboom_state::speaker_decay_sim) m_speaker_volume /= 1.015; } -READ8_MEMBER(leboom_state::read_a) +u8 leboom_state::read_a() { // A: multiplexed inputs return read_inputs(6, 0xf); } -WRITE8_MEMBER(leboom_state::write_b) +void leboom_state::write_b(u8 data) { // B0-B5: input mux m_inp_mux = data & 0x3f; } -WRITE8_MEMBER(leboom_state::write_c) +void leboom_state::write_c(u8 data) { // C4: single led m_display->matrix(1, data >> 4 & 1); @@ -1133,9 +1133,9 @@ public: { } void update_display(); - DECLARE_READ8_MEMBER(read_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + u8 read_a(); + void write_b(u8 data); + void write_c(u8 data); void tbaskb(machine_config &config); }; @@ -1146,13 +1146,13 @@ void tbaskb_state::update_display() m_display->matrix(m_b, m_c); } -READ8_MEMBER(tbaskb_state::read_a) +u8 tbaskb_state::read_a() { // A2: skill switch, A3: multiplexed inputs return m_inputs[5]->read() | read_inputs(5, 8) | 3; } -WRITE8_MEMBER(tbaskb_state::write_b) +void tbaskb_state::write_b(u8 data) { // B0: RTCC pin m_maincpu->set_input_line(PIC16C5x_RTCC, data & 1); @@ -1166,7 +1166,7 @@ WRITE8_MEMBER(tbaskb_state::write_b) update_display(); } -WRITE8_MEMBER(tbaskb_state::write_c) +void tbaskb_state::write_c(u8 data) { // C7: speaker out m_speaker->level_w(data >> 7 & 1); @@ -1253,10 +1253,10 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(write_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); - DECLARE_WRITE8_MEMBER(write_d); + void write_a(u8 data); + void write_b(u8 data); + void write_c(u8 data); + void write_d(u8 data); void rockpin(machine_config &config); }; @@ -1271,7 +1271,7 @@ void rockpin_state::update_display() m_display->matrix_partial(3, 6, m_d, m_c); } -WRITE8_MEMBER(rockpin_state::write_a) +void rockpin_state::write_a(u8 data) { // A3,A4: speaker out m_speaker->level_w(data >> 3 & 3); @@ -1281,21 +1281,21 @@ WRITE8_MEMBER(rockpin_state::write_a) update_display(); } -WRITE8_MEMBER(rockpin_state::write_b) +void rockpin_state::write_b(u8 data) { // B0-B6: digit segments m_b = data & 0x7f; update_display(); } -WRITE8_MEMBER(rockpin_state::write_c) +void rockpin_state::write_c(u8 data) { // C0-C7: led data m_c = ~data; update_display(); } -WRITE8_MEMBER(rockpin_state::write_d) +void rockpin_state::write_d(u8 data) { // D0-D5: led select m_d = ~data; @@ -1372,9 +1372,9 @@ public: { } void update_display(); - DECLARE_READ8_MEMBER(read_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + u8 read_a(); + void write_b(u8 data); + void write_c(u8 data); void hccbaskb(machine_config &config); }; @@ -1385,13 +1385,13 @@ void hccbaskb_state::update_display() m_display->matrix(m_b, m_c); } -READ8_MEMBER(hccbaskb_state::read_a) +u8 hccbaskb_state::read_a() { // A2: skill switch, A3: multiplexed inputs return m_inputs[5]->read() | read_inputs(5, 8) | 3; } -WRITE8_MEMBER(hccbaskb_state::write_b) +void hccbaskb_state::write_b(u8 data) { // B0: RTCC pin m_maincpu->set_input_line(PIC16C5x_RTCC, data & 1); @@ -1408,7 +1408,7 @@ WRITE8_MEMBER(hccbaskb_state::write_b) update_display(); } -WRITE8_MEMBER(hccbaskb_state::write_c) +void hccbaskb_state::write_c(u8 data) { // C0-C6: led data m_c = ~data; @@ -1496,9 +1496,9 @@ public: { } void update_display(); - DECLARE_READ8_MEMBER(read_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + u8 read_a(); + void write_b(u8 data); + void write_c(u8 data); void ttfball(machine_config &config); }; @@ -1515,13 +1515,13 @@ void ttfball_state::update_display() m_display->matrix(m_b | (m_c << 1 & 0x100), led_data); } -READ8_MEMBER(ttfball_state::read_a) +u8 ttfball_state::read_a() { // A3: multiplexed inputs, A0-A2: other inputs return m_inputs[5]->read() | read_inputs(5, 8); } -WRITE8_MEMBER(ttfball_state::write_b) +void ttfball_state::write_b(u8 data) { // B0: RTCC pin m_maincpu->set_input_line(PIC16C5x_RTCC, data & 1); @@ -1534,7 +1534,7 @@ WRITE8_MEMBER(ttfball_state::write_b) update_display(); } -WRITE8_MEMBER(ttfball_state::write_c) +void ttfball_state::write_c(u8 data) { // C6: speaker out m_speaker->level_w(data >> 6 & 1); @@ -1657,10 +1657,10 @@ public: { } void update_display(); - DECLARE_WRITE8_MEMBER(write_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); - DECLARE_WRITE8_MEMBER(write_d); + void write_a(u8 data); + void write_b(u8 data); + void write_c(u8 data); + void write_d(u8 data); void uspbball(machine_config &config); }; @@ -1671,27 +1671,27 @@ void uspbball_state::update_display() m_display->matrix(m_d, m_c << 8 | m_b); } -WRITE8_MEMBER(uspbball_state::write_a) +void uspbball_state::write_a(u8 data) { // A0: speaker out m_speaker->level_w(data & 1); } -WRITE8_MEMBER(uspbball_state::write_b) +void uspbball_state::write_b(u8 data) { // B: digit segment data m_b = bitswap<8>(data,0,1,2,3,4,5,6,7); update_display(); } -WRITE8_MEMBER(uspbball_state::write_c) +void uspbball_state::write_c(u8 data) { // C: led data m_c = ~data; update_display(); } -WRITE8_MEMBER(uspbball_state::write_d) +void uspbball_state::write_d(u8 data) { // D0-D2: digit select // D3-D5: led select @@ -1775,11 +1775,11 @@ public: { } void update_display(); - DECLARE_READ8_MEMBER(read_a); - DECLARE_WRITE8_MEMBER(write_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); - DECLARE_WRITE8_MEMBER(write_d); + u8 read_a(); + void write_a(u8 data); + void write_b(u8 data); + void write_c(u8 data); + void write_d(u8 data); void us2pfball(machine_config &config); }; @@ -1790,26 +1790,26 @@ void us2pfball_state::update_display() m_display->matrix(m_d | (m_a << 6 & 0x300), m_c); } -READ8_MEMBER(us2pfball_state::read_a) +u8 us2pfball_state::read_a() { // A0,A1: multiplexed inputs, A4-A7: other inputs return read_inputs(4, 3) | (m_inputs[4]->read() & 0xf0) | 0x0c; } -WRITE8_MEMBER(us2pfball_state::write_a) +void us2pfball_state::write_a(u8 data) { // A2,A3: leds m_a = data; update_display(); } -WRITE8_MEMBER(us2pfball_state::write_b) +void us2pfball_state::write_b(u8 data) { // B0-B3: input mux m_inp_mux = data & 0xf; } -WRITE8_MEMBER(us2pfball_state::write_c) +void us2pfball_state::write_c(u8 data) { // C7: speaker out m_speaker->level_w(data >> 7 & 1); @@ -1819,7 +1819,7 @@ WRITE8_MEMBER(us2pfball_state::write_c) update_display(); } -WRITE8_MEMBER(us2pfball_state::write_d) +void us2pfball_state::write_d(u8 data) { // D0-D7: digit select m_d = ~data; diff --git a/src/mame/drivers/himesiki.cpp b/src/mame/drivers/himesiki.cpp index d785957e74f..31b837451fd 100644 --- a/src/mame/drivers/himesiki.cpp +++ b/src/mame/drivers/himesiki.cpp @@ -104,7 +104,7 @@ A 12.000MHz #define MCLK XTAL(12'000'000) // this is on the video board #define CLK2 XTAL(8'000'000) // near the CPUs -WRITE8_MEMBER(himesiki_state::himesiki_rombank_w) +void himesiki_state::himesiki_rombank_w(uint8_t data) { membank("bank1")->set_entry(((data & 0x0c) >> 2)); @@ -115,7 +115,7 @@ WRITE8_MEMBER(himesiki_state::himesiki_rombank_w) logerror("p06_w %02x\n", data); } -WRITE8_MEMBER(himesiki_state::himesiki_sound_w) +void himesiki_state::himesiki_sound_w(uint8_t data) { m_soundlatch->write(data); m_subcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); diff --git a/src/mame/drivers/hp49gp.cpp b/src/mame/drivers/hp49gp.cpp index 85d0e84db9b..425fecdbb6b 100644 --- a/src/mame/drivers/hp49gp.cpp +++ b/src/mame/drivers/hp49gp.cpp @@ -44,8 +44,8 @@ private: lcd_spi_t m_lcd_spi; virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_READ32_MEMBER(s3c2410_gpio_port_r); - DECLARE_WRITE32_MEMBER(s3c2410_gpio_port_w); + uint32_t s3c2410_gpio_port_r(offs_t offset); + void s3c2410_gpio_port_w(offs_t offset, uint32_t data); inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4); void lcd_spi_reset(); void lcd_spi_init(); @@ -176,7 +176,7 @@ int hp49gp_state::lcd_spi_line_r( int line) // I/O PORT -READ32_MEMBER(hp49gp_state::s3c2410_gpio_port_r) +uint32_t hp49gp_state::s3c2410_gpio_port_r(offs_t offset) { uint32_t data = m_port[offset]; switch (offset) @@ -226,7 +226,7 @@ READ32_MEMBER(hp49gp_state::s3c2410_gpio_port_r) return data; } -WRITE32_MEMBER(hp49gp_state::s3c2410_gpio_port_w) +void hp49gp_state::s3c2410_gpio_port_w(offs_t offset, uint32_t data) { m_port[offset] = data; switch (offset) diff --git a/src/mame/drivers/hp80.cpp b/src/mame/drivers/hp80.cpp index f28cb631f45..8abad641e25 100644 --- a/src/mame/drivers/hp80.cpp +++ b/src/mame/drivers/hp80.cpp @@ -178,8 +178,8 @@ protected: TIMER_DEVICE_CALLBACK_MEMBER(timer_update); TIMER_DEVICE_CALLBACK_MEMBER(clk_busy_timer); - DECLARE_WRITE8_MEMBER(irl_w); - DECLARE_WRITE8_MEMBER(halt_w); + void irl_w(offs_t offset, uint8_t data); + void halt_w(offs_t offset, uint8_t data); required_device m_cpu; required_device m_clk_busy_timer; @@ -861,12 +861,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp80_base_state::clk_busy_timer) m_clk_busy = false; } -WRITE8_MEMBER(hp80_base_state::irl_w) +void hp80_base_state::irl_w(offs_t offset, uint8_t data) { irq_w(offset + IRQ_IOP0_BIT , data != 0); } -WRITE8_MEMBER(hp80_base_state::halt_w) +void hp80_base_state::halt_w(offs_t offset, uint8_t data) { bool prev_halt = m_halt_lines != 0; COPY_BIT(data != 0 , m_halt_lines , offset); diff --git a/src/mame/drivers/hunter2.cpp b/src/mame/drivers/hunter2.cpp index 8299d549e5e..f1ea2ea3a2f 100644 --- a/src/mame/drivers/hunter2.cpp +++ b/src/mame/drivers/hunter2.cpp @@ -68,10 +68,10 @@ protected: virtual void machine_reset() override; private: - DECLARE_READ8_MEMBER(keyboard_r); - DECLARE_READ8_MEMBER(portb_r); - DECLARE_WRITE8_MEMBER(keyboard_w); - DECLARE_READ8_MEMBER(portc_r); + uint8_t keyboard_r(); + uint8_t portb_r(); + void keyboard_w(uint8_t data); + uint8_t portc_r(); DECLARE_WRITE8_MEMBER(display_ctrl_w); DECLARE_WRITE8_MEMBER(serial_tx_w); DECLARE_WRITE8_MEMBER(serial_dtr_w); @@ -212,7 +212,7 @@ static INPUT_PORTS_START( hunter2 ) PORT_CONFSETTING(0x04, "Low") INPUT_PORTS_END -READ8_MEMBER( hunter2_state::keyboard_r ) +uint8_t hunter2_state::keyboard_r() { uint8_t data = 0xff; for (int i = 0; i < 7; i++) @@ -225,7 +225,7 @@ READ8_MEMBER( hunter2_state::keyboard_r ) return data; } -READ8_MEMBER( hunter2_state::portb_r ) +uint8_t hunter2_state::portb_r() { uint8_t res = 0x00; @@ -235,7 +235,7 @@ READ8_MEMBER( hunter2_state::portb_r ) return res; } -WRITE8_MEMBER( hunter2_state::keyboard_w ) +void hunter2_state::keyboard_w(uint8_t data) { m_keydata = data; } @@ -247,7 +247,7 @@ Bit 1 = DCD (inverted from RS-232 line) Bit 2 = Power low warning (0 = Power OK, 1 = Power low) Bit 3 = TXCLK (inverted from RS-232 line) */ -READ8_MEMBER( hunter2_state::portc_r ) +uint8_t hunter2_state::portc_r() { uint8_t res = 0x28; diff --git a/src/mame/drivers/husky.cpp b/src/mame/drivers/husky.cpp index 0ec5f7d2cd5..1c9260f88a6 100644 --- a/src/mame/drivers/husky.cpp +++ b/src/mame/drivers/husky.cpp @@ -62,11 +62,11 @@ protected: virtual void machine_reset() override; private: - DECLARE_READ8_MEMBER(porta_r); - DECLARE_WRITE8_MEMBER(porta_w); - DECLARE_READ8_MEMBER(portb_r); - DECLARE_READ8_MEMBER(portc_r); - DECLARE_WRITE8_MEMBER(portc_w); + uint8_t porta_r(); + void porta_w(uint8_t data); + uint8_t portb_r(); + uint8_t portc_r(); + void portc_w(uint8_t data); DECLARE_WRITE8_MEMBER(serial_tx_w); DECLARE_WRITE8_MEMBER(cursor_w); DECLARE_WRITE8_MEMBER(curinh_w); @@ -199,7 +199,7 @@ static INPUT_PORTS_START(husky) INPUT_PORTS_END -READ8_MEMBER(husky_state::porta_r) +uint8_t husky_state::porta_r() { uint8_t data = 0xff; @@ -211,12 +211,12 @@ READ8_MEMBER(husky_state::porta_r) return data; } -WRITE8_MEMBER(husky_state::porta_w) +void husky_state::porta_w(uint8_t data) { m_keydata = data; } -READ8_MEMBER(husky_state::portb_r) +uint8_t husky_state::portb_r() { uint8_t data = 0xff; @@ -232,7 +232,7 @@ READ8_MEMBER(husky_state::portb_r) Bit 2 = Power low warning (1 = Power OK, 0 = Power low) Input bits 7,6,4,3,2 */ -READ8_MEMBER(husky_state::portc_r) +uint8_t husky_state::portc_r() { uint8_t data = 0x23; @@ -245,7 +245,7 @@ READ8_MEMBER(husky_state::portc_r) /* Output bits 5,1,0 */ -WRITE8_MEMBER(husky_state::portc_w) +void husky_state::portc_w(uint8_t data) { m_beeper->set_state(!BIT(data, 0)); m_rs232->write_rts(BIT(data, 1)); diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp index 9afb165aeb8..38c78e6985b 100644 --- a/src/mame/drivers/hvyunit.cpp +++ b/src/mame/drivers/hvyunit.cpp @@ -142,13 +142,13 @@ private: DECLARE_WRITE8_MEMBER(scrolly_w); DECLARE_WRITE8_MEMBER(slave_ack_w); DECLARE_WRITE8_MEMBER(sound_bankswitch_w); - DECLARE_WRITE8_MEMBER(mermaid_p0_w); - DECLARE_READ8_MEMBER(mermaid_p1_r); - DECLARE_WRITE8_MEMBER(mermaid_p1_w); - DECLARE_READ8_MEMBER(mermaid_p2_r); - DECLARE_WRITE8_MEMBER(mermaid_p2_w); - DECLARE_READ8_MEMBER(mermaid_p3_r); - DECLARE_WRITE8_MEMBER(mermaid_p3_w); + void mermaid_p0_w(uint8_t data); + uint8_t mermaid_p1_r(); + void mermaid_p1_w(uint8_t data); + uint8_t mermaid_p2_r(); + void mermaid_p2_w(uint8_t data); + uint8_t mermaid_p3_r(); + void mermaid_p3_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -318,7 +318,7 @@ WRITE8_MEMBER(hvyunit_state::sound_bankswitch_w) * *************************************/ -WRITE8_MEMBER(hvyunit_state::mermaid_p0_w) +void hvyunit_state::mermaid_p0_w(uint8_t data) { if (!BIT(m_mermaid_p[0], 1) && BIT(data, 1)) m_slavelatch->write(m_mermaid_p[1]); @@ -337,17 +337,17 @@ WRITE8_MEMBER(hvyunit_state::mermaid_p0_w) m_mermaid_p[0] = data; } -READ8_MEMBER(hvyunit_state::mermaid_p1_r) +uint8_t hvyunit_state::mermaid_p1_r() { return m_mermaid_p[1]; } -WRITE8_MEMBER(hvyunit_state::mermaid_p1_w) +void hvyunit_state::mermaid_p1_w(uint8_t data) { m_mermaid_p[1] = data; } -READ8_MEMBER(hvyunit_state::mermaid_p2_r) +uint8_t hvyunit_state::mermaid_p2_r() { switch ((m_mermaid_p[0] >> 2) & 3) { @@ -358,12 +358,12 @@ READ8_MEMBER(hvyunit_state::mermaid_p2_r) } } -WRITE8_MEMBER(hvyunit_state::mermaid_p2_w) +void hvyunit_state::mermaid_p2_w(uint8_t data) { m_mermaid_p[2] = data; } -READ8_MEMBER(hvyunit_state::mermaid_p3_r) +uint8_t hvyunit_state::mermaid_p3_r() { uint8_t dsw = 0; uint8_t dsw1 = ioport("DSW1")->read(); @@ -380,7 +380,7 @@ READ8_MEMBER(hvyunit_state::mermaid_p3_r) return (dsw << 4) | (m_slavelatch->pending_r() << 3) | (!m_mermaidlatch->pending_r() << 2); } -WRITE8_MEMBER(hvyunit_state::mermaid_p3_w) +void hvyunit_state::mermaid_p3_w(uint8_t data) { m_mermaid_p[3] = data; m_slavecpu->set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/ibm6580.cpp b/src/mame/drivers/ibm6580.cpp index 55b5f520970..fcc7dc9bed7 100644 --- a/src/mame/drivers/ibm6580.cpp +++ b/src/mame/drivers/ibm6580.cpp @@ -162,10 +162,10 @@ private: DECLARE_READ8_MEMBER(video_r); DECLARE_WRITE_LINE_MEMBER(vblank_w); - DECLARE_READ8_MEMBER(ppi_a_r); - DECLARE_WRITE8_MEMBER(led_w); - DECLARE_WRITE8_MEMBER(ppi_c_w); - DECLARE_READ8_MEMBER(ppi_c_r); + uint8_t ppi_a_r(); + void led_w(uint8_t data); + void ppi_c_w(uint8_t data); + uint8_t ppi_c_r(); DECLARE_WRITE_LINE_MEMBER(kb_data_w); DECLARE_WRITE_LINE_MEMBER(kb_clock_w); @@ -178,8 +178,8 @@ private: DECLARE_WRITE_LINE_MEMBER(floppy_hdl); DECLARE_WRITE8_MEMBER(dmapg_w); DECLARE_WRITE_LINE_MEMBER(hrq_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); + uint8_t memory_read_byte(offs_t offset); + void memory_write_byte(offs_t offset, uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -355,7 +355,7 @@ WRITE16_MEMBER(ibm6580_state::unk_latch_w) m_p40 |= 0x10; } -WRITE8_MEMBER(ibm6580_state::led_w) +void ibm6580_state::led_w(uint8_t data) { output().set_value("led5", BIT(data, 7)); output().set_value("led6", BIT(data, 6)); @@ -417,7 +417,7 @@ WRITE8_MEMBER(ibm6580_state::led_w) } } -WRITE8_MEMBER(ibm6580_state::ppi_c_w) +void ibm6580_state::ppi_c_w(uint8_t data) { LOG("PPI Port C <- %02x\n", data); @@ -433,7 +433,7 @@ WRITE8_MEMBER(ibm6580_state::ppi_c_w) m_kbd->ack_w(BIT(data, 5)); } -READ8_MEMBER(ibm6580_state::ppi_c_r) +uint8_t ibm6580_state::ppi_c_r() { uint8_t data = 0; @@ -444,7 +444,7 @@ READ8_MEMBER(ibm6580_state::ppi_c_r) return data; } -READ8_MEMBER(ibm6580_state::ppi_a_r) +uint8_t ibm6580_state::ppi_a_r() { uint8_t data = m_kb_fifo.dequeue(); @@ -486,13 +486,13 @@ WRITE_LINE_MEMBER(ibm6580_state::hrq_w) m_dma8257->hlda_w(state); } -READ8_MEMBER(ibm6580_state::memory_read_byte) +uint8_t ibm6580_state::memory_read_byte(offs_t offset) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); return prog_space.read_byte(offset | (m_dma0pg << 16)); } -WRITE8_MEMBER(ibm6580_state::memory_write_byte) +void ibm6580_state::memory_write_byte(offs_t offset, uint8_t data) { address_space& prog_space = m_maincpu->space(AS_PROGRAM); prog_space.write_byte(offset | (m_dma0pg << 16), data); diff --git a/src/mame/drivers/igs009.cpp b/src/mame/drivers/igs009.cpp index 97eff43ff7f..49a3af5164f 100644 --- a/src/mame/drivers/igs009.cpp +++ b/src/mame/drivers/igs009.cpp @@ -76,9 +76,9 @@ private: DECLARE_WRITE8_MEMBER(bg_scroll_w); DECLARE_WRITE8_MEMBER(fg_tile_w); DECLARE_WRITE8_MEMBER(fg_color_w); - DECLARE_WRITE8_MEMBER(nmi_and_coins_w); - DECLARE_WRITE8_MEMBER(video_and_leds_w); - DECLARE_WRITE8_MEMBER(leds_w); + void nmi_and_coins_w(uint8_t data); + void video_and_leds_w(uint8_t data); + void leds_w(uint8_t data); DECLARE_WRITE8_MEMBER(magic_w); DECLARE_READ8_MEMBER(magic_r); @@ -400,7 +400,7 @@ void igs009_state::show_out() #endif } -WRITE8_MEMBER(igs009_state::nmi_and_coins_w) +void igs009_state::nmi_and_coins_w(uint8_t data) { if ((m_nmi_enable ^ data) & (~0xdd)) { @@ -421,7 +421,7 @@ WRITE8_MEMBER(igs009_state::nmi_and_coins_w) show_out(); } -WRITE8_MEMBER(igs009_state::video_and_leds_w) +void igs009_state::video_and_leds_w(uint8_t data) { m_leds[4] = BIT(data, 0); // start? m_leds[5] = BIT(data, 2); // l_bet? @@ -433,7 +433,7 @@ WRITE8_MEMBER(igs009_state::video_and_leds_w) show_out(); } -WRITE8_MEMBER(igs009_state::leds_w) +void igs009_state::leds_w(uint8_t data) { m_leds[0] = BIT(data, 0); // stop_1 m_leds[1] = BIT(data, 1); // stop_2 diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp index 495f6d22a15..edf96a87ec8 100644 --- a/src/mame/drivers/igspoker.cpp +++ b/src/mame/drivers/igspoker.cpp @@ -133,7 +133,7 @@ private: DECLARE_WRITE8_MEMBER(bg_tile_w); DECLARE_WRITE8_MEMBER(fg_tile_w); DECLARE_WRITE8_MEMBER(fg_color_w); - DECLARE_WRITE8_MEMBER(igs_nmi_and_coins_w); + void igs_nmi_and_coins_w(uint8_t data); DECLARE_WRITE8_MEMBER(igs_lamps_w); DECLARE_READ8_MEMBER(custom_io_r); DECLARE_WRITE8_MEMBER(custom_io_w); @@ -281,7 +281,7 @@ void igspoker_state::show_out() #endif } -WRITE8_MEMBER(igspoker_state::igs_nmi_and_coins_w) +void igspoker_state::igs_nmi_and_coins_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c diff --git a/src/mame/drivers/interpro.cpp b/src/mame/drivers/interpro.cpp index b0448f44562..4481fe270d6 100644 --- a/src/mame/drivers/interpro.cpp +++ b/src/mame/drivers/interpro.cpp @@ -453,7 +453,7 @@ READ32_MEMBER(interpro_state::unmapped_r) m_error |= (ERROR_SRXNEM | ERROR_SRXVALID); // tell ioga to raise a bus error - m_ioga->bus_error(space, interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); + m_ioga->bus_error(interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); } return space.unmap(); @@ -467,7 +467,7 @@ WRITE32_MEMBER(interpro_state::unmapped_w) m_error |= (ERROR_SRXNEM | ERROR_SRXVALID); // tell ioga to raise a bus error - m_ioga->bus_error(space, interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); + m_ioga->bus_error(interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); } } @@ -481,7 +481,7 @@ READ32_MEMBER(sapphire_state::unmapped_r) m_error |= (ERROR_SRXNEM | ERROR_SRXVALID); // tell ioga to raise a bus error - m_ioga->bus_error(space, interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); + m_ioga->bus_error(interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); } return space.unmap(); @@ -496,7 +496,7 @@ WRITE32_MEMBER(sapphire_state::unmapped_w) m_error |= (ERROR_SRXNEM | ERROR_SRXVALID); // tell ioga to raise a bus error - m_ioga->bus_error(space, interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); + m_ioga->bus_error(interpro_ioga_device::BINFO_BERR | interpro_ioga_device::BINFO_SNAPOK, offset << 2); } } diff --git a/src/mame/drivers/iqblock.cpp b/src/mame/drivers/iqblock.cpp index 3b7c86eb1d1..ff6ec9f3ba2 100644 --- a/src/mame/drivers/iqblock.cpp +++ b/src/mame/drivers/iqblock.cpp @@ -96,7 +96,7 @@ WRITE8_MEMBER(iqblock_state::irqack_w) } -WRITE8_MEMBER(iqblock_state::port_C_w) +void iqblock_state::port_C_w(uint8_t data) { /* bit 4 unknown; it is pulsed at the end of every NMI */ diff --git a/src/mame/drivers/ironhors.cpp b/src/mame/drivers/ironhors.cpp index 4cd28d4cb7d..f43f9f77fea 100644 --- a/src/mame/drivers/ironhors.cpp +++ b/src/mame/drivers/ironhors.cpp @@ -45,7 +45,7 @@ WRITE8_MEMBER(ironhors_state::sh_irqtrigger_w) m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 } -WRITE8_MEMBER(ironhors_state::filter_w) +void ironhors_state::filter_w(uint8_t data) { m_disc_ih->write(NODE_11, (data & 0x04) >> 2); m_disc_ih->write(NODE_12, (data & 0x02) >> 1); @@ -433,11 +433,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::farwest_scanline_tick) } } -READ8_MEMBER(ironhors_state::farwest_soundlatch_r) -{ - return m_soundlatch->read(); -} - void ironhors_state::farwest(machine_config &config) { ironhors(config); @@ -453,7 +448,7 @@ void ironhors_state::farwest(machine_config &config) m_screen->set_screen_update(FUNC(ironhors_state::screen_update_farwest)); - subdevice("ym2203")->port_b_read_callback().set(FUNC(ironhors_state::farwest_soundlatch_r)); + subdevice("ym2203")->port_b_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); } diff --git a/src/mame/drivers/isbc.cpp b/src/mame/drivers/isbc.cpp index a8a0192b84d..c447382d842 100644 --- a/src/mame/drivers/isbc.cpp +++ b/src/mame/drivers/isbc.cpp @@ -62,8 +62,8 @@ private: DECLARE_WRITE_LINE_MEMBER(isbc86_tmr2_w); DECLARE_WRITE_LINE_MEMBER(isbc286_tmr2_w); // DECLARE_WRITE_LINE_MEMBER(isbc_uart8274_irq); - DECLARE_READ8_MEMBER(get_slave_ack); - DECLARE_WRITE8_MEMBER(ppi_c_w); + uint8_t get_slave_ack(offs_t offset); + void ppi_c_w(uint8_t data); DECLARE_WRITE8_MEMBER(upperen_w); DECLARE_READ16_MEMBER(bioslo_r); DECLARE_WRITE16_MEMBER(bioslo_w); @@ -237,7 +237,7 @@ WRITE_LINE_MEMBER( isbc_state::isbc86_tmr2_w ) m_uart8251->write_txc(state); } -READ8_MEMBER( isbc_state::get_slave_ack ) +uint8_t isbc_state::get_slave_ack(offs_t offset) { if (offset == 7) return m_pic_1->acknowledge(); @@ -259,7 +259,7 @@ WRITE_LINE_MEMBER( isbc_state::write_centronics_ack ) m_pic_1->ir7_w(1); } -WRITE8_MEMBER( isbc_state::ppi_c_w ) +void isbc_state::ppi_c_w(uint8_t data) { m_centronics->write_strobe(data & 1); diff --git a/src/mame/drivers/itech8.cpp b/src/mame/drivers/itech8.cpp index 7227cedb2e4..d65077d26e9 100644 --- a/src/mame/drivers/itech8.cpp +++ b/src/mame/drivers/itech8.cpp @@ -765,14 +765,14 @@ READ_LINE_MEMBER(itech8_state::special_r) * *************************************/ -WRITE8_MEMBER(itech8_state::pia_porta_out) +void itech8_state::pia_porta_out(uint8_t data) { logerror("PIA port A write = %02x\n", data); m_pia_porta_data = data; } -WRITE8_MEMBER(itech8_state::pia_portb_out) +void itech8_state::pia_portb_out(uint8_t data) { logerror("PIA port B write = %02x\n", data); @@ -786,7 +786,7 @@ WRITE8_MEMBER(itech8_state::pia_portb_out) } -WRITE8_MEMBER(itech8_state::ym2203_portb_out) +void itech8_state::ym2203_portb_out(uint8_t data) { logerror("YM2203 port B write = %02x\n", data); diff --git a/src/mame/drivers/jackie.cpp b/src/mame/drivers/jackie.cpp index a3bef6e870f..91f9d36663c 100644 --- a/src/mame/drivers/jackie.cpp +++ b/src/mame/drivers/jackie.cpp @@ -84,8 +84,8 @@ private: DECLARE_WRITE8_MEMBER(fg_color_w); template DECLARE_WRITE8_MEMBER(reel_ram_w); - DECLARE_WRITE8_MEMBER(nmi_and_coins_w); - DECLARE_WRITE8_MEMBER(lamps_w); + void nmi_and_coins_w(uint8_t data); + void lamps_w(uint8_t data); DECLARE_READ8_MEMBER(igs_irqack_r); DECLARE_WRITE8_MEMBER(igs_irqack_w); DECLARE_READ8_MEMBER(expram_r); @@ -274,7 +274,7 @@ WRITE8_MEMBER(jackie_state::unk_reg_hi_w) show_out(); } -WRITE8_MEMBER(jackie_state::nmi_and_coins_w) +void jackie_state::nmi_and_coins_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c @@ -290,7 +290,7 @@ WRITE8_MEMBER(jackie_state::nmi_and_coins_w) show_out(); } -WRITE8_MEMBER(jackie_state::lamps_w) +void jackie_state::lamps_w(uint8_t data) { /* - Lbits - diff --git a/src/mame/drivers/jongkyo.cpp b/src/mame/drivers/jongkyo.cpp index 402fa56e677..d3c260f1c49 100644 --- a/src/mame/drivers/jongkyo.cpp +++ b/src/mame/drivers/jongkyo.cpp @@ -73,8 +73,8 @@ private: DECLARE_WRITE8_MEMBER(jongkyo_coin_counter_w); DECLARE_WRITE8_MEMBER(videoram2_w); DECLARE_WRITE8_MEMBER(unknown_w); - DECLARE_READ8_MEMBER(input_1p_r); - DECLARE_READ8_MEMBER(input_2p_r); + uint8_t input_1p_r(); + uint8_t input_2p_r(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -178,7 +178,7 @@ WRITE8_MEMBER(jongkyo_state::jongkyo_coin_counter_w) m_flip_screen = (data & 4) >> 2; } -READ8_MEMBER(jongkyo_state::input_1p_r) +uint8_t jongkyo_state::input_1p_r() { uint8_t cr_clear = ioport("CR_CLEAR")->read(); @@ -197,7 +197,7 @@ READ8_MEMBER(jongkyo_state::input_1p_r) ioport("PL1_4")->read() & ioport("PL1_5")->read() & ioport("PL1_6")->read()) | cr_clear; } -READ8_MEMBER(jongkyo_state::input_2p_r) +uint8_t jongkyo_state::input_2p_r() { uint8_t coin_port = ioport("COINS")->read(); diff --git a/src/mame/drivers/jpmimpct.cpp b/src/mame/drivers/jpmimpct.cpp index 7513719a1c6..f2db979c868 100644 --- a/src/mame/drivers/jpmimpct.cpp +++ b/src/mame/drivers/jpmimpct.cpp @@ -882,7 +882,7 @@ void jpmimpct_state::jpmimpct(machine_config &config) * *************************************/ -READ8_MEMBER(jpmimpct_state::hopper_b_r) +uint8_t jpmimpct_state::hopper_b_r() { int retval; // B0 = 100p Hopper Out Verif @@ -908,7 +908,7 @@ READ8_MEMBER(jpmimpct_state::hopper_b_r) return retval; } -READ8_MEMBER(jpmimpct_state::hopper_c_r) +uint8_t jpmimpct_state::hopper_c_r() { int retval; // C0-C2 = Alpha @@ -945,7 +945,7 @@ READ8_MEMBER(jpmimpct_state::hopper_c_r) return retval; } -WRITE8_MEMBER(jpmimpct_state::payen_a_w) +void jpmimpct_state::payen_a_w(uint8_t data) { m_motor[0] = (data & 0x01); m_payen = (data & 0x10); @@ -954,7 +954,7 @@ WRITE8_MEMBER(jpmimpct_state::payen_a_w) m_hopinhibit = (data & 0x80); } -WRITE8_MEMBER(jpmimpct_state::display_c_w) +void jpmimpct_state::display_c_w(uint8_t data) { //Reset 0x04, data 0x02, clock 0x01 m_vfd->por(data & 0x04); diff --git a/src/mame/drivers/jpmmps.cpp b/src/mame/drivers/jpmmps.cpp index d85260b2da5..7337dcdbcc4 100644 --- a/src/mame/drivers/jpmmps.cpp +++ b/src/mame/drivers/jpmmps.cpp @@ -165,9 +165,9 @@ private: required_device m_uart_ic5; required_device m_uart_ic10; - DECLARE_WRITE8_MEMBER(jpmmps_meters_w); - DECLARE_WRITE8_MEMBER(jpmmps_psg_buf_w); - DECLARE_WRITE8_MEMBER(jpmmps_ic22_portc_w); + void jpmmps_meters_w(uint8_t data); + void jpmmps_psg_buf_w(uint8_t data); + void jpmmps_ic22_portc_w(uint8_t data); }; void jpmmps_state::jpmmps_map(address_map &map) @@ -203,7 +203,7 @@ void jpmmps_state::jpmmps_io_map(address_map &map) static INPUT_PORTS_START( jpmmps ) INPUT_PORTS_END -WRITE8_MEMBER(jpmmps_state::jpmmps_meters_w) +void jpmmps_state::jpmmps_meters_w(uint8_t data) { for (int meter = 0; meter < 8; meter ++) { @@ -212,12 +212,12 @@ WRITE8_MEMBER(jpmmps_state::jpmmps_meters_w) } -WRITE8_MEMBER(jpmmps_state::jpmmps_psg_buf_w) +void jpmmps_state::jpmmps_psg_buf_w(uint8_t data) { m_sound_buffer = data; } -WRITE8_MEMBER(jpmmps_state::jpmmps_ic22_portc_w) +void jpmmps_state::jpmmps_ic22_portc_w(uint8_t data) { //Handle PSG diff --git a/src/mame/drivers/jpmsys5.cpp b/src/mame/drivers/jpmsys5.cpp index 4d0f42f443f..cd7b51be214 100644 --- a/src/mame/drivers/jpmsys5.cpp +++ b/src/mame/drivers/jpmsys5.cpp @@ -467,7 +467,7 @@ WRITE_LINE_MEMBER(jpmsys5_state::pia_irq) m_maincpu->set_input_line(INT_6821PIA, state ? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER(jpmsys5_state::u29_porta_r) +uint8_t jpmsys5_state::u29_porta_r() { int meter_bit =0; @@ -485,7 +485,7 @@ READ8_MEMBER(jpmsys5_state::u29_porta_r) return m_direct_port->read() | meter_bit; } -WRITE8_MEMBER(jpmsys5_state::u29_portb_w) +void jpmsys5_state::u29_portb_w(uint8_t data) { if (m_meters) { diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp index 4ba5a7f36fe..1de19749a74 100644 --- a/src/mame/drivers/junofrst.cpp +++ b/src/mame/drivers/junofrst.cpp @@ -120,9 +120,9 @@ private: DECLARE_WRITE8_MEMBER(bankselect_w); DECLARE_WRITE8_MEMBER(sh_irqtrigger_w); DECLARE_WRITE8_MEMBER(i8039_irq_w); - DECLARE_WRITE8_MEMBER(i8039_irqen_and_status_w); - DECLARE_READ8_MEMBER(portA_r); - DECLARE_WRITE8_MEMBER(portB_w); + void i8039_irqen_and_status_w(uint8_t data); + uint8_t portA_r(); + void portB_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; @@ -222,7 +222,7 @@ WRITE8_MEMBER(junofrst_state::bankselect_w) } -READ8_MEMBER(junofrst_state::portA_r) +uint8_t junofrst_state::portA_r() { int timer; @@ -238,7 +238,7 @@ READ8_MEMBER(junofrst_state::portA_r) } -WRITE8_MEMBER(junofrst_state::portB_w) +void junofrst_state::portB_w(uint8_t data) { filter_rc_device *filter[3] = { m_filter_0_0, m_filter_0_1, m_filter_0_2 }; int i; @@ -276,7 +276,7 @@ WRITE8_MEMBER(junofrst_state::i8039_irq_w) } -WRITE8_MEMBER(junofrst_state::i8039_irqen_and_status_w) +void junofrst_state::i8039_irqen_and_status_w(uint8_t data) { if ((data & 0x80) == 0) m_i8039->set_input_line(0, CLEAR_LINE); diff --git a/src/mame/drivers/kdt6.cpp b/src/mame/drivers/kdt6.cpp index 697ed56e801..9f42669438d 100644 --- a/src/mame/drivers/kdt6.cpp +++ b/src/mame/drivers/kdt6.cpp @@ -72,10 +72,10 @@ public: private: DECLARE_WRITE_LINE_MEMBER(busreq_w); - DECLARE_READ8_MEMBER(memory_r); - DECLARE_WRITE8_MEMBER(memory_w); - DECLARE_READ8_MEMBER(io_r); - DECLARE_WRITE8_MEMBER(io_w); + uint8_t memory_r(offs_t offset); + void memory_w(offs_t offset, uint8_t data); + uint8_t io_r(offs_t offset); + void io_w(offs_t offset, uint8_t data); DECLARE_READ8_MEMBER(page0_r); DECLARE_READ8_MEMBER(page1_r); DECLARE_READ8_MEMBER(mapper_r); @@ -105,7 +105,7 @@ private: MC6845_UPDATE_ROW(crtc_update_row); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(pio_porta_w); + void pio_porta_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(keyboard_rx_w); DECLARE_WRITE_LINE_MEMBER(rs232b_rx_w); DECLARE_WRITE_LINE_MEMBER(siob_tx_w); @@ -344,7 +344,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( kdt6_state::beeper_off ) // EXTERNAL I/O //************************************************************************** -WRITE8_MEMBER( kdt6_state::pio_porta_w ) +void kdt6_state::pio_porta_w(uint8_t data) { m_centronics->write_strobe(BIT(data, 0)); m_centronics->write_init(BIT(data, 1)); @@ -390,22 +390,22 @@ WRITE_LINE_MEMBER( kdt6_state::busreq_w ) m_dma->bai_w(state); } -READ8_MEMBER( kdt6_state::memory_r ) +uint8_t kdt6_state::memory_r(offs_t offset) { return m_ram[m_dma_map << 16 | offset]; } -WRITE8_MEMBER( kdt6_state::memory_w ) +void kdt6_state::memory_w(offs_t offset, uint8_t data) { m_ram[m_dma_map << 16 | offset] = data; } -READ8_MEMBER( kdt6_state::io_r ) +uint8_t kdt6_state::io_r(offs_t offset) { return m_cpu->space(AS_IO).read_byte(offset); } -WRITE8_MEMBER( kdt6_state::io_w ) +void kdt6_state::io_w(offs_t offset, uint8_t data) { m_cpu->space(AS_IO).write_byte(offset, data); } diff --git a/src/mame/drivers/koikoi.cpp b/src/mame/drivers/koikoi.cpp index 5f815f53fcb..24591c4598c 100644 --- a/src/mame/drivers/koikoi.cpp +++ b/src/mame/drivers/koikoi.cpp @@ -78,8 +78,8 @@ private: DECLARE_WRITE8_MEMBER(vram_w); DECLARE_READ8_MEMBER(io_r); DECLARE_WRITE8_MEMBER(io_w); - DECLARE_READ8_MEMBER(input_r); - DECLARE_WRITE8_MEMBER(unknown_w); + uint8_t input_r(); + void unknown_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_start() override; virtual void machine_reset() override; @@ -172,7 +172,7 @@ WRITE8_MEMBER(koikoi_state::vram_w) m_tmap->mark_tile_dirty(offset & 0x3ff); } -READ8_MEMBER(koikoi_state::input_r) +uint8_t koikoi_state::input_r() { if (m_inputcnt < 0) return 0; @@ -208,7 +208,7 @@ READ8_MEMBER(koikoi_state::input_r) return 0xff; //return 0^0xff } -WRITE8_MEMBER(koikoi_state::unknown_w) +void koikoi_state::unknown_w(uint8_t data) { //xor'ed mux select, player 1 = 1,2,4,8, player 2 = 0x10, 0x20, 0x40, 0x80 } diff --git a/src/mame/drivers/konamim2.cpp b/src/mame/drivers/konamim2.cpp index 68ec4d37f16..13728e0ea0d 100644 --- a/src/mame/drivers/konamim2.cpp +++ b/src/mame/drivers/konamim2.cpp @@ -290,10 +290,10 @@ public: DECLARE_WRITE_LINE_MEMBER(ppc1_int); DECLARE_WRITE_LINE_MEMBER(ppc2_int); - DECLARE_WRITE32_MEMBER(cde_sdbg_out); + void cde_sdbg_out(uint32_t data); - DECLARE_WRITE16_MEMBER(ldac_out); - DECLARE_WRITE16_MEMBER(rdac_out); + void ldac_out(uint16_t data); + void rdac_out(uint16_t data); DECLARE_WRITE_LINE_MEMBER(ata_int); @@ -390,7 +390,7 @@ WRITE_LINE_MEMBER(konamim2_state::ppc2_int) m_ppc2->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); } -WRITE32_MEMBER(konamim2_state::cde_sdbg_out) +void konamim2_state::cde_sdbg_out(uint32_t data) { if (data == 0xd) putc('\n', stdout); @@ -406,12 +406,12 @@ WRITE32_MEMBER(konamim2_state::cde_sdbg_out) #endif } -WRITE16_MEMBER( konamim2_state::ldac_out ) +void konamim2_state::ldac_out(uint16_t data) { m_ldac->write(data); } -WRITE16_MEMBER( konamim2_state::rdac_out ) +void konamim2_state::rdac_out(uint16_t data) { m_rdac->write(data); } diff --git a/src/mame/drivers/konmedal.cpp b/src/mame/drivers/konmedal.cpp index 7d39c0c4900..6a9e4499ea2 100644 --- a/src/mame/drivers/konmedal.cpp +++ b/src/mame/drivers/konmedal.cpp @@ -116,7 +116,7 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(konmedal_scanline); WRITE_LINE_MEMBER(vbl_ack_w) { m_maincpu->set_input_line(0, CLEAR_LINE); } WRITE_LINE_MEMBER(nmi_ack_w) { m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } - WRITE8_MEMBER(ccu_int_time_w) { m_ccu_int_time = data; } + void ccu_int_time_w(uint8_t data) { m_ccu_int_time = data; } WRITE8_MEMBER(k056832_w) { m_k056832->write(offset ^ 1, data); } WRITE8_MEMBER(k056832_b_w) { m_k056832->b_w(offset ^ 1, data); } diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp index 4003ac48221..c62e0c65b59 100644 --- a/src/mame/drivers/ksys573.cpp +++ b/src/mame/drivers/ksys573.cpp @@ -526,12 +526,12 @@ private: DECLARE_WRITE_LINE_MEMBER( ata_interrupt ); TIMER_CALLBACK_MEMBER( atapi_xfer_end ); - DECLARE_WRITE8_MEMBER( ddr_output_callback ); - DECLARE_WRITE8_MEMBER( ddrsolo_output_callback ); - DECLARE_WRITE8_MEMBER( drmn_output_callback ); - DECLARE_WRITE8_MEMBER( dmx_output_callback ); - DECLARE_WRITE8_MEMBER( mamboagg_output_callback ); - DECLARE_WRITE8_MEMBER( punchmania_output_callback ); + void ddr_output_callback(offs_t offset, uint8_t data); + void ddrsolo_output_callback(offs_t offset, uint8_t data); + void drmn_output_callback(offs_t offset, uint8_t data); + void dmx_output_callback(offs_t offset, uint8_t data); + void mamboagg_output_callback(offs_t offset, uint8_t data); + void punchmania_output_callback(offs_t offset, uint8_t data); double analogue_inputs_callback(uint8_t input); void cdrom_dma_read( uint32_t *ram, uint32_t n_address, int32_t n_size ); @@ -565,7 +565,7 @@ private: inline void ATTR_PRINTF( 3,4 ) verboselog( int n_level, const char *s_fmt, ... ); void update_disc(); void gx700pwbf_output( int offset, uint8_t data ); - void gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t data, ATTR_UNUSED uint8_t mem_mask ) ); + void gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t data ) ); void gn845pwbb_do_w( int offset, int data ); void gn845pwbb_clk_w( int offset, int data ); @@ -588,7 +588,7 @@ private: int m_h8_clk; uint8_t m_gx700pwbf_output_data[ 4 ]; - void ( ksys573_state::*m_gx700pwfbf_output_callback )( address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t data, ATTR_UNUSED uint8_t mem_mask ); + void ( ksys573_state::*m_gx700pwfbf_output_callback )( ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t data ); uint32_t m_stage_mask; struct @@ -1036,7 +1036,7 @@ void ksys573_state::gx700pwbf_output( int offset, uint8_t data ) int newbit = ( data >> shift[ i ] ) & 1; if( oldbit != newbit ) { - ( this->*m_gx700pwfbf_output_callback )( m_maincpu->space( AS_PROGRAM ), ( offset * 8 ) + i, newbit, 0xff ); + ( this->*m_gx700pwfbf_output_callback )( ( offset * 8 ) + i, newbit ); } } } @@ -1071,7 +1071,7 @@ WRITE16_MEMBER( ksys573_state::gx700pwbf_io_w ) } } -void ksys573_state::gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t data, ATTR_UNUSED uint8_t mem_mask ) ) +void ksys573_state::gx700pwfbf_init( void ( ksys573_state::*output_callback_func )( ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t data ) ) { memset( m_gx700pwbf_output_data, 0, sizeof( m_gx700pwbf_output_data ) ); @@ -1159,7 +1159,7 @@ CUSTOM_INPUT_MEMBER( ksys573_state::gn845pwbb_read ) return m_stage->read() & m_stage_mask; } -WRITE8_MEMBER( ksys573_state::ddr_output_callback ) +void ksys573_state::ddr_output_callback(offs_t offset, uint8_t data) { switch( offset ) { @@ -1278,7 +1278,7 @@ WRITE_LINE_MEMBER( ksys573_state::gtrfrks_lamps_b4 ) /* ddr solo */ -WRITE8_MEMBER( ksys573_state::ddrsolo_output_callback ) +void ksys573_state::ddrsolo_output_callback(offs_t offset, uint8_t data) { switch( offset ) { @@ -1333,7 +1333,7 @@ WRITE8_MEMBER( ksys573_state::ddrsolo_output_callback ) /* drummania */ -WRITE8_MEMBER( ksys573_state::drmn_output_callback ) +void ksys573_state::drmn_output_callback(offs_t offset, uint8_t data) { switch( offset ) { @@ -1404,7 +1404,7 @@ void ksys573_state::init_drmn() /* dance maniax */ -WRITE8_MEMBER( ksys573_state::dmx_output_callback ) +void ksys573_state::dmx_output_callback(offs_t offset, uint8_t data) { switch( offset ) { @@ -1814,7 +1814,7 @@ void ksys573_state::init_hyperbbc() /* Mambo A Go Go */ -WRITE8_MEMBER( ksys573_state::mamboagg_output_callback ) +void ksys573_state::mamboagg_output_callback(offs_t offset, uint8_t data) { switch( offset ) { @@ -1906,7 +1906,7 @@ void ksys573_state::punchmania_cassette_install(device_t *device) int pad_light[ 6 ]; -WRITE8_MEMBER( ksys573_state::punchmania_output_callback ) +void ksys573_state::punchmania_output_callback(offs_t offset, uint8_t data) { double *pad_position = m_pad_position; char pad[ 7 ]; diff --git a/src/mame/drivers/lordgun.cpp b/src/mame/drivers/lordgun.cpp index d3ffedc9310..31a1f945f87 100644 --- a/src/mame/drivers/lordgun.cpp +++ b/src/mame/drivers/lordgun.cpp @@ -158,17 +158,17 @@ READ16_MEMBER(lordgun_state::aliencha_protection_r) return 0; } -WRITE8_MEMBER(lordgun_state::fake_w) +void lordgun_state::fake_w(uint8_t data) { // popmessage("%02x",data); } -WRITE8_MEMBER(lordgun_state::fake2_w) +void lordgun_state::fake2_w(uint8_t data) { // popmessage("%02x",data); } -WRITE8_MEMBER(lordgun_state::lordgun_eeprom_w) +void lordgun_state::lordgun_eeprom_w(uint8_t data) { int i; @@ -199,7 +199,7 @@ WRITE8_MEMBER(lordgun_state::lordgun_eeprom_w) m_old = data; } -WRITE8_MEMBER(lordgun_state::aliencha_eeprom_w) +void lordgun_state::aliencha_eeprom_w(uint8_t data) { if (~data & ~0xf8) { @@ -224,7 +224,7 @@ WRITE8_MEMBER(lordgun_state::aliencha_eeprom_w) } -READ8_MEMBER(lordgun_state::aliencha_dip_r) +uint8_t lordgun_state::aliencha_dip_r() { switch (m_aliencha_dip_sel & 0x70) { @@ -238,7 +238,7 @@ READ8_MEMBER(lordgun_state::aliencha_dip_r) } } -WRITE8_MEMBER(lordgun_state::aliencha_dip_w) +void lordgun_state::aliencha_dip_w(uint8_t data) { m_aliencha_dip_sel = data; } @@ -347,7 +347,7 @@ void lordgun_state::soundmem_map(address_map &map) map(0xf000, 0xffff).ram(); } -WRITE8_MEMBER(lordgun_state::lordgun_okibank_w) +void lordgun_state::lordgun_okibank_w(uint8_t data) { m_oki->set_rom_bank((data >> 1) & 1); if (data & ~3) logerror("%s: unknown okibank bits %02x\n", machine().describe_context(), data); diff --git a/src/mame/drivers/m63.cpp b/src/mame/drivers/m63.cpp index dc5d4934e96..50cc3f7f12d 100644 --- a/src/mame/drivers/m63.cpp +++ b/src/mame/drivers/m63.cpp @@ -200,8 +200,8 @@ private: DECLARE_WRITE_LINE_MEMBER(coin2_w); DECLARE_WRITE8_MEMBER(snd_irq_w); DECLARE_WRITE8_MEMBER(snddata_w); - DECLARE_WRITE8_MEMBER(p1_w); - DECLARE_WRITE8_MEMBER(p2_w); + void p1_w(uint8_t data); + void p2_w(uint8_t data); DECLARE_READ8_MEMBER(snd_status_r); DECLARE_READ_LINE_MEMBER(irq_r); DECLARE_READ8_MEMBER(snddata_r); @@ -425,12 +425,12 @@ WRITE8_MEMBER(m63_state::snddata_w) m_sound_status = offset; } -WRITE8_MEMBER(m63_state::p1_w) +void m63_state::p1_w(uint8_t data) { m_p1 = data; } -WRITE8_MEMBER(m63_state::p2_w) +void m63_state::p2_w(uint8_t data) { m_p2 = data; if((m_p2 & 0xf0) == 0x50) diff --git a/src/mame/drivers/mainevt.cpp b/src/mame/drivers/mainevt.cpp index 6ea9e6fda18..c3723b42e18 100644 --- a/src/mame/drivers/mainevt.cpp +++ b/src/mame/drivers/mainevt.cpp @@ -387,7 +387,7 @@ INPUT_PORTS_END /*****************************************************************************/ -WRITE8_MEMBER(mainevt_state::volume_callback) +void mainevt_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data >> 4) * 0x11, 0); m_k007232->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp index 128fa91beff..1f1be5ee93d 100644 --- a/src/mame/drivers/maygay1b.cpp +++ b/src/mame/drivers/maygay1b.cpp @@ -158,14 +158,14 @@ void maygay1b_state::cpu0_nmi() ***************************************************************************/ // some games might differ.. -WRITE8_MEMBER(maygay1b_state::m1_pia_porta_w) +void maygay1b_state::m1_pia_porta_w(uint8_t data) { m_vfd->por(data & 0x40); m_vfd->data(data & 0x10); m_vfd->sclk(data & 0x20); } -WRITE8_MEMBER(maygay1b_state::m1_pia_portb_w) +void maygay1b_state::m1_pia_portb_w(uint8_t data) { for (int i = 0; i < 8; i++) { @@ -324,15 +324,14 @@ WRITE8_MEMBER(maygay1b_state::reel56_w) awp_draw_reel(machine(),"reel6", *m_reels[5]); } -READ8_MEMBER(maygay1b_state::m1_duart_r) +uint8_t maygay1b_state::m1_duart_r() { return ~(m_optic_pattern); } -WRITE8_MEMBER(maygay1b_state::m1_meter_w) +void maygay1b_state::m1_meter_w(uint8_t data) { - int i; - for (i=0; i<8; i++) + for (int i=0; i<8; i++) { if ( data & (1 << i) ) { @@ -413,10 +412,9 @@ READ8_MEMBER(maygay1b_state::m1_meter_r) //TODO: Can we just return the AY port A data? return m_meter; } -WRITE8_MEMBER(maygay1b_state::m1_lockout_w) +void maygay1b_state::m1_lockout_w(uint8_t data) { - int i; - for (i=0; i<6; i++) + for (int i=0; i<6; i++) { machine().bookkeeping().coin_lockout_w(i, data & (1 << i) ); } @@ -561,12 +559,12 @@ void maygay1b_state::m1_nec_memmap(address_map &map) * *************************************/ -WRITE8_MEMBER( maygay1b_state::scanlines_w ) +void maygay1b_state::scanlines_w(uint8_t data) { m_lamp_strobe = data; } -WRITE8_MEMBER( maygay1b_state::lamp_data_w ) +void maygay1b_state::lamp_data_w(uint8_t data) { //The two A/B ports are merged back into one, to make one row of 8 lamps. @@ -583,17 +581,17 @@ WRITE8_MEMBER( maygay1b_state::lamp_data_w ) } -READ8_MEMBER( maygay1b_state::kbd_r ) +uint8_t maygay1b_state::kbd_r() { return (m_kbd_ports[(m_lamp_strobe&0x07)^4])->read(); } -WRITE8_MEMBER( maygay1b_state::scanlines_2_w ) +void maygay1b_state::scanlines_2_w(uint8_t data) { m_lamp_strobe2 = data; } -WRITE8_MEMBER( maygay1b_state::lamp_data_2_w ) +void maygay1b_state::lamp_data_2_w(uint8_t data) { //The two A/B ports are merged back into one, to make one row of 8 lamps. @@ -636,7 +634,7 @@ WRITE8_MEMBER(maygay1b_state::main_to_mcu_1_w) } -WRITE8_MEMBER(maygay1b_state::mcu_port0_w) +void maygay1b_state::mcu_port0_w(uint8_t data) { #ifdef USE_MCU // only during startup @@ -644,7 +642,7 @@ WRITE8_MEMBER(maygay1b_state::mcu_port0_w) #endif } -WRITE8_MEMBER(maygay1b_state::mcu_port1_w) +void maygay1b_state::mcu_port1_w(uint8_t data) { #ifdef USE_MCU int bit_offset; @@ -663,7 +661,7 @@ WRITE8_MEMBER(maygay1b_state::mcu_port1_w) #endif } -WRITE8_MEMBER(maygay1b_state::mcu_port2_w) +void maygay1b_state::mcu_port2_w(uint8_t data) { #ifdef USE_MCU // only during startup @@ -671,7 +669,7 @@ WRITE8_MEMBER(maygay1b_state::mcu_port2_w) #endif } -WRITE8_MEMBER(maygay1b_state::mcu_port3_w) +void maygay1b_state::mcu_port3_w(uint8_t data) { #ifdef USE_MCU // only during startup @@ -679,7 +677,7 @@ WRITE8_MEMBER(maygay1b_state::mcu_port3_w) #endif } -READ8_MEMBER(maygay1b_state::mcu_port0_r) +uint8_t maygay1b_state::mcu_port0_r() { uint8_t ret = m_lamp_strobe; #ifdef USE_MCU @@ -693,7 +691,7 @@ READ8_MEMBER(maygay1b_state::mcu_port0_r) } -READ8_MEMBER(maygay1b_state::mcu_port2_r) +uint8_t maygay1b_state::mcu_port2_r() { // this is read in BOTH the external interrupts // it seems that both the writes from the main cpu go here diff --git a/src/mame/drivers/maygayv1.cpp b/src/mame/drivers/maygayv1.cpp index 024e0553408..59dfbd0969d 100644 --- a/src/mame/drivers/maygayv1.cpp +++ b/src/mame/drivers/maygayv1.cpp @@ -235,15 +235,15 @@ private: DECLARE_WRITE16_MEMBER(vsync_int_ctrl); DECLARE_READ8_MEMBER(mcu_r); DECLARE_WRITE8_MEMBER(mcu_w); - DECLARE_READ8_MEMBER(b_read); - DECLARE_WRITE8_MEMBER(b_writ); - DECLARE_WRITE8_MEMBER(strobe_w); - DECLARE_WRITE8_MEMBER(lamp_data_w); - DECLARE_READ8_MEMBER(kbd_r); + uint8_t b_read(); + void b_writ(uint8_t data); + void strobe_w(uint8_t data); + void lamp_data_w(uint8_t data); + uint8_t kbd_r(); uint32_t screen_update_maygayv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_maygayv1); - DECLARE_WRITE8_MEMBER(data_from_i8031); - DECLARE_READ8_MEMBER(data_to_i8031); + void data_from_i8031(uint8_t data); + uint8_t data_to_i8031(); DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(duart_txa); void main_map(address_map &map); @@ -527,12 +527,12 @@ READ16_MEMBER(maygayv1_state::read_odd) * *************************************/ -WRITE8_MEMBER( maygayv1_state::strobe_w ) +void maygayv1_state::strobe_w(uint8_t data) { m_lamp_strobe = data; } -WRITE8_MEMBER( maygayv1_state::lamp_data_w ) +void maygayv1_state::lamp_data_w(uint8_t data) { //The two A/B ports are merged back into one, to make one row of 8 lamps. @@ -551,7 +551,7 @@ WRITE8_MEMBER( maygayv1_state::lamp_data_w ) } -READ8_MEMBER( maygayv1_state::kbd_r ) +uint8_t maygayv1_state::kbd_r() { static const char *const portnames[] = { "STROBE1","STROBE2","STROBE3","STROBE4","STROBE5","STROBE6","STROBE7","STROBE8" }; @@ -842,23 +842,23 @@ WRITE_LINE_MEMBER(maygayv1_state::duart_txa) m_soundcpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE); // ? } -READ8_MEMBER(maygayv1_state::data_to_i8031) +uint8_t maygayv1_state::data_to_i8031() { return m_d68681_val; } -WRITE8_MEMBER(maygayv1_state::data_from_i8031) +void maygayv1_state::data_from_i8031(uint8_t data) { m_duart68681->rx_a_w(data); } -READ8_MEMBER(maygayv1_state::b_read) +uint8_t maygayv1_state::b_read() { // Meters - upper nibble? return 0xff; } -WRITE8_MEMBER(maygayv1_state::b_writ) +void maygayv1_state::b_writ(uint8_t data) { logerror("B WRITE %x\n",data); } diff --git a/src/mame/drivers/megazone.cpp b/src/mame/drivers/megazone.cpp index 70c3e70d790..b02a1659364 100644 --- a/src/mame/drivers/megazone.cpp +++ b/src/mame/drivers/megazone.cpp @@ -76,7 +76,7 @@ REAR BOARD 1C026 N/U (CUSTOM ON ORIGINAL) #include "speaker.h" -READ8_MEMBER(megazone_state::megazone_port_a_r) +uint8_t megazone_state::megazone_port_a_r() { int clock, timer; @@ -95,7 +95,7 @@ READ8_MEMBER(megazone_state::megazone_port_a_r) return (timer << 4) | m_i8039_status; } -WRITE8_MEMBER(megazone_state::megazone_port_b_w) +void megazone_state::megazone_port_b_w(uint8_t data) { for (int i = 0; i < 3; i++) { @@ -110,12 +110,12 @@ WRITE8_MEMBER(megazone_state::megazone_port_b_w) } } -WRITE8_MEMBER(megazone_state::megazone_i8039_irq_w) +void megazone_state::megazone_i8039_irq_w(uint8_t data) { m_daccpu->set_input_line(0, ASSERT_LINE); } -WRITE8_MEMBER(megazone_state::i8039_irqen_and_status_w) +void megazone_state::i8039_irqen_and_status_w(uint8_t data) { if ((data & 0x80) == 0) m_daccpu->set_input_line(0, CLEAR_LINE); diff --git a/src/mame/drivers/mephisto_brikett.cpp b/src/mame/drivers/mephisto_brikett.cpp index f41cfabf655..5bafbb6eb94 100644 --- a/src/mame/drivers/mephisto_brikett.cpp +++ b/src/mame/drivers/mephisto_brikett.cpp @@ -144,7 +144,7 @@ private: DECLARE_READ8_MEMBER(input_r); DECLARE_READ8_MEMBER(sound_r); - DECLARE_WRITE8_MEMBER(esb_w); + void esb_w(u8 data); DECLARE_READ_LINE_MEMBER(esb_r); TIMER_DEVICE_CALLBACK_MEMBER(speaker_off) { m_dac->write(0); } @@ -269,7 +269,7 @@ READ8_MEMBER(brikett_state::input_r) return data; } -WRITE8_MEMBER(brikett_state::esb_w) +void brikett_state::esb_w(u8 data) { // CDP1852 SR + DO0-DO7 goes to external port, to chessboard if (!m_inputs[5].read_safe(0)) diff --git a/src/mame/drivers/mephisto_mondial68k.cpp b/src/mame/drivers/mephisto_mondial68k.cpp index 4e41ccdaac8..8b41e79584f 100644 --- a/src/mame/drivers/mephisto_mondial68k.cpp +++ b/src/mame/drivers/mephisto_mondial68k.cpp @@ -51,7 +51,7 @@ protected: void mondial68k_mem(address_map &map); - DECLARE_WRITE32_MEMBER(lcd_s_w); + void lcd_s_w(u32 data); DECLARE_WRITE8_MEMBER(input_mux_w); DECLARE_WRITE8_MEMBER(board_mux_w); DECLARE_READ8_MEMBER(inputs_r); @@ -89,7 +89,7 @@ void mondial68k_state::update_display() m_display->matrix(m_input_mux >> 6, ~m_board_mux); } -WRITE32_MEMBER(mondial68k_state::lcd_s_w) +void mondial68k_state::lcd_s_w(u32 data) { // output LCD digits (note: last digit DP segment is unused) for (int i=0; i<4; i++) diff --git a/src/mame/drivers/meritm.cpp b/src/mame/drivers/meritm.cpp index 397d758ae4c..7fd77bcf074 100644 --- a/src/mame/drivers/meritm.cpp +++ b/src/mame/drivers/meritm.cpp @@ -248,15 +248,15 @@ private: DECLARE_WRITE8_MEMBER(crt250_questions_bank_w); DECLARE_WRITE8_MEMBER(ds1644_w); DECLARE_READ8_MEMBER(ds1644_r); - DECLARE_READ8_MEMBER(_8255_port_c_r); - DECLARE_WRITE8_MEMBER(crt250_port_b_w); - DECLARE_WRITE8_MEMBER(ay8930_port_b_w); - DECLARE_READ8_MEMBER(audio_pio_port_a_r); - DECLARE_READ8_MEMBER(audio_pio_port_b_r); - DECLARE_WRITE8_MEMBER(audio_pio_port_a_w); - DECLARE_WRITE8_MEMBER(audio_pio_port_b_w); - DECLARE_WRITE8_MEMBER(io_pio_port_a_w); - DECLARE_WRITE8_MEMBER(io_pio_port_b_w); + uint8_t _8255_port_c_r(); + void crt250_port_b_w(uint8_t data); + void ay8930_port_b_w(uint8_t data); + uint8_t audio_pio_port_a_r(); + uint8_t audio_pio_port_b_r(); + void audio_pio_port_a_w(uint8_t data); + void audio_pio_port_b_w(uint8_t data); + void io_pio_port_a_w(uint8_t data); + void io_pio_port_b_w(uint8_t data); DECLARE_MACHINE_START(crt250_questions); DECLARE_MACHINE_START(crt250_crt252_crt258); @@ -876,13 +876,13 @@ INPUT_PORTS_END * *************************************/ -READ8_MEMBER(meritm_state::_8255_port_c_r) +uint8_t meritm_state::_8255_port_c_r() { //logerror( "8255 port C read\n" ); return 0xff; } -WRITE8_MEMBER(meritm_state::crt250_port_b_w) +void meritm_state::crt250_port_b_w(uint8_t data) { //popmessage("Lamps: %d %d %d %d %d %d %d", BIT(data,0), BIT(data,1), BIT(data,2), BIT(data,3), BIT(data,4), BIT(data,5), BIT(data,6) ); output().set_value("P1 DISC 1 LAMP", !BIT(data,0)); @@ -905,7 +905,7 @@ WRITE8_MEMBER(meritm_state::crt250_port_b_w) Port B: Bits 0,1 used */ -WRITE8_MEMBER(meritm_state::ay8930_port_b_w) +void meritm_state::ay8930_port_b_w(uint8_t data) { // lamps } @@ -916,7 +916,7 @@ WRITE8_MEMBER(meritm_state::ay8930_port_b_w) * *************************************/ -READ8_MEMBER(meritm_state::audio_pio_port_a_r) +uint8_t meritm_state::audio_pio_port_a_r() { /* @@ -936,7 +936,7 @@ READ8_MEMBER(meritm_state::audio_pio_port_a_r) return m_vint; } -READ8_MEMBER(meritm_state::audio_pio_port_b_r) +uint8_t meritm_state::audio_pio_port_b_r() { /* @@ -956,7 +956,7 @@ READ8_MEMBER(meritm_state::audio_pio_port_b_r) return m_ds1204->read_dq(); } -WRITE8_MEMBER(meritm_state::audio_pio_port_a_w) +void meritm_state::audio_pio_port_a_w(uint8_t data) { /* @@ -977,7 +977,7 @@ WRITE8_MEMBER(meritm_state::audio_pio_port_a_w) //logerror("Writing BANK with %x (raw = %x)\n", m_bank, data); } -WRITE8_MEMBER(meritm_state::audio_pio_port_b_w) +void meritm_state::audio_pio_port_b_w(uint8_t data) { /* @@ -999,7 +999,7 @@ WRITE8_MEMBER(meritm_state::audio_pio_port_b_w) m_ds1204->write_dq(data & 0x01); } -WRITE8_MEMBER(meritm_state::io_pio_port_a_w) +void meritm_state::io_pio_port_a_w(uint8_t data) { /* @@ -1017,7 +1017,7 @@ WRITE8_MEMBER(meritm_state::io_pio_port_a_w) */ } -WRITE8_MEMBER(meritm_state::io_pio_port_b_w) +void meritm_state::io_pio_port_b_w(uint8_t data) { /* diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp index 63bb06f44b4..6cc911b804b 100644 --- a/src/mame/drivers/metro.cpp +++ b/src/mame/drivers/metro.cpp @@ -339,23 +339,23 @@ WRITE8_MEMBER(metro_state::soundstatus_w) } template -WRITE8_MEMBER(metro_state::upd7810_rombank_w) +void metro_state::upd7810_rombank_w(uint8_t data) { m_audiobank->set_entry((data >> 4) & Mask); } -READ8_MEMBER(metro_state::upd7810_porta_r) +uint8_t metro_state::upd7810_porta_r() { return m_porta; } -WRITE8_MEMBER(metro_state::upd7810_porta_w) +void metro_state::upd7810_porta_w(uint8_t data) { m_porta = data; } -WRITE8_MEMBER(metro_state::upd7810_portb_w) +void metro_state::upd7810_portb_w(uint8_t data) { /* port B layout: 7 !clock latch for message to main CPU @@ -404,7 +404,7 @@ WRITE8_MEMBER(metro_state::upd7810_portb_w) } -WRITE8_MEMBER(metro_state::daitorid_portb_w) +void metro_state::daitorid_portb_w(uint8_t data) { /* port B layout: 7 !clock latch for message to main CPU @@ -1270,7 +1270,7 @@ void metro_state::puzzlet_map(address_map &map) } -WRITE16_MEMBER(metro_state::puzzlet_portb_w) +void metro_state::puzzlet_portb_w(uint16_t data) { // popmessage("PORTB %02x", data); } diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp index 9fa97266383..bfdb49b57d8 100644 --- a/src/mame/drivers/nemesis.cpp +++ b/src/mame/drivers/nemesis.cpp @@ -375,7 +375,7 @@ WRITE8_MEMBER(nemesis_state::salamand_speech_start_w) // bit 2 is OE for VLM data } -READ8_MEMBER(nemesis_state::nemesis_portA_r) +uint8_t nemesis_state::nemesis_portA_r() { /* bit 0-3: timer @@ -1687,7 +1687,7 @@ GFXDECODE_END /******************************************************************************/ -WRITE8_MEMBER(nemesis_state::volume_callback) +void nemesis_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data >> 4) * 0x11, 0); m_k007232->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/newbrain.cpp b/src/mame/drivers/newbrain.cpp index 8504e93ba83..5413714d878 100644 --- a/src/mame/drivers/newbrain.cpp +++ b/src/mame/drivers/newbrain.cpp @@ -367,7 +367,7 @@ READ8_MEMBER( newbrain_state::ust_b_r ) // cop_in_r - //------------------------------------------------- -READ8_MEMBER( newbrain_state::cop_in_r ) +uint8_t newbrain_state::cop_in_r() { /* @@ -395,7 +395,7 @@ READ8_MEMBER( newbrain_state::cop_in_r ) // cop_g_r - //------------------------------------------------- -READ8_MEMBER( newbrain_state::cop_g_r ) +uint8_t newbrain_state::cop_g_r() { /* @@ -438,7 +438,7 @@ void newbrain_state::tm() // m_cassette2->change_state(tm2, CASSETTE_MASK_MOTOR); } -WRITE8_MEMBER( newbrain_state::cop_g_w ) +void newbrain_state::cop_g_w(uint8_t data) { /* @@ -471,7 +471,7 @@ WRITE8_MEMBER( newbrain_state::cop_g_w ) // cop_d_w - //------------------------------------------------- -WRITE8_MEMBER( newbrain_state::cop_d_w ) +void newbrain_state::cop_d_w(uint8_t data) { /* bit description diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp index a445ed2a42d..8a4cbe3bd52 100644 --- a/src/mame/drivers/odyssey2.cpp +++ b/src/mame/drivers/odyssey2.cpp @@ -61,7 +61,7 @@ protected: DECLARE_READ_LINE_MEMBER(t1_read); void odyssey2_palette(palette_device &palette) const; - DECLARE_WRITE16_MEMBER(scanline_postprocess); + void scanline_postprocess(uint16_t data); void odyssey2_io(address_map &map); void odyssey2_mem(address_map &map); @@ -84,12 +84,12 @@ protected: DECLARE_READ8_MEMBER(io_read); DECLARE_WRITE8_MEMBER(io_write); - DECLARE_READ8_MEMBER(bus_read); - DECLARE_WRITE8_MEMBER(bus_write); - DECLARE_READ8_MEMBER(p1_read); - DECLARE_WRITE8_MEMBER(p1_write); - DECLARE_READ8_MEMBER(p2_read); - DECLARE_WRITE8_MEMBER(p2_write); + uint8_t bus_read(); + void bus_write(uint8_t data); + uint8_t p1_read(); + void p1_write(uint8_t data); + uint8_t p2_read(); + void p2_write(uint8_t data); }; class g7400_state : public odyssey2_state @@ -111,14 +111,14 @@ private: void g7400_palette(palette_device &palette) const; virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_WRITE8_MEMBER(p2_write); + void p2_write(uint8_t data); DECLARE_READ8_MEMBER(io_read); DECLARE_WRITE8_MEMBER(io_write); void i8243_p4_w(uint8_t data); void i8243_p5_w(uint8_t data); void i8243_p6_w(uint8_t data); void i8243_p7_w(uint8_t data); - DECLARE_WRITE16_MEMBER(scanline_postprocess); + void scanline_postprocess(uint16_t data); void g7400_io(address_map &map); @@ -416,7 +416,7 @@ WRITE8_MEMBER(g7400_state::io_write) } -WRITE16_MEMBER(odyssey2_state::scanline_postprocess) +void odyssey2_state::scanline_postprocess(uint16_t data) { int vpos = data; bitmap_ind16 *bitmap = m_i8244->get_bitmap(); @@ -434,7 +434,7 @@ WRITE16_MEMBER(odyssey2_state::scanline_postprocess) } -WRITE16_MEMBER(g7400_state::scanline_postprocess) +void g7400_state::scanline_postprocess(uint16_t data) { int vpos = data; int y = vpos - i8244_device::START_Y - 5; @@ -489,7 +489,7 @@ READ_LINE_MEMBER(odyssey2_state::t1_read) } -READ8_MEMBER(odyssey2_state::p1_read) +uint8_t odyssey2_state::p1_read() { uint8_t data = m_p1; @@ -497,7 +497,7 @@ READ8_MEMBER(odyssey2_state::p1_read) } -WRITE8_MEMBER(odyssey2_state::p1_write) +void odyssey2_state::p1_write(uint8_t data) { m_p1 = data; m_lum = ( data & 0x80 ) >> 4; @@ -505,7 +505,7 @@ WRITE8_MEMBER(odyssey2_state::p1_write) } -READ8_MEMBER(odyssey2_state::p2_read) +uint8_t odyssey2_state::p2_read() { uint8_t h = 0xFF; int i, j; @@ -542,20 +542,20 @@ READ8_MEMBER(odyssey2_state::p2_read) } -WRITE8_MEMBER(odyssey2_state::p2_write) +void odyssey2_state::p2_write(uint8_t data) { m_p2 = data; } -WRITE8_MEMBER(g7400_state::p2_write) +void g7400_state::p2_write(uint8_t data) { m_p2 = data; m_i8243->p2_w(m_p2 & 0x0f); } -READ8_MEMBER(odyssey2_state::bus_read) +uint8_t odyssey2_state::bus_read() { uint8_t data = 0xff; @@ -573,7 +573,7 @@ READ8_MEMBER(odyssey2_state::bus_read) } -WRITE8_MEMBER(odyssey2_state::bus_write) +void odyssey2_state::bus_write(uint8_t data) { logerror("%.6f bus written %.2x\n", machine().time().as_double(), data); } diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp index e822b3b8390..b14cf664010 100644 --- a/src/mame/drivers/pandoras.cpp +++ b/src/mame/drivers/pandoras.cpp @@ -86,7 +86,7 @@ WRITE8_MEMBER(pandoras_state::pandoras_i8039_irqtrigger_w) m_mcu->set_input_line(0, ASSERT_LINE); } -WRITE8_MEMBER(pandoras_state::i8039_irqen_and_status_w) +void pandoras_state::i8039_irqen_and_status_w(uint8_t data) { /* bit 7 enables IRQ */ if ((data & 0x80) == 0) @@ -295,12 +295,12 @@ void pandoras_state::machine_reset() m_i8039_status = 0; } -READ8_MEMBER(pandoras_state::pandoras_portA_r) +uint8_t pandoras_state::pandoras_portA_r() { return m_i8039_status; } -READ8_MEMBER(pandoras_state::pandoras_portB_r) +uint8_t pandoras_state::pandoras_portB_r() { return (m_audiocpu->total_cycles() / 512) & 0x0f; } diff --git a/src/mame/drivers/parodius.cpp b/src/mame/drivers/parodius.cpp index 549f9d8c799..7366c97c11d 100644 --- a/src/mame/drivers/parodius.cpp +++ b/src/mame/drivers/parodius.cpp @@ -214,7 +214,7 @@ void parodius_state::machine_reset() m_bank2000->set_bank(0); } -WRITE8_MEMBER( parodius_state::banking_callback ) +void parodius_state::banking_callback(uint8_t data) { if (data & 0xf0) logerror("%s: setlines %02x\n", machine().describe_context(), data); diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 88088ce51af..1a3169964a2 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -59,7 +59,7 @@ private: DECLARE_WRITE8_MEMBER(bank1_w); DECLARE_WRITE8_MEMBER(bank2_w); DECLARE_READ8_MEMBER(audio_r); - DECLARE_WRITE8_MEMBER(dma8237_1_dack_w); + void dma8237_1_dack_w(uint8_t data); virtual void machine_start() override; void nvram_init(nvram_device &nvram, void *base, size_t size); static void pcat_dyn_sb_conf(device_t *device); @@ -126,7 +126,7 @@ void pcat_dyn_state::pcat_io(address_map &map) } //TODO: use atmb device -WRITE8_MEMBER( pcat_dyn_state::dma8237_1_dack_w ){ m_isabus->dack_w(1, data); } +void pcat_dyn_state::dma8237_1_dack_w(uint8_t data) { m_isabus->dack_w(1, data); } static INPUT_PORTS_START( pcat_dyn ) // M,N,Numpad 6 -- Hang diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp index bc36c582cb5..a69d810b47c 100644 --- a/src/mame/drivers/peplus.cpp +++ b/src/mame/drivers/peplus.cpp @@ -330,7 +330,7 @@ private: emu_timer *m_assert_lp_timer; DECLARE_WRITE8_MEMBER(bgcolor_w); - template DECLARE_WRITE8_MEMBER(paldata_w); + template void paldata_w(uint8_t data); DECLARE_WRITE8_MEMBER(crtc_display_w); DECLARE_WRITE8_MEMBER(duart_w); DECLARE_WRITE8_MEMBER(cmos_w); @@ -448,7 +448,7 @@ WRITE_LINE_MEMBER(peplus_state::crtc_vsync) } template -WRITE8_MEMBER(peplus_state::paldata_w) +void peplus_state::paldata_w(uint8_t data) { m_paldata[Which] = data; } diff --git a/src/mame/drivers/quickpick5.cpp b/src/mame/drivers/quickpick5.cpp index 2919d4106fe..fb934162ce8 100644 --- a/src/mame/drivers/quickpick5.cpp +++ b/src/mame/drivers/quickpick5.cpp @@ -57,7 +57,7 @@ private: K05324X_CB_MEMBER(sprite_callback); TILE_GET_INFO_MEMBER(ttl_get_tile_info); - DECLARE_WRITE8_MEMBER(ccu_int_time_w); + void ccu_int_time_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(scanline); READ8_MEMBER(control_r) { return m_control; } @@ -107,7 +107,7 @@ private: int m_ccu_int_time, m_ccu_int_time_count; }; -WRITE8_MEMBER(quickpick5_state::ccu_int_time_w) +void quickpick5_state::ccu_int_time_w(uint8_t data) { logerror("ccu_int_time rewritten with value of %02x\n", data); m_ccu_int_time = data; diff --git a/src/mame/drivers/rollerg.cpp b/src/mame/drivers/rollerg.cpp index 1c60e6bb5ea..50f861de6dd 100644 --- a/src/mame/drivers/rollerg.cpp +++ b/src/mame/drivers/rollerg.cpp @@ -238,7 +238,7 @@ void rollerg_state::machine_reset() m_readzoomroms = 0; } -WRITE8_MEMBER( rollerg_state::banking_callback ) +void rollerg_state::banking_callback(uint8_t data) { membank("bank1")->set_entry(data & 0x07); } diff --git a/src/mame/drivers/rotaryf.cpp b/src/mame/drivers/rotaryf.cpp index ea45991250d..2b288225fd6 100644 --- a/src/mame/drivers/rotaryf.cpp +++ b/src/mame/drivers/rotaryf.cpp @@ -47,10 +47,10 @@ private: required_shared_ptr m_videoram; - DECLARE_READ8_MEMBER(portb_r); - DECLARE_WRITE8_MEMBER(porta_w); - DECLARE_WRITE8_MEMBER(portc_w); - DECLARE_WRITE8_MEMBER(port30_w); + uint8_t portb_r(); + void porta_w(uint8_t data); + void portc_w(uint8_t data); + void port30_w(uint8_t data); bool m_flipscreen; uint8_t m_last; @@ -89,7 +89,7 @@ void rotaryf_state::machine_start() save_item(NAME(m_last)); } -READ8_MEMBER(rotaryf_state::portb_r) +uint8_t rotaryf_state::portb_r() { uint8_t data = ioport("INPUTS")->read(); @@ -98,7 +98,7 @@ READ8_MEMBER(rotaryf_state::portb_r) return (data & 0xCD) | ((data & 0x01) << 1) | ((data & 0x0c) << 2); } -WRITE8_MEMBER(rotaryf_state::porta_w) +void rotaryf_state::porta_w(uint8_t data) { uint8_t rising_bits = data & ~m_last; @@ -121,14 +121,14 @@ WRITE8_MEMBER(rotaryf_state::porta_w) m_last = data; } -WRITE8_MEMBER(rotaryf_state::portc_w) +void rotaryf_state::portc_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // bit 5 set when game starts, but isn't coin lockout? } -WRITE8_MEMBER(rotaryf_state::port30_w) +void rotaryf_state::port30_w(uint8_t data) { /* bit 0 = player 2 is playing */ diff --git a/src/mame/drivers/sbc6510.cpp b/src/mame/drivers/sbc6510.cpp index 1092fc0852d..1ba5b8373ff 100644 --- a/src/mame/drivers/sbc6510.cpp +++ b/src/mame/drivers/sbc6510.cpp @@ -74,12 +74,12 @@ public: void sbc6510(machine_config &config); private: - DECLARE_READ8_MEMBER(a2_r); - DECLARE_WRITE8_MEMBER(a2_w); - DECLARE_READ8_MEMBER(psg_a_r); - DECLARE_READ8_MEMBER(psg_b_r); - DECLARE_WRITE8_MEMBER(key_w); - DECLARE_READ8_MEMBER(key_r); + uint8_t a2_r(); + void a2_w(uint8_t data); + uint8_t psg_a_r(); + uint8_t psg_b_r(); + void key_w(uint8_t data); + uint8_t key_r(); void sbc6510_mem(address_map &map); void sbc6510_video_data(address_map &map); @@ -213,12 +213,12 @@ static INPUT_PORTS_START( sbc6510 ) // cbm keyboard INPUT_PORTS_END -READ8_MEMBER( sbc6510_state::a2_r ) +uint8_t sbc6510_state::a2_r() { return m_2; } -WRITE8_MEMBER( sbc6510_state::a2_w ) +void sbc6510_state::a2_w(uint8_t data) { m_2 = data; m_terminal->write(data); @@ -233,17 +233,17 @@ void sbc6510_state::machine_reset() { } -READ8_MEMBER( sbc6510_state::psg_a_r ) +uint8_t sbc6510_state::psg_a_r() { return 0xff; } -READ8_MEMBER( sbc6510_state::psg_b_r ) +uint8_t sbc6510_state::psg_b_r() { return 0x7f; } -READ8_MEMBER( sbc6510_state::key_r ) +uint8_t sbc6510_state::key_r() { u8 i, data=0; @@ -254,7 +254,7 @@ READ8_MEMBER( sbc6510_state::key_r ) return ~data; } -WRITE8_MEMBER( sbc6510_state::key_w ) +void sbc6510_state::key_w(uint8_t data) { m_key_row = data; } diff --git a/src/mame/drivers/sdk86.cpp b/src/mame/drivers/sdk86.cpp index f73518148fd..cf10a8648c8 100644 --- a/src/mame/drivers/sdk86.cpp +++ b/src/mame/drivers/sdk86.cpp @@ -52,9 +52,9 @@ public: void sdk86(machine_config &config); private: - DECLARE_WRITE8_MEMBER(scanlines_w); - DECLARE_WRITE8_MEMBER(digit_w); - DECLARE_READ8_MEMBER(kbd_r); + void scanlines_w(uint8_t data); + void digit_w(uint8_t data); + uint8_t kbd_r(); void sdk86_io(address_map &map); void sdk86_mem(address_map &map); @@ -114,18 +114,18 @@ static INPUT_PORTS_START( sdk86 ) INPUT_PORTS_END -WRITE8_MEMBER( sdk86_state::scanlines_w ) +void sdk86_state::scanlines_w(uint8_t data) { m_digit = data; } -WRITE8_MEMBER( sdk86_state::digit_w ) +void sdk86_state::digit_w(uint8_t data) { if (m_digit < 8) m_digits[m_digit] = data; } -READ8_MEMBER( sdk86_state::kbd_r ) +uint8_t sdk86_state::kbd_r() { uint8_t data = 0xff; diff --git a/src/mame/drivers/sf.cpp b/src/mame/drivers/sf.cpp index aee12dd5773..7c07de69911 100644 --- a/src/mame/drivers/sf.cpp +++ b/src/mame/drivers/sf.cpp @@ -1045,7 +1045,7 @@ ROM_START( sfjbl ) // main PCB is marked '17-51-1' on component side ROM_LOAD( "a-6.6.8f", 0x0000, 0x8000, CRC(4a9ac534) SHA1(933645f8db4756aa2a35a843c3ac6f93cb8d565d) ) ROM_REGION( 0x1000, "protcpu", 0 ) - ROM_LOAD( "c8751h-88.5o", 0x0000, 0x1000, BAD_DUMP CRC(6588891f) SHA1(699a96c682dd527dc77aa5cb2c2655136d2bfc90) ) // C8751H-88, not dumped yet for this PCB + ROM_LOAD( "c8751h-88.5o", 0x0000, 0x1000, CRC(6588891f) SHA1(699a96c682dd527dc77aa5cb2c2655136d2bfc90) ) // decapped, matches other dump from unprotected 8751 ROM_REGION( 0x40000, "audio2", 0 ) // samples CPU, identical to the original, but with half size ROMs ROM_LOAD( "a-2.2.6b", 0x00000, 0x10000, CRC(a3212da3) SHA1(4f95eb1dedbcca05016d92f62968ffce8173defe) ) diff --git a/src/mame/drivers/sitcom.cpp b/src/mame/drivers/sitcom.cpp index 49f1407cb6e..a5f2efee605 100644 --- a/src/mame/drivers/sitcom.cpp +++ b/src/mame/drivers/sitcom.cpp @@ -71,13 +71,13 @@ public: DECLARE_INPUT_CHANGED_MEMBER(update_buttons); protected: - template DECLARE_WRITE16_MEMBER(update_ds) { m_digits[(D << 2) | offset] = data; } + template void update_ds(offs_t offset, uint16_t data) { m_digits[(D << 2) | offset] = data; } DECLARE_WRITE_LINE_MEMBER(update_rxd) { m_rxd = bool(state); } DECLARE_WRITE_LINE_MEMBER(sod_led) { output().set_value("sod_led", state); } DECLARE_READ_LINE_MEMBER(sid_line) { return m_rxd ? 1 : 0; } - virtual DECLARE_WRITE8_MEMBER(update_ppi_pa); - virtual DECLARE_WRITE8_MEMBER(update_ppi_pb); + virtual void update_ppi_pa(uint8_t data); + virtual void update_ppi_pb(uint8_t data); void sitcom_bank(address_map &map); void sitcom_io(address_map &map); @@ -123,8 +123,8 @@ public: void sitcomtmr(machine_config &config); protected: - virtual DECLARE_WRITE8_MEMBER(update_ppi_pa) override; - virtual DECLARE_WRITE8_MEMBER(update_ppi_pb) override; + virtual void update_ppi_pa(uint8_t data) override; + virtual void update_ppi_pb(uint8_t data) override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; @@ -224,13 +224,13 @@ void sitcom_state::machine_reset() m_bank->set_bank(0); } -WRITE8_MEMBER( sitcom_state::update_ppi_pa ) +void sitcom_state::update_ppi_pa(uint8_t data) { for (int i = 0; 8 > i; ++i) m_leds[0][i] = BIT(data, i); } -WRITE8_MEMBER( sitcom_state::update_ppi_pb ) +void sitcom_state::update_ppi_pb(uint8_t data) { for (int i = 0; 8 > i; ++i) m_leds[1][i] = BIT(data, i); @@ -250,7 +250,7 @@ INPUT_CHANGED_MEMBER( sitcom_state::update_buttons ) } -WRITE8_MEMBER( sitcom_timer_state::update_ppi_pa ) +void sitcom_timer_state::update_ppi_pa(uint8_t data) { if (!m_dac_cs && !m_dac_wr) update_dac(data); @@ -258,7 +258,7 @@ WRITE8_MEMBER( sitcom_timer_state::update_ppi_pa ) m_ds2->data_w(data & 0x7f); } -WRITE8_MEMBER( sitcom_timer_state::update_ppi_pb ) +void sitcom_timer_state::update_ppi_pb(uint8_t data) { if (!m_dac_cs && !BIT(data, 0)) update_dac(m_ppi->pa_r()); diff --git a/src/mame/drivers/slc1a.cpp b/src/mame/drivers/slc1a.cpp index 6009bfead12..44f267fc26e 100644 --- a/src/mame/drivers/slc1a.cpp +++ b/src/mame/drivers/slc1a.cpp @@ -56,9 +56,9 @@ private: uint8_t m_matrix; - DECLARE_WRITE8_MEMBER(matrix_w); - DECLARE_WRITE8_MEMBER(pio_port_a_w); - DECLARE_READ8_MEMBER(pio_port_b_r); + void matrix_w(uint8_t data); + void pio_port_a_w(uint8_t data); + uint8_t pio_port_b_r(); }; void slc1_state::machine_start() @@ -75,7 +75,7 @@ void slc1_state::machine_start() ***************************************************************************/ -WRITE8_MEMBER(slc1_state::pio_port_a_w) +void slc1_state::pio_port_a_w(uint8_t data) { // digit segment data uint8_t digit = bitswap<8>(data,3,4,6,0,1,2,7,5); @@ -97,7 +97,7 @@ WRITE8_MEMBER(slc1_state::pio_port_a_w) ***************************************************************************/ -WRITE8_MEMBER(slc1_state::matrix_w) +void slc1_state::matrix_w(uint8_t data) { // d1: speaker out //m_dac->write(BIT(data, 1)); @@ -106,7 +106,7 @@ WRITE8_MEMBER(slc1_state::matrix_w) m_matrix = data; } -READ8_MEMBER(slc1_state::pio_port_b_r) +uint8_t slc1_state::pio_port_b_r() { uint8_t data = 0; diff --git a/src/mame/drivers/splus.cpp b/src/mame/drivers/splus.cpp index 292968ef178..265d11c78fe 100644 --- a/src/mame/drivers/splus.cpp +++ b/src/mame/drivers/splus.cpp @@ -77,14 +77,14 @@ private: return 0; } - DECLARE_WRITE8_MEMBER(splus_p1_w); + void splus_p1_w(uint8_t data); DECLARE_WRITE8_MEMBER(splus_load_pulse_w); DECLARE_WRITE8_MEMBER(splus_serial_w); DECLARE_WRITE8_MEMBER(splus_7seg_w); DECLARE_WRITE8_MEMBER(splus_duart_w); DECLARE_READ8_MEMBER(splus_serial_r); DECLARE_READ8_MEMBER(splus_m_reel_ram_r); - DECLARE_READ8_MEMBER(splus_p3_r); + uint8_t splus_p3_r(); DECLARE_READ8_MEMBER(splus_duart_r); DECLARE_READ8_MEMBER(splus_watchdog_r); DECLARE_READ8_MEMBER(splus_registers_r); @@ -166,7 +166,7 @@ static const uint8_t optics[200] = { * Write Handlers * ******************/ -WRITE8_MEMBER(splus_state::splus_p1_w) +void splus_state::splus_p1_w(uint8_t data) { // P1.0 = Reel 1 Controller // P1.1 = Reel 2 Controller @@ -520,7 +520,7 @@ READ8_MEMBER(splus_state::splus_m_reel_ram_r) return m_reel_ram[offset]; } -READ8_MEMBER(splus_state::splus_p3_r) +uint8_t splus_state::splus_p3_r() { return 0xf3; // Ignore Int0 and Int1, or machine will loop forever waiting } diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index b16e6e69bec..60a2e945350 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -97,11 +97,11 @@ private: DECLARE_WRITE8_MEMBER(bg_tile_w); DECLARE_WRITE8_MEMBER(fg_tile_w); DECLARE_WRITE8_MEMBER(fg_color_w); - DECLARE_WRITE8_MEMBER(nmi_and_coins_w); - DECLARE_WRITE8_MEMBER(leds_w); + void nmi_and_coins_w(uint8_t data); + void leds_w(uint8_t data); // spk116it and spk115it specific - DECLARE_WRITE8_MEMBER(video_and_leds_w); + void video_and_leds_w(uint8_t data); DECLARE_WRITE8_MEMBER(magic_w); DECLARE_READ8_MEMBER(magic_r); @@ -182,7 +182,7 @@ static void show_out(running_machine &machine, uint8_t *out) #endif } -WRITE8_MEMBER(spoker_state::nmi_and_coins_w) +void spoker_state::nmi_and_coins_w(uint8_t data) { if ((data) & (0x22)) { @@ -206,7 +206,7 @@ WRITE8_MEMBER(spoker_state::nmi_and_coins_w) show_out(machine(), m_out); } -WRITE8_MEMBER(spoker_state::video_and_leds_w) +void spoker_state::video_and_leds_w(uint8_t data) { m_leds[4] = BIT(data, 0); // start? m_leds[5] = BIT(data, 2); // l_bet? @@ -218,7 +218,7 @@ WRITE8_MEMBER(spoker_state::video_and_leds_w) show_out(machine(), m_out); } -WRITE8_MEMBER(spoker_state::leds_w) +void spoker_state::leds_w(uint8_t data) { m_leds[0] = BIT(data, 0); // stop_1 m_leds[1] = BIT(data, 1); // stop_2 diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp index dacaf45fa28..1b429af55a0 100644 --- a/src/mame/drivers/spy.cpp +++ b/src/mame/drivers/spy.cpp @@ -448,13 +448,13 @@ INPUT_PORTS_END -WRITE8_MEMBER(spy_state::volume_callback0) +void spy_state::volume_callback0(uint8_t data) { m_k007232_1->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_1->set_volume(1, 0, (data & 0x0f) * 0x11); } -WRITE8_MEMBER(spy_state::volume_callback1) +void spy_state::volume_callback1(uint8_t data) { m_k007232_2->set_volume(0, (data >> 4) * 0x11, 0); m_k007232_2->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/suprgolf.cpp b/src/mame/drivers/suprgolf.cpp index ec87ab2aa5f..cea6f3ed21b 100644 --- a/src/mame/drivers/suprgolf.cpp +++ b/src/mame/drivers/suprgolf.cpp @@ -79,15 +79,15 @@ private: DECLARE_WRITE8_MEMBER(pen_w); DECLARE_WRITE8_MEMBER(adpcm_data_w); DECLARE_WRITE8_MEMBER(rom2_bank_select_w); - DECLARE_READ8_MEMBER(vregs_r); - DECLARE_WRITE8_MEMBER(vregs_w); - DECLARE_READ8_MEMBER(rom_bank_select_r); - DECLARE_WRITE8_MEMBER(rom_bank_select_w); - DECLARE_READ8_MEMBER(pedal_extra_bits_r); - DECLARE_READ8_MEMBER(p1_r); - DECLARE_READ8_MEMBER(p2_r); - DECLARE_WRITE8_MEMBER(writeA); - DECLARE_WRITE8_MEMBER(writeB); + uint8_t vregs_r(); + void vregs_w(uint8_t data); + uint8_t rom_bank_select_r(); + void rom_bank_select_w(uint8_t data); + uint8_t pedal_extra_bits_r(); + uint8_t p1_r(); + uint8_t p2_r(); + void writeA(uint8_t data); + void writeB(uint8_t data); DECLARE_WRITE_LINE_MEMBER(adpcm_int); TILE_GET_INFO_MEMBER(get_tile_info); @@ -207,12 +207,12 @@ WRITE8_MEMBER(suprgolf_state::videoram_w) } } -READ8_MEMBER(suprgolf_state::vregs_r) +uint8_t suprgolf_state::vregs_r() { return m_vreg_bank; } -WRITE8_MEMBER(suprgolf_state::vregs_w) +void suprgolf_state::vregs_w(uint8_t data) { //printf("%02x\n",data); @@ -298,12 +298,12 @@ WRITE8_MEMBER(suprgolf_state::adpcm_data_w) m_msm5205next = data; } -READ8_MEMBER(suprgolf_state::rom_bank_select_r) +uint8_t suprgolf_state::rom_bank_select_r() { return m_rom_bank; } -WRITE8_MEMBER(suprgolf_state::rom_bank_select_w) +void suprgolf_state::rom_bank_select_w(uint8_t data) { m_rom_bank = data; @@ -324,7 +324,7 @@ WRITE8_MEMBER(suprgolf_state::rom2_bank_select_w) printf("Rom bank select 2 with data %02x activated\n",data); } -READ8_MEMBER(suprgolf_state::pedal_extra_bits_r) +uint8_t suprgolf_state::pedal_extra_bits_r() { uint8_t p1_sht_sw,p2_sht_sw; @@ -334,12 +334,12 @@ READ8_MEMBER(suprgolf_state::pedal_extra_bits_r) return p1_sht_sw | p2_sht_sw; } -READ8_MEMBER(suprgolf_state::p1_r) +uint8_t suprgolf_state::p1_r() { return (ioport("P1")->read() & 0xf0) | ((ioport("P1_ANALOG")->read() & 0xf)); } -READ8_MEMBER(suprgolf_state::p2_r) +uint8_t suprgolf_state::p2_r() { return (ioport("P2")->read() & 0xf0) | ((ioport("P2_ANALOG")->read() & 0xf)); } @@ -450,12 +450,12 @@ static INPUT_PORTS_START( suprgolf ) PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW2:8" ) INPUT_PORTS_END -WRITE8_MEMBER(suprgolf_state::writeA) +void suprgolf_state::writeA(uint8_t data) { osd_printf_debug("ymwA\n"); } -WRITE8_MEMBER(suprgolf_state::writeB) +void suprgolf_state::writeB(uint8_t data) { osd_printf_debug("ymwA\n"); } diff --git a/src/mame/drivers/surpratk.cpp b/src/mame/drivers/surpratk.cpp index 8e768ddc45b..bb6bfbf4f30 100644 --- a/src/mame/drivers/surpratk.cpp +++ b/src/mame/drivers/surpratk.cpp @@ -155,7 +155,7 @@ void surpratk_state::machine_reset() m_sprite_colorbase = 0; } -WRITE8_MEMBER( surpratk_state::banking_callback ) +void surpratk_state::banking_callback(uint8_t data) { // logerror("%s: setlines %02x\n", machine().describe_context(), data); membank("bank1")->set_entry(data & 0x1f); diff --git a/src/mame/drivers/test_t400.cpp b/src/mame/drivers/test_t400.cpp index cdefb163259..05c3a907066 100644 --- a/src/mame/drivers/test_t400.cpp +++ b/src/mame/drivers/test_t400.cpp @@ -22,11 +22,11 @@ public: void test_t420(machine_config &config); private: - DECLARE_WRITE8_MEMBER( port_l_w ); + void port_l_w(uint8_t data); required_device m_maincpu; }; -WRITE8_MEMBER( t400_test_suite_state::port_l_w ) +void t400_test_suite_state::port_l_w(uint8_t data) { // printf("L: %u\n", data); } diff --git a/src/mame/drivers/timeplt.cpp b/src/mame/drivers/timeplt.cpp index 3f642b07a75..2a9e3ef9709 100644 --- a/src/mame/drivers/timeplt.cpp +++ b/src/mame/drivers/timeplt.cpp @@ -102,7 +102,7 @@ READ8_MEMBER(timeplt_state::psurge_protection_r) } // chkun has access to an extra soundchip via ay2 port a -WRITE8_MEMBER(timeplt_state::chkun_sound_w) +void timeplt_state::chkun_sound_w(uint8_t data) { // d0-d3: P0-P3 // d5: /R (unused?) diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp index 4a57cfcfffb..fc86a3dda0f 100644 --- a/src/mame/drivers/tmnt.cpp +++ b/src/mame/drivers/tmnt.cpp @@ -1899,7 +1899,7 @@ static INPUT_PORTS_START( prmrsocr ) INPUT_PORTS_END -WRITE8_MEMBER(tmnt_state::volume_callback) +void tmnt_state::volume_callback(uint8_t data) { m_k007232->set_volume(0, (data >> 4) * 0x11, 0); m_k007232->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/toratora.cpp b/src/mame/drivers/toratora.cpp index 8def7118f0d..639f8ad548e 100644 --- a/src/mame/drivers/toratora.cpp +++ b/src/mame/drivers/toratora.cpp @@ -84,13 +84,13 @@ private: DECLARE_READ8_MEMBER(timer_r); DECLARE_WRITE8_MEMBER(clear_timer_w); DECLARE_WRITE_LINE_MEMBER(cb2_u2_w); - DECLARE_WRITE8_MEMBER(port_b_u1_w); + void port_b_u1_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(main_cpu_irq); - DECLARE_WRITE8_MEMBER(sn1_port_a_u3_w); - DECLARE_WRITE8_MEMBER(sn1_port_b_u3_w); + void sn1_port_a_u3_w(uint8_t data); + void sn1_port_b_u3_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(sn1_ca2_u3_w); - DECLARE_WRITE8_MEMBER(sn2_port_a_u2_w); - DECLARE_WRITE8_MEMBER(sn2_port_b_u2_w); + void sn2_port_a_u2_w(uint8_t data); + void sn2_port_b_u2_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(sn2_ca2_u2_w); virtual void machine_start() override; virtual void machine_reset() override; @@ -163,7 +163,7 @@ WRITE8_MEMBER(toratora_state::clear_tv_w) * *************************************/ -WRITE8_MEMBER(toratora_state::port_b_u1_w) +void toratora_state::port_b_u1_w(uint8_t data) { if (m_pia_u1->port_b_z_mask() & 0x20) machine().bookkeeping().coin_counter_w(0, 1); @@ -225,14 +225,14 @@ WRITE8_MEMBER(toratora_state::clear_timer_w) *************************************/ -WRITE8_MEMBER(toratora_state::sn1_port_a_u3_w) +void toratora_state::sn1_port_a_u3_w(uint8_t data) { m_sn1->vco_voltage_w(2.35 * (data & 0x7f) / 128.0); m_sn1->enable_w((data >> 7) & 0x01); } -WRITE8_MEMBER(toratora_state::sn1_port_b_u3_w) +void toratora_state::sn1_port_b_u3_w(uint8_t data) { static const double resistances[] = { @@ -269,14 +269,14 @@ WRITE_LINE_MEMBER(toratora_state::sn1_ca2_u3_w) m_sn1->vco_w(state); } -WRITE8_MEMBER(toratora_state::sn2_port_a_u2_w) +void toratora_state::sn2_port_a_u2_w(uint8_t data) { m_sn2->vco_voltage_w(2.35 * (data & 0x7f) / 128.0); m_sn2->enable_w((data >> 7) & 0x01); } -WRITE8_MEMBER(toratora_state::sn2_port_b_u2_w) +void toratora_state::sn2_port_b_u2_w(uint8_t data) { static const double resistances[] = { diff --git a/src/mame/drivers/trvquest.cpp b/src/mame/drivers/trvquest.cpp index 587e37b2ad5..e8a4c9db208 100644 --- a/src/mame/drivers/trvquest.cpp +++ b/src/mame/drivers/trvquest.cpp @@ -32,7 +32,7 @@ as is. driver by Pierpaolo Prazzoli Notes: -- Hardware is similar to the one in gameplan.c +- Hardware is similar to the one in gameplan.cpp */ @@ -46,7 +46,7 @@ Notes: #include "speaker.h" -READ8_MEMBER(gameplan_state::trvquest_question_r) +uint8_t gameplan_state::trvquest_question_r(offs_t offset) { return memregion("questions")->base()[*m_trvquest_question * 0x2000 + offset]; } diff --git a/src/mame/drivers/twin16.cpp b/src/mame/drivers/twin16.cpp index 47b834326ed..9ac145cb775 100644 --- a/src/mame/drivers/twin16.cpp +++ b/src/mame/drivers/twin16.cpp @@ -628,7 +628,7 @@ GFXDECODE_END /* Sound Interfaces */ -WRITE8_MEMBER(twin16_state::volume_callback) +void twin16_state::volume_callback(uint8_t data) { m_k007232->set_volume(0,(data >> 4) * 0x11,0); m_k007232->set_volume(1,0,(data & 0x0f) * 0x11); diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp index e98208e0b22..54a6d2cb308 100644 --- a/src/mame/drivers/vendetta.cpp +++ b/src/mame/drivers/vendetta.cpp @@ -417,7 +417,7 @@ void vendetta_state::machine_reset() m_irq_enabled = 0; } -WRITE8_MEMBER( vendetta_state::banking_callback ) +void vendetta_state::banking_callback(uint8_t data) { if (data >= 0x1c) logerror("%s Unknown bank selected %02x\n", machine().describe_context(), data); diff --git a/src/mame/drivers/videopkr.cpp b/src/mame/drivers/videopkr.cpp index ebc407d5905..50bf6d44fcc 100644 --- a/src/mame/drivers/videopkr.cpp +++ b/src/mame/drivers/videopkr.cpp @@ -326,20 +326,20 @@ public: private: DECLARE_READ8_MEMBER(videopkr_io_r); DECLARE_WRITE8_MEMBER(videopkr_io_w); - DECLARE_READ8_MEMBER(videopkr_p1_data_r); - DECLARE_READ8_MEMBER(videopkr_p2_data_r); - DECLARE_WRITE8_MEMBER(videopkr_p1_data_w); - DECLARE_WRITE8_MEMBER(videopkr_p2_data_w); + uint8_t videopkr_p1_data_r(); + uint8_t videopkr_p2_data_r(); + void videopkr_p1_data_w(uint8_t data); + void videopkr_p2_data_w(uint8_t data); DECLARE_READ_LINE_MEMBER(videopkr_t0_latch); DECLARE_WRITE_LINE_MEMBER(prog_w); DECLARE_READ8_MEMBER(sound_io_r); DECLARE_WRITE8_MEMBER(sound_io_w); - DECLARE_READ8_MEMBER(sound_p2_r); - DECLARE_WRITE8_MEMBER(sound_p2_w); - DECLARE_READ8_MEMBER(baby_sound_p0_r); - DECLARE_WRITE8_MEMBER(baby_sound_p0_w); - DECLARE_READ8_MEMBER(baby_sound_p1_r); - DECLARE_WRITE8_MEMBER(baby_sound_p3_w); + uint8_t sound_p2_r(); + void sound_p2_w(uint8_t data); + uint8_t baby_sound_p0_r(); + void baby_sound_p0_w(uint8_t data); + uint8_t baby_sound_p1_r(); + void baby_sound_p3_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); void videopkr_palette(palette_device &palette) const; DECLARE_VIDEO_START(vidadcba); @@ -698,17 +698,17 @@ WRITE8_MEMBER(videopkr_state::videopkr_io_w) } } -READ8_MEMBER(videopkr_state::videopkr_p1_data_r) +uint8_t videopkr_state::videopkr_p1_data_r() { return m_p1; } -READ8_MEMBER(videopkr_state::videopkr_p2_data_r) +uint8_t videopkr_state::videopkr_p2_data_r() { return m_p2; } -WRITE8_MEMBER(videopkr_state::videopkr_p1_data_w) +void videopkr_state::videopkr_p1_data_w(uint8_t data) { m_p1 = data; @@ -750,7 +750,7 @@ WRITE8_MEMBER(videopkr_state::videopkr_p1_data_w) m_ant_jckp = m_jckp; } -WRITE8_MEMBER(videopkr_state::videopkr_p2_data_w) +void videopkr_state::videopkr_p2_data_w(uint8_t data) { m_p2 = data; } @@ -833,12 +833,12 @@ WRITE8_MEMBER(videopkr_state::sound_io_w) } } -READ8_MEMBER(videopkr_state::sound_p2_r) +uint8_t videopkr_state::sound_p2_r() { return m_vp_sound_p2; } -WRITE8_MEMBER(videopkr_state::sound_p2_w) +void videopkr_state::sound_p2_w(uint8_t data) { m_vp_sound_p2 = data; @@ -870,17 +870,17 @@ WRITE8_MEMBER(videopkr_state::sound_p2_w) /* Baby Sound Handlers */ -READ8_MEMBER(videopkr_state::baby_sound_p0_r) +uint8_t videopkr_state::baby_sound_p0_r() { return m_sbp0; } -WRITE8_MEMBER(videopkr_state::baby_sound_p0_w) +void videopkr_state::baby_sound_p0_w(uint8_t data) { m_sbp0 = data; } -READ8_MEMBER(videopkr_state::baby_sound_p1_r) +uint8_t videopkr_state::baby_sound_p1_r() { m_c_io = (m_p1 >> 5) & 1; m_hp_1 = (~m_p24_data >> 6) & 1; @@ -890,7 +890,7 @@ READ8_MEMBER(videopkr_state::baby_sound_p1_r) return m_c_io | (m_hp_1 << 1) | (m_hp_2 << 2) | (m_bell << 3) | (m_aux3 << 4) | 0xe0; } -WRITE8_MEMBER(videopkr_state::baby_sound_p3_w) +void videopkr_state::baby_sound_p3_w(uint8_t data) { uint8_t lmp_ports, ay_intf; lmp_ports = data >> 1 & 0x07; diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp index adc29cf0e82..3b14850648f 100644 --- a/src/mame/drivers/wecleman.cpp +++ b/src/mame/drivers/wecleman.cpp @@ -635,7 +635,7 @@ WRITE8_MEMBER(wecleman_state::multiply_w) ** sample playing ends when a byte with bit 7 set is reached **/ -WRITE8_MEMBER(wecleman_state::wecleman_volume_callback) +void wecleman_state::wecleman_volume_callback(uint8_t data) { m_k007232[0]->set_volume(0, (data >> 4) * 0x11, 0); m_k007232[0]->set_volume(1, 0, (data & 0x0f) * 0x11); diff --git a/src/mame/drivers/wink.cpp b/src/mame/drivers/wink.cpp index 65a2080f504..8620839d388 100644 --- a/src/mame/drivers/wink.cpp +++ b/src/mame/drivers/wink.cpp @@ -63,7 +63,7 @@ private: DECLARE_WRITE8_MEMBER(sound_irq_w); DECLARE_READ8_MEMBER(prot_r); DECLARE_WRITE8_MEMBER(prot_w); - DECLARE_READ8_MEMBER(sound_r); + uint8_t sound_r(); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -361,7 +361,7 @@ static GFXDECODE_START( gfx_wink ) GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 4 ) GFXDECODE_END -READ8_MEMBER(wink_state::sound_r) +uint8_t wink_state::sound_r() { return m_sound_flag; } diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index b26fdbd041c..5832b83f177 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -71,7 +71,7 @@ private: K051316_CB_MEMBER(zoom_callback); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/abc1600.h b/src/mame/includes/abc1600.h index 1a15fcb766c..ecd4a238f19 100644 --- a/src/mame/includes/abc1600.h +++ b/src/mame/includes/abc1600.h @@ -117,11 +117,11 @@ public: DECLARE_WRITE_LINE_MEMBER( dbrq_w ); - DECLARE_READ8_MEMBER( cio_pa_r ); - DECLARE_READ8_MEMBER( cio_pb_r ); - DECLARE_WRITE8_MEMBER( cio_pb_w ); - DECLARE_READ8_MEMBER( cio_pc_r ); - DECLARE_WRITE8_MEMBER( cio_pc_w ); + uint8_t cio_pa_r(); + uint8_t cio_pb_r(); + void cio_pb_w(uint8_t data); + uint8_t cio_pc_r(); + void cio_pc_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( nmi_w ); diff --git a/src/mame/includes/abc80.h b/src/mame/includes/abc80.h index b89da1fb058..2e4f0e1fe90 100644 --- a/src/mame/includes/abc80.h +++ b/src/mame/includes/abc80.h @@ -142,9 +142,9 @@ public: DECLARE_WRITE_LINE_MEMBER( vco_voltage_w ); - DECLARE_READ8_MEMBER( pio_pa_r ); - DECLARE_READ8_MEMBER( pio_pb_r ); - DECLARE_WRITE8_MEMBER( pio_pb_w ); + uint8_t pio_pa_r(); + uint8_t pio_pb_r(); + void pio_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( keydown_w ); void kbd_w(u8 data); diff --git a/src/mame/includes/abc80x.h b/src/mame/includes/abc80x.h index f7e30043ce0..f04b70a5a39 100644 --- a/src/mame/includes/abc80x.h +++ b/src/mame/includes/abc80x.h @@ -211,7 +211,7 @@ public: void hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( char_ram_r ); + uint8_t char_ram_r(offs_t offset); void abc800c_palette(palette_device &palette) const; void abc800c(machine_config &config); void abc800c_video(machine_config &config); diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h index cbb7a31f09c..6dba7a9e698 100644 --- a/src/mame/includes/ajax.h +++ b/src/mame/includes/ajax.h @@ -41,8 +41,8 @@ public: DECLARE_WRITE8_MEMBER(lamps_w); DECLARE_WRITE8_MEMBER(k007232_extvol_w); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(volume_callback0); - DECLARE_WRITE8_MEMBER(volume_callback1); + void volume_callback0(uint8_t data); + void volume_callback1(uint8_t data); K051316_CB_MEMBER(zoom_callback); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); diff --git a/src/mame/includes/aliens.h b/src/mame/includes/aliens.h index 609b67f79b3..48e8cc1a5e2 100644 --- a/src/mame/includes/aliens.h +++ b/src/mame/includes/aliens.h @@ -46,14 +46,14 @@ public: DECLARE_WRITE8_MEMBER(aliens_sh_irqtrigger_w); DECLARE_READ8_MEMBER(k052109_051960_r); DECLARE_WRITE8_MEMBER(k052109_051960_w); - DECLARE_WRITE8_MEMBER(aliens_snd_bankswitch_w); + void aliens_snd_bankswitch_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_aliens(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); void aliens(machine_config &config); void aliens_map(address_map &map); void aliens_sound_map(address_map &map); diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index 8642e16d11b..e37a6f80952 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -114,7 +114,7 @@ public: DECLARE_WRITE8_MEMBER(protected_ram_enable_w); DECLARE_READ8_MEMBER(protected_ram_r); DECLARE_WRITE8_MEMBER(protected_ram_w); - DECLARE_READ8_MEMBER(input_mux_r); + uint8_t input_mux_r(offs_t offset); template DECLARE_WRITE_LINE_MEMBER(coin_counter_w); template DECLARE_WRITE_LINE_MEMBER(sparkle_w); DECLARE_WRITE_LINE_MEMBER(gorf_sound_switch_w); @@ -158,7 +158,7 @@ public: void init_sparklestar(); virtual void machine_start() override; - DECLARE_WRITE8_MEMBER(votrax_speech_w); + void votrax_speech_w(uint8_t data); DECLARE_READ_LINE_MEMBER( votrax_speech_status_r ); void astrocade_base(machine_config &config); diff --git a/src/mame/includes/baraduke.h b/src/mame/includes/baraduke.h index 917bd500886..8c3a1178ad0 100644 --- a/src/mame/includes/baraduke.h +++ b/src/mame/includes/baraduke.h @@ -26,11 +26,11 @@ public: m_lamps(*this, "lamp%u", 0U) { } - DECLARE_WRITE8_MEMBER(inputport_select_w); - DECLARE_READ8_MEMBER(inputport_r); - DECLARE_WRITE8_MEMBER(baraduke_lamps_w); - DECLARE_WRITE8_MEMBER(baraduke_irq_ack_w); - DECLARE_READ8_MEMBER(soundkludge_r); + void inputport_select_w(uint8_t data); + uint8_t inputport_r(); + void baraduke_lamps_w(uint8_t data); + void baraduke_irq_ack_w(uint8_t data); + uint8_t soundkludge_r(); DECLARE_READ8_MEMBER(baraduke_videoram_r); DECLARE_WRITE8_MEMBER(baraduke_videoram_w); DECLARE_READ8_MEMBER(baraduke_textram_r); diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h index 44357dde603..89709fcbeed 100644 --- a/src/mame/includes/bladestl.h +++ b/src/mame/includes/bladestl.h @@ -42,7 +42,7 @@ public: /* devices */ DECLARE_READ8_MEMBER(trackball_r); DECLARE_WRITE8_MEMBER(bladestl_bankswitch_w); - DECLARE_WRITE8_MEMBER(bladestl_port_B_w); + void bladestl_port_B_w(uint8_t data); DECLARE_READ8_MEMBER(bladestl_speech_busy_r); DECLARE_WRITE8_MEMBER(bladestl_speech_ctrl_w); void bladestl_palette(palette_device &palette) const; diff --git a/src/mame/includes/blueprnt.h b/src/mame/includes/blueprnt.h index aba9cf20950..c4a798c41ae 100644 --- a/src/mame/includes/blueprnt.h +++ b/src/mame/includes/blueprnt.h @@ -55,7 +55,7 @@ public: DECLARE_WRITE8_MEMBER(blueprnt_videoram_w); DECLARE_WRITE8_MEMBER(blueprnt_colorram_w); DECLARE_WRITE8_MEMBER(blueprnt_flipscreen_w); - DECLARE_WRITE8_MEMBER(dipsw_w); + void dipsw_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/bottom9.h b/src/mame/includes/bottom9.h index a132758868d..4c43831bb46 100644 --- a/src/mame/includes/bottom9.h +++ b/src/mame/includes/bottom9.h @@ -62,8 +62,8 @@ public: virtual void machine_reset() override; uint32_t screen_update_bottom9(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(bottom9_sound_interrupt); - DECLARE_WRITE8_MEMBER(volume_callback0); - DECLARE_WRITE8_MEMBER(volume_callback1); + void volume_callback0(uint8_t data); + void volume_callback1(uint8_t data); K051316_CB_MEMBER(zoom_callback); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); diff --git a/src/mame/includes/chqflag.h b/src/mame/includes/chqflag.h index a69717bc06d..6eea620bec3 100644 --- a/src/mame/includes/chqflag.h +++ b/src/mame/includes/chqflag.h @@ -41,8 +41,8 @@ public: DECLARE_READ8_MEMBER(analog_read_r); DECLARE_WRITE8_MEMBER(k007232_bankswitch_w); DECLARE_WRITE8_MEMBER(k007232_extvolume_w); - DECLARE_WRITE8_MEMBER(volume_callback0); - DECLARE_WRITE8_MEMBER(volume_callback1); + void volume_callback0(uint8_t data); + void volume_callback1(uint8_t data); DECLARE_WRITE_LINE_MEMBER(background_brt_w); K051316_CB_MEMBER(zoom_callback_1); K051316_CB_MEMBER(zoom_callback_2); diff --git a/src/mame/includes/combatsc.h b/src/mame/includes/combatsc.h index 57ac5f6f52f..3fc18a36bd9 100644 --- a/src/mame/includes/combatsc.h +++ b/src/mame/includes/combatsc.h @@ -99,7 +99,7 @@ public: DECLARE_READ8_MEMBER(combatsc_busy_r); DECLARE_WRITE8_MEMBER(combatsc_play_w); DECLARE_WRITE8_MEMBER(combatsc_voice_reset_w); - DECLARE_WRITE8_MEMBER(combatsc_portA_w); + void combatsc_portA_w(uint8_t data); DECLARE_WRITE8_MEMBER(combatscb_msm_w); DECLARE_WRITE8_MEMBER(combatscb_sound_irq_ack); void init_combatsc(); diff --git a/src/mame/includes/crimfght.h b/src/mame/includes/crimfght.h index 8e0924e042c..cfd2bd1c04c 100644 --- a/src/mame/includes/crimfght.h +++ b/src/mame/includes/crimfght.h @@ -50,13 +50,13 @@ public: DECLARE_READ8_MEMBER(k052109_051960_r); DECLARE_WRITE8_MEMBER(k052109_051960_w); IRQ_CALLBACK_MEMBER(audiocpu_irq_ack); - DECLARE_WRITE8_MEMBER(ym2151_ct_w); + void ym2151_ct_w(uint8_t data); virtual void machine_start() override; uint32_t screen_update_crimfght(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); DECLARE_CUSTOM_INPUT_MEMBER(system_r); void crimfght(machine_config &config); diff --git a/src/mame/includes/ddribble.h b/src/mame/includes/ddribble.h index 45d1a7d88ae..1b72fc0e5c3 100644 --- a/src/mame/includes/ddribble.h +++ b/src/mame/includes/ddribble.h @@ -75,8 +75,8 @@ private: DECLARE_WRITE8_MEMBER(K005885_1_w); DECLARE_WRITE8_MEMBER(ddribble_fg_videoram_w); DECLARE_WRITE8_MEMBER(ddribble_bg_videoram_w); - DECLARE_READ8_MEMBER(ddribble_vlm5030_busy_r); - DECLARE_WRITE8_MEMBER(ddribble_vlm5030_ctrl_w); + uint8_t ddribble_vlm5030_busy_r(); + void ddribble_vlm5030_ctrl_w(uint8_t data); TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); diff --git a/src/mame/includes/digdug.h b/src/mame/includes/digdug.h index 313ebb05ddb..95b1be0892a 100644 --- a/src/mame/includes/digdug.h +++ b/src/mame/includes/digdug.h @@ -41,7 +41,7 @@ private: uint32_t screen_update_digdug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER(digdug_videoram_w); - DECLARE_WRITE8_MEMBER(bg_select_w); + void bg_select_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(tx_color_mode_w); DECLARE_WRITE_LINE_MEMBER(bg_disable_w); diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index 8c72f1c3d31..8f8646a88d7 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -92,14 +92,14 @@ private: DECLARE_WRITE8_MEMBER(slavecpu_bankswitch_w); DECLARE_WRITE8_MEMBER(coin_count_w); DECLARE_WRITE8_MEMBER(soundcpu_bankswitch_w); - DECLARE_READ8_MEMBER(beast_p0_r); - DECLARE_WRITE8_MEMBER(beast_p0_w); - DECLARE_READ8_MEMBER(beast_p1_r); - DECLARE_WRITE8_MEMBER(beast_p1_w); - DECLARE_READ8_MEMBER(beast_p2_r); - DECLARE_WRITE8_MEMBER(beast_p2_w); - DECLARE_READ8_MEMBER(beast_p3_r); - DECLARE_WRITE8_MEMBER(beast_p3_w); + uint8_t beast_p0_r(); + void beast_p0_w(uint8_t data); + uint8_t beast_p1_r(); + void beast_p1_w(uint8_t data); + uint8_t beast_p2_r(); + void beast_p2_w(uint8_t data); + uint8_t beast_p3_r(); + void beast_p3_w(uint8_t data); DECLARE_WRITE8_MEMBER(djboy_scrollx_w); DECLARE_WRITE8_MEMBER(djboy_scrolly_w); DECLARE_WRITE8_MEMBER(djboy_videoram_w); diff --git a/src/mame/includes/exerion.h b/src/mame/includes/exerion.h index e5547146658..edc900fabfe 100644 --- a/src/mame/includes/exerion.h +++ b/src/mame/includes/exerion.h @@ -76,12 +76,12 @@ private: required_device m_screen; required_device m_palette; - DECLARE_READ8_MEMBER(exerion_protection_r); + uint8_t exerion_protection_r(offs_t offset); DECLARE_WRITE8_MEMBER(exerion_videoreg_w); DECLARE_WRITE8_MEMBER(exerion_video_latch_w); DECLARE_READ8_MEMBER(exerion_video_timing_r); - DECLARE_READ8_MEMBER(exerion_porta_r); - DECLARE_WRITE8_MEMBER(exerion_portb_w); + uint8_t exerion_porta_r(); + void exerion_portb_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/fastfred.h b/src/mame/includes/fastfred.h index 0a5efe8377b..d747af2d5d0 100644 --- a/src/mame/includes/fastfred.h +++ b/src/mame/includes/fastfred.h @@ -67,11 +67,11 @@ private: DECLARE_READ8_MEMBER(jumpcoas_custom_io_r); DECLARE_READ8_MEMBER(boggy84_custom_io_r); DECLARE_WRITE_LINE_MEMBER(imago_dma_irq_w); - DECLARE_WRITE8_MEMBER(imago_sprites_bank_w); + void imago_sprites_bank_w(uint8_t data); DECLARE_WRITE8_MEMBER(imago_sprites_dma_w); DECLARE_READ8_MEMBER(imago_sprites_offset_r); DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); - DECLARE_WRITE8_MEMBER(sound_nmi_mask_w); + void sound_nmi_mask_w(uint8_t data); DECLARE_WRITE8_MEMBER(fastfred_videoram_w); DECLARE_WRITE8_MEMBER(fastfred_attributes_w); DECLARE_WRITE_LINE_MEMBER(charbank1_w); diff --git a/src/mame/includes/fastlane.h b/src/mame/includes/fastlane.h index dd139c48f47..80d755efe4e 100644 --- a/src/mame/includes/fastlane.h +++ b/src/mame/includes/fastlane.h @@ -76,8 +76,8 @@ private: void fastlane_palette(palette_device &palette) const; uint32_t screen_update_fastlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(fastlane_scanline); - DECLARE_WRITE8_MEMBER(volume_callback0); - DECLARE_WRITE8_MEMBER(volume_callback1); + void volume_callback0(uint8_t data); + void volume_callback1(uint8_t data); void fastlane_map(address_map &map); }; diff --git a/src/mame/includes/finalizr.h b/src/mame/includes/finalizr.h index d5e09023f6b..1c23dc64e36 100644 --- a/src/mame/includes/finalizr.h +++ b/src/mame/includes/finalizr.h @@ -65,7 +65,7 @@ private: DECLARE_WRITE8_MEMBER(finalizr_coin_w); DECLARE_WRITE8_MEMBER(finalizr_flipscreen_w); DECLARE_WRITE8_MEMBER(finalizr_i8039_irq_w); - DECLARE_WRITE8_MEMBER(i8039_irqen_w); + void i8039_irqen_w(uint8_t data); DECLARE_READ_LINE_MEMBER(i8039_t1_r); DECLARE_WRITE8_MEMBER(i8039_t0_w); DECLARE_WRITE8_MEMBER(finalizr_videoctrl_w); diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h index 46232fe7366..7983b62a011 100644 --- a/src/mame/includes/flkatck.h +++ b/src/mame/includes/flkatck.h @@ -70,7 +70,7 @@ private: virtual void video_start() override; uint32_t screen_update_flkatck(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(flkatck_interrupt); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); void flkatck_map(address_map &map); void flkatck_sound_map(address_map &map); }; diff --git a/src/mame/includes/fm7.h b/src/mame/includes/fm7.h index 5a8f07ac8b7..0a3e78a0a9c 100644 --- a/src/mame/includes/fm7.h +++ b/src/mame/includes/fm7.h @@ -138,7 +138,6 @@ public: m_kb_ports(*this, "key%u", 1), m_keymod(*this, "key_modifiers"), m_joy1(*this, "joy1"), - m_joy2(*this, "joy2"), m_dsw(*this, "DSW"), m_palette(*this, "palette"), m_av_palette(*this, "av_palette"), @@ -176,8 +175,6 @@ private: DECLARE_WRITE_LINE_MEMBER(fm7_fdc_intrq_w); DECLARE_WRITE_LINE_MEMBER(fm7_fdc_drq_w); - DECLARE_READ8_MEMBER(fm77av_joy_1_r); - DECLARE_READ8_MEMBER(fm77av_joy_2_r); DECLARE_WRITE_LINE_MEMBER(fm77av_fmirq); DECLARE_READ8_MEMBER(fm7_subintf_r); @@ -393,7 +390,6 @@ private: required_ioport_array<3> m_kb_ports; required_ioport m_keymod; required_ioport m_joy1; - required_ioport m_joy2; required_ioport m_dsw; required_device m_palette; optional_device m_av_palette; diff --git a/src/mame/includes/fmtowns.h b/src/mame/includes/fmtowns.h index 8d69e4a59c3..5565a33cdd8 100644 --- a/src/mame/includes/fmtowns.h +++ b/src/mame/includes/fmtowns.h @@ -167,8 +167,8 @@ protected: DECLARE_WRITE_LINE_MEMBER(towns_scsi_irq); DECLARE_WRITE_LINE_MEMBER(towns_scsi_drq); - DECLARE_READ16_MEMBER(towns_scsi_dma_r); - DECLARE_WRITE16_MEMBER(towns_scsi_dma_w); + uint16_t towns_scsi_dma_r(); + void towns_scsi_dma_w(uint16_t data); private: /* devices */ @@ -414,7 +414,7 @@ private: DECLARE_WRITE_LINE_MEMBER(towns_pit_out0_changed); DECLARE_WRITE_LINE_MEMBER(towns_pit_out1_changed); DECLARE_WRITE_LINE_MEMBER(pit2_out1_changed); - DECLARE_READ8_MEMBER(get_slave_ack); + uint8_t get_slave_ack(offs_t offset); DECLARE_WRITE_LINE_MEMBER(towns_fm_irq); void towns_crtc_refresh_mode(); void towns_update_kanji_offset(); @@ -431,11 +431,11 @@ private: inline uint8_t byte_to_bcd(uint8_t val); inline uint8_t bcd_to_byte(uint8_t val); inline uint32_t msf_to_lbafm(uint32_t val); // because the CDROM core doesn't provide this; - DECLARE_READ16_MEMBER(towns_fdc_dma_r); - DECLARE_WRITE16_MEMBER(towns_fdc_dma_w); + uint16_t towns_fdc_dma_r(); + void towns_fdc_dma_w(uint16_t data); void towns_cdrom_set_irq(int line,int state); uint8_t towns_cd_get_track(); - DECLARE_READ16_MEMBER(towns_cdrom_dma_r); + uint16_t towns_cdrom_dma_r(); }; class towns16_state : public towns_state diff --git a/src/mame/includes/funworld.h b/src/mame/includes/funworld.h index 7168d56c7ee..4bed1e1bc19 100644 --- a/src/mame/includes/funworld.h +++ b/src/mame/includes/funworld.h @@ -47,8 +47,8 @@ public: protected: DECLARE_WRITE8_MEMBER(funworld_videoram_w); DECLARE_WRITE8_MEMBER(funworld_colorram_w); - DECLARE_WRITE8_MEMBER(funworld_lamp_a_w); - DECLARE_WRITE8_MEMBER(funworld_lamp_b_w); + void funworld_lamp_a_w(uint8_t data); + void funworld_lamp_b_w(uint8_t data); virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; @@ -66,8 +66,8 @@ private: DECLARE_READ8_MEMBER(questions_r); DECLARE_WRITE8_MEMBER(question_bank_w); DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w); - DECLARE_READ8_MEMBER(funquiz_ay8910_a_r); - DECLARE_READ8_MEMBER(funquiz_ay8910_b_r); + uint8_t funquiz_ay8910_a_r(); + uint8_t funquiz_ay8910_b_r(); void cuoreuno_map(address_map &map); void funquiz_map(address_map &map); diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h index 6d0f4dc8eb4..d1e512cbc22 100644 --- a/src/mame/includes/gaelco3d.h +++ b/src/mame/includes/gaelco3d.h @@ -148,7 +148,7 @@ private: DECLARE_WRITE_LINE_MEMBER(analog_port_latch_w); DECLARE_READ32_MEMBER(tms_m68k_ram_r); DECLARE_WRITE32_MEMBER(tms_m68k_ram_w); - DECLARE_WRITE8_MEMBER(tms_iack_w); + void tms_iack_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(tms_reset_w); DECLARE_WRITE_LINE_MEMBER(tms_irq_w); DECLARE_WRITE_LINE_MEMBER(tms_control3_w); @@ -169,7 +169,7 @@ private: INTERRUPT_GEN_MEMBER(vblank_gen); TIMER_DEVICE_CALLBACK_MEMBER(adsp_autobuffer_irq); void gaelco3d_render(screen_device &screen); - DECLARE_WRITE32_MEMBER(adsp_tx_callback); + void adsp_tx_callback(offs_t offset, uint32_t data); DECLARE_WRITE_LINE_MEMBER(fp_analog_clock_w); void adsp_data_map(address_map &map); diff --git a/src/mame/includes/galaga.h b/src/mame/includes/galaga.h index eab6dbb7c73..05492459167 100644 --- a/src/mame/includes/galaga.h +++ b/src/mame/includes/galaga.h @@ -47,10 +47,10 @@ public: DECLARE_WRITE_LINE_MEMBER(nmion_w); DECLARE_WRITE8_MEMBER(galaga_videoram_w); DECLARE_WRITE_LINE_MEMBER(gatsbee_bank_w); - DECLARE_WRITE8_MEMBER(out); + void out(uint8_t data); DECLARE_WRITE_LINE_MEMBER(lockout); - DECLARE_READ8_MEMBER(namco_52xx_rom_r); - DECLARE_READ8_MEMBER(namco_52xx_si_r); + uint8_t namco_52xx_rom_r(offs_t offset); + uint8_t namco_52xx_si_r(); void init_galaga(); void init_gatsbee(); TILEMAP_MAPPER_MEMBER(tilemap_scan); diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index f730f1803e3..5279c61ae4d 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -115,8 +115,8 @@ public: DECLARE_WRITE8_MEMBER(konami_sound_filter_w); DECLARE_READ8_MEMBER(theend_ppi8255_r); DECLARE_WRITE8_MEMBER(theend_ppi8255_w); - DECLARE_WRITE8_MEMBER(theend_protection_w); - DECLARE_READ8_MEMBER(theend_protection_r); + void theend_protection_w(uint8_t data); + uint8_t theend_protection_r(); template DECLARE_READ_LINE_MEMBER(theend_protection_alt_r); DECLARE_WRITE8_MEMBER(explorer_sound_control_w); DECLARE_READ8_MEMBER(sfx_sample_io_r); @@ -159,22 +159,22 @@ public: DECLARE_WRITE8_MEMBER(froggeram_ppi8255_w); DECLARE_WRITE8_MEMBER(artic_gfxbank_w); DECLARE_READ8_MEMBER(tenspot_dsw_read); - DECLARE_WRITE8_MEMBER(konami_sound_control_w); - DECLARE_READ8_MEMBER(konami_sound_timer_r); - DECLARE_WRITE8_MEMBER(konami_portc_0_w); - DECLARE_WRITE8_MEMBER(konami_portc_1_w); - DECLARE_WRITE8_MEMBER(theend_coin_counter_w); - DECLARE_READ8_MEMBER(explorer_sound_latch_r); - DECLARE_WRITE8_MEMBER(sfx_sample_control_w); - DECLARE_WRITE8_MEMBER(monsterz_porta_1_w); - DECLARE_WRITE8_MEMBER(monsterz_portb_1_w); - DECLARE_WRITE8_MEMBER(monsterz_portc_1_w); - DECLARE_READ8_MEMBER(frogger_sound_timer_r); - DECLARE_READ8_MEMBER(scorpion_protection_r); - DECLARE_WRITE8_MEMBER(scorpion_protection_w); - DECLARE_WRITE8_MEMBER(scorpion_digitalker_control_w); + void konami_sound_control_w(uint8_t data); + uint8_t konami_sound_timer_r(); + void konami_portc_0_w(uint8_t data); + void konami_portc_1_w(uint8_t data); + void theend_coin_counter_w(uint8_t data); + uint8_t explorer_sound_latch_r(); + void sfx_sample_control_w(uint8_t data); + void monsterz_porta_1_w(uint8_t data); + void monsterz_portb_1_w(uint8_t data); + void monsterz_portc_1_w(uint8_t data); + uint8_t frogger_sound_timer_r(); + uint8_t scorpion_protection_r(); + void scorpion_protection_w(uint8_t data); + void scorpion_digitalker_control_w(uint8_t data); DECLARE_WRITE8_MEMBER(kingball_dac_w); - DECLARE_WRITE8_MEMBER(moonwar_port_select_w); + void moonwar_port_select_w(uint8_t data); void init_fourplay(); void init_videight(); void init_galaxian(); diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index 3949ac17a24..c080c9dd38e 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -155,7 +155,7 @@ public: DECLARE_WRITE8_MEMBER(dambustr_bg_color_w); DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback); DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback); - DECLARE_READ8_MEMBER(rescueb_a002_r) { return 0xfc; } + uint8_t rescueb_a002_r() { return 0xfc; } template DECLARE_READ_LINE_MEMBER(_4in1_fake_port_r); template DECLARE_READ_LINE_MEMBER(vpool_lives_r); template DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r); diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index dcab096a92d..e0583a5e643 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -83,14 +83,13 @@ private: optional_device m_soundlatch; - DECLARE_WRITE8_MEMBER(io_select_w); - DECLARE_READ8_MEMBER(io_port_r); + void io_select_w(uint8_t data); + uint8_t io_port_r(); DECLARE_WRITE_LINE_MEMBER(coin_w); DECLARE_WRITE_LINE_MEMBER(audio_reset_w); - DECLARE_WRITE8_MEMBER(audio_cmd_w); + void audio_cmd_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(audio_trigger_w); DECLARE_WRITE_LINE_MEMBER(r6532_irq); - DECLARE_WRITE8_MEMBER(r6532_soundlatch_w); DECLARE_MACHINE_START(gameplan); DECLARE_MACHINE_RESET(gameplan); DECLARE_MACHINE_START(trvquest); @@ -99,15 +98,15 @@ private: uint32_t screen_update_leprechn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(clear_screen_done_callback); TIMER_CALLBACK_MEMBER(via_irq_delayed); - DECLARE_WRITE8_MEMBER(video_data_w); - DECLARE_WRITE8_MEMBER(gameplan_video_command_w); - DECLARE_WRITE8_MEMBER(leprechn_video_command_w); - DECLARE_READ8_MEMBER(leprechn_videoram_r); + void video_data_w(uint8_t data); + void gameplan_video_command_w(uint8_t data); + void leprechn_video_command_w(uint8_t data); + uint8_t leprechn_videoram_r(); DECLARE_WRITE_LINE_MEMBER(video_command_trigger_w); void gameplan_get_pens( pen_t *pens ); void leprechn_get_pens( pen_t *pens ); DECLARE_WRITE_LINE_MEMBER(via_irq); - DECLARE_READ8_MEMBER(trvquest_question_r); + uint8_t trvquest_question_r(offs_t offset); DECLARE_WRITE_LINE_MEMBER(trvquest_coin_w); DECLARE_WRITE_LINE_MEMBER(trvquest_misc_w); diff --git a/src/mame/includes/gaplus.h b/src/mame/includes/gaplus.h index 74e227dd09f..3e9b0745176 100644 --- a/src/mame/includes/gaplus.h +++ b/src/mame/includes/gaplus.h @@ -153,8 +153,8 @@ public: protected: virtual void machine_start() override; - DECLARE_WRITE8_MEMBER(out_lamps0); - DECLARE_WRITE8_MEMBER(out_lamps1); + void out_lamps0(uint8_t data); + void out_lamps1(uint8_t data); output_finder<2> m_lamps; }; diff --git a/src/mame/includes/gatron.h b/src/mame/includes/gatron.h index 82aed496533..1b784c7853c 100644 --- a/src/mame/includes/gatron.h +++ b/src/mame/includes/gatron.h @@ -25,9 +25,9 @@ private: output_finder<9> m_lamps; tilemap_t *m_bg_tilemap; - DECLARE_WRITE8_MEMBER(output_port_0_w); - DECLARE_WRITE8_MEMBER(videoram_w); - DECLARE_WRITE8_MEMBER(output_port_1_w); + void output_port_0_w(uint8_t data); + void videoram_w(offs_t offset, uint8_t data); + void output_port_1_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h index e44e1512bb2..f93e2ecf2a6 100644 --- a/src/mame/includes/goldstar.h +++ b/src/mame/includes/goldstar.h @@ -47,8 +47,8 @@ public: DECLARE_WRITE8_MEMBER(goldstar_reel2_ram_w); DECLARE_WRITE8_MEMBER(goldstar_reel3_ram_w); DECLARE_WRITE8_MEMBER(goldstar_fa00_w); - DECLARE_WRITE8_MEMBER(ay8910_outputa_w); - DECLARE_WRITE8_MEMBER(ay8910_outputb_w); + void ay8910_outputa_w(uint8_t data); + void ay8910_outputb_w(uint8_t data); void init_chryangl(); void init_goldstar(); void init_jkrmast(); @@ -226,10 +226,10 @@ public: DECLARE_WRITE8_MEMBER(magodds_outb850_w); DECLARE_WRITE8_MEMBER(magodds_outb860_w); - DECLARE_WRITE8_MEMBER(fl7w4_outc802_w); - DECLARE_WRITE8_MEMBER(system_outputa_w); - DECLARE_WRITE8_MEMBER(system_outputb_w); - DECLARE_WRITE8_MEMBER(system_outputc_w); + void fl7w4_outc802_w(uint8_t data); + void system_outputa_w(uint8_t data); + void system_outputb_w(uint8_t data); + void system_outputc_w(uint8_t data); void init_lucky8a(); void init_lucky8f(); diff --git a/src/mame/includes/gradius3.h b/src/mame/includes/gradius3.h index ba7b5fff9e8..61b7347e1fd 100644 --- a/src/mame/includes/gradius3.h +++ b/src/mame/includes/gradius3.h @@ -67,7 +67,7 @@ private: INTERRUPT_GEN_MEMBER(cpuA_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(gradius3_sub_scanline); void gradius3_postload(); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); void gradius3_map(address_map &map); diff --git a/src/mame/includes/gyruss.h b/src/mame/includes/gyruss.h index df368d3530d..79cf6bc0e17 100644 --- a/src/mame/includes/gyruss.h +++ b/src/mame/includes/gyruss.h @@ -57,20 +57,20 @@ private: uint8_t m_slave_irq_mask; bool m_flipscreen; - DECLARE_WRITE8_MEMBER(gyruss_irq_clear_w); - DECLARE_WRITE8_MEMBER(gyruss_sh_irqtrigger_w); - DECLARE_WRITE8_MEMBER(gyruss_i8039_irq_w); + void gyruss_irq_clear_w(uint8_t data); + void gyruss_sh_irqtrigger_w(uint8_t data); + void gyruss_i8039_irq_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(master_nmi_mask_w); - DECLARE_WRITE8_MEMBER(slave_irq_mask_w); + void slave_irq_mask_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); DECLARE_WRITE8_MEMBER(gyruss_spriteram_w); DECLARE_READ8_MEMBER(gyruss_scanline_r); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); - DECLARE_READ8_MEMBER(gyruss_portA_r); - DECLARE_WRITE8_MEMBER(gyruss_dac_w); - DECLARE_WRITE8_MEMBER(gyruss_filter0_w); - DECLARE_WRITE8_MEMBER(gyruss_filter1_w); + uint8_t gyruss_portA_r(); + void gyruss_dac_w(uint8_t data); + void gyruss_filter0_w(uint8_t data); + void gyruss_filter1_w(uint8_t data); TILE_GET_INFO_MEMBER(gyruss_get_tile_info); virtual void machine_start() override; virtual void video_start() override; @@ -78,7 +78,7 @@ private: uint32_t screen_update_gyruss(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void filter_w(address_space &space, int chip, int data ); + void filter_w(int chip, int data ); void audio_cpu1_io_map(address_map &map); void audio_cpu1_map(address_map &map); void audio_cpu2_io_map(address_map &map); diff --git a/src/mame/includes/hcastle.h b/src/mame/includes/hcastle.h index f546449a1e9..f8dcd282fed 100644 --- a/src/mame/includes/hcastle.h +++ b/src/mame/includes/hcastle.h @@ -77,7 +77,7 @@ private: void hcastle_palette(palette_device &palette) const; uint32_t screen_update_hcastle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, uint8_t *sbank, int bank ); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; diff --git a/src/mame/includes/hexion.h b/src/mame/includes/hexion.h index 6496eaeaa41..658da5a0d0b 100644 --- a/src/mame/includes/hexion.h +++ b/src/mame/includes/hexion.h @@ -48,7 +48,7 @@ private: DECLARE_WRITE8_MEMBER(gfxrom_select_w); DECLARE_WRITE_LINE_MEMBER(irq_ack_w); DECLARE_WRITE_LINE_MEMBER(nmi_ack_w); - DECLARE_WRITE8_MEMBER(ccu_int_time_w); + void ccu_int_time_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info0); TILE_GET_INFO_MEMBER(get_tile_info1); diff --git a/src/mame/includes/himesiki.h b/src/mame/includes/himesiki.h index b5d42e6af77..b2d7fc84bb6 100644 --- a/src/mame/includes/himesiki.h +++ b/src/mame/includes/himesiki.h @@ -52,8 +52,8 @@ private: required_device m_palette; required_device m_soundlatch; - DECLARE_WRITE8_MEMBER(himesiki_rombank_w); - DECLARE_WRITE8_MEMBER(himesiki_sound_w); + void himesiki_rombank_w(uint8_t data); + void himesiki_sound_w(uint8_t data); DECLARE_WRITE8_MEMBER(himesiki_bg_ram_w); DECLARE_WRITE8_MEMBER(himesiki_scrollx_w); DECLARE_WRITE8_MEMBER(himesiki_scrolly_w); diff --git a/src/mame/includes/homerun.h b/src/mame/includes/homerun.h index d2ffeef345f..d17667d153b 100644 --- a/src/mame/includes/homerun.h +++ b/src/mame/includes/homerun.h @@ -64,10 +64,10 @@ private: void control_w(u8 data); void d7756_sample_w(u8 data); - DECLARE_WRITE8_MEMBER(videoram_w); - DECLARE_WRITE8_MEMBER(scrollhi_w); - DECLARE_WRITE8_MEMBER(scrolly_w); - DECLARE_WRITE8_MEMBER(scrollx_w); + void videoram_w(offs_t offset, u8 data); + void scrollhi_w(u8 data); + void scrolly_w(u8 data); + void scrollx_w(u8 data); static rgb_t homerun_RGB332(u32 raw); TILE_GET_INFO_MEMBER(get_tile_info); diff --git a/src/mame/includes/hp48.h b/src/mame/includes/hp48.h index 01f9f4e8024..4b1cda4e264 100644 --- a/src/mame/includes/hp48.h +++ b/src/mame/includes/hp48.h @@ -113,16 +113,16 @@ private: /* memory controller */ DECLARE_WRITE_LINE_MEMBER(mem_reset); - DECLARE_WRITE32_MEMBER(mem_config); - DECLARE_WRITE32_MEMBER(mem_unconfig); - DECLARE_READ32_MEMBER(mem_id); + void mem_config(uint32_t data); + void mem_unconfig(uint32_t data); + uint32_t mem_id(); /* CRC computation */ - DECLARE_WRITE32_MEMBER(mem_crc); + void mem_crc(offs_t offset, uint32_t data); /* IN/OUT registers */ - DECLARE_READ32_MEMBER(reg_in); - DECLARE_WRITE32_MEMBER(reg_out); + uint32_t reg_in(); + void reg_out(uint32_t data); /* keyboard interrupt system */ DECLARE_WRITE_LINE_MEMBER(rsi); diff --git a/src/mame/includes/iqblock.h b/src/mame/includes/iqblock.h index 57e1ffa5fe8..db797bd01c1 100644 --- a/src/mame/includes/iqblock.h +++ b/src/mame/includes/iqblock.h @@ -44,7 +44,7 @@ private: DECLARE_WRITE8_MEMBER(fgvideoram_w); DECLARE_WRITE8_MEMBER(bgvideoram_w); DECLARE_WRITE8_MEMBER(fgscroll_w); - DECLARE_WRITE8_MEMBER(port_C_w); + void port_C_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(irq); diff --git a/src/mame/includes/ironhors.h b/src/mame/includes/ironhors.h index 6eea4b11dd7..d17988d3894 100644 --- a/src/mame/includes/ironhors.h +++ b/src/mame/includes/ironhors.h @@ -47,8 +47,7 @@ private: DECLARE_WRITE8_MEMBER(charbank_w); DECLARE_WRITE8_MEMBER(palettebank_w); DECLARE_WRITE8_MEMBER(flipscreen_w); - DECLARE_WRITE8_MEMBER(filter_w); - DECLARE_READ8_MEMBER(farwest_soundlatch_r); + void filter_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_farwest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index 13e4ca70bf2..bc6729301d3 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -136,7 +136,7 @@ protected: DECLARE_WRITE8_MEMBER(nmi_ack_w); DECLARE_WRITE8_MEMBER(blitter_bank_w); DECLARE_WRITE8_MEMBER(rimrockn_bank_w); - DECLARE_WRITE8_MEMBER(pia_portb_out); + void pia_portb_out(uint8_t data); DECLARE_WRITE8_MEMBER(gtg2_sound_data_w); DECLARE_WRITE8_MEMBER(grom_bank_w); DECLARE_WRITE8_MEMBER(palette_w); @@ -145,8 +145,8 @@ protected: DECLARE_WRITE8_MEMBER(blitter_w); DECLARE_WRITE8_MEMBER(tms34061_w); DECLARE_READ8_MEMBER(tms34061_r); - DECLARE_WRITE8_MEMBER(pia_porta_out); - DECLARE_WRITE8_MEMBER(ym2203_portb_out); + void pia_porta_out(uint8_t data); + void ym2203_portb_out(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h index cbfec3351f3..5f37d58f48b 100644 --- a/src/mame/includes/jpmimpct.h +++ b/src/mame/includes/jpmimpct.h @@ -101,10 +101,10 @@ private: DECLARE_WRITE16_MEMBER(volume_w); DECLARE_WRITE16_MEMBER(upd7759_w); DECLARE_READ16_MEMBER(upd7759_r); - DECLARE_READ8_MEMBER(hopper_b_r); - DECLARE_READ8_MEMBER(hopper_c_r); - DECLARE_WRITE8_MEMBER(payen_a_w); - DECLARE_WRITE8_MEMBER(display_c_w); + uint8_t hopper_b_r(); + uint8_t hopper_c_r(); + void payen_a_w(uint8_t data); + void display_c_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(tms_irq); TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); diff --git a/src/mame/includes/jpmsys5.h b/src/mame/includes/jpmsys5.h index e94cbcce9c1..39cde833a19 100644 --- a/src/mame/includes/jpmsys5.h +++ b/src/mame/includes/jpmsys5.h @@ -46,8 +46,8 @@ public: DECLARE_WRITE_LINE_MEMBER(a1_tx_w); DECLARE_WRITE_LINE_MEMBER(a2_tx_w); - DECLARE_READ8_MEMBER(u29_porta_r); - DECLARE_WRITE8_MEMBER(u29_portb_w); + uint8_t u29_porta_r(); + void u29_portb_w(uint8_t data); protected: virtual void machine_start() override; diff --git a/src/mame/includes/kaypro.h b/src/mame/includes/kaypro.h index 03cbe8296b3..28ef1759183 100644 --- a/src/mame/includes/kaypro.h +++ b/src/mame/includes/kaypro.h @@ -50,9 +50,9 @@ public: DECLARE_WRITE8_MEMBER(kaypro484_index_w); DECLARE_WRITE8_MEMBER(kaypro484_register_w); DECLARE_WRITE8_MEMBER(kaypro484_videoram_w); - DECLARE_READ8_MEMBER(pio_system_r); - DECLARE_WRITE8_MEMBER(kayproii_pio_system_w); - DECLARE_WRITE8_MEMBER(kayproiv_pio_system_w); + uint8_t pio_system_r(); + void kayproii_pio_system_w(uint8_t data); + void kayproiv_pio_system_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); DECLARE_READ8_MEMBER(kaypro_videoram_r); diff --git a/src/mame/includes/lordgun.h b/src/mame/includes/lordgun.h index 22e0be35d42..633d6935325 100644 --- a/src/mame/includes/lordgun.h +++ b/src/mame/includes/lordgun.h @@ -84,13 +84,13 @@ private: DECLARE_READ16_MEMBER(lordgun_gun_1_y_r); DECLARE_WRITE16_MEMBER(soundlatch_w); template DECLARE_WRITE16_MEMBER(vram_w); - DECLARE_WRITE8_MEMBER(fake_w); - DECLARE_WRITE8_MEMBER(fake2_w); - DECLARE_WRITE8_MEMBER(lordgun_eeprom_w); - DECLARE_WRITE8_MEMBER(aliencha_eeprom_w); - DECLARE_READ8_MEMBER(aliencha_dip_r); - DECLARE_WRITE8_MEMBER(aliencha_dip_w); - DECLARE_WRITE8_MEMBER(lordgun_okibank_w); + void fake_w(uint8_t data); + void fake2_w(uint8_t data); + void lordgun_eeprom_w(uint8_t data); + void aliencha_eeprom_w(uint8_t data); + uint8_t aliencha_dip_r(); + void aliencha_dip_w(uint8_t data); + void lordgun_okibank_w(uint8_t data); template TILE_GET_INFO_MEMBER(get_tile_info); diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 7368b7348b9..8ebd35935fb 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -52,7 +52,7 @@ private: DECLARE_WRITE_LINE_MEMBER(dv_vblank_w); INTERRUPT_GEN_MEMBER(mainevt_sound_timer_irq); INTERRUPT_GEN_MEMBER(devstors_sound_timer_irq); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); K052109_CB_MEMBER(mainevt_tile_callback); K052109_CB_MEMBER(dv_tile_callback); K051960_CB_MEMBER(mainevt_sprite_callback); diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index b3c3809e084..a0e2fa52cc4 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -93,11 +93,11 @@ private: uint8_t m_Lamps[256]; int m_optic_pattern; template DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); } - DECLARE_WRITE8_MEMBER(scanlines_w); - DECLARE_WRITE8_MEMBER(scanlines_2_w); - DECLARE_WRITE8_MEMBER(lamp_data_w); - DECLARE_WRITE8_MEMBER(lamp_data_2_w); - DECLARE_READ8_MEMBER(kbd_r); + void scanlines_w(uint8_t data); + void scanlines_2_w(uint8_t data); + void lamp_data_w(uint8_t data); + void lamp_data_2_w(uint8_t data); + uint8_t kbd_r(); DECLARE_WRITE8_MEMBER(reel12_w); DECLARE_WRITE8_MEMBER(reel34_w); DECLARE_WRITE8_MEMBER(reel56_w); @@ -112,10 +112,10 @@ private: DECLARE_READ8_MEMBER(latch_st_hi); DECLARE_READ8_MEMBER(latch_st_lo); DECLARE_WRITE8_MEMBER(m1ab_no_oki_w); - DECLARE_WRITE8_MEMBER(m1_pia_porta_w); - DECLARE_WRITE8_MEMBER(m1_pia_portb_w); - DECLARE_WRITE8_MEMBER(m1_lockout_w); - DECLARE_WRITE8_MEMBER(m1_meter_w); + void m1_pia_porta_w(uint8_t data); + void m1_pia_portb_w(uint8_t data); + void m1_lockout_w(uint8_t data); + void m1_meter_w(uint8_t data); DECLARE_READ8_MEMBER(m1_meter_r); DECLARE_READ8_MEMBER(m1_firq_clr_r); DECLARE_READ8_MEMBER(m1_firq_trg_r); @@ -124,13 +124,13 @@ private: DECLARE_WRITE8_MEMBER(nec_bank0_w); DECLARE_WRITE8_MEMBER(nec_bank1_w); DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); - DECLARE_READ8_MEMBER(m1_duart_r); - DECLARE_WRITE8_MEMBER(mcu_port0_w); - DECLARE_WRITE8_MEMBER(mcu_port1_w); - DECLARE_WRITE8_MEMBER(mcu_port2_w); - DECLARE_WRITE8_MEMBER(mcu_port3_w); - DECLARE_READ8_MEMBER(mcu_port0_r); - DECLARE_READ8_MEMBER(mcu_port2_r); + uint8_t m1_duart_r(); + void mcu_port0_w(uint8_t data); + void mcu_port1_w(uint8_t data); + void mcu_port2_w(uint8_t data); + void mcu_port3_w(uint8_t data); + uint8_t mcu_port0_r(); + uint8_t mcu_port2_r(); DECLARE_WRITE8_MEMBER(main_to_mcu_0_w); DECLARE_WRITE8_MEMBER(main_to_mcu_1_w); diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h index 7573acd4439..6d9f36a8eb1 100644 --- a/src/mame/includes/megazone.h +++ b/src/mame/includes/megazone.h @@ -62,14 +62,14 @@ private: required_device_array m_filter; uint8_t m_irq_mask; - DECLARE_WRITE8_MEMBER(megazone_i8039_irq_w); - DECLARE_WRITE8_MEMBER(i8039_irqen_and_status_w); + void megazone_i8039_irq_w(uint8_t data); + void i8039_irqen_and_status_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); DECLARE_WRITE_LINE_MEMBER(irq_mask_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); - DECLARE_READ8_MEMBER(megazone_port_a_r); - DECLARE_WRITE8_MEMBER(megazone_port_b_w); + uint8_t megazone_port_a_r(); + void megazone_port_b_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index aa8c8546299..076b385259a 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -114,18 +114,18 @@ private: TIMER_CALLBACK_MEMBER(sound_data_sync); DECLARE_READ8_MEMBER(soundstatus_r); DECLARE_WRITE8_MEMBER(soundstatus_w); - template DECLARE_WRITE8_MEMBER(upd7810_rombank_w); - DECLARE_READ8_MEMBER(upd7810_porta_r); - DECLARE_WRITE8_MEMBER(upd7810_porta_w); - DECLARE_WRITE8_MEMBER(upd7810_portb_w); - DECLARE_WRITE8_MEMBER(daitorid_portb_w); + template void upd7810_rombank_w(uint8_t data); + uint8_t upd7810_porta_r(); + void upd7810_porta_w(uint8_t data); + void upd7810_portb_w(uint8_t data); + void daitorid_portb_w(uint8_t data); DECLARE_WRITE8_MEMBER(coin_lockout_1word_w); DECLARE_WRITE16_MEMBER(coin_lockout_4words_w); DECLARE_READ16_MEMBER(balcube_dsw_r); DECLARE_READ16_MEMBER(gakusai_input_r); DECLARE_WRITE8_MEMBER(blzntrnd_sh_bankswitch_w); DECLARE_WRITE16_MEMBER(puzzlet_irq_enable_w); - DECLARE_WRITE16_MEMBER(puzzlet_portb_w); + void puzzlet_portb_w(uint16_t data); DECLARE_WRITE16_MEMBER(k053936_w); DECLARE_WRITE8_MEMBER(gakusai_oki_bank_hi_w); DECLARE_WRITE8_MEMBER(gakusai_oki_bank_lo_w); diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index cec7817ddbd..5face5ec934 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -141,7 +141,7 @@ private: DECLARE_WRITE8_MEMBER(nemesis_filter_w); DECLARE_WRITE8_MEMBER(gx400_speech_start_w); DECLARE_WRITE8_MEMBER(salamand_speech_start_w); - DECLARE_READ8_MEMBER(nemesis_portA_r); + uint8_t nemesis_portA_r(); DECLARE_WRITE8_MEMBER(city_sound_bank_w); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -160,7 +160,7 @@ private: void create_palette_lookups(); void nemesis_postload(); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); void set_screen_raw_params(machine_config &config); void blkpnthr_map(address_map &map); diff --git a/src/mame/includes/newbrain.h b/src/mame/includes/newbrain.h index b52184ce58f..90689676942 100644 --- a/src/mame/includes/newbrain.h +++ b/src/mame/includes/newbrain.h @@ -68,10 +68,10 @@ private: DECLARE_READ8_MEMBER( ust_a_r ); DECLARE_READ8_MEMBER( ust_b_r ); - DECLARE_WRITE8_MEMBER( cop_g_w ); - DECLARE_READ8_MEMBER( cop_g_r ); - DECLARE_WRITE8_MEMBER( cop_d_w ); - DECLARE_READ8_MEMBER( cop_in_r ); + void cop_g_w(uint8_t data); + uint8_t cop_g_r(); + void cop_d_w(uint8_t data); + uint8_t cop_in_r(); DECLARE_WRITE_LINE_MEMBER( k2_w ); DECLARE_READ_LINE_MEMBER( tdi_r ); DECLARE_WRITE_LINE_MEMBER( k1_w ); diff --git a/src/mame/includes/pandoras.h b/src/mame/includes/pandoras.h index 0598d443943..b0d000d7cc2 100644 --- a/src/mame/includes/pandoras.h +++ b/src/mame/includes/pandoras.h @@ -58,7 +58,7 @@ public: DECLARE_WRITE8_MEMBER(pandoras_cpua_irqtrigger_w); DECLARE_WRITE8_MEMBER(pandoras_cpub_irqtrigger_w); DECLARE_WRITE8_MEMBER(pandoras_i8039_irqtrigger_w); - DECLARE_WRITE8_MEMBER(i8039_irqen_and_status_w); + void i8039_irqen_and_status_w(uint8_t data); DECLARE_WRITE8_MEMBER(pandoras_z80_irqtrigger_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); @@ -66,8 +66,8 @@ public: DECLARE_WRITE8_MEMBER(pandoras_cram_w); DECLARE_WRITE8_MEMBER(pandoras_scrolly_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); - DECLARE_READ8_MEMBER(pandoras_portA_r); - DECLARE_READ8_MEMBER(pandoras_portB_r); + uint8_t pandoras_portA_r(); + uint8_t pandoras_portB_r(); TILE_GET_INFO_MEMBER(get_tile_info0); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h index da6d0160fca..11347f3ac2b 100644 --- a/src/mame/includes/parodius.h +++ b/src/mame/includes/parodius.h @@ -61,7 +61,7 @@ public: uint32_t screen_update_parodius(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); K05324X_CB_MEMBER(sprite_callback); K052109_CB_MEMBER(tile_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); void parodius(machine_config &config); void bank0000_map(address_map &map); diff --git a/src/mame/includes/rollerg.h b/src/mame/includes/rollerg.h index 46e2afd606a..24a8cfadf8e 100644 --- a/src/mame/includes/rollerg.h +++ b/src/mame/includes/rollerg.h @@ -57,7 +57,7 @@ private: uint32_t screen_update_rollerg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); K05324X_CB_MEMBER(sprite_callback); K051316_CB_MEMBER(zoom_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); void rollerg_map(address_map &map); void rollerg_sound_map(address_map &map); diff --git a/src/mame/includes/scramble.h b/src/mame/includes/scramble.h index 681d0ee753e..2f4c0b68adf 100644 --- a/src/mame/includes/scramble.h +++ b/src/mame/includes/scramble.h @@ -46,10 +46,10 @@ public: DECLARE_READ8_MEMBER(mars_ppi8255_0_r); DECLARE_READ8_MEMBER(mars_ppi8255_1_r); DECLARE_WRITE8_MEMBER(scramble_soundram_w); - DECLARE_READ8_MEMBER(scramble_portB_r); - DECLARE_READ8_MEMBER(hustler_portB_r); - DECLARE_WRITE8_MEMBER(hotshock_sh_irqtrigger_w); - DECLARE_READ8_MEMBER(hotshock_soundlatch_r); + uint8_t scramble_portB_r(); + uint8_t hustler_portB_r(); + void hotshock_sh_irqtrigger_w(uint8_t data); + uint8_t hotshock_soundlatch_r(); DECLARE_WRITE8_MEMBER(mars_ppi8255_0_w); DECLARE_WRITE8_MEMBER(mars_ppi8255_1_w); DECLARE_WRITE8_MEMBER(ad2083_tms5110_ctrl_w); @@ -59,7 +59,7 @@ public: DECLARE_WRITE8_MEMBER(harem_decrypt_clk_w); DECLARE_WRITE8_MEMBER(harem_decrypt_rst_w); DECLARE_READ8_MEMBER(harem_digitalker_intr_r); - DECLARE_WRITE8_MEMBER(harem_digitalker_control_w); + void harem_digitalker_control_w(uint8_t data); void init_cavelon(); void init_mariner(); @@ -96,8 +96,8 @@ public: DECLARE_WRITE8_MEMBER( cavelon_banksw_w ); DECLARE_READ8_MEMBER( hunchbks_mirror_r ); DECLARE_WRITE8_MEMBER( hunchbks_mirror_w ); - DECLARE_WRITE8_MEMBER( scramble_sh_irqtrigger_w ); - DECLARE_WRITE8_MEMBER( mrkougar_sh_irqtrigger_w ); + void scramble_sh_irqtrigger_w(uint8_t data); + void mrkougar_sh_irqtrigger_w(uint8_t data); IRQ_CALLBACK_MEMBER( scramble_sh_irq_callback ); void scramble(machine_config &config); diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index 7d195375b37..21876cbb712 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -72,7 +72,7 @@ private: void simpsons_objdma(); void z80_nmi_w(int state); K052109_CB_MEMBER(tile_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(u8 data); K053246_CB_MEMBER(sprite_callback); void bank0000_map(address_map &map); diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h index df2012af954..cc6811db0e4 100644 --- a/src/mame/includes/spy.h +++ b/src/mame/includes/spy.h @@ -65,8 +65,8 @@ private: virtual void machine_reset() override; uint32_t screen_update_spy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void spy_collision( ); - DECLARE_WRITE8_MEMBER(volume_callback0); - DECLARE_WRITE8_MEMBER(volume_callback1); + void volume_callback0(uint8_t data); + void volume_callback1(uint8_t data); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index ad2f593bcc6..1a2b8ad6193 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -55,7 +55,7 @@ private: K05324X_CB_MEMBER(sprite_callback); K052109_CB_MEMBER(tile_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); void bank0000_map(address_map &map); void surpratk_map(address_map &map); }; diff --git a/src/mame/includes/timeplt.h b/src/mame/includes/timeplt.h index 32f04cb2927..c93643c36ee 100644 --- a/src/mame/includes/timeplt.h +++ b/src/mame/includes/timeplt.h @@ -78,7 +78,7 @@ private: DECLARE_READ8_MEMBER(psurge_protection_r); /* chkun */ - DECLARE_WRITE8_MEMBER(chkun_sound_w); + void chkun_sound_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_chkun_tile_info); diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index 6a0da21f451..b3e8cdaafd3 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -170,7 +170,7 @@ protected: INTERRUPT_GEN_MEMBER(lgtnfght_interrupt); inline uint32_t tmnt2_get_word( uint32_t addr ); void tmnt2_put_word( address_space &space, uint32_t addr, uint16_t data ); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); K051960_CB_MEMBER(mia_sprite_callback); K051960_CB_MEMBER(tmnt_sprite_callback); K051960_CB_MEMBER(punkshot_sprite_callback); diff --git a/src/mame/includes/tutankhm.h b/src/mame/includes/tutankhm.h index 5a3c38ffef3..8313000d18c 100644 --- a/src/mame/includes/tutankhm.h +++ b/src/mame/includes/tutankhm.h @@ -81,7 +81,7 @@ protected: optional_ioport m_stars_config; TIMER_DEVICE_CALLBACK_MEMBER(scramble_stars_blink_timer); - DECLARE_WRITE8_MEMBER(galaxian_stars_enable_w); + void galaxian_stars_enable_w(uint8_t data); void stars_init(); void stars_init_scramble(); void stars_init_bootleg(); diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index 11e30772a8e..4a89518f755 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -40,7 +40,7 @@ public: void init_twin16(); - DECLARE_WRITE8_MEMBER(volume_callback); + void volume_callback(uint8_t data); DECLARE_WRITE_LINE_MEMBER(screen_vblank_twin16); uint32_t screen_update_twin16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index f0cd809e669..cb1c77bec61 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -84,7 +84,7 @@ private: K052109_CB_MEMBER(vendetta_tile_callback); K052109_CB_MEMBER(esckids_tile_callback); - DECLARE_WRITE8_MEMBER(banking_callback); + void banking_callback(uint8_t data); K053246_CB_MEMBER(sprite_callback); void esckids_map(address_map &map); diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h index 75352e1c2ef..98e411d077e 100644 --- a/src/mame/includes/wecleman.h +++ b/src/mame/includes/wecleman.h @@ -104,7 +104,7 @@ private: DECLARE_WRITE16_MEMBER(hotchase_paletteram16_SBGRBBBBGGGGRRRR_word_w); DECLARE_WRITE16_MEMBER(wecleman_paletteram16_SSSSBBBBGGGGRRRR_word_w); DECLARE_WRITE8_MEMBER(wecleman_K00723216_bank_w); - DECLARE_WRITE8_MEMBER(wecleman_volume_callback); + void wecleman_volume_callback(uint8_t data); template DECLARE_READ8_MEMBER(hotchase_k007232_r); template DECLARE_WRITE8_MEMBER(hotchase_k007232_w); diff --git a/src/mame/machine/abc1600mac.h b/src/mame/machine/abc1600mac.h index 42f4c3e2a1c..47cdef8a7ec 100644 --- a/src/mame/machine/abc1600mac.h +++ b/src/mame/machine/abc1600mac.h @@ -47,18 +47,18 @@ public: DECLARE_WRITE8_MEMBER( page_w ); DECLARE_WRITE8_MEMBER( dmamap_w ); - DECLARE_READ8_MEMBER( dma0_mreq_r ) { return dma_mreq_r(DMAMAP_R0_LO, offset); } - DECLARE_WRITE8_MEMBER( dma0_mreq_w ) { dma_mreq_w(DMAMAP_R0_LO, offset, data); } - DECLARE_READ8_MEMBER( dma0_iorq_r ) { return dma_iorq_r(DMAMAP_R0_LO, offset); } - DECLARE_WRITE8_MEMBER( dma0_iorq_w ) { dma_iorq_w(DMAMAP_R0_LO, offset, data); } - DECLARE_READ8_MEMBER( dma1_mreq_r ) { return dma_mreq_r(DMAMAP_R1_LO, offset); } - DECLARE_WRITE8_MEMBER( dma1_mreq_w ) { dma_mreq_w(DMAMAP_R1_LO, offset, data); } - DECLARE_READ8_MEMBER( dma1_iorq_r ) { return dma_iorq_r(DMAMAP_R1_LO, offset); } - DECLARE_WRITE8_MEMBER( dma1_iorq_w ) { dma_iorq_w(DMAMAP_R1_LO, offset, data); } - DECLARE_READ8_MEMBER( dma2_mreq_r ) { return dma_mreq_r(DMAMAP_R2_LO, offset); } - DECLARE_WRITE8_MEMBER( dma2_mreq_w ) { dma_mreq_w(DMAMAP_R2_LO, offset, data); } - DECLARE_READ8_MEMBER( dma2_iorq_r ) { return dma_iorq_r(DMAMAP_R2_LO, offset); } - DECLARE_WRITE8_MEMBER( dma2_iorq_w ) { dma_iorq_w(DMAMAP_R2_LO, offset, data); } + uint8_t dma0_mreq_r(offs_t offset) { return dma_mreq_r(DMAMAP_R0_LO, offset); } + void dma0_mreq_w(offs_t offset, uint8_t data) { dma_mreq_w(DMAMAP_R0_LO, offset, data); } + uint8_t dma0_iorq_r(offs_t offset) { return dma_iorq_r(DMAMAP_R0_LO, offset); } + void dma0_iorq_w(offs_t offset, uint8_t data) { dma_iorq_w(DMAMAP_R0_LO, offset, data); } + uint8_t dma1_mreq_r(offs_t offset) { return dma_mreq_r(DMAMAP_R1_LO, offset); } + void dma1_mreq_w(offs_t offset, uint8_t data) { dma_mreq_w(DMAMAP_R1_LO, offset, data); } + uint8_t dma1_iorq_r(offs_t offset) { return dma_iorq_r(DMAMAP_R1_LO, offset); } + void dma1_iorq_w(offs_t offset, uint8_t data) { dma_iorq_w(DMAMAP_R1_LO, offset, data); } + uint8_t dma2_mreq_r(offs_t offset) { return dma_mreq_r(DMAMAP_R2_LO, offset); } + void dma2_mreq_w(offs_t offset, uint8_t data) { dma_mreq_w(DMAMAP_R2_LO, offset, data); } + uint8_t dma2_iorq_r(offs_t offset) { return dma_iorq_r(DMAMAP_R2_LO, offset); } + void dma2_iorq_w(offs_t offset, uint8_t data) { dma_iorq_w(DMAMAP_R2_LO, offset, data); } void program_map(address_map &map); protected: diff --git a/src/mame/machine/hp48.cpp b/src/mame/machine/hp48.cpp index 5e1f871686d..f1365b38f7f 100644 --- a/src/mame/machine/hp48.cpp +++ b/src/mame/machine/hp48.cpp @@ -147,7 +147,7 @@ void hp48_state::rs232_send_byte() /* CPU sets OUT register (keyboard + beeper) */ -WRITE32_MEMBER( hp48_state::reg_out ) +void hp48_state::reg_out(uint32_t data) { LOG(("%s %f hp48_state::reg_out: %03x\n", machine().describe_context(), machine().time().as_double(), data)); @@ -182,7 +182,7 @@ int hp48_state::get_in() } /* CPU reads IN register (keyboard) */ -READ32_MEMBER( hp48_state::reg_in ) +uint32_t hp48_state::reg_in() { int in = get_in(); LOG(("%s %f hp48_state::reg_in: %04x\n", machine().describe_context(), machine().time().as_double(), in)); @@ -784,7 +784,7 @@ WRITE_LINE_MEMBER( hp48_state::mem_reset ) /* CONFIG opcode */ -WRITE32_MEMBER( hp48_state::mem_config ) +void hp48_state::mem_config(uint32_t data) { LOG(("%s %f hp48_state::mem_config: %05x\n", machine().describe_context(), machine().time().as_double(), data)); @@ -813,7 +813,7 @@ WRITE32_MEMBER( hp48_state::mem_config ) /* UNCFG opcode */ -WRITE32_MEMBER( hp48_state::mem_unconfig ) +void hp48_state::mem_unconfig(uint32_t data) { LOG(("%s %f hp48_state::mem_unconfig: %05x\n", machine().describe_context(), machine().time().as_double(), data)); @@ -833,7 +833,7 @@ WRITE32_MEMBER( hp48_state::mem_unconfig ) /* C=ID opcode */ -READ32_MEMBER( hp48_state::mem_id ) +uint32_t hp48_state::mem_id() { int data = 0; /* 0 = everything is configured */ @@ -865,7 +865,7 @@ READ32_MEMBER( hp48_state::mem_id ) /* --------- CRC ---------- */ /* each memory read by the CPU updates the internal CRC state */ -WRITE32_MEMBER( hp48_state::mem_crc ) +void hp48_state::mem_crc(offs_t offset, uint32_t data) { /* no CRC for I/O RAM */ if (offset >= m_io_addr && offset < m_io_addr + 0x40) return; diff --git a/src/mame/machine/interpro_ioga.cpp b/src/mame/machine/interpro_ioga.cpp index d8dd2a41d38..83ae60d551b 100644 --- a/src/mame/machine/interpro_ioga.cpp +++ b/src/mame/machine/interpro_ioga.cpp @@ -263,7 +263,7 @@ void sapphire_ioga_device::device_reset() /* * Interrupts */ -WRITE32_MEMBER(interpro_ioga_device::bus_error) +void interpro_ioga_device::bus_error(offs_t offset, u32 data) { LOG("bus_error address 0x%08x businfo 0x%08x\n", data, offset); @@ -1257,7 +1257,7 @@ READ32_MEMBER(interpro_ioga_device::mouse_status_r) return result; } -WRITE32_MEMBER(interpro_ioga_device::mouse_status_w) +void interpro_ioga_device::mouse_status_w(offs_t offset, u32 data, u32 mem_mask) { LOGMASKED(LOG_MOUSE, "mouse_status_w status 0x%08x mask 0x%08x\n", data, mem_mask); diff --git a/src/mame/machine/interpro_ioga.h b/src/mame/machine/interpro_ioga.h index 05f66ca980f..1a13257ecca 100644 --- a/src/mame/machine/interpro_ioga.h +++ b/src/mame/machine/interpro_ioga.h @@ -205,7 +205,7 @@ public: DECLARE_READ32_MEMBER(bus_timeout_r) { return m_bus_timeout; } DECLARE_WRITE32_MEMBER(bus_timeout_w) { m_bus_timeout = data; } - DECLARE_WRITE32_MEMBER(bus_error); + void bus_error(offs_t offset, u32 data); // timers DECLARE_READ32_MEMBER(timer0_r); @@ -235,7 +235,7 @@ public: MOUSE_BUTTONS = 0x00070000 }; DECLARE_READ32_MEMBER(mouse_status_r); - DECLARE_WRITE32_MEMBER(mouse_status_w); + void mouse_status_w(offs_t offset, u32 data, u32 mem_mask = ~0); protected: // device-level overrides diff --git a/src/mame/machine/kaypro.cpp b/src/mame/machine/kaypro.cpp index 1bef83edaf0..446d852792e 100644 --- a/src/mame/machine/kaypro.cpp +++ b/src/mame/machine/kaypro.cpp @@ -21,7 +21,7 @@ WRITE_LINE_MEMBER( kaypro_state::write_centronics_busy ) m_centronics_busy = state; } -READ8_MEMBER( kaypro_state::pio_system_r ) +uint8_t kaypro_state::pio_system_r() { uint8_t data = 0; @@ -34,7 +34,7 @@ READ8_MEMBER( kaypro_state::pio_system_r ) return data; } -WRITE8_MEMBER( kaypro_state::kayproii_pio_system_w ) +void kaypro_state::kayproii_pio_system_w(uint8_t data) { /* d7 bank select d6 disk drive motors - (0=on) @@ -72,9 +72,9 @@ WRITE8_MEMBER( kaypro_state::kayproii_pio_system_w ) m_system_port = data; } -WRITE8_MEMBER( kaypro_state::kayproiv_pio_system_w ) +void kaypro_state::kayproiv_pio_system_w(uint8_t data) { - kayproii_pio_system_w(space, offset, data); + kayproii_pio_system_w(data); /* side select */ m_floppy->ss_w(BIT(data, 2)); diff --git a/src/mame/machine/simpsons.cpp b/src/mame/machine/simpsons.cpp index ee919dad196..5606f44b376 100644 --- a/src/mame/machine/simpsons.cpp +++ b/src/mame/machine/simpsons.cpp @@ -58,7 +58,7 @@ READ8_MEMBER(simpsons_state::simpsons_sound_interrupt_r) ***************************************************************************/ -WRITE8_MEMBER( simpsons_state::banking_callback ) +void simpsons_state::banking_callback(u8 data) { membank("bank1")->set_entry(data & 0x3f); } diff --git a/src/mame/video/abc800.cpp b/src/mame/video/abc800.cpp index 412890a5f18..a14ca763e3c 100644 --- a/src/mame/video/abc800.cpp +++ b/src/mame/video/abc800.cpp @@ -120,7 +120,7 @@ uint32_t abc800c_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma // SAA5050_INTERFACE( trom_intf ) //------------------------------------------------- -READ8_MEMBER( abc800c_state::char_ram_r ) +uint8_t abc800c_state::char_ram_r(offs_t offset) { int row = offset / 40; int col = offset % 40; diff --git a/src/mame/video/digdug.cpp b/src/mame/video/digdug.cpp index a5d6d538a28..d19e69f7c42 100644 --- a/src/mame/video/digdug.cpp +++ b/src/mame/video/digdug.cpp @@ -171,7 +171,7 @@ WRITE8_MEMBER( digdug_state::digdug_videoram_w ) m_fg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(digdug_state::bg_select_w) +void digdug_state::bg_select_w(uint8_t data) { // select background picture if (m_bg_select != (data & 0x03)) diff --git a/src/mame/video/gameplan.cpp b/src/mame/video/gameplan.cpp index aecd079a48c..85b8d5216a7 100644 --- a/src/mame/video/gameplan.cpp +++ b/src/mame/video/gameplan.cpp @@ -138,25 +138,25 @@ uint32_t gameplan_state::screen_update_leprechn(screen_device &screen, bitmap_rg * *************************************/ -WRITE8_MEMBER(gameplan_state::video_data_w) +void gameplan_state::video_data_w(uint8_t data) { m_video_data = data; } -WRITE8_MEMBER(gameplan_state::gameplan_video_command_w) +void gameplan_state::gameplan_video_command_w(uint8_t data) { m_video_command = data & 0x07; } -WRITE8_MEMBER(gameplan_state::leprechn_video_command_w) +void gameplan_state::leprechn_video_command_w(uint8_t data) { m_video_command = (data >> 3) & 0x07; } -READ8_MEMBER(gameplan_state::leprechn_videoram_r) +uint8_t gameplan_state::leprechn_videoram_r() { return m_videoram[m_video_y * (HBSTART - HBEND) + m_video_x]; } diff --git a/src/mame/video/gatron.cpp b/src/mame/video/gatron.cpp index c3dde5deba1..2508a909d83 100644 --- a/src/mame/video/gatron.cpp +++ b/src/mame/video/gatron.cpp @@ -23,7 +23,7 @@ #include "includes/gatron.h" -WRITE8_MEMBER(gatron_state::videoram_w) +void gatron_state::videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); diff --git a/src/mame/video/homerun.cpp b/src/mame/video/homerun.cpp index cf3cab274c5..47495cbe2ce 100644 --- a/src/mame/video/homerun.cpp +++ b/src/mame/video/homerun.cpp @@ -18,7 +18,7 @@ READ_LINE_MEMBER(homerun_state::sprite0_r) return (m_screen->vpos() > (m_spriteram[0] - 16 + 1)) ? 1 : 0; } -WRITE8_MEMBER(homerun_state::scrollhi_w) +void homerun_state::scrollhi_w(u8 data) { // d0: scroll y high bit // d1: scroll x high bit @@ -27,12 +27,12 @@ WRITE8_MEMBER(homerun_state::scrollhi_w) m_scrollx = (m_scrollx & 0xff) | (data << 7 & 0x100); } -WRITE8_MEMBER(homerun_state::scrolly_w) +void homerun_state::scrolly_w(u8 data) { m_scrolly = (m_scrolly & 0xff00) | data; } -WRITE8_MEMBER(homerun_state::scrollx_w) +void homerun_state::scrollx_w(u8 data) { m_scrollx = (m_scrollx & 0xff00) | data; } @@ -62,7 +62,7 @@ void homerun_state::banking_w(u8 data) } } -WRITE8_MEMBER(homerun_state::videoram_w) +void homerun_state::videoram_w(offs_t offset, u8 data) { m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset & 0xfff); diff --git a/src/mame/video/tutankhm.cpp b/src/mame/video/tutankhm.cpp index fcec41c4461..9487065e945 100644 --- a/src/mame/video/tutankhm.cpp +++ b/src/mame/video/tutankhm.cpp @@ -431,7 +431,7 @@ void tutankhm_state::scramble_draw_background(bitmap_rgb32 &bitmap, const rectan scramble_draw_stars(bitmap, cliprect, 256); } -WRITE8_MEMBER(tutankhm_state::galaxian_stars_enable_w) +void tutankhm_state::galaxian_stars_enable_w(uint8_t data) { if ((m_stars_enabled ^ data) & 0x01) { From 2a7b5e677ca3cc6d8b0f505747b61a34ccc607fb Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 16 May 2020 03:34:22 +1000 Subject: [PATCH 63/69] (nw) tec1: added pwm device, added 74c923 device instead of custom code. Corrected scan rate in 74c922 device to fix random F characters. --- src/devices/machine/mm74c922.cpp | 2 +- src/mame/drivers/tec1.cpp | 233 ++++++++++--------------------- 2 files changed, 76 insertions(+), 159 deletions(-) diff --git a/src/devices/machine/mm74c922.cpp b/src/devices/machine/mm74c922.cpp index f49b320b41a..a40741d9dcb 100644 --- a/src/devices/machine/mm74c922.cpp +++ b/src/devices/machine/mm74c922.cpp @@ -72,7 +72,7 @@ void mm74c922_device::device_start() // allocate timers m_scan_timer = timer_alloc(); - m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(50)); + m_scan_timer->adjust(attotime::zero, 0, attotime::from_hz(500)); // approximate rate from a 100n capacitor // register for state saving save_item(NAME(m_inhibit)); diff --git a/src/mame/drivers/tec1.cpp b/src/mame/drivers/tec1.cpp index 59a548d0acb..067f6841418 100644 --- a/src/mame/drivers/tec1.cpp +++ b/src/mame/drivers/tec1.cpp @@ -61,10 +61,8 @@ and an optional LCD, but the games of the tec1 have been removed. ToDo: -- After a Soft Reset, pressing keys can crash the emulation. -- The 74C923 code may need to be revisited to improve keyboard response. - Sometimes have to press a key a few times before it registers. -- The 10ms debounce is not emulated. +- Save state support + JMON ToDo: @@ -76,8 +74,11 @@ JMON ToDo: #include "emu.h" #include "cpu/z80/z80.h" #include "imagedev/cassette.h" +#include "machine/mm74c922.h" +#include "machine/rescap.h" #include "sound/spkrdev.h" #include "speaker.h" +#include "video/pwm.h" #include "tec1.lh" @@ -90,13 +91,10 @@ public: , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") , m_cass(*this, "cassette") + , m_kb(*this, "keyboard") , m_key_pressed(0) - , m_io_line0(*this, "LINE0") - , m_io_line1(*this, "LINE1") - , m_io_line2(*this, "LINE2") - , m_io_line3(*this, "LINE3") , m_io_shift(*this, "SHIFT") - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") { } void tec1(machine_config &config); @@ -108,28 +106,19 @@ private: required_device m_maincpu; required_device m_speaker; optional_device m_cass; + required_device m_kb; bool m_key_pressed; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; required_ioport m_io_shift; - output_finder<6> m_digits; - emu_timer *m_kbd_timer; - DECLARE_READ8_MEMBER( tec1_kbd_r ); - DECLARE_READ8_MEMBER( latch_r ); - DECLARE_WRITE8_MEMBER( tec1_digit_w ); - DECLARE_WRITE8_MEMBER( tecjmon_digit_w ); - DECLARE_WRITE8_MEMBER( tec1_segment_w ); - uint8_t m_kbd; - uint8_t m_segment; + required_device m_display; + + DECLARE_READ8_MEMBER(kbd_r); + DECLARE_READ8_MEMBER(latch_r); + DECLARE_WRITE8_MEMBER(tec1_digit_w); + DECLARE_WRITE8_MEMBER(tecjmon_digit_w); + DECLARE_WRITE8_MEMBER(segment_w); + DECLARE_WRITE_LINE_MEMBER(da_w); + uint8_t m_seg; uint8_t m_digit; - uint8_t m_kbd_row; - uint8_t m_refresh[6]; - uint8_t tec1_convert_col_to_bin( uint8_t col, uint8_t row ); - virtual void machine_reset() override; - virtual void machine_start() override; - TIMER_CALLBACK_MEMBER(tec1_kbd_callback); void tec1_io(address_map &map); void tec1_map(address_map &map); @@ -146,7 +135,7 @@ private: ***************************************************************************/ -WRITE8_MEMBER( tec1_state::tec1_segment_w ) +WRITE8_MEMBER( tec1_state::segment_w ) { /* d7 segment d d6 segment e @@ -157,7 +146,8 @@ WRITE8_MEMBER( tec1_state::tec1_segment_w ) d1 segment f d0 segment a */ - m_segment = bitswap<8>(data, 4, 2, 1, 6, 7, 5, 3, 0); + m_seg = bitswap<8>(data, 4, 2, 1, 6, 7, 5, 3, 0); + m_display->matrix(m_digit, m_seg); } WRITE8_MEMBER( tec1_state::tec1_digit_w ) @@ -173,7 +163,8 @@ WRITE8_MEMBER( tec1_state::tec1_digit_w ) m_speaker->level_w(BIT(data, 7)); - m_digit = data & 0x3f; + m_digit = data; + m_display->matrix(m_digit, m_seg); } WRITE8_MEMBER( tec1_state::tecjmon_digit_w ) @@ -189,7 +180,8 @@ WRITE8_MEMBER( tec1_state::tecjmon_digit_w ) m_speaker->level_w(BIT(data, 7)); m_cass->output(BIT(data, 7) ? -1.0 : +1.0); - m_digit = data & 0x3f; + m_digit = data; + m_display->matrix(m_digit, m_seg); } @@ -211,100 +203,15 @@ READ8_MEMBER( tec1_state::latch_r ) } -READ8_MEMBER( tec1_state::tec1_kbd_r ) +READ8_MEMBER( tec1_state::kbd_r ) { - m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); - return m_kbd | m_io_shift->read(); + return m_kb->read() | m_io_shift->read(); } -uint8_t tec1_state::tec1_convert_col_to_bin( uint8_t col, uint8_t row ) +WRITE_LINE_MEMBER( tec1_state::da_w ) { - uint8_t data = row; - - if (BIT(col, 1)) - data |= 4; - else - if (BIT(col, 2)) - data |= 8; - else - if (BIT(col, 3)) - data |= 12; - else - if (BIT(col, 4)) - data |= 16; - - return data; -} - -TIMER_CALLBACK_MEMBER(tec1_state::tec1_kbd_callback) -{ - uint8_t i; - - // Display the digits. Blank any digits that haven't been refreshed for a while. - // This will fix the problem reported by a user. - for (i = 0; i < 6; i++) - { - if (BIT(m_digit, i)) - { - m_refresh[i] = 1; - m_digits[i] = m_segment; - } - else - if (m_refresh[i] == 0x80) - { - m_digits[i] = 0; - m_refresh[i] = 0; - } - else - if (m_refresh[i]) - m_refresh[i]++; - } - - // 74C923 4 by 5 key encoder. - - /* Look at old row */ - if (m_kbd_row == 0) - i = m_io_line0->read(); - else - if (m_kbd_row == 1) - i = m_io_line1->read(); - else - if (m_kbd_row == 2) - i = m_io_line2->read(); - else - if (m_kbd_row == 3) - i = m_io_line3->read(); - - /* if previous key is still held, bail out */ - if (i) - if (tec1_convert_col_to_bin(i, m_kbd_row) == m_kbd) - return; - - m_kbd_row++; - m_kbd_row &= 3; - - /* Look at a new row */ - if (m_kbd_row == 0) - i = m_io_line0->read(); - else - if (m_kbd_row == 1) - i = m_io_line1->read(); - else - if (m_kbd_row == 2) - i = m_io_line2->read(); - else - if (m_kbd_row == 3) - i = m_io_line3->read(); - - /* see if a key pressed */ - if (i) - { - m_kbd = tec1_convert_col_to_bin(i, m_kbd_row); - m_maincpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE); - m_key_pressed = true; - } - else - m_key_pressed = false; + m_key_pressed = state; + m_maincpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); } @@ -314,18 +221,6 @@ TIMER_CALLBACK_MEMBER(tec1_state::tec1_kbd_callback) ***************************************************************************/ -void tec1_state::machine_start() -{ - m_digits.resolve(); - m_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tec1_state::tec1_kbd_callback),this)); - m_kbd_timer->adjust( attotime::zero, 0, attotime::from_hz(500) ); -} - -void tec1_state::machine_reset() -{ - m_kbd = 0; -} - /*************************************************************************** @@ -345,9 +240,9 @@ void tec1_state::tec1_map(address_map &map) void tec1_state::tec1_io(address_map &map) { map.global_mask(0x07); - map(0x00, 0x00).r(FUNC(tec1_state::tec1_kbd_r)); + map(0x00, 0x00).r(FUNC(tec1_state::kbd_r)); map(0x01, 0x01).w(FUNC(tec1_state::tec1_digit_w)); - map(0x02, 0x02).w(FUNC(tec1_state::tec1_segment_w)); + map(0x02, 0x02).w(FUNC(tec1_state::segment_w)); } @@ -362,9 +257,9 @@ void tec1_state::tecjmon_map(address_map &map) void tec1_state::tecjmon_io(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).r(FUNC(tec1_state::tec1_kbd_r)); + map(0x00, 0x00).r(FUNC(tec1_state::kbd_r)); map(0x01, 0x01).w(FUNC(tec1_state::tecjmon_digit_w)); - map(0x02, 0x02).w(FUNC(tec1_state::tec1_segment_w)); + map(0x02, 0x02).w(FUNC(tec1_state::segment_w)); map(0x03, 0x03).r(FUNC(tec1_state::latch_r)); //map(0x04, 0x04).w(FUNC(tec1_state::lcd_en_w)); //map(0x84, 0x84).w(FUNC(tec1_state::lcd_2nd_w)); @@ -379,32 +274,32 @@ void tec1_state::tecjmon_io(address_map &map) static INPUT_PORTS_START( tec1 ) PORT_START("LINE0") /* KEY ROW 0 */ - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_UP) PORT_CHAR('^') + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_UP) PORT_CHAR('^') PORT_START("LINE1") /* KEY ROW 1 */ - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_DOWN) PORT_CHAR('V') + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_DOWN) PORT_CHAR('V') PORT_START("LINE2") /* KEY ROW 2 */ - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("GO") PORT_CODE(KEYCODE_X) PORT_CHAR('X') + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GO") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_START("LINE3") /* KEY ROW 3 */ - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("AD") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("AD") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_START("SHIFT") PORT_BIT(0x1f, IP_ACTIVE_HIGH, IPT_UNUSED) @@ -436,6 +331,17 @@ void tec1_state::tec1(machine_config &config) /* video hardware */ config.set_default_layout(layout_tec1); + PWM_DISPLAY(config, m_display).set_size(6, 8); + m_display->set_segmask(0x3f, 0xff); + + MM74C923(config, m_kb, 0); + m_kb->set_cap_osc(CAP_N(100)); + m_kb->set_cap_debounce(CAP_U(1)); + m_kb->da_wr_callback().set(FUNC(tec1_state::da_w)); + m_kb->x1_rd_callback().set_ioport("LINE0"); + m_kb->x2_rd_callback().set_ioport("LINE1"); + m_kb->x3_rd_callback().set_ioport("LINE2"); + m_kb->x4_rd_callback().set_ioport("LINE3"); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -451,6 +357,17 @@ void tec1_state::tecjmon(machine_config &config) /* video hardware */ config.set_default_layout(layout_tec1); + PWM_DISPLAY(config, m_display).set_size(6, 8); + m_display->set_segmask(0x3f, 0xff); + + MM74C923(config, m_kb, 0); + m_kb->set_cap_osc(CAP_N(100)); + m_kb->set_cap_debounce(CAP_U(1)); + m_kb->da_wr_callback().set(FUNC(tec1_state::da_w)); + m_kb->x1_rd_callback().set_ioport("LINE0"); + m_kb->x2_rd_callback().set_ioport("LINE1"); + m_kb->x3_rd_callback().set_ioport("LINE2"); + m_kb->x4_rd_callback().set_ioport("LINE3"); /* sound hardware */ SPEAKER(config, "mono").front_center(); From c682104f5ffd2cc63f318c65f3ceb42e62acd940 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 15 May 2020 14:25:13 -0400 Subject: [PATCH 64/69] mm74c922: Fix typo in device name (nw) eurit30: Yet one more key (nw) --- src/devices/machine/mm74c922.cpp | 2 +- src/mame/drivers/eurit.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices/machine/mm74c922.cpp b/src/devices/machine/mm74c922.cpp index a40741d9dcb..6cd55c3157d 100644 --- a/src/devices/machine/mm74c922.cpp +++ b/src/devices/machine/mm74c922.cpp @@ -18,7 +18,7 @@ // DEVICE DEFINITIONS //************************************************************************** -DEFINE_DEVICE_TYPE(MM74C922, mm74c922_device, "mm74c922", "MM74C923 16-Key Encoder") +DEFINE_DEVICE_TYPE(MM74C922, mm74c922_device, "mm74c922", "MM74C922 16-Key Encoder") DEFINE_DEVICE_TYPE(MM74C923, mm74c923_device, "mm74c923", "MM74C923 20-Key Encoder") diff --git a/src/mame/drivers/eurit.cpp b/src/mame/drivers/eurit.cpp index 0b18eab27f8..24b9ad57b44 100644 --- a/src/mame/drivers/eurit.cpp +++ b/src/mame/drivers/eurit.cpp @@ -124,12 +124,12 @@ static INPUT_PORTS_START(eurit30) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_START("KEYE") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Unknown Key E0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Center Right") PORT_CODE(KEYCODE_F) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Left") PORT_CODE(KEYCODE_S) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("-") PORT_CODE(KEYCODE_DOWN) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Right") PORT_CODE(KEYCODE_F) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Right") PORT_CODE(KEYCODE_G) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Center") PORT_CODE(KEYCODE_D) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Next to Right") PORT_CODE(KEYCODE_G) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Right") PORT_CODE(KEYCODE_H) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Center Left") PORT_CODE(KEYCODE_D) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Fox Key Left") PORT_CODE(KEYCODE_A) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Z1") PORT_CODE(KEYCODE_Z) INPUT_PORTS_END From 2b085c4380476fc0a5589239f7d68d6370e6810a Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 15 May 2020 20:49:58 +0200 Subject: [PATCH 65/69] a last small bunch of macro removals before the week-end (nw) --- src/mame/drivers/jangou.cpp | 12 +++------ src/mame/drivers/kungfur.cpp | 12 ++++----- src/mame/drivers/mappy.cpp | 2 +- src/mame/drivers/midvunit.cpp | 2 +- src/mame/drivers/namcofl.cpp | 22 ++++++++-------- src/mame/drivers/namconb1.cpp | 6 ++--- src/mame/drivers/namcos2.cpp | 4 +-- src/mame/drivers/namcos21.cpp | 16 ++++++------ src/mame/drivers/namcos21_c67.cpp | 16 ++++++------ src/mame/drivers/namcos21_de.cpp | 16 ++++++------ src/mame/drivers/namcos22.cpp | 36 +++++++++++++-------------- src/mame/drivers/namcos86.cpp | 4 +-- src/mame/drivers/pacland.cpp | 4 +-- src/mame/drivers/polepos.cpp | 12 ++++----- src/mame/drivers/seattle.cpp | 4 +-- src/mame/drivers/skykid.cpp | 6 ++--- src/mame/drivers/spyhuntertec.cpp | 16 ++++++------ src/mame/drivers/toypop.cpp | 20 +++++++-------- src/mame/drivers/vegas.cpp | 8 +++--- src/mame/drivers/wacky_gator.cpp | 16 ++++++------ src/mame/drivers/zwackery.cpp | 32 ++++++++---------------- src/mame/includes/mappy.h | 2 +- src/mame/includes/midvunit.h | 2 +- src/mame/includes/namcofl.h | 22 ++++++++-------- src/mame/includes/namconb1.h | 6 ++--- src/mame/includes/namcos2.h | 8 +++--- src/mame/includes/namcos22.h | 34 ++++++++++++------------- src/mame/includes/namcos86.h | 4 +-- src/mame/includes/pacland.h | 4 +-- src/mame/includes/polepos.h | 12 ++++----- src/mame/includes/skykid.h | 6 ++--- src/mame/machine/midwayic.cpp | 14 +++++------ src/mame/machine/midwayic.h | 14 +++++------ src/mame/machine/namcos2.cpp | 4 +-- src/mame/machine/namcos21_dsp.cpp | 2 +- src/mame/machine/namcos21_dsp.h | 2 +- src/mame/machine/namcos21_dsp_c67.cpp | 4 +-- src/mame/machine/namcos21_dsp_c67.h | 4 +-- 38 files changed, 196 insertions(+), 214 deletions(-) diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp index 1a803c9f318..75f7d8a191e 100644 --- a/src/mame/drivers/jangou.cpp +++ b/src/mame/drivers/jangou.cpp @@ -110,8 +110,7 @@ private: DECLARE_READ8_MEMBER(slave_com_r); DECLARE_WRITE8_MEMBER(slave_com_w); DECLARE_READ8_MEMBER(jngolady_rng_r); - DECLARE_READ8_MEMBER(input_mux_r); - DECLARE_READ8_MEMBER(input_system_r); + uint8_t input_mux_r(); void jangou_palette(palette_device &palette) const; DECLARE_MACHINE_START(jngolady); @@ -234,7 +233,7 @@ WRITE8_MEMBER(jangou_state::output_w) // machine().bookkeeping().coin_lockout_w(0, ~data & 0x20); } -READ8_MEMBER(jangou_state::input_mux_r) +uint8_t jangou_state::input_mux_r() { switch(m_mux_data) { @@ -249,11 +248,6 @@ READ8_MEMBER(jangou_state::input_mux_r) return ioport("IN_NOMUX")->read(); } -READ8_MEMBER(jangou_state::input_system_r) -{ - return ioport("SYSTEM")->read(); -} - /************************************* * @@ -987,7 +981,7 @@ void jangou_state::jangou(machine_config &config) ay8910_device &aysnd(AY8910(config, "aysnd", MASTER_CLOCK / 16)); aysnd.port_a_read_callback().set(FUNC(jangou_state::input_mux_r)); - aysnd.port_b_read_callback().set(FUNC(jangou_state::input_system_r)); + aysnd.port_b_read_callback().set_ioport("SYSTEM"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.40); HC55516(config, m_cvsd, MASTER_CLOCK / 1024); diff --git a/src/mame/drivers/kungfur.cpp b/src/mame/drivers/kungfur.cpp index 03c31a17116..cd396109f0e 100644 --- a/src/mame/drivers/kungfur.cpp +++ b/src/mame/drivers/kungfur.cpp @@ -107,10 +107,10 @@ private: // I/O handlers INTERRUPT_GEN_MEMBER(interrupt); - DECLARE_WRITE8_MEMBER(output_w); - DECLARE_WRITE8_MEMBER(control_w); - template DECLARE_WRITE8_MEMBER(digit_data_w) { m_digit_data[N] = data; } - template DECLARE_WRITE8_MEMBER(adpcm_data_w) { m_adpcm_data[N] = data; } + void output_w(u8 data); + void control_w(u8 data); + template void digit_data_w(u8 data) { m_digit_data[N] = data; } + template void adpcm_data_w(u8 data) { m_adpcm_data[N] = data; } template DECLARE_WRITE_LINE_MEMBER(adpcm_int); u8 m_control = 0; @@ -152,7 +152,7 @@ INTERRUPT_GEN_MEMBER(kungfur_state::interrupt) device.execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } -WRITE8_MEMBER(kungfur_state::output_w) +void kungfur_state::output_w(u8 data) { // d0-d2: output led7seg static const u8 lut_digits[24] = @@ -185,7 +185,7 @@ WRITE8_MEMBER(kungfur_state::output_w) machine().bookkeeping().coin_counter_w(0, data & 0x40); } -WRITE8_MEMBER(kungfur_state::control_w) +void kungfur_state::control_w(u8 data) { // d0-d3: N/C // d4: irq ack diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp index 2f7342b0dc7..9fd3dd291d8 100644 --- a/src/mame/drivers/mappy.cpp +++ b/src/mame/drivers/mappy.cpp @@ -1311,7 +1311,7 @@ GFXDECODE_END ***************************************************************************/ -WRITE8_MEMBER(mappy_state::out_lamps) +void mappy_state::out_lamps(uint8_t data) { m_leds[0] = BIT(data, 0); m_leds[1] = BIT(data, 1); diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp index dcb33c6e036..7e35cfce04d 100644 --- a/src/mame/drivers/midvunit.cpp +++ b/src/mame/drivers/midvunit.cpp @@ -618,7 +618,7 @@ WRITE32_MEMBER(midvunit_state::midvplus_misc_w) * *************************************/ -WRITE8_MEMBER(midvunit_state::midvplus_xf1_w) +void midvunit_state::midvplus_xf1_w(uint8_t data) { // osd_printf_debug("xf1_w = %d\n", data); diff --git a/src/mame/drivers/namcofl.cpp b/src/mame/drivers/namcofl.cpp index 915459fccec..2cb7706e920 100644 --- a/src/mame/drivers/namcofl.cpp +++ b/src/mame/drivers/namcofl.cpp @@ -264,17 +264,17 @@ WRITE16_MEMBER(namcofl_state::mcu_shared_w) } -READ8_MEMBER(namcofl_state::port6_r) +uint8_t namcofl_state::port6_r() { return m_mcu_port6; } -WRITE8_MEMBER(namcofl_state::port6_w) +void namcofl_state::port6_w(uint8_t data) { m_mcu_port6 = data; } -READ8_MEMBER(namcofl_state::port7_r) +uint8_t namcofl_state::port7_r() { switch (m_mcu_port6 & 0xf0) { @@ -297,26 +297,26 @@ READ8_MEMBER(namcofl_state::port7_r) return 0xff; } -READ8_MEMBER(namcofl_state::dac7_r) +uint8_t namcofl_state::dac7_r() { return m_accel.read_safe(0xff); } -READ8_MEMBER(namcofl_state::dac6_r) +uint8_t namcofl_state::dac6_r() { return m_brake.read_safe(0xff); } -READ8_MEMBER(namcofl_state::dac5_r) +uint8_t namcofl_state::dac5_r() { return m_wheel.read_safe(0xff); } -READ8_MEMBER(namcofl_state::dac4_r){ return 0xff; } -READ8_MEMBER(namcofl_state::dac3_r){ return 0xff; } -READ8_MEMBER(namcofl_state::dac2_r){ return 0xff; } -READ8_MEMBER(namcofl_state::dac1_r){ return 0xff; } -READ8_MEMBER(namcofl_state::dac0_r){ return 0xff; } +uint8_t namcofl_state::dac4_r(){ return 0xff; } +uint8_t namcofl_state::dac3_r(){ return 0xff; } +uint8_t namcofl_state::dac2_r(){ return 0xff; } +uint8_t namcofl_state::dac1_r(){ return 0xff; } +uint8_t namcofl_state::dac0_r(){ return 0xff; } void namcofl_state::namcoc75_am(address_map &map) { diff --git a/src/mame/drivers/namconb1.cpp b/src/mame/drivers/namconb1.cpp index 2ef80852346..17e59d33fa6 100644 --- a/src/mame/drivers/namconb1.cpp +++ b/src/mame/drivers/namconb1.cpp @@ -755,17 +755,17 @@ void namconb1_state::namcoc75_am(address_map &map) } -READ8_MEMBER(namconb1_state::port6_r) +uint8_t namconb1_state::port6_r() { return m_port6; } -WRITE8_MEMBER(namconb1_state::port6_w) +void namconb1_state::port6_w(uint8_t data) { m_port6 = data; } -READ8_MEMBER(namconb1_state::port7_r) +uint8_t namconb1_state::port7_r() { switch (m_port6 & 0xf0) { diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp index 59cbfc3ecbd..806fb08007e 100644 --- a/src/mame/drivers/namcos2.cpp +++ b/src/mame/drivers/namcos2.cpp @@ -656,12 +656,12 @@ WRITE16_MEMBER(namcos2_state::dpram_word_w) } -READ8_MEMBER(namcos2_state::dpram_byte_r) +uint8_t namcos2_state::dpram_byte_r(offs_t offset) { return m_dpram[offset]; } -WRITE8_MEMBER(namcos2_state::dpram_byte_w) +void namcos2_state::dpram_byte_w(offs_t offset, uint8_t data) { m_dpram[offset] = data; } diff --git a/src/mame/drivers/namcos21.cpp b/src/mame/drivers/namcos21.cpp index 66429ac2208..5cc3ad9e4f5 100644 --- a/src/mame/drivers/namcos21.cpp +++ b/src/mame/drivers/namcos21.cpp @@ -351,8 +351,8 @@ private: DECLARE_READ16_MEMBER(dpram_word_r); DECLARE_WRITE16_MEMBER(dpram_word_w); - DECLARE_READ8_MEMBER(dpram_byte_r); - DECLARE_WRITE8_MEMBER(dpram_byte_w); + uint8_t dpram_byte_r(offs_t offset); + void dpram_byte_w(offs_t offset, uint8_t data); DECLARE_READ16_MEMBER(winrun_gpu_color_r); DECLARE_WRITE16_MEMBER(winrun_gpu_color_w); @@ -366,8 +366,8 @@ private: DECLARE_WRITE8_MEMBER(sound_bankselect_w); - DECLARE_WRITE8_MEMBER(sound_reset_w); - DECLARE_WRITE8_MEMBER(system_reset_w); + void sound_reset_w(uint8_t data); + void system_reset_w(uint8_t data); void reset_all_subcpus(int state); std::unique_ptr m_eeprom; @@ -514,12 +514,12 @@ WRITE16_MEMBER(namcos21_state::dpram_word_w) } } -READ8_MEMBER(namcos21_state::dpram_byte_r) +uint8_t namcos21_state::dpram_byte_r(offs_t offset) { return m_dpram[offset]; } -WRITE8_MEMBER(namcos21_state::dpram_byte_w) +void namcos21_state::dpram_byte_w(offs_t offset, uint8_t data) { m_dpram[offset] = data; } @@ -770,7 +770,7 @@ WRITE8_MEMBER( namcos21_state::sound_bankselect_w ) m_audiobank->set_entry(data>>4); } -WRITE8_MEMBER(namcos21_state::sound_reset_w) +void namcos21_state::sound_reset_w(uint8_t data) { if (data & 0x01) { @@ -785,7 +785,7 @@ WRITE8_MEMBER(namcos21_state::sound_reset_w) } } -WRITE8_MEMBER(namcos21_state::system_reset_w) +void namcos21_state::system_reset_w(uint8_t data) { reset_all_subcpus(data & 1 ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/namcos21_c67.cpp b/src/mame/drivers/namcos21_c67.cpp index d7557a410b2..a5f21bbfe48 100644 --- a/src/mame/drivers/namcos21_c67.cpp +++ b/src/mame/drivers/namcos21_c67.cpp @@ -330,16 +330,16 @@ private: DECLARE_READ16_MEMBER(dpram_word_r); DECLARE_WRITE16_MEMBER(dpram_word_w); - DECLARE_READ8_MEMBER(dpram_byte_r); - DECLARE_WRITE8_MEMBER(dpram_byte_w); + uint8_t dpram_byte_r(offs_t offset); + void dpram_byte_w(offs_t offset, uint8_t data); DECLARE_WRITE8_MEMBER(eeprom_w); DECLARE_READ8_MEMBER(eeprom_r); DECLARE_WRITE8_MEMBER(sound_bankselect_w); - DECLARE_WRITE8_MEMBER(sound_reset_w); - DECLARE_WRITE8_MEMBER(system_reset_w); + void sound_reset_w(uint8_t data); + void system_reset_w(uint8_t data); void reset_all_subcpus(int state); std::unique_ptr m_eeprom; @@ -421,12 +421,12 @@ WRITE16_MEMBER(namcos21_c67_state::dpram_word_w) } } -READ8_MEMBER(namcos21_c67_state::dpram_byte_r) +uint8_t namcos21_c67_state::dpram_byte_r(offs_t offset) { return m_dpram[offset]; } -WRITE8_MEMBER(namcos21_c67_state::dpram_byte_w) +void namcos21_c67_state::dpram_byte_w(offs_t offset, uint8_t data) { m_dpram[offset] = data; } @@ -694,7 +694,7 @@ WRITE8_MEMBER( namcos21_c67_state::sound_bankselect_w ) } -WRITE8_MEMBER(namcos21_c67_state::sound_reset_w) +void namcos21_c67_state::sound_reset_w(uint8_t data) { if (data & 0x01) { @@ -714,7 +714,7 @@ WRITE8_MEMBER(namcos21_c67_state::sound_reset_w) } } -WRITE8_MEMBER(namcos21_c67_state::system_reset_w) +void namcos21_c67_state::system_reset_w(uint8_t data) { reset_all_subcpus(data & 1 ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/namcos21_de.cpp b/src/mame/drivers/namcos21_de.cpp index 7c067785b13..e7f78b0f0a0 100644 --- a/src/mame/drivers/namcos21_de.cpp +++ b/src/mame/drivers/namcos21_de.cpp @@ -96,16 +96,16 @@ private: DECLARE_READ16_MEMBER(dpram_word_r); DECLARE_WRITE16_MEMBER(dpram_word_w); - DECLARE_READ8_MEMBER(dpram_byte_r); - DECLARE_WRITE8_MEMBER(dpram_byte_w); + uint8_t dpram_byte_r(offs_t offset); + void dpram_byte_w(offs_t offset, uint8_t data); DECLARE_WRITE8_MEMBER(eeprom_w); DECLARE_READ8_MEMBER(eeprom_r); DECLARE_WRITE8_MEMBER(sound_bankselect_w); - DECLARE_WRITE8_MEMBER(sound_reset_w); - DECLARE_WRITE8_MEMBER(system_reset_w); + void sound_reset_w(uint8_t data); + void system_reset_w(uint8_t data); void reset_all_subcpus(int state); std::unique_ptr m_eeprom; @@ -275,12 +275,12 @@ WRITE16_MEMBER(namco_de_pcbstack_device::dpram_word_w) } } -READ8_MEMBER(namco_de_pcbstack_device::dpram_byte_r) +uint8_t namco_de_pcbstack_device::dpram_byte_r(offs_t offset) { return m_dpram[offset]; } -WRITE8_MEMBER(namco_de_pcbstack_device::dpram_byte_w) +void namco_de_pcbstack_device::dpram_byte_w(offs_t offset, uint8_t data) { m_dpram[offset] = data; } @@ -388,7 +388,7 @@ WRITE8_MEMBER( namco_de_pcbstack_device::sound_bankselect_w ) m_audiobank->set_entry(data>>4); } -WRITE8_MEMBER(namco_de_pcbstack_device::sound_reset_w) +void namco_de_pcbstack_device::sound_reset_w(uint8_t data) { if (data & 0x01) { @@ -403,7 +403,7 @@ WRITE8_MEMBER(namco_de_pcbstack_device::sound_reset_w) } } -WRITE8_MEMBER(namco_de_pcbstack_device::system_reset_w) +void namco_de_pcbstack_device::system_reset_w(uint8_t data) { reset_all_subcpus(data & 1 ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp index 4a2bcb9b7c5..7d633046523 100644 --- a/src/mame/drivers/namcos22.cpp +++ b/src/mame/drivers/namcos22.cpp @@ -2061,7 +2061,7 @@ READ16_MEMBER(namcos22_state::point_hiword_ir) } -READ16_MEMBER(namcos22_state::pdp_status_r) +u16 namcos22_state::pdp_status_r() { return m_dsp_master_bioz; } @@ -2214,18 +2214,18 @@ void namcos22_state::pdp_handle_commands(u16 offs) } } -READ16_MEMBER(namcos22_state::dsp_hold_signal_r) +u16 namcos22_state::dsp_hold_signal_r() { /* STUB */ return 0; } -WRITE16_MEMBER(namcos22_state::dsp_hold_ack_w) +void namcos22_state::dsp_hold_ack_w(u16 data) { /* STUB */ } -WRITE16_MEMBER(namcos22_state::dsp_xf_output_w) +void namcos22_state::dsp_xf_output_w(u16 data) { /* STUB */ } @@ -2321,13 +2321,13 @@ READ16_MEMBER(namcos22_state::dsp_upload_status_r) return 0x0000; } -WRITE16_MEMBER(namcos22_state::slave_serial_io_w) +void namcos22_state::slave_serial_io_w(u16 data) { m_SerialDataSlaveToMasterNext = data; logerror("slave_serial_io_w(%04x)\n", data); } -READ16_MEMBER(namcos22_state::master_serial_io_r) +u16 namcos22_state::master_serial_io_r() { logerror("master_serial_io_r() == %04x\n", m_SerialDataSlaveToMasterCurrent); return m_SerialDataSlaveToMasterCurrent; @@ -2447,7 +2447,7 @@ void namcos22_state::master_dsp_io(address_map &map) } -READ16_MEMBER(namcos22_state::dsp_slave_bioz_r) +u16 namcos22_state::dsp_slave_bioz_r() { /* STUB */ return 1; @@ -2563,13 +2563,13 @@ void namcos22_state::slave_dsp_io(address_map &map) // System22 37702 -READ8_MEMBER(namcos22_state::mcu_port4_s22_r) +u8 namcos22_state::mcu_port4_s22_r() { // for C74, 0x10 selects sound MCU role, 0x00 selects control-reading role return 0x10; } -READ8_MEMBER(namcos22_state::iomcu_port4_s22_r) +u8 namcos22_state::iomcu_port4_s22_r() { // for C74, 0x10 selects sound MCU role, 0x00 selects control-reading role return 0x00; @@ -2601,7 +2601,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22s_state::mcu_irq) m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); } -WRITE8_MEMBER(namcos22s_state::mb87078_gain_changed) +void namcos22s_state::mb87078_gain_changed(offs_t offset, u8 data) { m_c352->set_output_gain(offset ^ 3, data / 100.0); } @@ -2664,7 +2664,7 @@ WRITE8_MEMBER(namcos22s_state::mb87078_gain_changed) other: ? */ -WRITE8_MEMBER(namcos22s_state::mcu_port4_w) +void namcos22s_state::mcu_port4_w(u8 data) { // d3: input port select for port 5 // d4: port 5 direction? @@ -2686,28 +2686,28 @@ WRITE8_MEMBER(namcos22s_state::mcu_port4_w) m_mcu_iocontrol = data; } -READ8_MEMBER(namcos22s_state::mcu_port4_r) +u8 namcos22s_state::mcu_port4_r() { return m_mcu_iocontrol; } -WRITE8_MEMBER(namcos22s_state::mcu_port5_w) +void namcos22s_state::mcu_port5_w(u8 data) { m_mcu_outdata = data; } -READ8_MEMBER(namcos22s_state::mcu_port5_r) +u8 namcos22s_state::mcu_port5_r() { u16 inputs = m_inputs->read(); return (m_mcu_iocontrol & 8) ? inputs & 0xff : inputs >> 8; } -WRITE8_MEMBER(namcos22s_state::mcu_port6_w) +void namcos22s_state::mcu_port6_w(u8 data) { // always 2? } -READ8_MEMBER(namcos22s_state::mcu_port6_r) +u8 namcos22s_state::mcu_port6_r() { // discarded return 0; @@ -2829,7 +2829,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22s_state::alpine_steplock_callback) m_motor_status = param; } -WRITE8_MEMBER(namcos22s_state::alpine_mcu_port4_w) +void namcos22s_state::alpine_mcu_port4_w(u8 data) { if (~m_mcu_iocontrol & data & 0x20) { @@ -2854,7 +2854,7 @@ WRITE8_MEMBER(namcos22s_state::alpine_mcu_port4_w) } } - mcu_port4_w(space, offset, data); + mcu_port4_w(data); } diff --git a/src/mame/drivers/namcos86.cpp b/src/mame/drivers/namcos86.cpp index d49779d44b7..380bc6047c9 100644 --- a/src/mame/drivers/namcos86.cpp +++ b/src/mame/drivers/namcos86.cpp @@ -273,14 +273,14 @@ WRITE8_MEMBER(namcos86_state::watchdog2_w) } -WRITE8_MEMBER(namcos86_state::coin_w) +void namcos86_state::coin_w(uint8_t data) { machine().bookkeeping().coin_lockout_global_w(data & 1); machine().bookkeeping().coin_counter_w(0,~data & 2); machine().bookkeeping().coin_counter_w(1,~data & 4); } -WRITE8_MEMBER(namcos86_state::led_w) +void namcos86_state::led_w(uint8_t data) { m_leds[0] = BIT(data, 3); m_leds[1] = BIT(data, 4); diff --git a/src/mame/drivers/pacland.cpp b/src/mame/drivers/pacland.cpp index 98cd13ae205..98b6a328c36 100644 --- a/src/mame/drivers/pacland.cpp +++ b/src/mame/drivers/pacland.cpp @@ -230,14 +230,14 @@ READ8_MEMBER(pacland_state::input_r) return r; } -WRITE8_MEMBER(pacland_state::coin_w) +void pacland_state::coin_w(uint8_t data) { machine().bookkeeping().coin_lockout_global_w(data & 1); machine().bookkeeping().coin_counter_w(0, ~data & 2); machine().bookkeeping().coin_counter_w(1, ~data & 4); } -WRITE8_MEMBER(pacland_state::led_w) +void pacland_state::led_w(uint8_t data) { m_leds[0] = BIT(data, 3); m_leds[1] = BIT(data, 4); diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp index 7cc2685a6ec..82b92b18175 100644 --- a/src/mame/drivers/polepos.cpp +++ b/src/mame/drivers/polepos.cpp @@ -317,7 +317,7 @@ READ_LINE_MEMBER(polepos_state::auto_start_r) return m_auto_start_mask; } -WRITE8_MEMBER(polepos_state::out) +void polepos_state::out(uint8_t data) { // no start lamps in pole position // output().set_led_value(1,data & 1); @@ -331,26 +331,26 @@ WRITE_LINE_MEMBER(polepos_state::lockout) machine().bookkeeping().coin_lockout_global_w(state); } -READ8_MEMBER(polepos_state::namco_52xx_rom_r) +uint8_t polepos_state::namco_52xx_rom_r(offs_t offset) { uint32_t length = memregion("52xx")->bytes(); logerror("ROM @ %04X\n", offset); return (offset < length) ? memregion("52xx")->base()[offset] : 0xff; } -READ8_MEMBER(polepos_state::namco_52xx_si_r) +uint8_t polepos_state::namco_52xx_si_r() { /* pulled to +5V */ return 1; } -READ8_MEMBER(polepos_state::namco_53xx_k_r) +uint8_t polepos_state::namco_53xx_k_r() { /* hardwired to 0 */ return 0; } -READ8_MEMBER(polepos_state::steering_changed_r) +uint8_t polepos_state::steering_changed_r() { /* read the current steering value and update our delta */ uint8_t steer_new = ioport("STEER")->read(); @@ -372,7 +372,7 @@ READ8_MEMBER(polepos_state::steering_changed_r) return m_steer_accum & 1; } -READ8_MEMBER(polepos_state::steering_delta_r) +uint8_t polepos_state::steering_delta_r() { return m_steer_delta; } diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp index 1cc5208df24..21ddc8e8068 100644 --- a/src/mame/drivers/seattle.cpp +++ b/src/mame/drivers/seattle.cpp @@ -401,7 +401,7 @@ private: void output_w(uint32_t data); DECLARE_READ32_MEMBER(widget_r); DECLARE_WRITE32_MEMBER(widget_w); - DECLARE_WRITE32_MEMBER(wheel_board_w); + void wheel_board_w(offs_t offset, uint32_t data); DECLARE_WRITE_LINE_MEMBER(ide_interrupt); @@ -705,7 +705,7 @@ void seattle_state::analog_port_w(uint32_t data) * Wheelboard output module * *************************************/ -WRITE32_MEMBER(seattle_state::wheel_board_w) +void seattle_state::wheel_board_w(offs_t offset, uint32_t data) { //logerror("wheel_board_w: data = %08X\n", data); uint8_t arg = data & 0xFF; diff --git a/src/mame/drivers/skykid.cpp b/src/mame/drivers/skykid.cpp index f80d7eeafc5..b3e4dc95c68 100644 --- a/src/mame/drivers/skykid.cpp +++ b/src/mame/drivers/skykid.cpp @@ -25,7 +25,7 @@ Notes: #include "speaker.h" -WRITE8_MEMBER(skykid_state::inputport_select_w) +void skykid_state::inputport_select_w(uint8_t data) { if ((data & 0xe0) == 0x60) m_inputport_selected = data & 0x07; @@ -37,7 +37,7 @@ WRITE8_MEMBER(skykid_state::inputport_select_w) } } -READ8_MEMBER(skykid_state::inputport_r) +uint8_t skykid_state::inputport_r() { switch (m_inputport_selected) { @@ -60,7 +60,7 @@ READ8_MEMBER(skykid_state::inputport_r) } } -WRITE8_MEMBER(skykid_state::skykid_led_w) +void skykid_state::skykid_led_w(uint8_t data) { m_leds[0] = BIT(data, 3); m_leds[1] = BIT(data, 4); diff --git a/src/mame/drivers/spyhuntertec.cpp b/src/mame/drivers/spyhuntertec.cpp index 9ada096231b..1723d0b7295 100644 --- a/src/mame/drivers/spyhuntertec.cpp +++ b/src/mame/drivers/spyhuntertec.cpp @@ -96,11 +96,11 @@ private: DECLARE_WRITE8_MEMBER(sound_irq_ack); - DECLARE_WRITE8_MEMBER(ay1_porta_w); - DECLARE_READ8_MEMBER(ay1_porta_r); + void ay1_porta_w(uint8_t data); + uint8_t ay1_porta_r(); - DECLARE_WRITE8_MEMBER(ay2_porta_w); - DECLARE_READ8_MEMBER(ay2_porta_r); + void ay2_porta_w(uint8_t data); + uint8_t ay2_porta_r(); DECLARE_READ8_MEMBER(spyhuntertec_in2_r); DECLARE_READ8_MEMBER(spyhuntertec_in3_r); @@ -121,12 +121,12 @@ private: void spyhuntertec_sound_portmap(address_map &map); }; -WRITE8_MEMBER(spyhuntertec_state::ay1_porta_w) +void spyhuntertec_state::ay1_porta_w(uint8_t data) { // printf("ay1_porta_w %02x\n", data); } -READ8_MEMBER(spyhuntertec_state::ay1_porta_r) +uint8_t spyhuntertec_state::ay1_porta_r() { // printf("ay1_porta_r\n"); return 0; @@ -145,7 +145,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(spyhuntertec_state::analog_count_callback) reset_analog_timer(); } -WRITE8_MEMBER(spyhuntertec_state::ay2_porta_w) +void spyhuntertec_state::ay2_porta_w(uint8_t data) { // d7: latch analog counter on falling edge, d0 selects which one if (~data & m_analog_select & 0x80) @@ -157,7 +157,7 @@ WRITE8_MEMBER(spyhuntertec_state::ay2_porta_w) m_analog_select = data; } -READ8_MEMBER(spyhuntertec_state::ay2_porta_r) +uint8_t spyhuntertec_state::ay2_porta_r() { // read often, even if port is set to output mode // maybe latches something? diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 24eafc7944e..88a0e828317 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -92,14 +92,14 @@ private: DECLARE_WRITE8_MEMBER(irq_disable_w); DECLARE_WRITE8_MEMBER(irq_ctrl_w); void toypop_palette(palette_device &palette) const; - DECLARE_READ8_MEMBER(dipA_l); - DECLARE_READ8_MEMBER(dipA_h); - DECLARE_READ8_MEMBER(dipB_l); - DECLARE_READ8_MEMBER(dipB_h); + uint8_t dipA_l(); + uint8_t dipA_h(); + uint8_t dipB_l(); + uint8_t dipB_h(); //DECLARE_WRITE8_MEMBER(out_coin0); //DECLARE_WRITE8_MEMBER(out_coin1); DECLARE_WRITE8_MEMBER(pal_bank_w); - DECLARE_WRITE8_MEMBER(flip); + void flip(uint8_t data); DECLARE_WRITE8_MEMBER(slave_halt_ctrl_w); DECLARE_READ8_MEMBER(slave_shared_r); DECLARE_WRITE8_MEMBER(slave_shared_w); @@ -370,12 +370,12 @@ WRITE8_MEMBER(namcos16_state::bg_rmw_w) m_bgvram[offset] = (data & 0xf) | ((data & 0xf0) << 4); } -READ8_MEMBER(namcos16_state::dipA_l){ return ioport("DSW1")->read(); } // dips A -READ8_MEMBER(namcos16_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A -READ8_MEMBER(namcos16_state::dipB_l){ return ioport("DSW2")->read(); } // dips B -READ8_MEMBER(namcos16_state::dipB_h){ return ioport("DSW2")->read() >> 4; } // dips B +uint8_t namcos16_state::dipA_l() { return ioport("DSW1")->read(); } // dips A +uint8_t namcos16_state::dipA_h() { return ioport("DSW1")->read() >> 4; } // dips A +uint8_t namcos16_state::dipB_l() { return ioport("DSW2")->read(); } // dips B +uint8_t namcos16_state::dipB_h() { return ioport("DSW2")->read() >> 4; } // dips B -WRITE8_MEMBER(namcos16_state::flip) +void namcos16_state::flip(uint8_t data) { flip_screen_set(data & 1); } diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp index 4ed6fa7757e..81d8a1f6221 100644 --- a/src/mame/drivers/vegas.cpp +++ b/src/mame/drivers/vegas.cpp @@ -445,9 +445,9 @@ private: DECLARE_READ8_MEMBER(parallel_r); DECLARE_WRITE8_MEMBER(parallel_w); DECLARE_WRITE8_MEMBER(mpsreset_w); - DECLARE_WRITE32_MEMBER(i40_w); + void i40_w(uint32_t data); - DECLARE_WRITE32_MEMBER(wheel_board_w); + void wheel_board_w(uint32_t data); std::string sioIRQString(uint8_t data); @@ -1045,7 +1045,7 @@ WRITE8_MEMBER(vegas_state::mpsreset_w) /************************************* * Optical 49 Way Joystick I40 Board *************************************/ -WRITE32_MEMBER(vegas_state::i40_w) +void vegas_state::i40_w(uint32_t data) { //printf("i40_w: data = %08x\n", data); //logerror("i40_w: data = %08x\n", data); @@ -1101,7 +1101,7 @@ CUSTOM_INPUT_MEMBER(vegas_state::i40_r) /************************************* * Keypad *************************************/ -WRITE32_MEMBER(vegas_state::wheel_board_w) +void vegas_state::wheel_board_w(uint32_t data) { bool chip_select = BIT(data, 11); bool latch_clk = BIT(data, 10); diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp index 2be0ff33b12..ce819679c9e 100644 --- a/src/mame/drivers/wacky_gator.cpp +++ b/src/mame/drivers/wacky_gator.cpp @@ -56,15 +56,15 @@ private: DECLARE_WRITE_LINE_MEMBER(adpcm_int); DECLARE_WRITE8_MEMBER(sample_ctrl_w); - DECLARE_WRITE8_MEMBER(alligators_ctrl1_w); - DECLARE_WRITE8_MEMBER(alligators_ctrl2_w); + void alligators_ctrl1_w(uint8_t data); + void alligators_ctrl2_w(uint8_t data); void set_lamps(int p, uint8_t value); - DECLARE_WRITE8_MEMBER(status_lamps_w); - template DECLARE_WRITE8_MEMBER(timing_lamps_w) { set_lamps((N + 1) << 3, data); } + void status_lamps_w(uint8_t data); + template void timing_lamps_w(uint8_t data) { set_lamps((N + 1) << 3, data); } void set_digits(int p, uint8_t value); - template DECLARE_WRITE8_MEMBER(disp_w) { set_digits(N << 1, data); } + template void disp_w(uint8_t data) { set_digits(N << 1, data); } void pmm8713_ck(int i, int state); template DECLARE_WRITE_LINE_MEMBER(alligator_ck) { pmm8713_ck(N, state); } @@ -94,7 +94,7 @@ private: }; -WRITE8_MEMBER(wackygtr_state::status_lamps_w) +void wackygtr_state::status_lamps_w(uint8_t data) { /* ---x xxxx status lamps @@ -123,7 +123,7 @@ WRITE8_MEMBER(wackygtr_state::sample_ctrl_w) m_msm->reset_w(BIT(data, 7)); } -WRITE8_MEMBER(wackygtr_state::alligators_ctrl1_w) +void wackygtr_state::alligators_ctrl1_w(uint8_t data) { m_pit8253[0]->write_gate0(BIT(data, 0)); m_pit8253[0]->write_gate1(BIT(data, 1)); @@ -134,7 +134,7 @@ WRITE8_MEMBER(wackygtr_state::alligators_ctrl1_w) machine().bookkeeping().coin_lockout_w(0, data & 0x40 ? 0 : 1); } -WRITE8_MEMBER(wackygtr_state::alligators_ctrl2_w) +void wackygtr_state::alligators_ctrl2_w(uint8_t data) { /* ---- ---x PMM8713 0 U/D diff --git a/src/mame/drivers/zwackery.cpp b/src/mame/drivers/zwackery.cpp index 0cc45413b6d..15e623db1c0 100644 --- a/src/mame/drivers/zwackery.cpp +++ b/src/mame/drivers/zwackery.cpp @@ -59,7 +59,7 @@ public: private: virtual void video_start() override; - DECLARE_WRITE32_MEMBER(scanline_cb); + void scanline_cb(uint32_t data); DECLARE_WRITE16_MEMBER(videoram_w); DECLARE_READ8_MEMBER(spriteram_r); DECLARE_WRITE8_MEMBER(spriteram_w); @@ -68,12 +68,10 @@ private: TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - DECLARE_WRITE8_MEMBER(pia0_porta_w); + void pia0_porta_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(pia0_irq_w); - DECLARE_READ8_MEMBER(pia1_porta_r); - DECLARE_WRITE8_MEMBER(pia1_porta_w); - DECLARE_READ8_MEMBER(pia1_portb_r); - DECLARE_READ8_MEMBER(pia2_porta_r); + void pia1_porta_w(uint8_t data); + uint8_t pia1_portb_r(); DECLARE_READ8_MEMBER(ptm_r); @@ -248,7 +246,7 @@ void zwackery_state::video_start() gfx2->set_raw_layout(m_srcdata2.get(), gfx2->width(), gfx2->height(), gfx2->elements(), 8 * gfx2->width(), 8 * gfx2->width() * gfx2->height()); } -WRITE32_MEMBER(zwackery_state::scanline_cb) +void zwackery_state::scanline_cb(uint32_t data) { switch (data) { @@ -413,7 +411,7 @@ GFXDECODE_END // AUDIO //************************************************************************** -WRITE8_MEMBER( zwackery_state::pia1_porta_w ) +void zwackery_state::pia1_porta_w(uint8_t data) { m_cheap_squeak_deluxe->sr_w(data >> 4); } @@ -423,7 +421,7 @@ WRITE8_MEMBER( zwackery_state::pia1_porta_w ) // INPUTS/OUTPUTS //************************************************************************** -WRITE8_MEMBER( zwackery_state::pia0_porta_w ) +void zwackery_state::pia0_porta_w(uint8_t data) { // bits 0, 1 and 2 control meters? // bits 3 and 4 control coin counters? @@ -440,12 +438,7 @@ WRITE_LINE_MEMBER(zwackery_state::pia0_irq_w) m_maincpu->set_input_line(5, irq_state ? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER( zwackery_state::pia1_porta_r ) -{ - return ioport("IN1")->read(); -} - -READ8_MEMBER( zwackery_state::pia1_portb_r ) +uint8_t zwackery_state::pia1_portb_r() { uint8_t result = ioport("IN2")->read(); uint8_t wheel = ioport("IN5")->read(); @@ -453,11 +446,6 @@ READ8_MEMBER( zwackery_state::pia1_portb_r ) return result | ((wheel >> 2) & 0x3e); } -READ8_MEMBER( zwackery_state::pia2_porta_r ) -{ - return ioport("IN3")->read(); -} - //************************************************************************** // MACHINE EMULATION @@ -509,13 +497,13 @@ void zwackery_state::zwackery(machine_config &config) m_pia0->irqb_handler().set(FUNC(zwackery_state::pia0_irq_w)); PIA6821(config, m_pia1, 0); - m_pia1->readpa_handler().set(FUNC(zwackery_state::pia1_porta_r)); + m_pia1->readpa_handler().set_ioport("IN1"); m_pia1->writepa_handler().set(FUNC(zwackery_state::pia1_porta_w)); m_pia1->readpb_handler().set(FUNC(zwackery_state::pia1_portb_r)); m_pia1->ca2_handler().set(m_cheap_squeak_deluxe, FUNC(midway_cheap_squeak_deluxe_device::sirq_w)); PIA6821(config, m_pia2, 0); - m_pia2->readpa_handler().set(FUNC(zwackery_state::pia2_porta_r)); + m_pia2->readpa_handler().set_ioport("IN3"); m_pia2->readpb_handler().set_ioport("DSW"); // video hardware diff --git a/src/mame/includes/mappy.h b/src/mame/includes/mappy.h index 2ab96fc6d92..e581bf9ffa6 100644 --- a/src/mame/includes/mappy.h +++ b/src/mame/includes/mappy.h @@ -82,7 +82,7 @@ private: DECLARE_WRITE8_MEMBER(superpac_flipscreen_w); DECLARE_READ8_MEMBER(superpac_flipscreen_r); DECLARE_WRITE8_MEMBER(mappy_scroll_w); - DECLARE_WRITE8_MEMBER(out_lamps); + void out_lamps(uint8_t data); TILEMAP_MAPPER_MEMBER(superpac_tilemap_scan); TILEMAP_MAPPER_MEMBER(mappy_tilemap_scan); TILE_GET_INFO_MEMBER(superpac_get_tile_info); diff --git a/src/mame/includes/midvunit.h b/src/mame/includes/midvunit.h index c82d57677af..e3d6d1718fe 100644 --- a/src/mame/includes/midvunit.h +++ b/src/mame/includes/midvunit.h @@ -164,7 +164,7 @@ private: DECLARE_WRITE32_MEMBER(offroadc_serial_data_w); DECLARE_READ32_MEMBER(midvplus_misc_r); DECLARE_WRITE32_MEMBER(midvplus_misc_w); - DECLARE_WRITE8_MEMBER(midvplus_xf1_w); + void midvplus_xf1_w(uint8_t data); DECLARE_READ32_MEMBER(generic_speedup_r); DECLARE_READ32_MEMBER(midvunit_wheel_board_r); DECLARE_WRITE32_MEMBER(midvunit_wheel_board_w); diff --git a/src/mame/includes/namcofl.h b/src/mame/includes/namcofl.h index e136451e145..cc106f39dab 100644 --- a/src/mame/includes/namcofl.h +++ b/src/mame/includes/namcofl.h @@ -75,17 +75,17 @@ private: DECLARE_WRITE32_MEMBER(sysreg_w); DECLARE_WRITE8_MEMBER(c116_w); DECLARE_WRITE16_MEMBER(mcu_shared_w); - DECLARE_READ8_MEMBER(port6_r); - DECLARE_WRITE8_MEMBER(port6_w); - DECLARE_READ8_MEMBER(port7_r); - DECLARE_READ8_MEMBER(dac7_r); - DECLARE_READ8_MEMBER(dac6_r); - DECLARE_READ8_MEMBER(dac5_r); - DECLARE_READ8_MEMBER(dac4_r); - DECLARE_READ8_MEMBER(dac3_r); - DECLARE_READ8_MEMBER(dac2_r); - DECLARE_READ8_MEMBER(dac1_r); - DECLARE_READ8_MEMBER(dac0_r); + uint8_t port6_r(); + void port6_w(uint8_t data); + uint8_t port7_r(); + uint8_t dac7_r(); + uint8_t dac6_r(); + uint8_t dac5_r(); + uint8_t dac4_r(); + uint8_t dac3_r(); + uint8_t dac2_r(); + uint8_t dac1_r(); + uint8_t dac0_r(); DECLARE_WRITE32_MEMBER(spritebank_w); DECLARE_MACHINE_START(namcofl); DECLARE_MACHINE_RESET(namcofl); diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 2c05565ed8d..2522ef632b4 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -124,9 +124,9 @@ private: DECLARE_READ32_MEMBER(share_r); DECLARE_WRITE32_MEMBER(share_w); DECLARE_WRITE16_MEMBER(mcu_shared_w); - DECLARE_READ8_MEMBER(port6_r); - DECLARE_WRITE8_MEMBER(port6_w); - DECLARE_READ8_MEMBER(port7_r); + uint8_t port6_r(); + void port6_w(uint8_t data); + uint8_t port7_r(); template uint16_t dac_bit_r(); DECLARE_WRITE32_MEMBER(rozbank32_w); diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h index df80e3bab52..5e5b6356de4 100644 --- a/src/mame/includes/namcos2.h +++ b/src/mame/includes/namcos2.h @@ -189,8 +189,8 @@ enum DECLARE_READ16_MEMBER(dpram_word_r); DECLARE_WRITE16_MEMBER(dpram_word_w); - DECLARE_READ8_MEMBER(dpram_byte_r); - DECLARE_WRITE8_MEMBER(dpram_byte_w); + uint8_t dpram_byte_r(offs_t offset); + void dpram_byte_w(offs_t offset, uint8_t data); DECLARE_WRITE8_MEMBER(eeprom_w); DECLARE_READ8_MEMBER(eeprom_r); @@ -198,8 +198,8 @@ enum DECLARE_READ16_MEMBER(c140_rom_r); DECLARE_WRITE8_MEMBER(sound_bankselect_w); - DECLARE_WRITE8_MEMBER(sound_reset_w); - DECLARE_WRITE8_MEMBER(system_reset_w); + void sound_reset_w(uint8_t data); + void system_reset_w(uint8_t data); void reset_all_subcpus(int state); virtual void video_start() override; diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index c1c4a0fb27e..a347c24af20 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -279,11 +279,11 @@ protected: DECLARE_WRITE16_MEMBER(namcos22_dspram16_bank_w); DECLARE_READ16_MEMBER(namcos22_dspram16_r); DECLARE_WRITE16_MEMBER(namcos22_dspram16_w); - DECLARE_READ16_MEMBER(pdp_status_r); + u16 pdp_status_r(); DECLARE_READ16_MEMBER(pdp_begin_r); - DECLARE_READ16_MEMBER(dsp_hold_signal_r); - DECLARE_WRITE16_MEMBER(dsp_hold_ack_w); - DECLARE_WRITE16_MEMBER(dsp_xf_output_w); + u16 dsp_hold_signal_r(); + void dsp_hold_ack_w(u16 data); + void dsp_xf_output_w(u16 data); DECLARE_WRITE16_MEMBER(point_address_w); DECLARE_WRITE16_MEMBER(point_loword_iw); DECLARE_WRITE16_MEMBER(point_hiword_w); @@ -295,13 +295,13 @@ protected: DECLARE_READ16_MEMBER(dsp_unk8_r); DECLARE_READ16_MEMBER(custom_ic_status_r); DECLARE_READ16_MEMBER(dsp_upload_status_r); - DECLARE_WRITE16_MEMBER(slave_serial_io_w); - DECLARE_READ16_MEMBER(master_serial_io_r); + void slave_serial_io_w(u16 data); + u16 master_serial_io_r(); DECLARE_WRITE16_MEMBER(dsp_unk_porta_w); DECLARE_WRITE16_MEMBER(dsp_led_w); DECLARE_WRITE16_MEMBER(dsp_unk8_w); DECLARE_WRITE16_MEMBER(master_render_device_w); - DECLARE_READ16_MEMBER(dsp_slave_bioz_r); + u16 dsp_slave_bioz_r(); DECLARE_READ16_MEMBER(dsp_slave_port3_r); DECLARE_READ16_MEMBER(dsp_slave_port4_r); DECLARE_READ16_MEMBER(dsp_slave_port5_r); @@ -320,8 +320,8 @@ protected: DECLARE_WRITE16_MEMBER(namcos22_portbit_w); DECLARE_READ16_MEMBER(namcos22_dipswitch_r); DECLARE_WRITE16_MEMBER(namcos22_cpuleds_w); - DECLARE_READ8_MEMBER(mcu_port4_s22_r); - DECLARE_READ8_MEMBER(iomcu_port4_s22_r); + u8 mcu_port4_s22_r(); + u8 iomcu_port4_s22_r(); DECLARE_READ16_MEMBER(mcuc74_speedup_r); DECLARE_WRITE16_MEMBER(mcu_speedup_w); @@ -563,17 +563,17 @@ private: DECLARE_READ32_MEMBER(alpinesa_prot_r); DECLARE_WRITE32_MEMBER(alpinesa_prot_w); DECLARE_READ16_MEMBER(timecris_gun_r); - DECLARE_WRITE8_MEMBER(mb87078_gain_changed); + void mb87078_gain_changed(offs_t offset, u8 data); DECLARE_WRITE32_MEMBER(namcos22s_chipselect_w); - DECLARE_WRITE8_MEMBER(mcu_port4_w); - DECLARE_READ8_MEMBER(mcu_port4_r); - DECLARE_WRITE8_MEMBER(mcu_port5_w); - DECLARE_READ8_MEMBER(mcu_port5_r); - DECLARE_WRITE8_MEMBER(mcu_port6_w); - DECLARE_READ8_MEMBER(mcu_port6_r); + void mcu_port4_w(u8 data); + u8 mcu_port4_r(); + void mcu_port5_w(u8 data); + u8 mcu_port5_r(); + void mcu_port6_w(u8 data); + u8 mcu_port6_r(); template u16 mcu_adc_r(); - DECLARE_WRITE8_MEMBER(alpine_mcu_port4_w); + void alpine_mcu_port4_w(u8 data); DECLARE_READ16_MEMBER(mcu130_speedup_r); DECLARE_READ16_MEMBER(mcu141_speedup_r); diff --git a/src/mame/includes/namcos86.h b/src/mame/includes/namcos86.h index 0c919026a96..03a524c79bb 100644 --- a/src/mame/includes/namcos86.h +++ b/src/mame/includes/namcos86.h @@ -50,8 +50,8 @@ private: DECLARE_WRITE8_MEMBER(int_ack2_w); DECLARE_WRITE8_MEMBER(watchdog1_w); DECLARE_WRITE8_MEMBER(watchdog2_w); - DECLARE_WRITE8_MEMBER(coin_w); - DECLARE_WRITE8_MEMBER(led_w); + void coin_w(uint8_t data); + void led_w(uint8_t data); DECLARE_WRITE8_MEMBER(cus115_w); DECLARE_WRITE8_MEMBER(videoram1_w); DECLARE_WRITE8_MEMBER(videoram2_w); diff --git a/src/mame/includes/pacland.h b/src/mame/includes/pacland.h index a5b6ee94f5b..4bae20f5433 100644 --- a/src/mame/includes/pacland.h +++ b/src/mame/includes/pacland.h @@ -57,8 +57,8 @@ public: DECLARE_WRITE8_MEMBER(subreset_w); DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_READ8_MEMBER(input_r); - DECLARE_WRITE8_MEMBER(coin_w); - DECLARE_WRITE8_MEMBER(led_w); + void coin_w(uint8_t data); + void led_w(uint8_t data); DECLARE_WRITE8_MEMBER(irq_1_ctrl_w); DECLARE_WRITE8_MEMBER(irq_2_ctrl_w); DECLARE_WRITE8_MEMBER(videoram_w); diff --git a/src/mame/includes/polepos.h b/src/mame/includes/polepos.h index 1b64d3c2265..d9b8a643fbc 100644 --- a/src/mame/includes/polepos.h +++ b/src/mame/includes/polepos.h @@ -108,13 +108,13 @@ private: DECLARE_WRITE16_MEMBER(alpha16_w); DECLARE_READ8_MEMBER(alpha_r); DECLARE_WRITE8_MEMBER(alpha_w); - DECLARE_WRITE8_MEMBER(out); + void out(uint8_t data); DECLARE_WRITE_LINE_MEMBER(lockout); - DECLARE_READ8_MEMBER(namco_52xx_rom_r); - DECLARE_READ8_MEMBER(namco_52xx_si_r); - DECLARE_READ8_MEMBER(namco_53xx_k_r); - DECLARE_READ8_MEMBER(steering_changed_r); - DECLARE_READ8_MEMBER(steering_delta_r); + uint8_t namco_52xx_rom_r(offs_t offset); + uint8_t namco_52xx_si_r(); + uint8_t namco_53xx_k_r(); + uint8_t steering_changed_r(); + uint8_t steering_delta_r(); DECLARE_WRITE8_MEMBER(bootleg_soundlatch_w); TILE_GET_INFO_MEMBER(bg_get_tile_info); TILE_GET_INFO_MEMBER(tx_get_tile_info); diff --git a/src/mame/includes/skykid.h b/src/mame/includes/skykid.h index f95084e777f..ce22c2784ed 100644 --- a/src/mame/includes/skykid.h +++ b/src/mame/includes/skykid.h @@ -31,9 +31,9 @@ public: void init_skykid(); private: - DECLARE_WRITE8_MEMBER(inputport_select_w); - DECLARE_READ8_MEMBER(inputport_r); - DECLARE_WRITE8_MEMBER(skykid_led_w); + void inputport_select_w(uint8_t data); + uint8_t inputport_r(); + void skykid_led_w(uint8_t data); DECLARE_WRITE8_MEMBER(skykid_subreset_w); DECLARE_WRITE8_MEMBER(skykid_bankswitch_w); DECLARE_WRITE8_MEMBER(skykid_irq_1_ctrl_w); diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp index f976c5d84f1..c7aedfa33c2 100644 --- a/src/mame/machine/midwayic.cpp +++ b/src/mame/machine/midwayic.cpp @@ -246,36 +246,36 @@ void midway_serial_pic_emu_device::device_start() } -READ8_MEMBER(midway_serial_pic_emu_device::read_a) +uint8_t midway_serial_pic_emu_device::read_a() { // printf("%s: read_a\n", machine().describe_context().c_str()); return 0x00; } -READ8_MEMBER(midway_serial_pic_emu_device::read_b) +uint8_t midway_serial_pic_emu_device::read_b() { // printf("%s: read_b\n", machine().describe_context().c_str()); return 0x00; } -READ8_MEMBER(midway_serial_pic_emu_device::read_c) +uint8_t midway_serial_pic_emu_device::read_c() { // used // printf("%s: read_c\n", machine().describe_context().c_str()); return 0x00; } -WRITE8_MEMBER(midway_serial_pic_emu_device::write_a) +void midway_serial_pic_emu_device::write_a(uint8_t data) { // printf("%s: write_a %02x\n", machine().describe_context().c_str(), data); } -WRITE8_MEMBER(midway_serial_pic_emu_device::write_b) +void midway_serial_pic_emu_device::write_b(uint8_t data) { // printf("%s: write_b %02x\n", machine().describe_context().c_str(), data); } -WRITE8_MEMBER(midway_serial_pic_emu_device::write_c) +void midway_serial_pic_emu_device::write_c(uint8_t data) { // used // printf("%s: write_c %02x\n", machine().describe_context().c_str(), data); @@ -813,7 +813,7 @@ void midway_ioasic_device::update_ioasic_irq() } -WRITE8_MEMBER(midway_ioasic_device::cage_irq_handler) +void midway_ioasic_device::cage_irq_handler(uint8_t data) { logerror("CAGE irq handler: %d\n", data); m_sound_irq_state = 0; diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h index 3c629688ac9..90bd1415bbc 100644 --- a/src/mame/machine/midwayic.h +++ b/src/mame/machine/midwayic.h @@ -74,12 +74,12 @@ protected: virtual void device_start() override; private: - DECLARE_READ8_MEMBER(read_a); - DECLARE_READ8_MEMBER(read_b); - DECLARE_READ8_MEMBER(read_c); - DECLARE_WRITE8_MEMBER(write_a); - DECLARE_WRITE8_MEMBER(write_b); - DECLARE_WRITE8_MEMBER(write_c); + uint8_t read_a(); + uint8_t read_b(); + uint8_t read_c(); + void write_a(uint8_t data); + void write_b(uint8_t data); + void write_c(uint8_t data); }; @@ -175,7 +175,7 @@ public: DECLARE_READ32_MEMBER( packed_r ); DECLARE_WRITE32_MEMBER( packed_w ); - DECLARE_WRITE8_MEMBER(cage_irq_handler); + void cage_irq_handler(uint8_t data); void serial_rx_w(u8 data); diff --git a/src/mame/machine/namcos2.cpp b/src/mame/machine/namcos2.cpp index f0d3dba8133..5d65e284dfa 100644 --- a/src/mame/machine/namcos2.cpp +++ b/src/mame/machine/namcos2.cpp @@ -114,7 +114,7 @@ void namcos2_state::reset_all_subcpus(int state) } } -WRITE8_MEMBER(namcos2_state::sound_reset_w) +void namcos2_state::sound_reset_w(uint8_t data) { if (data & 0x01) { @@ -129,7 +129,7 @@ WRITE8_MEMBER(namcos2_state::sound_reset_w) } } -WRITE8_MEMBER(namcos2_state::system_reset_w) +void namcos2_state::system_reset_w(uint8_t data) { reset_all_subcpus(data & 1 ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/machine/namcos21_dsp.cpp b/src/mame/machine/namcos21_dsp.cpp index 30caac6c524..45cba87d1b5 100644 --- a/src/mame/machine/namcos21_dsp.cpp +++ b/src/mame/machine/namcos21_dsp.cpp @@ -130,7 +130,7 @@ void namcos21_dsp_device::winrun_flush_poly() } } /* winrun_flushpoly */ -READ16_MEMBER(namcos21_dsp_device::winrun_poly_reset_r) +uint16_t namcos21_dsp_device::winrun_poly_reset_r() { winrun_flush_poly(); return 0; diff --git a/src/mame/machine/namcos21_dsp.h b/src/mame/machine/namcos21_dsp.h index 17bf24a4c5c..1c43b551e97 100644 --- a/src/mame/machine/namcos21_dsp.h +++ b/src/mame/machine/namcos21_dsp.h @@ -71,7 +71,7 @@ private: DECLARE_READ16_MEMBER(winrun_table_r); DECLARE_WRITE16_MEMBER(winrun_dsp_complete_w); DECLARE_WRITE16_MEMBER(winrun_dsp_render_w); - DECLARE_READ16_MEMBER(winrun_poly_reset_r); + uint16_t winrun_poly_reset_r(); DECLARE_WRITE16_MEMBER(winrun_dsp_pointrom_addr_w); DECLARE_READ16_MEMBER(winrun_dsp_pointrom_data_r); diff --git a/src/mame/machine/namcos21_dsp_c67.cpp b/src/mame/machine/namcos21_dsp_c67.cpp index ca3ca239296..93e407ec1fc 100644 --- a/src/mame/machine/namcos21_dsp_c67.cpp +++ b/src/mame/machine/namcos21_dsp_c67.cpp @@ -535,7 +535,7 @@ READ16_MEMBER(namcos21_dsp_c67_device::dsp_portf_r) return 0; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_xf_w) +void namcos21_dsp_c67_device::dsp_xf_w(uint16_t data) { if (ENABLE_LOGGING) logerror("xf(%d)\n",data); } @@ -654,7 +654,7 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::slave_port3_w) { /* 0=busy, 1=ready? */ } -WRITE16_MEMBER(namcos21_dsp_c67_device::slave_XF_output_w) +void namcos21_dsp_c67_device::slave_XF_output_w(uint16_t data) { if (ENABLE_LOGGING) logerror( "%s :slaveXF(%d)\n", machine().describe_context(), data ); } diff --git a/src/mame/machine/namcos21_dsp_c67.h b/src/mame/machine/namcos21_dsp_c67.h index a360f857afc..602cd7cf2e7 100644 --- a/src/mame/machine/namcos21_dsp_c67.h +++ b/src/mame/machine/namcos21_dsp_c67.h @@ -123,13 +123,13 @@ private: DECLARE_WRITE16_MEMBER(dsp_portb_w); DECLARE_WRITE16_MEMBER(dsp_portc_w); DECLARE_READ16_MEMBER(dsp_portf_r); - DECLARE_WRITE16_MEMBER(dsp_xf_w); + void dsp_xf_w(uint16_t data); DECLARE_READ16_MEMBER(slave_port0_r); DECLARE_WRITE16_MEMBER(slave_port0_w); DECLARE_READ16_MEMBER(slave_port2_r); DECLARE_READ16_MEMBER(slave_port3_r); DECLARE_WRITE16_MEMBER(slave_port3_w); - DECLARE_WRITE16_MEMBER(slave_XF_output_w); + void slave_XF_output_w(uint16_t data); DECLARE_READ16_MEMBER(slave_portf_r); void master_dsp_data(address_map &map); From 8a085158a145f6860fd1a831c7347cf19a5fcdd3 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Fri, 15 May 2020 22:01:38 +0200 Subject: [PATCH 66/69] pc2000.cpp: Move 'pc2000s' to use a SED1278-0B instead of an HD44780 (nw) --- src/mame/drivers/pc2000.cpp | 58 +++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/src/mame/drivers/pc2000.cpp b/src/mame/drivers/pc2000.cpp index bd69cabfd55..9732eb9e3c5 100644 --- a/src/mame/drivers/pc2000.cpp +++ b/src/mame/drivers/pc2000.cpp @@ -59,6 +59,7 @@ public: { } void pc2000(machine_config &config); + void pc2000eur(machine_config &config); void gl2000(machine_config &config); protected: @@ -87,6 +88,8 @@ protected: required_memory_bank m_bank1; optional_memory_bank m_bank2; + void pc2000gen(machine_config &config); + private: optional_ioport_array<8> m_rows[2]; @@ -890,7 +893,7 @@ DEVICE_IMAGE_LOAD_MEMBER( pc2000_state::cart_load ) return image_init_result::PASS; } -void pc2000_state::pc2000(machine_config &config) +void pc2000_state::pc2000gen(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(4'000'000)); /* probably not accurate */ @@ -910,9 +913,6 @@ void pc2000_state::pc2000(machine_config &config) PALETTE(config, "palette", FUNC(pc2000_state::pc2000_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_pc2000); - HD44780(config, m_lcdc, 0); - m_lcdc->set_lcd_size(2, 20); - /* sound hardware */ SPEAKER(config, "mono").front_center(); BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); @@ -922,6 +922,20 @@ void pc2000_state::pc2000(machine_config &config) SOFTWARE_LIST(config, "pc1000_cart").set_compatible("pc1000"); } +void pc2000_state::pc2000(machine_config &config) +{ + pc2000gen(config); + HD44780(config, m_lcdc, 0); + m_lcdc->set_lcd_size(2, 20); +} + +void pc2000_state::pc2000eur(machine_config &config) +{ + pc2000gen(config); + SED1278_0B(config, m_lcdc, 0); + m_lcdc->set_lcd_size(2, 20); +} + void pc2000_state::gl2000(machine_config &config) { pc2000(config); @@ -1101,21 +1115,21 @@ ROM_END /* Driver */ -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1988, pc1000, 0, 0, pc1000, pc1000, pc1000_state, empty_init, "Video Technology", "PreComputer 1000", MACHINE_NOT_WORKING ) -COMP( 1988, misterx, 0, 0, misterx, pc1000, pc1000_state, empty_init, "Video Technology / Yeno", "MisterX", MACHINE_NOT_WORKING ) -COMP( 1988, ordisava, 0, 0, pc1000, pc1000, pc1000_state, empty_init, "Video Technology", "Ordisavant (France)", MACHINE_NOT_WORKING ) -COMP( 1993, pc2000, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "PreComputer 2000", MACHINE_NOT_WORKING ) -COMP( 1993, pc2000s, pc2000, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "PreComputer 2000 (Spain)", MACHINE_NOT_WORKING ) -COMP( 1993, gl2000, 0, 0, gl2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 2000", MACHINE_NOT_WORKING ) -COMP( 1994, gl2000c, gl2000, 0, gl2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 2000 Compact", MACHINE_NOT_WORKING ) -COMP( 1995, gl2000p, gl2000, 0, gl2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 2000 Plus", MACHINE_NOT_WORKING ) -COMP( 1996, gl3000s, 0, 0, gl3000s, gl3000s, gl3000s_state,empty_init, "Video Technology", "Genius Leader 3000S (Germany)", MACHINE_NOT_WORKING ) -COMP( 1994, gl4000, 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Leader 4000 Quadro (Germany)", MACHINE_NOT_WORKING ) -COMP( 1996, gl4004, 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Leader 4004 Quadro L (Germany)", MACHINE_NOT_WORKING ) -COMP( 1997, gl5000, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 5000 (Germany)", MACHINE_IS_SKELETON ) -COMP( 1997, gl5005x, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 5005X (Germany)", MACHINE_IS_SKELETON ) -COMP( 1997, glpn, 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Leader Power Notebook (Germany)", MACHINE_IS_SKELETON ) -COMP( 1998, gmtt , 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Master Table Top (Germany)", MACHINE_IS_SKELETON ) -COMP( 2001, gbs5505x, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius BrainStation 5505X (Germany)", MACHINE_IS_SKELETON ) -COMP( 1999, lexipcm, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Lexibook", "LexiPC Mega 2000 (Germany)", MACHINE_IS_SKELETON ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1988, pc1000, 0, 0, pc1000, pc1000, pc1000_state, empty_init, "Video Technology", "PreComputer 1000", MACHINE_NOT_WORKING ) +COMP( 1988, misterx, 0, 0, misterx, pc1000, pc1000_state, empty_init, "Video Technology / Yeno", "MisterX", MACHINE_NOT_WORKING ) +COMP( 1988, ordisava, 0, 0, pc1000, pc1000, pc1000_state, empty_init, "Video Technology", "Ordisavant (France)", MACHINE_NOT_WORKING ) +COMP( 1993, pc2000, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "PreComputer 2000", MACHINE_NOT_WORKING ) +COMP( 1993, pc2000s, pc2000, 0, pc2000eur, pc2000, pc2000_state, empty_init, "Video Technology", "PreComputer 2000 (Spain)", MACHINE_NOT_WORKING ) +COMP( 1993, gl2000, 0, 0, gl2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 2000", MACHINE_NOT_WORKING ) +COMP( 1994, gl2000c, gl2000, 0, gl2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 2000 Compact", MACHINE_NOT_WORKING ) +COMP( 1995, gl2000p, gl2000, 0, gl2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 2000 Plus", MACHINE_NOT_WORKING ) +COMP( 1996, gl3000s, 0, 0, gl3000s, gl3000s, gl3000s_state,empty_init, "Video Technology", "Genius Leader 3000S (Germany)", MACHINE_NOT_WORKING ) +COMP( 1994, gl4000, 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Leader 4000 Quadro (Germany)", MACHINE_NOT_WORKING ) +COMP( 1996, gl4004, 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Leader 4004 Quadro L (Germany)", MACHINE_NOT_WORKING ) +COMP( 1997, gl5000, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 5000 (Germany)", MACHINE_IS_SKELETON ) +COMP( 1997, gl5005x, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius Leader 5005X (Germany)", MACHINE_IS_SKELETON ) +COMP( 1997, glpn, 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Leader Power Notebook (Germany)", MACHINE_IS_SKELETON ) +COMP( 1998, gmtt , 0, 0, gl4000, pc2000, gl4004_state, empty_init, "Video Technology", "Genius Master Table Top (Germany)", MACHINE_IS_SKELETON ) +COMP( 2001, gbs5505x, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Video Technology", "Genius BrainStation 5505X (Germany)", MACHINE_IS_SKELETON ) +COMP( 1999, lexipcm, 0, 0, pc2000, pc2000, pc2000_state, empty_init, "Lexibook", "LexiPC Mega 2000 (Germany)", MACHINE_IS_SKELETON ) From 12ec6362bbc975e798a97cec7b5ef6d7d34c4dcc Mon Sep 17 00:00:00 2001 From: Frank Palazzolo Date: Fri, 15 May 2020 16:14:05 -0400 Subject: [PATCH 67/69] netlist: Added devices CD4013, CD4069, CD4070 --- src/lib/netlist/build/makefile | 1 + src/lib/netlist/buildVS/netlistlib.vcxproj | 1 + .../buildVS/netlistlib.vcxproj.filters | 6 + src/lib/netlist/devices/net_lib.h | 1 + src/lib/netlist/devices/nld_4013.cpp | 143 ++++++++++++++++++ src/lib/netlist/devices/nld_4013.h | 59 ++++++++ src/lib/netlist/devices/nld_devinc.h | 3 + src/lib/netlist/macro/nlm_cd4xxx.cpp | 74 +++++++-- src/lib/netlist/macro/nlm_cd4xxx.h | 6 + 9 files changed, 279 insertions(+), 15 deletions(-) create mode 100644 src/lib/netlist/devices/nld_4013.cpp create mode 100644 src/lib/netlist/devices/nld_4013.h diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index aaf6dca96ec..d18a65605aa 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -145,6 +145,7 @@ NLOBJS := \ $(NLOBJ)/devices/nld_2716.o \ $(NLOBJ)/devices/nld_tms4800.o \ $(NLOBJ)/devices/nld_4006.o \ + $(NLOBJ)/devices/nld_4013.o \ $(NLOBJ)/devices/nld_4020.o \ $(NLOBJ)/devices/nld_4066.o \ $(NLOBJ)/devices/nld_4316.o \ diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj b/src/lib/netlist/buildVS/netlistlib.vcxproj index 231ced66701..726b81546b4 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj @@ -123,6 +123,7 @@ + diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters index 4416e3295b2..2188b989e7e 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters @@ -105,6 +105,9 @@ Source Files + + Source Files + Source Files @@ -473,6 +476,9 @@ Header Files + + Header Files + Header Files diff --git a/src/lib/netlist/devices/net_lib.h b/src/lib/netlist/devices/net_lib.h index 9da245d3008..12f55858111 100644 --- a/src/lib/netlist/devices/net_lib.h +++ b/src/lib/netlist/devices/net_lib.h @@ -48,6 +48,7 @@ #include "nld_2102A.h" #include "nld_2716.h" #include "nld_4006.h" +#include "nld_4013.h" #include "nld_4020.h" #include "nld_4066.h" #include "nld_4316.h" diff --git a/src/lib/netlist/devices/nld_4013.cpp b/src/lib/netlist/devices/nld_4013.cpp new file mode 100644 index 00000000000..18aba4687e0 --- /dev/null +++ b/src/lib/netlist/devices/nld_4013.cpp @@ -0,0 +1,143 @@ + +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_4013.c + * + */ + +#include "nld_4013.h" +#include "netlist/nl_base.h" +#include "nlid_system.h" + +#include + +namespace netlist +{ + namespace devices + { + + NETLIB_OBJECT(4013) + { + NETLIB_CONSTRUCTOR(4013) + , m_D(*this, "DATA") + , m_RESET(*this, "RESET") + , m_SET(*this, "SET") + , m_CLK(*this, "CLOCK", NETLIB_DELEGATE(4013, clk)) + , m_Q(*this, "Q") + , m_QQ(*this, "QQ") + , m_nextD(*this, "m_nextD", 0) + , m_power_pins(*this) + { + } + + private: + NETLIB_RESETI(); + NETLIB_UPDATEI(); + NETLIB_HANDLERI(clk); + + logic_input_t m_D; + logic_input_t m_RESET; + logic_input_t m_SET; + logic_input_t m_CLK; + logic_output_t m_Q; + logic_output_t m_QQ; + + state_var m_nextD; + + nld_power_pins m_power_pins; + + void newstate_clk(const netlist_sig_t stateQ) + { + static constexpr delay = NLTIME_FROM_NS(150); + m_Q.push(stateQ, delay); + m_QQ.push(!stateQ, delay); + } + + void newstate_setreset(const netlist_sig_t stateQ, const netlist_sig_t stateQQ) + { + // Q: 150 ns, QQ: 200 ns + static constexpr const std::array delay = { NLTIME_FROM_NS(150), NLTIME_FROM_NS(200) }; + m_Q.push(stateQ, delay[0]); + m_QQ.push(stateQQ, delay[1]); + } + }; + + NETLIB_OBJECT(4013_dip) + { + NETLIB_CONSTRUCTOR(4013_dip) + NETLIB_FAMILY("CD4XXX") + , m_A(*this, "A") + , m_B(*this, "B") + { + register_subalias("1", "A.Q"); + register_subalias("2", "A.QQ"); + register_subalias("3", "A.CLOCK"); + register_subalias("4", "A.RESET"); + register_subalias("5", "A.DATA"); + register_subalias("6", "A.SET"); + register_subalias("7", "A.VSS"); + + register_subalias("8", "B.SET"); + register_subalias("9", "B.DATA"); + register_subalias("10", "B.RESET"); + register_subalias("11", "B.CLOCK"); + register_subalias("12", "B.QQ"); + register_subalias("13", "B.Q"); + register_subalias("14", "A.VDD"); + + connect("A.VSS", "B.VSS"); + connect("A.VDD", "B.VDD"); + } + NETLIB_UPDATEI(); + NETLIB_RESETI(); + + private: + NETLIB_SUB(4013) m_A; + NETLIB_SUB(4013) m_B; + }; + + NETLIB_HANDLER(4013, clk) + { + newstate_clk(m_nextD); + m_CLK.inactivate(); + } + + NETLIB_UPDATE(4013) + { + const auto set(m_SET()); + const auto reset(m_RESET()); + if ((set ^ 1) & (reset ^ 1)) + { + m_D.activate(); + m_nextD = m_D(); + m_CLK.activate_lh(); + } + else + { + newstate_setreset(set, reset); + m_CLK.inactivate(); + m_D.inactivate(); + } + } + + NETLIB_RESET(4013) + { + m_CLK.set_state(logic_t::STATE_INP_LH); + m_D.set_state(logic_t::STATE_INP_ACTIVE); + m_nextD = 0; + } + + NETLIB_RESET(4013_dip) + { + } + + NETLIB_UPDATE(4013_dip) + { + } + + NETLIB_DEVICE_IMPL(CD4013, "CD4013", "+CLOCK,+DATA,+RESET,+SET,@VDD,@VSS") + NETLIB_DEVICE_IMPL(CD4013_DIP, "CD4013_DIP", "") + + } //namespace devices +} // namespace netlist diff --git a/src/lib/netlist/devices/nld_4013.h b/src/lib/netlist/devices/nld_4013.h new file mode 100644 index 00000000000..053a43f0ed5 --- /dev/null +++ b/src/lib/netlist/devices/nld_4013.h @@ -0,0 +1,59 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_4013.h + * + * CD4013: Dual Positive-Edge-Triggered D Flip-Flops + * with Set, Reset and Complementary Outputs + * + * +--------------+ + * Q1 |1 ++ 14| VDD + * Q1Q |2 13| Q2 + * CLOCK1 |3 12| Q2Q + * RESET1 |4 4013 11| CLOCK2 + * DATA1 |5 10| RESET2 + * SET1 |6 9| DATA2 + * VSS |7 8| SET2 + * +--------------+ + * + * +-----+-----+-----+---++---+-----+ + * | SET | RES | CLK | D || Q | QQ | + * +=====+=====+=====+===++===+=====+ + * | 1 | 0 | X | X || 1 | 0 | + * | 0 | 1 | X | X || 0 | 1 | + * | 1 | 1 | X | X || 1 | 1 | (*) + * | 0 | 0 | R | 1 || 1 | 0 | + * | 0 | 0 | R | 0 || 0 | 1 | + * | 0 | 0 | 0 | X || Q0| Q0Q | + * +-----+-----+-----+---++---+-----+ + * + * (*) This configuration is not stable, i.e. it will not persist + * when either the preset and or clear inputs return to their inactive (high) level + * + * Q0 The output logic level of Q before the indicated input conditions were established + * + * R: 0 -. 1 + * + * Naming conventions follow National Semiconductor datasheet + * + * FIXME: Check that (*) is emulated properly + */ + +#ifndef NLD_4013_H_ +#define NLD_4013_H_ + +#include "netlist/nl_setup.h" + +#define CD4013(name, cCLOCK, cDATA, cRESET, cSET) \ + NET_REGISTER_DEV(CD4013, name) \ + NET_CONNECT(name, VSS, VSS) \ + NET_CONNECT(name, VDD, VDD) \ + NET_CONNECT(name, CLK, cCLK) \ + NET_CONNECT(name, DATA, cDATA) \ + NET_CONNECT(name, SET, cSET) \ + NET_CONNECT(name, RESET, cRESET) + +#define CD4013_DIP(name) \ + NET_REGISTER_DEV(CD4013_DIP, name) + +#endif /* NLD_4013_H_ */ diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h index af0d1a26d4b..aff6c92d630 100644 --- a/src/lib/netlist/devices/nld_devinc.h +++ b/src/lib/netlist/devices/nld_devinc.h @@ -906,6 +906,9 @@ #define CD4070_GATE(name) \ NET_REGISTER_DEVEXT(CD4070_GATE, name) +#define CD4069_GATE(name) \ + NET_REGISTER_DEVEXT(CD4069_GATE, name) + #define CD4001_DIP(name) \ NET_REGISTER_DEVEXT(CD4001_DIP, name) diff --git a/src/lib/netlist/macro/nlm_cd4xxx.cpp b/src/lib/netlist/macro/nlm_cd4xxx.cpp index 52adb40430d..2411f837b29 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.cpp +++ b/src/lib/netlist/macro/nlm_cd4xxx.cpp @@ -7,13 +7,13 @@ * CD4001BC: Quad 2-Input NOR Buffered B Series Gate * * +--------------+ - * A1 |1 ++ 14| VCC + * A1 |1 ++ 14| VDD * B1 |2 13| A6 * A2 |3 12| Y6 * Y2 |4 4001 11| A5 * A3 |5 10| Y5 * Y3 |6 9| A4 - * GND |7 8| Y4 + * VSS |7 8| Y4 * +--------------+ * */ @@ -24,16 +24,16 @@ static NETLIST_START(CD4001_DIP) CD4001_GATE(s3) CD4001_GATE(s4) - NET_C(s1.VCC, s2.VCC, s3.VCC, s4.VCC) - NET_C(s1.GND, s2.GND, s3.GND, s4.GND) + NET_C(s1.VDD, s2.VDD, s3.VDD, s4.VDD) + NET_C(s1.VSS, s2.VSS, s3.VSS, s4.VSS) DIPPINS( /* +--------------+ */ - s1.A, /* A1 |1 ++ 14| VDD */ s1.VCC, + s1.A, /* A1 |1 ++ 14| VDD */ s1.VDD, s1.B, /* B1 |2 13| A6 */ s4.B, s1.Q, /* A2 |3 12| Y6 */ s4.A, s2.Q, /* Y2 |4 4001 11| A5 */ s4.Q, s2.A, /* A3 |5 10| Y5 */ s3.Q, s2.B, /* Y3 |6 9| A4 */ s3.B, - s1.GND, /* VSS |7 8| Y4 */ s3.A + s1.VSS, /* VSS |7 8| Y4 */ s3.A /* +--------------+ */ ) @@ -149,7 +149,45 @@ static NETLIST_START(CD4016_DIP) NETLIST_END() /* - * DM7486: Quad 2-Input Exclusive-OR Gates + * CD4069: Hex Inverter + * _ + * Y = A + * +---++---+ + * | A || Y | + * +===++===+ + * | 0 || 1 | + * | 1 || 0 | + * +---++---+ + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +static NETLIST_START(CD4069_DIP) + CD4069_GATE(A) + CD4069_GATE(B) + CD4069_GATE(C) + CD4069_GATE(D) + CD4069_GATE(E) + CD4069_GATE(F) + + NET_C(A.VDD, B.VDD, C.VDD, D.VDD, E.VDD, E.VDD) + NET_C(A.VSS, B.VSS, C.VSS, D.VSS, E.VSS, F.VSS) + + DIPPINS( /* +--------------+ */ + A.A, /* A1 |1 ++ 14| VDD */ A.VDD, + A.Q, /* Y1 |2 13| A6 */ F.A, + B.A, /* A2 |3 12| Y6 */ F.Q, + B.Q, /* Y2 |4 4069 11| A5 */ E.A, + C.A, /* A3 |5 10| Y5 */ E.Q, + C.Q, /* Y3 |6 9| A4 */ D.A, + A.VSS,/* VSS |7 8| Y4 */ D.Q + /* +--------------+ */ + ) +NETLIST_END() + +/* + * CD4070: Quad 2-Input Exclusive-OR Gates * * Y = A+B * +---+---++---+ @@ -161,8 +199,6 @@ NETLIST_END() * | 1 | 1 || 0 | * +---+---++---+ * - * Naming conventions follow National Semiconductor datasheet - * */ static NETLIST_START(CD4070_DIP) @@ -171,17 +207,17 @@ static NETLIST_START(CD4070_DIP) CD4070_GATE(C) CD4070_GATE(D) - NET_C(A.VCC, B.VCC, C.VCC, D.VCC) - NET_C(A.GND, B.GND, C.GND, D.GND) + NET_C(A.VDD, B.VDD, C.VDD, D.VDD) + NET_C(A.VSS, B.VSS, C.VSS, D.VSS) DIPPINS( /* +--------------+ */ - A.A, /* A1 |1 ++ 14| VCC */ A.VCC, + A.A, /* A1 |1 ++ 14| VDD */ A.VDD, A.B, /* B1 |2 13| B4 */ D.B, A.Q, /* Y1 |3 12| A4 */ D.A, - B.Q, /* Y2 |4 7486 11| Y4 */ D.Q, + B.Q, /* Y2 |4 4070 11| Y4 */ D.Q, B.A, /* A2 |5 10| Y3 */ C.Q, B.B, /* B2 |6 9| B3 */ C.B, - A.GND,/* GND |7 8| A3 */ C.A + A.VSS,/* VSS |7 8| A3 */ C.A /* +--------------+ */ ) NETLIST_END() @@ -220,12 +256,19 @@ NETLIST_START(CD4XXX_lib) TRUTHTABLE_START(CD4001_GATE, 2, 1, "") TT_HEAD("A , B | Q ") - TT_LINE("0,0|1|85") + TT_LINE("0,0|1|110") TT_LINE("X,1|0|120") TT_LINE("1,X|0|120") TT_FAMILY("CD4XXX") TRUTHTABLE_END() + TRUTHTABLE_START(CD4069_GATE, 1, 1, "") + TT_HEAD("A|Q ") + TT_LINE("0|1|55") + TT_LINE("1|0|55") + TT_FAMILY("CD4XXX") + TRUTHTABLE_END() + TRUTHTABLE_START(CD4070_GATE, 2, 1, "") TT_HEAD("A,B|Q ") TT_LINE("0,0|0|15") @@ -236,6 +279,7 @@ NETLIST_START(CD4XXX_lib) TRUTHTABLE_END() LOCAL_LIB_ENTRY(CD4001_DIP) + LOCAL_LIB_ENTRY(CD4069_DIP) LOCAL_LIB_ENTRY(CD4070_DIP) /* DIP ONLY */ diff --git a/src/lib/netlist/macro/nlm_cd4xxx.h b/src/lib/netlist/macro/nlm_cd4xxx.h index e71fd7fb387..0de0c763718 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.h +++ b/src/lib/netlist/macro/nlm_cd4xxx.h @@ -33,6 +33,12 @@ #define CD4001_DIP(name) \ NET_REGISTER_DEV(CD4001_DIP, name) +#define CD4069_GATE(name) \ + NET_REGISTER_DEV(CD4069_GATE, name) + +#define CD4069_DIP(name) \ + NET_REGISTER_DEV(CD4069_DIP, name) + #define CD4070_GATE(name) \ NET_REGISTER_DEV(CD4070_GATE, name) From 5ad522f0c1c39d9982400adbd1440e8ccd07055d Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Fri, 15 May 2020 22:16:46 +0200 Subject: [PATCH 68/69] jaguar.cpp updates [Angelo Salese] * move i/o handlers to specific maps, untangle register array usage, to be completed * Nuke duplicate I/O accesses, rename to iobus_r/w, make go_w to be an actual line * Fix addqmod & subqmod modulo mask for DSP * Refactor TOM to host CPU function, and fix GPU irq lv 3 when a GPU object is encountered. Fixes mutntpng and atarikrt booting * Fix Jaguar irq line to 2, trusted * Start reworking the blitter * Relicensed to BSD --- hash/jaguar.xml | 11 +- scripts/target/mame/arcade.lua | 2 + src/devices/cpu/jaguar/jaguar.cpp | 607 ++++++++++++++++-------------- src/devices/cpu/jaguar/jaguar.h | 127 ++++--- src/mame/audio/jaguar.cpp | 2 +- src/mame/drivers/jaguar.cpp | 56 +-- src/mame/includes/jaguar.h | 8 +- src/mame/video/jag_blitter.cpp | 240 ++++++++++++ src/mame/video/jag_blitter.h | 100 +++++ src/mame/video/jagobj.hxx | 16 +- src/mame/video/jaguar.cpp | 69 ++-- 11 files changed, 846 insertions(+), 392 deletions(-) create mode 100644 src/mame/video/jag_blitter.cpp create mode 100644 src/mame/video/jag_blitter.h diff --git a/hash/jaguar.xml b/hash/jaguar.xml index da65900767f..6d5a11e2b06 100644 --- a/hash/jaguar.xml +++ b/hash/jaguar.xml @@ -168,7 +168,7 @@ Unreleased (possibly no prototypes exist): - + Atari Karts 1995 @@ -181,8 +181,8 @@ Unreleased (possibly no prototypes exist): - - + + Attack of the Mutant Penguins 1996 Atari @@ -592,7 +592,8 @@ Unreleased (possibly no prototypes exist): - + + NBA Jam T.E. - Tournament Edition 1996 @@ -966,7 +967,7 @@ Unreleased (possibly no prototypes exist): - + Troy Aikman NFL Football 1995 Williams Entertainment diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index fd0a950e205..6051f733403 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -1219,6 +1219,8 @@ files { MAME_DIR .. "src/mame/drivers/jaguar.cpp", MAME_DIR .. "src/mame/includes/jaguar.h", MAME_DIR .. "src/mame/audio/jaguar.cpp", + MAME_DIR .. "src/mame/video/jag_blitter.cpp", + MAME_DIR .. "src/mame/video/jag_blitter.h", MAME_DIR .. "src/mame/video/jaguar.cpp", MAME_DIR .. "src/mame/video/jagblit.h", MAME_DIR .. "src/mame/video/jagblit.hxx", diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp index de7421181f9..eebf2a0fc2a 100644 --- a/src/devices/cpu/jaguar/jaguar.cpp +++ b/src/devices/cpu/jaguar/jaguar.cpp @@ -10,7 +10,9 @@ - Implement pipeline, actually instruction cycles; Currently implementation is similar to single stepping with single cycle - - Implement and acknowlodge remain registers + - Implement and acknowlodge remain registers; + - Improve delay slot display in debugger (highlight current instruction + doesn't work but instruction hook does); ***************************************************************************/ @@ -53,13 +55,13 @@ enum : u32 CINT5FLAG = 0x20000 // DSP only }; -inline void jaguar_cpu_device::CLR_Z() { m_ctrl[G_FLAGS] &= ~ZFLAG; } -inline void jaguar_cpu_device::CLR_ZN() { m_ctrl[G_FLAGS] &= ~(ZFLAG | NFLAG); } -inline void jaguar_cpu_device::CLR_ZNC() { m_ctrl[G_FLAGS] &= ~(CFLAG | ZFLAG | NFLAG); } -inline void jaguar_cpu_device::SET_Z(u32 r) { m_ctrl[G_FLAGS] |= (r == 0); } -inline void jaguar_cpu_device::SET_C_ADD(u32 a, u32 b) { m_ctrl[G_FLAGS] |= (b > (~a)) << 1; } -inline void jaguar_cpu_device::SET_C_SUB(u32 a, u32 b) { m_ctrl[G_FLAGS] |= (b > a) << 1; } -inline void jaguar_cpu_device::SET_N(u32 r) { m_ctrl[G_FLAGS] |= ((r >> 29) & 4); } +inline void jaguar_cpu_device::CLR_Z() { m_flags &= ~ZFLAG; } +inline void jaguar_cpu_device::CLR_ZN() { m_flags &= ~(ZFLAG | NFLAG); } +inline void jaguar_cpu_device::CLR_ZNC() { m_flags &= ~(CFLAG | ZFLAG | NFLAG); } +inline void jaguar_cpu_device::SET_Z(u32 r) { m_flags |= (r == 0); } +inline void jaguar_cpu_device::SET_C_ADD(u32 a, u32 b) { m_flags |= (b > (~a)) << 1; } +inline void jaguar_cpu_device::SET_C_SUB(u32 a, u32 b) { m_flags |= (b > a) << 1; } +inline void jaguar_cpu_device::SET_N(u32 r) { m_flags |= ((r >> 29) & 4); } inline void jaguar_cpu_device::SET_ZN(u32 r) { SET_N(r); SET_Z(r); } inline void jaguar_cpu_device::SET_ZNC_ADD(u32 a, u32 b, u32 r) { SET_N(r); SET_Z(r); SET_C_ADD(a, b); } inline void jaguar_cpu_device::SET_ZNC_SUB(u32 a, u32 b, u32 r) { SET_N(r); SET_Z(r); SET_C_SUB(a, b); } @@ -69,12 +71,9 @@ inline void jaguar_cpu_device::SET_ZNC_SUB(u32 a, u32 b, u32 r) { SET_N(r); SET_ MACROS ***************************************************************************/ -#define PC m_ctrl[G_PC] -#define FLAGS m_ctrl[G_FLAGS] - inline u8 jaguar_cpu_device::CONDITION(u8 x) { - return condition_table[x + ((m_ctrl[G_FLAGS] & 7) << 5)]; + return condition_table[x + ((m_flags & 7) << 5)]; } inline u8 jaguar_cpu_device::READBYTE(offs_t a) { return m_program->read_byte(a); } @@ -151,15 +150,33 @@ DEFINE_DEVICE_TYPE(JAGUARGPU, jaguargpu_cpu_device, "jaguargpu", "Motorola Atari DEFINE_DEVICE_TYPE(JAGUARDSP, jaguardsp_cpu_device, "jaguardsp", "Motorola Atari Jaguar DSP \"Jerry\"") -jaguar_cpu_device::jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 version, bool isdsp) +jaguar_cpu_device::jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 version, bool isdsp, address_map_constructor io_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 24, 0) + , m_io_config("io", ENDIANNESS_BIG, 32, 8, 0, io_map) , m_version(version) // 1 : Jaguar prototype, 2 : Jaguar first release, 3 : Midsummer prototype, Other : unknown/reserved , m_isdsp(isdsp) , m_cpu_interrupt(*this) , m_tables_referenced(false) , table_refcount(0) , m_table(isdsp ? dsp_op_table : gpu_op_table) + , m_io_end(0x00070007) + , m_io_pc(0) + , m_io_status(0) + , m_pc(0) + , m_flags(0) + , m_imask(false) + , m_maddw(0) + , m_mwidth(0) + , m_mtxaddr(0) + , m_go(false) + , m_int_latch(0) + , m_int_mask(0) + , m_bus_hog(false) + , m_div_remainder(0) + , m_div_offset(false) + , m_hidata(0) + , m_modulo(0xffffffff) { if (isdsp) { @@ -175,20 +192,21 @@ jaguar_cpu_device::jaguar_cpu_device(const machine_config &mconfig, device_type jaguargpu_cpu_device::jaguargpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : jaguar_cpu_device(mconfig, JAGUARGPU, tag, owner, clock, 2, false) + : jaguar_cpu_device(mconfig, JAGUARGPU, tag, owner, clock, 2, false, address_map_constructor(FUNC(jaguargpu_cpu_device::io_map), this)) { } jaguardsp_cpu_device::jaguardsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : jaguar_cpu_device(mconfig, JAGUARDSP, tag, owner, clock, 2, true) + : jaguar_cpu_device(mconfig, JAGUARDSP, tag, owner, clock, 2, true, address_map_constructor(FUNC(jaguardsp_cpu_device::io_map), this)) { } device_memory_interface::space_config_vector jaguar_cpu_device::memory_space_config() const { return space_config_vector { - std::make_pair(AS_PROGRAM, &m_program_config) + std::make_pair(AS_PROGRAM, &m_program_config), + std::make_pair(AS_IO, &m_io_config) }; } @@ -196,8 +214,8 @@ device_memory_interface::space_config_vector jaguar_cpu_device::memory_space_con void jaguar_cpu_device::update_register_banks() { /* pick the bank */ - u32 bank = FLAGS & RPAGEFLAG; - if (FLAGS & IFLAG) bank = 0; + u32 bank = m_flags & RPAGEFLAG; + if (m_imask == true) bank = 0; /* do we need to swap? */ if ((bank == 0 && m_b0 != m_r) || (bank != 0 && m_b1 != m_r)) @@ -237,51 +255,43 @@ void jaguar_cpu_device::check_irqs() int which = 0; /* if the IMASK is set, bail */ - if (FLAGS & IFLAG) + if (m_imask == true) return; - /* get the active interrupt bits */ - u8 bits = (m_ctrl[G_CTRL] >> 6) & 0x1f; - bits |= (m_ctrl[G_CTRL] >> 10) & 0x20; - - /* get the interrupt mask */ - u8 mask = (FLAGS >> 4) & 0x1f; - mask |= (FLAGS >> 11) & 0x20; + u8 latch = m_int_latch; + u8 mask = m_int_mask; /* bail if nothing is available */ - bits &= mask; - if (bits == 0) + latch &= mask; + if (latch == 0) return; - + /* determine which interrupt */ - if (bits & 0x01) which = 0; - if (bits & 0x02) which = 1; - if (bits & 0x04) which = 2; - if (bits & 0x08) which = 3; - if (bits & 0x10) which = 4; - if (bits & 0x20) which = 5; + for (int i = 0; i < 6; i++) + if (latch & (1 << i)) + which = i; /* set the interrupt flag */ - FLAGS |= IFLAG; + m_imask = true; update_register_banks(); - /* push the PC-2 on the stack */ + /* push the m_pc-2 on the stack */ m_r[31] -= 4; - WRITELONG(m_r[31], PC - 2); + WRITELONG(m_r[31], m_pc - 2); /* dispatch */ - PC = (m_isdsp) ? 0xf1b000 : 0xf03000; - PC += which * 0x10; + m_pc = m_internal_ram_start; + m_pc += which * 0x10; } void jaguar_cpu_device::execute_set_input(int irqline, int state) { - const u32 mask = (irqline < 5) ? (0x40 << irqline) : 0x10000; - m_ctrl[G_CTRL] &= ~mask; + const u32 mask = (1 << irqline); + m_int_latch &= ~mask; if (state != CLEAR_LINE) { - m_ctrl[G_CTRL] |= mask; + m_int_latch |= mask; check_irqs(); } } @@ -346,14 +356,29 @@ void jaguar_cpu_device::device_start() init_tables(); m_program = &space(AS_PROGRAM); + m_io = &space(AS_IO); m_cache = m_program->cache<2, 0, ENDIANNESS_BIG>(); m_cpu_interrupt.resolve_safe(); save_item(NAME(m_r)); save_item(NAME(m_a)); - save_item(NAME(m_ctrl)); save_item(NAME(m_ppc)); + save_item(NAME(m_go)); + save_item(NAME(m_int_latch)); + save_item(NAME(m_int_mask)); + save_item(NAME(m_bus_hog)); + save_item(NAME(m_flags)); + save_item(NAME(m_imask)); + save_item(NAME(m_div_remainder)); + save_item(NAME(m_div_offset)); + + save_item(NAME(m_io_end)); + save_item(NAME(m_io_pc)); + save_item(NAME(m_io_status)); + save_item(NAME(m_io_mtxc)); + save_item(NAME(m_io_mtxa)); + // TODO: data map if (m_isdsp) { m_internal_ram_start = 0xf1b000; @@ -367,13 +392,12 @@ void jaguar_cpu_device::device_start() std::fill(std::begin(m_r), std::end(m_r), 0); std::fill(std::begin(m_a), std::end(m_a), 0); - std::fill(std::begin(m_ctrl), std::end(m_ctrl), 0); m_ppc = 0; m_accum = 0; m_bankswitch_icount = 0; - state_add( JAGUAR_PC, "PC", PC).formatstr("%08X"); - state_add( JAGUAR_FLAGS, "FLAGS", FLAGS).formatstr("%08X"); + state_add( JAGUAR_PC, "PC", m_pc).formatstr("%08X"); + state_add( JAGUAR_FLAGS, "FLAGS", m_flags).formatstr("%08X"); state_add( JAGUAR_R0, "R0", m_r[0]).formatstr("%08X"); state_add( JAGUAR_R1, "R1", m_r[1]).formatstr("%08X"); state_add( JAGUAR_R2, "R2", m_r[2]).formatstr("%08X"); @@ -407,9 +431,9 @@ void jaguar_cpu_device::device_start() state_add( JAGUAR_R30, "R30", m_r[30]).formatstr("%08X"); state_add( JAGUAR_R31, "R31", m_r[31]).formatstr("%08X"); - state_add( STATE_GENPC, "GENPC", PC).noshow(); + state_add( STATE_GENPC, "GENPC", m_pc).noshow(); state_add( STATE_GENPCBASE, "CURPC", m_ppc).noshow(); - state_add( STATE_GENFLAGS, "GENFLAGS", FLAGS).formatstr("%11s").noshow(); + state_add( STATE_GENFLAGS, "GENFLAGS", m_flags).formatstr("%11s").noshow(); set_icountptr(m_icount); } @@ -421,17 +445,17 @@ void jaguar_cpu_device::state_string_export(const device_state_entry &entry, std { case STATE_GENFLAGS: str = string_format("%c%c%c%c%c%c%c%c%c%c%c", - FLAGS & 0x8000 ? 'D':'.', - FLAGS & 0x4000 ? 'A':'.', - FLAGS & 0x0100 ? '4':'.', - FLAGS & 0x0080 ? '3':'.', - FLAGS & 0x0040 ? '2':'.', - FLAGS & 0x0020 ? '1':'.', - FLAGS & 0x0010 ? '0':'.', - FLAGS & 0x0008 ? 'I':'.', - FLAGS & 0x0004 ? 'N':'.', - FLAGS & 0x0002 ? 'C':'.', - FLAGS & 0x0001 ? 'Z':'.'); + m_flags & 0x8000 ? 'D':'.', + m_flags & 0x4000 ? 'A':'.', + m_flags & 0x0100 ? '4':'.', + m_flags & 0x0080 ? '3':'.', + m_flags & 0x0040 ? '2':'.', + m_flags & 0x0020 ? '1':'.', + m_flags & 0x0010 ? '0':'.', + m_imask == true ? 'I':'.', + m_flags & 0x0004 ? 'N':'.', + m_flags & 0x0002 ? 'C':'.', + m_flags & 0x0001 ? 'Z':'.'); break; } } @@ -441,6 +465,7 @@ void jaguar_cpu_device::device_reset() { m_b0 = m_r; m_b1 = m_a; + m_modulo = 0xffffffff; } @@ -464,7 +489,7 @@ jaguar_cpu_device::~jaguar_cpu_device() void jaguargpu_cpu_device::execute_run() { /* if we're halted, we shouldn't be here */ - if (!(m_ctrl[G_CTRL] & 1)) + if (m_go == false) { //device->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_icount = 0; @@ -481,13 +506,13 @@ void jaguargpu_cpu_device::execute_run() do { /* debugging */ - //if (PC < 0xf03000 || PC > 0xf04000) { fatalerror("GPU: PC = %06X (ppc = %06X)\n", PC, m_ppc); } - m_ppc = PC; - debugger_instruction_hook(PC); + //if (m_pc < 0xf03000 || m_pc > 0xf04000) { fatalerror("GPU: m_pc = %06X (ppc = %06X)\n", m_pc, m_ppc); } + m_ppc = m_pc; + debugger_instruction_hook(m_pc); /* instruction fetch */ - const u16 op = ROPCODE(PC); - PC += 2; + const u16 op = ROPCODE(m_pc); + m_pc += 2; /* parse the instruction */ (this->*gpu_op_table[op >> 10])(op); @@ -499,7 +524,7 @@ void jaguargpu_cpu_device::execute_run() void jaguardsp_cpu_device::execute_run() { /* if we're halted, we shouldn't be here */ - if (!(m_ctrl[G_CTRL] & 1)) + if (m_go == false) { //device->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_icount = 0; @@ -516,13 +541,13 @@ void jaguardsp_cpu_device::execute_run() do { /* debugging */ - //if (PC < 0xf1b000 || PC > 0xf1d000) { fatalerror(stderr, "DSP: PC = %06X\n", PC); } - m_ppc = PC; - debugger_instruction_hook(PC); + //if (m_pc < 0xf1b000 || m_pc > 0xf1d000) { fatalerror(stderr, "DSP: m_pc = %06X\n", m_pc); } + m_ppc = m_pc; + debugger_instruction_hook(m_pc); /* instruction fetch */ - const u16 op = ROPCODE(PC); - PC += 2; + const u16 op = ROPCODE(m_pc); + m_pc += 2; /* parse the instruction */ (this->*dsp_op_table[op >> 10])(op); @@ -544,7 +569,7 @@ void jaguar_cpu_device::abs_rn(u16 op) if (res & 0x80000000) { m_r[dreg] = res = -res; - FLAGS |= CFLAG; + m_flags |= CFLAG; } SET_Z(res); } @@ -564,7 +589,7 @@ void jaguar_cpu_device::addc_rn_rn(u16 op) const u8 dreg = op & 31; const u32 r1 = m_r[(op >> 5) & 31]; const u32 r2 = m_r[dreg]; - u32 c = ((FLAGS >> 1) & 1); + u32 c = ((m_flags >> 1) & 1); const u32 res = r2 + r1 + c; m_r[dreg] = res; CLR_ZNC(); SET_ZNC_ADD(r2, r1 + c, res); @@ -586,7 +611,7 @@ void jaguar_cpu_device::addqmod_n_rn(u16 op) /* DSP only */ const u32 r1 = convert_zero[(op >> 5) & 31]; const u32 r2 = m_r[dreg]; u32 res = r2 + r1; - res = (res & ~m_ctrl[D_MOD]) | (r2 & ~m_ctrl[D_MOD]); + res = (res & ~m_modulo) | (r2 & m_modulo); m_r[dreg] = res; CLR_ZNC(); SET_ZNC_ADD(r2, r1, res); } @@ -634,7 +659,7 @@ void jaguar_cpu_device::btst_n_rn(u16 op) { const u32 r1 = (op >> 5) & 31; const u32 r2 = m_r[op & 31]; - CLR_Z(); FLAGS |= (~r2 >> r1) & 1; + CLR_Z(); m_flags |= (~r2 >> r1) & 1; } void jaguar_cpu_device::cmp_rn_rn(u16 op) @@ -660,19 +685,23 @@ void jaguar_cpu_device::div_rn_rn(u16 op) const u32 r2 = m_r[dreg]; if (r1) { - if (m_ctrl[D_DIVCTRL] & 1) + if (m_div_offset & 1) { m_r[dreg] = ((u64)r2 << 16) / r1; - m_ctrl[D_REMAINDER] = ((u64)r2 << 16) % r1; + m_div_remainder = ((u64)r2 << 16) % r1; } else { m_r[dreg] = r2 / r1; - m_ctrl[D_REMAINDER] = r2 % r1; + m_div_remainder = r2 % r1; } } else + { + // TODO: exact values for divide by zero m_r[dreg] = 0xffffffff; + m_div_remainder = 0xffffffff; + } } void jaguar_cpu_device::illegal(u16 op) @@ -684,6 +713,7 @@ void jaguar_cpu_device::imacn_rn_rn(u16 op) const u32 r1 = m_r[(op >> 5) & 31]; const u32 r2 = m_r[op & 31]; m_accum += (s64)((int16_t)r1 * (int16_t)r2); + // TODO: what's really "unexpected"? logerror("Unexpected IMACN instruction!\n"); } @@ -706,18 +736,18 @@ void jaguar_cpu_device::imultn_rn_rn(u16 op) m_accum = (s32)res; CLR_ZN(); SET_ZN(res); - op = ROPCODE(PC); + op = ROPCODE(m_pc); while ((op >> 10) == 20) { r1 = m_r[(op >> 5) & 31]; r2 = m_r[op & 31]; m_accum += (s64)((int16_t)r1 * (int16_t)r2); - PC += 2; - op = ROPCODE(PC); + m_pc += 2; + op = ROPCODE(m_pc); } if ((op >> 10) == 19) { - PC += 2; + m_pc += 2; m_r[op & 31] = (u32)m_accum; } } @@ -727,10 +757,10 @@ void jaguar_cpu_device::jr_cc_n(u16 op) if (CONDITION(op & 31)) { const s32 r1 = (s8)((op >> 2) & 0xf8) >> 2; - const u32 newpc = PC + r1; - debugger_instruction_hook(PC); - op = ROPCODE(PC); - PC = newpc; + const u32 newpc = m_pc + r1; + debugger_instruction_hook(m_pc); + op = ROPCODE(m_pc); + m_pc = newpc; (this->*m_table[op >> 10])(op); m_icount -= 3; /* 3 wait states guaranteed */ @@ -745,9 +775,9 @@ void jaguar_cpu_device::jump_cc_rn(u16 op) /* special kludge for risky code in the cojag DSP interrupt handlers */ const u32 newpc = (m_icount == m_bankswitch_icount) ? m_a[reg] : m_r[reg]; - debugger_instruction_hook(PC); - op = ROPCODE(PC); - PC = newpc; + debugger_instruction_hook(m_pc); + op = ROPCODE(m_pc); + m_pc = newpc; (this->*m_table[op >> 10])(op); m_icount -= 3; /* 3 wait states guaranteed */ @@ -819,7 +849,7 @@ void jaguar_cpu_device::loadp_rn_rn(u16 op) /* GPU only */ } else { - m_ctrl[G_HIDATA] = READLONG(r1); + m_hidata = READLONG(r1); m_r[op & 31] = READLONG(r1+4); } } @@ -835,13 +865,13 @@ void jaguar_cpu_device::mirror_rn(u16 op) /* DSP only */ void jaguar_cpu_device::mmult_rn_rn(u16 op) { - const u8 count = m_ctrl[G_MTXC] & 15; + const u8 count = m_mwidth; const u8 sreg = (op >> 5) & 31; const u8 dreg = op & 31; - u32 addr = m_ctrl[G_MTXA]; + u32 addr = m_mtxaddr; s64 accum = 0; - if (!(m_ctrl[G_MTXC] & 0x10)) + if (m_maddw == false) { for (int i = 0; i < count; i++) { @@ -879,8 +909,8 @@ void jaguar_cpu_device::movefa_rn_rn(u16 op) void jaguar_cpu_device::movei_n_rn(u16 op) { - const u32 res = ROPCODE(PC) | (ROPCODE(PC + 2) << 16); - PC += 4; + const u32 res = ROPCODE(m_pc) | (ROPCODE(m_pc + 2) << 16); + m_pc += 4; m_r[op & 31] = res; } @@ -987,7 +1017,7 @@ void jaguar_cpu_device::ror_rn_rn(u16 op) const u32 r2 = m_r[dreg]; const u32 res = (r2 >> r1) | (r2 << (32 - r1)); m_r[dreg] = res; - CLR_ZNC(); SET_ZN(res); FLAGS |= (r2 >> 30) & 2; + CLR_ZNC(); SET_ZN(res); m_flags |= (r2 >> 30) & 2; } void jaguar_cpu_device::rorq_n_rn(u16 op) @@ -997,7 +1027,7 @@ void jaguar_cpu_device::rorq_n_rn(u16 op) const u32 r2 = m_r[dreg]; const u32 res = (r2 >> r1) | (r2 << (32 - r1)); m_r[dreg] = res; - CLR_ZNC(); SET_ZN(res); FLAGS |= (r2 >> 30) & 2; + CLR_ZNC(); SET_ZN(res); m_flags |= (r2 >> 30) & 2; } void jaguar_cpu_device::sat8_rn(u16 op) /* GPU only */ @@ -1057,12 +1087,12 @@ void jaguar_cpu_device::sh_rn_rn(u16 op) if (r1 < 0) { res = (r1 <= -32) ? 0 : (r2 << -r1); - FLAGS |= (r2 >> 30) & 2; + m_flags |= (r2 >> 30) & 2; } else { res = (r1 >= 32) ? 0 : (r2 >> r1); - FLAGS |= (r2 << 1) & 2; + m_flags |= (r2 << 1) & 2; } m_r[dreg] = res; SET_ZN(res); @@ -1079,12 +1109,12 @@ void jaguar_cpu_device::sha_rn_rn(u16 op) if (r1 < 0) { res = (r1 <= -32) ? 0 : (r2 << -r1); - FLAGS |= (r2 >> 30) & 2; + m_flags |= (r2 >> 30) & 2; } else { res = (r1 >= 32) ? ((s32)r2 >> 31) : ((s32)r2 >> r1); - FLAGS |= (r2 << 1) & 2; + m_flags |= (r2 << 1) & 2; } m_r[dreg] = res; SET_ZN(res); @@ -1097,7 +1127,7 @@ void jaguar_cpu_device::sharq_n_rn(u16 op) const u32 r2 = m_r[dreg]; const u32 res = (s32)r2 >> r1; m_r[dreg] = res; - CLR_ZNC(); SET_ZN(res); FLAGS |= (r2 << 1) & 2; + CLR_ZNC(); SET_ZN(res); m_flags |= (r2 << 1) & 2; } void jaguar_cpu_device::shlq_n_rn(u16 op) @@ -1107,7 +1137,7 @@ void jaguar_cpu_device::shlq_n_rn(u16 op) const u32 r2 = m_r[dreg]; const u32 res = r2 << (32 - r1); m_r[dreg] = res; - CLR_ZNC(); SET_ZN(res); FLAGS |= (r2 >> 30) & 2; + CLR_ZNC(); SET_ZN(res); m_flags |= (r2 >> 30) & 2; } void jaguar_cpu_device::shrq_n_rn(u16 op) @@ -1117,7 +1147,7 @@ void jaguar_cpu_device::shrq_n_rn(u16 op) const u32 r2 = m_r[dreg]; const u32 res = r2 >> r1; m_r[dreg] = res; - CLR_ZNC(); SET_ZN(res); FLAGS |= (r2 << 1) & 2; + CLR_ZNC(); SET_ZN(res); m_flags |= (r2 << 1) & 2; } void jaguar_cpu_device::store_rn_rn(u16 op) @@ -1185,7 +1215,7 @@ void jaguar_cpu_device::storep_rn_rn(u16 op) /* GPU only */ } else { - WRITELONG(r1, m_ctrl[G_HIDATA]); + WRITELONG(r1, m_hidata); WRITELONG(r1+4, m_r[op & 31]); } } @@ -1205,7 +1235,7 @@ void jaguar_cpu_device::subc_rn_rn(u16 op) const u8 dreg = op & 31; const u32 r1 = m_r[(op >> 5) & 31]; const u32 r2 = m_r[dreg]; - u32 c = ((FLAGS >> 1) & 1); + u32 c = ((m_flags >> 1) & 1); const u32 res = r2 - r1 - c; m_r[dreg] = res; CLR_ZNC(); SET_ZNC_SUB(r2, r1 + c, res); @@ -1227,7 +1257,7 @@ void jaguar_cpu_device::subqmod_n_rn(u16 op) /* DSP only */ const u32 r1 = convert_zero[(op >> 5) & 31]; const u32 r2 = m_r[dreg]; u32 res = r2 - r1; - res = (res & ~m_ctrl[D_MOD]) | (r2 & ~m_ctrl[D_MOD]); + res = (res & ~m_modulo) | (r2 & m_modulo); m_r[dreg] = res; CLR_ZNC(); SET_ZNC_SUB(r2, r1, res); } @@ -1257,191 +1287,212 @@ void jaguar_cpu_device::xor_rn_rn(u16 op) I/O HANDLING ***************************************************************************/ -u32 jaguargpu_cpu_device::ctrl_r(offs_t offset) +void jaguar_cpu_device::io_common_map(address_map &map) { - if (LOG_GPU_IO) logerror("GPU read register @ F021%02X\n", offset * 4); - - u32 res = m_ctrl[offset]; - if (offset == G_CTRL) - res |= (m_version & 0xf) << 12; - - return res; + map(0x00, 0x03).rw(FUNC(jaguar_cpu_device::flags_r), FUNC(jaguar_cpu_device::flags_w)); + map(0x04, 0x07).w(FUNC(jaguar_cpu_device::matrix_control_w)); + map(0x08, 0x0b).w(FUNC(jaguar_cpu_device::matrix_address_w)); +// map(0x0c, 0x0f) endian + map(0x10, 0x13).w(FUNC(jaguar_cpu_device::pc_w)); + map(0x14, 0x17).rw(FUNC(jaguar_cpu_device::status_r), FUNC(jaguar_cpu_device::control_w)); +// map(0x18, 0x1b) implementation specific + map(0x1c, 0x1f).rw(FUNC(jaguar_cpu_device::div_remainder_r), FUNC(jaguar_cpu_device::div_control_w)); } - -void jaguargpu_cpu_device::ctrl_w(offs_t offset, u32 data, u32 mem_mask) +// $f02100 +void jaguargpu_cpu_device::io_map(address_map &map) { - if (LOG_GPU_IO && offset != G_HIDATA) - logerror("GPU write register @ F021%02X = %08X\n", offset * 4, data); + jaguar_cpu_device::io_common_map(map); + map(0x0c, 0x0f).w(FUNC(jaguargpu_cpu_device::end_w)); + map(0x18, 0x1b).rw(FUNC(jaguargpu_cpu_device::hidata_r), FUNC(jaguargpu_cpu_device::hidata_w)); +} - /* remember the old and set the new */ - const u32 oldval = m_ctrl[offset]; - u32 newval = oldval; - COMBINE_DATA(&newval); +// $f0a100 +void jaguardsp_cpu_device::io_map(address_map &map) +{ + jaguar_cpu_device::io_common_map(map); + map(0x0c, 0x0f).w(FUNC(jaguardsp_cpu_device::dsp_end_w)); + map(0x18, 0x1b).w(FUNC(jaguardsp_cpu_device::modulo_w)); + map(0x20, 0x23).r(FUNC(jaguardsp_cpu_device::high_accum_r)); +} - /* handle the various registers */ - switch (offset) +READ32_MEMBER(jaguar_cpu_device::flags_r) +{ + return (m_flags & 0x1c1f7) | (m_imask << 3); +} + +WRITE32_MEMBER(jaguar_cpu_device::flags_w) +{ + COMBINE_DATA(&m_flags); + // clear imask only on bit 3 clear (1 has no effect) + if ((m_flags & 0x08) == 0) + m_imask = false; + + // update int latch & mask + m_int_mask = (m_flags >> 4) & 0x1f; + m_int_latch &= ~((m_flags >> 9) & 0x1f); + + // TODO: move to specific handler + if (m_isdsp) { - case G_FLAGS: - - /* combine the data properly */ - m_ctrl[offset] = newval & (ZFLAG | CFLAG | NFLAG | EINT04FLAGS | RPAGEFLAG); - if (newval & IFLAG) - m_ctrl[offset] |= oldval & IFLAG; - - /* clear interrupts */ - m_ctrl[G_CTRL] &= ~((newval & CINT04FLAGS) >> 3); - - /* determine which register bank should be active */ - update_register_banks(); - - /* update IRQs */ - check_irqs(); - break; - - case G_MTXC: - case G_MTXA: - m_ctrl[offset] = newval; - break; - - case G_END: - m_ctrl[offset] = newval; - if ((newval & 7) != 7) - logerror("GPU to set to little-endian!\n"); - break; - - case G_PC: - PC = newval & 0xffffff; - break; - - case G_CTRL: - m_ctrl[offset] = newval; - if ((oldval ^ newval) & 0x01) - { - set_input_line(INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE); - yield(); - } - if (newval & 0x02) - { - m_cpu_interrupt(ASSERT_LINE); - m_ctrl[offset] &= ~0x02; - } - if (newval & 0x04) - { - m_ctrl[G_CTRL] |= 1 << 6; - m_ctrl[offset] &= ~0x04; - check_irqs(); - } - if (newval & 0x18) - { - logerror("GPU single stepping was enabled!\n"); - } - break; - - case G_HIDATA: - case G_DIVCTRL: - m_ctrl[offset] = newval; - break; + m_int_mask |= (BIT(m_flags, 16) << 5); + m_int_latch &= ~(BIT(m_flags, 17) << 5); } + + // TODO: DMAEN (bit 15) + + update_register_banks(); + check_irqs(); } +WRITE32_MEMBER(jaguar_cpu_device::matrix_control_w) +{ + COMBINE_DATA(&m_io_mtxc); + m_mwidth = m_io_mtxc & 0xf; + m_maddw = BIT(m_io_mtxc, 4); +} +WRITE32_MEMBER(jaguar_cpu_device::matrix_address_w) +{ + COMBINE_DATA(&m_io_mtxa); + // matrix can be long word address only, and only read from internal RAM + m_mtxaddr = m_internal_ram_start | (m_io_mtxa & 0xffc); +} + +WRITE32_MEMBER(jaguar_cpu_device::pc_w) +{ + COMBINE_DATA(&m_io_pc); + if (m_go == false) + m_pc = m_io_pc & 0xffffff; + else + throw emu_fatalerror("%s: inflight PC write %08x", this->tag(), m_pc); +} + +/* + * Data Organization Register + * Note: The canonical way to set this up from 68k is $00070007, + * so that Power-On endianness doesn't matter. 1=Big Endian + * ---- -x-- Instruction endianness + * ---- --x- Pixel endianness (GPU only) + * ---- ---x I/O endianness + */ +// TODO: just log if anything farts for now, change to bit struct once we have something to test out +WRITE32_MEMBER(jaguar_cpu_device::end_w) +{ + COMBINE_DATA(&m_io_end); + // sburnout sets bit 1 == 0 + if ((m_io_end & 0x7) != 0x7) + throw emu_fatalerror("%s: fatal endian setup %08x", this->tag(), m_io_end); +} + +WRITE32_MEMBER(jaguardsp_cpu_device::dsp_end_w) +{ + COMBINE_DATA(&m_io_end); + // wolfn3d writes a '0' to bit 1 (which is a NOP for DSP) + if ((m_io_end & 0x5) != 0x5) + throw emu_fatalerror("%s: fatal endian setup %08x", this->tag(), m_io_end); +} + +/* + * Control/Status Register + * - xxxx ---- ---- ---- chip version number + * - ---- x--- ---- ---- bus hog (increase self chip priority on bus) + * y ---- -xxx xx-- ---- interrupt latch (y is DSP specific) (r/o) + * - ---- ---- --0- ---- + * - ---- ---- ---x x--- single step regs + * - ---- ---- ---- -x-- GPUINT0 or DSPINT0 + * - ---- ---- ---- --x- Host interrupt (w/o) + * - ---- ---- ---- ---x GPUGO or DSPGO flag + * + */ +READ32_MEMBER(jaguar_cpu_device::status_r) +{ + u32 result = ((m_version & 0xf)<<12) | (m_bus_hog<<11) | m_go; + result|= (m_int_latch & 0x1f) << 6; + // TODO: make it DSP specific + if (m_isdsp == true) + result|= (m_int_latch & 0x20) << 11; + return result; +} + +WRITE_LINE_MEMBER(jaguar_cpu_device::go_w) +{ + m_go = state; + set_input_line(INPUT_LINE_HALT, (m_go == true) ? CLEAR_LINE : ASSERT_LINE); + yield(); +} + +WRITE32_MEMBER(jaguar_cpu_device::control_w) +{ + COMBINE_DATA(&m_io_status); + bool new_go = BIT(m_io_status, 0); + if (new_go != m_go) + go_w(new_go); + + if (BIT(m_io_status, 1)) + m_cpu_interrupt(ASSERT_LINE); + + // TODO: following does nothing if set by itself, or acts as a trap? + if (BIT(m_io_status, 2)) + { + m_int_latch |= 1; + check_irqs(); + } + + // TODO: single step handling + + m_bus_hog = BIT(m_io_status, 11); + // TODO: protect/protectse uses this, why? + if (m_bus_hog == true) + logerror("%s: bus hog enabled\n", this->tag()); +} + +READ32_MEMBER(jaguargpu_cpu_device::hidata_r) +{ + return m_hidata; +} + +WRITE32_MEMBER(jaguargpu_cpu_device::hidata_w) +{ + COMBINE_DATA(&m_hidata); +} + +READ32_MEMBER(jaguar_cpu_device::div_remainder_r) +{ + // TODO: truly 32-bit? + return m_div_remainder; +} + +WRITE32_MEMBER(jaguar_cpu_device::div_control_w) +{ + m_div_offset = BIT(data, 0); +} + +WRITE32_MEMBER(jaguardsp_cpu_device::modulo_w) +{ + COMBINE_DATA(&m_modulo); +} + +READ32_MEMBER(jaguardsp_cpu_device::high_accum_r) +{ + printf("%s: high 16-bit accumulator read\n", this->tag()); + return (m_accum >> 32) & 0xff; +} + +u32 jaguar_cpu_device::iobus_r(offs_t offset, u32 mem_mask) +{ + return m_io->read_dword(offset*4, mem_mask); +} + +void jaguar_cpu_device::iobus_w(offs_t offset, u32 data, u32 mem_mask) +{ + m_io->write_dword(offset*4, data, mem_mask); +} /*************************************************************************** - I/O HANDLING + DASM ***************************************************************************/ -u32 jaguardsp_cpu_device::ctrl_r(offs_t offset) -{ - if (LOG_DSP_IO && offset != D_FLAGS) - logerror("DSP read register @ F1A1%02X\n", offset * 4); - - /* switch to the target context */ - u32 res = m_ctrl[offset]; - if (offset == D_CTRL) - res |= (m_version & 0xf) << 12; - - return res; -} - - -void jaguardsp_cpu_device::ctrl_w(offs_t offset, u32 data, u32 mem_mask) -{ - if (LOG_DSP_IO && offset != D_FLAGS) - logerror("DSP write register @ F1A1%02X = %08X\n", offset * 4, data); - - /* remember the old and set the new */ - const u32 oldval = m_ctrl[offset]; - u32 newval = oldval; - COMBINE_DATA(&newval); - - /* handle the various registers */ - switch (offset) - { - case D_FLAGS: - - /* combine the data properly */ - m_ctrl[offset] = newval & (ZFLAG | CFLAG | NFLAG | EINT04FLAGS | EINT5FLAG | RPAGEFLAG); - if (newval & IFLAG) - m_ctrl[offset] |= oldval & IFLAG; - - /* clear interrupts */ - m_ctrl[D_CTRL] &= ~((newval & CINT04FLAGS) >> 3); - m_ctrl[D_CTRL] &= ~((newval & CINT5FLAG) >> 1); - - /* determine which register bank should be active */ - update_register_banks(); - - /* update IRQs */ - check_irqs(); - break; - - case D_MTXC: - case D_MTXA: - m_ctrl[offset] = newval; - break; - - case D_END: - m_ctrl[offset] = newval; - if ((newval & 7) != 7) - logerror("DSP to set to little-endian!\n"); - break; - - case D_PC: - PC = newval & 0xffffff; - break; - - case D_CTRL: - m_ctrl[offset] = newval; - if ((oldval ^ newval) & 0x01) - { - set_input_line(INPUT_LINE_HALT, (newval & 1) ? CLEAR_LINE : ASSERT_LINE); - yield(); - } - if (newval & 0x02) - { - m_cpu_interrupt(ASSERT_LINE); - m_ctrl[offset] &= ~0x02; - } - if (newval & 0x04) - { - m_ctrl[D_CTRL] |= 1 << 6; - m_ctrl[offset] &= ~0x04; - check_irqs(); - } - if (newval & 0x18) - { - logerror("DSP single stepping was enabled!\n"); - } - break; - - case D_MOD: - case D_DIVCTRL: - m_ctrl[offset] = newval; - break; - } -} - std::unique_ptr jaguargpu_cpu_device::create_disassembler() { return std::make_unique(jaguar_disassembler::variant::GPU); diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h index 3324ca3facd..499a3233f7e 100644 --- a/src/devices/cpu/jaguar/jaguar.h +++ b/src/devices/cpu/jaguar/jaguar.h @@ -28,38 +28,6 @@ enum JAGUAR_R24,JAGUAR_R25,JAGUAR_R26,JAGUAR_R27,JAGUAR_R28,JAGUAR_R29,JAGUAR_R30,JAGUAR_R31 }; -enum -{ - G_FLAGS = 0, - G_MTXC, - G_MTXA, - G_END, - G_PC, - G_CTRL, - G_HIDATA, - G_DIVCTRL, - G_DUMMY, - G_REMAINDER, - G_CTRLMAX -}; - -enum -{ - D_FLAGS = 0, - D_MTXC, - D_MTXA, - D_END, - D_PC, - D_CTRL, - D_MOD, - D_DIVCTRL, - D_MACHI, - D_REMAINDER, - D_CTRLMAX -}; - - - /*************************************************************************** INTERRUPT CONSTANTS ***************************************************************************/ @@ -81,7 +49,7 @@ DECLARE_DEVICE_TYPE(JAGUARGPU, jaguargpu_cpu_device) DECLARE_DEVICE_TYPE(JAGUARDSP, jaguardsp_cpu_device) -class jaguar_cpu_device : public cpu_device +class jaguar_cpu_device : public cpu_device { public: // construction/destruction @@ -90,11 +58,13 @@ public: // configuration helpers auto irq() { return m_cpu_interrupt.bind(); } - virtual void ctrl_w(offs_t offset, u32 data, u32 mem_mask = ~0) = 0; - virtual u32 ctrl_r(offs_t offset) = 0; + // TODO: add which device triggered the I/O + void iobus_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 iobus_r(offs_t offset, u32 mem_mask = ~0); + DECLARE_WRITE_LINE_MEMBER(go_w); protected: - jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 version, bool isdsp); + jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 version, bool isdsp, address_map_constructor io_map); // device-level overrides virtual void device_start() override; @@ -112,6 +82,18 @@ protected: // device_state_interface overrides virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; + + // I/Os (common) + DECLARE_READ32_MEMBER(flags_r); + DECLARE_WRITE32_MEMBER(flags_w); + DECLARE_WRITE32_MEMBER(matrix_control_w); + DECLARE_WRITE32_MEMBER(matrix_address_w); + DECLARE_WRITE32_MEMBER(end_w); + DECLARE_WRITE32_MEMBER(pc_w); + DECLARE_READ32_MEMBER(status_r); + DECLARE_WRITE32_MEMBER(control_w); + DECLARE_READ32_MEMBER(div_remainder_r); + DECLARE_WRITE32_MEMBER(div_control_w); // defines inline void CLR_Z(); @@ -138,6 +120,7 @@ protected: inline u16 ROPCODE(offs_t pc); address_space_config m_program_config; + address_space_config m_io_config; /* core registers */ u32 m_r[32]; @@ -146,7 +129,6 @@ protected: u32 * m_b1; /* control registers */ - u32 m_ctrl[G_CTRLMAX]; u32 m_ppc; u64 m_accum; @@ -157,6 +139,7 @@ protected: int m_bankswitch_icount; devcb_write_line m_cpu_interrupt; address_space *m_program; + address_space *m_io; memory_access_cache<2, 0, ENDIANNESS_BIG> *m_cache; u32 m_internal_ram_start; @@ -164,8 +147,6 @@ protected: typedef void (jaguar_cpu_device::*op_func)(u16 op); - static const op_func gpu_op_table[64]; - static const op_func dsp_op_table[64]; static const u32 convert_zero[32]; bool m_tables_referenced; @@ -179,7 +160,6 @@ protected: void add_rn_rn(u16 op); void addc_rn_rn(u16 op); void addq_n_rn(u16 op); - void addqmod_n_rn(u16 op); /* DSP only */ void addqt_n_rn(u16 op); void and_rn_rn(u16 op); void bclr_n_rn(u16 op); @@ -201,8 +181,6 @@ protected: void load_r15rn_rn(u16 op); void loadb_rn_rn(u16 op); void loadw_rn_rn(u16 op); - void loadp_rn_rn(u16 op); /* GPU only */ - void mirror_rn(u16 op); /* DSP only */ void mmult_rn_rn(u16 op); void move_rn_rn(u16 op); void move_pc_rn(u16 op); @@ -217,15 +195,10 @@ protected: void normi_rn_rn(u16 op); void not_rn(u16 op); void or_rn_rn(u16 op); - void pack_rn(u16 op); /* GPU only */ void resmac_rn(u16 op); void ror_rn_rn(u16 op); void rorq_n_rn(u16 op); - void sat8_rn(u16 op); /* GPU only */ - void sat16_rn(u16 op); /* GPU only */ - void sat16s_rn(u16 op); /* DSP only */ - void sat24_rn(u16 op); /* GPU only */ - void sat32s_rn(u16 op); /* DSP only */ + void sh_rn_rn(u16 op); void sha_rn_rn(u16 op); void sharq_n_rn(u16 op); @@ -238,16 +211,58 @@ protected: void store_rn_r15rn(u16 op); void storeb_rn_rn(u16 op); void storew_rn_rn(u16 op); - void storep_rn_rn(u16 op); /* GPU only */ void sub_rn_rn(u16 op); void subc_rn_rn(u16 op); void subq_n_rn(u16 op); - void subqmod_n_rn(u16 op); /* DSP only */ void subqt_n_rn(u16 op); void xor_rn_rn(u16 op); + // GPU only opcodes + void loadp_rn_rn(u16 op); + void pack_rn(u16 op); + void sat8_rn(u16 op); + void sat16_rn(u16 op); + void sat24_rn(u16 op); + void storep_rn_rn(u16 op); + // DSP only opcodes + void addqmod_n_rn(u16 op); + void mirror_rn(u16 op); + void sat16s_rn(u16 op); + void sat32s_rn(u16 op); + void subqmod_n_rn(u16 op); + void update_register_banks(); void check_irqs(); void init_tables(); + + // I/O internal regs + void io_common_map(address_map &map); + // TODO: the m_io* stubs are conventionally given for allowing a correct register setup from vanilla 68k. + // This is yet another reason about needing a bus device dispatcher for this system. + u32 m_io_end; + u32 m_io_pc; + u32 m_io_status; + u32 m_io_mtxc; + u32 m_io_mtxa; + + u32 m_pc; + u32 m_flags; + bool m_imask; + bool m_maddw; + u8 m_mwidth; + u32 m_mtxaddr; + bool m_go; + u8 m_int_latch; + u8 m_int_mask; + bool m_bus_hog; + u32 m_div_remainder; + bool m_div_offset; + + // GPU specific + u32 m_hidata; + static const op_func gpu_op_table[64]; + // DSP specific + u32 m_modulo; + static const op_func dsp_op_table[64]; }; @@ -257,12 +272,14 @@ public: // construction/destruction jaguargpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - void ctrl_w(offs_t offset, u32 data, u32 mem_mask = ~0) override; - u32 ctrl_r(offs_t offset) override; + void io_map(address_map &map); protected: virtual void execute_run() override; virtual std::unique_ptr create_disassembler() override; + + DECLARE_WRITE32_MEMBER(hidata_w); + DECLARE_READ32_MEMBER(hidata_r); }; @@ -272,14 +289,16 @@ public: // construction/destruction jaguardsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - void ctrl_w(offs_t offset, u32 data, u32 mem_mask = ~0) override; - u32 ctrl_r(offs_t offset) override; + void io_map(address_map &map); protected: virtual u32 execute_input_lines() const noexcept override { return 6; } virtual void execute_run() override; virtual std::unique_ptr create_disassembler() override; + DECLARE_WRITE32_MEMBER(modulo_w); + DECLARE_WRITE32_MEMBER(dsp_end_w); + DECLARE_READ32_MEMBER(high_accum_r); }; diff --git a/src/mame/audio/jaguar.cpp b/src/mame/audio/jaguar.cpp index c3c044e95a0..a7cabde84fe 100644 --- a/src/mame/audio/jaguar.cpp +++ b/src/mame/audio/jaguar.cpp @@ -261,7 +261,7 @@ WRITE16_MEMBER( jaguar_state::jerry_regs_w ) WRITE32_MEMBER( jaguar_state::dsp_flags_w ) { /* write the data through */ - m_dsp->ctrl_w(offset, data, mem_mask); + m_dsp->iobus_w(offset, data, mem_mask); /* if they were clearing the A2S interrupt, see if we are headed for the spin */ /* loop with R22 != 0; if we are, just start spinning again */ diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp index cd8108a394b..447c2b5fafb 100644 --- a/src/mame/drivers/jaguar.cpp +++ b/src/mame/drivers/jaguar.cpp @@ -459,8 +459,8 @@ void jaguar_state::machine_reset() dsp_resume(); /* halt the CPUs */ - m_gpu->ctrl_w(G_CTRL, 0); - m_dsp->ctrl_w(D_CTRL, 0); + m_gpu->go_w(false); + m_dsp->go_w(false); /* set blitter idle flag */ m_blitter_status = 1; @@ -640,8 +640,8 @@ WRITE32_MEMBER(jaguar_state::misc_control_w) dsp_resume(); /* halt the CPUs */ - m_gpu->ctrl_w(G_CTRL, 0); - m_dsp->ctrl_w(D_CTRL, 0); + m_gpu->go_w(false); + m_dsp->go_w(false); } /* adjust banking */ @@ -663,17 +663,14 @@ WRITE32_MEMBER(jaguar_state::misc_control_w) READ32_MEMBER(jaguar_state::gpuctrl_r) { - return m_gpu->ctrl_r(offset); + return m_gpu->iobus_r(offset, mem_mask); } - WRITE32_MEMBER(jaguar_state::gpuctrl_w) { - m_gpu->ctrl_w(offset, data, mem_mask); + m_gpu->iobus_w(offset, data, mem_mask); } - - /************************************* * * 32-bit access to the DSP @@ -682,16 +679,14 @@ WRITE32_MEMBER(jaguar_state::gpuctrl_w) READ32_MEMBER(jaguar_state::dspctrl_r) { - return m_dsp->ctrl_r(offset); + return m_dsp->iobus_r(offset, mem_mask); } - WRITE32_MEMBER(jaguar_state::dspctrl_w) { - m_dsp->ctrl_w(offset, data, mem_mask); + m_dsp->iobus_w(offset, data, mem_mask); } - /************************************* * * Input ports @@ -1119,7 +1114,7 @@ void jaguar_state::console_base_map(address_map &map) map(0xe00000, 0xe1ffff).rom().region("mainrom", 0); map(0xf00000, 0xf003ff).rw(FUNC(jaguar_state::tom_regs_r), FUNC(jaguar_state::tom_regs_w)); // might be reversed endian of the others.. map(0xf00400, 0xf005ff).mirror(0x000200).rw(FUNC(jaguar_state::gpu_clut_r16), FUNC(jaguar_state::gpu_clut_w16)); - map(0xf02100, 0xf021ff).mirror(0x008000).rw(FUNC(jaguar_state::gpuctrl_r16), FUNC(jaguar_state::gpuctrl_w16)); + map(0xf02100, 0xf021ff).rw(FUNC(jaguar_state::gpuctrl_r16), FUNC(jaguar_state::gpuctrl_w16)); map(0xf02200, 0xf022ff).mirror(0x008000).rw(FUNC(jaguar_state::blitter_r16), FUNC(jaguar_state::blitter_w16)); map(0xf03000, 0xf03fff).mirror(0x008000).rw(FUNC(jaguar_state::gpu_ram_r16), FUNC(jaguar_state::gpu_ram_w16)); map(0xf10000, 0xf103ff).rw(FUNC(jaguar_state::jerry_regs_r), FUNC(jaguar_state::jerry_regs_w)); // might be reversed endian of the others.. @@ -1141,7 +1136,7 @@ void jaguar_state::jaguar_map(address_map &map) void jaguar_state::cpu_space_map(address_map &map) { map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map)); - map(0xfffffd, 0xfffffd).lr8([] () -> u8 { return 0x40; }, "level6"); + map(0xfffff5, 0xfffff5).lr8([] () -> u8 { return 0x40; }, "level2"); } /* @@ -1451,7 +1446,7 @@ void jaguar_state::console_base_gpu_map(address_map &map) map(0xe00000, 0xe1ffff).r(FUNC(jaguar_state::rom_base_r)); map(0xf00000, 0xf003ff).rw(FUNC(jaguar_state::tom_regs_r), FUNC(jaguar_state::tom_regs_w)); map(0xf00400, 0xf005ff).mirror(0x000200).ram().share("gpuclut"); - map(0xf02100, 0xf021ff).mirror(0x008000).rw(FUNC(jaguar_state::gpuctrl_r), FUNC(jaguar_state::gpuctrl_w)); + map(0xf02100, 0xf021ff).rw(FUNC(jaguar_state::gpuctrl_r), FUNC(jaguar_state::gpuctrl_w)); map(0xf02200, 0xf022ff).mirror(0x008000).rw(FUNC(jaguar_state::blitter_r), FUNC(jaguar_state::blitter_w)); map(0xf03000, 0xf03fff).mirror(0x008000).ram().share("gpuram"); map(0xf10000, 0xf103ff).rw(FUNC(jaguar_state::jerry_regs_r), FUNC(jaguar_state::jerry_regs_w)); @@ -1764,18 +1759,28 @@ INPUT_PORTS_END * *************************************/ +void jaguar_state::video_config(machine_config &config, const XTAL clock) +{ + JAGUARGPU(config, m_gpu, clock); + m_gpu->irq().set(FUNC(jaguar_state::gpu_cpu_int)); + + JAGUARDSP(config, m_dsp, clock); + m_dsp->irq().set(FUNC(jaguar_state::dsp_cpu_int)); + + // TODO: Tom + // TODO: Object Processor + + JAG_BLITTER(config, m_blitter, clock); +} + void jaguar_state::cojagr3k(machine_config &config) { /* basic machine hardware */ R3041(config, m_maincpu, R3000_CLOCK).set_endianness(ENDIANNESS_BIG); m_maincpu->set_addrmap(AS_PROGRAM, &jaguar_state::r3000_map); - JAGUARGPU(config, m_gpu, COJAG_CLOCK/2); - m_gpu->irq().set(FUNC(jaguar_state::gpu_cpu_int)); + video_config(config, COJAG_CLOCK/2); m_gpu->set_addrmap(AS_PROGRAM, &jaguar_state::gpu_map); - - JAGUARDSP(config, m_dsp, COJAG_CLOCK/2); - m_dsp->irq().set(FUNC(jaguar_state::dsp_cpu_int)); m_dsp->set_addrmap(AS_PROGRAM, &jaguar_state::dsp_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); @@ -1803,6 +1808,8 @@ void jaguar_state::cojagr3k(machine_config &config) vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT); vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT); + + // TODO: subwoofer speaker } void jaguar_state::cojagr3k_rom(machine_config &config) @@ -1832,12 +1839,8 @@ void jaguar_state::jaguar(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &jaguar_state::jaguar_map); m_maincpu->set_addrmap(m68000_device::AS_CPU_SPACE, &jaguar_state::cpu_space_map); - JAGUARGPU(config, m_gpu, JAGUAR_CLOCK); - m_gpu->irq().set(FUNC(jaguar_state::gpu_cpu_int)); + video_config(config, JAGUAR_CLOCK); m_gpu->set_addrmap(AS_PROGRAM, &jaguar_state::jag_gpu_dsp_map); - - JAGUARDSP(config, m_dsp, JAGUAR_CLOCK); - m_dsp->irq().set(FUNC(jaguar_state::dsp_cpu_int)); m_dsp->set_addrmap(AS_PROGRAM, &jaguar_state::jag_gpu_dsp_map); // MCFG_NVRAM_HANDLER(jaguar) @@ -1902,6 +1905,7 @@ void jaguar_state::fix_endian( void *base, uint32_t size ) void jaguar_state::init_jaguar() { + m_is_cojag = false; m_hacks_enabled = false; save_item(NAME(m_joystick_data)); diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h index 50165c04360..87a77371ddb 100644 --- a/src/mame/includes/jaguar.h +++ b/src/mame/includes/jaguar.h @@ -12,6 +12,7 @@ #include "machine/eepromser.h" #include "machine/vt83c461.h" #include "imagedev/snapquik.h" +#include "video/jag_blitter.h" #include "cdrom.h" #include "imagedev/chd_cd.h" #include "screen.h" @@ -33,6 +34,7 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_gpu(*this, "gpu") + , m_blitter(*this, "blitter") , m_dsp(*this, "dsp") , m_ldac(*this, "ldac") , m_rdac(*this, "rdac") @@ -111,9 +113,12 @@ protected: virtual void device_postload(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + void video_config(machine_config &config, const XTAL clock); + // devices required_device m_maincpu; required_device m_gpu; + required_device m_blitter; required_device m_dsp; required_device m_ldac; required_device m_rdac; @@ -301,7 +306,8 @@ private: void get_crosshair_xy(int player, int &x, int &y); int effective_hvalue(int value); bool adjust_object_timer(int vc); - void update_cpu_irq(); + inline void trigger_host_cpu_irq(int level); + inline void verify_host_cpu_irq(); uint8_t *memory_base(uint32_t offset) { return reinterpret_cast(m_gpu->space(AS_PROGRAM).get_read_ptr(offset)); } void blitter_run(); void scanline_update(int param); diff --git a/src/mame/video/jag_blitter.cpp b/src/mame/video/jag_blitter.cpp new file mode 100644 index 00000000000..d2f33aacfeb --- /dev/null +++ b/src/mame/video/jag_blitter.cpp @@ -0,0 +1,240 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese +/*************************************************************************** + + Atari Jaguar "Blitter" device + + TODO: + - Stub device, port/rewrite from jagblit; + - actual codename/chip part number; + - has different revs, encapsulate; + +***************************************************************************/ + +#include "emu.h" +#include "jag_blitter.h" + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(JAG_BLITTER, jag_blitter_device, "jag_blitter", "Atari Jaguar Blitter") + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// jag_blitter_device - constructor +//------------------------------------------------- + +jag_blitter_device::jag_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, JAG_BLITTER, tag, owner, clock) + , device_memory_interface(mconfig, *this) + , m_space_config("regs", ENDIANNESS_BIG, 32, 8, 0, address_map_constructor(FUNC(jag_blitter_device::regs_map), this)) + , m_command_latch(0) + , m_status_idle(true) + , m_count_lines(0) + , m_count_pixels(0) +{ + m_a1.base = 0; + m_a1.xstep = 0; + m_a1.ystep = 0; +} + +device_memory_interface::space_config_vector jag_blitter_device::memory_space_config() const +{ + return space_config_vector { + std::make_pair(0, &m_space_config) + }; +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void jag_blitter_device::device_start() +{ + save_item(NAME(m_status_idle)); + save_item(NAME(m_command_latch)); + save_item(NAME(m_count_lines)); + save_item(NAME(m_count_pixels)); + save_item(NAME(m_a1.base)); + save_item(NAME(m_a1.xstep)); + save_item(NAME(m_a1.ystep)); + + m_command_timer = timer_alloc(0); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void jag_blitter_device::device_reset() +{ + m_command_latch = 0; + m_status_idle = true; + + m_command_timer->adjust(attotime::never); +} + +//-------------------------------------------------- +// core workings +//-------------------------------------------------- + +/*************************************************************************** + FUNCTION TABLES +***************************************************************************/ + +const jag_blitter_device::op_func jag_blitter_device::upda_ops[8] = +{ + &jag_blitter_device::op_nop, + &jag_blitter_device::op_unemulated, // upda1f + &jag_blitter_device::op_upda1, + &jag_blitter_device::op_unemulated, // upda1 + upda1f + + &jag_blitter_device::op_unemulated, // upda2 + &jag_blitter_device::op_unemulated, // upda1f + upda2 + &jag_blitter_device::op_unemulated, // upda1 + upda2 + &jag_blitter_device::op_unemulated // upda1 + upda1f + upda2 +}; + +void jag_blitter_device::op_nop() +{ + // do nothing for this step +} + +// common cases for unhandled, will be removed once everything is set +void jag_blitter_device::op_unemulated() +{ + throw emu_fatalerror("%s: unhandled step with command latch %08x",m_command_latch); +} + +void jag_blitter_device::op_upda1() +{ + // ... + +} + +inline void jag_blitter_device::command_start() +{ + if (m_status_idle == false) + throw emu_fatalerror("%s: inflight blitter trigger %08x", this->tag(), m_command_latch); + m_status_idle = false; + // TODO: to be removed, see below + m_command_timer->adjust(attotime::from_ticks(m_count_lines * m_count_pixels, this->clock())); +} + +inline void jag_blitter_device::command_run() +{ + // TODO: need to single step, have different timings between pixel and phrase modes, + // calculate collision detection, delay a bit the kickoff due of bus chain requests, + // take more time by virtue of using additional steps, be a civilian or not depending + // of BUSHI setting + + printf("%08x\n",m_command_latch); + // init + m_a1.ptr = m_a1.base; + + // ... + + command_done(); +} + +inline void jag_blitter_device::command_done() +{ + // m_status_idle = true; + // ... +} + +void jag_blitter_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + command_run(); +} + +//************************************************************************** +// READ/WRITE HANDLERS +//************************************************************************** + +void jag_blitter_device::regs_map(address_map &map) +{ + // $f02200 + map(0x00, 0x03).w(FUNC(jag_blitter_device::a1_base_w)); + map(0x10, 0x13).w(FUNC(jag_blitter_device::a1_ystep_w)).umask32(0xffff0000); + map(0x10, 0x13).w(FUNC(jag_blitter_device::a1_xstep_w)).umask32(0x0000ffff); + map(0x38, 0x3b).rw(FUNC(jag_blitter_device::status_r), FUNC(jag_blitter_device::command_w)); + map(0x3c, 0x3f).w(FUNC(jag_blitter_device::count_outer_w)).umask32(0xffff0000); + map(0x3c, 0x3f).w(FUNC(jag_blitter_device::count_inner_w)).umask32(0x0000ffff); +} + +WRITE32_MEMBER(jag_blitter_device::a1_base_w) +{ + COMBINE_DATA(&m_a1.base); + // align to phrase + m_a1.base &= ~7; +} + +WRITE16_MEMBER(jag_blitter_device::a1_xstep_w) +{ + COMBINE_DATA(&m_a1.xstep); +} + +WRITE16_MEMBER(jag_blitter_device::a1_ystep_w) +{ + COMBINE_DATA(&m_a1.ystep); +} + +READ32_MEMBER(jag_blitter_device::status_r) +{ + // TODO: stopped bit + // TODO: diag bits 2-31 + return m_status_idle; +} + +WRITE32_MEMBER(jag_blitter_device::command_w) +{ + COMBINE_DATA(&m_command_latch); + // TODO: is it possible from 68k to write on this in byte units? + // We may just do so in order to take endianness into account, or just delegate to the overlying bus framework, + // may be a common problem with ALL video regs for that matter. + if (ACCESSING_BITS_0_15) + command_start(); +} + +WRITE16_MEMBER(jag_blitter_device::count_outer_w) +{ + COMBINE_DATA(&m_count_lines); + if (m_count_lines == 0) + { + // according to documentation, log it out + m_count_lines = 0x10000; + popmessage("Blitter: line count set to max, contact MAMEdev"); + } +} + +WRITE16_MEMBER(jag_blitter_device::count_inner_w) +{ + COMBINE_DATA(&m_count_pixels); + if (m_count_pixels == 0) + { + // according to documentation, log it out + m_count_pixels = 0x10000; + popmessage("Blitter: pixel count set to max, contact MAMEdev"); + } +} + +u32 jag_blitter_device::iobus_r(offs_t offset, u32 mem_mask) +{ + return space().read_dword(offset*4, mem_mask); +} + +void jag_blitter_device::iobus_w(offs_t offset, u32 data, u32 mem_mask) +{ + space().write_dword(offset*4, data, mem_mask); +} diff --git a/src/mame/video/jag_blitter.h b/src/mame/video/jag_blitter.h new file mode 100644 index 00000000000..6812871d647 --- /dev/null +++ b/src/mame/video/jag_blitter.h @@ -0,0 +1,100 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese +/*************************************************************************** + + Atari Jaguar "Blitter" device + +***************************************************************************/ + +#ifndef MAME_MACHINE_JAG_BLITTER_H +#define MAME_MACHINE_JAG_BLITTER_H + +#pragma once + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> jag_blitter_device + +class jag_blitter_device : public device_t, + public device_memory_interface +{ +public: + // construction/destruction + jag_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // TODO: add which device triggered the I/O + void iobus_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 iobus_r(offs_t offset, u32 mem_mask = ~0); + +protected: + // device-level overrides + //virtual void device_validity_check(validity_checker &valid) const override; + virtual void device_start() override; + virtual void device_reset() override; + void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + virtual space_config_vector memory_space_config() const override; + + const address_space_config m_space_config; + +// address_space *m_host_space; + +private: + void regs_map(address_map &map); + + DECLARE_WRITE32_MEMBER(a1_base_w); + DECLARE_WRITE16_MEMBER(a1_xstep_w); + DECLARE_WRITE16_MEMBER(a1_ystep_w); + DECLARE_READ32_MEMBER(status_r); + DECLARE_WRITE32_MEMBER(command_w); + DECLARE_WRITE16_MEMBER(count_outer_w); + DECLARE_WRITE16_MEMBER(count_inner_w); + + // timer setups + emu_timer *m_command_timer; + inline void command_start(); + inline void command_run(); + inline void command_done(); + + // functional switches + + typedef void (jag_blitter_device::*op_func)(void); + + static const op_func upda_ops[8]; + void op_nop(); + void op_unemulated(); + void op_upda1(); + + u32 m_command_latch; + bool m_status_idle; + u32 m_count_lines, m_count_pixels; + + struct { + u32 base; + s16 xstep, ystep; + + u32 ptr; /**< Current pixel address */ + } m_a1; +}; + + +// device type definition +DECLARE_DEVICE_TYPE(JAG_BLITTER, jag_blitter_device) + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + + +#endif // MAME_MACHINE_JAG_BLITTER_H diff --git a/src/mame/video/jagobj.hxx b/src/mame/video/jagobj.hxx index c11ff0f73f0..ffa8e7cdd8c 100644 --- a/src/mame/video/jagobj.hxx +++ b/src/mame/video/jagobj.hxx @@ -1056,9 +1056,11 @@ void jaguar_state::process_object_list(int vc, uint16_t *scanline) m_gpu_regs[OB_HL]=objdata[1]&0xffff; m_gpu_regs[OB_LH]=(objdata[0]&0xffff0000)>>16; m_gpu_regs[OB_LL]=objdata[0]&0xffff; - m_cpu_irq_state |= 2; - update_cpu_irq(); + m_gpu->set_input_line(3, ASSERT_LINE); done=1; + // mutntpng, atarikrt VPOS = 0 + // TODO: what the VPOS is actually for? + //printf("GPU irq VPOS = %04x\n",(objdata[1] >> 3) & 0x7ff); break; /* branch */ @@ -1078,16 +1080,20 @@ void jaguar_state::process_object_list(int vc, uint16_t *scanline) logerror("stop = %08X-%08X\n", objdata[0], objdata[1]); if (interrupt) { + // TODO: fball95 doesn't have a real handling for stop irq, causing the line to be always asserted, how to prevent? // fprintf(stderr, "stop int=%d\n", interrupt); - m_cpu_irq_state |= 4; - update_cpu_irq(); + trigger_host_cpu_irq(2); } break; } + case 6: + // kasumi: F7000000 00F0311E (nop? bad align?) + break; + default: fprintf(stderr, "%08X %08X\n", objdata[0], objdata[1]); - done = 1; + //done = 1; break; } } diff --git a/src/mame/video/jaguar.cpp b/src/mame/video/jaguar.cpp index cd28bd255c6..06e0995577b 100644 --- a/src/mame/video/jaguar.cpp +++ b/src/mame/video/jaguar.cpp @@ -4,6 +4,12 @@ Atari Jaguar hardware + TODO (list of exceptions): + jaguar_state::generic_blitter() + - atarikrt, bretth, brutalsp, nbajamte, spacewar, spacewarp, tempst2k + jaguar_state::blitter_09800009_000020_000020() + - ruinerp + **************************************************************************** ------------------------------------------------------------ @@ -150,7 +156,8 @@ #define LOG_BLITTER_STATS 0 #define LOG_BLITTER_WRITE 0 #define LOG_UNHANDLED_BLITS 0 - +// use the new version in jag_blitter.cpp/.h if 0 +#define USE_LEGACY_BLITTER 1 @@ -266,25 +273,38 @@ inline bool jaguar_state::adjust_object_timer(int vc) * *************************************/ -void jaguar_state::update_cpu_irq() +// TODO: new TOM install irq handler +inline void jaguar_state::verify_host_cpu_irq() { - if ((m_cpu_irq_state & m_gpu_regs[INT1] & 0x1f) != 0) - m_maincpu->set_input_line(m_is_r3000 ? INPUT_LINE_IRQ4 : M68K_IRQ_6, ASSERT_LINE); + // jaguar uses irq 2 + if (m_is_cojag == false) + m_maincpu->set_input_line(M68K_IRQ_2, ((m_cpu_irq_state & m_gpu_regs[INT1] & 0x1f) != 0) ? ASSERT_LINE : CLEAR_LINE); else - m_maincpu->set_input_line(m_is_r3000 ? INPUT_LINE_IRQ4 : M68K_IRQ_6, CLEAR_LINE); + { + // cojag r3000 uses irq 4 + // cojag 68020 uses irq 6 + if ((m_cpu_irq_state & m_gpu_regs[INT1] & 0x1f) != 0) + m_maincpu->set_input_line(m_is_r3000 ? INPUT_LINE_IRQ4 : M68K_IRQ_6, ASSERT_LINE); + else + m_maincpu->set_input_line(m_is_r3000 ? INPUT_LINE_IRQ4 : M68K_IRQ_6, CLEAR_LINE); + } +} + +inline void jaguar_state::trigger_host_cpu_irq(int level) +{ + m_cpu_irq_state |= 1 << level; + verify_host_cpu_irq(); } WRITE_LINE_MEMBER( jaguar_state::gpu_cpu_int ) { - m_cpu_irq_state |= 2; - update_cpu_irq(); + trigger_host_cpu_irq(1); } WRITE_LINE_MEMBER( jaguar_state::dsp_cpu_int ) { - m_cpu_irq_state |= 16; - update_cpu_irq(); + trigger_host_cpu_irq(4); } @@ -524,6 +544,7 @@ if (++reps % 100 == 99) READ32_MEMBER( jaguar_state::blitter_r ) { +#if USE_LEGACY_BLITTER switch (offset) { case B_CMD: /* B_CMD */ @@ -533,11 +554,15 @@ READ32_MEMBER( jaguar_state::blitter_r ) logerror("%s:Blitter read register @ F022%02X\n", machine().describe_context(), offset * 4); return 0; } + #else + return m_blitter->iobus_r(offset, mem_mask); + #endif } WRITE32_MEMBER( jaguar_state::blitter_w ) { +#if USE_LEGACY_BLITTER COMBINE_DATA(&m_blitter_regs[offset]); if ((offset == B_CMD) && ACCESSING_BITS_0_15) { @@ -549,7 +574,10 @@ WRITE32_MEMBER( jaguar_state::blitter_w ) } if (LOG_BLITTER_WRITE) - logerror("%s:Blitter write register @ F022%02X = %08X\n", machine().describe_context(), offset * 4, data); + logerror("%s:Blitter write register @ F022%02X = %08X\n", machine().describe_context(), offset * 4, data); +#else + m_blitter->iobus_w(offset, data, mem_mask); +#endif } @@ -568,7 +596,9 @@ READ16_MEMBER( jaguar_state::tom_regs_r ) switch (offset) { case INT1: + { return m_cpu_irq_state; + } case HC: return m_screen->hpos() % (m_screen->width() / 2); @@ -615,8 +645,10 @@ WRITE16_MEMBER( jaguar_state::tom_regs_w ) case INT1: m_cpu_irq_state &= ~(m_gpu_regs[INT1] >> 8); - update_cpu_irq(); + verify_host_cpu_irq(); break; + + // TODO: INT2 bus mechanism case VMODE: if (reg_store != m_gpu_regs[offset]) @@ -624,8 +656,7 @@ WRITE16_MEMBER( jaguar_state::tom_regs_w ) break; case OBF: /* clear GPU interrupt */ - m_cpu_irq_state &= 0xfd; - update_cpu_irq(); + m_gpu->set_input_line(3, CLEAR_LINE); break; case HP: @@ -715,10 +746,7 @@ void jaguar_state::device_timer(emu_timer &timer, device_timer_id id, int param, case TID_PIT: if (m_gpu_regs[INT1] & 0x8) - { - m_cpu_irq_state |= 8; - update_cpu_irq(); - } + trigger_host_cpu_irq(3); if (m_gpu_regs[PIT0] != 0) { attotime sample_period = attotime::from_ticks((1+m_gpu_regs[PIT0]) * (1+m_gpu_regs[PIT1]), m_gpu->clock()/2); @@ -789,10 +817,7 @@ void jaguar_state::scanline_update(int param) { /* handle vertical interrupts */ if (vc == m_gpu_regs[VI]) - { - m_cpu_irq_state |= 1; - update_cpu_irq(); - } + trigger_host_cpu_irq(0); /* point to the next counter value */ if (++vc / 2 >= m_screen->height()) @@ -824,7 +849,7 @@ void jaguar_state::video_start() void jaguar_state::device_postload() { - update_cpu_irq(); + verify_host_cpu_irq(); } From 35cde25ed2b66d326c1c8cd4b01c9c2945f8724b Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Fri, 15 May 2020 21:44:23 +0100 Subject: [PATCH 69/69] csilver: identified 3 bad bits in MCU dump, hooked up MCU [dink] --- src/mame/drivers/dec8.cpp | 127 ++++++++++++++------------------------ src/mame/includes/dec8.h | 2 +- 2 files changed, 48 insertions(+), 81 deletions(-) diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp index 63c8d0f352c..73819a4cbe4 100644 --- a/src/mame/drivers/dec8.cpp +++ b/src/mame/drivers/dec8.cpp @@ -168,80 +168,6 @@ WRITE8_MEMBER(dec8_state::dec8_i8751_w) } } -/******************************** -* -* MCU simulations -* -********************************/ - -WRITE8_MEMBER(dec8_state::csilver_i8751_w) -{ - /* Japan coinage first, then World coinage - US coinage shall be the same as the Japan one */ - int lneed1[2][4] = {{1, 1, 1, 2}, {1, 1, 1, 1}}; /* slot 1 : coins needed */ - int lcred1[2][4] = {{1, 2, 3, 1}, {2, 3, 4, 6}}; /* slot 1 : credits awarded */ - int lneed2[2][4] = {{1, 1, 1, 2}, {1, 2, 3, 4}}; /* slot 2 : coins needed */ - int lcred2[2][4] = {{1, 2, 3, 1}, {1, 1, 1, 1}}; /* slot 2 : credits awarded */ - - m_i8751_return = 0; - - switch (offset) - { - case 0: /* High byte */ - m_i8751_value = (m_i8751_value & 0xff) | (data << 8); - m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); /* Signal main cpu */ - break; - case 1: /* Low byte */ - m_i8751_value = (m_i8751_value & 0xff00) | data; - break; - } - - /* Coins are controlled by the i8751 */ - if ((ioport("IN2")->read() & 3) == 3) m_latch = 1; - if ((ioport("IN2")->read() & 1) != 1 && m_latch) - { - m_coin1++; - m_latch = 0; - m_snd = 0x1200; - m_i8751_return = 0x1200; - if (m_coin1>=m_need1) - { - m_coin1-=m_need1; - m_credits+=m_cred1; - } - } - if ((ioport("IN2")->read() & 2) != 2 && m_latch) - { - m_coin2++; - m_latch = 0; - m_snd = 0x1200; - m_i8751_return = 0x1200; - if (m_coin2>=m_need2) - { - m_coin2-=m_need2; - m_credits+=m_cred2; - } - } - if (m_credits>99) m_credits=99; /* not handled by main CPU */ - - if (m_i8751_value == 0x054a) { m_i8751_return = 0xb5; m_coinage_id = 0; } /* Japanese version ID */ - if (m_i8751_value == 0x054c) { m_i8751_return = 0xb3; m_coinage_id = 1; } /* World version ID */ - - if (offset == 0) - { - if ((m_i8751_value >> 8) == 0x01) /* Coinage settings */ - { - m_i8751_return = m_i8751_value; - m_need1 = lneed1[m_coinage_id][(m_i8751_value & 0x03) >> 0]; - m_need2 = lneed2[m_coinage_id][(m_i8751_value & 0x0c) >> 2]; - m_cred1 = lcred1[m_coinage_id][(m_i8751_value & 0x03) >> 0]; - m_cred2 = lcred2[m_coinage_id][(m_i8751_value & 0x0c) >> 2]; - } - if ((m_i8751_value >> 8) == 0x02) { m_i8751_return = m_snd | m_credits; m_snd = 0; } /* Credits request */ - if ((m_i8751_value >> 8) == 0x03 && m_credits) { m_i8751_return = 0; m_credits--; } /* Credits clear */ - } -} - - /******************************************************************************/ WRITE8_MEMBER(dec8_state::dec8_bank_w) @@ -545,7 +471,7 @@ void dec8_state::csilver_map(address_map &map) map(0x1808, 0x180b).w(FUNC(dec8_state::dec8_scroll2_w)); map(0x180c, 0x180c).w(FUNC(dec8_state::dec8_sound_w)); map(0x180d, 0x180d).w(FUNC(dec8_state::csilver_control_w)); - map(0x180e, 0x180f).w(FUNC(dec8_state::csilver_i8751_w)); + map(0x180e, 0x180f).w(FUNC(dec8_state::dec8_i8751_w)); map(0x1c00, 0x1c00).r(FUNC(dec8_state::i8751_h_r)); map(0x1e00, 0x1e00).r(FUNC(dec8_state::i8751_l_r)); map(0x2000, 0x27ff).ram().w(FUNC(dec8_state::dec8_videoram_w)); @@ -821,6 +747,27 @@ void dec8_state::srdarwin_mcu_to_main_w(uint8_t data) m_maincpu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE); } + +void dec8_state::csilver_mcu_to_main_w(uint8_t data) +{ + if (~data & 0x10) + m_i8751_port0 = m_i8751_value >> 8; + + if (~data & 0x20) + m_i8751_port1 = m_i8751_value & 0xff; + + if (~data & 0x40) + { + m_i8751_return = (m_i8751_return & 0xff) | (m_i8751_port0 << 8); + m_subcpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); // FIRQ to main cpu + } + + if (~data & 0x80) + m_i8751_return = (m_i8751_return & 0xff00) | m_i8751_port1; + + m_i8751_p2 = data; +} + /******************************************************************************/ #define PLAYER1_JOYSTICK /* Player 1 controls */ \ @@ -1333,8 +1280,8 @@ static INPUT_PORTS_START( csilver ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) // coins read through MCU + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // ^ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1383,6 +1330,10 @@ static INPUT_PORTS_START( csilver ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) + + PORT_START("I8751") /* hooked up on the i8751 */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) INPUT_PORTS_END /* verified from M6809 code - coinage needs further checking when the MCU is available */ @@ -1403,6 +1354,7 @@ static INPUT_PORTS_START( csilverj ) INPUT_PORTS_END + /* verified from HD6309 code */ static INPUT_PORTS_START( oscar ) PORT_START("IN0") @@ -2182,6 +2134,7 @@ void dec8_state::meikyuh(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::dec8_s_map); } + void dec8_state::csilver(machine_config &config) { /* basic machine hardware */ @@ -2196,6 +2149,16 @@ void dec8_state::csilver(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); + I8751(config, m_mcu, XTAL(8'000'000)); + m_mcu->port_in_cb<0>().set(FUNC(dec8_state::i8751_port0_r)); + m_mcu->port_out_cb<0>().set(FUNC(dec8_state::i8751_port0_w)); + m_mcu->port_in_cb<1>().set(FUNC(dec8_state::i8751_port1_r)); + m_mcu->port_out_cb<1>().set(FUNC(dec8_state::i8751_port1_w)); + m_mcu->port_out_cb<2>().set(FUNC(dec8_state::csilver_mcu_to_main_w)); + m_mcu->port_in_cb<3>().set_ioport("I8751"); + + config.set_perfect_quantum(m_maincpu); + /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); @@ -3231,6 +3194,7 @@ Lower board (DATA EAST DE-0251-2): */ + ROM_START( csilver ) ROM_REGION( 0x48000, "maincpu", 0 ) ROM_LOAD( "dx03-12.18d", 0x08000, 0x08000, CRC(2d926e7c) SHA1(cf38e92904edb1870b0a4965f9049d67efe8cf6a) ) @@ -3245,7 +3209,8 @@ ROM_START( csilver ) ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */ // 017F: B4 4C 0D : cjne a,#$4C,$018F (ID code 0x4c = World version) - ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, CRC(ca663965) SHA1(a5fb7afdfd324761bde4bb90ba12efc9954627af) ) // dx-8.19a ? + // 3 bytes (always bit 0x08 set incorrectly) had to be hand fixed, hence 'BAD_DUMP' + ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, BAD_DUMP CRC(c0266263) SHA1(27ac6fa4af7195f04249c04dec168ab82158704e) ) // dx-8.19a ? ROM_REGION( 0x08000, "gfx1", 0 ) /* characters */ ROM_LOAD( "dx00.3d", 0x00000, 0x08000, CRC(f01ef985) SHA1(d5b823bd7c0efcf3137f8643c5d99a260bed5675) ) @@ -3282,7 +3247,8 @@ ROM_START( csilverj ) ROM_LOAD( "dx05.a6", 0x00000, 0x10000, CRC(eb32cf25) SHA1(9390c88033259c65eb15320e31f5d696970987cc) ) ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */ - ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP ) + // hand modified version of csilver ROM + ROM_LOAD( "id8751h_japan.mcu", 0x0000, 0x1000, BAD_DUMP CRC(6e801217) SHA1(2d8f7ae533dd8146acf8461d61ddd839544adf55) ) ROM_REGION( 0x08000, "gfx1", 0 ) /* characters */ ROM_LOAD( "dx00.a1", 0x00000, 0x08000, CRC(f01ef985) SHA1(d5b823bd7c0efcf3137f8643c5d99a260bed5675) ) @@ -3320,7 +3286,8 @@ ROM_START( csilverja ) // DE-0250-3 + DE-0251-2 ROM_LOAD( "dx05.3f", 0x00000, 0x10000, CRC(eb32cf25) SHA1(9390c88033259c65eb15320e31f5d696970987cc) ) ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */ - ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP ) + // hand modified version of csilver ROM + ROM_LOAD( "id8751h_japan.mcu", 0x0000, 0x1000, BAD_DUMP CRC(6e801217) SHA1(2d8f7ae533dd8146acf8461d61ddd839544adf55) ) ROM_REGION( 0x08000, "gfx1", 0 ) /* characters */ ROM_LOAD( "dx00.3d", 0x00000, 0x08000, CRC(f01ef985) SHA1(d5b823bd7c0efcf3137f8643c5d99a260bed5675) ) diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index 5815794feec..f1d4f14c79d 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -134,7 +134,6 @@ private: DECLARE_READ8_MEMBER(gondo_player_1_r); DECLARE_READ8_MEMBER(gondo_player_2_r); DECLARE_WRITE8_MEMBER(dec8_i8751_w); - DECLARE_WRITE8_MEMBER(csilver_i8751_w); DECLARE_WRITE8_MEMBER(dec8_bank_w); void ghostb_bank_w(uint8_t data); DECLARE_WRITE8_MEMBER(csilver_control_w); @@ -155,6 +154,7 @@ private: void gondo_mcu_to_main_w(uint8_t data); void shackled_mcu_to_main_w(uint8_t data); void srdarwin_mcu_to_main_w(uint8_t data); + void csilver_mcu_to_main_w(uint8_t data); DECLARE_WRITE8_MEMBER(dec8_bg_data_w); DECLARE_READ8_MEMBER(dec8_bg_data_r); DECLARE_WRITE8_MEMBER(dec8_videoram_w);