summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/genie.lua5
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/devices/bus/ieee488/hp9895.cpp2
-rw-r--r--src/devices/cpu/unsp/unsp_fxxx.cpp2
-rw-r--r--src/devices/machine/generalplus_gpl16250soc.cpp38
-rw-r--r--src/devices/machine/generalplus_gpl16250soc.h9
-rw-r--r--src/devices/machine/generalplus_gpl16250soc_video.cpp297
-rw-r--r--src/devices/machine/generalplus_gpl16250soc_video.h41
-rw-r--r--src/devices/machine/phi.cpp10
-rw-r--r--src/devices/machine/phi.h8
-rw-r--r--src/devices/machine/s3c2400.cpp2
-rw-r--r--src/devices/machine/s3c2400.h4
-rw-r--r--src/devices/machine/s3c2410.cpp2
-rw-r--r--src/devices/machine/s3c2410.h4
-rw-r--r--src/devices/machine/s3c2440.cpp2
-rw-r--r--src/devices/machine/s3c2440.h4
-rw-r--r--src/devices/machine/s3c24xx.hxx4
-rw-r--r--src/emu/emumem.h8
-rw-r--r--src/frontend/mame/luaengine.cpp28
-rw-r--r--src/mame/drivers/applix.cpp192
-rw-r--r--src/mame/drivers/argo.cpp32
-rw-r--r--src/mame/drivers/armedf.cpp15
-rw-r--r--src/mame/drivers/beehive.cpp26
-rw-r--r--src/mame/drivers/bigbord2.cpp11
-rw-r--r--src/mame/drivers/bloodbro_ms.cpp4
-rw-r--r--src/mame/drivers/camplynx.cpp77
-rw-r--r--src/mame/drivers/ccs2810.cpp84
-rw-r--r--src/mame/drivers/ccs300.cpp9
-rw-r--r--src/mame/drivers/cd2650.cpp18
-rw-r--r--src/mame/drivers/chaos.cpp34
-rw-r--r--src/mame/drivers/cm1800.cpp8
-rw-r--r--src/mame/drivers/cmmb.cpp8
-rw-r--r--src/mame/drivers/cortex.cpp20
-rw-r--r--src/mame/drivers/cvicny.cpp28
-rw-r--r--src/mame/drivers/czk80.cpp22
-rw-r--r--src/mame/drivers/d400.cpp8
-rw-r--r--src/mame/drivers/d6809.cpp12
-rw-r--r--src/mame/drivers/d9final.cpp20
-rw-r--r--src/mame/drivers/dacholer.cpp44
-rw-r--r--src/mame/drivers/dai3wksi.cpp18
-rw-r--r--src/mame/drivers/dambustr.cpp4
-rw-r--r--src/mame/drivers/daruma.cpp16
-rw-r--r--src/mame/drivers/dblcrown.cpp62
-rw-r--r--src/mame/drivers/dblewing.cpp12
-rw-r--r--src/mame/drivers/dbox.cpp16
-rw-r--r--src/mame/drivers/ddayjlc.cpp52
-rw-r--r--src/mame/drivers/ddealer.cpp18
-rw-r--r--src/mame/drivers/ddenlovr.cpp530
-rw-r--r--src/mame/drivers/de_2.cpp18
-rw-r--r--src/mame/drivers/de_3.cpp12
-rw-r--r--src/mame/drivers/debut.cpp8
-rw-r--r--src/mame/drivers/deco156.cpp32
-rw-r--r--src/mame/drivers/deco_ld.cpp16
-rw-r--r--src/mame/drivers/decstation.cpp44
-rw-r--r--src/mame/drivers/dectalk.cpp48
-rw-r--r--src/mame/drivers/decwritr.cpp24
-rw-r--r--src/mame/drivers/deshoros.cpp28
-rw-r--r--src/mame/drivers/destroyr.cpp20
-rw-r--r--src/mame/drivers/dg680.cpp30
-rw-r--r--src/mame/drivers/didact.cpp8
-rw-r--r--src/mame/drivers/digel804.cpp84
-rw-r--r--src/mame/drivers/dim68k.cpp52
-rw-r--r--src/mame/drivers/discoboy.cpp34
-rw-r--r--src/mame/drivers/diverboy.cpp8
-rw-r--r--src/mame/drivers/dkmb.cpp8
-rw-r--r--src/mame/drivers/dlair.cpp24
-rw-r--r--src/mame/drivers/dmndrby.cpp12
-rw-r--r--src/mame/drivers/dms5000.cpp8
-rw-r--r--src/mame/drivers/dms86.cpp26
-rw-r--r--src/mame/drivers/dmv.cpp60
-rw-r--r--src/mame/drivers/dolphunk.cpp18
-rw-r--r--src/mame/drivers/dominob.cpp8
-rw-r--r--src/mame/drivers/dorachan.cpp16
-rw-r--r--src/mame/drivers/dotrikun.cpp8
-rw-r--r--src/mame/drivers/dpb7000.cpp40
-rw-r--r--src/mame/drivers/dps1.cpp45
-rw-r--r--src/mame/drivers/dreambal.cpp10
-rw-r--r--src/mame/drivers/dreamwld.cpp4
-rw-r--r--src/mame/drivers/drtomy.cpp12
-rw-r--r--src/mame/drivers/drw80pkr.cpp8
-rw-r--r--src/mame/drivers/dsb46.cpp11
-rw-r--r--src/mame/drivers/duet16.cpp56
-rw-r--r--src/mame/drivers/dunhuang.cpp76
-rw-r--r--src/mame/drivers/dvk_kcgd.cpp48
-rw-r--r--src/mame/drivers/dwarfd.cpp20
-rw-r--r--src/mame/drivers/dynadice.cpp12
-rw-r--r--src/mame/drivers/dynamoah.cpp8
-rw-r--r--src/mame/drivers/dynax.cpp16
-rw-r--r--src/mame/drivers/e100.cpp8
-rw-r--r--src/mame/drivers/ec184x.cpp10
-rw-r--r--src/mame/drivers/ecoinfr.cpp100
-rw-r--r--src/mame/drivers/egghunt.cpp32
-rw-r--r--src/mame/drivers/einstein.cpp80
-rw-r--r--src/mame/drivers/elan_eu3a05.cpp2
-rw-r--r--src/mame/drivers/elan_eu3a14.cpp24
-rw-r--r--src/mame/drivers/elekscmp.cpp12
-rw-r--r--src/mame/drivers/elwro800.cpp16
-rw-r--r--src/mame/drivers/embargo.cpp20
-rw-r--r--src/mame/drivers/enigma2.cpp12
-rw-r--r--src/mame/drivers/eolith16.cpp8
-rw-r--r--src/mame/drivers/ep64.cpp21
-rw-r--r--src/mame/drivers/ertictac.cpp4
-rw-r--r--src/mame/drivers/esh.cpp25
-rw-r--r--src/mame/drivers/esq1.cpp28
-rw-r--r--src/mame/drivers/esq5505.cpp8
-rw-r--r--src/mame/drivers/ettrivia.cpp28
-rw-r--r--src/mame/drivers/eurocom2.cpp18
-rw-r--r--src/mame/drivers/europc.cpp20
-rw-r--r--src/mame/drivers/evmbug.cpp8
-rw-r--r--src/mame/drivers/f-32.cpp4
-rw-r--r--src/mame/drivers/famibox.cpp34
-rw-r--r--src/mame/drivers/fanucspmg.cpp56
-rw-r--r--src/mame/drivers/fastinvaders.cpp44
-rw-r--r--src/mame/drivers/fc100.cpp26
-rw-r--r--src/mame/drivers/fccpu30.cpp44
-rw-r--r--src/mame/drivers/feversoc.cpp16
-rw-r--r--src/mame/drivers/fidel_as12.cpp12
-rw-r--r--src/mame/drivers/fidel_cc7.cpp8
-rw-r--r--src/mame/drivers/fidel_chesster.cpp8
-rw-r--r--src/mame/drivers/fidel_dames.cpp12
-rw-r--r--src/mame/drivers/fidel_desdis.cpp14
-rw-r--r--src/mame/drivers/fidel_eag68k.cpp32
-rw-r--r--src/mame/drivers/fidel_phantom.cpp32
-rw-r--r--src/mame/drivers/fidel_sc12.cpp8
-rw-r--r--src/mame/drivers/fidel_sc8.cpp8
-rw-r--r--src/mame/drivers/fidel_sc9.cpp18
-rw-r--r--src/mame/drivers/fireball.cpp34
-rw-r--r--src/mame/drivers/firebeat.cpp142
-rw-r--r--src/mame/drivers/firefox.cpp60
-rw-r--r--src/mame/drivers/fk1.cpp24
-rw-r--r--src/mame/drivers/flashbeats.cpp8
-rw-r--r--src/mame/drivers/flicker.cpp12
-rw-r--r--src/mame/drivers/flipjack.cpp17
-rw-r--r--src/mame/drivers/flower.cpp24
-rw-r--r--src/mame/drivers/flyball.cpp40
-rw-r--r--src/mame/drivers/force68k.cpp32
-rw-r--r--src/mame/drivers/fp200.cpp32
-rw-r--r--src/mame/drivers/fp6000.cpp4
-rw-r--r--src/mame/drivers/fresh.cpp30
-rw-r--r--src/mame/drivers/ft68m.cpp4
-rw-r--r--src/mame/drivers/funkball.cpp30
-rw-r--r--src/mame/drivers/funtech.cpp20
-rw-r--r--src/mame/drivers/funworld.cpp24
-rw-r--r--src/mame/drivers/g627.cpp8
-rw-r--r--src/mame/drivers/gal3.cpp32
-rw-r--r--src/mame/drivers/galaxi.cpp32
-rw-r--r--src/mame/drivers/galaxian.cpp109
-rw-r--r--src/mame/drivers/galgame.cpp30
-rw-r--r--src/mame/drivers/galpani3.cpp16
-rw-r--r--src/mame/drivers/gambl186.cpp20
-rw-r--r--src/mame/drivers/gamecstl.cpp12
-rw-r--r--src/mame/drivers/gamemasters.cpp16
-rw-r--r--src/mame/drivers/gamtor.cpp4
-rw-r--r--src/mame/drivers/gei.cpp30
-rw-r--r--src/mame/drivers/generalplus_gpl16250.cpp2
-rw-r--r--src/mame/drivers/generalplus_gpl16250_nand.cpp4
-rw-r--r--src/mame/drivers/generalplus_gpl16250_rom.cpp6
-rw-r--r--src/mame/drivers/generalplus_gpl16250_romram.cpp16
-rw-r--r--src/mame/drivers/generalplus_gpl16250_spi.cpp2
-rw-r--r--src/mame/drivers/geneve.cpp8
-rw-r--r--src/mame/drivers/geniusiq.cpp32
-rw-r--r--src/mame/drivers/ggconnie.cpp8
-rw-r--r--src/mame/drivers/ghosteo.cpp12
-rw-r--r--src/mame/drivers/giclassic.cpp18
-rw-r--r--src/mame/drivers/gigatron.cpp2
-rw-r--r--src/mame/drivers/gimix.cpp20
-rw-r--r--src/mame/drivers/gkigt.cpp38
-rw-r--r--src/mame/drivers/globalfr.cpp4
-rw-r--r--src/mame/drivers/gluck2.cpp12
-rw-r--r--src/mame/drivers/go2000.cpp8
-rw-r--r--src/mame/drivers/goldart.cpp8
-rw-r--r--src/mame/drivers/goldngam.cpp4
-rw-r--r--src/mame/drivers/goldnpkr.cpp16
-rw-r--r--src/mame/drivers/good.cpp8
-rw-r--r--src/mame/drivers/goodejan.cpp28
-rw-r--r--src/mame/drivers/goori.cpp12
-rw-r--r--src/mame/drivers/goupil.cpp8
-rw-r--r--src/mame/drivers/gp2x.cpp40
-rw-r--r--src/mame/drivers/gpworld.cpp24
-rw-r--r--src/mame/drivers/gridcomp.cpp28
-rw-r--r--src/mame/drivers/gstream.cpp42
-rw-r--r--src/mame/drivers/gticlub.cpp76
-rw-r--r--src/mame/drivers/gts3.cpp4
-rw-r--r--src/mame/drivers/gts3a.cpp12
-rw-r--r--src/mame/drivers/guab.cpp8
-rw-r--r--src/mame/drivers/gunpey.cpp36
-rw-r--r--src/mame/drivers/h19.cpp16
-rw-r--r--src/mame/drivers/h8.cpp12
-rw-r--r--src/mame/drivers/h89.cpp4
-rw-r--r--src/mame/drivers/halleys.cpp52
-rw-r--r--src/mame/drivers/harriet.cpp9
-rw-r--r--src/mame/drivers/hazeltin.cpp40
-rw-r--r--src/mame/drivers/hhtiger.cpp12
-rw-r--r--src/mame/drivers/highvdeo.cpp100
-rw-r--r--src/mame/drivers/hitpoker.cpp26
-rw-r--r--src/mame/drivers/hk68v10.cpp24
-rw-r--r--src/mame/drivers/homelab.cpp32
-rw-r--r--src/mame/drivers/homez80.cpp4
-rw-r--r--src/mame/drivers/horizon.cpp4
-rw-r--r--src/mame/drivers/hornet.cpp108
-rw-r--r--src/mame/drivers/hp16500.cpp62
-rw-r--r--src/mame/drivers/hp2640.cpp52
-rw-r--r--src/mame/drivers/hp3478a.cpp4
-rw-r--r--src/mame/drivers/hp64k.cpp72
-rw-r--r--src/mame/drivers/hp80.cpp128
-rw-r--r--src/mame/drivers/hp95lx.cpp62
-rw-r--r--src/mame/drivers/hp9825.cpp28
-rw-r--r--src/mame/drivers/hp9845.cpp30
-rw-r--r--src/mame/drivers/hp9k.cpp44
-rw-r--r--src/mame/drivers/hp9k_3xx.cpp20
-rw-r--r--src/mame/drivers/hpz80unk.cpp20
-rw-r--r--src/mame/drivers/ht6000.cpp48
-rw-r--r--src/mame/drivers/hunter16.cpp4
-rw-r--r--src/mame/drivers/hunter2.cpp28
-rw-r--r--src/mame/drivers/husky.cpp20
-rw-r--r--src/mame/drivers/hvyunit.cpp40
-rw-r--r--src/mame/drivers/hyprduel.cpp36
-rw-r--r--src/mame/drivers/mappy.cpp2
-rw-r--r--src/mame/drivers/mc10.cpp332
-rw-r--r--src/mame/drivers/namcos22.cpp2
-rw-r--r--src/mame/drivers/play_3.cpp14
-rw-r--r--src/mame/drivers/roland_tr909.cpp293
-rw-r--r--src/mame/drivers/spectrum.cpp75
-rw-r--r--src/mame/includes/dynax.h2
-rw-r--r--src/mame/includes/funworld.h14
-rw-r--r--src/mame/includes/galaxian.h2
-rw-r--r--src/mame/includes/gaplus.h1
-rw-r--r--src/mame/includes/generalplus_gpl16250.h1
-rw-r--r--src/mame/includes/generalplus_gpl16250_romram.h17
-rw-r--r--src/mame/includes/hp9845.h10
-rw-r--r--src/mame/includes/spectrum.h2
-rw-r--r--src/mame/mame.lst7
-rw-r--r--src/mame/mess.flt1
-rw-r--r--src/mame/video/armedf.cpp1
-rw-r--r--src/mame/video/cps1.cpp4
-rw-r--r--src/mame/video/dynax.cpp2
-rw-r--r--src/mame/video/funworld.cpp4
-rw-r--r--src/mame/video/gaplus.cpp65
-rw-r--r--src/mame/video/k001604.cpp12
-rw-r--r--src/mame/video/k001604.h12
-rw-r--r--src/mame/video/k037122.cpp12
-rw-r--r--src/mame/video/k037122.h12
242 files changed, 3983 insertions, 3200 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 1a7ac03f4aa..33715a6b3e4 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -505,6 +505,11 @@ configuration { "Release", "vs20*" }
"NoEditAndContinue",
"NoIncrementalLink",
}
+ if _OPTIONS["SYMBOLS"] then
+ flags {
+ "Symbols",
+ }
+ end
configuration { "vsllvm" }
buildoptions {
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 699573720dd..0c3aa380f70 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -3324,6 +3324,7 @@ files {
MAME_DIR .. "src/mame/drivers/roland_tb303.cpp",
MAME_DIR .. "src/mame/drivers/roland_tr606.cpp",
MAME_DIR .. "src/mame/drivers/roland_tr707.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_tr909.cpp",
MAME_DIR .. "src/mame/drivers/roland_u20.cpp",
MAME_DIR .. "src/mame/audio/bu3905.cpp",
MAME_DIR .. "src/mame/audio/bu3905.h",
diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp
index 6eb16464a63..6d09984fba7 100644
--- a/src/devices/bus/ieee488/hp9895.cpp
+++ b/src/devices/bus/ieee488/hp9895.cpp
@@ -492,7 +492,7 @@ WRITE_LINE_MEMBER(hp9895_device::phi_int_w)
READ8_MEMBER(hp9895_device::phi_reg_r)
{
- uint16_t reg = m_phi->reg16_r(space , offset , mem_mask);
+ uint16_t reg = m_phi->reg16_r(offset);
// Reading D1=1 from a register sets the Z80 IRQ line
if (BIT(reg , 14) && !m_cpu_irq) {
diff --git a/src/devices/cpu/unsp/unsp_fxxx.cpp b/src/devices/cpu/unsp/unsp_fxxx.cpp
index 1b3de9cbfda..f8456d3ef1a 100644
--- a/src/devices/cpu/unsp/unsp_fxxx.cpp
+++ b/src/devices/cpu/unsp/unsp_fxxx.cpp
@@ -379,7 +379,7 @@ void unsp_12_device::execute_fxxx_101_group(uint16_t op)
if (r4 & 0x8000)
{
- // r2 undefined (code will check for this and avoid calculations
+ m_core->m_r[REG_R2] = count_leading_ones(0xffff0000 | r4) - 17;
}
else
{
diff --git a/src/devices/machine/generalplus_gpl16250soc.cpp b/src/devices/machine/generalplus_gpl16250soc.cpp
index 984b7ebc8c9..dc16e9985f7 100644
--- a/src/devices/machine/generalplus_gpl16250soc.cpp
+++ b/src/devices/machine/generalplus_gpl16250soc.cpp
@@ -67,9 +67,24 @@ void sunplus_gcm394_base_device::write_dma_params(int channel, int offset, uint1
m_dma_params[offset][channel] = data;
+ // TODO: very likely DMA happens whenever the length is not 0, as long as it's been enabled previously
+ // jak_prft doesn't rewrite the offset 0 register between requests, and instead writes the length
+ // as the final thing for each new request. other games do not write the length last, but turn off
+ // register 0 before writing params, and enable it again afterwards
+ // if that's the case, this code can be refactored to work on 'length' instead of the m_dma_latched
+
+ if (offset == 3)
+ {
+ m_dma_latched[channel] = true;
+
+ if (m_dma_params[0][channel] & 1)
+ trigger_systemm_dma(space, channel);
+ }
+
if (offset == 0 && (data & 1))
{
- trigger_systemm_dma(space, channel);
+ if (m_dma_latched[channel])
+ trigger_systemm_dma(space, channel);
}
}
@@ -152,7 +167,6 @@ void sunplus_gcm394_base_device::trigger_systemm_dma(address_space &space, int c
// wrlshunt transfers ROM to RAM, all RAM write addresses have 0x800000 in the destination set
- address_space& mem = this->space(AS_PROGRAM);
source &= 0x0fffffff;
length &= 0x0fffffff; // gormiti
@@ -188,6 +202,8 @@ void sunplus_gcm394_base_device::trigger_systemm_dma(address_space &space, int c
// note, these patch the code copied to SRAM so the 'PROGRAM ROM' check fails (it passes otherwise)
+ //address_space& mem = this->space(AS_PROGRAM);
+
//if (mem.read_word(0x4368c) == 0x4846)
// mem.write_word(0x4368c, 0x4840); // cars 2 force service mode
@@ -195,16 +211,21 @@ void sunplus_gcm394_base_device::trigger_systemm_dma(address_space &space, int c
// mem.write_word(0x34410, 0x4840); // golden tee force service mode
// what is it waiting for when we need these? (needed on some service mode screens)
- if (mem.read_word(0x3f368) == 0x4840)
- mem.write_word(0x3f368, 0x4841); // cars 2 IRQ? wait hack
+ //if (mem.read_word(0x3f368) == 0x4840)
+ // mem.write_word(0x3f368, 0x4841); // cars 2 IRQ? wait hack
- if (mem.read_word(0x4d8d4) == 0x4840)
- mem.write_word(0x4d8d4, 0x4841); // golden tee IRQ? wait hack
+ //if (mem.read_word(0x4d8d4) == 0x4840)
+ // mem.write_word(0x4d8d4, 0x4841); // golden tee IRQ? wait hack
// clear params after operation
- m_dma_params[0][channel] = m_dma_params[1][channel] = m_dma_params[2][channel] = m_dma_params[3][channel] = m_dma_params[4][channel] = m_dma_params[5][channel] = m_dma_params[6][channel] = 0x0000;
+ m_dma_params[0][channel] = m_dma_params[0][channel] & 0x00f7;
+
+ m_dma_params[1][channel] = m_dma_params[2][channel] = m_dma_params[3][channel] = m_dma_params[4][channel] = m_dma_params[5][channel] = m_dma_params[6][channel] = 0x0000;
+ m_dma_latched[channel] = false;
+
//machine().debug_break();
+
}
WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_7abf_unk_w)
@@ -772,7 +793,7 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
// these don't exist on older SPG
map(0x00707c, 0x00707c).r(m_spg_video, FUNC(gcm394_base_video_device::video_707c_r)); // wrlshunt polls this waiting for 0x8000, is this some kind of manual port-based data upload?
- map(0x00707e, 0x00707e).w(m_spg_video, FUNC(gcm394_base_video_device::video_dma_unk_w)); // written around same time as DMA, seems to select alt sprite bank
+ map(0x00707e, 0x00707e).w(m_spg_video, FUNC(gcm394_base_video_device::video_707e_spritebank_w)); // written around same time as DMA, seems to select alt sprite bank
map(0x00707f, 0x00707f).rw(m_spg_video, FUNC(gcm394_base_video_device::video_707f_r), FUNC(gcm394_base_video_device::video_707f_w));
// another set of registers for something?
@@ -1445,6 +1466,7 @@ void sunplus_gcm394_base_device::device_reset()
{
m_dma_params[i][j] = 0x0000;
}
+ m_dma_latched[j] = false;
}
// 78xx unknown
diff --git a/src/devices/machine/generalplus_gpl16250soc.h b/src/devices/machine/generalplus_gpl16250soc.h
index aebcecaec9e..f5137a47bc0 100644
--- a/src/devices/machine/generalplus_gpl16250soc.h
+++ b/src/devices/machine/generalplus_gpl16250soc.h
@@ -83,10 +83,11 @@ public:
void set_cs_space(address_space* csspace) { m_cs_space = csspace; }
- void set_paldisplaybank_high_hack(int pal_displaybank_high) { m_spg_video->set_paldisplaybank_high(pal_displaybank_high); }
+ //void set_paldisplaybank_high_hack(int pal_displaybank_high) { m_spg_video->set_paldisplaybank_high(pal_displaybank_high); }
void set_alt_tile_addressing_hack(int alt_tile_addressing) { m_spg_video->set_alt_tile_addressing(alt_tile_addressing); }
- void set_pal_sprites_hack(int pal_sprites) { m_spg_video->set_pal_sprites(pal_sprites); }
- void set_pal_back_hack(int pal_back) { m_spg_video->set_pal_back(pal_back); }
+ //void set_pal_sprites_hack(int pal_sprites) { m_spg_video->set_pal_sprites(pal_sprites); }
+ //void set_pal_back_hack(int pal_back) { m_spg_video->set_pal_back(pal_back); }
+ void set_alt_extrasprite_hack(int alt_extrasprite_hack) { m_spg_video->set_alt_extrasprite(alt_extrasprite_hack); }
void set_romtype(int romtype) { m_romtype = romtype; }
@@ -119,6 +120,7 @@ protected:
devcb_write16 m_portd_out;
uint16_t m_dma_params[8][4];
+ bool m_dma_latched[4];
// unk 78xx
uint16_t m_7803;
@@ -130,7 +132,6 @@ protected:
uint16_t m_7816;
uint16_t m_7817;
-
uint16_t m_7819;
uint16_t m_782x[5];
diff --git a/src/devices/machine/generalplus_gpl16250soc_video.cpp b/src/devices/machine/generalplus_gpl16250soc_video.cpp
index c14462d19a6..96132e851fe 100644
--- a/src/devices/machine/generalplus_gpl16250soc_video.cpp
+++ b/src/devices/machine/generalplus_gpl16250soc_video.cpp
@@ -129,9 +129,10 @@ gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig
m_space_read_cb(*this),
m_rowscroll(*this, "^rowscroll"),
m_rowzoom(*this, "^rowzoom"),
- m_pal_displaybank_high(0),
- m_pal_sprites(0x500),
- m_pal_back(0x100),
+// m_pal_displaybank_high(0),
+// m_pal_sprites(0x100),
+// m_pal_back(0x000),
+ m_alt_extrasprite_hack(0),
m_alt_tile_addressing(0)
{
}
@@ -325,7 +326,7 @@ void gcm394_base_video_device::device_start()
save_item(NAME(m_page0_addr_msb));
save_item(NAME(m_page1_addr_lsb));
save_item(NAME(m_page1_addr_msb));
- save_item(NAME(m_707e_videodma_bank));
+ save_item(NAME(m_707e_spritebank));
save_item(NAME(m_videodma_size));
save_item(NAME(m_videodma_dest));
save_item(NAME(m_videodma_source));
@@ -366,7 +367,7 @@ void gcm394_base_video_device::device_start()
save_item(NAME(m_spriteextra));
save_item(NAME(m_paletteram));
save_item(NAME(m_maxgfxelement));
- save_item(NAME(m_pal_displaybank_high));
+// save_item(NAME(m_pal_displaybank_high));
save_item(NAME(m_alt_tile_addressing));
}
@@ -421,7 +422,7 @@ void gcm394_base_video_device::device_reset()
m_7087 = 0x0000;
m_7088 = 0x0000;
- m_707e_videodma_bank = 0x0000;
+ m_707e_spritebank = 0x0000;
m_videodma_size = 0x0000;
m_videodma_dest = 0x0000;
m_videodma_source = 0x0000;
@@ -506,28 +507,6 @@ void gcm394_base_video_device::draw(const rectangle &cliprect, uint32_t line, ui
int current_palette_offset = palette_offset;
-
- // for planes above 4bpp palette ends up being pulled from different places?
- if (nc_bpp < 6)
- {
- // 2bpp
- // 4bpp
- if (m_pal_displaybank_high) // how is this set?
- current_palette_offset |= 0x0800;
-
- }
- else if (nc_bpp < 8)
- {
- // 6bpp
- // current_palette_offset |= 0x0800;
-
- }
- else
- {
- //pen = machine().rand() & 0x1f;
- // 8bpp
- }
-
uint32_t pal = current_palette_offset + pen;
bits &= 0xffff;
@@ -564,7 +543,7 @@ void gcm394_base_video_device::draw(const rectangle &cliprect, uint32_t line, ui
}
}
-void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t bitmap_addr, uint16_t *regs, uint16_t *scroll)
+void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t bitmap_addr, uint16_t *regs, uint16_t *scroll, int which)
{
uint32_t xscroll = scroll[0];
uint32_t yscroll = scroll[1];
@@ -574,22 +553,48 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca
uint32_t palette_map = regs[3];
address_space &space = m_cpu->space(AS_PROGRAM);
- if (!(ctrl_reg & PAGE_ENABLE_MASK))
+ // attr_reg bits
+ // -Bzz pppp hhww ffbb
+ //
+ // B = blend
+ // zz = depth
+ // pppp = palette
+ // ff = flips
+ // bb = bpp
+ // hh = height
+ // ww = width
+
+ // ctrl_reg bits
+ // ---- ---B h--r ewRl
+ //
+ // e = enable
+ // l = bitmape/line mode
+ // r = rowscroll
+ // w = wallpaper mode
+ // R = regset mode
+ // h = high colour
+ // B = blend
+
+
+ if (!(ctrl_reg & 0x0008))
{
return;
}
- if (((attr_reg & PAGE_PRIORITY_FLAG_MASK) >> PAGE_PRIORITY_FLAG_SHIFT) != priority)
+ if (((attr_reg & 0x3000) >> 12) != priority)
{
return;
}
- if (ctrl_reg & 0x01) // bitmap mode jak_car2 and jak_s500 use for the ingame race sections, also have a bitmap test in test mode
+ if (ctrl_reg & 0x0001) // bitmap mode jak_car2 and jak_s500 use for the ingame race sections, also have a bitmap test in test mode
{
- if (ctrl_reg & 0x10)
- popmessage("bitmap mode %08x with rowscroll\n", bitmap_addr);
- else
- popmessage("bitmap mode %08x\n", bitmap_addr);
+ if (0)
+ {
+ if (ctrl_reg & 0x0010)
+ popmessage("bitmap mode %08x with rowscroll\n", bitmap_addr);
+ else
+ popmessage("bitmap mode %08x\n", bitmap_addr);
+ }
// note, in interlace modes it appears every other line is unused? (480 entry table, but with blank values)
// and furthermore the rowscroll and rowzoom tables only have 240 entries, not enough for every line
@@ -655,15 +660,15 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca
}
else
{
- uint32_t tile_h = 8 << ((attr_reg & PAGE_TILE_HEIGHT_MASK) >> PAGE_TILE_HEIGHT_SHIFT);
- uint32_t tile_w = 8 << ((attr_reg & PAGE_TILE_WIDTH_MASK) >> PAGE_TILE_WIDTH_SHIFT);
+ uint32_t tile_h = 8 << ((attr_reg & 0x00c0) >> 6);
+ uint32_t tile_w = 8 << ((attr_reg & 0x0030) >> 4);
int total_width;
int use_alt_drawmode = m_alt_tile_addressing;
int y_mask = 0;
// just a guess based on this being set on the higher resolution tilemaps we've seen, could be 100% incorrect register
- if ((attr_reg >> 14) & 0x2)
+ if ((attr_reg >> 15) & 0x1)
{
total_width = 1024;
y_mask = 0x1ff;
@@ -687,71 +692,99 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca
{
uint32_t yy = ((tile_h * y0 - yscroll + 0x10) & y_mask) - 0x10;
uint32_t xx = (tile_w * x0 - xscroll) & (total_width-1);
- uint32_t tile = (ctrl_reg & PAGE_WALLPAPER_MASK) ? space.read_word(tilemap) : space.read_word(tilemap + tile_address);
-
-
+ uint32_t tile = (ctrl_reg & 0x0004) ? space.read_word(tilemap) : space.read_word(tilemap + tile_address);
if (!tile)
continue;
-
- uint32_t tileattr = attr_reg;
- uint32_t tilectrl = ctrl_reg;
-
-
bool blend;
bool row_scroll;
bool flip_x;
uint32_t yflipmask;
uint32_t palette_offset;
- blend = (tileattr & 0x4000 || tilectrl & 0x0100);
- row_scroll = (tilectrl & 0x0010);
-
+ blend = (attr_reg & 0x4000 || ctrl_reg & 0x0100);
+ row_scroll = (ctrl_reg & 0x0010);
- if ((ctrl_reg & 2) == 0) // RegSet:0
+ if ((ctrl_reg & 0x0002) == 0) // RegSet:0
{
- uint16_t palette = (ctrl_reg & PAGE_WALLPAPER_MASK) ? space.read_word(palette_map) : space.read_word(palette_map + tile_address / 2);
+ uint16_t palette = (ctrl_reg & 0x0004) ? space.read_word(palette_map) : space.read_word(palette_map + tile_address / 2);
if (x0 & 1)
palette >>= 8;
- flip_x = palette & 0x0010;
- yflipmask = (palette & 0x0020) ? tile_h - 1 : 0;
- palette_offset = (palette & 0x0f) << 4;
+ // 'palette' format
+ // --ff pppp
+ //
+ // f = flip bits
+ // p = palette
- //tilectrl &= ~0x0100;
- //tilectrl |= (palette << 2) & 0x0100; // blend
+ flip_x = palette & 0x10;
+ yflipmask = (palette & 0x20) ? tile_h - 1 : 0;
+ palette_offset = (palette & 0x0f) << 4;
}
else // RegSet:1
{
if (m_alt_tile_addressing == 0)
{
// smartfp needs the attribute table to contain extra tile bits even if regset is 1
- uint16_t palette = (ctrl_reg & PAGE_WALLPAPER_MASK) ? space.read_word(palette_map) : space.read_word(palette_map + tile_address / 2);
+ uint16_t palette = (ctrl_reg & 0x0004) ? space.read_word(palette_map) : space.read_word(palette_map + tile_address / 2);
if (x0 & 1)
palette >>= 8;
+ // 'palette' format
+ // -- -ttt
+ //
+ // t = extra tile number bits
+
tile |= (palette & 0x0007) << 16;
+ }
- flip_x = (tileattr & TILE_X_FLIP);
- yflipmask = tileattr & TILE_Y_FLIP ? tile_h - 1 : 0;
- palette_offset = (tileattr & 0x0f00) >> 4;
+ flip_x = (attr_reg & 0x0004);
+ yflipmask = attr_reg & 0x0008 ? tile_h - 1 : 0;
+ palette_offset = (attr_reg & 0x0f00) >> 4;
+ }
- }
- else
+ const uint8_t bpp = attr_reg & 0x0003;
+
+ // HACKS
+ // There must be a select bit for the tilemap palettes somewhere, but where?!
+
+ // the different games in paccon also expect a variety of different configs here, maybe a good place to look
+
+ if (m_703a_palettebank & 1) // this actually seems to be the sprite palette bank enable, but for tkmag220 it gives us an easy way to ignore the logic below
+ {
+ if (which == 0) // tilemap 0
{
- flip_x = (tileattr & TILE_X_FLIP);
- yflipmask = tileattr & TILE_Y_FLIP ? tile_h - 1 : 0;
- palette_offset = (tileattr & 0x0f00) >> 4;
+ if (ctrl_reg & 0x0002) // RegSet:1
+ {
+ // smartfp has a conflict between the bootlogos and the first screen, it's in regset mode, no obvious difference in registers but needs palette from different places?
+ // not even m_707f changes here, which makes the m_707f case specific hacks for jak_s500 below very unlikely to actually be related
+ if ((bpp + 1) * 2 == 4)
+ if (m_alt_tile_addressing == 0)
+ palette_offset |= 0x200;
+ }
}
- }
+ if (which == 1)
+ {
+ // can't do this for jak_s500 logos
+ // jak_s500 also uses this tilemap in both 4 and 6bpp modes expecting the same palette base, so the hack used for smartfp on tilemap 0 is not applicable here
- //palette_offset |= 0x0900;
- palette_offset |= m_pal_back;
+ // m_707f != 0x2d3 for jak_S500 main menu
+ if ((m_707f != 0x53) && (m_707f != 0x63) && (m_707f != 0x2d3))
+ palette_offset |= 0x200;
+ }
- const uint8_t bpp = tileattr & 0x0003;
+ // jak_car2 screen transitions use layers 2 and 3 the same way, alternating each frame
+ if (which == 2)
+ {
+ // jak_s500 title screen + loading screen before race
+ if ((m_707f == 0x2d3) || (m_707f == 0x2db))
+ palette_offset |= 0x200;
+ }
+ }
+ //palette_offset |= m_pal_back;
if (blend)
{
@@ -829,26 +862,39 @@ void gcm394_base_video_device::draw_sprite(const rectangle& cliprect, uint32_t s
else
addressing_mode = 1;
- if (addressing_mode == 0) // smartfp, paccon
- tile |= m_spriteextra[base_addr / 4] << 16;
+ if (m_alt_extrasprite_hack == 0)
+ if (addressing_mode == 0) // smartfp, paccon
+ tile |= m_spriteextra[base_addr / 4] << 16;
- if (((attr & PAGE_PRIORITY_FLAG_MASK) >> PAGE_PRIORITY_FLAG_SHIFT) != priority)
+ if (m_alt_extrasprite_hack == 1) // jak_prft
+ tile |= (m_spriteextra[base_addr] & 0x000f) << 16;
+
+ if (((attr & 0x3000) >> 12) != priority)
{
return;
}
- const uint32_t h = 8 << ((attr & PAGE_TILE_HEIGHT_MASK) >> PAGE_TILE_HEIGHT_SHIFT);
- const uint32_t w = 8 << ((attr & PAGE_TILE_WIDTH_MASK) >> PAGE_TILE_WIDTH_SHIFT);
+ // attr PBzz pppp hhww ffdd
+
+ // P = high palette bit
+ // b = blend enable
+ // zz = priority
+ // pppp = palette
+ // hh = height
+ // ww = width
+ // ff = flips
+ // dd = depth
+ const uint32_t h = 8 << ((attr & 0x00c0) >> 6);
+ const uint32_t w = 8 << ((attr & 0x0030) >> 4);
- if (!(m_7042_sprite & SPRITE_COORD_TL_MASK))
+ if (!(m_7042_sprite & 0x0002))
{
x = ((screenwidth / 2) + x) - w / 2;
y = ((screenheight / 2) - y) - (h / 2) + 8;
}
-
x &= (x_max - 1);
y &= 0x01ff;
@@ -872,21 +918,34 @@ void gcm394_base_video_device::draw_sprite(const rectangle& cliprect, uint32_t s
// different attribute use?
if (screenwidth == 320)
{
- flip_x = (attr & TILE_X_FLIP);
+ if (m_alt_extrasprite_hack == 0)
+ {
+ flip_x = (attr & 0x0004);
+ yflipmask = attr & 0x0008 ? h - 1 : 0;
+ }
+ else
+ {
+ flip_x = 0;
+ yflipmask = 0;
+ }
+
bpp = attr & 0x0003;
- yflipmask = attr & TILE_Y_FLIP ? h - 1 : 0;
palette_offset = (attr & 0x0f00) >> 4;
}
else
{
flip_x = 0;// (attr & TILE_X_FLIP);
- bpp = attr & 0x0003;
yflipmask = 0;// attr& TILE_Y_FLIP ? h - 1 : 0;
+
+ bpp = attr & 0x0003;
palette_offset = (attr & 0x0f00) >> 4;
}
- //palette_offset |= 0x0d00;
- palette_offset |= m_pal_sprites;
+ if (m_703a_palettebank & 1)
+ palette_offset |= 0x100;
+
+ if (attr & 0x8000)
+ palette_offset |= 0x200;
if (blend)
{
@@ -927,6 +986,39 @@ uint32_t gcm394_base_video_device::screen_update(screen_device &screen, bitmap_r
// jak_s500 briely sets pen 0 of the layer to magenta, but then ends up erasing it
+ if (0)
+ {
+ uint16_t attr0 = m_tmap0_regs[0];
+ uint16_t attr1 = m_tmap1_regs[0];
+ uint16_t attr2 = m_tmap2_regs[0];
+ uint16_t attr3 = m_tmap3_regs[0];
+ uint16_t ctrl0 = m_tmap0_regs[1];
+ uint16_t ctrl1 = m_tmap1_regs[1];
+ uint16_t ctrl2 = m_tmap2_regs[1];
+ uint16_t ctrl3 = m_tmap3_regs[1];
+
+ popmessage(
+ "p0ctrl u:%02x Bl:%d HC:%d u:%d u:%d RS:%d E:%d WP:%d Rg:%d Bm:%d\n"
+ "p1ctrl u:%02x Bl:%d HC:%d u:%d u:%d RS:%d E:%d WP:%d Rg:%d Bm:%d\n"
+ "p2ctrl u:%02x Bl:%d HC:%d u:%d u:%d RS:%d E:%d WP:%d Rg:%d Bm:%d\n"
+ "p3ctrl u:%02x Bl:%d HC:%d u:%d u:%d RS:%d E:%d WP:%d Rg:%d Bm:%d\n"
+ "p0attr u:%01x Z:%d P:%d V:%d H:%d FY:%d FX:%d D:%d\n"
+ "p1attr u:%01x Z:%d P:%d V:%d H:%d FY:%d FX:%d D:%d\n"
+ "p2attr u:%01x Z:%d P:%d V:%d H:%d FY:%d FX:%d D:%d\n"
+ "p3attr u:%01x Z:%d P:%d V:%d H:%d FY:%d FX:%d D:%d\n"
+ "palbank %04x 707e: %04x 707f: %04x\n",
+ (ctrl0 & 0xfe00) >> 9, BIT(ctrl0, 8), BIT(ctrl0, 7), BIT(ctrl0, 6), BIT(ctrl0, 5), BIT(ctrl0, 4), BIT(ctrl0, 3), BIT(ctrl0, 2), BIT(ctrl0, 1), BIT(ctrl0, 0),
+ (ctrl1 & 0xfe00) >> 9, BIT(ctrl1, 8), BIT(ctrl1, 7), BIT(ctrl1, 6), BIT(ctrl1, 5), BIT(ctrl1, 4), BIT(ctrl1, 3), BIT(ctrl1, 2), BIT(ctrl1, 1), BIT(ctrl1, 0),
+ (ctrl2 & 0xfe00) >> 9, BIT(ctrl2, 8), BIT(ctrl2, 7), BIT(ctrl2, 6), BIT(ctrl2, 5), BIT(ctrl2, 4), BIT(ctrl2, 3), BIT(ctrl2, 2), BIT(ctrl2, 1), BIT(ctrl2, 0),
+ (ctrl3 & 0xfe00) >> 9, BIT(ctrl3, 8), BIT(ctrl3, 7), BIT(ctrl3, 6), BIT(ctrl3, 5), BIT(ctrl3, 4), BIT(ctrl3, 3), BIT(ctrl3, 2), BIT(ctrl3, 1), BIT(ctrl3, 0),
+ (attr0 & 0xc000) >> 14, (attr0 >> 12) & 3, (attr0 >> 8) & 15, 8 << ((attr0 >> 6) & 3), 8 << ((attr0 >> 4) & 3), BIT(attr0, 3), BIT(attr0, 2), 2 * ((attr0 & 3) + 1),
+ (attr1 & 0xc000) >> 14, (attr1 >> 12) & 3, (attr1 >> 8) & 15, 8 << ((attr1 >> 6) & 3), 8 << ((attr1 >> 4) & 3), BIT(attr1, 3), BIT(attr1, 2), 2 * ((attr1 & 3) + 1),
+ (attr2 & 0xc000) >> 14, (attr2 >> 12) & 3, (attr2 >> 8) & 15, 8 << ((attr2 >> 6) & 3), 8 << ((attr2 >> 4) & 3), BIT(attr2, 3), BIT(attr2, 2), 2 * ((attr2 & 3) + 1),
+ (attr3 & 0xc000) >> 14, (attr3 >> 12) & 3, (attr3 >> 8) & 15, 8 << ((attr3 >> 6) & 3), 8 << ((attr3 >> 4) & 3), BIT(attr3, 3), BIT(attr3, 2), 2 * ((attr3 & 3) + 1),
+ m_703a_palettebank, m_707e_spritebank, m_707f
+ );
+ }
+
//const uint16_t bgcol = 0x7c1f; // magenta
const uint16_t bgcol = 0x0000; // black
@@ -955,10 +1047,10 @@ uint32_t gcm394_base_video_device::screen_update(screen_device &screen, bitmap_r
if (1)
{
- if ((!(machine().input().code_pressed(KEYCODE_Q))) || draw_all) draw_page(cliprect, scanline, i, (m_page0_addr_lsb | (m_page0_addr_msb<<16)), m_tmap0_regs, m_tmap0_scroll);
- if ((!(machine().input().code_pressed(KEYCODE_W))) || draw_all) draw_page(cliprect, scanline, i, (m_page1_addr_lsb | (m_page1_addr_msb<<16)), m_tmap1_regs, m_tmap1_scroll);
- if ((!(machine().input().code_pressed(KEYCODE_E))) || draw_all) draw_page(cliprect, scanline, i, (m_page2_addr_lsb | (m_page2_addr_msb<<16)), m_tmap2_regs, m_tmap2_scroll);
- if ((!(machine().input().code_pressed(KEYCODE_R))) || draw_all) draw_page(cliprect, scanline, i, (m_page3_addr_lsb | (m_page3_addr_msb<<16)), m_tmap3_regs, m_tmap3_scroll);
+ if ((!(machine().input().code_pressed(KEYCODE_Q))) || draw_all) draw_page(cliprect, scanline, i, (m_page0_addr_lsb | (m_page0_addr_msb<<16)), m_tmap0_regs, m_tmap0_scroll, 0);
+ if ((!(machine().input().code_pressed(KEYCODE_W))) || draw_all) draw_page(cliprect, scanline, i, (m_page1_addr_lsb | (m_page1_addr_msb<<16)), m_tmap1_regs, m_tmap1_scroll, 1);
+ if ((!(machine().input().code_pressed(KEYCODE_E))) || draw_all) draw_page(cliprect, scanline, i, (m_page2_addr_lsb | (m_page2_addr_msb<<16)), m_tmap2_regs, m_tmap2_scroll, 2);
+ if ((!(machine().input().code_pressed(KEYCODE_R))) || draw_all) draw_page(cliprect, scanline, i, (m_page3_addr_lsb | (m_page3_addr_msb<<16)), m_tmap3_regs, m_tmap3_scroll, 3);
}
if ((!(machine().input().code_pressed(KEYCODE_T))) || draw_all) draw_sprites(cliprect, scanline, i);
@@ -1327,7 +1419,7 @@ WRITE16_MEMBER(gcm394_base_video_device::video_dma_size_trigger_w)
LOGMASKED(LOG_GCM394_VIDEO_DMA, "%s:gcm394_base_video_device::video_dma_size_trigger_w %04x\n", machine().describe_context(), data);
m_videodma_size = data;
- LOGMASKED(LOG_GCM394_VIDEO_DMA, "%s: doing sprite / video DMA source %04x dest %04x size %04x value of 707e (bank) %04x value of 707f %04x\n", machine().describe_context(), m_videodma_source, m_videodma_dest, m_videodma_size, m_707e_videodma_bank, m_707f );
+ LOGMASKED(LOG_GCM394_VIDEO_DMA, "%s: doing sprite / video DMA source %04x dest %04x size %04x value of 707e (bank) %04x value of 707f %04x\n", machine().describe_context(), m_videodma_source, m_videodma_dest, m_videodma_size, m_707e_spritebank, m_707f );
for (int i = 0; i <= m_videodma_size; i++)
{
@@ -1347,10 +1439,10 @@ WRITE16_MEMBER(gcm394_base_video_device::video_dma_size_trigger_w)
}
}
-WRITE16_MEMBER(gcm394_base_video_device::video_dma_unk_w)
+WRITE16_MEMBER(gcm394_base_video_device::video_707e_spritebank_w)
{
- LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_dma_unk_w %04x\n", machine().describe_context(), data);
- m_707e_videodma_bank = data;
+ LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_707e_spritebank_w %04x\n", machine().describe_context(), data);
+ m_707e_spritebank = data;
}
READ16_MEMBER(gcm394_base_video_device::video_707c_r)
@@ -1420,6 +1512,10 @@ WRITE16_MEMBER(gcm394_base_video_device::video_703a_palettebank_w)
// lazertag uses 2 banks (0 and 8)
// tkmag220 only uses 1 bank (0)
+ // ---- bb-s
+ // bb = write bank?
+ // s = sprite palette bank select?
+
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_703a_palettebank_w %04x\n", machine().describe_context(), data);
m_703a_palettebank = data;
}
@@ -1565,33 +1661,33 @@ WRITE16_MEMBER(gcm394_base_video_device::spriteram_w)
// however for 707e only 0/1 is written, and it also gets written before system DMA, so despite being in the video DMA
// region seems to operate separate from that.
- if (m_707e_videodma_bank == 0x0000)
+ if (m_707e_spritebank == 0x0000)
{
m_spriteram[offset] = data;
}
- else if (m_707e_videodma_bank == 0x0001)
+ else if (m_707e_spritebank == 0x0001)
{
m_spriteextra[offset] = data;
}
else
{
- LOGMASKED(LOG_GCM394_VIDEO, "%s: spriteram_w %04x %04x unknown bank %04x\n", machine().describe_context(), offset, data, m_707e_videodma_bank);
+ LOGMASKED(LOG_GCM394_VIDEO, "%s: spriteram_w %04x %04x unknown bank %04x\n", machine().describe_context(), offset, data, m_707e_spritebank);
}
}
READ16_MEMBER(gcm394_base_video_device::spriteram_r)
{
- if (m_707e_videodma_bank == 0x0000)
+ if (m_707e_spritebank == 0x0000)
{
return m_spriteram[offset];
}
- else if (m_707e_videodma_bank == 0x0001)
+ else if (m_707e_spritebank == 0x0001)
{
return m_spriteextra[offset];
}
else
{
- LOGMASKED(LOG_GCM394_VIDEO, "%s: spriteram_r %04x unknown bank %04x\n", machine().describe_context(), offset, m_707e_videodma_bank);
+ LOGMASKED(LOG_GCM394_VIDEO, "%s: spriteram_r %04x unknown bank %04x\n", machine().describe_context(), offset, m_707e_spritebank);
return 0x0000;
}
}
@@ -1606,8 +1702,7 @@ WRITE16_MEMBER(gcm394_base_video_device::palette_w)
}
else
{
- offset |= (m_703a_palettebank & 0x000f) << 8;
-
+ offset |= (m_703a_palettebank & 0x000c) << 6;
m_paletteram[offset] = data;
uint32_t pal = m_rgb555_to_rgb888[data & 0x7fff];
@@ -1627,7 +1722,7 @@ READ16_MEMBER(gcm394_base_video_device::palette_r)
}
else
{
- offset |= (m_703a_palettebank & 0x000f) << 8;
+ offset |= (m_703a_palettebank & 0x000c) << 6;
return m_paletteram[offset];
}
}
@@ -1666,7 +1761,9 @@ WRITE_LINE_MEMBER(gcm394_base_video_device::vblank)
if (m_video_irq_enable & 1)
{
- m_video_irq_status |= 1;
+ // jak_prft expects 0x800 to be set in the status register or most of the main vblank code is skipped, why?
+
+ m_video_irq_status |= 1 | 0x800;
LOGMASKED(LOG_GCM394_VIDEO, "Setting video IRQ status to %04x\n", m_video_irq_status);
check_video_irq();
}
diff --git a/src/devices/machine/generalplus_gpl16250soc_video.h b/src/devices/machine/generalplus_gpl16250soc_video.h
index 5a4e73116a5..63cc100c2f6 100644
--- a/src/devices/machine/generalplus_gpl16250soc_video.h
+++ b/src/devices/machine/generalplus_gpl16250soc_video.h
@@ -30,10 +30,13 @@ public:
void write_tmap_regs(int tmap, uint16_t* regs, int offset, uint16_t data);
- void set_paldisplaybank_high(int pal_displaybank_high) { m_pal_displaybank_high = pal_displaybank_high; }
+ //void set_paldisplaybank_high(int pal_displaybank_high) { m_pal_displaybank_high = pal_displaybank_high; }
void set_alt_tile_addressing(int alt_tile_addressing) { m_alt_tile_addressing = alt_tile_addressing; }
- void set_pal_sprites(int pal_sprites) { m_pal_sprites = pal_sprites; }
- void set_pal_back(int pal_back) { m_pal_back = pal_back; }
+ void set_alt_extrasprite(int alt_extrasprite_hack) { m_alt_extrasprite_hack = alt_extrasprite_hack; }
+
+
+ //void set_pal_sprites(int pal_sprites) { m_pal_sprites = pal_sprites; }
+ //void set_pal_back(int pal_back) { m_pal_back = pal_back; }
DECLARE_READ16_MEMBER(tmap0_regs_r);
DECLARE_WRITE16_MEMBER(tmap0_regs_w);
@@ -79,7 +82,7 @@ public:
DECLARE_WRITE16_MEMBER(video_dma_dest_w);
DECLARE_READ16_MEMBER(video_dma_size_busy_r);
DECLARE_WRITE16_MEMBER(video_dma_size_trigger_w);
- DECLARE_WRITE16_MEMBER(video_dma_unk_w);
+ DECLARE_WRITE16_MEMBER(video_707e_spritebank_w);
DECLARE_READ16_MEMBER(video_703a_palettebank_r);
DECLARE_WRITE16_MEMBER(video_703a_palettebank_w);
@@ -134,24 +137,6 @@ public:
protected:
- enum
- {
- PAGE_ENABLE_MASK = 0x0008,
- PAGE_WALLPAPER_MASK = 0x0004,
-
- SPRITE_ENABLE_MASK = 0x0001,
- SPRITE_COORD_TL_MASK = 0x0002,
-
- PAGE_PRIORITY_FLAG_MASK = 0x3000,
- PAGE_PRIORITY_FLAG_SHIFT = 12,
- PAGE_TILE_HEIGHT_MASK = 0x00c0,
- PAGE_TILE_HEIGHT_SHIFT = 6,
- PAGE_TILE_WIDTH_MASK = 0x0030,
- PAGE_TILE_WIDTH_SHIFT = 4,
- TILE_X_FLIP = 0x0004,
- TILE_Y_FLIP = 0x0008
- };
-
static const device_timer_id TIMER_SCREENPOS = 2;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -181,7 +166,7 @@ protected:
template<blend_enable_t Blend, rowscroll_enable_t RowScroll, flipx_t FlipX>
void draw(const rectangle &cliprect, uint32_t line, uint32_t xoff, uint32_t yoff, uint32_t bitmap_addr, uint32_t tile, int32_t h, int32_t w, uint8_t bpp, uint32_t yflipmask, uint32_t palette_offset, int addressing_mode);
- void draw_page(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t bitmap_addr, uint16_t *regs, uint16_t *scroll);
+ void draw_page(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t bitmap_addr, uint16_t *regs, uint16_t *scroll, int which);
void draw_sprites(const rectangle& cliprect, uint32_t scanline, int priority);
void draw_sprite(const rectangle& cliprect, uint32_t scanline, int priority, uint32_t base_addr);
@@ -199,7 +184,7 @@ protected:
uint16_t m_page1_addr_lsb;
uint16_t m_page1_addr_msb;
- uint16_t m_707e_videodma_bank;
+ uint16_t m_707e_spritebank;
uint16_t m_videodma_size;
uint16_t m_videodma_dest;
uint16_t m_videodma_source;
@@ -270,10 +255,12 @@ protected:
int m_maxgfxelement;
void decodegfx(const char* tag);
- int m_pal_displaybank_high;
- int m_pal_sprites;
- int m_pal_back;
+ //int m_pal_displaybank_high;
+ //int m_pal_sprites;
+ //int m_pal_back;
+ int m_alt_extrasprite_hack;
int m_alt_tile_addressing;
+
};
class gcm394_video_device : public gcm394_base_video_device
diff --git a/src/devices/machine/phi.cpp b/src/devices/machine/phi.cpp
index 5c1028c01c1..c131f2f3191 100644
--- a/src/devices/machine/phi.cpp
+++ b/src/devices/machine/phi.cpp
@@ -266,12 +266,12 @@ void phi_device::set_ext_signal(phi_488_signal_t signal , int state)
}
}
-WRITE16_MEMBER(phi_device::reg16_w)
+void phi_device::reg16_w(offs_t offset, uint16_t data)
{
int_reg_w(offset , data & REG_ALL_MASK);
}
-READ16_MEMBER(phi_device::reg16_r)
+uint16_t phi_device::reg16_r(offs_t offset)
{
uint16_t res;
@@ -334,14 +334,14 @@ READ16_MEMBER(phi_device::reg16_r)
return res;
}
-WRITE8_MEMBER(phi_device::reg8_w)
+void phi_device::reg8_w(offs_t offset, uint8_t data)
{
int_reg_w(offset , data);
}
-READ8_MEMBER(phi_device::reg8_r)
+uint8_t phi_device::reg8_r(offs_t offset)
{
- return (uint8_t)reg16_r(space , offset , mem_mask);
+ return (uint8_t)reg16_r(offset);
}
void phi_device::device_start()
diff --git a/src/devices/machine/phi.h b/src/devices/machine/phi.h
index dc3d0d76fd2..755f073a2d9 100644
--- a/src/devices/machine/phi.h
+++ b/src/devices/machine/phi.h
@@ -84,10 +84,10 @@ public:
// 2 13
// 1 14
// 0 15
- DECLARE_WRITE16_MEMBER(reg16_w);
- DECLARE_READ16_MEMBER(reg16_r);
- DECLARE_WRITE8_MEMBER(reg8_w);
- DECLARE_READ8_MEMBER(reg8_r);
+ void reg16_w(offs_t offset, uint16_t data);
+ uint16_t reg16_r(offs_t offset);
+ void reg8_w(offs_t offset, uint8_t data);
+ uint8_t reg8_r(offs_t offset);
protected:
phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/machine/s3c2400.cpp b/src/devices/machine/s3c2400.cpp
index 00fbd49c2c5..ef779fb47c1 100644
--- a/src/devices/machine/s3c2400.cpp
+++ b/src/devices/machine/s3c2400.cpp
@@ -218,7 +218,7 @@ void s3c2400_device::device_start()
space.install_readwrite_handler(0x14600040, 0x1460005b, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_dma_2_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_dma_2_w)));
space.install_readwrite_handler(0x14600060, 0x1460007b, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_dma_3_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_dma_3_w)));
space.install_readwrite_handler(0x14800000, 0x14800017, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_clkpow_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_clkpow_w)));
- space.install_readwrite_handler(0x14a00000, 0x14a003ff, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_lcd_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_lcd_w)));
+ space.install_readwrite_handler(0x14a00000, 0x14a003ff, read32s_delegate(*this, FUNC(s3c2400_device::s3c24xx_lcd_r)), write32s_delegate(*this, FUNC(s3c2400_device::s3c24xx_lcd_w)));
space.install_readwrite_handler(0x14a00400, 0x14a007ff, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_lcd_palette_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_lcd_palette_w)));
space.install_readwrite_handler(0x15000000, 0x1500002b, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_uart_0_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_uart_0_w)));
space.install_readwrite_handler(0x15004000, 0x1500402b, read32_delegate(*this, FUNC(s3c2400_device::s3c24xx_uart_1_r)), write32_delegate(*this, FUNC(s3c2400_device::s3c24xx_uart_1_w)));
diff --git a/src/devices/machine/s3c2400.h b/src/devices/machine/s3c2400.h
index 6c5bdf4d40f..969356dd0a4 100644
--- a/src/devices/machine/s3c2400.h
+++ b/src/devices/machine/s3c2400.h
@@ -172,14 +172,14 @@ protected:
void s3c24xx_video_start();
void bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bitmap_src_1, bitmap_rgb32 &bitmap_src_2);
uint32_t s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- READ32_MEMBER( s3c24xx_lcd_r );
+ uint32_t s3c24xx_lcd_r(offs_t offset, uint32_t mem_mask = ~0);
int s3c24xx_lcd_configure_tft();
int s3c24xx_lcd_configure_stn();
int s3c24xx_lcd_configure();
void s3c24xx_lcd_start();
void s3c24xx_lcd_stop();
void s3c24xx_lcd_recalc();
- WRITE32_MEMBER( s3c24xx_lcd_w );
+ void s3c24xx_lcd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
READ32_MEMBER( s3c24xx_lcd_palette_r );
WRITE32_MEMBER( s3c24xx_lcd_palette_w );
void s3c24xx_clkpow_reset();
diff --git a/src/devices/machine/s3c2410.cpp b/src/devices/machine/s3c2410.cpp
index 4c5f102123e..0922ec6b192 100644
--- a/src/devices/machine/s3c2410.cpp
+++ b/src/devices/machine/s3c2410.cpp
@@ -280,7 +280,7 @@ void s3c2410_device::device_start()
space.install_readwrite_handler( 0x4b000080, 0x4b0000a3, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_dma_2_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_dma_2_w)));
space.install_readwrite_handler( 0x4b0000c0, 0x4b0000e3, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_dma_3_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_dma_3_w)));
space.install_readwrite_handler( 0x4c000000, 0x4c000017, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_clkpow_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_clkpow_w)));
- space.install_readwrite_handler( 0x4d000000, 0x4d000063, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_lcd_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_lcd_w)));
+ space.install_readwrite_handler( 0x4d000000, 0x4d000063, read32s_delegate(*this, FUNC(s3c2410_device::s3c24xx_lcd_r)), write32s_delegate(*this, FUNC(s3c2410_device::s3c24xx_lcd_w)));
space.install_readwrite_handler( 0x4d000400, 0x4d0007ff, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_lcd_palette_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_lcd_palette_w)));
space.install_readwrite_handler( 0x4e000000, 0x4e000017, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_nand_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_nand_w)));
space.install_readwrite_handler( 0x50000000, 0x5000002b, read32_delegate(*this, FUNC(s3c2410_device::s3c24xx_uart_0_r)), write32_delegate(*this, FUNC(s3c2410_device::s3c24xx_uart_0_w)));
diff --git a/src/devices/machine/s3c2410.h b/src/devices/machine/s3c2410.h
index 9c270d5802f..52474fcbd79 100644
--- a/src/devices/machine/s3c2410.h
+++ b/src/devices/machine/s3c2410.h
@@ -157,7 +157,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( frnb_w );
- READ32_MEMBER( s3c24xx_lcd_r );
+ uint32_t s3c24xx_lcd_r(offs_t offset, uint32_t mem_mask = ~0);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -207,7 +207,7 @@ protected:
void s3c24xx_lcd_start();
void s3c24xx_lcd_stop();
void s3c24xx_lcd_recalc();
- WRITE32_MEMBER( s3c24xx_lcd_w );
+ void s3c24xx_lcd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
READ32_MEMBER( s3c24xx_lcd_palette_r );
WRITE32_MEMBER( s3c24xx_lcd_palette_w );
void s3c24xx_clkpow_reset();
diff --git a/src/devices/machine/s3c2440.cpp b/src/devices/machine/s3c2440.cpp
index d20b8f9688b..4da695d6d38 100644
--- a/src/devices/machine/s3c2440.cpp
+++ b/src/devices/machine/s3c2440.cpp
@@ -295,7 +295,7 @@ void s3c2440_device::device_start()
space.install_readwrite_handler(0x4b000080, 0x4b0000a3, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_dma_2_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_dma_2_w)));
space.install_readwrite_handler(0x4b0000c0, 0x4b0000e3, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_dma_3_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_dma_3_w)));
space.install_readwrite_handler(0x4c000000, 0x4c00001b, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_clkpow_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_clkpow_w)));
- space.install_readwrite_handler(0x4d000000, 0x4d000063, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_lcd_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_lcd_w)));
+ space.install_readwrite_handler(0x4d000000, 0x4d000063, read32s_delegate(*this, FUNC(s3c2440_device::s3c24xx_lcd_r)), write32s_delegate(*this, FUNC(s3c2440_device::s3c24xx_lcd_w)));
space.install_readwrite_handler(0x4d000400, 0x4d0007ff, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_lcd_palette_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_lcd_palette_w)));
space.install_readwrite_handler(0x4e000000, 0x4e00003f, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_nand_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_nand_w)));
space.install_readwrite_handler(0x4f000000, 0x4f0000a3, read32_delegate(*this, FUNC(s3c2440_device::s3c24xx_cam_r)), write32_delegate(*this, FUNC(s3c2440_device::s3c24xx_cam_w)));
diff --git a/src/devices/machine/s3c2440.h b/src/devices/machine/s3c2440.h
index 9c3cfa9c337..062bf50f7a6 100644
--- a/src/devices/machine/s3c2440.h
+++ b/src/devices/machine/s3c2440.h
@@ -220,14 +220,14 @@ protected:
void s3c24xx_video_start();
void bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bitmap_src_1, bitmap_rgb32 &bitmap_src_2);
uint32_t s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- READ32_MEMBER( s3c24xx_lcd_r );
+ uint32_t s3c24xx_lcd_r(offs_t offset, uint32_t mem_mask = ~0);
int s3c24xx_lcd_configure_tft();
int s3c24xx_lcd_configure_stn();
int s3c24xx_lcd_configure();
void s3c24xx_lcd_start();
void s3c24xx_lcd_stop();
void s3c24xx_lcd_recalc();
- WRITE32_MEMBER( s3c24xx_lcd_w );
+ void s3c24xx_lcd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
READ32_MEMBER( s3c24xx_lcd_palette_r );
WRITE32_MEMBER( s3c24xx_lcd_palette_w );
void s3c24xx_clkpow_reset();
diff --git a/src/devices/machine/s3c24xx.hxx b/src/devices/machine/s3c24xx.hxx
index 707daa62318..61abe85789e 100644
--- a/src/devices/machine/s3c24xx.hxx
+++ b/src/devices/machine/s3c24xx.hxx
@@ -791,7 +791,7 @@ uint32_t S3C24_CLASS_NAME::s3c24xx_video_update(screen_device &screen, bitmap_rg
}
-READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_r )
+uint32_t S3C24_CLASS_NAME::s3c24xx_lcd_r(offs_t offset, uint32_t mem_mask)
{
uint32_t data = ((uint32_t*)&m_lcd.regs)[offset];
switch (offset)
@@ -953,7 +953,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_recalc()
}
}
-WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_w )
+void S3C24_CLASS_NAME::s3c24xx_lcd_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
uint32_t old_value = ((uint32_t*)&m_lcd.regs)[offset];
LOGMASKED(LOG_LCD_REGS, "%s: lcd write: %08X = %08X & %08x\n", machine().describe_context(), S3C24XX_BASE_LCD + (offset << 2), data, mem_mask);
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 7767a03846f..03b8b0a74a9 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -2018,6 +2018,14 @@ set(address_space *space, std::pair<void *, void *> rw)
});
m_root_read = (handler_entry_read <Width, AddrShift, Endian> *)(rw.first);
m_root_write = (handler_entry_write<Width, AddrShift, Endian> *)(rw.second);
+
+ // Protect against a wandering memset
+ m_addrstart_r = 1;
+ m_addrend_r = 0;
+ m_cache_r = nullptr;
+ m_addrstart_w = 1;
+ m_addrend_w = 0;
+ m_cache_w = nullptr;
}
template<int Width, int AddrShift, endianness_t Endian>
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 993a3eeb428..46617e18f18 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -1699,6 +1699,7 @@ void lua_engine::initialize()
* device.spaces[] - device address spaces table (k=name, v=addr_space)
* device.state[] - device state entries table (k=name, v=device_state_entry)
* device.items[] - device save state items table (k=name, v=index)
+ * device.roms[] - device rom entry table (k=name, v=rom_entry)
*/
auto device_type = sol().registry().create_simple_usertype<device_t>("new", sol::no_constructor);
@@ -1754,6 +1755,13 @@ void lua_engine::initialize()
}
return table;
}));
+ device_type.set("roms", sol::property([this](device_t &dev) {
+ sol::table table = sol().create_table();
+ for(auto rom : dev.rom_region_vector())
+ if(!rom.name().empty())
+ table[rom.name()] = rom;
+ return table;
+ }));
sol().registry().set_usertype("device", device_type);
@@ -2764,6 +2772,26 @@ void lua_engine::initialize()
sol().registry().set_usertype("dev_space", dev_space_type);
+/* rom_entry library
+ *
+ * manager:machine().devices[device_tag].roms[rom]
+ *
+ * rom:name()
+ * rom:hashdata() - see hash.h
+ * rom:offset()
+ * rom:length()
+ * rom:flags() - see romentry.h
+ */
+
+ auto rom_entry_type = sol().registry().create_simple_usertype<rom_entry>("new", sol::no_constructor);
+ rom_entry_type.set("name", &rom_entry::name);
+ rom_entry_type.set("hashdata", &rom_entry::hashdata);
+ rom_entry_type.set("offset", &rom_entry::get_offset);
+ rom_entry_type.set("length", &rom_entry::get_length);
+ rom_entry_type.set("flags", &rom_entry::get_flags);
+ sol().registry().set_usertype("rom_entry", rom_entry_type);
+
+
/* memory_manager library
*
* manager:machine():memory()
diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp
index 260c0f22578..edb5bb822f0 100644
--- a/src/mame/drivers/applix.cpp
+++ b/src/mame/drivers/applix.cpp
@@ -107,54 +107,52 @@ public:
void init_applix();
-protected:
+private:
virtual void machine_reset() override;
virtual void video_start() override;
-
-private:
- uint8_t applix_inputs_r();
- void palette_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- void analog_latch_w(uint16_t data);
- void dac_latch_w(uint16_t data);
- void video_latch_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- uint8_t applix_pb_r();
- void applix_pa_w(uint8_t data);
- void applix_pb_w(uint8_t data);
+ u8 applix_inputs_r();
+ void palette_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ void analog_latch_w(u16 data);
+ void dac_latch_w(u16 data);
+ void video_latch_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ u8 applix_pb_r();
+ void applix_pa_w(u8 data);
+ void applix_pb_w(u8 data);
DECLARE_WRITE_LINE_MEMBER(vsync_w);
- uint8_t port00_r();
- uint8_t port08_r();
- uint8_t port10_r();
- uint8_t port18_r();
- uint8_t port20_r();
- uint8_t port60_r();
- void port08_w(uint8_t data);
- void port10_w(uint8_t data);
- void port18_w(offs_t offset, uint8_t data);
- void port20_w(uint8_t data);
- void port60_w(uint8_t data);
- uint16_t fdc_data_r();
- uint16_t fdc_stat_r(offs_t offset);
- void fdc_data_w(uint16_t data);
- void fdc_cmd_w(uint16_t data);
+ u8 port00_r();
+ u8 port08_r();
+ u8 port10_r();
+ u8 port18_r();
+ u8 port20_r();
+ u8 port60_r();
+ void port08_w(u8 data);
+ void port10_w(u8 data);
+ void port18_w(offs_t offset, u8 data);
+ void port20_w(u8 data);
+ void port60_w(u8 data);
+ u16 fdc_data_r();
+ u16 fdc_stat_r(offs_t offset);
+ void fdc_data_w(u16 data);
+ void fdc_cmd_w(u16 data);
DECLARE_FLOPPY_FORMATS(floppy_formats);
- uint8_t internal_data_read(offs_t offset);
- void internal_data_write(offs_t offset, uint8_t data);
- uint8_t p1_read();
- void p1_write(uint8_t data);
- uint8_t p2_read();
- void p2_write(uint8_t data);
- uint8_t p3_read();
- void p3_write(uint8_t data);
+ u8 internal_data_read(offs_t offset);
+ void internal_data_write(offs_t offset, u8 data);
+ u8 p1_read();
+ void p1_write(u8 data);
+ u8 p2_read();
+ void p2_write(u8 data);
+ u8 p3_read();
+ void p3_write(u8 data);
TIMER_DEVICE_CALLBACK_MEMBER(cass_timer);
MC6845_UPDATE_ROW(crtc_update_row);
MC6845_BEGIN_UPDATE(crtc_update_border);
void applix_palette(palette_device &palette) const;
- uint8_t m_video_latch;
- uint8_t m_pa;
- uint8_t m_palette_latch[4];
- required_shared_ptr<uint16_t> m_base;
+ u8 m_video_latch;
+ u8 m_pa;
+ u8 m_palette_latch[4];
+ required_shared_ptr<u16> m_base;
void applix_mem(address_map &map);
void keytronic_pc3270_io(address_map &map);
@@ -162,24 +160,24 @@ private:
void subcpu_io(address_map &map);
void subcpu_mem(address_map &map);
- uint8_t m_pb;
- uint8_t m_analog_latch;
- uint8_t m_dac_latch;
- uint8_t m_port08;
- uint8_t m_data_to_fdc;
- uint8_t m_data_from_fdc;
+ u8 m_pb;
+ u8 m_analog_latch;
+ u8 m_dac_latch;
+ u8 m_port08;
+ u8 m_data_to_fdc;
+ u8 m_data_from_fdc;
bool m_data;
bool m_data_or_cmd;
bool m_buffer_empty;
bool m_fdc_cmd;
- uint8_t m_clock_count;
+ u8 m_clock_count;
bool m_cp;
- uint8_t m_p1;
- uint8_t m_p1_data;
- uint8_t m_p2;
- uint8_t m_p3;
- uint16_t m_last_write_addr;
- uint8_t m_cass_data[4];
+ u8 m_p1;
+ u8 m_p1_data;
+ u8 m_p2;
+ u8 m_p3;
+ u16 m_last_write_addr;
+ u8 m_cass_data[4];
required_device<cpu_device> m_maincpu;
required_device<mc6845_device> m_crtc;
required_device<via6522_device> m_via;
@@ -215,7 +213,7 @@ private:
required_ioport m_io_k3a0;
required_ioport m_io_k3b0;
required_ioport m_io_k0b;
- required_shared_ptr<uint16_t> m_expansion;
+ required_shared_ptr<u16> m_expansion;
required_device<palette_device> m_palette;
};
@@ -226,7 +224,7 @@ d3 = cassette LED, low=on
d4,5,6 = audio select
d7 = cassette relay, low=on
*/
-void applix_state::analog_latch_w(uint16_t data)
+void applix_state::analog_latch_w(u16 data)
{
data &= 0xff;
if (data != m_analog_latch)
@@ -238,7 +236,7 @@ void applix_state::analog_latch_w(uint16_t data)
}
}
-void applix_state::dac_latch_w(uint16_t data)
+void applix_state::dac_latch_w(u16 data)
{
data &= 0xff;
m_dac_latch = data;
@@ -251,7 +249,7 @@ void applix_state::dac_latch_w(uint16_t data)
}
//cent = odd, video = even
-void applix_state::palette_w(offs_t offset, uint16_t data, uint16_t mem_mask)
+void applix_state::palette_w(offs_t offset, u16 data, u16 mem_mask)
{
offset >>= 4;
if (ACCESSING_BITS_0_7)
@@ -262,7 +260,7 @@ void applix_state::palette_w(offs_t offset, uint16_t data, uint16_t mem_mask)
m_palette_latch[offset] = (data >> 8) & 15;
}
-void applix_state::video_latch_w(offs_t offset, uint16_t data, uint16_t mem_mask)
+void applix_state::video_latch_w(offs_t offset, u16 data, u16 mem_mask)
{
if (ACCESSING_BITS_0_7)
m_video_latch = data;
@@ -274,12 +272,12 @@ d1 = cassette in
d2,3 = joystick in
d4-7 = SW2 dipswitch block
*/
-uint8_t applix_state::applix_inputs_r()
+u8 applix_state::applix_inputs_r()
{
return m_io_dsw->read() | m_cass_data[2];
}
-uint8_t applix_state::applix_pb_r()
+u8 applix_state::applix_pb_r()
{
return m_pb;
}
@@ -294,7 +292,7 @@ d5 = /(out) clear cass IRQ and output line
d6 = /(out) reset keyboard by pulling kbd clock low
d7 = /(out) reset keyboard flipflop
*/
-void applix_state::applix_pa_w(uint8_t data)
+void applix_state::applix_pa_w(u8 data)
{
// Reset flipflop counter
if (!BIT(data, 7))
@@ -325,7 +323,7 @@ void applix_state::applix_pa_w(uint8_t data)
d0-6 = user
d7 = square wave output for cassette IRQ
*/
-void applix_state::applix_pb_w(uint8_t data)
+void applix_state::applix_pb_w(u8 data)
{
// low-to-high of PB7 when writing cassette - CLK on IC49
if (!BIT(m_pb, 7) && BIT(data, 7))
@@ -341,9 +339,9 @@ d1 = H if 68000 sent a byte
d2 = H if 68000 has read last byte
d3 = test switch
*/
-uint8_t applix_state::port00_r()
+u8 applix_state::port00_r()
{
- return (uint8_t)m_data_or_cmd | ((uint8_t)m_data << 1) | ((uint8_t)m_buffer_empty << 2) | m_io_fdc->read();
+ return (u8)m_data_or_cmd | ((u8)m_data << 1) | ((u8)m_buffer_empty << 2) | m_io_fdc->read();
}
/*
@@ -356,7 +354,7 @@ d5 = SIDE
d6 = BANK
d7 = MAP
*/
-uint8_t applix_state::port08_r()
+u8 applix_state::port08_r()
{
return m_port08 | 3;
}
@@ -366,7 +364,7 @@ d0 = /INUSE
d1 = /EJECT
d2-7 same as for port08_r
*/
-void applix_state::port08_w(uint8_t data)
+void applix_state::port08_w(u8 data)
{
m_port08 = data;
membank("bank1")->set_entry(BIT(data, 6));
@@ -384,72 +382,72 @@ void applix_state::port08_w(uint8_t data)
}
}
-uint8_t applix_state::port10_r()
+u8 applix_state::port10_r()
{
return 0;
}
-void applix_state::port10_w(uint8_t data)
+void applix_state::port10_w(u8 data)
{
}
-uint8_t applix_state::port18_r()
+u8 applix_state::port18_r()
{
m_data = 0;
return m_data_to_fdc;
}
-void applix_state::port18_w(offs_t offset, uint8_t data)
+void applix_state::port18_w(offs_t offset, u8 data)
{
m_data_from_fdc = data;
m_buffer_empty = 0;
m_fdc_cmd = BIT(offset, 2);
}
-uint8_t applix_state::port20_r()
+u8 applix_state::port20_r()
{
return 0;
}
-void applix_state::port20_w(uint8_t data)
+void applix_state::port20_w(u8 data)
{
}
-uint8_t applix_state::port60_r()
+u8 applix_state::port60_r()
{
return 0;
}
-void applix_state::port60_w(uint8_t data)
+void applix_state::port60_w(u8 data)
{
}
-uint16_t applix_state::fdc_stat_r(offs_t offset)
+u16 applix_state::fdc_stat_r(offs_t offset)
{
- uint8_t data = 0;
+ u8 data = 0;
switch (offset)
{
- case 0: data = (uint8_t)m_buffer_empty^1; break;
- case 1: data = (uint8_t)m_data^1; break;
- default: data = (uint8_t)m_fdc_cmd; // case 2
+ case 0: data = (u8)m_buffer_empty^1; break;
+ case 1: data = (u8)m_data^1; break;
+ default: data = (u8)m_fdc_cmd; // case 2
}
return data << 7;
}
-uint16_t applix_state::fdc_data_r()
+u16 applix_state::fdc_data_r()
{
m_buffer_empty = 1;
return m_data_from_fdc;
}
-void applix_state::fdc_data_w(uint16_t data)
+void applix_state::fdc_data_w(u16 data)
{
m_data_to_fdc = data;
m_data = 1;
m_data_or_cmd = 0;
}
-void applix_state::fdc_cmd_w(uint16_t data)
+void applix_state::fdc_cmd_w(u16 data)
{
m_data_to_fdc = data;
m_data = 1;
@@ -743,7 +741,7 @@ INPUT_PORTS_END
void applix_state::machine_reset()
{
- uint8_t* ROM = memregion("maincpu")->base();
+ u8* ROM = memregion("maincpu")->base();
memcpy(m_expansion, ROM, 8);
membank("bank1")->set_entry(0);
m_p3 = 0xff;
@@ -798,13 +796,13 @@ MC6845_UPDATE_ROW( applix_state::crtc_update_row )
// There is a monochrome mode, but no info found as yet.
// The 6845 cursor signal is not used at all.
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- uint32_t const vidbase = (m_video_latch & 15) << 14 | (ra & 7) << 12;
- uint32_t *p = &bitmap.pix32(y + vbp, hbp);
+ u32 const vidbase = (m_video_latch & 15) << 14 | (ra & 7) << 12;
+ u32 *p = &bitmap.pix32(y + vbp, hbp);
- for (uint16_t x = 0; x < x_count; x++)
+ for (u16 x = 0; x < x_count; x++)
{
- uint32_t const mem = vidbase | ((ma + x) & 0xfff);
- uint16_t chr = m_base[mem];
+ u32 const mem = vidbase | ((ma + x) & 0xfff);
+ u16 chr = m_base[mem];
if (BIT(m_pa, 3))
{
@@ -842,7 +840,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(applix_state::cass_timer)
{
/* cassette - turn 2500/5000Hz to a bit */
m_cass_data[1]++;
- uint8_t cass_ws = (m_cass->input() > +0.03) ? 1 : 0;
+ u8 cass_ws = (m_cass->input() > +0.03) ? 1 : 0;
if (cass_ws != m_cass_data[0])
{
@@ -985,7 +983,7 @@ ROM_END
void applix_state::init_applix()
{
- uint8_t *RAM = memregion("subcpu")->base();
+ u8 *RAM = memregion("subcpu")->base();
membank("bank1")->configure_entries(0, 2, &RAM[0x8000], 0x8000);
}
@@ -999,7 +997,7 @@ COMP( 1986, applix, 0, 0, applix, applix, applix_state, init_applix,
/**************************************************** KEYBOARD MODULE *****************************************/
-uint8_t applix_state::internal_data_read(offs_t offset)
+u8 applix_state::internal_data_read(offs_t offset)
{
m_via->write_cb2( BIT(offset, 8) ); // data
bool cp = !BIT(offset, 9);
@@ -1016,7 +1014,7 @@ uint8_t applix_state::internal_data_read(offs_t offset)
}
-void applix_state::internal_data_write(offs_t offset, uint8_t data)
+void applix_state::internal_data_write(offs_t offset, u8 data)
{
/* Check for low->high transition on AD8 */
if ( ! ( m_last_write_addr & 0x0100 ) && ( offset & 0x0100 ) )
@@ -1115,33 +1113,33 @@ void applix_state::internal_data_write(offs_t offset, uint8_t data)
}
-uint8_t applix_state::p1_read()
+u8 applix_state::p1_read()
{
return m_p1 & m_p1_data;
}
-void applix_state::p1_write(uint8_t data)
+void applix_state::p1_write(u8 data)
{
m_p1 = data;
}
-uint8_t applix_state::p2_read()
+u8 applix_state::p2_read()
{
return m_p2;
}
-void applix_state::p2_write(uint8_t data)
+void applix_state::p2_write(u8 data)
{
m_p2 = data;
}
-uint8_t applix_state::p3_read()
+u8 applix_state::p3_read()
{
- uint8_t data = m_p3;
+ u8 data = m_p3;
data &= ~0x14;
@@ -1155,7 +1153,7 @@ uint8_t applix_state::p3_read()
}
-void applix_state::p3_write(uint8_t data)
+void applix_state::p3_write(u8 data)
{
m_p3 = data;
}
diff --git a/src/mame/drivers/argo.cpp b/src/mame/drivers/argo.cpp
index d53765b993e..bdba20872b9 100644
--- a/src/mame/drivers/argo.cpp
+++ b/src/mame/drivers/argo.cpp
@@ -64,13 +64,13 @@ private:
TIMER_BOOT
};
- void argo_videoram_w(offs_t offset, uint8_t data);
- uint8_t argo_io_r(offs_t offset);
- void argo_io_w(offs_t offset, uint8_t data);
+ void argo_videoram_w(offs_t offset, u8 data);
+ u8 argo_io_r(offs_t offset);
+ void argo_io_w(offs_t offset, u8 data);
DECLARE_WRITE_LINE_MEMBER(z0_w);
DECLARE_WRITE_LINE_MEMBER(hrq_w);
void argo_palette(palette_device &palette) const;
- uint8_t dma_r(offs_t offset);
+ u8 dma_r(offs_t offset);
I8275_DRAW_CHARACTER_MEMBER(display_pixels);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
@@ -87,9 +87,9 @@ private:
required_device<cassette_image_device> m_cass;
required_device<palette_device> m_palette;
required_ioport_array<11> m_io_keyboard;
- uint8_t m_framecnt;
+ u8 m_framecnt;
bool m_ram_ctrl;
- uint8_t m_scroll_ctrl;
+ u8 m_scroll_ctrl;
bool m_txe, m_txd, m_rts, m_casspol;
u8 m_cass_data[4];
virtual void machine_reset() override;
@@ -97,9 +97,9 @@ private:
};
// write to videoram if following 'out b9,61' otherwise write to the unknown 'extra' ram
-void argo_state::argo_videoram_w(offs_t offset, uint8_t data)
+void argo_state::argo_videoram_w(offs_t offset, u8 data)
{
- uint8_t *RAM;
+ u8 *RAM;
if (m_ram_ctrl)
m_p_videoram[offset] = data;
else
@@ -109,9 +109,9 @@ void argo_state::argo_videoram_w(offs_t offset, uint8_t data)
}
}
-uint8_t argo_state::argo_io_r(offs_t offset)
+u8 argo_state::argo_io_r(offs_t offset)
{
- uint8_t low_io = offset;
+ u8 low_io = offset;
switch (low_io)
{
@@ -147,7 +147,7 @@ uint8_t argo_state::argo_io_r(offs_t offset)
}
}
-void argo_state::argo_io_w(offs_t offset, uint8_t data)
+void argo_state::argo_io_w(offs_t offset, u8 data)
{
switch (offset)
{
@@ -204,7 +204,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( argo_state::kansas_r )
m_cass_data[1]++;
m_cass_data[2]++;
- uint8_t cass_ws = (m_cass->input() > +0.04) ? 1 : 0;
+ u8 cass_ws = (m_cass->input() > +0.04) ? 1 : 0;
if (cass_ws != m_cass_data[0])
{
@@ -234,7 +234,7 @@ WRITE_LINE_MEMBER(argo_state::z0_w)
// read - incoming 2514Hz
}
-uint8_t argo_state::dma_r(offs_t offset)
+u8 argo_state::dma_r(offs_t offset)
{
if (offset < 0xf800)
return m_maincpu->space(AS_PROGRAM).read_byte(offset);
@@ -254,7 +254,7 @@ I8275_DRAW_CHARACTER_MEMBER(argo_state::display_pixels)
m_framecnt++;
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint8_t gfx = m_p_chargen[(linecount & 15) | (charcode << 4)];
+ u8 gfx = m_p_chargen[(linecount & 15) | (charcode << 4)];
if (vsp)
gfx = 0;
@@ -269,7 +269,7 @@ I8275_DRAW_CHARACTER_MEMBER(argo_state::display_pixels)
if (rvv)
gfx ^= 0xff;
- for(uint8_t i=0;i<7;i++)
+ for(u8 i=0;i<7;i++)
bitmap.pix32(y, x + i) = palette[BIT(gfx, 6-i) ? (hlgt ? 2 : 1) : 0];
}
@@ -446,7 +446,7 @@ void argo_state::machine_reset()
void argo_state::init_argo()
{
- uint8_t *RAM = memregion("maincpu")->base();
+ u8 *RAM = memregion("maincpu")->base();
membank("boot")->configure_entries(0, 2, &RAM[0x0000], 0xf800);
}
diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp
index 1752e49f5f8..686b7692f00 100644
--- a/src/mame/drivers/armedf.cpp
+++ b/src/mame/drivers/armedf.cpp
@@ -14,7 +14,7 @@ Kozure Ookami
Crazy Climber 2
(c)1988 Nichibutsu
-Armed Formation
+Armed F (アームドF, not "Formation Armed F")
(c)1988 Nichibutsu
Sky Robo / Tatakae! Big Fighter
@@ -838,6 +838,7 @@ static INPUT_PORTS_START( legion )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
#else
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" */
+ PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" )
#endif
INPUT_PORTS_END
@@ -1905,9 +1906,9 @@ void armedf_state::init_legion()
/* This is a hack to allow you to use the extra features
of 3 of the "Unused" Dip Switches (see notes above). */
u16 *ROM = (u16 *)memregion("maincpu")->base();
- RAM[0x0001d6 / 2] = 0x0001;
+ ROM[0x0001d6 / 2] = 0x0001;
/* To avoid checksum error */
- RAM[0x000488 / 2] = 0x4e71;
+ ROM[0x000488 / 2] = 0x4e71;
#endif
m_scroll_type = 2;
@@ -1918,8 +1919,8 @@ void armedf_state::init_legionjb()
#if LEGION_HACK
/* This is a hack to allow you to use the extra features
of 3 of the "Unused" Dip Switches (see notes above). */
- u16 *RAM = (u16 *)memregion("maincpu")->base();
- RAM[0x0001d6/2] = 0x0001;
+ u16 *ROM = (u16 *)memregion("maincpu")->base();
+ ROM[0x0001d6/2] = 0x0001;
/* No need to patch the checksum routine (see notes) ! */
#endif
@@ -1956,8 +1957,8 @@ GAME( 1987, kozure, 0, kozure, kozure, armedf_state, init_kozur
GAME( 1988, cclimbr2, 0, cclimbr2, cclimbr2, armedf_state, init_cclimbr2, ROT0, "Nichibutsu", "Crazy Climber 2 (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, cclimbr2a, cclimbr2, cclimbr2, cclimbr2, armedf_state, init_cclimbr2, ROT0, "Nichibutsu", "Crazy Climber 2 (Japan, Harder)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, armedf, 0, armedf, armedf, armedf_state, init_armedf, ROT270, "Nichibutsu", "Armed Formation (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, armedff, armedf, armedf, armedf, armedf_state, init_armedf, ROT270, "Nichibutsu (Fillmore license)", "Armed Formation (Fillmore license)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, armedf, 0, armedf, armedf, armedf_state, init_armedf, ROT270, "Nichibutsu", "Armed F (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, armedff, armedf, armedf, armedf, armedf_state, init_armedf, ROT270, "Nichibutsu (Fillmore license)", "Armed F (Fillmore license)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, skyrobo, 0, bigfghtr, bigfghtr, bigfghtr_state, init_armedf, ROT0, "Nichibutsu", "Sky Robo", MACHINE_SUPPORTS_SAVE )
GAME( 1989, bigfghtr, skyrobo, bigfghtr, bigfghtr, bigfghtr_state, init_armedf, ROT0, "Nichibutsu", "Tatakae! Big Fighter (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/beehive.cpp b/src/mame/drivers/beehive.cpp
index 9a96bc70e36..716af29a379 100644
--- a/src/mame/drivers/beehive.cpp
+++ b/src/mame/drivers/beehive.cpp
@@ -36,22 +36,22 @@ public:
, m_p_chargen(*this, "chargen")
{ }
- uint8_t beehive_60_r();
- void beehive_62_w(uint8_t data);
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
void beehive(machine_config &config);
+
+private:
void beehive_io(address_map &map);
void beehive_mem(address_map &map);
-private:
+ u8 beehive_60_r();
+ void beehive_62_w(u8 data);
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
- required_shared_ptr<uint8_t> m_p_videoram;
+ required_shared_ptr<u8> m_p_videoram;
required_region_ptr<u8> m_p_chargen;
- uint8_t m_keyline;
+ u8 m_keyline;
virtual void machine_reset() override;
};
-uint8_t beehive_state::beehive_60_r()
+u8 beehive_state::beehive_60_r()
{
if (BIT(m_keyline, 4))
{
@@ -63,7 +63,7 @@ uint8_t beehive_state::beehive_60_r()
return 0xff;
}
-void beehive_state::beehive_62_w(uint8_t data)
+void beehive_state::beehive_62_w(u8 data)
{
m_keyline = data;
}
@@ -241,12 +241,12 @@ void beehive_state::machine_reset()
/* This system appears to have inline attribute bytes of unknown meaning.
Currently they are ignored. */
-uint32_t beehive_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 beehive_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
uint16_t cursor_pos = (m_p_videoram[0xcaf] | (m_p_videoram[0xcb0] << 8)) & 0xfff;
uint16_t p_linelist;
- uint8_t line_length;
- uint8_t y,ra,chr,gfx,inv;
+ u8 line_length;
+ u8 y,ra,chr,gfx,inv;
uint16_t sy=0,ma,x;
for (y = 0; y < 25; y++)
@@ -258,7 +258,7 @@ uint32_t beehive_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
for (ra = 0; ra < 10; ra++)
{
uint16_t *p = &bitmap.pix16(sy++);
- uint8_t chars = 0;
+ u8 chars = 0;
for (x = ma; x < ma + line_length; x++)
{
diff --git a/src/mame/drivers/bigbord2.cpp b/src/mame/drivers/bigbord2.cpp
index 36fda7da8e7..4b8e069d226 100644
--- a/src/mame/drivers/bigbord2.cpp
+++ b/src/mame/drivers/bigbord2.cpp
@@ -109,9 +109,12 @@ public:
, m_bankr(*this, "bankr")
, m_bankv(*this, "bankv")
, m_banka(*this, "banka")
- {
- }
+ { }
+
+ void bigbord2(machine_config &config);
+ void init_bigbord2();
+private:
DECLARE_WRITE_LINE_MEMBER(side_select_w);
DECLARE_WRITE_LINE_MEMBER(smc1_w);
DECLARE_WRITE_LINE_MEMBER(smc2_w);
@@ -127,17 +130,13 @@ public:
DECLARE_WRITE_LINE_MEMBER(sio_wrdya_w);
DECLARE_WRITE_LINE_MEMBER(sio_wrdyb_w);
DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
- void init_bigbord2();
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);
-
- void bigbord2(machine_config &config);
void bigbord2_io(address_map &map);
void bigbord2_mem(address_map &map);
-private:
u8 crt8002(u8 ac_ra, u8 ac_chr, u8 ac_attr, uint16_t ac_cnt, bool ac_curs);
u8 m_term_data;
u8 m_term_status;
diff --git a/src/mame/drivers/bloodbro_ms.cpp b/src/mame/drivers/bloodbro_ms.cpp
index 990b1cc3605..9d3060e76de 100644
--- a/src/mame/drivers/bloodbro_ms.cpp
+++ b/src/mame/drivers/bloodbro_ms.cpp
@@ -158,10 +158,10 @@ ROM_START( bloodbrom )
ROM_LOAD( "51-1-b_bb527.ic27", 0xf0000, 0x10000, CRC(a73cd7a5) SHA1(9106565d1c8a8e0efa8f5035106f3cdac2189107) )
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (function unknown)
- ROM_LOAD( "1-2_110_tbp18s030.ic20", 0x000, 0x020, NO_DUMP )
+ ROM_LOAD( "1-2_110_tbp18s030.ic20", 0x000, 0x020, CRC(e26e680a) SHA1(9bbe30e98e952a6113c64e1171330153ddf22ce7) )
ROM_LOAD( "2_211_82s129.ic4", 0x100, 0x100, CRC(4f8c3e63) SHA1(0aa68fa1de6ca945027366a06752e834bbbc8d09) )
ROM_LOAD( "2_202_82s129.ic12", 0x200, 0x100, CRC(e434128a) SHA1(ef0f6d8daef8b25211095577a182cdf120a272c1) )
- ROM_LOAD( "51-1_p0502_82s129n.ic10", 0x300, 0x100, NO_DUMP )
+ ROM_LOAD( "51-1_p0502_82s129n.ic10", 0x300, 0x100, CRC(15085e44) SHA1(646e7100fcb112594023cf02be036bd3d42cc13c) )
ROM_REGION( 0x1000, "plds", ROMREGION_ERASEFF )
ROM_LOAD( "6-1_606_gal16v8-20hb1.ic13", 0x000, 0x117, NO_DUMP ) // Protected
diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp
index 7f66528c790..83e4ee17bee 100644
--- a/src/mame/drivers/camplynx.cpp
+++ b/src/mame/drivers/camplynx.cpp
@@ -191,41 +191,42 @@ public:
, m_floppy1(*this, "fdc:1")
{ }
- void bank1_w(offs_t offset, uint8_t data);
- void bank6_w(offs_t offset, uint8_t data);
- void port58_w(uint8_t data); // drive select etc
- void port7f_w(uint8_t data); // banking 48k
- uint8_t port80_r(); // cassin for 48k
- void port80_w(uint8_t data); // control port 48k
- uint8_t port82_r(); // cassin for 128k
- void port82_w(uint8_t data); // banking 128k
- void port84_w(uint8_t data); // dac port 48k
+ void lynx_common(machine_config &config);
+ void lynx_disk(machine_config &config);
+ void lynx128k(machine_config &config);
+ void lynx48k(machine_config &config);
+ void lynx96k(machine_config &config);
+ void init_lynx48k();
+ void init_lynx128k();
DECLARE_INPUT_CHANGED_MEMBER(brk_key);
+
+private:
+ void bank1_w(offs_t offset, u8 data);
+ void bank6_w(offs_t offset, u8 data);
+ void port58_w(u8 data); // drive select etc
+ void port7f_w(u8 data); // banking 48k
+ u8 port80_r(); // cassin for 48k
+ void port80_w(u8 data); // control port 48k
+ u8 port82_r(); // cassin for 128k
+ void port82_w(u8 data); // banking 128k
+ void port84_w(u8 data); // dac port 48k
DECLARE_MACHINE_RESET(lynx48k);
DECLARE_MACHINE_RESET(lynx128k);
- void init_lynx48k();
- void init_lynx128k();
DECLARE_FLOPPY_FORMATS(camplynx_floppy_formats);
MC6845_UPDATE_ROW(lynx48k_update_row);
MC6845_UPDATE_ROW(lynx128k_update_row);
- required_device<palette_device> m_palette;
- void lynx_common(machine_config &config);
- void lynx_disk(machine_config &config);
- void lynx128k(machine_config &config);
- void lynx48k(machine_config &config);
- void lynx96k(machine_config &config);
void lynx128k_io(address_map &map);
void lynx128k_mem(address_map &map);
void lynx48k_io(address_map &map);
void lynx48k_mem(address_map &map);
void lynx96k_io(address_map &map);
-private:
- uint8_t m_port58;
- uint8_t m_port80;
- uint8_t m_bankdata;
- uint8_t m_wbyte;
- uint8_t *m_p_ram;
+ u8 m_port58;
+ u8 m_port80;
+ u8 m_bankdata;
+ u8 m_wbyte;
+ u8 *m_p_ram;
bool m_is_128k;
+ required_device<palette_device> m_palette;
required_device<z80_device> m_maincpu;
required_device<cassette_image_device> m_cass;
//required_device<> m_printer;
@@ -236,7 +237,7 @@ private:
optional_device<floppy_connector> m_floppy1;
};
-void camplynx_state::port7f_w(uint8_t data)
+void camplynx_state::port7f_w(u8 data)
{
/*
d0 = write to bank 1
@@ -254,7 +255,7 @@ d7 = read from bank 4 */
// do writes
m_wbyte = (data & 0x0f) | ((m_port80 & 0x0c) << 3);
// do reads
- uint8_t rbyte = (data & 0x70) | (m_port80 & 0x0c);
+ u8 rbyte = (data & 0x70) | (m_port80 & 0x0c);
switch (rbyte)
{
case 0x00:
@@ -357,7 +358,7 @@ d7 = read from bank 4 */
}
}
-void camplynx_state::port82_w(uint8_t data)
+void camplynx_state::port82_w(u8 data)
{
/* Almost the same as the 48k, except the bit order is reversed.
d7 = write to bank 1
@@ -373,7 +374,7 @@ d0 = read from bank 4 */
// do writes
m_wbyte = bitswap<8>(data, 0, 0, 0, 0, 4, 5, 6, 7) & 0x0f; // rearrange to 1,2,3,4
// do reads
- uint8_t rbyte = bitswap<8>(data, 0, 0, 0, 0, 0, 1, 2, 3) & 0x0f; // rearrange to 0,1,2,4
+ u8 rbyte = bitswap<8>(data, 0, 0, 0, 0, 0, 1, 2, 3) & 0x0f; // rearrange to 0,1,2,4
if (BIT(rbyte, 1))
rbyte &= 0x07; // remove 4 if 1 selected (AND gate in IC82)
//printf("%s:%X:%X:%X\n", machine().describe_context().c_str(), data, rbyte, m_wbyte);
@@ -631,7 +632,7 @@ INPUT_CHANGED_MEMBER( camplynx_state::brk_key )
m_maincpu->set_input_line(0, newval ? CLEAR_LINE : ASSERT_LINE);
}
-void camplynx_state::bank1_w(offs_t offset, uint8_t data)
+void camplynx_state::bank1_w(offs_t offset, u8 data)
{
if (BIT(m_wbyte, 0))
m_p_ram[offset+0x10000] = data;
@@ -643,7 +644,7 @@ void camplynx_state::bank1_w(offs_t offset, uint8_t data)
m_p_ram[offset+0x40000] = data;
}
-void camplynx_state::bank6_w(offs_t offset, uint8_t data)
+void camplynx_state::bank6_w(offs_t offset, u8 data)
{
if (BIT(m_wbyte, 0))
m_p_ram[offset+0x10000] = data;
@@ -667,9 +668,9 @@ void camplynx_state::bank6_w(offs_t offset, uint8_t data)
}
}
-uint8_t camplynx_state::port80_r()
+u8 camplynx_state::port80_r()
{
- uint8_t data = ioport("LINE0")->read();
+ u8 data = ioport("LINE0")->read();
// when reading tape, bit 0 becomes cass-in signal
if (BIT(m_port80, 1))
{
@@ -688,7 +689,7 @@ d3 = cass motor on
d2 = cass enable
d1 = serial h/s out
d0 = speaker */
-void camplynx_state::port80_w(uint8_t data)
+void camplynx_state::port80_w(u8 data)
{
m_port80 = data;
m_cass->change_state( BIT(data, (m_is_128k) ? 3 : 1) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
@@ -702,7 +703,7 @@ void camplynx_state::port80_w(uint8_t data)
MESS can load PALE's wav files though.
Currently square wave output is selected. */
-void camplynx_state::port84_w(uint8_t data)
+void camplynx_state::port84_w(u8 data)
{
if (BIT(m_port80, (m_is_128k) ? 3 : 1)) // for 128k, bit 2 might be ok too
{
@@ -722,9 +723,9 @@ d7 = clock
d2 = cass-in
d1 = serial data in
d0 = serial h/s in */
-uint8_t camplynx_state::port82_r()
+u8 camplynx_state::port82_r()
{
- uint8_t data = 0xfb; // guess
+ u8 data = 0xfb; // guess
data |= (m_cass->input() > +0.02) ? 4 : 0;
return data;
}
@@ -747,7 +748,7 @@ MACHINE_RESET_MEMBER(camplynx_state, lynx128k)
MC6845_UPDATE_ROW( camplynx_state::lynx48k_update_row )
{
- uint8_t r,g,b,x;
+ u8 r,g,b,x;
uint32_t green_bank, *p = &bitmap.pix32(y);
uint16_t mem = ((ma << 2) + (ra << 5)) & 0x1fff;
@@ -776,7 +777,7 @@ MC6845_UPDATE_ROW( camplynx_state::lynx48k_update_row )
MC6845_UPDATE_ROW( camplynx_state::lynx128k_update_row )
{
- uint8_t r,g,b,x;
+ u8 r,g,b,x;
uint32_t green_bank, *p = &bitmap.pix32(y);
uint16_t mem = ((ma << 2) + (ra << 6)) & 0x3fff;
// determine green bank
@@ -802,7 +803,7 @@ MC6845_UPDATE_ROW( camplynx_state::lynx128k_update_row )
}
}
-void camplynx_state::port58_w(uint8_t data)
+void camplynx_state::port58_w(u8 data)
{
/*
d0,d1 = drive select
diff --git a/src/mame/drivers/ccs2810.cpp b/src/mame/drivers/ccs2810.cpp
index 03219047528..e0e923172d9 100644
--- a/src/mame/drivers/ccs2810.cpp
+++ b/src/mame/drivers/ccs2810.cpp
@@ -74,21 +74,20 @@ ToDo:
class ccs_state : public driver_device
{
public:
- ccs_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_ram(*this, RAM_TAG),
- m_rom(*this, "maincpu"),
- m_ins8250(*this, "ins8250"),
- m_fdc(*this, "fdc"),
- m_floppy0(*this, "fdc:0"),
- m_jump_addr_sel(*this, {"ADDRLO", "ADDRHI"}),
- m_ser_addr_sel(*this, "SERADDR"),
- m_jump_en(*this, "JMPEN"),
- m_rom_en(*this, "ROMEN"),
- m_ser_en(*this, "SEREN")
- {
- }
+ ccs_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_ram(*this, RAM_TAG)
+ , m_rom(*this, "maincpu")
+ , m_ins8250(*this, "ins8250")
+ , m_fdc(*this, "fdc")
+ , m_floppy0(*this, "fdc:0")
+ , m_jump_addr_sel(*this, {"ADDRLO", "ADDRHI"})
+ , m_ser_addr_sel(*this, "SERADDR")
+ , m_jump_en(*this, "JMPEN")
+ , m_rom_en(*this, "ROMEN")
+ , m_ser_en(*this, "SEREN")
+ { }
void init_ccs2810();
void init_ccs2422();
@@ -96,29 +95,28 @@ public:
void ccs2810(machine_config &config);
void ccs2422(machine_config &config);
-protected:
- uint8_t memory_read(offs_t offset);
- void memory_write(offs_t offset, uint8_t data);
- uint8_t io_read(offs_t offset);
- void io_write(offs_t offset, uint8_t data);
+private:
+ u8 memory_read(offs_t offset);
+ void memory_write(offs_t offset, u8 data);
+ u8 io_read(offs_t offset);
+ void io_write(offs_t offset, u8 data);
virtual void machine_start() override;
virtual void machine_reset() override;
- uint8_t port04_r();
- uint8_t port34_r();
- void port04_w(uint8_t data);
- void port34_w(uint8_t data);
- void port40_w(uint8_t data);
+ u8 port04_r();
+ u8 port34_r();
+ void port04_w(u8 data);
+ void port34_w(u8 data);
+ void port40_w(u8 data);
void ccs2422_io(address_map &map);
void ccs2810_io(address_map &map);
void ccs2810_mem(address_map &map);
-private:
required_device<cpu_device> m_maincpu;
required_device<ram_device> m_ram;
- required_region_ptr<uint8_t> m_rom;
+ required_region_ptr<u8> m_rom;
required_device<ins8250_device> m_ins8250;
optional_device<mb8877_device> m_fdc;
optional_device<floppy_connector> m_floppy0;
@@ -129,18 +127,18 @@ private:
required_ioport m_rom_en;
required_ioport m_ser_en;
- uint8_t m_power_on_status;
+ u8 m_power_on_status;
bool m_ss;
bool m_dden;
bool m_dsize;
- uint8_t m_ds;
+ u8 m_ds;
floppy_image_device *m_floppy;
};
-uint8_t ccs_state::memory_read(offs_t offset)
+u8 ccs_state::memory_read(offs_t offset)
{
- uint8_t result = m_ram->read(offset);
+ u8 result = m_ram->read(offset);
if (!BIT(m_power_on_status, 0))
{
@@ -164,12 +162,12 @@ uint8_t ccs_state::memory_read(offs_t offset)
return result;
}
-void ccs_state::memory_write(offs_t offset, uint8_t data)
+void ccs_state::memory_write(offs_t offset, u8 data)
{
m_ram->write(offset, data);
}
-uint8_t ccs_state::io_read(offs_t offset)
+u8 ccs_state::io_read(offs_t offset)
{
// A7-A3 are compared against jumper settings
if (m_ser_en->read() && (offset & 0x00f8) == m_ser_addr_sel->read())
@@ -178,7 +176,7 @@ uint8_t ccs_state::io_read(offs_t offset)
return 0xff;
}
-void ccs_state::io_write(offs_t offset, uint8_t data)
+void ccs_state::io_write(offs_t offset, u8 data)
{
// A7-A3 are compared against jumper settings
if (m_ser_en->read() && (offset & 0x00f8) == m_ser_addr_sel->read())
@@ -792,10 +790,10 @@ d6 : autoboot (1=go to monitor)
d7 : drq
*/
-uint8_t ccs_state::port34_r()
+u8 ccs_state::port34_r()
{
- //return (uint8_t)m_drq | (m_ds << 1) | ((uint8_t)fdc->hld_r() << 5) | 0x40 | ((uint8_t)m_intrq << 7);
- return (uint8_t)m_fdc->drq_r() | (m_ds << 1) | 0x20 | 0x40 | ((uint8_t)m_fdc->intrq_r() << 7); // hld_r doesn't do anything
+ //return (u8)m_drq | (m_ds << 1) | ((u8)fdc->hld_r() << 5) | 0x40 | ((u8)m_intrq << 7);
+ return (u8)m_fdc->drq_r() | (m_ds << 1) | 0x20 | 0x40 | ((u8)m_fdc->intrq_r() << 7); // hld_r doesn't do anything
}
/* Status 2
@@ -809,7 +807,7 @@ d6 : double (0 = a double-sided 20cm disk is in the drive)
d7 : drq
*/
-uint8_t ccs_state::port04_r()
+u8 ccs_state::port04_r()
{
bool trk00=1,wprt=0,dside=1;
int idx=1;
@@ -820,8 +818,8 @@ uint8_t ccs_state::port04_r()
idx = m_floppy->idx_r()^1;
dside = m_floppy->twosid_r();
}
- return (uint8_t)trk00 | 0 | ((uint8_t)wprt << 2) | ((uint8_t)m_ss << 3) |
- idx << 4 | ((uint8_t)m_dden << 5) | ((uint8_t)dside << 6) | ((uint8_t)m_fdc->drq_r() << 7);
+ return (u8)trk00 | 0 | ((u8)wprt << 2) | ((u8)m_ss << 3) |
+ idx << 4 | ((u8)m_dden << 5) | ((u8)dside << 6) | ((u8)m_fdc->drq_r() << 7);
}
/* Control 1
@@ -835,7 +833,7 @@ d6 : dden
d7 : autowait (0=ignore drq)
*/
-void ccs_state::port34_w(uint8_t data)
+void ccs_state::port34_w(u8 data)
{
m_ds = data & 15;
m_dsize = BIT(data, 4);
@@ -860,7 +858,7 @@ d7 : rom enable (1=firmware enabled)
other bits not used
*/
-void ccs_state::port04_w(uint8_t data)
+void ccs_state::port04_w(u8 data)
{
m_ss = BIT(data, 6);
if (m_floppy)
@@ -873,7 +871,7 @@ void ccs_state::port04_w(uint8_t data)
// Machine
//
//*************************************
-void ccs_state::port40_w(uint8_t data)
+void ccs_state::port40_w(u8 data)
{
//membank("bankr0")->set_entry( (data) ? 1 : 0);
}
diff --git a/src/mame/drivers/ccs300.cpp b/src/mame/drivers/ccs300.cpp
index 6f958c67737..7462a8f4ca2 100644
--- a/src/mame/drivers/ccs300.cpp
+++ b/src/mame/drivers/ccs300.cpp
@@ -39,17 +39,16 @@ public:
void ccs300(machine_config &config);
-protected:
+private:
virtual void machine_start() override;
virtual void machine_reset() override;
-private:
required_device<z80_device> m_maincpu;
void ccs300_io(address_map &map);
void ccs300_mem(address_map &map);
- void port40_w(uint8_t data);
+ void port40_w(u8 data);
};
void ccs300_state::ccs300_mem(address_map &map)
@@ -91,7 +90,7 @@ static const z80_daisy_config daisy_chain[] =
// Machine
//
//*************************************
-void ccs300_state::port40_w(uint8_t data)
+void ccs300_state::port40_w(u8 data)
{
membank("bankr0")->set_entry( (data) ? 1 : 0);
}
@@ -104,7 +103,7 @@ void ccs300_state::machine_reset()
void ccs300_state::machine_start()
{
- uint8_t *main = memregion("maincpu")->base();
+ u8 *main = memregion("maincpu")->base();
membank("bankr0")->configure_entry(1, &main[0x0000]);
membank("bankr0")->configure_entry(0, &main[0x10000]);
diff --git a/src/mame/drivers/cd2650.cpp b/src/mame/drivers/cd2650.cpp
index ede35348eaf..edc03be75fd 100644
--- a/src/mame/drivers/cd2650.cpp
+++ b/src/mame/drivers/cd2650.cpp
@@ -78,7 +78,7 @@ private:
void cd2650_data(address_map &map);
void cd2650_io(address_map &map);
void cd2650_mem(address_map &map);
- uint8_t keyin_r();
+ u8 keyin_r();
void kbd_put(u8 data);
DECLARE_WRITE_LINE_MEMBER(tape_deck_on_w);
DECLARE_READ_LINE_MEMBER(cass_r);
@@ -86,13 +86,13 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint8_t m_term_data;
+ u8 m_term_data;
bool m_cassbit;
bool m_cassold;
- uint8_t m_cass_data[4];
+ u8 m_cass_data[4];
virtual void machine_reset() override;
required_device<s2650_device> m_maincpu;
- required_shared_ptr<uint8_t> m_p_videoram;
+ required_shared_ptr<u8> m_p_videoram;
required_region_ptr<u8> m_p_chargen;
required_device<cassette_image_device> m_cass;
};
@@ -118,7 +118,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cd2650_state::kansas_r)
{
/* cassette - turn 1200/2400Hz to a bit */
m_cass_data[1]++;
- uint8_t cass_ws = (m_cass->input() > +0.03) ? 1 : 0;
+ u8 cass_ws = (m_cass->input() > +0.03) ? 1 : 0;
if (cass_ws != m_cass_data[0])
{
@@ -138,9 +138,9 @@ READ_LINE_MEMBER(cd2650_state::cass_r)
return m_cass_data[2];
}
-uint8_t cd2650_state::keyin_r()
+u8 cd2650_state::keyin_r()
{
- uint8_t ret = m_term_data;
+ u8 ret = m_term_data;
m_term_data = ret | 0x80;
return ret;
}
@@ -181,7 +181,7 @@ uint32_t cd2650_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
When the bottom of the screen is reached, it does not scroll, it just wraps around. */
uint16_t offset = 0;
- uint8_t y,ra,chr,gfx;
+ u8 y,ra,chr,gfx;
uint16_t sy=0,x,mem;
for (y = 0; y < 16; y++)
@@ -263,7 +263,7 @@ QUICKLOAD_LOAD_MEMBER(cd2650_state::quickload_cb)
}
else
{
- std::vector<uint8_t> quick_data(quick_length);
+ std::vector<u8> quick_data(quick_length);
int read_ = image.fread( &quick_data[0], quick_length);
if (read_ != quick_length)
{
diff --git a/src/mame/drivers/chaos.cpp b/src/mame/drivers/chaos.cpp
index 66ba3ff29c3..2afe9e2ed1a 100644
--- a/src/mame/drivers/chaos.cpp
+++ b/src/mame/drivers/chaos.cpp
@@ -43,23 +43,23 @@ public:
, m_terminal(*this, "terminal")
, m_p_ram(*this, "ram")
, m_maincpu(*this, "maincpu")
- {
- }
+ { }
- uint8_t port1e_r();
- void port1f_w(uint8_t data);
- uint8_t port90_r();
- uint8_t port91_r();
- void kbd_put(u8 data);
void chaos(machine_config &config);
+
+private:
+ u8 port1e_r();
+ void port1f_w(u8 data);
+ u8 port90_r();
+ u8 port91_r();
+ void kbd_put(u8 data);
void data_map(address_map &map);
void io_map(address_map &map);
void mem_map(address_map &map);
-private:
- uint8_t m_term_data;
+ u8 m_term_data;
virtual void machine_reset() override;
required_device<generic_terminal_device> m_terminal;
- required_shared_ptr<uint8_t> m_p_ram;
+ required_shared_ptr<u8> m_p_ram;
required_device<cpu_device> m_maincpu;
};
@@ -96,12 +96,12 @@ INPUT_PORTS_END
// Port 1E - Bit 0 indicates key pressed, Bit 1 indicates ok to output
-uint8_t chaos_state::port1e_r()
+u8 chaos_state::port1e_r()
{
return (m_term_data) ? 1 : 0;
}
-void chaos_state::port1f_w(uint8_t data)
+void chaos_state::port1f_w(u8 data)
{
// make the output readable on our terminal
if (data == 0x09)
@@ -116,9 +116,9 @@ void chaos_state::port1f_w(uint8_t data)
m_terminal->write(0x0a);
}
-uint8_t chaos_state::port90_r()
+u8 chaos_state::port90_r()
{
- uint8_t ret = m_term_data;
+ u8 ret = m_term_data;
m_term_data = 0;
return ret;
}
@@ -128,9 +128,9 @@ uint8_t chaos_state::port90_r()
// Bit 3 = key pressed
// Bit 7 = ok to output
-uint8_t chaos_state::port91_r()
+u8 chaos_state::port91_r()
{
- uint8_t ret = 0x80 | ioport("CONFIG")->read();
+ u8 ret = 0x80 | ioport("CONFIG")->read();
ret |= (m_term_data) ? 8 : 0;
return ret;
}
@@ -143,7 +143,7 @@ void chaos_state::kbd_put(u8 data)
void chaos_state::machine_reset()
{
// copy the roms into ram
- uint8_t* ROM = memregion("roms")->base();
+ u8* ROM = memregion("roms")->base();
memcpy(m_p_ram, ROM, 0x3000);
memcpy(m_p_ram+0x7000, ROM+0x3000, 0x1000);
}
diff --git a/src/mame/drivers/cm1800.cpp b/src/mame/drivers/cm1800.cpp
index 98c6c71bd30..413980e72be 100644
--- a/src/mame/drivers/cm1800.cpp
+++ b/src/mame/drivers/cm1800.cpp
@@ -49,18 +49,18 @@ public:
, m_uart(*this, "uart")
{ }
- uint8_t uart_status_r();
-
void cm1800(machine_config &config);
+
+private:
void io_map(address_map &map);
void mem_map(address_map &map);
-private:
virtual void machine_reset() override;
+ u8 uart_status_r();
required_device<cpu_device> m_maincpu;
required_device<ay31015_device> m_uart;
};
-uint8_t cm1800_state::uart_status_r()
+u8 cm1800_state::uart_status_r()
{
return (m_uart->dav_r()) | (m_uart->tbmt_r() << 2);
}
diff --git a/src/mame/drivers/cmmb.cpp b/src/mame/drivers/cmmb.cpp
index f6d3da0f4e2..f070fed1f4d 100644
--- a/src/mame/drivers/cmmb.cpp
+++ b/src/mame/drivers/cmmb.cpp
@@ -129,8 +129,6 @@ void cmmb_state::cmmb_charram_w(offs_t offset, uint8_t data)
{
m_charram[offset] = data;
- offset&=0xfff;
-
/* dirty char */
m_gfxdecode->gfx(0)->mark_dirty(offset >> 4);
m_gfxdecode->gfx(1)->mark_dirty(offset >> 5);
@@ -208,7 +206,7 @@ void cmmb_state::cmmb_map(address_map &map)
map(0x1000, 0x1fff).ram().share("videoram");
map(0x2000, 0x9fff).m(m_bnk2000, FUNC(address_map_bank_device::amap8));
map(0xa000, 0xafff).ram();
- map(0xb000, 0xbfff).w(FUNC(cmmb_state::cmmb_charram_w)).share(m_charram);
+ map(0xb000, 0xbfff).ram().w(FUNC(cmmb_state::cmmb_charram_w)).share(m_charram);
map(0xc000, 0xc00f).rw(FUNC(cmmb_state::cmmb_input_r), FUNC(cmmb_state::cmmb_output_w));
map(0xc010, 0xffff).rom().region("maincpu", 0x1c010);
}
@@ -455,5 +453,5 @@ ROM_START( cmmb103 )
//ROM_FILL( 0x1c124, 2, 0xea ) // temporary patch to avoid waiting on IRQs
ROM_END
-GAME( 2001, cmmb103, 0, cmmb, cmmb, cmmb_state, empty_init, ROT270, "Cosmodog / Team Play (Licensed from Infogrames via Midway Games West)", "Centipede / Millipede / Missile Command (rev 1.03)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
-GAME( 2002, cmmb162, 0, cmmb, cmmb, cmmb_state, empty_init, ROT270, "Cosmodog / Team Play (Licensed from Infogrames via Midway Games West)", "Centipede / Millipede / Missile Command / Let's Go Bowling (rev 1.62)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
+GAME( 2001, cmmb103, 0, cmmb, cmmb, cmmb_state, empty_init, ROT270, "Cosmodog / Team Play (licensed from Infogrames via Midway Games West)", "Centipede / Millipede / Missile Command (rev 1.03)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
+GAME( 2002, cmmb162, 0, cmmb, cmmb, cmmb_state, empty_init, ROT270, "Cosmodog / Team Play (licensed from Infogrames via Midway Games West)", "Centipede / Millipede / Missile Command / Let's Go Bowling (rev 1.62)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/cortex.cpp b/src/mame/drivers/cortex.cpp
index 5f792fd39cf..9ae615e65a5 100644
--- a/src/mame/drivers/cortex.cpp
+++ b/src/mame/drivers/cortex.cpp
@@ -64,21 +64,21 @@ public:
, m_io_dsw(*this, "DSW")
{ }
+ void cortex(machine_config &config);
+ void init_init();
+
+private:
void kbd_put(u8 data);
DECLARE_WRITE_LINE_MEMBER(keyboard_ack_w);
DECLARE_WRITE_LINE_MEMBER(romsw_w);
DECLARE_WRITE_LINE_MEMBER(vdp_int_w);
- uint8_t pio_r(offs_t offset);
- uint8_t keyboard_r(offs_t offset);
- void init_init();
-
- void cortex(machine_config &config);
+ u8 pio_r(offs_t offset);
+ u8 keyboard_r(offs_t offset);
void io_map(address_map &map);
void mem_map(address_map &map);
-private:
bool m_kbd_ack;
bool m_vdp_int;
- uint8_t m_term_data;
+ u8 m_term_data;
virtual void machine_reset() override;
required_device<tms9995_device> m_maincpu;
required_device<beep_device> m_beep;
@@ -119,7 +119,7 @@ static INPUT_PORTS_START( cortex )
PORT_DIPSETTING( 0x00, "Single")
INPUT_PORTS_END
-uint8_t cortex_state::pio_r(offs_t offset)
+u8 cortex_state::pio_r(offs_t offset)
{
switch (offset)
{
@@ -138,7 +138,7 @@ uint8_t cortex_state::pio_r(offs_t offset)
}
}
-uint8_t cortex_state::keyboard_r(offs_t offset)
+u8 cortex_state::keyboard_r(offs_t offset)
{
return BIT(m_term_data, offset);
}
@@ -182,7 +182,7 @@ void cortex_state::machine_reset()
void cortex_state::init_init()
{
- uint8_t *main = memregion("maincpu")->base();
+ u8 *main = memregion("maincpu")->base();
membank("bankr0")->configure_entry(1, &main[0x10000]);
membank("bankr0")->configure_entry(0, &main[0x00000]);
diff --git a/src/mame/drivers/cvicny.cpp b/src/mame/drivers/cvicny.cpp
index 67b67d0083c..b73d9852482 100644
--- a/src/mame/drivers/cvicny.cpp
+++ b/src/mame/drivers/cvicny.cpp
@@ -45,36 +45,44 @@ public:
{ }
void cvicny(machine_config &config);
- void cvicny_mem(address_map &map);
- uint8_t key_r();
- void digit_w(uint8_t data);
- void segment_w(uint8_t data);
+
private:
- uint8_t m_digit;
- uint8_t m_seg;
+ void cvicny_mem(address_map &map);
+ virtual void machine_start() override;
+ u8 key_r();
+ void digit_w(u8 data);
+ void segment_w(u8 data);
+ u8 m_digit;
+ u8 m_seg;
required_device<cpu_device> m_maincpu;
required_device<pwm_display_device> m_display;
required_ioport_array<8> m_io_keyboard;
};
-void cvicny_state::segment_w(uint8_t data) // output segments on the selected digit
+void cvicny_state::segment_w(u8 data) // output segments on the selected digit
{
m_seg = data;
m_display->matrix(1<<m_digit, m_seg);
}
-void cvicny_state::digit_w(uint8_t data) // set keyboard scanning row; set digit to display
+void cvicny_state::digit_w(u8 data) // set keyboard scanning row; set digit to display
{
m_digit = data & 7;
m_display->matrix(1<<m_digit, m_seg);
}
-uint8_t cvicny_state::key_r()
+u8 cvicny_state::key_r()
{
u8 data = m_io_keyboard[m_digit]->read();
return ((data << 4) ^ 0xf0) | data;
}
+void cvicny_state::machine_start()
+{
+ save_item(NAME(m_digit));
+ save_item(NAME(m_seg));
+}
+
void cvicny_state::cvicny_mem(address_map &map)
{
map.unmap_value_high();
@@ -150,4 +158,4 @@ ROM_END
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1984, cvicny, 0, 0, cvicny, cvicny, cvicny_state, empty_init, "<unknown>", "Practice-z80", MACHINE_NO_SOUND_HW)
+COMP( 1984, cvicny, 0, 0, cvicny, cvicny, cvicny_state, empty_init, "<unknown>", "Practice-z80", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/czk80.cpp b/src/mame/drivers/czk80.cpp
index 35ade522059..802369d0971 100644
--- a/src/mame/drivers/czk80.cpp
+++ b/src/mame/drivers/czk80.cpp
@@ -62,40 +62,38 @@ public:
void czk80(machine_config &config);
void init_czk80();
-protected:
- virtual void machine_reset() override;
-
private:
+ virtual void machine_reset() override;
TIMER_CALLBACK_MEMBER(czk80_reset);
- uint8_t port80_r();
- uint8_t port81_r();
- void port40_w(uint8_t data);
+ u8 port80_r();
+ u8 port81_r();
+ void port40_w(u8 data);
void kbd_put(u8 data);
DECLARE_WRITE_LINE_MEMBER(ctc_z0_w);
DECLARE_WRITE_LINE_MEMBER(ctc_z1_w);
DECLARE_WRITE_LINE_MEMBER(ctc_z2_w);
void czk80_io(address_map &map);
void czk80_mem(address_map &map);
- uint8_t m_term_data;
+ u8 m_term_data;
required_device<z80_device> m_maincpu;
required_device<generic_terminal_device> m_terminal;
required_device<upd765a_device> m_fdc;
};
-void czk80_state::port40_w(uint8_t data)
+void czk80_state::port40_w(u8 data)
{
membank("bankr1")->set_entry(BIT(data, 1));
}
-uint8_t czk80_state::port80_r()
+u8 czk80_state::port80_r()
{
- uint8_t ret = m_term_data;
+ u8 ret = m_term_data;
m_term_data = 0;
return ret;
}
-uint8_t czk80_state::port81_r()
+u8 czk80_state::port81_r()
{
return (m_term_data) ? 3 : 1;
}
@@ -166,7 +164,7 @@ void czk80_state::machine_reset()
void czk80_state::init_czk80()
{
- uint8_t *main = memregion("maincpu")->base();
+ u8 *main = memregion("maincpu")->base();
membank("bankr0")->configure_entry(1, &main[0x0000]);
membank("bankr0")->configure_entry(0, &main[0x10000]);
diff --git a/src/mame/drivers/d400.cpp b/src/mame/drivers/d400.cpp
index 6d65cf9f191..f7507cc59e0 100644
--- a/src/mame/drivers/d400.cpp
+++ b/src/mame/drivers/d400.cpp
@@ -26,8 +26,8 @@ public:
private:
u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_READ8_MEMBER(novram_recall_r);
- DECLARE_READ8_MEMBER(novram_store_r);
+ u8 novram_recall_r();
+ u8 novram_store_r();
void mem_map(address_map &map);
required_device<cpu_device> m_maincpu;
@@ -39,7 +39,7 @@ u32 d400_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const
return 0;
}
-READ8_MEMBER(d400_state::novram_recall_r)
+u8 d400_state::novram_recall_r()
{
if (!machine().side_effects_disabled())
{
@@ -49,7 +49,7 @@ READ8_MEMBER(d400_state::novram_recall_r)
return 0xff;
}
-READ8_MEMBER(d400_state::novram_store_r)
+u8 d400_state::novram_store_r()
{
if (!machine().side_effects_disabled())
{
diff --git a/src/mame/drivers/d6809.cpp b/src/mame/drivers/d6809.cpp
index 52360ee24f1..f464a986d7a 100644
--- a/src/mame/drivers/d6809.cpp
+++ b/src/mame/drivers/d6809.cpp
@@ -121,13 +121,13 @@ public:
void d6809(machine_config &config);
private:
- DECLARE_READ8_MEMBER( term_r );
- DECLARE_WRITE8_MEMBER( term_w );
+ u8 term_r();
+ void term_w(u8 data);
void kbd_put(u8 data);
void mem_map(address_map &map);
- uint8_t m_term_data;
+ u8 m_term_data;
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
required_device<generic_terminal_device> m_terminal;
@@ -135,14 +135,14 @@ private:
required_device<floppy_connector> m_floppy0;
};
-READ8_MEMBER( d6809_state::term_r )
+u8 d6809_state::term_r()
{
- uint8_t ret = m_term_data;
+ u8 ret = m_term_data;
m_term_data = 0;
return ret;
}
-WRITE8_MEMBER( d6809_state::term_w )
+void d6809_state::term_w(u8 data)
{
if ((data > 0) && (data < 0x80))
m_terminal->write(data);
diff --git a/src/mame/drivers/d9final.cpp b/src/mame/drivers/d9final.cpp
index c372d277afd..496753f237b 100644
--- a/src/mame/drivers/d9final.cpp
+++ b/src/mame/drivers/d9final.cpp
@@ -59,11 +59,11 @@ private:
tilemap_t *m_sc0_tilemap;
- DECLARE_WRITE8_MEMBER(sc0_lovram);
- DECLARE_WRITE8_MEMBER(sc0_hivram);
- DECLARE_WRITE8_MEMBER(sc0_cram);
- DECLARE_WRITE8_MEMBER(bank_w);
- DECLARE_READ8_MEMBER(prot_latch_r);
+ void sc0_lovram(offs_t offset, uint8_t data);
+ void sc0_hivram(offs_t offset, uint8_t data);
+ void sc0_cram(offs_t offset, uint8_t data);
+ void bank_w(uint8_t data);
+ uint8_t prot_latch_r();
TILE_GET_INFO_MEMBER(get_sc0_tile_info);
@@ -99,31 +99,31 @@ uint32_t d9final_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
return 0;
}
-WRITE8_MEMBER(d9final_state::sc0_lovram)
+void d9final_state::sc0_lovram(offs_t offset, uint8_t data)
{
m_lo_vram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(d9final_state::sc0_hivram)
+void d9final_state::sc0_hivram(offs_t offset, uint8_t data)
{
m_hi_vram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(d9final_state::sc0_cram)
+void d9final_state::sc0_cram(offs_t offset, uint8_t data)
{
m_cram[offset] = data;
m_sc0_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(d9final_state::bank_w)
+void d9final_state::bank_w(uint8_t data)
{
membank("bank1")->set_entry(data & 0x7);
}
/* game checks this after three attract cycles, otherwise coin inputs stop to work. */
-READ8_MEMBER(d9final_state::prot_latch_r)
+uint8_t d9final_state::prot_latch_r()
{
// printf("PC=%06x\n",m_maincpu->pc());
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index 28332260f6e..93fc14317af 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -65,17 +65,17 @@ public:
DECLARE_READ_LINE_MEMBER(snd_ack_r);
private:
- DECLARE_WRITE8_MEMBER(bg_scroll_x_w);
- DECLARE_WRITE8_MEMBER(bg_scroll_y_w);
- DECLARE_WRITE8_MEMBER(background_w);
- DECLARE_WRITE8_MEMBER(foreground_w);
- DECLARE_WRITE8_MEMBER(bg_bank_w);
- DECLARE_WRITE8_MEMBER(coins_w);
- DECLARE_WRITE8_MEMBER(main_irq_ack_w);
- DECLARE_WRITE8_MEMBER(adpcm_w);
- DECLARE_WRITE8_MEMBER(snd_ack_w);
- DECLARE_WRITE8_MEMBER(snd_irq_w);
- DECLARE_WRITE8_MEMBER(music_irq_w);
+ void bg_scroll_x_w(uint8_t data);
+ void bg_scroll_y_w(uint8_t data);
+ void background_w(offs_t offset, uint8_t data);
+ void foreground_w(offs_t offset, uint8_t data);
+ void bg_bank_w(uint8_t data);
+ void coins_w(uint8_t data);
+ void main_irq_ack_w(uint8_t data);
+ void adpcm_w(uint8_t data);
+ void snd_ack_w(uint8_t data);
+ void snd_irq_w(uint8_t data);
+ void music_irq_w(uint8_t data);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
void dacholer_palette(palette_device &palette) const;
@@ -144,12 +144,12 @@ void dacholer_state::video_start()
m_fg_tilemap->set_transparent_pen(0);
}
-WRITE8_MEMBER(dacholer_state::bg_scroll_x_w)
+void dacholer_state::bg_scroll_x_w(uint8_t data)
{
m_scroll_x = data;
}
-WRITE8_MEMBER(dacholer_state::bg_scroll_y_w)
+void dacholer_state::bg_scroll_y_w(uint8_t data)
{
m_scroll_y = data;
}
@@ -204,19 +204,19 @@ uint32_t dacholer_state::screen_update_dacholer(screen_device &screen, bitmap_in
return 0;
}
-WRITE8_MEMBER(dacholer_state::background_w)
+void dacholer_state::background_w(offs_t offset, uint8_t data)
{
m_bgvideoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(dacholer_state::foreground_w)
+void dacholer_state::foreground_w(offs_t offset, uint8_t data)
{
m_fgvideoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(dacholer_state::bg_bank_w)
+void dacholer_state::bg_bank_w(uint8_t data)
{
if ((data & 3) != m_bg_bank)
{
@@ -228,7 +228,7 @@ WRITE8_MEMBER(dacholer_state::bg_bank_w)
}
-WRITE8_MEMBER(dacholer_state::coins_w)
+void dacholer_state::coins_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, data & 1);
machine().bookkeeping().coin_counter_w(1, data & 2);
@@ -237,7 +237,7 @@ WRITE8_MEMBER(dacholer_state::coins_w)
m_leds[1] = BIT(data, 3);
}
-WRITE8_MEMBER(dacholer_state::main_irq_ack_w)
+void dacholer_state::main_irq_ack_w(uint8_t data)
{
m_maincpu->set_input_line(0, CLEAR_LINE);
}
@@ -291,13 +291,13 @@ void dacholer_state::itaten_snd_map(address_map &map)
}
-WRITE8_MEMBER(dacholer_state::adpcm_w)
+void dacholer_state::adpcm_w(uint8_t data)
{
m_msm_data = data;
m_msm_toggle = 0;
}
-WRITE8_MEMBER(dacholer_state::snd_ack_w)
+void dacholer_state::snd_ack_w(uint8_t data)
{
m_snd_ack = data;
}
@@ -307,12 +307,12 @@ READ_LINE_MEMBER(dacholer_state::snd_ack_r)
return m_snd_ack; //guess ...
}
-WRITE8_MEMBER(dacholer_state::snd_irq_w)
+void dacholer_state::snd_irq_w(uint8_t data)
{
m_snd_interrupt_enable = data;
}
-WRITE8_MEMBER(dacholer_state::music_irq_w)
+void dacholer_state::music_irq_w(uint8_t data)
{
m_music_interrupt_enable = data;
}
diff --git a/src/mame/drivers/dai3wksi.cpp b/src/mame/drivers/dai3wksi.cpp
index 2002ee353d8..91293f00cee 100644
--- a/src/mame/drivers/dai3wksi.cpp
+++ b/src/mame/drivers/dai3wksi.cpp
@@ -93,9 +93,9 @@ private:
uint8_t m_port_last2;
int m_enabled_sound;
int m_sound3_counter;
- DECLARE_WRITE8_MEMBER(dai3wksi_audio_1_w);
- DECLARE_WRITE8_MEMBER(dai3wksi_audio_2_w);
- DECLARE_WRITE8_MEMBER(dai3wksi_audio_3_w);
+ void dai3wksi_audio_1_w(uint8_t data);
+ void dai3wksi_audio_2_w(uint8_t data);
+ void dai3wksi_audio_3_w(uint8_t data);
/* i/o ports */
required_ioport m_in2;
@@ -215,7 +215,7 @@ uint32_t dai3wksi_state::screen_update_dai3wksi(screen_device &screen, bitmap_rg
#if (USE_SAMPLES)
-WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_1_w)
+void dai3wksi_state::dai3wksi_audio_1_w(uint8_t data)
{
uint8_t rising_bits = data & ~m_port_last1;
@@ -234,7 +234,7 @@ WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_1_w)
m_port_last1 = data;
}
-WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_2_w)
+void dai3wksi_state::dai3wksi_audio_2_w(uint8_t data)
{
uint8_t rising_bits = data & ~m_port_last2;
@@ -261,7 +261,7 @@ WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_2_w)
m_port_last2 = data;
}
-WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_3_w)
+void dai3wksi_state::dai3wksi_audio_3_w(uint8_t data)
{
if (m_enabled_sound)
{
@@ -290,7 +290,7 @@ static const char *const dai3wksi_sample_names[] =
#else
-WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_1_w)
+void dai3wksi_state::dai3wksi_audio_1_w(uint8_t data)
{
machine().sound().system_enable(data & 0x80);
@@ -298,7 +298,7 @@ WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_1_w)
m_ic79->envelope_1_w((~data >> 2) & 0x01); /* invader movement envelope control*/
}
-WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_2_w)
+void dai3wksi_state::dai3wksi_audio_2_w(uint8_t data)
{
m_dai3wksi_flipscreen = data & 0x10;
m_dai3wksi_redscreen = ~data & 0x20;
@@ -310,7 +310,7 @@ WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_2_w)
m_ic80->enable_w((~data >> 3) & 0x01); /* planet explosion */
}
-WRITE8_MEMBER(dai3wksi_state::dai3wksi_audio_3_w)
+void dai3wksi_state::dai3wksi_audio_3_w(uint8_t data)
{
m_ic81->enable_w((~data >> 2) & 0x01); /* player shoot enable */
m_ic81->vco_w((~data >> 3) & 0x01); /* player shoot vco control */
diff --git a/src/mame/drivers/dambustr.cpp b/src/mame/drivers/dambustr.cpp
index b8fca412737..b766a246bae 100644
--- a/src/mame/drivers/dambustr.cpp
+++ b/src/mame/drivers/dambustr.cpp
@@ -75,14 +75,14 @@ private:
required_device<galaxian_sound_device> m_custom;
int m_noise_data;
- DECLARE_WRITE8_MEMBER(dambustr_noise_enable_w);
+ void dambustr_noise_enable_w(uint8_t data);
void dambustr_map(address_map &map);
};
/* FIXME: Really needed? - Should be handled by either interface */
-WRITE8_MEMBER(dambustr_state::dambustr_noise_enable_w)
+void dambustr_state::dambustr_noise_enable_w(uint8_t data)
{
if (data != m_noise_data) {
m_noise_data = data;
diff --git a/src/mame/drivers/daruma.cpp b/src/mame/drivers/daruma.cpp
index 7b053ca0a35..f76048451c4 100644
--- a/src/mame/drivers/daruma.cpp
+++ b/src/mame/drivers/daruma.cpp
@@ -32,27 +32,27 @@ public:
void daruma(machine_config &config);
private:
- DECLARE_READ8_MEMBER(dev0_r);
- DECLARE_WRITE8_MEMBER(dev1_w);
- DECLARE_WRITE8_MEMBER(dev2_w);
- DECLARE_READ8_MEMBER(dev4_r);
+ uint8_t dev0_r();
+ void dev1_w(uint8_t data);
+ void dev2_w(uint8_t data);
+ uint8_t dev4_r();
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
void mem_io(address_map &map);
void mem_prg(address_map &map);
};
-READ8_MEMBER(daruma_state::dev0_r)
+uint8_t daruma_state::dev0_r()
{
return 0xFF;
}
-READ8_MEMBER(daruma_state::dev4_r)
+uint8_t daruma_state::dev4_r()
{
return ioport("switches")->read();
}
-WRITE8_MEMBER(daruma_state::dev1_w)
+void daruma_state::dev1_w(uint8_t data)
{
//while attempting to identify which bit is used for
//controlling the buzzer, here's what I heard from each of
@@ -68,7 +68,7 @@ WRITE8_MEMBER(daruma_state::dev1_w)
m_speaker->level_w(data & 0x02);
}
-WRITE8_MEMBER(daruma_state::dev2_w)
+void daruma_state::dev2_w(uint8_t data)
{
//while attempting to identify which bit is used for
//controlling the buzzer, here's what I heard from each of
diff --git a/src/mame/drivers/dblcrown.cpp b/src/mame/drivers/dblcrown.cpp
index ede808fea5e..df32ff8ea25 100644
--- a/src/mame/drivers/dblcrown.cpp
+++ b/src/mame/drivers/dblcrown.cpp
@@ -84,20 +84,20 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void bank_w(uint8_t data);
- DECLARE_READ8_MEMBER(irq_source_r);
- DECLARE_WRITE8_MEMBER(irq_source_w);
- DECLARE_READ8_MEMBER(palette_r);
- DECLARE_WRITE8_MEMBER(palette_w);
- DECLARE_READ8_MEMBER(vram_r);
- DECLARE_WRITE8_MEMBER(vram_w);
- DECLARE_READ8_MEMBER(vram_bank_r);
- DECLARE_WRITE8_MEMBER(vram_bank_w);
+ uint8_t irq_source_r();
+ void irq_source_w(uint8_t data);
+ uint8_t palette_r(offs_t offset);
+ void palette_w(offs_t offset, uint8_t data);
+ uint8_t vram_r(offs_t offset);
+ void vram_w(offs_t offset, uint8_t data);
+ uint8_t vram_bank_r(offs_t offset);
+ void vram_bank_w(offs_t offset, uint8_t data);
void mux_w(uint8_t data);
- DECLARE_READ8_MEMBER(in_mux_r);
- DECLARE_READ8_MEMBER(in_mux_type_r);
- DECLARE_WRITE8_MEMBER(output_w);
+ uint8_t in_mux_r();
+ uint8_t in_mux_type_r();
+ void output_w(uint8_t data);
void lamps_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(watchdog_w);
+ void watchdog_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(dblcrown_irq_scanline);
void dblcrown_palette(palette_device &palette) const;
@@ -175,17 +175,17 @@ void dblcrown_state::bank_w(uint8_t data)
membank("rom_bank")->set_entry(m_bank & 0x1f);
}
-READ8_MEMBER( dblcrown_state::irq_source_r)
+uint8_t dblcrown_state::irq_source_r()
{
return m_irq_src;
}
-WRITE8_MEMBER( dblcrown_state::irq_source_w)
+void dblcrown_state::irq_source_w(uint8_t data)
{
m_irq_src = data; // this effectively acks the irq, by writing 0
}
-READ8_MEMBER( dblcrown_state::palette_r)
+uint8_t dblcrown_state::palette_r(offs_t offset)
{
//if(m_bank & 8) /* TODO: verify this */
// offset+=0x200;
@@ -193,7 +193,7 @@ READ8_MEMBER( dblcrown_state::palette_r)
return m_pal_ram[offset];
}
-WRITE8_MEMBER( dblcrown_state::palette_w)
+void dblcrown_state::palette_w(offs_t offset, uint8_t data)
{
int r,g,b,datax;
@@ -213,7 +213,7 @@ WRITE8_MEMBER( dblcrown_state::palette_w)
}
-READ8_MEMBER( dblcrown_state::vram_r)
+uint8_t dblcrown_state::vram_r(offs_t offset)
{
uint32_t hi_offs;
hi_offs = m_vram_bank[(offset & 0x1000) >> 12] << 12;
@@ -221,7 +221,7 @@ READ8_MEMBER( dblcrown_state::vram_r)
return m_vram[(offset & 0xfff) | hi_offs];
}
-WRITE8_MEMBER( dblcrown_state::vram_w)
+void dblcrown_state::vram_w(offs_t offset, uint8_t data)
{
uint32_t hi_offs;
hi_offs = m_vram_bank[(offset & 0x1000) >> 12] << 12;
@@ -238,12 +238,12 @@ WRITE8_MEMBER( dblcrown_state::vram_w)
#endif
}
-READ8_MEMBER( dblcrown_state::vram_bank_r)
+uint8_t dblcrown_state::vram_bank_r(offs_t offset)
{
return m_vram_bank[offset];
}
-WRITE8_MEMBER( dblcrown_state::vram_bank_w)
+void dblcrown_state::vram_bank_w(offs_t offset, uint8_t data)
{
m_vram_bank[offset] = data & 0xf;
@@ -256,14 +256,11 @@ void dblcrown_state::mux_w(uint8_t data)
m_mux_data = data;
}
-READ8_MEMBER( dblcrown_state::in_mux_r )
+uint8_t dblcrown_state::in_mux_r()
{
- int i;
- uint8_t res;
+ uint8_t res = 0;
- res = 0;
-
- for(i = 0; i < 4; i++)
+ for(int i = 0; i < 4; i++)
{
if(m_mux_data & 1 << i)
res |= m_inputs[i]->read();
@@ -272,14 +269,11 @@ READ8_MEMBER( dblcrown_state::in_mux_r )
return res;
}
-READ8_MEMBER( dblcrown_state::in_mux_type_r )
+uint8_t dblcrown_state::in_mux_type_r()
{
- int i;
- uint8_t res;
-
- res = 0xff;
+ uint8_t res = 0xff;
- for(i = 0; i < 4; i++)
+ for(int i = 0; i < 4; i++)
{
if (m_inputs[i]->read() != 0xff)
res &= ~(1 << i);
@@ -288,7 +282,7 @@ READ8_MEMBER( dblcrown_state::in_mux_type_r )
return res;
}
-WRITE8_MEMBER( dblcrown_state::output_w )
+void dblcrown_state::output_w(uint8_t data)
{
/* bits
7654 3210
@@ -323,7 +317,7 @@ void dblcrown_state::lamps_w(uint8_t data)
m_lamps[n] = BIT(data, n);
}
-WRITE8_MEMBER(dblcrown_state::watchdog_w)
+void dblcrown_state::watchdog_w(uint8_t data)
/*
Always 0x01...
*/
diff --git a/src/mame/drivers/dblewing.cpp b/src/mame/drivers/dblewing.cpp
index e23eeac735a..9fbfa76b720 100644
--- a/src/mame/drivers/dblewing.cpp
+++ b/src/mame/drivers/dblewing.cpp
@@ -118,15 +118,15 @@ private:
required_device<deco104_device> m_deco104;
required_device<decospr_device> m_sprgen;
- DECLARE_READ8_MEMBER(irq_latch_r);
+ uint8_t irq_latch_r();
DECLARE_WRITE_LINE_MEMBER(soundlatch_irq_w);
uint32_t screen_update_dblewing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(bank_callback);
DECOSPR_PRIORITY_CB_MEMBER(pri_callback);
- READ16_MEMBER( wf_protection_region_0_104_r );
- WRITE16_MEMBER( wf_protection_region_0_104_w );
+ uint16_t wf_protection_region_0_104_r(offs_t offset);
+ void wf_protection_region_0_104_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void dblewing_map(address_map &map);
void decrypted_opcodes_map(address_map &map);
@@ -153,7 +153,7 @@ uint32_t dblewing_state::screen_update_dblewing(screen_device &screen, bitmap_in
return 0;
}
-READ16_MEMBER( dblewing_state::wf_protection_region_0_104_r )
+uint16_t dblewing_state::wf_protection_region_0_104_r(offs_t offset)
{
int real_address = 0 + (offset *2);
int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
@@ -162,7 +162,7 @@ READ16_MEMBER( dblewing_state::wf_protection_region_0_104_r )
return data;
}
-WRITE16_MEMBER( dblewing_state::wf_protection_region_0_104_w )
+void dblewing_state::wf_protection_region_0_104_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
int real_address = 0 + (offset *2);
int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
@@ -201,7 +201,7 @@ void dblewing_state::decrypted_opcodes_map(address_map &map)
map(0x000000, 0x07ffff).rom().share("decrypted_opcodes");
}
-READ8_MEMBER(dblewing_state::irq_latch_r)
+uint8_t dblewing_state::irq_latch_r()
{
// bit 0: irq type (0 = latch, 1 = ym)
return m_soundlatch_pending ? 0 : 1;
diff --git a/src/mame/drivers/dbox.cpp b/src/mame/drivers/dbox.cpp
index d32733f9f91..5249a8647b8 100644
--- a/src/mame/drivers/dbox.cpp
+++ b/src/mame/drivers/dbox.cpp
@@ -456,15 +456,15 @@ private:
virtual void machine_reset() override;
virtual void machine_start() override;
- DECLARE_WRITE8_MEMBER(sda5708_reset);
- DECLARE_WRITE8_MEMBER(sda5708_clk);
+ void sda5708_reset(uint8_t data);
+ void sda5708_clk(uint8_t data);
void write_pa(uint8_t data);
void dbox_map(address_map &map);
#if LOCALFLASH
- DECLARE_READ16_MEMBER(sysflash_r);
- DECLARE_WRITE16_MEMBER(sysflash_w);
+ uint16_t sysflash_r(offs_t offset);
+ void sysflash_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
private:
uint16_t * m_sysflash;
uint32_t m_sf_mode;
@@ -492,11 +492,11 @@ void dbox_state::machine_reset()
}
// TODO: Hookup the reset latch correctly
-WRITE8_MEMBER (dbox_state::sda5708_reset){
+void dbox_state::sda5708_reset(uint8_t data) {
LOGDISPLAY("%s - not implemented\n", FUNCNAME);
}
-WRITE8_MEMBER (dbox_state::sda5708_clk){
+void dbox_state::sda5708_clk(uint8_t data) {
LOGDISPLAY("%s\n", FUNCNAME);
m_display->sdclk_w(CLEAR_LINE);
m_display->data_w((0x80 & data) != 0 ? ASSERT_LINE : CLEAR_LINE);
@@ -511,7 +511,7 @@ void dbox_state::write_pa(uint8_t data) {
#if LOCALFLASH
/* Local emulation of the 29F800B 8Mbit flashes if the intelflsh bugs, relies on a complete command cycle is done per device, not in parallel */
/* TODO: Make a flash device of this and support programming per sector and persistance, as settings etc may be stored in a 8Kb sector */
-WRITE16_MEMBER (dbox_state::sysflash_w){
+void dbox_state::sysflash_w(offs_t offset, uint16_t data, uint16_t mem_mask) {
LOGFLASH("%s pc:%08x offset:%08x data:%08x mask:%08x\n", FUNCNAME, m_maincpu->pc(), offset, data, mem_mask);
/*Data bits DQ15–DQ8 are don’t cares for unlock and command cycles.*/
@@ -549,7 +549,7 @@ WRITE16_MEMBER (dbox_state::sysflash_w){
}
}
-READ16_MEMBER (dbox_state::sysflash_r){
+uint16_t dbox_state::sysflash_r(offs_t offset) {
if (m_sf_mode == 0)
{
diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp
index c8deb7a14c0..c3073009f8f 100644
--- a/src/mame/drivers/ddayjlc.cpp
+++ b/src/mame/drivers/ddayjlc.cpp
@@ -93,19 +93,19 @@ public:
private:
- DECLARE_WRITE8_MEMBER(prot_w);
- DECLARE_WRITE8_MEMBER(char_bank_w);
- DECLARE_WRITE8_MEMBER(bgvram_w);
- DECLARE_WRITE8_MEMBER(vram_w);
- DECLARE_WRITE8_MEMBER(sound_nmi_w);
- DECLARE_WRITE8_MEMBER(main_nmi_w);
- DECLARE_WRITE8_MEMBER(bg0_w);
- DECLARE_WRITE8_MEMBER(bg1_w);
- DECLARE_WRITE8_MEMBER(bg2_w);
- DECLARE_WRITE8_MEMBER(sound_w);
- DECLARE_WRITE8_MEMBER(flip_screen_w);
- DECLARE_WRITE8_MEMBER(i8257_CH0_w);
- DECLARE_WRITE8_MEMBER(i8257_LMSR_w);
+ void prot_w(offs_t offset, uint8_t data);
+ void char_bank_w(uint8_t data);
+ void bgvram_w(offs_t offset, uint8_t data);
+ void vram_w(offs_t offset, uint8_t data);
+ void sound_nmi_w(uint8_t data);
+ void main_nmi_w(uint8_t data);
+ void bg0_w(uint8_t data);
+ void bg1_w(uint8_t data);
+ void bg2_w(uint8_t data);
+ void sound_w(uint8_t data);
+ void flip_screen_w(uint8_t data);
+ void i8257_CH0_w(offs_t offset, uint8_t data);
+ void i8257_LMSR_w(address_space &space, uint8_t data);
TILE_GET_INFO_MEMBER(get_tile_info_bg);
TILE_GET_INFO_MEMBER(get_tile_info_fg);
void ddayjlc_palette(palette_device &palette) const;
@@ -286,12 +286,12 @@ CUSTOM_INPUT_MEMBER(ddayjlc_state::prot_r)
return prot_data[m_prot_addr];
}
-WRITE8_MEMBER(ddayjlc_state::prot_w)
+void ddayjlc_state::prot_w(offs_t offset, uint8_t data)
{
m_prot_addr = (m_prot_addr & (~(1 << offset))) | ((data & 1) << offset);
}
-WRITE8_MEMBER(ddayjlc_state::char_bank_w)
+void ddayjlc_state::char_bank_w(uint8_t data)
{
m_char_bank = BIT(data,0);
m_fg_tilemap->mark_all_dirty();
@@ -299,7 +299,7 @@ WRITE8_MEMBER(ddayjlc_state::char_bank_w)
logerror("Warning: char_bank_w with %02x\n",data);
}
-WRITE8_MEMBER(ddayjlc_state::bgvram_w)
+void ddayjlc_state::bgvram_w(offs_t offset, uint8_t data)
{
if (!offset)
m_bg_tilemap->set_scrollx(0, data + 8);
@@ -308,38 +308,38 @@ WRITE8_MEMBER(ddayjlc_state::bgvram_w)
m_bg_tilemap->mark_tile_dirty(offset & 0x3ff);
}
-WRITE8_MEMBER(ddayjlc_state::vram_w)
+void ddayjlc_state::vram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset & 0x3ff);
}
-WRITE8_MEMBER(ddayjlc_state::sound_nmi_w)
+void ddayjlc_state::sound_nmi_w(uint8_t data)
{
m_sound_nmi_enable = BIT(data, 0);
if (!m_sound_nmi_enable)
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
-WRITE8_MEMBER(ddayjlc_state::main_nmi_w)
+void ddayjlc_state::main_nmi_w(uint8_t data)
{
m_main_nmi_enable = BIT(data, 0);
if (!m_main_nmi_enable)
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
-WRITE8_MEMBER(ddayjlc_state::bg0_w)
+void ddayjlc_state::bg0_w(uint8_t data)
{
m_bgadr = (m_bgadr & 0xfe) | (data & 1);
}
-WRITE8_MEMBER(ddayjlc_state::bg1_w)
+void ddayjlc_state::bg1_w(uint8_t data)
{
m_bgadr = (m_bgadr & 0xfd) | ((data & 1) << 1);
}
-WRITE8_MEMBER(ddayjlc_state::bg2_w)
+void ddayjlc_state::bg2_w(uint8_t data)
{
m_bgadr = (m_bgadr & 0xfb) | ((data & 1) << 2);
if (m_bgadr > 2)
@@ -348,24 +348,24 @@ WRITE8_MEMBER(ddayjlc_state::bg2_w)
membank("bank1")->set_entry(m_bgadr);
}
-WRITE8_MEMBER(ddayjlc_state::sound_w)
+void ddayjlc_state::sound_w(uint8_t data)
{
m_soundlatch->write(data);
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
-WRITE8_MEMBER(ddayjlc_state::flip_screen_w)
+void ddayjlc_state::flip_screen_w(uint8_t data)
{
flip_screen_set(data & 1);
}
-WRITE8_MEMBER(ddayjlc_state::i8257_CH0_w)
+void ddayjlc_state::i8257_CH0_w(offs_t offset, uint8_t data)
{
m_e00x_d[offset][m_e00x_l[offset]] = data;
m_e00x_l[offset] ^= 1;
}
-WRITE8_MEMBER(ddayjlc_state::i8257_LMSR_w)
+void ddayjlc_state::i8257_LMSR_w(address_space &space, uint8_t data)
{
if (!data)
{
diff --git a/src/mame/drivers/ddealer.cpp b/src/mame/drivers/ddealer.cpp
index a47f8f67d7c..680d8f555e2 100644
--- a/src/mame/drivers/ddealer.cpp
+++ b/src/mame/drivers/ddealer.cpp
@@ -145,10 +145,10 @@ public:
void init_ddealer();
private:
- DECLARE_WRITE16_MEMBER(flipscreen_w);
- DECLARE_WRITE16_MEMBER(back_vram_w);
- DECLARE_WRITE16_MEMBER(mcu_shared_w);
- DECLARE_READ16_MEMBER(mcu_r);
+ void flipscreen_w(uint16_t data);
+ void back_vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void mcu_shared_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t mcu_r();
TILE_GET_INFO_MEMBER(get_back_tile_info);
void draw_video_layer(uint16_t* vreg_base, uint16_t* top, uint16_t* bottom, bitmap_ind16 &bitmap, const rectangle &cliprect, int flipy);
@@ -188,7 +188,7 @@ private:
-WRITE16_MEMBER(ddealer_state::flipscreen_w)
+void ddealer_state::flipscreen_w(uint16_t data)
{
flip_screen_set(data & 0x01);
}
@@ -401,7 +401,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ddealer_state::mcu_sim)
-WRITE16_MEMBER(ddealer_state::back_vram_w)
+void ddealer_state::back_vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_back_vram[offset]);
m_back_tilemap->mark_tile_dirty(offset);
@@ -429,7 +429,7 @@ Protection handling, identical to Hacha Mecha Fighter / Thunder Dragon with diff
m_mcu_shared_ram[_protinput_+1] = (_input_ & 0x0000ffff);\
}
-WRITE16_MEMBER(ddealer_state::mcu_shared_w)
+void ddealer_state::mcu_shared_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_mcu_shared_ram[offset]);
@@ -634,7 +634,7 @@ void ddealer_state::ddealer(machine_config &config)
-READ16_MEMBER(ddealer_state::mcu_r)
+uint16_t ddealer_state::mcu_r()
{
static const int resp[] =
{
@@ -657,7 +657,7 @@ READ16_MEMBER(ddealer_state::mcu_r)
void ddealer_state::init_ddealer()
{
- m_maincpu->space(AS_PROGRAM).install_read_handler(0xfe01c, 0xfe01d, read16_delegate(*this, FUNC(ddealer_state::mcu_r)));
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xfe01c, 0xfe01d, read16smo_delegate(*this, FUNC(ddealer_state::mcu_r)));
}
ROM_START( ddealer )
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index 2f14b88c7bd..1dcca59af8d 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -260,167 +260,167 @@ private:
DECLARE_WRITE_LINE_MEMBER(hanakanz_rtc_irq);
DECLARE_WRITE_LINE_MEMBER(mjflove_rtc_irq);
- DECLARE_WRITE8_MEMBER(ddenlovr_bgcolor_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_bgcolor2_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_priority_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_priority2_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_layer_enable_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_layer_enable2_w);
- DECLARE_WRITE8_MEMBER(hanakanz_blitter_reg_w);
- DECLARE_WRITE8_MEMBER(hanakanz_blitter_data_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_blitter_w);
+ void ddenlovr_bgcolor_w(uint8_t data);
+ void ddenlovr_bgcolor2_w(uint8_t data);
+ void ddenlovr_priority_w(uint8_t data);
+ void ddenlovr_priority2_w(uint8_t data);
+ void ddenlovr_layer_enable_w(uint8_t data);
+ void ddenlovr_layer_enable2_w(uint8_t data);
+ void hanakanz_blitter_reg_w(uint8_t data);
+ void hanakanz_blitter_data_w(uint8_t data);
+ void ddenlovr_blitter_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(ddenlovr_blitter_irq);
DECLARE_WRITE_LINE_MEMBER(ddenlovr_blitter_irq_ack_w);
- DECLARE_READ8_MEMBER(rongrong_gfxrom_r);
- DECLARE_READ16_MEMBER(ddenlovr_gfxrom_r);
+ uint8_t rongrong_gfxrom_r();
+ uint16_t ddenlovr_gfxrom_r();
DECLARE_WRITE_LINE_MEMBER(ddenlovr_coincounter_0_w);
DECLARE_WRITE_LINE_MEMBER(ddenlovr_coincounter_1_w);
- DECLARE_WRITE8_MEMBER(rongrong_coincounter_w);
- DECLARE_WRITE8_MEMBER(rongrong_palette_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_palette_base_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_palette_base2_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_palette_mask_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_palette_mask2_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_transparency_pen_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_transparency_pen2_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_transparency_mask_w);
- DECLARE_WRITE8_MEMBER(ddenlovr_transparency_mask2_w);
- DECLARE_READ8_MEMBER(unk_r);
- DECLARE_READ16_MEMBER(unk16_r);
+ void rongrong_coincounter_w(uint8_t data);
+ void rongrong_palette_w(offs_t offset, uint8_t data);
+ void ddenlovr_palette_base_w(offs_t offset, uint8_t data);
+ void ddenlovr_palette_base2_w(offs_t offset, uint8_t data);
+ void ddenlovr_palette_mask_w(offs_t offset, uint8_t data);
+ void ddenlovr_palette_mask2_w(offs_t offset, uint8_t data);
+ void ddenlovr_transparency_pen_w(offs_t offset, uint8_t data);
+ void ddenlovr_transparency_pen2_w(offs_t offset, uint8_t data);
+ void ddenlovr_transparency_mask_w(offs_t offset, uint8_t data);
+ void ddenlovr_transparency_mask2_w(offs_t offset, uint8_t data);
+ uint8_t unk_r();
+ uint16_t unk16_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);
- DECLARE_WRITE16_MEMBER(quiz365_protection_w);
- DECLARE_READ16_MEMBER(ddenlovj_dsw_r);
- DECLARE_WRITE8_MEMBER(ddenlovj_coincounter_w);
- DECLARE_READ16_MEMBER(ddenlovrk_protection1_r);
- DECLARE_READ16_MEMBER(ddenlovrk_protection2_r);
- DECLARE_WRITE16_MEMBER(ddenlovrk_protection2_w);
- DECLARE_READ16_MEMBER(nettoqc_input_r);
- DECLARE_READ16_MEMBER(nettoqc_protection1_r);
- DECLARE_WRITE8_MEMBER(nettoqc_coincounter_w);
- DECLARE_READ16_MEMBER(ultrchmp_protection2_r);
- DECLARE_WRITE16_MEMBER(ultrchmp_protection2_w);
+ uint16_t quiz365_input2_r();
+ void quiz365_coincounter_w(uint8_t data);
+ uint16_t quiz365_protection_r();
+ void quiz365_protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t ddenlovj_dsw_r();
+ void ddenlovj_coincounter_w(uint8_t data);
+ uint16_t ddenlovrk_protection1_r();
+ uint16_t ddenlovrk_protection2_r();
+ void ddenlovrk_protection2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t nettoqc_input_r();
+ uint16_t nettoqc_protection1_r();
+ void nettoqc_coincounter_w(uint8_t data);
+ uint16_t ultrchmp_protection2_r();
+ void ultrchmp_protection2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
uint8_t rongrong_input_r();
void rongrong_select_w(uint8_t data);
- DECLARE_READ8_MEMBER(magic_r);
+ uint8_t magic_r();
void mmpanic_rombank_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(mmpanic_blitter2_w);
+ void mmpanic_blitter2_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(mmpanic_blitter_irq);
- DECLARE_WRITE8_MEMBER(mmpanic_leds_w);
- DECLARE_WRITE8_MEMBER(mmpanic_leds2_w);
- DECLARE_WRITE8_MEMBER(mmpanic_lockout_w);
- DECLARE_READ8_MEMBER(mmpanic_link_r);
- DECLARE_READ8_MEMBER(funkyfig_busy_r);
- DECLARE_WRITE8_MEMBER(funkyfig_blitter_w);
+ void mmpanic_leds_w(uint8_t data);
+ void mmpanic_leds2_w(uint8_t data);
+ void mmpanic_lockout_w(uint8_t data);
+ uint8_t mmpanic_link_r();
+ uint8_t funkyfig_busy_r();
+ void funkyfig_blitter_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(funkyfig_blitter_irq);
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);
+ uint8_t funkyfig_coin_r();
+ uint8_t funkyfig_key_r();
+ void funkyfig_lockout_w(uint8_t data);
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);
+ void hanakanz_dsw_w(uint8_t data);
+ uint8_t hanakanz_keyb_r(offs_t offset);
uint8_t hanakanz_dsw_r();
- DECLARE_READ8_MEMBER(hanakanz_busy_r);
- DECLARE_READ8_MEMBER(hanakanz_gfxrom_r);
- DECLARE_WRITE8_MEMBER(hanakanz_coincounter_w);
- DECLARE_WRITE8_MEMBER(hanakanz_palette_w);
- DECLARE_READ8_MEMBER(hanakanz_rand_r);
- DECLARE_WRITE8_MEMBER(mjreach1_protection_w);
- DECLARE_READ8_MEMBER(mjreach1_protection_r);
- DECLARE_WRITE8_MEMBER(mjschuka_protection_w);
- DECLARE_READ8_MEMBER(mjschuka_protection_r);
- DECLARE_READ8_MEMBER(mjchuuka_keyb_r);
- DECLARE_WRITE8_MEMBER(mjchuuka_blitter_w);
- DECLARE_READ8_MEMBER(mjchuuka_gfxrom_0_r);
- DECLARE_READ8_MEMBER(mjchuuka_gfxrom_1_r);
- DECLARE_WRITE8_MEMBER(mjchuuka_palette_w);
- DECLARE_WRITE8_MEMBER(mjchuuka_coincounter_w);
+ uint8_t hanakanz_busy_r();
+ uint8_t hanakanz_gfxrom_r(offs_t offset);
+ void hanakanz_coincounter_w(uint8_t data);
+ void hanakanz_palette_w(uint8_t data);
+ uint8_t hanakanz_rand_r();
+ void mjreach1_protection_w(uint8_t data);
+ uint8_t mjreach1_protection_r();
+ void mjschuka_protection_w(uint8_t data);
+ uint8_t mjschuka_protection_r();
+ uint8_t mjchuuka_keyb_r(offs_t offset);
+ void mjchuuka_blitter_w(offs_t offset, uint8_t data);
+ uint8_t mjchuuka_gfxrom_0_r();
+ uint8_t mjchuuka_gfxrom_1_r();
+ void mjchuuka_palette_w(offs_t offset, uint8_t data);
+ void mjchuuka_coincounter_w(uint8_t data);
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);
+ void mjmyster_select2_w(uint8_t data);
+ uint8_t mjmyster_coins_r();
+ uint8_t mjmyster_keyb_r();
+ uint8_t mjmyster_dsw_r();
+ void mjmyster_coincounter_w(uint8_t data);
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);
- DECLARE_WRITE8_MEMBER(hginga_80_w);
- DECLARE_WRITE8_MEMBER(hginga_coins_w);
- DECLARE_READ8_MEMBER(hginga_input_r);
- DECLARE_WRITE8_MEMBER(hginga_blitter_w);
- DECLARE_WRITE8_MEMBER(hgokou_dsw_sel_w);
- DECLARE_READ8_MEMBER(hgokou_input_r);
- DECLARE_WRITE8_MEMBER(hgokou_input_w);
- DECLARE_READ8_MEMBER(hgokou_protection_r);
- DECLARE_READ8_MEMBER(hgokbang_input_r);
+ uint8_t hginga_protection_r();
+ void hginga_input_w(uint8_t data);
+ uint8_t hginga_coins_r();
+ void hginga_80_w(uint8_t data);
+ void hginga_coins_w(uint8_t data);
+ uint8_t hginga_input_r();
+ void hginga_blitter_w(offs_t offset, uint8_t data);
+ void hgokou_dsw_sel_w(uint8_t data);
+ uint8_t hgokou_input_r();
+ void hgokou_input_w(uint8_t data);
+ uint8_t hgokou_protection_r();
+ uint8_t hgokbang_input_r();
void hparadis_select_w(uint8_t data);
- DECLARE_READ8_MEMBER(hparadis_input_r);
+ uint8_t hparadis_input_r();
uint8_t hparadis_dsw_r();
- DECLARE_WRITE8_MEMBER(hparadis_coin_w);
- DECLARE_READ8_MEMBER(mjmywrld_coins_r);
- DECLARE_READ16_MEMBER(akamaru_protection1_r);
- DECLARE_WRITE16_MEMBER(akamaru_protection1_w);
- DECLARE_READ16_MEMBER(akamaru_protection2_r);
+ void hparadis_coin_w(uint8_t data);
+ uint8_t mjmywrld_coins_r();
+ uint16_t akamaru_protection1_r();
+ void akamaru_protection1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t akamaru_protection2_r();
DECLARE_WRITE_LINE_MEMBER(akamaru_dsw1_sel_w);
DECLARE_WRITE_LINE_MEMBER(akamaru_dsw2_sel_w);
- DECLARE_READ16_MEMBER(akamaru_dsw_r);
- DECLARE_READ16_MEMBER(akamaru_blitter_r);
- DECLARE_READ16_MEMBER(akamaru_e0010d_r);
+ uint16_t akamaru_dsw_r();
+ uint16_t akamaru_blitter_r();
+ uint16_t akamaru_e0010d_r();
void mjflove_rombank_w(uint8_t data);
- DECLARE_READ8_MEMBER(mjflove_protection_r);
- DECLARE_READ8_MEMBER(mjflove_keyb_r);
+ uint8_t mjflove_protection_r();
+ uint8_t mjflove_keyb_r(offs_t offset);
DECLARE_WRITE_LINE_MEMBER(mjflove_blitter_irq);
- DECLARE_WRITE8_MEMBER(mjflove_coincounter_w);
- DECLARE_WRITE8_MEMBER(jongtei_dsw_keyb_w);
- DECLARE_READ8_MEMBER(jongtei_busy_r);
- DECLARE_READ8_MEMBER(mjgnight_protection_r);
- DECLARE_WRITE8_MEMBER(mjgnight_protection_w);
- DECLARE_WRITE8_MEMBER(mjgnight_coincounter_w);
- DECLARE_READ8_MEMBER(sryudens_keyb_r);
+ void mjflove_coincounter_w(uint8_t data);
+ void jongtei_dsw_keyb_w(uint8_t data);
+ uint8_t jongtei_busy_r();
+ uint8_t mjgnight_protection_r();
+ void mjgnight_protection_w(uint8_t data);
+ void mjgnight_coincounter_w(uint8_t data);
+ uint8_t sryudens_keyb_r(offs_t offset);
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);
- DECLARE_READ8_MEMBER(daimyojn_protection_r);
- DECLARE_READ8_MEMBER(momotaro_protection_r);
- DECLARE_WRITE8_MEMBER(daimyojn_palette_sel_w);
- DECLARE_WRITE8_MEMBER(daimyojn_blitter_data_palette_w);
- DECLARE_READ8_MEMBER(daimyojn_year_hack_r);
- DECLARE_WRITE8_MEMBER(janshinp_coincounter_w);
- DECLARE_WRITE8_MEMBER(seljan2_rombank_w);
- DECLARE_WRITE8_MEMBER(seljan2_palette_enab_w);
- DECLARE_WRITE8_MEMBER(seljan2_palette_w);
- DECLARE_WRITE8_MEMBER(htengoku_select_w);
- DECLARE_WRITE8_MEMBER(htengoku_coin_w);
- DECLARE_READ8_MEMBER(htengoku_input_r);
- DECLARE_READ8_MEMBER(htengoku_coin_r);
- DECLARE_WRITE8_MEMBER(htengoku_rombank_w);
- DECLARE_WRITE8_MEMBER(htengoku_blit_romregion_w);
+ uint8_t daimyojn_keyb1_r();
+ uint8_t daimyojn_keyb2_r();
+ void daimyojn_protection_w(uint8_t data);
+ uint8_t daimyojn_protection_r();
+ uint8_t momotaro_protection_r();
+ void daimyojn_palette_sel_w(uint8_t data);
+ void daimyojn_blitter_data_palette_w(uint8_t data);
+ uint8_t daimyojn_year_hack_r(offs_t offset);
+ void janshinp_coincounter_w(uint8_t data);
+ void seljan2_rombank_w(uint8_t data);
+ void seljan2_palette_enab_w(uint8_t data);
+ void seljan2_palette_w(offs_t offset, uint8_t data);
+ void htengoku_select_w(uint8_t data);
+ void htengoku_coin_w(uint8_t data);
+ uint8_t htengoku_input_r();
+ uint8_t htengoku_coin_r();
+ void htengoku_rombank_w(uint8_t data);
+ void htengoku_blit_romregion_w(uint8_t data);
DECLARE_VIDEO_START(htengoku);
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);
+ void quizchq_oki_bank_w(uint8_t data);
+ void ddenlovr_oki_bank_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(quiz365_oki_bank1_w);
DECLARE_WRITE_LINE_MEMBER(quiz365_oki_bank2_w);
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);
+ void nettoqc_oki_bank_w(uint8_t data);
+ void hanakanz_oki_bank_w(uint8_t data);
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);
+ void mjflove_okibank_w(uint8_t data);
+ void jongtei_okibank_w(uint8_t data);
uint8_t seljan2_dsw_r();
- DECLARE_WRITE8_MEMBER(daimyojn_okibank_w);
+ void daimyojn_okibank_w(uint8_t data);
void ddenlovr_flipscreen_w( uint8_t data );
void ddenlovr_blit_flip_w( uint8_t data );
@@ -685,32 +685,32 @@ void ddenlovr_state::ddenlovr_blit_flip_w( uint8_t data )
m_ddenlovr_blit_flip = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_bgcolor_w)
+void ddenlovr_state::ddenlovr_bgcolor_w(uint8_t data)
{
m_ddenlovr_bgcolor = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_bgcolor2_w)
+void ddenlovr_state::ddenlovr_bgcolor2_w(uint8_t data)
{
m_ddenlovr_bgcolor2 = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_priority_w)
+void ddenlovr_state::ddenlovr_priority_w(uint8_t data)
{
m_ddenlovr_priority = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_priority2_w)
+void ddenlovr_state::ddenlovr_priority2_w(uint8_t data)
{
m_ddenlovr_priority2 = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_layer_enable_w)
+void ddenlovr_state::ddenlovr_layer_enable_w(uint8_t data)
{
m_ddenlovr_layer_enable = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_layer_enable2_w)
+void ddenlovr_state::ddenlovr_layer_enable2_w(uint8_t data)
{
m_ddenlovr_layer_enable2 = data;
}
@@ -1369,13 +1369,13 @@ g_profiler.stop();
-WRITE8_MEMBER(ddenlovr_state::hanakanz_blitter_reg_w)
+void ddenlovr_state::hanakanz_blitter_reg_w(uint8_t data)
{
m_ddenlovr_blit_latch = data;
}
// differences wrt blitter_data_w: registers are shuffled around, hi_bits in the low bits, clip_w/h, includes layers registers
-WRITE8_MEMBER(ddenlovr_state::hanakanz_blitter_data_w)
+void ddenlovr_state::hanakanz_blitter_data_w(uint8_t data)
{
int hi_bits;
@@ -1504,11 +1504,11 @@ g_profiler.start(PROFILER_VIDEO);
break;
case 0xe4:
- ddenlovr_priority_w(space, 0, data);
+ ddenlovr_priority_w(data);
break;
case 0xe6:
- ddenlovr_layer_enable_w(space, 0, data);
+ ddenlovr_layer_enable_w(data);
break;
case 0xe8:
@@ -1565,7 +1565,7 @@ g_profiler.stop();
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_blitter_w)
+void ddenlovr_state::ddenlovr_blitter_w(offs_t offset, uint8_t data)
{
blitter_w(0, offset, data);
}
@@ -1594,7 +1594,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::ddenlovr_blitter_irq_ack_w)
}
-READ8_MEMBER(ddenlovr_state::rongrong_gfxrom_r)
+uint8_t ddenlovr_state::rongrong_gfxrom_r()
{
uint8_t *rom = memregion("blitter")->base();
size_t size = memregion("blitter")->bytes();
@@ -1611,9 +1611,9 @@ READ8_MEMBER(ddenlovr_state::rongrong_gfxrom_r)
return rom[address];
}
-READ16_MEMBER(ddenlovr_state::ddenlovr_gfxrom_r)
+uint16_t ddenlovr_state::ddenlovr_gfxrom_r()
{
- return rongrong_gfxrom_r(space, offset);
+ return rongrong_gfxrom_r();
}
@@ -1772,7 +1772,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::ddenlovr_coincounter_1_w)
}
-WRITE8_MEMBER(ddenlovr_state::rongrong_palette_w)
+void ddenlovr_state::rongrong_palette_w(offs_t offset, uint8_t data)
{
int r, g, b, d1, d2, indx;
@@ -1790,55 +1790,55 @@ WRITE8_MEMBER(ddenlovr_state::rongrong_palette_w)
m_palette->set_pen_color(indx, pal5bit(r), pal5bit(g), pal5bit(b));
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_palette_base_w)
+void ddenlovr_state::ddenlovr_palette_base_w(offs_t offset, uint8_t data)
{
m_ddenlovr_palette_base[offset] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_palette_base2_w)
+void ddenlovr_state::ddenlovr_palette_base2_w(offs_t offset, uint8_t data)
{
m_ddenlovr_palette_base[offset + 4] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_palette_mask_w)
+void ddenlovr_state::ddenlovr_palette_mask_w(offs_t offset, uint8_t data)
{
m_ddenlovr_palette_mask[offset] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_palette_mask2_w)
+void ddenlovr_state::ddenlovr_palette_mask2_w(offs_t offset, uint8_t data)
{
m_ddenlovr_palette_mask[offset + 4] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_transparency_pen_w)
+void ddenlovr_state::ddenlovr_transparency_pen_w(offs_t offset, uint8_t data)
{
m_ddenlovr_transparency_pen[offset] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_transparency_pen2_w)
+void ddenlovr_state::ddenlovr_transparency_pen2_w(offs_t offset, uint8_t data)
{
m_ddenlovr_transparency_pen[offset + 4] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_transparency_mask_w)
+void ddenlovr_state::ddenlovr_transparency_mask_w(offs_t offset, uint8_t data)
{
m_ddenlovr_transparency_mask[offset] = data;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_transparency_mask2_w)
+void ddenlovr_state::ddenlovr_transparency_mask2_w(offs_t offset, uint8_t data)
{
m_ddenlovr_transparency_mask[offset + 4] = data;
}
-WRITE8_MEMBER(ddenlovr_state::quizchq_oki_bank_w )
+void ddenlovr_state::quizchq_oki_bank_w(uint8_t data)
{
m_oki->set_rom_bank(data & 1);
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovr_oki_bank_w )
+void ddenlovr_state::ddenlovr_oki_bank_w(uint8_t data)
{
m_oki->set_rom_bank(data & 7);
}
@@ -1857,14 +1857,14 @@ WRITE_LINE_MEMBER(ddenlovr_state::quiz365_oki_bank2_w)
-READ8_MEMBER(ddenlovr_state::unk_r)
+uint8_t ddenlovr_state::unk_r()
{
return 0x78;
}
-READ16_MEMBER(ddenlovr_state::unk16_r)
+uint16_t ddenlovr_state::unk16_r()
{
- return unk_r(space, offset);
+ return unk_r();
}
@@ -1902,7 +1902,7 @@ uint8_t ddenlovr_state::quiz365_input_r()
return 0xff;
}
-READ16_MEMBER(ddenlovr_state::quiz365_input2_r)
+uint16_t ddenlovr_state::quiz365_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... */
@@ -1916,7 +1916,7 @@ READ16_MEMBER(ddenlovr_state::quiz365_input2_r)
}
-WRITE8_MEMBER(ddenlovr_state::quiz365_coincounter_w)
+void ddenlovr_state::quiz365_coincounter_w(uint8_t data)
{
if (m_input_sel == 0x1c)
{
@@ -1929,7 +1929,7 @@ WRITE8_MEMBER(ddenlovr_state::quiz365_coincounter_w)
37,28,12 11 -> 88
67,4c,3a ?? -> 51
*/
-READ16_MEMBER(ddenlovr_state::quiz365_protection_r)
+uint16_t ddenlovr_state::quiz365_protection_r()
{
switch (m_quiz365_protection[0])
{
@@ -1940,7 +1940,7 @@ READ16_MEMBER(ddenlovr_state::quiz365_protection_r)
}
}
-WRITE16_MEMBER(ddenlovr_state::quiz365_protection_w)
+void ddenlovr_state::quiz365_protection_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(m_quiz365_protection + offset);
}
@@ -1981,7 +1981,7 @@ void ddenlovr_state::quiz365_map(address_map &map)
}
-READ16_MEMBER(ddenlovr_state::ddenlovj_dsw_r)
+uint16_t ddenlovr_state::ddenlovj_dsw_r()
{
uint16_t dsw = 0;
if (~m_dsw_sel & 0x01) dsw |= ioport("DSW1")->read();
@@ -1990,7 +1990,7 @@ READ16_MEMBER(ddenlovr_state::ddenlovj_dsw_r)
return dsw;
}
-WRITE8_MEMBER(ddenlovr_state::ddenlovj_coincounter_w)
+void ddenlovr_state::ddenlovj_coincounter_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, data & 0x01);
machine().bookkeeping().coin_counter_w(1, data & 0x04);
@@ -2035,7 +2035,7 @@ void ddenlovr_state::ddenlovj_map(address_map &map)
}
-READ16_MEMBER(ddenlovr_state::ddenlovrk_protection1_r)
+uint16_t ddenlovr_state::ddenlovrk_protection1_r()
{
switch (*m_protection1)
{
@@ -2044,7 +2044,7 @@ READ16_MEMBER(ddenlovr_state::ddenlovrk_protection1_r)
return *m_protection1;
}
-READ16_MEMBER(ddenlovr_state::ddenlovrk_protection2_r)
+uint16_t ddenlovr_state::ddenlovrk_protection2_r()
{
switch (*m_protection1)
{
@@ -2052,7 +2052,7 @@ READ16_MEMBER(ddenlovr_state::ddenlovrk_protection2_r)
}
return 0x80;
}
-WRITE16_MEMBER(ddenlovr_state::ddenlovrk_protection2_w)
+void ddenlovr_state::ddenlovrk_protection2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(m_protection2);
m_oki->set_rom_bank((*m_protection2) & 0x7);
@@ -2134,7 +2134,7 @@ CUSTOM_INPUT_MEMBER(ddenlovr_state::nettoqc_special_r)
return m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00;
}
-READ16_MEMBER(ddenlovr_state::nettoqc_input_r)
+uint16_t ddenlovr_state::nettoqc_input_r()
{
if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read();
if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read();
@@ -2149,7 +2149,7 @@ READ16_MEMBER(ddenlovr_state::nettoqc_input_r)
Writes 67 4c 3a to 200e0b then 19 to 200e0d. Expects to read 51 from 200c03
*/
-READ16_MEMBER(ddenlovr_state::nettoqc_protection1_r)
+uint16_t ddenlovr_state::nettoqc_protection1_r()
{
switch (*m_protection1 & 0xff)
{
@@ -2158,14 +2158,14 @@ READ16_MEMBER(ddenlovr_state::nettoqc_protection1_r)
}
}
-WRITE8_MEMBER(ddenlovr_state::nettoqc_coincounter_w)
+void ddenlovr_state::nettoqc_coincounter_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, data & 0x01);
machine().bookkeeping().coin_counter_w(1, data & 0x04);
// data & 0x80 ?
}
-WRITE8_MEMBER(ddenlovr_state::nettoqc_oki_bank_w )
+void ddenlovr_state::nettoqc_oki_bank_w(uint8_t data)
{
m_oki->set_rom_bank(data & 3);
}
@@ -2205,7 +2205,7 @@ void ddenlovr_state::nettoqc_map(address_map &map)
}
-READ16_MEMBER(ddenlovr_state::ultrchmp_protection2_r)
+uint16_t ddenlovr_state::ultrchmp_protection2_r()
{
switch (*m_protection2)
{
@@ -2214,7 +2214,7 @@ READ16_MEMBER(ddenlovr_state::ultrchmp_protection2_r)
}
return *m_protection2;
}
-WRITE16_MEMBER(ddenlovr_state::ultrchmp_protection2_w)
+void ddenlovr_state::ultrchmp_protection2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
// COMBINE_DATA(m_protection2);
m_oki->set_rom_bank(data & 0xf);
@@ -2285,7 +2285,7 @@ void ddenlovr_state::rongrong_select_w(uint8_t data)
membank("bank2")->set_entry(((data & 0xe0) >> 5));
}
-WRITE8_MEMBER(ddenlovr_state::rongrong_coincounter_w)
+void ddenlovr_state::rongrong_coincounter_w(uint8_t data)
{
// input_sel goes 0x03 -> 0x0c before writing here
if (m_input_sel == 0x0c)
@@ -2382,7 +2382,7 @@ a0 input select,a2 input read (protection?)
***************************************************************************/
-READ8_MEMBER(ddenlovr_state::magic_r)
+uint8_t ddenlovr_state::magic_r()
{
return 0x01;
}
@@ -2393,7 +2393,7 @@ void ddenlovr_state::mmpanic_rombank_w(uint8_t data)
/* Bit 4? */
}
-WRITE8_MEMBER(ddenlovr_state::mmpanic_blitter2_w)
+void ddenlovr_state::mmpanic_blitter2_w(offs_t offset, uint8_t data)
{
blitter_w(1, offset, data);
}
@@ -2410,20 +2410,20 @@ void ddenlovr_state::mmpanic_update_leds()
}
/* leds 1-8 */
-WRITE8_MEMBER(ddenlovr_state::mmpanic_leds_w)
+void ddenlovr_state::mmpanic_leds_w(uint8_t data)
{
m_mmpanic_leds = (m_mmpanic_leds & 0xff00) | data;
mmpanic_update_leds();
}
/* led 9 */
-WRITE8_MEMBER(ddenlovr_state::mmpanic_leds2_w)
+void ddenlovr_state::mmpanic_leds2_w(uint8_t data)
{
m_mmpanic_leds = (m_mmpanic_leds & 0xfeff) | (data ? 0x0100 : 0);
mmpanic_update_leds();
}
-WRITE8_MEMBER(ddenlovr_state::mmpanic_lockout_w)
+void ddenlovr_state::mmpanic_lockout_w(uint8_t data)
{
if (m_dsw_sel == 0x0c)
{
@@ -2433,7 +2433,7 @@ WRITE8_MEMBER(ddenlovr_state::mmpanic_lockout_w)
}
}
-READ8_MEMBER(ddenlovr_state::mmpanic_link_r){ return 0xff; }
+uint8_t ddenlovr_state::mmpanic_link_r(){ return 0xff; }
/* Main CPU */
@@ -2533,13 +2533,13 @@ void ddenlovr_state::funkyfig_map(address_map &map)
}
-READ8_MEMBER(ddenlovr_state::funkyfig_busy_r)
+uint8_t ddenlovr_state::funkyfig_busy_r()
{
// bit 0 ?
return 0x00; // bit 7 = blitter busy
}
-WRITE8_MEMBER(ddenlovr_state::funkyfig_blitter_w)
+void ddenlovr_state::funkyfig_blitter_w(offs_t offset, uint8_t data)
{
blitter_w_funkyfig(0, offset, data);
}
@@ -2568,7 +2568,7 @@ uint8_t ddenlovr_state::funkyfig_dsw_r()
return 0xff;
}
-READ8_MEMBER(ddenlovr_state::funkyfig_coin_r)
+uint8_t ddenlovr_state::funkyfig_coin_r()
{
switch (m_input_sel)
{
@@ -2579,7 +2579,7 @@ READ8_MEMBER(ddenlovr_state::funkyfig_coin_r)
return 0xff;
}
-READ8_MEMBER(ddenlovr_state::funkyfig_key_r)
+uint8_t ddenlovr_state::funkyfig_key_r()
{
switch (m_input_sel)
{
@@ -2590,7 +2590,7 @@ READ8_MEMBER(ddenlovr_state::funkyfig_key_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::funkyfig_lockout_w)
+void ddenlovr_state::funkyfig_lockout_w(uint8_t data)
{
switch (m_input_sel)
{
@@ -2678,12 +2678,12 @@ void ddenlovr_state::hanakanz_keyb_w(uint8_t data)
m_keyb = data;
}
-WRITE8_MEMBER(ddenlovr_state::hanakanz_dsw_w)
+void ddenlovr_state::hanakanz_dsw_w(uint8_t data)
{
m_dsw_sel = data;
}
-READ8_MEMBER(ddenlovr_state::hanakanz_keyb_r)
+uint8_t ddenlovr_state::hanakanz_keyb_r(offs_t offset)
{
uint8_t val = 0xff;
@@ -2707,12 +2707,12 @@ uint8_t ddenlovr_state::hanakanz_dsw_r()
return 0xff;
}
-READ8_MEMBER(ddenlovr_state::hanakanz_busy_r)
+uint8_t ddenlovr_state::hanakanz_busy_r()
{
return 0x80; // bit 7 == 0 -> blitter busy
}
-READ8_MEMBER(ddenlovr_state::hanakanz_gfxrom_r)
+uint8_t ddenlovr_state::hanakanz_gfxrom_r(offs_t offset)
{
uint8_t *rom = memregion("blitter")->base();
size_t size = memregion("blitter")->bytes();
@@ -2740,7 +2740,7 @@ READ8_MEMBER(ddenlovr_state::hanakanz_gfxrom_r)
}
-WRITE8_MEMBER(ddenlovr_state::hanakanz_coincounter_w)
+void ddenlovr_state::hanakanz_coincounter_w(uint8_t data)
{
// bit 0 = coin counter
// bit 1 = out counter
@@ -2758,7 +2758,7 @@ WRITE8_MEMBER(ddenlovr_state::hanakanz_coincounter_w)
#endif
}
-WRITE8_MEMBER(ddenlovr_state::hanakanz_palette_w)
+void ddenlovr_state::hanakanz_palette_w(uint8_t data)
{
if (m_ddenlovr_blit_latch & 0x80)
{
@@ -2776,12 +2776,12 @@ WRITE8_MEMBER(ddenlovr_state::hanakanz_palette_w)
}
}
-WRITE8_MEMBER(ddenlovr_state::hanakanz_oki_bank_w )
+void ddenlovr_state::hanakanz_oki_bank_w(uint8_t data)
{
m_oki->set_rom_bank((data >> 6) & 1);
}
-READ8_MEMBER(ddenlovr_state::hanakanz_rand_r)
+uint8_t ddenlovr_state::hanakanz_rand_r()
{
return machine().rand();
}
@@ -2880,12 +2880,12 @@ void ddenlovr_state::kotbinsp_portmap(address_map &map)
}
-WRITE8_MEMBER(ddenlovr_state::mjreach1_protection_w)
+void ddenlovr_state::mjreach1_protection_w(uint8_t data)
{
m_prot_val = data;
}
-READ8_MEMBER(ddenlovr_state::mjreach1_protection_r)
+uint8_t ddenlovr_state::mjreach1_protection_r()
{
return m_prot_val;
}
@@ -2917,7 +2917,7 @@ void ddenlovr_state::mjreach1_portmap(address_map &map)
Mahjong Chuukanejyo
***************************************************************************/
-READ8_MEMBER(ddenlovr_state::mjchuuka_keyb_r)
+uint8_t ddenlovr_state::mjchuuka_keyb_r(offs_t offset)
{
uint8_t val = 0xff;
@@ -2935,10 +2935,10 @@ READ8_MEMBER(ddenlovr_state::mjchuuka_keyb_r)
return val;
}
-WRITE8_MEMBER(ddenlovr_state::mjchuuka_blitter_w)
+void ddenlovr_state::mjchuuka_blitter_w(offs_t offset, uint8_t data)
{
- hanakanz_blitter_reg_w(space, 0, offset >> 8);
- hanakanz_blitter_data_w(space, 0, data);
+ hanakanz_blitter_reg_w(offset >> 8);
+ hanakanz_blitter_data_w(data);
}
void ddenlovr_state::mjchuuka_get_romdata()
@@ -2957,19 +2957,19 @@ void ddenlovr_state::mjchuuka_get_romdata()
m_romdata[1] = rom[address + 1];
}
-READ8_MEMBER(ddenlovr_state::mjchuuka_gfxrom_0_r)
+uint8_t ddenlovr_state::mjchuuka_gfxrom_0_r()
{
mjchuuka_get_romdata();
m_ddenlovr_blit_address++;
return m_romdata[0];
}
-READ8_MEMBER(ddenlovr_state::mjchuuka_gfxrom_1_r)
+uint8_t ddenlovr_state::mjchuuka_gfxrom_1_r()
{
return m_romdata[1];
}
-WRITE8_MEMBER(ddenlovr_state::mjchuuka_palette_w)
+void ddenlovr_state::mjchuuka_palette_w(offs_t offset, uint8_t data)
{
uint16_t rgb = (offset & 0xff00) | data;
@@ -2989,7 +2989,7 @@ WRITE8_MEMBER(ddenlovr_state::mjchuuka_palette_w)
}
}
-WRITE8_MEMBER(ddenlovr_state::mjchuuka_coincounter_w)
+void ddenlovr_state::mjchuuka_coincounter_w(uint8_t data)
{
// bit 0 = in counter
// bit 1 = out counter
@@ -3046,12 +3046,12 @@ void ddenlovr_state::mjchuuka_portmap(address_map &map)
// 255F: 13 34 7A 96 A8
// 2564: 13 34 7A 96 13
-WRITE8_MEMBER(ddenlovr_state::mjschuka_protection_w)
+void ddenlovr_state::mjschuka_protection_w(uint8_t data)
{
m_prot_val = data;
}
-READ8_MEMBER(ddenlovr_state::mjschuka_protection_r)
+uint8_t ddenlovr_state::mjschuka_protection_r()
{
switch (m_prot_val)
{
@@ -3119,7 +3119,7 @@ void ddenlovr_state::mjmyster_rambank_w(uint8_t data)
//logerror("%04x: rambank = %02x\n", m_maincpu->pc(), data);
}
-WRITE8_MEMBER(ddenlovr_state::mjmyster_select2_w)
+void ddenlovr_state::mjmyster_select2_w(uint8_t data)
{
m_input_sel = data;
@@ -3127,7 +3127,7 @@ WRITE8_MEMBER(ddenlovr_state::mjmyster_select2_w)
m_keyb = 1;
}
-READ8_MEMBER(ddenlovr_state::mjmyster_coins_r)
+uint8_t ddenlovr_state::mjmyster_coins_r()
{
switch (m_input_sel)
{
@@ -3142,7 +3142,7 @@ READ8_MEMBER(ddenlovr_state::mjmyster_coins_r)
return 0xff;
}
-READ8_MEMBER(ddenlovr_state::mjmyster_keyb_r)
+uint8_t ddenlovr_state::mjmyster_keyb_r()
{
uint8_t ret = 0xff;
@@ -3158,7 +3158,7 @@ READ8_MEMBER(ddenlovr_state::mjmyster_keyb_r)
return ret;
}
-READ8_MEMBER(ddenlovr_state::mjmyster_dsw_r)
+uint8_t ddenlovr_state::mjmyster_dsw_r()
{
if (!BIT(m_dsw_sel, 0)) return ioport("DSW4")->read();
if (!BIT(m_dsw_sel, 1)) return ioport("DSW3")->read();
@@ -3169,7 +3169,7 @@ READ8_MEMBER(ddenlovr_state::mjmyster_dsw_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::mjmyster_coincounter_w)
+void ddenlovr_state::mjmyster_coincounter_w(uint8_t data)
{
switch (m_input_sel)
{
@@ -3225,12 +3225,12 @@ void ddenlovr_state::hginga_rombank_w(uint8_t data)
}
// similar to rongrong
-READ8_MEMBER(ddenlovr_state::hginga_protection_r)
+uint8_t ddenlovr_state::hginga_protection_r()
{
uint8_t *rom = memregion("maincpu")->base();
if (m_hginga_rombank & 0x10)
- return hanakanz_rand_r(space, 0);
+ return hanakanz_rand_r();
return rom[0x10000 + 0x8000 * (m_hginga_rombank & 0x7) + 0xf601 - 0x8000];
}
@@ -3257,13 +3257,13 @@ uint8_t ddenlovr_state::hginga_dsw_r()
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::hginga_input_w)
+void ddenlovr_state::hginga_input_w(uint8_t data)
{
m_input_sel = data;
m_keyb = 0;
}
-READ8_MEMBER(ddenlovr_state::hginga_coins_r)
+uint8_t ddenlovr_state::hginga_coins_r()
{
switch (m_input_sel)
{
@@ -3276,12 +3276,12 @@ READ8_MEMBER(ddenlovr_state::hginga_coins_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::hginga_80_w)
+void ddenlovr_state::hginga_80_w(uint8_t data)
{
// popmessage("port 80 = %02x", data);
}
-WRITE8_MEMBER(ddenlovr_state::hginga_coins_w)
+void ddenlovr_state::hginga_coins_w(uint8_t data)
{
switch (m_input_sel)
{
@@ -3305,7 +3305,7 @@ WRITE8_MEMBER(ddenlovr_state::hginga_coins_w)
}
}
-READ8_MEMBER(ddenlovr_state::hginga_input_r)
+uint8_t ddenlovr_state::hginga_input_r()
{
static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
@@ -3327,7 +3327,7 @@ READ8_MEMBER(ddenlovr_state::hginga_input_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::hginga_blitter_w)
+void ddenlovr_state::hginga_blitter_w(offs_t offset, uint8_t data)
{
if (offset == 0)
{
@@ -3400,12 +3400,12 @@ uint8_t ddenlovr_state::hgokou_player_r(int player )
return 0x7f; // bit 7 = blitter busy, bit 6 = hopper
}
-WRITE8_MEMBER(ddenlovr_state::hgokou_dsw_sel_w)
+void ddenlovr_state::hgokou_dsw_sel_w(uint8_t data)
{
m_dsw_sel = data;
}
-READ8_MEMBER(ddenlovr_state::hgokou_input_r)
+uint8_t ddenlovr_state::hgokou_input_r()
{
switch (m_dsw_sel)
{
@@ -3418,7 +3418,7 @@ READ8_MEMBER(ddenlovr_state::hgokou_input_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::hgokou_input_w)
+void ddenlovr_state::hgokou_input_w(uint8_t data)
{
switch (m_dsw_sel)
{
@@ -3446,12 +3446,12 @@ WRITE8_MEMBER(ddenlovr_state::hgokou_input_w)
}
// similar to rongrong
-READ8_MEMBER(ddenlovr_state::hgokou_protection_r)
+uint8_t ddenlovr_state::hgokou_protection_r()
{
uint8_t *rom = memregion("maincpu")->base();
if (m_hginga_rombank == 0)
- return hanakanz_rand_r(space, 0);
+ return hanakanz_rand_r();
return rom[0x10000 + 0x8000 * (m_hginga_rombank & 0x7) + 0xe601 - 0x8000];
}
@@ -3497,7 +3497,7 @@ void ddenlovr_state::hgokou_portmap(address_map &map)
Hanafuda Hana Gokou Bangaihen
***************************************************************************/
-READ8_MEMBER(ddenlovr_state::hgokbang_input_r)
+uint8_t ddenlovr_state::hgokbang_input_r()
{
uint8_t ret;
switch (m_dsw_sel)
@@ -3562,7 +3562,7 @@ void ddenlovr_state::hparadis_select_w(uint8_t data)
}
-READ8_MEMBER(ddenlovr_state::hparadis_input_r)
+uint8_t ddenlovr_state::hparadis_input_r()
{
static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
@@ -3590,7 +3590,7 @@ uint8_t ddenlovr_state::hparadis_dsw_r()
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::hparadis_coin_w)
+void ddenlovr_state::hparadis_coin_w(uint8_t data)
{
switch (m_input_sel)
{
@@ -3636,7 +3636,7 @@ void ddenlovr_state::hparadis_portmap(address_map &map)
Mahjong Mysterious World
***************************************************************************/
-READ8_MEMBER(ddenlovr_state::mjmywrld_coins_r)
+uint8_t ddenlovr_state::mjmywrld_coins_r()
{
switch (m_input_sel)
{
@@ -3683,12 +3683,12 @@ void ddenlovr_state::mjmywrld_portmap(address_map &map)
Panel & Variety Akamaru Q Jousyou Dont-R
***************************************************************************/
-READ16_MEMBER(ddenlovr_state::akamaru_protection1_r)
+uint16_t ddenlovr_state::akamaru_protection1_r()
{
return (m_prot_16 & 0x0008) ? 0x0001 : 0x0000;
}
-WRITE16_MEMBER(ddenlovr_state::akamaru_protection1_w)
+void ddenlovr_state::akamaru_protection1_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
int bank;
@@ -3700,7 +3700,7 @@ WRITE16_MEMBER(ddenlovr_state::akamaru_protection1_w)
// popmessage("bank $%0x (%d)", m_prot_16, bank);
}
-READ16_MEMBER(ddenlovr_state::akamaru_protection2_r)
+uint16_t ddenlovr_state::akamaru_protection2_r()
{
return 0x55;
}
@@ -3715,7 +3715,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::akamaru_dsw2_sel_w)
m_dsw_sel = (m_dsw_sel & 1) | (state << 1);
}
-READ16_MEMBER(ddenlovr_state::akamaru_dsw_r)
+uint16_t ddenlovr_state::akamaru_dsw_r()
{
uint16_t dsw = 0;
@@ -3724,12 +3724,12 @@ READ16_MEMBER(ddenlovr_state::akamaru_dsw_r)
return dsw;
}
-READ16_MEMBER(ddenlovr_state::akamaru_blitter_r)
+uint16_t ddenlovr_state::akamaru_blitter_r()
{
return m_ddenlovr_blitter_irq_flag << 6; // bit 7 = 1 -> blitter busy
}
-READ16_MEMBER(ddenlovr_state::akamaru_e0010d_r)
+uint16_t ddenlovr_state::akamaru_e0010d_r()
{
return 0xffff; // read but not used, it seems
}
@@ -3788,18 +3788,18 @@ void ddenlovr_state::mjflove_rombank_w(uint8_t data)
// bit 4 enables palette ram
}
-WRITE8_MEMBER(ddenlovr_state::mjflove_okibank_w )
+void ddenlovr_state::mjflove_okibank_w(uint8_t data)
{
m_oki->set_rom_bank(data & 0x07);
//popmessage("SOUND = %02x", data);
}
-READ8_MEMBER(ddenlovr_state::mjflove_protection_r)
+uint8_t ddenlovr_state::mjflove_protection_r()
{
return 0x27;
}
-READ8_MEMBER(ddenlovr_state::mjflove_keyb_r)
+uint8_t ddenlovr_state::mjflove_keyb_r(offs_t offset)
{
uint8_t val = 0xff;
@@ -3820,7 +3820,7 @@ CUSTOM_INPUT_MEMBER(ddenlovr_state::mjflove_blitter_r)
return m_mjflove_irq_cause;
}
-WRITE8_MEMBER(ddenlovr_state::mjflove_coincounter_w)
+void ddenlovr_state::mjflove_coincounter_w(uint8_t data)
{
// bit 0 = in counter
machine().bookkeeping().coin_counter_w(0, data & 0x01);
@@ -3864,18 +3864,18 @@ void ddenlovr_state::mjflove_portmap(address_map &map)
Mahjong Jong-Tei
***************************************************************************/
-WRITE8_MEMBER(ddenlovr_state::jongtei_okibank_w )
+void ddenlovr_state::jongtei_okibank_w(uint8_t data)
{
m_oki->set_rom_bank((data >> 4) & 0x07);
}
-WRITE8_MEMBER(ddenlovr_state::jongtei_dsw_keyb_w)
+void ddenlovr_state::jongtei_dsw_keyb_w(uint8_t data)
{
m_dsw_sel = data;
m_keyb = data;
}
-READ8_MEMBER(ddenlovr_state::jongtei_busy_r)
+uint8_t ddenlovr_state::jongtei_busy_r()
{
return 0x04; // !bit 2 = blitter busy
}
@@ -3905,7 +3905,7 @@ void ddenlovr_state::jongtei_portmap(address_map &map)
Mahjong Gorgeous Night
***************************************************************************/
-WRITE8_MEMBER(ddenlovr_state::mjgnight_coincounter_w)
+void ddenlovr_state::mjgnight_coincounter_w(uint8_t data)
{
m_prot_val = data;
@@ -3922,12 +3922,12 @@ WRITE8_MEMBER(ddenlovr_state::mjgnight_coincounter_w)
#endif
}
-WRITE8_MEMBER(ddenlovr_state::mjgnight_protection_w)
+void ddenlovr_state::mjgnight_protection_w(uint8_t data)
{
m_prot_val = data;
}
-READ8_MEMBER(ddenlovr_state::mjgnight_protection_r)
+uint8_t ddenlovr_state::mjgnight_protection_r()
{
switch (m_prot_val)
{
@@ -3972,7 +3972,7 @@ void ddenlovr_state::sryudens_map(address_map &map)
map(0xe000, 0xe1ff).w(FUNC(ddenlovr_state::rongrong_palette_w));
}
-READ8_MEMBER(ddenlovr_state::sryudens_keyb_r)
+uint8_t ddenlovr_state::sryudens_keyb_r(offs_t offset)
{
uint8_t val = 0x3f;
@@ -4049,7 +4049,7 @@ void ddenlovr_state::sryudens_portmap(address_map &map)
Mahjong Janshin Plus
***************************************************************************/
-WRITE8_MEMBER(ddenlovr_state::janshinp_coincounter_w)
+void ddenlovr_state::janshinp_coincounter_w(uint8_t data)
{
// bit 0 = coin counter
// bit 1 = out counter
@@ -4112,23 +4112,23 @@ void ddenlovr_state::janshinp_portmap(address_map &map)
Return Of Sel Jan II
***************************************************************************/
-WRITE8_MEMBER(ddenlovr_state::seljan2_rombank_w)
+void ddenlovr_state::seljan2_rombank_w(uint8_t data)
{
membank("bank1")->set_entry(data & 0x0f); // disable palette?
}
-WRITE8_MEMBER(ddenlovr_state::seljan2_palette_enab_w)
+void ddenlovr_state::seljan2_palette_enab_w(uint8_t data)
{
membank("bank1")->set_entry((membank("bank1")->entry() & 0x0f) | ((data & 0x01) << 4));
if (data & ~0x01)
logerror("%s: warning, unknown palette_enab bits written = %02x\n", machine().describe_context(), data);
}
-WRITE8_MEMBER(ddenlovr_state::seljan2_palette_w)
+void ddenlovr_state::seljan2_palette_w(offs_t offset, uint8_t data)
{
if ((membank("bank1")->entry() & 0x10) && offset >= 0xb000-0x8000 && offset <= 0xb1ff-0x8000)
{
- rongrong_palette_w(space, offset - (0xb000-0x8000), data);
+ rongrong_palette_w(offset - (0xb000-0x8000), data);
memregion("maincpu")->base()[0x90000 + offset] = data;
}
else
@@ -4216,7 +4216,7 @@ uint32_t ddenlovr_state::screen_update_htengoku(screen_device &screen, bitmap_rg
return screen_update_ddenlovr(screen, bitmap, cliprect);
}
-WRITE8_MEMBER(ddenlovr_state::htengoku_select_w)
+void ddenlovr_state::htengoku_select_w(uint8_t data)
{
m_input_sel = data;
m_keyb = 0;
@@ -4239,7 +4239,7 @@ uint8_t ddenlovr_state::htengoku_dsw_r()
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::htengoku_coin_w)
+void ddenlovr_state::htengoku_coin_w(uint8_t data)
{
switch (m_input_sel)
{
@@ -4262,7 +4262,7 @@ WRITE8_MEMBER(ddenlovr_state::htengoku_coin_w)
}
}
-READ8_MEMBER(ddenlovr_state::htengoku_input_r)
+uint8_t ddenlovr_state::htengoku_input_r()
{
static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
@@ -4277,7 +4277,7 @@ READ8_MEMBER(ddenlovr_state::htengoku_input_r)
return 0xff;
}
-READ8_MEMBER(ddenlovr_state::htengoku_coin_r)
+uint8_t ddenlovr_state::htengoku_coin_r()
{
switch (m_input_sel)
{
@@ -4290,18 +4290,18 @@ READ8_MEMBER(ddenlovr_state::htengoku_coin_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::htengoku_rombank_w)
+void ddenlovr_state::htengoku_rombank_w(uint8_t data)
{
m_bankdev->set_bank(data & 0x1f);
}
-WRITE8_MEMBER(ddenlovr_state::htengoku_blit_romregion_w)
+void ddenlovr_state::htengoku_blit_romregion_w(uint8_t data)
{
switch (data)
{
- case 0x80: dynax_blit_romregion_w(space, 0, 0); return;
- case 0x81: dynax_blit_romregion_w(space, 0, 1); return;
- case 0x00: dynax_blit_romregion_w(space, 0, 2); return;
+ case 0x80: dynax_blit_romregion_w(0); return;
+ case 0x81: dynax_blit_romregion_w(1); return;
+ case 0x00: dynax_blit_romregion_w(2); return;
}
logerror("%04x: unmapped romregion=%02X\n", m_maincpu->pc(), data);
}
@@ -4423,7 +4423,7 @@ void ddenlovr_state::htengoku(machine_config &config)
Mahjong Daimyojin
***************************************************************************/
-READ8_MEMBER(ddenlovr_state::daimyojn_keyb1_r)
+uint8_t ddenlovr_state::daimyojn_keyb1_r()
{
uint8_t val = 0x3f;
@@ -4439,7 +4439,7 @@ READ8_MEMBER(ddenlovr_state::daimyojn_keyb1_r)
return val;
}
-READ8_MEMBER(ddenlovr_state::daimyojn_keyb2_r)
+uint8_t ddenlovr_state::daimyojn_keyb2_r()
{
uint8_t val = 0x3f;
@@ -4456,12 +4456,12 @@ READ8_MEMBER(ddenlovr_state::daimyojn_keyb2_r)
// 1B18: D4 ED 76 C9 CB
// 1B1D: 96 AF 34 8B 89
-WRITE8_MEMBER(ddenlovr_state::daimyojn_protection_w)
+void ddenlovr_state::daimyojn_protection_w(uint8_t data)
{
m_prot_val = data;
}
-READ8_MEMBER(ddenlovr_state::daimyojn_protection_r)
+uint8_t ddenlovr_state::daimyojn_protection_r()
{
switch (m_prot_val)
{
@@ -4477,7 +4477,7 @@ READ8_MEMBER(ddenlovr_state::daimyojn_protection_r)
// 1ADD: D4 ED 76 C9 CB
// 1AE2: D9 E0 7B C4 C6
-READ8_MEMBER(ddenlovr_state::momotaro_protection_r)
+uint8_t ddenlovr_state::momotaro_protection_r()
{
switch (m_prot_val)
{
@@ -4491,25 +4491,25 @@ READ8_MEMBER(ddenlovr_state::momotaro_protection_r)
return 0xff;
}
-WRITE8_MEMBER(ddenlovr_state::daimyojn_okibank_w )
+void ddenlovr_state::daimyojn_okibank_w(uint8_t data)
{
m_oki->set_rom_bank((data >> 4) & 0x01);
}
-WRITE8_MEMBER(ddenlovr_state::daimyojn_palette_sel_w)
+void ddenlovr_state::daimyojn_palette_sel_w(uint8_t data)
{
m_daimyojn_palette_sel = data;
}
-WRITE8_MEMBER(ddenlovr_state::daimyojn_blitter_data_palette_w)
+void ddenlovr_state::daimyojn_blitter_data_palette_w(uint8_t data)
{
if (m_daimyojn_palette_sel & 0x01)
- hanakanz_palette_w(space, offset, data);
+ hanakanz_palette_w(data);
else
- hanakanz_blitter_data_w(space, offset, data);
+ hanakanz_blitter_data_w(data);
}
-READ8_MEMBER(ddenlovr_state::daimyojn_year_hack_r)
+uint8_t ddenlovr_state::daimyojn_year_hack_r(offs_t offset)
{
// See code at C8D7, 633f holds reg B of the RTC
return offset ? 1 : 0; // year = 0x10 (BCD)
@@ -12952,7 +12952,7 @@ ROM_END
void ddenlovr_state::init_momotaro()
{
- m_maincpu->space(AS_IO).install_read_handler(0xe0, 0xe0, read8_delegate(*this, FUNC(ddenlovr_state::momotaro_protection_r)));
+ m_maincpu->space(AS_IO).install_read_handler(0xe0, 0xe0, read8smo_delegate(*this, FUNC(ddenlovr_state::momotaro_protection_r)));
}
/***************************************************************************
diff --git a/src/mame/drivers/de_2.cpp b/src/mame/drivers/de_2.cpp
index 7cd38dffaa1..b2fb0c226b8 100644
--- a/src/mame/drivers/de_2.cpp
+++ b/src/mame/drivers/de_2.cpp
@@ -58,7 +58,7 @@ private:
void de_2_map(address_map &map);
void de_2_audio_map(address_map &map);
- DECLARE_WRITE8_MEMBER(sample_w);
+ void sample_w(uint8_t data);
void pia34_pa_w(uint8_t data);
void type2alpha3_pia34_pa_w(uint8_t data);
void alpha3_pia34_pa_w(uint8_t data);
@@ -77,13 +77,13 @@ private:
void lamp1_w(uint8_t data) { }
DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w);
DECLARE_WRITE_LINE_MEMBER(msm5205_irq_w);
- DECLARE_WRITE8_MEMBER(sol2_w) { } // solenoids 8-15
- DECLARE_WRITE8_MEMBER(sol3_w);
+ void sol2_w(uint8_t data) { } // solenoids 8-15
+ void sol3_w(uint8_t data);
void sound_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w);
- DECLARE_READ8_MEMBER(sound_latch_r);
- DECLARE_WRITE8_MEMBER(sample_bank_w);
+ uint8_t sound_latch_r();
+ void sample_bank_w(uint8_t data);
// devcb callbacks
uint8_t display_r(offs_t offset);
@@ -259,7 +259,7 @@ WRITE_LINE_MEMBER(de_2_state::msm5205_irq_w)
}
// 6821 PIA at 0x2100
-WRITE8_MEMBER( de_2_state::sol3_w )
+void de_2_state::sol3_w(uint8_t data)
{
}
@@ -410,18 +410,18 @@ void de_2_state::alpha3_pia34_pa_w(uint8_t data)
// Sound board
-WRITE8_MEMBER(de_2_state::sample_w)
+void de_2_state::sample_w(uint8_t data)
{
m_sample_data = data;
}
-READ8_MEMBER( de_2_state::sound_latch_r )
+uint8_t de_2_state::sound_latch_r()
{
m_audiocpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
return m_sound_data;
}
-WRITE8_MEMBER( de_2_state::sample_bank_w )
+void de_2_state::sample_bank_w(uint8_t data)
{
static constexpr uint8_t prescale[4] = { msm5205_device::S96_4B, msm5205_device::S48_4B, msm5205_device::S64_4B, 0 };
diff --git a/src/mame/drivers/de_3.cpp b/src/mame/drivers/de_3.cpp
index 8efdc8e3fec..280ea3e0269 100644
--- a/src/mame/drivers/de_3.cpp
+++ b/src/mame/drivers/de_3.cpp
@@ -57,15 +57,15 @@ private:
void lamp1_w(uint8_t data) { }
//DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w);
//DECLARE_WRITE_LINE_MEMBER(msm5205_irq_w);
- DECLARE_WRITE8_MEMBER(sol2_w) { } // solenoids 8-15
- DECLARE_WRITE8_MEMBER(sol3_w);
+ void sol2_w(uint8_t data) { } // solenoids 8-15
+ void sol3_w(uint8_t data);
void sound_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(dac_w) { }
+ void dac_w(uint8_t data) { }
DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w);
uint8_t dmd_status_r();
-// DECLARE_READ8_MEMBER(sound_latch_r);
-// DECLARE_WRITE8_MEMBER(sample_bank_w);
+// uint8_t sound_latch_r();
+// void sample_bank_w(uint8_t data);
// devcb callbacks
uint8_t display_r(offs_t offset);
@@ -166,7 +166,7 @@ static INPUT_PORTS_START( de_3 )
INPUT_PORTS_END
// 6821 PIA at 0x2000
-WRITE8_MEMBER( de_3_state::sol3_w )
+void de_3_state::sol3_w(uint8_t data)
{
}
diff --git a/src/mame/drivers/debut.cpp b/src/mame/drivers/debut.cpp
index d7ac21da7a6..5c7ea258245 100644
--- a/src/mame/drivers/debut.cpp
+++ b/src/mame/drivers/debut.cpp
@@ -94,8 +94,8 @@ private:
// I/O handlers
INTERRUPT_GEN_MEMBER(interrupt);
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_WRITE8_MEMBER(latch_w);
+ u8 input_r(offs_t offset);
+ void latch_w(offs_t offset, u8 data);
DECLARE_WRITE_LINE_MEMBER(lcd_update_w);
u8 m_latch[5];
@@ -130,7 +130,7 @@ INTERRUPT_GEN_MEMBER(debut_state::interrupt)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // I8086
}
-READ8_MEMBER(debut_state::input_r)
+u8 debut_state::input_r(offs_t offset)
{
u8 data = 0;
u8 sel = m_latch[0] & 0xf;
@@ -147,7 +147,7 @@ READ8_MEMBER(debut_state::input_r)
return ~data;
}
-WRITE8_MEMBER(debut_state::latch_w)
+void debut_state::latch_w(offs_t offset, u8 data)
{
u8 mask = 1 << offset;
u8 prev = m_latch[0];
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index 0711456fc65..b868845c06a 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -48,14 +48,14 @@ public:
void wcvol95(machine_config &config);
private:
- DECLARE_WRITE32_MEMBER(hvysmsh_eeprom_w);
- DECLARE_READ32_MEMBER(pf1_rowscroll_r);
- DECLARE_READ32_MEMBER(pf2_rowscroll_r);
- DECLARE_READ32_MEMBER(spriteram_r);
- DECLARE_WRITE32_MEMBER(pf1_rowscroll_w);
- DECLARE_WRITE32_MEMBER(pf2_rowscroll_w);
- DECLARE_WRITE32_MEMBER(spriteram_w);
- DECLARE_WRITE32_MEMBER(hvysmsh_oki_0_bank_w);
+ void hvysmsh_eeprom_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t pf1_rowscroll_r(offs_t offset);
+ uint32_t pf2_rowscroll_r(offs_t offset);
+ uint32_t spriteram_r(offs_t offset);
+ void pf1_rowscroll_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void pf2_rowscroll_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void spriteram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void hvysmsh_oki_0_bank_w(uint32_t data);
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_interrupt);
@@ -110,7 +110,7 @@ uint32_t deco156_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
/***************************************************************************/
-WRITE32_MEMBER(deco156_state::hvysmsh_eeprom_w)
+void deco156_state::hvysmsh_eeprom_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (ACCESSING_BITS_0_7)
{
@@ -119,17 +119,17 @@ WRITE32_MEMBER(deco156_state::hvysmsh_eeprom_w)
}
}
-WRITE32_MEMBER(deco156_state::hvysmsh_oki_0_bank_w)
+void deco156_state::hvysmsh_oki_0_bank_w(uint32_t data)
{
m_oki1->set_rom_bank(data & 1);
}
-READ32_MEMBER(deco156_state::pf1_rowscroll_r){ return m_pf1_rowscroll[offset] ^ 0xffff0000; }
-READ32_MEMBER(deco156_state::pf2_rowscroll_r){ return m_pf2_rowscroll[offset] ^ 0xffff0000; }
-READ32_MEMBER(deco156_state::spriteram_r){ return m_spriteram[offset] ^ 0xffff0000; }
-WRITE32_MEMBER(deco156_state::pf1_rowscroll_w){ data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_pf1_rowscroll[offset]); }
-WRITE32_MEMBER(deco156_state::pf2_rowscroll_w){ data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_pf2_rowscroll[offset]); }
-WRITE32_MEMBER(deco156_state::spriteram_w){ data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_spriteram[offset]); }
+uint32_t deco156_state::pf1_rowscroll_r(offs_t offset) { return m_pf1_rowscroll[offset] ^ 0xffff0000; }
+uint32_t deco156_state::pf2_rowscroll_r(offs_t offset) { return m_pf2_rowscroll[offset] ^ 0xffff0000; }
+uint32_t deco156_state::spriteram_r(offs_t offset) { return m_spriteram[offset] ^ 0xffff0000; }
+void deco156_state::pf1_rowscroll_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_pf1_rowscroll[offset]); }
+void deco156_state::pf2_rowscroll_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_pf2_rowscroll[offset]); }
+void deco156_state::spriteram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_spriteram[offset]); }
void deco156_state::hvysmsh_map(address_map &map)
diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp
index 4bd6956bff9..5f9587bc537 100644
--- a/src/mame/drivers/deco_ld.cpp
+++ b/src/mame/drivers/deco_ld.cpp
@@ -159,9 +159,9 @@ private:
required_shared_ptr<uint8_t> m_attr1;
int m_nmimask;
- DECLARE_READ8_MEMBER(acia_status_hack_r);
- DECLARE_READ8_MEMBER(sound_status_r);
- DECLARE_WRITE8_MEMBER(decold_sound_cmd_w);
+ uint8_t acia_status_hack_r();
+ uint8_t sound_status_r();
+ void decold_sound_cmd_w(uint8_t data);
virtual void machine_start() override;
uint32_t screen_update_rblaster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(sound_interrupt);
@@ -251,20 +251,20 @@ uint32_t deco_ld_state::screen_update_rblaster(screen_device &screen, bitmap_rgb
}
-WRITE8_MEMBER(deco_ld_state::decold_sound_cmd_w)
+void deco_ld_state::decold_sound_cmd_w(uint8_t data)
{
m_soundlatch->write(data);
m_audiocpu->set_input_line(0, HOLD_LINE);
}
/* unknown, but certainly related to audiocpu somehow */
-READ8_MEMBER(deco_ld_state::sound_status_r)
+uint8_t deco_ld_state::sound_status_r()
{
return 0xff ^ 0x40;
}
// TODO: needs LD BIOS dumped
-READ8_MEMBER(deco_ld_state::acia_status_hack_r)
+uint8_t deco_ld_state::acia_status_hack_r()
{
return 0xff;
}
@@ -292,10 +292,10 @@ void deco_ld_state::rblaster_map(address_map &map)
}
-/* sound arrangement is pratically identical to Zero Target. */
+/* sound arrangement is practically identical to Zero Target. */
#ifdef UNUSED_FUNCTION
-WRITE8_MEMBER(deco_ld_state::nmimask_w)
+void deco_ld_state::nmimask_w(uint8_t data)
{
m_nmimask = data & 0x80;
}
diff --git a/src/mame/drivers/decstation.cpp b/src/mame/drivers/decstation.cpp
index 8d5d4ad313c..36125d8c584 100644
--- a/src/mame/drivers/decstation.cpp
+++ b/src/mame/drivers/decstation.cpp
@@ -107,19 +107,19 @@ protected:
DECLARE_WRITE_LINE_MEMBER(ioga_irq_w);
DECLARE_WRITE_LINE_MEMBER(dz_irq_w);
- DECLARE_READ32_MEMBER(cfb_r);
- DECLARE_WRITE32_MEMBER(cfb_w);
+ uint32_t cfb_r(offs_t offset);
+ void cfb_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
- DECLARE_READ32_MEMBER(kn01_status_r);
- DECLARE_WRITE32_MEMBER(kn01_control_w);
- DECLARE_READ32_MEMBER(bt478_palette_r);
- DECLARE_WRITE32_MEMBER(bt478_palette_w);
- DECLARE_READ32_MEMBER(pcc_r);
- DECLARE_WRITE32_MEMBER(pcc_w);
- DECLARE_WRITE32_MEMBER(planemask_w);
- DECLARE_WRITE32_MEMBER(vram_w);
+ uint32_t kn01_status_r();
+ void kn01_control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t bt478_palette_r(offs_t offset);
+ void bt478_palette_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t pcc_r(offs_t offset);
+ void pcc_w(offs_t offset, uint32_t data);
+ void planemask_w(uint32_t data);
+ void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
- DECLARE_READ32_MEMBER(dz_r);
+ uint32_t dz_r();
TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
@@ -195,7 +195,7 @@ uint32_t decstation_state::screen_update(screen_device &screen, bitmap_rgb32 &bi
return 0;
}
-READ32_MEMBER(decstation_state::cfb_r)
+uint32_t decstation_state::cfb_r(offs_t offset)
{
uint32_t addr = offset << 2;
@@ -217,7 +217,7 @@ READ32_MEMBER(decstation_state::cfb_r)
return 0xffffffff;
}
-WRITE32_MEMBER(decstation_state::cfb_w)
+void decstation_state::cfb_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
uint32_t addr = offset << 2;
@@ -257,24 +257,24 @@ enum
PCC_MEMORY // 3c
};
-READ32_MEMBER(decstation_state::pcc_r)
+uint32_t decstation_state::pcc_r(offs_t offset)
{
return m_pcc_regs[offset];
}
-WRITE32_MEMBER(decstation_state::pcc_w)
+void decstation_state::pcc_w(offs_t offset, uint32_t data)
{
m_pcc_regs[offset] = data & 0xffff;
}
-WRITE32_MEMBER(decstation_state::planemask_w)
+void decstation_state::planemask_w(uint32_t data)
{
// value written is smeared across all 4 byte lanes
data &= 0xff;
m_planemask = (data) || (data << 8) || (data << 16) || (data << 24);
}
-WRITE32_MEMBER(decstation_state::vram_w)
+void decstation_state::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
u32 *vram = (u32 *)m_kn01vram.target();
// u32 effective_planemask = (m_planemask & mem_mask);
@@ -316,7 +316,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(decstation_state::scanline_timer)
}
}
-READ32_MEMBER(decstation_state::bt478_palette_r)
+uint32_t decstation_state::bt478_palette_r(offs_t offset)
{
u8 rv = 0;
@@ -366,7 +366,7 @@ READ32_MEMBER(decstation_state::bt478_palette_r)
return rv;
}
-WRITE32_MEMBER(decstation_state::bt478_palette_w)
+void decstation_state::bt478_palette_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
//printf("VDAC_w: %08x at %08x (mask %08x)\n", data, offset, mem_mask);
@@ -463,13 +463,13 @@ void decstation_state::machine_reset()
m_kn01_status = 0;
}
-READ32_MEMBER(decstation_state::kn01_status_r)
+uint32_t decstation_state::kn01_status_r()
{
//m_kn01_status ^= 0x200; // fake vint for now
return m_kn01_status;
}
-WRITE32_MEMBER(decstation_state::kn01_control_w)
+void decstation_state::kn01_control_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(&m_kn01_control);
@@ -480,7 +480,7 @@ WRITE32_MEMBER(decstation_state::kn01_control_w)
}
}
-READ32_MEMBER(decstation_state::dz_r)
+uint32_t decstation_state::dz_r()
{
return 0x8000;
}
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index cfac359b976..3043b3d8c80 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -301,18 +301,18 @@ private:
DECLARE_WRITE_LINE_MEMBER(duart_txa);
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);
- DECLARE_WRITE16_MEMBER(m68k_infifo_w);
- DECLARE_READ16_MEMBER(m68k_spcflags_r);
- DECLARE_WRITE16_MEMBER(m68k_spcflags_w);
- DECLARE_READ16_MEMBER(m68k_tlcflags_r);
- DECLARE_WRITE16_MEMBER(m68k_tlcflags_w);
- DECLARE_READ16_MEMBER(m68k_tlc_dtmf_r);
- DECLARE_WRITE16_MEMBER(spc_latch_outfifo_error_stats);
- DECLARE_READ16_MEMBER(spc_infifo_data_r);
- DECLARE_WRITE16_MEMBER(spc_outfifo_data_w);
+ uint8_t nvram_recall(offs_t offset);
+ void led_write(uint8_t data);
+ void nvram_store(offs_t offset, uint8_t data);
+ void m68k_infifo_w(uint16_t data);
+ uint16_t m68k_spcflags_r();
+ void m68k_spcflags_w(uint16_t data);
+ uint16_t m68k_tlcflags_r();
+ void m68k_tlcflags_w(uint16_t data);
+ uint16_t m68k_tlc_dtmf_r();
+ void spc_latch_outfifo_error_stats(uint16_t data);
+ uint16_t spc_infifo_data_r();
+ void spc_outfifo_data_w(uint16_t data);
DECLARE_READ_LINE_MEMBER(spc_semaphore_r);
virtual void machine_reset() override;
virtual void machine_start() override;
@@ -489,7 +489,7 @@ void dectalk_state::machine_reset()
/* Begin 68k i/o handlers */
-READ8_MEMBER(dectalk_state::nvram_recall)// recall from x2212 nvram chip
+uint8_t dectalk_state::nvram_recall(offs_t offset)// recall from x2212 nvram chip
{
#ifdef NVRAM_LOG
fprintf(stderr,"NVRAM RECALL executed: offset %03x\n", offset);
@@ -500,7 +500,7 @@ READ8_MEMBER(dectalk_state::nvram_recall)// recall from x2212 nvram chip
return 0xff;
}
-WRITE8_MEMBER(dectalk_state::led_write)
+void dectalk_state::led_write(uint8_t data)
{
popmessage("LED status: %02X\n", data&0xff);
#ifdef VERBOSE
@@ -509,7 +509,7 @@ WRITE8_MEMBER(dectalk_state::led_write)
//popmessage("LED status: %x %x %x %x %x %x %x %x\n", data&0x80, data&0x40, data&0x20, data&0x10, data&0x8, data&0x4, data&0x2, data&0x1);
}
-WRITE8_MEMBER(dectalk_state::nvram_store) // store to X2212 NVRAM chip
+void dectalk_state::nvram_store(offs_t offset, uint8_t data) // store to X2212 NVRAM chip
{
#ifdef NVRAM_LOG
fprintf(stderr,"NVRAM STORE executed: offset %03x, data written (and ignored) is %02x\n", offset, data);
@@ -519,7 +519,7 @@ WRITE8_MEMBER(dectalk_state::nvram_store) // store to X2212 NVRAM chip
m_nvram->store(0);
}
-WRITE16_MEMBER(dectalk_state::m68k_infifo_w)// 68k write to the speech input fifo
+void dectalk_state::m68k_infifo_w(uint16_t data)// 68k write to the speech input fifo
{
#ifdef USE_LOOSE_TIMING
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
@@ -541,7 +541,7 @@ WRITE16_MEMBER(dectalk_state::m68k_infifo_w)// 68k write to the speech input fif
m_infifo_head_ptr&=0x1f;
}
-READ16_MEMBER(dectalk_state::m68k_spcflags_r)// 68k read from the speech flags
+uint16_t dectalk_state::m68k_spcflags_r()// 68k read from the speech flags
{
uint8_t data = 0;
data |= m_m68k_spcflags_latch; // bits 0 and 6
@@ -553,7 +553,7 @@ READ16_MEMBER(dectalk_state::m68k_spcflags_r)// 68k read from the speech flags
return data;
}
-WRITE16_MEMBER(dectalk_state::m68k_spcflags_w)// 68k write to the speech flags (only 3 bits do anything)
+void dectalk_state::m68k_spcflags_w(uint16_t data)// 68k write to the speech flags (only 3 bits do anything)
{
#ifdef USE_LOOSE_TIMING
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
@@ -612,7 +612,7 @@ WRITE16_MEMBER(dectalk_state::m68k_spcflags_w)// 68k write to the speech flags (
}
}
-READ16_MEMBER(dectalk_state::m68k_tlcflags_r)// dtmf flags read
+uint16_t dectalk_state::m68k_tlcflags_r()// dtmf flags read
{
uint16_t data = 0;
data |= m_m68k_tlcflags_latch; // bits 6, 8, 14: tone detected int enable, answer phone relay enable, and ring int enable respectively
@@ -624,7 +624,7 @@ READ16_MEMBER(dectalk_state::m68k_tlcflags_r)// dtmf flags read
return data;
}
-WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
+void dectalk_state::m68k_tlcflags_w(uint16_t data)// dtmf flags write
{
#ifdef TLC_LOG
logerror("m68k: TLC flags written with %04X, only storing %04X\n",data, data&0x4140);
@@ -686,7 +686,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
}
}
-READ16_MEMBER(dectalk_state::m68k_tlc_dtmf_r)// dtmf chip read
+uint16_t dectalk_state::m68k_tlc_dtmf_r()// dtmf chip read
{
#ifdef TLC_LOG
uint16_t data = 0xffff;
@@ -698,7 +698,7 @@ READ16_MEMBER(dectalk_state::m68k_tlc_dtmf_r)// dtmf chip read
/* End 68k i/o handlers */
/* Begin tms32010 i/o handlers */
-WRITE16_MEMBER(dectalk_state::spc_latch_outfifo_error_stats)// latch 74ls74 @ E64 upper and lower halves with d0 and 1 respectively
+void dectalk_state::spc_latch_outfifo_error_stats(uint16_t data)// latch 74ls74 @ E64 upper and lower halves with d0 and 1 respectively
{
#ifdef USE_LOOSE_TIMING
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(25));
@@ -710,7 +710,7 @@ WRITE16_MEMBER(dectalk_state::spc_latch_outfifo_error_stats)// latch 74ls74 @ E6
m_spc_error_latch = (data&1); // latch the dsp 'soft error' state aka "ERROR DETECTED D5 H" on schematics (different from the outfifo error state above!)
}
-READ16_MEMBER(dectalk_state::spc_infifo_data_r)
+uint16_t dectalk_state::spc_infifo_data_r()
{
uint16_t data = 0xffff;
data = m_infifo[m_infifo_tail_ptr];
@@ -727,7 +727,7 @@ READ16_MEMBER(dectalk_state::spc_infifo_data_r)
return data;
}
-WRITE16_MEMBER(dectalk_state::spc_outfifo_data_w)
+void dectalk_state::spc_outfifo_data_w(uint16_t data)
{
// the low 4 data bits are thrown out on the real unit due to use of a 12 bit dac (and to save use of another 16x4 fifo chip), though technically they're probably valid, and with suitable hacking a dtc-01 could probably output full 16 bit samples at 10khz.
#ifdef SPC_LOG_DSP
diff --git a/src/mame/drivers/decwritr.cpp b/src/mame/drivers/decwritr.cpp
index ceb8f48d2c0..b5b32b2ee71 100644
--- a/src/mame/drivers/decwritr.cpp
+++ b/src/mame/drivers/decwritr.cpp
@@ -56,12 +56,12 @@ private:
IRQ_CALLBACK_MEMBER(inta_cb);
- DECLARE_READ8_MEMBER(la120_KBD_r);
- DECLARE_WRITE8_MEMBER(la120_LED_w);
- DECLARE_READ8_MEMBER(la120_NVR_r);
- DECLARE_WRITE8_MEMBER(la120_NVR_w);
- DECLARE_READ8_MEMBER(la120_DC305_r);
- DECLARE_WRITE8_MEMBER(la120_DC305_w);
+ uint8_t la120_KBD_r(offs_t offset);
+ void la120_LED_w(offs_t offset, uint8_t data);
+ uint8_t la120_NVR_r();
+ void la120_NVR_w(offs_t offset, uint8_t data);
+ uint8_t la120_DC305_r(offs_t offset);
+ void la120_DC305_w(offs_t offset, uint8_t data);
void la120_io(address_map &map);
void la120_mem(address_map &map);
@@ -90,7 +90,7 @@ IRQ_CALLBACK_MEMBER( decwriter_state::inta_cb )
return m_prtlsi->inta();
}
-READ8_MEMBER( decwriter_state::la120_KBD_r )
+uint8_t decwriter_state::la120_KBD_r(offs_t offset)
{
/* for reading the keyboard array, addr bits 5-11 are ignored.
* a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0
@@ -111,7 +111,7 @@ READ8_MEMBER( decwriter_state::la120_KBD_r )
return code;
}
-WRITE8_MEMBER( decwriter_state::la120_LED_w )
+void decwriter_state::la120_LED_w(offs_t offset, uint8_t data)
{
/* for writing the keyboard array, addr bits 5-11 are ignored.
* a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0
@@ -161,7 +161,7 @@ WRITE8_MEMBER( decwriter_state::la120_LED_w )
1 1 0 Accept address
1 1 1 Accept data
*/
-READ8_MEMBER( decwriter_state::la120_NVR_r )
+uint8_t decwriter_state::la120_NVR_r()
{
// one wait state inserted
if (!machine().side_effects_disabled())
@@ -170,7 +170,7 @@ READ8_MEMBER( decwriter_state::la120_NVR_r )
return (!m_nvm->data_r() << 7) | 0x7f;
}
-WRITE8_MEMBER( decwriter_state::la120_NVR_w )
+void decwriter_state::la120_NVR_w(offs_t offset, uint8_t data)
{
// one wait state inserted
if (!machine().side_effects_disabled())
@@ -203,7 +203,7 @@ WRITE8_MEMBER( decwriter_state::la120_NVR_w )
|\------- ?
\-------- ?
*/
-READ8_MEMBER( decwriter_state::la120_DC305_r )
+uint8_t decwriter_state::la120_DC305_r(offs_t offset)
{
// one wait state inserted
if (!machine().side_effects_disabled())
@@ -224,7 +224,7 @@ READ8_MEMBER( decwriter_state::la120_DC305_r )
at least 3 bits control the speaker/buzzer which can be on or off, at least two volume levels, and at least two frequencies, 400hz or 2400hz
two quadrature lines from the head servomotor connect here to allow the dc305 to determine motor position; one pulses when the motor turns clockwise and one when it turns counterclockwise. the head stop is found when the pulses stop, which firmware uses to find the zero position.
*/
-WRITE8_MEMBER( decwriter_state::la120_DC305_w )
+void decwriter_state::la120_DC305_w(offs_t offset, uint8_t data)
{
// one wait state inserted
if (!machine().side_effects_disabled())
diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp
index a8886e459ff..7c6b9c29997 100644
--- a/src/mame/drivers/deshoros.cpp
+++ b/src/mame/drivers/deshoros.cpp
@@ -55,14 +55,14 @@ private:
char m_led_array[21];
- DECLARE_WRITE8_MEMBER(firq_ack_w);
- DECLARE_WRITE8_MEMBER(nmi_ack_w);
- DECLARE_READ8_MEMBER(printer_status_r);
- DECLARE_READ8_MEMBER(display_ready_r);
- DECLARE_WRITE8_MEMBER(display_w);
- DECLARE_WRITE8_MEMBER(out_w);
+ void firq_ack_w(uint8_t data);
+ void nmi_ack_w(uint8_t data);
+ uint8_t printer_status_r();
+ uint8_t display_ready_r();
+ void display_w(uint8_t data);
+ void out_w(uint8_t data);
void bank_select_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(sound_w);
+ void sound_w(offs_t offset, uint8_t data);
void main_map(address_map &map);
protected:
@@ -99,17 +99,17 @@ uint32_t destiny_state::screen_update_destiny(screen_device &screen, bitmap_ind1
***************************************************************************/
-WRITE8_MEMBER(destiny_state::firq_ack_w)
+void destiny_state::firq_ack_w(uint8_t data)
{
m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
-WRITE8_MEMBER(destiny_state::nmi_ack_w)
+void destiny_state::nmi_ack_w(uint8_t data)
{
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
-READ8_MEMBER(destiny_state::printer_status_r)
+uint8_t destiny_state::printer_status_r()
{
// d2: mark sensor
// d3: motor stop
@@ -120,14 +120,14 @@ READ8_MEMBER(destiny_state::printer_status_r)
return 0xff;
}
-READ8_MEMBER(destiny_state::display_ready_r)
+uint8_t destiny_state::display_ready_r()
{
// d7: /display ready
// other bits: N/C
return 0;
}
-WRITE8_MEMBER(destiny_state::display_w)
+void destiny_state::display_w(uint8_t data)
{
/* this is preliminary, just fills a string and doesn't support control codes etc. */
@@ -139,7 +139,7 @@ WRITE8_MEMBER(destiny_state::display_w)
m_led_array[19] = data;
}
-WRITE8_MEMBER(destiny_state::out_w)
+void destiny_state::out_w(uint8_t data)
{
// d0: coin blocker
machine().bookkeeping().coin_lockout_w(0, ~data & 1);
@@ -166,7 +166,7 @@ INPUT_CHANGED_MEMBER(destiny_state::coin_inserted)
machine().bookkeeping().coin_counter_w(0, newval);
}
-WRITE8_MEMBER(destiny_state::sound_w)
+void destiny_state::sound_w(offs_t offset, uint8_t data)
{
// a0: sound on/off
m_beeper->set_state(~offset & 1);
diff --git a/src/mame/drivers/destroyr.cpp b/src/mame/drivers/destroyr.cpp
index cc1cf82d3b2..9115b3bd4c7 100644
--- a/src/mame/drivers/destroyr.cpp
+++ b/src/mame/drivers/destroyr.cpp
@@ -47,11 +47,11 @@ private:
TIMER_DESTROYR_FRAME
};
- DECLARE_WRITE8_MEMBER(misc_w);
- DECLARE_WRITE8_MEMBER(cursor_load_w);
- DECLARE_WRITE8_MEMBER(interrupt_ack_w);
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_READ8_MEMBER(scanline_r);
+ void misc_w(uint8_t data);
+ void cursor_load_w(uint8_t data);
+ void interrupt_ack_w(uint8_t data);
+ uint8_t input_r(offs_t offset);
+ uint8_t scanline_r();
void destroyr_palette(palette_device &palette) const;
@@ -222,7 +222,7 @@ void destroyr_state::machine_reset()
}
-WRITE8_MEMBER(destroyr_state::misc_w)
+void destroyr_state::misc_w(uint8_t data)
{
/* bits 0 to 2 connect to the sound circuits */
m_attract = data & 0x01;
@@ -237,20 +237,20 @@ WRITE8_MEMBER(destroyr_state::misc_w)
}
-WRITE8_MEMBER(destroyr_state::cursor_load_w)
+void destroyr_state::cursor_load_w(uint8_t data)
{
m_cursor = data;
m_watchdog->watchdog_reset();
}
-WRITE8_MEMBER(destroyr_state::interrupt_ack_w)
+void destroyr_state::interrupt_ack_w(uint8_t data)
{
m_maincpu->set_input_line(0, CLEAR_LINE);
}
-READ8_MEMBER(destroyr_state::input_r)
+uint8_t destroyr_state::input_r(offs_t offset)
{
if (offset & 1)
{
@@ -271,7 +271,7 @@ READ8_MEMBER(destroyr_state::input_r)
}
-READ8_MEMBER(destroyr_state::scanline_r)
+uint8_t destroyr_state::scanline_r()
{
return m_screen->vpos();
}
diff --git a/src/mame/drivers/dg680.cpp b/src/mame/drivers/dg680.cpp
index 8a7f280b599..65e096cc846 100644
--- a/src/mame/drivers/dg680.cpp
+++ b/src/mame/drivers/dg680.cpp
@@ -91,8 +91,8 @@ private:
u8 porta_r();
u8 portb_r();
void portb_w(u8 data);
- DECLARE_READ8_MEMBER(port08_r);
- DECLARE_WRITE8_MEMBER(port08_w);
+ u8 port08_r();
+ void port08_w(u8 data);
DECLARE_WRITE_LINE_MEMBER(kansas_w);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
void kbd_put(u8 data);
@@ -100,15 +100,15 @@ private:
void dg680_io(address_map &map);
void dg680_mem(address_map &map);
- uint8_t m_pio_b;
- uint8_t m_term_data;
- uint8_t m_protection[0x100];
+ u8 m_pio_b;
+ u8 m_term_data;
+ u8 m_protection[0x100];
virtual void machine_reset() override;
u8 m_cass_data[4];
bool m_cassold, m_cassinbit, m_cassoutbit;
- DECLARE_READ8_MEMBER(mem_r);
- DECLARE_WRITE8_MEMBER(mem_w);
+ u8 mem_r(offs_t offset);
+ void mem_w(offs_t offset, u8 data);
required_device<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cass;
@@ -153,7 +153,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( dg680_state::kansas_r )
return;
/* cassette - turn 1200/2400Hz to a bit */
- uint8_t cass_ws = (m_cass->input() > +0.04) ? 1 : 0;
+ u8 cass_ws = (m_cass->input() > +0.04) ? 1 : 0;
if (cass_ws != m_cass_data[0])
{
@@ -164,12 +164,12 @@ TIMER_DEVICE_CALLBACK_MEMBER( dg680_state::kansas_r )
}
}
-READ8_MEMBER( dg680_state::mem_r )
+u8 dg680_state::mem_r(offs_t offset)
{
return m_s100->smemr_r(offset + 0xf000);
}
-WRITE8_MEMBER( dg680_state::mem_w )
+void dg680_state::mem_w(offs_t offset, u8 data)
{
m_s100->mwrt_w(offset + 0xf000, data);
}
@@ -227,7 +227,7 @@ void dg680_state::kbd_put(u8 data)
u8 dg680_state::porta_r()
{
- uint8_t data = m_term_data;
+ u8 data = m_term_data;
m_term_data = 0;
return data;
}
@@ -246,15 +246,15 @@ void dg680_state::portb_w(u8 data)
m_cassoutbit = BIT(data, 1);
}
-READ8_MEMBER( dg680_state::port08_r )
+u8 dg680_state::port08_r()
{
- uint8_t breg = m_maincpu->state_int(Z80_B);
+ u8 breg = m_maincpu->state_int(Z80_B);
return m_protection[breg];
}
-WRITE8_MEMBER( dg680_state::port08_w )
+void dg680_state::port08_w(u8 data)
{
- uint8_t breg = m_maincpu->state_int(Z80_B);
+ u8 breg = m_maincpu->state_int(Z80_B);
m_protection[breg] = data;
}
diff --git a/src/mame/drivers/didact.cpp b/src/mame/drivers/didact.cpp
index 2da0c91e54e..4358d02e43e 100644
--- a/src/mame/drivers/didact.cpp
+++ b/src/mame/drivers/didact.cpp
@@ -551,8 +551,8 @@ class modulab_state : public didact_state
virtual void machine_start() override;
void modulab(machine_config &config);
protected:
- DECLARE_READ8_MEMBER( io_r );
- DECLARE_WRITE8_MEMBER( io_w );
+ uint8_t io_r(offs_t offset);
+ void io_w(offs_t offset, u8 data);
DECLARE_WRITE_LINE_MEMBER( da_w );
private:
void modulab_map(address_map &map);
@@ -585,7 +585,7 @@ WRITE_LINE_MEMBER( modulab_state::da_w )
m_da = state == CLEAR_LINE ? 0 : 1; // Capture data available signal
}
-READ8_MEMBER(modulab_state::io_r)
+uint8_t modulab_state::io_r(offs_t offset)
{
switch (offset)
{
@@ -603,7 +603,7 @@ READ8_MEMBER(modulab_state::io_r)
return 0;
}
-WRITE8_MEMBER(modulab_state::io_w)
+void modulab_state::io_w(offs_t offset, u8 data)
{
LOG("--->%s()\n", FUNCNAME);
uint8_t b = data & 1;
diff --git a/src/mame/drivers/digel804.cpp b/src/mame/drivers/digel804.cpp
index f041ebcb882..4fe6499cacf 100644
--- a/src/mame/drivers/digel804.cpp
+++ b/src/mame/drivers/digel804.cpp
@@ -91,27 +91,27 @@ protected:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_WRITE8_MEMBER( op00 );
- DECLARE_READ8_MEMBER( ip40 );
- DECLARE_WRITE8_MEMBER( op40 );
- DECLARE_WRITE8_MEMBER( op41 );
- DECLARE_WRITE8_MEMBER( op42 );
- DECLARE_READ8_MEMBER( ip43 );
- DECLARE_WRITE8_MEMBER( op43 );
- DECLARE_WRITE8_MEMBER( op43_1_4 );
- DECLARE_WRITE8_MEMBER( op44 );
- DECLARE_WRITE8_MEMBER( op45 );
- DECLARE_READ8_MEMBER( ip46 );
- DECLARE_WRITE8_MEMBER( op46 );
- DECLARE_WRITE8_MEMBER( op47 );
- DECLARE_READ8_MEMBER( acia_rxd_r );
- DECLARE_WRITE8_MEMBER( acia_txd_w );
- DECLARE_READ8_MEMBER( acia_status_r );
- DECLARE_WRITE8_MEMBER( acia_reset_w );
- DECLARE_READ8_MEMBER( acia_command_r );
- DECLARE_WRITE8_MEMBER( acia_command_w );
- DECLARE_READ8_MEMBER( acia_control_r );
- DECLARE_WRITE8_MEMBER( acia_control_w );
+ void op00(uint8_t data);
+ uint8_t ip40();
+ void op40(uint8_t data);
+ void op41(uint8_t data);
+ void op42(uint8_t data);
+ uint8_t ip43();
+ void op43(uint8_t data);
+ void op43_1_4(uint8_t data);
+ void op44(uint8_t data);
+ void op45(uint8_t data);
+ uint8_t ip46();
+ void op46(uint8_t data);
+ void op47(uint8_t data);
+ uint8_t acia_rxd_r();
+ void acia_txd_w(uint8_t data);
+ uint8_t acia_status_r();
+ void acia_reset_w(uint8_t data);
+ uint8_t acia_command_r();
+ void acia_command_w(uint8_t data);
+ uint8_t acia_control_r();
+ void acia_control_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
DECLARE_WRITE_LINE_MEMBER( da_w );
@@ -205,19 +205,19 @@ void digel804_state::machine_reset()
m_vfd->reset();
}
-READ8_MEMBER( digel804_state::ip40 ) // eprom data bus read
+uint8_t digel804_state::ip40() // eprom data bus read
{
// TODO: would be nice to have a 'fake eprom' here
return 0xFF;
}
-WRITE8_MEMBER( digel804_state::op40 ) // eprom data bus write
+void digel804_state::op40(uint8_t data) // eprom data bus write
{
// TODO: would be nice to have a 'fake eprom' here
logerror("Digel804: port 40, eprom databus had %02X written to it!\n", data);
}
-WRITE8_MEMBER( digel804_state::op41 ) // eprom address low write AND SIM write, d6 also controls memory map somehow
+void digel804_state::op41(uint8_t data) // eprom address low write AND SIM write, d6 also controls memory map somehow
{
// TODO: would be nice to have a 'fake eprom' here
logerror("Digel804: port 41, eprom address low/sim/memorybank had %02X written to it!\n", data);
@@ -225,13 +225,13 @@ WRITE8_MEMBER( digel804_state::op41 ) // eprom address low write AND SIM write,
m_op41 = data;
}
-WRITE8_MEMBER( digel804_state::op42 ) // eprom address hi and control write
+void digel804_state::op42(uint8_t data) // eprom address hi and control write
{
// TODO: would be nice to have a 'fake eprom' here
logerror("Digel804: port 42, eprom address hi/control had %02X written to it!\n", data);
}
-READ8_MEMBER( digel804_state::ip43 )
+uint8_t digel804_state::ip43()
{
/* Register 0x43: status/mode register read
bits 76543210
@@ -274,13 +274,13 @@ READ8_MEMBER( digel804_state::ip43 )
}
-WRITE8_MEMBER( digel804_state::op00 )
+void digel804_state::op00(uint8_t data)
{
m_ram_bank = data;
m_rambank->set_base(m_ram->pointer() + ((m_ram_bank * 0x8000) & m_ram->mask()));
}
-WRITE8_MEMBER( digel804_state::op43 )
+void digel804_state::op43(uint8_t data)
{
/* writes to 0x43 control the ram banking on firmware which supports it
* bits:76543210
@@ -301,12 +301,12 @@ WRITE8_MEMBER( digel804_state::op43 )
m_rambank->set_base(m_ram->pointer() + ((m_ram_bank * 0x8000) & m_ram->mask()));
}
-WRITE8_MEMBER( digel804_state::op43_1_4 )
+void digel804_state::op43_1_4(uint8_t data)
{
m_overload_state = 0; // writes to port 43 clear overload state
}
-WRITE8_MEMBER( digel804_state::op44 ) // state write
+void digel804_state::op44(uint8_t data) // state write
{
/* writes to 0x44 control the 10937 vfd chip, z80 power/busrq, eprom driving and some eprom power ctl lines
* bits:76543210
@@ -331,7 +331,7 @@ WRITE8_MEMBER( digel804_state::op44 ) // state write
m_vfd->sclk(data&1);
}
-WRITE8_MEMBER( digel804_state::op45 ) // speaker write
+void digel804_state::op45(uint8_t data) // speaker write
{
// all writes to here invert the speaker state, verified from schematics
#ifdef PORT45_W_VERBOSE
@@ -341,7 +341,7 @@ WRITE8_MEMBER( digel804_state::op45 ) // speaker write
m_speaker->level_w(m_speaker_state);
}
-READ8_MEMBER( digel804_state::ip46 ) // keypad read
+uint8_t digel804_state::ip46() // keypad read
{
/* reads E* for a keypad number 0-F
* reads F0 for enter
@@ -361,7 +361,7 @@ READ8_MEMBER( digel804_state::ip46 ) // keypad read
return bitswap<8>(kbd,7,6,5,4,1,0,3,2); // verified from schematics
}
-WRITE8_MEMBER( digel804_state::op46 )
+void digel804_state::op46(uint8_t data)
{
/* writes to 0x46 control the LEDS on the front panel
* bits:76543210
@@ -385,7 +385,7 @@ WRITE8_MEMBER( digel804_state::op46 )
m_func_leds[i] = (!(data & 0x10) && ((~data & 0x0f) == i)) ? 1 : 0;
}
-WRITE8_MEMBER( digel804_state::op47 ) // eprom timing/power and control write
+void digel804_state::op47(uint8_t data) // eprom timing/power and control write
{
// TODO: would be nice to have a 'fake eprom' here
logerror("Digel804: port 47, eprom timing/power and control had %02X written to it!\n", data);
@@ -422,44 +422,44 @@ INPUT_CHANGED_MEMBER( digel804_state::mode_change )
}
/* ACIA Trampolines */
-READ8_MEMBER( digel804_state::acia_rxd_r )
+uint8_t digel804_state::acia_rxd_r()
{
return m_acia->read(0);
}
-WRITE8_MEMBER( digel804_state::acia_txd_w )
+void digel804_state::acia_txd_w(uint8_t data)
{
m_acia->write(0, data);
}
-READ8_MEMBER( digel804_state::acia_status_r )
+uint8_t digel804_state::acia_status_r()
{
return m_acia->read(1);
}
-WRITE8_MEMBER( digel804_state::acia_reset_w )
+void digel804_state::acia_reset_w(uint8_t data)
{
m_acia->write(1, data);
}
-READ8_MEMBER( digel804_state::acia_command_r )
+uint8_t digel804_state::acia_command_r()
{
return m_acia->read(2);
}
-WRITE8_MEMBER( digel804_state::acia_command_w )
+void digel804_state::acia_command_w(uint8_t data)
{
data |= 0x08; // HACK for ep804 remote mode
m_acia->write(2, data);
}
-READ8_MEMBER( digel804_state::acia_control_r )
+uint8_t digel804_state::acia_control_r()
{
return m_acia->read(3);
}
-WRITE8_MEMBER( digel804_state::acia_control_w )
+void digel804_state::acia_control_w(uint8_t data)
{
m_acia->write(3, data);
}
diff --git a/src/mame/drivers/dim68k.cpp b/src/mame/drivers/dim68k.cpp
index 4c57e545a35..0685f0599e3 100644
--- a/src/mame/drivers/dim68k.cpp
+++ b/src/mame/drivers/dim68k.cpp
@@ -61,19 +61,19 @@ public:
void dim68k(machine_config &config);
private:
- DECLARE_READ16_MEMBER( dim68k_duart_r );
- DECLARE_READ16_MEMBER( dim68k_fdc_r );
- DECLARE_READ16_MEMBER( dim68k_game_switches_r );
- DECLARE_READ16_MEMBER( dim68k_speaker_r );
- DECLARE_WRITE16_MEMBER( dim68k_banksw_w );
- DECLARE_WRITE16_MEMBER( dim68k_duart_w );
- DECLARE_WRITE16_MEMBER( dim68k_fdc_w );
- DECLARE_WRITE16_MEMBER( dim68k_printer_strobe_w );
- DECLARE_WRITE16_MEMBER( dim68k_reset_timers_w );
- DECLARE_WRITE16_MEMBER( dim68k_speaker_w );
- DECLARE_WRITE16_MEMBER( dim68k_video_control_w );
- DECLARE_WRITE16_MEMBER( dim68k_video_high_w );
- DECLARE_WRITE16_MEMBER( dim68k_video_reset_w );
+ u16 dim68k_duart_r(offs_t offset);
+ u16 dim68k_fdc_r();
+ u16 dim68k_game_switches_r();
+ u16 dim68k_speaker_r();
+ void dim68k_banksw_w(u16 data);
+ void dim68k_duart_w(u16 data);
+ void dim68k_fdc_w(u16 data);
+ void dim68k_printer_strobe_w(u16 data);
+ void dim68k_reset_timers_w(u16 data);
+ void dim68k_speaker_w(u16 data);
+ void dim68k_video_control_w(u16 data);
+ void dim68k_video_high_w(u16 data);
+ void dim68k_video_reset_w(u16 data);
void kbd_put(u8 data);
MC6845_UPDATE_ROW(crtc_update_row);
@@ -91,7 +91,7 @@ private:
required_region_ptr<u8> m_p_chargen;
};
-READ16_MEMBER( dim68k_state::dim68k_duart_r )
+u16 dim68k_state::dim68k_duart_r(offs_t offset)
// Port A is for the keyboard : 300 baud, no parity, 8 bits, 1 stop bit. Port B is for RS232.
// The device also controls the parallel printer (except the strobe) and the RTC.
// Device = SCN2681, not emulated. The keyboard is standard ASCII, so we can use the terminal
@@ -103,12 +103,12 @@ READ16_MEMBER( dim68k_state::dim68k_duart_r )
return 0;
}
-READ16_MEMBER( dim68k_state::dim68k_fdc_r )
+u16 dim68k_state::dim68k_fdc_r()
{
return 0;
}
-READ16_MEMBER( dim68k_state::dim68k_game_switches_r )
+u16 dim68k_state::dim68k_game_switches_r()
// Reading the game port switches
// FFCC11 = switch 0; FFCC13 = switch 1, etc to switch 3
// FFCC19 = paddle 0; FFCC1B = paddle 1, etc to paddle 3
@@ -116,7 +116,7 @@ READ16_MEMBER( dim68k_state::dim68k_game_switches_r )
return 0xffff;
}
-READ16_MEMBER( dim68k_state::dim68k_speaker_r )
+u16 dim68k_state::dim68k_speaker_r()
// Any read or write of this address will toggle the position of the speaker cone
{
m_speaker_bit ^= 1;
@@ -124,22 +124,22 @@ READ16_MEMBER( dim68k_state::dim68k_speaker_r )
return 0;
}
-WRITE16_MEMBER( dim68k_state::dim68k_speaker_w )
+void dim68k_state::dim68k_speaker_w(u16 data)
{
m_speaker_bit ^= 1;
m_speaker->level_w(m_speaker_bit);
}
-WRITE16_MEMBER( dim68k_state::dim68k_fdc_w )
+void dim68k_state::dim68k_fdc_w(u16 data)
{
}
-WRITE16_MEMBER( dim68k_state::dim68k_video_high_w )
+void dim68k_state::dim68k_video_high_w(u16 data)
// "write high byte of address in memory of start of display buffer"
{
}
-WRITE16_MEMBER( dim68k_state::dim68k_video_control_w )
+void dim68k_state::dim68k_video_control_w(u16 data)
{
/* D7 0 = Hires/Graphics; 1= Lores/Text [not emulated yet]
D6 0 = 8 dots per character; 1 = 7 dots [emulated]
@@ -166,25 +166,25 @@ WRITE16_MEMBER( dim68k_state::dim68k_video_control_w )
}
}
-WRITE16_MEMBER( dim68k_state::dim68k_video_reset_w )
+void dim68k_state::dim68k_video_reset_w(u16 data)
{
}
-WRITE16_MEMBER( dim68k_state::dim68k_duart_w )
+void dim68k_state::dim68k_duart_w(u16 data)
{
}
-WRITE16_MEMBER( dim68k_state::dim68k_reset_timers_w )
+void dim68k_state::dim68k_reset_timers_w(u16 data)
// reset game port timer before reading paddles
{
}
-WRITE16_MEMBER( dim68k_state::dim68k_printer_strobe_w )
+void dim68k_state::dim68k_printer_strobe_w(u16 data)
// anything sent here will trigger a one-shot for a strobe pulse
{
}
-WRITE16_MEMBER( dim68k_state::dim68k_banksw_w )
+void dim68k_state::dim68k_banksw_w(u16 data)
// At boot time, the rom and IO occupy 0-FFFF, this moves it to the proper place
{
}
diff --git a/src/mame/drivers/discoboy.cpp b/src/mame/drivers/discoboy.cpp
index c351b4cc56c..bd846bbcaa6 100644
--- a/src/mame/drivers/discoboy.cpp
+++ b/src/mame/drivers/discoboy.cpp
@@ -97,16 +97,14 @@ private:
required_shared_ptr<uint8_t> m_ram_2;
uint8_t m_ram_3[0x1000];
uint8_t m_ram_4[0x1000];
- DECLARE_WRITE8_MEMBER(rambank_select_w);
- DECLARE_WRITE8_MEMBER(port_00_w);
- DECLARE_WRITE8_MEMBER(port_01_w);
- DECLARE_WRITE8_MEMBER(port_06_w);
- DECLARE_WRITE8_MEMBER(rambank_w);
- DECLARE_READ8_MEMBER(rambank_r);
- DECLARE_READ8_MEMBER(rambank2_r);
- DECLARE_WRITE8_MEMBER(rambank2_w);
- DECLARE_READ8_MEMBER(port_06_r);
- DECLARE_WRITE8_MEMBER(yunsung8_sound_bankswitch_w);
+ void rambank_select_w(uint8_t data);
+ void port_00_w(uint8_t data);
+ void port_01_w(uint8_t data);
+ void port_06_w(uint8_t data);
+ uint8_t rambank2_r(offs_t offset);
+ void rambank2_w(offs_t offset, uint8_t data);
+ uint8_t port_06_r();
+ void yunsung8_sound_bankswitch_w(uint8_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -223,7 +221,7 @@ uint32_t discoboy_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
return 0;
}
-WRITE8_MEMBER(discoboy_state::rambank_select_w)
+void discoboy_state::rambank_select_w(uint8_t data)
{
if (data & 0x20)
m_rambank1->set_bank(1);
@@ -233,13 +231,13 @@ WRITE8_MEMBER(discoboy_state::rambank_select_w)
if (data &= 0x83) logerror("rambank_select_w !!!!!");
}
-WRITE8_MEMBER(discoboy_state::port_00_w)
+void discoboy_state::port_00_w(uint8_t data)
{
if (data & 0xfe) logerror("unk port_00_w %02x\n",data);
m_port_00 = data;
}
-WRITE8_MEMBER(discoboy_state::port_01_w)
+void discoboy_state::port_01_w(uint8_t data)
{
// 00 10 20 30 during gameplay 1,2,3 other times?? title screen bit 0x40 toggle
//printf("unk port_01_w %02x\n",data);
@@ -249,13 +247,13 @@ WRITE8_MEMBER(discoboy_state::port_01_w)
membank("mainbank")->set_entry(data & 0x07);
}
-WRITE8_MEMBER(discoboy_state::port_06_w)
+void discoboy_state::port_06_w(uint8_t data)
{
//printf("unk discoboy_port_06_w %02x\n",data);
if (data != 0) logerror("port 06!!!! %02x\n",data);
}
-READ8_MEMBER(discoboy_state::rambank2_r)
+uint8_t discoboy_state::rambank2_r(offs_t offset)
{
if (m_port_00 == 0x00)
return m_ram_3[offset];
@@ -267,7 +265,7 @@ READ8_MEMBER(discoboy_state::rambank2_r)
return machine().rand();
}
-WRITE8_MEMBER(discoboy_state::rambank2_w)
+void discoboy_state::rambank2_w(offs_t offset, uint8_t data)
{
if (m_port_00 == 0x00)
m_ram_3[offset] = data;
@@ -295,7 +293,7 @@ void discoboy_state::rambank1_map(address_map &map)
}
-READ8_MEMBER(discoboy_state::port_06_r)
+uint8_t discoboy_state::port_06_r()
{
return 0x00;
}
@@ -314,7 +312,7 @@ void discoboy_state::io_map(address_map &map)
/* Sound */
-WRITE8_MEMBER(discoboy_state::yunsung8_sound_bankswitch_w)
+void discoboy_state::yunsung8_sound_bankswitch_w(uint8_t data)
{
/* Note: this is bit 5 on yunsung8.cpp */
m_msm->reset_w((data & 0x08) >> 3);
diff --git a/src/mame/drivers/diverboy.cpp b/src/mame/drivers/diverboy.cpp
index 3d0376188af..4f456743112 100644
--- a/src/mame/drivers/diverboy.cpp
+++ b/src/mame/drivers/diverboy.cpp
@@ -89,8 +89,8 @@ private:
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
- DECLARE_WRITE16_MEMBER(soundcmd_w);
- DECLARE_WRITE8_MEMBER(okibank_w);
+ void soundcmd_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void okibank_w(uint8_t data);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update_diverboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -147,7 +147,7 @@ uint32_t diverboy_state::screen_update_diverboy(screen_device &screen, bitmap_in
}
-WRITE16_MEMBER(diverboy_state::soundcmd_w)
+void diverboy_state::soundcmd_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
{
@@ -156,7 +156,7 @@ WRITE16_MEMBER(diverboy_state::soundcmd_w)
}
}
-WRITE8_MEMBER(diverboy_state::okibank_w)
+void diverboy_state::okibank_w(uint8_t data)
{
/* bit 2 might be reset */
// popmessage("%02x",data);
diff --git a/src/mame/drivers/dkmb.cpp b/src/mame/drivers/dkmb.cpp
index 02684188d89..5a83f16b125 100644
--- a/src/mame/drivers/dkmb.cpp
+++ b/src/mame/drivers/dkmb.cpp
@@ -42,8 +42,8 @@ public:
void dkmb(machine_config &config);
- DECLARE_READ64_MEMBER(unk_2060000_r);
- DECLARE_READ64_MEMBER(unk_20c0010_r);
+ u64 unk_2060000_r();
+ u64 unk_20c0010_r();
protected:
virtual void machine_start() override;
@@ -84,12 +84,12 @@ uint32_t dkmb_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
}
-READ64_MEMBER(dkmb_state::unk_2060000_r)
+u64 dkmb_state::unk_2060000_r()
{
return ((u64)machine().rand()) << 56;
}
-READ64_MEMBER(dkmb_state::unk_20c0010_r)
+u64 dkmb_state::unk_20c0010_r()
{
return ((u64)machine().rand()) << 56;
}
diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp
index 29a1cbcc035..b914c58b35c 100644
--- a/src/mame/drivers/dlair.cpp
+++ b/src/mame/drivers/dlair.cpp
@@ -119,12 +119,12 @@ private:
return CLEAR_LINE;
}
- DECLARE_WRITE8_MEMBER(misc_w);
- DECLARE_WRITE8_MEMBER(dleuro_misc_w);
- DECLARE_WRITE8_MEMBER(led_den1_w);
- DECLARE_WRITE8_MEMBER(led_den2_w);
- DECLARE_READ8_MEMBER(laserdisc_r);
- DECLARE_WRITE8_MEMBER(laserdisc_w);
+ void misc_w(uint8_t data);
+ void dleuro_misc_w(uint8_t data);
+ void led_den1_w(offs_t offset, uint8_t data);
+ void led_den2_w(offs_t offset, uint8_t data);
+ uint8_t laserdisc_r();
+ void laserdisc_w(uint8_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
void dleuro_palette(palette_device &palette) const;
@@ -274,7 +274,7 @@ void dlair_state::machine_reset()
*
*************************************/
-WRITE8_MEMBER(dlair_state::misc_w)
+void dlair_state::misc_w(uint8_t data)
{
/*
D0-D3 = B0-B3
@@ -297,7 +297,7 @@ WRITE8_MEMBER(dlair_state::misc_w)
}
-WRITE8_MEMBER(dlair_state::dleuro_misc_w)
+void dlair_state::dleuro_misc_w(uint8_t data)
{
/*
D0 = CHAR GEN ON+
@@ -324,13 +324,13 @@ WRITE8_MEMBER(dlair_state::dleuro_misc_w)
}
-WRITE8_MEMBER(dlair_state::led_den1_w)
+void dlair_state::led_den1_w(offs_t offset, uint8_t data)
{
m_digits[0 | (offset & 7)] = led_map[data & 0x0f];
}
-WRITE8_MEMBER(dlair_state::led_den2_w)
+void dlair_state::led_den2_w(offs_t offset, uint8_t data)
{
m_digits[8 | (offset & 7)] = led_map[data & 0x0f];
}
@@ -355,7 +355,7 @@ READ_LINE_MEMBER(dlair_state::laserdisc_command_r)
}
-READ8_MEMBER(dlair_state::laserdisc_r)
+uint8_t dlair_state::laserdisc_r()
{
uint8_t result = laserdisc_data_r();
osd_printf_debug("laserdisc_r = %02X\n", result);
@@ -363,7 +363,7 @@ READ8_MEMBER(dlair_state::laserdisc_r)
}
-WRITE8_MEMBER(dlair_state::laserdisc_w)
+void dlair_state::laserdisc_w(uint8_t data)
{
m_laserdisc_data = data;
}
diff --git a/src/mame/drivers/dmndrby.cpp b/src/mame/drivers/dmndrby.cpp
index f86eae03466..5b177e520f4 100644
--- a/src/mame/drivers/dmndrby.cpp
+++ b/src/mame/drivers/dmndrby.cpp
@@ -100,9 +100,9 @@ private:
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
- DECLARE_WRITE8_MEMBER(dderby_sound_w);
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_WRITE8_MEMBER(output_w);
+ void dderby_sound_w(uint8_t data);
+ uint8_t input_r(offs_t offset);
+ void output_w(offs_t offset, uint8_t data);
TILE_GET_INFO_MEMBER(get_dmndrby_tile_info);
void dmndrby_palette(palette_device &palette) const;
uint32_t screen_update_dderby(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -114,14 +114,14 @@ private:
};
-WRITE8_MEMBER(dmndrby_state::dderby_sound_w)
+void dmndrby_state::dderby_sound_w(uint8_t data)
{
m_soundlatch->write(data);
m_audiocpu->set_input_line(0, HOLD_LINE);
}
-READ8_MEMBER(dmndrby_state::input_r)
+uint8_t dmndrby_state::input_r(offs_t offset)
{
switch(offset & 7)
{
@@ -138,7 +138,7 @@ READ8_MEMBER(dmndrby_state::input_r)
return 0xff;
}
-WRITE8_MEMBER(dmndrby_state::output_w)
+void dmndrby_state::output_w(offs_t offset, uint8_t data)
{
/*
---- x--- refill meter [4]
diff --git a/src/mame/drivers/dms5000.cpp b/src/mame/drivers/dms5000.cpp
index fa61cc667dc..0e8b51d7d85 100644
--- a/src/mame/drivers/dms5000.cpp
+++ b/src/mame/drivers/dms5000.cpp
@@ -28,8 +28,8 @@ public:
void dms5000(machine_config &config);
private:
- DECLARE_READ8_MEMBER(status_r);
- DECLARE_WRITE8_MEMBER(brightness_w);
+ uint8_t status_r(offs_t offset);
+ void brightness_w(uint8_t data);
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_dms5000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -41,7 +41,7 @@ private:
};
-READ8_MEMBER(dms5000_state::status_r)
+uint8_t dms5000_state::status_r(offs_t offset)
{
switch (offset)
{
@@ -56,7 +56,7 @@ READ8_MEMBER(dms5000_state::status_r)
}
}
-WRITE8_MEMBER(dms5000_state::brightness_w)
+void dms5000_state::brightness_w(uint8_t data)
{
}
diff --git a/src/mame/drivers/dms86.cpp b/src/mame/drivers/dms86.cpp
index cf73988e327..01951546250 100644
--- a/src/mame/drivers/dms86.cpp
+++ b/src/mame/drivers/dms86.cpp
@@ -50,14 +50,13 @@ public:
{ }
void dms86(machine_config &config);
-
DECLARE_WRITE_LINE_MEMBER(nmi_w);
private:
- DECLARE_WRITE8_MEMBER(m1_ack_w);
+ void m1_ack_w(u8 data);
- DECLARE_READ16_MEMBER(port9a_r);
- DECLARE_READ16_MEMBER(port9c_r);
+ u16 port9a_r();
+ u16 port9c_r();
void kbd_put(u8 data);
void io_map(address_map &map);
@@ -78,7 +77,7 @@ WRITE_LINE_MEMBER(dms86_state::nmi_w)
}
-WRITE8_MEMBER(dms86_state::m1_ack_w)
+void dms86_state::m1_ack_w(u8 data)
{
m_sio[0]->z80daisy_decode(data);
m_sio[1]->z80daisy_decode(data);
@@ -86,14 +85,14 @@ WRITE8_MEMBER(dms86_state::m1_ack_w)
}
-READ16_MEMBER(dms86_state::port9a_r)
+u16 dms86_state::port9a_r()
{
return m_term_data ? 0x40 : 0;
}
-READ16_MEMBER(dms86_state::port9c_r)
+u16 dms86_state::port9c_r()
{
- uint8_t ret = m_term_data;
+ u8 ret = m_term_data;
m_term_data = 0;
return ret;
}
@@ -145,14 +144,7 @@ void dms86_state::dms86(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &dms86_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &dms86_state::io_map);
- // According to the manual the clock is 14,765,600 / 4 but that couldn't possibly work.
- // By maths, clock should be 9600*32*4*16 = 19,660,800 but not working either
- // So, commented out because it makes the whole thing crawl, only get 18% on my machine
- //clock_device &ctc_clock(CLOCK(config, "ctc_clock", 19660800)); //XTAL(14'745'600) / 4
- //ctc_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg0));
- //ctc_clock.signal_handler().append(m_ctc, FUNC(z80ctc_device::trg1));
- //ctc_clock.signal_handler().append(m_ctc, FUNC(z80ctc_device::trg2));
-
+ // According to the manual the clock is 14,765,600 / 4 but that's wrong
Z80CTC(config, m_ctc, XTAL(14'745'600) / 3);
//m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // frame rate interrupt to maincpu
m_ctc->zc_callback<0>().set(m_sio[0], FUNC(z80sio_device::rxtxcb_w)); // SIO1 Ch B
@@ -188,4 +180,4 @@ ROM_END
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1982, dms86, 0, 0, dms86, dms86, dms86_state, empty_init, "Digital Microsystems", "DMS-86", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
+COMP( 1982, dms86, 0, 0, dms86, dms86, dms86_state, empty_init, "Digital Microsystems", "DMS-86", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )
diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp
index 4c6b877c766..ced56a6fb8c 100644
--- a/src/mame/drivers/dmv.cpp
+++ b/src/mame/drivers/dmv.cpp
@@ -81,25 +81,25 @@ public:
private:
void update_halt_line();
- DECLARE_WRITE8_MEMBER(leds_w);
+ void leds_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(dma_hrq_changed);
DECLARE_WRITE_LINE_MEMBER(dmac_eop);
DECLARE_WRITE_LINE_MEMBER(dmac_dack3);
DECLARE_WRITE_LINE_MEMBER(fdc_irq);
DECLARE_WRITE_LINE_MEMBER(pit_out0);
DECLARE_WRITE_LINE_MEMBER(timint_w);
- DECLARE_WRITE8_MEMBER(fdd_motor_w);
- DECLARE_READ8_MEMBER(sys_status_r);
- DECLARE_WRITE8_MEMBER(tc_set_w);
- DECLARE_WRITE8_MEMBER(switch16_w);
- DECLARE_READ8_MEMBER(ramsel_r);
- DECLARE_READ8_MEMBER(romsel_r);
- DECLARE_WRITE8_MEMBER(ramsel_w);
- DECLARE_WRITE8_MEMBER(romsel_w);
+ void fdd_motor_w(uint8_t data);
+ uint8_t sys_status_r();
+ void tc_set_w(uint8_t data);
+ void switch16_w(uint8_t data);
+ uint8_t ramsel_r();
+ uint8_t romsel_r();
+ void ramsel_w(uint8_t data);
+ void romsel_w(uint8_t data);
uint8_t kb_mcu_port1_r();
void kb_mcu_port1_w(uint8_t data);
void kb_mcu_port2_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(rambank_w);
+ void rambank_w(offs_t offset, uint8_t data);
uint8_t program_r(offs_t offset);
void program_w(offs_t offset, uint8_t data);
uint8_t exp_program_r(offs_t offset);
@@ -134,16 +134,16 @@ private:
void ifsel_r(int ifsel, offs_t offset, uint8_t &data);
void ifsel_w(int ifsel, offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER(ifsel0_r) { uint8_t data = 0xff; ifsel_r(0, offset, data); return data; }
- DECLARE_READ8_MEMBER(ifsel1_r) { uint8_t data = 0xff; ifsel_r(1, offset, data); return data; }
- DECLARE_READ8_MEMBER(ifsel2_r) { uint8_t data = 0xff; ifsel_r(2, offset, data); return data; }
- DECLARE_READ8_MEMBER(ifsel3_r) { uint8_t data = 0xff; ifsel_r(3, offset, data); return data; }
- DECLARE_READ8_MEMBER(ifsel4_r) { uint8_t data = 0xff; ifsel_r(4, offset, data); return data; }
- DECLARE_WRITE8_MEMBER(ifsel0_w) { ifsel_w(0, offset, data); }
- DECLARE_WRITE8_MEMBER(ifsel1_w) { ifsel_w(1, offset, data); }
- DECLARE_WRITE8_MEMBER(ifsel2_w) { ifsel_w(2, offset, data); }
- DECLARE_WRITE8_MEMBER(ifsel3_w) { ifsel_w(3, offset, data); }
- DECLARE_WRITE8_MEMBER(ifsel4_w) { ifsel_w(4, offset, data); }
+ uint8_t ifsel0_r(offs_t offset) { uint8_t data = 0xff; ifsel_r(0, offset, data); return data; }
+ uint8_t ifsel1_r(offs_t offset) { uint8_t data = 0xff; ifsel_r(1, offset, data); return data; }
+ uint8_t ifsel2_r(offs_t offset) { uint8_t data = 0xff; ifsel_r(2, offset, data); return data; }
+ uint8_t ifsel3_r(offs_t offset) { uint8_t data = 0xff; ifsel_r(3, offset, data); return data; }
+ uint8_t ifsel4_r(offs_t offset) { uint8_t data = 0xff; ifsel_r(4, offset, data); return data; }
+ void ifsel0_w(offs_t offset, uint8_t data) { ifsel_w(0, offset, data); }
+ void ifsel1_w(offs_t offset, uint8_t data) { ifsel_w(1, offset, data); }
+ void ifsel2_w(offs_t offset, uint8_t data) { ifsel_w(2, offset, data); }
+ void ifsel3_w(offs_t offset, uint8_t data) { ifsel_w(3, offset, data); }
+ void ifsel4_w(offs_t offset, uint8_t data) { ifsel_w(4, offset, data); }
UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels );
UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text );
@@ -196,18 +196,18 @@ private:
int m_irqs[8];
};
-WRITE8_MEMBER(dmv_state::tc_set_w)
+void dmv_state::tc_set_w(uint8_t data)
{
m_fdc->tc_w(true);
}
-WRITE8_MEMBER(dmv_state::switch16_w)
+void dmv_state::switch16_w(uint8_t data)
{
m_switch16 = !m_switch16;
update_halt_line();
}
-WRITE8_MEMBER(dmv_state::leds_w)
+void dmv_state::leds_w(uint8_t data)
{
/*
LEDs Value Significance
@@ -227,34 +227,34 @@ WRITE8_MEMBER(dmv_state::leds_w)
m_leds[7-i] = BIT(data, i);
}
-READ8_MEMBER(dmv_state::ramsel_r)
+uint8_t dmv_state::ramsel_r()
{
m_ramoutdis = false;
return 0;
}
-READ8_MEMBER(dmv_state::romsel_r)
+uint8_t dmv_state::romsel_r()
{
m_ramoutdis = true;
return 0;
}
-WRITE8_MEMBER(dmv_state::ramsel_w)
+void dmv_state::ramsel_w(uint8_t data)
{
m_ramoutdis = false;
}
-WRITE8_MEMBER(dmv_state::romsel_w)
+void dmv_state::romsel_w(uint8_t data)
{
m_ramoutdis = true;
}
-WRITE8_MEMBER(dmv_state::rambank_w)
+void dmv_state::rambank_w(offs_t offset, uint8_t data)
{
m_ram_bank = offset;
}
-WRITE8_MEMBER(dmv_state::fdd_motor_w)
+void dmv_state::fdd_motor_w(uint8_t data)
{
m_pit->write_gate0(1);
m_pit->write_gate0(0);
@@ -264,7 +264,7 @@ WRITE8_MEMBER(dmv_state::fdd_motor_w)
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(m_floppy_motor);
}
-READ8_MEMBER(dmv_state::sys_status_r)
+uint8_t dmv_state::sys_status_r()
{
/*
Main system status
diff --git a/src/mame/drivers/dolphunk.cpp b/src/mame/drivers/dolphunk.cpp
index f1dc5ef5647..1c90abbce24 100644
--- a/src/mame/drivers/dolphunk.cpp
+++ b/src/mame/drivers/dolphunk.cpp
@@ -106,15 +106,15 @@ public:
private:
DECLARE_READ_LINE_MEMBER(cass_r);
- DECLARE_READ8_MEMBER(port07_r);
- DECLARE_WRITE8_MEMBER(port00_w);
- DECLARE_WRITE8_MEMBER(port06_w);
+ u8 port07_r();
+ void port00_w(offs_t offset, u8 data);
+ void port06_w(u8 data);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_w);
void dauphin_io(address_map &map);
void dauphin_mem(address_map &map);
- uint8_t m_cass_data;
- uint8_t m_last_key;
+ u8 m_cass_data;
+ u8 m_last_key;
bool m_cassbit;
bool m_cassold;
bool m_speaker_state;
@@ -129,20 +129,20 @@ READ_LINE_MEMBER( dauphin_state::cass_r )
return (m_cass->input() > 0.03) ? 1 : 0;
}
-WRITE8_MEMBER( dauphin_state::port00_w )
+void dauphin_state::port00_w(offs_t offset, u8 data)
{
m_display->matrix(1<<offset, data);
}
-WRITE8_MEMBER( dauphin_state::port06_w )
+void dauphin_state::port06_w(u8 data)
{
m_speaker_state ^=1;
m_speaker->level_w(m_speaker_state);
}
-READ8_MEMBER( dauphin_state::port07_r )
+u8 dauphin_state::port07_r()
{
- uint8_t keyin, i, data = 0x40;
+ u8 keyin, i, data = 0x40;
keyin = ioport("X0")->read();
if (keyin != 0xff)
diff --git a/src/mame/drivers/dominob.cpp b/src/mame/drivers/dominob.cpp
index 3daa7ceede5..8284dd506ce 100644
--- a/src/mame/drivers/dominob.cpp
+++ b/src/mame/drivers/dominob.cpp
@@ -101,8 +101,8 @@ private:
//uint8_t m_paddle_select;
//uint8_t m_paddle_value;
- DECLARE_WRITE8_MEMBER(dominob_d008_w);
- DECLARE_READ8_MEMBER(dominob_unk_port02_r);
+ void dominob_d008_w(uint8_t data);
+ uint8_t dominob_unk_port02_r();
uint32_t screen_update_dominob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void memmap(address_map &map);
@@ -182,7 +182,7 @@ uint32_t dominob_state::screen_update_dominob(screen_device &screen, bitmap_ind1
}
-WRITE8_MEMBER(dominob_state::dominob_d008_w)
+void dominob_state::dominob_d008_w(uint8_t data)
{
/* is there a purpose on this ? always set to 0x00 (read from 0xc47b in RAM) */
}
@@ -209,7 +209,7 @@ void dominob_state::memmap(address_map &map)
}
/* I don't know if this has a purpose - also read in 'arkatayt' but not handled */
-READ8_MEMBER(dominob_state::dominob_unk_port02_r)
+uint8_t dominob_state::dominob_unk_port02_r()
{
return 0xff;
}
diff --git a/src/mame/drivers/dorachan.cpp b/src/mame/drivers/dorachan.cpp
index 9c08186054f..fc0e8a74f96 100644
--- a/src/mame/drivers/dorachan.cpp
+++ b/src/mame/drivers/dorachan.cpp
@@ -38,10 +38,10 @@ public:
void dorachan(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_WRITE8_MEMBER(protection_w);
- DECLARE_READ8_MEMBER(protection_r);
- DECLARE_READ8_MEMBER(v128_r);
+ void control_w(uint8_t data);
+ void protection_w(uint8_t data);
+ uint8_t protection_r();
+ uint8_t v128_r();
uint32_t screen_update_dorachan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void dorachan_io_map(address_map &map);
void dorachan_map(address_map &map);
@@ -107,7 +107,7 @@ uint32_t dorachan_state::screen_update_dorachan(screen_device &screen, bitmap_rg
*
*************************************/
-WRITE8_MEMBER(dorachan_state::protection_w)
+void dorachan_state::protection_w(uint8_t data)
{
// e0 seems like some sort of control byte?
// ignore f3 writes, written after every command?
@@ -118,7 +118,7 @@ WRITE8_MEMBER(dorachan_state::protection_w)
}
}
-READ8_MEMBER(dorachan_state::protection_r)
+uint8_t dorachan_state::protection_r()
{
switch (m_prot_value)
{
@@ -135,13 +135,13 @@ READ8_MEMBER(dorachan_state::protection_r)
return 0;
}
-READ8_MEMBER(dorachan_state::v128_r)
+uint8_t dorachan_state::v128_r()
{
// to avoid resetting (when player 2 starts) bit 0 need to be inverted when screen is flipped
return 0xfe | (BIT(m_screen->vpos(), 7) ^ m_flip_screen);
}
-WRITE8_MEMBER(dorachan_state::control_w)
+void dorachan_state::control_w(uint8_t data)
{
// d6: flip screen
// other: ?
diff --git a/src/mame/drivers/dotrikun.cpp b/src/mame/drivers/dotrikun.cpp
index 0a379652e2c..d979289c874 100644
--- a/src/mame/drivers/dotrikun.cpp
+++ b/src/mame/drivers/dotrikun.cpp
@@ -62,8 +62,8 @@ protected:
uint8_t m_vram_latch;
uint8_t m_color;
- DECLARE_WRITE8_MEMBER(vram_w);
- DECLARE_WRITE8_MEMBER(color_w);
+ void vram_w(offs_t offset, uint8_t data);
+ void color_w(uint8_t data);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_off);
@@ -106,13 +106,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(dotrikun_state::scanline_on)
*
*************************************/
-WRITE8_MEMBER(dotrikun_state::vram_w)
+void dotrikun_state::vram_w(offs_t offset, uint8_t data)
{
m_screen->update_now();
m_vram[offset] = data;
}
-WRITE8_MEMBER(dotrikun_state::color_w)
+void dotrikun_state::color_w(uint8_t data)
{
// d0-d2: fg palette
// d3-d5: bg palette
diff --git a/src/mame/drivers/dpb7000.cpp b/src/mame/drivers/dpb7000.cpp
index 201cfed27f7..215fbe12f14 100644
--- a/src/mame/drivers/dpb7000.cpp
+++ b/src/mame/drivers/dpb7000.cpp
@@ -100,21 +100,21 @@ private:
void main_map(address_map &map);
void fddcpu_map(address_map &map);
- DECLARE_READ16_MEMBER(bus_error_r);
- DECLARE_WRITE16_MEMBER(bus_error_w);
+ uint16_t bus_error_r(offs_t offset);
+ void bus_error_w(offs_t offset, uint16_t data);
- DECLARE_WRITE8_MEMBER(csr_w);
- DECLARE_READ8_MEMBER(csr_r);
+ void csr_w(uint8_t data);
+ uint8_t csr_r();
- DECLARE_READ16_MEMBER(cpu_ctrlbus_r);
- DECLARE_WRITE16_MEMBER(cpu_ctrlbus_w);
+ uint16_t cpu_ctrlbus_r();
+ void cpu_ctrlbus_w(uint16_t data);
DECLARE_WRITE_LINE_MEMBER(req_a_w);
DECLARE_WRITE_LINE_MEMBER(req_b_w);
void fdd_index_callback(floppy_image_device *floppy, int state);
- DECLARE_READ8_MEMBER(fdd_ctrl_r);
- DECLARE_READ8_MEMBER(fdd_cmd_r);
+ uint8_t fdd_ctrl_r();
+ uint8_t fdd_cmd_r();
void fddcpu_p1_w(uint8_t data);
uint8_t fddcpu_p2_r();
void fddcpu_p2_w(uint8_t data);
@@ -133,8 +133,8 @@ private:
SYSCTRL_REQ_B_IN = 0x8000
};
- DECLARE_READ16_MEMBER(cpu_sysctrl_r);
- DECLARE_WRITE16_MEMBER(cpu_sysctrl_w);
+ uint16_t cpu_sysctrl_r();
+ void cpu_sysctrl_w(uint16_t data);
void update_req_irqs();
MC6845_UPDATE_ROW(crtc_update_row);
@@ -934,7 +934,7 @@ void dpb7000_state::diskseq_tick()
}
}
-READ16_MEMBER(dpb7000_state::bus_error_r)
+uint16_t dpb7000_state::bus_error_r(offs_t offset)
{
if(!machine().side_effects_disabled())
{
@@ -945,7 +945,7 @@ READ16_MEMBER(dpb7000_state::bus_error_r)
return 0xff;
}
-WRITE16_MEMBER(dpb7000_state::bus_error_w)
+void dpb7000_state::bus_error_w(offs_t offset, uint16_t data)
{
if(!machine().side_effects_disabled())
{
@@ -955,19 +955,19 @@ WRITE16_MEMBER(dpb7000_state::bus_error_w)
}
}
-WRITE8_MEMBER(dpb7000_state::csr_w)
+void dpb7000_state::csr_w(uint8_t data)
{
LOGMASKED(LOG_CSR, "%s: Card Select write: %02x\n", machine().describe_context(), data & 0x0f);
m_csr = data & 0x0f;
}
-READ8_MEMBER(dpb7000_state::csr_r)
+uint8_t dpb7000_state::csr_r()
{
LOGMASKED(LOG_CSR, "%s: Card Select read(?): %02x\n", machine().describe_context(), m_csr);
return m_csr;
}
-READ16_MEMBER(dpb7000_state::cpu_ctrlbus_r)
+uint16_t dpb7000_state::cpu_ctrlbus_r()
{
uint16_t ret = 0;
switch (m_csr)
@@ -1175,7 +1175,7 @@ void dpb7000_state::handle_command(uint16_t data)
}
}
-WRITE16_MEMBER(dpb7000_state::cpu_ctrlbus_w)
+void dpb7000_state::cpu_ctrlbus_w(uint16_t data)
{
switch (m_csr)
{
@@ -1491,7 +1491,7 @@ WRITE_LINE_MEMBER(dpb7000_state::req_b_w)
update_req_irqs();
}
-READ16_MEMBER(dpb7000_state::cpu_sysctrl_r)
+uint16_t dpb7000_state::cpu_sysctrl_r()
{
const uint16_t ctrl = m_sys_ctrl &~ SYSCTRL_AUTO_START;
const uint16_t auto_start = m_auto_start->read() ? SYSCTRL_AUTO_START : 0;
@@ -1500,7 +1500,7 @@ READ16_MEMBER(dpb7000_state::cpu_sysctrl_r)
return ret;
}
-WRITE16_MEMBER(dpb7000_state::cpu_sysctrl_w)
+void dpb7000_state::cpu_sysctrl_w(uint16_t data)
{
const uint16_t mask = (SYSCTRL_REQ_A_EN | SYSCTRL_REQ_B_EN);
LOGMASKED(LOG_SYS_CTRL, "%s: CPU to Control Bus write: %04x\n", machine().describe_context(), data);
@@ -1516,7 +1516,7 @@ void dpb7000_state::update_req_irqs()
m_maincpu->set_input_line(4, (m_sys_ctrl & SYSCTRL_REQ_B_IN) && (m_sys_ctrl & SYSCTRL_REQ_B_EN) ? ASSERT_LINE : CLEAR_LINE);
}
-READ8_MEMBER(dpb7000_state::fdd_ctrl_r)
+uint8_t dpb7000_state::fdd_ctrl_r()
{
// D4: Command Tag Flag
// D5: Restore Flag
@@ -1687,7 +1687,7 @@ uint8_t dpb7000_state::fddcpu_p2_r()
return ret;
}
-READ8_MEMBER(dpb7000_state::fdd_cmd_r)
+uint8_t dpb7000_state::fdd_cmd_r()
{
LOGMASKED(LOG_FDC_CMD, "%s: Floppy CPU command read: %02x\n", m_diskseq_cmd_to_ctrl);
return m_diskseq_cmd_to_ctrl;
diff --git a/src/mame/drivers/dps1.cpp b/src/mame/drivers/dps1.cpp
index d78efb8be14..61911ca608b 100644
--- a/src/mame/drivers/dps1.cpp
+++ b/src/mame/drivers/dps1.cpp
@@ -35,28 +35,25 @@ public:
{ }
void dps1(machine_config &config);
-
void init_dps1();
-protected:
- virtual void machine_reset() override;
-
private:
- DECLARE_WRITE8_MEMBER(portb2_w);
- DECLARE_WRITE8_MEMBER(portb4_w);
- DECLARE_WRITE8_MEMBER(portb6_w);
- DECLARE_WRITE8_MEMBER(portb8_w);
- DECLARE_WRITE8_MEMBER(portba_w);
- DECLARE_WRITE8_MEMBER(portbc_w);
- DECLARE_WRITE8_MEMBER(portbe_w);
- DECLARE_READ8_MEMBER(portff_r);
- DECLARE_WRITE8_MEMBER(portff_w);
+ virtual void machine_reset() override;
+ void portb2_w(u8 data);
+ void portb4_w(u8 data);
+ void portb6_w(u8 data);
+ void portb8_w(u8 data);
+ void portba_w(u8 data);
+ void portbc_w(u8 data);
+ void portbe_w(u8 data);
+ u8 portff_r();
+ void portff_w(u8 data);
DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
void io_map(address_map &map);
void mem_map(address_map &map);
bool m_dma_dir;
- uint16_t m_dma_adr;
+ u16 m_dma_adr;
required_device<cpu_device> m_maincpu;
required_device<upd765_family_device> m_fdc;
required_device<floppy_connector> m_floppy0;
@@ -97,54 +94,54 @@ void dps1_state::io_map(address_map &map)
// read from disk, to memory
-WRITE8_MEMBER( dps1_state::portb2_w )
+void dps1_state::portb2_w(u8 data)
{
m_dma_dir = 1;
}
// write to disk, from memory
-WRITE8_MEMBER( dps1_state::portb4_w )
+void dps1_state::portb4_w(u8 data)
{
m_dma_dir = 0;
}
// enable eprom
-WRITE8_MEMBER( dps1_state::portb6_w )
+void dps1_state::portb6_w(u8 data)
{
membank("bankr0")->set_entry(1); // point at rom
}
// set A16-23
-WRITE8_MEMBER( dps1_state::portb8_w )
+void dps1_state::portb8_w(u8 data)
{
}
// set A8-15
-WRITE8_MEMBER( dps1_state::portba_w )
+void dps1_state::portba_w(u8 data)
{
m_dma_adr = (data << 8) | (m_dma_adr & 0xff);
}
// set A0-7
-WRITE8_MEMBER( dps1_state::portbc_w )
+void dps1_state::portbc_w(u8 data)
{
m_dma_adr = (m_dma_adr & 0xff00) | data;
}
// disable eprom
-WRITE8_MEMBER( dps1_state::portbe_w )
+void dps1_state::portbe_w(u8 data)
{
membank("bankr0")->set_entry(0); // point at ram
}
// read 8 front-panel switches
-READ8_MEMBER( dps1_state::portff_r )
+u8 dps1_state::portff_r()
{
return 0x0e;
}
// write to 8 leds
-WRITE8_MEMBER( dps1_state::portff_w )
+void dps1_state::portff_w(u8 data)
{
}
@@ -183,7 +180,7 @@ void dps1_state::machine_reset()
void dps1_state::init_dps1()
{
- uint8_t *main = memregion("maincpu")->base();
+ u8 *main = memregion("maincpu")->base();
membank("bankr0")->configure_entry(1, &main[0x0000]);
membank("bankr0")->configure_entry(0, &main[0x0400]);
diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp
index 79f911bd7f0..2161f2fd9f5 100644
--- a/src/mame/drivers/dreambal.cpp
+++ b/src/mame/drivers/dreambal.cpp
@@ -60,10 +60,10 @@ private:
uint32_t screen_update_dreambal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(bank_callback);
- DECLARE_READ16_MEMBER( dreambal_protection_region_0_104_r );
- DECLARE_WRITE16_MEMBER( dreambal_protection_region_0_104_w );
+ uint16_t dreambal_protection_region_0_104_r(offs_t offset);
+ void dreambal_protection_region_0_104_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- DECLARE_WRITE16_MEMBER( dreambal_eeprom_w )
+ void dreambal_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0)
{
if (data&0xfff8)
{
@@ -97,7 +97,7 @@ uint32_t dreambal_state::screen_update_dreambal(screen_device &screen, bitmap_in
}
-READ16_MEMBER( dreambal_state::dreambal_protection_region_0_104_r )
+uint16_t dreambal_state::dreambal_protection_region_0_104_r(offs_t offset)
{
int real_address = 0 + (offset *2);
int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
@@ -106,7 +106,7 @@ READ16_MEMBER( dreambal_state::dreambal_protection_region_0_104_r )
return data;
}
-WRITE16_MEMBER( dreambal_state::dreambal_protection_region_0_104_w )
+void dreambal_state::dreambal_protection_region_0_104_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
int real_address = 0 + (offset *2);
int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
diff --git a/src/mame/drivers/dreamwld.cpp b/src/mame/drivers/dreamwld.cpp
index 8264ff67f6a..896deba394c 100644
--- a/src/mame/drivers/dreamwld.cpp
+++ b/src/mame/drivers/dreamwld.cpp
@@ -179,7 +179,7 @@ private:
void prot_p2_w(uint8_t data);
uint8_t prot_p2_r();
- DECLARE_WRITE32_MEMBER(to_prot_w);
+ void to_prot_w(uint32_t data);
template<int Layer> u16 vram_r(offs_t offset);
@@ -786,7 +786,7 @@ uint8_t dreamwld_state::prot_p2_r()
return m_port2_data;
}
-WRITE32_MEMBER(dreamwld_state::to_prot_w)
+void dreamwld_state::to_prot_w(uint32_t data)
{
m_port2_data &= 0xfb; // lower bit 0x04 to indicate data sent?
logerror("%s:to_prot_w %08x\n", machine().describe_context(), data);
diff --git a/src/mame/drivers/drtomy.cpp b/src/mame/drivers/drtomy.cpp
index d5c6f0cb7dc..b615c03ecf6 100644
--- a/src/mame/drivers/drtomy.cpp
+++ b/src/mame/drivers/drtomy.cpp
@@ -45,9 +45,9 @@ private:
/* misc */
int m_oki_bank;
- DECLARE_WRITE16_MEMBER(drtomy_vram_fg_w);
- DECLARE_WRITE16_MEMBER(drtomy_vram_bg_w);
- DECLARE_WRITE16_MEMBER(drtomy_okibank_w);
+ void drtomy_vram_fg_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void drtomy_vram_bg_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void drtomy_okibank_w(uint16_t data);
TILE_GET_INFO_MEMBER(get_tile_info_fg);
TILE_GET_INFO_MEMBER(get_tile_info_bg);
virtual void machine_start() override;
@@ -156,19 +156,19 @@ uint32_t drtomy_state::screen_update_drtomy(screen_device &screen, bitmap_ind16
return 0;
}
-WRITE16_MEMBER(drtomy_state::drtomy_vram_fg_w)
+void drtomy_state::drtomy_vram_fg_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_videoram_fg[offset]);
m_tilemap_fg->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(drtomy_state::drtomy_vram_bg_w)
+void drtomy_state::drtomy_vram_bg_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_videoram_bg[offset]);
m_tilemap_bg->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(drtomy_state::drtomy_okibank_w)
+void drtomy_state::drtomy_okibank_w(uint16_t data)
{
if (m_oki_bank != (data & 3))
{
diff --git a/src/mame/drivers/drw80pkr.cpp b/src/mame/drivers/drw80pkr.cpp
index fa768209258..61be68048fb 100644
--- a/src/mame/drivers/drw80pkr.cpp
+++ b/src/mame/drivers/drw80pkr.cpp
@@ -82,13 +82,13 @@ private:
void p2_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(prog_w);
void bus_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(io_w);
+ void io_w(offs_t offset, uint8_t data);
DECLARE_READ_LINE_MEMBER(t0_r);
DECLARE_READ_LINE_MEMBER(t1_r);
uint8_t p1_r();
uint8_t p2_r();
uint8_t bus_r();
- DECLARE_READ8_MEMBER(io_r);
+ uint8_t io_r(offs_t offset);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
void drw80pkr_palette(palette_device &palette) const;
@@ -139,7 +139,7 @@ void drw80pkr_state::bus_w(uint8_t data)
m_bus = data;
}
-WRITE8_MEMBER(drw80pkr_state::io_w)
+void drw80pkr_state::io_w(offs_t offset, uint8_t data)
{
uint16_t n_offs;
@@ -219,7 +219,7 @@ uint8_t drw80pkr_state::bus_r()
return m_bus;
}
-READ8_MEMBER(drw80pkr_state::io_r)
+uint8_t drw80pkr_state::io_r(offs_t offset)
{
uint8_t ret;
uint16_t kbdin;
diff --git a/src/mame/drivers/dsb46.cpp b/src/mame/drivers/dsb46.cpp
index 1f2261409f2..c6518075c33 100644
--- a/src/mame/drivers/dsb46.cpp
+++ b/src/mame/drivers/dsb46.cpp
@@ -43,14 +43,11 @@ public:
{ }
void dsb46(machine_config &config);
-
void init_dsb46();
-protected:
- virtual void machine_reset() override;
-
private:
- DECLARE_WRITE8_MEMBER(port1a_w);
+ virtual void machine_reset() override;
+ void port1a_w(u8 data);
void dsb46_io(address_map &map);
void dsb46_mem(address_map &map);
required_device<z80_device> m_maincpu;
@@ -81,7 +78,7 @@ INPUT_PORTS_END
void dsb46_state::init_dsb46()
{
- uint8_t *RAM = memregion("maincpu")->base();
+ u8 *RAM = memregion("maincpu")->base();
membank("read")->configure_entry(0, &RAM[0x10000]);
membank("read")->configure_entry(1, &RAM[0x00000]);
membank("write")->configure_entry(0, &RAM[0x00000]);
@@ -94,7 +91,7 @@ void dsb46_state::machine_reset()
m_maincpu->reset();
}
-WRITE8_MEMBER( dsb46_state::port1a_w )
+void dsb46_state::port1a_w(u8 data)
{
membank("read")->set_entry(data & 1);
}
diff --git a/src/mame/drivers/duet16.cpp b/src/mame/drivers/duet16.cpp
index d30111d0ef1..e2c0f49c303 100644
--- a/src/mame/drivers/duet16.cpp
+++ b/src/mame/drivers/duet16.cpp
@@ -46,21 +46,21 @@ public:
protected:
void machine_reset() override;
private:
- DECLARE_READ8_MEMBER(pic_r);
- DECLARE_WRITE8_MEMBER(pic_w);
- uint8_t dma_mem_r(offs_t offset);
- void dma_mem_w(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER(dmapg_r);
- DECLARE_WRITE8_MEMBER(dmapg_w);
- DECLARE_WRITE8_MEMBER(fdcctrl_w);
- DECLARE_WRITE8_MEMBER(dispctrl_w);
- DECLARE_WRITE8_MEMBER(pal_w);
+ u8 pic_r(offs_t offset);
+ void pic_w(offs_t offset, u8 data);
+ u8 dma_mem_r(offs_t offset);
+ void dma_mem_w(offs_t offset, u8 data);
+ u8 dmapg_r();
+ void dmapg_w(u8 data);
+ void fdcctrl_w(u8 data);
+ void dispctrl_w(u8 data);
+ void pal_w(offs_t offset, u8 data);
DECLARE_WRITE_LINE_MEMBER(hrq_w);
- DECLARE_READ8_MEMBER(rtc_r);
- DECLARE_WRITE8_MEMBER(rtc_w);
- DECLARE_READ8_MEMBER(rtc_stat_r);
- DECLARE_WRITE8_MEMBER(rtc_addr_w);
- DECLARE_READ16_MEMBER(sysstat_r);
+ u8 rtc_r();
+ void rtc_w(u8 data);
+ u8 rtc_stat_r();
+ void rtc_addr_w(u8 data);
+ u16 sysstat_r();
DECLARE_WRITE_LINE_MEMBER(rtc_d0_w);
DECLARE_WRITE_LINE_MEMBER(rtc_d1_w);
DECLARE_WRITE_LINE_MEMBER(rtc_d2_w);
@@ -94,17 +94,17 @@ void duet16_state::machine_reset()
rtc_irq_reset();
}
-READ8_MEMBER(duet16_state::pic_r)
+u8 duet16_state::pic_r(offs_t offset)
{
return m_pic->read(offset ^ 1);
}
-WRITE8_MEMBER(duet16_state::pic_w)
+void duet16_state::pic_w(offs_t offset, u8 data)
{
m_pic->write(offset ^ 1, data);
}
-WRITE8_MEMBER(duet16_state::fdcctrl_w)
+void duet16_state::fdcctrl_w(u8 data)
{
floppy_image_device *f = m_fd[BIT(data, 2) ? 1 : 0]->get_device();
m_fdc->set_floppy(f);
@@ -117,22 +117,22 @@ WRITE8_MEMBER(duet16_state::fdcctrl_w)
// TODO: bit 3 = LSPD
}
-uint8_t duet16_state::dma_mem_r(offs_t offset)
+u8 duet16_state::dma_mem_r(offs_t offset)
{
return m_maincpu->space(AS_PROGRAM).read_byte((m_dmapg << 16) | offset);
}
-void duet16_state::dma_mem_w(offs_t offset, uint8_t data)
+void duet16_state::dma_mem_w(offs_t offset, u8 data)
{
m_maincpu->space(AS_PROGRAM).write_byte((m_dmapg << 16) | offset, data);
}
-READ8_MEMBER(duet16_state::dmapg_r)
+u8 duet16_state::dmapg_r()
{
return m_dmapg;
}
-WRITE8_MEMBER(duet16_state::dmapg_w)
+void duet16_state::dmapg_w(u8 data)
{
m_dmapg = data & 0xf;
}
@@ -143,7 +143,7 @@ WRITE_LINE_MEMBER(duet16_state::hrq_w)
m_dmac->hack_w(state);
}
-READ16_MEMBER(duet16_state::sysstat_r)
+u16 duet16_state::sysstat_r()
{
return 0xb484;
}
@@ -178,14 +178,14 @@ void duet16_state::duet16_io(address_map &map)
{
}
-WRITE8_MEMBER(duet16_state::pal_w)
+void duet16_state::pal_w(offs_t offset, u8 data)
{
int entry = (BIT(offset, 0) ? 2 : 0) | (BIT(offset, 5) ? 0 : 4);
m_pal->set_pen_color(entry, pal1bit(BIT(data, 1)), pal1bit(BIT(data, 2)), pal1bit(BIT(data, 0)));
m_pal->set_pen_color(entry + 1, pal1bit(BIT(data, 5)), pal1bit(BIT(data, 6)), pal1bit(BIT(data, 4)));
}
-WRITE8_MEMBER(duet16_state::dispctrl_w)
+void duet16_state::dispctrl_w(u8 data)
{
m_dispctrl = data;
}
@@ -276,7 +276,7 @@ void duet16_state::rtc_irq_reset()
m_tmint->in_w<1>(0);
}
-READ8_MEMBER(duet16_state::rtc_r)
+u8 duet16_state::rtc_r()
{
u8 ret;
m_rtc->cs2_w(ASSERT_LINE);
@@ -287,7 +287,7 @@ READ8_MEMBER(duet16_state::rtc_r)
return ret;
}
-WRITE8_MEMBER(duet16_state::rtc_w)
+void duet16_state::rtc_w(u8 data)
{
m_rtc->d0_w(BIT(data, 0));
m_rtc->d1_w(BIT(data, 1));
@@ -299,7 +299,7 @@ WRITE8_MEMBER(duet16_state::rtc_w)
m_rtc->cs2_w(CLEAR_LINE);
}
-READ8_MEMBER(duet16_state::rtc_stat_r)
+u8 duet16_state::rtc_stat_r()
{
u8 status = m_rtc_irq ? 0x80 : 0;
if (!machine().side_effects_disabled())
@@ -307,7 +307,7 @@ READ8_MEMBER(duet16_state::rtc_stat_r)
return status;
}
-WRITE8_MEMBER(duet16_state::rtc_addr_w)
+void duet16_state::rtc_addr_w(u8 data)
{
m_rtc->d0_w(BIT(data, 0));
m_rtc->d1_w(BIT(data, 1));
diff --git a/src/mame/drivers/dunhuang.cpp b/src/mame/drivers/dunhuang.cpp
index dc902f5df72..5f6498aa59a 100644
--- a/src/mame/drivers/dunhuang.cpp
+++ b/src/mame/drivers/dunhuang.cpp
@@ -84,26 +84,26 @@ public:
void dunhuang(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(pos_x_w);
- DECLARE_WRITE8_MEMBER(pos_y_w);
- DECLARE_WRITE8_MEMBER(tile_w);
- DECLARE_WRITE8_MEMBER(tile2_w);
- DECLARE_WRITE8_MEMBER(clear_y_w);
- DECLARE_WRITE8_MEMBER(horiz_clear_w);
- DECLARE_WRITE8_MEMBER(vert_clear_w);
- DECLARE_WRITE8_MEMBER(block_dest_w);
- DECLARE_WRITE8_MEMBER(block_x_w);
- DECLARE_WRITE8_MEMBER(block_y_w);
- DECLARE_WRITE8_MEMBER(block_w_w);
- DECLARE_WRITE8_MEMBER(block_c_w);
- DECLARE_WRITE8_MEMBER(block_addr_lo_w);
- DECLARE_WRITE8_MEMBER(block_addr_hi_w);
- DECLARE_WRITE8_MEMBER(block_h_w);
- DECLARE_WRITE8_MEMBER(layers_w);
+ void pos_x_w(uint8_t data);
+ void pos_y_w(uint8_t data);
+ void tile_w(offs_t offset, uint8_t data);
+ void tile2_w(offs_t offset, uint8_t data);
+ void clear_y_w(uint8_t data);
+ void horiz_clear_w(uint8_t data);
+ void vert_clear_w(uint8_t data);
+ void block_dest_w(uint8_t data);
+ void block_x_w(uint8_t data);
+ void block_y_w(uint8_t data);
+ void block_w_w(uint8_t data);
+ void block_c_w(uint8_t data);
+ void block_addr_lo_w(uint8_t data);
+ void block_addr_hi_w(uint8_t data);
+ void block_h_w(uint8_t data);
+ void layers_w(uint8_t data);
void input_w(uint8_t data);
- DECLARE_READ8_MEMBER(service_r);
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_WRITE8_MEMBER(rombank_w);
+ uint8_t service_r();
+ uint8_t input_r();
+ void rombank_w(uint8_t data);
uint8_t dsw_r();
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -226,21 +226,21 @@ if (machine().input().code_pressed(KEYCODE_Z))
// Tilemaps access
-WRITE8_MEMBER(dunhuang_state::pos_x_w)
+void dunhuang_state::pos_x_w(uint8_t data)
{
m_pos_x = data & 0x3f;
m_written = 0;
m_written2 = 0;
}
-WRITE8_MEMBER(dunhuang_state::pos_y_w)
+void dunhuang_state::pos_y_w(uint8_t data)
{
m_pos_y = data;
m_written = 0;
m_written2 = 0;
}
-WRITE8_MEMBER(dunhuang_state::tile_w)
+void dunhuang_state::tile_w(offs_t offset, uint8_t data)
{
int addr;
@@ -266,7 +266,7 @@ WRITE8_MEMBER(dunhuang_state::tile_w)
m_tmap->mark_tile_dirty(addr);
}
-WRITE8_MEMBER(dunhuang_state::tile2_w)
+void dunhuang_state::tile2_w(offs_t offset, uint8_t data)
{
int addr;
@@ -294,11 +294,11 @@ WRITE8_MEMBER(dunhuang_state::tile2_w)
// Clear a row of tiles (videoram)
-WRITE8_MEMBER(dunhuang_state::clear_y_w)
+void dunhuang_state::clear_y_w(uint8_t data)
{
m_clear_y = data;
}
-WRITE8_MEMBER(dunhuang_state::horiz_clear_w)
+void dunhuang_state::horiz_clear_w(uint8_t data)
{
int i;
// logerror("%06x: horiz clear, y = %02x, data = %02d\n", m_maincpu->pc(), m_clear_y,data);
@@ -314,7 +314,7 @@ WRITE8_MEMBER(dunhuang_state::horiz_clear_w)
// Clear a column of tiles (videoram2)
-WRITE8_MEMBER(dunhuang_state::vert_clear_w)
+void dunhuang_state::vert_clear_w(uint8_t data)
{
int i;
// logerror("%06x: vert clear, x = %02x, y = %02x, data = %02x\n", m_maincpu->pc(), m_pos_x,m_pos_y,data);
@@ -334,43 +334,43 @@ WRITE8_MEMBER(dunhuang_state::vert_clear_w)
// The tiles codes are read from the graphics roms too!
//
-WRITE8_MEMBER(dunhuang_state::block_dest_w)
+void dunhuang_state::block_dest_w(uint8_t data)
{
m_block_dest = data;
}
-WRITE8_MEMBER(dunhuang_state::block_x_w)
+void dunhuang_state::block_x_w(uint8_t data)
{
m_block_x = data;
}
-WRITE8_MEMBER(dunhuang_state::block_y_w)
+void dunhuang_state::block_y_w(uint8_t data)
{
m_block_y = data;
}
-WRITE8_MEMBER(dunhuang_state::block_w_w)
+void dunhuang_state::block_w_w(uint8_t data)
{
m_block_w = data;
}
-WRITE8_MEMBER(dunhuang_state::block_c_w)
+void dunhuang_state::block_c_w(uint8_t data)
{
m_block_c = data;
}
-WRITE8_MEMBER(dunhuang_state::block_addr_lo_w)
+void dunhuang_state::block_addr_lo_w(uint8_t data)
{
m_block_addr_lo = data;
}
-WRITE8_MEMBER(dunhuang_state::block_addr_hi_w)
+void dunhuang_state::block_addr_hi_w(uint8_t data)
{
m_block_addr_hi = data;
}
-WRITE8_MEMBER(dunhuang_state::block_h_w)
+void dunhuang_state::block_h_w(uint8_t data)
{
int i,j, addr;
uint8_t *tile_addr;
@@ -420,7 +420,7 @@ WRITE8_MEMBER(dunhuang_state::block_h_w)
// Layers control (not understood)
-WRITE8_MEMBER(dunhuang_state::layers_w)
+void dunhuang_state::layers_w(uint8_t data)
{
// popmessage("layers %02x",data);
m_layers = data;
@@ -444,7 +444,7 @@ void dunhuang_state::input_w(uint8_t data)
m_input = data;
}
-READ8_MEMBER(dunhuang_state::service_r)
+uint8_t dunhuang_state::service_r()
{
return m_service->read()
| ((m_hopper && !(m_screen->frame_number() % 10)) ? 0x00 : 0x08) // bit 3: hopper sensor
@@ -462,7 +462,7 @@ uint8_t dunhuang_state::dsw_r()
logerror("%s: warning, unknown dsw bits read, input = %02x\n", machine().describe_context(), m_input);
return 0xff;
}
-READ8_MEMBER(dunhuang_state::input_r)
+uint8_t dunhuang_state::input_r()
{
if (!(m_input & 0x01)) return m_inputs[0]->read();
if (!(m_input & 0x02)) return m_inputs[1]->read();
@@ -473,7 +473,7 @@ READ8_MEMBER(dunhuang_state::input_r)
return 0xff;
}
-WRITE8_MEMBER(dunhuang_state::rombank_w)
+void dunhuang_state::rombank_w(uint8_t data)
{
// ? data & 0x01
// ? data & 0x02
diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp
index d654e026898..664a1d83db0 100644
--- a/src/mame/drivers/dvk_kcgd.cpp
+++ b/src/mame/drivers/dvk_kcgd.cpp
@@ -85,18 +85,18 @@ private:
};
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- DECLARE_READ16_MEMBER(vram_addr_r);
- DECLARE_READ16_MEMBER(vram_data_r);
- DECLARE_READ16_MEMBER(vram_mmap_r);
- DECLARE_WRITE16_MEMBER(vram_addr_w);
- DECLARE_WRITE16_MEMBER(vram_data_w);
- DECLARE_WRITE16_MEMBER(vram_mmap_w);
- DECLARE_READ16_MEMBER(status_r);
- DECLARE_WRITE16_MEMBER(status_w);
- DECLARE_READ8_MEMBER(palette_index_r);
- DECLARE_READ8_MEMBER(palette_data_r);
- DECLARE_WRITE8_MEMBER(palette_index_w);
- DECLARE_WRITE8_MEMBER(palette_data_w);
+ uint16_t vram_addr_r();
+ uint16_t vram_data_r();
+ uint16_t vram_mmap_r(offs_t offset);
+ void vram_addr_w(uint16_t data);
+ void vram_data_w(uint16_t data);
+ void vram_mmap_w(offs_t offset, uint16_t data);
+ uint16_t status_r();
+ void status_w(uint16_t data);
+ uint8_t palette_index_r();
+ uint8_t palette_data_r();
+ void palette_index_w(uint8_t data);
+ void palette_data_w(uint8_t data);
//emu_timer *m_vsync_on_timer;
//emu_timer *m_vsync_off_timer;
@@ -190,65 +190,65 @@ void kcgd_state::kcgd_palette(palette_device &palette) const
VRAM is 128K and is word-addressable, so address fits into 16 bits.
Low 32K of VRAM are not used to store pixel data -- XXX.
*/
-WRITE16_MEMBER(kcgd_state::vram_addr_w)
+void kcgd_state::vram_addr_w(uint16_t data)
{
DBG_LOG(3,"VRAM WA", ("%06o\n", data));
m_video.vram_addr = data;
}
-READ16_MEMBER(kcgd_state::vram_addr_r)
+uint16_t kcgd_state::vram_addr_r()
{
DBG_LOG(3,"VRAM RA", ("\n"));
return m_video.vram_addr;
}
-WRITE16_MEMBER(kcgd_state::vram_data_w)
+void kcgd_state::vram_data_w(uint16_t data)
{
DBG_LOG(1,"VRAM W2", ("%06o <- %04XH\n", m_video.vram_addr, data));
m_videoram[m_video.vram_addr] = data | (BIT(m_video.control, 7) << 16);
}
-READ16_MEMBER(kcgd_state::vram_data_r)
+uint16_t kcgd_state::vram_data_r()
{
DBG_LOG(2,"VRAM R2", ("%06o\n", m_video.vram_addr));
m_video.status = (m_video.status & 0xff7f) | (BIT(m_videoram[m_video.vram_addr], 16) << 7);
return (uint16_t) (m_videoram[m_video.vram_addr] & 0xffff);
}
-WRITE16_MEMBER(kcgd_state::vram_mmap_w)
+void kcgd_state::vram_mmap_w(offs_t offset, uint16_t data)
{
DBG_LOG(3,"VRAM W1", ("%06o <- %04XH\n", offset, data));
m_videoram[offset] = data | (BIT(m_video.control, 7) << 16);
}
-READ16_MEMBER(kcgd_state::vram_mmap_r)
+uint16_t kcgd_state::vram_mmap_r(offs_t offset)
{
DBG_LOG(3,"VRAM R1", ("%06o\n", offset));
return (uint16_t) (m_videoram[offset] & 0xffff);
}
-WRITE16_MEMBER(kcgd_state::status_w)
+void kcgd_state::status_w(uint16_t data)
{
DBG_LOG(1,"Status W", ("data %04XH (useful %02XH)\n", data, data & 0x63));
// bits 7 and 15 are read-only
m_video.status = (m_video.status & 0x8080) | (data & 0x7f7f);
}
-READ16_MEMBER(kcgd_state::status_r)
+uint16_t kcgd_state::status_r()
{
uint16_t data = m_video.status ^ (BIT(m_video.control, 6) << 7);
DBG_LOG(1,"Status R", ("data %04X index %d\n", data, m_video.palette_index));
return data;
}
-WRITE8_MEMBER(kcgd_state::palette_index_w)
+void kcgd_state::palette_index_w(uint8_t data)
{
m_video.control = data;
m_video.palette_index = ((data >> 2) & 15);
DBG_LOG(1,"Palette index, Control W", ("data %02XH index %d\n", data, m_video.palette_index));
}
-WRITE8_MEMBER(kcgd_state::palette_data_w)
+void kcgd_state::palette_data_w(uint8_t data)
{
DBG_LOG(1,"Palette data W", ("data %02XH index %d\n", data, m_video.palette_index));
m_video.palette[m_video.palette_index] = data;
@@ -256,12 +256,12 @@ WRITE8_MEMBER(kcgd_state::palette_data_w)
85*(data & 3), 85*((data >> 2) & 3), 85*((data >> 4) & 3));
}
-READ8_MEMBER(kcgd_state::palette_index_r)
+uint8_t kcgd_state::palette_index_r()
{
return 0;
}
-READ8_MEMBER(kcgd_state::palette_data_r)
+uint8_t kcgd_state::palette_data_r()
{
DBG_LOG(1,"Palette data R", ("index %d\n", m_video.palette_index));
return m_video.palette[m_video.palette_index];
diff --git a/src/mame/drivers/dwarfd.cpp b/src/mame/drivers/dwarfd.cpp
index 48332114f73..246e31d1bb1 100644
--- a/src/mame/drivers/dwarfd.cpp
+++ b/src/mame/drivers/dwarfd.cpp
@@ -342,11 +342,11 @@ private:
required_region_ptr<uint16_t> m_charmap;
required_ioport m_dsw2;
- DECLARE_READ8_MEMBER(dwarfd_ram_r);
- DECLARE_WRITE8_MEMBER(dwarfd_ram_w);
- DECLARE_WRITE8_MEMBER(output1_w);
- DECLARE_WRITE8_MEMBER(output2_w);
- DECLARE_READ8_MEMBER(qc_b8_r);
+ uint8_t dwarfd_ram_r(offs_t offset);
+ void dwarfd_ram_w(offs_t offset, uint8_t data);
+ void output1_w(uint8_t data);
+ void output2_w(uint8_t data);
+ uint8_t qc_b8_r();
DECLARE_WRITE_LINE_MEMBER(dwarfd_sod_callback);
DECLARE_WRITE_LINE_MEMBER(drq_w);
void dwarfd_palette(palette_device &palette) const;
@@ -361,7 +361,7 @@ private:
};
-READ8_MEMBER(dwarfd_state::dwarfd_ram_r)
+uint8_t dwarfd_state::dwarfd_ram_r(offs_t offset)
{
if (m_crt_access == 0)
{
@@ -374,12 +374,12 @@ READ8_MEMBER(dwarfd_state::dwarfd_ram_r)
}
}
-WRITE8_MEMBER(dwarfd_state::dwarfd_ram_w)
+void dwarfd_state::dwarfd_ram_w(offs_t offset, uint8_t data)
{
m_dw_ram[offset] = data;
}
-WRITE8_MEMBER(dwarfd_state::output1_w)
+void dwarfd_state::output1_w(uint8_t data)
{
/*
bits:
@@ -394,7 +394,7 @@ WRITE8_MEMBER(dwarfd_state::output1_w)
*/
}
-WRITE8_MEMBER(dwarfd_state::output2_w)
+void dwarfd_state::output2_w(uint8_t data)
{
/*
bits:
@@ -410,7 +410,7 @@ WRITE8_MEMBER(dwarfd_state::output2_w)
}
-READ8_MEMBER(dwarfd_state::qc_b8_r)
+uint8_t dwarfd_state::qc_b8_r()
{
return machine().rand();
}
diff --git a/src/mame/drivers/dynadice.cpp b/src/mame/drivers/dynadice.cpp
index 70d7264b3e2..5aef7ba1fd9 100644
--- a/src/mame/drivers/dynadice.cpp
+++ b/src/mame/drivers/dynadice.cpp
@@ -81,9 +81,9 @@ private:
/* misc */
int m_ay_data;
- DECLARE_WRITE8_MEMBER(videoram_w);
- DECLARE_WRITE8_MEMBER(sound_data_w);
- DECLARE_WRITE8_MEMBER(sound_control_w);
+ void videoram_w(offs_t offset, uint8_t data);
+ void sound_data_w(uint8_t data);
+ void sound_control_w(uint8_t data);
TILE_GET_INFO_MEMBER(get_tile_info);
@@ -96,19 +96,19 @@ private:
};
-WRITE8_MEMBER(dynadice_state::videoram_w)
+void dynadice_state::videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
m_top_tilemap->mark_all_dirty();
}
-WRITE8_MEMBER(dynadice_state::sound_data_w)
+void dynadice_state::sound_data_w(uint8_t data)
{
m_ay_data = data;
}
-WRITE8_MEMBER(dynadice_state::sound_control_w)
+void dynadice_state::sound_control_w(uint8_t data)
{
/*
AY 3-8910 :
diff --git a/src/mame/drivers/dynamoah.cpp b/src/mame/drivers/dynamoah.cpp
index 8a883cb2c21..4aa2f1c99b2 100644
--- a/src/mame/drivers/dynamoah.cpp
+++ b/src/mame/drivers/dynamoah.cpp
@@ -33,8 +33,8 @@ public:
private:
void p1_w(uint8_t data);
void p3_w(uint8_t data);
- DECLARE_READ8_MEMBER(ext_r);
- DECLARE_WRITE8_MEMBER(ext_w);
+ uint8_t ext_r(offs_t offset);
+ void ext_w(offs_t offset, uint8_t data);
void i8031_mem(address_map &map);
void i8031_ext_mem(address_map &map);
@@ -51,14 +51,14 @@ void dynamoah_state::p3_w(uint8_t data)
LOG("%s: P3 = %02X\n", machine().describe_context(), data);
}
-READ8_MEMBER(dynamoah_state::ext_r)
+uint8_t dynamoah_state::ext_r(offs_t offset)
{
if (!machine().side_effects_disabled())
LOG("%s: RD(%04X)\n", machine().describe_context(), offset);
return 0xff;
}
-WRITE8_MEMBER(dynamoah_state::ext_w)
+void dynamoah_state::ext_w(offs_t offset, uint8_t data)
{
LOG("%s: WR(%04X, %02X)\n", machine().describe_context(), offset, data);
}
diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp
index ecae7f5a1d3..12609ba5e68 100644
--- a/src/mame/drivers/dynax.cpp
+++ b/src/mame/drivers/dynax.cpp
@@ -713,11 +713,11 @@ WRITE8_MEMBER(dynax_state::yarunara_blit_romregion_w)
{
switch(data)
{
- case 0x00: dynax_blit_romregion_w(space, 0, 0); return;
- case 0x01: dynax_blit_romregion_w(space, 0, 1); return;
- case 0x80: dynax_blit_romregion_w(space, 0, 2); return;
- case 0x81: dynax_blit_romregion_w(space, 0, 3); return;
- case 0x82: dynax_blit_romregion_w(space, 0, 4); return; // mjcomv1
+ case 0x00: dynax_blit_romregion_w(0); return;
+ case 0x01: dynax_blit_romregion_w(1); return;
+ case 0x80: dynax_blit_romregion_w(2); return;
+ case 0x81: dynax_blit_romregion_w(3); return;
+ case 0x82: dynax_blit_romregion_w(4); return; // mjcomv1
}
logerror("%s: unmapped romregion=%02X\n", machine().describe_context(), data);
}
@@ -1220,9 +1220,9 @@ WRITE8_MEMBER(dynax_state::tenkai_blit_romregion_w)
{
switch (data)
{
- case 0x00: dynax_blit_romregion_w(space, 0, 0); return;
- case 0x83: dynax_blit_romregion_w(space, 0, 1); return;
- case 0x80: dynax_blit_romregion_w(space, 0, 2); return;
+ case 0x00: dynax_blit_romregion_w(0); return;
+ case 0x83: dynax_blit_romregion_w(1); return;
+ case 0x80: dynax_blit_romregion_w(2); return;
}
logerror("%04x: unmapped romregion=%02X\n", m_maincpu->pc(), data);
}
diff --git a/src/mame/drivers/e100.cpp b/src/mame/drivers/e100.cpp
index cfd9ac7a44e..6afd7a2ec69 100644
--- a/src/mame/drivers/e100.cpp
+++ b/src/mame/drivers/e100.cpp
@@ -168,8 +168,8 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_reset() override { m_maincpu->reset(); LOG("--->%s()\n", FUNCNAME); };
virtual void machine_start() override;
- DECLARE_READ8_MEMBER( pia_r );
- DECLARE_WRITE8_MEMBER( pia_w );
+ uint8_t pia_r(offs_t offset);
+ void pia_w(offs_t offset, uint8_t data);
uint8_t pia1_kbA_r();
void pia1_kbA_w(uint8_t data);
uint8_t pia1_kbB_r();
@@ -248,7 +248,7 @@ uint32_t e100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
}
/* PIA write - the Esselte 100 allows the PIA:s to be accessed simultaneously */
-WRITE8_MEMBER( e100_state::pia_w )
+void e100_state::pia_w(offs_t offset, uint8_t data)
{
LOG("%s(%02x)\n", FUNCNAME, data);
if ((offset & 0x08) == 0x08)
@@ -272,7 +272,7 @@ WRITE8_MEMBER( e100_state::pia_w )
}
/* PIA read - the Esselte 100 allows the PIA:s to be accessed simultaneously */
-READ8_MEMBER( e100_state::pia_r )
+uint8_t e100_state::pia_r(offs_t offset)
{
uint8_t data = 0;
diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp
index 956838424d1..03949a4a4d1 100644
--- a/src/mame/drivers/ec184x.cpp
+++ b/src/mame/drivers/ec184x.cpp
@@ -52,8 +52,8 @@ public:
private:
DECLARE_MACHINE_RESET(ec1841);
- DECLARE_READ8_MEMBER(memboard_r);
- DECLARE_WRITE8_MEMBER(memboard_w);
+ uint8_t memboard_r(offs_t offset);
+ void memboard_w(offs_t offset, uint8_t data);
void ec1840_io(address_map &map);
void ec1840_map(address_map &map);
@@ -80,7 +80,7 @@ private:
* Only one board should be enabled for read, and one for write.
* Normally, this is the same board.
*
- * Each board is divided into 4 banks, internally numbererd 0..3.
+ * Each board is divided into 4 banks, internally numbered 0..3.
* POST tests each board on startup, and an error (indicated by
* I/O CH CK bus signal) causes it to disable failing bank(s) by writing
* 'reconfiguration code' (inverted number of failing memory bank) to
@@ -91,7 +91,7 @@ private:
* bit 3 enable write access
*/
-READ8_MEMBER(ec184x_state::memboard_r)
+uint8_t ec184x_state::memboard_r(offs_t offset)
{
uint8_t data;
@@ -105,7 +105,7 @@ READ8_MEMBER(ec184x_state::memboard_r)
return data;
}
-WRITE8_MEMBER(ec184x_state::memboard_w)
+void ec184x_state::memboard_w(offs_t offset, uint8_t data)
{
address_space &program = m_maincpu->space(AS_PROGRAM);
uint8_t current = m_memory.enable[offset];
diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp
index eeed824f546..99aadc31aa9 100644
--- a/src/mame/drivers/ecoinfr.cpp
+++ b/src/mame/drivers/ecoinfr.cpp
@@ -86,31 +86,31 @@ private:
uint8_t port17_value;
template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
- DECLARE_WRITE8_MEMBER(ec_port00_out_w);
- DECLARE_WRITE8_MEMBER(ec_port01_out_w);
- DECLARE_WRITE8_MEMBER(ec_port02_out_w);
- DECLARE_WRITE8_MEMBER(ec_port03_out_w);
- DECLARE_WRITE8_MEMBER(ec_port04_out_w);
- DECLARE_WRITE8_MEMBER(ec_port05_out_w);
- DECLARE_WRITE8_MEMBER(ec_port06_out_w);
- DECLARE_WRITE8_MEMBER(ec_port07_out_w);
- DECLARE_WRITE8_MEMBER(ec_port08_out_bank_strobe_w);
- DECLARE_WRITE8_MEMBER(ec_port09_out_reelen_w);
- DECLARE_WRITE8_MEMBER(ec_port0a_out_w);
- DECLARE_WRITE8_MEMBER(ec_port0b_out_w);
- DECLARE_WRITE8_MEMBER(ec_port0c_out_cred_strobe_w);
- DECLARE_WRITE8_MEMBER(ec_port0d_out_cred_data_w);
- DECLARE_WRITE8_MEMBER(ec_port0e_out_w);
- DECLARE_WRITE8_MEMBER(ec_port0f_out_bank_segdata_w);
- DECLARE_WRITE8_MEMBER(ec_port10_out_w);
- DECLARE_WRITE8_MEMBER(ec_port11_out_w);
- DECLARE_WRITE8_MEMBER(ec_port12_out_w);
- DECLARE_WRITE8_MEMBER(ec_port13_out_w);
- DECLARE_WRITE8_MEMBER(ec_port14_out_w);
- DECLARE_WRITE8_MEMBER(ec_port15_out_w);
- DECLARE_WRITE8_MEMBER(ec_port16_out_w);
- DECLARE_WRITE8_MEMBER(ec_port17_out_w);
- DECLARE_WRITE8_MEMBER(ec_port18_out_w);
+ void ec_port00_out_w(uint8_t data);
+ void ec_port01_out_w(uint8_t data);
+ void ec_port02_out_w(uint8_t data);
+ void ec_port03_out_w(uint8_t data);
+ void ec_port04_out_w(uint8_t data);
+ void ec_port05_out_w(uint8_t data);
+ void ec_port06_out_w(uint8_t data);
+ void ec_port07_out_w(uint8_t data);
+ void ec_port08_out_bank_strobe_w(uint8_t data);
+ void ec_port09_out_reelen_w(uint8_t data);
+ void ec_port0a_out_w(uint8_t data);
+ void ec_port0b_out_w(uint8_t data);
+ void ec_port0c_out_cred_strobe_w(uint8_t data);
+ void ec_port0d_out_cred_data_w(uint8_t data);
+ void ec_port0e_out_w(uint8_t data);
+ void ec_port0f_out_bank_segdata_w(uint8_t data);
+ void ec_port10_out_w(uint8_t data);
+ void ec_port11_out_w(uint8_t data);
+ void ec_port12_out_w(uint8_t data);
+ void ec_port13_out_w(uint8_t data);
+ void ec_port14_out_w(uint8_t data);
+ void ec_port15_out_w(uint8_t data);
+ void ec_port16_out_w(uint8_t data);
+ void ec_port17_out_w(uint8_t data);
+ void ec_port18_out_w(uint8_t data);
virtual void machine_reset() override;
virtual void machine_start() override { m_digits.resolve(); }
@@ -160,7 +160,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ecoinfr_state::ecoinfr_irq_timer)
}
-WRITE8_MEMBER(ecoinfr_state::ec_port00_out_w)
+void ecoinfr_state::ec_port00_out_w(uint8_t data)
{
if (data&0x70) // lots of games set 0x80
{
@@ -172,7 +172,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port00_out_w)
awp_draw_reel(machine(),"reel1", *m_reel[0]);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port01_out_w)
+void ecoinfr_state::ec_port01_out_w(uint8_t data)
{
if (data&0xf0)
{
@@ -184,7 +184,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port01_out_w)
awp_draw_reel(machine(),"reel2", *m_reel[1]);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port02_out_w)
+void ecoinfr_state::ec_port02_out_w(uint8_t data)
{
if (data&0xf0)
{
@@ -198,27 +198,27 @@ WRITE8_MEMBER(ecoinfr_state::ec_port02_out_w)
-WRITE8_MEMBER(ecoinfr_state::ec_port03_out_w)
+void ecoinfr_state::ec_port03_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port04_out_w)
+void ecoinfr_state::ec_port04_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port05_out_w)
+void ecoinfr_state::ec_port05_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port06_out_w)
+void ecoinfr_state::ec_port06_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port07_out_w)
+void ecoinfr_state::ec_port07_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port08_out_bank_strobe_w)
+void ecoinfr_state::ec_port08_out_bank_strobe_w(uint8_t data)
{
switch (data)
{
@@ -261,7 +261,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port08_out_bank_strobe_w)
// we could do the same thing here with input ports configured to outputs, however
// I've done it with handlers for now as it allows greater flexibility while the driver
// is developed
-WRITE8_MEMBER(ecoinfr_state::ec_port09_out_reelen_w)
+void ecoinfr_state::ec_port09_out_reelen_w(uint8_t data)
{
int old_port09_value = port09_value;
port09_value = data;
@@ -276,16 +276,16 @@ WRITE8_MEMBER(ecoinfr_state::ec_port09_out_reelen_w)
if ((port09_value&0x80) != (old_port09_value&0x80)) printf("port09 0x80 changed %02x\n", port09_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port0a_out_w)
+void ecoinfr_state::ec_port0a_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port0b_out_w)
+void ecoinfr_state::ec_port0b_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port0c_out_cred_strobe_w)
+void ecoinfr_state::ec_port0c_out_cred_strobe_w(uint8_t data)
{
switch (data)
{
@@ -320,7 +320,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port0c_out_cred_strobe_w)
}
}
-WRITE8_MEMBER(ecoinfr_state::ec_port0d_out_cred_data_w)
+void ecoinfr_state::ec_port0d_out_cred_data_w(uint8_t data)
{
if (m_credsel!=0xff)
{
@@ -329,11 +329,11 @@ WRITE8_MEMBER(ecoinfr_state::ec_port0d_out_cred_data_w)
}
}
-WRITE8_MEMBER(ecoinfr_state::ec_port0e_out_w)
+void ecoinfr_state::ec_port0e_out_w(uint8_t data)
{
}
-WRITE8_MEMBER(ecoinfr_state::ec_port0f_out_bank_segdata_w)
+void ecoinfr_state::ec_port0f_out_bank_segdata_w(uint8_t data)
{
if (m_banksel!=0xff)
{
@@ -342,7 +342,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port0f_out_bank_segdata_w)
}
}
-WRITE8_MEMBER(ecoinfr_state::ec_port10_out_w)
+void ecoinfr_state::ec_port10_out_w(uint8_t data)
{
int old_port10_value = port10_value;
port10_value = data;
@@ -357,7 +357,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port10_out_w)
if ((port10_value&0x80) != (old_port10_value&0x80)) printf("port10 0x80 changed %02x\n", port10_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port11_out_w)
+void ecoinfr_state::ec_port11_out_w(uint8_t data)
{
int old_port11_value = port11_value;
port11_value = data;
@@ -372,7 +372,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port11_out_w)
if ((port11_value&0x80) != (old_port11_value&0x80)) printf("port11 0x80 changed %02x\n", port11_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port12_out_w)
+void ecoinfr_state::ec_port12_out_w(uint8_t data)
{
int old_port12_value = port12_value;
port12_value = data;
@@ -387,7 +387,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port12_out_w)
if ((port12_value&0x80) != (old_port12_value&0x80)) printf("port12 0x80 changed %02x\n", port12_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port13_out_w)
+void ecoinfr_state::ec_port13_out_w(uint8_t data)
{
int old_port13_value = port13_value;
port13_value = data;
@@ -402,7 +402,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port13_out_w)
if ((port13_value&0x80) != (old_port13_value&0x80)) printf("port13 0x80 changed %02x\n", port13_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port14_out_w)
+void ecoinfr_state::ec_port14_out_w(uint8_t data)
{
int old_port14_value = port14_value;
port14_value = data;
@@ -417,7 +417,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port14_out_w)
if ((port14_value&0x80) != (old_port14_value&0x80)) printf("port14 0x80 changed %02x\n", port14_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port15_out_w)
+void ecoinfr_state::ec_port15_out_w(uint8_t data)
{
int old_port15_value = port15_value;
port15_value = data;
@@ -435,7 +435,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port15_out_w)
// printf("ec_port15_out_w data %02x - VDF reset %02x clock %02x\n", data, data & 0x80, data & 0x40);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port16_out_w)
+void ecoinfr_state::ec_port16_out_w(uint8_t data)
{
int old_port16_value = port16_value;
port16_value = data;
@@ -450,7 +450,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port16_out_w)
if ((port16_value&0x80) != (old_port16_value&0x80)) printf("port16 0x80 changed %02x\n", port16_value&0x80);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port17_out_w)
+void ecoinfr_state::ec_port17_out_w(uint8_t data)
{
int old_port17_value = port17_value;
port17_value = data;
@@ -468,7 +468,7 @@ WRITE8_MEMBER(ecoinfr_state::ec_port17_out_w)
// printf("ec_port17_out_w data %02x - VDF data %02x\n", data, data & 0x40);
}
-WRITE8_MEMBER(ecoinfr_state::ec_port18_out_w)
+void ecoinfr_state::ec_port18_out_w(uint8_t data)
{
// Kick Me (Watchdog)
}
diff --git a/src/mame/drivers/egghunt.cpp b/src/mame/drivers/egghunt.cpp
index 657b5ca51dc..92cd1a56d9b 100644
--- a/src/mame/drivers/egghunt.cpp
+++ b/src/mame/drivers/egghunt.cpp
@@ -84,14 +84,14 @@ private:
required_shared_ptr<uint8_t> m_atram;
uint8_t m_bgram[0x1000];
uint8_t m_spram[0x1000];
- DECLARE_READ8_MEMBER(egghunt_bgram_r);
- DECLARE_WRITE8_MEMBER(egghunt_bgram_w);
- DECLARE_WRITE8_MEMBER(egghunt_atram_w);
- DECLARE_WRITE8_MEMBER(egghunt_gfx_banking_w);
- DECLARE_WRITE8_MEMBER(egghunt_vidram_bank_w);
- DECLARE_WRITE8_MEMBER(egghunt_soundlatch_w);
- DECLARE_READ8_MEMBER(egghunt_okibanking_r);
- DECLARE_WRITE8_MEMBER(egghunt_okibanking_w);
+ uint8_t egghunt_bgram_r(offs_t offset);
+ void egghunt_bgram_w(offs_t offset, uint8_t data);
+ void egghunt_atram_w(offs_t offset, uint8_t data);
+ void egghunt_gfx_banking_w(uint8_t data);
+ void egghunt_vidram_bank_w(uint8_t data);
+ void egghunt_soundlatch_w(uint8_t data);
+ uint8_t egghunt_okibanking_r();
+ void egghunt_okibanking_w(uint8_t data);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -165,7 +165,7 @@ TILE_GET_INFO_MEMBER(egghunt_state::get_bg_tile_info)
tileinfo.set(0, code, colour, 0);
}
-READ8_MEMBER(egghunt_state::egghunt_bgram_r)
+uint8_t egghunt_state::egghunt_bgram_r(offs_t offset)
{
if (m_vidram_bank)
{
@@ -177,7 +177,7 @@ READ8_MEMBER(egghunt_state::egghunt_bgram_r)
}
}
-WRITE8_MEMBER(egghunt_state::egghunt_bgram_w)
+void egghunt_state::egghunt_bgram_w(offs_t offset, uint8_t data)
{
if (m_vidram_bank)
{
@@ -190,7 +190,7 @@ WRITE8_MEMBER(egghunt_state::egghunt_bgram_w)
}
}
-WRITE8_MEMBER(egghunt_state::egghunt_atram_w)
+void egghunt_state::egghunt_atram_w(offs_t offset, uint8_t data)
{
m_atram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
@@ -212,7 +212,7 @@ uint32_t egghunt_state::screen_update_egghunt(screen_device &screen, bitmap_ind1
return 0;
}
-WRITE8_MEMBER(egghunt_state::egghunt_gfx_banking_w)
+void egghunt_state::egghunt_gfx_banking_w(uint8_t data)
{
// data & 0x03 is used for tile banking
// data & 0x30 is used for sprites banking
@@ -221,23 +221,23 @@ WRITE8_MEMBER(egghunt_state::egghunt_gfx_banking_w)
m_bg_tilemap->mark_all_dirty();
}
-WRITE8_MEMBER(egghunt_state::egghunt_vidram_bank_w)
+void egghunt_state::egghunt_vidram_bank_w(uint8_t data)
{
m_vidram_bank = data & 1;
}
-WRITE8_MEMBER(egghunt_state::egghunt_soundlatch_w)
+void egghunt_state::egghunt_soundlatch_w(uint8_t data)
{
m_soundlatch->write(data);
m_audiocpu->set_input_line(0, HOLD_LINE);
}
-READ8_MEMBER(egghunt_state::egghunt_okibanking_r)
+uint8_t egghunt_state::egghunt_okibanking_r()
{
return m_okibanking;
}
-WRITE8_MEMBER(egghunt_state::egghunt_okibanking_w)
+void egghunt_state::egghunt_okibanking_w(uint8_t data)
{
m_okibanking = data;
m_oki->set_rom_bank((data >> 4) & 1);
diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp
index 26c131c1137..00d37f6fdee 100644
--- a/src/mame/drivers/einstein.cpp
+++ b/src/mame/drivers/einstein.cpp
@@ -104,17 +104,17 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(keyboard_timer_callback);
void keyboard_line_write(uint8_t data);
uint8_t keyboard_data_read();
- DECLARE_READ8_MEMBER(reset_r);
- DECLARE_WRITE8_MEMBER(reset_w);
- DECLARE_READ8_MEMBER(rom_r);
- DECLARE_WRITE8_MEMBER(rom_w);
+ uint8_t reset_r();
+ void reset_w(uint8_t data);
+ uint8_t rom_r();
+ void rom_w(uint8_t data);
template <int src> DECLARE_WRITE_LINE_MEMBER(int_w);
- DECLARE_READ8_MEMBER(kybint_msk_r);
- DECLARE_WRITE8_MEMBER(kybint_msk_w);
- DECLARE_WRITE8_MEMBER(adcint_msk_w);
- DECLARE_WRITE8_MEMBER(fireint_msk_w);
- DECLARE_WRITE8_MEMBER(evdpint_msk_w);
- DECLARE_WRITE8_MEMBER(drsel_w);
+ uint8_t kybint_msk_r();
+ void kybint_msk_w(uint8_t data);
+ void adcint_msk_w(uint8_t data);
+ void fireint_msk_w(uint8_t data);
+ void evdpint_msk_w(uint8_t data);
+ void drsel_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);
@@ -122,16 +122,16 @@ private:
DECLARE_WRITE_LINE_MEMBER(ardy_w);
TIMER_DEVICE_CALLBACK_MEMBER(strobe_callback);
- DECLARE_READ8_MEMBER(system_r);
- DECLARE_READ8_MEMBER(porta_r);
- DECLARE_WRITE8_MEMBER(porta_w);
- DECLARE_WRITE8_MEMBER(porta_int_w);
- DECLARE_READ8_MEMBER(portb_r);
- DECLARE_WRITE8_MEMBER(portb_w);
- DECLARE_READ8_MEMBER(pseudo_adc_r);
- DECLARE_WRITE8_MEMBER(pseudo_adc_w);
- DECLARE_READ8_MEMBER(alpha_lock_r);
- DECLARE_WRITE8_MEMBER(alpha_lock_w);
+ uint8_t system_r();
+ uint8_t porta_r();
+ void porta_w(uint8_t data);
+ void porta_int_w(uint8_t data);
+ uint8_t portb_r();
+ void portb_w(uint8_t data);
+ uint8_t pseudo_adc_r();
+ void pseudo_adc_w(uint8_t data);
+ uint8_t alpha_lock_r();
+ void alpha_lock_w(uint8_t data);
void einstein_io(address_map &map);
void einstein_mem(address_map &map);
@@ -252,7 +252,7 @@ uint8_t einstein_state::keyboard_data_read()
FLOPPY DRIVES
***************************************************************************/
-WRITE8_MEMBER(einstein_state::drsel_w)
+void einstein_state::drsel_w(uint8_t data)
{
if (VERBOSE_DISK)
logerror("%s: drsel_w %02x\n", machine().describe_context(), data);
@@ -360,7 +360,7 @@ template <int src> WRITE_LINE_MEMBER( einstein_state::int_w )
}
}
-READ8_MEMBER( einstein_state::kybint_msk_r )
+uint8_t einstein_state::kybint_msk_r()
{
uint8_t data = 0;
@@ -387,25 +387,25 @@ READ8_MEMBER( einstein_state::kybint_msk_r )
return data;
}
-WRITE8_MEMBER( einstein_state::kybint_msk_w )
+void einstein_state::kybint_msk_w(uint8_t data)
{
logerror("KEY interrupt %s\n", BIT(data, 0) ? "disabled" : "enabled");
m_keyboard_daisy->mask_w(BIT(data, 0));
}
-WRITE8_MEMBER( einstein_state::adcint_msk_w )
+void einstein_state::adcint_msk_w(uint8_t data)
{
logerror("ADC interrupt %s\n", BIT(data, 0) ? "disabled" : "enabled");
m_adc_daisy->mask_w(BIT(data, 0));
}
-WRITE8_MEMBER( einstein_state::fireint_msk_w )
+void einstein_state::fireint_msk_w(uint8_t data)
{
logerror("FIRE interrupt %s\n", BIT(data, 0) ? "disabled" : "enabled");
m_fire_daisy->mask_w(BIT(data, 0));
}
-WRITE8_MEMBER(einstein_state::evdpint_msk_w)
+void einstein_state::evdpint_msk_w(uint8_t data)
{
logerror("EVDP interrupt %s\n", BIT(data, 0) ? "disabled" : "enabled");
logerror("Printer STROBE %s\n", BIT(data, 1) ? "disabled" : "enabled");
@@ -417,7 +417,7 @@ WRITE8_MEMBER(einstein_state::evdpint_msk_w)
MACHINE EMULATION
***************************************************************************/
-READ8_MEMBER( einstein_state::rom_r )
+uint8_t einstein_state::rom_r()
{
if (!machine().side_effects_disabled())
{
@@ -428,13 +428,13 @@ READ8_MEMBER( einstein_state::rom_r )
return 0xff;
}
-WRITE8_MEMBER( einstein_state::rom_w )
+void einstein_state::rom_w(uint8_t data)
{
m_rom_enabled ^= 1;
m_bank1->set_entry(m_rom_enabled);
}
-READ8_MEMBER( einstein_state::reset_r )
+uint8_t einstein_state::reset_r()
{
m_psg->reset();
m_fdc->reset();
@@ -442,7 +442,7 @@ READ8_MEMBER( einstein_state::reset_r )
return 0xff;
}
-WRITE8_MEMBER( einstein_state::reset_w )
+void einstein_state::reset_w(uint8_t data)
{
m_psg->reset();
m_fdc->reset();
@@ -479,7 +479,7 @@ void einstein_state::machine_reset()
256 MACHINE EMULATION
***************************************************************************/
-READ8_MEMBER(einstein_state::system_r)
+uint8_t einstein_state::system_r()
{
uint8_t data = 0;
@@ -500,7 +500,7 @@ READ8_MEMBER(einstein_state::system_r)
return data;
}
-READ8_MEMBER(einstein_state::porta_r)
+uint8_t einstein_state::porta_r()
{
uint8_t data = 0;
@@ -511,7 +511,7 @@ READ8_MEMBER(einstein_state::porta_r)
return data;
}
-WRITE8_MEMBER(einstein_state::porta_w)
+void einstein_state::porta_w(uint8_t data)
{
m_centronics->write_data0(BIT(data, 0));
m_centronics->write_data1(BIT(data, 1));
@@ -520,14 +520,14 @@ WRITE8_MEMBER(einstein_state::porta_w)
m_centronics->write_strobe(BIT(data, 4));
}
-WRITE8_MEMBER(einstein_state::porta_int_w)
+void einstein_state::porta_int_w(uint8_t data)
{
// TODO: Implement Port A interrupts (not used for printing!)
logerror("Port A interrupt %s\n", BIT(data, 7) ? "enabled" : "disabled");
m_porta_int = data;
}
-READ8_MEMBER(einstein_state::portb_r)
+uint8_t einstein_state::portb_r()
{
uint8_t data = 0;
@@ -538,7 +538,7 @@ READ8_MEMBER(einstein_state::portb_r)
return data;
}
-WRITE8_MEMBER(einstein_state::portb_w)
+void einstein_state::portb_w(uint8_t data)
{
m_centronics->write_data4(BIT(data, 0));
m_centronics->write_data5(BIT(data, 1));
@@ -546,7 +546,7 @@ WRITE8_MEMBER(einstein_state::portb_w)
m_centronics->write_data7(BIT(data, 3));
}
-READ8_MEMBER(einstein_state::pseudo_adc_r)
+uint8_t einstein_state::pseudo_adc_r()
{
uint8_t data = 0x7f; // centre
@@ -574,20 +574,20 @@ READ8_MEMBER(einstein_state::pseudo_adc_r)
return data;
}
-WRITE8_MEMBER(einstein_state::pseudo_adc_w)
+void einstein_state::pseudo_adc_w(uint8_t data)
{
m_pseudo_adc = data;
m_adc_daisy->int_w(ASSERT_LINE);
}
-READ8_MEMBER(einstein_state::alpha_lock_r)
+uint8_t einstein_state::alpha_lock_r()
{
m_alpha_lock_led ^= 1;
output().set_value("alpha_lock_led", m_alpha_lock_led);
return 0xff;
}
-WRITE8_MEMBER(einstein_state::alpha_lock_w)
+void einstein_state::alpha_lock_w(uint8_t data)
{
m_alpha_lock_led ^= 1;
output().set_value("alpha_lock_led", m_alpha_lock_led);
diff --git a/src/mame/drivers/elan_eu3a05.cpp b/src/mame/drivers/elan_eu3a05.cpp
index 96848801b50..121b4f8460c 100644
--- a/src/mame/drivers/elan_eu3a05.cpp
+++ b/src/mame/drivers/elan_eu3a05.cpp
@@ -304,7 +304,7 @@ protected:
virtual void machine_start() override;
private:
- //DECLARE_READ8_MEMBER(random_r) { return machine().rand(); }
+ //uint8_t random_r() { return machine().rand(); }
uint8_t porta_r();
void portb_w(uint8_t data);
diff --git a/src/mame/drivers/elan_eu3a14.cpp b/src/mame/drivers/elan_eu3a14.cpp
index c928bd2e92a..22ff577244b 100644
--- a/src/mame/drivers/elan_eu3a14.cpp
+++ b/src/mame/drivers/elan_eu3a14.cpp
@@ -108,13 +108,13 @@ private:
INTERRUPT_GEN_MEMBER(interrupt);
- DECLARE_WRITE8_MEMBER(porta_dir_w);
- DECLARE_WRITE8_MEMBER(portb_dir_w);
- DECLARE_WRITE8_MEMBER(portc_dir_w);
+ void porta_dir_w(uint8_t data);
+ void portb_dir_w(uint8_t data);
+ void portc_dir_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(porta_dat_w);
- DECLARE_WRITE8_MEMBER(portb_dat_w);
- DECLARE_WRITE8_MEMBER(portc_dat_w);
+ void porta_dat_w(uint8_t data);
+ void portb_dat_w(uint8_t data);
+ void portc_dat_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
@@ -172,33 +172,33 @@ uint8_t elan_eu3a14_state::read_full_space(offs_t offset)
return fullbankspace.read_byte(offset);
}
-WRITE8_MEMBER(elan_eu3a14_state::porta_dir_w)
+void elan_eu3a14_state::porta_dir_w(uint8_t data)
{
m_portdir[0] = data;
// update state
}
-WRITE8_MEMBER(elan_eu3a14_state::portb_dir_w)
+void elan_eu3a14_state::portb_dir_w(uint8_t data)
{
m_portdir[1] = data;
// update state
}
-WRITE8_MEMBER(elan_eu3a14_state::portc_dir_w)
+void elan_eu3a14_state::portc_dir_w(uint8_t data)
{
m_portdir[2] = data;
// update state
}
-WRITE8_MEMBER(elan_eu3a14_state::porta_dat_w)
+void elan_eu3a14_state::porta_dat_w(uint8_t data)
{
}
-WRITE8_MEMBER(elan_eu3a14_state::portb_dat_w)
+void elan_eu3a14_state::portb_dat_w(uint8_t data)
{
}
-WRITE8_MEMBER(elan_eu3a14_state::portc_dat_w)
+void elan_eu3a14_state::portc_dat_w(uint8_t data)
{
}
diff --git a/src/mame/drivers/elekscmp.cpp b/src/mame/drivers/elekscmp.cpp
index 824ac5b2c23..3150a72dcdc 100644
--- a/src/mame/drivers/elekscmp.cpp
+++ b/src/mame/drivers/elekscmp.cpp
@@ -48,12 +48,12 @@ public:
private:
virtual void machine_start() override;
- DECLARE_READ8_MEMBER(keyboard_r);
- DECLARE_WRITE8_MEMBER(hex_display_w);
+ u8 keyboard_r();
+ void hex_display_w(offs_t offset, u8 data);
DECLARE_READ_LINE_MEMBER(cass_r);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_w);
- uint8_t convert_key(uint8_t data);
+ u8 convert_key(u8 data);
bool m_cassinbit, m_cassoutbit, m_cassold;
u8 m_cass_data[4];
@@ -71,12 +71,12 @@ void elekscmp_state::machine_start()
m_digit.resolve();
}
-WRITE8_MEMBER(elekscmp_state::hex_display_w)
+void elekscmp_state::hex_display_w(offs_t offset, u8 data)
{
m_digit[offset & 0x7] = data;
}
-uint8_t elekscmp_state::convert_key(uint8_t data)
+u8 elekscmp_state::convert_key(u8 data)
{
for (u8 i = 0; i < 8; i++)
if (BIT(data, i))
@@ -85,7 +85,7 @@ uint8_t elekscmp_state::convert_key(uint8_t data)
return 0xff;
}
-READ8_MEMBER(elekscmp_state::keyboard_r)
+u8 elekscmp_state::keyboard_r()
{
u8 data = m_io_keyboard[0]->read();
if (data)
diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp
index f4e119a59df..68ff8044b7e 100644
--- a/src/mame/drivers/elwro800.cpp
+++ b/src/mame/drivers/elwro800.cpp
@@ -63,9 +63,9 @@ private:
uint8_t m_NR;
uint8_t nmi_r();
- DECLARE_WRITE8_MEMBER(elwro800jr_fdc_control_w);
- DECLARE_READ8_MEMBER(elwro800jr_io_r);
- DECLARE_WRITE8_MEMBER(elwro800jr_io_w);
+ void elwro800jr_fdc_control_w(uint8_t data);
+ uint8_t elwro800jr_io_r(offs_t offset);
+ void elwro800jr_io_w(offs_t offset, uint8_t data);
DECLARE_MACHINE_RESET(elwro800);
INTERRUPT_GEN_MEMBER(elwro800jr_interrupt);
uint8_t i8255_port_c_r();
@@ -117,7 +117,7 @@ uint8_t elwro800_state::nmi_r()
*
*************************************/
-WRITE8_MEMBER(elwro800_state::elwro800jr_fdc_control_w)
+void elwro800_state::elwro800jr_fdc_control_w(uint8_t data)
{
for (int i = 0; i < 2; i++)
if (m_flop[i]->get_device())
@@ -235,7 +235,7 @@ void elwro800_state::i8255_port_c_w(uint8_t data)
* 0x??FE, 0x??7F, 0x??7B (read): keyboard reading
*************************************/
-READ8_MEMBER(elwro800_state::elwro800jr_io_r)
+uint8_t elwro800_state::elwro800jr_io_r(offs_t offset)
{
uint8_t *prom = memregion("proms")->base();
uint8_t cs = prom[offset & 0x1ff];
@@ -312,7 +312,7 @@ READ8_MEMBER(elwro800_state::elwro800jr_io_r)
return 0x00;
}
-WRITE8_MEMBER(elwro800_state::elwro800jr_io_w)
+void elwro800_state::elwro800jr_io_w(offs_t offset, uint8_t data)
{
uint8_t *prom = memregion("proms")->base();
uint8_t cs = prom[offset & 0x1ff];
@@ -320,7 +320,7 @@ WRITE8_MEMBER(elwro800_state::elwro800jr_io_w)
if (!BIT(cs,0))
{
// CFE
- spectrum_port_fe_w(space, 0, data);
+ spectrum_port_fe_w(data);
}
else if (!BIT(cs,1))
{
@@ -348,7 +348,7 @@ WRITE8_MEMBER(elwro800_state::elwro800jr_io_w)
else if (!BIT(cs,5))
{
// CF1
- elwro800jr_fdc_control_w(space, 0, data);
+ elwro800jr_fdc_control_w(data);
}
else
{
diff --git a/src/mame/drivers/embargo.cpp b/src/mame/drivers/embargo.cpp
index 241e1a712bf..9c528330d11 100644
--- a/src/mame/drivers/embargo.cpp
+++ b/src/mame/drivers/embargo.cpp
@@ -29,11 +29,11 @@ private:
uint8_t m_dial_enable_1;
uint8_t m_dial_enable_2;
uint8_t m_input_select;
- DECLARE_READ8_MEMBER(input_port_bit_r);
- DECLARE_READ8_MEMBER(dial_r);
- DECLARE_WRITE8_MEMBER(port_1_w);
- DECLARE_WRITE8_MEMBER(port_2_w);
- DECLARE_WRITE8_MEMBER(input_select_w);
+ uint8_t input_port_bit_r();
+ uint8_t dial_r();
+ void port_1_w(uint8_t data);
+ void port_2_w(uint8_t data);
+ void input_select_w(uint8_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_embargo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -83,13 +83,13 @@ uint32_t embargo_state::screen_update_embargo(screen_device &screen, bitmap_rgb3
*
*************************************/
-READ8_MEMBER(embargo_state::input_port_bit_r)
+uint8_t embargo_state::input_port_bit_r()
{
return (ioport("IN1")->read() << (7 - m_input_select)) & 0x80;
}
-READ8_MEMBER(embargo_state::dial_r)
+uint8_t embargo_state::dial_r()
{
uint8_t lo = 0;
uint8_t hi = 0;
@@ -139,19 +139,19 @@ READ8_MEMBER(embargo_state::dial_r)
}
-WRITE8_MEMBER(embargo_state::port_1_w)
+void embargo_state::port_1_w(uint8_t data)
{
m_dial_enable_1 = data & 0x01; /* other bits unknown */
}
-WRITE8_MEMBER(embargo_state::port_2_w)
+void embargo_state::port_2_w(uint8_t data)
{
m_dial_enable_2 = data & 0x01; /* other bits unknown */
}
-WRITE8_MEMBER(embargo_state::input_select_w)
+void embargo_state::input_select_w(uint8_t data)
{
m_input_select = data & 0x07;
}
diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp
index 1f2ffe31567..7d9b2211cd0 100644
--- a/src/mame/drivers/enigma2.cpp
+++ b/src/mame/drivers/enigma2.cpp
@@ -102,9 +102,9 @@ private:
optional_region_ptr<uint8_t> m_colors;
optional_region_ptr<uint8_t> m_stars;
- DECLARE_READ8_MEMBER(dip_switch_r);
- DECLARE_WRITE8_MEMBER(sound_data_w);
- DECLARE_WRITE8_MEMBER(enigma2_flip_screen_w);
+ uint8_t dip_switch_r(offs_t offset);
+ void sound_data_w(uint8_t data);
+ void enigma2_flip_screen_w(uint8_t data);
uint8_t sound_latch_r();
void protection_data_w(uint8_t data);
virtual void machine_start() override;
@@ -367,7 +367,7 @@ uint32_t enigma2_state::screen_update_enigma2a(screen_device &screen, bitmap_rgb
-READ8_MEMBER(enigma2_state::dip_switch_r)
+uint8_t enigma2_state::dip_switch_r(offs_t offset)
{
uint8_t ret = 0x00;
@@ -399,7 +399,7 @@ READ8_MEMBER(enigma2_state::dip_switch_r)
}
-WRITE8_MEMBER(enigma2_state::sound_data_w)
+void enigma2_state::sound_data_w(uint8_t data)
{
/* clock sound latch shift register on rising edge of D2 */
if (!(data & 0x04) && (m_last_sound_data & 0x04))
@@ -424,7 +424,7 @@ void enigma2_state::protection_data_w(uint8_t data)
}
-WRITE8_MEMBER(enigma2_state::enigma2_flip_screen_w)
+void enigma2_state::enigma2_flip_screen_w(uint8_t data)
{
m_flip_screen = ((data >> 5) & 0x01) && ((ioport("DSW")->read() & 0x20) == 0x20);
}
diff --git a/src/mame/drivers/eolith16.cpp b/src/mame/drivers/eolith16.cpp
index baa2558ed80..de0de146aaa 100644
--- a/src/mame/drivers/eolith16.cpp
+++ b/src/mame/drivers/eolith16.cpp
@@ -45,8 +45,8 @@ private:
required_shared_ptr<uint8_t> m_vram;
required_memory_bank m_vrambank;
- DECLARE_WRITE16_MEMBER(eeprom_w);
- DECLARE_READ16_MEMBER(eolith16_custom_r);
+ void eeprom_w(uint16_t data);
+ uint16_t eolith16_custom_r();
void eolith16_palette(palette_device &palette) const;
@@ -56,7 +56,7 @@ private:
-WRITE16_MEMBER(eolith16_state::eeprom_w)
+void eolith16_state::eeprom_w(uint16_t data)
{
m_vrambank->set_entry(((data & 0x80) >> 7) ^ 1);
machine().bookkeeping().coin_counter_w(0, data & 1);
@@ -66,7 +66,7 @@ WRITE16_MEMBER(eolith16_state::eeprom_w)
//data & 0x100 and data & 0x004 always set
}
-READ16_MEMBER(eolith16_state::eolith16_custom_r)
+uint16_t eolith16_state::eolith16_custom_r()
{
speedup_read();
return m_special_io->read();
diff --git a/src/mame/drivers/ep64.cpp b/src/mame/drivers/ep64.cpp
index 3baca557989..17fb5f1018f 100644
--- a/src/mame/drivers/ep64.cpp
+++ b/src/mame/drivers/ep64.cpp
@@ -215,10 +215,10 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_READ8_MEMBER( rd0_r );
- DECLARE_WRITE8_MEMBER( wr0_w );
- DECLARE_READ8_MEMBER( rd1_r );
- DECLARE_WRITE8_MEMBER( wr2_w );
+ uint8_t rd0_r();
+ void wr0_w(uint8_t data);
+ uint8_t rd1_r();
+ void wr2_w(uint8_t data);
uint8_t m_key;
@@ -241,7 +241,7 @@ private:
// rd0_r -
//-------------------------------------------------
-READ8_MEMBER( ep64_state::rd0_r )
+uint8_t ep64_state::rd0_r()
{
uint8_t data = 0xff;
@@ -258,7 +258,7 @@ READ8_MEMBER( ep64_state::rd0_r )
// rd0_r -
//-------------------------------------------------
-WRITE8_MEMBER( ep64_state::wr0_w )
+void ep64_state::wr0_w(uint8_t data)
{
/*
@@ -299,7 +299,7 @@ WRITE_LINE_MEMBER( ep64_state::write_centronics_busy )
// rd1_r -
//-------------------------------------------------
-READ8_MEMBER( ep64_state::rd1_r )
+uint8_t ep64_state::rd1_r()
{
/*
@@ -336,7 +336,7 @@ READ8_MEMBER( ep64_state::rd1_r )
// wr2_w -
//-------------------------------------------------
-WRITE8_MEMBER( ep64_state::wr2_w )
+void ep64_state::wr2_w(uint8_t data)
{
/*
@@ -557,10 +557,9 @@ void ep64_state::machine_reset()
m_dave->reset();
m_nick->reset();
- address_space &program = m_maincpu->space(AS_PROGRAM);
- wr0_w(program, 0, 0);
+ wr0_w(0);
subdevice<output_latch_device>("cent_data_out")->write(0);
- wr2_w(program, 0, 0);
+ wr2_w(0);
}
diff --git a/src/mame/drivers/ertictac.cpp b/src/mame/drivers/ertictac.cpp
index 28abf1dfb12..5fbd1840733 100644
--- a/src/mame/drivers/ertictac.cpp
+++ b/src/mame/drivers/ertictac.cpp
@@ -40,7 +40,7 @@ public:
void init_ertictac();
private:
- DECLARE_READ32_MEMBER(ertictac_podule_r);
+ uint32_t ertictac_podule_r(offs_t offset);
virtual void machine_start() override;
virtual void machine_reset() override;
INTERRUPT_GEN_MEMBER(ertictac_podule_irq);
@@ -48,7 +48,7 @@ private:
};
-READ32_MEMBER(ertictac_state::ertictac_podule_r)
+uint32_t ertictac_state::ertictac_podule_r(offs_t offset)
{
archimedes_clear_irq_b(ARCHIMEDES_IRQB_PODULE_IRQ);
diff --git a/src/mame/drivers/esh.cpp b/src/mame/drivers/esh.cpp
index 38a52dcf039..98eeea10226 100644
--- a/src/mame/drivers/esh.cpp
+++ b/src/mame/drivers/esh.cpp
@@ -63,11 +63,10 @@ private:
required_shared_ptr<uint8_t> m_tile_ram;
required_shared_ptr<uint8_t> m_tile_control_ram;
bool m_ld_video_visible;
- DECLARE_READ8_MEMBER(ldp_read);
- DECLARE_WRITE8_MEMBER(ldp_write);
- DECLARE_WRITE8_MEMBER(misc_write);
- DECLARE_WRITE8_MEMBER(led_writes);
- DECLARE_WRITE8_MEMBER(nmi_line_w);
+ uint8_t ldp_read();
+ void misc_write(uint8_t data);
+ void led_writes(offs_t offset, uint8_t data);
+ void nmi_line_w(uint8_t data);
bool m_nmi_enable;
void esh_palette(palette_device &palette) const;
uint32_t screen_update_esh(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -145,17 +144,13 @@ uint32_t esh_state::screen_update_esh(screen_device &screen, bitmap_rgb32 &bitma
/* MEMORY HANDLERS */
-READ8_MEMBER(esh_state::ldp_read)
-{
- return m_laserdisc->status_r();
-}
-WRITE8_MEMBER(esh_state::ldp_write)
+uint8_t esh_state::ldp_read()
{
- m_laserdisc->data_w(data);
+ return m_laserdisc->status_r();
}
-WRITE8_MEMBER(esh_state::misc_write)
+void esh_state::misc_write(uint8_t data)
{
/* Bit 0 unknown */
@@ -169,7 +164,7 @@ WRITE8_MEMBER(esh_state::misc_write)
/* They cycle through a repeating pattern though */
}
-WRITE8_MEMBER(esh_state::led_writes)
+void esh_state::led_writes(offs_t offset, uint8_t data)
{
switch(offset)
{
@@ -200,7 +195,7 @@ WRITE8_MEMBER(esh_state::led_writes)
}
}
-WRITE8_MEMBER(esh_state::nmi_line_w)
+void esh_state::nmi_line_w(uint8_t data)
{
// 0 -> 1 transition enables this, else disabled?
m_nmi_enable = (data & 1) == 1;
@@ -232,7 +227,7 @@ void esh_state::z80_0_io(address_map &map)
map(0xf1, 0xf1).portr("IN1");
map(0xf2, 0xf2).portr("IN2");
map(0xf3, 0xf3).portr("IN3");
- map(0xf4, 0xf4).rw(FUNC(esh_state::ldp_read), FUNC(esh_state::ldp_write));
+ map(0xf4, 0xf4).r(FUNC(esh_state::ldp_read)).w(m_laserdisc, FUNC(pioneer_ldv1000_device::data_w));
map(0xf5, 0xf5).w(FUNC(esh_state::misc_write)); /* Continuously writes repeating patterns */
map(0xf8, 0xfd).w(FUNC(esh_state::led_writes));
map(0xfe, 0xfe).w(FUNC(esh_state::nmi_line_w)); /* Both 0xfe and 0xff flip quickly between 0 and 1 */
diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp
index 4f3fd8c0f4e..55eca4c0d23 100644
--- a/src/mame/drivers/esq1.cpp
+++ b/src/mame/drivers/esq1.cpp
@@ -414,18 +414,18 @@ private:
required_device<es5503_device> m_es5503;
required_region_ptr<uint8_t> m_es5503_rom;
- DECLARE_READ8_MEMBER(wd1772_r);
- DECLARE_WRITE8_MEMBER(wd1772_w);
- DECLARE_READ8_MEMBER(seqdosram_r);
- DECLARE_WRITE8_MEMBER(seqdosram_w);
- DECLARE_WRITE8_MEMBER(mapper_w);
- DECLARE_WRITE8_MEMBER(analog_w);
+ uint8_t wd1772_r(offs_t offset);
+ void wd1772_w(offs_t offset, uint8_t data);
+ uint8_t seqdosram_r(offs_t offset);
+ void seqdosram_w(offs_t offset, uint8_t data);
+ void mapper_w(uint8_t data);
+ void analog_w(offs_t offset, uint8_t data);
void duart_output(uint8_t data);
uint8_t esq1_adc_read();
- DECLARE_READ8_MEMBER(es5503_sample_r);
+ uint8_t es5503_sample_r(offs_t offset);
int m_mapper_state;
int m_seq_bank;
@@ -443,7 +443,7 @@ private:
uint8_t m_adc_value[6] = { 0,0,128,0,0,0 }; // VALV,PEDV,PITV,MODV,FILV,BATV
};
-READ8_MEMBER( esq1_state::es5503_sample_r )
+uint8_t esq1_state::es5503_sample_r(offs_t offset)
{
return m_es5503_rom[offset + (((m_es5503->get_channel_strobe() & 8)>>3) * 0x20000)];
}
@@ -468,24 +468,24 @@ void esq1_state::machine_reset()
kpc_calibrated = false;
}
-READ8_MEMBER(esq1_state::wd1772_r)
+uint8_t esq1_state::wd1772_r(offs_t offset)
{
return m_fdc->read(offset&3);
}
-WRITE8_MEMBER(esq1_state::wd1772_w)
+void esq1_state::wd1772_w(offs_t offset, uint8_t data)
{
m_fdc->write(offset&3, data);
}
-WRITE8_MEMBER(esq1_state::mapper_w)
+void esq1_state::mapper_w(uint8_t data)
{
m_mapper_state = (data & 1);
// printf("mapper_state = %d\n", data ^ 1);
}
-WRITE8_MEMBER(esq1_state::analog_w)
+void esq1_state::analog_w(offs_t offset, uint8_t data)
{
if(!(offset & 8))
m_filters->set_vfc(offset & 7, data);
@@ -497,7 +497,7 @@ WRITE8_MEMBER(esq1_state::analog_w)
m_filters->set_vca(offset & 7, data);
}
-READ8_MEMBER(esq1_state::seqdosram_r)
+uint8_t esq1_state::seqdosram_r(offs_t offset)
{
if (m_mapper_state)
{
@@ -509,7 +509,7 @@ READ8_MEMBER(esq1_state::seqdosram_r)
}
}
-WRITE8_MEMBER(esq1_state::seqdosram_w)
+void esq1_state::seqdosram_w(offs_t offset, uint8_t data)
{
if (m_mapper_state)
{
diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp
index 5e385e8f08f..eee7fd1fdae 100644
--- a/src/mame/drivers/esq5505.cpp
+++ b/src/mame/drivers/esq5505.cpp
@@ -245,8 +245,8 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_READ16_MEMBER(lower_r);
- DECLARE_WRITE16_MEMBER(lower_w);
+ uint16_t lower_r(offs_t offset);
+ void lower_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
uint16_t analog_r();
void analog_w(offs_t offset, uint16_t data);
@@ -372,7 +372,7 @@ void esq5505_state::update_irq_to_maincpu()
}
}
-READ16_MEMBER(esq5505_state::lower_r)
+uint16_t esq5505_state::lower_r(offs_t offset)
{
offset &= 0x7fff;
@@ -393,7 +393,7 @@ READ16_MEMBER(esq5505_state::lower_r)
}
}
-WRITE16_MEMBER(esq5505_state::lower_w)
+void esq5505_state::lower_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
offset &= 0x7fff;
diff --git a/src/mame/drivers/ettrivia.cpp b/src/mame/drivers/ettrivia.cpp
index 147c03bbb9b..f61812bd63f 100644
--- a/src/mame/drivers/ettrivia.cpp
+++ b/src/mame/drivers/ettrivia.cpp
@@ -66,13 +66,13 @@ private:
required_shared_ptr<uint8_t> m_bg_videoram;
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
- DECLARE_WRITE8_MEMBER(ettrivia_fg_w);
- DECLARE_WRITE8_MEMBER(ettrivia_bg_w);
- DECLARE_WRITE8_MEMBER(ettrivia_control_w);
- DECLARE_READ8_MEMBER(ettrivia_question_r);
- DECLARE_WRITE8_MEMBER(b000_w);
- DECLARE_READ8_MEMBER(b000_r);
- DECLARE_WRITE8_MEMBER(b800_w);
+ void ettrivia_fg_w(offs_t offset, uint8_t data);
+ void ettrivia_bg_w(offs_t offset, uint8_t data);
+ void ettrivia_control_w(uint8_t data);
+ uint8_t ettrivia_question_r(offs_t offset);
+ void b000_w(uint8_t data);
+ uint8_t b000_r();
+ void b800_w(uint8_t data);
TILE_GET_INFO_MEMBER(get_tile_info_bg);
TILE_GET_INFO_MEMBER(get_tile_info_fg);
void ettrivia_palette(palette_device &palette) const;
@@ -87,19 +87,19 @@ private:
};
-WRITE8_MEMBER(ettrivia_state::ettrivia_fg_w)
+void ettrivia_state::ettrivia_fg_w(offs_t offset, uint8_t data)
{
m_fg_videoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(ettrivia_state::ettrivia_bg_w)
+void ettrivia_state::ettrivia_bg_w(offs_t offset, uint8_t data)
{
m_bg_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(ettrivia_state::ettrivia_control_w)
+void ettrivia_state::ettrivia_control_w(uint8_t data)
{
machine().tilemap().mark_all_dirty();
@@ -113,18 +113,18 @@ WRITE8_MEMBER(ettrivia_state::ettrivia_control_w)
flip_screen_set(data & 1);
}
-READ8_MEMBER(ettrivia_state::ettrivia_question_r)
+uint8_t ettrivia_state::ettrivia_question_r(offs_t offset)
{
uint8_t *QUESTIONS = memregion("user1")->base();
return QUESTIONS[offset + 0x10000 * m_question_bank];
}
-WRITE8_MEMBER(ettrivia_state::b000_w)
+void ettrivia_state::b000_w(uint8_t data)
{
m_b000_val = data;
}
-READ8_MEMBER(ettrivia_state::b000_r)
+uint8_t ettrivia_state::b000_r()
{
if(m_b800_prev)
return m_b000_ret;
@@ -132,7 +132,7 @@ READ8_MEMBER(ettrivia_state::b000_r)
return m_b000_val;
}
-WRITE8_MEMBER(ettrivia_state::b800_w)
+void ettrivia_state::b800_w(uint8_t data)
{
switch(data)
{
diff --git a/src/mame/drivers/eurocom2.cpp b/src/mame/drivers/eurocom2.cpp
index ab65162d9d5..719bb57852c 100644
--- a/src/mame/drivers/eurocom2.cpp
+++ b/src/mame/drivers/eurocom2.cpp
@@ -83,11 +83,11 @@ public:
protected:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_READ8_MEMBER(fdc_aux_r);
- DECLARE_WRITE8_MEMBER(fdc_aux_w);
+ uint8_t fdc_aux_r(offs_t offset);
+ void fdc_aux_w(offs_t offset, uint8_t data);
DECLARE_FLOPPY_FORMATS(floppy_formats);
- DECLARE_WRITE8_MEMBER(vico_w);
+ void vico_w(offs_t offset, uint8_t data);
uint8_t kbd_get();
void kbd_put(u8 data);
@@ -140,8 +140,8 @@ public:
DECLARE_READ_LINE_MEMBER(pia3_ca2_r);
DECLARE_WRITE_LINE_MEMBER(pia3_cb2_w);
- DECLARE_READ8_MEMBER(waveterm_adc);
- DECLARE_WRITE8_MEMBER(waveterm_dac);
+ uint8_t waveterm_adc();
+ void waveterm_dac(uint8_t data); // declared but not defined, commented in memory map
void waveterm(machine_config &config);
void waveterm_map(address_map &map);
@@ -161,7 +161,7 @@ protected:
* b6 -- irq
* b7 -- drq
*/
-READ8_MEMBER(eurocom2_state::fdc_aux_r)
+uint8_t eurocom2_state::fdc_aux_r(offs_t offset)
{
uint8_t data = 0;
@@ -183,7 +183,7 @@ READ8_MEMBER(eurocom2_state::fdc_aux_r)
* b6 -- nc
* b7 -- 1 = enable timer interrupt
*/
-WRITE8_MEMBER(eurocom2_state::fdc_aux_w)
+void eurocom2_state::fdc_aux_w(offs_t offset, uint8_t data)
{
floppy_image_device *floppy0 = m_fdc->subdevice<floppy_connector>("0")->get_device();
floppy_image_device *floppy1 = m_fdc->subdevice<floppy_connector>("1")->get_device();
@@ -212,7 +212,7 @@ WRITE8_MEMBER(eurocom2_state::fdc_aux_w)
LOGDBG("Floppy %d <- %02x\n", offset, data);
}
-WRITE8_MEMBER(eurocom2_state::vico_w)
+void eurocom2_state::vico_w(offs_t offset, uint8_t data)
{
LOG("VICO %d <- %02x\n", offset, data);
@@ -294,7 +294,7 @@ void waveterm_state::pia3_pb_w(uint8_t data)
{
}
-READ8_MEMBER(waveterm_state::waveterm_adc)
+uint8_t waveterm_state::waveterm_adc()
{
return m_screen->frame_number() % 255; // XXX
}
diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp
index 51595d005a6..85ffd6ccb42 100644
--- a/src/mame/drivers/europc.cpp
+++ b/src/mame/drivers/europc.cpp
@@ -68,12 +68,12 @@ private:
required_device<ram_device> m_ram;
required_device<m3002_device> m_rtc;
- DECLARE_WRITE8_MEMBER( europc_pio_w );
- DECLARE_READ8_MEMBER( europc_pio_r );
+ void europc_pio_w(offs_t offset, uint8_t data);
+ uint8_t europc_pio_r(offs_t offset);
- DECLARE_WRITE8_MEMBER ( europc_jim_w );
- DECLARE_READ8_MEMBER ( europc_jim_r );
- DECLARE_READ8_MEMBER ( europc_jim2_r );
+ void europc_jim_w(offs_t offset, uint8_t data);
+ uint8_t europc_jim_r(offs_t offset);
+ uint8_t europc_jim2_r();
uint8_t m_jim_data[16];
uint8_t m_jim_state;
@@ -164,7 +164,7 @@ private:
*/
-WRITE8_MEMBER( europc_pc_state::europc_jim_w )
+void europc_pc_state::europc_jim_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -202,7 +202,7 @@ WRITE8_MEMBER( europc_pc_state::europc_jim_w )
m_jim_data[offset] = data;
}
-READ8_MEMBER( europc_pc_state::europc_jim_r )
+uint8_t europc_pc_state::europc_jim_r(offs_t offset)
{
int data = 0;
switch(offset)
@@ -214,7 +214,7 @@ READ8_MEMBER( europc_pc_state::europc_jim_r )
return data;
}
-READ8_MEMBER( europc_pc_state::europc_jim2_r )
+uint8_t europc_pc_state::europc_jim2_r()
{
switch (m_jim_state)
{
@@ -276,7 +276,7 @@ void europc_pc_state::init_europc()
}
}
-WRITE8_MEMBER( europc_pc_state::europc_pio_w )
+void europc_pc_state::europc_pio_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -294,7 +294,7 @@ WRITE8_MEMBER( europc_pc_state::europc_pio_w )
}
-READ8_MEMBER( europc_pc_state::europc_pio_r )
+uint8_t europc_pc_state::europc_pio_r(offs_t offset)
{
int data = 0;
switch (offset)
diff --git a/src/mame/drivers/evmbug.cpp b/src/mame/drivers/evmbug.cpp
index ad78722fbb7..192976bab4d 100644
--- a/src/mame/drivers/evmbug.cpp
+++ b/src/mame/drivers/evmbug.cpp
@@ -34,8 +34,8 @@ public:
void evmbug(machine_config &config);
private:
- DECLARE_READ8_MEMBER(rs232_r);
- DECLARE_WRITE8_MEMBER(rs232_w);
+ uint8_t rs232_r(offs_t offset);
+ void rs232_w(offs_t offset, uint8_t data);
void kbd_put(u8 data);
void io_map(address_map &map);
@@ -67,7 +67,7 @@ void evmbug_state::io_map(address_map &map)
static INPUT_PORTS_START( evmbug )
INPUT_PORTS_END
-READ8_MEMBER( evmbug_state::rs232_r )
+uint8_t evmbug_state::rs232_r(offs_t offset)
{
if (offset < 8)
return BIT(m_term_data, offset);
@@ -84,7 +84,7 @@ READ8_MEMBER( evmbug_state::rs232_r )
return 0;
}
-WRITE8_MEMBER( evmbug_state::rs232_w )
+void evmbug_state::rs232_w(offs_t offset, uint8_t data)
{
if (offset < 8)
{
diff --git a/src/mame/drivers/f-32.cpp b/src/mame/drivers/f-32.cpp
index 65ababc1634..7e58b37a5cc 100644
--- a/src/mame/drivers/f-32.cpp
+++ b/src/mame/drivers/f-32.cpp
@@ -56,7 +56,7 @@ private:
/* memory pointers */
required_shared_ptr<uint32_t> m_videoram;
- DECLARE_READ32_MEMBER(f32_input_port_1_r);
+ uint32_t f32_input_port_1_r();
uint32_t screen_update_mosaicf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void common_map(address_map &map);
void mosaicf2_io(address_map &map);
@@ -94,7 +94,7 @@ void mosaicf2_state::common_map(address_map &map)
map(0xfff00000, 0xffffffff).rom().region("user1", 0);
}
-READ32_MEMBER(mosaicf2_state::f32_input_port_1_r)
+uint32_t mosaicf2_state::f32_input_port_1_r()
{
/* burn a bunch of cycles because this is polled frequently during busy loops */
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp
index c772235dfe9..5dbb7e399ba 100644
--- a/src/mame/drivers/famibox.cpp
+++ b/src/mame/drivers/famibox.cpp
@@ -104,14 +104,14 @@ private:
emu_timer* m_gameplay_timer;
uint8_t m_money_reg;
- DECLARE_WRITE8_MEMBER(famibox_nt_w);
- DECLARE_READ8_MEMBER(famibox_nt_r);
- DECLARE_WRITE8_MEMBER(sprite_dma_w);
- DECLARE_READ8_MEMBER(famibox_IN0_r);
- DECLARE_WRITE8_MEMBER(famibox_IN0_w);
- DECLARE_READ8_MEMBER(famibox_IN1_r);
- DECLARE_READ8_MEMBER(famibox_system_r);
- DECLARE_WRITE8_MEMBER(famibox_system_w);
+ void famibox_nt_w(offs_t offset, uint8_t data);
+ uint8_t famibox_nt_r(offs_t offset);
+ void sprite_dma_w(address_space &space, uint8_t data);
+ uint8_t famibox_IN0_r();
+ void famibox_IN0_w(uint8_t data);
+ uint8_t famibox_IN1_r();
+ uint8_t famibox_system_r(offs_t offset);
+ void famibox_system_w(offs_t offset, uint8_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -162,14 +162,14 @@ void famibox_state::set_mirroring(int mirroring)
}
#endif
-WRITE8_MEMBER(famibox_state::famibox_nt_w)
+void famibox_state::famibox_nt_w(offs_t offset, uint8_t data)
{
int page = ((offset & 0xc00) >> 10);
m_nt_page[page][offset & 0x3ff] = data;
}
-READ8_MEMBER(famibox_state::famibox_nt_r)
+uint8_t famibox_state::famibox_nt_r(offs_t offset)
{
int page = ((offset & 0xc00) >> 10);
return m_nt_page[page][offset & 0x3ff];
@@ -181,7 +181,7 @@ READ8_MEMBER(famibox_state::famibox_nt_r)
*******************************************************/
-WRITE8_MEMBER(famibox_state::sprite_dma_w)
+void famibox_state::sprite_dma_w(address_space &space, uint8_t data)
{
int source = (data & 7);
m_ppu->spriteram_dma(space, source);
@@ -196,12 +196,12 @@ WRITE8_MEMBER(famibox_state::sprite_dma_w)
*******************************************************/
-READ8_MEMBER(famibox_state::famibox_IN0_r)
+uint8_t famibox_state::famibox_IN0_r()
{
return ((m_in_0 >> m_in_0_shift++) & 0x01) | 0x40;
}
-WRITE8_MEMBER(famibox_state::famibox_IN0_w)
+void famibox_state::famibox_IN0_w(uint8_t data)
{
if (data & 0x01)
{
@@ -215,7 +215,7 @@ WRITE8_MEMBER(famibox_state::famibox_IN0_w)
m_in_1 = ioport("P2")->read();
}
-READ8_MEMBER(famibox_state::famibox_IN1_r)
+uint8_t famibox_state::famibox_IN1_r()
{
return ((m_in_1 >> m_in_1_shift++) & 0x01) | 0x40;
}
@@ -300,7 +300,7 @@ TIMER_CALLBACK_MEMBER(famibox_state::famicombox_gameplay_timer_callback)
}
}
-READ8_MEMBER(famibox_state::famibox_system_r)
+uint8_t famibox_state::famibox_system_r(offs_t offset)
{
switch( offset & 0x07 )
{
@@ -322,7 +322,7 @@ READ8_MEMBER(famibox_state::famibox_system_r)
}
}
-WRITE8_MEMBER(famibox_state::famibox_system_w)
+void famibox_state::famibox_system_w(offs_t offset, uint8_t data)
{
switch( offset & 0x07 )
{
@@ -510,7 +510,7 @@ void famibox_state::machine_start()
m_nt_page[2] = m_nt_ram.get() + 0x800;
m_nt_page[3] = m_nt_ram.get() + 0xc00;
- m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(*this, FUNC(famibox_state::famibox_nt_r)), write8_delegate(*this, FUNC(famibox_state::famibox_nt_w)));
+ m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8sm_delegate(*this, FUNC(famibox_state::famibox_nt_r)), write8sm_delegate(*this, FUNC(famibox_state::famibox_nt_w)));
m_ppu->space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, "ppubank1");
famicombox_bankswitch(0);
diff --git a/src/mame/drivers/fanucspmg.cpp b/src/mame/drivers/fanucspmg.cpp
index 1890ef04c44..4d8a2f70aca 100644
--- a/src/mame/drivers/fanucspmg.cpp
+++ b/src/mame/drivers/fanucspmg.cpp
@@ -594,24 +594,24 @@ private:
uint8_t memory_read_byte(offs_t offset);
void memory_write_byte(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER(shared_r);
- DECLARE_WRITE8_MEMBER(shared_w);
- DECLARE_READ8_MEMBER(vram1_r);
- DECLARE_WRITE8_MEMBER(vram1_w);
- DECLARE_READ8_MEMBER(vram2_r);
- DECLARE_WRITE8_MEMBER(vram2_w);
- DECLARE_WRITE8_MEMBER(vram_bank_w);
- DECLARE_READ8_MEMBER(vblank_ack_r);
- DECLARE_WRITE8_MEMBER(vbl_ctrl_w);
- DECLARE_WRITE8_MEMBER(keyboard_row_w);
- DECLARE_READ8_MEMBER(keyboard_r);
- DECLARE_WRITE8_MEMBER(video_ctrl_w);
+ uint8_t shared_r(offs_t offset);
+ void shared_w(offs_t offset, uint8_t data);
+ uint8_t vram1_r(offs_t offset);
+ void vram1_w(offs_t offset, uint8_t data);
+ uint8_t vram2_r(offs_t offset);
+ void vram2_w(offs_t offset, uint8_t data);
+ void vram_bank_w(uint8_t data);
+ uint8_t vblank_ack_r();
+ void vbl_ctrl_w(uint8_t data);
+ void keyboard_row_w(uint8_t data);
+ uint8_t keyboard_r();
+ void video_ctrl_w(uint8_t data);
uint8_t fdcdma_r();
void fdcdma_w(uint8_t data);
uint8_t get_slave_ack(offs_t offset);
- DECLARE_WRITE8_MEMBER(dma_page_w);
+ void dma_page_w(uint8_t data);
- DECLARE_READ16_MEMBER(magic_r);
+ uint16_t magic_r();
DECLARE_WRITE_LINE_MEMBER(vsync_w);
DECLARE_WRITE_LINE_MEMBER(tc_w);
@@ -646,12 +646,12 @@ void fanucspmg_state::init_fanucspmg()
save_item(NAME(m_video_ctrl));
}
-READ8_MEMBER(fanucspmg_state::shared_r)
+uint8_t fanucspmg_state::shared_r(offs_t offset)
{
return m_shared[offset];
}
-WRITE8_MEMBER(fanucspmg_state::shared_w)
+void fanucspmg_state::shared_w(offs_t offset, uint8_t data)
{
m_shared[offset] = data;
}
@@ -685,7 +685,7 @@ void fanucspmg_state::fdcdma_w(uint8_t data)
m_fdc->dma_w(data);
}
-WRITE8_MEMBER(fanucspmg_state::dma_page_w)
+void fanucspmg_state::dma_page_w(uint8_t data)
{
floppy_image_device *floppy0 = m_fdc->subdevice<floppy_connector>("0")->get_device();
floppy_image_device *floppy1 = m_fdc->subdevice<floppy_connector>("1")->get_device();
@@ -696,7 +696,7 @@ WRITE8_MEMBER(fanucspmg_state::dma_page_w)
m_dma_page = (data >> 2) & 0xf;
}
-READ16_MEMBER(fanucspmg_state::magic_r)
+uint16_t fanucspmg_state::magic_r()
{
return 0x0041; // 31 = memory error
}
@@ -742,32 +742,32 @@ WRITE_LINE_MEMBER(fanucspmg_state::vsync_w)
m_vbl_stat = (state == ASSERT_LINE) ? 1 : 0;
}
-READ8_MEMBER(fanucspmg_state::vram1_r)
+uint8_t fanucspmg_state::vram1_r(offs_t offset)
{
return m_vram[m_vram_bank + offset];
}
-WRITE8_MEMBER(fanucspmg_state::vram1_w)
+void fanucspmg_state::vram1_w(offs_t offset, uint8_t data)
{
m_vram[m_vram_bank + offset] = data;
}
-READ8_MEMBER(fanucspmg_state::vram2_r)
+uint8_t fanucspmg_state::vram2_r(offs_t offset)
{
return m_vram[m_vram_bank + offset + 0x600];
}
-WRITE8_MEMBER(fanucspmg_state::vram2_w)
+void fanucspmg_state::vram2_w(offs_t offset, uint8_t data)
{
m_vram[m_vram_bank + offset + 0x600] = data;
}
-WRITE8_MEMBER(fanucspmg_state::vram_bank_w)
+void fanucspmg_state::vram_bank_w(uint8_t data)
{
m_vram_bank = (data & 7) * 0xc00;
}
-READ8_MEMBER(fanucspmg_state::vblank_ack_r)
+uint8_t fanucspmg_state::vblank_ack_r()
{
m_subcpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE);
@@ -776,26 +776,26 @@ READ8_MEMBER(fanucspmg_state::vblank_ack_r)
// bit 1 is unknown
// bit 3 appears to enable vblank IRQs
-WRITE8_MEMBER(fanucspmg_state::vbl_ctrl_w)
+void fanucspmg_state::vbl_ctrl_w(uint8_t data)
{
m_vbl_ctrl = data;
}
// row 2: raising a bit toggles the corresponding bit at 500a
// row 3: raising a bit toggles the corresponding bit at 500b
-WRITE8_MEMBER(fanucspmg_state::keyboard_row_w)
+void fanucspmg_state::keyboard_row_w(uint8_t data)
{
m_keyboard_row = data;
}
-READ8_MEMBER(fanucspmg_state::keyboard_r)
+uint8_t fanucspmg_state::keyboard_r()
{
return 0;
}
// bit 0 is set when clearing VRAM
// bit 1 is display enable
-WRITE8_MEMBER(fanucspmg_state::video_ctrl_w)
+void fanucspmg_state::video_ctrl_w(uint8_t data)
{
m_video_ctrl = data;
}
diff --git a/src/mame/drivers/fastinvaders.cpp b/src/mame/drivers/fastinvaders.cpp
index ab5a5c615ee..789d4c4b348 100644
--- a/src/mame/drivers/fastinvaders.cpp
+++ b/src/mame/drivers/fastinvaders.cpp
@@ -55,17 +55,17 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(in6);
private:
- DECLARE_WRITE8_MEMBER(io_40_w);
-
- DECLARE_READ8_MEMBER(io_60_r);
- DECLARE_WRITE8_MEMBER(io_70_w);
- DECLARE_WRITE8_MEMBER(io_90_w);
- DECLARE_WRITE8_MEMBER(io_a0_w);
- DECLARE_WRITE8_MEMBER(io_b0_w);
- DECLARE_WRITE8_MEMBER(io_c0_w);
- DECLARE_WRITE8_MEMBER(io_d0_w);
- DECLARE_WRITE8_MEMBER(io_e0_w);
- DECLARE_WRITE8_MEMBER(io_f0_w);
+ void io_40_w(uint8_t data);
+
+ uint8_t io_60_r();
+ void io_70_w(uint8_t data);
+ void io_90_w(uint8_t data);
+ void io_a0_w(uint8_t data);
+ void io_b0_w(uint8_t data);
+ void io_c0_w(uint8_t data);
+ void io_d0_w(uint8_t data);
+ void io_e0_w(uint8_t data);
+ void io_f0_w(uint8_t data);
DECLARE_READ_LINE_MEMBER(sid_read);
@@ -240,20 +240,20 @@ uint32_t fastinvaders_state::screen_update(screen_device &screen, bitmap_rgb32 &
return 0;
}
-WRITE8_MEMBER(fastinvaders_state::io_40_w)
+void fastinvaders_state::io_40_w(uint8_t data)
{
m_io_40 = data;
logerror("av target= %02X\n",m_io_40);
}
-WRITE8_MEMBER(fastinvaders_state::io_90_w)
+void fastinvaders_state::io_90_w(uint8_t data)
{
-logerror("Audio write &02X\n",data);
+ logerror("Audio write &02X\n",data);
}
-READ8_MEMBER(fastinvaders_state::io_60_r)
+uint8_t fastinvaders_state::io_60_r()
{
//0x60 ds6 input bit 0 DX or SX
// bit 1 DX or SX
@@ -267,7 +267,7 @@ READ8_MEMBER(fastinvaders_state::io_60_r)
}
-WRITE8_MEMBER(fastinvaders_state::io_70_w)
+void fastinvaders_state::io_70_w(uint8_t data)
{
//bit 0 rest55 clear
//bit 1 rest65 clear
@@ -318,37 +318,37 @@ WRITE8_MEMBER(fastinvaders_state::io_70_w)
}
-WRITE8_MEMBER(fastinvaders_state::io_a0_w)
+void fastinvaders_state::io_a0_w(uint8_t data)
{
m_irq1 = 0;
m_pic8259->ir1_w(CLEAR_LINE);
}
-WRITE8_MEMBER(fastinvaders_state::io_b0_w)
+void fastinvaders_state::io_b0_w(uint8_t data)
{
m_irq2 = 0;
m_pic8259->ir2_w(CLEAR_LINE);
}
-WRITE8_MEMBER(fastinvaders_state::io_c0_w)
+void fastinvaders_state::io_c0_w(uint8_t data)
{
m_irq3 = 0;
m_pic8259->ir3_w(CLEAR_LINE);
}
-WRITE8_MEMBER(fastinvaders_state::io_d0_w)
+void fastinvaders_state::io_d0_w(uint8_t data)
{
m_irq5 = 0;
m_pic8259->ir5_w(CLEAR_LINE);
}
-WRITE8_MEMBER(fastinvaders_state::io_e0_w)
+void fastinvaders_state::io_e0_w(uint8_t data)
{
m_irq4 = 0;
m_pic8259->ir4_w(CLEAR_LINE);
}
-WRITE8_MEMBER(fastinvaders_state::io_f0_w)
+void fastinvaders_state::io_f0_w(uint8_t data)
{
m_irq6 = 0;
m_pic8259->ir6_w(CLEAR_LINE);
diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp
index 6bff388f621..36f39b38c9a 100644
--- a/src/mame/drivers/fc100.cpp
+++ b/src/mame/drivers/fc100.cpp
@@ -73,12 +73,12 @@ public:
private:
uint8_t mc6847_videoram_r(offs_t offset);
- DECLARE_READ8_MEMBER(port00_r);
- DECLARE_WRITE8_MEMBER(port31_w);
- DECLARE_WRITE8_MEMBER(port33_w);
- DECLARE_WRITE8_MEMBER(port43_w);
- DECLARE_WRITE8_MEMBER(port60_w);
- DECLARE_WRITE8_MEMBER(port70_w);
+ uint8_t port00_r(offs_t offset);
+ void port31_w(uint8_t data);
+ void port33_w(uint8_t data);
+ void port43_w(uint8_t data);
+ void port60_w(offs_t offset, uint8_t data);
+ void port70_w(offs_t offset, uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_w);
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
TIMER_DEVICE_CALLBACK_MEMBER(timer_k);
@@ -288,7 +288,7 @@ static INPUT_PORTS_START( fc100 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-READ8_MEMBER( fc100_state::port00_r )
+uint8_t fc100_state::port00_r(offs_t offset)
{
return m_keyboard[offset]->read();
}
@@ -331,7 +331,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( fc100_state::timer_k)
//********************* AUDIO **********************************
#if 0
-WRITE8_MEMBER( fc100_state::ay_port_a_w )
+void fc100_state::ay_port_a_w(uint8_t data)
{
m_ag = BIT(data, 4);
m_gm2 = BIT(data, 6);
@@ -401,7 +401,7 @@ GFXDECODE_END
//********************** CENTRONICS PRINTER ***********************************
-WRITE8_MEMBER( fc100_state::port43_w )
+void fc100_state::port43_w(uint8_t data)
{
m_centronics->write_strobe(BIT(data, 2));
m_centronics->write_init(BIT(data, 3));
@@ -409,13 +409,13 @@ WRITE8_MEMBER( fc100_state::port43_w )
//********************** UART/CASSETTE ***********************************
-WRITE8_MEMBER( fc100_state::port31_w )
+void fc100_state::port31_w(uint8_t data)
{
if (data == 8)
m_cass->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
}
-WRITE8_MEMBER( fc100_state::port33_w )
+void fc100_state::port33_w(uint8_t data)
{
if (data == 0)
m_cass->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
@@ -488,13 +488,13 @@ void fc100_state::machine_reset()
m_uart->write_cts(0);
}
-WRITE8_MEMBER( fc100_state::port60_w )
+void fc100_state::port60_w(offs_t offset, uint8_t data)
{
if (m_banksw_unlocked)
membank("bankr")->set_entry(offset);
}
-WRITE8_MEMBER( fc100_state::port70_w )
+void fc100_state::port70_w(offs_t offset, uint8_t data)
{
m_banksw_unlocked = (bool)offset;
}
diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp
index 7b91ee74e07..a81cdfd43eb 100644
--- a/src/mame/drivers/fccpu30.cpp
+++ b/src/mame/drivers/fccpu30.cpp
@@ -271,13 +271,13 @@ cpu30_state(const machine_config &mconfig, device_type type, const char *tag)
void init_cpu33();
private:
- DECLARE_WRITE8_MEMBER (fdc_w);
- DECLARE_READ8_MEMBER (fdc_r);
- DECLARE_WRITE8_MEMBER (scsi_w);
- DECLARE_READ8_MEMBER (scsi_r);
- DECLARE_READ8_MEMBER (slot1_status_r);
- DECLARE_READ32_MEMBER (bootvect_r);
- DECLARE_WRITE32_MEMBER (bootvect_w);
+ void fdc_w(offs_t offset, uint8_t data);
+ uint8_t fdc_r(offs_t offset);
+ void scsi_w(offs_t offset, uint8_t data);
+ uint8_t scsi_r(offs_t offset);
+ uint8_t slot1_status_r();
+ uint32_t bootvect_r(offs_t offset);
+ void bootvect_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
/* Interrupt support */
void cpu_space_map(address_map &map);
@@ -299,10 +299,10 @@ private:
void pit2c_w(uint8_t data);
/* VME bus accesses */
- //DECLARE_READ16_MEMBER (vme_a24_r);
- //DECLARE_WRITE16_MEMBER (vme_a24_w);
- //DECLARE_READ16_MEMBER (vme_a16_r);
- //DECLARE_WRITE16_MEMBER (vme_a16_w);
+ //uint16_t vme_a24_r();
+ //void vme_a24_w(uint16_t data);
+ //uint16_t vme_a16_r();
+ //void vme_a16_w(uint16_t data);
virtual void machine_start () override;
virtual void machine_reset () override;
@@ -395,38 +395,38 @@ void cpu30_state::init_cpu30lite8() { LOGINIT("%s\n", FUNCNAME); m_board_id = 0
void cpu30_state::init_cpu33() { LOGINIT("%s\n", FUNCNAME); m_board_id = 0x68; } // 0x60 skips FGA prompt
/* Mock FDC driver */
-READ8_MEMBER (cpu30_state::fdc_r){
+uint8_t cpu30_state::fdc_r(offs_t offset){
LOG("%s\n * FDC read Offset: %04x\n", FUNCNAME, offset);
return 1;
}
-WRITE8_MEMBER (cpu30_state::fdc_w){
+void cpu30_state::fdc_w(offs_t offset, uint8_t data){
LOG("%s\n * FDC write Offset: %04x Data: %02x\n", FUNCNAME, offset, data);
}
/* Mock SCSI driver */
-READ8_MEMBER (cpu30_state::scsi_r){
+uint8_t cpu30_state::scsi_r(offs_t offset){
LOG("%s\n * SCSI read Offset: %04x\n", FUNCNAME, offset);
return 1;
}
-WRITE8_MEMBER (cpu30_state::scsi_w){
+void cpu30_state::scsi_w(offs_t offset, uint8_t data){
LOG("%s\n * SCSI write Offset: %04x Data: %02x\n", FUNCNAME, offset, data);
}
/* 1 = board is in slot 1, 0 = board is NOT in slot 1 */
-READ8_MEMBER (cpu30_state::slot1_status_r){
+uint8_t cpu30_state::slot1_status_r(){
LOG("%s\n", FUNCNAME);
return 1;
}
/* Boot vector handler, the PCB hardwires the first 8 bytes from 0xff800000 to 0x0 at reset*/
-READ32_MEMBER (cpu30_state::bootvect_r){
+uint32_t cpu30_state::bootvect_r(offs_t offset){
LOG("%s\n", FUNCNAME);
return m_sysrom[offset];
}
-WRITE32_MEMBER (cpu30_state::bootvect_w){
+void cpu30_state::bootvect_w(offs_t offset, uint32_t data, uint32_t mem_mask){
LOG("%s\n", FUNCNAME);
m_sysram[offset % ARRAY_LENGTH(m_sysram)] &= ~mem_mask;
m_sysram[offset % ARRAY_LENGTH(m_sysram)] |= (data & mem_mask);
@@ -602,21 +602,21 @@ void cpu30_state::pit2c_w(uint8_t data){
#if 0
/* Dummy VME access methods until the VME bus device is ready for use */
-READ16_MEMBER (cpu30_state::vme_a24_r){
+uint16_t cpu30_state::vme_a24_r(){
LOG("%s\n", FUNCNAME);
return (uint16_t) 0;
}
-WRITE16_MEMBER (cpu30_state::vme_a24_w){
+void cpu30_state::vme_a24_w(uint16_t data){
LOG("%s(%02x)\n", FUNCNAME, data);
}
-READ16_MEMBER (cpu30_state::vme_a16_r){
+uint16_t cpu30_state::vme_a16_r(){
LOG("%s\n", FUNCNAME);
return (uint16_t) 0;
}
-WRITE16_MEMBER (cpu30_state::vme_a16_w){
+void cpu30_state::vme_a16_w(uint16_t data){
LOG("%s(%02x)\n", FUNCNAME, data);
}
#endif
diff --git a/src/mame/drivers/feversoc.cpp b/src/mame/drivers/feversoc.cpp
index a570be10869..b515e67a8b5 100644
--- a/src/mame/drivers/feversoc.cpp
+++ b/src/mame/drivers/feversoc.cpp
@@ -102,13 +102,13 @@ public:
void feversoc(machine_config &config);
private:
- DECLARE_READ16_MEMBER(in_r);
- DECLARE_WRITE16_MEMBER(output_w);
- DECLARE_WRITE16_MEMBER(output2_w);
+ uint16_t in_r(offs_t offset);
+ void output_w(uint16_t data);
+ void output2_w(uint16_t data);
void feversoc_map(address_map &map);
uint32_t screen_update_feversoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(feversoc_irq);
- DECLARE_WRITE16_MEMBER(feversoc_irq_ack);
+ void feversoc_irq_ack(uint16_t data);
virtual void machine_start() override;
required_shared_ptr<uint32_t> m_mainram1;
@@ -162,12 +162,12 @@ uint32_t feversoc_state::screen_update_feversoc(screen_device &screen, bitmap_in
-READ16_MEMBER(feversoc_state::in_r)
+uint16_t feversoc_state::in_r(offs_t offset)
{
return m_in[offset]->read() & 0xffff;
}
-WRITE16_MEMBER( feversoc_state::output_w )
+void feversoc_state::output_w(uint16_t data)
{
machine().bookkeeping().coin_lockout_w(0, ~data & 0x40);
machine().bookkeeping().coin_lockout_w(1, ~data & 0x40);
@@ -187,7 +187,7 @@ WRITE16_MEMBER( feversoc_state::output_w )
m_rtc->ce_w((data & 0x0100) ? ASSERT_LINE : CLEAR_LINE);
}
-WRITE16_MEMBER( feversoc_state::output2_w )
+void feversoc_state::output2_w(uint16_t data)
{
for (int n = 0; n < 7; n++)
m_lamps[n] = BIT(data, n); // LAMP1-LAMP7
@@ -276,7 +276,7 @@ WRITE_LINE_MEMBER(feversoc_state::feversoc_irq)
m_maincpu->set_input_line(8, ASSERT_LINE);
}
-WRITE16_MEMBER(feversoc_state::feversoc_irq_ack)
+void feversoc_state::feversoc_irq_ack(uint16_t data)
{
m_maincpu->set_input_line(8, CLEAR_LINE);
}
diff --git a/src/mame/drivers/fidel_as12.cpp b/src/mame/drivers/fidel_as12.cpp
index debe3f070bf..2ced7866196 100644
--- a/src/mame/drivers/fidel_as12.cpp
+++ b/src/mame/drivers/fidel_as12.cpp
@@ -73,9 +73,9 @@ private:
// I/O handlers
void update_display();
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_WRITE8_MEMBER(led_w);
- DECLARE_READ8_MEMBER(input_r);
+ void control_w(u8 data);
+ void led_w(offs_t offset, u8 data);
+ u8 input_r(offs_t offset);
u16 m_inp_mux;
u8 m_led_data;
@@ -106,7 +106,7 @@ void as12_state::update_display()
m_display->matrix(m_inp_mux, m_led_data);
}
-WRITE8_MEMBER(as12_state::control_w)
+void as12_state::control_w(u8 data)
{
// d0-d3: 74245 P0-P3
// 74245 Q0-Q8: input mux, led select
@@ -121,14 +121,14 @@ WRITE8_MEMBER(as12_state::control_w)
// d6,d7: N/C?
}
-WRITE8_MEMBER(as12_state::led_w)
+void as12_state::led_w(offs_t offset, u8 data)
{
// a0-a2,d0: led data via NE591N
m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset);
update_display();
}
-READ8_MEMBER(as12_state::input_r)
+u8 as12_state::input_r(offs_t offset)
{
u8 data = 0;
diff --git a/src/mame/drivers/fidel_cc7.cpp b/src/mame/drivers/fidel_cc7.cpp
index 6cefe12dcd5..1c4eaa3a279 100644
--- a/src/mame/drivers/fidel_cc7.cpp
+++ b/src/mame/drivers/fidel_cc7.cpp
@@ -87,8 +87,8 @@ private:
void main_io(address_map &map);
// I/O handlers
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_WRITE8_MEMBER(control_w);
+ u8 input_r();
+ void control_w(offs_t offset, u8 data);
u8 m_inp_mux = 0;
u8 m_7seg_data = 0;
@@ -109,7 +109,7 @@ void bcc_state::machine_start()
// TTL
-WRITE8_MEMBER(bcc_state::control_w)
+void bcc_state::control_w(offs_t offset, u8 data)
{
// a0-a2,d7: digit segment data via NE591
u8 mask = 1 << (offset & 7);
@@ -125,7 +125,7 @@ WRITE8_MEMBER(bcc_state::control_w)
m_inp_mux = data & 0xf;
}
-READ8_MEMBER(bcc_state::input_r)
+u8 bcc_state::input_r()
{
u8 data = 0;
diff --git a/src/mame/drivers/fidel_chesster.cpp b/src/mame/drivers/fidel_chesster.cpp
index 448d26692f2..46f23745f26 100644
--- a/src/mame/drivers/fidel_chesster.cpp
+++ b/src/mame/drivers/fidel_chesster.cpp
@@ -80,8 +80,8 @@ private:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
// I/O handlers
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_READ8_MEMBER(input_r);
+ void control_w(offs_t offset, u8 data);
+ u8 input_r(offs_t offset);
int m_numbanks = 0;
u8 m_speech_bank = 0;
@@ -109,7 +109,7 @@ void chesster_state::machine_start()
// TTL/generic
-WRITE8_MEMBER(chesster_state::control_w)
+void chesster_state::control_w(offs_t offset, u8 data)
{
// a0-a2,d7: 74259(1)
u8 mask = 1 << offset;
@@ -129,7 +129,7 @@ WRITE8_MEMBER(chesster_state::control_w)
m_rombank->set_entry(bank & (m_numbanks - 1));
}
-READ8_MEMBER(chesster_state::input_r)
+u8 chesster_state::input_r(offs_t offset)
{
u8 sel = m_select >> 4 & 0xf;
u8 data = 0;
diff --git a/src/mame/drivers/fidel_dames.cpp b/src/mame/drivers/fidel_dames.cpp
index fad565b94e9..35b24e8cb78 100644
--- a/src/mame/drivers/fidel_dames.cpp
+++ b/src/mame/drivers/fidel_dames.cpp
@@ -74,9 +74,9 @@ private:
// I/O handlers
void update_display();
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_WRITE8_MEMBER(select_w);
- DECLARE_READ8_MEMBER(input_r);
+ void control_w(u8 data);
+ void select_w(u8 data);
+ u8 input_r();
void init_board(int state);
u8 read_board_row(u8 row);
@@ -148,14 +148,14 @@ void dsc_state::update_display()
m_display->matrix(m_led_select, m_inp_mux);
}
-WRITE8_MEMBER(dsc_state::control_w)
+void dsc_state::control_w(u8 data)
{
// d0-d7: input mux, 7seg data
m_inp_mux = data;
update_display();
}
-WRITE8_MEMBER(dsc_state::select_w)
+void dsc_state::select_w(u8 data)
{
// d4: speaker out
m_dac->write(BIT(~data, 4));
@@ -165,7 +165,7 @@ WRITE8_MEMBER(dsc_state::select_w)
update_display();
}
-READ8_MEMBER(dsc_state::input_r)
+u8 dsc_state::input_r()
{
u8 data = 0;
diff --git a/src/mame/drivers/fidel_desdis.cpp b/src/mame/drivers/fidel_desdis.cpp
index 545d40ebbb2..203121600a9 100644
--- a/src/mame/drivers/fidel_desdis.cpp
+++ b/src/mame/drivers/fidel_desdis.cpp
@@ -97,9 +97,9 @@ protected:
// I/O handlers
void update_lcd();
- virtual DECLARE_WRITE8_MEMBER(control_w);
- virtual DECLARE_WRITE8_MEMBER(lcd_w);
- virtual DECLARE_READ8_MEMBER(input_r);
+ virtual void control_w(offs_t offset, u8 data);
+ virtual void lcd_w(offs_t offset, u8 data);
+ virtual u8 input_r(offs_t offset);
u8 m_select = 0;
u32 m_lcd_data = 0;
@@ -138,7 +138,7 @@ private:
void fdes2325_map(address_map &map);
// I/O handlers, slightly different (control_w is d0 instead of d7)
- virtual DECLARE_WRITE8_MEMBER(control_w) override { desdis_state::control_w(space, offset, data << 7); }
+ virtual void control_w(offs_t offset, u8 data) override { desdis_state::control_w(offset, data << 7); }
};
void desmas_state::init_fdes2265()
@@ -174,7 +174,7 @@ void desdis_state::update_lcd()
m_display->update();
}
-WRITE8_MEMBER(desdis_state::control_w)
+void desdis_state::control_w(offs_t offset, u8 data)
{
// a0-a2,d7: 74259
u8 mask = 1 << offset;
@@ -199,7 +199,7 @@ WRITE8_MEMBER(desdis_state::control_w)
update_lcd();
}
-WRITE8_MEMBER(desdis_state::lcd_w)
+void desdis_state::lcd_w(offs_t offset, u8 data)
{
// a0-a2,d0-d3: 4*74259 to lcd digit segments
u32 mask = bitswap<8>(1 << offset,3,7,6,0,1,2,4,5);
@@ -212,7 +212,7 @@ WRITE8_MEMBER(desdis_state::lcd_w)
update_lcd();
}
-READ8_MEMBER(desdis_state::input_r)
+u8 desdis_state::input_r(offs_t offset)
{
u8 sel = m_select >> 4 & 0xf;
u8 data = 0;
diff --git a/src/mame/drivers/fidel_eag68k.cpp b/src/mame/drivers/fidel_eag68k.cpp
index 588e2f01b1b..a4e629e0a98 100644
--- a/src/mame/drivers/fidel_eag68k.cpp
+++ b/src/mame/drivers/fidel_eag68k.cpp
@@ -235,11 +235,11 @@ protected:
// I/O handlers
void update_display();
- virtual DECLARE_WRITE8_MEMBER(mux_w);
- DECLARE_READ8_MEMBER(input1_r);
- DECLARE_READ8_MEMBER(input2_r);
- DECLARE_WRITE8_MEMBER(leds_w);
- DECLARE_WRITE8_MEMBER(digit_w);
+ virtual void mux_w(offs_t offset, u8 data);
+ u8 input1_r(offs_t offset);
+ u8 input2_r();
+ void leds_w(offs_t offset, u8 data);
+ void digit_w(offs_t offset, u8 data);
bool m_rotate;
u8 m_select = 0;
@@ -281,9 +281,9 @@ private:
void sub_map(address_map &map);
// I/O handlers
- DECLARE_WRITE8_MEMBER(reset_subcpu_w);
- DECLARE_READ8_MEMBER(main_ack_r);
- DECLARE_READ8_MEMBER(sub_ack_r);
+ void reset_subcpu_w(u8 data);
+ u8 main_ack_r();
+ u8 sub_ack_r();
};
// Excel 68000
@@ -327,7 +327,7 @@ void eag_state::update_display()
m_display->matrix(1 << m_select, m_led_data << 8 | seg_data);
}
-WRITE8_MEMBER(eag_state::mux_w)
+void eag_state::mux_w(offs_t offset, u8 data)
{
// a1-a3,d0: 74259
u8 mask = 1 << offset;
@@ -342,7 +342,7 @@ WRITE8_MEMBER(eag_state::mux_w)
update_display();
}
-READ8_MEMBER(eag_state::input1_r)
+u8 eag_state::input1_r(offs_t offset)
{
u8 data = 0;
@@ -364,20 +364,20 @@ READ8_MEMBER(eag_state::input1_r)
return (data >> offset & 1) ? 0 : 0x80;
}
-READ8_MEMBER(eag_state::input2_r)
+u8 eag_state::input2_r()
{
// d7: 3 more buttons on EAG
return (BIT(m_inputs[1]->read(), m_select)) ? 0x80 : 0;
}
-WRITE8_MEMBER(eag_state::leds_w)
+void eag_state::leds_w(offs_t offset, u8 data)
{
// a1-a3,d0: led data
m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset);
update_display();
}
-WRITE8_MEMBER(eag_state::digit_w)
+void eag_state::digit_w(offs_t offset, u8 data)
{
// a1-a3,d0(d8): digit segment data
m_7seg_data = (m_7seg_data & ~(1 << offset)) | ((data & 1) << offset);
@@ -387,19 +387,19 @@ WRITE8_MEMBER(eag_state::digit_w)
// EAG V5
-WRITE8_MEMBER(eagv5_state::reset_subcpu_w)
+void eagv5_state::reset_subcpu_w(u8 data)
{
// reset subcpu, from trigger to monostable 555 (R1=47K, C1=1uF)
m_subcpu->pulse_input_line(INPUT_LINE_RESET, attotime::from_msec(52));
}
-READ8_MEMBER(eagv5_state::main_ack_r)
+u8 eagv5_state::main_ack_r()
{
// d8,d9: latches ack state
return (m_mainlatch->pending_r() << 1 ^ 2) | m_sublatch->pending_r();
}
-READ8_MEMBER(eagv5_state::sub_ack_r)
+u8 eagv5_state::sub_ack_r()
{
// d8,d9: latches ack state
return (m_sublatch->pending_r() << 1 ^ 2) | m_mainlatch->pending_r();
diff --git a/src/mame/drivers/fidel_phantom.cpp b/src/mame/drivers/fidel_phantom.cpp
index 66921ca16a0..7279459fc15 100644
--- a/src/mame/drivers/fidel_phantom.cpp
+++ b/src/mame/drivers/fidel_phantom.cpp
@@ -77,14 +77,14 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(motors_timer);
void update_lcd();
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_WRITE8_MEMBER(lcd_w);
- DECLARE_WRITE8_MEMBER(motors_w);
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_READ8_MEMBER(motors_r);
- DECLARE_READ8_MEMBER(irq_ack_r);
- DECLARE_READ8_MEMBER(hmotor_ff_clear_r);
- DECLARE_READ8_MEMBER(vmotor_ff_clear_r);
+ void control_w(offs_t offset, u8 data);
+ void lcd_w(offs_t offset, u8 data);
+ void motors_w(u8 data);
+ u8 input_r(offs_t offset);
+ u8 motors_r(offs_t offset);
+ u8 irq_ack_r();
+ u8 hmotor_ff_clear_r();
+ u8 vmotor_ff_clear_r();
void update_pieces_position(int state);
uint8_t m_select;
@@ -220,7 +220,7 @@ void phantom_state::update_lcd()
m_display->update();
}
-WRITE8_MEMBER(phantom_state::control_w)
+void phantom_state::control_w(offs_t offset, u8 data)
{
// a0-a2,d1: 74259
uint8_t mask = 1 << offset;
@@ -238,7 +238,7 @@ WRITE8_MEMBER(phantom_state::control_w)
update_lcd();
}
-WRITE8_MEMBER(phantom_state::motors_w)
+void phantom_state::motors_w(u8 data)
{
// bit 0: vertical motor down
// bit 1: vertical motor up
@@ -257,7 +257,7 @@ WRITE8_MEMBER(phantom_state::motors_w)
m_motors_ctrl = data;
}
-WRITE8_MEMBER(phantom_state::lcd_w)
+void phantom_state::lcd_w(offs_t offset, u8 data)
{
// a0-a2,d0,d2,d4,d6: 4*74259 to lcd digit segments
u32 mask = bitswap<8>(1 << offset,3,7,6,0,1,2,4,5);
@@ -270,7 +270,7 @@ WRITE8_MEMBER(phantom_state::lcd_w)
update_lcd();
}
-READ8_MEMBER(phantom_state::input_r)
+u8 phantom_state::input_r(offs_t offset)
{
uint8_t mux = m_select & 0xf;
uint8_t data = 0xff;
@@ -294,7 +294,7 @@ READ8_MEMBER(phantom_state::input_r)
return data;
}
-READ8_MEMBER(phantom_state::motors_r)
+u8 phantom_state::motors_r(offs_t offset)
{
uint8_t data = 0xff;
@@ -313,14 +313,14 @@ READ8_MEMBER(phantom_state::motors_r)
return data;
}
-READ8_MEMBER(phantom_state::irq_ack_r)
+u8 phantom_state::irq_ack_r()
{
if (!machine().side_effects_disabled())
m_maincpu->set_input_line(R65C02_IRQ_LINE, CLEAR_LINE);
return 0;
}
-READ8_MEMBER(phantom_state::hmotor_ff_clear_r)
+u8 phantom_state::hmotor_ff_clear_r()
{
if (!machine().side_effects_disabled())
m_hmotor_sensor1_ff = m_hmotor_sensor0_ff = false;
@@ -328,7 +328,7 @@ READ8_MEMBER(phantom_state::hmotor_ff_clear_r)
return 0;
}
-READ8_MEMBER(phantom_state::vmotor_ff_clear_r)
+u8 phantom_state::vmotor_ff_clear_r()
{
if (!machine().side_effects_disabled())
m_vmotor_sensor1_ff = m_vmotor_sensor0_ff = false;
diff --git a/src/mame/drivers/fidel_sc12.cpp b/src/mame/drivers/fidel_sc12.cpp
index b80546b619d..28d31f66c50 100644
--- a/src/mame/drivers/fidel_sc12.cpp
+++ b/src/mame/drivers/fidel_sc12.cpp
@@ -103,8 +103,8 @@ private:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
// I/O handlers
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_READ8_MEMBER(input_r);
+ void control_w(u8 data);
+ u8 input_r(offs_t offset);
u8 m_inp_mux;
};
@@ -124,7 +124,7 @@ void sc12_state::machine_start()
I/O
******************************************************************************/
-WRITE8_MEMBER(sc12_state::control_w)
+void sc12_state::control_w(u8 data)
{
// d0-d3: 7442 a0-a3
// 7442 0-8: led data, input mux
@@ -141,7 +141,7 @@ WRITE8_MEMBER(sc12_state::control_w)
//..
}
-READ8_MEMBER(sc12_state::input_r)
+u8 sc12_state::input_r(offs_t offset)
{
u8 data = 0;
diff --git a/src/mame/drivers/fidel_sc8.cpp b/src/mame/drivers/fidel_sc8.cpp
index a2ea1f58827..8a69fede6bc 100644
--- a/src/mame/drivers/fidel_sc8.cpp
+++ b/src/mame/drivers/fidel_sc8.cpp
@@ -67,8 +67,8 @@ private:
void main_io(address_map &map);
// I/O handlers
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_WRITE8_MEMBER(control_w);
+ u8 input_r();
+ void control_w(offs_t offset, u8 data);
u8 m_inp_mux = 0;
u8 m_led_data = 0;
@@ -89,7 +89,7 @@ void scc_state::machine_start()
// TTL
-WRITE8_MEMBER(scc_state::control_w)
+void scc_state::control_w(offs_t offset, u8 data)
{
// a0-a2,d7: led data
u8 mask = 1 << (offset & 7);
@@ -103,7 +103,7 @@ WRITE8_MEMBER(scc_state::control_w)
m_display->matrix((sel & 0xff) | (data << 4 & 0x100), m_led_data);
}
-READ8_MEMBER(scc_state::input_r)
+u8 scc_state::input_r()
{
u8 data = 0;
diff --git a/src/mame/drivers/fidel_sc9.cpp b/src/mame/drivers/fidel_sc9.cpp
index e209b8f3eb9..0500828e437 100644
--- a/src/mame/drivers/fidel_sc9.cpp
+++ b/src/mame/drivers/fidel_sc9.cpp
@@ -95,10 +95,10 @@ protected:
// I/O handlers
void update_display();
- DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_WRITE8_MEMBER(led_w);
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_READ8_MEMBER(input_d7_r);
+ void control_w(u8 data);
+ void led_w(offs_t offset, u8 data);
+ u8 input_r();
+ u8 input_d7_r(offs_t offset);
u8 m_inp_mux;
u8 m_led_data;
@@ -156,7 +156,7 @@ void sc9_state::update_display()
m_display->matrix(1 << m_inp_mux, m_led_data);
}
-WRITE8_MEMBER(sc9_state::control_w)
+void sc9_state::control_w(u8 data)
{
// d0-d3: 74245 P0-P3
// 74245 Q0-Q8: input mux, led select
@@ -170,14 +170,14 @@ WRITE8_MEMBER(sc9_state::control_w)
// d6,d7: N/C
}
-WRITE8_MEMBER(sc9_state::led_w)
+void sc9_state::led_w(offs_t offset, u8 data)
{
// a0-a2,d0: led data via NE591N
m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset);
update_display();
}
-READ8_MEMBER(sc9_state::input_r)
+u8 sc9_state::input_r()
{
u8 data = 0;
@@ -193,10 +193,10 @@ READ8_MEMBER(sc9_state::input_r)
return ~data;
}
-READ8_MEMBER(sc9_state::input_d7_r)
+u8 sc9_state::input_d7_r(offs_t offset)
{
// a0-a2,d7: multiplexed inputs
- return (input_r(space, 0) >> offset & 1) ? 0x80 : 0;
+ return (input_r() >> offset & 1) ? 0x80 : 0;
}
diff --git a/src/mame/drivers/fireball.cpp b/src/mame/drivers/fireball.cpp
index fa1d1908354..e21528a2c57 100644
--- a/src/mame/drivers/fireball.cpp
+++ b/src/mame/drivers/fireball.cpp
@@ -58,14 +58,14 @@ public:
void fireball(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(io_00_w);
- DECLARE_READ8_MEMBER(io_00_r);
- DECLARE_WRITE8_MEMBER(io_02_w);
- DECLARE_READ8_MEMBER(io_02_r);
- DECLARE_WRITE8_MEMBER(io_04_w);
- DECLARE_READ8_MEMBER(io_04_r);
- DECLARE_WRITE8_MEMBER(io_06_w);
- DECLARE_READ8_MEMBER(io_06_r);
+ void io_00_w(uint8_t data);
+ uint8_t io_00_r();
+ void io_02_w(uint8_t data);
+ uint8_t io_02_r();
+ void io_04_w(uint8_t data);
+ uint8_t io_04_r();
+ void io_06_w(uint8_t data);
+ uint8_t io_06_r();
uint8_t p1_r();
void p1_w(uint8_t data);
uint8_t p3_r();
@@ -95,7 +95,7 @@ private:
****************************/
-READ8_MEMBER(fireball_state::io_00_r)
+uint8_t fireball_state::io_00_r()
{
uint8_t tmp=0;
@@ -106,7 +106,7 @@ READ8_MEMBER(fireball_state::io_00_r)
return tmp;
}
-WRITE8_MEMBER(fireball_state::io_00_w)
+void fireball_state::io_00_w(uint8_t data)
{
m_display_data= m_display_data&0x7f;
if (LOG_DISPLAY)
@@ -133,7 +133,7 @@ WRITE8_MEMBER(fireball_state::io_00_w)
output().set_value("Hopper3", BIT(data, 6));
}
-READ8_MEMBER(fireball_state::io_02_r)
+uint8_t fireball_state::io_02_r()
{
uint8_t tmp=0;
@@ -144,7 +144,7 @@ READ8_MEMBER(fireball_state::io_02_r)
return tmp;
}
-WRITE8_MEMBER(fireball_state::io_02_w)
+void fireball_state::io_02_w(uint8_t data)
{
if (LOG_OUTPUT)
logerror("write to 0x00 IO (X7-X9) %02X\n",data);
@@ -159,7 +159,7 @@ WRITE8_MEMBER(fireball_state::io_02_w)
output().set_value("RV", BIT(data, 7));
}
-READ8_MEMBER(fireball_state::io_04_r)
+uint8_t fireball_state::io_04_r()
{ //contraves per mod prog
uint8_t tmp=0;
@@ -170,7 +170,7 @@ READ8_MEMBER(fireball_state::io_04_r)
return tmp;
}
-WRITE8_MEMBER(fireball_state::io_04_w)
+void fireball_state::io_04_w(uint8_t data)
{//display data
if (LOG_DISPLAY)
logerror("display datat write %02X\n",data);
@@ -179,17 +179,17 @@ WRITE8_MEMBER(fireball_state::io_04_w)
-READ8_MEMBER(fireball_state::io_06_r)
+uint8_t fireball_state::io_06_r()
{
if (LOG_AY8912)
logerror("read from 0x06 IO\n");
return 0xbe;
//bit 0x01 is NC
- //bit 0x40 is used to detect is the unit is powerd up!!! related to eeprom store?
+ //bit 0x40 is used to detect is the unit is powered up!!! related to eeprom store?
}
-WRITE8_MEMBER(fireball_state::io_06_w)
+void fireball_state::io_06_w(uint8_t data)
{
if (LOG_AY8912)
logerror("write to 0x06 data =%02X\n",data);
diff --git a/src/mame/drivers/firebeat.cpp b/src/mame/drivers/firebeat.cpp
index 81a2327f7c0..d9c89e8ea23 100644
--- a/src/mame/drivers/firebeat.cpp
+++ b/src/mame/drivers/firebeat.cpp
@@ -230,39 +230,39 @@ private:
uint32_t screen_update_firebeat_0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_firebeat_1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(firebeat_interrupt);
- DECLARE_READ32_MEMBER(input_r);
- DECLARE_READ32_MEMBER(sensor_r );
+ uint32_t input_r(offs_t offset, uint32_t mem_mask = ~0);
+ uint32_t sensor_r(offs_t offset);
DECLARE_WRITE_LINE_MEMBER(ata_interrupt);
- DECLARE_READ32_MEMBER(ata_command_r);
- DECLARE_WRITE32_MEMBER(ata_command_w);
- DECLARE_READ32_MEMBER(ata_control_r);
- DECLARE_WRITE32_MEMBER(ata_control_w);
-// DECLARE_READ32_MEMBER(comm_uart_r);
-// DECLARE_WRITE32_MEMBER(comm_uart_w);
- DECLARE_READ32_MEMBER(cabinet_r);
- DECLARE_READ32_MEMBER(keyboard_wheel_r);
- DECLARE_READ8_MEMBER(midi_uart_r);
- DECLARE_WRITE8_MEMBER(midi_uart_w);
- DECLARE_READ32_MEMBER(extend_board_irq_r);
- DECLARE_WRITE32_MEMBER(extend_board_irq_w);
- DECLARE_WRITE32_MEMBER(lamp_output_w);
- DECLARE_WRITE32_MEMBER(lamp_output_kbm_w);
- DECLARE_WRITE32_MEMBER(lamp_output_ppp_w);
- DECLARE_WRITE32_MEMBER(lamp_output2_w);
- DECLARE_WRITE32_MEMBER(lamp_output2_ppp_w);
- DECLARE_WRITE32_MEMBER(lamp_output3_w);
- DECLARE_WRITE32_MEMBER(lamp_output3_ppp_w);
- DECLARE_READ16_MEMBER(spu_unk_r);
- DECLARE_WRITE16_MEMBER(spu_irq_ack_w);
- DECLARE_WRITE16_MEMBER(spu_220000_w);
- DECLARE_WRITE16_MEMBER(spu_sdram_bank_w);
+ uint32_t ata_command_r(offs_t offset, uint32_t mem_mask = ~0);
+ void ata_command_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t ata_control_r(offs_t offset, uint32_t mem_mask = ~0);
+ void ata_control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+// uint32_t comm_uart_r(offs_t offset, uint32_t mem_mask = ~ 0);
+// void comm_uart_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t cabinet_r(offs_t offset, uint32_t mem_mask = ~0);
+ uint32_t keyboard_wheel_r(offs_t offset);
+ uint8_t midi_uart_r(offs_t offset);
+ void midi_uart_w(offs_t offset, uint8_t data);
+ uint32_t extend_board_irq_r(offs_t offset, uint32_t mem_mask = ~0);
+ void extend_board_irq_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output_kbm_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output_ppp_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output2_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output2_ppp_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output3_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void lamp_output3_ppp_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint16_t spu_unk_r();
+ void spu_irq_ack_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void spu_220000_w(uint16_t data);
+ void spu_sdram_bank_w(uint16_t data);
DECLARE_WRITE_LINE_MEMBER(spu_ata_interrupt);
// TIMER_CALLBACK_MEMBER(keyboard_timer_callback);
TIMER_DEVICE_CALLBACK_MEMBER(spu_timer_callback);
void set_ibutton(uint8_t *data);
int ibutton_w(uint8_t data);
DECLARE_WRITE8_MEMBER(security_w);
- void init_lights(write32_delegate out1, write32_delegate out2, write32_delegate out3);
+ void init_lights(write32s_delegate out1, write32s_delegate out2, write32s_delegate out3);
void init_firebeat();
void init_keyboard();
DECLARE_WRITE_LINE_MEMBER(sound_irq_callback);
@@ -292,7 +292,7 @@ uint32_t firebeat_state::screen_update_firebeat_1(screen_device &screen, bitmap_
/*****************************************************************************/
-READ32_MEMBER(firebeat_state::input_r)
+uint32_t firebeat_state::input_r(offs_t offset, uint32_t mem_mask)
{
uint32_t r = 0;
@@ -312,7 +312,7 @@ READ32_MEMBER(firebeat_state::input_r)
return r;
}
-READ32_MEMBER(firebeat_state::sensor_r )
+uint32_t firebeat_state::sensor_r(offs_t offset)
{
if (offset == 0)
{
@@ -329,7 +329,7 @@ READ32_MEMBER(firebeat_state::sensor_r )
#define BYTESWAP16(x) ((((x) >> 8) & 0xff) | (((x) << 8) & 0xff00))
-READ32_MEMBER(firebeat_state::ata_command_r )
+uint32_t firebeat_state::ata_command_r(offs_t offset, uint32_t mem_mask)
{
uint16_t r;
// printf("ata_command_r: %08X, %08X\n", offset, mem_mask);
@@ -345,7 +345,7 @@ READ32_MEMBER(firebeat_state::ata_command_r )
}
}
-WRITE32_MEMBER(firebeat_state::ata_command_w )
+void firebeat_state::ata_command_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
// printf("ata_command_w: %08X, %08X, %08X\n", data, offset, mem_mask);
@@ -360,7 +360,7 @@ WRITE32_MEMBER(firebeat_state::ata_command_w )
}
-READ32_MEMBER(firebeat_state::ata_control_r )
+uint32_t firebeat_state::ata_control_r(offs_t offset, uint32_t mem_mask)
{
uint16_t r;
// printf("ata_control_r: %08X, %08X\n", offset, mem_mask);
@@ -377,7 +377,7 @@ READ32_MEMBER(firebeat_state::ata_control_r )
}
}
-WRITE32_MEMBER(firebeat_state::ata_control_w )
+void firebeat_state::ata_control_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (ACCESSING_BITS_16_31)
{
@@ -392,47 +392,47 @@ WRITE32_MEMBER(firebeat_state::ata_control_w )
/*****************************************************************************/
/*
-READ32_MEMBER(firebeat_state::comm_uart_r )
+uint32_t firebeat_state::comm_uart_r(offs_t offset, uint32_t mem_mask)
{
uint32_t r = 0;
if (ACCESSING_BITS_24_31)
{
- r |= pc16552d_0_r(space, (offset*4)+0) << 24;
+ r |= pc16552d_0_r((offset*4)+0) << 24;
}
if (ACCESSING_BITS_16_23)
{
- r |= pc16552d_0_r(space, (offset*4)+1) << 16;
+ r |= pc16552d_0_r((offset*4)+1) << 16;
}
if (ACCESSING_BITS_8_15)
{
- r |= pc16552d_0_r(space, (offset*4)+2) << 8;
+ r |= pc16552d_0_r((offset*4)+2) << 8;
}
if (ACCESSING_BITS_0_7)
{
- r |= pc16552d_0_r(space, (offset*4)+3) << 0;
+ r |= pc16552d_0_r((offset*4)+3) << 0;
}
return r;
}
-WRITE32_MEMBER(firebeat_state::comm_uart_w )
+void firebeat_state::comm_uart_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (ACCESSING_BITS_24_31)
{
- pc16552d_0_w(space, (offset*4)+0, (data >> 24) & 0xff);
+ pc16552d_0_w((offset*4)+0, (data >> 24) & 0xff);
}
if (ACCESSING_BITS_16_23)
{
- pc16552d_0_w(space, (offset*4)+1, (data >> 16) & 0xff);
+ pc16552d_0_w((offset*4)+1, (data >> 16) & 0xff);
}
if (ACCESSING_BITS_8_15)
{
- pc16552d_0_w(space, (offset*4)+2, (data >> 8) & 0xff);
+ pc16552d_0_w((offset*4)+2, (data >> 8) & 0xff);
}
if (ACCESSING_BITS_0_7)
{
- pc16552d_0_w(space, (offset*4)+3, (data >> 0) & 0xff);
+ pc16552d_0_w((offset*4)+3, (data >> 0) & 0xff);
}
}
@@ -449,7 +449,7 @@ static const int cab_data[2] = { 0x0, 0x8 };
static const int kbm_cab_data[2] = { 0x2, 0x8 };
static const int ppd_cab_data[2] = { 0x1, 0x9 };
-READ32_MEMBER(firebeat_state::cabinet_r )
+uint32_t firebeat_state::cabinet_r(offs_t offset, uint32_t mem_mask)
{
uint32_t r = 0;
@@ -472,7 +472,7 @@ READ32_MEMBER(firebeat_state::cabinet_r )
/*****************************************************************************/
-READ32_MEMBER(firebeat_state::keyboard_wheel_r )
+uint32_t firebeat_state::keyboard_wheel_r(offs_t offset)
{
if (offset == 0) // Keyboard Wheel (P1)
{
@@ -486,12 +486,12 @@ READ32_MEMBER(firebeat_state::keyboard_wheel_r )
return 0;
}
-READ8_MEMBER(firebeat_state::midi_uart_r )
+uint8_t firebeat_state::midi_uart_r(offs_t offset)
{
return m_duart_midi->read(offset >> 6);
}
-WRITE8_MEMBER(firebeat_state::midi_uart_w )
+void firebeat_state::midi_uart_w(offs_t offset, uint8_t data)
{
m_duart_midi->write(offset >> 6, data);
}
@@ -599,7 +599,7 @@ TIMER_CALLBACK_MEMBER(firebeat_state::keyboard_timer_callback)
// 0x10: ?
// 0x20: ?
-READ32_MEMBER(firebeat_state::extend_board_irq_r)
+uint32_t firebeat_state::extend_board_irq_r(offs_t offset, uint32_t mem_mask)
{
uint32_t r = 0;
@@ -611,7 +611,7 @@ READ32_MEMBER(firebeat_state::extend_board_irq_r)
return r;
}
-WRITE32_MEMBER(firebeat_state::extend_board_irq_w )
+void firebeat_state::extend_board_irq_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
// printf("extend_board_irq_w: %08X, %08X, %08X\n", data, offset, mem_mask);
@@ -625,7 +625,7 @@ WRITE32_MEMBER(firebeat_state::extend_board_irq_w )
/*****************************************************************************/
-WRITE32_MEMBER(firebeat_state::lamp_output_w )
+void firebeat_state::lamp_output_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
// -------- -------- -------- xxxxxxxx Status LEDs (active low)
if (ACCESSING_BITS_0_7)
@@ -643,9 +643,9 @@ WRITE32_MEMBER(firebeat_state::lamp_output_w )
// printf("lamp_output_w: %08X, %08X, %08X\n", data, offset, mem_mask);
}
-WRITE32_MEMBER(firebeat_state::lamp_output_kbm_w )
+void firebeat_state::lamp_output_kbm_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- lamp_output_w(space, offset, data, mem_mask);
+ lamp_output_w(offset, data, mem_mask);
if (ACCESSING_BITS_24_31)
{
@@ -662,9 +662,9 @@ WRITE32_MEMBER(firebeat_state::lamp_output_kbm_w )
}
}
-WRITE32_MEMBER(firebeat_state::lamp_output_ppp_w )
+void firebeat_state::lamp_output_ppp_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- lamp_output_w(space, offset, data, mem_mask);
+ lamp_output_w(offset, data, mem_mask);
// ParaParaParadise lamps (active high)
// 0x00000100 Left
@@ -704,14 +704,14 @@ WRITE32_MEMBER(firebeat_state::lamp_output_ppp_w )
}
}
-WRITE32_MEMBER(firebeat_state::lamp_output2_w )
+void firebeat_state::lamp_output2_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
// printf("lamp_output2_w: %08X, %08X, %08X\n", data, offset, mem_mask);
}
-WRITE32_MEMBER(firebeat_state::lamp_output2_ppp_w )
+void firebeat_state::lamp_output2_ppp_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- lamp_output2_w(space, offset, data, mem_mask);
+ lamp_output2_w(offset, data, mem_mask);
// ParaParaParadise lamps (active high)
// 0x00010000 Top LED 0
@@ -738,14 +738,14 @@ WRITE32_MEMBER(firebeat_state::lamp_output2_ppp_w )
}
}
-WRITE32_MEMBER(firebeat_state::lamp_output3_w )
+void firebeat_state::lamp_output3_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
// printf("lamp_output3_w: %08X, %08X, %08X\n", data, offset, mem_mask);
}
-WRITE32_MEMBER(firebeat_state::lamp_output3_ppp_w )
+void firebeat_state::lamp_output3_ppp_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- lamp_output3_w(space, offset, data, mem_mask);
+ lamp_output3_w(offset, data, mem_mask);
// ParaParaParadise lamps (active high)
// 0x00010000 Lamp 0
@@ -776,7 +776,7 @@ WRITE32_MEMBER(firebeat_state::lamp_output3_ppp_w )
IRQ6: ATA
*/
-READ16_MEMBER(firebeat_state::spu_unk_r)
+uint16_t firebeat_state::spu_unk_r()
{
// dipswitches?
@@ -787,7 +787,7 @@ READ16_MEMBER(firebeat_state::spu_unk_r)
return r;
}
-WRITE16_MEMBER(firebeat_state::spu_irq_ack_w)
+void firebeat_state::spu_irq_ack_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
{
@@ -800,12 +800,12 @@ WRITE16_MEMBER(firebeat_state::spu_irq_ack_w)
}
}
-WRITE16_MEMBER(firebeat_state::spu_220000_w)
+void firebeat_state::spu_220000_w(uint16_t data)
{
// IRQ2 handler 5 sets all bits
}
-WRITE16_MEMBER(firebeat_state::spu_sdram_bank_w)
+void firebeat_state::spu_sdram_bank_w(uint16_t data)
{
}
@@ -1372,11 +1372,11 @@ WRITE8_MEMBER(firebeat_state::security_w)
/*****************************************************************************/
-void firebeat_state::init_lights(write32_delegate out1, write32_delegate out2, write32_delegate out3)
+void firebeat_state::init_lights(write32s_delegate out1, write32s_delegate out2, write32s_delegate out3)
{
- if(out1.isnull()) out1 = write32_delegate(*this, FUNC(firebeat_state::lamp_output_w));
- if(out2.isnull()) out2 = write32_delegate(*this, FUNC(firebeat_state::lamp_output2_w));
- if(out3.isnull()) out3 = write32_delegate(*this, FUNC(firebeat_state::lamp_output3_w));
+ if(out1.isnull()) out1 = write32s_delegate(*this, FUNC(firebeat_state::lamp_output_w));
+ if(out2.isnull()) out2 = write32s_delegate(*this, FUNC(firebeat_state::lamp_output2_w));
+ if(out3.isnull()) out3 = write32s_delegate(*this, FUNC(firebeat_state::lamp_output3_w));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x7d000804, 0x7d000807, out1);
m_maincpu->space(AS_PROGRAM).install_write_handler(0x7d000320, 0x7d000323, out2);
@@ -1399,19 +1399,19 @@ void firebeat_state::init_firebeat()
set_ibutton(rom);
- init_lights(write32_delegate(*this), write32_delegate(*this), write32_delegate(*this));
+ init_lights(write32s_delegate(*this), write32s_delegate(*this), write32s_delegate(*this));
}
void firebeat_state::init_ppp()
{
init_firebeat();
- init_lights(write32_delegate(*this, FUNC(firebeat_state::lamp_output_ppp_w)), write32_delegate(*this, FUNC(firebeat_state::lamp_output2_ppp_w)), write32_delegate(*this, FUNC(firebeat_state::lamp_output3_ppp_w)));
+ init_lights(write32s_delegate(*this, FUNC(firebeat_state::lamp_output_ppp_w)), write32s_delegate(*this, FUNC(firebeat_state::lamp_output2_ppp_w)), write32s_delegate(*this, FUNC(firebeat_state::lamp_output3_ppp_w)));
}
void firebeat_state::init_ppd()
{
init_firebeat();
- init_lights(write32_delegate(*this, FUNC(firebeat_state::lamp_output_ppp_w)), write32_delegate(*this, FUNC(firebeat_state::lamp_output2_ppp_w)), write32_delegate(*this, FUNC(firebeat_state::lamp_output3_ppp_w)));
+ init_lights(write32s_delegate(*this, FUNC(firebeat_state::lamp_output_ppp_w)), write32s_delegate(*this, FUNC(firebeat_state::lamp_output2_ppp_w)), write32s_delegate(*this, FUNC(firebeat_state::lamp_output3_ppp_w)));
m_cur_cab_data = ppd_cab_data;
}
@@ -1426,7 +1426,7 @@ void firebeat_state::init_keyboard()
void firebeat_state::init_kbm()
{
init_firebeat();
- init_lights(write32_delegate(*this, FUNC(firebeat_state::lamp_output_kbm_w)), write32_delegate(*this), write32_delegate(*this));
+ init_lights(write32s_delegate(*this, FUNC(firebeat_state::lamp_output_kbm_w)), write32s_delegate(*this), write32s_delegate(*this));
init_keyboard();
diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp
index 057cd731b97..7d322f4b496 100644
--- a/src/mame/drivers/firefox.cpp
+++ b/src/mame/drivers/firefox.cpp
@@ -72,28 +72,28 @@ public:
void firefox(machine_config &config);
private:
- DECLARE_READ8_MEMBER(firefox_disc_status_r);
- DECLARE_READ8_MEMBER(firefox_disc_data_r);
- DECLARE_WRITE8_MEMBER(firefox_disc_read_w);
+ uint8_t firefox_disc_status_r();
+ uint8_t firefox_disc_data_r();
+ void firefox_disc_read_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(firefox_disc_lock_w);
DECLARE_WRITE_LINE_MEMBER(audio_enable_left_w);
DECLARE_WRITE_LINE_MEMBER(audio_enable_right_w);
DECLARE_WRITE_LINE_MEMBER(firefox_disc_reset_w);
DECLARE_WRITE_LINE_MEMBER(firefox_disc_write_w);
- DECLARE_WRITE8_MEMBER(firefox_disc_data_w);
- DECLARE_WRITE8_MEMBER(tileram_w);
- DECLARE_WRITE8_MEMBER(tile_palette_w);
- DECLARE_WRITE8_MEMBER(sprite_palette_w);
- DECLARE_WRITE8_MEMBER(firefox_objram_bank_w);
+ void firefox_disc_data_w(uint8_t data);
+ void tileram_w(offs_t offset, uint8_t data);
+ void tile_palette_w(offs_t offset, uint8_t data);
+ void sprite_palette_w(offs_t offset, uint8_t data);
+ void firefox_objram_bank_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(sound_reset_w);
- DECLARE_READ8_MEMBER(adc_r);
- DECLARE_WRITE8_MEMBER(adc_select_w);
- DECLARE_WRITE8_MEMBER(nvram_w);
- DECLARE_READ8_MEMBER(nvram_r);
- DECLARE_WRITE8_MEMBER(rom_bank_w);
- DECLARE_WRITE8_MEMBER(main_irq_clear_w);
- DECLARE_WRITE8_MEMBER(main_firq_clear_w);
- DECLARE_WRITE8_MEMBER(self_reset_w);
+ uint8_t adc_r();
+ void adc_select_w(uint8_t data);
+ void nvram_w(offs_t offset, uint8_t data);
+ uint8_t nvram_r(address_space &space, offs_t offset);
+ void rom_bank_w(uint8_t data);
+ void main_irq_clear_w(uint8_t data);
+ void main_firq_clear_w(uint8_t data);
+ void self_reset_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(coin_counter_right_w);
DECLARE_WRITE_LINE_MEMBER(coin_counter_left_w);
uint8_t riot_porta_r();
@@ -164,7 +164,7 @@ fffe=reset e7cc
40 = DISKFULL - Active low
80 = DISKDAV - Active low data available
*/
-READ8_MEMBER(firefox_state::firefox_disc_status_r)
+uint8_t firefox_state::firefox_disc_status_r()
{
uint8_t result = 0xff;
@@ -179,14 +179,14 @@ READ8_MEMBER(firefox_state::firefox_disc_status_r)
/* 4105 - DREAD */
/* this reset RDDSK (&DSKRD) */
-READ8_MEMBER(firefox_state::firefox_disc_data_r)
+uint8_t firefox_state::firefox_disc_data_r()
{
return m_n_disc_read_data;
}
/* DISK READ ENABLE */
/* 4218 - DSKREAD, set RDDSK */
-WRITE8_MEMBER(firefox_state::firefox_disc_read_w)
+void firefox_state::firefox_disc_read_w(uint8_t data)
{
m_n_disc_read_data = m_laserdisc->data_r();
}
@@ -219,7 +219,7 @@ WRITE_LINE_MEMBER(firefox_state::firefox_disc_write_w)
}
/* latch the data */
-WRITE8_MEMBER(firefox_state::firefox_disc_data_w)
+void firefox_state::firefox_disc_data_w(uint8_t data)
{
m_n_disc_data = data;
}
@@ -239,7 +239,7 @@ TILE_GET_INFO_MEMBER(firefox_state::bgtile_get_info)
}
-WRITE8_MEMBER(firefox_state::tileram_w)
+void firefox_state::tileram_w(offs_t offset, uint8_t data)
{
m_tileram[offset] = data;
m_bgtiles->mark_tile_dirty(offset);
@@ -304,19 +304,19 @@ void firefox_state::set_rgba( int start, int index, unsigned char *palette_ram )
m_palette->set_pen_color( start + index, rgb_t( a, r, g, b ) );
}
-WRITE8_MEMBER(firefox_state::tile_palette_w)
+void firefox_state::tile_palette_w(offs_t offset, uint8_t data)
{
m_tile_palette[ offset ] = data;
set_rgba( 0, offset & 0xff, m_tile_palette );
}
-WRITE8_MEMBER(firefox_state::sprite_palette_w)
+void firefox_state::sprite_palette_w(offs_t offset, uint8_t data)
{
m_sprite_palette[ offset ] = data;
set_rgba( 256, offset & 0xff, m_sprite_palette );
}
-WRITE8_MEMBER(firefox_state::firefox_objram_bank_w)
+void firefox_state::firefox_objram_bank_w(uint8_t data)
{
m_sprite_bank = data & 0x03;
}
@@ -375,13 +375,13 @@ void firefox_state::riot_porta_w(uint8_t data)
*
*************************************/
-WRITE8_MEMBER(firefox_state::nvram_w)
+void firefox_state::nvram_w(offs_t offset, uint8_t data)
{
m_nvram_1c->write(offset, data >> 4);
m_nvram_1d->write(offset, data & 0xf);
}
-READ8_MEMBER(firefox_state::nvram_r)
+uint8_t firefox_state::nvram_r(address_space &space, offs_t offset)
{
return (m_nvram_1c->read(space, offset) << 4) | (m_nvram_1d->read(space, offset) & 0x0f);
}
@@ -393,22 +393,22 @@ READ8_MEMBER(firefox_state::nvram_r)
*
*************************************/
-WRITE8_MEMBER(firefox_state::rom_bank_w)
+void firefox_state::rom_bank_w(uint8_t data)
{
m_mainbank->set_entry(data & 0x1f);
}
-WRITE8_MEMBER(firefox_state::main_irq_clear_w)
+void firefox_state::main_irq_clear_w(uint8_t data)
{
m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE );
}
-WRITE8_MEMBER(firefox_state::main_firq_clear_w)
+void firefox_state::main_firq_clear_w(uint8_t data)
{
m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE );
}
-WRITE8_MEMBER(firefox_state::self_reset_w)
+void firefox_state::self_reset_w(uint8_t data)
{
m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
diff --git a/src/mame/drivers/fk1.cpp b/src/mame/drivers/fk1.cpp
index 453e18d3872..7d547b64fe8 100644
--- a/src/mame/drivers/fk1.cpp
+++ b/src/mame/drivers/fk1.cpp
@@ -53,12 +53,12 @@ private:
DECLARE_WRITE_LINE_MEMBER(fk1_pit_out0);
DECLARE_WRITE_LINE_MEMBER(fk1_pit_out1);
DECLARE_WRITE_LINE_MEMBER(fk1_pit_out2);
- DECLARE_WRITE8_MEMBER(fk1_intr_w);
- DECLARE_READ8_MEMBER(fk1_bank_ram_r);
- DECLARE_READ8_MEMBER(fk1_bank_rom_r);
- DECLARE_WRITE8_MEMBER(fk1_disk_w);
- DECLARE_READ8_MEMBER(fk1_mouse_r);
- DECLARE_WRITE8_MEMBER(fk1_reset_int_w);
+ void fk1_intr_w(uint8_t data);
+ uint8_t fk1_bank_ram_r();
+ uint8_t fk1_bank_rom_r();
+ void fk1_disk_w(uint8_t data);
+ uint8_t fk1_mouse_r();
+ void fk1_reset_int_w(uint8_t data);
uint8_t m_video_rol;
uint8_t m_int_vector;
virtual void machine_reset() override;
@@ -250,12 +250,12 @@ WRITE_LINE_MEMBER( fk1_state::fk1_pit_out2 )
8 any interruption allowed.
*/
-WRITE8_MEMBER( fk1_state::fk1_intr_w )
+void fk1_state::fk1_intr_w(uint8_t data)
{
logerror("fk1_intr_w %02x\n",data);
}
-READ8_MEMBER( fk1_state::fk1_bank_ram_r )
+uint8_t fk1_state::fk1_bank_ram_r()
{
address_space &space_mem = m_maincpu->space(AS_PROGRAM);
uint8_t *ram = m_ram->pointer();
@@ -266,7 +266,7 @@ READ8_MEMBER( fk1_state::fk1_bank_ram_r )
return 0;
}
-READ8_MEMBER( fk1_state::fk1_bank_rom_r )
+uint8_t fk1_state::fk1_bank_rom_r()
{
address_space &space_mem = m_maincpu->space(AS_PROGRAM);
space_mem.unmap_write(0x0000, 0x3fff);
@@ -284,7 +284,7 @@ READ8_MEMBER( fk1_state::fk1_bank_rom_r )
Functions are allowed in one.
*/
-WRITE8_MEMBER( fk1_state::fk1_disk_w )
+void fk1_state::fk1_disk_w(uint8_t data)
{
// logerror("fk1_disk_w %02x\n",data);
}
@@ -299,7 +299,7 @@ WRITE8_MEMBER( fk1_state::fk1_disk_w )
0 - / AX, X-axis
*/
-READ8_MEMBER( fk1_state::fk1_mouse_r )
+uint8_t fk1_state::fk1_mouse_r()
{
// logerror("fk1_mouse_r\n");
return 0;
@@ -307,7 +307,7 @@ READ8_MEMBER( fk1_state::fk1_mouse_r )
/*Write to port 70 resets the interrupt from the system clock of 50 Hz. */
-WRITE8_MEMBER( fk1_state::fk1_reset_int_w )
+void fk1_state::fk1_reset_int_w(uint8_t data)
{
logerror("fk1_reset_int_w\n");
}
diff --git a/src/mame/drivers/flashbeats.cpp b/src/mame/drivers/flashbeats.cpp
index 2130e076dcc..2883c6f6690 100644
--- a/src/mame/drivers/flashbeats.cpp
+++ b/src/mame/drivers/flashbeats.cpp
@@ -54,8 +54,8 @@ private:
virtual void machine_reset() override;
void scsp_irq(offs_t offset, uint8_t data);
- DECLARE_READ16_MEMBER(p6_r);
- DECLARE_WRITE16_MEMBER(p6_w);
+ uint16_t p6_r();
+ void p6_w(uint16_t data);
required_device<h83007_device> m_maincpu;
required_device<m68000_device> m_scspcpu;
@@ -101,12 +101,12 @@ uint32_t flashbeats_state::screen_update(screen_device &screen, bitmap_rgb32 &bi
return 0;
}
-READ16_MEMBER(flashbeats_state::p6_r)
+uint16_t flashbeats_state::p6_r()
{
return (m_eeprom->do_read() << 3);
}
-WRITE16_MEMBER(flashbeats_state::p6_w)
+void flashbeats_state::p6_w(uint16_t data)
{
m_eeprom->clk_write((data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
m_eeprom->di_write((data >> 2) & 1);
diff --git a/src/mame/drivers/flicker.cpp b/src/mame/drivers/flicker.cpp
index 7f246481e51..53b1360858f 100644
--- a/src/mame/drivers/flicker.cpp
+++ b/src/mame/drivers/flicker.cpp
@@ -67,10 +67,10 @@ public:
private:
virtual void driver_start() override;
- DECLARE_WRITE8_MEMBER(ram0_out) { m_ram0_output = data; }
- DECLARE_WRITE8_MEMBER(rom0_out) { m_rom0_output = data; }
- DECLARE_WRITE8_MEMBER(rom1_out) { m_rom1_output = data; }
- DECLARE_READ8_MEMBER(rom2_in);
+ void ram0_out(u8 data) { m_ram0_output = data; }
+ void rom0_out(u8 data) { m_rom0_output = data; }
+ void rom1_out(u8 data) { m_rom1_output = data; }
+ u8 rom2_in();
DECLARE_WRITE_LINE_MEMBER(cm_ram1_w);
DECLARE_WRITE_LINE_MEMBER(cm_ram2_w);
@@ -280,7 +280,7 @@ static INPUT_PORTS_START( flicker )
INPUT_PORTS_END
-READ8_MEMBER(flicker_state::rom2_in)
+u8 flicker_state::rom2_in()
{
return (m_switch.size() > m_mux_col) ? m_switch[m_mux_col]->read() : 0;
}
@@ -288,7 +288,7 @@ READ8_MEMBER(flicker_state::rom2_in)
WRITE_LINE_MEMBER(flicker_state::cm_ram1_w)
{
- static constexpr uint8_t led_digits[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 };
+ static constexpr u8 led_digits[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 };
static constexpr char const *const lamp_matrix[][4] = {
{ nullptr, "lamp_credit_lamp", "lamp_flippers", "lamp_special" },
{ "lamp_a_lamp", "lamp_b_lamp", "lamp_c_lamp", "lamp_d_lamp" },
diff --git a/src/mame/drivers/flipjack.cpp b/src/mame/drivers/flipjack.cpp
index efbddc493b6..9f84bca2350 100644
--- a/src/mame/drivers/flipjack.cpp
+++ b/src/mame/drivers/flipjack.cpp
@@ -132,11 +132,10 @@ private:
uint8_t m_bank = 0;
uint8_t m_layer = 0;
- DECLARE_WRITE8_MEMBER(sound_nmi_ack_w);
- DECLARE_WRITE8_MEMBER(soundlatch_w);
- DECLARE_WRITE8_MEMBER(bank_w);
- DECLARE_WRITE8_MEMBER(layer_w);
- DECLARE_READ8_MEMBER(soundlatch_r);
+ void sound_nmi_ack_w(uint8_t data);
+ void soundlatch_w(uint8_t data);
+ void bank_w(uint8_t data);
+ void layer_w(uint8_t data);
void portc_w(uint8_t data);
void flipjack_palette(palette_device &palette) const;
MC6845_UPDATE_ROW(update_row);
@@ -240,7 +239,7 @@ MC6845_UPDATE_ROW(flipjack_state::update_row)
***************************************************************************/
-WRITE8_MEMBER(flipjack_state::bank_w)
+void flipjack_state::bank_w(uint8_t data)
{
// d0-d1: tile bank
// d2: prg bank
@@ -250,7 +249,7 @@ WRITE8_MEMBER(flipjack_state::bank_w)
m_prgbank->set_entry(BIT(data, 2));
}
-WRITE8_MEMBER(flipjack_state::layer_w)
+void flipjack_state::layer_w(uint8_t data)
{
// d0: flip screen
// d1: enable playfield layer
@@ -260,14 +259,14 @@ WRITE8_MEMBER(flipjack_state::layer_w)
m_layer = data;
}
-WRITE8_MEMBER(flipjack_state::soundlatch_w)
+void flipjack_state::soundlatch_w(uint8_t data)
{
m_soundlatch->write(data);
if (BIT(data, 7))
m_audiocpu->set_input_line(0, ASSERT_LINE);
}
-WRITE8_MEMBER(flipjack_state::sound_nmi_ack_w)
+void flipjack_state::sound_nmi_ack_w(uint8_t data)
{
m_audiocpu->set_input_line(0, CLEAR_LINE);
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
diff --git a/src/mame/drivers/flower.cpp b/src/mame/drivers/flower.cpp
index 87ba97a729b..d97192a606f 100644
--- a/src/mame/drivers/flower.cpp
+++ b/src/mame/drivers/flower.cpp
@@ -114,12 +114,12 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
private:
- DECLARE_WRITE8_MEMBER(flipscreen_w);
- DECLARE_WRITE8_MEMBER(coin_counter_w);
- DECLARE_WRITE8_MEMBER(sound_command_w);
- DECLARE_WRITE8_MEMBER(audio_nmi_mask_w);
- DECLARE_WRITE8_MEMBER(bgvram_w);
- DECLARE_WRITE8_MEMBER(fgvram_w);
+ void flipscreen_w(uint8_t data);
+ void coin_counter_w(uint8_t data);
+ void sound_command_w(uint8_t data);
+ void audio_nmi_mask_w(uint8_t data);
+ void bgvram_w(offs_t offset, uint8_t data);
+ void fgvram_w(offs_t offset, uint8_t data);
INTERRUPT_GEN_MEMBER(master_vblank_irq);
INTERRUPT_GEN_MEMBER(slave_vblank_irq);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
@@ -304,36 +304,36 @@ uint32_t flower_state::screen_update( screen_device &screen, bitmap_ind16 &bitma
return 0;
}
-WRITE8_MEMBER(flower_state::flipscreen_w)
+void flower_state::flipscreen_w(uint8_t data)
{
flip_screen_set(data & 1);
m_flip_screen = BIT(data,0);
}
-WRITE8_MEMBER(flower_state::coin_counter_w)
+void flower_state::coin_counter_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0,data & 1);
}
-WRITE8_MEMBER(flower_state::sound_command_w)
+void flower_state::sound_command_w(uint8_t data)
{
m_soundlatch->write(data & 0xff);
if(m_audio_nmi_enable == true)
m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
-WRITE8_MEMBER(flower_state::audio_nmi_mask_w)
+void flower_state::audio_nmi_mask_w(uint8_t data)
{
m_audio_nmi_enable = BIT(data,0);
}
-WRITE8_MEMBER(flower_state::bgvram_w)
+void flower_state::bgvram_w(offs_t offset, uint8_t data)
{
m_bgvram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset & 0xff);
}
-WRITE8_MEMBER(flower_state::fgvram_w)
+void flower_state::fgvram_w(offs_t offset, uint8_t data)
{
m_fgvram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset & 0xff);
diff --git a/src/mame/drivers/flyball.cpp b/src/mame/drivers/flyball.cpp
index d0039a7c80d..efbd2583137 100644
--- a/src/mame/drivers/flyball.cpp
+++ b/src/mame/drivers/flyball.cpp
@@ -53,16 +53,16 @@ private:
TIMER_QUARTER
};
- DECLARE_READ8_MEMBER(input_r);
- DECLARE_READ8_MEMBER(scanline_r);
- DECLARE_READ8_MEMBER(potsense_r);
- DECLARE_WRITE8_MEMBER(potmask_w);
- DECLARE_WRITE8_MEMBER(pitcher_pic_w);
- DECLARE_WRITE8_MEMBER(ball_vert_w);
- DECLARE_WRITE8_MEMBER(ball_horz_w);
- DECLARE_WRITE8_MEMBER(pitcher_vert_w);
- DECLARE_WRITE8_MEMBER(pitcher_horz_w);
- DECLARE_WRITE8_MEMBER(misc_w);
+ uint8_t input_r();
+ uint8_t scanline_r();
+ uint8_t potsense_r();
+ void potmask_w(uint8_t data);
+ void pitcher_pic_w(uint8_t data);
+ void ball_vert_w(uint8_t data);
+ void ball_horz_w(uint8_t data);
+ void pitcher_vert_w(uint8_t data);
+ void pitcher_horz_w(uint8_t data);
+ void misc_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(lamp_w);
TILEMAP_MAPPER_MEMBER(get_memory_offset);
@@ -239,52 +239,52 @@ TIMER_CALLBACK_MEMBER(flyball_state::quarter_callback)
*************************************/
/* two physical buttons (start game and stop runner) share the same port bit */
-READ8_MEMBER(flyball_state::input_r)
+uint8_t flyball_state::input_r()
{
return ioport("IN0")->read() & ioport("IN1")->read();
}
-READ8_MEMBER(flyball_state::scanline_r)
+uint8_t flyball_state::scanline_r()
{
return m_screen->vpos() & 0x3f;
}
-READ8_MEMBER(flyball_state::potsense_r)
+uint8_t flyball_state::potsense_r()
{
return m_potsense & ~m_potmask;
}
-WRITE8_MEMBER(flyball_state::potmask_w)
+void flyball_state::potmask_w(uint8_t data)
{
m_potmask |= data & 0xf;
}
-WRITE8_MEMBER(flyball_state::pitcher_pic_w)
+void flyball_state::pitcher_pic_w(uint8_t data)
{
m_pitcher_pic = data & 0xf;
}
-WRITE8_MEMBER(flyball_state::ball_vert_w)
+void flyball_state::ball_vert_w(uint8_t data)
{
m_ball_vert = data;
}
-WRITE8_MEMBER(flyball_state::ball_horz_w)
+void flyball_state::ball_horz_w(uint8_t data)
{
m_ball_horz = data;
}
-WRITE8_MEMBER(flyball_state::pitcher_vert_w)
+void flyball_state::pitcher_vert_w(uint8_t data)
{
m_pitcher_vert = data;
}
-WRITE8_MEMBER(flyball_state::pitcher_horz_w)
+void flyball_state::pitcher_horz_w(uint8_t data)
{
m_pitcher_horz = data;
}
-WRITE8_MEMBER(flyball_state::misc_w)
+void flyball_state::misc_w(offs_t offset, uint8_t data)
{
// address and data lines passed through inverting buffers
m_outlatch->write_d0(~offset, ~data);
diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp
index 886772ca8f7..47e7fe73f48 100644
--- a/src/mame/drivers/force68k.cpp
+++ b/src/mame/drivers/force68k.cpp
@@ -166,11 +166,11 @@ public:
void fccpu1(machine_config &config);
private:
- DECLARE_READ16_MEMBER (bootvect_r);
- DECLARE_READ16_MEMBER (vme_a24_r);
- DECLARE_WRITE16_MEMBER (vme_a24_w);
- DECLARE_READ16_MEMBER (vme_a16_r);
- DECLARE_WRITE16_MEMBER (vme_a16_w);
+ uint16_t bootvect_r(offs_t offset);
+ uint16_t vme_a24_r();
+ void vme_a24_w(uint16_t data);
+ uint16_t vme_a16_r();
+ void vme_a16_w(uint16_t data);
virtual void machine_start () override;
virtual void machine_reset () override;
@@ -195,7 +195,7 @@ private:
// User EPROM/SRAM slot(s)
image_init_result force68k_load_cart(device_image_interface &image, generic_slot_device *slot);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER (exp1_load) { return force68k_load_cart(image, m_cart); }
- DECLARE_READ16_MEMBER (read16_rom);
+ uint16_t read16_rom(offs_t offset);
void force68k_mem(address_map &map);
@@ -381,9 +381,9 @@ void force68k_state::machine_start ()
{
m_usrrom = (uint16_t*)m_cart->get_rom_base();
#if 0 // This should be the correct way but produces odd and even bytes swapped
- m_maincpu->space(AS_PROGRAM).install_read_handler(0xa0000, 0xbffff, read16_delegate(*m_cart, FUNC(generic_slot_device::read16_rom)));
-#else // So we installs a custom very ineffecient handler for now until we understand hwp to solve the problem better
- m_maincpu->space(AS_PROGRAM).install_read_handler(0xa0000, 0xbffff, read16_delegate(*this, FUNC(force68k_state::read16_rom)));
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xa0000, 0xbffff, read16sm_delegate(*m_cart, FUNC(generic_slot_device::read16_rom)));
+#else // So we installs a custom very inefficient handler for now until we understand hop to solve the problem better
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xa0000, 0xbffff, read16sm_delegate(*this, FUNC(force68k_state::read16_rom)));
#endif
}
}
@@ -404,14 +404,14 @@ void force68k_state::machine_reset ()
m_brg->timer_enable((mc14411_device::timer_id) m_serial_p5->read(), true);
}
-/* A very ineffecient User cart emulation of two 8 bit sockets (odd and even) */
-READ16_MEMBER (force68k_state::read16_rom){
+/* A very inefficient User cart emulation of two 8 bit sockets (odd and even) */
+uint16_t force68k_state::read16_rom(offs_t offset){
offset = offset % m_cart->common_get_size("rom"); // Don't read outside buffer...
return ((m_usrrom [offset] << 8) & 0xff00) | ((m_usrrom [offset] >> 8) & 0x00ff);
}
/* Boot vector handler, the PCB hardwires the first 8 bytes from 0x80000 to 0x0 */
-READ16_MEMBER (force68k_state::bootvect_r){
+uint16_t force68k_state::bootvect_r(offs_t offset){
return m_sysrom [offset];
}
@@ -434,24 +434,24 @@ READ16_MEMBER (force68k_state::bootvect_r){
*/
/* Dummy VME access methods until the VME bus device is ready for use */
-READ16_MEMBER (force68k_state::vme_a24_r)
+uint16_t force68k_state::vme_a24_r()
{
LOG("%s\n", FUNCNAME);
return (uint16_t) 0;
}
-WRITE16_MEMBER (force68k_state::vme_a24_w)
+void force68k_state::vme_a24_w(uint16_t data)
{
LOG("%s\n", FUNCNAME);
}
-READ16_MEMBER (force68k_state::vme_a16_r)
+uint16_t force68k_state::vme_a16_r()
{
LOG("%s\n", FUNCNAME);
return (uint16_t) 0;
}
-WRITE16_MEMBER (force68k_state::vme_a16_w)
+void force68k_state::vme_a16_w(uint16_t data)
{
LOG("%s\n", FUNCNAME);
}
diff --git a/src/mame/drivers/fp200.cpp b/src/mame/drivers/fp200.cpp
index d42b396dcf6..bb8d027dc55 100644
--- a/src/mame/drivers/fp200.cpp
+++ b/src/mame/drivers/fp200.cpp
@@ -62,12 +62,12 @@ private:
// screen updates
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_READ8_MEMBER(fp200_io_r);
- DECLARE_WRITE8_MEMBER(fp200_io_w);
- DECLARE_READ8_MEMBER(fp200_lcd_r);
- DECLARE_WRITE8_MEMBER(fp200_lcd_w);
- DECLARE_READ8_MEMBER(fp200_keyb_r);
- DECLARE_WRITE8_MEMBER(fp200_keyb_w);
+ uint8_t fp200_io_r(offs_t offset);
+ void fp200_io_w(offs_t offset, uint8_t data);
+ uint8_t fp200_lcd_r(offs_t offset);
+ void fp200_lcd_w(offs_t offset, uint8_t data);
+ uint8_t fp200_keyb_r(offs_t offset);
+ void fp200_keyb_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(sod_w);
DECLARE_READ_LINE_MEMBER(sid_r);
@@ -229,7 +229,7 @@ uint8_t fp200_state::read_lcd_vram(uint16_t X, uint16_t Y)
return res;
}
-READ8_MEMBER(fp200_state::fp200_lcd_r)
+uint8_t fp200_state::fp200_lcd_r(offs_t offset)
{
uint8_t res;
@@ -298,7 +298,7 @@ void fp200_state::write_lcd_vram(uint16_t X, uint16_t Y,uint8_t data)
}
}
-WRITE8_MEMBER(fp200_state::fp200_lcd_w)
+void fp200_state::fp200_lcd_w(offs_t offset, uint8_t data)
{
switch(offset)
{
@@ -328,7 +328,7 @@ WRITE8_MEMBER(fp200_state::fp200_lcd_w)
}
}
-READ8_MEMBER(fp200_state::fp200_keyb_r)
+uint8_t fp200_state::fp200_keyb_r(offs_t offset)
{
const char *const keynames[16] = { "KEY0", "KEY1", "KEY2", "KEY3",
"KEY4", "KEY5", "KEY6", "KEY7",
@@ -347,7 +347,7 @@ READ8_MEMBER(fp200_state::fp200_keyb_r)
return res;
}
-WRITE8_MEMBER(fp200_state::fp200_keyb_w)
+void fp200_state::fp200_keyb_w(offs_t offset, uint8_t data)
{
if(offset == 1)
m_keyb_mux = data & 0xf;
@@ -373,7 +373,7 @@ SOD = 1
0x40 - 0x4f MT.RS-232C control
0x80 - 0x8f Printer (Centronics)
*/
-READ8_MEMBER(fp200_state::fp200_io_r)
+uint8_t fp200_state::fp200_io_r(offs_t offset)
{
uint8_t res;
@@ -387,8 +387,8 @@ READ8_MEMBER(fp200_state::fp200_io_r)
switch(offset & 0xf0)
{
//case 0x00: return;
- case 0x00: res = fp200_lcd_r(space, offset & 0xf); break;
- case 0x20: res = fp200_keyb_r(space, offset & 0xf); break;
+ case 0x00: res = fp200_lcd_r(offset & 0xf); break;
+ case 0x20: res = fp200_keyb_r(offset & 0xf); break;
default: res = 0; logerror("Unemulated I/O read %02x (%02x)\n",offset,m_io_type); break;
}
}
@@ -396,7 +396,7 @@ READ8_MEMBER(fp200_state::fp200_io_r)
return res;
}
-WRITE8_MEMBER(fp200_state::fp200_io_w)
+void fp200_state::fp200_io_w(offs_t offset, uint8_t data)
{
if(m_io_type == 0)
{
@@ -409,8 +409,8 @@ WRITE8_MEMBER(fp200_state::fp200_io_w)
{
switch(offset & 0xf0)
{
- case 0x00: fp200_lcd_w(space, offset & 0xf,data); break;
- case 0x20: fp200_keyb_w(space, offset & 0xf,data); break;
+ case 0x00: fp200_lcd_w(offset & 0xf,data); break;
+ case 0x20: fp200_keyb_w(offset & 0xf,data); break;
default:logerror("Unemulated I/O write %02x (%02x) <- %02x\n",offset,m_io_type,data); break;
}
}
diff --git a/src/mame/drivers/fp6000.cpp b/src/mame/drivers/fp6000.cpp
index 9a7403aba34..9b163d2f26f 100644
--- a/src/mame/drivers/fp6000.cpp
+++ b/src/mame/drivers/fp6000.cpp
@@ -97,7 +97,7 @@ private:
void port_0f_w(uint8_t data);
MC6845_UPDATE_ROW(crtc_update_row);
- DECLARE_READ16_MEMBER(unk_r);
+ uint16_t unk_r();
void centronics_busy_w(int state) { m_centronics_busy = state; };
void centronics_fault_w(int state) { m_centronics_fault = state; };
@@ -227,7 +227,7 @@ INPUT_PORTS_END
// VIDEO EMULATION
//**************************************************************************
-READ16_MEMBER(fp6000_state::unk_r)
+uint16_t fp6000_state::unk_r()
{
// 7-------
// -6------ ?
diff --git a/src/mame/drivers/fresh.cpp b/src/mame/drivers/fresh.cpp
index 7fa2c630b00..c0074390bf1 100644
--- a/src/mame/drivers/fresh.cpp
+++ b/src/mame/drivers/fresh.cpp
@@ -64,42 +64,42 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- DECLARE_WRITE16_MEMBER(fresh_bg_videoram_w);
- DECLARE_WRITE16_MEMBER(fresh_attr_videoram_w);
+ void fresh_bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void fresh_attr_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_fresh_bg_tile_info);
- DECLARE_WRITE16_MEMBER(fresh_bg_2_videoram_w);
- DECLARE_WRITE16_MEMBER(fresh_attr_2_videoram_w);
+ void fresh_bg_2_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void fresh_attr_2_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_fresh_bg_2_tile_info);
uint16_t m_d30000_value;
- DECLARE_WRITE16_MEMBER( d30000_write )
+ void d30000_write(uint16_t data)
{
m_d30000_value = data;
}
- DECLARE_WRITE16_MEMBER( c71000_write )
+ void c71000_write(uint16_t data)
{
logerror("c74000_write (scroll 0) %04x (m_d30000_value = %04x)\n", data, m_d30000_value);
}
- DECLARE_WRITE16_MEMBER( c74000_write )
+ void c74000_write(uint16_t data)
{
logerror("c74000_write (scroll 1) %04x (m_d30000_value = %04x)\n", data, m_d30000_value);
}
- DECLARE_WRITE16_MEMBER( c75000_write )
+ void c75000_write(uint16_t data)
{
logerror("c75000_write (scroll 2) %04x (m_d30000_value = %04x)\n", data, m_d30000_value);
}
- DECLARE_WRITE16_MEMBER( c76000_write )
+ void c76000_write(uint16_t data)
{
logerror("c76000_write (scroll 3) %04x (m_d30000_value = %04x)\n", data, m_d30000_value);
}
- DECLARE_READ16_MEMBER( unk_r )
+ uint16_t unk_r()
{
return machine().rand();
}
- DECLARE_READ16_MEMBER( unk2_r )
+ uint16_t unk2_r()
{
return 0x10;
}
@@ -120,13 +120,13 @@ TILE_GET_INFO_MEMBER(fresh_state::get_fresh_bg_tile_info)
}
-WRITE16_MEMBER(fresh_state::fresh_bg_videoram_w)
+void fresh_state::fresh_bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg_videoram[offset]);
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(fresh_state::fresh_attr_videoram_w)
+void fresh_state::fresh_attr_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_attr_videoram[offset]);
m_bg_tilemap->mark_tile_dirty(offset);
@@ -142,13 +142,13 @@ TILE_GET_INFO_MEMBER(fresh_state::get_fresh_bg_2_tile_info)
}
-WRITE16_MEMBER(fresh_state::fresh_bg_2_videoram_w)
+void fresh_state::fresh_bg_2_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg_2_videoram[offset]);
m_bg_2_tilemap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(fresh_state::fresh_attr_2_videoram_w)
+void fresh_state::fresh_attr_2_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_attr_2_videoram[offset]);
m_bg_2_tilemap->mark_tile_dirty(offset);
diff --git a/src/mame/drivers/ft68m.cpp b/src/mame/drivers/ft68m.cpp
index c106f7b2974..62fdc128e53 100644
--- a/src/mame/drivers/ft68m.cpp
+++ b/src/mame/drivers/ft68m.cpp
@@ -32,7 +32,7 @@ public:
void ft68m(machine_config &config);
private:
- DECLARE_READ16_MEMBER(switches_r);
+ uint16_t switches_r();
void mem_map(address_map &map);
@@ -44,7 +44,7 @@ private:
required_device<cpu_device> m_maincpu;
};
-READ16_MEMBER( ft68m_state::switches_r )
+uint16_t ft68m_state::switches_r()
{
return 0x7c00; // bypass self test
}
diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp
index 3c88dd69f37..24dee9ed14e 100644
--- a/src/mame/drivers/funkball.cpp
+++ b/src/mame/drivers/funkball.cpp
@@ -113,9 +113,9 @@ private:
required_device<address_map_bank_device> m_flashbank;
required_ioport_array<16> m_inputs;
- DECLARE_WRITE32_MEMBER( flash_w );
-// DECLARE_WRITE8_MEMBER( bios_ram_w );
- DECLARE_READ8_MEMBER( in_r );
+ void flash_w (offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+// void bios_ram_w(offs_t offset, uint8_t data);
+ uint8_t in_r(offs_t offset);
uint8_t funkball_config_reg_r();
void funkball_config_reg_w(uint8_t data);
@@ -131,11 +131,11 @@ private:
uint32_t init_enable;
} m_voodoo_pci_regs;
- DECLARE_READ32_MEMBER(biu_ctrl_r);
- DECLARE_WRITE32_MEMBER(biu_ctrl_w);
- DECLARE_WRITE8_MEMBER(bios_ram_w);
- DECLARE_READ8_MEMBER(io20_r);
- DECLARE_WRITE8_MEMBER(io20_w);
+ uint32_t biu_ctrl_r(offs_t offset);
+ void biu_ctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void bios_ram_w(offs_t offset, uint8_t data);
+ uint8_t io20_r(offs_t offset);
+ void io20_w(offs_t offset, uint8_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
void flashbank_map(address_map &map);
@@ -229,7 +229,7 @@ void funkball_state::funkball_config_reg_w(uint8_t data)
m_funkball_config_regs[m_funkball_config_reg_sel] = data;
}
-READ8_MEMBER(funkball_state::io20_r)
+uint8_t funkball_state::io20_r(offs_t offset)
{
uint8_t r = 0;
@@ -244,7 +244,7 @@ READ8_MEMBER(funkball_state::io20_r)
return r;
}
-WRITE8_MEMBER(funkball_state::io20_w)
+void funkball_state::io20_w(offs_t offset, uint8_t data)
{
// 0x22, 0x23, Cyrix configuration registers
if (offset == 0x00)
@@ -257,7 +257,7 @@ WRITE8_MEMBER(funkball_state::io20_w)
}
}
-WRITE32_MEMBER(funkball_state::flash_w)
+void funkball_state::flash_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(&flashbank_addr);
int tempbank = (flashbank_addr & 0x7fff) | ((flashbank_addr & 0x00800000) >> 8);
@@ -268,7 +268,7 @@ WRITE32_MEMBER(funkball_state::flash_w)
}
-READ32_MEMBER(funkball_state::biu_ctrl_r)
+uint32_t funkball_state::biu_ctrl_r(offs_t offset)
{
if (offset == 0)
{
@@ -277,7 +277,7 @@ READ32_MEMBER(funkball_state::biu_ctrl_r)
return m_biu_ctrl_reg[offset];
}
-WRITE32_MEMBER(funkball_state::biu_ctrl_w)
+void funkball_state::biu_ctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
//osd_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask);
COMBINE_DATA(m_biu_ctrl_reg + offset);
@@ -297,7 +297,7 @@ WRITE32_MEMBER(funkball_state::biu_ctrl_w)
}
}
-WRITE8_MEMBER(funkball_state::bios_ram_w)
+void funkball_state::bios_ram_w(offs_t offset, uint8_t data)
{
if(m_biu_ctrl_reg[0x0c/4] & (2 << ((offset & 0x4000)>>14)*4)) // memory is write-able
{
@@ -305,7 +305,7 @@ WRITE8_MEMBER(funkball_state::bios_ram_w)
}
}
-READ8_MEMBER( funkball_state::in_r )
+uint8_t funkball_state::in_r(offs_t offset)
{
return m_inputs[offset]->read();
}
diff --git a/src/mame/drivers/funtech.cpp b/src/mame/drivers/funtech.cpp
index c2ecd4811bf..6647f71ec8f 100644
--- a/src/mame/drivers/funtech.cpp
+++ b/src/mame/drivers/funtech.cpp
@@ -72,17 +72,17 @@ private:
INTERRUPT_GEN_MEMBER(vblank_interrupt);
- DECLARE_WRITE8_MEMBER(lamps_w);
- DECLARE_WRITE8_MEMBER(coins_w);
- DECLARE_WRITE8_MEMBER(vreg_w);
+ void lamps_w(uint8_t data);
+ void coins_w(uint8_t data);
+ void vreg_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(fgram_w);
+ void fgram_w(offs_t offset, uint8_t data);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
tilemap_t *m_reel_tilemap[3];
- template<uint8_t Reel> DECLARE_WRITE8_MEMBER(reel_ram_w);
+ template<uint8_t Reel> void reel_ram_w(offs_t offset, uint8_t data);
template<uint8_t Reel> TILE_GET_INFO_MEMBER(get_reel_tile_info);
@@ -122,7 +122,7 @@ TILE_GET_INFO_MEMBER(fun_tech_corp_state::get_reel_tile_info)
}
template<uint8_t Reel>
-WRITE8_MEMBER(fun_tech_corp_state::reel_ram_w)
+void fun_tech_corp_state::reel_ram_w(offs_t offset, uint8_t data)
{
m_reel_ram[Reel][offset] = data;
m_reel_tilemap[Reel]->mark_tile_dirty(offset);
@@ -143,7 +143,7 @@ void fun_tech_corp_state::video_start()
}
-WRITE8_MEMBER(fun_tech_corp_state::fgram_w)
+void fun_tech_corp_state::fgram_w(offs_t offset, uint8_t data)
{
m_fgram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset&0x7ff);
@@ -223,13 +223,13 @@ void fun_tech_corp_state::funtech_map(address_map &map)
}
-WRITE8_MEMBER(fun_tech_corp_state::lamps_w)
+void fun_tech_corp_state::lamps_w(uint8_t data)
{
for (int i = 0; i < 8; i++)
m_lamps[i] = BIT(data, i);
}
-WRITE8_MEMBER(fun_tech_corp_state::coins_w)
+void fun_tech_corp_state::coins_w(uint8_t data)
{
if (data & 0x01) printf("coins_w %02x\n", data);
@@ -253,7 +253,7 @@ WRITE8_MEMBER(fun_tech_corp_state::coins_w)
// 02 = used when hopper is used (coin out counter?)
}
-WRITE8_MEMBER(fun_tech_corp_state::vreg_w)
+void fun_tech_corp_state::vreg_w(uint8_t data)
{
if (data & 0xb2) printf("vreg_w %02x\n", data);
diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp
index c399dbb34c6..0ee6c242e44 100644
--- a/src/mame/drivers/funworld.cpp
+++ b/src/mame/drivers/funworld.cpp
@@ -732,7 +732,7 @@ void funworld_state::funworld_map(address_map &map)
static uint8_t funquiz_question_bank = 0x80;
-READ8_MEMBER(funworld_state::questions_r)
+uint8_t funworld_state::questions_r(offs_t offset)
{
uint8_t* quiz = memregion("questions")->base();
int extraoffset = ((funquiz_question_bank & 0x1f) * 0x8000);
@@ -743,7 +743,7 @@ READ8_MEMBER(funworld_state::questions_r)
return quiz[offset + extraoffset];
}
-WRITE8_MEMBER(funworld_state::question_bank_w)
+void funworld_state::question_bank_w(uint8_t data)
{
// printf("question bank write %02x\n", data);
funquiz_question_bank = data;
@@ -803,7 +803,7 @@ void funworld_state::cuoreuno_map(address_map &map)
}
-READ8_MEMBER(chinatow_state::chinatow_r_32f0)
+uint8_t chinatow_state::chinatow_r_32f0(offs_t offset)
{
logerror("read from 0x32f0 at offset %02X\n", offset);
switch (offset)
@@ -3195,11 +3195,11 @@ void funworld_state::fw_brick_2(machine_config &config)
NVRAM(config, "nvram1", nvram_device::DEFAULT_ALL_0);
}
-READ8_MEMBER(royalcrdf_state::royalcrdf_opcode_r)
+uint8_t royalcrdf_state::royalcrdf_opcode_r(offs_t offset)
{
// address-based data bitswap; 4 address bits are involved, but only
// 5 different bitswaps exist, with clear regularities, so the
- // hardware is probably selecting the appropiate one by
+ // hardware is probably selecting the appropriate one by
// applying passive logic to the address bits; we encode it
// indexed by all the involved address bits instead. A notable fact is that
// all the permutations in royalcrdf & multiwin are odd-parity ones,
@@ -3276,7 +3276,7 @@ void royalcrdf_state::royalcrdf(machine_config &config)
}
-READ8_MEMBER(multiwin_state::multiwin_opcode_r)
+uint8_t multiwin_state::multiwin_opcode_r(offs_t offset)
{
// same general encryption scheme than the one used by the EVONA Royald Card set;
// 4 address bits determine which bitswap+xor is applied to the opcodes; in this case,
@@ -3340,12 +3340,12 @@ public:
private:
cpu_device* _maincpu {};
- DECLARE_READ8_MEMBER(powercrd_opcode_r);
+ uint8_t powercrd_opcode_r(offs_t offset);
void powercrd_opcodes_map(address_map& map);
};
-READ8_MEMBER(powercrd_state::powercrd_opcode_r)
+uint8_t powercrd_state::powercrd_opcode_r(offs_t offset)
{
// encryption controlled by the lower two bits of the address; no clear structure is
// seen in the tables, so it looks like a lookup into randomly or pseudorandomly
@@ -3458,12 +3458,12 @@ public:
private:
cpu_device* _maincpu {};
- DECLARE_READ8_MEMBER(megacard_opcode_r);
+ uint8_t megacard_opcode_r(offs_t offset);
void megacard_opcodes_map(address_map& map);
};
-READ8_MEMBER(megacard_state::megacard_opcode_r)
+uint8_t megacard_state::megacard_opcode_r(offs_t offset)
{
// all opcodes in the [c000, fc80) range are believed to be covered by these tables;
// errors could be lurking in the least used opcodes
@@ -3573,12 +3573,12 @@ public:
private:
cpu_device* _maincpu {};
- DECLARE_READ8_MEMBER(jokercrd_opcode_r);
+ uint8_t jokercrd_opcode_r(offs_t offset);
void jokercrd_opcodes_map(address_map& map);
};
-READ8_MEMBER(jokercrd_state::jokercrd_opcode_r)
+uint8_t jokercrd_state::jokercrd_opcode_r(offs_t offset)
{
// even when errors could be lurking in the least used opcodes,
// all of them in the [8050,b369) & [c000, f063) ranges are believed
diff --git a/src/mame/drivers/g627.cpp b/src/mame/drivers/g627.cpp
index 44f262ef5c1..493266b5b4c 100644
--- a/src/mame/drivers/g627.cpp
+++ b/src/mame/drivers/g627.cpp
@@ -70,8 +70,8 @@ private:
uint8_t porta_r();
uint8_t portb_r();
void portc_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(disp_w);
- DECLARE_WRITE8_MEMBER(lamp_w);
+ void disp_w(offs_t offset, uint8_t data);
+ void lamp_w(offs_t offset, uint8_t data);
void io_map(address_map &map);
void mem_map(address_map &map);
uint8_t m_seg[6];
@@ -239,7 +239,7 @@ void g627_state::portc_w(uint8_t data)
}
// save segments until we can write the digits
-WRITE8_MEMBER( g627_state::disp_w )
+void g627_state::disp_w(offs_t offset, uint8_t data)
{
static const uint8_t patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448
offset <<= 1;
@@ -248,7 +248,7 @@ WRITE8_MEMBER( g627_state::disp_w )
}
// lamps and solenoids
-WRITE8_MEMBER( g627_state::lamp_w )
+void g627_state::lamp_w(offs_t offset, uint8_t data)
{
/* offset 0 together with m_portc activates the lamps.
offset 1 and 2 are solenoids.
diff --git a/src/mame/drivers/gal3.cpp b/src/mame/drivers/gal3.cpp
index 8318f0c5141..b7938dc399c 100644
--- a/src/mame/drivers/gal3.cpp
+++ b/src/mame/drivers/gal3.cpp
@@ -173,14 +173,14 @@ private:
uint32_t m_led_mst;
uint32_t m_led_slv;
- DECLARE_READ32_MEMBER(led_mst_r);
- DECLARE_WRITE32_MEMBER(led_mst_w);
- DECLARE_READ32_MEMBER(led_slv_r);
- DECLARE_WRITE32_MEMBER(led_slv_w);
- template<int Screen> DECLARE_READ16_MEMBER(video_enable_r);
- template<int Screen> DECLARE_WRITE16_MEMBER(video_enable_w);
- DECLARE_READ16_MEMBER(rso_r);
- DECLARE_WRITE16_MEMBER(rso_w);
+ uint32_t led_mst_r();
+ void led_mst_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t led_slv_r();
+ void led_slv_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ template<int Screen> uint16_t video_enable_r();
+ template<int Screen> void video_enable_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t rso_r(offs_t offset);
+ void rso_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
// using ind16 for now because namco_c355spr_device::zdrawgfxzoom does not support rgb32, will probably need to be improved for LD use
uint32_t screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -288,39 +288,39 @@ uint32_t gal3_state::screen_update_right(screen_device &screen, bitmap_ind16 &bi
/***************************************************************************************/
-READ32_MEMBER(gal3_state::led_mst_r)
+uint32_t gal3_state::led_mst_r()
{
return m_led_mst;
}
-WRITE32_MEMBER(gal3_state::led_mst_w)
+void gal3_state::led_mst_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(&m_led_mst);
}
-READ32_MEMBER(gal3_state::led_slv_r)
+uint32_t gal3_state::led_slv_r()
{
return m_led_slv;
}
-WRITE32_MEMBER(gal3_state::led_slv_w)
+void gal3_state::led_slv_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(&m_led_slv);
}
template<int Screen>
-READ16_MEMBER(gal3_state::video_enable_r)
+uint16_t gal3_state::video_enable_r()
{
return m_video_enable[Screen];
}
template<int Screen>
-WRITE16_MEMBER(gal3_state::video_enable_w)
+void gal3_state::video_enable_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_video_enable[Screen]); // 0xff53, instead of 0x40 in namcos21
}
-READ16_MEMBER(gal3_state::rso_r)
+uint16_t gal3_state::rso_r(offs_t offset)
{
/*store $5555 @$0046, and readback @$0000
read @$0144 and store at A6_21e & A4_5c
@@ -329,7 +329,7 @@ READ16_MEMBER(gal3_state::rso_r)
return m_rso_shared_ram[offset];
}
-WRITE16_MEMBER(gal3_state::rso_w)
+void gal3_state::rso_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_rso_shared_ram[offset]);
}
diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp
index 13c2bbdae48..eec3429f311 100644
--- a/src/mame/drivers/galaxi.cpp
+++ b/src/mame/drivers/galaxi.cpp
@@ -109,14 +109,14 @@ private:
int m_ticket;
uint16_t m_out;
- DECLARE_WRITE16_MEMBER(bg1_w);
- DECLARE_WRITE16_MEMBER(bg2_w);
- DECLARE_WRITE16_MEMBER(bg3_w);
- DECLARE_WRITE16_MEMBER(bg4_w);
- DECLARE_WRITE16_MEMBER(fg_w);
- DECLARE_WRITE16_MEMBER(_500000_w);
- DECLARE_WRITE16_MEMBER(_500002_w);
- DECLARE_WRITE16_MEMBER(_500004_w);
+ void bg1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void bg2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void bg3_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void bg4_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void fg_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void _500000_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void _500002_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void _500004_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
@@ -166,31 +166,31 @@ TILE_GET_INFO_MEMBER(galaxi_state::get_fg_tile_info)
tileinfo.set(1, code, 0x20 + (code >> 12), 0);
}
-WRITE16_MEMBER(galaxi_state::bg1_w)
+void galaxi_state::bg1_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg1_ram[offset]);
m_bg1_tmap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(galaxi_state::bg2_w)
+void galaxi_state::bg2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg2_ram[offset]);
m_bg2_tmap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(galaxi_state::bg3_w)
+void galaxi_state::bg3_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg3_ram[offset]);
m_bg3_tmap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(galaxi_state::bg4_w)
+void galaxi_state::bg4_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg4_ram[offset]);
m_bg4_tmap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER(galaxi_state::fg_w)
+void galaxi_state::fg_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_fg_ram[offset]);
m_fg_tmap->mark_tile_dirty(offset);
@@ -254,19 +254,19 @@ void galaxi_state::show_out( )
// popmessage("%04x", m_out);
}
-WRITE16_MEMBER(galaxi_state::_500000_w)
+void galaxi_state::_500000_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg3_yscroll);
show_out();
}
-WRITE16_MEMBER(galaxi_state::_500002_w)
+void galaxi_state::_500002_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg3_xscroll);
show_out();
}
-WRITE16_MEMBER(galaxi_state::_500004_w)
+void galaxi_state::_500004_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
{
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index caafede0388..76e1def1239 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -5898,6 +5898,37 @@ static INPUT_PORTS_START( victoryc )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
+static INPUT_PORTS_START( highroll )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
/*************************************
*
@@ -6241,6 +6272,12 @@ void gmgalax_state::gmgalax(machine_config &config)
m_palette->set_init(FUNC(gmgalax_state::galaxian_palette));
}
+void galaxian_state::highroll(machine_config &config)
+{
+ galaxian(config);
+
+ m_maincpu->set_addrmap(AS_OPCODES, &galaxian_state::moonqsr_decrypted_opcodes_map);
+}
void galaxian_state::mooncrst(machine_config &config)
{
@@ -7068,6 +7105,40 @@ void galaxian_state::init_galaxian()
common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
}
+void galaxian_state::init_highroll() // possibly still something wrong?
+{
+ init_galaxian();
+
+ uint8_t *rom = memregion("maincpu")->base();
+
+ for (int i = 0; i < 0x4000; i++)
+ {
+ uint8_t x = rom[i];
+
+ switch(i & 0x03)
+ {
+ case 0x000: x = bitswap<8>(x, 1, 6, 7, 4, 5, 2, 3, 0); break;
+ case 0x001: x = bitswap<8>(x, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ case 0x002: x = bitswap<8>(x, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x003: x = bitswap<8>(x, 1, 6, 3, 4, 5, 2, 7, 0); break;
+ }
+
+ m_decrypted_opcodes[i] = x;
+ }
+
+ for (int i = 0; i < 0x4000; i++)
+ {
+ uint8_t x = rom[i];
+
+ switch(i & 0x01)
+ {
+ case 0x000: x = bitswap<8>(x, 3, 6, 1, 4, 5, 2, 7, 0); break;
+ case 0x001: x = bitswap<8>(x, 1, 6, 7, 4, 3, 2, 5, 0); break;
+ }
+
+ rom[i] = x;
+ }
+}
void galaxian_state::init_nolock()
{
@@ -8458,6 +8529,43 @@ ROM_START( tst_galx )
ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) )
ROM_END
+/*
+Dumper's notes for High Roller
+
+Sub - Sub-board
+CPU - Main PCB Sega 96753-P (79.12.20 0758A)
+Hardware is very much like Galaxian
+The CPU is a custom (potted) processor. A little like the
+Sega Customs used on system 18 PCBs, etc (except it is not
+based on a 68000).
+
+Due to poor potting, I was able to expose the custom. The
+battery in the custom on my PCB is flat and as a result my
+PCB does not work. Hence the unknown label of this archive.
+
+Custom CPU contains: Z80 CPU
+ HM4334P-4 SRAMs (x2)
+ PAL16L88CN
+ HCF4040
+ LM393
+ misc TTLs, LS00, LS32, LS138
+ misc discrete components
+ battery (for the SRAMs)
+*/
+ROM_START( highroll ) // even if the PCB is by Sega, copyright in game is 'Kne Wla'?
+ ROM_REGION( 0x4000, "maincpu", 0 )
+ ROM_LOAD( "epr66", 0x0000, 0x1000, CRC(508ace44) SHA1(c7d830cf2ca0011c6e218240c46aa094c29ae083) )
+ ROM_LOAD( "epr65", 0x1000, 0x1000, CRC(727129c3) SHA1(d4c92690b8f4f280f78eadd9290b2a349c4f9d0d) )
+ ROM_LOAD( "epr64", 0x2000, 0x1000, CRC(f70ded8f) SHA1(a41f2b96f3ab93d1c22f09caa21c22258f12bc6b) )
+ ROM_LOAD( "epr63", 0x3000, 0x1000, CRC(b0d2ec11) SHA1(1c226684fd869781a67bc533519c1db25d313fa3) )
+
+ ROM_REGION( 0x2000, "gfx1", 0 )
+ ROM_LOAD( "epra", 0x0000, 0x1000, CRC(7033c767) SHA1(df0adceb067ed158b9fa182b110e85e58ea851c5) )
+ ROM_LOAD( "eprb", 0x1000, 0x1000, CRC(82cf2863) SHA1(4f7e94b43ee529b3ad7fd52f9adb742ca8690385) )
+
+ ROM_REGION( 0x0020, "proms", 0 )
+ ROM_LOAD( "pr50", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) )
+ROM_END
ROM_START( blkhole )
ROM_REGION( 0x10000, "maincpu", 0 )
@@ -13004,6 +13112,7 @@ GAME( 1980, luctoday, 0, galaxian, luctoday, galaxian_state, init_
GAME( 19??, chewing, luctoday, galaxian, luctoday, galaxian_state, init_galaxian, ROT90, "<unknown>", "Chewing Gum", MACHINE_SUPPORTS_SAVE )
GAME( 1982, catacomb, 0, galaxian, catacomb, galaxian_state, init_galaxian, ROT90, "MTM Games", "Catacomb", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
GAME( 19??, omegab, theend, galaxian, omegab, galaxian_state, init_galaxian, ROT270, "bootleg?", "Omega (bootleg?)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, highroll, 0, highroll, highroll, galaxian_state, init_highroll, ROT90, "bootleg?", "High Roller", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // cards GFX messed up, no inputs, terrible sound, decryption needs verifying
// Basic hardware + extra RAM
GAME( 1982, victoryc, 0, victoryc, victoryc, galaxian_state, init_victoryc, ROT270, "Comsoft", "Victory (Comsoft)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/galgame.cpp b/src/mame/drivers/galgame.cpp
index ad9a4f604be..cbfb4a7c6be 100644
--- a/src/mame/drivers/galgame.cpp
+++ b/src/mame/drivers/galgame.cpp
@@ -49,13 +49,13 @@ private:
int m_point_work_list_index;
int m_point_display_list_index;
int m_interrupt;
- DECLARE_READ16_MEMBER(ke_r);
- DECLARE_WRITE16_MEMBER(ke_w);
- DECLARE_READ16_MEMBER(x_r);
- DECLARE_WRITE16_MEMBER(x_w);
- DECLARE_READ16_MEMBER(y_r);
- DECLARE_WRITE16_MEMBER(y_w);
- DECLARE_WRITE16_MEMBER(clk_w);
+ uint16_t ke_r(offs_t offset);
+ void ke_w(offs_t offset, uint16_t data);
+ uint16_t x_r();
+ void x_w(uint16_t data);
+ uint16_t y_r();
+ void y_w(uint16_t data);
+ void clk_w(uint16_t data);
virtual void machine_reset() override;
uint32_t screen_update_galaxygame(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(galaxygame_irq);
@@ -67,11 +67,11 @@ private:
/*************************************
*
- * KE11 Extended Artithmetic Element
+ * KE11 Extended Arithmetic Element
*
*************************************/
-READ16_MEMBER(galaxygame_state::ke_r)
+uint16_t galaxygame_state::ke_r(offs_t offset)
{
uint16_t ret;
@@ -97,7 +97,7 @@ READ16_MEMBER(galaxygame_state::ke_r)
return ret;
}
-WRITE16_MEMBER(galaxygame_state::ke_w)
+void galaxygame_state::ke_w(offs_t offset, uint16_t data)
{
switch( offset )
{
@@ -192,22 +192,22 @@ uint32_t galaxygame_state::screen_update_galaxygame(screen_device &screen, bitma
return 0;
}
-READ16_MEMBER(galaxygame_state::x_r)
+uint16_t galaxygame_state::x_r()
{
return m_x;
}
-WRITE16_MEMBER(galaxygame_state::x_w)
+void galaxygame_state::x_w(uint16_t data)
{
m_x = data;
}
-READ16_MEMBER(galaxygame_state::y_r)
+uint16_t galaxygame_state::y_r()
{
return m_y;
}
-WRITE16_MEMBER(galaxygame_state::y_w)
+void galaxygame_state::y_w(uint16_t data)
{
m_y = data;
if ( data == 0x0101 )
@@ -286,7 +286,7 @@ INPUT_PORTS_END
*
*************************************/
-WRITE16_MEMBER(galaxygame_state::clk_w)
+void galaxygame_state::clk_w(uint16_t data)
{
m_clk = data;
}
diff --git a/src/mame/drivers/galpani3.cpp b/src/mame/drivers/galpani3.cpp
index aa1d2cc619f..0ffb68cd319 100644
--- a/src/mame/drivers/galpani3.cpp
+++ b/src/mame/drivers/galpani3.cpp
@@ -111,10 +111,10 @@ private:
std::unique_ptr<uint32_t[]> m_spriteram32;
std::unique_ptr<uint32_t[]> m_spc_regs;
- DECLARE_WRITE16_MEMBER(galpani3_suprnova_sprite32_w);
- DECLARE_WRITE16_MEMBER(galpani3_suprnova_sprite32regs_w);
- DECLARE_WRITE16_MEMBER(galpani3_priority_buffer_scrollx_w);
- DECLARE_WRITE16_MEMBER(galpani3_priority_buffer_scrolly_w);
+ void galpani3_suprnova_sprite32_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void galpani3_suprnova_sprite32regs_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void galpani3_priority_buffer_scrollx_w(uint16_t data);
+ void galpani3_priority_buffer_scrolly_w(uint16_t data);
virtual void video_start() override;
@@ -386,26 +386,26 @@ static INPUT_PORTS_START( galpani3 )
INPUT_PORTS_END
-WRITE16_MEMBER(galpani3_state::galpani3_suprnova_sprite32_w)
+void galpani3_state::galpani3_suprnova_sprite32_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_spriteram[offset]);
offset>>=1;
m_spriteram32[offset]=(m_spriteram[offset*2+1]<<16) | (m_spriteram[offset*2]);
}
-WRITE16_MEMBER(galpani3_state::galpani3_suprnova_sprite32regs_w)
+void galpani3_state::galpani3_suprnova_sprite32regs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sprregs[offset]);
offset>>=1;
m_spc_regs[offset]=(m_sprregs[offset*2+1]<<16) | (m_sprregs[offset*2]);
}
-WRITE16_MEMBER(galpani3_state::galpani3_priority_buffer_scrollx_w)
+void galpani3_state::galpani3_priority_buffer_scrollx_w(uint16_t data)
{
m_priority_buffer_scrollx = data;
}
-WRITE16_MEMBER(galpani3_state::galpani3_priority_buffer_scrolly_w)
+void galpani3_state::galpani3_priority_buffer_scrolly_w(uint16_t data)
{
m_priority_buffer_scrolly = data;
}
diff --git a/src/mame/drivers/gambl186.cpp b/src/mame/drivers/gambl186.cpp
index 504a270e08f..c79092e4957 100644
--- a/src/mame/drivers/gambl186.cpp
+++ b/src/mame/drivers/gambl186.cpp
@@ -78,10 +78,10 @@ private:
bool m_comms_ack;
virtual void machine_start() override;
- DECLARE_READ16_MEMBER(comms_r);
- DECLARE_WRITE16_MEMBER(comms_w);
- DECLARE_WRITE16_MEMBER(data_bank_w);
- DECLARE_WRITE16_MEMBER(upd_w);
+ uint16_t comms_r(offs_t offset, uint16_t mem_mask = ~0);
+ void comms_w(offs_t offset, uint16_t data);
+ void data_bank_w(uint16_t data);
+ void upd_w(uint16_t data);
void gambl186_io(address_map &map);
void gambl186_map(address_map &map);
};
@@ -93,7 +93,7 @@ void gambl186_state::machine_start()
static const uint8_t password[] = {5, 2, 0, 3, 0, 0, 2, 4, 5, 6, 0x16};
-READ16_MEMBER(gambl186_state::comms_r)
+uint16_t gambl186_state::comms_r(offs_t offset, uint16_t mem_mask)
{
uint16_t retval = 0;
@@ -279,7 +279,7 @@ READ16_MEMBER(gambl186_state::comms_r)
return retval;
}
-WRITE16_MEMBER(gambl186_state::comms_w)
+void gambl186_state::comms_w(offs_t offset, uint16_t data)
{
if (offset == 0)
{
@@ -324,7 +324,7 @@ WRITE16_MEMBER(gambl186_state::comms_w)
}
}
-WRITE16_MEMBER( gambl186_state::data_bank_w)
+void gambl186_state::data_bank_w(uint16_t data)
{
membank("data_bank")->set_entry(data & 3);
if(data & 0xfffc)
@@ -347,14 +347,14 @@ WRITE16_MEMBER( gambl186_state::data_bank_w)
504h: e000
504h: 2000
*/
-WRITE16_MEMBER(gambl186_state::upd_w)
+void gambl186_state::upd_w(uint16_t data)
{
//// FIXME
// m_upd7759->reset_w(0);
// m_upd7759->reset_w(1);
-// if (ACCESSING_BITS_0_7) m_upd7759->port_w(space, 0, data & 0xff);
-// if (ACCESSING_BITS_8_15) m_upd7759->port_w(space, 0, (data >> 8) & 0xff);
+// if (ACCESSING_BITS_0_7) m_upd7759->port_w(data & 0xff);
+// if (ACCESSING_BITS_8_15) m_upd7759->port_w((data >> 8) & 0xff);
data = (data >> 8);
popmessage("sample index: %02x", data);
diff --git a/src/mame/drivers/gamecstl.cpp b/src/mame/drivers/gamecstl.cpp
index 325a78878b3..0207bd9dd2b 100644
--- a/src/mame/drivers/gamecstl.cpp
+++ b/src/mame/drivers/gamecstl.cpp
@@ -95,9 +95,9 @@ private:
uint8_t m_mtxc_config_reg[256];
uint8_t m_piix4_config_reg[4][256];
- DECLARE_WRITE32_MEMBER(pnp_config_w);
- DECLARE_WRITE32_MEMBER(pnp_data_w);
- DECLARE_WRITE32_MEMBER(bios_ram_w);
+ void pnp_config_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void pnp_data_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void bios_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -323,7 +323,7 @@ void gamecstl_state::intel82371ab_pci_w(int function, int reg, uint32_t data, ui
}
// ISA Plug-n-Play
-WRITE32_MEMBER(gamecstl_state::pnp_config_w)
+void gamecstl_state::pnp_config_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (ACCESSING_BITS_8_15)
{
@@ -331,7 +331,7 @@ WRITE32_MEMBER(gamecstl_state::pnp_config_w)
}
}
-WRITE32_MEMBER(gamecstl_state::pnp_data_w)
+void gamecstl_state::pnp_data_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (ACCESSING_BITS_8_15)
{
@@ -341,7 +341,7 @@ WRITE32_MEMBER(gamecstl_state::pnp_data_w)
-WRITE32_MEMBER(gamecstl_state::bios_ram_w)
+void gamecstl_state::bios_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (m_mtxc_config_reg[0x59] & 0x20) // write to RAM if this region is write-enabled
{
diff --git a/src/mame/drivers/gamemasters.cpp b/src/mame/drivers/gamemasters.cpp
index 551439970e3..26f84f87785 100644
--- a/src/mame/drivers/gamemasters.cpp
+++ b/src/mame/drivers/gamemasters.cpp
@@ -29,10 +29,10 @@ public:
void gmsshoot(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(output_1100);
- DECLARE_WRITE8_MEMBER(output_1300);
- DECLARE_WRITE8_MEMBER(output_1520);
- DECLARE_WRITE8_MEMBER(output_1540);
+ void output_1100(uint8_t data);
+ void output_1300(uint8_t data);
+ void output_1520(uint8_t data);
+ void output_1540(offs_t offset, uint8_t data);
void mem_map(address_map &map);
@@ -40,23 +40,23 @@ private:
};
-WRITE8_MEMBER(gamemasters_state::output_1100)
+void gamemasters_state::output_1100(uint8_t data)
{
// IRQ ack?
logerror("%s: Writing %02X to 1100\n", machine().describe_context(), data);
}
-WRITE8_MEMBER(gamemasters_state::output_1300)
+void gamemasters_state::output_1300(uint8_t data)
{
logerror("%s: Writing %02X to 1300\n", machine().describe_context(), data);
}
-WRITE8_MEMBER(gamemasters_state::output_1520)
+void gamemasters_state::output_1520(uint8_t data)
{
logerror("%s: Writing %02X to 1520\n", machine().describe_context(), data);
}
-WRITE8_MEMBER(gamemasters_state::output_1540)
+void gamemasters_state::output_1540(offs_t offset, uint8_t data)
{
logerror("%s: Writing %02X to 1540 + %X\n", machine().describe_context(), data, offset);
}
diff --git a/src/mame/drivers/gamtor.cpp b/src/mame/drivers/gamtor.cpp
index 02a31fad0fd..ab2cbac6707 100644
--- a/src/mame/drivers/gamtor.cpp
+++ b/src/mame/drivers/gamtor.cpp
@@ -47,12 +47,12 @@ public:
private:
void gaminator_map(address_map &map);
- DECLARE_WRITE32_MEMBER(gamtor_unk_w);
+ void gamtor_unk_w(uint32_t data);
required_device<cpu_device> m_maincpu;
};
-WRITE32_MEMBER(gaminator_state::gamtor_unk_w)
+void gaminator_state::gamtor_unk_w(uint32_t data)
{
}
diff --git a/src/mame/drivers/gei.cpp b/src/mame/drivers/gei.cpp
index 4cbab224e3a..dafcc0baa18 100644
--- a/src/mame/drivers/gei.cpp
+++ b/src/mame/drivers/gei.cpp
@@ -117,14 +117,14 @@ public:
private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE8_MEMBER(gei_drawctrl_w);
- DECLARE_WRITE8_MEMBER(gei_bitmap_w);
- DECLARE_READ8_MEMBER(catchall);
- template <unsigned N> DECLARE_WRITE8_MEMBER(banksel_w) { m_rombank->set_entry(N); }
- DECLARE_WRITE8_MEMBER(geimulti_bank_w);
- template <unsigned N> DECLARE_READ8_MEMBER(banksel_r);
- DECLARE_READ8_MEMBER(signature_r);
- DECLARE_WRITE8_MEMBER(signature_w);
+ void gei_drawctrl_w(offs_t offset, uint8_t data);
+ void gei_bitmap_w(offs_t offset, uint8_t data);
+ uint8_t catchall(offs_t offset);
+ template <unsigned N> void banksel_w(uint8_t data) { m_rombank->set_entry(N); }
+ void geimulti_bank_w(offs_t offset, uint8_t data);
+ template <unsigned N> uint8_t banksel_r();
+ uint8_t signature_r();
+ void signature_w(uint8_t data);
void lamps_w(uint8_t data);
void sound_w(uint8_t data);
void sound2_w(uint8_t data);
@@ -168,7 +168,7 @@ private:
};
-WRITE8_MEMBER(gei_state::gei_drawctrl_w)
+void gei_state::gei_drawctrl_w(offs_t offset, uint8_t data)
{
m_drawctrl[offset] = data;
@@ -179,7 +179,7 @@ WRITE8_MEMBER(gei_state::gei_drawctrl_w)
}
}
-WRITE8_MEMBER(gei_state::gei_bitmap_w)
+void gei_state::gei_bitmap_w(offs_t offset, uint8_t data)
{
m_yadd = (offset == m_prevoffset) ? (m_yadd + 1) : 0;
m_prevoffset = offset;
@@ -281,7 +281,7 @@ void gei_state::nmi_w(uint8_t data)
m_nmi_mask = data & 0x40;
}
-READ8_MEMBER(gei_state::catchall)
+uint8_t gei_state::catchall(offs_t offset)
{
int pc = m_maincpu->pc();
@@ -297,7 +297,7 @@ uint8_t gei_state::portC_r()
}
-WRITE8_MEMBER(gei_state::geimulti_bank_w)
+void gei_state::geimulti_bank_w(offs_t offset, uint8_t data)
{
int bank = -1;
@@ -326,7 +326,7 @@ WRITE8_MEMBER(gei_state::geimulti_bank_w)
}
template <unsigned N>
-READ8_MEMBER(gei_state::banksel_r)
+uint8_t gei_state::banksel_r()
{
if (!machine().side_effects_disabled())
m_rombank->set_entry(N);
@@ -335,12 +335,12 @@ READ8_MEMBER(gei_state::banksel_r)
/* This signature is used to validate the ROMs in sportauth. Simple protection check? */
-READ8_MEMBER(gei_state::signature_r)
+uint8_t gei_state::signature_r()
{
return m_signature_answer;
}
-WRITE8_MEMBER(gei_state::signature_w)
+void gei_state::signature_w(uint8_t data)
{
if (data == 0) m_signature_pos = 0;
diff --git a/src/mame/drivers/generalplus_gpl16250.cpp b/src/mame/drivers/generalplus_gpl16250.cpp
index f444f958735..a819710453c 100644
--- a/src/mame/drivers/generalplus_gpl16250.cpp
+++ b/src/mame/drivers/generalplus_gpl16250.cpp
@@ -176,7 +176,7 @@ void gcm394_game_state::machine_reset()
m_maincpu->reset(); // reset CPU so vector gets read etc.
- m_maincpu->set_paldisplaybank_high_hack(1);
+ //m_maincpu->set_paldisplaybank_high_hack(1);
m_maincpu->set_alt_tile_addressing_hack(0);
}
diff --git a/src/mame/drivers/generalplus_gpl16250_nand.cpp b/src/mame/drivers/generalplus_gpl16250_nand.cpp
index 4da034b50a9..0ea2e9ba457 100644
--- a/src/mame/drivers/generalplus_gpl16250_nand.cpp
+++ b/src/mame/drivers/generalplus_gpl16250_nand.cpp
@@ -739,7 +739,7 @@ void generalplus_gpac800_game_state::machine_reset()
m_maincpu->reset(); // reset CPU so vector gets read etc.
- m_maincpu->set_paldisplaybank_high_hack(0);
+ //m_maincpu->set_paldisplaybank_high_hack(0);
m_maincpu->set_alt_tile_addressing_hack(1);
}
@@ -823,6 +823,6 @@ CONS(2008, jak_umdf, 0, 0, generalplus_gpac800, jak_hsm, generalplus_gp
// There were 1 player and 2 player versions for several of the JAKKS guns. The 2nd gun appears to be simply a controller (no AV connectors) but as they were separate products with the 2 player verisons being released up to a year after the original, the code could differ.
// If they differ, it is currently uncertain which versions these ROMs are from
CONS(2012, jak_wdzh, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc / Merge Interactive", "The Walking Dead: Zombie Hunter (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // gun games all had Atmel 16CM (24C16).
-CONS(2013, jak_swc, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / Merge Interactive", "Star Wars Clone Trooper (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
CONS(2013, jak_duck, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / Merge Interactive", "Duck Commander (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // no 2 Player version was released
+CONS(2013, jak_swc, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / Merge Interactive", "Star Wars Clone Trooper (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
CONS(2014, jak_wdbg, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / Super Happy Fun Fun", "The Walking Dead: Battleground (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/generalplus_gpl16250_rom.cpp b/src/mame/drivers/generalplus_gpl16250_rom.cpp
index 3af7ecb0b82..49dc166a505 100644
--- a/src/mame/drivers/generalplus_gpl16250_rom.cpp
+++ b/src/mame/drivers/generalplus_gpl16250_rom.cpp
@@ -444,9 +444,9 @@ void tkmag220_game_state::machine_reset()
m_upperbase = 0 * (0x1000000 / 2);
gcm394_game_state::machine_reset();
- m_maincpu->set_paldisplaybank_high_hack(0);
- m_maincpu->set_pal_sprites_hack(0x000);
- m_maincpu->set_pal_back_hack(0x000);
+ //m_maincpu->set_paldisplaybank_high_hack(0);
+ //m_maincpu->set_pal_sprites_hack(0x000);
+ //m_maincpu->set_pal_back_hack(0x000);
m_maincpu->set_alt_tile_addressing_hack(1);
}
diff --git a/src/mame/drivers/generalplus_gpl16250_romram.cpp b/src/mame/drivers/generalplus_gpl16250_romram.cpp
index 836e58a777a..987ec9854c8 100644
--- a/src/mame/drivers/generalplus_gpl16250_romram.cpp
+++ b/src/mame/drivers/generalplus_gpl16250_romram.cpp
@@ -227,7 +227,7 @@ void wrlshunt_game_state::machine_reset()
m_maincpu->set_cs_space(m_memory->get_program());
m_maincpu->reset(); // reset CPU so vector gets read etc.
- m_maincpu->set_paldisplaybank_high_hack(1);
+ //m_maincpu->set_paldisplaybank_high_hack(1);
m_maincpu->set_alt_tile_addressing_hack(1);
}
@@ -309,7 +309,7 @@ void jak_s500_game_state::machine_reset()
m_maincpu->set_cs_space(m_memory->get_program());
m_maincpu->reset(); // reset CPU so vector gets read etc.
- m_maincpu->set_paldisplaybank_high_hack(0);
+ //m_maincpu->set_paldisplaybank_high_hack(0);
m_maincpu->set_alt_tile_addressing_hack(1);
}
@@ -317,7 +317,7 @@ void jak_s500_game_state::machine_reset()
void lazertag_game_state::machine_reset()
{
jak_s500_game_state::machine_reset();
- m_maincpu->set_pal_sprites_hack(0x800);
+ //m_maincpu->set_pal_sprites_hack(0x800);
}
void paccon_game_state::machine_reset()
@@ -326,6 +326,12 @@ void paccon_game_state::machine_reset()
m_maincpu->install_speedup_hack(0x6593, 0x30033);
}
+void jak_prft_game_state::machine_reset()
+{
+ jak_s500_game_state::machine_reset();
+ //m_maincpu->set_alt_tile_addressing_hack(0);
+ m_maincpu->set_alt_extrasprite_hack(1);
+}
ROM_START( paccon )
//ROM_REGION16_BE( 0x40000, "maincpu:internal", ROMREGION_ERASE00 ) // not on this model? (or at least not this size, as CS base is different)
@@ -503,8 +509,8 @@ CONS(2009, jak_s500, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshun
CONS(2009, jak_smwm, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc / HotGen Ltd", "Spider-Man Web Master (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
CONS(2010, jak_pf, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc / HotGen Ltd", "Phineas and Ferb: Best Game Ever! (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) // build date is 2009, but onscreen display is 2010
CONS(200?, jak_totm, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc / HotGen Ltd", "Toy Story - Toys on the Move (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) // Toys on the Move has ISSI 404A
-CONS(2009, jak_prft, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc / Santa Cruz Games", "Power Rangers Force In Time (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
-CONS(2009, jak_tink, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc / Santa Cruz Games", "Tinker Bell and the Lost Treasure (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
+CONS(2009, jak_prft, 0, 0, wrlshunt, jak_s500, jak_prft_game_state, init_wrlshunt, "JAKKS Pacific Inc / Santa Cruz Games", "Power Rangers Force In Time (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
+CONS(2009, jak_tink, 0, 0, wrlshunt, jak_s500, jak_prft_game_state, init_wrlshunt, "JAKKS Pacific Inc / Santa Cruz Games", "Tinker Bell and the Lost Treasure (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
CONS(2009, jak_ths, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_ths, "JAKKS Pacific Inc / Super Happy Fun Fun", "Triple Header Sports (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
CONS(2011, wrlshunt, 0, 0, wrlshunt, wrlshunt, wrlshunt_game_state, init_wrlshunt, "Hamy / Kids Station Toys Inc", "Wireless Hunting Video Game System", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/generalplus_gpl16250_spi.cpp b/src/mame/drivers/generalplus_gpl16250_spi.cpp
index f8858f8cc90..ffe8e99d28b 100644
--- a/src/mame/drivers/generalplus_gpl16250_spi.cpp
+++ b/src/mame/drivers/generalplus_gpl16250_spi.cpp
@@ -64,7 +64,7 @@ void generalplus_gpspispi_game_state::machine_reset()
{
m_maincpu->reset(); // reset CPU so vector gets read etc.
- m_maincpu->set_paldisplaybank_high_hack(0);
+ //m_maincpu->set_paldisplaybank_high_hack(0);
m_maincpu->set_alt_tile_addressing_hack(1);
}
diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp
index 134e6ad3e11..0cd946bf9fc 100644
--- a/src/mame/drivers/geneve.cpp
+++ b/src/mame/drivers/geneve.cpp
@@ -333,8 +333,8 @@ private:
// Memory bus
void setaddress_debug(bool debug, offs_t address, uint8_t busctrl);
void setaddress(offs_t address, uint8_t busctrl);
- DECLARE_READ8_MEMBER( memread );
- DECLARE_WRITE8_MEMBER( memwrite );
+ uint8_t memread(offs_t offset);
+ void memwrite(offs_t offset, uint8_t data);
void crumap(address_map &map);
void memmap(address_map &map);
@@ -506,7 +506,7 @@ void geneve_state::setaddress_debug(bool debug, offs_t address, uint8_t busctrl)
}
}
-READ8_MEMBER( geneve_state::memread )
+uint8_t geneve_state::memread(offs_t offset)
{
uint8_t value = 0;
offs_t sramadd;
@@ -617,7 +617,7 @@ READ8_MEMBER( geneve_state::memread )
return value;
}
-WRITE8_MEMBER( geneve_state::memwrite )
+void geneve_state::memwrite(offs_t offset, uint8_t data)
{
offs_t sramadd = 0;
offs_t dramadd = 0;
diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp
index cf226d5a1fb..0790fb0428c 100644
--- a/src/mame/drivers/geniusiq.cpp
+++ b/src/mame/drivers/geniusiq.cpp
@@ -205,17 +205,17 @@ private:
void geniusiq_palette(palette_device &palette) const;
virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_READ16_MEMBER(input_r);
- DECLARE_WRITE16_MEMBER(mouse_pos_w);
- DECLARE_WRITE16_MEMBER(gfx_base_w);
- DECLARE_WRITE16_MEMBER(gfx_dest_w);
- DECLARE_WRITE16_MEMBER(gfx_color_w);
- DECLARE_WRITE16_MEMBER(gfx_idx_w);
+ uint16_t input_r();
+ void mouse_pos_w(offs_t offset, uint16_t data);
+ void gfx_base_w(offs_t offset, uint16_t data);
+ void gfx_dest_w(offs_t offset, uint16_t data);
+ void gfx_color_w(offs_t offset, uint16_t data);
+ void gfx_idx_w(uint16_t data);
void queue_input(uint16_t data);
- DECLARE_READ16_MEMBER(cart_state_r);
+ uint16_t cart_state_r();
- DECLARE_READ16_MEMBER(unk0_r) { return 0; }
- DECLARE_READ16_MEMBER(unk_r) { return machine().rand(); }
+ uint16_t unk0_r() { return 0; }
+ uint16_t unk_r() { return machine().rand(); }
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(cart_unload);
@@ -300,12 +300,12 @@ uint32_t geniusiq_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
return 0;
}
-READ16_MEMBER( geniusiq_state::cart_state_r )
+uint16_t geniusiq_state::cart_state_r()
{
return m_cart_state;
}
-WRITE16_MEMBER( geniusiq_state::mouse_pos_w )
+void geniusiq_state::mouse_pos_w(offs_t offset, uint16_t data)
{
if (offset)
m_mouse_gfx_posy = data;
@@ -313,12 +313,12 @@ WRITE16_MEMBER( geniusiq_state::mouse_pos_w )
m_mouse_gfx_posx = data;
}
-WRITE16_MEMBER(geniusiq_state::gfx_color_w)
+void geniusiq_state::gfx_color_w(offs_t offset, uint16_t data)
{
m_gfx_color[offset & 1] = data & 0x0f;
}
-WRITE16_MEMBER(geniusiq_state::gfx_dest_w)
+void geniusiq_state::gfx_dest_w(offs_t offset, uint16_t data)
{
if (offset)
m_gfx_y = data;
@@ -326,7 +326,7 @@ WRITE16_MEMBER(geniusiq_state::gfx_dest_w)
m_gfx_x = data;
}
-WRITE16_MEMBER(geniusiq_state::gfx_base_w)
+void geniusiq_state::gfx_base_w(offs_t offset, uint16_t data)
{
if (offset)
m_gfx_base = (m_gfx_base & 0xffff0000) | (data<<0);
@@ -334,7 +334,7 @@ WRITE16_MEMBER(geniusiq_state::gfx_base_w)
m_gfx_base = (m_gfx_base & 0x0000ffff) | (data<<16);
}
-WRITE16_MEMBER(geniusiq_state::gfx_idx_w)
+void geniusiq_state::gfx_idx_w(uint16_t data)
{
uint16_t *gfx = m_rom + ((m_gfx_base + (data & 0xff)*32)>>1);
@@ -354,7 +354,7 @@ WRITE16_MEMBER(geniusiq_state::gfx_idx_w)
}
}
-READ16_MEMBER( geniusiq_state::input_r )
+uint16_t geniusiq_state::input_r()
{
/*
this is guesswork and may not be correct
diff --git a/src/mame/drivers/ggconnie.cpp b/src/mame/drivers/ggconnie.cpp
index c940ee289b8..eb478a658c4 100644
--- a/src/mame/drivers/ggconnie.cpp
+++ b/src/mame/drivers/ggconnie.cpp
@@ -47,8 +47,8 @@ protected:
private:
void lamp_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(output_w);
- DECLARE_WRITE8_MEMBER(oki_bank_w);
+ void output_w(uint8_t data);
+ void oki_bank_w(uint8_t data);
void sgx_io(address_map &map);
void sgx_mem(address_map &map);
void oki_map(address_map &map);
@@ -69,13 +69,13 @@ void ggconnie_state::lamp_w(uint8_t data)
output().set_value("lamp", !BIT(data,0));
}
-WRITE8_MEMBER(ggconnie_state::output_w)
+void ggconnie_state::output_w(uint8_t data)
{
// written in "Output Test" in test mode
}
// TODO: banking not understood for ggconnie (writes to 0x01f7400-03 range, while smf only to 00). Is the ROM dumped correctly btw?
-WRITE8_MEMBER(ggconnie_state::oki_bank_w)
+void ggconnie_state::oki_bank_w(uint8_t data)
{
m_okibank->set_entry(data & 0x07);
// popmessage("offset: %02x, bank: %02x\n", offset, data);
diff --git a/src/mame/drivers/ghosteo.cpp b/src/mame/drivers/ghosteo.cpp
index 628fa176224..e637fed8b80 100644
--- a/src/mame/drivers/ghosteo.cpp
+++ b/src/mame/drivers/ghosteo.cpp
@@ -119,8 +119,8 @@ private:
int m_security_count;
uint32_t m_bballoon_port[20];
struct nand_t m_nand;
- DECLARE_READ32_MEMBER(bballoon_speedup_r);
- DECLARE_READ32_MEMBER(touryuu_port_10000000_r);
+ uint32_t bballoon_speedup_r(offs_t offset, uint32_t mem_mask = ~0);
+ uint32_t touryuu_port_10000000_r();
void qs1000_p1_w(uint8_t data);
void qs1000_p2_w(uint8_t data);
@@ -405,7 +405,7 @@ WRITE_LINE_MEMBER(ghosteo_state::s3c2410_i2c_sda_w )
m_i2cmem->write_sda(state);
}
-READ32_MEMBER( ghosteo_state::touryuu_port_10000000_r )
+uint32_t ghosteo_state::touryuu_port_10000000_r()
{
uint32_t port_g = m_bballoon_port[S3C2410_GPIO_PORT_G];
uint32_t data = 0xFFFFFFFF;
@@ -567,9 +567,9 @@ static INPUT_PORTS_START( touryuu )
PORT_BIT( 0xFFFFFF50, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-READ32_MEMBER(ghosteo_state::bballoon_speedup_r)
+uint32_t ghosteo_state::bballoon_speedup_r(offs_t offset, uint32_t mem_mask)
{
- uint32_t ret = m_s3c2410->s3c24xx_lcd_r(space, offset+0x10/4, mem_mask);
+ uint32_t ret = m_s3c2410->s3c24xx_lcd_r(offset+0x10/4, mem_mask);
int pc = m_maincpu->pc();
@@ -600,7 +600,7 @@ void ghosteo_state::machine_start()
void ghosteo_state::machine_reset()
{
- m_maincpu->space(AS_PROGRAM).install_read_handler(0x4d000010, 0x4d000013,read32_delegate(*this, FUNC(ghosteo_state::bballoon_speedup_r)));
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x4d000010, 0x4d000013,read32s_delegate(*this, FUNC(ghosteo_state::bballoon_speedup_r)));
}
void ghosteo_state::ghosteo(machine_config &config)
diff --git a/src/mame/drivers/giclassic.cpp b/src/mame/drivers/giclassic.cpp
index 4b2d80feafe..99ec8888c91 100644
--- a/src/mame/drivers/giclassic.cpp
+++ b/src/mame/drivers/giclassic.cpp
@@ -79,8 +79,8 @@ private:
uint32_t screen_update_giclassic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
K056832_CB_MEMBER(tile_callback);
- DECLARE_WRITE16_MEMBER(control_w);
- DECLARE_READ16_MEMBER(vrom_r);
+ void control_w(uint16_t data);
+ uint16_t vrom_r(offs_t offset);
void satellite_main(address_map &map);
@@ -122,7 +122,7 @@ INTERRUPT_GEN_MEMBER(giclassic_state::giclassic_interrupt)
}
}
-WRITE16_MEMBER(giclassic_state::control_w)
+void giclassic_state::control_w(uint16_t data)
{
// bits:
// 0 = ?
@@ -134,7 +134,7 @@ WRITE16_MEMBER(giclassic_state::control_w)
m_control = data & 0xff;
}
-READ16_MEMBER(giclassic_state::vrom_r)
+uint16_t giclassic_state::vrom_r(offs_t offset)
{
if (m_control & 8)
{
@@ -197,21 +197,21 @@ public:
K056832_CB_MEMBER(tile_callback);
K055673_CB_MEMBER(sprite_callback);
- DECLARE_WRITE16_MEMBER(control_w);
- DECLARE_READ16_MEMBER(control_r);
+ void control_w(uint16_t data);
+ uint16_t control_r();
void giclassvr(machine_config &config);
void server_main(address_map &map);
private:
- uint16 m_control;
+ uint16_t m_control;
};
-WRITE16_MEMBER(giclassicsvr_state::control_w)
+void giclassicsvr_state::control_w(uint16_t data)
{
m_control = data;
}
-READ16_MEMBER(giclassicsvr_state::control_r)
+uint16_t giclassicsvr_state::control_r()
{
return m_control;
}
diff --git a/src/mame/drivers/gigatron.cpp b/src/mame/drivers/gigatron.cpp
index 5af6f813289..e589c88f201 100644
--- a/src/mame/drivers/gigatron.cpp
+++ b/src/mame/drivers/gigatron.cpp
@@ -42,7 +42,7 @@ private:
uint16_t lights_changed;
- DECLARE_READ8_MEMBER(gigatron_random)
+ uint8_t gigatron_random()
{
return machine().rand() & 0xff;
}
diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp
index e37b6ca6e87..036afa4eae7 100644
--- a/src/mame/drivers/gimix.cpp
+++ b/src/mame/drivers/gimix.cpp
@@ -89,13 +89,13 @@ public:
void gimix(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(system_w);
+ void system_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(fdc_irq_w);
DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
- DECLARE_READ8_MEMBER(dma_r);
- DECLARE_WRITE8_MEMBER(dma_w);
- DECLARE_READ8_MEMBER(fdc_r);
- DECLARE_WRITE8_MEMBER(fdc_w);
+ uint8_t dma_r(offs_t offset);
+ void dma_w(offs_t offset, uint8_t data);
+ uint8_t fdc_r(offs_t offset);
+ void fdc_w(offs_t offset, uint8_t data);
uint8_t pia_pa_r();
void pia_pa_w(uint8_t data);
uint8_t pia_pb_r();
@@ -201,7 +201,7 @@ void gimix_state::refresh_memory()
}
}
-WRITE8_MEMBER( gimix_state::system_w )
+void gimix_state::system_w(offs_t offset, uint8_t data)
{
if(offset == 0x7f) // task register
{
@@ -233,7 +233,7 @@ WRITE8_MEMBER( gimix_state::system_w )
}
}
-READ8_MEMBER(gimix_state::dma_r)
+uint8_t gimix_state::dma_r(offs_t offset)
{
switch(offset)
{
@@ -255,7 +255,7 @@ READ8_MEMBER(gimix_state::dma_r)
return 0xff;
}
-WRITE8_MEMBER(gimix_state::dma_w)
+void gimix_state::dma_w(offs_t offset, uint8_t data)
{
switch(offset)
{
@@ -374,7 +374,7 @@ WRITE8_MEMBER(gimix_state::dma_w)
}
}
-READ8_MEMBER(gimix_state::fdc_r)
+uint8_t gimix_state::fdc_r(offs_t offset)
{
// motors are switched on on FDC access
if(m_selected_drive == 1 && m_floppy0_ready == false)
@@ -404,7 +404,7 @@ READ8_MEMBER(gimix_state::fdc_r)
return m_fdc->read(offset);
}
-WRITE8_MEMBER(gimix_state::fdc_w)
+void gimix_state::fdc_w(offs_t offset, uint8_t data)
{
// motors are switched on on FDC access
if(m_selected_drive == 1)
diff --git a/src/mame/drivers/gkigt.cpp b/src/mame/drivers/gkigt.cpp
index 6945e085517..1fbfb2050c8 100644
--- a/src/mame/drivers/gkigt.cpp
+++ b/src/mame/drivers/gkigt.cpp
@@ -124,22 +124,22 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_READ32_MEMBER(igt_gk_28010008_r)
+ uint32_t igt_gk_28010008_r()
{
return machine().rand(); // don't quite understand this one
};
- DECLARE_READ32_MEMBER(uart_status_r);
- DECLARE_WRITE32_MEMBER(uart_w);
- DECLARE_WRITE8_MEMBER(irq_enable_w);
- DECLARE_WRITE8_MEMBER(irq_ack_w);
- DECLARE_READ8_MEMBER(irq_vector_r);
- DECLARE_WRITE8_MEMBER(unk_w);
- DECLARE_READ8_MEMBER(frame_number_r);
+ uint32_t uart_status_r();
+ void uart_w(uint32_t data);
+ void irq_enable_w(uint8_t data);
+ void irq_ack_w(uint8_t data);
+ uint8_t irq_vector_r();
+ void unk_w(uint8_t data);
+ uint8_t frame_number_r();
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
- DECLARE_READ8_MEMBER(timer_r);
- DECLARE_READ16_MEMBER(version_r);
+ uint8_t timer_r();
+ uint16_t version_r();
void igt_gameking_map(address_map &map);
void igt_ms72c_map(address_map &map);
@@ -188,40 +188,40 @@ uint32_t igt_gameking_state::screen_update_igt_gameking(screen_device &screen, b
}
-READ32_MEMBER(igt_gameking_state::uart_status_r)
+uint32_t igt_gameking_state::uart_status_r()
{
return 0x00040004;
}
-WRITE32_MEMBER(igt_gameking_state::uart_w)
+void igt_gameking_state::uart_w(uint32_t data)
{
printf("%c", (data>>16) & 0x7f);
}
-WRITE8_MEMBER(igt_gameking_state::irq_enable_w)
+void igt_gameking_state::irq_enable_w(uint8_t data)
{
m_irq_enable = data;
}
-WRITE8_MEMBER(igt_gameking_state::irq_ack_w)
+void igt_gameking_state::irq_ack_w(uint8_t data)
{
//logerror("%02x\n",data);
m_maincpu->set_input_line(I960_IRQ0,CLEAR_LINE);
m_irq_pend = 0;
}
-READ8_MEMBER(igt_gameking_state::irq_vector_r)
+uint8_t igt_gameking_state::irq_vector_r()
{
return m_irq_pend;
}
-READ8_MEMBER(igt_gameking_state::frame_number_r)
+uint8_t igt_gameking_state::frame_number_r()
{
// TODO: likely not right, checked in irq 0
return 0;//m_screen->frame_number() & 7;
}
-WRITE8_MEMBER(igt_gameking_state::unk_w)
+void igt_gameking_state::unk_w(uint8_t data)
{
// bit 7 toggled, unknown purpose
}
@@ -280,13 +280,13 @@ void igt_gameking_state::igt_gameking_map(address_map &map)
map(0xa1000000, 0xa1011fff).ram(); // used by gkkey for restart IAC
}
-READ16_MEMBER(igt_gameking_state::version_r)
+uint16_t igt_gameking_state::version_r()
{
// TODO: unknown value required, checked at "Cold powerup machine setup"
return 0xf777;
}
-READ8_MEMBER(igt_gameking_state::timer_r)
+uint8_t igt_gameking_state::timer_r()
{
// TODO: ms72c 8011ab0 "init_io" check, gets printed as "New security latch value = %x"
return m_timer_count++;
diff --git a/src/mame/drivers/globalfr.cpp b/src/mame/drivers/globalfr.cpp
index 58763822382..f9425d22175 100644
--- a/src/mame/drivers/globalfr.cpp
+++ b/src/mame/drivers/globalfr.cpp
@@ -38,14 +38,14 @@ private:
// serial vfd
- DECLARE_WRITE16_MEMBER(vfd_w);
+ void vfd_w(uint16_t data);
void globalfr_map(address_map &map);
};
/******************************************************************************/
-WRITE16_MEMBER(globalfr_state::vfd_w)
+void globalfr_state::vfd_w(uint16_t data)
{
// m_vfd->(data & 0x20) need to find reset
{
diff --git a/src/mame/drivers/gluck2.cpp b/src/mame/drivers/gluck2.cpp
index 3d6c9e387b2..9c199347e5e 100644
--- a/src/mame/drivers/gluck2.cpp
+++ b/src/mame/drivers/gluck2.cpp
@@ -227,9 +227,9 @@ private:
tilemap_t *m_bg_tilemap;
- DECLARE_WRITE8_MEMBER(videoram_w);
- DECLARE_WRITE8_MEMBER(colorram_w);
- DECLARE_WRITE8_MEMBER(counters_w);
+ void videoram_w(offs_t offset, uint8_t data);
+ void colorram_w(offs_t offset, uint8_t data);
+ void counters_w(uint8_t data);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void video_start() override;
@@ -244,13 +244,13 @@ private:
*********************************************/
-WRITE8_MEMBER(gluck2_state::videoram_w)
+void gluck2_state::videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(gluck2_state::colorram_w)
+void gluck2_state::colorram_w(offs_t offset, uint8_t data)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
@@ -291,7 +291,7 @@ uint32_t gluck2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
* R/W Handlers *
**********************************************/
-WRITE8_MEMBER(gluck2_state::counters_w)
+void gluck2_state::counters_w(uint8_t data)
{
/* - bits -
7654 3210
diff --git a/src/mame/drivers/go2000.cpp b/src/mame/drivers/go2000.cpp
index 6be6e18b51e..b2c450424af 100644
--- a/src/mame/drivers/go2000.cpp
+++ b/src/mame/drivers/go2000.cpp
@@ -72,8 +72,8 @@ private:
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
- DECLARE_WRITE16_MEMBER(sound_cmd_w);
- DECLARE_WRITE8_MEMBER(go2000_pcm_1_bankswitch_w);
+ void sound_cmd_w(uint16_t data);
+ void go2000_pcm_1_bankswitch_w(uint8_t data);
virtual void machine_start() override;
virtual void video_start() override;
uint32_t screen_update_go2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -83,7 +83,7 @@ private:
};
-WRITE16_MEMBER(go2000_state::sound_cmd_w)
+void go2000_state::sound_cmd_w(uint16_t data)
{
m_soundlatch->write(data & 0xff);
m_soundcpu->set_input_line(0, HOLD_LINE);
@@ -104,7 +104,7 @@ void go2000_state::go2000_map(address_map &map)
// map(0xe00020, 0xe00021).nopw();
}
-WRITE8_MEMBER(go2000_state::go2000_pcm_1_bankswitch_w)
+void go2000_state::go2000_pcm_1_bankswitch_w(uint8_t data)
{
membank("bank1")->set_entry(data & 0x07);
}
diff --git a/src/mame/drivers/goldart.cpp b/src/mame/drivers/goldart.cpp
index b7d4601ee19..ec6ddc089b2 100644
--- a/src/mame/drivers/goldart.cpp
+++ b/src/mame/drivers/goldart.cpp
@@ -83,8 +83,8 @@ private:
uint8_t m_port1;
- DECLARE_READ8_MEMBER(hostmem_r);
- DECLARE_WRITE8_MEMBER(hostmem_w);
+ uint8_t hostmem_r(offs_t offset);
+ void hostmem_w(offs_t offset, uint8_t data);
};
void goldart_state::mcu_port1_w(uint8_t data)
@@ -125,7 +125,7 @@ uint32_t goldart_state::screen_update_goldart(screen_device& screen, bitmap_ind1
return 0;
}
-READ8_MEMBER(goldart_state::hostmem_r)
+uint8_t goldart_state::hostmem_r(offs_t offset)
{
// must be some control bits (or DS5002FP memory access isn't correct) as registers map over ROM/RAM with no obvious way to select at the moment
// and we need to be able to access full range of each ROM bank at least
@@ -186,7 +186,7 @@ READ8_MEMBER(goldart_state::hostmem_r)
return ret;
}
-WRITE8_MEMBER(goldart_state::hostmem_w)
+void goldart_state::hostmem_w(offs_t offset, uint8_t data)
{
// registers seem to control write modes? (palette select bits, overwrite / transparent drawing etc.)
diff --git a/src/mame/drivers/goldngam.cpp b/src/mame/drivers/goldngam.cpp
index e2eadc326b9..c701d74f91e 100644
--- a/src/mame/drivers/goldngam.cpp
+++ b/src/mame/drivers/goldngam.cpp
@@ -265,7 +265,7 @@ private:
static constexpr int MOVIECRD_DUART1_IRQ = M68K_IRQ_2;
static constexpr int MOVIECRD_DUART2_IRQ = M68K_IRQ_4;
- DECLARE_READ8_MEMBER(unk_r);
+ uint8_t unk_r();
virtual void video_start() override;
void palette_init(palette_device &palette);
uint32_t screen_update_goldngam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -320,7 +320,7 @@ void goldngam_state::palette_init(palette_device &palette)
* Memory Map Information *
*************************/
-READ8_MEMBER(goldngam_state::unk_r)
+uint8_t goldngam_state::unk_r()
{
// hopper status read ?
return 1;
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index 297b3088779..e329000f09b 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -1365,8 +1365,8 @@ protected:
virtual void video_start() override;
- DECLARE_WRITE8_MEMBER(goldnpkr_videoram_w);
- DECLARE_WRITE8_MEMBER(goldnpkr_colorram_w);
+ void goldnpkr_videoram_w(offs_t offset, uint8_t data);
+ void goldnpkr_colorram_w(offs_t offset, uint8_t data);
void witchcrd_palette(palette_device &palette) const;
void super21p_palette(palette_device &palette) const;
@@ -1446,8 +1446,8 @@ public:
void megadpkr(machine_config &config);
private:
- DECLARE_READ8_MEMBER(cpubank_decrypt_r);
- DECLARE_WRITE8_MEMBER(mcu_command_w);
+ uint8_t cpubank_decrypt_r(offs_t offset);
+ void mcu_command_w(uint8_t data);
void mcu_portb_w(uint8_t data);
void mcu_portc_w(uint8_t data);
void megadpkr_banked_map(address_map &map);
@@ -1468,13 +1468,13 @@ private:
*********************************************/
-WRITE8_MEMBER(goldnpkr_state::goldnpkr_videoram_w)
+void goldnpkr_state::goldnpkr_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(goldnpkr_state::goldnpkr_colorram_w)
+void goldnpkr_state::goldnpkr_colorram_w(offs_t offset, uint8_t data)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
@@ -4894,12 +4894,12 @@ void goldnpkr_state::caspoker(machine_config &config)
* Blitz System *
*********************************************/
-READ8_MEMBER(blitz_state::cpubank_decrypt_r)
+uint8_t blitz_state::cpubank_decrypt_r(offs_t offset)
{
return m_cpubank[offset] ^ m_cpubank_xor;
}
-WRITE8_MEMBER(blitz_state::mcu_command_w)
+void blitz_state::mcu_command_w(uint8_t data)
{
m_mcu->pa_w(data);
if (BIT(m_portc_data, 0))
diff --git a/src/mame/drivers/good.cpp b/src/mame/drivers/good.cpp
index 7c71fdd1a05..1844bbcb9fc 100644
--- a/src/mame/drivers/good.cpp
+++ b/src/mame/drivers/good.cpp
@@ -66,8 +66,8 @@ private:
/* video-related */
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
- DECLARE_WRITE16_MEMBER(fg_tilemapram_w);
- DECLARE_WRITE16_MEMBER(bg_tilemapram_w);
+ void fg_tilemapram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void bg_tilemapram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
uint32_t screen_update_good(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -77,7 +77,7 @@ private:
};
-WRITE16_MEMBER(good_state::fg_tilemapram_w)
+void good_state::fg_tilemapram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_fg_tilemapram[offset]);
m_fg_tilemap->mark_tile_dirty(offset / 2);
@@ -90,7 +90,7 @@ TILE_GET_INFO_MEMBER(good_state::get_fg_tile_info)
tileinfo.set(0, tileno, attr, 0);
}
-WRITE16_MEMBER(good_state::bg_tilemapram_w)
+void good_state::bg_tilemapram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg_tilemapram[offset]);
m_bg_tilemap->mark_tile_dirty(offset / 2);
diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp
index 3da3f87f079..b5c2cc66b9e 100644
--- a/src/mame/drivers/goodejan.cpp
+++ b/src/mame/drivers/goodejan.cpp
@@ -130,13 +130,13 @@ private:
uint16_t m_layer_en;
uint16_t m_scrollram[6];
- DECLARE_WRITE16_MEMBER(gfxbank_w);
- DECLARE_READ16_MEMBER(mahjong_panel_r);
- DECLARE_WRITE16_MEMBER(mahjong_panel_w);
- DECLARE_WRITE16_MEMBER(seibucrtc_sc0vram_w);
- DECLARE_WRITE16_MEMBER(seibucrtc_sc1vram_w);
- DECLARE_WRITE16_MEMBER(seibucrtc_sc2vram_w);
- DECLARE_WRITE16_MEMBER(seibucrtc_sc3vram_w);
+ void gfxbank_w(uint16_t data);
+ uint16_t mahjong_panel_r();
+ void mahjong_panel_w(uint16_t data);
+ void seibucrtc_sc0vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void seibucrtc_sc1vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void seibucrtc_sc2vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void seibucrtc_sc3vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void layer_en_w(uint16_t data);
void layer_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
@@ -205,25 +205,25 @@ private:
*
*******************************/
-WRITE16_MEMBER( goodejan_state::seibucrtc_sc0vram_w )
+void goodejan_state::seibucrtc_sc0vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sc0_vram[offset]);
m_sc0_tilemap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER( goodejan_state::seibucrtc_sc2vram_w )
+void goodejan_state::seibucrtc_sc2vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sc2_vram[offset]);
m_sc2_tilemap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER( goodejan_state::seibucrtc_sc1vram_w )
+void goodejan_state::seibucrtc_sc1vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sc1_vram[offset]);
m_sc1_tilemap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER( goodejan_state::seibucrtc_sc3vram_w )
+void goodejan_state::seibucrtc_sc3vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sc3_vram[offset]);
m_sc3_tilemap->mark_tile_dirty(offset);
@@ -361,13 +361,13 @@ uint32_t goodejan_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
#define GOODEJAN_MHZ3 12000000
-WRITE16_MEMBER(goodejan_state::gfxbank_w)
+void goodejan_state::gfxbank_w(uint16_t data)
{
seibucrtc_sc0bank_w((data & 0x100)>>8);
}
/* Multiplexer device for the mahjong panel */
-READ16_MEMBER(goodejan_state::mahjong_panel_r)
+uint16_t goodejan_state::mahjong_panel_r()
{
u16 ret;
ret = 0xffff;
@@ -381,7 +381,7 @@ READ16_MEMBER(goodejan_state::mahjong_panel_r)
return ret;
}
-WRITE16_MEMBER(goodejan_state::mahjong_panel_w)
+void goodejan_state::mahjong_panel_w(uint16_t data)
{
m_mux_data = data;
}
diff --git a/src/mame/drivers/goori.cpp b/src/mame/drivers/goori.cpp
index a1498fb7ad4..d50501ed5c9 100644
--- a/src/mame/drivers/goori.cpp
+++ b/src/mame/drivers/goori.cpp
@@ -88,8 +88,8 @@ protected:
private:
void goori_map(address_map& map);
- DECLARE_WRITE16_MEMBER(goori_300008_w);
- DECLARE_WRITE16_MEMBER(goori_30000e_w);
+ void goori_300008_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void goori_30000e_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
@@ -101,12 +101,12 @@ private:
required_device<eeprom_serial_93cxx_device> m_eeprom;
tilemap_t* m_bg_tilemap;
- DECLARE_WRITE16_MEMBER(bg_videoram_w);
+ void bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
};
-WRITE16_MEMBER(goori_state::bg_videoram_w)
+void goori_state::bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_bg_videoram[offset]);
m_bg_tilemap->mark_tile_dirty(offset/2);
@@ -165,12 +165,12 @@ uint32_t goori_state::screen_update(screen_device& screen, bitmap_ind16& bitmap,
return 0;
}
-WRITE16_MEMBER(goori_state::goori_300008_w)
+void goori_state::goori_300008_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
//popmessage("goori_300008_w %04x %04x\n", data, mem_mask); // possibly display disable?
}
-WRITE16_MEMBER(goori_state::goori_30000e_w)
+void goori_state::goori_30000e_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
// eeprom writes?
logerror("%06x goori_30000e_w %04x %04x\n", machine().describe_context(), data, mem_mask); // startup only?
diff --git a/src/mame/drivers/goupil.cpp b/src/mame/drivers/goupil.cpp
index ca9b686ab97..38fc94e5cb2 100644
--- a/src/mame/drivers/goupil.cpp
+++ b/src/mame/drivers/goupil.cpp
@@ -144,8 +144,8 @@ public:
MC6845_UPDATE_ROW(crtc_update_row);
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update_addr_changed);
- DECLARE_READ8_MEMBER(visu24x80_ram_r);
- DECLARE_WRITE8_MEMBER(visu24x80_ram_w);
+ uint8_t visu24x80_ram_r(offs_t offset);
+ void visu24x80_ram_w(offs_t offset, uint8_t data);
void goupil_g2(machine_config &config);
@@ -507,14 +507,14 @@ MC6845_ON_UPDATE_ADDR_CHANGED(goupil_g2_state::crtc_update_addr_changed)
{
}
-WRITE8_MEMBER( goupil_g2_state::visu24x80_ram_w )
+void goupil_g2_state::visu24x80_ram_w(offs_t offset, uint8_t data)
{
LOG("%s: write visu24x80_ram_w mem : 0x%.4X <- 0x%X\n",machine().describe_context(),offset,data);
m_visu24x80_ram->pointer()[offset] = data;
}
-READ8_MEMBER( goupil_g2_state::visu24x80_ram_r )
+uint8_t goupil_g2_state::visu24x80_ram_r(offs_t offset)
{
uint8_t data;
diff --git a/src/mame/drivers/gp2x.cpp b/src/mame/drivers/gp2x.cpp
index 5e9c92722ad..2ff5addc312 100644
--- a/src/mame/drivers/gp2x.cpp
+++ b/src/mame/drivers/gp2x.cpp
@@ -40,16 +40,16 @@ public:
private:
required_device<cpu_device> m_maincpu;
required_region_ptr<uint32_t> m_maincpu_region;
- DECLARE_READ32_MEMBER(gp2x_lcdc_r);
- DECLARE_WRITE32_MEMBER(gp2x_lcdc_w);
- DECLARE_READ32_MEMBER(nand_r);
- DECLARE_WRITE32_MEMBER(nand_w);
- DECLARE_READ32_MEMBER(tx_status_r);
- DECLARE_WRITE32_MEMBER(tx_xmit_w);
- DECLARE_READ32_MEMBER(timer_r);
- DECLARE_READ32_MEMBER(nand_ctrl_r);
- DECLARE_WRITE32_MEMBER(nand_ctrl_w);
- DECLARE_READ32_MEMBER(sdcard_r);
+ uint32_t gp2x_lcdc_r(offs_t offset);
+ void gp2x_lcdc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t nand_r(offs_t offset, uint32_t mem_mask = ~0);
+ void nand_w(offs_t offset, uint32_t data);
+ uint32_t tx_status_r();
+ void tx_xmit_w(uint32_t data);
+ uint32_t timer_r();
+ uint32_t nand_ctrl_r();
+ void nand_ctrl_w(uint32_t data);
+ uint32_t sdcard_r();
required_shared_ptr<uint32_t> m_ram;
uint16_t m_vidregs[0x200/2];
uint32_t m_nand_ptr;
@@ -187,12 +187,12 @@ uint32_t gp2x_state::screen_update_gp2x(screen_device &screen, bitmap_rgb32 &bit
return 0;
}
-READ32_MEMBER( gp2x_state::gp2x_lcdc_r )
+uint32_t gp2x_state::gp2x_lcdc_r(offs_t offset)
{
return m_vidregs[offset*2] | m_vidregs[(offset*2)+1]<<16;
}
-WRITE32_MEMBER( gp2x_state::gp2x_lcdc_w )
+void gp2x_state::gp2x_lcdc_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (mem_mask == 0xffff)
{
@@ -210,7 +210,7 @@ WRITE32_MEMBER( gp2x_state::gp2x_lcdc_w )
}
}
-READ32_MEMBER( gp2x_state::nand_r )
+uint32_t gp2x_state::nand_r(offs_t offset, uint32_t mem_mask)
{
uint32_t *ROM = m_maincpu_region;
uint32_t ret;
@@ -270,7 +270,7 @@ READ32_MEMBER( gp2x_state::nand_r )
return 0;
}
-WRITE32_MEMBER( gp2x_state::nand_w )
+void gp2x_state::nand_w(offs_t offset, uint32_t data)
{
switch (offset)
{
@@ -316,32 +316,32 @@ WRITE32_MEMBER( gp2x_state::nand_w )
}
}
-READ32_MEMBER( gp2x_state::tx_status_r )
+uint32_t gp2x_state::tx_status_r()
{
return 0x6; // tx ready, tx empty
}
-WRITE32_MEMBER( gp2x_state::tx_xmit_w )
+void gp2x_state::tx_xmit_w(uint32_t data)
{
printf("%c", data&0xff);
}
-READ32_MEMBER( gp2x_state::timer_r )
+uint32_t gp2x_state::timer_r()
{
return m_timer++;
}
-READ32_MEMBER( gp2x_state::nand_ctrl_r )
+uint32_t gp2x_state::nand_ctrl_r()
{
return 0x8000<<16; // timed out
}
-WRITE32_MEMBER( gp2x_state::nand_ctrl_w )
+void gp2x_state::nand_ctrl_w(uint32_t data)
{
// printf("%08x to nand_ctrl_w\n", data);
}
-READ32_MEMBER( gp2x_state::sdcard_r )
+uint32_t gp2x_state::sdcard_r()
{
return 0xffff<<16; // at 3e146b0 - indicate timeout & CRC error
}
diff --git a/src/mame/drivers/gpworld.cpp b/src/mame/drivers/gpworld.cpp
index adabe9b843f..0e717fe6fea 100644
--- a/src/mame/drivers/gpworld.cpp
+++ b/src/mame/drivers/gpworld.cpp
@@ -81,12 +81,12 @@ private:
required_shared_ptr<uint8_t> m_sprite_ram;
required_shared_ptr<uint8_t> m_palette_ram;
required_shared_ptr<uint8_t> m_tile_ram;
- DECLARE_READ8_MEMBER(ldp_read);
- DECLARE_READ8_MEMBER(pedal_in);
- DECLARE_WRITE8_MEMBER(ldp_write);
- DECLARE_WRITE8_MEMBER(misc_io_write);
- DECLARE_WRITE8_MEMBER(brake_gas_write);
- DECLARE_WRITE8_MEMBER(palette_write);
+ uint8_t ldp_read();
+ uint8_t pedal_in();
+ void ldp_write(uint8_t data);
+ void misc_io_write(uint8_t data);
+ void brake_gas_write(uint8_t data);
+ void palette_write(offs_t offset, uint8_t data);
virtual void machine_start() override;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_callback);
@@ -270,12 +270,12 @@ void gpworld_state::machine_start()
/* MEMORY HANDLERS */
/* READS */
-READ8_MEMBER(gpworld_state::ldp_read)
+uint8_t gpworld_state::ldp_read()
{
return m_ldp_read_latch;
}
-READ8_MEMBER(gpworld_state::pedal_in)
+uint8_t gpworld_state::pedal_in()
{
if (m_brake_gas)
return ioport("INACCEL")->read();
@@ -285,12 +285,12 @@ READ8_MEMBER(gpworld_state::pedal_in)
}
/* WRITES */
-WRITE8_MEMBER(gpworld_state::ldp_write)
+void gpworld_state::ldp_write(uint8_t data)
{
m_ldp_write_latch = data;
}
-WRITE8_MEMBER(gpworld_state::misc_io_write)
+void gpworld_state::misc_io_write(uint8_t data)
{
m_start_lamp = (data & 0x04) >> 1;
m_nmi_enable = (data & 0x40) >> 6;
@@ -299,12 +299,12 @@ WRITE8_MEMBER(gpworld_state::misc_io_write)
logerror("NMI : %x (0x%x)\n", m_nmi_enable, data);
}
-WRITE8_MEMBER(gpworld_state::brake_gas_write)
+void gpworld_state::brake_gas_write(uint8_t data)
{
m_brake_gas = data & 0x01;
}
-WRITE8_MEMBER(gpworld_state::palette_write)
+void gpworld_state::palette_write(offs_t offset, uint8_t data)
{
/* This is all just a (bad) guess */
int pal_index, r, g, b, a;
diff --git a/src/mame/drivers/gridcomp.cpp b/src/mame/drivers/gridcomp.cpp
index 886a84e72ea..6647ce5859e 100644
--- a/src/mame/drivers/gridcomp.cpp
+++ b/src/mame/drivers/gridcomp.cpp
@@ -137,14 +137,14 @@ private:
IRQ_CALLBACK_MEMBER(irq_callback);
- DECLARE_READ16_MEMBER(grid_9ff0_r);
- DECLARE_READ16_MEMBER(grid_keyb_r);
- DECLARE_READ8_MEMBER(grid_modem_r);
- DECLARE_WRITE16_MEMBER(grid_keyb_w);
- DECLARE_WRITE8_MEMBER(grid_modem_w);
+ uint16_t grid_9ff0_r(offs_t offset);
+ uint16_t grid_keyb_r(offs_t offset);
+ uint8_t grid_modem_r(offs_t offset);
+ void grid_keyb_w(offs_t offset, uint16_t data);
+ void grid_modem_w(offs_t offset, uint8_t data);
- DECLARE_WRITE8_MEMBER(grid_dma_w);
- DECLARE_READ8_MEMBER(grid_dma_r);
+ void grid_dma_w(offs_t offset, uint8_t data);
+ uint8_t grid_dma_r(offs_t offset);
uint32_t screen_update_110x(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_113x(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -163,7 +163,7 @@ private:
};
-READ16_MEMBER(gridcomp_state::grid_9ff0_r)
+uint16_t gridcomp_state::grid_9ff0_r(offs_t offset)
{
uint16_t data = 0;
@@ -179,7 +179,7 @@ READ16_MEMBER(gridcomp_state::grid_9ff0_r)
return data;
}
-READ16_MEMBER(gridcomp_state::grid_keyb_r)
+uint16_t gridcomp_state::grid_keyb_r(offs_t offset)
{
uint16_t data = 0;
@@ -202,7 +202,7 @@ READ16_MEMBER(gridcomp_state::grid_keyb_r)
return data;
}
-WRITE16_MEMBER(gridcomp_state::grid_keyb_w)
+void gridcomp_state::grid_keyb_w(offs_t offset, uint16_t data)
{
LOGKBD("%02x <- %02x\n", 0xdffc0 + (offset << 1), data);
}
@@ -216,7 +216,7 @@ void gridcomp_state::kbd_put(u16 data)
// reject all commands
-READ8_MEMBER(gridcomp_state::grid_modem_r)
+uint8_t gridcomp_state::grid_modem_r(offs_t offset)
{
uint8_t data = 0;
LOG("MDM %02x == %02x\n", 0xdfec0 + (offset << 1), data);
@@ -224,18 +224,18 @@ READ8_MEMBER(gridcomp_state::grid_modem_r)
return data;
}
-WRITE8_MEMBER(gridcomp_state::grid_modem_w)
+void gridcomp_state::grid_modem_w(offs_t offset, uint8_t data)
{
LOG("MDM %02x <- %02x\n", 0xdfec0 + (offset << 1), data);
}
-WRITE8_MEMBER(gridcomp_state::grid_dma_w)
+void gridcomp_state::grid_dma_w(offs_t offset, uint8_t data)
{
m_tms9914->write(7, data);
// LOG("DMA %02x <- %02x\n", offset, data);
}
-READ8_MEMBER(gridcomp_state::grid_dma_r)
+uint8_t gridcomp_state::grid_dma_r(offs_t offset)
{
int ret = m_tms9914->read(7);
// LOG("DMA %02x == %02x\n", offset, ret);
diff --git a/src/mame/drivers/gstream.cpp b/src/mame/drivers/gstream.cpp
index 2dcbff3a66b..c5d88370663 100644
--- a/src/mame/drivers/gstream.cpp
+++ b/src/mame/drivers/gstream.cpp
@@ -184,15 +184,15 @@ private:
int m_toggle;
int m_xoffset;
- DECLARE_WRITE32_MEMBER(vram_w);
- template<int Layer> DECLARE_WRITE16_MEMBER(scrollx_w);
- template<int Layer> DECLARE_WRITE16_MEMBER(scrolly_w);
- DECLARE_WRITE32_MEMBER(gstream_oki_banking_w);
- DECLARE_WRITE32_MEMBER(gstream_oki_4040_w);
- DECLARE_WRITE32_MEMBER(x2222_sound_w);
- DECLARE_READ32_MEMBER(gstream_speedup_r);
- DECLARE_READ32_MEMBER(x2222_speedup_r);
- DECLARE_READ32_MEMBER(x2222_speedup2_r);
+ void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ template<int Layer> void scrollx_w(uint16_t data);
+ template<int Layer> void scrolly_w(uint16_t data);
+ void gstream_oki_banking_w(uint32_t data);
+ void gstream_oki_4040_w(uint32_t data);
+ void x2222_sound_w(uint32_t data);
+ uint32_t gstream_speedup_r();
+ uint32_t x2222_speedup_r();
+ uint32_t x2222_speedup2_r();
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -249,19 +249,19 @@ CUSTOM_INPUT_MEMBER(gstream_state::gstream_mirror_r)
-WRITE32_MEMBER(gstream_state::vram_w)
+void gstream_state::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(&m_vram[offset]);
}
template<int Layer>
-WRITE16_MEMBER(gstream_state::scrollx_w)
+void gstream_state::scrollx_w(uint16_t data)
{
m_scrollx[Layer] = data;
}
template<int Layer>
-WRITE16_MEMBER(gstream_state::scrolly_w)
+void gstream_state::scrolly_w(uint16_t data)
{
m_scrolly[Layer] = data;
}
@@ -283,7 +283,7 @@ void gstream_state::gstream_32bit_map(address_map &map)
map(0xfff80000, 0xffffffff).rom().region("maincpu", 0); // boot rom
}
-WRITE32_MEMBER(gstream_state::gstream_oki_banking_w)
+void gstream_state::gstream_oki_banking_w(uint32_t data)
{
/*
****OKI BANKING****
@@ -343,7 +343,7 @@ WRITE32_MEMBER(gstream_state::gstream_oki_banking_w)
}
// Some clocking?
-WRITE32_MEMBER(gstream_state::gstream_oki_4040_w)
+void gstream_state::gstream_oki_4040_w(uint32_t data)
{
// data == 0 or data == 0x81
}
@@ -379,7 +379,7 @@ void gstream_state::x2222_32bit_map(address_map &map)
map(0xfff00000, 0xffffffff).rom().region("maincpu", 0); // boot rom
}
-WRITE32_MEMBER(gstream_state::x2222_sound_w)
+void gstream_state::x2222_sound_w(uint32_t data)
{
// maybe sound in low 8-bits? but we have no samples anyway assuming it's an OKI
if (data & 0xffffff00)
@@ -1059,7 +1059,7 @@ ROM_START( x2222o )
ROM_END
-READ32_MEMBER(gstream_state::gstream_speedup_r)
+uint32_t gstream_state::gstream_speedup_r()
{
if (m_maincpu->pc() == 0xc0001592)
{
@@ -1070,7 +1070,7 @@ READ32_MEMBER(gstream_state::gstream_speedup_r)
}
-READ32_MEMBER(gstream_state::x2222_speedup_r)
+uint32_t gstream_state::x2222_speedup_r()
{
if (m_maincpu->pc() == 0x22064)
{
@@ -1080,7 +1080,7 @@ READ32_MEMBER(gstream_state::x2222_speedup_r)
return m_workram[0x7ffac / 4];
}
-READ32_MEMBER(gstream_state::x2222_speedup2_r)
+uint32_t gstream_state::x2222_speedup2_r()
{
if (m_maincpu->pc() == 0x23f44)
{
@@ -1093,7 +1093,7 @@ READ32_MEMBER(gstream_state::x2222_speedup2_r)
void gstream_state::init_gstream()
{
- m_maincpu->space(AS_PROGRAM).install_read_handler(0xd1ee0, 0xd1ee3, read32_delegate(*this, FUNC(gstream_state::gstream_speedup_r)));
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xd1ee0, 0xd1ee3, read32smo_delegate(*this, FUNC(gstream_state::gstream_speedup_r)));
m_xoffset = 2;
}
@@ -1121,8 +1121,8 @@ void gstream_state::rearrange_sprite_data(uint8_t* ROM, uint32_t* NEW, uint32_t*
void gstream_state::init_x2222()
{
- m_maincpu->space(AS_PROGRAM).install_read_handler(0x7ffac, 0x7ffaf, read32_delegate(*this, FUNC(gstream_state::x2222_speedup_r))); // older
- m_maincpu->space(AS_PROGRAM).install_read_handler(0x84e3c, 0x84e3f, read32_delegate(*this, FUNC(gstream_state::x2222_speedup2_r))); // newer
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x7ffac, 0x7ffaf, read32smo_delegate(*this, FUNC(gstream_state::x2222_speedup_r))); // older
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x84e3c, 0x84e3f, read32smo_delegate(*this, FUNC(gstream_state::x2222_speedup2_r))); // newer
rearrange_sprite_data(memregion("sprites")->base(), (uint32_t*)memregion("gfx1")->base(), (uint32_t*)memregion("gfx1_lower")->base() );
rearrange_tile_data(memregion("bg1")->base(), (uint32_t*)memregion("gfx2")->base(), (uint32_t*)memregion("gfx2_lower")->base());
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index b88e71d6172..a7c562a1b56 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -320,24 +320,24 @@ private:
required_ioport_array<4> m_ports;
- DECLARE_WRITE32_MEMBER(paletteram32_w);
- DECLARE_READ32_MEMBER(gticlub_k001604_tile_r);
- DECLARE_WRITE32_MEMBER(gticlub_k001604_tile_w);
- DECLARE_READ32_MEMBER(gticlub_k001604_char_r);
- DECLARE_WRITE32_MEMBER(gticlub_k001604_char_w);
- DECLARE_READ32_MEMBER(gticlub_k001604_reg_r);
- DECLARE_WRITE32_MEMBER(gticlub_k001604_reg_w);
- DECLARE_READ8_MEMBER(sysreg_r);
- DECLARE_WRITE8_MEMBER(sysreg_w);
- DECLARE_WRITE16_MEMBER(gn680_sysctrl_w);
- DECLARE_READ32_MEMBER(dsp_dataram0_r);
- DECLARE_WRITE32_MEMBER(dsp_dataram0_w);
- DECLARE_READ32_MEMBER(dsp_dataram1_r);
- DECLARE_WRITE32_MEMBER(dsp_dataram1_w);
+ void paletteram32_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t gticlub_k001604_tile_r(offs_t offset);
+ void gticlub_k001604_tile_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t gticlub_k001604_char_r(offs_t offset);
+ void gticlub_k001604_char_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t gticlub_k001604_reg_r(offs_t offset);
+ void gticlub_k001604_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint8_t sysreg_r(offs_t offset);
+ void sysreg_w(offs_t offset, uint8_t data);
+ void gn680_sysctrl_w(uint16_t data);
+ uint32_t dsp_dataram0_r(offs_t offset);
+ void dsp_dataram0_w(offs_t offset, uint32_t data);
+ uint32_t dsp_dataram1_r(offs_t offset);
+ void dsp_dataram1_w(offs_t offset, uint32_t data);
DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_0);
DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_1);
- DECLARE_WRITE16_MEMBER(soundtimer_en_w);
- DECLARE_WRITE16_MEMBER(soundtimer_count_w);
+ void soundtimer_en_w(uint16_t data);
+ void soundtimer_count_w(uint16_t data);
DECLARE_MACHINE_START(gticlub);
DECLARE_MACHINE_RESET(gticlub);
@@ -369,7 +369,7 @@ private:
};
-WRITE32_MEMBER(gticlub_state::paletteram32_w)
+void gticlub_state::paletteram32_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(&m_generic_paletteram_32[offset]);
data = m_generic_paletteram_32[offset];
@@ -386,47 +386,47 @@ WRITE_LINE_MEMBER(gticlub_state::voodoo_vblank_1)
m_maincpu->set_input_line(INPUT_LINE_IRQ1, state ? ASSERT_LINE : CLEAR_LINE);
}
-READ32_MEMBER(gticlub_state::gticlub_k001604_tile_r)
+uint32_t gticlub_state::gticlub_k001604_tile_r(offs_t offset)
{
k001604_device *k001604 = (m_konppc->get_cgboard_id() ? m_k001604_2 : m_k001604_1);
- return k001604->tile_r(space, offset, mem_mask);
+ return k001604->tile_r(offset);
}
-WRITE32_MEMBER(gticlub_state::gticlub_k001604_tile_w)
+void gticlub_state::gticlub_k001604_tile_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
k001604_device *k001604 = (m_konppc->get_cgboard_id() ? m_k001604_2 : m_k001604_1);
- k001604->tile_w(space, offset, data, mem_mask);
+ k001604->tile_w(offset, data, mem_mask);
}
-READ32_MEMBER(gticlub_state::gticlub_k001604_char_r)
+uint32_t gticlub_state::gticlub_k001604_char_r(offs_t offset)
{
k001604_device *k001604 = (m_konppc->get_cgboard_id() ? m_k001604_2 : m_k001604_1);
- return k001604->char_r(space, offset, mem_mask);
+ return k001604->char_r(offset);
}
-WRITE32_MEMBER(gticlub_state::gticlub_k001604_char_w)
+void gticlub_state::gticlub_k001604_char_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
k001604_device *k001604 = (m_konppc->get_cgboard_id() ? m_k001604_2 : m_k001604_1);
- k001604->char_w(space, offset, data, mem_mask);
+ k001604->char_w(offset, data, mem_mask);
}
-READ32_MEMBER(gticlub_state::gticlub_k001604_reg_r)
+uint32_t gticlub_state::gticlub_k001604_reg_r(offs_t offset)
{
k001604_device *k001604 = (m_konppc->get_cgboard_id() ? m_k001604_2 : m_k001604_1);
- return k001604->reg_r(space, offset, mem_mask);
+ return k001604->reg_r(offset);
}
-WRITE32_MEMBER(gticlub_state::gticlub_k001604_reg_w)
+void gticlub_state::gticlub_k001604_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
k001604_device *k001604 = (m_konppc->get_cgboard_id() ? m_k001604_2 : m_k001604_1);
- k001604->reg_w(space, offset, data, mem_mask);
+ k001604->reg_w(offset, data);
}
/******************************************************************/
-READ8_MEMBER(gticlub_state::sysreg_r)
+uint8_t gticlub_state::sysreg_r(offs_t offset)
{
switch (offset)
{
@@ -458,7 +458,7 @@ READ8_MEMBER(gticlub_state::sysreg_r)
return 0;
}
-WRITE8_MEMBER(gticlub_state::sysreg_w)
+void gticlub_state::sysreg_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -496,7 +496,7 @@ TIMER_CALLBACK_MEMBER(gticlub_state::sound_irq)
}
-WRITE16_MEMBER(gticlub_state::soundtimer_en_w)
+void gticlub_state::soundtimer_en_w(uint16_t data)
{
if (data & 1)
{
@@ -511,7 +511,7 @@ WRITE16_MEMBER(gticlub_state::soundtimer_en_w)
}
}
-WRITE16_MEMBER(gticlub_state::soundtimer_count_w)
+void gticlub_state::soundtimer_count_w(uint16_t data)
{
// Reset the count
m_sound_irq_timer->adjust(attotime::from_usec(m_sound_timer_usec));
@@ -583,7 +583,7 @@ void gticlub_state::sound_memmap(address_map &map)
/*****************************************************************************/
-WRITE16_MEMBER(gticlub_state::gn680_sysctrl_w)
+void gticlub_state::gn680_sysctrl_w(uint16_t data)
{
// bit 15 = watchdog toggle
// lower 4 bits = LEDs?
@@ -603,22 +603,22 @@ void gticlub_state::gn680_memmap(address_map &map)
/*****************************************************************************/
-READ32_MEMBER(gticlub_state::dsp_dataram0_r)
+uint32_t gticlub_state::dsp_dataram0_r(offs_t offset)
{
return m_sharc_dataram_0[offset] & 0xffff;
}
-WRITE32_MEMBER(gticlub_state::dsp_dataram0_w)
+void gticlub_state::dsp_dataram0_w(offs_t offset, uint32_t data)
{
m_sharc_dataram_0[offset] = data;
}
-READ32_MEMBER(gticlub_state::dsp_dataram1_r)
+uint32_t gticlub_state::dsp_dataram1_r(offs_t offset)
{
return m_sharc_dataram_1[offset] & 0xffff;
}
-WRITE32_MEMBER(gticlub_state::dsp_dataram1_w)
+void gticlub_state::dsp_dataram1_w(offs_t offset, uint32_t data)
{
m_sharc_dataram_1[offset] = data;
}
diff --git a/src/mame/drivers/gts3.cpp b/src/mame/drivers/gts3.cpp
index 5f900820296..0239e69af21 100644
--- a/src/mame/drivers/gts3.cpp
+++ b/src/mame/drivers/gts3.cpp
@@ -55,7 +55,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(test_inp);
private:
- DECLARE_WRITE8_MEMBER(segbank_w);
+ void segbank_w(offs_t offset, uint8_t data);
uint8_t u4a_r();
uint8_t u4b_r();
void u4b_w(uint8_t data);
@@ -225,7 +225,7 @@ WRITE_LINE_MEMBER( gts3_state::nmi_w )
m_maincpu->set_input_line(INPUT_LINE_NMI, (state) ? CLEAR_LINE : HOLD_LINE);
}
-WRITE8_MEMBER( gts3_state::segbank_w )
+void gts3_state::segbank_w(offs_t offset, uint8_t data)
{
uint32_t seg1,seg2;
m_segment[offset] = data;
diff --git a/src/mame/drivers/gts3a.cpp b/src/mame/drivers/gts3a.cpp
index d8b2e4d89e3..2e2aeb056bd 100644
--- a/src/mame/drivers/gts3a.cpp
+++ b/src/mame/drivers/gts3a.cpp
@@ -49,12 +49,12 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(test_inp);
private:
- DECLARE_WRITE8_MEMBER(segbank_w);
+ void segbank_w(offs_t offset, uint8_t data);
uint8_t u4a_r();
uint8_t u4b_r();
void u4b_w(uint8_t data);
- DECLARE_READ8_MEMBER(dmd_r);
- DECLARE_WRITE8_MEMBER(dmd_w);
+ uint8_t dmd_r();
+ void dmd_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(nmi_w);
MC6845_UPDATE_ROW(crtc_update_row);
void palette_init(palette_device &palette);
@@ -240,7 +240,7 @@ WRITE_LINE_MEMBER( gts3a_state::nmi_w )
m_maincpu->set_input_line(INPUT_LINE_NMI, (state) ? CLEAR_LINE : HOLD_LINE);
}
-WRITE8_MEMBER( gts3a_state::segbank_w )
+void gts3a_state::segbank_w(offs_t offset, uint8_t data)
{ // this is all wrong
uint32_t seg1,seg2;
m_segment[offset] = data;
@@ -302,12 +302,12 @@ void gts3a_state::init_gts3a()
membank("bank1")->configure_entries(0, 32, &dmd[0x0000], 0x4000);
}
-READ8_MEMBER( gts3a_state::dmd_r )
+uint8_t gts3a_state::dmd_r()
{
return 0;
}
-WRITE8_MEMBER( gts3a_state::dmd_w )
+void gts3a_state::dmd_w(uint8_t data)
{
m_dmd = data;
membank("bank1")->set_entry(data & 0x1f);
diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp
index 20feb659669..fc8a3fecce8 100644
--- a/src/mame/drivers/guab.cpp
+++ b/src/mame/drivers/guab.cpp
@@ -94,8 +94,8 @@ protected:
private:
EF9369_COLOR_UPDATE(ef9369_color_update);
- DECLARE_WRITE16_MEMBER(tms34061_w);
- DECLARE_READ16_MEMBER(tms34061_r);
+ void tms34061_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t tms34061_r(offs_t offset, uint16_t mem_mask = ~0);
uint32_t screen_update_guab(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void output1_w(uint8_t data);
@@ -233,7 +233,7 @@ EF9369_COLOR_UPDATE( guab_state::ef9369_color_update )
m_palette->set_pen_color(entry, pal4bit(ca), pal4bit(cb), pal4bit(cc));
}
-WRITE16_MEMBER( guab_state::tms34061_w )
+void guab_state::tms34061_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
int func = (offset >> 19) & 3;
int row = (offset >> 7) & 0xff;
@@ -251,7 +251,7 @@ WRITE16_MEMBER( guab_state::tms34061_w )
m_tms34061->write(col | 1, row, func, data & 0xff);
}
-READ16_MEMBER( guab_state::tms34061_r )
+uint16_t guab_state::tms34061_r(offs_t offset, uint16_t mem_mask)
{
uint16_t data = 0;
int func = (offset >> 19) & 3;
diff --git a/src/mame/drivers/gunpey.cpp b/src/mame/drivers/gunpey.cpp
index 3bef3057e15..9b79660e2aa 100644
--- a/src/mame/drivers/gunpey.cpp
+++ b/src/mame/drivers/gunpey.cpp
@@ -230,15 +230,15 @@ public:
void init_gunpey();
private:
- DECLARE_WRITE8_MEMBER(status_w);
- DECLARE_READ8_MEMBER(status_r);
- DECLARE_READ8_MEMBER(inputs_r);
- DECLARE_WRITE8_MEMBER(blitter_w);
- DECLARE_WRITE8_MEMBER(blitter_upper_w);
- DECLARE_WRITE8_MEMBER(blitter_upper2_w);
- DECLARE_WRITE8_MEMBER(output_w);
- DECLARE_WRITE16_MEMBER(vram_bank_w);
- DECLARE_WRITE16_MEMBER(vregs_addr_w);
+ void status_w(offs_t offset, uint8_t data);
+ uint8_t status_r(offs_t offset);
+ uint8_t inputs_r(offs_t offset);
+ void blitter_w(offs_t offset, uint8_t data);
+ void blitter_upper_w(offs_t offset, uint8_t data);
+ void blitter_upper2_w(offs_t offset, uint8_t data);
+ void output_w(uint8_t data);
+ void vram_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void vregs_addr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
@@ -586,7 +586,7 @@ void gunpey_state::irq_check(uint8_t irq_type)
m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0x200/4); // V30
}
-WRITE8_MEMBER(gunpey_state::status_w)
+void gunpey_state::status_w(offs_t offset, uint8_t data)
{
if(offset == 1)
{
@@ -601,7 +601,7 @@ WRITE8_MEMBER(gunpey_state::status_w)
}
}
-READ8_MEMBER(gunpey_state::status_r)
+uint8_t gunpey_state::status_r(offs_t offset)
{
if(offset == 1)
return m_irq_cause;
@@ -609,7 +609,7 @@ READ8_MEMBER(gunpey_state::status_r)
return m_irq_mask;
}
-READ8_MEMBER(gunpey_state::inputs_r)
+uint8_t gunpey_state::inputs_r(offs_t offset)
{
switch(offset+0x7f40)
{
@@ -989,7 +989,7 @@ int gunpey_state::decompress_sprite(unsigned char *buf, int ix, int iy, int ow,
return 0;
}
-WRITE8_MEMBER(gunpey_state::blitter_w)
+void gunpey_state::blitter_w(offs_t offset, uint8_t data)
{
uint16_t *blit_ram = m_blit_ram;
@@ -1051,20 +1051,20 @@ WRITE8_MEMBER(gunpey_state::blitter_w)
}
}
-WRITE8_MEMBER(gunpey_state::blitter_upper_w)
+void gunpey_state::blitter_upper_w(offs_t offset, uint8_t data)
{
//logerror("gunpey_blitter_upper_w %02x %02x\n", offset, data);
}
-WRITE8_MEMBER(gunpey_state::blitter_upper2_w)
+void gunpey_state::blitter_upper2_w(offs_t offset, uint8_t data)
{
//logerror("gunpey_blitter_upper2_w %02x %02x\n", offset, data);
}
-WRITE8_MEMBER(gunpey_state::output_w)
+void gunpey_state::output_w(uint8_t data)
{
//bit 0 is coin counter
// popmessage("%02x",data);
@@ -1072,12 +1072,12 @@ WRITE8_MEMBER(gunpey_state::output_w)
m_oki->set_rom_bank((data & 0x70) >> 4);
}
-WRITE16_MEMBER(gunpey_state::vram_bank_w)
+void gunpey_state::vram_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_vram_bank);
}
-WRITE16_MEMBER(gunpey_state::vregs_addr_w)
+void gunpey_state::vregs_addr_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_vreg_addr);
}
diff --git a/src/mame/drivers/h19.cpp b/src/mame/drivers/h19.cpp
index fd161b86383..f1b97ffcabb 100644
--- a/src/mame/drivers/h19.cpp
+++ b/src/mame/drivers/h19.cpp
@@ -102,10 +102,10 @@ public:
void h19(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(h19_keyclick_w);
- DECLARE_WRITE8_MEMBER(h19_bell_w);
- DECLARE_READ8_MEMBER(kbd_key_r);
- DECLARE_READ8_MEMBER(kbd_flags_r);
+ void h19_keyclick_w(uint8_t data);
+ void h19_bell_w(uint8_t data);
+ uint8_t kbd_key_r();
+ uint8_t kbd_flags_r();
DECLARE_READ_LINE_MEMBER(mm5740_shift_r);
DECLARE_READ_LINE_MEMBER(mm5740_control_r);
DECLARE_WRITE_LINE_MEMBER(mm5740_data_ready_w);
@@ -374,7 +374,7 @@ void h19_state::machine_reset()
}
-WRITE8_MEMBER( h19_state::h19_keyclick_w )
+void h19_state::h19_keyclick_w(uint8_t data)
{
/* Keyclick - 6 mSec */
@@ -383,7 +383,7 @@ WRITE8_MEMBER( h19_state::h19_keyclick_w )
timer_set(attotime::from_msec(6), TIMER_KEY_CLICK_OFF);
}
-WRITE8_MEMBER( h19_state::h19_bell_w )
+void h19_state::h19_bell_w(uint8_t data)
{
/* Bell (^G) - 200 mSec */
@@ -414,7 +414,7 @@ uint16_t h19_state::translate_mm5740_b(uint16_t b)
return ((b & 0x100) >> 2) | ((b & 0x0c0) << 1) | (b & 0x03f);
}
-READ8_MEMBER(h19_state::kbd_key_r)
+uint8_t h19_state::kbd_key_r()
{
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
m_strobe = false;
@@ -423,7 +423,7 @@ READ8_MEMBER(h19_state::kbd_key_r)
return m_transchar;
}
-READ8_MEMBER(h19_state::kbd_flags_r)
+uint8_t h19_state::kbd_flags_r()
{
uint16_t modifiers = m_kbspecial->read();
uint8_t rv = modifiers & 0x7f;
diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp
index e0a23c580be..7eec43ceb8e 100644
--- a/src/mame/drivers/h8.cpp
+++ b/src/mame/drivers/h8.cpp
@@ -75,9 +75,9 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(button_0);
private:
- DECLARE_READ8_MEMBER(portf0_r);
- DECLARE_WRITE8_MEMBER(portf0_w);
- DECLARE_WRITE8_MEMBER(portf1_w);
+ uint8_t portf0_r();
+ void portf0_w(uint8_t data);
+ void portf1_w(uint8_t data);
void h8_status_callback(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(h8_inte_callback);
TIMER_DEVICE_CALLBACK_MEMBER(h8_irq_pulse);
@@ -115,7 +115,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(h8_state::h8_irq_pulse)
m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf); // I8080
}
-READ8_MEMBER( h8_state::portf0_r )
+uint8_t h8_state::portf0_r()
{
// reads the keyboard
@@ -145,7 +145,7 @@ READ8_MEMBER( h8_state::portf0_r )
return data;
}
-WRITE8_MEMBER( h8_state::portf0_w )
+void h8_state::portf0_w(uint8_t data)
{
// this will always turn off int10 that was set by the timer
// d0-d3 = digit select
@@ -166,7 +166,7 @@ WRITE8_MEMBER( h8_state::portf0_w )
if (!BIT(data, 4)) m_irq_ctl |= 2;
}
-WRITE8_MEMBER( h8_state::portf1_w )
+void h8_state::portf1_w(uint8_t data)
{
//d7 segment dot
//d6 segment f
diff --git a/src/mame/drivers/h89.cpp b/src/mame/drivers/h89.cpp
index f82be5e850c..2f725965a6d 100644
--- a/src/mame/drivers/h89.cpp
+++ b/src/mame/drivers/h89.cpp
@@ -41,7 +41,7 @@ public:
private:
required_device<cpu_device> m_maincpu;
- DECLARE_WRITE8_MEMBER( port_f2_w );
+ void port_f2_w(uint8_t data);
uint8_t m_port_f2;
virtual void machine_reset() override;
@@ -167,7 +167,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(h89_state::h89_irq_timer)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); // Z80
}
-WRITE8_MEMBER( h89_state::port_f2_w )
+void h89_state::port_f2_w(uint8_t data)
{
// Bit 0 - Single-step
// Bit 1 - Enable timer interrupt (2mSec Clock)
diff --git a/src/mame/drivers/halleys.cpp b/src/mame/drivers/halleys.cpp
index 16012688f04..a4423bd304c 100644
--- a/src/mame/drivers/halleys.cpp
+++ b/src/mame/drivers/halleys.cpp
@@ -268,18 +268,18 @@ private:
offs_t m_collision_detection;
std::vector<uint8_t> m_paletteram;
- DECLARE_WRITE8_MEMBER(bgtile_w);
- DECLARE_READ8_MEMBER(blitter_status_r);
- DECLARE_READ8_MEMBER(blitter_r);
- DECLARE_WRITE8_MEMBER(blitter_w);
- DECLARE_READ8_MEMBER(collision_id_r);
- DECLARE_READ8_MEMBER(paletteram_r);
- DECLARE_WRITE8_MEMBER(paletteram_w);
- DECLARE_READ8_MEMBER(vector_r);
- DECLARE_WRITE8_MEMBER(firq_ack_w);
- DECLARE_WRITE8_MEMBER(soundcommand_w);
- DECLARE_READ8_MEMBER(coin_lockout_r);
- DECLARE_READ8_MEMBER(io_mirror_r);
+ void bgtile_w(offs_t offset, uint8_t data);
+ uint8_t blitter_status_r();
+ uint8_t blitter_r(offs_t offset);
+ void blitter_w(offs_t offset, uint8_t data);
+ uint8_t collision_id_r();
+ uint8_t paletteram_r(offs_t offset);
+ void paletteram_w(offs_t offset, uint8_t data);
+ uint8_t vector_r(offs_t offset);
+ void firq_ack_w(uint8_t data);
+ void soundcommand_w(uint8_t data);
+ uint8_t coin_lockout_r();
+ uint8_t io_mirror_r(offs_t offset);
void blit(int offset);
void sndnmi_msk_w(uint8_t data);
void halleys_palette(palette_device &palette);
@@ -1021,7 +1021,7 @@ if (0) {
// draws Ben Bero Beh's color backdrop(verification required)
-WRITE8_MEMBER(halleys_state::bgtile_w)
+void halleys_state::bgtile_w(offs_t offset, uint8_t data)
{
int yskip, xskip, ecx;
uint16_t *edi;
@@ -1046,7 +1046,7 @@ WRITE8_MEMBER(halleys_state::bgtile_w)
}
-READ8_MEMBER(halleys_state::blitter_status_r)
+uint8_t halleys_state::blitter_status_r()
{
if (m_game_id==GAME_HALLEYS && m_maincpu->pc()==0x8017) return(0x55); // HACK: trick SRAM test on startup
@@ -1054,7 +1054,7 @@ READ8_MEMBER(halleys_state::blitter_status_r)
}
-READ8_MEMBER(halleys_state::blitter_r)
+uint8_t halleys_state::blitter_r(offs_t offset)
{
int i = offset & 0xf;
@@ -1070,7 +1070,7 @@ TIMER_CALLBACK_MEMBER(halleys_state::blitter_reset)
}
-WRITE8_MEMBER(halleys_state::blitter_w)
+void halleys_state::blitter_w(offs_t offset, uint8_t data)
{
int i = offset & 0xf;
@@ -1094,7 +1094,7 @@ WRITE8_MEMBER(halleys_state::blitter_w)
}
-READ8_MEMBER(halleys_state::collision_id_r)
+uint8_t halleys_state::collision_id_r()
{
/*
Collision detection abstract:
@@ -1226,12 +1226,12 @@ void halleys_state::halleys_decode_rgb(uint32_t *r, uint32_t *g, uint32_t *b, in
*b = prom_6330[0x40 + (bit0|bit1|bit2|bit3|bit4)];
}
-READ8_MEMBER(halleys_state::paletteram_r)
+uint8_t halleys_state::paletteram_r(offs_t offset)
{
return m_paletteram[offset];
}
-WRITE8_MEMBER(halleys_state::paletteram_w)
+void halleys_state::paletteram_w(offs_t offset, uint8_t data)
{
uint32_t *const pal_ptr = m_internal_palette.get();
@@ -1513,9 +1513,9 @@ uint32_t halleys_state::screen_update_benberob(screen_device &screen, bitmap_ind
#if HALLEYS_DEBUG
-READ8_MEMBER(halleys_state::zero_r){ return(0); }
+uint8_t halleys_state::zero_r(){ return(0); }
-READ8_MEMBER(halleys_state::debug_r)
+uint8_t halleys_state::debug_r(offs_t offset)
{
return(m_io_ram[offset]);
}
@@ -1579,13 +1579,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(halleys_state::benberob_scanline)
}
-READ8_MEMBER(halleys_state::vector_r)
+uint8_t halleys_state::vector_r(offs_t offset)
{
return(m_cpu1_base[0xffe0 + (offset^(m_mVectorType<<4))]);
}
-WRITE8_MEMBER(halleys_state::firq_ack_w)
+void halleys_state::firq_ack_w(uint8_t data)
{
m_io_ram[0x9c] = data;
@@ -1600,7 +1600,7 @@ void halleys_state::sndnmi_msk_w(uint8_t data)
}
-WRITE8_MEMBER(halleys_state::soundcommand_w)
+void halleys_state::soundcommand_w(uint8_t data)
{
m_io_ram[0x8a] = data;
m_soundlatch->write(data);
@@ -1608,7 +1608,7 @@ WRITE8_MEMBER(halleys_state::soundcommand_w)
}
-READ8_MEMBER(halleys_state::coin_lockout_r)
+uint8_t halleys_state::coin_lockout_r()
{
// This is a hack, but it lets you coin up when COIN1 or COIN2 are signaled.
// See NMI for the twisted logic that is involved in handling coin input :
@@ -1625,7 +1625,7 @@ READ8_MEMBER(halleys_state::coin_lockout_r)
}
-READ8_MEMBER(halleys_state::io_mirror_r)
+uint8_t halleys_state::io_mirror_r(offs_t offset)
{
static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3" };
diff --git a/src/mame/drivers/harriet.cpp b/src/mame/drivers/harriet.cpp
index 91dbdcd32fa..9f375d1004e 100644
--- a/src/mame/drivers/harriet.cpp
+++ b/src/mame/drivers/harriet.cpp
@@ -28,9 +28,10 @@ public:
}
void harriet(machine_config &config);
+
private:
- DECLARE_READ8_MEMBER(zpram_r);
- DECLARE_WRITE8_MEMBER(zpram_w);
+ uint8_t zpram_r(offs_t offset);
+ void zpram_w(offs_t offset, uint8_t data);
void harriet_map(address_map &map);
@@ -41,12 +42,12 @@ private:
std::unique_ptr<u8[]> m_zpram_data;
};
-READ8_MEMBER(harriet_state::zpram_r)
+uint8_t harriet_state::zpram_r(offs_t offset)
{
return m_zpram_data[offset];
}
-WRITE8_MEMBER(harriet_state::zpram_w)
+void harriet_state::zpram_w(offs_t offset, uint8_t data)
{
m_zpram_data[offset] = data;
}
diff --git a/src/mame/drivers/hazeltin.cpp b/src/mame/drivers/hazeltin.cpp
index 5494c9e3b48..1055ae69d69 100644
--- a/src/mame/drivers/hazeltin.cpp
+++ b/src/mame/drivers/hazeltin.cpp
@@ -147,23 +147,23 @@ private:
uint32_t screen_update_hazl1500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_READ8_MEMBER(ram_r);
- DECLARE_WRITE8_MEMBER(ram_w);
+ uint8_t ram_r(offs_t offset);
+ void ram_w(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER(system_test_r); // noted as "for use with auto test equip" in flowchart on pg. 30, ref[1], jumps to 0x8000 if bit 0 is unset
- DECLARE_READ8_MEMBER(status_reg_2_r);
- DECLARE_WRITE8_MEMBER(status_reg_3_w);
+ uint8_t system_test_r(); // noted as "for use with auto test equip" in flowchart on pg. 30, ref[1], jumps to 0x8000 if bit 0 is unset
+ uint8_t status_reg_2_r();
+ void status_reg_3_w(uint8_t data);
- DECLARE_READ8_MEMBER(uart_r);
- DECLARE_WRITE8_MEMBER(uart_w);
+ uint8_t uart_r();
+ void uart_w(uint8_t data);
- DECLARE_READ8_MEMBER(kbd_status_latch_r);
- DECLARE_READ8_MEMBER(kbd_encoder_r);
+ uint8_t kbd_status_latch_r();
+ uint8_t kbd_encoder_r();
DECLARE_READ_LINE_MEMBER(ay3600_shift_r);
DECLARE_READ_LINE_MEMBER(ay3600_control_r);
DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w);
- DECLARE_WRITE8_MEMBER(refresh_address_w);
+ void refresh_address_w(uint8_t data);
NETDEV_ANALOG_CALLBACK_MEMBER(video_out_cb);
NETDEV_ANALOG_CALLBACK_MEMBER(vblank_cb);
@@ -282,7 +282,7 @@ uint32_t hazl1500_state::screen_update_hazl1500(screen_device &screen, bitmap_rg
return 0;
}
-READ8_MEMBER( hazl1500_state::ram_r )
+uint8_t hazl1500_state::ram_r(offs_t offset)
{
const uint8_t* chips[2][8] =
{
@@ -301,7 +301,7 @@ READ8_MEMBER( hazl1500_state::ram_r )
return ret;
}
-WRITE8_MEMBER( hazl1500_state::ram_w )
+void hazl1500_state::ram_w(offs_t offset, uint8_t data)
{
uint8_t* chips[2][8] =
{
@@ -320,12 +320,12 @@ WRITE8_MEMBER( hazl1500_state::ram_w )
}
}
-READ8_MEMBER( hazl1500_state::system_test_r )
+uint8_t hazl1500_state::system_test_r()
{
return 0xff;
}
-READ8_MEMBER( hazl1500_state::status_reg_2_r )
+uint8_t hazl1500_state::status_reg_2_r()
{
uint8_t misc_dips = m_misc_dips->read();
uint8_t status = 0;
@@ -338,28 +338,28 @@ READ8_MEMBER( hazl1500_state::status_reg_2_r )
return status ^ 0xff;
}
-WRITE8_MEMBER( hazl1500_state::status_reg_3_w )
+void hazl1500_state::status_reg_3_w(uint8_t data)
{
m_status_reg_3 = data;
m_uart->write_rdav(BIT(data, 2));
}
-READ8_MEMBER( hazl1500_state::uart_r )
+uint8_t hazl1500_state::uart_r()
{
return (m_uart->receive() & 0x7f) | (m_uart->pe_r() << 7);
}
-WRITE8_MEMBER( hazl1500_state::uart_w )
+void hazl1500_state::uart_w(uint8_t data)
{
m_uart->transmit((data & 0x7f) | (BIT(m_misc_dips->read(), 3) ? 0x00 : 0x80));
}
-READ8_MEMBER( hazl1500_state::kbd_status_latch_r )
+uint8_t hazl1500_state::kbd_status_latch_r()
{
return m_kbd_status_latch;
}
-READ8_MEMBER(hazl1500_state::kbd_encoder_r)
+uint8_t hazl1500_state::kbd_encoder_r()
{
return m_kbdc->b_r() & 0xff; // TODO: This should go through an 8048, but we have no dump of it currently.
}
@@ -460,7 +460,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(hazl1500_state::video_out_cb)
m_last_fraction = pixel_fraction;
}
-WRITE8_MEMBER(hazl1500_state::refresh_address_w)
+void hazl1500_state::refresh_address_w(uint8_t data)
{
synchronize();
//printf("refresh: %02x, %d, %d\n", data, m_screen->hpos(), m_screen->vpos());
diff --git a/src/mame/drivers/hhtiger.cpp b/src/mame/drivers/hhtiger.cpp
index 6dcd90807ff..e0d486317c3 100644
--- a/src/mame/drivers/hhtiger.cpp
+++ b/src/mame/drivers/hhtiger.cpp
@@ -90,9 +90,9 @@ private:
virtual void machine_reset() override;
virtual void machine_start() override;
- DECLARE_READ8_MEMBER(disable_rom_r);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t disable_rom_r();
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(busreq_w);
uint8_t memory_read_byte(offs_t offset);
void memory_write_byte(offs_t offset, uint8_t data);
@@ -233,7 +233,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER(hhtiger_state::draw_text)
}
-READ8_MEMBER(hhtiger_state::disable_rom_r)
+uint8_t hhtiger_state::disable_rom_r()
{
if (!machine().side_effects_disabled())
m_rom_mirror = false;
@@ -241,7 +241,7 @@ READ8_MEMBER(hhtiger_state::disable_rom_r)
return 0xff;
}
-READ8_MEMBER(hhtiger_state::read)
+uint8_t hhtiger_state::read(offs_t offset)
{
uint8_t data;
@@ -265,7 +265,7 @@ READ8_MEMBER(hhtiger_state::read)
return data;
}
-WRITE8_MEMBER(hhtiger_state::write)
+void hhtiger_state::write(offs_t offset, uint8_t data)
{
m_ram->pointer()[offset] = data;
}
diff --git a/src/mame/drivers/highvdeo.cpp b/src/mame/drivers/highvdeo.cpp
index 8f3ad22c597..6fb110ad7d4 100644
--- a/src/mame/drivers/highvdeo.cpp
+++ b/src/mame/drivers/highvdeo.cpp
@@ -148,31 +148,31 @@ private:
uint16_t m_vblank_bit;
uint16_t m_brasil_prot_latch;
uint16_t m_grancapi_prot_latch;
- DECLARE_READ16_MEMBER(read0_r);
- DECLARE_READ16_MEMBER(read1_r);
- DECLARE_READ16_MEMBER(read2_r);
- DECLARE_READ8_MEMBER(read2_nmi_clear_r);
- template<int Mask> DECLARE_WRITE8_MEMBER(bankselect_w);
- DECLARE_WRITE16_MEMBER(write1_w);
- DECLARE_READ16_MEMBER(tv_ncf_read1_r);
- DECLARE_READ16_MEMBER(newmcard_status_r);
- DECLARE_READ16_MEMBER(newmcard_vblank_r);
- DECLARE_WRITE16_MEMBER(newmcard_vblank_w);
- DECLARE_WRITE16_MEMBER(write2_w);
- DECLARE_WRITE16_MEMBER(nyj_write2_w);
- DECLARE_READ16_MEMBER(brasil_status_r);
- DECLARE_WRITE16_MEMBER(brasil_status_w);
- DECLARE_READ16_MEMBER(ciclone_status_r);
- DECLARE_READ16_MEMBER(grancapi_status_r);
- DECLARE_WRITE16_MEMBER(grancapi_status_w);
- DECLARE_READ16_MEMBER(magicbom_status_r);
- DECLARE_READ16_MEMBER(record_status_r);
- DECLARE_WRITE16_MEMBER(fashion_output_w);
- DECLARE_WRITE16_MEMBER(tv_oki6376_w);
- DECLARE_READ8_MEMBER(tv_oki6376_r);
- DECLARE_WRITE16_MEMBER(tv_ncf_oki6376_st_w);
- DECLARE_READ8_MEMBER(nmi_clear_r);
- DECLARE_WRITE8_MEMBER(nmi_clear_w);
+ uint16_t read0_r();
+ uint16_t read1_r();
+ uint16_t read2_r();
+ uint8_t read2_nmi_clear_r();
+ template<int Mask> void bankselect_w(uint8_t data);
+ void write1_w(uint16_t data);
+ uint16_t tv_ncf_read1_r();
+ uint16_t newmcard_status_r(offs_t offset);
+ uint16_t newmcard_vblank_r();
+ void newmcard_vblank_w(uint16_t data);
+ void write2_w(uint16_t data);
+ void nyj_write2_w(uint16_t data);
+ uint16_t brasil_status_r(offs_t offset);
+ void brasil_status_w(uint16_t data);
+ uint16_t ciclone_status_r(offs_t offset);
+ uint16_t grancapi_status_r(offs_t offset);
+ void grancapi_status_w(uint16_t data);
+ uint16_t magicbom_status_r(offs_t offset);
+ uint16_t record_status_r(offs_t offset);
+ void fashion_output_w(uint16_t data);
+ void tv_oki6376_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint8_t tv_oki6376_r();
+ void tv_ncf_oki6376_st_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint8_t nmi_clear_r();
+ void nmi_clear_w(uint8_t data);
uint32_t screen_update_tourvisn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_brasil(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -263,22 +263,22 @@ uint32_t highvdeo_state::screen_update_brasil(screen_device &screen, bitmap_rgb3
-READ16_MEMBER(highvdeo_state::read0_r)
+uint16_t highvdeo_state::read0_r()
{
return m_inputs[0]->read();
}
-READ16_MEMBER(highvdeo_state::read1_r)
+uint16_t highvdeo_state::read1_r()
{
return m_inputs[1]->read();
}
-READ16_MEMBER(highvdeo_state::read2_r)
+uint16_t highvdeo_state::read2_r()
{
return m_inputs[2]->read();
}
-READ8_MEMBER(highvdeo_state::read2_nmi_clear_r)
+uint8_t highvdeo_state::read2_nmi_clear_r()
{
if (!machine().side_effects_disabled())
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
@@ -286,13 +286,13 @@ READ8_MEMBER(highvdeo_state::read2_nmi_clear_r)
}
template<int Mask>
-WRITE8_MEMBER(highvdeo_state::bankselect_w)
+void highvdeo_state::bankselect_w(uint8_t data)
{
m_mainbank->set_entry(data & Mask);
}
-WRITE16_MEMBER(highvdeo_state::tv_oki6376_w)
+void highvdeo_state::tv_oki6376_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
static int okidata;
if (ACCESSING_BITS_0_7 && okidata != data)
@@ -303,7 +303,7 @@ WRITE16_MEMBER(highvdeo_state::tv_oki6376_w)
}
}
-READ8_MEMBER(highvdeo_state::tv_oki6376_r)
+uint8_t highvdeo_state::tv_oki6376_r()
{
if (!machine().side_effects_disabled())
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
@@ -311,7 +311,7 @@ READ8_MEMBER(highvdeo_state::tv_oki6376_r)
return m_okim6376->busy_r();
}
-READ8_MEMBER(highvdeo_state::nmi_clear_r)
+uint8_t highvdeo_state::nmi_clear_r()
{
if (!machine().side_effects_disabled())
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
@@ -319,12 +319,12 @@ READ8_MEMBER(highvdeo_state::nmi_clear_r)
return 0xff;
}
-WRITE8_MEMBER(highvdeo_state::nmi_clear_w)
+void highvdeo_state::nmi_clear_w(uint8_t data)
{
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
-WRITE16_MEMBER(highvdeo_state::write1_w)
+void highvdeo_state::write1_w(uint16_t data)
{
/*
- Lbits -
@@ -368,7 +368,7 @@ void highvdeo_state::tv_vcf_io(address_map &map)
}
-READ16_MEMBER(highvdeo_state::tv_ncf_read1_r)
+uint16_t highvdeo_state::tv_ncf_read1_r()
{
static int resetpulse = 0;
@@ -379,7 +379,7 @@ READ16_MEMBER(highvdeo_state::tv_ncf_read1_r)
return (m_inputs[1]->read() & 0xbf) | resetpulse;
}
-WRITE16_MEMBER(highvdeo_state::tv_ncf_oki6376_st_w)
+void highvdeo_state::tv_ncf_oki6376_st_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (ACCESSING_BITS_0_7)
{
@@ -438,7 +438,7 @@ void highvdeo_state::nyjoker_io(address_map &map)
}
-WRITE16_MEMBER(highvdeo_state::nyj_write2_w)
+void highvdeo_state::nyj_write2_w(uint16_t data)
{
/*
7654 3210
@@ -479,7 +479,7 @@ void highvdeo_state::tv_tcf_io(address_map &map)
*
****************************/
-READ16_MEMBER(highvdeo_state::ciclone_status_r)
+uint16_t highvdeo_state::ciclone_status_r(offs_t offset)
{
static uint16_t resetpulse;
switch(offset*2)
@@ -505,7 +505,7 @@ void highvdeo_state::ciclone_io(address_map &map)
*
****************************/
-READ16_MEMBER(highvdeo_state::newmcard_status_r)
+uint16_t highvdeo_state::newmcard_status_r(offs_t offset)
{
switch(offset*2)
{
@@ -519,7 +519,7 @@ READ16_MEMBER(highvdeo_state::newmcard_status_r)
return 0;
}
-READ16_MEMBER(highvdeo_state::record_status_r)
+uint16_t highvdeo_state::record_status_r(offs_t offset)
{
static uint16_t resetpulse;
switch(offset*2)
@@ -537,17 +537,17 @@ READ16_MEMBER(highvdeo_state::record_status_r)
}
-READ16_MEMBER(highvdeo_state::newmcard_vblank_r)
+uint16_t highvdeo_state::newmcard_vblank_r()
{
return m_vblank_bit; //0x80
}
-WRITE16_MEMBER(highvdeo_state::newmcard_vblank_w)
+void highvdeo_state::newmcard_vblank_w(uint16_t data)
{
m_vblank_bit = data;
}
-WRITE16_MEMBER(highvdeo_state::write2_w)
+void highvdeo_state::write2_w(uint16_t data)
{
int i;
@@ -604,7 +604,7 @@ void highvdeo_state::record_io(address_map &map)
****************************/
-READ16_MEMBER(highvdeo_state::brasil_status_r)
+uint16_t highvdeo_state::brasil_status_r(offs_t offset)
{
static uint16_t resetpulse;
@@ -621,7 +621,7 @@ READ16_MEMBER(highvdeo_state::brasil_status_r)
}
/*bankaddress might be incorrect.*/
-WRITE16_MEMBER(highvdeo_state::brasil_status_w)
+void highvdeo_state::brasil_status_w(uint16_t data)
{
switch(data & 3) //data & 7?
{
@@ -635,7 +635,7 @@ WRITE16_MEMBER(highvdeo_state::brasil_status_w)
// popmessage("%04x",data);
}
-READ16_MEMBER(highvdeo_state::grancapi_status_r)
+uint16_t highvdeo_state::grancapi_status_r(offs_t offset)
{
static uint16_t resetpulse;
@@ -652,7 +652,7 @@ READ16_MEMBER(highvdeo_state::grancapi_status_r)
}
/*bankaddress might be incorrect.*/
-WRITE16_MEMBER(highvdeo_state::grancapi_status_w)
+void highvdeo_state::grancapi_status_w(uint16_t data)
{
switch(data & 3) //data & 7?
{
@@ -666,7 +666,7 @@ WRITE16_MEMBER(highvdeo_state::grancapi_status_w)
// popmessage("%04x",data);
}
-READ16_MEMBER(highvdeo_state::magicbom_status_r)
+uint16_t highvdeo_state::magicbom_status_r(offs_t offset)
{
static uint16_t resetpulse;
@@ -705,7 +705,7 @@ void highvdeo_state::brasil_io(address_map &map)
// map(0xffa2, 0xffa3).w(FUNC(highvdeo_state::));
}
-WRITE16_MEMBER(highvdeo_state::fashion_output_w)
+void highvdeo_state::fashion_output_w(uint16_t data)
{
int i;
diff --git a/src/mame/drivers/hitpoker.cpp b/src/mame/drivers/hitpoker.cpp
index d2b16c08596..bc22a8888b7 100644
--- a/src/mame/drivers/hitpoker.cpp
+++ b/src/mame/drivers/hitpoker.cpp
@@ -78,12 +78,12 @@ private:
std::unique_ptr<uint8_t[]> m_paletteram;
std::unique_ptr<uint8_t[]> m_colorram;
- DECLARE_READ8_MEMBER(hitpoker_vram_r);
- DECLARE_WRITE8_MEMBER(hitpoker_vram_w);
- DECLARE_READ8_MEMBER(hitpoker_cram_r);
- DECLARE_WRITE8_MEMBER(hitpoker_cram_w);
- DECLARE_READ8_MEMBER(hitpoker_paletteram_r);
- DECLARE_WRITE8_MEMBER(hitpoker_paletteram_w);
+ uint8_t hitpoker_vram_r(offs_t offset);
+ void hitpoker_vram_w(offs_t offset, uint8_t data);
+ uint8_t hitpoker_cram_r(offs_t offset);
+ void hitpoker_cram_w(offs_t offset, uint8_t data);
+ uint8_t hitpoker_paletteram_r(offs_t offset);
+ void hitpoker_paletteram_w(offs_t offset, uint8_t data);
uint8_t hitpoker_pic_r(offs_t offset);
void hitpoker_pic_w(offs_t offset, uint8_t data);
virtual void video_start() override;
@@ -131,7 +131,7 @@ uint32_t hitpoker_state::screen_update_hitpoker(screen_device &screen, bitmap_rg
return 0;
}
-READ8_MEMBER(hitpoker_state::hitpoker_vram_r)
+uint8_t hitpoker_state::hitpoker_vram_r(offs_t offset)
{
uint8_t *ROM = memregion("maincpu")->base();
@@ -141,7 +141,7 @@ READ8_MEMBER(hitpoker_state::hitpoker_vram_r)
return ROM[offset+0x8000];
}
-WRITE8_MEMBER(hitpoker_state::hitpoker_vram_w)
+void hitpoker_state::hitpoker_vram_w(offs_t offset, uint8_t data)
{
// uint8_t *ROM = memregion("maincpu")->base();
@@ -149,7 +149,7 @@ WRITE8_MEMBER(hitpoker_state::hitpoker_vram_w)
m_videoram[offset] = data;
}
-READ8_MEMBER(hitpoker_state::hitpoker_cram_r)
+uint8_t hitpoker_state::hitpoker_cram_r(offs_t offset)
{
uint8_t *ROM = memregion("maincpu")->base();
@@ -159,12 +159,12 @@ READ8_MEMBER(hitpoker_state::hitpoker_cram_r)
return ROM[offset+0xc000];
}
-WRITE8_MEMBER(hitpoker_state::hitpoker_cram_w)
+void hitpoker_state::hitpoker_cram_w(offs_t offset, uint8_t data)
{
m_colorram[offset] = data;
}
-READ8_MEMBER(hitpoker_state::hitpoker_paletteram_r)
+uint8_t hitpoker_state::hitpoker_paletteram_r(offs_t offset)
{
uint8_t *ROM = memregion("maincpu")->base();
@@ -174,7 +174,7 @@ READ8_MEMBER(hitpoker_state::hitpoker_paletteram_r)
return ROM[offset+0xe000];
}
-WRITE8_MEMBER(hitpoker_state::hitpoker_paletteram_w)
+void hitpoker_state::hitpoker_paletteram_w(offs_t offset, uint8_t data)
{
int r,g,b,datax;
m_paletteram[offset] = data;
@@ -217,7 +217,7 @@ void hitpoker_state::hitpoker_pic_w(offs_t offset, uint8_t data)
}
#if 0
-READ8_MEMBER(hitpoker_state::test_r)
+uint8_t hitpoker_state::test_r()
{
return machine().rand();
}
diff --git a/src/mame/drivers/hk68v10.cpp b/src/mame/drivers/hk68v10.cpp
index adcdc349a41..b9f3b502e50 100644
--- a/src/mame/drivers/hk68v10.cpp
+++ b/src/mame/drivers/hk68v10.cpp
@@ -203,12 +203,12 @@ public:
void hk68v10(machine_config &config);
private:
- DECLARE_READ16_MEMBER(bootvect_r);
- DECLARE_WRITE16_MEMBER(bootvect_w);
- //DECLARE_READ16_MEMBER (vme_a24_r);
- //DECLARE_WRITE16_MEMBER (vme_a24_w);
- //DECLARE_READ16_MEMBER (vme_a16_r);
- //DECLARE_WRITE16_MEMBER (vme_a16_w);
+ uint16_t bootvect_r(offs_t offset);
+ void bootvect_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ //uint16_t vme_a24_r();
+ //void vme_a24_w(uint16_t data);
+ //uint16_t vme_a16_r();
+ //void vme_a16_w(uint16_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -274,12 +274,12 @@ void hk68v10_state::machine_reset ()
FC0024: move.l #$0, $0.l # <- zeroing the reset vector
FC002E: move.l #$0, $4.l # There is for sure some hardware mapping going in here
*/
-READ16_MEMBER (hk68v10_state::bootvect_r){
+uint16_t hk68v10_state::bootvect_r(offs_t offset){
LOG(("%s %s\n", FUNCNAME, m_sysrom != &m_sysram[0] ? "as reset" : "as swapped"));
return m_sysrom[offset];
}
-WRITE16_MEMBER (hk68v10_state::bootvect_w){
+void hk68v10_state::bootvect_w(offs_t offset, uint16_t data, uint16_t mem_mask){
LOG (("%s offset %08x, mask %08x, data %04x\n", FUNCNAME, offset, mem_mask, data));
m_sysram[offset % ARRAY_LENGTH(m_sysram)] &= ~mem_mask;
m_sysram[offset % ARRAY_LENGTH(m_sysram)] |= (data & mem_mask);
@@ -288,21 +288,21 @@ WRITE16_MEMBER (hk68v10_state::bootvect_w){
#if 0
/* Dummy VME access methods until the VME bus device is ready for use */
-READ16_MEMBER (hk68v10_state::vme_a24_r){
+uint16_t hk68v10_state::vme_a24_r(){
LOG(("%s\n", FUNCNAME));
return (uint16_t) 0;
}
-WRITE16_MEMBER (hk68v10_state::vme_a24_w){
+void hk68v10_state::vme_a24_w(uint16_t data){
LOG(("%s\n", FUNCNAME));
}
-READ16_MEMBER (hk68v10_state::vme_a16_r){
+uint16_t hk68v10_state::vme_a16_r(){
LOG(("%s\n", FUNCNAME));
return (uint16_t) 0;
}
-WRITE16_MEMBER (hk68v10_state::vme_a16_w){
+void hk68v10_state::vme_a16_w(uint16_t data){
LOG(("%s\n", FUNCNAME));
}
#endif
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index e442c4d94fc..5937c961822 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -65,14 +65,14 @@ public:
DECLARE_READ_LINE_MEMBER(cass3_r);
private:
- DECLARE_READ8_MEMBER(key_r);
- DECLARE_WRITE8_MEMBER(cass_w);
- DECLARE_READ8_MEMBER(cass2_r);
- DECLARE_READ8_MEMBER(exxx_r);
- DECLARE_WRITE8_MEMBER(port7f_w);
- DECLARE_WRITE8_MEMBER(portff_w);
- DECLARE_WRITE8_MEMBER(brailab4_port7f_w);
- DECLARE_WRITE8_MEMBER(brailab4_portff_w);
+ uint8_t key_r(offs_t offset);
+ void cass_w(offs_t offset, uint8_t data);
+ uint8_t cass2_r();
+ uint8_t exxx_r(offs_t offset);
+ void port7f_w(uint8_t data);
+ void portff_w(uint8_t data);
+ void brailab4_port7f_w(uint8_t data);
+ void brailab4_portff_w(uint8_t data);
DECLARE_VIDEO_START(homelab2);
DECLARE_MACHINE_RESET(homelab3);
DECLARE_VIDEO_START(homelab3);
@@ -103,7 +103,7 @@ INTERRUPT_GEN_MEMBER(homelab_state::homelab_frame)
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
-READ8_MEMBER( homelab_state::key_r ) // offset 27F-2FE
+uint8_t homelab_state::key_r(offs_t offset) // offset 27F-2FE
{
if (offset == 0x38) // 0x3838
{
@@ -126,12 +126,12 @@ READ8_MEMBER( homelab_state::key_r ) // offset 27F-2FE
return data;
}
-READ8_MEMBER( homelab_state::cass2_r )
+uint8_t homelab_state::cass2_r()
{
return (m_cass->input() > 0.03) ? 0xff : 0;
}
-WRITE8_MEMBER( homelab_state::cass_w )
+void homelab_state::cass_w(offs_t offset, uint8_t data)
{
if (offset == 0x73f) // 0x3f3f
m_nmi = true;
@@ -152,20 +152,20 @@ MACHINE_RESET_MEMBER(homelab_state,brailab4)
membank("bank1")->set_entry(0);
}
-WRITE8_MEMBER( homelab_state::port7f_w )
+void homelab_state::port7f_w(uint8_t data)
{
}
-WRITE8_MEMBER( homelab_state::portff_w )
+void homelab_state::portff_w(uint8_t data)
{
}
-WRITE8_MEMBER( homelab_state::brailab4_port7f_w )
+void homelab_state::brailab4_port7f_w(uint8_t data)
{
membank("bank1")->set_entry(0);
}
-WRITE8_MEMBER( homelab_state::brailab4_portff_w )
+void homelab_state::brailab4_portff_w(uint8_t data)
{
membank("bank1")->set_entry(1);
}
@@ -176,7 +176,7 @@ READ_LINE_MEMBER( homelab_state::cass3_r )
}
-READ8_MEMBER( homelab_state::exxx_r )
+uint8_t homelab_state::exxx_r(offs_t offset)
{
// keys E800-E813 but E810-E813 are not connected
// cassin E883
diff --git a/src/mame/drivers/homez80.cpp b/src/mame/drivers/homez80.cpp
index afe9586e22d..5b2b38f8df8 100644
--- a/src/mame/drivers/homez80.cpp
+++ b/src/mame/drivers/homez80.cpp
@@ -40,7 +40,7 @@ public:
private:
- DECLARE_READ8_MEMBER( homez80_keyboard_r );
+ uint8_t homez80_keyboard_r(offs_t offset);
INTERRUPT_GEN_MEMBER(homez80_interrupt);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -55,7 +55,7 @@ private:
};
-READ8_MEMBER( homez80_state::homez80_keyboard_r )
+uint8_t homez80_state::homez80_keyboard_r(offs_t offset)
{
char kbdrow[8];
sprintf(kbdrow,"LINE%d",offset);
diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp
index 0410acdc020..57d19fdfdb5 100644
--- a/src/mame/drivers/horizon.cpp
+++ b/src/mame/drivers/horizon.cpp
@@ -65,7 +65,7 @@ public:
void horizon2mhz(machine_config &config);
private:
- DECLARE_READ8_MEMBER(ff_r);
+ uint8_t ff_r();
void horizon_io(address_map &map);
void horizon_mem(address_map &map);
@@ -128,7 +128,7 @@ void horizon_state::machine_reset()
m_maincpu->set_pc(0xe800);
}
-READ8_MEMBER( horizon_state::ff_r )
+uint8_t horizon_state::ff_r()
{
return 0xff;
}
diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp
index 9a927618eda..6efaf62cc7f 100644
--- a/src/mame/drivers/hornet.cpp
+++ b/src/mame/drivers/hornet.cpp
@@ -445,34 +445,34 @@ private:
uint16_t m_gn680_ret0;
uint16_t m_gn680_ret1;
- DECLARE_READ32_MEMBER(hornet_k037122_sram_r);
- DECLARE_WRITE32_MEMBER(hornet_k037122_sram_w);
- DECLARE_READ32_MEMBER(hornet_k037122_char_r);
- DECLARE_WRITE32_MEMBER(hornet_k037122_char_w);
- DECLARE_READ32_MEMBER(hornet_k037122_reg_r);
- DECLARE_WRITE32_MEMBER(hornet_k037122_reg_w);
- DECLARE_READ8_MEMBER(sysreg_r);
- DECLARE_WRITE8_MEMBER(sysreg_w);
- DECLARE_WRITE32_MEMBER(comm1_w);
- DECLARE_WRITE32_MEMBER(comm_rombank_w);
- DECLARE_READ32_MEMBER(comm0_unk_r);
- DECLARE_READ32_MEMBER(gun_r);
- DECLARE_WRITE32_MEMBER(gun_w);
- DECLARE_WRITE16_MEMBER(gn680_sysctrl);
- DECLARE_READ16_MEMBER(gn680_latch_r);
- DECLARE_WRITE16_MEMBER(gn680_latch_w);
- DECLARE_READ32_MEMBER(dsp_dataram0_r);
- DECLARE_WRITE32_MEMBER(dsp_dataram0_w);
- DECLARE_READ32_MEMBER(dsp_dataram1_r);
- DECLARE_WRITE32_MEMBER(dsp_dataram1_w);
+ uint32_t hornet_k037122_sram_r(offs_t offset);
+ void hornet_k037122_sram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t hornet_k037122_char_r(offs_t offset);
+ void hornet_k037122_char_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t hornet_k037122_reg_r(offs_t offset);
+ void hornet_k037122_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint8_t sysreg_r(offs_t offset);
+ void sysreg_w(offs_t offset, uint8_t data);
+ void comm1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void comm_rombank_w(uint32_t data);
+ uint32_t comm0_unk_r(offs_t offset, uint32_t mem_mask = ~0);
+ uint32_t gun_r();
+ void gun_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ void gn680_sysctrl(uint16_t data);
+ uint16_t gn680_latch_r();
+ void gn680_latch_w(offs_t offset, uint16_t data);
+ uint32_t dsp_dataram0_r(offs_t offset);
+ void dsp_dataram0_w(offs_t offset, uint32_t data);
+ uint32_t dsp_dataram1_r(offs_t offset);
+ void dsp_dataram1_w(offs_t offset, uint32_t data);
DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_0);
DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_1);
- DECLARE_WRITE16_MEMBER(soundtimer_en_w);
- DECLARE_WRITE16_MEMBER(soundtimer_count_w);
+ void soundtimer_en_w(uint16_t data);
+ void soundtimer_count_w(uint16_t data);
double adc12138_input_callback(uint8_t input);
DECLARE_WRITE8_MEMBER(jamma_jvs_w);
- DECLARE_READ8_MEMBER(comm_eeprom_r);
- DECLARE_WRITE8_MEMBER(comm_eeprom_w);
+ uint8_t comm_eeprom_r();
+ void comm_eeprom_w(uint8_t data);
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -496,41 +496,41 @@ private:
-READ32_MEMBER(hornet_state::hornet_k037122_sram_r)
+uint32_t hornet_state::hornet_k037122_sram_r(offs_t offset)
{
k037122_device *k037122 = m_konppc->get_cgboard_id() ? m_k037122_2 : m_k037122_1;
- return k037122->sram_r(space, offset, mem_mask);
+ return k037122->sram_r(offset);
}
-WRITE32_MEMBER(hornet_state::hornet_k037122_sram_w)
+void hornet_state::hornet_k037122_sram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
k037122_device *k037122 = m_konppc->get_cgboard_id() ? m_k037122_2 : m_k037122_1;
- k037122->sram_w(space, offset, data, mem_mask);
+ k037122->sram_w(offset, data, mem_mask);
}
-READ32_MEMBER(hornet_state::hornet_k037122_char_r)
+uint32_t hornet_state::hornet_k037122_char_r(offs_t offset)
{
k037122_device *k037122 = m_konppc->get_cgboard_id() ? m_k037122_2 : m_k037122_1;
- return k037122->char_r(space, offset, mem_mask);
+ return k037122->char_r(offset);
}
-WRITE32_MEMBER(hornet_state::hornet_k037122_char_w)
+void hornet_state::hornet_k037122_char_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
k037122_device *k037122 = m_konppc->get_cgboard_id() ? m_k037122_2 : m_k037122_1;
- k037122->char_w(space, offset, data, mem_mask);
+ k037122->char_w(offset, data, mem_mask);
}
-READ32_MEMBER(hornet_state::hornet_k037122_reg_r)
+uint32_t hornet_state::hornet_k037122_reg_r(offs_t offset)
{
k037122_device *k037122 = m_konppc->get_cgboard_id() ? m_k037122_2 : m_k037122_1;
- return k037122->reg_r(space, offset, mem_mask);
+ return k037122->reg_r(offset);
}
-WRITE32_MEMBER(hornet_state::hornet_k037122_reg_w)
+void hornet_state::hornet_k037122_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
k037122_device *k037122 = m_konppc->get_cgboard_id() ? m_k037122_2 : m_k037122_1;
- k037122->reg_w(space, offset, data, mem_mask);
+ k037122->reg_w(offset, data, mem_mask);
}
WRITE_LINE_MEMBER(hornet_state::voodoo_vblank_0)
@@ -567,7 +567,7 @@ uint32_t hornet_state::screen_update_rscreen(screen_device &screen, bitmap_rgb32
/*****************************************************************************/
-READ8_MEMBER(hornet_state::sysreg_r)
+uint8_t hornet_state::sysreg_r(offs_t offset)
{
uint8_t r = 0;
@@ -604,7 +604,7 @@ READ8_MEMBER(hornet_state::sysreg_r)
return r;
}
-WRITE8_MEMBER(hornet_state::sysreg_w)
+void hornet_state::sysreg_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -695,7 +695,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w)
/*****************************************************************************/
-READ8_MEMBER(hornet_state::comm_eeprom_r)
+uint8_t hornet_state::comm_eeprom_r()
{
uint8_t r = 0;
r |= (m_lan_eeprom->do_read() & 1) << 1;
@@ -703,18 +703,18 @@ READ8_MEMBER(hornet_state::comm_eeprom_r)
return r;
}
-WRITE8_MEMBER(hornet_state::comm_eeprom_w)
+void hornet_state::comm_eeprom_w(uint8_t data)
{
m_eepromout->write(data, 0xff);
m_lan_ds2401->write((data >> 4) & 1);
}
-WRITE32_MEMBER(hornet_state::comm1_w)
+void hornet_state::comm1_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
printf("comm1_w: %08X, %08X, %08X\n", offset, data, mem_mask);
}
-WRITE32_MEMBER(hornet_state::comm_rombank_w)
+void hornet_state::comm_rombank_w(uint32_t data)
{
int bank = data >> 24;
uint8_t *usr3 = memregion("user3")->base();
@@ -722,19 +722,19 @@ WRITE32_MEMBER(hornet_state::comm_rombank_w)
membank("bank1")->set_entry(bank & 0x7f);
}
-READ32_MEMBER(hornet_state::comm0_unk_r)
+uint32_t hornet_state::comm0_unk_r(offs_t offset, uint32_t mem_mask)
{
// printf("comm0_unk_r: %08X, %08X\n", offset, mem_mask);
return 0xffffffff;
}
-READ32_MEMBER(hornet_state::gun_r)
+uint32_t hornet_state::gun_r()
{
return m_gn680_ret0<<16 | m_gn680_ret1;
}
-WRITE32_MEMBER(hornet_state::gun_w)
+void hornet_state::gun_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (mem_mask == 0xffff0000)
{
@@ -751,7 +751,7 @@ TIMER_CALLBACK_MEMBER(hornet_state::sound_irq)
}
-WRITE16_MEMBER(hornet_state::soundtimer_en_w)
+void hornet_state::soundtimer_en_w(uint16_t data)
{
if (data & 1)
{
@@ -766,7 +766,7 @@ WRITE16_MEMBER(hornet_state::soundtimer_en_w)
}
}
-WRITE16_MEMBER(hornet_state::soundtimer_count_w)
+void hornet_state::soundtimer_count_w(uint16_t data)
{
// Reset the count
m_sound_irq_timer->adjust(attotime::from_usec(m_sound_timer_usec));
@@ -830,20 +830,20 @@ void hornet_state::sound_memmap(address_map &map)
/*****************************************************************************/
-WRITE16_MEMBER(hornet_state::gn680_sysctrl)
+void hornet_state::gn680_sysctrl(uint16_t data)
{
// bit 15 = watchdog toggle
// lower 4 bits = LEDs?
}
-READ16_MEMBER(hornet_state::gn680_latch_r)
+uint16_t hornet_state::gn680_latch_r()
{
m_gn680->set_input_line(M68K_IRQ_6, CLEAR_LINE);
return m_gn680_latch;
}
-WRITE16_MEMBER(hornet_state::gn680_latch_w)
+void hornet_state::gn680_latch_w(offs_t offset, uint16_t data)
{
if (offset)
{
@@ -870,22 +870,22 @@ void hornet_state::gn680_memmap(address_map &map)
/*****************************************************************************/
-READ32_MEMBER(hornet_state::dsp_dataram0_r)
+uint32_t hornet_state::dsp_dataram0_r(offs_t offset)
{
return m_sharc_dataram0[offset] & 0xffff;
}
-WRITE32_MEMBER(hornet_state::dsp_dataram0_w)
+void hornet_state::dsp_dataram0_w(offs_t offset, uint32_t data)
{
m_sharc_dataram0[offset] = data;
}
-READ32_MEMBER(hornet_state::dsp_dataram1_r)
+uint32_t hornet_state::dsp_dataram1_r(offs_t offset)
{
return m_sharc_dataram1[offset] & 0xffff;
}
-WRITE32_MEMBER(hornet_state::dsp_dataram1_w)
+void hornet_state::dsp_dataram1_w(offs_t offset, uint32_t data)
{
m_sharc_dataram1[offset] = data;
}
diff --git a/src/mame/drivers/hp16500.cpp b/src/mame/drivers/hp16500.cpp
index 8cfe9946354..f26bfda1e2d 100644
--- a/src/mame/drivers/hp16500.cpp
+++ b/src/mame/drivers/hp16500.cpp
@@ -82,23 +82,23 @@ private:
uint8_t m_mask, m_val;
- DECLARE_WRITE32_MEMBER(palette_w);
-
- DECLARE_WRITE16_MEMBER(vram_w);
- DECLARE_READ8_MEMBER (vram_r);
- DECLARE_WRITE8_MEMBER (mask_w);
- DECLARE_WRITE8_MEMBER (val_w);
- DECLARE_READ32_MEMBER(vbl_state_r);
- DECLARE_WRITE32_MEMBER(vbl_ack_w);
- DECLARE_READ16_MEMBER(vbl_ack16_r);
- DECLARE_WRITE16_MEMBER(vbl_ack16_w);
-
- DECLARE_WRITE8_MEMBER(pal_ctrl_w);
- DECLARE_WRITE8_MEMBER(pal_r_w);
- DECLARE_WRITE8_MEMBER(pal_g_w);
- DECLARE_WRITE8_MEMBER(pal_b_w);
-
- DECLARE_WRITE16_MEMBER(maskval_w);
+ void palette_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+
+ void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint8_t vram_r(offs_t offset);
+ void mask_w(uint8_t data);
+ void val_w(uint8_t data);
+ uint32_t vbl_state_r();
+ void vbl_ack_w(uint32_t data);
+ uint16_t vbl_ack16_r();
+ void vbl_ack16_w(uint16_t data);
+
+ void pal_ctrl_w(uint8_t data);
+ void pal_r_w(uint8_t data);
+ void pal_g_w(uint8_t data);
+ void pal_b_w(uint8_t data);
+
+ void maskval_w(uint16_t data);
DECLARE_WRITE_LINE_MEMBER(irq_2);
DECLARE_WRITE_LINE_MEMBER(vsync_changed);
MC6845_UPDATE_ROW(crtc_update_row);
@@ -112,23 +112,23 @@ private:
uint32_t m_palette[256], m_colors[3], m_count, m_clutoffs;
};
-READ32_MEMBER(hp16500_state::vbl_state_r)
+uint32_t hp16500_state::vbl_state_r()
{
return 0x03000000; // bit 0 set means the interrupt handler advances the pSOS tick counter.
}
-WRITE32_MEMBER(hp16500_state::vbl_ack_w)
+void hp16500_state::vbl_ack_w(uint32_t data)
{
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
-READ16_MEMBER(hp16500_state::vbl_ack16_r)
+uint16_t hp16500_state::vbl_ack16_r()
{
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
return 0;
}
-WRITE16_MEMBER(hp16500_state::vbl_ack16_w)
+void hp16500_state::vbl_ack16_w(uint16_t data)
{
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
@@ -185,31 +185,31 @@ MC6845_UPDATE_ROW( hp16500_state::crtc_update_row_1650 )
}
}
-WRITE8_MEMBER(hp16500_state::pal_ctrl_w)
+void hp16500_state::pal_ctrl_w(uint8_t data)
{
m_clutoffs = data & 0xf;
}
-WRITE8_MEMBER(hp16500_state::pal_r_w)
+void hp16500_state::pal_r_w(uint8_t data)
{
m_colors[0] = (data<<4);
m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
}
-WRITE8_MEMBER(hp16500_state::pal_g_w)
+void hp16500_state::pal_g_w(uint8_t data)
{
m_colors[1] = (data<<4);
m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
}
-WRITE8_MEMBER(hp16500_state::pal_b_w)
+void hp16500_state::pal_b_w(uint8_t data)
{
m_colors[2] = (data<<4);
m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
}
-WRITE16_MEMBER(hp16500_state::maskval_w)
+void hp16500_state::maskval_w(uint16_t data)
{
// by analogy with the string printer code from the 16500b, which
// appears to be a direct port...
@@ -342,7 +342,7 @@ void hp16500_state::video_start()
// that is why the handler needs to be 16 bits, or it won't be called
// in the first place.
-WRITE16_MEMBER(hp16500_state::vram_w)
+void hp16500_state::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if(!ACCESSING_BITS_0_7)
data = data | (data >> 8);
@@ -355,22 +355,22 @@ WRITE16_MEMBER(hp16500_state::vram_w)
}
}
-READ8_MEMBER (hp16500_state::vram_r)
+uint8_t hp16500_state::vram_r(offs_t offset)
{
return m_vram[offset];
}
-WRITE8_MEMBER(hp16500_state::mask_w)
+void hp16500_state::mask_w(uint8_t data)
{
m_mask = data;
}
-WRITE8_MEMBER(hp16500_state::val_w)
+void hp16500_state::val_w(uint8_t data)
{
m_val = data;
}
-WRITE32_MEMBER(hp16500_state::palette_w)
+void hp16500_state::palette_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (mem_mask == 0xff000000)
{
diff --git a/src/mame/drivers/hp2640.cpp b/src/mame/drivers/hp2640.cpp
index ef357b12e3e..618377674aa 100644
--- a/src/mame/drivers/hp2640.cpp
+++ b/src/mame/drivers/hp2640.cpp
@@ -131,26 +131,26 @@ private:
IRQ_CALLBACK_MEMBER(irq_callback);
- DECLARE_WRITE8_MEMBER(mode_byte_w);
+ void mode_byte_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(timer_10ms_exp);
- DECLARE_READ8_MEMBER(kb_r);
- DECLARE_WRITE8_MEMBER(kb_prev_w);
- DECLARE_WRITE8_MEMBER(kb_reset_w);
- DECLARE_READ8_MEMBER(switches_ah_r);
- DECLARE_READ8_MEMBER(switches_jr_r);
- DECLARE_READ8_MEMBER(switches_sz_r);
- DECLARE_READ8_MEMBER(datacomm_sw_r);
- DECLARE_WRITE8_MEMBER(kb_led_w);
+ uint8_t kb_r(offs_t offset);
+ void kb_prev_w(uint8_t data);
+ void kb_reset_w(uint8_t data);
+ uint8_t switches_ah_r();
+ uint8_t switches_jr_r();
+ uint8_t switches_sz_r();
+ uint8_t datacomm_sw_r();
+ void kb_led_w(uint8_t data);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
- DECLARE_WRITE8_MEMBER(cx_w);
- DECLARE_WRITE8_MEMBER(cy_w);
+ void cx_w(uint8_t data);
+ void cy_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(timer_cursor_blink_inh);
- DECLARE_READ8_MEMBER(async_status_r);
- DECLARE_WRITE8_MEMBER(async_control_w);
+ uint8_t async_status_r();
+ void async_control_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(async_dav_w);
DECLARE_WRITE_LINE_MEMBER(async_txd_w);
@@ -291,7 +291,7 @@ IRQ_CALLBACK_MEMBER(hp2645_state::irq_callback)
return res;
}
-WRITE8_MEMBER(hp2645_state::mode_byte_w)
+void hp2645_state::mode_byte_w(uint8_t data)
{
if (BIT(m_mode_byte , 0) && !BIT(data , 0)) {
m_timer_10ms->reset();
@@ -314,53 +314,53 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp2645_state::timer_10ms_exp)
}
}
-READ8_MEMBER(hp2645_state::kb_r)
+uint8_t hp2645_state::kb_r(offs_t offset)
{
ioport_value k = m_io_key[ offset / 4 ]->read();
return uint8_t(k >> (8 * (offset % 4)));
}
-WRITE8_MEMBER(hp2645_state::kb_prev_w)
+void hp2645_state::kb_prev_w(uint8_t data)
{
// This port is used to set the threshold in key sense circuit for hysteresis.
// We can safely ignore all writes.
}
-WRITE8_MEMBER(hp2645_state::kb_reset_w)
+void hp2645_state::kb_reset_w(uint8_t data)
{
// TODO: enabled/disable CPU reset
}
-READ8_MEMBER(hp2645_state::switches_ah_r)
+uint8_t hp2645_state::switches_ah_r()
{
uint8_t res = m_io_sw_ah->read();
LOG("SW AH=%02x\n" , res);
return res;
}
-READ8_MEMBER(hp2645_state::switches_jr_r)
+uint8_t hp2645_state::switches_jr_r()
{
uint8_t res = m_io_sw_jr->read();
LOG("SW JR=%02x\n" , res);
return res;
}
-READ8_MEMBER(hp2645_state::switches_sz_r)
+uint8_t hp2645_state::switches_sz_r()
{
uint8_t res = m_io_sw_sz->read();
LOG("SW SZ=%02x\n" , res);
return res;
}
-READ8_MEMBER(hp2645_state::datacomm_sw_r)
+uint8_t hp2645_state::datacomm_sw_r()
{
uint8_t res = m_io_comm->read();
LOG("COM SW=%02x\n" , res);
return res;
}
-WRITE8_MEMBER(hp2645_state::kb_led_w)
+void hp2645_state::kb_led_w(uint8_t data)
{
if (BIT(data , 7)) {
m_beep->set_state(1);
@@ -402,14 +402,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp2645_state::scanline_timer)
}
}
-WRITE8_MEMBER(hp2645_state::cx_w)
+void hp2645_state::cx_w(uint8_t data)
{
m_cursor_x = data & 0x7f;
m_cursor_blink_inh = true;
m_timer_cursor_blink_inh->adjust(attotime::from_msec(CURSOR_BLINK_INH_MS));
}
-WRITE8_MEMBER(hp2645_state::cy_w)
+void hp2645_state::cy_w(uint8_t data)
{
m_blanking = BIT(data , 7);
m_cursor_y = data & 0x1f;
@@ -439,7 +439,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp2645_state::timer_cursor_blink_inh)
m_cursor_blink_inh = false;
}
-READ8_MEMBER(hp2645_state::async_status_r)
+uint8_t hp2645_state::async_status_r()
{
uint8_t res = 0;
@@ -467,7 +467,7 @@ READ8_MEMBER(hp2645_state::async_status_r)
return res;
}
-WRITE8_MEMBER(hp2645_state::async_control_w)
+void hp2645_state::async_control_w(uint8_t data)
{
update_async_control(data);
}
diff --git a/src/mame/drivers/hp3478a.cpp b/src/mame/drivers/hp3478a.cpp
index 0539a027a54..1b0711eacb1 100644
--- a/src/mame/drivers/hp3478a.cpp
+++ b/src/mame/drivers/hp3478a.cpp
@@ -135,7 +135,7 @@ protected:
uint8_t p1read();
void p1write(uint8_t data);
void p2write(uint8_t data);
- DECLARE_WRITE8_MEMBER(nvwrite);
+ void nvwrite(offs_t offset, uint8_t data);
void io_bank(address_map &map);
void i8039_io(address_map &map);
@@ -261,7 +261,7 @@ void hp3478a_state::p2write(uint8_t data)
/* CAL RAM write handler, to implement "CAL enable" front panel switch
*/
-WRITE8_MEMBER( hp3478a_state::nvwrite ) {
+void hp3478a_state::nvwrite(offs_t offset, uint8_t data) {
if (m_calenable->read()) {
m_nvram_raw[offset] = data;
LOGMASKED(DEBUG_CAL, "write %02X to cal[%02X]\n", data, offset);
diff --git a/src/mame/drivers/hp64k.cpp b/src/mame/drivers/hp64k.cpp
index d4657d50c4c..ba1e068e2a0 100644
--- a/src/mame/drivers/hp64k.cpp
+++ b/src/mame/drivers/hp64k.cpp
@@ -184,31 +184,31 @@ private:
virtual void machine_reset() override;
uint8_t hp64k_crtc_filter(uint8_t data);
- DECLARE_WRITE16_MEMBER(hp64k_crtc_w);
+ void hp64k_crtc_w(offs_t offset, uint16_t data);
DECLARE_WRITE_LINE_MEMBER(hp64k_crtc_drq_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_crtc_vrtc_w);
I8275_DRAW_CHARACTER_MEMBER(crtc_display_pixels);
- DECLARE_READ16_MEMBER(hp64k_rear_sw_r);
+ uint16_t hp64k_rear_sw_r();
uint8_t int_cb(offs_t offset);
void hp64k_update_irl(void);
- DECLARE_WRITE16_MEMBER(hp64k_irl_mask_w);
+ void hp64k_irl_mask_w(uint16_t data);
TIMER_DEVICE_CALLBACK_MEMBER(hp64k_kb_scan);
- DECLARE_READ16_MEMBER(hp64k_kb_r);
+ uint16_t hp64k_kb_r();
TIMER_DEVICE_CALLBACK_MEMBER(hp64k_line_sync);
- DECLARE_READ16_MEMBER(hp64k_deltat_r);
- DECLARE_WRITE16_MEMBER(hp64k_deltat_w);
+ uint16_t hp64k_deltat_r();
+ void hp64k_deltat_w(uint16_t data);
- DECLARE_READ16_MEMBER(hp64k_slot_r);
- DECLARE_WRITE16_MEMBER(hp64k_slot_w);
- DECLARE_WRITE16_MEMBER(hp64k_slot_sel_w);
+ uint16_t hp64k_slot_r(offs_t offset);
+ void hp64k_slot_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ void hp64k_slot_sel_w(offs_t offset, uint16_t data);
- DECLARE_READ16_MEMBER(hp64k_flp_r);
- DECLARE_WRITE16_MEMBER(hp64k_flp_w);
+ uint16_t hp64k_flp_r(offs_t offset);
+ void hp64k_flp_w(offs_t offset, uint16_t data);
DECLARE_WRITE_LINE_MEMBER(hp64k_flp_drq_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_flp_intrq_w);
void hp64k_update_floppy_dma(void);
@@ -219,25 +219,25 @@ private:
void hp64k_floppy_idx_cb(floppy_image_device *floppy , int state);
void hp64k_floppy_wpt_cb(floppy_image_device *floppy , int state);
- DECLARE_READ16_MEMBER(hp64k_usart_r);
- DECLARE_WRITE16_MEMBER(hp64k_usart_w);
+ uint16_t hp64k_usart_r(offs_t offset);
+ void hp64k_usart_w(offs_t offset, uint16_t data);
DECLARE_WRITE_LINE_MEMBER(hp64k_rxrdy_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_txrdy_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_txd_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_dtr_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_rts_w);
- DECLARE_WRITE16_MEMBER(hp64k_loopback_w);
+ void hp64k_loopback_w(uint16_t data);
void hp64k_update_loopback(void);
DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_rxd_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_dcd_w);
DECLARE_WRITE_LINE_MEMBER(hp64k_rs232_cts_w);
- DECLARE_READ16_MEMBER(hp64k_phi_r);
- DECLARE_WRITE16_MEMBER(hp64k_phi_w);
+ uint16_t hp64k_phi_r(offs_t offset);
+ void hp64k_phi_w(offs_t offset, uint16_t data);
DECLARE_WRITE_LINE_MEMBER(hp64k_phi_int_w);
DECLARE_READ_LINE_MEMBER(hp64k_phi_sys_ctrl_r);
- DECLARE_WRITE16_MEMBER(hp64k_beep_w);
+ void hp64k_beep_w(offs_t offset, uint16_t data);
TIMER_DEVICE_CALLBACK_MEMBER(hp64k_beeper_off);
DECLARE_WRITE_LINE_MEMBER(hp64k_baud_clk_w);
@@ -446,7 +446,7 @@ uint8_t hp64k_state::hp64k_crtc_filter(uint8_t data)
return inv ? (data & 0xf2) : data;
}
-WRITE16_MEMBER(hp64k_state::hp64k_crtc_w)
+void hp64k_state::hp64k_crtc_w(offs_t offset, uint16_t data)
{
m_crtc->write(offset == 0 , hp64k_crtc_filter((uint8_t)data));
}
@@ -522,7 +522,7 @@ I8275_DRAW_CHARACTER_MEMBER(hp64k_state::crtc_display_pixels)
}
-READ16_MEMBER(hp64k_state::hp64k_rear_sw_r)
+uint16_t hp64k_state::hp64k_rear_sw_r()
{
return m_rear_panel_sw->read() | 0x0020;
}
@@ -541,7 +541,7 @@ void hp64k_state::hp64k_update_irl(void)
m_cpu->set_input_line(HPHYBRID_IRL , (m_irl_mask & m_irl_pending) != 0);
}
-WRITE16_MEMBER(hp64k_state::hp64k_irl_mask_w)
+void hp64k_state::hp64k_irl_mask_w(uint16_t data)
{
m_irl_mask = (uint8_t)data;
hp64k_update_irl();
@@ -579,7 +579,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp64k_state::hp64k_kb_scan)
}
}
-READ16_MEMBER(hp64k_state::hp64k_kb_r)
+uint16_t hp64k_state::hp64k_kb_r()
{
uint16_t ret = 0xff00 | m_kb_row_col;
@@ -600,20 +600,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp64k_state::hp64k_line_sync)
hp64k_update_irl();
}
-READ16_MEMBER(hp64k_state::hp64k_deltat_r)
+uint16_t hp64k_state::hp64k_deltat_r()
{
BIT_CLR(m_irl_pending , 2);
hp64k_update_irl();
return 0;
}
-WRITE16_MEMBER(hp64k_state::hp64k_deltat_w)
+void hp64k_state::hp64k_deltat_w(uint16_t data)
{
BIT_CLR(m_irl_pending , 2);
hp64k_update_irl();
}
-READ16_MEMBER(hp64k_state::hp64k_slot_r)
+uint16_t hp64k_state::hp64k_slot_r(offs_t offset)
{
if (m_slot_select == 0x0a) {
// Slot 10 selected
@@ -640,7 +640,7 @@ READ16_MEMBER(hp64k_state::hp64k_slot_r)
}
}
-WRITE16_MEMBER(hp64k_state::hp64k_slot_w)
+void hp64k_state::hp64k_slot_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (m_slot_select == 0x0a && m_slot_map != 0) {
if (m_slot_map != 1) {
@@ -652,13 +652,13 @@ WRITE16_MEMBER(hp64k_state::hp64k_slot_w)
}
}
-WRITE16_MEMBER(hp64k_state::hp64k_slot_sel_w)
+void hp64k_state::hp64k_slot_sel_w(offs_t offset, uint16_t data)
{
m_slot_map = (uint8_t)offset;
m_slot_select = (uint8_t)((data >> 8) & 0x3f);
}
-READ16_MEMBER(hp64k_state::hp64k_flp_r)
+uint16_t hp64k_state::hp64k_flp_r(offs_t offset)
{
m_cpu->dmar_w(0);
@@ -698,7 +698,7 @@ READ16_MEMBER(hp64k_state::hp64k_flp_r)
return ((uint16_t)m_floppy_out_latch_msb << 8) | (uint16_t)m_floppy_out_latch_lsb;
}
-WRITE16_MEMBER(hp64k_state::hp64k_flp_w)
+void hp64k_state::hp64k_flp_w(offs_t offset, uint16_t data)
{
m_cpu->dmar_w(0);
@@ -960,7 +960,7 @@ void hp64k_state::hp64k_floppy_wpt_cb(floppy_image_device *floppy , int state)
}
}
-READ16_MEMBER(hp64k_state::hp64k_usart_r)
+uint16_t hp64k_state::hp64k_usart_r(offs_t offset)
{
uint16_t tmp = m_uart->read(~offset & 1);
@@ -975,7 +975,7 @@ READ16_MEMBER(hp64k_state::hp64k_usart_r)
return tmp;
}
-WRITE16_MEMBER(hp64k_state::hp64k_usart_w)
+void hp64k_state::hp64k_usart_w(offs_t offset, uint16_t data)
{
m_uart->write(~offset & 1, data & 0xff);
}
@@ -1033,7 +1033,7 @@ WRITE_LINE_MEMBER(hp64k_state::hp64k_rts_w)
m_rs232->write_rts(state);
}
-WRITE16_MEMBER(hp64k_state::hp64k_loopback_w)
+void hp64k_state::hp64k_loopback_w(uint16_t data)
{
m_phi_reg = (uint8_t)((data >> 8) & 7);
m_loopback = BIT(data , 11);
@@ -1067,14 +1067,14 @@ WRITE_LINE_MEMBER(hp64k_state::hp64k_rs232_dcd_w)
}
}
-READ16_MEMBER(hp64k_state::hp64k_phi_r)
+uint16_t hp64k_state::hp64k_phi_r(offs_t offset)
{
- return m_phi->reg16_r(space , m_phi_reg , mem_mask);
+ return m_phi->reg16_r(m_phi_reg);
}
-WRITE16_MEMBER(hp64k_state::hp64k_phi_w)
+void hp64k_state::hp64k_phi_w(offs_t offset, uint16_t data)
{
- m_phi->reg16_w(space , m_phi_reg , data , mem_mask);
+ m_phi->reg16_w(m_phi_reg , data);
}
WRITE_LINE_MEMBER(hp64k_state::hp64k_rs232_cts_w)
@@ -1100,7 +1100,7 @@ READ_LINE_MEMBER(hp64k_state::hp64k_phi_sys_ctrl_r)
return BIT(m_rear_panel_sw->read() , 6);
}
-WRITE16_MEMBER(hp64k_state::hp64k_beep_w)
+void hp64k_state::hp64k_beep_w(offs_t offset, uint16_t data)
{
if (!BIT(offset , 0)) {
m_beeper->set_state(1);
diff --git a/src/mame/drivers/hp80.cpp b/src/mame/drivers/hp80.cpp
index b029226669d..57196acec6c 100644
--- a/src/mame/drivers/hp80.cpp
+++ b/src/mame/drivers/hp80.cpp
@@ -160,19 +160,19 @@ protected:
uint8_t intack_r();
- DECLARE_WRITE8_MEMBER(ginten_w);
- DECLARE_WRITE8_MEMBER(gintdis_w);
- DECLARE_READ8_MEMBER(keysts_r);
- DECLARE_WRITE8_MEMBER(keysts_w);
- DECLARE_READ8_MEMBER(keycod_r);
- DECLARE_WRITE8_MEMBER(keycod_w);
- DECLARE_READ8_MEMBER(clksts_r);
- DECLARE_WRITE8_MEMBER(clksts_w);
- DECLARE_READ8_MEMBER(clkdat_r);
- DECLARE_WRITE8_MEMBER(clkdat_w);
- DECLARE_WRITE8_MEMBER(rselec_w);
- DECLARE_READ8_MEMBER(intrsc_r);
- DECLARE_WRITE8_MEMBER(intrsc_w);
+ void ginten_w(uint8_t data);
+ void gintdis_w(uint8_t data);
+ uint8_t keysts_r();
+ void keysts_w(uint8_t data);
+ uint8_t keycod_r();
+ void keycod_w(uint8_t data);
+ uint8_t clksts_r();
+ void clksts_w(uint8_t data);
+ uint8_t clkdat_r();
+ void clkdat_w(uint8_t data);
+ void rselec_w(uint8_t data);
+ uint8_t intrsc_r();
+ void intrsc_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(kb_scan);
TIMER_DEVICE_CALLBACK_MEMBER(timer_update);
@@ -416,21 +416,21 @@ uint8_t hp80_base_state::intack_r()
return vector_table[ m_top_pending ];
}
-WRITE8_MEMBER(hp80_base_state::ginten_w)
+void hp80_base_state::ginten_w(uint8_t data)
{
LOG_IRQ("GINTEN\n");
m_global_int_en = true;
update_irl();
}
-WRITE8_MEMBER(hp80_base_state::gintdis_w)
+void hp80_base_state::gintdis_w(uint8_t data)
{
LOG_IRQ("GINTDIS\n");
m_global_int_en = false;
update_irl();
}
-READ8_MEMBER(hp80_base_state::keysts_r)
+uint8_t hp80_base_state::keysts_r()
{
uint8_t res = 0;
if (BIT(m_int_en , get_kb_irq())) {
@@ -456,7 +456,7 @@ READ8_MEMBER(hp80_base_state::keysts_r)
return res;
}
-WRITE8_MEMBER(hp80_base_state::keysts_w)
+void hp80_base_state::keysts_w(uint8_t data)
{
if (BIT(data , 0)) {
irq_en_w(get_kb_irq() , true);
@@ -474,7 +474,7 @@ WRITE8_MEMBER(hp80_base_state::keysts_w)
}
}
-READ8_MEMBER(hp80_base_state::keycod_r)
+uint8_t hp80_base_state::keycod_r()
{
if (m_kb_lang_readout && m_io_language) {
return m_io_language->read();
@@ -485,7 +485,7 @@ READ8_MEMBER(hp80_base_state::keycod_r)
}
}
-WRITE8_MEMBER(hp80_base_state::keycod_w)
+void hp80_base_state::keycod_w(uint8_t data)
{
if (m_kb_raw_readout) {
m_kb_keycode = data;
@@ -497,7 +497,7 @@ WRITE8_MEMBER(hp80_base_state::keycod_w)
}
}
-READ8_MEMBER(hp80_base_state::clksts_r)
+uint8_t hp80_base_state::clksts_r()
{
uint8_t res = 0;
for (unsigned i = 0; i < TIMER_COUNT; i++) {
@@ -511,7 +511,7 @@ READ8_MEMBER(hp80_base_state::clksts_r)
return res;
}
-WRITE8_MEMBER(hp80_base_state::clksts_w)
+void hp80_base_state::clksts_w(uint8_t data)
{
if (data == 0x0c) {
// Set test mode (see timer_update)
@@ -554,7 +554,7 @@ WRITE8_MEMBER(hp80_base_state::clksts_w)
}
}
-READ8_MEMBER(hp80_base_state::clkdat_r)
+uint8_t hp80_base_state::clkdat_r()
{
uint8_t res;
unsigned burst_idx = m_cpu->flatten_burst();
@@ -568,7 +568,7 @@ READ8_MEMBER(hp80_base_state::clkdat_r)
return res;
}
-WRITE8_MEMBER(hp80_base_state::clkdat_w)
+void hp80_base_state::clkdat_w(uint8_t data)
{
unsigned burst_idx = m_cpu->flatten_burst();
if (burst_idx < 4) {
@@ -579,12 +579,12 @@ WRITE8_MEMBER(hp80_base_state::clkdat_w)
}
}
-WRITE8_MEMBER(hp80_base_state::rselec_w)
+void hp80_base_state::rselec_w(uint8_t data)
{
m_rombank->set_bank(data);
}
-READ8_MEMBER(hp80_base_state::intrsc_r)
+uint8_t hp80_base_state::intrsc_r()
{
if (m_top_acked >= IRQ_IOP0_BIT && m_top_acked < IRQ_BIT_COUNT) {
LOG_IRQ("INTRSC %u\n" , m_top_acked);
@@ -597,7 +597,7 @@ READ8_MEMBER(hp80_base_state::intrsc_r)
}
}
-WRITE8_MEMBER(hp80_base_state::intrsc_w)
+void hp80_base_state::intrsc_w(uint8_t data)
{
LOG_IRQ("INTRSC W %u %03x %03x %03x\n" , m_top_acked , m_int_serv , m_int_en , m_int_acked);
for (auto& iop: m_io_slots) {
@@ -990,14 +990,14 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_w);
- DECLARE_READ8_MEMBER(crtc_r);
- DECLARE_WRITE8_MEMBER(crtc_w);
- DECLARE_WRITE8_MEMBER(prtlen_w);
- DECLARE_READ8_MEMBER(prchar_r);
- DECLARE_WRITE8_MEMBER(prchar_w);
- DECLARE_READ8_MEMBER(prtsts_r);
- DECLARE_WRITE8_MEMBER(prtctl_w);
- DECLARE_WRITE8_MEMBER(prtdat_w);
+ uint8_t crtc_r(offs_t offset);
+ void crtc_w(offs_t offset, uint8_t data);
+ void prtlen_w(uint8_t data);
+ uint8_t prchar_r();
+ void prchar_w(uint8_t data);
+ uint8_t prtsts_r();
+ void prtctl_w(uint8_t data);
+ void prtdat_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(vm_timer);
TIMER_DEVICE_CALLBACK_MEMBER(prt_busy_timer);
@@ -1140,7 +1140,7 @@ WRITE_LINE_MEMBER(hp85_state::vblank_w)
}
}
-READ8_MEMBER(hp85_state::crtc_r)
+uint8_t hp85_state::crtc_r(offs_t offset)
{
uint8_t res = 0xff;
@@ -1167,7 +1167,7 @@ READ8_MEMBER(hp85_state::crtc_r)
return res;
}
-WRITE8_MEMBER(hp85_state::crtc_w)
+void hp85_state::crtc_w(offs_t offset, uint8_t data)
{
// Write to CRT controller (1MA5)
uint8_t burst_idx = m_cpu->flatten_burst();
@@ -1214,7 +1214,7 @@ WRITE8_MEMBER(hp85_state::crtc_w)
}
}
-WRITE8_MEMBER(hp85_state::prtlen_w)
+void hp85_state::prtlen_w(uint8_t data)
{
if (data == 0) {
// Advance paper
@@ -1229,22 +1229,22 @@ WRITE8_MEMBER(hp85_state::prtlen_w)
}
}
-READ8_MEMBER(hp85_state::prchar_r)
+uint8_t hp85_state::prchar_r()
{
return m_prchar_r;
}
-WRITE8_MEMBER(hp85_state::prchar_w)
+void hp85_state::prchar_w(uint8_t data)
{
m_prchar_w = data;
}
-READ8_MEMBER(hp85_state::prtsts_r)
+uint8_t hp85_state::prtsts_r()
{
return m_prtsts;
}
-WRITE8_MEMBER(hp85_state::prtctl_w)
+void hp85_state::prtctl_w(uint8_t data)
{
m_prtctl = data;
BIT_SET(m_prtsts , PRTSTS_PRTRDY_BIT);
@@ -1260,7 +1260,7 @@ WRITE8_MEMBER(hp85_state::prtctl_w)
}
}
-WRITE8_MEMBER(hp85_state::prtdat_w)
+void hp85_state::prtdat_w(uint8_t data)
{
m_cpu->flatten_burst();
if (m_prt_idx < PRT_BUFFER_SIZE) {
@@ -1675,20 +1675,20 @@ private:
// Run light
bool m_rulite;
- DECLARE_WRITE8_MEMBER(crtsad_w);
- DECLARE_WRITE8_MEMBER(crtbad_w);
- DECLARE_READ8_MEMBER(crtsts_r);
- DECLARE_WRITE8_MEMBER(crtsts_w);
- DECLARE_READ8_MEMBER(crtdat_r);
- DECLARE_WRITE8_MEMBER(crtdat_w);
+ void crtsad_w(uint8_t data);
+ void crtbad_w(uint8_t data);
+ uint8_t crtsts_r();
+ void crtsts_w(uint8_t data);
+ uint8_t crtdat_r();
+ void crtdat_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(vm_timer);
uint16_t get_video_limit() const;
- DECLARE_WRITE8_MEMBER(rulite_w);
+ void rulite_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(rulite_timer);
- DECLARE_READ8_MEMBER(direct_ram_r);
- DECLARE_WRITE8_MEMBER(direct_ram_w);
- DECLARE_READ8_MEMBER(emc_r);
- DECLARE_WRITE8_MEMBER(emc_w);
+ uint8_t direct_ram_r(offs_t offset);
+ void direct_ram_w(offs_t offset, uint8_t data);
+ uint8_t emc_r(offs_t offset);
+ void emc_w(offs_t offset, uint8_t data);
uint32_t& get_ptr();
void ptr12_decrement();
DECLARE_WRITE_LINE_MEMBER(lma_cycle);
@@ -1907,7 +1907,7 @@ attotime hp86_state::time_to_video_mem_availability() const
}
}
-WRITE8_MEMBER(hp86_state::crtsad_w)
+void hp86_state::crtsad_w(uint8_t data)
{
auto burst_idx = m_cpu->flatten_burst();
if (burst_idx == 0) {
@@ -1918,7 +1918,7 @@ WRITE8_MEMBER(hp86_state::crtsad_w)
}
}
-WRITE8_MEMBER(hp86_state::crtbad_w)
+void hp86_state::crtbad_w(uint8_t data)
{
auto burst_idx = m_cpu->flatten_burst();
if (burst_idx == 0) {
@@ -1929,12 +1929,12 @@ WRITE8_MEMBER(hp86_state::crtbad_w)
}
}
-READ8_MEMBER(hp86_state::crtsts_r)
+uint8_t hp86_state::crtsts_r()
{
return m_crt_sts;
}
-WRITE8_MEMBER(hp86_state::crtsts_w)
+void hp86_state::crtsts_w(uint8_t data)
{
m_crt_sts = (m_crt_sts & 0x11) | (data & ~0x11);
if (BIT(data , 0)) {
@@ -1946,12 +1946,12 @@ WRITE8_MEMBER(hp86_state::crtsts_w)
}
}
-READ8_MEMBER(hp86_state::crtdat_r)
+uint8_t hp86_state::crtdat_r()
{
return m_crt_byte;
}
-WRITE8_MEMBER(hp86_state::crtdat_w)
+void hp86_state::crtdat_w(uint8_t data)
{
m_crt_byte = data;
BIT_SET(m_crt_sts , 0);
@@ -1988,7 +1988,7 @@ uint16_t hp86_state::get_video_limit() const
}
}
-WRITE8_MEMBER(hp86_state::rulite_w)
+void hp86_state::rulite_w(uint8_t data)
{
bool new_rulite = !BIT(data , 0);
@@ -2008,17 +2008,17 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp86_state::rulite_timer)
m_rulite_timer->adjust(attotime::from_msec(m_run_light ? RULITE_ON_MS : RULITE_OFF_MS));
}
-READ8_MEMBER(hp86_state::direct_ram_r)
+uint8_t hp86_state::direct_ram_r(offs_t offset)
{
return m_ram->read(offset);
}
-WRITE8_MEMBER(hp86_state::direct_ram_w)
+void hp86_state::direct_ram_w(offs_t offset, uint8_t data)
{
m_ram->write(offset , data);
}
-READ8_MEMBER(hp86_state::emc_r)
+uint8_t hp86_state::emc_r(offs_t offset)
{
auto idx = m_cpu->flatten_burst();
uint8_t res = 0xff;
@@ -2053,7 +2053,7 @@ READ8_MEMBER(hp86_state::emc_r)
return res;
}
-WRITE8_MEMBER(hp86_state::emc_w)
+void hp86_state::emc_w(offs_t offset, uint8_t data)
{
auto idx = m_cpu->flatten_burst();
diff --git a/src/mame/drivers/hp95lx.cpp b/src/mame/drivers/hp95lx.cpp
index 7ab7658ad24..dc8b0ec5998 100644
--- a/src/mame/drivers/hp95lx.cpp
+++ b/src/mame/drivers/hp95lx.cpp
@@ -112,12 +112,12 @@ public:
, m_p_chargen(*this, "gfx1")
{ }
- DECLARE_WRITE8_MEMBER(d300_w);
- DECLARE_READ8_MEMBER(d300_r);
- DECLARE_WRITE8_MEMBER(e300_w);
- DECLARE_READ8_MEMBER(e300_r);
- DECLARE_WRITE8_MEMBER(f300_w);
- DECLARE_READ8_MEMBER(f300_r);
+ void d300_w(offs_t offset, uint8_t data);
+ uint8_t d300_r(offs_t offset);
+ void e300_w(offs_t offset, uint8_t data);
+ uint8_t e300_r(offs_t offset);
+ void f300_w(offs_t offset, uint8_t data);
+ uint8_t f300_r(offs_t offset);
void hp95lx(machine_config &config);
protected:
@@ -145,14 +145,14 @@ private:
DECLARE_WRITE_LINE_MEMBER(keyboard_clock_w);
DECLARE_WRITE_LINE_MEMBER(keyboard_data_w);
- DECLARE_READ8_MEMBER(keyboard_r);
- DECLARE_WRITE8_MEMBER(keyboard_w);
- DECLARE_READ8_MEMBER(video_r);
- DECLARE_WRITE8_MEMBER(video_w);
- DECLARE_WRITE8_MEMBER(video_address_w);
- DECLARE_READ8_MEMBER(video_register_r);
- DECLARE_WRITE8_MEMBER(video_register_w);
- DECLARE_WRITE8_MEMBER(debug_w);
+ uint8_t keyboard_r(offs_t offset);
+ void keyboard_w(offs_t offset, uint8_t data);
+ uint8_t video_r(offs_t offset);
+ void video_w(offs_t offset, uint8_t data);
+ void video_address_w(uint8_t data);
+ uint8_t video_register_r();
+ void video_register_w(uint8_t data);
+ void debug_w(offs_t offset, uint8_t data);
void hp95lx_io(address_map &map);
void hp95lx_map(address_map &map);
@@ -297,7 +297,7 @@ void hp95lx_state::machine_reset()
}
-WRITE8_MEMBER(hp95lx_state::d300_w)
+void hp95lx_state::d300_w(offs_t offset, uint8_t data)
{
LOG("%s: IO %04x <- %02x\n", machine().describe_context(), 0xd300 + offset, data);
@@ -321,7 +321,7 @@ WRITE8_MEMBER(hp95lx_state::d300_w)
}
}
-READ8_MEMBER(hp95lx_state::d300_r)
+uint8_t hp95lx_state::d300_r(offs_t offset)
{
uint8_t data = 0;
@@ -350,7 +350,7 @@ READ8_MEMBER(hp95lx_state::d300_r)
return data;
}
-WRITE8_MEMBER(hp95lx_state::e300_w)
+void hp95lx_state::e300_w(offs_t offset, uint8_t data)
{
LOG("%s: IO %04x <- %02x\n", machine().describe_context(), 0xe300 + offset, data);
@@ -384,7 +384,7 @@ WRITE8_MEMBER(hp95lx_state::e300_w)
}
}
-READ8_MEMBER(hp95lx_state::e300_r)
+uint8_t hp95lx_state::e300_r(offs_t offset)
{
uint8_t data = 0;
@@ -421,7 +421,7 @@ READ8_MEMBER(hp95lx_state::e300_r)
return data;
}
-WRITE8_MEMBER(hp95lx_state::f300_w)
+void hp95lx_state::f300_w(offs_t offset, uint8_t data)
{
address_map_bank_device *mapper;
const char *mapname;
@@ -520,7 +520,7 @@ WRITE8_MEMBER(hp95lx_state::f300_w)
}
}
-READ8_MEMBER(hp95lx_state::f300_r)
+uint8_t hp95lx_state::f300_r(offs_t offset)
{
uint8_t data = 0;
@@ -531,7 +531,7 @@ READ8_MEMBER(hp95lx_state::f300_r)
/* keyboard HLE -- adapted from pt68k4.cpp */
-READ8_MEMBER(hp95lx_state::keyboard_r)
+uint8_t hp95lx_state::keyboard_r(offs_t offset)
{
if (offset == 0)
{
@@ -543,7 +543,7 @@ READ8_MEMBER(hp95lx_state::keyboard_r)
return 0;
}
-WRITE8_MEMBER(hp95lx_state::keyboard_w)
+void hp95lx_state::keyboard_w(offs_t offset, uint8_t data)
{
LOGKBD("kbd: write %02X <= %02X\n", offset + 0x60, data);
m_pic8259->ir1_w(CLEAR_LINE);
@@ -589,7 +589,7 @@ WRITE_LINE_MEMBER(hp95lx_state::keyboard_data_w)
/* video HLE */
-READ8_MEMBER(hp95lx_state::video_register_r)
+uint8_t hp95lx_state::video_register_r()
{
uint8_t ret = 0;
@@ -611,7 +611,7 @@ READ8_MEMBER(hp95lx_state::video_register_r)
return ret;
}
-WRITE8_MEMBER(hp95lx_state::video_register_w)
+void hp95lx_state::video_register_w(uint8_t data)
{
switch (m_register_address_latch)
{
@@ -638,19 +638,19 @@ WRITE8_MEMBER(hp95lx_state::video_register_w)
}
}
-WRITE8_MEMBER(hp95lx_state::video_address_w)
+void hp95lx_state::video_address_w(uint8_t data)
{
m_register_address_latch = data & 0x3f;
}
-READ8_MEMBER(hp95lx_state::video_r)
+uint8_t hp95lx_state::video_r(offs_t offset)
{
int data = 0xff;
switch (offset)
{
case 1: case 3: case 5: case 7:
- data = video_register_r(space, offset);
+ data = video_register_r();
break;
case 10:
@@ -661,21 +661,21 @@ READ8_MEMBER(hp95lx_state::video_r)
return data;
}
-WRITE8_MEMBER(hp95lx_state::video_w)
+void hp95lx_state::video_w(offs_t offset, uint8_t data)
{
switch (offset)
{
case 0: case 2: case 4: case 6:
- video_address_w(space, offset, data);
+ video_address_w(data);
break;
case 1: case 3: case 5: case 7:
- video_register_w(space, offset, data);
+ video_register_w(data);
break;
}
}
-WRITE8_MEMBER(hp95lx_state::debug_w)
+void hp95lx_state::debug_w(offs_t offset, uint8_t data)
{
LOGDBG("%11.6f %s debug: port %02X <= %02X\n", machine().time().as_double(), machine().describe_context(), offset + 0x90, data);
}
diff --git a/src/mame/drivers/hp9825.cpp b/src/mame/drivers/hp9825.cpp
index f40882af656..73578da06ae 100644
--- a/src/mame/drivers/hp9825.cpp
+++ b/src/mame/drivers/hp9825.cpp
@@ -164,11 +164,11 @@ private:
void cpu_io_map(address_map &map);
- DECLARE_READ16_MEMBER(kb_scancode_r);
- DECLARE_WRITE16_MEMBER(disp_w);
- DECLARE_READ16_MEMBER(kdp_status_r);
- DECLARE_WRITE16_MEMBER(kdp_control_w);
- DECLARE_WRITE16_MEMBER(printer_w);
+ uint16_t kb_scancode_r();
+ void disp_w(uint16_t data);
+ uint16_t kdp_status_r();
+ void kdp_control_w(uint16_t data);
+ void printer_w(uint16_t data);
void update_display();
TIMER_DEVICE_CALLBACK_MEMBER(cursor_blink);
@@ -246,7 +246,7 @@ void hp9825_state::cpu_io_map(address_map &map)
// TODO:
}
-READ16_MEMBER(hp9825_state::kb_scancode_r)
+uint16_t hp9825_state::kb_scancode_r()
{
uint8_t res = m_scancode;
if (m_shift_key->read()) {
@@ -256,7 +256,7 @@ READ16_MEMBER(hp9825_state::kb_scancode_r)
return res;
}
-WRITE16_MEMBER(hp9825_state::disp_w)
+void hp9825_state::disp_w(uint16_t data)
{
if (m_display_on) {
m_display_on = false;
@@ -268,7 +268,7 @@ WRITE16_MEMBER(hp9825_state::disp_w)
m_display_mem[ m_display_idx++ ] = uint8_t(data);
}
-READ16_MEMBER(hp9825_state::kdp_status_r)
+uint16_t hp9825_state::kdp_status_r()
{
uint16_t res = 8;
if (m_io_sys->is_irq_pending(KDP_PA)) {
@@ -281,7 +281,7 @@ READ16_MEMBER(hp9825_state::kdp_status_r)
return res;
}
-WRITE16_MEMBER(hp9825_state::kdp_control_w)
+void hp9825_state::kdp_control_w(uint16_t data)
{
bool regen_display = false;
if (BIT(data , 1) && !m_display_on) {
@@ -329,7 +329,7 @@ WRITE16_MEMBER(hp9825_state::kdp_control_w)
}
}
-WRITE16_MEMBER(hp9825_state::printer_w)
+void hp9825_state::printer_w(uint16_t data)
{
m_printer_mem[ m_printer_idx ] = uint8_t(data);
m_printer_idx = (m_printer_idx + 1) & 0xf;
@@ -936,8 +936,8 @@ private:
void cpu_mem_map(address_map &map);
void ram_mem_map(address_map &map);
void rom_mem_map(address_map &map);
- DECLARE_READ16_MEMBER(cpu_mem_r);
- DECLARE_WRITE16_MEMBER(cpu_mem_w);
+ uint16_t cpu_mem_r(offs_t offset, uint16_t mem_mask = ~0);
+ void cpu_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void stm(uint8_t cycle_type);
void on_cycle_end();
void opcode_fetch(uint16_t opcode);
@@ -1010,7 +1010,7 @@ void hp9825t_state::rom_mem_map(address_map &map)
map(0x4000 , 0x53ff).rom().region(":rom" , 0x8000);
}
-READ16_MEMBER(hp9825t_state::cpu_mem_r)
+uint16_t hp9825t_state::cpu_mem_r(offs_t offset, uint16_t mem_mask)
{
bool from_rom;
@@ -1033,7 +1033,7 @@ READ16_MEMBER(hp9825t_state::cpu_mem_r)
return from_rom ? m_rom_space->read_word(offset , mem_mask) : m_ram_space->read_word(offset , mem_mask);
}
-WRITE16_MEMBER(hp9825t_state::cpu_mem_w)
+void hp9825t_state::cpu_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (m_cycle_type & hp_hybrid_cpu_device::CYCLE_WR_MASK) {
if (!(m_cycle_type & hp_hybrid_cpu_device::CYCLE_DMA_MASK)) {
diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp
index 617e10a6674..383f64b1efe 100644
--- a/src/mame/drivers/hp9845.cpp
+++ b/src/mame/drivers/hp9845.cpp
@@ -622,17 +622,17 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp9845_base_state::kb_scan)
memcpy(&m_kb_state[ 0 ] , &input[ 0 ] , sizeof(m_kb_state));
}
-READ16_MEMBER(hp9845_base_state::kb_scancode_r)
+uint16_t hp9845_base_state::kb_scancode_r()
{
return ~m_kb_scancode & 0x7f;
}
-READ16_MEMBER(hp9845_base_state::kb_status_r)
+uint16_t hp9845_base_state::kb_status_r()
{
return m_kb_status;
}
-WRITE16_MEMBER(hp9845_base_state::kb_irq_clear_w)
+void hp9845_base_state::kb_irq_clear_w(uint16_t data)
{
BIT_CLR(m_kb_status, 0);
update_kb_prt_irq();
@@ -755,8 +755,8 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- virtual DECLARE_READ16_MEMBER(graphic_r) override;
- virtual DECLARE_WRITE16_MEMBER(graphic_w) override;
+ virtual uint16_t graphic_r(offs_t offset) override;
+ virtual void graphic_w(offs_t offset, uint16_t data) override;
TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
@@ -820,7 +820,7 @@ void hp9845b_state::machine_reset()
update_graphic_bits();
}
-READ16_MEMBER(hp9845b_state::graphic_r)
+uint16_t hp9845b_state::graphic_r(offs_t offset)
{
uint16_t res = 0;
@@ -859,7 +859,7 @@ READ16_MEMBER(hp9845b_state::graphic_r)
return res;
}
-WRITE16_MEMBER(hp9845b_state::graphic_w)
+void hp9845b_state::graphic_w(offs_t offset, uint16_t data)
{
//logerror("wr gv R%u = %04x\n", 4 + offset , data);
@@ -1983,8 +1983,8 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- virtual DECLARE_READ16_MEMBER(graphic_r) override;
- virtual DECLARE_WRITE16_MEMBER(graphic_w) override;
+ virtual uint16_t graphic_r(offs_t offset) override;
+ virtual void graphic_w(offs_t offset, uint16_t data) override;
TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
@@ -2081,7 +2081,7 @@ void hp9845c_state::machine_reset()
m_gv_sk_int_latched = false;
}
-READ16_MEMBER(hp9845c_state::graphic_r)
+uint16_t hp9845c_state::graphic_r(offs_t offset)
{
uint16_t res = 0;
@@ -2133,7 +2133,7 @@ READ16_MEMBER(hp9845c_state::graphic_r)
return res;
}
-WRITE16_MEMBER(hp9845c_state::graphic_w)
+void hp9845c_state::graphic_w(offs_t offset, uint16_t data)
{
LOG("wr gv R%u = %04x\n", 4 + offset , data);
@@ -2721,8 +2721,8 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- virtual DECLARE_READ16_MEMBER(graphic_r) override;
- virtual DECLARE_WRITE16_MEMBER(graphic_w) override;
+ virtual uint16_t graphic_r(offs_t offset) override;
+ virtual void graphic_w(offs_t offset, uint16_t data) override;
TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
@@ -2792,7 +2792,7 @@ void hp9845t_state::machine_reset()
set_video_mar(0);
}
-READ16_MEMBER(hp9845t_state::graphic_r)
+uint16_t hp9845t_state::graphic_r(offs_t offset)
{
uint16_t res = 0;
@@ -2848,7 +2848,7 @@ READ16_MEMBER(hp9845t_state::graphic_r)
return res;
}
-WRITE16_MEMBER(hp9845t_state::graphic_w)
+void hp9845t_state::graphic_w(offs_t offset, uint16_t data)
{
LOG("wr gv R%u = %04x\n", 4 + offset , data);
diff --git a/src/mame/drivers/hp9k.cpp b/src/mame/drivers/hp9k.cpp
index 4a38eb77ca8..1895babc4d1 100644
--- a/src/mame/drivers/hp9k.cpp
+++ b/src/mame/drivers/hp9k.cpp
@@ -146,22 +146,22 @@ private:
uint8_t m_videoram[0x4000];
uint8_t m_screenram[0x800];
- DECLARE_READ16_MEMBER(buserror_r);
- DECLARE_WRITE16_MEMBER(buserror_w);
+ uint16_t buserror_r();
+ void buserror_w(uint16_t data);
- DECLARE_READ16_MEMBER(hp9k_videoram_r);
- DECLARE_WRITE16_MEMBER(hp9k_videoram_w);
+ uint16_t hp9k_videoram_r(offs_t offset, uint16_t mem_mask = ~0);
+ void hp9k_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- DECLARE_READ16_MEMBER(hp9k_prom_r);
- DECLARE_WRITE16_MEMBER(hp9k_prom_w);
+ uint16_t hp9k_prom_r(offs_t offset, uint16_t mem_mask = ~0);
+ void hp9k_prom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- DECLARE_READ16_MEMBER(keyboard_r);
- DECLARE_WRITE16_MEMBER(keyboard_w);
+ uint16_t keyboard_r(offs_t offset, uint16_t mem_mask = ~0);
+ void keyboard_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- DECLARE_READ16_MEMBER(leds_r);
- DECLARE_WRITE16_MEMBER(leds_w);
+ uint16_t leds_r(offs_t offset, uint16_t mem_mask = ~0);
+ void leds_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
- DECLARE_WRITE8_MEMBER(kbd_put);
+ void kbd_put(uint8_t data);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -194,29 +194,29 @@ void hp9k_state::calc_prom_crc(uint8_t* prom)
}
}
-READ16_MEMBER( hp9k_state::keyboard_r )
+uint16_t hp9k_state::keyboard_r(offs_t offset, uint16_t mem_mask)
{
//printf("keyboard read at [%x] mask [%x]\n",offset,mem_mask);
return 0x31;
}
-WRITE16_MEMBER( hp9k_state::keyboard_w )
+void hp9k_state::keyboard_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
//printf("keyboard write of [%x] at [%x]\n",data,offset);
}
-READ16_MEMBER( hp9k_state::leds_r )
+uint16_t hp9k_state::leds_r(offs_t offset, uint16_t mem_mask)
{
//printf("warning: leds read at [%x] mm [%x]\n",offset,mem_mask);
return 0;
}
-WRITE16_MEMBER( hp9k_state::leds_w )
+void hp9k_state::leds_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
//printf("warning: leds write of [%x] at [%x] mm [%x]\n",data,offset,mem_mask);
}
-READ16_MEMBER( hp9k_state::hp9k_prom_r )
+uint16_t hp9k_state::hp9k_prom_r(offs_t offset, uint16_t mem_mask)
{
//if (mem_mask!=0xff) printf("read of PROM at [%x] mem_mask [%x]\n",offset,mem_mask);
int k=prom16a[offset&0xff];
@@ -225,12 +225,12 @@ READ16_MEMBER( hp9k_state::hp9k_prom_r )
//return 0;
}
-WRITE16_MEMBER( hp9k_state::hp9k_prom_w )
+void hp9k_state::hp9k_prom_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
//printf("Error: write to prom\n");
}
-READ16_MEMBER( hp9k_state::hp9k_videoram_r )
+uint16_t hp9k_state::hp9k_videoram_r(offs_t offset, uint16_t mem_mask)
{
offset&=0x3fff;
@@ -254,7 +254,7 @@ READ16_MEMBER( hp9k_state::hp9k_videoram_r )
}
}
-WRITE16_MEMBER( hp9k_state::hp9k_videoram_w )
+void hp9k_state::hp9k_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
offset&=0x3fff;
@@ -292,14 +292,14 @@ WRITE16_MEMBER( hp9k_state::hp9k_videoram_w )
}
}
-READ16_MEMBER(hp9k_state::buserror_r)
+uint16_t hp9k_state::buserror_r()
{
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
return 0;
}
-WRITE16_MEMBER(hp9k_state::buserror_w)
+void hp9k_state::buserror_w(uint16_t data)
{
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
@@ -388,7 +388,7 @@ uint32_t hp9k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
return 0;
}
-WRITE8_MEMBER( hp9k_state::kbd_put )
+void hp9k_state::kbd_put(uint8_t data)
{
kbdBit=data;
}
diff --git a/src/mame/drivers/hp9k_3xx.cpp b/src/mame/drivers/hp9k_3xx.cpp
index e982d119ff4..48578c2327b 100644
--- a/src/mame/drivers/hp9k_3xx.cpp
+++ b/src/mame/drivers/hp9k_3xx.cpp
@@ -102,12 +102,12 @@ private:
void set_bus_error(uint32_t address, bool write, uint16_t mem_mask);
- DECLARE_READ16_MEMBER(buserror16_r);
- DECLARE_WRITE16_MEMBER(buserror16_w);
- DECLARE_READ32_MEMBER(buserror_r);
- DECLARE_WRITE32_MEMBER(buserror_w);
+ uint16_t buserror16_r(offs_t offset, uint16_t mem_mask = ~0);
+ void buserror16_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint32_t buserror_r(offs_t offset, uint32_t mem_mask = ~0);
+ void buserror_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
- DECLARE_WRITE16_MEMBER(led_w);
+ void led_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void hp9k310_map(address_map &map);
void hp9k320_map(address_map &map);
@@ -238,7 +238,7 @@ TIMER_CALLBACK_MEMBER(hp9k3xx_state::bus_error_timeout)
m_bus_error = false;
}
-WRITE16_MEMBER(hp9k3xx_state::led_w)
+void hp9k3xx_state::led_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (!(mem_mask & 0xff))
return;
@@ -297,27 +297,27 @@ void hp9k3xx_state::set_bus_error(uint32_t address, bool rw, uint16_t mem_mask)
m_bus_error_timer->adjust(m_maincpu->cycles_to_attotime(16)); // let rmw cycles complete
}
-READ16_MEMBER(hp9k3xx_state::buserror16_r)
+uint16_t hp9k3xx_state::buserror16_r(offs_t offset, uint16_t mem_mask)
{
if (!machine().side_effects_disabled())
set_bus_error((offset << 1) & 0xFFFFFF, true, mem_mask);
return 0xffff;
}
-WRITE16_MEMBER(hp9k3xx_state::buserror16_w)
+void hp9k3xx_state::buserror16_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
if (!machine().side_effects_disabled())
set_bus_error((offset << 1) & 0xFFFFFF, false, mem_mask);
}
-READ32_MEMBER(hp9k3xx_state::buserror_r)
+uint32_t hp9k3xx_state::buserror_r(offs_t offset, uint32_t mem_mask)
{
if (!machine().side_effects_disabled())
set_bus_error(offset << 2, false, mem_mask);
return 0xffffffff;
}
-WRITE32_MEMBER(hp9k3xx_state::buserror_w)
+void hp9k3xx_state::buserror_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
if (!machine().side_effects_disabled())
set_bus_error(offset << 2, false, mem_mask);
diff --git a/src/mame/drivers/hpz80unk.cpp b/src/mame/drivers/hpz80unk.cpp
index 20993cd1c09..4466112a797 100644
--- a/src/mame/drivers/hpz80unk.cpp
+++ b/src/mame/drivers/hpz80unk.cpp
@@ -61,11 +61,11 @@ public:
void hpz80unk(machine_config &config);
private:
- DECLARE_READ8_MEMBER(port00_r);
- DECLARE_READ8_MEMBER(port02_r);
- DECLARE_READ8_MEMBER(port03_r);
- DECLARE_READ8_MEMBER(port0d_r);
- DECLARE_READ8_MEMBER(portfc_r);
+ uint8_t port00_r();
+ uint8_t port02_r();
+ uint8_t port03_r();
+ uint8_t port0d_r();
+ uint8_t portfc_r();
void hpz80unk_io(address_map &map);
void hpz80unk_mem(address_map &map);
@@ -77,28 +77,28 @@ private:
required_device_array<ay51013_device, 3> m_uart;
};
-READ8_MEMBER( hpz80unk_state::port00_r )
+uint8_t hpz80unk_state::port00_r()
{
return (m_uart[0]->dav_r() << 1) | (m_uart[0]->tbmt_r()) | 0xfc;
}
-READ8_MEMBER( hpz80unk_state::port02_r )
+uint8_t hpz80unk_state::port02_r()
{
m_port02_data ^= 1;
return m_port02_data;
}
-READ8_MEMBER( hpz80unk_state::port03_r )
+uint8_t hpz80unk_state::port03_r()
{
return (m_uart[1]->dav_r() << 1) | (m_uart[1]->tbmt_r()) | 0xfc;
}
-READ8_MEMBER( hpz80unk_state::port0d_r )
+uint8_t hpz80unk_state::port0d_r()
{
return (m_uart[2]->dav_r() << 1) | (m_uart[2]->tbmt_r()) | 0xfc;
}
-READ8_MEMBER( hpz80unk_state::portfc_r )
+uint8_t hpz80unk_state::portfc_r()
{
return 0xfe; // or it halts
}
diff --git a/src/mame/drivers/ht6000.cpp b/src/mame/drivers/ht6000.cpp
index c679a55b1d9..2012b76b8ac 100644
--- a/src/mame/drivers/ht6000.cpp
+++ b/src/mame/drivers/ht6000.cpp
@@ -44,18 +44,18 @@ private:
void port_a_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(music_w);
- DECLARE_WRITE8_MEMBER(pg1_w);
- DECLARE_WRITE8_MEMBER(pg2_w);
- DECLARE_WRITE8_MEMBER(pg3_w);
- DECLARE_WRITE8_MEMBER(led_w);
- DECLARE_WRITE8_MEMBER(led_addr_w);
- DECLARE_WRITE8_MEMBER(led_data_w);
- DECLARE_READ8_MEMBER(switches_r);
- DECLARE_READ8_MEMBER(keys_r);
- DECLARE_WRITE8_MEMBER(ram_card_l_w);
- DECLARE_WRITE8_MEMBER(ram_card_h_w);
- DECLARE_READ8_MEMBER(rom2_r);
+ void music_w(offs_t offset, uint8_t data);
+ void pg1_w(uint8_t data);
+ void pg2_w(uint8_t data);
+ void pg3_w(uint8_t data);
+ void led_w(uint8_t data);
+ void led_addr_w(uint8_t data);
+ void led_data_w(uint8_t data);
+ uint8_t switches_r();
+ uint8_t keys_r();
+ void ram_card_l_w(uint8_t data);
+ void ram_card_h_w(uint8_t data);
+ uint8_t rom2_r(offs_t offset);
uint8_t m_port_a;
uint8_t m_led_latch;
@@ -229,33 +229,33 @@ void ht6000_state::port_a_w(uint8_t data)
m_port_a = data;
}
-WRITE8_MEMBER( ht6000_state::music_w )
+void ht6000_state::music_w(offs_t offset, uint8_t data)
{
// a8-a11 selects the chip (there are 4), a6-a7 selects command or data
logerror("music_w: offset = %02x, %02x = %02x\n", offset >> 8, (offset >> 6 & 0x03), data);
}
-WRITE8_MEMBER( ht6000_state::pg1_w )
+void ht6000_state::pg1_w(uint8_t data)
{
logerror("pg1_w: %02x\n", data);
}
-WRITE8_MEMBER( ht6000_state::pg2_w )
+void ht6000_state::pg2_w(uint8_t data)
{
logerror("pg2_w: %02x\n", data);
}
-WRITE8_MEMBER( ht6000_state::pg3_w )
+void ht6000_state::pg3_w(uint8_t data)
{
logerror("pg3_w: %02x\n", data);
}
-WRITE8_MEMBER( ht6000_state::led_w )
+void ht6000_state::led_w(uint8_t data)
{
logerror("led_w: %02x\n", data);
}
-WRITE8_MEMBER( ht6000_state::led_addr_w )
+void ht6000_state::led_addr_w(uint8_t data)
{
if (data != 0x00)
{
@@ -263,34 +263,34 @@ WRITE8_MEMBER( ht6000_state::led_addr_w )
}
}
-WRITE8_MEMBER( ht6000_state::led_data_w )
+void ht6000_state::led_data_w(uint8_t data)
{
m_led_latch = data;
}
-READ8_MEMBER( ht6000_state::switches_r )
+uint8_t ht6000_state::switches_r()
{
return m_switches[m_port_a & 0x0f]->read();
}
-READ8_MEMBER( ht6000_state::keys_r )
+uint8_t ht6000_state::keys_r()
{
return 0;
}
-WRITE8_MEMBER( ht6000_state::ram_card_l_w )
+void ht6000_state::ram_card_l_w(uint8_t data)
{
// a0-a7
m_ram_card_addr = (m_ram_card_addr & 0xff00) | (data << 0);
}
-WRITE8_MEMBER( ht6000_state::ram_card_h_w )
+void ht6000_state::ram_card_h_w(uint8_t data)
{
data &= 0x1f; // a8-a12
m_ram_card_addr = (m_ram_card_addr & 0x00ff) | (data << 8);
}
-READ8_MEMBER( ht6000_state::rom2_r )
+uint8_t ht6000_state::rom2_r(offs_t offset)
{
// a12-14 from port a
offs_t addr = ((m_port_a >> 4) & 0x07) << 12;
diff --git a/src/mame/drivers/hunter16.cpp b/src/mame/drivers/hunter16.cpp
index 1beda6a059f..aadb3dcea92 100644
--- a/src/mame/drivers/hunter16.cpp
+++ b/src/mame/drivers/hunter16.cpp
@@ -56,7 +56,7 @@ private:
MC6845_UPDATE_ROW(crtc_update_row);
- DECLARE_WRITE8_MEMBER(keyboard_w);
+ void keyboard_w(uint8_t data);
uint8_t m_keydata;
uint8_t pt_r();
@@ -191,7 +191,7 @@ MC6845_UPDATE_ROW(hunter16_state::crtc_update_row)
}
}
-WRITE8_MEMBER(hunter16_state::keyboard_w)
+void hunter16_state::keyboard_w(uint8_t data)
{
m_keydata = data;
}
diff --git a/src/mame/drivers/hunter2.cpp b/src/mame/drivers/hunter2.cpp
index 7c9634dc1a4..2b4a220feea 100644
--- a/src/mame/drivers/hunter2.cpp
+++ b/src/mame/drivers/hunter2.cpp
@@ -72,13 +72,13 @@ private:
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);
- DECLARE_WRITE8_MEMBER(serial_rts_w);
- DECLARE_WRITE8_MEMBER(speaker_w);
- DECLARE_WRITE8_MEMBER(irqctrl_w);
- DECLARE_WRITE8_MEMBER(memmap_w);
+ void display_ctrl_w(uint8_t data);
+ void serial_tx_w(uint8_t data);
+ void serial_dtr_w(uint8_t data);
+ void serial_rts_w(uint8_t data);
+ void speaker_w(uint8_t data);
+ void irqctrl_w(uint8_t data);
+ void memmap_w(uint8_t data);
void hunter2_palette(palette_device &palette) const;
DECLARE_WRITE_LINE_MEMBER(timer0_out);
@@ -263,7 +263,7 @@ uint8_t hunter2_state::portc_r()
/*
ANGLE - Controls display viewing angle. Input value in the range 0-0x1F.
*/
-WRITE8_MEMBER( hunter2_state::display_ctrl_w )
+void hunter2_state::display_ctrl_w(uint8_t data)
{
/* according to the website,
Bit 2: Backlight toggle
@@ -276,7 +276,7 @@ Bits 1,0,7,6: Contrast level.
V24OUT - Directly outputs to the V24 data line signal on bit 0.
The output is voltage inverted ie. 0 = +ve, 1 = -ve
*/
-WRITE8_MEMBER( hunter2_state::serial_tx_w )
+void hunter2_state::serial_tx_w(uint8_t data)
{
m_rs232->write_txd(data & 0x01);
}
@@ -284,7 +284,7 @@ WRITE8_MEMBER( hunter2_state::serial_tx_w )
/*
DTR output bit
*/
-WRITE8_MEMBER( hunter2_state::serial_dtr_w )
+void hunter2_state::serial_dtr_w(uint8_t data)
{
m_rs232->write_dtr(data & 0x01);
}
@@ -292,12 +292,12 @@ WRITE8_MEMBER( hunter2_state::serial_dtr_w )
/*
RTS output bit
*/
-WRITE8_MEMBER( hunter2_state::serial_rts_w )
+void hunter2_state::serial_rts_w(uint8_t data)
{
m_rs232->write_rts(data & 0x01);
}
-WRITE8_MEMBER( hunter2_state::speaker_w )
+void hunter2_state::speaker_w(uint8_t data)
{
m_speaker->level_w(BIT(data, 0));
}
@@ -309,7 +309,7 @@ Bit 1 = Enable RSTC interrupts
Bit 2 = Enable RSTB interrupts
Bit 3 = Enable RSTA interrupts
*/
-WRITE8_MEMBER( hunter2_state::irqctrl_w )
+void hunter2_state::irqctrl_w(uint8_t data)
{
m_irq_mask = data;
if(!(data & 0x08))
@@ -323,7 +323,7 @@ WRITE8_MEMBER( hunter2_state::irqctrl_w )
/*
PAGE - Memory paging register
*/
-WRITE8_MEMBER( hunter2_state::memmap_w )
+void hunter2_state::memmap_w(uint8_t data)
{
address_space &prog_space = m_maincpu->space(AS_PROGRAM);
uint8_t bank = data & 0x0f;
diff --git a/src/mame/drivers/husky.cpp b/src/mame/drivers/husky.cpp
index 1c9260f88a6..c5837ae1c9a 100644
--- a/src/mame/drivers/husky.cpp
+++ b/src/mame/drivers/husky.cpp
@@ -67,11 +67,11 @@ private:
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);
- DECLARE_WRITE8_MEMBER(irqctrl_w);
- DECLARE_WRITE8_MEMBER(page_w);
+ void serial_tx_w(uint8_t data);
+ void cursor_w(uint8_t data);
+ void curinh_w(uint8_t data);
+ void irqctrl_w(uint8_t data);
+ void page_w(offs_t offset, uint8_t data);
void husky_palette(palette_device &palette) const;
DECLARE_WRITE_LINE_MEMBER(timer0_out);
@@ -254,7 +254,7 @@ void husky_state::portc_w(uint8_t data)
/*
CURSOR - Output with a number 0-7F for the cursor position on the display
*/
-WRITE8_MEMBER(husky_state::cursor_w)
+void husky_state::cursor_w(uint8_t data)
{
m_cursor = data & 0x7f;
}
@@ -262,7 +262,7 @@ WRITE8_MEMBER(husky_state::cursor_w)
/*
CURINH - Inhibit cursor. BIT0 = 1 : Cursor off, BIT0 = 0 : Cursor on
*/
-WRITE8_MEMBER(husky_state::curinh_w)
+void husky_state::curinh_w(uint8_t data)
{
m_curinh = BIT(data, 0);
}
@@ -271,7 +271,7 @@ WRITE8_MEMBER(husky_state::curinh_w)
V24OUT - Directly outputs to the V24 data line signal on bit 0.
The output is voltage inverted ie. 0 = +ve, 1 = -ve
*/
-WRITE8_MEMBER(husky_state::serial_tx_w)
+void husky_state::serial_tx_w(uint8_t data)
{
m_rs232->write_txd(data & 0x01);
}
@@ -283,7 +283,7 @@ Bit 1 = Enable RSTC interrupts
Bit 2 = Enable RSTB interrupts
Bit 3 = Enable RSTA interrupts
*/
-WRITE8_MEMBER(husky_state::irqctrl_w)
+void husky_state::irqctrl_w(uint8_t data)
{
m_irq_mask = data;
if(!(data & 0x08))
@@ -297,7 +297,7 @@ WRITE8_MEMBER(husky_state::irqctrl_w)
/*
PAGA 16, 17, 18 - Memory paging addresses
*/
-WRITE8_MEMBER(husky_state::page_w)
+void husky_state::page_w(offs_t offset, uint8_t data)
{
if (offset == 0x02)
{
diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp
index 38c78e6985b..909f437a5f9 100644
--- a/src/mame/drivers/hvyunit.cpp
+++ b/src/mame/drivers/hvyunit.cpp
@@ -132,16 +132,16 @@ private:
/* Mermaid */
uint8_t m_mermaid_p[4];
- DECLARE_WRITE8_MEMBER(trigger_nmi_on_slave_cpu);
- DECLARE_WRITE8_MEMBER(master_bankswitch_w);
- DECLARE_READ8_MEMBER(mermaid_status_r);
- DECLARE_WRITE8_MEMBER(videoram_w);
- DECLARE_WRITE8_MEMBER(colorram_w);
- DECLARE_WRITE8_MEMBER(slave_bankswitch_w);
- DECLARE_WRITE8_MEMBER(scrollx_w);
- DECLARE_WRITE8_MEMBER(scrolly_w);
- DECLARE_WRITE8_MEMBER(slave_ack_w);
- DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
+ void trigger_nmi_on_slave_cpu(uint8_t data);
+ void master_bankswitch_w(uint8_t data);
+ uint8_t mermaid_status_r();
+ void videoram_w(offs_t offset, uint8_t data);
+ void colorram_w(offs_t offset, uint8_t data);
+ void slave_bankswitch_w(uint8_t data);
+ void scrollx_w(uint8_t data);
+ void scrolly_w(uint8_t data);
+ void slave_ack_w(uint8_t data);
+ void sound_bankswitch_w(uint8_t data);
void mermaid_p0_w(uint8_t data);
uint8_t mermaid_p1_r();
void mermaid_p1_w(uint8_t data);
@@ -244,17 +244,17 @@ WRITE_LINE_MEMBER(hvyunit_state::screen_vblank)
*
*************************************/
-WRITE8_MEMBER(hvyunit_state::trigger_nmi_on_slave_cpu)
+void hvyunit_state::trigger_nmi_on_slave_cpu(uint8_t data)
{
m_slavecpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
-WRITE8_MEMBER(hvyunit_state::master_bankswitch_w)
+void hvyunit_state::master_bankswitch_w(uint8_t data)
{
m_masterbank->set_entry(data & 7);
}
-READ8_MEMBER(hvyunit_state::mermaid_status_r)
+uint8_t hvyunit_state::mermaid_status_r()
{
return (!m_slavelatch->pending_r() << 2) | (m_mermaidlatch->pending_r() << 3);
}
@@ -266,35 +266,35 @@ READ8_MEMBER(hvyunit_state::mermaid_status_r)
*
*************************************/
-WRITE8_MEMBER(hvyunit_state::videoram_w)
+void hvyunit_state::videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(hvyunit_state::colorram_w)
+void hvyunit_state::colorram_w(offs_t offset, uint8_t data)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(hvyunit_state::slave_bankswitch_w)
+void hvyunit_state::slave_bankswitch_w(uint8_t data)
{
m_port0_data = data;
m_slavebank->set_entry(data & 3);
}
-WRITE8_MEMBER(hvyunit_state::scrollx_w)
+void hvyunit_state::scrollx_w(uint8_t data)
{
m_scrollx = data;
}
-WRITE8_MEMBER(hvyunit_state::scrolly_w)
+void hvyunit_state::scrolly_w(uint8_t data)
{
m_scrolly = data;
}
-WRITE8_MEMBER(hvyunit_state::slave_ack_w)
+void hvyunit_state::slave_ack_w(uint8_t data)
{
m_slavecpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
@@ -306,7 +306,7 @@ WRITE8_MEMBER(hvyunit_state::slave_ack_w)
*
*************************************/
-WRITE8_MEMBER(hvyunit_state::sound_bankswitch_w)
+void hvyunit_state::sound_bankswitch_w(uint8_t data)
{
m_soundbank->set_entry(data & 3);
}
diff --git a/src/mame/drivers/hyprduel.cpp b/src/mame/drivers/hyprduel.cpp
index b70a3010429..b5002b722c7 100644
--- a/src/mame/drivers/hyprduel.cpp
+++ b/src/mame/drivers/hyprduel.cpp
@@ -72,13 +72,13 @@ public:
void init_hyprduel();
private:
- DECLARE_READ8_MEMBER(irq_cause_r);
- DECLARE_WRITE8_MEMBER(irq_cause_w);
- DECLARE_WRITE16_MEMBER(subcpu_control_w);
- DECLARE_READ16_MEMBER(hyprduel_cpusync_trigger1_r);
- DECLARE_WRITE16_MEMBER(hyprduel_cpusync_trigger1_w);
- DECLARE_READ16_MEMBER(hyprduel_cpusync_trigger2_r);
- DECLARE_WRITE16_MEMBER(hyprduel_cpusync_trigger2_w);
+ uint8_t irq_cause_r();
+ void irq_cause_w(uint8_t data);
+ void subcpu_control_w(uint16_t data);
+ uint16_t hyprduel_cpusync_trigger1_r(offs_t offset);
+ void hyprduel_cpusync_trigger1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+ uint16_t hyprduel_cpusync_trigger2_r(offs_t offset);
+ void hyprduel_cpusync_trigger2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
DECLARE_MACHINE_START(hyprduel);
DECLARE_MACHINE_START(magerror);
TIMER_CALLBACK_MEMBER(vblank_end_callback);
@@ -149,12 +149,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(hyprduel_state::interrupt)
update_irq_state();
}
-READ8_MEMBER(hyprduel_state::irq_cause_r)
+uint8_t hyprduel_state::irq_cause_r()
{
return m_requested_int;
}
-WRITE8_MEMBER(hyprduel_state::irq_cause_w)
+void hyprduel_state::irq_cause_w(uint8_t data)
{
if (data == m_int_num)
m_requested_int &= ~(m_int_num & ~*m_irq_enable);
@@ -165,7 +165,7 @@ WRITE8_MEMBER(hyprduel_state::irq_cause_w)
}
-WRITE16_MEMBER(hyprduel_state::subcpu_control_w)
+void hyprduel_state::subcpu_control_w(uint16_t data)
{
switch (data)
{
@@ -196,7 +196,7 @@ WRITE16_MEMBER(hyprduel_state::subcpu_control_w)
}
-READ16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger1_r)
+uint16_t hyprduel_state::hyprduel_cpusync_trigger1_r(offs_t offset)
{
if (m_cpu_trigger == 1001)
{
@@ -207,7 +207,7 @@ READ16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger1_r)
return m_sharedram[0][0x000408 / 2 + offset];
}
-WRITE16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger1_w)
+void hyprduel_state::hyprduel_cpusync_trigger1_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sharedram[0][0x00040e / 2 + offset]);
@@ -222,7 +222,7 @@ WRITE16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger1_w)
}
-READ16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger2_r)
+uint16_t hyprduel_state::hyprduel_cpusync_trigger2_r(offs_t offset)
{
if (m_cpu_trigger == 1002)
{
@@ -233,7 +233,7 @@ READ16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger2_r)
return m_sharedram[2][(0xfff34c - 0xfe4000) / 2 + offset];
}
-WRITE16_MEMBER(hyprduel_state::hyprduel_cpusync_trigger2_w)
+void hyprduel_state::hyprduel_cpusync_trigger2_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_sharedram[0][0x000408 / 2 + offset]);
@@ -554,10 +554,10 @@ void hyprduel_state::init_hyprduel()
m_int_num = 0x02;
/* cpu synchronization (severe timings) */
- m_maincpu->space(AS_PROGRAM).install_write_handler(0xc0040e, 0xc00411, write16_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger1_w)));
- m_subcpu->space(AS_PROGRAM).install_read_handler(0xc00408, 0xc00409, read16_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger1_r)));
- m_maincpu->space(AS_PROGRAM).install_write_handler(0xc00408, 0xc00409, write16_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger2_w)));
- m_subcpu->space(AS_PROGRAM).install_read_handler(0xfff34c, 0xfff34d, read16_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger2_r)));
+ m_maincpu->space(AS_PROGRAM).install_write_handler(0xc0040e, 0xc00411, write16s_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger1_w)));
+ m_subcpu->space(AS_PROGRAM).install_read_handler(0xc00408, 0xc00409, read16sm_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger1_r)));
+ m_maincpu->space(AS_PROGRAM).install_write_handler(0xc00408, 0xc00409, write16s_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger2_w)));
+ m_subcpu->space(AS_PROGRAM).install_read_handler(0xfff34c, 0xfff34d, read16sm_delegate(*this, FUNC(hyprduel_state::hyprduel_cpusync_trigger2_r)));
}
void hyprduel_state::init_magerror()
diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp
index 9fd3dd291d8..78d4d65c28a 100644
--- a/src/mame/drivers/mappy.cpp
+++ b/src/mame/drivers/mappy.cpp
@@ -946,7 +946,7 @@ static INPUT_PORTS_START( grobda )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Level_Select ) ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "10k, 50k & Every 50k" ) PORT_DIPLOCATION("SW2:7,8")
PORT_DIPSETTING( 0x40, "10k & 30k Only" )
PORT_DIPSETTING( 0xc0, "10k Only" )
diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp
index e0135aa56c3..791a89d39be 100644
--- a/src/mame/drivers/mc10.cpp
+++ b/src/mame/drivers/mc10.cpp
@@ -1,9 +1,11 @@
// license:BSD-3-Clause
-// copyright-holders:Nathan Woods, Dirk Best
+// copyright-holders:Nathan Woods, Dirk Best, tim lindner
/***************************************************************************
TRS-80 Radio Shack MicroColor Computer
+ May 2020: Added emulation for Darren Atkinson's MCX 128.
+
***************************************************************************/
@@ -12,6 +14,7 @@
#include "cpu/m6800/m6801.h"
#include "imagedev/cassette.h"
#include "imagedev/printer.h"
+#include "bus/rs232/rs232.h"
#include "machine/ram.h"
#include "machine/timer.h"
#include "sound/dac.h"
@@ -41,9 +44,12 @@ public:
void alice32(machine_config &config);
void mc10(machine_config &config);
-private:
DECLARE_READ8_MEMBER(mc10_bfff_r);
DECLARE_WRITE8_MEMBER(mc10_bfff_w);
+
+protected:
+ required_device<m6803_cpu_device> m_maincpu;
+
uint8_t mc10_port1_r();
void mc10_port1_w(uint8_t data);
uint8_t mc10_port2_r();
@@ -54,29 +60,11 @@ private:
uint8_t mc6847_videoram_r(offs_t offset);
TIMER_DEVICE_CALLBACK_MEMBER(alice32_scanline);
- void alice32_mem(address_map &map);
- void alice90_mem(address_map &map);
- void mc10_mem(address_map &map);
-
// device-level overrides
virtual void driver_start() override;
+ virtual void driver_reset() override;
- //printer state
- enum class printer_state : uint8_t
- {
- WAIT,
- REC,
- DONE
- };
-
- required_device<m6803_cpu_device> m_maincpu;
- optional_device<mc6847_base_device> m_mc6847;
- optional_device<ef9345_device> m_ef9345;
- required_device<dac_bit_interface> m_dac;
required_device<ram_device> m_ram;
- required_device<cassette_image_device> m_cassette;
- required_device<printer_image_device> m_printer;
- required_ioport_array<8> m_pb;
required_memory_bank m_bank1;
optional_memory_bank m_bank2;
@@ -85,14 +73,54 @@ private:
uint8_t m_keyboard_strobe;
uint8_t m_port2;
- // printer
- uint8_t m_pr_buffer;
- uint8_t m_pr_counter;
- printer_state m_pr_state;
-
uint8_t read_keyboard_strobe(bool single_line);
+
+private:
+ void alice32_mem(address_map &map);
+ void alice90_mem(address_map &map);
+ void mc10_mem(address_map &map);
+
+ optional_device<mc6847_base_device> m_mc6847;
+ optional_device<ef9345_device> m_ef9345;
+ required_device<dac_bit_interface> m_dac;
+ required_device<cassette_image_device> m_cassette;
+ required_device<rs232_port_device> m_rs232;
+ required_ioport_array<8> m_pb;
};
+class mcx128_state : public mc10_state
+{
+public:
+ mcx128_state(const machine_config &mconfig, device_type type, const char *tag);
+ void mcx128(machine_config &config);
+
+private:
+ DECLARE_READ8_MEMBER(mcx128_bf00_r);
+ DECLARE_WRITE8_MEMBER(mcx128_bf00_w);
+
+ void mcx128_mem(address_map &map);
+ void update_mcx128_banking();
+
+ // device-level overrides
+ virtual void driver_start() override;
+ virtual void driver_reset() override;
+
+ required_device<ram_device> m_mcx_ram;
+ required_memory_bank m_bank3;
+ required_memory_bank m_bank4r;
+ required_memory_bank m_bank4w;
+ required_memory_bank m_bank5r;
+ required_memory_bank m_bank5w;
+ required_memory_bank m_bank6r;
+ required_memory_bank m_bank6w;
+
+ uint8_t *m_mcx_cart_rom_base;
+ uint8_t *m_mcx_int_rom_base;
+ uint8_t *m_mcx_ram_base;
+
+ uint8_t m_bank_control;
+ uint8_t m_map_control;
+};
/***************************************************************************
MEMORY MAPPED I/O
@@ -145,6 +173,97 @@ WRITE8_MEMBER( mc10_state::alice32_bfff_w )
m_dac->write(BIT(data, 7));
}
+/***************************************************************************
+ $bf00: RAM Bank Control Register
+ 7 6 5 4 3 2 1 0
+ | | | | | | | |
+ | | | | | | | +- Bank Selection for Page 0
+ | | | | | | +--- Bank Selection for Page 1
+ +-+-+-+-+-+----- N/C
+ $bf01: ROM Map Control Register
+ 7 6 5 4 3 2 1 0 | reading | writing |
+ | | | | | | | | 0 0 - 16K External ROM 16K RAM
+ | | | | | | | +-\_ 0 1 - 8K RAM / 8K External ROM 16K RAM
+ | | | | | | +---/ 1 0 - 8K RAM / 8K Internal ROM 16K RAM
+ | | | | | | 1 1 - 16K RAM 16K RAM
+ +-+-+-+-+-+--------N/C
+***************************************************************************/
+
+void mcx128_state::update_mcx128_banking()
+{
+ int32_t bank_offset_page_0 = 0x10000 * BIT(m_bank_control,0);
+ int32_t bank_offset_page_1 = 0x10000 * BIT(m_bank_control,1);
+
+ // 0x0000 - 0x3fff
+ m_bank1->set_base(m_mcx_ram_base + bank_offset_page_0 + 0);
+
+ // 0x4000 - 0x4fff
+ if( bank_offset_page_1 == 0)
+ m_bank2->set_base(m_ram_base); /* internal 4K when page is 0 */
+ else
+ m_bank2->set_base(m_mcx_ram_base + bank_offset_page_1 + 0x8000);
+
+ // 0x5000 - 0xbeff
+ m_bank3->set_base(m_mcx_ram_base + bank_offset_page_1 + 0x8000 + 0x1000);
+
+ // 0xc000 - 0xdfff
+ m_bank4w->set_base(m_mcx_ram_base + bank_offset_page_0 + 0x4000);
+
+ // 0xe000 - 0xfeff
+ m_bank5w->set_base(m_mcx_ram_base + bank_offset_page_0 + 0x6000);
+
+ // 0xff00 - 0xffff
+ m_bank6w->set_base(m_mcx_ram_base + 0 + 0x7f00); /* always bank 0 */
+
+ switch( m_map_control )
+ {
+ case 0:
+ m_bank4r->set_base(m_mcx_cart_rom_base);
+ m_bank5r->set_base(m_mcx_cart_rom_base + 0x2000);
+ m_bank6r->set_base(m_mcx_cart_rom_base + 0x3f00);
+ break;
+
+ case 1:
+ m_bank4r->set_base(m_mcx_ram_base + bank_offset_page_0 + 0x4000);
+ m_bank5r->set_base(m_mcx_cart_rom_base + 0x2000 + 0x2000);
+ m_bank6r->set_base(m_mcx_cart_rom_base + 0x3f00 + 0x2000);
+ break;
+
+ case 2:
+ m_bank4r->set_base(m_mcx_ram_base + bank_offset_page_0 + 0x4000);
+ m_bank5r->set_base(m_mcx_int_rom_base);
+ m_bank6r->set_base(m_mcx_int_rom_base + 0x1f00);
+ break;
+
+ case 3:
+ m_bank4r->set_base(m_mcx_ram_base + bank_offset_page_0 + 0x4000);
+ m_bank5r->set_base(m_mcx_ram_base + bank_offset_page_0 + 0x6000);
+ m_bank6r->set_base(m_mcx_ram_base + 0 + 0x7f00); /* always bank 0 */
+ break;
+
+ default:
+ // can't get here
+ break;
+ }
+}
+
+READ8_MEMBER( mcx128_state::mcx128_bf00_r )
+{
+ if( (offset & 1) == 0 ) return m_bank_control;
+
+ return m_map_control;
+}
+
+WRITE8_MEMBER( mcx128_state::mcx128_bf00_w )
+{
+ if( (offset & 1) == 0 )
+ m_bank_control = data & 3;
+ else
+ m_map_control = data & 3;
+
+ update_mcx128_banking();
+}
+
/***************************************************************************
MC6803 I/O
@@ -171,10 +290,11 @@ uint8_t mc10_state::mc10_port2_r()
if (!BIT(m_keyboard_strobe, 2)) result &= m_pb[2]->read() >> 5;
if (!BIT(m_keyboard_strobe, 7)) result &= m_pb[7]->read() >> 5;
- // bit 2, printer ots input
- result |= (m_printer->is_ready() ? 1 : 0) << 2;
+ // bit 2, rs232 input
+ result |= (m_rs232->rxd_r() ? 1 : 0) << 2;
- // bit 3, rs232 input
+ // bit 3, printer ots input
+ result |= (m_rs232->cts_r() ? 1 : 0) << 3;
// bit 4, cassette input
result |= (m_cassette->input() >= 0 ? 1 : 0) << 4;
@@ -187,28 +307,7 @@ void mc10_state::mc10_port2_w(uint8_t data)
// bit 0, cassette & printer output
m_cassette->output( BIT(data, 0) ? +1.0 : -1.0);
- switch (m_pr_state)
- {
- case printer_state::WAIT:
- if (BIT(m_port2, 0) && !BIT(data, 0))
- {
- m_pr_state = printer_state::REC;
- m_pr_counter = 8;
- m_pr_buffer = 0;
- }
- break;
- case printer_state::REC:
- if (m_pr_counter--)
- m_pr_buffer |= (BIT(data,0)<<(7-m_pr_counter));
- else
- m_pr_state = printer_state::DONE;
- break;
- case printer_state::DONE:
- if (BIT(data,0))
- m_printer->output(m_pr_buffer);
- m_pr_state = printer_state::WAIT;
- break;
- }
+ m_rs232->write_txd(BIT(data, 0) ? 1 : 0);
m_port2 = data;
}
@@ -239,18 +338,36 @@ TIMER_DEVICE_CALLBACK_MEMBER(mc10_state::alice32_scanline)
mc10_state::mc10_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
+ , m_ram(*this, RAM_TAG)
+ , m_bank1(*this, "bank1")
+ , m_bank2(*this, "bank2")
, m_mc6847(*this, "mc6847")
, m_ef9345(*this, "ef9345")
, m_dac(*this, "dac")
- , m_ram(*this, RAM_TAG)
, m_cassette(*this, "cassette")
- , m_printer(*this, "printer")
+ , m_rs232(*this, "rs232")
, m_pb(*this, "pb%u", 0)
- , m_bank1(*this, "bank1")
- , m_bank2(*this, "bank2")
{
}
+mcx128_state::mcx128_state(const machine_config &mconfig, device_type type, const char *tag)
+ : mc10_state(mconfig, type, tag)
+ , m_mcx_ram(*this, "mcx_ram")
+ , m_bank3(*this, "bank3")
+ , m_bank4r(*this, "bank4r")
+ , m_bank4w(*this, "bank4w")
+ , m_bank5r(*this, "bank5r")
+ , m_bank5w(*this, "bank5w")
+ , m_bank6r(*this, "bank6r")
+ , m_bank6w(*this, "bank6w")
+{
+}
+
+void mc10_state::driver_reset()
+{
+ /* initialize keyboard strobe */
+ m_keyboard_strobe = 0x00;
+}
void mc10_state::driver_start()
{
@@ -259,14 +376,9 @@ void mc10_state::driver_start()
address_space &prg = m_maincpu->space(AS_PROGRAM);
- /* initialize keyboard strobe */
- m_keyboard_strobe = 0x00;
-
/* initialize memory */
m_ram_base = m_ram->pointer();
m_ram_size = m_ram->size();
- m_pr_state = printer_state::WAIT;
-
m_bank1->set_base(m_ram_base);
/* initialize memory expansion */
@@ -282,14 +394,39 @@ void mc10_state::driver_start()
/* register for state saving */
save_item(NAME(m_keyboard_strobe));
- save_item(NAME(m_pr_state));
- save_item(NAME(m_pr_counter));
//for alice32 force port4 DDR to 0xff at startup
//if (!strcmp(machine().system().name, "alice32") || !strcmp(machine().system().name, "alice90"))
//m_maincpu->m6801_io_w(prg, 0x05, 0xff);
}
+void mcx128_state::driver_start()
+{
+ // call base device_start
+ driver_device::driver_start();
+
+ /* initialize memory */
+ m_ram_base = m_ram->pointer();
+ m_ram_size = m_ram->size();
+
+ m_mcx_ram_base = m_mcx_ram->pointer();
+ m_mcx_cart_rom_base = memregion("cart")->base();
+ m_mcx_int_rom_base = memregion("maincpu")->base();
+
+ save_item(NAME(m_bank_control));
+ save_item(NAME(m_map_control));
+}
+
+void mcx128_state::driver_reset()
+{
+ // call base device_start
+ mc10_state::driver_reset();
+
+ m_bank_control = 0;
+ m_map_control = 0;
+
+ update_mcx128_banking();
+}
/***************************************************************************
ADDRESS MAPS
@@ -325,6 +462,23 @@ void mc10_state::alice90_mem(address_map &map)
map(0xc000, 0xffff).rom().region("maincpu", 0x0000); /* ROM */
}
+void mcx128_state::mcx128_mem(address_map &map)
+{
+ map(0x0000, 0x3fff).bankrw("bank1");
+ map(0x4000, 0x4fff).bankrw("bank2");
+ map(0x5000, 0xbeff).bankrw("bank3");
+ map(0xbf00, 0xbf01).rw(FUNC(mcx128_state::mcx128_bf00_r), FUNC(mcx128_state::mcx128_bf00_w));
+ map(0xbf02, 0xbf7f).noprw(); /* unused */
+ map(0xbf80, 0xbffe).noprw(); /* unused */
+ map(0xbfff, 0xbfff).rw(FUNC(mc10_state::mc10_bfff_r), FUNC(mc10_state::mc10_bfff_w));
+ map(0xc000, 0xdfff).bankr("bank4r");
+ map(0xc000, 0xdfff).bankw("bank4w");
+ map(0xe000, 0xfeff).bankr("bank5r");
+ map(0xe000, 0xfeff).bankw("bank5w");
+ map(0xff00, 0xffff).bankr("bank6r");
+ map(0xff00, 0xffff).bankw("bank6w");
+}
+
/***************************************************************************
INPUT PORTS
***************************************************************************/
@@ -498,6 +652,14 @@ INPUT_PORTS_START( alice )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
INPUT_PORTS_END
+static DEVICE_INPUT_DEFAULTS_START( printer )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
+ DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
+ DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
+ DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 )
+DEVICE_INPUT_DEFAULTS_END
+
/***************************************************************************
MACHINE DRIVERS
***************************************************************************/
@@ -532,7 +694,8 @@ void mc10_state::mc10(machine_config &config)
m_cassette->set_interface("mc10_cass");
/* printer */
- PRINTER(config, m_printer, 0);
+ rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "printer"));
+ rs232.set_option_device_input_defaults("printer", DEVICE_INPUT_DEFAULTS_NAME(printer));
/* internal ram */
RAM(config, m_ram).set_default_size("20K").set_extra_options("4K");
@@ -575,7 +738,8 @@ void mc10_state::alice32(machine_config &config)
m_cassette->set_interface("mc10_cass");
/* printer */
- PRINTER(config, m_printer, 0);
+ rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "printer"));
+ rs232.set_option_device_input_defaults("printer", DEVICE_INPUT_DEFAULTS_NAME(printer));
/* internal ram */
RAM(config, m_ram).set_default_size("24K").set_extra_options("8K");
@@ -598,6 +762,17 @@ void mc10_state::alice90(machine_config &config)
config.device_remove("mc10_cass");
}
+void mcx128_state::mcx128(machine_config &config)
+{
+ mc10(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mcx128_state::mcx128_mem);
+
+ /* internal ram */
+ m_ram->set_default_size("4K");
+ RAM(config, m_mcx_ram).set_default_size("128K");
+
+ /* Software lists */
+ /* to do */
}
@@ -631,14 +806,31 @@ ROM_START( alice90 )
ROM_LOAD( "charset.rom", 0x0000, 0x2000, BAD_DUMP CRC(b2f49eb3) SHA1(d0ef530be33bfc296314e7152302d95fdf9520fc) ) // from dcvg5k
ROM_END
-ALLOW_SAVE_TYPE(mc10_state::printer_state);
+ROM_START( mcx128 )
+ ROM_REGION(0x2000, "maincpu", 0)
+ ROM_LOAD("mc10.rom", 0x0000, 0x2000, CRC(11fda97e) SHA1(4afff2b4c120334481aab7b02c3552bf76f1bc43))
+ ROM_REGION(0x4000, "cart", 0)
+ ROM_LOAD("mcx128bas.rom", 0x0000, 0x4000, CRC(11202e4b) SHA1(36c30d0f198a1bffee88ef29d92f2401447a91f4))
+ROM_END
+
+ROM_START( alice128 )
+ ROM_REGION(0x2000, "maincpu", 0)
+ ROM_LOAD("alice.rom", 0x0000, 0x2000, CRC(f876abe9) SHA1(c2166b91e6396a311f486832012aa43e0d2b19f8))
+ ROM_REGION(0x4000, "cart", 0)
+ ROM_LOAD("alice128bas.rom", 0x0000, 0x4000, CRC(a737544a) SHA1(c8fd92705fc42deb6a0ffac6274e27fd61ecd4cc))
+ROM_END
+
+}
/***************************************************************************
GAME DRIVERS
***************************************************************************/
-// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1983, mc10, 0, 0, mc10, mc10, mc10_state, empty_init, "Tandy Radio Shack", "MC-10", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, alice, mc10, 0, mc10, alice, mc10_state, empty_init, "Matra & Hachette", "Alice", MACHINE_SUPPORTS_SAVE )
-COMP( 1984, alice32, 0, 0, alice32, alice, mc10_state, empty_init, "Matra & Hachette", "Alice 32", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-COMP( 1985, alice90, alice32, 0, alice90, alice, mc10_state, empty_init, "Matra & Hachette", "Alice 90", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+COMP( 1983, mc10, 0, 0, mc10, mc10, mc10_state, empty_init, "Tandy Radio Shack", "MC-10", MACHINE_SUPPORTS_SAVE )
+COMP( 1983, alice, mc10, 0, mc10, alice, mc10_state, empty_init, "Matra & Hachette", "Alice", MACHINE_SUPPORTS_SAVE )
+COMP( 1984, alice32, 0, 0, alice32, alice, mc10_state, empty_init, "Matra & Hachette", "Alice 32", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+COMP( 1985, alice90, alice32, 0, alice90, alice, mc10_state, empty_init, "Matra & Hachette", "Alice 90", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+COMP( 2011, mcx128, mc10, 0, mcx128, mc10, mcx128_state, empty_init, "Tandy Radio Shack", "MCX-128", MACHINE_SUPPORTS_SAVE | MACHINE_UNOFFICIAL )
+COMP( 2011, alice128,mc10, 0, mcx128, alice, mcx128_state, empty_init, "Matra & Hachette", "Alice with MCX-128", MACHINE_SUPPORTS_SAVE | MACHINE_UNOFFICIAL )
+
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index 4c8e08ed88a..e0663309e4a 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -31,7 +31,7 @@ TODO:
+ cybrcomm enemies should flash white when you shoot them, probably lighting related
+ timecris helicopter, car, grenade boxes should flash white when you shoot them (similar to cybrcomm)
- improve ss22 spot, only used in dirtdash and testmode, not understood well:
- + should probably be done before global fade
+ + should be done before global fade, see dirtdash when starting at jungle level
+ should not apply to some of the sprites in dirtdash jungle level (eg. time/position)
+ how is it enabled exactly? the enable bit in spotram is set in tokyowar too(which doesn't use spot)
+ what is the high bit in spot_factor for? not used anywhere
diff --git a/src/mame/drivers/play_3.cpp b/src/mame/drivers/play_3.cpp
index b46d2f7ae8b..5740a735b57 100644
--- a/src/mame/drivers/play_3.cpp
+++ b/src/mame/drivers/play_3.cpp
@@ -599,6 +599,14 @@ ROM_START(theraid)
ROM_LOAD("theraid.snd", 0x0000, 0x2000, CRC(e33f8363) SHA1(e7f251c334b15e12b1eb7e079c2e9a5f64338052))
ROM_END
+ROM_START(theraida)
+ ROM_REGION(0x4000, "maincpu", 0)
+ ROM_LOAD("ph_6_1a0.u13", 0x0000, 0x2000, CRC(cc2b1872) SHA1(e61071450cc6b0fa5e6297f75bca0391039dca10))
+
+ ROM_REGION(0x4000, "audiocpu", 0)
+ ROM_LOAD("mrd_1a0.u3", 0x0000, 0x2000, CRC(e33f8363) SHA1(e7f251c334b15e12b1eb7e079c2e9a5f64338052))
+ROM_END
+
/*-------------------------------------------------------------------
/ 11/84 UFO-X
/-------------------------------------------------------------------*/
@@ -765,8 +773,9 @@ ROM_START(msdisco)
ROM_REGION(0x4000, "audiocpu", ROMREGION_ERASEFF)
ROM_END
-
-// Terrific Lake (Sport Matic)
+/*-------------------------------------------------------------------
+/ ??/87 Terrific Lake (Sport Matic)
+/-------------------------------------------------------------------*/
ROM_START(terrlake)
ROM_REGION(0x4000, "maincpu", 0)
ROM_LOAD("jtl_2a3.u9", 0x0000, 0x2000, CRC(f6d3cedd) SHA1(31e0daac1e9215ad0e1557d31d520745ead0f396))
@@ -781,6 +790,7 @@ GAME(1983, megaaton, 0, megaaton, megaaton, play_3_state, empty_init, R
GAME(1983, megaatona, megaaton, megaaton, megaaton, play_3_state, empty_init, ROT0, "Playmatic", "Meg-Aaton (alternate set)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
GAME(1984, nautilus, 0, play_3, play_3, play_3_state, empty_init, ROT0, "Playmatic", "Nautilus", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
GAME(1984, theraid, 0, play_3, play_3, play_3_state, empty_init, ROT0, "Playmatic", "The Raid", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
+GAME(1984, theraida, theraid, play_3, play_3, play_3_state, empty_init, ROT0, "Playmatic", "The Raid (alternate set)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
GAME(1984, ufo_x, 0, play_3, play_3, play_3_state, empty_init, ROT0, "Playmatic", "UFO-X", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
GAME(1984, kz26, 0, play_3, play_3, play_3_state, empty_init, ROT0, "Playmatic", "KZ-26", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
GAME(1985, rock2500, 0, play_3, play_3, play_3_state, empty_init, ROT0, "Playmatic", "Rock 2500", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
diff --git a/src/mame/drivers/roland_tr909.cpp b/src/mame/drivers/roland_tr909.cpp
new file mode 100644
index 00000000000..3b39c59fbd4
--- /dev/null
+++ b/src/mame/drivers/roland_tr909.cpp
@@ -0,0 +1,293 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Skeleton driver for Roland TR-909 drum machine.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "bus/generic/slot.h"
+#include "cpu/upd7810/upd7810.h"
+#include "machine/nvram.h"
+
+class roland_tr909_state : public driver_device
+{
+public:
+ roland_tr909_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_cartslot(*this, "cartslot")
+ , m_inputs(*this, "IN%u", 1U)
+ , m_porta(0)
+ , m_portb(0)
+ {
+ }
+
+ void tr909(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
+ void dac1_w(u8 data);
+ void dac2_w(u8 data);
+ void dac3_w(u8 data);
+ void dac4_w(u8 data);
+ void dac5_w(u8 data);
+ void dac6_w(u8 data);
+ void dac7_w(u8 data);
+ void dac8_w(u8 data);
+ void trig1_w(u8 data);
+ void trig2_w(u8 data);
+
+ void pa_w(u8 data);
+ void pb_w(u8 data);
+ u8 switches_r();
+ u8 cart_sense_r();
+
+ void tr909_mem(address_map &map);
+
+ required_device<generic_cartslot_device> m_cartslot;
+ required_ioport_array<5> m_inputs;
+
+ u8 m_porta;
+ u8 m_portb;
+};
+
+
+void roland_tr909_state::machine_start()
+{
+ save_item(NAME(m_porta));
+ save_item(NAME(m_portb));
+}
+
+void roland_tr909_state::machine_reset()
+{
+ dac1_w(0);
+ dac2_w(0);
+ dac3_w(0);
+ dac4_w(0);
+ dac5_w(0);
+ dac6_w(0);
+ dac7_w(0);
+ dac8_w(0);
+ trig1_w(0);
+ trig2_w(0);
+}
+
+
+void roland_tr909_state::dac1_w(u8 data)
+{
+ logerror("%s: DAC 1 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac2_w(u8 data)
+{
+ logerror("%s: DAC 2 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac3_w(u8 data)
+{
+ logerror("%s: DAC 3 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac4_w(u8 data)
+{
+ logerror("%s: DAC 4 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac5_w(u8 data)
+{
+ logerror("%s: DAC 5 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac6_w(u8 data)
+{
+ logerror("%s: DAC 6 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac7_w(u8 data)
+{
+ logerror("%s: DAC 7 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::dac8_w(u8 data)
+{
+ logerror("%s: DAC 8 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+void roland_tr909_state::trig1_w(u8 data)
+{
+ // D6 is unused
+ logerror("%s: Trigger 1 = %02X\n", machine().describe_context(), data & 0x3e);
+}
+
+void roland_tr909_state::trig2_w(u8 data)
+{
+ logerror("%s: Trigger 2 = %02X\n", machine().describe_context(), data & 0x7e);
+}
+
+
+void roland_tr909_state::pa_w(u8 data)
+{
+ // TODO: LED matrix and 4511 digits
+ m_porta = data;
+}
+
+void roland_tr909_state::pb_w(u8 data)
+{
+ // TODO: LED matrix, 4511 LE and tape outputs
+ m_portb = data;
+}
+
+u8 roland_tr909_state::switches_r()
+{
+ u8 data = 0xff;
+ for (int i = 0; i < 5; i++)
+ if (!BIT(m_porta, i))
+ data &= m_inputs[i]->read();
+
+ return data;
+}
+
+u8 roland_tr909_state::cart_sense_r()
+{
+ // TODO
+ return 0;
+}
+
+
+void roland_tr909_state::tr909_mem(address_map &map)
+{
+ map(0x0000, 0x1fff).rom().region("firmware", 0);
+ map(0x2000, 0x3fff).ram().share("nvram");
+ map(0x4000, 0x4000).mirror(0x1fff).r(FUNC(roland_tr909_state::switches_r));
+ map(0x4001, 0x4001).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac1_w));
+ map(0x4002, 0x4002).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac2_w));
+ map(0x4003, 0x4003).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac3_w));
+ map(0x4004, 0x4004).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac4_w));
+ map(0x4005, 0x4005).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac5_w));
+ map(0x4006, 0x4006).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac6_w));
+ map(0x4007, 0x4007).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac7_w));
+ map(0x4008, 0x4008).mirror(0x1ff0).w(FUNC(roland_tr909_state::dac8_w));
+ map(0x4009, 0x4009).mirror(0x1ff0).w(FUNC(roland_tr909_state::trig1_w));
+ map(0x400a, 0x400a).mirror(0x1ff0).w(FUNC(roland_tr909_state::trig2_w));
+ map(0x6000, 0x7fff).unmaprw(); // cartridge
+}
+
+
+static INPUT_PORTS_START(tr909)
+ PORT_START("IN1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW1")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW2")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW3")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW4")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW5")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW6")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW7")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW8")
+
+ PORT_START("IN2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW9")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW10")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW11")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW12")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW13")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW14")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW15")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW16")
+
+ PORT_START("IN3")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Shift")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Scale")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inst Select")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Shuffle/Flam")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Last Step")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Stop/Cont")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Start")
+
+ PORT_START("IN4")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Clear")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Track 1")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Track 2")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Track 3")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Track 4")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pattern 1")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pattern 2")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pattern 3")
+
+ PORT_START("IN5")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Enter/Accent")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tape Sync")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cycle")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Available Meas")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Fwd")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Back")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tempo")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Ext Inst")
+
+ PORT_START("TEMPO")
+ PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN) // TODO: analog
+
+ PORT_START("TOTAL")
+ PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN) // TODO: analog
+INPUT_PORTS_END
+
+
+static void ram_carts(device_slot_interface &device)
+{
+}
+
+void roland_tr909_state::tr909(machine_config &config)
+{
+ upd7810_device &maincpu(UPD7810(config, "maincpu", 12_MHz_XTAL));
+ maincpu.set_addrmap(AS_PROGRAM, &roland_tr909_state::tr909_mem);
+ maincpu.pa_out_cb().set(FUNC(roland_tr909_state::pa_w));
+ maincpu.pb_out_cb().set(FUNC(roland_tr909_state::pb_w));
+ //maincpu.pc_in_cb().set(FUNC(roland_tr909_state::tr909_portc_r));
+ //maincpu.pc_out_cb().set(FUNC(roland_tr909_state::tr909_portc_w));
+ maincpu.an0_func().set_ioport("TEMPO");
+ maincpu.an1_func().set(FUNC(roland_tr909_state::cart_sense_r));
+ maincpu.an2_func().set_constant(0);
+ maincpu.an3_func().set_ioport("TOTAL");
+ maincpu.an4_func().set_constant(0);
+ maincpu.an5_func().set_constant(0);
+ maincpu.an6_func().set_constant(0);
+ maincpu.an7_func().set_constant(0);
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5565PL-15 + battery
+
+ // no screen
+
+ GENERIC_CARTSLOT(config, m_cartslot, ram_carts, "tr909_cart", "bin");
+
+ //SOFTWARE_LIST(config, "cart_list", "tr909");
+}
+
+
+ROM_START(tr909)
+ ROM_REGION(0x2000, "firmware", 0)
+ //cpu is a D7811G 037 with 4096w of ROM
+ //mode pins are both pulled to 5v
+
+ //version 0 and 1 firmware also exist
+ ROM_SYSTEM_BIOS(0, "v4", "v4.0")
+ ROMX_LOAD("tr909_v4.ic609", 0, 0x2000, CRC(a9b45f30) SHA1(b94374e2cd6b5a6c405da4fa7793c98c0a6015c4), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS(1, "v1", "v1.0")
+ ROMX_LOAD("tr909_v1.ic609", 0, 0x2000, CRC(bfb9682b) SHA1(bcd754900574d1861034af8056574ffa77db3067), ROM_BIOS(1))
+
+ //samples
+ ROM_REGION(0x8000, "hihat", 0)
+ ROM_LOAD("hn61256p__c43.ic69", 0, 0x8000, CRC(2aaae11b) SHA1(22a34d603e78673bb096f5e56a8971afe14d8fee))
+
+ ROM_REGION(0x8000, "crash", 0)
+ ROM_LOAD("hn61256p__c42.ic62", 0, 0x8000, CRC(dc61cf1a) SHA1(bc730107b0c391f4879c9777a3e85f3e57f3aad6))
+
+ ROM_REGION(0x8000, "ride", 0)
+ ROM_LOAD("hn61256p__c44.ic54", 0, 0x8000, CRC(01a9b435) SHA1(daa54c58c7e3ae3398f125568537ec82d5bd1dfd))
+ROM_END
+
+
+SYST(1984, tr909, 0, 0, tr909, tr909, roland_tr909_state, empty_init, "Roland", "TR-909 Rhythm Composer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
diff --git a/src/mame/drivers/spectrum.cpp b/src/mame/drivers/spectrum.cpp
index d2958032bf0..13127a78e0d 100644
--- a/src/mame/drivers/spectrum.cpp
+++ b/src/mame/drivers/spectrum.cpp
@@ -341,7 +341,7 @@ READ8_MEMBER(spectrum_state::spectrum_rom_r)
bit 2-0: border colour
*/
-WRITE8_MEMBER(spectrum_state::spectrum_port_fe_w)
+void spectrum_state::spectrum_port_fe_w(uint8_t data)
{
unsigned char Changed;
@@ -848,40 +848,43 @@ ROM_START(spectrum)
ROMX_LOAD("spectrum.rom", 0x0000, 0x4000, CRC(ddee531f) SHA1(5ea7c2b824672e914525d1d5c419d71b84a426a2), ROM_BIOS(0))
ROM_SYSTEM_BIOS(1, "sp", "Spanish")
ROMX_LOAD("48e.rom", 0x0000, 0x4000, CRC(f051746e) SHA1(9e535e2e24231ccb65e33d107f6d0ceb23e99477), ROM_BIOS(1))
- ROM_SYSTEM_BIOS(2, "bsrom118", "BusySoft Upgrade v1.18")
- ROMX_LOAD("bsrom118.rom", 0x0000, 0x4000, CRC(1511cddb) SHA1(ab3c36daad4325c1d3b907b6dc9a14af483d14ec), ROM_BIOS(2))
- ROM_SYSTEM_BIOS(3, "bsrom140", "BusySoft Upgrade v1.40")
- ROMX_LOAD("bsrom140.rom", 0x0000, 0x4000, CRC(07017c6d) SHA1(2ee2dbe6ab96b60d7af1d6cb763b299374c21776), ROM_BIOS(3))
- ROM_SYSTEM_BIOS(4, "groot", "De Groot's Upgrade")
- ROMX_LOAD("groot.rom", 0x0000, 0x4000, CRC(abf18c45) SHA1(51165cde68e218512d3145467074bc7e786bf307), ROM_BIOS(4))
- ROM_SYSTEM_BIOS(5, "48turbo", "48 Turbo")
- ROMX_LOAD("48turbo.rom", 0x0000, 0x4000, CRC(56189781) SHA1(e62a431b0938af414b7ab8b1349a18b3c4407f70), ROM_BIOS(5))
- ROM_SYSTEM_BIOS(6, "psycho", "Maly's Psycho Upgrade")
- ROMX_LOAD("psycho.rom", 0x0000, 0x4000, CRC(cd60b589) SHA1(0853e25857d51dd41b20a6dbc8e80f028c5befaa), ROM_BIOS(6))
- ROM_SYSTEM_BIOS(7, "turbo23", "Turbo 2.3")
- ROMX_LOAD("turbo2_3.rom", 0x0000, 0x4000, CRC(fd3b0413) SHA1(84ea64af06adaf05e68abe1d69454b4fc6888505), ROM_BIOS(7))
- ROM_SYSTEM_BIOS(8, "turbo44", "Turbo 4.4")
- ROMX_LOAD("turbo4_4.rom", 0x0000, 0x4000, CRC(338b6e87) SHA1(21ad93ffe41a4458704c866cca2754f066f6a560), ROM_BIOS(8))
- ROM_SYSTEM_BIOS(9, "imc", "Ian Collier's Upgrade")
- ROMX_LOAD("imc.rom", 0x0000, 0x4000, CRC(d1be99ee) SHA1(dee814271c4d51de257d88128acdb324fb1d1d0d), ROM_BIOS(9))
- ROM_SYSTEM_BIOS(10, "plus4", "ZX Spectrum +4")
- ROMX_LOAD("plus4.rom",0x0000,0x4000, CRC(7e0f47cb) SHA1(c103e89ef58e6ade0c01cea0247b332623bd9a30), ROM_BIOS(10))
- ROM_SYSTEM_BIOS(11, "deutsch", "German unofficial (Andrew Owen)")
- ROMX_LOAD("deutsch.rom",0x0000,0x4000, CRC(1a9190f4) SHA1(795c20324311dd5a56300e6e4ec49b0a694ac0b3), ROM_BIOS(11))
- ROM_SYSTEM_BIOS(12, "hdt", "HDT-ISO HEX-DEC-TEXT")
- ROMX_LOAD("hdt-iso.rom",0x0000,0x4000, CRC(b81c570c) SHA1(2a9745ba3b369a84c4913c98ede66ec87cb8aec1), ROM_BIOS(12))
- ROM_SYSTEM_BIOS(13, "sc", "The Sea Change Minimal ROM V1.78")
- ROMX_LOAD("sc01.rom",0x0000,0x4000, CRC(73b4057a) SHA1(c58ff44a28db47400f09ed362ca0527591218136), ROM_BIOS(13))
- ROM_SYSTEM_BIOS(14, "gosh", "GOSH Wonderful ZX Spectrum ROM V1.32")
- ROMX_LOAD("gw03.rom",0x0000,0x4000, CRC(5585d7c2) SHA1(a701c3d4b698f7d2be537dc6f79e06e4dbc95929), ROM_BIOS(14))
- ROM_SYSTEM_BIOS(15, "1986es", "1986ES Snapshot")
- ROMX_LOAD("1986es.rom",0x0000,0x4000, CRC(9e0fdaaa) SHA1(f9d23f25640c51bcaa63e21ed5dd66bb2d5f63d4), ROM_BIOS(15))
- ROM_SYSTEM_BIOS(16, "jgh", "JGH ROM V0.74 (C) J.G.Harston")
- ROMX_LOAD("jgh.rom",0x0000,0x4000, CRC(7224138e) SHA1(d7f02ed66455f1c08ac0c864c7038a92a88ba94a), ROM_BIOS(16))
- ROM_SYSTEM_BIOS(17, "iso22", "ISO ROM V2.2")
- ROMX_LOAD("isomoje.rom",0x0000,0x4000, CRC(62ab3640) SHA1(04adbdb1380d6ccd4ab26ddd61b9ccbba462a60f), ROM_BIOS(17))
- ROM_SYSTEM_BIOS(18, "iso8", "ISO ROM 8")
- ROMX_LOAD("iso8bm.rom",0x0000,0x4000, CRC(43e9c2fd) SHA1(5752e6f789769475711b91e0a75911fa5232c767), ROM_BIOS(18))
+ ROM_SYSTEM_BIOS(2, "p", "Prototype") // breadboard PCB with a maze of wires underneath, keyboard has handwritten labels
+ ROMX_LOAD("0,1.eprom1", 0x0000, 0x2000, CRC(6b807b7a) SHA1(7d14f1929c086b0954edb386f02b06ed283b602a), ROM_BIOS(2))
+ ROMX_LOAD("2,3.eprom2", 0x2000, 0x2000, CRC(f54a389b) SHA1(eab62eda635a56c24132022947fdeefcd18215f5), ROM_BIOS(2))
+ ROM_SYSTEM_BIOS(3, "bsrom118", "BusySoft Upgrade v1.18")
+ ROMX_LOAD("bsrom118.rom", 0x0000, 0x4000, CRC(1511cddb) SHA1(ab3c36daad4325c1d3b907b6dc9a14af483d14ec), ROM_BIOS(3))
+ ROM_SYSTEM_BIOS(4, "bsrom140", "BusySoft Upgrade v1.40")
+ ROMX_LOAD("bsrom140.rom", 0x0000, 0x4000, CRC(07017c6d) SHA1(2ee2dbe6ab96b60d7af1d6cb763b299374c21776), ROM_BIOS(4))
+ ROM_SYSTEM_BIOS(5, "groot", "De Groot's Upgrade")
+ ROMX_LOAD("groot.rom", 0x0000, 0x4000, CRC(abf18c45) SHA1(51165cde68e218512d3145467074bc7e786bf307), ROM_BIOS(5))
+ ROM_SYSTEM_BIOS(6, "48turbo", "48 Turbo")
+ ROMX_LOAD("48turbo.rom", 0x0000, 0x4000, CRC(56189781) SHA1(e62a431b0938af414b7ab8b1349a18b3c4407f70), ROM_BIOS(6))
+ ROM_SYSTEM_BIOS(7, "psycho", "Maly's Psycho Upgrade")
+ ROMX_LOAD("psycho.rom", 0x0000, 0x4000, CRC(cd60b589) SHA1(0853e25857d51dd41b20a6dbc8e80f028c5befaa), ROM_BIOS(7))
+ ROM_SYSTEM_BIOS(8, "turbo23", "Turbo 2.3")
+ ROMX_LOAD("turbo2_3.rom", 0x0000, 0x4000, CRC(fd3b0413) SHA1(84ea64af06adaf05e68abe1d69454b4fc6888505), ROM_BIOS(8))
+ ROM_SYSTEM_BIOS(9, "turbo44", "Turbo 4.4")
+ ROMX_LOAD("turbo4_4.rom", 0x0000, 0x4000, CRC(338b6e87) SHA1(21ad93ffe41a4458704c866cca2754f066f6a560), ROM_BIOS(9))
+ ROM_SYSTEM_BIOS(10, "imc", "Ian Collier's Upgrade")
+ ROMX_LOAD("imc.rom", 0x0000, 0x4000, CRC(d1be99ee) SHA1(dee814271c4d51de257d88128acdb324fb1d1d0d), ROM_BIOS(10))
+ ROM_SYSTEM_BIOS(11, "plus4", "ZX Spectrum +4")
+ ROMX_LOAD("plus4.rom",0x0000,0x4000, CRC(7e0f47cb) SHA1(c103e89ef58e6ade0c01cea0247b332623bd9a30), ROM_BIOS(11))
+ ROM_SYSTEM_BIOS(12, "deutsch", "German unofficial (Andrew Owen)")
+ ROMX_LOAD("deutsch.rom",0x0000,0x4000, CRC(1a9190f4) SHA1(795c20324311dd5a56300e6e4ec49b0a694ac0b3), ROM_BIOS(12))
+ ROM_SYSTEM_BIOS(13, "hdt", "HDT-ISO HEX-DEC-TEXT")
+ ROMX_LOAD("hdt-iso.rom",0x0000,0x4000, CRC(b81c570c) SHA1(2a9745ba3b369a84c4913c98ede66ec87cb8aec1), ROM_BIOS(13))
+ ROM_SYSTEM_BIOS(14, "sc", "The Sea Change Minimal ROM V1.78")
+ ROMX_LOAD("sc01.rom",0x0000,0x4000, CRC(73b4057a) SHA1(c58ff44a28db47400f09ed362ca0527591218136), ROM_BIOS(14))
+ ROM_SYSTEM_BIOS(15, "gosh", "GOSH Wonderful ZX Spectrum ROM V1.32")
+ ROMX_LOAD("gw03.rom",0x0000,0x4000, CRC(5585d7c2) SHA1(a701c3d4b698f7d2be537dc6f79e06e4dbc95929), ROM_BIOS(15))
+ ROM_SYSTEM_BIOS(16, "1986es", "1986ES Snapshot")
+ ROMX_LOAD("1986es.rom",0x0000,0x4000, CRC(9e0fdaaa) SHA1(f9d23f25640c51bcaa63e21ed5dd66bb2d5f63d4), ROM_BIOS(16))
+ ROM_SYSTEM_BIOS(17, "jgh", "JGH ROM V0.74 (C) J.G.Harston")
+ ROMX_LOAD("jgh.rom",0x0000,0x4000, CRC(7224138e) SHA1(d7f02ed66455f1c08ac0c864c7038a92a88ba94a), ROM_BIOS(17))
+ ROM_SYSTEM_BIOS(18, "iso22", "ISO ROM V2.2")
+ ROMX_LOAD("isomoje.rom",0x0000,0x4000, CRC(62ab3640) SHA1(04adbdb1380d6ccd4ab26ddd61b9ccbba462a60f), ROM_BIOS(18))
+ ROM_SYSTEM_BIOS(19, "iso8", "ISO ROM 8")
+ ROMX_LOAD("iso8bm.rom",0x0000,0x4000, CRC(43e9c2fd) SHA1(5752e6f789769475711b91e0a75911fa5232c767), ROM_BIOS(19))
ROM_END
ROM_START(specide)
@@ -1076,7 +1079,7 @@ ROM_END
/* Any clone known to have the same "floating bus" behaviour as official Sinclair models should be changed to use the "spectrum" machine */
-// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
COMP( 1982, spectrum, 0, 0, spectrum, spectrum, spectrum_state, init_spectrum, "Sinclair Research Ltd", "ZX Spectrum" , 0 )
COMP( 1987, spec80k, spectrum, 0, spectrum_clone, spectrum, spectrum_state, init_spectrum, "<unknown>", "ZX Spectrum 80K", MACHINE_UNOFFICIAL )
COMP( 1995, specide, spectrum, 0, spectrum_clone, spectrum, spectrum_state, init_spectrum, "<unknown>", "ZX Spectrum IDE", MACHINE_UNOFFICIAL )
diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h
index 2bdcc86b658..a0d3e1f0010 100644
--- a/src/mame/includes/dynax.h
+++ b/src/mame/includes/dynax.h
@@ -104,7 +104,7 @@ protected:
DECLARE_WRITE8_MEMBER(dynax_vblank_ack_w);
void dynax_blit_dest_w(uint8_t data);
- DECLARE_WRITE8_MEMBER(dynax_blit_romregion_w);
+ void dynax_blit_romregion_w(uint8_t data);
DECLARE_WRITE8_MEMBER(dynax_extra_scrollx_w);
DECLARE_WRITE8_MEMBER(dynax_extra_scrolly_w);
diff --git a/src/mame/includes/funworld.h b/src/mame/includes/funworld.h
index 4bed1e1bc19..6a578334a2d 100644
--- a/src/mame/includes/funworld.h
+++ b/src/mame/includes/funworld.h
@@ -45,8 +45,8 @@ public:
void init_jolycdig();
protected:
- DECLARE_WRITE8_MEMBER(funworld_videoram_w);
- DECLARE_WRITE8_MEMBER(funworld_colorram_w);
+ void funworld_videoram_w(offs_t offset, uint8_t data);
+ void funworld_colorram_w(offs_t offset, uint8_t data);
void funworld_lamp_a_w(uint8_t data);
void funworld_lamp_b_w(uint8_t data);
@@ -63,8 +63,8 @@ protected:
tilemap_t *m_bg_tilemap = nullptr;
private:
- DECLARE_READ8_MEMBER(questions_r);
- DECLARE_WRITE8_MEMBER(question_bank_w);
+ uint8_t questions_r(offs_t offset);
+ void question_bank_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w);
uint8_t funquiz_ay8910_a_r();
uint8_t funquiz_ay8910_b_r();
@@ -130,7 +130,7 @@ protected:
virtual void video_start() override;
private:
- DECLARE_READ8_MEMBER(chinatow_r_32f0);
+ uint8_t chinatow_r_32f0(offs_t offset);
void chinatow_map(address_map &map);
};
@@ -151,7 +151,7 @@ protected:
private:
cpu_device* _maincpu {};
- DECLARE_READ8_MEMBER(multiwin_opcode_r);
+ uint8_t multiwin_opcode_r(offs_t offset);
void multiwin_opcodes_map(address_map& map);
};
@@ -167,7 +167,7 @@ public:
private:
cpu_device* _maincpu {};
- DECLARE_READ8_MEMBER(royalcrdf_opcode_r);
+ uint8_t royalcrdf_opcode_r(offs_t offset);
void royalcrdf_map(address_map& map);
void royalcrdf_opcodes_map(address_map& map);
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index 5279c61ae4d..8ef83768e6b 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -182,6 +182,7 @@ public:
void init_azurian();
void init_pisces();
void init_batman2();
+ void init_highroll();
void init_frogg();
void init_mooncrst();
void init_mooncrsu();
@@ -314,6 +315,7 @@ public:
void pacmanbl(machine_config &config);
void quaak(machine_config &config);
void galaxian(machine_config &config);
+ void highroll(machine_config &config);
void tenspot(machine_config &config);
void froggers(machine_config &config);
void froggervd(machine_config &config);
diff --git a/src/mame/includes/gaplus.h b/src/mame/includes/gaplus.h
index 3e9b0745176..a9d4f849904 100644
--- a/src/mame/includes/gaplus.h
+++ b/src/mame/includes/gaplus.h
@@ -109,6 +109,7 @@ protected:
tilemap_t *m_bg_tilemap;
uint8_t m_starfield_control[4];
int m_total_stars;
+ int m_starfield_framecount;
struct star m_stars[MAX_STARS];
uint8_t m_main_irq_mask;
uint8_t m_sub_irq_mask;
diff --git a/src/mame/includes/generalplus_gpl16250.h b/src/mame/includes/generalplus_gpl16250.h
index 18243509602..b53ba23bb87 100644
--- a/src/mame/includes/generalplus_gpl16250.h
+++ b/src/mame/includes/generalplus_gpl16250.h
@@ -113,5 +113,4 @@ protected:
private:
};
-
#endif
diff --git a/src/mame/includes/generalplus_gpl16250_romram.h b/src/mame/includes/generalplus_gpl16250_romram.h
index 4dc8cdfa01e..10b843cda0e 100644
--- a/src/mame/includes/generalplus_gpl16250_romram.h
+++ b/src/mame/includes/generalplus_gpl16250_romram.h
@@ -101,6 +101,23 @@ private:
};
+class jak_prft_game_state : public jak_s500_game_state
+{
+public:
+ jak_prft_game_state(const machine_config& mconfig, device_type type, const char* tag) :
+ jak_s500_game_state(mconfig, type, tag)
+ {
+ }
+
+
+protected:
+
+ virtual void machine_reset() override;
+
+private:
+};
+
+
#endif // MAME_INCLUDES_GENERALPLUS_GPL16250_ROMRAM_H
diff --git a/src/mame/includes/hp9845.h b/src/mame/includes/hp9845.h
index f4f51c37668..62c2a2b6e42 100644
--- a/src/mame/includes/hp9845.h
+++ b/src/mame/includes/hp9845.h
@@ -32,14 +32,14 @@ protected:
TIMER_DEVICE_CALLBACK_MEMBER(gv_timer);
- virtual DECLARE_READ16_MEMBER(graphic_r) = 0;
- virtual DECLARE_WRITE16_MEMBER(graphic_w) = 0;
+ virtual uint16_t graphic_r(offs_t offset) = 0;
+ virtual void graphic_w(offs_t offset, uint16_t data) = 0;
attotime time_to_gv_mem_availability() const;
TIMER_DEVICE_CALLBACK_MEMBER(kb_scan);
- DECLARE_READ16_MEMBER(kb_scancode_r);
- DECLARE_READ16_MEMBER(kb_status_r);
- DECLARE_WRITE16_MEMBER(kb_irq_clear_w);
+ uint16_t kb_scancode_r();
+ uint16_t kb_status_r();
+ void kb_irq_clear_w(uint16_t data);
TIMER_DEVICE_CALLBACK_MEMBER(beeper_off);
DECLARE_WRITE_LINE_MEMBER(prt_irl_w);
diff --git a/src/mame/includes/spectrum.h b/src/mame/includes/spectrum.h
index 937defb42c0..bf73a5c09e5 100644
--- a/src/mame/includes/spectrum.h
+++ b/src/mame/includes/spectrum.h
@@ -146,7 +146,7 @@ protected:
DECLARE_READ8_MEMBER(spectrum_data_r);
DECLARE_WRITE8_MEMBER(spectrum_data_w);
- DECLARE_WRITE8_MEMBER(spectrum_port_fe_w);
+ void spectrum_port_fe_w(uint8_t data);
DECLARE_READ8_MEMBER(spectrum_port_fe_r);
DECLARE_READ8_MEMBER(spectrum_port_ula_r);
DECLARE_READ8_MEMBER(spectrum_clone_port_ula_r);
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 549b4b33d90..e805ec4eb71 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -14098,6 +14098,7 @@ gteikoku // (c) Irem
gteikokub // bootleg
gteikokub2 // bootleg
gteikokub3 // bootleg (Honly Enterprises)
+highroll //
jumpbug // (c) 1981 Rock-ola
jumpbugb // (c) 1981 Sega
jungsub // bootleg
@@ -21866,6 +21867,8 @@ alice // Matra & Hachette Ordinateur Alice
alice32 // Matra & Hachette Alice 32
alice90 // Matra & Hachette Alice 90
mc10 // MC-10
+mcx128 // MCX-128
+alice128 // Alice with a MCX-128
@source:mc1000.cpp
mc1000 //
@@ -33668,6 +33671,7 @@ starfirp //
starfirpa //
terrlake //
theraid //
+theraida // (c) 1984 Playmatic / EFOSA
trailer //
ufo_x //
@@ -34843,6 +34847,9 @@ tr606 // Roland
tr707 //
tr727 //
+@source:roland_tr909.cpp
+tr909 //
+
@source:roland_u20.cpp
u20 //
u220 //
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index 134f52d74a4..377208bcedd 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -795,6 +795,7 @@ roland_sc88.cpp
roland_tb303.cpp
roland_tr606.cpp
roland_tr707.cpp
+roland_tr909.cpp
roland_u20.cpp
rt1715.cpp
rvoice.cpp
diff --git a/src/mame/video/armedf.cpp b/src/mame/video/armedf.cpp
index 513e60d9c30..45a9b36f1f8 100644
--- a/src/mame/video/armedf.cpp
+++ b/src/mame/video/armedf.cpp
@@ -372,7 +372,6 @@ u32 armedf_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
m_fg_tilemap->set_scrollx(0, m_fg_scrollx);
m_fg_tilemap->set_scrolly(0, m_fg_scrolly);
break;
-
}
screen.priority().fill(0, cliprect);
diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp
index 703cff584ab..d13af9d0f41 100644
--- a/src/mame/video/cps1.cpp
+++ b/src/mame/video/cps1.cpp
@@ -1855,7 +1855,7 @@ static const struct CPS1config cps1_config_table[]=
{"sf2b", CPS_B_17, mapper_STF29, 0x36, 0, 0, 1 },
{"sf2b2", CPS_B_17, mapper_STF29, 0x36, 0, 0, 1 },
{"sf2ceupl", HACK_B_1, mapper_S9263B, 0x36, 0, 0, 1 },
- {"sf2rules", HACK_B_1, mapper_S9263B, 0x36, 0, 0, 2 },
+ {"sf2rules", HACK_B_1, mapper_S9263B, 0x36, 0, 0, 1 },
{"sf2ceds6", HACK_B_1, mapper_S9263B, 0, 0, 0, 2 },
{"sf2cems6a", HACK_B_1, mapper_S9263B, 0, 0, 0, 2 },
{"sf2cems6b", HACK_B_1, mapper_S9263B, 0, 0, 0, 2 },
@@ -2290,7 +2290,7 @@ void cps_state::cps1_get_video_base()
if (m_game_config->bootleg_kludge == 2)
{
m_cps_a_regs[CPS1_OBJ_BASE] = 0x9100;
- scroll1xoff = -0x0c;
+ scroll1xoff = -0x10;
scroll2xoff = -0x10;
scroll3xoff = -0x10;
}
diff --git a/src/mame/video/dynax.cpp b/src/mame/video/dynax.cpp
index 797e1f62df4..5d31aea9f8b 100644
--- a/src/mame/video/dynax.cpp
+++ b/src/mame/video/dynax.cpp
@@ -276,7 +276,7 @@ WRITE_LINE_MEMBER(dynax_state::flipscreen_w)
-WRITE8_MEMBER(dynax_state::dynax_blit_romregion_w)
+void dynax_state::dynax_blit_romregion_w(uint8_t data)
{
if (data < 8)
m_blitter->set_rom_bank(data);
diff --git a/src/mame/video/funworld.cpp b/src/mame/video/funworld.cpp
index 48193255cf2..90efd4d8351 100644
--- a/src/mame/video/funworld.cpp
+++ b/src/mame/video/funworld.cpp
@@ -86,13 +86,13 @@ void funworld_state::funworld_palette(palette_device &palette) const
}
-WRITE8_MEMBER(funworld_state::funworld_videoram_w)
+void funworld_state::funworld_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(funworld_state::funworld_colorram_w)
+void funworld_state::funworld_colorram_w(offs_t offset, uint8_t data)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
diff --git a/src/mame/video/gaplus.cpp b/src/mame/video/gaplus.cpp
index 7affefaed1f..0bb8cc252ca 100644
--- a/src/mame/video/gaplus.cpp
+++ b/src/mame/video/gaplus.cpp
@@ -114,9 +114,10 @@ TILE_GET_INFO_MEMBER(gaplus_base_state::get_tile_info)
***************************************************************************/
/* starfield speed constants (bigger = faster) */
-#define SPEED_1 0.5f
-#define SPEED_2 1.0f
-#define SPEED_3 2.0f
+#define SPEED_1 1.0f
+#define SPEED_2 2.0f
+#define SPEED_3 3.0f
+#define STARFIELD_CLIPPING_X 16
void gaplus_base_state::starfield_init()
{
@@ -127,13 +128,14 @@ void gaplus_base_state::starfield_init()
const int height = m_screen->height();
m_total_stars = 0;
+ m_starfield_framecount = 0;
/* precalculate the star background */
/* this comes from the Galaxian hardware, Gaplus is probably different */
for (int y = 0; y < height; y++)
{
- for (int x = width * 2 - 1; x >= 0; x--)
+ for (int x = width - (STARFIELD_CLIPPING_X * 2) - 1; x >= 0; x--)
{
generator <<= 1;
const int bit1 = (~generator >> 17) & 1;
@@ -143,12 +145,27 @@ void gaplus_base_state::starfield_init()
if (BIT(~generator, 16) && (generator & 0xff) == 0xff)
{
- const int color = ~(generator >> 8) & 0x3f;
+ const int color = (~(generator >> 8)) % 7 + 1;
+ int color_base = 0;
+ /* A guess based on comparison with PCB video output */
+ switch (set)
+ {
+ case 0:
+ color_base = 0x250;
+ break;
+ case 1:
+ color_base = 0x230;
+ break;
+ case 2:
+ color_base = 0x210;
+ break;
+ }
+
if (color && m_total_stars < MAX_STARS)
{
- m_stars[m_total_stars].x = x;
+ m_stars[m_total_stars].x = x + STARFIELD_CLIPPING_X;
m_stars[m_total_stars].y = y;
- m_stars[m_total_stars].col = color;
+ m_stars[m_total_stars].col = color_base + color;
m_stars[m_total_stars].set = set++;
if (set == 3)
@@ -178,6 +195,7 @@ void gaplus_base_state::video_start()
starfield_init();
save_item(NAME(m_starfield_control));
+ save_item(NAME(m_starfield_framecount));
for (int i = 0; i < MAX_STARS; i++)
{
@@ -229,6 +247,13 @@ void gaplus_base_state::starfield_render(bitmap_ind16 &bitmap)
int x = m_stars[i].x;
int y = m_stars[i].y;
+ /* Some stars in the second tier will flash erratically while changing their movements. */
+ if (m_stars[i].set == 1 && m_starfield_control[2] != 0x85 && i % 2 == 0)
+ {
+ int bit = BIT(m_starfield_framecount + i, 3) ? 1 : 2;
+ if (BIT(m_starfield_framecount + i, bit)) { continue; }
+ }
+
if (x >= 0 && x < width && y >= 0 && y < height)
{
bitmap.pix16(y, x) = m_stars[i].col;
@@ -319,6 +344,8 @@ WRITE_LINE_MEMBER(gaplus_base_state::screen_vblank)/* update starfields */
int width = m_screen->width();
int height = m_screen->height();
+ m_starfield_framecount ++;
+
/* check if we're running */
if ( ( m_starfield_control[0] & 1 ) == 0 )
return;
@@ -330,21 +357,17 @@ WRITE_LINE_MEMBER(gaplus_base_state::screen_vblank)/* update starfields */
/* stand still */
break;
+ case 0x85:
case 0x86:
/* scroll down (speed 1) */
stars[i].x += SPEED_1;
break;
- case 0x85:
+ case 0x06:
/* scroll down (speed 2) */
stars[i].x += SPEED_2;
break;
-
- case 0x06:
- /* scroll down (speed 3) */
- stars[i].x += SPEED_3;
- break;
-
+
case 0x80:
/* scroll up (speed 1) */
stars[i].x -= SPEED_1;
@@ -362,21 +385,21 @@ WRITE_LINE_MEMBER(gaplus_base_state::screen_vblank)/* update starfields */
case 0x9f:
/* scroll left (speed 2) */
- stars[i].y += SPEED_2;
+ stars[i].y += SPEED_3;
break;
case 0xaf:
- /* scroll left (speed 1) */
- stars[i].y += SPEED_1;
+ /* scroll right (speed 1) */
+ stars[i].y -= SPEED_3;
break;
}
/* wrap */
- if ( stars[i].x < 0 )
- stars[i].x = ( float )( width*2 ) + stars[i].x;
+ if ( stars[i].x < STARFIELD_CLIPPING_X )
+ stars[i].x = ( float )( width-STARFIELD_CLIPPING_X*2) + stars[i].x;
- if ( stars[i].x >= ( float )( width*2 ) )
- stars[i].x -= ( float )( width*2 );
+ if ( stars[i].x >= ( float )( width-STARFIELD_CLIPPING_X) )
+ stars[i].x -= ( float )( width-STARFIELD_CLIPPING_X*2);
if ( stars[i].y < 0 )
stars[i].y = ( float )( height ) + stars[i].y;
diff --git a/src/mame/video/k001604.cpp b/src/mame/video/k001604.cpp
index 8c2a4b853ec..bf3105d065b 100644
--- a/src/mame/video/k001604.cpp
+++ b/src/mame/video/k001604.cpp
@@ -342,12 +342,12 @@ void k001604_device::draw_front_layer( screen_device &screen, bitmap_rgb32 &bitm
}
}
-READ32_MEMBER( k001604_device::tile_r )
+uint32_t k001604_device::tile_r(offs_t offset)
{
return m_tile_ram[offset];
}
-READ32_MEMBER( k001604_device::char_r )
+uint32_t k001604_device::char_r(offs_t offset)
{
int set, bank;
uint32_t addr;
@@ -364,7 +364,7 @@ READ32_MEMBER( k001604_device::char_r )
return m_char_ram[addr];
}
-READ32_MEMBER( k001604_device::reg_r )
+uint32_t k001604_device::reg_r(offs_t offset)
{
switch (offset)
{
@@ -375,7 +375,7 @@ READ32_MEMBER( k001604_device::reg_r )
return m_reg[offset];
}
-WRITE32_MEMBER( k001604_device::tile_w )
+void k001604_device::tile_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
int x/*, y*/;
COMBINE_DATA(m_tile_ram.get() + offset);
@@ -421,7 +421,7 @@ WRITE32_MEMBER( k001604_device::tile_w )
}
}
-WRITE32_MEMBER( k001604_device::char_w )
+void k001604_device::char_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
int set, bank;
uint32_t addr;
@@ -441,7 +441,7 @@ WRITE32_MEMBER( k001604_device::char_w )
gfx(1)->mark_dirty(addr / 128);
}
-WRITE32_MEMBER( k001604_device::reg_w )
+void k001604_device::reg_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(m_reg.get() + offset);
diff --git a/src/mame/video/k001604.h b/src/mame/video/k001604.h
index 34a05006527..744ff33816e 100644
--- a/src/mame/video/k001604.h
+++ b/src/mame/video/k001604.h
@@ -21,12 +21,12 @@ public:
void draw_back_layer( bitmap_rgb32 &bitmap, const rectangle &cliprect );
void draw_front_layer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
- DECLARE_WRITE32_MEMBER( tile_w );
- DECLARE_READ32_MEMBER( tile_r );
- DECLARE_WRITE32_MEMBER( char_w );
- DECLARE_READ32_MEMBER( char_r );
- DECLARE_WRITE32_MEMBER( reg_w );
- DECLARE_READ32_MEMBER( reg_r );
+ void tile_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t tile_r(offs_t offset);
+ void char_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t char_r(offs_t offset);
+ void reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t reg_r(offs_t offset);
protected:
// device-level overrides
diff --git a/src/mame/video/k037122.cpp b/src/mame/video/k037122.cpp
index 0fe797d9eaa..f03f405d3c3 100644
--- a/src/mame/video/k037122.cpp
+++ b/src/mame/video/k037122.cpp
@@ -137,12 +137,12 @@ void k037122_device::update_palette_color( uint32_t palette_base, int color )
palette().set_pen_color(color, pal5bit(data >> 6), pal6bit(data >> 0), pal5bit(data >> 11));
}
-READ32_MEMBER( k037122_device::sram_r )
+uint32_t k037122_device::sram_r(offs_t offset)
{
return m_tile_ram[offset];
}
-WRITE32_MEMBER( k037122_device::sram_w )
+void k037122_device::sram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(m_tile_ram.get() + offset);
@@ -179,14 +179,14 @@ WRITE32_MEMBER( k037122_device::sram_w )
}
-READ32_MEMBER( k037122_device::char_r )
+uint32_t k037122_device::char_r(offs_t offset)
{
int bank = m_reg[0x30 / 4] & 0x7;
return m_char_ram[offset + (bank * (0x40000 / 4))];
}
-WRITE32_MEMBER( k037122_device::char_w )
+void k037122_device::char_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
int bank = m_reg[0x30 / 4] & 0x7;
uint32_t addr = offset + (bank * (0x40000/4));
@@ -195,7 +195,7 @@ WRITE32_MEMBER( k037122_device::char_w )
gfx(m_gfx_index)->mark_dirty(addr / 32);
}
-READ32_MEMBER( k037122_device::reg_r )
+uint32_t k037122_device::reg_r(offs_t offset)
{
switch (offset)
{
@@ -207,7 +207,7 @@ READ32_MEMBER( k037122_device::reg_r )
return m_reg[offset];
}
-WRITE32_MEMBER( k037122_device::reg_w )
+void k037122_device::reg_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
COMBINE_DATA(m_reg.get() + offset);
}
diff --git a/src/mame/video/k037122.h b/src/mame/video/k037122.h
index 12535127d28..36a6b716ded 100644
--- a/src/mame/video/k037122.h
+++ b/src/mame/video/k037122.h
@@ -17,12 +17,12 @@ public:
void set_gfx_index(int index) { m_gfx_index = index; }
void tile_draw( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
- DECLARE_READ32_MEMBER( sram_r );
- DECLARE_WRITE32_MEMBER( sram_w );
- DECLARE_READ32_MEMBER( char_r );
- DECLARE_WRITE32_MEMBER( char_w );
- DECLARE_READ32_MEMBER( reg_r );
- DECLARE_WRITE32_MEMBER( reg_w );
+ uint32_t sram_r(offs_t offset);
+ void sram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t char_r(offs_t offset);
+ void char_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
+ uint32_t reg_r(offs_t offset);
+ void reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
protected:
// device-level overrides