summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--hash/apple2_flop_orig.xml14
-rw-r--r--hash/bbc_flop_6502.xml17
-rw-r--r--hash/bbc_flop_65c102.xml28
-rw-r--r--hash/bbc_flop_torch.xml117
-rw-r--r--hash/c64_cass.xml363
-rw-r--r--hash/fmtowns_cd.xml841
-rw-r--r--hash/ibm5150.xml54
-rw-r--r--hash/ibm5170.xml46
-rw-r--r--hash/megadriv.xml6
-rw-r--r--hash/mobigo_cart.xml38
-rw-r--r--hash/n64.xml11
-rw-r--r--hash/saitek_schess.xml20
-rw-r--r--hash/snes.xml2
-rw-r--r--hash/svi318_cart.xml36
-rw-r--r--hash/telestory_cart.xml1
-rw-r--r--hash/vsmile_cart.xml120
-rw-r--r--hash/vsmilem_cart.xml46
-rw-r--r--regtests/jedutil/baseline/pal22v10/pal22v10-combinatorial.txt159
-rw-r--r--regtests/jedutil/baseline/pal22v10/pal22v10-registered.txt159
-rw-r--r--regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-combinatorial.pds180
-rw-r--r--regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-registered.pds180
-rw-r--r--regtests/jedutil/jeds/pal22v10/pal22v10-combinatorial.jed150
-rw-r--r--regtests/jedutil/jeds/pal22v10/pal22v10-registered.jed150
-rw-r--r--scripts/src/cpu.lua62
-rw-r--r--scripts/src/formats.lua12
-rw-r--r--scripts/src/machine.lua48
-rw-r--r--scripts/src/sound.lua12
-rw-r--r--scripts/target/mame/arcade.lua18
-rw-r--r--scripts/target/mame/mess.lua41
-rw-r--r--scripts/target/mame/nl.lua11
-rw-r--r--src/devices/bus/a2bus/a2corvus.cpp6
-rw-r--r--src/devices/bus/a2bus/mouse.cpp4
-rw-r--r--src/devices/bus/a2bus/timemasterho.cpp2
-rw-r--r--src/devices/bus/abcbus/lux10828.cpp2
-rw-r--r--src/devices/bus/abcbus/lux21046.cpp2
-rw-r--r--src/devices/bus/amiga/keyboard/mitsumi.cpp2
-rw-r--r--src/devices/bus/bbc/tube/tube_6502.cpp1
-rw-r--r--src/devices/bus/bbc/tube/tube_rc6502.cpp1
-rw-r--r--src/devices/bus/c64/buscard.cpp4
-rw-r--r--src/devices/bus/dmv/k012.cpp4
-rw-r--r--src/devices/bus/dmv/k806.cpp4
-rw-r--r--src/devices/bus/econet/e01.cpp2
-rw-r--r--src/devices/bus/hp80_io/82900.cpp6
-rw-r--r--src/devices/bus/hp80_io/82937.cpp2
-rw-r--r--src/devices/bus/hp80_io/82939.cpp6
-rw-r--r--src/devices/bus/hp_dio/human_interface.cpp4
-rw-r--r--src/devices/bus/ieee488/hardbox.cpp2
-rw-r--r--src/devices/bus/ieee488/softbox.cpp2
-rw-r--r--src/devices/bus/isa/bblue2.cpp4
-rw-r--r--src/devices/bus/isa/lpt.cpp4
-rw-r--r--src/devices/bus/isa/mda.cpp8
-rw-r--r--src/devices/bus/isa/mpu401.cpp2
-rw-r--r--src/devices/bus/isa/wdxt_gen.cpp2
-rw-r--r--src/devices/bus/plus4/sid.cpp2
-rw-r--r--src/devices/bus/psi_kbd/hle.cpp2
-rw-r--r--src/devices/bus/psi_kbd/psi_kbd.h2
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h3
-rw-r--r--src/devices/bus/x68k/x68k_midi.cpp4
-rw-r--r--src/devices/bus/x68k/x68k_scsiext.cpp4
-rw-r--r--src/devices/cpu/alph8201/8201dasm.cpp404
-rw-r--r--src/devices/cpu/alph8201/8201dasm.h51
-rw-r--r--src/devices/cpu/alph8201/alph8201.cpp698
-rw-r--r--src/devices/cpu/alph8201/alph8201.h415
-rw-r--r--src/devices/cpu/avr8/avr8.cpp4
-rw-r--r--src/devices/cpu/avr8/avr8.h4
-rw-r--r--src/devices/cpu/ccpu/ccpu.cpp2
-rw-r--r--src/devices/cpu/ccpu/ccpu.h2
-rw-r--r--src/devices/cpu/cop400/cop400.cpp4
-rw-r--r--src/devices/cpu/cop400/cop400.h4
-rw-r--r--src/devices/cpu/dsp16/dsp16.cpp12
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.cpp4
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.h4
-rw-r--r--src/devices/cpu/es5510/es5510.cpp4
-rw-r--r--src/devices/cpu/es5510/es5510.h4
-rw-r--r--src/devices/cpu/f2mc16/mb9061x.cpp12
-rw-r--r--src/devices/cpu/f2mc16/mb9061x.h12
-rw-r--r--src/devices/cpu/g65816/g65816.cpp40
-rw-r--r--src/devices/cpu/g65816/g65816.h20
-rw-r--r--src/devices/cpu/h6280/h6280.cpp16
-rw-r--r--src/devices/cpu/h6280/h6280.h16
-rw-r--r--src/devices/cpu/h8500/h8500.cpp151
-rw-r--r--src/devices/cpu/h8500/h8500.h70
-rw-r--r--src/devices/cpu/h8500/h8500dasm.cpp608
-rw-r--r--src/devices/cpu/h8500/h8500dasm.h46
-rw-r--r--src/devices/cpu/h8500/h8510.cpp112
-rw-r--r--src/devices/cpu/h8500/h8510.h29
-rw-r--r--src/devices/cpu/h8500/h8520.cpp108
-rw-r--r--src/devices/cpu/h8500/h8520.h29
-rw-r--r--src/devices/cpu/h8500/h8532.cpp120
-rw-r--r--src/devices/cpu/h8500/h8532.h29
-rw-r--r--src/devices/cpu/h8500/h8534.cpp134
-rw-r--r--src/devices/cpu/h8500/h8534.h29
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.cpp15
-rw-r--r--src/devices/cpu/ks0164/ks0164.cpp2
-rw-r--r--src/devices/cpu/lc8670/lc8670.cpp12
-rw-r--r--src/devices/cpu/lc8670/lc8670.h12
-rw-r--r--src/devices/cpu/m6502/m6500_1.cpp2
-rw-r--r--src/devices/cpu/m6502/m6500_1.h2
-rw-r--r--src/devices/cpu/m6805/m68705.cpp20
-rw-r--r--src/devices/cpu/m6805/m68705.h23
-rw-r--r--src/devices/cpu/m6805/m68hc05.cpp52
-rw-r--r--src/devices/cpu/m6805/m68hc05.h15
-rw-r--r--src/devices/cpu/mcs48/mcs48.cpp4
-rw-r--r--src/devices/cpu/mcs48/mcs48.h4
-rw-r--r--src/devices/cpu/mcs96/i8x9x.cpp63
-rw-r--r--src/devices/cpu/mcs96/i8x9x.h42
-rw-r--r--src/devices/cpu/mcs96/mcs96d.cpp4
-rw-r--r--src/devices/cpu/minx/minx.cpp1
-rw-r--r--src/devices/cpu/minx/minxd.cpp4
-rw-r--r--src/devices/cpu/minx/minxopce.h2
-rw-r--r--src/devices/cpu/mn10200/mn10200.cpp4
-rw-r--r--src/devices/cpu/mn10200/mn10200.h4
-rw-r--r--src/devices/cpu/pic16/pic16d.cpp181
-rw-r--r--src/devices/cpu/pic16/pic16d.h40
-rw-r--r--src/devices/cpu/powerpc/ppc.h4
-rw-r--r--src/devices/cpu/powerpc/ppccom.cpp4
-rw-r--r--src/devices/cpu/s2650/s2650.cpp8
-rw-r--r--src/devices/cpu/s2650/s2650.h2
-rw-r--r--src/devices/cpu/sh/sh7604_sci.cpp26
-rw-r--r--src/devices/cpu/sh/sh7604_sci.h30
-rw-r--r--src/devices/cpu/spc700/spc700.cpp9
-rw-r--r--src/devices/cpu/spc700/spc700.h6
-rw-r--r--src/devices/cpu/st62xx/st62xx.cpp4
-rw-r--r--src/devices/cpu/st62xx/st62xx.h4
-rw-r--r--src/devices/cpu/tlcs870/tlcs870.cpp130
-rw-r--r--src/devices/cpu/tlcs870/tlcs870.h162
-rw-r--r--src/devices/cpu/tlcs900/tlcs900.cpp8
-rw-r--r--src/devices/cpu/tlcs900/tlcs900.h8
-rw-r--r--src/devices/cpu/tms7000/tms7000.cpp19
-rw-r--r--src/devices/cpu/tms7000/tms7000.h39
-rw-r--r--src/devices/cpu/upd177x/upd177xd.cpp299
-rw-r--r--src/devices/cpu/upd177x/upd177xd.h41
-rw-r--r--src/devices/cpu/upd7810/upd7810.cpp21
-rw-r--r--src/devices/cpu/upd7810/upd7810.h22
-rw-r--r--src/devices/cpu/upd7810/upd7811.cpp8
-rw-r--r--src/devices/cpu/upd7810/upd7811.h8
-rw-r--r--src/devices/cpu/upd78k/upd78k3d.cpp6
-rw-r--r--src/devices/cpu/z180/z180.cpp323
-rw-r--r--src/devices/cpu/z180/z180.h26
-rw-r--r--src/devices/cpu/z80/tmpz84c011.cpp10
-rw-r--r--src/devices/cpu/z80/tmpz84c011.h42
-rw-r--r--src/devices/cpu/z80/tmpz84c015.cpp6
-rw-r--r--src/devices/cpu/z80/tmpz84c015.h18
-rw-r--r--src/devices/machine/1ma6.cpp4
-rw-r--r--src/devices/machine/1ma6.h4
-rw-r--r--src/devices/machine/1mb5.cpp8
-rw-r--r--src/devices/machine/1mb5.h8
-rw-r--r--src/devices/machine/28fxxx.cpp4
-rw-r--r--src/devices/machine/28fxxx.h4
-rw-r--r--src/devices/machine/40105.cpp5
-rw-r--r--src/devices/machine/40105.h1
-rw-r--r--src/devices/machine/64h156.cpp4
-rw-r--r--src/devices/machine/64h156.h4
-rw-r--r--src/devices/machine/6532riot.cpp4
-rw-r--r--src/devices/machine/6532riot.h4
-rw-r--r--src/devices/machine/68153bim.cpp4
-rw-r--r--src/devices/machine/68153bim.h4
-rw-r--r--src/devices/machine/6821pia.cpp14
-rw-r--r--src/devices/machine/6821pia.h6
-rw-r--r--src/devices/machine/68230pit.cpp4
-rw-r--r--src/devices/machine/68230pit.h4
-rw-r--r--src/devices/machine/6850acia.cpp12
-rw-r--r--src/devices/machine/68561mpcc.cpp4
-rw-r--r--src/devices/machine/68561mpcc.h6
-rw-r--r--src/devices/machine/74153.cpp6
-rw-r--r--src/devices/machine/74153.h6
-rw-r--r--src/devices/machine/74161.cpp2
-rw-r--r--src/devices/machine/74161.h2
-rw-r--r--src/devices/machine/8042kbdc.cpp8
-rw-r--r--src/devices/machine/8042kbdc.h4
-rw-r--r--src/devices/machine/82s129.cpp4
-rw-r--r--src/devices/machine/82s129.h4
-rw-r--r--src/devices/machine/8364_paula.cpp2
-rw-r--r--src/devices/machine/8364_paula.h2
-rw-r--r--src/devices/machine/8530scc.cpp4
-rw-r--r--src/devices/machine/8530scc.h4
-rw-r--r--src/devices/machine/aakart.cpp4
-rw-r--r--src/devices/machine/aakart.h4
-rw-r--r--src/devices/machine/aic6250.cpp4
-rw-r--r--src/devices/machine/aic6250.h4
-rw-r--r--src/devices/machine/am53cf96.cpp7
-rw-r--r--src/devices/machine/am53cf96.h4
-rw-r--r--src/devices/machine/amigafdc.cpp2
-rw-r--r--src/devices/machine/amigafdc.h2
-rw-r--r--src/devices/machine/applefdc.cpp4
-rw-r--r--src/devices/machine/applefdc.h8
-rw-r--r--src/devices/machine/at28c16.cpp4
-rw-r--r--src/devices/machine/at28c16.h4
-rw-r--r--src/devices/machine/at_keybc.cpp12
-rw-r--r--src/devices/machine/ay31015.cpp33
-rw-r--r--src/devices/machine/ay31015.h9
-rw-r--r--src/devices/machine/busmouse.cpp6
-rw-r--r--src/devices/machine/busmouse.h6
-rw-r--r--src/devices/machine/cdp1852.cpp4
-rw-r--r--src/devices/machine/cdp1852.h4
-rw-r--r--src/devices/machine/cdp1871.cpp2
-rw-r--r--src/devices/machine/cdp1871.h2
-rw-r--r--src/devices/machine/cdp1879.cpp4
-rw-r--r--src/devices/machine/cdp1879.h4
-rw-r--r--src/devices/machine/corvushd.cpp6
-rw-r--r--src/devices/machine/corvushd.h6
-rw-r--r--src/devices/machine/cr511b.cpp4
-rw-r--r--src/devices/machine/cr511b.h4
-rw-r--r--src/devices/machine/cs8221.cpp6
-rw-r--r--src/devices/machine/cs8221.h6
-rw-r--r--src/devices/machine/cxd1185.cpp909
-rw-r--r--src/devices/machine/cxd1185.h249
-rw-r--r--src/devices/machine/ds1386.cpp4
-rw-r--r--src/devices/machine/ds1386.h4
-rw-r--r--src/devices/machine/ds2404.cpp147
-rw-r--r--src/devices/machine/ds2404.h42
-rw-r--r--src/devices/machine/ds75160a.cpp4
-rw-r--r--src/devices/machine/ds75160a.h4
-rw-r--r--src/devices/machine/e05a03.cpp4
-rw-r--r--src/devices/machine/e05a03.h4
-rw-r--r--src/devices/machine/e05a30.cpp4
-rw-r--r--src/devices/machine/e05a30.h4
-rw-r--r--src/devices/machine/f3853.cpp32
-rw-r--r--src/devices/machine/f3853.h16
-rw-r--r--src/devices/machine/fdc37c665gt.cpp4
-rw-r--r--src/devices/machine/fdc37c665gt.h4
-rw-r--r--src/devices/machine/fdc37c93x.cpp76
-rw-r--r--src/devices/machine/fdc37c93x.h24
-rw-r--r--src/devices/machine/fga002.cpp4
-rw-r--r--src/devices/machine/fga002.h4
-rw-r--r--src/devices/machine/genpc.cpp40
-rw-r--r--src/devices/machine/genpc.h42
-rw-r--r--src/devices/machine/hd64610.cpp6
-rw-r--r--src/devices/machine/hd64610.h6
-rw-r--r--src/devices/machine/i7220.cpp4
-rw-r--r--src/devices/machine/i7220.h4
-rw-r--r--src/devices/machine/i8214.cpp8
-rw-r--r--src/devices/machine/i8214.h8
-rw-r--r--src/devices/machine/i82439tx.cpp50
-rw-r--r--src/devices/machine/i82439tx.h50
-rw-r--r--src/devices/machine/i8257.cpp16
-rw-r--r--src/devices/machine/i8257.h16
-rw-r--r--src/devices/machine/i8291a.cpp48
-rw-r--r--src/devices/machine/i8291a.h56
-rw-r--r--src/devices/machine/icm7170.cpp201
-rw-r--r--src/devices/machine/icm7170.h87
-rw-r--r--src/devices/machine/im6402.cpp28
-rw-r--r--src/devices/machine/im6402.h46
-rw-r--r--src/devices/machine/iopcdvd.cpp4
-rw-r--r--src/devices/machine/iopcdvd.h4
-rw-r--r--src/devices/machine/k053252.cpp4
-rw-r--r--src/devices/machine/k053252.h4
-rw-r--r--src/devices/machine/k054321.cpp10
-rw-r--r--src/devices/machine/k054321.h10
-rw-r--r--src/devices/machine/kr2376.cpp2
-rw-r--r--src/devices/machine/kr2376.h2
-rw-r--r--src/devices/machine/latch8.cpp22
-rw-r--r--src/devices/machine/latch8.h22
-rw-r--r--src/devices/machine/ldp1000.cpp4
-rw-r--r--src/devices/machine/ldp1000.h4
-rw-r--r--src/devices/machine/ldpr8210.cpp22
-rw-r--r--src/devices/machine/ldpr8210.h22
-rw-r--r--src/devices/machine/ldv1000.cpp24
-rw-r--r--src/devices/machine/ldv1000.h24
-rw-r--r--src/devices/machine/ldvp931.cpp28
-rw-r--r--src/devices/machine/ldvp931.h28
-rw-r--r--src/devices/machine/lh5810.cpp4
-rw-r--r--src/devices/machine/lh5810.h4
-rw-r--r--src/devices/machine/lpc-pit.cpp6
-rw-r--r--src/devices/machine/lpc-pit.h6
-rw-r--r--src/devices/machine/lpc-rtc.cpp20
-rw-r--r--src/devices/machine/lpc-rtc.h16
-rw-r--r--src/devices/machine/mb87030.cpp60
-rw-r--r--src/devices/machine/mb87030.h64
-rw-r--r--src/devices/machine/mb8795.cpp32
-rw-r--r--src/devices/machine/mb8795.h32
-rw-r--r--src/devices/machine/mb89352.cpp4
-rw-r--r--src/devices/machine/mb89352.h4
-rw-r--r--src/devices/machine/mb89363b.cpp32
-rw-r--r--src/devices/machine/mb89363b.h28
-rw-r--r--src/devices/machine/mb89374.cpp18
-rw-r--r--src/devices/machine/mb89374.h18
-rw-r--r--src/devices/machine/mc14411.cpp8
-rw-r--r--src/devices/machine/mc14411.h8
-rw-r--r--src/devices/machine/mc6846.cpp4
-rw-r--r--src/devices/machine/mc6846.h4
-rw-r--r--src/devices/machine/mos6529.cpp4
-rw-r--r--src/devices/machine/mos6529.h22
-rw-r--r--src/devices/machine/mos6530.cpp4
-rw-r--r--src/devices/machine/mos6530.h4
-rw-r--r--src/devices/machine/mos6530n.cpp60
-rw-r--r--src/devices/machine/mos6530n.h38
-rw-r--r--src/devices/machine/mos8706.cpp4
-rw-r--r--src/devices/machine/mos8706.h4
-rw-r--r--src/devices/machine/mpu401.cpp18
-rw-r--r--src/devices/machine/mpu401.h20
-rw-r--r--src/devices/machine/msm6253.cpp8
-rw-r--r--src/devices/machine/msm6253.h8
-rw-r--r--src/devices/machine/myb3k_kbd.cpp2
-rw-r--r--src/devices/machine/nscsi_cb.h39
-rw-r--r--src/devices/machine/pc_fdc.cpp16
-rw-r--r--src/devices/machine/pc_fdc.h14
-rw-r--r--src/devices/machine/pc_lpt.cpp28
-rw-r--r--src/devices/machine/pc_lpt.h18
-rw-r--r--src/devices/machine/pckeybrd.cpp12
-rw-r--r--src/devices/machine/pckeybrd.h6
-rw-r--r--src/devices/machine/pdc.cpp40
-rw-r--r--src/devices/machine/pdc.h36
-rw-r--r--src/devices/machine/r10696.cpp4
-rw-r--r--src/devices/machine/r10696.h4
-rw-r--r--src/devices/machine/r10788.cpp4
-rw-r--r--src/devices/machine/r10788.h4
-rw-r--r--src/devices/machine/ra17xx.cpp4
-rw-r--r--src/devices/machine/ra17xx.h4
-rw-r--r--src/devices/machine/rp5c01.cpp4
-rw-r--r--src/devices/machine/rp5c01.h8
-rw-r--r--src/devices/machine/rp5c15.cpp4
-rw-r--r--src/devices/machine/rp5c15.h4
-rw-r--r--src/devices/machine/s2636.cpp6
-rw-r--r--src/devices/machine/s2636.h6
-rw-r--r--src/devices/machine/s_smp.cpp321
-rw-r--r--src/devices/machine/s_smp.h90
-rw-r--r--src/devices/machine/scc2698b.cpp36
-rw-r--r--src/devices/machine/scc2698b.h27
-rw-r--r--src/devices/machine/scnxx562.cpp20
-rw-r--r--src/devices/machine/scnxx562.h50
-rw-r--r--src/devices/machine/serflash.cpp18
-rw-r--r--src/devices/machine/serflash.h18
-rw-r--r--src/devices/machine/smioc.cpp20
-rw-r--r--src/devices/machine/smioc.h16
-rw-r--r--src/devices/machine/smpc.cpp32
-rw-r--r--src/devices/machine/smpc.h32
-rw-r--r--src/devices/machine/spg2xx.cpp1
-rw-r--r--src/devices/machine/swtpc8212.cpp30
-rw-r--r--src/devices/machine/swtpc8212.h30
-rw-r--r--src/devices/machine/tms1024.cpp10
-rw-r--r--src/devices/machine/tms1024.h10
-rw-r--r--src/devices/machine/tms5501.cpp26
-rw-r--r--src/devices/machine/tms5501.h26
-rw-r--r--src/devices/machine/tms6100.cpp16
-rw-r--r--src/devices/machine/tms6100.h18
-rw-r--r--src/devices/machine/tms9901.cpp8
-rw-r--r--src/devices/machine/tms9901.h8
-rw-r--r--src/devices/machine/upd4701.cpp36
-rw-r--r--src/devices/machine/upd4701.h24
-rw-r--r--src/devices/machine/upd7001.cpp205
-rw-r--r--src/devices/machine/upd7001.h102
-rw-r--r--src/devices/machine/upd7004.cpp4
-rw-r--r--src/devices/machine/upd7004.h4
-rw-r--r--src/devices/machine/upd71071.cpp4
-rw-r--r--src/devices/machine/upd71071.h8
-rw-r--r--src/devices/machine/upd765.cpp44
-rw-r--r--src/devices/machine/upd765.h10
-rw-r--r--src/devices/machine/v3021.cpp4
-rw-r--r--src/devices/machine/v3021.h4
-rw-r--r--src/devices/machine/vt82c496.cpp4
-rw-r--r--src/devices/machine/vt82c496.h5
-rw-r--r--src/devices/machine/wd1000.cpp4
-rw-r--r--src/devices/machine/wd1000.h9
-rw-r--r--src/devices/machine/wd1010.cpp8
-rw-r--r--src/devices/machine/wd1010.h8
-rw-r--r--src/devices/machine/wd11c00_17.cpp24
-rw-r--r--src/devices/machine/wd11c00_17.h24
-rw-r--r--src/devices/machine/wd_fdc.cpp2
-rw-r--r--src/devices/machine/wozfdc.cpp2
-rw-r--r--src/devices/machine/wozfdc.h2
-rw-r--r--src/devices/machine/x2212.cpp8
-rw-r--r--src/devices/machine/x2212.h8
-rw-r--r--src/devices/machine/ym3802.cpp4
-rw-r--r--src/devices/machine/ym3802.h4
-rw-r--r--src/devices/machine/z80scc.cpp16
-rw-r--r--src/devices/machine/z80scc.h42
-rw-r--r--src/devices/machine/z80sti.cpp4
-rw-r--r--src/devices/machine/z80sti.h4
-rw-r--r--src/devices/sound/okim6258.cpp1
-rw-r--r--src/devices/sound/s_dsp.cpp (renamed from src/mame/audio/snes_snd.cpp)318
-rw-r--r--src/devices/sound/s_dsp.h (renamed from src/mame/audio/snes_snd.h)74
-rw-r--r--src/devices/sound/vgm_visualizer.cpp260
-rw-r--r--src/devices/sound/vgm_visualizer.h39
-rw-r--r--src/devices/sound/ym2151.cpp11
-rw-r--r--src/devices/sound/ym2151.h9
-rw-r--r--src/devices/video/hd63484.cpp130
-rw-r--r--src/devices/video/hd63484.h16
-rw-r--r--src/devices/video/pc_vga.cpp82
-rw-r--r--src/devices/video/pc_vga.h4
-rw-r--r--src/devices/video/ppu2c0x_vt.cpp2
-rw-r--r--src/devices/video/ps2gif.cpp4
-rw-r--r--src/devices/video/ps2gs.cpp4
-rw-r--r--src/devices/video/ps2gs.h2
-rw-r--r--src/devices/video/tms3556.cpp50
-rw-r--r--src/devices/video/tms3556.h2
-rw-r--r--src/emu/diexec.cpp28
-rw-r--r--src/emu/diexec.h1
-rw-r--r--src/emu/driver.h3
-rw-r--r--src/emu/machine.h1
-rw-r--r--src/emu/render.cpp2
-rw-r--r--src/emu/xtal.cpp8
-rw-r--r--src/frontend/mame/ui/about.cpp19
-rw-r--r--src/frontend/mame/ui/about.h5
-rw-r--r--src/frontend/mame/ui/devopt.cpp67
-rw-r--r--src/frontend/mame/ui/info.cpp63
-rw-r--r--src/lib/formats/h8_cas.cpp149
-rw-r--r--src/lib/formats/h8_cas.h19
-rw-r--r--src/lib/netlist/analog/nld_bjt.cpp1
-rw-r--r--src/lib/netlist/analog/nld_mosfet.cpp4
-rw-r--r--src/lib/netlist/build/makefile11
-rw-r--r--src/lib/netlist/devices/nlid_proxy.cpp10
-rw-r--r--src/lib/netlist/nl_base.cpp12
-rw-r--r--src/lib/netlist/nl_base.h22
-rwxr-xr-xsrc/lib/netlist/nl_setup.cpp28
-rw-r--r--src/lib/netlist/nltypes.h4
-rw-r--r--[-rwxr-xr-x]src/lib/netlist/plib/palloc.h2
-rw-r--r--src/lib/netlist/plib/poptions.cpp20
-rw-r--r--src/lib/netlist/plib/poptions.h2
-rw-r--r--src/lib/netlist/plib/ppmf.h4
-rw-r--r--src/lib/netlist/plib/pstate.h2
-rw-r--r--src/lib/netlist/plib/pstream.h2
-rw-r--r--src/lib/netlist/plib/pstring.h6
-rw-r--r--src/lib/netlist/plib/ptokenizer.cpp5
-rw-r--r--src/lib/netlist/plib/putil.h4
-rw-r--r--src/lib/netlist/prg/nltool.cpp8
-rw-r--r--src/lib/netlist/prg/nlwav.cpp2
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.cpp2
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.h3
-rw-r--r--src/lib/netlist/solver/nld_solver.cpp2
-rw-r--r--src/lib/netlist/tools/nl_convert.cpp8
-rw-r--r--src/mame/arcade.flt1
-rw-r--r--src/mame/audio/bally.cpp80
-rw-r--r--src/mame/audio/bally.h36
-rw-r--r--src/mame/audio/cage.cpp2
-rw-r--r--src/mame/audio/csd.cpp2
-rw-r--r--src/mame/audio/dcs.cpp16
-rw-r--r--src/mame/audio/dcs.h6
-rw-r--r--src/mame/audio/dkong.cpp4
-rw-r--r--src/mame/audio/exidy.cpp8
-rw-r--r--src/mame/audio/gottlieb.cpp2
-rw-r--r--src/mame/audio/midway.cpp53
-rw-r--r--src/mame/audio/midway.h42
-rw-r--r--src/mame/audio/mw8080bw.cpp60
-rw-r--r--src/mame/audio/mw8080bw.h6
-rw-r--r--src/mame/audio/nl_gunfight.cpp492
-rw-r--r--src/mame/audio/nl_gunfight.h12
-rw-r--r--src/mame/audio/polepos.cpp8
-rw-r--r--src/mame/audio/polepos.h4
-rw-r--r--src/mame/audio/qix.cpp2
-rw-r--r--src/mame/audio/s11c_bg.cpp4
-rw-r--r--src/mame/audio/spiders.cpp2
-rw-r--r--src/mame/audio/williams.cpp2
-rw-r--r--src/mame/audio/wpcsnd.cpp4
-rw-r--r--src/mame/drivers/20pacgal.cpp2
-rw-r--r--src/mame/drivers/2mindril.cpp50
-rw-r--r--src/mame/drivers/39in1.cpp27
-rw-r--r--src/mame/drivers/3x3puzzl.cpp28
-rw-r--r--src/mame/drivers/a2600.cpp8
-rw-r--r--src/mame/drivers/abc1600.cpp4
-rw-r--r--src/mame/drivers/abc80x.cpp2
-rw-r--r--src/mame/drivers/aci_ggm.cpp2
-rw-r--r--src/mame/drivers/adp.cpp15
-rw-r--r--src/mame/drivers/alesis_qs.cpp36
-rw-r--r--src/mame/drivers/alpha68k.cpp47
-rw-r--r--src/mame/drivers/alpha68k_n.cpp32
-rw-r--r--src/mame/drivers/alphajuno.cpp15
-rw-r--r--src/mame/drivers/amiga.cpp4
-rw-r--r--src/mame/drivers/amstr_pc.cpp8
-rw-r--r--src/mame/drivers/apexc.cpp4
-rw-r--r--src/mame/drivers/apple1.cpp2
-rw-r--r--src/mame/drivers/apple2e.cpp2
-rw-r--r--src/mame/drivers/argo.cpp4
-rw-r--r--src/mame/drivers/asst128.cpp6
-rw-r--r--src/mame/drivers/asteroid.cpp2
-rw-r--r--src/mame/drivers/astrcorp.cpp14
-rw-r--r--src/mame/drivers/at.cpp195
-rw-r--r--src/mame/drivers/atarist.cpp120
-rw-r--r--src/mame/drivers/ave_arb.cpp2
-rw-r--r--src/mame/drivers/backfire.cpp4
-rw-r--r--src/mame/drivers/beezer.cpp6
-rw-r--r--src/mame/drivers/bingoman.cpp22
-rw-r--r--src/mame/drivers/boogwing.cpp4
-rw-r--r--src/mame/drivers/btime.cpp463
-rw-r--r--src/mame/drivers/bublbobl.cpp10
-rw-r--r--src/mame/drivers/bwidow.cpp4
-rw-r--r--src/mame/drivers/carrera.cpp6
-rw-r--r--src/mame/drivers/cave.cpp251
-rw-r--r--src/mame/drivers/cbm2.cpp4
-rw-r--r--src/mame/drivers/cbuster.cpp4
-rw-r--r--src/mame/drivers/ccastles.cpp6
-rw-r--r--src/mame/drivers/centiped.cpp4
-rw-r--r--src/mame/drivers/champbas.cpp27
-rw-r--r--src/mame/drivers/changela.cpp6
-rw-r--r--src/mame/drivers/cninja.cpp91
-rw-r--r--src/mame/drivers/compc.cpp4
-rw-r--r--src/mame/drivers/compuchess.cpp8
-rw-r--r--src/mame/drivers/comx35.cpp2
-rw-r--r--src/mame/drivers/conic_cchess2.cpp285
-rw-r--r--src/mame/drivers/cps1.cpp111
-rw-r--r--src/mame/drivers/crystal.cpp16
-rw-r--r--src/mame/drivers/csplayh5.cpp42
-rw-r--r--src/mame/drivers/cv1k.cpp12
-rw-r--r--src/mame/drivers/cvs.cpp24
-rw-r--r--src/mame/drivers/cz101.cpp2
-rw-r--r--src/mame/drivers/darkseal.cpp49
-rw-r--r--src/mame/drivers/dassault.cpp4
-rw-r--r--src/mame/drivers/dblewing.cpp2
-rw-r--r--src/mame/drivers/ddragon.cpp2
-rw-r--r--src/mame/drivers/ddz.cpp35
-rw-r--r--src/mame/drivers/dec8.cpp60
-rw-r--r--src/mame/drivers/deco156.cpp4
-rw-r--r--src/mame/drivers/deco32.cpp48
-rw-r--r--src/mame/drivers/decocass.cpp12
-rw-r--r--src/mame/drivers/deshoros.cpp6
-rw-r--r--src/mame/drivers/dietgo.cpp2
-rw-r--r--src/mame/drivers/dkong.cpp3
-rw-r--r--src/mame/drivers/docastle.cpp8
-rw-r--r--src/mame/drivers/dreambal.cpp2
-rw-r--r--src/mame/drivers/eispc.cpp8
-rw-r--r--src/mame/drivers/elan_eu3a05.cpp45
-rw-r--r--src/mame/drivers/equites.cpp85
-rw-r--r--src/mame/drivers/europc.cpp2
-rw-r--r--src/mame/drivers/eva.cpp88
-rw-r--r--src/mame/drivers/exelv.cpp16
-rw-r--r--src/mame/drivers/fantland.cpp56
-rw-r--r--src/mame/drivers/fb01.cpp29
-rw-r--r--src/mame/drivers/fidel_as12.cpp22
-rw-r--r--src/mame/drivers/fidel_card.cpp2
-rw-r--r--src/mame/drivers/fidel_eag68k.cpp20
-rw-r--r--src/mame/drivers/fidel_elite.cpp84
-rw-r--r--src/mame/drivers/fidel_sc12.cpp22
-rw-r--r--src/mame/drivers/fidel_sc6.cpp29
-rw-r--r--src/mame/drivers/fidel_sc9.cpp22
-rw-r--r--src/mame/drivers/firefox.cpp4
-rw-r--r--src/mame/drivers/fitfight.cpp2
-rw-r--r--src/mame/drivers/fmtowns.cpp4
-rw-r--r--src/mame/drivers/freekick.cpp114
-rw-r--r--src/mame/drivers/funkyjet.cpp2
-rw-r--r--src/mame/drivers/galaga.cpp4
-rw-r--r--src/mame/drivers/galaxia.cpp4
-rw-r--r--src/mame/drivers/galaxold.cpp11
-rw-r--r--src/mame/drivers/gijoe.cpp65
-rw-r--r--src/mame/drivers/gmaster.cpp8
-rw-r--r--src/mame/drivers/goldnpkr.cpp2
-rw-r--r--src/mame/drivers/gumbo.cpp2
-rw-r--r--src/mame/drivers/h8.cpp2
-rw-r--r--src/mame/drivers/hazeltin.cpp4
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp468
-rw-r--r--src/mame/drivers/hh_pic16.cpp2
-rw-r--r--src/mame/drivers/hh_sm510.cpp4
-rw-r--r--src/mame/drivers/hh_tms1k.cpp148
-rw-r--r--src/mame/drivers/ibmpcjr.cpp2
-rw-r--r--src/mame/drivers/indy_indigo2.cpp2
-rw-r--r--src/mame/drivers/instruct.cpp9
-rw-r--r--src/mame/drivers/intellect02.cpp21
-rw-r--r--src/mame/drivers/jack.cpp4
-rw-r--r--src/mame/drivers/jedi.cpp4
-rw-r--r--src/mame/drivers/k28.cpp2
-rw-r--r--src/mame/drivers/konamigs.cpp6
-rw-r--r--src/mame/drivers/konamim2.cpp4
-rw-r--r--src/mame/drivers/korgds8.cpp2
-rw-r--r--src/mame/drivers/korgz3.cpp11
-rw-r--r--src/mame/drivers/kron.cpp2
-rw-r--r--src/mame/drivers/ksys573.cpp2
-rw-r--r--src/mame/drivers/kyocera.cpp2
-rw-r--r--src/mame/drivers/laserbat.cpp3
-rw-r--r--src/mame/drivers/m68705prg.cpp2
-rw-r--r--src/mame/drivers/malzak.cpp84
-rw-r--r--src/mame/drivers/mcb216.cpp2
-rw-r--r--src/mame/drivers/mcr.cpp60
-rw-r--r--src/mame/drivers/mcr3.cpp132
-rw-r--r--src/mame/drivers/mcr68.cpp12
-rw-r--r--src/mame/drivers/meadows.cpp3
-rw-r--r--src/mame/drivers/megasys1.cpp11
-rw-r--r--src/mame/drivers/metro.cpp4
-rw-r--r--src/mame/drivers/micral.cpp2
-rw-r--r--src/mame/drivers/microterm_f8.cpp2
-rw-r--r--src/mame/drivers/mirage.cpp26
-rw-r--r--src/mame/drivers/missb2.cpp2
-rw-r--r--src/mame/drivers/missile.cpp2
-rw-r--r--src/mame/drivers/model1.cpp2
-rw-r--r--src/mame/drivers/model2.cpp34
-rw-r--r--src/mame/drivers/mpc3000.cpp4
-rw-r--r--src/mame/drivers/mpu4dealem.cpp103
-rw-r--r--src/mame/drivers/ms0515.cpp8
-rw-r--r--src/mame/drivers/mw8080bw.cpp4
-rw-r--r--src/mame/drivers/mz2500.cpp4
-rw-r--r--src/mame/drivers/namcos10.cpp12
-rw-r--r--src/mame/drivers/namcos22.cpp20
-rw-r--r--src/mame/drivers/naomi.cpp2
-rw-r--r--src/mame/drivers/nascom1.cpp4
-rw-r--r--src/mame/drivers/nes_clone.cpp204
-rw-r--r--src/mame/drivers/nes_vt.cpp2363
-rw-r--r--src/mame/drivers/newbrain.cpp4
-rw-r--r--src/mame/drivers/news_r3k.cpp523
-rw-r--r--src/mame/drivers/nforcepc.cpp12
-rw-r--r--src/mame/drivers/nibble.cpp2
-rw-r--r--src/mame/drivers/nmk16.cpp2
-rw-r--r--src/mame/drivers/notetaker.cpp18
-rw-r--r--src/mame/drivers/nss.cpp42
-rw-r--r--src/mame/drivers/nyny.cpp6
-rw-r--r--src/mame/drivers/oneshot.cpp36
-rw-r--r--src/mame/drivers/pacman.cpp9
-rw-r--r--src/mame/drivers/pasopia.cpp6
-rw-r--r--src/mame/drivers/pasopia7.cpp211
-rw-r--r--src/mame/drivers/pcw16.cpp4
-rw-r--r--src/mame/drivers/pdp1.cpp4
-rw-r--r--src/mame/drivers/pgm.cpp46
-rw-r--r--src/mame/drivers/picno.cpp40
-rw-r--r--src/mame/drivers/pipeline.cpp2
-rw-r--r--src/mame/drivers/pktgaldx.cpp2
-rw-r--r--src/mame/drivers/plus4.cpp12
-rw-r--r--src/mame/drivers/pntnpuzl.cpp2
-rw-r--r--src/mame/drivers/proteus3.cpp2
-rw-r--r--src/mame/drivers/psikyo.cpp83
-rw-r--r--src/mame/drivers/punchout.cpp4
-rw-r--r--src/mame/drivers/pv1000.cpp6
-rw-r--r--src/mame/drivers/px8.cpp12
-rw-r--r--src/mame/drivers/quasar.cpp3
-rw-r--r--src/mame/drivers/raiden2.cpp120
-rw-r--r--src/mame/drivers/rainbow.cpp2
-rw-r--r--src/mame/drivers/rfslots8085.cpp128
-rw-r--r--src/mame/drivers/rmhaihai.cpp190
-rw-r--r--src/mame/drivers/rohga.cpp16
-rw-r--r--src/mame/drivers/roland_d10.cpp28
-rw-r--r--src/mame/drivers/roland_jv80.cpp62
-rw-r--r--src/mame/drivers/roland_jx8p.cpp31
-rw-r--r--src/mame/drivers/roland_ra30.cpp52
-rw-r--r--src/mame/drivers/roland_s10.cpp299
-rw-r--r--src/mame/drivers/roland_s50.cpp435
-rw-r--r--src/mame/drivers/roland_sc55.cpp17
-rw-r--r--src/mame/drivers/roland_sc88.cpp65
-rw-r--r--src/mame/drivers/runaway.cpp4
-rw-r--r--src/mame/drivers/rz1.cpp2
-rw-r--r--src/mame/drivers/rzone.cpp4
-rw-r--r--src/mame/drivers/s11.cpp4
-rw-r--r--src/mame/drivers/sag.cpp348
-rw-r--r--src/mame/drivers/saitek_cp2000.cpp13
-rw-r--r--src/mame/drivers/saitek_mark5.cpp8
-rw-r--r--src/mame/drivers/saitek_prschess.cpp8
-rw-r--r--src/mame/drivers/saitek_schess.cpp254
-rw-r--r--src/mame/drivers/saitek_stratos.cpp2
-rw-r--r--src/mame/drivers/saitek_superstar.cpp25
-rw-r--r--src/mame/drivers/sapi1.cpp4
-rw-r--r--src/mame/drivers/scobra.cpp180
-rw-r--r--src/mame/drivers/scramble.cpp1
-rw-r--r--src/mame/drivers/seabattl.cpp4
-rw-r--r--src/mame/drivers/seattle.cpp26
-rw-r--r--src/mame/drivers/segag80r.cpp14
-rw-r--r--src/mame/drivers/segag80v.cpp8
-rw-r--r--src/mame/drivers/segajw.cpp3
-rw-r--r--src/mame/drivers/segas18.cpp4
-rw-r--r--src/mame/drivers/seibuspi.cpp24
-rw-r--r--src/mame/drivers/sfcbox.cpp38
-rw-r--r--src/mame/drivers/shanghai.cpp9
-rw-r--r--src/mame/drivers/sigmab52.cpp3
-rw-r--r--src/mame/drivers/simpl156.cpp2
-rw-r--r--src/mame/drivers/snes.cpp96
-rw-r--r--src/mame/drivers/snesb.cpp66
-rw-r--r--src/mame/drivers/snk.cpp58
-rw-r--r--src/mame/drivers/softbox.cpp2
-rw-r--r--src/mame/drivers/spg2xx_jakks.cpp40
-rw-r--r--src/mame/drivers/spg2xx_jakks_sharp.cpp79
-rw-r--r--src/mame/drivers/spg2xx_jakks_tvtouch.cpp2
-rw-r--r--src/mame/drivers/srumbler.cpp4
-rw-r--r--src/mame/drivers/sshangha.cpp90
-rw-r--r--src/mame/drivers/sstrangr.cpp481
-rw-r--r--src/mame/drivers/ssv.cpp137
-rw-r--r--src/mame/drivers/starrider.cpp12
-rw-r--r--src/mame/drivers/subhuntr.cpp3
-rw-r--r--src/mame/drivers/supbtime.cpp2
-rw-r--r--src/mame/drivers/superqix.cpp6
-rw-r--r--src/mame/drivers/taito_b.cpp3
-rw-r--r--src/mame/drivers/taito_f2.cpp22
-rw-r--r--src/mame/drivers/taito_l.cpp4
-rw-r--r--src/mame/drivers/tandy1t.cpp4
-rw-r--r--src/mame/drivers/tandy2k.cpp2
-rw-r--r--src/mame/drivers/tg100.cpp20
-rw-r--r--src/mame/drivers/toratora.cpp2
-rw-r--r--src/mame/drivers/triviaquiz.cpp60
-rw-r--r--src/mame/drivers/trkfldch.cpp10
-rw-r--r--src/mame/drivers/turbo.cpp66
-rw-r--r--src/mame/drivers/tv990.cpp8
-rw-r--r--src/mame/drivers/ultrsprt.cpp48
-rw-r--r--src/mame/drivers/unkpoker.cpp45
-rw-r--r--src/mame/drivers/vamphalf.cpp52
-rw-r--r--src/mame/drivers/vaportra.cpp4
-rw-r--r--src/mame/drivers/vc4000.cpp1
-rw-r--r--src/mame/drivers/vgmplay.cpp7
-rw-r--r--src/mame/drivers/vic20.cpp4
-rw-r--r--src/mame/drivers/videosaa.cpp456
-rw-r--r--src/mame/drivers/vis.cpp4
-rw-r--r--src/mame/drivers/vp415.cpp4
-rw-r--r--src/mame/drivers/vt240.cpp8
-rw-r--r--src/mame/drivers/vt52.cpp4
-rw-r--r--src/mame/drivers/wangpc.cpp4
-rw-r--r--src/mame/drivers/whitestar.cpp17
-rw-r--r--src/mame/drivers/wicat.cpp6
-rw-r--r--src/mame/drivers/wildpkr.cpp6
-rw-r--r--src/mame/drivers/wiping.cpp26
-rw-r--r--src/mame/drivers/wxstar4000.cpp11
-rw-r--r--src/mame/drivers/x68k.cpp14
-rw-r--r--src/mame/drivers/ymtx81z.cpp160
-rw-r--r--src/mame/drivers/yunsung8.cpp15
-rw-r--r--src/mame/drivers/zac_1.cpp6
-rw-r--r--src/mame/drivers/zac_2.cpp4
-rw-r--r--src/mame/includes/abc80x.h2
-rw-r--r--src/mame/includes/amiga.h7
-rw-r--r--src/mame/includes/apexc.h2
-rw-r--r--src/mame/includes/asteroid.h2
-rw-r--r--src/mame/includes/atarist.h18
-rw-r--r--src/mame/includes/btime.h2
-rw-r--r--src/mame/includes/bublbobl.h6
-rw-r--r--src/mame/includes/bwidow.h2
-rw-r--r--src/mame/includes/cave.h10
-rw-r--r--src/mame/includes/centiped.h2
-rw-r--r--src/mame/includes/champbas.h2
-rw-r--r--src/mame/includes/cninja.h1
-rw-r--r--src/mame/includes/dec8.h2
-rw-r--r--src/mame/includes/deco32.h2
-rw-r--r--src/mame/includes/dgnalpha.h12
-rw-r--r--src/mame/includes/digdug.h2
-rw-r--r--src/mame/includes/equites.h12
-rw-r--r--src/mame/includes/freekick.h3
-rw-r--r--src/mame/includes/galaxold.h2
-rw-r--r--src/mame/includes/gb.h2
-rw-r--r--src/mame/includes/hh_sm510.h2
-rw-r--r--src/mame/includes/irobot.h6
-rw-r--r--src/mame/includes/jack.h2
-rw-r--r--src/mame/includes/legionna.h2
-rw-r--r--src/mame/includes/lynx.h2
-rw-r--r--src/mame/includes/malzak.h23
-rw-r--r--src/mame/includes/mbee.h2
-rw-r--r--src/mame/includes/mcr.h62
-rw-r--r--src/mame/includes/mcr3.h118
-rw-r--r--src/mame/includes/nmk16.h1
-rw-r--r--src/mame/includes/pacman.h2
-rw-r--r--src/mame/includes/psikyo.h23
-rw-r--r--src/mame/includes/raiden2.h2
-rw-r--r--src/mame/includes/runaway.h2
-rw-r--r--src/mame/includes/scramble.h2
-rw-r--r--src/mame/includes/segag80r.h2
-rw-r--r--src/mame/includes/segag80v.h2
-rw-r--r--src/mame/includes/snes.h26
-rw-r--r--src/mame/includes/srumbler.h2
-rw-r--r--src/mame/includes/sshangha.h4
-rw-r--r--src/mame/includes/ssv.h145
-rw-r--r--src/mame/includes/super80.h2
-rw-r--r--src/mame/includes/superqix.h2
-rw-r--r--src/mame/includes/tnzs.h2
-rw-r--r--src/mame/includes/z80ne.h2
-rw-r--r--src/mame/layout/conic_cchess2.lay530
-rw-r--r--src/mame/layout/fidel_eas_priv.lay592
-rw-r--r--src/mame/layout/qfire.lay111
-rw-r--r--src/mame/layout/sag.lay301
-rw-r--r--src/mame/layout/saitek_prschess.lay3
-rw-r--r--src/mame/layout/saitek_schess.lay477
-rw-r--r--src/mame/layout/sstrangr.lay22
-rw-r--r--src/mame/layout/videosaa.lay55
-rw-r--r--src/mame/machine/3dom2.cpp20
-rw-r--r--src/mame/machine/3dom2.h13
-rw-r--r--src/mame/machine/6883sam.cpp2
-rw-r--r--src/mame/machine/alpha8201.cpp4
-rw-r--r--src/mame/machine/amiga.cpp6
-rw-r--r--src/mame/machine/apexc.cpp2
-rw-r--r--src/mame/machine/apexc.h2
-rw-r--r--src/mame/machine/archimds.cpp8
-rw-r--r--src/mame/machine/asteroid.cpp6
-rw-r--r--src/mame/machine/balsente.cpp4
-rw-r--r--src/mame/machine/bublbobl.cpp8
-rw-r--r--src/mame/machine/decocass.cpp40
-rw-r--r--src/mame/machine/dgnalpha.cpp28
-rw-r--r--src/mame/machine/dmac_0448.cpp189
-rw-r--r--src/mame/machine/dmac_0448.h99
-rw-r--r--src/mame/machine/dmv_keyb.cpp2
-rw-r--r--src/mame/machine/galaxold.cpp4
-rw-r--r--src/mame/machine/gb.cpp10
-rw-r--r--src/mame/machine/imds2ioc.cpp6
-rw-r--r--src/mame/machine/irobot.cpp13
-rw-r--r--src/mame/machine/lisa.cpp4
-rw-r--r--src/mame/machine/lynx.cpp6
-rw-r--r--src/mame/machine/mac.cpp6
-rw-r--r--src/mame/machine/macpci.cpp6
-rw-r--r--src/mame/machine/mb62h195.cpp75
-rw-r--r--src/mame/machine/mb62h195.h60
-rw-r--r--src/mame/machine/mbee.cpp6
-rw-r--r--src/mame/machine/mcr.cpp11
-rw-r--r--src/mame/machine/mexico86.cpp2
-rw-r--r--src/mame/machine/midwayic.cpp4
-rw-r--r--src/mame/machine/midwayic.h2
-rw-r--r--src/mame/machine/msx.cpp4
-rw-r--r--src/mame/machine/nes_vt_soc.cpp1587
-rw-r--r--src/mame/machine/nes_vt_soc.h343
-rw-r--r--src/mame/machine/news_hid.cpp343
-rw-r--r--src/mame/machine/news_hid.h66
-rw-r--r--src/mame/machine/qix.cpp2
-rw-r--r--src/mame/machine/seibucop.cpp (renamed from src/mame/machine/seibucop/seibucop.cpp)6
-rw-r--r--src/mame/machine/seibucop.h (renamed from src/mame/machine/seibucop/seibucop.h)12
-rw-r--r--src/mame/machine/seibucop_cmd.hxx (renamed from src/mame/machine/seibucop/seibucop_cmd.hxx)3
-rw-r--r--src/mame/machine/seibucop_dma.hxx (renamed from src/mame/machine/seibucop/seibucop_dma.hxx)4
-rw-r--r--src/mame/machine/snes.cpp22
-rw-r--r--src/mame/machine/super80.cpp6
-rw-r--r--src/mame/machine/swim.cpp4
-rw-r--r--src/mame/machine/swim.h4
-rw-r--r--src/mame/machine/swtpc09.cpp2
-rw-r--r--src/mame/machine/taito68705interface.cpp6
-rw-r--r--src/mame/machine/taitocchip.cpp2
-rw-r--r--src/mame/machine/tigeroad.cpp10
-rw-r--r--src/mame/machine/tnzs.cpp8
-rw-r--r--src/mame/machine/vt100_kbd.cpp4
-rw-r--r--src/mame/machine/williams.cpp10
-rw-r--r--src/mame/machine/z80ne.cpp6
-rw-r--r--src/mame/mame.lst72
-rw-r--r--src/mame/mess.flt11
-rw-r--r--src/mame/nl.lst4
-rw-r--r--src/mame/video/3dom2_te.cpp19
-rw-r--r--src/mame/video/3dom2_te.h5
-rw-r--r--src/mame/video/abc806.cpp2
-rw-r--r--src/mame/video/amiga.cpp4
-rw-r--r--src/mame/video/antic.cpp20
-rw-r--r--src/mame/video/cave.cpp96
-rw-r--r--src/mame/video/cninja.cpp25
-rw-r--r--src/mame/video/cps1.cpp15
-rw-r--r--src/mame/video/decbac06.cpp67
-rw-r--r--src/mame/video/decbac06.h13
-rw-r--r--src/mame/video/deco16ic.cpp122
-rw-r--r--src/mame/video/deco16ic.h22
-rw-r--r--src/mame/video/deco32.cpp6
-rw-r--r--src/mame/video/docastle.cpp6
-rw-r--r--src/mame/video/gic.cpp6
-rw-r--r--src/mame/video/gtia.cpp4
-rw-r--r--src/mame/video/gtia.h2
-rw-r--r--src/mame/video/malzak.cpp128
-rw-r--r--src/mame/video/mbee.cpp2
-rw-r--r--src/mame/video/mcr.cpp12
-rw-r--r--src/mame/video/mcr3.cpp8
-rw-r--r--src/mame/video/nmk16.cpp5
-rw-r--r--src/mame/video/psikyo.cpp160
-rw-r--r--src/mame/video/sshangha.cpp15
-rw-r--r--src/mame/video/ssv.cpp40
-rw-r--r--src/mame/video/tmap038.cpp4
-rw-r--r--src/mame/video/tmap038.h9
-rw-r--r--src/mame/video/vc4000.cpp2
-rw-r--r--src/mame/video/zac2650.cpp2
-rw-r--r--src/osd/modules/debugger/qt/debuggerview.cpp7
-rw-r--r--src/osd/modules/debugger/qt/memorywindow.cpp5
-rw-r--r--src/tools/jedutil.cpp257
-rw-r--r--src/tools/unidasm.cpp8
839 files changed, 24044 insertions, 11005 deletions
diff --git a/hash/apple2_flop_orig.xml b/hash/apple2_flop_orig.xml
index b30269669d5..6ced3304349 100644
--- a/hash/apple2_flop_orig.xml
+++ b/hash/apple2_flop_orig.xml
@@ -11260,7 +11260,7 @@ license:CC0
</part>
</software>
-<software name="braingme">
+ <software name="braingme">
<description>The Brain Game</description>
<year>1984</year>
<publisher>The Millenium Group</publisher>
@@ -11275,7 +11275,7 @@ license:CC0
</part>
</software>
-<software name="cntdsht">
+ <software name="cntdsht">
<description>Countdown to Shutdown</description>
<year>1985</year>
<publisher>Activision</publisher>
@@ -11290,7 +11290,7 @@ license:CC0
</part>
</software>
-<software name="brdtale2">
+ <software name="brdtale2">
<description>The Bard's Tale II: The Destiny Knight</description>
<year>1987</year>
<publisher>Electronic Arts</publisher>
@@ -11339,7 +11339,7 @@ license:CC0
</part>
</software>
-<software name="jelwayqb">
+ <software name="jelwayqb">
<description>John Elway's Quarterback</description>
<year>1987</year>
<publisher>Leland Corporation</publisher>
@@ -11354,7 +11354,7 @@ license:CC0
</part>
</software>
-<software name="kavekark">
+ <software name="kavekark">
<description>Kaves of Karkhan</description>
<year>1981</year>
<publisher>Level-10</publisher>
@@ -11369,7 +11369,7 @@ license:CC0
</part>
</software>
-<software name="triad">
+ <software name="triad">
<description>Triad (Version 1.0)</description>
<year>1983</year>
<publisher>Adventure International</publisher>
@@ -11384,7 +11384,7 @@ license:CC0
</part>
</software>
-<software name="rescfrac">
+ <software name="rescfrac">
<description>Rescue on Fractalus</description>
<year>1985</year>
<publisher>Lucasfilm</publisher>
diff --git a/hash/bbc_flop_6502.xml b/hash/bbc_flop_6502.xml
index f43bb525112..2f99ac61814 100644
--- a/hash/bbc_flop_6502.xml
+++ b/hash/bbc_flop_6502.xml
@@ -82,6 +82,19 @@ Acorn BBC Micro - 6502 2nd Processor Discs
</part>
</software>
+ <software name="coprosup">
+ <description>65C102 Co-Processor Support Disc</description>
+ <year>1986</year>
+ <publisher>Acorn Computers</publisher>
+ <info name="format" value="DFS" />
+ <info name="usage" value="Requires 65C102 co-processor" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="102400">
+ <rom name="65C102SupportDisc.ssd" size="102400" crc="f6378bb4" sha1="03bfe9e860ecc6117f2e78771c4e301751269055"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="hisheet">
<description>Hi-InterSheet</description>
<year>1986</year>
@@ -133,7 +146,7 @@ Acorn BBC Micro - 6502 2nd Processor Discs
</software>
<software name="psystem">
- <description>P-System</description>
+ <description>p-System</description>
<year>1984</year>
<publisher>Acornsoft/TDI</publisher>
<info name="release" value="SNB26" />
@@ -141,7 +154,7 @@ Acorn BBC Micro - 6502 2nd Processor Discs
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="P-System (1)"/>
<dataarea name="flop" size="204800">
- <rom name="Acornsoft P-System.ssd" size="204800" crc="7f880ffb" sha1="2dc9a1905a60e2f40194639c2997e335cfd8a536"/>
+ <rom name="Acornsoft p-System.ssd" size="204800" crc="7f880ffb" sha1="2dc9a1905a60e2f40194639c2997e335cfd8a536"/>
</dataarea>
</part>
</software>
diff --git a/hash/bbc_flop_65c102.xml b/hash/bbc_flop_65c102.xml
deleted file mode 100644
index a52ecb8f941..00000000000
--- a/hash/bbc_flop_65c102.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-<!--
-license:CC0
-
-Acorn BBC Micro - 65C102 Co-Processor discs
-
- Loading Instructions:
-
- Hold down the SHIFT key and press and release the BREAK key.
--->
-
-<softwarelist name="bbc_flop_65c102" description="Acorn 65C102 Co-Processor discs">
-
- <software name="coprosup">
- <description>65C102 Co-Processor Support Disc</description>
- <year>1986</year>
- <publisher>Acorn Computers</publisher>
- <info name="format" value="DFS" />
- <info name="usage" value="Requires 65C102 co-processor" />
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="102400">
- <rom name="65C102SupportDisc.ssd" size="102400" crc="f6378bb4" sha1="03bfe9e860ecc6117f2e78771c4e301751269055"/>
- </dataarea>
- </part>
- </software>
-
-</softwarelist>
diff --git a/hash/bbc_flop_torch.xml b/hash/bbc_flop_torch.xml
index af70162c503..76732d7f6db 100644
--- a/hash/bbc_flop_torch.xml
+++ b/hash/bbc_flop_torch.xml
@@ -3,10 +3,10 @@
<!--
license:CC0
-Acorn BBC Micro - Torch Z80/68000 Co-Processor discs
+Acorn BBC Micro - Torch Co-Processor discs
-->
-<softwarelist name="bbc_flop_torch" description="Torch Z80/68000 Co-Processor discs">
+<softwarelist name="bbc_flop_torch" description="Torch Co-Processor discs">
<!-- Z80 -->
@@ -72,7 +72,7 @@ Acorn BBC Micro - Torch Z80/68000 Co-Processor discs
<info name="usage" value="Requires Torch Z80 co-processor" />
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="409600">
- <rom name="hard_disc_utils_41.dsd" size="409600" crc="bab06207" sha1="24cc5b74b481794cdd3e67ea746cbd57927c1201" offset="0"/>
+ <rom name="hard_disc_utils_41.dsd" size="409600" crc="bab06207" sha1="24cc5b74b481794cdd3e67ea746cbd57927c1201"/>
</dataarea>
</part>
</software>
@@ -207,85 +207,85 @@ Acorn BBC Micro - Torch Z80/68000 Co-Processor discs
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="Unix Initalisation"/>
<dataarea name="flop" size="333396">
- <rom name="BAS20-1.IMD" size="333396" crc="b09d3400" sha1="e7831a199b5e4baec74d1478f2e5ad4998cbf3df" offset="0"/>
+ <rom name="bas20-1.imd" size="333396" crc="b09d3400" sha1="e7831a199b5e4baec74d1478f2e5ad4998cbf3df"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="Unix loader &amp; Kernel"/>
<dataarea name="flop" size="200219">
- <rom name="BAS20-2.IMD" size="200219" crc="2d55e4b5" sha1="63a8e1eb8289b822298805f2fe4f8d702563fc81" offset="0"/>
+ <rom name="bas20-2.imd" size="200219" crc="2d55e4b5" sha1="63a8e1eb8289b822298805f2fe4f8d702563fc81"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="/etc/* /unix"/>
<dataarea name="flop" size="340717">
- <rom name="BAS20-3.IMD" size="340717" crc="5b249e1d" sha1="4f7a14e9e25e5a3aaff84f3c64d2cf23344e9ded" offset="0"/>
+ <rom name="bas20-3.imd" size="340717" crc="5b249e1d" sha1="4f7a14e9e25e5a3aaff84f3c64d2cf23344e9ded"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<feature name="part_id" value="/bin/[a-d]*"/>
<dataarea name="flop" size="386615">
- <rom name="BAS20-4.IMD" size="386615" crc="6ff61822" sha1="189667d997a1ad733e74d0b3885e48bad0d76b00" offset="0"/>
+ <rom name="bas20-4.imd" size="386615" crc="6ff61822" sha1="189667d997a1ad733e74d0b3885e48bad0d76b00"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<feature name="part_id" value="/bin/[e-o]*"/>
<dataarea name="flop" size="382535">
- <rom name="BAS20-5.IMD" size="382535" crc="e3305576" sha1="fb716186cf09fce7628a627f01220412bd527e94" offset="0"/>
+ <rom name="bas20-5.imd" size="382535" crc="e3305576" sha1="fb716186cf09fce7628a627f01220412bd527e94"/>
</dataarea>
</part>
<part name="flop6" interface="floppy_5_25">
<feature name="part_id" value="/bin/[p-w]*"/>
<dataarea name="flop" size="388910">
- <rom name="BAS20-6.IMD" size="388910" crc="b18f6a66" sha1="5243721e9338c9e84f3da64d1d3bb74c6e581e23" offset="0"/>
+ <rom name="bas20-6.imd" size="388910" crc="b18f6a66" sha1="5243721e9338c9e84f3da64d1d3bb74c6e581e23"/>
</dataarea>
</part>
<part name="flop7" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/[a-f]*"/>
<dataarea name="flop" size="395799">
- <rom name="BAS20-7.IMD" size="395799" crc="f74e8ec7" sha1="c2c02ca28cabefdc5ec61325059bae4a7b80bd99" offset="0"/>
+ <rom name="bas20-7.imd" size="395799" crc="f74e8ec7" sha1="c2c02ca28cabefdc5ec61325059bae4a7b80bd99"/>
</dataarea>
</part>
<part name="flop8" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/[g-r]*"/>
<dataarea name="flop" size="374889">
- <rom name="BAS20-8.IMD" size="374889" crc="182d2323" sha1="09148a84b065ba962ae7c76b89eaddcffbe6093a" offset="0"/>
+ <rom name="bas20-8.imd" size="374889" crc="182d2323" sha1="09148a84b065ba962ae7c76b89eaddcffbe6093a"/>
</dataarea>
</part>
<part name="flop9" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/[s-u]*"/>
<dataarea name="flop" size="387129">
- <rom name="BAS20-9.IMD" size="387129" crc="73440288" sha1="572d7d37e6f914182c8afd534a5a15175ac32cbe" offset="0"/>
+ <rom name="bas20-9.imd" size="387129" crc="73440288" sha1="572d7d37e6f914182c8afd534a5a15175ac32cbe"/>
</dataarea>
</part>
<part name="flop10" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/[v-x]*"/>
<dataarea name="flop" size="160689">
- <rom name="BAS20-10.IMD" size="160689" crc="4880eb0a" sha1="4a136825a3890c204eb7b498d5182bd1ecf398eb" offset="0"/>
+ <rom name="bas20-10.imd" size="160689" crc="4880eb0a" sha1="4a136825a3890c204eb7b498d5182bd1ecf398eb"/>
</dataarea>
</part>
<part name="flop11" interface="floppy_5_25">
<feature name="part_id" value="/usr/lib/* /documentation/* /lid/makekey /usr/spool/at/lastimedone"/>
<dataarea name="flop" size="213783">
- <rom name="BAS20-11.IMD" size="213783" crc="d80cb4d1" sha1="d53ad176492ec6e2dcff2358dcfec70280ca5f6a" offset="0"/>
+ <rom name="bas20-11.imd" size="213783" crc="d80cb4d1" sha1="d53ad176492ec6e2dcff2358dcfec70280ca5f6a"/>
</dataarea>
</part>
<part name="flop12" interface="floppy_5_25">
<feature name="part_id" value="/usr/games/[a-l]* /usr/games/mastermind"/>
<dataarea name="flop" size="402964">
- <rom name="BAS20-12.IMD" size="402964" crc="f2b2d328" sha1="1cf763acb55871e22b59dab135c3bd63d809d468" offset="0"/>
+ <rom name="bas20-12.imd" size="402964" crc="f2b2d328" sha1="1cf763acb55871e22b59dab135c3bd63d809d468"/>
</dataarea>
</part>
<part name="flop13" interface="floppy_5_25">
<feature name="part_id" value="/usr/games/moo /usr/games/[n-w]* /usr/games/lib/* /usr/games/lib/quiz/*"/>
<dataarea name="flop" size="369593">
- <rom name="BAS20-13.IMD" size="369593" crc="9ef9be16" sha1="86f32c47b63c034e5f4a066df7f38bbfd611e6b8" offset="0"/>
+ <rom name="bas20-13.imd" size="369593" crc="9ef9be16" sha1="86f32c47b63c034e5f4a066df7f38bbfd611e6b8"/>
</dataarea>
</part>
<part name="flop14" interface="floppy_5_25">
<feature name="part_id" value="UUCP"/>
<dataarea name="flop" size="332803">
- <rom name="BAS20-14.IMD" size="332803" crc="5b8c2543" sha1="e6d9fedca68bc44356501b0b6c4186ba213622f4" offset="0"/>
+ <rom name="bas20-14.imd" size="332803" crc="5b8c2543" sha1="e6d9fedca68bc44356501b0b6c4186ba213622f4"/>
</dataarea>
</part>
</software>
@@ -300,43 +300,43 @@ Acorn BBC Micro - Torch Z80/68000 Co-Processor discs
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="/bin/*"/>
<dataarea name="flop" size="390763">
- <rom name="PROG20-1.IMD" size="390763" crc="01d69dfa" sha1="a7baad99085cdcf656ca81f0dcc383a428967d36" offset="0"/>
+ <rom name="prog20-1.imd" size="390763" crc="01d69dfa" sha1="a7baad99085cdcf656ca81f0dcc383a428967d36"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/ assorted"/>
<dataarea name="flop" size="392743">
- <rom name="PROG20-2.IMD" size="392743" crc="bd812c05" sha1="78dedc903ea6d456d328a7a49f4ce1b2158592ea" offset="0"/>
+ <rom name="prog20-2.imd" size="392743" crc="bd812c05" sha1="78dedc903ea6d456d328a7a49f4ce1b2158592ea"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/ sact sccsdiff sdiff val /usr/bin/ vc what prs /usr/lib/* /usr/lib/lex/*"/>
<dataarea name="flop" size="295908">
- <rom name="PROG20-3.IMD" size="295908" crc="6f996745" sha1="9e182c732a202bb69ff9d63ce8b5c48a0c47098c" offset="0"/>
+ <rom name="prog20-3.imd" size="295908" crc="6f996745" sha1="9e182c732a202bb69ff9d63ce8b5c48a0c47098c"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<feature name="part_id" value="/usr/include/* /usr/include/sys[a-p]*"/>
<dataarea name="flop" size="95432">
- <rom name="PROG20-4.IMD" size="95432" crc="17238b2c" sha1="d7452ced792e791b3281e0bd7a70a89c2d965a15" offset="0"/>
+ <rom name="prog20-4.imd" size="95432" crc="17238b2c" sha1="d7452ced792e791b3281e0bd7a70a89c2d965a15"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<feature name="part_id" value="/usr/include/sys/[r-v]* /usr/lib/cref/* /user/lib/help/*"/>
<dataarea name="flop" size="104122">
- <rom name="PROG20-5.IMD" size="104122" crc="a8aa6260" sha1="f28f584a4546b8f22267ec9caaf6bf4d656ea343" offset="0"/>
+ <rom name="prog20-5.imd" size="104122" crc="a8aa6260" sha1="f28f584a4546b8f22267ec9caaf6bf4d656ea343"/>
</dataarea>
</part>
<part name="flop6" interface="floppy_5_25">
<feature name="part_id" value="/lib/c* /lib/libPW.a libc.a libm.a"/>
<dataarea name="flop" size="388934">
- <rom name="PROG20-6.IMD" size="388934" crc="b327cd84" sha1="c4fd0c4d74c95ded265001402a8865d7974ba4b6" offset="0"/>
+ <rom name="prog20-6.imd" size="388934" crc="b327cd84" sha1="c4fd0c4d74c95ded265001402a8865d7974ba4b6"/>
</dataarea>
</part>
<part name="flop7" interface="floppy_5_25">
<feature name="part_id" value="/lib/libcurses.a libl.a liby.a /lib/yaccpar mcrt0.o"/>
<dataarea name="flop" size="60766">
- <rom name="PROG20-7.IMD" size="60766" crc="acf51b62" sha1="a21116a228c1f845b798f6a57612439dee719079" offset="0"/>
+ <rom name="prog20-7.imd" size="60766" crc="acf51b62" sha1="a21116a228c1f845b798f6a57612439dee719079"/>
</dataarea>
</part>
</software>
@@ -351,19 +351,19 @@ Acorn BBC Micro - Torch Z80/68000 Co-Processor discs
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="/bin/* /usr/bin/[3-r]*"/>
<dataarea name="flop" size="366553">
- <rom name="TEXT20-1.IMD" size="366553" crc="dbafe230" sha1="848e55b5c69e36efda390b0a781339cf259931d8" offset="0"/>
+ <rom name="text20-1.imd" size="366553" crc="dbafe230" sha1="848e55b5c69e36efda390b0a781339cf259931d8"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="/usr/bin/[s-u] /usr/lib/suftab w2006 sq2006 /usr/lib/font/* /usr/lib/term/*"/>
<dataarea name="flop" size="353277">
- <rom name="TEXT20-2.IMD" size="353277" crc="9c8dce99" sha1="8eedaef409bf9ddceabae275b64d9d3c6b62dad6" offset="0"/>
+ <rom name="text20-2.imd" size="353277" crc="9c8dce99" sha1="8eedaef409bf9ddceabae275b64d9d3c6b62dad6"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="/usr/lib/t* /usr/lib/macro/* /usr/lib/spell/*"/>
<dataarea name="flop" size="380021">
- <rom name="TEXT20-3.IMD" size="380021" crc="02265d47" sha1="b6e255aaace5ae06acf42f704e3eb11f7e95a95a" offset="0"/>
+ <rom name="text20-3.imd" size="380021" crc="02265d47" sha1="b6e255aaace5ae06acf42f704e3eb11f7e95a95a"/>
</dataarea>
</part>
</software>
@@ -378,19 +378,76 @@ Acorn BBC Micro - Torch Z80/68000 Co-Processor discs
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="Initialisation Disc"/>
<dataarea name="flop" size="342341">
- <rom name="UNIXUP-1.IMD" size="342341" crc="2e8c14bd" sha1="781a19ab0bc960d9c4f8e642227b8842b53d935a" offset="0"/>
+ <rom name="unixup-1.imd" size="342341" crc="2e8c14bd" sha1="781a19ab0bc960d9c4f8e642227b8842b53d935a"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="Single User Kernels"/>
<dataarea name="flop" size="345587">
- <rom name="UNIXUP-2.IMD" size="345587" crc="8a8873c2" sha1="16070f950c9bd7d6dbb35a11be1830c6fc455162" offset="0"/>
+ <rom name="unixup-2.imd" size="345587" crc="8a8873c2" sha1="16070f950c9bd7d6dbb35a11be1830c6fc455162"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="New Utilities"/>
<dataarea name="flop" size="167338">
- <rom name="UNIXUP-3.IMD" size="167338" crc="c29c5607" sha1="b644743b15cf42b7a9aed6dca8f4f7e7eeb7b5ca" offset="0"/>
+ <rom name="unixup-3.imd" size="167338" crc="c29c5607" sha1="b644743b15cf42b7a9aed6dca8f4f7e7eeb7b5ca"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- Graduate -->
+
+ <software name="gdfs" supported="no">
+ <description>Graduate DFS</description>
+ <year>1984</year>
+ <publisher>Torch Computers</publisher>
+ <info name="format" value="DOS" />
+ <info name="usage" value="Requires Torch Graduate" />
+ <sharedfeat name="compatibility" value="8088"/>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="184320">
+ <rom name="torch_gdfs.img" size="184320" crc="bccbb0d0" sha1="37641275fdd3cf4965d5b9cd45211b5346a29b19"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="gmsdos" supported="no">
+ <description>Graduate MS-DOS 2.11</description>
+ <year>1984</year>
+ <publisher>Torch Computers</publisher>
+ <info name="format" value="DOS" />
+ <info name="usage" value="Requires Torch Graduate" />
+ <sharedfeat name="compatibility" value="8088"/>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="368640">
+ <rom name="torch_msdos2_11.img" size="368640" crc="bffa91c7" sha1="04ea2a5d840e45d6df2f051a98f61180cf92c1a7"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="xchange" supported="no">
+ <description>Psion Xchange 1.24</description>
+ <year>1984</year>
+ <publisher>Psion</publisher>
+ <info name="format" value="DOS" />
+ <info name="usage" value="Requires Torch Graduate" />
+ <sharedfeat name="compatibility" value="8088"/>
+ <part name="flop1" interface="floppy_5_25">
+ <feature name="part_id" value="Master Source"/>
+ <dataarea name="flop" size="368640">
+ <rom name="torch_xchange_source.img" size="368640" crc="12c5ab25" sha1="be2082890a9a3dab423b8f0ee618c46c8859484f"/>
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_5_25">
+ <feature name="part_id" value="Tutorial"/>
+ <dataarea name="flop" size="368640">
+ <rom name="torch_xchange_tutorial.img" size="368640" crc="95784ddc" sha1="9544eb13ccd86eb2f7c2da0735cf5a8c12836a82"/>
+ </dataarea>
+ </part>
+ <part name="flop3" interface="floppy_5_25">
+ <feature name="part_id" value="Utilities"/>
+ <dataarea name="flop" size="368640">
+ <rom name="torch_xchange_utilities.img" size="368640" crc="46c17495" sha1="8b4a9b1c83959641e514eadf2a262d0c3e736560"/>
</dataarea>
</part>
</software>
diff --git a/hash/c64_cass.xml b/hash/c64_cass.xml
index baa4729a56a..a03478415ee 100644
--- a/hash/c64_cass.xml
+++ b/hash/c64_cass.xml
@@ -82,15 +82,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>3D Pinball</description>
<year>1989</year>
<publisher>Mastertronic Plus</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="3dpinbla" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="192466">
<rom name="3dpinbla.tap" size="192466" crc="fa7d00d8" sha1="9e547ac4ee11b6b6f034f4cac5c31079c23373b3"/>
</dataarea>
</part>
- <part name="3dpinblb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="192466">
<rom name="3dpinblb.tap" size="192466" crc="f91f841d" sha1="2ed915985ef8192df097b420b17dfbe87ed358bb"/>
@@ -102,15 +103,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>American 3D Pool</description>
<year>1991</year>
<publisher>Zeppelin Games</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="a3dpoola" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="861564">
<rom name="a3dpoola.tap" size="861564" crc="3381e127" sha1="a3cca3ad5638f9e2e08b223cfd2526f72fdeb063"/>
</dataarea>
</part>
- <part name="a3dpoolb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="867657">
<rom name="a3dpoolb.tap" size="867657" crc="acc6f5fe" sha1="f21761d9d86e1bc98ea081a7405193e1eae6e30e"/>
@@ -310,6 +312,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="alice">
+ <description>Alice in Videoland</description>
+ <year>1984</year>
+ <publisher>Audiogenic Software</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="510694">
+ <rom name="alicea.tap" size="510694" crc="cbf9ee38" sha1="6061be82148c2d5c6c30b8316ca41f8a70da4352"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="334160">
+ <rom name="aliceb.tap" size="334160" crc="33728578" sha1="09cfe61a693a9a454e8d18f316010d6e5b824784"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="alleykat">
<description>Alleykat</description>
<year>1986</year>
@@ -386,15 +409,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>Angle Ball</description>
<year>1987</year>
<publisher>Mastertronic Added Dimension</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="anglebla" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="267415">
<rom name="anglebla.tap" size="267415" crc="8a71c7cf" sha1="f60d649fd0087ae4692947750c56733159bffd2a"/>
</dataarea>
</part>
- <part name="angleblb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="267414">
<rom name="angleblb.tap" size="267414" crc="8c58c3c3" sha1="f4db67b46dec798230fea7291445c1cbddf74c0d"/>
@@ -612,15 +636,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>Ball Crazy</description>
<year>1987</year>
<publisher>Mastertronic Added Dimension</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="ballcrza" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="531341">
<rom name="ballcrza.tap" size="531341" crc="e0b0dfce" sha1="d97966c12248724d0334c8ccfb03bfb877d92d03"/>
</dataarea>
</part>
- <part name="ballcrzb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="528497">
<rom name="ballcrzb.tap" size="528497" crc="ddb141fb" sha1="d8e3ebaee70fcaa1b81d2ab02111bb7d0e033a4d"/>
@@ -1010,6 +1035,20 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="bdash4h">
+ <description>Boulder Dash 4</description>
+ <year>1989</year>
+ <publisher>Hi Tec Software</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <feature name="part_id" value="Boulder Dash Construction Kit"/>
+ <dataarea name="cass" size="250098">
+ <rom name="bdashck.tap" size="250098" crc="a1748639" sha1="6a76ba69fdf0709ce330c2c47ceb7677fdd45bb9"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="bombjack">
<description>Bomb Jack</description>
<year>1988</year>
@@ -1591,6 +1630,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="collaps">
+ <description>Collapse</description>
+ <year>1985</year>
+ <publisher>Silver Range</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="533661">
+ <rom name="collapsa.tap" size="533661" crc="b87ccba8" sha1="dc513a87121cb2cc653044e14e8d4a476fb4bfcf"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="533458">
+ <rom name="collapsb.tap" size="533458" crc="50c6665c" sha1="b7aa2d8b08454514e3b68d282fc1ee2f4ee7fd66"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="comblynx">
<description>Combat Lynx</description>
<year>19??</year>
@@ -1651,22 +1711,23 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
- <software name="circus">
+ <software name="circusp">
<description>Continental Circus</description>
<year>1991</year>
<publisher>Mastertronic Plus</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="circusa" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="569886">
- <rom name="circusa.tap" size="569886" crc="d0f36a0b" sha1="bd09c14234c8c89fc391631f0fc949a7fd8a7922"/>
+ <rom name="circuspa.tap" size="569886" crc="d0f36a0b" sha1="bd09c14234c8c89fc391631f0fc949a7fd8a7922"/>
</dataarea>
</part>
- <part name="circusb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="569886">
- <rom name="circusb.tap" size="569886" crc="df7f4101" sha1="b07a48a3283936058f6e3147d41f34f3001ba650"/>
+ <rom name="circuspb.tap" size="569886" crc="df7f4101" sha1="b07a48a3283936058f6e3147d41f34f3001ba650"/>
</dataarea>
</part>
</software>
@@ -2230,15 +2291,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>Feud</description>
<year>1987</year>
<publisher>Bulldog Software</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="feuda" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="611910">
<rom name="feuda.tap" size="611910" crc="9ac57691" sha1="ff53d728123469ce40c8c1553cb03912aa897e60"/>
</dataarea>
</part>
- <part name="feudb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="611910">
<rom name="feudb.tap" size="611910" crc="0cbe87c1" sha1="b06e65952e8d2c8ee0b8cb227134136ba53b62b3"/>
@@ -2685,6 +2747,19 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="gemini">
+ <description>Gemini Wing</description>
+ <year>1990</year>
+ <publisher>Mastertronic Plus</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <dataarea name="cass" size="483502">
+ <rom name="geminia.tap" size="483502" crc="4486a5ec" sha1="e410f1ba26197f6bbc44c461ba169a5d84af2726"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="getrdyrd">
<description>Get Ready to Read with BJ Bear</description>
<year>1984</year>
@@ -2854,6 +2929,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="grandms">
+ <description>Grandmaster Chess</description>
+ <year>1986</year>
+ <publisher>Audiogenic Software</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="479942">
+ <rom name="grandmsa.tap" size="479942" crc="bb1e3edc" sha1="f35835579544c8b58b3c01cfa402a653c8b3b2e4"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="410344">
+ <rom name="grandmsb.tap" size="410344" crc="002b9b44" sha1="6f2356a96d4433ae9847564d0350d973390a35b5"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="graphed">
<description>Graphic Editor</description>
<year>19??</year>
@@ -2884,6 +2980,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="greedmn">
+ <description>The Greed Monster</description>
+ <year>1990</year>
+ <publisher>Hi Tec Software</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="827446">
+ <rom name="greedmna.tap" size="827446" crc="d75a92ce" sha1="5178771a761c53d95769edbcc257fe2acf4c9a55"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="830302">
+ <rom name="greedmnb.tap" size="830302" crc="489e9390" sha1="61503e8fbaea297824729cc24023819fba8d77ca"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="gribblys">
<description>Gribbly's Day Out</description>
<year>1985</year>
@@ -2982,6 +3099,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="hacker2">
+ <description>Hacker II</description>
+ <year>1989</year>
+ <publisher>Mastertronic</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="384234">
+ <rom name="hacker2a.tap" size="384234" crc="9c9c5aed" sha1="a499a909d48578ad7b0df5b16a97c4f2930dbaad"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="384234">
+ <rom name="hacker2b.tap" size="384234" crc="7c16e324" sha1="80e830dfb92916441ccfbd2c6e01e278bfa37c65"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="hate">
<description>H.A.T.E: Hostile All Terrain Encounter</description>
<year>1989</year>
@@ -3042,6 +3180,19 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="headovrh">
+ <description>Head Over Heels</description>
+ <year>1987</year>
+ <publisher>The Hit Squad</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <dataarea name="cass" size="671518">
+ <rom name="headovhb.tap" size="671518" crc="0fa1d871" sha1="673c375205cc2cd052ccdf52f99f482f26f59038"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="headcoach">
<description>Headcoach</description>
<year>1986</year>
@@ -3969,6 +4120,20 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="kettle">
+ <description>Kettle</description>
+ <year>1986</year>
+ <publisher>Alligata</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="329346">
+ <rom name="kettlea.tap" size="329346" crc="1ac910df" sha1="6f99c98d6c67ab1fd0678db4d26cb30bb4db7b55"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="kgbsspy">
<description>KGB Superspy</description>
<year>19??</year>
@@ -4357,6 +4522,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="mstrchs">
+ <description>Master Chess</description>
+ <year>1986</year>
+ <publisher>Mastertronic</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="391752">
+ <rom name="mstrchsa.tap" size="391752" crc="42fd4547" sha1="caabae9d2957866f3861e650753edb24da216e9b"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="395320">
+ <rom name="mstrchsb.tap" size="395320" crc="ccf02674" sha1="f97584ee6a87da30e79e57c9dec39a888637f683"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="matchpnt">
<description>Match Point (set 1)</description>
<year>1984</year>
@@ -4427,6 +4613,32 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="rhythm">
+ <description>Micro Rhythm</description>
+ <year>1986</year>
+ <publisher>Silver Range</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <dataarea name="cass" size="614063">
+ <rom name="rhythma.tap" size="614063" crc="1e2e9fb3" sha1="6c773ae1c38cf38508467025e5538d77c3f57e0b"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="midnghth">
+ <description>Midnight Resistance</description>
+ <year>1990</year>
+ <publisher>The Hit Squad</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <dataarea name="cass" size="726358">
+ <rom name="mdnghtha.tap" size="726358" crc="af57f127" sha1="9719f7d03f9956cfef8bada30d6ddd2850b45751"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="midway">
<description>Midway Campaign</description>
<year>1980</year>
@@ -4872,15 +5084,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>One Man and His Droid</description>
<year>1985</year>
<publisher>199 Range</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="omahda" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="611660">
<rom name="omahda.tap" size="611660" crc="6da4096b" sha1="263e452ba8e5f69411a873ba8ce1907f2610d24f"/>
</dataarea>
</part>
- <part name="omahdb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="598097">
<rom name="omahdb.tap" size="598097" crc="30661926" sha1="60d822dc311a72b197483b79b29ea9daab4366de"/>
@@ -5399,6 +5612,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="pulsewr">
+ <description>Pulse Warrior</description>
+ <year>1988</year>
+ <publisher>Mastertronic</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="351478">
+ <rom name="pulsewra.tap" size="351478" crc="ca177733" sha1="3b6fdaf9c34882e111efbf2301dc00df202c8246"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="351478">
+ <rom name="pulsewrb.tap" size="351478" crc="bdd439e3" sha1="ca4b3fa5b0ce4f9c2fe69d313fbea3774855dbc9"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="punchy">
<description>Punchy</description>
<year>1983</year>
@@ -5702,6 +5936,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="realm">
+ <description>Realm</description>
+ <year>1987</year>
+ <publisher>Silver Range</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="268118">
+ <rom name="realma.tap" size="268118" crc="f90a5aa9" sha1="6f8bb642b03f3cad305c215a587923b047ed5ee2"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="268118">
+ <rom name="realmb.tap" size="268118" crc="f90a5aa9" sha1="6f8bb642b03f3cad305c215a587923b047ed5ee2"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="realmimp">
<description>Realm of Impossibility</description>
<year>1984</year>
@@ -5920,19 +6175,34 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
- <software name="robocop">
+ <software name="robocodk">
+ <description>James Pond 2: RoboCod</description>
+ <year>1992</year>
+ <publisher>Kixx</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="763681">
+ <rom name="robocoda.tap" size="763681" crc="9c3a5a87" sha1="1f47600332f3140c3956f7907e0707e38d3f617c"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="robocoph">
<description>Robocop</description>
<year>1988</year>
<publisher>The Hit Squad</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="robocopa" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Side A"/>
<dataarea name="cass" size="1510854">
<rom name="robocopa.tap" size="1510854" crc="66624f2c" sha1="e8d137e6a345c0e3cafd1bf56eb7215a7a6dc597"/>
</dataarea>
</part>
- <part name="robocopb" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Side B"/>
<dataarea name="cass" size="1510854">
<rom name="robocopb.tap" size="1510854" crc="a018d08f" sha1="b4730e17a2566994c017dcfe893968375c30d3ec"/>
@@ -5988,15 +6258,16 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<description>Rockford / Back to Reality</description>
<year>1987</year>
<publisher>Mastertronic Added Dimension</publisher>
+ <!-- Dumped by @c64tapes -->
- <part name="breality" interface="cbm_cass">
+ <part name="cass1" interface="cbm_cass">
<feature name="part_id" value="Back to Reality"/>
<dataarea name="cass" size="570317">
<rom name="breality.tap" size="570317" crc="2f561e28" sha1="ed091ed18ac721772d567d2a6e24cef44a3a3b7a"/>
</dataarea>
</part>
- <part name="rockford" interface="cbm_cass">
+ <part name="cass2" interface="cbm_cass">
<feature name="part_id" value="Rockford"/>
<dataarea name="cass" size="333295">
<rom name="rockford.tap" size="333295" crc="ec352a42" sha1="b74140b6c605c914f5d983eabff74b38167c1777"/>
@@ -6591,7 +6862,7 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<software name="spyvspy">
<description>Spy vs Spy</description>
- <year>19??</year>
+ <year>1989</year>
<publisher>HiTEC Software</publisher>
<part name="cass1" interface="cbm_cass">
@@ -6603,7 +6874,7 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<software name="spyvspy2">
<description>Spy vs Spy II: The Island Caper</description>
- <year>19??</year>
+ <year>1989</year>
<publisher>HiTEC Software</publisher>
<part name="cass1" interface="cbm_cass">
@@ -6615,7 +6886,7 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
<software name="spyvspy3">
<description>Spy vs Spy III: Arctic Antics</description>
- <year>19??</year>
+ <year>1989</year>
<publisher>HiTEC Software</publisher>
<part name="cass1" interface="cbm_cass">
@@ -6999,6 +7270,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="summrck">
+ <description>Summer Camp</description>
+ <year>1990</year>
+ <publisher>Kixx</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="507164">
+ <rom name="summrcka.tap" size="507164" crc="2c8bc3d7" sha1="c2f8468308b202c6b60c2beed1edf38f5a46dbff"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="515968">
+ <rom name="summrckb.tap" size="515968" crc="e913833d" sha1="d4ad033192e4788d28574d5c45c2afde81d75121"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="sumgames">
<description>Summer Games</description>
<year>1984</year>
@@ -7263,6 +7555,27 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/
</part>
</software>
+ <software name="tetris">
+ <description>Tetris</description>
+ <year>1989</year>
+ <publisher>Mastertronic Plus</publisher>
+ <!-- Dumped by @c64tapes -->
+
+ <part name="cass1" interface="cbm_cass">
+ <feature name="part_id" value="Side A"/>
+ <dataarea name="cass" size="444689">
+ <rom name="tetrisa.tap" size="444689" crc="13bc6c8d" sha1="7c1fac70c035aa6d782a690f779302243aabd03a"/>
+ </dataarea>
+ </part>
+
+ <part name="cass2" interface="cbm_cass">
+ <feature name="part_id" value="Side B"/>
+ <dataarea name="cass" size="444689">
+ <rom name="tetrisb.tap" size="444689" crc="79de6451" sha1="abf51ce18a4cf38e4248952580c4385f8b3bd2a6"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="thomas">
<description>Thomas the Tank Engine &amp; Friends</description>
<year>1990</year>
diff --git a/hash/fmtowns_cd.xml b/hash/fmtowns_cd.xml
index 407af9d08b8..ae0ef61b8b3 100644
--- a/hash/fmtowns_cd.xml
+++ b/hash/fmtowns_cd.xml
@@ -28,7 +28,6 @@ Ablemax Eigo Able Serve
Ablemax Kokugo Able Serve 1995/6 SET(CD+FD)
Ablemax Suugaku Able Serve 1995/6 SET(CD+FD)
AD&D Heroes of the Lance Pony Canyon 1990/6 CD
-Aesop World Dai-1-shuu (Denshi Ehon) Fujitsu 1993/12 CD
Aesop World Dai-2-shuu (Denshi Ehon) Fujitsu 1993/12 CD
Airwave Adventure Toshiba EMI 1989/12 CD
Aishuu to Netsujou no Chouwa Fujitsu 1995/4 CD
@@ -199,7 +198,6 @@ FM Towns Shougaku Ongaku (5-6-nensei You) Kyouiku Shuppan
FM Towns-ban Dyna-pers Dynaware 1989/12 CD
* Fujitsu Air Warrior V1.2 Fujitsu 1993/11 SET(CD+FD)
* Fujitsu Air Warrior V1.1 Fujitsu 1992/3 SET(CD+FD)
-Fujitsu Air Warrior V2.1 Fujitsu 1995/4 SET(CD+FD)
Fujitsu Habitat V1.1 Fujitsu 1990/1 SET(CD+FD)
Fujitsu Habitat V2.1 L11 Fujitsu 1994/? SET(CD+FD)
Fukui Toshio no Otenki Map Inter Limited Logic 1991/2 CD
@@ -215,7 +213,6 @@ Game Nihonshi: Kakumeiji Oda Nobunaga Koei
Game Nihonshi: Tenkabito Hideyoshi to Ieyasu Koei 1996/6 SET(CD+FD)
Garou Densetsu Special Mahou (Nihon Home Data) 1996/9 SET(CD+FD)
GearPOWER V1.1 Fujitsu 1995/1 CD
-Gedit Towns Data West 1989/3 CD
Geimu Jan+ GAM 1993/5 CD
Geitassha Towns Shoubi Gakuen 1989/7 CD
Gendai Yougo no Kiso Chishiki (1989) Fujitsu 1989/12 CD
@@ -342,7 +339,6 @@ Kamimura Kei no Sexy Telephone Pink Elephant
Kamiya Recliet Towns Raison 1990/10 CD
Kanade V1.1 Fujitsu 1995/4 CD
Kanji Hitsujun Soft Nazoraa 2 Infortech 1994/5 CD
-Kanji Land 3-nen Fujitsu Ooita Software Laboratory 1995/7 CD
Kanji Land 4-nen Fujitsu Ooita Software Laboratory 1995/11 CD
Kanji Land 5-nen Fujitsu Ooita Software Laboratory 1995/12 CD
Kanji Land 6-nen Fujitsu Ooita Software Laboratory 1996/2 CD
@@ -361,7 +357,6 @@ Kikai Jikake no Marian Janis
Kikou Shidan 2 Artdink 1993/3 SET(CD+FD)
Kitty Town no Nakama-tachi: Tanoshii Seikatsuka Fujitsu Parex 1995/10 CD
Komaki Naomi Janis 1994/2 CD
-Kotoba Asobi CDVIEW Hip catch CRC Sougou Kenkyuusho 1992/3 CD
Koujien Daisanban CD-ROM Fujitsu 1989/12 CD
Koujien Daiyonban CD-ROM Fujitsu 1993/3 CD
Kouryuuki Koei 1993/10 SET(CD+FD)
@@ -438,7 +433,6 @@ Music Pro V2 (Naizou) Musical Plan
MusicPress Vol. 1: Cinema Scene Fujitsu 1993/11 CD
My Fair Lady CSK Research Institute (CRI) 1989/6 CD
My Fair Lady CAN.1: Introductory CSK Research Institute (CRI) 1990/9 SET(CD+FD)
-My Fair Lady CAN.3: Intermediate CSK Research Institute (CRI) 1990/12 SET(CD+FD)
My Fair Lady CAN.4: Advanced CSK Research Institute (CRI) 1990/12 SET(CD+FD)
My Fair Lady MATE: Chuugaku Eigo Kanzen Master! CSK Research Institute (CRI) 1991/3 SET(CD+FD)
MyTown for FM Towns 2-nensei-you Fujitsu 1995/11 CD
@@ -493,7 +487,6 @@ Nihongo Nyuumon Dai-3-kan Infortech
Nihongo Nyuumon Dai-4-kan Infortech 1991/4 CD
Nihongo Nyuumon Dai-5-kan Infortech 1991/4 CD
Nijiiro Denshoku Musume ISC 1994/8 CD
-Niko^2 Wolf Team 1991/11 CD
* Nobunaga no Yabou: Sengoku Gun'yuuden Koei 1989/12 SET(CD+FD)
* Nobunaga no Yabou: Tenshouki Koei 1995/3 SET(CD+FD)
Nooch: Abakareta Inbou Bombee Bonbon 1992/11 ?
@@ -578,7 +571,6 @@ Sexy PK 2 World Cup Ban Birdy Soft
Sexy PK World Cup Ban Birdy Soft 1995/6 CD
Shadow of the Beast: Mashou no Okite (1991-10-11) Victor Entertainment 1991/10? CD
Shakaika Database: Nihon no Bunka / Sangyou / Shizen Nihon Kyouiku System 1991/12 CD
-* Shamhat: The Holy Circlet Data West 1993/4 SET(CD+FD)
Shamhat: The Holy Circlet (Marty-ban) Data West 1993/4 SET(CD+FD)
Shanghai: Banri no Choujou Electronic Arts Victor 1995/9 CD
Shijou Saikyou no Video Bible System Sacom 1989/12 CD
@@ -600,8 +592,6 @@ Silver Tango Raison
SL wo Mitai! Uruwashi no Jouki Kikansha Gyousei 1995/7 CD
Soft de Hard na Monogatari System Sacom 1989/4 SET(CD+FD)
Soft de Hard na Monogatari 2 System Sacom 1989/7 SET(CD+FD)
-Software Contest Nyuusen Sakuhinshuu Vol. 1 Fujitsu 1991/10 CD
-Software Contest Nyuusen Sakuhinshuu Vol. 3 Fujitsu 1994/3 CD
Software Contest Nyuusen Sakuhinshuu Vol. 4 Fujitsu 1994/7 CD
Soreike! Anpanman: Tanoshii Eigo Asobi Fujitsu 1993/12 CD
Soreyuke! Diving Dennou Shoukai 1990/7 CD
@@ -609,7 +599,6 @@ Soudai Naru Jokyoku no Doyomeki Fujitsu
Speed Eiyou Check Top Business System 1992/4 CD
Speed Eiyou Check (?) Top Business System 1992/4 SET(CD+FD)
Star Wars: Rebel Assault Victor Entertainment 1994/9 CD
-Start with Words SofMedia 1989/8 CD
Steepia Fujitsu 1993/6 CD
Steepia Lite Fujitsu 1993/3 CD
Stingo Monogatari ST-1: Stingo to Gohoubi no Ki Technos Yashima 1995/1 CD
@@ -624,7 +613,6 @@ Sunshine 1-nen Uchida Youkou
Sunshine 2-nen Uchida Youkou 1993/7 CD
Super Kakitaoshi Nikkonren Kikaku 1993/? SET(CD+FD)
Super Zurukamashi Nikkonren Kikaku 1993/? SET(CD+FD)
-* Suzaku Wolf Team 1992/10 SET(CD+FD)
Tactical Tank Corps DX GAM 1995/2 SET(CD+FD)
Taiken Shiyou! Marty Channel 2 Fujitsu 1993/6 CD×02
Takken Ou Techno Business 1994/10 CD
@@ -738,7 +726,6 @@ Yellows Digital Rogue
Yes! HG Himeya Soft 1995/12 CD
Yoshioka Mayumi: Last Nude Janis 1993/12 CD
Youki de Cool na LA Towns Media Art 1990/12 CD
-Yubiwa Monogatari Daiikkan: Tabi no Nakama Starcraft 1992/3 CD
Yumeutsutsu Megami 1992/5 CD
Z's Staff Pro Towns Zeit 1991/7 CD
@@ -964,6 +951,25 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <!-- This is a restore CD for the FM Towns II Fresh series. It contains images of the default HDD contents and the bundled DOS / Windows floppy disks. -->
+ <software name="mastercd">
+ <!--
+ Origin: redump.org
+ <rom name="Master CD - Install Model-you (Japan).bin" size="332986752" crc="41cd567b" sha1="32ebeb3d046c1177f870f73534d7bd6679d1fa4b"/>
+ <rom name="Master CD - Install Model-you (Japan).cue" size="103" crc="f096c982" sha1="192dd3f68c07883592d6760d536e783e69fe05e2"/>
+ -->
+ <description>Master CD - Install Model-you</description>
+ <year>1994</year>
+ <publisher>富士通 (Fujitsu)</publisher>
+ <info name="alt_title" value="Master CD (インストールモデル用)" />
+ <info name="usage" value="Run DO.BAT from the command line" />
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="master cd - install model-you (japan)" sha1="d079314ee10e0e21933b839d8387d51d8b54c602" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="oasyswin">
<!--
Origin: Neo Kobe Collection
@@ -1398,6 +1404,35 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <software name="dagaind">
+ <!--
+ Origin: redump.org
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 01).bin" size="14288400" crc="10c859a5" sha1="aaf088e5546f70cc4152f608b1584d6c3326964a"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 02).bin" size="17087280" crc="37f5a811" sha1="86fa0f1ebcb99cf96eca7f7bb5ea5eacc9c27de0"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 03).bin" size="36620640" crc="d24f4985" sha1="7b33c94223e3f90b7cf0918757023b9698307b56"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 04).bin" size="2152080" crc="83b8a96f" sha1="09e7b7a28d9afc2b1537a9425bde7bf1856a08a1"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 05).bin" size="61281360" crc="d1023984" sha1="ec3d31bf61a0636195d09dea2aa39a3b90c8cf27"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 06).bin" size="26271840" crc="2f1d3ebf" sha1="7f2ebd622b57228333948ae3f2d656c8d36c9484"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 07).bin" size="25554480" crc="6a3760ba" sha1="04741294a12646cb62dbd7d3056eebaef14d8433"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 08).bin" size="20168400" crc="213dfaf1" sha1="890b333b86f569c6cf04cd5d3a7d1ebd6fb39ec8"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 09).bin" size="38890320" crc="fa06426b" sha1="981764c7f6c150866775c990eb19b0022735c05a"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 10).bin" size="49368480" crc="7e6ab140" sha1="4831ed85360d0eb00e09850daef7fab28a362ae8"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 11).bin" size="6468000" crc="7a73a1b1" sha1="b2a26238b95a0fa4113f70c8b2e536618789d1de"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo) (Track 12).bin" size="4233600" crc="4580866a" sha1="aaefaba5020efb03452df764e2897d0f278e3151"/>
+ <rom name="4th Unit Five - D-Again, The (Japan) (Demo).cue" size="1638" crc="74d7813c" sha1="36661402dd652bc56fb96529d5dd5c6964804cb2"/>
+ -->
+ <description>The 4th Unit 5 - D-Again (Demo)</description>
+ <year>1990</year>
+ <publisher>データウエスト (Data West)</publisher>
+ <info name="release" value="199004xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="4th unit five - d-again, the (japan) (demo)" sha1="6a0a34856478da5d563fba5cd9ff22bfa9d2fabe" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="merrygor">
<!--
Origin: redump.org
@@ -1582,11 +1617,19 @@ User/save disks that can be created from the game itself are not included.
<software name="adtennis">
<!--
- Origin: Neo Kobe Collection
- <rom name="Advantage Tennis.ccd" size="2666" crc="dea6a4bf" sha1="d4eaf822278f20273a67afab833a6c4eb3f80ea4"/>
- <rom name="Advantage Tennis.cue" size="472" crc="9d0c2d59" sha1="3fd59a9674e73685add5e3258ed1c7c4cac5047c"/>
- <rom name="Advantage Tennis.img" size="353329200" crc="b42597e5" sha1="c1a21909db68baf06028e5533992d79f0250fea4"/>
- <rom name="Advantage Tennis.sub" size="14421600" crc="ab3d7eca" sha1="dcd8c3fd2fd7b591111613b6e0cb03247955ceb4"/>
+ Origin: redump.org
+ <rom name="Advantage Tennis (Japan) (Track 01).bin" size="46216800" crc="2a2a83c2" sha1="1b8f5abfc8c64d637dfd1aaebedee164cee37d42"/>
+ <rom name="Advantage Tennis (Japan) (Track 02).bin" size="39513600" crc="5b7c37b6" sha1="87c52af145b40c41a542961949f6baea14deb94c"/>
+ <rom name="Advantage Tennis (Japan) (Track 03).bin" size="54684000" crc="21407644" sha1="9f616cad9a0f3a70d3b254fac4c8dbd1eabea771"/>
+ <rom name="Advantage Tennis (Japan) (Track 04).bin" size="29282400" crc="35791867" sha1="5e0239e6471eeb2b5a757481a9fb9c1bff1e28b9"/>
+ <rom name="Advantage Tennis (Japan) (Track 05).bin" size="36938160" crc="9d14fd98" sha1="cd2ca751c154ee365115c3da175adf50596f3ab5"/>
+ <rom name="Advantage Tennis (Japan) (Track 06).bin" size="30446640" crc="b251d8ea" sha1="6374faf991de47dcd79edfe452a71b682ba1624c"/>
+ <rom name="Advantage Tennis (Japan) (Track 07).bin" size="32457600" crc="929e3914" sha1="f98561aa9c6d9634db54a4b3bc47f783cc59bee8"/>
+ <rom name="Advantage Tennis (Japan) (Track 08).bin" size="6174000" crc="75798273" sha1="4a7dd49dafd4f37bac66cf18b8355e8b169bfcb1"/>
+ <rom name="Advantage Tennis (Japan) (Track 09).bin" size="29811600" crc="e7971915" sha1="24ce13fb143881b458d7219201c88da4698d2a3f"/>
+ <rom name="Advantage Tennis (Japan) (Track 10).bin" size="13406400" crc="f4f26d22" sha1="548e9f93bd466404e6e85ea8b117010cea484a97"/>
+ <rom name="Advantage Tennis (Japan) (Track 11).bin" size="34398000" crc="29a6f5aa" sha1="983ab0fa8d1f9ef3328682e4f8f8664fcb82a4b6"/>
+ <rom name="Advantage Tennis (Japan).cue" size="1291" crc="0ed74c85" sha1="fcf8c69c9d49ab2c345f0ee7ffb717b1c4736e1c"/>
-->
<description>Advantage Tennis</description>
<year>1992</year>
@@ -1596,7 +1639,31 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="advantage tennis" sha1="4210307af2238e8b0bc546b36f13f2fe651464cd" />
+ <disk name="advantage tennis (japan)" sha1="840eb0ea7f40b2bad8647ef0322979de882258ab" />
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="aesop1">
+ <!--
+ Origin: redump.org
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan) (Track 1).bin" size="10231200" crc="eb487ac7" sha1="1ec87857ec38f2df8399616efb33913987d2dfd0"/>
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan) (Track 2).bin" size="28224000" crc="38331770" sha1="d96a013ceafa29cfccf3d4616d648eb2e9e0d9c4"/>
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan) (Track 3).bin" size="32810400" crc="72aaf391" sha1="09d11b0535ca5518fe2e90db58a0f9f9afd473b2"/>
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan) (Track 4).bin" size="30517200" crc="a56a5a3a" sha1="2af87057503d967e4f70831be50d77a5ff15d765"/>
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan) (Track 5).bin" size="25225200" crc="4f174b8d" sha1="2231810c762413c77a5a51b48a343c40e963a9bc"/>
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan) (Track 6).bin" size="24166800" crc="ab9ece19" sha1="ba482cb6842faefcfdfec21a944e901ff7eda583"/>
+ <rom name="Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu (Japan).cue" size="917" crc="f4e7b021" sha1="cfaa30a24c79472a0f377862f095812d82252161"/>
+ -->
+ <description>Ehon Writer - Denshi Ehon - Aesop World Dai-1-shuu</description>
+ <year>1993</year>
+ <publisher>富士通 (Fujitsu)</publisher>
+ <info name="alt_title" value="えほんらいた 電子絵本 イソップワールド 第1集" />
+ <info name="release" value="199312xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="ehon writer - denshi ehon - aesop world dai-1-shuu (japan)" sha1="40014ec89fdaf53a40073e052da35dc97dc66c8d" />
</diskarea>
</part>
</software>
@@ -1779,8 +1846,40 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <software name="airwar21">
+ <!--
+ Origin: redump.org / wiggy2k
+ <rom name="Fujitsu Air Warrior V2 - Version 2.1 Level 10 (Japan) (Track 1).bin" size="31399200" crc="c5da9017" sha1="2e768e1f117fcf921ecde580fd4ffeafc48d405a"/>
+ <rom name="Fujitsu Air Warrior V2 - Version 2.1 Level 10 (Japan) (Track 2).bin" size="22226400" crc="4842bf9d" sha1="bcfaeb803f6c7925ad018ec655e831d15f5fb7af"/>
+ <rom name="Fujitsu Air Warrior V2 - Version 2.1 Level 10 (Japan) (Track 3).bin" size="14112000" crc="6ca56d10" sha1="61e3610f5fca8796062bf81793f4d2f2a09b3eb5"/>
+ <rom name="Fujitsu Air Warrior V2 - Version 2.1 Level 10 (Japan).cue" size="423" crc="552b021a" sha1="bd895b3a707f891e55fb658647e135570ea6901b"/>
+ -->
+ <description>Air Warrior V2.1L10</description>
+ <year>1995</year>
+ <publisher>富士通 (Fujitsu)</publisher>
+ <info name="release" value="199504xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="flop1" interface="floppy_3_5">
+ <feature name="part_id" value="2MB/Marty Kidou Disk" />
+ <dataarea name="flop" size="1261568">
+ <rom name="fujitsu air warrior v2 - version 2.1 level 10 (japan) (2mb-marty kidou disk).hdm" size="1261568" crc="feda4609" sha1="db2dbf8123d918c7fe07dea1c7bcf1e9dbcb94ec" offset="000000" />
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_3_5">
+ <feature name="part_id" value="4MB Kidou Disk" />
+ <dataarea name="flop" size="1261568">
+ <rom name="fujitsu air warrior v2 - version 2.1 level 10 (japan) (4mb kidou disk).hdm" size="1261568" crc="f3da6f23" sha1="c9ba702fc6d0a90fe53d4e712078627c2f30ea2d" offset="000000" />
+ </dataarea>
+ </part>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="fujitsu air warrior v2 - version 2.1 level 10 (japan)" sha1="7754550da30b6b025efb722d8e1fdf12f3f4354c" />
+ </diskarea>
+ </part>
+ </software>
+
<!-- Missing a floppy disk -->
- <software name="airwar12" supported="no">
+ <software name="airwar12" supported="no" cloneof="airwar21">
<!--
Origin: redump.org
<rom name="Fujitsu Air Warrior V1.2 (Japan) (Track 1).bin" size="20815200" crc="f3a20852" sha1="2c09fa527fe06258103728e1fbbd01479b491c92"/>
@@ -1799,7 +1898,7 @@ User/save disks that can be created from the game itself are not included.
</software>
<!-- Missing a floppy disk -->
- <software name="airwar11" supported="no" cloneof="airwar12">
+ <software name="airwar11" supported="no" cloneof="airwar21">
<!--
Origin: redump.org
<rom name="Fujitsu Air Warrior V1.1 (Japan) (Track 1).bin" size="10231200" crc="8ef3f105" sha1="ba8206707bd298bcf42ad401f22548c0461c59df"/>
@@ -1819,11 +1918,10 @@ User/save disks that can be created from the game itself are not included.
<software name="alice">
<!--
- Origin: Neo Kobe Collection
- <rom name="Alice no Yakata CD.ccd" size="906" crc="53e27af1" sha1="adb0ca9e06830f1948305a468133948e433a0f64"/>
- <rom name="Alice no Yakata CD.cue" size="164" crc="fa535c37" sha1="fdaa862a0d40dfa96f4f53605734a2879aab31da"/>
- <rom name="Alice no Yakata CD.img" size="150998400" crc="09ea8c74" sha1="064b38b1d5917d63d1e4b302664a6d59e6a2cb4f"/>
- <rom name="Alice no Yakata CD.sub" size="6163200" crc="efc131f7" sha1="5df5b1ab6777be7d966d21a7864b36272a2bfdf3"/>
+ Origin: redump.org
+ <rom name="Alice no Yakata CD (Japan) (Track 1).bin" size="84319200" crc="03c8bf01" sha1="c17129f419e3ee634d09abfcfe8f842297e0da0e"/>
+ <rom name="Alice no Yakata CD (Japan) (Track 2).bin" size="66679200" crc="3964e390" sha1="c21132f0608d357dd25cfd7217b88d87ed958132"/>
+ <rom name="Alice no Yakata CD (Japan).cue" size="222" crc="727db6a4" sha1="c17ac245f3c61d399c9a8c2685ca12a15f52f393"/>
-->
<description>Alice no Yakata CD</description>
<year>1991</year>
@@ -1833,7 +1931,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="alice no yakata cd" sha1="03ee698cd4801d8e297eb6eade6aae7c87b7f2e8" />
+ <disk name="alice no yakata cd (japan)" sha1="18693882b09f0eacbe48dff370524d0a3600bd0c" />
</diskarea>
</part>
</software>
@@ -2193,9 +2291,25 @@ User/save disks that can be created from the game itself are not included.
<!-- Some graphics issues -->
<software name="asu120ex" supported="partial">
<!--
- Origin: Neo Kobe Collection
- <rom name="Asuka 120% Burning Fest. Excellent.bin" size="317884560" crc="2f0a5f53" sha1="3e28df9c09aa9cc814c936864b1ca79166fa00f4"/>
- <rom name="Asuka 120% Burning Fest. Excellent.cue" size="1122" crc="8706815c" sha1="ad6eb238aa7adf93a3016d069d836122a4497c66"/>
+ Origin: redump.org
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 01).bin" size="11830560" crc="2d5ade87" sha1="99314bca20b659f8fa0491db172a3a5a69dcda91"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 02).bin" size="7056000" crc="bf72cd8b" sha1="3de6ed77a799f8403248b159d6639932c962f8be"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 03).bin" size="22402800" crc="0953ac0b" sha1="4dfabbdc2450886932ff625bd498d1fab02d441f"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 04).bin" size="26989200" crc="dab3ace3" sha1="19ff4c9b08ab54b46b90bd783aaebd9b672a3e22"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 05).bin" size="20638800" crc="3904ac43" sha1="e1874271dc63169f383daea1f9742b8573e2f6fb"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 06).bin" size="24872400" crc="5ceaf128" sha1="3393eaee62c216d26c69ceec80d061e6feff3af9"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 07).bin" size="19580400" crc="d323f48c" sha1="2eaca1d61f2d503dc4c06e447a1b879a7ab9ebe4"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 08).bin" size="19227600" crc="123ad2db" sha1="33b4daeb9a30299d7b7d4f991a15aae6d323197b"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 09).bin" size="22755600" crc="9c0a7174" sha1="7bdff7de4d55940287f25b1062e0b4bc2b3c5b76"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 10).bin" size="21697200" crc="9d2cb84f" sha1="87d9e5c426d23c640ea0d7ef1d4461ac12ecd531"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 11).bin" size="18522000" crc="612da7d6" sha1="1b9ee8c23ef2b7123151bdc8ee80c307f1544652"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 12).bin" size="1940400" crc="7b190c97" sha1="7e52842f565c6424eb1db68d7e5de993a3a83402"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 13).bin" size="1940400" crc="67044e09" sha1="b0f2ebe01afe7bd56e7f2c3be0296facd6e167bd"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 14).bin" size="16228800" crc="e3af24b8" sha1="46c708289972132d618fe3a73a7be9c02a34c728"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 15).bin" size="1764000" crc="3e07c223" sha1="4e9a4702f5b06dfbc4a1e5467264f709a9450dfa"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 16).bin" size="34574400" crc="c708ec54" sha1="af447bf1f4f4f0aefdbbf72adeb5032784e079e2"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan) (Track 17).bin" size="46216800" crc="626e9105" sha1="2d161f953d574e223319567e076bea237026d23a"/>
+ <rom name="Asuka 120% Excellent - Burning Fest. Excellent (Japan).cue" size="2515" crc="3b9c8eb9" sha1="a8fe7b8c32c0ea134a902275fd6bd0103606622e"/>
-->
<description>Asuka 120% Burning Fest. Excellent</description>
<year>1994</year>
@@ -2211,7 +2325,7 @@ User/save disks that can be created from the game itself are not included.
</part>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="asuka 120% burning fest. excellent" sha1="a93c4f091a1d74deaf556fb27c2800cd97cd52cf" />
+ <disk name="asuka 120% excellent - burning fest. excellent (japan)" sha1="8f355528fc46706bc856848665186115c2275fad" />
</diskarea>
</part>
</software>
@@ -2266,11 +2380,13 @@ User/save disks that can be created from the game itself are not included.
<software name="awesome">
<!--
- Origin: Neo Kobe Collection
- <rom name="Awesome.ccd" size="1518" crc="368cfa91" sha1="f6040aea82fcc6e635441b0140372df0b5a02512"/>
- <rom name="Awesome.cue" size="227" crc="333ef3ba" sha1="7984ef561ce74e8cbf4e0c97558438c295527c6d"/>
- <rom name="Awesome.img" size="269894352" crc="65c7f575" sha1="23ff43e26edc2cdd180bda3f032bf897424bd508"/>
- <rom name="Awesome.sub" size="11016096" crc="941de383" sha1="6787cbdb1c1522e345ff4c8719e7d28cfd30ca1b"/>
+ Origin: redump.org
+ <rom name="AWESOME (Japan) (Track 1).bin" size="20815200" crc="a9898a89" sha1="5978344a3632b743a166777a933a172021774d87"/>
+ <rom name="AWESOME (Japan) (Track 2).bin" size="71091552" crc="794dc54e" sha1="09bff26edd66ec601c617a7c61697251af942794"/>
+ <rom name="AWESOME (Japan) (Track 3).bin" size="50626800" crc="59128433" sha1="958580124afa3bca8c79a10c3be4d05328f5ffed"/>
+ <rom name="AWESOME (Japan) (Track 4).bin" size="67737600" crc="38e4bd68" sha1="3aff77d413b05d1719a35859e239188ba4527db7"/>
+ <rom name="AWESOME (Japan) (Track 5).bin" size="59623200" crc="d9963231" sha1="a43bf094ef0910efd75e36fff269d898d67ed0b9"/>
+ <rom name="AWESOME (Japan).cue" size="550" crc="884a24cd" sha1="944d1b44917b70ff30d8be29612abd58bf68af0f"/>
-->
<description>Awesome</description>
<year>1992</year>
@@ -2279,7 +2395,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="awesome" sha1="f758d24ebb1e94dfe1499b1af38c32fd1b9de8ff" />
+ <disk name="awesome (japan)" sha1="db185b5d510fe79ff750fec5438f63bc47064c88" />
</diskarea>
</part>
</software>
@@ -3152,11 +3268,10 @@ User/save disks that can be created from the game itself are not included.
<software name="classrod">
<!--
- Origin: Neo Kobe Collection
- <rom name="Classic Road.ccd" size="971" crc="9a647815" sha1="f6e9da3b7bc979c637031f9900f38e5e2b791461"/>
- <rom name="Classic Road.cue" size="136" crc="4a2ce6e5" sha1="f659d3cb7fd8c3c9b8f8463c2957b62696fbfbd9"/>
- <rom name="Classic Road.img" size="620478768" crc="39a1f9f3" sha1="d0383c8874f63b3678b6541e72504eb94aef7fc3"/>
- <rom name="Classic Road.sub" size="25325664" crc="6a0f4ce6" sha1="3f844f18cb0c0bbd62de125e8752101416865f2c"/>
+ Origin: redump.org
+ <rom name="Classic Road (Japan) (Track 1).bin" size="10231200" crc="51a7f673" sha1="5ee3a095e5122bb1e2bfc1a2ed5314b43f062d76"/>
+ <rom name="Classic Road (Japan) (Track 2).bin" size="610247568" crc="79e085df" sha1="f57be4c30ded736464be2afa273dc5cb05eae473"/>
+ <rom name="Classic Road (Japan).cue" size="233" crc="830bbd81" sha1="bf8dd0a3d41cdc3341ed8376cbc6436f19762c51"/>
-->
<description>Classic Road</description>
<year>1994</year>
@@ -3166,7 +3281,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="classic road" sha1="a4debada6767e53ec0edb0ee9128f8fe96a99a6c" />
+ <disk name="classic road (japan)" sha1="145861579700401c4229ccbeb64819d93031ae2e" />
</diskarea>
</part>
</software>
@@ -4967,11 +5082,9 @@ User/save disks that can be created from the game itself are not included.
<!-- Hangs while playing FMV -->
<software name="fractal" supported="no">
<!--
- Origin: Neo Kobe Collection
- <rom name="Fractal Engine Demo.ccd" size="751" crc="0dec1ac7" sha1="b0777df3b73b305181bcf3544104ebcb4dcd23d6"/>
- <rom name="Fractal Engine Demo.cue" size="101" crc="2886987e" sha1="426cf6d9ce12490767f5d5ae1d586c19d7a67d4a"/>
- <rom name="Fractal Engine Demo.img" size="63499296" crc="a1bd6185" sha1="dc3933801558881dd9eb2efd7c917602fc588be8"/>
- <rom name="Fractal Engine Demo.sub" size="2591808" crc="798b9b74" sha1="d20541b959e44fb545810912d35b849fa4ec4577"/>
+ Origin: redump.org
+ <rom name="Fractal Engine Demo (Japan).bin" size="63499296" crc="a1bd6185" sha1="dc3933801558881dd9eb2efd7c917602fc588be8"/>
+ <rom name="Fractal Engine Demo (Japan).cue" size="93" crc="c0ab0c2d" sha1="14c981837370afaad6517fa7df329fa98941deae"/>
-->
<description>Fractal Engine Demo</description>
<year>1992</year>
@@ -4980,7 +5093,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="fractal engine demo" sha1="97c2b8955b99b309a1f7bb6333eef3da0577d195" />
+ <disk name="fractal engine demo (japan)" sha1="73aa255b22250fc736da51104fcb81236041ffd5" />
</diskarea>
</part>
</software>
@@ -5484,6 +5597,26 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <software name="gedit">
+ <!--
+ Origin: redump.org
+ <rom name="GEdit Towns (Japan) (Track 1).bin" size="16934400" crc="04c73acc" sha1="074455449a3f5f2011465e66dc3ec6e3414f1868"/>
+ <rom name="GEdit Towns (Japan) (Track 2).bin" size="64386000" crc="b0925053" sha1="b362419cf41d35a1ed667f0658cf9a36eee8e389"/>
+ <rom name="GEdit Towns (Japan) (Track 3).bin" size="27342000" crc="1b656757" sha1="96e9eccf0de27177e082c02b3bbca9793786e03e"/>
+ <rom name="GEdit Towns (Japan) (Track 4).bin" size="4233600" crc="4580866a" sha1="aaefaba5020efb03452df764e2897d0f278e3151"/>
+ <rom name="GEdit Towns (Japan).cue" size="434" crc="7a28c0fe" sha1="ae1a99e75036010294b41831663971ea2b0f793a"/>
+ -->
+ <description>GEdit Towns</description>
+ <year>1989</year>
+ <publisher>データウエスト (Data West)</publisher>
+ <info name="release" value="198903xx" />
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="gedit towns (japan)" sha1="90051dc5334e32ae1ef19842b7c12bac3acca804" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="gekirin">
<!--
Origin: Neo Kobe Collection
@@ -6008,6 +6141,25 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <software name="hipcatch">
+ <!--
+ Origin: redump.org
+ <rom name="Kotoba Asobi - CDView HiP Catch (Japan).bin" size="30366672" crc="93db9d73" sha1="51477f819bc3a1a00b899f0cc7932d75a9b03de4"/>
+ <rom name="Kotoba Asobi - CDView HiP Catch (Japan).cue" size="128" crc="3a122540" sha1="fb2ced375cd9ad8263b960e8bc111e86c9b6fa22"/>
+ -->
+ <description>Kotoba Asobi - CDView HiP Catch</description>
+ <year>1992</year>
+ <publisher>CRC総合研究所 (CRC Sougou Kenkyuusho)</publisher>
+ <info name="alt_title" value="ことばあそび CDVIEW HiP CATCH" />
+ <info name="release" value="199203xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="kotoba asobi - cdview hip catch (japan)" sha1="1e0e0b7b053614d9c2a61e4fb35865fe2dd797e6" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="hiouden2">
<!--
Origin: redump.org
@@ -6106,13 +6258,34 @@ User/save disks that can be created from the game itself are not included.
<software name="hypraddr">
<!--
- Origin: Neo Kobe Collection
- <rom name="Hyper Address.ccd" size="768" crc="415cdfce" sha1="a1e4c361209bb6bd0fcb134a5731f32fd3e17137"/>
- <rom name="Hyper Address.cue" size="77" crc="bc672221" sha1="84270de39f851dde1ae65a4127565d0a3bf9575d"/>
- <rom name="Hyper Address.img" size="31756704" crc="d560d57d" sha1="fe9c76dc153ca0aea46a2ef889a128844098d0b2"/>
- <rom name="Hyper Address.sub" size="1296192" crc="8ef63197" sha1="9f95d88bd449cf9eeabae90aef00175cc9f6be5b"/>
+ Origin: redump.org / wiggy2k
+ <rom name="Hyper Address (Japan) (Rev A).bin" size="26114256" crc="8b6f9908" sha1="aa6a05bce2576b94ca37ea6fed31f189afe07eb0"/>
+ <rom name="Hyper Address (Japan) (Rev A).cue" size="95" crc="3f4addbf" sha1="c50ea5fd0342020a7f61dc43693c3309f85e372b"/>
+ -->
+ <description>Hyper Address (HMB-106A)</description>
+ <year>1990</year>
+ <publisher>ダットジャパン (Datt Japan)</publisher>
+ <info name="release" value="199006xx" />
+ <part name="flop1" interface="floppy_3_5">
+ <feature name="part_id" value="System Disk" />
+ <dataarea name="flop" size="1261568">
+ <rom name="hyper address (japan) (rev a) (system disk).hdm" size="1261568" crc="78e49f11" sha1="4f628a06f80ccd049a0da22998475d4e263b6dd1" offset="000000" />
+ </dataarea>
+ </part>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="hyper address (japan) (rev a)" sha1="738b25e42d02d5a6c3683d486419c918a633f555" />
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="hypraddro" cloneof="hypraddr">
+ <!--
+ Origin: redump.org (CD) / Neo Kobe Collection (floppy)
+ <rom name="Hyper Address (Japan).bin" size="31756704" crc="0d4d8903" sha1="baf4acbe31828ca38f75327f658ffa7aa5a39bd7"/>
+ <rom name="Hyper Address (Japan).cue" size="87" crc="edd2111d" sha1="20c704dfcf69cc6605456f55189b185d25ec5a59"/>
-->
- <description>Hyper Address</description>
+ <description>Hyper Address (HMB-106)</description>
<year>1990</year>
<publisher>ダットジャパン (Datt Japan)</publisher>
<info name="release" value="199003xx" />
@@ -6124,7 +6297,7 @@ User/save disks that can be created from the game itself are not included.
</part>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="hyper address" sha1="0b71c0bea2d66cf60f6c37cabc9284be794ff5cb" />
+ <disk name="hyper address (japan)" sha1="fe6f863d9e854ba822d5bd34f0faa4330248e977" />
</diskarea>
</part>
</software>
@@ -6486,9 +6659,10 @@ User/save disks that can be created from the game itself are not included.
<software name="infest">
<!--
- Origin: Neo Kobe Collection
- <rom name="Infestation.bin" size="381826032" crc="47a91fb4" sha1="f6217f804e32b399daabaafb3d05fe0f7d8690a3"/>
- <rom name="Infestation.cue" size="133" crc="eadc045d" sha1="ba7fd71706c190b4e2dfd5751f56ff54d2b2158e"/>
+ Origin: redump.org
+ <rom name="Infestation - Chinmoku no Wakusei (Japan) (En,Ja,Fr,De) (Track 1).bin" size="20815200" crc="03073950" sha1="eadff9ff2a067eea407365135ac4fd9f74d03b52"/>
+ <rom name="Infestation - Chinmoku no Wakusei (Japan) (En,Ja,Fr,De) (Track 2).bin" size="361363632" crc="94853611" sha1="7cd7d63e60b1bacb4d1e79b4b4d0e1e3c8037a23"/>
+ <rom name="Infestation - Chinmoku no Wakusei (Japan) (En,Ja,Fr,De).cue" size="303" crc="ab4a1ec0" sha1="17c0a428b3c4606abeed959b9d4cddf0a9c024dd"/>
-->
<description>Infestation - Chinmoku no Wakusei</description>
<year>1992</year>
@@ -6498,7 +6672,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="infestation" sha1="08cb569b0227db10f938adc42c92987634714787" />
+ <disk name="infestation - chinmoku no wakusei (japan) (en,ja,fr,de)" sha1="a7ac12be57d8a70b5789ac7c8c2fbb899c58a900" />
</diskarea>
</part>
</software>
@@ -6838,6 +7012,29 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <software name="knjland3">
+ <!--
+ Origin: redump.org
+ <rom name="Kanji Land 3-nen (Japan) (Track 1).bin" size="32539920" crc="c8b3bd9a" sha1="22735456fc350697845450cd95c63a3119c939bd"/>
+ <rom name="Kanji Land 3-nen (Japan) (Track 2).bin" size="19488672" crc="6290a60f" sha1="6cb0f3e4679ac4bed0df6bad19cbc55e4c20125b"/>
+ <rom name="Kanji Land 3-nen (Japan) (Track 3).bin" size="32544624" crc="9e0b3bbe" sha1="b11572cc05568e5c5800f43f4f1d46f901d8ebd2"/>
+ <rom name="Kanji Land 3-nen (Japan) (Track 4).bin" size="34661424" crc="7917756f" sha1="b039d7a236e92084995a9cea64c63dae7375e9e9"/>
+ <rom name="Kanji Land 3-nen (Japan) (Track 5).bin" size="40306224" crc="ef038840" sha1="1fd7250bff7578f0e39a12efe13c5fd7525195b6"/>
+ <rom name="Kanji Land 3-nen (Japan).cue" size="595" crc="ade9085c" sha1="3a32a76c1568b8c2efed6006d28019c1db0aff83"/>
+ -->
+ <description>Kanji Land 3-nen</description>
+ <year>1995</year>
+ <publisher>富士通大分ソフトウェアラボラトリ (Fujitsu Ooita Software Laboratory)</publisher>
+ <info name="alt_title" value="漢字ランド3年" />
+ <info name="release" value="199507xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="kanji land 3-nen (japan)" sha1="fb7b3684231bde65a285fe528b6c42f0be6f74cd" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="kidpix">
<!--
Origin: Neo Kobe Collection
@@ -7834,17 +8031,13 @@ User/save disks that can be created from the game itself are not included.
<rom name="Loom (Japan) (Track 19).bin" size="14970480" crc="48ba2192" sha1="34c1800b0c1d5c6f33996544010ec76ae9a06ca8"/>
<rom name="Loom (Japan).cue" size="2015" crc="00ee6c49" sha1="36df09dded74850620e99497259a1e0bb24e72c2"/>
- <rom name="Loom (drama CD).mdf" size="794070000" crc="6d4cb799" sha1="7676b05cf5b40f6a81f8f3d74f21e92c6dfb7542"/>
- <rom name="Loom (drama CD).mds" size="940" crc="88707209" sha1="1c97bf1915b248ceb04ac402440e8206fabbecc2"/>
-
- *after conversion with IsoBuster+EAC *
- <rom name="loom (drama cd).cue" size="1025" crc="d0e0d556" sha1="d4d9573774d4a6d86f724e9319b8b21f72c25e4c"/>
- <rom name="track01.bin" size="327751200" crc="944097be" sha1="5ab6a2236eaa08abebc9628bb827df44aad0a45b"/>
- <rom name="track02.bin" size="311346000" crc="1cec18d7" sha1="6e8a5af93d579575014bab1265515f69d88bae65"/>
- <rom name="track03.bin" size="66150000" crc="3f4d0cef" sha1="b6fcfbf8c6da41bd9b08dc2eecca08bff596be29"/>
- <rom name="track04.bin" size="15170400" crc="77539000" sha1="cdf8baf28a80c9f735f33a305f0562392d4f59d1"/>
- <rom name="track05.bin" size="26283600" crc="b7806fc7" sha1="d32e0baf4612b10cc69f44031832e693e573d9e8"/>
- <rom name="track06.bin" size="16228800" crc="99c3d6dd" sha1="dcbcf85951809dd6209730f272460180899268a0"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom) (Track 1).bin" size="327751200" crc="3aeaf878" sha1="568943bfb7afae0db9f6d8846ac9f6b450fed681"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom) (Track 2).bin" size="311346000" crc="642c608a" sha1="0431179ff3ccfdf602b01a4e1895558598ba5402"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom) (Track 3).bin" size="66150000" crc="4044a075" sha1="e2aa1682a945bf07586acc0fa2c49c4dcadbfe2f"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom) (Track 4).bin" size="15170400" crc="f21b0d9f" sha1="3967583d8e23b1daf9eb0747466a598fd05056c5"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom) (Track 5).bin" size="26283600" crc="156c382d" sha1="33dd754f82c0aa1e2bd6fdeb9e1adfcffad84099"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom) (Track 6).bin" size="16228800" crc="095d53b6" sha1="245a136b840213e3d9ae263ba34d7f4fc8a44fc7"/>
+ <rom name="Loom (Japan) (Audio Drama) (Bundled with [FMT] Loom).cue" size="853" crc="2da64fd2" sha1="f2ab505efc150a23a8c29750d9da3c6616cd39ab"/>
-->
<description>Loom</description>
<year>1991</year>
@@ -7857,9 +8050,9 @@ User/save disks that can be created from the game itself are not included.
</diskarea>
</part>
<part name="cdrom2" interface="fmt_cdrom">
- <feature name="part_id" value="Drama CD"/>
+ <feature name="part_id" value="Audio Drama"/>
<diskarea name="cdrom">
- <disk name="loom (drama cd)" sha1="7c1351a2159f02f507823748542471be722dd1d0" />
+ <disk name="loom (japan) (audio drama) (bundled with [fmt] loom)" sha1="d6dfdd3a00b5b142f50c6bb34f7256a0a7d0ac1f" />
</diskarea>
</part>
</software>
@@ -7885,6 +8078,26 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <!-- Both the English and Japanese titles are shown in-game -->
+ <software name="lotr1">
+ <!--
+ Origin: redump.org
+ <rom name="Yubiwa Monogatari Daiikkan - Tabi no Nakama (Japan).bin" size="10231200" crc="973e1fc0" sha1="ed71052858e5e8e38567081430698c9dd7babdf2"/>
+ <rom name="Yubiwa Monogatari Daiikkan - Tabi no Nakama (Japan).cue" size="117" crc="859a3181" sha1="11553dd1d72ced95a53715eca63151e6762ba366"/>
+ -->
+ <description>Lord of the Rings, Vol. I</description>
+ <year>1992</year>
+ <publisher>スタークラフト (Starcraft)</publisher>
+ <info name="alt_title" value="指輪物語 第一巻 旅の仲間" />
+ <info name="release" value="199203xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="yubiwa monogatari daiikkan - tabi no nakama (japan)" sha1="aaada053bea0fc73bf5fde6ab32c786b168d0da4" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="lotr2">
<!--
Origin: Tokugawa Corporate Forums (DamienD)
@@ -8394,6 +8607,7 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <!-- Comes with an empty formatted 2HD floppy -->
<software name="mflcan2">
<!--
Origin: Neo Kobe Collection
@@ -8402,7 +8616,7 @@ User/save disks that can be created from the game itself are not included.
<rom name="My Fair Lady CAN II - Elementary.img" size="595378224" crc="6a1d3222" sha1="8c4a883fe787620a4673c9b53ed59de870c60e60"/>
<rom name="My Fair Lady CAN II - Elementary.sub" size="24301152" crc="e9d48db2" sha1="cbc2b3d81aad1dd0d498df91230f139daafb4a38"/>
-->
- <description>My Fair Lady CAN II - Elementary</description>
+ <description>My Fair Lady CAN II. Elementary</description>
<year>1990</year>
<publisher>CRI</publisher>
<info name="release" value="199009xx" />
@@ -8414,6 +8628,64 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <!-- Comes with an empty formatted 2HD floppy -->
+ <software name="mflcan3">
+ <!--
+ Origin: redump.org
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 01).bin" size="52567200" crc="c6daacea" sha1="e5178bef5f5d9a10aff938df2c8f0535e0145d22"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 02).bin" size="15113952" crc="47a4f5e1" sha1="0a4f25694c9471a49f9ce35d624ed88cc71a3627"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 03).bin" size="6409200" crc="ebfce585" sha1="041a5c5d7955d02693c7ddabddee2c66b6f5d72c"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 04).bin" size="12289200" crc="f13777ce" sha1="67450764f122ea2c52cb5bce343089d1ac86ce61"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 05).bin" size="17640000" crc="66ce4902" sha1="d0e1ed5812105f861c555e0ce86266bd543db0d8"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 06).bin" size="11247264" crc="a5141012" sha1="6b59a7409553f9a48206cd1998cdd19761809286"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 07).bin" size="14812896" crc="fd6ec178" sha1="a28f019f28dd217d943e724a302450e84667273b"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 08).bin" size="6437424" crc="2d68e14b" sha1="ab355289129becf372cb7917daabaf73719b29bd"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 09).bin" size="20481216" crc="a2263f5f" sha1="9ba1a0f510ce02cace88c35919330b2f17d9e1f1"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 10).bin" size="17480064" crc="5da54671" sha1="ac8bad76cd731236074b3553ac1f391a203d08d1"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 11).bin" size="14888160" crc="cee0970c" sha1="c977470d8ffce3a7931253a415cf1f74bb79b4f7"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 12).bin" size="14805840" crc="2dfb17cc" sha1="63e76f68dd740ed29fe6fee51ec489d091bd6d47"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 13).bin" size="6404496" crc="f3cfb928" sha1="2f82e99daccfe1fe1aa478f712ca753b7e55cc76"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 14).bin" size="19956720" crc="9bfb9e65" sha1="e9bff7d885ac2abbed9e929491dff71f9ade86bb"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 15).bin" size="16734480" crc="9ecfaa8c" sha1="c943b51ea8bb4bbdb26d10fe247048c28e5e261f"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 16).bin" size="12112800" crc="5ab9bd79" sha1="f4613801feaa70249946e9163e3ca7611505dfbb"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 17).bin" size="20897520" crc="8ccfd6f0" sha1="97cf46261ed8cb187e205af05d1968f356dae9cc"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 18).bin" size="20220144" crc="f745ec9c" sha1="243f8e2173a74ff96383da535de47c23eef3a9eb"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 19).bin" size="16318176" crc="056e365d" sha1="efc4c06c28cdf72870a15496ea298dca8f4742c0"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 20).bin" size="5132064" crc="24f3799a" sha1="9730c76aa8467ba63023bc22b42b89576217bb26"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 21).bin" size="5757696" crc="6436d777" sha1="50ebe299cd80ea9313c9020d9f3e0d374522775b"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 22).bin" size="5731824" crc="bd2b6902" sha1="111535176212f046a92f5bc9ca5bec9c91b5b7af"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 23).bin" size="14366016" crc="3dde8872" sha1="aab4eadb8c2265c0031b7b6a51595f2520c8ad11"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 24).bin" size="19079424" crc="28c70fb0" sha1="295a9bf093e599c92cba05c4eede74bfbeadd248"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 25).bin" size="12402096" crc="c9fad183" sha1="84c98bf39302da480f3487a77d5bdfacedb4ebb8"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 26).bin" size="27511344" crc="b977ec2a" sha1="4fc5a4d5a2c97719e09e65e19ae8b9c7c4d5f962"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 27).bin" size="5769456" crc="08ba7b98" sha1="640662374fd192cc3cd360d589f2dee527a64db7"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 28).bin" size="15175104" crc="51f965d2" sha1="7761265faf0963682142bbf0f0e205b3aad5735a"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 29).bin" size="16405200" crc="84565cc0" sha1="073ea496311218bf050e07f379f341b679d55236"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 30).bin" size="20198976" crc="ddbfc8ba" sha1="68a180ff5be74602dca295d08aa58a322102fb3f"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 31).bin" size="16228800" crc="c0c6fa1e" sha1="1dd5d3d15fe5bf973a706ba2cecde2a7593436db"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 32).bin" size="5614224" crc="7f865e49" sha1="25f460bb549ce3a7d2e6adaa3322002b37f7edc8"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 33).bin" size="17670576" crc="1388d6df" sha1="9f709ce8de90f6b9afac090dc05039d9e65b8246"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 34).bin" size="14445984" crc="692e3cde" sha1="7a2751c5d263d1476742c01f3e789ed4ecac0833"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 35).bin" size="13547520" crc="6d4b3666" sha1="1fe0a3ac16207088eb520ad432cabc94dd8d082f"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 36).bin" size="18098640" crc="f0e03f31" sha1="6bbfa4ab9cf7da3cda3a7d0b9e066f085120ef6a"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 37).bin" size="18345600" crc="8b319b91" sha1="0250cff764d64b1bef7c18ad12979e30efeb1e08"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 38).bin" size="17588256" crc="b9f5a7a2" sha1="81f02ed88d64b308fcb90cf6f01f939b79e07810"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 39).bin" size="4591104" crc="fd4f295f" sha1="27f8338b7c4fca5e019f484e1828e2e8d99856f7"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan) (Track 40).bin" size="5315520" crc="386a7c36" sha1="c876f7b9d2578c087f4fb0345551f90671593355"/>
+ <rom name="My Fair Lady CAN III. Intermediate (Japan).cue" size="5485" crc="99b02c90" sha1="d64e203dce7d93a7e08e6f03871e4b1a6cc74ab9"/>
+ -->
+ <description>My Fair Lady CAN III. Intermediate</description>
+ <year>1990</year>
+ <publisher>CRI</publisher>
+ <info name="release" value="199012xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="my fair lady can iii. intermediate (japan)" sha1="eacdc75dad22a3308268fb022a6091c67fc90fd1" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="mugenhoy">
<!--
Origin: Neo Kobe Collection
@@ -9376,6 +9648,25 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <!-- Wrong colors and other graphical glitches -->
+ <software name="niko2" supported="partial">
+ <!--
+ Origin: redump.org
+ <rom name="Niko^2 (Japan).bin" size="10231200" crc="a0d255b9" sha1="16924ba91862c909730502cadec7eefb94150521"/>
+ <rom name="Niko^2 (Japan).cue" size="103" crc="aac5b719" sha1="d5513b136676e058f36c0f0f127fa4e714939158"/>
+ -->
+ <description>Niko²</description>
+ <year>1991</year>
+ <publisher>ウルフチーム (WolfTeam)</publisher>
+ <info name="alt_title" value="ニコニコ" />
+ <info name="release" value="199111xx" />
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="niko^2 (japan)" sha1="82106b3d352af85253c5a3c09d9bdd74579cbb96" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="ningytsu">
<!--
Origin: Neo Kobe Collection
@@ -9671,9 +9962,35 @@ User/save disks that can be created from the game itself are not included.
<software name="oshacoo2">
<!--
- Origin: P2P
- <rom name="Image.cue" size="1160" crc="885a0d6d" sha1="77a34d0a15c9361a934ace3dec67f651777d6a2c"/>
- <rom name="Image.img" size="361137840" crc="1bef4781" sha1="3de4e86c6f63e3c7c2bacda7982277059def3536"/>
+ Origin: redump.org
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 01).bin" size="158407200" crc="56506a80" sha1="a2358cc09ca3e98919fee2cb7265d3d4966cc7f7"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 02).bin" size="1317120" crc="38b5aecc" sha1="918215a2606d0125d613aa34df2a74f2ec1f1179"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 03).bin" size="1458240" crc="e8c50e2a" sha1="c2d8329f25a7d60d66497bc91e27a2b5c5688f20"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 04).bin" size="1439424" crc="407050bf" sha1="2db770e132fb88f1fe1f88d9f39dc9f83b520f9f"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 05).bin" size="1493520" crc="5f8f723c" sha1="c622a4351de1bc1d463045b29a3a4421204de372"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 06).bin" size="1324176" crc="879251ad" sha1="c920e9770c150925590dee4c99080ad8c7d664ac"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 07).bin" size="1528800" crc="89cc32a3" sha1="32bd53640095d7bddefe0b51297aa1c47f7fe225"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 08).bin" size="1321824" crc="ed8f6763" sha1="a6cebb697af29a5729fc51c524834f11e5de784b"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 09).bin" size="1359456" crc="aa116fc7" sha1="e11d42dc673eeb1f966c297caefbe61c52c3b5be"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 10).bin" size="1321824" crc="5ae57413" sha1="337d51efff420954a6d5150ba5eceaaeb11f8cb1"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 11).bin" size="1246560" crc="b53e144a" sha1="5f3b4d4796a2d416c17d1cf5b195f38a2ea2d4a5"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 12).bin" size="1324176" crc="7b54d0a2" sha1="5dd87aec4e7fa0484476de0eac50b09ed9d151de"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 13).bin" size="2544864" crc="7f66f2a2" sha1="cc658f8ef38ec0c86a44c152d450047061bfe9f6"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 14).bin" size="3135216" crc="52c2b947" sha1="cfd07432b105e05ab6185c7caa0ed0dd40f31c08"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 15).bin" size="1321824" crc="47a60fae" sha1="1d4c3e434133e31379a423d1df313eba3b2ebd5b"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 16).bin" size="1382976" crc="e959a53d" sha1="8574b418d6523d0e2471929c5973bee60d02f9dc"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 17).bin" size="1375920" crc="cc01e872" sha1="af129af9c7619c911f9aaeec1bb1adc0700f1532"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 18).bin" size="2133264" crc="19b1fe20" sha1="0e128560f4027f66acf8ba105dd9c46815b2ace4"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 19).bin" size="1324176" crc="e6b41dcb" sha1="5c1b513cf90ce9094d4b0716b8ee5705774535e8"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 20).bin" size="20702304" crc="457aa480" sha1="16a4a86bfd7ea1f7387a39f291dd42b7a0dad849"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 21).bin" size="24778320" crc="593d5490" sha1="b5df6890facb9393348bf079a25579776266df48"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 22).bin" size="39967536" crc="127a1096" sha1="a3bad526ab9476105a45446592c8bed5721f4903"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 23).bin" size="1321824" crc="b7527bea" sha1="dd1e99a6025ea279a5150630a7ec585c772434f3"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 24).bin" size="20728176" crc="7a77a8c6" sha1="97cea10b233486908b5bbb55dfce56a2f585c9fb"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 25).bin" size="24759504" crc="7189819e" sha1="5802a019dedbc3df981dadb8ec44f026c4b2d754"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 26).bin" size="39972240" crc="bda98670" sha1="7a6e1c0929ac0ad12b8936d1d67d1538edb24172"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B) (Track 27).bin" size="2147376" crc="9d42708c" sha1="a76deae6c221f0cf06021b2f24df80e11f44ecff"/>
+ <rom name="Oshare Cooking II (Japan) (Rev B).cue" size="3438" crc="fdb6c2f1" sha1="46715bb0cd9ae286eff41f178060605ad1ad36bb"/>
-->
<description>Oshare Cooking II</description>
<year>1990</year>
@@ -9683,7 +10000,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="oshacoo2" sha1="dfcd058c69ec2a8cd1a29978b0f1cc772a1fe51c" />
+ <disk name="oshare cooking ii (japan) (rev b)" sha1="ad1e509e83555903f6ef3d407fb30a02429eb015" />
</diskarea>
</part>
</software>
@@ -11023,9 +11340,29 @@ User/save disks that can be created from the game itself are not included.
<!-- Missing a floppy disk -->
<software name="sangoku3" supported="no">
<!--
- Origin: P2P
- <rom name="三国志III.cue" size="1286" crc="9f5389d1" sha1="61f888904698ec3a83f66b109c91420d0d1f1e93"/>
- <rom name="三国志III.img" size="478163952" crc="aec21c99" sha1="4716da4da9535036db3858cb27e84c5da07666f8"/>
+ Origin: redump.org
+ <rom name="Sangokushi III with Soundware (Japan) (Track 01).bin" size="10231200" crc="93bd86e2" sha1="0a2bb053b57e7381f312776c5a063f7a58edd6aa"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 02).bin" size="41162352" crc="62ae034c" sha1="cf210158c4e5c24b2f36791e6b1c8e786f5c743d"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 03).bin" size="17797584" crc="74189257" sha1="757561a46e79309f198fa1f520671fdf33ffad39"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 04).bin" size="28906080" crc="c78abfd5" sha1="8acee597ff09111c823724e742a71bab0710d010"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 05).bin" size="3763200" crc="cc2c7617" sha1="ba84c62945325e2660c0b3a1eb635ee6ab94a2c6"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 06).bin" size="27374928" crc="06e3f76f" sha1="6a6e531aaabce77f05521e8554a38a87456e3d50"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 07).bin" size="2902368" crc="e2d459f2" sha1="57fe959b39baadb4c22a6640f5034b3b86eea5fb"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 08).bin" size="30063264" crc="1a02aa6a" sha1="cfc46bd6954afa409e6edd0dc596a030a17e9cd0"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 09).bin" size="20069616" crc="db532c5a" sha1="a35f7488741bcaf8df9480ae3373a9b269169806"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 10).bin" size="25469808" crc="bc3bfbe4" sha1="dbd34e535dd43c68b1a6e4c972a4df26459610a8"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 11).bin" size="16125312" crc="1ba3afc6" sha1="e393dc12bc719e9399ccb729f4c18c692af1af79"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 12).bin" size="2904720" crc="d68025e0" sha1="095a670604d1556086fb292012531d36cfd6ebfe"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 13).bin" size="25236960" crc="88985613" sha1="5ff056cbdc8eddc8dc9c5f760d6d0d31b7732b6e"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 14).bin" size="20109600" crc="2ea375e9" sha1="11c140d1b656811c47ebe119c70cd0efd8f4c84c"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 15).bin" size="35524608" crc="34969a57" sha1="89802b9f53a8da168bec7cfca267846fdfdf8a12"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 16).bin" size="32389392" crc="8bc5279c" sha1="d5617be6ca865a29cb5f5c29e9feb0611ef746d9"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 17).bin" size="21908880" crc="b5b28c60" sha1="2f2934bf76c23254232df83d43831063291d42c2"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 18).bin" size="33062064" crc="132ce88b" sha1="f81b6078ee643f1d04c87ea244f967a0d57663e6"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 19).bin" size="22621536" crc="9e3866dc" sha1="1c48d69a0b9718226c0d89af55e2aae7d79e3197"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 20).bin" size="45468864" crc="61642b1b" sha1="7845ab5129d1bf52fc73133341bb1a35a78c3222"/>
+ <rom name="Sangokushi III with Soundware (Japan) (Track 21).bin" size="15071616" crc="eae06d77" sha1="971452d949ca45f4b57508ffde83b34fa9f284f6"/>
+ <rom name="Sangokushi III with Soundware (Japan).cue" size="2708" crc="63258013" sha1="3ea0a9e1c59f52b8db57f4d26dc1b6f441080c1a"/>
-->
<description>Sangokushi III</description>
<year>1992</year>
@@ -11034,7 +11371,7 @@ User/save disks that can be created from the game itself are not included.
<info name="release" value="199206xx" />
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="sangoku3" sha1="613793fb3915b6a3b2b2634584604bd50a9151d8" />
+ <disk name="sangokushi iii with soundware (japan)" sha1="a9110f89450f9504435b53bb923ac1829bbcf4ee" />
</diskarea>
</part>
</software>
@@ -11288,10 +11625,9 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
- <!-- Missing a floppy disk -->
- <software name="shamhat" supported="no">
+ <software name="shamhat">
<!--
- Origin: redump.org
+ Origin: redump.org / wiggy2k
<rom name="Shamhat - The Holy Circlet (Japan) (Track 1).bin" size="260484000" crc="5c856e63" sha1="2751566dd6bb590dfb4c67e5e54d5c9535233d80"/>
<rom name="Shamhat - The Holy Circlet (Japan) (Track 2).bin" size="5997600" crc="97dfe1ae" sha1="1d9d1ff4e3ee96c9b14caa867d58fe7f58a693d4"/>
<rom name="Shamhat - The Holy Circlet (Japan) (Track 3).bin" size="54695760" crc="95e66371" sha1="ae10a3f5ce8fdc8a841aaaea5936dff6e576a2b1"/>
@@ -11302,6 +11638,13 @@ User/save disks that can be created from the game itself are not included.
<publisher>データウエスト (Data West)</publisher>
<info name="alt_title" value="シャムハト -The Holy Circlet-" />
<info name="release" value="199304xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="flop1" interface="floppy_3_5">
+ <feature name="part_id" value="User Disk" />
+ <dataarea name="flop" size="1261568">
+ <rom name="shamhat - the holy circlet (user disk).hdm" size="1261568" crc="77ae1f06" sha1="b95dae61c620f289d30378774afbd069658ef935" offset="000000" />
+ </dataarea>
+ </part>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
<disk name="shamhat - the holy circlet (japan)" sha1="538a5f793c970a3ad9732c9e30f75b5b68b7b8f0" />
@@ -11707,11 +12050,14 @@ User/save disks that can be created from the game itself are not included.
<software name="sotsu93">
<!--
- Origin: Neo Kobe Collection
- <rom name="Sotsugyou &apos;93 - Graduation.ccd" size="1789" crc="979458af" sha1="db28d20c8c4d6535b0b72389fdb856306fb81442"/>
- <rom name="Sotsugyou &apos;93 - Graduation.cue" size="390" crc="5d7136ca" sha1="64d8771c59638859622bd03173080d833f271dfa"/>
- <rom name="Sotsugyou &apos;93 - Graduation.img" size="153044640" crc="15b362eb" sha1="3390ca78f2dbadfd353081f41977b35d84fb7647"/>
- <rom name="Sotsugyou &apos;93 - Graduation.sub" size="6246720" crc="3370d136" sha1="e06d6c05ab7a830015e147c6f0d3200ae4434988"/>
+ Origin: redump.org (CD) / Neo Kobe Collection (floppy)
+ <rom name="Sotsugyou - Graduation '93 (Japan) (Track 1).bin" size="52096800" crc="73b4018d" sha1="aa62c7201c0db446b422a4feb8254e2cf94a0b8c"/>
+ <rom name="Sotsugyou - Graduation '93 (Japan) (Track 2).bin" size="15911280" crc="1c5522e6" sha1="d00c3e8f452d9d74905e70f52f5df4941a8eba62"/>
+ <rom name="Sotsugyou - Graduation '93 (Japan) (Track 3).bin" size="19862640" crc="d96e6a14" sha1="7d5e8a4f69412aec7c3f44e8b09b7bae1fa4807b"/>
+ <rom name="Sotsugyou - Graduation '93 (Japan) (Track 4).bin" size="20109600" crc="5528acc1" sha1="ba552cd1132aa3b22165eb812c9e5fb072626d92"/>
+ <rom name="Sotsugyou - Graduation '93 (Japan) (Track 5).bin" size="22332240" crc="e1aebea2" sha1="16c683d2bfcb4265831319851289d9151cc3f625"/>
+ <rom name="Sotsugyou - Graduation '93 (Japan) (Track 6).bin" size="22732080" crc="8033b256" sha1="1f16276b5300d742d08587115438abeebd059176"/>
+ <rom name="Sotsugyou - Graduation '93 (Japan).cue" size="750" crc="c0dc75ed" sha1="9c87ac086174989f21160cab712719c34c358571"/>
-->
<description>Sotsugyou '93 - Graduation</description>
<year>1993</year>
@@ -11727,7 +12073,7 @@ User/save disks that can be created from the game itself are not included.
</part>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="sotsugyou '93 - graduation" sha1="56c0e748abe85ca09a947821011bb304174119c0" />
+ <disk name="sotsugyou - graduation '93 (japan)" sha1="8f6e2ac310b5c6a7166e8a464b88e98d97e3b932" />
</diskarea>
</part>
</software>
@@ -11877,23 +12223,128 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
- <software name="softcon2">
+ <software name="softcon1">
+ <!--
+ Origin: redump.org
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 01).bin" size="158407200" crc="cffc9f33" sha1="3cbf56185790a7c2099d177c6229933b52a55294"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 02).bin" size="52096800" crc="99505790" sha1="8b8cbf7bdbcddf70472a67a8df9bf6c961f841fb"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 03).bin" size="10953264" crc="8306ac2b" sha1="ba07070f24066f69b2d326e9be12aaa823d3377d"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 04).bin" size="7945056" crc="a6b989ca" sha1="133eb16ae0eedab2eb756bac48f79ff2a2c7a03e"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 05).bin" size="882000" crc="8d0ca981" sha1="503d5484b3f97872a965515bc9e6fe3a7c0e76b1"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 06).bin" size="2116800" crc="ae404fc5" sha1="65131d997602b622ab3bb5116be610e41e2bf3e2"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 07).bin" size="882000" crc="3a633a48" sha1="3b50d098ccc8f7e6977d127bd66d584590dcbe13"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 08).bin" size="2646000" crc="8ebb1877" sha1="c3c70aca85d0416b21da5f8cd31c40e08b74bef0"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 09).bin" size="882000" crc="3b09a08b" sha1="4051fee6e5d6843a3e4efb924cea166b117498a9"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 10).bin" size="2822400" crc="f269fac1" sha1="35b92d25917264319dff4ccec389c33c2afd146b"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 11).bin" size="882000" crc="d05f682e" sha1="77cb51c257000136f46c192ef52640522593754a"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 12).bin" size="882000" crc="b7a04b8f" sha1="bcbad79dc54e7bb1e211df9e9dcc915c6425d1ae"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 13).bin" size="47185824" crc="a2dba4ff" sha1="1a9c09b17b8fcd50acc0b84cab8ce5799d81eef1"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 14).bin" size="31382736" crc="c44be0ed" sha1="cf1c49e500e5e9b807cc81f6fcaa8b4d3922a3b7"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 15).bin" size="28623840" crc="192aa249" sha1="24b88f8ffc06380238beaf1b0c0c15a03d34c8a1"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 16).bin" size="41124720" crc="7bd0a2d1" sha1="59742e48b0b12662e340634948f913b84fd9ae15"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 17).bin" size="47040000" crc="6b74b02a" sha1="a5c5a9c3e32da3e78f8bf88adfa397b2cb6a2c35"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 18).bin" size="882000" crc="8f2dd182" sha1="f3bc5a36aeaa5d2e76c181dce1eed74328992333"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 19).bin" size="44405760" crc="b01718de" sha1="1d663f73690c373744aa02a7844b7a5032b5262c"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 20).bin" size="882000" crc="c36ab884" sha1="11f77c839646094460c845da5ecb14958ad6fd44"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 21).bin" size="26942160" crc="0559d320" sha1="e77f655fd82068aba0c4521b07b93e3a29428848"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B) (Track 22).bin" size="43869504" crc="8e3a3ee2" sha1="52dafb0c343d310258c41f563f891e5abbdc3765"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Rev B).cue" size="2800" crc="9b8ed5be" sha1="33be02cbcf8fd86796943066bce297140eb3cdd4"/>
+ -->
+ <description>Software Contest Nyuusen Sakuhinshuu 1 (HMC-139B)</description>
+ <year>1992</year>
+ <publisher>富士通 (Fujitsu)</publisher>
+ <info name="alt_title" value="ソフトウェアコンテスト入選作品集 1" />
+ <info name="release" value="199201xx" />
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="software contest nyuusen sakuhinshuu 1 (japan) (rev b)" sha1="4e5708ecfc046ea191e8b946fa2727b2fe5f8444" />
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="softcon1o">
<!--
- Origin: P2P
- <rom name="Image.cdm" size="2798" crc="3a49663d" sha1="91a5dda191bbffe8d05397ebea8ea8044fe5b599"/>
- <rom name="Image.cue" size="504" crc="0967077e" sha1="7bbf695474254fbf7f5e14c7cc801acb4c2702f4"/>
- <rom name="Image.img" size="593769456" crc="47dd4200" sha1="620db81b1c3e263fa9eb72afb4a92dbd0f6ea952"/>
- <rom name="Image.sub" size="24235488" crc="95400d7e" sha1="4b7a4198f4e776442c529acacb7e100f1d466bdb"/>
+ Origin: redump.org
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 01).bin" size="158407200" crc="5202f0f6" sha1="e6f9020516cd3c925819f672ff95dd43a9b50cd7"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 02).bin" size="52096800" crc="0608f885" sha1="3c442a788f4a26b9864b6df2f2ee2381b03053ab"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 03).bin" size="10953264" crc="e2c26bb2" sha1="240a6ba42b29003192d5fc9dfb4e06a020e6e14b"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 04).bin" size="7945056" crc="c5688e22" sha1="7491d5770a97e0513b59db1a6c6ad374f54e989a"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 05).bin" size="882000" crc="a2db5438" sha1="318fef7457e08561d287e14a42bd8ab38f2abe7b"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 06).bin" size="2116800" crc="5a0250b2" sha1="d44233b7e0c8ef13365ed44977b7401ffe11225f"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 07).bin" size="882000" crc="f3ec41c2" sha1="b25d856d357e010991246bc9fcf32afbee853471"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 08).bin" size="2646000" crc="8efc8793" sha1="2fd66d0884a14b83f47705787b181eddb1ef015b"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 09).bin" size="882000" crc="536f3264" sha1="bd6864011649a47e25af33b173f796a81fbac635"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 10).bin" size="2822400" crc="7b95626c" sha1="ea0b0f0ba20762a1a5ef70c60d2cfca2a1b45467"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 11).bin" size="882000" crc="a242e25b" sha1="291db4e371b00951fd9873ae2c70222492939530"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 12).bin" size="882000" crc="a2da25a1" sha1="3ad0bef05a193be086fa85fae23a03b9c85aa037"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 13).bin" size="47185824" crc="66b2dd89" sha1="644eb670083956ceb889f1512f093a0c6c5e7068"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 14).bin" size="31382736" crc="a68873a1" sha1="56195d2e7271deb86a2525ee4391688e84026a5e"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 15).bin" size="28623840" crc="ea9e0ff8" sha1="52f4056955b2bb7dd77b9c8c333cec06fac68076"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 16).bin" size="41124720" crc="875114a6" sha1="5f358b8ba028ed11496046b3301668f8e1e388c7"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 17).bin" size="47040000" crc="3b694cd1" sha1="40dc97045b7deed793ce803bcc6f94882e529895"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 18).bin" size="882000" crc="f43b04c1" sha1="8706239ed8a2b7a1bafc21984865aa43af7f6a78"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 19).bin" size="44405760" crc="9d5c56dd" sha1="a6e9712475b75eb348c9611b95bee4ae33da3b9b"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 20).bin" size="882000" crc="956c981b" sha1="fa8b04aac07364682e816b34fa181b8ef2907b27"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 21).bin" size="26942160" crc="b34cce4e" sha1="64f6f39d516c2d03fbc3be9467e79f2400a84487"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan) (Track 22).bin" size="43876560" crc="74a89b5a" sha1="c57ca3e2586819e58adff512d9cbcda2b2c86cbf"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 1 (Japan).cue" size="2624" crc="0ad77bc1" sha1="497c5d88a8b7e9f56a2be985cc0cfc05a7e74b90"/>
-->
- <description>Software Contest Nyuusen Sakuhinshuu Vol. 2</description>
+ <description>Software Contest Nyuusen Sakuhinshuu 1 (HMC-139)</description>
+ <year>1991</year>
+ <publisher>富士通 (Fujitsu)</publisher>
+ <info name="alt_title" value="ソフトウェアコンテスト入選作品集 1" />
+ <info name="release" value="199110xx" />
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="software contest nyuusen sakuhinshuu 1 (japan)" sha1="e2dd4602bb38d03c79ac51418649da3b98f3d084" />
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="softcon2">
+ <!--
+ Origin: redump.org
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 01).bin" size="73735200" crc="000f9664" sha1="876f53f353d73768a47862e7ce8b6d8005264ad4"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 02).bin" size="51687552" crc="de77c698" sha1="c21085203b217a7417ccc0658929da4d1965cf4f"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 03).bin" size="55213200" crc="549db27f" sha1="63414f10b269c12884bd907238a7c1cc5f83f475"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 04).bin" size="40924800" crc="4fd5178a" sha1="e1aca7e4316d8e12ca266588c62b26c5ced1c178"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 05).bin" size="31752000" crc="71682c6e" sha1="b797edbb262cc4f9c4fae91b75a52a9e16d7aed0"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 06).bin" size="49215600" crc="0e3fd576" sha1="9cb599f8b783a2591342125d168ada541eebe0d6"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 07).bin" size="130787664" crc="312ddac0" sha1="1757dbee6679c255e13f3519b70462cb3da9e5e2"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 08).bin" size="11054400" crc="c950ebc5" sha1="7f84b343bb9895a71cff5bce7c99730787bfbe03"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 09).bin" size="128854320" crc="8f52d1be" sha1="a76c0b8c71ffaaec68acf412202633ceac23432d"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 10).bin" size="8885856" crc="402d5af4" sha1="a7c09438f1d080355fcbf71254daf77397cb74dc"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan) (Track 11).bin" size="11658864" crc="8ca24ae9" sha1="f2123801919b9e3939877a90067cfe33aaef3659"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 2 (Japan).cue" size="1556" crc="2fe7289f" sha1="fcbcdbf93d75da90e1612bf87528b12bba33c886"/>
+ -->
+ <description>Software Contest Nyuusen Sakuhinshuu 2</description>
<year>1993</year>
<publisher>富士通 (Fujitsu)</publisher>
- <info name="alt_title" value="ソフトウェアコンテスト入選作品集 Vol.2" />
+ <info name="alt_title" value="ソフトウェアコンテスト入選作品集 2" />
<info name="release" value="199301xx" />
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="softcon2" sha1="204589dd46a5e2db1a65c9252e17844868650583" />
+ <disk name="software contest nyuusen sakuhinshuu 2 (japan)" sha1="bf5489b52719657c2a3fe5e83d056f0b69478faf" />
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="softcon3">
+ <!--
+ Origin: redump.org
+ <rom name="Software Contest Nyuusen Sakuhinshuu 3 (Japan).bin" size="126655200" crc="ebdda35f" sha1="8311dcb74c39dc2b84698c6f5c355f10c59a7e83"/>
+ <rom name="Software Contest Nyuusen Sakuhinshuu 3 (Japan).cue" size="112" crc="551dee05" sha1="ad1b924715ebabadac0f3de4c331c545e48d2b7f"/>
+ -->
+ <description>Software Contest Nyuusen Sakuhinshuu 3</description>
+ <year>1994</year>
+ <publisher>富士通 (Fujitsu)</publisher>
+ <info name="alt_title" value="ソフトウェアコンテスト入選作品集 3" />
+ <info name="release" value="199403xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="software contest nyuusen sakuhinshuu 3 (japan)" sha1="26a4a5dedc765b922e225c447304b9aac2b4c0eb" />
</diskarea>
</part>
</software>
@@ -12199,11 +12650,33 @@ User/save disks that can be created from the game itself are not included.
<software name="sshangh">
<!--
- Origin: Neo Kobe Collection
- <rom name="Super Shanghai - Dragon&apos;s Eye.ccd" size="5342" crc="7c747654" sha1="d7b25c34dd9992a03ee1b5157bfa1f66f1ef4350"/>
- <rom name="Super Shanghai - Dragon&apos;s Eye.cue" size="1045" crc="60dc8a26" sha1="4bd3ea8d37f6d55741fdf9e0bba22db334af863c"/>
- <rom name="Super Shanghai - Dragon&apos;s Eye.img" size="499917600" crc="1d6e5c1e" sha1="8d5056af7328d2e00ba9e9cb57bd880060c2c64f"/>
- <rom name="Super Shanghai - Dragon&apos;s Eye.sub" size="20404800" crc="cc998f20" sha1="a55336efbd1ce9261a1efa159cf7d13b00b22c0b"/>
+ Origin: redump.org
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 01).bin" size="31399200" crc="aa2ad3e9" sha1="9d5c7c4a57ce74bcea9385a4bcb77a875e051dbe"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 02).bin" size="18698400" crc="1a3bbab2" sha1="84d7bc60d0df837d6734bfc2e5a0232f2232418e"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 03).bin" size="23108400" crc="d6ea9190" sha1="071990e0b94cd718333a4ed8e8e3277d5f8bdf4a"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 04).bin" size="24872400" crc="003aedf1" sha1="174a8477adb08f9cae743022d73d351b6f0eabbc"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 05).bin" size="25401600" crc="59f2287f" sha1="847c69b706cb5d60d5fdb2674c66c01638872416"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 06).bin" size="22050000" crc="99be6340" sha1="56434b1ab09878d3177e262f52bdf5bc73bdd2d9"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 07).bin" size="12348000" crc="8c05786e" sha1="9caf83ff6560438c9746f52b089f3118538203c0"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 08).bin" size="27342000" crc="ef3dd2dc" sha1="0cef0d87a341f19e73769ef8392d3394e8f2f51f"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 09).bin" size="19756800" crc="1176e322" sha1="f094562347923aaa8df52332e5f46c70261681d8"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 10).bin" size="23284800" crc="1493650e" sha1="b65a3b4c39f68dd5bf5d037b26fb63fcbee42192"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 11).bin" size="22226400" crc="b254e2d6" sha1="443361205d3f0ff8c27910b6837579453df56006"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 12).bin" size="20991600" crc="69d9ddbf" sha1="525944fb7f2e3877ce53c0cb043192ce3dca13fb"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 13).bin" size="22579200" crc="a72f21b0" sha1="c89aecaff72c407e7545e6dea82581081c49f05c"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 14).bin" size="21520800" crc="68619a8c" sha1="78c62c88797f422b959e991fd975f650e78c78f8"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 15).bin" size="20286000" crc="91f7530a" sha1="b09acef26cbb061f797e92fd74ae874798b2a556"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 16).bin" size="20109600" crc="8b680e10" sha1="6fcd11391ef8d23fdd9355233e1efcd4cc3ed36d"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 17).bin" size="41277600" crc="f9ef9060" sha1="1901a1d4314c9a1d9631e480c84188125f2c29ea"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 18).bin" size="1764000" crc="f76b229b" sha1="fa1c6e6ab78cb74ccbd24330504d55fbf40bd82f"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 19).bin" size="1764000" crc="97d4eae0" sha1="d9de611c1f5f6835bf347892998e3b1544b90f35"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 20).bin" size="1587600" crc="3adff8e8" sha1="6aeda817fca05d590d5da1fff40965328bed686f"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 21).bin" size="13406400" crc="2392b198" sha1="0d55219befbf01b54916cd090b4d0955a6ce9383"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 22).bin" size="20638800" crc="db76bd59" sha1="5b5c04802105ea9c9c9c7fdb5ab7a90afbf6a46b"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 23).bin" size="28576800" crc="9256ac1c" sha1="694ee05cd29af800c57aa64996f1d5c8680fbc9f"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 24).bin" size="16405200" crc="1814f86a" sha1="266676ca4e05ca5e2b91f332c33164838982ad8c"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan) (Track 25).bin" size="18522000" crc="b6b976d5" sha1="9189f037c3d47b7264f50cc6ae39d977244b6af1"/>
+ <rom name="Super Shanghai - Dragon's Eye (Japan).cue" size="3282" crc="57ff6e53" sha1="41a7786bbe218bed8e38822cdff1817420ab5834"/>
-->
<description>Super Shanghai - Dragon's Eye</description>
<year>1991</year>
@@ -12213,7 +12686,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="super shanghai - dragon's eye" sha1="3e8abecc76e6cb5f98c3d40398e71a0f3600e45a" />
+ <disk name="super shanghai - dragon's eye (japan)" sha1="6e8ae41ec46b5489d27778cf49131412705cfa46" />
</diskarea>
</part>
</software>
@@ -12294,6 +12767,25 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <software name="startword">
+ <!--
+ Origin: redump.org
+ <rom name="Oto to E no Deru Eigo Jisho No. 1 - Start with Words (Japan) (Track 1).bin" size="115718400" crc="ef341bea" sha1="d8bdac2037b97928c64f6a67c5b4013c5837c476"/>
+ <rom name="Oto to E no Deru Eigo Jisho No. 1 - Start with Words (Japan) (Track 2).bin" size="496918800" crc="e9995b54" sha1="cc2679281c036fb079166b2739524c2112ec3091"/>
+ <rom name="Oto to E no Deru Eigo Jisho No. 1 - Start with Words (Japan).cue" size="290" crc="9ffac669" sha1="77b39ad91249d8ee904756f0fba3bdfe71454fa1"/>
+ -->
+ <description>Oto to E no Deru Eigo Jisho No. 1 - Start with Words</description>
+ <year>1989</year>
+ <publisher>ソフメディア (SofMedia)</publisher>
+ <info name="alt_title" value="音と絵の出る英語辞書 No.1 「Start with Words」" />
+ <info name="release" value="198908xx" />
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="oto to e no deru eigo jisho no. 1 - start with words (japan)" sha1="382da5387582bc8119dfd22ab165193058aaf9d2" />
+ </diskarea>
+ </part>
+ </software>
+
<software name="strike">
<!--
Origin: Neo Kobe Collection
@@ -12376,10 +12868,9 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
- <!-- Missing a floppy disk -->
- <software name="suzaku" supported="no">
+ <software name="suzaku">
<!--
- Origin: redump.org
+ Origin: redump.org / wiggy2k
<rom name="Suzaku (Japan).bin" size="26107200" crc="fe233985" sha1="445fad31af6443b66287fda2d384270252fe33cc"/>
<rom name="Suzaku (Japan).cue" size="103" crc="f4620f82" sha1="9da9198602bbbdc8d514e1cee5ca314ff1d14f09"/>
-->
@@ -12388,6 +12879,13 @@ User/save disks that can be created from the game itself are not included.
<publisher>ウルフチーム (WolfTeam)</publisher>
<info name="alt_title" value="スザク" />
<info name="release" value="199210xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="flop1" interface="floppy_3_5">
+ <feature name="part_id" value="System Disk" />
+ <dataarea name="flop" size="1261568">
+ <rom name="suzaku (system disk).hdm" size="1261568" crc="c1e9ad9e" sha1="cd9d6e6a6198ebc536cfef5082076083596affc9" offset="000000" />
+ </dataarea>
+ </part>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
<disk name="suzaku (japan)" sha1="e3cdfc33799bb743fe6c92e93e6207bc2e654179" />
@@ -12490,13 +12988,26 @@ User/save disks that can be created from the game itself are not included.
<software name="takamiza">
<!--
- Origin: Neo Kobe Collection
- <rom name="Takamizawa Kyosuke - Nekketsu!! Kyouiku Kenshuu.ccd" size="3627" crc="523d5414" sha1="38a3d547c0c351e201fb2faa2f4fe05080d81b01"/>
- <rom name="Takamizawa Kyosuke - Nekketsu!! Kyouiku Kenshuu.cue" size="703" crc="81f0c8ab" sha1="f0bc997d4643da5ebb15341f67981507587eac16"/>
- <rom name="Takamizawa Kyosuke - Nekketsu!! Kyouiku Kenshuu.img" size="445943904" crc="0f83a769" sha1="b417cc433d6946ea6939e4f80b722bccb038318f"/>
- <rom name="Takamizawa Kyosuke - Nekketsu!! Kyouiku Kenshuu.sub" size="18201792" crc="1412cb19" sha1="28071814e73145f6e9ca4eb16a1704fb00ab6109"/>
- -->
- <description>Takamizawa Kyosuke - Nekketsu!! Kyouiku Kenshuu</description>
+ Origin: redump.org
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 01).bin" size="20102544" crc="832bed19" sha1="9c4cbe6becd6fea4132272fa248f5d56e89e81b4"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 02).bin" size="28823760" crc="ce63facb" sha1="0b1149d646b2ba1e3ddd964e4bfd9e12afc12760"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 03).bin" size="20156640" crc="59930c20" sha1="57021c3c3a78563781ecf821c934370266b9713d"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 04).bin" size="20749344" crc="f9a3b0a8" sha1="05aa07e7975d94f2f0ad0f6a7f3df9d33626aafe"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 05).bin" size="46541376" crc="9f8329c1" sha1="00ba11f3a71eb06685f9fbe413dd77505cf8b711"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 06).bin" size="40588464" crc="6ddef2fc" sha1="24c461e4e7c7dded805b9780ab5eb8b6acd5adcd"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 07).bin" size="21494928" crc="2fc2ce13" sha1="f3bcc2e4b334789d1c8f5ace580115053fc0ca32"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 08).bin" size="31192224" crc="02f0f767" sha1="e6ce9baeed1c64af659f9052c69884e2fb86c1bf"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 09).bin" size="33306672" crc="ffe687f0" sha1="43e3a8b72bac68047d102001744556d0becd67cf"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 10).bin" size="22635648" crc="0e457432" sha1="89b6dc8e48f1b3fe92e78bd62a8a9999d7a4363a"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 11).bin" size="29409408" crc="47470780" sha1="347b4990229d0ff3488f2cc983d3131670abc982"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 12).bin" size="13041840" crc="b48c1cfb" sha1="10b08a89fd05f3259f1cc943c0ba9fbfc0a280d8"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 13).bin" size="24639552" crc="ed3cf802" sha1="6273117073394d97c89951f78ee870136083e5f1"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 14).bin" size="26561136" crc="d54c846a" sha1="a98602c43700d3760a449ab7b86acb72043acd07"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 15).bin" size="41479872" crc="2bb60608" sha1="0bcc4687750a3c97c3dec466d7f1969ed54dae40"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan) (Track 16).bin" size="25220496" crc="d33f8f34" sha1="4b689062806241de217dab4f2894847c28d9db26"/>
+ <rom name="Takamizawa Kyousuke Nekketsu!! Kyouiku Kenshuu (Japan).cue" size="2044" crc="6d9055b2" sha1="9e9161f54a5f3fdc832a1ef17d12fae82740c3a7"/>
+ -->
+ <description>Takamizawa Kyousuke - Nekketsu!! Kyouiku Kenshuu</description>
<year>1995</year>
<publisher>ジックス (ZyX)</publisher>
<info name="alt_title" value="高見沢恭介 熱血!!教育研修" />
@@ -12504,7 +13015,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="takamizawa kyosuke - nekketsu!! kyouiku kenshuu" sha1="ce13831f3094f9ab53c392480ece497c9b3c7997" />
+ <disk name="takamizawa kyousuke nekketsu!! kyouiku kenshuu (japan)" sha1="c221b1b63f145650bff7f050cc7040d5cb794887" />
</diskarea>
</part>
</software>
@@ -12567,11 +13078,15 @@ User/save disks that can be created from the game itself are not included.
<software name="tdf">
<!--
- Origin: Neo Kobe Collection
- <rom name="TDF - Terrestrial Defense Force.ccd" size="1896" crc="f869642e" sha1="c0c5e17b27a49f12fc0f20542500c2bfda4d46f3"/>
- <rom name="TDF - Terrestrial Defense Force.cue" size="329" crc="9de63ba6" sha1="85644f425978c5a08eceaa3171eeef18eb376064"/>
- <rom name="TDF - Terrestrial Defense Force.img" size="160606320" crc="1adea170" sha1="79296eec6cbc866e81ff1b862deedc1d723331e4"/>
- <rom name="TDF - Terrestrial Defense Force.sub" size="6555360" crc="589616ea" sha1="f63ee1d3114a90445a6765c8afd9fb691b231f57"/>
+ Origin: redump.org
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 1).bin" size="2469600" crc="bce2f9ab" sha1="c8df1966e37a1e83cf0495dcaddbfbf80e8ddcc1"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 2).bin" size="44116464" crc="7650dd6c" sha1="0cc1fdf40c24dfc941073124dc5ce79d456e82d7"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 3).bin" size="23891616" crc="912680f1" sha1="60319ade6c6af8274a8f76d6eac3f38dc5f83d8e"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 4).bin" size="35538720" crc="47f8cd39" sha1="3bacf6b08edc955e4d4a156da588e2be6151e9f0"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 5).bin" size="6884304" crc="7296e60a" sha1="ab7f01a5f2a68b60b943a3974751a53692d728c4"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 6).bin" size="45236016" crc="d57f18cb" sha1="b694ab5dea049e7231d54a2c9f89b5e347439c47"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan) (Track 7).bin" size="2469600" crc="2e34fcb8" sha1="5235ab7c57de42940d7f19f30e0a8b1787898c9b"/>
+ <rom name="T.D.F. - Terrestrial Defense Force (Japan).cue" size="934" crc="cec190e3" sha1="a6533806b4f803f911e472d85ff2476712e1642a"/>
-->
<description>TDF - Terrestrial Defense Force</description>
<year>1990</year>
@@ -12580,7 +13095,7 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM"/>
<part name="cdrom" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="tdf - terrestrial defense force" sha1="584ac4f25e5cc1f38857d26b5dc988219ae5646b" />
+ <disk name="t.d.f. - terrestrial defense force (japan)" sha1="4703d7a2bb416bc5101ef5ed445f8925d2b965c0" />
</diskarea>
</part>
</software>
@@ -12844,14 +13359,43 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
+ <!-- This revision seems to be quite different from the original, internally. It works mostly fine and doesn't require a floppy disk. -->
+ <software name="tqod">
+ <!--
+ Origin: redump.org
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 01).bin" size="15876000" crc="72f22194" sha1="0bc94d672f2d7e7870ad3cfd529be39831706bbe"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 02).bin" size="58694160" crc="b1d07b11" sha1="90f047c923d51cb935f413f234eec72d0ad2c2ff"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 03).bin" size="69983760" crc="0a1b317f" sha1="03d9c628c1f558235f44ded8ea3553a8d19a027b"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 04).bin" size="66291120" crc="30ad6115" sha1="db50225d74a02d39777466c2746f79d082f880a1"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 05).bin" size="67765824" crc="40e7ac00" sha1="2ada84f71cf87111a6edd6a313964e5baf657899"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 06).bin" size="62052816" crc="302b4c49" sha1="a54dc9f2e274e72fcb465f727e870f77ce090f8d"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 07).bin" size="65479680" crc="1c902a4c" sha1="e9ff56324750b545c62d5b26444050e852c2555f"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 08).bin" size="66185280" crc="67874fea" sha1="44229d899cbffb7c262f5b2c6d486f168154dbf9"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 09).bin" size="3469200" crc="e46f5531" sha1="3b2ca0204f3487238767f560baa1c481a0b9ed81"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A) (Track 10).bin" size="66305232" crc="a4326115" sha1="dd121efd2c3d75e6b2824202b40dcaf75e55a2ca"/>
+ <rom name="Queen of Duellist, The (Japan) (Rev A).cue" size="1312" crc="16c2f402" sha1="97addc980cc83a203e5a9ec79e9af8cf9f0947ea"/>
+ -->
+ <description>The Queen of Duellist (HME-166A)</description>
+ <year>1993</year>
+ <publisher>アグミックス (Agumix)</publisher>
+ <info name="alt_title" value="クイーン・オブ・デュエリスト" />
+ <info name="release" value="199306xx" />
+ <info name="usage" value="Requires 2 MB RAM"/>
+ <part name="cdrom" interface="fmt_cdrom">
+ <diskarea name="cdrom">
+ <disk name="queen of duellist, the (japan) (rev a)" sha1="543729bca29f426ceb807eb6ea3e5fc0cfaf064d" />
+ </diskarea>
+ </part>
+ </software>
+
<!-- Graphics/sound issues; hangs when starting a fight -->
- <software name="tqod" supported="no">
+ <software name="tqodo" cloneof="tqod" supported="no">
<!--
Origin: Neo Kobe Collection
<rom name="The Queen Of Duellist.cue" size="479" crc="d249b1cd" sha1="56ff832f3bcdf066f3022fae3b40a7d66deddd72"/>
<rom name="The Queen Of Duellist.img" size="542100720" crc="12c515ea" sha1="d8b65e806f02006c3cef3c485c2ecf4f73283bc4"/>
-->
- <description>The Queen of Duellist</description>
+ <description>The Queen of Duellist (HME-166)</description>
<year>1993</year>
<publisher>アグミックス (Agumix)</publisher>
<info name="alt_title" value="クイーン・オブ・デュエリスト" />
@@ -12982,16 +13526,39 @@ User/save disks that can be created from the game itself are not included.
<software name="townsmg2">
<!--
- Origin: Neo Kobe Collection
- <rom name="Towns Magazine Vol. 2 (Disc 1).ccd" size="754" crc="5c5ac8b1" sha1="0e4a0d1113c21e5df78f5b9267ddc624a978d23f"/>
- <rom name="Towns Magazine Vol. 2 (Disc 1).cue" size="112" crc="74a74a29" sha1="7fccdc2aa133ee77a3aa1a56bcf356f569a5cf00"/>
- <rom name="Towns Magazine Vol. 2 (Disc 1).img" size="503934816" crc="98f1294a" sha1="28f6eeb20a8094b54b189f98ea28bdad6cfc6337"/>
- <rom name="Towns Magazine Vol. 2 (Disc 1).sub" size="20568768" crc="a2162c51" sha1="0c29b09dbf223035a1e43c45eee6af783b929544"/>
-
- <rom name="Towns Magazine Vol. 2 (Disc 2).ccd" size="5011" crc="0e3d17e5" sha1="0055a9fcba055864c3fe8cd80e5fc0d72918371f"/>
- <rom name="Towns Magazine Vol. 2 (Disc 2).cue" size="1840" crc="92aa48bc" sha1="3ddb4dd28cb5c790af0776cf98f31cb8d81607a9"/>
- <rom name="Towns Magazine Vol. 2 (Disc 2).img" size="680551200" crc="d97df31f" sha1="8064a1cc858f8f4089a32519081d285b2aa39281"/>
- <rom name="Towns Magazine Vol. 2 (Disc 2).sub" size="27777600" crc="44b99036" sha1="c3ddeb7942be63e1b36e63525dd40024890281bb"/>
+ Origin: redump.org
+ <rom name="TownsMagazine Vol. 2 (No. 1) (Japan).bin" size="503934816" crc="98f1294a" sha1="28f6eeb20a8094b54b189f98ea28bdad6cfc6337"/>
+ <rom name="TownsMagazine Vol. 2 (No. 1) (Japan).cue" size="102" crc="25ec120b" sha1="6cd3b3c744c69240d025b4fb601021a33eb6f430"/>
+
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 01).bin" size="264247200" crc="82bc25e2" sha1="b441d3744bcfbbcb504247f5908f8e0eff6f3542"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 02).bin" size="34398000" crc="ca0425cc" sha1="06250639c92fe0ba04ae285575253f4a6a3ea552"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 03).bin" size="47451600" crc="1bf21992" sha1="ac5c43f9fcd8bd4d9e51566dbf282f68986054e9"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 04).bin" size="38808000" crc="0b462d7c" sha1="d3214777f9eb78161e1aa67ab29f07fffcf4d10d"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 05).bin" size="6526800" crc="b8ca62a1" sha1="70878f498a47eff3f24fdda2401c5ababb791048"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 06).bin" size="29635200" crc="b638006e" sha1="3027397afb7eff99788761645837616a466f6691"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 07).bin" size="10584000" crc="acc8a0df" sha1="d7a3292ae0e53b3cb741b68a9e7bb582e2323daa"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 08).bin" size="26636400" crc="2611c380" sha1="aef4e7d20af7b2403fa324115e0c672515033256"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 09).bin" size="13406400" crc="03e79e27" sha1="f8c4dafcab974ea8a19bd50d719d516c1ecb0daf"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 10).bin" size="13759200" crc="6adf07f3" sha1="eb042f4452608a51f5f69b9915f28514c10a1e1d"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 11).bin" size="4586400" crc="0bea9bcd" sha1="1c55c6e2d0cf4f260053c3e56bda889636a229e0"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 12).bin" size="6703200" crc="e390da79" sha1="11e52f516dc3c8dcb89e22db6c416951a7adeb32"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 13).bin" size="1058400" crc="7bc1a941" sha1="e500457253595bb417c526445373ae50dc58dd1d"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 14).bin" size="1234800" crc="e0930ee2" sha1="27bf63055c3e06fd276a025e4425e9482bbed420"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 15).bin" size="17640000" crc="d038ffcc" sha1="8853d8742e7ad8f021d94c06bece00406a5a2c33"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 16).bin" size="14464800" crc="eb736e09" sha1="2b63325811e3d1693dbbc15931ccc0294624cb4f"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 17).bin" size="16405200" crc="cc84eb2c" sha1="e06eeb1d0fa032c7db52a8ac6273fa7c73b0fd85"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 18).bin" size="22402800" crc="d86ff151" sha1="60b02c8d036a985d504cd5069579d91a6dc4eeee"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 19).bin" size="21168000" crc="36b559e0" sha1="225b1bff622b9ce5acb1c04d7f53a53d5785ed52"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 20).bin" size="21520800" crc="01bc035c" sha1="0c3e54b87dfdcc29cbcc7fd8571c88d133abfaeb"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 21).bin" size="21873600" crc="2c8035eb" sha1="f3e1a7030ee3619fd3f2f3bc781d5e9bd5ad45a2"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 22).bin" size="3704400" crc="2e10f262" sha1="9a58be2802e6648b01b0f68af37ad8eab449788a"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 23).bin" size="4233600" crc="065e76d5" sha1="c6c748be00909e0f29085e021b491d22450f9d7b"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 24).bin" size="2469600" crc="d8734a8c" sha1="5eaa0fd38ffc85144b78df9e267af74c4661f5d8"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 25).bin" size="1940400" crc="9169224d" sha1="94029df265d4e7273e24554aa50af10c40baeba0"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 26).bin" size="17287200" crc="97d0cc73" sha1="8a8183628f89041f2bf442c4ecdc44374d9ba119"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 27).bin" size="15170400" crc="25ba8889" sha1="f3c4ec0e9b36965c3ae08db0009e4e50742d68d7"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan) (Track 28).bin" size="1234800" crc="c98ac98a" sha1="cde2cecb36b8ac425097666f7891ddcf2dade306"/>
+ <rom name="TownsMagazine Vol. 2 (No. 2) (Japan).cue" size="3650" crc="1e1069ed" sha1="d9e2b030bbcd9cb912ce0f986c6846a9e4a460fb"/>
-->
<description>Towns Magazine Vol. 2</description>
<year>1994</year>
@@ -13000,12 +13567,12 @@ User/save disks that can be created from the game itself are not included.
<info name="usage" value="Requires 2 MB RAM to boot, some demos require more"/>
<part name="cdrom1" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="towns magazine vol. 2 (disc 1)" sha1="65d208a41d0089eb11f7607e0a78fba60fbdbaa4" />
+ <disk name="townsmagazine vol. 2 (no. 1) (japan)" sha1="2cd4a4201f852747585c73a7a4a1dbfdb091e7d9" />
</diskarea>
</part>
<part name="cdrom2" interface="fmt_cdrom">
<diskarea name="cdrom">
- <disk name="towns magazine vol. 2 (disc 2)" sha1="241a9f4717ed95fa5c6689665c3330f796a28561" />
+ <disk name="townsmagazine vol. 2 (no. 2) (japan)" sha1="2d0a5d5f1c28389ffcd8ca3bfd61e7000d09b6ba" />
</diskarea>
</part>
</software>
diff --git a/hash/ibm5150.xml b/hash/ibm5150.xml
index fd6a4d57c06..07fb8ebedc6 100644
--- a/hash/ibm5150.xml
+++ b/hash/ibm5150.xml
@@ -8142,6 +8142,44 @@ has been replaced with an all-zero block. -->
</part>
</software>
+ <software name="cnflcteu">
+ <description>Conflict Europe</description>
+ <year>1989</year>
+ <publisher>Mirrorsoft</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="conflict europe.img" size="737280" crc="12c1aa37" sha1="5be457fd17739b64d6ab6d7892ebfe302ee835e2"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="camelot">
+ <description>Conquest of Camelot - The Search for the Grail</description>
+ <year>1988</year>
+ <publisher>Sierra</publisher>
+ <info name="version" value="1.001.000" />
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="conquest of camelot disk 1.img" size="737280" crc="dac688c5" sha1="8ea08590af7a8f1db5c9c14aaf6191f141410311"/>
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="conquest of camelot disk 2.img" size="737280" crc="88b65db5" sha1="c32bfd802776df4986ae7335ab7182af899de969"/>
+ </dataarea>
+ </part>
+ <part name="flop3" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="conquest of camelot disk 3.img" size="737280" crc="1b3a6edb" sha1="1ca7bae05d0c4eb602f64cc4c76939561f56c2be"/>
+ </dataarea>
+ </part>
+ <part name="flop4" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="conquest of camelot disk 4.img" size="737280" crc="0425a6aa" sha1="6a5b771e52508035a869bfde3076ee70d15a1899"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="crimewav">
<description>Crime Wave</description>
<year>1990</year>
@@ -8862,6 +8900,22 @@ has been replaced with an all-zero block. -->
</part>
</software>
+ <software name="harpoon">
+ <description>Harpoon</description>
+ <year>1989</year>
+ <publisher>Three-Sixty</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="harpoon disk 1.img" size="737280" crc="ca8f8d95" sha1="4c1637d7e10ce85ecc9f67a8540acecbe8a4db2d"/>
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_3_5">
+ <dataarea name="flop" size = "737280">
+ <rom name="harpoon disk 2.img" size="737280" crc="9770fd0e" sha1="1dc0cc6d859eefd664c237969774e9949fd48705"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="herolanc">
<description>Heroes of the Lance</description>
<year>1991</year>
diff --git a/hash/ibm5170.xml b/hash/ibm5170.xml
index 4bcefed7be0..37e56540466 100644
--- a/hash/ibm5170.xml
+++ b/hash/ibm5170.xml
@@ -753,132 +753,138 @@ license:CC0
</part>
</software>
+ <!-- not original, has WinImage header -->
<software name="gem30">
<description>GEM Desktop 3.0</description>
<year>19??</year>
<publisher>Digital Research</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="system master.img" size="368640" crc="2ebdb5fe" sha1="e2190f07fb6d4f36ca3c9fc5524ac5ab7440855c"/>
+ <rom name="system master.img" size="368640" crc="2ebdb5fe" sha1="e2190f07fb6d4f36ca3c9fc5524ac5ab7440855c" status="baddump"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="screen 1.img" size="368640" crc="f4d618b0" sha1="02fedd94df50f57c281b9a931ef72fc8dbeacc5c"/>
+ <rom name="screen 1.img" size="368640" crc="f4d618b0" sha1="02fedd94df50f57c281b9a931ef72fc8dbeacc5c" status="baddump"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="screen 2.img" size="368640" crc="031bd65f" sha1="87fcc18b8e99d727b71854a6f27cfcc7f4d6e569"/>
+ <rom name="screen 2.img" size="368640" crc="031bd65f" sha1="87fcc18b8e99d727b71854a6f27cfcc7f4d6e569" status="baddump"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="printer 1.img" size="368640" crc="7f6a1247" sha1="200cd4002d6f2285a2762566bfd2f69a3ca70550"/>
+ <rom name="printer 1.img" size="368640" crc="7f6a1247" sha1="200cd4002d6f2285a2762566bfd2f69a3ca70550" status="baddump"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="printer 2.img" size="368640" crc="1afc7a36" sha1="967103595523c7cdae923d5ff7bd1da802f6da9c"/>
+ <rom name="printer 2.img" size="368640" crc="1afc7a36" sha1="967103595523c7cdae923d5ff7bd1da802f6da9c" status="baddump"/>
</dataarea>
</part>
<part name="flop6" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="printer 3.img" size="368640" crc="c704dcbd" sha1="f6a8fdd8cd2de0b30a0b96481daf4125a4ce0528"/>
+ <rom name="printer 3.img" size="368640" crc="c704dcbd" sha1="f6a8fdd8cd2de0b30a0b96481daf4125a4ce0528" status="baddump"/>
</dataarea>
</part>
</software>
+ <!-- not original, has WinImage header -->
<software name="gem301d">
<description>GEM Desktop 3.01d</description>
<year>19??</year>
<publisher>Digital Research</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="system master.img" size="368640" crc="af28959d" sha1="b0a2319cba8f2423969926e6ac2053209c689396"/>
+ <rom name="system master.img" size="368640" crc="af28959d" sha1="b0a2319cba8f2423969926e6ac2053209c689396" status="baddump"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="screen 1.img" size="368640" crc="098a85ec" sha1="1ed066692563afb6be4d1cbc0902f7eacc1378f3"/>
+ <rom name="screen 1.img" size="368640" crc="098a85ec" sha1="1ed066692563afb6be4d1cbc0902f7eacc1378f3" status="baddump"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="screen 2.img" size="368640" crc="253b84e9" sha1="18ac60d22055438dffbbfa8f9d1801bd650e571a"/>
+ <rom name="screen 2.img" size="368640" crc="253b84e9" sha1="18ac60d22055438dffbbfa8f9d1801bd650e571a" status="baddump"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="printer 1.img" size="368640" crc="934b3426" sha1="da3caa8122fc2a9e538b3c57c4d00c609f351cd1"/>
+ <rom name="printer 1.img" size="368640" crc="934b3426" sha1="da3caa8122fc2a9e538b3c57c4d00c609f351cd1" status="baddump"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="printer 2.img" size="368640" crc="f1882987" sha1="3a92fa60408f8881fdcf582f8b4e981c12eaa5fe"/>
+ <rom name="printer 2.img" size="368640" crc="f1882987" sha1="3a92fa60408f8881fdcf582f8b4e981c12eaa5fe" status="baddump"/>
</dataarea>
</part>
<part name="flop6" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="printer 3.img" size="368640" crc="19d6957a" sha1="9ad00be79187e767643952404e7e9502e1d109e7"/>
+ <rom name="printer 3.img" size="368640" crc="19d6957a" sha1="9ad00be79187e767643952404e7e9502e1d109e7" status="baddump"/>
</dataarea>
</part>
</software>
+ <!-- not original, has WinImage header -->
<software name="gempaint">
<description>GEM Paint</description>
<year>19??</year>
<publisher>Digital Research</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="disk1.img" size="368640" crc="8d7af99e" sha1="1622b1bd5cfc777625d92129b5cb2c2176d4b624"/>
+ <rom name="disk1.img" size="368640" crc="8d7af99e" sha1="1622b1bd5cfc777625d92129b5cb2c2176d4b624" status="baddump"/>
</dataarea>
</part>
</software>
+
+ <!-- not original, has WinImage header -->
<software name="1stword">
<description>1st Word Plus 2.0</description>
<year>19??</year>
<publisher>GST Computer Systems</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="disk1.img" size="368640" crc="705c06b4" sha1="1ec20a62ce21f48349e18026dd1f3de015c94cb4"/>
+ <rom name="disk1.img" size="368640" crc="705c06b4" sha1="1ec20a62ce21f48349e18026dd1f3de015c94cb4" status="baddump"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<dataarea name="flop" size="368640">
- <rom name="disk2.img" size="368640" crc="a3a926a1" sha1="8c08c47394685abfffdd5af731256b96fb8dace7"/>
+ <rom name="disk2.img" size="368640" crc="a3a926a1" sha1="8c08c47394685abfffdd5af731256b96fb8dace7" status="baddump"/>
</dataarea>
</part>
</software>
+ <!-- not original, has WinImage header -->
<software name="geos20">
<description>GeoWorks Ensemble 2.0</description>
<year>1993</year>
<publisher>GeoWorks</publisher>
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size="1474560">
- <rom name="disk1.img" size="1474560" crc="4935d991" sha1="752f39f19d5a26307eb9c07339763c95447f8616"/>
+ <rom name="disk1.img" size="1474560" crc="4935d991" sha1="752f39f19d5a26307eb9c07339763c95447f8616" status="baddump"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_3_5">
<dataarea name="flop" size="1474560">
- <rom name="disk2.img" size="1474560" crc="e72b697b" sha1="353b0e9979ef94181e3e1745a6a7e3f097092dfd"/>
+ <rom name="disk2.img" size="1474560" crc="e72b697b" sha1="353b0e9979ef94181e3e1745a6a7e3f097092dfd" status="baddump"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_3_5">
<dataarea name="flop" size="1474560">
- <rom name="disk3.img" size="1474560" crc="b15e719a" sha1="a5838a09c018875db116986e3074a9c403544c75"/>
+ <rom name="disk3.img" size="1474560" crc="b15e719a" sha1="a5838a09c018875db116986e3074a9c403544c75" status="baddump"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_3_5">
<dataarea name="flop" size="1474560">
- <rom name="disk4.img" size="1474560" crc="49856628" sha1="25b1b3477a7bd31423b6e3901a1d4c1c1069467b"/>
+ <rom name="disk4.img" size="1474560" crc="49856628" sha1="25b1b3477a7bd31423b6e3901a1d4c1c1069467b" status="baddump"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_3_5">
<dataarea name="flop" size="1474560">
- <rom name="disk5.img" size="1474560" crc="370f711c" sha1="b7ef83e7f99a563f39c04c0190a9d8ac1f5193d0"/>
+ <rom name="disk5.img" size="1474560" crc="370f711c" sha1="b7ef83e7f99a563f39c04c0190a9d8ac1f5193d0" status="baddump"/>
</dataarea>
</part>
</software>
diff --git a/hash/megadriv.xml b/hash/megadriv.xml
index 6bce2a3f900..4ae8c0252a0 100644
--- a/hash/megadriv.xml
+++ b/hash/megadriv.xml
@@ -7764,7 +7764,7 @@ Info on Sega chip labels (from Sunbeam / Digital Corruption)
<!-- Only Europe and Japan are confirmed -->
<software name="sor">
- <description>Streets of Rage (Euro, USA, Rev. A) ~ Bare Knuckle - Ikari no Tetsuken (Jpn, Rev. A)</description>
+ <description>Streets of Rage (Euro, USA, Rev. A) ~ Bare Knuckle - Ikari no Tekken (Jpn, Rev. A)</description>
<year>1991</year>
<publisher>Sega</publisher>
<info name="serial" value="G-4050 (JPN)"/>
@@ -7782,7 +7782,7 @@ Info on Sega chip labels (from Sunbeam / Digital Corruption)
<!-- Only Europe and Japan are confirmed -->
<software name="sora" cloneof="sor">
- <description>Streets of Rage (Euro, USA) ~ Bare Knuckle - Ikari no Tetsuken (Jpn)</description>
+ <description>Streets of Rage (Euro, USA) ~ Bare Knuckle - Ikari no Tekken (Jpn)</description>
<year>1991</year>
<publisher>Sega</publisher>
<info name="serial" value="G-4050 (JPN)"/>
@@ -7800,7 +7800,7 @@ Info on Sega chip labels (from Sunbeam / Digital Corruption)
<!-- Only Euro is confirmed -->
<software name="sor2">
- <description>Streets of Rage II (Euro) ~ Bare Knuckle II - Shitou e no Chingonka (Jpn)</description>
+ <description>Streets of Rage II (Euro) ~ Bare Knuckle II - Shitou e no Requiem (Jpn)</description>
<year>1993</year>
<publisher>Sega</publisher>
<info name="serial" value="G-4091 (JPN)"/>
diff --git a/hash/mobigo_cart.xml b/hash/mobigo_cart.xml
index 3c5f1d1061c..2af4b5ab3dc 100644
--- a/hash/mobigo_cart.xml
+++ b/hash/mobigo_cart.xml
@@ -21,6 +21,18 @@ license:CC0
</part>
</software>
+ <software name="braveg" supported="no">
+ <description>Merida - Legende der Highlands (Germany)</description>
+ <year>2012</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-252604(GE)"/>
+ <part name="cart" interface="mobigo_cart">
+ <dataarea name="rom" size="0x1000000">
+ <rom name="80-252604 - Merida - Legende der Highlands (GER).bin" size="0x1000000" crc="acbc3afc" sha1="6b57f6438a007870c8ec5de76689cb98fca5b8f2"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="cars2g" supported="no">
<description>Cars 2 (Germany)</description>
<year>201?</year>
@@ -224,6 +236,18 @@ license:CC0
</part>
</software>
+ <software name="scoobymt" supported="no">
+ <description>Scooby-Doo! - Mystery Town (UK)</description>
+ <year>2011</year> <!-- s11 -->
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-251603(UK)"/>
+ <part name="cart" interface="mobigo_cart">
+ <dataarea name="rom" size="0x1000000">
+ <rom name="80-251603 - Scooby-Doo - Mystery Town (UK).bin" size="0x1000000" crc="dcc4a1ee" sha1="678e4c83bb120db028ffdd170f4bcfb3aa9d5229"/>
+ </dataarea>
+ </part>
+ </software>
+
<software name="sofiag" supported="no">
<description>Sofia die Erste (Germany)</description>
<year>2013</year>
@@ -248,7 +272,19 @@ license:CC0
</part>
</software>
- <software name="sherosqg" supported="no">
+ <software name="sherosq" supported="no">
+ <description>Marvel Super Hero Squad - Sport Heroes (UK)</description>
+ <year>2010</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-250403(UK)"/>
+ <part name="cart" interface="mobigo_cart">
+ <dataarea name="rom" size="0x1000000">
+ <rom name="80-250403 - Super Hero Squad - Sports Heroes (UK).bin" size="0x1000000" crc="e5060f03" sha1="886dccb473f3a196ed1f475f04663e73aff9aedc"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sherosqg" cloneof="sherosq" supported="no">
<description>Marvel Super Hero Squad - Super Sportler (Germany)</description>
<year>2010</year>
<publisher>VTech</publisher>
diff --git a/hash/n64.xml b/hash/n64.xml
index 044b6ee3984..22c8f0ea30c 100644
--- a/hash/n64.xml
+++ b/hash/n64.xml
@@ -13162,6 +13162,17 @@ clips onto the player's ear.
</dataarea>
</part>
</software>
+
+ <software name="vpointp">
+ <description>Viewpoint 2064 (Prototype)</description>
+ <year>1999</year>
+ <publisher>Sammy</publisher>
+ <part name="cart" interface="n64_cart">
+ <dataarea name="rom" size="16777216">
+ <rom name="Viewpoint2064.z64" size="16777216" crc="93a630cb" sha1="defacaf6dbd22962ec0184849ed4a4c53a147454" />
+ </dataarea>
+ </part>
+ </software>
<software name="vpool">
<description>Virtual Pool 64 (Europe)</description>
diff --git a/hash/saitek_schess.xml b/hash/saitek_schess.xml
new file mode 100644
index 00000000000..eaa8ad4f82b
--- /dev/null
+++ b/hash/saitek_schess.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<!--
+license:CC0
+-->
+
+<softwarelist name="saitek_schess" description="Sensor Chess Modules">
+
+ <software name="csss">
+ <description>Classical Style Super Strong</description>
+ <year>1982</year>
+ <publisher>SciSys</publisher>
+ <part name="cart" interface="schess_cart">
+ <dataarea name="rom" size="0x1000">
+ <rom name="c45046_y02_mb" size="0x1000" crc="caff380d" sha1="5b227f0d9e457c56642bd217192744f8df60e685" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
diff --git a/hash/snes.xml b/hash/snes.xml
index 14c293b9a32..1647924e8bf 100644
--- a/hash/snes.xml
+++ b/hash/snes.xml
@@ -6451,7 +6451,7 @@ more investigation needed...
<software name="asterix">
<description>Astérix (Euro)</description>
- <year>1996</year>
+ <year>1993</year>
<publisher>Infogrames</publisher>
<info name="serial" value="SNSP-XE-FAH, SNSP-XE-NOE" />
<part name="cart" interface="snes_cart">
diff --git a/hash/svi318_cart.xml b/hash/svi318_cart.xml
index 5b909e2e2cf..200f2b54fd1 100644
--- a/hash/svi318_cart.xml
+++ b/hash/svi318_cart.xml
@@ -7,7 +7,8 @@ Info Taken from here: http://www.samdal.com/SVIDOCS/SVI_Softwares_for_SVI318-328
These Cartridges are not dumped:
Just Write JR. SD294C
-Amoured Assault SD233C // Was availible on Cartridge and/or Tape
+Armoured Assault SD233C // Was available on Cartridge and/or Tape
+
-->
<softwarelist name="svi318_cart" description="Spectravision SVI-318 cartridges">
@@ -19,7 +20,7 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<info name="serial" value="SD291C" />
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="32768">
- <rom name="flipper slipper.rom" size="32768" crc="f0c51214" sha1="7acd00c9053fbf7f7d698485759d170a483b123d" offset="0" />
+ <rom name="flipper slipper.rom" size="32768" crc="f0c51214" sha1="7acd00c9053fbf7f7d698485759d170a483b123d"/>
</dataarea>
</part>
</software>
@@ -32,23 +33,22 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="32768">
- <rom name="frantic freddy.rom" size="32768" crc="cb553ee5" sha1="60adadb294d5492dfe6ada4b0710c5c31ef3e69c" offset="0" />
+ <rom name="frantic freddy.rom" size="32768" crc="cb553ee5" sha1="60adadb294d5492dfe6ada4b0710c5c31ef3e69c"/>
</dataarea>
</part>
</software>
- <!-- According to the SVI Official Catalog this was released as a tape only, But a cart dump does exist
+ <!-- According to the SVI Official Catalog this was released as a tape only. -->
<software name="mentor">
- <description>Music Mentor</description>
- <year>1983</year>
- <publisher>Spectravideo</publisher>
- <part name="cart" interface="svi318_cart">
- <dataarea name="rom" size="32768">
- <rom name="music mentor.rom" size="32768" crc="ba0c3d3c" sha1="0ebb91dcc99c0c361d8855387079bc62a41d05d8" offset="0" />
- </dataarea>
- </part>
+ <description>Music Mentor</description>
+ <year>1983</year>
+ <publisher>Spectravideo</publisher>
+ <part name="cart" interface="svi318_cart">
+ <dataarea name="rom" size="32768">
+ <rom name="music mentor.rom" size="32768" crc="ba0c3d3c" sha1="0ebb91dcc99c0c361d8855387079bc62a41d05d8"/>
+ </dataarea>
+ </part>
</software>
- -->
<software name="secalpha">
<description>Sector Alpha</description>
@@ -57,7 +57,7 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<info name="serial" value="SD220C" />
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="32768">
- <rom name="sector alpha.rom" size="32768" crc="015f29ff" sha1="c48266a71e940b903d446561f629b58f3fc9cc8c" offset="0" />
+ <rom name="sector alpha.rom" size="32768" crc="015f29ff" sha1="c48266a71e940b903d446561f629b58f3fc9cc8c"/>
</dataarea>
</part>
</software>
@@ -69,7 +69,7 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<info name="serial" value="SD237C" />
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="32768">
- <rom name="supercross.rom" size="32768" crc="8d9d1db3" sha1="73f750d454b32d7bf6bb1c966135a022ce1de92a" offset="0" />
+ <rom name="supercross.rom" size="32768" crc="8d9d1db3" sha1="73f750d454b32d7bf6bb1c966135a022ce1de92a"/>
</dataarea>
</part>
</software>
@@ -82,7 +82,7 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<publisher>Five Finger Punch</publisher>
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="65536">
- <rom name="pre-release.rom" size="65536" crc="fa90692e" sha1="5b5fbc309ffe2608b2fed2a4fba8ef73ad68733d" offset="0" />
+ <rom name="pre-release.rom" size="65536" crc="fa90692e" sha1="5b5fbc309ffe2608b2fed2a4fba8ef73ad68733d"/>
</dataarea>
</part>
</software>
@@ -95,7 +95,7 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<publisher>Five Finger Punch</publisher>
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="65536">
- <rom name="postrelease.rom" size="65536" crc="bb467c8f" sha1="3ea09d322ec7a91b8acd7fc7b4688570b85ed5f3" offset="0" />
+ <rom name="postrelease.rom" size="65536" crc="bb467c8f" sha1="3ea09d322ec7a91b8acd7fc7b4688570b85ed5f3"/>
</dataarea>
</part>
</software>
@@ -108,7 +108,7 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
<publisher>Five Finger Punch</publisher>
<part name="cart" interface="svi318_cart">
<dataarea name="rom" size="65536">
- <rom name="oh.rom" size="65536" crc="4042f67d" sha1="abb9ad310e9bdf2b1fd0f3eb0fbb967bd1dcc614" offset="0" />
+ <rom name="oh.rom" size="65536" crc="4042f67d" sha1="abb9ad310e9bdf2b1fd0f3eb0fbb967bd1dcc614"/>
</dataarea>
</part>
</software>
diff --git a/hash/telestory_cart.xml b/hash/telestory_cart.xml
index 3e1b6553ab9..c79ea2c87c2 100644
--- a/hash/telestory_cart.xml
+++ b/hash/telestory_cart.xml
@@ -37,7 +37,6 @@ Even pins 2-48 on bottom, pin 2 under pin 1, pin 48 under pin 47.
Undumped carts:
-Power Ranger Mystic Force - Whispering Voices / Code Busters (USA) (might match the dumped UK sourced cart)
--Thomas & Friends - Thomas Visits the Toy Shop / Thomas' Milkshake Mix (USA)
-Cenerentola - Cenerentola / Cenerentola Bellezze in Fiore (Italy)
-Il Re Reone - Il Re Leone / Il Re Leone 2: Il Regno di Simba (Italy)
-Winnie the Pooh - Salta Tigro, salta! / Winnie the Pooh l'orsetto goloso (Italy)
diff --git a/hash/vsmile_cart.xml b/hash/vsmile_cart.xml
index 6dfcb8b0211..d18e25bf366 100644
--- a/hash/vsmile_cart.xml
+++ b/hash/vsmile_cart.xml
@@ -71,13 +71,13 @@ Regular game cartridges
| They also say 'V.Link compatible' on the back though not all are V.Motion compatible |
+========+===================+================================================================================================+
| | 80-090000(US) | Up (need pic) |
-| | 80-090000-001(US) | Up |
-| XX | 80-090003-003(UK) | Up |
+| | 80-090000-001(US) | Up (Rev. 001) |
+| XX | 80-090003-003(UK) | Up (Rev. 003) |
| | 80-090004(GE) | Oben |
-| XX | 80-090004-004(GE) | Oben |
-| | 80-090005(FR) | Là-Haut |
-| XX | 80-090005-005(FR) | Là-Haut |
-| XX | 80-090007-022(SP) | Up |
+| XX | 80-090004-004(GE) | Oben (Rev. 004) |
+| | 80-090005(FR) | Là-Haut (ever released?) |
+| XX | 80-090005-005(FR) | Là-Haut (Rev. 005) |
+| XX | 80-090007-022(SP) | Up (Rev. 022) |
+========+===================+================================================================================================+
| | 80-090020(US) | Handy Manny |
| | 80-090023(UK) | Handy Manny |
@@ -132,9 +132,9 @@ Regular game cartridges
| Oldest Smartidges start here |
| |
+========+===================+================================================================================================+
-| XX | 80-092000(US) | Alphabet Park Adventure (Red Haired Girl Version) |
-| XX | 80-092000(US) | Alphabet Park Adventure (Red Haired Girl Version, ALT) |
-| XX | 80-092000-101(US) | Alphabet Park Adventure (Blond Haired Girl Version) |
+| XX | 80-092000(US) | Alphabet Park Adventure (red haired girl version) |
+| XX | 80-092000(US) | Alphabet Park Adventure (red haired girl version, ALT) |
+| XX | 80-092000-101(US) | Alphabet Park Adventure (Rev. 101, blond haired girl version) |
| | (IT) | Avventura nel parco dell'alfabeto |
| XX | 80-092002(NL) | Alfabet Pretpark |
| | 80-092003(UK) | Alphabet Park Adventure (Red Haired Girl Version) |
@@ -160,17 +160,17 @@ Regular game cartridges
| XX | 80-092060(US) | Winnie The Pooh: The Honey Hunt |
| XX | 80-092061(IT) | Winnie the Pooh e la caccia al miele |
| | 80-092062(NL) | Winnie de Poeh - De wonderwereld van Poeh |
-| XX | 80-092062-123(NL) | Winnie de Poeh - De wonderwereld van Poeh (cart labeled as "My Friends Tigger and Pooh", 52-092062(NL) on back label)
+| XX | 80-092062-123(NL) | Winnie de Poeh - De wonderwereld van Poeh (Rev. 123, labeled as "My Friends Tigger and Pooh", 52-092062(NL) on back label)
| | 80-092063(UK) | Winnie The Pooh: The Honey Hunt |
| XX | 80-092064(GE) | Pooh - Die Honigjagd |
| | 80-092064(GE) | Pooh - Die Honigjagd (ALT-no# on label) |
| | 80-092064(GE) | My Friends Tigger and Pooh - Die Honigjagd |
-| XX | 80-092064-104(GE) | My Friends Tigger and Pooh - Die Honigjagd |
+| XX | 80-092064-104(GE) | My Friends Tigger and Pooh - Die Honigjagd (Rev. 104) |
| XX | 80-092065(FR) | Winnie l'Ourson - La Chasse au miel de Winnie |
-| XX | 80-092065-105(FR) | Winnie l'Ourson - La Chasse au miel de Winnie (ALT) |
+| XX | 80-092065-105(FR) | Winnie l'Ourson - La Chasse au miel de Winnie (Rev. 105 |
| | 80-092066(PT) | Winnie the Pooh - Em Busca Do Mel (92076 on cart) |
| XX | 80-092067(SP) | Winnie the Pooh - En Busca de la Miel (no # on label, 92067 on PCB) |
-| XX | 80-092067-122(SP) | My Friends Tigger and Pooh - En Busca de la Miel (092067-1 on PCB) |
+| XX | 80-092067-122(SP) | My Friends Tigger and Pooh - En Busca de la Miel (Rev. 122, 092067-1 on PCB) |
| XX | 80-092073(DK) | Peter Plys - Honningjagten |
| XX | 80-092074(SE) | Nalle Puh - Honungsjakten |
| | (NO) | Winnie the Pooh - Honningjakten |
@@ -225,32 +225,32 @@ Regular game cartridges
| | (CN) | 美人鱼梦幻之旅 |
+========+===================+================================================================================================+
| | 80-092140(US) | Spider-Man & Friends - Secret Missions |
-| XX | 80-092140-101(US) | Spider-Man & Friends - Secret Missions (ALT) |
+| XX | 80-092140-101(US) | Spider-Man & Friends - Secret Missions (Rev. 101) |
| XX | 80-092141(IT) | Spider-Man & Friends - Missioni Segrete |
| | 80-092142(NL) | Spider-Man en Vrienden! - Geheime Missies (white Webs) |
-| | 80-092142-123(NL) | Spider-Man en Vrienden! - Geheime Missies (Yellow webs) |
+| | 80-092142-123(NL) | Spider-Man en Vrienden! - Geheime Missies (Rev. 123, Yellow webs) |
| | 80-092143(UK) | Spider-Man & Friends - Secret Missions (no # on front label) |
-| | 80-092143-103(UK) | Spider-Man & Friends - Secret Missions (ALT) |
+| | 80-092143-103(UK) | Spider-Man & Friends - Secret Missions (Rev. 103) |
| XX | 80-092144(GE) | Spider-Man & Freunde - Geheime Missionen |
| XX | 80-092145(FR) | Spider-Man & ses amis - Missions Secrètes (white webs) |
-| XX | 80-092145-105(FR) | Spider-Man & ses amis - Missions Secrètes (yellow webs) |
-| XX | 80-092145-305(FR) | Spider-Man & ses amis - Missions Secrètes |
+| XX | 80-092145-105(FR) | Spider-Man & ses amis - Missions Secrètes (Rev. 105, yellow webs) |
+| XX | 80-092145-305(FR) | Spider-Man & ses amis - Missions Secrètes (Rev. 305) |
| | 80-092146(PT) | Spider-man & Amigos - Missoes Secretas |
| XX | 80-092147(SP) | Spider-Man y Amigos - Misiones Secretas (white webs, 2005) |
-| | 80-092147-122(SP) | Spider-Man y Amigos - Misiones Secretas (yellow webs, 2007) |
-| XX | 80-092147-222(SP) | Spider-Man y Amigos - Misiones Secretas (yellow webs, 2008) |
+| | 80-092147-122(SP) | Spider-Man y Amigos - Misiones Secretas (Rev. 122, yellow webs, 2007) |
+| XX | 80-092147-222(SP) | Spider-Man y Amigos - Misiones Secretas (Rev. 222, yellow webs, 2008) |
+========+===================+================================================================================================+
| XX | 80-092160(US) | Scooby-Doo! - Funland Frenzy |
-| | 80-092160-101(US) | Scooby-Doo! - Funland Frenzy (ALT) |
-| XX | 80-092160-301(US) | Scooby-Doo! - Funland Frenzy (ALT 2) |
+| | 80-092160-101(US) | Scooby-Doo! - Funland Frenzy (Rev. 101) |
+| XX | 80-092160-301(US) | Scooby-Doo! - Funland Frenzy (Rev. 301) |
| XX | 80-092161(IT) | Scooby-Doo! - Avventura a Funland |
| XX | 80-092162(NL) | Scooby-Doo! - Griezelen in het pretpark (52-92162(NL) on back label) |
| XX | 80-092163(UK) | Scooby-Doo! - Funland Frenzy |
-| | 80-092163-103(UK) | Scooby-Doo! - Funland Frenzy |
-| | 80-092163-293(UK) | Scooby-Doo! - Funland Frenzy (Yellow, only Scooby on label might be motion version) |
+| | 80-092163-103(UK) | Scooby-Doo! - Funland Frenzy (Rev. 103) |
+| | 80-092163-293(UK) | Scooby-Doo! - Funland Frenzy (Rev. 293, Yellow, only Scooby on label might be motion version) |
| XX | 80-092164(GE) | Scooby-Doo! - Im Lernpark |
| XX | 80-092165(FR) | Scooby-Doo! - Panique à Funland (same ROM on purple and translucent blue carts) |
-| XX | 80-092165-105(FR) | Scooby-Doo! - Panique à Funland |
+| XX | 80-092165-105(FR) | Scooby-Doo! - Panique à Funland (Rev. 105) |
| XX | 80-092167(SP) | Scooby-Doo - Misterio en el Parque (translucent blue cart) |
| XX | 80-092167(SP) | Scooby-Doo - Misterio en el Parque (purple, # on back label) |
| XX | 80-092173(DK) | Scooby-Doo! - Sjov i forlystelsesparken |
@@ -290,20 +290,20 @@ Regular game cartridges
| XX | 80-092240(US) | Cinderella - Cinderella's Magic Wishes |
| XX | 80-092241(IT) | Cenerentola - I desideri magici di Cenerentola (cart says 52-92251 Ita) |
| XX | 80-092242(NL) | Assepoester - De wonderwereld van Assepoester (2005, 52-092242(NL) on back label) |
-| | 80-092242-123(NL) | Assepoester - De wonderwereld van Assepoester (2007) |
+| | 80-092242-123(NL) | Assepoester - De wonderwereld van Assepoester (Rev. 123, 2007) |
| XX | 80-092243(UK) | Cinderella - Cinderella's Magic Wishes |
-| | 80-092243-103(UK) | Cinderella - Cinderella's Magic Wishes (2007) |
-| | 80-092243-203(UK) | Cinderella - Cinderella's Magic Wishes (2008) |
+| | 80-092243-103(UK) | Cinderella - Cinderella's Magic Wishes (Rev. 103, 2007) |
+| | 80-092243-203(UK) | Cinderella - Cinderella's Magic Wishes (Rev. 203, 2008) |
| XX | 80-092244(GE) | Cinderella - Lernen im Märchenland (2005) |
-| XX | 80-092244-104(GE) | Cinderella - Lernen im Märchenland (2007) |
-| XX | 80-092244-204(GE) | Cinderella - Lernen im Märchenland (2008) (52-092244-205(GER) on back label) |
+| XX | 80-092244-104(GE) | Cinderella - Lernen im Märchenland (Rev. 104, 2007) |
+| XX | 80-092244-204(GE) | Cinderella - Lernen im Märchenland (Rev. 204, 2008) (52-092244-205(GER) on back label) |
| XX | 80-092245(FR) | Cendrillon - Le rêve enchanté de Cendrillon |
-| XX | 80-092245-105(FR) | Cendrillon - Le rêve enchanté de Cendrillon |
-| XX | 80-092245-205(FR) | Cendrillon - Le rêve enchanté de Cendrillon |
+| XX | 80-092245-105(FR) | Cendrillon - Le rêve enchanté de Cendrillon (Rev. 105) |
+| XX | 80-092245-205(FR) | Cendrillon - Le rêve enchanté de Cendrillon (Rev. 205) |
| | 80-092246(PT) | Cinderela - Os Sonhos Magicos da Cinderela (Cart#92256) |
| XX | 80-092247(SP) | La Cenicienta - Los sueños mágicos de Cenicienta (non motion#, but V.Motion in spanish catalog)|
-| XX | 80-092247-122(SP) | La Cenicienta - Los sueños mágicos de Cenicienta (white/light pink cart label background) |
-| XX | 80-092247-222(SP) | La Cenicienta - Los sueños mágicos de Cenicienta (no # on front label, 52-092247-222(SP) on back label, non motion#, but V.Motion in Spanish catalog)
+| XX | 80-092247-122(SP) | La Cenicienta - Los sueños mágicos de Cenicienta (Rev. 122, white/light pink cart label background)
+| XX | 80-092247-222(SP) | La Cenicienta - Los sueños mágicos de Cenicienta (Rev. 222, no # on front label, 52-092247-222(SP) on back label, non motion#, but V.Motion in Spanish catalog)
| XX | 80-092253(DK) | Cinderella - Askepots magiske ønsker |
| XX | 80-092254(SE) | Cinderella - Askungens magiska önskningar |
| | 80-092255(NO) | Cinderella - Askepotts magiske ønsker |
@@ -316,27 +316,27 @@ Regular game cartridges
| XX | 80-092267(SP) | Mundo Elmo - Grandes descubrimientos de Elmo (52-92267(SP) on back label) |
+========+===================+================================================================================================+
| XX | 80-092280(US) | Dora The Explorer - Dora's Fit-it Adventure |
-| | 80-092280-101(US) | Dora The Explorer - Dora's Fit-it Adventure (alt) |
-| XX | 80-092280-201(US) | Dora The Explorer - Dora's Fit-it Adventure (alt 2) |
+| | 80-092280-101(US) | Dora The Explorer - Dora's Fit-it Adventure (Rev. 101) |
+| XX | 80-092280-201(US) | Dora The Explorer - Dora's Fit-it Adventure (Rev. 201) |
| | 80-092282(NL) | Dora - Doras Reparatie Avontuur! |
| XX | 80-092283(UK) | Dora The Explorer - Dora's Fit-it Adventure (same ROM as "80-092280(US)" |
-| XX | 80-092283-103(UK) | Dora The Explorer - Dora's Fit-it Adventure (alt) |
+| XX | 80-092283-103(UK) | Dora The Explorer - Dora's Fit-it Adventure (Rev. 103) |
| | 80-092284(GE) | Dora - Doras Reparatur-Abenteuer |
-| XX | 80-092284-104(GE) | Dora - Doras Reparatur-Abenteuer |
+| XX | 80-092284-104(GE) | Dora - Doras Reparatur-Abenteuer (Rev. 104) |
| XX | 80-092285(FR) | Dora L'Exploratrice - Les aventures de Dora Apprentie Mécano |
-| XX | 80-092285-105(FR) | Dora L'Exploratrice - Les aventures de Dora Apprentie Mécano |
+| XX | 80-092285-105(FR) | Dora L'Exploratrice - Les aventures de Dora Apprentie Mécano (Rev. 105) |
| | 80-092285-1?5(FR) | Dora L'Exploratrice - Les aventures de Dora Apprentie Mécano (NTSC French-Canadian) |
| | 80-092286(PT) | Dora - em busca das pecas perdidas (cart# 92296) |
-| | 80-092287-122(SP) | Dora La Exploradora - La Aventura arregla-todo de Dora |
-| XX | 80-092287-222(SP) | Dora La Exploradora - La Aventura arregla-todo de Dora (purple, no # on front label, 52-092287-222(SP) on back label)
+| | 80-092287-122(SP) | Dora La Exploradora - La Aventura arregla-todo de Dora (Rev. 122) |
+| XX | 80-092287-222(SP) | Dora La Exploradora - La Aventura arregla-todo de Dora (Rev. 222, purple, no # on front label, 52-092287-222(SP) on back label)
+========+===================+================================================================================================+
| XX | 80-092300(US) | Bob the Builder - Bob's Busy Day |
| XX | 80-092303(UK) | Bob the Builder - Bob's Busy Day |
-| | 80-092303-103(UK) | Bob the Builder - Bob's Busy Day (Yellow Label) |
+| | 80-092303-103(UK) | Bob the Builder - Bob's Busy Day (Rev. 103, yellow label) |
| XX | 80-092304(GE) | Bob der Baumeister - Bobs Spannender Arbeitstag |
-| XX | 80-092304-104(GE) | Bob der Baumeister - Bobs Spannender Arbeitstag (52-092304-104(GER) on back label) |
+| XX | 80-092304-104(GE) | Bob der Baumeister - Bobs Spannender Arbeitstag (Rev. 104, 52-092304-104(GER) on back label) |
| | 80-092305(FR) | Bob le Bricoleur: Les P'tits Chantiers de Bob |
-| | 80-092305-105(FR) | Bob le Bricoleur: Les P'tits Chantiers de Bob (ALT) |
+| | 80-092305-105(FR) | Bob le Bricoleur: Les P'tits Chantiers de Bob (Rev. 105, ever released?) |
| | 80-092306(PT) | Bob o Construtor - Um dia Atarefado (92316 on cart) |
| XX | 80-092307(SP) | Bob y sus Amigos - Un día de trabajo |
| XX | 80-092313(DK) | Byggemand Bob - Bobs travle dag |
@@ -348,14 +348,14 @@ Regular game cartridges
| | 80-092323(UK) | The Wiggles - It's Wiggle Time! |
+========+===================+================================================================================================+
| XX | 80-092340(US) | Thomas The Tank - Engines Working Together |
-| | 80-092340-101(US) | Thomas The Tank - Engines Working Together (ALT) |
-| | 80-092342(NL) | Thomas de Stoomlocomotief' - Locomotieven Werken Somen (need pic, even the manual has -123 on cover)
-| | 80-092342-123(NL) | Thomas de Stoomlocomotief' - Locomotieven Werken Somen |
+| | 80-092340-101(US) | Thomas The Tank - Engines Working Together (Rev. 101) |
+| | 80-092342(NL) | Thomas de Stoomlocomotief' - Locomotieven Werken Somen (need pic, even the manual has -123 on cover)
+| | 80-092342-123(NL) | Thomas de Stoomlocomotief' - Locomotieven Werken Somen (Rev. 123) |
| XX | 80-092343(UK) | Thomas and Friends: Engines Working Together |
-| | 80-092343-103(UK) | Thomas and Friends: Engines Working Together (ALT) |
-| | 80-092343-203(UK) | Thomas and Friends: Engines Working Together (ALT) |
+| | 80-092343-103(UK) | Thomas and Friends: Engines Working Together (Rev. 103) |
+| | 80-092343-203(UK) | Thomas and Friends: Engines Working Together (Rev. 203) |
| XX | 80-092344(GE) | Thomas and Seine Freunde - Freunde Halten Zusammen |
-| XX | 80-092344-104(GE) | Thomas and Seine Freunde - Freunde Halten Zusammen |
+| XX | 80-092344-104(GE) | Thomas and Seine Freunde - Freunde Halten Zusammen (Rev. 104) |
| XX | 80-092345(FR) | Thomas et ses Amis - Les locomotives s'entraident |
| | 80-092347(SP) | Thomas and Friends - Juego de Aprendizaje |
| | (DK) | Thomas and Friends - Togene arbejder sammen |
@@ -364,11 +364,11 @@ Regular game cartridges
| | (FI) | Thomas and Friends |
+========+===================+================================================================================================+
| XX | 80-092360(US) | Zayzoo - My Alien Classmate |
-| XX | 80-092360-101(US) | Zayzoo: An Earth Adventure |
+| XX | 80-092360-101(US) | Zayzoo: An Earth Adventure (Rev. 101) |
| | 80-092362(NL) | Zayzoo - Mijn Buitenaardse Vriendje |
| | 80-092363(UK) | Zayzoo - My Alien Classmate (yes, duped#) |
| | 80-092363(UK) | Zayzoo: An Earth Adventure (saw it, can't find pic again) |
-| XX | 80-092363-103(UK) | Zayzoo: An Earth Adventure |
+| XX | 80-092363-103(UK) | Zayzoo: An Earth Adventure (Rev. 103) |
| XX | 80-092364(GE) | Zayzoos Lernall |
| XX | 80-092365(FR) | Zézou - Notre Ami Venu d'Ailleurs |
| XX | 80-092367(SP) | Zayzoo - Mi Amiga del Espacio (52-92367(SP) on back label) |
@@ -431,18 +431,18 @@ Regular game cartridges
+========+===================+================================================================================================+
| XX | 80-092540(US) | Noddy - Detective for a Day |
| XX | 80-092543(UK) | Noddy - Detective for a Day |
-| | 80-092543-103(UK) | Noddy - Detective for a Day (ALT) |
+| | 80-092543-103(UK) | Noddy - Detective for a Day (Rev. 103) |
| | 80-092544(GE) | Noddy - Detektiv fuer einen Tag (need pic to confirm, manual cover says -104) |
-| XX | 80-092544-104(GE) | Noddy - Detektiv fuer einen Tag (ALT) |
+| XX | 80-092544-104(GE) | Noddy - Detektiv fuer einen Tag (Rev. 104) |
| XX | 80-092545(FR) | Oui-Oui - Détective d'un Jour |
-| XX | 80-092545-105(FR) | Oui-Oui - Détective d'un Jour (ALT) |
+| XX | 80-092545-105(FR) | Oui-Oui - Détective d'un Jour (Rev. 105) |
| XX | 80-092556(PT) | Noddy - Detective por um dia (092556(Port) on cart) |
+========+===================+================================================================================================+
| | 80-092560(US) | 101 Dalmations (one pic on german site with USA code) |
| | 80-092564(GE) | 101 Dalmatiner (EAN on german site with USA pic... wtf) |
+========+===================+================================================================================================+
| | 80-092580(US) | Backyardigans - Viking Voyage |
-| | 80-092580-201(US) | Backyardigans - Viking Voyage (ALT) |
+| | 80-092580-201(US) | Backyardigans - Viking Voyage (Rev. 201) |
| | 80-092583(UK) | Backyardigans - Viking Voyage |
| XX | 80-092585(FR) | Les Melodilous - Les explorateurs vikings |
+========+===================+================================================================================================+
@@ -466,13 +466,13 @@ Regular game cartridges
| | (CN) | 超人 - 超级英雄 |
+========+===================+================================================================================================+
| XX | 80-092660(US) | Cars - Rev It Up In Radiator Springs |
-| XX | 80-092660-201(US) | Cars - Rev It Up In Radiator Springs (ALT) |
+| XX | 80-092660-201(US) | Cars - Rev It Up In Radiator Springs (Rev. 201) |
| | (IT) | Cars - Motori Ruggenti (gpz06755) |
| | 80-092662(NL) | Cars - Spektakel in Radiator Springs |
| XX | 80-092663(UK) | Cars - Rev It Up In Radiator Springs |
| XX | 80-092664(GE) | Cars - Vollgas in Radiator Springs |
| XX | 80-092665(FR) | Cars - Quatre Roues |
-| XX | 80-092665-105(FR) | Cars - Quatre Roues |
+| XX | 80-092665-105(FR) | Cars - Quatre Roues (Rev. 105) |
| | 80-092666(PT) | Carros - Aventura em Radiator Springs (92676 on cart) |
| XX | 80-092667(SP) | Cars - Acelera el Motor en Radiador Springs |
| XX | 80-092673(DK) | Biler - Ræs i Kølerkildekøbing |
@@ -513,7 +513,7 @@ Regular game cartridges
| XX | 80-092863(UK) | Shrek the Third: Arthur's School Day Adventure |
| XX | 80-092864(GE) | Shrek der Dritte - Ein Spannender Schultag |
| XX | 80-092865(FR) | Shrek Le Troisième - L'aventure d'Arthur |
-| XX | 80-092865-105(FR) | Shrek Le Troisième - L'aventure d'Arthur |
+| XX | 80-092865-105(FR) | Shrek Le Troisième - L'aventure d'Arthur (Rev. 105) |
| | 80-092867(SP) | Shrek Tercero - En Busca de Arturo |
+========+===================+================================================================================================+
| | 80-092880(US) | Ratatouille - Remy's New Recipes |
@@ -521,7 +521,7 @@ Regular game cartridges
| XX | 80-092882(NL) | Ratatouille - Remy's Nieuwe Recepten (52-092882(NL) on back label) |
| | 80-092883(UK) | Ratatouille - Remy's New Recipes |
| XX | 80-092884(GE) | Ratatouille - Remys neue Rezepte |
-| | 80-092884-104(GE) | Ratatouille - Remys neue Rezepte (ALT) |
+| | 80-092884-104(GE) | Ratatouille - Remys neue Rezepte (Rev. 104) |
| XX | 80-092885(FR) | Ratatouille - Les nouvelles recettes de Rémy |
| XX | 80-092887(SP) | Ratatouille - Las recetas del Remy (52-092887(SP) on back label) |
+========+===================+================================================================================================+
diff --git a/hash/vsmilem_cart.xml b/hash/vsmilem_cart.xml
index 14107ae7405..6dec2497d51 100644
--- a/hash/vsmilem_cart.xml
+++ b/hash/vsmilem_cart.xml
@@ -71,7 +71,7 @@ Language:
| | 80-084140(US) | Spider-Man & Friends - Secret Missions (AKA Professor V's Secret Missions with diff label)|
| | 80-084143(UK) | Spider-Man & Friends - Secret Missions |
| XX | 80-084144(GE) | Spider-Man & Freunde - Geheime Missionen |
-| | 80-084145(FR) | Spider-Man and ses amis - Missions Secretes |
+| XX | 80-084145(FR) | Spider-Man and ses amis - Missions Secrètes |
| | 80-084147(SP) | Spider-Man y Amigos: Misiones Secretas (no # on label) |
+========+===================+===========================================================================================+
| XX | 80-084160(US) | Disney's Little Einsteins: The Glass Slipper Ball (Rev. 2?) |
@@ -85,7 +85,8 @@ Language:
| | 80-084182(NL) | Mickey Mouse Clubhouse |
| | 80-084183(UK) | Mickey Mouse Clubhouse |
| XX | 80-084184(GE) | Micky Maus Wunderhaus |
-| | 80-084185(FR) | La Maison de Mickey |
+| | 80-084185(FR) | La Maison de Mickey (ever released?) |
+| XX | 80-084185-005(FR) | La Maison de Mickey |
| | 80-084186(PT) | A Casa do Mickey Mouse (84196 on cart) |
| XX | 80-084187(SP) | La Casa de Mickey Mouse |
+========+===================+===========================================================================================+
@@ -104,7 +105,7 @@ Language:
| XX | 80-084262(NL) | Mijn Puppy! |
| | 80-084263(UK) | My Pet Puppy |
| XX | 80-084264(GE) | Mein erster Hund |
-| | 80-084265(FR) | Mon Youtou Tout Fou! |
+| XX | 80-084265(FR) | Mon Toutou tout fou! |
| | 80-084267(SP) | Dakota y su Mascota |
+========+===================+===========================================================================================+
| | 80-084280(US) | Wild Waves |
@@ -576,6 +577,19 @@ Language:
</part>
</software>
+ <software name="mickeychmfr005" cloneof="mickeychm" supported="no">
+ <description>Disney La Maison de Mickey (France, Rev. 005)</description>
+ <year>2009?</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="084185-005(FR)" />
+ <part name="cart" interface="vsmile_cart">
+ <feature name="u1" value="" />
+ <dataarea name="rom" size="8388608">
+ <rom name="084185-005 - LaMaisonDeMickey (MOTION) (FR).bin" size="8388608" crc="7d77f657" sha1="90cea293ebd539ac22baa343a1efb771d91ffe4d" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="mickeychms" cloneof="mickeychm" supported="no">
<description>Disney La Casa de Mickey Mouse (Spain)</description>
<year>2009</year>
@@ -677,6 +691,19 @@ Language:
</part>
</software>
+ <software name="mypuppymf" cloneof="mypuppymnl" supported="no">
+ <description>Mon Youtou tout fou! (France)</description>
+ <year>200?</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-084265(FR)" />
+ <part name="cart" interface="vsmile_cart">
+ <feature name="u1" value="" />
+ <dataarea name="rom" size="8388608">
+ <rom name="084265 - MonToutouToutFou (MOTION) (FR).bin" size="8388608" crc="d4bf54aa" sha1="2a411d6bf8c46e67ed29c308ede2b0c740a9d083" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="nascarm" supported="no">
<description>NASCAR Academy - Race Car Superstar (USA)</description>
<year>2009?</year>
@@ -890,6 +917,19 @@ Language:
</part>
</software>
+ <software name="spidermnmf" cloneof="spidermnmg" supported="no">
+ <description>Marvel Spider-Man and ses amis - Missions Secrètes (France)</description>
+ <year>2008</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-084145(FR)" />
+ <part name="cart" interface="vsmile_cart">
+ <feature name="u1" value="" />
+ <dataarea name="rom" size="8388608">
+ <rom name="084145 - SpidermanMissionsSecretes (MOTION) (FR).bin" size="8388608" crc="e5bf01a9" sha1="0216559867626205a8c00c6d64cf64eb239be641" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="spongebmg" supported="no">
<description>Nickelodeon Spongebob Schwammkopf - Der Tag des Schwamms (Germany)</description>
<year>2011</year>
diff --git a/regtests/jedutil/baseline/pal22v10/pal22v10-combinatorial.txt b/regtests/jedutil/baseline/pal22v10/pal22v10-combinatorial.txt
new file mode 100644
index 00000000000..c4fe984a870
--- /dev/null
+++ b/regtests/jedutil/baseline/pal22v10/pal22v10-combinatorial.txt
@@ -0,0 +1,159 @@
+Inputs:
+
+1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
+
+Outputs:
+
+14 (Combinatorial, Output feedback output, Active high)
+15 (Combinatorial, Output feedback output, Active low)
+16 (Combinatorial, Output feedback output, Active low)
+17 (Combinatorial, Output feedback output, Active high)
+18 (Combinatorial, Output feedback output, Active high)
+19 (Combinatorial, Output feedback output, Active low)
+20 (Combinatorial, Output feedback output, Active low)
+21 (Combinatorial, Output feedback output, Active low)
+22 (Combinatorial, Output feedback output, Active low)
+23 (Combinatorial, Output feedback output, Active high)
+
+Equations:
+
+o14 = /i9 +
+ /i8 +
+ /i7 +
+ /i6 +
+ /i5 +
+ /i4 +
+ /i3 +
+ /i2
+o14.oe = vcc
+
+/o15 = i3 +
+ i7 & i8 +
+ i9 & i10 +
+ i11 & i13 +
+ i8 +
+ i4 & i6 +
+ i2 & i5 +
+ /i13 +
+ /i11 +
+ /i10
+o15.oe = vcc
+
+/o16 = /i4 & /i5 & /i6 +
+ i2 & i3 & i11 & i13 +
+ i2 & i3 +
+ /i2 & i3 & /i4 +
+ /i3 & /i4 & /i13 +
+ /i5 & /i11 & /i13 +
+ i11 & i13 +
+ i9 & i10 +
+ i7 & i8 +
+ i5 & i6 +
+ i3 & i4 +
+ i1 & i2
+o16.oe = o14
+
+o17 = /i6 & /i7 & /i8 & /i9 & /i10 +
+ /i1 & /i2 & /i3 & /i4 & /i5 +
+ i1 +
+ i2 +
+ i3 +
+ i4 +
+ i5 +
+ i6 +
+ i7 +
+ i8 +
+ i9 +
+ i10 +
+ i11 +
+ i13
+o17.oe = /o15
+
+o18 = /i7 & /i8 +
+ i1 & i2 & /i5 & /i6 +
+ i13 & /o20 +
+ /i9 & /i10 & /i11 +
+ /i5 & /i6 & o20 +
+ o17 & /o20 +
+ i1 & i3 & /o17 +
+ i9 & i11 +
+ /i7 & /i9 & /i13 +
+ i5 & i6 & /i10 +
+ /i3 & i4 +
+ /i3 & /o17 +
+ i1 & i2 & i4 +
+ /i3 & /i4 & o17 +
+ /i1 & /i2 & o17 +
+ /o17
+o18.oe = /i11 & /i13
+
+/o19 = i4 +
+ i3 +
+ i2 +
+ /i13 +
+ /i11 +
+ /i10 +
+ /i9 +
+ /i8 +
+ /i7 +
+ /i6 +
+ /i5 +
+ /i4 +
+ /i3 +
+ /i2 +
+ /o14 +
+ i1 & o14
+o19.oe = vcc
+
+/o20 = /i8 +
+ /i9 +
+ /i10 +
+ /i11 +
+ /i13 +
+ i13 +
+ i11 +
+ i10 +
+ i9 +
+ i8 +
+ i7 +
+ i6 +
+ i5 +
+ i1 & /i2
+o20.oe = i3 & /i9 & /i10 & i11
+
+/o21 = i5 & /i6 +
+ i4 & /i5 +
+ i3 & /i4 +
+ i2 & /i3 +
+ /i11 & /i13 +
+ /i9 & /i10 +
+ /i7 & /i8 +
+ /i5 & /i6 +
+ /i3 & /i4 +
+ /i2 & /i3 +
+ /o17 & /o23 +
+ i1 & i10
+o21.oe = vcc
+
+/o22 = i9 & i10 & i11 & i13 +
+ i5 & i6 & i7 & i8 +
+ i1 & i2 & i3 & i4 +
+ i11 & /i13 +
+ i10 & /i11 +
+ i9 & /i10 +
+ i8 & /i9 +
+ i7 & /i8 +
+ i6 & /i7 +
+ o23
+o22.oe = /i13
+
+o23 = /i1 & /i2 & /i3 & /i4 & /i5 & /i6 & /i7 & /i8 & /i9 & /i10 & /i11 & /i13 +
+ /i1 & i2 & /i3 & i4 & /i5 & i6 & /i7 & i8 & /i9 & i10 & /i11 & i13 +
+ i1 & /i2 & i3 & /i4 & i5 & /i6 & i7 & /i8 & i9 & /i10 & i11 & /i13 +
+ /i1 & /i13 +
+ /i1 & /i2 & /i3 & /i4 & /i5 & /i6 & /i7 & /i8 & /i9 & /i10 & /i11 & /i13 +
+ /i3 & i4 +
+ i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 & i9 & i10 & i11 & i13 +
+ i3 & /i4
+o23.oe = /o15 & o21
+
diff --git a/regtests/jedutil/baseline/pal22v10/pal22v10-registered.txt b/regtests/jedutil/baseline/pal22v10/pal22v10-registered.txt
new file mode 100644
index 00000000000..d1ef28e28e4
--- /dev/null
+++ b/regtests/jedutil/baseline/pal22v10/pal22v10-registered.txt
@@ -0,0 +1,159 @@
+Inputs:
+
+1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
+
+Outputs:
+
+14 (Registered, Output feedback registered, Active low)
+15 (Registered, Output feedback registered, Active high)
+16 (Registered, Output feedback registered, Active high)
+17 (Registered, Output feedback registered, Active low)
+18 (Registered, Output feedback registered, Active low)
+19 (Registered, Output feedback registered, Active high)
+20 (Registered, Output feedback registered, Active high)
+21 (Registered, Output feedback registered, Active high)
+22 (Registered, Output feedback registered, Active high)
+23 (Registered, Output feedback registered, Active low)
+
+Equations:
+
+/rf14 := i2 +
+ i3 +
+ i4 +
+ i5 +
+ i6 +
+ i7 +
+ i8 +
+ i9
+rf14.oe = /i1
+
+rf15 := i10 +
+ i11 +
+ i13 +
+ /i2 & /i5 +
+ /i4 & /i6 +
+ /i8 +
+ /i11 & /i13 +
+ /i9 & /i10 +
+ /i7 & /i8 +
+ /i3
+rf15.oe = i1
+
+rf16 := /i1 & /i2 +
+ /i3 & /i4 +
+ /i5 & /i6 +
+ /i7 & /i8 +
+ /i9 & /i10 +
+ /i11 & /i13 +
+ i5 & i11 & i13 +
+ i3 & i4 & i13 +
+ i2 & /i3 & i4 +
+ /i2 & /i3 +
+ /i2 & /i3 & /i11 & /i13 +
+ i4 & i5 & i6
+rf16.oe = /rf14
+
+/rf17 := /i13 +
+ /i11 +
+ /i10 +
+ /i9 +
+ /i8 +
+ /i7 +
+ /i6 +
+ /i5 +
+ /i4 +
+ /i3 +
+ /i2 +
+ /i1 +
+ i1 & i2 & i3 & i4 & i5 +
+ i6 & i7 & i8 & i9 & i10
+rf17.oe = vcc
+
+/rf18 := rf17 +
+ i1 & i2 & /rf17 +
+ i3 & i4 & /rf17 +
+ /i1 & /i2 & /i4 +
+ i3 & rf17 +
+ i3 & /i4 +
+ /i5 & /i6 & i10 +
+ i7 & i9 & i13 +
+ /i9 & /i11 +
+ /i1 & /i3 & rf17 +
+ /rf17 & /rf20 +
+ i5 & i6 & rf20 +
+ i9 & i10 & i11 +
+ /i13 & /rf20 +
+ /i1 & /i2 & i5 & i6 +
+ i7 & i8
+rf18.oe = i11 & i13
+
+rf19 := /i1 & /rf14 +
+ rf14 +
+ i2 +
+ i3 +
+ i4 +
+ i5 +
+ i6 +
+ i7 +
+ i8 +
+ i9 +
+ i10 +
+ i11 +
+ i13 +
+ /i2 +
+ /i3 +
+ /i4
+rf19.oe = /i3 & i9 & i10 & /i11
+
+rf20 := /i1 & i2 +
+ /i5 +
+ /i6 +
+ /i7 +
+ /i8 +
+ /i9 +
+ /i10 +
+ /i11 +
+ /i13 +
+ i13 +
+ i11 +
+ i10 +
+ i9 +
+ i8
+rf20.oe = vcc
+
+rf21 := /i1 & /i10 +
+ rf17 & rf23 +
+ i2 & i3 +
+ i3 & i4 +
+ i5 & i6 +
+ i7 & i8 +
+ i9 & i10 +
+ i11 & i13 +
+ /i2 & i3 +
+ /i3 & i4 +
+ /i4 & i5 +
+ /i5 & i6
+rf21.oe = i13
+
+rf22 := /rf23 +
+ /i6 & i7 +
+ /i7 & i8 +
+ /i8 & i9 +
+ /i9 & i10 +
+ /i10 & i11 +
+ /i11 & i13 +
+ /i1 & /i2 & /i3 & /i4 +
+ /i5 & /i6 & /i7 & /i8 +
+ /i9 & /i10 & /i11 & /i13
+rf22.oe = vcc
+
+/rf23 := /i3 & i4 +
+ /i1 & /i2 & /i3 & /i4 & /i5 & /i6 & /i7 & /i8 & /i9 & /i10 & /i11 & /i13 +
+ i3 & /i4 +
+ i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 & i9 & i10 & i11 & i13 +
+ i1 & i13 +
+ /i1 & i2 & /i3 & i4 & /i5 & i6 & /i7 & i8 & /i9 & i10 & /i11 & i13 +
+ i1 & /i2 & i3 & /i4 & i5 & /i6 & i7 & /i8 & i9 & /i10 & i11 & /i13 +
+ i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 & i9 & i10 & i11 & i13
+rf23.oe = vcc
+
diff --git a/regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-combinatorial.pds b/regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-combinatorial.pds
new file mode 100644
index 00000000000..a54f6a5fb32
--- /dev/null
+++ b/regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-combinatorial.pds
@@ -0,0 +1,180 @@
+TITLE PAL22V10 Combinatorial Test
+PATTERN A
+REVISION 1.0
+AUTHOR MAMEDev
+COMPANY MAMEDev
+DATE 3/24/2020
+
+CHIP PAL22V10Test1 PAL22V10
+
+;---------------------------------- PIN Declarations ---------------
+PIN 1 I1 COMBINATORIAL ;
+PIN 2 I2 COMBINATORIAL ;
+PIN 3 I3 COMBINATORIAL ;
+PIN 4 I4 COMBINATORIAL ;
+PIN 5 I5 COMBINATORIAL ;
+PIN 6 I6 COMBINATORIAL ;
+PIN 7 I7 COMBINATORIAL ;
+PIN 8 I8 COMBINATORIAL ;
+PIN 9 I9 COMBINATORIAL ;
+PIN 10 I10 COMBINATORIAL ;
+PIN 11 I11 COMBINATORIAL ;
+PIN 12 GND ;
+PIN 13 I13 COMBINATORIAL ;
+PIN 14 O14 COMBINATORIAL ;
+PIN 15 O15 COMBINATORIAL ;
+PIN 16 O16 COMBINATORIAL ;
+PIN 17 O17 COMBINATORIAL ;
+PIN 18 O18 COMBINATORIAL ;
+PIN 19 O19 COMBINATORIAL ;
+PIN 20 O20 COMBINATORIAL ;
+PIN 21 O21 COMBINATORIAL ;
+PIN 22 O22 COMBINATORIAL ;
+PIN 23 O23 COMBINATORIAL ;
+PIN 24 VCC ;
+
+EQUATIONS
+
+O14 = /I9 +
+ /I8 +
+ /I7 +
+ /I6 +
+ /I5 +
+ /I4 +
+ /I3 +
+ /I2
+O14.TRST = VCC
+
+/O15 = I3 +
+ I7 * I8 +
+ I9 * I10 +
+ I11 * I13 +
+ I8 +
+ I4 * I6 +
+ I2 * I5 +
+ /I13 +
+ /I11 +
+ /I10
+O15.TRST = VCC
+
+/O16 = /I4 * /I5 * /I6 +
+ I2 * I3 * I11 * I13 +
+ I2 * I3 +
+ /I2 * I3 * /I4 +
+ /I3 * /I4 * /I13 +
+ /I5 * /I11 * /I13 +
+ I11 * I13 +
+ I9 * I10 +
+ I7 * I8 +
+ I5 * I6 +
+ I3 * I4 +
+ I1 * I2
+O16.TRST = O14
+
+O17 = /I6 * /I7 * /I8 * /I9 * /I10 +
+ /I1 * /I2 * /I3 * /I4 * /I5 +
+ I1 +
+ I2 +
+ I3 +
+ I4 +
+ I5 +
+ I6 +
+ I7 +
+ I8 +
+ I9 +
+ I10 +
+ I11 +
+ I13
+O17.TRST = /O15
+
+O18 = /I7 * /I8 +
+ I1 * I2 * /I5 * /I6 +
+ I13 * /O20 +
+ /I9 * /I10 * /I11 +
+ /I5 * /I6 * O20 +
+ O17 * /O20 +
+ I1 * I3 * /O17 +
+ I9 * I11 +
+ /I7 * /I9 * /I13 +
+ I5 * I6 * /I10 +
+ /I3 * I4 +
+ /I3 * /O17 +
+ I1 * I2 * I4 +
+ /I3 * /I4 * O17 +
+ /I1 * /I2 * O17 +
+ /O17
+O18.TRST = /I11 * /I13
+
+/O19 = I4 +
+ I3 +
+ I2 +
+ /I13 +
+ /I11 +
+ /I10 +
+ /I9 +
+ /I8 +
+ /I7 +
+ /I6 +
+ /I5 +
+ /I4 +
+ /I3 +
+ /I2 +
+ /O14 +
+ I1 * O14
+O19.TRST = VCC
+
+/O20 = /I8 +
+ /I9 +
+ /I10 +
+ /I11 +
+ /I13 +
+ I13 +
+ I11 +
+ I10 +
+ I9 +
+ I8 +
+ I7 +
+ I6 +
+ I5 +
+ I1 * /I2
+O20.TRST = I3 * /I9 * /I10 * I11
+
+/O21 = I5 * /I6 +
+ I4 * /I5 +
+ I3 * /I4 +
+ I2 * /I3 +
+ /I11 * /I13 +
+ /I9 * /I10 +
+ /I7 * /I8 +
+ /I5 * /I6 +
+ /I3 * /I4 +
+ /I2 * /I3 +
+ /O17 * /O23 +
+ I1 * I10
+O21.TRST = VCC
+
+/O22 = I9 * I10 * I11 * I13 +
+ I5 * I6 * I7 * I8 +
+ I1 * I2 * I3 * I4 +
+ I11 * /I13 +
+ I10 * /I11 +
+ I9 * /I10 +
+ I8 * /I9 +
+ I7 * /I8 +
+ I6 * /I7 +
+ O23
+O22.TRST = /I13
+
+O23 = /I1 * /I2 * /I3 * /I4 * /I5 * /I6 * /I7 * /I8 * /I9 * /I10 * /I11 * /I13 +
+ /I1 * I2 * /I3 * I4 * /I5 * I6 * /I7 * I8 * /I9 * I10 * /I11 * I13 +
+ I1 * /I2 * I3 * /I4 * I5 * /I6 * I7 * /I8 * I9 * /I10 * I11 * /I13 +
+ /I1 * /I13 +
+ /I1 * /I2 * /I3 * /I4 * /I5 * /I6 * /I7 * /I8 * /I9 * /I10 * /I11 * /I13 +
+ /I3 * I4 +
+ I1 * I2 * I3 * I4 * I5 * I6 * I7 * I8 * I9 * I10 * I11 * I13 +
+ I3 * /I4
+O23.TRST = /O15 * O21
+
+SIMULATION
+
+
diff --git a/regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-registered.pds b/regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-registered.pds
new file mode 100644
index 00000000000..40101536757
--- /dev/null
+++ b/regtests/jedutil/eqns/PALASM/pal22v10/pal22v10-registered.pds
@@ -0,0 +1,180 @@
+TITLE PAL22V10 Registered Test
+PATTERN A
+REVISION 1.0
+AUTHOR MAMEDev
+COMPANY MAMEDev
+DATE 3/23/2020
+
+CHIP PAL22V10Test2 PAL22V10
+
+;---------------------------------- PIN Declarations ---------------
+PIN 1 I1 COMBINATORIAL ;
+PIN 2 I2 COMBINATORIAL ;
+PIN 3 I3 COMBINATORIAL ;
+PIN 4 I4 COMBINATORIAL ;
+PIN 5 I5 COMBINATORIAL ;
+PIN 6 I6 COMBINATORIAL ;
+PIN 7 I7 COMBINATORIAL ;
+PIN 8 I8 COMBINATORIAL ;
+PIN 9 I9 COMBINATORIAL ;
+PIN 10 I10 COMBINATORIAL ;
+PIN 11 I11 COMBINATORIAL ;
+PIN 12 GND ;
+PIN 13 I13 COMBINATORIAL ;
+PIN 14 RF14 REGISTERED ;
+PIN 15 RF15 REGISTERED ;
+PIN 16 RF16 REGISTERED ;
+PIN 17 RF17 REGISTERED ;
+PIN 18 RF18 REGISTERED ;
+PIN 19 RF19 REGISTERED ;
+PIN 20 RF20 REGISTERED ;
+PIN 21 RF21 REGISTERED ;
+PIN 22 RF22 REGISTERED ;
+PIN 23 RF23 REGISTERED ;
+PIN 24 VCC ;
+
+EQUATIONS
+
+/RF14 := I2 +
+ I3 +
+ I4 +
+ I5 +
+ I6 +
+ I7 +
+ I8 +
+ I9
+RF14.TRST = /I1
+
+RF15 := I10 +
+ I11 +
+ I13 +
+ /I2 * /I5 +
+ /I4 * /I6 +
+ /I8 +
+ /I11 * /I13 +
+ /I9 * /I10 +
+ /I7 * /I8 +
+ /I3
+RF15.TRST = I1
+
+RF16 := /I1 * /I2 +
+ /I3 * /I4 +
+ /I5 * /I6 +
+ /I7 * /I8 +
+ /I9 * /I10 +
+ /I11 * /I13 +
+ I5 * I11 * I13 +
+ I3 * I4 * I13 +
+ I2 * /I3 * I4 +
+ /I2 * /I3 +
+ /I2 * /I3 * /I11 * /I13 +
+ I4 * I5 * I6
+RF16.TRST = /RF14
+
+/RF17 := /I13 +
+ /I11 +
+ /I10 +
+ /I9 +
+ /I8 +
+ /I7 +
+ /I6 +
+ /I5 +
+ /I4 +
+ /I3 +
+ /I2 +
+ /I1 +
+ I1 * I2 * I3 * I4 * I5 +
+ I6 * I7 * I8 * I9 * I10
+RF17.TRST = VCC
+
+/RF18 := RF17 +
+ I1 * I2 * /RF17 +
+ I3 * I4 * /RF17 +
+ /I1 * /I2 * /I4 +
+ I3 * RF17 +
+ I3 * /I4 +
+ /I5 * /I6 * I10 +
+ I7 * I9 * I13 +
+ /I9 * /I11 +
+ /I1 * /I3 * RF17 +
+ /RF17 * RF20 +
+ I5 * I6 * /RF20 +
+ I9 * I10 * I11 +
+ /I13 * RF20 +
+ /I1 * /I2 * I5 * I6 +
+ I7 * I8
+RF18.TRST = I11 * I13
+
+RF19 := /I1 * /RF14 +
+ RF14 +
+ I2 +
+ I3 +
+ I4 +
+ I5 +
+ I6 +
+ I7 +
+ I8 +
+ I9 +
+ I10 +
+ I11 +
+ I13 +
+ /I2 +
+ /I3 +
+ /I4
+RF19.TRST = /I3 * I9 * I10 * /I11
+
+RF20 := /I1 * I2 +
+ /I5 +
+ /I6 +
+ /I7 +
+ /I8 +
+ /I9 +
+ /I10 +
+ /I11 +
+ /I13 +
+ I13 +
+ I11 +
+ I10 +
+ I9 +
+ I8
+RF20.TRST = VCC
+
+RF21 := /I1 * /I10 +
+ RF17 * RF23 +
+ I2 * I3 +
+ I3 * I4 +
+ I5 * I6 +
+ I7 * I8 +
+ I9 * I10 +
+ I11 * I13 +
+ /I2 * I3 +
+ /I3 * I4 +
+ /I4 * I5 +
+ /I5 * I6
+RF21.TRST = I13
+
+RF22 := /RF23 +
+ /I6 * I7 +
+ /I7 * I8 +
+ /I8 * I9 +
+ /I9 * I10 +
+ /I10 * I11 +
+ /I11 * I13 +
+ /I1 * /I2 * /I3 * /I4 +
+ /I5 * /I6 * /I7 * /I8 +
+ /I9 * /I10 * /I11 * /I13
+RF22.TRST = VCC
+
+/RF23 := /I3 * I4 +
+ /I1 * /I2 * /I3 * /I4 * /I5 * /I6 * /I7 * /I8 * /I9 * /I10 * /I11 * /I13 +
+ I3 * /I4 +
+ I1 * I2 * I3 * I4 * I5 * I6 * I7 * I8 * I9 * I10 * I11 * I13 +
+ I1 * I13 +
+ /I1 * I2 * /I3 * I4 * /I5 * I6 * /I7 * I8 * /I9 * I10 * /I11 * I13 +
+ I1 * /I2 * I3 * /I4 * I5 * /I6 * I7 * /I8 * I9 * /I10 * I11 * /I13 +
+ I1 * I2 * I3 * I4 * I5 * I6 * I7 * I8 * I9 * I10 * I11 * I13
+RF23.TRST = VCC
+
+SIMULATION
+
+
diff --git a/regtests/jedutil/jeds/pal22v10/pal22v10-combinatorial.jed b/regtests/jedutil/jeds/pal22v10/pal22v10-combinatorial.jed
new file mode 100644
index 00000000000..72bf4fe895e
--- /dev/null
+++ b/regtests/jedutil/jeds/pal22v10/pal22v10-combinatorial.jed
@@ -0,0 +1,150 @@
+
+PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
+ (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
+
+
+TITLE :PAL22V10 Combinatorial TestAUTHOR :MAMEDev
+PATTERN :A COMPANY:MAMEDev
+REVISION:1.0 DATE :3/24/2020
+
+
+PAL22V10
+PAL22V10TEST1*
+QP24*
+QF5828*
+G0*F0*
+L0000 00000000000000000000000000000000000000000000*
+L0044 11111111110111111111111111111111111011111111*
+L0088 10111011101110111011101110111011101110111010*
+L0132 10110111101101111011011110110111101101111001*
+L0176 01111011011110110111101101111011011110110110*
+L0220 10111111111111111111111111111111111111111110*
+L0264 10111011101110111011101110111011101110111010*
+L0308 11111111101101111111111111111111111111111111*
+L0352 01110111011101110111011101110111011101110101*
+L0396 11111111011110111111111111111111111111111111*
+L0440 11111111111111111111111111111111111111111110*
+L0484 11111111111111111111111111111111011101110101*
+L0528 11111111111111110111011101110111111111111111*
+L0572 01110111011101111111111111111111111111111111*
+L0616 11111111111111111111111111111111111111110110*
+L0660 11111111111111111111111111111111111101111011*
+L0704 11111111111111111111111111111111011110111111*
+L0748 11111111111111111111111111110111101111111111*
+L0792 11111111111111111111111101111011111111111111*
+L0836 11111111111111111111011110111111111111111111*
+L0880 11011111111111111111111111111111111111111111*
+L0924 11111111111111111111111111111111111111111111*
+L0968 11111111111111110111101111111111111111111111*
+L1012 11111111111101111011111111111111111111111111*
+L1056 11111111011110111111111111111111111111111111*
+L1100 11110111101111111111111111111111111111111111*
+L1144 11111111111111111111111111111111111111111010*
+L1188 11111111111111111111111111111111101110111111*
+L1232 11111111111111111111111110111011111111111111*
+L1276 11111111111111111011101111111111111111111111*
+L1320 11111111101110111111111111111111111111111111*
+L1364 11111011101111111111111111111111111111111111*
+L1408 11101111111111111111111111101111111111111111*
+L1452 01111111111111111111111111111111111101111111*
+L1496 11111111011111111111111111111111101110110111*
+L1540 11111111111111111111111111111011111111111111*
+L1584 11111111111111111111111111111111101111111111*
+L1628 11111111111111111111111111111111111110111111*
+L1672 11111111111111111111111111111111111111111011*
+L1716 11111111111111111111111111111111111111111110*
+L1760 11111111111111111111111111111111111111111101*
+L1804 11111111111111111111111111111111111111110111*
+L1848 11111111111111111111111111111111111101111111*
+L1892 11111111111111111111111111111111011111111111*
+L1936 11111111111111111111111111110111111111111111*
+L1980 11111111111111111111111101111111111111111111*
+L2024 11111111111111111111011111111111111111111111*
+L2068 11111111111111110111111111111111111111111111*
+L2112 01111011111111111111111111111111111111111111*
+L2156 11111111111111111111111111111111111111111111*
+L2200 11111111111101111111111111111111111111111111*
+L2244 11111111011111111111111111111111111111111111*
+L2288 11110111111111111111111111111111111111111111*
+L2332 11111111111111111111111111111111111111111110*
+L2376 11111111111111111111111111111111111111111011*
+L2420 11111111111111111111111111111111111110111111*
+L2464 11111111111111111111111111111111101111111111*
+L2508 11111111111111111111111111111011111111111111*
+L2552 11111111111111111111111110111111111111111111*
+L2596 11111111111111111111101111111111111111111111*
+L2640 11111111111111111011111111111111111111111111*
+L2684 11111111111110111111111111111111111111111111*
+L2728 11111111101111111111111111111111111111111111*
+L2772 11111011111111111111111111111111111111111111*
+L2816 11111111111111111111111111111111111111101111*
+L2860 01111111111111111111111111111111111111011111*
+L2904 11111111111111111111111111111111111111111010*
+L2948 11111111111111111111111110111011111111111111*
+L2992 01110111111111111011101111111111111111111111*
+L3036 11111111111111101111111111111111111111111101*
+L3080 11111111111111111111111111111111101110111011*
+L3124 11111111111111011011101111111111111111111111*
+L3168 11111111111111101111111111011111111111111111*
+L3212 01111111011111111111111111101111111111111111*
+L3256 11111111111111111111111111111111011111110111*
+L3300 11111111111111111111111110111111101111111110*
+L3344 11111111111111110111011111111111111110111111*
+L3388 11111111101101111111111111111111111111111111*
+L3432 11111111101111111111111111101111111111111111*
+L3476 01110111111101111111111111111111111111111111*
+L3520 11111111101110111111111111011111111111111111*
+L3564 10111011111111111111111111011111111111111111*
+L3608 11111111111111111111111111101111111111111111*
+L3652 11111111111111111111111111111111111011111111*
+L3696 11111111111111111111101110111011101110111111*
+L3740 10111011101110111011111111111111111111111111*
+L3784 01111111111111111111111111111111111111111111*
+L3828 11110111111111111111111111111111111111111111*
+L3872 11111111011111111111111111111111111111111111*
+L3916 11111111111101111111111111111111111111111111*
+L3960 11111111111111110111111111111111111111111111*
+L4004 11111111111111111111011111111111111111111111*
+L4048 11111111111111111111111101111111111111111111*
+L4092 11111111111111111111111111110111111111111111*
+L4136 11111111111111111111111111111111011111111111*
+L4180 11111111111111111111111111111111111101111111*
+L4224 11111111111111111111111111111111111111110111*
+L4268 11111111111111111111111111111111111111111101*
+L4312 11111111111111111111111111111111111111011111*
+L4356 11111111111110111011101111111111111111111111*
+L4400 11110111011111111111111111111111111111110101*
+L4444 11110111011111111111111111111111111111111111*
+L4488 11111011011110111111111111111111111111111111*
+L4532 11111111101110111111111111111111111111111110*
+L4576 11111111111111111011111111111111111111111010*
+L4620 11111111111111111111111111111111111111110101*
+L4664 11111111111111111111111111111111011101111111*
+L4708 11111111111111111111111101110111111111111111*
+L4752 11111111111111110111011111111111111111111111*
+L4796 11111111011101111111111111111111111111111111*
+L4840 01110111111111111111111111111111111111111111*
+L4884 11111111111111111111111111111111111111111111*
+L4928 11111111011111111111111111111111111111111111*
+L4972 11111111111111111111111101110111111111111111*
+L5016 11111111111111111111111111111111011101111111*
+L5060 11111111111111111111111111111111111111110101*
+L5104 11111111111111111111111111110111111111111111*
+L5148 11111111111101111111011111111111111111111111*
+L5192 11110111111111110111111111111111111111111111*
+L5236 11111111111111111111111111111111111111111110*
+L5280 11111111111111111111111111111111111111111011*
+L5324 11111111111111111111111111111111111110111111*
+L5368 11111111111111111111111111111111111111111111*
+L5412 11111111111111111111111111111111101111111111*
+L5456 11111111111111111111111111111011111111111111*
+L5500 11111111111111111111111110111111111111111111*
+L5544 11111111111111111111101111111111111111111111*
+L5588 11111111111111111011111111111111111111111111*
+L5632 11111111111110111111111111111111111111111111*
+L5676 11111111101111111111111111111111111111111111*
+L5720 11111011111111111111111111111111111111111111*
+L5764 00000000000000000000000000000000000000000000*
+L5808 11010101011111010111*
+CB5B2*
+2B25
diff --git a/regtests/jedutil/jeds/pal22v10/pal22v10-registered.jed b/regtests/jedutil/jeds/pal22v10/pal22v10-registered.jed
new file mode 100644
index 00000000000..454d92fab2f
--- /dev/null
+++ b/regtests/jedutil/jeds/pal22v10/pal22v10-registered.jed
@@ -0,0 +1,150 @@
+
+PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
+ (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
+
+
+TITLE :PAL22V10 Test 2 AUTHOR :MAMEDev
+PATTERN :A COMPANY:MAMEDev
+REVISION:1.0 DATE :3/23/2020
+
+
+PAL22V10
+PAL22V10TEST2*
+QP24*
+QF5828*
+G0*F0*
+L0000 00000000000000000000000000000000000000000000*
+L0044 11111111111111111111111111111111111111111111*
+L0088 11111111101101111111111111111111111111111111*
+L0132 10111011101110111011101110111011101110111010*
+L0176 11111111011110111111111111111111111111111111*
+L0220 01110111011101110111011101110111011101110101*
+L0264 01111111111111111111111111111111111111111101*
+L0308 10110111101101111011011110110111101101111001*
+L0352 01111011011110110111101101111011011110110110*
+L0396 01110111011101110111011101110111011101110101*
+L0440 11111111111111111111111111111111111111111111*
+L0484 11101111111111111111111111111111111111111111*
+L0528 11111111111111111111101101111111111111111111*
+L0572 11111111111111111111111110110111111111111111*
+L0616 11111111111111111111111111111011011111111111*
+L0660 11111111111111111111111111111111101101111111*
+L0704 11111111111111111111111111111111111110110111*
+L0748 11111111111111111111111111111111111111111001*
+L0792 10111011101110111111111111111111111111111111*
+L0836 11111111111111111011101110111011111111111111*
+L0880 11111111111111111111111111111111101110111010*
+L0924 11111111111111111111111111111111111111111101*
+L0968 10111111111111111111111111111111111110111111*
+L1012 11011111111111111111111111011111111111111111*
+L1056 11110111011111111111111111111111111111111111*
+L1100 11111111011101111111111111111111111111111111*
+L1144 11111111111111110111011111111111111111111111*
+L1188 11111111111111111111111101110111111111111111*
+L1232 11111111111111111111111111111111011101111111*
+L1276 11111111111111111111111111111111111111110101*
+L1320 11111011011111111111111111111111111111111111*
+L1364 11111111101101111111111111111111111111111111*
+L1408 11111111111110110111111111111111111111111111*
+L1452 11111111111111111011011111111111111111111111*
+L1496 11111111111111111111111111111111111111111111*
+L1540 10110111111111111111111111111111111111111111*
+L1584 11111111111111111011111111111111111111111111*
+L1628 11111111111111111111101111111111111111111111*
+L1672 11111111111111111111111110111111111111111111*
+L1716 11111111111111111111111111111011111111111111*
+L1760 11111111111111111111111111111111101111111111*
+L1804 11111111111111111111111111111111111110111111*
+L1848 11111111111111111111111111111111111111111011*
+L1892 11111111111111111111111111111111111111111110*
+L1936 11111111111111111111111111111111111111111101*
+L1980 11111111111111111111111111111111111111110111*
+L2024 11111111111111111111111111111111111101111111*
+L2068 11111111111111111111111111111111011111111111*
+L2112 11111111111111111111111111110111111111111111*
+L2156 11111111101111111111111111111111011101111011*
+L2200 10111111111111111111111111111111111111101111*
+L2244 11111111111111111111111111111111111111011111*
+L2288 11110111111111111111111111111111111111111111*
+L2332 11111111011111111111111111111111111111111111*
+L2376 11111111111101111111111111111111111111111111*
+L2420 11111111111111110111111111111111111111111111*
+L2464 11111111111111111111011111111111111111111111*
+L2508 11111111111111111111111101111111111111111111*
+L2552 11111111111111111111111111110111111111111111*
+L2596 11111111111111111111111111111111011111111111*
+L2640 11111111111111111111111111111111111101111111*
+L2684 11111111111111111111111111111111111111110111*
+L2728 11111111111111111111111111111111111111111101*
+L2772 11111011111111111111111111111111111111111111*
+L2816 11111111101111111111111111111111111111111111*
+L2860 11111111111110111111111111111111111111111111*
+L2904 11111111111111111111111111111111111111110101*
+L2948 11111111111111111111111111011111111111111111*
+L2992 01110111111111111111111111101111111111111111*
+L3036 11111111011101111111111111101111111111111111*
+L3080 10111011111110111111111111111111111111111111*
+L3124 11111111011111111111111111011111111111111111*
+L3168 11111111011110111111111111111111111111111111*
+L3212 11111111111111111011101111111111111101111111*
+L3256 11111111111111111111111101111111011111111101*
+L3300 11111111111111111111111111111111101111111011*
+L3344 10111111101111111111111111011111111111111111*
+L3388 11111111111111101111111111101111111111111111*
+L3432 11111111111111010111011111111111111111111111*
+L3476 11111111111111111111111111111111011101110111*
+L3520 11111111111111101111111111111111111111111110*
+L3564 10111011111111110111011111111111111111111111*
+L3608 11111111111111111111111101110111111111111111*
+L3652 11111111111111111111111111111111111111111111*
+L3696 11111111111111111111111111111111111111111110*
+L3740 11111111111111111111111111111111111111111011*
+L3784 11111111111111111111111111111111111110111111*
+L3828 11111111111111111111111111111111101111111111*
+L3872 11111111111111111111111111111011111111111111*
+L3916 11111111111111111111111110111111111111111111*
+L3960 11111111111111111111101111111111111111111111*
+L4004 11111111111111111011111111111111111111111111*
+L4048 11111111111110111111111111111111111111111111*
+L4092 11111111101111111111111111111111111111111111*
+L4136 11111011111111111111111111111111111111111111*
+L4180 10111111111111111111111111111111111111111111*
+L4224 01110111011101110111111111111111111111111111*
+L4268 11111111111111111111011101110111011101111111*
+L4312 11111111111111111111111111111111111111101111*
+L4356 10111011111111111111111111111111111111111111*
+L4400 11111111101110111111111111111111111111111111*
+L4444 11111111111111111011101111111111111111111111*
+L4488 11111111111111111111111110111011111111111111*
+L4532 11111111111111111111111111111111101110111111*
+L4576 11111111111111111111111111111111111111111010*
+L4620 11111111111111110111111111111111111111110101*
+L4664 11111111011101111111111111111111111111111101*
+L4708 11110111101101111111111111111111111111111111*
+L4752 11111011101111111111111111111111111111111111*
+L4796 11111011101111111111111111111111111111111010*
+L4840 11111111111101110111011111111111111111111111*
+L4884 01111111111111111111111111111111111111111111*
+L4928 11111111111111111111111111111111111101111111*
+L4972 11111111111111111111111111111111111111110111*
+L5016 11111111111111111111111111111111111111111101*
+L5060 11111011111111111011111111111111111111111111*
+L5104 11111111111110111111101111111111111111111111*
+L5148 11111111111111111111111111111011111111111111*
+L5192 11111111111111111111111111111111111111111010*
+L5236 11111111111111111111111111111111101110111111*
+L5280 11111111111111111111111110111011111111111111*
+L5324 11111111101111111111111111111111111111111111*
+L5368 10111111111111111111111111111111111111111111*
+L5412 11110111111111111111111111111111111111111111*
+L5456 11111111011111111111111111111111111111111111*
+L5500 11111111111101111111111111111111111111111111*
+L5544 11111111111111110111111111111111111111111111*
+L5588 11111111111111111111011111111111111111111111*
+L5632 11111111111111111111111101111111111111111111*
+L5676 11111111111111111111111111110111111111111111*
+L5720 11111111111111111111111111111111011111111111*
+L5764 00000000000000000000000000000000000000000000*
+L5808 00101010100000101000*
+CB42D*
+2B20
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index 774511e1881..95d65cd8f70 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -198,23 +198,6 @@ if (CPUS["AMIS2000"]~=null or _OPTIONS["with-tools"]) then
end
--------------------------------------------------
--- Alpha 8201
---@src/devices/cpu/alph8201/alph8201.h,CPUS["ALPHA8201"] = true
---------------------------------------------------
-
-if (CPUS["ALPHA8201"]~=null) then
- files {
- MAME_DIR .. "src/devices/cpu/alph8201/alph8201.cpp",
- MAME_DIR .. "src/devices/cpu/alph8201/alph8201.h",
- }
-end
-
-if (CPUS["ALPHA8201"]~=null or _OPTIONS["with-tools"]) then
- table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/alph8201/8201dasm.cpp")
- table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/alph8201/8201dasm.h")
-end
-
---------------------------------------------------
-- Analog Devices ADSP21xx series
--@src/devices/cpu/adsp2100/adsp2100.h,CPUS["ADSP21XX"] = true
--------------------------------------------------
@@ -701,6 +684,31 @@ if (CPUS["H8"]~=null or _OPTIONS["with-tools"]) then
end
--------------------------------------------------
+-- Hitachi H8/500 series
+--@src/devices/cpu/h8500/h8500.h,CPUS["H8500"] = true
+--------------------------------------------------
+
+if (CPUS["H8500"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/cpu/h8500/h8500.cpp",
+ MAME_DIR .. "src/devices/cpu/h8500/h8500.h",
+ MAME_DIR .. "src/devices/cpu/h8500/h8510.cpp",
+ MAME_DIR .. "src/devices/cpu/h8500/h8510.h",
+ MAME_DIR .. "src/devices/cpu/h8500/h8520.cpp",
+ MAME_DIR .. "src/devices/cpu/h8500/h8520.h",
+ MAME_DIR .. "src/devices/cpu/h8500/h8532.cpp",
+ MAME_DIR .. "src/devices/cpu/h8500/h8532.h",
+ MAME_DIR .. "src/devices/cpu/h8500/h8534.cpp",
+ MAME_DIR .. "src/devices/cpu/h8500/h8534.h",
+ }
+end
+
+if (CPUS["H8500"]~=null or _OPTIONS["with-tools"]) then
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/h8500/h8500dasm.cpp")
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/h8500/h8500dasm.h")
+end
+
+--------------------------------------------------
-- Hitachi HCD62121
--@src/devices/cpu/hcd62121/hcd62121.h,CPUS["HCD62121"] = true
--------------------------------------------------
@@ -1291,6 +1299,16 @@ if (CPUS["PIC16C62X"]~=null or _OPTIONS["with-tools"]) then
end
--------------------------------------------------
+-- Generic PIC16 - Disassembler only
+--@src/devices/cpu/pic16/pic16.h,CPUS["PIC16"] = true
+--------------------------------------------------
+
+if (CPUS["PIC16"]~=null or _OPTIONS["with-tools"]) then
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/pic16/pic16d.cpp")
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/pic16/pic16d.h")
+end
+
+--------------------------------------------------
-- MIPS R3000 (MIPS I/II) series
--@src/devices/cpu/mips/mips1.h,CPUS["MIPS1"] = true
--------------------------------------------------
@@ -3200,3 +3218,13 @@ if (CPUS["KS0164"]~=null or _OPTIONS["with-tools"]) then
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/ks0164/ks0164d.cpp")
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/ks0164/ks0164d.h")
end
+
+--------------------------------------------------
+-- uPD177x - Disassembler only
+--@src/devices/cpu/upd177x/upd177x.h,CPUS["UPD177X"] = true
+--------------------------------------------------
+
+if (CPUS["UPD177X"]~=null or _OPTIONS["with-tools"]) then
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/upd177x/upd177xd.cpp")
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/upd177x/upd177xd.h")
+end
diff --git a/scripts/src/formats.lua b/scripts/src/formats.lua
index c234f37808b..f168dbe81ca 100644
--- a/scripts/src/formats.lua
+++ b/scripts/src/formats.lua
@@ -931,6 +931,18 @@ end
--------------------------------------------------
--
+--@src/lib/formats/h8_cas.h,FORMATS["H8_CAS"] = true
+--------------------------------------------------
+
+if (FORMATS["H8_CAS"]~=null or _OPTIONS["with-tools"]) then
+ files {
+ MAME_DIR.. "src/lib/formats/h8_cas.cpp",
+ MAME_DIR.. "src/lib/formats/h8_cas.h",
+ }
+end
+
+--------------------------------------------------
+--
--@src/lib/formats/hector_minidisc.h,FORMATS["HECTOR_MINIDISC"] = true
--------------------------------------------------
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index f53859c6e8b..4e7352c3e41 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -1445,6 +1445,18 @@ end
---------------------------------------------------
--
+--@src/devices/machine/icm7170.h,MACHINES["ICM7170"] = true
+---------------------------------------------------
+
+if (MACHINES["ICM7170"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/icm7170.cpp",
+ MAME_DIR .. "src/devices/machine/icm7170.h",
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/machine/idectrl.h,MACHINES["IDECTRL"] = true
--@src/devices/machine/vt83c461.h,MACHINES["IDECTRL"] = true
---------------------------------------------------
@@ -3096,6 +3108,18 @@ end
---------------------------------------------------
--
+--@src/devices/machine/upd7001.h,MACHINES["UPD7001"] = true
+---------------------------------------------------
+
+if (MACHINES["UPD7001"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/upd7001.cpp",
+ MAME_DIR .. "src/devices/machine/upd7001.h",
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/machine/upd7002.h,MACHINES["UPD7002"] = true
---------------------------------------------------
@@ -4244,3 +4268,27 @@ if (MACHINES["I3002"]~=null) then
MAME_DIR .. "src/devices/machine/i3002.h",
}
end
+
+---------------------------------------------------
+--
+--@src/devices/machine/s_smp.h,MACHINES["S_SMP"] = true
+---------------------------------------------------
+
+if (MACHINES["S_SMP"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/s_smp.cpp",
+ MAME_DIR .. "src/devices/machine/s_smp.h",
+ }
+end
+
+---------------------------------------------------
+--
+--@src/devices/machine/cxd1185.h,MACHINES["CXD1185"] = true
+---------------------------------------------------
+
+if (MACHINES["CXD1185"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/cxd1185.cpp",
+ MAME_DIR .. "src/devices/machine/cxd1185.h",
+ }
+end
diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua
index dc0a1a93f07..3b98b9095ce 100644
--- a/scripts/src/sound.lua
+++ b/scripts/src/sound.lua
@@ -1568,6 +1568,18 @@ end
---------------------------------------------------
--
+--@src/devices/sound/s_dsp.h,SOUNDS["S_DSP"] = true
+---------------------------------------------------
+
+if (SOUNDS["S_DSP"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/sound/s_dsp.cpp",
+ MAME_DIR .. "src/devices/sound/s_dsp.h",
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/sound/ks0164.h,SOUNDS["KS0164"] = true
---------------------------------------------------
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index 8aafb5134bb..1b3d5e07b5b 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -71,6 +71,7 @@ CPUS["E1"] = true
CPUS["I860"] = true
CPUS["I960"] = true
CPUS["H8"] = true
+CPUS["H8500"] = true
CPUS["V810"] = true
CPUS["M37710"] = true
CPUS["POWERPC"] = true
@@ -79,7 +80,6 @@ CPUS["MC68HC11"] = true
CPUS["ADSP21062"] = true
CPUS["DSP56156"] = true
CPUS["RSP"] = true
-CPUS["ALPHA8201"] = true
CPUS["COP400"] = true
CPUS["TLCS90"] = true
CPUS["TLCS870"] = true
@@ -280,6 +280,7 @@ SOUNDS["MM5837"] = true
--SOUNDS["DAVE"] = true
SOUNDS["LC7535"] = true
--SOUNDS["UPD934G"] = true
+SOUNDS["S_DSP"] = true
SOUNDS["KS0164"] = true
--------------------------------------------------
@@ -596,6 +597,7 @@ MACHINES["RSTBUF"] = true
MACHINES["RTC4543"] = true
MACHINES["RTC65271"] = true
MACHINES["RTC9701"] = true
+MACHINES["S_SMP"] = true
MACHINES["S2636"] = true
MACHINES["S3520CF"] = true
MACHINES["S3C24XX"] = true
@@ -637,6 +639,7 @@ MACHINES["TMS9902"] = true
MACHINES["UPD1990A"] = true
MACHINES["UPD4992"] = true
MACHINES["UPD4701"] = true
+MACHINES["UPD7001"] = true
MACHINES["UPD7002"] = true
MACHINES["UPD7004"] = true
MACHINES["UPD71071"] = true
@@ -2714,6 +2717,8 @@ files {
MAME_DIR .. "src/mame/machine/mw8080bw.cpp",
MAME_DIR .. "src/mame/audio/mw8080bw.cpp",
MAME_DIR .. "src/mame/audio/mw8080bw.h",
+ MAME_DIR .. "src/mame/audio/nl_gunfight.cpp",
+ MAME_DIR .. "src/mame/audio/nl_gunfight.h",
MAME_DIR .. "src/mame/video/mw8080bw.cpp",
MAME_DIR .. "src/mame/drivers/rotaryf.cpp",
}
@@ -3097,8 +3102,6 @@ files {
MAME_DIR .. "src/mame/video/n8080.cpp",
MAME_DIR .. "src/mame/drivers/nss.cpp",
MAME_DIR .. "src/mame/machine/snes.cpp",
- MAME_DIR .. "src/mame/audio/snes_snd.cpp",
- MAME_DIR .. "src/mame/audio/snes_snd.h",
MAME_DIR .. "src/mame/drivers/playch10.cpp",
MAME_DIR .. "src/mame/includes/playch10.h",
MAME_DIR .. "src/mame/machine/playch10.cpp",
@@ -3632,10 +3635,10 @@ files {
MAME_DIR .. "src/mame/video/raiden2.cpp",
MAME_DIR .. "src/mame/machine/r2crypt.cpp",
MAME_DIR .. "src/mame/machine/r2crypt.h",
- MAME_DIR .. "src/mame/machine/seibucop/seibucop.cpp",
- MAME_DIR .. "src/mame/machine/seibucop/seibucop_dma.hxx",
- MAME_DIR .. "src/mame/machine/seibucop/seibucop_cmd.hxx",
- MAME_DIR .. "src/mame/machine/seibucop/seibucop.h",
+ MAME_DIR .. "src/mame/machine/seibucop.cpp",
+ MAME_DIR .. "src/mame/machine/seibucop_dma.hxx",
+ MAME_DIR .. "src/mame/machine/seibucop_cmd.hxx",
+ MAME_DIR .. "src/mame/machine/seibucop.h",
MAME_DIR .. "src/mame/drivers/r2dx_v33.cpp",
MAME_DIR .. "src/mame/drivers/seibuspi.cpp",
MAME_DIR .. "src/mame/includes/seibuspi.h",
@@ -4930,6 +4933,7 @@ files {
MAME_DIR .. "src/mame/drivers/rbmk.cpp",
MAME_DIR .. "src/mame/drivers/rcorsair.cpp",
MAME_DIR .. "src/mame/drivers/re900.cpp",
+ MAME_DIR .. "src/mame/drivers/rfslots8085.cpp",
MAME_DIR .. "src/mame/drivers/rgum.cpp",
MAME_DIR .. "src/mame/drivers/roul.cpp",
MAME_DIR .. "src/mame/drivers/rulechan.cpp",
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 1e42c538c42..ac68c67a185 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -71,6 +71,7 @@ CPUS["E1"] = true
CPUS["I860"] = true
CPUS["I960"] = true
CPUS["H8"] = true
+CPUS["H8500"] = true
CPUS["V810"] = true
CPUS["M37710"] = true
CPUS["POWERPC"] = true
@@ -79,7 +80,6 @@ CPUS["MC68HC11"] = true
CPUS["ADSP21062"] = true
CPUS["DSP56156"] = true
CPUS["RSP"] = true
-CPUS["ALPHA8201"] = true
CPUS["COP400"] = true
CPUS["TLCS90"] = true
CPUS["TLCS900"] = true
@@ -303,6 +303,7 @@ SOUNDS["IOPSPU"] = true
SOUNDS["SWP00"] = true
SOUNDS["SWP20"] = true
SOUNDS["SWP30"] = true
+SOUNDS["S_DSP"] = true
SOUNDS["ROLANDPCM"] = true
--------------------------------------------------
@@ -511,6 +512,7 @@ MACHINES["I8271"] = true
MACHINES["I8279"] = true
MACHINES["I8291A"] = true
MACHINES["I8355"] = true
+MACHINES["ICM7170"] = true
MACHINES["IDECTRL"] = true
MACHINES["IE15"] = true
MACHINES["IM6402"] = true
@@ -617,6 +619,7 @@ MACHINES["RSTBUF"] = true
MACHINES["RTC4543"] = true
MACHINES["RTC65271"] = true
MACHINES["RTC9701"] = true
+MACHINES["S_SMP"] = true
--MACHINES["S2636"] = true
MACHINES["S3520CF"] = true
MACHINES["S3C24XX"] = true
@@ -671,6 +674,7 @@ MACHINES["TUBE"] = true
MACHINES["UPD1990A"] = true
--MACHINES["UPD4992"] = true
MACHINES["UPD4701"] = true
+MACHINES["UPD7001"] = true
MACHINES["UPD7002"] = true
--MACHINES["UPD7004"] = true
MACHINES["UPD71071"] = true
@@ -746,6 +750,7 @@ MACHINES["I82357"] = true
MACHINES["XC1700E"] = true
MACHINES["EDLC"] = true
MACHINES["WTL3132"] = true
+MACHINES["CXD1185"] = true
--------------------------------------------------
-- specify available bus cores
@@ -983,6 +988,7 @@ FORMATS["FMTOWNS_DSK"] = true
FORMATS["FSD_DSK"] = true
FORMATS["G64_DSK"] = true
FORMATS["GTP_CAS"] = true
+FORMATS["H8_CAS"] = true
FORMATS["HECTOR_MINIDISC"] = true
FORMATS["HECT_DSK"] = true
FORMATS["HECT_TAP"] = true
@@ -1124,6 +1130,7 @@ function linkProjects_mame_mess(_target, _subtarget)
"citoh",
"coleco",
"compugraphic",
+ "conic",
"consumenta",
"cromemco",
"comx",
@@ -1223,6 +1230,7 @@ function linkProjects_mame_mess(_target, _subtarget)
"ne",
"nec",
"netronic",
+ "news_r3k",
"next",
"nintendo",
"nokia",
@@ -1415,8 +1423,6 @@ files {
MAME_DIR .. "src/mame/machine/kabuki.h",
MAME_DIR .. "src/mame/video/pk8000.cpp",
MAME_DIR .. "src/mame/machine/snes.cpp",
- MAME_DIR .. "src/mame/audio/snes_snd.cpp",
- MAME_DIR .. "src/mame/audio/snes_snd.h",
MAME_DIR .. "src/mame/machine/n64.cpp",
MAME_DIR .. "src/mame/video/n64.cpp",
MAME_DIR .. "src/mame/video/n64types.h",
@@ -2005,6 +2011,11 @@ files {
MAME_DIR .. "src/mame/drivers/pwrview.cpp",
}
+createMESSProjects(_target, _subtarget, "conic")
+files {
+ MAME_DIR .. "src/mame/drivers/conic_cchess2.cpp",
+}
+
createMESSProjects(_target, _subtarget, "consumenta")
files {
MAME_DIR .. "src/mame/drivers/conchess.cpp",
@@ -2240,6 +2251,7 @@ files {
MAME_DIR .. "src/mame/includes/advision.h",
MAME_DIR .. "src/mame/machine/advision.cpp",
MAME_DIR .. "src/mame/video/advision.cpp",
+ MAME_DIR .. "src/mame/drivers/sag.cpp",
}
createMESSProjects(_target, _subtarget, "epoch")
@@ -2928,6 +2940,15 @@ files {
MAME_DIR .. "src/mame/includes/exp85.h",
}
+createMESSProjects(_target, _subtarget, "news_r3k")
+files {
+ MAME_DIR .. "src/mame/drivers/news_r3k.cpp",
+ MAME_DIR .. "src/mame/machine/dmac_0448.cpp",
+ MAME_DIR .. "src/mame/machine/dmac_0448.h",
+ MAME_DIR .. "src/mame/machine/news_hid.cpp",
+ MAME_DIR .. "src/mame/machine/news_hid.h",
+}
+
createMESSProjects(_target, _subtarget, "next")
files {
MAME_DIR .. "src/mame/drivers/next.cpp",
@@ -2954,6 +2975,8 @@ files {
MAME_DIR .. "src/mame/machine/nes.cpp",
MAME_DIR .. "src/mame/video/nes.cpp",
MAME_DIR .. "src/mame/drivers/nes_vt.cpp",
+ MAME_DIR .. "src/mame/machine/nes_vt_soc.cpp",
+ MAME_DIR .. "src/mame/machine/nes_vt_soc.h",
MAME_DIR .. "src/mame/drivers/nes_sh6578.cpp",
MAME_DIR .. "src/mame/drivers/nes_clone.cpp",
MAME_DIR .. "src/mame/drivers/pokemini.cpp",
@@ -3254,16 +3277,23 @@ files {
MAME_DIR .. "src/mame/drivers/roland_cm32p.cpp",
MAME_DIR .. "src/mame/drivers/roland_d10.cpp",
MAME_DIR .. "src/mame/drivers/roland_d50.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_jv80.cpp",
MAME_DIR .. "src/mame/drivers/roland_jx3p.cpp",
MAME_DIR .. "src/mame/drivers/roland_jx8p.cpp",
MAME_DIR .. "src/mame/drivers/roland_mt32.cpp",
MAME_DIR .. "src/mame/drivers/roland_r8.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_ra30.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_s10.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_s50.cpp",
MAME_DIR .. "src/mame/drivers/roland_sc55.cpp",
+ MAME_DIR .. "src/mame/drivers/roland_sc88.cpp",
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/audio/jx8p_synth.cpp",
MAME_DIR .. "src/mame/audio/jx8p_synth.h",
+ MAME_DIR .. "src/mame/machine/mb62h195.cpp",
+ MAME_DIR .. "src/mame/machine/mb62h195.h",
MAME_DIR .. "src/mame/machine/mb63h149.cpp",
MAME_DIR .. "src/mame/machine/mb63h149.h",
MAME_DIR .. "src/mame/machine/pg200.cpp",
@@ -3297,8 +3327,9 @@ files {
MAME_DIR .. "src/mame/drivers/saitek_mark5.cpp",
MAME_DIR .. "src/mame/drivers/saitek_prschess.cpp",
MAME_DIR .. "src/mame/drivers/saitek_risc2500.cpp",
- MAME_DIR .. "src/mame/includes/saitek_stratos.h",
+ MAME_DIR .. "src/mame/drivers/saitek_schess.cpp",
MAME_DIR .. "src/mame/drivers/saitek_ssystem3.cpp",
+ MAME_DIR .. "src/mame/includes/saitek_stratos.h",
MAME_DIR .. "src/mame/drivers/saitek_stratos.cpp",
MAME_DIR .. "src/mame/drivers/saitek_corona.cpp", -- subdriver of saitek_stratos
MAME_DIR .. "src/mame/drivers/saitek_superstar.cpp",
@@ -3870,6 +3901,7 @@ files {
MAME_DIR .. "src/mame/drivers/spg2xx_digimake.cpp",
MAME_DIR .. "src/mame/drivers/spg2xx_jakks.cpp",
MAME_DIR .. "src/mame/drivers/spg2xx_jakks_gkr.cpp",
+ MAME_DIR .. "src/mame/drivers/spg2xx_jakks_sharp.cpp",
MAME_DIR .. "src/mame/drivers/spg2xx_jakks_tvtouch.cpp",
MAME_DIR .. "src/mame/drivers/spg2xx_zone.cpp",
MAME_DIR .. "src/mame/drivers/spg2xx_zone_32bit.cpp",
@@ -4111,6 +4143,7 @@ files {
MAME_DIR .. "src/mame/drivers/ymmu50.cpp",
MAME_DIR .. "src/mame/drivers/ymmu80.cpp",
MAME_DIR .. "src/mame/drivers/ymmu100.cpp",
+ MAME_DIR .. "src/mame/drivers/ymtx81z.cpp",
MAME_DIR .. "src/mame/drivers/ymvl70.cpp",
MAME_DIR .. "src/mame/drivers/fb01.cpp",
MAME_DIR .. "src/mame/drivers/tg100.cpp",
diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua
index d2a0958df6e..a1bea83a7a5 100644
--- a/scripts/target/mame/nl.lua
+++ b/scripts/target/mame/nl.lua
@@ -56,6 +56,7 @@ SOUNDS["BEEP"] = true
SOUNDS["VOLT_REG"] = true
SOUNDS["SPEAKER"] = true
SOUNDS["DIGITALKER"] = true
+SOUNDS["SN76477"] = true
--------------------------------------------------
-- specify available video cores
@@ -96,6 +97,7 @@ MACHINES["CXD1095"] = true
--MACHINES["68681"] = true
--MACHINES["BANKDEV"] = true
MACHINES["F3853"] = true
+MACHINES["MB14241"] = true
--------------------------------------------------
-- specify available bus cores
@@ -183,6 +185,15 @@ files{
MAME_DIR .. "src/mame/audio/nl_kidniki.cpp",
MAME_DIR .. "src/mame/audio/nl_kidniki.h",
+ MAME_DIR .. "src/mame/machine/mw8080bw.cpp",
+ MAME_DIR .. "src/mame/drivers/mw8080bw.cpp",
+ MAME_DIR .. "src/mame/includes/mw8080bw.h",
+ MAME_DIR .. "src/mame/audio/mw8080bw.h",
+ MAME_DIR .. "src/mame/audio/mw8080bw.cpp",
+ MAME_DIR .. "src/mame/video/mw8080bw.cpp",
+ MAME_DIR .. "src/mame/audio/nl_gunfight.cpp",
+ MAME_DIR .. "src/mame/audio/nl_gunfight.h",
+
MAME_DIR .. "src/mame/audio/cheekyms.cpp",
MAME_DIR .. "src/mame/audio/cheekyms.h",
MAME_DIR .. "src/mame/audio/nl_cheekyms.cpp",
diff --git a/src/devices/bus/a2bus/a2corvus.cpp b/src/devices/bus/a2bus/a2corvus.cpp
index 3b0af093659..b2e845f3d2c 100644
--- a/src/devices/bus/a2bus/a2corvus.cpp
+++ b/src/devices/bus/a2bus/a2corvus.cpp
@@ -128,10 +128,10 @@ uint8_t a2bus_corvus_device::read_c0nx(uint8_t offset)
switch (offset)
{
case 0:
- return m_corvushd->read(machine().dummy_space(), 0);
+ return m_corvushd->read();
case 1:
- return m_corvushd->status_r(machine().dummy_space(), 0);
+ return m_corvushd->status_r();
default:
logerror("Corvus: read unhandled c0n%x (%s)\n", offset, machine().describe_context());
@@ -150,7 +150,7 @@ void a2bus_corvus_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset == 0)
{
- m_corvushd->write(machine().dummy_space(), 0, data);
+ m_corvushd->write(data);
}
}
diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp
index 817cbd1fd85..e61e50db9a6 100644
--- a/src/devices/bus/a2bus/mouse.cpp
+++ b/src/devices/bus/a2bus/mouse.cpp
@@ -231,7 +231,7 @@ WRITE8_MEMBER(a2bus_mouse_device::pia_out_a)
WRITE8_MEMBER(a2bus_mouse_device::pia_out_b)
{
- m_mcu->pc_w(space, 0, 0xf0 | ((data >> 4) & 0x0f));
+ m_mcu->pc_w(0xf0 | ((data >> 4) & 0x0f));
m_rom_bank = (data & 0xe) << 7;
}
@@ -294,7 +294,7 @@ WRITE8_MEMBER(a2bus_mouse_device::mcu_port_b_w)
WRITE8_MEMBER(a2bus_mouse_device::mcu_port_c_w)
{
- m_pia->write_portb(data << 4);
+ m_pia->portb_w(data << 4);
}
template <unsigned AXIS, u8 DIR, u8 CLK> void a2bus_mouse_device::update_axis()
diff --git a/src/devices/bus/a2bus/timemasterho.cpp b/src/devices/bus/a2bus/timemasterho.cpp
index 466cf0af036..6bab78c845e 100644
--- a/src/devices/bus/a2bus/timemasterho.cpp
+++ b/src/devices/bus/a2bus/timemasterho.cpp
@@ -225,7 +225,7 @@ WRITE8_MEMBER(a2bus_timemasterho_device::pia_out_b)
// if it's a read, poke it into the PIA
if ((data>>5) & 1)
{
- m_pia->write_porta(m_msm5832->data_r());
+ m_pia->porta_w(m_msm5832->data_r());
}
}
diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp
index bc6f14082ed..28b44388d27 100644
--- a/src/devices/bus/abcbus/lux10828.cpp
+++ b/src/devices/bus/abcbus/lux10828.cpp
@@ -618,7 +618,7 @@ WRITE8_MEMBER( luxor_55_10828_device::ctrl_w )
m_wait_enable = BIT(data, 6);
// FDC master reset
- if (!BIT(data, 7)) m_fdc->soft_reset();
+ m_fdc->mr_w(BIT(data, 7));
}
diff --git a/src/devices/bus/abcbus/lux21046.cpp b/src/devices/bus/abcbus/lux21046.cpp
index 282d97ce127..3ec543ead6a 100644
--- a/src/devices/bus/abcbus/lux21046.cpp
+++ b/src/devices/bus/abcbus/lux21046.cpp
@@ -1053,7 +1053,7 @@ WRITE8_MEMBER( luxor_55_21046_device::_8a_w )
*/
// FDC master reset
- if (!BIT(data, 0)) m_fdc->soft_reset();
+ m_fdc->mr_w(BIT(data, 0));
// density select
m_fdc->dden_w(BIT(data, 1));
diff --git a/src/devices/bus/amiga/keyboard/mitsumi.cpp b/src/devices/bus/amiga/keyboard/mitsumi.cpp
index 36837410cc4..038d8bb72d7 100644
--- a/src/devices/bus/amiga/keyboard/mitsumi.cpp
+++ b/src/devices/bus/amiga/keyboard/mitsumi.cpp
@@ -109,7 +109,7 @@ public:
virtual WRITE_LINE_MEMBER(kdat_w) override
{
m_kdat_in = state ? 0x01U : 0x00U;
- m_mcu->pa_w(machine().dummy_space(), 0, m_meta->read());
+ m_mcu->pa_w(m_meta->read());
}
READ_LINE_MEMBER(kdat_r)
diff --git a/src/devices/bus/bbc/tube/tube_6502.cpp b/src/devices/bus/bbc/tube/tube_6502.cpp
index 99852ca8d90..5571975a9f2 100644
--- a/src/devices/bus/bbc/tube/tube_6502.cpp
+++ b/src/devices/bus/bbc/tube/tube_6502.cpp
@@ -84,7 +84,6 @@ void bbc_tube_6502_device::add_common_devices(machine_config &config)
/* software lists */
SOFTWARE_LIST(config, "flop_ls_6502").set_original("bbc_flop_6502");
- SOFTWARE_LIST(config, "flop_ls_65c102").set_original("bbc_flop_65c102");
}
void bbc_tube_6502_device::device_add_mconfig(machine_config &config)
diff --git a/src/devices/bus/bbc/tube/tube_rc6502.cpp b/src/devices/bus/bbc/tube/tube_rc6502.cpp
index c567be6f98a..666c5fbece7 100644
--- a/src/devices/bus/bbc/tube/tube_rc6502.cpp
+++ b/src/devices/bus/bbc/tube/tube_rc6502.cpp
@@ -125,7 +125,6 @@ void bbc_tube_rc6502_device::add_common_devices(machine_config &config)
/* software lists */
SOFTWARE_LIST(config, "flop_ls_6502").set_original("bbc_flop_6502");
- SOFTWARE_LIST(config, "flop_ls_65c102").set_original("bbc_flop_65c102");
}
void bbc_tube_rc6502_device::device_add_mconfig(machine_config &config)
diff --git a/src/devices/bus/c64/buscard.cpp b/src/devices/bus/c64/buscard.cpp
index 26175466a2e..e386b6839bc 100644
--- a/src/devices/bus/c64/buscard.cpp
+++ b/src/devices/bus/c64/buscard.cpp
@@ -97,7 +97,7 @@ READ8_MEMBER( c64_buscard_device::ppi_pa_r )
if (!m_te)
{
- data = m_ieee1->read(space, 0);
+ data = m_ieee1->read();
}
if (m_dipsw)
@@ -110,7 +110,7 @@ READ8_MEMBER( c64_buscard_device::ppi_pa_r )
WRITE8_MEMBER( c64_buscard_device::ppi_pa_w )
{
- m_ieee1->write(space, 0, data);
+ m_ieee1->write(data);
m_centronics->write_data0(BIT(data, 0));
m_centronics->write_data1(BIT(data, 1));
diff --git a/src/devices/bus/dmv/k012.cpp b/src/devices/bus/dmv/k012.cpp
index 71c4f4aa402..21f5f4e5e8d 100644
--- a/src/devices/bus/dmv/k012.cpp
+++ b/src/devices/bus/dmv/k012.cpp
@@ -106,11 +106,11 @@ void dmv_k012_device::device_add_mconfig(machine_config &config)
void dmv_k012_device::io_read(int ifsel, offs_t offset, uint8_t &data)
{
if ((1 << ifsel) == m_jumpers->read() && !(offset & 0x08))
- data = m_hdc->read(machine().dummy_space(), offset);
+ data = m_hdc->read(offset);
}
void dmv_k012_device::io_write(int ifsel, offs_t offset, uint8_t data)
{
if ((1 << ifsel) == m_jumpers->read() && !(offset & 0x08))
- m_hdc->write(machine().dummy_space(), offset, data);
+ m_hdc->write(offset, data);
}
diff --git a/src/devices/bus/dmv/k806.cpp b/src/devices/bus/dmv/k806.cpp
index 959e1468990..3ee1f9dbb3c 100644
--- a/src/devices/bus/dmv/k806.cpp
+++ b/src/devices/bus/dmv/k806.cpp
@@ -141,7 +141,7 @@ void dmv_k806_device::io_read(int ifsel, offs_t offset, uint8_t &data)
{
uint8_t jumpers = m_jumpers->read();
if (BIT(jumpers, ifsel) && ((!BIT(offset, 3) && BIT(jumpers, 5)) || (BIT(offset, 3) && BIT(jumpers, 6))))
- data = m_mcu->upi41_master_r(machine().dummy_space(), offset & 1);
+ data = m_mcu->upi41_master_r(offset & 1);
}
void dmv_k806_device::io_write(int ifsel, offs_t offset, uint8_t data)
@@ -149,7 +149,7 @@ void dmv_k806_device::io_write(int ifsel, offs_t offset, uint8_t data)
uint8_t jumpers = m_jumpers->read();
if (BIT(jumpers, ifsel) && ((!BIT(offset, 3) && BIT(jumpers, 5)) || (BIT(offset, 3) && BIT(jumpers, 6))))
{
- m_mcu->upi41_master_w(machine().dummy_space(), offset & 1, data);
+ m_mcu->upi41_master_w(offset & 1, data);
out_int(CLEAR_LINE);
}
}
diff --git a/src/devices/bus/econet/e01.cpp b/src/devices/bus/econet/e01.cpp
index 0246af4e7d4..4a58753628e 100644
--- a/src/devices/bus/econet/e01.cpp
+++ b/src/devices/bus/econet/e01.cpp
@@ -545,7 +545,7 @@ WRITE8_MEMBER( econet_e01_device::floppy_w )
m_fdc->dden_w(BIT(data, 4));
// floppy master reset
- if (!BIT(data, 5)) m_fdc->soft_reset();
+ m_fdc->mr_w(BIT(data, 5));
// TODO floppy test
diff --git a/src/devices/bus/hp80_io/82900.cpp b/src/devices/bus/hp80_io/82900.cpp
index 008770abb52..41bf86747e8 100644
--- a/src/devices/bus/hp80_io/82900.cpp
+++ b/src/devices/bus/hp80_io/82900.cpp
@@ -44,7 +44,7 @@ hp82900_io_card_device::~hp82900_io_card_device()
void hp82900_io_card_device::install_read_write_handlers(address_space& space , uint16_t base_addr)
{
- space.install_readwrite_handler(base_addr, base_addr + 1, read8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w)));
+ space.install_readwrite_handler(base_addr, base_addr + 1, read8sm_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8sm_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w)));
}
void hp82900_io_card_device::inten()
@@ -116,7 +116,7 @@ READ8_MEMBER(hp82900_io_card_device::cpu_io_r)
uint8_t res;
if (BIT(offset , 6) && (m_addr_latch & 0x82) == 0) {
- res = m_translator->uc_r(space , m_addr_latch & 1 , mem_mask);
+ res = m_translator->uc_r(m_addr_latch & 1);
} else {
res = ~0;
}
@@ -127,7 +127,7 @@ WRITE8_MEMBER(hp82900_io_card_device::cpu_io_w)
{
m_rom_enabled = false;
if (BIT(offset , 6) && (m_addr_latch & 0x82) == 0) {
- m_translator->uc_w(space , m_addr_latch & 1 , data , mem_mask);
+ m_translator->uc_w(m_addr_latch & 1 , data);
} else if (BIT(offset , 7)) {
m_addr_latch = data;
}
diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp
index 6e145bb3baf..c9a699cf539 100644
--- a/src/devices/bus/hp80_io/82937.cpp
+++ b/src/devices/bus/hp80_io/82937.cpp
@@ -71,7 +71,7 @@ hp82937_io_card_device::~hp82937_io_card_device()
void hp82937_io_card_device::install_read_write_handlers(address_space& space , uint16_t base_addr)
{
- space.install_readwrite_handler(base_addr, base_addr + 1, read8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w)));
+ space.install_readwrite_handler(base_addr, base_addr + 1, read8sm_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8sm_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w)));
}
void hp82937_io_card_device::inten()
diff --git a/src/devices/bus/hp80_io/82939.cpp b/src/devices/bus/hp80_io/82939.cpp
index a65c375396c..8106f9df9ae 100644
--- a/src/devices/bus/hp80_io/82939.cpp
+++ b/src/devices/bus/hp80_io/82939.cpp
@@ -52,7 +52,7 @@ hp82939_io_card_device::~hp82939_io_card_device()
void hp82939_io_card_device::install_read_write_handlers(address_space& space , uint16_t base_addr)
{
- space.install_readwrite_handler(base_addr, base_addr + 1, read8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w)));
+ space.install_readwrite_handler(base_addr, base_addr + 1, read8sm_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8sm_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w)));
}
void hp82939_io_card_device::inten()
@@ -166,7 +166,7 @@ READ8_MEMBER(hp82939_io_card_device::p2_r)
READ8_MEMBER(hp82939_io_card_device::cpu_r)
{
if ((offset & 0x82) == 0x00) {
- return m_translator->uc_r(space , offset & 1 , mem_mask);
+ return m_translator->uc_r(offset & 1);
} else if ((offset & 0x83) == 0x82) {
return m_uart->ins8250_r((offset >> 2) & 7);
} else {
@@ -177,7 +177,7 @@ READ8_MEMBER(hp82939_io_card_device::cpu_r)
WRITE8_MEMBER(hp82939_io_card_device::cpu_w)
{
if ((offset & 0x82) == 0x00) {
- m_translator->uc_w(space , offset & 1 , data , mem_mask);
+ m_translator->uc_w(offset & 1 , data);
} else if ((offset & 0x83) == 0x82) {
m_uart->ins8250_w((offset >> 2) & 7 , data);
}
diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp
index 3bf1823ffae..0eddcde7f48 100644
--- a/src/devices/bus/hp_dio/human_interface.cpp
+++ b/src/devices/bus/hp_dio/human_interface.cpp
@@ -115,8 +115,8 @@ human_interface_device::human_interface_device(const machine_config &mconfig, de
void human_interface_device::device_start()
{
program_space().install_readwrite_handler(0x420000, 0x420003, 0x0003, 0xfffc, 0,
- read8_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_r)),
- write8_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_w)), 0x00ff00ff);
+ read8sm_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_r)),
+ write8sm_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_w)), 0x00ff00ff);
program_space().install_readwrite_handler(0x470000, 0x47001f, 0x1f, 0xffe0, 0,
read8_delegate(*this, FUNC(human_interface_device::gpib_r)),
diff --git a/src/devices/bus/ieee488/hardbox.cpp b/src/devices/bus/ieee488/hardbox.cpp
index 0b982ee772d..be648c1fa50 100644
--- a/src/devices/bus/ieee488/hardbox.cpp
+++ b/src/devices/bus/ieee488/hardbox.cpp
@@ -231,7 +231,7 @@ READ8_MEMBER( hardbox_device::ppi1_pc_r )
*/
- uint8_t status = m_hdc->status_r(space, 0);
+ uint8_t status = m_hdc->status_r();
uint8_t data = 0;
data |= (status & corvus_hdc_device::CONTROLLER_BUSY) ? 0 : 0x10;
diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp
index e2041d3e4e2..8076a0d5432 100644
--- a/src/devices/bus/ieee488/softbox.cpp
+++ b/src/devices/bus/ieee488/softbox.cpp
@@ -187,7 +187,7 @@ READ8_MEMBER( softbox_device::ppi1_pc_r )
*/
- uint8_t status = m_hdc->status_r(space, 0);
+ uint8_t status = m_hdc->status_r();
uint8_t data = 0;
data |= (status & corvus_hdc_device::CONTROLLER_BUSY) ? 0 : 0x10;
diff --git a/src/devices/bus/isa/bblue2.cpp b/src/devices/bus/isa/bblue2.cpp
index 121ec92e390..a85bd17ab0d 100644
--- a/src/devices/bus/isa/bblue2.cpp
+++ b/src/devices/bus/isa/bblue2.cpp
@@ -215,10 +215,10 @@ void isa8_babyblue2_device::device_reset()
if(!m_devices_installed) // will need a hard reset to put DIP switch and jumper changes into effect
{
// map Z80 LPT port based on jumper setting
- m_z80->space(AS_IO).install_readwrite_handler(z80lptloc, z80lptloc+7, read8_delegate(m_parallel, FUNC(pc_lpt_device::read)), write8_delegate(m_parallel, FUNC(pc_lpt_device::write)));
+ m_z80->space(AS_IO).install_readwrite_handler(z80lptloc, z80lptloc+7, read8sm_delegate(m_parallel, FUNC(pc_lpt_device::read)), write8sm_delegate(m_parallel, FUNC(pc_lpt_device::write)));
m_isa->install_device(ioloc, ioloc+1, read8_delegate(*this, FUNC(isa8_babyblue2_device::z80_control_r)), write8_delegate(*this, FUNC(isa8_babyblue2_device::z80_control_w)));
- m_isa->install_device(lptloc, lptloc+7, read8_delegate(m_parallel, FUNC(pc_lpt_device::read)), write8_delegate(m_parallel, FUNC(pc_lpt_device::write)));
+ m_isa->install_device(lptloc, lptloc+7, read8sm_delegate(m_parallel, FUNC(pc_lpt_device::read)), write8sm_delegate(m_parallel, FUNC(pc_lpt_device::write)));
m_isa->install_device(0x3f8, 0x03ff, read8sm_delegate(m_serial1, FUNC(ins8250_device::ins8250_r)), write8sm_delegate(m_serial1, FUNC(ins8250_device::ins8250_w)));
m_isa->install_device(0x2f8, 0x02ff, read8sm_delegate(m_serial2, FUNC(ins8250_device::ins8250_r)), write8sm_delegate(m_serial2, FUNC(ins8250_device::ins8250_w)));
// TODO: RTC
diff --git a/src/devices/bus/isa/lpt.cpp b/src/devices/bus/isa/lpt.cpp
index 5c4baf5aaeb..268ff2c9caf 100644
--- a/src/devices/bus/isa/lpt.cpp
+++ b/src/devices/bus/isa/lpt.cpp
@@ -47,9 +47,9 @@ void isa8_lpt_device::device_reset()
m_is_primary = (ioport("DSW")->read() & 1) ? false : true;
pc_lpt_device &lpt(*subdevice<pc_lpt_device>("lpt"));
if (m_is_primary)
- m_isa->install_device(0x0378, 0x037b, read8_delegate(lpt, FUNC(pc_lpt_device::read)), write8_delegate(lpt, FUNC(pc_lpt_device::write)));
+ m_isa->install_device(0x0378, 0x037b, read8sm_delegate(lpt, FUNC(pc_lpt_device::read)), write8sm_delegate(lpt, FUNC(pc_lpt_device::write)));
else
- m_isa->install_device(0x0278, 0x027b, read8_delegate(lpt, FUNC(pc_lpt_device::read)), write8_delegate(lpt, FUNC(pc_lpt_device::write)));
+ m_isa->install_device(0x0278, 0x027b, read8sm_delegate(lpt, FUNC(pc_lpt_device::read)), write8sm_delegate(lpt, FUNC(pc_lpt_device::write)));
}
WRITE_LINE_MEMBER(isa8_lpt_device::pc_cpu_line)
diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp
index 4e0122d83fd..0408d52becf 100644
--- a/src/devices/bus/isa/mda.cpp
+++ b/src/devices/bus/isa/mda.cpp
@@ -482,7 +482,7 @@ WRITE8_MEMBER( isa8_mda_device::io_write )
mode_control_w(space, offset, data);
break;
case 0x0c: case 0x0d: case 0x0e:
- m_lpt->write(space, offset - 0x0c, data);
+ m_lpt->write(offset - 0x0c, data);
break;
}
}
@@ -503,7 +503,7 @@ READ8_MEMBER( isa8_mda_device::io_read )
break;
/* LPT ports */
case 0x0c: case 0x0d: case 0x0e:
- data = m_lpt->read(space, offset - 0x0c);
+ data = m_lpt->read(offset - 0x0c);
break;
}
return data;
@@ -701,7 +701,7 @@ WRITE8_MEMBER( isa8_hercules_device::io_write )
mode_control_w(space, offset, data);
break;
case 0x0c: case 0x0d: case 0x0e:
- m_lpt->write(space, offset - 12, data);
+ m_lpt->write(offset - 12, data);
break;
case 0x0f:
m_configuration_switch = data;
@@ -746,7 +746,7 @@ READ8_MEMBER( isa8_hercules_device::io_read )
break;
/* LPT ports */
case 0xc: case 0xd: case 0xe:
- data = m_lpt->read(space, offset - 0x0c);
+ data = m_lpt->read(offset - 0x0c);
break;
}
return data;
diff --git a/src/devices/bus/isa/mpu401.cpp b/src/devices/bus/isa/mpu401.cpp
index b7a49506094..7f6a28b87b4 100644
--- a/src/devices/bus/isa/mpu401.cpp
+++ b/src/devices/bus/isa/mpu401.cpp
@@ -77,7 +77,7 @@ void isa8_mpu401_device::device_start()
{
set_isa_device();
- m_isa->install_device(0x330, 0x0331, read8_delegate(*m_mpu401, FUNC(mpu401_device::mpu_r)), write8_delegate(*m_mpu401, FUNC(mpu401_device::mpu_w)));
+ m_isa->install_device(0x330, 0x0331, read8sm_delegate(*m_mpu401, FUNC(mpu401_device::mpu_r)), write8sm_delegate(*m_mpu401, FUNC(mpu401_device::mpu_w)));
}
//-------------------------------------------------
diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp
index 8670610ea40..3448589b9a5 100644
--- a/src/devices/bus/isa/wdxt_gen.cpp
+++ b/src/devices/bus/isa/wdxt_gen.cpp
@@ -200,7 +200,7 @@ void wdxt_gen_device::device_start()
{
set_isa_device();
m_isa->install_rom(this, 0xc8000, 0xc9fff, "hdc", "hdc");
- m_isa->install_device(0x0320, 0x0323, read8_delegate(*m_host, FUNC(wd11c00_17_device::io_r)), write8_delegate(*m_host, FUNC(wd11c00_17_device::io_w)));
+ m_isa->install_device(0x0320, 0x0323, read8sm_delegate(*m_host, FUNC(wd11c00_17_device::io_r)), write8sm_delegate(*m_host, FUNC(wd11c00_17_device::io_w)));
m_isa->set_dma_channel(3, this, false);
}
diff --git a/src/devices/bus/plus4/sid.cpp b/src/devices/bus/plus4/sid.cpp
index 1ebfdafd657..b5c6e9d897f 100644
--- a/src/devices/bus/plus4/sid.cpp
+++ b/src/devices/bus/plus4/sid.cpp
@@ -122,7 +122,7 @@ uint8_t plus4_sid_cartridge_device::plus4_cd_r(offs_t offset, uint8_t data, int
}
else if (offset >= 0xfd80 && offset < 0xfd90)
{
- data = m_joy->joy_r(machine().dummy_space(), 0);
+ data = m_joy->read_joy();
}
return data;
diff --git a/src/devices/bus/psi_kbd/hle.cpp b/src/devices/bus/psi_kbd/hle.cpp
index 84adfc5ff82..7fd1b02677f 100644
--- a/src/devices/bus/psi_kbd/hle.cpp
+++ b/src/devices/bus/psi_kbd/hle.cpp
@@ -308,7 +308,7 @@ uint8_t psi_hle_keyboard_device::translate(uint8_t row, uint8_t column)
void psi_hle_keyboard_device::send_key(uint8_t code)
{
- m_host->key_data_w(machine().dummy_space(), 0, code);
+ m_host->key_data_w(code);
m_host->key_strobe_w(1);
m_host->key_strobe_w(0);
}
diff --git a/src/devices/bus/psi_kbd/psi_kbd.h b/src/devices/bus/psi_kbd/psi_kbd.h
index 74957943fad..5070e83d0c5 100644
--- a/src/devices/bus/psi_kbd/psi_kbd.h
+++ b/src/devices/bus/psi_kbd/psi_kbd.h
@@ -63,7 +63,7 @@ public:
// called from keyboard
DECLARE_WRITE_LINE_MEMBER( rx_w ) { m_rx_handler(state); }
DECLARE_WRITE_LINE_MEMBER( key_strobe_w ) { m_key_strobe_handler(state); }
- DECLARE_WRITE8_MEMBER( key_data_w ) { m_key_data = data; }
+ void key_data_w(uint8_t data) { m_key_data = data; }
// called from host
DECLARE_WRITE_LINE_MEMBER( tx_w );
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h
index db9d1eebf3b..25ac788e389 100644
--- a/src/devices/bus/vcs_ctrl/ctrl.h
+++ b/src/devices/bus/vcs_ctrl/ctrl.h
@@ -79,11 +79,8 @@ public:
// bit 6 - pin 9 -
//
uint8_t read_joy() { return exists() ? m_device->vcs_joy_r() : 0xff; }
- DECLARE_READ8_MEMBER( joy_r ) { return read_joy(); }
uint8_t read_pot_x() { return exists() ? m_device->vcs_pot_x_r() : 0xff; }
- DECLARE_READ8_MEMBER( pot_x_r ) { return read_pot_x(); }
uint8_t read_pot_y() { return exists() ? m_device->vcs_pot_y_r() : 0xff; }
- DECLARE_READ8_MEMBER( pot_y_r ) { return read_pot_y(); }
void joy_w(uint8_t data) { if (exists()) m_device->vcs_joy_w(data); }
diff --git a/src/devices/bus/x68k/x68k_midi.cpp b/src/devices/bus/x68k/x68k_midi.cpp
index e4e639fff04..34243f758a2 100644
--- a/src/devices/bus/x68k/x68k_midi.cpp
+++ b/src/devices/bus/x68k/x68k_midi.cpp
@@ -49,12 +49,12 @@ void x68k_midi_device::device_reset()
READ8_MEMBER(x68k_midi_device::x68k_midi_reg_r)
{
- return m_midi->read(space, offset);
+ return m_midi->read(offset);
}
WRITE8_MEMBER(x68k_midi_device::x68k_midi_reg_w)
{
- m_midi->write(space, offset, data);
+ m_midi->write(offset, data);
}
void x68k_midi_device::irq_w(int state)
diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp
index 67dffd2e33e..22a35a17297 100644
--- a/src/devices/bus/x68k/x68k_scsiext.cpp
+++ b/src/devices/bus/x68k/x68k_scsiext.cpp
@@ -96,10 +96,10 @@ void x68k_scsiext_device::drq_w(int state)
READ8_MEMBER(x68k_scsiext_device::register_r)
{
- return m_spc->mb89352_r(space,offset);
+ return m_spc->mb89352_r(offset);
}
WRITE8_MEMBER(x68k_scsiext_device::register_w)
{
- m_spc->mb89352_w(space,offset,data);
+ m_spc->mb89352_w(offset,data);
}
diff --git a/src/devices/cpu/alph8201/8201dasm.cpp b/src/devices/cpu/alph8201/8201dasm.cpp
deleted file mode 100644
index cf24aff16b3..00000000000
--- a/src/devices/cpu/alph8201/8201dasm.cpp
+++ /dev/null
@@ -1,404 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Tatsuyuki Satoh
-/*
-
-Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-
-cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
-
-
-
-
-*/
-
-/****************************************************************************
- Alpha 8201/8301 Disassembler
-
- Copyright Tatsuyuki Satoh
- Originally written for the MAME project.
-
-****************************************************************************/
-
-#include "emu.h"
-#include "8201dasm.h"
-
-#include <cctype>
-#include <stdexcept>
-
-
-#define FMT(a,b) a, b
-#define PTRS_PER_FORMAT 2
-
-/****************************************************
-
-8201 CONFIRMED OPCODES:
-
-opcode mnemonic function flags
--------- ------------ ------------- -----
-00000000 NOP - --
-00000001 RORA ror A -C
-00000010 ROLA rol A -C
-00000011 INC RXB RXB+=2 ZC
-00000100 DEC RXB RXB-=2 ZC (C=1 means No Borrow: RXB>=2)
-00000101 INC A A++ ZC
-00000110 DEC A A-- ZC (C=1 means No Borrow: A>=1)
-00000110 CPL A A^=$FF --
-00001aaa LD A,(IX0+i) A=[IX0+i] --
-00010aaa LD A,(IX1+i) A=[IX1+i] --
-00011aaa LD (IX2+i),A [IX2+i]=A --
-00111aaa BIT R0.n ZF=R0 bit n Z-
-0100aaa0 LD A,Rn A=Rn Z- [1]
-0100aaa1 LD Rn,A Rn=A --
-0101aaa0 ADD A,Rn A+=Rn ZC
-0101aaa1 SUB A,Rn A-=Rn ZC (C=1 means No Borrow: A>=Rn)
-0110aaa0 AND A,Rn A&=Rn Z-
-0110aaa1 OR A,Rn A|=Rn Z-
-0111aaaa ADD IX0,i IX0+=i --
-1000aaaa ADD IX1,i IX1+=i --
-1001aaaa ADD IX2,i IX2+=i --
-1010aaaa LD RB,i RB=i -- Note: no bounds checking. Can set bank up to F.
-1011-0aa LD MB,i set after-jump page
-1011-1-- STOP
-11000000 imm LD IX0,imm IX0=imm --
-11000001 imm LD IX1,imm IX1=imm --
-11000010 imm LD IX2,imm IX2=imm --
-11000011 imm LD A,imm A=imm --
-11000100 imm LD LP0,imm LP0=imm --
-11000101 imm LD LP1,imm LP1=imm --
-11000110 imm LD LP2,imm LP2=imm --
-11000111 imm LD RXB,imm RXB=imm --
-11001000 imm ADD A,imm A+=imm ZC
-11001001 imm SUB A,imm A-=imm ZC (C=1 means No Borrow: A>=imm)
-11001010 imm AND A,imm A&=imm Z-
-11001011 imm OR A,imm A|=imm Z-
-11001100 imm DJNZ LP0,imm LP0--,branch --
-11001101 imm DJNZ LP1,imm LP1--,branch --
-11001110 imm DJNZ LP2,imm LP2--,branch --
-11001111 imm JNZ imm branch if !Z --
-1101--00 imm JNC imm branch if !C --
-1101--01 imm JZ imm branch if Z --
-1101--1- imm J imm branch --
-1110--xx mirror for the above
-1111--xx mirror for the above
-
-Notes:
-[1] bug: the Z flag is not updated correctly after a LD A,Rn instruction. Fixed in 8302 (possibly 8301).
-
-
-8302 CONFIRMED OPCODES:
-----------------------
-all of the 8201 ones, with stricter decoding for the following:
-
-11010-00 imm JNC imm branch if !C --
-11010-01 imm JZ imm branch if Z --
-11010-1- imm J imm branch --
-
-and these new opcodes:
-
-opcode mnemonic function flags
--------- ------------ --------------- -----
-11011000 imm LD A,(imm) A=MB:[imm] --
-11011001 imm LD (imm),A MB:[imm]=A --
-11011010 imm CMP A,imm temp=A-imm ZC
-11011011 imm XOR A,imm A^=imm Z0
-11011100 imm LD A,R(imm) A=reg(imm) --
-11011101 imm LD R(imm),A reg(imm)=A --
-11011110 imm JC imm branch if C --
-11011111 imm CALL $xx save PC, branch --
-
-11100000 EXG A,IX0 A<->IX0 --
-11100001 EXG A,IX1 A<->IX1 --
-11100010 EXG A,IX2 A<->IX2 --
-11100011 EXG A,LP1 A<->LP1 --
-11100100 EXG A,LP2 A<->LP2 --
-11100101 EXG A,RXB A<->RXB --
-11100110 EXG A,LP0 A<->LP0 --
-11100111 EXG A,RB A<->RB --
-11101000 LD IX0,A IX0=A --
-11101001 LD IX1,A IX1=A --
-11101010 LD IX2,A IX2=A --
-11101011 LD LP1,A LP1=A --
-11101100 LD LP2,A LP2=A --
-11101101 LD RXB,A RXB=A --
-11101110 LD LP0,A LP0=A --
-11101111 LD RB,A RB=A --
-11110000 EXG IX0,IX1 IX0<->IX1 --
-11110001 EXG IX0,IX2 IX0<->IX2 --
-11110010 REP LD (IX2),(RXB) equivalent to LD (IX2),(RXB); INC RXB; DJNZ LP0
-11110011 REP LD (RXB),(IX0) equivalent to LD (RXB),(IX0); INC RXB; DJNZ LP0
-11110100 SAVE ZC save ZC --
-11110101 REST ZC restore ZC ZC
-11110110 LD (RXB),A reg(RXB)=A --
-11110111 LD A,(RXB) A=reg(RXB) --
-11111000 CMP A,(RXB) temp=A-reg(RXB) ZC
-11111001 XOR A,(RXB) A^=reg(RXB) Z0
-11111010 ADD A,CF if (C) A++ ZC
-11111011 SUB A,!CF if (!C) A-- ZC
-11111100 TST A A==0? Z-
-11111101 CLR A A=0 --
-11111110 LD A,(IX0+A) A=[IX0+A] --
-11111111 RET restore PC --
-
-
-8303 CONFIRMED OPCODES:
-----------------------
-all of the 8302 ones, with stricter decoding for the following:
-
-11010000 imm JNC imm branch if !C --
-11010001 imm JZ imm branch if Z --
-1101001- imm J imm branch --
-
-additionally, this opcode is modified to support 11-bit instead of 10-bit
-external addressing, this wasn't used in games however.
-
-1011-0aa LD MB,i modified so that bit 3 is shifted to bit 2 before loading MB.
-
-and these new opcodes are added:
-
-110101--
-11010100 imm LD A,(R77:$%02X)
-11010101 imm LD (R77:$%02X),A
-11010110 imm LD PC,(R77:$%02X) [1]
-11010111 imm LD (R77:$%02X),PC [2]
-
-Notes:
-[1] appears to be LD PC,x in the disassembly, however it's LD LP0,x for kouyakyu
- which uses a 8304, so the opcode was probably changed again.
-[2] appears to be LD x,PC in the disassembly, however it's LD x,LP0 for hvoltage
- which uses a 8304 (or 8404?), so the opcode was probably changed again.
-
-****************************************************/
-
-
-/****************************************************/
-
-const char *const alpha8201_disassembler::Formats[] = {
- FMT("0000_0000", "NOP"), // 00
- FMT("0000_0001", "RRCA"), // 01
- FMT("0000_0010", "RLCA"), // 02
- FMT("0000_0011", "INC RXB"), // 03 : shougi $360 to $377; splndrbt
- FMT("0000_0100", "DEC RXB"), // 04 : not found
- FMT("0000_0101", "INC A"), // 05
- FMT("0000_0110", "DEC A"), // 06
- FMT("0000_0111", "CPL A"), // 07
- FMT("0000_1aaa", "LD A,(IX0+%X)"), // 08-0F
- FMT("0001_0aaa", "LD A,(IX1+%X)"), // 10-17
- FMT("0001_1aaa", "LD (IX2+%X),A"), // 18-1F
- FMT("0010_0aaa", "LD (RXB),(IX0+%X)"),// 20-27 : shougi $360 to $377
- FMT("0010_1aaa", "LD (RXB),(IX1+%X)"),// 28-2f : not found
- FMT("0011_0aaa", "LD (IX2+%X),(RXB)"),// 30-37 : not found
- FMT("0011_1aaa", "BIT R0.%d"), // 38-3F ZF = R0.a (bit test)
- FMT("0100_aaa0", "LD A,R%X"), // 40-4E
- FMT("0100_aaa1", "LD R%X,A"), // 41-4F
- FMT("0101_aaa0", "ADD A,R%X"), // 50-5E
- FMT("0101_aaa1", "SUB A,R%X"), // 51-5F
- FMT("0110_aaa0", "AND A,R%X"), // 60-6E
- FMT("0110_aaa1", "OR A,R%X"), // 61-6F
- FMT("0111_aaaa", "ADD IX0,$%X"), // 70-7f
- FMT("1000_aaaa", "ADD IX1,$%X"), // 80-8f
- FMT("1001_aaaa", "ADD IX2,$%X"), // 90-9f
- FMT("1010_aaaa", "LD RB,%X"), // A0-AF
- FMT("1011_x0aa", "LD MB,%X"), // B0-B3 (+ mirrors)
- FMT("1011_x1xx", "STOP"), // B4 (+ mirrors)
-
- FMT("1100_0000 I", "LD IX0,$%02X"), // C0
- FMT("1100_0001 I", "LD IX1,$%02X"), // C1
- FMT("1100_0010 I", "LD IX2,$%02X"), // C2
- FMT("1100_0011 I", "LD A,$%02X"), // C3
- FMT("1100_0100 I", "LD LP0,$%02X"), // C4
- FMT("1100_0101 I", "LD LP1,$%02X"), // C5
- FMT("1100_0110 I", "LD LP2,$%02X"), // C6
- FMT("1100_0111 I", "LD RXB,$%02X"), // C7 : shougi, splndrbt, equites
- FMT("1100_1000 I", "ADD A,$%02X"), // C8
- FMT("1100_1001 I", "SUB A,$%02X"), // C9
- FMT("1100_1010 I", "AND A,$%02X"), // CA
- FMT("1100_1011 I", "OR A,$%02X"), // CB
- FMT("1100_1100 I", "DJNZ LP0,$%02X"), // CC
- FMT("1100_1101 I", "DJNZ LP1,$%02X"), // CD
- FMT("1100_1110 I", "DJNZ LP2,$%02X"), // CE
- FMT("1100_1111 I", "JNZ $%02X"), // CF
- FMT("1101_0000 I", "JNC $%02X"), // D0
- FMT("1101_0001 I", "JZ $%02X"), // D1
- FMT("1101_001x I", "J $%02X"), // D2 (+ mirror)
-
- /* -------------- 830x only ------------- */
-
- FMT("1101_0100 I", "LD A,(R77:$%02X)"), // D4 : 8303+ only. exctscc2, bullfgtr
- FMT("1101_0101 I", "LD (R77:$%02X),A"), // D5 : 8303+ only. exctscc2, bullfgtr, kouyakyu
- FMT("1101_0110 I", "LD LP0,(R77:$%02X)"), // D6 : 8303+ only. kouyakyu
- FMT("1101_0111 I", "LD (R77:$%02X),LP0"), // D7 : 8303+ only. hvoltage
- FMT("1101_1000 I", "LD A,($%02X)"), // D8 : equites
- FMT("1101_1001 I", "LD ($%02X),A"), // D9 : equites
- FMT("1101_1010 I", "CMP A,$%02X"), // DA :
- FMT("1101_1011 I", "XOR A,$%02X"), // DB : equites splndrbt
- FMT("1101_1100 I", "LD A,R($%02X)"), // DC : not found
- FMT("1101_1101 I", "LD R($%02X),A"), // DD : equites, splndrbt
- FMT("1101_1110 I", "JC $%02X"), // DE : not found
- FMT("1101_1111 I", "CALL $%02X"), // DF :
-
- FMT("1110_0000", "EXG A,IX0"), // E0 : exctsccr
- FMT("1110_0001", "EXG A,IX1"), // E1 : not found
- FMT("1110_0010", "EXG A,IX2"), // E2 : not found
- FMT("1110_0011", "EXG A,LP1"), // E3 : exctsccr in pair with EB
- FMT("1110_0100", "EXG A,LP2"), // E4 : not found
- FMT("1110_0101", "EXG A,RXB"), // E5 : splndrbt
- FMT("1110_0110", "EXG A,LP0"), // E6 : splndrbt, bullfgtr, kouyakyu. EXG, not LD: see splndrbt $3ba to $3d3
- FMT("1110_0111", "EXG A,RB"), // E7 : not found
- FMT("1110_1000", "LD IX0,A"), // E8 :
- FMT("1110_1001", "LD IX1,A"), // E9 : not found
- FMT("1110_1010", "LD IX2,A"), // EA :
- FMT("1110_1011", "LD LP1,A"), // EB : exctsccr in pair with E3
- FMT("1110_1100", "LP LP2,A"), // EC : not found
- FMT("1110_1101", "LD RXB,A"), // ED : splndrbt
- FMT("1110_1110", "LD LP0,A"), // EE : splndrbt, bullfgtr
- FMT("1110_1111", "LD RB,A"), // EF : not found
- FMT("1111_0000", "EXG IX0,IX1"), // F0 : not found
- FMT("1111_0001", "EXG IX0,IX2"), // F1 : splndrbt $2e to $38, equites $40 to $4a
- FMT("1111_0010", "REP LD (IX2),(RXB)"),// F2 : splndrbt LD (IX2),(RXB); INC RXB; DJNZ LP0
- FMT("1111_0011", "REP LD (RXB),(IX0)"),// F3 : not found LD (RXB),(IX0); INC RXB; DJNZ LP0
- FMT("1111_0100", "SAVE ZC"), // F4 : not found
- FMT("1111_0101", "REST ZC"), // F5 : not found
- FMT("1111_0110", "LD (RXB),A"), // F6 : exctsccr
- FMT("1111_0111", "LD A,(RXB)"), // F7 : not found
- FMT("1111_1000", "CMP A,(RXB)"), // F8 : exctsccr
- FMT("1111_1001", "XOR A,(RXB)"), // F9 : exctsccr
- FMT("1111_1010", "ADD A,CF"), // FA :
- FMT("1111_1011", "SUB A,!CF"), // FB : not found
- FMT("1111_1100", "TST A"), // FC :
- FMT("1111_1101", "CLR A"), // FD :
- FMT("1111_1110", "LD A,(IX0+A)"), // FE :
- FMT("1111_1111", "RET"), // FF :
- nullptr
-};
-
-alpha8201_disassembler::alpha8201_disassembler()
-{
- const char *p;
- u8 mask, bits;
- int bit;
- int i;
- char chr , type;
- int pmask , pdown;
-
- for(i=0;(p=Formats[i*2])!=nullptr;i++)
- {
- mask = 0;
- bits = 0;
- pmask = 0;
- pdown = 0;
- type = 0;
- bit = 7;
- while (*p && bit >= 0) {
- chr = *p++;
- switch (chr) {
- case '1': bits |= 1<<bit;
- case '0': mask |= 1<<bit; bit--; break;
-#if 0
- case 'b':
- type |= 0x80;
-#endif
- case 'a':
- pmask |= 1<<bit;
- pdown = bit;
- case 'x':
- bit--;
- break;
- case '_':
- continue;
- default:
- throw std::logic_error(util::string_format("Invalid instruction encoding '%s %s'\n", Formats[i*2],Formats[i*2+1]));
- }
- }
- if (bit != -1) {
- throw std::logic_error(util::string_format("not enough bits in encoding '%s %s' %d\n", Formats[i*2],Formats[i*2+1],bit));
- }
-
- Op[i].mask = mask;
- Op[i].bits = bits;
- Op[i].pmask = pmask;
- Op[i].pdown = pdown;
- Op[i].fmt = Formats[i*2+1];
- Op[i].type = type;
-
- /* 2 byte code ? */
- while (isspace(u8(*p))) p++;
- if( (*p) )
- Op[i].type |= 0x10;
- /* number of param */
- if( (p=strchr(Op[i].fmt,'%'))!=nullptr )
- {
- Op[i].type |= 0x01; /* single param */
- if(strchr(p+1,'%') )
- Op[i].type |= 0x02; /* double param */
- }
- }
- op_count = i;
-}
-
-offs_t alpha8201_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
-{
- offs_t dasmflags = 0;
- int i;
- int op;
- int cnt = 1;
- int code , disp;
-
- code = opcodes.r8(pc);
- op = -1; /* no matching opcode */
- for ( i = 0; i < op_count; i++)
- {
- if( (code & Op[i].mask) == Op[i].bits )
- {
- if (op != -1)
- {
- fprintf(stderr, "Error: opcode %02X matches %d (%s) and %d (%s)\n",
- code,i,Op[i].fmt,op,Op[op].fmt);
- }
- op = i;
- }
- }
-
- if (op == -1)
- {
- util::stream_format(stream, "db %2.2x",code);
- return cnt;
- }
-
- if (Op[op].type & 0x10)
- {
- disp = params.r8(pc+1);
- cnt++;
- }
- else
- {
- disp = (code & Op[op].pmask) >> Op[op].pdown;
- }
-
- if (Op[op].type & 0x02)
- util::stream_format(stream, Op[op].fmt,disp,disp);
- else if (Op[op].type & 0x01)
- util::stream_format(stream, Op[op].fmt,disp);
- else
- util::stream_format(stream, "%s",Op[op].fmt);
-
- switch (code)
- {
- case 0xcc:
- case 0xcd:
- case 0xce:
- case 0xdf:
- dasmflags = STEP_OVER;
- break;
-
- case 0xff:
- dasmflags = STEP_OUT;
- break;
- }
-
- return cnt | dasmflags | SUPPORTED;
-}
-
-u32 alpha8201_disassembler::opcode_alignment() const
-{
- return 1;
-}
diff --git a/src/devices/cpu/alph8201/8201dasm.h b/src/devices/cpu/alph8201/8201dasm.h
deleted file mode 100644
index 85676c5de10..00000000000
--- a/src/devices/cpu/alph8201/8201dasm.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Tatsuyuki Satoh
-/*
-
-Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-
-cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
-
-
-
-
-*/
-
-/****************************************************************************
- Alpha 8201/8301 Disassembler
-
- Copyright Tatsuyuki Satoh
- Originally written for the MAME project.
-
-****************************************************************************/
-
-#ifndef MAME_CPU_ALPH8201_8201DASM_H
-#define MAME_CPU_ALPH8201_8201DASM_H
-
-#pragma once
-
-class alpha8201_disassembler : public util::disasm_interface
-{
-public:
- alpha8201_disassembler();
- virtual ~alpha8201_disassembler() = default;
-
- virtual u32 opcode_alignment() const override;
- virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
-
-private:
- struct AD8201Opcode {
- u8 mask;
- u8 bits;
- u8 type;
- u8 pmask;
- u8 pdown;
- const char *fmt;
- };
-
- static const char *const Formats[];
- AD8201Opcode Op[256];
- int op_count;
-};
-
-#endif
diff --git a/src/devices/cpu/alph8201/alph8201.cpp b/src/devices/cpu/alph8201/alph8201.cpp
deleted file mode 100644
index 111b833c9bb..00000000000
--- a/src/devices/cpu/alph8201/alph8201.cpp
+++ /dev/null
@@ -1,698 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Tatsuyuki Satoh
-/*
-
-Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-
-cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
-
-
-
-
-*/
-
-/****************************************************************************
- Alpha8201 Emulator
-
- Copyright Tatsuyuki Satoh
- Originally written for the MAME project.
-
-
-The Alpha8201/830x isn't a real CPU. It is a Hitachi HD44801 4-bit MCU,
-programmed to interpret an external program using a custom instruction set.
-Alpha8301 has an expanded instruction set, backwards compatible with Alpha8201
-
-The internal ROM hasn't been read (yet), so here we provide a simulation of
-the behaviour.
-
-
-Game Year MCU
------------------------- ---- ----
-Shougi 1982? 8201 (pcb)
-Shougi 2 1982? 8201 (pcb)
-Talbot 1982 8201?
-Champion Base Ball 1983 8201 (schematics)
-Exciting Soccer 1983 8302 (pcb)
-Champion Base Ball II 1983 8302 (pcb, unofficial schematics)
-Exciting Soccer II 1984 8303 (uses 8303+ opcodes)
-Equites 1984 8303 (post)
-Bull Fighter 1984 8303 (post)
-Splendor Blast 1985 8303 (post)
-Gekisou 1985 8304 (post)
-The Koukou Yakyuu 1985 8304 (post)
-High Voltage 1985 8304?(post says 8404, but readme says 8304)
-unknown CLS bingo game 1986 8505
-
-ALPHA-8201: "44801A75" -> HD44801, ROM code = A75
-ALPHA-8302: "44801B35" -> HD44801, ROM code = B35
-ALPHA-8303: "44801B42" -> HD44801, ROM code = B42
-ALPHA-8304: ?
-ALPHA-8505: "44801C57" -> HD44801, ROM code = C57
-
-
- Notes :
- some unknown instruction are not emulated.
-
- Because there was no information, opcode-syntax was created.
-
- TODO:
- verify with real chip or analyze more.
- -A lot of 8301 opcode.
- -memory address 000 specification
- -memory address 001 bit 7-5 specification
- -write value after HALT operation to ODD of vector memory.
- -operation cycle(execution speed).
-
-****************************************************************************/
-
-/****************************************************************************
-
------------------------
-package / pin assign
------------------------
-ALPHA 8201 DIP 42
-
-pin HD44801 Alpha
---- ------- -----
-1 : D3 WR
-2-4 : D4-D6 n.c.
-5-7 : D7-D9 GND in shougi , n.c. in champbas
-8-13 : D10-D15 n.c.
-14 : n.c. n.c.
-15 : RESET RESET
-16 : GND GND
-17 : OSC1 (champbas=384KHz)
-18 : OSC2 n.c.
-19 : !HLT Vcc
-20 : !TEST Vcc
-21 : Vcc Vcc
-22-25: R00-R03 DB4-DB7
-26-29: R10-R13 DB0-DB3
-30 : INT0 GO (input)
-31 : INT1 n.c.
-32-35: R20-R23 A4-A7
-36-39: R30-R33 A0-A3
-40-41: D0-D1 A8-A9
-42 : D2 /RD
-
-
------------------------
-Register Set
------------------------
-
-PC : 10bit Program Pointer
- A lower 8bits are loaded from the immidate.
- A higher 2bits are loaded from the MB register.
-
-MB : 2bit memory bank register, load PC[9:8] after branch
- load high to higher 2bit of PC after branch.
-
-RB : 3bit register bank select register
-
-R0-R7 : internal? RAM register 8bitx8 (x8 bank)
-
-A : 8bit
-
-cpustate->IX0/1 : memory indirect 'read' access pointer
-
-cpustate->IX2 : memory indirect 'write' access pointer
-
-RXB : unknown , looks index register
-
-cpustate->LP0/1/2 : loop count register used by DJNZ operation
-
-cpustate->cf : carry flag
-cpustate->zf : zero flag
-
------------------------
-Memoy Space
------------------------
-
-000 : unknown ...
-001 : bit4..0 = pointer of current entry , bit7..6 = unknown
-002-003 : entrypoint1 vector
-004-005 : entrypoint2 vector
-006-007 : entrypoint3 vector
-008-009 : entrypoint4 vector
-00A-00B : entrypoint5 vector
-00C-00D : entrypoint6 vector
-00E-00F : entrypoint7 vector
-010-011 : entrypoint8 vector
-012-013 : entrypoint9 vector
-014-015 : entrypoint10 vector
-016-017 : entrypoint11 vector
-018-019 : entrypoint12 vector
-01A-01B : entrypoint13 vector
-01C-01D : entrypoint14 vector
-01E-01F : entrypoint15 vector
-020-0FF : bank 0, program / data memory
-100-1FF : bank 1, program / data memory
-200-2FF : bank 2, program / data memory
-300-3FF : bank 3, program / data memory
-
-The even address is the lower byte of the entry address.
-The odd-address of entry point is a MB and status.
- Bit 0 and 1 are a memory bank.
- Bit 2 is HALT.At the time of set, it doesn't execute entry address.
- After EXIT operation, Bit2 is set.
-
------------------------
-Timming
------------------------
-
-****************************************************************************/
-
-#include "emu.h"
-#include "alph8201.h"
-#include "debugger.h"
-#include "8201dasm.h"
-
-DEFINE_DEVICE_TYPE(ALPHA8201L, alpha8201_cpu_device, "alpha8201l", "ALPHA-8201L")
-DEFINE_DEVICE_TYPE(ALPHA8301L, alpha8301_cpu_device, "alpha8301l", "ALPHA-8301L")
-
-
-/* instruction cycle count */
-#define C1 16
-#define C2 32
-
-/* debug option */
-#define TRACE_PC 0
-#define SHOW_ENTRY_POINT 0
-#define SHOW_MESSAGE_CONSOLE 0
-#define BREAK_ON_UNKNOWN_OPCODE 0
-#define BREAK_ON_UNCERTAIN_OPCODE 0
-
-
-#define FN(x) &alpha8201_cpu_device::x
-
-
-alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : alpha8201_cpu_device(mconfig, ALPHA8201L, tag, owner, clock, opcode_8201)
-{
-}
-
-
-alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const s_opcode *opmap)
- : cpu_device(mconfig, type, tag, owner, clock)
- , m_program_config("program", ENDIANNESS_LITTLE, 8, 10, 0)
- , m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0)
- , m_opmap(opmap)
-{
-}
-
-alpha8301_cpu_device::alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : alpha8201_cpu_device(mconfig, ALPHA8301L, tag, owner, clock, opcode_8301)
-{
-}
-
-device_memory_interface::space_config_vector alpha8201_cpu_device::memory_space_config() const
-{
- return space_config_vector {
- std::make_pair(AS_PROGRAM, &m_program_config),
- std::make_pair(AS_IO, &m_io_config)
- };
-}
-
-/* Get next opcode argument and increment program counter */
-unsigned alpha8201_cpu_device::M_RDMEM_OPCODE()
-{
- unsigned retval;
- retval=M_RDOP_ARG(m_pc.w.l);
- m_pc.b.l++;
- return retval;
-}
-
-void alpha8201_cpu_device::M_ADD(u8 dat)
-{
- u16 temp = m_A + dat;
- m_A = temp & 0xff;
- m_zf = (m_A==0);
- m_cf = temp>>8;
-}
-
-void alpha8201_cpu_device::M_ADDB(u8 dat)
-{
- u16 temp = m_B + dat;
- m_B = temp & 0xff;
- m_zf = (m_B==0);
- m_cf = temp>>8;
-}
-
-void alpha8201_cpu_device::M_SUB(u8 dat)
-{
- m_cf = (m_A>=dat); // m_cf is No Borrow
- m_A -= dat;
- m_zf = (m_A==0);
-}
-
-void alpha8201_cpu_device::M_AND(u8 dat)
-{
- m_A &= dat;
- m_zf = (m_A==0);
-}
-
-void alpha8201_cpu_device::M_OR(u8 dat)
-{
- m_A |= dat;
- m_zf = (m_A==0);
-}
-
-void alpha8201_cpu_device::M_XOR(u8 dat)
-{
- m_A ^= dat;
- m_zf = (m_A==0);
- m_cf = 0;
-}
-
-void alpha8201_cpu_device::M_JMP(u8 dat)
-{
- m_pc.b.l = dat;
- /* update pc page */
- m_pc.b.h = m_ix0.b.h = m_ix1.b.h = m_ix2.b.h = m_mb & 3;
-}
-
-void alpha8201_cpu_device::M_UNDEFINED()
-{
- logerror("alpha8201: PC = %03x, Unimplemented opcode = %02x\n", m_pc.w.l-1, M_RDMEM(m_pc.w.l-1));
-#if SHOW_MESSAGE_CONSOLE
- osd_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x\n", m_pc.w.l-1, M_RDMEM(m_pc.w.l-1));
-#endif
-#if BREAK_ON_UNKNOWN_OPCODE
- machine().debug_break();
-#endif
-}
-
-void alpha8201_cpu_device::M_UNDEFINED2()
-{
- u8 op = M_RDOP(m_pc.w.l-1);
- u8 imm = M_RDMEM_OPCODE();
- logerror("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm);
-#if SHOW_MESSAGE_CONSOLE
- osd_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm);
-#endif
-#if BREAK_ON_UNKNOWN_OPCODE
- machine().debug_break();
-#endif
-}
-
-
-void alpha8201_cpu_device::stop()
-{
- u8 pcptr = M_RDMEM(0x001) & 0x1f;
- M_WRMEM(pcptr,(M_RDMEM(pcptr)&0xf)+0x08); /* mark entry point ODD to HALT */
- m_mb |= 0x08; /* mark internal HALT state */
-}
-
-
-const alpha8201_cpu_device::s_opcode alpha8201_cpu_device::opcode_8201[256]=
-{
- {C1, FN(nop) },{C1,FN(rora) },{C1, FN(rola) },{C1,FN(inc_b) },{C1,FN(dec_b) },{C1, FN(inc_a) },{C1, FN(dec_a) },{C1, FN(cpl) },
- {C2,FN(ld_a_ix0_0) },{C2,FN(ld_a_ix0_1)},{C2, FN(ld_a_ix0_2)},{C2,FN(ld_a_ix0_3)},{C2,FN(ld_a_ix0_4)},{C2,FN(ld_a_ix0_5)},{C2,FN(ld_a_ix0_6)},{C2,FN(ld_a_ix0_7)},
- {C2,FN(ld_a_ix1_0) },{C2,FN(ld_a_ix1_1)},{C2, FN(ld_a_ix1_2)},{C2,FN(ld_a_ix1_3)},{C2,FN(ld_a_ix1_4)},{C2,FN(ld_a_ix1_5)},{C2,FN(ld_a_ix1_6)},{C2,FN(ld_a_ix1_7)},
- {C2,FN(ld_ix2_0_a) },{C2,FN(ld_ix2_1_a)},{C2, FN(ld_ix2_2_a)},{C2,FN(ld_ix2_3_a)},{C2,FN(ld_ix2_4_a)},{C2,FN(ld_ix2_5_a)},{C2,FN(ld_ix2_6_a)},{C2,FN(ld_ix2_7_a)},
-/* 20 */
- {C2,FN(ld_ix0_0_b) },{C2,FN(ld_ix0_1_b)},{C2, FN(ld_ix0_2_b)},{C2,FN(ld_ix0_3_b)},{C2,FN(ld_ix0_4_b)},{C2,FN(ld_ix0_5_b)},{C2,FN(ld_ix0_6_b)},{C2,FN(ld_ix0_7_b)},
- {C2,FN(undefined) },{C2,FN(undefined) },{C2, FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },
- {C2,FN(undefined) },{C2,FN(undefined) },{C2, FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },
- {C2,FN(bit_r0_0) },{C2,FN(bit_r0_1) },{C2, FN(bit_r0_2) },{C2, FN(bit_r0_3) },{C2, FN(bit_r0_4) },{C2, FN(bit_r0_5) },{C2, FN(bit_r0_6) },{C2, FN(bit_r0_7) },
-/* 40 : 8201 */
- {C2, FN(ld_a_r0) },{C2, FN(ld_r0_a) },{C2, FN(ld_a_r1) },{C2, FN(ld_r1_a) },{C2, FN(ld_a_r2) },{C2, FN(ld_r2_a) },{C2, FN(ld_a_r3) },{C2, FN(ld_r3_a) },
- {C2, FN(ld_a_r4) },{C2, FN(ld_r4_a) },{C2, FN(ld_a_r5) },{C2, FN(ld_r5_a) },{C2, FN(ld_a_r6) },{C2, FN(ld_r6_a) },{C2, FN(ld_a_r7) },{C2, FN(ld_r7_a) },
- {C1, FN(add_a_r0) },{C1, FN(sub_a_r0) },{C1, FN(add_a_r1) },{C1, FN(sub_a_r1) },{C1, FN(add_a_r2) },{C1, FN(sub_a_r2) },{C1, FN(add_a_r3) },{C1, FN(sub_a_r3) },
- {C1, FN(add_a_r4) },{C1, FN(sub_a_r4) },{C1, FN(add_a_r5) },{C1, FN(sub_a_r5) },{C1, FN(add_a_r6) },{C1, FN(sub_a_r6) },{C1, FN(add_a_r7) },{C1, FN(sub_a_r7) },
- {C1, FN(and_a_r0) },{C1, FN(or_a_r0) },{C1, FN(and_a_r1) },{C1, FN(or_a_r1) },{C1, FN(and_a_r2) },{C1, FN(or_a_r2) },{C1, FN(and_a_r3) },{C1, FN(or_a_r3) },
- {C1, FN(and_a_r4) },{C1, FN(or_a_r4) },{C1, FN(and_a_r5) },{C1, FN(or_a_r5) },{C1, FN(and_a_r6) },{C1, FN(or_a_r6) },{C1, FN(and_a_r7) },{C1, FN(or_a_r7) },
- {C1, FN(add_ix0_0) },{C1, FN(add_ix0_1)},{C1, FN(add_ix0_2)},{C1, FN(add_ix0_3)},{C1, FN(add_ix0_4)},{C1, FN(add_ix0_5)},{C1, FN(add_ix0_6)},{C1, FN(add_ix0_7)},
- {C1, FN(add_ix0_8) },{C1, FN(add_ix0_9)},{C1, FN(add_ix0_a)},{C1, FN(add_ix0_b)},{C1, FN(add_ix0_c)},{C1, FN(add_ix0_d)},{C1, FN(add_ix0_e)},{C1, FN(add_ix0_f)},
-/* 80 : 8201 */
- {C1, FN(add_ix1_0) },{C1, FN(add_ix1_1)},{C1, FN(add_ix1_2)},{C1, FN(add_ix1_3)},{C1, FN(add_ix1_4)},{C1, FN(add_ix1_5)},{C1, FN(add_ix1_6)},{C1, FN(add_ix1_7)},
- {C1, FN(add_ix1_8) },{C1, FN(add_ix1_9)},{C1, FN(add_ix1_a)},{C1, FN(add_ix1_b)},{C1, FN(add_ix1_c)},{C1, FN(add_ix1_d)},{C1, FN(add_ix1_e)},{C1, FN(add_ix1_f)},
- {C1, FN(add_ix2_0) },{C1, FN(add_ix2_1)},{C1, FN(add_ix2_2)},{C1, FN(add_ix2_3)},{C1, FN(add_ix2_4)},{C1, FN(add_ix2_5)},{C1, FN(add_ix2_6)},{C1, FN(add_ix2_7)},
- {C1, FN(add_ix2_8) },{C1, FN(add_ix2_9)},{C1, FN(add_ix2_a)},{C1, FN(add_ix2_b)},{C1, FN(add_ix2_c)},{C1, FN(add_ix2_d)},{C1, FN(add_ix2_e)},{C1, FN(add_ix2_f)},
- {C1, FN(ld_base_0) },{C1, FN(ld_base_1)},{C1, FN(ld_base_2)},{C1, FN(ld_base_3)},{C1, FN(ld_base_4)},{C1, FN(ld_base_5)},{C1, FN(ld_base_6)},{C1, FN(ld_base_7)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(ld_bank_0) },{C1, FN(ld_bank_1)},{C1, FN(ld_bank_2)},{C1, FN(ld_bank_3)},{C2, FN(stop) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
-/* c0 : 8201 */
- {C2, FN(ld_ix0_n) },{C2, FN(ld_ix1_n) },{C2, FN(ld_ix2_n) },{C2, FN(ld_a_n) },{C2, FN(ld_lp0_n) },{C2, FN(ld_lp1_n) },{C2, FN(ld_lp2_n) },{C2, FN(ld_b_n) },
- {C2, FN(add_a_n) },{C2, FN(sub_a_n) },{C2, FN(and_a_n) },{C2, FN(or_a_n) },{C2, FN(djnz_lp0) },{C2, FN(djnz_lp1) },{C2, FN(djnz_lp2) },{C2, FN(jnz) },
- {C2, FN(jnc) },{C2, FN(jz) },{C2, FN(jmp) },{C2,FN(undefined2)},{C2,FN(undefined2)},{C2,FN(undefined2)},{C2,FN(undefined2)},{C2, FN(undefined2)},
- {C2, FN(undefined2) },{C2,FN(undefined2)},{C2,FN(undefined2)},{C2,FN(undefined2)},{C2,FN(undefined2)},{C2,FN(undefined2)},{C2,FN(undefined2)},{C2, FN(undefined2)},
-/* E0 : 8201*/
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined) }
-};
-
-
-const alpha8201_cpu_device::s_opcode alpha8201_cpu_device::opcode_8301[256]=
-{
- {C1, FN(nop) },{C1,FN(rora) },{C1, FN(rola) },{C1,FN(inc_b) },{C1,FN(dec_b) },{C1, FN(inc_a) },{C1, FN(dec_a) },{C1, FN(cpl) },
- {C2,FN(ld_a_ix0_0) },{C2,FN(ld_a_ix0_1)},{C2, FN(ld_a_ix0_2)},{C2,FN(ld_a_ix0_3)},{C2,FN(ld_a_ix0_4)},{C2,FN(ld_a_ix0_5)},{C2,FN(ld_a_ix0_6)},{C2,FN(ld_a_ix0_7)},
- {C2,FN(ld_a_ix1_0) },{C2,FN(ld_a_ix1_1)},{C2, FN(ld_a_ix1_2)},{C2,FN(ld_a_ix1_3)},{C2,FN(ld_a_ix1_4)},{C2,FN(ld_a_ix1_5)},{C2,FN(ld_a_ix1_6)},{C2,FN(ld_a_ix1_7)},
- {C2,FN(ld_ix2_0_a) },{C2,FN(ld_ix2_1_a)},{C2, FN(ld_ix2_2_a)},{C2,FN(ld_ix2_3_a)},{C2,FN(ld_ix2_4_a)},{C2,FN(ld_ix2_5_a)},{C2,FN(ld_ix2_6_a)},{C2,FN(ld_ix2_7_a)},
-/* 20 : 8301 */
- {C2,FN(ld_ix0_0_b) },{C2,FN(ld_ix0_1_b)},{C2, FN(ld_ix0_2_b)},{C2,FN(ld_ix0_3_b)},{C2,FN(ld_ix0_4_b)},{C2,FN(ld_ix0_5_b)},{C2,FN(ld_ix0_6_b)},{C2,FN(ld_ix0_7_b)},
- {C2,FN(undefined) },{C2,FN(undefined) },{C2, FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },
- {C2,FN(undefined) },{C2,FN(undefined) },{C2, FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },{C2,FN(undefined) },
- {C2,FN(bit_r0_0) },{C2,FN(bit_r0_1) },{C2, FN(bit_r0_2) },{C2, FN(bit_r0_3) },{C2, FN(bit_r0_4) },{C2, FN(bit_r0_5) },{C2, FN(bit_r0_6) },{C2, FN(bit_r0_7) },
-/* 40 : 8301 */
- {C2, FN(ld_a_r0) },{C2, FN(ld_r0_a) },{C2, FN(ld_a_r1) },{C2, FN(ld_r1_a) },{C2, FN(ld_a_r2) },{C2, FN(ld_r2_a) },{C2, FN(ld_a_r3) },{C2, FN(ld_r3_a) },
- {C2, FN(ld_a_r4) },{C2, FN(ld_r4_a) },{C2, FN(ld_a_r5) },{C2, FN(ld_r5_a) },{C2, FN(ld_a_r6) },{C2, FN(ld_r6_a) },{C2, FN(ld_a_r7) },{C2, FN(ld_r7_a) },
- {C1, FN(add_a_r0) },{C1, FN(sub_a_r0) },{C1, FN(add_a_r1) },{C1, FN(sub_a_r1) },{C1, FN(add_a_r2) },{C1, FN(sub_a_r2) },{C1, FN(add_a_r3) },{C1, FN(sub_a_r3) },
- {C1, FN(add_a_r4) },{C1, FN(sub_a_r4) },{C1, FN(add_a_r5) },{C1, FN(sub_a_r5) },{C1, FN(add_a_r6) },{C1, FN(sub_a_r6) },{C1, FN(add_a_r7) },{C1, FN(sub_a_r7) },
-/* 60 : 8301 */
- {C1, FN(and_a_r0) },{C1, FN(or_a_r0) },{C1, FN(and_a_r1) },{C1, FN(or_a_r1) },{C1, FN(and_a_r2) },{C1, FN(or_a_r2) },{C1, FN(and_a_r3) },{C1, FN(or_a_r3) },
- {C1, FN(and_a_r4) },{C1, FN(or_a_r4) },{C1, FN(and_a_r5) },{C1, FN(or_a_r5) },{C1, FN(and_a_r6) },{C1, FN(or_a_r6) },{C1, FN(and_a_r7) },{C1, FN(or_a_r7) },
- {C1, FN(add_ix0_0) },{C1, FN(add_ix0_1)},{C1, FN(add_ix0_2)},{C1, FN(add_ix0_3)},{C1, FN(add_ix0_4)},{C1, FN(add_ix0_5)},{C1, FN(add_ix0_6)},{C1, FN(add_ix0_7)},
- {C1, FN(add_ix0_8) },{C1, FN(add_ix0_9)},{C1, FN(add_ix0_a)},{C1, FN(add_ix0_b)},{C1, FN(add_ix0_c)},{C1, FN(add_ix0_d)},{C1, FN(add_ix0_e)},{C1, FN(add_ix0_f)},
-/* 80 : 8301 */
- {C1, FN(add_ix1_0) },{C1, FN(add_ix1_1)},{C1, FN(add_ix1_2)},{C1, FN(add_ix1_3)},{C1, FN(add_ix1_4)},{C1, FN(add_ix1_5)},{C1, FN(add_ix1_6)},{C1, FN(add_ix1_7)},
- {C1, FN(add_ix1_8) },{C1, FN(add_ix1_9)},{C1, FN(add_ix1_a)},{C1, FN(add_ix1_b)},{C1, FN(add_ix1_c)},{C1, FN(add_ix1_d)},{C1, FN(add_ix1_e)},{C1, FN(add_ix1_f)},
- {C1, FN(add_ix2_0) },{C1, FN(add_ix2_1)},{C1, FN(add_ix2_2)},{C1, FN(add_ix2_3)},{C1, FN(add_ix2_4)},{C1, FN(add_ix2_5)},{C1, FN(add_ix2_6)},{C1, FN(add_ix2_7)},
- {C1, FN(add_ix2_8) },{C1, FN(add_ix2_9)},{C1, FN(add_ix2_a)},{C1, FN(add_ix2_b)},{C1, FN(add_ix2_c)},{C1, FN(add_ix2_d)},{C1, FN(add_ix2_e)},{C1, FN(add_ix2_f)},
-/* A0 : 8301 */
- {C1, FN(ld_base_0) },{C1, FN(ld_base_1)},{C1, FN(ld_base_2)},{C1, FN(ld_base_3)},{C1, FN(ld_base_4)},{C1, FN(ld_base_5)},{C1, FN(ld_base_6)},{C1, FN(ld_base_7)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(ld_bank_0) },{C1, FN(ld_bank_1)},{C1, FN(ld_bank_2)},{C1, FN(ld_bank_3)},{C2, FN(stop) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
- {C1, FN(undefined) },{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},{C1, FN(undefined)},
-/* c0 : 8301 */
- {C2, FN(ld_ix0_n) },{C2, FN(ld_ix1_n)},{C2, FN(ld_ix2_n) },{C2, FN(ld_a_n) },{C2, FN(ld_lp0_n) },{C2, FN(ld_lp1_n) },{C2, FN(ld_lp2_n) },{C2, FN(ld_b_n) },
- {C2, FN(add_a_n) },{C2, FN(sub_a_n) },{C2, FN(and_a_n) },{C2, FN(or_a_n) },{C2, FN(djnz_lp0) },{C2, FN(djnz_lp1) },{C2, FN(djnz_lp2) },{C2, FN(jnz) },
- {C2, FN(jnc) },{C2, FN(jz) },{C2, FN(jmp) },{C2,FN(undefined2)},{C2, FN(op_d4) },{C2, FN(op_d5) },{C2, FN(op_d6) },{C2, FN(op_d7) },
- {C2, FN(ld_a_abs) },{C2, FN(ld_abs_a)},{C2,FN(cmp_a_n) },{C2,FN(xor_a_n) },{C2, FN(ld_a_r) },{C2, FN(ld_r_a) },{C2, FN(jc) },{C2, FN(call)},
-/* E0 : 8301 */
- {C1, FN(exg_a_ix0) },{C1, FN(exg_a_ix1)},{C1, FN(exg_a_ix2)},{C1, FN(exg_a_lp1)},{C1, FN(exg_a_lp2)},{C1, FN(exg_a_b) },{C1, FN(exg_a_lp0)},{C1, FN(exg_a_rb) },
- {C1, FN(ld_ix0_a) },{C1, FN(ld_ix1_a) },{C1, FN(ld_ix2_a) },{C1, FN(ld_lp1_a) },{C1, FN(ld_lp2_a) },{C1, FN(ld_b_a) },{C1, FN(ld_lp0_a) },{C1, FN(ld_rb_a) },
- {C1,FN(exg_ix0_ix1)},{C1,FN(exg_ix0_ix2)},{C1,FN(op_rep_ld_ix2_b)},{C1, FN(op_rep_ld_b_ix0)},{C1, FN(save_zc)},{C1, FN(rest_zc)},{C1, FN(ld_rxb_a) },{C1, FN(ld_a_rxb) },
- {C1, FN(cmp_a_rxb) },{C1, FN(xor_a_rxb)},{C1, FN(add_a_cf) },{C1, FN(sub_a_cf) },{C1, FN(tst_a) },{C1, FN(clr_a) },{C1, FN(ld_a_ix0_a)},{C1, FN(ret) }
-};
-
-
-/****************************************************************************
- * Initialize emulation
- ****************************************************************************/
-void alpha8201_cpu_device::device_start()
-{
- m_program = &space(AS_PROGRAM);
- m_cache = m_program->cache<0, 0, ENDIANNESS_LITTLE>();
-
- state_add( ALPHA8201_PC, "PC", m_pc.w.l ).callimport().mask(0x3ff).formatstr("%03X");
- state_add( ALPHA8201_SP, "SP", m_sp ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_RB, "RB", m_regPtr ).mask(0x7);
- state_add( ALPHA8201_MB, "MB", m_mb ).mask(0x3);
- state_add( ALPHA8201_IX0, "IX0", m_ix0.b.l );
- state_add( ALPHA8201_IX1, "IX1", m_ix1.b.l );
- state_add( ALPHA8201_IX2, "IX2", m_ix2.b.l );
- state_add( ALPHA8201_LP0, "LP0", m_lp0 );
- state_add( ALPHA8201_LP1, "LP1", m_lp1 );
- state_add( ALPHA8201_LP2, "LP2", m_lp2 );
- state_add( ALPHA8201_A, "A", m_A );
- state_add( ALPHA8201_B, "B", m_B );
- state_add( ALPHA8201_R0, "R0", m_R[0] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R1, "R1", m_R[1] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R2, "R2", m_R[2] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R3, "R3", m_R[3] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R4, "R4", m_R[4] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R5, "R5", m_R[5] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R6, "R6", m_R[6] ).callimport().callexport().formatstr("%02X");
- state_add( ALPHA8201_R7, "R7", m_R[7] ).callimport().callexport().formatstr("%02X");
- state_add( STATE_GENPCBASE, "CURPC", m_PREVPC ).callimport().noshow();
- state_add( STATE_GENFLAGS, "CURFLAGS", m_flags ).callimport().callexport().formatstr("%2s").noshow();
- state_add( STATE_GENSP, "CURSP", m_sp ).callimport().callexport();
-
- save_item(NAME(m_RAM));
- save_item(NAME(m_PREVPC));
- save_item(NAME(m_pc.w.l));
- save_item(NAME(m_regPtr));
- save_item(NAME(m_zf));
- save_item(NAME(m_cf));
- save_item(NAME(m_mb));
- save_item(NAME(m_halt));
- save_item(NAME(m_ix0.b.l));
- save_item(NAME(m_ix1.b.l));
- save_item(NAME(m_ix2.b.l));
- save_item(NAME(m_lp0));
- save_item(NAME(m_lp1));
- save_item(NAME(m_lp2));
- save_item(NAME(m_A));
- save_item(NAME(m_B));
- save_item(NAME(m_retptr));
- save_item(NAME(m_savec));
- save_item(NAME(m_savez));
-
- set_icountptr(m_icount);
-}
-
-
-//-------------------------------------------------
-// state_import - import state into the device,
-// after it has been set
-//-------------------------------------------------
-
-void alpha8201_cpu_device::state_import(const device_state_entry &entry)
-{
- switch (entry.index())
- {
- case ALPHA8201_PC:
- m_PREVPC = m_pc.w.l;
- break;
-
- case STATE_GENPCBASE:
- m_pc.w.l = m_PREVPC;
- break;
-
- case STATE_GENFLAGS:
- m_cf = BIT(m_flags, 1);
- m_zf = BIT(m_flags, 0);
- break;
-
- case ALPHA8201_SP:
- case STATE_GENSP:
- M_WRMEM(0x001, m_sp);
- break;
-
- case ALPHA8201_R0:
- WR_REG(0, m_R[0]);
- break;
-
- case ALPHA8201_R1:
- WR_REG(1, m_R[1]);
- break;
-
- case ALPHA8201_R2:
- WR_REG(2, m_R[2]);
- break;
-
- case ALPHA8201_R3:
- WR_REG(3, m_R[3]);
- break;
-
- case ALPHA8201_R4:
- WR_REG(4, m_R[4]);
- break;
-
- case ALPHA8201_R5:
- WR_REG(5, m_R[5]);
- break;
-
- case ALPHA8201_R6:
- WR_REG(6, m_R[6]);
- break;
-
- case ALPHA8201_R7:
- WR_REG(7, m_R[7]);
- break;
- }
-}
-
-
-//-------------------------------------------------
-// state_export - export state from the device,
-// to a known location where it can be read
-//-------------------------------------------------
-
-void alpha8201_cpu_device::state_export(const device_state_entry &entry)
-{
- switch (entry.index())
- {
- case STATE_GENFLAGS:
- m_flags = (m_cf << 1) | m_zf;
- break;
-
- case ALPHA8201_SP:
- case STATE_GENSP:
- m_sp = M_RDMEM(0x001);
- break;
-
- case ALPHA8201_R0:
- m_R[0] = RD_REG(0);
- break;
-
- case ALPHA8201_R1:
- m_R[1] = RD_REG(1);
- break;
-
- case ALPHA8201_R2:
- m_R[2] = RD_REG(2);
- break;
-
- case ALPHA8201_R3:
- m_R[3] = RD_REG(3);
- break;
-
- case ALPHA8201_R4:
- m_R[4] = RD_REG(4);
- break;
-
- case ALPHA8201_R5:
- m_R[5] = RD_REG(5);
- break;
-
- case ALPHA8201_R6:
- m_R[6] = RD_REG(6);
- break;
-
- case ALPHA8201_R7:
- m_R[7] = RD_REG(7);
- break;
- }
-}
-
-
-//-------------------------------------------------
-// state_string_export - export state as a string
-// for the debugger
-//-------------------------------------------------
-
-void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
-{
- switch (entry.index())
- {
- case STATE_GENFLAGS:
- str = string_format("%c%c", m_cf ? 'C' : '.', m_zf ? 'Z' : '.');
- break;
- }
-}
-
-/****************************************************************************
- * Reset registers to their initial values
- ****************************************************************************/
-void alpha8201_cpu_device::device_reset()
-{
- m_pc.w.l = 0;
- m_regPtr = 0;
- m_zf = 0;
- m_cf = 0;
- m_mb = 0;
- m_ix0.w.l = 0;
- m_ix1.w.l = 0;
- m_ix2.w.l = 0;
- m_lp0 = 0;
- m_lp1 = 0;
- m_lp2 = 0;
- m_A = 0;
- m_B = 0;
- m_halt = 0;
-}
-
-
-/****************************************************************************
- * Execute cycles CPU cycles. Return number of cycles really executed
- ****************************************************************************/
-
-void alpha8201_cpu_device::execute_run()
-{
- unsigned opcode;
- u8 pcptr;
-
- if(m_halt)
- {
- m_icount = 0;
- return;
- }
-
- /* setup address bank & fall safe */
- m_ix0.b.h =
- m_ix1.b.h =
- m_ix2.b.h = (m_pc.b.h &= 3);
-
- /* reset start hack */
- if(m_pc.w.l<0x20)
- m_mb |= 0x08;
-
- do
- {
- if(m_mb & 0x08)
- {
- pcptr = M_RDMEM(0x001) & 0x1f; /* pointer of entry point */
- m_icount -= C1;
-
- /* entry point scan phase */
- if( (pcptr&1) == 0)
- {
- /* EVEN , get PC low */
- m_pc.b.l = M_RDMEM(pcptr);
-//osd_printf_debug("alpha8201 load PCL ENTRY=%02X PCL=%02X\n",pcptr, m_pc.b.l);
- m_icount -= C1;
- M_WRMEM(0x001,pcptr+1);
- continue;
- }
-
- /* ODD , check HALT flag */
- m_mb = M_RDMEM(pcptr) & (0x08|0x03);
- m_icount -= C1;
-
- /* not entryaddress 000,001 */
- if(pcptr<2) m_mb |= 0x08;
-
- if(m_mb & 0x08)
- {
- /* HALTED current entry point . next one */
- pcptr = (pcptr+1)&0x1f;
- M_WRMEM(0x001,pcptr);
- m_icount -= C1;
- continue;
- }
-
- /* goto run phase */
- M_JMP(m_pc.b.l);
-
-#if SHOW_ENTRY_POINT
-logerror("alpha8201 START ENTRY=%02X PC=%03X\n",pcptr,m_pc.w.l);
-osd_printf_debug("alpha8201 START ENTRY=%02X PC=%03X\n",pcptr,m_pc.w.l);
-#endif
- }
-
- /* run */
- m_PREVPC = m_pc.w.l;
- debugger_instruction_hook(m_pc.w.l);
- opcode =M_RDOP(m_pc.w.l);
-#if TRACE_PC
-osd_printf_debug("alpha8201: PC = %03x, opcode = %02x\n", m_pc.w.l, opcode);
-#endif
- m_pc.b.l++;
- m_inst_cycles = m_opmap[opcode].cycles;
- (this->*m_opmap[opcode].opcode_func)();
- m_icount -= m_inst_cycles;
- } while (m_icount>0);
-}
-
-
-/****************************************************************************
- * Set IRQ line state
- ****************************************************************************/
-void alpha8201_cpu_device::execute_set_input(int inputnum, int state)
-{
- if(inputnum == INPUT_LINE_HALT)
- {
- m_halt = (state==ASSERT_LINE) ? 1 : 0;
-/* osd_printf_debug("alpha8201 HALT %d\n",m_halt); */
- }
-}
-
-std::unique_ptr<util::disasm_interface> alpha8201_cpu_device::create_disassembler()
-{
- return std::make_unique<alpha8201_disassembler>();
-}
diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h
deleted file mode 100644
index fa735606215..00000000000
--- a/src/devices/cpu/alph8201/alph8201.h
+++ /dev/null
@@ -1,415 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Tatsuyuki Satoh
-/*
-
-Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-
-cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
-
-
-
-
-*/
-
- /**************************************************************************\
- * Alpha8201 Emulator *
- * *
- * Copyright Tatsuyuki Satoh *
- * Originally written for the MAME project. *
- * *
- * *
- \**************************************************************************/
-
-#ifndef MAME_CPU_ALPH8201_ALPH8201_H
-#define MAME_CPU_ALPH8201_ALPH8201_H
-
-#pragma once
-
-enum
-{
- ALPHA8201_PC = STATE_GENPC,
- ALPHA8201_SP = 0,
- ALPHA8201_RB,
- ALPHA8201_MB,
-//
- ALPHA8201_IX0,
- ALPHA8201_IX1,
- ALPHA8201_IX2,
- ALPHA8201_LP0,
- ALPHA8201_LP1,
- ALPHA8201_LP2,
- ALPHA8201_A,
- ALPHA8201_B,
-//
- ALPHA8201_R0,ALPHA8201_R1,ALPHA8201_R2,ALPHA8201_R3,
- ALPHA8201_R4,ALPHA8201_R5,ALPHA8201_R6,ALPHA8201_R7
-};
-
-
-class alpha8201_cpu_device : public cpu_device
-{
-public:
- // construction/destruction
- alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
-
-protected:
- typedef void ( alpha8201_cpu_device::*opcode_fun ) ();
-
- /* The opcode table now is a combination of cycle counts and function pointers */
- struct s_opcode {
- unsigned cycles;
- opcode_fun opcode_func;
- };
-
- alpha8201_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const s_opcode *opmap);
-
- // device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
-
- // device_execute_interface overrides
- virtual u32 execute_min_cycles() const noexcept override { return 1; }
- virtual u32 execute_max_cycles() const noexcept override { return 16; }
- virtual u32 execute_input_lines() const noexcept override { return 1; }
- virtual void execute_run() override;
- virtual void execute_set_input(int inputnum, int state) override;
-
- // device_memory_interface overrides
- virtual space_config_vector memory_space_config() const override;
-
- // device_state_interface overrides
- virtual void state_import(const device_state_entry &entry) override;
- virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
-
- // device_disasm_interface overrides
- virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
-
- u8 M_RDMEM(u16 A) { return m_program->read_byte(A); }
- void M_WRMEM(u16 A, u8 V) { m_program->write_byte(A, V); }
- u8 M_RDOP(u16 A) { return m_cache->read_byte(A); }
- u8 M_RDOP_ARG(u16 A) { return m_cache->read_byte(A); }
- u8 RD_REG(u8 x) { return m_RAM[(m_regPtr<<3)+(x)]; }
- void WR_REG(u8 x, u8 d) { m_RAM[(m_regPtr<<3)+(x)]=(d); }
-
- unsigned M_RDMEM_OPCODE();
- void M_ADD(u8 dat);
- void M_ADDB(u8 dat);
- void M_SUB(u8 dat);
- void M_AND(u8 dat);
- void M_OR(u8 dat);
- void M_XOR(u8 dat);
- void M_JMP(u8 dat);
- void M_UNDEFINED();
- void M_UNDEFINED2();
-
- void undefined() { M_UNDEFINED(); }
- void undefined2() { M_UNDEFINED2(); }
-
- void nop() { }
- void rora() { m_cf = m_A &1; m_A = (m_A>>1) | (m_A<<7); }
- void rola() { m_cf = (m_A>>7)&1; m_A = (m_A<<1) | (m_A>>7); }
- void inc_b() { M_ADDB(0x02); }
- void dec_b() { M_ADDB(0xfe); }
- void inc_a() { M_ADD(0x01); }
- void dec_a() { M_ADD(0xff); }
- void cpl() { m_A ^= 0xff; };
-
- void ld_a_ix0_0() { m_A = M_RDMEM(m_ix0.w.l+0); }
- void ld_a_ix0_1() { m_A = M_RDMEM(m_ix0.w.l+1); }
- void ld_a_ix0_2() { m_A = M_RDMEM(m_ix0.w.l+2); }
- void ld_a_ix0_3() { m_A = M_RDMEM(m_ix0.w.l+3); }
- void ld_a_ix0_4() { m_A = M_RDMEM(m_ix0.w.l+4); }
- void ld_a_ix0_5() { m_A = M_RDMEM(m_ix0.w.l+5); }
- void ld_a_ix0_6() { m_A = M_RDMEM(m_ix0.w.l+6); }
- void ld_a_ix0_7() { m_A = M_RDMEM(m_ix0.w.l+7); }
-
- void ld_a_ix1_0() { m_A = M_RDMEM(m_ix1.w.l+0); }
- void ld_a_ix1_1() { m_A = M_RDMEM(m_ix1.w.l+1); }
- void ld_a_ix1_2() { m_A = M_RDMEM(m_ix1.w.l+2); }
- void ld_a_ix1_3() { m_A = M_RDMEM(m_ix1.w.l+3); }
- void ld_a_ix1_4() { m_A = M_RDMEM(m_ix1.w.l+4); }
- void ld_a_ix1_5() { m_A = M_RDMEM(m_ix1.w.l+5); }
- void ld_a_ix1_6() { m_A = M_RDMEM(m_ix1.w.l+6); }
- void ld_a_ix1_7() { m_A = M_RDMEM(m_ix1.w.l+7); }
-
- void ld_ix2_0_a() { M_WRMEM(m_ix2.w.l+0,m_A); }
- void ld_ix2_1_a() { M_WRMEM(m_ix2.w.l+1,m_A); }
- void ld_ix2_2_a() { M_WRMEM(m_ix2.w.l+2,m_A); }
- void ld_ix2_3_a() { M_WRMEM(m_ix2.w.l+3,m_A); }
- void ld_ix2_4_a() { M_WRMEM(m_ix2.w.l+4,m_A); }
- void ld_ix2_5_a() { M_WRMEM(m_ix2.w.l+5,m_A); }
- void ld_ix2_6_a() { M_WRMEM(m_ix2.w.l+6,m_A); }
- void ld_ix2_7_a() { M_WRMEM(m_ix2.w.l+7,m_A); }
-
- void ld_ix0_0_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+0); }
- void ld_ix0_1_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+1); }
- void ld_ix0_2_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+2); }
- void ld_ix0_3_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+3); }
- void ld_ix0_4_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+4); }
- void ld_ix0_5_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+5); }
- void ld_ix0_6_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+6); }
- void ld_ix0_7_b() { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l+7); }
-
- void bit_r0_0() { m_zf = RD_REG(0)&(1<<0)?0:1; }
- void bit_r0_1() { m_zf = RD_REG(0)&(1<<1)?0:1; }
- void bit_r0_2() { m_zf = RD_REG(0)&(1<<2)?0:1; }
- void bit_r0_3() { m_zf = RD_REG(0)&(1<<3)?0:1; }
- void bit_r0_4() { m_zf = RD_REG(0)&(1<<4)?0:1; }
- void bit_r0_5() { m_zf = RD_REG(0)&(1<<5)?0:1; }
- void bit_r0_6() { m_zf = RD_REG(0)&(1<<6)?0:1; }
- void bit_r0_7() { m_zf = RD_REG(0)&(1<<7)?0:1; }
-
- void ld_a_n() { m_A = M_RDMEM_OPCODE(); }
-
- void ld_a_r0() { m_A = RD_REG(0); m_zf = (m_A==0); }
- void ld_a_r1() { m_A = RD_REG(1); m_zf = (m_A==0); }
- void ld_a_r2() { m_A = RD_REG(2); m_zf = (m_A==0); }
- void ld_a_r3() { m_A = RD_REG(3); m_zf = (m_A==0); }
- void ld_a_r4() { m_A = RD_REG(4); m_zf = (m_A==0); }
- void ld_a_r5() { m_A = RD_REG(5); m_zf = (m_A==0); }
- void ld_a_r6() { m_A = RD_REG(6); m_zf = (m_A==0); }
- void ld_a_r7() { m_A = RD_REG(7); m_zf = (m_A==0); }
-
- void ld_r0_a() { WR_REG(0,m_A); }
- void ld_r1_a() { WR_REG(1,m_A); }
- void ld_r2_a() { WR_REG(2,m_A); }
- void ld_r3_a() { WR_REG(3,m_A); }
- void ld_r4_a() { WR_REG(4,m_A); }
- void ld_r5_a() { WR_REG(5,m_A); }
- void ld_r6_a() { WR_REG(6,m_A); }
- void ld_r7_a() { WR_REG(7,m_A); }
-
- void add_a_n() { M_ADD(M_RDMEM_OPCODE()); }
-
- void add_a_r0() { M_ADD(RD_REG(0)); }
- void add_a_r1() { M_ADD(RD_REG(1)); }
- void add_a_r2() { M_ADD(RD_REG(2)); }
- void add_a_r3() { M_ADD(RD_REG(3)); }
- void add_a_r4() { M_ADD(RD_REG(4)); }
- void add_a_r5() { M_ADD(RD_REG(5)); }
- void add_a_r6() { M_ADD(RD_REG(6)); }
- void add_a_r7() { M_ADD(RD_REG(7)); }
-
- void sub_a_n() { M_SUB(M_RDMEM_OPCODE()); }
-
- void sub_a_r0() { M_SUB(RD_REG(0)); }
- void sub_a_r1() { M_SUB(RD_REG(1)); }
- void sub_a_r2() { M_SUB(RD_REG(2)); }
- void sub_a_r3() { M_SUB(RD_REG(3)); }
- void sub_a_r4() { M_SUB(RD_REG(4)); }
- void sub_a_r5() { M_SUB(RD_REG(5)); }
- void sub_a_r6() { M_SUB(RD_REG(6)); }
- void sub_a_r7() { M_SUB(RD_REG(7)); }
-
- void and_a_n() { M_AND(M_RDMEM_OPCODE()); }
-
- void and_a_r0() { M_AND(RD_REG(0)); }
- void and_a_r1() { M_AND(RD_REG(1)); }
- void and_a_r2() { M_AND(RD_REG(2)); }
- void and_a_r3() { M_AND(RD_REG(3)); }
- void and_a_r4() { M_AND(RD_REG(4)); }
- void and_a_r5() { M_AND(RD_REG(5)); }
- void and_a_r6() { M_AND(RD_REG(6)); }
- void and_a_r7() { M_AND(RD_REG(7)); }
-
- void or_a_n() { M_OR(M_RDMEM_OPCODE()); }
-
- void or_a_r0() { M_OR(RD_REG(0)); }
- void or_a_r1() { M_OR(RD_REG(1)); }
- void or_a_r2() { M_OR(RD_REG(2)); }
- void or_a_r3() { M_OR(RD_REG(3)); }
- void or_a_r4() { M_OR(RD_REG(4)); }
- void or_a_r5() { M_OR(RD_REG(5)); }
- void or_a_r6() { M_OR(RD_REG(6)); }
- void or_a_r7() { M_OR(RD_REG(7)); }
-
- void add_ix0_0() { }
- void add_ix0_1() { m_ix0.b.l += 1; }
- void add_ix0_2() { m_ix0.b.l += 2; }
- void add_ix0_3() { m_ix0.b.l += 3; }
- void add_ix0_4() { m_ix0.b.l += 4; }
- void add_ix0_5() { m_ix0.b.l += 5; }
- void add_ix0_6() { m_ix0.b.l += 6; }
- void add_ix0_7() { m_ix0.b.l += 7; }
- void add_ix0_8() { m_ix0.b.l += 8; }
- void add_ix0_9() { m_ix0.b.l += 9; }
- void add_ix0_a() { m_ix0.b.l += 10; }
- void add_ix0_b() { m_ix0.b.l += 11; }
- void add_ix0_c() { m_ix0.b.l += 12; }
- void add_ix0_d() { m_ix0.b.l += 13; }
- void add_ix0_e() { m_ix0.b.l += 14; }
- void add_ix0_f() { m_ix0.b.l += 15; }
-
- void add_ix1_0() { }
- void add_ix1_1() { m_ix1.b.l += 1; }
- void add_ix1_2() { m_ix1.b.l += 2; }
- void add_ix1_3() { m_ix1.b.l += 3; }
- void add_ix1_4() { m_ix1.b.l += 4; }
- void add_ix1_5() { m_ix1.b.l += 5; }
- void add_ix1_6() { m_ix1.b.l += 6; }
- void add_ix1_7() { m_ix1.b.l += 7; }
- void add_ix1_8() { m_ix1.b.l += 8; }
- void add_ix1_9() { m_ix1.b.l += 9; }
- void add_ix1_a() { m_ix1.b.l += 10; }
- void add_ix1_b() { m_ix1.b.l += 11; }
- void add_ix1_c() { m_ix1.b.l += 12; }
- void add_ix1_d() { m_ix1.b.l += 13; }
- void add_ix1_e() { m_ix1.b.l += 14; }
- void add_ix1_f() { m_ix1.b.l += 15; }
-
- void add_ix2_0() { }
- void add_ix2_1() { m_ix2.b.l += 1; }
- void add_ix2_2() { m_ix2.b.l += 2; }
- void add_ix2_3() { m_ix2.b.l += 3; }
- void add_ix2_4() { m_ix2.b.l += 4; }
- void add_ix2_5() { m_ix2.b.l += 5; }
- void add_ix2_6() { m_ix2.b.l += 6; }
- void add_ix2_7() { m_ix2.b.l += 7; }
- void add_ix2_8() { m_ix2.b.l += 8; }
- void add_ix2_9() { m_ix2.b.l += 9; }
- void add_ix2_a() { m_ix2.b.l += 10; }
- void add_ix2_b() { m_ix2.b.l += 11; }
- void add_ix2_c() { m_ix2.b.l += 12; }
- void add_ix2_d() { m_ix2.b.l += 13; }
- void add_ix2_e() { m_ix2.b.l += 14; }
- void add_ix2_f() { m_ix2.b.l += 15; }
-
- void ld_base_0() { m_regPtr = 0; }
- void ld_base_1() { m_regPtr = 1; }
- void ld_base_2() { m_regPtr = 2; }
- void ld_base_3() { m_regPtr = 3; }
- void ld_base_4() { m_regPtr = 4; }
- void ld_base_5() { m_regPtr = 5; }
- void ld_base_6() { m_regPtr = 6; }
- void ld_base_7() { m_regPtr = 7; }
-
- void ld_bank_0() { m_mb = 0; }
- void ld_bank_1() { m_mb = 1; }
- void ld_bank_2() { m_mb = 2; }
- void ld_bank_3() { m_mb = 3; }
-
- void ld_ix0_n() { m_ix0.b.l = M_RDMEM_OPCODE(); }
- void ld_ix1_n() { m_ix1.b.l = M_RDMEM_OPCODE(); }
- void ld_ix2_n() { m_ix2.b.l = M_RDMEM_OPCODE(); }
- void ld_lp0_n() { m_lp0 = M_RDMEM_OPCODE(); }
- void ld_lp1_n() { m_lp1 = M_RDMEM_OPCODE(); }
- void ld_lp2_n() { m_lp2 = M_RDMEM_OPCODE(); }
- void ld_b_n() { m_B = M_RDMEM_OPCODE(); }
-
- void djnz_lp0() { u8 i=M_RDMEM_OPCODE(); m_lp0--; if (m_lp0 != 0) M_JMP(i); }
- void djnz_lp1() { u8 i=M_RDMEM_OPCODE(); m_lp1--; if (m_lp1 != 0) M_JMP(i); }
- void djnz_lp2() { u8 i=M_RDMEM_OPCODE(); m_lp2--; if (m_lp2 != 0) M_JMP(i); }
- void jnz() { u8 i=M_RDMEM_OPCODE(); if (!m_zf) M_JMP(i); }
- void jnc() { u8 i=M_RDMEM_OPCODE(); if (!m_cf) M_JMP(i);}
- void jz() { u8 i=M_RDMEM_OPCODE(); if ( m_zf) M_JMP(i); }
- void jc() { u8 i=M_RDMEM_OPCODE(); if ( m_cf) M_JMP(i);}
- void jmp() { M_JMP(M_RDMEM_OPCODE() ); }
-
- void stop();
-
- /* ALPHA 8301 : added instruction */
- void exg_a_ix0() { u8 t=m_A; m_A = m_ix0.b.l; m_ix0.b.l = t; }
- void exg_a_ix1() { u8 t=m_A; m_A = m_ix1.b.l; m_ix1.b.l = t; }
- void exg_a_ix2() { u8 t=m_A; m_A = m_ix2.b.l; m_ix2.b.l = t; }
- void exg_a_lp0() { u8 t=m_A; m_A = m_lp0; m_lp0 = t; }
- void exg_a_lp1() { u8 t=m_A; m_A = m_lp1; m_lp1 = t; }
- void exg_a_lp2() { u8 t=m_A; m_A = m_lp2; m_lp2 = t; }
- void exg_a_b() { u8 t=m_A; m_A = m_B; m_B = t; }
- void exg_a_rb() { u8 t=m_A; m_A = m_regPtr; m_regPtr = t; }
-
- void ld_ix0_a() { m_ix0.b.l = m_A; }
- void ld_ix1_a() { m_ix1.b.l = m_A; }
- void ld_ix2_a() { m_ix2.b.l = m_A; }
- void ld_lp0_a() { m_lp0 = m_A; }
- void ld_lp1_a() { m_lp1 = m_A; }
- void ld_lp2_a() { m_lp2 = m_A; }
- void ld_b_a() { m_B = m_A; }
- void ld_rb_a() { m_regPtr = m_A; }
-
- void exg_ix0_ix1() { u8 t=m_ix1.b.l; m_ix1.b.l = m_ix0.b.l; m_ix0.b.l = t; }
- void exg_ix0_ix2() { u8 t=m_ix2.b.l; m_ix2.b.l = m_ix0.b.l; m_ix0.b.l = t; }
-
- void op_d4() { m_A = M_RDMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE() ); }
- void op_d5() { M_WRMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE(), m_A ); }
- void op_d6() { m_lp0 = M_RDMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE() ); }
- void op_d7() { M_WRMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE(), m_lp0 ); }
-
- void ld_a_abs() { m_A = M_RDMEM( ((m_mb & 3) << 8) | M_RDMEM_OPCODE() ); }
- void ld_abs_a() { M_WRMEM( ((m_mb & 3) << 8) | M_RDMEM_OPCODE(), m_A ); }
-
- void ld_a_r() { m_A = m_RAM[(M_RDMEM_OPCODE()>>1)&0x3f]; }
- void ld_r_a() { m_RAM[(M_RDMEM_OPCODE()>>1)&0x3f] = m_A; }
- void op_rep_ld_ix2_b() { do { M_WRMEM(m_ix2.w.l, m_RAM[(m_B>>1)&0x3f]); m_ix2.b.l++; m_B+=2; m_lp0--; } while (m_lp0 != 0); }
- void op_rep_ld_b_ix0() { do { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l); m_ix0.b.l++; m_B+=2; m_lp0--; } while (m_lp0 != 0); }
- void ld_rxb_a() { m_RAM[(m_B>>1)&0x3f] = m_A; }
- void ld_a_rxb() { m_A = m_RAM[(m_B>>1)&0x3f]; }
- void cmp_a_rxb() { u8 i=m_RAM[(m_B>>1)&0x3f]; m_zf = (m_A==i); m_cf = (m_A>=i); }
- void xor_a_rxb() { M_XOR(m_RAM[(m_B>>1)&0x3f] ); }
-
- void add_a_cf() { if (m_cf) inc_a(); }
- void sub_a_cf() { if (m_cf) dec_a(); }
- void tst_a() { m_zf = (m_A==0); }
- void clr_a() { m_A = 0; m_zf = (m_A==0); }
- void cmp_a_n() { u8 i=M_RDMEM_OPCODE(); m_zf = (m_A==i); m_cf = (m_A>=i); }
- void xor_a_n() { M_XOR(M_RDMEM_OPCODE() ); }
- void call() { u8 i=M_RDMEM_OPCODE(); m_retptr.w.l = m_pc.w.l; M_JMP(i); };
- void ld_a_ix0_a() { m_A = M_RDMEM(m_ix0.w.l+m_A); }
- void ret() { m_mb = m_retptr.b.h; M_JMP( m_retptr.b.l ); };
- void save_zc() { m_savez = m_zf; m_savec = m_cf; };
- void rest_zc() { m_zf = m_savez; m_cf = m_savec; };
-
- static const s_opcode opcode_8201[256];
- static const s_opcode opcode_8301[256];
-
- address_space_config m_program_config;
- address_space_config m_io_config;
-
- u8 m_RAM[8*8]; /* internal GP register 8 * 8bank */
- unsigned m_PREVPC;
- PAIR m_retptr; /* for 8301, return address of CALL */
- PAIR m_pc; /* 2bit+8bit program counter */
- u8 m_regPtr; /* RB register base */
- u8 m_mb; /* MB memory bank reg. latch after Branch */
- u8 m_cf; /* C flag */
- u8 m_zf; /* Z flag */
- u8 m_savec; /* for 8301, save flags */
- u8 m_savez; /* for 8301, save flags */
-
- PAIR m_ix0; /* 8bit memory read index reg. */
- PAIR m_ix1; /* 8bitmemory read index reg. */
- PAIR m_ix2; /* 8bitmemory write index reg. */
- u8 m_lp0; /* 8bit loop reg. */
- u8 m_lp1; /* 8bit loop reg. */
- u8 m_lp2; /* 8bit loop reg. */
- u8 m_A; /* 8bit accumulator */
- u8 m_B; /* 8bit register */
-
- u8 m_halt; /* halt input line */
-
- address_space *m_program;
- memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_cache;
- int m_icount;
- int m_inst_cycles;
-
- const s_opcode *const m_opmap;
-
- // Used for import/export only
- u8 m_sp;
- u8 m_R[8];
- u8 m_flags;
-};
-
-
-class alpha8301_cpu_device : public alpha8201_cpu_device
-{
-public:
- // construction/destruction
- alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
-};
-
-
-DECLARE_DEVICE_TYPE(ALPHA8201L, alpha8201_cpu_device)
-DECLARE_DEVICE_TYPE(ALPHA8301L, alpha8301_cpu_device)
-
-#endif // MAME_CPU_ALPH8201_ALPH8201_H
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index eefc6fdf230..b83e097676d 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -2154,7 +2154,7 @@ void avr8_device::change_spsr(uint8_t data)
/*****************************************************************************/
-WRITE8_MEMBER(avr8_device::regs_w)
+void avr8_device::regs_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -2755,7 +2755,7 @@ WRITE8_MEMBER(avr8_device::regs_w)
}
}
-READ8_MEMBER(avr8_device::regs_r)
+uint8_t avr8_device::regs_r(offs_t offset)
{
switch (offset)
{
diff --git a/src/devices/cpu/avr8/avr8.h b/src/devices/cpu/avr8/avr8.h
index ba89e3b00a7..ccb9f09a5a0 100644
--- a/src/devices/cpu/avr8/avr8.h
+++ b/src/devices/cpu/avr8/avr8.h
@@ -68,8 +68,8 @@ public:
virtual void update_interrupt(int source);
// register handling
- DECLARE_WRITE8_MEMBER(regs_w);
- DECLARE_READ8_MEMBER(regs_r);
+ void regs_w(offs_t offset, uint8_t data);
+ uint8_t regs_r(offs_t offset);
uint32_t m_shifted_pc;
protected:
diff --git a/src/devices/cpu/ccpu/ccpu.cpp b/src/devices/cpu/ccpu/ccpu.cpp
index 6afb97916b2..52c235abc5c 100644
--- a/src/devices/cpu/ccpu/ccpu.cpp
+++ b/src/devices/cpu/ccpu/ccpu.cpp
@@ -83,7 +83,7 @@ device_memory_interface::space_config_vector ccpu_cpu_device::memory_space_confi
};
}
-READ8_MEMBER( ccpu_cpu_device::read_jmi )
+uint8_t ccpu_cpu_device::read_jmi()
{
/* this routine is called when there is no external input */
/* and the JMI jumper is present */
diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h
index 4a996310b48..24d5c422693 100644
--- a/src/devices/cpu/ccpu/ccpu.h
+++ b/src/devices/cpu/ccpu/ccpu.h
@@ -49,7 +49,7 @@ public:
template <typename... T> void set_vector_func(T &&... args) { m_vector_callback.set(std::forward<T>(args)...); }
- DECLARE_READ8_MEMBER( read_jmi );
+ uint8_t read_jmi();
void wdt_timer_trigger();
protected:
diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp
index 6317e4451f8..5c8d2c61be6 100644
--- a/src/devices/cpu/cop400/cop400.cpp
+++ b/src/devices/cpu/cop400/cop400.cpp
@@ -1384,14 +1384,14 @@ std::unique_ptr<util::disasm_interface> cop400_cpu_device::create_disassembler()
return std::make_unique<cop410_disassembler>();
}
-READ8_MEMBER( cop400_cpu_device::microbus_rd )
+uint8_t cop400_cpu_device::microbus_rd()
{
if (LOG_MICROBUS) logerror("%s %s MICROBUS RD %02x\n", machine().time().as_string(), machine().describe_context(), Q);
return Q;
}
-WRITE8_MEMBER( cop400_cpu_device::microbus_wr )
+void cop400_cpu_device::microbus_wr(uint8_t data)
{
if (LOG_MICROBUS) logerror("%s %s MICROBUS WR %02x\n", machine().time().as_string(), machine().describe_context(), data);
diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h
index bf3a6ef61e1..1427463a9cf 100644
--- a/src/devices/cpu/cop400/cop400.h
+++ b/src/devices/cpu/cop400/cop400.h
@@ -113,8 +113,8 @@ public:
void set_cko(cop400_cko_bond cko) { m_cko = cko; }
void set_microbus(bool has_microbus) { m_has_microbus = has_microbus; }
- DECLARE_READ8_MEMBER( microbus_rd );
- DECLARE_WRITE8_MEMBER( microbus_wr );
+ uint8_t microbus_rd();
+ void microbus_wr(uint8_t data);
void data_128b(address_map &map);
void data_32b(address_map &map);
diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp
index a8536761a24..f0c28c5ca32 100644
--- a/src/devices/cpu/dsp16/dsp16.cpp
+++ b/src/devices/cpu/dsp16/dsp16.cpp
@@ -363,7 +363,7 @@ void dsp16_device_base::device_reset()
m_ose_cb(m_ose_out = 1U);
// PIO reset outputs
- m_pdb_w_cb(machine().dummy_space(), m_psel_out, 0xffffU, 0x0000U);
+ m_pdb_w_cb(m_psel_out, 0xffffU, 0x0000U);
if (!m_pids_out)
{
LOGPIO("DSP16: de-asserting PIDS for reset\n");
@@ -1537,7 +1537,7 @@ inline void dsp16_device_base::pio_step()
if (!--m_pio_pids_cnt)
{
if (!m_pio_r_cb.isnull())
- m_pio_pdx_in = m_pio_r_cb(machine().dummy_space(), m_psel_out, 0xffffU);
+ m_pio_pdx_in = m_pio_r_cb(m_psel_out, 0xffffU);
m_pids_cb(m_pids_out = 1U);
LOGPIO("DSP16: PIO read active edge PSEL = %u, PDX = %04X (PC = %04X)\n", m_psel_out, m_pio_pdx_in, m_st_pcbase);
}
@@ -1555,9 +1555,9 @@ inline void dsp16_device_base::pio_step()
{
LOGPIO("DSP16: PIO write active edge PSEL = %u, PDX = %04X (PC = %04X)\n", m_psel_out, m_pio_pdx_out, m_st_pcbase);
m_pods_cb(1U);
- m_pio_w_cb(machine().dummy_space(), m_psel_out, m_pio_pdx_out, 0xffffU);
+ m_pio_w_cb(m_psel_out, m_pio_pdx_out, 0xffffU);
m_pods_out = 1U;
- m_pdb_w_cb(machine().dummy_space(), m_psel_out, 0xffffU, 0x0000U);
+ m_pdb_w_cb(m_psel_out, 0xffffU, 0x0000U);
}
}
else
@@ -2003,7 +2003,7 @@ void dsp16_device_base::pio_pioc_write(u16 value)
if (!m_pods_out)
{
m_pods_cb(m_pods_out = 1U); // actually high-impedance
- m_pdb_w_cb(machine().dummy_space(), m_psel_out, 0xffffU, 0x0000U);
+ m_pdb_w_cb(m_psel_out, 0xffffU, 0x0000U);
}
}
}
@@ -2066,7 +2066,7 @@ void dsp16_device_base::pio_pdx_write(u16 sel, u16 value)
{
assert(m_pods_out);
m_pods_cb(m_pods_out = 0U);
- m_pdb_w_cb(machine().dummy_space(), sel, value, 0xffffU);
+ m_pdb_w_cb(sel, value, 0xffffU);
}
m_pio_pods_cnt = pio_strobe() + 1; // decremented this cycle
}
diff --git a/src/devices/cpu/e0c6200/e0c6s46.cpp b/src/devices/cpu/e0c6200/e0c6s46.cpp
index acff3902764..9f80774a6e5 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.cpp
+++ b/src/devices/cpu/e0c6200/e0c6s46.cpp
@@ -603,7 +603,7 @@ u32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
// internal I/O
//-------------------------------------------------
-READ8_MEMBER(e0c6s46_device::io_r)
+u8 e0c6s46_device::io_r(offs_t offset)
{
switch (offset)
{
@@ -697,7 +697,7 @@ READ8_MEMBER(e0c6s46_device::io_r)
return 0;
}
-WRITE8_MEMBER(e0c6s46_device::io_w)
+void e0c6s46_device::io_w(offs_t offset, u8 data)
{
switch (offset)
{
diff --git a/src/devices/cpu/e0c6200/e0c6s46.h b/src/devices/cpu/e0c6200/e0c6s46.h
index 0f4b086ff65..0fb7a67e44c 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.h
+++ b/src/devices/cpu/e0c6200/e0c6s46.h
@@ -62,8 +62,8 @@ public:
template <typename... T> void set_pixel_update_cb(T &&... args) { m_pixel_update_cb.set(std::forward<T>(args)...); }
- DECLARE_READ8_MEMBER(io_r);
- DECLARE_WRITE8_MEMBER(io_w);
+ u8 io_r(offs_t offset);
+ void io_w(offs_t offset, u8 data);
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/devices/cpu/es5510/es5510.cpp b/src/devices/cpu/es5510/es5510.cpp
index d3be96272fe..0af8ea94a68 100644
--- a/src/devices/cpu/es5510/es5510.cpp
+++ b/src/devices/cpu/es5510/es5510.cpp
@@ -355,7 +355,7 @@ static inline char * DESCRIBE_INSTR(char *s, uint64_t instr, uint32_t gpr, const
}
-READ8_MEMBER(es5510_device::host_r)
+uint8_t es5510_device::host_r(address_space &space, offs_t offset)
{
// printf("%06x: DSP read offset %04x (data is %04x)\n",pc(),offset,dsp_ram[offset]);
@@ -402,7 +402,7 @@ READ8_MEMBER(es5510_device::host_r)
return 0x00;
}
-WRITE8_MEMBER(es5510_device::host_w)
+void es5510_device::host_w(offs_t offset, uint8_t data)
{
#if VERBOSE
static char buf[1024];
diff --git a/src/devices/cpu/es5510/es5510.h b/src/devices/cpu/es5510/es5510.h
index 5f424724979..4ffa174c2c5 100644
--- a/src/devices/cpu/es5510/es5510.h
+++ b/src/devices/cpu/es5510/es5510.h
@@ -21,8 +21,8 @@ public:
es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(host_r);
- DECLARE_WRITE8_MEMBER(host_w);
+ uint8_t host_r(address_space &space, offs_t offset);
+ void host_w(offs_t offset, uint8_t data);
int16_t ser_r(int offset);
void ser_w(int offset, int16_t data);
diff --git a/src/devices/cpu/f2mc16/mb9061x.cpp b/src/devices/cpu/f2mc16/mb9061x.cpp
index b299d2ab6b1..3017633df3b 100644
--- a/src/devices/cpu/f2mc16/mb9061x.cpp
+++ b/src/devices/cpu/f2mc16/mb9061x.cpp
@@ -143,13 +143,13 @@ TIMER_CALLBACK_MEMBER(mb9061x_device::timer1_tick)
}
}
-READ8_MEMBER(mb9061x_device::timer_r)
+u8 mb9061x_device::timer_r(offs_t offset)
{
//printf("timer_r: offset %d = %02x\n", offset, m_timer_regs[offset]);
return m_timer_regs[offset];
}
-WRITE8_MEMBER(mb9061x_device::timer_w)
+void mb9061x_device::timer_w(offs_t offset, u8 data)
{
int timer = offset / 4;
int reg = offset % 4;
@@ -317,12 +317,12 @@ enum
TBTC_TBC0 = 0x01 // rate select bit 0
};
-READ8_MEMBER(mb9061x_device::tbtc_r)
+u8 mb9061x_device::tbtc_r()
{
return m_tbtc;
}
-WRITE8_MEMBER(mb9061x_device::tbtc_w)
+void mb9061x_device::tbtc_w(u8 data)
{
static const float periods[4] = { 1.024f, 4.096f, 16.384f, 131.072f };
@@ -357,12 +357,12 @@ TIMER_CALLBACK_MEMBER(mb9061x_device::tbtc_tick)
}
}
-READ8_MEMBER(mb9061x_device::intc_r)
+u8 mb9061x_device::intc_r(offs_t offset)
{
return m_intc[offset];
}
-WRITE8_MEMBER(mb9061x_device::intc_w)
+void mb9061x_device::intc_w(offs_t offset, u8 data)
{
//printf("INTC ICR %d to %02x\n", offset, data);
m_intc[offset] = data;
diff --git a/src/devices/cpu/f2mc16/mb9061x.h b/src/devices/cpu/f2mc16/mb9061x.h
index 97d3e977c49..5edb45ace9d 100644
--- a/src/devices/cpu/f2mc16/mb9061x.h
+++ b/src/devices/cpu/f2mc16/mb9061x.h
@@ -48,20 +48,20 @@ protected:
private:
// TBC
TIMER_CALLBACK_MEMBER(tbtc_tick);
- READ8_MEMBER(tbtc_r);
- WRITE8_MEMBER(tbtc_w);
+ u8 tbtc_r();
+ void tbtc_w(u8 data);
// INTC
- READ8_MEMBER(intc_r);
- WRITE8_MEMBER(intc_w);
+ u8 intc_r(offs_t offset);
+ void intc_w(offs_t offset, u8 data);
void intc_trigger_irq(int icr, int vector);
void intc_clear_irq(int icr, int vector);
// TIMERS
TIMER_CALLBACK_MEMBER(timer0_tick);
TIMER_CALLBACK_MEMBER(timer1_tick);
- READ8_MEMBER(timer_r);
- WRITE8_MEMBER(timer_w);
+ u8 timer_r(offs_t offset);
+ void timer_w(offs_t offset, u8 data);
void recalc_timer(int tnum);
void tin_common(int timer, int base, int state);
diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp
index f5a4bc4c9ca..1b5ab166ff8 100644
--- a/src/devices/cpu/g65816/g65816.cpp
+++ b/src/devices/cpu/g65816/g65816.cpp
@@ -1092,29 +1092,29 @@ translation of Breath of Fire 2 to work. More weirdness: we might need to leave
8 CPU cycles for division at first, since using 16 produces bugs (see e.g.
Triforce pieces in Zelda 3 intro) */
-WRITE8_MEMBER( _5a22_device::wrmpya_w )
+void _5a22_device::wrmpya_w(uint8_t data)
{
m_wrmpya = data;
}
-WRITE8_MEMBER( _5a22_device::wrmpyb_w )
+void _5a22_device::wrmpyb_w(uint8_t data)
{
m_wrmpyb = data;
m_rdmpy = m_wrmpya * m_wrmpyb;
/* TODO: m_rddiv == 0? */
}
-WRITE8_MEMBER( _5a22_device::wrdivl_w )
+void _5a22_device::wrdivl_w(uint8_t data)
{
m_wrdiv = (data) | (m_wrdiv & 0xff00);
}
-WRITE8_MEMBER( _5a22_device::wrdivh_w )
+void _5a22_device::wrdivh_w(uint8_t data)
{
m_wrdiv = (data << 8) | (m_wrdiv & 0xff);
}
-WRITE8_MEMBER( _5a22_device::wrdvdd_w )
+void _5a22_device::wrdvdd_w(uint8_t data)
{
uint16_t quotient, remainder;
@@ -1127,27 +1127,27 @@ WRITE8_MEMBER( _5a22_device::wrdvdd_w )
m_rdmpy = remainder;
}
-WRITE8_MEMBER( _5a22_device::memsel_w )
+void _5a22_device::memsel_w(uint8_t data)
{
m_fastROM = data & 1;
}
-READ8_MEMBER( _5a22_device::rddivl_r )
+uint8_t _5a22_device::rddivl_r()
{
return m_rddiv & 0xff;
}
-READ8_MEMBER( _5a22_device::rddivh_r )
+uint8_t _5a22_device::rddivh_r()
{
return m_rddiv >> 8;
}
-READ8_MEMBER( _5a22_device::rdmpyl_r )
+uint8_t _5a22_device::rdmpyl_r()
{
return m_rdmpy & 0xff;
}
-READ8_MEMBER( _5a22_device::rdmpyh_r )
+uint8_t _5a22_device::rdmpyh_r()
{
return m_rdmpy >> 8;
}
@@ -1155,16 +1155,16 @@ READ8_MEMBER( _5a22_device::rdmpyh_r )
void _5a22_device::set_5a22_map()
{
- space(AS_PROGRAM).install_write_handler(0x4202, 0x4202, 0, 0xbf0000, 0, write8_delegate(*this, FUNC(_5a22_device::wrmpya_w)));
- space(AS_PROGRAM).install_write_handler(0x4203, 0x4203, 0, 0xbf0000, 0, write8_delegate(*this, FUNC(_5a22_device::wrmpyb_w)));
- space(AS_PROGRAM).install_write_handler(0x4204, 0x4204, 0, 0xbf0000, 0, write8_delegate(*this, FUNC(_5a22_device::wrdivl_w)));
- space(AS_PROGRAM).install_write_handler(0x4205, 0x4205, 0, 0xbf0000, 0, write8_delegate(*this, FUNC(_5a22_device::wrdivh_w)));
- space(AS_PROGRAM).install_write_handler(0x4206, 0x4206, 0, 0xbf0000, 0, write8_delegate(*this, FUNC(_5a22_device::wrdvdd_w)));
+ space(AS_PROGRAM).install_write_handler(0x4202, 0x4202, 0, 0xbf0000, 0, write8smo_delegate(*this, FUNC(_5a22_device::wrmpya_w)));
+ space(AS_PROGRAM).install_write_handler(0x4203, 0x4203, 0, 0xbf0000, 0, write8smo_delegate(*this, FUNC(_5a22_device::wrmpyb_w)));
+ space(AS_PROGRAM).install_write_handler(0x4204, 0x4204, 0, 0xbf0000, 0, write8smo_delegate(*this, FUNC(_5a22_device::wrdivl_w)));
+ space(AS_PROGRAM).install_write_handler(0x4205, 0x4205, 0, 0xbf0000, 0, write8smo_delegate(*this, FUNC(_5a22_device::wrdivh_w)));
+ space(AS_PROGRAM).install_write_handler(0x4206, 0x4206, 0, 0xbf0000, 0, write8smo_delegate(*this, FUNC(_5a22_device::wrdvdd_w)));
- space(AS_PROGRAM).install_write_handler(0x420d, 0x420d, 0, 0xbf0000, 0, write8_delegate(*this, FUNC(_5a22_device::memsel_w)));
+ space(AS_PROGRAM).install_write_handler(0x420d, 0x420d, 0, 0xbf0000, 0, write8smo_delegate(*this, FUNC(_5a22_device::memsel_w)));
- space(AS_PROGRAM).install_read_handler(0x4214, 0x4214, 0, 0xbf0000, 0, read8_delegate(*this, FUNC(_5a22_device::rddivl_r)));
- space(AS_PROGRAM).install_read_handler(0x4215, 0x4215, 0, 0xbf0000, 0, read8_delegate(*this, FUNC(_5a22_device::rddivh_r)));
- space(AS_PROGRAM).install_read_handler(0x4216, 0x4216, 0, 0xbf0000, 0, read8_delegate(*this, FUNC(_5a22_device::rdmpyl_r)));
- space(AS_PROGRAM).install_read_handler(0x4217, 0x4217, 0, 0xbf0000, 0, read8_delegate(*this, FUNC(_5a22_device::rdmpyh_r)));
+ space(AS_PROGRAM).install_read_handler(0x4214, 0x4214, 0, 0xbf0000, 0, read8smo_delegate(*this, FUNC(_5a22_device::rddivl_r)));
+ space(AS_PROGRAM).install_read_handler(0x4215, 0x4215, 0, 0xbf0000, 0, read8smo_delegate(*this, FUNC(_5a22_device::rddivh_r)));
+ space(AS_PROGRAM).install_read_handler(0x4216, 0x4216, 0, 0xbf0000, 0, read8smo_delegate(*this, FUNC(_5a22_device::rdmpyl_r)));
+ space(AS_PROGRAM).install_read_handler(0x4217, 0x4217, 0, 0xbf0000, 0, read8smo_delegate(*this, FUNC(_5a22_device::rdmpyh_r)));
}
diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h
index ede7f0f3eaf..d37017a5de8 100644
--- a/src/devices/cpu/g65816/g65816.h
+++ b/src/devices/cpu/g65816/g65816.h
@@ -1544,16 +1544,16 @@ class _5a22_device : public g65816_device
public:
_5a22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE8_MEMBER( wrmpya_w );
- DECLARE_WRITE8_MEMBER( wrmpyb_w );
- DECLARE_WRITE8_MEMBER( wrdivl_w );
- DECLARE_WRITE8_MEMBER( wrdivh_w );
- DECLARE_WRITE8_MEMBER( wrdvdd_w );
- DECLARE_WRITE8_MEMBER( memsel_w );
- DECLARE_READ8_MEMBER( rddivl_r );
- DECLARE_READ8_MEMBER( rddivh_r );
- DECLARE_READ8_MEMBER( rdmpyl_r );
- DECLARE_READ8_MEMBER( rdmpyh_r );
+ void wrmpya_w(uint8_t data);
+ void wrmpyb_w(uint8_t data);
+ void wrdivl_w(uint8_t data);
+ void wrdivh_w(uint8_t data);
+ void wrdvdd_w(uint8_t data);
+ void memsel_w(uint8_t data);
+ uint8_t rddivl_r();
+ uint8_t rddivh_r();
+ uint8_t rdmpyl_r();
+ uint8_t rdmpyh_r();
void set_5a22_map();
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index ffb0f4088c1..814f906de81 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -2510,7 +2510,7 @@ void h6280_device::set_irq_line(int irqline, int state)
// REGISTER HANDLING
//**************************************************************************
-READ8_MEMBER( h6280_device::irq_status_r )
+uint8_t h6280_device::irq_status_r(offs_t offset)
{
int status;
@@ -2534,7 +2534,7 @@ READ8_MEMBER( h6280_device::irq_status_r )
}
}
-WRITE8_MEMBER( h6280_device::irq_status_w )
+void h6280_device::irq_status_w(offs_t offset, uint8_t data)
{
m_io_buffer = data;
switch (offset & 3)
@@ -2554,13 +2554,13 @@ WRITE8_MEMBER( h6280_device::irq_status_w )
}
}
-READ8_MEMBER( h6280_device::timer_r )
+uint8_t h6280_device::timer_r()
{
/* only returns countdown */
return ((m_timer_value >> 10) & 0x7F) | (m_io_buffer & 0x80);
}
-WRITE8_MEMBER( h6280_device::timer_w )
+void h6280_device::timer_w(offs_t offset, uint8_t data)
{
m_io_buffer = data;
switch (offset & 1)
@@ -2581,7 +2581,7 @@ WRITE8_MEMBER( h6280_device::timer_w )
}
}
-READ8_MEMBER( h6280_device::port_r )
+uint8_t h6280_device::port_r()
{
if (!m_port_in_cb.isnull())
return m_port_in_cb();
@@ -2589,19 +2589,19 @@ READ8_MEMBER( h6280_device::port_r )
return m_io_buffer;
}
-WRITE8_MEMBER( h6280_device::port_w )
+void h6280_device::port_w(uint8_t data)
{
m_io_buffer = data;
m_port_out_cb(data);
}
-READ8_MEMBER( h6280_device::io_buffer_r )
+uint8_t h6280_device::io_buffer_r()
{
return m_io_buffer;
}
-WRITE8_MEMBER( h6280_device::psg_w )
+void h6280_device::psg_w(offs_t offset, uint8_t data)
{
m_io_buffer = data;
m_psg->c6280_w(offset, data);
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index 10ddbeaf77b..923591eec93 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -357,17 +357,17 @@ protected:
// internal registers
void internal_map(address_map &map);
- DECLARE_READ8_MEMBER( irq_status_r );
- DECLARE_WRITE8_MEMBER( irq_status_w );
+ uint8_t irq_status_r(offs_t offset);
+ void irq_status_w(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER( timer_r );
- DECLARE_WRITE8_MEMBER( timer_w );
+ uint8_t timer_r();
+ void timer_w(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER( port_r );
- DECLARE_WRITE8_MEMBER( port_w );
+ uint8_t port_r();
+ void port_w(uint8_t data);
- DECLARE_READ8_MEMBER( io_buffer_r );
- DECLARE_WRITE8_MEMBER( psg_w );
+ uint8_t io_buffer_r();
+ void psg_w(offs_t offset, uint8_t data);
devcb_read8 m_port_in_cb;
devcb_write8 m_port_out_cb;
diff --git a/src/devices/cpu/h8500/h8500.cpp b/src/devices/cpu/h8500/h8500.cpp
new file mode 100644
index 00000000000..9a0ebc225b0
--- /dev/null
+++ b/src/devices/cpu/h8500/h8500.cpp
@@ -0,0 +1,151 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Hitachi H8/500 Series
+
+ Currently this device is just a stub with no actual execution core.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "h8500.h"
+#include "h8500dasm.h"
+
+h8500_device::h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, int buswidth, int ramsize, address_map_constructor map)
+ : cpu_device(mconfig, type, tag, owner, clock)
+ , m_program_config("program", ENDIANNESS_BIG, buswidth, addrbits, 0, map)
+ , m_ram_config("internal RAM", ENDIANNESS_BIG, 16, ramsize, 0, address_map_constructor(FUNC(h8500_device::ram_map), this))
+ , m_program(nullptr)
+ , m_ram_cache(nullptr)
+ , m_pc(0)
+ , m_ppc(0)
+ , m_sr(0)
+ , m_cp(0)
+ , m_dp(0)
+ , m_ep(0)
+ , m_tp(0)
+ , m_br(0)
+ , m_r{0, 0, 0, 0, 0, 0, 0, 0}
+ , m_icount(0)
+{
+}
+
+void h8500_device::device_config_complete()
+{
+ if (!h8_maximum_mode())
+ m_program_config.m_addr_width = 16;
+}
+
+std::unique_ptr<util::disasm_interface> h8500_device::create_disassembler()
+{
+ return std::make_unique<h8500_disassembler>(h8_maximum_mode());
+}
+
+device_memory_interface::space_config_vector h8500_device::memory_space_config() const
+{
+ return m_ram_config.addr_width() == 0 ? space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ } : space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_ram_config)
+ };
+}
+
+void h8500_device::ram_map(address_map &map)
+{
+ map(0, (1 << m_ram_config.addr_width()) - 1).ram();
+}
+
+void h8500_device::debug_set_pc(offs_t pc) noexcept
+{
+ m_pc = m_ppc = pc & 0xffff;
+ if (h8_maximum_mode())
+ m_cp = u8(pc >> 16);
+}
+
+void h8500_device::device_start()
+{
+ m_program = &space(AS_PROGRAM);
+ if (has_space(AS_DATA))
+ m_ram_cache = space(AS_DATA).cache<1, 0, ENDIANNESS_BIG>();
+
+ set_icountptr(m_icount);
+
+ // Control registers
+ state_add(H8500_PC, "PC", m_pc);
+ if (h8_maximum_mode())
+ {
+ state_add<u32>(STATE_GENPC, "GENPC", [this]() { return u32(m_cp) << 16 | m_pc; }, [this](u32 data) { debug_set_pc(data); }).noshow().mask(0xffffff);
+ state_add<u32>(STATE_GENPCBASE, "CURPC", [this]() { return u32(m_cp) << 16 | m_ppc; }, [this](u32 data) { debug_set_pc(data); }).noshow().mask(0xffffff);
+ }
+ else
+ {
+ state_add<u16>(STATE_GENPC, "GENPC", [this]() { return m_pc; }, [this](u16 data) { debug_set_pc(data); }).noshow();
+ state_add<u16>(STATE_GENPCBASE, "CURPC", [this]() { return m_ppc; }, [this](u16 data) { debug_set_pc(data); }).noshow();
+ }
+ state_add(H8500_SR, "SR", m_sr).mask(0x870f);
+ state_add<u8>(H8500_CCR, "CCR", [this]() { return m_sr & 0xff; }, [this](u8 data) { m_sr = (m_sr & 0xff00) | data; }).mask(0x0f).noshow();
+ state_add<u8>(STATE_GENFLAGS, "FLAGS", [this]() { return m_sr & 0xff; }, [this](u8 data) { m_sr = (m_sr & 0xff00) | data; }).mask(0x0f).formatstr("%4s").noshow();
+ if (h8_maximum_mode())
+ {
+ state_add(H8500_CP, "CP", m_cp);
+ state_add(H8500_DP, "DP", m_dp);
+ state_add(H8500_EP, "EP", m_ep);
+ state_add(H8500_TP, "TP", m_tp);
+ }
+ state_add(H8500_BR, "BR", m_br);
+
+ // General registers
+ for (int n = 0; n < 6; n++)
+ state_add(H8500_R0 + n, string_format("R%d", n).c_str(), m_r[n]);
+ state_add(H8500_FP, "FP", m_r[6]);
+ state_add(H8500_SP, "SP", m_r[7]);
+
+ // Save state
+ save_item(NAME(m_pc));
+ save_item(NAME(m_ppc));
+ save_item(NAME(m_sr));
+ if (h8_maximum_mode())
+ save_item(NAME(m_cp));
+ save_item(NAME(m_dp));
+ save_item(NAME(m_ep));
+ save_item(NAME(m_tp));
+ save_item(NAME(m_br));
+ save_item(NAME(m_r));
+}
+
+void h8500_device::device_reset()
+{
+ m_sr = 0x0700 | (m_sr & 0x000f);
+}
+
+void h8500_device::execute_run()
+{
+ if (h8_maximum_mode())
+ {
+ m_cp = m_program->read_word(0) & 0x00ff;
+ m_pc = m_program->read_word(2);
+ }
+ else
+ m_pc = m_program->read_word(0);
+
+ m_ppc = m_pc;
+ debugger_instruction_hook(m_cp << 8 | m_pc);
+
+ m_icount = 0;
+}
+
+void h8500_device::state_string_export(const device_state_entry &entry, std::string &str) const
+{
+ switch (entry.index())
+ {
+ case STATE_GENFLAGS:
+ str = string_format("%c%c%c%c",
+ BIT(m_sr, 3) ? 'N' : '.',
+ BIT(m_sr, 2) ? 'Z' : '.',
+ BIT(m_sr, 1) ? 'V' : '.',
+ BIT(m_sr, 0) ? 'C' : '.');
+ break;
+ }
+}
diff --git a/src/devices/cpu/h8500/h8500.h b/src/devices/cpu/h8500/h8500.h
new file mode 100644
index 00000000000..e3cf3e2aeb1
--- /dev/null
+++ b/src/devices/cpu/h8500/h8500.h
@@ -0,0 +1,70 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_H8500_H8500_H
+#define MAME_CPU_H8500_H8500_H
+
+#pragma once
+
+class h8500_device : public cpu_device
+{
+public:
+ enum {
+ H8500_PC,
+ H8500_SR, H8500_CCR,
+ H8500_CP, H8500_DP, H8500_EP, H8500_TP,
+ H8500_BR,
+ H8500_R0, H8500_R1, H8500_R2, H8500_R3,
+ H8500_R4, H8500_R5, H8500_FP, H8500_SP
+ };
+
+protected:
+ h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, int buswidth, int ramsize, address_map_constructor map);
+
+ // device-level overrides
+ virtual void device_config_complete() override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // device_execute_interface overrides
+ virtual u64 execute_clocks_to_cycles(u64 clocks) const noexcept override { return (clocks + 2 - 1) / 2; }
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const noexcept override { return (cycles * 2); }
+ virtual void execute_run() override;
+
+ // device_disasm_interface overrides
+ virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+
+ // device_memory_interface overrides
+ virtual space_config_vector memory_space_config() const override;
+
+ // device_state_interface overrides
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
+
+ virtual bool h8_maximum_mode() const noexcept { return true; }
+
+private:
+ void ram_map(address_map &map);
+ void debug_set_pc(offs_t pc) noexcept;
+
+ // address spaces
+ address_space_config m_program_config;
+ address_space_config m_ram_config;
+ address_space *m_program;
+ memory_access_cache<1, 0, ENDIANNESS_BIG> *m_ram_cache;
+
+ // internal registers
+ u16 m_pc;
+ u16 m_ppc;
+ u16 m_sr;
+ u8 m_cp;
+ u8 m_dp;
+ u8 m_ep;
+ u8 m_tp;
+ u8 m_br;
+ u16 m_r[8];
+
+ // execution state
+ s32 m_icount;
+};
+
+#endif // MAME_CPU_H8500_H8500_H
diff --git a/src/devices/cpu/h8500/h8500dasm.cpp b/src/devices/cpu/h8500/h8500dasm.cpp
new file mode 100644
index 00000000000..76278ebcb4c
--- /dev/null
+++ b/src/devices/cpu/h8500/h8500dasm.cpp
@@ -0,0 +1,608 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Hitachi H8/500 disassembler
+
+***************************************************************************/
+
+#include "emu.h"
+#include "h8500dasm.h"
+
+h8500_disassembler::h8500_disassembler(bool expanded)
+ : util::disasm_interface()
+ , m_expanded(expanded)
+{
+}
+
+const char *const h8500_disassembler::s_general_ops[0x20] =
+{
+ nullptr, nullptr,
+ nullptr, nullptr,
+ "ADD", "ADDS",
+ "SUB", "SUBS",
+ "OR", nullptr,
+ "AND", nullptr,
+ "XOR", nullptr,
+ "CMP", nullptr,
+ "MOV", "LDC",
+ "MOV", "STC",
+ "ADDX", "MULXU",
+ "SUBX", "DIVXU",
+ nullptr, nullptr,
+ nullptr, nullptr,
+ nullptr, nullptr,
+ nullptr, nullptr
+};
+
+const char *const h8500_disassembler::s_bit_ops[4] =
+{
+ "BSET",
+ "BCLR",
+ "BNOT",
+ "BTST"
+};
+
+const char *const h8500_disassembler::s_unary_ops[0x10] =
+{
+ "SWAP", "EXTS", "EXTU",
+ "CLR", "NEG", "NOT", "TST", "TAS",
+ "SHAL", "SHAR", "SHLL", "SHLR",
+ "ROTL", "ROTR", "ROTXL", "ROTXR"
+};
+
+const char *const h8500_disassembler::s_branches[0x10] =
+{
+ "BRA", "BRN", // alias BT & BF
+ "BHI", "BLS",
+ "BCC", "BCS", // alias BHS & BLO
+ "BNE", "BEQ",
+ "BVC", "BVS",
+ "BPL", "BMI",
+ "BGE", "BLT",
+ "BGT", "BLE"
+};
+
+offs_t h8500_disassembler::opcode_alignment() const
+{
+ return 1;
+}
+
+u32 h8500_disassembler::interface_flags() const
+{
+ return m_expanded ? PAGED : 0;
+}
+
+u32 h8500_disassembler::page_address_bits() const
+{
+ return 16;
+}
+
+void h8500_disassembler::format_reg(std::ostream &stream, u8 n, bool w)
+{
+ (void)w;
+ switch (n)
+ {
+ case 6:
+ stream << "FP";
+ break;
+
+ case 7:
+ stream << "SP";
+ break;
+
+ default:
+ util::stream_format(stream, "R%d", n);
+ break;
+ }
+}
+
+void h8500_disassembler::format_creg(std::ostream &stream, u8 n, bool w)
+{
+ if (n == 0 && w)
+ {
+ // Status register (word access only)
+ stream << "SR";
+ }
+ else switch (n)
+ {
+ case 1:
+ // Condition code register
+ stream << "CCR";
+ break;
+
+ case 3:
+ // Base register
+ stream << "BR";
+ break;
+
+ case 4:
+ // Extended page register
+ stream << "EP";
+ break;
+
+ case 5:
+ // Data page register
+ stream << "DP";
+ break;
+
+ case 7:
+ // Stack page register
+ stream << "TP";
+ break;
+
+ default:
+ util::stream_format(stream, "CR%d", n);
+ break;
+ }
+}
+
+void h8500_disassembler::format_reglist(std::ostream &stream, u8 x)
+{
+ stream << "(";
+ bool first = true;
+ int start = -1;
+ for (int n = 0; n <= 8; n++)
+ {
+ if (start == -1 && BIT(x, n))
+ start = n;
+ else if (start != -1 && !BIT(x, n))
+ {
+ if (first)
+ first = false;
+ else
+ stream << ",";
+ format_reg(stream, start, true);
+ if (n - 1 != start)
+ {
+ stream << "-";
+ format_reg(stream, n - 1, true);
+ }
+ start = -1;
+ }
+ }
+ stream << ")";
+}
+
+void h8500_disassembler::format_imm8(std::ostream &stream, u8 x)
+{
+ util::stream_format(stream, "#H'%02X", x);
+}
+
+void h8500_disassembler::format_imm16(std::ostream &stream, u16 x)
+{
+ util::stream_format(stream, "#H'%04X", x);
+}
+
+void h8500_disassembler::format_bdisp(std::ostream &stream, s16 disp, offs_t pc)
+{
+ util::stream_format(stream, "H'%04X", (pc + disp) & 0xffff);
+}
+
+void h8500_disassembler::format_ea(std::ostream &stream, u8 ea, u16 disp)
+{
+ if (ea >= 0xe0)
+ {
+ if (ea >= 0xf0)
+ util::stream_format(stream, "@(H'%04X,", disp);
+ else if (s16(disp) >= -9 && s16(disp) <= 9)
+ util::stream_format(stream, "@(%d,", s16(disp));
+ else if (s16(disp) < 0)
+ util::stream_format(stream, "@(-H'%02X,", u16(-disp));
+ else
+ util::stream_format(stream, "@(H'%02X,", disp);
+ format_reg(stream, ea & 0x07, true);
+ stream << ")";
+ }
+ else if (ea >= 0xb0)
+ {
+ stream << "@";
+ if ((ea & 0xf0) == 0xb0)
+ stream << "-";
+ format_reg(stream, ea & 0x07, true);
+ if ((ea & 0xf0) == 0xc0)
+ stream << "+";
+ }
+ else if (ea >= 0xa0)
+ format_reg(stream, ea & 0x07, BIT(ea, 3));
+ else
+ {
+ assert((ea & 0xe7) == 0x05);
+ if (BIT(ea, 4))
+ util::stream_format(stream, "@H'%04X:16", disp);
+ else
+ util::stream_format(stream, "@H'%02X:8", disp & 0xff);
+ }
+}
+
+offs_t h8500_disassembler::dasm_illegal(std::ostream &stream, std::initializer_list<u8> ops)
+{
+ util::stream_format(stream, "%-9s", ".DATA.B");
+
+ bool first = true;
+ for (u8 op : ops)
+ {
+ if (first)
+ first = false;
+ else
+ stream << ",";
+ util::stream_format(stream, "H'%02X", op);
+ }
+
+ return (ops.end() - ops.begin()) | SUPPORTED;
+}
+
+offs_t h8500_disassembler::dasm_general(std::ostream &stream, offs_t pc, u8 ea, const h8500_disassembler::data_buffer &opcodes)
+{
+ u8 eabytes = 1;
+ s16 disp = 0;
+ if (ea >= 0xe0 || (ea & 0xe7) == 0x05)
+ {
+ if (BIT(ea, 4))
+ {
+ eabytes = 3;
+ disp = opcodes.r16(pc + 1);
+ }
+ else
+ {
+ eabytes = 2;
+ disp = s16(s8(opcodes.r8(pc + 1)));
+ }
+ }
+
+ bool w = BIT(ea, 3);
+ u8 op = opcodes.r8(pc + eabytes);
+ if ((ea & 0xf8) == 0xa8 && (op & 0xf8) == 0x90)
+ {
+ util::stream_format(stream, "%-9s", "XCH");
+ format_reg(stream, ea & 0x07, w);
+ stream << ",";
+ format_reg(stream, op & 0x07, w);
+ return (eabytes + 1) | SUPPORTED;
+ }
+ else if (s_general_ops[op >> 3] != nullptr)
+ {
+ util::stream_format(stream, "%-9s", util::string_format("%s.%c", s_general_ops[op >> 3], w ? 'W' : 'B'));
+ if ((op & 0xf0) == 0x90)
+ {
+ if (BIT(op, 3))
+ format_creg(stream, op & 0x07, w);
+ else
+ format_reg(stream, op & 0x07, w);
+ stream << ",";
+ }
+ format_ea(stream, ea, disp);
+ if ((op & 0xf8) == 0x88)
+ {
+ stream << ",";
+ format_creg(stream, op & 0x07, w);
+ }
+ else if ((op & 0xf0) != 0x90)
+ {
+ stream << ",";
+ format_reg(stream, op & 0x07, w);
+ }
+ return (eabytes + 1) | SUPPORTED;
+ }
+ else if (BIT(op, 6))
+ {
+ util::stream_format(stream, "%-9s", util::string_format("%s.%c", s_bit_ops[BIT(op, 4, 2)], w ? 'W' : 'B'));
+ if (BIT(op, 7))
+ util::stream_format(stream, "#%d", op & 0x0f);
+ else
+ format_reg(stream, op & 0x07, w);
+ stream << ",";
+ format_ea(stream, ea, disp);
+ return (eabytes + 1) | SUPPORTED;
+ }
+ else if ((op & 0xf0) == 0x10 && ((ea & 0xf8) == 0xa0 || op >= 0x13))
+ {
+ util::stream_format(stream, "%-9s", util::string_format("%s.%c", s_unary_ops[op & 0x0f], w ? 'W' : 'B'));
+ format_ea(stream, ea, disp);
+ return (eabytes + 1) | SUPPORTED;
+ }
+ else if ((op & 0xfc) == 0x04 && (ea & 0xf0) != 0xa0)
+ {
+ util::stream_format(stream, "%-9s", util::string_format("%s.%c", BIT(op, 1) ? "MOV" : "CMP", w ? 'W' : 'B'));
+ if (BIT(op, 0))
+ format_imm16(stream, opcodes.r16(pc + eabytes + 1));
+ else
+ format_imm8(stream, opcodes.r8(pc + eabytes + 1));
+ stream << ",";
+ format_ea(stream, ea, disp);
+ return (eabytes + (BIT(op, 0) ? 3 : 2)) | SUPPORTED;
+ }
+ else if ((op & 0xfa) == 0x08)
+ {
+ // ADD:Q
+ util::stream_format(stream, "%-9s#%s%d,", util::string_format("ADD.%c", w ? 'W' : 'B'), BIT(op, 2) ? "-" : "", BIT(op, 0) ? 2 : 1);
+ format_ea(stream, ea, disp);
+ return (eabytes + 1) | SUPPORTED;
+ }
+ else if (op == 0x00)
+ {
+ u8 op2 = opcodes.r8(pc + eabytes + 1);
+ if ((op2 & 0xa8) == 0x80 && (ea & 0xf0) != 0xa0)
+ {
+ util::stream_format(stream, "%-9s", util::string_format("MOV%cPE.%c", BIT(op2, 4) ? 'T' : 'F', w ? 'W' : 'B'));
+ if (BIT(op2, 4))
+ {
+ format_reg(stream, op2 & 0x07, w);
+ stream << ",";
+ format_ea(stream, ea, disp);
+ }
+ else
+ {
+ format_ea(stream, ea, disp);
+ stream << ",";
+ format_reg(stream, op2 & 0x07, w);
+ }
+ return (eabytes + 2) | SUPPORTED;
+ }
+ else if ((op2 & 0xe8) == 0xa0 && (ea & 0xf8) == 0xa0)
+ {
+ util::stream_format(stream, "%-9s", "DADD.B");
+ format_reg(stream, ea & 0x07, w);
+ stream << ",";
+ format_reg(stream, op2 & 0x07, w);
+ return (eabytes + 2) | SUPPORTED;
+ }
+ else
+ {
+ if (eabytes == 3)
+ return dasm_illegal(stream, {ea, u8(disp >> 8), u8(disp), op, op2});
+ else if (eabytes == 2)
+ return dasm_illegal(stream, {ea, u8(disp), op, op2});
+ else
+ return dasm_illegal(stream, {ea, op, op2});
+ }
+ }
+ else
+ {
+ if (eabytes == 3)
+ return dasm_illegal(stream, {ea, u8(disp >> 8), u8(disp), op});
+ else if (eabytes == 2)
+ return dasm_illegal(stream, {ea, u8(disp), op});
+ else
+ return dasm_illegal(stream, {ea, op});
+ }
+}
+
+offs_t h8500_disassembler::dasm_misc(std::ostream &stream, offs_t pc, u8 ea, const h8500_disassembler::data_buffer &opcodes)
+{
+ u8 op = opcodes.r8(pc + 1);
+ if (ea == 0x11 && op >= 0xd0)
+ {
+ u8 eabytes = 1;
+ s16 disp = 0;
+ if (op >= 0xe0)
+ {
+ if (BIT(op, 4))
+ {
+ eabytes = 3;
+ disp = opcodes.r16(pc + 2);
+ }
+ else
+ {
+ eabytes = 2;
+ disp = s16(s8(opcodes.r8(pc + 2)));
+ }
+ }
+ util::stream_format(stream, "%-9s", BIT(op, 3) ? "JSR" : "JMP");
+ format_ea(stream, op, disp);
+ return (eabytes + 2) | (BIT(op, 3) ? STEP_OVER : 0) | SUPPORTED;
+ }
+ else if (ea == 0x11 && op >= 0xc0 && m_expanded)
+ {
+ util::stream_format(stream, "%-9s@", BIT(op, 3) ? "PJSR" : "PJMP");
+ format_reg(stream, op & 0x07, true);
+ return 2 | (BIT(op, 3) ? STEP_OVER : 0) | SUPPORTED;
+ }
+ else if ((op & 0xf8) == 0xb8)
+ {
+ util::stream_format(stream, "%-9s", util::string_format("SCB/%s", ea == 0x01 ? "F" : ea == 0x06 ? "NE" : ea == 0x07 ? "EQ" : "?"));
+ format_reg(stream, op & 0x07, true);
+ stream << ",";
+ format_bdisp(stream, s16(s8(opcodes.r8(pc + 2))), pc + 3);
+ return 3 | SUPPORTED;
+ }
+ else if (ea == 0x11 && (op & 0xf7) == 0x14 && m_expanded)
+ {
+ util::stream_format(stream, "%-9s", "PRTD");
+ if (BIT(op, 3))
+ {
+ format_imm16(stream, opcodes.r16(pc + 2));
+ return 4 | STEP_OUT | SUPPORTED;
+ }
+ else
+ {
+ format_imm8(stream, opcodes.r8(pc + 2));
+ return 3 | STEP_OUT | SUPPORTED;
+ }
+ }
+ else if (ea == 0x11 && op == 0x19 && m_expanded)
+ {
+ stream << "PRTS";
+ return 2 | STEP_OUT | SUPPORTED;
+ }
+ else
+ return dasm_illegal(stream, {ea, op});
+}
+
+offs_t h8500_disassembler::dasm_immop(std::ostream &stream, offs_t pc, bool w, const h8500_disassembler::data_buffer &opcodes)
+{
+ u16 imm = w ? opcodes.r16(pc + 1) : opcodes.r8(pc + 1);
+ u8 op = opcodes.r8(pc + (w ? 3 : 2));
+ if (s_general_ops[op >> 3] != nullptr ? (op & 0xf0) != 0x90 : (op & 0xc8) == 0x48 && op < 0x70)
+ {
+ if ((op & 0xc8) == 0x48)
+ util::stream_format(stream, "%-9s", util::string_format("%sC.%c", s_general_ops[(op & 0xf0) >> 3], w ? 'W' : 'B'));
+ else
+ util::stream_format(stream, "%-9s", util::string_format("%s.%c", s_general_ops[op >> 3], w ? 'W' : 'B'));
+ if (w)
+ format_imm16(stream, imm);
+ else
+ format_imm8(stream, imm);
+ stream << ",";
+ if (BIT(op, 3) && op >= 0x48 && op < 0x90)
+ format_creg(stream, op & 0x07, w);
+ else
+ format_reg(stream, op & 0x07, w);
+ return (w ? 4 : 3) | SUPPORTED;
+ }
+ else
+ {
+ if (w)
+ return dasm_illegal(stream, {0x04, u8(imm), op});
+ else
+ return dasm_illegal(stream, {0x0c, u8(imm >> 8), u8(imm), op});
+ }
+}
+
+offs_t h8500_disassembler::disassemble(std::ostream &stream, offs_t pc, const h8500_disassembler::data_buffer &opcodes, const h8500_disassembler::data_buffer &params)
+{
+ u8 op = opcodes.r8(pc);
+ if (op >= 0xa0 || (op & 0xe7) == 0x05)
+ return dasm_general(stream, pc, op, opcodes);
+ else if (op >= 0x60)
+ {
+ // MOV:L, MOV:S, MOV:F
+ bool w = BIT(op, 3);
+ s16 disp = s16(s8(opcodes.r8(pc + 1)));
+ util::stream_format(stream, "%-9s", util::string_format("MOV.%c", w ? 'W' : 'B'));
+ if (BIT(op, 4))
+ {
+ format_reg(stream, op & 0x07, w);
+ stream << ",";
+ }
+ format_ea(stream, (op >= 0x80 ? 0xe6 : 0x05) | (op & 0x08), disp);
+ if (!BIT(op, 4))
+ {
+ stream << ",";
+ format_reg(stream, op & 0x07, w);
+ }
+ return 2 | SUPPORTED;
+ }
+ else if (op >= 0x40)
+ {
+ // CMP:E, CMP:I, MOV:E, MOV:I
+ bool w = BIT(op, 3);
+ util::stream_format(stream, "%-9s", util::string_format("%s.%c", BIT(op, 4) ? "MOV" : "CMP", w ? 'W' : 'B'));
+ if (w)
+ format_imm16(stream, opcodes.r16(pc + 1));
+ else
+ format_imm8(stream, opcodes.r8(pc + 1));
+ stream << ",";
+ format_reg(stream, op & 0x07, w);
+ return (w ? 3 : 2) | SUPPORTED;
+ }
+ else if (op >= 0x20)
+ {
+ util::stream_format(stream, "%-9s", s_branches[op & 0x0f]);
+ if (BIT(op, 4))
+ format_bdisp(stream, s16(opcodes.r16(pc + 1)), pc + 3);
+ else
+ format_bdisp(stream, s16(s8(opcodes.r8(pc + 1))), pc + 2);
+ return (BIT(op, 4) ? 3 : 2) | SUPPORTED;
+ }
+ else switch (op)
+ {
+ case 0x00:
+ stream << "NOP";
+ return 1 | SUPPORTED;
+
+ case 0x03: case 0x13:
+ if (m_expanded)
+ {
+ util::stream_format(stream, "%-9s@H'%02X%04X", BIT(op, 4) ? "PJSR" : "PJMP", opcodes.r8(pc + 1), opcodes.r16(pc + 2));
+ return 4 | (BIT(op, 4) ? STEP_OVER : 0) | SUPPORTED;
+ }
+ else
+ return dasm_illegal(stream, {op});
+
+ case 0x01: case 0x06: case 0x07: case 0x11:
+ return dasm_misc(stream, pc, op, opcodes);
+
+ case 0x02:
+ util::stream_format(stream, "%-9s", "LDM.W");
+ format_ea(stream, 0xcf, 0);
+ stream << ",";
+ format_reglist(stream, opcodes.r8(pc + 1));
+ return 2 | SUPPORTED;
+
+ case 0x04: case 0x0c:
+ return dasm_immop(stream, pc, BIT(op, 3), opcodes);
+
+ case 0x08:
+ {
+ util::stream_format(stream, "%-9s", "TRAPA");
+ u8 v = opcodes.r8(pc + 1);
+ if ((v & 0xf0) == 0x10)
+ format_imm8(stream, v);
+ else
+ stream << "illegal";
+ return 2 | STEP_OVER | SUPPORTED;
+ }
+
+ case 0x09:
+ stream << "TRAP/VS";
+ return 1 | SUPPORTED;
+
+ case 0x0a:
+ stream << "RTE";
+ return 1 | STEP_OUT | SUPPORTED;
+
+ case 0x0e: case 0x1e:
+ util::stream_format(stream, "%-9s", "JSR");
+ if (BIT(op, 4))
+ format_bdisp(stream, s16(opcodes.r16(pc + 1)), pc + 3);
+ else
+ format_bdisp(stream, s16(s8(opcodes.r8(pc + 1))), pc + 2);
+ return (BIT(op, 4) ? 3 : 2) | STEP_OVER | SUPPORTED;
+
+ case 0x0f:
+ util::stream_format(stream, "%-9s", "UNLK");
+ format_reg(stream, 6, true);
+ return 1 | SUPPORTED;
+
+ case 0x10: case 0x18:
+ util::stream_format(stream, "%-9s@H'%04X", BIT(op, 4) ? "JSR" : "JMP", opcodes.r16(pc + 1));
+ return 3 | (BIT(op, 3) ? STEP_OVER : 0) | SUPPORTED;
+
+ case 0x12:
+ util::stream_format(stream, "%-9s", "STM.W");
+ format_reglist(stream, opcodes.r8(pc + 1));
+ stream << ",";
+ format_ea(stream, 0xbf, 0);
+ return 2 | SUPPORTED;
+
+ case 0x14: case 0x1c:
+ util::stream_format(stream, "%-9s", "RTD");
+ if (BIT(op, 3))
+ format_imm16(stream, opcodes.r16(pc + 1));
+ else
+ format_imm8(stream, opcodes.r8(pc + 1));
+ return (BIT(op, 3) ? 3 : 2) | STEP_OVER | SUPPORTED;
+
+ case 0x17: case 0x1f:
+ util::stream_format(stream, "%-9s", "LINK");
+ format_reg(stream, 6, true);
+ stream << ",";
+ if (BIT(op, 3))
+ format_imm16(stream, opcodes.r16(pc + 1));
+ else
+ format_imm8(stream, opcodes.r8(pc + 1));
+ return (BIT(op, 3) ? 3 : 2) | SUPPORTED;
+
+ case 0x19:
+ stream << "RTS";
+ return 1 | STEP_OUT | SUPPORTED;
+
+ case 0x1a:
+ stream << "SLEEP";
+ return 1 | SUPPORTED;
+
+ default:
+ return dasm_illegal(stream, {op});
+ }
+}
diff --git a/src/devices/cpu/h8500/h8500dasm.h b/src/devices/cpu/h8500/h8500dasm.h
new file mode 100644
index 00000000000..0a1e4f7e9e0
--- /dev/null
+++ b/src/devices/cpu/h8500/h8500dasm.h
@@ -0,0 +1,46 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_H8500_H8500DASM_H
+#define MAME_CPU_H8500_H8500DASM_H
+
+#pragma once
+
+class h8500_disassembler : public util::disasm_interface
+{
+public:
+ h8500_disassembler(bool expanded = true);
+
+protected:
+ // disasm_interface overrides
+ virtual offs_t opcode_alignment() const override;
+ virtual u32 interface_flags() const override;
+ virtual u32 page_address_bits() const override;
+ virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
+
+private:
+ // instruction mnemonic tables
+ static const char *const s_general_ops[0x20];
+ static const char *const s_bit_ops[4];
+ static const char *const s_unary_ops[0x10];
+ static const char *const s_branches[0x10];
+
+ // formatting helpers
+ void format_reg(std::ostream &stream, u8 n, bool w);
+ void format_creg(std::ostream &stream, u8 n, bool w);
+ void format_reglist(std::ostream &stream, u8 x);
+ void format_imm8(std::ostream &stream, u8 x);
+ void format_imm16(std::ostream &stream, u16 x);
+ void format_bdisp(std::ostream &stream, s16 disp, offs_t pc);
+ void format_ea(std::ostream &stream, u8 ea, u16 disp);
+
+ // disassembly helpers
+ offs_t dasm_illegal(std::ostream &stream, std::initializer_list<u8> ops);
+ offs_t dasm_general(std::ostream &stream, offs_t pc, u8 ea, const data_buffer &opcodes);
+ offs_t dasm_misc(std::ostream &stream, offs_t pc, u8 ea, const data_buffer &opcodes);
+ offs_t dasm_immop(std::ostream &stream, offs_t pc, bool w, const data_buffer &opcodes);
+
+ const bool m_expanded;
+};
+
+#endif // MAME_CPU_H8500_H8500DASM_H
diff --git a/src/devices/cpu/h8500/h8510.cpp b/src/devices/cpu/h8500/h8510.cpp
new file mode 100644
index 00000000000..413f99cc248
--- /dev/null
+++ b/src/devices/cpu/h8500/h8510.cpp
@@ -0,0 +1,112 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Hitachi H8/510
+
+***************************************************************************/
+
+#include "emu.h"
+#include "h8510.h"
+
+DEFINE_DEVICE_TYPE(HD6415108, hd6415108_device, "hd6415108", "Hitachi HD6415108 (H8/510)")
+
+h8510_device::h8510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : h8500_device(mconfig, type, tag, owner, clock, 24, 16, 0, address_map_constructor(FUNC(h8510_device::internal_map), this))
+{
+}
+
+hd6415108_device::hd6415108_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : h8510_device(mconfig, HD6415108, tag, owner, clock)
+{
+}
+
+void h8510_device::internal_map(address_map &map)
+{
+#if 0
+ map(0xfe80, 0xfe80).w(FUNC(h8510_device::p1ddr_w));
+ map(0xfe81, 0xfe81).w(FUNC(h8510_device::p2ddr_w));
+ map(0xfe82, 0xfe82).rw(FUNC(h8510_device::p1dr_r), FUNC(h8510_device::p1dr_w));
+ map(0xfe83, 0xfe83).rw(FUNC(h8510_device::p2dr_r), FUNC(h8510_device::p2dr_w));
+ map(0xfe84, 0xfe84).w(FUNC(h8510_device::p3ddr_w));
+ map(0xfe85, 0xfe85).w(FUNC(h8510_device::p4ddr_w));
+ map(0xfe86, 0xfe86).rw(FUNC(h8510_device::p3dr_r), FUNC(h8510_device::p3dr_w));
+ map(0xfe87, 0xfe87).rw(FUNC(h8510_device::p4dr_r), FUNC(h8510_device::p4dr_w));
+ map(0xfe88, 0xfe88).w(FUNC(h8510_device::p5ddr_w));
+ map(0xfe89, 0xfe89).w(FUNC(h8510_device::p6ddr_w));
+ map(0xfe8a, 0xfe8a).rw(FUNC(h8510_device::p5dr_r), FUNC(h8510_device::p5dr_w));
+ map(0xfe8b, 0xfe8b).rw(FUNC(h8510_device::p6dr_r), FUNC(h8510_device::p6dr_w));
+ map(0xfe8d, 0xfe8d).w(FUNC(h8510_device::p8ddr_w));
+ map(0xfe8e, 0xfe8e).r(FUNC(h8510_device::p7dr_r));
+ map(0xfe8f, 0xfe8f).rw(FUNC(h8510_device::p8dr_r), FUNC(h8510_device::p8dr_w));
+ map(0xfe90, 0xfe90).r(FUNC(h8510_device::addrah_r));
+ map(0xfe91, 0xfe91).r(FUNC(h8510_device::addral_r));
+ map(0xfe92, 0xfe92).r(FUNC(h8510_device::addrbh_r));
+ map(0xfe93, 0xfe93).r(FUNC(h8510_device::addrbl_r));
+ map(0xfe94, 0xfe94).r(FUNC(h8510_device::addrch_r));
+ map(0xfe95, 0xfe95).r(FUNC(h8510_device::addrcl_r));
+ map(0xfe96, 0xfe96).r(FUNC(h8510_device::addrdh_r));
+ map(0xfe97, 0xfe97).r(FUNC(h8510_device::addrdl_r));
+ map(0xfe98, 0xfe98).rw(FUNC(h8510_device::adcsr_r), FUNC(h8510_device::adcsr_w));
+ map(0xfe99, 0xfe99).rw(FUNC(h8510_device::adcr_r), FUNC(h8510_device::adcr_w));
+ map(0xfea0, 0xfea0).rw(FUNC(h8510_device::frt1_tcr_r), FUNC(h8510_device::frt1_tcr_w));
+ map(0xfea1, 0xfea1).rw(FUNC(h8510_device::frt1_tcsr_r), FUNC(h8510_device::frt1_tcsr_w));
+ map(0xfea2, 0xfea2).rw(FUNC(h8510_device::frt1_frch_r), FUNC(h8510_device::frt1_frch_w));
+ map(0xfea3, 0xfea3).rw(FUNC(h8510_device::frt1_frcl_r), FUNC(h8510_device::frt1_frcl_w));
+ map(0xfea4, 0xfea4).rw(FUNC(h8510_device::frt1_ocrah_r), FUNC(h8510_device::frt1_ocrah_w));
+ map(0xfea5, 0xfea5).rw(FUNC(h8510_device::frt1_ocral_r), FUNC(h8510_device::frt1_ocral_w));
+ map(0xfea6, 0xfea6).rw(FUNC(h8510_device::frt1_ocrbh_r), FUNC(h8510_device::frt1_ocrbh_w));
+ map(0xfea7, 0xfea7).rw(FUNC(h8510_device::frt1_ocrbl_r), FUNC(h8510_device::frt1_ocrbl_w));
+ map(0xfea8, 0xfea8).r(FUNC(h8510_device::frt1_icrh_r));
+ map(0xfea9, 0xfea9).r(FUNC(h8510_device::frt1_icrl_r));
+ map(0xfeb0, 0xfeb0).rw(FUNC(h8510_device::frt2_tcr_r), FUNC(h8510_device::frt2_tcr_w));
+ map(0xfeb1, 0xfeb1).rw(FUNC(h8510_device::frt2_tcsr_r), FUNC(h8510_device::frt2_tcsr_w));
+ map(0xfeb2, 0xfeb2).rw(FUNC(h8510_device::frt2_frch_r), FUNC(h8510_device::frt2_frch_w));
+ map(0xfeb3, 0xfeb3).rw(FUNC(h8510_device::frt2_frcl_r), FUNC(h8510_device::frt2_frcl_w));
+ map(0xfeb4, 0xfeb4).rw(FUNC(h8510_device::frt2_ocrah_r), FUNC(h8510_device::frt2_ocrah_w));
+ map(0xfeb5, 0xfeb5).rw(FUNC(h8510_device::frt2_ocral_r), FUNC(h8510_device::frt2_ocral_w));
+ map(0xfeb6, 0xfeb6).rw(FUNC(h8510_device::frt2_ocrbh_r), FUNC(h8510_device::frt2_ocrbh_w));
+ map(0xfeb7, 0xfeb7).rw(FUNC(h8510_device::frt2_ocrbl_r), FUNC(h8510_device::frt2_ocrbl_w));
+ map(0xfeb8, 0xfeb8).r(FUNC(h8510_device::frt2_icrh_r));
+ map(0xfeb9, 0xfeb9).r(FUNC(h8510_device::frt2_icrl_r));
+ map(0xfec0, 0xfec0).rw(FUNC(h8510_device::tmr_tcr_r), FUNC(h8510_device::tmr_tcr_w));
+ map(0xfec1, 0xfec1).rw(FUNC(h8510_device::tmr_tcsr_r), FUNC(h8510_device::tmr_tcsr_w));
+ map(0xfec2, 0xfec2).rw(FUNC(h8510_device::tmr_tcora_r), FUNC(h8510_device::tmr_tcora_w));
+ map(0xfec3, 0xfec3).rw(FUNC(h8510_device::tmr_tcorb_r), FUNC(h8510_device::tmr_tcorb_w));
+ map(0xfec4, 0xfec4).rw(FUNC(h8510_device::tmr_tcnt_r), FUNC(h8510_device::tmr_tcnt_w));
+ map(0xfec8, 0xfec8).rw(FUNC(h8510_device::sci1_smr_r), FUNC(h8510_device::sci1_smr_w));
+ map(0xfec9, 0xfec9).rw(FUNC(h8510_device::sci1_brr_r), FUNC(h8510_device::sci1_brr_w));
+ map(0xfeca, 0xfeca).rw(FUNC(h8510_device::sci1_scr_r), FUNC(h8510_device::sci1_scr_w));
+ map(0xfecb, 0xfecb).rw(FUNC(h8510_device::sci1_tdr_r), FUNC(h8510_device::sci1_tdr_w));
+ map(0xfecc, 0xfecc).rw(FUNC(h8510_device::sci1_ssr_r), FUNC(h8510_device::sci1_ssr_w));
+ map(0xfecd, 0xfecd).r(FUNC(h8510_device::sci1_rdr_r));
+ map(0xfed0, 0xfed0).rw(FUNC(h8510_device::sci2_smr_r), FUNC(h8510_device::sci2_smr_w));
+ map(0xfed1, 0xfed1).rw(FUNC(h8510_device::sci2_brr_r), FUNC(h8510_device::sci2_brr_w));
+ map(0xfed2, 0xfed2).rw(FUNC(h8510_device::sci2_scr_r), FUNC(h8510_device::sci2_scr_w));
+ map(0xfed3, 0xfed3).rw(FUNC(h8510_device::sci2_tdr_r), FUNC(h8510_device::sci2_tdr_w));
+ map(0xfed4, 0xfed4).rw(FUNC(h8510_device::sci2_ssr_r), FUNC(h8510_device::sci2_ssr_w));
+ map(0xfed5, 0xfed5).r(FUNC(h8510_device::sci2_rdr_r));
+ map(0xfed8, 0xfed8).rw(FUNC(h8510_device::rfshcr_r), FUNC(h8510_device::rfshcr_w));
+ map(0xff00, 0xff00).rw(FUNC(h8510_device::ipra_r), FUNC(h8510_device::ipra_w));
+ map(0xff01, 0xff01).rw(FUNC(h8510_device::iprb_r), FUNC(h8510_device::iprb_w));
+ map(0xff02, 0xff02).rw(FUNC(h8510_device::iprc_r), FUNC(h8510_device::iprc_w));
+ map(0xff03, 0xff03).rw(FUNC(h8510_device::iprd_r), FUNC(h8510_device::iprd_w));
+ map(0xff08, 0xff08).rw(FUNC(h8510_device::dtea_r), FUNC(h8510_device::dtea_w));
+ map(0xff09, 0xff09).rw(FUNC(h8510_device::dteb_r), FUNC(h8510_device::dteb_w));
+ map(0xff0a, 0xff0a).rw(FUNC(h8510_device::dtec_r), FUNC(h8510_device::dtec_w));
+ map(0xff0b, 0xff0b).rw(FUNC(h8510_device::dted_r), FUNC(h8510_device::dted_w));
+ map(0xff10, 0xff10).r(FUNC(h8510_device::wdt_tcsr_r));
+ map(0xff11, 0xff11).r(FUNC(h8510_device::wdt_tcnt_r));
+ map(0xff10, 0xff10).w(FUNC(h8510_device::wdt_tcnt_tcsr_w));
+ map(0xff14, 0xff14).rw(FUNC(h8510_device::wcr_r), FUNC(h8510_device::wcr_w));
+ map(0xff16, 0xff16).rw(FUNC(h8510_device::arbt_r), FUNC(h8510_device::arbt_w));
+ map(0xff17, 0xff17).rw(FUNC(h8510_device::ar3t_r), FUNC(h8510_device::ar3t_w));
+ map(0xff19, 0xff19).r(FUNC(h8510_device::mdcr_r));
+ map(0xff1a, 0xff1a).rw(FUNC(h8510_device::sbycr_r), FUNC(h8510_device::sbycr_w));
+ map(0xff1b, 0xff1b).rw(FUNC(h8510_device::brcr_r), FUNC(h8510_device::brcr_w));
+ map(0xff1c, 0xff1c).rw(FUNC(h8510_device::nmicr_r), FUNC(h8510_device::nmicr_w));
+ map(0xff1d, 0xff1d).rw(FUNC(h8510_device::irqcr_r), FUNC(h8510_device::irqcr_w));
+ map(0xff1e, 0xff1e).r(FUNC(h8510_device::wdt_rstcsr_r));
+ map(0xff1e, 0xff1f).w(FUNC(h8510_device::wdt_rstcsr_w));
+#endif
+}
diff --git a/src/devices/cpu/h8500/h8510.h b/src/devices/cpu/h8500/h8510.h
new file mode 100644
index 00000000000..1cbefe87aa3
--- /dev/null
+++ b/src/devices/cpu/h8500/h8510.h
@@ -0,0 +1,29 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_H8500_H8510_H
+#define MAME_CPU_H8500_H8510_H
+
+#pragma once
+
+#include "h8500.h"
+
+class h8510_device : public h8500_device
+{
+protected:
+ h8510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
+private:
+ void internal_map(address_map &map);
+};
+
+class hd6415108_device : public h8510_device
+{
+public:
+ // device type constructor
+ hd6415108_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+DECLARE_DEVICE_TYPE(HD6415108, hd6415108_device)
+
+#endif // MAME_CPU_H8500_H8510_H
diff --git a/src/devices/cpu/h8500/h8520.cpp b/src/devices/cpu/h8500/h8520.cpp
new file mode 100644
index 00000000000..9a3a076d5e4
--- /dev/null
+++ b/src/devices/cpu/h8500/h8520.cpp
@@ -0,0 +1,108 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Hitachi H8/520
+
+***************************************************************************/
+
+#include "emu.h"
+#include "h8520.h"
+
+DEFINE_DEVICE_TYPE(HD6435208, hd6435208_device, "hd6435208", "Hitachi HD6435208 (H8/520)")
+
+h8520_device::h8520_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : h8500_device(mconfig, type, tag, owner, clock, 20, 8, 9, address_map_constructor(FUNC(h8520_device::internal_map), this))
+{
+}
+
+hd6435208_device::hd6435208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : h8520_device(mconfig, HD6435208, tag, owner, clock)
+{
+}
+
+void h8520_device::internal_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom().region(DEVICE_SELF, 0); // modes 2, 4, 7
+#if 0
+ map(0xff80, 0xff80).w(FUNC(h8520_device::p1ddr_w));
+ map(0xff81, 0xff81).w(FUNC(h8520_device::p2ddr_w));
+ map(0xff82, 0xff82).rw(FUNC(h8520_device::p1dr_r), FUNC(h8520_device::p1dr_w));
+ map(0xff83, 0xff83).rw(FUNC(h8520_device::p2dr_r), FUNC(h8520_device::p2dr_w));
+ map(0xff85, 0xff85).w(FUNC(h8520_device::p4ddr_w));
+ map(0xff86, 0xff86).rw(FUNC(h8520_device::p3dr_r), FUNC(h8520_device::p3dr_w));
+ map(0xff87, 0xff87).rw(FUNC(h8520_device::p4dr_r), FUNC(h8520_device::p4dr_w));
+ map(0xff88, 0xff88).w(FUNC(h8520_device::p5ddr_w));
+ map(0xff89, 0xff89).w(FUNC(h8520_device::p6ddr_w));
+ map(0xff8a, 0xff8a).rw(FUNC(h8520_device::p5dr_r), FUNC(h8520_device::p5dr_w));
+ map(0xff8b, 0xff8b).r(FUNC(h8520_device::p6dr_r));
+ map(0xff8c, 0xff8c).w(FUNC(h8520_device::p7ddr_w));
+ map(0xff8e, 0xff8e).rw(FUNC(h8520_device::p7dr_r), FUNC(h8520_device::p7dr_w));
+ map(0xff90, 0xff90).rw(FUNC(h8520_device::frt1_tcr_r), FUNC(h8520_device::frt1_tcr_w));
+ map(0xff91, 0xff91).rw(FUNC(h8520_device::frt1_tcsr_r), FUNC(h8520_device::frt1_tcsr_w));
+ map(0xff92, 0xff92).rw(FUNC(h8520_device::frt1_frch_r), FUNC(h8520_device::frt1_frch_w));
+ map(0xff93, 0xff93).rw(FUNC(h8520_device::frt1_frcl_r), FUNC(h8520_device::frt1_frcl_w));
+ map(0xff94, 0xff94).rw(FUNC(h8520_device::frt1_ocrah_r), FUNC(h8520_device::frt1_ocrah_w));
+ map(0xff95, 0xff95).rw(FUNC(h8520_device::frt1_ocral_r), FUNC(h8520_device::frt1_ocral_w));
+ map(0xff96, 0xff96).rw(FUNC(h8520_device::frt1_ocrbh_r), FUNC(h8520_device::frt1_ocrbh_w));
+ map(0xff97, 0xff97).rw(FUNC(h8520_device::frt1_ocrbl_r), FUNC(h8520_device::frt1_ocrbl_w));
+ map(0xff98, 0xff98).r(FUNC(h8520_device::frt1_icrh_r));
+ map(0xff99, 0xff99).r(FUNC(h8520_device::frt1_icrl_r));
+ map(0xffa0, 0xffa0).rw(FUNC(h8520_device::frt2_tcr_r), FUNC(h8520_device::frt2_tcr_w));
+ map(0xffa1, 0xffa1).rw(FUNC(h8520_device::frt2_tcsr_r), FUNC(h8520_device::frt2_tcsr_w));
+ map(0xffa2, 0xffa2).rw(FUNC(h8520_device::frt2_frch_r), FUNC(h8520_device::frt2_frch_w));
+ map(0xffa3, 0xffa3).rw(FUNC(h8520_device::frt2_frcl_r), FUNC(h8520_device::frt2_frcl_w));
+ map(0xffa4, 0xffa4).rw(FUNC(h8520_device::frt2_ocrah_r), FUNC(h8520_device::frt2_ocrah_w));
+ map(0xffa5, 0xffa5).rw(FUNC(h8520_device::frt2_ocral_r), FUNC(h8520_device::frt2_ocral_w));
+ map(0xffa6, 0xffa6).rw(FUNC(h8520_device::frt2_ocrbh_r), FUNC(h8520_device::frt2_ocrbh_w));
+ map(0xffa7, 0xffa7).rw(FUNC(h8520_device::frt2_ocrbl_r), FUNC(h8520_device::frt2_ocrbl_w));
+ map(0xffa8, 0xffa8).r(FUNC(h8520_device::frt2_icrh_r));
+ map(0xffa9, 0xffa9).r(FUNC(h8520_device::frt2_icrl_r));
+ map(0xffc0, 0xffc0).rw(FUNC(h8520_device::sci2_smr_r), FUNC(h8520_device::sci2_smr_w));
+ map(0xffc1, 0xffc1).rw(FUNC(h8520_device::sci2_brr_r), FUNC(h8520_device::sci2_brr_w));
+ map(0xffc2, 0xffc2).rw(FUNC(h8520_device::sci2_scr_r), FUNC(h8520_device::sci2_scr_w));
+ map(0xffc3, 0xffc3).rw(FUNC(h8520_device::sci2_tdr_r), FUNC(h8520_device::sci2_tdr_w));
+ map(0xffc4, 0xffc4).rw(FUNC(h8520_device::sci2_ssr_r), FUNC(h8520_device::sci2_ssr_w));
+ map(0xffc5, 0xffc5).r(FUNC(h8520_device::sci2_rdr_r));
+ map(0xffd0, 0xffd0).rw(FUNC(h8520_device::tmr_tcr_r), FUNC(h8520_device::tmr_tcr_w));
+ map(0xffd1, 0xffd1).rw(FUNC(h8520_device::tmr_tcsr_r), FUNC(h8520_device::tmr_tcsr_w));
+ map(0xffd2, 0xffd2).rw(FUNC(h8520_device::tmr_tcora_r), FUNC(h8520_device::tmr_tcora_w));
+ map(0xffd3, 0xffd3).rw(FUNC(h8520_device::tmr_tcorb_r), FUNC(h8520_device::tmr_tcorb_w));
+ map(0xffd4, 0xffd4).rw(FUNC(h8520_device::tmr_tcnt_r), FUNC(h8520_device::tmr_tcnt_w));
+ map(0xffd8, 0xffd8).rw(FUNC(h8520_device::sci1_smr_r), FUNC(h8520_device::sci1_smr_w));
+ map(0xffd9, 0xffd9).rw(FUNC(h8520_device::sci1_brr_r), FUNC(h8520_device::sci1_brr_w));
+ map(0xffda, 0xffda).rw(FUNC(h8520_device::sci1_scr_r), FUNC(h8520_device::sci1_scr_w));
+ map(0xffdb, 0xffdb).rw(FUNC(h8520_device::sci1_tdr_r), FUNC(h8520_device::sci1_tdr_w));
+ map(0xffdc, 0xffdc).rw(FUNC(h8520_device::sci1_ssr_r), FUNC(h8520_device::sci1_ssr_w));
+ map(0xffdd, 0xffdd).r(FUNC(h8520_device::sci1_rdr_r));
+ map(0xffe0, 0xffe0).r(FUNC(h8520_device::addrah_r));
+ map(0xffe1, 0xffe1).r(FUNC(h8520_device::addral_r));
+ map(0xffe2, 0xffe2).r(FUNC(h8520_device::addrbh_r));
+ map(0xffe3, 0xffe3).r(FUNC(h8520_device::addrbl_r));
+ map(0xffe4, 0xffe4).r(FUNC(h8520_device::addrch_r));
+ map(0xffe5, 0xffe5).r(FUNC(h8520_device::addrcl_r));
+ map(0xffe6, 0xffe6).r(FUNC(h8520_device::addrdh_r));
+ map(0xffe7, 0xffe7).r(FUNC(h8520_device::addrdl_r));
+ map(0xffe8, 0xffe8).rw(FUNC(h8520_device::adcsr_r), FUNC(h8520_device::adcsr_w));
+ map(0xffe9, 0xffe9).rw(FUNC(h8520_device::adcr_r), FUNC(h8520_device::adcr_w));
+ map(0xffec, 0xffec).r(FUNC(h8520_device::wdt_tcsr_r));
+ map(0xffed, 0xffed).r(FUNC(h8520_device::wdt_tcnt_r));
+ map(0xffec, 0xffec).w(FUNC(h8520_device::wdt_tcnt_tcsr_w));
+ map(0xfff0, 0xfff0).rw(FUNC(h8520_device::ipra_r), FUNC(h8520_device::ipra_w));
+ map(0xfff1, 0xfff1).rw(FUNC(h8520_device::iprb_r), FUNC(h8520_device::iprb_w));
+ map(0xfff2, 0xfff2).rw(FUNC(h8520_device::iprc_r), FUNC(h8520_device::iprc_w));
+ map(0xfff3, 0xfff3).rw(FUNC(h8520_device::iprd_r), FUNC(h8520_device::iprd_w));
+ map(0xfff4, 0xfff4).rw(FUNC(h8520_device::dtea_r), FUNC(h8520_device::dtea_w));
+ map(0xfff5, 0xfff5).rw(FUNC(h8520_device::dteb_r), FUNC(h8520_device::dteb_w));
+ map(0xfff6, 0xfff6).rw(FUNC(h8520_device::dtec_r), FUNC(h8520_device::dtec_w));
+ map(0xfff7, 0xfff7).rw(FUNC(h8520_device::dted_r), FUNC(h8520_device::dted_w));
+ map(0xfff8, 0xfff8).rw(FUNC(h8520_device::wcr_r), FUNC(h8520_device::wcr_w));
+ map(0xfff9, 0xfff9).rw(FUNC(h8520_device::ramcr_r), FUNC(h8520_device::ramcr_w));
+ map(0xfffa, 0xfffa).r(FUNC(h8520_device::mdcr_r));
+ map(0xfffb, 0xfffb).rw(FUNC(h8520_device::sbycr_r), FUNC(h8520_device::sbycr_w));
+ map(0xfffc, 0xfffc).rw(FUNC(h8520_device::nmicr_r), FUNC(h8520_device::nmicr_w));
+ map(0xfffd, 0xfffd).rw(FUNC(h8520_device::irqcr_r), FUNC(h8520_device::irqcr_w));
+ map(0xfffe, 0xffff).w(FUNC(h8520_device::wdt_rstcsr_w));
+ map(0xffff, 0xffff).r(FUNC(h8520_device::wdt_rstcsr_r));
+#endif
+}
diff --git a/src/devices/cpu/h8500/h8520.h b/src/devices/cpu/h8500/h8520.h
new file mode 100644
index 00000000000..fc8795e7425
--- /dev/null
+++ b/src/devices/cpu/h8500/h8520.h
@@ -0,0 +1,29 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_H8500_H8520_H
+#define MAME_CPU_H8500_H8520_H
+
+#pragma once
+
+#include "h8500.h"
+
+class h8520_device : public h8500_device
+{
+protected:
+ h8520_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
+private:
+ void internal_map(address_map &map);
+};
+
+class hd6435208_device : public h8520_device
+{
+public:
+ // device type constructor
+ hd6435208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+DECLARE_DEVICE_TYPE(HD6435208, hd6435208_device)
+
+#endif // MAME_CPU_H8500_H8520_H
diff --git a/src/devices/cpu/h8500/h8532.cpp b/src/devices/cpu/h8500/h8532.cpp
new file mode 100644
index 00000000000..9d0be448e3f
--- /dev/null
+++ b/src/devices/cpu/h8500/h8532.cpp
@@ -0,0 +1,120 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Hitachi H8/532
+
+***************************************************************************/
+
+#include "emu.h"
+#include "h8532.h"
+
+DEFINE_DEVICE_TYPE(HD6435328, hd6435328_device, "hd6435328", "Hitachi HD6435328 (H8/532)")
+
+h8532_device::h8532_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : h8500_device(mconfig, type, tag, owner, clock, 20, 8, 10, address_map_constructor(FUNC(h8532_device::internal_map), this))
+{
+}
+
+hd6435328_device::hd6435328_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : h8532_device(mconfig, HD6435328, tag, owner, clock)
+{
+}
+
+void h8532_device::internal_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom().region(DEVICE_SELF, 0); // modes 2, 4, 7
+#if 0
+ map(0xff80, 0xff80).w(FUNC(h8532_device::p1ddr_w));
+ map(0xff81, 0xff81).w(FUNC(h8532_device::p2ddr_w));
+ map(0xff82, 0xff82).rw(FUNC(h8532_device::p1dr_r), FUNC(h8532_device::p1dr_w));
+ map(0xff83, 0xff83).rw(FUNC(h8532_device::p2dr_r), FUNC(h8532_device::p2dr_w));
+ map(0xff85, 0xff85).w(FUNC(h8532_device::p4ddr_w));
+ map(0xff86, 0xff86).rw(FUNC(h8532_device::p3dr_r), FUNC(h8532_device::p3dr_w));
+ map(0xff87, 0xff87).rw(FUNC(h8532_device::p4dr_r), FUNC(h8532_device::p4dr_w));
+ map(0xff88, 0xff88).w(FUNC(h8532_device::p5ddr_w));
+ map(0xff89, 0xff89).w(FUNC(h8532_device::p6ddr_w));
+ map(0xff8a, 0xff8a).rw(FUNC(h8532_device::p5dr_r), FUNC(h8532_device::p5dr_w));
+ map(0xff8b, 0xff8b).rw(FUNC(h8532_device::p6dr_r), FUNC(h8532_device::p6dr_w));
+ map(0xff8c, 0xff8c).w(FUNC(h8532_device::p7ddr_w));
+ map(0xff8e, 0xff8e).rw(FUNC(h8532_device::p7dr_r), FUNC(h8532_device::p7dr_w));
+ map(0xff8f, 0xff8f).r(FUNC(h8532_device::p8dr_r));
+ map(0xff90, 0xff90).rw(FUNC(h8532_device::frt1_tcr_r), FUNC(h8532_device::frt1_tcr_w));
+ map(0xff91, 0xff91).rw(FUNC(h8532_device::frt1_tcsr_r), FUNC(h8532_device::frt1_tcsr_w));
+ map(0xff92, 0xff92).rw(FUNC(h8532_device::frt1_frch_r), FUNC(h8532_device::frt1_frch_w));
+ map(0xff93, 0xff93).rw(FUNC(h8532_device::frt1_frcl_r), FUNC(h8532_device::frt1_frcl_w));
+ map(0xff94, 0xff94).rw(FUNC(h8532_device::frt1_ocrah_r), FUNC(h8532_device::frt1_ocrah_w));
+ map(0xff95, 0xff95).rw(FUNC(h8532_device::frt1_ocral_r), FUNC(h8532_device::frt1_ocral_w));
+ map(0xff96, 0xff96).rw(FUNC(h8532_device::frt1_ocrbh_r), FUNC(h8532_device::frt1_ocrbh_w));
+ map(0xff97, 0xff97).rw(FUNC(h8532_device::frt1_ocrbl_r), FUNC(h8532_device::frt1_ocrbl_w));
+ map(0xff98, 0xff98).r(FUNC(h8532_device::frt1_icrh_r));
+ map(0xff99, 0xff99).r(FUNC(h8532_device::frt1_icrl_r));
+ map(0xffa0, 0xffa0).rw(FUNC(h8532_device::frt2_tcr_r), FUNC(h8532_device::frt2_tcr_w));
+ map(0xffa1, 0xffa1).rw(FUNC(h8532_device::frt2_tcsr_r), FUNC(h8532_device::frt2_tcsr_w));
+ map(0xffa2, 0xffa2).rw(FUNC(h8532_device::frt2_frch_r), FUNC(h8532_device::frt2_frch_w));
+ map(0xffa3, 0xffa3).rw(FUNC(h8532_device::frt2_frcl_r), FUNC(h8532_device::frt2_frcl_w));
+ map(0xffa4, 0xffa4).rw(FUNC(h8532_device::frt2_ocrah_r), FUNC(h8532_device::frt2_ocrah_w));
+ map(0xffa5, 0xffa5).rw(FUNC(h8532_device::frt2_ocral_r), FUNC(h8532_device::frt2_ocral_w));
+ map(0xffa6, 0xffa6).rw(FUNC(h8532_device::frt2_ocrbh_r), FUNC(h8532_device::frt2_ocrbh_w));
+ map(0xffa7, 0xffa7).rw(FUNC(h8532_device::frt2_ocrbl_r), FUNC(h8532_device::frt2_ocrbl_w));
+ map(0xffa8, 0xffa8).r(FUNC(h8532_device::frt2_icrh_r));
+ map(0xffa9, 0xffa9).r(FUNC(h8532_device::frt2_icrl_r));
+ map(0xffb0, 0xffb0).rw(FUNC(h8532_device::frt3_tcr_r), FUNC(h8532_device::frt3_tcr_w));
+ map(0xffb1, 0xffb1).rw(FUNC(h8532_device::frt3_tcsr_r), FUNC(h8532_device::frt3_tcsr_w));
+ map(0xffb2, 0xffb2).rw(FUNC(h8532_device::frt3_frch_r), FUNC(h8532_device::frt3_frch_w));
+ map(0xffb3, 0xffb3).rw(FUNC(h8532_device::frt3_frcl_r), FUNC(h8532_device::frt3_frcl_w));
+ map(0xffb4, 0xffb4).rw(FUNC(h8532_device::frt3_ocrah_r), FUNC(h8532_device::frt3_ocrah_w));
+ map(0xffb5, 0xffb5).rw(FUNC(h8532_device::frt3_ocral_r), FUNC(h8532_device::frt3_ocral_w));
+ map(0xffb6, 0xffb6).rw(FUNC(h8532_device::frt3_ocrbh_r), FUNC(h8532_device::frt3_ocrbh_w));
+ map(0xffb7, 0xffb7).rw(FUNC(h8532_device::frt3_ocrbl_r), FUNC(h8532_device::frt3_ocrbl_w));
+ map(0xffb8, 0xffb8).r(FUNC(h8532_device::frt3_icrh_r));
+ map(0xffb9, 0xffb9).r(FUNC(h8532_device::frt3_icrl_r));
+ map(0xffc0, 0xffc0).rw(FUNC(h8532_device::pwm1_tcr_r), FUNC(h8532_device::pwm1_tcr_w));
+ map(0xffc1, 0xffc1).rw(FUNC(h8532_device::pwm1_dtr_r), FUNC(h8532_device::pwm1_dtr_w));
+ map(0xffc2, 0xffc2).rw(FUNC(h8532_device::pwm1_tcnt_r), FUNC(h8532_device::pwm1_tcnt_w));
+ map(0xffc4, 0xffc4).rw(FUNC(h8532_device::pwm2_tcr_r), FUNC(h8532_device::pwm2_tcr_w));
+ map(0xffc5, 0xffc5).rw(FUNC(h8532_device::pwm2_dtr_r), FUNC(h8532_device::pwm2_dtr_w));
+ map(0xffc6, 0xffc6).rw(FUNC(h8532_device::pwm2_tcnt_r), FUNC(h8532_device::pwm2_tcnt_w));
+ map(0xffc8, 0xffc8).rw(FUNC(h8532_device::pwm3_tcr_r), FUNC(h8532_device::pwm3_tcr_w));
+ map(0xffc9, 0xffc9).rw(FUNC(h8532_device::pwm3_dtr_r), FUNC(h8532_device::pwm3_dtr_w));
+ map(0xffca, 0xffca).rw(FUNC(h8532_device::pwm3_tcnt_r), FUNC(h8532_device::pwm3_tcnt_w));
+ map(0xffd0, 0xffd0).rw(FUNC(h8532_device::tmr_tcr_r), FUNC(h8532_device::tmr_tcr_w));
+ map(0xffd1, 0xffd1).rw(FUNC(h8532_device::tmr_tcsr_r), FUNC(h8532_device::tmr_tcsr_w));
+ map(0xffd2, 0xffd2).rw(FUNC(h8532_device::tmr_tcora_r), FUNC(h8532_device::tmr_tcora_w));
+ map(0xffd3, 0xffd3).rw(FUNC(h8532_device::tmr_tcorb_r), FUNC(h8532_device::tmr_tcorb_w));
+ map(0xffd4, 0xffd4).rw(FUNC(h8532_device::tmr_tcnt_r), FUNC(h8532_device::tmr_tcnt_w));
+ map(0xffd8, 0xffd8).rw(FUNC(h8532_device::sci1_smr_r), FUNC(h8532_device::sci1_smr_w));
+ map(0xffd9, 0xffd9).rw(FUNC(h8532_device::sci1_brr_r), FUNC(h8532_device::sci1_brr_w));
+ map(0xffda, 0xffda).rw(FUNC(h8532_device::sci1_scr_r), FUNC(h8532_device::sci1_scr_w));
+ map(0xffdb, 0xffdb).rw(FUNC(h8532_device::sci1_tdr_r), FUNC(h8532_device::sci1_tdr_w));
+ map(0xffdc, 0xffdc).rw(FUNC(h8532_device::sci1_ssr_r), FUNC(h8532_device::sci1_ssr_w));
+ map(0xffdd, 0xffdd).r(FUNC(h8532_device::sci1_rdr_r));
+ map(0xffe0, 0xffe0).r(FUNC(h8532_device::addrah_r));
+ map(0xffe1, 0xffe1).r(FUNC(h8532_device::addral_r));
+ map(0xffe2, 0xffe2).r(FUNC(h8532_device::addrbh_r));
+ map(0xffe3, 0xffe3).r(FUNC(h8532_device::addrbl_r));
+ map(0xffe4, 0xffe4).r(FUNC(h8532_device::addrch_r));
+ map(0xffe5, 0xffe5).r(FUNC(h8532_device::addrcl_r));
+ map(0xffe6, 0xffe6).r(FUNC(h8532_device::addrdh_r));
+ map(0xffe7, 0xffe7).r(FUNC(h8532_device::addrdl_r));
+ map(0xffe8, 0xffe8).rw(FUNC(h8532_device::adcsr_r), FUNC(h8532_device::adcsr_w));
+ map(0xffe9, 0xffe9).rw(FUNC(h8532_device::adcr_r), FUNC(h8532_device::adcr_w));
+ map(0xffec, 0xffec).rw(FUNC(h8532_device::wdt_tcsr_r));
+ map(0xffed, 0xffed).r(FUNC(h8532_device::wdt_tcnt_r), FUNC(h8532_device::wdt_tcsr_w));
+ map(0xfff0, 0xfff0).rw(FUNC(h8532_device::ipra_r), FUNC(h8532_device::ipra_w));
+ map(0xfff1, 0xfff1).rw(FUNC(h8532_device::iprb_r), FUNC(h8532_device::iprb_w));
+ map(0xfff2, 0xfff2).rw(FUNC(h8532_device::iprc_r), FUNC(h8532_device::iprc_w));
+ map(0xfff3, 0xfff3).rw(FUNC(h8532_device::iprd_r), FUNC(h8532_device::iprd_w));
+ map(0xfff4, 0xfff4).rw(FUNC(h8532_device::dtea_r), FUNC(h8532_device::dtea_w));
+ map(0xfff5, 0xfff5).rw(FUNC(h8532_device::dteb_r), FUNC(h8532_device::dteb_w));
+ map(0xfff6, 0xfff6).rw(FUNC(h8532_device::dtec_r), FUNC(h8532_device::dtec_w));
+ map(0xfff7, 0xfff7).rw(FUNC(h8532_device::dted_r), FUNC(h8532_device::dted_w));
+ map(0xfff8, 0xfff8).rw(FUNC(h8532_device::wcr_r), FUNC(h8532_device::wcr_w));
+ map(0xfff9, 0xfff9).rw(FUNC(h8532_device::ramcr_r), FUNC(h8532_device::ramcr_w));
+ map(0xfffa, 0xfffa).r(FUNC(h8532_device::mdcr_r));
+ map(0xfffb, 0xfffb).rw(FUNC(h8532_device::sbycr_r), FUNC(h8532_device::sbycr_w));
+ map(0xfffc, 0xfffc).rw(FUNC(h8532_device::p1cr_r), FUNC(h8532_device::p1cr_w));
+ map(0xfffe, 0xfffe).w(FUNC(h8532_device::p9ddr_w));
+ map(0xffff, 0xffff).rw(FUNC(h8532_device::p9dr_r), FUNC(h8532_device::p9dr_w));
+#endif
+}
diff --git a/src/devices/cpu/h8500/h8532.h b/src/devices/cpu/h8500/h8532.h
new file mode 100644
index 00000000000..c9b08ee1d00
--- /dev/null
+++ b/src/devices/cpu/h8500/h8532.h
@@ -0,0 +1,29 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_H8500_H8532_H
+#define MAME_CPU_H8500_H8532_H
+
+#pragma once
+
+#include "h8500.h"
+
+class h8532_device : public h8500_device
+{
+protected:
+ h8532_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
+private:
+ void internal_map(address_map &map);
+};
+
+class hd6435328_device : public h8532_device
+{
+public:
+ // device type constructor
+ hd6435328_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+DECLARE_DEVICE_TYPE(HD6435328, hd6435328_device)
+
+#endif // MAME_CPU_H8500_H8532_H
diff --git a/src/devices/cpu/h8500/h8534.cpp b/src/devices/cpu/h8500/h8534.cpp
new file mode 100644
index 00000000000..065d83adc5e
--- /dev/null
+++ b/src/devices/cpu/h8500/h8534.cpp
@@ -0,0 +1,134 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Hitachi H8/534
+
+***************************************************************************/
+
+#include "emu.h"
+#include "h8534.h"
+
+DEFINE_DEVICE_TYPE(HD6475348, hd6475348_device, "hd6475348", "Hitachi HD6475348 (H8/534)")
+
+h8534_device::h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : h8500_device(mconfig, type, tag, owner, clock, 20, 8, 11, address_map_constructor(FUNC(h8534_device::internal_map), this))
+{
+}
+
+hd6475348_device::hd6475348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : h8534_device(mconfig, HD6475348, tag, owner, clock)
+{
+}
+
+void h8534_device::internal_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom().region(DEVICE_SELF, 0); // modes 2, 4, 7
+#if 0
+ map(0xfe80, 0xfe80).w(FUNC(h8534_device::p1ddr_w));
+ map(0xfe81, 0xfe81).w(FUNC(h8534_device::p2ddr_w));
+ map(0xfe82, 0xfe82).rw(FUNC(h8534_device::p1dr_r), FUNC(h8534_device::p1dr_w));
+ map(0xfe83, 0xfe83).rw(FUNC(h8534_device::p2dr_r), FUNC(h8534_device::p2dr_w));
+ map(0xfe84, 0xfe84).w(FUNC(h8534_device::p3ddr_w));
+ map(0xfe85, 0xfe85).w(FUNC(h8534_device::p4ddr_w));
+ map(0xfe86, 0xfe86).rw(FUNC(h8534_device::p3dr_r), FUNC(h8534_device::p3dr_w));
+ map(0xfe87, 0xfe87).rw(FUNC(h8534_device::p4dr_r), FUNC(h8534_device::p4dr_w));
+ map(0xfe88, 0xfe88).w(FUNC(h8534_device::p5ddr_w));
+ map(0xfe89, 0xfe89).w(FUNC(h8534_device::p6ddr_w));
+ map(0xfe8a, 0xfe8a).rw(FUNC(h8534_device::p5dr_r), FUNC(h8534_device::p5dr_w));
+ map(0xfe8b, 0xfe8b).rw(FUNC(h8534_device::p6dr_r), FUNC(h8534_device::p6dr_w));
+ map(0xfe8c, 0xfe8c).w(FUNC(h8534_device::p7ddr_w));
+ map(0xfe8e, 0xfe8e).rw(FUNC(h8534_device::p7dr_r), FUNC(h8534_device::p7dr_w));
+ map(0xfe8f, 0xfe8f).r(FUNC(h8534_device::p8dr_r));
+ map(0xfe90, 0xfe90).rw(FUNC(h8534_device::frt1_tcr_r), FUNC(h8534_device::frt1_tcr_w));
+ map(0xfe91, 0xfe91).rw(FUNC(h8534_device::frt1_tcsr_r), FUNC(h8534_device::frt1_tcsr_w));
+ map(0xfe92, 0xfe92).rw(FUNC(h8534_device::frt1_frch_r), FUNC(h8534_device::frt1_frch_w));
+ map(0xfe93, 0xfe93).rw(FUNC(h8534_device::frt1_frcl_r), FUNC(h8534_device::frt1_frcl_w));
+ map(0xfe94, 0xfe94).rw(FUNC(h8534_device::frt1_ocrah_r), FUNC(h8534_device::frt1_ocrah_w));
+ map(0xfe95, 0xfe95).rw(FUNC(h8534_device::frt1_ocral_r), FUNC(h8534_device::frt1_ocral_w));
+ map(0xfe96, 0xfe96).rw(FUNC(h8534_device::frt1_ocrbh_r), FUNC(h8534_device::frt1_ocrbh_w));
+ map(0xfe97, 0xfe97).rw(FUNC(h8534_device::frt1_ocrbl_r), FUNC(h8534_device::frt1_ocrbl_w));
+ map(0xfe98, 0xfe98).r(FUNC(h8534_device::frt1_icrh_r));
+ map(0xfe99, 0xfe99).r(FUNC(h8534_device::frt1_icrl_r));
+ map(0xfea0, 0xfea0).rw(FUNC(h8534_device::frt2_tcr_r), FUNC(h8534_device::frt2_tcr_w));
+ map(0xfea1, 0xfea1).rw(FUNC(h8534_device::frt2_tcsr_r), FUNC(h8534_device::frt2_tcsr_w));
+ map(0xfea2, 0xfea2).rw(FUNC(h8534_device::frt2_frch_r), FUNC(h8534_device::frt2_frch_w));
+ map(0xfea3, 0xfea3).rw(FUNC(h8534_device::frt2_frcl_r), FUNC(h8534_device::frt2_frcl_w));
+ map(0xfea4, 0xfea4).rw(FUNC(h8534_device::frt2_ocrah_r), FUNC(h8534_device::frt2_ocrah_w));
+ map(0xfea5, 0xfea5).rw(FUNC(h8534_device::frt2_ocral_r), FUNC(h8534_device::frt2_ocral_w));
+ map(0xfea6, 0xfea6).rw(FUNC(h8534_device::frt2_ocrbh_r), FUNC(h8534_device::frt2_ocrbh_w));
+ map(0xfea7, 0xfea7).rw(FUNC(h8534_device::frt2_ocrbl_r), FUNC(h8534_device::frt2_ocrbl_w));
+ map(0xfea8, 0xfea8).r(FUNC(h8534_device::frt2_icrh_r));
+ map(0xfea9, 0xfea9).r(FUNC(h8534_device::frt2_icrl_r));
+ map(0xfeb0, 0xfeb0).rw(FUNC(h8534_device::frt3_tcr_r), FUNC(h8534_device::frt3_tcr_w));
+ map(0xfeb1, 0xfeb1).rw(FUNC(h8534_device::frt3_tcsr_r), FUNC(h8534_device::frt3_tcsr_w));
+ map(0xfeb2, 0xfeb2).rw(FUNC(h8534_device::frt3_frch_r), FUNC(h8534_device::frt3_frch_w));
+ map(0xfeb3, 0xfeb3).rw(FUNC(h8534_device::frt3_frcl_r), FUNC(h8534_device::frt3_frcl_w));
+ map(0xfeb4, 0xfeb4).rw(FUNC(h8534_device::frt3_ocrah_r), FUNC(h8534_device::frt3_ocrah_w));
+ map(0xfeb5, 0xfeb5).rw(FUNC(h8534_device::frt3_ocral_r), FUNC(h8534_device::frt3_ocral_w));
+ map(0xfeb6, 0xfeb6).rw(FUNC(h8534_device::frt3_ocrbh_r), FUNC(h8534_device::frt3_ocrbh_w));
+ map(0xfeb7, 0xfeb7).rw(FUNC(h8534_device::frt3_ocrbl_r), FUNC(h8534_device::frt3_ocrbl_w));
+ map(0xfeb8, 0xfeb8).r(FUNC(h8534_device::frt3_icrh_r));
+ map(0xfeb9, 0xfeb9).r(FUNC(h8534_device::frt3_icrl_r));
+ map(0xfec0, 0xfec0).rw(FUNC(h8534_device::pwm1_tcr_r), FUNC(h8534_device::pwm1_tcr_w));
+ map(0xfec1, 0xfec1).rw(FUNC(h8534_device::pwm1_dtr_r), FUNC(h8534_device::pwm1_dtr_w));
+ map(0xfec2, 0xfec2).rw(FUNC(h8534_device::pwm1_tcnt_r), FUNC(h8534_device::pwm1_tcnt_w));
+ map(0xfec4, 0xfec4).rw(FUNC(h8534_device::pwm2_tcr_r), FUNC(h8534_device::pwm2_tcr_w));
+ map(0xfec5, 0xfec5).rw(FUNC(h8534_device::pwm2_dtr_r), FUNC(h8534_device::pwm2_dtr_w));
+ map(0xfec6, 0xfec6).rw(FUNC(h8534_device::pwm2_tcnt_r), FUNC(h8534_device::pwm2_tcnt_w));
+ map(0xfec8, 0xfec8).rw(FUNC(h8534_device::pwm3_tcr_r), FUNC(h8534_device::pwm3_tcr_w));
+ map(0xfec9, 0xfec9).rw(FUNC(h8534_device::pwm3_dtr_r), FUNC(h8534_device::pwm3_dtr_w));
+ map(0xfeca, 0xfeca).rw(FUNC(h8534_device::pwm3_tcnt_r), FUNC(h8534_device::pwm3_tcnt_w));
+ map(0xfed0, 0xfed0).rw(FUNC(h8534_device::tmr_tcr_r), FUNC(h8534_device::tmr_tcr_w));
+ map(0xfed1, 0xfed1).rw(FUNC(h8534_device::tmr_tcsr_r), FUNC(h8534_device::tmr_tcsr_w));
+ map(0xfed2, 0xfed2).rw(FUNC(h8534_device::tmr_tcora_r), FUNC(h8534_device::tmr_tcora_w));
+ map(0xfed3, 0xfed3).rw(FUNC(h8534_device::tmr_tcorb_r), FUNC(h8534_device::tmr_tcorb_w));
+ map(0xfed4, 0xfed4).rw(FUNC(h8534_device::tmr_tcnt_r), FUNC(h8534_device::tmr_tcnt_w));
+ map(0xfed8, 0xfed8).rw(FUNC(h8534_device::sci1_smr_r), FUNC(h8534_device::sci1_smr_w));
+ map(0xfed9, 0xfed9).rw(FUNC(h8534_device::sci1_brr_r), FUNC(h8534_device::sci1_brr_w));
+ map(0xfeda, 0xfeda).rw(FUNC(h8534_device::sci1_scr_r), FUNC(h8534_device::sci1_scr_w));
+ map(0xfedb, 0xfedb).rw(FUNC(h8534_device::sci1_tdr_r), FUNC(h8534_device::sci1_tdr_w));
+ map(0xfedc, 0xfedc).rw(FUNC(h8534_device::sci1_ssr_r), FUNC(h8534_device::sci1_ssr_w));
+ map(0xfedd, 0xfedd).r(FUNC(h8534_device::sci1_rdr_r));
+ map(0xfee0, 0xfee0).r(FUNC(h8534_device::addrah_r));
+ map(0xfee1, 0xfee1).r(FUNC(h8534_device::addral_r));
+ map(0xfee2, 0xfee2).r(FUNC(h8534_device::addrbh_r));
+ map(0xfee3, 0xfee3).r(FUNC(h8534_device::addrbl_r));
+ map(0xfee4, 0xfee4).r(FUNC(h8534_device::addrch_r));
+ map(0xfee5, 0xfee5).r(FUNC(h8534_device::addrcl_r));
+ map(0xfee6, 0xfee6).r(FUNC(h8534_device::addrdh_r));
+ map(0xfee7, 0xfee7).r(FUNC(h8534_device::addrdl_r));
+ map(0xfee8, 0xfee8).rw(FUNC(h8534_device::adcsr_r), FUNC(h8534_device::adcsr_w));
+ map(0xfee9, 0xfee9).rw(FUNC(h8534_device::adcr_r), FUNC(h8534_device::adcr_w));
+ map(0xfeec, 0xfeec).rw(FUNC(h8534_device::wdt_tcsr_r));
+ map(0xfeed, 0xfeed).r(FUNC(h8534_device::wdt_tcnt_r), FUNC(h8534_device::wdt_tcsr_w));
+ map(0xfef0, 0xfef0).rw(FUNC(h8534_device::sci2_smr_r), FUNC(h8534_device::sci2_smr_w));
+ map(0xfef1, 0xfef1).rw(FUNC(h8534_device::sci2_brr_r), FUNC(h8534_device::sci2_brr_w));
+ map(0xfef2, 0xfef2).rw(FUNC(h8534_device::sci2_scr_r), FUNC(h8534_device::sci2_scr_w));
+ map(0xfef3, 0xfef3).rw(FUNC(h8534_device::sci2_tdr_r), FUNC(h8534_device::sci2_tdr_w));
+ map(0xfef4, 0xfef4).rw(FUNC(h8534_device::sci2_ssr_r), FUNC(h8534_device::sci2_ssr_w));
+ map(0xfef5, 0xfef5).r(FUNC(h8534_device::sci2_rdr_r));
+ map(0xfefc, 0xfefc).rw(FUNC(h8534_device::syscr1_r), FUNC(h8534_device::syscr1_w));
+ map(0xfefd, 0xfefd).rw(FUNC(h8534_device::syscr2_r), FUNC(h8534_device::syscr2_w));
+ map(0xfefe, 0xfefe).w(FUNC(h8534_device::p9ddr_w));
+ map(0xfeff, 0xfeff).rw(FUNC(h8534_device::p9dr_r), FUNC(h8534_device::p9dr_w));
+ map(0xff00, 0xff00).rw(FUNC(h8534_device::ipra_r), FUNC(h8534_device::ipra_w));
+ map(0xff01, 0xff01).rw(FUNC(h8534_device::iprb_r), FUNC(h8534_device::iprb_w));
+ map(0xff02, 0xff02).rw(FUNC(h8534_device::iprc_r), FUNC(h8534_device::iprc_w));
+ map(0xff03, 0xff03).rw(FUNC(h8534_device::iprd_r), FUNC(h8534_device::iprd_w));
+ map(0xff04, 0xff04).rw(FUNC(h8534_device::ipre_r), FUNC(h8534_device::ipre_w));
+ map(0xff05, 0xff05).rw(FUNC(h8534_device::iprf_r), FUNC(h8534_device::iprf_w));
+ map(0xff08, 0xff08).rw(FUNC(h8534_device::dtea_r), FUNC(h8534_device::dtea_w));
+ map(0xff09, 0xff09).rw(FUNC(h8534_device::dteb_r), FUNC(h8534_device::dteb_w));
+ map(0xff0a, 0xff0a).rw(FUNC(h8534_device::dtec_r), FUNC(h8534_device::dtec_w));
+ map(0xff0b, 0xff0b).rw(FUNC(h8534_device::dted_r), FUNC(h8534_device::dted_w));
+ map(0xff0c, 0xff0c).rw(FUNC(h8534_device::dtee_r), FUNC(h8534_device::dtee_w));
+ map(0xff0d, 0xff0d).rw(FUNC(h8534_device::dtef_r), FUNC(h8534_device::dtef_w));
+ map(0xff10, 0xff10).rw(FUNC(h8534_device::wcr_r), FUNC(h8534_device::wcr_w));
+ map(0xff11, 0xff11).rw(FUNC(h8534_device::ramcr_r), FUNC(h8534_device::ramcr_w));
+ map(0xff12, 0xff12).r(FUNC(h8534_device::mdcr_r));
+ map(0xff13, 0xff13).rw(FUNC(h8534_device::sbycr_r), FUNC(h8534_device::sbycr_w));
+ map(0xff14, 0xff14).w(FUNC(h8534_device::wdt_rstcsr_w));
+ map(0xff15, 0xff15).r(FUNC(h8534_device::wdt_rstcsr_r));
+#endif
+}
diff --git a/src/devices/cpu/h8500/h8534.h b/src/devices/cpu/h8500/h8534.h
new file mode 100644
index 00000000000..7b375ba8351
--- /dev/null
+++ b/src/devices/cpu/h8500/h8534.h
@@ -0,0 +1,29 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+
+#ifndef MAME_CPU_H8500_H8534_H
+#define MAME_CPU_H8500_H8534_H
+
+#pragma once
+
+#include "h8500.h"
+
+class h8534_device : public h8500_device
+{
+protected:
+ h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
+private:
+ void internal_map(address_map &map);
+};
+
+class hd6475348_device : public h8534_device
+{
+public:
+ // device type constructor
+ hd6475348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+DECLARE_DEVICE_TYPE(HD6475348, hd6475348_device)
+
+#endif // MAME_CPU_H8500_H8532_H
diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp
index 33ee981e512..abcde1d500a 100644
--- a/src/devices/cpu/hmcs40/hmcs40.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40.cpp
@@ -7,7 +7,8 @@
References:
- 1985 #AP1 Hitachi 4-bit Single-Chip Microcomputer Data Book
- 1988 HMCS400 Series Handbook (note: *400 is a newer MCU series, with similarities)
- - opcode decoding by Tatsuyuki Satoh, Olivier Galibert, Kevin Horton, Lord Nightmare - and verified
+ - opcode decoding by Tatsuyuki Satoh, Olivier Galibert, Kevin Horton, Lord Nightmare
+ (verified a while later after new documentation was found)
*/
@@ -56,16 +57,20 @@ DEFINE_DEVICE_TYPE(HD44828, hd44828_device, "hd44828", "Hitachi HD44828") // CMO
// internal memory maps
+
+// On HMCS42/3/4/5, only half of the ROM address range contains user-executable code,
+// there is up to 128 bytes of pattern data in the 2nd half. The 2nd half also includes
+// a couple of pages with factory test code by Hitachi, only executable when MCU test
+// mode is enabled externally. This data can still be accessed with the P opcode.
+
void hmcs40_cpu_device::program_1k(address_map &map)
{
- map(0x0000, 0x03ff).rom();
- map(0x0780, 0x07bf).rom(); // patterns on page 30
+ map(0x0000, 0x07ff).rom();
}
void hmcs40_cpu_device::program_2k(address_map &map)
{
- map(0x0000, 0x07ff).rom();
- map(0x0f40, 0x0fbf).rom(); // patterns on page 61,62
+ map(0x0000, 0x0fff).rom();
}
diff --git a/src/devices/cpu/ks0164/ks0164.cpp b/src/devices/cpu/ks0164/ks0164.cpp
index f4122eeab5d..0c337a2bf11 100644
--- a/src/devices/cpu/ks0164/ks0164.cpp
+++ b/src/devices/cpu/ks0164/ks0164.cpp
@@ -577,7 +577,7 @@ void ks0164_cpu_device::execute_run()
m_r[R_PC] += 2;
m_r[r] --;
- if(m_r[r] != 0xffff)
+ if(m_r[r] != 0)
m_r[R_PC] = a;
break;
}
diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp
index b35a25329bd..728e823beb5 100644
--- a/src/devices/cpu/lc8670/lc8670.cpp
+++ b/src/devices/cpu/lc8670/lc8670.cpp
@@ -906,17 +906,17 @@ void lc8670_cpu_device::timer1_tick()
// internal map handlers
//**************************************************************************
-READ8_MEMBER(lc8670_cpu_device::mram_r)
+uint8_t lc8670_cpu_device::mram_r(offs_t offset)
{
return m_mram[BIT(REG_PSW,1)*0x100 + offset];
}
-WRITE8_MEMBER(lc8670_cpu_device::mram_w)
+void lc8670_cpu_device::mram_w(offs_t offset, uint8_t data)
{
m_mram[BIT(REG_PSW,1)*0x100 + offset] = data;
}
-READ8_MEMBER(lc8670_cpu_device::xram_r)
+uint8_t lc8670_cpu_device::xram_r(offs_t offset)
{
if (!(REG_VCCR & 0x40) || machine().side_effects_disabled()) // XRAM access enabled
{
@@ -939,7 +939,7 @@ READ8_MEMBER(lc8670_cpu_device::xram_r)
return 0xff;
}
-WRITE8_MEMBER(lc8670_cpu_device::xram_w)
+void lc8670_cpu_device::xram_w(offs_t offset, uint8_t data)
{
if (!(REG_VCCR & 0x40) || machine().side_effects_disabled()) // XRAM access enabled
{
@@ -960,7 +960,7 @@ WRITE8_MEMBER(lc8670_cpu_device::xram_w)
}
}
-READ8_MEMBER(lc8670_cpu_device::regs_r)
+uint8_t lc8670_cpu_device::regs_r(offs_t offset)
{
switch(offset)
{
@@ -999,7 +999,7 @@ READ8_MEMBER(lc8670_cpu_device::regs_r)
return m_sfr[offset];
}
-WRITE8_MEMBER(lc8670_cpu_device::regs_w)
+void lc8670_cpu_device::regs_w(offs_t offset, uint8_t data)
{
switch(offset)
{
diff --git a/src/devices/cpu/lc8670/lc8670.h b/src/devices/cpu/lc8670/lc8670.h
index 5613771ab0f..8293ed66f26 100644
--- a/src/devices/cpu/lc8670/lc8670.h
+++ b/src/devices/cpu/lc8670/lc8670.h
@@ -60,12 +60,12 @@ public:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
// internal map handlers
- DECLARE_READ8_MEMBER(regs_r);
- DECLARE_WRITE8_MEMBER(regs_w);
- DECLARE_READ8_MEMBER(mram_r);
- DECLARE_WRITE8_MEMBER(mram_w);
- DECLARE_READ8_MEMBER(xram_r);
- DECLARE_WRITE8_MEMBER(xram_w);
+ uint8_t regs_r(offs_t offset);
+ void regs_w(offs_t offset, uint8_t data);
+ uint8_t mram_r(offs_t offset);
+ void mram_w(offs_t offset, uint8_t data);
+ uint8_t xram_r(offs_t offset);
+ void xram_w(offs_t offset, uint8_t data);
// configuration helpers
void set_cpu_clock(clock_source source, uint32_t clock) { m_clocks[unsigned(source)] = clock; }
diff --git a/src/devices/cpu/m6502/m6500_1.cpp b/src/devices/cpu/m6502/m6500_1.cpp
index ac2b0c040dd..086c7db99c1 100644
--- a/src/devices/cpu/m6502/m6500_1.cpp
+++ b/src/devices/cpu/m6502/m6500_1.cpp
@@ -103,7 +103,7 @@ m6500_1_device::m6500_1_device(machine_config const &mconfig, char const *tag, d
}
-WRITE8_MEMBER(m6500_1_device::pa_w)
+void m6500_1_device::pa_w(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(m6500_1_device::set_port_in<0>), this), unsigned(data));
}
diff --git a/src/devices/cpu/m6502/m6500_1.h b/src/devices/cpu/m6502/m6500_1.h
index 19946682ac5..86f9621463b 100644
--- a/src/devices/cpu/m6502/m6500_1.h
+++ b/src/devices/cpu/m6502/m6500_1.h
@@ -60,7 +60,7 @@ public:
DECLARE_READ8_MEMBER(pb_r) { return m_port_buf[1]; }
DECLARE_READ8_MEMBER(pc_r) { return m_port_buf[2]; }
DECLARE_READ8_MEMBER(pd_r) { return m_port_buf[3]; }
- DECLARE_WRITE8_MEMBER(pa_w);
+ void pa_w(uint8_t data);
DECLARE_WRITE8_MEMBER(pb_w);
DECLARE_WRITE8_MEMBER(pc_w);
DECLARE_WRITE8_MEMBER(pd_w);
diff --git a/src/devices/cpu/m6805/m68705.cpp b/src/devices/cpu/m6805/m68705.cpp
index b006727904f..814a0ca57d6 100644
--- a/src/devices/cpu/m6805/m68705.cpp
+++ b/src/devices/cpu/m6805/m68705.cpp
@@ -119,6 +119,7 @@ DEFINE_DEVICE_TYPE(M6805R2, m6805r2_device, "m6805r2", "Motorola MC6805R2")
DEFINE_DEVICE_TYPE(M6805R3, m6805r3_device, "m6805r3", "Motorola MC6805R3")
DEFINE_DEVICE_TYPE(M6805U2, m6805u2_device, "m6805u2", "Motorola MC6805U2")
DEFINE_DEVICE_TYPE(M6805U3, m6805u3_device, "m6805u3", "Motorola MC6805U3")
+DEFINE_DEVICE_TYPE(HD6805S1, hd6805s1_device, "hd6805s1", "Hitachi HD6805S1")
DEFINE_DEVICE_TYPE(HD6805U1, hd6805u1_device, "hd6805u1", "Hitachi HD6805U1")
/****************************************************************************
@@ -817,6 +818,15 @@ m6805u3_device::m6805u3_device(machine_config const &mconfig, char const *tag, d
m_timer.set_options(m6805_timer::TIMER_PGM);
}
+hd6805s1_device::hd6805s1_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
+ : m6805_mrom_device(mconfig, tag, owner, clock, HD6805S1, 11, 64)
+{
+ m_timer.set_options(m6805_timer::TIMER_NPC);
+
+ set_port_mask<2>(0xf0); // Port C is four bits wide
+ set_port_mask<3>(0xff); // Port D isn't present
+}
+
hd6805u1_device::hd6805u1_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
: m6805_mrom_device(mconfig, tag, owner, clock, HD6805U1, 12, 96)
{
@@ -858,14 +868,24 @@ void m6805_mrom_device::internal_map(address_map &map)
*
* Device Reg/RAM Page Zero Main User Self Check Vectors
* 6805P2 0000-007f 0080-00ff 03c0-07b3 07b4-07f7 07f8-07ff
+ * 6805P4 0000-007f 0080-00ff 03c0-0783 0784-07f7 07f8-07ff
* 6805P6 0000-007f 0080-00ff 0100-07b3 07b4-07f7 07f8-07ff
* 6805R2 0000-007f 0080-00ff 07c0-0f37 0f38-0ff7 0ff8-0fff
* 6805R3 0000-007f 0080-0f37 0f38-0ff7 0ff8-0fff
* 6805S2 0000-007f 0080-00ff 09c0-0eff 0f00-0ff7 0ff8-0fff
* 6805S3 0000-007f 0080-00ff 0100-0eff 0f00-0ff7 0ff8-0fff
+ * 6805T2 0000-007f 0080-07ff 0d40-0f83 0f84-0ff7 0ff8-0fff
* 6805U2 0000-007f 0080-00ff 07c0-0f37 0f38-0ff7 0ff8-0fff
* 6805U3 0000-007f 0080-0f37 0f38-0ff7 0ff8-0fff
+ *
+ * Hitachi NMOS variants:
+ *
+ * Device Reg/RAM Page Zero Main User Self Check Vectors
+ * 6805S1 0000-007f 0080-00ff 03c0-0783 0784-07f7 07f8-07ff
+ * 6805S6 0000-007f 0080-00ff 0100-0783 0784-07f7 07f8-07ff
* 6805U1 0000-007f 0080-00ff 0800-0f7f 0f80-0ff7 0ff8-0fff
+ * 6805V1 0000-007f 0080-00ff 0100-0f7f 0f80-0ff7 0ff8-0fff
+ * 6805W1 0000-007f 0080-00ff 0100-0f79 0f7a-0ff1 0ff2-0fff
*
* This code assumes that dumps are captured contiguously from address 0 to
* the end of the address range, and are not split by range. Register, RAM
diff --git a/src/devices/cpu/m6805/m68705.h b/src/devices/cpu/m6805/m68705.h
index c9f7b9fe571..d6998c08322 100644
--- a/src/devices/cpu/m6805/m68705.h
+++ b/src/devices/cpu/m6805/m68705.h
@@ -15,6 +15,7 @@ DECLARE_DEVICE_TYPE(M6805R3, m6805r3_device)
//DECLARE_DEVICE_TYPE(M6805S3, m6805s3_device) // A/D, SPI, multiple timers
DECLARE_DEVICE_TYPE(M6805U2, m6805u2_device)
DECLARE_DEVICE_TYPE(M6805U3, m6805u3_device)
+DECLARE_DEVICE_TYPE(HD6805S1, hd6805s1_device)
DECLARE_DEVICE_TYPE(HD6805U1, hd6805u1_device)
DECLARE_DEVICE_TYPE(M68705P3, m68705p3_device)
@@ -170,7 +171,7 @@ protected:
template <std::size_t N> void set_port_open_drain(bool value);
template <std::size_t N> void set_port_mask(u8 mask);
- template <std::size_t N> DECLARE_WRITE8_MEMBER(port_input_w) { m_port_input[N] = data & ~m_port_mask[N]; }
+ template <std::size_t N> void port_input_w(uint8_t data) { m_port_input[N] = data & ~m_port_mask[N]; }
template <std::size_t N> DECLARE_READ8_MEMBER(port_r);
template <std::size_t N> DECLARE_WRITE8_MEMBER(port_latch_w);
template <std::size_t N> DECLARE_WRITE8_MEMBER(port_ddr_w);
@@ -282,9 +283,9 @@ private:
class m68705p_device : public m68705_device
{
public:
- DECLARE_WRITE8_MEMBER(pa_w) { port_input_w<0>(space, offset, data, mem_mask); }
- DECLARE_WRITE8_MEMBER(pb_w) { port_input_w<1>(space, offset, data, mem_mask); }
- DECLARE_WRITE8_MEMBER(pc_w) { port_input_w<2>(space, offset, data, mem_mask); }
+ void pa_w(u8 data) { port_input_w<0>(data); }
+ void pb_w(u8 data) { port_input_w<1>(data); }
+ void pc_w(u8 data) { port_input_w<2>(data); }
protected:
virtual void internal_map(address_map &map) override;
@@ -299,10 +300,10 @@ protected:
class m68705u_device : public m68705_device
{
public:
- DECLARE_WRITE8_MEMBER(pa_w) { port_input_w<0>(space, offset, data, mem_mask); }
- DECLARE_WRITE8_MEMBER(pb_w) { port_input_w<1>(space, offset, data, mem_mask); }
- DECLARE_WRITE8_MEMBER(pc_w) { port_input_w<2>(space, offset, data, mem_mask); }
- DECLARE_WRITE8_MEMBER(pd_w) { port_input_w<3>(space, offset, data, mem_mask); } // TODO: PD6 is also /INT2
+ void pa_w(u8 data) { port_input_w<0>(data); }
+ void pb_w(u8 data) { port_input_w<1>(data); }
+ void pc_w(u8 data) { port_input_w<2>(data); }
+ void pd_w(u8 data) { port_input_w<3>(data); } // TODO: PD6 is also /INT2
protected:
virtual void internal_map(address_map &map) override;
@@ -374,6 +375,12 @@ public:
protected:
};
+class hd6805s1_device : public m6805_mrom_device
+{
+public:
+ hd6805s1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+};
+
class hd6805u1_device : public m6805_mrom_device
{
public:
diff --git a/src/devices/cpu/m6805/m68hc05.cpp b/src/devices/cpu/m6805/m68hc05.cpp
index 3f986845708..14c40020c47 100644
--- a/src/devices/cpu/m6805/m68hc05.cpp
+++ b/src/devices/cpu/m6805/m68hc05.cpp
@@ -64,7 +64,8 @@ std::pair<u16, char const *> const m68hc705c8a_syms[] = {
{ 0x0014, "ICRH" }, { 0x0015, "ICRL" }, { 0x0016, "OCRH" }, { 0x0017, "OCRL" },
{ 0x0018, "TRH" }, { 0x0019, "TRL" }, { 0x001a, "ATRH" }, { 0x001b, "ATRL" },
{ 0x001c, "PROG" },
- { 0x001d, "COPRST" }, { 0x001e, "COPCR" } };
+ { 0x001d, "COPRST" }, { 0x001e, "COPCR" },
+ { 0x1fdf, "OPTION" } };
std::pair<u16, char const *> const m68hc705j1a_syms[] = {
{ 0x0000, "PORTA" }, { 0x0001, "PORTB" },
@@ -653,7 +654,7 @@ void m68hc05_device::burn_cycles(unsigned count)
// run non-programmable COP
m_ncop_cnt += count;
- if ((u32(1) << 17) <= m_ncop_cnt)
+ if (m_ncope && ((u32(1) << 17) <= m_ncop_cnt))
{
pulse_input_line(INPUT_LINE_RESET, attotime::zero);
LOGCOP("NCOP reset\n");
@@ -908,12 +909,12 @@ void m68hc705c8a_device::c8a_map(address_map &map)
map(0x001d, 0x001d).w(FUNC(m68hc705c8a_device::coprst_w));
map(0x001e, 0x001e).rw(FUNC(m68hc705c8a_device::copcr_r), FUNC(m68hc705c8a_device::copcr_w));
// 0x001f unused
- map(0x0020, 0x004f).rom(); // user PROM FIXME: banked with RAM
+ map(0x0020, 0x004f).rw(FUNC(m68hc705c8a_device::ram0_r), FUNC(m68hc705c8a_device::ram0_w)); // PROM/RAM
map(0x0050, 0x00ff).ram(); // RAM/stack
- map(0x0100, 0x015f).rom(); // user PROM FIXME: banked with RAM
+ map(0x0100, 0x015f).rw(FUNC(m68hc705c8a_device::ram1_r), FUNC(m68hc705c8a_device::ram1_w)); // PROM/RAM
map(0x0160, 0x1eff).rom(); // user PROM
map(0x1f00, 0x1fde).rom().region("bootstrap", 0x0000); // bootloader
- // 0x1fdf option register FIXME: controls banking
+ map(0x1fdf, 0x1fdf).lw8(NAME([this] (u8 data) { m_option = data; }));
map(0x1fe0, 0x1fef).rom().region("bootstrap", 0x00e0); // boot ROM vectors
map(0x1ff0, 0x1ff0).w(FUNC(m68hc705c8a_device::copr_w));
map(0x1ff0, 0x1fff).rom(); // user vectors
@@ -929,6 +930,7 @@ m68hc705c8a_device::m68hc705c8a_device(machine_config const &mconfig, char const
M68HC705C8A,
13,
address_map_constructor(FUNC(m68hc705c8a_device::c8a_map), this))
+ , m_rom(*this, DEVICE_SELF, 0x2000)
{
set_port_bits(std::array<u8, PORT_COUNT>{{ 0xff, 0xff, 0xff, 0xbf }});
}
@@ -948,6 +950,14 @@ void m68hc705c8a_device::device_start()
add_timer_state();
add_pcop_state();
add_ncop_state();
+
+ state_add(M68HC705C8A_OPTION, "OPTION", m_option).mask(0xff);
+
+ save_item(NAME(m_ram));
+ save_item(NAME(m_option));
+
+ // clear RAM
+ std::fill(std::begin(m_ram), std::end(m_ram), 0x00);
}
void m68hc705c8a_device::device_reset()
@@ -957,6 +967,9 @@ void m68hc705c8a_device::device_reset()
// latch MOR registers on reset
set_port_interrupt(std::array<u8, PORT_COUNT>{{ 0x00, u8(rdmem(0xfff0)), 0x00, 0x00 }});
set_ncope(BIT(rdmem(0xfff1), 0));
+
+ // RAM disabled, IRQ negative edge and level sensitive
+ m_option = 0x02;
}
@@ -966,6 +979,35 @@ std::unique_ptr<util::disasm_interface> m68hc705c8a_device::create_disassembler(
}
+READ8_MEMBER(m68hc705c8a_device::ram0_r)
+{
+ if (BIT(m_option, 7))
+ return offset >= 0x10 ? m_ram[offset - 0x10] : 0x00; // 20-2f reserved
+ else
+ return m_rom[0x20 + offset];
+}
+
+WRITE8_MEMBER(m68hc705c8a_device::ram0_w)
+{
+ if (BIT(m_option, 7) && offset >= 0x10)
+ m_ram[offset - 0x10] = data;
+}
+
+READ8_MEMBER(m68hc705c8a_device::ram1_r)
+{
+ if (BIT(m_option, 6))
+ return m_ram[0x20 + offset];
+ else
+ return m_rom[0x100 + offset];
+}
+
+WRITE8_MEMBER(m68hc705c8a_device::ram1_w)
+{
+ if (BIT(m_option, 6))
+ m_ram[0x20 + offset] = data;
+}
+
+
/****************************************************************************
* MC68HC05J1A device
diff --git a/src/devices/cpu/m6805/m68hc05.h b/src/devices/cpu/m6805/m68hc05.h
index e817d414314..ab3f3e06245 100644
--- a/src/devices/cpu/m6805/m68hc05.h
+++ b/src/devices/cpu/m6805/m68hc05.h
@@ -75,7 +75,9 @@ protected:
M68HC05_COPCR,
M68HC05_PCOP,
M68HC05_NCOPE,
- M68HC05_NCOP
+ M68HC05_NCOP,
+
+ M68HC705C8A_OPTION
};
enum { PORT_COUNT = 4 };
@@ -241,6 +243,17 @@ protected:
virtual void device_reset() override;
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+
+private:
+ required_region_ptr<u8> m_rom;
+
+ DECLARE_READ8_MEMBER(ram0_r);
+ DECLARE_WRITE8_MEMBER(ram0_w);
+ DECLARE_READ8_MEMBER(ram1_r);
+ DECLARE_WRITE8_MEMBER(ram1_w);
+
+ u8 m_ram[0x80];
+ u8 m_option;
};
diff --git a/src/devices/cpu/mcs48/mcs48.cpp b/src/devices/cpu/mcs48/mcs48.cpp
index b438dff57c4..a2a3fbf0bb1 100644
--- a/src/devices/cpu/mcs48/mcs48.cpp
+++ b/src/devices/cpu/mcs48/mcs48.cpp
@@ -1364,7 +1364,7 @@ void mcs48_cpu_device::execute_run()
read
-------------------------------------------------*/
-READ8_MEMBER( upi41_cpu_device::upi41_master_r )
+uint8_t upi41_cpu_device::upi41_master_r(offs_t offset)
{
/* if just reading the status, return it */
if ((offset & 1) != 0)
@@ -1409,7 +1409,7 @@ TIMER_CALLBACK_MEMBER( upi41_cpu_device::master_callback )
m_sts |= STS_F1;
}
-WRITE8_MEMBER( upi41_cpu_device::upi41_master_w )
+void upi41_cpu_device::upi41_master_w(offs_t offset, uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(upi41_cpu_device::master_callback), this), (offset << 8) | data);
}
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index 73f15090dae..8041d11a89d 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -622,8 +622,8 @@ class upi41_cpu_device : public mcs48_cpu_device
{
public:
/* functions for talking to the input/output buffers on the UPI41-class chips */
- DECLARE_READ8_MEMBER(upi41_master_r);
- DECLARE_WRITE8_MEMBER(upi41_master_w);
+ uint8_t upi41_master_r(offs_t offset);
+ void upi41_master_w(offs_t offset, uint8_t data);
protected:
// construction/destruction
diff --git a/src/devices/cpu/mcs96/i8x9x.cpp b/src/devices/cpu/mcs96/i8x9x.cpp
index 13ee6a874e6..f4aae129d3e 100644
--- a/src/devices/cpu/mcs96/i8x9x.cpp
+++ b/src/devices/cpu/mcs96/i8x9x.cpp
@@ -12,8 +12,8 @@
#include "i8x9x.h"
#include "i8x9xd.h"
-i8x9x_device::i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
- mcs96_device(mconfig, type, tag, owner, clock, 8, address_map_constructor(FUNC(i8x9x_device::internal_regs), this)),
+i8x9x_device::i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int data_width) :
+ mcs96_device(mconfig, type, tag, owner, clock, data_width, address_map_constructor(FUNC(i8x9x_device::internal_regs), this)),
m_ach_cb(*this),
m_hso_cb(*this),
m_serial_tx_cb(*this),
@@ -21,6 +21,7 @@ i8x9x_device::i8x9x_device(const machine_config &mconfig, device_type type, cons
m_out_p1_cb(*this), m_in_p1_cb(*this),
m_out_p2_cb(*this), m_in_p2_cb(*this),
base_timer2(0), ad_done(0), hsi_mode(0), hso_command(0), ad_command(0), hso_time(0), ad_result(0), pwm_control(0),
+ port1(0), port2(0),
ios0(0), ios1(0), ioc0(0), ioc1(0), sbuf(0), sp_con(0), sp_stat(0), serial_send_buf(0), serial_send_timer(0)
{
for (auto &hso : hso_info)
@@ -46,9 +47,9 @@ void i8x9x_device::device_resolve_objects()
m_serial_tx_cb.resolve_safe();
m_in_p0_cb.resolve_safe(0);
m_out_p1_cb.resolve_safe();
- m_in_p1_cb.resolve_safe(0);
+ m_in_p1_cb.resolve_safe(0xff);
m_out_p2_cb.resolve_safe();
- m_in_p2_cb.resolve_safe(0);
+ m_in_p2_cb.resolve_safe(0xc2);
}
void i8x9x_device::device_start()
@@ -67,6 +68,9 @@ void i8x9x_device::device_start()
state_add(I8X9X_SP_CON, "SP_CON", sp_con).mask(0x1f);
state_add(I8X9X_SP_STAT, "SP_STAT", sp_stat).mask(0xe0);
state_add(I8X9X_BAUD_RATE, "BAUD_RATE", baud_reg);
+ if (i8x9x_has_p1())
+ state_add<u8>(I8X9X_PORT1, "PORT1", [this]() -> u8 { return port1; }, [this](u8 data) { port1_w(data); });
+ state_add<u8>(I8X9X_PORT2, "PORT2", [this]() -> u8 { return port2; }, [this](u8 data) { port2_w(data); }).mask(i8x9x_p2_mask());
state_add(I8X9X_IOC0, "IOC0", ioc0).mask(0xfd);
state_add(I8X9X_IOC1, "IOC1", ioc1);
state_add(I8X9X_IOS0, "IOS0", ios0);
@@ -89,6 +93,8 @@ void i8x9x_device::device_start()
save_item(NAME(ad_command));
save_item(NAME(hso_time));
save_item(NAME(ad_result));
+ save_item(NAME(port1));
+ save_item(NAME(port2));
save_item(NAME(pwm_control));
save_item(NAME(ios0));
save_item(NAME(ios1));
@@ -112,6 +118,8 @@ void i8x9x_device::device_reset()
hso_command = 0;
hso_time = 0;
timer2_reset(total_cycles());
+ port1 = 0xff;
+ port2 = 0xc1 & i8x9x_p2_mask(); // P2.5 is cleared
ios0 = ios1 = 0x00;
ioc0 &= 0xaa;
ioc1 = (ioc1 & 0xae) | 0x01;
@@ -122,6 +130,8 @@ void i8x9x_device::device_reset()
sp_stat &= 0x80;
serial_send_timer = 0;
brh = false;
+ m_out_p1_cb(0xff);
+ m_out_p2_cb(0xc1);
m_hso_cb(0);
}
@@ -144,7 +154,9 @@ void i8x9x_device::commit_hso_cam()
void i8x9x_device::ad_start(u64 current_time)
{
ad_result = 8 | (ad_command & 7);
- if (m_ach_cb[ad_command & 7].isnull())
+ if (!BIT(i8x9x_p0_mask(), ad_command & 7))
+ logerror("Analog input on ACH%d does not exist on this device\n", ad_command & 7);
+ else if (m_ach_cb[ad_command & 7].isnull())
logerror("Analog input on ACH%d not configured\n", ad_command & 7);
else
ad_result |= m_ach_cb[ad_command & 7]() << 6;
@@ -286,29 +298,40 @@ u8 i8x9x_device::port0_r()
last = m_in_p0_cb();
logerror("read p0 %02x\n", last);
}
- return m_in_p0_cb();
+ return m_in_p0_cb() & i8x9x_p0_mask();
}
void i8x9x_device::port1_w(u8 data)
{
- logerror("io port 1 %02x (%04x)\n", data, PPC);
+ if (!i8x9x_has_p1())
+ {
+ logerror("%s: Write %02x to nonexistent port 1\n", machine().describe_context(), data);
+ return;
+ }
+
+ port1 = data;
m_out_p1_cb(data);
}
u8 i8x9x_device::port1_r()
{
- return m_in_p1_cb();
+ if (!i8x9x_has_p1())
+ return 0xff;
+
+ return m_in_p1_cb() & port1;
}
void i8x9x_device::port2_w(u8 data)
{
- logerror("io port 2 %02x (%04x)\n", data, PPC);
+ data &= 0xe1 & i8x9x_p2_mask();
+ port2 = data;
m_out_p2_cb(data);
}
u8 i8x9x_device::port2_r()
{
- return m_in_p2_cb();
+ // P2.0 and P2.5 are for output only (but can be read back despite what Intel claims?)
+ return (m_in_p2_cb() | 0x21 | ~i8x9x_p2_mask()) & (port2 | 0x1e);
}
void i8x9x_device::sp_con_w(u8 data)
@@ -491,17 +514,29 @@ void i8x9x_device::internal_update(u64 current_time)
recompute_bcount(event_time);
}
-c8095_device::c8095_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
- i8x9x_device(mconfig, C8095, tag, owner, clock)
+c8095_90_device::c8095_90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ i8x9x_device(mconfig, C8095_90, tag, owner, clock, 16)
+{
+}
+
+n8097bh_device::n8097bh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ i8x9x_device(mconfig, N8097BH, tag, owner, clock, 16)
{
}
p8098_device::p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
- i8x9x_device(mconfig, P8098, tag, owner, clock)
+ i8x9x_device(mconfig, P8098, tag, owner, clock, 8)
+{
+}
+
+p8798_device::p8798_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ i8x9x_device(mconfig, P8798, tag, owner, clock, 8)
{
}
-DEFINE_DEVICE_TYPE(C8095, c8095_device, "c8095", "Intel C8095")
+DEFINE_DEVICE_TYPE(C8095_90, c8095_90_device, "c8095_90", "Intel C8095-90")
+DEFINE_DEVICE_TYPE(N8097BH, n8097bh_device, "n8097bh", "Intel N8097BH")
DEFINE_DEVICE_TYPE(P8098, p8098_device, "p8098", "Intel P8098")
+DEFINE_DEVICE_TYPE(P8798, p8798_device, "p8798", "Intel P8798")
#include "cpu/mcs96/i8x9x.hxx"
diff --git a/src/devices/cpu/mcs96/i8x9x.h b/src/devices/cpu/mcs96/i8x9x.h
index 4d0c78252d8..d3ee1777ad4 100644
--- a/src/devices/cpu/mcs96/i8x9x.h
+++ b/src/devices/cpu/mcs96/i8x9x.h
@@ -21,6 +21,8 @@ public:
I8X9X_HSO_COMMAND,
I8X9X_AD_COMMAND,
I8X9X_AD_RESULT,
+ I8X9X_PORT1,
+ I8X9X_PORT2,
I8X9X_PWM_CONTROL,
I8X9X_SBUF_RX,
I8X9X_SBUF_TX,
@@ -52,8 +54,12 @@ public:
void serial_w(u8 val);
+ virtual u8 i8x9x_p0_mask() const noexcept { return 0xff; }
+ virtual bool i8x9x_has_p1() const noexcept { return true; }
+ virtual u8 i8x9x_p2_mask() const noexcept { return 0xff; }
+
protected:
- i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+ i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int data_width);
virtual void device_resolve_objects() override;
virtual void device_start() override;
@@ -129,6 +135,7 @@ private:
u8 hsi_mode, hso_command, ad_command;
u16 hso_time, ad_result;
u8 pwm_control;
+ u8 port1, port2;
u8 ios0, ios1, ioc0, ioc1;
u8 sbuf, sp_con, sp_stat;
u8 serial_send_buf;
@@ -147,17 +154,44 @@ private:
void serial_send_done();
};
-class c8095_device : public i8x9x_device {
+class c8095_90_device : public i8x9x_device {
public:
- c8095_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ c8095_90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ virtual u8 i8x9x_p0_mask() const noexcept override { return 0xf0; }
+ virtual bool i8x9x_has_p1() const noexcept override { return false; }
+ virtual u8 i8x9x_p2_mask() const noexcept override { return 0x27; }
+};
+
+class n8097bh_device : public i8x9x_device {
+public:
+ n8097bh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class p8098_device : public i8x9x_device {
public:
p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ virtual u8 i8x9x_p0_mask() const noexcept override { return 0xf0; }
+ virtual bool i8x9x_has_p1() const noexcept override { return false; }
+ virtual u8 i8x9x_p2_mask() const noexcept override { return 0x27; }
+};
+
+class p8798_device : public i8x9x_device {
+public:
+ p8798_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ virtual u8 i8x9x_p0_mask() const noexcept override { return 0xf0; }
+ virtual bool i8x9x_has_p1() const noexcept override { return false; }
+ virtual u8 i8x9x_p2_mask() const noexcept override { return 0x27; }
};
-DECLARE_DEVICE_TYPE(C8095, c8095_device)
+DECLARE_DEVICE_TYPE(C8095_90, c8095_90_device)
+DECLARE_DEVICE_TYPE(N8097BH, n8097bh_device)
DECLARE_DEVICE_TYPE(P8098, p8098_device)
+DECLARE_DEVICE_TYPE(P8798, p8798_device)
#endif // MAME_CPU_MCS96_I8X9X_H
diff --git a/src/devices/cpu/mcs96/mcs96d.cpp b/src/devices/cpu/mcs96/mcs96d.cpp
index aebb4939552..9bf281fab7b 100644
--- a/src/devices/cpu/mcs96/mcs96d.cpp
+++ b/src/devices/cpu/mcs96/mcs96d.cpp
@@ -24,7 +24,7 @@ std::string mcs96_disassembler::regname8(uint8_t reg, bool is_dest) const
{
switch(reg) {
case 0x00:
- return "r0";
+ return "0";
case 0x08:
return "int_mask";
@@ -65,7 +65,7 @@ std::string mcs96_disassembler::regname16(uint8_t reg, bool is_dest) const
{
switch(reg) {
case 0x00:
- return "r0";
+ return "0";
case 0x18:
return "sp";
diff --git a/src/devices/cpu/minx/minx.cpp b/src/devices/cpu/minx/minx.cpp
index a78ee20a92c..dcf11c24f25 100644
--- a/src/devices/cpu/minx/minx.cpp
+++ b/src/devices/cpu/minx/minx.cpp
@@ -41,6 +41,7 @@ TODO:
- Add support for O and C flags in NEG8 instruction
- Verify MUL (CE D8) and DIV (CE D9)
- Doublecheck behaviour of CMPN instructions ( CF 60 .. CF 63 )
+- DIV (CE D9) division by zero handling - is supposed to raise a EX4 exception. A real Pokemini unit will freeze. MAME currently will crash.
*/
diff --git a/src/devices/cpu/minx/minxd.cpp b/src/devices/cpu/minx/minxd.cpp
index 413f588369f..21fd398c782 100644
--- a/src/devices/cpu/minx/minxd.cpp
+++ b/src/devices/cpu/minx/minxd.cpp
@@ -317,13 +317,13 @@ case I_16: /* 16 bit immediate */ \
break; \
case D_8: /* PC + 8 bit displacement (signed) */ \
ofs8 = opcodes.r8(pos++); \
- util::stream_format(stream, "%c$%04X", fill, pc + pos - 1 + ofs8); \
+ util::stream_format(stream, "%c$%04X", fill, pos - 1 + ofs8); \
break; \
case D_16: /* PC + 16 bit displacement */ \
ea = opcodes.r8(pos++); \
ea += opcodes.r8(pos++) << 8; \
ea = ea - 1; \
- util::stream_format(stream, "%c$%04X", fill, pc + pos + ea); \
+ util::stream_format(stream, "%c$%04X", fill, pos + ea); \
break; \
case S_8: /* SP + 8 bit displacement (signed) */ \
ea = opcodes.r8(pos++); \
diff --git a/src/devices/cpu/minx/minxopce.h b/src/devices/cpu/minx/minxopce.h
index 2d44decf802..ee322d668cb 100644
--- a/src/devices/cpu/minx/minxopce.h
+++ b/src/devices/cpu/minx/minxopce.h
@@ -367,7 +367,7 @@ void minx_cpu_device::execute_one_ce()
break;
case 0xAE: { /* HALT */ m_halted = 1; }
break;
- case 0xAF: { }
+ case 0xAF: { /* STOP */ }
break;
case 0xB0: { m_BA = ( m_BA & 0x00FF ) | ( AND8( ( m_BA >> 8 ), rdop() ) << 8 ); }
diff --git a/src/devices/cpu/mn10200/mn10200.cpp b/src/devices/cpu/mn10200/mn10200.cpp
index d7ff4aa0f99..0f989d9844b 100644
--- a/src/devices/cpu/mn10200/mn10200.cpp
+++ b/src/devices/cpu/mn10200/mn10200.cpp
@@ -1706,7 +1706,7 @@ void mn10200_device::execute_run()
// internal i/o
//-------------------------------------------------
-WRITE8_MEMBER(mn10200_device::io_control_w)
+void mn10200_device::io_control_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -2109,7 +2109,7 @@ WRITE8_MEMBER(mn10200_device::io_control_w)
}
-READ8_MEMBER(mn10200_device::io_control_r)
+uint8_t mn10200_device::io_control_r(offs_t offset)
{
switch (offset)
{
diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h
index 46da9171f21..8ea31fa1d4b 100644
--- a/src/devices/cpu/mn10200/mn10200.h
+++ b/src/devices/cpu/mn10200/mn10200.h
@@ -40,8 +40,8 @@ public:
template <std::size_t Port> auto read_port() { return m_read_port[Port].bind(); }
template <std::size_t Port> auto write_port() { return m_write_port[Port].bind(); }
- DECLARE_READ8_MEMBER(io_control_r);
- DECLARE_WRITE8_MEMBER(io_control_w);
+ uint8_t io_control_r(offs_t offset);
+ void io_control_w(offs_t offset, uint8_t data);
void mn1020012a_internal_map(address_map &map);
protected:
diff --git a/src/devices/cpu/pic16/pic16d.cpp b/src/devices/cpu/pic16/pic16d.cpp
new file mode 100644
index 00000000000..281c4a69379
--- /dev/null
+++ b/src/devices/cpu/pic16/pic16d.cpp
@@ -0,0 +1,181 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// PIC16 generic disassembler, with extended opcodes
+
+#include "emu.h"
+#include "pic16d.h"
+
+u32 pic16_disassembler::opcode_alignment() const
+{
+ return 1;
+}
+
+char pic16_disassembler::fw(u16 opcode)
+{
+ return opcode & 0x80 ? 'f' : 'w';
+}
+
+std::string pic16_disassembler::freg(u16 opcode) const
+{
+ return util::string_format("f_%02x", opcode & 0x7f);
+}
+
+std::string pic16_disassembler::imm8(u16 opcode)
+{
+ if((opcode & 0xff) < 10)
+ return util::string_format("%d", opcode & 0xff);
+ else
+ return util::string_format("'h'%02x", opcode & 0xff);
+}
+
+std::string pic16_disassembler::imm7(u16 opcode)
+{
+ if((opcode & 0x7f) < 10)
+ return util::string_format("%d", opcode & 0x7f);
+ else
+ return util::string_format("'h'%02x", opcode & 0x7f);
+}
+
+std::string pic16_disassembler::imm6(u16 opcode)
+{
+ if((opcode & 0x3f) < 10)
+ return util::string_format("%d", opcode & 0x3f);
+ else
+ return util::string_format("'h'%02x", opcode & 0x3f);
+}
+
+std::string pic16_disassembler::imm6s(u16 opcode)
+{
+ if(opcode & 0x20) {
+ u16 a = (-opcode) & 0x1f;
+ if(a < 10)
+ return util::string_format("-%d", a);
+ else
+ return util::string_format("-%02x", a);
+ } else {
+ u16 a = opcode & 0x1f;
+ if(a < 10)
+ return util::string_format("%d", a);
+ else
+ return util::string_format("'h'%02x", a);
+ }
+}
+
+std::string pic16_disassembler::imm5(u16 opcode)
+{
+ if((opcode & 0x1f) < 10)
+ return util::string_format("%d", opcode & 0x1f);
+ else
+ return util::string_format("%02x", opcode & 0x1f);
+}
+
+std::string pic16_disassembler::rel9(u16 opcode, u16 pc)
+{
+ u16 off = opcode & 0x1ff;
+ if(off & 0x100)
+ off -= 0x200;
+ return util::string_format("%04x", (pc + off + 1) & 0x7fff);
+}
+
+std::string pic16_disassembler::abs11(u16 opcode, u16 pc) const
+{
+ return util::string_format("%04x", (pc & 0x7800) | (opcode & 0x7ff));
+}
+
+#define P std::ostream &stream, const pic16_disassembler *d, u16 opcode, u16 pc
+const pic16_disassembler::instruction pic16_disassembler::instructions[] {
+ { 0x0700, 0x3f00, [](P) -> u32 { util::stream_format(stream, "addwf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x3d00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "addwfc %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0500, 0x3f00, [](P) -> u32 { util::stream_format(stream, "andwf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x3700, 0x3f00, [](P) -> u32 { util::stream_format(stream, "asrf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x3500, 0x3f00, [](P) -> u32 { util::stream_format(stream, "lslf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x3600, 0x3f00, [](P) -> u32 { util::stream_format(stream, "lsrf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0180, 0x3f80, [](P) -> u32 { util::stream_format(stream, "clrf %s", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0100, 0x3ffc, [](P) -> u32 { util::stream_format(stream, "clrw" ); return 1; } },
+ { 0x0900, 0x3f00, [](P) -> u32 { util::stream_format(stream, "comf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0300, 0x3f00, [](P) -> u32 { util::stream_format(stream, "decf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0a00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "incf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0400, 0x3f00, [](P) -> u32 { util::stream_format(stream, "iorwf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0800, 0x3f00, [](P) -> u32 { util::stream_format(stream, "movf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0080, 0x3f80, [](P) -> u32 { util::stream_format(stream, "movwf %s", d->freg(opcode) ); return 1; } },
+ { 0x0d00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "rlf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0c00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "rrf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0200, 0x3f00, [](P) -> u32 { util::stream_format(stream, "subwf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x3b00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "subwfb %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0e00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "swapf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0600, 0x3f00, [](P) -> u32 { util::stream_format(stream, "xorwf %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+
+ { 0x0b00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "decfsz %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+ { 0x0f00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "incfsz %s, %c", d->freg(opcode), fw(opcode)); return 1; } },
+
+ { 0x1000, 0x3c00, [](P) -> u32 { util::stream_format(stream, "bcf %d, %s", (opcode >> 7) & 7, d->freg(opcode)); return 1; } },
+ { 0x1400, 0x3c00, [](P) -> u32 { util::stream_format(stream, "bsf %d, %s", (opcode >> 7) & 7, d->freg(opcode)); return 1; } },
+
+ { 0x1800, 0x3c00, [](P) -> u32 { util::stream_format(stream, "btfsc %d, %s", (opcode >> 7) & 7, d->freg(opcode)); return 1; } },
+ { 0x1c00, 0x3c00, [](P) -> u32 { util::stream_format(stream, "btfss %d, %s", (opcode >> 7) & 7, d->freg(opcode)); return 1; } },
+
+ { 0x3e00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "addlw %s", imm8(opcode)); return 1; } },
+ { 0x3900, 0x3f00, [](P) -> u32 { util::stream_format(stream, "andlw %s", imm8(opcode)); return 1; } },
+ { 0x3800, 0x3f00, [](P) -> u32 { util::stream_format(stream, "iorlw %s", imm8(opcode)); return 1; } },
+ { 0x0020, 0x3fe0, [](P) -> u32 { util::stream_format(stream, "movlb %s", imm5(opcode)); return 1; } },
+ { 0x3180, 0x3f80, [](P) -> u32 { util::stream_format(stream, "movlp %s", imm7(opcode)); return 1; } },
+ { 0x3000, 0x3f00, [](P) -> u32 { util::stream_format(stream, "movlw %s", imm8(opcode)); return 1; } },
+ { 0x3c00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "sublw %s", imm8(opcode)); return 1; } },
+ { 0x3a00, 0x3f00, [](P) -> u32 { util::stream_format(stream, "xorlw %s", imm8(opcode)); return 1; } },
+
+ { 0x3200, 0x3e00, [](P) -> u32 { util::stream_format(stream, "bra %s", rel9(opcode, pc) ); return 1; } },
+ { 0x000b, 0x3fff, [](P) -> u32 { util::stream_format(stream, "brw" ); return 1; } },
+ { 0x2000, 0x3800, [](P) -> u32 { util::stream_format(stream, "call %s", d->abs11(opcode, pc)); return 1 | STEP_OVER; } },
+ { 0x000a, 0x3fff, [](P) -> u32 { util::stream_format(stream, "callw" ); return 1 | STEP_OVER; } },
+ { 0x2800, 0x3800, [](P) -> u32 { util::stream_format(stream, "goto %s", d->abs11(opcode, pc)); return 1; } },
+ { 0x0009, 0x3fff, [](P) -> u32 { util::stream_format(stream, "retfie" ); return 1 | STEP_OUT; } },
+ { 0x3400, 0x3f00, [](P) -> u32 { util::stream_format(stream, "retlw %s", imm8(opcode) ); return 1 | STEP_OUT; } },
+ { 0x0008, 0x3fff, [](P) -> u32 { util::stream_format(stream, "return" ); return 1 | STEP_OUT; } },
+
+ { 0x0064, 0x3fff, [](P) -> u32 { util::stream_format(stream, "clrwdt" ); return 1; } },
+ { 0x0000, 0x3fff, [](P) -> u32 { util::stream_format(stream, "nop" ); return 1; } },
+ { 0x0062, 0x3fff, [](P) -> u32 { util::stream_format(stream, "option" ); return 1; } },
+ { 0x0001, 0x3fff, [](P) -> u32 { util::stream_format(stream, "reset" ); return 1; } },
+ { 0x0063, 0x3fff, [](P) -> u32 { util::stream_format(stream, "sleep" ); return 1; } },
+ { 0x0065, 0x3fff, [](P) -> u32 { util::stream_format(stream, "tris a" ); return 1; } },
+ { 0x0066, 0x3fff, [](P) -> u32 { util::stream_format(stream, "tris b" ); return 1; } },
+ { 0x0067, 0x3fff, [](P) -> u32 { util::stream_format(stream, "tris c" ); return 1; } },
+
+ { 0x3100, 0x3fc0, [](P) -> u32 { util::stream_format(stream, "addfsr fsr0, %s", imm6(opcode)); return 1; } },
+ { 0x3140, 0x3fc0, [](P) -> u32 { util::stream_format(stream, "addfsr fsr1, %s", imm6(opcode)); return 1; } },
+ { 0x0010, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw ++fsr0" ); return 1; } },
+ { 0x0011, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw --fsr0" ); return 1; } },
+ { 0x0012, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw fsr0++" ); return 1; } },
+ { 0x0013, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw fsr0--" ); return 1; } },
+ { 0x0014, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw ++fsr1" ); return 1; } },
+ { 0x0015, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw --fsr1" ); return 1; } },
+ { 0x0016, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw fsr1++" ); return 1; } },
+ { 0x0017, 0xffff, [](P) -> u32 { util::stream_format(stream, "moviw fsr1--" ); return 1; } },
+ { 0x3f00, 0xffc0, [](P) -> u32 { util::stream_format(stream, "moviw %s[fsr0]", imm6s(opcode)); return 1; } },
+ { 0x3f40, 0xffc0, [](P) -> u32 { util::stream_format(stream, "moviw %s[fsr1]", imm6s(opcode)); return 1; } },
+ { 0x0018, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi ++fsr0" ); return 1; } },
+ { 0x0019, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi --fsr0" ); return 1; } },
+ { 0x001a, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi fsr0++" ); return 1; } },
+ { 0x001b, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi fsr0--" ); return 1; } },
+ { 0x001c, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi ++fsr1" ); return 1; } },
+ { 0x001d, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi --fsr1" ); return 1; } },
+ { 0x001e, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi fsr1++" ); return 1; } },
+ { 0x001f, 0xffff, [](P) -> u32 { util::stream_format(stream, "movwi fsr1--" ); return 1; } },
+ { 0x3f80, 0xffc0, [](P) -> u32 { util::stream_format(stream, "movwi %s[fsr0]", imm6s(opcode)); return 1; } },
+ { 0x3fc0, 0xffc0, [](P) -> u32 { util::stream_format(stream, "movwi %s[fsr1]", imm6s(opcode)); return 1; } },
+
+ { 0x0000, 0x0000, [](P) -> u32 { util::stream_format(stream, "?%04x", opcode); return 1; } },
+};
+
+#undef P
+
+offs_t pic16_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
+{
+ u16 opcode = opcodes.r16(pc);
+
+ for(u32 i=0;; i++)
+ if((opcode & instructions[i].mask) == instructions[i].value)
+ return instructions[i].cb(stream, this, opcode, pc) | SUPPORTED;
+ return 0;
+}
diff --git a/src/devices/cpu/pic16/pic16d.h b/src/devices/cpu/pic16/pic16d.h
new file mode 100644
index 00000000000..8ebde81740c
--- /dev/null
+++ b/src/devices/cpu/pic16/pic16d.h
@@ -0,0 +1,40 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// PIC16 generic disassembler, with extended opcodes
+
+#ifndef MAME_CPU_PIC16_PIC16D_H
+#define MAME_CPU_PIC16_PIC16D_H
+
+#pragma once
+
+class pic16_disassembler : public util::disasm_interface
+{
+public:
+ pic16_disassembler() = default;
+ virtual ~pic16_disassembler() = default;
+
+ virtual u32 opcode_alignment() const override;
+ virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
+
+private:
+ struct instruction {
+ u16 value;
+ u16 mask;
+ u32 (*cb)(std::ostream &, const pic16_disassembler *, u16, u16);
+ };
+
+ static const instruction instructions[];
+
+ std::string freg(u16 opcode) const;
+ static char fw(u16 opcode);
+ static std::string imm8(u16 opcode);
+ static std::string imm7(u16 opcode);
+ static std::string imm6(u16 opcode);
+ static std::string imm6s(u16 opcode);
+ static std::string imm5(u16 opcode);
+ static std::string rel9(u16 opcode, u16 pc);
+ std::string abs11(u16 opcode, u16 pc) const;
+};
+
+#endif // MAME_CPU_PIC16_PIC16D_H
diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h
index 3924125b805..8714fb570aa 100644
--- a/src/devices/cpu/powerpc/ppc.h
+++ b/src/devices/cpu/powerpc/ppc.h
@@ -757,8 +757,8 @@ public:
void ppc4xx_set_dcr_read_handler(read32_delegate dcr_read_func);
void ppc4xx_set_dcr_write_handler(write32_delegate dcr_write_func);
- DECLARE_READ8_MEMBER( ppc4xx_spu_r );
- DECLARE_WRITE8_MEMBER( ppc4xx_spu_w );
+ uint8_t ppc4xx_spu_r(offs_t offset);
+ void ppc4xx_spu_w(offs_t offset, uint8_t data);
void internal_ppc4xx(address_map &map);
protected:
diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp
index 10133d73a01..aaf40f8acac 100644
--- a/src/devices/cpu/powerpc/ppccom.cpp
+++ b/src/devices/cpu/powerpc/ppccom.cpp
@@ -2772,7 +2772,7 @@ updateirq:
ppc4xx_spu_r - serial port read handler
-------------------------------------------------*/
-READ8_MEMBER( ppc4xx_device::ppc4xx_spu_r )
+uint8_t ppc4xx_device::ppc4xx_spu_r(offs_t offset)
{
uint8_t result = 0xff;
@@ -2798,7 +2798,7 @@ READ8_MEMBER( ppc4xx_device::ppc4xx_spu_r )
ppc4xx_spu_w - serial port write handler
-------------------------------------------------*/
-WRITE8_MEMBER( ppc4xx_device::ppc4xx_spu_w )
+void ppc4xx_device::ppc4xx_spu_w(offs_t offset, uint8_t data)
{
uint8_t oldstate, newstate;
diff --git a/src/devices/cpu/s2650/s2650.cpp b/src/devices/cpu/s2650/s2650.cpp
index 8ef7be2a0ad..9e36a1c8ae1 100644
--- a/src/devices/cpu/s2650/s2650.cpp
+++ b/src/devices/cpu/s2650/s2650.cpp
@@ -209,17 +209,15 @@ inline int s2650_device::check_irq_line()
{
if( (m_psu & II) == 0 )
{
- int vector;
if (m_halt)
{
m_halt = 0;
m_iar = (m_iar + 1) & PMSK;
}
- vector = standard_irq_callback(0) & 0xff;
+ standard_irq_callback(0);
/* Say hi */
- m_intack_handler(true);
-
+ int vector = m_intack_handler();
/* build effective address within first 8K page */
m_ea = S2650_relative[vector] & PMSK;
if (vector & 0x80) /* indirect bit set ? */
@@ -824,7 +822,7 @@ void s2650_device::device_start()
{
m_sense_handler.resolve();
m_flag_handler.resolve_safe();
- m_intack_handler.resolve_safe();
+ m_intack_handler.resolve_safe(0x00);
m_cache = space(AS_PROGRAM).cache<0, 0, ENDIANNESS_BIG>();
diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h
index af883c740a3..1bd42fa535c 100644
--- a/src/devices/cpu/s2650/s2650.h
+++ b/src/devices/cpu/s2650/s2650.h
@@ -68,7 +68,7 @@ private:
devcb_read_line m_sense_handler;
devcb_write_line m_flag_handler;
- devcb_write_line m_intack_handler;
+ devcb_read8 m_intack_handler;
uint16_t m_ppc; /* previous program counter (page + iar) */
uint16_t m_page; /* 8K page select register (A14..A13) */
diff --git a/src/devices/cpu/sh/sh7604_sci.cpp b/src/devices/cpu/sh/sh7604_sci.cpp
index 47b60dd8161..5d49eab5c31 100644
--- a/src/devices/cpu/sh/sh7604_sci.cpp
+++ b/src/devices/cpu/sh/sh7604_sci.cpp
@@ -29,12 +29,12 @@ DEFINE_DEVICE_TYPE(SH7604_SCI, sh7604_sci_device, "sh7604sci", "SH7604 SCI Contr
// LIVE DEVICE
//**************************************************************************
-READ8_MEMBER(sh7604_sci_device::serial_mode_r)
+uint8_t sh7604_sci_device::serial_mode_r()
{
return m_smr;
}
-WRITE8_MEMBER(sh7604_sci_device::serial_mode_w)
+void sh7604_sci_device::serial_mode_w(uint8_t data)
{
m_smr = data;
@@ -48,12 +48,12 @@ WRITE8_MEMBER(sh7604_sci_device::serial_mode_w)
logerror("\tClock select: clock/%d\n",4 << ((data & 0x03)*2));
}
-READ8_MEMBER(sh7604_sci_device::serial_control_r)
+uint8_t sh7604_sci_device::serial_control_r()
{
return m_scr;
}
-WRITE8_MEMBER(sh7604_sci_device::serial_control_w)
+void sh7604_sci_device::serial_control_w(uint8_t data)
{
m_scr = data;
@@ -61,39 +61,39 @@ WRITE8_MEMBER(sh7604_sci_device::serial_control_w)
throw emu_fatalerror("%s: enabled serial control %02x\n", tag(),data);
}
-READ8_MEMBER(sh7604_sci_device::serial_status_r)
+uint8_t sh7604_sci_device::serial_status_r()
{
return m_ssr;
}
-WRITE8_MEMBER(sh7604_sci_device::serial_ack_w)
+void sh7604_sci_device::serial_ack_w(uint8_t data)
{
// TODO: verify this
m_ssr = (m_ssr & 0x06) | (m_ssr & data & 0xf9);
}
-READ8_MEMBER(sh7604_sci_device::bitrate_r )
+uint8_t sh7604_sci_device::bitrate_r()
{
return m_brr;
}
-WRITE8_MEMBER(sh7604_sci_device::bitrate_w )
+void sh7604_sci_device::bitrate_w(uint8_t data)
{
m_brr = data;
}
-READ8_MEMBER(sh7604_sci_device::transmit_data_r)
+uint8_t sh7604_sci_device::transmit_data_r()
{
// ...
return 0;
}
-WRITE8_MEMBER(sh7604_sci_device::transmit_data_w)
+void sh7604_sci_device::transmit_data_w(uint8_t data)
{
// ...
}
-READ8_MEMBER(sh7604_sci_device::receive_data_r)
+uint8_t sh7604_sci_device::receive_data_r()
{
// ...
return 0;
@@ -146,12 +146,12 @@ void sh7604_sci_device::device_reset()
// READ/WRITE HANDLERS
//**************************************************************************
-READ8_MEMBER( sh7604_sci_device::read )
+uint8_t sh7604_sci_device::read(address_space &space, offs_t offset)
{
return space.read_byte(offset);
}
-WRITE8_MEMBER( sh7604_sci_device::write )
+void sh7604_sci_device::write(address_space &space, offs_t offset, uint8_t data)
{
space.write_byte(offset,data);
}
diff --git a/src/devices/cpu/sh/sh7604_sci.h b/src/devices/cpu/sh/sh7604_sci.h
index a4f12da1275..b77630db074 100644
--- a/src/devices/cpu/sh/sh7604_sci.h
+++ b/src/devices/cpu/sh/sh7604_sci.h
@@ -28,21 +28,21 @@ public:
// I/O operations
void sci_regs(address_map &map);
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
-
- DECLARE_READ8_MEMBER( serial_mode_r );
- DECLARE_WRITE8_MEMBER( serial_mode_w );
- DECLARE_READ8_MEMBER( bitrate_r );
- DECLARE_WRITE8_MEMBER( bitrate_w );
- DECLARE_READ8_MEMBER( serial_control_r );
- DECLARE_WRITE8_MEMBER( serial_control_w );
-
- DECLARE_READ8_MEMBER( transmit_data_r );
- DECLARE_WRITE8_MEMBER( transmit_data_w );
- DECLARE_READ8_MEMBER( serial_status_r );
- DECLARE_WRITE8_MEMBER( serial_ack_w );
- DECLARE_READ8_MEMBER( receive_data_r );
+ void write(address_space &space, offs_t offset, uint8_t data);
+ uint8_t read(address_space &space, offs_t offset);
+
+ uint8_t serial_mode_r();
+ void serial_mode_w(uint8_t data);
+ uint8_t bitrate_r();
+ void bitrate_w(uint8_t data);
+ uint8_t serial_control_r();
+ void serial_control_w(uint8_t data);
+
+ uint8_t transmit_data_r();
+ void transmit_data_w(uint8_t data);
+ uint8_t serial_status_r();
+ void serial_ack_w(uint8_t data);
+ uint8_t receive_data_r();
protected:
enum {
diff --git a/src/devices/cpu/spc700/spc700.cpp b/src/devices/cpu/spc700/spc700.cpp
index 57d2b5c5df8..7f5a35d6757 100644
--- a/src/devices/cpu/spc700/spc700.cpp
+++ b/src/devices/cpu/spc700/spc700.cpp
@@ -222,8 +222,13 @@ DEFINE_DEVICE_TYPE(SPC700, spc700_device, "spc700", "Sony SPC700")
spc700_device::spc700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : cpu_device(mconfig, SPC700, tag, owner, clock)
- , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0)
+ : spc700_device(mconfig, SPC700, tag, owner, clock)
+{
+}
+
+spc700_device::spc700_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map)
+ : cpu_device(mconfig, type, tag, owner, clock)
+ , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, internal_map)
, m_a(0)
, m_x(0)
, m_y(0)
diff --git a/src/devices/cpu/spc700/spc700.h b/src/devices/cpu/spc700/spc700.h
index bd1b90c475e..33e3190ac10 100644
--- a/src/devices/cpu/spc700/spc700.h
+++ b/src/devices/cpu/spc700/spc700.h
@@ -13,6 +13,9 @@ public:
spc700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
+ // construction/destruction
+ spc700_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map = address_map_constructor());
+
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
@@ -36,9 +39,8 @@ protected:
// device_disasm_interface overrides
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
-private:
address_space_config m_program_config;
-
+private:
uint32_t m_a; /* Accumulator */
uint32_t m_x; /* Index Register X */
uint32_t m_y; /* Index Register Y */
diff --git a/src/devices/cpu/st62xx/st62xx.cpp b/src/devices/cpu/st62xx/st62xx.cpp
index d79772cc1c7..d475ef0048e 100644
--- a/src/devices/cpu/st62xx/st62xx.cpp
+++ b/src/devices/cpu/st62xx/st62xx.cpp
@@ -252,7 +252,7 @@ void st6228_device::update_port_mode(uint8_t index, uint8_t changed)
}
}
-WRITE8_MEMBER(st6228_device::regs_w)
+void st6228_device::regs_w(offs_t offset, uint8_t data)
{
offset += 0x80;
@@ -365,7 +365,7 @@ WRITE8_MEMBER(st6228_device::regs_w)
}
}
-READ8_MEMBER(st6228_device::regs_r)
+uint8_t st6228_device::regs_r(offs_t offset)
{
uint8_t ret = 0;
offset += 0x80;
diff --git a/src/devices/cpu/st62xx/st62xx.h b/src/devices/cpu/st62xx/st62xx.h
index 16c0df01a72..680dd802161 100644
--- a/src/devices/cpu/st62xx/st62xx.h
+++ b/src/devices/cpu/st62xx/st62xx.h
@@ -108,8 +108,8 @@ protected:
void update_port_mode(uint8_t index, uint8_t changed);
void set_port_output_bit(uint8_t index, uint8_t bit, uint8_t state);
- DECLARE_WRITE8_MEMBER(regs_w);
- DECLARE_READ8_MEMBER(regs_r);
+ void regs_w(offs_t offset, uint8_t data);
+ uint8_t regs_r(offs_t offset);
enum
{
diff --git a/src/devices/cpu/tlcs870/tlcs870.cpp b/src/devices/cpu/tlcs870/tlcs870.cpp
index 608ca4dd76b..2766804a50a 100644
--- a/src/devices/cpu/tlcs870/tlcs870.cpp
+++ b/src/devices/cpu/tlcs870/tlcs870.cpp
@@ -138,7 +138,7 @@ bool tlcs870_device::stream_arg(std::ostream &stream, uint32_t pc, const char *p
}
// NOT using templates here because there are subtle differences in the port behavior (the ports are multi-purpose) that still need implementing
-READ8_MEMBER(tlcs870_device::port0_r)
+uint8_t tlcs870_device::port0_r()
{
// need to use P0CR (0x000a) to control direction
@@ -148,7 +148,7 @@ READ8_MEMBER(tlcs870_device::port0_r)
return m_port_out_latch[0];
}
-READ8_MEMBER(tlcs870_device::port1_r)
+uint8_t tlcs870_device::port1_r()
{
// need to use P1CR (0x000b) to control direction
@@ -158,7 +158,7 @@ READ8_MEMBER(tlcs870_device::port1_r)
return m_port_out_latch[1];
}
-READ8_MEMBER(tlcs870_device::port2_r) // 3-bit port
+uint8_t tlcs870_device::port2_r() // 3-bit port
{
if (m_read_input_port)
return m_port_in_cb[2]() | 0xf8;
@@ -166,7 +166,7 @@ READ8_MEMBER(tlcs870_device::port2_r) // 3-bit port
return m_port_out_latch[2];
}
-READ8_MEMBER(tlcs870_device::port3_r)
+uint8_t tlcs870_device::port3_r()
{
if (m_read_input_port)
return m_port_in_cb[3]();
@@ -174,7 +174,7 @@ READ8_MEMBER(tlcs870_device::port3_r)
return m_port_out_latch[3];
}
-READ8_MEMBER(tlcs870_device::port4_r)
+uint8_t tlcs870_device::port4_r()
{
if (m_read_input_port)
return m_port_in_cb[4]();
@@ -182,7 +182,7 @@ READ8_MEMBER(tlcs870_device::port4_r)
return m_port_out_latch[4];
}
-READ8_MEMBER(tlcs870_device::port5_r) // 5-bit port
+uint8_t tlcs870_device::port5_r() // 5-bit port
{
if (m_read_input_port)
return m_port_in_cb[5]() | 0xe0;
@@ -190,7 +190,7 @@ READ8_MEMBER(tlcs870_device::port5_r) // 5-bit port
return m_port_out_latch[5];
}
-READ8_MEMBER(tlcs870_device::port6_r) // doubles up as analog?
+uint8_t tlcs870_device::port6_r() // doubles up as analog?
{
// need to use P6CR (0x000c) to control direction
@@ -200,7 +200,7 @@ READ8_MEMBER(tlcs870_device::port6_r) // doubles up as analog?
return m_port_out_latch[6];
}
-READ8_MEMBER(tlcs870_device::port7_r)
+uint8_t tlcs870_device::port7_r()
{
// need to use P7CR (0x000d) to control direction
@@ -210,70 +210,70 @@ READ8_MEMBER(tlcs870_device::port7_r)
return m_port_out_latch[7];
}
-WRITE8_MEMBER(tlcs870_device::port0_w)
+void tlcs870_device::port0_w(uint8_t data)
{
m_port_out_latch[0] = data;
m_port_out_cb[0](data);
}
-WRITE8_MEMBER(tlcs870_device::port1_w)
+void tlcs870_device::port1_w(uint8_t data)
{
m_port_out_latch[1] = data;
m_port_out_cb[1](data);
}
-WRITE8_MEMBER(tlcs870_device::port2_w)
+void tlcs870_device::port2_w(uint8_t data)
{
m_port_out_latch[2] = data;
m_port_out_cb[2](data);
}
-WRITE8_MEMBER(tlcs870_device::port3_w)
+void tlcs870_device::port3_w(uint8_t data)
{
m_port_out_latch[3] = data;
m_port_out_cb[3](data);
}
-WRITE8_MEMBER(tlcs870_device::port4_w)
+void tlcs870_device::port4_w(uint8_t data)
{
m_port_out_latch[4] = data;
m_port_out_cb[4](data);
}
-WRITE8_MEMBER(tlcs870_device::port5_w)
+void tlcs870_device::port5_w(uint8_t data)
{
m_port_out_latch[5] = data;
m_port_out_cb[5](data);
}
-WRITE8_MEMBER(tlcs870_device::port6_w)
+void tlcs870_device::port6_w(uint8_t data)
{
m_port_out_latch[6] = data;
m_port_out_cb[6](data);
}
-WRITE8_MEMBER(tlcs870_device::port7_w)
+void tlcs870_device::port7_w(uint8_t data)
{
m_port_out_latch[7] = data;
m_port_out_cb[7](data);
}
-WRITE8_MEMBER(tlcs870_device::p0cr_w)
+void tlcs870_device::p0cr_w(uint8_t data)
{
m_port0_cr = data;
}
-WRITE8_MEMBER(tlcs870_device::p1cr_w)
+void tlcs870_device::p1cr_w(uint8_t data)
{
m_port1_cr = data;
}
-WRITE8_MEMBER(tlcs870_device::p6cr_w)
+void tlcs870_device::p6cr_w(uint8_t data)
{
m_port6_cr = data;
}
-WRITE8_MEMBER(tlcs870_device::p7cr_w)
+void tlcs870_device::p7cr_w(uint8_t data)
{
m_port7_cr = data;
}
@@ -287,7 +287,7 @@ TIMER_CALLBACK_MEMBER(tlcs870_device::tc1_cb)
}
-WRITE8_MEMBER(tlcs870_device::tc1cr_w)
+void tlcs870_device::tc1cr_w(uint8_t data)
{
m_TC1CR = data;
@@ -302,32 +302,32 @@ WRITE8_MEMBER(tlcs870_device::tc1cr_w)
LOG("%d: TC1M-0 (TC1 Mode Select)\n", (m_TC1CR & 0x01) ? 1 : 0);
}
-WRITE8_MEMBER(tlcs870_device::treg1a_l_w)
+void tlcs870_device::treg1a_l_w(uint8_t data)
{
m_TREG1A = (m_TREG1A & 0xff00) | data;
}
-WRITE8_MEMBER(tlcs870_device::treg1a_h_w)
+void tlcs870_device::treg1a_h_w(uint8_t data)
{
m_TREG1A = (m_TREG1A & 0x00ff) | (data << 8);
}
-WRITE8_MEMBER(tlcs870_device::treg1b_l_w)
+void tlcs870_device::treg1b_l_w(uint8_t data)
{
m_TREG1B = (m_TREG1B & 0xff00) | data;
}
-WRITE8_MEMBER(tlcs870_device::treg1b_h_w)
+void tlcs870_device::treg1b_h_w(uint8_t data)
{
m_TREG1B = (m_TREG1B & 0x00ff) | (data << 8);
}
-READ8_MEMBER(tlcs870_device::treg1b_l_r)
+uint8_t tlcs870_device::treg1b_l_r()
{
return m_TREG1B & 0xff;
}
-READ8_MEMBER(tlcs870_device::treg1b_h_r)
+uint8_t tlcs870_device::treg1b_h_r()
{
return (m_TREG1B >>8) & 0xff;
}
@@ -350,7 +350,7 @@ void tlcs870_device::tc2_cancel()
m_tcx_timer[1]->adjust(attotime::never);
}
-WRITE8_MEMBER(tlcs870_device::tc2cr_w)
+void tlcs870_device::tc2cr_w(uint8_t data)
{
if (data & 0x20)
{
@@ -377,12 +377,12 @@ WRITE8_MEMBER(tlcs870_device::tc2cr_w)
LOG("%d: TC2M (TC2 Mode Select)\n", (m_TC2CR & 0x01) ? 1 : 0);
}
-WRITE8_MEMBER(tlcs870_device::treg2_l_w)
+void tlcs870_device::treg2_l_w(uint8_t data)
{
m_TREG2 = (m_TREG2 & 0xff00) | data;
}
-WRITE8_MEMBER(tlcs870_device::treg2_h_w)
+void tlcs870_device::treg2_h_w(uint8_t data)
{
m_TREG2 = (m_TREG2 & 0x00ff) | (data << 8);
}
@@ -394,7 +394,7 @@ TIMER_CALLBACK_MEMBER(tlcs870_device::tc3_cb)
}
-WRITE8_MEMBER(tlcs870_device::tc3cr_w)
+void tlcs870_device::tc3cr_w(uint8_t data)
{
m_TC3CR = data;
@@ -409,17 +409,17 @@ WRITE8_MEMBER(tlcs870_device::tc3cr_w)
LOG("%d: TC3M (TC3 Mode Select)\n", (m_TC3CR & 0x01) ? 1 : 0);
}
-WRITE8_MEMBER(tlcs870_device::treg3a_w)
+void tlcs870_device::treg3a_w(uint8_t data)
{
m_TREG3A = data;
}
-READ8_MEMBER(tlcs870_device::treg3a_r)
+uint8_t tlcs870_device::treg3a_r()
{
return m_TREG3A;
}
-READ8_MEMBER(tlcs870_device::treg3b_r)
+uint8_t tlcs870_device::treg3b_r()
{
return m_TREG3B;
}
@@ -431,7 +431,7 @@ TIMER_CALLBACK_MEMBER(tlcs870_device::tc4_cb)
}
-WRITE8_MEMBER(tlcs870_device::tc4cr_w)
+void tlcs870_device::tc4cr_w(uint8_t data)
{
m_TC4CR = data;
@@ -446,7 +446,7 @@ WRITE8_MEMBER(tlcs870_device::tc4cr_w)
LOG("%d: TC4M-0 (TC4 Mode Select)\n", (m_TC4CR & 0x01) ? 1 : 0);
}
-WRITE8_MEMBER(tlcs870_device::treg4_w)
+void tlcs870_device::treg4_w(uint8_t data)
{
m_TREG4 = data;
}
@@ -455,7 +455,7 @@ WRITE8_MEMBER(tlcs870_device::treg4_w)
// this is used with TLCS870_IRQ_INTTBT (FFF2 INTTBT) (not used by hng64)
// the divider output makes use of PORT1 bit 3, which must be properly configured
-WRITE8_MEMBER(tlcs870_device::tbtcr_w)
+void tlcs870_device::tbtcr_w(uint8_t data)
{
m_TBTCR = data;
@@ -470,7 +470,7 @@ WRITE8_MEMBER(tlcs870_device::tbtcr_w)
LOG("%d: TBTCK-0 (Time Base Timer Interrupt Frequency)\n", (m_TBTCR & 0x01) ? 1 : 0);
}
-READ8_MEMBER(tlcs870_device::tbtcr_r)
+uint8_t tlcs870_device::tbtcr_r()
{
return m_TBTCR;
}
@@ -480,7 +480,7 @@ READ8_MEMBER(tlcs870_device::tbtcr_r)
// TODO: use templates for SIO1/2 ports, as they're the same except for the DBR region they use?
// Serial Port 1
-WRITE8_MEMBER(tlcs870_device::sio1cr1_w)
+void tlcs870_device::sio1cr1_w(uint8_t data)
{
m_SIOCR1[0] = data;
@@ -545,7 +545,7 @@ WRITE8_MEMBER(tlcs870_device::sio1cr1_w)
}
-WRITE8_MEMBER(tlcs870_device::sio1cr2_w)
+void tlcs870_device::sio1cr2_w(uint8_t data)
{
m_SIOCR2[0] = data;
@@ -564,7 +564,7 @@ WRITE8_MEMBER(tlcs870_device::sio1cr2_w)
}
-READ8_MEMBER(tlcs870_device::sio1sr_r)
+uint8_t tlcs870_device::sio1sr_r()
{
/* TS-- ----
@@ -616,7 +616,7 @@ TIMER_CALLBACK_MEMBER(tlcs870_device::sio0_transmit_cb)
}
// Serial Port 2
-WRITE8_MEMBER(tlcs870_device::sio2cr1_w)
+void tlcs870_device::sio2cr1_w(uint8_t data)
{
m_SIOCR1[1] = data;
@@ -631,7 +631,7 @@ WRITE8_MEMBER(tlcs870_device::sio2cr1_w)
LOG("%d: SCK2-0 (Serial Clock)\n", (m_SIOCR1[1] & 0x01) ? 1 : 0);
}
-WRITE8_MEMBER(tlcs870_device::sio2cr2_w)
+void tlcs870_device::sio2cr2_w(uint8_t data)
{
m_SIOCR2[1] = data;
@@ -650,7 +650,7 @@ TIMER_CALLBACK_MEMBER(tlcs870_device::sio1_transmit_cb)
{
}
-READ8_MEMBER(tlcs870_device::sio2sr_r)
+uint8_t tlcs870_device::sio2sr_r()
{
/* TS-- ----
@@ -663,7 +663,7 @@ READ8_MEMBER(tlcs870_device::sio2sr_r)
// WDT emulation (Watchdog Timer)
-WRITE8_MEMBER(tlcs870_device::wdtcr1_w)
+void tlcs870_device::wdtcr1_w(uint8_t data)
{
m_WDTCR1 = data;
@@ -680,7 +680,7 @@ WRITE8_MEMBER(tlcs870_device::wdtcr1_w)
// WDTOUT cannot be set to 1 by software
}
-WRITE8_MEMBER(tlcs870_device::wdtcr2_w)
+void tlcs870_device::wdtcr2_w(uint8_t data)
{
if (data == 0x4e)
{
@@ -699,7 +699,7 @@ WRITE8_MEMBER(tlcs870_device::wdtcr2_w)
// Misc
// not used by hng64
-WRITE8_MEMBER(tlcs870_device::syscr1_w)
+void tlcs870_device::syscr1_w(uint8_t data)
{
m_SYSCR1 = data;
@@ -714,7 +714,7 @@ WRITE8_MEMBER(tlcs870_device::syscr1_w)
LOG("%d: (invalid)\n", (m_SYSCR1 & 0x01) ? 1 : 0);
}
-WRITE8_MEMBER(tlcs870_device::syscr2_w)
+void tlcs870_device::syscr2_w(uint8_t data)
{
m_SYSCR2 = data;
@@ -729,25 +729,25 @@ WRITE8_MEMBER(tlcs870_device::syscr2_w)
LOG("%d: (invalid)\n", (m_SYSCR2 & 0x01) ? 1 : 0);
}
-READ8_MEMBER(tlcs870_device::syscr1_r)
+uint8_t tlcs870_device::syscr1_r()
{
return m_SYSCR1; // low 2 bits are 'undefined'
}
-READ8_MEMBER(tlcs870_device::syscr2_r)
+uint8_t tlcs870_device::syscr2_r()
{
return m_SYSCR2 | 0x0f; // low bits always read as 1
}
// RBS / PSW direct access
-WRITE8_MEMBER(tlcs870_device::rbs_w)
+void tlcs870_device::rbs_w(uint8_t data)
{
// upper bits of PSW (status flags) cannot be written, only the register bank
m_RBS = data & 0x0f;
}
-READ8_MEMBER(tlcs870_device::psw_r)
+uint8_t tlcs870_device::psw_r()
{
// outside of checking the results of opcodes that use it directly (DAA / DAS) this is the only way to read / check the 'half' flag
return get_PSW();
@@ -755,7 +755,7 @@ READ8_MEMBER(tlcs870_device::psw_r)
// ADC emulation
-READ8_MEMBER(tlcs870_device::adcdr_r)
+uint8_t tlcs870_device::adcdr_r()
{
return m_ADCDR;
}
@@ -780,12 +780,12 @@ READ8_MEMBER(tlcs870_device::adcdr_r)
*/
-READ8_MEMBER(tlcs870_device::adccr_r)
+uint8_t tlcs870_device::adccr_r()
{
return m_ADCCR | 0x80; // return with 'finished' bit set
}
-WRITE8_MEMBER(tlcs870_device::adccr_w)
+void tlcs870_device::adccr_w(uint8_t data)
{
m_ADCCR = data;
@@ -796,12 +796,12 @@ WRITE8_MEMBER(tlcs870_device::adccr_w)
}
-READ8_MEMBER(tlcs870_device::eintcr_r)
+uint8_t tlcs870_device::eintcr_r()
{
return 0x00;
}
-WRITE8_MEMBER(tlcs870_device::eintcr_w)
+void tlcs870_device::eintcr_w(uint8_t data)
{
m_EINTCR = data;
@@ -822,17 +822,17 @@ WRITE8_MEMBER(tlcs870_device::eintcr_w)
*/
}
-READ8_MEMBER(tlcs870_device::eir_l_r)
+uint8_t tlcs870_device::eir_l_r()
{
return m_EIR & 0xff;
}
-READ8_MEMBER(tlcs870_device::eir_h_r)
+uint8_t tlcs870_device::eir_h_r()
{
return (m_EIR >> 8) & 0xff;
}
-WRITE8_MEMBER(tlcs870_device::eir_l_w)
+void tlcs870_device::eir_l_w(uint8_t data)
{
m_EIR = (m_EIR & 0xff00) | data;
@@ -847,7 +847,7 @@ WRITE8_MEMBER(tlcs870_device::eir_l_w)
LOG("%d: IMF\n", (m_EIR & 0x0001) ? 1 : 0); // can't be Reset interrupt (non-maskable)
}
-WRITE8_MEMBER(tlcs870_device::eir_h_w)
+void tlcs870_device::eir_h_w(uint8_t data)
{
m_EIR = (m_EIR & 0x00ff) | (data << 8);
@@ -869,23 +869,23 @@ WRITE8_MEMBER(tlcs870_device::eir_h_w)
by writing 0 to it
*/
-READ8_MEMBER(tlcs870_device::il_l_r)
+uint8_t tlcs870_device::il_l_r()
{
return m_IL & 0xff;
}
-READ8_MEMBER(tlcs870_device::il_h_r)
+uint8_t tlcs870_device::il_h_r()
{
return (m_IL >> 8) & 0xff;
}
-WRITE8_MEMBER(tlcs870_device::il_l_w)
+void tlcs870_device::il_l_w(uint8_t data)
{
// probably not this logic
m_IL = (m_IL & 0xff00) | data;
}
-WRITE8_MEMBER(tlcs870_device::il_h_w)
+void tlcs870_device::il_h_w(uint8_t data)
{
// probably not this logic
m_IL = (m_EIR & 0x00ff) | (data << 8);
diff --git a/src/devices/cpu/tlcs870/tlcs870.h b/src/devices/cpu/tlcs870/tlcs870.h
index 242c04e404b..f6794127fdd 100644
--- a/src/devices/cpu/tlcs870/tlcs870.h
+++ b/src/devices/cpu/tlcs870/tlcs870.h
@@ -175,87 +175,87 @@ private:
int m_read_input_port;
uint8_t m_port0_cr, m_port1_cr, m_port6_cr, m_port7_cr;
- DECLARE_READ8_MEMBER(port0_r);
- DECLARE_READ8_MEMBER(port1_r);
- DECLARE_READ8_MEMBER(port2_r);
- DECLARE_READ8_MEMBER(port3_r);
- DECLARE_READ8_MEMBER(port4_r);
- DECLARE_READ8_MEMBER(port5_r);
- DECLARE_READ8_MEMBER(port6_r);
- DECLARE_READ8_MEMBER(port7_r);
-
- DECLARE_WRITE8_MEMBER(port0_w);
- DECLARE_WRITE8_MEMBER(port1_w);
- DECLARE_WRITE8_MEMBER(port2_w);
- DECLARE_WRITE8_MEMBER(port3_w);
- DECLARE_WRITE8_MEMBER(port4_w);
- DECLARE_WRITE8_MEMBER(port5_w);
- DECLARE_WRITE8_MEMBER(port6_w);
- DECLARE_WRITE8_MEMBER(port7_w);
-
- DECLARE_WRITE8_MEMBER(p0cr_w);
- DECLARE_WRITE8_MEMBER(p1cr_w);
- DECLARE_WRITE8_MEMBER(p6cr_w);
- DECLARE_WRITE8_MEMBER(p7cr_w);
-
- DECLARE_READ8_MEMBER(eir_l_r);
- DECLARE_READ8_MEMBER(eir_h_r);
- DECLARE_READ8_MEMBER(il_l_r);
- DECLARE_READ8_MEMBER(il_h_r);
-
- DECLARE_WRITE8_MEMBER(eir_l_w);
- DECLARE_WRITE8_MEMBER(eir_h_w);
- DECLARE_WRITE8_MEMBER(il_l_w);
- DECLARE_WRITE8_MEMBER(il_h_w);
-
- DECLARE_READ8_MEMBER(eintcr_r);
-
- DECLARE_WRITE8_MEMBER(eintcr_w);
-
- DECLARE_WRITE8_MEMBER(treg1a_l_w);
- DECLARE_WRITE8_MEMBER(treg1a_h_w);
- DECLARE_WRITE8_MEMBER(treg1b_l_w);
- DECLARE_WRITE8_MEMBER(treg1b_h_w);
- DECLARE_WRITE8_MEMBER(tc1cr_w);
- DECLARE_WRITE8_MEMBER(tc2cr_w);
- DECLARE_WRITE8_MEMBER(treg2_l_w);
- DECLARE_WRITE8_MEMBER(treg2_h_w);
- DECLARE_WRITE8_MEMBER(treg3a_w);
- DECLARE_WRITE8_MEMBER(tc3cr_w);
- DECLARE_WRITE8_MEMBER(tc4cr_w);
-
- DECLARE_READ8_MEMBER(treg1b_l_r);
- DECLARE_READ8_MEMBER(treg1b_h_r);
- DECLARE_READ8_MEMBER(treg3a_r);
- DECLARE_READ8_MEMBER(treg3b_r);
- DECLARE_WRITE8_MEMBER(treg4_w);
-
-
- DECLARE_WRITE8_MEMBER(sio1cr1_w);
- DECLARE_WRITE8_MEMBER(sio1cr2_w);
- DECLARE_WRITE8_MEMBER(sio2cr1_w);
- DECLARE_WRITE8_MEMBER(sio2cr2_w);
- DECLARE_READ8_MEMBER(sio2sr_r);
- DECLARE_READ8_MEMBER(sio1sr_r);
-
- DECLARE_WRITE8_MEMBER(wdtcr1_w);
- DECLARE_WRITE8_MEMBER(wdtcr2_w);
-
- DECLARE_WRITE8_MEMBER(tbtcr_w);
-
- DECLARE_READ8_MEMBER(tbtcr_r);
-
- DECLARE_WRITE8_MEMBER(syscr1_w);
- DECLARE_WRITE8_MEMBER(syscr2_w);
- DECLARE_READ8_MEMBER(syscr1_r);
- DECLARE_READ8_MEMBER(syscr2_r);
- DECLARE_WRITE8_MEMBER(rbs_w);
- DECLARE_READ8_MEMBER(psw_r);
-
- DECLARE_READ8_MEMBER(adccr_r);
- DECLARE_READ8_MEMBER(adcdr_r);
-
- DECLARE_WRITE8_MEMBER(adccr_w);
+ uint8_t port0_r();
+ uint8_t port1_r();
+ uint8_t port2_r();
+ uint8_t port3_r();
+ uint8_t port4_r();
+ uint8_t port5_r();
+ uint8_t port6_r();
+ uint8_t port7_r();
+
+ void port0_w(uint8_t data);
+ void port1_w(uint8_t data);
+ void port2_w(uint8_t data);
+ void port3_w(uint8_t data);
+ void port4_w(uint8_t data);
+ void port5_w(uint8_t data);
+ void port6_w(uint8_t data);
+ void port7_w(uint8_t data);
+
+ void p0cr_w(uint8_t data);
+ void p1cr_w(uint8_t data);
+ void p6cr_w(uint8_t data);
+ void p7cr_w(uint8_t data);
+
+ uint8_t eir_l_r();
+ uint8_t eir_h_r();
+ uint8_t il_l_r();
+ uint8_t il_h_r();
+
+ void eir_l_w(uint8_t data);
+ void eir_h_w(uint8_t data);
+ void il_l_w(uint8_t data);
+ void il_h_w(uint8_t data);
+
+ uint8_t eintcr_r();
+
+ void eintcr_w(uint8_t data);
+
+ void treg1a_l_w(uint8_t data);
+ void treg1a_h_w(uint8_t data);
+ void treg1b_l_w(uint8_t data);
+ void treg1b_h_w(uint8_t data);
+ void tc1cr_w(uint8_t data);
+ void tc2cr_w(uint8_t data);
+ void treg2_l_w(uint8_t data);
+ void treg2_h_w(uint8_t data);
+ void treg3a_w(uint8_t data);
+ void tc3cr_w(uint8_t data);
+ void tc4cr_w(uint8_t data);
+
+ uint8_t treg1b_l_r();
+ uint8_t treg1b_h_r();
+ uint8_t treg3a_r();
+ uint8_t treg3b_r();
+ void treg4_w(uint8_t data);
+
+
+ void sio1cr1_w(uint8_t data);
+ void sio1cr2_w(uint8_t data);
+ void sio2cr1_w(uint8_t data);
+ void sio2cr2_w(uint8_t data);
+ uint8_t sio2sr_r();
+ uint8_t sio1sr_r();
+
+ void wdtcr1_w(uint8_t data);
+ void wdtcr2_w(uint8_t data);
+
+ void tbtcr_w(uint8_t data);
+
+ uint8_t tbtcr_r();
+
+ void syscr1_w(uint8_t data);
+ void syscr2_w(uint8_t data);
+ uint8_t syscr1_r();
+ uint8_t syscr2_r();
+ void rbs_w(uint8_t data);
+ uint8_t psw_r();
+
+ uint8_t adccr_r();
+ uint8_t adcdr_r();
+
+ void adccr_w(uint8_t data);
// Work registers
uint8_t m_cycles;
diff --git a/src/devices/cpu/tlcs900/tlcs900.cpp b/src/devices/cpu/tlcs900/tlcs900.cpp
index ec0ffd66029..1e014565a63 100644
--- a/src/devices/cpu/tlcs900/tlcs900.cpp
+++ b/src/devices/cpu/tlcs900/tlcs900.cpp
@@ -1156,7 +1156,7 @@ void tmp95c061_device::execute_set_input(int input, int level)
}
-READ8_MEMBER( tmp95c061_device::internal_r )
+uint8_t tmp95c061_device::internal_r(offs_t offset)
{
switch (offset)
{
@@ -1180,7 +1180,7 @@ void tmp95c061_device::update_porta()
m_porta_write(0, ((fc & m_reg[TMP95C061_PAFC]) | (m_reg[TMP95C061_PA] & ~m_reg[TMP95C061_PAFC])) & m_reg[TMP95C061_PACR], 0xff);
}
-WRITE8_MEMBER( tmp95c061_device::internal_w )
+void tmp95c061_device::internal_w(offs_t offset, uint8_t data)
{
switch ( offset )
{
@@ -2012,7 +2012,7 @@ void tmp95c063_device::device_reset()
m_prefetch_clear = true;
}
-READ8_MEMBER( tmp95c063_device::internal_r )
+uint8_t tmp95c063_device::internal_r(offs_t offset)
{
switch (offset)
{
@@ -2032,7 +2032,7 @@ READ8_MEMBER( tmp95c063_device::internal_r )
}
-WRITE8_MEMBER( tmp95c063_device::internal_w )
+void tmp95c063_device::internal_w(offs_t offset, uint8_t data)
{
switch ( offset )
{
diff --git a/src/devices/cpu/tlcs900/tlcs900.h b/src/devices/cpu/tlcs900/tlcs900.h
index ec2f977808d..e886ba868e4 100644
--- a/src/devices/cpu/tlcs900/tlcs900.h
+++ b/src/devices/cpu/tlcs900/tlcs900.h
@@ -633,8 +633,8 @@ public:
auto portb_read() { return m_portb_read.bind(); }
auto portb_write() { return m_portb_write.bind(); }
- DECLARE_READ8_MEMBER( internal_r );
- DECLARE_WRITE8_MEMBER( internal_w );
+ uint8_t internal_r(offs_t offset);
+ void internal_w(offs_t offset, uint8_t data);
void tmp95c061_mem16(address_map &map);
void tmp95c061_mem8(address_map &map);
@@ -699,8 +699,8 @@ public:
// construction/destruction
tmp95c063_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER( internal_r );
- DECLARE_WRITE8_MEMBER( internal_w );
+ uint8_t internal_r(offs_t offset);
+ void internal_w(offs_t offset, uint8_t data);
// configuration helpers
auto port1_read() { return m_port1_read.bind(); }
diff --git a/src/devices/cpu/tms7000/tms7000.cpp b/src/devices/cpu/tms7000/tms7000.cpp
index 9fbfdf50d9b..2616efd189c 100644
--- a/src/devices/cpu/tms7000/tms7000.cpp
+++ b/src/devices/cpu/tms7000/tms7000.cpp
@@ -121,7 +121,8 @@ tms7000_device::tms7000_device(const machine_config &mconfig, device_type type,
m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, internal),
m_port_in_cb(*this),
m_port_out_cb(*this),
- m_info_flags(info_flags)
+ m_info_flags(info_flags),
+ m_divider(2)
{
}
@@ -494,7 +495,7 @@ TIMER_CALLBACK_MEMBER(tms7000_device::simple_timer_cb)
// note: TMS7000 family is from $00 to $0b, TMS7002 family adds $10 to $17
//-------------------------------------------------
-READ8_MEMBER(tms7000_device::tms7000_pf_r)
+uint8_t tms7000_device::tms7000_pf_r(offs_t offset)
{
switch (offset)
{
@@ -535,7 +536,7 @@ READ8_MEMBER(tms7000_device::tms7000_pf_r)
return 0;
}
-WRITE8_MEMBER(tms7000_device::tms7000_pf_w)
+void tms7000_device::tms7000_pf_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -901,12 +902,12 @@ void tms70c46_device::device_reset()
tms7000_device::device_reset();
}
-READ8_MEMBER(tms70c46_device::control_r)
+uint8_t tms70c46_device::control_r()
{
return m_control;
}
-WRITE8_MEMBER(tms70c46_device::control_w)
+void tms70c46_device::control_w(uint8_t data)
{
// d5: enable external databus
if (~m_control & data & 0x20)
@@ -925,7 +926,7 @@ WRITE8_MEMBER(tms70c46_device::control_w)
// right now pretend that nothing is connected
// external pins are HD0-HD3(data), HSK(handshake), BAV(bus available)
-READ8_MEMBER(tms70c46_device::dockbus_status_r)
+uint8_t tms70c46_device::dockbus_status_r()
{
// d0: slave _HSK
// d1: slave _BAV
@@ -934,18 +935,18 @@ READ8_MEMBER(tms70c46_device::dockbus_status_r)
return 0;
}
-WRITE8_MEMBER(tms70c46_device::dockbus_status_w)
+void tms70c46_device::dockbus_status_w(uint8_t data)
{
// d0: master _HSK (setting it low(write 1) also clears IRQ)
// d1: master _BAV
// other bits: unused?
}
-READ8_MEMBER(tms70c46_device::dockbus_data_r)
+uint8_t tms70c46_device::dockbus_data_r()
{
return 0xff;
}
-WRITE8_MEMBER(tms70c46_device::dockbus_data_w)
+void tms70c46_device::dockbus_data_w(uint8_t data)
{
}
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index 054d054a7f6..bfcf61350fd 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -45,13 +45,17 @@ public:
auto in_porte() { return m_port_in_cb[4].bind(); }
auto out_porte() { return m_port_out_cb[4].bind(); }
- DECLARE_READ8_MEMBER(tms7000_unmapped_rf_r) { if (!machine().side_effects_disabled()) logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; };
- DECLARE_WRITE8_MEMBER(tms7000_unmapped_rf_w) { logerror("'%s' (%04X): unmapped_rf_w @ $%04x = $%02x\n", tag(), m_pc, offset + 0x80, data); };
+ // clock divider mask option
+ void set_divide_by_2() { m_divider = 2; }
+ void set_divide_by_4() { m_divider = 4; }
- DECLARE_READ8_MEMBER(tms7000_pf_r);
- DECLARE_WRITE8_MEMBER(tms7000_pf_w);
- DECLARE_READ8_MEMBER(tms7002_pf_r) { return tms7000_pf_r(space, offset + 0x10); }
- DECLARE_WRITE8_MEMBER(tms7002_pf_w) { tms7000_pf_w(space, offset + 0x10, data); }
+ uint8_t tms7000_unmapped_rf_r(offs_t offset) { if (!machine().side_effects_disabled()) logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; };
+ void tms7000_unmapped_rf_w(offs_t offset, uint8_t data) { logerror("'%s' (%04X): unmapped_rf_w @ $%04x = $%02x\n", tag(), m_pc, offset + 0x80, data); };
+
+ uint8_t tms7000_pf_r(offs_t offset);
+ void tms7000_pf_w(offs_t offset, uint8_t data);
+ uint8_t tms7002_pf_r(offs_t offset) { return tms7000_pf_r(offset + 0x10); }
+ void tms7002_pf_w(offs_t offset, uint8_t data) { tms7000_pf_w(offset + 0x10, data); }
bool chip_is_cmos() const { return (m_info_flags & CHIP_IS_CMOS) ? true : false; }
bool chip_is_family_70x0() const { return chip_get_family() == CHIP_FAMILY_70X0; }
@@ -80,8 +84,8 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return (clocks + 2 - 1) / 2; } // internal /2 divider
- virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const noexcept override { return (cycles * 2); } // internal /2 divider
+ virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return (clocks + m_divider - 1) / 2; }
+ virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const noexcept override { return (cycles * m_divider); }
virtual uint32_t execute_min_cycles() const noexcept override { return 5; }
virtual uint32_t execute_max_cycles() const noexcept override { return 49; }
virtual uint32_t execute_input_lines() const noexcept override { return 2; }
@@ -106,7 +110,8 @@ protected:
devcb_read8::array<5> m_port_in_cb;
devcb_write8::array<5> m_port_out_cb;
- uint32_t m_info_flags;
+ const uint32_t m_info_flags;
+ unsigned m_divider;
address_space *m_program;
memory_access_cache<0, 0, ENDIANNESS_BIG> *m_cache;
@@ -322,17 +327,17 @@ class tms70c46_device : public tms7000_device
public:
tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(control_r);
- DECLARE_WRITE8_MEMBER(control_w);
+ uint8_t control_r();
+ void control_w(uint8_t data);
- DECLARE_READ8_MEMBER(dockbus_status_r);
- DECLARE_WRITE8_MEMBER(dockbus_status_w);
- DECLARE_READ8_MEMBER(dockbus_data_r);
- DECLARE_WRITE8_MEMBER(dockbus_data_w);
+ uint8_t dockbus_status_r();
+ void dockbus_status_w(uint8_t data);
+ uint8_t dockbus_data_r();
+ void dockbus_data_w(uint8_t data);
// access I/O port E if databus is disabled
- DECLARE_READ8_MEMBER(e_bus_data_r) { return machine().side_effects_disabled() ? 0xff : ((m_control & 0x20) ? 0xff : m_port_in_cb[4]()); }
- DECLARE_WRITE8_MEMBER(e_bus_data_w) { if (~m_control & 0x20) m_port_out_cb[4](data); }
+ uint8_t e_bus_data_r() { return machine().side_effects_disabled() ? 0xff : ((m_control & 0x20) ? 0xff : m_port_in_cb[4]()); }
+ void e_bus_data_w(uint8_t data) { if (~m_control & 0x20) m_port_out_cb[4](data); }
void tms70c46_mem(address_map &map);
protected:
diff --git a/src/devices/cpu/upd177x/upd177xd.cpp b/src/devices/cpu/upd177x/upd177xd.cpp
new file mode 100644
index 00000000000..5e855ff5c09
--- /dev/null
+++ b/src/devices/cpu/upd177x/upd177xd.cpp
@@ -0,0 +1,299 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// upd177X disassembler
+
+#include "emu.h"
+#include "upd177xd.h"
+
+u32 upd177x_disassembler::opcode_alignment() const
+{
+ return 1;
+}
+
+std::string upd177x_disassembler::reg4(u16 opcode)
+{
+ return util::string_format("r%02x", (opcode >> 4) & 0x1f);
+}
+
+std::string upd177x_disassembler::reg9(u16 opcode)
+{
+ return util::string_format("r%02x", (opcode >> 9) & 0x1f);
+}
+
+std::string upd177x_disassembler::imm8(u16 opcode)
+{
+ if((opcode & 0xff) < 10)
+ return util::string_format("%d", opcode & 0xff);
+ else
+ return util::string_format("%02x", opcode & 0xff);
+}
+
+std::string upd177x_disassembler::imm7(u16 opcode)
+{
+ if((opcode & 0x7f) < 10)
+ return util::string_format("%d", opcode & 0x7f);
+ else
+ return util::string_format("%02x", opcode & 0x7f);
+}
+
+std::string upd177x_disassembler::imm6(u16 opcode)
+{
+ if((opcode & 0x3f) < 10)
+ return util::string_format("%d", opcode & 0x3f);
+ else
+ return util::string_format("%02x", opcode & 0x3f);
+}
+
+std::string upd177x_disassembler::imm4(u16 opcode)
+{
+ return util::string_format("%x", opcode & 0xf);
+}
+
+std::string upd177x_disassembler::imm3_5(u16 opcode)
+{
+ return util::string_format("%02x", opcode & 0xe0);
+}
+
+std::string upd177x_disassembler::abs12(u16 opcode, u16 pc)
+{
+ return util::string_format("%04x", (pc & 0xf000) | (opcode & 0xfff));
+}
+
+std::string upd177x_disassembler::abs8(u16 opcode, u16 pc)
+{
+ return util::string_format("%04x", (pc & 0xff00) | (opcode & 0xff));
+}
+
+std::string upd177x_disassembler::abs4_4(u16 opcode, u16 pc)
+{
+ return util::string_format("%04x", (pc & 0x0fff) | ((opcode << 8) & 0xf000));
+}
+
+#define P std::ostream &stream, u16 opcode, u16 pc
+const upd177x_disassembler::instruction upd177x_disassembler::instructions[] {
+ { 0x4000, 0xe000, [](P) -> u32 { util::stream_format(stream, "mvi %s, %s", reg9(opcode), imm8(opcode)); return 1; } },
+ { 0x3200, 0xff00, [](P) -> u32 { util::stream_format(stream, "mvi (h), %s", imm8(opcode)); return 1; } },
+ { 0x3400, 0xff00, [](P) -> u32 { util::stream_format(stream, "mvi a, %s", imm8(opcode)); return 1; } },
+ { 0x3800, 0xffc0, [](P) -> u32 { util::stream_format(stream, "mvi h, %s", imm6(opcode)); return 1; } },
+ { 0x3100, 0xff1f, [](P) -> u32 { util::stream_format(stream, "mvi mdi, %s", imm3_5(opcode)); return 1; } },
+ { 0x2100, 0xff80, [](P) -> u32 { util::stream_format(stream, "mvi mdo, %s", imm7(opcode)); return 1; } },
+
+ { 0x1201, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "mov %s, a", reg4(opcode)); return 1; } },
+ { 0x1005, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "mov a, %s", reg4(opcode)); return 1; } },
+ { 0x1205, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "xchg %s, a", reg4(opcode)); return 1; } },
+ { 0x1202, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "mov %s, h", reg4(opcode)); return 1; } },
+ { 0x100a, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "mov h, %s", reg4(opcode)); return 1; } },
+ { 0x120a, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "xchg %s, a", reg4(opcode)); return 1; } },
+ { 0x1000, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "mov y, %s", reg4(opcode)); return 1; } },
+ { 0x0008, 0xffff, [](P) -> u32 { util::stream_format(stream, "mov x, rg"); return 1; } },
+
+ { 0x0404, 0xffff, [](P) -> u32 { util::stream_format(stream, "rar"); return 1; } },
+ { 0x0408, 0xffff, [](P) -> u32 { util::stream_format(stream, "ral"); return 1; } },
+
+ { 0x0401, 0xffff, [](P) -> u32 { util::stream_format(stream, "in pa"); return 1; } },
+ { 0x0402, 0xffff, [](P) -> u32 { util::stream_format(stream, "in pb"); return 1; } },
+ { 0x0002, 0xffff, [](P) -> u32 { util::stream_format(stream, "out pa"); return 1; } },
+ { 0x0004, 0xffff, [](P) -> u32 { util::stream_format(stream, "out pb"); return 1; } },
+ { 0x0502, 0xffff, [](P) -> u32 { util::stream_format(stream, "out da"); return 1; } },
+
+ { 0x0504, 0xffff, [](P) -> u32 { util::stream_format(stream, "mul 1"); return 1; } },
+ { 0x050c, 0xffff, [](P) -> u32 { util::stream_format(stream, "mul 2"); return 1; } },
+
+ { 0x1409, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "mix %s", reg4(opcode)); return 1; } },
+
+ { 0x1801, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tblo a, (%s)", reg4(opcode)); return 1; } },
+ { 0x1802, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tblo x, (%s)", reg4(opcode)); return 1; } },
+ { 0x1804, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tblo y, (%s)", reg4(opcode)); return 1; } },
+ { 0x1808, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "callo (%s)", reg4(opcode)); return 1; } },
+
+ { 0x6000, 0xf000, [](P) -> u32 { util::stream_format(stream, "jmp %s", abs12(opcode, pc)); return 1; } },
+ { 0x2000, 0xff0f, [](P) -> u32 { util::stream_format(stream, "jmp %s", abs4_4(opcode, pc)); return 1; } },
+ { 0x0501, 0xffff, [](P) -> u32 { util::stream_format(stream, "jmpa"); return 1; } },
+ { 0x2400, 0xff00, [](P) -> u32 { util::stream_format(stream, "jmpfz %s", abs8(opcode, pc)); return 1; } },
+
+ { 0x7000, 0xf000, [](P) -> u32 { util::stream_format(stream, "call %s", abs12(opcode, pc)); return 1; } },
+
+ { 0x0800, 0xffff, [](P) -> u32 { util::stream_format(stream, "ret"); return 1; } },
+ { 0x0801, 0xffff, [](P) -> u32 { util::stream_format(stream, "rets"); return 1; } },
+ { 0x090f, 0xffff, [](P) -> u32 { util::stream_format(stream, "reti"); return 1; } },
+
+ { 0x0005, 0xffff, [](P) -> u32 { util::stream_format(stream, "stf"); return 1; } },
+ { 0x0602, 0xffff, [](P) -> u32 { util::stream_format(stream, "off"); return 1; } },
+ { 0x0000, 0xffff, [](P) -> u32 { util::stream_format(stream, "nop"); return 1; } },
+
+ { 0xe000, 0xfe00, [](P) -> u32 { util::stream_format(stream, "adi %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xe200, 0xfe00, [](P) -> u32 { util::stream_format(stream, "adis %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xe400, 0xfe00, [](P) -> u32 { util::stream_format(stream, "sbi %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xe600, 0xfe00, [](P) -> u32 { util::stream_format(stream, "sbis %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xe800, 0xfe00, [](P) -> u32 { util::stream_format(stream, "tadinc %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xea00, 0xfe00, [](P) -> u32 { util::stream_format(stream, "tadic %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xec00, 0xfe00, [](P) -> u32 { util::stream_format(stream, "tsbinc %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xee00, 0xfe00, [](P) -> u32 { util::stream_format(stream, "tsbic %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xf000, 0xfe00, [](P) -> u32 { util::stream_format(stream, "adi5 %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xf200, 0xfe00, [](P) -> u32 { util::stream_format(stream, "adims %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+ { 0xf800, 0xfe00, [](P) -> u32 { util::stream_format(stream, "tadi5 %s, %s", reg4(opcode), imm4(opcode)); return 1; } },
+
+ { 0x8000, 0xff00, [](P) -> u32 { util::stream_format(stream, "adi a, %s", imm8(opcode)); return 1; } },
+ { 0x8200, 0xff00, [](P) -> u32 { util::stream_format(stream, "andi a, %s", imm8(opcode)); return 1; } },
+ { 0x8400, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbi a, %s", imm8(opcode)); return 1; } },
+ { 0x8600, 0xff00, [](P) -> u32 { util::stream_format(stream, "ori a, %s", imm8(opcode)); return 1; } },
+ { 0x8800, 0xff00, [](P) -> u32 { util::stream_format(stream, "adis a, %s", imm8(opcode)); return 1; } },
+ { 0x8a00, 0xff00, [](P) -> u32 { util::stream_format(stream, "andis a, %s", imm8(opcode)); return 1; } },
+ { 0x8c00, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbis a, %s", imm8(opcode)); return 1; } },
+ { 0x8e00, 0xff00, [](P) -> u32 { util::stream_format(stream, "xori a, %s", imm8(opcode)); return 1; } },
+ { 0x9000, 0xff00, [](P) -> u32 { util::stream_format(stream, "tadinc a, %s", imm8(opcode)); return 1; } },
+ { 0x9200, 0xff00, [](P) -> u32 { util::stream_format(stream, "tandinz a, %s", imm8(opcode)); return 1; } },
+ { 0x9400, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbinc a, %s", imm8(opcode)); return 1; } },
+ { 0x9600, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbinz a, %s", imm8(opcode)); return 1; } },
+ { 0x9800, 0xff00, [](P) -> u32 { util::stream_format(stream, "tadic a, %s", imm8(opcode)); return 1; } },
+ { 0x9a00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tandiz a, %s", imm8(opcode)); return 1; } },
+ { 0x9c00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbic a, %s", imm8(opcode)); return 1; } },
+ { 0x9e00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbiz a, %s", imm8(opcode)); return 1; } },
+
+ { 0x8100, 0xff00, [](P) -> u32 { util::stream_format(stream, "adi mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8300, 0xff00, [](P) -> u32 { util::stream_format(stream, "andi mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8500, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbi mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8700, 0xff00, [](P) -> u32 { util::stream_format(stream, "ori mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8900, 0xff00, [](P) -> u32 { util::stream_format(stream, "adis mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8b00, 0xff00, [](P) -> u32 { util::stream_format(stream, "andis mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8d00, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbis mdi, %s", imm8(opcode)); return 1; } },
+ { 0x8f00, 0xff00, [](P) -> u32 { util::stream_format(stream, "xori mdi, %s", imm8(opcode)); return 1; } },
+ { 0x9100, 0xff00, [](P) -> u32 { util::stream_format(stream, "tadinc md, %s", imm8(opcode)); return 1; } },
+ { 0x9300, 0xff00, [](P) -> u32 { util::stream_format(stream, "tandinz md, %s", imm8(opcode)); return 1; } },
+ { 0x9500, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbinc md, %s", imm8(opcode)); return 1; } },
+ { 0x9700, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbinz md, %s", imm8(opcode)); return 1; } },
+ { 0x9900, 0xff00, [](P) -> u32 { util::stream_format(stream, "tadic md, %s", imm8(opcode)); return 1; } },
+ { 0x9b00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tandiz md, %s", imm8(opcode)); return 1; } },
+ { 0x9d00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbic md, %s", imm8(opcode)); return 1; } },
+ { 0x9f00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbiz md, %s", imm8(opcode)); return 1; } },
+
+ { 0xa000, 0xff00, [](P) -> u32 { util::stream_format(stream, "adi (h), %s", imm8(opcode)); return 1; } },
+ { 0xa200, 0xff00, [](P) -> u32 { util::stream_format(stream, "andi (h), %s", imm8(opcode)); return 1; } },
+ { 0xa400, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbi (h), %s", imm8(opcode)); return 1; } },
+ { 0xa600, 0xff00, [](P) -> u32 { util::stream_format(stream, "ori (h), %s", imm8(opcode)); return 1; } },
+ { 0xa800, 0xff00, [](P) -> u32 { util::stream_format(stream, "adis (h), %s", imm8(opcode)); return 1; } },
+ { 0xaa00, 0xff00, [](P) -> u32 { util::stream_format(stream, "andis (h), %s", imm8(opcode)); return 1; } },
+ { 0xac00, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbis (h), %s", imm8(opcode)); return 1; } },
+ { 0xae00, 0xff00, [](P) -> u32 { util::stream_format(stream, "xori (h), %s", imm8(opcode)); return 1; } },
+ { 0xb000, 0xff00, [](P) -> u32 { util::stream_format(stream, "tadinc (h), %s", imm8(opcode)); return 1; } },
+ { 0xb200, 0xff00, [](P) -> u32 { util::stream_format(stream, "tandinz (h), %s", imm8(opcode)); return 1; } },
+ { 0xb400, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbinc (h), %s", imm8(opcode)); return 1; } },
+ { 0xb600, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbinz (h), %s", imm8(opcode)); return 1; } },
+ { 0xb800, 0xff00, [](P) -> u32 { util::stream_format(stream, "tadic (h), %s", imm8(opcode)); return 1; } },
+ { 0xba00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tandiz (h), %s", imm8(opcode)); return 1; } },
+ { 0xbc00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbic (h), %s", imm8(opcode)); return 1; } },
+ { 0xbe00, 0xff00, [](P) -> u32 { util::stream_format(stream, "tsbiz (h), %s", imm8(opcode)); return 1; } },
+
+ { 0xa100, 0xffc0, [](P) -> u32 { util::stream_format(stream, "adi h, %s", imm6(opcode)); return 1; } },
+ { 0xa300, 0xffc0, [](P) -> u32 { util::stream_format(stream, "andi h, %s", imm6(opcode)); return 1; } },
+ { 0xa500, 0xffc0, [](P) -> u32 { util::stream_format(stream, "sbi h, %s", imm6(opcode)); return 1; } },
+ { 0xa700, 0xffc0, [](P) -> u32 { util::stream_format(stream, "ori h, %s", imm6(opcode)); return 1; } },
+ { 0xa900, 0xffc0, [](P) -> u32 { util::stream_format(stream, "adis h, %s", imm6(opcode)); return 1; } },
+ { 0xabc0, 0xffc0, [](P) -> u32 { util::stream_format(stream, "andis h, %s", imm6(opcode)); return 1; } },
+ { 0xad00, 0xffc0, [](P) -> u32 { util::stream_format(stream, "sbis h, %s", imm6(opcode)); return 1; } },
+ { 0xaf00, 0xffc0, [](P) -> u32 { util::stream_format(stream, "xori h, %s", imm6(opcode)); return 1; } },
+ { 0xb1c0, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tadinc h, %s", imm6(opcode)); return 1; } },
+ { 0xb300, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tandinz h, %s", imm6(opcode)); return 1; } },
+ { 0xb500, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tsbinc h, %s", imm6(opcode)); return 1; } },
+ { 0xb700, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tsbinz h, %s", imm6(opcode)); return 1; } },
+ { 0xb9c0, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tadic h, %s", imm6(opcode)); return 1; } },
+ { 0xbb00, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tandiz h, %s", imm6(opcode)); return 1; } },
+ { 0xbd00, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tsbic h, %s", imm6(opcode)); return 1; } },
+ { 0xbf00, 0xffc0, [](P) -> u32 { util::stream_format(stream, "tsbiz h, %s", imm6(opcode)); return 1; } },
+
+ { 0x0201, 0xffff, [](P) -> u32 { util::stream_format(stream, "mov n, a"); return 1; } },
+ { 0x0208, 0xffff, [](P) -> u32 { util::stream_format(stream, "mov x, a"); return 1; } },
+ { 0x1601, 0xffff, [](P) -> u32 { util::stream_format(stream, "mov (h), a"); return 1; } },
+ { 0x1405, 0xffff, [](P) -> u32 { util::stream_format(stream, "mov a, (h)"); return 1; } },
+ { 0x1605, 0xffff, [](P) -> u32 { util::stream_format(stream, "xchg (h), a"); return 1; } },
+
+ { 0xc000, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "ad a, %s", reg4(opcode)); return 1; } },
+ { 0xc200, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "and a, %s", reg4(opcode)); return 1; } },
+ { 0xc400, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "sb a, %s", reg4(opcode)); return 1; } },
+ { 0xc600, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "aor a, %s", reg4(opcode)); return 1; } },
+ { 0xc800, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "ads a, %s", reg4(opcode)); return 1; } },
+ { 0xca00, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "ands a, %s", reg4(opcode)); return 1; } },
+ { 0xcc00, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "sbs a, %s", reg4(opcode)); return 1; } },
+ { 0xce00, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "xor a, %s", reg4(opcode)); return 1; } },
+ { 0xd000, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tadnc a, %s", reg4(opcode)); return 1; } },
+ { 0xd200, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tandnz a, %s", reg4(opcode)); return 1; } },
+ { 0xd400, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbnc a, %s", reg4(opcode)); return 1; } },
+ { 0xd600, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbnz a, %s", reg4(opcode)); return 1; } },
+ { 0xd800, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tadc a, %s", reg4(opcode)); return 1; } },
+ { 0xda00, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tandz a, %s", reg4(opcode)); return 1; } },
+ { 0xdc00, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbc a, %s", reg4(opcode)); return 1; } },
+ { 0xde00, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbz a, %s", reg4(opcode)); return 1; } },
+
+ { 0xc008, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "ad %s, a", reg4(opcode)); return 1; } },
+ { 0xc208, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "and %s, a", reg4(opcode)); return 1; } },
+ { 0xc408, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "sb %s, a", reg4(opcode)); return 1; } },
+ { 0xc608, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "aor %s, a", reg4(opcode)); return 1; } },
+ { 0xc808, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "ads %s, a", reg4(opcode)); return 1; } },
+ { 0xca08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "ands %s, a", reg4(opcode)); return 1; } },
+ { 0xcc08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "sbs %s, a", reg4(opcode)); return 1; } },
+ { 0xce08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "xor %s, a", reg4(opcode)); return 1; } },
+ { 0xd008, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tadnc %s, a", reg4(opcode)); return 1; } },
+ { 0xd208, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tandnz %s, a", reg4(opcode)); return 1; } },
+ { 0xd408, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbnc %s, a", reg4(opcode)); return 1; } },
+ { 0xd608, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbnz %s, a", reg4(opcode)); return 1; } },
+ { 0xd808, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tadc %s, a", reg4(opcode)); return 1; } },
+ { 0xda08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tandz %s, a", reg4(opcode)); return 1; } },
+ { 0xdc08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbc %s, a", reg4(opcode)); return 1; } },
+ { 0xde08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tsbz %s, a", reg4(opcode)); return 1; } },
+
+ { 0xc001, 0xffff, [](P) -> u32 { util::stream_format(stream, "ad a, (h)"); return 1; } },
+ { 0xc201, 0xffff, [](P) -> u32 { util::stream_format(stream, "and a, (h)"); return 1; } },
+ { 0xc401, 0xffff, [](P) -> u32 { util::stream_format(stream, "sb a, (h)"); return 1; } },
+ { 0xc601, 0xffff, [](P) -> u32 { util::stream_format(stream, "aor a, (h)"); return 1; } },
+ { 0xc801, 0xffff, [](P) -> u32 { util::stream_format(stream, "ads a, (h)"); return 1; } },
+ { 0xca01, 0xffff, [](P) -> u32 { util::stream_format(stream, "ands a, (h)"); return 1; } },
+ { 0xcc01, 0xffff, [](P) -> u32 { util::stream_format(stream, "sbs a, (h)"); return 1; } },
+ { 0xce01, 0xffff, [](P) -> u32 { util::stream_format(stream, "xor a, (h)"); return 1; } },
+ { 0xd001, 0xffff, [](P) -> u32 { util::stream_format(stream, "tadnc a, (h)"); return 1; } },
+ { 0xd201, 0xffff, [](P) -> u32 { util::stream_format(stream, "tandnz a, (h)"); return 1; } },
+ { 0xd401, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbnc a, (h)"); return 1; } },
+ { 0xd601, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbnz a, (h)"); return 1; } },
+ { 0xd801, 0xffff, [](P) -> u32 { util::stream_format(stream, "tadc a, (h)"); return 1; } },
+ { 0xda01, 0xffff, [](P) -> u32 { util::stream_format(stream, "tandz a, (h)"); return 1; } },
+ { 0xdc01, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbc a, (h)"); return 1; } },
+ { 0xde01, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbz a, (h)"); return 1; } },
+
+ { 0xc009, 0xffff, [](P) -> u32 { util::stream_format(stream, "ad (h), a"); return 1; } },
+ { 0xc209, 0xffff, [](P) -> u32 { util::stream_format(stream, "and (h), a"); return 1; } },
+ { 0xc409, 0xffff, [](P) -> u32 { util::stream_format(stream, "sb (h), a"); return 1; } },
+ { 0xc609, 0xffff, [](P) -> u32 { util::stream_format(stream, "aor (h), a"); return 1; } },
+ { 0xc809, 0xffff, [](P) -> u32 { util::stream_format(stream, "ads (h), a"); return 1; } },
+ { 0xca09, 0xffff, [](P) -> u32 { util::stream_format(stream, "ands (h), a"); return 1; } },
+ { 0xcc09, 0xffff, [](P) -> u32 { util::stream_format(stream, "sbs (h), a"); return 1; } },
+ { 0xce09, 0xffff, [](P) -> u32 { util::stream_format(stream, "xor (h), a"); return 1; } },
+ { 0xd009, 0xffff, [](P) -> u32 { util::stream_format(stream, "tadnc (h), a"); return 1; } },
+ { 0xd209, 0xffff, [](P) -> u32 { util::stream_format(stream, "tandnz (h), a"); return 1; } },
+ { 0xd409, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbnc (h), a"); return 1; } },
+ { 0xd609, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbnz (h), a"); return 1; } },
+ { 0xd809, 0xffff, [](P) -> u32 { util::stream_format(stream, "tadc (h), a"); return 1; } },
+ { 0xda09, 0xffff, [](P) -> u32 { util::stream_format(stream, "tandz (h), a"); return 1; } },
+ { 0xdc09, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbc (h), a"); return 1; } },
+ { 0xde09, 0xffff, [](P) -> u32 { util::stream_format(stream, "tsbz (h), a"); return 1; } },
+
+ { 0x1a01, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tbli a, (%s)", reg4(opcode)); return 1; } },
+ { 0x1a02, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tbli x, (%s)", reg4(opcode)); return 1; } },
+ { 0x1a04, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "tbli y, (%s)", reg4(opcode)); return 1; } },
+ { 0x1a08, 0xfe0f, [](P) -> u32 { util::stream_format(stream, "calli (%s)", reg4(opcode)); return 1; } },
+
+ { 0x0101, 0xffff, [](P) -> u32 { util::stream_format(stream, "mon"); return 1; } },
+
+ { 0x0000, 0x0000, [](P) -> u32 { util::stream_format(stream, "?%04x", opcode); return 1; } },
+};
+
+#undef P
+
+offs_t upd177x_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
+{
+ u16 opcode = opcodes.r16(pc);
+
+ for(u32 i=0;; i++)
+ if((opcode & instructions[i].mask) == instructions[i].value)
+ return instructions[i].cb(stream, opcode, pc) | SUPPORTED;
+ return 0;
+}
diff --git a/src/devices/cpu/upd177x/upd177xd.h b/src/devices/cpu/upd177x/upd177xd.h
new file mode 100644
index 00000000000..7cefe63aec0
--- /dev/null
+++ b/src/devices/cpu/upd177x/upd177xd.h
@@ -0,0 +1,41 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// upd177X disassembler
+
+#ifndef MAME_CPU_UPD177X_UPD177XD_H
+#define MAME_CPU_UPD177X_UPD177XD_H
+
+#pragma once
+
+class upd177x_disassembler : public util::disasm_interface
+{
+public:
+ upd177x_disassembler() = default;
+ virtual ~upd177x_disassembler() = default;
+
+ virtual u32 opcode_alignment() const override;
+ virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
+
+private:
+ struct instruction {
+ u16 value;
+ u16 mask;
+ u32 (*cb)(std::ostream &, u16, u16);
+ };
+
+ static const instruction instructions[];
+
+ static std::string reg4(u16 opcode);
+ static std::string reg9(u16 opcode);
+ static std::string imm8(u16 opcode);
+ static std::string imm7(u16 opcode);
+ static std::string imm6(u16 opcode);
+ static std::string imm4(u16 opcode);
+ static std::string imm3_5(u16 opcode);
+ static std::string abs12(u16 opcode, u16 pc);
+ static std::string abs8(u16 opcode, u16 pc);
+ static std::string abs4_4(u16 opcode, u16 pc);
+};
+
+#endif // MAME_CPU_upd177X_upd177XD_H
diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp
index 251006a1107..f836d1074a1 100644
--- a/src/devices/cpu/upd7810/upd7810.cpp
+++ b/src/devices/cpu/upd7810/upd7810.cpp
@@ -382,6 +382,7 @@ STOP 01001000 10111011 12 stop
DEFINE_DEVICE_TYPE(UPD7810, upd7810_device, "upd7810", "NEC uPD7810")
+DEFINE_DEVICE_TYPE(UPD78C10, upd78c10_device, "upd78c10", "NEC uPD78C10")
DEFINE_DEVICE_TYPE(UPD7807, upd7807_device, "upd7807", "NEC uPD7807")
DEFINE_DEVICE_TYPE(UPD7801, upd7801_device, "upd7801", "NEC uPD7801")
DEFINE_DEVICE_TYPE(UPD78C05, upd78c05_device, "upd78c05", "NEC uPD78C05")
@@ -450,6 +451,16 @@ upd7810_device::upd7810_device(const machine_config &mconfig, const char *tag, d
{
}
+upd78c10_device::upd78c10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map)
+ : upd7810_device(mconfig, type, tag, owner, clock, internal_map)
+{
+}
+
+upd78c10_device::upd78c10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd78c10_device(mconfig, UPD78C10, tag, owner, clock, address_map_constructor(FUNC(upd78c10_device::upd_internal_256_ram_map), this))
+{
+}
+
void upd7807_device::configure_ops()
{
m_opXX = s_opXX_7807;
@@ -551,27 +562,27 @@ std::unique_ptr<util::disasm_interface> upd78c05_device::create_disassembler()
return std::make_unique<upd78c05_disassembler>();
}
-WRITE8_MEMBER(upd7810_device::pa_w)
+void upd7810_device::pa_w(uint8_t data, uint8_t mem_mask)
{
COMBINE_DATA(&m_pa_in);
}
-WRITE8_MEMBER(upd7810_device::pb_w)
+void upd7810_device::pb_w(uint8_t data, uint8_t mem_mask)
{
COMBINE_DATA(&m_pb_in);
}
-WRITE8_MEMBER(upd7810_device::pc_w)
+void upd7810_device::pc_w(uint8_t data, uint8_t mem_mask)
{
COMBINE_DATA(&m_pc_in);
}
-WRITE8_MEMBER(upd7810_device::pd_w)
+void upd7810_device::pd_w(uint8_t data, uint8_t mem_mask)
{
COMBINE_DATA(&m_pd_in);
}
-WRITE8_MEMBER(upd7810_device::pf_w)
+void upd7810_device::pf_w(uint8_t data, uint8_t mem_mask)
{
COMBINE_DATA(&m_pf_in);
}
diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h
index 6e81369617e..1eb39a2b975 100644
--- a/src/devices/cpu/upd7810/upd7810.h
+++ b/src/devices/cpu/upd7810/upd7810.h
@@ -77,11 +77,11 @@ public:
auto pt_in_cb() { return m_pt_in_cb.bind(); }
- DECLARE_WRITE8_MEMBER(pa_w);
- DECLARE_WRITE8_MEMBER(pb_w);
- DECLARE_WRITE8_MEMBER(pc_w);
- DECLARE_WRITE8_MEMBER(pd_w);
- DECLARE_WRITE8_MEMBER(pf_w);
+ void pa_w(uint8_t data, uint8_t mem_mask = ~0);
+ void pb_w(uint8_t data, uint8_t mem_mask = ~0);
+ void pc_w(uint8_t data, uint8_t mem_mask = ~0);
+ void pd_w(uint8_t data, uint8_t mem_mask = ~0);
+ void pf_w(uint8_t data, uint8_t mem_mask = ~0);
protected:
void upd_internal_128_ram_map(address_map &map);
@@ -1368,6 +1368,17 @@ protected:
};
+class upd78c10_device : public upd7810_device
+{
+public:
+ // construction/destruction
+ upd78c10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ upd78c10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map);
+};
+
+
class upd7807_device : public upd7810_device
{
public:
@@ -1427,6 +1438,7 @@ public:
DECLARE_DEVICE_TYPE(UPD7810, upd7810_device)
+DECLARE_DEVICE_TYPE(UPD78C10, upd78c10_device)
DECLARE_DEVICE_TYPE(UPD7807, upd7807_device)
DECLARE_DEVICE_TYPE(UPD7801, upd7801_device)
DECLARE_DEVICE_TYPE(UPD78C05, upd78c05_device)
diff --git a/src/devices/cpu/upd7810/upd7811.cpp b/src/devices/cpu/upd7810/upd7811.cpp
index 3c81116bfc8..7ea05837903 100644
--- a/src/devices/cpu/upd7810/upd7811.cpp
+++ b/src/devices/cpu/upd7810/upd7811.cpp
@@ -29,9 +29,15 @@ void upd7810_device::upd_internal_4096_rom_map(address_map &map)
map(0xff00, 0xffff).ram();
}
-DEFINE_DEVICE_TYPE(UPD7811, upd7811_device, "upd78c11", "NEC uPD78C11")
+DEFINE_DEVICE_TYPE(UPD7811, upd7811_device, "upd7811", "NEC uPD7811")
+DEFINE_DEVICE_TYPE(UPD78C11, upd78c11_device, "upd78c11", "NEC uPD78C11")
upd7811_device::upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: upd7810_device(mconfig, UPD7811, tag, owner, clock, address_map_constructor(FUNC(upd7811_device::upd_internal_4096_rom_map), this))
{
}
+
+upd78c11_device::upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : upd78c10_device(mconfig, UPD78C11, tag, owner, clock, address_map_constructor(FUNC(upd78c11_device::upd_internal_4096_rom_map), this))
+{
+}
diff --git a/src/devices/cpu/upd7810/upd7811.h b/src/devices/cpu/upd7810/upd7811.h
index a91111dba52..2d98f64da5f 100644
--- a/src/devices/cpu/upd7810/upd7811.h
+++ b/src/devices/cpu/upd7810/upd7811.h
@@ -9,6 +9,7 @@
#include "upd7810.h"
DECLARE_DEVICE_TYPE(UPD7811, upd7811_device)
+DECLARE_DEVICE_TYPE(UPD78C11, upd78c11_device)
class upd7811_device : public upd7810_device
{
@@ -17,4 +18,11 @@ public:
upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
+class upd78c11_device : public upd78c10_device
+{
+public:
+ // construction/destruction
+ upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+};
+
#endif // MAME_CPU_UPD7810_UPD7811_H
diff --git a/src/devices/cpu/upd78k/upd78k3d.cpp b/src/devices/cpu/upd78k/upd78k3d.cpp
index b251f06e6b0..009a21aa929 100644
--- a/src/devices/cpu/upd78k/upd78k3d.cpp
+++ b/src/devices/cpu/upd78k/upd78k3d.cpp
@@ -476,10 +476,10 @@ offs_t upd78k3_disassembler::dasm_09xx(std::ostream &stream, u8 op2, offs_t pc,
else if ((op2 & 0xfe) == 0xf0)
{
util::stream_format(stream, "%-8s", "MOV");
- if (!BIT(op2, 4))
+ if (!BIT(op2, 0))
stream << "A,";
format_abs16(stream, opcodes.r16(pc + 2));
- if (BIT(op2, 4))
+ if (BIT(op2, 0))
stream << ",A";
return 4 | SUPPORTED;
}
@@ -935,7 +935,7 @@ offs_t upd78k3_disassembler::disassemble(std::ostream &stream, offs_t pc, const
}
else if (BIT(op, 1))
{
- util::stream_format(stream, "%-8s%s,", "DBNZ", s_r_names[op & 0x07]);
+ util::stream_format(stream, "%-8s%c,", "DBNZ", BIT(op, 0) ? 'B' : 'C');
format_jdisp8(stream, pc + 2, opcodes.r8(pc + 1));
return 2 | SUPPORTED;
}
diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp
index 7d7ea159d6c..48956d8f283 100644
--- a/src/devices/cpu/z180/z180.cpp
+++ b/src/devices/cpu/z180/z180.cpp
@@ -102,7 +102,6 @@ z180_device::z180_device(const machine_config &mconfig, device_type type, const
m_asci_stat[0] = 0;
m_asci_tdr[0] = m_asci_tdr[1] = 0;
m_asci_rdr[0] = m_asci_rdr[1] = 0;
- m_asci_tc[0].w = m_asci_tc[1].w = 0;
m_csio_trdr = 0;
m_tmdr[0].w = m_tmdr[1].w = 0;
m_rldr[0].w = m_rldr[1].w = 0xffff;
@@ -130,13 +129,20 @@ hd64180rp_device::hd64180rp_device(const machine_config &mconfig, const char *ta
set_address_width(19);
}
+z8s180_device::z8s180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+ : z180_device(mconfig, type, tag, owner, clock, false, address_map_constructor())
+{
+ // some arbitrary initial values
+ m_asci_tc[0].w = m_asci_tc[1].w = 0;
+}
+
z8s180_device::z8s180_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : z180_device(mconfig, Z8S180, tag, owner, clock, false, address_map_constructor())
+ : z8s180_device(mconfig, Z8S180, tag, owner, clock)
{
}
z80182_device::z80182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : z180_device(mconfig, Z80182, tag, owner, clock, false, address_map_constructor())
+ : z8s180_device(mconfig, Z80182, tag, owner, clock)
{
}
@@ -322,13 +328,13 @@ bool z180_device::get_tend1()
#define Z180_ASEXT1_MASK 0x1f
-/* 1e clock multiplier */
+/* 1e (Z8S180/Z8L180) clock multiplier */
#define Z180_CMR_X2 0x80
#define Z180_CMR_LOW_NOISE 0x40
#define Z180_CMR_MASK 0xc0
-/* 1f chip control register */
+/* 1f (Z8S180/Z8L180) chip control register */
#define Z180_CCR_CLOCK_DIVIDE 0x80
#define Z180_CCR_STDBY_IDLE1 0x40
#define Z180_CCR_BREXT 0x20
@@ -643,21 +649,6 @@ uint8_t z180_device::z180_internal_port_read(uint8_t port)
LOG("Z180 TCR rd $%02x ($%02x)\n", data, m_tcr);
break;
- case 0x11:
- data = 0xff;
- LOG("Z180 IO11 rd $%02x\n", data);
- break;
-
- case 0x12:
- data = m_asci_ext[0];
- LOG("Z180 ASEXT0 rd $%02x ($%02x)\n", data, m_asci_ext[0]);
- break;
-
- case 0x13:
- data = m_asci_ext[1];
- LOG("Z180 ASEXT1 rd $%02x ($%02x)\n", data, m_asci_ext[1]);
- break;
-
case 0x14:
data = m_tmdr_value[1];
LOG("Z180 TMDR1L rd $%02x ($%02x)\n", data, m_tmdr[1].w);
@@ -723,36 +714,6 @@ uint8_t z180_device::z180_internal_port_read(uint8_t port)
LOG("Z180 IO19 rd $%02x\n", data);
break;
- case 0x1a:
- data = m_asci_tc[0].b.l;
- LOG("Z180 ASTC0L rd $%02x ($%04x)\n", data, m_asci_tc[0].w);
- break;
-
- case 0x1b:
- data = m_asci_tc[0].b.h;
- LOG("Z180 ASTC0H rd $%02x ($%04x)\n", data, m_asci_tc[0].w);
- break;
-
- case 0x1c:
- data = m_asci_tc[1].b.l;
- LOG("Z180 ASTC1L rd $%02x ($%04x)\n", data, m_asci_tc[1].w);
- break;
-
- case 0x1d:
- data = m_asci_tc[1].b.h;
- LOG("Z180 ASTC1H rd $%02x ($%04x)\n", data, m_asci_tc[1].w);
- break;
-
- case 0x1e:
- data = m_cmr | ~Z180_CMR_MASK;
- LOG("Z180 CMR rd $%02x ($%02x)\n", data, m_cmr);
- break;
-
- case 0x1f:
- data = m_ccr;
- LOG("Z180 CCR rd $%02x\n", data);
- break;
-
case 0x20:
data = m_dma_sar0.b.l;
LOG("Z180 SAR0L rd $%02x ($%05x)\n", data, m_dma_sar0.d);
@@ -858,21 +819,11 @@ uint8_t z180_device::z180_internal_port_read(uint8_t port)
LOG("Z180 ITC rd $%02x ($%02x)\n", data, m_itc);
break;
- case 0x35:
- data = 0xff;
- LOG("Z180 IO35 rd $%02x\n", data);
- break;
-
case 0x36:
data = m_rcr | ~Z180_RCR_MASK;
LOG("Z180 RCR rd $%02x ($%02x)\n", data, m_rcr);
break;
- case 0x37:
- data = 0xff;
- LOG("Z180 IO37 rd $%02x\n", data);
- break;
-
case 0x38:
data = m_mmu_cbr;
LOG("Z180 CBR rd $%02x\n", data);
@@ -888,21 +839,6 @@ uint8_t z180_device::z180_internal_port_read(uint8_t port)
LOG("Z180 CBAR rd $%02x\n", data);
break;
- case 0x3b:
- data = 0xff;
- LOG("Z180 IO3B rd $%02x\n", data);
- break;
-
- case 0x3c:
- data = 0xff;
- LOG("Z180 IO3C rd $%02x\n", data);
- break;
-
- case 0x3d:
- data = 0xff;
- LOG("Z180 IO3D rd $%02x\n", data);
- break;
-
case 0x3e:
data = m_omcr | Z180_OMCR_M1TE | ~Z180_OMCR_MASK;
LOG("Z180 OMCR rd $%02x ($%02x)\n", data, m_omcr);
@@ -912,6 +848,11 @@ uint8_t z180_device::z180_internal_port_read(uint8_t port)
data = m_iocr | ~(m_extended_io ? 0xa0 : 0xe0);
LOG("Z180 IOCR rd $%02x ($%02x)\n", data, m_iocr);
break;
+
+ default:
+ data = 0xff;
+ LOG("Z180 IO%02X rd $%02x\n", port, data);
+ break;
}
return data;
@@ -1027,21 +968,6 @@ void z180_device::z180_internal_port_write(uint8_t port, uint8_t data)
break;
- case 0x11:
- LOG("Z180 IO11 wr $%02x\n", data);
- // IO11 does not exist
- break;
-
- case 0x12:
- LOG("Z180 ASEXT0 wr $%02x ($%02x)\n", data, data & Z180_ASEXT0_MASK & ~Z180_ASEXT0_BRK_DET);
- m_asci_ext[0] = (m_asci_ext[0] & Z180_ASEXT0_BRK_DET) | (data & Z180_ASEXT0_MASK & ~Z180_ASEXT0_BRK_DET);
- break;
-
- case 0x13:
- LOG("Z180 ASEXT1 wr $%02x ($%02x)\n", data, data & Z180_ASEXT1_MASK & ~Z180_ASEXT1_BRK_DET);
- m_asci_ext[1] = (m_asci_ext[1] & Z180_ASEXT1_BRK_DET) | (data & Z180_ASEXT1_MASK & ~Z180_ASEXT1_BRK_DET);
- break;
-
case 0x14:
LOG("Z180 TMDR1L wr $%02x\n", data);
m_tmdr[1].b.l = data;
@@ -1069,41 +995,6 @@ void z180_device::z180_internal_port_write(uint8_t port, uint8_t data)
// FRC is read-only
break;
- case 0x19:
- LOG("Z180 IO19 wr $%02x\n", data);
- // IO19 does not exist
- break;
-
- case 0x1a:
- LOG("Z180 ASTC0L wr $%02x\n", data);
- m_asci_tc[0].b.l = data;
- break;
-
- case 0x1b:
- LOG("Z180 ASTC0H wr $%02x\n", data);
- m_asci_tc[0].b.h = data;
- break;
-
- case 0x1c:
- LOG("Z180 ASTC1L wr $%02x\n", data);
- m_asci_tc[1].b.l = data;
- break;
-
- case 0x1d:
- LOG("Z180 ASTC1H wr $%02x\n", data);
- m_asci_tc[1].b.h = data;
- break;
-
- case 0x1e:
- LOG("Z180 CMR wr $%02x ($%02x)\n", data, data & Z180_CMR_MASK);
- m_cmr = data & Z180_CMR_MASK;
- break;
-
- case 0x1f:
- LOG("Z180 CCR wr $%02x\n", data);
- m_ccr = data;
- break;
-
case 0x20:
LOG("Z180 SAR0L wr $%02x\n", data);
m_dma_sar0.b.l = data;
@@ -1217,21 +1108,11 @@ void z180_device::z180_internal_port_write(uint8_t port, uint8_t data)
m_itc = (m_itc & Z180_ITC_UFO) | (data & Z180_ITC_MASK & ~Z180_ITC_UFO);
break;
- case 0x35:
- LOG("Z180 IO35 wr $%02x\n", data);
- // IO35 does not exist
- break;
-
case 0x36:
LOG("Z180 RCR wr $%02x ($%02x)\n", data, data & Z180_RCR_MASK);
m_rcr = data & Z180_RCR_MASK;
break;
- case 0x37:
- LOG("Z180 IO37 wr $%02x\n", data);
- // IO37 does not exist
- break;
-
case 0x38:
LOG("Z180 CBR wr $%02x\n", data);
m_mmu_cbr = data;
@@ -1250,21 +1131,6 @@ void z180_device::z180_internal_port_write(uint8_t port, uint8_t data)
z180_mmu();
break;
- case 0x3b:
- LOG("Z180 IO3B wr $%02x\n", data);
- // IO3B does not exist
- break;
-
- case 0x3c:
- LOG("Z180 IO3C wr $%02x\n", data);
- // IO3C does not exist
- break;
-
- case 0x3d:
- LOG("Z180 IO3D wr $%02x\n", data);
- // IO3D does not exist
- break;
-
case 0x3e:
LOG("Z180 OMCR wr $%02x ($%02x)\n", data, data & Z180_OMCR_MASK);
m_omcr = data & Z180_OMCR_MASK;
@@ -1274,6 +1140,117 @@ void z180_device::z180_internal_port_write(uint8_t port, uint8_t data)
LOG("Z180 IOCR wr $%02x ($%02x)\n", data, data & (m_extended_io ? 0xa0 : 0xe0));
m_iocr = data & (m_extended_io ? 0xa0 : 0xe0);
break;
+
+ default:
+ LOG("Z180 IO%02X wr $%02x\n", port, data);
+ break;
+
+ }
+}
+
+uint8_t z8s180_device::z180_internal_port_read(uint8_t port)
+{
+ uint8_t data = 0xff;
+
+ switch (port)
+ {
+ case 0x12:
+ data = m_asci_ext[0];
+ LOG("Z180 ASEXT0 rd $%02x ($%02x)\n", data, m_asci_ext[0]);
+ break;
+
+ case 0x13:
+ data = m_asci_ext[1];
+ LOG("Z180 ASEXT1 rd $%02x ($%02x)\n", data, m_asci_ext[1]);
+ break;
+
+ case 0x1a:
+ LOG("Z180 ASTC0L wr $%02x\n", data);
+ m_asci_tc[0].b.l = data;
+ break;
+
+ case 0x1b:
+ LOG("Z180 ASTC0H wr $%02x\n", data);
+ m_asci_tc[0].b.h = data;
+ break;
+
+ case 0x1c:
+ LOG("Z180 ASTC1L wr $%02x\n", data);
+ m_asci_tc[1].b.l = data;
+ break;
+
+ case 0x1d:
+ LOG("Z180 ASTC1H wr $%02x\n", data);
+ m_asci_tc[1].b.h = data;
+ break;
+
+ case 0x1e:
+ data = m_cmr | ~Z180_CMR_MASK;
+ LOG("Z180 CMR rd $%02x ($%02x)\n", data, m_cmr);
+ break;
+
+ case 0x1f:
+ data = m_ccr;
+ LOG("Z180 CCR rd $%02x\n", data);
+ break;
+
+ default:
+ data = z180_device::z180_internal_port_read(port);
+ break;
+ }
+
+ return data;
+}
+
+void z8s180_device::z180_internal_port_write(uint8_t port, uint8_t data)
+{
+ switch (port)
+ {
+ case 0x12:
+ LOG("Z180 ASEXT0 wr $%02x ($%02x)\n", data, data & Z180_ASEXT0_MASK & ~Z180_ASEXT0_BRK_DET);
+ m_asci_ext[0] = (m_asci_ext[0] & Z180_ASEXT0_BRK_DET) | (data & Z180_ASEXT0_MASK & ~Z180_ASEXT0_BRK_DET);
+ break;
+
+ case 0x13:
+ LOG("Z180 ASEXT1 wr $%02x ($%02x)\n", data, data & Z180_ASEXT1_MASK & ~Z180_ASEXT1_BRK_DET);
+ m_asci_ext[1] = (m_asci_ext[1] & Z180_ASEXT1_BRK_DET) | (data & Z180_ASEXT1_MASK & ~Z180_ASEXT1_BRK_DET);
+ break;
+
+ case 0x1a:
+ data = m_asci_tc[0].b.l;
+ LOG("Z180 ASTC0L rd $%02x ($%04x)\n", data, m_asci_tc[0].w);
+ break;
+
+ case 0x1b:
+ data = m_asci_tc[0].b.h;
+ LOG("Z180 ASTC0H rd $%02x ($%04x)\n", data, m_asci_tc[0].w);
+ break;
+
+ case 0x1c:
+ data = m_asci_tc[1].b.l;
+ LOG("Z180 ASTC1L rd $%02x ($%04x)\n", data, m_asci_tc[1].w);
+ break;
+
+ case 0x1d:
+ data = m_asci_tc[1].b.h;
+ LOG("Z180 ASTC1H rd $%02x ($%04x)\n", data, m_asci_tc[1].w);
+ break;
+
+ case 0x1e:
+ LOG("Z180 CMR wr $%02x ($%02x)\n", data, data & Z180_CMR_MASK);
+ m_cmr = data & Z180_CMR_MASK;
+ notify_clock_changed();
+ break;
+
+ case 0x1f:
+ LOG("Z180 CCR wr $%02x\n", data);
+ m_ccr = data;
+ notify_clock_changed();
+ break;
+
+ default:
+ z180_device::z180_internal_port_write(port, data);
+ break;
}
}
@@ -1750,16 +1727,12 @@ void z180_device::device_start()
state_add(Z180_STAT0, "STAT0", m_asci_stat[0]);
state_add(Z180_TDR0, "TDR0", m_asci_tdr[0]);
state_add(Z180_RDR0, "RDR0", m_asci_rdr[0]);
- state_add(Z180_ASEXT0, "ASEXT0", m_asci_ext[0]).mask(Z180_ASEXT0_MASK);
- state_add(Z180_ASTC0, "ASTC0", m_asci_tc[0].w);
state_add(Z180_CNTLA1, "CNTLA1", m_asci_cntla[1]);
state_add(Z180_CNTLB1, "CNTLB1", m_asci_cntlb[1]);
state_add(Z180_STAT1, "STAT1", m_asci_stat[1]);
state_add(Z180_TDR1, "TDR1", m_asci_tdr[1]);
state_add(Z180_RDR1, "RDR1", m_asci_rdr[1]);
- state_add(Z180_ASEXT1, "ASEXT1", m_asci_ext[1]).mask(Z180_ASEXT1_MASK);
- state_add(Z180_ASTC1, "ASTC1", m_asci_tc[1].w);
state_add(Z180_CNTR, "CNTR", m_csio_cntr).mask(Z180_CNTR_MASK);
state_add(Z180_TRDR, "TRDR", m_csio_trdr);
@@ -1771,8 +1744,6 @@ void z180_device::device_start()
state_add(Z180_TCR, "TCR", m_tcr);
state_add(Z180_FRC, "FRC", m_frc);
- state_add(Z180_CMR, "CMR", m_cmr).mask(Z180_CMR_MASK);
- state_add(Z180_CCR, "CCR", m_ccr);
state_add(Z180_SAR0, "SAR0", m_dma_sar0.d).mask(Z180_SAR0_MASK);
state_add(Z180_DAR0, "DAR0", m_dma_dar0.d).mask(Z180_DAR0_MASK);
@@ -1831,9 +1802,6 @@ void z180_device::device_start()
save_item(NAME(m_asci_stat));
save_item(NAME(m_asci_tdr));
save_item(NAME(m_asci_rdr));
- save_item(NAME(m_asci_ext));
- save_item(NAME(m_asci_tc[0].w));
- save_item(NAME(m_asci_tc[1].w));
save_item(NAME(m_csio_cntr));
save_item(NAME(m_csio_trdr));
save_item(NAME(m_tmdr[0].w));
@@ -1842,8 +1810,6 @@ void z180_device::device_start()
save_item(NAME(m_rldr[1].w));
save_item(NAME(m_tcr));
save_item(NAME(m_frc));
- save_item(NAME(m_cmr));
- save_item(NAME(m_ccr));
save_item(NAME(m_dma_sar0.d));
save_item(NAME(m_dma_dar0.d));
save_item(NAME(m_dma_bcr[0].w));
@@ -1870,6 +1836,26 @@ void z180_device::device_start()
set_icountptr(m_icount);
}
+void z8s180_device::device_start()
+{
+ z180_device::device_start();
+
+ state_add(Z180_ASEXT0, "ASEXT0", m_asci_ext[0]).mask(Z180_ASEXT0_MASK);
+ state_add(Z180_ASTC0, "ASTC0", m_asci_tc[0].w);
+
+ state_add(Z180_ASEXT1, "ASEXT1", m_asci_ext[1]).mask(Z180_ASEXT1_MASK);
+ state_add(Z180_ASTC1, "ASTC1", m_asci_tc[1].w);
+
+ state_add(Z180_CMR, "CMR", m_cmr).mask(Z180_CMR_MASK);
+ state_add(Z180_CCR, "CCR", m_ccr);
+
+ save_item(NAME(m_asci_ext));
+ save_item(NAME(m_asci_tc[0].w));
+ save_item(NAME(m_asci_tc[1].w));
+ save_item(NAME(m_cmr));
+ save_item(NAME(m_ccr));
+}
+
/****************************************************************************
* Reset registers to their initial values
****************************************************************************/
@@ -1934,10 +1920,6 @@ void z180_device::device_reset()
m_asci_stat[1] = Z180_STAT1_TDRE;
m_csio_cntr = 0x07;
m_tcr = 0x00;
- m_asci_ext[0] = 0x00;
- m_asci_ext[1] = 0x00;
- m_cmr = 0x00;
- m_ccr = 0x00;
m_dma_iar1.b.h2 = 0x00;
m_dstat = Z180_DSTAT_DWE1 | Z180_DSTAT_DWE0;
m_dmode = 0x00;
@@ -1954,6 +1936,17 @@ void z180_device::device_reset()
z180_mmu();
}
+void z8s180_device::device_reset()
+{
+ z180_device::device_reset();
+
+ m_asci_ext[0] = 0x00;
+ m_asci_ext[1] = 0x00;
+ m_cmr = 0x00;
+ m_ccr = 0x00;
+ notify_clock_changed();
+}
+
/* Handle PRT timers, decreasing them after 20 clocks and returning the new icount base that needs to be used for the next check */
void z180_device::clock_timers()
{
diff --git a/src/devices/cpu/z180/z180.h b/src/devices/cpu/z180/z180.h
index ee75a43ca92..69663c73814 100644
--- a/src/devices/cpu/z180/z180.h
+++ b/src/devices/cpu/z180/z180.h
@@ -169,16 +169,12 @@ private:
uint8_t m_asci_stat[2]; // ASCI status register 0-1
uint8_t m_asci_tdr[2]; // ASCI transmit data register 0-1
uint8_t m_asci_rdr[2]; // ASCI receive data register 0-1
- uint8_t m_asci_ext[2]; // (Z8S180/Z8L180) ASCI extension control register 0-1
- PAIR16 m_asci_tc[2]; // (Z8S180/Z8L180) ASCI time constant ch 0-1
uint8_t m_csio_cntr; // CSI/O control/status register
uint8_t m_csio_trdr; // CSI/O transmit/receive register
PAIR16 m_tmdr[2]; // TIMER data register ch 0-1
PAIR16 m_rldr[2]; // TIMER reload register ch 0-1
uint8_t m_tcr; // TIMER control register
uint8_t m_frc; // free running counter
- uint8_t m_cmr; // (Z8S180/Z8L180) clock multiplier
- uint8_t m_ccr; // (Z8S180/Z8L180) chip control register
PAIR m_dma_sar0; // DMA source address register ch 0
PAIR m_dma_dar0; // DMA destination address register ch 0
PAIR16 m_dma_bcr[2]; // DMA byte register ch 0-1
@@ -1817,9 +1813,29 @@ class z8s180_device : public z180_device
public:
// construction/destruction
z8s180_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ z8s180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // device_execute_interface overrides
+ virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return BIT(m_cmr, 7) ? (clocks * 2) : BIT(m_ccr, 7) ? clocks : (clocks + 2 - 1) / 2; }
+ virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const noexcept override { return BIT(m_cmr, 7) ? (cycles + 2 - 1) / 2 : BIT(m_ccr, 7) ? cycles : (cycles * 2); }
+
+ virtual uint8_t z180_internal_port_read(uint8_t port) override;
+ virtual void z180_internal_port_write(uint8_t port, uint8_t data) override;
+
+private:
+ uint8_t m_asci_ext[2]; // ASCI extension control register 0-1
+ PAIR16 m_asci_tc[2]; // ASCI time constant ch 0-1
+ uint8_t m_cmr; // clock multiplier
+ uint8_t m_ccr; // chip control register
};
-class z80182_device : public z180_device
+class z80182_device : public z8s180_device
{
public:
// construction/destruction
diff --git a/src/devices/cpu/z80/tmpz84c011.cpp b/src/devices/cpu/z80/tmpz84c011.cpp
index 5dd354a1f19..c28aa2b243a 100644
--- a/src/devices/cpu/z80/tmpz84c011.cpp
+++ b/src/devices/cpu/z80/tmpz84c011.cpp
@@ -109,11 +109,11 @@ void tmpz84c011_device::device_reset()
z80_device::device_reset();
// initialize I/O
- tmpz84c011_dir_pa_w(*m_io, 0, 0); tmpz84c011_pa_w(*m_io, 0, 0);
- tmpz84c011_dir_pb_w(*m_io, 0, 0); tmpz84c011_pb_w(*m_io, 0, 0);
- tmpz84c011_dir_pc_w(*m_io, 0, 0); tmpz84c011_pc_w(*m_io, 0, 0);
- tmpz84c011_dir_pd_w(*m_io, 0, 0); tmpz84c011_pd_w(*m_io, 0, 0);
- tmpz84c011_dir_pe_w(*m_io, 0, 0); tmpz84c011_pe_w(*m_io, 0, 0);
+ tmpz84c011_dir_pa_w(0); tmpz84c011_pa_w(0);
+ tmpz84c011_dir_pb_w(0); tmpz84c011_pb_w(0);
+ tmpz84c011_dir_pc_w(0); tmpz84c011_pc_w(0);
+ tmpz84c011_dir_pd_w(0); tmpz84c011_pd_w(0);
+ tmpz84c011_dir_pe_w(0); tmpz84c011_pe_w(0);
}
diff --git a/src/devices/cpu/z80/tmpz84c011.h b/src/devices/cpu/z80/tmpz84c011.h
index 013416cbd9e..89b40a9f6aa 100644
--- a/src/devices/cpu/z80/tmpz84c011.h
+++ b/src/devices/cpu/z80/tmpz84c011.h
@@ -57,27 +57,27 @@ public:
/////////////////////////////////////////////////////////
- DECLARE_READ8_MEMBER( tmpz84c011_pa_r ) { return (m_inportsa() & ~m_pio_dir[0]) | (m_pio_latch[0] & m_pio_dir[0]); }
- DECLARE_READ8_MEMBER( tmpz84c011_pb_r ) { return (m_inportsb() & ~m_pio_dir[1]) | (m_pio_latch[1] & m_pio_dir[1]); }
- DECLARE_READ8_MEMBER( tmpz84c011_pc_r ) { return (m_inportsc() & ~m_pio_dir[2]) | (m_pio_latch[2] & m_pio_dir[2]); }
- DECLARE_READ8_MEMBER( tmpz84c011_pd_r ) { return (m_inportsd() & ~m_pio_dir[3]) | (m_pio_latch[3] & m_pio_dir[3]); }
- DECLARE_READ8_MEMBER( tmpz84c011_pe_r ) { return (m_inportse() & ~m_pio_dir[4]) | (m_pio_latch[4] & m_pio_dir[4]); }
- DECLARE_WRITE8_MEMBER( tmpz84c011_pa_w ) { m_pio_latch[0] = data; m_outportsa(data & m_pio_dir[0]); }
- DECLARE_WRITE8_MEMBER( tmpz84c011_pb_w ) { m_pio_latch[1] = data; m_outportsb(data & m_pio_dir[1]); }
- DECLARE_WRITE8_MEMBER( tmpz84c011_pc_w ) { m_pio_latch[2] = data; m_outportsc(data & m_pio_dir[2]); }
- DECLARE_WRITE8_MEMBER( tmpz84c011_pd_w ) { m_pio_latch[3] = data; m_outportsd(data & m_pio_dir[3]); }
- DECLARE_WRITE8_MEMBER( tmpz84c011_pe_w ) { m_pio_latch[4] = data; m_outportse(data & m_pio_dir[4]); }
-
- DECLARE_READ8_MEMBER( tmpz84c011_dir_pa_r ) { return m_pio_dir[0]; }
- DECLARE_READ8_MEMBER( tmpz84c011_dir_pb_r ) { return m_pio_dir[1]; }
- DECLARE_READ8_MEMBER( tmpz84c011_dir_pc_r ) { return m_pio_dir[2]; }
- DECLARE_READ8_MEMBER( tmpz84c011_dir_pd_r ) { return m_pio_dir[3]; }
- DECLARE_READ8_MEMBER( tmpz84c011_dir_pe_r ) { return m_pio_dir[4]; }
- DECLARE_WRITE8_MEMBER( tmpz84c011_dir_pa_w ) { m_pio_dir[0] = data; }
- DECLARE_WRITE8_MEMBER( tmpz84c011_dir_pb_w ) { m_pio_dir[1] = data; }
- DECLARE_WRITE8_MEMBER( tmpz84c011_dir_pc_w ) { m_pio_dir[2] = data; }
- DECLARE_WRITE8_MEMBER( tmpz84c011_dir_pd_w ) { m_pio_dir[3] = data; }
- DECLARE_WRITE8_MEMBER( tmpz84c011_dir_pe_w ) { m_pio_dir[4] = data; }
+ uint8_t tmpz84c011_pa_r() { return (m_inportsa() & ~m_pio_dir[0]) | (m_pio_latch[0] & m_pio_dir[0]); }
+ uint8_t tmpz84c011_pb_r() { return (m_inportsb() & ~m_pio_dir[1]) | (m_pio_latch[1] & m_pio_dir[1]); }
+ uint8_t tmpz84c011_pc_r() { return (m_inportsc() & ~m_pio_dir[2]) | (m_pio_latch[2] & m_pio_dir[2]); }
+ uint8_t tmpz84c011_pd_r() { return (m_inportsd() & ~m_pio_dir[3]) | (m_pio_latch[3] & m_pio_dir[3]); }
+ uint8_t tmpz84c011_pe_r() { return (m_inportse() & ~m_pio_dir[4]) | (m_pio_latch[4] & m_pio_dir[4]); }
+ void tmpz84c011_pa_w(uint8_t data) { m_pio_latch[0] = data; m_outportsa(data & m_pio_dir[0]); }
+ void tmpz84c011_pb_w(uint8_t data) { m_pio_latch[1] = data; m_outportsb(data & m_pio_dir[1]); }
+ void tmpz84c011_pc_w(uint8_t data) { m_pio_latch[2] = data; m_outportsc(data & m_pio_dir[2]); }
+ void tmpz84c011_pd_w(uint8_t data) { m_pio_latch[3] = data; m_outportsd(data & m_pio_dir[3]); }
+ void tmpz84c011_pe_w(uint8_t data) { m_pio_latch[4] = data; m_outportse(data & m_pio_dir[4]); }
+
+ uint8_t tmpz84c011_dir_pa_r() { return m_pio_dir[0]; }
+ uint8_t tmpz84c011_dir_pb_r() { return m_pio_dir[1]; }
+ uint8_t tmpz84c011_dir_pc_r() { return m_pio_dir[2]; }
+ uint8_t tmpz84c011_dir_pd_r() { return m_pio_dir[3]; }
+ uint8_t tmpz84c011_dir_pe_r() { return m_pio_dir[4]; }
+ void tmpz84c011_dir_pa_w(uint8_t data) { m_pio_dir[0] = data; }
+ void tmpz84c011_dir_pb_w(uint8_t data) { m_pio_dir[1] = data; }
+ void tmpz84c011_dir_pc_w(uint8_t data) { m_pio_dir[2] = data; }
+ void tmpz84c011_dir_pd_w(uint8_t data) { m_pio_dir[3] = data; }
+ void tmpz84c011_dir_pe_w(uint8_t data) { m_pio_dir[4] = data; }
void tmpz84c011_internal_io_map(address_map &map);
protected:
diff --git a/src/devices/cpu/z80/tmpz84c015.cpp b/src/devices/cpu/z80/tmpz84c015.cpp
index 5c6b82a8f88..08ceb2bc1f0 100644
--- a/src/devices/cpu/z80/tmpz84c015.cpp
+++ b/src/devices/cpu/z80/tmpz84c015.cpp
@@ -118,7 +118,7 @@ void tmpz84c015_device::device_start()
void tmpz84c015_device::device_reset()
{
- irq_priority_w(*m_io, 0, 0);
+ irq_priority_w(0);
z80_device::device_reset();
}
@@ -132,12 +132,12 @@ void tmpz84c015_device::device_post_load()
// reinit irq priority
uint8_t prio = m_irq_priority;
m_irq_priority = -1;
- irq_priority_w(*m_io, 0, prio);
+ irq_priority_w(prio);
}
/* CPU interface */
-WRITE8_MEMBER(tmpz84c015_device::irq_priority_w)
+void tmpz84c015_device::irq_priority_w(uint8_t data)
{
data &= 7;
diff --git a/src/devices/cpu/z80/tmpz84c015.h b/src/devices/cpu/z80/tmpz84c015.h
index bb012d5cd14..a5b7027b57a 100644
--- a/src/devices/cpu/z80/tmpz84c015.h
+++ b/src/devices/cpu/z80/tmpz84c015.h
@@ -85,10 +85,10 @@ public:
DECLARE_WRITE_LINE_MEMBER( strobe_a ) { m_pio->strobe_a(state); }
DECLARE_WRITE_LINE_MEMBER( strobe_b ) { m_pio->strobe_b(state); }
- DECLARE_WRITE8_MEMBER( pa_w ) { m_pio->port_a_write(data); }
- DECLARE_READ8_MEMBER( pa_r ) { return m_pio->port_a_read(); }
- DECLARE_WRITE8_MEMBER( pb_w ) { m_pio->port_b_write(data); }
- DECLARE_READ8_MEMBER( pb_r ) { return m_pio->port_b_read(); }
+ void pa_w(uint8_t data) { m_pio->port_a_write(data); }
+ uint8_t pa_r() { return m_pio->port_a_read(); }
+ void pb_w(uint8_t data) { m_pio->port_b_write(data); }
+ uint8_t pb_r() { return m_pio->port_b_read(); }
DECLARE_WRITE_LINE_MEMBER( pa0_w ) { m_pio->pa0_w(state); }
DECLARE_WRITE_LINE_MEMBER( pa1_w ) { m_pio->pa1_w(state); }
DECLARE_WRITE_LINE_MEMBER( pa2_w ) { m_pio->pa2_w(state); }
@@ -108,7 +108,7 @@ public:
/////////////////////////////////////////////////////////
- DECLARE_WRITE8_MEMBER( irq_priority_w );
+ void irq_priority_w(uint8_t data);
void tmpz84c015_internal_io_map(address_map &map);
protected:
@@ -178,12 +178,12 @@ private:
template<unsigned N> DECLARE_WRITE_LINE_MEMBER( zc_cb_trampoline_w ) { m_zc_cb[N](state); }
- DECLARE_READ8_MEMBER( in_pa_cb_trampoline_r ) { return m_in_pa_cb(); }
- DECLARE_WRITE8_MEMBER( out_pa_cb_trampoline_w ) { m_out_pa_cb(data); }
+ uint8_t in_pa_cb_trampoline_r() { return m_in_pa_cb(); }
+ void out_pa_cb_trampoline_w(uint8_t data) { m_out_pa_cb(data); }
DECLARE_WRITE_LINE_MEMBER( out_ardy_cb_trampoline_w ) { m_out_ardy_cb(state); }
- DECLARE_READ8_MEMBER( in_pb_cb_trampoline_r ) { return m_in_pb_cb(); }
- DECLARE_WRITE8_MEMBER( out_pb_cb_trampoline_w ) { m_out_pb_cb(data); }
+ uint8_t in_pb_cb_trampoline_r() { return m_in_pb_cb(); }
+ void out_pb_cb_trampoline_w(uint8_t data) { m_out_pb_cb(data); }
DECLARE_WRITE_LINE_MEMBER( out_brdy_cb_trampoline_w ) { m_out_brdy_cb(state); }
};
diff --git a/src/devices/machine/1ma6.cpp b/src/devices/machine/1ma6.cpp
index 479c7b9d6d3..284088a9f00 100644
--- a/src/devices/machine/1ma6.cpp
+++ b/src/devices/machine/1ma6.cpp
@@ -117,7 +117,7 @@ hp_1ma6_device::hp_1ma6_device(const machine_config &mconfig, const char *tag, d
clear_state();
}
-WRITE8_MEMBER(hp_1ma6_device::reg_w)
+void hp_1ma6_device::reg_w(offs_t offset, uint8_t data)
{
LOG("WR %u=%02x\n" , offset , data);
switch(offset) {
@@ -133,7 +133,7 @@ WRITE8_MEMBER(hp_1ma6_device::reg_w)
}
}
-READ8_MEMBER(hp_1ma6_device::reg_r)
+uint8_t hp_1ma6_device::reg_r(offs_t offset)
{
uint8_t res = 0;
diff --git a/src/devices/machine/1ma6.h b/src/devices/machine/1ma6.h
index d2943857760..cb083e05c88 100644
--- a/src/devices/machine/1ma6.h
+++ b/src/devices/machine/1ma6.h
@@ -23,8 +23,8 @@ public:
hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// Register read/write
- DECLARE_WRITE8_MEMBER(reg_w);
- DECLARE_READ8_MEMBER(reg_r);
+ void reg_w(offs_t offset, uint8_t data);
+ uint8_t reg_r(offs_t offset);
DECLARE_WRITE_LINE_MEMBER(cart_out_w);
DECLARE_WRITE_LINE_MEMBER(hole_w);
diff --git a/src/devices/machine/1mb5.cpp b/src/devices/machine/1mb5.cpp
index 8ed4384e3f5..054202b06e1 100644
--- a/src/devices/machine/1mb5.cpp
+++ b/src/devices/machine/1mb5.cpp
@@ -57,7 +57,7 @@ hp_1mb5_device::hp_1mb5_device(const machine_config &mconfig, const char *tag, d
{
}
-READ8_MEMBER(hp_1mb5_device::cpu_r)
+uint8_t hp_1mb5_device::cpu_r(offs_t offset)
{
uint8_t res = 0;
@@ -87,7 +87,7 @@ READ8_MEMBER(hp_1mb5_device::cpu_r)
return res;
}
-WRITE8_MEMBER(hp_1mb5_device::cpu_w)
+void hp_1mb5_device::cpu_w(offs_t offset, uint8_t data)
{
LOG("WR %u=%02x\n" , offset , data);
@@ -108,7 +108,7 @@ WRITE8_MEMBER(hp_1mb5_device::cpu_w)
}
}
-READ8_MEMBER(hp_1mb5_device::uc_r)
+uint8_t hp_1mb5_device::uc_r(offs_t offset)
{
uint8_t res = 0;
@@ -136,7 +136,7 @@ READ8_MEMBER(hp_1mb5_device::uc_r)
return res;
}
-WRITE8_MEMBER(hp_1mb5_device::uc_w)
+void hp_1mb5_device::uc_w(offs_t offset, uint8_t data)
{
//LOG("WRU %u=%02x SR=%02x\n" , offset , data , m_sr);
diff --git a/src/devices/machine/1mb5.h b/src/devices/machine/1mb5.h
index 351b1f25d6c..13b1296e6cc 100644
--- a/src/devices/machine/1mb5.h
+++ b/src/devices/machine/1mb5.h
@@ -26,12 +26,12 @@ public:
auto int_handler() { return m_int_handler.bind(); }
// CPU access
- DECLARE_READ8_MEMBER(cpu_r);
- DECLARE_WRITE8_MEMBER(cpu_w);
+ uint8_t cpu_r(offs_t offset);
+ void cpu_w(offs_t offset, uint8_t data);
// uC access
- DECLARE_READ8_MEMBER(uc_r);
- DECLARE_WRITE8_MEMBER(uc_w);
+ uint8_t uc_r(offs_t offset);
+ void uc_w(offs_t offset, uint8_t data);
// Signals to CPU
DECLARE_READ_LINE_MEMBER(irl_r);
diff --git a/src/devices/machine/28fxxx.cpp b/src/devices/machine/28fxxx.cpp
index 0643685589a..e434a761c46 100644
--- a/src/devices/machine/28fxxx.cpp
+++ b/src/devices/machine/28fxxx.cpp
@@ -118,7 +118,7 @@ void base_28fxxx_device::erase()
memset(m_data.get(), 0xff, m_size);
}
-READ8_MEMBER(base_28fxxx_device::read)
+u8 base_28fxxx_device::read(address_space &space, offs_t offset, u8 mem_mask)
{
switch (m_state)
{
@@ -146,7 +146,7 @@ READ8_MEMBER(base_28fxxx_device::read)
}
}
-WRITE8_MEMBER(base_28fxxx_device::write)
+void base_28fxxx_device::write(offs_t offset, u8 data)
{
// writes are ignored unless Vpp is asserted
if (!m_program_power)
diff --git a/src/devices/machine/28fxxx.h b/src/devices/machine/28fxxx.h
index dd64118cfce..153fd785960 100644
--- a/src/devices/machine/28fxxx.h
+++ b/src/devices/machine/28fxxx.h
@@ -22,8 +22,8 @@ public:
};
DECLARE_WRITE_LINE_MEMBER(vpp) { m_program_power = state; }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ u8 read(address_space &space, offs_t offset, u8 mem_mask = ~0);
+ void write(offs_t offset, u8 data);
protected:
base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size, u8 manufacturer_code, u8 device_code);
diff --git a/src/devices/machine/40105.cpp b/src/devices/machine/40105.cpp
index 0026f86a093..ffcfab73da9 100644
--- a/src/devices/machine/40105.cpp
+++ b/src/devices/machine/40105.cpp
@@ -115,11 +115,6 @@ void cmos_40105_device::write(u8 data)
m_d = data & 0x0f;
}
-WRITE8_MEMBER(cmos_40105_device::write)
-{
- write(data);
-}
-
//-------------------------------------------------
// load_input - load new data into FIFO
diff --git a/src/devices/machine/40105.h b/src/devices/machine/40105.h
index 7648cf3e074..5b35de12a58 100644
--- a/src/devices/machine/40105.h
+++ b/src/devices/machine/40105.h
@@ -43,7 +43,6 @@ public:
u8 read();
void write(u8 data);
- DECLARE_WRITE8_MEMBER(write);
DECLARE_WRITE_LINE_MEMBER( si_w );
DECLARE_WRITE_LINE_MEMBER( so_w );
diff --git a/src/devices/machine/64h156.cpp b/src/devices/machine/64h156.cpp
index 4b2cd724dca..7826cfdce58 100644
--- a/src/devices/machine/64h156.cpp
+++ b/src/devices/machine/64h156.cpp
@@ -423,7 +423,7 @@ int c64h156_device::get_next_bit(attotime &tm, const attotime &limit)
// yb_r -
//-------------------------------------------------
-READ8_MEMBER( c64h156_device::yb_r )
+uint8_t c64h156_device::yb_r()
{
if (checkpoint_live.accl) {
return checkpoint_live.accl_yb;
@@ -437,7 +437,7 @@ READ8_MEMBER( c64h156_device::yb_r )
// yb_w -
//-------------------------------------------------
-WRITE8_MEMBER( c64h156_device::yb_w )
+void c64h156_device::yb_w(uint8_t data)
{
if (m_yb != data)
{
diff --git a/src/devices/machine/64h156.h b/src/devices/machine/64h156.h
index 0db1c0a2883..c8ef50cc3ea 100644
--- a/src/devices/machine/64h156.h
+++ b/src/devices/machine/64h156.h
@@ -82,8 +82,8 @@ public:
auto sync_callback() { return m_write_sync.bind(); }
auto byte_callback() { return m_write_byte.bind(); }
- DECLARE_READ8_MEMBER( yb_r );
- DECLARE_WRITE8_MEMBER( yb_w );
+ uint8_t yb_r();
+ void yb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( test_w );
DECLARE_WRITE_LINE_MEMBER( accl_w );
diff --git a/src/devices/machine/6532riot.cpp b/src/devices/machine/6532riot.cpp
index f24b8b1656c..1d4e4845e68 100644
--- a/src/devices/machine/6532riot.cpp
+++ b/src/devices/machine/6532riot.cpp
@@ -146,7 +146,7 @@ void riot6532_device::timer_end()
riot6532_w - master I/O write access
-------------------------------------------------*/
-WRITE8_MEMBER( riot6532_device::write )
+void riot6532_device::write(offs_t offset, uint8_t data)
{
reg_w(offset, data);
}
@@ -231,7 +231,7 @@ void riot6532_device::reg_w(uint8_t offset, uint8_t data)
riot6532_r - master I/O read access
-------------------------------------------------*/
-READ8_MEMBER( riot6532_device::read )
+uint8_t riot6532_device::read(offs_t offset)
{
return reg_r(offset, machine().side_effects_disabled());
}
diff --git a/src/devices/machine/6532riot.h b/src/devices/machine/6532riot.h
index fc70dd82624..e551247d7fa 100644
--- a/src/devices/machine/6532riot.h
+++ b/src/devices/machine/6532riot.h
@@ -32,8 +32,8 @@ public:
auto out_pb_callback() { return m_out_pb_cb.bind(); }
auto irq_callback() { return m_irq_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
uint8_t reg_r(uint8_t offset, bool debugger_access = false);
void reg_w(uint8_t offset, uint8_t data);
diff --git a/src/devices/machine/68153bim.cpp b/src/devices/machine/68153bim.cpp
index 271e4d63da7..20d63ef959e 100644
--- a/src/devices/machine/68153bim.cpp
+++ b/src/devices/machine/68153bim.cpp
@@ -287,7 +287,7 @@ void bim68153_device::trigger_interrupt(int ch)
//-------------------------------------------------
// read
//-------------------------------------------------
-READ8_MEMBER( bim68153_device::read )
+uint8_t bim68153_device::read(offs_t offset)
{
int vc = offset & REG_VECTOR;
int ch = offset & CHN_MSK;
@@ -301,7 +301,7 @@ READ8_MEMBER( bim68153_device::read )
//-------------------------------------------------
// write
//-------------------------------------------------
-WRITE8_MEMBER( bim68153_device::write )
+void bim68153_device::write(offs_t offset, uint8_t data)
{
int vc = offset & REG_VECTOR;
int ch = offset & CHN_MSK;
diff --git a/src/devices/machine/68153bim.h b/src/devices/machine/68153bim.h
index 3528005c787..124870b8194 100644
--- a/src/devices/machine/68153bim.h
+++ b/src/devices/machine/68153bim.h
@@ -122,8 +122,8 @@ public:
auto out_iack2_callback() { return m_chn[CHN_2]->m_out_iack_cb.bind(); }
auto out_iack3_callback() { return m_chn[CHN_3]->m_out_iack_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( iackin_w ) { m_iackin = state; }
diff --git a/src/devices/machine/6821pia.cpp b/src/devices/machine/6821pia.cpp
index 1392166081b..170ca80a5dc 100644
--- a/src/devices/machine/6821pia.cpp
+++ b/src/devices/machine/6821pia.cpp
@@ -841,10 +841,10 @@ void pia6821_device::set_a_input(uint8_t data)
//-------------------------------------------------
-// write_porta
+// porta_w
//-------------------------------------------------
-void pia6821_device::write_porta(uint8_t data)
+void pia6821_device::porta_w(uint8_t data)
{
set_a_input(data);
}
@@ -959,13 +959,13 @@ bool pia6821_device::ca2_output_z()
//-------------------------------------------------
-// write_portb
+// portb_w
//-------------------------------------------------
-void pia6821_device::write_portb(uint8_t data)
+void pia6821_device::portb_w(uint8_t data)
{
if (!m_in_b_handler.isnull())
- throw emu_fatalerror("pia6821_device::write_portb() called when in_b_func implemented");
+ throw emu_fatalerror("pia6821_device::portb_w() called when in_b_func implemented");
LOG("Set PIA input port B = %02X\n", data);
@@ -983,9 +983,9 @@ void pia6821_device::write_portb_line(int line, bool state)
const uint8_t mask = 1 << line;
if (state)
- write_portb(m_in_b | mask);
+ portb_w(m_in_b | mask);
else
- write_portb(m_in_b & ~mask);
+ portb_w(m_in_b & ~mask);
}
diff --git a/src/devices/machine/6821pia.h b/src/devices/machine/6821pia.h
index ad7d28f65d6..cceff8a5a09 100644
--- a/src/devices/machine/6821pia.h
+++ b/src/devices/machine/6821pia.h
@@ -59,8 +59,7 @@ public:
uint8_t port_b_z_mask() const { return ~m_ddr_b; } // see first note in .c
- DECLARE_WRITE8_MEMBER( porta_w ) { write_porta(data); }
- void write_porta(uint8_t data);
+ void porta_w(uint8_t data);
void write_porta_line(int line, bool state);
void set_a_input(uint8_t data);
uint8_t a_output();
@@ -81,8 +80,7 @@ public:
bool ca2_output();
bool ca2_output_z();
- DECLARE_WRITE8_MEMBER( portb_w ) { write_portb(data); }
- void write_portb(uint8_t data);
+ void portb_w(uint8_t data);
void write_portb_line(int line, bool state);
uint8_t b_output();
diff --git a/src/devices/machine/68230pit.cpp b/src/devices/machine/68230pit.cpp
index 44d42c1cc01..b6979d5942a 100644
--- a/src/devices/machine/68230pit.cpp
+++ b/src/devices/machine/68230pit.cpp
@@ -721,7 +721,7 @@ void pit68230_device::wr_pitreg_tsr(uint8_t data)
}
}
-WRITE8_MEMBER (pit68230_device::write)
+void pit68230_device::write(offs_t offset, uint8_t data)
{
LOG("\"%s\" %s: Register write '%02x' -> [%02x]\n", tag(), FUNCNAME, data, offset );
LOGSETUP(" * %s Reg %02x <- %02x \n", tag(), offset, data);
@@ -970,7 +970,7 @@ uint8_t pit68230_device::rr_pitreg_tsr()
return m_tsr;
}
-READ8_MEMBER (pit68230_device::read){
+uint8_t pit68230_device::read(offs_t offset){
uint8_t data;
switch (offset) {
diff --git a/src/devices/machine/68230pit.h b/src/devices/machine/68230pit.h
index fbd1a4d73cb..72f6e94d373 100644
--- a/src/devices/machine/68230pit.h
+++ b/src/devices/machine/68230pit.h
@@ -87,8 +87,8 @@ public:
auto timer_irq_callback() { return m_tirq_out_cb.bind(); }
auto port_irq_callback() { return m_pirq_out_cb.bind(); }
- DECLARE_WRITE8_MEMBER (write);
- DECLARE_READ8_MEMBER (read);
+ void write(offs_t offset, uint8_t data);
+ uint8_t read(offs_t offset);
// TODO: remove these methods and replace it with a call to methods below in force68k.cpp
void h1_set(uint8_t state) { if (state) m_psr |= 1; else m_psr &= ~1; }
diff --git a/src/devices/machine/6850acia.cpp b/src/devices/machine/6850acia.cpp
index ed763825b59..efd557daff1 100644
--- a/src/devices/machine/6850acia.cpp
+++ b/src/devices/machine/6850acia.cpp
@@ -219,7 +219,10 @@ void acia6850_device::control_w(uint8_t data)
m_tx_state = STATE_START;
output_txd(1);
- m_status &= SR_CTS;
+ /// TODO: find out whether this has any immediate effect on TDRE
+ /// TDRE probably shouldn't be cleared here if TDR wasn't loaded, despite what the datasheet implies
+ /// If TDRE is cleared, then a separate internal flag is needed to avoid transmitting a spurious first character
+ m_status &= SR_CTS | SR_TDRE;
if (m_dcd)
{
@@ -252,13 +255,13 @@ void acia6850_device::data_w(uint8_t data)
{
LOG("MC6850 '%s' Data: %02x\n", tag(), data);
- /// TODO: find out if data stored during master reset is sent after divider is set
+ /// TODO: find out if data stored during master reset is sent after divider is set (and if TDRE can be cleared by such a write)
if (m_divide == 0)
{
- logerror("%s:ACIA %p: Data write while in reset!\n", machine().describe_context(), (void *)this);
+ logerror("%s: ACIA data write while in reset!\n", machine().describe_context());
}
- /// TODO: find out what happens if TDRE is already clear when you write
+ /// TODO: find out whether this overwrites previous data or has no effect if TDRE is already clear when you write
m_tdr = data;
m_status &= ~SR_TDRE;
@@ -484,7 +487,6 @@ WRITE_LINE_MEMBER( acia6850_device::write_txc )
{
m_tx_counter++;
- /// TODO: check txd is correctly generated, check atarist mcu is reading data, start checking receive data.
switch (m_tx_state)
{
case STATE_START:
diff --git a/src/devices/machine/68561mpcc.cpp b/src/devices/machine/68561mpcc.cpp
index 3bbd73ac990..1a3280d7975 100644
--- a/src/devices/machine/68561mpcc.cpp
+++ b/src/devices/machine/68561mpcc.cpp
@@ -812,7 +812,7 @@ void mpcc_device::update_interrupts(int source)
//-------------------------------------------------
// Read register
//-------------------------------------------------
-READ8_MEMBER( mpcc_device::read )
+uint8_t mpcc_device::read(offs_t offset)
{
uint8_t data = 0;
@@ -849,7 +849,7 @@ READ8_MEMBER( mpcc_device::read )
//-------------------------------------------------
// Write register
//-------------------------------------------------
-WRITE8_MEMBER( mpcc_device::write )
+void mpcc_device::write(offs_t offset, uint8_t data)
{
LOGSETUP(" * %s Reg %02x <- %02x \n", tag(), offset, data);
switch(offset)
diff --git a/src/devices/machine/68561mpcc.h b/src/devices/machine/68561mpcc.h
index d4f943607e7..9758f387976 100644
--- a/src/devices/machine/68561mpcc.h
+++ b/src/devices/machine/68561mpcc.h
@@ -62,11 +62,11 @@ public:
auto out_trxc_cb() { return m_out_trxc_cb.bind(); }
auto out_int_cb() { return m_out_int_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
// interrupt acknowledge
- DECLARE_READ8_MEMBER( iack );
+ uint8_t iack(offs_t offset); // declared but not defined?
/* Callbacks to be called by others for signals driven by connected devices */
DECLARE_WRITE_LINE_MEMBER( write_rx );
diff --git a/src/devices/machine/74153.cpp b/src/devices/machine/74153.cpp
index 7e27af93cc0..18352ff7e06 100644
--- a/src/devices/machine/74153.cpp
+++ b/src/devices/machine/74153.cpp
@@ -126,7 +126,7 @@ WRITE_LINE_MEMBER( ttl153_device::s1_w )
update_b();
}
-WRITE8_MEMBER( ttl153_device::s_w )
+void ttl153_device::s_w(uint8_t data)
{
m_s[0] = bool(BIT(data, 0));
m_s[1] = bool(BIT(data, 1));
@@ -158,7 +158,7 @@ WRITE_LINE_MEMBER( ttl153_device::i3a_w )
update_a();
}
-WRITE8_MEMBER( ttl153_device::ia_w )
+void ttl153_device::ia_w(uint8_t data)
{
m_ia[0] = bool(BIT(data, 0));
m_ia[1] = bool(BIT(data, 1));
@@ -191,7 +191,7 @@ WRITE_LINE_MEMBER( ttl153_device::i3b_w )
update_b();
}
-WRITE8_MEMBER( ttl153_device::ib_w )
+void ttl153_device::ib_w(uint8_t data)
{
m_ib[0] = bool(BIT(data, 0));
m_ib[1] = bool(BIT(data, 1));
diff --git a/src/devices/machine/74153.h b/src/devices/machine/74153.h
index 4c48c557174..ae2f3a37353 100644
--- a/src/devices/machine/74153.h
+++ b/src/devices/machine/74153.h
@@ -40,21 +40,21 @@ public:
// select
DECLARE_WRITE_LINE_MEMBER(s0_w);
DECLARE_WRITE_LINE_MEMBER(s1_w);
- DECLARE_WRITE8_MEMBER(s_w);
+ void s_w(uint8_t data);
// input a
DECLARE_WRITE_LINE_MEMBER(i0a_w);
DECLARE_WRITE_LINE_MEMBER(i1a_w);
DECLARE_WRITE_LINE_MEMBER(i2a_w);
DECLARE_WRITE_LINE_MEMBER(i3a_w);
- DECLARE_WRITE8_MEMBER(ia_w);
+ void ia_w(uint8_t data);
// input b
DECLARE_WRITE_LINE_MEMBER(i0b_w);
DECLARE_WRITE_LINE_MEMBER(i1b_w);
DECLARE_WRITE_LINE_MEMBER(i2b_w);
DECLARE_WRITE_LINE_MEMBER(i3b_w);
- DECLARE_WRITE8_MEMBER(ib_w);
+ void ib_w(uint8_t data);
// output
DECLARE_READ_LINE_MEMBER(za_r);
diff --git a/src/devices/machine/74161.cpp b/src/devices/machine/74161.cpp
index a4c4d694ab6..015e4dba6bd 100644
--- a/src/devices/machine/74161.cpp
+++ b/src/devices/machine/74161.cpp
@@ -167,7 +167,7 @@ WRITE_LINE_MEMBER( ttl7416x_device::clock_w )
}
}
-WRITE8_MEMBER( ttl7416x_device::p_w )
+void ttl7416x_device::p_w(uint8_t data)
{
m_p = data & 0xf;
}
diff --git a/src/devices/machine/74161.h b/src/devices/machine/74161.h
index b0bc59b8afa..abc702ba398 100644
--- a/src/devices/machine/74161.h
+++ b/src/devices/machine/74161.h
@@ -73,7 +73,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( cet_w );
DECLARE_WRITE_LINE_MEMBER( cep_w );
DECLARE_WRITE_LINE_MEMBER( clock_w );
- DECLARE_WRITE8_MEMBER( p_w );
+ void p_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( p1_w );
DECLARE_WRITE_LINE_MEMBER( p2_w );
DECLARE_WRITE_LINE_MEMBER( p3_w );
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp
index 7984b1d0294..2f1ca94f865 100644
--- a/src/devices/machine/8042kbdc.cpp
+++ b/src/devices/machine/8042kbdc.cpp
@@ -134,7 +134,7 @@ void kbdc8042_device::at_8042_check_keyboard()
{
if (!m_keyboard.received && !m_mouse.received)
{
- int data = m_keyboard_dev->read(machine().dummy_space(), 0);
+ int data = m_keyboard_dev->read();
if (data)
at_8042_receive(data);
}
@@ -234,7 +234,7 @@ void kbdc8042_device::device_timer(emu_timer &timer, device_timer_id id, int par
* 0: Keyboard data in
*/
-READ8_MEMBER(kbdc8042_device::data_r)
+uint8_t kbdc8042_device::data_r(offs_t offset)
{
uint8_t data = 0;
@@ -310,7 +310,7 @@ READ8_MEMBER(kbdc8042_device::data_r)
-WRITE8_MEMBER(kbdc8042_device::data_w)
+void kbdc8042_device::data_w(offs_t offset, uint8_t data)
{
switch (offset) {
case 0:
@@ -320,7 +320,7 @@ WRITE8_MEMBER(kbdc8042_device::data_w)
case 0:
m_data = data;
m_sending=1;
- m_keyboard_dev->write(space, 0, data);
+ m_keyboard_dev->write(data);
break;
case 1:
diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h
index 774f019ebe2..e70b2398b29 100644
--- a/src/devices/machine/8042kbdc.h
+++ b/src/devices/machine/8042kbdc.h
@@ -41,8 +41,8 @@ public:
auto output_buffer_empty_callback() { return m_output_buffer_empty_cb.bind(); }
auto speaker_callback() { return m_speaker_cb.bind(); }
- DECLARE_READ8_MEMBER( data_r );
- DECLARE_WRITE8_MEMBER( data_w );
+ uint8_t data_r(offs_t offset);
+ void data_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( write_out2 );
diff --git a/src/devices/machine/82s129.cpp b/src/devices/machine/82s129.cpp
index afa31ad1fda..ca147f17c2f 100644
--- a/src/devices/machine/82s129.cpp
+++ b/src/devices/machine/82s129.cpp
@@ -116,7 +116,7 @@ WRITE_LINE_MEMBER( prom82s129_base_device::ce2_w )
update();
}
-WRITE8_MEMBER( prom82s129_base_device::a_w )
+void prom82s129_base_device::a_w(uint8_t data)
{
uint8_t last_a = m_a;
m_a = data;
@@ -142,7 +142,7 @@ WRITE_LINE_MEMBER( prom82s129_base_device::a5_w ) { write_line(5, state); }
WRITE_LINE_MEMBER( prom82s129_base_device::a6_w ) { write_line(6, state); }
WRITE_LINE_MEMBER( prom82s129_base_device::a7_w ) { write_line(7, state); }
-READ8_MEMBER( prom82s129_base_device::output_r )
+uint8_t prom82s129_base_device::output_r()
{
return m_out;
}
diff --git a/src/devices/machine/82s129.h b/src/devices/machine/82s129.h
index 2c90fd6d896..96f278c85e9 100644
--- a/src/devices/machine/82s129.h
+++ b/src/devices/machine/82s129.h
@@ -58,7 +58,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( ce1_w );
DECLARE_WRITE_LINE_MEMBER( ce2_w );
- DECLARE_WRITE8_MEMBER( a_w );
+ void a_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( a0_w );
DECLARE_WRITE_LINE_MEMBER( a1_w );
DECLARE_WRITE_LINE_MEMBER( a2_w );
@@ -68,7 +68,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( a6_w );
DECLARE_WRITE_LINE_MEMBER( a7_w );
- DECLARE_READ8_MEMBER( output_r );
+ uint8_t output_r();
DECLARE_READ_LINE_MEMBER( o1_r );
DECLARE_READ_LINE_MEMBER( o2_r );
DECLARE_READ_LINE_MEMBER( o3_r );
diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp
index 594b95e96f0..8ec3f85cbbe 100644
--- a/src/devices/machine/8364_paula.cpp
+++ b/src/devices/machine/8364_paula.cpp
@@ -89,7 +89,7 @@ READ16_MEMBER( paula_8364_device::reg_r )
return 0xffff;
}
-WRITE16_MEMBER( paula_8364_device::reg_w )
+void paula_8364_device::reg_w(offs_t offset, uint16_t data)
{
if (offset >= 0xa0 && offset <= 0xdf)
m_stream->update();
diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h
index 412fe7679e6..5094f77f5f3 100644
--- a/src/devices/machine/8364_paula.h
+++ b/src/devices/machine/8364_paula.h
@@ -59,7 +59,7 @@ public:
auto int_cb() { return m_int_w.bind(); }
DECLARE_READ16_MEMBER(reg_r);
- DECLARE_WRITE16_MEMBER(reg_w);
+ void reg_w(offs_t offset, uint16_t data);
void update();
diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp
index aafeab11ee9..c331037d0a1 100644
--- a/src/devices/machine/8530scc.cpp
+++ b/src/devices/machine/8530scc.cpp
@@ -463,7 +463,7 @@ void scc8530_legacy_device::set_reg_b(int reg, uint8_t data)
// getter
//-------------------------------------------------
-READ8_MEMBER(scc8530_legacy_device::reg_r)
+uint8_t scc8530_legacy_device::reg_r(offs_t offset)
{
return read_reg(offset & 3);
}
@@ -507,7 +507,7 @@ uint8_t scc8530_legacy_device::read_reg(int offset)
// setter
//-------------------------------------------------
-WRITE8_MEMBER( scc8530_legacy_device::reg_w )
+void scc8530_legacy_device::reg_w(offs_t offset, uint8_t data)
{
write_reg(offset & 3, data);
}
diff --git a/src/devices/machine/8530scc.h b/src/devices/machine/8530scc.h
index 4f7914f2a5d..4a706df22a0 100644
--- a/src/devices/machine/8530scc.h
+++ b/src/devices/machine/8530scc.h
@@ -37,8 +37,8 @@ public:
void set_status(int status);
- DECLARE_READ8_MEMBER(reg_r);
- DECLARE_WRITE8_MEMBER(reg_w);
+ uint8_t reg_r(offs_t offset);
+ void reg_w(offs_t offset, uint8_t data);
void write_reg(int offset, uint8_t data);
uint8_t read_reg(int offset);
diff --git a/src/devices/machine/aakart.cpp b/src/devices/machine/aakart.cpp
index 09924675a9d..0ffb88e094e 100644
--- a/src/devices/machine/aakart.cpp
+++ b/src/devices/machine/aakart.cpp
@@ -172,14 +172,14 @@ void aakart_device::device_timer(emu_timer &timer, device_timer_id id, int param
//**************************************************************************
-READ8_MEMBER( aakart_device::read )
+uint8_t aakart_device::read()
{
m_out_tx_cb(CLEAR_LINE);
//machine().debug_break();
return m_rx;
}
-WRITE8_MEMBER( aakart_device::write )
+void aakart_device::write(uint8_t data)
{
// if(m_new_command) printf("skip cmd %02x\n",data);
diff --git a/src/devices/machine/aakart.h b/src/devices/machine/aakart.h
index 85ca75281ef..d9b367b8678 100644
--- a/src/devices/machine/aakart.h
+++ b/src/devices/machine/aakart.h
@@ -29,8 +29,8 @@ public:
auto out_rx_callback() { return m_out_rx_cb.bind(); }
// I/O operations
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
+ void write(uint8_t data);
+ uint8_t read();
void send_keycode_down(uint8_t row, uint8_t col);
void send_keycode_up(uint8_t row, uint8_t col);
void send_mouse(uint8_t x, uint8_t y);
diff --git a/src/devices/machine/aic6250.cpp b/src/devices/machine/aic6250.cpp
index 9c149f51627..71859bdee05 100644
--- a/src/devices/machine/aic6250.cpp
+++ b/src/devices/machine/aic6250.cpp
@@ -89,7 +89,7 @@ void aic6250_device::map(address_map &map)
map(0xf, 0xf).rw(FUNC(aic6250_device::scsi_latch_data_r), FUNC(aic6250_device::scsi_bsy_rst_w));
}
-READ8_MEMBER(aic6250_device::read)
+u8 aic6250_device::read(address_space &space, offs_t offset)
{
u8 data = space.unmap();
@@ -123,7 +123,7 @@ READ8_MEMBER(aic6250_device::read)
return data;
}
-WRITE8_MEMBER(aic6250_device::write)
+void aic6250_device::write(offs_t offset, u8 data)
{
if (offset)
{
diff --git a/src/devices/machine/aic6250.h b/src/devices/machine/aic6250.h
index 9f6febfd8a7..048aa6de0c8 100644
--- a/src/devices/machine/aic6250.h
+++ b/src/devices/machine/aic6250.h
@@ -25,8 +25,8 @@ public:
DECLARE_WRITE_LINE_MEMBER(back_w);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ u8 read(address_space &space, offs_t offset);
+ void write(offs_t offset, u8 data);
u8 dma_r();
u16 dma16_r();
diff --git a/src/devices/machine/am53cf96.cpp b/src/devices/machine/am53cf96.cpp
index 5e01511bb97..891f43f680b 100644
--- a/src/devices/machine/am53cf96.cpp
+++ b/src/devices/machine/am53cf96.cpp
@@ -15,9 +15,8 @@
#include "am53cf96.h"
#include "bus/scsi/scsihle.h"
-READ8_MEMBER( am53cf96_device::read )
+uint8_t am53cf96_device::read(offs_t offset)
{
- int rv;
static constexpr int states[] = { 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 0 };
if (offset == REG_STATUS)
@@ -30,7 +29,7 @@ READ8_MEMBER( am53cf96_device::read )
}
}
- rv = scsi_regs[offset];
+ int rv = scsi_regs[offset];
if (offset == REG_FIFO)
{
@@ -55,7 +54,7 @@ void am53cf96_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
m_irq_handler(1);
}
-WRITE8_MEMBER( am53cf96_device::write )
+void am53cf96_device::write(offs_t offset, uint8_t data)
{
// logerror("53cf96: w %x to reg %d %s\n", data, offset, machine().describe_context());
diff --git a/src/devices/machine/am53cf96.h b/src/devices/machine/am53cf96.h
index 5ae55f76849..d9b2ce1aab4 100644
--- a/src/devices/machine/am53cf96.h
+++ b/src/devices/machine/am53cf96.h
@@ -20,8 +20,8 @@ public:
auto irq_handler() { return m_irq_handler.bind(); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
void dma_read_data(int bytes, uint8_t *pData);
void dma_write_data(int bytes, uint8_t *pData);
diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp
index ee854e461ad..9db640db021 100644
--- a/src/devices/machine/amigafdc.cpp
+++ b/src/devices/machine/amigafdc.cpp
@@ -444,7 +444,7 @@ void amiga_fdc_device::setup_leds()
}
}
-WRITE8_MEMBER( amiga_fdc_device::ciaaprb_w )
+void amiga_fdc_device::ciaaprb_w(uint8_t data)
{
floppy_image_device *old_floppy = floppy;
diff --git a/src/devices/machine/amigafdc.h b/src/devices/machine/amigafdc.h
index 8142680bed7..b7965c49f6c 100644
--- a/src/devices/machine/amigafdc.h
+++ b/src/devices/machine/amigafdc.h
@@ -17,7 +17,7 @@ public:
auto dskblk_callback() { return m_write_dskblk.bind(); }
auto dsksyn_callback() { return m_write_dsksyn.bind(); }
- DECLARE_WRITE8_MEMBER(ciaaprb_w);
+ void ciaaprb_w(uint8_t data);
uint8_t ciaapra_r();
uint16_t dskbytr_r();
diff --git a/src/devices/machine/applefdc.cpp b/src/devices/machine/applefdc.cpp
index 681dcc525ed..b13cc62eb3a 100644
--- a/src/devices/machine/applefdc.cpp
+++ b/src/devices/machine/applefdc.cpp
@@ -442,7 +442,7 @@ void applefdc_base_device::iwm_access(int offset)
// read - reads a byte from the FDC
//-------------------------------------------------
-uint8_t applefdc_base_device::read(uint8_t offset)
+uint8_t applefdc_base_device::read(offs_t offset)
{
const applefdc_interface *intf = get_interface();
uint8_t result = 0;
@@ -505,7 +505,7 @@ uint8_t applefdc_base_device::read(uint8_t offset)
// write - writes a byte to the FDC
//-------------------------------------------------
-void applefdc_base_device::write(uint8_t offset, uint8_t data)
+void applefdc_base_device::write(offs_t offset, uint8_t data)
{
const applefdc_interface *intf = get_interface();
diff --git a/src/devices/machine/applefdc.h b/src/devices/machine/applefdc.h
index afdf13de0d8..817b2e705e0 100644
--- a/src/devices/machine/applefdc.h
+++ b/src/devices/machine/applefdc.h
@@ -62,12 +62,8 @@ public:
void set_config(const applefdc_interface *intrf) { m_interface = intrf; }
// read/write handlers
- virtual uint8_t read(uint8_t offset);
- virtual void write(uint8_t offset, uint8_t data);
-
- // read/write handlers overloads
- DECLARE_READ8_MEMBER( bus_r ) { return read(uint8_t(offset)); }
- DECLARE_WRITE8_MEMBER( bus_w ) { write(uint8_t(offset), data); }
+ virtual uint8_t read(offs_t offset);
+ virtual void write(offs_t offset, uint8_t data);
// accessor
uint8_t get_lines();
diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp
index 809f8df5256..622dfb3fc19 100644
--- a/src/devices/machine/at28c16.cpp
+++ b/src/devices/machine/at28c16.cpp
@@ -142,7 +142,7 @@ void at28c16_device::nvram_write( emu_file &file )
// READ/WRITE HANDLERS
//**************************************************************************
-WRITE8_MEMBER( at28c16_device::write )
+void at28c16_device::write(offs_t offset, uint8_t data)
{
if( m_last_write >= 0 )
{
@@ -180,7 +180,7 @@ WRITE8_MEMBER( at28c16_device::write )
}
-READ8_MEMBER( at28c16_device::read )
+uint8_t at28c16_device::read(offs_t offset)
{
if( m_last_write >= 0 )
{
diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h
index 56b75a8cfcc..54c87fccb4f 100644
--- a/src/devices/machine/at28c16.h
+++ b/src/devices/machine/at28c16.h
@@ -29,8 +29,8 @@ public:
// construction/destruction
at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
+ void write(offs_t offset, uint8_t data);
+ uint8_t read(offs_t offset);
protected:
// device-level overrides
diff --git a/src/devices/machine/at_keybc.cpp b/src/devices/machine/at_keybc.cpp
index 80cea51d4d2..a166ff234cb 100644
--- a/src/devices/machine/at_keybc.cpp
+++ b/src/devices/machine/at_keybc.cpp
@@ -147,14 +147,14 @@ DEFINE_DEVICE_TYPE(PS2_KEYBOARD_CONTROLLER, ps2_keyboard_controller_device, "ps2
uint8_t at_kbc_device_base::data_r()
{
- u8 const data = m_mcu->upi41_master_r(machine().dummy_space(), 0U);
+ u8 const data = m_mcu->upi41_master_r(0U);
LOG("data_r 0x%02x (%s)\n", data, machine().describe_context());
return data;
}
uint8_t at_kbc_device_base::status_r()
{
- u8 const data = m_mcu->upi41_master_r(machine().dummy_space(), 1U);
+ u8 const data = m_mcu->upi41_master_r(1U);
LOGMASKED(LOG_STATUS, "status_r 0x%02x%s%s%s%s%s%s%s%s (%s)\n", data,
BIT(data, 7) ? " PER" : "", BIT(data, 6) ? " RTO" : "",
BIT(data, 5) ? " TTO" : "", BIT(data, 4) ? "" : " INH",
@@ -358,12 +358,12 @@ inline u8 at_kbc_device_base::kbd_data_r() const
TIMER_CALLBACK_MEMBER(at_kbc_device_base::write_data)
{
- m_mcu->upi41_master_w(machine().dummy_space(), 0U, u8(u32(param)));
+ m_mcu->upi41_master_w(0U, u8(u32(param)));
}
TIMER_CALLBACK_MEMBER(at_kbc_device_base::write_command)
{
- m_mcu->upi41_master_w(machine().dummy_space(), 1U, u8(u32(param)));
+ m_mcu->upi41_master_w(1U, u8(u32(param)));
}
TIMER_CALLBACK_MEMBER(at_kbc_device_base::set_kbd_clk_in)
@@ -425,14 +425,14 @@ uint8_t ps2_keyboard_controller_device::data_r()
{
set_kbd_irq(0U);
set_aux_irq(0U);
- u8 const data = m_mcu->upi41_master_r(machine().dummy_space(), 0U);
+ u8 const data = m_mcu->upi41_master_r(0U);
LOG("data_r 0x%02x (%s)\n", data, machine().describe_context());
return data;
}
uint8_t ps2_keyboard_controller_device::status_r()
{
- u8 const data = m_mcu->upi41_master_r(machine().dummy_space(), 1U);
+ u8 const data = m_mcu->upi41_master_r(1U);
LOGMASKED(LOG_STATUS, "status_r 0x%02x%s%s%s%s%s%s%s%s (%s)\n", data,
BIT(data, 7) ? " PER" : "", BIT(data, 6) ? " GTO" : "",
BIT(data, 5) ? " AUX_OBF" : "", BIT(data, 4) ? "" : " INH",
diff --git a/src/devices/machine/ay31015.cpp b/src/devices/machine/ay31015.cpp
index e4dc2344e28..a3cbbe456aa 100644
--- a/src/devices/machine/ay31015.cpp
+++ b/src/devices/machine/ay31015.cpp
@@ -238,7 +238,7 @@ inline void ay31015_device::update_status_pin(uint8_t reg_bit, ay31015_device::o
/*-------------------------------------------------
- ay31015_update_status_pins - Update the status pins
+ update_status_pins - Update the status pins
-------------------------------------------------*/
void ay31015_device::update_status_pins()
@@ -260,7 +260,7 @@ void ay31015_device::update_status_pins()
/*-------------------------------------------------
- ay31015_rx_process - convert serial to parallel
+ rx_process - convert serial to parallel
-------------------------------------------------*/
void ay31015_device::rx_process()
@@ -428,7 +428,7 @@ void ay31015_device::rx_process()
/*-------------------------------------------------
- ay31015_tx_process - convert parallel to serial
+ tx_process - convert parallel to serial
-------------------------------------------------*/
void ay31015_device::tx_process()
@@ -578,7 +578,7 @@ void ay31015_device::tx_process()
/*-------------------------------------------------
- ay31015_reset - reset internal state
+ internal_reset - reset internal state
-------------------------------------------------*/
void ay31015_device::internal_reset()
@@ -634,7 +634,7 @@ void ay51013_device::internal_reset()
}
/*-------------------------------------------------
- ay31015_transfer_control_pins - transfers contents of controls pins to the control register
+ transfer_control_pins - transfers contents of controls pins to the control register
-------------------------------------------------*/
void ay31015_device::transfer_control_pins()
@@ -656,7 +656,7 @@ void ay31015_device::transfer_control_pins()
/*-------------------------------------------------
- ay31015_set_input_pin - set an input pin
+ set_input_pin - set an input pin
-------------------------------------------------*/
void ay31015_device::set_input_pin( ay31015_device::input_pin pin, int data )
{
@@ -709,7 +709,7 @@ void ay31015_device::set_input_pin( ay31015_device::input_pin pin, int data )
/*-------------------------------------------------
- ay31015_get_output_pin - get the status of an output pin
+ get_output_pin - get the status of an output pin
-------------------------------------------------*/
int ay31015_device::get_output_pin( ay31015_device::output_pin pin )
@@ -719,10 +719,10 @@ int ay31015_device::get_output_pin( ay31015_device::output_pin pin )
/*-------------------------------------------------
- ay31015_get_received_data - return a byte to the computer
+ received - return a byte to the computer
-------------------------------------------------*/
-uint8_t ay31015_device::get_received_data()
+uint8_t ay31015_device::receive()
{
if (m_auto_rdav && !machine().side_effects_disabled())
{
@@ -733,16 +733,10 @@ uint8_t ay31015_device::get_received_data()
return m_rx_buffer;
}
-READ8_MEMBER(ay31015_device::receive)
-{
- return get_received_data();
-}
-
-
/*-------------------------------------------------
- ay31015_set_transmit_data - accept a byte to transmit, if able
+ transmit - accept a byte to transmit, if able
-------------------------------------------------*/
-void ay31015_device::set_transmit_data( uint8_t data )
+void ay31015_device::transmit( uint8_t data )
{
if (m_status_reg & STATUS_TBMT)
{
@@ -751,8 +745,3 @@ void ay31015_device::set_transmit_data( uint8_t data )
update_status_pins();
}
}
-
-WRITE8_MEMBER(ay31015_device::transmit)
-{
- set_transmit_data(data);
-}
diff --git a/src/devices/machine/ay31015.h b/src/devices/machine/ay31015.h
index 42518cb9a85..4e27bc8e11f 100644
--- a/src/devices/machine/ay31015.h
+++ b/src/devices/machine/ay31015.h
@@ -54,16 +54,13 @@ public:
DECLARE_READ_LINE_MEMBER(eoc_r) { return get_output_pin(EOC); }
DECLARE_READ_LINE_MEMBER(so_r) { return get_output_pin(SO); }
- /* Reead the received data */
+ /* Read the received data */
/* The received data is available on RD8-RD1 (pins 5-12) */
- uint8_t get_received_data();
+ uint8_t receive();
/* Set the transmitter buffer */
/* The data to transmit is set on DB1-DB8 (pins 26-33) */
- void set_transmit_data( uint8_t data );
-
- DECLARE_READ8_MEMBER(receive);
- DECLARE_WRITE8_MEMBER(transmit);
+ void transmit( uint8_t data );
protected:
enum input_pin
diff --git a/src/devices/machine/busmouse.cpp b/src/devices/machine/busmouse.cpp
index 298c82c5124..2c06045d127 100644
--- a/src/devices/machine/busmouse.cpp
+++ b/src/devices/machine/busmouse.cpp
@@ -175,17 +175,17 @@ void bus_mouse_device::device_timer(emu_timer &timer, device_timer_id id, int pa
}
}
-READ8_MEMBER(bus_mouse_device::ppi_a_r)
+uint8_t bus_mouse_device::ppi_a_r()
{
return m_pa;
}
-READ8_MEMBER(bus_mouse_device::ppi_c_r)
+uint8_t bus_mouse_device::ppi_c_r()
{
return irq ? irq_line : 0;
}
-WRITE8_MEMBER(bus_mouse_device::ppi_c_w)
+void bus_mouse_device::ppi_c_w(uint8_t data)
{
irq_disabled = BIT(data, 4);
diff --git a/src/devices/machine/busmouse.h b/src/devices/machine/busmouse.h
index 256f8891808..787c80e399b 100644
--- a/src/devices/machine/busmouse.h
+++ b/src/devices/machine/busmouse.h
@@ -34,9 +34,9 @@ protected:
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
- DECLARE_READ8_MEMBER(ppi_a_r);
- DECLARE_READ8_MEMBER(ppi_c_r);
- DECLARE_WRITE8_MEMBER(ppi_c_w);
+ uint8_t ppi_a_r();
+ uint8_t ppi_c_r();
+ void ppi_c_w(uint8_t data);
private:
emu_timer *m_irq_timer;
diff --git a/src/devices/machine/cdp1852.cpp b/src/devices/machine/cdp1852.cpp
index bf5b06b4e72..b98b9a34fef 100644
--- a/src/devices/machine/cdp1852.cpp
+++ b/src/devices/machine/cdp1852.cpp
@@ -183,7 +183,7 @@ TIMER_CALLBACK_MEMBER(cdp1852_device::update_sr)
// read - data read
//-------------------------------------------------
-READ8_MEMBER(cdp1852_device::read)
+uint8_t cdp1852_device::read()
{
if (!m_read_mode() && m_clock_active)
{
@@ -201,7 +201,7 @@ READ8_MEMBER(cdp1852_device::read)
// write - data write
//-------------------------------------------------
-WRITE8_MEMBER(cdp1852_device::write)
+void cdp1852_device::write(uint8_t data)
{
if (m_read_mode() && m_clock_active)
{
diff --git a/src/devices/machine/cdp1852.h b/src/devices/machine/cdp1852.h
index fa07d196af2..4f4bec622f9 100644
--- a/src/devices/machine/cdp1852.h
+++ b/src/devices/machine/cdp1852.h
@@ -37,8 +37,8 @@ public:
auto di_cb() { return m_read_data.bind(); }
auto do_cb() { return m_write_data.bind(); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read();
+ void write(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(clock_w);
diff --git a/src/devices/machine/cdp1871.cpp b/src/devices/machine/cdp1871.cpp
index 600c1e6ee3c..36ce4b77892 100644
--- a/src/devices/machine/cdp1871.cpp
+++ b/src/devices/machine/cdp1871.cpp
@@ -278,7 +278,7 @@ void cdp1871_device::detect_keypress()
// read - keyboard data read
//-------------------------------------------------
-READ8_MEMBER( cdp1871_device::read )
+uint8_t cdp1871_device::read()
{
int table = 0;
diff --git a/src/devices/machine/cdp1871.h b/src/devices/machine/cdp1871.h
index eb2eb94fbd9..50c0aaefdc9 100644
--- a/src/devices/machine/cdp1871.h
+++ b/src/devices/machine/cdp1871.h
@@ -54,7 +54,7 @@ public:
auto da_callback() { return m_write_da.bind(); }
auto rpt_callback() { return m_write_rpt.bind(); }
- DECLARE_READ8_MEMBER( read );
+ uint8_t read();
DECLARE_READ_LINE_MEMBER( da_r ) { return m_da; }
DECLARE_READ_LINE_MEMBER( rpt_r ) { return m_rpt; }
diff --git a/src/devices/machine/cdp1879.cpp b/src/devices/machine/cdp1879.cpp
index 206709f9a8d..eee9df590b5 100644
--- a/src/devices/machine/cdp1879.cpp
+++ b/src/devices/machine/cdp1879.cpp
@@ -114,7 +114,7 @@ void cdp1879_device::update_rtc()
set_clock_register(RTC_MONTH, bcd_to_integer(m_regs[R_CNT_MONTH]));
}
-READ8_MEMBER(cdp1879_device::read)
+uint8_t cdp1879_device::read(offs_t offset)
{
if (offset == R_CTL_IRQSTATUS && !machine().side_effects_disabled())
{
@@ -128,7 +128,7 @@ READ8_MEMBER(cdp1879_device::read)
return m_regs[offset];
}
-WRITE8_MEMBER(cdp1879_device::write)
+void cdp1879_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
diff --git a/src/devices/machine/cdp1879.h b/src/devices/machine/cdp1879.h
index 3f92efec75e..2f2740df32a 100644
--- a/src/devices/machine/cdp1879.h
+++ b/src/devices/machine/cdp1879.h
@@ -20,8 +20,8 @@ public:
// construction/destruction
cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
auto irq_callback() { return m_irq_w.bind(); }
diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp
index 491c4ce5970..07b959d9fba 100644
--- a/src/devices/machine/corvushd.cpp
+++ b/src/devices/machine/corvushd.cpp
@@ -1502,7 +1502,7 @@ void corvus_hdc_device::device_start() {
// Returns:
// Value in the controller status register
//
-READ8_MEMBER ( corvus_hdc_device::status_r ) {
+uint8_t corvus_hdc_device::status_r() {
return m_status;
}
@@ -1521,7 +1521,7 @@ READ8_MEMBER ( corvus_hdc_device::status_r ) {
// Returns:
// Value in the controller data register
//
-READ8_MEMBER ( corvus_hdc_device::read ) {
+uint8_t corvus_hdc_device::read() {
uint8_t result;
if((m_status & CONTROLLER_DIRECTION) == 0) { // Check to see if we're in Controller-to-Host mode
@@ -1569,7 +1569,7 @@ READ8_MEMBER ( corvus_hdc_device::read ) {
// Returns:
// Nothing
//
-WRITE8_MEMBER ( corvus_hdc_device::write ) {
+void corvus_hdc_device::write(uint8_t data) {
//
// Received a byte -- check to see if we should really respond
//
diff --git a/src/devices/machine/corvushd.h b/src/devices/machine/corvushd.h
index 868d98678fb..fddffa0e432 100644
--- a/src/devices/machine/corvushd.h
+++ b/src/devices/machine/corvushd.h
@@ -30,9 +30,9 @@ public:
// construction/destruction
corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( status_r );
+ uint8_t read();
+ void write(uint8_t data);
+ uint8_t status_r();
protected:
// device-level overrides
diff --git a/src/devices/machine/cr511b.cpp b/src/devices/machine/cr511b.cpp
index 6a4309f12c9..ea9d772fb92 100644
--- a/src/devices/machine/cr511b.cpp
+++ b/src/devices/machine/cr511b.cpp
@@ -96,12 +96,12 @@ void cr511b_device::device_timer(emu_timer &timer, device_timer_id tid, int para
// IMPLEMENTATION
//**************************************************************************
-READ8_MEMBER( cr511b_device::read )
+uint8_t cr511b_device::read()
{
return 0xff;
}
-WRITE8_MEMBER ( cr511b_device::write )
+void cr511b_device::write(uint8_t data)
{
}
diff --git a/src/devices/machine/cr511b.h b/src/devices/machine/cr511b.h
index 16d58151d91..b3de63c8aa6 100644
--- a/src/devices/machine/cr511b.h
+++ b/src/devices/machine/cr511b.h
@@ -52,8 +52,8 @@ public:
auto scor_handler() { return m_scor_handler.bind(); }
auto xaen_handler() { return m_xaen_handler.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER ( write );
+ uint8_t read();
+ void write(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( enable_w );
DECLARE_WRITE_LINE_MEMBER( cmd_w );
diff --git a/src/devices/machine/cs8221.cpp b/src/devices/machine/cs8221.cpp
index 9177a758340..e57f181e383 100644
--- a/src/devices/machine/cs8221.cpp
+++ b/src/devices/machine/cs8221.cpp
@@ -96,13 +96,13 @@ void cs8221_device::map(address_map &map)
map(0x0023, 0x0023).rw("cs8221", FUNC(cs8221_device::data_r), FUNC(cs8221_device::data_w));
}
-WRITE8_MEMBER( cs8221_device::address_w )
+void cs8221_device::address_w(uint8_t data)
{
m_address = data;
m_address_valid = ((m_address & 0x60)== 0x60) ? true : false;
}
-READ8_MEMBER( cs8221_device::data_r )
+uint8_t cs8221_device::data_r()
{
uint8_t result = 0xff;
@@ -119,7 +119,7 @@ READ8_MEMBER( cs8221_device::data_r )
return result;
}
-WRITE8_MEMBER( cs8221_device::data_w )
+void cs8221_device::data_w(uint8_t data)
{
if (m_address_valid)
{
diff --git a/src/devices/machine/cs8221.h b/src/devices/machine/cs8221.h
index 39f5bfcd709..63b3102d5e9 100644
--- a/src/devices/machine/cs8221.h
+++ b/src/devices/machine/cs8221.h
@@ -64,9 +64,9 @@ private:
uint8_t m_registers[0x10];
- DECLARE_WRITE8_MEMBER( address_w );
- DECLARE_READ8_MEMBER( data_r );
- DECLARE_WRITE8_MEMBER( data_w );
+ void address_w(uint8_t data);
+ uint8_t data_r();
+ void data_w(uint8_t data);
};
DECLARE_DEVICE_TYPE(CS8221, cs8221_device)
diff --git a/src/devices/machine/cxd1185.cpp b/src/devices/machine/cxd1185.cpp
new file mode 100644
index 00000000000..b599d307783
--- /dev/null
+++ b/src/devices/machine/cxd1185.cpp
@@ -0,0 +1,909 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+/*
+ * Sony CXD1185 SCSI 1 Protocol Controller.
+ *
+ * Sources:
+ * - https://datasheetspdf.com/pdf-file/199633/SonyCorporation/CXD1185CQ/1
+ *
+ * TODO:
+ * - target mode
+ * - cq/aq variants
+ * - synchronous mode
+ */
+
+#include "emu.h"
+#include "cxd1185.h"
+
+#define LOG_GENERAL (1U << 0)
+#define LOG_CMD (1U << 1)
+#define LOG_REG (1U << 2)
+#define LOG_STATE (1U << 3)
+#define LOG_CONFIG (1U << 4)
+#define LOG_INT (1U << 5)
+#define LOG_SCSI (1U << 6)
+#define LOG_DMA (1U << 7)
+
+//#define VERBOSE (LOG_GENERAL|LOG_CMD|LOG_REG|LOG_STATE|LOG_CONFIG|LOG_INT|LOG_SCSI|LOG_DMA)
+
+#include "logmacro.h"
+
+DEFINE_DEVICE_TYPE(CXD1185, cxd1185_device, "cxd1185", "Sony CXD1185 SCSI 1 Protocol Controller")
+
+static char const *const nscsi_phase[] = { "DATA OUT", "DATA IN", "COMMAND", "STATUS", "*", "*", "MESSAGE OUT", "MESSAGE IN" };
+
+// FIXME: would be better to reuse from nscsi_full_device
+static unsigned const SCSI_ARB_DELAY = 2'400;
+static unsigned const SCSI_BUS_CLEAR = 800;
+static unsigned const SCSI_BUS_FREE = 800;
+static unsigned const SCSI_BUS_SETTLE = 400;
+static unsigned const SCSI_BUS_SKEW = 10;
+static unsigned const SCSI_RST_HOLD = 25'000;
+
+ALLOW_SAVE_TYPE(cxd1185_device::state);
+
+cxd1185_device::cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+ : nscsi_device(mconfig, CXD1185, tag, owner, clock)
+ , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF)
+ , m_irq_out_cb(*this)
+ , m_drq_out_cb(*this)
+ , m_port_out_cb(*this)
+{
+}
+
+void cxd1185_device::map(address_map &map)
+{
+ map(0x0, 0x0).rw(FUNC(cxd1185_device::status_r), FUNC(cxd1185_device::command_w));
+ map(0x1, 0x1).rw(FUNC(cxd1185_device::scsi_data_r), FUNC(cxd1185_device::scsi_data_w));
+ map(0x2, 0x2).r(FUNC(cxd1185_device::int_req_r<0>));
+ map(0x3, 0x3).rw(FUNC(cxd1185_device::int_req_r<1>), FUNC(cxd1185_device::environ_w));
+ map(0x4, 0x4).rw(FUNC(cxd1185_device::scsi_ctrl_monitor_r), FUNC(cxd1185_device::timer_w));
+ map(0x5, 0x5).r(FUNC(cxd1185_device::fifo_status_r));
+ map(0x6, 0x6).rw(FUNC(cxd1185_device::scsi_id_r), FUNC(cxd1185_device::scsi_id_w));
+ map(0x7, 0x7).rw(FUNC(cxd1185_device::count_r<0>), FUNC(cxd1185_device::count_w<0>));
+ map(0x8, 0x8).rw(FUNC(cxd1185_device::count_r<1>), FUNC(cxd1185_device::count_w<1>));
+ map(0x9, 0x9).rw(FUNC(cxd1185_device::count_r<2>), FUNC(cxd1185_device::count_w<2>));
+ map(0xa, 0xa).rw(FUNC(cxd1185_device::int_auth_r<0>), FUNC(cxd1185_device::int_auth_w<0>));
+ map(0xb, 0xb).rw(FUNC(cxd1185_device::int_auth_r<1>), FUNC(cxd1185_device::int_auth_w<1>));
+ map(0xc, 0xc).rw(FUNC(cxd1185_device::mode_r), FUNC(cxd1185_device::mode_w));
+ map(0xd, 0xd).rw(FUNC(cxd1185_device::sync_ctrl_r), FUNC(cxd1185_device::sync_ctrl_w));
+ map(0xe, 0xe).rw(FUNC(cxd1185_device::scsi_ctrl_r), FUNC(cxd1185_device::scsi_ctrl_w));
+ map(0xf, 0xf).rw(FUNC(cxd1185_device::ioport_r), FUNC(cxd1185_device::ioport_w));
+}
+
+void cxd1185_device::device_start()
+{
+ m_irq_out_cb.resolve_safe();
+ m_drq_out_cb.resolve_safe();
+ m_port_out_cb.resolve_safe();
+
+ save_item(NAME(m_state));
+ save_item(NAME(m_irq_asserted));
+ save_item(NAME(m_drq_asserted));
+ save_item(NAME(m_pio_data_mode));
+ save_item(NAME(m_pio_ctrl_mode));
+ //save_item(NAME(m_fifo));
+ save_item(NAME(m_scsi_ctrl_state));
+
+ save_item(NAME(m_status));
+ save_item(NAME(m_command));
+ save_item(NAME(m_int_req));
+ save_item(NAME(m_environ));
+ save_item(NAME(m_sel_time));
+ save_item(NAME(m_rst_time));
+ save_item(NAME(m_scsi_id));
+ save_item(NAME(m_int_auth));
+ save_item(NAME(m_mode));
+ save_item(NAME(m_count));
+ save_item(NAME(m_sync_ctrl));
+ save_item(NAME(m_scsi_ctrl));
+ save_item(NAME(m_ioport));
+
+ m_state_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cxd1185_device::state_timer), this));
+ m_state = IDLE;
+
+ m_irq_asserted = false;
+ m_drq_asserted = false;
+
+ // monitor all scsi bus control lines
+ scsi_bus->ctrl_wait(scsi_refid, S_ALL, S_ALL);
+}
+
+void cxd1185_device::device_reset()
+{
+ m_environ = 0;
+
+ reset_chip();
+}
+
+void cxd1185_device::reset_chip()
+{
+ m_pio_data_mode = false;
+ m_pio_ctrl_mode = false;
+
+ // clear all except environment register
+ m_status = 0;
+ m_command = 0;
+ m_int_req[0] = 0;
+ m_int_req[1] = 0;
+ m_sel_time = 0;
+ m_rst_time = 0;
+ m_scsi_id = 0;
+ m_int_auth[0] = 0;
+ m_int_auth[1] = 0;
+ m_mode = 0;
+ m_count = 0;
+ m_sync_ctrl = 0;
+ m_scsi_ctrl = 0;
+ m_ioport = 0;
+
+ // clear drq and irq
+ reset_fifo();
+ int_check();
+
+ // clear scsi bus
+ scsi_bus->data_w(scsi_refid, 0);
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
+}
+
+void cxd1185_device::reset_fifo()
+{
+ m_fifo.clear();
+ set_drq(false);
+}
+
+u8 cxd1185_device::status_r()
+{
+ u8 const data = (scsi_bus->ctrl_r() & S_RST) ? MRST : 0;
+
+ LOGMASKED(LOG_REG, "status_r 0x%02x\n", data | m_status);
+
+ return data | m_status;
+}
+
+u8 cxd1185_device::scsi_data_r()
+{
+ u8 data = 0;
+
+ if (!m_pio_data_mode)
+ {
+ if (!machine().side_effects_disabled())
+ {
+ data = m_fifo.dequeue();
+
+ if (m_state != IDLE && !m_state_timer->enabled())
+ m_state_timer->adjust(attotime::zero);
+ }
+ else
+ data = m_fifo.peek();
+ }
+ else
+ data = scsi_bus->data_r();
+
+ LOGMASKED(LOG_REG, "scsi_data_r 0x%02x (%s)\n", data, machine().describe_context());
+
+ return data;
+}
+
+template <unsigned Register> u8 cxd1185_device::int_req_r()
+{
+ u8 const data = m_int_req[Register];
+
+ if (!machine().side_effects_disabled())
+ {
+ LOGMASKED(LOG_REG, "int_req_r<%d> 0x%02x\n", Register, data);
+
+ m_int_req[Register] = 0;
+ int_check();
+ }
+
+ return data;
+}
+
+u8 cxd1185_device::scsi_ctrl_monitor_r()
+{
+ u32 const ctrl = scsi_bus->ctrl_r();
+
+ u8 const data =
+ ((ctrl & S_BSY) ? MBSY : 0) |
+ ((ctrl & S_SEL) ? MSEL : 0) |
+ ((ctrl & S_MSG) ? MMSG : 0) |
+ ((ctrl & S_CTL) ? MCD : 0) |
+ ((ctrl & S_INP) ? MIO : 0) |
+ ((ctrl & S_REQ) ? MREQ : 0) |
+ ((ctrl & S_ACK) ? MACK : 0) |
+ ((ctrl & S_ATN) ? MATN : 0);
+
+ LOGMASKED(LOG_REG, "scsi_ctrl_monitor_r 0x%02x\n", data);
+
+ return data;
+}
+
+u8 cxd1185_device::fifo_status_r()
+{
+ u8 const data =
+ (m_fifo.empty() ? FIE : 0) |
+ (m_fifo.full() ? FIF : 0) |
+ (m_fifo.queue_length() & FC);
+
+ LOGMASKED(LOG_REG, "fifo_status_r 0x%02x\n", data);
+
+ return data;
+}
+
+void cxd1185_device::command_w(u8 data)
+{
+ LOGMASKED(LOG_REG, "command_w 0x%02x\n", data);
+
+ // check command in progress
+ if ((m_status & CIP) && (data != CMD_RESET))
+ return;
+
+ // check command mode/category
+ switch (data & CAT)
+ {
+ case 0x00:
+ // commands valid in any state
+ break;
+ case 0x40:
+ // commands valid in disconnected state
+ if (m_status & (INIT | TARG))
+ return;
+ break;
+ case 0x80:
+ // commands valid in target state
+ if ((m_status & (INIT | TARG)) != TARG)
+ return;
+ fatalerror("cxd1185_device: target mode not implemented\n");
+ break;
+ case 0xc0:
+ // commands valid in initiator state
+ if ((m_status & (INIT | TARG)) != INIT)
+ return;
+ break;
+ }
+
+ m_command = data;
+ m_status |= CIP;
+
+ switch (data & (CAT | CMD))
+ {
+ case 0x00:
+ LOGMASKED(LOG_CMD, "no operation\n");
+ break;
+ case 0x01:
+ LOGMASKED(LOG_CMD, "reset chip\n");
+ reset_chip();
+ break;
+ case 0x02:
+ LOGMASKED(LOG_CMD, "assert scsi reset\n");
+ m_state = BUS_RESET;
+ break;
+ case 0x03:
+ LOGMASKED(LOG_CMD, "flush fifo\n");
+ reset_fifo();
+ break;
+ case 0x04:
+ LOGMASKED(LOG_CMD, "assert scsi control\n");
+ m_pio_ctrl_mode = true;
+ m_scsi_ctrl = 0;
+ if ((m_status & (INIT | TARG)) == TARG)
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ALL & ~S_BSY);
+ break;
+ case 0x05:
+ LOGMASKED(LOG_CMD, "deassert scsi control\n");
+ m_pio_ctrl_mode = false;
+ break;
+ case 0x06:
+ LOGMASKED(LOG_CMD, "assert scsi data\n");
+ m_pio_data_mode = true;
+ break;
+ case 0x07:
+ LOGMASKED(LOG_CMD, "deassert scsi data\n");
+ m_pio_data_mode = false;
+ break;
+
+ case 0x40: LOGMASKED(LOG_CMD, "reselect\n"); break;
+ case 0x41:
+ LOGMASKED(LOG_CMD, "select target %d without atn\n", (m_scsi_id & TID) >> 5);
+ m_status |= INIT;
+ m_state = ARB_BUS_FREE;
+ break;
+ case 0x42:
+ LOGMASKED(LOG_CMD, "select target %d with atn\n", (m_scsi_id & TID) >> 5);
+ m_status |= INIT;
+ m_state = ARB_BUS_FREE;
+ break;
+ case 0x43: LOGMASKED(LOG_CMD, "enable selection/reselection\n"); break;
+ case 0x44: LOGMASKED(LOG_CMD, "disable selection/reselection\n"); break;
+
+ // TODO: not implemented
+ case 0x80: LOGMASKED(LOG_CMD, "send message\n"); break;
+ case 0x81: LOGMASKED(LOG_CMD, "send status\n"); break;
+ case 0x82: LOGMASKED(LOG_CMD, "send data\n"); break;
+ case 0x83: LOGMASKED(LOG_CMD, "disconnect\n"); break;
+ case 0x84: LOGMASKED(LOG_CMD, "receive message out\n"); break;
+ case 0x85: LOGMASKED(LOG_CMD, "receive command\n"); break;
+ case 0x86: LOGMASKED(LOG_CMD, "receive data\n"); break;
+
+ case 0xc0:
+ LOGMASKED(LOG_CMD, "transfer information\n");
+ m_state = XFR_INFO;
+ break;
+ case 0xc1:
+ LOGMASKED(LOG_CMD, "transfer pad\n");
+ m_state = XFR_INFO;
+ break;
+ case 0xc2:
+ LOGMASKED(LOG_CMD, "deassert ack\n");
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);
+ break;
+ case 0xc3:
+ LOGMASKED(LOG_CMD, "assert atn\n");
+ scsi_bus->ctrl_w(scsi_refid, S_ATN, S_ATN);
+ break;
+ case 0xc4:
+ LOGMASKED(LOG_CMD, "deassert atn\n");
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ATN);
+ break;
+ }
+
+ if (m_state == IDLE)
+ {
+ // command completes immediately
+ LOGMASKED(LOG_CMD, "command complete immediate\n");
+
+ m_command = 0;
+ m_status &= ~CIP;
+
+ if (data != CMD_RESET)
+ {
+ m_int_req[1] |= FNC;
+ int_check();
+ }
+ }
+ else
+ m_state_timer->adjust(attotime::zero);
+}
+
+void cxd1185_device::scsi_data_w(u8 data)
+{
+ LOGMASKED(LOG_REG, "scsi_data_w 0x%02x (%s)\n", data, machine().describe_context());
+
+ if (!m_pio_data_mode)
+ {
+ m_fifo.enqueue(data);
+
+ if (m_state != IDLE && !m_state_timer->enabled())
+ m_state_timer->adjust(attotime::zero);
+ }
+ else
+ {
+ u32 const ctrl = scsi_bus->ctrl_r();
+
+ if (!(m_int_req[1] & PHC) &&
+ (((m_status & (INIT | TARG)) == INIT && !(ctrl & S_INP)) ||
+ ((m_status & (INIT | TARG)) == TARG && (ctrl & S_INP))))
+ scsi_bus->data_w(scsi_refid, data);
+ }
+}
+
+void cxd1185_device::environ_w(u8 data)
+{
+ bool const polarity = (data ^ m_environ) & SIRM;
+
+ LOGMASKED(LOG_REG, "environ_w 0x%02x\n", data);
+ if (data ^ m_environ)
+ LOGMASKED(LOG_CONFIG, "%s mode, %s data bus parity, %s irq polarity, divider %d\n",
+ (data & DIFE) ? "differential" : "single-ended",
+ (data & DPEN) ? ((data & SDPM) ? "even" : "odd") : "no",
+ (data & SIRM) ? "negative" : "positive",
+ (data & FS) ? ((data & FS1) ? 2 : 3) : 4);
+
+ m_environ = data;
+
+ // update irq line if polarity changed
+ if (polarity)
+ m_irq_out_cb((m_environ & SIRM) ? !m_irq_asserted : m_irq_asserted);
+}
+
+void cxd1185_device::timer_w(u8 data)
+{
+ LOGMASKED(LOG_REG, "timer_w 0x%02x\n", data);
+
+ unsigned const divisor = (m_environ & FS) ? ((m_environ & FS1) ? 2 : 3) : 4;
+ if (m_mode & TMSL)
+ {
+ m_rst_time = double(divisor * (32 * data + 38)) / clock() * 1E+9;
+
+ LOGMASKED(LOG_CONFIG, "reset timer %d ns\n", m_rst_time);
+ }
+ else
+ {
+ m_sel_time = double(divisor * (data + 1) * 8192) / clock() * 1E+9;
+
+ LOGMASKED(LOG_CONFIG, "selection timer %d ns\n", m_sel_time);
+ }
+}
+
+template <unsigned Register> void cxd1185_device::int_auth_w(u8 data)
+{
+ LOGMASKED(LOG_REG, "int_auth_w<%d> 0x%02x\n", Register, data);
+
+ m_int_auth[Register] = data;
+
+ int_check();
+}
+
+void cxd1185_device::scsi_ctrl_w(u8 data)
+{
+ LOGMASKED(LOG_REG, "scsi_ctrl_w 0x%02x (%s)\n", data, machine().describe_context());
+
+ if (m_pio_ctrl_mode)
+ {
+ u32 nscsi_mask = S_BSY | S_SEL;
+
+ if ((m_status & (INIT | TARG)) == TARG)
+ nscsi_mask |= S_MSG | S_CTL | S_INP | S_REQ;
+ else if ((m_status & (INIT | TARG)) == INIT)
+ nscsi_mask |= S_ACK | S_ATN;
+
+ u32 const nscsi_data =
+ ((data & ABSY) ? S_BSY : 0) |
+ ((data & ASEL) ? S_SEL : 0) |
+ ((data & AMSG) ? S_MSG : 0) |
+ ((data & ACD) ? S_CTL : 0) |
+ ((data & AIO) ? S_INP : 0) |
+ ((data & AREQ) ? S_REQ : 0) |
+ ((data & AACK) ? S_ACK : 0) |
+ ((data & AATN) ? S_ATN : 0);
+
+ scsi_bus->ctrl_w(scsi_refid, nscsi_data, nscsi_mask);
+ }
+ else
+ m_scsi_ctrl = data;
+}
+
+void cxd1185_device::ioport_w(u8 data)
+{
+ LOGMASKED(LOG_REG, "ioport_w 0x%02x\n", data);
+
+ // update direction bits first
+ m_ioport &= ~PCN;
+ m_ioport |= data & PCN;
+
+ u8 const mask = (m_ioport & PCN) >> 4;
+
+ // update output bits
+ m_ioport &= ~mask;
+ m_ioport |= data & mask;
+
+ m_port_out_cb(0, m_ioport & mask, mask);
+}
+
+void cxd1185_device::state_timer(void *ptr, s32 param)
+{
+ // step state machine
+ int delay = state_step();
+
+ // check for interrupts
+ int_check();
+
+ // check for data stall
+ if (delay < 0)
+ return;
+
+ if (m_state == IDLE)
+ {
+ LOGMASKED(LOG_CMD, "command complete\n");
+ m_status &= ~CIP;
+ m_command = 0;
+ }
+ else
+ m_state_timer->adjust(attotime::from_nsec(delay));
+}
+
+int cxd1185_device::state_step()
+{
+ int delay = 0;
+
+ u8 const oid = 1 << ((m_scsi_id & OID) >> 0);
+ u8 const tid = 1 << ((m_scsi_id & TID) >> 5);
+
+ switch (m_state)
+ {
+ case IDLE:
+ break;
+
+ case ARB_BUS_FREE:
+ LOGMASKED(LOG_STATE, "arbitration: waiting for bus free\n");
+ if (!(scsi_bus->ctrl_r() & (S_SEL | S_BSY | S_RST)))
+ {
+ m_state = ARB_START;
+ delay = SCSI_BUS_FREE;
+ }
+ break;
+ case ARB_START:
+ LOGMASKED(LOG_STATE, "arbitration: started\n");
+ m_state = ARB_EVALUATE;
+ delay = SCSI_ARB_DELAY;
+
+ // assert own ID and BSY
+ scsi_bus->data_w(scsi_refid, oid);
+ scsi_bus->ctrl_w(scsi_refid, S_BSY, S_BSY);
+ break;
+ case ARB_EVALUATE:
+ // check if SEL asserted, or if there's a higher ID on the bus
+ if ((scsi_bus->ctrl_r() & S_SEL) || (scsi_bus->data_r() & ~((oid - 1) | oid)))
+ {
+ LOGMASKED(LOG_STATE, "arbitration: lost\n");
+ m_status &= ~INIT;
+ m_int_req[0] |= ARBF;
+
+ m_state = COMPLETE;
+
+ // clear data and BSY
+ scsi_bus->data_w(scsi_refid, 0);
+ scsi_bus->ctrl_w(scsi_refid, 0, S_BSY);
+ }
+ else
+ {
+ LOGMASKED(LOG_STATE, "arbitration: won\n");
+ m_state = SEL_START;
+ delay = SCSI_BUS_CLEAR + SCSI_BUS_SETTLE;
+ }
+ break;
+
+ case SEL_START:
+ LOGMASKED(LOG_STATE, "selection: SEL asserted\n");
+ m_state = SEL_DELAY;
+ delay = SCSI_BUS_SKEW * 2;
+
+ // assert own and target ID and SEL
+ scsi_bus->data_w(scsi_refid, oid | tid);
+ scsi_bus->ctrl_w(scsi_refid, S_SEL, S_SEL);
+ break;
+ case SEL_DELAY:
+ LOGMASKED(LOG_STATE, "selection: BSY cleared\n");
+ m_state = SEL_WAIT_BSY;
+ delay = std::max(m_sel_time, SCSI_BUS_SETTLE);
+
+ // clear BSY, optionally assert ATN
+ if (m_command == CMD_SEL_ATN)
+ scsi_bus->ctrl_w(scsi_refid, S_ATN, S_BSY | S_ATN);
+ else
+ scsi_bus->ctrl_w(scsi_refid, 0, S_BSY);
+ break;
+ case SEL_WAIT_BSY:
+ if (scsi_bus->ctrl_r() & S_BSY)
+ {
+ LOGMASKED(LOG_STATE, "selection: BSY asserted by target\n");
+ m_state = SEL_COMPLETE;
+ delay = SCSI_BUS_SKEW * 2;
+ }
+ else
+ {
+ LOGMASKED(LOG_STATE, "selection: timed out\n");
+ m_status &= ~INIT;
+ m_int_req[0] |= STO;
+ m_state = COMPLETE;
+
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ATN | S_SEL);
+ }
+ break;
+ case SEL_COMPLETE:
+ LOGMASKED(LOG_STATE, "selection: complete\n");
+ m_state = COMPLETE;
+
+ // clear data and SEL
+ scsi_bus->data_w(scsi_refid, 0);
+ scsi_bus->ctrl_w(scsi_refid, 0, S_SEL);
+ break;
+
+ case XFR_INFO:
+ LOGMASKED(LOG_STATE, "transfer: count %d waiting for REQ\n", (m_command & TRBE) ? m_count : 1);
+ if (scsi_bus->ctrl_r() & S_REQ)
+ m_state = scsi_bus->ctrl_r() & S_INP ? XFR_IN : XFR_OUT;
+ break;
+ case XFR_IN:
+ // FIXME: datasheet says ACK should be asserted when TRBE & FIF
+ if (!m_fifo.full())
+ {
+ u8 const data = ((m_command & CMD) == (CMD_XFR_PAD & CMD)) ? 0 : scsi_bus->data_r();
+ LOGMASKED(LOG_STATE, "transfer in: data 0x%02x\n", data);
+
+ m_fifo.enqueue(data);
+ if (m_command & TRBE)
+ m_count--;
+
+ m_state = XFR_IN_NEXT;
+
+ // assert ACK
+ scsi_bus->ctrl_w(scsi_refid, S_ACK, S_ACK);
+ }
+ else
+ {
+ delay = -1;
+ if (m_command & DMA)
+ set_drq(true);
+ }
+ break;
+ case XFR_IN_NEXT:
+ if (!(scsi_bus->ctrl_r() & S_REQ))
+ {
+ LOGMASKED(LOG_STATE, "transfer in: count %d\n", (m_command & TRBE) ? m_count : 0);
+ if (!(m_command & TRBE) || !m_count)
+ {
+ if (m_command & TRBE)
+ m_status |= TRBZ;
+
+ m_state = XFR_IN_DRAIN;
+ }
+ else
+ m_state = XFR_IN_REQ;
+
+ // clear ACK except for single-byte message-in
+ if (!((scsi_bus->ctrl_r() & S_PHASE_MASK) == S_PHASE_MSG_IN && !(m_command & TRBE)))
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);
+ }
+ break;
+ case XFR_IN_REQ:
+ if (scsi_bus->ctrl_r() & S_REQ)
+ {
+ // check if target changed phase
+ if (m_int_req[1] & PHC)
+ {
+ if (m_command & DMA)
+ set_drq(false);
+
+ m_state = XFR_INFO_DONE;
+ }
+ else
+ m_state = XFR_IN;
+ }
+ break;
+ case XFR_IN_DRAIN:
+ if (!m_fifo.empty() && (m_command & DMA))
+ set_drq(true);
+ m_state = XFR_INFO_DONE;
+ break;
+ case XFR_OUT:
+ if (!m_fifo.empty() || (m_command & CMD) == (CMD_XFR_PAD & CMD))
+ {
+ u8 const data = ((m_command & CMD) == (CMD_XFR_PAD & CMD)) ? 0 : m_fifo.dequeue();
+
+ LOGMASKED(LOG_STATE, "transfer out: data 0x%02x\n", data);
+ m_state = XFR_OUT_NEXT;
+
+ // assert data and ACK
+ scsi_bus->data_w(scsi_refid, data);
+ scsi_bus->ctrl_w(scsi_refid, S_ACK, S_ACK);
+ }
+ else
+ {
+ delay = -1;
+ if (m_command & DMA)
+ set_drq(true);
+ }
+ break;
+ case XFR_OUT_NEXT:
+ if (!(scsi_bus->ctrl_r() & S_REQ))
+ {
+ LOGMASKED(LOG_STATE, "transfer out: data ACK\n");
+ if (m_command & TRBE)
+ {
+ if (!--m_count)
+ {
+ m_status |= TRBZ;
+ m_state = XFR_INFO_DONE;
+ }
+ else
+ m_state = XFR_OUT_REQ;
+ }
+ else
+ m_state = XFR_INFO_DONE;
+
+ // clear data and ACK
+ scsi_bus->data_w(scsi_refid, 0);
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);
+ }
+ break;
+ case XFR_OUT_REQ:
+ LOGMASKED(LOG_STATE, "transfer out: count %d waiting for REQ\n", m_count);
+ if (scsi_bus->ctrl_r() & S_REQ)
+ {
+ // check if target changed phase
+ if (m_int_req[1] & PHC)
+ {
+ if (m_command & DMA)
+ set_drq(false);
+
+ m_state = XFR_INFO_DONE;
+ }
+ else
+ m_state = XFR_OUT;
+ }
+ break;
+ case XFR_INFO_DONE:
+ LOGMASKED(LOG_STATE, "transfer: complete\n");
+ m_state = COMPLETE;
+ break;
+
+ case BUS_RESET:
+ LOGMASKED(LOG_STATE, "bus reset: asserted\n");
+ m_status &= ~(INIT | TARG);
+ m_int_req[1] |= SRST;
+
+ m_state = BUS_RESET_DONE;
+ delay = (m_mode & TMSL) ? m_rst_time : SCSI_RST_HOLD;
+
+ // clear data and assert RST
+ scsi_bus->data_w(scsi_refid, 0);
+ scsi_bus->ctrl_w(scsi_refid, S_RST, S_ALL);
+ break;
+ case BUS_RESET_DONE:
+ LOGMASKED(LOG_STATE, "bus reset: complete\n");
+ if (m_mode & TMSL)
+ m_int_req[0] |= STO;
+ m_state = COMPLETE;
+
+ // clear RST
+ scsi_bus->ctrl_w(scsi_refid, 0, S_RST);
+ break;
+
+ case COMPLETE:
+ LOGMASKED(LOG_STATE, "function complete\n");
+ m_int_req[1] |= FNC;
+ m_state = IDLE;
+ break;
+ }
+
+ return delay;
+}
+
+void cxd1185_device::scsi_ctrl_changed()
+{
+ u32 const ctrl = scsi_bus->ctrl_r();
+
+ if ((ctrl & S_BSY) && !(ctrl & S_SEL))
+ LOGMASKED(LOG_SCSI, "scsi_ctrl_changed 0x%x phase %s%s%s\n", ctrl, nscsi_phase[ctrl & S_PHASE_MASK],
+ ctrl & S_REQ ? " REQ" : "", ctrl & S_ACK ? " ACK" : "");
+ else if (ctrl & S_BSY)
+ LOGMASKED(LOG_SCSI, "scsi_ctrl_changed 0x%x arbitration/selection\n", ctrl);
+ else if (ctrl & S_RST)
+ LOGMASKED(LOG_SCSI, "scsi_ctrl_changed 0x%x BUS RESET\n", ctrl);
+ else
+ LOGMASKED(LOG_SCSI, "scsi_ctrl_changed 0x%x BUS FREE\n", ctrl);
+
+ if (ctrl & S_RST)
+ {
+ m_status &= ~(INIT | TARG);
+ m_int_req[1] |= SRST;
+
+ // clear data and ctrl
+ scsi_bus->data_w(scsi_refid, 0);
+ scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
+ }
+ else if ((m_status & (TARG | INIT)) == INIT)
+ {
+ if ((ctrl & S_SEL) && !(m_scsi_ctrl_state & S_BSY) && (ctrl & S_BSY))
+ {
+ LOGMASKED(LOG_SCSI, "target selected\n");
+
+ // truncate selection delay
+ m_state_timer->adjust(attotime::zero);
+ }
+ else if ((m_scsi_ctrl_state & S_BSY) && !(ctrl & S_BSY))
+ {
+ LOGMASKED(LOG_SCSI, "target disconnected\n");
+
+ m_status &= ~INIT;
+ m_int_req[1] |= DCNT;
+ }
+ else if ((ctrl ^ m_scsi_ctrl_state) & S_PHASE_MASK)
+ {
+ if (ctrl & S_REQ)
+ {
+ LOGMASKED(LOG_SCSI, "target changed phase\n");
+
+ m_int_req[1] |= PHC;
+ if (ctrl & S_MSG)
+ m_int_req[1] |= RMSG;
+ }
+ else
+ // ignore until req asserted
+ return;
+ }
+ }
+ else if ((m_status & (TARG | INIT)) == TARG)
+ {
+ if (!(m_scsi_ctrl_state & S_ATN) && (ctrl & S_ATN))
+ {
+ LOGMASKED(LOG_SCSI, "initiator asserted attention\n");
+
+ m_int_req[1] |= DATN;
+ }
+ }
+
+ // record state
+ m_scsi_ctrl_state = ctrl;
+
+ int_check();
+}
+
+void cxd1185_device::int_check()
+{
+ bool irq_asserted = false;
+
+ // update mirq
+ if (m_int_req[0] || m_int_req[1])
+ {
+ m_status |= MIRQ;
+
+ irq_asserted = (m_int_req[0] & m_int_auth[0]) || (m_int_req[1] & m_int_auth[1]);
+ }
+ else
+ m_status &= ~MIRQ;
+
+ // update irq line
+ if (m_irq_asserted != irq_asserted)
+ {
+ LOGMASKED(LOG_INT, "irq_check interrupt %s\n", irq_asserted ? "asserted" : "cleared");
+
+ m_irq_asserted = irq_asserted;
+ m_irq_out_cb((m_environ & SIRM) ? !m_irq_asserted : m_irq_asserted);
+ }
+}
+
+void cxd1185_device::set_drq(bool asserted)
+{
+ if (m_drq_asserted != asserted)
+ {
+ LOGMASKED(LOG_DMA, "set_drq %s\n", asserted ? "asserted" : "deasserted");
+ m_drq_asserted = asserted;
+ m_drq_out_cb(m_drq_asserted);
+ }
+}
+
+u8 cxd1185_device::dma_r()
+{
+ u8 const data = m_fifo.dequeue();
+
+ LOGMASKED(LOG_DMA, "dma_r 0x%02x\n", data);
+
+ if (m_fifo.empty())
+ {
+ set_drq(false);
+
+ if (m_count)
+ m_state_timer->adjust(attotime::zero);
+ }
+
+ return data;
+}
+
+void cxd1185_device::dma_w(u8 data)
+{
+ LOGMASKED(LOG_DMA, "dma_w 0x%02x\n", data);
+
+ m_fifo.enqueue(data);
+
+ if (m_fifo.full() || m_fifo.queue_length() >= m_count)
+ {
+ set_drq(false);
+
+ if (m_count)
+ m_state_timer->adjust(attotime::zero);
+ }
+}
+
+void cxd1185_device::port_w(u8 data)
+{
+ u8 const mask = ~(PCN | ((m_ioport & PCN) >> 4));
+
+ LOGMASKED(LOG_GENERAL, "port_w 0x%02x mask 0x%02x\n", data, mask);
+
+ m_ioport &= ~mask;
+ m_ioport |= data & mask;
+}
diff --git a/src/devices/machine/cxd1185.h b/src/devices/machine/cxd1185.h
new file mode 100644
index 00000000000..a064c9e5c23
--- /dev/null
+++ b/src/devices/machine/cxd1185.h
@@ -0,0 +1,249 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+#ifndef MAME_MACHINE_CXD1185_H
+#define MAME_MACHINE_CXD1185_H
+
+#pragma once
+
+#include "machine/nscsi_bus.h"
+
+class cxd1185_device
+ : public nscsi_device
+ , public nscsi_slot_card_interface
+{
+public:
+ cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+
+ // device configuration
+ auto irq_out_cb() { return m_irq_out_cb.bind(); }
+ auto drq_out_cb() { return m_drq_out_cb.bind(); }
+ auto port_out_cb() { return m_port_out_cb.bind(); }
+
+ void map(address_map &map);
+
+ // dma and port handlers
+ u8 dma_r();
+ void dma_w(u8 data);
+ void port_w(u8 data);
+
+protected:
+ // device_t overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // ncsci_device overrides
+ virtual void scsi_ctrl_changed() override;
+
+ // register handlers
+ u8 status_r();
+ u8 scsi_data_r();
+ template <unsigned Register> u8 int_req_r();
+ u8 scsi_ctrl_monitor_r();
+ u8 fifo_status_r();
+ u8 scsi_id_r() { return m_scsi_id; }
+ template <unsigned Byte> u8 count_r() { return u8(m_count >> (Byte * 8)); }
+ template <unsigned Register> u8 int_auth_r() { return m_int_auth[Register]; }
+ u8 mode_r() { return m_mode; }
+ u8 sync_ctrl_r() { return m_sync_ctrl; }
+ u8 scsi_ctrl_r() { return m_scsi_ctrl; }
+ u8 ioport_r() { return m_ioport; }
+
+ void command_w(u8 data);
+ void scsi_data_w(u8 data);
+ void environ_w(u8 data);
+ void timer_w(u8 data);
+ void scsi_id_w(u8 data) { m_scsi_id = data; }
+ template <unsigned Byte> void count_w(u8 data) { m_count &= ~(0xffU << (Byte * 8)); m_count |= u32(data) << (Byte * 8); }
+ template <unsigned Register> void int_auth_w(u8 data);
+ void mode_w(u8 data) { m_mode = data; }
+ void sync_ctrl_w(u8 data) { m_sync_ctrl = data; }
+ void scsi_ctrl_w(u8 data);
+ void ioport_w(u8 data);
+
+ // state machine
+ void state_timer(void *ptr, s32 param);
+ int state_step();
+
+ // other logic
+ void reset_chip();
+ void reset_fifo();
+ void int_check();
+ void set_drq(bool asserted);
+
+private:
+ devcb_write_line m_irq_out_cb;
+ devcb_write_line m_drq_out_cb;
+ devcb_write8 m_port_out_cb;
+
+ emu_timer *m_state_timer;
+ enum state : unsigned
+ {
+ IDLE,
+
+ // arbitration
+ ARB_BUS_FREE,
+ ARB_START,
+ ARB_EVALUATE,
+
+ // selection
+ SEL_START,
+ SEL_DELAY,
+ SEL_WAIT_BSY,
+ SEL_COMPLETE,
+
+ // information transfer
+ XFR_INFO,
+ XFR_IN,
+ XFR_IN_NEXT,
+ XFR_IN_REQ,
+ XFR_IN_DRAIN,
+ XFR_OUT,
+ XFR_OUT_NEXT,
+ XFR_OUT_REQ,
+ XFR_INFO_DONE,
+
+ // scsi bus reset
+ BUS_RESET,
+ BUS_RESET_DONE,
+
+ COMPLETE,
+ }
+ m_state;
+
+ // internal state
+ bool m_irq_asserted;
+ bool m_drq_asserted;
+ util::fifo <u8, 16> m_fifo;
+ bool m_pio_data_mode;
+ bool m_pio_ctrl_mode;
+ u32 m_scsi_ctrl_state;
+
+ enum status_mask : u8
+ {
+ CIP = 0x01, // command in progress
+ MIRQ = 0x02, // monitor irq
+ TRBZ = 0x04, // transfer byte count zero
+ TARG = 0x08, // target
+ INIT = 0x10, // initiator
+
+ MDBP = 0x40, // monitor scsi bus DBP
+ MRST = 0x80, // monitor scsi bus RST
+ };
+ enum command_mask : u8
+ {
+ CMD = 0x0f, // command code
+ TRBE = 0x10, // transfer byte counter enable
+ DMA = 0x20, // dma mode
+ CAT = 0xc0, // command category
+
+ CMD_RESET = 0x01,
+ CMD_SEL_ATN = 0x42,
+ CMD_XFR_PAD = 0xc1,
+ };
+ enum int_req1 : u8
+ {
+ ARBF = 0x01, // arbitration fail
+ SWOA = 0x02, // selection without atn
+ SWA = 0x04, // selection with atn
+ RSL = 0x08, // reselected
+ STO = 0x10, // selection time over
+ };
+ enum int_req2 : u8
+ {
+ RMSG = 0x01, // req in message phase
+ SPE = 0x02, // scsi bus parity error
+ DPE = 0x04, // data bus parity error
+ DATN = 0x08, // drive atn
+ PHC = 0x10, // phase change
+ SRST = 0x20, // scsi reset
+ DCNT = 0x40, // disconnected
+ FNC = 0x80, // function complete
+ };
+ enum fifo_status_mask : u8
+ {
+ FC = 0x0f, // fifo count
+ FIF = 0x10, // fifo is full
+
+ FIE = 0x80, // fifo is empty
+ };
+ enum environ_mask : u8
+ {
+ FS0 = 0x01,
+ FS1 = 0x02,
+ FS = 0x03, // clock division ratio
+
+ SIRM = 0x10, // irq active low
+ DPEN = 0x20, // data bus parity enable
+ SDPM = 0x40, // data bus parity even
+ DIFE = 0x80, // differential mode
+ };
+ enum scsi_ctrl_monitor_mask : u8
+ {
+ MATN = 0x01,
+ MACK = 0x02,
+ MREQ = 0x04,
+ MIO = 0x08,
+ MCD = 0x10,
+ MMSG = 0x20,
+ MSEL = 0x40,
+ MBSY = 0x80,
+ };
+ enum scsi_id_mask : u8
+ {
+ OID = 0x07, // owner id
+ SMOD = 0x10, // single initiator mode
+ SID = 0xe0, // selecting id
+ TID = 0xe0, // target id
+ };
+ enum mode_mask : u8
+ {
+ BDMA = 0x01, // burst dma mode
+ SSPE = 0x04, // ignore selection scsi parity error
+ SPHI = 0x08, // scsi phase change ignore
+ TMSL = 0x10, // scsi reset timer enable
+ HATN = 0x20, // halt on atn
+ HSPE = 0x40, // halt on scsi parity error
+ HDPE = 0x80, // halt on data bus parity error
+ };
+ enum sync_ctrl_mask : u8
+ {
+ TOF = 0x0f, // transfer offset
+ TPD = 0xf0, // transfer cycle
+ };
+ enum io_port_mask : u8
+ {
+ PRT = 0x0f, // i/o port data
+ PCN = 0xf0, // i/o port control
+ };
+ enum scsi_ctrl_mask : u8
+ {
+ AATN = 0x01,
+ AACK = 0x02,
+ AREQ = 0x04,
+ AIO = 0x08,
+ ACD = 0x10,
+ AMSG = 0x20,
+ ASEL = 0x40,
+ ABSY = 0x80,
+ };
+
+ // registers
+ u8 m_status;
+ u8 m_command;
+ u8 m_int_req[2];
+ u8 m_environ;
+ unsigned m_sel_time;
+ unsigned m_rst_time;
+ u8 m_scsi_id;
+ u8 m_int_auth[2];
+ u8 m_mode;
+ u32 m_count;
+ u8 m_sync_ctrl;
+ u8 m_scsi_ctrl;
+ u8 m_ioport;
+};
+
+DECLARE_DEVICE_TYPE(CXD1185, cxd1185_device)
+
+#endif // MAME_MACHINE_CXD1185_H
diff --git a/src/devices/machine/ds1386.cpp b/src/devices/machine/ds1386.cpp
index 0f430413017..c5a9048f2fc 100644
--- a/src/devices/machine/ds1386.cpp
+++ b/src/devices/machine/ds1386.cpp
@@ -422,7 +422,7 @@ void ds1386_device::nvram_write(emu_file &file)
file.write(&m_ram[0], m_ram_size);
}
-WRITE8_MEMBER( ds1386_device::data_w )
+void ds1386_device::data_w(offs_t offset, uint8_t data)
{
if (offset >= m_ram_size)
return;
@@ -582,7 +582,7 @@ WRITE8_MEMBER( ds1386_device::data_w )
}
}
-READ8_MEMBER( ds1386_device::data_r )
+uint8_t ds1386_device::data_r(offs_t offset)
{
if (offset >= m_ram_size)
return 0;
diff --git a/src/devices/machine/ds1386.h b/src/devices/machine/ds1386.h
index 17e01b9f458..0e994e436c9 100644
--- a/src/devices/machine/ds1386.h
+++ b/src/devices/machine/ds1386.h
@@ -85,8 +85,8 @@ public:
auto intb() { return m_intb_cb.bind(); }
auto sqw() { return m_sqw_cb.bind(); }
- DECLARE_WRITE8_MEMBER( data_w );
- DECLARE_READ8_MEMBER( data_r );
+ void data_w(offs_t offset, uint8_t data);
+ uint8_t data_r(offs_t offset);
DECLARE_WRITE_LINE_MEMBER( ce_w );
DECLARE_WRITE_LINE_MEMBER( oe_w );
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp
index ce24d0336ca..0b62e2dbbcf 100644
--- a/src/devices/machine/ds2404.cpp
+++ b/src/devices/machine/ds2404.cpp
@@ -6,6 +6,11 @@
RTC + BACKUP RAM
+ FIXME: This device implements a parallel interface provided by the
+ Seibu SEI600 for the convenience of SPI emulation. It does not
+ implement the 1-Wire protocol actually used with that ASIC, nor
+ does it implement the alternate 3-Wire serial interface.
+
**********************************************************************/
#include "emu.h"
@@ -66,19 +71,19 @@ void ds2404_device::device_start()
m_rtc[4] = (current_time >> 24) & 0xff;
for (auto & elem : m_state)
- elem = DS2404_STATE_IDLE;
+ elem = STATE_IDLE;
m_tick_timer = timer_alloc(0);
m_tick_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256));
}
-void ds2404_device::ds2404_rom_cmd(uint8_t cmd)
+void ds2404_device::rom_cmd(uint8_t cmd)
{
switch(cmd)
{
case 0xcc: /* Skip ROM */
- m_state[0] = DS2404_STATE_COMMAND;
+ m_state[0] = STATE_COMMAND;
m_state_ptr = 0;
break;
@@ -87,32 +92,32 @@ void ds2404_device::ds2404_rom_cmd(uint8_t cmd)
}
}
-void ds2404_device::ds2404_cmd(uint8_t cmd)
+void ds2404_device::cmd(uint8_t cmd)
{
switch(cmd)
{
case 0x0f: /* Write scratchpad */
- m_state[0] = DS2404_STATE_ADDRESS1;
- m_state[1] = DS2404_STATE_ADDRESS2;
- m_state[2] = DS2404_STATE_INIT_COMMAND;
- m_state[3] = DS2404_STATE_WRITE_SCRATCHPAD;
+ m_state[0] = STATE_ADDRESS1;
+ m_state[1] = STATE_ADDRESS2;
+ m_state[2] = STATE_INIT_COMMAND;
+ m_state[3] = STATE_WRITE_SCRATCHPAD;
m_state_ptr = 0;
break;
case 0x55: /* Copy scratchpad */
- m_state[0] = DS2404_STATE_ADDRESS1;
- m_state[1] = DS2404_STATE_ADDRESS2;
- m_state[2] = DS2404_STATE_OFFSET;
- m_state[3] = DS2404_STATE_INIT_COMMAND;
- m_state[4] = DS2404_STATE_COPY_SCRATCHPAD;
+ m_state[0] = STATE_ADDRESS1;
+ m_state[1] = STATE_ADDRESS2;
+ m_state[2] = STATE_OFFSET;
+ m_state[3] = STATE_INIT_COMMAND;
+ m_state[4] = STATE_COPY_SCRATCHPAD;
m_state_ptr = 0;
break;
case 0xf0: /* Read memory */
- m_state[0] = DS2404_STATE_ADDRESS1;
- m_state[1] = DS2404_STATE_ADDRESS2;
- m_state[2] = DS2404_STATE_INIT_COMMAND;
- m_state[3] = DS2404_STATE_READ_MEMORY;
+ m_state[0] = STATE_ADDRESS1;
+ m_state[1] = STATE_ADDRESS2;
+ m_state[2] = STATE_INIT_COMMAND;
+ m_state[3] = STATE_READ_MEMORY;
m_state_ptr = 0;
break;
@@ -121,7 +126,7 @@ void ds2404_device::ds2404_cmd(uint8_t cmd)
}
}
-uint8_t ds2404_device::ds2404_readmem()
+uint8_t ds2404_device::readmem()
{
if( m_address < 0x200 )
{
@@ -134,7 +139,7 @@ uint8_t ds2404_device::ds2404_readmem()
return 0;
}
-void ds2404_device::ds2404_writemem(uint8_t value)
+void ds2404_device::writemem(uint8_t value)
{
if( m_address < 0x200 )
{
@@ -146,36 +151,36 @@ void ds2404_device::ds2404_writemem(uint8_t value)
}
}
-WRITE8_MEMBER( ds2404_device::ds2404_1w_reset_w )
+void ds2404_device::_1w_reset_w(uint8_t data)
{
- m_state[0] = DS2404_STATE_IDLE;
+ m_state[0] = STATE_IDLE;
m_state_ptr = 0;
}
-WRITE8_MEMBER( ds2404_device::ds2404_3w_reset_w )
+void ds2404_device::_3w_reset_w(uint8_t data)
{
- m_state[0] = DS2404_STATE_COMMAND;
+ m_state[0] = STATE_COMMAND;
m_state_ptr = 0;
}
-READ8_MEMBER( ds2404_device::ds2404_data_r )
+uint8_t ds2404_device::data_r()
{
uint8_t value = 0;
switch(m_state[m_state_ptr])
{
- case DS2404_STATE_IDLE:
- case DS2404_STATE_COMMAND:
- case DS2404_STATE_ADDRESS1:
- case DS2404_STATE_ADDRESS2:
- case DS2404_STATE_OFFSET:
- case DS2404_STATE_INIT_COMMAND:
+ case STATE_IDLE:
+ case STATE_COMMAND:
+ case STATE_ADDRESS1:
+ case STATE_ADDRESS2:
+ case STATE_OFFSET:
+ case STATE_INIT_COMMAND:
break;
- case DS2404_STATE_READ_MEMORY:
- value = ds2404_readmem();
+ case STATE_READ_MEMORY:
+ value = readmem();
break;
- case DS2404_STATE_READ_SCRATCHPAD:
+ case STATE_READ_SCRATCHPAD:
if(m_offset < 0x20)
{
value = m_ram[m_offset];
@@ -183,52 +188,52 @@ READ8_MEMBER( ds2404_device::ds2404_data_r )
}
break;
- case DS2404_STATE_WRITE_SCRATCHPAD:
+ case STATE_WRITE_SCRATCHPAD:
break;
- case DS2404_STATE_COPY_SCRATCHPAD:
+ case STATE_COPY_SCRATCHPAD:
break;
}
return value;
}
-WRITE8_MEMBER( ds2404_device::ds2404_data_w )
+void ds2404_device::data_w(uint8_t data)
{
switch( m_state[m_state_ptr] )
{
- case DS2404_STATE_IDLE:
- ds2404_rom_cmd(data & 0xff);
+ case STATE_IDLE:
+ rom_cmd(data & 0xff);
break;
- case DS2404_STATE_COMMAND:
- ds2404_cmd(data & 0xff);
+ case STATE_COMMAND:
+ cmd(data & 0xff);
break;
- case DS2404_STATE_ADDRESS1:
+ case STATE_ADDRESS1:
m_a1 = data & 0xff;
m_state_ptr++;
break;
- case DS2404_STATE_ADDRESS2:
+ case STATE_ADDRESS2:
m_a2 = data & 0xff;
m_state_ptr++;
break;
- case DS2404_STATE_OFFSET:
+ case STATE_OFFSET:
m_end_offset = data & 0xff;
m_state_ptr++;
break;
- case DS2404_STATE_INIT_COMMAND:
+ case STATE_INIT_COMMAND:
break;
- case DS2404_STATE_READ_MEMORY:
+ case STATE_READ_MEMORY:
break;
- case DS2404_STATE_READ_SCRATCHPAD:
+ case STATE_READ_SCRATCHPAD:
break;
- case DS2404_STATE_WRITE_SCRATCHPAD:
+ case STATE_WRITE_SCRATCHPAD:
if( m_offset < 0x20 )
{
m_ram[m_offset] = data & 0xff;
@@ -240,43 +245,43 @@ WRITE8_MEMBER( ds2404_device::ds2404_data_w )
}
break;
- case DS2404_STATE_COPY_SCRATCHPAD:
+ case STATE_COPY_SCRATCHPAD:
break;
}
- if( m_state[m_state_ptr] == DS2404_STATE_INIT_COMMAND )
+ if( m_state[m_state_ptr] == STATE_INIT_COMMAND )
{
switch( m_state[m_state_ptr + 1] )
{
- case DS2404_STATE_IDLE:
- case DS2404_STATE_COMMAND:
- case DS2404_STATE_ADDRESS1:
- case DS2404_STATE_ADDRESS2:
- case DS2404_STATE_OFFSET:
- case DS2404_STATE_INIT_COMMAND:
+ case STATE_IDLE:
+ case STATE_COMMAND:
+ case STATE_ADDRESS1:
+ case STATE_ADDRESS2:
+ case STATE_OFFSET:
+ case STATE_INIT_COMMAND:
break;
- case DS2404_STATE_READ_MEMORY:
+ case STATE_READ_MEMORY:
m_address = (m_a2 << 8) | m_a1;
m_address -= 1;
break;
- case DS2404_STATE_WRITE_SCRATCHPAD:
+ case STATE_WRITE_SCRATCHPAD:
m_address = (m_a2 << 8) | m_a1;
m_offset = m_address & 0x1f;
break;
- case DS2404_STATE_READ_SCRATCHPAD:
+ case STATE_READ_SCRATCHPAD:
m_address = (m_a2 << 8) | m_a1;
m_offset = m_address & 0x1f;
break;
- case DS2404_STATE_COPY_SCRATCHPAD:
+ case STATE_COPY_SCRATCHPAD:
m_address = (m_a2 << 8) | m_a1;
for(int i = 0; i <= m_end_offset; i++)
{
- ds2404_writemem(m_ram[i]);
+ writemem(m_ram[i]);
m_address++;
}
break;
@@ -285,29 +290,29 @@ WRITE8_MEMBER( ds2404_device::ds2404_data_w )
}
}
-WRITE8_MEMBER( ds2404_device::ds2404_clk_w )
+void ds2404_device::clk_w(uint8_t data)
{
switch( m_state[m_state_ptr] )
{
- case DS2404_STATE_IDLE:
- case DS2404_STATE_COMMAND:
- case DS2404_STATE_ADDRESS1:
- case DS2404_STATE_ADDRESS2:
- case DS2404_STATE_OFFSET:
- case DS2404_STATE_INIT_COMMAND:
+ case STATE_IDLE:
+ case STATE_COMMAND:
+ case STATE_ADDRESS1:
+ case STATE_ADDRESS2:
+ case STATE_OFFSET:
+ case STATE_INIT_COMMAND:
break;
- case DS2404_STATE_READ_MEMORY:
+ case STATE_READ_MEMORY:
m_address++;
break;
- case DS2404_STATE_READ_SCRATCHPAD:
+ case STATE_READ_SCRATCHPAD:
break;
- case DS2404_STATE_WRITE_SCRATCHPAD:
+ case STATE_WRITE_SCRATCHPAD:
break;
- case DS2404_STATE_COPY_SCRATCHPAD:
+ case STATE_COPY_SCRATCHPAD:
break;
}
}
diff --git a/src/devices/machine/ds2404.h b/src/devices/machine/ds2404.h
index 3b7442512a4..3e31b5b14cc 100644
--- a/src/devices/machine/ds2404.h
+++ b/src/devices/machine/ds2404.h
@@ -25,14 +25,14 @@ public:
void ref_day(uint8_t day) { m_ref_day = day; }
/* 1-wire interface reset */
- DECLARE_WRITE8_MEMBER(ds2404_1w_reset_w);
+ void _1w_reset_w(uint8_t data);
/* 3-wire interface reset */
- DECLARE_WRITE8_MEMBER(ds2404_3w_reset_w);
+ void _3w_reset_w(uint8_t data);
- DECLARE_READ8_MEMBER(ds2404_data_r);
- DECLARE_WRITE8_MEMBER(ds2404_data_w);
- DECLARE_WRITE8_MEMBER(ds2404_clk_w);
+ uint8_t data_r();
+ void data_w(uint8_t data);
+ void clk_w(uint8_t data);
protected:
// device-level overrides
@@ -49,24 +49,24 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- void ds2404_rom_cmd(uint8_t cmd);
- void ds2404_cmd(uint8_t cmd);
+ void rom_cmd(uint8_t cmd);
+ void cmd(uint8_t cmd);
- uint8_t ds2404_readmem();
- void ds2404_writemem(uint8_t value);
+ uint8_t readmem();
+ void writemem(uint8_t value);
- enum DS2404_STATE
+ enum STATE
{
- DS2404_STATE_IDLE = 1, /* waiting for ROM command, in 1-wire mode */
- DS2404_STATE_COMMAND, /* waiting for memory command */
- DS2404_STATE_ADDRESS1, /* waiting for address bits 0-7 */
- DS2404_STATE_ADDRESS2, /* waiting for address bits 8-15 */
- DS2404_STATE_OFFSET, /* waiting for ending offset */
- DS2404_STATE_INIT_COMMAND,
- DS2404_STATE_READ_MEMORY, /* Read Memory command active */
- DS2404_STATE_WRITE_SCRATCHPAD, /* Write Scratchpad command active */
- DS2404_STATE_READ_SCRATCHPAD, /* Read Scratchpad command active */
- DS2404_STATE_COPY_SCRATCHPAD /* Copy Scratchpad command active */
+ STATE_IDLE = 1, /* waiting for ROM command, in 1-wire mode */
+ STATE_COMMAND, /* waiting for memory command */
+ STATE_ADDRESS1, /* waiting for address bits 0-7 */
+ STATE_ADDRESS2, /* waiting for address bits 8-15 */
+ STATE_OFFSET, /* waiting for ending offset */
+ STATE_INIT_COMMAND,
+ STATE_READ_MEMORY, /* Read Memory command active */
+ STATE_WRITE_SCRATCHPAD, /* Write Scratchpad command active */
+ STATE_READ_SCRATCHPAD, /* Read Scratchpad command active */
+ STATE_COPY_SCRATCHPAD /* Copy Scratchpad command active */
};
emu_timer *m_tick_timer;
@@ -84,7 +84,7 @@ private:
uint8_t m_sram[512]; /* 4096 bits */
uint8_t m_ram[32]; /* scratchpad ram, 256 bits */
uint8_t m_rtc[5]; /* 40-bit RTC counter */
- DS2404_STATE m_state[8];
+ STATE m_state[8];
int m_state_ptr;
};
diff --git a/src/devices/machine/ds75160a.cpp b/src/devices/machine/ds75160a.cpp
index d698fedca4a..d5ad8007a61 100644
--- a/src/devices/machine/ds75160a.cpp
+++ b/src/devices/machine/ds75160a.cpp
@@ -59,7 +59,7 @@ void ds75160a_device::device_start()
// read - read data bus
//-------------------------------------------------
-READ8_MEMBER( ds75160a_device::read )
+uint8_t ds75160a_device::read()
{
uint8_t data = 0;
@@ -76,7 +76,7 @@ READ8_MEMBER( ds75160a_device::read )
// write - write data bus
//-------------------------------------------------
-WRITE8_MEMBER( ds75160a_device::write )
+void ds75160a_device::write(uint8_t data)
{
m_data = data;
diff --git a/src/devices/machine/ds75160a.h b/src/devices/machine/ds75160a.h
index bdc03e9dc99..5e2498d28ad 100644
--- a/src/devices/machine/ds75160a.h
+++ b/src/devices/machine/ds75160a.h
@@ -40,8 +40,8 @@ public:
auto read_callback() { return m_read.bind(); }
auto write_callback() { return m_write.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read();
+ void write(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( te_w );
DECLARE_WRITE_LINE_MEMBER( pe_w );
diff --git a/src/devices/machine/e05a03.cpp b/src/devices/machine/e05a03.cpp
index 3b5ca84b556..2ccf97f026b 100644
--- a/src/devices/machine/e05a03.cpp
+++ b/src/devices/machine/e05a03.cpp
@@ -90,7 +90,7 @@ void e05a03_device::device_reset()
IMPLEMENTATION
***************************************************************************/
-WRITE8_MEMBER( e05a03_device::write )
+void e05a03_device::write(offs_t offset, uint8_t data)
{
logerror("%s: e05a03_w(%02x): %02x\n", machine().describe_context(), offset, data);
@@ -127,7 +127,7 @@ WRITE8_MEMBER( e05a03_device::write )
}
}
-READ8_MEMBER( e05a03_device::read )
+uint8_t e05a03_device::read(offs_t offset)
{
uint8_t result = 0;
diff --git a/src/devices/machine/e05a03.h b/src/devices/machine/e05a03.h
index dc855c2cd67..10022d6814b 100644
--- a/src/devices/machine/e05a03.h
+++ b/src/devices/machine/e05a03.h
@@ -26,8 +26,8 @@ public:
auto pe_wr_callback() { return m_write_pe.bind(); }
auto data_rd_callback() { return m_read_data.bind(); }
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
+ void write(offs_t offset, uint8_t data);
+ uint8_t read(offs_t offset);
WRITE_LINE_MEMBER( home_w ); /* home position signal */
WRITE_LINE_MEMBER( fire_w ); /* printhead solenoids trigger */
diff --git a/src/devices/machine/e05a30.cpp b/src/devices/machine/e05a30.cpp
index 4857c75bc3d..8b6d17f21b1 100644
--- a/src/devices/machine/e05a30.cpp
+++ b/src/devices/machine/e05a30.cpp
@@ -162,7 +162,7 @@ WRITE_LINE_MEMBER( e05a30_device::centronics_input_strobe )
IMPLEMENTATION
***************************************************************************/
-WRITE8_MEMBER( e05a30_device::write )
+void e05a30_device::write(offs_t offset, uint8_t data)
{
LOG("%s: e05a30_w([0xC0%02x]): %02x\n", machine().describe_context(), offset, data);
@@ -190,7 +190,7 @@ WRITE8_MEMBER( e05a30_device::write )
}
}
-READ8_MEMBER( e05a30_device::read )
+uint8_t e05a30_device::read(offs_t offset)
{
uint8_t result = 0;
diff --git a/src/devices/machine/e05a30.h b/src/devices/machine/e05a30.h
index aaf89f63e42..9ac6cefdae5 100644
--- a/src/devices/machine/e05a30.h
+++ b/src/devices/machine/e05a30.h
@@ -25,8 +25,8 @@ public:
auto centronics_fault() { return m_write_centronics_fault.bind(); }
auto centronics_select() { return m_write_centronics_select.bind(); }
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
+ void write(offs_t offset, uint8_t data);
+ uint8_t read(offs_t offset);
/* Centronics stuff */
DECLARE_WRITE_LINE_MEMBER( centronics_input_strobe );
diff --git a/src/devices/machine/f3853.cpp b/src/devices/machine/f3853.cpp
index 8450502c22d..4f7b6ff798b 100644
--- a/src/devices/machine/f3853.cpp
+++ b/src/devices/machine/f3853.cpp
@@ -149,7 +149,7 @@ void f3853_device::device_reset()
// clear ports at power-on
for (int i = 0; i < 4; i++)
- write(machine().dummy_space(), i, 0);
+ write(i, 0);
}
@@ -224,7 +224,7 @@ WRITE_LINE_MEMBER(f3853_device::pri_in_w)
}
-READ8_MEMBER(f3853_device::read)
+uint8_t f3853_device::read(offs_t offset)
{
switch (offset & 3)
{
@@ -240,7 +240,7 @@ READ8_MEMBER(f3853_device::read)
}
}
-WRITE8_MEMBER(f3853_device::write)
+void f3853_device::write(offs_t offset, uint8_t data)
{
switch (offset & 3)
{
@@ -273,7 +273,7 @@ WRITE8_MEMBER(f3853_device::write)
// f3851_device-specific handlers
//-------------------------------------------------
-READ8_MEMBER(f3851_device::read)
+uint8_t f3851_device::read(offs_t offset)
{
switch (offset & 3)
{
@@ -287,7 +287,7 @@ READ8_MEMBER(f3851_device::read)
}
}
-WRITE8_MEMBER(f3851_device::write)
+void f3851_device::write(offs_t offset, uint8_t data)
{
switch (offset & 3)
{
@@ -298,7 +298,7 @@ WRITE8_MEMBER(f3851_device::write)
// interrupt control, timer: same as 3853
case 2: case 3:
- f3853_device::write(space, offset, data);
+ f3853_device::write(offset, data);
break;
}
}
@@ -331,7 +331,7 @@ TIMER_CALLBACK_MEMBER(f3856_device::timer_callback)
timer_start(m_timer_count);
}
-READ8_MEMBER(f3856_device::read)
+uint8_t f3856_device::read(offs_t offset)
{
switch (offset & 3)
{
@@ -341,17 +341,17 @@ READ8_MEMBER(f3856_device::read)
// other: same as 3851
default:
- return f3851_device::read(space, offset);
+ return f3851_device::read(offset);
}
}
-WRITE8_MEMBER(f3856_device::write)
+void f3856_device::write(offs_t offset, uint8_t data)
{
switch (offset & 3)
{
// I/O ports: same as 3851
case 0: case 1:
- f3851_device::write(space, offset, data);
+ f3851_device::write(offset, data);
break;
// interrupt/timer control
@@ -376,7 +376,7 @@ WRITE8_MEMBER(f3856_device::write)
// set timer
case 3:
- f3853_device::write(space, offset, data);
+ f3853_device::write(offset, data);
break;
}
}
@@ -386,7 +386,7 @@ WRITE8_MEMBER(f3856_device::write)
// f38t56_device-specific handlers
//-------------------------------------------------
-READ8_MEMBER(f38t56_device::read)
+uint8_t f38t56_device::read(offs_t offset)
{
switch (offset & 3)
{
@@ -396,17 +396,17 @@ READ8_MEMBER(f38t56_device::read)
// other: same as 3856
default:
- return f3856_device::read(space, offset);
+ return f3856_device::read(offset);
}
}
-WRITE8_MEMBER(f38t56_device::write)
+void f38t56_device::write(offs_t offset, uint8_t data)
{
switch (offset & 3)
{
// I/O ports: same as 3851
case 0: case 1:
- f3851_device::write(space, offset, data);
+ f3851_device::write(offset, data);
break;
// interrupt/timer control
@@ -434,7 +434,7 @@ WRITE8_MEMBER(f38t56_device::write)
// set timer
case 3:
m_timer_modulo = data;
- f3853_device::write(space, offset, data);
+ f3853_device::write(offset, data);
break;
}
}
diff --git a/src/devices/machine/f3853.h b/src/devices/machine/f3853.h
index c529eaa34e6..f7d6adb3b5c 100644
--- a/src/devices/machine/f3853.h
+++ b/src/devices/machine/f3853.h
@@ -73,8 +73,8 @@ public:
auto pri_out_callback() { return m_pri_out_callback.bind(); }
template <typename... T> void set_int_daisy_chain_callback(T &&... args) { m_int_daisy_chain_callback.set(std::forward<T>(args)...); }
- virtual DECLARE_READ8_MEMBER(read);
- virtual DECLARE_WRITE8_MEMBER(write);
+ virtual uint8_t read(offs_t offset);
+ virtual void write(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(ext_int_w);
DECLARE_WRITE_LINE_MEMBER(pri_in_w);
@@ -130,8 +130,8 @@ public:
auto write_a() { return m_write_port[0].bind(); }
auto write_b() { return m_write_port[1].bind(); }
- virtual DECLARE_READ8_MEMBER(read) override;
- virtual DECLARE_WRITE8_MEMBER(write) override;
+ virtual uint8_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint8_t data) override;
protected:
f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -147,8 +147,8 @@ class f3856_device : public f3851_device
public:
f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual DECLARE_READ8_MEMBER(read) override;
- virtual DECLARE_WRITE8_MEMBER(write) override;
+ virtual uint8_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint8_t data) override;
virtual TIMER_CALLBACK_MEMBER(timer_callback) override;
@@ -169,8 +169,8 @@ class f38t56_device : public f3856_device
public:
f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual DECLARE_READ8_MEMBER(read) override;
- virtual DECLARE_WRITE8_MEMBER(write) override;
+ virtual uint8_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint8_t data) override;
};
// device type definition
diff --git a/src/devices/machine/fdc37c665gt.cpp b/src/devices/machine/fdc37c665gt.cpp
index 2f2adb42976..90f78c77e54 100644
--- a/src/devices/machine/fdc37c665gt.cpp
+++ b/src/devices/machine/fdc37c665gt.cpp
@@ -10,7 +10,7 @@ fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char
{
}
-READ8_MEMBER(fdc37c665gt_device::read)
+uint8_t fdc37c665gt_device::read(offs_t offset)
{
uint8_t data = 0;
@@ -29,7 +29,7 @@ READ8_MEMBER(fdc37c665gt_device::read)
return data;
}
-WRITE8_MEMBER(fdc37c665gt_device::write)
+void fdc37c665gt_device::write(offs_t offset, uint8_t data)
{
if ((offset & 0x3f8) == 0x3f8)
{
diff --git a/src/devices/machine/fdc37c665gt.h b/src/devices/machine/fdc37c665gt.h
index 47fdd855503..df733078aae 100644
--- a/src/devices/machine/fdc37c665gt.h
+++ b/src/devices/machine/fdc37c665gt.h
@@ -18,8 +18,8 @@ public:
// construction/destruction
fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/fdc37c93x.cpp b/src/devices/machine/fdc37c93x.cpp
index 002f9458d8e..d29fe2fa89e 100644
--- a/src/devices/machine/fdc37c93x.cpp
+++ b/src/devices/machine/fdc37c93x.cpp
@@ -434,7 +434,7 @@ WRITE_LINE_MEMBER(fdc37c93x_device::kbdp20_gp20_reset_w)
m_gp20_reset_callback(state);
}
-READ8_MEMBER(fdc37c93x_device::read_fdc37c93x)
+uint8_t fdc37c93x_device::read(offs_t offset)
{
if (offset == 0)
{
@@ -455,7 +455,7 @@ READ8_MEMBER(fdc37c93x_device::read_fdc37c93x)
return 0;
}
-WRITE8_MEMBER(fdc37c93x_device::write_fdc37c93x)
+void fdc37c93x_device::write(offs_t offset, uint8_t data)
{
uint8_t byt;
@@ -500,12 +500,12 @@ WRITE8_MEMBER(fdc37c93x_device::write_fdc37c93x)
/* Map/unmap internal devices */
#if 1
-READ8_MEMBER(fdc37c93x_device::disabled_read)
+uint8_t fdc37c93x_device::disabled_read()
{
return 0xff;
}
-WRITE8_MEMBER(fdc37c93x_device::disabled_write)
+void fdc37c93x_device::disabled_write(uint8_t data)
{
}
@@ -548,17 +548,7 @@ void fdc37c93x_device::unmap_fdc_addresses()
void fdc37c93x_device::map_lpt(address_map &map)
{
- map(0x0, 0x3).rw(FUNC(fdc37c93x_device::lpt_read), FUNC(fdc37c93x_device::lpt_write));
-}
-
-READ8_MEMBER(fdc37c93x_device::lpt_read)
-{
- return pc_lpt_lptdev->read(space, offset, mem_mask);
-}
-
-WRITE8_MEMBER(fdc37c93x_device::lpt_write)
-{
- pc_lpt_lptdev->write(space, offset, data, mem_mask);
+ map(0x0, 0x3).rw(pc_lpt_lptdev, FUNC(pc_lpt_device::read), FUNC(pc_lpt_device::write));
}
void fdc37c93x_device::map_lpt_addresses()
@@ -577,17 +567,7 @@ void fdc37c93x_device::unmap_lpt_addresses()
void fdc37c93x_device::map_serial1(address_map &map)
{
- map(0x0, 0x7).rw(FUNC(fdc37c93x_device::serial1_read), FUNC(fdc37c93x_device::serial1_write));
-}
-
-READ8_MEMBER(fdc37c93x_device::serial1_read)
-{
- return pc_serial1_comdev->ins8250_r(offset);
-}
-
-WRITE8_MEMBER(fdc37c93x_device::serial1_write)
-{
- pc_serial1_comdev->ins8250_w(offset, data);
+ map(0x0, 0x7).rw(pc_serial1_comdev, FUNC(ns16450_device::ins8250_r), FUNC(ns16450_device::ins8250_w));
}
void fdc37c93x_device::map_serial1_addresses()
@@ -606,17 +586,7 @@ void fdc37c93x_device::unmap_serial1_addresses()
void fdc37c93x_device::map_serial2(address_map &map)
{
- map(0x0, 0x7).rw(FUNC(fdc37c93x_device::serial2_read), FUNC(fdc37c93x_device::serial2_write));
-}
-
-READ8_MEMBER(fdc37c93x_device::serial2_read)
-{
- return pc_serial2_comdev->ins8250_r(offset);
-}
-
-WRITE8_MEMBER(fdc37c93x_device::serial2_write)
-{
- pc_serial2_comdev->ins8250_w(offset, data);
+ map(0x0, 0x7).rw(pc_serial2_comdev, FUNC(ns16450_device::ins8250_r), FUNC(ns16450_device::ins8250_w));
}
void fdc37c93x_device::map_serial2_addresses()
@@ -635,17 +605,7 @@ void fdc37c93x_device::unmap_serial2_addresses()
void fdc37c93x_device::map_rtc(address_map &map)
{
- map(0x0, 0xf).rw(FUNC(fdc37c93x_device::rtc_read), FUNC(fdc37c93x_device::rtc_write));
-}
-
-READ8_MEMBER(fdc37c93x_device::rtc_read)
-{
- return ds12885_rtcdev->read(offset);
-}
-
-WRITE8_MEMBER(fdc37c93x_device::rtc_write)
-{
- ds12885_rtcdev->write(offset, data);
+ map(0x0, 0xf).rw(ds12885_rtcdev, FUNC(ds12885_device::read), FUNC(ds12885_device::write));
}
void fdc37c93x_device::map_rtc_addresses()
@@ -674,34 +634,34 @@ void fdc37c93x_device::unmap_keyboard(address_map &map)
map(0x4, 0x4).noprw();
}
-READ8_MEMBER(fdc37c93x_device::at_keybc_r)
+uint8_t fdc37c93x_device::at_keybc_r(offs_t offset)
{
switch (offset) //m_kbdc
{
case 0:
- return m_kbdc->data_r(space, 0);
+ return m_kbdc->data_r(0);
}
return 0xff;
}
-WRITE8_MEMBER(fdc37c93x_device::at_keybc_w)
+void fdc37c93x_device::at_keybc_w(offs_t offset, uint8_t data)
{
switch (offset)
{
case 0:
- m_kbdc->data_w(space, 0, data);
+ m_kbdc->data_w(0, data);
}
}
-READ8_MEMBER(fdc37c93x_device::keybc_status_r)
+uint8_t fdc37c93x_device::keybc_status_r()
{
- return (m_kbdc->data_r(space, 4) & 0xfb) | 0x10; // bios needs bit 2 to be 0 as powerup and bit 4 to be 1
+ return (m_kbdc->data_r(4) & 0xfb) | 0x10; // bios needs bit 2 to be 0 as powerup and bit 4 to be 1
}
-WRITE8_MEMBER(fdc37c93x_device::keybc_command_w)
+void fdc37c93x_device::keybc_command_w(uint8_t data)
{
- m_kbdc->data_w(space, 4, data);
+ m_kbdc->data_w(4, data);
}
void fdc37c93x_device::map_keyboard_addresses()
@@ -723,9 +683,9 @@ void fdc37c93x_device::remap(int space_id, offs_t start, offs_t end)
if (space_id == AS_IO)
{
if (sysopt_pin == 0)
- m_isa->install_device(0x03f0, 0x03f3, read8_delegate(*this, FUNC(fdc37c93x_device::read_fdc37c93x)), write8_delegate(*this, FUNC(fdc37c93x_device::write_fdc37c93x)));
+ m_isa->install_device(0x03f0, 0x03f3, read8sm_delegate(*this, FUNC(fdc37c93x_device::read)), write8sm_delegate(*this, FUNC(fdc37c93x_device::write)));
else
- m_isa->install_device(0x0370, 0x0373, read8_delegate(*this, FUNC(fdc37c93x_device::read_fdc37c93x)), write8_delegate(*this, FUNC(fdc37c93x_device::write_fdc37c93x)));
+ m_isa->install_device(0x0370, 0x0373, read8sm_delegate(*this, FUNC(fdc37c93x_device::read)), write8sm_delegate(*this, FUNC(fdc37c93x_device::write)));
if (enabled_logical[LogicalDevice::FDC] == true)
map_fdc_addresses();
if (enabled_logical[LogicalDevice::Parallel] == true)
diff --git a/src/devices/machine/fdc37c93x.h b/src/devices/machine/fdc37c93x.h
index c57921854aa..a4a67d2ccf3 100644
--- a/src/devices/machine/fdc37c93x.h
+++ b/src/devices/machine/fdc37c93x.h
@@ -91,22 +91,14 @@ public:
void unmap_keyboard(address_map &map);
// to access io ports
- DECLARE_READ8_MEMBER(read_fdc37c93x);
- DECLARE_WRITE8_MEMBER(write_fdc37c93x);
- DECLARE_READ8_MEMBER(disabled_read);
- DECLARE_WRITE8_MEMBER(disabled_write);
- DECLARE_READ8_MEMBER(lpt_read);
- DECLARE_WRITE8_MEMBER(lpt_write);
- DECLARE_READ8_MEMBER(serial1_read);
- DECLARE_WRITE8_MEMBER(serial1_write);
- DECLARE_READ8_MEMBER(serial2_read);
- DECLARE_WRITE8_MEMBER(serial2_write);
- DECLARE_READ8_MEMBER(rtc_read);
- DECLARE_WRITE8_MEMBER(rtc_write);
- DECLARE_READ8_MEMBER(at_keybc_r);
- DECLARE_WRITE8_MEMBER(at_keybc_w);
- DECLARE_READ8_MEMBER(keybc_status_r);
- DECLARE_WRITE8_MEMBER(keybc_command_w);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
+ uint8_t disabled_read();
+ void disabled_write(uint8_t data);
+ uint8_t at_keybc_r(offs_t offset);
+ void at_keybc_w(offs_t offset, uint8_t data);
+ uint8_t keybc_status_r();
+ void keybc_command_w(uint8_t data);
DECLARE_FLOPPY_FORMATS(floppy_formats);
diff --git a/src/devices/machine/fga002.cpp b/src/devices/machine/fga002.cpp
index d9708fb37fc..d2ac00f8f62 100644
--- a/src/devices/machine/fga002.cpp
+++ b/src/devices/machine/fga002.cpp
@@ -608,7 +608,7 @@ WRITE_LINE_MEMBER (fga002_device::lirq5_w) { LOGINT("%s\n", FUNCNAME); lirq_w( F
WRITE_LINE_MEMBER (fga002_device::lirq6_w) { LOGINT("%s\n", FUNCNAME); lirq_w( FGA_ISLOCAL6, INT_LOCAL6, FGA_ICRLOCAL6, state ); }
WRITE_LINE_MEMBER (fga002_device::lirq7_w) { LOGINT("%s\n", FUNCNAME); lirq_w( FGA_ISLOCAL7, INT_LOCAL7, FGA_ICRLOCAL7, state ); }
-WRITE8_MEMBER (fga002_device::write){
+void fga002_device::write(offs_t offset, uint8_t data){
LOG("%s[%04x] <- %02x - ", FUNCNAME, offset, data);
LOGSETUP(" * %s Reg %04x <- %02x\n", tag(), offset, data);
switch(offset)
@@ -718,7 +718,7 @@ WRITE8_MEMBER (fga002_device::write){
}
}
-READ8_MEMBER (fga002_device::read){
+uint8_t fga002_device::read(offs_t offset){
uint8_t ret = 0;
LOG("%s[%04x] ", FUNCNAME, offset);
diff --git a/src/devices/machine/fga002.h b/src/devices/machine/fga002.h
index dac28d1c81c..be72206eb76 100644
--- a/src/devices/machine/fga002.h
+++ b/src/devices/machine/fga002.h
@@ -12,8 +12,8 @@ class fga002_device : public device_t
// construction/destruction
fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE8_MEMBER (write);
- DECLARE_READ8_MEMBER (read);
+ void write(offs_t offset, uint8_t data);
+ uint8_t read(offs_t offset);
void lirq_w(int status, int vector, int control, int state);
DECLARE_WRITE_LINE_MEMBER( lirq0_w );
diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp
index ac818a930b5..3163fa1d9c5 100644
--- a/src/devices/machine/genpc.cpp
+++ b/src/devices/machine/genpc.cpp
@@ -38,7 +38,7 @@
*
*************************************************************************/
-WRITE8_MEMBER( ibm5160_mb_device::pc_page_w)
+void ibm5160_mb_device::pc_page_w(offs_t offset, uint8_t data)
{
switch(offset % 4)
{
@@ -64,7 +64,7 @@ WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma_hrq_changed )
}
-READ8_MEMBER( ibm5160_mb_device::pc_dma_read_byte )
+uint8_t ibm5160_mb_device::pc_dma_read_byte(offs_t offset)
{
if(m_dma_channel == -1)
return 0xff;
@@ -74,7 +74,7 @@ READ8_MEMBER( ibm5160_mb_device::pc_dma_read_byte )
}
-WRITE8_MEMBER( ibm5160_mb_device::pc_dma_write_byte )
+void ibm5160_mb_device::pc_dma_write_byte(offs_t offset, uint8_t data)
{
if(m_dma_channel == -1)
return;
@@ -85,41 +85,41 @@ WRITE8_MEMBER( ibm5160_mb_device::pc_dma_write_byte )
}
-READ8_MEMBER( ibm5160_mb_device::pc_dma8237_1_dack_r )
+uint8_t ibm5160_mb_device::pc_dma8237_1_dack_r()
{
return m_isabus->dack_r(1);
}
-READ8_MEMBER( ibm5160_mb_device::pc_dma8237_2_dack_r )
+uint8_t ibm5160_mb_device::pc_dma8237_2_dack_r()
{
return m_isabus->dack_r(2);
}
-READ8_MEMBER( ibm5160_mb_device::pc_dma8237_3_dack_r )
+uint8_t ibm5160_mb_device::pc_dma8237_3_dack_r()
{
return m_isabus->dack_r(3);
}
-WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_1_dack_w )
+void ibm5160_mb_device::pc_dma8237_1_dack_w(uint8_t data)
{
m_isabus->dack_w(1,data);
}
-WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_2_dack_w )
+void ibm5160_mb_device::pc_dma8237_2_dack_w(uint8_t data)
{
m_isabus->dack_w(2,data);
}
-WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_3_dack_w )
+void ibm5160_mb_device::pc_dma8237_3_dack_w(uint8_t data)
{
m_isabus->dack_w(3,data);
}
-WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_0_dack_w )
+void ibm5160_mb_device::pc_dma8237_0_dack_w(uint8_t data)
{
m_u73_q2 = 0;
m_dma8237->dreq0_w( m_u73_q2 );
@@ -306,7 +306,7 @@ WRITE_LINE_MEMBER( ibm5160_mb_device::keyboard_data_w )
m_ppi_data_signal = state;
}
-READ8_MEMBER (ibm5160_mb_device::pc_ppi_porta_r)
+uint8_t ibm5160_mb_device::pc_ppi_porta_r()
{
int data = 0xFF;
/* KB port A */
@@ -332,7 +332,7 @@ READ8_MEMBER (ibm5160_mb_device::pc_ppi_porta_r)
}
-READ8_MEMBER ( ibm5160_mb_device::pc_ppi_portc_r )
+uint8_t ibm5160_mb_device::pc_ppi_portc_r()
{
int data=0xff;
@@ -362,7 +362,7 @@ READ8_MEMBER ( ibm5160_mb_device::pc_ppi_portc_r )
}
-WRITE8_MEMBER( ibm5160_mb_device::pc_ppi_portb_w )
+void ibm5160_mb_device::pc_ppi_portb_w(uint8_t data)
{
/* PPI controller port B*/
m_ppi_portb = data;
@@ -392,7 +392,7 @@ WRITE8_MEMBER( ibm5160_mb_device::pc_ppi_portb_w )
*
**********************************************************/
-WRITE8_MEMBER( ibm5160_mb_device::nmi_enable_w )
+void ibm5160_mb_device::nmi_enable_w(uint8_t data)
{
m_nmi_enabled = BIT(data,7);
if (!m_nmi_enabled)
@@ -656,7 +656,7 @@ ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, device_type
{
}
-READ8_MEMBER (ibm5150_mb_device::pc_ppi_porta_r)
+uint8_t ibm5150_mb_device::pc_ppi_porta_r()
{
int data = 0xFF;
/* KB port A */
@@ -697,7 +697,7 @@ READ8_MEMBER (ibm5150_mb_device::pc_ppi_porta_r)
}
-READ8_MEMBER ( ibm5150_mb_device::pc_ppi_portc_r )
+uint8_t ibm5150_mb_device::pc_ppi_portc_r()
{
int data=0xff;
@@ -765,7 +765,7 @@ READ8_MEMBER ( ibm5150_mb_device::pc_ppi_portc_r )
}
-WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w )
+void ibm5150_mb_device::pc_ppi_portb_w(uint8_t data)
{
/* KB controller port B */
m_ppi_portb = data;
@@ -865,7 +865,7 @@ void ec1840_mb_device::device_start()
{
}
-READ8_MEMBER( ec1840_mb_device::pc_ppi_portc_r )
+uint8_t ec1840_mb_device::pc_ppi_portc_r()
{
int data = 0xff;
@@ -985,7 +985,7 @@ void ec1841_mb_device::device_start()
}
// kbd interface is 5150-like but PB2 controls access to second bank of DIP switches (SA2).
-WRITE8_MEMBER( ec1841_mb_device::pc_ppi_portb_w )
+void ec1841_mb_device::pc_ppi_portb_w(uint8_t data)
{
/* KB controller port B */
m_ppi_portb = data;
@@ -1008,7 +1008,7 @@ WRITE8_MEMBER( ec1841_mb_device::pc_ppi_portb_w )
m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal);
}
-READ8_MEMBER( ec1841_mb_device::pc_ppi_portc_r )
+uint8_t ec1841_mb_device::pc_ppi_portc_r()
{
int data=0xff;
diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h
index e302df90513..c1bce1c3072 100644
--- a/src/devices/machine/genpc.h
+++ b/src/devices/machine/genpc.h
@@ -45,8 +45,8 @@ public:
uint8_t m_pit_out2;
- DECLARE_WRITE8_MEMBER(pc_page_w);
- DECLARE_WRITE8_MEMBER(nmi_enable_w);
+ void pc_page_w(offs_t offset, uint8_t data);
+ void nmi_enable_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata );
@@ -107,21 +107,21 @@ protected:
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
DECLARE_WRITE_LINE_MEMBER( keyboard_data_w );
- DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
- DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
- DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
+ uint8_t pc_ppi_porta_r();
+ uint8_t pc_ppi_portc_r();
+ void pc_ppi_portb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( pc_dma_hrq_changed );
DECLARE_WRITE_LINE_MEMBER( pc_dma8237_out_eop );
- DECLARE_READ8_MEMBER( pc_dma_read_byte );
- DECLARE_WRITE8_MEMBER( pc_dma_write_byte );
- DECLARE_READ8_MEMBER( pc_dma8237_1_dack_r );
- DECLARE_READ8_MEMBER( pc_dma8237_2_dack_r );
- DECLARE_READ8_MEMBER( pc_dma8237_3_dack_r );
- DECLARE_WRITE8_MEMBER( pc_dma8237_1_dack_w );
- DECLARE_WRITE8_MEMBER( pc_dma8237_2_dack_w );
- DECLARE_WRITE8_MEMBER( pc_dma8237_3_dack_w );
- DECLARE_WRITE8_MEMBER( pc_dma8237_0_dack_w );
+ uint8_t pc_dma_read_byte(offs_t offset);
+ void pc_dma_write_byte(offs_t offset, uint8_t data);
+ uint8_t pc_dma8237_1_dack_r();
+ uint8_t pc_dma8237_2_dack_r();
+ uint8_t pc_dma8237_3_dack_r();
+ void pc_dma8237_1_dack_w(uint8_t data);
+ void pc_dma8237_2_dack_w(uint8_t data);
+ void pc_dma8237_3_dack_w(uint8_t data);
+ void pc_dma8237_0_dack_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( pc_dack0_w );
DECLARE_WRITE_LINE_MEMBER( pc_dack1_w );
DECLARE_WRITE_LINE_MEMBER( pc_dack2_w );
@@ -156,9 +156,9 @@ protected:
private:
required_device<cassette_image_device> m_cassette;
- DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
- DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
- DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
+ uint8_t pc_ppi_porta_r();
+ uint8_t pc_ppi_portc_r();
+ void pc_ppi_portb_w(uint8_t data);
};
@@ -181,8 +181,8 @@ protected:
virtual void device_start() override;
private:
- DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
- DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
+ uint8_t pc_ppi_portc_r();
+ void pc_ppi_portb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
};
@@ -203,8 +203,8 @@ protected:
virtual void device_start() override;
private:
- DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
- DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
+ uint8_t pc_ppi_portc_r();
+ void pc_ppi_portb_w(uint8_t data);
};
DECLARE_DEVICE_TYPE(EC1840_MOTHERBOARD, ec1840_mb_device)
diff --git a/src/devices/machine/hd64610.cpp b/src/devices/machine/hd64610.cpp
index 0da686e7bf0..3b8393b9a11 100644
--- a/src/devices/machine/hd64610.cpp
+++ b/src/devices/machine/hd64610.cpp
@@ -276,7 +276,7 @@ void hd64610_device::nvram_write(emu_file &file)
// hardware start/stop
//-------------------------------------------------
-WRITE_LINE_MEMBER( hd64610_device::h_w )
+void hd64610_device::h_w(int state)
{
m_hline_state = state;
}
@@ -286,7 +286,7 @@ WRITE_LINE_MEMBER( hd64610_device::h_w )
// read -
//-------------------------------------------------
-READ8_MEMBER( hd64610_device::read )
+uint8_t hd64610_device::read(offs_t offset)
{
uint8_t data = m_regs[offset & 0x0f];
@@ -300,7 +300,7 @@ READ8_MEMBER( hd64610_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( hd64610_device::write )
+void hd64610_device::write(offs_t offset, uint8_t data)
{
switch (offset & 0x0f)
{
diff --git a/src/devices/machine/hd64610.h b/src/devices/machine/hd64610.h
index 9e5e0ae18d8..517ff11284f 100644
--- a/src/devices/machine/hd64610.h
+++ b/src/devices/machine/hd64610.h
@@ -39,11 +39,11 @@ public:
auto irq() { return m_out_irq_cb.bind(); }
auto clkout() { return m_out_1hz_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
// hardware start/stop line
- DECLARE_WRITE_LINE_MEMBER( h_w );
+ void h_w(int state);
protected:
// device-level overrides
diff --git a/src/devices/machine/i7220.cpp b/src/devices/machine/i7220.cpp
index 0e86dc081bb..4050cd5aff8 100644
--- a/src/devices/machine/i7220.cpp
+++ b/src/devices/machine/i7220.cpp
@@ -575,7 +575,7 @@ void i7220_device::write_data_continue(bubble_info &bi)
// read -
//-------------------------------------------------
-READ8_MEMBER(i7220_device::read)
+uint8_t i7220_device::read(offs_t offset)
{
uint8_t data = 0;
@@ -643,7 +643,7 @@ READ8_MEMBER(i7220_device::read)
// write -
//-------------------------------------------------
-WRITE8_MEMBER( i7220_device::write )
+void i7220_device::write(offs_t offset, uint8_t data)
{
static const char *commands[] = {
"Write Bootloop Register Masked",
diff --git a/src/devices/machine/i7220.h b/src/devices/machine/i7220.h
index d4d24a3e049..a65eecbf119 100644
--- a/src/devices/machine/i7220.h
+++ b/src/devices/machine/i7220.h
@@ -61,8 +61,8 @@ public:
virtual bool is_reset_on_load() const noexcept override { return false; }
virtual const char *file_extensions() const noexcept override { return "bubble"; }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/i8214.cpp b/src/devices/machine/i8214.cpp
index eccf8d496bc..4eb767d9396 100644
--- a/src/devices/machine/i8214.cpp
+++ b/src/devices/machine/i8214.cpp
@@ -159,7 +159,7 @@ uint8_t i8214_device::a_r()
// 8080-compatible interrupt vector
//-------------------------------------------------
-READ8_MEMBER(i8214_device::vector_r)
+uint8_t i8214_device::vector_r()
{
return 0xc7 | (m_a << 3);
}
@@ -234,7 +234,7 @@ void i8214_device::r_all_w(uint8_t state)
// sgs_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8214_device::sgs_w )
+void i8214_device::sgs_w(int state)
{
LOG("%s: sgs_w: %d\n", machine().describe_context(), state);
@@ -248,7 +248,7 @@ WRITE_LINE_MEMBER( i8214_device::sgs_w )
// etlg_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8214_device::etlg_w )
+void i8214_device::etlg_w(int state)
{
LOG("%s: etlg_w: %d\n", machine().describe_context(), state);
@@ -262,7 +262,7 @@ WRITE_LINE_MEMBER( i8214_device::etlg_w )
// inte_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8214_device::inte_w )
+void i8214_device::inte_w(int state)
{
LOG("%s: inte_w: %d\n", machine().describe_context(), state);
diff --git a/src/devices/machine/i8214.h b/src/devices/machine/i8214.h
index b1246d0bec9..9b567660990 100644
--- a/src/devices/machine/i8214.h
+++ b/src/devices/machine/i8214.h
@@ -35,12 +35,12 @@ public:
auto int_wr_callback() { return m_write_int.bind(); }
auto enlg_wr_callback() { return m_write_enlg.bind(); }
- DECLARE_WRITE_LINE_MEMBER( sgs_w );
- DECLARE_WRITE_LINE_MEMBER( etlg_w );
- DECLARE_WRITE_LINE_MEMBER( inte_w );
+ void sgs_w(int state);
+ void etlg_w(int state);
+ void inte_w(int state);
uint8_t a_r();
- DECLARE_READ8_MEMBER(vector_r);
+ uint8_t vector_r();
void b_w(uint8_t data);
void b_sgs_w(uint8_t data);
void r_w(int line, int state);
diff --git a/src/devices/machine/i82439tx.cpp b/src/devices/machine/i82439tx.cpp
index a3f750c58fb..f8c1c9a8bb3 100644
--- a/src/devices/machine/i82439tx.cpp
+++ b/src/devices/machine/i82439tx.cpp
@@ -149,142 +149,142 @@ void i82439tx_host_device::map_extra(uint64_t memory_window_start, uint64_t memo
}
-READ8_MEMBER (i82439tx_host_device::pcon_r)
+uint8_t i82439tx_host_device::pcon_r()
{
return pcon;
}
-WRITE8_MEMBER(i82439tx_host_device::pcon_w)
+void i82439tx_host_device::pcon_w(uint8_t data)
{
pcon = data;
logerror("pcon = %02x\n", pcon);
}
-READ8_MEMBER (i82439tx_host_device::cc_r)
+uint8_t i82439tx_host_device::cc_r()
{
return cc;
}
-WRITE8_MEMBER(i82439tx_host_device::cc_w)
+void i82439tx_host_device::cc_w(uint8_t data)
{
cc = data;
logerror("cc = %02x\n", cc);
}
-READ8_MEMBER (i82439tx_host_device::dramec_r)
+uint8_t i82439tx_host_device::dramec_r()
{
return dramec;
}
-WRITE8_MEMBER(i82439tx_host_device::dramec_w)
+void i82439tx_host_device::dramec_w(uint8_t data)
{
dramec = data;
logerror("dramec = %02x\n", dramec);
}
-READ8_MEMBER (i82439tx_host_device::dramc_r)
+uint8_t i82439tx_host_device::dramc_r()
{
return dramc;
}
-WRITE8_MEMBER(i82439tx_host_device::dramc_w)
+void i82439tx_host_device::dramc_w(uint8_t data)
{
dramc = data;
logerror("dramc = %02x\n", dramc);
remap_cb();
}
-READ8_MEMBER (i82439tx_host_device::dramt_r)
+uint8_t i82439tx_host_device::dramt_r()
{
return dramt;
}
-WRITE8_MEMBER(i82439tx_host_device::dramt_w)
+void i82439tx_host_device::dramt_w(uint8_t data)
{
dramt = data;
logerror("dramt = %02x\n", dramt);
}
-READ8_MEMBER (i82439tx_host_device::pam_r)
+uint8_t i82439tx_host_device::pam_r(offs_t offset)
{
return pam[offset - 1];
}
-WRITE8_MEMBER(i82439tx_host_device::pam_w)
+void i82439tx_host_device::pam_w(offs_t offset, uint8_t data)
{
pam[offset - 1] = data;
logerror("pam[%d] = %02x\n", offset - 1, pam[offset - 1]);
remap_cb();
}
-READ8_MEMBER (i82439tx_host_device::drb_r)
+uint8_t i82439tx_host_device::drb_r(offs_t offset)
{
return drb[offset];
}
-WRITE8_MEMBER(i82439tx_host_device::drb_w)
+void i82439tx_host_device::drb_w(offs_t offset, uint8_t data)
{
drb[offset] = data;
logerror("drb[%d] = %02x\n", offset, drb[offset]);
}
-READ8_MEMBER (i82439tx_host_device::drt_r)
+uint8_t i82439tx_host_device::drt_r()
{
return drt;
}
-WRITE8_MEMBER(i82439tx_host_device::drt_w)
+void i82439tx_host_device::drt_w(uint8_t data)
{
drt = data;
logerror("drt = %02x\n", drt);
}
-READ8_MEMBER (i82439tx_host_device::drat_r)
+uint8_t i82439tx_host_device::drat_r()
{
return drat;
}
-WRITE8_MEMBER(i82439tx_host_device::drat_w)
+void i82439tx_host_device::drat_w(uint8_t data)
{
drat = data;
logerror("drat = %02x\n", drat);
}
-READ8_MEMBER (i82439tx_host_device::smram_r)
+uint8_t i82439tx_host_device::smram_r()
{
return smram;
}
-WRITE8_MEMBER(i82439tx_host_device::smram_w)
+void i82439tx_host_device::smram_w(uint8_t data)
{
smram = data;
logerror("smram = %02x\n", smram);
remap_cb();
}
-READ8_MEMBER (i82439tx_host_device::errcmd_r)
+uint8_t i82439tx_host_device::errcmd_r()
{
return errcmd;
}
-WRITE8_MEMBER(i82439tx_host_device::errcmd_w)
+void i82439tx_host_device::errcmd_w(uint8_t data)
{
errcmd = data;
logerror("errcmd = %02x\n", errcmd);
}
-READ8_MEMBER (i82439tx_host_device::errsts_r)
+uint8_t i82439tx_host_device::errsts_r()
{
return errsts;
}
-WRITE8_MEMBER(i82439tx_host_device::errsts_w)
+void i82439tx_host_device::errsts_w(uint8_t data)
{
errsts = data;
logerror("errsts = %02x\n", errsts);
}
-READ8_MEMBER (i82439tx_host_device::errsyn_r)
+uint8_t i82439tx_host_device::errsyn_r()
{
return errsyn;
}
diff --git a/src/devices/machine/i82439tx.h b/src/devices/machine/i82439tx.h
index d14c1df0804..a2a9528b1dd 100644
--- a/src/devices/machine/i82439tx.h
+++ b/src/devices/machine/i82439tx.h
@@ -44,31 +44,31 @@ private:
uint8_t pam[7], drb[8];
uint8_t drt, drat, smram, errcmd, errsts, errsyn;
- DECLARE_READ8_MEMBER (pcon_r);
- DECLARE_WRITE8_MEMBER(pcon_w);
- DECLARE_READ8_MEMBER (cc_r);
- DECLARE_WRITE8_MEMBER(cc_w);
- DECLARE_READ8_MEMBER (dramec_r);
- DECLARE_WRITE8_MEMBER(dramec_w);
- DECLARE_READ8_MEMBER (dramc_r);
- DECLARE_WRITE8_MEMBER(dramc_w);
- DECLARE_READ8_MEMBER (dramt_r);
- DECLARE_WRITE8_MEMBER(dramt_w);
- DECLARE_READ8_MEMBER (pam_r);
- DECLARE_WRITE8_MEMBER(pam_w);
- DECLARE_READ8_MEMBER (drb_r);
- DECLARE_WRITE8_MEMBER(drb_w);
- DECLARE_READ8_MEMBER (drt_r);
- DECLARE_WRITE8_MEMBER(drt_w);
- DECLARE_READ8_MEMBER (drat_r);
- DECLARE_WRITE8_MEMBER(drat_w);
- DECLARE_READ8_MEMBER (smram_r);
- DECLARE_WRITE8_MEMBER(smram_w);
- DECLARE_READ8_MEMBER (errcmd_r);
- DECLARE_WRITE8_MEMBER(errcmd_w);
- DECLARE_READ8_MEMBER (errsts_r);
- DECLARE_WRITE8_MEMBER(errsts_w);
- DECLARE_READ8_MEMBER (errsyn_r);
+ uint8_t pcon_r();
+ void pcon_w(uint8_t data);
+ uint8_t cc_r();
+ void cc_w(uint8_t data);
+ uint8_t dramec_r();
+ void dramec_w(uint8_t data);
+ uint8_t dramc_r();
+ void dramc_w(uint8_t data);
+ uint8_t dramt_r();
+ void dramt_w(uint8_t data);
+ uint8_t pam_r(offs_t offset);
+ void pam_w(offs_t offset, uint8_t data);
+ uint8_t drb_r(offs_t offset);
+ void drb_w(offs_t offset, uint8_t data);
+ uint8_t drt_r();
+ void drt_w(uint8_t data);
+ uint8_t drat_r();
+ void drat_w(uint8_t data);
+ uint8_t smram_r();
+ void smram_w(uint8_t data);
+ uint8_t errcmd_r();
+ void errcmd_w(uint8_t data);
+ uint8_t errsts_r();
+ void errsts_w(uint8_t data);
+ uint8_t errsyn_r();
};
DECLARE_DEVICE_TYPE(I82439TX, i82439tx_host_device)
diff --git a/src/devices/machine/i8257.cpp b/src/devices/machine/i8257.cpp
index 1b32ad40c6a..663c5851abf 100644
--- a/src/devices/machine/i8257.cpp
+++ b/src/devices/machine/i8257.cpp
@@ -471,7 +471,7 @@ void i8257_device::execute_run()
// read -
//-------------------------------------------------
-READ8_MEMBER( i8257_device::read )
+uint8_t i8257_device::read(offs_t offset)
{
LOG("%s\n", FUNCNAME);
uint8_t data = 0;
@@ -529,7 +529,7 @@ READ8_MEMBER( i8257_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( i8257_device::write )
+void i8257_device::write(offs_t offset, uint8_t data)
{
LOG("%s \n", FUNCNAME);
if (!BIT(offset, 3))
@@ -600,7 +600,7 @@ WRITE8_MEMBER( i8257_device::write )
// hlda_w - hold acknowledge
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8257_device::hlda_w )
+void i8257_device::hlda_w(int state)
{
LOG("I8257 Hold Acknowledge: %u\n", state);
@@ -613,7 +613,7 @@ WRITE_LINE_MEMBER( i8257_device::hlda_w )
// ready_w - ready
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8257_device::ready_w )
+void i8257_device::ready_w(int state)
{
LOG("I8257 Ready: %u\n", state);
@@ -625,7 +625,7 @@ WRITE_LINE_MEMBER( i8257_device::ready_w )
// dreq0_w - DMA request for channel 0
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8257_device::dreq0_w )
+void i8257_device::dreq0_w(int state)
{
LOG("%s\n", FUNCNAME);
dma_request(0, state);
@@ -636,7 +636,7 @@ WRITE_LINE_MEMBER( i8257_device::dreq0_w )
// dreq0_w - DMA request for channel 1
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8257_device::dreq1_w )
+void i8257_device::dreq1_w(int state)
{
LOG("%s\n", FUNCNAME);
dma_request(1, state);
@@ -647,7 +647,7 @@ WRITE_LINE_MEMBER( i8257_device::dreq1_w )
// dreq1_w - DMA request for channel 2
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8257_device::dreq2_w )
+void i8257_device::dreq2_w(int state)
{
LOG("%s\n", FUNCNAME);
dma_request(2, state);
@@ -658,7 +658,7 @@ WRITE_LINE_MEMBER( i8257_device::dreq2_w )
// dreq3_w - DMA request for channel 3
//-------------------------------------------------
-WRITE_LINE_MEMBER( i8257_device::dreq3_w )
+void i8257_device::dreq3_w(int state)
{
LOG("%s\n", FUNCNAME);
dma_request(3, state);
diff --git a/src/devices/machine/i8257.h b/src/devices/machine/i8257.h
index 964f1058f44..df1f74a4858 100644
--- a/src/devices/machine/i8257.h
+++ b/src/devices/machine/i8257.h
@@ -40,16 +40,16 @@ public:
// construction/destruction
i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER( hlda_w );
- DECLARE_WRITE_LINE_MEMBER( ready_w );
+ void hlda_w(int state);
+ void ready_w(int state);
- DECLARE_WRITE_LINE_MEMBER( dreq0_w );
- DECLARE_WRITE_LINE_MEMBER( dreq1_w );
- DECLARE_WRITE_LINE_MEMBER( dreq2_w );
- DECLARE_WRITE_LINE_MEMBER( dreq3_w );
+ void dreq0_w(int state);
+ void dreq1_w(int state);
+ void dreq2_w(int state);
+ void dreq3_w(int state);
auto out_hrq_cb() { return m_out_hrq_cb.bind(); }
auto out_tc_cb() { return m_out_tc_cb.bind(); }
diff --git a/src/devices/machine/i8291a.cpp b/src/devices/machine/i8291a.cpp
index f676617e581..7c9c0296a05 100644
--- a/src/devices/machine/i8291a.cpp
+++ b/src/devices/machine/i8291a.cpp
@@ -155,7 +155,7 @@ void i8291a_device::device_start()
save_item(NAME(m_dt_state));
}
-READ8_MEMBER(i8291a_device::din_r)
+uint8_t i8291a_device::din_r()
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, m_din);
if (!machine().side_effects_disabled()) {
@@ -201,7 +201,7 @@ void i8291a_device::update_int()
}
}
-READ8_MEMBER(i8291a_device::ints1_r)
+uint8_t i8291a_device::ints1_r()
{
uint8_t ret = m_ints1;
@@ -213,7 +213,7 @@ READ8_MEMBER(i8291a_device::ints1_r)
return ret;
}
-READ8_MEMBER(i8291a_device::ints2_r)
+uint8_t i8291a_device::ints2_r()
{
uint8_t ret = m_ints2;
@@ -225,13 +225,13 @@ READ8_MEMBER(i8291a_device::ints2_r)
return ret;
}
-READ8_MEMBER(i8291a_device::spoll_stat_r)
+uint8_t i8291a_device::spoll_stat_r()
{
LOGMASKED(LOG_REG, "%s\n", __FUNCTION__);
return 0;
}
-READ8_MEMBER(i8291a_device::addr_stat_r)
+uint8_t i8291a_device::addr_stat_r()
{
if (!(m_address_status & 0xfe))
m_address_status = 0;
@@ -240,25 +240,25 @@ READ8_MEMBER(i8291a_device::addr_stat_r)
return m_address_status;
}
-READ8_MEMBER(i8291a_device::cpt_r)
+uint8_t i8291a_device::cpt_r()
{
LOGMASKED(LOG_REG, "%s\n", __FUNCTION__);
return m_cpt;
}
-READ8_MEMBER(i8291a_device::addr0_r)
+uint8_t i8291a_device::addr0_r()
{
//LOGMASKED(LOG_REG, "%s = %02X\n", __FUNCTION__, m_address0);
return m_address0;
}
-READ8_MEMBER(i8291a_device::addr1_r)
+uint8_t i8291a_device::addr1_r()
{
LOGMASKED(LOG_REG, "%s = %02X\n", __FUNCTION__, m_address1);
return m_address1;
}
-WRITE8_MEMBER(i8291a_device::dout_w)
+void i8291a_device::dout_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
if (m_nba)
@@ -268,35 +268,35 @@ WRITE8_MEMBER(i8291a_device::dout_w)
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::ie1_w)
+void i8291a_device::ie1_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
m_ie1 = data;
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::ie2_w)
+void i8291a_device::ie2_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
m_ie2 = data;
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::spoll_mode_w)
+void i8291a_device::spoll_mode_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
m_spoll_mode = data;
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::addr_mode_w)
+void i8291a_device::addr_mode_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
m_address_mode = data & 3;
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::aux_mode_w)
+void i8291a_device::aux_mode_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
switch (data >> 5) {
@@ -401,7 +401,7 @@ WRITE8_MEMBER(i8291a_device::aux_mode_w)
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::addr01_w)
+void i8291a_device::addr01_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
if (data & REG_ADDRESS01_ARS)
@@ -411,56 +411,56 @@ WRITE8_MEMBER(i8291a_device::addr01_w)
run_fsm();
}
-WRITE8_MEMBER(i8291a_device::eos_w)
+void i8291a_device::eos_w(uint8_t data)
{
LOGMASKED(LOG_REG, "%s: %02X\n", __FUNCTION__, data);
m_eos = data;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::nrfd_w)
+void i8291a_device::nrfd_w(int state)
{
m_nrfd = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::ndac_w)
+void i8291a_device::ndac_w(int state)
{
m_ndac = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::dav_w)
+void i8291a_device::dav_w(int state)
{
m_dav = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::eoi_w)
+void i8291a_device::eoi_w(int state)
{
m_eoi = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::srq_w)
+void i8291a_device::srq_w(int state)
{
m_srq = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::ifc_w)
+void i8291a_device::ifc_w(int state)
{
m_ifc = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::atn_w)
+void i8291a_device::atn_w(int state)
{
m_atn = !state;
run_fsm();
}
-WRITE_LINE_MEMBER(i8291a_device::ren_w)
+void i8291a_device::ren_w(int state)
{
m_ren = !state;
run_fsm();
diff --git a/src/devices/machine/i8291a.h b/src/devices/machine/i8291a.h
index 566ae4779b7..2d048d806aa 100644
--- a/src/devices/machine/i8291a.h
+++ b/src/devices/machine/i8291a.h
@@ -31,39 +31,39 @@ public:
auto dio_read() { return m_dio_read_func.bind(); }
// Signal inputs
- DECLARE_WRITE_LINE_MEMBER(reset_w);
- DECLARE_WRITE_LINE_MEMBER(dack_w);
+ void reset_w(int state);
+ void dack_w(int state);
// GPIB port
- DECLARE_WRITE_LINE_MEMBER(eoi_w);
- DECLARE_WRITE_LINE_MEMBER(dav_w);
- DECLARE_WRITE_LINE_MEMBER(nrfd_w);
- DECLARE_WRITE_LINE_MEMBER(ndac_w);
- DECLARE_WRITE_LINE_MEMBER(ifc_w);
- DECLARE_WRITE_LINE_MEMBER(srq_w);
- DECLARE_WRITE_LINE_MEMBER(atn_w);
- DECLARE_WRITE_LINE_MEMBER(ren_w);
- DECLARE_WRITE8_MEMBER(dio_w);
+ void eoi_w(int state);
+ void dav_w(int state);
+ void nrfd_w(int state);
+ void ndac_w(int state);
+ void ifc_w(int state);
+ void srq_w(int state);
+ void atn_w(int state);
+ void ren_w(int state);
+ void dio_w(uint8_t data); // declared but not defined?
// register r/w functions
- DECLARE_WRITE8_MEMBER(dout_w);
- DECLARE_WRITE8_MEMBER(ie1_w);
- DECLARE_WRITE8_MEMBER(ie2_w);
- DECLARE_WRITE8_MEMBER(spoll_mode_w);
- DECLARE_WRITE8_MEMBER(addr_mode_w);
- DECLARE_WRITE8_MEMBER(aux_mode_w);
- DECLARE_WRITE8_MEMBER(addr01_w);
- DECLARE_WRITE8_MEMBER(eos_w);
-
- DECLARE_READ8_MEMBER(din_r);
- DECLARE_READ8_MEMBER(ints1_r);
- DECLARE_READ8_MEMBER(ints2_r);
- DECLARE_READ8_MEMBER(spoll_stat_r);
- DECLARE_READ8_MEMBER(addr_stat_r);
- DECLARE_READ8_MEMBER(cpt_r);
- DECLARE_READ8_MEMBER(addr0_r);
- DECLARE_READ8_MEMBER(addr1_r);
+ void dout_w(uint8_t data);
+ void ie1_w(uint8_t data);
+ void ie2_w(uint8_t data);
+ void spoll_mode_w(uint8_t data);
+ void addr_mode_w(uint8_t data);
+ void aux_mode_w(uint8_t data);
+ void addr01_w(uint8_t data);
+ void eos_w(uint8_t data);
+
+ uint8_t din_r();
+ uint8_t ints1_r();
+ uint8_t ints2_r();
+ uint8_t spoll_stat_r();
+ uint8_t addr_stat_r();
+ uint8_t cpt_r();
+ uint8_t addr0_r();
+ uint8_t addr1_r();
void map(address_map &map);
private:
diff --git a/src/devices/machine/icm7170.cpp b/src/devices/machine/icm7170.cpp
new file mode 100644
index 00000000000..77a507ba8a1
--- /dev/null
+++ b/src/devices/machine/icm7170.cpp
@@ -0,0 +1,201 @@
+// license:BSD-3-Clause
+// copyright-holders:R. Belmont
+/**********************************************************************
+
+ Intersil/Renesas ICM7170 Real Time Clock
+
+*********************************************************************/
+
+#include "emu.h"
+#include "icm7170.h"
+#include "coreutil.h"
+
+#define VERBOSE (1)
+#include "logmacro.h"
+
+DEFINE_DEVICE_TYPE(ICM7170, icm7170_device, "icm7170", "Intersil/Renesas ICM7170 Real Time Clock")
+
+// internal registers
+enum
+{
+ REG_CNT_100TH_SEC = 0,
+ REG_CNT_HOURS,
+ REG_CNT_MINUTES,
+ REG_CNT_SECONDS,
+ REG_CNT_MONTH,
+ REG_CNT_DAY,
+ REG_CNT_YEAR,
+ REG_CNT_DAY_OF_WEEK,
+ REG_RAM_100TH_SEC,
+ REG_RAM_HOURS,
+ REG_RAM_MINUTES,
+ REG_RAM_SECONDS,
+ REG_RAM_MONTH,
+ REG_RAM_DAY,
+ REG_RAM_YEAR,
+ REG_RAM_DAY_OF_WEEK,
+ REG_INT_STATUS_AND_MASK,
+ REG_COMMAND
+};
+
+enum
+{
+ CMD_REG_TEST_MODE = 0x20,
+ CMD_REG_IRQ_ENABLE = 0x10,
+ CMD_REG_RUN = 0x08,
+ CMD_REG_24_HOUR = 0x04,
+ CMD_REG_FREQ_MASK = 0x03
+};
+
+enum
+{
+ IRQ_BIT_GLOBAL = 0x80,
+ IRQ_BIT_DAY = 0x40,
+ IRQ_BIT_HOUR = 0x20,
+ IRQ_BIT_MINUTE = 0x10,
+ IRQ_BIT_SECOND = 0x08,
+ IRQ_BIT_10TH_SECOND = 0x04,
+ IRQ_BIT_100TH_SECOND = 0x02,
+ IRQ_BIT_ALARM = 0x01
+};
+
+static constexpr int ICM7170_TIMER_ID = 0;
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// icm7170_device - constructor
+//-------------------------------------------------
+
+icm7170_device::icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, ICM7170, tag, owner, clock),
+ device_rtc_interface(mconfig, *this),
+ device_nvram_interface(mconfig, *this),
+ m_out_irq_cb(*this)
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void icm7170_device::device_start()
+{
+ // resolve callbacks
+ m_out_irq_cb.resolve_safe();
+
+ m_timer = timer_alloc(ICM7170_TIMER_ID);
+ m_timer->adjust(attotime::never);
+
+ save_item(NAME(m_regs));
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset handling
+//-------------------------------------------------
+
+void icm7170_device::device_reset()
+{
+ m_regs[REG_COMMAND] &= ~CMD_REG_RUN;
+ m_irq_status = 0;
+ recalc_irqs();
+}
+
+//-------------------------------------------------
+// device_timer - handles timer events
+//-------------------------------------------------
+
+void icm7170_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+}
+
+
+//-------------------------------------------------
+// rtc_clock_updated - called when the host time changes
+//-------------------------------------------------
+
+void icm7170_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second)
+{
+ if (m_regs[REG_COMMAND] & CMD_REG_RUN)
+ {
+ m_regs[REG_CNT_YEAR] = year % 99;
+ m_regs[REG_CNT_MONTH] = month;
+ m_regs[REG_CNT_DAY] = day;
+ m_regs[REG_CNT_DAY_OF_WEEK] = day_of_week;
+ m_regs[REG_CNT_HOURS] = hour;
+ m_regs[REG_CNT_MINUTES] = minute;
+ m_regs[REG_CNT_SECONDS] = second;
+ }
+}
+
+
+//-------------------------------------------------
+// nvram_default - called to initialize NVRAM to
+// its default state
+//-------------------------------------------------
+
+void icm7170_device::nvram_default()
+{
+ memset(m_regs, 0, 0x20);
+}
+
+
+//-------------------------------------------------
+// nvram_read - called to read NVRAM from the
+// .nv file
+//-------------------------------------------------
+
+void icm7170_device::nvram_read(emu_file &file)
+{
+ file.read(m_regs, 0x20);
+}
+
+
+//-------------------------------------------------
+// nvram_write - called to write NVRAM to the
+// .nv file
+//-------------------------------------------------
+
+void icm7170_device::nvram_write(emu_file &file)
+{
+ file.write(m_regs, 0x20);
+}
+
+// non-inherited device functions
+uint8_t icm7170_device::read(offs_t offset)
+{
+ uint8_t data = m_regs[offset & 0x1f];
+
+ if ((offset & 0x1f) == REG_INT_STATUS_AND_MASK)
+ {
+ data = m_irq_status;
+ }
+
+ LOG("ICM7170 Register %d Read %02x\n", offset, data);
+
+ return data;
+}
+
+void icm7170_device::write(offs_t offset, uint8_t data)
+{
+ switch (offset & 0x1f)
+ {
+ case REG_INT_STATUS_AND_MASK:
+ m_irq_mask = data;
+ LOG("ICM7170 IRQ Mask Write %02x\n", data);
+ recalc_irqs();
+ break;
+
+ default:
+ m_regs[offset & 0x1f] = data;
+ LOG("ICM7170 Register %d Write %02x\n", offset & 0x1f, data);
+ break;
+ }
+}
+
+void icm7170_device::recalc_irqs()
+{
+}
+
diff --git a/src/devices/machine/icm7170.h b/src/devices/machine/icm7170.h
new file mode 100644
index 00000000000..0d5a7fb262c
--- /dev/null
+++ b/src/devices/machine/icm7170.h
@@ -0,0 +1,87 @@
+// license:BSD-3-Clause
+// copyright-holders:R. Belmont
+/**********************************************************************
+
+ Intersil/Renesas ICM7170 Real Time Clock
+
+**********************************************************************
+ PDIP package:
+ _____ _____
+ _WR 1 | \_/ | 24 _RD
+ ALE 2 | | 23 VDD
+ _CS 3 | | 22 D7
+ A4 4 | ICM7170 | 21 D6
+ A3 5 | | 20 D5
+ A2 6 | | 19 D4
+ A1 7 | | 18 D3
+ A0 8 | | 17 D2
+ OSC OUT 9 | | 16 D1
+ OSC IN 10 | | 15 D0
+ INT SOURCE 11 | | 14 VBACKUP
+ /INTERRUPT 12 |_____________| 13 VSS (GND)
+
+SOIC package:
+ _____ _____
+ A1 1 | \_/ | 24 A2
+ A0 2 | | 23 A3
+ OSC OUT 3 | | 22 A4
+ OSC IN 4 | ICM7170 | 21 _CS
+ INT SOURCE 5 | | 20 ALE
+ /INTERRUPT 6 | | 19 _WR
+ VSS 7 | | 18 _RD
+ VBACKUP 8 | | 17 VDD
+ D0 9 | | 16 D7
+ D1 10 | | 15 D6
+ D2 11 | | 14 D5
+ D3 12 |_____________| 13 D4
+
+**********************************************************************/
+
+#ifndef MAME_MACHINE_ICM7170_H
+#define MAME_MACHINE_ICM7170_H
+
+#pragma once
+
+#include "dirtc.h"
+
+class icm7170_device : public device_t,
+ public device_rtc_interface,
+ public device_nvram_interface
+{
+public:
+ // construction/destruction
+ icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ auto irq() { return m_out_irq_cb.bind(); }
+
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ // device_rtc_interface overrides
+ virtual void rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second) override;
+
+ // device_nvram_interface overrides
+ virtual void nvram_default() override;
+ virtual void nvram_read(emu_file &file) override;
+ virtual void nvram_write(emu_file &file) override;
+
+private:
+ void recalc_irqs();
+
+ devcb_write_line m_out_irq_cb;
+
+ uint8_t m_regs[0x20];
+ uint8_t m_irq_mask, m_irq_status;
+
+ emu_timer *m_timer;
+};
+
+DECLARE_DEVICE_TYPE(ICM7170, icm7170_device)
+
+#endif // MAME_MACHINE_ICM7170_H
diff --git a/src/devices/machine/im6402.cpp b/src/devices/machine/im6402.cpp
index a464560870c..6a52867bdbd 100644
--- a/src/devices/machine/im6402.cpp
+++ b/src/devices/machine/im6402.cpp
@@ -212,7 +212,7 @@ void im6402_device::rcv_complete()
// write - transmitter buffer register write
//-------------------------------------------------
-WRITE8_MEMBER( im6402_device::write )
+void im6402_device::write(uint8_t data)
{
LOG("IM6402 Transmit Buffer Register %02x\n", data);
@@ -238,7 +238,7 @@ WRITE8_MEMBER( im6402_device::write )
// rrc_w - receiver register clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::rrc_w )
+void im6402_device::rrc_w(int state)
{
if (state)
{
@@ -252,7 +252,7 @@ WRITE_LINE_MEMBER( im6402_device::rrc_w )
// trc_w - transmitter register clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::trc_w )
+void im6402_device::trc_w(int state)
{
if (state)
{
@@ -266,7 +266,7 @@ WRITE_LINE_MEMBER( im6402_device::trc_w )
// rrd_w - receiver register disable
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::rrd_w )
+void im6402_device::rrd_w(int state)
{
}
@@ -275,7 +275,7 @@ WRITE_LINE_MEMBER( im6402_device::rrd_w )
// sfd_w - status flags disable
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::sfd_w )
+void im6402_device::sfd_w(int state)
{
}
@@ -284,7 +284,7 @@ WRITE_LINE_MEMBER( im6402_device::sfd_w )
// drr_w - data received reset
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::drr_w )
+void im6402_device::drr_w(int state)
{
if (state)
{
@@ -297,7 +297,7 @@ WRITE_LINE_MEMBER( im6402_device::drr_w )
// mr_w - master reset
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::mr_w )
+void im6402_device::mr_w(int state)
{
if (state)
{
@@ -310,7 +310,7 @@ WRITE_LINE_MEMBER( im6402_device::mr_w )
// crl_w - control register load
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::crl_w )
+void im6402_device::crl_w(int state)
{
if (state)
{
@@ -336,7 +336,7 @@ WRITE_LINE_MEMBER( im6402_device::crl_w )
// pi_w - parity inhibit
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::pi_w )
+void im6402_device::pi_w(int state)
{
LOG("IM6402 Parity Inhibit %u\n", state);
@@ -348,7 +348,7 @@ WRITE_LINE_MEMBER( im6402_device::pi_w )
// sbs_w - stop bit select
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::sbs_w )
+void im6402_device::sbs_w(int state)
{
LOG("IM6402 Stop Bit Select %u\n", state);
@@ -360,7 +360,7 @@ WRITE_LINE_MEMBER( im6402_device::sbs_w )
// cls1_w - character length select 1
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::cls1_w )
+void im6402_device::cls1_w(int state)
{
LOG("IM6402 Character Length Select 1 %u\n", state);
@@ -372,7 +372,7 @@ WRITE_LINE_MEMBER( im6402_device::cls1_w )
// cls2_w - character length select 2
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::cls2_w )
+void im6402_device::cls2_w(int state)
{
LOG("IM6402 Character Length Select 2 %u\n", state);
@@ -384,14 +384,14 @@ WRITE_LINE_MEMBER( im6402_device::cls2_w )
// epe_w - even parity enable
//-------------------------------------------------
-WRITE_LINE_MEMBER( im6402_device::epe_w )
+void im6402_device::epe_w(int state)
{
LOG("IM6402 Even Parity Enable %u\n", state);
m_epe = state;
}
-WRITE_LINE_MEMBER(im6402_device::write_rri)
+void im6402_device::write_rri(int state)
{
// HACK derive clock from data line as wangpckb sends bytes instantly to make up for mcs51 serial implementation
receive_register_update_bit(state);
diff --git a/src/devices/machine/im6402.h b/src/devices/machine/im6402.h
index 6729b4da984..d36853353c2 100644
--- a/src/devices/machine/im6402.h
+++ b/src/devices/machine/im6402.h
@@ -64,29 +64,29 @@ public:
auto tbre_callback() { return m_write_tbre.bind(); }
auto tre_callback() { return m_write_tre.bind(); }
- DECLARE_READ8_MEMBER( read ) { return m_rbr; }
- DECLARE_WRITE8_MEMBER( write );
-
- DECLARE_READ_LINE_MEMBER( dr_r ) { return m_dr; }
- DECLARE_READ_LINE_MEMBER( tbre_r ) { return m_tbre; }
- DECLARE_READ_LINE_MEMBER( tre_r ) { return m_tre; }
- DECLARE_READ_LINE_MEMBER( pe_r ) { return m_pe; }
- DECLARE_READ_LINE_MEMBER( fe_r ) { return m_fe; }
- DECLARE_READ_LINE_MEMBER( oe_r ) { return m_oe; }
-
- DECLARE_WRITE_LINE_MEMBER( write_rri ); // receiver register input
- DECLARE_WRITE_LINE_MEMBER( rrc_w );
- DECLARE_WRITE_LINE_MEMBER( trc_w );
- DECLARE_WRITE_LINE_MEMBER( rrd_w );
- DECLARE_WRITE_LINE_MEMBER( sfd_w );
- DECLARE_WRITE_LINE_MEMBER( drr_w );
- DECLARE_WRITE_LINE_MEMBER( mr_w );
- DECLARE_WRITE_LINE_MEMBER( crl_w );
- DECLARE_WRITE_LINE_MEMBER( pi_w );
- DECLARE_WRITE_LINE_MEMBER( sbs_w );
- DECLARE_WRITE_LINE_MEMBER( cls1_w );
- DECLARE_WRITE_LINE_MEMBER( cls2_w );
- DECLARE_WRITE_LINE_MEMBER( epe_w );
+ uint8_t read() { return m_rbr; }
+ void write(uint8_t data);
+
+ int dr_r() { return m_dr; }
+ int tbre_r() { return m_tbre; }
+ int tre_r() { return m_tre; }
+ int pe_r() { return m_pe; }
+ int fe_r() { return m_fe; }
+ int oe_r() { return m_oe; }
+
+ void write_rri(int state); // receiver register input
+ void rrc_w(int state);
+ void trc_w(int state);
+ void rrd_w(int state);
+ void sfd_w(int state);
+ void drr_w(int state);
+ void mr_w(int state);
+ void crl_w(int state);
+ void pi_w(int state);
+ void sbs_w(int state);
+ void cls1_w(int state);
+ void cls2_w(int state);
+ void epe_w(int state);
protected:
// device-level overrides
diff --git a/src/devices/machine/iopcdvd.cpp b/src/devices/machine/iopcdvd.cpp
index a1e32e48a1c..a2938c4be35 100644
--- a/src/devices/machine/iopcdvd.cpp
+++ b/src/devices/machine/iopcdvd.cpp
@@ -55,7 +55,7 @@ void iop_cdvd_device::device_reset()
m_channel[1].m_status |= CDVD_STATUS_IDLE;
}
-READ8_MEMBER(iop_cdvd_device::read)
+uint8_t iop_cdvd_device::read(offs_t offset)
{
uint8_t ret = 0;
switch (offset)
@@ -117,7 +117,7 @@ uint8_t iop_cdvd_device::data_fifo_pop()
return ret;
}
-WRITE8_MEMBER(iop_cdvd_device::write)
+void iop_cdvd_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
diff --git a/src/devices/machine/iopcdvd.h b/src/devices/machine/iopcdvd.h
index e5d95f0322f..194933eb3d9 100644
--- a/src/devices/machine/iopcdvd.h
+++ b/src/devices/machine/iopcdvd.h
@@ -29,8 +29,8 @@ public:
iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~iop_cdvd_device() override;
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
protected:
virtual void device_start() override;
diff --git a/src/devices/machine/k053252.cpp b/src/devices/machine/k053252.cpp
index 050a7faea90..6972d0f5c96 100644
--- a/src/devices/machine/k053252.cpp
+++ b/src/devices/machine/k053252.cpp
@@ -135,7 +135,7 @@ void k053252_device::reset_internal_state()
DEVICE HANDLERS
*****************************************************************************/
-READ8_MEMBER( k053252_device::read )
+uint8_t k053252_device::read(offs_t offset)
{
//TODO: debugger_access()
switch(offset)
@@ -188,7 +188,7 @@ void k053252_device::res_change()
}
}
-WRITE8_MEMBER( k053252_device::write )
+void k053252_device::write(offs_t offset, uint8_t data)
{
m_regs[offset] = data;
diff --git a/src/devices/machine/k053252.h b/src/devices/machine/k053252.h
index b7e41ca06f4..fec683df1da 100644
--- a/src/devices/machine/k053252.h
+++ b/src/devices/machine/k053252.h
@@ -21,8 +21,8 @@ public:
auto int_time() { return m_int_time_cb.bind(); }
void set_offsets(int offsx, int offsy) { m_offsx = offsx; m_offsy = offsy; }
- DECLARE_READ8_MEMBER( read ); // CCU registers
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset); // CCU registers
+ void write(offs_t offset, uint8_t data);
void res_change();
diff --git a/src/devices/machine/k054321.cpp b/src/devices/machine/k054321.cpp
index 2c56cd7827d..e5621f4f789 100644
--- a/src/devices/machine/k054321.cpp
+++ b/src/devices/machine/k054321.cpp
@@ -91,13 +91,13 @@ void k054321_device::device_add_mconfig(machine_config &config)
GENERIC_LATCH_8(config, m_soundlatch[i]);
}
-WRITE8_MEMBER(k054321_device::volume_reset_w)
+void k054321_device::volume_reset_w(u8 data)
{
m_volume = 0;
propagate_volume();
}
-WRITE8_MEMBER(k054321_device::volume_up_w)
+void k054321_device::volume_up_w(u8 data)
{
// assume that max volume is 64
if (data && m_volume < 64)
@@ -107,18 +107,18 @@ WRITE8_MEMBER(k054321_device::volume_up_w)
}
}
-READ8_MEMBER(k054321_device::busy_r)
+u8 k054321_device::busy_r()
{
return 0; // bit0 = 1 means busy
}
-WRITE8_MEMBER(k054321_device::active_w)
+void k054321_device::active_w(u8 data)
{
m_active = data;
propagate_volume();
}
-WRITE8_MEMBER(k054321_device::dummy_w)
+void k054321_device::dummy_w(u8 data)
{
if(data != 0x4a)
logerror("unexpected dummy_w %02x\n", data);
diff --git a/src/devices/machine/k054321.h b/src/devices/machine/k054321.h
index 92d0874dc54..f5d9b65ea25 100644
--- a/src/devices/machine/k054321.h
+++ b/src/devices/machine/k054321.h
@@ -41,12 +41,12 @@ private:
void propagate_volume();
- DECLARE_WRITE8_MEMBER(volume_reset_w);
- DECLARE_WRITE8_MEMBER(volume_up_w);
- DECLARE_WRITE8_MEMBER(active_w);
+ void volume_reset_w(u8 data);
+ void volume_up_w(u8 data);
+ void active_w(u8 data);
- DECLARE_READ8_MEMBER(busy_r);
- DECLARE_WRITE8_MEMBER(dummy_w);
+ u8 busy_r();
+ void dummy_w(u8 data);
};
DECLARE_DEVICE_TYPE(K054321, k054321_device)
diff --git a/src/devices/machine/kr2376.cpp b/src/devices/machine/kr2376.cpp
index f3551a50043..7d59c4ea317 100644
--- a/src/devices/machine/kr2376.cpp
+++ b/src/devices/machine/kr2376.cpp
@@ -277,7 +277,7 @@ void kr2376_device::device_timer(emu_timer &timer, device_timer_id id, int param
/* Keyboard Data */
-READ8_MEMBER( kr2376_device::data_r )
+uint8_t kr2376_device::data_r()
{
if (m_pins[KR2376_DSII])
return m_data ^ 0xff;
diff --git a/src/devices/machine/kr2376.h b/src/devices/machine/kr2376.h
index b685887c3e4..ab5a4c3f82c 100644
--- a/src/devices/machine/kr2376.h
+++ b/src/devices/machine/kr2376.h
@@ -60,7 +60,7 @@ public:
auto strobe() { return m_write_strobe.bind(); }
/* keyboard data */
- DECLARE_READ8_MEMBER( data_r );
+ uint8_t data_r();
/* Set an input pin */
void set_input_pin( input_pin_t pin, int data );
diff --git a/src/devices/machine/latch8.cpp b/src/devices/machine/latch8.cpp
index 4ca9782405a..4db3d302195 100644
--- a/src/devices/machine/latch8.cpp
+++ b/src/devices/machine/latch8.cpp
@@ -36,7 +36,7 @@ TIMER_CALLBACK_MEMBER( latch8_device::timerproc )
/* ----------------------------------------------------------------------- */
-READ8_MEMBER( latch8_device::read )
+uint8_t latch8_device::read(offs_t offset)
{
uint8_t res;
@@ -55,7 +55,7 @@ READ8_MEMBER( latch8_device::read )
}
-WRITE8_MEMBER( latch8_device::write )
+void latch8_device::write(offs_t offset, uint8_t data)
{
assert(offset == 0);
@@ -66,7 +66,7 @@ WRITE8_MEMBER( latch8_device::write )
}
-WRITE8_MEMBER( latch8_device::reset_w )
+void latch8_device::reset_w(offs_t offset, uint8_t data)
{
assert(offset == 0);
@@ -90,14 +90,14 @@ void latch8_device::bitx_w(int bit, offs_t offset, uint8_t data)
machine().scheduler().synchronize(timer_expired_delegate(FUNC(latch8_device::timerproc),this), (mask << 8) | masked_data);
}
-WRITE8_MEMBER( latch8_device::bit0_w ) { bitx_w(0, offset, data); }
-WRITE8_MEMBER( latch8_device::bit1_w ) { bitx_w(1, offset, data); }
-WRITE8_MEMBER( latch8_device::bit2_w ) { bitx_w(2, offset, data); }
-WRITE8_MEMBER( latch8_device::bit3_w ) { bitx_w(3, offset, data); }
-WRITE8_MEMBER( latch8_device::bit4_w ) { bitx_w(4, offset, data); }
-WRITE8_MEMBER( latch8_device::bit5_w ) { bitx_w(5, offset, data); }
-WRITE8_MEMBER( latch8_device::bit6_w ) { bitx_w(6, offset, data); }
-WRITE8_MEMBER( latch8_device::bit7_w ) { bitx_w(7, offset, data); }
+void latch8_device::bit0_w(offs_t offset, uint8_t data) { bitx_w(0, offset, data); }
+void latch8_device::bit1_w(offs_t offset, uint8_t data) { bitx_w(1, offset, data); }
+void latch8_device::bit2_w(offs_t offset, uint8_t data) { bitx_w(2, offset, data); }
+void latch8_device::bit3_w(offs_t offset, uint8_t data) { bitx_w(3, offset, data); }
+void latch8_device::bit4_w(offs_t offset, uint8_t data) { bitx_w(4, offset, data); }
+void latch8_device::bit5_w(offs_t offset, uint8_t data) { bitx_w(5, offset, data); }
+void latch8_device::bit6_w(offs_t offset, uint8_t data) { bitx_w(6, offset, data); }
+void latch8_device::bit7_w(offs_t offset, uint8_t data) { bitx_w(7, offset, data); }
DEFINE_DEVICE_TYPE(LATCH8, latch8_device, "latch8", "8-bit latch")
diff --git a/src/devices/machine/latch8.h b/src/devices/machine/latch8.h
index d940c84cfa7..750a9c752b5 100644
--- a/src/devices/machine/latch8.h
+++ b/src/devices/machine/latch8.h
@@ -25,12 +25,12 @@ public:
/* write & read full byte */
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
/* reset the latch */
- DECLARE_WRITE8_MEMBER( reset_w );
+ void reset_w(offs_t offset, uint8_t data);
/* read bit x */
/* return (latch >> x) & 0x01 */
@@ -59,14 +59,14 @@ public:
/* write bit x from data into bit determined by offset */
/* latch = (latch & ~(1<<offset)) | (((data >> x) & 0x01) << offset) */
- DECLARE_WRITE8_MEMBER( bit0_w );
- DECLARE_WRITE8_MEMBER( bit1_w );
- DECLARE_WRITE8_MEMBER( bit2_w );
- DECLARE_WRITE8_MEMBER( bit3_w );
- DECLARE_WRITE8_MEMBER( bit4_w );
- DECLARE_WRITE8_MEMBER( bit5_w );
- DECLARE_WRITE8_MEMBER( bit6_w );
- DECLARE_WRITE8_MEMBER( bit7_w );
+ void bit0_w(offs_t offset, uint8_t data);
+ void bit1_w(offs_t offset, uint8_t data);
+ void bit2_w(offs_t offset, uint8_t data);
+ void bit3_w(offs_t offset, uint8_t data);
+ void bit4_w(offs_t offset, uint8_t data);
+ void bit5_w(offs_t offset, uint8_t data);
+ void bit6_w(offs_t offset, uint8_t data);
+ void bit7_w(offs_t offset, uint8_t data);
/* Bit mask specifying bits to be masked *out* */
void set_maskout(uint32_t maskout) { m_maskout = maskout; }
diff --git a/src/devices/machine/ldp1000.cpp b/src/devices/machine/ldp1000.cpp
index ace30f6fc9a..42f8cb796fe 100644
--- a/src/devices/machine/ldp1000.cpp
+++ b/src/devices/machine/ldp1000.cpp
@@ -116,7 +116,7 @@ int32_t sony_ldp1000_device::player_update(const vbi_metadata &vbi, int fieldnum
// READ/WRITE HANDLERS
//**************************************************************************
-READ8_MEMBER( sony_ldp1000_device::status_r )
+uint8_t sony_ldp1000_device::status_r()
{
uint8_t res = m_status;
m_status = stat_undef;
@@ -169,7 +169,7 @@ void sony_ldp1000_device::exec_enter_cmd()
// TODO: de-instantize this
-WRITE8_MEMBER( sony_ldp1000_device::command_w )
+void sony_ldp1000_device::command_w(uint8_t data)
{
printf("CMD %02x\n",data);
// 0x30 to 0x69 range causes an ACK, anything else is invalid
diff --git a/src/devices/machine/ldp1000.h b/src/devices/machine/ldp1000.h
index b3f420afb6e..2fd79a6a6fc 100644
--- a/src/devices/machine/ldp1000.h
+++ b/src/devices/machine/ldp1000.h
@@ -30,8 +30,8 @@ public:
sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations TODO: both actually protected
- DECLARE_WRITE8_MEMBER( command_w );
- DECLARE_READ8_MEMBER( status_r );
+ void command_w(uint8_t data);
+ uint8_t status_r();
protected:
// device-level overrides
diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp
index 283ffdc0916..fc94159ff6a 100644
--- a/src/devices/machine/ldpr8210.cpp
+++ b/src/devices/machine/ldpr8210.cpp
@@ -484,7 +484,7 @@ void pioneer_pr8210_device::player_overlay(bitmap_yuy16 &bitmap)
// Pioneer PIA
//-------------------------------------------------
-READ8_MEMBER( pioneer_pr8210_device::i8049_pia_r )
+uint8_t pioneer_pr8210_device::i8049_pia_r(offs_t offset)
{
uint8_t result = 0xff;
switch (offset)
@@ -532,7 +532,7 @@ READ8_MEMBER( pioneer_pr8210_device::i8049_pia_r )
// Pioneer PIA
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_pr8210_device::i8049_pia_w )
+void pioneer_pr8210_device::i8049_pia_w(offs_t offset, uint8_t data)
{
uint8_t value;
switch (offset)
@@ -603,7 +603,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_pia_w )
// input, which is enabled via the PIA above
//-------------------------------------------------
-READ8_MEMBER( pioneer_pr8210_device::i8049_bus_r )
+uint8_t pioneer_pr8210_device::i8049_bus_r()
{
/*
$80 = n/c
@@ -647,7 +647,7 @@ READ8_MEMBER( pioneer_pr8210_device::i8049_bus_r )
// port #1
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_pr8210_device::i8049_port1_w )
+void pioneer_pr8210_device::i8049_port1_w(uint8_t data)
{
/*
$80 = (out) SCAN C (F/R)
@@ -704,7 +704,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_port1_w )
// port #2
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_pr8210_device::i8049_port2_w )
+void pioneer_pr8210_device::i8049_port2_w(uint8_t data)
{
/*
$80 = (out) /CS on PIA
@@ -738,7 +738,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_port2_w )
// T0 input (connected to VSYNC)
//-------------------------------------------------
-READ_LINE_MEMBER( pioneer_pr8210_device::i8049_t0_r )
+int pioneer_pr8210_device::i8049_t0_r()
{
// returns VSYNC state
return !m_vsync;
@@ -750,7 +750,7 @@ READ_LINE_MEMBER( pioneer_pr8210_device::i8049_t0_r )
// T1 input (pulled high)
//-------------------------------------------------
-READ_LINE_MEMBER( pioneer_pr8210_device::i8049_t1_r )
+int pioneer_pr8210_device::i8049_t1_r()
{
return 1;
}
@@ -1041,7 +1041,7 @@ void simutrek_special_device::device_add_mconfig(machine_config &config)
// port #2
//-------------------------------------------------
-READ8_MEMBER( simutrek_special_device::i8748_port2_r )
+uint8_t simutrek_special_device::i8748_port2_r()
{
// bit $80 is the pr8210 video squelch
return (m_i8049_port1 & 0x20) ? 0x00 : 0x80;
@@ -1053,7 +1053,7 @@ READ8_MEMBER( simutrek_special_device::i8748_port2_r )
// port #2
//-------------------------------------------------
-WRITE8_MEMBER( simutrek_special_device::i8748_port2_w )
+void simutrek_special_device::i8748_port2_w(uint8_t data)
{
// update stat
uint8_t prev = m_i8748_port2;
@@ -1088,7 +1088,7 @@ WRITE8_MEMBER( simutrek_special_device::i8748_port2_w )
// i8748_data_r - handle external 8748 data reads
//-------------------------------------------------
-READ8_MEMBER( simutrek_special_device::i8748_data_r )
+uint8_t simutrek_special_device::i8748_data_r()
{
// acknowledge the read and clear the data ready flag
m_data_ready = false;
@@ -1101,7 +1101,7 @@ READ8_MEMBER( simutrek_special_device::i8748_data_r )
// T0 input
//-------------------------------------------------
-READ_LINE_MEMBER( simutrek_special_device::i8748_t0_r )
+int simutrek_special_device::i8748_t0_r()
{
// return 1 if data is waiting from main CPU
return m_data_ready;
diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h
index 02df0516361..217159e0cd1 100644
--- a/src/devices/machine/ldpr8210.h
+++ b/src/devices/machine/ldpr8210.h
@@ -75,13 +75,13 @@ protected:
virtual void update_audio_squelch() { set_audio_squelch((m_i8049_port1 & 0x40) || !(m_pia.portb & 0x01), (m_i8049_port1 & 0x40) || !(m_pia.portb & 0x02)); }
// internal read/write handlers
- DECLARE_READ8_MEMBER( i8049_pia_r );
- DECLARE_WRITE8_MEMBER( i8049_pia_w );
- DECLARE_READ8_MEMBER( i8049_bus_r );
- DECLARE_WRITE8_MEMBER( i8049_port1_w );
- DECLARE_WRITE8_MEMBER( i8049_port2_w );
- DECLARE_READ_LINE_MEMBER( i8049_t0_r );
- DECLARE_READ_LINE_MEMBER( i8049_t1_r );
+ uint8_t i8049_pia_r(offs_t offset);
+ void i8049_pia_w(offs_t offset, uint8_t data);
+ uint8_t i8049_bus_r();
+ void i8049_port1_w(uint8_t data);
+ void i8049_port2_w(uint8_t data);
+ int i8049_t0_r();
+ int i8049_t1_r();
// pioneer PIA subclass
class pioneer_pia
@@ -176,10 +176,10 @@ protected:
private:
// internal read/write handlers
- DECLARE_READ8_MEMBER( i8748_data_r );
- DECLARE_READ8_MEMBER( i8748_port2_r );
- DECLARE_WRITE8_MEMBER( i8748_port2_w );
- DECLARE_READ_LINE_MEMBER( i8748_t0_r );
+ uint8_t i8748_data_r();
+ uint8_t i8748_port2_r();
+ void i8748_port2_w(uint8_t data);
+ int i8748_t0_r();
void simutrek_portmap(address_map &map);
diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp
index 4f7a0196e40..8d94650e9db 100644
--- a/src/devices/machine/ldv1000.cpp
+++ b/src/devices/machine/ldv1000.cpp
@@ -340,7 +340,7 @@ int32_t pioneer_ldv1000_device::player_update(const vbi_metadata &vbi, int field
// an interrupt in the daisy chain
//-------------------------------------------------
-WRITE_LINE_MEMBER( pioneer_ldv1000_device::ctc_interrupt )
+void pioneer_ldv1000_device::ctc_interrupt(int state)
{
m_z80_cpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -351,7 +351,7 @@ WRITE_LINE_MEMBER( pioneer_ldv1000_device::ctc_interrupt )
// the decoder/display chips
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_w )
+void pioneer_ldv1000_device::z80_decoder_display_port_w(offs_t offset, uint8_t data)
{
/*
TX/RX = /A0 (A0=0 -> TX, A0=1 -> RX)
@@ -382,7 +382,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_w )
// decoder/display chips
//-------------------------------------------------
-READ8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_r )
+uint8_t pioneer_ldv1000_device::z80_decoder_display_port_r(offs_t offset)
{
// reads from offset 3 constitute actual reads from the display and decoder chips
uint8_t result = 0;
@@ -404,7 +404,7 @@ READ8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_r )
// the controlling system
//-------------------------------------------------
-READ8_MEMBER( pioneer_ldv1000_device::z80_controller_r )
+uint8_t pioneer_ldv1000_device::z80_controller_r()
{
// note that this is a cheesy implementation; the real thing relies on exquisite timing
uint8_t result = m_command ^ 0xff;
@@ -417,7 +417,7 @@ READ8_MEMBER( pioneer_ldv1000_device::z80_controller_r )
// z80_controller_w - handle status latch writes
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_ldv1000_device::z80_controller_w )
+void pioneer_ldv1000_device::z80_controller_w(uint8_t data)
{
if (LOG_STATUS_CHANGES && data != m_status)
logerror("%s:CONTROLLER.W=%02X\n", machine().describe_context(), data);
@@ -430,7 +430,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::z80_controller_w )
// PPI #0
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_ldv1000_device::ppi0_porta_w )
+void pioneer_ldv1000_device::ppi0_porta_w(uint8_t data)
{
m_counter_start = data;
if (LOG_PORT_IO)
@@ -443,7 +443,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::ppi0_porta_w )
// PPI #0
//-------------------------------------------------
-READ8_MEMBER( pioneer_ldv1000_device::ppi0_portb_r )
+uint8_t pioneer_ldv1000_device::ppi0_portb_r()
{
return m_counter;
}
@@ -454,7 +454,7 @@ READ8_MEMBER( pioneer_ldv1000_device::ppi0_portb_r )
// PPI #0
//-------------------------------------------------
-READ8_MEMBER( pioneer_ldv1000_device::ppi0_portc_r )
+uint8_t pioneer_ldv1000_device::ppi0_portc_r()
{
/*
$10 = /VSYNC
@@ -477,7 +477,7 @@ READ8_MEMBER( pioneer_ldv1000_device::ppi0_portc_r )
// PPI #0
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_ldv1000_device::ppi0_portc_w )
+void pioneer_ldv1000_device::ppi0_portc_w(uint8_t data)
{
/*
$01 = preload on up/down counters
@@ -512,7 +512,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::ppi0_portc_w )
// PPI #1
//-------------------------------------------------
-READ8_MEMBER( pioneer_ldv1000_device::ppi1_porta_r )
+uint8_t pioneer_ldv1000_device::ppi1_porta_r()
{
/*
$01 = /FOCS LOCK
@@ -562,7 +562,7 @@ READ8_MEMBER( pioneer_ldv1000_device::ppi1_porta_r )
// PPI #1
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_ldv1000_device::ppi1_portb_w )
+void pioneer_ldv1000_device::ppi1_portb_w(uint8_t data)
{
/*
$01 = /FOCS ON
@@ -615,7 +615,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::ppi1_portb_w )
// PPI #1
//-------------------------------------------------
-WRITE8_MEMBER( pioneer_ldv1000_device::ppi1_portc_w )
+void pioneer_ldv1000_device::ppi1_portc_w(uint8_t data)
{
/*
$01 = AUD 1
diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h
index 883bca49a71..2d19b81c4e3 100644
--- a/src/devices/machine/ldv1000.h
+++ b/src/devices/machine/ldv1000.h
@@ -78,20 +78,20 @@ private:
bool laser_on() const { return (m_portb1 & 0x40); }
// internal read/write handlers
- DECLARE_WRITE8_MEMBER( z80_decoder_display_port_w );
- DECLARE_READ8_MEMBER( z80_decoder_display_port_r );
- DECLARE_READ8_MEMBER( z80_controller_r );
- DECLARE_WRITE8_MEMBER( z80_controller_w );
+ void z80_decoder_display_port_w(offs_t offset, uint8_t data);
+ uint8_t z80_decoder_display_port_r(offs_t offset);
+ uint8_t z80_controller_r();
+ void z80_controller_w(uint8_t data);
// internal read/write handlers
- DECLARE_WRITE_LINE_MEMBER( ctc_interrupt );
- DECLARE_WRITE8_MEMBER( ppi0_porta_w );
- DECLARE_READ8_MEMBER( ppi0_portb_r );
- DECLARE_READ8_MEMBER( ppi0_portc_r );
- DECLARE_WRITE8_MEMBER( ppi0_portc_w );
- DECLARE_READ8_MEMBER( ppi1_porta_r );
- DECLARE_WRITE8_MEMBER( ppi1_portb_w );
- DECLARE_WRITE8_MEMBER( ppi1_portc_w );
+ void ctc_interrupt(int state);
+ void ppi0_porta_w(uint8_t data);
+ uint8_t ppi0_portb_r();
+ uint8_t ppi0_portc_r();
+ void ppi0_portc_w(uint8_t data);
+ uint8_t ppi1_porta_r();
+ void ppi1_portb_w(uint8_t data);
+ void ppi1_portc_w(uint8_t data);
void ldv1000_map(address_map &map);
void ldv1000_portmap(address_map &map);
diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp
index 4bcb74e1b6a..094447391cf 100644
--- a/src/devices/machine/ldvp931.cpp
+++ b/src/devices/machine/ldvp931.cpp
@@ -335,7 +335,7 @@ int32_t philips_22vp931_device::player_update(const vbi_metadata &vbi, int field
// and other bits
//-------------------------------------------------
-WRITE8_MEMBER( philips_22vp931_device::i8049_output0_w )
+void philips_22vp931_device::i8049_output0_w(uint8_t data)
{
/*
$80 = n/c
@@ -374,7 +374,7 @@ WRITE8_MEMBER( philips_22vp931_device::i8049_output0_w )
// i8049_output1_w - controls scanning behaviors
//-------------------------------------------------
-WRITE8_MEMBER( philips_22vp931_device::i8049_output1_w )
+void philips_22vp931_device::i8049_output1_w(uint8_t data)
{
/*
$80 = n/c
@@ -418,7 +418,7 @@ WRITE8_MEMBER( philips_22vp931_device::i8049_output1_w )
// i8049_lcd_w - vestigial LCD frame display
//-------------------------------------------------
-WRITE8_MEMBER( philips_22vp931_device::i8049_lcd_w )
+void philips_22vp931_device::i8049_lcd_w(uint8_t data)
{
/*
Frame number is written as 5 digits here; however, it is not actually
@@ -431,7 +431,7 @@ WRITE8_MEMBER( philips_22vp931_device::i8049_lcd_w )
// i8049_unknown_r - unknown input port
//-------------------------------------------------
-READ8_MEMBER( philips_22vp931_device::i8049_unknown_r )
+uint8_t philips_22vp931_device::i8049_unknown_r()
{
// only bit $80 is checked and its effects are minor
return 0x00;
@@ -443,7 +443,7 @@ READ8_MEMBER( philips_22vp931_device::i8049_unknown_r )
// controls
//-------------------------------------------------
-READ8_MEMBER( philips_22vp931_device::i8049_keypad_r )
+uint8_t philips_22vp931_device::i8049_keypad_r()
{
/*
From the code, this is apparently a vestigial keypad with basic controls:
@@ -465,7 +465,7 @@ READ8_MEMBER( philips_22vp931_device::i8049_keypad_r )
// DATIC circuit
//-------------------------------------------------
-READ8_MEMBER( philips_22vp931_device::i8049_datic_r )
+uint8_t philips_22vp931_device::i8049_datic_r()
{
return m_daticval;
}
@@ -476,7 +476,7 @@ READ8_MEMBER( philips_22vp931_device::i8049_datic_r )
// external controller wrote
//-------------------------------------------------
-READ8_MEMBER( philips_22vp931_device::i8049_from_controller_r )
+uint8_t philips_22vp931_device::i8049_from_controller_r()
{
// clear the pending flag and return the data
m_fromcontroller_pending = false;
@@ -489,7 +489,7 @@ READ8_MEMBER( philips_22vp931_device::i8049_from_controller_r )
// the external controller
//-------------------------------------------------
-WRITE8_MEMBER( philips_22vp931_device::i8049_to_controller_w )
+void philips_22vp931_device::i8049_to_controller_w(uint8_t data)
{
// set the pending flag and stash the data
m_tocontroller_pending = true;
@@ -508,7 +508,7 @@ WRITE8_MEMBER( philips_22vp931_device::i8049_to_controller_w )
// i8049_port1_r - read the 8048 I/O port 1
//-------------------------------------------------
-READ8_MEMBER( philips_22vp931_device::i8049_port1_r )
+uint8_t philips_22vp931_device::i8049_port1_r()
{
/*
$80 = P17 = (in) unsure
@@ -527,7 +527,7 @@ READ8_MEMBER( philips_22vp931_device::i8049_port1_r )
// i8049_port1_w - write the 8048 I/O port 1
//-------------------------------------------------
-WRITE8_MEMBER( philips_22vp931_device::i8049_port1_w )
+void philips_22vp931_device::i8049_port1_w(uint8_t data)
{
/*
$10 = P14 = (out) D104 -> /SPEED
@@ -598,7 +598,7 @@ WRITE8_MEMBER( philips_22vp931_device::i8049_port1_w )
// i8049_port2_r - read from the 8048 I/O port 2
//-------------------------------------------------
-READ8_MEMBER( philips_22vp931_device::i8049_port2_r )
+uint8_t philips_22vp931_device::i8049_port2_r()
{
/*
$80 = P27 = (in) set/reset latch; set by FOC LS, reset by IGR
@@ -619,7 +619,7 @@ READ8_MEMBER( philips_22vp931_device::i8049_port2_r )
// i8049_port2_w - write the 8048 I/O port 2
//-------------------------------------------------
-WRITE8_MEMBER( philips_22vp931_device::i8049_port2_w )
+void philips_22vp931_device::i8049_port2_w(uint8_t data)
{
/*
$40 = P26 = (out) cleared while data is sent back & forth; set afterwards
@@ -633,7 +633,7 @@ WRITE8_MEMBER( philips_22vp931_device::i8049_port2_w )
// connected to the DATIC's data strobe line
//-------------------------------------------------
-READ_LINE_MEMBER( philips_22vp931_device::i8049_t0_r )
+int philips_22vp931_device::i8049_t0_r()
{
return m_datastrobe;
}
@@ -645,7 +645,7 @@ READ_LINE_MEMBER( philips_22vp931_device::i8049_t0_r )
// to count the number of tracks advanced
//-------------------------------------------------
-READ_LINE_MEMBER( philips_22vp931_device::i8049_t1_r )
+int philips_22vp931_device::i8049_t1_r()
{
return m_trackstate;
}
diff --git a/src/devices/machine/ldvp931.h b/src/devices/machine/ldvp931.h
index fd69f52429e..c492f0cb699 100644
--- a/src/devices/machine/ldvp931.h
+++ b/src/devices/machine/ldvp931.h
@@ -78,20 +78,20 @@ protected:
private:
// internal read/write handlers
- DECLARE_WRITE8_MEMBER( i8049_output0_w );
- DECLARE_WRITE8_MEMBER( i8049_output1_w );
- DECLARE_WRITE8_MEMBER( i8049_lcd_w );
- DECLARE_READ8_MEMBER( i8049_unknown_r );
- DECLARE_READ8_MEMBER( i8049_keypad_r );
- DECLARE_READ8_MEMBER( i8049_datic_r );
- DECLARE_READ8_MEMBER( i8049_from_controller_r );
- DECLARE_WRITE8_MEMBER( i8049_to_controller_w );
- DECLARE_READ8_MEMBER( i8049_port1_r );
- DECLARE_WRITE8_MEMBER( i8049_port1_w );
- DECLARE_READ8_MEMBER( i8049_port2_r );
- DECLARE_WRITE8_MEMBER( i8049_port2_w );
- DECLARE_READ_LINE_MEMBER( i8049_t0_r );
- DECLARE_READ_LINE_MEMBER( i8049_t1_r );
+ void i8049_output0_w(uint8_t data);
+ void i8049_output1_w(uint8_t data);
+ void i8049_lcd_w(uint8_t data);
+ uint8_t i8049_unknown_r();
+ uint8_t i8049_keypad_r();
+ uint8_t i8049_datic_r();
+ uint8_t i8049_from_controller_r();
+ void i8049_to_controller_w(uint8_t data);
+ uint8_t i8049_port1_r();
+ void i8049_port1_w(uint8_t data);
+ uint8_t i8049_port2_r();
+ void i8049_port2_w(uint8_t data);
+ int i8049_t0_r();
+ int i8049_t1_r();
void vp931_portmap(address_map &map);
diff --git a/src/devices/machine/lh5810.cpp b/src/devices/machine/lh5810.cpp
index 8e427ab3bcf..054a532dff0 100644
--- a/src/devices/machine/lh5810.cpp
+++ b/src/devices/machine/lh5810.cpp
@@ -96,7 +96,7 @@ void lh5810_device::device_reset()
// data_r - data read
//-------------------------------------------------
-READ8_MEMBER( lh5810_device::data_r )
+uint8_t lh5810_device::data_r(offs_t offset)
{
switch (offset)
{
@@ -139,7 +139,7 @@ READ8_MEMBER( lh5810_device::data_r )
// data_w - data write
//-------------------------------------------------
-WRITE8_MEMBER( lh5810_device::data_w )
+void lh5810_device::data_w(offs_t offset, uint8_t data)
{
switch (offset)
{
diff --git a/src/devices/machine/lh5810.h b/src/devices/machine/lh5810.h
index 75716274c38..a383d0047eb 100644
--- a/src/devices/machine/lh5810.h
+++ b/src/devices/machine/lh5810.h
@@ -24,8 +24,8 @@ public:
auto portc_w() { return m_portc_w_cb.bind(); }
auto out_int() { return m_out_int_cb.bind(); }
- DECLARE_READ8_MEMBER( data_r );
- DECLARE_WRITE8_MEMBER( data_w );
+ uint8_t data_r(offs_t offset);
+ void data_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/lpc-pit.cpp b/src/devices/machine/lpc-pit.cpp
index 8c558c69b0d..e15f1893045 100644
--- a/src/devices/machine/lpc-pit.cpp
+++ b/src/devices/machine/lpc-pit.cpp
@@ -32,18 +32,18 @@ void lpc_pit_device::device_reset()
{
}
-READ8_MEMBER( lpc_pit_device::status_r)
+uint8_t lpc_pit_device::status_r(offs_t offset)
{
logerror("%s: status_r %d\n", tag(), offset);
return 0xff;
}
-WRITE8_MEMBER(lpc_pit_device::access_w)
+void lpc_pit_device::access_w(offs_t offset, uint8_t data)
{
logerror("%s: access_w %d, %02x\n", tag(), offset, data);
}
-WRITE8_MEMBER(lpc_pit_device::control_w)
+void lpc_pit_device::control_w(uint8_t data)
{
logerror("%s: control_w %02x\n", tag(), data);
}
diff --git a/src/devices/machine/lpc-pit.h b/src/devices/machine/lpc-pit.h
index 467a6d2bd14..aa83b6af5ce 100644
--- a/src/devices/machine/lpc-pit.h
+++ b/src/devices/machine/lpc-pit.h
@@ -21,9 +21,9 @@ protected:
private:
void map(address_map &map);
- DECLARE_READ8_MEMBER( status_r);
- DECLARE_WRITE8_MEMBER(access_w);
- DECLARE_WRITE8_MEMBER(control_w);
+ uint8_t status_r(offs_t offset);
+ void access_w(offs_t offset, uint8_t data);
+ void control_w(uint8_t data);
};
DECLARE_DEVICE_TYPE(LPC_PIT, lpc_pit_device)
diff --git a/src/devices/machine/lpc-rtc.cpp b/src/devices/machine/lpc-rtc.cpp
index 43e722810b0..e584d96cd6c 100644
--- a/src/devices/machine/lpc-rtc.cpp
+++ b/src/devices/machine/lpc-rtc.cpp
@@ -37,49 +37,53 @@ void lpc_rtc_device::map_extdevice(uint64_t memory_window_start, uint64_t memory
void lpc_rtc_device::device_start()
{
memset(ram, 0, 256);
+
+ save_item(NAME(cur_index));
+ save_item(NAME(cur_extindex));
+ save_item(NAME(ram));
}
void lpc_rtc_device::device_reset()
{
}
-READ8_MEMBER( lpc_rtc_device::index_r)
+uint8_t lpc_rtc_device::index_r()
{
return cur_index;
}
-WRITE8_MEMBER( lpc_rtc_device::index_w)
+void lpc_rtc_device::index_w(uint8_t data)
{
cur_index = data & 0x7f;
}
-READ8_MEMBER( lpc_rtc_device::target_r)
+uint8_t lpc_rtc_device::target_r()
{
return ram[cur_index];
}
-WRITE8_MEMBER( lpc_rtc_device::target_w)
+void lpc_rtc_device::target_w(uint8_t data)
{
ram[cur_index] = data;
logerror("%s: ram[%02x] = %02x\n", tag(), cur_index, data);
}
-READ8_MEMBER( lpc_rtc_device::extindex_r)
+uint8_t lpc_rtc_device::extindex_r()
{
return cur_extindex;
}
-WRITE8_MEMBER( lpc_rtc_device::extindex_w)
+void lpc_rtc_device::extindex_w(uint8_t data)
{
cur_extindex = data & 0x7f;
}
-READ8_MEMBER( lpc_rtc_device::exttarget_r)
+uint8_t lpc_rtc_device::exttarget_r()
{
return ram[cur_extindex|128];
}
-WRITE8_MEMBER( lpc_rtc_device::exttarget_w)
+void lpc_rtc_device::exttarget_w(uint8_t data)
{
ram[cur_extindex|128] = data;
logerror("%s: ram[%02x] = %02x\n", tag(), cur_extindex|128, data);
diff --git a/src/devices/machine/lpc-rtc.h b/src/devices/machine/lpc-rtc.h
index 7fee7cf7cb3..5243bcf7f8a 100644
--- a/src/devices/machine/lpc-rtc.h
+++ b/src/devices/machine/lpc-rtc.h
@@ -28,14 +28,14 @@ private:
uint8_t cur_index, cur_extindex;
uint8_t ram[256];
- DECLARE_READ8_MEMBER( index_r);
- DECLARE_WRITE8_MEMBER( index_w);
- DECLARE_READ8_MEMBER( target_r);
- DECLARE_WRITE8_MEMBER( target_w);
- DECLARE_READ8_MEMBER( extindex_r);
- DECLARE_WRITE8_MEMBER( extindex_w);
- DECLARE_READ8_MEMBER( exttarget_r);
- DECLARE_WRITE8_MEMBER( exttarget_w);
+ uint8_t index_r();
+ void index_w(uint8_t data);
+ uint8_t target_r();
+ void target_w(uint8_t data);
+ uint8_t extindex_r();
+ void extindex_w(uint8_t data);
+ uint8_t exttarget_r();
+ void exttarget_w(uint8_t data);
};
DECLARE_DEVICE_TYPE(LPC_RTC, lpc_rtc_device)
diff --git a/src/devices/machine/mb87030.cpp b/src/devices/machine/mb87030.cpp
index 25420dfad54..a9c87cfc11b 100644
--- a/src/devices/machine/mb87030.cpp
+++ b/src/devices/machine/mb87030.cpp
@@ -471,7 +471,7 @@ void mb87030_device::scsi_ctrl_changed()
step(false);
}
-WRITE_LINE_MEMBER(mb87030_device::reset_w)
+void mb87030_device::reset_w(int state)
{
LOG("%s: %s\n", __FUNCTION__, state);
if (state)
@@ -502,38 +502,38 @@ void mb87030_device::update_ints()
m_irq_handler(m_ints && (m_sctl & 1));// || (m_ints & INTS_DISCONNECTED));
}
-READ8_MEMBER(mb87030_device::bdid_r)
+uint8_t mb87030_device::bdid_r()
{
LOG("%s %02X\n", __FUNCTION__, (1 << m_bdid));
return 1 << m_bdid;
}
-WRITE8_MEMBER(mb87030_device::bdid_w)
+void mb87030_device::bdid_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_bdid = data & 0x7;
}
-READ8_MEMBER(mb87030_device::sctl_r)
+uint8_t mb87030_device::sctl_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_sctl);
return m_sctl;
}
-WRITE8_MEMBER(mb87030_device::sctl_w)
+void mb87030_device::sctl_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_sctl = data;
update_ints();
}
-READ8_MEMBER(mb87030_device::scmd_r)
+uint8_t mb87030_device::scmd_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_scmd);
return m_scmd;
}
-WRITE8_MEMBER(mb87030_device::scmd_w)
+void mb87030_device::scmd_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_scmd = data;
@@ -609,32 +609,32 @@ WRITE8_MEMBER(mb87030_device::scmd_w)
}
}
-READ8_MEMBER(mb87030_device::tmod_r)
+uint8_t mb87030_device::tmod_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_tmod);
return m_tmod;
}
-WRITE8_MEMBER(mb87030_device::tmod_w)
+void mb87030_device::tmod_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_tmod = data;
}
-READ8_MEMBER(mb87030_device::ints_r)
+uint8_t mb87030_device::ints_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_ints);
return m_ints;
}
-WRITE8_MEMBER(mb87030_device::ints_w)
+void mb87030_device::ints_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_ints &= ~(data);
update_ints();
}
-READ8_MEMBER(mb87030_device::psns_r)
+uint8_t mb87030_device::psns_r()
{
uint32_t ctrl = scsi_get_ctrl();
uint8_t ret = (!!(ctrl & S_REQ) << 7) |
@@ -649,33 +649,33 @@ READ8_MEMBER(mb87030_device::psns_r)
return ret;
}
-WRITE8_MEMBER(mb87030_device::sdgc_w)
+void mb87030_device::sdgc_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_sdgc = data;
scsi_ctrl_changed();
}
-READ8_MEMBER(mb87030_device::ssts_r)
+uint8_t mb87030_device::ssts_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_ssts);
update_ssts();
return m_ssts;
}
-READ8_MEMBER(mb87030_device::serr_r)
+uint8_t mb87030_device::serr_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_serr);
return m_serr;
}
-READ8_MEMBER(mb87030_device::pctl_r)
+uint8_t mb87030_device::pctl_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_pctl);
return m_pctl;
}
-WRITE8_MEMBER(mb87030_device::pctl_w)
+void mb87030_device::pctl_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_pctl = data;
@@ -684,13 +684,13 @@ WRITE8_MEMBER(mb87030_device::pctl_w)
step(false);
}
-READ8_MEMBER(mb87030_device::mbc_r)
+uint8_t mb87030_device::mbc_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_mbc);
return m_mbc;
}
-READ8_MEMBER(mb87030_device::dreg_r)
+uint8_t mb87030_device::dreg_r()
{
step(false);
if (!m_fifo.empty())
@@ -699,7 +699,7 @@ READ8_MEMBER(mb87030_device::dreg_r)
return m_dreg;
}
-WRITE8_MEMBER(mb87030_device::dreg_w)
+void mb87030_device::dreg_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_dreg = data;
@@ -708,35 +708,35 @@ WRITE8_MEMBER(mb87030_device::dreg_w)
step(false);
}
-READ8_MEMBER(mb87030_device::temp_r)
+uint8_t mb87030_device::temp_r()
{
step(false);
LOG("%s: %02X\n", __FUNCTION__, m_temp);
return m_temp;
}
-WRITE8_MEMBER(mb87030_device::temp_w)
+void mb87030_device::temp_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_temp = data;
step(false);
}
-READ8_MEMBER(mb87030_device::tch_r)
+uint8_t mb87030_device::tch_r()
{
uint8_t ret = (m_tc >> 16) & 0xff;
LOG("%s: %02X\n", __FUNCTION__, ret);
return ret;
}
-READ8_MEMBER(mb87030_device::tcm_r)
+uint8_t mb87030_device::tcm_r()
{
uint8_t ret = (m_tc >> 8) & 0xff;
LOG("%s: %02X\n", __FUNCTION__, ret);
return ret;
}
-READ8_MEMBER(mb87030_device::tcl_r)
+uint8_t mb87030_device::tcl_r()
{
uint8_t ret = m_tc & 0xff;
LOG("%s: %02X\n", __FUNCTION__, ret);
@@ -744,7 +744,7 @@ READ8_MEMBER(mb87030_device::tcl_r)
}
-WRITE8_MEMBER(mb87030_device::tch_w)
+void mb87030_device::tch_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_tc &= 0x00ffff;
@@ -752,7 +752,7 @@ WRITE8_MEMBER(mb87030_device::tch_w)
update_ssts();
}
-WRITE8_MEMBER(mb87030_device::tcm_w)
+void mb87030_device::tcm_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_tc &= 0xff00ff;
@@ -760,7 +760,7 @@ WRITE8_MEMBER(mb87030_device::tcm_w)
update_ssts();
}
-WRITE8_MEMBER(mb87030_device::tcl_w)
+void mb87030_device::tcl_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_tc &= 0xffff00;
@@ -768,13 +768,13 @@ WRITE8_MEMBER(mb87030_device::tcl_w)
update_ssts();
}
-READ8_MEMBER(mb87030_device::exbf_r)
+uint8_t mb87030_device::exbf_r()
{
LOG("%s: %02X\n", __FUNCTION__, m_exbf);
return m_exbf;
}
-WRITE8_MEMBER(mb87030_device::exbf_w)
+void mb87030_device::exbf_w(uint8_t data)
{
LOG("%s: %02X\n", __FUNCTION__, data);
m_exbf = data;
diff --git a/src/devices/machine/mb87030.h b/src/devices/machine/mb87030.h
index dc07f0edb9b..c4d113107cd 100644
--- a/src/devices/machine/mb87030.h
+++ b/src/devices/machine/mb87030.h
@@ -18,38 +18,38 @@ public:
auto out_irq_callback() { return m_irq_handler.bind(); }
auto out_dreq_callback() { return m_dreq_handler.bind(); }
- DECLARE_READ8_MEMBER(bdid_r);
- DECLARE_READ8_MEMBER(sctl_r);
- DECLARE_READ8_MEMBER(scmd_r);
- DECLARE_READ8_MEMBER(tmod_r);
- DECLARE_READ8_MEMBER(ints_r);
- DECLARE_READ8_MEMBER(psns_r);
- DECLARE_READ8_MEMBER(ssts_r);
- DECLARE_READ8_MEMBER(serr_r);
- DECLARE_READ8_MEMBER(pctl_r);
- DECLARE_READ8_MEMBER(mbc_r);
- DECLARE_READ8_MEMBER(dreg_r);
- DECLARE_READ8_MEMBER(temp_r);
- DECLARE_READ8_MEMBER(tch_r);
- DECLARE_READ8_MEMBER(tcm_r);
- DECLARE_READ8_MEMBER(tcl_r);
- DECLARE_READ8_MEMBER(exbf_r);
-
- DECLARE_WRITE8_MEMBER(bdid_w);
- DECLARE_WRITE8_MEMBER(sctl_w);
- DECLARE_WRITE8_MEMBER(scmd_w);
- DECLARE_WRITE8_MEMBER(tmod_w);
- DECLARE_WRITE8_MEMBER(ints_w);
- DECLARE_WRITE8_MEMBER(sdgc_w);
- DECLARE_WRITE8_MEMBER(pctl_w);
- DECLARE_WRITE8_MEMBER(dreg_w);
- DECLARE_WRITE8_MEMBER(temp_w);
- DECLARE_WRITE8_MEMBER(tch_w);
- DECLARE_WRITE8_MEMBER(tcm_w);
- DECLARE_WRITE8_MEMBER(tcl_w);
- DECLARE_WRITE8_MEMBER(exbf_w);
-
- DECLARE_WRITE_LINE_MEMBER(reset_w);
+ uint8_t bdid_r();
+ uint8_t sctl_r();
+ uint8_t scmd_r();
+ uint8_t tmod_r();
+ uint8_t ints_r();
+ uint8_t psns_r();
+ uint8_t ssts_r();
+ uint8_t serr_r();
+ uint8_t pctl_r();
+ uint8_t mbc_r();
+ uint8_t dreg_r();
+ uint8_t temp_r();
+ uint8_t tch_r();
+ uint8_t tcm_r();
+ uint8_t tcl_r();
+ uint8_t exbf_r();
+
+ void bdid_w(uint8_t data);
+ void sctl_w(uint8_t data);
+ void scmd_w(uint8_t data);
+ void tmod_w(uint8_t data);
+ void ints_w(uint8_t data);
+ void sdgc_w(uint8_t data);
+ void pctl_w(uint8_t data);
+ void dreg_w(uint8_t data);
+ void temp_w(uint8_t data);
+ void tch_w(uint8_t data);
+ void tcm_w(uint8_t data);
+ void tcl_w(uint8_t data);
+ void exbf_w(uint8_t data);
+
+ void reset_w(int state);
virtual void scsi_ctrl_changed() override;
uint8_t dma_r();
diff --git a/src/devices/machine/mb8795.cpp b/src/devices/machine/mb8795.cpp
index 0ec30d1f84b..4f6d08d9aca 100644
--- a/src/devices/machine/mb8795.cpp
+++ b/src/devices/machine/mb8795.cpp
@@ -82,95 +82,95 @@ void mb8795_device::recv_cb(uint8_t *buf, int len)
receive();
}
-READ8_MEMBER(mb8795_device::txstat_r)
+uint8_t mb8795_device::txstat_r()
{
// logerror("txstat_r %02x %s\n", txstat, machine().describe_context());
return txstat;
}
-WRITE8_MEMBER(mb8795_device::txstat_w)
+void mb8795_device::txstat_w(uint8_t data)
{
txstat = txstat & (0xf0 | ~data);
check_irq();
logerror("txstat_w %02x %s\n", txstat, machine().describe_context());
}
-READ8_MEMBER(mb8795_device::txmask_r)
+uint8_t mb8795_device::txmask_r()
{
logerror("txmask_r %02x %s\n", txmask, machine().describe_context());
return txmask;
}
-WRITE8_MEMBER(mb8795_device::txmask_w)
+void mb8795_device::txmask_w(uint8_t data)
{
txmask = data & 0xaf;
check_irq();
logerror("txmask_w %02x %s\n", txmask, machine().describe_context());
}
-READ8_MEMBER(mb8795_device::rxstat_r)
+uint8_t mb8795_device::rxstat_r()
{
logerror("rxstat_r %02x %s\n", rxstat, machine().describe_context());
return rxstat;
}
-WRITE8_MEMBER(mb8795_device::rxstat_w)
+void mb8795_device::rxstat_w(uint8_t data)
{
rxstat = rxstat & (0x70 | ~data);
check_irq();
logerror("rxstat_w %02x %s\n", rxstat, machine().describe_context());
}
-READ8_MEMBER(mb8795_device::rxmask_r)
+uint8_t mb8795_device::rxmask_r()
{
logerror("rxmask_r %02x %s\n", rxmask, machine().describe_context());
return rxmask;
}
-WRITE8_MEMBER(mb8795_device::rxmask_w)
+void mb8795_device::rxmask_w(uint8_t data)
{
rxmask = data & 0x9f;
check_irq();
logerror("rxmask_w %02x %s\n", rxmask, machine().describe_context());
}
-READ8_MEMBER(mb8795_device::txmode_r)
+uint8_t mb8795_device::txmode_r()
{
logerror("txmode_r %02x %s\n", txmode, machine().describe_context());
return txmode;
}
-WRITE8_MEMBER(mb8795_device::txmode_w)
+void mb8795_device::txmode_w(uint8_t data)
{
txmode = data;
logerror("txmode_w %02x %s\n", txmode, machine().describe_context());
}
-READ8_MEMBER(mb8795_device::rxmode_r)
+uint8_t mb8795_device::rxmode_r()
{
logerror("rxmode_r %02x %s\n", rxmode, machine().describe_context());
return rxmode;
}
-WRITE8_MEMBER(mb8795_device::rxmode_w)
+void mb8795_device::rxmode_w(uint8_t data)
{
rxmode = data;
logerror("rxmode_w %02x %s\n", rxmode, machine().describe_context());
}
-WRITE8_MEMBER(mb8795_device::reset_w)
+void mb8795_device::reset_w(uint8_t data)
{
if(data & EN_RST_RESET)
device_reset();
}
-READ8_MEMBER(mb8795_device::tdc_lsb_r)
+uint8_t mb8795_device::tdc_lsb_r()
{
logerror("tdc_lsb_r %02x %s\n", txcount & 0xff, machine().describe_context());
return txcount;
}
-READ8_MEMBER(mb8795_device::mac_r)
+uint8_t mb8795_device::mac_r(offs_t offset)
{
if(offset < 6)
return mac[offset];
@@ -181,7 +181,7 @@ READ8_MEMBER(mb8795_device::mac_r)
return 0;
}
-WRITE8_MEMBER(mb8795_device::mac_w)
+void mb8795_device::mac_w(offs_t offset, uint8_t data)
{
if(offset < 6) {
mac[offset] = data;
diff --git a/src/devices/machine/mb8795.h b/src/devices/machine/mb8795.h
index 6662cd96ebc..1298a6295cc 100644
--- a/src/devices/machine/mb8795.h
+++ b/src/devices/machine/mb8795.h
@@ -84,22 +84,22 @@ private:
bool recv_is_multicast();
bool recv_is_local_multicast();
- DECLARE_READ8_MEMBER(txstat_r);
- DECLARE_WRITE8_MEMBER(txstat_w);
- DECLARE_READ8_MEMBER(txmask_r);
- DECLARE_WRITE8_MEMBER(txmask_w);
- DECLARE_READ8_MEMBER(rxstat_r);
- DECLARE_WRITE8_MEMBER(rxstat_w);
- DECLARE_READ8_MEMBER(rxmask_r);
- DECLARE_WRITE8_MEMBER(rxmask_w);
- DECLARE_READ8_MEMBER(txmode_r);
- DECLARE_WRITE8_MEMBER(txmode_w);
- DECLARE_READ8_MEMBER(rxmode_r);
- DECLARE_WRITE8_MEMBER(rxmode_w);
- DECLARE_WRITE8_MEMBER(reset_w);
- DECLARE_READ8_MEMBER(tdc_lsb_r);
- DECLARE_READ8_MEMBER(mac_r);
- DECLARE_WRITE8_MEMBER(mac_w);
+ uint8_t txstat_r();
+ void txstat_w(uint8_t data);
+ uint8_t txmask_r();
+ void txmask_w(uint8_t data);
+ uint8_t rxstat_r();
+ void rxstat_w(uint8_t data);
+ uint8_t rxmask_r();
+ void rxmask_w(uint8_t data);
+ uint8_t txmode_r();
+ void txmode_w(uint8_t data);
+ uint8_t rxmode_r();
+ void rxmode_w(uint8_t data);
+ void reset_w(uint8_t data);
+ uint8_t tdc_lsb_r();
+ uint8_t mac_r(offs_t offset);
+ void mac_w(offs_t offset, uint8_t data);
};
DECLARE_DEVICE_TYPE(MB8795, mb8795_device)
diff --git a/src/devices/machine/mb89352.cpp b/src/devices/machine/mb89352.cpp
index 0cde218e996..62b9adb78bb 100644
--- a/src/devices/machine/mb89352.cpp
+++ b/src/devices/machine/mb89352.cpp
@@ -285,7 +285,7 @@ void mb89352_device::set_phase(int phase)
logerror("MB89352: phase set to %i\n",m_phase);
}
-READ8_MEMBER( mb89352_device::mb89352_r )
+uint8_t mb89352_device::mb89352_r(offs_t offset)
{
uint8_t ret;
switch(offset & 0x0f)
@@ -363,7 +363,7 @@ READ8_MEMBER( mb89352_device::mb89352_r )
return 0xff;
}
-WRITE8_MEMBER( mb89352_device::mb89352_w )
+void mb89352_device::mb89352_w(offs_t offset, uint8_t data)
{
switch(offset & 0x0f)
{
diff --git a/src/devices/machine/mb89352.h b/src/devices/machine/mb89352.h
index b9723b314d6..7454e63a352 100644
--- a/src/devices/machine/mb89352.h
+++ b/src/devices/machine/mb89352.h
@@ -21,8 +21,8 @@ public:
auto drq_cb() { return m_drq_cb.bind(); }
// any publically accessible interfaces needed for runtime
- DECLARE_READ8_MEMBER( mb89352_r );
- DECLARE_WRITE8_MEMBER( mb89352_w );
+ uint8_t mb89352_r(offs_t offset);
+ void mb89352_w(offs_t offset, uint8_t data);
void set_phase(int phase);
diff --git a/src/devices/machine/mb89363b.cpp b/src/devices/machine/mb89363b.cpp
index 0c03a66e421..dae0d4a3372 100644
--- a/src/devices/machine/mb89363b.cpp
+++ b/src/devices/machine/mb89363b.cpp
@@ -103,21 +103,21 @@ mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag,
}
-READ8_MEMBER(mb89363b_device::i8255_a_port_a_r) { return m_in_a_pa_cb(space, offset); }
-READ8_MEMBER(mb89363b_device::i8255_a_port_b_r) { return m_in_a_pb_cb(space, offset); }
-READ8_MEMBER(mb89363b_device::i8255_a_port_c_r) { return m_in_a_pc_cb(space, offset); }
-WRITE8_MEMBER(mb89363b_device::i8255_a_port_a_w) { m_out_a_pa_cb(space, offset, data); }
-WRITE8_MEMBER(mb89363b_device::i8255_a_port_b_w) { m_out_a_pb_cb(space, offset, data); }
-WRITE8_MEMBER(mb89363b_device::i8255_a_port_c_w) { m_out_a_pc_cb(space, offset, data); }
-READ8_MEMBER(mb89363b_device::i8255_b_port_a_r) { return m_in_b_pa_cb(space, offset); }
-READ8_MEMBER(mb89363b_device::i8255_b_port_b_r) { return m_in_b_pb_cb(space, offset); }
-READ8_MEMBER(mb89363b_device::i8255_b_port_c_r) { return m_in_b_pc_cb(space, offset); }
-WRITE8_MEMBER(mb89363b_device::i8255_b_port_a_w) { m_out_b_pa_cb(space, offset, data); }
-WRITE8_MEMBER(mb89363b_device::i8255_b_port_b_w) { m_out_b_pb_cb(space, offset, data); }
-WRITE8_MEMBER(mb89363b_device::i8255_b_port_c_w) { m_out_b_pc_cb(space, offset, data); }
-
-
-READ8_MEMBER( mb89363b_device::read )
+uint8_t mb89363b_device::i8255_a_port_a_r(offs_t offset) { return m_in_a_pa_cb(offset); }
+uint8_t mb89363b_device::i8255_a_port_b_r(offs_t offset) { return m_in_a_pb_cb(offset); }
+uint8_t mb89363b_device::i8255_a_port_c_r(offs_t offset) { return m_in_a_pc_cb(offset); }
+void mb89363b_device::i8255_a_port_a_w(offs_t offset, uint8_t data) { m_out_a_pa_cb(offset, data); }
+void mb89363b_device::i8255_a_port_b_w(offs_t offset, uint8_t data) { m_out_a_pb_cb(offset, data); }
+void mb89363b_device::i8255_a_port_c_w(offs_t offset, uint8_t data) { m_out_a_pc_cb(offset, data); }
+uint8_t mb89363b_device::i8255_b_port_a_r(offs_t offset) { return m_in_b_pa_cb(offset); }
+uint8_t mb89363b_device::i8255_b_port_b_r(offs_t offset) { return m_in_b_pb_cb(offset); }
+uint8_t mb89363b_device::i8255_b_port_c_r(offs_t offset) { return m_in_b_pc_cb(offset); }
+void mb89363b_device::i8255_b_port_a_w(offs_t offset, uint8_t data) { m_out_b_pa_cb(offset, data); }
+void mb89363b_device::i8255_b_port_b_w(offs_t offset, uint8_t data) { m_out_b_pb_cb(offset, data); }
+void mb89363b_device::i8255_b_port_c_w(offs_t offset, uint8_t data) { m_out_b_pc_cb(offset, data); }
+
+
+uint8_t mb89363b_device::read(offs_t offset)
{
if (offset & 4)
return m_i8255_b->read(offset & 3);
@@ -125,7 +125,7 @@ READ8_MEMBER( mb89363b_device::read )
return m_i8255_a->read(offset & 3);
}
-WRITE8_MEMBER( mb89363b_device::write )
+void mb89363b_device::write(offs_t offset, uint8_t data)
{
if (offset & 4)
m_i8255_b->write(offset & 3, data);
diff --git a/src/devices/machine/mb89363b.h b/src/devices/machine/mb89363b.h
index da8198288c0..273642f96f5 100644
--- a/src/devices/machine/mb89363b.h
+++ b/src/devices/machine/mb89363b.h
@@ -23,8 +23,8 @@ public:
// construction/destruction
mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
auto in_pa() { return m_in_a_pa_cb.bind(); }
auto in_pb() { return m_in_a_pb_cb.bind(); }
@@ -46,18 +46,18 @@ protected:
virtual void device_reset() override;
private:
- DECLARE_READ8_MEMBER(i8255_a_port_a_r);
- DECLARE_READ8_MEMBER(i8255_a_port_b_r);
- DECLARE_READ8_MEMBER(i8255_a_port_c_r);
- DECLARE_WRITE8_MEMBER(i8255_a_port_a_w);
- DECLARE_WRITE8_MEMBER(i8255_a_port_b_w);
- DECLARE_WRITE8_MEMBER(i8255_a_port_c_w);
- DECLARE_READ8_MEMBER(i8255_b_port_a_r);
- DECLARE_READ8_MEMBER(i8255_b_port_b_r);
- DECLARE_READ8_MEMBER(i8255_b_port_c_r);
- DECLARE_WRITE8_MEMBER(i8255_b_port_a_w);
- DECLARE_WRITE8_MEMBER(i8255_b_port_b_w);
- DECLARE_WRITE8_MEMBER(i8255_b_port_c_w);
+ uint8_t i8255_a_port_a_r(offs_t offset);
+ uint8_t i8255_a_port_b_r(offs_t offset);
+ uint8_t i8255_a_port_c_r(offs_t offset);
+ void i8255_a_port_a_w(offs_t offset, uint8_t data);
+ void i8255_a_port_b_w(offs_t offset, uint8_t data);
+ void i8255_a_port_c_w(offs_t offset, uint8_t data);
+ uint8_t i8255_b_port_a_r(offs_t offset);
+ uint8_t i8255_b_port_b_r(offs_t offset);
+ uint8_t i8255_b_port_c_r(offs_t offset);
+ void i8255_b_port_a_w(offs_t offset, uint8_t data);
+ void i8255_b_port_b_w(offs_t offset, uint8_t data);
+ void i8255_b_port_c_w(offs_t offset, uint8_t data);
required_device<i8255_device> m_i8255_a;
required_device<i8255_device> m_i8255_b;
diff --git a/src/devices/machine/mb89374.cpp b/src/devices/machine/mb89374.cpp
index ad77d30b8af..3e888d820ec 100644
--- a/src/devices/machine/mb89374.cpp
+++ b/src/devices/machine/mb89374.cpp
@@ -269,7 +269,7 @@ void mb89374_device::execute_run()
// read - handler for register reading
//-------------------------------------------------
-READ8_MEMBER(mb89374_device::read)
+uint8_t mb89374_device::read(offs_t offset)
{
uint8_t data = 0xff;
switch (offset & 0x1f)
@@ -306,7 +306,7 @@ READ8_MEMBER(mb89374_device::read)
// write - handler for register writing
//-------------------------------------------------
-WRITE8_MEMBER(mb89374_device::write)
+void mb89374_device::write(offs_t offset, uint8_t data)
{
switch (offset & 0x1f)
{
@@ -365,7 +365,7 @@ WRITE8_MEMBER(mb89374_device::write)
// pi0_w - handler for RxCI#/PI0
//-------------------------------------------------
-WRITE_LINE_MEMBER(mb89374_device::pi0_w)
+void mb89374_device::pi0_w(int state)
{
m_pi[0] = state;
}
@@ -375,7 +375,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi0_w)
// pi1_w - handler for TxCI#/PI1
//-------------------------------------------------
-WRITE_LINE_MEMBER(mb89374_device::pi1_w)
+void mb89374_device::pi1_w(int state)
{
m_pi[1] = state;
}
@@ -385,7 +385,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi1_w)
// pi2_w - handler for TxDACK#/PI2
//-------------------------------------------------
-WRITE_LINE_MEMBER(mb89374_device::pi2_w)
+void mb89374_device::pi2_w(int state)
{
m_pi[2] = state;
}
@@ -395,7 +395,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi2_w)
// pi3_w - handler for RxDACK#/PI3
//-------------------------------------------------
-WRITE_LINE_MEMBER(mb89374_device::pi3_w)
+void mb89374_device::pi3_w(int state)
{
m_pi[3] = state;
}
@@ -405,7 +405,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi3_w)
// ci_w - handler for TxLAST#/CI#
//-------------------------------------------------
-WRITE_LINE_MEMBER(mb89374_device::ci_w)
+void mb89374_device::ci_w(int state)
{
m_ci = state;
if (m_ci == 1 && m_pi[2] == 0)
@@ -420,7 +420,7 @@ WRITE_LINE_MEMBER(mb89374_device::ci_w)
// read - handler for dma reading (rx buffer)
//-------------------------------------------------
-READ8_MEMBER(mb89374_device::dma_r)
+uint8_t mb89374_device::dma_r()
{
uint8_t data = rxRead();
if (m_rx_offset == m_rx_length)
@@ -433,7 +433,7 @@ READ8_MEMBER(mb89374_device::dma_r)
// write - handler for dma writing (tx buffer)
//-------------------------------------------------
-WRITE8_MEMBER(mb89374_device::dma_w)
+void mb89374_device::dma_w(uint8_t data)
{
txWrite(data);
}
diff --git a/src/devices/machine/mb89374.h b/src/devices/machine/mb89374.h
index f6163bb4e16..c70781b49aa 100644
--- a/src/devices/machine/mb89374.h
+++ b/src/devices/machine/mb89374.h
@@ -49,18 +49,18 @@ public:
template <unsigned N> auto out_po_callback() { return m_out_po_cb[N].bind(); }
// read/write handlers
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER( pi0_w );
- DECLARE_WRITE_LINE_MEMBER( pi1_w );
- DECLARE_WRITE_LINE_MEMBER( pi2_w );
- DECLARE_WRITE_LINE_MEMBER( pi3_w );
+ void pi0_w(int state);
+ void pi1_w(int state);
+ void pi2_w(int state);
+ void pi3_w(int state);
- DECLARE_WRITE_LINE_MEMBER( ci_w );
+ void ci_w(int state);
- DECLARE_READ8_MEMBER( dma_r );
- DECLARE_WRITE8_MEMBER( dma_w );
+ uint8_t dma_r();
+ void dma_w(uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp
index cab994ca89c..64bf476e2c4 100644
--- a/src/devices/machine/mc14411.cpp
+++ b/src/devices/machine/mc14411.cpp
@@ -244,7 +244,7 @@ void mc14411_device::device_timer(emu_timer &timer, device_timer_id id, int32_t
// divider at run time affects wave forms
//--------------------------------------------------------
-WRITE8_MEMBER(mc14411_device::rate_select_w)
+void mc14411_device::rate_select_w(uint8_t data)
{
LOGSETUP("%s %02x\n", FUNCNAME, data);
@@ -260,7 +260,7 @@ WRITE8_MEMBER(mc14411_device::rate_select_w)
// rsa_w - set RSA input line
//------------------------------------------------
-WRITE_LINE_MEMBER(mc14411_device::rsa_w)
+void mc14411_device::rsa_w(int state)
{
LOGSETUP("%s %02x\n", FUNCNAME, state);
@@ -276,7 +276,7 @@ WRITE_LINE_MEMBER(mc14411_device::rsa_w)
// rsb_w - set RSB input line
//------------------------------------------------
-WRITE_LINE_MEMBER(mc14411_device::rsb_w)
+void mc14411_device::rsb_w(int state)
{
LOGSETUP("%s %02x\n", FUNCNAME, state);
@@ -292,7 +292,7 @@ WRITE_LINE_MEMBER(mc14411_device::rsb_w)
// reset_w - software controlled reset
//------------------------------------------------
-WRITE_LINE_MEMBER(mc14411_device::reset_w)
+void mc14411_device::reset_w(int state)
{
LOGSETUP("%s %02x\n", FUNCNAME, state);
diff --git a/src/devices/machine/mc14411.h b/src/devices/machine/mc14411.h
index 6755df220e2..99cc8309c96 100644
--- a/src/devices/machine/mc14411.h
+++ b/src/devices/machine/mc14411.h
@@ -63,10 +63,10 @@ public:
template <std::size_t Line> auto out_f() { return m_out_fx_cbs[Line-1].bind(); }
- DECLARE_WRITE_LINE_MEMBER(reset_w);
- DECLARE_WRITE8_MEMBER(rate_select_w);
- DECLARE_WRITE_LINE_MEMBER(rsa_w);
- DECLARE_WRITE_LINE_MEMBER(rsb_w);
+ void reset_w(int state);
+ void rate_select_w(uint8_t data);
+ void rsa_w(int state);
+ void rsb_w(int state);
void timer_enable(timer_id i, bool enable);
void timer_disable_all();
diff --git a/src/devices/machine/mc6846.cpp b/src/devices/machine/mc6846.cpp
index ecae29b48c3..72b3f1added 100644
--- a/src/devices/machine/mc6846.cpp
+++ b/src/devices/machine/mc6846.cpp
@@ -283,7 +283,7 @@ TIMER_CALLBACK_MEMBER( mc6846_device::timer_one_shot )
/************************** CPU interface ****************************/
-READ8_MEMBER(mc6846_device::read)
+uint8_t mc6846_device::read(offs_t offset)
{
switch ( offset )
{
@@ -352,7 +352,7 @@ READ8_MEMBER(mc6846_device::read)
-WRITE8_MEMBER(mc6846_device::write)
+void mc6846_device::write(offs_t offset, uint8_t data)
{
switch ( offset )
diff --git a/src/devices/machine/mc6846.h b/src/devices/machine/mc6846.h
index 81633923adc..3569e78bb98 100644
--- a/src/devices/machine/mc6846.h
+++ b/src/devices/machine/mc6846.h
@@ -26,8 +26,8 @@ public:
auto irq() { return m_irq_cb.bind(); }
/* interface to CPU via address/data bus*/
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
/* asynchronous write from outside world into interrupt-generating pins */
void set_input_cp1(int data);
diff --git a/src/devices/machine/mos6529.cpp b/src/devices/machine/mos6529.cpp
index beacf44640b..46bbf3bc0b8 100644
--- a/src/devices/machine/mos6529.cpp
+++ b/src/devices/machine/mos6529.cpp
@@ -54,7 +54,7 @@ void mos6529_device::device_start()
// read -
//-------------------------------------------------
-READ8_MEMBER( mos6529_device::read )
+uint8_t mos6529_device::read()
{
return m_input;
}
@@ -64,7 +64,7 @@ READ8_MEMBER( mos6529_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( mos6529_device::write )
+void mos6529_device::write(uint8_t data)
{
for (int bit = 0; bit < 8; bit++)
m_p_handler[bit](BIT(data, bit));
diff --git a/src/devices/machine/mos6529.h b/src/devices/machine/mos6529.h
index 63607f67223..67806441d57 100644
--- a/src/devices/machine/mos6529.h
+++ b/src/devices/machine/mos6529.h
@@ -41,17 +41,17 @@ public:
template <std::size_t Bit> auto p_handler() { return m_p_handler[Bit].bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
-
- DECLARE_WRITE_LINE_MEMBER( write_p0 ) { if (state) m_input |= 1; else m_input &= ~1; }
- DECLARE_WRITE_LINE_MEMBER( write_p1 ) { if (state) m_input |= 2; else m_input &= ~2; }
- DECLARE_WRITE_LINE_MEMBER( write_p2 ) { if (state) m_input |= 4; else m_input &= ~4; }
- DECLARE_WRITE_LINE_MEMBER( write_p3 ) { if (state) m_input |= 8; else m_input &= ~8; }
- DECLARE_WRITE_LINE_MEMBER( write_p4 ) { if (state) m_input |= 16; else m_input &= ~16; }
- DECLARE_WRITE_LINE_MEMBER( write_p5 ) { if (state) m_input |= 32; else m_input &= ~32; }
- DECLARE_WRITE_LINE_MEMBER( write_p6 ) { if (state) m_input |= 64; else m_input &= ~64; }
- DECLARE_WRITE_LINE_MEMBER( write_p7 ) { if (state) m_input |= 128; else m_input &= ~128; }
+ uint8_t read();
+ void write(uint8_t data);
+
+ void write_p0(int state) { if (state) m_input |= 1; else m_input &= ~1; }
+ void write_p1(int state) { if (state) m_input |= 2; else m_input &= ~2; }
+ void write_p2(int state) { if (state) m_input |= 4; else m_input &= ~4; }
+ void write_p3(int state) { if (state) m_input |= 8; else m_input &= ~8; }
+ void write_p4(int state) { if (state) m_input |= 16; else m_input &= ~16; }
+ void write_p5(int state) { if (state) m_input |= 32; else m_input &= ~32; }
+ void write_p6(int state) { if (state) m_input |= 64; else m_input &= ~64; }
+ void write_p7(int state) { if (state) m_input |= 128; else m_input &= ~128; }
protected:
// device-level overrides
diff --git a/src/devices/machine/mos6530.cpp b/src/devices/machine/mos6530.cpp
index c149240f5ef..8cc7198b3e5 100644
--- a/src/devices/machine/mos6530.cpp
+++ b/src/devices/machine/mos6530.cpp
@@ -194,7 +194,7 @@ void mos6530_device::device_timer(emu_timer &timer, device_timer_id id, int para
mos6530_w - master I/O write access
-------------------------------------------------*/
-WRITE8_MEMBER( mos6530_device::write )
+void mos6530_device::write(offs_t offset, uint8_t data)
{
/* if A2 == 1, we are writing to the timer */
if (offset & 0x04)
@@ -258,7 +258,7 @@ WRITE8_MEMBER( mos6530_device::write )
mos6530_r - master I/O read access
-------------------------------------------------*/
-READ8_MEMBER( mos6530_device::read )
+uint8_t mos6530_device::read(offs_t offset)
{
uint8_t val;
diff --git a/src/devices/machine/mos6530.h b/src/devices/machine/mos6530.h
index 6bbeb8db9de..0639544d8e0 100644
--- a/src/devices/machine/mos6530.h
+++ b/src/devices/machine/mos6530.h
@@ -53,8 +53,8 @@ public:
auto in_pb_callback() { return m_in_pb_cb.bind(); }
auto out_pb_callback() { return m_out_pb_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
uint8_t porta_in_get();
uint8_t portb_in_get();
diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp
index 88fce0bfc44..0c19a5aaed6 100644
--- a/src/devices/machine/mos6530n.cpp
+++ b/src/devices/machine/mos6530n.cpp
@@ -75,38 +75,38 @@ void mos6532_new_device::io_map(address_map &map)
map(0x04, 0x07).mirror(0x8).w(FUNC(mos6532_new_device::edge_w));
}
-READ8_MEMBER(mos6532_new_device::io_r)
+uint8_t mos6532_new_device::io_r(offs_t offset)
{
offset &= 0x1f;
uint8_t ret = 0;
- if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) ret = pa_data_r(space, 0);
- if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) ret = pa_ddr_r(space, 0);
- if (offset == 0x02 || offset == 0x0a || offset == 0x12 || offset == 0x1a) ret = pb_data_r(space, 0);
- if (offset == 0x03 || offset == 0x0b || offset == 0x13 || offset == 0x1b) ret = pb_ddr_r(space, 0);
+ if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) ret = pa_data_r();
+ if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) ret = pa_ddr_r();
+ if (offset == 0x02 || offset == 0x0a || offset == 0x12 || offset == 0x1a) ret = pb_data_r();
+ if (offset == 0x03 || offset == 0x0b || offset == 0x13 || offset == 0x1b) ret = pb_ddr_r();
- if (offset == 0x04 || offset == 0x06 || offset == 0x14 || offset == 0x16) ret = timer_off_r(space, 0);
- if (offset == 0x0c || offset == 0x0e || offset == 0x1c || offset == 0x1e) ret = timer_on_r(space, 0);
+ if (offset == 0x04 || offset == 0x06 || offset == 0x14 || offset == 0x16) ret = timer_off_r();
+ if (offset == 0x0c || offset == 0x0e || offset == 0x1c || offset == 0x1e) ret = timer_on_r();
- if (offset == 0x05 || offset == 0x07 || offset == 0x0d || offset == 0x0f) ret = irq_r(space, 0);
- if (offset == 0x15 || offset == 0x17 || offset == 0x1d || offset == 0x1f) ret = irq_r(space, 0);
+ if (offset == 0x05 || offset == 0x07 || offset == 0x0d || offset == 0x0f) ret = irq_r();
+ if (offset == 0x15 || offset == 0x17 || offset == 0x1d || offset == 0x1f) ret = irq_r();
return ret;
}
-WRITE8_MEMBER(mos6532_new_device::io_w)
+void mos6532_new_device::io_w(offs_t offset, uint8_t data)
{
offset &= 0x1f;
- if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) pa_data_w(space, 0, data);
- if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) pa_ddr_w(space, 0, data);
- if (offset == 0x02 || offset == 0x0a || offset == 0x12 || offset == 0x1a) pb_data_w(space, 0, data);
- if (offset == 0x03 || offset == 0x0b || offset == 0x13 || offset == 0x1b) pb_ddr_w(space, 0, data);
- if (offset == 0x14 || offset == 0x15 || offset == 0x16 || offset == 0x17) timer_off_w(space, offset&3, data);
- if (offset == 0x1c || offset == 0x1d || offset == 0x1e || offset == 0x1f) timer_on_w(space, offset&3, data);
+ if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) pa_data_w(data);
+ if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) pa_ddr_w(data);
+ if (offset == 0x02 || offset == 0x0a || offset == 0x12 || offset == 0x1a) pb_data_w(data);
+ if (offset == 0x03 || offset == 0x0b || offset == 0x13 || offset == 0x1b) pb_ddr_w(data);
+ if (offset == 0x14 || offset == 0x15 || offset == 0x16 || offset == 0x17) timer_off_w(offset&3, data);
+ if (offset == 0x1c || offset == 0x1d || offset == 0x1e || offset == 0x1f) timer_on_w(offset&3, data);
- if (offset == 0x04 || offset == 0x05 || offset == 0x06 || offset == 0x07) edge_w(space, offset&3, data);
- if (offset == 0x0c || offset == 0x0d || offset == 0xea || offset == 0x0f) edge_w(space, offset&3, data);
+ if (offset == 0x04 || offset == 0x05 || offset == 0x06 || offset == 0x07) edge_w(data);
+ if (offset == 0x0c || offset == 0x0d || offset == 0xea || offset == 0x0f) edge_w(data);
}
@@ -452,7 +452,7 @@ void mos6530_device_base::pb_w(int bit, int state)
// pa_data_r -
//-------------------------------------------------
-READ8_MEMBER( mos6530_device_base::pa_data_r )
+uint8_t mos6530_device_base::pa_data_r()
{
uint8_t in = 0;
@@ -487,7 +487,7 @@ READ8_MEMBER( mos6530_device_base::pa_data_r )
// pa_data_w -
//-------------------------------------------------
-WRITE8_MEMBER( mos6530_device_base::pa_data_w )
+void mos6530_device_base::pa_data_w(uint8_t data)
{
m_pa_out = data;
@@ -502,7 +502,7 @@ WRITE8_MEMBER( mos6530_device_base::pa_data_w )
// pa_ddr_w -
//-------------------------------------------------
-WRITE8_MEMBER( mos6530_device_base::pa_ddr_w )
+void mos6530_device_base::pa_ddr_w(uint8_t data)
{
m_pa_ddr = data;
@@ -517,7 +517,7 @@ WRITE8_MEMBER( mos6530_device_base::pa_ddr_w )
// pb_data_r -
//-------------------------------------------------
-READ8_MEMBER( mos6530_device_base::pb_data_r )
+uint8_t mos6530_device_base::pb_data_r()
{
uint8_t in = 0;
@@ -552,7 +552,7 @@ READ8_MEMBER( mos6530_device_base::pb_data_r )
// pb_data_w -
//-------------------------------------------------
-WRITE8_MEMBER( mos6530_device_base::pb_data_w )
+void mos6530_device_base::pb_data_w(uint8_t data)
{
m_pb_out = data;
@@ -566,7 +566,7 @@ WRITE8_MEMBER( mos6530_device_base::pb_data_w )
// pb_ddr_w -
//-------------------------------------------------
-WRITE8_MEMBER( mos6530_device_base::pb_ddr_w )
+void mos6530_device_base::pb_ddr_w(uint8_t data)
{
m_pb_ddr = data;
@@ -580,7 +580,7 @@ WRITE8_MEMBER( mos6530_device_base::pb_ddr_w )
// timer_r -
//-------------------------------------------------
-READ8_MEMBER( mos6530_device_base::timer_off_r )
+uint8_t mos6530_device_base::timer_off_r()
{
if (machine().side_effects_disabled())
return 0;
@@ -588,7 +588,7 @@ READ8_MEMBER( mos6530_device_base::timer_off_r )
return timer_r(false);
}
-READ8_MEMBER( mos6530_device_base::timer_on_r )
+uint8_t mos6530_device_base::timer_on_r()
{
if (machine().side_effects_disabled())
return 0;
@@ -623,7 +623,7 @@ uint8_t mos6530_device_base::timer_r(bool ie)
// irq_r -
//-------------------------------------------------
-READ8_MEMBER( mos6530_device_base::irq_r )
+uint8_t mos6530_device_base::irq_r()
{
uint8_t data = get_irq_flags();
@@ -642,12 +642,12 @@ READ8_MEMBER( mos6530_device_base::irq_r )
// timer_w -
//-------------------------------------------------
-WRITE8_MEMBER( mos6530_device_base::timer_off_w )
+void mos6530_device_base::timer_off_w(offs_t offset, uint8_t data)
{
timer_w(offset, data, false);
}
-WRITE8_MEMBER( mos6530_device_base::timer_on_w )
+void mos6530_device_base::timer_on_w(offs_t offset, uint8_t data)
{
timer_w(offset, data, true);
}
@@ -688,7 +688,7 @@ void mos6530_device_base::timer_w(offs_t offset, uint8_t data, bool ie)
// edge_w -
//-------------------------------------------------
-WRITE8_MEMBER( mos6530_device_base::edge_w )
+void mos6530_device_base::edge_w(uint8_t data)
{
m_pa7_dir = BIT(data, 0);
m_ie_edge = BIT(data, 1) ? false : true;
diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h
index ca0ca1f1aa7..3a6a2289944 100644
--- a/src/devices/machine/mos6530n.h
+++ b/src/devices/machine/mos6530n.h
@@ -119,23 +119,23 @@ protected:
void timer_w(offs_t offset, uint8_t data, bool ie);
uint8_t timer_r(bool ie);
- DECLARE_READ8_MEMBER( rom_r ) { return m_rom[offset]; }
- DECLARE_READ8_MEMBER( ram_r ) { return m_ram[offset]; }
- DECLARE_WRITE8_MEMBER( ram_w ) { m_ram[offset] = data; }
- DECLARE_READ8_MEMBER( pa_data_r );
- DECLARE_WRITE8_MEMBER( pa_data_w );
- DECLARE_READ8_MEMBER( pb_data_r );
- DECLARE_WRITE8_MEMBER( pb_data_w );
- DECLARE_READ8_MEMBER( pa_ddr_r ) { return m_pa_ddr; }
- DECLARE_WRITE8_MEMBER( pa_ddr_w );
- DECLARE_READ8_MEMBER( pb_ddr_r ) { return m_pb_ddr; }
- DECLARE_WRITE8_MEMBER( pb_ddr_w );
- DECLARE_READ8_MEMBER( timer_off_r );
- DECLARE_READ8_MEMBER( timer_on_r );
- DECLARE_READ8_MEMBER( irq_r );
- DECLARE_WRITE8_MEMBER( timer_off_w );
- DECLARE_WRITE8_MEMBER( timer_on_w );
- DECLARE_WRITE8_MEMBER( edge_w );
+ uint8_t rom_r(offs_t offset) { return m_rom[offset]; }
+ uint8_t ram_r(offs_t offset) { return m_ram[offset]; }
+ void ram_w(offs_t offset, uint8_t data) { m_ram[offset] = data; }
+ uint8_t pa_data_r();
+ void pa_data_w(uint8_t data);
+ uint8_t pb_data_r();
+ void pb_data_w(uint8_t data);
+ uint8_t pa_ddr_r() { return m_pa_ddr; }
+ void pa_ddr_w(uint8_t data);
+ uint8_t pb_ddr_r() { return m_pb_ddr; }
+ void pb_ddr_w(uint8_t data);
+ uint8_t timer_off_r();
+ uint8_t timer_on_r();
+ uint8_t irq_r();
+ void timer_off_w(offs_t offset, uint8_t data);
+ void timer_on_w(offs_t offset, uint8_t data);
+ void edge_w(uint8_t data);
optional_shared_ptr<uint8_t> m_ram;
optional_region_ptr<uint8_t> m_rom;
@@ -225,8 +225,8 @@ public:
virtual void io_map(address_map &map);
// is there a better way to access the memory map when not using m()?
- DECLARE_READ8_MEMBER(io_r);
- DECLARE_WRITE8_MEMBER(io_w);
+ uint8_t io_r(offs_t offset);
+ void io_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/mos8706.cpp b/src/devices/machine/mos8706.cpp
index d3f8f42fa10..3ac0a976310 100644
--- a/src/devices/machine/mos8706.cpp
+++ b/src/devices/machine/mos8706.cpp
@@ -59,7 +59,7 @@ void mos8706_device::device_reset()
// read -
//-------------------------------------------------
-READ8_MEMBER( mos8706_device::read )
+uint8_t mos8706_device::read(offs_t offset)
{
return 0;
}
@@ -69,6 +69,6 @@ READ8_MEMBER( mos8706_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( mos8706_device::write )
+void mos8706_device::write(offs_t offset, uint8_t data)
{
}
diff --git a/src/devices/machine/mos8706.h b/src/devices/machine/mos8706.h
index a3a6247bf5a..a1d1a225e0e 100644
--- a/src/devices/machine/mos8706.h
+++ b/src/devices/machine/mos8706.h
@@ -40,8 +40,8 @@ class mos8706_device : public device_t
public:
mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/mpu401.cpp b/src/devices/machine/mpu401.cpp
index a07587be87e..0103e51ceca 100644
--- a/src/devices/machine/mpu401.cpp
+++ b/src/devices/machine/mpu401.cpp
@@ -153,28 +153,28 @@ void mpu401_device::device_timer(emu_timer &timer, device_timer_id tid, int para
m_ourcpu->m6801_clock_serial();
}
-READ8_MEMBER(mpu401_device::port1_r)
+uint8_t mpu401_device::port1_r()
{
return 0xff;
}
-WRITE8_MEMBER(mpu401_device::port1_w)
+void mpu401_device::port1_w(uint8_t data)
{
// printf("port1_w: %02x met %x syncout %x DSRD %d DRRD %d\n", data, data & 3, (data>>3) & 3, (data>>6) & 1, (data>>7) & 1);
}
-READ8_MEMBER(mpu401_device::port2_r)
+uint8_t mpu401_device::port2_r()
{
// printf("%s Read P2\n", machine().describe_context().c_str());
return m_port2;
}
-WRITE8_MEMBER(mpu401_device::port2_w)
+void mpu401_device::port2_w(uint8_t data)
{
// printf("port2_w: %02x SYCOUT %d SYCIN %d SRCK %d MIDI OUT %d\n", data, (data & 1), (data>>1) & 1, (data>>2) & 1, (data>>4) & 1);
}
-READ8_MEMBER(mpu401_device::mpu_r)
+uint8_t mpu401_device::mpu_r(offs_t offset)
{
// printf("mpu_r @ %d\n", offset);
@@ -190,7 +190,7 @@ READ8_MEMBER(mpu401_device::mpu_r)
}
}
-WRITE8_MEMBER(mpu401_device::mpu_w)
+void mpu401_device::mpu_w(offs_t offset, uint8_t data)
{
// printf("%02x to MPU-401 @ %d\n", data, offset);
m_command = data;
@@ -206,7 +206,7 @@ WRITE8_MEMBER(mpu401_device::mpu_w)
}
}
-READ8_MEMBER(mpu401_device::asic_r)
+uint8_t mpu401_device::asic_r(offs_t offset)
{
if (offset == 0)
{
@@ -221,7 +221,7 @@ READ8_MEMBER(mpu401_device::asic_r)
return 0xff;
}
-WRITE8_MEMBER(mpu401_device::asic_w)
+void mpu401_device::asic_w(offs_t offset, uint8_t data)
{
// printf("MPU401: %02x to gate array @ %d\n", data, offset);
@@ -234,7 +234,7 @@ WRITE8_MEMBER(mpu401_device::asic_w)
}
// MIDI receive
-WRITE_LINE_MEMBER( mpu401_device::midi_rx_w )
+void mpu401_device::midi_rx_w(int state)
{
if (state == ASSERT_LINE)
{
diff --git a/src/devices/machine/mpu401.h b/src/devices/machine/mpu401.h
index 1cd4583b454..6a51a8f3e91 100644
--- a/src/devices/machine/mpu401.h
+++ b/src/devices/machine/mpu401.h
@@ -20,8 +20,8 @@ public:
auto irq_cb() { return write_irq.bind(); }
// public API - call for reads/writes at I/O 330/331 on PC, C0n0/C0n1 on Apple II, etc.
- DECLARE_READ8_MEMBER(mpu_r);
- DECLARE_WRITE8_MEMBER(mpu_w);
+ uint8_t mpu_r(offs_t offset);
+ void mpu_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
@@ -32,14 +32,14 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
private:
- DECLARE_WRITE_LINE_MEMBER(midi_rx_w);
-
- DECLARE_READ8_MEMBER(asic_r);
- DECLARE_WRITE8_MEMBER(asic_w);
- DECLARE_READ8_MEMBER(port1_r);
- DECLARE_WRITE8_MEMBER(port1_w);
- DECLARE_READ8_MEMBER(port2_r);
- DECLARE_WRITE8_MEMBER(port2_w);
+ void midi_rx_w(int state);
+
+ uint8_t asic_r(offs_t offset);
+ void asic_w(offs_t offset, uint8_t data);
+ uint8_t port1_r();
+ void port1_w(uint8_t data);
+ uint8_t port2_r();
+ void port2_w(uint8_t data);
void mpu401_map(address_map &map);
diff --git a/src/devices/machine/msm6253.cpp b/src/devices/machine/msm6253.cpp
index 6653156c826..53a47b2152e 100644
--- a/src/devices/machine/msm6253.cpp
+++ b/src/devices/machine/msm6253.cpp
@@ -78,7 +78,7 @@ ioport_value msm6253_device::port_read()
// one of four internal latches
//-------------------------------------------------
-WRITE8_MEMBER(msm6253_device::address_w)
+void msm6253_device::address_w(offs_t offset, u8 data)
{
// fill the shift register from the internal A/D latch
m_shift_register = m_analog_input_cb[offset & 3]();
@@ -88,7 +88,7 @@ WRITE8_MEMBER(msm6253_device::address_w)
// select_w - write D0/D1 to address latch
//-------------------------------------------------
-WRITE8_MEMBER(msm6253_device::select_w)
+void msm6253_device::select_w(offs_t offset, u8 data)
{
// fill the shift register from the internal A/D latch
m_shift_register = m_analog_input_cb[data & 3]();
@@ -115,7 +115,7 @@ bool msm6253_device::shift_out()
// d0_r - shift data bit out to D0
//-------------------------------------------------
-READ8_MEMBER(msm6253_device::d0_r)
+u8 msm6253_device::d0_r(address_space &space)
{
// offset is ignored
return shift_out() | (space.unmap() & 0xfe);
@@ -125,7 +125,7 @@ READ8_MEMBER(msm6253_device::d0_r)
// d7_r - shift data bit out to D7
//-------------------------------------------------
-READ8_MEMBER(msm6253_device::d7_r)
+u8 msm6253_device::d7_r(address_space &space)
{
// offset is ignored
return (shift_out() << 7) | (space.unmap() & 0x7f);
diff --git a/src/devices/machine/msm6253.h b/src/devices/machine/msm6253.h
index 8830c7dc969..b784bb9aec3 100644
--- a/src/devices/machine/msm6253.h
+++ b/src/devices/machine/msm6253.h
@@ -42,13 +42,13 @@ public:
template <unsigned P, typename... T> void set_input_cb(T &&... args) { m_analog_input_cb[P].set(std::forward<T>(args)...); }
// write handlers
- WRITE8_MEMBER(address_w);
- WRITE8_MEMBER(select_w);
+ void address_w(offs_t offset, u8 data);
+ void select_w(offs_t offset, u8 data);
// read handlers
bool shift_out();
- READ8_MEMBER(d0_r);
- READ8_MEMBER(d7_r);
+ u8 d0_r(address_space &space);
+ u8 d7_r(address_space &space);
protected:
// device-level overrides
diff --git a/src/devices/machine/myb3k_kbd.cpp b/src/devices/machine/myb3k_kbd.cpp
index 9b4519cccb1..83ee8553373 100644
--- a/src/devices/machine/myb3k_kbd.cpp
+++ b/src/devices/machine/myb3k_kbd.cpp
@@ -338,6 +338,8 @@ myb3k_keyboard_device::myb3k_keyboard_device(
: device_t(mconfig, type, tag, owner, clock)
, m_keyboard_cb(*this)
, m_io_kbd_t(*this, "MYB3K_T%X", 0U)
+ , m_x(0)
+ , m_y(0)
{
}
diff --git a/src/devices/machine/nscsi_cb.h b/src/devices/machine/nscsi_cb.h
index 8a97b76c29f..5cc96b83862 100644
--- a/src/devices/machine/nscsi_cb.h
+++ b/src/devices/machine/nscsi_cb.h
@@ -26,29 +26,28 @@ public:
virtual void scsi_ctrl_changed() override;
uint8_t read() { return scsi_bus->data_r(); }
- DECLARE_READ8_MEMBER( read ) { return read(); }
+
void write(uint8_t data) { scsi_bus->data_w(scsi_refid, data); }
- DECLARE_WRITE8_MEMBER( write ) { write(data); }
- DECLARE_READ_LINE_MEMBER( rst_r ) { return (m_ctrl & S_RST) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( atn_r ) { return (m_ctrl & S_ATN) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( ack_r ) { return (m_ctrl & S_ACK) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( req_r ) { return (m_ctrl & S_REQ) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( msg_r ) { return (m_ctrl & S_MSG) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( io_r ) { return (m_ctrl & S_INP) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( cd_r ) { return (m_ctrl & S_CTL) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( sel_r ) { return (m_ctrl & S_SEL) ? 1 : 0; }
- DECLARE_READ_LINE_MEMBER( bsy_r ) { return (m_ctrl & S_BSY) ? 1 : 0; }
+ int rst_r() { return (m_ctrl & S_RST) ? 1 : 0; }
+ int atn_r() { return (m_ctrl & S_ATN) ? 1 : 0; }
+ int ack_r() { return (m_ctrl & S_ACK) ? 1 : 0; }
+ int req_r() { return (m_ctrl & S_REQ) ? 1 : 0; }
+ int msg_r() { return (m_ctrl & S_MSG) ? 1 : 0; }
+ int io_r() { return (m_ctrl & S_INP) ? 1 : 0; }
+ int cd_r() { return (m_ctrl & S_CTL) ? 1 : 0; }
+ int sel_r() { return (m_ctrl & S_SEL) ? 1 : 0; }
+ int bsy_r() { return (m_ctrl & S_BSY) ? 1 : 0; }
- DECLARE_WRITE_LINE_MEMBER( rst_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_RST : 0, S_RST); }
- DECLARE_WRITE_LINE_MEMBER( atn_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_ATN : 0, S_ATN); }
- DECLARE_WRITE_LINE_MEMBER( ack_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_ACK : 0, S_ACK); }
- DECLARE_WRITE_LINE_MEMBER( req_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_REQ : 0, S_REQ); }
- DECLARE_WRITE_LINE_MEMBER( msg_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_MSG : 0, S_MSG); }
- DECLARE_WRITE_LINE_MEMBER( io_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_INP : 0, S_INP); }
- DECLARE_WRITE_LINE_MEMBER( cd_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_CTL : 0, S_CTL); }
- DECLARE_WRITE_LINE_MEMBER( sel_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_SEL : 0, S_SEL); }
- DECLARE_WRITE_LINE_MEMBER( bsy_w ) { scsi_bus->ctrl_w(scsi_refid, state ? S_BSY : 0, S_BSY); }
+ void rst_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_RST : 0, S_RST); }
+ void atn_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_ATN : 0, S_ATN); }
+ void ack_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_ACK : 0, S_ACK); }
+ void req_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_REQ : 0, S_REQ); }
+ void msg_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_MSG : 0, S_MSG); }
+ void io_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_INP : 0, S_INP); }
+ void cd_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_CTL : 0, S_CTL); }
+ void sel_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_SEL : 0, S_SEL); }
+ void bsy_w(int state) { scsi_bus->ctrl_w(scsi_refid, state ? S_BSY : 0, S_BSY); }
protected:
virtual void device_start() override;
diff --git a/src/devices/machine/pc_fdc.cpp b/src/devices/machine/pc_fdc.cpp
index 8f48da0f505..69048e4e32d 100644
--- a/src/devices/machine/pc_fdc.cpp
+++ b/src/devices/machine/pc_fdc.cpp
@@ -109,7 +109,7 @@ void pc_fdc_family_device::device_reset()
// Bit 4-7 control the drive motors
-WRITE8_MEMBER( pc_fdc_family_device::dor_w )
+void pc_fdc_family_device::dor_w(uint8_t data)
{
LOG("dor = %02x\n", data);
uint8_t pdor = dor;
@@ -131,17 +131,17 @@ WRITE8_MEMBER( pc_fdc_family_device::dor_w )
fdc->reset();
}
-READ8_MEMBER( pc_fdc_family_device::dor_r )
+uint8_t pc_fdc_family_device::dor_r()
{
return dor;
}
-READ8_MEMBER( pc_fdc_family_device::dir_r )
+uint8_t pc_fdc_family_device::dir_r()
{
return do_dir_r();
}
-WRITE8_MEMBER( pc_fdc_family_device::ccr_w )
+void pc_fdc_family_device::ccr_w(uint8_t data)
{
static const int rates[4] = { 500000, 300000, 250000, 1000000 };
LOG("ccr = %02x\n", data);
@@ -155,19 +155,19 @@ uint8_t pc_fdc_family_device::do_dir_r()
return 0x00;
}
-WRITE8_MEMBER( pc_fdc_xt_device::dor_fifo_w)
+void pc_fdc_xt_device::dor_fifo_w(uint8_t data)
{
fdc->fifo_w(data);
- dor_w(space, 0, data, mem_mask);
+ dor_w(data);
}
-WRITE_LINE_MEMBER( pc_fdc_family_device::irq_w )
+void pc_fdc_family_device::irq_w(int state)
{
fdc_irq = state;
check_irq();
}
-WRITE_LINE_MEMBER( pc_fdc_family_device::drq_w )
+void pc_fdc_family_device::drq_w(int state)
{
fdc_drq = state;
check_drq();
diff --git a/src/devices/machine/pc_fdc.h b/src/devices/machine/pc_fdc.h
index 351542ed881..56438d01499 100644
--- a/src/devices/machine/pc_fdc.h
+++ b/src/devices/machine/pc_fdc.h
@@ -26,10 +26,10 @@ public:
virtual void dma_w(uint8_t data) override;
virtual uint8_t do_dir_r() override;
- READ8_MEMBER(dor_r);
- WRITE8_MEMBER(dor_w);
- READ8_MEMBER(dir_r);
- WRITE8_MEMBER(ccr_w);
+ uint8_t dor_r();
+ void dor_w(uint8_t data);
+ uint8_t dir_r();
+ void ccr_w(uint8_t data);
required_device<upd765a_device> fdc;
@@ -41,8 +41,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
private:
- DECLARE_WRITE_LINE_MEMBER( irq_w );
- DECLARE_WRITE_LINE_MEMBER( drq_w );
+ void irq_w(int state);
+ void drq_w(int state);
bool irq, drq, fdc_drq, fdc_irq;
devcb_write_line intrq_cb, drq_cb;
@@ -59,7 +59,7 @@ public:
pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void map(address_map &map) override;
- WRITE8_MEMBER(dor_fifo_w);
+ void dor_fifo_w(uint8_t data);
};
class pc_fdc_at_device : public pc_fdc_family_device {
diff --git a/src/devices/machine/pc_lpt.cpp b/src/devices/machine/pc_lpt.cpp
index 0d43fbc6eeb..26d2357a72b 100644
--- a/src/devices/machine/pc_lpt.cpp
+++ b/src/devices/machine/pc_lpt.cpp
@@ -77,29 +77,29 @@ void pc_lpt_device::device_add_mconfig(machine_config &config)
}
-READ8_MEMBER( pc_lpt_device::data_r )
+uint8_t pc_lpt_device::data_r()
{
// pull up mechanism for input lines, zeros are provided by peripheral
return m_data & m_cent_data_in->read();
}
-WRITE8_MEMBER( pc_lpt_device::data_w )
+void pc_lpt_device::data_w(uint8_t data)
{
m_data = data;
m_cent_data_out->write(m_data);
}
-READ8_MEMBER( pc_lpt_device::status_r )
+uint8_t pc_lpt_device::status_r()
{
return m_cent_status_in->read() ^ STATUS_BUSY;
}
-READ8_MEMBER( pc_lpt_device::control_r )
+uint8_t pc_lpt_device::control_r()
{
return ~((m_control & m_cent_ctrl_in->read() & 0x3f) ^ CONTROL_INIT);
}
-WRITE8_MEMBER( pc_lpt_device::control_w )
+void pc_lpt_device::control_w(uint8_t data)
{
// logerror("pc_lpt_control_w: 0x%02x\n", data);
@@ -107,13 +107,13 @@ WRITE8_MEMBER( pc_lpt_device::control_w )
m_cent_ctrl_out->write(m_control);
}
-READ8_MEMBER( pc_lpt_device::read )
+uint8_t pc_lpt_device::read(offs_t offset)
{
switch (offset)
{
- case 0: return data_r(space, 0);
- case 1: return status_r(space, 0);
- case 2: return control_r(space, 0);
+ case 0: return data_r();
+ case 1: return status_r();
+ case 2: return control_r();
}
/* if we reach this its an error */
@@ -122,13 +122,13 @@ READ8_MEMBER( pc_lpt_device::read )
return 0xff;
}
-WRITE8_MEMBER( pc_lpt_device::write )
+void pc_lpt_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
- case 0: data_w(space, 0, data); break;
+ case 0: data_w(data); break;
case 1: break;
- case 2: control_w(space, 0, data); break;
+ case 2: control_w(data); break;
}
}
@@ -147,13 +147,13 @@ void pc_lpt_device::update_irq()
}
}
-WRITE_LINE_MEMBER( pc_lpt_device::write_irq_enabled )
+void pc_lpt_device::write_irq_enabled(int state)
{
m_irq_enabled = state;
update_irq();
}
-WRITE_LINE_MEMBER( pc_lpt_device::write_centronics_ack )
+void pc_lpt_device::write_centronics_ack(int state)
{
m_centronics_ack = state;
m_cent_status_in->write_bit6(state);
diff --git a/src/devices/machine/pc_lpt.h b/src/devices/machine/pc_lpt.h
index 72677832926..911c657baa4 100644
--- a/src/devices/machine/pc_lpt.h
+++ b/src/devices/machine/pc_lpt.h
@@ -26,14 +26,14 @@ public:
// configuration helpers
auto irq_handler() { return m_irq_handler.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER( data_r );
- DECLARE_WRITE8_MEMBER( data_w );
- DECLARE_READ8_MEMBER( status_r );
- DECLARE_READ8_MEMBER( control_r );
- DECLARE_WRITE8_MEMBER( control_w );
+ uint8_t data_r();
+ void data_w(uint8_t data);
+ uint8_t status_r();
+ uint8_t control_r( );
+ void control_w(uint8_t data);
protected:
// device-level overrides
@@ -43,8 +43,8 @@ protected:
private:
void update_irq();
- DECLARE_WRITE_LINE_MEMBER( write_irq_enabled );
- DECLARE_WRITE_LINE_MEMBER( write_centronics_ack );
+ void write_irq_enabled(int state);
+ void write_centronics_ack(int state);
enum
{
diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp
index 29559c3cde9..61bc1c5ce0e 100644
--- a/src/devices/machine/pckeybrd.cpp
+++ b/src/devices/machine/pckeybrd.cpp
@@ -360,7 +360,7 @@ void at_keyboard_device::device_reset()
m_leds[1] = 0;
}
-WRITE_LINE_MEMBER(pc_keyboard_device::enable)
+void pc_keyboard_device::enable(int state)
{
if(state && !m_on)
{
@@ -614,7 +614,7 @@ void pc_keyboard_device::polling(void)
}
}
-READ8_MEMBER(pc_keyboard_device::read)
+uint8_t pc_keyboard_device::read()
{
int data;
if (m_tail == m_head)
@@ -688,7 +688,7 @@ Note: each command is acknowledged by FAh (ACK), if not mentioned otherwise.
SeeAlso: #P046
*/
-WRITE8_MEMBER(at_keyboard_device::write)
+void at_keyboard_device::write(uint8_t data)
{
if (LOG_KEYBOARD)
logerror("keyboard write %.2x\n",data);
@@ -775,7 +775,7 @@ WRITE8_MEMBER(at_keyboard_device::write)
if (data & 0x080)
{
/* command received instead of code - execute command */
- write(space, offset, data);
+ write(data);
}
else
{
@@ -799,7 +799,7 @@ WRITE8_MEMBER(at_keyboard_device::write)
if (data & 0x080)
{
/* command received instead of code - execute command */
- write(space, offset, data);
+ write(data);
}
else
{
@@ -830,7 +830,7 @@ WRITE8_MEMBER(at_keyboard_device::write)
if (data & 0x080)
{
/* command received instead of code - execute command */
- write(space, offset, data);
+ write(data);
}
else
{
diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h
index 42a443226f5..ce3d5610ce6 100644
--- a/src/devices/machine/pckeybrd.h
+++ b/src/devices/machine/pckeybrd.h
@@ -22,8 +22,8 @@ class pc_keyboard_device : public device_t
public:
pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE_LINE_MEMBER(enable);
+ uint8_t read();
+ void enable(int state);
auto keypress() { return m_out_keypress_func.bind(); }
@@ -84,7 +84,7 @@ public:
at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- DECLARE_WRITE8_MEMBER( write );
+ void write(uint8_t data);
void set_type(KEYBOARD_TYPE type, int default_set) { m_scan_code_set = default_set; m_type = type; }
diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp
index 20b0c627dc5..cf23be8eaa5 100644
--- a/src/devices/machine/pdc.cpp
+++ b/src/devices/machine/pdc.cpp
@@ -339,10 +339,6 @@ void pdc_device::device_start()
save_item(NAME(reg_p21));
save_item(NAME(reg_p38));
save_item(NAME(fdd_68k_dma_address));
-
- /* Resolve callbacks */
- m_m68k_r_cb.resolve_safe(0);
- m_m68k_w_cb.resolve_safe();
}
//-------------------------------------------------
@@ -366,43 +362,43 @@ void pdc_device::device_reset()
// I8237 DMA
//-------------------------------------------------
-WRITE_LINE_MEMBER(pdc_device::i8237_hreq_w)
+void pdc_device::i8237_hreq_w(int state)
{
m_pdccpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
m_dma8237->hack_w(state);
}
-WRITE_LINE_MEMBER(pdc_device::i8237_eop_w)
+void pdc_device::i8237_eop_w(int state)
{
m_fdc->tc_w(state);
reg_p38 |= 4; /* ready for 68k ram DMA */
if(state) m_dma8237->dreq1_w(0);
}
-READ8_MEMBER(pdc_device::i8237_dma_mem_r)
+uint8_t pdc_device::i8237_dma_mem_r(offs_t offset)
{
return m_pdccpu->space(AS_PROGRAM).read_byte(offset);
}
-WRITE8_MEMBER(pdc_device::i8237_dma_mem_w)
+void pdc_device::i8237_dma_mem_w(offs_t offset, uint8_t data)
{
m_pdccpu->space(AS_PROGRAM).write_byte(offset,data);
}
-READ8_MEMBER(pdc_device::i8237_fdc_dma_r)
+uint8_t pdc_device::i8237_fdc_dma_r(offs_t offset)
{
uint8_t ret = m_fdc->dma_r();
if(TRACE_PDC_DMA) logerror("PDC: 8237 DMA CHANNEL 0 READ ADDRESS: %08X, DATA: %02X\n", offset, ret );
return ret;
}
-WRITE8_MEMBER(pdc_device::i8237_fdc_dma_w)
+void pdc_device::i8237_fdc_dma_w(offs_t offset, uint8_t data)
{
if(TRACE_PDC_DMA) logerror("PDC: 8237 DMA CHANNEL 0 WRITE ADDRESS: %08X, DATA: %02X\n", offset, data );
m_fdc->dma_w(data);
}
-READ8_MEMBER(pdc_device::m68k_dma_r)
+uint8_t pdc_device::m68k_dma_r()
{
uint32_t address;
uint8_t data;
@@ -413,23 +409,23 @@ READ8_MEMBER(pdc_device::m68k_dma_r)
return data;
}
-WRITE8_MEMBER(pdc_device::m68k_dma_w)
+void pdc_device::m68k_dma_w(uint8_t data)
{
if(TRACE_PDC_DMA) logerror("PDC: 8237 DMA CHANNEL 1 WRITE ADDRESS: %08X, DATA: %02X\n", fdd_68k_dma_address, data );
m_m68k_w_cb(data);
fdd_68k_dma_address++;
}
-WRITE_LINE_MEMBER(pdc_device::hdd_irq)
+void pdc_device::hdd_irq(int state)
{
m_pdccpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
}
-WRITE_LINE_MEMBER(pdc_device::fdc_irq)
+void pdc_device::fdc_irq(int state)
{
b_fdc_irq = state != 0;
}
-READ8_MEMBER(pdc_device::p0_7_r)
+uint8_t pdc_device::p0_7_r(offs_t offset)
{
switch(offset)
{
@@ -457,7 +453,7 @@ READ8_MEMBER(pdc_device::p0_7_r)
}
}
-WRITE8_MEMBER(pdc_device::p0_7_w)
+void pdc_device::p0_7_w(offs_t offset, uint8_t data)
{
switch(offset)
{
@@ -477,7 +473,7 @@ WRITE8_MEMBER(pdc_device::p0_7_w)
}
}
-READ8_MEMBER(pdc_device::fdd_68k_r)
+uint8_t pdc_device::fdd_68k_r(offs_t offset)
{
uint8_t address = offset + 0x21;
switch(address)
@@ -487,7 +483,7 @@ READ8_MEMBER(pdc_device::fdd_68k_r)
return 0;
}
}
-WRITE8_MEMBER(pdc_device::fdd_68k_w)
+void pdc_device::fdd_68k_w(offs_t offset, uint8_t data)
{
uint8_t address = offset + 0x21;
switch(address)
@@ -533,21 +529,21 @@ WRITE8_MEMBER(pdc_device::fdd_68k_w)
}
}
-WRITE8_MEMBER(pdc_device::p38_w)
+void pdc_device::p38_w(uint8_t data)
{
if(TRACE_PDC_CMD) logerror("PDC: Port 0x38 WRITE: %i\n", data);
//reg_p38 |= data;
reg_p38 = data;
}
-READ8_MEMBER(pdc_device::p38_r)
+uint8_t pdc_device::p38_r()
{
reg_p38 ^= 0x20; /* Invert bit 5 (32) */
if(TRACE_PDC_CMD) logerror("PDC: Port 0x38 READ: %02X %s\n", reg_p38, machine().describe_context());
return reg_p38;
}
-READ8_MEMBER(pdc_device::p39_r)
+uint8_t pdc_device::p39_r()
{
uint8_t data = 1;
if(b_fdc_irq) data |= 8; // Set bit 3
@@ -555,7 +551,7 @@ READ8_MEMBER(pdc_device::p39_r)
return data;
}
-WRITE8_MEMBER(pdc_device::p50_5f_w)
+void pdc_device::p50_5f_w(offs_t offset, uint8_t data)
{
uint8_t address = 0x50 + offset;
switch(address)
diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h
index df205ae0b29..a80b97c5fa8 100644
--- a/src/devices/machine/pdc.h
+++ b/src/devices/machine/pdc.h
@@ -41,7 +41,7 @@ public:
auto m68k_w_callback() { return m_m68k_w_cb.bind(); }
/* Read and Write members */
- DECLARE_WRITE_LINE_MEMBER(hdd_irq);
+ void hdd_irq(int state);
/* Main CPU accessible registers */
uint8_t reg_p0;
@@ -66,27 +66,27 @@ protected:
virtual const tiny_rom_entry *device_rom_region() const override;
private:
- DECLARE_WRITE_LINE_MEMBER(i8237_hreq_w);
- DECLARE_WRITE_LINE_MEMBER(i8237_eop_w);
- DECLARE_READ8_MEMBER(i8237_dma_mem_r);
- DECLARE_WRITE8_MEMBER(i8237_dma_mem_w);
- DECLARE_READ8_MEMBER(i8237_fdc_dma_r);
- DECLARE_WRITE8_MEMBER(i8237_fdc_dma_w);
+ void i8237_hreq_w(int state);
+ void i8237_eop_w(int state);
+ uint8_t i8237_dma_mem_r(offs_t offset);
+ void i8237_dma_mem_w(offs_t offset, uint8_t data);
+ uint8_t i8237_fdc_dma_r(offs_t offset);
+ void i8237_fdc_dma_w(offs_t offset, uint8_t data);
- DECLARE_READ8_MEMBER(m68k_dma_r);
- DECLARE_WRITE8_MEMBER(m68k_dma_w);
+ uint8_t m68k_dma_r();
+ void m68k_dma_w(uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(fdc_irq);
+ void fdc_irq(int state);
DECLARE_FLOPPY_FORMATS( floppy_formats );
- DECLARE_READ8_MEMBER(p0_7_r);
- DECLARE_WRITE8_MEMBER(p0_7_w);
- DECLARE_READ8_MEMBER(fdd_68k_r);
- DECLARE_WRITE8_MEMBER(fdd_68k_w);
- DECLARE_WRITE8_MEMBER(p38_w);
- DECLARE_READ8_MEMBER(p38_r);
- DECLARE_READ8_MEMBER(p39_r);
- DECLARE_WRITE8_MEMBER(p50_5f_w);
+ uint8_t p0_7_r(offs_t offset);
+ void p0_7_w(offs_t offset, uint8_t data);
+ uint8_t fdd_68k_r(offs_t offset);
+ void fdd_68k_w(offs_t offset, uint8_t data);
+ void p38_w(uint8_t data);
+ uint8_t p38_r();
+ uint8_t p39_r();
+ void p50_5f_w(offs_t offset, uint8_t data);
void pdc_io(address_map &map);
void pdc_mem(address_map &map);
diff --git a/src/devices/machine/r10696.cpp b/src/devices/machine/r10696.cpp
index 1f6dd022aab..ce9140ef7d5 100644
--- a/src/devices/machine/r10696.cpp
+++ b/src/devices/machine/r10696.cpp
@@ -80,7 +80,7 @@ void r10696_device::device_reset()
*
*************************************/
-WRITE8_MEMBER( r10696_device::io_w )
+void r10696_device::io_w(offs_t offset, uint8_t data)
{
assert(offset < 16);
const uint8_t io_a = m_io_a;
@@ -128,7 +128,7 @@ WRITE8_MEMBER( r10696_device::io_w )
}
-READ8_MEMBER( r10696_device::io_r )
+uint8_t r10696_device::io_r(offs_t offset)
{
assert(offset < 16);
uint8_t io_a, io_b, io_c;
diff --git a/src/devices/machine/r10696.h b/src/devices/machine/r10696.h
index 17e0c4e1c84..4b5b7c91d87 100644
--- a/src/devices/machine/r10696.h
+++ b/src/devices/machine/r10696.h
@@ -26,8 +26,8 @@ class r10696_device : public device_t
public:
r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER ( io_r );
- DECLARE_WRITE8_MEMBER( io_w );
+ uint8_t io_r(offs_t offset);
+ void io_w(offs_t offset, uint8_t data);
/* Set the read and write group (4-bit; nibble) delegates */
auto iord_cb() { return m_iord.bind(); }
diff --git a/src/devices/machine/r10788.cpp b/src/devices/machine/r10788.cpp
index 95b23c9ec9b..c273c70a4ee 100644
--- a/src/devices/machine/r10788.cpp
+++ b/src/devices/machine/r10788.cpp
@@ -135,7 +135,7 @@ void r10788_device::device_timer(emu_timer &timer, device_timer_id id, int param
*
*************************************/
-WRITE8_MEMBER( r10788_device::io_w )
+void r10788_device::io_w(offs_t offset, uint8_t data)
{
assert(offset < 16);
switch (offset)
@@ -180,7 +180,7 @@ WRITE8_MEMBER( r10788_device::io_w )
}
-READ8_MEMBER( r10788_device::io_r )
+uint8_t r10788_device::io_r(offs_t offset)
{
assert(offset < 16);
uint8_t data = 0xf;
diff --git a/src/devices/machine/r10788.h b/src/devices/machine/r10788.h
index ef783cb5a2d..6b1214328d2 100644
--- a/src/devices/machine/r10788.h
+++ b/src/devices/machine/r10788.h
@@ -36,8 +36,8 @@ public:
KER = 0x6 //!< Reset Keyboard Error
};
- DECLARE_READ8_MEMBER ( io_r );
- DECLARE_WRITE8_MEMBER( io_w );
+ uint8_t io_r(offs_t offset);
+ void io_w(offs_t offset, uint8_t data);
auto update_cb() { return m_display.bind(); } /* Set the writer used to update a display digit */
diff --git a/src/devices/machine/ra17xx.cpp b/src/devices/machine/ra17xx.cpp
index d45dec77e91..66fc3163da5 100644
--- a/src/devices/machine/ra17xx.cpp
+++ b/src/devices/machine/ra17xx.cpp
@@ -93,7 +93,7 @@ void ra17xx_device::device_reset()
*
*************************************/
-WRITE8_MEMBER( ra17xx_device::io_w )
+void ra17xx_device::io_w(address_space &space, offs_t offset, uint8_t data)
{
assert(offset < 16);
@@ -138,7 +138,7 @@ WRITE8_MEMBER( ra17xx_device::io_w )
}
-READ8_MEMBER( ra17xx_device::io_r )
+uint8_t ra17xx_device::io_r(offs_t offset)
{
assert(offset < 16);
return (m_bl >= 16 || (m_iord(m_bl) & 1)) ? 0x0f : 0x07;
diff --git a/src/devices/machine/ra17xx.h b/src/devices/machine/ra17xx.h
index 1523c8d0b15..11020778f8e 100644
--- a/src/devices/machine/ra17xx.h
+++ b/src/devices/machine/ra17xx.h
@@ -25,8 +25,8 @@ class ra17xx_device : public device_t
public:
ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_READ8_MEMBER ( io_r );
- DECLARE_WRITE8_MEMBER( io_w );
+ uint8_t io_r(offs_t offset);
+ void io_w(address_space &space, offs_t offset, uint8_t data);
auto iord_cb() { return m_iord.bind(); }
auto iowr_cb() { return m_iowr.bind(); }
diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp
index 6bbc68be94e..67850396213 100644
--- a/src/devices/machine/rp5c01.cpp
+++ b/src/devices/machine/rp5c01.cpp
@@ -310,7 +310,7 @@ void rp5c01_device::nvram_write(emu_file &file)
// read -
//-------------------------------------------------
-READ8_MEMBER( rp5c01_device::read )
+uint8_t rp5c01_device::read(offs_t offset)
{
uint8_t data = 0;
offset &= 0x0f;
@@ -355,7 +355,7 @@ READ8_MEMBER( rp5c01_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( rp5c01_device::write )
+void rp5c01_device::write(offs_t offset, uint8_t data)
{
data &= 0x0f;
offset &= 0x0f;
diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h
index 19f2711c67a..a638d5df145 100644
--- a/src/devices/machine/rp5c01.h
+++ b/src/devices/machine/rp5c01.h
@@ -43,10 +43,10 @@ public:
auto out_alarm_callback() { return m_out_alarm_cb.bind(); }
void remove_battery() { m_battery_backed = false; }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ_LINE_MEMBER( alarm_r ) { return m_alarm; }
- DECLARE_WRITE_LINE_MEMBER( adj_w ) { if (state) adjust_seconds(); }
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
+ int alarm_r() { return m_alarm; }
+ void adj_w(int state) { if (state) adjust_seconds(); }
protected:
// construction/destruction
diff --git a/src/devices/machine/rp5c15.cpp b/src/devices/machine/rp5c15.cpp
index 7d9b3b9b320..78d71d42000 100644
--- a/src/devices/machine/rp5c15.cpp
+++ b/src/devices/machine/rp5c15.cpp
@@ -293,7 +293,7 @@ void rp5c15_device::rtc_clock_updated(int year, int month, int day, int day_of_w
// read -
//-------------------------------------------------
-READ8_MEMBER( rp5c15_device::read )
+uint8_t rp5c15_device::read(offs_t offset)
{
uint8_t data = 0;
offset &= 0x0f;
@@ -324,7 +324,7 @@ READ8_MEMBER( rp5c15_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( rp5c15_device::write )
+void rp5c15_device::write(offs_t offset, uint8_t data)
{
data &= 0x0f;
offset &= 0x0f;
diff --git a/src/devices/machine/rp5c15.h b/src/devices/machine/rp5c15.h
index 156393fc4da..6d4e161ac3e 100644
--- a/src/devices/machine/rp5c15.h
+++ b/src/devices/machine/rp5c15.h
@@ -35,8 +35,8 @@ public:
auto alarm() { return m_out_alarm_cb.bind(); }
auto clkout() { return m_out_clkout_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp
index 3d29e76b099..ddc46adf81c 100644
--- a/src/devices/machine/s2636.cpp
+++ b/src/devices/machine/s2636.cpp
@@ -405,7 +405,7 @@ void s2636_device::render_next_line()
// bus access handlers
//-------------------------------------------------
-READ8_MEMBER( s2636_device::read_data )
+uint8_t s2636_device::read_data(offs_t offset)
{
mask_offset(offset);
uint8_t data = m_registers[offset];
@@ -424,7 +424,7 @@ READ8_MEMBER( s2636_device::read_data )
return data;
}
-WRITE8_MEMBER( s2636_device::write_data )
+void s2636_device::write_data(offs_t offset, uint8_t data)
{
mask_offset(offset);
@@ -434,7 +434,7 @@ WRITE8_MEMBER( s2636_device::write_data )
m_registers[offset] = data;
}
-WRITE_LINE_MEMBER( s2636_device::write_intack )
+void s2636_device::write_intack(int state)
{
assert((ASSERT_LINE == state) || (HOLD_LINE == state) || (CLEAR_LINE == state));
diff --git a/src/devices/machine/s2636.h b/src/devices/machine/s2636.h
index befa3cd9e56..bc82ed68903 100644
--- a/src/devices/machine/s2636.h
+++ b/src/devices/machine/s2636.h
@@ -48,10 +48,10 @@ public:
void render_first_line();
void render_next_line();
- DECLARE_READ8_MEMBER( read_data );
- DECLARE_WRITE8_MEMBER( write_data );
+ uint8_t read_data(offs_t offset);
+ void write_data(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER( write_intack );
+ void write_intack(int state);
protected:
// device-level overrides
diff --git a/src/devices/machine/s_smp.cpp b/src/devices/machine/s_smp.cpp
new file mode 100644
index 00000000000..d71b0449f65
--- /dev/null
+++ b/src/devices/machine/s_smp.cpp
@@ -0,0 +1,321 @@
+// license:LGPL-2.1+
+// copyright-holders:R. Belmont, Brad Martin
+/***************************************************************************
+
+ s_smp.cpp
+
+ File to handle the S-SMP emulation used in Nintendo Super NES.
+
+ By R. Belmont, adapted from OpenSPC 0.3.99 by Brad Martin with permission.
+ Thanks to Brad and also to Charles Bilyu? of SNeESe.
+
+ OpenSPC's license terms (the LGPL) follow:
+
+ ---------------------------------------------------------------------------
+
+ Copyright Brad Martin.
+
+ OpenSPC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ OpenSPC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "s_smp.h"
+
+/***************************************************************************
+ CONSTANTS AND MACROS
+***************************************************************************/
+
+
+// Nintendo/Sony S-SMP internal ROM region
+ROM_START( s_smp )
+ ROM_REGION( 0x40, "sound_ipl", 0 ) /* IPL ROM */
+ ROM_LOAD( "spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) /* boot rom */
+ROM_END
+
+
+void s_smp_device::internal_map(address_map &map)
+{
+ map(0x0000, 0x00ef).lrw8(
+ [this](offs_t offset) -> u8 { return data_read_byte(offset); }, "data_r",
+ [this](offs_t offset, u8 data) { data_write_byte(offset, data); }, "data_w");
+ map(0x00f0, 0x00ff).rw(FUNC(s_smp_device::io_r), FUNC(s_smp_device::io_w));
+ map(0x0100, 0xffff).lrw8(
+ [this](offs_t offset) -> u8 { return data_read_byte(offset + 0x100); }, "data_100_r",
+ [this](offs_t offset, u8 data) { data_write_byte(offset + 0x100, data); }, "data_100_w");
+}
+
+
+DEFINE_DEVICE_TYPE(S_SMP, s_smp_device, "s_smp", "Nintendo/Sony S-SMP")
+
+
+s_smp_device::s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : spc700_device(mconfig, S_SMP, tag, owner, clock, address_map_constructor(FUNC(s_smp_device::internal_map), this))
+ , m_data_config("data", ENDIANNESS_LITTLE, 8, 16)
+ , m_ipl_region(*this, "sound_ipl")
+ , m_dsp_io_r_cb(*this)
+ , m_dsp_io_w_cb(*this)
+{
+}
+
+
+//-------------------------------------------------
+// rom_region - return a pointer to the device's
+// internal ROM region
+//-------------------------------------------------
+
+const tiny_rom_entry *s_smp_device::device_rom_region() const
+{
+ return ROM_NAME( s_smp );
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void s_smp_device::device_start()
+{
+ m_dsp_io_r_cb.resolve_safe(0);
+ m_dsp_io_w_cb.resolve_safe();
+
+ m_data = &space(AS_DATA);
+ // Find our direct access
+ m_dcache = m_data->cache<0, 0, ENDIANNESS_LITTLE>();
+
+ m_tick_timer = timer_alloc(TIMER_TICK_ID);
+
+ save_item(NAME(m_timer_enabled));
+ save_item(NAME(m_subcounter));
+ save_item(NAME(m_counter));
+ save_item(NAME(m_port_in));
+ save_item(NAME(m_port_out));
+ save_item(NAME(m_test));
+ save_item(NAME(m_ctrl));
+ save_item(NAME(m_counter_reg));
+
+ save_item(NAME(m_TnDIV));
+ spc700_device::device_start();
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void s_smp_device::device_reset()
+{
+ int i;
+ /* default to ROM visible */
+ m_ctrl = 0x80;
+
+ /* Sort out the ports */
+ for (i = 0; i < 4; i++)
+ {
+ m_port_in[i] = 0;
+ m_port_out[i] = 0;
+ }
+
+ for (i = 0; i < 3; i++)
+ {
+ m_timer_enabled[i] = false;
+ m_TnDIV[i] = 256;
+ m_counter[i] = 0;
+ m_subcounter[i] = 0;
+ }
+
+ attotime period = attotime::from_ticks(32, clock());
+ m_tick_timer->adjust(period, 0, period);
+ spc700_device::device_reset();
+}
+
+//-------------------------------------------------
+// device_clock_changed - called if the clock
+// changes
+//-------------------------------------------------
+
+void s_smp_device::device_clock_changed()
+{
+ attotime period = attotime::from_ticks(32, clock());
+ m_tick_timer->adjust(period, 0, period);
+}
+
+//-------------------------------------------------
+// memory_space_config - return a description of
+// any address spaces owned by this device
+//-------------------------------------------------
+
+device_memory_interface::space_config_vector s_smp_device::memory_space_config() const
+{
+ return space_config_vector{
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
+inline void s_smp_device::update_timer_tick(u8 which)
+{
+ if (m_timer_enabled[which] == false)
+ return;
+
+ m_subcounter[which]++;
+
+ // if timer channel is 0 or 1 we update at 64000/8
+ if (m_subcounter[which] >= 8 || which == 2)
+ {
+ m_subcounter[which] = 0;
+ m_counter[which]++;
+ if (m_counter[which] >= m_TnDIV[which] ) // minus =
+ {
+ m_counter[which] = 0;
+ m_counter_reg[which]++;
+ m_counter_reg[which] &= 0x0f;
+ }
+ }
+}
+
+void s_smp_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+ if (id != TIMER_TICK_ID)
+ throw emu_fatalerror("Unknown id in s_smp_device::device_timer");
+
+ for (int ch = 0; ch < 3; ch++)
+ update_timer_tick(ch);
+}
+
+
+/*****************************************************************************
+ IMPLEMENTATION
+*****************************************************************************/
+
+
+/***************************
+ I/O for S-SMP
+ ***************************/
+
+u8 s_smp_device::io_r(offs_t offset)
+{
+ switch (offset) /* Offset is from 0x00f0 */
+ {
+ case 0x0: //FIXME: Super Bomberman PBW reads from there, is it really write-only?
+ return 0;
+ case 0x1:
+ return 0; //Super Kick Boxing reads port 1 and wants it to be zero.
+ case 0x2: /* Register address */
+ case 0x3: /* Register data */
+ return m_dsp_io_r_cb(offset - 0x2);
+ case 0x4: /* Port 0 */
+ case 0x5: /* Port 1 */
+ case 0x6: /* Port 2 */
+ case 0x7: /* Port 3 */
+ // osd_printf_debug("%s SPC: rd %02x @ %d\n", machine().describe_context(), m_port_in[offset - 4], offset - 4);
+ return m_port_in[offset - 4];
+ case 0x8: //normal RAM, can be read even if the ram disabled flag ($f0 bit 1) is active
+ case 0x9:
+ return data_read_byte(0xf0 + offset);
+ case 0xa: /* Timer 0 */
+ case 0xb: /* Timer 1 */
+ case 0xc: /* Timer 2 */
+ break;
+ case 0xd: /* Counter 0 */
+ case 0xe: /* Counter 1 */
+ case 0xf: /* Counter 2 */
+ {
+ u8 value = m_counter_reg[offset - 0xd] & 0x0f;
+ if (!machine().side_effects_disabled())
+ m_counter_reg[offset - 0xd] = 0;
+ return value;
+ }
+ }
+
+ return 0;
+}
+
+void s_smp_device::io_w(offs_t offset, u8 data)
+{
+ switch (offset) /* Offset is from 0x00f0 */
+ {
+ case 0x0:
+ m_test = data;
+ logerror("Warning: write to SOUND TEST register with data %02x!\n", data);
+ break;
+ case 0x1: /* Control */
+ m_ctrl = data;
+ for (int i = 0; i < 3; i++)
+ {
+ if (BIT(data, i) && m_timer_enabled[i] == false)
+ {
+ m_subcounter[i] = 0;
+ m_counter[i] = 0;
+ m_counter_reg[i] = 0;
+ }
+
+ m_timer_enabled[i] = BIT(data, i);
+ //m_timer[i]->enable(m_timer_enabled[i]);
+ }
+
+ if (BIT(data, 4))
+ {
+ m_port_in[0] = 0;
+ m_port_in[1] = 0;
+ }
+
+ if (BIT(data, 5))
+ {
+ m_port_in[2] = 0;
+ m_port_in[3] = 0;
+ }
+
+ /* bit 7 = IPL ROM enable */
+ break;
+ case 0x2: /* Register address */
+ case 0x3: /* Register data - 0x80-0xff is a read-only mirror of 0x00-0x7f */
+ m_dsp_io_w_cb(offset - 0x2, data);
+ break;
+ case 0x4: /* Port 0 */
+ case 0x5: /* Port 1 */
+ case 0x6: /* Port 2 */
+ case 0x7: /* Port 3 */
+ // osd_printf_debug("%s SPC: %02x to APU @ %d\n", machine().describe_context(), data, offset & 3);
+ m_port_out[offset - 4] = data;
+ // Unneeded, we already run at perfect_interleave
+ // machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
+ break;
+ case 0xa: /* Timer 0 */
+ case 0xb: /* Timer 1 */
+ case 0xc: /* Timer 2 */
+ // if 0 then TnDiv is divided by 256, otherwise it's divided by 1 to 255
+ if (data == 0)
+ m_TnDIV[offset - 0xa] = 256;
+ else
+ m_TnDIV[offset - 0xa] = data;
+ break;
+ case 0xd: /* Counter 0 */
+ case 0xe: /* Counter 1 */
+ case 0xf: /* Counter 2 */
+ return;
+ }
+
+ data_write_byte(0xf0 + offset, data);
+}
+
+
+u8 s_smp_device::spc_port_out_r(offs_t offset)
+{
+ assert(offset < 4);
+
+ return m_port_out[offset];
+}
+
+void s_smp_device::spc_port_in_w(offs_t offset, u8 data)
+{
+ assert(offset < 4);
+
+ m_port_in[offset] = data;
+}
diff --git a/src/devices/machine/s_smp.h b/src/devices/machine/s_smp.h
new file mode 100644
index 00000000000..5fe04b1880a
--- /dev/null
+++ b/src/devices/machine/s_smp.h
@@ -0,0 +1,90 @@
+// license:LGPL-2.1+
+// copyright-holders:R. Belmont, Brad Martin
+/*****************************************************************************
+ *
+ * Nintendo/Sony S-SMP emulation
+ *
+ ****************************************************************************/
+
+#ifndef MAME_MACHINE_S_SMP_H
+#define MAME_MACHINE_S_SMP_H
+
+#include "cpu/spc700/spc700.h"
+
+/***************************************************************************
+ TYPE DEFINITIONS
+ ***************************************************************************/
+
+class s_smp_device : public spc700_device
+{
+public:
+ s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+ auto dsp_io_read_callback() { return m_dsp_io_r_cb.bind(); }
+ auto dsp_io_write_callback() { return m_dsp_io_w_cb.bind(); }
+
+ u8 spc_port_out_r(offs_t offset);
+ void spc_port_in_w(offs_t offset, u8 data);
+
+protected:
+ tiny_rom_entry const *device_rom_region() const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_clock_changed() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ // device_memory_interface configuration
+ virtual space_config_vector memory_space_config() const override;
+
+ address_space_config m_data_config;
+
+private:
+ address_space *m_data;
+ memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_dcache;
+ inline u8 data_read_byte(offs_t a)
+ {
+ /* IPL ROM enabled */
+ if (a >= 0xffc0 && m_ctrl & 0x80)
+ return m_ipl_region[a & 0x3f];
+
+ return m_dcache->read_byte(a);
+ }
+ inline void data_write_byte(offs_t a, u8 d) { m_data->write_byte(a, d); }
+
+ required_region_ptr<u8> m_ipl_region; /* SPC top 64 bytes */
+
+ u8 io_r(offs_t offset);
+ void io_w(offs_t offset, u8 data);
+
+ enum
+ {
+ TIMER_TICK_ID = 1
+ };
+ /* timers */
+ emu_timer *m_tick_timer;
+ bool m_timer_enabled[3];
+ u16 m_counter[3];
+ u8 m_subcounter[3];
+ inline void update_timer_tick(u8 which);
+
+ /* IO ports */
+ u8 m_port_in[4]; /* SPC input ports */
+ u8 m_port_out[4]; /* SPC output ports */
+
+ u16 m_TnDIV[3]; /**< Timer N Divider */
+
+ // registers
+ u8 m_test;
+ u8 m_ctrl;
+ u8 m_counter_reg[3];
+
+ devcb_read8 m_dsp_io_r_cb;
+ devcb_write8 m_dsp_io_w_cb;
+
+ void internal_map(address_map &map);
+};
+
+DECLARE_DEVICE_TYPE(S_SMP, s_smp_device)
+
+
+#endif // MAME_MACHINE_S_SMP_H
diff --git a/src/devices/machine/scc2698b.cpp b/src/devices/machine/scc2698b.cpp
index 5be0dc9b08c..9dcc280fb20 100644
--- a/src/devices/machine/scc2698b.cpp
+++ b/src/devices/machine/scc2698b.cpp
@@ -342,11 +342,11 @@ void scc2698b_channel::recompute_pin_output(bool force)
-WRITE_LINE_MEMBER( scc2698b_channel::mpi0_w )
+void scc2698b_channel::mpi0_w(int state)
{
}
-WRITE_LINE_MEMBER( scc2698b_channel::mpi1_w )
+void scc2698b_channel::mpi1_w(int state)
{
}
@@ -434,19 +434,7 @@ void scc2698b_device::write_line_mpo(int port, int value)
logerror("Unsupported port %d in write_line_mpo\n", port);
}
-
-READ8_MEMBER(scc2698b_device::read)
-{
- return read_reg(offset);
-}
-
-WRITE8_MEMBER(scc2698b_device::write)
-{
- write_reg(offset, data);
-}
-
-
-uint8_t scc2698b_device::read_reg(int offset)
+uint8_t scc2698b_device::read(offs_t offset)
{
int device = (offset >> 4) & 3;
int reg = (offset & 15);
@@ -496,7 +484,7 @@ uint8_t scc2698b_device::read_reg(int offset)
return data;
}
-void scc2698b_device::write_reg(int offset, uint8_t data)
+void scc2698b_device::write(offs_t offset, u8 data)
{
int device = (offset >> 4) & 3;
int reg = (offset & 15);
@@ -576,14 +564,14 @@ void scc2698b_device::write_reg(int offset, uint8_t data)
}
}
-WRITE_LINE_MEMBER(scc2698b_device::port_a_rx_w) { m_channel[0]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_b_rx_w) { m_channel[1]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_c_rx_w) { m_channel[2]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_d_rx_w) { m_channel[3]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_e_rx_w) { m_channel[4]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_f_rx_w) { m_channel[5]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_g_rx_w) { m_channel[6]->rx_w(state); }
-WRITE_LINE_MEMBER(scc2698b_device::port_h_rx_w) { m_channel[7]->rx_w(state); }
+void scc2698b_device::port_a_rx_w(int state) { m_channel[0]->rx_w(state); }
+void scc2698b_device::port_b_rx_w(int state) { m_channel[1]->rx_w(state); }
+void scc2698b_device::port_c_rx_w(int state) { m_channel[2]->rx_w(state); }
+void scc2698b_device::port_d_rx_w(int state) { m_channel[3]->rx_w(state); }
+void scc2698b_device::port_e_rx_w(int state) { m_channel[4]->rx_w(state); }
+void scc2698b_device::port_f_rx_w(int state) { m_channel[5]->rx_w(state); }
+void scc2698b_device::port_g_rx_w(int state) { m_channel[6]->rx_w(state); }
+void scc2698b_device::port_h_rx_w(int state) { m_channel[7]->rx_w(state); }
scc2698b_channel* scc2698b_device::get_channel(int port)
diff --git a/src/devices/machine/scc2698b.h b/src/devices/machine/scc2698b.h
index f693c6df50a..84da53998c5 100644
--- a/src/devices/machine/scc2698b.h
+++ b/src/devices/machine/scc2698b.h
@@ -17,8 +17,8 @@ class scc2698b_channel : public device_t, public device_serial_interface
public:
scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_WRITE_LINE_MEMBER(mpi0_w);
- DECLARE_WRITE_LINE_MEMBER(mpi1_w);
+ void mpi0_w(int state);
+ void mpi1_w(int state);
virtual void rcv_complete() override; // Rx completed receiving byte
virtual void tra_complete() override; // Tx completed sending byte
@@ -80,11 +80,8 @@ public:
virtual void map(address_map &map);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
-
- void write_reg(int offset, uint8_t data);
- uint8_t read_reg(int offset);
+ void write(offs_t offset, u8 data);
+ uint8_t read(offs_t offset);
auto intr_A() { return write_intr_A.bind(); }
auto intr_B() { return write_intr_B.bind(); }
@@ -93,14 +90,14 @@ public:
required_device_array<scc2698b_channel, 8> m_channel;
- DECLARE_WRITE_LINE_MEMBER(port_a_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_b_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_c_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_d_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_e_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_f_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_g_rx_w);
- DECLARE_WRITE_LINE_MEMBER(port_h_rx_w);
+ void port_a_rx_w(int state);
+ void port_b_rx_w(int state);
+ void port_c_rx_w(int state);
+ void port_d_rx_w(int state);
+ void port_e_rx_w(int state);
+ void port_f_rx_w(int state);
+ void port_g_rx_w(int state);
+ void port_h_rx_w(int state);
void write_line_tx(int port, int value);
diff --git a/src/devices/machine/scnxx562.cpp b/src/devices/machine/scnxx562.cpp
index 4e82cfa1aa8..df6754c8f24 100644
--- a/src/devices/machine/scnxx562.cpp
+++ b/src/devices/machine/scnxx562.cpp
@@ -376,7 +376,7 @@ void duscc_device::z80daisy_irq_reti()
}
}
-READ8_MEMBER( duscc_device::iack )
+uint8_t duscc_device::iack()
{
LOGINT("%s %s - returning vector:%02x\n",tag(), FUNCNAME, m_ivrm);
int vec = z80daisy_irq_ack();
@@ -513,7 +513,7 @@ void duscc_device::trigger_interrupt(int index, int state)
check_interrupts();
}
-READ8_MEMBER( duscc_device::read )
+uint8_t duscc_device::read(offs_t offset)
{
if ( offset & 0x20 )
return m_chanB->read(offset);
@@ -521,7 +521,7 @@ READ8_MEMBER( duscc_device::read )
return m_chanA->read(offset);
}
-WRITE8_MEMBER( duscc_device::write )
+void duscc_device::write(offs_t offset, uint8_t data)
{
if ( offset & 0x20 )
m_chanB->write(data, offset);
@@ -2395,7 +2395,7 @@ void duscc_channel::receive_data(uint8_t data)
// cts_w - clear to send handler
//-------------------------------------------------
-WRITE_LINE_MEMBER( duscc_channel::cts_w )
+void duscc_channel::cts_w(int state)
{
LOG("\"%s\" %s: %c : CTS %u\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
@@ -2425,7 +2425,7 @@ WRITE_LINE_MEMBER( duscc_channel::cts_w )
//-------------------------------------------------
// dcd_w - data carrier detected handler
//-------------------------------------------------
-WRITE_LINE_MEMBER( duscc_channel::dcd_w )
+void duscc_channel::dcd_w(int state)
{
LOG("\"%s\" %s: %c : DCD %u - not implemented\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
#if 0
@@ -2449,7 +2449,7 @@ WRITE_LINE_MEMBER( duscc_channel::dcd_w )
// ri_w - ring indicator handler
//-------------------------------------------------
-WRITE_LINE_MEMBER( duscc_channel::ri_w )
+void duscc_channel::ri_w(int state)
{
LOG("\"%s\" %s: %c : RI %u - not implemented\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
#if 0
@@ -2464,7 +2464,7 @@ WRITE_LINE_MEMBER( duscc_channel::ri_w )
//-------------------------------------------------
// sync_w - sync handler
//-------------------------------------------------
-WRITE_LINE_MEMBER( duscc_channel::sync_w )
+void duscc_channel::sync_w(int state)
{
LOG("\"%s\" %s: %c : SYNC %u - not implemented\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
}
@@ -2472,7 +2472,7 @@ WRITE_LINE_MEMBER( duscc_channel::sync_w )
//-------------------------------------------------
// rxc_w - receive clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( duscc_channel::rxc_w )
+void duscc_channel::rxc_w(int state)
{
LOG("\"%s\" %s: %c : RXC %u - not implemented\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
}
@@ -2480,7 +2480,7 @@ WRITE_LINE_MEMBER( duscc_channel::rxc_w )
//-------------------------------------------------
// txc_w - transmit clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( duscc_channel::txc_w )
+void duscc_channel::txc_w(int state)
{
LOG("\"%s\" %s: %c : TXC %u - not implemented\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
}
@@ -2558,7 +2558,7 @@ void duscc_channel::set_dtr(int state)
// write_rx - called by terminal through rs232/diserial
// when character is sent to board
//-------------------------------------------------
-WRITE_LINE_MEMBER(duscc_channel::write_rx)
+void duscc_channel::write_rx(int state)
{
m_rxd = state;
//only use rx_w when self-clocked
diff --git a/src/devices/machine/scnxx562.h b/src/devices/machine/scnxx562.h
index eb95b8c2370..72f3322a2e5 100644
--- a/src/devices/machine/scnxx562.h
+++ b/src/devices/machine/scnxx562.h
@@ -140,13 +140,13 @@ public:
void m_rx_fifo_rp_step();
uint8_t m_rx_fifo_rp_data();
- DECLARE_WRITE_LINE_MEMBER( write_rx );
- DECLARE_WRITE_LINE_MEMBER( cts_w );
- DECLARE_WRITE_LINE_MEMBER( dcd_w );
- DECLARE_WRITE_LINE_MEMBER( ri_w );
- DECLARE_WRITE_LINE_MEMBER( rxc_w );
- DECLARE_WRITE_LINE_MEMBER( txc_w );
- DECLARE_WRITE_LINE_MEMBER( sync_w );
+ void write_rx(int state);
+ void cts_w(int state);
+ void dcd_w(int state);
+ void ri_w(int state);
+ void rxc_w(int state);
+ void txc_w(int state);
+ void sync_w(int state);
protected:
// device-level overrides
@@ -561,34 +561,34 @@ public:
#endif
}
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
// interrupt acknowledge
- DECLARE_READ8_MEMBER( iack );
+ uint8_t iack();
// device_z80daisy_interface overrides
virtual int z80daisy_irq_state() override;
virtual int z80daisy_irq_ack() override;
virtual void z80daisy_irq_reti() override;
- DECLARE_WRITE_LINE_MEMBER( rxa_w ) { m_chanA->write_rx(state); }
- DECLARE_WRITE_LINE_MEMBER( rxb_w ) { m_chanB->write_rx(state); }
- DECLARE_WRITE_LINE_MEMBER( ctsa_w ) { m_chanA->cts_w(state); }
- DECLARE_WRITE_LINE_MEMBER( ctsb_w ) { m_chanB->cts_w(state); }
- DECLARE_WRITE_LINE_MEMBER( dcda_w ) { m_chanA->dcd_w(state); }
- DECLARE_WRITE_LINE_MEMBER( dcdb_w ) { m_chanB->dcd_w(state); }
- DECLARE_WRITE_LINE_MEMBER( ria_w ) { m_chanA->ri_w(state); }
- DECLARE_WRITE_LINE_MEMBER( rib_w ) { m_chanB->ri_w(state); }
+ void rxa_w(int state) { m_chanA->write_rx(state); }
+ void rxb_w(int state) { m_chanB->write_rx(state); }
+ void ctsa_w(int state) { m_chanA->cts_w(state); }
+ void ctsb_w(int state) { m_chanB->cts_w(state); }
+ void dcda_w(int state) { m_chanA->dcd_w(state); }
+ void dcdb_w(int state) { m_chanB->dcd_w(state); }
+ void ria_w(int state) { m_chanA->ri_w(state); }
+ void rib_w(int state) { m_chanB->ri_w(state); }
#if 0
- DECLARE_WRITE_LINE_MEMBER( rxca_w ) { m_chanA->rxc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( rxcb_w ) { m_chanB->rxc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( txca_w ) { m_chanA->txc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( txcb_w ) { m_chanB->txc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( rxtxcb_w ) { m_chanB->rxc_w(state); m_chanB->txc_w(state); }
+ void rxca_w(int state) { m_chanA->rxc_w(state); }
+ void rxcb_w(int state) { m_chanB->rxc_w(state); }
+ void txca_w(int state) { m_chanA->txc_w(state); }
+ void txcb_w(int state) { m_chanB->txc_w(state); }
+ void rxtxcb_w(int state) { m_chanB->rxc_w(state); m_chanB->txc_w(state); }
#endif
- DECLARE_WRITE_LINE_MEMBER( synca_w ) { m_chanA->sync_w(state); }
- DECLARE_WRITE_LINE_MEMBER( syncb_w ) { m_chanB->sync_w(state); }
+ void synca_w(int state) { m_chanA->sync_w(state); }
+ void syncb_w(int state) { m_chanB->sync_w(state); }
protected:
duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant);
diff --git a/src/devices/machine/serflash.cpp b/src/devices/machine/serflash.cpp
index 32f2524d5eb..c616b4d34a7 100644
--- a/src/devices/machine/serflash.cpp
+++ b/src/devices/machine/serflash.cpp
@@ -162,7 +162,7 @@ void serflash_device::flash_hard_reset()
m_flash_page_index = 0;
}
-WRITE8_MEMBER( serflash_device::flash_enab_w )
+void serflash_device::flash_enab_w(uint8_t data)
{
//logerror("%08x FLASH: enab = %02X\n", m_maincpu->pc(), data);
m_flash_enab = data;
@@ -181,7 +181,7 @@ void serflash_device::flash_change_state(flash_state_t state)
//logerror("flash_change_state - FLASH: state = %s\n", m_flash_state_name[state]);
}
-WRITE8_MEMBER( serflash_device::flash_cmd_w )
+void serflash_device::flash_cmd_w(uint8_t data)
{
if (!m_flash_enab)
return;
@@ -287,7 +287,7 @@ WRITE8_MEMBER( serflash_device::flash_cmd_w )
}
}
-WRITE8_MEMBER( serflash_device::flash_data_w )
+void serflash_device::flash_data_w(uint8_t data)
{
if (!m_flash_enab)
return;
@@ -300,7 +300,7 @@ WRITE8_MEMBER( serflash_device::flash_data_w )
m_flash_page_addr++;
}
-WRITE8_MEMBER( serflash_device::flash_addr_w )
+void serflash_device::flash_addr_w(uint8_t data)
{
if (!m_flash_enab)
return;
@@ -336,7 +336,7 @@ WRITE8_MEMBER( serflash_device::flash_addr_w )
}
}
-READ8_MEMBER( serflash_device::flash_io_r )
+uint8_t serflash_device::flash_io_r()
{
uint8_t data = 0x00;
// uint32_t old;
@@ -395,14 +395,14 @@ READ8_MEMBER( serflash_device::flash_io_r )
return data;
}
-READ8_MEMBER( serflash_device::flash_ready_r )
+uint8_t serflash_device::flash_ready_r()
{
return 1;
}
-READ8_MEMBER(serflash_device::n3d_flash_r)
+uint8_t serflash_device::n3d_flash_r(offs_t offset)
{
if (m_last_flash_cmd==0x70) return 0xe0;
@@ -423,7 +423,7 @@ READ8_MEMBER(serflash_device::n3d_flash_r)
}
-WRITE8_MEMBER(serflash_device::n3d_flash_cmd_w)
+void serflash_device::n3d_flash_cmd_w(offs_t offset, uint8_t data)
{
logerror("n3d_flash_cmd_w %02x %02x\n", offset, data);
m_last_flash_cmd = data;
@@ -437,7 +437,7 @@ WRITE8_MEMBER(serflash_device::n3d_flash_cmd_w)
}
}
-WRITE8_MEMBER(serflash_device::n3d_flash_addr_w)
+void serflash_device::n3d_flash_addr_w(offs_t offset, uint8_t data)
{
// logerror("n3d_flash_addr_w %02x %02x\n", offset, data);
diff --git a/src/devices/machine/serflash.h b/src/devices/machine/serflash.h
index 20077b00263..03181dec73a 100644
--- a/src/devices/machine/serflash.h
+++ b/src/devices/machine/serflash.h
@@ -26,17 +26,17 @@ public:
// configuration
void set_flash_page_size(uint16_t size) { m_flash_page_size = size; }
- DECLARE_READ8_MEMBER( flash_ready_r );
- DECLARE_READ8_MEMBER( flash_io_r );
- DECLARE_WRITE8_MEMBER( flash_addr_w );
- DECLARE_WRITE8_MEMBER( flash_data_w );
- DECLARE_WRITE8_MEMBER( flash_cmd_w );
- DECLARE_WRITE8_MEMBER( flash_enab_w );
+ uint8_t flash_ready_r();
+ uint8_t flash_io_r();
+ void flash_addr_w(uint8_t data);
+ void flash_data_w(uint8_t data);
+ void flash_cmd_w(uint8_t data);
+ void flash_enab_w(uint8_t data);
void flash_hard_reset();
- DECLARE_READ8_MEMBER(n3d_flash_r);
- DECLARE_WRITE8_MEMBER(n3d_flash_cmd_w);
- DECLARE_WRITE8_MEMBER(n3d_flash_addr_w);
+ uint8_t n3d_flash_r(offs_t offset);
+ void n3d_flash_cmd_w(offs_t offset, uint8_t data);
+ void n3d_flash_addr_w(offs_t offset, uint8_t data);
protected:
enum class flash_state_t : u8 { IDLE = 0, READ, READ_ID, READ_STATUS, BLOCK_ERASE, PAGE_PROGRAM };
diff --git a/src/devices/machine/smioc.cpp b/src/devices/machine/smioc.cpp
index 65616c82a0a..7f7f2046fb5 100644
--- a/src/devices/machine/smioc.cpp
+++ b/src/devices/machine/smioc.cpp
@@ -439,7 +439,7 @@ void smioc_device::update_and_log(u16& reg, u16 newValue, const char* register_n
reg = newValue;
}
-READ8_MEMBER(smioc_device::ram2_mmio_r)
+u8 smioc_device::ram2_mmio_r(offs_t offset)
{
const char *description = "";
u8 data = m_logic_ram[offset & 0xFFF];
@@ -497,7 +497,7 @@ READ8_MEMBER(smioc_device::ram2_mmio_r)
return data;
}
-WRITE8_MEMBER(smioc_device::ram2_mmio_w)
+void smioc_device::ram2_mmio_w(offs_t offset, u8 data)
{
const char *description = "";
@@ -557,7 +557,7 @@ WRITE8_MEMBER(smioc_device::ram2_mmio_w)
LOG_PARAMETER_RAM("ram2[%04X] <= %02X %s\n", offset, data, description);
}
-READ8_MEMBER(smioc_device::dma68k_r)
+u8 smioc_device::dma68k_r(offs_t offset)
{
u8 data = 0;
@@ -575,7 +575,7 @@ READ8_MEMBER(smioc_device::dma68k_r)
return data;
}
-WRITE8_MEMBER(smioc_device::dma68k_w)
+void smioc_device::dma68k_w(offs_t offset, u8 data)
{
m_dma_timer->adjust(attotime::from_usec(10));
@@ -585,7 +585,7 @@ WRITE8_MEMBER(smioc_device::dma68k_w)
LOG_REGISTER_ACCESS("%s dma68k[%04X] <= %02X\n", machine().time().as_string(), offset, data);
}
-READ8_MEMBER(smioc_device::boardlogic_mmio_r)
+u8 smioc_device::boardlogic_mmio_r(offs_t offset)
{
u8 data = 0xFF;
switch (offset)
@@ -619,7 +619,7 @@ READ8_MEMBER(smioc_device::boardlogic_mmio_r)
return data;
}
-WRITE8_MEMBER(smioc_device::boardlogic_mmio_w)
+void smioc_device::boardlogic_mmio_w(offs_t offset, u8 data)
{
switch (offset)
{
@@ -695,16 +695,16 @@ void smioc_device::AdvanceStatus2()
}
-READ8_MEMBER(smioc_device::dma8237_2_dmaread)
+u8 smioc_device::dma8237_2_dmaread(offs_t offset)
{
int data = m_smioccpu->space(AS_PROGRAM).read_byte(offset);
LOG_REGISTER_ACCESS("dma2read [0x%x] => 0x%x\n", offset, data);
- m_scc2698b->write_reg(0x03, data);
+ m_scc2698b->write(0x03, data);
return data;
}
-WRITE8_MEMBER(smioc_device::dma8237_2_dmawrite)
+void smioc_device::dma8237_2_dmawrite(offs_t offset, u8 data)
{
- data = m_scc2698b->read_reg(0x03);
+ data = m_scc2698b->read(0x03);
LOG_REGISTER_ACCESS("dma2write [0x%x] <= 0x%x\n", offset, data);
m_smioccpu->space(AS_PROGRAM).write_byte(offset, data);
}
diff --git a/src/devices/machine/smioc.h b/src/devices/machine/smioc.h
index 61cfbe88f62..a75a5b33ed3 100644
--- a/src/devices/machine/smioc.h
+++ b/src/devices/machine/smioc.h
@@ -44,17 +44,17 @@ public:
auto m68k_w_callback() { return m_m68k_w_cb.bind(); }
- DECLARE_READ8_MEMBER(ram2_mmio_r);
- DECLARE_WRITE8_MEMBER(ram2_mmio_w);
+ u8 ram2_mmio_r(offs_t offset);
+ void ram2_mmio_w(offs_t offset, u8 data);
- DECLARE_READ8_MEMBER(dma68k_r);
- DECLARE_WRITE8_MEMBER(dma68k_w);
+ u8 dma68k_r(offs_t offset);
+ void dma68k_w(offs_t offset, u8 data);
- DECLARE_READ8_MEMBER(dma8237_2_dmaread);
- DECLARE_WRITE8_MEMBER(dma8237_2_dmawrite);
+ u8 dma8237_2_dmaread(offs_t offset);
+ void dma8237_2_dmawrite(offs_t offset, u8 data);
- DECLARE_READ8_MEMBER(boardlogic_mmio_r);
- DECLARE_WRITE8_MEMBER(boardlogic_mmio_w);
+ u8 boardlogic_mmio_r(offs_t offset);
+ void boardlogic_mmio_w(offs_t offset, u8 data);
int m_activePortIndex;
diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp
index 440f8e06f78..17623c54da4 100644
--- a/src/devices/machine/smpc.cpp
+++ b/src/devices/machine/smpc.cpp
@@ -340,7 +340,7 @@ device_memory_interface::space_config_vector smpc_hle_device::memory_space_confi
// READ/WRITE HANDLERS
//**************************************************************************
-WRITE8_MEMBER( smpc_hle_device::ireg_w )
+void smpc_hle_device::ireg_w(offs_t offset, uint8_t data)
{
if (!(offset & 1)) // avoid writing to even bytes
return;
@@ -371,7 +371,7 @@ WRITE8_MEMBER( smpc_hle_device::ireg_w )
}
}
-READ8_MEMBER( smpc_hle_device::oreg_r )
+uint8_t smpc_hle_device::oreg_r(offs_t offset)
{
if (!(offset & 1)) // avoid reading to even bytes (TODO: is it 0s or 1s?)
return 0x00;
@@ -379,38 +379,38 @@ READ8_MEMBER( smpc_hle_device::oreg_r )
return m_oreg[offset >> 1];
}
-READ8_MEMBER( smpc_hle_device::status_register_r )
+uint8_t smpc_hle_device::status_register_r()
{
return m_sr;
}
-READ8_MEMBER( smpc_hle_device::status_flag_r )
+uint8_t smpc_hle_device::status_flag_r()
{
// bit 3: CD enable related?
return (m_sf<<0) | (m_cd_sf<<3);
}
-WRITE8_MEMBER( smpc_hle_device::status_flag_w )
+void smpc_hle_device::status_flag_w(uint8_t data)
{
m_sf = BIT(data,0);
m_cd_sf = false;
}
-READ8_MEMBER( smpc_hle_device::pdr1_r )
+uint8_t smpc_hle_device::pdr1_r()
{
uint8_t res = (m_pdr1_read() & ~m_ddr1) | m_pdr1_readback;
return res;
}
-READ8_MEMBER( smpc_hle_device::pdr2_r )
+uint8_t smpc_hle_device::pdr2_r()
{
uint8_t res = (m_pdr2_read() & ~m_ddr2) | m_pdr2_readback;
return res;
}
-WRITE8_MEMBER( smpc_hle_device::pdr1_w )
+void smpc_hle_device::pdr1_w(uint8_t data)
{
// pins defined as output returns in input
m_pdr1_readback = (data & m_ddr1);
@@ -420,7 +420,7 @@ WRITE8_MEMBER( smpc_hle_device::pdr1_w )
m_pdr1_readback |= data & 0x80;
}
-WRITE8_MEMBER( smpc_hle_device::pdr2_w )
+void smpc_hle_device::pdr2_w(uint8_t data)
{
// pins defined as output returns in input
m_pdr2_readback = (data & m_ddr2);
@@ -430,23 +430,23 @@ WRITE8_MEMBER( smpc_hle_device::pdr2_w )
m_pdr2_readback |= data & 0x80;
}
-WRITE8_MEMBER( smpc_hle_device::ddr1_w )
+void smpc_hle_device::ddr1_w(uint8_t data)
{
m_ddr1 = data & 0x7f;
}
-WRITE8_MEMBER( smpc_hle_device::ddr2_w )
+void smpc_hle_device::ddr2_w(uint8_t data)
{
m_ddr2 = data & 0x7f;
}
-WRITE8_MEMBER( smpc_hle_device::iosel_w )
+void smpc_hle_device::iosel_w(uint8_t data)
{
m_iosel1 = BIT(data,0);
m_iosel2 = BIT(data,1);
}
-WRITE8_MEMBER( smpc_hle_device::exle_w )
+void smpc_hle_device::exle_w(uint8_t data)
{
m_exle1 = BIT(data,0);
m_exle2 = BIT(data,1);
@@ -499,12 +499,12 @@ inline void smpc_hle_device::irq_request()
// TODO: trampolines that needs to go away
-READ8_MEMBER( smpc_hle_device::read )
+uint8_t smpc_hle_device::read(offs_t offset)
{
return this->space().read_byte(offset);
}
-WRITE8_MEMBER( smpc_hle_device::write )
+void smpc_hle_device::write(offs_t offset, uint8_t data)
{
this->space().write_byte(offset,data);
}
@@ -513,7 +513,7 @@ WRITE8_MEMBER( smpc_hle_device::write )
// Command simulation
//**************************************************************************
-WRITE8_MEMBER( smpc_hle_device::command_register_w )
+void smpc_hle_device::command_register_w(uint8_t data)
{
// don't send a command if previous one is still in progress
// ST-V tries to send a sysres command if OREG31 doesn't return the ack command
diff --git a/src/devices/machine/smpc.h b/src/devices/machine/smpc.h
index e832cdd2558..f727b4852e4 100644
--- a/src/devices/machine/smpc.h
+++ b/src/devices/machine/smpc.h
@@ -31,8 +31,8 @@ public:
// I/O operations
// void io_map(address_map &map);
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi_r );
@@ -177,20 +177,20 @@ private:
void smpc_regs(address_map &map);
- DECLARE_WRITE8_MEMBER( ireg_w );
- DECLARE_WRITE8_MEMBER( command_register_w );
- DECLARE_READ8_MEMBER( oreg_r );
- DECLARE_READ8_MEMBER( status_register_r );
- DECLARE_WRITE8_MEMBER( status_flag_w );
- DECLARE_READ8_MEMBER( status_flag_r );
- DECLARE_READ8_MEMBER( pdr1_r );
- DECLARE_READ8_MEMBER( pdr2_r );
- DECLARE_WRITE8_MEMBER( pdr1_w );
- DECLARE_WRITE8_MEMBER( pdr2_w );
- DECLARE_WRITE8_MEMBER( ddr1_w );
- DECLARE_WRITE8_MEMBER( ddr2_w );
- DECLARE_WRITE8_MEMBER( iosel_w );
- DECLARE_WRITE8_MEMBER( exle_w );
+ void ireg_w(offs_t offset, uint8_t data);
+ void command_register_w(uint8_t data);
+ uint8_t oreg_r(offs_t offset);
+ uint8_t status_register_r();
+ void status_flag_w(uint8_t data);
+ uint8_t status_flag_r();
+ uint8_t pdr1_r();
+ uint8_t pdr2_r();
+ void pdr1_w(uint8_t data);
+ void pdr2_w(uint8_t data);
+ void ddr1_w(uint8_t data);
+ void ddr2_w(uint8_t data);
+ void iosel_w(uint8_t data);
+ void exle_w(uint8_t data);
};
diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp
index 034854cd68a..25afcd1a13b 100644
--- a/src/devices/machine/spg2xx.cpp
+++ b/src/devices/machine/spg2xx.cpp
@@ -88,7 +88,6 @@ void spg2xx_device::device_start()
m_porta_out.resolve_safe();
m_portb_out.resolve_safe();
m_portc_out.resolve_safe();
- m_portc_out.resolve_safe();
m_porta_in.resolve_safe(0);
m_portb_in.resolve_safe(0);
m_portc_in.resolve_safe(0);
diff --git a/src/devices/machine/swtpc8212.cpp b/src/devices/machine/swtpc8212.cpp
index bd7b33e23e9..68af9d42e07 100644
--- a/src/devices/machine/swtpc8212.cpp
+++ b/src/devices/machine/swtpc8212.cpp
@@ -168,7 +168,7 @@ swtpc8212_device::swtpc8212_device(const machine_config &mconfig, const char *ta
{
}
-WRITE8_MEMBER(swtpc8212_device::latch_w)
+void swtpc8212_device::latch_w(uint8_t data)
{
// Bits 0 to 3 control outputs that are intended to control and tape
// 'read' and 'punch' operations. These are strobes, about 10usec, and
@@ -206,7 +206,7 @@ WRITE8_MEMBER(swtpc8212_device::latch_w)
}
-READ8_MEMBER(swtpc8212_device::pia0_pa_r)
+uint8_t swtpc8212_device::pia0_pa_r()
{
// PA0 controls the 'duplex' mode, the echoing back of characters, and
// appears to connect to a switch on the outer casing.
@@ -221,7 +221,7 @@ READ8_MEMBER(swtpc8212_device::pia0_pa_r)
return (m_keypad_data << 4) | config;
}
-READ8_MEMBER(swtpc8212_device::pia0_pb_r)
+uint8_t swtpc8212_device::pia0_pb_r()
{
return m_keyboard_data;
}
@@ -256,7 +256,7 @@ INPUT_CHANGED_MEMBER(swtpc8212_device::keypad_changed)
}
}
-WRITE_LINE_MEMBER(swtpc8212_device::pia0_ca2_w)
+void swtpc8212_device::pia0_ca2_w(int state)
{
if (state == 0)
{
@@ -265,19 +265,19 @@ WRITE_LINE_MEMBER(swtpc8212_device::pia0_ca2_w)
}
}
-WRITE8_MEMBER(swtpc8212_device::pia1_pa_w)
+void swtpc8212_device::pia1_pa_w(uint8_t data)
{
// External parallel printer data output.
m_printer_data = data;
}
-READ_LINE_MEMBER(swtpc8212_device::pia1_ca1_r)
+int swtpc8212_device::pia1_ca1_r()
{
// External parallel printer busy input.
return 0;
}
-WRITE_LINE_MEMBER(swtpc8212_device::pia1_ca2_w)
+void swtpc8212_device::pia1_ca2_w(int state)
{
// External parallel printer data ready.
@@ -339,42 +339,42 @@ void swtpc8212_device::device_timer(emu_timer &timer, device_timer_id id, int pa
}
}
-WRITE_LINE_MEMBER(swtpc8212_device::rs232_conn_dcd_w)
+void swtpc8212_device::rs232_conn_dcd_w(int state)
{
m_uart->dcd_w(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::rs232_conn_dsr_w)
+void swtpc8212_device::rs232_conn_dsr_w(int state)
{
m_uart->dsr_w(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::rs232_conn_ri_w)
+void swtpc8212_device::rs232_conn_ri_w(int state)
{
m_uart->ri_w(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::rs232_conn_cts_w)
+void swtpc8212_device::rs232_conn_cts_w(int state)
{
m_uart->cts_w(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::rs232_conn_rxd_w)
+void swtpc8212_device::rs232_conn_rxd_w(int state)
{
m_uart->rx_w(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::write_txd)
+void swtpc8212_device::write_txd(int state)
{
m_rs232_conn_txd_handler(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::write_dtr)
+void swtpc8212_device::write_dtr(int state)
{
m_rs232_conn_dtr_handler(state);
}
-WRITE_LINE_MEMBER(swtpc8212_device::write_rts)
+void swtpc8212_device::write_rts(int state)
{
m_rs232_conn_rts_handler(state);
}
diff --git a/src/devices/machine/swtpc8212.h b/src/devices/machine/swtpc8212.h
index 7f2ed05ad68..343d182de4b 100644
--- a/src/devices/machine/swtpc8212.h
+++ b/src/devices/machine/swtpc8212.h
@@ -27,11 +27,11 @@ public:
auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); }
auto rs232_conn_dtr_handler() { return m_rs232_conn_dtr_handler.bind(); }
auto rs232_conn_rts_handler() { return m_rs232_conn_rts_handler.bind(); }
- DECLARE_WRITE_LINE_MEMBER(rs232_conn_dcd_w);
- DECLARE_WRITE_LINE_MEMBER(rs232_conn_dsr_w);
- DECLARE_WRITE_LINE_MEMBER(rs232_conn_ri_w);
- DECLARE_WRITE_LINE_MEMBER(rs232_conn_cts_w);
- DECLARE_WRITE_LINE_MEMBER(rs232_conn_rxd_w);
+ void rs232_conn_dcd_w(int state);
+ void rs232_conn_dsr_w(int state);
+ void rs232_conn_ri_w(int state);
+ void rs232_conn_cts_w(int state);
+ void rs232_conn_rxd_w(int state);
protected:
swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -74,16 +74,16 @@ private:
MC6845_UPDATE_ROW(update_row);
- DECLARE_WRITE8_MEMBER(latch_w);
+ void latch_w(uint8_t data);
uint8_t m_latch_data;
- DECLARE_READ8_MEMBER(pia0_pa_r);
- DECLARE_READ8_MEMBER(pia0_pb_r);
- DECLARE_WRITE_LINE_MEMBER(pia0_ca2_w);
+ uint8_t pia0_pa_r();
+ uint8_t pia0_pb_r();
+ void pia0_ca2_w(int state);
- DECLARE_WRITE8_MEMBER(pia1_pa_w);
- DECLARE_READ_LINE_MEMBER(pia1_ca1_r);
- DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w);
+ void pia1_pa_w(uint8_t data);
+ int pia1_ca1_r();
+ void pia1_ca2_w(int state);
uint8_t m_keyboard_data;
uint8_t m_keypad_data;
@@ -92,9 +92,9 @@ private:
void keyboard_put(uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(write_txd);
- DECLARE_WRITE_LINE_MEMBER(write_dtr);
- DECLARE_WRITE_LINE_MEMBER(write_rts);
+ void write_txd(int state);
+ void write_dtr(int state);
+ void write_rts(int state);
};
DECLARE_DEVICE_TYPE(SWTPC8212, swtpc8212_device)
diff --git a/src/devices/machine/tms1024.cpp b/src/devices/machine/tms1024.cpp
index fcceee4ed7a..7c509b03c3d 100644
--- a/src/devices/machine/tms1024.cpp
+++ b/src/devices/machine/tms1024.cpp
@@ -67,13 +67,13 @@ void tms1024_device::device_start()
// handlers
//-------------------------------------------------
-WRITE8_MEMBER(tms1024_device::write_h)
+void tms1024_device::write_h(u8 data)
{
// H1,2,3,4: data for outputs A,B,C,D
m_h = data & 0xf;
}
-READ8_MEMBER(tms1024_device::read_h)
+u8 tms1024_device::read_h()
{
if (!m_ms)
{
@@ -87,13 +87,13 @@ READ8_MEMBER(tms1024_device::read_h)
return m_h;
}
-WRITE8_MEMBER(tms1024_device::write_s)
+void tms1024_device::write_s(uint8_t data)
{
// S0,1,2: select port
m_s = data & 7;
}
-WRITE_LINE_MEMBER(tms1024_device::write_std)
+void tms1024_device::write_std(int state)
{
state = (state) ? 1 : 0;
@@ -114,7 +114,7 @@ WRITE_LINE_MEMBER(tms1024_device::write_std)
m_std = state;
}
-WRITE_LINE_MEMBER(tms1024_device::write_ms)
+void tms1024_device::write_ms(int state)
{
// 0: multiplexer(read) mode, 1: latch(write) mode
m_ms = (state) ? 1 : 0;
diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h
index 3477147d59f..127909d27f2 100644
--- a/src/devices/machine/tms1024.h
+++ b/src/devices/machine/tms1024.h
@@ -69,11 +69,11 @@ public:
auto write_port6_callback() { return m_write_port[5].bind(); }
auto write_port7_callback() { return m_write_port[6].bind(); }
- DECLARE_WRITE8_MEMBER(write_h);
- DECLARE_READ8_MEMBER(read_h);
- DECLARE_WRITE8_MEMBER(write_s);
- DECLARE_WRITE_LINE_MEMBER(write_std);
- DECLARE_WRITE_LINE_MEMBER(write_ms);
+ void write_h(u8 data);
+ u8 read_h();
+ void write_s(u8 data);
+ void write_std(int state);
+ void write_ms(int state);
protected:
tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
diff --git a/src/devices/machine/tms5501.cpp b/src/devices/machine/tms5501.cpp
index d067497567a..6f115084d70 100644
--- a/src/devices/machine/tms5501.cpp
+++ b/src/devices/machine/tms5501.cpp
@@ -219,7 +219,7 @@ void tms5501_device::rcv_complete()
// rb_r - read receiver buffer
//-------------------------------------------------
-READ8_MEMBER( tms5501_device::rb_r )
+uint8_t tms5501_device::rb_r()
{
m_sta &= ~STA_RBL;
m_irq &= ~IRQ_RB;
@@ -234,7 +234,7 @@ READ8_MEMBER( tms5501_device::rb_r )
// xi_r - read external inputs
//-------------------------------------------------
-READ8_MEMBER( tms5501_device::xi_r )
+uint8_t tms5501_device::xi_r()
{
uint8_t data = m_read_xi(0);
@@ -251,7 +251,7 @@ READ8_MEMBER( tms5501_device::xi_r )
// rst_r - read interrupt address
//-------------------------------------------------
-READ8_MEMBER( tms5501_device::rst_r )
+uint8_t tms5501_device::rst_r()
{
return get_vector();
}
@@ -261,7 +261,7 @@ READ8_MEMBER( tms5501_device::rst_r )
// sta_r - read TMS5510 status
//-------------------------------------------------
-READ8_MEMBER( tms5501_device::sta_r )
+uint8_t tms5501_device::sta_r()
{
if(is_transmit_register_empty())
m_sta |= STA_XBE;
@@ -278,7 +278,7 @@ READ8_MEMBER( tms5501_device::sta_r )
// cmd_w - issue discrete commands
//-------------------------------------------------
-WRITE8_MEMBER( tms5501_device::cmd_w )
+void tms5501_device::cmd_w(uint8_t data)
{
if (LOG) logerror("TMS5501 '%s' Command %02x\n", tag(), data);
@@ -317,7 +317,7 @@ WRITE8_MEMBER( tms5501_device::cmd_w )
// rr_w - load rate register
//-------------------------------------------------
-WRITE8_MEMBER( tms5501_device::rr_w )
+void tms5501_device::rr_w(uint8_t data)
{
if (LOG) logerror("TMS5501 '%s' Rate Register %02x\n", tag(), data);
@@ -351,7 +351,7 @@ WRITE8_MEMBER( tms5501_device::rr_w )
// tb_w - load transmitter buffer
//-------------------------------------------------
-WRITE8_MEMBER( tms5501_device::tb_w )
+void tms5501_device::tb_w(uint8_t data)
{
if (LOG) logerror("TMS5501 '%s' Transmitter Buffer %02x\n", tag(), data);
@@ -376,7 +376,7 @@ WRITE8_MEMBER( tms5501_device::tb_w )
// xo_w - load output port
//-------------------------------------------------
-WRITE8_MEMBER( tms5501_device::xo_w )
+void tms5501_device::xo_w(uint8_t data)
{
if (LOG) logerror("TMS5501 '%s' Output %02x\n", tag(), data);
@@ -388,7 +388,7 @@ WRITE8_MEMBER( tms5501_device::xo_w )
// mr_w - load mask register
//-------------------------------------------------
-WRITE8_MEMBER( tms5501_device::mr_w )
+void tms5501_device::mr_w(uint8_t data)
{
if (LOG) logerror("TMS5501 '%s' Mask Register %02x\n", tag(), data);
@@ -402,7 +402,7 @@ WRITE8_MEMBER( tms5501_device::mr_w )
// tmr_w - load interval timer
//-------------------------------------------------
-WRITE8_MEMBER( tms5501_device::tmr_w )
+void tms5501_device::tmr_w(offs_t offset, uint8_t data)
{
if (LOG) logerror("TMS5501 '%s' Timer %u %02x\n", tag(), offset, data);
@@ -414,7 +414,7 @@ WRITE8_MEMBER( tms5501_device::tmr_w )
// rcv_w - receive data write
//-------------------------------------------------
-WRITE_LINE_MEMBER( tms5501_device::rcv_w )
+void tms5501_device::rcv_w(int state)
{
device_serial_interface::rx_w(state);
@@ -435,7 +435,7 @@ WRITE_LINE_MEMBER( tms5501_device::rcv_w )
// xi7_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( tms5501_device::xi7_w )
+void tms5501_device::xi7_w(int state)
{
if (m_cmd & CMD_XI7)
{
@@ -453,7 +453,7 @@ WRITE_LINE_MEMBER( tms5501_device::xi7_w )
// sens_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( tms5501_device::sens_w )
+void tms5501_device::sens_w(int state)
{
if (!m_sens && state)
{
diff --git a/src/devices/machine/tms5501.h b/src/devices/machine/tms5501.h
index 17a1cd19b87..74fae77b586 100644
--- a/src/devices/machine/tms5501.h
+++ b/src/devices/machine/tms5501.h
@@ -56,25 +56,25 @@ public:
auto xi_callback() { return m_read_xi.bind(); }
auto xo_callback() { return m_write_xo.bind(); }
- DECLARE_WRITE_LINE_MEMBER( rcv_w );
+ void rcv_w(int state);
- DECLARE_WRITE_LINE_MEMBER( sens_w );
- DECLARE_WRITE_LINE_MEMBER( xi7_w );
+ void sens_w(int state);
+ void xi7_w(int state);
uint8_t get_vector();
virtual void io_map(address_map &map);
- DECLARE_READ8_MEMBER( rb_r );
- DECLARE_READ8_MEMBER( xi_r );
- DECLARE_READ8_MEMBER( rst_r );
- DECLARE_READ8_MEMBER( sta_r );
- DECLARE_WRITE8_MEMBER( cmd_w );
- DECLARE_WRITE8_MEMBER( rr_w );
- DECLARE_WRITE8_MEMBER( tb_w );
- DECLARE_WRITE8_MEMBER( xo_w );
- DECLARE_WRITE8_MEMBER( mr_w );
- DECLARE_WRITE8_MEMBER( tmr_w );
+ uint8_t rb_r();
+ uint8_t xi_r();
+ uint8_t rst_r();
+ uint8_t sta_r();
+ void cmd_w(uint8_t data);
+ void rr_w(uint8_t data);
+ void tb_w(uint8_t data);
+ void xo_w(uint8_t data);
+ void mr_w(uint8_t data);
+ void tmr_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
diff --git a/src/devices/machine/tms6100.cpp b/src/devices/machine/tms6100.cpp
index 0728a511e8d..62bfc994b1f 100644
--- a/src/devices/machine/tms6100.cpp
+++ b/src/devices/machine/tms6100.cpp
@@ -97,45 +97,45 @@ void m58819_device::device_start()
// external i/o
-WRITE_LINE_MEMBER(tms6100_device::m0_w)
+void tms6100_device::m0_w(int state)
{
m_m0 = (state) ? 1 : 0;
}
-WRITE_LINE_MEMBER(tms6100_device::m1_w)
+void tms6100_device::m1_w(int state)
{
m_m1 = (state) ? 1 : 0;
}
-WRITE_LINE_MEMBER(tms6100_device::cs_w)
+void tms6100_device::cs_w(int state)
{
// chip select pin
m_cs = (state) ? 1 : 0;
}
-WRITE_LINE_MEMBER(tms6100_device::rck_w)
+void tms6100_device::rck_w(int state)
{
// gate/mask for clk
m_rck = (state) ? 1 : 0;
}
-WRITE8_MEMBER(tms6100_device::add_w)
+void tms6100_device::add_w(u8 data)
{
m_add = data & 0xf;
}
-READ8_MEMBER(tms6100_device::data_r)
+u8 tms6100_device::data_r()
{
return m_data & 0xf;
}
-READ_LINE_MEMBER(tms6100_device::data_line_r)
+int tms6100_device::data_line_r()
{
// DATA/ADD8
return (m_data & 8) ? 1 : 0;
}
-WRITE_LINE_MEMBER(tms6100_device::clk_w)
+void tms6100_device::clk_w(int state)
{
// process on falling edge
if (m_clk && !m_rck && !state)
diff --git a/src/devices/machine/tms6100.h b/src/devices/machine/tms6100.h
index ec9c8c55918..b7bfd7b3b45 100644
--- a/src/devices/machine/tms6100.h
+++ b/src/devices/machine/tms6100.h
@@ -88,15 +88,15 @@ public:
// note: in 4-bit mode, use data_r, otherwise use data_line_r
void enable_4bit_mode(bool mode) { m_4bit_mode = mode; }
- DECLARE_WRITE_LINE_MEMBER(m0_w);
- DECLARE_WRITE_LINE_MEMBER(m1_w);
- DECLARE_WRITE_LINE_MEMBER(rck_w);
- DECLARE_WRITE_LINE_MEMBER(cs_w);
- DECLARE_WRITE_LINE_MEMBER(clk_w);
-
- DECLARE_WRITE8_MEMBER(add_w);
- DECLARE_READ8_MEMBER(data_r); // 4bit
- DECLARE_READ_LINE_MEMBER(data_line_r);
+ void m0_w(int state);
+ void m1_w(int state);
+ void rck_w(int state);
+ void cs_w(int state);
+ void clk_w(int state);
+
+ void add_w(u8 data);
+ u8 data_r(); // 4bit
+ int data_line_r();
protected:
tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp
index 79a29fd539c..64250f7079a 100644
--- a/src/devices/machine/tms9901.cpp
+++ b/src/devices/machine/tms9901.cpp
@@ -314,7 +314,7 @@ void tms9901_device::set_int_line(int n, int state)
(in this order). When configured as outputs, reading returns the latched
values.
*/
-READ8_MEMBER( tms9901_device::read )
+uint8_t tms9901_device::read(offs_t offset)
{
return read_bit(offset)? 0x01 : 0x00;
}
@@ -372,7 +372,7 @@ bool tms9901_device::read_bit(int bit)
15 Clock mode: /RST2; Interrupt mode: Set Mask 15
16..31 Set P(n-16) as output, latch value, and output it
*/
-WRITE8_MEMBER( tms9901_device::write )
+void tms9901_device::write(offs_t offset, uint8_t data)
{
write_bit(offset, data!=0);
}
@@ -486,7 +486,7 @@ void tms9901_device::timer_clock_in(line_state clk)
a CLK line controlled by the CPU, like the TMS99xx systems.
In that case, clock is set to 0.
*/
-WRITE_LINE_MEMBER( tms9901_device::phi_line )
+void tms9901_device::phi_line(int state)
{
if (state==ASSERT_LINE)
{
@@ -573,7 +573,7 @@ void tms9901_device::device_reset()
/*
RST1 input line (active low; using ASSERT/CLEAR).
*/
-WRITE_LINE_MEMBER( tms9901_device::rst1_line )
+void tms9901_device::rst1_line(int state)
{
if (state==ASSERT_LINE) do_reset();
}
diff --git a/src/devices/machine/tms9901.h b/src/devices/machine/tms9901.h
index 510cd4cd18a..7947845601a 100644
--- a/src/devices/machine/tms9901.h
+++ b/src/devices/machine/tms9901.h
@@ -60,13 +60,13 @@ public:
void set_int_line(int pin_number, int state);
- DECLARE_WRITE_LINE_MEMBER( rst1_line );
+ void rst1_line(int state);
// Synchronous clock input
- DECLARE_WRITE_LINE_MEMBER( phi_line );
+ void phi_line(int state);
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
bool read_bit(int bit);
void write_bit(int bit, bool set);
diff --git a/src/devices/machine/upd4701.cpp b/src/devices/machine/upd4701.cpp
index 4bed73efe54..6a053a41063 100644
--- a/src/devices/machine/upd4701.cpp
+++ b/src/devices/machine/upd4701.cpp
@@ -33,6 +33,7 @@ upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, d
, m_cf(true)
, m_cf_cb(*this)
, m_sf_cb(*this)
+ , m_open_bus_cb(*this)
{
}
@@ -45,6 +46,7 @@ void upd4701_device::device_start()
// resolve callbacks
m_cf_cb.resolve_safe();
m_sf_cb.resolve_safe();
+ m_open_bus_cb.resolve_safe(0);
// register state for saving
save_item(NAME(m_cs));
@@ -148,17 +150,17 @@ WRITE_LINE_MEMBER(upd4701_device::resety_w)
// reset_x - pulse the X counter reset line
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::reset_x_r)
+u8 upd4701_device::reset_x_r()
{
if (!machine().side_effects_disabled())
{
resetx_w(1);
resetx_w(0);
}
- return space.unmap();
+ return m_open_bus_cb();
}
-WRITE8_MEMBER(upd4701_device::reset_x_w)
+void upd4701_device::reset_x_w(u8 data)
{
resetx_w(1);
resetx_w(0);
@@ -168,17 +170,17 @@ WRITE8_MEMBER(upd4701_device::reset_x_w)
// reset_y - pulse the Y counter reset line
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::reset_y_r)
+u8 upd4701_device::reset_y_r()
{
if (!machine().side_effects_disabled())
{
resety_w(1);
resety_w(0);
}
- return space.unmap();
+ return m_open_bus_cb();
}
-WRITE8_MEMBER(upd4701_device::reset_y_w)
+void upd4701_device::reset_y_w(u8 data)
{
resety_w(1);
resety_w(0);
@@ -188,7 +190,7 @@ WRITE8_MEMBER(upd4701_device::reset_y_w)
// reset_xy - pulse the counter reset lines
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::reset_xy_r)
+u8 upd4701_device::reset_xy_r()
{
if (!machine().side_effects_disabled())
{
@@ -197,10 +199,10 @@ READ8_MEMBER(upd4701_device::reset_xy_r)
resetx_w(0);
resety_w(0);
}
- return space.unmap();
+ return m_open_bus_cb();
}
-WRITE8_MEMBER(upd4701_device::reset_xy_w)
+void upd4701_device::reset_xy_w(u8 data)
{
resetx_w(1);
resety_w(1);
@@ -313,12 +315,12 @@ WRITE_LINE_MEMBER(upd4701_device::middle_w)
// d_r - read data lines directly
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::d_r)
+u8 upd4701_device::d_r()
{
if (m_cs)
{
logerror("Read while CS inactive\n");
- return space.unmap();
+ return m_open_bus_cb();
}
u16 data = m_xy ? m_latchy : m_latchx;
@@ -334,31 +336,31 @@ READ8_MEMBER(upd4701_device::d_r)
// read_x - read X axis through data/address bus
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::read_x)
+u8 upd4701_device::read_x(offs_t offset)
{
- return read_xy(space, (offset & 1) | 0);
+ return read_xy((offset & 1) | 0);
}
//-------------------------------------------------
// read_y - read Y axis through data/address bus
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::read_y)
+u8 upd4701_device::read_y(offs_t offset)
{
- return read_xy(space, (offset & 1) | 2);
+ return read_xy((offset & 1) | 2);
}
//-------------------------------------------------
// read_xy - read either axis through bus
//-------------------------------------------------
-READ8_MEMBER(upd4701_device::read_xy)
+u8 upd4701_device::read_xy(offs_t offset)
{
bool old_cs = m_cs;
cs_w(0);
xy_w(BIT(offset, 1));
ul_w(BIT(offset, 0));
- u8 result = d_r(space, 0);
+ u8 result = d_r();
cs_w(old_cs);
return result;
}
diff --git a/src/devices/machine/upd4701.h b/src/devices/machine/upd4701.h
index dcf389ff1c1..bfc77a00fc3 100644
--- a/src/devices/machine/upd4701.h
+++ b/src/devices/machine/upd4701.h
@@ -37,6 +37,7 @@ public:
template <typename T> void set_porty_tag(T &&tag) { m_porty.set_tag(std::forward<T>(tag)); }
auto cf_cb() { return m_cf_cb.bind(); }
auto sf_cb() { return m_sf_cb.bind(); }
+ auto open_bus_cb() { return m_open_bus_cb.bind(); }
void x_add(s16 data);
void y_add(s16 data);
@@ -46,17 +47,17 @@ public:
DECLARE_WRITE_LINE_MEMBER(ul_w);
DECLARE_WRITE_LINE_MEMBER(resetx_w);
DECLARE_WRITE_LINE_MEMBER(resety_w);
- DECLARE_READ8_MEMBER(reset_x_r);
- DECLARE_WRITE8_MEMBER(reset_x_w);
- DECLARE_READ8_MEMBER(reset_y_r);
- DECLARE_WRITE8_MEMBER(reset_y_w);
- DECLARE_READ8_MEMBER(reset_xy_r);
- DECLARE_WRITE8_MEMBER(reset_xy_w);
-
- DECLARE_READ8_MEMBER(d_r);
- DECLARE_READ8_MEMBER(read_x);
- DECLARE_READ8_MEMBER(read_y);
- DECLARE_READ8_MEMBER(read_xy);
+ u8 reset_x_r();
+ void reset_x_w(u8 data);
+ u8 reset_y_r();
+ void reset_y_w(u8 data);
+ u8 reset_xy_r();
+ void reset_xy_w(u8 data);
+
+ u8 d_r();
+ u8 read_x(offs_t offset);
+ u8 read_y(offs_t offset);
+ u8 read_xy(offs_t offset);
DECLARE_WRITE_LINE_MEMBER(left_w);
DECLARE_WRITE_LINE_MEMBER(right_w);
@@ -99,6 +100,7 @@ private:
bool m_cf;
devcb_write_line m_cf_cb;
devcb_write_line m_sf_cb;
+ devcb_read8 m_open_bus_cb;
};
DECLARE_DEVICE_TYPE(UPD4701A, upd4701_device)
diff --git a/src/devices/machine/upd7001.cpp b/src/devices/machine/upd7001.cpp
new file mode 100644
index 00000000000..d4607e7a479
--- /dev/null
+++ b/src/devices/machine/upd7001.cpp
@@ -0,0 +1,205 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/*********************************************************************
+
+ NEC µPD7001 CMOS Serial I/O Analog-to-Digital Converter
+
+ This ADC takes 56 clock cycles to convert one of its four
+ multiplexed input channels by successive approximation. The
+ 8-bit result is shifted out MSB first on the SO line. (SO and
+ EOC are open-drain outputs, making them convenient to tie
+ together since CS disables EOC but enables SO.) If only one
+ input is used, it may be connected to A0, with DL tied to Vdd
+ and SI to Vss.
+
+ The internal clock (fCK) is normally generated from a resistor
+ bridging the CL0 and CL1 pins and a capacitor between CL1 and
+ ground. The typical values R = 27 kΩ and C = 47 pF produce an
+ operating frequency of about 400 kHz. (500 kHz is the maximum
+ according to the datasheet.)
+
+*********************************************************************/
+
+#include "emu.h"
+#include "upd7001.h"
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(UPD7001, upd7001_device, "upd7001", "NEC uPD7001 A/D Converter")
+
+//**************************************************************************
+// DEVICE IMPLEMENTATION
+//**************************************************************************
+
+//-------------------------------------------------
+// upd7001_device - constructor
+//-------------------------------------------------
+
+upd7001_device::upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, UPD7001, tag, owner, clock)
+ , m_an_callback(*this)
+ , m_eoc_callback(*this)
+ , m_res(0.0)
+ , m_cap(0.0)
+ , m_fck_rc(attotime::attotime::zero)
+ , m_conv_timer(nullptr)
+ , m_scsk_timer(nullptr)
+ , m_cs_active(false)
+ , m_eoc_active(false)
+ , m_oe(false)
+ , m_sck(true)
+ , m_si(true)
+ , m_so(false)
+ , m_dl(false)
+ , m_sr(0)
+ , m_mpx(0)
+{
+}
+
+
+//-------------------------------------------------
+// device_resolve_objects -
+//-------------------------------------------------
+
+void upd7001_device::device_resolve_objects()
+{
+ // resolve callbacks
+ m_an_callback.resolve_all_safe(0);
+ m_eoc_callback.resolve_safe();
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void upd7001_device::device_start()
+{
+ // calculate RC timing (FIXME: math is not very accurate)
+ if (m_res == 0.0 || m_cap == 0.0)
+ m_fck_rc = attotime::zero;
+ else
+ m_fck_rc = attotime::from_double(m_res * m_cap * 1.97);
+
+ // initialize timers
+ m_conv_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(upd7001_device::conversion_done), this));
+ m_scsk_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(upd7001_device::output_enabled), this));
+
+ // save state
+ save_item(NAME(m_cs_active));
+ save_item(NAME(m_eoc_active));
+ save_item(NAME(m_oe));
+ save_item(NAME(m_sck));
+ save_item(NAME(m_si));
+ save_item(NAME(m_so));
+ save_item(NAME(m_dl));
+ save_item(NAME(m_sr));
+ save_item(NAME(m_mpx));
+}
+
+
+//-------------------------------------------------
+// cs_w - active-low chip select
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(upd7001_device::cs_w)
+{
+ if (!state && !m_cs_active)
+ {
+ if (m_conv_timer->enabled())
+ {
+ logerror("%s: CS lowered while conversion still in progress\n", machine().describe_context());
+ m_conv_timer->enable(false);
+ }
+
+ // EOC deasserted on falling edge
+ m_eoc_active = false;
+ m_eoc_callback(1);
+
+ // Output is enabled after 5 internal clock pulses
+ m_scsk_timer->adjust(m_fck_rc != attotime::zero ? m_fck_rc * 5 : clocks_to_attotime(5));
+ }
+ else if (state && m_cs_active)
+ {
+ // Disable data output
+ m_oe = false;
+ m_scsk_timer->enable(false);
+
+ // Begin conversion on rising edge
+ m_conv_timer->adjust(m_fck_rc != attotime::zero ? m_fck_rc * 56 : clocks_to_attotime(56));
+ }
+
+ m_cs_active = !state;
+}
+
+
+//-------------------------------------------------
+// conversion_done - finish converting the
+// selected analog input
+//-------------------------------------------------
+
+TIMER_CALLBACK_MEMBER(upd7001_device::conversion_done)
+{
+ // Load conversion result into shift register
+ m_sr = m_an_callback[m_mpx]();
+
+ // Activate EOC output
+ m_eoc_active = true;
+ m_eoc_callback(0);
+}
+
+
+//-------------------------------------------------
+// output_enabled - enable data output on SO
+//-------------------------------------------------
+
+TIMER_CALLBACK_MEMBER(upd7001_device::output_enabled)
+{
+ m_oe = true;
+}
+
+
+//-------------------------------------------------
+// sck_w - shift data out of and into register
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(upd7001_device::sck_w)
+{
+ if (m_cs_active)
+ {
+ if (!state && m_sck)
+ {
+ if (m_scsk_timer->enabled() && m_scsk_timer->remaining() > attotime::zero)
+ logerror("%s: SCK lowered %.2f microseconds too early\n", machine().describe_context(), m_scsk_timer->remaining().as_double() * 1.0E+6);
+
+ // SO updates on falling edge
+ m_so = BIT(m_sr, 7);
+ }
+ else if (state && !m_sck)
+ {
+ // SI shifted in on rising edge
+ m_sr = (m_sr << 1) | m_si;
+ if (m_dl)
+ m_mpx = m_sr & 3;
+ }
+ }
+
+ m_sck = state;
+}
+
+
+//-------------------------------------------------
+// dl_w - latch input data for multiplexer to
+// select input to convert
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(upd7001_device::dl_w)
+{
+ if (state && !m_dl && m_cs_active)
+ m_mpx = m_sr & 3;
+
+ m_dl = state;
+}
diff --git a/src/devices/machine/upd7001.h b/src/devices/machine/upd7001.h
new file mode 100644
index 00000000000..afc4b632293
--- /dev/null
+++ b/src/devices/machine/upd7001.h
@@ -0,0 +1,102 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/*********************************************************************
+
+ NEC µPD7001 CMOS Serial I/O Analog-to-Digital Converter
+
+**********************************************************************
+ ___ ___
+ _EOC 1 |* \__/ | 16 Vdd
+ DL 2 | | 15 Vref
+ SI 3 | | 14 AGND
+ _SCK 4 | | 13 A3
+ SO 5 | D7001C | 12 A2
+ _CS 6 | | 11 A1
+ CL0 7 | | 10 A0
+ CL1 8 |__________| 9 Vss
+
+*********************************************************************/
+
+#ifndef MAME_MACHINE_UPD7001_H
+#define MAME_MACHINE_UPD7001_H
+
+#pragma once
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> upd7001_device
+
+class upd7001_device : public device_t
+{
+public:
+ // device type constructors
+ upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c)
+ : upd7001_device(mconfig, tag, owner, 0U)
+ {
+ set_rc(r, c);
+ }
+
+ // input callback configuration
+ auto a0_callback() { return m_an_callback[0].bind(); }
+ auto a1_callback() { return m_an_callback[1].bind(); }
+ auto a2_callback() { return m_an_callback[2].bind(); }
+ auto a3_callback() { return m_an_callback[3].bind(); }
+
+ // output callback configuration
+ auto eoc_callback() { return m_eoc_callback.bind(); }
+
+ // misc. configuration
+ void set_rc(double res, double cap) { assert(!configured()); m_res = res; m_cap = cap; }
+
+ // serial interface
+ DECLARE_WRITE_LINE_MEMBER(cs_w);
+ DECLARE_WRITE_LINE_MEMBER(sck_w);
+ DECLARE_WRITE_LINE_MEMBER(si_w) { m_si = state; }
+ DECLARE_WRITE_LINE_MEMBER(dl_w);
+ DECLARE_READ_LINE_MEMBER(so_r) { return m_oe ? m_so : 1; }
+ DECLARE_READ_LINE_MEMBER(eoc_r) { return m_eoc_active ? 0 : 1; }
+ DECLARE_READ_LINE_MEMBER(eoc_so_r) { return eoc_r() && so_r(); }
+
+protected:
+ // device-level overrides
+ virtual void device_resolve_objects() override;
+ virtual void device_start() override;
+
+private:
+ // timing helpers
+ TIMER_CALLBACK_MEMBER(conversion_done);
+ TIMER_CALLBACK_MEMBER(output_enabled);
+
+ // callback objects
+ devcb_read8::array<4> m_an_callback;
+ devcb_write_line m_eoc_callback;
+
+ // timing parameters
+ double m_res;
+ double m_cap;
+ attotime m_fck_rc;
+
+ // internal timers
+ emu_timer *m_conv_timer;
+ emu_timer *m_scsk_timer;
+
+ // internal state
+ bool m_cs_active;
+ bool m_eoc_active;
+ bool m_oe;
+ bool m_sck;
+ bool m_si;
+ bool m_so;
+ bool m_dl;
+ u8 m_sr;
+ u8 m_mpx;
+};
+
+// device type declaration
+DECLARE_DEVICE_TYPE(UPD7001, upd7001_device)
+
+#endif // MAME_MACHINE_UPD7001_H
diff --git a/src/devices/machine/upd7004.cpp b/src/devices/machine/upd7004.cpp
index f1bd2482619..e3cfb911864 100644
--- a/src/devices/machine/upd7004.cpp
+++ b/src/devices/machine/upd7004.cpp
@@ -112,7 +112,7 @@ void upd7004_device::device_timer(emu_timer &timer, device_timer_id id, int para
// INTERFACE
//**************************************************************************
-READ8_MEMBER(upd7004_device::read)
+uint8_t upd7004_device::read(offs_t offset)
{
uint8_t data = 0xff;
@@ -135,7 +135,7 @@ READ8_MEMBER(upd7004_device::read)
return data;
}
-WRITE8_MEMBER(upd7004_device::write)
+void upd7004_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
diff --git a/src/devices/machine/upd7004.h b/src/devices/machine/upd7004.h
index 05165756d35..11b311b60f2 100644
--- a/src/devices/machine/upd7004.h
+++ b/src/devices/machine/upd7004.h
@@ -44,8 +44,8 @@ public:
auto eoc_ff_callback() { return m_eoc_ff_cb.bind(); }
template <int N> auto in_callback() { return m_in_cb[N].bind(); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/machine/upd71071.cpp b/src/devices/machine/upd71071.cpp
index 9074429ecaf..de46ffe53c5 100644
--- a/src/devices/machine/upd71071.cpp
+++ b/src/devices/machine/upd71071.cpp
@@ -308,7 +308,7 @@ int upd71071_device::dmarq(int state, int channel)
return 0;
}
-READ8_MEMBER(upd71071_device::read)
+uint8_t upd71071_device::read(offs_t offset)
{
uint8_t ret = 0;
@@ -385,7 +385,7 @@ READ8_MEMBER(upd71071_device::read)
return ret;
}
-WRITE8_MEMBER(upd71071_device::write)
+void upd71071_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
diff --git a/src/devices/machine/upd71071.h b/src/devices/machine/upd71071.h
index 6926dc1b51f..0ccf146f931 100644
--- a/src/devices/machine/upd71071.h
+++ b/src/devices/machine/upd71071.h
@@ -21,10 +21,10 @@ public:
template <unsigned N> auto dma_write_callback() { return m_dma_write_cb[N].bind(); }
template <unsigned N> auto out_dack_callback() { return m_out_dack_cb[N].bind(); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
- DECLARE_WRITE_LINE_MEMBER(set_hreq);
- DECLARE_WRITE_LINE_MEMBER(set_eop);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
+ void set_hreq(int state);
+ void set_eop(int state);
int dmarq(int state, int channel);
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index b9f51c66645..37a71638dca 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -45,6 +45,7 @@ DEFINE_DEVICE_TYPE(UPD765A, upd765a_device, "upd765a", "NEC
DEFINE_DEVICE_TYPE(UPD765B, upd765b_device, "upd765b", "NEC uPD765B FDC")
DEFINE_DEVICE_TYPE(I8272A, i8272a_device, "i8272a", "Intel 8272A FDC")
DEFINE_DEVICE_TYPE(UPD72065, upd72065_device, "upd72065", "NEC uPD72065 FDC")
+DEFINE_DEVICE_TYPE(UPD72067, upd72067_device, "upd72067", "NEC uPD72067 FDC")
DEFINE_DEVICE_TYPE(UPD72069, upd72069_device, "upd72069", "NEC uPD72069 FDC")
DEFINE_DEVICE_TYPE(I82072, i82072_device, "i82072", "Intel 82072 FDC")
DEFINE_DEVICE_TYPE(SMC37C78, smc37c78_device, "smc37c78", "SMC FDC73C78 FDC")
@@ -2656,6 +2657,14 @@ upd72065_device::upd72065_device(const machine_config &mconfig, device_type type
dor_reset = 0x0c;
}
+upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72067, tag, owner, clock)
+{
+ ready_polled = true;
+ ready_connected = true;
+ select_connected = true;
+ select_multiplexed = false;
+}
+
upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72069, tag, owner, clock)
{
ready_polled = true;
@@ -3038,3 +3047,38 @@ void upd72065_device::auxcmd_w(uint8_t data)
break;
}
}
+
+void upd72067_device::auxcmd_w(uint8_t data)
+{
+ /*
+ * Auxiliary commands:
+ *
+ * ???? ???? start clock
+ * 0011 0011 enable external mode
+ * 0x00 1011 control internal mode
+ * xxxx 1110 enable motors
+ * 010x 1111 select IBM or ECMA/ISO format
+ *
+ * The bare minimum needed to satisfy the news_r3k diagnostic has been
+ * implemented here.
+ */
+ switch(data & 0x0f) {
+ case 0x0e:
+ // motor on/off - no idea about timeout
+ for(unsigned i = 0; i < 4; i++)
+ if(flopi[i].dev)
+ flopi[i].dev->mon_w(!BIT(data, i + 4));
+ // fall through
+ case 0x03: // enable external mode
+ case 0x0b: // control internal mode
+ case 0x0f: // select format
+ // report a successful status
+ main_phase = PHASE_RESULT;
+ result[0] = ST0_UNK;
+ result_pos = 1;
+ break;
+ default:
+ upd72065_device::auxcmd_w(data);
+ break;
+ }
+}
diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h
index b0ca8e49657..e98f56f24f0 100644
--- a/src/devices/machine/upd765.h
+++ b/src/devices/machine/upd765.h
@@ -470,12 +470,19 @@ public:
upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void map(address_map &map) override;
- void auxcmd_w(uint8_t data);
+ virtual void auxcmd_w(uint8_t data);
protected:
upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
};
+class upd72067_device : public upd72065_device {
+public:
+ upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void auxcmd_w(uint8_t data) override;
+};
+
class upd72069_device : public upd72065_device {
public:
upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -570,6 +577,7 @@ DECLARE_DEVICE_TYPE(UPD765A, upd765a_device)
DECLARE_DEVICE_TYPE(UPD765B, upd765b_device)
DECLARE_DEVICE_TYPE(I8272A, i8272a_device)
DECLARE_DEVICE_TYPE(UPD72065, upd72065_device)
+DECLARE_DEVICE_TYPE(UPD72067, upd72067_device)
DECLARE_DEVICE_TYPE(UPD72069, upd72069_device)
DECLARE_DEVICE_TYPE(I82072, i82072_device)
DECLARE_DEVICE_TYPE(SMC37C78, smc37c78_device)
diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp
index 3e48d4e8ebb..a1e118b5412 100644
--- a/src/devices/machine/v3021.cpp
+++ b/src/devices/machine/v3021.cpp
@@ -115,7 +115,7 @@ void v3021_device::device_reset()
// READ/WRITE HANDLERS
//**************************************************************************
-READ8_MEMBER( v3021_device::read )
+uint8_t v3021_device::read()
{
uint8_t calr = (m_cal_val & m_cal_mask) ? 1 : 0;
@@ -123,7 +123,7 @@ READ8_MEMBER( v3021_device::read )
return calr;
}
-WRITE8_MEMBER( v3021_device::write )
+void v3021_device::write(uint8_t data)
{
m_cal_com <<= 1;
m_cal_com |= data & 1;
diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h
index 4f3b4635ea4..cbbe8e3f0e6 100644
--- a/src/devices/machine/v3021.h
+++ b/src/devices/machine/v3021.h
@@ -29,8 +29,8 @@ public:
v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768);
// I/O operations
- DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( read );
+ void write(uint8_t data);
+ uint8_t read();
TIMER_CALLBACK_MEMBER(timer_callback);
protected:
diff --git a/src/devices/machine/vt82c496.cpp b/src/devices/machine/vt82c496.cpp
index c06dec96565..16d309adb91 100644
--- a/src/devices/machine/vt82c496.cpp
+++ b/src/devices/machine/vt82c496.cpp
@@ -57,14 +57,14 @@ void vt82c496_device::device_reset()
machine().root_device().membank("bios_f0_r")->set_base(&m_rom[0x30000/4]);
}
-READ8_MEMBER(vt82c496_device::read)
+uint8_t vt82c496_device::read(offs_t offset)
{
if(offset == 1)
return m_reg[m_reg_select];
return 0x00;
}
-WRITE8_MEMBER(vt82c496_device::write)
+void vt82c496_device::write(offs_t offset, uint8_t data)
{
if(offset == 0)
m_reg_select = data;
diff --git a/src/devices/machine/vt82c496.h b/src/devices/machine/vt82c496.h
index e00d1186d55..48028579ed2 100644
--- a/src/devices/machine/vt82c496.h
+++ b/src/devices/machine/vt82c496.h
@@ -24,8 +24,9 @@ public:
template <typename T> void set_ramtag(T &&tag) { m_ram.set_tag(std::forward<T>(tag)); }
template <typename T> void set_isatag(T &&tag) { m_rom.set_tag(std::forward<T>(tag)); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
+
protected:
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/machine/wd1000.cpp b/src/devices/machine/wd1000.cpp
index b0dbb182590..f8c879ef20e 100644
--- a/src/devices/machine/wd1000.cpp
+++ b/src/devices/machine/wd1000.cpp
@@ -320,7 +320,7 @@ uint8_t wd1000_device::data_r()
return data;
}
-READ8_MEMBER( wd1000_device::read )
+uint8_t wd1000_device::read(offs_t offset)
{
if ((m_status & S_BSY) && offset != 7)
{
@@ -441,7 +441,7 @@ void wd1000_device::data_w(uint8_t data)
}
}
-WRITE8_MEMBER( wd1000_device::write )
+void wd1000_device::write(offs_t offset, uint8_t data)
{
switch (offset & 0x07)
{
diff --git a/src/devices/machine/wd1000.h b/src/devices/machine/wd1000.h
index e7386ee543b..ac2219e8425 100644
--- a/src/devices/machine/wd1000.h
+++ b/src/devices/machine/wd1000.h
@@ -33,11 +33,12 @@ public:
void data_w(uint8_t val);
void set_sector_base(uint32_t base);
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_READ_LINE_MEMBER(intrq_r);
- DECLARE_READ_LINE_MEMBER(drq_r);
+ // declared but not defined?
+ int intrq_r();
+ int drq_r();
protected:
diff --git a/src/devices/machine/wd1010.cpp b/src/devices/machine/wd1010.cpp
index c093c11319b..c845c52fc11 100644
--- a/src/devices/machine/wd1010.cpp
+++ b/src/devices/machine/wd1010.cpp
@@ -292,7 +292,7 @@ int wd1010_device::get_lbasector()
// INTERFACE
//**************************************************************************
-WRITE_LINE_MEMBER( wd1010_device::drdy_w )
+void wd1010_device::drdy_w(int state)
{
if (state)
m_status |= STATUS_RDY;
@@ -300,12 +300,12 @@ WRITE_LINE_MEMBER( wd1010_device::drdy_w )
m_status &= ~STATUS_RDY;
}
-WRITE_LINE_MEMBER( wd1010_device::brdy_w )
+void wd1010_device::brdy_w(int state)
{
m_brdy = state;
}
-READ8_MEMBER( wd1010_device::read )
+uint8_t wd1010_device::read(offs_t offset)
{
// if the controller is busy all reads return the status register
if (m_status & STATUS_BSY)
@@ -358,7 +358,7 @@ READ8_MEMBER( wd1010_device::read )
return 0xff;
}
-WRITE8_MEMBER( wd1010_device::write )
+void wd1010_device::write(offs_t offset, uint8_t data)
{
switch (offset & 0x07)
{
diff --git a/src/devices/machine/wd1010.h b/src/devices/machine/wd1010.h
index b5db9975693..3d734af1563 100644
--- a/src/devices/machine/wd1010.h
+++ b/src/devices/machine/wd1010.h
@@ -31,11 +31,11 @@ public:
auto in_data_callback() { return m_in_data_cb.bind(); }
auto out_data_callback() { return m_out_data_cb.bind(); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(drdy_w);
- DECLARE_WRITE_LINE_MEMBER(brdy_w);
+ void drdy_w(int state);
+ void brdy_w(int state);
protected:
// device-level overrides
diff --git a/src/devices/machine/wd11c00_17.cpp b/src/devices/machine/wd11c00_17.cpp
index b0d58034f6d..981672a70d9 100644
--- a/src/devices/machine/wd11c00_17.cpp
+++ b/src/devices/machine/wd11c00_17.cpp
@@ -238,7 +238,7 @@ void wd11c00_17_device::device_reset()
// io_r -
//-------------------------------------------------
-READ8_MEMBER( wd11c00_17_device::io_r )
+uint8_t wd11c00_17_device::io_r(offs_t offset)
{
uint8_t data = 0xff;
@@ -271,7 +271,7 @@ READ8_MEMBER( wd11c00_17_device::io_r )
// io_w -
//-------------------------------------------------
-WRITE8_MEMBER( wd11c00_17_device::io_w )
+void wd11c00_17_device::io_w(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -304,7 +304,7 @@ WRITE8_MEMBER( wd11c00_17_device::io_w )
// dack3_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER(wd11c00_17_device::dack3_w)
+void wd11c00_17_device::dack3_w(int state)
{
}
@@ -333,7 +333,7 @@ void wd11c00_17_device::dack_w(uint8_t data)
// read -
//-------------------------------------------------
-READ8_MEMBER( wd11c00_17_device::read )
+uint8_t wd11c00_17_device::read(offs_t offset)
{
uint8_t data = 0;
@@ -358,7 +358,7 @@ READ8_MEMBER( wd11c00_17_device::read )
// write -
//-------------------------------------------------
-WRITE8_MEMBER( wd11c00_17_device::write )
+void wd11c00_17_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
@@ -385,7 +385,7 @@ WRITE8_MEMBER( wd11c00_17_device::write )
// ireq_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( wd11c00_17_device::ireq_w )
+void wd11c00_17_device::ireq_w(int state)
{
LOG("%s WD11C00-17 IREQ %u\n", machine().describe_context(), state);
@@ -414,7 +414,7 @@ WRITE_LINE_MEMBER( wd11c00_17_device::ireq_w )
// io_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( wd11c00_17_device::io_w )
+void wd11c00_17_device::io_w(int state)
{
LOG("%s WD11C00-17 I/O %u\n", machine().describe_context(), state);
@@ -426,7 +426,7 @@ WRITE_LINE_MEMBER( wd11c00_17_device::io_w )
// cd_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( wd11c00_17_device::cd_w )
+void wd11c00_17_device::cd_w(int state)
{
LOG("%s WD11C00-17 C/D %u\n", machine().describe_context(), state);
@@ -438,7 +438,7 @@ WRITE_LINE_MEMBER( wd11c00_17_device::cd_w )
// clct_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( wd11c00_17_device::clct_w )
+void wd11c00_17_device::clct_w(int state)
{
LOG("%s WD11C00-17 CLCT %u\n", machine().describe_context(), state);
@@ -454,7 +454,7 @@ WRITE_LINE_MEMBER( wd11c00_17_device::clct_w )
// mode_w -
//-------------------------------------------------
-WRITE_LINE_MEMBER( wd11c00_17_device::mode_w )
+void wd11c00_17_device::mode_w(int state)
{
LOG("%s WD11C00-17 MODE %u\n", machine().describe_context(), state);
@@ -467,7 +467,7 @@ WRITE_LINE_MEMBER( wd11c00_17_device::mode_w )
// busy_r -
//-------------------------------------------------
-READ_LINE_MEMBER( wd11c00_17_device::busy_r )
+int wd11c00_17_device::busy_r()
{
return (m_status & STATUS_BUSY) ? 0 : 1;
}
@@ -477,7 +477,7 @@ READ_LINE_MEMBER( wd11c00_17_device::busy_r )
// ecc_not_0_r -
//-------------------------------------------------
-READ_LINE_MEMBER( wd11c00_17_device::ecc_not_0_r )
+int wd11c00_17_device::ecc_not_0_r()
{
return m_ecc_not_0;
}
diff --git a/src/devices/machine/wd11c00_17.h b/src/devices/machine/wd11c00_17.h
index 0b375f61e67..91175d2472d 100644
--- a/src/devices/machine/wd11c00_17.h
+++ b/src/devices/machine/wd11c00_17.h
@@ -36,24 +36,24 @@ public:
auto in_cs1010_callback() { return m_in_cs1010_cb.bind(); }
auto out_cs1010_callback() { return m_out_cs1010_cb.bind(); }
- DECLARE_READ8_MEMBER( io_r );
- DECLARE_WRITE8_MEMBER( io_w );
+ uint8_t io_r(offs_t offset);
+ void io_w(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER( dack3_w );
+ void dack3_w(int state);
uint8_t dack_r();
void dack_w(uint8_t data);
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER( ireq_w );
- DECLARE_WRITE_LINE_MEMBER( io_w );
- DECLARE_WRITE_LINE_MEMBER( cd_w );
- DECLARE_WRITE_LINE_MEMBER( clct_w );
- DECLARE_WRITE_LINE_MEMBER( mode_w );
+ void ireq_w(int state);
+ void io_w(int state);
+ void cd_w(int state);
+ void clct_w(int state);
+ void mode_w(int state);
- DECLARE_READ_LINE_MEMBER( busy_r );
- DECLARE_READ_LINE_MEMBER( ecc_not_0_r );
+ int busy_r();
+ int ecc_not_0_r();
protected:
// device-level overrides
diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp
index d348c0e2ec5..880aa5f3f64 100644
--- a/src/devices/machine/wd_fdc.cpp
+++ b/src/devices/machine/wd_fdc.cpp
@@ -145,6 +145,8 @@ void wd_fdc_device_base::device_start()
if (!disable_mfm)
save_item(NAME(dden));
save_item(NAME(mr));
+ save_item(NAME(intrq));
+ save_item(NAME(drq));
}
void wd_fdc_device_base::device_reset()
diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp
index 61f1150bee0..0c316a4c108 100644
--- a/src/devices/machine/wozfdc.cpp
+++ b/src/devices/machine/wozfdc.cpp
@@ -217,7 +217,7 @@ void wozfdc_device::write(offs_t offset, uint8_t data)
last_6502_write = data;
}
-WRITE8_MEMBER(wozfdc_device::set_phase)
+void wozfdc_device::set_phase(uint8_t data)
{
if (floppy && active)
floppy->seek_phase_w(data);
diff --git a/src/devices/machine/wozfdc.h b/src/devices/machine/wozfdc.h
index 3fae86420b0..6c7a438be17 100644
--- a/src/devices/machine/wozfdc.h
+++ b/src/devices/machine/wozfdc.h
@@ -42,7 +42,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
void control(int offset);
- DECLARE_WRITE8_MEMBER(set_phase);
+ void set_phase(uint8_t data);
uint64_t time_to_cycles(const attotime &tm);
attotime cycles_to_time(uint64_t cycles);
void a3_update_drive_sel();
diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp
index 1871d03c4da..84a4e0b565b 100644
--- a/src/devices/machine/x2212.cpp
+++ b/src/devices/machine/x2212.cpp
@@ -136,7 +136,7 @@ void x2212_device::do_recall()
// write - store to the live RAM
//-------------------------------------------------
-WRITE8_MEMBER( x2212_device::write )
+void x2212_device::write(offs_t offset, uint8_t data)
{
assert(offset < m_size_data);
m_sram[offset] = data & 0x0f;
@@ -147,7 +147,7 @@ WRITE8_MEMBER( x2212_device::write )
// read - read from the live RAM
//-------------------------------------------------
-READ8_MEMBER( x2212_device::read )
+u8 x2212_device::read(address_space &space, offs_t offset)
{
assert(offset < m_size_data);
return (m_sram[offset] & 0x0f) | (space.unmap() & 0xf0);
@@ -159,7 +159,7 @@ READ8_MEMBER( x2212_device::read )
// (FIXME: actually active low, not active high)
//-------------------------------------------------
-WRITE_LINE_MEMBER( x2212_device::store )
+void x2212_device::store(int state)
{
if (state != 0 && !m_store)
do_store();
@@ -172,7 +172,7 @@ WRITE_LINE_MEMBER( x2212_device::store )
// (FIXME: actually active low, not active high)
//-------------------------------------------------
-WRITE_LINE_MEMBER( x2212_device::recall )
+void x2212_device::recall(int state)
{
if (state != 0 && !m_array_recall)
do_recall();
diff --git a/src/devices/machine/x2212.h b/src/devices/machine/x2212.h
index 4a2fb8ddb56..5fbcb23f532 100644
--- a/src/devices/machine/x2212.h
+++ b/src/devices/machine/x2212.h
@@ -45,11 +45,11 @@ public:
void set_auto_save(bool auto_save) { m_auto_save = auto_save; }
// I/O operations
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ u8 read(address_space &space, offs_t offset);
+ void write(offs_t offset, uint8_t data);
- DECLARE_WRITE_LINE_MEMBER( store );
- DECLARE_WRITE_LINE_MEMBER( recall );
+ void store(int state);
+ void recall(int state);
protected:
x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int size_data);
diff --git a/src/devices/machine/ym3802.cpp b/src/devices/machine/ym3802.cpp
index 603a9d82f53..3f0e8080ba7 100644
--- a/src/devices/machine/ym3802.cpp
+++ b/src/devices/machine/ym3802.cpp
@@ -188,7 +188,7 @@ void ym3802_device::set_comms_mode()
logerror("MIDI comms set to 1 start bit, %i data bits, %s, parity = %i\n",data_bits, (stop_bits == STOP_BITS_2) ? "2 stop bits" : "1 stop bit", parity);
}
-READ8_MEMBER(ym3802_device::read)
+uint8_t ym3802_device::read(offs_t offset)
{
if(offset < 4)
{
@@ -225,7 +225,7 @@ READ8_MEMBER(ym3802_device::read)
}
}
-WRITE8_MEMBER(ym3802_device::write)
+void ym3802_device::write(offs_t offset, uint8_t data)
{
m_wdr = data;
if(offset == 1)
diff --git a/src/devices/machine/ym3802.h b/src/devices/machine/ym3802.h
index 31301fab4f1..68cdf4d535d 100644
--- a/src/devices/machine/ym3802.h
+++ b/src/devices/machine/ym3802.h
@@ -33,8 +33,8 @@ public:
auto irq_handler() { return m_irq_handler.bind(); }
auto txd_handler() { return m_txd_handler.bind(); }
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
uint8_t vector() { return m_vector; }
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp
index 31807925847..c47165ef99b 100644
--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -852,7 +852,7 @@ int z80scc_device::m1_r()
//-------------------------------------------------
// zbus_r - Z-Bus read
//-------------------------------------------------
-READ8_MEMBER( z80scc_device::zbus_r )
+uint8_t z80scc_device::zbus_r(offs_t offset)
{
offset &= 31;
bool ba = BIT(offset, 4);
@@ -883,7 +883,7 @@ READ8_MEMBER( z80scc_device::zbus_r )
//-------------------------------------------------
// zbus_w - Z-Bus write
//-------------------------------------------------
-WRITE8_MEMBER( z80scc_device::zbus_w )
+void z80scc_device::zbus_w(offs_t offset, uint8_t data)
{
offset &= 31;
bool ba = BIT(offset, 4);
@@ -2664,7 +2664,7 @@ void z80scc_channel::receive_data(uint8_t data)
//-------------------------------------------------
// cts_w - clear to send handler
//-------------------------------------------------
-WRITE_LINE_MEMBER( z80scc_channel::cts_w )
+void z80scc_channel::cts_w(int state)
{
LOG("\"%s\"%s: %c : CTS %u\n", owner()->tag(), FUNCNAME, 'A' + m_index, state);
@@ -2701,7 +2701,7 @@ WRITE_LINE_MEMBER( z80scc_channel::cts_w )
//-------------------------------------------------
// dcd_w - data carrier detected handler
//-------------------------------------------------
-WRITE_LINE_MEMBER( z80scc_channel::dcd_w )
+void z80scc_channel::dcd_w(int state)
{
LOGDCD("\"%s\": %c : DCD %u\n", owner()->tag(), 'A' + m_index, state);
@@ -2740,7 +2740,7 @@ WRITE_LINE_MEMBER( z80scc_channel::dcd_w )
//-------------------------------------------------
// sync_w - sync handler for external sync mode
//-------------------------------------------------
-WRITE_LINE_MEMBER( z80scc_channel::sync_w )
+void z80scc_channel::sync_w(int state)
{
LOGSYNC("\"%s\": %c : SYNC %u\n", owner()->tag(), 'A' + m_index, state);
@@ -2778,7 +2778,7 @@ WRITE_LINE_MEMBER( z80scc_channel::sync_w )
//-------------------------------------------------
// rxc_w - receive clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( z80scc_channel::rxc_w )
+void z80scc_channel::rxc_w(int state)
{
/* Support for external clock as source for BRG yet to be finished */
#if 0
@@ -2830,7 +2830,7 @@ WRITE_LINE_MEMBER( z80scc_channel::rxc_w )
//-------------------------------------------------
// txc_w - transmit clock
//-------------------------------------------------
-WRITE_LINE_MEMBER( z80scc_channel::txc_w )
+void z80scc_channel::txc_w(int state)
{
//LOG("\"%s\": %c : Transmitter Clock Pulse\n", owner()->tag(), m_index + 'A');
if (m_wr5 & WR5_TX_ENABLE)
@@ -2981,7 +2981,7 @@ void z80scc_channel::set_dtr(int state)
// write_rx - called by terminal through rs232/diserial
// when character is sent to board
//-------------------------------------------------
-WRITE_LINE_MEMBER(z80scc_channel::write_rx)
+void z80scc_channel::write_rx(int state)
{
#if START_BIT_HUNT
// Check for start bit if not receiving
diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h
index 4a44c3c9c2c..18d6ffffc55 100644
--- a/src/devices/machine/z80scc.h
+++ b/src/devices/machine/z80scc.h
@@ -122,12 +122,12 @@ public:
void m_rx_fifo_rp_step();
uint8_t m_rx_fifo_rp_data();
- DECLARE_WRITE_LINE_MEMBER( write_rx );
- DECLARE_WRITE_LINE_MEMBER( cts_w );
- DECLARE_WRITE_LINE_MEMBER( dcd_w );
- DECLARE_WRITE_LINE_MEMBER( rxc_w );
- DECLARE_WRITE_LINE_MEMBER( txc_w );
- DECLARE_WRITE_LINE_MEMBER( sync_w );
+ void write_rx(int state);
+ void cts_w(int state);
+ void dcd_w(int state);
+ void rxc_w(int state);
+ void txc_w(int state);
+ void sync_w(int state);
int m_rxc;
int m_txc;
@@ -369,8 +369,8 @@ public:
uint8_t cb_r(offs_t offset) { return m_chanB->control_read(); }
void cb_w(offs_t offset, uint8_t data) { m_chanB->control_write(data); }
- DECLARE_READ8_MEMBER( zbus_r );
- DECLARE_WRITE8_MEMBER( zbus_w );
+ uint8_t zbus_r(offs_t offset);
+ void zbus_w(offs_t offset, uint8_t data);
// interrupt acknowledge
int m1_r();
@@ -378,19 +378,19 @@ public:
// Single registers instances accessed from both channels
uint8_t m_wr9; // REG_WR9_MASTER_INT_CTRL
- DECLARE_WRITE_LINE_MEMBER( rxa_w ) { m_chanA->write_rx(state); }
- DECLARE_WRITE_LINE_MEMBER( rxb_w ) { m_chanB->write_rx(state); }
- DECLARE_WRITE_LINE_MEMBER( ctsa_w ) { m_chanA->cts_w(state); }
- DECLARE_WRITE_LINE_MEMBER( ctsb_w ) { m_chanB->cts_w(state); }
- DECLARE_WRITE_LINE_MEMBER( dcda_w ) { m_chanA->dcd_w(state); }
- DECLARE_WRITE_LINE_MEMBER( dcdb_w ) { m_chanB->dcd_w(state); }
- DECLARE_WRITE_LINE_MEMBER( rxca_w ) { m_chanA->rxc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( rxcb_w ) { m_chanB->rxc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( txca_w ) { m_chanA->txc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( txcb_w ) { m_chanB->txc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( rxtxcb_w ) { m_chanB->rxc_w(state); m_chanB->txc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( synca_w ) { m_chanA->sync_w(state); }
- DECLARE_WRITE_LINE_MEMBER( syncb_w ) { m_chanB->sync_w(state); }
+ void rxa_w(int state) { m_chanA->write_rx(state); }
+ void rxb_w(int state) { m_chanB->write_rx(state); }
+ void ctsa_w(int state) { m_chanA->cts_w(state); }
+ void ctsb_w(int state) { m_chanB->cts_w(state); }
+ void dcda_w(int state) { m_chanA->dcd_w(state); }
+ void dcdb_w(int state) { m_chanB->dcd_w(state); }
+ void rxca_w(int state) { m_chanA->rxc_w(state); }
+ void rxcb_w(int state) { m_chanB->rxc_w(state); }
+ void txca_w(int state) { m_chanA->txc_w(state); }
+ void txcb_w(int state) { m_chanB->txc_w(state); }
+ void rxtxcb_w(int state) { m_chanB->rxc_w(state); m_chanB->txc_w(state); }
+ void synca_w(int state) { m_chanA->sync_w(state); }
+ void syncb_w(int state) { m_chanB->sync_w(state); }
int update_extint(int i);
int get_extint_priority(int type);
diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp
index cabc6daf466..22d03323aa9 100644
--- a/src/devices/machine/z80sti.cpp
+++ b/src/devices/machine/z80sti.cpp
@@ -362,7 +362,7 @@ void z80sti_device::take_interrupt(int level)
// read - register read
//-------------------------------------------------
-READ8_MEMBER( z80sti_device::read )
+uint8_t z80sti_device::read(offs_t offset)
{
uint8_t data = 0;
@@ -407,7 +407,7 @@ READ8_MEMBER( z80sti_device::read )
// write - register write
//-------------------------------------------------
-WRITE8_MEMBER( z80sti_device::write )
+void z80sti_device::write(offs_t offset, uint8_t data)
{
switch (offset & 0x0f)
{
diff --git a/src/devices/machine/z80sti.h b/src/devices/machine/z80sti.h
index 521630dbe13..24c23964f3d 100644
--- a/src/devices/machine/z80sti.h
+++ b/src/devices/machine/z80sti.h
@@ -64,8 +64,8 @@ public:
void set_rx_clock(int clock) { m_rx_clock = clock; }
void set_tx_clock(int clock) { m_tx_clock = clock; }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( i0_w );
DECLARE_WRITE_LINE_MEMBER( i1_w );
diff --git a/src/devices/sound/okim6258.cpp b/src/devices/sound/okim6258.cpp
index a9477a5d7bc..639c6fde50d 100644
--- a/src/devices/sound/okim6258.cpp
+++ b/src/devices/sound/okim6258.cpp
@@ -50,6 +50,7 @@ okim6258_device::okim6258_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, OKIM6258, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_status(0),
+ m_start_divider(0),
m_divider(512),
m_adpcm_type(0),
m_data_in(0),
diff --git a/src/mame/audio/snes_snd.cpp b/src/devices/sound/s_dsp.cpp
index 8983b6df3a2..976fb33f5a2 100644
--- a/src/mame/audio/snes_snd.cpp
+++ b/src/devices/sound/s_dsp.cpp
@@ -2,9 +2,9 @@
// copyright-holders:R. Belmont, Brad Martin
/***************************************************************************
- snes_snd.cpp
+ s_dsp.cpp
- File to handle the sound emulation of the Nintendo Super NES.
+ File to handle the S-DSP emulation used in Nintendo Super NES.
By R. Belmont, adapted from OpenSPC 0.3.99 by Brad Martin with permission.
Thanks to Brad and also to Charles Bilyu? of SNeESe.
@@ -28,7 +28,7 @@
***************************************************************************/
#include "emu.h"
-#include "audio/snes_snd.h"
+#include "s_dsp.h"
/***************************************************************************
CONSTANTS AND MACROS
@@ -135,72 +135,42 @@ static const int ENVCNT[0x20]
};
-/* Make reading the ADSR code easier */
-#define SL( v ) (m_dsp_regs[((v) << 4) + 6] >> 5) /* Returns SUSTAIN level */
-#define SR( v ) (m_dsp_regs[((v) << 4) + 6] & 0x1f) /* Returns SUSTAIN rate */
+ALLOW_SAVE_TYPE(s_dsp_device::env_state_t32);
-/* Handle endianness */
-#define LEtoME16( x ) little_endianize_int16(x)
-#define MEtoLE16( x ) little_endianize_int16(x)
-ALLOW_SAVE_TYPE(snes_sound_device::env_state_t32);
+DEFINE_DEVICE_TYPE(S_DSP, s_dsp_device, "s_dsp", "Nintendo/Sony S-DSP")
-DEFINE_DEVICE_TYPE(SNES_SOUND, snes_sound_device, "snes_sound", "SNES Custom DSP (SPC700)")
-
-snes_sound_device::snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SNES_SOUND, tag, owner, clock)
+s_dsp_device::s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, S_DSP, tag, owner, clock)
, device_sound_interface(mconfig, *this)
+ , device_memory_interface(mconfig, *this)
+ , m_data_config("data", ENDIANNESS_LITTLE, 8, 16)
{
}
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
-void snes_sound_device::device_start()
+void s_dsp_device::device_start()
{
- m_channel = machine().sound().stream_alloc(*this, 0, 2, clock() / 64);
+ m_data = &space(0);
+ // Find our direct access
+ m_cache = m_data->cache<0, 0, ENDIANNESS_LITTLE>();
- m_ram = make_unique_clear<u8[]>(SNES_SPCRAM_SIZE);
-
- /* put IPL image at the top of RAM */
- memcpy(m_ipl_region, machine().root_device().memregion("sound_ipl")->base(), 64);
-
- m_tick_timer = timer_alloc(TIMER_TICK_ID);
+ m_channel = machine().sound().stream_alloc(*this, 0, 2, clock() / 64);
state_register();
- save_pointer(NAME(m_ram), SNES_SPCRAM_SIZE);
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
-void snes_sound_device::device_reset()
+void s_dsp_device::device_reset()
{
- int i;
- /* default to ROM visible */
- m_ram[0xf1] = 0x80;
-
- /* Sort out the ports */
- for (i = 0; i < 4; i++)
- {
- m_port_in[i] = 0;
- m_port_out[i] = 0;
- }
-
- for (i = 0; i < 3; i++)
- {
- m_timer_enabled[i] = false;
- m_TnDIV[i] = 256;
- m_counter[i] = 0;
- m_subcounter[i] = 0;
- }
-
- attotime period = attotime::from_ticks(32, clock());
- m_tick_timer->adjust(period, 0, period);
-
dsp_reset();
}
@@ -209,41 +179,19 @@ void snes_sound_device::device_reset()
// changes
//-------------------------------------------------
-void snes_sound_device::device_clock_changed()
+void s_dsp_device::device_clock_changed()
{
m_channel->set_sample_rate(clock() / 64);
- attotime period = attotime::from_ticks(32, clock());
- m_tick_timer->adjust(period, 0, period);
}
-inline void snes_sound_device::update_timer_tick(u8 which)
-{
- if (m_timer_enabled[which] == false)
- return;
-
- m_subcounter[which]++;
-
- // if timer channel is 0 or 1 we update at 64000/8
- if (m_subcounter[which] >= 8 || which == 2)
- {
- m_subcounter[which] = 0;
- m_counter[which]++;
- if (m_counter[which] >= m_TnDIV[which] ) // minus =
- {
- m_counter[which] = 0;
- m_ram[0xfd + which]++;
- m_ram[0xfd + which] &= 0x0f;
- }
- }
-}
+//-------------------------------------------------
+// memory_space_config - return a description of
+// any address spaces owned by this device
+//-------------------------------------------------
-void snes_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+device_memory_interface::space_config_vector s_dsp_device::memory_space_config() const
{
- if (id != TIMER_TICK_ID)
- throw emu_fatalerror("Unknown id in snes_sound_device::device_timer");
-
- for (int ch = 0; ch < 3; ch++)
- update_timer_tick(ch);
+ return space_config_vector{ std::make_pair(0, &m_data_config) };
}
@@ -258,7 +206,7 @@ void snes_sound_device::device_timer(emu_timer &timer, device_timer_id id, int p
Reset emulated DSP
-------------------------------------------------*/
-void snes_sound_device::dsp_reset()
+void s_dsp_device::dsp_reset()
{
#ifdef MAME_DEBUG
logerror("dsp_reset\n");
@@ -295,19 +243,18 @@ void snes_sound_device::dsp_reset()
to mix audio into
-------------------------------------------------*/
-void snes_sound_device::dsp_update( s16 *sound_ptr )
+void s_dsp_device::dsp_update( s16 *sound_ptr )
{
int V;
int envx;
int m;
- src_dir_type * sd;
int v;
int vl;
voice_state_type * vp;
int vr;
- sd = (src_dir_type *) &m_ram[(int) m_dsp_regs[0x5d] << 8];
+ const u16 sd = m_dsp_regs[0x5d];
/* Check for reset */
if (m_dsp_regs[0x6c] & 0x80)
@@ -355,9 +302,11 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
/* Voice was keyed on */
m_keys |= m;
m_keyed_on |= m;
+#ifdef DBG_KEY
vl = m_dsp_regs[(v << 4) + 4];
- vp->samp_id = *( u32 * )&sd[vl];
- vp->mem_ptr = LEtoME16(sd[vl].vptr);
+#endif
+ vp->samp_id = (vptr(sd, V) << 16) | lptr(sd, V);
+ vp->mem_ptr = vptr(sd, V);
#ifdef DBG_KEY
logerror("Keying on voice %d, samp=0x%04X (0x%02X)\n", v, vp->mem_ptr, vl);
@@ -409,7 +358,7 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
continue;
}
- vp->pitch = LEtoME16(*((u16 *)&m_dsp_regs[V + 2])) & 0x3fff;
+ vp->pitch = pitch(V);
#ifndef NO_PMOD
/* Pitch mod uses OUTX from last voice for this one. Luckily we haven't
@@ -445,7 +394,7 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
m_dsp_regs[0x7c] |= m;
if (vp->end & 2)
{
- vp->mem_ptr = LEtoME16(sd[m_dsp_regs[V + 4]].lptr);
+ vp->mem_ptr = lptr(sd, V);
#ifdef DBG_BRR
logerror("BRR looping to 0x%04X\n", vp->mem_ptr);
@@ -472,7 +421,7 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
}
vp->header_cnt = 8;
- vl = (u8)m_ram[vp->mem_ptr++];
+ vl = (u8)read_byte(vp->mem_ptr++);
vp->range = vl >> 4;
vp->end = vl & 3;
vp->filter = (vl & 12) >> 2;
@@ -485,13 +434,13 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
if (vp->half == 0)
{
vp->half = 1;
- outx = ((s8)m_ram[vp->mem_ptr]) >> 4;
+ outx = ((s8)read_byte(vp->mem_ptr)) >> 4;
}
else
{
vp->half = 0;
/* Funkiness to get 4-bit signed to carry through */
- outx = (s8)(m_ram[vp->mem_ptr++] << 4);
+ outx = (s8)(read_byte(vp->mem_ptr++) << 4);
outx >>= 4;
vp->header_cnt--;
}
@@ -644,8 +593,8 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
#endif
int echo_base = ((m_dsp_regs[0x6d] << 8) + m_echo_ptr) & 0xffff;
- m_fir_lbuf[m_fir_ptr] = (s16)LEtoME16(*(u16 *)&m_ram[echo_base]);
- m_fir_rbuf[m_fir_ptr] = (s16)LEtoME16(*(u16 *)&m_ram[echo_base + sizeof(s16)]);
+ m_fir_lbuf[m_fir_ptr] = (s16)read_word(echo_base);
+ m_fir_rbuf[m_fir_ptr] = (s16)read_word(echo_base + sizeof(s16));
/* Now, evaluate the FIR filter, and add the results into the final output. */
vl = m_fir_lbuf[m_fir_ptr] * (s8)m_dsp_regs[0x7f];
@@ -709,8 +658,8 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
logerror("Echo: Writing %04X,%04X at location %04X\n", (u16)echol, (u16)echor, echo_base);
#endif
- *(u16 *)&m_ram[echo_base] = MEtoLE16((u16)echol);
- *(u16 *)&m_ram[echo_base + sizeof(s16)] = MEtoLE16((u16)echor);
+ write_word(echo_base, (u16)echol);
+ write_word(echo_base + sizeof(s16), (u16)echor);
}
m_echo_ptr += 2 * sizeof(s16);
@@ -766,7 +715,7 @@ void snes_sound_device::dsp_update( s16 *sound_ptr )
to process envelope for.
-------------------------------------------------*/
-int snes_sound_device::advance_envelope( int v )
+int s_dsp_device::advance_envelope( int v )
{
int t;
@@ -1010,11 +959,11 @@ int snes_sound_device::advance_envelope( int v )
}
/*-------------------------------------------------
- spc700_set_volume - sets SPC700 volume level
+ set_volume - sets S-DSP volume level
for both speakers, used for fade in/out effects
-------------------------------------------------*/
-void snes_sound_device::set_volume(int volume)
+void s_dsp_device::set_volume(int volume)
{
m_channel->set_output_gain(0, volume / 100.0);
m_channel->set_output_gain(1, volume / 100.0);
@@ -1025,183 +974,56 @@ void snes_sound_device::set_volume(int volume)
I/O for DSP
***************************/
-u8 snes_sound_device::dsp_io_r(offs_t offset)
+u8 s_dsp_device::dsp_io_r(offs_t offset)
{
m_channel->update();
#ifdef NO_ENVX
- if (8 == (m_ram[0xf2] & 0x0f))
- m_dsp_regs[m_ram[0xf2]] = 0;
+ if (!machine().side_effects_disabled())
+ if (8 == (m_dsp_addr & 0x0f))
+ m_dsp_regs[m_dsp_addr] = 0;
#endif
/* All reads simply return the contents of the addressed register. */
- return m_dsp_regs[offset & 0x7f];
+ if (offset & 1)
+ return m_dsp_regs[m_dsp_addr & 0x7f];
+
+ return m_dsp_addr;
}
-void snes_sound_device::dsp_io_w(offs_t offset, u8 data)
+void s_dsp_device::dsp_io_w(offs_t offset, u8 data)
{
m_channel->update();
- if (offset == 0x7c)
+ if (offset & 1)
{
- /* Writes to register 0x7c (ENDX) clear ALL bits no matter which value is written */
- m_dsp_regs[offset] = 0;
- }
- else
- {
- /* All other writes store the value in the addressed register as expected. */
- m_dsp_regs[offset] = data;
- }
-}
-
-/***************************
- I/O for SPC700
- ***************************/
-
-u8 snes_sound_device::spc_io_r(offs_t offset)
-{
- switch (offset) /* Offset is from 0x00f0 */
- {
- case 0x0: //FIXME: Super Bomberman PBW reads from there, is it really write-only?
- return 0;
- case 0x1:
- return 0; //Super Kick Boxing reads port 1 and wants it to be zero.
- case 0x2: /* Register address */
- return m_ram[0xf2];
- case 0x3: /* Register data */
- return dsp_io_r(m_ram[0xf2]);
- case 0x4: /* Port 0 */
- case 0x5: /* Port 1 */
- case 0x6: /* Port 2 */
- case 0x7: /* Port 3 */
- // osd_printf_debug("%s SPC: rd %02x @ %d\n", machine().describe_context(), m_port_in[offset - 4], offset - 4);
- return m_port_in[offset - 4];
- case 0x8: //normal RAM, can be read even if the ram disabled flag ($f0 bit 1) is active
- case 0x9:
- return m_ram[0xf0 + offset];
- case 0xa: /* Timer 0 */
- case 0xb: /* Timer 1 */
- case 0xc: /* Timer 2 */
- break;
- case 0xd: /* Counter 0 */
- case 0xe: /* Counter 1 */
- case 0xf: /* Counter 2 */
+ if (!(m_dsp_addr & 0x80))
{
- u8 value = m_ram[0xf0 + offset] & 0x0f;
- m_ram[0xf0 + offset] = 0;
- return value;
- }
- }
-
- return 0;
-}
-
-void snes_sound_device::spc_io_w(offs_t offset, u8 data)
-{
- switch (offset) /* Offset is from 0x00f0 */
- {
- case 0x0:
- logerror("Warning: write to SOUND TEST register with data %02x!\n", data);
- break;
- case 0x1: /* Control */
- for (int i = 0; i < 3; i++)
- {
- if (BIT(data, i) && m_timer_enabled[i] == false)
- {
- m_subcounter[i] = 0;
- m_counter[i] = 0;
- m_ram[0xfd + i] = 0;
- }
-
- m_timer_enabled[i] = BIT(data, i);
- //m_timer[i]->enable(m_timer_enabled[i]);
- }
-
- if (BIT(data, 4))
+ offset = m_dsp_addr & 0x7f;
+ if (offset == 0x7c)
{
- m_port_in[0] = 0;
- m_port_in[1] = 0;
+ /* Writes to register 0x7c (ENDX) clear ALL bits no matter which value is written */
+ m_dsp_regs[offset & 0x7f] = 0;
}
-
- if (BIT(data, 5))
+ else
{
- m_port_in[2] = 0;
- m_port_in[3] = 0;
+ /* All other writes store the value in the addressed register as expected. */
+ m_dsp_regs[offset & 0x7f] = data;
}
-
- /* bit 7 = IPL ROM enable */
- break;
- case 0x2: /* Register address */
- break;
- case 0x3: /* Register data - 0x80-0xff is a read-only mirror of 0x00-0x7f */
- if (!(m_ram[0xf2] & 0x80))
- dsp_io_w(m_ram[0xf2] & 0x7f, data);
- break;
- case 0x4: /* Port 0 */
- case 0x5: /* Port 1 */
- case 0x6: /* Port 2 */
- case 0x7: /* Port 3 */
- // osd_printf_debug("%s SPC: %02x to APU @ %d\n", machine().describe_context(), data, offset & 3);
- m_port_out[offset - 4] = data;
- // Unneeded, we already run at perfect_interleave
- // machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
- break;
- case 0xa: /* Timer 0 */
- case 0xb: /* Timer 1 */
- case 0xc: /* Timer 2 */
- // if 0 then TnDiv is divided by 256, otherwise it's divided by 1 to 255
- if (data == 0)
- m_TnDIV[offset - 0xa] = 256;
- else
- m_TnDIV[offset - 0xa] = data;
- break;
- case 0xd: /* Counter 0 */
- case 0xe: /* Counter 1 */
- case 0xf: /* Counter 2 */
- return;
+ }
}
-
- m_ram[0xf0 + offset] = data;
-}
-
-u8 snes_sound_device::spc_ram_r(offs_t offset)
-{
- /* IPL ROM enabled */
- if (offset >= 0xffc0 && m_ram[0xf1] & 0x80)
- return m_ipl_region[offset & 0x3f];
-
- return m_ram[offset];
-}
-
-void snes_sound_device::spc_ram_w(offs_t offset, u8 data)
-{
- m_ram[offset] = data;
-}
-
-
-u8 snes_sound_device::spc_port_out(offs_t offset)
-{
- assert(offset < 4);
-
- return m_port_out[offset];
-}
-
-void snes_sound_device::spc_port_in(offs_t offset, u8 data)
-{
- assert(offset < 4);
-
- m_port_in[offset] = data;
+ else
+ m_dsp_addr = data;
}
-
/*****************************************************************************
DEVICE INTERFACE
*****************************************************************************/
-void snes_sound_device::state_register()
+void s_dsp_device::state_register()
{
+ save_item(NAME(m_dsp_addr));
save_item(NAME(m_dsp_regs));
- save_item(NAME(m_ipl_region));
save_item(NAME(m_keyed_on));
save_item(NAME(m_keys));
@@ -1216,14 +1038,6 @@ void snes_sound_device::state_register()
save_item(NAME(m_echo_ptr));
#endif
- save_item(NAME(m_timer_enabled));
- save_item(NAME(m_subcounter));
- save_item(NAME(m_counter));
- save_item(NAME(m_port_in));
- save_item(NAME(m_port_out));
-
- save_item(NAME(m_TnDIV));
-
for (int v = 0; v < 8; v++)
{
save_item(NAME(m_voice_state[v].mem_ptr), v);
@@ -1250,7 +1064,7 @@ void snes_sound_device::state_register()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void snes_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void s_dsp_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
s16 mix[2];
diff --git a/src/mame/audio/snes_snd.h b/src/devices/sound/s_dsp.h
index 81dffe6024d..296ac0c4dca 100644
--- a/src/mame/audio/snes_snd.h
+++ b/src/devices/sound/s_dsp.h
@@ -2,33 +2,26 @@
// copyright-holders:R. Belmont, Brad Martin
/*****************************************************************************
*
- * audio/snes_snd.h
+ * Nintendo/Sony S-DSP emulation
*
****************************************************************************/
-#ifndef MAME_AUDIO_SNES_SND_H
-#define MAME_AUDIO_SNES_SND_H
-
+#ifndef MAME_SOUND_S_DSP_H
+#define MAME_SOUND_S_DSP_H
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
-class snes_sound_device : public device_t, public device_sound_interface
+class s_dsp_device : public device_t, public device_sound_interface, public device_memory_interface
{
public:
- snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
void set_volume(int volume);
- u8 spc_io_r(offs_t offset);
- u8 spc_ram_r(offs_t offset);
- u8 spc_port_out(offs_t offset);
- void spc_io_w(offs_t offset, u8 data);
- void spc_ram_w(offs_t offset, u8 data);
- void spc_port_in(offs_t offset, u8 data);
-
-// u8 *spc_get_ram() { return m_ram; }
+ u8 dsp_io_r(offs_t offset);
+ void dsp_io_w(offs_t offset, u8 data);
protected:
// device-level overrides
@@ -38,9 +31,20 @@ protected:
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ // device_memory_interface configuration
+ virtual space_config_vector memory_space_config() const override;
+
+ address_space_config m_data_config;
private:
+ address_space *m_data;
+ memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_cache;
+ inline u8 read_byte(offs_t a) { return m_cache->read_byte(a); }
+ inline u16 read_word(offs_t a) { return read_byte(a) | (read_byte(a + 1) << 8); }
+ inline void write_byte(offs_t a, u8 d) { m_data->write_byte(a, d); }
+ inline void write_word(offs_t a, u16 d) { write_byte(a, d & 0xff); write_byte(a + 1, (d >> 8) & 0xff); }
+
enum class env_state_t32 : u8
{
ATTACK,
@@ -49,8 +53,6 @@ private:
RELEASE
};
- static constexpr unsigned SNES_SPCRAM_SIZE = 0x10000;
-
struct voice_state_type /* Voice state type */
{
u16 mem_ptr; /* Sample data memory pointer */
@@ -72,25 +74,23 @@ private:
s16 sampbuf[4]; /* Buffer for Gaussian interp */
};
- struct src_dir_type /* Source directory entry */
- {
- u16 vptr; /* Ptr to start of sample data */
- u16 lptr; /* Loop pointer in sample data */
- };
+ inline u16 vptr(u8 sd, u8 v) { return read_word((sd << 8) + (m_dsp_regs[v + 4] << 2)); } /* Ptr to start of sample data */
+ inline u16 lptr(u8 sd, u8 v) { return read_word((sd << 8) + (m_dsp_regs[v + 4] << 2) + 2); } /* Loop pointer in sample data */
+ inline u16 pitch(u8 v) { return (m_dsp_regs[v + 2] | (m_dsp_regs[v + 3] << 8)) & 0x3fff; }
+
+ /* Make reading the ADSR code easier */
+ inline u8 SL(u8 v) { return m_dsp_regs[(v << 4) + 6] >> 5; } /* Returns SUSTAIN level */
+ inline u8 SR(u8 v) { return m_dsp_regs[(v << 4) + 6] & 0x1f; } /* Returns SUSTAIN rate */
- u8 dsp_io_r(offs_t offset);
- void dsp_io_w(offs_t offset, u8 data);
-// TIMER_CALLBACK_MEMBER(spc_timer);
void dsp_reset();
void dsp_update(s16 *sound_ptr);
int advance_envelope(int v);
void state_register();
// internal state
- std::unique_ptr<u8[]> m_ram;
sound_stream *m_channel;
+ u8 m_dsp_addr;
u8 m_dsp_regs[256]; /* DSP registers */
- u8 m_ipl_region[64]; /* SPC top 64 bytes */
int m_keyed_on;
int m_keys; /* 8-bits for 8 voices */
@@ -108,25 +108,9 @@ private:
int m_echo_ptr;
#endif
- enum
- {
- TIMER_TICK_ID = 1
- };
- /* timers */
- emu_timer *m_tick_timer;
- bool m_timer_enabled[3];
- u16 m_counter[3];
- u8 m_subcounter[3];
- inline void update_timer_tick(u8 which);
-
- /* IO ports */
- u8 m_port_in[4]; /* SPC input ports */
- u8 m_port_out[4]; /* SPC output ports */
-
- u16 m_TnDIV[3]; /**< Timer N Divider */
};
-DECLARE_DEVICE_TYPE(SNES_SOUND, snes_sound_device)
+DECLARE_DEVICE_TYPE(S_DSP, s_dsp_device)
-#endif // MAME_AUDIO_SNES_SND_H
+#endif // MAME_SOUND_S_DSP_H
diff --git a/src/devices/sound/vgm_visualizer.cpp b/src/devices/sound/vgm_visualizer.cpp
index bceeed2b0d6..cc8041f6d36 100644
--- a/src/devices/sound/vgm_visualizer.cpp
+++ b/src/devices/sound/vgm_visualizer.cpp
@@ -17,6 +17,7 @@
#include <cmath>
+constexpr int vgmviz_device::SCREEN_HEIGHT;
constexpr float lerp(float a, float b, float f)
{
@@ -33,6 +34,16 @@ DEFINE_DEVICE_TYPE(VGMVIZ, vgmviz_device, "vgmviz", "VGM Visualizer")
+/*static*/ const bool vgmviz_device::NEEDS_FFT[VIZ_COUNT] =
+{
+ false, // VIZ_WAVEFORM
+ true, // VIZ_WATERFALL
+ true, // VIZ_RAWSPEC
+ true, // VIZ_BARSPEC4
+ true, // VIZ_BARSPEC8
+ true // VIZ_BARSPEC16
+};
+
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
@@ -147,23 +158,17 @@ void vgmviz_device::apply_fft()
void vgmviz_device::apply_waterfall()
{
int total_bars = FFT_LENGTH / 2;
- int bar_step = total_bars / 256;
WDL_FFT_COMPLEX* bins[2] = { (WDL_FFT_COMPLEX*)m_fft_buf[0], (WDL_FFT_COMPLEX*)m_fft_buf[1] };
- int bar_index = 0;
- for (int bar = 0; bar < 256; bar++, bar_index += bar_step)
+ for (int bar = 0; bar < std::min<int>(total_bars, SCREEN_HEIGHT); bar++)
{
- if (bar_index < 2)
+ if (bar < 2)
{
continue;
}
- float val = 0.0f;
- for (int i = 0; i < bar_step; i++)
- {
- int permuted = WDL_fft_permute(FFT_LENGTH / 2, (bar * bar_step) + i);
- val = std::max<WDL_FFT_REAL>(bins[0][permuted].re + bins[1][permuted].re, val);
- }
+ int permuted = WDL_fft_permute(FFT_LENGTH / 2, bar);
+ float val = bins[0][permuted].re + bins[1][permuted].re;
int level = int(logf(val * 32768.0f) * 31.0f);
- m_waterfall_buf[m_waterfall_length % (FFT_LENGTH / 2 + 16)][255 - bar] = (level < 0) ? 0 : (level > 255 ? 255 : level);
+ m_waterfall_buf[m_waterfall_length % SCREEN_WIDTH][total_bars - bar] = (level < 0) ? 0 : (level > 255 ? 255 : level);
}
m_waterfall_length++;
}
@@ -242,10 +247,29 @@ void vgmviz_device::device_reset()
memset(m_curr_peaks, 0, sizeof(float) * 2);
m_waterfall_length = 0;
- for (int i = 0; i < 1024; i++)
+ for (int i = 0; i < SCREEN_WIDTH; i++)
{
memset(m_waterfall_buf[i], 0, sizeof(int) * 256);
}
+
+ m_viz_mode = VIZ_WAVEFORM;
+
+ m_history_length = 0;
+}
+
+
+//-------------------------------------------------
+// cycle_spectrogram - cycle the visualization
+// mode among the valid modes.
+//-------------------------------------------------
+
+void vgmviz_device::cycle_viz_mode()
+{
+ m_viz_mode = (viz_mode)((int)m_viz_mode + 1);
+ if (m_viz_mode == VIZ_COUNT)
+ {
+ m_viz_mode = VIZ_WAVEFORM;
+ }
}
@@ -275,26 +299,67 @@ void vgmviz_device::sound_stream_update(sound_stream &stream, stream_sample_t **
for (int i = 0; i < m_outputs; i++)
{
- m_audio_buf[m_audio_fill_index][i][m_audio_count[m_audio_fill_index]] = (outputs[i][pos] + 32768.0f) / 65336.0f;
+ const float sample = (float)(int16_t)outputs[i][pos] / 65336.0f;
+ m_audio_buf[m_audio_fill_index][i][m_audio_count[m_audio_fill_index]] = sample + 0.5f;
}
- m_audio_count[m_audio_fill_index]++;
- if (m_audio_count[m_audio_fill_index] >= FFT_LENGTH)
+ switch (m_viz_mode)
{
- apply_window(m_audio_fill_index);
- apply_fft();
- apply_waterfall();
+ default:
+ update_waveform(outputs);
+ break;
+ case VIZ_WATERFALL:
+ case VIZ_RAWSPEC:
+ case VIZ_BARSPEC4:
+ case VIZ_BARSPEC8:
+ case VIZ_BARSPEC16:
+ update_fft(outputs);
+ break;
+ }
+ }
+}
- m_audio_fill_index = 1 - m_audio_fill_index;
- if (m_audio_frames_available < 2)
- {
- m_audio_frames_available++;
- }
- m_audio_count[m_audio_fill_index] = 0;
+
+//-------------------------------------------------
+// update_waveform - perform a wave-style update
+//-------------------------------------------------
+
+void vgmviz_device::update_waveform(stream_sample_t **outputs)
+{
+ m_history_length++;
+ m_audio_count[m_audio_fill_index]++;
+ if (m_audio_count[m_audio_fill_index] >= FFT_LENGTH)
+ {
+ m_audio_fill_index = 1 - m_audio_fill_index;
+ if (m_audio_frames_available < 2)
+ {
+ m_audio_frames_available++;
}
+ m_audio_count[m_audio_fill_index] = 0;
}
}
+//-------------------------------------------------
+// update_fft - keep the FFT up-to-date
+//-------------------------------------------------
+
+void vgmviz_device::update_fft(stream_sample_t **outputs)
+{
+ m_audio_count[m_audio_fill_index]++;
+ if (m_audio_count[m_audio_fill_index] >= FFT_LENGTH)
+ {
+ apply_window(m_audio_fill_index);
+ apply_fft();
+ apply_waterfall();
+
+ m_audio_fill_index = 1 - m_audio_fill_index;
+ if (m_audio_frames_available < 2)
+ {
+ m_audio_frames_available++;
+ }
+ m_audio_count[m_audio_fill_index] = 0;
+ }
+}
//-------------------------------------------------
// init_palette - initialize the palette
@@ -406,8 +471,8 @@ void vgmviz_device::device_add_mconfig(machine_config &config)
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
- m_screen->set_size(FFT_LENGTH / 2 + 16, 768);
- m_screen->set_visarea(0, FFT_LENGTH / 2 + 15, 0, 767);
+ m_screen->set_size(SCREEN_WIDTH, SCREEN_HEIGHT);
+ m_screen->set_visarea(0, SCREEN_WIDTH-1, 0, SCREEN_HEIGHT-1);
m_screen->set_screen_update(FUNC(vgmviz_device::screen_update));
PALETTE(config, m_palette, FUNC(vgmviz_device::init_palette), 512 + FFT_LENGTH / 2 + 1);
@@ -420,11 +485,35 @@ void vgmviz_device::device_add_mconfig(machine_config &config)
uint32_t vgmviz_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- find_levels();
+ bitmap.fill(0, cliprect);
+ switch (m_viz_mode)
+ {
+ default:
+ draw_waveform(bitmap);
+ break;
+ case VIZ_WATERFALL:
+ draw_waterfall(bitmap);
+ break;
+ case VIZ_RAWSPEC:
+ case VIZ_BARSPEC4:
+ case VIZ_BARSPEC8:
+ case VIZ_BARSPEC16:
+ draw_spectrogram(bitmap);
+ break;
+ }
+ return 0;
+}
+
+void vgmviz_device::draw_spectrogram(bitmap_rgb32 &bitmap)
+{
const pen_t *pal = m_palette->pens();
- int chan_x = 0;
const int black_idx = (512 + FFT_LENGTH / 2);
+
+ /*
+ find_levels();
+
+ int chan_x = 0;
for (int chan = 0; chan < 2; chan++)
{
int level = int(m_curr_levels[chan] * 255.0f);
@@ -442,44 +531,129 @@ uint32_t vgmviz_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
chan_x += 8;
m_curr_peaks[chan] *= 0.99f;
}
+ */
+
+ int bar_size = 1;
+ switch (m_viz_mode)
+ {
+ default:
+ bar_size = 1;
+ break;
+ case VIZ_BARSPEC4:
+ bar_size = 4;
+ break;
+ case VIZ_BARSPEC8:
+ bar_size = 8;
+ break;
+ case VIZ_BARSPEC16:
+ bar_size = 16;
+ break;
+ }
int total_bars = FFT_LENGTH / 2;
WDL_FFT_COMPLEX *bins[2] = { (WDL_FFT_COMPLEX *)m_fft_buf[0], (WDL_FFT_COMPLEX *)m_fft_buf[1] };
- for (int bar = 0; bar < total_bars; bar++)
+ for (int bar = 0; bar < total_bars && bar < SCREEN_WIDTH; bar += bar_size)
{
if (bar < 2)
{
continue;
}
- int permuted = WDL_fft_permute(FFT_LENGTH/2, bar);
- float val = (bins[0][permuted].re + bins[1][permuted].re) * 0.5f;
- int level = int(logf(val * 32768.0f) * 63.0f);
- for (int y = 0; y < 512; y++)
+ float max_val = 0.0f;
+ for (int sub_bar = 0; sub_bar < bar_size && (bar + sub_bar) < total_bars; sub_bar++)
+ {
+ int permuted = WDL_fft_permute(FFT_LENGTH/2, bar + sub_bar);
+ max_val = std::max<float>((bins[0][permuted].re + bins[1][permuted].re) * 0.5f, max_val);
+ }
+ int level = int(logf(max_val * 32768.0f) * 96.0f);
+ for (int y = 0; y < SCREEN_HEIGHT; y++)
{
- int bar_y = 511 - y;
- uint32_t *line = &bitmap.pix32(y + 256);
+ int bar_y = SCREEN_HEIGHT - y;
+ uint32_t *line = &bitmap.pix32(y);
bool lit = bar_y <= level;
- line[bar + 16] = pal[lit ? (256 + bar) : black_idx];
+ const int x_limit = bar_size == 1 ? 1 : bar_size - 1;
+ for (int x = 0; x < x_limit; x++)
+ {
+ line[(bar - 2) + x] = pal[lit ? (256 + bar) : black_idx];
+ }
}
}
+}
- const int width = FFT_LENGTH / 2 + 16;
- for (int y = 0; y < 256; y++)
+void vgmviz_device::draw_waterfall(bitmap_rgb32 &bitmap)
+{
+ const pen_t *pal = m_palette->pens();
+ float tex_height = ((float)FFT_LENGTH / 2) - 1.0f;
+ for (int y = 0; y < SCREEN_HEIGHT; y++)
{
+ const float v0 = (float)y / SCREEN_HEIGHT;
+ const float v1 = (float)(y + 1) / SCREEN_HEIGHT;
+ const float v0h = v0 * tex_height;
+ const float v1h = v1 * tex_height;
+ const int v0_index = (int)v0h;
+ const int v1_index = (int)v1h;
+ const float interp = v0h - (float)v0_index;
uint32_t* line = &bitmap.pix32(y);
- for (int x = 0; x < width; x++)
+ for (int x = 0; x < SCREEN_WIDTH; x++)
{
- if (m_waterfall_length < width)
+ if (m_waterfall_length < SCREEN_WIDTH)
{
- const int sample = m_waterfall_buf[x][y];
+ const float s0 = m_waterfall_buf[x][v0_index];
+ const float s1 = m_waterfall_buf[x][v1_index];
+ const int sample = (int)std::round(lerp(s0, s1, interp));
*line++ = pal[256 + FFT_LENGTH / 2 + sample];
}
else
{
- const int sample = m_waterfall_buf[((m_waterfall_length - width) + x) % width][y];
+ const int x_index = ((m_waterfall_length - SCREEN_WIDTH) + x) % SCREEN_WIDTH;
+ const float s0 = m_waterfall_buf[x_index][v0_index];
+ const float s1 = m_waterfall_buf[x_index][v1_index];
+ const int sample = (int)std::round(lerp(s0, s1, interp));
*line++ = pal[256 + FFT_LENGTH / 2 + sample];
}
}
}
- return 0;
+}
+
+void vgmviz_device::draw_waveform(bitmap_rgb32 &bitmap)
+{
+ static const uint32_t MED_GRAY = 0xff7f7f7f;
+ static const uint32_t WHITE = 0xffffffff;
+ static const uint32_t LEFT_COLOR = 0xffbf0000;
+ static const uint32_t RIGHT_COLOR = 0xff00bf00;
+ static const int CHANNEL_HEIGHT = (SCREEN_HEIGHT / 2) - 1;
+ static const int CHANNEL_CENTER = CHANNEL_HEIGHT / 2;
+
+ if (m_audio_frames_available == 0)
+ return;
+
+ for (int x = 0; x < SCREEN_WIDTH; x++)
+ {
+ bitmap.pix32(CHANNEL_CENTER, x) = MED_GRAY;
+ bitmap.pix32(CHANNEL_HEIGHT + 1 + CHANNEL_CENTER, x) = MED_GRAY;
+
+ const float raw_l = m_audio_buf[1 - m_audio_fill_index][0][((int)m_history_length + 1 + x) % FFT_LENGTH];
+ const int sample_l = (int)((raw_l - 0.5f) * (CHANNEL_HEIGHT - 1));
+ const int dy_l = (sample_l == 0) ? 0 : ((sample_l < 0) ? -1 : 1);
+ const int endy_l = CHANNEL_CENTER;
+ int y = endy_l - sample_l;
+ do
+ {
+ bitmap.pix32(y, x) = LEFT_COLOR;
+ y += dy_l;
+ } while(y != endy_l);
+
+ const float raw_r = m_audio_buf[1 - m_audio_fill_index][1][((int)m_history_length + 1 + x) % FFT_LENGTH];
+ const int sample_r = (int)((raw_r - 0.5f) * (CHANNEL_HEIGHT - 1));
+ const int dy_r = (sample_r == 0) ? 0 : ((sample_r < 0) ? -1 : 1);
+ const int endy_r = CHANNEL_HEIGHT + 1 + CHANNEL_CENTER;
+ y = endy_r - sample_r;
+ do
+ {
+ bitmap.pix32(y, x) = RIGHT_COLOR;
+ y += dy_r;
+ } while(y != endy_r);
+
+ bitmap.pix32(CHANNEL_HEIGHT, x) = WHITE;
+ bitmap.pix32(CHANNEL_HEIGHT + 1, x) = WHITE;
+ }
}
diff --git a/src/devices/sound/vgm_visualizer.h b/src/devices/sound/vgm_visualizer.h
index 7e782a59bcc..af713384e82 100644
--- a/src/devices/sound/vgm_visualizer.h
+++ b/src/devices/sound/vgm_visualizer.h
@@ -46,8 +46,29 @@ public:
vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
virtual ~vgmviz_device();
+ void cycle_viz_mode();
+ void toggle_normalize();
+
protected:
- static constexpr int FFT_LENGTH = 1024;
+ enum viz_mode : int
+ {
+ VIZ_WAVEFORM,
+ VIZ_WATERFALL,
+ VIZ_SPEC_START,
+ VIZ_RAWSPEC = VIZ_SPEC_START,
+ VIZ_BARSPEC4,
+ VIZ_BARSPEC8,
+ VIZ_BARSPEC16,
+ VIZ_SPEC_END = VIZ_BARSPEC16,
+
+ VIZ_COUNT
+ };
+
+ static constexpr int FFT_LENGTH = 512;
+ static constexpr int BUF_LENGTH = FFT_LENGTH;
+ static constexpr int SCREEN_WIDTH = FFT_LENGTH / 2;
+ static constexpr int SCREEN_HEIGHT = 768;
+ static constexpr size_t NORMALIZE_BUF_SIZE = 131072;
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
@@ -57,9 +78,15 @@ protected:
// device_sound_interface-level overrides
void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ void update_waveform(stream_sample_t **outputs);
+ void update_fft(stream_sample_t **outputs);
+
void init_palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void draw_waveform(bitmap_rgb32 &bitmap);
+ void draw_waterfall(bitmap_rgb32 &bitmap);
+ void draw_spectrogram(bitmap_rgb32 &bitmap);
void fill_window();
void apply_window(uint32_t buf_index);
@@ -70,6 +97,7 @@ protected:
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ uint32_t m_history_length;
float m_audio_buf[2][2][FFT_LENGTH];
float m_fft_buf[2][FFT_LENGTH];
int m_current_rate;
@@ -79,11 +107,16 @@ protected:
bool m_audio_available;
int m_waterfall_length;
- int m_waterfall_buf[1024][256];
+ int m_waterfall_buf[SCREEN_WIDTH * 2][FFT_LENGTH / 2];
+
float m_curr_levels[2];
float m_curr_peaks[2];
+
float m_window[FFT_LENGTH];
- float m_power;
+
+ viz_mode m_viz_mode;
+
+ static const bool NEEDS_FFT[VIZ_COUNT];
};
#endif // MAME_SOUND_VGMVIZ_H
diff --git a/src/devices/sound/ym2151.cpp b/src/devices/sound/ym2151.cpp
index 64b02822644..3a5b1076c00 100644
--- a/src/devices/sound/ym2151.cpp
+++ b/src/devices/sound/ym2151.cpp
@@ -6,6 +6,7 @@
DEFINE_DEVICE_TYPE(YM2151, ym2151_device, "ym2151", "Yamaha YM2151 OPM")
DEFINE_DEVICE_TYPE(YM2164, ym2164_device, "ym2164", "Yamaha YM2164 OPP")
+DEFINE_DEVICE_TYPE(YM2414, ym2414_device, "ym2414", "Yamaha YM2414 OPZ")
#define FREQ_SH 16 /* 16.16 fixed point (frequency calculations) */
@@ -1716,6 +1717,16 @@ ym2164_device::ym2164_device(const machine_config &mconfig, const char *tag, dev
//-------------------------------------------------
+// ym2414_device - constructor
+//-------------------------------------------------
+
+ym2414_device::ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : ym2151_device(mconfig, YM2414, tag, owner, clock)
+{
+}
+
+
+//-------------------------------------------------
// read - read from the device
//-------------------------------------------------
diff --git a/src/devices/sound/ym2151.h b/src/devices/sound/ym2151.h
index ee32c6f3ed6..d5e455f3fbd 100644
--- a/src/devices/sound/ym2151.h
+++ b/src/devices/sound/ym2151.h
@@ -282,10 +282,19 @@ protected:
virtual void write_reg(int r, int v) override;
};
+// ======================> ym2414_device
+
+class ym2414_device : public ym2151_device
+{
+public:
+ // construction/destruction
+ ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+};
// device type definition
DECLARE_DEVICE_TYPE(YM2151, ym2151_device)
DECLARE_DEVICE_TYPE(YM2164, ym2164_device)
+DECLARE_DEVICE_TYPE(YM2414, ym2414_device)
#endif // MAME_SOUND_YM2151_H
diff --git a/src/devices/video/hd63484.cpp b/src/devices/video/hd63484.cpp
index 1ae83881fbc..e0b08389492 100644
--- a/src/devices/video/hd63484.cpp
+++ b/src/devices/video/hd63484.cpp
@@ -1914,92 +1914,104 @@ void hd63484_device::video_registers_w(int offset)
}
}
-READ16_MEMBER( hd63484_device::status16_r )
+uint16_t hd63484_device::read16(offs_t offset)
{
- // kothello is coded so that upper byte of this should be 0xff (tests with jc opcode). Maybe it's just unconnected?
- return m_sr | 0xff00;
-}
-
-READ16_MEMBER( hd63484_device::data16_r )
-{
- uint16_t res;
-
- if(m_ar == 0) // FIFO read
+ if (BIT(offset, 0))
{
- uint8_t data;
+ // Read control register
+ uint16_t res;
- dequeue_r(&data);
- res = (data & 0xff) << 8;
- dequeue_r(&data);
- res |= data & 0xff;
- }
- else
- res = video_registers_r(m_ar);
+ if(m_ar == 0) // FIFO read
+ {
+ uint8_t data;
- inc_ar(2);
+ dequeue_r(&data);
+ res = (data & 0xff) << 8;
+ dequeue_r(&data);
+ res |= data & 0xff;
+ }
+ else
+ res = video_registers_r(m_ar);
- return res;
-}
+ inc_ar(2);
-WRITE16_MEMBER( hd63484_device::address16_w )
-{
- if(ACCESSING_BITS_0_7)
- m_ar = data & 0xfe;
+ return res;
+ }
+ else
+ {
+ // Read status register
+ // kothello is coded so that upper byte of this should be 0xff (tests with jc opcode). Maybe it's just open bus?
+ return m_sr | 0xff00;
+ }
}
-WRITE16_MEMBER( hd63484_device::data16_w )
+void hd63484_device::write16(offs_t offset, uint16_t data)
{
- if(ACCESSING_BITS_8_15)
+ if (BIT(offset, 0))
+ {
+ // Write control register
m_vreg[m_ar] = (data & 0xff00) >> 8;
-
- if(ACCESSING_BITS_0_7)
m_vreg[m_ar+1] = (data & 0xff);
- video_registers_w(m_ar);
+ video_registers_w(m_ar);
- inc_ar(2);
+ inc_ar(2);
+ }
+ else
+ {
+ // Write address register
+ m_ar = data & 0xfe;
+ }
}
-READ8_MEMBER( hd63484_device::status8_r )
+uint8_t hd63484_device::read8(offs_t offset)
{
- return m_sr;
-}
+ if (BIT(offset, 0))
+ {
+ // Read control register
+ uint8_t res = 0xff;
-WRITE8_MEMBER( hd63484_device::address8_w )
-{
- m_ar = data;
-}
+ if(m_ar < 2) // FIFO read
+ dequeue_r(&res);
+ else
+ res = video_registers_r(m_ar & 0xfe) >> (m_ar & 1 ? 0 : 8);
-READ8_MEMBER( hd63484_device::data8_r )
-{
- uint8_t res = 0xff;
+ inc_ar(1);
- if(m_ar < 2) // FIFO read
- dequeue_r(&res);
+ return res;
+ }
else
- res = video_registers_r(m_ar & 0xfe) >> (m_ar & 1 ? 0 : 8);
-
- inc_ar(1);
-
- return res;
+ {
+ // Read status register
+ return m_sr;
+ }
}
-WRITE8_MEMBER( hd63484_device::data8_w )
+void hd63484_device::write8(offs_t offset, uint8_t data)
{
- m_vreg[m_ar] = data;
-
- if(m_ar < 2) // FIFO write
+ if (BIT(offset, 0))
{
- queue_w(data);
- if (m_ar & 1)
- process_fifo();
+ // Write control register
+ m_vreg[m_ar] = data;
- m_ar ^= 1;
+ if(m_ar < 2) // FIFO write
+ {
+ queue_w(data);
+ if (m_ar & 1)
+ process_fifo();
+
+ m_ar ^= 1;
+ }
+ else
+ video_registers_w(m_ar & 0xfe);
+
+ inc_ar(1);
}
else
- video_registers_w(m_ar & 0xfe);
-
- inc_ar(1);
+ {
+ // Write address register
+ m_ar = data;
+ }
}
void hd63484_device::device_start()
diff --git a/src/devices/video/hd63484.h b/src/devices/video/hd63484.h
index 508579aed73..7b3d8fb1225 100644
--- a/src/devices/video/hd63484.h
+++ b/src/devices/video/hd63484.h
@@ -31,15 +31,13 @@ public:
void set_auto_configure_screen(bool auto_configure_screen) { m_auto_configure_screen = auto_configure_screen; }
void set_external_skew(int skew) { m_external_skew = skew; }
- DECLARE_WRITE16_MEMBER( address16_w );
- DECLARE_WRITE16_MEMBER( data16_w );
- DECLARE_READ16_MEMBER( status16_r );
- DECLARE_READ16_MEMBER( data16_r );
-
- DECLARE_WRITE8_MEMBER( address8_w );
- DECLARE_WRITE8_MEMBER( data8_w );
- DECLARE_READ8_MEMBER( status8_r );
- DECLARE_READ8_MEMBER( data8_r );
+ // 16-bit bus interface
+ void write16(offs_t offset, uint16_t data);
+ uint16_t read16(offs_t offset);
+
+ // 8-bit bus interface
+ void write8(offs_t offset, uint8_t data);
+ uint8_t read8(offs_t offset);
uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual const tiny_rom_entry *device_rom_region() const override;
diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index f5a7f7148e9..db89bd2fd78 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -2221,12 +2221,12 @@ WRITE8_MEMBER(vga_device::mem_w)
}
}
-READ8_MEMBER(vga_device::mem_linear_r)
+uint8_t vga_device::mem_linear_r(offs_t offset)
{
return vga.memory[offset % vga.svga_intf.vram_size];
}
-WRITE8_MEMBER(vga_device::mem_linear_w)
+void vga_device::mem_linear_w(offs_t offset, uint8_t data)
{
vga.memory[offset % vga.svga_intf.vram_size] = data;
}
@@ -3328,9 +3328,8 @@ READ8_MEMBER(ati_vga_device::port_03c0_r)
void ibm8514a_device::ibm8514_write_fg(uint32_t offset)
{
- address_space &space = machine().dummy_space();
offset %= m_vga->vga.svga_intf.vram_size;
- uint8_t dst = m_vga->mem_linear_r(space,offset,0xff);
+ uint8_t dst = m_vga->mem_linear_r(offset);
uint8_t src = 0;
// check clipping rectangle
@@ -3357,7 +3356,7 @@ void ibm8514a_device::ibm8514_write_fg(uint32_t offset)
break;
case 0x0060:
// video memory - presume the memory is sourced from the current X/Y co-ords
- src = m_vga->mem_linear_r(space,((ibm8514.curr_y * IBM8514_LINE_LENGTH) + ibm8514.curr_x),0xff);
+ src = m_vga->mem_linear_r(((ibm8514.curr_y * IBM8514_LINE_LENGTH) + ibm8514.curr_x));
break;
}
@@ -3365,61 +3364,60 @@ void ibm8514a_device::ibm8514_write_fg(uint32_t offset)
switch(ibm8514.fgmix & 0x000f)
{
case 0x0000:
- m_vga->mem_linear_w(space,offset,~dst,0xff);
+ m_vga->mem_linear_w(offset,~dst);
break;
case 0x0001:
- m_vga->mem_linear_w(space,offset,0x00,0xff);
+ m_vga->mem_linear_w(offset,0x00);
break;
case 0x0002:
- m_vga->mem_linear_w(space,offset,0xff,0xff);
+ m_vga->mem_linear_w(offset,0xff);
break;
case 0x0003:
- m_vga->mem_linear_w(space,offset,dst,0xff);
+ m_vga->mem_linear_w(offset,dst);
break;
case 0x0004:
- m_vga->mem_linear_w(space,offset,~src,0xff);
+ m_vga->mem_linear_w(offset,~src);
break;
case 0x0005:
- m_vga->mem_linear_w(space,offset,src ^ dst,0xff);
+ m_vga->mem_linear_w(offset,src ^ dst);
break;
case 0x0006:
- m_vga->mem_linear_w(space,offset,~(src ^ dst),0xff);
+ m_vga->mem_linear_w(offset,~(src ^ dst));
break;
case 0x0007:
- m_vga->mem_linear_w(space,offset,src,0xff);
+ m_vga->mem_linear_w(offset,src);
break;
case 0x0008:
- m_vga->mem_linear_w(space,offset,~(src & dst),0xff);
+ m_vga->mem_linear_w(offset,~(src & dst));
break;
case 0x0009:
- m_vga->mem_linear_w(space,offset,(~src) | dst,0xff);
+ m_vga->mem_linear_w(offset,(~src) | dst);
break;
case 0x000a:
- m_vga->mem_linear_w(space,offset,src | (~dst),0xff);
+ m_vga->mem_linear_w(offset,src | (~dst));
break;
case 0x000b:
- m_vga->mem_linear_w(space,offset,src | dst,0xff);
+ m_vga->mem_linear_w(offset,src | dst);
break;
case 0x000c:
- m_vga->mem_linear_w(space,offset,src & dst,0xff);
+ m_vga->mem_linear_w(offset,src & dst);
break;
case 0x000d:
- m_vga->mem_linear_w(space,offset,src & (~dst),0xff);
+ m_vga->mem_linear_w(offset,src & (~dst));
break;
case 0x000e:
- m_vga->mem_linear_w(space,offset,(~src) & dst,0xff);
+ m_vga->mem_linear_w(offset,(~src) & dst);
break;
case 0x000f:
- m_vga->mem_linear_w(space,offset,~(src | dst),0xff);
+ m_vga->mem_linear_w(offset,~(src | dst));
break;
}
}
void ibm8514a_device::ibm8514_write_bg(uint32_t offset)
{
- address_space &space = machine().dummy_space();
offset %= m_vga->vga.svga_intf.vram_size;
- uint8_t dst = m_vga->mem_linear_r(space,offset,0xff);
+ uint8_t dst = m_vga->mem_linear_r(offset);
uint8_t src = 0;
// check clipping rectangle
@@ -3446,7 +3444,7 @@ void ibm8514a_device::ibm8514_write_bg(uint32_t offset)
break;
case 0x0060:
// video memory - presume the memory is sourced from the current X/Y co-ords
- src = m_vga->mem_linear_r(space,((ibm8514.curr_y * IBM8514_LINE_LENGTH) + ibm8514.curr_x),0xff);
+ src = m_vga->mem_linear_r(((ibm8514.curr_y * IBM8514_LINE_LENGTH) + ibm8514.curr_x));
break;
}
@@ -3454,52 +3452,52 @@ void ibm8514a_device::ibm8514_write_bg(uint32_t offset)
switch(ibm8514.bgmix & 0x000f)
{
case 0x0000:
- m_vga->mem_linear_w(space,offset,~dst,0xff);
+ m_vga->mem_linear_w(offset,~dst);
break;
case 0x0001:
- m_vga->mem_linear_w(space,offset,0x00,0xff);
+ m_vga->mem_linear_w(offset,0x00);
break;
case 0x0002:
- m_vga->mem_linear_w(space,offset,0xff,0xff);
+ m_vga->mem_linear_w(offset,0xff);
break;
case 0x0003:
- m_vga->mem_linear_w(space,offset,dst,0xff);
+ m_vga->mem_linear_w(offset,dst);
break;
case 0x0004:
- m_vga->mem_linear_w(space,offset,~src,0xff);
+ m_vga->mem_linear_w(offset,~src);
break;
case 0x0005:
- m_vga->mem_linear_w(space,offset,src ^ dst,0xff);
+ m_vga->mem_linear_w(offset,src ^ dst);
break;
case 0x0006:
- m_vga->mem_linear_w(space,offset,~(src ^ dst),0xff);
+ m_vga->mem_linear_w(offset,~(src ^ dst));
break;
case 0x0007:
- m_vga->mem_linear_w(space,offset,src,0xff);
+ m_vga->mem_linear_w(offset,src);
break;
case 0x0008:
- m_vga->mem_linear_w(space,offset,~(src & dst),0xff);
+ m_vga->mem_linear_w(offset,~(src & dst));
break;
case 0x0009:
- m_vga->mem_linear_w(space,offset,(~src) | dst,0xff);
+ m_vga->mem_linear_w(offset,(~src) | dst);
break;
case 0x000a:
- m_vga->mem_linear_w(space,offset,src | (~dst),0xff);
+ m_vga->mem_linear_w(offset,src | (~dst));
break;
case 0x000b:
- m_vga->mem_linear_w(space,offset,src | dst,0xff);
+ m_vga->mem_linear_w(offset,src | dst);
break;
case 0x000c:
- m_vga->mem_linear_w(space,offset,src & dst,0xff);
+ m_vga->mem_linear_w(offset,src & dst);
break;
case 0x000d:
- m_vga->mem_linear_w(space,offset,src & (~dst),0xff);
+ m_vga->mem_linear_w(offset,src & (~dst));
break;
case 0x000e:
- m_vga->mem_linear_w(space,offset,(~src) & dst,0xff);
+ m_vga->mem_linear_w(offset,(~src) & dst);
break;
case 0x000f:
- m_vga->mem_linear_w(space,offset,~(src | dst),0xff);
+ m_vga->mem_linear_w(offset,~(src | dst));
break;
}
}
@@ -3547,7 +3545,7 @@ void ibm8514a_device::ibm8514_write(uint32_t offset, uint32_t src)
ibm8514.src_x = 0;
break;
case 0x00c0: // use source plane
- if (m_vga->mem_linear_r(machine().dummy_space(), src, 0xff) != 0x00)
+ if (m_vga->mem_linear_r(src) != 0x00)
ibm8514_write_fg(offset);
else
ibm8514_write_bg(offset);
@@ -3885,7 +3883,7 @@ WRITE16_MEMBER(ibm8514a_device::ibm8514_cmd_w)
if((ibm8514.pixel_control & 0xc0) == 0xc0)
{
// only check read mask if Mix Select is set to 11 (VRAM determines mix)
- if(m_vga->mem_linear_r(space,(src+x),0xff) & ~readmask)
+ if(m_vga->mem_linear_r((src+x)) & ~readmask)
{
// presumably every program is going to be smart enough to set the FG mix to use VRAM (0x6x)
if(data & 0x0020)
diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h
index 22d8ba33a65..ce05567d4cc 100644
--- a/src/devices/video/pc_vga.h
+++ b/src/devices/video/pc_vga.h
@@ -34,8 +34,8 @@ public:
virtual WRITE8_MEMBER(port_03d0_w);
virtual READ8_MEMBER(mem_r);
virtual WRITE8_MEMBER(mem_w);
- virtual READ8_MEMBER(mem_linear_r);
- virtual WRITE8_MEMBER(mem_linear_w);
+ virtual uint8_t mem_linear_r(offs_t offset);
+ virtual void mem_linear_w(offs_t offset,uint8_t data);
virtual TIMER_CALLBACK_MEMBER(vblank_timer_cb);
void set_offset(uint16_t val) { vga.crtc.offset = val; }
diff --git a/src/devices/video/ppu2c0x_vt.cpp b/src/devices/video/ppu2c0x_vt.cpp
index a701d4076d6..04da1b8740b 100644
--- a/src/devices/video/ppu2c0x_vt.cpp
+++ b/src/devices/video/ppu2c0x_vt.cpp
@@ -27,8 +27,6 @@ ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, device_type type
m_read_bg(*this),
m_read_sp(*this)
{
- for (int i = 0; i < 6; i++)
- m_2012_2017_descramble[i] = 2 + i;
}
ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
diff --git a/src/devices/video/ps2gif.cpp b/src/devices/video/ps2gif.cpp
index 82ee34e267e..89fcb4d875f 100644
--- a/src/devices/video/ps2gif.cpp
+++ b/src/devices/video/ps2gif.cpp
@@ -291,8 +291,8 @@ void ps2_gif_device::process_tag(tag_t &tag, uint64_t hi, uint64_t lo)
tag.loop();
break;
default:
- m_gs->regs_w(machine().dummy_space(), 0x54, lo);
- m_gs->regs_w(machine().dummy_space(), 0x54, hi);
+ m_gs->regs_w(0x54, lo);
+ m_gs->regs_w(0x54, hi);
tag.loop();
break;
}
diff --git a/src/devices/video/ps2gs.cpp b/src/devices/video/ps2gs.cpp
index 298b3779bbe..718a4d35d77 100644
--- a/src/devices/video/ps2gs.cpp
+++ b/src/devices/video/ps2gs.cpp
@@ -433,7 +433,7 @@ void ps2_gs_device::write_packed(const uint8_t reg, const uint64_t hi, const uin
switch (reg)
{
case 0x0e:
- regs_w(machine().dummy_space(), (uint32_t)hi, lo, ~0ULL);
+ regs_w((uint32_t)hi, lo);
break;
default:
logerror("%s: write_packed: Unknown register %02x = %08x%08x%08x%08x\n", machine().describe_context(), reg, (uint32_t)(hi >> 32), (uint32_t)hi, (uint32_t)(lo >> 32), (uint32_t)lo);
@@ -441,7 +441,7 @@ void ps2_gs_device::write_packed(const uint8_t reg, const uint64_t hi, const uin
}
}
-WRITE64_MEMBER(ps2_gs_device::regs_w)
+void ps2_gs_device::regs_w(offs_t offset, uint64_t data)
{
static char const *const dir_strs[4] = {
"Host->Local", "Local->Host", "Local->Local", "None"
diff --git a/src/devices/video/ps2gs.h b/src/devices/video/ps2gs.h
index 28db82d1945..cdd4419825e 100644
--- a/src/devices/video/ps2gs.h
+++ b/src/devices/video/ps2gs.h
@@ -40,7 +40,7 @@ public:
DECLARE_READ64_MEMBER(priv_regs1_r);
DECLARE_WRITE64_MEMBER(priv_regs1_w);
- DECLARE_WRITE64_MEMBER(regs_w);
+ void regs_w(offs_t offset, uint64_t data);
DECLARE_READ32_MEMBER(gif_r);
DECLARE_WRITE32_MEMBER(gif_w);
diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp
index b530303379e..0b4f37c8e24 100644
--- a/src/devices/video/tms3556.cpp
+++ b/src/devices/video/tms3556.cpp
@@ -183,33 +183,40 @@ uint32_t tms3556_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
uint8_t tms3556_device::vram_r()
{
uint8_t ret;
- if (m_bamp_written) {
- m_bamp_written=false;
- m_vdp_acmpxy_mode=dma_write;
- if (m_init_read)
- m_vdp_acmp=VDP_BAMP;
- else
- m_vdp_acmp=(VDP_BAMP-1)&0xFFFF;
- }
+ if (!machine().side_effects_disabled()) {
+ if (m_bamp_written) {
+ m_bamp_written=false;
+ m_vdp_acmpxy_mode=dma_write;
+ if (m_init_read)
+ m_vdp_acmp=VDP_BAMP;
+ else
+ m_vdp_acmp=(VDP_BAMP-1)&0xFFFF;
+ }
- if (m_row_col_written) {
- m_row_col_written=0;
- m_vdp_acmpxy_mode=dma_read;
- if (m_init_read)
- m_vdp_acmpxy=m_colrow;
- else
- m_vdp_acmpxy=(m_colrow-1)&0xFFFF;
+ if (m_row_col_written) {
+ m_row_col_written=0;
+ m_vdp_acmpxy_mode=dma_read;
+ if (m_init_read)
+ m_vdp_acmpxy=m_colrow;
+ else
+ m_vdp_acmpxy=(m_colrow-1)&0xFFFF;
+ }
+
+ m_init_read=false;
}
- m_init_read=false;
if (m_vdp_acmpxy_mode==dma_read) {
ret=readbyte(m_vdp_acmpxy);
- m_vdp_acmpxy++;
- if (m_vdp_acmpxy==VDP_BAMTF) m_vdp_acmpxy=VDP_BAMP;
+ if (!machine().side_effects_disabled()) {
+ m_vdp_acmpxy++;
+ if (m_vdp_acmpxy==VDP_BAMTF) m_vdp_acmpxy=VDP_BAMP;
+ }
} else {
ret=readbyte(m_vdp_acmp);
- m_vdp_acmp++;
- if (m_vdp_acmp==VDP_BAMTF) m_vdp_acmp=VDP_BAMP;
+ if (!machine().side_effects_disabled()) {
+ m_vdp_acmp++;
+ if (m_vdp_acmp==VDP_BAMTF) m_vdp_acmp=VDP_BAMP;
+ }
}
return ret;
}
@@ -254,7 +261,8 @@ uint8_t tms3556_device::reg_r(offs_t offset)
LOG("TMS3556 Reg Read: %06x\n", offset);
int reply = 0; // FIXME : will send internal status (VBL, HBL...)
- m_reg_access_phase = 0;
+ if (!machine().side_effects_disabled())
+ m_reg_access_phase = 0;
return reply;
}
diff --git a/src/devices/video/tms3556.h b/src/devices/video/tms3556.h
index 51dd3ca5ac8..40ed3fce4fc 100644
--- a/src/devices/video/tms3556.h
+++ b/src/devices/video/tms3556.h
@@ -38,7 +38,7 @@ public:
static constexpr unsigned TOTAL_HEIGHT = 250 + TOP_BORDER + BOTTOM_BORDER;
// construction/destruction
- tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
uint8_t vram_r();
void vram_w(uint8_t data);
diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp
index 2fa82809c78..825a4457c12 100644
--- a/src/emu/diexec.cpp
+++ b/src/emu/diexec.cpp
@@ -620,33 +620,6 @@ void device_execute_interface::pulse_input_line(int irqline, const attotime &dur
}
-//-------------------------------------------------
-// pulse_input_line_and_vector - "pulse" an
-// input line by asserting it and then clearing it
-// later, specifying a vector
-//-------------------------------------------------
-
-void device_execute_interface::pulse_input_line_and_vector(int irqline, int vector, const attotime &duration)
-{
- // treat instantaneous pulses as ASSERT+CLEAR
- if (duration == attotime::zero)
- {
- if (irqline != INPUT_LINE_RESET && !input_edge_triggered(irqline))
- throw emu_fatalerror("device '%s': zero-width pulse is not allowed for input line %d\n", device().tag(), irqline);
-
- set_input_line_and_vector(irqline, ASSERT_LINE, vector);
- set_input_line_and_vector(irqline, CLEAR_LINE, vector);
- }
- else
- {
- set_input_line_and_vector(irqline, ASSERT_LINE, vector);
-
- attotime target_time = local_time() + duration;
- m_scheduler->timer_set(target_time - m_scheduler->time(), timer_expired_delegate(FUNC(device_execute_interface::irq_pulse_clear), this), irqline);
- }
-}
-
-
//**************************************************************************
// DEVICE INPUT
@@ -689,7 +662,6 @@ void device_execute_interface::device_input::start(device_execute_interface &exe
void device_execute_interface::device_input::reset()
{
m_curvector = m_stored_vector = m_execute->default_irq_vector(m_linenum);
- m_qindex = 0;
}
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 8745b15ae03..75bdca5b229 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -165,7 +165,6 @@ public:
void set_input_line_and_vector(int linenum, int state, int vector) { m_input[linenum].set_state_synced(state, vector); }
int input_state(int linenum) const { return m_input[linenum].m_curstate; }
void pulse_input_line(int irqline, const attotime &duration);
- void pulse_input_line_and_vector(int irqline, int vector, const attotime &duration);
// suspend/resume
void suspend(u32 reason, bool eatcycles);
diff --git a/src/emu/driver.h b/src/emu/driver.h
index 88363437275..43697f2d109 100644
--- a/src/emu/driver.h
+++ b/src/emu/driver.h
@@ -105,9 +105,6 @@ public:
// dummy driver_init callback
void empty_init();
- // memory helpers
- address_space &generic_space() const { return machine().dummy_space(); }
-
// output heler
output_manager &output() const { return machine().output(); }
diff --git a/src/emu/machine.h b/src/emu/machine.h
index d054ee861c7..205988fbbe6 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -188,7 +188,6 @@ public:
tilemap_manager &tilemap() const { assert(m_tilemap != nullptr); return *m_tilemap; }
debug_view_manager &debug_view() const { assert(m_debug_view != nullptr); return *m_debug_view; }
debugger_manager &debugger() const { assert(m_debugger != nullptr); return *m_debugger; }
- driver_device *driver_data() const { return &downcast<driver_device &>(root_device()); }
template <class DriverClass> DriverClass *driver_data() const { return &downcast<DriverClass &>(root_device()); }
machine_phase phase() const { return m_current_phase; }
bool paused() const { return m_paused || (m_current_phase != machine_phase::RUNNING); }
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index e0599e8de91..f35ab90d431 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -1360,7 +1360,7 @@ render_primitive_list &render_target::get_primitives()
render_primitive *prim = list.alloc(render_primitive::QUAD);
set_render_bounds_xy(prim->bounds, 0.0f, 0.0f, (float)m_width, (float)m_height);
prim->full_bounds = prim->bounds;
- set_render_color(&prim->color, 1.0f, 1.0f, 1.0f, 1.0f);
+ set_render_color(&prim->color, 1.0f, 0.1f, 0.1f, 0.1f);
prim->texture.base = nullptr;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
list.append(*prim);
diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp
index 65c047d5f01..4db8968714d 100644
--- a/src/emu/xtal.cpp
+++ b/src/emu/xtal.cpp
@@ -63,6 +63,7 @@ const double XTAL::known_xtals[] = {
400'000, /* 400_kHz_XTAL Resonator - OKI MSM5205 on Great Swordman h/w */
430'000, /* 430_kHz_XTAL Resonator */
455'000, /* 455_kHz_XTAL Resonator - OKI MSM5205 on Gladiator h/w */
+ 500'000, /* 500_kHz_XTAL Resonator - MIDI clock on various synthesizers (31250 * 16) */
512'000, /* 512_kHz_XTAL Resonator - Toshiba TC8830F */
600'000, /* 600_kHz_XTAL - */
640'000, /* 640_kHz_XTAL Resonator - NEC UPD7759, Texas Instruments Speech Chips @ 8khz */
@@ -122,10 +123,11 @@ const double XTAL::known_xtals[] = {
6'000'000, /* 6_MHz_XTAL American Poker II, Taito SJ System */
6'144'000, /* 6.144_MHz_XTAL Used on Alpha Denshi early 80's games sound board, Casio FP-200 and Namco Universal System 16 */
6'400'000, /* 6.4_MHz_XTAL Textel Compact */
- 6'500'000, /* 6.5_MHz_XTAL Jupiter Ace */
+ 6'500'000, /* 6.5_MHz_XTAL Jupiter Ace, Roland QDD interface */
6'880'000, /* 6.88_MHz_XTAL Barcrest MPU4 */
6'900'000, /* 6.9_MHz_XTAL BBN BitGraph CPU */
7'000'000, /* 7_MHz_XTAL Jaleco Mega System PCBs */
+ 7'056'000, /* 7.056_MHz_XTAL Alesis QS FXCHIP (LCM of 44.1 kHz and 48 kHz) */
7'159'090, /* 7.15909_MHz_XTAL Blood Bros (2x NTSC subcarrier) */
7'200'000, /* 7.2_MHz_XTAL Image Fight bootleg I80C031 MCU */
7'372'800, /* 7.3728_MHz_XTAL - */
@@ -142,6 +144,7 @@ const double XTAL::known_xtals[] = {
8'867'236, /* 8.867236_MHz_XTAL RCA CDP1869 PAL color clock (~2x PAL subcarrier) */
8'867'238, /* 8.867238_MHz_XTAL ETI-660 (~2x PAL subcarrier) */
8'945'000, /* 8.945_MHz_XTAL Hit Me */
+ 8'960'000, /* 8.96_MHz_XTAL Casio CZ-101 (divided by 2 for Music LSI) */
9'000'000, /* 9_MHz_XTAL Homedata PCBs */
9'216'000, /* 9.216_MHz_XTAL Univac UTS 20 */
9'600'000, /* 9.6_MHz_XTAL WD37C65 second clock (for 300 KB/sec rate) */
@@ -210,6 +213,7 @@ const double XTAL::known_xtals[] = {
14'300'000, /* 14.3_MHz_XTAL Agat-7 */
14'314'000, /* 14.314_MHz_XTAL Taito TTL Board */
14'318'181, /* 14.318181_MHz_XTAL Extremely common, used on 100's of PCBs (4x NTSC subcarrier) */
+ 14'349'600, /* 14.3496_MHz_XTAL Roland S-50 VDP */
14'580'000, /* 14.58_MHz_XTAL Fortune 32:16 Video Controller */
14'705'882, /* 14.705882_MHz_XTAL Aleck64 */
14'728'000, /* 14.728_MHz_XTAL ADM 36 */
@@ -300,6 +304,7 @@ const double XTAL::known_xtals[] = {
22'464'000, /* 22.464_MHz_XTAL CIT-101 132-column display clock */
22'656'000, /* 22.656_MHz_XTAL Super Pinball Action (~1440x NTSC line rate) */
22'896'000, /* 22.896_MHz_XTAL DEC VT220 132-column display clock */
+ 23'200'000, /* 23.2_MHz_XTAL Roland JV-80 & JV-880 PCM clock */
23'814'000, /* 23.814_MHz_XTAL TeleVideo TVI-912, 920 & 950 */
23'961'600, /* 23.9616_MHz_XTAL Osborne 4 (Vixen) */
24'000'000, /* 24_MHz_XTAL Mario, 80's Data East games, 80's Konami games */
@@ -325,6 +330,7 @@ const double XTAL::known_xtals[] = {
26'666'000, /* 26.666_MHz_XTAL Imagetek I4100/I4220/I4300 */
26'666'666, /* 26.666666_MHz_XTAL Irem M92 but most use 27MHz */
26'686'000, /* 26.686_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips */
+ 26'880'000, /* 26.88_MHz_XTAL Roland RF5C36/SA-16 clock (30000 * 896) */
26'989'200, /* 26.9892_MHz_XTAL TeleVideo 965 */
27'000'000, /* 27_MHz_XTAL Some Banpresto games macrossp, Irem M92 and 90's Toaplan games */
27'164'000, /* 27.164_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips */
diff --git a/src/frontend/mame/ui/about.cpp b/src/frontend/mame/ui/about.cpp
index dbe303f6b4f..089e5911c2d 100644
--- a/src/frontend/mame/ui/about.cpp
+++ b/src/frontend/mame/ui/about.cpp
@@ -27,7 +27,7 @@ namespace {
ABOUT MODAL
- **************************************************/
+**************************************************/
//-------------------------------------------------
@@ -36,8 +36,6 @@ namespace {
menu_about::menu_about(mame_ui_manager &mui, render_container &container)
: menu(mui, container)
- , m_pause_checked(false)
- , m_was_paused(false)
{
}
@@ -48,28 +46,15 @@ menu_about::menu_about(mame_ui_manager &mui, render_container &container)
menu_about::~menu_about()
{
- // resume if appropriate (is the destructor really the right place
- // to do this sort of activity?)
- // TODO(mooglyguy): No, it isn't. We should have an explicit menu-exit callback.
- if (!m_was_paused)
- machine().resume();
}
+
//-------------------------------------------------
// populate - populates the about modal
//-------------------------------------------------
void menu_about::populate(float &customtop, float &custombottom)
{
- // pause if appropriate
- if (!m_pause_checked)
- {
- m_was_paused = machine().paused();
- if (!m_was_paused)
- machine().pause();
- m_pause_checked = true;
- }
-
for (char const *const *line = copying_text; *line; ++line)
item_append(*line, "", 0, nullptr);
diff --git a/src/frontend/mame/ui/about.h b/src/frontend/mame/ui/about.h
index d9eef659c2d..2e68b7ed090 100644
--- a/src/frontend/mame/ui/about.h
+++ b/src/frontend/mame/ui/about.h
@@ -2,7 +2,7 @@
// copyright-holders:Ryan Holtz
/***************************************************************************
- ui/barcode.h
+ ui/about.h
"About" modal
@@ -27,9 +27,6 @@ public:
private:
virtual void populate(float &customtop, float &custombottom) override;
virtual void handle() override;
-
- bool m_pause_checked;
- bool m_was_paused;
};
} // namespace ui
diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp
index 8dd9b9c9a9e..8688c513c6f 100644
--- a/src/frontend/mame/ui/devopt.cpp
+++ b/src/frontend/mame/ui/devopt.cpp
@@ -57,7 +57,7 @@ void menu_device_config::populate(float &customtop, float &custombottom)
continue;
// get cpu specific clock that takes internal multiplier/dividers into account
- int clock = exec.device().clock();
+ u32 clock = exec.device().clock();
// count how many identical CPUs we have
int count = 1;
@@ -69,16 +69,23 @@ void menu_device_config::populate(float &customtop, float &custombottom)
count++;
}
- // if more than one, prepend a #x in front of the CPU name and display clock in kHz or MHz
- util::stream_format(
- str,
+ std::string hz(std::to_string(clock));
+ int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0;
+ if (d > 0)
+ {
+ size_t dpos = hz.length() - d;
+ hz.insert(dpos, ".");
+ size_t last = hz.find_last_not_of('0');
+ hz = hz.substr(0, last + (last != dpos ? 1 : 0));
+ }
+
+ // if more than one, prepend a #x in front of the CPU name and display clock
+ util::stream_format(str,
(count > 1)
- ? ((clock >= 1000000) ? _(" %1$d\xC3\x97%2$s %3$d.%4$06d\xC2\xA0MHz\n") : _(" %1$d\xC3\x97%2$s %5$d.%6$03d\xC2\xA0kHz\n"))
- : ((clock >= 1000000) ? _(" %2$s %3$d.%4$06d\xC2\xA0MHz\n") : _(" %2$s %5$d.%6$03d\xC2\xA0kHz\n")),
- count,
- name,
- clock / 1000000, clock % 1000000,
- clock / 1000, clock % 1000);
+ ? ((clock != 0) ? " %1$d" UTF8_MULTIPLY "%2$s %3$s" UTF8_NBSP "%4$s\n" : " %1$d" UTF8_MULTIPLY "%2$s\n")
+ : ((clock != 0) ? " %2$s %3$s" UTF8_NBSP "%4$s\n" : " %2$s\n"),
+ count, name, hz,
+ (d == 9) ? _("GHz") : (d == 6) ? _("MHz") : (d == 3) ? _("kHz") : _("Hz"));
}
}
@@ -95,17 +102,21 @@ void menu_device_config::populate(float &customtop, float &custombottom)
}
else
{
- const rectangle &visarea = screen.visible_area();
+ std::string hz(std::to_string(float(screen.frame_period().as_hz())));
+ size_t last = hz.find_last_not_of('0');
+ size_t dpos = hz.find_last_of('.');
+ hz = hz.substr(0, last + (last != dpos ? 1 : 0));
+ const rectangle &visarea = screen.visible_area();
util::stream_format(
str,
(screen.orientation() & ORIENTATION_SWAP_XY)
- ? _(" Screen '%1$s': %2$d \xC3\x97 %3$d (V) %4$f\xC2\xA0Hz\n")
- : _(" Screen '%1$s': %2$d \xC3\x97 %3$d (H) %4$f\xC2\xA0Hz\n"),
+ ? _(" Screen '%1$s': %2$d \xC3\x97 %3$d (V) %4$s\xC2\xA0Hz\n")
+ : _(" Screen '%1$s': %2$d \xC3\x97 %3$d (H) %4$s\xC2\xA0Hz\n"),
screen.tag(),
visarea.width(),
visarea.height(),
- screen.frame_period().as_hz());
+ hz);
}
}
}
@@ -129,17 +140,25 @@ void menu_device_config::populate(float &customtop, float &custombottom)
if (soundtags.insert(scan.device().tag()).second)
count++;
}
- // if more than one, prepend a #x in front of the name and display clock in kHz or MHz
- int const clock = sound.device().clock();
- util::stream_format(
- str,
+
+ const u32 clock = sound.device().clock();
+ std::string hz(std::to_string(clock));
+ int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0;
+ if (d > 0)
+ {
+ size_t dpos = hz.length() - d;
+ hz.insert(dpos, ".");
+ size_t last = hz.find_last_not_of('0');
+ hz = hz.substr(0, last + (last != dpos ? 1 : 0));
+ }
+
+ // if more than one, prepend a #x in front of the name and display clock
+ util::stream_format(str,
(count > 1)
- ? ((clock >= 1000000) ? _(" %1$d\xC3\x97%2$s %3$d.%4$06d\xC2\xA0MHz\n") : clock ? _(" %1$d\xC3\x97%2$s %5$d.%6$03d\xC2\xA0kHz\n") : _(" %1$d\xC3\x97%2$s\n"))
- : ((clock >= 1000000) ? _(" %2$s %3$d.%4$06d\xC2\xA0MHz\n") : clock ? _(" %2$s %5$d.%6$03d\xC2\xA0kHz\n") : _(" %2$s\n")),
- count,
- sound.device().name(),
- clock / 1000000, clock % 1000000,
- clock / 1000, clock % 1000);
+ ? ((clock != 0) ? " %1$d" UTF8_MULTIPLY "%2$s %3$s" UTF8_NBSP "%4$s\n" : " %1$d" UTF8_MULTIPLY "%2$s\n")
+ : ((clock != 0) ? " %2$s %3$s" UTF8_NBSP "%4$s\n" : " %2$s\n"),
+ count, sound.device().name(), hz,
+ (d == 9) ? _("GHz") : (d == 6) ? _("MHz") : (d == 3) ? _("kHz") : _("Hz"));
}
}
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp
index b528f13c95c..76b2f012731 100644
--- a/src/frontend/mame/ui/info.cpp
+++ b/src/frontend/mame/ui/info.cpp
@@ -313,7 +313,7 @@ std::string machine_info::game_info_string() const
if (!exectags.insert(exec.device().tag()).second)
continue;
// get cpu specific clock that takes internal multiplier/dividers into account
- int clock = exec.device().clock();
+ u32 clock = exec.device().clock();
// count how many identical CPUs we have
int count = 1;
@@ -325,16 +325,23 @@ std::string machine_info::game_info_string() const
count++;
}
- // if more than one, prepend a #x in front of the CPU name
- // display clock in kHz or MHz
+ std::string hz(std::to_string(clock));
+ int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0;
+ if (d > 0)
+ {
+ size_t dpos = hz.length() - d;
+ hz.insert(dpos, ".");
+ size_t last = hz.find_last_not_of('0');
+ hz = hz.substr(0, last + (last != dpos ? 1 : 0));
+ }
+
+ // if more than one, prepend a #x in front of the CPU name and display clock
util::stream_format(buf,
- (count > 1) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s %3$d.%4$0*5$d%6$s\n",
- count,
- name,
- (clock >= 1000000) ? (clock / 1000000) : (clock / 1000),
- (clock >= 1000000) ? (clock % 1000000) : (clock % 1000),
- (clock >= 1000000) ? 6 : 3,
- (clock >= 1000000) ? _("MHz") : _("kHz"));
+ (count > 1)
+ ? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$s" UTF8_NBSP "%4$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n")
+ : ((clock != 0) ? "%2$s %3$s" UTF8_NBSP "%4$s\n" : "%2$s\n"),
+ count, name, hz,
+ (d == 9) ? _("GHz") : (d == 6) ? _("MHz") : (d == 3) ? _("kHz") : _("Hz"));
}
// loop over all sound chips
@@ -360,19 +367,24 @@ std::string machine_info::game_info_string() const
count++;
}
- // if more than one, prepend a #x in front of the CPU name
- // display clock in kHz or MHz
- int clock = sound.device().clock();
+ const u32 clock = sound.device().clock();
+ std::string hz(std::to_string(clock));
+ int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0;
+ if (d > 0)
+ {
+ size_t dpos = hz.length() - d;
+ hz.insert(dpos, ".");
+ size_t last = hz.find_last_not_of('0');
+ hz = hz.substr(0, last + (last != dpos ? 1 : 0));
+ }
+
+ // if more than one, prepend a #x in front of the soundchip name and display clock
util::stream_format(buf,
(count > 1)
- ? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n")
- : ((clock != 0) ? "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s\n"),
- count,
- sound.device().name(),
- (clock >= 1000000) ? (clock / 1000000) : (clock / 1000),
- (clock >= 1000000) ? (clock % 1000000) : (clock % 1000),
- (clock >= 1000000) ? 6 : 3,
- (clock >= 1000000) ? _("MHz") : _("kHz"));
+ ? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$s" UTF8_NBSP "%4$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n")
+ : ((clock != 0) ? "%2$s %3$s" UTF8_NBSP "%4$s\n" : "%2$s\n"),
+ count, sound.device().name(), hz,
+ (d == 9) ? _("GHz") : (d == 6) ? _("MHz") : (d == 3) ? _("kHz") : _("Hz"));
}
// display screen information
@@ -390,11 +402,16 @@ std::string machine_info::game_info_string() const
detail = _("Vector");
else
{
+ std::string hz(std::to_string(float(screen.frame_period().as_hz())));
+ size_t last = hz.find_last_not_of('0');
+ size_t dpos = hz.find_last_of('.');
+ hz = hz.substr(0, last + (last != dpos ? 1 : 0));
+
const rectangle &visarea = screen.visible_area();
- detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz",
+ detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %s" UTF8_NBSP "Hz",
visarea.width(), visarea.height(),
(screen.orientation() & ORIENTATION_SWAP_XY) ? "V" : "H",
- screen.frame_period().as_hz());
+ hz);
}
util::stream_format(buf,
diff --git a/src/lib/formats/h8_cas.cpp b/src/lib/formats/h8_cas.cpp
new file mode 100644
index 00000000000..ec92a94b10f
--- /dev/null
+++ b/src/lib/formats/h8_cas.cpp
@@ -0,0 +1,149 @@
+// license:BSD-3-Clause
+// copyright-holders:Robbbert
+/********************************************************************
+
+Support for Heathkit H8 H8T cassette images
+
+
+Standard Kansas City format (300 baud)
+
+We output a leader, followed by the contents of the H8T file.
+
+********************************************************************/
+
+#include <cassert>
+
+#include "h8_cas.h"
+
+#define WAVEENTRY_LOW -32768
+#define WAVEENTRY_HIGH 32767
+
+#define H8_WAV_FREQUENCY 9600
+
+// image size
+static int h8_image_size;
+
+static int h8_put_samples(int16_t *buffer, int sample_pos, int count, int level)
+{
+ if (buffer)
+ {
+ for (int i=0; i<count; i++)
+ buffer[sample_pos + i] = level;
+ }
+
+ return count;
+}
+
+static int h8_output_bit(int16_t *buffer, int sample_pos, bool bit)
+{
+ int samples = 0;
+
+ for (uint8_t i = 0; i < 4; i++)
+ {
+ if (bit)
+ {
+ samples += h8_put_samples(buffer, sample_pos + samples, 2, WAVEENTRY_LOW);
+ samples += h8_put_samples(buffer, sample_pos + samples, 2, WAVEENTRY_HIGH);
+ samples += h8_put_samples(buffer, sample_pos + samples, 2, WAVEENTRY_LOW);
+ samples += h8_put_samples(buffer, sample_pos + samples, 2, WAVEENTRY_HIGH);
+ }
+ else
+ {
+ samples += h8_put_samples(buffer, sample_pos + samples, 4, WAVEENTRY_LOW);
+ samples += h8_put_samples(buffer, sample_pos + samples, 4, WAVEENTRY_HIGH);
+ }
+ }
+
+ return samples;
+}
+
+static int h8_output_byte(int16_t *buffer, int sample_pos, uint8_t byte)
+{
+ int samples = 0;
+ uint8_t i;
+
+ // start bit
+ samples += h8_output_bit (buffer, sample_pos + samples, 0);
+
+ // data bits
+ for (i = 0; i<8; i++)
+ samples += h8_output_bit (buffer, sample_pos + samples, (byte >> i) & 1);
+
+ // stop bits
+ for (i = 0; i<2; i++)
+ samples += h8_output_bit (buffer, sample_pos + samples, 1);
+
+ return samples;
+}
+
+static int h8_handle_cassette(int16_t *buffer, const uint8_t *bytes)
+{
+ uint32_t sample_count = 0;
+ uint32_t byte_count = 0;
+ uint32_t i;
+
+
+ // leader
+ for (i=0; i<2000; i++)
+ sample_count += h8_output_bit(buffer, sample_count, 1);
+
+ // data
+ for (i=byte_count; i<h8_image_size; i++)
+ sample_count += h8_output_byte(buffer, sample_count, bytes[i]);
+
+ return sample_count;
+}
+
+
+/*******************************************************************
+ Generate samples for the tape image
+********************************************************************/
+
+static int h8_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
+{
+ return h8_handle_cassette(buffer, bytes);
+}
+
+/*******************************************************************
+ Calculate the number of samples needed for this tape image
+********************************************************************/
+
+static int h8_cassette_calculate_size_in_samples(const uint8_t *bytes, int length)
+{
+ h8_image_size = length;
+
+ return h8_handle_cassette(nullptr, bytes);
+}
+
+static const struct CassetteLegacyWaveFiller h8_legacy_fill_wave =
+{
+ h8_cassette_fill_wave, /* fill_wave */
+ -1, /* chunk_size */
+ 0, /* chunk_samples */
+ h8_cassette_calculate_size_in_samples, /* chunk_sample_calc */
+ H8_WAV_FREQUENCY, /* sample_frequency */
+ 0, /* header_samples */
+ 0 /* trailer_samples */
+};
+
+static cassette_image::error h8_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+{
+ return cassette_legacy_identify(cassette, opts, &h8_legacy_fill_wave);
+}
+
+static cassette_image::error h8_cassette_load(cassette_image *cassette)
+{
+ return cassette_legacy_construct(cassette, &h8_legacy_fill_wave);
+}
+
+static const struct CassetteFormat h8_cassette_image_format =
+{
+ "h8t",
+ h8_cassette_identify,
+ h8_cassette_load,
+ nullptr
+};
+
+CASSETTE_FORMATLIST_START(h8_cassette_formats)
+ CASSETTE_FORMAT(h8_cassette_image_format)
+CASSETTE_FORMATLIST_END
diff --git a/src/lib/formats/h8_cas.h b/src/lib/formats/h8_cas.h
new file mode 100644
index 00000000000..8ad9f82006a
--- /dev/null
+++ b/src/lib/formats/h8_cas.h
@@ -0,0 +1,19 @@
+// license:BSD-3-Clause
+// copyright-holders:Robbbert
+/*********************************************************************
+
+ h8_cas.h
+
+ Format code for Heathkit H8 H8T cassette images
+
+*********************************************************************/
+#ifndef MAME_FORMATS_H8_CAS_H
+#define MAME_FORMATS_H8_CAS_H
+
+#pragma once
+
+#include "cassimg.h"
+
+CASSETTE_FORMATLIST_EXTERN(h8_cassette_formats);
+
+#endif // MAME_FORMATS_H8_CAS_H
diff --git a/src/lib/netlist/analog/nld_bjt.cpp b/src/lib/netlist/analog/nld_bjt.cpp
index 68253e303cf..5627a8fd823 100644
--- a/src/lib/netlist/analog/nld_bjt.cpp
+++ b/src/lib/netlist/analog/nld_bjt.cpp
@@ -203,7 +203,6 @@ namespace analog
nl_fptype m_V; // internal voltage source
state_var<unsigned> m_state_on;
- private:
};
// -----------------------------------------------------------------------------
diff --git a/src/lib/netlist/analog/nld_mosfet.cpp b/src/lib/netlist/analog/nld_mosfet.cpp
index 4817f6cc00c..e8cbdf64bcb 100644
--- a/src/lib/netlist/analog/nld_mosfet.cpp
+++ b/src/lib/netlist/analog/nld_mosfet.cpp
@@ -366,7 +366,7 @@ namespace analog
void set_cap(generic_capacitor<capacitor_e::VARIABLE_CAPACITY> cap,
nl_fptype capval, nl_fptype V,
nl_fptype &g11, nl_fptype &g12, nl_fptype &g21, nl_fptype &g22,
- nl_fptype &I1, nl_fptype &I2)
+ nl_fptype &I1, nl_fptype &I2) const
{
const nl_fptype I = cap.Ieq(capval, V) * m_polarity;
const nl_fptype G = cap.G(capval);
@@ -376,7 +376,7 @@ namespace analog
}
void calculate_caps(nl_fptype Vgs, nl_fptype Vgd, nl_fptype Vth,
- nl_fptype &Cgs, nl_fptype &Cgd, nl_fptype &Cgb)
+ nl_fptype &Cgs, nl_fptype &Cgd, nl_fptype &Cgb) const
{
nl_fptype Vctrl = Vgs - Vth * m_polarity;
// Cut off - now further differentiated into 3 different formulas
diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile
index af72486c46f..993652336c0 100644
--- a/src/lib/netlist/build/makefile
+++ b/src/lib/netlist/build/makefile
@@ -2,10 +2,7 @@
#
# makefile
#
-# Core makefile for building MAME and derivatives
-#
-# Copyright (c) Nicola Salmoria and the MAME Team.
-# Visit http://mamedev.org for licensing and usage restrictions.
+# Core makefile for building netlist
#
###########################################################################
@@ -60,7 +57,7 @@ LD = @g++
MD = @mkdir
RM = @rm
DOXYGEN = @./doxygen
-CLANG_TIDY = clang-tidy-9
+CLANG_TIDY = clang-tidy-10
TARGETS = nltool nlwav
@@ -242,13 +239,13 @@ gcc9:
$(MAKE) CC=g++-9 LD=g++-9 CEXTRAFLAGS="-march=native -msse4.2 -Wall -pedantic -Wpedantic -Wsign-compare -Wextra" EXTRALIBS="-lquadmath"
clang:
- $(MAKE) CC=clang++-10 LD=clang++-10 CEXTRAFLAGS="-march=native -msse4.2 -Weverything -Wall -pedantic -Wpedantic -Werror -Wno-padded -Wno-weak-vtables -Wno-unused-template -Wno-missing-variable-declarations -Wno-float-equal -Wconversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wno-exit-time-destructors"
+ $(MAKE) CC=clang++-11 LD=clang++-11 OBJ=obj/clang CEXTRAFLAGS="-march=native -msse4.2 -Weverything -Wall -pedantic -Wpedantic -Werror -Wno-padded -Wno-weak-vtables -Wno-unused-template -Wno-missing-variable-declarations -Wno-float-equal -Wconversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wno-exit-time-destructors"
clang-5:
$(MAKE) CC=clang++-5.0 LD=clang++-5.0 CEXTRAFLAGS="-march=native -Weverything -Werror -Wno-inconsistent-missing-destructor-override -Wno-unreachable-code -Wno-padded -Wno-weak-vtables -Wno-missing-variable-declarations -Wconversion -Wno-c++98-compat -Wno-float-equal -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wno-weak-template-vtables -Wno-exit-time-destructors"
nvcc:
- $(MAKE) CC=/usr/local/cuda-9.0/bin/nvcc LD=/usr/local/cuda-9.2/bin/nvcc \
+ $(MAKE) CC=/usr/local/cuda-9.0/bin/nvcc LD=/usr/local/cuda-9.2/bin/nvcc OBJ=obj/nvcc \
CEXTRAFLAGS="-x cu -DNVCCBUILD=1 --expt-extended-lambda --expt-relaxed-constexpr --default-stream per-thread --restrict"
tidy_db: compile_commands_prefix $(ALL_TIDY_FILES) compile_commands_postfix
diff --git a/src/lib/netlist/devices/nlid_proxy.cpp b/src/lib/netlist/devices/nlid_proxy.cpp
index 68af102232b..fd86f7381ef 100644
--- a/src/lib/netlist/devices/nlid_proxy.cpp
+++ b/src/lib/netlist/devices/nlid_proxy.cpp
@@ -28,13 +28,13 @@ namespace netlist
const std::vector<std::pair<pstring, pstring>> power_syms = { {"VCC", "VEE"}, {"VCC", "GND"}, {"VDD", "VSS"}};
bool f = false;
- for (auto & pwr_sym : power_syms)
+ for (const auto & pwr_sym : power_syms)
{
pstring devname = inout_proxied->device().name();
- auto tp_ct(anetlist.setup().find_terminal(devname + "." + pwr_sym.first,
+ auto *tp_ct(anetlist.setup().find_terminal(devname + "." + pwr_sym.first,
/*detail::terminal_type::INPUT,*/ false));
- auto tp_cn(anetlist.setup().find_terminal(devname + "." + pwr_sym.second,
+ auto *tp_cn(anetlist.setup().find_terminal(devname + "." + pwr_sym.second,
/*detail::terminal_type::INPUT,*/ false));
if (tp_ct && tp_cn)
{
@@ -43,8 +43,8 @@ namespace netlist
if (tp_cn && !tp_cn->is_analog())
throw nl_exception(plib::pfmt("Not an analog terminal: {1}")(tp_cn->name()));
- auto tp_t = static_cast<analog_t* >(tp_ct);
- auto tn_t = static_cast<analog_t *>(tp_cn);
+ auto *tp_t = static_cast<analog_t* >(tp_ct);
+ auto *tn_t = static_cast<analog_t *>(tp_cn);
if (f && (tp_t != nullptr && tn_t != nullptr))
log().warning(MI_MULTIPLE_POWER_TERMINALS_ON_DEVICE(inout_proxied->device().name(),
m_tp->name(), m_tn->name(),
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index 36f0e6df31f..f884b364cc9 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -243,7 +243,7 @@ namespace netlist
detail::net_t *netlist_state_t::find_net(const pstring &name) const
{
- for (auto & net : m_nets)
+ for (const auto & net : m_nets)
if (net->name() == name)
return net.get();
@@ -452,8 +452,8 @@ namespace netlist
for (auto & j : index)
{
- auto entry = m_state.m_devices[j].second.get();
- auto stats = entry->m_stats.get();
+ auto *entry = m_state.m_devices[j].second.get();
+ auto *stats = entry->m_stats.get();
log().verbose("Device {1:20} : {2:12} {3:12} {4:15} {5:12}", entry->name(),
stats->m_stat_call_count(), stats->m_stat_total_time.count(),
stats->m_stat_total_time.total(), stats->m_stat_inc_active());
@@ -504,8 +504,8 @@ namespace netlist
auto trigger = total_count * 200 / 1000000; // 200 ppm
for (auto &entry : m_state.m_devices)
{
- auto ep = entry.second.get();
- auto stats = ep->m_stats.get();
+ auto *ep = entry.second.get();
+ auto *stats = ep->m_stats.get();
// Factor of 3 offers best performace increase
if (stats->m_stat_inc_active() > 3 * stats->m_stat_total_time.count()
&& stats->m_stat_inc_active() > trigger)
@@ -522,7 +522,7 @@ namespace netlist
core_device_t *netlist_state_t::get_single_device(const pstring &classname, bool (*cc)(core_device_t *)) const
{
core_device_t *ret = nullptr;
- for (auto &d : m_devices)
+ for (const auto &d : m_devices)
{
if (cc(d.second.get()))
{
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index 91f3f6a0ea3..6710c197329 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -28,9 +28,9 @@
#include "nl_errstr.h"
#include "nltypes.h"
+#include <initializer_list>
#include <unordered_map>
#include <vector>
-#include <initializer_list>
//============================================================
// MACROS / New Syntax
@@ -428,18 +428,18 @@ namespace netlist
store().insert({obj, aname});
}
- static const T &get(const C *obj) noexcept
+ static const T *get(const C *obj) noexcept
{
try
{
auto ret(store().find(obj));
nl_assert(ret != store().end());
- return ret->second;
+ return &ret->second;
}
catch (...)
{
nl_assert_always(true, "exception in property_store_t.get()");
- return *static_cast<T *>(nullptr);
+ return static_cast<T *>(nullptr);
}
}
@@ -488,7 +488,7 @@ namespace netlist
const pstring &name() const noexcept
{
- return props::get(this);
+ return *props::get(this);
}
protected:
@@ -637,7 +637,7 @@ namespace netlist
state_var_sig m_Q;
#else
- void set_copied_input(netlist_sig_t val) noexcept { plib::unused_var(val); }
+ void set_copied_input(netlist_sig_t val) const noexcept { plib::unused_var(val); }
#endif
void set_delegate(const nldelegate &delegate) noexcept { m_delegate = delegate; }
@@ -1414,9 +1414,9 @@ namespace netlist
inline std::vector<C *> get_device_list() const
{
std::vector<C *> tmp;
- for (auto &d : m_devices)
+ for (const auto &d : m_devices)
{
- auto dev = dynamic_cast<C *>(d.second.get());
+ auto * const dev = dynamic_cast<C *>(d.second.get());
if (dev != nullptr)
tmp.push_back(dev);
}
@@ -1464,7 +1464,7 @@ namespace netlist
core_device_t *find_device(const pstring &name) const
{
- for (auto & d : m_devices)
+ for (const auto & d : m_devices)
if (d.first == name)
return d.second.get();
return nullptr;
@@ -1738,7 +1738,7 @@ namespace netlist
{
passert_always_msg(names.size() == N, "initializer_list size mismatch");
std::size_t i = 0;
- for (auto &n : names)
+ for (const auto &n : names)
this->emplace(i++, dev, pstring(n), std::forward<Args>(args)...);
}
@@ -2129,7 +2129,7 @@ namespace netlist
}
m_time = top->exec_time();
- const auto obj(top->object());
+ auto *const obj(top->object());
m_queue.pop();
if (obj != nullptr)
obj->template update_devs<KEEP_STATS>();
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 9973e6da93d..fd410d57f0a 100755
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -62,7 +62,7 @@ namespace netlist
std::initializer_list<const char *> params_and_connections)
{
std::vector<pstring> params;
- auto i(params_and_connections.begin());
+ const auto *i(params_and_connections.begin());
pstring name(*i);
++i;
for (; i != params_and_connections.end(); ++i)
@@ -138,7 +138,7 @@ namespace netlist
void nlparse_t::register_dev(const pstring &classname, const pstring &name)
{
- auto f = m_factory.factory_by_name(classname);
+ auto *f = m_factory.factory_by_name(classname);
if (f == nullptr)
{
log().fatal(MF_CLASS_1_NOT_FOUND(classname));
@@ -305,7 +305,7 @@ namespace netlist
bool nlparse_t::device_exists(const pstring &name) const
{
- for (auto &d : m_device_factory)
+ for (const auto &d : m_device_factory)
if (d.first == name)
return true;
return false;
@@ -436,7 +436,7 @@ pstring setup_t::de_alias(const pstring &alias) const
do {
ret = temp;
temp = "";
- for (auto &e : m_alias)
+ for (const auto &e : m_alias)
{
// FIXME: this will resolve first one found
if (e.second == ret)
@@ -454,7 +454,7 @@ pstring setup_t::de_alias(const pstring &alias) const
std::vector<pstring> setup_t::get_terminals_for_device_name(const pstring &devname) const
{
std::vector<pstring> terms;
- for (auto & t : m_terminals)
+ for (const auto & t : m_terminals)
{
if (plib::startsWith(t.second->name(), devname))
{
@@ -464,7 +464,7 @@ std::vector<pstring> setup_t::get_terminals_for_device_name(const pstring &devna
}
}
- for (auto & t : m_alias)
+ for (const auto & t : m_alias)
{
if (plib::startsWith(t.first, devname))
{
@@ -596,7 +596,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(detail::core_terminal_t &out)
out.net().add_terminal(new_proxy->in());
- auto proxy(new_proxy.get());
+ auto *proxy(new_proxy.get());
if (!m_proxies.insert({&out, proxy}).second)
throw nl_exception(MF_DUPLICATE_PROXY_1(out.name()));
@@ -621,7 +621,7 @@ devices::nld_base_proxy *setup_t::get_a_d_proxy(detail::core_terminal_t &inp)
auto new_proxy = incast.logic_family()->create_a_d_proxy(m_nlstate, x, &incast);
//auto new_proxy = plib::owned_ptr<devices::nld_a_to_d_proxy>::Create(netlist(), x, &incast);
- auto ret(new_proxy.get());
+ auto *ret(new_proxy.get());
if (!m_proxies.insert({&inp, ret}).second)
throw nl_exception(MF_DUPLICATE_PROXY_1(inp.name()));
@@ -695,7 +695,7 @@ void setup_t::connect_input_output(detail::core_terminal_t &in, detail::core_ter
{
if (out.is_analog() && in.is_logic())
{
- auto proxy = get_a_d_proxy(in);
+ auto *proxy = get_a_d_proxy(in);
out.net().add_terminal(proxy->proxy_term());
}
@@ -726,7 +726,7 @@ void setup_t::connect_terminal_input(terminal_t &term, detail::core_terminal_t &
{
log().verbose("connect terminal {1} (in, {2}) to {3}\n", inp.name(),
inp.is_analog() ? "analog" : inp.is_logic() ? "logic" : "?", term.name());
- auto proxy = get_a_d_proxy(inp);
+ auto *proxy = get_a_d_proxy(inp);
//out.net().register_con(proxy->proxy_term());
connect_terminals(term, proxy->proxy_term());
@@ -786,7 +786,7 @@ void setup_t::connect_terminals(detail::core_terminal_t &t1, detail::core_termin
log().debug("adding analog net ...\n");
// FIXME: Nets should have a unique name
auto anet = nlstate().pool().make_owned<analog_net_t>(m_nlstate,"net." + t1.name());
- auto anetp = anet.get();
+ auto *anetp = anet.get();
m_nlstate.register_net(std::move(anet));
t1.set_net(anetp);
anetp->add_terminal(t2);
@@ -1055,7 +1055,7 @@ pstring models_t::model_string(const model_map_t &map)
{
// operator [] has no const implementation
pstring ret = map.at("COREMODEL") + "(";
- for (auto & i : map)
+ for (const auto & i : map)
ret += (i.first + '=' + i.second + ' ');
return ret + ")";
@@ -1154,7 +1154,7 @@ const logic_family_desc_t *setup_t::family_from_model(const pstring &model)
ret->m_R_low = m_models.value(model, "ORL");
ret->m_R_high = m_models.value(model, "ORH");
- auto retp = ret.get();
+ auto *retp = ret.get();
m_nlstate.m_family_cache.emplace(model, std::move(ret));
@@ -1223,7 +1223,7 @@ void setup_t::prepare_to_run()
log().debug("Searching for solver and parameters ...\n");
- auto solver = m_nlstate.get_single_device<devices::NETLIB_NAME(solver)>("solver");
+ auto *solver = m_nlstate.get_single_device<devices::NETLIB_NAME(solver)>("solver");
m_netlist_params = m_nlstate.get_single_device<devices::NETLIB_NAME(netlistparams)>("parameter");
// set default model parameters
diff --git a/src/lib/netlist/nltypes.h b/src/lib/netlist/nltypes.h
index 3794c160a57..b3f6f534978 100644
--- a/src/lib/netlist/nltypes.h
+++ b/src/lib/netlist/nltypes.h
@@ -122,9 +122,9 @@ namespace netlist
namespace plib {
template<>
- inline void state_manager_t::save_item(const void *owner, netlist::netlist_time &nlt, const pstring &stname)
+ inline void state_manager_t::save_item(const void *owner, netlist::netlist_time &state, const pstring &stname)
{
- save_state_ptr(owner, stname, datatype_t(sizeof(netlist::netlist_time::internal_type), true, false), 1, nlt.get_internaltype_ptr());
+ save_state_ptr(owner, stname, datatype_t(sizeof(netlist::netlist_time::internal_type), true, false), 1, state.get_internaltype_ptr());
}
} // namespace plib
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index 8ffab1dbd1e..55189f3d45d 100755..100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -13,12 +13,12 @@
#include "pstring.h"
#include "ptypes.h"
+#include <algorithm>
#include <cstddef> // for std::max_align_t (usually long long)
#include <memory>
#include <type_traits>
#include <utility>
#include <vector>
-#include <algorithm>
#if defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
#include <malloc.h>
diff --git a/src/lib/netlist/plib/poptions.cpp b/src/lib/netlist/plib/poptions.cpp
index fd683d888d8..6f23cb2d934 100644
--- a/src/lib/netlist/plib/poptions.cpp
+++ b/src/lib/netlist/plib/poptions.cpp
@@ -199,13 +199,13 @@ namespace plib {
ret = split_paragraphs(description, width, 0, 0) + "\n";
ret += "Usage:\t" + usage + "\n\nOptions:\n\n";
- for (auto & optbase : m_opts )
+ for (const auto & optbase : m_opts )
{
// Skip anonymous inputs which are collected in option_args
if (dynamic_cast<option_args *>(optbase) != nullptr)
continue;
- if (auto opt = dynamic_cast<option *>(optbase))
+ if (auto * const opt = dynamic_cast<option *>(optbase))
{
pstring line = "";
if (opt->short_opt() != "")
@@ -223,7 +223,7 @@ namespace plib {
auto *ol = dynamic_cast<option_str_limit_base *>(opt);
if (ol)
{
- for (auto &v : ol->limit())
+ for (const auto &v : ol->limit())
{
line += v + "|";
}
@@ -243,7 +243,7 @@ namespace plib {
else
ret += split_paragraphs(line + opt->help(), width, indent, 0);
}
- else if (auto grp = dynamic_cast<option_group *>(optbase))
+ else if (auto *grp = dynamic_cast<option_group *>(optbase))
{
ret += "\n" + grp->group() + ":\n";
if (grp->help() != "") ret += split_paragraphs(grp->help(), width, 4, 4) + "\n";
@@ -251,9 +251,9 @@ namespace plib {
}
// FIXME: other help ...
pstring ex("");
- for (auto & optbase : m_opts )
+ for (const auto & optbase : m_opts )
{
- if (auto example = dynamic_cast<option_example *>(optbase))
+ if (auto *example = dynamic_cast<option_example *>(optbase))
{
ex += "> " + example->example()+"\n\n";
ex += split_paragraphs(example->help(), width, 4, 4) + "\n";
@@ -268,9 +268,9 @@ namespace plib {
option *options::getopt_short(const pstring &arg) const
{
- for (auto & optbase : m_opts)
+ for (const auto & optbase : m_opts)
{
- auto opt = dynamic_cast<option *>(optbase);
+ auto *opt = dynamic_cast<option *>(optbase);
if (opt && arg != "" && opt->short_opt() == arg)
return opt;
}
@@ -278,9 +278,9 @@ namespace plib {
}
option *options::getopt_long(const pstring &arg) const
{
- for (auto & optbase : m_opts)
+ for (const auto & optbase : m_opts)
{
- auto opt = dynamic_cast<option *>(optbase);
+ auto *opt = dynamic_cast<option *>(optbase);
if (opt && arg !="" && opt->long_opt() == arg)
return opt;
}
diff --git a/src/lib/netlist/plib/poptions.h b/src/lib/netlist/plib/poptions.h
index 26edebb727e..f247be5a42d 100644
--- a/src/lib/netlist/plib/poptions.h
+++ b/src/lib/netlist/plib/poptions.h
@@ -241,7 +241,7 @@ namespace plib {
template <typename T>
T *getopt_type() const
{
- for (auto & optbase : m_opts )
+ for (const auto & optbase : m_opts )
{
if (auto opt = dynamic_cast<T *>(optbase))
return opt;
diff --git a/src/lib/netlist/plib/ppmf.h b/src/lib/netlist/plib/ppmf.h
index a9df2f6b4aa..5f7709f1740 100644
--- a/src/lib/netlist/plib/ppmf.h
+++ b/src/lib/netlist/plib/ppmf.h
@@ -130,7 +130,7 @@ namespace plib {
mfp mfpo(mftp);
//return mfpo.update_after_bind<FunctionType>(object);
generic_function rfunc(nullptr);
- auto robject = reinterpret_cast<generic_class *>(object);
+ auto *robject = reinterpret_cast<generic_class *>(object);
mfpo.convert_to_generic(rfunc, robject);
func = reinterpret_cast<FunctionType>(rfunc);
object = reinterpret_cast<ObjectType *>(robject);
@@ -144,7 +144,7 @@ namespace plib {
{
// apply the "this" delta to the object first
// NOLINTNEXTLINE(clang-analyzer-core.UndefinedBinaryOperatorResult)
- auto o_p_delta = reinterpret_cast<generic_class *>(reinterpret_cast<std::uint8_t *>(object) + m_this_delta);
+ auto *o_p_delta = reinterpret_cast<generic_class *>(reinterpret_cast<std::uint8_t *>(object) + m_this_delta);
// if the low bit of the vtable index is clear, then it is just a raw function pointer
if (!(m_function & 1))
diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h
index d4156d09b02..4a7875e1767 100644
--- a/src/lib/netlist/plib/pstate.h
+++ b/src/lib/netlist/plib/pstate.h
@@ -165,7 +165,7 @@ public:
std::vector<const entry_t *> save_list() const
{
std::vector<const entry_t *> ret;
- for (auto &i : m_save)
+ for (const auto &i : m_save)
ret.push_back(&i);
return ret;
}
diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h
index 5999757b9e6..f5f26bf19e2 100644
--- a/src/lib/netlist/plib/pstream.h
+++ b/src/lib/netlist/plib/pstream.h
@@ -192,7 +192,7 @@ public:
void write(const pstring &s)
{
- const auto sm = reinterpret_cast<const std::ostream::char_type *>(s.c_str());
+ const auto *const sm = reinterpret_cast<const std::ostream::char_type *>(s.c_str());
const auto sl(static_cast<std::streamsize>(pstring_mem_t_size(s)));
write(sl);
m_strm.write(sm, sl);
diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h
index b46b423ae07..b4d92d8fbdd 100644
--- a/src/lib/netlist/plib/pstring.h
+++ b/src/lib/netlist/plib/pstring.h
@@ -13,10 +13,10 @@
#include <exception>
#include <iterator>
#include <limits>
+#include <ostream>
#include <stdexcept>
#include <string>
#include <type_traits>
-#include <ostream>
// ----------------------------------------------------------------------------------------
// pstring: semi-immutable strings ...
@@ -249,7 +249,7 @@ struct putf8_traits
}
static std::size_t codelen(const mem_t *p) noexcept
{
- const auto p1 = reinterpret_cast<const unsigned char *>(p);
+ const auto *p1 = reinterpret_cast<const unsigned char *>(p);
if ((*p1 & 0xE0) == 0xC0)
return 2;
if ((*p1 & 0xF0) == 0xE0)
@@ -276,7 +276,7 @@ struct putf8_traits
static code_t code(const mem_t *p) noexcept
{
- const auto p1 = reinterpret_cast<const unsigned char *>(p);
+ const auto *p1 = reinterpret_cast<const unsigned char *>(p);
if ((*p1 & 0x80) == 0x00)
return *p1;
if ((*p1 & 0xE0) == 0xC0)
diff --git a/src/lib/netlist/plib/ptokenizer.cpp b/src/lib/netlist/plib/ptokenizer.cpp
index 49b6985cc16..6743aef2602 100644
--- a/src/lib/netlist/plib/ptokenizer.cpp
+++ b/src/lib/netlist/plib/ptokenizer.cpp
@@ -157,7 +157,7 @@ namespace plib {
bool benter(false);
bool bexit(false);
pstring file;
- unsigned lineno;
+ unsigned lineno(0);
ret = get_token_internal();
if (!ret.is_type(token_type::NUMBER))
@@ -251,7 +251,8 @@ namespace plib {
token_t(id->second, tokstr)
: token_t(token_type::IDENTIFIER, tokstr);
}
- else if (c == m_string)
+
+ if (c == m_string)
{
pstring tokstr = "";
c = getc();
diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h
index 01dd66e5f91..3ddf4a81f5a 100644
--- a/src/lib/netlist/plib/putil.h
+++ b/src/lib/netlist/plib/putil.h
@@ -198,7 +198,7 @@ namespace plib
{
for (auto &s : m_collection)
{
- auto source(dynamic_cast<S *>(s.get()));
+ auto *source(dynamic_cast<S *>(s.get()));
if (source)
{
auto strm = source->stream(name);
@@ -214,7 +214,7 @@ namespace plib
{
for (auto &s : m_collection)
{
- auto source(dynamic_cast<S *>(s.get()));
+ auto *source(dynamic_cast<S *>(s.get()));
if (source)
{
if (lambda(source))
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index 579675ee8f8..7e093cd3909 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -212,10 +212,10 @@ public:
{
// read the netlist ...
- for (auto & d : defines)
+ for (const auto & d : defines)
setup().add_define(d);
- for (auto & r : roms)
+ for (const auto & r : roms)
setup().register_source(plib::make_unique<netlist_data_folder_t>(r));
#if 0
@@ -236,7 +236,7 @@ public:
setup().add_include(plib::make_unique<a>("netlist/devices/net_lib.h",""));
#endif
#endif
- for (auto & i : includes)
+ for (const auto & i : includes)
setup().add_include(plib::make_unique<netlist_data_folder_t>(i));
setup().register_source(plib::make_unique<netlist::source_file_t>(filename));
@@ -329,7 +329,7 @@ struct input_t
m_param = setup.find_param(pstring(buf.data()), true);
}
- void setparam()
+ void setparam() const
{
switch (m_param->param_type())
{
diff --git a/src/lib/netlist/prg/nlwav.cpp b/src/lib/netlist/prg/nlwav.cpp
index ed5f1b82b54..de65fc39552 100644
--- a/src/lib/netlist/prg/nlwav.cpp
+++ b/src/lib/netlist/prg/nlwav.cpp
@@ -612,7 +612,7 @@ int nlwav_app::execute()
return 0;
}
- for (auto &oi: opt_args())
+ for (const auto &oi: opt_args())
{
plib::unique_ptr<std::istream> fin;
if (oi == "-")
diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp
index f6d9c0c579b..ecf4bdb0042 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.cpp
+++ b/src/lib/netlist/solver/nld_matrix_solver.cpp
@@ -69,7 +69,7 @@ namespace solver
m_terms.clear();
- for (auto & net : nets)
+ for (const auto & net : nets)
{
m_terms.emplace_back(net);
m_rails_temp.emplace_back();
diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h
index a6b3c6774fd..a322aec478e 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.h
+++ b/src/lib/netlist/solver/nld_matrix_solver.h
@@ -201,7 +201,7 @@ namespace solver
}
// return number of floating point operations for solve
- std::size_t ops() { return m_ops; }
+ std::size_t ops() const { return m_ops; }
protected:
template <typename T>
@@ -263,7 +263,6 @@ namespace solver
void set_pointers();
- private:
analog_net_t *get_connected_net(terminal_t *term);
};
diff --git a/src/lib/netlist/solver/nld_solver.cpp b/src/lib/netlist/solver/nld_solver.cpp
index 2d003354455..47c585bd14a 100644
--- a/src/lib/netlist/solver/nld_solver.cpp
+++ b/src/lib/netlist/solver/nld_solver.cpp
@@ -284,7 +284,7 @@ namespace devices
if (n.isRailNet())
return true;
// if it's already processed - no need to continue
- for (auto & grp : groups)
+ for (const auto & grp : groups)
if (plib::container::contains(grp, &n))
return true;
return false;
diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp
index af959bc4112..9a28b4c00b8 100644
--- a/src/lib/netlist/tools/nl_convert.cpp
+++ b/src/lib/netlist/tools/nl_convert.cpp
@@ -185,7 +185,7 @@ void nl_convert_base_t::add_term(const pstring &netname, const pstring &devname,
void nl_convert_base_t::add_device_extra_s(const pstring &devname, const pstring &extra)
{
- auto dev = get_device(devname);
+ auto *dev = get_device(devname);
if (dev == nullptr)
out("// ERROR: Device {} not found\n", devname);
else
@@ -260,7 +260,7 @@ void nl_convert_base_t::dump_nl()
else
out("{}({})\n", m_devs[j]->type(),
m_devs[j]->name());
- for (auto &e : m_devs[j]->extra())
+ for (const auto &e : m_devs[j]->extra())
out("{}\n", e);
}
@@ -287,7 +287,7 @@ void nl_convert_base_t::dump_nl()
pstring nl_convert_base_t::get_nl_val(double val) const
{
- for (auto &e : m_units)
+ for (const auto &e : m_units)
{
if (e.m_mult <= plib::abs(val))
{
@@ -305,7 +305,7 @@ pstring nl_convert_base_t::get_nl_val(double val) const
double nl_convert_base_t::get_sp_unit(const pstring &unit) const
{
- for (auto &e : m_units)
+ for (const auto &e : m_units)
{
if (e.m_unit == unit)
return e.m_mult;
diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt
index 72cb4953af5..1ea3d22983c 100644
--- a/src/mame/arcade.flt
+++ b/src/mame/arcade.flt
@@ -1015,6 +1015,7 @@ redclash.cpp
relief.cpp
renegade.cpp
retofinv.cpp
+rfslots8085.cpp
rgum.cpp
rltennis.cpp
rmhaihai.cpp
diff --git a/src/mame/audio/bally.cpp b/src/mame/audio/bally.cpp
index 3b712c9b678..23506f47b53 100644
--- a/src/mame/audio/bally.cpp
+++ b/src/mame/audio/bally.cpp
@@ -89,7 +89,8 @@ DISCRETE_SOUND_END
//-------------------------------------------------
// sound_select - handle an external write to the board
//-------------------------------------------------
-WRITE8_MEMBER(bally_as2888_device::sound_select)
+
+void bally_as2888_device::sound_select(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as2888_device::sound_select_sync), this), data);
}
@@ -103,6 +104,7 @@ TIMER_CALLBACK_MEMBER(bally_as2888_device::sound_select_sync)
//-------------------------------------------------
// sound_int - handle an external sound interrupt to the board
//-------------------------------------------------
+
WRITE_LINE_MEMBER(bally_as2888_device::sound_int)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as2888_device::sound_int_sync), this), state);
@@ -120,6 +122,7 @@ TIMER_CALLBACK_MEMBER(bally_as2888_device::sound_int_sync)
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
+
void bally_as2888_device::device_add_mconfig(machine_config &config)
{
DISCRETE(config, m_discrete, as2888_discrete);
@@ -132,6 +135,7 @@ void bally_as2888_device::device_add_mconfig(machine_config &config)
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
+
void bally_as2888_device::device_start()
{
save_item(NAME(m_sound_select));
@@ -172,6 +176,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bally_as2888_device::timer_as2888)
//--------------------------------------------------------------------------
// IO ports
//--------------------------------------------------------------------------
+
static INPUT_PORTS_START(as3022)
PORT_START("SW1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Sound Test") PORT_CHANGED_MEMBER(DEVICE_SELF, bally_as3022_device, sw1, 0)
@@ -191,7 +196,8 @@ INPUT_CHANGED_MEMBER(bally_as3022_device::sw1)
//-------------------------------------------------
// sound_select - handle an external write to the board
//-------------------------------------------------
-WRITE8_MEMBER(bally_as3022_device::sound_select)
+
+void bally_as3022_device::sound_select(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as3022_device::sound_select_sync), this), data);
}
@@ -205,6 +211,7 @@ TIMER_CALLBACK_MEMBER(bally_as3022_device::sound_select_sync)
//-------------------------------------------------
// sound_int - handle an external sound interrupt to the board
//-------------------------------------------------
+
WRITE_LINE_MEMBER(bally_as3022_device::sound_int)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as3022_device::sound_int_sync), this), state);
@@ -218,6 +225,7 @@ TIMER_CALLBACK_MEMBER(bally_as3022_device::sound_int_sync)
//-------------------------------------------------
// pia_irq_w - IRQ line state changes
//-------------------------------------------------
+
WRITE_LINE_MEMBER(bally_as3022_device::pia_irq_w)
{
int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state();
@@ -227,6 +235,7 @@ WRITE_LINE_MEMBER(bally_as3022_device::pia_irq_w)
//-------------------------------------------------
// CPU map, from schematics
//-------------------------------------------------
+
void bally_as3022_device::as3022_map(address_map &map)
{
map.unmap_value_high();
@@ -239,6 +248,7 @@ void bally_as3022_device::as3022_map(address_map &map)
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
+
void bally_as3022_device::device_add_mconfig(machine_config &config)
{
M6808(config, m_cpu, DERIVED_CLOCK(1, 1));
@@ -268,6 +278,7 @@ void bally_as3022_device::device_add_mconfig(machine_config &config)
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
+
void bally_as3022_device::device_start()
{
// Set volumes to a sane default.
@@ -284,7 +295,8 @@ void bally_as3022_device::device_start()
//-------------------------------------------------
// pia_porta_r - PIA port A reads
//-------------------------------------------------
-READ8_MEMBER(bally_as3022_device::pia_porta_r)
+
+uint8_t bally_as3022_device::pia_porta_r()
{
if (m_bc1 && !m_bdir)
{
@@ -301,7 +313,8 @@ READ8_MEMBER(bally_as3022_device::pia_porta_r)
//-------------------------------------------------
// pia_porta_w - PIA port A writes
//-------------------------------------------------
-WRITE8_MEMBER(bally_as3022_device::pia_porta_w)
+
+void bally_as3022_device::pia_porta_w(uint8_t data)
{
if (m_bc1 && !m_bdir)
{
@@ -314,7 +327,8 @@ WRITE8_MEMBER(bally_as3022_device::pia_porta_w)
//-------------------------------------------------
// pia_portb_w - PIA port B writes
//-------------------------------------------------
-WRITE8_MEMBER(bally_as3022_device::pia_portb_w)
+
+void bally_as3022_device::pia_portb_w(uint8_t data)
{
m_bc1 = BIT(data, 0);
m_bdir = BIT(data, 1);
@@ -328,6 +342,7 @@ WRITE8_MEMBER(bally_as3022_device::pia_portb_w)
//-------------------------------------------------
// pia_cb2_w - PIA CB2 writes
//-------------------------------------------------
+
WRITE_LINE_MEMBER(bally_as3022_device::pia_cb2_w)
{
// This pin is hooked up to the amp, and disables sounds when hi
@@ -348,7 +363,8 @@ WRITE_LINE_MEMBER(bally_as3022_device::pia_cb2_w)
//-------------------------------------------------
// ay_io_r - AY8912 IO A reads (B is unconnected)
//-------------------------------------------------
-READ8_MEMBER(bally_as3022_device::ay_io_r)
+
+uint8_t bally_as3022_device::ay_io_r()
{
// The two high bits are unconnected, the others are inverted.
return ~m_sound_select & 0x3f;
@@ -374,6 +390,7 @@ void bally_as3022_device::update_ay_bus()
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
+
void bally_sounds_plus_device::device_add_mconfig(machine_config &config)
{
bally_as3022_device::device_add_mconfig(config);
@@ -393,6 +410,7 @@ void bally_sounds_plus_device::device_add_mconfig(machine_config &config)
//-------------------------------------------------
// CPU map, from schematics
//-------------------------------------------------
+
void bally_sounds_plus_device::sounds_plus_map(address_map &map)
{
map.unmap_value_high();
@@ -404,13 +422,14 @@ void bally_sounds_plus_device::sounds_plus_map(address_map &map)
//-------------------------------------------------
// pia_portb_w - PIA port B writes
//-------------------------------------------------
-WRITE8_MEMBER(bally_sounds_plus_device::vocalizer_pia_portb_w)
+
+void bally_sounds_plus_device::vocalizer_pia_portb_w(uint8_t data)
{
bool speech_clock = BIT(data, 6);
bool speech_data = BIT(data, 7);
m_mc3417->clock_w(speech_clock ? 1 : 0);
m_mc3417->digit_w(speech_data ? 1 : 0);
- pia_portb_w(space, offset, data);
+ pia_portb_w(data);
}
@@ -440,7 +459,8 @@ INPUT_CHANGED_MEMBER(bally_cheap_squeak_device::sw1)
//-------------------------------------------------
// sound_select - handle an external write to the board
//-------------------------------------------------
-WRITE8_MEMBER(bally_cheap_squeak_device::sound_select)
+
+void bally_cheap_squeak_device::sound_select(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_cheap_squeak_device::sound_select_sync), this), data);
}
@@ -468,6 +488,7 @@ TIMER_CALLBACK_MEMBER(bally_cheap_squeak_device::sound_int_sync)
//-------------------------------------------------
// CPU map, from schematics
//-------------------------------------------------
+
void bally_cheap_squeak_device::cheap_squeak_map(address_map &map)
{
map.unmap_value_high();
@@ -479,6 +500,7 @@ void bally_cheap_squeak_device::cheap_squeak_map(address_map &map)
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
+
void bally_cheap_squeak_device::device_add_mconfig(machine_config &config)
{
M6803(config, m_cpu, DERIVED_CLOCK(1, 1));
@@ -496,6 +518,7 @@ void bally_cheap_squeak_device::device_add_mconfig(machine_config &config)
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
+
void bally_cheap_squeak_device::device_start()
{
m_sound_ack_w_handler.resolve();
@@ -506,7 +529,8 @@ void bally_cheap_squeak_device::device_start()
//-------------------------------------------------
// out_p1_cb - IO port 1 write
//-------------------------------------------------
-WRITE8_MEMBER(bally_cheap_squeak_device::out_p1_cb)
+
+void bally_cheap_squeak_device::out_p1_cb(uint8_t data)
{
m_dac->write(data);
}
@@ -514,16 +538,18 @@ WRITE8_MEMBER(bally_cheap_squeak_device::out_p1_cb)
//-------------------------------------------------
// in_p2_cb - IO port 2 read
//-------------------------------------------------
-READ8_MEMBER(bally_cheap_squeak_device::in_p2_cb)
+
+uint8_t bally_cheap_squeak_device::in_p2_cb()
{
- int sound_int_bit = m_sound_int ? 1 : 0;
- return 0x40 | (m_sound_select & 0x0f) << 1 | sound_int_bit;
+ int sound_int_bit = m_sound_int ? 1 : 0;
+ return 0x40 | (m_sound_select & 0x0f) << 1 | sound_int_bit;
}
//-------------------------------------------------
// out_p2_cb - IO port 2 write
//-------------------------------------------------
-WRITE8_MEMBER(bally_cheap_squeak_device::out_p2_cb)
+
+void bally_cheap_squeak_device::out_p2_cb(uint8_t data)
{
m_sound_ack = BIT(data, 0);
if (!m_sound_ack_w_handler.isnull())
@@ -567,7 +593,8 @@ INPUT_CHANGED_MEMBER(bally_squawk_n_talk_device::sw1)
//-------------------------------------------------
// sound_select - handle an external write to the board
//-------------------------------------------------
-WRITE8_MEMBER(bally_squawk_n_talk_device::sound_select)
+
+void bally_squawk_n_talk_device::sound_select(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_squawk_n_talk_device::sound_select_sync), this), data);
}
@@ -580,6 +607,7 @@ TIMER_CALLBACK_MEMBER(bally_squawk_n_talk_device::sound_select_sync)
//-------------------------------------------------
// sound_int - handle an external sound interrupt to the board
//-------------------------------------------------
+
WRITE_LINE_MEMBER(bally_squawk_n_talk_device::sound_int)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_squawk_n_talk_device::sound_int_sync), this), state);
@@ -594,6 +622,7 @@ TIMER_CALLBACK_MEMBER(bally_squawk_n_talk_device::sound_int_sync)
//-------------------------------------------------
// CPU map, from schematics
//-------------------------------------------------
+
void bally_squawk_n_talk_device::squawk_n_talk_map(address_map &map)
{
map.unmap_value_high();
@@ -609,6 +638,7 @@ void bally_squawk_n_talk_device::squawk_n_talk_map(address_map &map)
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
+
void bally_squawk_n_talk_device::device_add_mconfig(machine_config &config)
{
M6802(config, m_cpu, DERIVED_CLOCK(1, 1)); // could also be jumpered to use a 6808
@@ -648,6 +678,7 @@ void bally_squawk_n_talk_device::device_add_mconfig(machine_config &config)
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
+
void bally_squawk_n_talk_device::device_start()
{
save_item(NAME(m_sound_select));
@@ -656,7 +687,8 @@ void bally_squawk_n_talk_device::device_start()
//-------------------------------------------------
// pia1_portb_w - PIA 1 port B write
//-------------------------------------------------
-WRITE8_MEMBER(bally_squawk_n_talk_device::pia1_portb_w)
+
+void bally_squawk_n_talk_device::pia1_portb_w(uint8_t data)
{
m_tms5200->rsq_w(BIT(data, 0));
m_tms5200->wsq_w(BIT(data, 1));
@@ -665,7 +697,8 @@ WRITE8_MEMBER(bally_squawk_n_talk_device::pia1_portb_w)
//-------------------------------------------------
// pia2_porta_r - PIA 2 port A reads
//-------------------------------------------------
-READ8_MEMBER(bally_squawk_n_talk_device::pia2_porta_r)
+
+uint8_t bally_squawk_n_talk_device::pia2_porta_r()
{
// 5 lines and they go through inverters
return ~m_sound_select & 0x1f;
@@ -674,6 +707,7 @@ READ8_MEMBER(bally_squawk_n_talk_device::pia2_porta_r)
//-------------------------------------------------
// pia2_ca2_w - PIA 2 CA2 writes
//-------------------------------------------------
+
WRITE_LINE_MEMBER(bally_squawk_n_talk_device::pia2_ca2_w)
{
machine().output().set_value("sound_led0", state);
@@ -729,7 +763,8 @@ void bally_squawk_n_talk_ay_device::device_start()
//-------------------------------------------------
// pia2_porta_r - PIA 2 port A reads
//-------------------------------------------------
-READ8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_r)
+
+uint8_t bally_squawk_n_talk_ay_device::pia2_porta_r()
{
if (m_bc1 && !m_bdir)
{
@@ -743,7 +778,8 @@ READ8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_r)
//-------------------------------------------------
// pia2_porta_w - PIA 2 port A writes
//-------------------------------------------------
-WRITE8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_w)
+
+void bally_squawk_n_talk_ay_device::pia2_porta_w(uint8_t data)
{
if (m_bc1 && !m_bdir)
{
@@ -756,7 +792,8 @@ WRITE8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_w)
//-------------------------------------------------
// pia2_portb_w - PIA 2 port B writes
//-------------------------------------------------
-WRITE8_MEMBER(bally_squawk_n_talk_ay_device::pia2_portb_w)
+
+void bally_squawk_n_talk_ay_device::pia2_portb_w(uint8_t data)
{
m_bc1 = BIT(data, 0);
m_bdir = BIT(data, 1);
@@ -790,7 +827,8 @@ WRITE_LINE_MEMBER(bally_squawk_n_talk_ay_device::pia2_cb2_w)
//-------------------------------------------------
// ay_io_r - AY8910 read
//-------------------------------------------------
-READ8_MEMBER(bally_squawk_n_talk_ay_device::ay_io_r)
+
+uint8_t bally_squawk_n_talk_ay_device::ay_io_r()
{
// 5 lines and they go through inverters
return ~m_sound_select & 0x1f;
diff --git a/src/mame/audio/bally.h b/src/mame/audio/bally.h
index c00c9c688ae..6d6fe670333 100644
--- a/src/mame/audio/bally.h
+++ b/src/mame/audio/bally.h
@@ -57,7 +57,7 @@ public:
{ }
// read/write
- DECLARE_WRITE8_MEMBER(sound_select);
+ void sound_select(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(sound_int);
void as2888_map(address_map &map);
@@ -114,7 +114,7 @@ public:
// read/write
DECLARE_INPUT_CHANGED_MEMBER(sw1);
- DECLARE_WRITE8_MEMBER(sound_select);
+ void sound_select(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(sound_int);
void as3022_map(address_map &map);
@@ -151,7 +151,7 @@ protected:
optional_device<mc3417_device> m_mc3417;
// overwridden by children
- DECLARE_WRITE8_MEMBER(pia_portb_w);
+ void pia_portb_w(uint8_t data);
private:
bool m_bc1;
@@ -162,11 +162,11 @@ private:
// internal communications
TIMER_CALLBACK_MEMBER(sound_select_sync);
TIMER_CALLBACK_MEMBER(sound_int_sync);
- DECLARE_READ8_MEMBER(pia_porta_r);
- DECLARE_WRITE8_MEMBER(pia_porta_w);
+ uint8_t pia_porta_r();
+ void pia_porta_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(pia_cb2_w);
DECLARE_WRITE_LINE_MEMBER(pia_irq_w);
- DECLARE_READ8_MEMBER(ay_io_r);
+ uint8_t ay_io_r();
void update_ay_bus();
};
@@ -192,7 +192,7 @@ protected:
private:
// internal communications
- DECLARE_WRITE8_MEMBER(vocalizer_pia_portb_w);
+ void vocalizer_pia_portb_w(uint8_t data);
};
@@ -213,7 +213,7 @@ public:
// read/write
DECLARE_INPUT_CHANGED_MEMBER(sw1);
- DECLARE_WRITE8_MEMBER(sound_select);
+ void sound_select(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(sound_int);
void cheap_squeak_map(address_map &map);
@@ -251,9 +251,9 @@ private:
// internal communications
TIMER_CALLBACK_MEMBER(sound_select_sync);
TIMER_CALLBACK_MEMBER(sound_int_sync);
- DECLARE_WRITE8_MEMBER(out_p1_cb);
- DECLARE_READ8_MEMBER(in_p2_cb);
- DECLARE_WRITE8_MEMBER(out_p2_cb);
+ void out_p1_cb(uint8_t data);
+ uint8_t in_p2_cb();
+ void out_p2_cb(uint8_t data);
void update_led();
};
@@ -275,7 +275,7 @@ public:
// read/write
DECLARE_INPUT_CHANGED_MEMBER(sw1);
- DECLARE_WRITE8_MEMBER(sound_select);
+ void sound_select(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(sound_int);
void squawk_n_talk_map(address_map &map);
@@ -318,13 +318,13 @@ protected:
uint8_t m_sound_select;
- DECLARE_READ8_MEMBER(pia2_porta_r);
+ uint8_t pia2_porta_r();
private:
// internal communications
TIMER_CALLBACK_MEMBER(sound_select_sync);
TIMER_CALLBACK_MEMBER(sound_int_sync);
- DECLARE_WRITE8_MEMBER(pia1_portb_w);
+ void pia1_portb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(pia2_ca2_w);
DECLARE_WRITE_LINE_MEMBER(pia_irq_w);
};
@@ -346,17 +346,17 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
- DECLARE_READ8_MEMBER(pia2_porta_r);
+ uint8_t pia2_porta_r();
private:
bool m_bc1;
bool m_bdir;
uint8_t m_ay_data;
- DECLARE_WRITE8_MEMBER(pia2_porta_w);
- DECLARE_WRITE8_MEMBER(pia2_portb_w);
+ void pia2_porta_w(uint8_t data);
+ void pia2_portb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(pia2_cb2_w);
- DECLARE_READ8_MEMBER(ay_io_r);
+ uint8_t ay_io_r();
void update_ay_bus();
};
diff --git a/src/mame/audio/cage.cpp b/src/mame/audio/cage.cpp
index 1866e730cc8..339df3ac3b6 100644
--- a/src/mame/audio/cage.cpp
+++ b/src/mame/audio/cage.cpp
@@ -435,7 +435,7 @@ void atari_cage_device::update_control_lines()
if ((m_control & 2) && m_cage_to_cpu_ready)
reason |= CAGE_IRQ_REASON_DATA_READY;
- m_irqhandler(machine().dummy_space(), 0, reason);
+ m_irqhandler(0, reason);
/* set the IOF input lines */
val = m_cpu->state_int(TMS3203X_IOF);
val &= ~0x88;
diff --git a/src/mame/audio/csd.cpp b/src/mame/audio/csd.cpp
index 9baf3792fed..5e35c2793d2 100644
--- a/src/mame/audio/csd.cpp
+++ b/src/mame/audio/csd.cpp
@@ -129,7 +129,7 @@ u8 midway_cheap_squeak_deluxe_device::stat_r()
void midway_cheap_squeak_deluxe_device::sr_w(u8 data)
{
- m_pia->write_portb(data & 0x0f);
+ m_pia->portb_w(data & 0x0f);
}
//-------------------------------------------------
diff --git a/src/mame/audio/dcs.cpp b/src/mame/audio/dcs.cpp
index 52202db87fc..7c685e9567e 100644
--- a/src/mame/audio/dcs.cpp
+++ b/src/mame/audio/dcs.cpp
@@ -1458,7 +1458,7 @@ void dcs_audio_device::set_io_callbacks(write_line_delegate output_full_cb, writ
}
-void dcs_audio_device::set_fifo_callbacks(read16_delegate fifo_data_r, read16_delegate fifo_status_r, write_line_delegate fifo_reset_w)
+void dcs_audio_device::set_fifo_callbacks(read16smo_delegate fifo_data_r, read16_delegate fifo_status_r, write_line_delegate fifo_reset_w)
{
m_fifo_data_r = fifo_data_r;
m_fifo_status_r = fifo_status_r;
@@ -1513,7 +1513,7 @@ READ16_MEMBER( dcs_audio_device::latch_status_r )
READ16_MEMBER( dcs_audio_device::fifo_input_r )
{
if (!m_fifo_data_r.isnull())
- return m_fifo_data_r(space,0, 0xffff);
+ return m_fifo_data_r();
else
return 0xffff;
}
@@ -1610,7 +1610,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::latch_delayed_w )
}
-WRITE16_MEMBER( dcs_audio_device::output_latch_w )
+void dcs_audio_device::output_latch_w(uint16_t data)
{
m_pre_output_data = data;
if (LOG_DCS_IO)
@@ -2184,7 +2184,7 @@ void dcs_audio_device::fifo_notify(int count, int max)
if (transfer.state != 5 || transfer.fifo_entries == transfer.writes_left || transfer.fifo_entries >= 256)
{
for ( ; transfer.fifo_entries; transfer.fifo_entries--)
- preprocess_write(m_fifo_data_r(machine().dummy_space(), 0, 0xffff));
+ preprocess_write(m_fifo_data_r());
}
}
@@ -2197,7 +2197,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( dcs_audio_device::transfer_watchdog_callback )
if (transfer.fifo_entries && starting_writes_left == transfer.writes_left)
{
for ( ; transfer.fifo_entries; transfer.fifo_entries--)
- preprocess_write(m_fifo_data_r(machine().dummy_space(), 0, 0xffff));
+ preprocess_write(m_fifo_data_r());
}
if (transfer.watchdog != nullptr)
transfer.watchdog->adjust(attotime::from_msec(1), transfer.writes_left);
@@ -2212,7 +2212,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::s1_ack_callback2 )
machine().scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(dcs_audio_device::s1_ack_callback2),this), param);
return;
}
- output_latch_w(m_cpu->space(AS_PROGRAM), 0, 0x000a, 0xffff);
+ output_latch_w(0x000a);
}
@@ -2224,7 +2224,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::s1_ack_callback1 )
machine().scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(dcs_audio_device::s1_ack_callback1),this), param);
return;
}
- output_latch_w(m_cpu->space(AS_PROGRAM), 0, param, 0xffff);
+ output_latch_w(param);
/* chain to the next word we need to write back */
machine().scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(dcs_audio_device::s1_ack_callback2),this));
@@ -2364,7 +2364,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::s2_ack_callback )
machine().scheduler().timer_set(attotime::from_usec(1), timer_expired_delegate(FUNC(dcs_audio_device::s2_ack_callback),this), param);
return;
}
- output_latch_w(space, 0, param, 0xffff);
+ output_latch_w(param);
output_control_w(space, 0, (m_output_control & ~0xff00) | 0x0300, 0xffff);
}
diff --git a/src/mame/audio/dcs.h b/src/mame/audio/dcs.h
index aa61cc0f707..24646eb7829 100644
--- a/src/mame/audio/dcs.h
+++ b/src/mame/audio/dcs.h
@@ -26,7 +26,7 @@ public:
void set_auto_ack(int state);
- void set_fifo_callbacks(read16_delegate fifo_data_r, read16_delegate fifo_status_r, write_line_delegate fifo_reset_w);
+ void set_fifo_callbacks(read16smo_delegate fifo_data_r, read16_delegate fifo_status_r, write_line_delegate fifo_reset_w);
void set_io_callbacks(write_line_delegate output_full_cb, write_line_delegate input_empty_cb);
uint16_t data_r();
@@ -75,7 +75,7 @@ public:
DECLARE_READ16_MEMBER( input_latch_r );
DECLARE_READ32_MEMBER( input_latch32_r );
TIMER_CALLBACK_MEMBER( latch_delayed_w );
- DECLARE_WRITE16_MEMBER( output_latch_w );
+ void output_latch_w(uint16_t data);
DECLARE_WRITE32_MEMBER( output_latch32_w );
void delayed_ack_w();
TIMER_CALLBACK_MEMBER( delayed_ack_w_callback );
@@ -217,7 +217,7 @@ protected:
write_line_delegate m_output_full_cb;
write_line_delegate m_input_empty_cb;
- read16_delegate m_fifo_data_r;
+ read16smo_delegate m_fifo_data_r;
read16_delegate m_fifo_status_r;
write_line_delegate m_fifo_reset_w;
diff --git a/src/mame/audio/dkong.cpp b/src/mame/audio/dkong.cpp
index b34d12a090c..01f94b1b876 100644
--- a/src/mame/audio/dkong.cpp
+++ b/src/mame/audio/dkong.cpp
@@ -1229,11 +1229,11 @@ READ8_MEMBER(dkong_state::dkong_voice_status_r)
READ8_MEMBER(dkong_state::dkong_tune_r)
{
- uint8_t page = m_dev_vp2->read(space, 0) & 0x47;
+ uint8_t page = m_dev_vp2->read(0) & 0x47;
if ( page & 0x40 )
{
- return (m_ls175_3d->read(space, 0) & 0x0F) | (dkong_voice_status_r(space, 0) << 4);
+ return (m_ls175_3d->read(0) & 0x0F) | (dkong_voice_status_r(space, 0) << 4);
}
else
{
diff --git a/src/mame/audio/exidy.cpp b/src/mame/audio/exidy.cpp
index df55e898700..d3ce6870fe9 100644
--- a/src/mame/audio/exidy.cpp
+++ b/src/mame/audio/exidy.cpp
@@ -690,13 +690,13 @@ void exidy_sh8253_sound_device::device_reset()
WRITE8_MEMBER(venture_sound_device::pa_w)
{
- m_pia->write_porta(data);
+ m_pia->porta_w(data);
}
WRITE8_MEMBER(venture_sound_device::pb_w)
{
- m_pia->write_portb(data);
+ m_pia->portb_w(data);
}
@@ -885,7 +885,7 @@ READ8_MEMBER(victory_sound_device::status_r)
TIMER_CALLBACK_MEMBER(victory_sound_device::delayed_command_w)
{
- m_pia->write_porta(param);
+ m_pia->porta_w(param);
m_pia_ca1 = 0;
m_pia->ca1_w(m_pia_ca1);
}
@@ -960,7 +960,7 @@ void victory_sound_device::device_reset()
/* these two lines shouldn't be needed, but it avoids the log entry
as the sound CPU checks port A before the main CPU ever writes to it */
- m_pia->write_porta(0);
+ m_pia->porta_w(0);
m_pia_ca1 = 1;
m_pia->ca1_w(m_pia_ca1);
}
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index a9227fd9f54..3bf157011b7 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -75,7 +75,7 @@ WRITE8_MEMBER( gottlieb_sound_r0_device::write )
uint8_t pb0_3 = data ^ 15;
uint8_t pb4_7 = ioport("SB0")->read() & 0x90;
m_sndcmd = pb0_3 | pb4_7;
- m_r6530->write(space, offset, m_sndcmd);
+ m_r6530->write(offset, m_sndcmd);
}
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index dfa62f619af..427565e9f55 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -70,7 +70,7 @@ void midway_ssio_device::suspend_cpu()
// read - return the status value
//-------------------------------------------------
-READ8_MEMBER(midway_ssio_device::read)
+uint8_t midway_ssio_device::read()
{
return m_status;
}
@@ -81,7 +81,7 @@ READ8_MEMBER(midway_ssio_device::read)
// input latches
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::write)
+void midway_ssio_device::write(offs_t offset, uint8_t data)
{
synchronize(0, (offset << 8) | (data & 0xff));
}
@@ -112,12 +112,12 @@ WRITE_LINE_MEMBER(midway_ssio_device::reset_write)
// on the device
//-------------------------------------------------
-READ8_MEMBER(midway_ssio_device::ioport_read)
+uint8_t midway_ssio_device::ioport_read(offs_t offset)
{
uint8_t result = m_ports[offset].read_safe(0xff);
if (!m_custom_input[offset].isnull())
result = (result & ~m_custom_input_mask[offset]) |
- (m_custom_input[offset](space, offset, 0xff) & m_custom_input_mask[offset]);
+ (m_custom_input[offset]() & m_custom_input_mask[offset]);
return result;
}
@@ -127,11 +127,11 @@ READ8_MEMBER(midway_ssio_device::ioport_read)
// on the device
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::ioport_write)
+void midway_ssio_device::ioport_write(offs_t offset, uint8_t data)
{
int which = offset >> 2;
if (!m_custom_output[which].isnull())
- m_custom_output[which](space, offset & 4, data & m_custom_output_mask[which], 0xff);
+ m_custom_output[which](data & m_custom_output_mask[which]);
}
@@ -233,11 +233,14 @@ INTERRUPT_GEN_MEMBER(midway_ssio_device::clock_14024)
// irq_clear - reset the IRQ state and 14024 count
//-------------------------------------------------
-READ8_MEMBER(midway_ssio_device::irq_clear)
+uint8_t midway_ssio_device::irq_clear()
{
// a read here asynchronously resets the 14024 count, clearing /SINT
- m_14024_count = 0;
- m_cpu->set_input_line(0, CLEAR_LINE);
+ if (!machine().side_effects_disabled())
+ {
+ m_14024_count = 0;
+ m_cpu->set_input_line(0, CLEAR_LINE);
+ }
return 0xff;
}
@@ -246,7 +249,7 @@ READ8_MEMBER(midway_ssio_device::irq_clear)
// status_w - set the outgoing status value
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::status_w)
+void midway_ssio_device::status_w(uint8_t data)
{
m_status = data;
}
@@ -256,7 +259,7 @@ WRITE8_MEMBER(midway_ssio_device::status_w)
// data_r - read incoming data latches
//-------------------------------------------------
-READ8_MEMBER(midway_ssio_device::data_r)
+uint8_t midway_ssio_device::data_r(offs_t offset)
{
return m_data[offset];
}
@@ -266,7 +269,7 @@ READ8_MEMBER(midway_ssio_device::data_r)
// porta0_w - handle writes to AY-8910 #0 port A
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::porta0_w)
+void midway_ssio_device::porta0_w(uint8_t data)
{
m_duty_cycle[0][0] = data & 15;
m_duty_cycle[0][1] = data >> 4;
@@ -278,7 +281,7 @@ WRITE8_MEMBER(midway_ssio_device::porta0_w)
// portb0_w - handle writes to AY-8910 #0 port B
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::portb0_w)
+void midway_ssio_device::portb0_w(uint8_t data)
{
m_duty_cycle[0][2] = data & 15;
m_overall[0] = (data >> 4) & 7;
@@ -290,7 +293,7 @@ WRITE8_MEMBER(midway_ssio_device::portb0_w)
// porta1_w - handle writes to AY-8910 #1 port A
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::porta1_w)
+void midway_ssio_device::porta1_w(uint8_t data)
{
m_duty_cycle[1][0] = data & 15;
m_duty_cycle[1][1] = data >> 4;
@@ -302,7 +305,7 @@ WRITE8_MEMBER(midway_ssio_device::porta1_w)
// portb1_w - handle writes to AY-8910 #1 port B
//-------------------------------------------------
-WRITE8_MEMBER(midway_ssio_device::portb1_w)
+void midway_ssio_device::portb1_w(uint8_t data)
{
m_duty_cycle[1][2] = data & 15;
m_overall[1] = (data >> 4) & 7;
@@ -483,7 +486,7 @@ midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconf
// read - return the status value
//-------------------------------------------------
-READ8_MEMBER(midway_sounds_good_device::read)
+uint8_t midway_sounds_good_device::read()
{
return m_status;
}
@@ -494,7 +497,7 @@ READ8_MEMBER(midway_sounds_good_device::read)
// latch
//-------------------------------------------------
-WRITE8_MEMBER(midway_sounds_good_device::write)
+void midway_sounds_good_device::write(uint8_t data)
{
synchronize(0, data);
}
@@ -515,7 +518,7 @@ WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write)
// porta_w - PIA port A writes
//-------------------------------------------------
-WRITE8_MEMBER(midway_sounds_good_device::porta_w)
+void midway_sounds_good_device::porta_w(uint8_t data)
{
m_dacval = (data << 2) | (m_dacval & 3);
m_dac->write(m_dacval);
@@ -526,7 +529,7 @@ WRITE8_MEMBER(midway_sounds_good_device::porta_w)
// portb_w - PIA port B writes
//-------------------------------------------------
-WRITE8_MEMBER(midway_sounds_good_device::portb_w)
+void midway_sounds_good_device::portb_w(uint8_t data)
{
uint8_t z_mask = m_pia->port_b_z_mask();
@@ -612,7 +615,7 @@ void midway_sounds_good_device::device_reset()
void midway_sounds_good_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- m_pia->write_portb((param >> 1) & 0x0f);
+ m_pia->portb_w((param >> 1) & 0x0f);
m_pia->ca1_w(~param & 0x01);
// oftentimes games will write one nibble at a time; the sync on this is very
@@ -646,7 +649,7 @@ midway_turbo_cheap_squeak_device::midway_turbo_cheap_squeak_device(const machine
// read - return the status value
//-------------------------------------------------
-READ8_MEMBER(midway_turbo_cheap_squeak_device::read)
+uint8_t midway_turbo_cheap_squeak_device::read()
{
return m_status;
}
@@ -657,7 +660,7 @@ READ8_MEMBER(midway_turbo_cheap_squeak_device::read)
// latch
//-------------------------------------------------
-WRITE8_MEMBER(midway_turbo_cheap_squeak_device::write)
+void midway_turbo_cheap_squeak_device::write(uint8_t data)
{
synchronize(0, data);
}
@@ -677,7 +680,7 @@ WRITE_LINE_MEMBER(midway_turbo_cheap_squeak_device::reset_write)
// porta_w - PIA port A writes
//-------------------------------------------------
-WRITE8_MEMBER(midway_turbo_cheap_squeak_device::porta_w)
+void midway_turbo_cheap_squeak_device::porta_w(uint8_t data)
{
m_dacval = (data << 2) | (m_dacval & 3);
m_dac->write(m_dacval);
@@ -688,7 +691,7 @@ WRITE8_MEMBER(midway_turbo_cheap_squeak_device::porta_w)
// portb_w - PIA port B writes
//-------------------------------------------------
-WRITE8_MEMBER(midway_turbo_cheap_squeak_device::portb_w)
+void midway_turbo_cheap_squeak_device::portb_w(uint8_t data)
{
m_dacval = (m_dacval & ~3) | (data >> 6);
m_dac->write(m_dacval);
@@ -769,7 +772,7 @@ void midway_turbo_cheap_squeak_device::device_reset()
void midway_turbo_cheap_squeak_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- m_pia->write_portb((param >> 1) & 0x0f);
+ m_pia->portb_w((param >> 1) & 0x0f);
m_pia->ca1_w(~param & 0x01);
// oftentimes games will write one nibble at a time; the sync on this is very
diff --git a/src/mame/audio/midway.h b/src/mame/audio/midway.h
index 07eeb403217..ea813eaf1af 100644
--- a/src/mame/audio/midway.h
+++ b/src/mame/audio/midway.h
@@ -51,11 +51,11 @@ public:
void suspend_cpu();
// read/write
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read();
+ void write(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(reset_write);
- DECLARE_READ8_MEMBER(ioport_read);
- DECLARE_WRITE8_MEMBER(ioport_write);
+ uint8_t ioport_read(offs_t offset);
+ void ioport_write(offs_t offset, uint8_t data);
// configuration
template <typename... T> void set_custom_input(int which, uint8_t mask, T &&... args)
@@ -70,9 +70,9 @@ public:
}
// internal communications
- DECLARE_READ8_MEMBER(irq_clear);
- DECLARE_WRITE8_MEMBER(status_w);
- DECLARE_READ8_MEMBER(data_r);
+ uint8_t irq_clear();
+ void status_w(uint8_t data);
+ uint8_t data_r(offs_t offset);
void ssio_map(address_map &map);
static void ssio_input_ports(address_map &map, const char *ssio);
@@ -110,15 +110,15 @@ private:
// I/O port overrides
uint8_t m_custom_input_mask[5];
- read8_delegate::array<5> m_custom_input;
+ read8smo_delegate::array<5> m_custom_input;
uint8_t m_custom_output_mask[2];
- write8_delegate::array<2> m_custom_output;
+ write8smo_delegate::array<2> m_custom_output;
INTERRUPT_GEN_MEMBER(clock_14024);
- DECLARE_WRITE8_MEMBER(porta0_w);
- DECLARE_WRITE8_MEMBER(portb0_w);
- DECLARE_WRITE8_MEMBER(porta1_w);
- DECLARE_WRITE8_MEMBER(portb1_w);
+ void porta0_w(uint8_t data);
+ void portb0_w(uint8_t data);
+ void porta1_w(uint8_t data);
+ void portb1_w(uint8_t data);
};
@@ -132,8 +132,8 @@ public:
midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16'000'000);
// read/write
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read();
+ void write(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(reset_write);
void soundsgood_map(address_map &map);
@@ -155,8 +155,8 @@ private:
uint16_t m_dacval;
// internal communications
- DECLARE_WRITE8_MEMBER(porta_w);
- DECLARE_WRITE8_MEMBER(portb_w);
+ void porta_w(uint8_t data);
+ void portb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(irq_w);
};
@@ -171,8 +171,8 @@ public:
midway_turbo_cheap_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 8'000'000);
// read/write
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ uint8_t read();
+ void write(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(reset_write);
void turbocs_map(address_map &map);
@@ -194,8 +194,8 @@ private:
uint16_t m_dacval;
// internal communications
- DECLARE_WRITE8_MEMBER(porta_w);
- DECLARE_WRITE8_MEMBER(portb_w);
+ void porta_w(uint8_t data);
+ void portb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(irq_w);
};
diff --git a/src/mame/audio/mw8080bw.cpp b/src/mame/audio/mw8080bw.cpp
index 95e8752b3a7..c6142839e98 100644
--- a/src/mame/audio/mw8080bw.cpp
+++ b/src/mame/audio/mw8080bw.cpp
@@ -9,6 +9,7 @@
#include "emu.h"
#include "audio/mw8080bw.h"
+#include "audio/nl_gunfight.h"
#include "includes/mw8080bw.h"
#include "speaker.h"
@@ -714,7 +715,10 @@ void seawolf_audio_device::device_start()
gunfight_audio_device::gunfight_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) :
device_t(mconfig, GUNFIGHT_AUDIO, tag, owner, clock),
- m_samples(*this, "samples%u", 1U)
+ m_left_shot(*this, "sound_nl:left_shot"),
+ m_right_shot(*this, "sound_nl:right_shot"),
+ m_left_hit(*this, "sound_nl:left_hit"),
+ m_right_hit(*this, "sound_nl:right_hit")
{
}
@@ -727,46 +731,52 @@ void gunfight_audio_device::write(u8 data)
// the 74175 latches and inverts the top 4 bits
switch ((~data >> 4) & 0x0f)
{
- case 0x00:
- break;
case 0x01: // LEFT SHOOT sound (left speaker)
- m_samples[0]->start(0, 0);
+ m_left_shot->write_line(1);
break;
case 0x02: // RIGHT SHOOT sound (right speaker)
- m_samples[1]->start(0, 0);
+ m_right_shot->write_line(1);
break;
case 0x03: // LEFT HIT sound (left speaker)
- m_samples[0]->start(0, 1);
+ m_left_hit->write_line(1);
break;
- case 0x04: // enable RIGHT HIT sound (right speaker)
- m_samples[1]->start(0, 1);
+ case 0x04: // RIGHT HIT sound (right speaker)
+ m_right_hit->write_line(1);
break;
- default:
- logerror("%s: Unknown sh port write %02x\n", machine().describe_context(), data);
+ default: // any other value will turn off the sound switches
+ m_left_shot->write_line(0);
+ m_right_shot->write_line(0);
+ m_left_hit->write_line(0);
+ m_right_hit->write_line(0);
break;
}
}
void gunfight_audio_device::device_add_mconfig(machine_config &config)
{
- static char const *const sample_names[] = {
- "*gunfight",
- "gunshot",
- "killed",
- nullptr };
-
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- SAMPLES(config, m_samples[0]);
- m_samples[0]->set_channels(1);
- m_samples[0]->set_samples_names(sample_names);
- m_samples[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
-
- SAMPLES(config, m_samples[1]);
- m_samples[1]->set_channels(1);
- m_samples[1]->set_samples_names(sample_names);
- m_samples[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
+ netlist_mame_sound_device &nl_sound =
+ NETLIST_SOUND(config, "sound_nl", 48000)
+ .set_source(NETLIST_NAME(gunfight));
+ nl_sound.add_route(0, "lspeaker", 0.5);
+ nl_sound.add_route(1, "rspeaker", 0.5);
+
+ NETLIST_LOGIC_INPUT(config, "sound_nl:left_shot", "I_LEFT_SHOT.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:right_shot", "I_RIGHT_SHOT.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:left_hit", "I_LEFT_HIT.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:right_hit", "I_RIGHT_HIT.IN", 0);
+
+ // Multipliers set so that the highest output spikes of
+ // +/- 3 volts at mid potentiometer settings give safe
+ // non-clipping sample values of +/- 30,000. This would
+ // lead to clipping if all the potentiometers were set to max,
+ // but that's unlikely to happen, since the potentiometers are
+ // currently fixed and even on the real machine were service
+ // adjustments only.
+ NETLIST_STREAM_OUTPUT(config, "sound_nl:cout0", 0, "OUT_L").set_mult_offset(30000.0 / 3.0, 0.0);
+ NETLIST_STREAM_OUTPUT(config, "sound_nl:cout1", 1, "OUT_R").set_mult_offset(30000.0 / 3.0, 0.0);
}
void gunfight_audio_device::device_start()
diff --git a/src/mame/audio/mw8080bw.h b/src/mame/audio/mw8080bw.h
index 5a6bd52dbc2..5d010f8bc17 100644
--- a/src/mame/audio/mw8080bw.h
+++ b/src/mame/audio/mw8080bw.h
@@ -14,6 +14,7 @@
#include "sound/discrete.h"
#include "sound/samples.h"
#include "sound/sn76477.h"
+#include "machine/netlist.h"
class midway_tone_generator_device_base : public device_t
@@ -58,7 +59,10 @@ protected:
virtual void device_start() override;
private:
- required_device_array<samples_device, 2> m_samples;
+ required_device<netlist_mame_logic_input_device> m_left_shot;
+ required_device<netlist_mame_logic_input_device> m_right_shot;
+ required_device<netlist_mame_logic_input_device> m_left_hit;
+ required_device<netlist_mame_logic_input_device> m_right_hit;
};
diff --git a/src/mame/audio/nl_gunfight.cpp b/src/mame/audio/nl_gunfight.cpp
new file mode 100644
index 00000000000..bf7f8391f46
--- /dev/null
+++ b/src/mame/audio/nl_gunfight.cpp
@@ -0,0 +1,492 @@
+// license:CC0
+// copyright-holders:Colin Douglas Howell
+
+#include "netlist/devices/net_lib.h"
+
+
+#ifndef __PLIB_PREPROCESSOR__
+
+ #define NOISE(_name) \
+ NET_REGISTER_DEV(NOISE, _name)
+
+#endif
+
+#define USE_FRONTIERS 1
+#define FAST_SWITCHES 1
+
+// I got this circuit's layout from Midway's schematic, "Gun Fight Sound
+// Generator Detail P.C. 597-907E".
+
+// All of the amplifying transistors in this circuit are NPN transistors of a
+// particular type, marked as "A-138" on the Gun Fight schematics. This seems
+// to be the Amperex A-138, a low-power silicon NPN transistor made by Amperex
+// Electronics, which was a U.S. division of Philips. This transistor is long
+// obsolete and has fallen into obscurity. The only source I could find with
+// any data on it (given in greatly abbreviated form) is _Transistor
+// Discontinued Devices D.A.T.A.Book, Edition 16_ (1980), by Derivation and
+// Tabulation Associates; the A-138 is listed on p. 76, line 86. From that
+// source, and the way the transistor is used in Gun Fight, it appears to be
+// a fairly ordinary NPN transistor not very different from the 2N3904.
+
+// Gun Fight's noise generator circuit is based on a reverse-biased 9.1-volt
+// Zener diode (D304, a 1N5239). The Zener's noise current is amplified by a
+// transistor, resulting in white noise output whose peak-to-peak voltage
+// should be around a volt, according to various sources (e.g., _Diode,
+// Transistor & FET Circuits Manual_, R. M. Marston (2013), p. 107). Since the
+// netlist library does not yet support Zener diodes or their noise behavior,
+// I use a very simple 1-volt peak-to-peak white noise generator instead.
+
+static NETLIST_START(NOISE)
+ VS(FV, 0)
+ PARAM(FV.FUNC, "rand() - 0.5")
+
+ ALIAS(P, FV.P)
+ ALIAS(N, FV.N)
+NETLIST_END()
+
+// Most of the Gun Fight sound circuits have a common structure which is
+// repeated four times, one for each type of sound effect. (For the common
+// left-master and right-master amplifiers and outputs, the structure is
+// repeated only twice.) To make the netlist easier to follow and verify, I've
+// grouped its components and connections by function, ordering the groups
+// approximately according to the flow of signals from the activating switches
+// (and the common noise source) to the initial sound-effect filters and
+// amplifiers, to their coupling capacitors and potentiometers, and then to
+// the mixing circuits and the second-stage amplifiers, coupling capacitors
+// and master-volume potentiometers. Within each group, I've grouped the sets
+// of four similar components or connections together and listed them in the
+// order: left-shot, right-shot, left-hit, right-hit. (For master-related
+// components, the order is simply left and right.)
+
+// The sound effects are simple "bang" sounds that are generated by
+// single-transistor amplifiers which are wired in a common-emitter
+// configuration. These amplifiers draw their current from storage capacitors
+// which are charged from the 16.5-volt power supply via dual-transistor
+// switches; the switches, in turn, are activated by digital signals from TTL
+// logic. The charging of the capacitors by the switches, and their
+// discharging by the amplifiers, provide the attack and decay of the "bang"
+// sounds.
+
+static NETLIST_START(gunfight_schematics)
+
+#if FAST_SWITCHES
+
+ // Use fast, abstracted activation switches instead of a detailed
+ // circuit model of the actual dual-transistor activation switches.
+ // Although the latter would simulate the total circuit more
+ // accurately, it does not make any audible difference in the
+ // sound output produced.
+
+ RES_SWITCH(SW_LEFT_SHOT, IN_LS, I_V16_5.Q, R130.1)
+ RES_SWITCH(SW_RIGHT_SHOT, IN_RS, I_V16_5.Q, R230.1)
+ RES_SWITCH(SW_LEFT_HIT, IN_LH, I_V16_5.Q, R117.1)
+ RES_SWITCH(SW_RIGHT_HIT, IN_RH, I_V16_5.Q, R217.1)
+
+ // The default on-resistance of 1 ohm is a bit high for my tastes,
+ // considering the charging resistor which follows is only 15 ohms.
+ PARAM(SW_LEFT_SHOT.RON, 0.1)
+ PARAM(SW_RIGHT_SHOT.RON, 0.1)
+ PARAM(SW_LEFT_HIT.RON, 0.1)
+ PARAM(SW_RIGHT_HIT.RON, 0.1)
+
+#else
+
+ // Each dual-transistor switch has two parts: a "low-side" NPN
+ // transistor which is switched by a TTL logic input, and a
+ // "high-side" PNP transistor which is switched by the low-side
+ // NPN transistor. It is the PNP transistor which actually switches
+ // the 16.5-volt power.
+
+ // "Low-side" NPN transistor switches, driven by TTL logic inputs.
+
+ RES(R134, RES_R(470))
+ RES(R234, RES_R(470))
+ RES(R121, RES_R(470))
+ RES(R221, RES_R(470))
+
+ NET_C(IN_LS, R134.1)
+ NET_C(IN_RS, R234.1)
+ NET_C(IN_LH, R121.1)
+ NET_C(IN_RH, R221.1)
+
+ RES(R133, RES_K(5.1))
+ RES(R233, RES_K(5.1))
+ RES(R120, RES_K(5.1))
+ RES(R220, RES_K(5.1))
+
+ QBJT_SW(Q108, "NPN")
+ QBJT_SW(Q208, "NPN")
+ QBJT_SW(Q105, "NPN")
+ QBJT_SW(Q205, "NPN")
+
+ // These actually all go to TTL ground at pin 7 of 7404 IC H6,
+ // rather than the usual circuit ground.
+ NET_C(R133.2, R233.2, R120.2, R220.2, Q108.E, Q208.E, Q105.E, Q205.E, GND)
+
+ NET_C(R134.2, R133.1, Q108.B)
+ NET_C(R234.2, R233.1, Q208.B)
+ NET_C(R121.2, R120.1, Q105.B)
+ NET_C(R221.2, R220.1, Q205.B)
+
+ RES(R131, RES_K(1))
+ RES(R231, RES_K(1))
+ RES(R118, RES_K(1))
+ RES(R218, RES_K(1))
+
+ NET_C(Q108.C, R131.1)
+ NET_C(Q208.C, R231.1)
+ NET_C(Q105.C, R118.1)
+ NET_C(Q205.C, R218.1)
+
+ // "High-side" PNP transistor switches, driven by "low-side"
+ // NPN switch outputs. The output of these goes to the storage
+ // capacitors and the current inputs of the sound-effect amplifiers.
+
+ RES(R132, RES_K(5.1))
+ RES(R232, RES_K(5.1))
+ RES(R119, RES_K(5.1))
+ RES(R219, RES_K(5.1))
+
+ QBJT_SW(Q107, "PNP")
+ QBJT_SW(Q207, "PNP")
+ QBJT_SW(Q104, "PNP")
+ QBJT_SW(Q204, "PNP")
+
+ // All connected to 16.5-volt power.
+ NET_C(R132.1, R232.1, R119.1, R219.1, Q107.E, Q207.E, Q104.E, Q204.E, I_V16_5.Q)
+
+ NET_C(R131.2, R132.2, Q107.B)
+ NET_C(R231.2, R232.2, Q207.B)
+ NET_C(R118.2, R119.2, Q104.B)
+ NET_C(R218.2, R219.2, Q204.B)
+
+ NET_C(Q107.C, R130.1)
+ NET_C(Q207.C, R230.1)
+ NET_C(Q104.C, R117.1)
+ NET_C(Q204.C, R217.1)
+
+ // Description of switches ends here.
+
+#endif
+
+ // The following are the current inputs to the storage capacitors and
+ // sound-effect amplifiers.
+
+ RES(R130, RES_R(15))
+ RES(R230, RES_R(15))
+ RES(R117, RES_R(15))
+ RES(R217, RES_R(15))
+
+ CAP(C122, CAP_U(10))
+ CAP(C222, CAP_U(10))
+ CAP(C116, CAP_U(20))
+ CAP(C216, CAP_U(20))
+ NET_C(C122.2, C222.2, C116.2, C216.2, GND)
+
+ NET_C(R130.2, C122.1, R126.1, R124.1)
+ NET_C(R230.2, C222.1, R226.1, R224.1)
+ NET_C(R117.2, C116.1, R113.1, R111.1)
+ NET_C(R217.2, C216.1, R213.1, R211.1)
+
+ // Use a simple noise generating macro device, based on a voltage
+ // source, to simulate the AC noise generated by amplified Zener.
+ // This is the basic noise source which is filtered and amplified by
+ // the sound-effect circuits.
+
+ NOISE(N1)
+ NET_C(N1.N, GND)
+
+ // Coupling capacitors from noise generator to sound effect
+ // frequency filters.
+
+ CAP(C303, CAP_U(0.1))
+ CAP(C306, CAP_U(0.1))
+ CAP(C304, CAP_U(0.1))
+ CAP(C305, CAP_U(0.1))
+
+ NET_C(C303.1, C306.1, C304.1, C305.1, N1.P)
+
+ // Sound effect frequency filters. Each of these is a second-order
+ // low-pass filter with cutoff frequency determined by its component
+ // values. The different capacitor values produce each sound effect's
+ // distinct pitch.
+
+ RES(R129, RES_K(20))
+ RES(R229, RES_K(20))
+ RES(R116, RES_K(20))
+ RES(R216, RES_K(20))
+
+ NET_C(C303.2, R129.1)
+ NET_C(C306.2, R229.1)
+ NET_C(C304.2, R116.1)
+ NET_C(C305.2, R216.1)
+
+ CAP(C121, CAP_U(0.015))
+ CAP(C221, CAP_U(0.015))
+ CAP(C115, CAP_U(0.033))
+ CAP(C215, CAP_U(0.033))
+ NET_C(C121.2, C221.2, C115.2, C215.2, GND)
+
+ RES(R128, RES_K(30))
+ RES(R228, RES_K(30))
+ RES(R115, RES_K(30))
+ RES(R215, RES_K(30))
+
+ NET_C(R129.2, C121.1, R128.1)
+ NET_C(R229.2, C221.1, R228.1)
+ NET_C(R116.2, C115.1, R115.1)
+ NET_C(R216.2, C215.1, R215.1)
+
+ CAP(C120, CAP_U(0.01))
+ CAP(C220, CAP_U(0.015))
+ CAP(C114, CAP_U(0.1))
+ CAP(C214, CAP_U(0.047))
+ NET_C(C120.2, C220.2, C114.2, C214.2, GND)
+
+ // Sound effect amplifier circuits. Each of these is a single NPN
+ // transistor wired as a common-emitter amplifier. The "hit"
+ // sound effect amplifiers also have a bypass capacitor at the
+ // emitter. The attack and decay of the sound effects is handled
+ // by controlling the current supply to each amplifier, which is
+ // done by the switching circuits described above.
+
+ RES(R126, RES_K(330))
+ RES(R226, RES_K(330))
+ RES(R113, RES_K(330))
+ RES(R213, RES_K(330))
+
+ RES(R127, RES_K(30))
+ RES(R227, RES_K(30))
+ RES(R114, RES_K(30))
+ RES(R214, RES_K(30))
+ NET_C(R127.2, R227.2, R114.2, R214.2, GND)
+
+ RES(R124, RES_K(5.1))
+ RES(R224, RES_K(5.1))
+ RES(R111, RES_K(5.1))
+ RES(R211, RES_K(5.1))
+
+ RES(R125, RES_R(100))
+ RES(R225, RES_R(100))
+ RES(R112, RES_K(1))
+ RES(R212, RES_K(1))
+ NET_C(R125.2, R225.2, R112.2, R212.2, GND)
+
+ CAP(C113, CAP_U(50))
+ CAP(C213, CAP_U(50))
+ NET_C(C113.2, C213.2, GND)
+
+ QBJT_EB(Q106, "NPN")
+ QBJT_EB(Q206, "NPN")
+ QBJT_EB(Q103, "NPN")
+ QBJT_EB(Q203, "NPN")
+
+ NET_C(R128.2, C120.1, R126.2, R127.1, Q106.B)
+ NET_C(R228.2, C220.1, R226.2, R227.1, Q206.B)
+ NET_C(R115.2, C114.1, R113.2, R114.1, Q103.B)
+ NET_C(R215.2, C214.1, R213.2, R214.1, Q203.B)
+
+ NET_C(R125.1, Q106.E)
+ NET_C(R225.1, Q206.E)
+ NET_C(R112.1, C113.1, Q103.E)
+ NET_C(R212.1, C213.1, Q203.E)
+
+ // Coupling capacitors and volume potentiometers for sound effect
+ // amplifier outputs. There are four volume pots, for shot and hit
+ // sounds on left and right. Presently these pots are fixed at the
+ // midpoint of their range.
+
+ CAP(C119, CAP_U(0.047))
+ CAP(C219, CAP_U(0.047))
+ CAP(C112, CAP_U(0.1))
+ CAP(C212, CAP_U(0.1))
+
+ NET_C(R124.2, Q106.C, C119.1)
+ NET_C(R224.2, Q206.C, C219.1)
+ NET_C(R111.2, Q103.C, C112.1)
+ NET_C(R211.2, Q203.C, C212.1)
+
+ CAP(C118, CAP_U(0.022))
+ CAP(C218, CAP_U(0.022))
+ CAP(C111, CAP_U(0.033))
+ CAP(C211, CAP_U(0.033))
+ NET_C(C118.2, C218.2, C111.2, C211.2, GND)
+
+ // FIXME - sound effect volume potentiometers should be adjustable.
+ POT(R123, RES_K(50))
+ POT(R223, RES_K(50))
+ POT(R110, RES_K(50))
+ POT(R210, RES_K(50))
+ NET_C(R123.3, R223.3, R110.3, R210.3, GND)
+
+ // Reverse the sense of pot adjustments so that larger values result
+ // in greater volume, which we will want if, as I hope, these are
+ // made user-adjustable.
+ PARAM(R123.REVERSE, 1)
+ PARAM(R223.REVERSE, 1)
+ PARAM(R110.REVERSE, 1)
+ PARAM(R210.REVERSE, 1)
+ PARAM(R123.DIAL, 0.5)
+ PARAM(R223.DIAL, 0.5)
+ PARAM(R110.DIAL, 0.5)
+ PARAM(R210.DIAL, 0.5)
+
+ NET_C(C119.2, C118.1, R123.1)
+ NET_C(C219.2, C218.1, R223.1)
+ NET_C(C112.2, C111.1, R110.1)
+ NET_C(C212.2, C211.1, R210.1)
+
+ // Mixing of shot and hit sounds for each side.
+
+ RES(R122, RES_K(30))
+ RES(R222, RES_K(30))
+ RES(R109, RES_K(30))
+ RES(R209, RES_K(30))
+
+ NET_C(R123.2, R122.2)
+ NET_C(R223.2, R222.2)
+ NET_C(R110.2, R109.2)
+ NET_C(R210.2, R209.2)
+
+ CAP(C117, CAP_U(0.047))
+ CAP(C217, CAP_U(0.047))
+ CAP(C110, CAP_U(0.1))
+ CAP(C210, CAP_U(0.1))
+
+ NET_C(R122.1, C117.2)
+ NET_C(R222.1, C217.2)
+ NET_C(R109.1, C110.2)
+ NET_C(R209.1, C210.2)
+
+ // Second-stage amplifier circuits, which amplify each side's
+ // mixed shot and hit sounds. These are similar to the sound-effect
+ // amplifiers (particularly the "hit" ones), each being a single
+ // NPN transistor wired in common-emitter configuration, with a
+ // bypass capacitor at the emitter. They have no need for an
+ // attack-decay envelope, however, and so get their current
+ // directly from the 16.5-volt power supply.
+
+ RES(R107, RES_K(150))
+ RES(R207, RES_K(150))
+
+ RES(R105, RES_K(30))
+ RES(R205, RES_K(30))
+ NET_C(R105.2, R205.2, GND)
+
+ RES(R108, RES_K(5.1))
+ RES(R208, RES_K(5.1))
+
+ RES(R106, RES_K(1))
+ RES(R206, RES_K(1))
+ NET_C(R106.2, R206.2, GND)
+
+ CAP(C109, CAP_U(50))
+ CAP(C209, CAP_U(50))
+ NET_C(C109.2, C209.2, GND)
+
+ NET_C(R107.1, R207.1, R108.1, R208.1, I_V16_5.Q)
+
+ QBJT_EB(Q102, "NPN")
+ QBJT_EB(Q202, "NPN")
+
+ NET_C(C110.1, C117.1, R107.2, R105.1, Q102.B)
+ NET_C(C210.1, C217.1, R207.2, R205.1, Q202.B)
+
+ NET_C(R106.1, C109.1, Q102.E)
+ NET_C(R206.1, C209.1, Q202.E)
+
+ // Coupling capacitors and volume potentiometers for second-stage
+ // amplifier outputs. There are two volume pots, for left and right
+ // master volume. Presently these pots are fixed at the midpoint of
+ // their range.
+
+ CAP(C108, CAP_U(0.047))
+ CAP(C208, CAP_U(0.047))
+
+ NET_C(R108.2, Q102.C, C108.1)
+ NET_C(R208.2, Q202.C, C208.1)
+
+ RES(R104, RES_K(30))
+ RES(R204, RES_K(30))
+
+ NET_C(C108.2, R104.1)
+ NET_C(C208.2, R204.1)
+
+ CAP(C107, CAP_U(0.001))
+ CAP(C207, CAP_U(0.001))
+ NET_C(C107.2, C207.2, GND)
+
+ // FIXME - master volume potentiometers should be adjustable.
+ POT(R103, RES_K(47))
+ POT(R203, RES_K(47))
+ NET_C(R103.3, R203.3, GND)
+
+ // Reverse the sense of pot adjustments so that larger values result
+ // in greater volume, which we will want if, as I hope, these are
+ // made user-adjustable.
+ PARAM(R103.REVERSE, 1)
+ PARAM(R203.REVERSE, 1)
+ PARAM(R103.DIAL, 0.5)
+ PARAM(R203.DIAL, 0.5)
+
+ NET_C(R104.2, C107.1, R103.1)
+ NET_C(R204.2, C207.1, R203.1)
+
+ // The following are the left and right speaker outputs. In the real
+ // circuit they don't drive the speakers directly, being far too weak,
+ // but rather go to pin 7, the signal input, of the respective
+ // TAA621A11 (or LM354) audio power amplifier ICs for the left and
+ // right speakers.
+
+ ALIAS(OUT_L, R103.2)
+ ALIAS(OUT_R, R203.2)
+
+NETLIST_END()
+
+
+NETLIST_START(gunfight)
+
+ SOLVER(Solver, 48000)
+ PARAM(Solver.SORT_TYPE, "ASCENDING")
+ // For this netlist, ASCENDING turns out to be the fastest of the
+ // available sort types, roughly 40% faster than the default
+ // PREFER_IDENTITY_TOP_LEFT.
+
+ LOCAL_LIB_ENTRY(NOISE)
+
+ LOCAL_SOURCE(gunfight_schematics)
+
+ INCLUDE(gunfight_schematics)
+
+ ANALOG_INPUT(I_V16_5, 16.5) // 16.5-volt power for sound amplifiers
+ ANALOG_INPUT(I_V5, 5) // 5-volt power for logic input devices
+
+ LOGIC_INPUT(I_LEFT_SHOT, 0, "74XX")
+ LOGIC_INPUT(I_RIGHT_SHOT, 0, "74XX")
+ LOGIC_INPUT(I_LEFT_HIT, 0, "74XX")
+ LOGIC_INPUT(I_RIGHT_HIT, 0, "74XX")
+
+ // Power and ground connections for logic input devices:
+ NET_C(I_V5.Q, I_LEFT_SHOT.VCC, I_RIGHT_SHOT.VCC,
+ I_LEFT_HIT.VCC, I_RIGHT_HIT.VCC)
+ NET_C(GND, I_LEFT_SHOT.GND, I_RIGHT_SHOT.GND,
+ I_LEFT_HIT.GND, I_RIGHT_HIT.GND)
+
+ ALIAS(IN_LS, I_LEFT_SHOT.Q)
+ ALIAS(IN_RS, I_RIGHT_SHOT.Q)
+ ALIAS(IN_LH, I_LEFT_HIT.Q)
+ ALIAS(IN_RH, I_RIGHT_HIT.Q)
+
+#if USE_FRONTIERS
+ // These frontiers keep the mostly independant halves of the circuit
+ // (left channel and right channel) from affecting each other and the
+ // noise generator, which speeds up processing by about 10% while
+ // making no audible change in the output. Perhaps better ones could
+ // be found, but I don't know how to do so or if it's even possible.
+ OPTIMIZE_FRONTIER(C303.1, RES_M(1), 50)
+ OPTIMIZE_FRONTIER(C306.1, RES_M(1), 50)
+ OPTIMIZE_FRONTIER(C304.1, RES_M(1), 50)
+ OPTIMIZE_FRONTIER(C305.1, RES_M(1), 50)
+#endif
+
+NETLIST_END()
diff --git a/src/mame/audio/nl_gunfight.h b/src/mame/audio/nl_gunfight.h
new file mode 100644
index 00000000000..fa193a60c68
--- /dev/null
+++ b/src/mame/audio/nl_gunfight.h
@@ -0,0 +1,12 @@
+// license:CC0
+// copyright-holders:Colin Douglas Howell
+#ifndef MAME_AUDIO_NL_GUNFIGHT_H
+#define MAME_AUDIO_NL_GUNFIGHT_H
+
+#pragma once
+
+#include "netlist/nl_setup.h"
+
+NETLIST_EXTERNAL(gunfight)
+
+#endif // MAME_AUDIO_NL_GUNFIGHT_H
diff --git a/src/mame/audio/polepos.cpp b/src/mame/audio/polepos.cpp
index c1250ad35c6..b8e08fc588d 100644
--- a/src/mame/audio/polepos.cpp
+++ b/src/mame/audio/polepos.cpp
@@ -308,8 +308,8 @@ WRITE_LINE_MEMBER(polepos_sound_device::clson_w)
{
if (!state)
{
- polepos_engine_sound_lsb_w(machine().dummy_space(), 0, 0);
- polepos_engine_sound_msb_w(machine().dummy_space(), 0, 0);
+ polepos_engine_sound_lsb_w(0);
+ polepos_engine_sound_msb_w(0);
}
}
@@ -317,7 +317,7 @@ WRITE_LINE_MEMBER(polepos_sound_device::clson_w)
/************************************/
/* Write LSB of engine sound */
/************************************/
-WRITE8_MEMBER(polepos_sound_device::polepos_engine_sound_lsb_w)
+void polepos_sound_device::polepos_engine_sound_lsb_w(uint8_t data)
{
/* Update stream first so all samples at old frequency are updated. */
m_stream->update();
@@ -328,7 +328,7 @@ WRITE8_MEMBER(polepos_sound_device::polepos_engine_sound_lsb_w)
/************************************/
/* Write MSB of engine sound */
/************************************/
-WRITE8_MEMBER(polepos_sound_device::polepos_engine_sound_msb_w)
+void polepos_sound_device::polepos_engine_sound_msb_w(uint8_t data)
{
m_stream->update();
m_sample_msb = data & 63;
diff --git a/src/mame/audio/polepos.h b/src/mame/audio/polepos.h
index 97b954921ad..69c8852ac75 100644
--- a/src/mame/audio/polepos.h
+++ b/src/mame/audio/polepos.h
@@ -23,8 +23,8 @@ protected:
public:
DECLARE_WRITE_LINE_MEMBER(clson_w);
- DECLARE_WRITE8_MEMBER(polepos_engine_sound_lsb_w);
- DECLARE_WRITE8_MEMBER(polepos_engine_sound_msb_w);
+ void polepos_engine_sound_lsb_w(uint8_t data);
+ void polepos_engine_sound_msb_w(uint8_t data);
private:
struct filter2_context
diff --git a/src/mame/audio/qix.cpp b/src/mame/audio/qix.cpp
index 3bbca8ff066..1c1d369c145 100644
--- a/src/mame/audio/qix.cpp
+++ b/src/mame/audio/qix.cpp
@@ -104,7 +104,7 @@ WRITE8_MEMBER(qix_state::sndpia_2_warning_w)
TIMER_CALLBACK_MEMBER(qix_state::deferred_sndpia1_porta_w)
{
- m_sndpia1->write_porta(param);
+ m_sndpia1->porta_w(param);
}
diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp
index 51f90b38074..a62c5a48d87 100644
--- a/src/mame/audio/s11c_bg.cpp
+++ b/src/mame/audio/s11c_bg.cpp
@@ -45,7 +45,7 @@ WRITE_LINE_MEMBER( s11c_bg_device::pia40_cb2_w)
WRITE8_MEMBER( s11c_bg_device::pia40_pb_w )
{
-// m_pia34->write_portb(data);
+// m_pia34->portb_w(data);
}
void s11c_bg_device::ctrl_w(uint8_t data)
@@ -55,7 +55,7 @@ void s11c_bg_device::ctrl_w(uint8_t data)
void s11c_bg_device::data_w(uint8_t data)
{
- m_pia40->write_portb(data);
+ m_pia40->portb_w(data);
}
void s11c_bg_device::device_add_mconfig(machine_config &config)
diff --git a/src/mame/audio/spiders.cpp b/src/mame/audio/spiders.cpp
index c25c5872604..35c72ca60a0 100644
--- a/src/mame/audio/spiders.cpp
+++ b/src/mame/audio/spiders.cpp
@@ -178,7 +178,7 @@ DISCRETE_SOUND_END
WRITE8_MEMBER(spiders_state::spiders_audio_command_w)
{
- m_pia[3]->write_porta(data & 0xf8);
+ m_pia[3]->porta_w(data & 0xf8);
m_pia[3]->ca1_w(BIT(data, 7));
}
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index 1a515a44af7..c78684aa3dc 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -249,7 +249,7 @@ void williams_cvsd_sound_device::device_reset()
void williams_cvsd_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
// process incoming data write
- m_pia->write_portb(param & 0xff);
+ m_pia->portb_w(param & 0xff);
m_pia->cb1_w((param >> 8) & 1);
m_pia->cb2_w((param >> 9) & 1);
}
diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp
index 9550b0a1578..39627095e93 100644
--- a/src/mame/audio/wpcsnd.cpp
+++ b/src/mame/audio/wpcsnd.cpp
@@ -65,7 +65,7 @@ uint8_t wpcsnd_device::ctrl_r()
uint8_t wpcsnd_device::data_r()
{
m_reply_available = false;
- m_reply_cb(m_cpu->space(AS_PROGRAM),0);
+ m_reply_cb(0);
return m_reply;
}
@@ -156,7 +156,7 @@ WRITE8_MEMBER(wpcsnd_device::latch_w)
{
m_reply_available = true;
m_reply = data;
- m_reply_cb(space,1);
+ m_reply_cb(1);
}
WRITE8_MEMBER(wpcsnd_device::volume_w)
diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp
index f72bce8aa23..973f76e6632 100644
--- a/src/mame/drivers/20pacgal.cpp
+++ b/src/mame/drivers/20pacgal.cpp
@@ -101,7 +101,7 @@ Graphics: CY37256P160-83AC x 2 (Ultra37000 CPLD family - 160 pin TQFP, 256 Macro
*************************************/
#define MASTER_CLOCK (XTAL(73'728'000))
-#define MAIN_CPU_CLOCK (MASTER_CLOCK / 2) // divided by 2 internally in the Z180 core
+#define MAIN_CPU_CLOCK (MASTER_CLOCK / 4)
#define NAMCO_AUDIO_CLOCK (MASTER_CLOCK / 4 / 6 / 32)
diff --git a/src/mame/drivers/2mindril.cpp b/src/mame/drivers/2mindril.cpp
index e8d8f465ebb..78d864c4c53 100644
--- a/src/mame/drivers/2mindril.cpp
+++ b/src/mame/drivers/2mindril.cpp
@@ -223,31 +223,31 @@ void _2mindril_state::drill_map(address_map &map)
}
static INPUT_PORTS_START( drill )
- PORT_START("DSW")//Dip-Switches
- PORT_DIPNAME( 0x01, 0x01, "DSW" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_START("DSW") //Dip-Switches. PCB labelled DIPSWA
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSWA:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN0")//sensors
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
diff --git a/src/mame/drivers/39in1.cpp b/src/mame/drivers/39in1.cpp
index 8d8d269fb59..c07b1db673d 100644
--- a/src/mame/drivers/39in1.cpp
+++ b/src/mame/drivers/39in1.cpp
@@ -20,6 +20,16 @@
* TODO:
* PXA255 peripherals
*
+ * 39in1 notes:
+ * The actual PCB just normally boots up to the game, whereas in MAME it
+ * defaults to test mode and checks the rom, then jumps out to the game
+ * after loading all 39 games. It is almost like it is defaulting to test
+ * mode on at bootup. On the real PCB, it just loads the 39 games then
+ * shows the game selection menu. Going into the test mode does the same
+ * code check but then shows a test screen with color bars. Pressing
+ * next shows a high score clear screen (if the HS dip is on). Pressing
+ * next shows the game dips screens and allows you to set up soft dip
+ * switches for each of the 39 games.
**************************************************************************/
#include "emu.h"
@@ -238,6 +248,23 @@ static INPUT_PORTS_START( 39in1 )
PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80000000, IP_ACTIVE_LOW )
+
+/* The following dips apply to 39in1 and 48in1. 60in1 is the same but the last unused dipsw#4 is test mode off/on.
+
+ PORT_START("DSW") // 1x 4-position DIP switch labelled SW3
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, "Display Mode" ) PORT_DIPLOCATION("SW3:2")
+ PORT_DIPSETTING( 0x02, "CGA 15.75kHz" )
+ PORT_DIPSETTING( 0x00, "VGA 31.5kHz" )
+ PORT_DIPNAME( 0x04, 0x04, "High Score Saver" ) PORT_DIPLOCATION("SW3:3")
+ PORT_DIPSETTING( 0x04, "Disabled" )
+ PORT_DIPSETTING( 0x00, "Enabled" )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW3:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+*/
INPUT_PORTS_END
void _39in1_state::machine_start()
diff --git a/src/mame/drivers/3x3puzzl.cpp b/src/mame/drivers/3x3puzzl.cpp
index f236772f3bb..15e4dab42bf 100644
--- a/src/mame/drivers/3x3puzzl.cpp
+++ b/src/mame/drivers/3x3puzzl.cpp
@@ -263,50 +263,50 @@ static INPUT_PORTS_START( _3x3puzzle )
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("DSW01")
- PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x0300, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0200, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0100, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) )
- PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3")
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4,5")
PORT_DIPSETTING( 0x1800, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x1000, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0800, DEF_STR( Easiest ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, "Free Play / Debug mode" )
+ PORT_DIPNAME( 0x4000, 0x4000, "Free Play / Debug mode" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
diff --git a/src/mame/drivers/a2600.cpp b/src/mame/drivers/a2600.cpp
index e4ef8eee5d5..f2b76e89b98 100644
--- a/src/mame/drivers/a2600.cpp
+++ b/src/mame/drivers/a2600.cpp
@@ -67,9 +67,9 @@ READ8_MEMBER(a2600_state::cart_over_all_r)
else if (masked_offset < 0x2a0)
{
#if USE_NEW_RIOT
- ret = m_riot->io_r(space, masked_offset);
+ ret = m_riot->io_r(masked_offset);
#else
- ret = m_riot->read(space, masked_offset);
+ ret = m_riot->read(masked_offset);
#endif
}
else if (masked_offset < 0x300)
@@ -103,9 +103,9 @@ WRITE8_MEMBER(a2600_state::cart_over_all_w)
else if (masked_offset < 0x2a0)
{
#if USE_NEW_RIOT
- m_riot->io_w(space, masked_offset, data);
+ m_riot->io_w(masked_offset, data);
#else
- m_riot->write(space, masked_offset, data);
+ m_riot->write(masked_offset, data);
#endif
}
else if (masked_offset < 0x300)
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index f23045601ec..72cb46dfb53 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -619,12 +619,12 @@ WRITE8_MEMBER( abc1600_state::dart_w )
READ8_MEMBER( abc1600_state::scc_r )
{
- return m_scc->reg_r(space, A1_A2);
+ return m_scc->reg_r(A1_A2);
}
WRITE8_MEMBER( abc1600_state::scc_w )
{
- m_scc->reg_w(space, A1_A2, data);
+ m_scc->reg_w(A1_A2, data);
}
diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp
index afab2b88c94..b77cb2f3b19 100644
--- a/src/mame/drivers/abc80x.cpp
+++ b/src/mame/drivers/abc80x.cpp
@@ -981,7 +981,7 @@ void abc806_state::machine_reset()
// clear STO lines
for (int i = 0; i < 8; i++) {
- sto_w(m_maincpu->space(AS_PROGRAM), 0, i);
+ sto_w(i);
}
}
diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp
index e979e065dc3..f6582fa8147 100644
--- a/src/mame/drivers/aci_ggm.cpp
+++ b/src/mame/drivers/aci_ggm.cpp
@@ -449,7 +449,7 @@ void ggm_state::ggm(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "ggm", "bin");
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "ggm");
m_cart->set_device_load(FUNC(ggm_state::cartridge));
m_cart->set_must_be_loaded(true);
diff --git a/src/mame/drivers/adp.cpp b/src/mame/drivers/adp.cpp
index 5654901b585..8583d191fd5 100644
--- a/src/mame/drivers/adp.cpp
+++ b/src/mame/drivers/adp.cpp
@@ -299,8 +299,7 @@ WRITE16_MEMBER(adp_state::input_w)
void adp_state::skattv_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
- map(0x800080, 0x800081).rw(m_acrtc, FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x800082, 0x800083).rw(m_acrtc, FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x800080, 0x800083).rw(m_acrtc, FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x800100, 0x800101).rw(FUNC(adp_state::input_r), FUNC(adp_state::input_w));
map(0x800140, 0x800143).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)).umask16(0x00ff); //18b too
map(0x800180, 0x80019f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
@@ -311,8 +310,7 @@ void adp_state::skattva_mem(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x400000, 0x40001f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write)).umask16(0x00ff);
- map(0x800080, 0x800081).rw(m_acrtc, FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x800082, 0x800083).rw(m_acrtc, FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x800080, 0x800083).rw(m_acrtc, FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x800100, 0x800101).portr("IN0");
map(0x800140, 0x800143).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)).umask16(0x00ff); //18b too
map(0x800180, 0x80019f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
@@ -323,8 +321,7 @@ void adp_state::quickjac_mem(address_map &map)
{
map(0x000000, 0x01ffff).rom();
map(0x400000, 0x40001f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write)).umask16(0x00ff);
- map(0x800080, 0x800081).rw(m_acrtc, FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w)); // bad
- map(0x800082, 0x800083).rw(m_acrtc, FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w)); // bad
+ map(0x800080, 0x800083).rw(m_acrtc, FUNC(hd63484_device::read16), FUNC(hd63484_device::write16)); // bad
map(0x800100, 0x800101).portr("IN0");
map(0x800140, 0x800143).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)).umask16(0x00ff); //18b too
map(0x800180, 0x80019f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
@@ -335,8 +332,7 @@ void adp_state::funland_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x400000, 0x40001f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write)).umask16(0x00ff);
- map(0x800080, 0x800081).rw(m_acrtc, FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x800082, 0x800083).rw(m_acrtc, FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x800080, 0x800083).rw(m_acrtc, FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x800089, 0x800089).w("ramdac", FUNC(ramdac_device::index_w));
map(0x80008b, 0x80008b).w("ramdac", FUNC(ramdac_device::pal_w));
map(0x80008d, 0x80008d).w("ramdac", FUNC(ramdac_device::mask_w));
@@ -349,8 +345,7 @@ void adp_state::funland_mem(address_map &map)
void adp_state::fstation_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
- map(0x800080, 0x800081).rw(m_acrtc, FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x800082, 0x800083).rw(m_acrtc, FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x800080, 0x800083).rw(m_acrtc, FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x800100, 0x800101).rw(FUNC(adp_state::input_r), FUNC(adp_state::input_w));
map(0x800140, 0x800143).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)).umask16(0x00ff); //18b too
map(0x800180, 0x80019f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
diff --git a/src/mame/drivers/alesis_qs.cpp b/src/mame/drivers/alesis_qs.cpp
index 7542b5202bb..0bbc2b311a1 100644
--- a/src/mame/drivers/alesis_qs.cpp
+++ b/src/mame/drivers/alesis_qs.cpp
@@ -13,7 +13,7 @@
*******************************************************************/
#include "emu.h"
-#include "cpu/h8/h83048.h"
+#include "cpu/h8500/h8510.h"
//#include "sound/alesis_qs.h"
class qs_state : public driver_device
@@ -29,7 +29,7 @@ public:
private:
void qs7_prog_map(address_map &map);
- required_device<cpu_device> m_maincpu;
+ required_device<h8510_device> m_maincpu;
};
/* Input ports */
@@ -47,41 +47,43 @@ INPUT_PORTS_END
void qs_state::qs7_prog_map(address_map &map)
{
- //map.global_mask(0x3ffff);
- map(0x00000, 0x3ffff).rom();
+ map(0x00000, 0x3ffff).mirror(0x40000).rom().region("program", 0);
}
void qs_state::qs7(machine_config &config)
{
/* basic machine hardware */
- H83048(config, m_maincpu, XTAL(10'000'000)); /* FIX-ME! Actual CPU is H8/510 and XTAL value is a guess */
+ HD6415108(config, m_maincpu, 20_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &qs_state::qs7_prog_map);
- //MCFG_ALESIS_KEYSCAN_ASIC_ADD("keyscan")
+ //ALESIS_KEYSCAN(config, "keyscan", 20_MHz_XTAL / 2 / 8);
- /* Alesis Sound Generator ASIC */
- //MCFG_ALESIS_SG_ASIC_ADD("sndgen")
+ /* Alesis Sound Generator ASIC */
+ //ALESIS_SG(config, "sndgen");
- /* Alesis Sound Effects Processor ASIC */
- //MCFG_ALESIS_FX_ASIC_ADD("sfx")
+ /* Alesis Sound Effects Processor ASIC */
+ //ALESIS_FXCHIP(config, "sfx", 7.056_MHz_XTAL);
/* video hardware */
- //TODO: add LCD display controller here
+ //TODO: add LCD display controller here
/* sound hardware */
- //MCFG_SPEAKER_STANDARD_STEREO("stereo")
- //MCFG_ALESIS_QS_SERIES_ADD("sound", SND_CLOCK)
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "stereo", 1.0)
+ //SPEAKER(config, "left").front_left();
+ //SPEAKER(config, "right").front_right();
+ //alesis_qs_series_device &sound(ALESIS_QS_SERIES(config, "sound", SND_CLOCK));
+ //sound.add_route(0, "left", 1.0);
+ //sound.add_route(1, "right", 1.0);
/* Interfaces */
- //MCFG_PCMCIA_ADD("pcmcia")
+ //PCMCIA
//MIDI
//RS232
}
+// XTALs: 20 MHz (H8/510), 7.056 MHz (FXCHIP), 14.7456 MHz
ROM_START( alesqs7 )
- ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "2-31-0069_q7_v1.02_alesis_sp_09_12_96_cs_dbcc.u18", 0x00000, 0x80000, CRC(6e5404cb) SHA1(f00598b66ab7a83b16105cbb73e09c66ce3493a7) )
+ ROM_REGION16_BE( 0x80000, "program", 0 )
+ ROM_LOAD16_WORD_SWAP( "2-31-0069_q7_v1.02_alesis_sp_09_12_96_cs_dbcc.u18", 0x00000, 0x80000, CRC(6e5404cb) SHA1(f00598b66ab7a83b16105cbb73e09c66ce3493a7) )
// ROM_REGION( 0x200000, "sound", 0 ) /* Samples ROMs (2Mbyte each) */
// ROM_LOAD( "?.u?", 0x00000, 0x200000, NO_DUMP )
diff --git a/src/mame/drivers/alpha68k.cpp b/src/mame/drivers/alpha68k.cpp
index 7114e815d52..23ccda80585 100644
--- a/src/mame/drivers/alpha68k.cpp
+++ b/src/mame/drivers/alpha68k.cpp
@@ -1012,42 +1012,42 @@ static INPUT_PORTS_START( sbasebal )
PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW)
/* 2 physical sets of _6_ dip switches */
- PORT_DIPNAME( 0x04, 0x04, "Freeze" )
+ PORT_DIPNAME( 0x04, 0x04, "Freeze" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) // Check code at 0x0089e6
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") // Check code at 0x0089e6
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Game_Time ) )
+ PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW1:5,6")
PORT_DIPSETTING( 0x00, "3:30" )
PORT_DIPSETTING( 0x80, "3:00" )
PORT_DIPSETTING( 0x40, "2:30" )
PORT_DIPSETTING( 0xc0, "2:00" )
PORT_START("IN4") /* A 6 way dip switch */
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) // Check code at 0x009d3a
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") // Check code at 0x009d3a
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:3,4")
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
- PORT_DIPNAME( 0x10, 0x00, "Price to Continue" )
+ PORT_DIPNAME( 0x10, 0x00, "Price to Continue" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, "Same as Start" )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -1068,19 +1068,19 @@ static INPUT_PORTS_START( sbasebalj )
PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW)
/* 2 physical sets of _6_ dip switches */
- PORT_DIPNAME( 0x04, 0x04, "Freeze" )
+ PORT_DIPNAME( 0x04, 0x04, "Freeze" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) // Check code at 0x0089e6
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") // Check code at 0x0089e6
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Game_Time ) )
+ PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW1:5,6")
PORT_DIPSETTING( 0x00, "4:30" )
PORT_DIPSETTING( 0x80, "4:00" )
PORT_DIPSETTING( 0x40, "3:30" )
@@ -1088,14 +1088,21 @@ static INPUT_PORTS_START( sbasebalj )
PORT_START("IN4") /* A 6 way dip switch */
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) // Check code at 0x009d3a
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") // Check code at 0x009d3a
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- ALPHA68K_COINAGE_BITS_2TO4
-
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:3,4,5")
+ PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_2C ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") // Demo sounds seem to be always off in this version
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/alpha68k_n.cpp b/src/mame/drivers/alpha68k_n.cpp
index 73aa3d7f0a9..8c935975d78 100644
--- a/src/mame/drivers/alpha68k_n.cpp
+++ b/src/mame/drivers/alpha68k_n.cpp
@@ -557,10 +557,10 @@ static INPUT_PORTS_START( sstingry )
ALPHA68K_PLAYER_INPUT_SWAP_LR_MSB( 2, IPT_UNKNOWN, IPT_START2, IP_ACTIVE_HIGH )
PORT_START("IN1")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x0e, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x0e, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:!2,!3,!4")
PORT_DIPSETTING( 0x00, "A 1C/1C B 1C/1C" )
PORT_DIPSETTING( 0x02, "A 1C/2C B 2C/1C" )
PORT_DIPSETTING( 0x04, "A 1C/3C B 3C/1C" )
@@ -569,15 +569,15 @@ static INPUT_PORTS_START( sstingry )
PORT_DIPSETTING( 0x0a, "A 1C/6C B 6C/1C" )
PORT_DIPSETTING( 0x0c, "A 2C/3C B 7C/1C" )
PORT_DIPSETTING( 0x0e, "A 3C/2C B 8C/1C" )
- PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:!5,!6")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x30, "6" )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
@@ -590,7 +590,7 @@ static INPUT_PORTS_START( kyros )
ALPHA68K_PLAYER_INPUT_SWAP_LR_MSB( 2, IPT_UNKNOWN, IPT_START2, IP_ACTIVE_HIGH )
PORT_START("IN1") /* dipswitches */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4")
@@ -602,15 +602,15 @@ static INPUT_PORTS_START( kyros )
PORT_DIPSETTING( 0x04, "A 1C/6C B 6C/1C" )
PORT_DIPSETTING( 0x08, "A 2C/3C B 7C/1C" )
PORT_DIPSETTING( 0x00, "A 3C/2C B 8C/1C" )
- PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:5,6")
+ PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:!5,!6")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x30, "6" )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
@@ -626,27 +626,27 @@ static INPUT_PORTS_START( jongbou )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_START("IN1")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:!1")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "5" )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:!2")
PORT_DIPSETTING( 0x00, "A 1C/1C B 1C/5C" )
PORT_DIPSETTING( 0x02, "A 1C/2C B 1C/3C" )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:!3")
PORT_DIPSETTING( 0x00, "30000 - 60000" )
PORT_DIPSETTING( 0x04, "Every 30000" )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:!5,!6")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x20, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x30, DEF_STR( Very_Hard ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x40, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_DIPNAME( 0x80, 0x80, "Show Girls" )
+ PORT_DIPNAME( 0x80, 0x80, "Show Girls" ) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
diff --git a/src/mame/drivers/alphajuno.cpp b/src/mame/drivers/alphajuno.cpp
index c563109a387..017947da5d5 100644
--- a/src/mame/drivers/alphajuno.cpp
+++ b/src/mame/drivers/alphajuno.cpp
@@ -9,8 +9,11 @@
#include "emu.h"
//#include "bus/midi/midi.h"
#include "cpu/mcs51/mcs51.h"
+#include "machine/mb62h195.h"
#include "machine/mb63h149.h"
#include "machine/nvram.h"
+#include "machine/rescap.h"
+#include "machine/upd7001.h"
#include "video/hd44780.h"
#include "emupal.h"
#include "screen.h"
@@ -114,8 +117,17 @@ void alphajuno_state::ajuno1(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5517APL + battery
+ mb62h195_device &io(MB62H195(config, "io"));
+ io.lc_callback().set(m_lcdc, FUNC(hd44780_device::write));
+ io.sout_callback().set("adc", FUNC(upd7001_device::si_w));
+ io.sck_callback().set("adc", FUNC(upd7001_device::sck_w));
+ io.sin_callback().set("adc", FUNC(upd7001_device::so_r));
+ io.adc_callback().set("adc", FUNC(upd7001_device::cs_w));
+
//MB87123(config, "dco", 12_MHz_XTAL);
+ UPD7001(config, "adc", RES_K(27), CAP_P(47));
+
// LCD: LM16155A or LM16155B
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(60);
@@ -150,6 +162,9 @@ void alphajuno_state::mks50(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5564PL-20 + battery
+ mb62h195_device &io(MB62H195(config, "io"));
+ io.lc_callback().set(m_lcdc, FUNC(hd44780_device::write));
+
//MB87123(config, "dco", 12_MHz_XTAL);
// LCD Unit: DM011Z-1DL3
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index 98e8c9276d4..7f8550dd95b 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -629,12 +629,12 @@ WRITE8_MEMBER( cdtv_state::dmac_scsi_data_write )
READ8_MEMBER( cdtv_state::dmac_io_read )
{
- return m_cdrom->read(space, 0);
+ return m_cdrom->read();
}
WRITE8_MEMBER( cdtv_state::dmac_io_write )
{
- m_cdrom->write(space, 0, data);
+ m_cdrom->write(data);
}
WRITE_LINE_MEMBER( cdtv_state::dmac_int_w )
diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp
index 3cff81a4ba7..48a414880da 100644
--- a/src/mame/drivers/amstr_pc.cpp
+++ b/src/mame/drivers/amstr_pc.cpp
@@ -298,7 +298,7 @@ READ8_MEMBER( amstrad_pc_state::pc1640_port60_r )
if (m_port61&0x80)
data=m_port60;
else
- data = m_keyboard->read(space, 0);
+ data = m_keyboard->read();
break;
case 1:
@@ -316,7 +316,7 @@ READ8_MEMBER( amstrad_pc_state::pc1640_port60_r )
READ8_MEMBER( amstrad_pc_state::pc200_port378_r )
{
- uint8_t data = m_lpt1->read(space, offset);
+ uint8_t data = m_lpt1->read(offset);
if (offset == 1)
data = (data & ~7) | (ioport("DSW0")->read() & 7);
@@ -328,7 +328,7 @@ READ8_MEMBER( amstrad_pc_state::pc200_port378_r )
READ8_MEMBER( amstrad_pc_state::pc200_port278_r )
{
- uint8_t data = m_lpt2->read(space, offset);
+ uint8_t data = m_lpt2->read(offset);
if (offset == 1)
data = (data & ~7) | (ioport("DSW0")->read() & 7);
@@ -341,7 +341,7 @@ READ8_MEMBER( amstrad_pc_state::pc200_port278_r )
READ8_MEMBER( amstrad_pc_state::pc1640_port378_r )
{
- uint8_t data = m_lpt1->read(space, offset);
+ uint8_t data = m_lpt1->read(offset);
if (offset == 1)
data=(data & ~7) | (ioport("DSW0")->read() & 7);
diff --git a/src/mame/drivers/apexc.cpp b/src/mame/drivers/apexc.cpp
index f426671f772..407b2615360 100644
--- a/src/mame/drivers/apexc.cpp
+++ b/src/mame/drivers/apexc.cpp
@@ -25,9 +25,9 @@ void apexc_state::machine_start()
Punch a tape character
*/
-WRITE8_MEMBER(apexc_state::tape_write)
+void apexc_state::tape_write(uint8_t data)
{
- m_tape_puncher->write(m_maincpu->space(AS_PROGRAM), 0, data);
+ m_tape_puncher->write(data);
teletyper_putchar(data & 0x1f); /* display on 'screen' */
}
diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp
index 26fc47f880a..c6ecc243e96 100644
--- a/src/mame/drivers/apple1.cpp
+++ b/src/mame/drivers/apple1.cpp
@@ -494,7 +494,7 @@ WRITE8_MEMBER(apple1_state::pia_display_w)
// and to the display hardware
WRITE_LINE_MEMBER(apple1_state::pia_display_gate_w)
{
- m_pia->write_portb((state << 7) ^ 0x80);
+ m_pia->portb_w((state << 7) ^ 0x80);
// falling edge means start the display timer
if (state == CLEAR_LINE)
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 013c23a16be..c003c713e70 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -2917,7 +2917,7 @@ void apple2e_state::laser128_map(address_map &map)
// map(0xc098, 0xc09b).rw(m_acia1, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
// map(0xc0a8, 0xc0ab).rw(m_acia2, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
map(0xc0d0, 0xc0d3).rw(FUNC(apple2e_state::memexp_r), FUNC(apple2e_state::memexp_w));
- map(0xc0e0, 0xc0ef).rw(m_laserudc, FUNC(applefdc_base_device::bus_r), FUNC(applefdc_base_device::bus_w));
+ map(0xc0e0, 0xc0ef).rw(m_laserudc, FUNC(applefdc_base_device::read), FUNC(applefdc_base_device::write));
map(0xc100, 0xc2ff).m(m_c100bank, FUNC(address_map_bank_device::amap8));
map(0xc300, 0xc3ff).m(m_c300bank, FUNC(address_map_bank_device::amap8));
map(0xc400, 0xc7ff).m(m_c400bank, FUNC(address_map_bank_device::amap8));
diff --git a/src/mame/drivers/argo.cpp b/src/mame/drivers/argo.cpp
index fba33d67549..64da55393f1 100644
--- a/src/mame/drivers/argo.cpp
+++ b/src/mame/drivers/argo.cpp
@@ -136,7 +136,7 @@ READ8_MEMBER(argo_state::argo_io_r)
case 0xE8: // wants bit 4 low then high
{
- u8 data = m_dma->read(space, 8);
+ u8 data = m_dma->read(8);
data |= (m_framecnt << 4); // hack because dma update_flag is not emulated
return data;
}
@@ -184,7 +184,7 @@ WRITE8_MEMBER(argo_state::argo_io_w)
memmove(m_p_videoram, m_p_videoram+80, 24*80);
m_scroll_ctrl = 0;
}
- m_dma->write(space, 8, data);
+ m_dma->write(8, data);
break;
default:
diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp
index 00aa18f5a76..0b5f71ce1ba 100644
--- a/src/mame/drivers/asst128.cpp
+++ b/src/mame/drivers/asst128.cpp
@@ -54,7 +54,7 @@ private:
required_device<pc_fdc_xt_device> m_fdc;
DECLARE_FLOPPY_FORMATS(asst128_formats);
- DECLARE_WRITE8_MEMBER(asst128_fdc_dor_w);
+ void asst128_fdc_dor_w(uint8_t data);
void machine_start() override;
void asst128_io(address_map &map);
@@ -68,10 +68,10 @@ void asst128_state::machine_start()
memcpy(font->base() + 0x0400, memregion("bios")->base() + 0x4000, 0x0400);
}
-WRITE8_MEMBER(asst128_state::asst128_fdc_dor_w)
+void asst128_state::asst128_fdc_dor_w(uint8_t data)
{
m_fdc->tc_w((data & 0x80) == 0x80);
- m_fdc->dor_w(space, offset, data, mem_mask);
+ m_fdc->dor_w(data);
}
void asst128_state::asst128_map(address_map &map)
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index b0c8ce904f2..4468e740f4a 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -301,7 +301,7 @@ WRITE8_MEMBER(asteroid_state::earom_write)
m_earom->set_data(data);
}
-WRITE8_MEMBER(asteroid_state::earom_control_w)
+void asteroid_state::earom_control_w(uint8_t data)
{
// CK = DB0, C1 = /DB2, C2 = DB1, CS1 = DB3, /CS2 = GND
m_earom->set_control(BIT(data, 3), 1, !BIT(data, 2), BIT(data, 1));
diff --git a/src/mame/drivers/astrcorp.cpp b/src/mame/drivers/astrcorp.cpp
index 269d635e36f..8e9c9c0a4ab 100644
--- a/src/mame/drivers/astrcorp.cpp
+++ b/src/mame/drivers/astrcorp.cpp
@@ -70,6 +70,7 @@ public:
void showhanc(machine_config &config);
void init_astoneag();
+ void init_magibomb();
void init_showhanc();
void init_showhand();
@@ -880,7 +881,7 @@ ROM_END
ROM_START( magibomb )
ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "rom1", 0x00000, 0x10000, CRC(f01ab462) SHA1(5c9052f66da166f926910562a6a8aea5397549db) )
+ ROM_LOAD16_BYTE( "rom1", 0x00000, 0x10000, BAD_DUMP CRC(f01ab462) SHA1(5c9052f66da166f926910562a6a8aea5397549db) ) // BADADDR xxxxxx-xxxxxxxxx
ROM_LOAD16_BYTE( "rom2", 0x00001, 0x10000, CRC(ac3224ef) SHA1(810117dc89369eee0f4f5b6744cfbf0cb70ccce6) )
ROM_REGION( 0x200000, "sprites", 0 )
@@ -1360,11 +1361,20 @@ void astrocorp_state::init_astoneag()
decrypt_rom(astoneag_table);
}
+void astrocorp_state::init_magibomb()
+{
+ uint8_t *rom = memregion("maincpu")->base();
+ for (int i = 1; i < 0x20000; i += 2)
+ {
+ rom[i] = bitswap<8>(rom[i], 6, 7, 5, 0, 4, 1, 3, 2);
+ }
+}
+
GAME( 2000, showhand, 0, showhand, showhand, astrocorp_state, init_showhand, ROT0, "Astro Corp.", "Show Hand (Italy)", MACHINE_SUPPORTS_SAVE )
GAME( 2000, showhanc, showhand, showhanc, showhanc, astrocorp_state, init_showhanc, ROT0, "Astro Corp.", "Wang Pai Dui Jue (China)", MACHINE_SUPPORTS_SAVE )
GAME( 2002, skilldrp, 0, skilldrp, skilldrp, astrocorp_state, empty_init, ROT0, "Astro Corp.", "Skill Drop Georgia (Ver. G1.0S)", MACHINE_SUPPORTS_SAVE )
GAME( 2003, speeddrp, 0, speeddrp, skilldrp, astrocorp_state, empty_init, ROT0, "Astro Corp.", "Speed Drop (Ver. 1.06)", MACHINE_SUPPORTS_SAVE )
-GAME( 200?, magibomb, 0, speeddrp, skilldrp, astrocorp_state, empty_init, ROT0, "Astro Corp.", "Magic Bomb", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // no gfx dumps, less complex looking encryption
+GAME( 200?, magibomb, 0, speeddrp, skilldrp, astrocorp_state, init_magibomb, ROT0, "Astro Corp.", "Magic Bomb (Ver. BR4.4)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // no gfx dumps, less complex looking encryption
// Encrypted games (not working):
GAME( 2003?, dinodino, 0, skilldrp, skilldrp, astrocorp_state, empty_init, ROT0, "Astro Corp.", "Dino Dino", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index e84b474701a..8cf3b5d42b6 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -169,6 +169,8 @@ public:
void ews286(machine_config &config);
void olyport40(machine_config &config);
void micral45(machine_config &config);
+ void euroat(machine_config &config);
+ void pg750(machine_config &config);
void init_at();
void init_atpci();
@@ -186,6 +188,8 @@ protected:
static void cfg_single_360K(device_t *device);
static void cfg_single_1200K(device_t *device);
+ static void cfg_single_1440K(device_t *device);
+ static void cfg_dual_1440K(device_t *device);
void at16_io(address_map &map);
void at16_map(address_map &map);
void at16l_map(address_map &map);
@@ -475,6 +479,18 @@ void at_state::cfg_single_360K(device_t *device)
dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option(nullptr);
}
+void at_state::cfg_single_1440K(device_t *device)
+{
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35hd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option(nullptr);
+}
+
+void at_state::cfg_dual_1440K(device_t *device)
+{
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:0")).set_default_option("35hd");
+ dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("35hd");
+}
+
static void pci_devices(device_slot_interface &device)
{
device.option_add_internal("vt82c505", VT82C505);
@@ -924,6 +940,50 @@ void at_state::micral45(machine_config &config)
subdevice<isa16_slot_device>("isa1")->set_default_option("ega");
}
+void at_state::euroat(machine_config &config)
+{
+ ibm5170(config);
+ m_maincpu->set_clock(24_MHz_XTAL / 2); // Bus speed can be set up to CPU speed
+
+ subdevice<isa16_slot_device>("isa2")->set_option_machine_config("fdc", cfg_single_1440K); // From pictures but also with a 3.5" as second floppy
+
+ m_ram->set_default_size("640K");
+}
+
+// Siemens PG 750
+void at_state::pg750(machine_config &config)
+{
+ i386_device &maincpu(I386(config, m_maincpu, 12'000'000));
+ maincpu.set_addrmap(AS_PROGRAM, &at_state::at32_map);
+ maincpu.set_addrmap(AS_IO, &at_state::at32_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb));
+
+ AT_MB(config, m_mb, 0).at_softlists(config);
+
+ config.set_maximum_quantum(attotime::from_hz(60));
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+
+ ds12885_device &rtc(DS12885(config.replace(), "mb:rtc")); // TODO: move this into the cs8221
+ rtc.irq().set("mb:pic8259_slave", FUNC(pic8259_device::ir0_w)); // this is in :mb
+ rtc.set_century_index(0x32);
+
+ // on-board devices
+ ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdc", true).set_option_machine_config("fdc", cfg_dual_1440K); // FIXME: deteremine ISA bus clock
+ ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true);
+ ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "lpt", true);
+ // ISA cards
+ ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "ega", false);
+ ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, "hdc", false);
+ ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ PC_KBDC_SLOT(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
+
+ /* internal ram */
+ RAM(config, m_ram).set_default_size("3712K");
+}
+
//**************************************************************************
// ROM DEFINITIONS
//**************************************************************************
@@ -1653,6 +1713,12 @@ ROM_START( neat )
ROM_SYSTEM_BIOS(8, "amic21", "AMI C 21.1") /* (Motherboard Manufacturer: Unknown.) (Neat 286 Bios, 82c21x Chipset ) (BIOS release date:: 30-04-1989) */
ROMX_LOAD( "amic21-2.bin", 0x10001, 0x8000, CRC(8ffe7752) SHA1(68215f07a170ee7bdcb3e52b370d470af1741f7e),ROM_SKIP(1) | ROM_BIOS(8) )
ROMX_LOAD( "amic21-1.bin", 0x10000, 0x8000, CRC(a76497f6) SHA1(91b47d86967426945b2916cb40e76a8da2d31d54),ROM_SKIP(1) | ROM_BIOS(8) )
+ // 9: BIOS-String: - AGC N286 - CPU: AMD N80L286-16/S, FPU socket provided - RAM: 36xTMC64C1024-80N (18pin), 36x16pin sockets provided as an alternative (2xBank 0, 2xBank 1), 4xSIPP30 (2xBank 0/2 and 2xBank 1/3)
+ // Chipset: Chips P82C212B-12, P82C206 H, P82C211-12 C, P82C215-12 - OSC: 20.000, 32.000MHz, 24.0000MHz, 32.768KHz, 14.31818 - BIOS: AMI 286 BIOS PLUS CO.NO.1190
+ // Keyboard-BIOS: AMI KEYBOARD BIOS PLUS CO.NO. 1190 - ISA8: 2, ISA16: 6
+ ROM_SYSTEM_BIOS(9, "n286", "N286")// stops after initialising the graphics card
+ ROMX_LOAD( "286-chips-ami1190-even_32k.bin", 0x10000, 0x8000, CRC(db941036) SHA1(994cced82b5fb5f8833c718b4226a7e9620b56df),ROM_SKIP(1) | ROM_BIOS(9) )
+ ROMX_LOAD( "286-chips-ami1190-odd_32k.bin", 0x10001, 0x8000, CRC(71cfc2d1) SHA1(8b8cf81161aec3e2c7f653e5d3a6b4e9627663c6),ROM_SKIP(1) | ROM_BIOS(9) )
ROM_END
@@ -1896,22 +1962,29 @@ ROM_START( ht12a )
ROM_SYSTEM_BIOS(1, "head_ph_2", "Headland/Phoenix #2") // Phoenix BIOS A286 Version 1.01 - BIOS ID JLI01101 - IT9109 - Reference ID 01 - (BIOS release date:: 19-04-1990)
ROMX_LOAD( "286-headland-iqs-lo_32k.bin", 0x10000, 0x8000, CRC(60424e9d) SHA1(aa813bf48939fe7fcbbfec3133e702bfdff6234e), ROM_SKIP(1) | ROM_BIOS(1) )
ROMX_LOAD( "286-headland-iqs-hi_32k.bin", 0x10001, 0x8000, CRC(e56212e0) SHA1(2441845d632d19adc0592e094beb5ec1fbe074f6), ROM_SKIP(1) | ROM_BIOS(1) )
- // 2: BIOS-String: DH12-1164-083090-K0 - CPU/FPU: N80L286-16/S, P80C287-10 - ISA8: 2, ISA16: 6
- ROM_SYSTEM_BIOS(2, "head12a01", "Headland HT12/A #1")
- ROMX_LOAD( "2hlm002l.bin", 0x10000, 0x8000, CRC(345b9ea1) SHA1(868cc309e433e0dcc9f3aa147263017b7f822461), ROM_SKIP(1) | ROM_BIOS(2) )
- ROMX_LOAD( "2hlm002h.bin", 0x10001, 0x8000, CRC(35eed8b8) SHA1(119f2676aef038301c3e0bcdb999da6fd740e6a5), ROM_SKIP(1) | ROM_BIOS(2) )
- // 3: MBL M21 - BIOS-String: DH12-1211-061390-K0 / HT-12 286 BIOS - Chipset: Headland HT12/A
- ROM_SYSTEM_BIOS(3, "ami121", "AMI HT 12.1") /* (BIOS release date:: 13-06-1990) */
- ROMX_LOAD( "ami2od86.bin", 0x10001, 0x8000, CRC(04a2cec4) SHA1(564d37a8b2c0f4d0e23cd1e280a09d47c9945da8),ROM_SKIP(1) | ROM_BIOS(3) )
- ROMX_LOAD( "ami2ev86.bin", 0x10000, 0x8000, CRC(55deb5c2) SHA1(19ce1a7cc985b5895c585e39211475de2e3b0dd1),ROM_SKIP(1) | ROM_BIOS(3) )
- // 4: SPEC 286 rev 4a - BIOS-String: DH12-1120-061390-K0
- ROM_SYSTEM_BIOS(4, "ami122", "AMI HT 12.2") /* (BIOS release date:: 13-06-1990) */
- ROMX_LOAD( "ami2ev89.bin", 0x10000, 0x8000, CRC(705d36e0) SHA1(0c9cfb71ced4587f109b9b6dfc2a9c92302fdb99),ROM_SKIP(1) | ROM_BIOS(4) )
- ROMX_LOAD( "ami2od89.bin", 0x10001, 0x8000, CRC(7c81bbe8) SHA1(a2c7eca586f6e2e76b9101191e080a1f1cb8b833),ROM_SKIP(1) | ROM_BIOS(4) )
- // 5: BIOS-String: DH12-1112-061390-K0
- ROM_SYSTEM_BIOS(5, "ami123", "AMI HT 12.3") /*(Motherboard Manufacturer: Aquarius Systems USA Inc.) (BIOS release date:: 13-06-1990)*/
- ROMX_LOAD( "ht12h.bin", 0x10001, 0x8000, CRC(db8b471e) SHA1(7b5fa1c131061fa7719247db3e282f6d30226778),ROM_SKIP(1) | ROM_BIOS(5) )
- ROMX_LOAD( "ht12l.bin", 0x10000, 0x8000, CRC(74fd178a) SHA1(97c8283e574abbed962b701f3e8091fb82823b80),ROM_SKIP(1) | ROM_BIOS(5) )
+ // BIOS-String: Quadtel HT12 286 BIOS Versio 3.05.03
+ // 2: Same board as #1, CPU: AMD N80L286-16S, FPU socket provided, Chipset: Headland HT12 - OSC: 14.31818, 8.000, 32.000MHZ, unpopulated: ASYN BUS CLK
+ // RAM: 8xHYB514256B-60 (8x20pin, alternativelx 4x18pin), Parity (2x16pin, 2x18pin) empty, 4xSIMM30 (Bank0 SIMM, Bank1 SIMM) - BIOS: Quadtel BIOS Software 286 253893
+ // Keyboard-BIOS: Quadtel BIOS Software KEY 316018 (undumped) - JP7: NO ASYN CLK, JP4: CMOS RAM CLEAR, JP3: COLOR - JP: 80287CLK=ASYN CLK
+ ROM_SYSTEM_BIOS(2, "quadtel", "Quadtel")
+ ROMX_LOAD( "bios-lo.bin", 0x10000, 0x8000, CRC(433d8044) SHA1(3435d51fad97247b4bcfdb2f3fdb358d99b0e6ea), ROM_SKIP(1) | ROM_BIOS(2) )
+ ROMX_LOAD( "bios-hi.bin", 0x10001, 0x8000, CRC(fe124da4) SHA1(b3e4e598cf1f5cada1b101d0c6434770017de3c6), ROM_SKIP(1) | ROM_BIOS(2) )
+ // 3: BIOS-String: DH12-1164-083090-K0 - CPU/FPU: N80L286-16/S, P80C287-10 - ISA8: 2, ISA16: 6
+ ROM_SYSTEM_BIOS(3, "head12a01", "Headland HT12/A #1")
+ ROMX_LOAD( "2hlm002l.bin", 0x10000, 0x8000, CRC(345b9ea1) SHA1(868cc309e433e0dcc9f3aa147263017b7f822461), ROM_SKIP(1) | ROM_BIOS(3) )
+ ROMX_LOAD( "2hlm002h.bin", 0x10001, 0x8000, CRC(35eed8b8) SHA1(119f2676aef038301c3e0bcdb999da6fd740e6a5), ROM_SKIP(1) | ROM_BIOS(3) )
+ // 4: MBL M21 - BIOS-String: DH12-1211-061390-K0 / HT-12 286 BIOS - Chipset: Headland HT12/A
+ ROM_SYSTEM_BIOS(4, "ami121", "AMI HT 12.1") /* (BIOS release date:: 13-06-1990) */
+ ROMX_LOAD( "ami2od86.bin", 0x10001, 0x8000, CRC(04a2cec4) SHA1(564d37a8b2c0f4d0e23cd1e280a09d47c9945da8),ROM_SKIP(1) | ROM_BIOS(4) )
+ ROMX_LOAD( "ami2ev86.bin", 0x10000, 0x8000, CRC(55deb5c2) SHA1(19ce1a7cc985b5895c585e39211475de2e3b0dd1),ROM_SKIP(1) | ROM_BIOS(4) )
+ // 5: SPEC 286 rev 4a - BIOS-String: DH12-1120-061390-K0
+ ROM_SYSTEM_BIOS(5, "ami122", "AMI HT 12.2") /* (BIOS release date:: 13-06-1990) */
+ ROMX_LOAD( "ami2ev89.bin", 0x10000, 0x8000, CRC(705d36e0) SHA1(0c9cfb71ced4587f109b9b6dfc2a9c92302fdb99),ROM_SKIP(1) | ROM_BIOS(5) )
+ ROMX_LOAD( "ami2od89.bin", 0x10001, 0x8000, CRC(7c81bbe8) SHA1(a2c7eca586f6e2e76b9101191e080a1f1cb8b833),ROM_SKIP(1) | ROM_BIOS(5) )
+ // 6: BIOS-String: DH12-1112-061390-K0
+ ROM_SYSTEM_BIOS(6, "ami123", "AMI HT 12.3") /*(Motherboard Manufacturer: Aquarius Systems USA Inc.) (BIOS release date:: 13-06-1990)*/
+ ROMX_LOAD( "ht12h.bin", 0x10001, 0x8000, CRC(db8b471e) SHA1(7b5fa1c131061fa7719247db3e282f6d30226778),ROM_SKIP(1) | ROM_BIOS(6) )
+ ROMX_LOAD( "ht12l.bin", 0x10000, 0x8000, CRC(74fd178a) SHA1(97c8283e574abbed962b701f3e8091fb82823b80),ROM_SKIP(1) | ROM_BIOS(6) )
ROM_END
@@ -2056,6 +2129,48 @@ ROM_END
// 80286 Desktop
//**************************************************************************
+// Zenith Z-248 - Motherboard: 85-3379-01 CPU BOARD 113087 - CPU: AMD N80L286-12/C, FPU socket provided - Chipset: Zymos Poach 1 and 2
+// RAM: 6xSIMM30 - OSC: 24.000MHz, 16.000MHz, 14.31818MHz - ISA8: 2, ISA16: 5 - on board diagnostic LEDs: red: CPU D101, ROM D102, RAM D103, INT D104, DSK D105, RDY D106, green: DCOK D107
+// Cards in system documented: DTC 5280 CRA MFM HD controller, Graphics card HEATH P/N150-307-3 L1A2334/Chips P82C434A (undumped), Logitech mouse/hand scanner controller, GW302 Parallel Printer Card, Chips P82C605 Dual Serial Printer Card
+// "+++ ERROR: Fatal Slushware RAM Error +++" / "--- Fatal Error: Cannot Continue! ---" (cf. olyport40)
+ROM_START( zdz248 ) // use CGA
+ ROM_REGION16_LE(0x20000, "bios", 0)
+ ROM_LOAD( "zenith_z-248.bin", 0x10000, 0x10000, CRC(e2042dd9) SHA1(bd51cc74b0b7bd42c449bc4b5702274f766e8ea5))
+ROM_END
+
+// Samsung Deskmaster 286-12, Microfive motherboard - Chipset: Chips F82C451C, F82C235-12 286 SCAT - CPU: Intel 80286-12, FPU socket provided
+// RAM: 6xSIMM40 - BIOS: Phoenix ROM BIOS PLUS 3.10 02M, Chips and Technologies VGA 411 BIOS v211 (one 27C512 EPROM) - Keyboard-BIOS: Intel P8942AN - ISA16: 1
+// OSC: 14.31818, 24.000000MHz, 24.000000MHz, 25.175000MHz, 40.000000MHz - on board: FDD, IDE, beeper, keyboard, mouse, ser, par - VGA Video RAM: 8x41C464J-10 (256K)
+ROM_START( samdm286 )
+ ROM_REGION16_LE(0x20000, "bios", 0)
+ ROM_LOAD( "samsung-deskmaster-28612-rom.bin", 0x10000, 0x10000, CRC(785d3196) SHA1(214a933d8fa86bfdb633fb5e8595a18a58cdba7d))
+ROM_END
+
+// Schneider EuroAT - Uses the same case as the Schneider EuroXT, a compact desktop with room for a single floppy drive and an AT IDE harddisk (Seagate ST-142A, ST-157A)
+// Mainboard: Baugr.Nr. 51513 with internal EGA, 52591 EGA components omitted (see: EURO VGA)
+// Chipset: 2xHeadland GC102-PC, HT101A/B1A4924, Schneider BIGJIM 30773, WD37C65BJM, Siemens SAB 16C450-N
+// EGA chipset (mainboard 51513): G2 GC201-PC, 64K RAM - Main RAM: 1MB
+// CPU: Siemens SAB 80286-12, Keyboard-BIOS: Schneider ROM BIOS 1985, 1989 Phoenix
+// Connectors: Keyboard, Printer, Serial, Floppy (can use the same external floppy disk drives as the EuroXT), EGA monitor
+// OSC: 34.0000, 19.2000MHz, 24.0000, 16.000MHz
+// BUS: proprietary connectors, ISA riser (ISA8x1, ISA16x1), BIOS can set CPU and BUS speed up to 12MHz
+// Proprietary EURO VGA card: 256KB RAM, ATI 18800-1 chipset
+// blank screen, beeps 1-2-4
+ROM_START( euroat )
+ ROM_REGION16_LE( 0x20000, "bios", 0 )
+ ROM_SYSTEM_BIOS( 0, "v201", "V2.01" )
+ ROMX_LOAD( "euro_at_v201a_l.bin", 0x10000, 0x8000, CRC(0f8a2688) SHA1(95db9010b1c0465f878e5036bcf242ddf0a3be6a), ROM_SKIP(1) | ROM_BIOS(0) )
+ ROMX_LOAD( "euro_at_v201a_h.bin", 0x10001, 0x8000, CRC(75b6771b) SHA1(3aa0921914ea6e24249ce3f995fdcb341124d7e9), ROM_SKIP(1) | ROM_BIOS(0) )
+ // EGA ROM dump missing
+
+ ROM_SYSTEM_BIOS( 1, "v203", "V2.03" )
+ ROMX_LOAD( "80286at_bioslow_schneider_ag_id50444_v2.03.bin", 0x10000, 0x8000, CRC(de356110) SHA1(6bed59a756afa0b6181187d202b325e35afadd55), ROM_SKIP(1) | ROM_BIOS(1) )
+ ROMX_LOAD( "80286at_bioshigh_schneider_ag_id50445_v2.03.bin", 0x10001, 0x8000, CRC(c4c9c840) SHA1(09deaa659191075b6ccc58403979d61bdf990dcd), ROM_SKIP(1) | ROM_BIOS(1) )
+
+ ROM_REGION( 0x10000, "vga", 0 )
+ ROM_LOAD( "euro-vga_52255_bios_v1.02_row.bin", 0x00000, 0x10000, CRC(71d42e58) SHA1(be64990325f52128e102dfc3ed87d2d831183ddc))
+ROM_END
+
// Victor V286C - a VGA version exists as well
// CPU: AMD 802L86-10/S - one ISA16 extended to ISA8: 1, ISA16: 3 on a riser card - Keyboard-BIOS: AT-KB M5L8042
// Chipset: Kyocera AT-S.C.1 VER.A 9771A 89432EAI, Kyocera EAST-2A 9850 8938EAI, MB621103 M AT-1A 8944 Z67, MB622436 MAT-2E 8943 W02
@@ -3462,6 +3577,25 @@ ROM_START( walk386dx )
ROM_LOAD( "cthj02_03_76.bin", 0x0000, 0x2000, NO_DUMP )
ROM_END
+// Siemens PG 750 - Luggable programmer ("Programmiergerät") for the Siemens S5 automation systems, a 486 EISA version exists as well
+// Chipset: CHIPS P82C302, P82C301C, P82C206, four more "CHIPS" ICs
+// ISA16: 7
+// on board: V24/Mouse, V24/Modem, Printer
+ROM_START( pg750 )
+ ROM_REGION32_LE( 0x20000, "bios", 0 )
+ // 0: Phoenix 80386 ROM BIOS PLUS Version 1.10 14 / SIEMENS PG-750
+ // Time-of-day clock stopped
+ // EGA/TIGA Graphics System "Highgraph II"
+ ROM_DEFAULT_BIOS("v402")
+ ROM_SYSTEM_BIOS(0, "v40", "v40")
+ ROMX_LOAD( "pg750_4.0_386_l.bin", 0x10000, 0x8000, CRC(1e6dcd40) SHA1(2def9f729f43652a7b8b32a42e4c073f580d39ce), ROM_SKIP(1)|ROM_BIOS(0) )
+ ROMX_LOAD( "pg750_4.0_386_h.bin", 0x10001, 0x8000, CRC(389c20dd) SHA1(eb0e86ba88ac9742868689b2aac9911ed7acac74), ROM_SKIP(1)|ROM_BIOS(0) )
+ // 1: Phoenix 80386 ROM BIOS PLUS Version 1.10 17 / SIEMENS PG-750/730
+ // Time-of-day clock stopped
+ ROM_SYSTEM_BIOS(1, "v402", "v402")
+ ROMX_LOAD( "pg750_4.02_386_l.bin", 0x10000, 0x8000, CRC(208aac51) SHA1(49d50b7ade8f56bda203375a9b138adf2cb5e500), ROM_SKIP(1)|ROM_BIOS(1) )
+ ROMX_LOAD( "pg750_4.02_386_h.bin", 0x10001, 0x8000, CRC(c6e14fb6) SHA1(dad6ab5c5a18341ec0dce53fe712b8367340506b), ROM_SKIP(1)|ROM_BIOS(1) )
+ROM_END
//**************************************************************************
// 80486 BIOS
@@ -3876,14 +4010,21 @@ ROM_START( pcd4x )
// D756, was used in PCD-4Lsx, contains Cirrus Logic VGA ROM
ROM_SYSTEM_BIOS(0, "d756v320r316", "D756 BIOS V3.20 R3.16")
ROMX_LOAD( "fts_biosupdated756noflashbiosepromv320_320316_149.bin", 0x00000, 0x20000, CRC(2ab60725) SHA1(333b64424c08ecbbaf47110c99ad0335da211489), ROM_BIOS(0) )
- // D674, was used in PCD-4M, PCD-4Msx, PCD-4RSXA/4RA
- // LSI HT342-B-07 or Headland HT342-BUIB and another LSI chip
+ // D674, was used in PCD-4M, PCD-4Msx, PCD-4RSXA/4RA - this is a CPU card that is plugged into an ISA backplane; OSC: 14.31818
+ // Chipset: LSI HT342-B-07, LSI HT321-D, Intel B6842-V31 AWARD(c)SNI UPI V4.3, IS9412BL PC87311AVF US4823312 - CPU: 486sx soldered onto the mainboard, but a socket for a 486DX is present - RAM: SIMM30x8
+ // the CPU card can accept 16 bit "piggyback" modules, e.g. an ET4000 graphics card or a MFM harddisk controller to save ISA slots
+ // on board: IDE, Floppy, beeper, keyboard connector, parallel, 2xserial, RTC DS12887, connectors for NMI and keylock, 4 DIP switches labelled DX2, Upgrade, 25, color
+ // jumper X7: skip on/off, jumper x6: drv l/h
ROM_SYSTEM_BIOS(1, "d674v320r316", "D674 BIOS V3.20 R3.16")
ROMX_LOAD( "fts_biosupdated674noflashbiosepromv320_320316_144.bin", 0x00000, 0x20000, CRC(1293d27c) SHA1(22f36c4a5a0912011ed54ff917244f412208ffc0), ROM_BIOS(1) )
+ ROM_SYSTEM_BIOS(2, "d674v320r304", "D674 BIOS V3.20 R3.04")
+ ROMX_LOAD( "d674_27c1024_3.20.bin", 0x00000, 0x20000, CRC(dfdad89e) SHA1(6cb78d8b5c8822dc84970ba912bc66a5e7cd2fb4), ROM_BIOS(2) )
// D802, was used in PCD-4HVL
- ROM_SYSTEM_BIOS(2, "d802v320r316", "D802 BIOS V3.20 R3.34.802")
- // PCD-4NL, contains C&T VGA BIOS
- ROMX_LOAD( "fts_biosupdated802noflashbiosepromv320_320334_152.bin", 0x00000, 0x20000, CRC(fb1cd3d2) SHA1(98043c6f0299e1c56e5f266ea5f117ae456447ff), ROM_BIOS(2) )
+ ROM_SYSTEM_BIOS(3, "d802v320r316", "D802 BIOS V3.20 R3.34.802")
+ ROMX_LOAD( "fts_biosupdated802noflashbiosepromv320_320334_152.bin", 0x00000, 0x20000, CRC(fb1cd3d2) SHA1(98043c6f0299e1c56e5f266ea5f117ae456447ff), ROM_BIOS(3) )
+ // D620
+ ROM_SYSTEM_BIOS(4, "d620", "D620")
+ ROMX_LOAD( "w26361-d620-z4-01-5_award_v3.10_r2.02.bin", 0x00000, 0x20000, CRC(2708cc2a) SHA1(a399c938ffeba4cb28a22e54235f3f9c5e2892f6), ROM_BIOS(4) )
ROM_END
@@ -4887,6 +5028,13 @@ ROM_START( bluenote )
ROM_LOAD( "7500d_rev26_121593.bin", 0x00000, 0x20000, CRC(d564f855) SHA1(181e4097c3b4ca2e8e79f1732d4aef9edd5b4586))
ROM_END
+// Siemens PG-750 486 EISA
+// blank screen, beeps
+ROM_START( pg750eisa )
+ ROM_REGION32_LE(0x20000, "bios", 0)
+ ROM_LOAD( "pg_pg750_486_eisa.bin", 0x10000, 0x10000, CRC(2e6149a9) SHA1(9fcf29a6169efa1359c7c3eff09326dd3e4001dc))
+ROM_END
+
/***************************************************************************
@@ -4992,8 +5140,10 @@ COMP( 198?, o286foxii, ibm5170, 0, atturbo, 0, at_state, init_at
COMP( 1987, m290, ibm5170, 0, atturbo, 0, at_state, init_at, "Olivetti", "M290", MACHINE_NOT_WORKING )
COMP( 1991, pcd204, ibm5170, 0, atturbo, 0, at_state, init_at, "Philips", "PCD204 (PCD200 series)", MACHINE_NOT_WORKING )
COMP( 1990, profpc33, ibm5170, 0, atturbo, 0, at_state, init_at, "Profex", "PC 33", MACHINE_NOT_WORKING )
+COMP( 199?, samdm286, ibm5170, 0, atturbo, 0, at_state, init_at, "Samsung", "Deskmaster 286-12", MACHINE_NOT_WORKING )
COMP( 198?, v286c, ibm5170, 0, atturbo, 0, at_state, init_at, "Victor", "V286C", MACHINE_NOT_WORKING )
COMP( 1981, wpc250, ibm5170, 0, atturbo, 0, at_state, init_at, "Wang Laboratories, Inc.", "PC-250/16", MACHINE_NOT_WORKING )
+COMP( 198?, zdz248, ibm5170, 0, atturbo, 0, at_state, init_at, "Zenith Data Systems", "Z-248", MACHINE_NOT_WORKING )
COMP( 1990, n8810m30, ibm5170, 0, neat, 0, at_state, init_at, "Nixdorf Computer AG", "8810 M30", MACHINE_NOT_WORKING )
COMP( 198?, elt286b, ibm5170, 0, neat, 0, at_state, init_at, "Chaintech", "ELT-286B-160B(E)", MACHINE_NOT_WORKING )
COMP( 1985, k286i, ibm5170, 0, k286i, 0, at_state, init_at, "Kaypro", "286i", MACHINE_NOT_WORKING )
@@ -5004,6 +5154,7 @@ COMP( 198?, olyport40, ibm5170, 0, olyport40, 0, at_state, init_at
COMP( 1987, n8810m15, ibm5170, 0, n8810m15, 0, at_state, init_at, "Nixdorf Computer AG", "8810 M15", MACHINE_NOT_WORKING )
COMP( 1990, n8810m16c, ibm5170, 0, n8810m15, 0, at_state, init_at, "Nixdorf Computer AG", "8810 M16 CGA version", MACHINE_NOT_WORKING )
COMP( 1986, n8810m55, ibm5170, 0, n8810m55, 0, at_state, init_at, "Nixdorf Computer AG", "8810 M55", MACHINE_NOT_WORKING )
+COMP( 1989, euroat, ibm5170, 0, euroat, 0, at_state, init_at, "Schneider Rundfunkwerke AG", "Euro AT", MACHINE_NOT_WORKING )
COMP( 199?, alaleolx, ibm5170, 0, at386sx, 0, at_state, init_at, "Alaris RYC", "LEOPARD LX", MACHINE_NOT_WORKING )
COMP( 199?, anch386s, ibm5170, 0, at386sx, 0, at_state, init_at, "ANIX", "CH-386S-16/20/25G", MACHINE_NOT_WORKING )
COMP( 1993, cxsxd, ibm5170, 0, at386sx, 0, at_state, init_at, "CX Technology", "CX SXD", MACHINE_NOT_WORKING )
@@ -5081,6 +5232,7 @@ COMP( 199?, qdu386dx, ibm5170, 0, at386, 0, at_state, init_at
COMP( 199?, fic4386vchd,ibm5170,0, at486, 0, at_state, init_at, "First International Computer", "4386-VC-HD", MACHINE_NOT_WORKING )
COMP( 198?, hot304, ibm5170, 0, at386, 0, at_state, init_at, "Shuttle Computer International", "HOT-304", MACHINE_NOT_WORKING )
COMP( 198?, hot307h, ibm5170, 0, at386, 0, at_state, init_at, "Shuttle Computer International", "HOT-307H", MACHINE_NOT_WORKING )
+COMP( 199?, pg750, ibm5170, 0, pg750, 0, at_state, init_at, "Siemens", "PG 750", MACHINE_NOT_WORKING )
COMP( 199?, sy019hi, ibm5170, 0, at386, 0, at_state, init_at, "Soyo", "SY-019H and SY-019I", MACHINE_NOT_WORKING )
COMP( 199?, uni386w, ibm5170, 0, at386, 0, at_state, init_at, "UNICHIP", "386W 367C REV 1.0", MACHINE_NOT_WORKING )
COMP( 1988, ataripc5, ibm5170, 0, at386, 0, at_state, init_at, "Atari", "PC5", MACHINE_NOT_WORKING )
@@ -5196,4 +5348,5 @@ COMP( 1995, pcd4nl, ibm5170, 0, at486, 0, at_state, init_at
COMP( 1993, pcd4nd, ibm5170, 0, at486, 0, at_state, init_at, "Siemens-Nixdorf", "PCD-4ND", MACHINE_NOT_WORKING )
COMP( 1993, lion3500, ibm5170, 0, at486, 0, at_state, init_at, "Lion", "3500", MACHINE_NOT_WORKING )
COMP( 199?, pcd4x, ibm5170, 0, at486, 0, at_state, init_at, "Siemens-Nixdorf", "PCD-4H, PCD-4M", MACHINE_NOT_WORKING )
+COMP( 199?, pg750eisa, ibm5170, 0, at486, 0, at_state, init_at, "Siemens", "PG-750 486 EISA", MACHINE_NOT_WORKING )
//COMP( 1988, nws286, ibm5170, 0, ews286, 0, at_state, at, "Nokia Data", "Nokia Data WS286", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp
index 7c82da2f3f0..84330de60d4 100644
--- a/src/mame/drivers/atarist.cpp
+++ b/src/mame/drivers/atarist.cpp
@@ -45,7 +45,7 @@
static const int IKBD_MOUSE_XYA[3][4] = { { 0, 0, 0, 0 }, { 1, 1, 0, 0 }, { 0, 1, 1, 0 } };
static const int IKBD_MOUSE_XYB[3][4] = { { 0, 0, 0, 0 }, { 0, 1, 1, 0 }, { 1, 1, 0, 0 } };
-static const int DMASOUND_RATE[] = { int(Y2/640/8), int(Y2/640/4), int(Y2/640/2), int(Y2/640) };
+static const double DMASOUND_RATE[] = { Y2/640.0/8.0, Y2/640.0/4.0, Y2/640.0/2.0, Y2/640.0 };
//**************************************************************************
@@ -99,25 +99,29 @@ void st_state::flush_dma_fifo()
{
if (m_fdc_fifo_empty[m_fdc_fifo_sel]) return;
- if (m_fdc_dmabytes) {
+ if (m_fdc_dmabytes)
+ {
address_space &program = m_maincpu->space(AS_PROGRAM);
- for (int i = 0; i < 8; i++) {
+ for (int i = 0; i < 8; i++)
+ {
uint16_t data = m_fdc_fifo[m_fdc_fifo_sel][i];
if (LOG) logerror("Flushing DMA FIFO %u data %04x to address %06x\n", m_fdc_fifo_sel, data, m_dma_base);
- if(m_dma_base >= 8)
+ if (m_dma_base >= 8)
program.write_word(m_dma_base, data);
m_dma_base += 2;
}
m_fdc_dmabytes -= 16;
- if (!m_fdc_dmabytes) {
+ if (!m_fdc_dmabytes)
+ {
m_fdc_sectors--;
if (m_fdc_sectors)
m_fdc_dmabytes = DMA_SECTOR_SIZE;
}
- } else
+ }
+ else
m_dma_error = 0;
m_fdc_fifo_empty[m_fdc_fifo_sel] = 1;
@@ -130,9 +134,11 @@ void st_state::flush_dma_fifo()
void st_state::fill_dma_fifo()
{
- if (m_fdc_dmabytes) {
+ if (m_fdc_dmabytes)
+ {
address_space &program = m_maincpu->space(AS_PROGRAM);
- for (int i = 0; i < 8; i++) {
+ for (int i = 0; i < 8; i++)
+ {
uint16_t data = program.read_word(m_dma_base);
if (LOG) logerror("Filling DMA FIFO %u with data %04x from memory address %06x\n", m_fdc_fifo_sel, data, m_dma_base);
@@ -141,13 +147,15 @@ void st_state::fill_dma_fifo()
m_dma_base += 2;
}
m_fdc_dmabytes -= 16;
- if (!m_fdc_dmabytes) {
+ if (!m_fdc_dmabytes)
+ {
m_fdc_sectors--;
if (m_fdc_sectors)
m_fdc_dmabytes = DMA_SECTOR_SIZE;
}
- } else
+ }
+ else
m_dma_error = 0;
m_fdc_fifo_empty[m_fdc_fifo_sel] = 0;
@@ -434,7 +442,8 @@ WRITE16_MEMBER( st_state::berr_w )
READ16_MEMBER( st_state::berr_r )
{
- if(!machine().side_effects_disabled()) {
+ if (!machine().side_effects_disabled())
+ {
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
}
@@ -601,7 +610,7 @@ WRITE8_MEMBER( st_state::ikbd_port2_w )
m_ikbd_joy = BIT(data, 0);
// serial transmit
- m_acia0->write_rxd(BIT(data, 4));
+ m_acia[0]->write_rxd(BIT(data, 4));
}
@@ -720,6 +729,16 @@ WRITE_LINE_MEMBER( st_state::write_monochrome )
m_mfp->i7_w(m_monochrome);
}
+WRITE_LINE_MEMBER( st_state::reset_w )
+{
+ //glue_reset();
+ m_mfp->reset();
+ m_ikbd->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
+ m_ymsnd->reset();
+ m_fdc->soft_reset();
+ //m_acsi->reset();
+}
+
//**************************************************************************
@@ -1261,8 +1280,8 @@ void st_state::st_map(address_map &map)
map(0xff8a3c, 0xff8a3d).rw(FUNC(st_state::blitter_ctrl_r), FUNC(st_state::blitter_ctrl_w));
#endif
map(0xfffa00, 0xfffa3f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff);
- map(0xfffc00, 0xfffc03).rw(m_acia0, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
- map(0xfffc04, 0xfffc07).rw(m_acia1, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
+ map(0xfffc00, 0xfffc03).rw(m_acia[0], FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
+ map(0xfffc04, 0xfffc07).rw(m_acia[1], FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
}
@@ -1304,8 +1323,8 @@ void megast_state::megast_map(address_map &map)
map(0xff8a3c, 0xff8a3d).rw(FUNC(megast_state::blitter_ctrl_r), FUNC(megast_state::blitter_ctrl_w));
map(0xfffa00, 0xfffa3f).rw(m_mfp, FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0x00ff);
map(0xfffa40, 0xfffa57).rw(FUNC(megast_state::fpu_r), FUNC(megast_state::fpu_w));
- map(0xfffc00, 0xfffc03).rw(m_acia0, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
- map(0xfffc04, 0xfffc07).rw(m_acia1, FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
+ map(0xfffc00, 0xfffc03).rw(m_acia[0], FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
+ map(0xfffc04, 0xfffc07).rw(m_acia[1], FUNC(acia6850_device::read), FUNC(acia6850_device::write)).umask16(0xff00);
map(0xfffc20, 0xfffc3f).rw(RP5C15_TAG, FUNC(rp5c15_device::read), FUNC(rp5c15_device::write)).umask16(0x00ff);
}
@@ -1700,11 +1719,11 @@ WRITE8_MEMBER( st_state::psg_pa_w )
floppy_image_device *floppy = nullptr;
if (!BIT(data, 1))
floppy = m_floppy[0]->get_device();
- else if(!BIT(data, 2))
+ else if (!BIT(data, 2))
floppy = m_floppy[1]->get_device();
// side select
- if(floppy)
+ if (floppy)
floppy->ss_w(BIT(data, 0) ? 0 : 1);
m_fdc->set_floppy(floppy);
@@ -1744,11 +1763,11 @@ WRITE8_MEMBER( stbook_state::psg_pa_w )
floppy_image_device *floppy = nullptr;
if (!BIT(data, 1))
floppy = m_floppy[0]->get_device();
- else if(!BIT(data, 2))
+ else if (!BIT(data, 2))
floppy = m_floppy[1]->get_device();
// side select
- if(floppy)
+ if (floppy)
floppy->ss_w(BIT(data, 0) ? 0 : 1);
m_fdc->set_floppy(floppy);
@@ -1771,14 +1790,6 @@ WRITE_LINE_MEMBER( st_state::ikbd_tx_w )
m_ikbd_tx = state;
}
-WRITE_LINE_MEMBER(st_state::write_acia_clock)
-{
- m_acia0->write_txc(state);
- m_acia0->write_rxc(state);
- m_acia1->write_txc(state);
- m_acia1->write_rxc(state);
-}
-
WRITE_LINE_MEMBER( st_state::fdc_drq_w )
{
@@ -1871,6 +1882,7 @@ void st_state::machine_start()
/// TODO: get callbacks to trigger these.
m_mfp->i0_w(1);
+ m_mfp->i4_w(1);
m_mfp->i5_w(1);
m_mfp->i7_w(1);
}
@@ -1923,6 +1935,7 @@ void ste_state::machine_start()
/// TODO: get callbacks to trigger these.
m_mfp->i0_w(1);
+ m_mfp->i4_w(1);
m_mfp->i5_w(1);
m_mfp->i7_w(1);
}
@@ -1966,6 +1979,7 @@ void stbook_state::machine_start()
/// TODO: get callbacks to trigger these.
m_mfp->i0_w(1);
+ m_mfp->i4_w(1);
m_mfp->i5_w(1);
}
@@ -1989,6 +2003,7 @@ void st_state::common(machine_config &config)
// basic machine hardware
M68000(config, m_maincpu, Y2/4);
m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &st_state::cpu_space_map);
+ m_maincpu->set_reset_callback(FUNC(st_state::reset_w));
keyboard(config);
@@ -2025,21 +2040,29 @@ void st_state::common(machine_config &config)
m_rs232->cts_handler().set(m_mfp, FUNC(mc68901_device::i2_w));
m_rs232->ri_handler().set(m_mfp, FUNC(mc68901_device::i6_w));
- ACIA6850(config, m_acia0, 0);
- m_acia0->txd_handler().set(FUNC(st_state::ikbd_tx_w));
- m_acia0->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<0>));
+ ACIA6850(config, m_acia[0], 0);
+ m_acia[0]->txd_handler().set(FUNC(st_state::ikbd_tx_w));
+ m_acia[0]->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<0>));
+ m_acia[0]->write_cts(0);
+ m_acia[0]->write_dcd(0);
- ACIA6850(config, m_acia1, 0);
- m_acia1->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
- m_acia1->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<1>));
+ ACIA6850(config, m_acia[1], 0);
+ m_acia[1]->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
+ m_acia[1]->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<1>));
+ m_acia[1]->write_cts(0);
+ m_acia[1]->write_dcd(0);
input_merger_device &aciairq(INPUT_MERGER_ANY_HIGH(config, "aciairq"));
aciairq.output_handler().set(m_mfp, FUNC(mc68901_device::i4_w)).invert();
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia1, FUNC(acia6850_device::write_rxd));
+ MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia[1], FUNC(acia6850_device::write_rxd));
MIDI_PORT(config, "mdout", midiout_slot, "midiout");
- CLOCK(config, "acia_clock", Y2/64).signal_handler().set(FUNC(st_state::write_acia_clock)); // 500kHz
+ clock_device &acia_clock(CLOCK(config, "acia_clock", Y2/64)); // 500kHz
+ acia_clock.signal_handler().set(m_acia[0], FUNC(acia6850_device::write_txc));
+ acia_clock.signal_handler().append(m_acia[0], FUNC(acia6850_device::write_rxc));
+ acia_clock.signal_handler().append(m_acia[1], FUNC(acia6850_device::write_txc));
+ acia_clock.signal_handler().append(m_acia[1], FUNC(acia6850_device::write_rxc));
// cartridge
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "st_cart", "bin,rom");
@@ -2195,6 +2218,7 @@ void stbook_state::stbook(machine_config &config)
// basic machine hardware
M68000(config, m_maincpu, U517/2);
m_maincpu->set_addrmap(AS_PROGRAM, &stbook_state::stbook_map);
+ m_maincpu->set_reset_callback(FUNC(st_state::reset_w));
//COP888(config, COP888_TAG, Y700);
@@ -2241,21 +2265,29 @@ void stbook_state::stbook(machine_config &config)
m_rs232->cts_handler().set(m_mfp, FUNC(mc68901_device::i2_w));
m_rs232->ri_handler().set(m_mfp, FUNC(mc68901_device::i6_w));
- ACIA6850(config, m_acia0, 0);
- m_acia0->txd_handler().set(FUNC(st_state::ikbd_tx_w));
- m_acia0->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<0>));
+ ACIA6850(config, m_acia[0], 0);
+ m_acia[0]->txd_handler().set(FUNC(st_state::ikbd_tx_w));
+ m_acia[0]->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<0>));
+ m_acia[0]->write_cts(0);
+ m_acia[0]->write_dcd(0);
- ACIA6850(config, m_acia1, 0);
- m_acia1->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
- m_acia1->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<1>));
+ ACIA6850(config, m_acia[1], 0);
+ m_acia[1]->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
+ m_acia[1]->irq_handler().set("aciairq", FUNC(input_merger_device::in_w<1>));
+ m_acia[1]->write_cts(0);
+ m_acia[1]->write_dcd(0);
input_merger_device &aciairq(INPUT_MERGER_ANY_HIGH(config, "aciairq"));
aciairq.output_handler().set(m_mfp, FUNC(mc68901_device::i4_w)).invert();
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia1, FUNC(acia6850_device::write_rxd));
+ MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia[1], FUNC(acia6850_device::write_rxd));
MIDI_PORT(config, "mdout", midiout_slot, "midiout");
- CLOCK(config, "acia_clock", Y2/64).signal_handler().set(FUNC(st_state::write_acia_clock)); // 500kHz
+ clock_device &acia_clock(CLOCK(config, "acia_clock", Y2/64)); // 500kHz
+ acia_clock.signal_handler().set(m_acia[0], FUNC(acia6850_device::write_txc));
+ acia_clock.signal_handler().append(m_acia[0], FUNC(acia6850_device::write_rxc));
+ acia_clock.signal_handler().append(m_acia[1], FUNC(acia6850_device::write_txc));
+ acia_clock.signal_handler().append(m_acia[1], FUNC(acia6850_device::write_rxc));
// cartridge
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "st_cart", "bin,rom");
diff --git a/src/mame/drivers/ave_arb.cpp b/src/mame/drivers/ave_arb.cpp
index fcd19af7b92..47349ee1fdf 100644
--- a/src/mame/drivers/ave_arb.cpp
+++ b/src/mame/drivers/ave_arb.cpp
@@ -298,7 +298,7 @@ void arb_state::arb(machine_config &config)
m_via->set_clock(4_MHz_XTAL/4); // R6522P
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "arb", "bin");
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "arb");
m_cart->set_device_load(FUNC(arb_state::cart_load));
m_cart->set_must_be_loaded(true);
diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp
index b222e6fd062..14dc8e3ca4f 100644
--- a/src/mame/drivers/backfire.cpp
+++ b/src/mame/drivers/backfire.cpp
@@ -401,8 +401,6 @@ void backfire_state::backfire(machine_config &config)
m_deco_tilegen[0]->set_screen(m_lscreen);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x40);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -417,8 +415,6 @@ void backfire_state::backfire(machine_config &config)
m_deco_tilegen[1]->set_screen(m_lscreen);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x10);
m_deco_tilegen[1]->set_pf2_col_bank(0x50);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/beezer.cpp b/src/mame/drivers/beezer.cpp
index ba6da3f3260..47091dd73b7 100644
--- a/src/mame/drivers/beezer.cpp
+++ b/src/mame/drivers/beezer.cpp
@@ -92,7 +92,7 @@ public:
DECLARE_READ8_MEMBER(via_system_pb_r);
DECLARE_WRITE8_MEMBER(via_system_pa_w);
DECLARE_WRITE8_MEMBER(via_system_pb_w);
- DECLARE_WRITE8_MEMBER(bankswitch_w);
+ void bankswitch_w(uint8_t data);
void beezer(machine_config &config);
void banked_map(address_map &map);
@@ -445,7 +445,7 @@ WRITE8_MEMBER( beezer_state::via_system_pb_w )
m_pbus = data;
}
-WRITE8_MEMBER( beezer_state::bankswitch_w )
+void beezer_state::bankswitch_w(uint8_t data)
{
m_x = BIT(data, 3);
m_y = BIT(data, 4);
@@ -483,7 +483,7 @@ void beezer_state::machine_reset()
m_pbus = 0xff;
// initialize memory banks
- bankswitch_w(machine().dummy_space(), 0, 0);
+ bankswitch_w(0);
// start timer
m_dac_timer->adjust(attotime::zero, 0, attotime::from_hz((XTAL(4'000'000) / 4) / 16));
diff --git a/src/mame/drivers/bingoman.cpp b/src/mame/drivers/bingoman.cpp
index 5556104cd4b..29f891d0701 100644
--- a/src/mame/drivers/bingoman.cpp
+++ b/src/mame/drivers/bingoman.cpp
@@ -240,7 +240,8 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/h8/h83002.h"
+#include "cpu/h8500/h8520.h"
+#include "cpu/h8500/h8534.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@@ -264,12 +265,11 @@ protected:
private:
// devices
- required_device<cpu_device> m_maincpu;
+ required_device<h8520_device> m_maincpu;
// screen updates
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void bingoman_palette(palette_device &palette) const;
- void bingoman_io_map(address_map &map);
void bingoman_prg_map(address_map &map);
};
@@ -287,11 +287,6 @@ void bingoman_state::bingoman_prg_map(address_map &map)
map(0x000000, 0x07ffff).rom();
}
-void bingoman_state::bingoman_io_map(address_map &map)
-{
-// map.global_mask(0xff);
-}
-
static INPUT_PORTS_START( bingoman )
/* dummy active high structure */
PORT_START("SYSA")
@@ -382,9 +377,10 @@ void bingoman_state::bingoman_palette(palette_device &palette) const
void bingoman_state::bingoman(machine_config &config)
{
/* basic machine hardware */
- H83002(config, m_maincpu, XTAL(20'000'000)); /* TODO: correct CPU type */
+ HD6435208(config, m_maincpu, 20_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &bingoman_state::bingoman_prg_map);
- m_maincpu->set_addrmap(AS_IO, &bingoman_state::bingoman_io_map);
+
+ HD6475348(config, "subcpu", 20_MHz_XTAL).set_disable();
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
@@ -413,6 +409,9 @@ ROM_START( bingoman )
ROM_REGION( 0x80000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD16_WORD_SWAP( "ps.020.u51", 0x000000, 0x080000, CRC(0f40b10d) SHA1(96a24547a612ba7c2b33c84a0f3afecc9a7cc076) ) // wrong ...
+ ROM_REGION( 0x8000, "subcpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd6475348cp16.u33", 0x0000, 0x8000, NO_DUMP )
+
ROM_REGION( 0x300000, "tms", ROMREGION_ERASE00 ) // banked
ROM_LOAD( "p03_036.015.u01", 0x000000, 0x080000, CRC(b78b7fca) SHA1(8e4147bb8351db5b17e2bf39bb12ca31cf02f3a6) ) // Game 1 (Gold Jackpot)
ROM_LOAD( "p03_tms.030.u02", 0x080000, 0x080000, CRC(94f0076e) SHA1(45d0379ad232ae7c5723c87a5fed9f9cc576aea2) ) // Game 1 (Gold Jackpot)
@@ -442,6 +441,9 @@ ROM_START( bingomana )
ROM_REGION( 0x80000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD16_WORD_SWAP( "ps.020.u51", 0x000000, 0x080000, CRC(0f40b10d) SHA1(96a24547a612ba7c2b33c84a0f3afecc9a7cc076) ) // wrong ...
+ ROM_REGION( 0x8000, "subcpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd6475348cp16.u33", 0x0000, 0x8000, NO_DUMP )
+
ROM_REGION( 0x300000, "tms", ROMREGION_ERASE00 ) // banked
ROM_LOAD( "a03_037.013.u01", 0x000000, 0x080000, CRC(9c3ed8e9) SHA1(263431ed6db314bee64709bae16fa8c6d5adbd41) ) // Game 1 (Gold Jackpot)
ROM_LOAD( "a03_tms.010.u02", 0x080000, 0x080000, CRC(f4142b1a) SHA1(1a14865bd567d5e7bf9e0e0765f6443c8165f46b) ) // Game 1 (Gold Jackpot)
diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp
index bfd56abcc60..5eea1b374c1 100644
--- a/src/mame/drivers/boogwing.cpp
+++ b/src/mame/drivers/boogwing.cpp
@@ -350,8 +350,6 @@ void boogwing_state::boogwing(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x1f); // pf2 has 5bpp graphics
m_deco_tilegen[0]->set_pf1_col_bank(0);
m_deco_tilegen[0]->set_pf2_col_bank(0); // pf2 is non default
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -365,8 +363,6 @@ void boogwing_state::boogwing(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0);
m_deco_tilegen[1]->set_pf2_col_bank(16);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/btime.cpp b/src/mame/drivers/btime.cpp
index be2b0cc02d0..f4e059b90b5 100644
--- a/src/mame/drivers/btime.cpp
+++ b/src/mame/drivers/btime.cpp
@@ -35,11 +35,9 @@ main processor triggers an IRQ request when writing a command to the sound
CPU.
-PCB Layouts
------------
-Zoar
-Data East, 1982
+Zoar (Data East, 1982)
+Hardware info by Guru
Top PCB
@@ -107,11 +105,11 @@ DE-0122
|---------------------------------|
Notes:
CPU-7 - Epoxy block containing a 6502 clocked at 1.5MHz [12/8]
- and possibly something else ^_^
+ and some 74xx logic chips
2128 - 2k x8 SRAM == 6116
AM93425 - 1k x1 SRAM == 2125
PB* - PALs (not dumped, registered types)
- Z19/20/21 - PROMs, type Harris 7603 (32 bytes)
+ Z19/20/21 - PROMs, type Harris 7603 (32 bytes), compatible with 82S123
VSync - 57.4358Hz
HSync - 15.6235kHz
@@ -129,13 +127,20 @@ zoar (manual), disco (dips listing). Names of disco switches in DIPLOC are
not confirmed (manual needed, in the meanwhile I put generic SW1 & SW2).
A few notes:
-* all the documents says that DSW1 bit 7 is related to the cocktail mode
+* All the documents says that DSW1 bit 7 is related to the cocktail mode
(either flipping the screen or changing the control panel)
-* according to manuals, btime & bnj Service dips should have a different
+* According to manuals, btime & bnj Service dips should have a different
effect, using 2 bits to access different tests (see commented out
- settings below)
-* how do country codes affect disco? are there other values other than
+ settings below). This is normal, the tests are in sets btime3 & btimem
+* How do country codes affect disco? are there other values other than
the ones in the manual?
+* If/when tisland is fixed/working it needs its own inputs/DIPs (currently wrong using btime inputs/DIPs)
+* Most games have SW2.8 on. This is normal because that bit is part of the vblank circuit.
+ Currently MAME can't show that as a DIPSW but it must be on regardless or those games won't boot.
+* Some games have no sound or bad sound after a manual soft reset (F3). Use shift-F3 (hard reset).
+* wtennis is not fully understood and has a reset hack to make it work but the real issue should be fixed.
+ Even with the hack it does not boot directly into the game, it stays on a test screen.
+ Reset the game with F3 (soft reset) or two shift-F3 hard resets to 'fix' it.
***************************************************************************/
@@ -325,7 +330,13 @@ void btime_state::disco_map(address_map &map)
map(0xa000, 0xffff).rom();
}
+void btime_state::protenn_map(address_map &map)
+{
+ disco_map(map);
+ map(0x9a00, 0x9a00).unmapr();
+ map(0x9a01, 0x9a01).portr("DSW2");
+}
void btime_state::audio_map(address_map &map)
{
@@ -405,53 +416,58 @@ static INPUT_PORTS_START( btime )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
- PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("15D:1,2")
+ PORT_START("DSW1") // At location 15D on sound PCB
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("15D:3,4")
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- /* Manual gives the following Test settings, but they don't seem to correspond to the actual effect */
-// PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("15D:5,6")
-// PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
-// PORT_DIPSETTING( 0x00, "Sound I/O Board Only" )
-// PORT_DIPSETTING( 0x10, "Normal Test" )
-// PORT_DIPSETTING( 0x20, "Cross Hatch Only" )
- PORT_SERVICE_DIPLOC( 0x10, IP_ACTIVE_LOW, "15D:5" )
- PORT_DIPNAME( 0x20, 0x20, "Cross Hatch Pattern" ) PORT_DIPLOCATION("15D:6")
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x10, 0x10, "Leave Off" ) PORT_DIPLOCATION("SW1:5") // Must be OFF. No test mode in ROM
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) // so this locks up the game at boot-up if on
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, "Control Panel" ) PORT_DIPLOCATION("15D:7")
+ PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
-// PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("15D:8")
-// PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
-// PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+// PORT_DIPNAME( 0x80, 0x00, "Screen" ) PORT_DIPLOCATION("SW1:8") // Manual states this is Screen Invert
+// PORT_DIPSETTING( 0x00, "Normal" )
+// PORT_DIPSETTING( 0x80, "Invert" )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Schematics show this is connected to DIP SW2.8
- PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("14D:1")
+ PORT_START("DSW2") // At location 14D on sound PCB
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x06, 0x02, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("14D:2,3")
+ PORT_DIPNAME( 0x06, 0x02, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
PORT_DIPSETTING( 0x06, "10000" )
PORT_DIPSETTING( 0x04, "15000" )
PORT_DIPSETTING( 0x02, "20000" )
PORT_DIPSETTING( 0x00, "30000" )
- PORT_DIPNAME( 0x08, 0x08, "Enemies" ) PORT_DIPLOCATION("14D:4")
+ PORT_DIPNAME( 0x08, 0x08, "Enemies" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x00, "6" )
- PORT_DIPNAME( 0x10, 0x00, "End of Level Pepper" ) PORT_DIPLOCATION("14D:5")
+ PORT_DIPNAME( 0x10, 0x00, "End of Level Pepper" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "14D:6" ) /* it should be OFF according to the manual */
- PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "14D:7" ) /* it should be OFF according to the manual */
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "14D:8" ) /* it should be OFF according to the manual */
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" ) // should be OFF according to the manual
+ PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) // should be OFF according to the manual
+ PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) // should be OFF according to the manual
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( btime3 ) // Used for btime3 and btimem
+ PORT_INCLUDE( btime )
+
+ PORT_MODIFY("DSW1")
+ PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6")
+ PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, "Sound Test Only" )
+ PORT_DIPSETTING( 0x10, "Cross Hatch Only" )
+ PORT_DIPSETTING( 0x20, "Normal Test" ) // Use Coin A to advance the tests
INPUT_PORTS_END
static INPUT_PORTS_START( cookrace )
@@ -486,46 +502,40 @@ static INPUT_PORTS_START( cookrace )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Actually DIP SW2.8
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
PORT_DIPSETTING( 0x06, "20000" )
PORT_DIPSETTING( 0x04, "30000" )
PORT_DIPSETTING( 0x02, "40000" )
PORT_DIPSETTING( 0x00, "50000" )
- PORT_DIPNAME( 0x08, 0x08, "Enemies" )
+ PORT_DIPNAME( 0x08, 0x08, "Enemies" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x00, "6" )
- PORT_DIPNAME( 0x10, 0x10, "End of Level Pepper" )
+ PORT_DIPNAME( 0x10, 0x10, "End of Level Pepper" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
+ PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8")
PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x80, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
@@ -562,31 +572,31 @@ static INPUT_PORTS_START( zoar )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_lo, 0)
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- /* Manual says bit 4,5 have to stay OFF */
- PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW1:5" ) /* almost certainly unused */
- /* Service mode doesn't work because of missing ROMs */
- PORT_SERVICE_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
- PORT_DIPNAME( 0x40, 0x00, "Control Panel" ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" ) // Manual says bit 5 & 6 have to stay off
+ PORT_DIPNAME( 0x20, 0x20, "Leave Off" ) PORT_DIPLOCATION("SW1:6") // Must be OFF. No test mode in ROM
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) // so this locks up the game at boot-up when on
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
-// PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+// PORT_DIPNAME( 0x80, 0x00, "Screen" ) PORT_DIPLOCATION("SW1:8") // Manual says Screen Invert but it is not implimented
// PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
// PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- /* I can't use PORT_VBLANK as players would have almost no time to enter their initials */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
+ // I can't use PORT_VBLANK as players would have almost no time to enter their initials
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Actually DIP SW2.8
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
@@ -597,12 +607,12 @@ static INPUT_PORTS_START( zoar )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x10, 0x00, "Weapon Select" ) PORT_DIPLOCATION("SW2:5")
- PORT_DIPSETTING( 0x00, "Manual" )
- PORT_DIPSETTING( 0x10, "Auto" )
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" ) /* These 3 switches have something to do with coinage */
- PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) /* See code at $d234. Feel free to figure them out */
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Manual says to leave them OFF */
+ PORT_DIPNAME( 0x10, 0x00, "Number Of Buttons" ) PORT_DIPLOCATION("SW2:5") // Manual says 'Panel B'
+ PORT_DIPSETTING( 0x00, "3 (Manual Weapon Select)" ) // This removes a button as the cocktail has less buttons
+ PORT_DIPSETTING( 0x10, "2 (Auto Weapon Select)" ) // See notes in this driver at around line 80
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" ) // These 3 switches have something to do with coinage
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) // See code at $d234. Feel free to figure them out
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) // Manual says to leave them off
INPUT_PORTS_END
static INPUT_PORTS_START( lnc )
@@ -643,18 +653,18 @@ static INPUT_PORTS_START( lnc )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6") /* Manual says these bits are unused */
+ PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6") // Manual says these bits are unused
PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, "RAM Test Only" )
PORT_DIPSETTING( 0x20, "Watchdog Test Only" )
- PORT_DIPSETTING( 0x10, "All Tests" )
+ PORT_DIPSETTING( 0x10, "All Tests" ) // Use Coin A to advance the tests
PORT_DIPNAME( 0x40, 0x00, "Control Panel" ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
// PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
// PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
// PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Actually DIP SW2.8
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
@@ -667,11 +677,11 @@ static INPUT_PORTS_START( lnc )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPNAME( 0x08, 0x08, "Game Speed" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "Slow" )
- PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPUNUSED_DIPLOC( 0x10, 0x00, "SW2:5" ) /* it should be OFF according to the manual */
- PORT_DIPUNUSED_DIPLOC( 0x20, 0x00, "SW2:6" ) /* it should be OFF according to the manual */
- PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "SW2:7" ) /* it should be OFF according to the manual */
- PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW2:8" ) /* it should be OFF according to the manual */
+ PORT_DIPSETTING( 0x00, "Fast" )
+ PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" ) // should be OFF according to the manual */
+ PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) // should be OFF according to the manual */
+ PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" ) // should be OFF according to the manual */
+ PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) // should be OFF according to the manual */
INPUT_PORTS_END
static INPUT_PORTS_START( wtennis )
@@ -698,51 +708,37 @@ static INPUT_PORTS_START( wtennis )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Actually DIP SW2.8
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
PORT_DIPSETTING( 0x06, "10000" )
PORT_DIPSETTING( 0x04, "20000" )
PORT_DIPSETTING( 0x02, "30000" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* definitely used */
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) /* These 3 switches */
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) /* have to do with */
- PORT_DIPSETTING( 0x20, DEF_STR( On ) ) /* coinage. */
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" ) // definitely used
+ PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) // Switches 6,7,8
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" ) // have something to do
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) // with coinage.
INPUT_PORTS_END
static INPUT_PORTS_START( mmonkey )
@@ -773,45 +769,45 @@ static INPUT_PORTS_START( mmonkey )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPUNUSED( 0x20, 0x00 ) /* almost certainly unused */
- PORT_DIPNAME( 0x40, 0x00, "Control Panel" )
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" ) // almost certainly unused
+ PORT_DIPNAME( 0x40, 0x00, "Control Panel" ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
-// PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
+// PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
// PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
// PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Actually DIP SW2.8
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
PORT_DIPSETTING( 0x02, "Every 15000" )
PORT_DIPSETTING( 0x04, "Every 30000" )
PORT_DIPSETTING( 0x00, "20000" )
PORT_DIPSETTING( 0x06, DEF_STR( None ) )
- PORT_DIPNAME( 0x18, 0x08, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x18, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4,5")
PORT_DIPSETTING( 0x18, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x08, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, "Level Skip Mode (Cheat)")
- PORT_DIPUNUSED( 0x20, 0x00 ) /* almost certainly unused */
- PORT_DIPUNUSED( 0x40, 0x00 ) /* almost certainly unused */
- PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" ) // almost certainly unused
+ PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) // almost certainly unused
+ PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
INPUT_PORTS_END
static INPUT_PORTS_START( bnj )
@@ -845,59 +841,66 @@ static INPUT_PORTS_START( bnj )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
- PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("8D:1,2")
+ PORT_START("DSW1") // At location 8D
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("8D:3,4")
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- /* Manual gives the following Test settings, but they don't seem to correspond to the actual effect */
-// PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("8D:5,6")
-// PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
-// PORT_DIPSETTING( 0x00, "Video PC Board Only" )
-// PORT_DIPSETTING( 0x10, "Normal Test" )
-// PORT_DIPSETTING( 0x20, "No Effect" )
- PORT_SERVICE_DIPLOC( 0x10, IP_ACTIVE_LOW, "8D:5" )
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "8D:6" )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("8D:7")
+ PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6")
+ PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, "All Tests" ) // Use Coin A to advance the tests
+ PORT_DIPSETTING( 0x00, "RAM Test Only" )
+ PORT_DIPSETTING( 0x10, "No Effect" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
- /* According to crazykong.com dips this should change the control layout */
-// PORT_DIPNAME( 0x80, 0x00, "Control Panel" ) PORT_DIPLOCATION("8D:8")
+ // According to crazykong.com dips this should change the control layout
+// PORT_DIPNAME( 0x80, 0x00, "Control Panel" ) PORT_DIPLOCATION("SW1:8")
// PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
// PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Schematics show this is connected to DIP SW2.8
- PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("7D:1")
+ PORT_START("DSW2") // At location 7D
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("7D:2,3")
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
PORT_DIPSETTING( 0x06, "Every 30000" )
PORT_DIPSETTING( 0x04, "Every 70000" )
PORT_DIPSETTING( 0x02, "20000 Only" )
PORT_DIPSETTING( 0x00, "30000 Only" )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("7D:4")
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("7D:5")
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "7D:6" ) /* it should be OFF according to the manual */
- PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "7D:7" ) /* it should be OFF according to the manual */
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "7D:8" ) /* it should be OFF according to the manual */
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) // it should be OFF according to the manual
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" ) // it should be OFF according to the manual
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) // it should be OFF according to the manual
INPUT_PORTS_END
-static INPUT_PORTS_START( caractn2 ) /* 2/3 Lives Dip changes in this set */
+
+static INPUT_PORTS_START( brubber ) // no test mode for brubber
PORT_INCLUDE( bnj )
+ PORT_MODIFY("DSW1")
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
+INPUT_PORTS_END
+
+
+static INPUT_PORTS_START( caractn2 ) // Lives DIP changes in this set
+ PORT_INCLUDE( brubber )
+
PORT_MODIFY("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("7D:1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x00, "3" )
INPUT_PORTS_END
@@ -927,41 +930,41 @@ static INPUT_PORTS_START( disco )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!1,!2")
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
+ PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:!3,!4")
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
- PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:5" )
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:6" )
- PORT_DIPNAME( 0x40, 0x40, "Control Panel" ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:!5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:!6" )
+ PORT_DIPNAME( 0x40, 0x40, "Control Panel" ) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x40, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!1")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "5" )
- PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
+ PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!2,!3")
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x02, "20000" )
PORT_DIPSETTING( 0x04, "30000" )
PORT_DIPSETTING( 0x06, DEF_STR( None ) )
- PORT_DIPNAME( 0x08, 0x00, "Music Weapons" ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPNAME( 0x08, 0x00, "Music Weapons" ) PORT_DIPLOCATION("SW2:!4")
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPSETTING( 0x08, "8" )
- PORT_DIPNAME( 0x10, 0x00, "Game Speed" ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPNAME( 0x10, 0x00, "Game Speed" ) PORT_DIPLOCATION("SW2:!5")
PORT_DIPSETTING( 0x00, "Slow" )
PORT_DIPSETTING( 0x10, "Fast" )
- PORT_DIPNAME( 0xe0, 0x00, "Country Code" ) PORT_DIPLOCATION("SW2:6,7,8")
+ PORT_DIPNAME( 0xe0, 0x00, "Country Code" ) PORT_DIPLOCATION("SW2:!6,!7,!8")
PORT_DIPSETTING( 0x00, "A" )
PORT_DIPSETTING( 0x20, "B" )
PORT_DIPSETTING( 0x40, "C" )
@@ -974,6 +977,76 @@ static INPUT_PORTS_START( disco )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
INPUT_PORTS_END
+static INPUT_PORTS_START( protenn )
+ PORT_START("P1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
+
+ PORT_START("P2")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
+
+ PORT_START("SYSTEM")
+ PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
+
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
+ PORT_DIPNAME( 0x40, 0x40, "Control Panel" ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Upright ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x01, "2" )
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
+ PORT_DIPSETTING( 0x06, "10000" )
+ PORT_DIPSETTING( 0x04, "20000" )
+ PORT_DIPSETTING( 0x02, "30000" )
+ PORT_DIPSETTING( 0x00, DEF_STR( None ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, "Amateur" )
+ PORT_DIPSETTING( 0x00, "Professional" )
+ PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
+ PORT_DIPNAME( 0xe0, 0xe0, "Country Code" ) PORT_DIPLOCATION("SW2:6,7,8") // Listed as "DON'T CHANGE"
+ PORT_DIPSETTING( 0xe0, "A" )
+ PORT_DIPSETTING( 0xc0, "B" )
+ PORT_DIPSETTING( 0xa0, "C" )
+ PORT_DIPSETTING( 0x80, "D" )
+ PORT_DIPSETTING( 0x60, "E" )
+ PORT_DIPSETTING( 0x40, "F" )
+
+ PORT_START("VBLANK")
+ PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+INPUT_PORTS_END
+
static INPUT_PORTS_START( sdtennis )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
@@ -1006,46 +1079,48 @@ static INPUT_PORTS_START( sdtennis )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
- PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
+ PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6")
+ PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, "All Tests" ) // Use Coin A to advance the tests
+ PORT_DIPSETTING( 0x00, "Video Tests Only" )
+ PORT_DIPSETTING( 0x10, "No Effect" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // Actually DIP SW2.8
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x01, "2" )
- PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
PORT_DIPSETTING( 0x06, "1 Set won" )
PORT_DIPSETTING( 0x04, "2 Sets won" )
PORT_DIPSETTING( 0x02, "3 Sets won" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) // Check code at 0xc55b
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") // Check code at 0xc55b
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) // Check code at 0xc5af
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0xe0, 0xe0, "Copyright" )
- PORT_DIPSETTING( 0xe0, "Data East Corporation" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" ) // Check code at 0xc5af
+ PORT_DIPNAME( 0xe0, 0xe0, "Copyright" ) PORT_DIPLOCATION("SW2:6,7,8")
PORT_DIPSETTING( 0xc0, "Data East USA" )
- /* Other values are the same as 0xe0 */
- /* 0x60 also gives a special coinage : COIN1 gives 3 credits and COIN2 gives 8 credits
- whatever the coinage Dip Switch are (they are not read in this case) */
+ PORT_DIPSETTING( 0xe0, "Data East Corporation" )
+ PORT_DIPSETTING( 0x80, "Data East Corporation" )
+ PORT_DIPSETTING( 0x00, "Data East Corporation" )
+ PORT_DIPSETTING( 0x60, "Special: Coin A 3 Credits, Coin B 8 Credits" )
+ // Only two copyrights show. Other values are the same as 0xe0
+ // 0x60 gives a special coinage : COIN1 gives 3 credits and COIN2 gives 8 credits
+ // and the coinage DIP switches are ignored in this case
INPUT_PORTS_END
static const gfx_layout tile8layout =
@@ -1459,6 +1534,14 @@ void btime_state::disco(machine_config &config)
}
+void btime_state::protenn(machine_config &config)
+{
+ disco(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::protenn_map);
+}
+
+
void btime_state::tisland(machine_config &config)
{
btime(config);
@@ -1678,6 +1761,29 @@ ROM_START( lnc )
ROM_LOAD( "sb-4c", 0x0020, 0x0020, CRC(a29b4204) SHA1(7f15cae5c4aaa29638fb45029782dafd2b3d1484) ) /* RAS/CAS logic - not used */
ROM_END
+
+// DE-0106C-0 with CPU-7 + GGM-02 DE-0087C-1
+ROM_START( protenn )
+ ROM_REGION( 0x10000, "maincpu", 0 ) // all 2732s
+ ROM_LOAD( "w5-t.1a", 0xa000, 0x1000, CRC(d75d708b) SHA1(6262b3e6e5ff94596606a184383833935aa7025f) )
+ ROM_LOAD( "w4-t.2a", 0xb000, 0x1000, CRC(9131ed87) SHA1(af2276a82e024bf00c6db02deb7f06ade89dd386) )
+ ROM_LOAD( "w3-t.4a", 0xc000, 0x1000, CRC(01dc0e71) SHA1(a359468fb9dab9cfadcf8ec22a4d7ce9341f4324) )
+ ROM_LOAD( "w2-t.6a", 0xd000, 0x1000, CRC(6253acec) SHA1(24aaac1cdea1c60f8ff05dff6c17ba3a0e732187) )
+ ROM_LOAD( "w1-t.8a", 0xe000, 0x1000, CRC(6faf561c) SHA1(7fd5430af4b3f255e2c01e9b092b960ebdca8d13) )
+ ROM_LOAD( "w0-t.9a", 0xf000, 0x1000, CRC(baa330ae) SHA1(b10c66d9a03b036d95926d0c0fe441bb7ca4015d) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "w6-t.1b", 0xf000, 0x1000, CRC(a6bcc2d1) SHA1(383cd170417256467dfce94939d6afa66518c6d2) ) // 2732
+
+ ROM_REGION( 0x6000, "gfx1", ROMREGION_ERASE00 )
+ // dynamically allocated
+
+ ROM_REGION( 0x0040, "proms", 0 ) // both 82S123s
+ ROM_LOAD( "8.8a", 0x0000, 0x0020, CRC(6a0006ac) SHA1(72265bc472fb7610af190130560ef507244ce41c) ) // palette
+ ROM_LOAD( "7.10j", 0x0020, 0x0020, CRC(27b004e3) SHA1(4b9960b99130281a3b07f44816001e5eabf7a6fc) ) // RAS/CAS logic - not used
+ROM_END
+
+
/*This one doesn't have the (c) deco and the "pro" word at the title screen so I'm assuming it's a bootleg.*/
ROM_START( protennb )
ROM_REGION( 0x10000, "maincpu", 0 )
@@ -2080,19 +2186,20 @@ void btime_state::init_sdtennis()
GAME( 1982, btime, 0, btime, btime, btime_state, init_btime, ROT270, "Data East Corporation", "Burger Time (Data East set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, btime2, btime, btime, btime, btime_state, init_btime, ROT270, "Data East Corporation", "Burger Time (Data East set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, btime3, btime, btime, btime, btime_state, init_btime, ROT270, "Data East USA Inc.", "Burger Time (Data East USA)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, btimem, btime, btime, btime, btime_state, init_btime, ROT270, "Data East (Bally Midway license)", "Burger Time (Midway)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, btime3, btime, btime, btime3, btime_state, init_btime, ROT270, "Data East USA Inc.", "Burger Time (Data East USA)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, btimem, btime, btime, btime3, btime_state, init_btime, ROT270, "Data East (Bally Midway license)", "Burger Time (Midway)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, cookrace, btime, cookrace, cookrace, btime_state, init_cookrace, ROT270, "bootleg", "Cook Race", MACHINE_SUPPORTS_SAVE )
GAME( 1981, tisland, 0, tisland, btime, btime_state, init_tisland, ROT270, "Data East Corporation", "Treasure Island", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1981, lnc, 0, lnc, lnc, btime_state, init_lnc, ROT270, "Data East Corporation", "Lock'n'Chase", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, protennb, 0, disco, disco, btime_state, init_protennb, ROT270, "bootleg", "Tennis (bootleg of Pro Tennis)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, protenn, 0, protenn, protenn, btime_state, init_protennb, ROT270, "Data East Corporation", "Pro Tennis (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, protennb, protenn, protenn, protenn, btime_state, init_protennb, ROT270, "bootleg", "Tennis (bootleg of Pro Tennis)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, wtennis, 0, wtennis, wtennis, btime_state, init_wtennis, ROT270, "bootleg", "World Tennis", MACHINE_SUPPORTS_SAVE )
GAME( 1982, mmonkey, 0, mmonkey, mmonkey, btime_state, init_lnc, ROT270, "Technos Japan / Roller Tron", "Minky Monkey", MACHINE_SUPPORTS_SAVE )
GAME( 1982, mmonkeyj, mmonkey, mmonkey, mmonkey, btime_state, init_lnc, ROT270, "Technos Japan / Roller Tron", "Minky Monkey (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, brubber, 0, bnj, bnj, btime_state, init_bnj, ROT270, "Data East", "Burnin' Rubber", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, brubber, 0, bnj, brubber, btime_state, init_bnj, ROT270, "Data East", "Burnin' Rubber", MACHINE_SUPPORTS_SAVE )
GAME( 1982, bnj, brubber, bnj, bnj, btime_state, init_bnj, ROT270, "Data East USA", "Bump 'n' Jump", MACHINE_SUPPORTS_SAVE )
GAME( 1982, bnjm, brubber, bnj, bnj, btime_state, init_bnj, ROT270, "Data East USA (Bally Midway license)", "Bump 'n' Jump (Midway)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, caractn, brubber, bnj, bnj, btime_state, init_bnj, ROT270, "bootleg", "Car Action (set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, caractn, brubber, bnj, brubber, btime_state, init_bnj, ROT270, "bootleg", "Car Action (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, caractn2, brubber, bnj, caractn2, btime_state, init_bnj, ROT270, "bootleg", "Car Action (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, zoar, 0, zoar, zoar, btime_state, init_zoar, ROT270, "Data East USA", "Zoar", MACHINE_SUPPORTS_SAVE )
GAME( 1982, disco, 0, disco, disco, btime_state, init_disco, ROT270, "Data East", "Disco No.1", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp
index 6c83bed34f2..8c2326bb255 100644
--- a/src/mame/drivers/bublbobl.cpp
+++ b/src/mame/drivers/bublbobl.cpp
@@ -843,8 +843,8 @@ MACHINE_START_MEMBER(bublbobl_state,tokio)
MACHINE_RESET_MEMBER(bublbobl_state,tokio)
{
MACHINE_RESET_CALL_MEMBER(common);
- tokio_bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0x00, 0xFF); // force a bankswitch write of all zeroes, as /RESET clears the latch
- tokio_videoctrl_w(m_maincpu->space(AS_PROGRAM), 0, 0x00, 0xFF); // TODO: does /RESET clear this the same as above? probably yes, needs tracing...
+ tokio_bankswitch_w(0x00); // force a bankswitch write of all zeroes, as /RESET clears the latch
+ tokio_videoctrl_w(0x00); // TODO: does /RESET clear this the same as above? probably yes, needs tracing...
}
void bublbobl_state::tokio(machine_config &config)
@@ -943,7 +943,7 @@ MACHINE_START_MEMBER(bublbobl_state,bublbobl)
MACHINE_RESET_MEMBER(bublbobl_state,bublbobl)
{
MACHINE_RESET_CALL_MEMBER(common);
- bublbobl_bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0x00, 0xFF); // force a bankswitch write of all zeroes, as /RESET clears the latch
+ bublbobl_bankswitch_w(0x00); // force a bankswitch write of all zeroes, as /RESET clears the latch
m_ddr1 = 0;
m_ddr2 = 0;
@@ -1026,7 +1026,7 @@ MACHINE_START_MEMBER(bublbobl_state,boblbobl)
MACHINE_RESET_MEMBER(bublbobl_state,boblbobl)
{
MACHINE_RESET_CALL_MEMBER(common);
- bublbobl_bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0x00, 0xff); // force a bankswitch write of all zeroes, as /RESET clears the latch
+ bublbobl_bankswitch_w(0x00); // force a bankswitch write of all zeroes, as /RESET clears the latch
m_ic43_a = 0;
m_ic43_b = 0;
@@ -1061,7 +1061,7 @@ MACHINE_START_MEMBER(bub68705_state, bub68705)
MACHINE_RESET_MEMBER(bub68705_state, bub68705)
{
MACHINE_RESET_CALL_MEMBER(common);
- bublbobl_bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0x00, 0xff); // force a bankswitch write of all zeroes, as /RESET clears the latch
+ bublbobl_bankswitch_w(0x00); // force a bankswitch write of all zeroes, as /RESET clears the latch
m_address = 0;
m_latch = 0;
diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp
index cb756f8ac11..77376396b47 100644
--- a/src/mame/drivers/bwidow.cpp
+++ b/src/mame/drivers/bwidow.cpp
@@ -373,7 +373,7 @@ WRITE8_MEMBER(bwidow_state::earom_write)
m_earom->set_data(data);
}
-WRITE8_MEMBER(bwidow_state::earom_control_w)
+void bwidow_state::earom_control_w(uint8_t data)
{
// CK = DB0, C1 = /DB2, C2 = DB1, CS1 = DB3, /CS2 = GND
m_earom->set_control(BIT(data, 3), 1, !BIT(data, 2), BIT(data, 1));
@@ -382,7 +382,7 @@ WRITE8_MEMBER(bwidow_state::earom_control_w)
void bwidow_state::machine_reset()
{
- earom_control_w(machine().dummy_space(), 0, 0);
+ earom_control_w(0);
}
diff --git a/src/mame/drivers/carrera.cpp b/src/mame/drivers/carrera.cpp
index 943d096e01c..3d2fba4526d 100644
--- a/src/mame/drivers/carrera.cpp
+++ b/src/mame/drivers/carrera.cpp
@@ -70,7 +70,7 @@ public:
void carrera(machine_config &config);
private:
- DECLARE_READ8_MEMBER(unknown_r);
+ uint8_t unknown_r();
void palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void prg_map(address_map &map);
@@ -282,7 +282,7 @@ uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
return 0;
}
-READ8_MEMBER(carrera_state::unknown_r)
+uint8_t carrera_state::unknown_r()
{
return machine().rand();
}
@@ -373,7 +373,7 @@ ROM_START( bsebman )
ROM_LOAD( "ic5", 0x40000, 0x10000, CRC(21635791) SHA1(514078694269582c33fb7dddd6171089f9e21ee2) )
ROM_REGION( 0x20, "proms", 0 )
- ROM_LOAD( "82s123.ic39", 0x00, 0x20, BAD_DUMP CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) ) // BPROM had broken legs, not dumped for now, probably same as carrera
+ ROM_LOAD( "am27s19.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) )
ROM_END
GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index a7c79374c02..5d3b883e903 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -55,6 +55,10 @@ To Do:
- Tilemap scrolling issue in ppsatan right screen when flipped left
screen at some scenes
+- Most of videoreg functions aren't implemented
+
+- Measure video timings
+
Stephh's notes (based on the games M68000 code and some tests) :
1) 'gaia'
@@ -131,7 +135,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cave_state::vblank_start)
update_irq_state();
get_sprite_info(0);
m_agallet_vblank_irq = 1;
- m_vblank_end_timer->adjust(attotime::from_usec(2000));
+ m_vblank_end_timer->adjust(attotime::from_usec(2000)); // 2000us : vblank time
}
TIMER_DEVICE_CALLBACK_MEMBER(cave_state::vblank_start_left)
{
@@ -145,6 +149,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cave_state::vblank_start_right)
/* Called once/frame to generate the VBLANK interrupt */
INTERRUPT_GEN_MEMBER(cave_state::interrupt)
{
+ // 17376us : frame time
m_int_timer->adjust(attotime::from_usec(17376 - m_time_vblank_irq));
}
INTERRUPT_GEN_MEMBER(cave_state::interrupt_ppsatan)
@@ -211,6 +216,30 @@ u16 cave_state::irq_cause_r(offs_t offset)
return result;
}
+template<int Chip>
+void cave_state::videoregs_w(offs_t offset, u16 data, u16 mem_mask)
+{
+ COMBINE_DATA(&m_videoregs[Chip][offset]);
+ offset <<= 1;
+ // offset 0x04 and 0x06 is offset related?
+ // offset 0x0a is position mode toggle in bit 13-12 (seperated for X and Y?), other bits used but unknown
+ // offset 0x68 or 0x78 is commonly watchdog or DMA command?
+ // offset 0x6c or 0x7c is encryption key or CRTC or something else?
+ // offset 0x6e is commonly communication when sound CPU exists
+ // other registers unknown
+ if (offset != 0x00 &&
+ offset != 0x02 &&
+ offset != 0x04 &&
+ offset != 0x06 &&
+ offset != 0x08 &&
+ offset != 0x0a &&
+ offset != 0x68 &&
+ offset != 0x6e &&
+ offset != 0x78)
+ logerror("%s: Unknown videoregs #%02X writtten %04X = %04X & %04X\n",
+ machine().describe_context(), Chip, offset, data, mem_mask);
+}
+
/***************************************************************************
@@ -280,7 +309,7 @@ u16 cave_state::soundlatch_ack_r()
}
else
{
- logerror("CPU #1 - PC %04X: Sound Buffer 2 Underflow Error\n", m_maincpu->pc());
+ logerror("%s: Sound Buffer 2 Underflow Error\n", machine().describe_context());
return 0xff;
}
}
@@ -296,11 +325,10 @@ void cave_state::soundlatch_ack_w(u8 data)
m_soundbuf_empty = false;
}
else
- logerror("CPU #2 - PC %04X: Sound Buffer 2 Overflow Error\n", m_audiocpu->pc());
+ logerror("%s: Sound Buffer 2 Overflow Error\n", machine().describe_context());
}
-
/***************************************************************************
@@ -442,7 +470,7 @@ void cave_state::dfeveron_map(address_map &map)
map(0x708000, 0x708fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
map(0x710000, 0x710bff).readonly(); // ?
map(0x710c00, 0x710fff).ram(); // ?
- map(0x800000, 0x80007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x800000, 0x80007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x800000, 0x800007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x900000, 0x900005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0xa00000, 0xa00005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
@@ -465,7 +493,7 @@ void cave_state::ddonpach_map(address_map &map)
map(0x500000, 0x507fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
map(0x600000, 0x607fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
map(0x700000, 0x703fff).mirror(0x00c000).m(m_tilemap[2], FUNC(tilemap038_device::vram_8x8_map)); // Layer 2
- map(0x800000, 0x80007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x800000, 0x80007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x800000, 0x800007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x900000, 0x900005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0xa00000, 0xa00005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
@@ -496,23 +524,23 @@ u16 cave_state::donpachi_videoregs_r(offs_t offset)
void cave_state::donpachi_map(address_map &map)
{
- map(0x000000, 0x07ffff).rom(); // ROM
- map(0x100000, 0x10ffff).ram(); // RAM
- map(0x200000, 0x207fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
- map(0x300000, 0x307fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
- map(0x400000, 0x403fff).mirror(0x004000).m(m_tilemap[2], FUNC(tilemap038_device::vram_8x8_map)); // Layer 2
- map(0x500000, 0x50ffff).ram().share("spriteram.0"); // Sprites
- map(0x600000, 0x600005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
- map(0x700000, 0x700005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
- map(0x800000, 0x800005).rw(m_tilemap[2], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 2 Control
- map(0x900000, 0x90007f).ram().r(FUNC(cave_state::donpachi_videoregs_r)).share("videoregs.0"); // Video Regs
- map(0xa08000, 0xa08fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
- map(0xb00000, 0xb00003).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff); // M6295
- map(0xb00010, 0xb00013).rw("oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff); //
- map(0xb00020, 0xb0002f).w("nmk112", FUNC(nmk112_device::okibank_w)).umask16(0x00ff); //
- map(0xc00000, 0xc00001).portr("IN0"); // Inputs
- map(0xc00002, 0xc00003).portr("IN1"); // Inputs + EEPROM
- map(0xd00000, 0xd00000).w(FUNC(cave_state::eeprom_w)); // EEPROM
+ map(0x000000, 0x07ffff).rom(); // ROM
+ map(0x100000, 0x10ffff).ram(); // RAM
+ map(0x200000, 0x207fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
+ map(0x300000, 0x307fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
+ map(0x400000, 0x403fff).mirror(0x004000).m(m_tilemap[2], FUNC(tilemap038_device::vram_8x8_map)); // Layer 2
+ map(0x500000, 0x50ffff).ram().share("spriteram.0"); // Sprites
+ map(0x600000, 0x600005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
+ map(0x700000, 0x700005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
+ map(0x800000, 0x800005).rw(m_tilemap[2], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 2 Control
+ map(0x900000, 0x90007f).rw(FUNC(cave_state::donpachi_videoregs_r), FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
+ map(0xa08000, 0xa08fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
+ map(0xb00000, 0xb00003).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff); // M6295 #0
+ map(0xb00010, 0xb00013).rw("oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff); // M6295 #1
+ map(0xb00020, 0xb0002f).w("nmk112", FUNC(nmk112_device::okibank_w)).umask16(0x00ff); // Samples bank
+ map(0xc00000, 0xc00001).portr("IN0"); // Inputs
+ map(0xc00002, 0xc00003).portr("IN1"); // Inputs + EEPROM
+ map(0xd00000, 0xd00000).w(FUNC(cave_state::eeprom_w)); // EEPROM
}
@@ -529,7 +557,7 @@ void cave_state::esprade_map(address_map &map)
map(0x500000, 0x507fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
map(0x600000, 0x607fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
map(0x700000, 0x707fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer 2
- map(0x800000, 0x80007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x800000, 0x80007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x800000, 0x800007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x900000, 0x900005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0xa00000, 0xa00005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
@@ -557,7 +585,7 @@ void cave_state::gaia_map(address_map &map)
map(0x608000, 0x60ffff).ram(); // More Layer 1, Tested but not used?
map(0x700000, 0x707fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer 2
map(0x708000, 0x70ffff).ram(); // More Layer 2, Tested but not used?
- map(0x800000, 0x80007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x800000, 0x80007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x800000, 0x800007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x900000, 0x900005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0xa00000, 0xa00005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
@@ -579,7 +607,7 @@ void cave_state::guwange_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); // ROM
map(0x200000, 0x20ffff).ram(); // RAM
- map(0x300000, 0x30007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x300000, 0x30007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x300000, 0x300007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x400000, 0x40ffff).ram().share("spriteram.0"); // Sprites
map(0x500000, 0x507fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
@@ -610,7 +638,7 @@ void cave_state::hotdogst_map(address_map &map)
map(0x880000, 0x887fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
map(0x900000, 0x907fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
map(0x980000, 0x987fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer 2
- map(0xa80000, 0xa8007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0xa80000, 0xa8007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0xa80000, 0xa80007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
// map(0xa8006e, 0xa8006f).r(FUNC(cave_state::soundlatch_ack_r)); // From Sound CPU
map(0xa8006e, 0xa8006f).w(FUNC(cave_state::sound_cmd_w)); // To Sound CPU
@@ -696,7 +724,7 @@ void cave_state::korokoro_map(address_map &map)
map(0x100000, 0x107fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_writeonly_map)); // Layer 0
map(0x140000, 0x140005).w(m_tilemap[0], FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0x180000, 0x187fff).writeonly().share("spriteram.0"); // Sprites
- map(0x1c0000, 0x1c007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x1c0000, 0x1c007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x1c0000, 0x1c0007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x200000, 0x207fff).writeonly().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
// map(0x240000, 0x240003).r("ymz", FUNC(ymz280b_device::read)).umask16(0x00ff); // YMZ280
@@ -722,7 +750,7 @@ void cave_state::crusherm_map(address_map &map)
map(0x280008, 0x280009).w(FUNC(cave_state::korokoro_leds_w)); // Leds
map(0x28000a, 0x28000b).w(FUNC(cave_state::korokoro_eeprom_w)); // EEPROM
map(0x28000c, 0x28000d).nopw(); // 0 (watchdog?)
- map(0x300000, 0x30007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x300000, 0x30007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x300000, 0x300007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x340000, 0x34ffff).ram(); // RAM
}
@@ -736,7 +764,7 @@ void cave_state::mazinger_map(address_map &map)
map(0x000000, 0x07ffff).rom(); // ROM
map(0x100000, 0x10ffff).ram(); // RAM
map(0x200000, 0x20ffff).ram().share("spriteram.0"); // Sprites
- map(0x300000, 0x30007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x300000, 0x30007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x300000, 0x300007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x300068, 0x300069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
map(0x30006e, 0x30006f).rw(FUNC(cave_state::soundlatch_ack_r), FUNC(cave_state::sound_cmd_w)); // From Sound CPU
@@ -769,10 +797,10 @@ void cave_state::metmqstr_map(address_map &map)
map(0x908000, 0x90ffff).ram(); //
map(0x980000, 0x987fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
map(0x988000, 0x98ffff).ram(); //
- map(0xa80000, 0xa8007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0xa80000, 0xa8007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0xa80000, 0xa80007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0xa80068, 0xa80069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog?
- map(0xa8006c, 0xa8006d).r(FUNC(cave_state::soundflags_ack_r)).nopw(); // Communication
+ map(0xa8006c, 0xa8006d).r(FUNC(cave_state::soundflags_ack_r))/*.nopw()*/; // Communication
map(0xa8006e, 0xa8006f).rw(FUNC(cave_state::soundlatch_ack_r), FUNC(cave_state::sound_cmd_w)); // From Sound CPU
map(0xb00000, 0xb00005).rw(m_tilemap[2], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 2 Control
map(0xb80000, 0xb80005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
@@ -781,6 +809,8 @@ void cave_state::metmqstr_map(address_map &map)
map(0xc80002, 0xc80003).portr("IN1"); // Inputs + EEPROM
map(0xd00000, 0xd00000).w(FUNC(cave_state::metmqstr_eeprom_w)); // EEPROM
map(0xf00000, 0xf0ffff).ram().share("spriteram.0"); // Sprites
+ // 0xf00000-0xf07fff Sprite RAM
+ // 0xf08000-0xf0ffff Work RAM
}
@@ -859,44 +889,44 @@ void cave_state::ppsatan_out_w(offs_t offset, u16 data, u16 mem_mask)
void cave_state::ppsatan_map(address_map &map)
{
- map(0x000000, 0x03ffff).rom(); // ROM
- map(0x040000, 0x04ffff).ram(); // RAM
+ map(0x000000, 0x03ffff).rom(); // ROM
+ map(0x040000, 0x04ffff).ram(); // RAM
// Left Screen (Player 2)
- map(0x080000, 0x080005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer Control
- map(0x100000, 0x107fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer
-// map(0x180000, 0x1803ff).ram() // Palette (Tilemaps)
-// map(0x187800, 0x188fff).ram().w(m_palette[1], FUNC(palette_device::write16)).share("palette.1"); // Palette (Sprites)
- map(0x180000, 0x188fff).ram().w(m_palette[1], FUNC(palette_device::write16)).share("palette.1"); // Palette
- map(0x1c0000, 0x1c7fff).ram().share("spriteram.1"); // Sprites
- map(0x200000, 0x200001).portr("SYSTEM"); // DSW + (unused) EEPROM
- map(0x200000, 0x200001).w(FUNC(cave_state::ppsatan_out_w)); // Outputs + OKI banking
- map(0x200002, 0x200003).rw(FUNC(cave_state::ppsatan_touch_r<1>), FUNC(cave_state::ppsatan_eeprom_w)); // Touch Screen + (unused) EEPROM
- map(0x200004, 0x200005).rw(FUNC(cave_state::ppsatan_touch_r<0>), FUNC(cave_state::ppsatan_io_mux_w)); // Touch Screen
- map(0x200006, 0x200007).nopw(); // Lev. 2 IRQ Ack?
- map(0x2c0000, 0x2c007f).writeonly().share("videoregs.1"); // Video Regs
- map(0x2c0000, 0x2c0007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
- map(0x2c0068, 0x2c0069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
-
- map(0x300001, 0x300001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
+ map(0x080000, 0x080005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer Control
+ map(0x100000, 0x107fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer
+// map(0x180000, 0x1803ff).ram() // Palette (Tilemaps)
+// map(0x187800, 0x188fff).ram().w(m_palette[1], FUNC(palette_device::write16)).share("palette.1"); // Palette (Sprites)
+ map(0x180000, 0x188fff).ram().w(m_palette[1], FUNC(palette_device::write16)).share("palette.1"); // Palette
+ map(0x1c0000, 0x1c7fff).ram().share("spriteram.1"); // Sprites
+ map(0x200000, 0x200001).portr("SYSTEM"); // DSW + (unused) EEPROM
+ map(0x200000, 0x200001).w(FUNC(cave_state::ppsatan_out_w)); // Outputs + OKI banking
+ map(0x200002, 0x200003).rw(FUNC(cave_state::ppsatan_touch_r<1>), FUNC(cave_state::ppsatan_eeprom_w)); // Touch Screen + (unused) EEPROM
+ map(0x200004, 0x200005).rw(FUNC(cave_state::ppsatan_touch_r<0>), FUNC(cave_state::ppsatan_io_mux_w)); // Touch Screen
+ map(0x200006, 0x200007).nopw(); // Lev. 2 IRQ Ack?
+ map(0x2c0000, 0x2c007f).w(FUNC(cave_state::videoregs_w<1>)).share("videoregs.1"); // Video Regs
+ map(0x2c0000, 0x2c0007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
+ map(0x2c0068, 0x2c0069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
+
+ map(0x300001, 0x300001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
// Right Screen (Player 1)
- map(0x480000, 0x480005).rw(m_tilemap[2], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer Control
- map(0x500000, 0x507fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer
-// map(0x580000, 0x5803ff).ram() // Palette (Tilemaps)
-// map(0x587800, 0x588fff).ram().w(m_palette[2], FUNC(palette_device::write16)).share("palette.2"); // Palette (Sprites)
- map(0x580000, 0x588fff).ram().w(m_palette[2], FUNC(palette_device::write16)).share("palette.2"); // Palette
- map(0x5c0000, 0x5c7fff).ram().share("spriteram.2"); // Sprites
- map(0x6c0000, 0x6c007f).writeonly().share("videoregs.2"); // Video Regs
+ map(0x480000, 0x480005).rw(m_tilemap[2], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer Control
+ map(0x500000, 0x507fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer
+// map(0x580000, 0x5803ff).ram() // Palette (Tilemaps)
+// map(0x587800, 0x588fff).ram().w(m_palette[2], FUNC(palette_device::write16)).share("palette.2"); // Palette (Sprites)
+ map(0x580000, 0x588fff).ram().w(m_palette[2], FUNC(palette_device::write16)).share("palette.2"); // Palette
+ map(0x5c0000, 0x5c7fff).ram().share("spriteram.2"); // Sprites
+ map(0x6c0000, 0x6c007f).w(FUNC(cave_state::videoregs_w<2>)).share("videoregs.2"); // Video Regs
// Top Screen
- map(0x880000, 0x880005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer Control
- map(0x900000, 0x907fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer
-// map(0x980000, 0x9803ff).ram(); // Palette (Tilemaps)
-// map(0x987800, 0x988fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette (Sprites)
- map(0x980000, 0x988fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
- map(0x9c0000, 0x9c7fff).ram().share("spriteram.0"); // Sprites
- map(0xac0000, 0xac007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x880000, 0x880005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer Control
+ map(0x900000, 0x907fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer
+// map(0x980000, 0x9803ff).ram(); // Palette (Tilemaps)
+// map(0x987800, 0x988fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette (Sprites)
+ map(0x980000, 0x988fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
+ map(0x9c0000, 0x9c7fff).ram().share("spriteram.0"); // Sprites
+ map(0xac0000, 0xac007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
}
@@ -928,27 +958,27 @@ void cave_state::pwrinst2_vctrl_w(offs_t offset, u16 data, u16 mem_mask)
void cave_state::pwrinst2_map(address_map &map)
{
- map(0x000000, 0x1fffff).rom(); // ROM
- map(0x400000, 0x40ffff).ram(); // RAM
- map(0x500000, 0x500001).portr("IN0"); // Inputs
- map(0x500002, 0x500003).portr("IN1"); //
- map(0x600000, 0x6fffff).rom().region("user1", 0); // extra data ROM space
- map(0x700000, 0x700000).w(FUNC(cave_state::eeprom_w)); // EEPROM
- map(0x800000, 0x807fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer 2
- map(0x880000, 0x887fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
- map(0x900000, 0x907fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
- map(0x980000, 0x983fff).mirror(0x004000).m(m_tilemap[3], FUNC(tilemap038_device::vram_8x8_map)); // Layer 3
- map(0xa00000, 0xa0ffff).ram().share("spriteram.0"); // Sprites
- map(0xa10000, 0xa1ffff).ram(); // Sprites?
- map(0xa80000, 0xa8007f).ram().r(FUNC(cave_state::donpachi_videoregs_r)).share("videoregs.0"); // Video Regs
- map(0xb00000, 0xb00005).r(m_tilemap[2], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<2>)); // Layer 2 Control
- map(0xb80000, 0xb80005).r(m_tilemap[0], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<0>)); // Layer 0 Control
- map(0xc00000, 0xc00005).r(m_tilemap[1], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<1>)); // Layer 1 Control
- map(0xc80000, 0xc80005).r(m_tilemap[3], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<3>)); // Layer 3 Control
- map(0xd80000, 0xd80001).r(FUNC(cave_state::soundlatch_ack_r)); // ? From Sound CPU
- map(0xe00000, 0xe00001).w(FUNC(cave_state::sound_cmd_w)); // To Sound CPU
- map(0xe80000, 0xe80001).r(FUNC(cave_state::pwrinst2_eeprom_r)); // EEPROM
- map(0xf00000, 0xf04fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
+ map(0x000000, 0x1fffff).rom(); // ROM
+ map(0x400000, 0x40ffff).ram(); // RAM
+ map(0x500000, 0x500001).portr("IN0"); // Inputs
+ map(0x500002, 0x500003).portr("IN1"); //
+ map(0x600000, 0x6fffff).rom().region("user1", 0); // extra data ROM space
+ map(0x700000, 0x700000).w(FUNC(cave_state::eeprom_w)); // EEPROM
+ map(0x800000, 0x807fff).m(m_tilemap[2], FUNC(tilemap038_device::vram_map)); // Layer 2
+ map(0x880000, 0x887fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
+ map(0x900000, 0x907fff).m(m_tilemap[1], FUNC(tilemap038_device::vram_map)); // Layer 1
+ map(0x980000, 0x983fff).mirror(0x004000).m(m_tilemap[3], FUNC(tilemap038_device::vram_8x8_map)); // Layer 3
+ map(0xa00000, 0xa0ffff).ram().share("spriteram.0"); // Sprites
+ map(0xa10000, 0xa1ffff).ram(); // Sprites?
+ map(0xa80000, 0xa8007f).rw(FUNC(cave_state::donpachi_videoregs_r), FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
+ map(0xb00000, 0xb00005).r(m_tilemap[2], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<2>)); // Layer 2 Control
+ map(0xb80000, 0xb80005).r(m_tilemap[0], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<0>)); // Layer 0 Control
+ map(0xc00000, 0xc00005).r(m_tilemap[1], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<1>)); // Layer 1 Control
+ map(0xc80000, 0xc80005).r(m_tilemap[3], FUNC(tilemap038_device::vregs_r)).w(FUNC(cave_state::pwrinst2_vctrl_w<3>)); // Layer 3 Control
+ map(0xd80000, 0xd80001).r(FUNC(cave_state::soundlatch_ack_r)); // ? From Sound CPU
+ map(0xe00000, 0xe00001).w(FUNC(cave_state::sound_cmd_w)); // To Sound CPU
+ map(0xe80000, 0xe80001).r(FUNC(cave_state::pwrinst2_eeprom_r)); // EEPROM
+ map(0xf00000, 0xf04fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
}
@@ -984,7 +1014,7 @@ void cave_state::sailormn_map(address_map &map)
map(0xa00000, 0xa00005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0xa80000, 0xa80005).rw(m_tilemap[1], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 1 Control
map(0xb00000, 0xb00005).rw(m_tilemap[2], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 2 Control
- map(0xb80000, 0xb8007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0xb80000, 0xb8007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0xb80000, 0xb80007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause (bit 2 tested!)
map(0xb8006c, 0xb8006d).r(FUNC(cave_state::soundflags_ack_r)); // Communication
map(0xb8006e, 0xb8006f).r(FUNC(cave_state::soundlatch_ack_r)); // From Sound CPU
@@ -1006,7 +1036,7 @@ void cave_state::tekkencw_map(address_map &map)
map(0x400002, 0x400003).portr("IN1"); // Inputs
map(0x500000, 0x500005).w(m_tilemap[0], FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0x600000, 0x60ffff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
- map(0x700000, 0x70007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x700000, 0x70007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x700000, 0x700007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x700068, 0x700069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
map(0x800001, 0x800001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
@@ -1029,7 +1059,7 @@ void cave_state::tekkenbs_map(address_map &map)
map(0x500000, 0x500005).w(m_tilemap[0], FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0x600000, 0x600001).portr("IN0"); // Inputs + EEPROM + Hopper
map(0x600002, 0x600003).portr("IN1"); // Inputs
- map(0x700000, 0x70007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x700000, 0x70007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x700000, 0x700007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x700068, 0x700069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
map(0x800001, 0x800001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
@@ -1087,7 +1117,7 @@ void cave_state::tjumpman_map(address_map &map)
map(0x500000, 0x50ffff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
map(0x600000, 0x600001).portr("IN0"); // Inputs + EEPROM + Hopper
map(0x600002, 0x600003).portr("IN1"); // Inputs
- map(0x700000, 0x70007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x700000, 0x70007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x700000, 0x700007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x700068, 0x700069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
map(0x800001, 0x800001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
@@ -1119,7 +1149,7 @@ void cave_state::pacslot_map(address_map &map)
map(0x100000, 0x10ffff).ram().share("nvram"); // RAM (battery)
map(0x200000, 0x20ffff).ram().share("spriteram.0"); // Sprites
map(0x300000, 0x307fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
- map(0x400000, 0x40007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x400000, 0x40007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x400000, 0x400007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x400068, 0x400069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
map(0x500000, 0x500005).w(m_tilemap[0], FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
@@ -1148,7 +1178,7 @@ void cave_state::paceight_map(address_map &map)
map(0x500000, 0x500001).portr("IN0"); // Inputs + EEPROM + Hopper
map(0x500002, 0x500003).portr("IN1"); // Inputs
map(0x600000, 0x600005).w(m_tilemap[0], FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
- map(0x700000, 0x70007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x700000, 0x70007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x700000, 0x700007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x700068, 0x700069).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // Watchdog
map(0x800001, 0x800001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
@@ -1167,7 +1197,7 @@ void cave_state::uopoko_map(address_map &map)
map(0x300000, 0x300003).rw("ymz", FUNC(ymz280b_device::read), FUNC(ymz280b_device::write)).umask16(0x00ff); // YMZ280
map(0x400000, 0x40ffff).ram().share("spriteram.0"); // Sprites
map(0x500000, 0x507fff).m(m_tilemap[0], FUNC(tilemap038_device::vram_map)); // Layer 0
- map(0x600000, 0x60007f).writeonly().share("videoregs.0"); // Video Regs
+ map(0x600000, 0x60007f).w(FUNC(cave_state::videoregs_w<0>)).share("videoregs.0"); // Video Regs
map(0x600000, 0x600007).r(FUNC(cave_state::irq_cause_r)); // IRQ Cause
map(0x700000, 0x700005).rw(m_tilemap[0], FUNC(tilemap038_device::vregs_r), FUNC(tilemap038_device::vregs_w)); // Layer 0 Control
map(0x800000, 0x80ffff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette.0"); // Palette
@@ -1190,7 +1220,7 @@ template<int Mask>
void cave_state::z80_rombank_w(u8 data)
{
if (data & ~Mask)
- logerror("CPU #1 - PC %04X: Bank %02X\n", m_audiocpu->pc(), data);
+ logerror("%s: Bank %02X\n", machine().describe_context(), data);
m_z80bank->set_entry(data & Mask);
}
@@ -1243,8 +1273,8 @@ void cave_state::hotdogst_sound_portmap(address_map &map)
map.global_mask(0xff);
map(0x00, 0x00).w(FUNC(cave_state::z80_rombank_w<0x0f>)); // ROM bank
map(0x30, 0x30).r(FUNC(cave_state::soundlatch_lo_r)); // From Main CPU
- map(0x40, 0x40).r(FUNC(cave_state::soundlatch_hi_r)); //
- map(0x50, 0x51).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); //
+ map(0x40, 0x40).r(FUNC(cave_state::soundlatch_hi_r)); // ""
+ map(0x50, 0x51).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // YM2203
map(0x60, 0x60).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
map(0x70, 0x70).w(FUNC(cave_state::oki1_bank_w<0x3>)); // Samples bank
}
@@ -1292,7 +1322,7 @@ void cave_state::metmqstr_sound_portmap(address_map &map)
map(0x00, 0x00).w(FUNC(cave_state::z80_rombank_w<0x0f>)); // Rom Bank
map(0x20, 0x20).r(FUNC(cave_state::soundflags_r)); // Communication
map(0x30, 0x30).r(FUNC(cave_state::soundlatch_lo_r)); // From Main CPU
- map(0x40, 0x40).r(FUNC(cave_state::soundlatch_hi_r)); //
+ map(0x40, 0x40).r(FUNC(cave_state::soundlatch_hi_r)); // ""
map(0x50, 0x51).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); // YM2151
map(0x60, 0x60).w("oki1", FUNC(okim6295_device::write)); // M6295 #0
map(0x70, 0x70).w(FUNC(cave_state::oki1_bank_w<0x7>)); // Samples Bank #0
@@ -1315,14 +1345,14 @@ void cave_state::pwrinst2_sound_map(address_map &map)
void cave_state::pwrinst2_sound_portmap(address_map &map)
{
map.global_mask(0xff);
- map(0x00, 0x00).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
- map(0x08, 0x08).rw("oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); //
+ map(0x00, 0x00).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295 #0
+ map(0x08, 0x08).rw("oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295 #1
map(0x10, 0x17).w("nmk112", FUNC(nmk112_device::okibank_w)); // Samples bank
- map(0x40, 0x41).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); //
+ map(0x40, 0x41).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // YM2203
map(0x50, 0x50).w(FUNC(cave_state::soundlatch_ack_w)); // To Main CPU
// map(0x51, 0x51).nopw(); // ?? volume
map(0x60, 0x60).r(FUNC(cave_state::soundlatch_hi_r)); // From Main CPU
- map(0x70, 0x70).r(FUNC(cave_state::soundlatch_lo_r)); //
+ map(0x70, 0x70).r(FUNC(cave_state::soundlatch_lo_r)); // ""
map(0x80, 0x80).w(FUNC(cave_state::z80_rombank_w<0x07>)); // ROM bank
}
@@ -1345,7 +1375,7 @@ void cave_state::sailormn_sound_portmap(address_map &map)
map(0x10, 0x10).w(FUNC(cave_state::soundlatch_ack_w)); // To Main CPU
map(0x20, 0x20).r(FUNC(cave_state::soundflags_r)); // Communication
map(0x30, 0x30).r(FUNC(cave_state::soundlatch_lo_r)); // From Main CPU
- map(0x40, 0x40).r(FUNC(cave_state::soundlatch_hi_r)); //
+ map(0x40, 0x40).r(FUNC(cave_state::soundlatch_hi_r)); // ""
map(0x50, 0x51).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); // YM2151
map(0x60, 0x60).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295 #0
map(0x70, 0x70).w(FUNC(cave_state::oki1_bank_w<0xf>)); // Samples Bank #0
@@ -2386,13 +2416,17 @@ void cave_state::ppsatan(machine_config &config)
GFXDECODE(config, m_gfxdecode[1], m_palette[1], gfx_ppsatan_1);
GFXDECODE(config, m_gfxdecode[2], m_palette[2], gfx_ppsatan_2);
+ m_tilemap[0]->set_xoffs(2, 0);
+
TMAP038(config, m_tilemap[1]);
m_tilemap[1]->set_gfxdecode_tag(m_gfxdecode[1]);
m_tilemap[1]->set_gfx(0);
+ m_tilemap[1]->set_xoffs(1, 0);
TMAP038(config, m_tilemap[2]);
m_tilemap[2]->set_gfxdecode_tag(m_gfxdecode[2]);
m_tilemap[2]->set_gfx(0);
+ m_tilemap[2]->set_xoffs(0, -57);
m_palette[0]->set_entries(0x9000/2);
PALETTE(config, m_palette[1], palette_device::BLACK).set_format(palette_device::xGRB_555, 0x9000/2);
@@ -4820,7 +4854,7 @@ void cave_state::sailormn_unpack_tiles(int chip)
void cave_state::init_cave()
{
- m_spritetype[0] = 0; // Normal sprites
+ m_spritetype[0] = TYPE_ZOOM; // Normal sprites
m_kludge = 0;
m_time_vblank_irq = 100;
@@ -4876,7 +4910,7 @@ void cave_state::init_ddonpach()
init_cave();
ddp_unpack_sprites(0);
- m_spritetype[0] = 1; // "different" sprites (no zooming?)
+ m_spritetype[0] = TYPE_NOZOOM; // "different" sprites (no zooming?)
m_time_vblank_irq = 90;
/* 4bpp but Only first 16 colors are used in palette index for Layer 0, 1. */
@@ -4889,7 +4923,7 @@ void cave_state::init_donpachi()
init_cave();
ddp_unpack_sprites(0);
- m_spritetype[0] = 1; // "different" sprites (no zooming?)
+ m_spritetype[0] = TYPE_NOZOOM; // "different" sprites (no zooming?)
m_time_vblank_irq = 90;
}
@@ -4915,7 +4949,6 @@ void cave_state::init_gaia()
/* No EEPROM */
unpack_sprites(0);
- m_spritetype[0] = 2; // Normal sprites with different position handling
m_time_vblank_irq = 2000; /**/
}
@@ -4935,7 +4968,6 @@ void cave_state::init_hotdogst()
init_oki_bank(0);
unpack_sprites(0);
- m_spritetype[0] = 2; // Normal sprites with different position handling
m_time_vblank_irq = 2000; /**/
}
@@ -4958,7 +4990,6 @@ void cave_state::init_mazinger()
}
unpack_sprites(0);
- m_spritetype[0] = 2; // Normal sprites with different position handling
m_kludge = 3;
m_time_vblank_irq = 2100;
}
@@ -4972,7 +5003,6 @@ void cave_state::init_metmqstr()
init_oki_bank(1);
unpack_sprites(0);
- m_spritetype[0] = 2; // Normal sprites with different position handling
m_kludge = 3;
m_time_vblank_irq = 17376;
}
@@ -4985,7 +5015,6 @@ void cave_state::init_ppsatan()
unpack_sprites(1);
unpack_sprites(2);
- m_spritetype[0] = 2;
m_time_vblank_irq = 2000; /**/
m_ppsatan_io_mux = 0;
@@ -5015,7 +5044,7 @@ void cave_state::init_pwrinst2j()
}
unpack_sprites(0);
- m_spritetype[0] = 3;
+ m_spritetype[0] = TYPE_NOZOOM | TYPE_ISPWRINST2;
m_kludge = 4;
m_time_vblank_irq = 2000; /**/
}
@@ -5057,7 +5086,6 @@ void cave_state::init_sailormn()
sailormn_unpack_tiles(2);
unpack_sprites(0);
- m_spritetype[0] = 2; // Normal sprites with different position handling
m_kludge = 1;
m_time_vblank_irq = 2000;
@@ -5070,7 +5098,6 @@ void cave_state::init_tjumpman()
init_cave();
unpack_sprites(0);
- m_spritetype[0] = 2; // Normal sprites with different position handling
m_kludge = 3;
m_time_vblank_irq = 17376;
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index e8c1b6fb35d..d9eb765e244 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -1785,7 +1785,7 @@ READ8_MEMBER( cbm2_state::cia_pa_r )
uint8_t data = 0;
// IEEE-488
- data |= m_ieee1->read(space, 0);
+ data |= m_ieee1->read();
// user port
data &= m_user->d1_r();
@@ -1815,7 +1815,7 @@ WRITE8_MEMBER( cbm2_state::cia_pa_w )
*/
// IEEE-488
- m_ieee1->write(space, 0, data);
+ m_ieee1->write(data);
// user port
m_user->d1_w(data);
diff --git a/src/mame/drivers/cbuster.cpp b/src/mame/drivers/cbuster.cpp
index 54b1c83bbf6..0e03b336784 100644
--- a/src/mame/drivers/cbuster.cpp
+++ b/src/mame/drivers/cbuster.cpp
@@ -286,8 +286,6 @@ void cbuster_state::twocrude(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x20);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -301,8 +299,6 @@ void cbuster_state::twocrude(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x30);
m_deco_tilegen[1]->set_pf2_col_bank(0x40);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/ccastles.cpp b/src/mame/drivers/ccastles.cpp
index d054eba255d..0650a3f9463 100644
--- a/src/mame/drivers/ccastles.cpp
+++ b/src/mame/drivers/ccastles.cpp
@@ -282,14 +282,14 @@ WRITE_LINE_MEMBER(ccastles_state::nvram_store_w)
READ8_MEMBER(ccastles_state::nvram_r)
{
- return (m_nvram_4b->read(space, offset) & 0x0f) | (m_nvram_4a->read(space, offset) << 4);
+ return (m_nvram_4b->read(space, offset) & 0x0f) | (m_nvram_4a->read(space,offset) << 4);
}
WRITE8_MEMBER(ccastles_state::nvram_w)
{
- m_nvram_4b->write(space, offset, data);
- m_nvram_4a->write(space, offset, data >> 4);
+ m_nvram_4b->write(offset, data);
+ m_nvram_4a->write(offset, data >> 4);
}
diff --git a/src/mame/drivers/centiped.cpp b/src/mame/drivers/centiped.cpp
index 02a1e5668af..a6377f50a2a 100644
--- a/src/mame/drivers/centiped.cpp
+++ b/src/mame/drivers/centiped.cpp
@@ -457,7 +457,7 @@ MACHINE_RESET_MEMBER(centiped_state,centiped)
m_prg_bank = 0;
if (m_earom.found())
- earom_control_w(machine().dummy_space(), 0, 0);
+ earom_control_w(0);
}
@@ -663,7 +663,7 @@ WRITE8_MEMBER(centiped_state::earom_write)
m_earom->set_data(data);
}
-WRITE8_MEMBER(centiped_state::earom_control_w)
+void centiped_state::earom_control_w(uint8_t data)
{
// CK = DB0, C1 = /DB1, C2 = DB2, CS1 = DB3, /CS2 = GND
m_earom->set_control(BIT(data, 3), 1, !BIT(data, 1), BIT(data, 2));
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 5068d265c6e..f4814903de4 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -124,17 +124,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_state::exctsccr_sound_irq)
*
*************************************/
-WRITE_LINE_MEMBER(champbas_state::mcu_switch_w)
-{
- // switch shared RAM between CPU and MCU bus
- m_alpha_8201->bus_dir_w(state);
-}
-
-WRITE_LINE_MEMBER(champbas_state::mcu_start_w)
-{
- m_alpha_8201->mcu_start_w(state);
-}
-
/* champbja another protection */
READ8_MEMBER(champbas_state::champbja_protection_r)
{
@@ -532,8 +521,8 @@ void champbas_state::talbot(machine_config &config)
m_mainlatch->q_out_cb<3>().set(FUNC(champbas_state::flipscreen_w));
m_mainlatch->q_out_cb<4>().set_nop(); // no palettebank
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
- m_mainlatch->q_out_cb<6>().set(FUNC(champbas_state::mcu_start_w));
- m_mainlatch->q_out_cb<7>().set(FUNC(champbas_state::mcu_switch_w));
+ m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
+ m_mainlatch->q_out_cb<7>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w));
ALPHA_8201(config, m_alpha_8201, XTAL(18'432'000)/6/8);
config.set_perfect_quantum("alpha_8201:mcu");
@@ -614,8 +603,8 @@ void champbas_state::champbasj(machine_config &config)
/* basic machine hardware */
m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbasj_map);
- m_mainlatch->q_out_cb<6>().set(FUNC(champbas_state::mcu_start_w));
- m_mainlatch->q_out_cb<7>().set(FUNC(champbas_state::mcu_switch_w));
+ m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
+ m_mainlatch->q_out_cb<7>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w));
ALPHA_8201(config, m_alpha_8201, XTAL(18'432'000)/6/8); // note: 8302 rom on champbb2 (same device!)
config.set_perfect_quantum("alpha_8201:mcu");
@@ -676,8 +665,8 @@ void exctsccr_state::exctsccr(machine_config &config)
m_mainlatch->q_out_cb<3>().set(FUNC(exctsccr_state::flipscreen_w));
m_mainlatch->q_out_cb<4>().set_nop(); // no palettebank
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
- m_mainlatch->q_out_cb<6>().set(FUNC(exctsccr_state::mcu_start_w));
- m_mainlatch->q_out_cb<7>().set(FUNC(exctsccr_state::mcu_switch_w));
+ m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
+ m_mainlatch->q_out_cb<7>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w));
Z80(config, m_audiocpu, XTAL(14'318'181)/4);
m_audiocpu->set_addrmap(AS_PROGRAM, &exctsccr_state::exctsccr_sound_map);
@@ -740,8 +729,8 @@ void exctsccr_state::exctsccrb(machine_config &config)
m_mainlatch->q_out_cb<3>().set(FUNC(exctsccr_state::flipscreen_w));
m_mainlatch->q_out_cb<4>().set_nop(); // no palettebank
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
- m_mainlatch->q_out_cb<6>().set(FUNC(exctsccr_state::mcu_start_w));
- m_mainlatch->q_out_cb<7>().set(FUNC(exctsccr_state::mcu_switch_w));
+ m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
+ m_mainlatch->q_out_cb<7>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w));
Z80(config, m_audiocpu, XTAL(18'432'000)/6);
m_audiocpu->set_addrmap(AS_PROGRAM, &exctsccr_state::champbas_sound_map);
diff --git a/src/mame/drivers/changela.cpp b/src/mame/drivers/changela.cpp
index cec4195b595..9365cb1deea 100644
--- a/src/mame/drivers/changela.cpp
+++ b/src/mame/drivers/changela.cpp
@@ -33,7 +33,7 @@ WRITE8_MEMBER(changela_state::mcu_w)
{
m_mcu_in = data;
if (!BIT(m_port_c_out, 2))
- m_mcu->pa_w(space, 0, data);
+ m_mcu->pa_w(data);
}
@@ -54,7 +54,7 @@ WRITE8_MEMBER(changela_state::changela_68705_port_c_w)
/* PC2 is connected to the /OE input of the LS374 */
if (BIT(data, 2))
- m_mcu->pa_w(space, 0, BIT(data, 2) ? 0xff : m_mcu_in);
+ m_mcu->pa_w(BIT(data, 2) ? 0xff : m_mcu_in);
m_port_c_out = data;
}
@@ -135,7 +135,7 @@ READ8_MEMBER(changela_state::changela_2d_r)
WRITE_LINE_MEMBER(changela_state::mcu_pc_0_w)
{
- m_mcu->pc_w(machine().dummy_space(), 0, 0xfe | state);
+ m_mcu->pc_w(0xfe | state);
}
WRITE_LINE_MEMBER(changela_state::collision_reset_0_w)
diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp
index 7df1d9f149d..56a184d00ca 100644
--- a/src/mame/drivers/cninja.cpp
+++ b/src/mame/drivers/cninja.cpp
@@ -665,17 +665,6 @@ static const gfx_layout tilelayout =
64*8
};
-static const gfx_layout tilelayout_8bpp =
-{
- 16,16,
- 4096,
- 8,
- { 0x100000*8+8, 0x100000*8, 0x40000*8+8, 0x40000*8, 0xc0000*8+8, 0xc0000*8, 8, 0 },
- { STEP8(16*8*2,1), STEP8(0,1) },
- { STEP16(0,8*2) },
- 64*8
-};
-
static GFXDECODE_START( gfx_cninja )
GFXDECODE_ENTRY( "chars", 0, charlayout, 0, 32 ) /* Characters 8x8 */
GFXDECODE_ENTRY( "tiles1", 0, tilelayout, 0, 32 ) /* Tiles 16x16 */
@@ -683,14 +672,6 @@ static GFXDECODE_START( gfx_cninja )
GFXDECODE_ENTRY( "sprites1", 0, tilelayout, 768, 32 ) /* Sprites 16x16 */
GFXDECODE_END
-static GFXDECODE_START( gfx_robocop2 )
- GFXDECODE_ENTRY( "chars", 0, charlayout, 0, 32 ) /* Characters 8x8 */
- GFXDECODE_ENTRY( "tiles1", 0, tilelayout, 0, 32 ) /* Tiles 16x16 */
- GFXDECODE_ENTRY( "tiles2", 0, tilelayout, 512, 64 ) /* Tiles 16x16 */
- GFXDECODE_ENTRY( "sprites1", 0, tilelayout, 768, 32 ) /* Sprites 16x16 */
- GFXDECODE_ENTRY( "tiles2", 0, tilelayout_8bpp, 512, 1 ) /* Tiles 16x16 */
-GFXDECODE_END
-
static GFXDECODE_START( gfx_mutantf )
GFXDECODE_ENTRY( "chars", 0, charlayout, 0, 64 ) /* Characters 8x8 */
GFXDECODE_ENTRY( "tiles1", 0, tilelayout, 0, 64 ) /* Tiles 16x16 */
@@ -736,6 +717,11 @@ DECO16IC_BANK_CB_MEMBER(cninja_state::mutantf_2_bank_callback)
return ((bank >> 5) & 0x1) << 14;
}
+// palette bits are not effected
+u16 cninja_state::robocop2_mix_callback(u16 p, u16 p2)
+{
+ return (p & 0x70f) | ((p2 & 0xf) << 4);
+}
DECOSPR_PRIORITY_CB_MEMBER(cninja_state::pri_callback)
{
@@ -793,8 +779,6 @@ void cninja_state::cninja(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -806,8 +790,6 @@ void cninja_state::cninja(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -880,8 +862,6 @@ void cninja_state::stoneage(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -893,8 +873,6 @@ void cninja_state::stoneage(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -975,8 +953,6 @@ void cninja_state::cninjabl(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -988,8 +964,6 @@ void cninja_state::cninjabl(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -1045,8 +1019,6 @@ void cninja_state::edrandy(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1058,8 +1030,6 @@ void cninja_state::edrandy(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -1106,8 +1076,7 @@ void cninja_state::robocop2(machine_config &config)
h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL(32'220'000) / 8));
audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map);
- audiocpu.add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused
- audiocpu.add_route(ALL_OUTPUTS, "rspeaker", 0);
+ audiocpu.add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused
deco_irq_device &irq(DECO_IRQ(config, "irq", 0));
irq.set_screen_tag(m_screen);
@@ -1124,7 +1093,7 @@ void cninja_state::robocop2(machine_config &config)
MCFG_MACHINE_START_OVERRIDE(cninja_state,robocop2)
MCFG_MACHINE_RESET_OVERRIDE(cninja_state,robocop2)
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_robocop2);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
BUFFERED_SPRITERAM16(config, m_spriteram[0]);
@@ -1132,8 +1101,6 @@ void cninja_state::robocop2(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1146,14 +1113,13 @@ void cninja_state::robocop2(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
m_deco_tilegen[1]->set_pf2_col_mask(0x0f);
m_deco_tilegen[1]->set_bank1_callback(FUNC(cninja_state::robocop2_bank_callback));
m_deco_tilegen[1]->set_bank2_callback(FUNC(cninja_state::robocop2_bank_callback));
+ m_deco_tilegen[1]->set_mix_callback(FUNC(cninja_state::robocop2_mix_callback));
m_deco_tilegen[1]->set_pf12_8x8_bank(0);
m_deco_tilegen[1]->set_pf12_16x16_bank(2);
m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode);
@@ -1171,26 +1137,19 @@ void cninja_state::robocop2(machine_config &config)
m_ioprot->set_use_magic_read_address_xor(true);
/* sound hardware */
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "mono").front_center();
- ym2203_device &ym1(YM2203(config, "ym1", XTAL(32'220'000) / 8));
- ym1.add_route(ALL_OUTPUTS, "lspeaker", 0.60);
- ym1.add_route(ALL_OUTPUTS, "rspeaker", 0.60);
+ YM2203(config, "ym1", XTAL(32'220'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.60);
ym2151_device &ym2(YM2151(config, "ym2", XTAL(32'220'000) / 9));
ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
ym2.port_write_handler().set(FUNC(cninja_state::sound_bankswitch_w));
- ym2.add_route(0, "lspeaker", 0.45);
- ym2.add_route(1, "rspeaker", 0.45);
+ ym2.add_route(0, "mono", 0.45);
+ ym2.add_route(1, "mono", 0.45);
- okim6295_device &oki1(OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH));
- oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.75);
- oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.75);
+ OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
- OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH);
- m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.60);
- m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.60);
+ OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60);
}
@@ -1203,8 +1162,7 @@ void cninja_state::mutantf(machine_config &config)
h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL(32'220'000) / 8));
audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map_mutantf);
- audiocpu.add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused
- audiocpu.add_route(ALL_OUTPUTS, "rspeaker", 0);
+ audiocpu.add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -1224,8 +1182,6 @@ void cninja_state::mutantf(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x30);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1239,8 +1195,6 @@ void cninja_state::mutantf(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x20);
m_deco_tilegen[1]->set_pf2_col_bank(0x40);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -1266,22 +1220,17 @@ void cninja_state::mutantf(machine_config &config)
m_ioprot->soundlatch_irq_cb().set_inputline(m_audiocpu, 0);
/* sound hardware */
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "mono").front_center();
ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL(32'220'000) / 9));
ymsnd.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
ymsnd.port_write_handler().set(FUNC(cninja_state::sound_bankswitch_w));
- ymsnd.add_route(0, "lspeaker", 0.45);
- ymsnd.add_route(1, "rspeaker", 0.45);
+ ymsnd.add_route(0, "mono", 0.45);
+ ymsnd.add_route(1, "mono", 0.45);
- okim6295_device &oki1(OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH));
- oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.75);
- oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.75);
+ OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
- OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH);
- m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.60);
- m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.60);
+ OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60);
}
/**********************************************************************************/
diff --git a/src/mame/drivers/compc.cpp b/src/mame/drivers/compc.cpp
index 77563b5fb26..b5bfce05faa 100644
--- a/src/mame/drivers/compc.cpp
+++ b/src/mame/drivers/compc.cpp
@@ -98,7 +98,7 @@ READ8_MEMBER(compc_state::pio_r)
switch (offset)
{
case 0:
- data = m_keyboard->read(space, 0);
+ data = m_keyboard->read();
break;
case 1:
data = m_portb;
@@ -146,7 +146,7 @@ READ8_MEMBER(compc_state::pioiii_r)
switch (offset)
{
case 0:
- data = m_keyboard->read(space, 0);
+ data = m_keyboard->read();
break;
case 1:
data = m_portb;
diff --git a/src/mame/drivers/compuchess.cpp b/src/mame/drivers/compuchess.cpp
index 7ea300bc805..c83e642d0aa 100644
--- a/src/mame/drivers/compuchess.cpp
+++ b/src/mame/drivers/compuchess.cpp
@@ -368,18 +368,20 @@ void cmpchess_state::mk1(machine_config &config)
cmpchess(config);
/* basic machine hardware */
- m_maincpu->set_clock(2000000); // JS&A version measured 2.18MHz on average
- subdevice<f3853_device>("smi")->set_clock(2000000);
+ m_maincpu->set_clock(2200000); // JS&A version measured 2.18MHz on average
+ subdevice<f3853_device>("smi")->set_clock(2200000);
config.set_default_layout(layout_novag_mk1);
}
void cmpchess_state::cnc(machine_config &config)
{
- mk1(config);
+ cmpchess(config);
/* basic machine hardware */
m_maincpu->set_addrmap(AS_IO, &cmpchess_state::cnc_io);
+ m_maincpu->set_clock(2000000); // LC circuit, measured 2MHz
+ subdevice<f3853_device>("smi")->set_clock(2000000);
config.set_default_layout(layout_cncchess);
diff --git a/src/mame/drivers/comx35.cpp b/src/mame/drivers/comx35.cpp
index 787e06cbcf2..e5a76dd6d9d 100644
--- a/src/mame/drivers/comx35.cpp
+++ b/src/mame/drivers/comx35.cpp
@@ -266,7 +266,7 @@ READ8_MEMBER( comx35_state::io_r )
if (offset == 3)
{
- data = m_kbe->read(space, 0);
+ data = m_kbe->read();
}
return data;
diff --git a/src/mame/drivers/conic_cchess2.cpp b/src/mame/drivers/conic_cchess2.cpp
new file mode 100644
index 00000000000..dcb90d16121
--- /dev/null
+++ b/src/mame/drivers/conic_cchess2.cpp
@@ -0,0 +1,285 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+// thanks-to:bataais
+/******************************************************************************
+
+Conic Computer Chess (model 07012), also sold under the same name by
+Hanimex (model HMG 1200) and Westrak (model CC 1). It's also known as
+Tracer Chess, this title is from an advertisement flyer, the actual chess
+computer was simply named Computer Chess.
+
+The chessboard sensors aren't buttons or magnets, but 64 jacks. There is
+a metal plug under each chesspiece. From MAME's perspective, it works the
+same as a magnet sensorboard.
+
+After the player's move, the user needs to press Enter. This does not apply
+to the computer's move.
+
+Hardware notes:
+- Synertek 6504 @ ~1MHz
+- 2*Motorola MC6821P PIA
+- 4KB ROM(AMI), 1KB RAM(2*Synertek 1024x4)
+- beeper, 8*8 leds, plug board
+
+BTANB:
+- Learn button still works when in modify-mode
+
+******************************************************************************/
+
+#include "emu.h"
+#include "cpu/m6502/m6504.h"
+#include "machine/6821pia.h"
+#include "machine/sensorboard.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/pwm.h"
+#include "speaker.h"
+
+// internal artwork
+#include "conic_cchess2.lh" // clickable
+
+
+namespace {
+
+class cchess2_state : public driver_device
+{
+public:
+ cchess2_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_pia(*this, "pia%u", 0),
+ m_board(*this, "board"),
+ m_display(*this, "display"),
+ m_dac(*this, "dac"),
+ m_inputs(*this, "IN.%u", 0)
+ { }
+
+ // machine configs
+ void cncchess2(machine_config &config);
+
+ // assume that RESET button is tied to 6504 reset pin
+ DECLARE_INPUT_CHANGED_MEMBER(reset_button) { m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); }
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ // devices/pointers
+ required_device<cpu_device> m_maincpu;
+ required_device_array<pia6821_device, 2> m_pia;
+ required_device<sensorboard_device> m_board;
+ required_device<pwm_display_device> m_display;
+ required_device<dac_bit_interface> m_dac;
+ required_ioport_array<8> m_inputs;
+
+ // address maps
+ void main_map(address_map &map);
+
+ // I/O handlers
+ void update_display();
+ void update_dac();
+ DECLARE_WRITE8_MEMBER(pia0_pa_w);
+ DECLARE_WRITE8_MEMBER(pia0_pb_w);
+ DECLARE_READ8_MEMBER(pia1_pa_r);
+ DECLARE_READ8_MEMBER(pia1_pb_r);
+ DECLARE_WRITE8_MEMBER(pia1_pb_w);
+
+ u8 m_inp_mux = 0;
+ u8 m_led_data = 0;
+ int m_dac_on = 0;
+};
+
+void cchess2_state::machine_start()
+{
+ save_item(NAME(m_inp_mux));
+ save_item(NAME(m_led_data));
+ save_item(NAME(m_dac_on));
+}
+
+
+
+/******************************************************************************
+ I/O
+******************************************************************************/
+
+void cchess2_state::update_display()
+{
+ m_display->matrix(m_inp_mux, m_led_data);
+}
+
+void cchess2_state::update_dac()
+{
+ m_dac->write(m_dac_on & BIT(m_inp_mux, 1));
+}
+
+WRITE8_MEMBER(cchess2_state::pia0_pa_w)
+{
+ // d0-d7: input mux/led select
+ // d1: dac data
+ m_inp_mux = data;
+ update_display();
+ update_dac();
+}
+
+WRITE8_MEMBER(cchess2_state::pia0_pb_w)
+{
+ // d0-d7: led data
+ m_led_data = data;
+ update_display();
+}
+
+READ8_MEMBER(cchess2_state::pia1_pa_r)
+{
+ u8 data = 0;
+
+ // d0-d7: chessboard sensors
+ for (int i = 0; i < 8; i++)
+ if (BIT(m_inp_mux, i))
+ data |= m_board->read_rank(i);
+
+ return ~data;
+}
+
+READ8_MEMBER(cchess2_state::pia1_pb_r)
+{
+ u8 data = 0;
+
+ // d0-d3: multiplexed inputs
+ for (int i = 0; i < 8; i++)
+ if (BIT(m_inp_mux, i))
+ data |= m_inputs[i]->read();
+
+ return data;
+}
+
+WRITE8_MEMBER(cchess2_state::pia1_pb_w)
+{
+ // d7: dac on
+ m_dac_on = BIT(data, 7);
+ update_dac();
+}
+
+
+
+/******************************************************************************
+ Address Maps
+******************************************************************************/
+
+void cchess2_state::main_map(address_map &map)
+{
+ map.global_mask(0x1fff);
+ map(0x0000, 0x03ff).ram();
+ map(0x0a00, 0x0a03).mirror(0x00fc).rw(m_pia[0], FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0x0c00, 0x0c03).mirror(0x00fc).rw(m_pia[1], FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0x1000, 0x1fff).rom();
+}
+
+
+
+/******************************************************************************
+ Input Ports
+******************************************************************************/
+
+static INPUT_PORTS_START( cncchess2 )
+ PORT_START("IN.0")
+ PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_CONFNAME( 0x0c, 0x08, "Mode" )
+ PORT_CONFSETTING( 0x04, "Modify" )
+ PORT_CONFSETTING( 0x08, "Play" )
+
+ PORT_START("IN.1")
+ PORT_CONFNAME( 0x03, 0x02, "Color" )
+ PORT_CONFSETTING( 0x01, "Black" ) // from the bottom
+ PORT_CONFSETTING( 0x02, "White" )
+ PORT_BIT(0x0c, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN.2")
+ PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN.3")
+ PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN.4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Learn")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("6 / White King")
+
+ PORT_START("IN.5")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("5 / White Queen")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("4 / White Rook")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("3 / White Bishop")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("2 / White Knight")
+
+ PORT_START("IN.6")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("1 / White Pawn")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("7 / Black Pawn")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("8 / Black Knight")
+
+ PORT_START("IN.7")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_NAME("9 / Black Bishop")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_NAME("10 / Black Rook")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("11 / Black Queen")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("12 / Black King")
+
+ PORT_START("RESET")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, cchess2_state, reset_button, 0) PORT_NAME("Reset")
+INPUT_PORTS_END
+
+
+
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
+
+void cchess2_state::cncchess2(machine_config &config)
+{
+ /* basic machine hardware */
+ M6504(config, m_maincpu, 1000000); // approximation, no XTAL
+ m_maincpu->set_addrmap(AS_PROGRAM, &cchess2_state::main_map);
+
+ PIA6821(config, m_pia[0], 0);
+ m_pia[0]->writepa_handler().set(FUNC(cchess2_state::pia0_pa_w));
+ m_pia[0]->writepb_handler().set(FUNC(cchess2_state::pia0_pb_w));
+
+ PIA6821(config, m_pia[1], 0);
+ m_pia[1]->readpa_handler().set(FUNC(cchess2_state::pia1_pa_r));
+ m_pia[1]->readpb_handler().set(FUNC(cchess2_state::pia1_pb_r));
+ m_pia[1]->writepb_handler().set(FUNC(cchess2_state::pia1_pb_w));
+
+ SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
+ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
+ m_board->set_delay(attotime::from_msec(150));
+
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(8, 8);
+ config.set_default_layout(layout_conic_cchess2);
+
+ /* sound hardware */
+ SPEAKER(config, "speaker").front_center();
+ DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+}
+
+
+
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
+
+ROM_START( cncchess2 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD("c11485.u2", 0x1000, 0x1000, CRC(b179d536) SHA1(0b1f9c247a4a3e2ccbf8d3ae5efa62b8938f572f) ) // AMI 2332
+ROM_END
+
+} // anonymous namespace
+
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
+
+// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS
+CONS( 1980, cncchess2, 0, 0, cncchess2, cncchess2, cchess2_state, empty_init, "Conic", "Computer Chess (Conic, model 7012)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp
index 833abd94ee4..413f2111bed 100644
--- a/src/mame/drivers/cps1.cpp
+++ b/src/mame/drivers/cps1.cpp
@@ -858,8 +858,8 @@ static INPUT_PORTS_START( cps1_4players )
INPUT_PORTS_END
/* CPS1 games with 2 players and 6 buttons each */
-static INPUT_PORTS_START( cps1_6b)
- PORT_INCLUDE( cps1_3b)
+static INPUT_PORTS_START( cps1_6b )
+ PORT_INCLUDE( cps1_3b )
PORT_MODIFY("IN1")
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Jab Punch") PORT_PLAYER(1)
@@ -2957,6 +2957,90 @@ static INPUT_PORTS_START( pang3b )
PORT_DIPUNUSED( 0x80, 0x80 )
INPUT_PORTS_END
+// Note: if you have service mode stuck then start button doesn't get recognized on title screen.
+static INPUT_PORTS_START( gulunpa )
+ PORT_INCLUDE( cps1_2b )
+
+ PORT_START("DSWA")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW(A):1,2,3")
+ PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
+ PORT_DIPNAME( 0x18, 0x18, "Coin slots" ) PORT_DIPLOCATION("SW(A):4,5")
+ PORT_DIPSETTING( 0x18, "1, Common" )
+ PORT_DIPSETTING( 0x00, "2, Common" )
+ PORT_DIPSETTING( 0x10, "2, Common (duplicate 1)" )
+ PORT_DIPSETTING( 0x08, "2, Common (duplicate 2)" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(A):6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(A):7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(A):8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START("DSWB")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW(B):1,2,3")
+ PORT_DIPSETTING( 0x07, "1 Easiest" )
+ PORT_DIPSETTING( 0x06, "2 Very Easy" )
+ PORT_DIPSETTING( 0x05, "3 Easy" )
+ PORT_DIPSETTING( 0x04, "4 Medium" )
+ PORT_DIPSETTING( 0x03, "5 Medium Hard" )
+ PORT_DIPSETTING( 0x02, "6 Hard" )
+ PORT_DIPSETTING( 0x01, "7 Very Hard" )
+ PORT_DIPSETTING( 0x00, "8 Hardest" )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(B):4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(B):5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ // flipping this on any screen causes scroll1 layer left edge to be filled with tile 0x0014
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(B):6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(B):7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(B):8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START("DSWC")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(C):1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(C):2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(C):3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW(C):4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW(C):5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW(C):6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW(C):7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, "Game Mode") PORT_DIPLOCATION("SW(C):8")
+ PORT_DIPSETTING( 0x80, "Game" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Test ) )
+INPUT_PORTS_END
+
+
/* Needs further checking */
static INPUT_PORTS_START( megaman )
PORT_INCLUDE( cps1_3b )
@@ -13084,6 +13168,28 @@ ROM_START( pokonyan )
*/
ROM_END
+ROM_START( gulunpa )
+ ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "26", 0x00000, 0x020000, CRC(f30ffa29) SHA1(9e70daf4229485dc5700b074dba55839c7357351) )
+ ROM_LOAD16_BYTE( "30", 0x00001, 0x020000, CRC(5d35f737) SHA1(47b6bfa6eaa512684e12c23162243d1a21cb1a7a) )
+
+ ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
+ ROM_LOAD( "9", 0x00000, 0x08000, CRC(15afd06f) SHA1(1a4ff3e11e55266e7c93743b6564c226eaaba142) )
+ ROM_CONTINUE( 0x10000, 0x08000 )
+
+ ROM_REGION( 0x200000, "gfx", ROMREGION_ERASE00 )
+ // bit 1 always high on even bytes?
+ ROM_LOAD64_WORD( "1", 0x000000, 0x080000, BAD_DUMP CRC(3cf0546b) SHA1(1071b3c83425774cfaea7c61b1d85fd4fa8b6dbb) )
+ ROM_LOAD64_WORD( "2", 0x000002, 0x080000, CRC(ad033bce) SHA1(b37b1d341e61502aa4213b049b14974fab8a0445) )
+ ROM_LOAD64_WORD( "3", 0x000004, 0x080000, CRC(36c3951a) SHA1(74edaca2c78dd6a304ea702091a9f0b7f6036e41) )
+ ROM_LOAD64_WORD( "4", 0x000006, 0x080000, CRC(ff0cb826) SHA1(fec7833652e6789e886a1ec7b4680a608ddbbe20) )
+// ROM_COPY( "gfx", 0x000000, 0x200000, 0x200000 )
+
+ ROM_REGION( 0x40000, "oki", ROMREGION_ERASEFF ) /* Samples */
+ ROM_LOAD( "18", 0x00000, 0x20000, CRC(9997a34f) SHA1(8e107d6413836c48fc57e4a9b89ae99a9e381e8b) )
+ ROM_LOAD( "19", 0x20000, 0x20000, CRC(e95270ac) SHA1(dc684abfa1ea276a00ec541ab8f3f9f131375faa) )
+ROM_END
+
/* Home 'CPS Changer' Unit - For MESS */
/* B-Board 91635B-2 */
@@ -13742,6 +13848,7 @@ GAME( 1993, slammastu, slammast, qsound, slammast, cps_state, init_slammas
GAME( 1993, mbomberj, slammast, qsound, slammast, cps_state, init_slammast, ROT0, "Capcom", "Muscle Bomber: The Body Explosion (Japan 930713)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, mbombrd, 0, qsound, slammast, cps_state, init_slammast, ROT0, "Capcom", "Muscle Bomber Duo: Ultimate Team Battle (World 931206)", MACHINE_SUPPORTS_SAVE ) // "ETC"
GAME( 1993, mbombrdj, mbombrd, qsound, slammast, cps_state, init_slammast, ROT0, "Capcom", "Muscle Bomber Duo: Heat Up Warriors (Japan 931206)", MACHINE_SUPPORTS_SAVE )
+GAME( 1993, gulunpa, 0, cps1_10MHz, gulunpa, cps_state, init_cps1, ROT0, "Capcom", "Gulun.Pa! (Japan 931220 L)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // has bad gfx rom, assume Capcom from logo in gfx bank, unknown board origin
GAME( 1994, pnickj, 0, cps1_12MHz, pnickj, cps_state, init_cps1, ROT0, "Capcom", "Pnickies (Japan 940608)", MACHINE_SUPPORTS_SAVE ) // Puyo Puyo puzzlegame concept licensed from Compile, this game is by Capcom
GAME( 1995, qtono2j, 0, cps1_12MHz, qtono2j, cps_state, init_cps1, ROT0, "Capcom", "Quiz Tonosama no Yabou 2: Zenkoku-ban (Japan 950123)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, megaman, 0, cps1_12MHz, megaman, cps_state, init_cps1, ROT0, "Capcom", "Mega Man: The Power Battle (CPS1, USA 951006)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/crystal.cpp b/src/mame/drivers/crystal.cpp
index 49633034fa0..f3b560bbdca 100644
--- a/src/mame/drivers/crystal.cpp
+++ b/src/mame/drivers/crystal.cpp
@@ -455,28 +455,28 @@ static INPUT_PORTS_START( crystal )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
PORT_START("DSW")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Pause ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Pause ) ) PORT_DIPLOCATION("DSW:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("DSW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Test ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Test ) ) PORT_DIPLOCATION("DSW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
diff --git a/src/mame/drivers/csplayh5.cpp b/src/mame/drivers/csplayh5.cpp
index 1949de7f079..52a4809eaa7 100644
--- a/src/mame/drivers/csplayh5.cpp
+++ b/src/mame/drivers/csplayh5.cpp
@@ -525,7 +525,7 @@ ROM_START( sengomjk )
DISK_IMAGE_READONLY( "nb8002", 0, SHA1(d3502496526e62a877f12dccc27b32ae33d3704d) )
ROM_REGION( 0x040000, "gal", ROMREGION_ERASE00 )
- ROM_LOAD( "gal16v8b.jed", 0x000000, 0x000368, CRC(6b21325e) SHA1(cf894f591aa7e0b2680eda8fbbb591397cd170ab) )
+ ROM_LOAD( "gal16v8b.bin", 0x000000, 0x000117, CRC(9f0dec43) SHA1(d836e564da496c3049e16f025daf362cced413d4) )
ROM_END
ROM_START( junai )
@@ -817,7 +817,7 @@ ROM_START( nuretemi )
DISK_IMAGE_READONLY( "nb8016", 0, SHA1(607d9f390265da3f0c50753d0ea32257b12e8c08) )
ROM_REGION( 0x1000, "gal", ROMREGION_ERASE00 )
- ROM_LOAD( "gal16v8b.jed", 0x000000, 0x000369, CRC(39f3edc7) SHA1(be07e8133cf2afa4f806d902d8d971d523326dd5) )
+ ROM_LOAD( "gal16v8b.bin", 0x000000, 0x000117, CRC(865de327) SHA1(a97374ee765443d9da6919d0e226108c062f7942) )
ROM_END
ROM_START( tsuwaku )
@@ -901,7 +901,7 @@ ROM_START( konhaji )
DISK_IMAGE_READONLY( "nb8019", 0, SHA1(f59ac1587009d7d15618549dc60cbd24c263a95f) )
ROM_REGION( 0x040000, "gal", ROMREGION_ERASE00 )
- ROM_LOAD( "gal16v8b.jed", 0x000000, 0x000368, CRC(6b21325e) SHA1(cf894f591aa7e0b2680eda8fbbb591397cd170ab) )
+ ROM_LOAD( "gal16v8b.bin", 0x000000, 0x000117, CRC(9f0dec43) SHA1(d836e564da496c3049e16f025daf362cced413d4) )
ROM_END
@@ -913,34 +913,34 @@ ROM_END
***************************************************************************/
// 1995
-GAME( 1995, csplayh1, 0, csplayh5, csplayh5, csplayh5_state, init_csplayh1, ROT0, "Sphinx/AV Japan/Astro System Japan", "Super CD Dai8dan Mahjong Hanafuda Cosplay Tengoku (Japan)", MACHINE_NOT_WORKING )
+GAME( 1995, csplayh1, 0, csplayh5, csplayh5, csplayh5_state, init_csplayh1, ROT0, "Sphinx/AV Japan/Astro System Japan", "Super CD Dai8dan Mahjong Hanafuda Cosplay Tengoku (Japan)", MACHINE_NOT_WORKING )
-GAME( 1998, nichidvd, 0, csplayh5, csplayh5, csplayh5_state, empty_init, ROT0, "Nichibutsu", "Nichibutsu High Rate DVD BIOS", MACHINE_IS_BIOS_ROOT )
+GAME( 1998, nichidvd, 0, csplayh5, csplayh5, csplayh5_state, empty_init, ROT0, "Nichibutsu", "Nichibutsu High Rate DVD BIOS", MACHINE_IS_BIOS_ROOT )
// 1998
-/* 01 */ GAME( 1998, mjgalpri, nichidvd, csplayh5, csplayh5, csplayh5_state, init_mjgalpri, ROT0, "Nichibutsu/Just&Just", "Mahjong Gal-pri - World Gal-con Grandprix (Japan)", MACHINE_NOT_WORKING )
-/* 02 */ GAME( 1998, sengomjk, nichidvd, csplayh5, csplayh5, csplayh5_state, init_sengomjk, ROT0, "Nichibutsu/Just&Just", "Sengoku Mahjong Kurenai Otome-tai (Japan)", MACHINE_NOT_WORKING )
-/* 03 */ GAME( 1998, junai, nichidvd, csplayh5, csplayh5, csplayh5_state, init_junai, ROT0, "Nichibutsu/eic", "Junai - Manatsu no First Kiss (Japan)", MACHINE_NOT_WORKING )
-/* 04 */ GAME( 1998, csplayh5, nichidvd, csplayh5, csplayh5, csplayh5_state, init_csplayh5, ROT0, "Nichibutsu", "Mahjong Hanafuda Cosplay Tengoku 5 (Japan)", MACHINE_NOT_WORKING )
-/* 05 */ GAME( 1998, junai2, nichidvd, csplayh5, csplayh5, csplayh5_state, init_junai2, ROT0, "Nichibutsu/eic", "Junai 2 - White Love Story (Japan)", MACHINE_NOT_WORKING )
+/* 01 */ GAME( 1998, mjgalpri, nichidvd, csplayh5, csplayh5, csplayh5_state, init_mjgalpri, ROT0, "Nichibutsu/Just&Just", "Mahjong Gal-pri - World Gal-con Grandprix (Japan)", MACHINE_NOT_WORKING )
+/* 02 */ GAME( 1998, sengomjk, nichidvd, csplayh5, csplayh5, csplayh5_state, init_sengomjk, ROT0, "Nichibutsu/Just&Just", "Sengoku Mahjong Kurenai Otome-tai (Japan)", MACHINE_NOT_WORKING )
+/* 03 */ GAME( 1998, junai, nichidvd, csplayh5, csplayh5, csplayh5_state, init_junai, ROT0, "Nichibutsu/eic", "Junai - Manatsu no First Kiss (Japan)", MACHINE_NOT_WORKING )
+/* 04 */ GAME( 1998, csplayh5, nichidvd, csplayh5, csplayh5, csplayh5_state, init_csplayh5, ROT0, "Nichibutsu", "Mahjong Hanafuda Cosplay Tengoku 5 (Japan)", MACHINE_NOT_WORKING )
+/* 05 */ GAME( 1998, junai2, nichidvd, csplayh5, csplayh5, csplayh5_state, init_junai2, ROT0, "Nichibutsu/eic", "Junai 2 - White Love Story (Japan)", MACHINE_NOT_WORKING )
/* 06 */ GAME( 1998, mogitate, nichidvd, csplayh5, csplayh5, csplayh5_state, init_mogitate, ROT0, "Nichibutsu/Just&Just/NVS/Astro System/AV Japan", "Mahjong Mogitate (Japan)", MACHINE_NOT_WORKING )
// 1999
-/* 07 */ GAME( 1999, mjmania, nichidvd, csplayh5, csplayh5, csplayh5_state, init_mjmania, ROT0, "Sphinx/Just&Just", "Mahjong Mania - Kairakukan e Youkoso (Japan)", MACHINE_NOT_WORKING )
-/* 08 */ GAME( 1999, renaimj, nichidvd, csplayh5, csplayh5, csplayh5_state, init_renaimj, ROT0, "Nichibutsu/eic", "Renai Mahjong Idol Gakuen (Japan)", MACHINE_NOT_WORKING )
-/* 09 */ GAME( 1999, bikiniko, nichidvd, csplayh5, csplayh5, csplayh5_state, init_bikiniko, ROT0, "Nichibutsu/eic", "BiKiNikko - Okinawa de Ippai Shichaimashita (Japan)", MACHINE_NOT_WORKING )
-/* 10 */ GAME( 1999, csplayh6, nichidvd, csplayh5, csplayh5, csplayh5_state, init_csplayh6, ROT0, "Nichibutsu/eic", "Mahjong Hanafuda Cosplay Tengoku 6 - Junai-hen (Japan)", MACHINE_NOT_WORKING )
+/* 07 */ GAME( 1999, mjmania, nichidvd, csplayh5, csplayh5, csplayh5_state, init_mjmania, ROT0, "Sphinx/Just&Just", "Mahjong Mania - Kairakukan e Youkoso (Japan)", MACHINE_NOT_WORKING )
+/* 08 */ GAME( 1999, renaimj, nichidvd, csplayh5, csplayh5, csplayh5_state, init_renaimj, ROT0, "Nichibutsu/eic", "Renai Mahjong Idol Gakuen (Japan)", MACHINE_NOT_WORKING )
+/* 09 */ GAME( 1999, bikiniko, nichidvd, csplayh5, csplayh5, csplayh5_state, init_bikiniko, ROT0, "Nichibutsu/eic", "BiKiNikko - Okinawa de Ippai Shichaimashita (Japan)", MACHINE_NOT_WORKING )
+/* 10 */ GAME( 1999, csplayh6, nichidvd, csplayh5, csplayh5, csplayh5_state, init_csplayh6, ROT0, "Nichibutsu/eic", "Mahjong Hanafuda Cosplay Tengoku 6 - Junai-hen (Japan)", MACHINE_NOT_WORKING )
/* 11 */ GAME( 1999, thenanpa, nichidvd, csplayh5, csplayh5, csplayh5_state, init_thenanpa, ROT0, "Nichibutsu/Love Factory/eic", "The Nanpa (Japan)", MACHINE_NOT_WORKING )
-/* 12 */ GAME( 1999, pokoachu, nichidvd, csplayh5, csplayh5, csplayh5_state, init_pokoachu, ROT0, "Nichibutsu/eic", "PokoaPoka Onsen de CHU - Bijin 3 Shimai ni Kiotsukete! (Japan)", MACHINE_NOT_WORKING )
-/* 13 */ GAME( 1999, csplayh7, nichidvd, csplayh5, csplayh5, csplayh5_state, init_csplayh7, ROT0, "Nichibutsu/eic", "Cosplay Tengoku 7 - Super Kogal Ranking (Japan)", MACHINE_NOT_WORKING )
-/* 14 */ GAME( 1999, aimode, nichidvd, csplayh5, csplayh5, csplayh5_state, init_aimode, ROT0, "Nichibutsu/eic", "Ai-mode - Pet Shiiku (Japan)", MACHINE_NOT_WORKING )
+/* 12 */ GAME( 1999, pokoachu, nichidvd, csplayh5, csplayh5, csplayh5_state, init_pokoachu, ROT0, "Nichibutsu/eic", "PokoaPoka Onsen de CHU - Bijin 3 Shimai ni Kiotsukete! (Japan)", MACHINE_NOT_WORKING )
+/* 13 */ GAME( 1999, csplayh7, nichidvd, csplayh5, csplayh5, csplayh5_state, init_csplayh7, ROT0, "Nichibutsu/eic", "Cosplay Tengoku 7 - Super Kogal Ranking (Japan)", MACHINE_NOT_WORKING )
+/* 14 */ GAME( 1999, aimode, nichidvd, csplayh5, csplayh5, csplayh5_state, init_aimode, ROT0, "Nichibutsu/eic", "Ai-mode - Pet Shiiku (Japan)", MACHINE_NOT_WORKING )
// 2000
-/* 15 */ GAME( 2000, fuudol, nichidvd, csplayh5, csplayh5, csplayh5_state, init_fuudol, ROT0, "Nichibutsu/eic", "Fuudol (Japan)", MACHINE_NOT_WORKING )
-/* 16 */ GAME( 2000, nuretemi, nichidvd, csplayh5, csplayh5, csplayh5_state, init_nuretemi, ROT0, "Nichibutsu/Love Factory", "Nurete Mitaino... - Net Idol Hen (Japan)", MACHINE_NOT_WORKING )
+/* 15 */ GAME( 2000, fuudol, nichidvd, csplayh5, csplayh5, csplayh5_state, init_fuudol, ROT0, "Nichibutsu/eic", "Fuudol (Japan)", MACHINE_NOT_WORKING )
+/* 16 */ GAME( 2000, nuretemi, nichidvd, csplayh5, csplayh5, csplayh5_state, init_nuretemi, ROT0, "Nichibutsu/Love Factory", "Nurete Mitaino... - Net Idol Hen (Japan)", MACHINE_NOT_WORKING )
/* 17 */ GAME( 2000, tsuwaku, nichidvd, csplayh5, csplayh5, csplayh5_state, init_tsuwaku, ROT0, "Nichibutsu/Love Factory/Just&Just", "Tsuugakuro no Yuuwaku (Japan)", MACHINE_NOT_WORKING )
-/* 18 */ GAME( 2000, torarech, nichidvd, csplayh5, csplayh5, csplayh5_state, init_torarech, ROT0, "Nichibutsu/Love Factory/M Friend", "Torarechattano - AV Kantoku Hen (Japan)", MACHINE_NOT_WORKING )
-/* sp */ GAME( 2000, nichisel, nichidvd, csplayh5, csplayh5, csplayh5_state, init_nichisel, ROT0, "Nichibutsu", "DVD Select (Japan)", MACHINE_NOT_WORKING )
+/* 18 */ GAME( 2000, torarech, nichidvd, csplayh5, csplayh5, csplayh5_state, init_torarech, ROT0, "Nichibutsu/Love Factory/M Friend", "Torarechattano - AV Kantoku Hen (Japan)", MACHINE_NOT_WORKING )
+/* sp */ GAME( 2000, nichisel, nichidvd, csplayh5, csplayh5, csplayh5_state, init_nichisel, ROT0, "Nichibutsu", "DVD Select (Japan)", MACHINE_NOT_WORKING )
// 2001
/* 19 */ GAME( 2001, konhaji, nichidvd, csplayh5, csplayh5, csplayh5_state, init_konhaji, ROT0, "Nichibutsu/Love Factory", "Konnano Hajimete! (Japan)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/cv1k.cpp b/src/mame/drivers/cv1k.cpp
index 528a4b946d2..404d08354bd 100644
--- a/src/mame/drivers/cv1k.cpp
+++ b/src/mame/drivers/cv1k.cpp
@@ -260,7 +260,7 @@ uint32_t cv1k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
READ64_MEMBER( cv1k_state::flash_port_e_r )
{
- return ((m_serflash->flash_ready_r(space, offset) ? 0x20 : 0x00)) | 0xdf;
+ return ((m_serflash->flash_ready_r() ? 0x20 : 0x00)) | 0xdf;
}
@@ -281,7 +281,7 @@ READ8_MEMBER( cv1k_state::flash_io_r )
return 0xff;
case 0x00:
- return m_serflash->flash_io_r(space,offset);
+ return m_serflash->flash_io_r();
}
}
@@ -295,15 +295,15 @@ WRITE8_MEMBER( cv1k_state::flash_io_w )
break;
case 0x00:
- m_serflash->flash_data_w(space, offset, data);
+ m_serflash->flash_data_w( data);
break;
case 0x01:
- m_serflash->flash_cmd_w(space, offset, data);
+ m_serflash->flash_cmd_w(data);
break;
case 0x2:
- m_serflash->flash_addr_w(space, offset, data);
+ m_serflash->flash_addr_w(data);
break;
}
}
@@ -332,7 +332,7 @@ WRITE8_MEMBER( cv1k_state::serial_rtc_eeprom_w )
m_eepromout->write(data, 0xff);
break;
case 0x03:
- m_serflash->flash_enab_w(space,offset,data);
+ m_serflash->flash_enab_w(data);
break;
default:
diff --git a/src/mame/drivers/cvs.cpp b/src/mame/drivers/cvs.cpp
index 1b9a274067c..10f86635b53 100644
--- a/src/mame/drivers/cvs.cpp
+++ b/src/mame/drivers/cvs.cpp
@@ -159,7 +159,7 @@ READ8_MEMBER(cvs_state::cvs_s2636_0_or_character_ram_r)
if (m_s2650_flag)
return m_character_ram[(0 * 0x800) | 0x400 | m_character_ram_page_start | offset];
else
- return m_s2636[0]->read_data(space, offset);
+ return m_s2636[0]->read_data(offset);
}
WRITE8_MEMBER(cvs_state::cvs_s2636_0_or_character_ram_w)
@@ -171,7 +171,7 @@ WRITE8_MEMBER(cvs_state::cvs_s2636_0_or_character_ram_w)
m_gfxdecode->gfx(1)->mark_dirty((offset / 8) % 256);
}
else
- m_s2636[0]->write_data(space, offset, data);
+ m_s2636[0]->write_data(offset, data);
}
@@ -180,7 +180,7 @@ READ8_MEMBER(cvs_state::cvs_s2636_1_or_character_ram_r)
if (m_s2650_flag)
return m_character_ram[(1 * 0x800) | 0x400 | m_character_ram_page_start | offset];
else
- return m_s2636[1]->read_data(space, offset);
+ return m_s2636[1]->read_data(offset);
}
WRITE8_MEMBER(cvs_state::cvs_s2636_1_or_character_ram_w)
@@ -192,7 +192,7 @@ WRITE8_MEMBER(cvs_state::cvs_s2636_1_or_character_ram_w)
m_gfxdecode->gfx(1)->mark_dirty((offset / 8) % 256);
}
else
- m_s2636[1]->write_data(space, offset, data);
+ m_s2636[1]->write_data(offset, data);
}
@@ -201,7 +201,7 @@ READ8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_r)
if (m_s2650_flag)
return m_character_ram[(2 * 0x800) | 0x400 | m_character_ram_page_start | offset];
else
- return m_s2636[2]->read_data(space, offset);
+ return m_s2636[2]->read_data(offset);
}
WRITE8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_w)
@@ -213,7 +213,7 @@ WRITE8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_w)
m_gfxdecode->gfx(1)->mark_dirty((offset / 8) % 256);
}
else
- m_s2636[2]->write_data(space, offset, data);
+ m_s2636[2]->write_data(offset, data);
}
@@ -226,7 +226,7 @@ WRITE8_MEMBER(cvs_state::cvs_s2636_2_or_character_ram_w)
INTERRUPT_GEN_MEMBER(cvs_state::cvs_main_cpu_interrupt)
{
- device.execute().pulse_input_line_and_vector(0, 0x03, device.execute().minimum_quantum_time());
+ m_maincpu->pulse_input_line(0, m_maincpu->minimum_quantum_time());
cvs_scroll_stars();
}
@@ -234,9 +234,7 @@ INTERRUPT_GEN_MEMBER(cvs_state::cvs_main_cpu_interrupt)
WRITE_LINE_MEMBER(cvs_state::cvs_slave_cpu_interrupt)
{
- m_audiocpu->set_input_line_vector(0, 0x03); // S2650
- //m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
- m_audiocpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
+ m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -973,16 +971,18 @@ void cvs_state::cvs(machine_config &config)
m_maincpu->set_vblank_int("screen", FUNC(cvs_state::cvs_main_cpu_interrupt));
m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));
m_maincpu->flag_handler().set(FUNC(cvs_state::write_s2650_flag));
+ m_maincpu->intack_handler().set_constant(0x03);
S2650(config, m_audiocpu, XTAL(14'318'181)/16);
m_audiocpu->set_addrmap(AS_PROGRAM, &cvs_state::cvs_dac_cpu_map);
+ m_audiocpu->intack_handler().set([this] { m_audiocpu->set_input_line(0, CLEAR_LINE); return 0x03; });
/* doesn't look like it is used at all */
- //MCFG_S2650_SENSE_INPUT(READLINE(*this, cvs_state, cvs_393hz_clock_r))
+ //m_audiocpu->sense_handler().set(FUNC(cvs_state::cvs_393hz_clock_r));
S2650(config, m_speechcpu, XTAL(14'318'181)/16);
m_speechcpu->set_addrmap(AS_PROGRAM, &cvs_state::cvs_speech_cpu_map);
/* romclk is much more probable, 393 Hz results in timing issues */
- //MCFG_S2650_SENSE_INPUT(READLINE(*this, cvs_state, cvs_393hz_clock_r))
+ //m_speechcpu->sense_handler().set(FUNC(cvs_state::cvs_393hz_clock_r));
m_speechcpu->sense_handler().set("tms", FUNC(tms5110_device::romclk_hack_r));
/* video hardware */
diff --git a/src/mame/drivers/cz101.cpp b/src/mame/drivers/cz101.cpp
index 0e71bf6aeaa..f21ba712804 100644
--- a/src/mame/drivers/cz101.cpp
+++ b/src/mame/drivers/cz101.cpp
@@ -392,6 +392,8 @@ void cz101_state::cz101(machine_config &config)
m_hd44780->set_pixel_update_cb(FUNC(cz101_state::lcd_pixel_update));
config.set_default_layout(layout_cz101);
+
+ //UPD933(config, "music", 8.96_MHz_XTAL / 2);
}
diff --git a/src/mame/drivers/darkseal.cpp b/src/mame/drivers/darkseal.cpp
index f96d2f78420..cf4bbb84db2 100644
--- a/src/mame/drivers/darkseal.cpp
+++ b/src/mame/drivers/darkseal.cpp
@@ -162,31 +162,20 @@ INPUT_PORTS_END
static const gfx_layout charlayout =
{
8,8, /* 8*8 chars */
- 4096,
+ RGN_FRAC(1,2),
4, /* 4 bits per pixel */
- { 0x00000*8, 0x10000*8, 0x8000*8, 0x18000*8 },
+ { 8, 0, RGN_FRAC(1,2)+8, RGN_FRAC(1,2) },
{ STEP8(0,1) },
- { STEP8(0,8) },
- 8*8 /* every char takes 8 consecutive bytes */
+ { STEP8(0,8*2) },
+ 8*8*2 /* every char takes 8 consecutive bytes */
};
static const gfx_layout seallayout =
{
16,16,
- 4096,
+ RGN_FRAC(1,2),
4,
- { 8, 0, 0x40000*8+8, 0x40000*8 },
- { STEP8(16*8*2,1), STEP8(0,1) },
- { STEP16(0,8*2) },
- 64*8
-};
-
-static const gfx_layout seallayout2 =
-{
- 16,16,
- 4096*2,
- 4,
- { 8, 0, 0x80000*8+8, 0x80000*8 },
+ { 8, 0, RGN_FRAC(1,2)+8, RGN_FRAC(1,2) },
{ STEP8(16*8*2,1), STEP8(0,1) },
{ STEP16(0,8*2) },
64*8
@@ -196,7 +185,7 @@ static GFXDECODE_START( gfx_darkseal )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 ) /* Characters 8x8 */
GFXDECODE_ENTRY( "gfx2", 0, seallayout, 768, 16 ) /* Tiles 16x16 */
GFXDECODE_ENTRY( "gfx3", 0, seallayout, 1024, 16 ) /* Tiles 16x16 */
- GFXDECODE_ENTRY( "gfx4", 0, seallayout2, 256, 32 ) /* Sprites 16x16 */
+ GFXDECODE_ENTRY( "gfx4", 0, seallayout, 256, 32 ) /* Sprites 16x16 */
GFXDECODE_END
/******************************************************************************/
@@ -230,8 +219,6 @@ void darkseal_state::darkseal(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x64);
m_deco_tilegen[0]->set_pf2_size(DECO_64x64); // both these tilemaps need to be twice the y size of usual!
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x00);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -243,8 +230,6 @@ void darkseal_state::darkseal(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x00);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -288,8 +273,8 @@ ROM_START( darkseal )
ROM_LOAD( "fz_06-1.j15", 0x00000, 0x10000, CRC(c4828a6d) SHA1(fbfd0c85730bbe18401879cd68c19aaec9d482d8) )
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "fz_02.j1", 0x000000, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
- ROM_LOAD( "fz_03.j2", 0x010000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
+ ROM_LOAD16_BYTE( "fz_02.j1", 0x000001, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
+ ROM_LOAD16_BYTE( "fz_03.j2", 0x000000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
ROM_REGION( 0x080000, "gfx2", 0 )
ROM_LOAD( "mac-03.h3", 0x000000, 0x80000, CRC(9996f3dc) SHA1(fffd9ecfe142a0c7c3c9c521778ff9c55ea8b225) ) /* tiles 1 */
@@ -319,8 +304,8 @@ ROM_START( darkseal1 )
ROM_LOAD( "fz_06-1.j15", 0x00000, 0x10000, CRC(c4828a6d) SHA1(fbfd0c85730bbe18401879cd68c19aaec9d482d8) )
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "fz_02-1.j1", 0x000000, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
- ROM_LOAD( "fz_03-1.j2", 0x010000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
+ ROM_LOAD16_BYTE( "fz_02-1.j1", 0x000001, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
+ ROM_LOAD16_BYTE( "fz_03-1.j2", 0x000000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
ROM_REGION( 0x080000, "gfx2", 0 )
ROM_LOAD( "mac-03.h3", 0x000000, 0x80000, CRC(9996f3dc) SHA1(fffd9ecfe142a0c7c3c9c521778ff9c55ea8b225) ) /* tiles 1 */
@@ -350,8 +335,8 @@ ROM_START( darksealj )
ROM_LOAD( "fz_06-1.j15", 0x00000, 0x10000, CRC(c4828a6d) SHA1(fbfd0c85730bbe18401879cd68c19aaec9d482d8) )
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "fz_02.j1", 0x000000, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
- ROM_LOAD( "fz_03.j2", 0x010000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
+ ROM_LOAD16_BYTE( "fz_02.j1", 0x000001, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
+ ROM_LOAD16_BYTE( "fz_03.j2", 0x000000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
ROM_REGION( 0x080000, "gfx2", 0 )
ROM_LOAD( "mac-03.h3", 0x000000, 0x80000, CRC(9996f3dc) SHA1(fffd9ecfe142a0c7c3c9c521778ff9c55ea8b225) ) /* tiles 1 */
@@ -381,8 +366,8 @@ ROM_START( gatedoom )
ROM_LOAD( "fz_06-1.j15", 0x00000, 0x10000, CRC(c4828a6d) SHA1(fbfd0c85730bbe18401879cd68c19aaec9d482d8) )
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "fz_02.j1", 0x000000, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
- ROM_LOAD( "fz_03.j2", 0x010000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
+ ROM_LOAD16_BYTE( "fz_02.j1", 0x000001, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
+ ROM_LOAD16_BYTE( "fz_03.j2", 0x000000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
ROM_REGION( 0x080000, "gfx2", 0 )
ROM_LOAD( "mac-03.h3", 0x000000, 0x80000, CRC(9996f3dc) SHA1(fffd9ecfe142a0c7c3c9c521778ff9c55ea8b225) ) /* tiles 1 */
@@ -412,8 +397,8 @@ ROM_START( gatedoom1 )
ROM_LOAD( "fz_06-1.j15", 0x00000, 0x10000, CRC(c4828a6d) SHA1(fbfd0c85730bbe18401879cd68c19aaec9d482d8) )
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "fz_02.j1", 0x000000, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
- ROM_LOAD( "fz_03.j2", 0x010000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
+ ROM_LOAD16_BYTE( "fz_02.j1", 0x000001, 0x10000, CRC(3c9c3012) SHA1(086c2123725d4aa32838c0b6c82317d9c789c465) ) /* chars */
+ ROM_LOAD16_BYTE( "fz_03.j2", 0x000000, 0x10000, CRC(264b90ed) SHA1(0bb1557673107c2d732a9374d5601a6eaf229473) )
ROM_REGION( 0x080000, "gfx2", 0 )
ROM_LOAD( "mac-03.h3", 0x000000, 0x80000, CRC(9996f3dc) SHA1(fffd9ecfe142a0c7c3c9c521778ff9c55ea8b225) ) /* tiles 1 */
diff --git a/src/mame/drivers/dassault.cpp b/src/mame/drivers/dassault.cpp
index 0097d2fe67d..5b53a00c76b 100644
--- a/src/mame/drivers/dassault.cpp
+++ b/src/mame/drivers/dassault.cpp
@@ -559,8 +559,6 @@ void dassault_state::dassault(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0);
m_deco_tilegen[0]->set_pf2_col_bank(16);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -574,8 +572,6 @@ void dassault_state::dassault(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0);
m_deco_tilegen[1]->set_pf2_col_bank(16);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/dblewing.cpp b/src/mame/drivers/dblewing.cpp
index a70ff83430e..e23eeac735a 100644
--- a/src/mame/drivers/dblewing.cpp
+++ b/src/mame/drivers/dblewing.cpp
@@ -370,8 +370,6 @@ void dblewing_state::dblewing(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp
index 84fbad2680b..9b1da5bd6fb 100644
--- a/src/mame/drivers/ddragon.cpp
+++ b/src/mame/drivers/ddragon.cpp
@@ -233,7 +233,7 @@ WRITE8_MEMBER(darktowr_state::darktowr_mcu_bank_w)
if (offset == 0x1400 || offset == 0)
{
uint8_t const value(bitswap<8>(data, 0, 1, 2, 3, 4, 5, 6, 7));
- m_mcu->pb_w(space, 0, value);
+ m_mcu->pb_w(value);
logerror("MCU PORT 1 -> %04x (from %04x)\n", value, data);
}
}
diff --git a/src/mame/drivers/ddz.cpp b/src/mame/drivers/ddz.cpp
index f19c7ab7904..d0ca35c8dc2 100644
--- a/src/mame/drivers/ddz.cpp
+++ b/src/mame/drivers/ddz.cpp
@@ -145,8 +145,34 @@ ROM_START( ddz )
ROM_LOAD("ddz.003.rom", 0x800000, 0x400000, CRC(61c9b5c9) SHA1(0438417398403456a1c49408881797a94aa86f49) )
ROM_END
-
-ROM_START( crzclass ) // PCB marked MAH-JONG
+/* "Zhaoji Fengdou" PCB
+ ______________________________________________________________
+ | _________ ____________________ |
+ __| HD74HC245P |ROM1 H28F320BDJ-TTL80 |
+ |__ RAM3 ________ _________ |____________________| |
+ |__ M K4S641632K-UC60 HD74HC245P ____________________ |
+ |__ A |________| _________ |ROM2 H28F320BDJ-TTL80|
+ |__ H HD74HC245P |____________________||
+ |__ - XTAL _________ ____________________ |
+ |__ J ___________ 14. HD74HC245P |ROM3 H28F320BDJ-TTL80|
+ |__ O |VRenderZero| 318 ________ |____________________||
+ |__ N |MagicEyes | MHz HD74HC00P ____________________ |
+ |__ G |EISC | ________ |ROM4 - EMPTY ||
+ |__ |___________| |Unknown| |____________________||
+ | |
+ | RAM1 ________ RAM2 ________ _________ _____ |
+ | K4S641632K-UC60 K4S641632K-UC60 | Unknown| |Unkn| |
+ | |________| |________| | | |____| LED |
+ | ________ |________| o |
+ __| ULN2003AN __ |
+ | | | |
+ |__ ULN2003AN-> | | ____ |
+ | |_| |K1| |
+ |__ |__| |
+ | _____ ___ JAMMA _____ Switch |
+ |______| |_|_| | |_|_|_|_|_|_|_|_|_|_|_|_| |_________|
+*/
+ROM_START( crzclass )
ROM_REGION32_LE( 0x1000000, "ipl", ROMREGION_ERASEFF )
ROM_REGION( 0x1000000, "enc_data", ROMREGION_ERASEFF )
@@ -168,6 +194,5 @@ void ddz_state::init_ddz()
}
}
-GAME( 200?, ddz, 0, ddz, ddz, ddz_state, init_ddz, ROT0, "IGS?", "Dou Di Zhu", MACHINE_IS_SKELETON )
-GAME( 200?, crzclass, 0, ddz, ddz, ddz_state, init_ddz, ROT0, "TJF", "Zhaoji Fengdou", MACHINE_IS_SKELETON ) // 'Crazy Class'
-
+GAME( 200?, ddz, 0, ddz, ddz, ddz_state, init_ddz, ROT0, "IGS?", "Dou Di Zhu", MACHINE_IS_SKELETON )
+GAME( 200?, crzclass, 0, ddz, ddz, ddz_state, init_ddz, ROT0, "TJF", "Zhaoji Fengdou", MACHINE_IS_SKELETON ) // 'Crazy Class'
diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp
index a909e74d073..7cedf39b5ea 100644
--- a/src/mame/drivers/dec8.cpp
+++ b/src/mame/drivers/dec8.cpp
@@ -250,7 +250,7 @@ WRITE8_MEMBER(dec8_state::dec8_bank_w)
}
/* Used by Ghostbusters, Meikyuu Hunter G & Gondomania */
-WRITE8_MEMBER(dec8_state::ghostb_bank_w)
+void dec8_state::ghostb_bank_w(uint8_t data)
{
/* Bit 0: SECCLR - acknowledge interrupt from I8751
Bit 1: NMI enable/disable
@@ -1874,7 +1874,7 @@ void dec8_state::machine_reset()
// reset clears LS273 latch, which disables NMI
if (m_nmigate.found())
- ghostb_bank_w(machine().dummy_space(), 0, 0);
+ ghostb_bank_w(0);
}
@@ -3564,6 +3564,9 @@ ROM_START( cobracom )
ROM_LOAD( "el09.9d", 0x20000, 0x08000, CRC(1fae5be7) SHA1(be6e090b0b82648b385d9b6d11775f3ff40f0af3) )
ROM_CONTINUE( 0x60000, 0x08000 )
+ ROM_REGION( 0x0200, "proms", 0 )
+ ROM_LOAD( "eh15.12f", 0x0000, 0x0200, CRC(279e540c) SHA1(9e5e707da9f7c403c63d77fa378f22da9906d4e5) )
+
ROM_REGION( 0x0200, "plds", 0 )
ROM_LOAD( "pt-0.16h", 0x0000, 0x0117, CRC(add5074f) SHA1(352d984ba4d50c437ee9e5d8e8d00b0da6b3b8f3) )
ROM_END
@@ -3598,6 +3601,9 @@ ROM_START( cobracoma )
ROM_LOAD( "el09.9d", 0x20000, 0x08000, CRC(1fae5be7) SHA1(be6e090b0b82648b385d9b6d11775f3ff40f0af3) )
ROM_CONTINUE( 0x60000, 0x08000 )
+ ROM_REGION( 0x0200, "proms", 0 )
+ ROM_LOAD( "eh15.12f", 0x0000, 0x0200, CRC(279e540c) SHA1(9e5e707da9f7c403c63d77fa378f22da9906d4e5) )
+
ROM_REGION( 0x0200, "plds", 0 )
ROM_LOAD( "pt-0.16h", 0x0000, 0x0117, CRC(add5074f) SHA1(352d984ba4d50c437ee9e5d8e8d00b0da6b3b8f3) )
ROM_END
@@ -3632,6 +3638,9 @@ ROM_START( cobracomb )
ROM_LOAD( "el09.9d", 0x20000, 0x08000, CRC(1fae5be7) SHA1(be6e090b0b82648b385d9b6d11775f3ff40f0af3) )
ROM_CONTINUE( 0x60000, 0x08000 )
+ ROM_REGION( 0x0200, "proms", 0 )
+ ROM_LOAD( "eh15.12f", 0x0000, 0x0200, CRC(279e540c) SHA1(9e5e707da9f7c403c63d77fa378f22da9906d4e5) )
+
ROM_REGION( 0x0200, "plds", 0 )
ROM_LOAD( "pt-0.16h", 0x0000, 0x0117, CRC(add5074f) SHA1(352d984ba4d50c437ee9e5d8e8d00b0da6b3b8f3) )
ROM_END
@@ -3666,10 +3675,56 @@ ROM_START( cobracomj )
ROM_LOAD( "eh09.9d", 0x20000, 0x08000, CRC(1fae5be7) SHA1(be6e090b0b82648b385d9b6d11775f3ff40f0af3) )
ROM_CONTINUE( 0x60000, 0x08000 )
+ ROM_REGION( 0x0200, "proms", 0 )
+ ROM_LOAD( "eh15.12f", 0x0000, 0x0200, CRC(279e540c) SHA1(9e5e707da9f7c403c63d77fa378f22da9906d4e5) )
+
ROM_REGION( 0x0200, "plds", 0 )
ROM_LOAD( "pt-0.16h", 0x0000, 0x0117, CRC(add5074f) SHA1(352d984ba4d50c437ee9e5d8e8d00b0da6b3b8f3) )
ROM_END
+// bootleg of the Japanese release manufactured in Italy. Contents are the same but for PROMs and PAL
+// main PCB is marked: "LC" on component side ("LC" is the Italian for "Lato Componenti" which translates to "Components Side")
+// main PCB is marked: "LS" on solder side ("LS" is the Italian for "Lato Saldature" which translates to "Solders Side")
+ROM_START( cobracomjb )
+ ROM_REGION( 0x30000, "maincpu", 0 )
+ ROM_LOAD( "cobra4.bin", 0x08000, 0x08000, CRC(868637e1) SHA1(8b1e3e045e341bb94b1f6c7d89198b22e6c19de7) )
+ ROM_LOAD( "cobra3.bin", 0x10000, 0x10000, CRC(7c878a83) SHA1(9b2a3083c6dae69626fdab16d97517d30eaa1859) )
+ ROM_LOAD( "cobra2.bin", 0x20000, 0x10000, CRC(04505acb) SHA1(2220efb277884588859375dab9960f04f07273a7) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "cobra5.bin", 0x8000, 0x8000, CRC(62ca5e89) SHA1(b04acaccc58846e0d277868a873a440b7f8071b0) )
+
+ ROM_REGION( 0x08000, "gfx1", 0 ) // characters
+ ROM_LOAD( "cobra1.bin", 0x00000, 0x08000, CRC(47246177) SHA1(51b025740dc03b04009ac97d8d110ab521894386) )
+
+ ROM_REGION( 0x80000, "gfx2", 0 ) // sprites
+ ROM_LOAD( "cob17.bin", 0x00000, 0x10000, CRC(d96b6797) SHA1(01c4a9f2bebb13cba14636690cd5356db73f045e) )
+ ROM_LOAD( "cob16.bin", 0x20000, 0x10000, CRC(3fef9c02) SHA1(e4b731faf6a2f4e5fed8ba9bd07e0f203981ffec) )
+ ROM_LOAD( "cob15.bin", 0x40000, 0x10000, CRC(bfae6c34) SHA1(9503a120e11e9466cd9a2931fd44a631d72ca5f0) )
+ ROM_LOAD( "cob14.bin", 0x60000, 0x10000, CRC(d56790f8) SHA1(1cc7cb9f7102158de14a737e9317a54f01790ba8) )
+
+ ROM_REGION( 0x80000, "gfx3", 0 ) // tiles 1
+ ROM_LOAD( "cob13.bin", 0x00000, 0x10000, CRC(1c4f6033) SHA1(4a7dece911166d1ff5f41df6ec5140596206d8d4) )
+ ROM_LOAD( "cob12.bin", 0x20000, 0x10000, CRC(d24ba794) SHA1(b34b7bbaab4ebdd81c87d363f087cc92e27e8d1c) )
+ ROM_LOAD( "cob11.bin", 0x40000, 0x10000, CRC(d80a49ce) SHA1(1a92413b5ab53f80e44a954433e69ec5fe2c0aa6) )
+ ROM_LOAD( "cob10.bin", 0x60000, 0x10000, CRC(6d771fc3) SHA1(f29979f3aa07bdb544fb0c1d773c5558b4533390) )
+
+ ROM_REGION( 0x80000, "gfx4", 0 ) // tiles 2
+ ROM_LOAD( "cobra6.bin", 0x00000, 0x08000, CRC(c991298f) SHA1(3f79773a8def6b79b77c2ca6b8e8dbde5bdcd127) )
+ ROM_LOAD( "cobra8.bin", 0x20000, 0x08000, CRC(6bcc5982) SHA1(5bafa9a7a115d2b67f4fd582dc79f7e2848e5010) )
+ ROM_LOAD( "cobra7.bin", 0x40000, 0x08000, CRC(f5e267e5) SHA1(4abda964b8ebceeaba7717d4df23a85862934490) )
+ ROM_LOAD( "cobra9.bin", 0x60000, 0x08000, CRC(c90443b5) SHA1(2ede9a05e54a662c1b08672921a0390d8ce128a7) )
+
+ ROM_REGION( 0x0500, "proms", 0 )
+ ROM_LOAD( "63s481n.3", 0x0000, 0x0200, CRC(279e540c) SHA1(9e5e707da9f7c403c63d77fa378f22da9906d4e5) )
+ ROM_LOAD( "am27s21pc.1", 0x0200, 0x0100, CRC(9f6aa3e5) SHA1(518247d4581eee3a078269fcf0c86d182cf622cd) )
+ ROM_LOAD( "am27s21pc.2", 0x0300, 0x0100, CRC(af46d1ee) SHA1(281bcc61d9d67b007c1399e228ec6baf6ab5d4ff) )
+ ROM_LOAD( "am27s21pc.3", 0x0400, 0x0100, CRC(1e4189e8) SHA1(ce62b19005f565b734d8db3ee49d7c070ed53ad6) )
+
+ ROM_REGION( 0x0104, "plds", 0 )
+ ROM_LOAD( "pal16l8a-2cn.bin", 0x0000, 0x0104, CRC(3ef8cf68) SHA1(9410a139fb10628bc612d198f5c9f04b2b34f52f) )
+ROM_END
+
/******************************************************************************/
void dec8_state::init_dec8()
@@ -3725,3 +3780,4 @@ GAME( 1988, cobracom, 0, cobracom, cobracom, dec8_state, init_dec8,
GAME( 1988, cobracoma, cobracom, cobracom, cobracom, dec8_state, init_dec8, ROT0, "Data East Corporation", "Cobra-Command (World/US revision 4)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, cobracomb, cobracom, cobracom, cobracom, dec8_state, init_dec8, ROT0, "Data East Corporation", "Cobra-Command (World/US)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, cobracomj, cobracom, cobracom, cobracom, dec8_state, init_dec8, ROT0, "Data East Corporation", "Cobra-Command (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, cobracomjb, cobracom, cobracom, cobracom, dec8_state, init_dec8, ROT0, "bootleg", "Cobra-Command (Japan, bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index 19660061e87..0711456fc65 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -336,8 +336,6 @@ void deco156_state::hvysmsh(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
@@ -388,8 +386,6 @@ void deco156_state::wcvol95(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index 41fc3007fcc..54105598fce 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -883,6 +883,18 @@ DECOSPR_PRIORITY_CB_MEMBER( fghthist_state::fghthist_pri_callback )
return mask;
}
+void captaven_state::tile_callback(u32 &tile, u32 &colour, int layer, bool is_8x8)
+{
+ // Captain America operates this chip in 8bpp mode.
+ // In 8bpp mode you appear to only get 1 layer, not 2, but you also
+ // have an extra 2 tile bits, and 2 less colour bits.
+ if (layer == 0)
+ {
+ tile |= ((colour & 0x3) << 12);
+ colour >>= 2;
+ }
+}
+
DECO16IC_BANK_CB_MEMBER( captaven_state::bank_callback )
{
return (bank & 0x20) << 9;
@@ -910,6 +922,11 @@ DECO16IC_BANK_CB_MEMBER( nslasher_state::bank_callback )
return (bank & ~0xf) << 8;
}
+u16 nslasher_state::mix_callback(u16 p, u16 p2)
+{
+ return ((p & 0x70f) + (((p & 0x30) | (p2 & 0x0f)) << 4)) & 0x7ff;
+}
+
//**************************************************************************
// INPUTS
@@ -1867,8 +1884,6 @@ void captaven_state::captaven(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x20);
m_deco_tilegen[0]->set_pf2_col_bank(0x30);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1880,12 +1895,11 @@ void captaven_state::captaven(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0); // pf3 is in 8bpp mode, pf4 is not used
m_deco_tilegen[1]->set_pf1_size(DECO_32x32);
m_deco_tilegen[1]->set_pf2_size(DECO_32x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0xff);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x00);
- m_deco_tilegen[1]->set_pf1_col_bank(0x10);
+ m_deco_tilegen[1]->set_pf1_col_bank(0x04);
m_deco_tilegen[1]->set_pf2_col_bank(0x00);
- m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
+ m_deco_tilegen[1]->set_pf1_col_mask(0x03);
m_deco_tilegen[1]->set_pf2_col_mask(0x00);
+ m_deco_tilegen[1]->set_tile_callback(FUNC(captaven_state::tile_callback));
m_deco_tilegen[1]->set_bank1_callback(FUNC(captaven_state::bank_callback));
// no bank2 callback
m_deco_tilegen[1]->set_pf12_8x8_bank(0);
@@ -1946,8 +1960,6 @@ void fghthist_state::fghthist(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1961,8 +1973,6 @@ void fghthist_state::fghthist(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x20);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -2070,8 +2080,6 @@ void dragngun_state::dragngun(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x20);
m_deco_tilegen[0]->set_pf2_col_bank(0x30);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -2085,8 +2093,6 @@ void dragngun_state::dragngun(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0xff);
- m_deco_tilegen[1]->set_pf2_trans_mask(0xff);
m_deco_tilegen[1]->set_pf1_col_bank(0x04);
m_deco_tilegen[1]->set_pf2_col_bank(0x04);
m_deco_tilegen[1]->set_pf1_col_mask(0x03);
@@ -2196,8 +2202,6 @@ void dragngun_state::lockload(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x20);
m_deco_tilegen[0]->set_pf2_col_bank(0x30);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -2211,8 +2215,6 @@ void dragngun_state::lockload(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_32x32);
m_deco_tilegen[1]->set_pf2_size(DECO_32x32); // lockload definitely wants pf34 half width..
- m_deco_tilegen[1]->set_pf1_trans_mask(0xff);
- m_deco_tilegen[1]->set_pf2_trans_mask(0xff);
m_deco_tilegen[1]->set_pf1_col_bank(0x04);
m_deco_tilegen[1]->set_pf2_col_bank(0x04);
m_deco_tilegen[1]->set_pf1_col_mask(0x03);
@@ -2274,8 +2276,6 @@ void nslasher_state::tattass(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -2289,14 +2289,13 @@ void nslasher_state::tattass(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x20);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
m_deco_tilegen[1]->set_pf2_col_mask(0x0f);
m_deco_tilegen[1]->set_bank1_callback(FUNC(nslasher_state::bank_callback));
m_deco_tilegen[1]->set_bank2_callback(FUNC(nslasher_state::bank_callback));
+ m_deco_tilegen[1]->set_mix_callback(FUNC(nslasher_state::mix_callback));
m_deco_tilegen[1]->set_pf12_8x8_bank(0);
m_deco_tilegen[1]->set_pf12_16x16_bank(2);
m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode);
@@ -2348,8 +2347,6 @@ void nslasher_state::nslasher(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -2363,14 +2360,13 @@ void nslasher_state::nslasher(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x20);
m_deco_tilegen[1]->set_pf2_col_bank(0x30);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
m_deco_tilegen[1]->set_pf2_col_mask(0x0f);
m_deco_tilegen[1]->set_bank1_callback(FUNC(nslasher_state::bank_callback));
m_deco_tilegen[1]->set_bank2_callback(FUNC(nslasher_state::bank_callback));
+ m_deco_tilegen[1]->set_mix_callback(FUNC(nslasher_state::mix_callback));
m_deco_tilegen[1]->set_pf12_8x8_bank(0);
m_deco_tilegen[1]->set_pf12_16x16_bank(2);
m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode);
diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp
index ff4197d2a33..a27db56a0e6 100644
--- a/src/mame/drivers/decocass.cpp
+++ b/src/mame/drivers/decocass.cpp
@@ -861,7 +861,16 @@ static INPUT_PORTS_START( cptennis )
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x00, "3" )
- /* other dips not verified */
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
+ PORT_DIPSETTING( 0x06, "10000" )
+ PORT_DIPSETTING( 0x04, "20000" )
+ PORT_DIPSETTING( 0x02, "30000" )
+ PORT_DIPSETTING( 0x00, DEF_STR( None ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, "Amateur" )
+ PORT_DIPSETTING( 0x00, "Professional" )
+ PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5")
+ // DIPs verified from DIPSW sheet
INPUT_PORTS_END
static INPUT_PORTS_START( cprobowl )
@@ -2180,4 +2189,3 @@ void decocass_state::init_cdsteljn()
/* UX9 */ // 1985.05 Geinoujin Shikaku Shiken
/* xx */ GAME( 2008, decomult, decocass, decocass, decocass, decocass_widel_state, init_decocass, ROT270, "bootleg (David Widel)", "Deco Cassette System Multigame (ROM based)", 0 )
-
diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp
index 74c5f932b71..a8886e459ff 100644
--- a/src/mame/drivers/deshoros.cpp
+++ b/src/mame/drivers/deshoros.cpp
@@ -61,7 +61,7 @@ private:
DECLARE_READ8_MEMBER(display_ready_r);
DECLARE_WRITE8_MEMBER(display_w);
DECLARE_WRITE8_MEMBER(out_w);
- DECLARE_WRITE8_MEMBER(bank_select_w);
+ void bank_select_w(uint8_t data);
DECLARE_WRITE8_MEMBER(sound_w);
void main_map(address_map &map);
@@ -149,7 +149,7 @@ WRITE8_MEMBER(destiny_state::out_w)
// other bits: N/C?
}
-WRITE8_MEMBER(destiny_state::bank_select_w)
+void destiny_state::bank_select_w(uint8_t data)
{
// d0-d2 and d4: bank (but only up to 4 banks supported)
membank("bank1")->set_base(memregion("answers")->base() + 0x6000 * (data & 3));
@@ -263,7 +263,7 @@ void destiny_state::machine_start()
void destiny_state::machine_reset()
{
- bank_select_w(m_maincpu->space(AS_PROGRAM), 0, 0);
+ bank_select_w(0);
}
void destiny_state::destiny(machine_config &config)
diff --git a/src/mame/drivers/dietgo.cpp b/src/mame/drivers/dietgo.cpp
index 44394aa9b4e..a325f105097 100644
--- a/src/mame/drivers/dietgo.cpp
+++ b/src/mame/drivers/dietgo.cpp
@@ -222,8 +222,6 @@ void dietgo_state::dietgo(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp
index cb3597e05a0..24058318361 100644
--- a/src/mame/drivers/dkong.cpp
+++ b/src/mame/drivers/dkong.cpp
@@ -454,7 +454,7 @@ WRITE8_MEMBER(dkong_state::memory_write_byte)
WRITE_LINE_MEMBER(dkong_state::s2650_interrupt)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03); // Z80
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
/*************************************
@@ -1869,6 +1869,7 @@ void dkong_state::s2650(machine_config &config)
s2650.set_addrmap(AS_DATA, &dkong_state::s2650_data_map);
s2650.sense_handler().set("screen", FUNC(screen_device::vblank));
s2650.flag_handler().set(FUNC(dkong_state::s2650_fo_w));
+ s2650.intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
m_screen->screen_vblank().set(FUNC(dkong_state::s2650_interrupt));
diff --git a/src/mame/drivers/docastle.cpp b/src/mame/drivers/docastle.cpp
index d67cadd8e60..cd55e532254 100644
--- a/src/mame/drivers/docastle.cpp
+++ b/src/mame/drivers/docastle.cpp
@@ -547,9 +547,7 @@ GFXDECODE_END
void docastle_state::machine_reset()
{
- int i;
-
- for (i = 0; i < 9; i++)
+ for (int i = 0; i < 9; i++)
{
m_buffer0[i] = 0;
m_buffer1[i] = 0;
@@ -560,11 +558,11 @@ void docastle_state::machine_reset()
m_adpcm_data = -1;
m_adpcm_status = 0;
- for (i = 0; i < 2; i++)
+ for (int i = 0; i < 2; i++)
{
m_inp[i]->write_ms(0); // pin 5 tied low
//m_inp[i]->write_ce(1); // pin 4 tied high
- m_inp[i]->write_s(machine().dummy_space(), 0, 0); // cleared with LS273
+ m_inp[i]->write_s(0); // cleared with LS273
}
flip_screen_set(0); // cleared with LS273
}
diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp
index 806229b4e79..79f911bd7f0 100644
--- a/src/mame/drivers/dreambal.cpp
+++ b/src/mame/drivers/dreambal.cpp
@@ -339,8 +339,6 @@ void dreambal_state::dreambal(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/eispc.cpp b/src/mame/drivers/eispc.cpp
index 34a164ad1a3..2168bae6b31 100644
--- a/src/mame/drivers/eispc.cpp
+++ b/src/mame/drivers/eispc.cpp
@@ -445,17 +445,17 @@ void epc_state::epc_io(address_map &map)
map(0x03f4, 0x03f5).m(m_fdc, FUNC(i8272a_device::map));
map(0x03bc, 0x03be).lrw8(
- [this](address_space &space, offs_t offset, uint8_t mem_mask) -> uint8_t
+ [this](offs_t offset, uint8_t mem_mask) -> uint8_t
{
- uint8_t data = m_lpt->read(space, offset);
+ uint8_t data = m_lpt->read(offset);
LOGLPT("LPT read offset %02x: %02x\n", offset, data);
return data;
},
"lpt_r",
- [this](address_space &space, offs_t offset, uint8_t data)
+ [this](offs_t offset, uint8_t data)
{
LOGLPT("LPT write offset %02x: %02x\n", offset, data);
- m_lpt->write(space, offset, data);
+ m_lpt->write(offset, data);
},
"lpt_w"
);
diff --git a/src/mame/drivers/elan_eu3a05.cpp b/src/mame/drivers/elan_eu3a05.cpp
index 8ffce8019a6..a23e03f4940 100644
--- a/src/mame/drivers/elan_eu3a05.cpp
+++ b/src/mame/drivers/elan_eu3a05.cpp
@@ -242,8 +242,11 @@ public:
void airblsjs(machine_config& config);
void elan_sudoku(machine_config &config);
+ void elan_sudoku_pal(machine_config &config);
void elan_pvmilfin(machine_config &config);
+ void init_sudelan();
+ void init_sudelan3();
protected:
// driver_device overrides
@@ -775,6 +778,13 @@ void elan_eu3a05_state::elan_sudoku(machine_config& config)
m_sys->set_alt_timer(); // for Carl Edwards'
}
+void elan_eu3a05_state::elan_sudoku_pal(machine_config& config)
+{
+ elan_sudoku(config);
+ m_sys->set_pal(); // TODO: also set PAL clocks
+ m_screen->set_refresh_hz(50);
+}
+
void elan_eu3a05_state::elan_pvmilfin(machine_config& config)
{
elan_eu3a05(config);
@@ -792,6 +802,9 @@ void elan_eu3a05_state::airblsjs(machine_config& config)
m_sys->set_pal(); // TODO: also set PAL clocks
}
+
+
+
ROM_START( rad_tetr )
ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "tetrisrom.bin", 0x000000, 0x100000, CRC(40538e08) SHA1(1aef9a2c678e39243eab8d910bb7f9f47bae0aee) )
@@ -813,7 +826,7 @@ ROM_START( airblsjs )
ROM_LOAD( "airblsjs.bin", 0x000000, 0x400000, BAD_DUMP CRC(d10a6a84) SHA1(fa65f06e7da229006ddaffb245eef2cc4f90a66d) ) // ROM probably ok, but needs verification pass
ROM_END
-ROM_START( sudoelan )
+ROM_START( sudelan3 )
ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "sudoku.bin", 0x00000, 0x100000, CRC(c2596173) SHA1(cc74932648b577b735151014e8c04ed778e11704) )
ROM_RELOAD(0x100000,0x100000)
@@ -821,6 +834,14 @@ ROM_START( sudoelan )
ROM_RELOAD(0x300000,0x100000)
ROM_END
+ROM_START( sudelan )
+ ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "klaussudoku.bin", 0x00000, 0x200000, CRC(afd2b06a) SHA1(21db956fb40b2e3d61fc2bac89000cf7f61fe99e) )
+ ROM_RELOAD(0x200000,0x200000)
+ROM_END
+
+
+
ROM_START( carlecfg )
ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "carledwardsracing.bin", 0x00000, 0x100000, CRC(920f633e) SHA1(8460b77b9635a2484edab1111f35bbda74eb68e4) )
@@ -845,6 +866,24 @@ ROM_START( buzztime )
ROM_END
+void elan_eu3a05_state::init_sudelan3()
+{
+ // skip infinite loop (why is this needed? does it think we've soft shutdown?)
+ uint8_t* ROM = memregion("maincpu")->base();
+ ROM[0x0fcc] = 0xea;
+ ROM[0x0fcd] = 0xea;
+ ROM[0x0fce] = 0xea;
+}
+
+void elan_eu3a05_state::init_sudelan()
+{
+ // avoid jump to infinite loop (why is this needed? does it think we've soft shutdown?)
+ uint8_t* ROM = memregion("maincpu")->base();
+ ROM[0xd0f] = 0xea;
+ ROM[0xd10] = 0xea;
+ ROM[0xd11] = 0xea;
+}
+
CONS( 2004, rad_sinv, 0, 0, elan_eu3a05, rad_sinv, elan_eu3a05_state, empty_init, "Radica (licensed from Taito)", "Space Invaders [Lunar Rescue, Colony 7, Qix, Phoenix] (Radica, Arcade Legends TV Game)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // "5 Taito games in 1"
CONS( 2004, rad_tetr, 0, 0, elan_eu3a05, rad_tetr, elan_eu3a05_state, empty_init, "Radica (licensed from Elorg / The Tetris Company)", "Tetris (Radica, Arcade Legends TV Game)", MACHINE_NOT_WORKING ) // "5 Tetris games in 1"
@@ -856,7 +895,9 @@ CONS( 2004, buzztime, 0, 0, elan_buzztime, sudoku, elan_eu3a05_buzztime_state, e
// Below are probably not EU3A05 but use similar modes (possibly EU3A13?)
-CONS( 2006, sudoelan, 0, 0, elan_sudoku, sudoku, elan_eu3a05_state, empty_init, "Senario / All in 1 Products Ltd", "Ultimate Sudoku TV Edition 3-in-1", MACHINE_NOT_WORKING )
+CONS( 2006, sudelan3, 0, 0, elan_sudoku, sudoku, elan_eu3a05_state, init_sudelan3, "All in 1 Products Ltd / Senario", "Ultimate Sudoku TV Edition 3-in-1 (All in 1 / Senario)", MACHINE_NOT_WORKING )
+// Senario also distributed this version in the US without the '3 in 1' text on the box, ROM has not been verified to match
+CONS( 2005, sudelan, 0, 0, elan_sudoku_pal, sudoku, elan_eu3a05_state, init_sudelan, "All in 1 Products Ltd / Play Vision", "Carol Vorderman's Sudoku Plug & Play TV Game (All in 1 / Play Vision)", MACHINE_NOT_WORKING )
CONS( 200?, carlecfg, 0, 0, elan_sudoku, carlecfg, elan_eu3a05_state, empty_init, "Excalibur Electronics Inc", "Carl Edwards' Chase For Glory", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index 54c90e03a25..87900c8c9f3 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -181,6 +181,9 @@ TODO:
should influence the MSM5232 clock. However, even removing it from the board
doesn't seem to affect the sound.
+- dump the MCU ROM for kouyakyu, gekisou, hvoltage, though they currently work
+ fine with the ROM from another chip.
+
* Special Thanks to:
Jarek Burczynski for a superb MSM5232 emulation
@@ -367,7 +370,6 @@ D
#include "emu.h"
#include "includes/equites.h"
-#include "cpu/alph8201/alph8201.h"
#include "cpu/m68000/m68000.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
@@ -609,36 +611,6 @@ READ16_MEMBER(equites_state::equites_spriteram_kludge_r)
return m_spriteram[0];
}
-READ8_MEMBER(equites_state::mcu_ram_r)
-{
- if (m_fakemcu == nullptr)
- return m_alpha_8201->ext_ram_r(space, offset);
- else
- return m_mcuram[offset];
-}
-
-WRITE8_MEMBER(equites_state::mcu_ram_w)
-{
- if (m_fakemcu == nullptr)
- m_alpha_8201->ext_ram_w(space, offset, data);
- else
- m_mcuram[offset] = data;
-}
-
-WRITE_LINE_MEMBER(equites_state::mcu_start_w)
-{
- if (m_fakemcu == nullptr)
- m_alpha_8201->mcu_start_w(state != 0);
- else
- m_fakemcu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
-}
-
-WRITE_LINE_MEMBER(equites_state::mcu_switch_w)
-{
- if (m_fakemcu == nullptr)
- m_alpha_8201->bus_dir_w(state == 0);
-}
-
/******************************************************************************/
@@ -653,7 +625,7 @@ void equites_state::equites_common_map(address_map &map)
map(0x0c0200, 0x0c0fff).ram();
map(0x100000, 0x1001ff).ram().share("spriteram");
map(0x100000, 0x100001).r(FUNC(equites_state::equites_spriteram_kludge_r));
- map(0x140000, 0x1407ff).rw(FUNC(equites_state::mcu_ram_r), FUNC(equites_state::mcu_ram_w)).umask16(0x00ff);
+ map(0x140000, 0x1407ff).rw(m_alpha_8201, FUNC(alpha_8201_device::ext_ram_r), FUNC(alpha_8201_device::ext_ram_w)).umask16(0x00ff);
map(0x180000, 0x180001).portr("IN1").w(m_soundlatch, FUNC(generic_latch_8_device::write));
map(0x180000, 0x180000).select(0x03c000).lw8(NAME([this] (offs_t offset, u8 data) { m_mainlatch->write_a3(offset >> 14); }));
map(0x180001, 0x180001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
@@ -688,7 +660,7 @@ void splndrbt_state::splndrbt_map(address_map &map)
map(0x100000, 0x100001).w(FUNC(splndrbt_state::splndrbt_bg_scrollx_w));
map(0x140001, 0x140001).w("soundlatch", FUNC(generic_latch_8_device::write));
map(0x1c0000, 0x1c0001).w(FUNC(splndrbt_state::splndrbt_bg_scrolly_w));
- map(0x180000, 0x1807ff).rw(FUNC(splndrbt_state::mcu_ram_r), FUNC(splndrbt_state::mcu_ram_w)).umask16(0x00ff);
+ map(0x180000, 0x1807ff).rw(m_alpha_8201, FUNC(alpha_8201_device::ext_ram_r), FUNC(alpha_8201_device::ext_ram_w)).umask16(0x00ff);
map(0x200000, 0x200fff).mirror(0x001000).rw(FUNC(splndrbt_state::equites_fg_videoram_r), FUNC(splndrbt_state::equites_fg_videoram_w)).umask16(0x00ff);
map(0x400000, 0x4007ff).ram().w(FUNC(splndrbt_state::equites_bg_videoram_w)).share("bg_videoram");
map(0x400800, 0x400fff).ram();
@@ -717,12 +689,6 @@ void equites_state::sound_portmap(address_map &map)
}
-void equites_state::mcu_map(address_map &map)
-{
- map(0x0000, 0x03ff).ram().share("mcuram"); /* main CPU shared RAM */
-}
-
-
/******************************************************************************/
// Common Port Map
@@ -1168,8 +1134,8 @@ void equites_state::equites(machine_config &config)
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<1>().set(FUNC(equites_state::flip_screen_w));
- m_mainlatch->q_out_cb<2>().set(FUNC(equites_state::mcu_start_w));
- m_mainlatch->q_out_cb<3>().set(FUNC(equites_state::mcu_switch_w));
+ m_mainlatch->q_out_cb<2>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
+ m_mainlatch->q_out_cb<3>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w)).invert();
common_sound(config);
@@ -1199,16 +1165,13 @@ void gekisou_state::gekisou(machine_config &config)
/* basic machine hardware */
m_maincpu->set_addrmap(AS_PROGRAM, &gekisou_state::gekisou_map);
- // mcu not dumped, so add simulated mcu
- ALPHA8301L(config, "mcu", 4000000/8).set_addrmap(AS_PROGRAM, &gekisou_state::mcu_map);
-
// gekisou has battery-backed RAM to store settings
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
}
-void gekisou_state::bngotime(machine_config &config)
+void equites_state::bngotime(machine_config &config)
{
- gekisou(config);
+ equites(config);
// TODO: emulate different sound board with Z80 + AY8910
m_audiocpu->set_disable();
@@ -1223,8 +1186,8 @@ void splndrbt_state::splndrbt(machine_config &config)
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(equites_state::flip_screen_w));
- m_mainlatch->q_out_cb<1>().set(FUNC(equites_state::mcu_start_w));
- m_mainlatch->q_out_cb<2>().set(FUNC(equites_state::mcu_switch_w));
+ m_mainlatch->q_out_cb<1>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
+ m_mainlatch->q_out_cb<2>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w)).invert();
m_mainlatch->q_out_cb<3>().set(FUNC(splndrbt_state::splndrbt_selchar_w));
common_sound(config);
@@ -1246,14 +1209,6 @@ void splndrbt_state::splndrbt(machine_config &config)
MCFG_VIDEO_START_OVERRIDE(splndrbt_state,splndrbt)
}
-void splndrbt_state::hvoltage(machine_config &config)
-{
- splndrbt(config);
-
- // mcu not dumped, so add simulated mcu
- ALPHA8301L(config, "mcu", 4000000/8).set_addrmap(AS_PROGRAM, &splndrbt_state::mcu_map);
-}
-
/******************************************************************************/
@@ -1567,7 +1522,7 @@ ROM_START( kouyakyu )
ROM_LOAD( "epr-6698.bin", 0x0a000, 0x2000, CRC(7adfd1ff) SHA1(b543dd6734a681a187dabf602bea390de663039c) )
ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
- ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, BAD_DUMP CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) // 8304 is not dumped yet, using 8303 instead
+ ROM_LOAD( "alpha-8505_44801c57.bin", 0x0000, 0x2000, BAD_DUMP CRC(1f5a1405) SHA1(23f2e23db402f88037a5cbdab2935ec1b9a05298) ) // 8304 is not dumped yet, using 8505 instead
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "epr-6710.bin", 0x00000, 0x1000, CRC(accda190) SHA1(265d2fd92574d65e7890e48d5f305bf903a67bc8) )
@@ -1632,7 +1587,7 @@ ROM_START( gekisou )
ROM_LOAD( "v3.1e", 0x08000, 0x4000, CRC(0ab5e777) SHA1(9177c42418f022a65d73c3302873b894c5a137a4) )
ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
- ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, BAD_DUMP CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) // 8304 is not dumped yet, using 8303 instead
+ ROM_LOAD( "alpha-8505_44801c57.bin", 0x0000, 0x2000, BAD_DUMP CRC(1f5a1405) SHA1(23f2e23db402f88037a5cbdab2935ec1b9a05298) ) // 8304 is not dumped yet, using 8505 instead
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "0.5c", 0x00000, 0x1000, CRC(7e8bf4d1) SHA1(8abb82be006e8d1df449a5f83d59637314405119) )
@@ -1917,7 +1872,7 @@ ROM_START( hvoltage )
ROM_LOAD( "7_v.1e", 0x08000, 0x4000, CRC(44d38554) SHA1(6765971376eafa218fda1accb1e173a7c1850cc8) )
ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
- ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, BAD_DUMP CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) // 8304 is not dumped yet, using 8303 instead
+ ROM_LOAD( "alpha-8505_44801c57.bin", 0x0000, 0x2000, BAD_DUMP CRC(1f5a1405) SHA1(23f2e23db402f88037a5cbdab2935ec1b9a05298) ) // 8304 is not dumped yet, using 8505 instead
ROM_REGION( 0x2000, "gfx1", 0 ) // chars
ROM_LOAD( "5.8c", 0x00000, 0x2000, CRC(656d53cd) SHA1(9971ed7e7da0e8bf46e97e8f75a2c2201b33fc2f) )
@@ -1954,8 +1909,8 @@ ROM_START( hvoltage )
ROM_END
/*
-Unknown bingo game
-(c)1986 CLS?
+Bingo Time
+(c)1986 CLS
68K55-2
CPU:MC68000P8
@@ -1978,7 +1933,7 @@ ROM_START( bngotime )
ROM_LOAD( "11.sub", 0x00000, 0x2000, CRC(9b063c07) SHA1(c9fe7fe10bd204cb82066db7b576072df7787046) )
ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
- ROM_LOAD( "alpha-8505_44801c57.bin", 0x0000, 0x2000, NO_DUMP )
+ ROM_LOAD( "alpha-8505_44801c57.bin", 0x0000, 0x2000, CRC(1f5a1405) SHA1(23f2e23db402f88037a5cbdab2935ec1b9a05298) )
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "9.d5", 0x00000, 0x1000, CRC(3c356e82) SHA1(55a58f1335206a0996caf8967b4ee962d2373db4) )
@@ -2052,12 +2007,12 @@ GAME( 1984, equitess, equites, equites, equites, equites_state, init_equite
GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, init_equites, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1984, bullfgtrs, bullfgtr, equites, bullfgtr, equites_state, init_equites, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, init_equites, ROT0, "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1985, gekisou, 0, gekisou, gekisou, gekisou_state, init_equites, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1986, bngotime, 0, bngotime, gekisou, gekisou_state, init_equites, ROT90, "CLS", "Bingo Time", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 8505 MCU isn't dumped
+GAME( 1985, gekisou, 0, gekisou, gekisou, gekisou_state, init_equites, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1986, bngotime, 0, bngotime, equites, equites_state, init_equites, ROT90, "CLS", "Bingo Time", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // needs inputs, emulation of the sound board
// Splendor Blast Hardware
GAME( 1985, splndrbt, 0, splndrbt, splndrbt, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1985, splndrbta, splndrbt, splndrbt, splndrbt, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1985, splndrbtb, splndrbt, splndrbt, splndrbt, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1985, splndrbt2, 0, splndrbt, splndrbt, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast II", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1985, hvoltage, 0, hvoltage, hvoltage, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, hvoltage, 0, splndrbt, hvoltage, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp
index 61ff9718be5..7116d472661 100644
--- a/src/mame/drivers/europc.cpp
+++ b/src/mame/drivers/europc.cpp
@@ -417,7 +417,7 @@ READ8_MEMBER( europc_pc_state::europc_pio_r )
switch (offset)
{
case 0:
- data = m_keyboard->read(space, 0);
+ data = m_keyboard->read();
break;
case 1:
data = m_port61;
diff --git a/src/mame/drivers/eva.cpp b/src/mame/drivers/eva.cpp
index 65bcf3c3241..d5c71f0db77 100644
--- a/src/mame/drivers/eva.cpp
+++ b/src/mame/drivers/eva.cpp
@@ -3,21 +3,21 @@
// thanks-to:David Viens, Sean Riddle
/***************************************************************************
- Chrysler Electronic Voice Alert
+Chrysler Electronic Voice Alert
- 11-function board "EVA-11"
- - TMS1000 MCU (label 4230625-N1LL 32045B, die label 1000F M32045B)
- - TMS5110A, TMS6125 CM73002
- - 2 Nat.Semi. 20-pin SDIP, I/O expanders?
+11-function board "EVA-11"
+- TMS1000 MCU (label 4230625-N1LL 32045B, die label 1000F M32045B)
+- TMS5110A, TMS6125 CM73002
+- 2 Nat.Semi. 20-pin SDIP, I/O expanders?
- 24-function board "EVA-24"
- - COP420 MCU (custom label)
- - TMS5110A, TMS6100 CM63002
- - monitor board (unknown MCU, no dump), VFD panel
+24-function board "EVA-24"
+- COP420 MCU (custom label)
+- TMS5110A, TMS6100 CM63002
+- monitor board (unknown MCU, no dump), VFD panel
- TODO:
- - add eva11/eva24 sensors
- - add eva24 VFD
+TODO:
+- add eva11/eva24 sensors
+- add eva24 VFD
***************************************************************************/
@@ -29,10 +29,12 @@
#include "speaker.h"
-class eva_base_state : public driver_device
+namespace {
+
+class base_state : public driver_device
{
public:
- eva_base_state(const machine_config &mconfig, device_type type, const char *tag) :
+ base_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_tms5100(*this, "tms5100"),
m_tms6100(*this, "tms6100")
@@ -46,11 +48,11 @@ protected:
required_device<tms6100_device> m_tms6100;
};
-class eva11_state : public eva_base_state
+class eva11_state : public base_state
{
public:
eva11_state(const machine_config &mconfig, device_type type, const char *tag) :
- eva_base_state(mconfig, type, tag),
+ base_state(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
@@ -65,19 +67,21 @@ private:
DECLARE_WRITE16_MEMBER(write_r);
};
-class eva24_state : public eva_base_state
+class eva24_state : public base_state
{
public:
eva24_state(const machine_config &mconfig, device_type type, const char *tag) :
- eva_base_state(mconfig, type, tag),
+ base_state(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
void eva(machine_config &config);
-private:
+protected:
virtual void machine_start() override;
+private:
+
// devices
required_device<cop420_cpu_device> m_maincpu;
@@ -85,25 +89,19 @@ private:
DECLARE_WRITE8_MEMBER(write_g);
DECLARE_WRITE8_MEMBER(write_d);
- u8 m_g;
+ u8 m_g = 0;
};
void eva24_state::machine_start()
{
- // zerofill
- m_g = 0;
-
- // register for savestates
save_item(NAME(m_g));
}
-/***************************************************************************
-
- I/O
-
-***************************************************************************/
+/******************************************************************************
+ I/O
+******************************************************************************/
// EVA-24
@@ -153,11 +151,9 @@ READ8_MEMBER(eva11_state::read_k)
-/***************************************************************************
-
- Inputs
-
-***************************************************************************/
+/******************************************************************************
+ Input Ports
+******************************************************************************/
static INPUT_PORTS_START( eva24 )
INPUT_PORTS_END
@@ -167,13 +163,11 @@ INPUT_PORTS_END
-/***************************************************************************
-
- Machine Config
-
-***************************************************************************/
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
-void eva_base_state::eva_sound(machine_config &config)
+void base_state::eva_sound(machine_config &config)
{
/* sound hardware */
TMS6100(config, m_tms6100, 640_kHz_XTAL/4);
@@ -213,11 +207,9 @@ void eva11_state::eva(machine_config &config)
-/***************************************************************************
-
- ROM Defs, Game driver(s)
-
-***************************************************************************/
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
ROM_START( eva24 )
ROM_REGION( 0x0400, "maincpu", 0 )
@@ -240,7 +232,13 @@ ROM_START( eva11 )
ROM_LOAD( "cm73002.vsm", 0x0000, 0x1000, CRC(d5340bf8) SHA1(81195e8f870275d39a1abe1c8e2a6afdfdb15725) )
ROM_END
+} // anonymous namespace
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
SYST( 1984, eva24, 0, 0, eva, eva24, eva24_state, empty_init, "Chrysler", "Electronic Voice Alert (24-function)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/exelv.cpp b/src/mame/drivers/exelv.cpp
index 810f49d83e5..dbef37dc542 100644
--- a/src/mame/drivers/exelv.cpp
+++ b/src/mame/drivers/exelv.cpp
@@ -484,7 +484,7 @@ MACHINE_START_MEMBER( exelv_state, exeltel)
void exelv_state::exl100(machine_config &config)
{
/* basic machine hardware */
- TMS7020_EXL(config, m_maincpu, XTAL(4'915'200));
+ TMS7020_EXL(config, m_maincpu, 4.9152_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &exelv_state::tms7020_mem);
m_maincpu->in_porta().set(FUNC(exelv_state::tms7020_porta_r));
m_maincpu->out_portb().set(FUNC(exelv_state::tms7020_portb_w));
@@ -492,7 +492,7 @@ void exelv_state::exl100(machine_config &config)
TIMER(config, "scantimer").configure_scanline(FUNC(exelv_state::exelv_hblank_interrupt), "screen", 0, 1);
MCFG_MACHINE_START_OVERRIDE(exelv_state, exl100)
- tms7041_device &subcpu(TMS7041(config, "tms7041", XTAL(4'915'200)));
+ tms7041_device &subcpu(TMS7041(config, "tms7041", 4.9152_MHz_XTAL));
subcpu.in_porta().set(FUNC(exelv_state::tms7041_porta_r));
subcpu.out_portb().set(FUNC(exelv_state::tms7041_portb_w));
subcpu.in_portc().set(FUNC(exelv_state::tms7041_portc_r));
@@ -502,7 +502,7 @@ void exelv_state::exl100(machine_config &config)
config.set_perfect_quantum(m_maincpu);
- TMS3556(config, m_tms3556);
+ TMS3556(config, m_tms3556, 18_MHz_XTAL);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
@@ -538,7 +538,8 @@ void exelv_state::exl100(machine_config &config)
void exelv_state::exeltel(machine_config &config)
{
/* basic machine hardware */
- TMS7040(config, m_maincpu, XTAL(4'915'200));
+ TMS7040(config, m_maincpu, 9.8304_MHz_XTAL);
+ m_maincpu->set_divide_by_4();
m_maincpu->set_addrmap(AS_PROGRAM, &exelv_state::tms7040_mem);
m_maincpu->in_porta().set(FUNC(exelv_state::tms7020_porta_r));
m_maincpu->out_portb().set(FUNC(exelv_state::tms7020_portb_w));
@@ -546,7 +547,8 @@ void exelv_state::exeltel(machine_config &config)
TIMER(config, "scantimer").configure_scanline(FUNC(exelv_state::exelv_hblank_interrupt), "screen", 0, 1);
MCFG_MACHINE_START_OVERRIDE(exelv_state, exeltel)
- tms7042_device &subcpu(TMS7042(config, "tms7042", XTAL(4'915'200)));
+ tms7042_device &subcpu(TMS7042(config, "tms7042", 9.8304_MHz_XTAL));
+ subcpu.set_divide_by_4();
subcpu.in_porta().set(FUNC(exelv_state::tms7041_porta_r));
subcpu.out_portb().set(FUNC(exelv_state::tms7041_portb_w));
subcpu.in_portc().set(FUNC(exelv_state::tms7041_portc_r));
@@ -556,7 +558,7 @@ void exelv_state::exeltel(machine_config &config)
config.set_perfect_quantum(m_maincpu);
- TMS3556(config, m_tms3556);
+ TMS3556(config, m_tms3556, 18_MHz_XTAL);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
@@ -579,7 +581,7 @@ void exelv_state::exeltel(machine_config &config)
/* sound */
SPEAKER(config, "mono").front_center();
- TMS5220C(config, m_tms5220c, 640000);
+ TMS5220C(config, m_tms5220c, 9.8304_MHz_XTAL / 15); // unknown divider for "VSPCLK" (generated by TAHC06 gate array)
m_tms5220c->set_speechrom_tag("vsm");
m_tms5220c->add_route(ALL_OUTPUTS, "mono", 1.00);
}
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index bd92745a9af..b0bac311319 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -12,12 +12,12 @@ Sound : YM2151 [+ DAC] / 4 x MSM5205
Video : 2 x I.G.1BB 48844758V
------------------------------------------------------------------------------------------------------------------------
-Year + Game Main CPU Sound CPU Sound Video
+Year + Game Main CPU Sound CPU Sound Video
------------------------------------------------------------------------------------------------------------------------
->=1987 Born To Fight V20 8088 4 x MSM5205 2 x I.G.1BB 48844758V
->=1987 Fantasy Land 8086? 8086? YM2151 + DAC ?
-1988? Wheels Runner V20 Z80 YM3526 + ? 2 x PLCC84 FPGA
-1989 Galaxy Gunners 8088 V20 YM2151 2 x I.G.1BB 48844758V (labeled "INGA 1" and "INGA 2")
+>=1987 Born To Fight V20 8088 4x MSM5205 2x I.G.1BB 48844758V
+>=1987 Fantasy Land 8086? 8086? YM2151 + DAC ?
+1988 Wheels Runner V20 Z80 2x SN76489 + YM3526 + YM3014 2x PLCC84 FPGA (labeled "INGA 1" and "INGA 2")
+1989 Galaxy Gunners 8088 V20 YM2151 2x I.G.1BB 48844758V (labeled "INGA 1" and "INGA 2")
------------------------------------------------------------------------------------------------------------------------
[fantland, galaxygn]
@@ -38,11 +38,6 @@ Year + Game Main CPU Sound CPU Sound Video
- Verify sound. Also speech is a bit garbled / low volume (rom 15)
- Trackball controls don't work well
-[wheelrun]
-
-- On a car hit / crash the game tries to produce sound through ports b000 & c000,
- probably connected to the EP1210. This is not emulated.
-
***************************************************************************************/
#include "emu.h"
@@ -53,6 +48,7 @@ Year + Game Main CPU Sound CPU Sound Video
#include "cpu/z80/z80.h"
#include "sound/3526intf.h"
#include "sound/dac.h"
+#include "sound/sn76496.h"
#include "sound/volt_reg.h"
#include "sound/ym2151.h"
#include "speaker.h"
@@ -387,8 +383,8 @@ void fantland_state::wheelrun_sound_map(address_map &map)
map(0x8000, 0x87ff).ram();
map(0xa000, 0xa001).rw("ymsnd", FUNC(ym3526_device::read), FUNC(ym3526_device::write));
- map(0xb000, 0xb000).nopw(); // on a car crash / hit
- map(0xc000, 0xc000).nopw(); // ""
+ map(0xb000, 0xb000).w("sn1", FUNC(sn76489a_device::write));
+ map(0xc000, 0xc000).w("sn2", FUNC(sn76489a_device::write));
map(0xd000, 0xd000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); // during NMI
}
@@ -984,10 +980,10 @@ void borntofi_state::borntofi(machine_config &config)
void fantland_state::wheelrun(machine_config &config)
{
/* basic machine hardware */
- V20(config, m_maincpu, XTAL(18'000'000)/2); // D701080C-8 (V20)
+ V20(config, m_maincpu, XTAL(18'000'000)/3); // D701080C-8 (V20)
m_maincpu->set_addrmap(AS_PROGRAM, &fantland_state::wheelrun_map);
- Z80(config, m_audiocpu, XTAL(18'000'000)/2); // Z8400BB1 (Z80B)
+ Z80(config, m_audiocpu, XTAL(14'000'000)/4); // Z8400BB1 (Z80B)
m_audiocpu->set_addrmap(AS_PROGRAM, &fantland_state::wheelrun_sound_map);
// IRQ by YM3526, NMI when soundlatch is written
@@ -1012,6 +1008,10 @@ void fantland_state::wheelrun(machine_config &config)
ym3526_device &ymsnd(YM3526(config, "ymsnd", XTAL(14'000'000)/4));
ymsnd.irq_handler().set_inputline(m_audiocpu, INPUT_LINE_IRQ0);
ymsnd.add_route(ALL_OUTPUTS, "speaker", 1.0);
+
+ SN76489A(config, "sn1", XTAL(14'000'000)/4).add_route(ALL_OUTPUTS, "speaker", 0.75);
+
+ SN76489A(config, "sn2", XTAL(14'000'000)/4).add_route(ALL_OUTPUTS, "speaker", 0.75);
}
@@ -1350,19 +1350,18 @@ Wheels Runner by International Games
PCB:
(revision 8801)
-1x NEC D70108C-8 (NEC V20)
-1x SGS Z8400BB1 (Z80B)
-1x YM3526 (sound)
-1x Y3014B (DAC)
+CPUs:
+1x NEC D70108C-8 (NEC V20) - 5,996MHz(@19)
+1x SGS Z8400BB1 (Z80B) - 3,497MHz(@6)
+2x SN76489AN (sound) - 3,497MHz(@14)
+1x YM3526 (sound) - 48,58kHz(@20) - 874,3kHz(@23) - 3,497MHz(@24)
+1x Y3014B (DAC) - 874,3kHz(@5)
1x LM324A (sound)
1x TDA2002 (sound)
1x oscillator 18.000
1x oscillator 14.000
-1x ALTERA EP1210PC
-2x INGA (black quad chips with 84 legs, maybe FPGA)
ROMs:
-
15x M27512
3x PAL16R6CN (read protected)
2x PAL20L8aCNS (read protected)
@@ -1371,11 +1370,22 @@ ROMs:
1x TIBPAL16r8-25CN (read protected)
eprom location 2,5,6 are empty
-Notes:
+RAMs:
+2x TMM2015BP-10 (SRAM 2k x 8)
+2x CY7C128-55PC (SRAM 2k x 8)
+1x TMM2063P-10 (SRAM 8k x 8)
+1x CXK58256PM-12 (SRAM 32k x 8)
+2x HM62256LP-12 (SRAM 32k x 8)
+7x TMS4464-12NL (DRAM 64k x 4)
+PLDs:
+2x most probably TPC1020AFN-084C with erased markings, labeled INGA1,INGA2
+1x ALTERA EP1210PC - 5,996MHz(@1)
+
+Notes:
1x JAMMA edge connector
1x trimmer (volume)
-2x 8 bit dip switch
+2x 8 DIP switches banks (SW1,SW2)
Hardware info by f205v
diff --git a/src/mame/drivers/fb01.cpp b/src/mame/drivers/fb01.cpp
index 30ceae0127d..35cf5c36c46 100644
--- a/src/mame/drivers/fb01.cpp
+++ b/src/mame/drivers/fb01.cpp
@@ -30,7 +30,6 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_upd71051(*this, "upd71051")
- , m_midi_thru(*this, "mdthru")
, m_ym2164_irq(CLEAR_LINE)
, m_upd71051_txrdy(CLEAR_LINE)
, m_upd71051_rxrdy(CLEAR_LINE)
@@ -44,8 +43,6 @@ protected:
virtual void machine_reset() override;
private:
- DECLARE_WRITE_LINE_MEMBER(write_usart_clock);
- DECLARE_WRITE_LINE_MEMBER(midi_in);
DECLARE_WRITE_LINE_MEMBER(ym2164_irq_w);
DECLARE_WRITE_LINE_MEMBER(upd71051_txrdy_w);
DECLARE_WRITE_LINE_MEMBER(upd71051_rxrdy_w);
@@ -60,7 +57,6 @@ private:
required_device<z80_device> m_maincpu;
required_device<i8251_device> m_upd71051;
- required_device<midi_port_device> m_midi_thru;
int m_ym2164_irq;
int m_upd71051_txrdy;
int m_upd71051_rxrdy;
@@ -121,20 +117,6 @@ void fb01_state::machine_reset()
}
-WRITE_LINE_MEMBER(fb01_state::write_usart_clock)
-{
- m_upd71051->write_txc(state);
- m_upd71051->write_rxc(state);
-}
-
-
-WRITE_LINE_MEMBER(fb01_state::midi_in)
-{
- m_midi_thru->write_txd(state);
- m_upd71051->write_rxd(state);
-}
-
-
WRITE_LINE_MEMBER(fb01_state::ym2164_irq_w)
{
m_ym2164_irq = state;
@@ -208,9 +190,12 @@ void fb01_state::fb01(machine_config &config)
m_upd71051->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
clock_device &usart_clock(CLOCK(config, "usart_clock", XTAL(4'000'000) / 8)); // 500KHz
- usart_clock.signal_handler().set(FUNC(fb01_state::write_usart_clock));
+ usart_clock.signal_handler().set(m_upd71051, FUNC(i8251_device::write_txc));
+ usart_clock.signal_handler().append(m_upd71051, FUNC(i8251_device::write_rxc));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(FUNC(fb01_state::midi_in));
+ midi_port_device &mdin(MIDI_PORT(config, "mdin", midiin_slot, "midiin"));
+ mdin.rxd_handler().set("mdthru", FUNC(midi_port_device::write_txd));
+ mdin.rxd_handler().append(m_upd71051, FUNC(i8251_device::write_rxd));
MIDI_PORT(config, "mdout", midiout_slot, "midiout");
@@ -236,5 +221,5 @@ ROM_END
/* Driver */
-// YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS
-CONS( 1986, fb01, 0, 0, fb01, fb01, fb01_state, empty_init, "Yamaha", "FB-01", MACHINE_SUPPORTS_SAVE )
+// YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS
+CONS( 1986, fb01, 0, 0, fb01, fb01, fb01_state, empty_init, "Yamaha", "FB-01 FM Sound Generator", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/fidel_as12.cpp b/src/mame/drivers/fidel_as12.cpp
index 1e4cd37ee7e..debe3f070bf 100644
--- a/src/mame/drivers/fidel_as12.cpp
+++ b/src/mame/drivers/fidel_as12.cpp
@@ -47,7 +47,6 @@ public:
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.0")
{ }
@@ -63,7 +62,6 @@ private:
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
- required_device<generic_slot_device> m_cart;
required_ioport m_inputs;
// address maps
@@ -73,8 +71,6 @@ private:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
void update_display();
DECLARE_WRITE8_MEMBER(control_w);
@@ -104,20 +100,6 @@ void as12_state::machine_start()
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(as12_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
-// TTL/generic
-
void as12_state::update_display()
{
// 8*8(+1) chessboard leds
@@ -234,9 +216,7 @@ void as12_state::as12(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(FUNC(as12_state::cart_load));
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_scc");
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_card.cpp b/src/mame/drivers/fidel_card.cpp
index 809cc1041d4..0d4798be468 100644
--- a/src/mame/drivers/fidel_card.cpp
+++ b/src/mame/drivers/fidel_card.cpp
@@ -478,7 +478,7 @@ static INPUT_PORTS_START( brc )
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Diamonds")
PORT_START("IN.7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("BR")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("DL")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Clubs")
diff --git a/src/mame/drivers/fidel_eag68k.cpp b/src/mame/drivers/fidel_eag68k.cpp
index 4b34e968533..8a32bf40e64 100644
--- a/src/mame/drivers/fidel_eag68k.cpp
+++ b/src/mame/drivers/fidel_eag68k.cpp
@@ -190,7 +190,6 @@ public:
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.%u", 0),
m_rotate(true)
{ }
@@ -217,7 +216,6 @@ protected:
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
- optional_device<generic_slot_device> m_cart;
optional_ioport_array<2> m_inputs;
// address maps
@@ -229,8 +227,6 @@ protected:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
void update_display();
virtual DECLARE_WRITE8_MEMBER(mux_w);
@@ -315,18 +311,6 @@ private:
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(eag_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
// TTL/generic
void eag_state::update_display()
@@ -645,9 +629,7 @@ void eag_state::eag_base(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(FUNC(eag_state::cart_load));
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_scc");
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_elite.cpp b/src/mame/drivers/fidel_elite.cpp
index 070021dde02..0b1c362068a 100644
--- a/src/mame/drivers/fidel_elite.cpp
+++ b/src/mame/drivers/fidel_elite.cpp
@@ -6,6 +6,14 @@
Fidelity Elite A/S series hardware (EAS, EAG, PC)
see fidel_eag68k.cpp for 68000-based EAG hardware
+TODO:
+- add feas (original program)
+
+BTANB:
+- feasglaa locks up at boot if it was powered off in the middle of the game.
+ To resolve this, hold the Game Control button while booting to clear nvram.
+ The ROM dump was verified from 2 chesscomputers.
+
*******************************************************************************
Elite A/S Challenger (EAS)
@@ -28,7 +36,7 @@ hardware overview:
*In West Germany, some distributors released it with overclocked CPUs,
advertised as 3.2, 3.6, or 4MHz. Unmodified EAS PCB photos show only a 3MHz XTAL.
-A condensator keeps RAM contents alive for a few hours when powered off.
+A condensator/battery keeps RAM contents alive for a while when powered off.
Note that EAS doesn't have a "new game" button, it is done through game options:
Press GAME CONTROL, then place/lift a piece on D6 to restart, or D8 to reset
with default settings, then press CL.
@@ -38,11 +46,13 @@ it doesn't have the 8255 PPI, but has more RAM(7*TMM2016P). Some were released a
3.6MHz instead of 4MHz, perhaps due to hardware instability? Opening module PC16 was
included by default, this module is the same as CB16 but at different form factor.
-Elite Avant Garde (models 6081,6088,6089) is on the same hardware as EAS.
+Elite Avant Garde (models 6081,6088,6089) is on similar hardware as EAS.
-Fidelity Private Line is a modified EAS Glasgow. They took out the motherboard
-and leds and placed them a little box separate from a (ledless) magnetic chessboard.
-It was probably only released in Germany.
+Fidelity Elite Private Line were EAS/EAG conversions released by Fidelity Deutschland.
+The "Elite Privat" was probably for the local market and the "Private Line" for export.
+They took out the motherboard and leds and placed them inside a little box separate
+from a (ledless) magnetic chessboard. The ROMs were unmodified, that makes them
+uninteresting to emulate as separate drivers.
******************************************************************************/
@@ -68,7 +78,6 @@ It was probably only released in Germany.
// internal artwork
#include "fidel_eag.lh" // clickable
#include "fidel_eas.lh" // clickable
-#include "fidel_eas_priv.lh" // clickable
#include "fidel_pc.lh" // clickable
@@ -92,7 +101,6 @@ public:
m_speech(*this, "speech"),
m_speech_rom(*this, "speech"),
m_language(*this, "language"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.%u", 0),
m_rotate(false)
{ }
@@ -100,7 +108,6 @@ public:
// machine configs
void pc(machine_config &config);
void eas(machine_config &config);
- void eas_priv(machine_config &config);
protected:
virtual void machine_start() override;
@@ -115,7 +122,6 @@ protected:
required_device<s14001a_device> m_speech;
required_region_ptr<u8> m_speech_rom;
required_region_ptr<u8> m_language;
- required_device<generic_slot_device> m_cart;
required_ioport_array<2> m_inputs;
// address maps
@@ -126,8 +132,6 @@ protected:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
void update_display();
DECLARE_READ8_MEMBER(speech_r);
@@ -196,18 +200,6 @@ void eag_state::init_eag2100()
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(elite_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
// TTL/generic
void elite_state::update_display()
@@ -336,7 +328,8 @@ void elite_state::pc_map(address_map &map)
void elite_state::eas_map(address_map &map)
{
map.unmap_value_high();
- map(0x0000, 0x0fff).ram().share("nvram");
+ map(0x0000, 0x07ff).ram().share("nvram");
+ map(0x0800, 0x0fff).ram();
map(0x2000, 0x5fff).r("cartslot", FUNC(generic_slot_device::read_rom));
map(0x7000, 0x7003).rw(m_ppi8255, FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x7020, 0x7027).w(FUNC(elite_state::segment_w)).nopr();
@@ -453,9 +446,7 @@ void elite_state::pc(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(FUNC(elite_state::cart_load));
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_scc");
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
@@ -479,17 +470,6 @@ void elite_state::eas(machine_config &config)
config.set_default_layout(layout_fidel_eas);
}
-void elite_state::eas_priv(machine_config &config)
-{
- eas(config);
-
- /* basic machine hardware */
- M65C02(config.replace(), m_maincpu, 3.579545_MHz_XTAL); // UM6502C
- m_maincpu->set_addrmap(AS_PROGRAM, &elite_state::div_trampoline);
-
- config.set_default_layout(layout_fidel_eas_priv);
-}
-
void eag_state::eag(machine_config &config)
{
eas(config);
@@ -523,12 +503,12 @@ void eag_state::eag2100(machine_config &config)
ROM_START( feasbu )
ROM_REGION( 0x10000, "mainmap", 0 )
- ROM_LOAD("eli_bu.6", 0x8000, 0x0800, CRC(93dcc23b) SHA1(2eb8c5a85e566948bc256d6b1804694e6b0ffa6f) ) // ST M27C64A, unknown label
+ ROM_LOAD("hm_6", 0x8000, 0x0800, CRC(93dcc23b) SHA1(2eb8c5a85e566948bc256d6b1804694e6b0ffa6f) ) // ST M27C64A
ROM_CONTINUE( 0x9000, 0x0800 )
ROM_CONTINUE( 0x8800, 0x0800 )
ROM_CONTINUE( 0x9800, 0x0800 )
- ROM_LOAD("101-1052a02.5", 0xc000, 0x2000, CRC(859d69f1) SHA1(a8b057683369e2387f22fc7e916b6f3c75d44b21) ) // Mostek MK36C63N-5
- ROM_LOAD("101-1052a01.4", 0xe000, 0x2000, CRC(571a33a7) SHA1(43b110cf0918caf16643178f401e58b2dc73894f) ) // Mostek MK36C63N-5
+ ROM_LOAD("101-1052a02", 0xc000, 0x2000, CRC(859d69f1) SHA1(a8b057683369e2387f22fc7e916b6f3c75d44b21) ) // Mostek MK36C63N-5
+ ROM_LOAD("101-1052a01", 0xe000, 0x2000, CRC(571a33a7) SHA1(43b110cf0918caf16643178f401e58b2dc73894f) ) // Mostek MK36C63N-5
// speech ROM
ROM_DEFAULT_BIOS("en")
@@ -553,15 +533,15 @@ ROM_END
ROM_START( feasgla )
ROM_REGION( 0x10000, "mainmap", 0 )
- ROM_LOAD("eli_gla.6", 0x8000, 0x0800, CRC(2fdddb4f) SHA1(6da0a328a45462f285ae6a0756f97c5a43148f97) )
+ ROM_LOAD("4,0_8_6", 0x8000, 0x0800, CRC(32784e2d) SHA1(dae060a5c49cc1993a78db293cd80464adfd892d) )
ROM_CONTINUE( 0x9000, 0x0800 )
ROM_CONTINUE( 0x8800, 0x0800 )
ROM_CONTINUE( 0x9800, 0x0800 )
- ROM_LOAD("eli_gla.5", 0xc000, 0x0800, CRC(f094e625) SHA1(fef84c6a3da504aac15988ec9af94417e5fedfbd) )
+ ROM_LOAD("c_5", 0xc000, 0x0800, CRC(ddb80412) SHA1(b1d9435d9a71b8eb241a2169bfbaa0499f510769) )
ROM_CONTINUE( 0xd000, 0x0800 )
ROM_CONTINUE( 0xc800, 0x0800 )
ROM_CONTINUE( 0xd800, 0x0800 )
- ROM_LOAD("eli_gla.4", 0xe000, 0x0800, CRC(5f6845d1) SHA1(684eb16faf36a49560e5a73b55fd0022dc090e35) )
+ ROM_LOAD("4,0_e_4", 0xe000, 0x0800, CRC(62a5305a) SHA1(a361bd9a54b903d7b0fbacabe55ea5ccbbc1dc51) )
ROM_CONTINUE( 0xf000, 0x0800 )
ROM_CONTINUE( 0xe800, 0x0800 )
ROM_CONTINUE( 0xf800, 0x0800 )
@@ -580,24 +560,24 @@ ROM_START( feasgla )
ROMX_FILL(0, 1, 0, ROM_BIOS(3) )
ROM_REGION( 0x2000, "speech", 0 )
- ROMX_LOAD("101-32107", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d), ROM_BIOS(0) ) // NEC D2332C
+ ROMX_LOAD("101-32107", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d), ROM_BIOS(0) )
ROM_RELOAD( 0x1000, 0x1000)
ROMX_LOAD("101-64101", 0x0000, 0x2000, CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff), ROM_BIOS(1) )
ROMX_LOAD("101-64105", 0x0000, 0x2000, CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3), ROM_BIOS(2) )
ROMX_LOAD("101-64106", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9), ROM_BIOS(3) )
ROM_END
-ROM_START( fepriv )
+ROM_START( feasglaa )
ROM_REGION( 0x10000, "mainmap", 0 )
- ROM_LOAD("4,0_8.6", 0x8000, 0x0800, CRC(32784e2d) SHA1(dae060a5c49cc1993a78db293cd80464adfd892d) )
+ ROM_LOAD("p6", 0x8000, 0x0800, CRC(2fdddb4f) SHA1(6da0a328a45462f285ae6a0756f97c5a43148f97) )
ROM_CONTINUE( 0x9000, 0x0800 )
ROM_CONTINUE( 0x8800, 0x0800 )
ROM_CONTINUE( 0x9800, 0x0800 )
- ROM_LOAD("c.5", 0xc000, 0x0800, CRC(ddb80412) SHA1(b1d9435d9a71b8eb241a2169bfbaa0499f510769) )
+ ROM_LOAD("p5", 0xc000, 0x0800, CRC(f094e625) SHA1(fef84c6a3da504aac15988ec9af94417e5fedfbd) )
ROM_CONTINUE( 0xd000, 0x0800 )
ROM_CONTINUE( 0xc800, 0x0800 )
ROM_CONTINUE( 0xd800, 0x0800 )
- ROM_LOAD("4,0_e.4", 0xe000, 0x0800, CRC(62a5305a) SHA1(a361bd9a54b903d7b0fbacabe55ea5ccbbc1dc51) )
+ ROM_LOAD("p4", 0xe000, 0x0800, CRC(5f6845d1) SHA1(684eb16faf36a49560e5a73b55fd0022dc090e35) )
ROM_CONTINUE( 0xf000, 0x0800 )
ROM_CONTINUE( 0xe800, 0x0800 )
ROM_CONTINUE( 0xf800, 0x0800 )
@@ -616,7 +596,7 @@ ROM_START( fepriv )
ROMX_FILL(0, 1, 0, ROM_BIOS(3) )
ROM_REGION( 0x2000, "speech", 0 )
- ROMX_LOAD("101-32107", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d), ROM_BIOS(0) )
+ ROMX_LOAD("101-32107", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d), ROM_BIOS(0) ) // NEC D2332C
ROM_RELOAD( 0x1000, 0x1000)
ROMX_LOAD("101-64101", 0x0000, 0x2000, CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff), ROM_BIOS(1) )
ROMX_LOAD("101-64105", 0x0000, 0x2000, CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3), ROM_BIOS(2) )
@@ -778,8 +758,8 @@ ROM_END
// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS
CONS( 1983, feasbu, 0, 0, eas, eas, elite_state, empty_init, "Fidelity Electronics", "Elite A/S Challenger (Budapest program)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
-CONS( 1984, feasgla, feasbu, 0, eas, eas, elite_state, empty_init, "Fidelity Electronics", "Elite A/S Challenger (Glasgow program)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
-CONS( 1984, fepriv, feasbu, 0, eas_priv, eas, elite_state, empty_init, "Fidelity Deutschland", "Elite Private Line (red version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
+CONS( 1984, feasgla, feasbu, 0, eas, eas, elite_state, empty_init, "Fidelity Electronics", "Elite A/S Challenger (Glasgow program, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
+CONS( 1984, feasglaa, feasbu, 0, eas, eas, elite_state, empty_init, "Fidelity Electronics", "Elite A/S Challenger (Glasgow program, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
CONS( 1982, fpres, 0, 0, pc, pc, elite_state, empty_init, "Fidelity Electronics", "Prestige Challenger (original program)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
CONS( 1983, fpresbu, fpres, 0, pc, pc, elite_state, empty_init, "Fidelity Electronics", "Prestige Challenger (Budapest program)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING )
diff --git a/src/mame/drivers/fidel_sc12.cpp b/src/mame/drivers/fidel_sc12.cpp
index 81d9e395a60..9f5f5d3bdb1 100644
--- a/src/mame/drivers/fidel_sc12.cpp
+++ b/src/mame/drivers/fidel_sc12.cpp
@@ -77,7 +77,6 @@ public:
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.0")
{ }
@@ -94,7 +93,6 @@ private:
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
- required_device<generic_slot_device> m_cart;
required_ioport m_inputs;
// address maps
@@ -104,8 +102,6 @@ private:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_READ8_MEMBER(input_r);
@@ -128,20 +124,6 @@ void sc12_state::machine_start()
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(sc12_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
-// TTL/generic
-
WRITE8_MEMBER(sc12_state::control_w)
{
// d0-d3: 7442 a0-a3
@@ -253,9 +235,7 @@ void sc12_state::sc12(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(FUNC(sc12_state::cart_load));
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_scc");
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_sc6.cpp b/src/mame/drivers/fidel_sc6.cpp
index 8ffb99ef305..c5511fd0516 100644
--- a/src/mame/drivers/fidel_sc6.cpp
+++ b/src/mame/drivers/fidel_sc6.cpp
@@ -47,7 +47,6 @@ public:
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.0")
{ }
@@ -63,14 +62,11 @@ private:
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
- required_device<generic_slot_device> m_cart;
required_ioport m_inputs;
// address maps
void main_map(address_map &map);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
void update_display();
DECLARE_WRITE8_MEMBER(mux_w);
@@ -102,26 +98,6 @@ void sc6_state::machine_start()
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(sc6_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
-
- // 4KB ROM only?
- if (size != 0x1000)
- {
- image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size");
- return image_init_result::FAIL;
- }
-
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
// MCU ports/generic
void sc6_state::update_display()
@@ -242,10 +218,7 @@ void sc6_state::sc6(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_sc6", "bin");
- m_cart->set_device_load(FUNC(sc6_state::cart_load));
- m_cart->set_must_be_loaded(true);
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_sc6").set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_sc6");
}
diff --git a/src/mame/drivers/fidel_sc9.cpp b/src/mame/drivers/fidel_sc9.cpp
index 764dd048735..dd5d377bfed 100644
--- a/src/mame/drivers/fidel_sc9.cpp
+++ b/src/mame/drivers/fidel_sc9.cpp
@@ -65,7 +65,6 @@ public:
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.0")
{ }
@@ -84,7 +83,6 @@ protected:
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
- required_device<generic_slot_device> m_cart;
required_ioport m_inputs;
// address maps
@@ -95,8 +93,6 @@ protected:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
void update_display();
DECLARE_WRITE8_MEMBER(control_w);
@@ -154,20 +150,6 @@ void sc9c_state::sc9c_set_cpu_freq()
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(sc9_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
-// TTL/generic
-
void sc9_state::update_display()
{
// 8*8 chessboard leds + 1 corner led
@@ -299,9 +281,7 @@ void sc9_state::sc9d(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(FUNC(sc9_state::cart_load));
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "fidel_scc");
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp
index 10332c3008a..8e94da7359d 100644
--- a/src/mame/drivers/firefox.cpp
+++ b/src/mame/drivers/firefox.cpp
@@ -377,8 +377,8 @@ WRITE8_MEMBER(firefox_state::riot_porta_w)
WRITE8_MEMBER(firefox_state::nvram_w)
{
- m_nvram_1c->write(space, offset, data >> 4);
- m_nvram_1d->write(space, offset, data & 0xf);
+ m_nvram_1c->write(offset, data >> 4);
+ m_nvram_1d->write(offset, data & 0xf);
}
READ8_MEMBER(firefox_state::nvram_r)
diff --git a/src/mame/drivers/fitfight.cpp b/src/mame/drivers/fitfight.cpp
index 6067a24fa30..7be3be463ac 100644
--- a/src/mame/drivers/fitfight.cpp
+++ b/src/mame/drivers/fitfight.cpp
@@ -725,7 +725,7 @@ void fitfight_state::fitfight(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &fitfight_state::fitfight_main_map);
m_maincpu->set_vblank_int("screen", FUNC(fitfight_state::irq2_line_hold));
- upd7810_device &audiocpu(UPD7810(config, m_audiocpu, 12000000));
+ upd78c10_device &audiocpu(UPD78C10(config, m_audiocpu, 12000000));
audiocpu.set_addrmap(AS_PROGRAM, &fitfight_state::snd_mem);
audiocpu.pa_in_cb().set(FUNC(fitfight_state::snd_porta_r));
audiocpu.pa_out_cb().set(FUNC(fitfight_state::snd_porta_w));
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index c74e40492b5..bea9210ef2f 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -498,14 +498,14 @@ template<int Chip>
READ8_MEMBER(towns_state::towns_dma_r)
{
logerror("DMA#%01x: read register %i\n",Chip,offset);
- return m_dma[Chip]->read(space, offset);
+ return m_dma[Chip]->read(offset);
}
template<int Chip>
WRITE8_MEMBER(towns_state::towns_dma_w)
{
logerror("DMA#%01x: wrote 0x%02x to register %i\n",Chip,data,offset);
- m_dma[Chip]->write(space, offset, data);
+ m_dma[Chip]->write(offset, data);
}
/*
diff --git a/src/mame/drivers/freekick.cpp b/src/mame/drivers/freekick.cpp
index 0493f6c3d77..96068237256 100644
--- a/src/mame/drivers/freekick.cpp
+++ b/src/mame/drivers/freekick.cpp
@@ -293,6 +293,25 @@ void freekick_state::pbillrd_map(address_map &map)
map(0xfc03, 0xfc03).w("sn4", FUNC(sn76489a_device::write));
}
+void freekick_state::pbillrdbl_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0xbfff).bankr("bank1");
+ map(0xc000, 0xcfff).ram();
+ map(0xd000, 0xd7ff).ram().w(FUNC(freekick_state::freek_videoram_w)).share("videoram");
+ map(0xd800, 0xd8ff).ram().share("spriteram");
+ map(0xd900, 0xdfff).ram();
+ map(0xe000, 0xe000).portr("IN0");
+ map(0xe000, 0xe007).w(m_outlatch, FUNC(ls259_device::write_d0));
+ map(0xe800, 0xe800).portr("IN1");
+ map(0xf000, 0xf000).portr("DSW1").w(FUNC(freekick_state::pbillrd_bankswitch_w));
+ map(0xf800, 0xf800).portr("DSW2");
+ map(0xfc00, 0xfc00).w("sn1", FUNC(sn76489a_device::write));
+ // map(0xfc01, 0xfc01).w("sn2", FUNC(sn76489a_device::write)); // not populated but still writes here
+ map(0xfc02, 0xfc02).w("sn3", FUNC(sn76489a_device::write));
+ // map(0xfc03, 0xfc03).w("sn4", FUNC(sn76489a_device::write)); // not populated but still writes here
+}
+
void freekick_state::decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x7fff).bankr("bank0d");
@@ -876,6 +895,26 @@ void freekick_state::pbillrd(machine_config &config)
MCFG_MACHINE_RESET_OVERRIDE(freekick_state,freekick)
}
+void freekick_state::pbillrdbl(machine_config &config)
+{
+ pbillrd(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &freekick_state::pbillrdbl_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &freekick_state::decrypted_opcodes_map);
+ m_maincpu->set_clock(XTAL(18'432'000) / 6); // unknown divisor
+
+ // the PCB is marked to host 4 SN76489 but only two are populated (by SN76496N)
+ // however the code still writes to all 4, so it's not clear which two are missing
+
+ SN76496(config.replace(), "sn1", XTAL(18'432'000) / 6).add_route(ALL_OUTPUTS, "mono", 0.50);
+
+ SN76496(config.replace(), "sn3", XTAL(18'432'000) / 6).add_route(ALL_OUTPUTS, "mono", 0.50);
+
+ config.device_remove("sn2");
+
+ config.device_remove("sn4");
+}
+
void freekick_state::pbillrdm(machine_config &config)
{
pbillrd(config);
@@ -1054,6 +1093,34 @@ ROM_START( pbillrdsa ) /* all ROMs were HN4827128G-25, except 17, HN27256G-25, C
ROM_LOAD( "82s129.3c", 0x0500, 0x0100, CRC(cc1657e5) SHA1(358f20dce376c2389009f9673ce38b297af863f6) )
ROM_END
+ROM_START( pbillrdbl ) // 87-16-12 on PCB
+ ROM_REGION( 0x20000, "maincpu", 0 )
+ ROM_LOAD( "7-27128.8n", 0x10000, 0x4000, CRC(f9ef8bcd) SHA1(30f9c54ca8aee7d7d23c1c5e040d9d917f92f503) ) // marked on PCB as 27128, actually 27256
+ ROM_CONTINUE( 0x00000, 0x4000)
+ ROM_LOAD( "8-27256.8r", 0x14000, 0x8000, CRC(63e85ec6) SHA1(1ccc8de52e2618b9c1438941ddd44b78f0b66a6c) ) // marked on PCB as 27256, actually 27512
+ ROM_CONTINUE( 0x04000, 0x8000)
+ ROM_LOAD( "9-27256.10n", 0x1c000, 0x4000, CRC(7ae4866f) SHA1(771aa1f1cf1c1efb0d27e8b7d6a230101abf3303) )
+ ROM_CONTINUE( 0x0c000, 0x4000)
+
+ ROM_REGION( 0xc000, "gfx1", 0 )
+ ROM_LOAD( "4-2764-128.3j", 0x000000, 0x04000, CRC(23b864ac) SHA1(5a13ad6f2278761967269eed8c07077293c921d6) )
+ ROM_LOAD( "5-2764-128.3h", 0x004000, 0x04000, CRC(3dbfb790) SHA1(81a2645b7b3addf8f5b83043c967647cea476002) )
+ ROM_LOAD( "6-2764-128.3f", 0x008000, 0x04000, CRC(b80032a9) SHA1(20096bdae1aad8913d8d7b1045912ea5ae7fce6f) )
+
+ ROM_REGION( 0x6000, "gfx2", 0 )
+ ROM_LOAD( "1-27125-64.3r", 0x000000, 0x02000, CRC(3296b9d9) SHA1(51393306f74394de96c4097b6244e8eb36114dac) )
+ ROM_LOAD( "3-27128-64.3m", 0x002000, 0x02000, CRC(3dca8e4b) SHA1(ca0416d8faba0bb5e6b8c0a8fc227b57caa75f71) )
+ ROM_LOAD( "2-27128-64.3n", 0x004000, 0x02000, CRC(ee76b079) SHA1(99abe2c5b1889d20bc3f5720b168690e3979fb2f) )
+
+ ROM_REGION( 0x0600, "proms", 0 )
+ ROM_LOAD( "dm74s287n.3a", 0x0000, 0x0100, CRC(44802169) SHA1(f181d80185e0f87ee906d2b40e3a5deb6f563aa2) )
+ ROM_LOAD( "dm74s287n.4d", 0x0100, 0x0100, CRC(69ca07cc) SHA1(38ab08174633b53d70a38aacb40059a25cf12069) )
+ ROM_LOAD( "dm74s287n.4a", 0x0200, 0x0100, CRC(145f950a) SHA1(b007d0c1cc9545e0e241b39b79a48593d457f826) )
+ ROM_LOAD( "dm74s287n.3d", 0x0300, 0x0100, CRC(43d24e17) SHA1(de5c9391574781dcd8f244794010e8eddffa1c1e) )
+ ROM_LOAD( "dm74s287n.3b", 0x0400, 0x0100, CRC(7fdc872c) SHA1(98572560aa524490489d4202dba292a5af9f15e7) )
+ ROM_LOAD( "dm74s287n.3c", 0x0500, 0x0100, CRC(cc1657e5) SHA1(358f20dce376c2389009f9673ce38b297af863f6) )
+ROM_END
+
/*
The original Freekick boards have the main CPU code inside a custom CPU "block". This code is stored in battery
@@ -1538,6 +1605,14 @@ void freekick_state::init_pbillrds()
m_bank1d->configure_entries(0, 2, decrypted_opcodes + 0x8000, 0x4000);
}
+
+void freekick_state::init_pbillrdbl()
+{
+ membank("bank0d")->set_base(memregion("maincpu")->base() + 0x10000);
+ m_bank1d->configure_entries(0, 2, memregion("maincpu")->base() + 0x18000, 0x4000);
+}
+
+
void freekick_state::init_gigas()
{
uint8_t *decrypted_opcodes = auto_alloc_array(machine(), uint8_t, 0xc000);
@@ -1553,22 +1628,23 @@ void freekick_state::init_gigas()
* Game driver(s)
*
*************************************/
-// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
-GAME( 1986, gigas, 0, gigasm, gigas, freekick_state, init_gigas, ROT270, "Sega", "Gigas (MC-8123, 317-5002)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, gigasb, gigas, gigas, gigas, freekick_state, init_gigasb, ROT270, "bootleg", "Gigas (bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, oigas, gigas , oigas, gigas, freekick_state, init_gigasb, ROT270, "bootleg", "Oigas (bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, gigasm2, 0, gigasm, gigasm2, freekick_state, init_gigas, ROT270, "Sega", "Gigas Mark II (MC-8123, 317-5002)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, gigasm2b, gigasm2, gigas, gigasm2, freekick_state, init_gigasb, ROT270, "bootleg", "Gigas Mark II (bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, omega, 0, omega, omega, freekick_state, init_gigas, ROT270, "Nihon System", "Omega", MACHINE_SUPPORTS_SAVE ) // Bug fix version
-GAME( 1986, omegaa, omega, omega, omega, freekick_state, init_gigas, ROT270, "Nihon System", "Omega (earlier)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, pbillrd, 0, pbillrd, pbillrd, freekick_state, empty_init, ROT0, "Nihon System", "Perfect Billiard", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, pbillrds, pbillrd, pbillrdm, pbillrd, freekick_state, init_pbillrds, ROT0, "Nihon System", "Perfect Billiard (MC-8123, 317-0030)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, pbillrdsa, pbillrd, pbillrdm, pbillrd, freekick_state, init_pbillrds, ROT0, "Nihon System", "Perfect Billiard (MC-8123, 317-5008)", MACHINE_SUPPORTS_SAVE ) // sticker on CPU module different (wrong?) functionality the same
-GAME( 1987, freekick, 0, freekick, freekick, freekick_state, empty_init, ROT270, "Nihon System (Merit license)", "Free Kick (NS6201-A 1987.10)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, freekicka, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "Nihon System", "Free Kick (NS6201-A 1987.9)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, freekickb1, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "bootleg", "Free Kick (bootleg set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, freekickb2, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "bootleg", "Free Kick (bootleg set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, freekickb3, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "bootleg", "Free Kick (bootleg set 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, countrun, 0, freekick, countrun, freekick_state, empty_init, ROT0, "Nihon System (Sega license)", "Counter Run (NS6201-A 1988.3)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // CPU module not dumped
-GAME( 1988, countrunb, countrun, freekick, countrun, freekick_state, empty_init, ROT0, "bootleg", "Counter Run (bootleg set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, countrunb2, countrun, freekick, countrun, freekick_state, empty_init, ROT0, "bootleg", "Counter Run (bootleg set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
+GAME( 1986, gigas, 0, gigasm, gigas, freekick_state, init_gigas, ROT270, "Sega", "Gigas (MC-8123, 317-5002)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, gigasb, gigas, gigas, gigas, freekick_state, init_gigasb, ROT270, "bootleg", "Gigas (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, oigas, gigas , oigas, gigas, freekick_state, init_gigasb, ROT270, "bootleg", "Oigas (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, gigasm2, 0, gigasm, gigasm2, freekick_state, init_gigas, ROT270, "Sega", "Gigas Mark II (MC-8123, 317-5002)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, gigasm2b, gigasm2, gigas, gigasm2, freekick_state, init_gigasb, ROT270, "bootleg", "Gigas Mark II (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, omega, 0, omega, omega, freekick_state, init_gigas, ROT270, "Nihon System", "Omega", MACHINE_SUPPORTS_SAVE ) // Bug fix version
+GAME( 1986, omegaa, omega, omega, omega, freekick_state, init_gigas, ROT270, "Nihon System", "Omega (earlier)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, pbillrd, 0, pbillrd, pbillrd, freekick_state, empty_init, ROT0, "Nihon System (United Artists license)", "Perfect Billiard", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, pbillrds, pbillrd, pbillrdm, pbillrd, freekick_state, init_pbillrds, ROT0, "Nihon System (Sega license)", "Perfect Billiard (MC-8123, 317-0030)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, pbillrdsa, pbillrd, pbillrdm, pbillrd, freekick_state, init_pbillrds, ROT0, "Nihon System (Sega license)", "Perfect Billiard (MC-8123, 317-5008)", MACHINE_SUPPORTS_SAVE ) // sticker on CPU module different (wrong?) functionality the same
+GAME( 1987, pbillrdbl, pbillrd, pbillrdbl, pbillrd, freekick_state, init_pbillrdbl, ROT0, "bootleg", "Perfect Billiard (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, freekick, 0, freekick, freekick, freekick_state, empty_init, ROT270, "Nihon System (Merit license)", "Free Kick (NS6201-A 1987.10)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, freekicka, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "Nihon System", "Free Kick (NS6201-A 1987.9)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, freekickb1, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "bootleg", "Free Kick (bootleg set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, freekickb2, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "bootleg", "Free Kick (bootleg set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, freekickb3, freekick, freekick, freekick, freekick_state, empty_init, ROT270, "bootleg", "Free Kick (bootleg set 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, countrun, 0, freekick, countrun, freekick_state, empty_init, ROT0, "Nihon System (Sega license)", "Counter Run (NS6201-A 1988.3)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // CPU module not dumped
+GAME( 1988, countrunb, countrun, freekick, countrun, freekick_state, empty_init, ROT0, "bootleg", "Counter Run (bootleg set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, countrunb2, countrun, freekick, countrun, freekick_state, empty_init, ROT0, "bootleg", "Counter Run (bootleg set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/funkyjet.cpp b/src/mame/drivers/funkyjet.cpp
index 95ce63c39fb..10eca71983d 100644
--- a/src/mame/drivers/funkyjet.cpp
+++ b/src/mame/drivers/funkyjet.cpp
@@ -336,8 +336,6 @@ void funkyjet_state::funkyjet(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp
index 37b997a43ef..cedfc39c24e 100644
--- a/src/mame/drivers/galaga.cpp
+++ b/src/mame/drivers/galaga.cpp
@@ -820,7 +820,7 @@ WRITE8_MEMBER(digdug_state::earom_write)
m_earom->set_data(data);
}
-WRITE8_MEMBER(digdug_state::earom_control_w)
+void digdug_state::earom_control_w(uint8_t data)
{
// CK = DB0, C1 = /DB1, C2 = DB2, CS1 = DB3, /CS2 = GND
m_earom->set_control(BIT(data, 3), 1, !BIT(data, 1), BIT(data, 2));
@@ -841,7 +841,7 @@ void galaga_state::machine_start()
void digdug_state::machine_start()
{
galaga_state::machine_start();
- earom_control_w(machine().dummy_space(), 0, 0);
+ earom_control_w(0);
}
void galaga_state::machine_reset()
diff --git a/src/mame/drivers/galaxia.cpp b/src/mame/drivers/galaxia.cpp
index ab3f669d106..beff496823a 100644
--- a/src/mame/drivers/galaxia.cpp
+++ b/src/mame/drivers/galaxia.cpp
@@ -87,7 +87,7 @@ WRITE_LINE_MEMBER(galaxia_state::vblank_irq)
{
if (state)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
cvs_scroll_stars();
}
}
@@ -309,6 +309,7 @@ void galaxia_state::galaxia(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &galaxia_state::galaxia_data_map);
m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));
m_maincpu->flag_handler().set(FUNC(galaxia_state::write_s2650_flag));
+ m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -351,6 +352,7 @@ void galaxia_state::astrowar(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &galaxia_state::galaxia_data_map);
m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));
m_maincpu->flag_handler().set(FUNC(galaxia_state::write_s2650_flag));
+ m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp
index 550a56d96ea..087b20094d9 100644
--- a/src/mame/drivers/galaxold.cpp
+++ b/src/mame/drivers/galaxold.cpp
@@ -2588,6 +2588,7 @@ void galaxold_state::drivfrcg(machine_config &config)
maincpu.set_addrmap(AS_IO, &galaxold_state::drivfrcg_io);
maincpu.set_vblank_int("screen", FUNC(galaxold_state::hunchbks_vh_interrupt));
maincpu.sense_handler().set("screen", FUNC(screen_device::vblank)); // ???
+ maincpu.intack_handler().set_constant(0x03);
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -2636,10 +2637,10 @@ void galaxold_state::hunchbkg(machine_config &config)
galaxold_base(config);
/* basic machine hardware */
- S2650(config.replace(), m_maincpu, PIXEL_CLOCK / 4);
- m_maincpu->set_addrmap(AS_PROGRAM, &galaxold_state::hunchbkg_map);
- m_maincpu->set_addrmap(AS_DATA, &galaxold_state::hunchbkg_data);
- m_maincpu->set_irq_acknowledge_callback(FUNC(galaxold_state::hunchbkg_irq_callback));
+ s2650_device &s2650(S2650(config.replace(), m_maincpu, PIXEL_CLOCK / 4));
+ s2650.set_addrmap(AS_PROGRAM, &galaxold_state::hunchbkg_map);
+ s2650.set_addrmap(AS_DATA, &galaxold_state::hunchbkg_data);
+ s2650.intack_handler().set(FUNC(galaxold_state::hunchbkg_intack));
/* the nmi line seems to be inverted on the cpu plugin board */
m_7474_9m_1->comp_output_cb().set_inputline("maincpu", S2650_SENSE_LINE);
@@ -2677,6 +2678,7 @@ void galaxold_state::racknrol(machine_config &config)
maincpu.sense_handler().set(m_screen, FUNC(screen_device::vblank)).invert(); // ???
// FIXME: kill the following line - convert to a screen vblank callback
maincpu.set_vblank_int("screen", FUNC(galaxold_state::hunchbks_vh_interrupt));
+ maincpu.intack_handler().set_constant(0x03);
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_galaxian);
@@ -2705,6 +2707,7 @@ void galaxold_state::hexpoola(machine_config &config)
maincpu.sense_handler().set(m_screen, FUNC(screen_device::vblank)).invert(); // ???
// FIXME: kill the following line - convert to a screen vblank callback
maincpu.set_vblank_int("screen", FUNC(galaxold_state::hunchbks_vh_interrupt));
+ maincpu.intack_handler().set_constant(0x03);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_galaxian);
PALETTE(config, m_palette, FUNC(galaxold_state::rockclim_palette), 32);
diff --git a/src/mame/drivers/gijoe.cpp b/src/mame/drivers/gijoe.cpp
index b2359cbdc59..5552c73489a 100644
--- a/src/mame/drivers/gijoe.cpp
+++ b/src/mame/drivers/gijoe.cpp
@@ -427,6 +427,70 @@ ROM_START( gijoeu )
ROM_LOAD( "er5911.7d", 0x0000, 0x080, CRC(ca966023) SHA1(6f07ece0f95213bc12387192986f468d23dfdfc8) ) // sldh
ROM_END
+ROM_START( gijoeua ) // this uses a standard GX069 main PCB, but the GFX ROMs are moved to the 'ROM BOARD MAX352M PWB 352673'
+ ROM_REGION( 0x100000, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "069uaa03.14e", 0x000000, 0x40000, CRC(cfb1af44) SHA1(b4e68dbead19a5211778345330739cfcb37011ab) )
+ ROM_LOAD16_BYTE( "069uaa02.18e", 0x000001, 0x40000, CRC(3e6a56cd) SHA1(df719197dc001e80be8d04ced68f8937a9d6d1fe) )
+ ROM_LOAD16_BYTE( "069a12.13e", 0x080000, 0x40000, CRC(75a7585c) SHA1(443d6dee99edbe81ab1b7289e6cad403fe01cc0d) )
+ ROM_LOAD16_BYTE( "069a11.16e", 0x080001, 0x40000, CRC(3153e788) SHA1(fde4543eac707ef24b431e64011cf0f923d4d3ac) )
+
+ ROM_REGION( 0x010000, "audiocpu", 0 )
+ ROM_LOAD( "069a01.7c", 0x000000, 0x010000, CRC(74172b99) SHA1(f5e0e0d43317454fdacd3df7cd3035fcae4aef68) )
+
+ // the GFX ROMs are smaller and believed to have the same content as the other sets, in fact the game runs fine. Still better to have them dumped
+ // only 4 GFX ROMs were dumped from this PCB because the others are soldered ant the dumper didn't want to risk damage
+ ROM_REGION( 0x200000, "k056832", 0 )
+ ROM_LOAD32_BYTE( "069a10al.d7", 0x000000, 0x40000, NO_DUMP )
+ ROM_LOAD32_BYTE( "069a10ah.d9", 0x000001, 0x40000, NO_DUMP )
+ ROM_LOAD32_BYTE( "069a09al.d3", 0x000002, 0x40000, NO_DUMP )
+ ROM_LOAD32_BYTE( "069a09ah.d5", 0x000003, 0x40000, NO_DUMP )
+ ROM_LOAD32_BYTE( "069a10bl.j7", 0x100000, 0x40000, CRC(087d8e25) SHA1(b26eca0f96c91c18143b5e7a77aaf3831e935d5e) )
+ ROM_LOAD32_BYTE( "069a10bh.j9", 0x100001, 0x40000, CRC(fc7ad198) SHA1(ef9b834af04b78aa1c205e1c63da0fdec07783bb) )
+ ROM_LOAD32_BYTE( "069a09bl.j3", 0x100002, 0x40000, CRC(385217cc) SHA1(3b1fa53fde8e500e5e06a16a2ae71457c23a73a4) )
+ ROM_LOAD32_BYTE( "069a09bh.j5", 0x100003, 0x40000, CRC(c6d43c8a) SHA1(5bbb6c8d160e32097f2327ae3708037a9b9543f3) )
+ // overlay standard ROMs for now
+ ROM_LOAD32_WORD( "069a10.18j", 0x000000, 0x100000, BAD_DUMP CRC(4c6743ee) SHA1(fa94fbfb55955fdb40705e79b49103676961d919) )
+ ROM_LOAD32_WORD( "069a09.16j", 0x000002, 0x100000, BAD_DUMP CRC(e6e36b05) SHA1(fecad503f2c285b2b0312e888c06dd6e87f95a07) )
+
+ ROM_REGION( 0x400000, "k053246", 0 )
+ ROM_LOAD64_BYTE( "069a08al.k3", 0x000000, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a08ah.n3", 0x000001, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a05al.k5", 0x000002, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a05ah.n5", 0x000003, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a07al.k7", 0x000004, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a07ah.n7", 0x000005, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a06al.k9", 0x000006, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a06ah.n9", 0x000007, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a08bl.l3", 0x200000, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a08bh.p3", 0x200001, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a05bl.l5", 0x200002, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a05bh.p5", 0x200003, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a07bl.l7", 0x200004, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a07bh.p7", 0x200005, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a06bl.l9", 0x200006, 0x40000, NO_DUMP )
+ ROM_LOAD64_BYTE( "069a06bh.p9", 0x200007, 0x40000, NO_DUMP )
+ // overlay standard ROMs for now
+ ROM_LOAD64_WORD( "069a08.6h", 0x000000, 0x100000, BAD_DUMP CRC(325477d4) SHA1(140c57b0ac9e5cf702d788f416408a5eeb5d6d3c) )
+ ROM_LOAD64_WORD( "069a05.1h", 0x000002, 0x100000, BAD_DUMP CRC(c4ab07ed) SHA1(dc806eff00937d9465b1726fae8fdc3022464a28) )
+ ROM_LOAD64_WORD( "069a07.4h", 0x000004, 0x100000, BAD_DUMP CRC(ccaa3971) SHA1(16989cbbd65fe1b41c4a85fea02ba1e9880818a9) )
+ ROM_LOAD64_WORD( "069a06.2h", 0x000006, 0x100000, BAD_DUMP CRC(63eba8e1) SHA1(aa318d356c2580765452106ea0d2228273a90523) )
+
+ ROM_REGION( 0x200000, "k054539", 0 )
+ ROM_LOAD( "069a04a.g2", 0x000000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04b.j2", 0x040000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04c.k2", 0x080000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04d.l2", 0x0c0000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04e.n2", 0x100000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04f.p2", 0x140000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04g.r2", 0x180000, 0x40000, NO_DUMP )
+ ROM_LOAD( "069a04h.s2", 0x1c0000, 0x40000, NO_DUMP )
+ // overlay standard ROM for now
+ ROM_LOAD( "069a04a.1e", 0x000000, 0x200000, BAD_DUMP CRC(11d6dcd6) SHA1(04cbff9f61cd8641db538db809ddf20da29fd5ac) )
+
+ ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error
+ ROM_LOAD( "er5911.7d", 0x0000, 0x080, CRC(33b07813) SHA1(aa4df1b4265e24cb79d1405dfdf5998689f6561e) ) // sldh
+ROM_END
+
ROM_START( gijoej )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD16_BYTE( "069jaa03.14e", 0x000000, 0x40000, CRC(4b398901) SHA1(98fcc6ae9cc69c67d82eb1a7ab0bb71e61aee623) )
@@ -485,5 +549,6 @@ ROM_END
GAME( 1992, gijoe, 0, gijoe, gijoe, gijoe_state, empty_init, ROT0, "Konami", "G.I. Joe (World, EAB, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, gijoeea, gijoe, gijoe, gijoe, gijoe_state, empty_init, ROT0, "Konami", "G.I. Joe (World, EB8, prototype?)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, gijoeu, gijoe, gijoe, gijoe, gijoe_state, empty_init, ROT0, "Konami", "G.I. Joe (US, UAB)", MACHINE_SUPPORTS_SAVE )
+GAME( 1992, gijoeua, gijoe, gijoe, gijoe, gijoe_state, empty_init, ROT0, "Konami", "G.I. Joe (US, UAA)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, gijoej, gijoe, gijoe, gijoe, gijoe_state, empty_init, ROT0, "Konami", "G.I. Joe (Japan, JAA)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, gijoea, gijoe, gijoe, gijoe, gijoe_state, empty_init, ROT0, "Konami", "G.I. Joe (Asia, AA)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/gmaster.cpp b/src/mame/drivers/gmaster.cpp
index 50d263337ce..578c4373e6d 100644
--- a/src/mame/drivers/gmaster.cpp
+++ b/src/mame/drivers/gmaster.cpp
@@ -6,7 +6,7 @@
#include "emu.h"
-#include "cpu/upd7810/upd7810.h"
+#include "cpu/upd7810/upd7811.h"
#include "sound/spkrdev.h"
#include "bus/generic/slot.h"
@@ -241,7 +241,7 @@ WRITE8_MEMBER(gmaster_state::gmaster_portf_w)
void gmaster_state::gmaster_mem(address_map &map)
{
- map(0x0000, 0x3fff).rom();
+ //map(0x0000, 0x3fff).rom();
map(0x4000, 0x7fff).rw(FUNC(gmaster_state::gmaster_io_r), FUNC(gmaster_state::gmaster_io_w));
//map(0x8000, 0xfeff) // mapped by the cartslot
}
@@ -329,7 +329,7 @@ void gmaster_state::machine_start()
void gmaster_state::gmaster(machine_config &config)
{
- upd7810_device &upd(UPD7810(config, m_maincpu, 12_MHz_XTAL/2/*?*/)); // µPD78C11 in the unit
+ upd78c11_device &upd(UPD78C11(config, m_maincpu, 12_MHz_XTAL/2/*?*/)); // µPD78C11 in the unit
upd.set_addrmap(AS_PROGRAM, &gmaster_state::gmaster_mem);
upd.pa_in_cb().set_ioport("JOY");
upd.pb_in_cb().set(FUNC(gmaster_state::gmaster_portb_r));
@@ -362,7 +362,7 @@ void gmaster_state::gmaster(machine_config &config)
ROM_START(gmaster)
- ROM_REGION(0x10000,"maincpu", 0)
+ ROM_REGION(0x1000,"maincpu", 0)
ROM_LOAD("d78c11agf_e19.u1", 0x0000, 0x1000, CRC(05cc45e5) SHA1(05d73638dea9657ccc2791c0202d9074a4782c1e) )
ROM_END
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index 29040e3793e..9f87e540ee4 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -4901,7 +4901,7 @@ READ8_MEMBER(blitz_state::cpubank_decrypt_r)
WRITE8_MEMBER(blitz_state::mcu_command_w)
{
- m_mcu->pa_w(space, 0, data);
+ m_mcu->pa_w(data);
if (BIT(m_portc_data, 0))
{
m_mcu->set_input_line(M6805_IRQ_LINE, ASSERT_LINE);
diff --git a/src/mame/drivers/gumbo.cpp b/src/mame/drivers/gumbo.cpp
index af7d7307055..a81397336cb 100644
--- a/src/mame/drivers/gumbo.cpp
+++ b/src/mame/drivers/gumbo.cpp
@@ -356,7 +356,7 @@ ROM_START( mspuzzlea ) /* sticker on PCB stated: MISS PUZZLE V ..8 */
ROM_LOAD( "u210.bin", 0x00000, 0x40000, CRC(0a223a38) SHA1(e5aefbdbb09c18cc230bc852df3ea1defb1a21a8) )
ROM_REGION( 0x200000, "gfx1", 0 )
- ROM_LOAD( "u421.u421", 0x000000, 0x80000, CRC(52b67ee5) SHA1(209fdf845c5ef2e65fbc0de8aeb26562b6d033ab) ) /* several more explicit pictures have been relaced compared to the set below */
+ ROM_LOAD( "u421.u421", 0x000000, 0x80000, CRC(52b67ee5) SHA1(209fdf845c5ef2e65fbc0de8aeb26562b6d033ab) ) /* several more explicit pictures have been replaced compared to the set below */
ROM_LOAD( "u420.u420", 0x100000, 0x80000, CRC(3565696e) SHA1(5234dc25f73e6245b199071fa3a9c0d2367cae9f) ) /* Starting with 204 & 205, as well as many in 300 range */
ROM_LOAD( "u425.u425", 0x080000, 0x80000, CRC(933544e3) SHA1(d77b1050c4b56d0fd3be703bec961863d5188484) )
ROM_LOAD( "u426.u426", 0x180000, 0x80000, CRC(e458eb9d) SHA1(bead05ec57d97c86ed727b2c4b95f8ffdbd7ef4c) )
diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp
index 7237a8033ef..3798c8fc3c4 100644
--- a/src/mame/drivers/h8.cpp
+++ b/src/mame/drivers/h8.cpp
@@ -54,6 +54,7 @@ Official test program from pages 4 to 8 of the operator's manual:
#include "sound/beep.h"
#include "speaker.h"
+#include "formats/h8_cas.h"
#include "h8.lh"
@@ -343,6 +344,7 @@ void h8_state::h8(machine_config &config)
cassette_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc));
CASSETTE(config, m_cass);
+ m_cass->set_formats(h8_cassette_formats);
m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
m_cass->add_route(ALL_OUTPUTS, "mono", 0.05);
m_cass->set_interface("h8_cass");
diff --git a/src/mame/drivers/hazeltin.cpp b/src/mame/drivers/hazeltin.cpp
index 827ac527939..5494c9e3b48 100644
--- a/src/mame/drivers/hazeltin.cpp
+++ b/src/mame/drivers/hazeltin.cpp
@@ -346,12 +346,12 @@ WRITE8_MEMBER( hazl1500_state::status_reg_3_w )
READ8_MEMBER( hazl1500_state::uart_r )
{
- return (m_uart->get_received_data() & 0x7f) | (m_uart->pe_r() << 7);
+ return (m_uart->receive() & 0x7f) | (m_uart->pe_r() << 7);
}
WRITE8_MEMBER( hazl1500_state::uart_w )
{
- m_uart->set_transmit_data((data & 0x7f) | (BIT(m_misc_dips->read(), 3) ? 0x00 : 0x80));
+ m_uart->transmit((data & 0x7f) | (BIT(m_misc_dips->read(), 3) ? 0x00 : 0x80));
}
READ8_MEMBER( hazl1500_state::kbd_status_latch_r )
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 67122745788..cf1d5d91b88 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -8,64 +8,66 @@
known chips:
- serial device etc.
+ serial device etc.
----------------------------------------------------------------
- @07 HD38750A 1979, Bambino Knock-Em Out Boxing (ET-06B)
- @08 HD38750A 1979, Bambino Dribble Away Basketball (ET-05)
- @45 HD38750A 1981, VTech Invaders
- *56 HD38750A 1981, Actronics(Hanzawa) Twinvader (small brown version)
- *58 HD38750A 1981, Actronics(Hanzawa) Challenge Racer/Ludotronic(Hanzawa) Grand Prix Turbo
- *62 HD38750A 1982, Actronics(Hanzawa) Pack'n Maze
-
- @04 HD38800A 1980, Gakken Heiankyo Alien
- @25 HD38800A 1981, Coleco Alien Attack
- @27 HD38800A 1981, Bandai Packri Monster
- @31 HD38800A 1981, Entex Select-a-Game cartridge: Space Invader 2
- @37 HD38800A 1981, Entex Select-a-Game cartridge: Baseball 4
- @38 HD38800A 1981, Entex Select-a-Game cartridge: Pinball
- *41 HD38800A 1982, Gakken Puck Monster
- *51 HD38800A 1981, Actronics(Hanzawa) Twinvader (larger white version)
- @70 HD38800A 1982, Coleco Galaxian
- @73 HD38800A 1982, Mattel Star Hawk (PT-317B)
- @77 HD38800A 1982, Bandai Frisky Tom (PT-327A)
- @88 HD38800A 1984, Tomy Tron (THN-02)
-
- @01 HD38800B 1982, Gakken Crazy Kong
- @19 HD38800B 1982, Bandai Zaxxon
- @23 HD38800B 1982, Tomy Kingman (THF-01II)
- *24 HD38800B 1982, Actronics(Hanzawa) Wanted G-Man
- *29 HD38800B 1984, Tomy Portable 6000 Bombman
- *31 HD38800B 1983, Gongoll Frog Prince (ET-806)
- *35 HD38800B 1983, Bandai Gundam vs Gelgoog Zaku
- @43 HD38800B 1983, Bandai Dokodemo Dorayaki Doraemon (PT-412)
- @52 HD38800B 1983, Bandai Ultraman Monster Battle (PT-424)
-
- @09 HD38820A 1980, Mattel World Championship Baseball
- @13 HD38820A 1981, Entex Galaxian 2
- @23 HD38820A 1981, Entex Pac Man 2
- @28 HD38820A 1981, Coleco Pac-Man (ver 1)
- @29 HD38820A 1981, Coleco Pac-Man (ver 2)
- *32 HD38820A 198?, Gakken Super Cobra
- *38 HD38820A 1982, Entex Crazy Climber
- @42 HD38820A 1982, Entex Stargate
- @43 HD38820A 1982, Entex Turtles
- @45 HD38820A 1982, Coleco Donkey Kong
- @49 HD38820A 1983, Bandai Zackman
- @61 HD38820A 1983, Coleco Ms. Pac-Man
- @63 HD38820A 1983, Bandai Pengo
- @65 HD38820A 1983, Bandai Burger Time (PT-389)
- @69 HD38820A 1983, Gakken Dig Dug
- @70 HD38820A 1983, Parker Brothers Q*Bert
- @85 HD38820A 1984, Bandai Machine Man (PT-438)
- @88 HD38820A 1984, Bandai Pair Match (PT-460) (1/2)
- @89 HD38820A 1984, Bandai Pair Match (PT-460) (2/2)
-
- 75 HD44801A 1982, Alpha 8201 protection MCU -> machine/alpha8201.*
-
- 35 HD44801B 1983, Alpha 8302 protection MCU (see 8201)
- 42 HD44801B 1984, Alpha 8303 protection MCU (see 8201)
-
- *89 HD44801C 1985, CXG Advanced Portachess
+ @A07 HD38750 1979, Bambino Knock-Em Out Boxing (ET-06B)
+ @A08 HD38750 1979, Bambino Dribble Away Basketball (ET-05)
+ @A45 HD38750 1981, VTech Invaders
+ *A56 HD38750 1981, Actronics(Hanzawa) Twinvader (small brown version)
+ *A58 HD38750 1981, Actronics(Hanzawa) Challenge Racer/Ludotronic(Hanzawa) Grand Prix Turbo
+ *A62 HD38750 1982, Actronics(Hanzawa) Pack'n Maze
+
+ @A04 HD38800 1980, Gakken Heiankyo Alien
+ @A25 HD38800 1981, Coleco Alien Attack
+ @A27 HD38800 1981, Bandai Packri Monster
+ A31 HD38800 1981, Entex Select-A-Game cartridge: Space Invader 2 -> sag.cpp
+ A37 HD38800 1981, Entex Select-A-Game cartridge: Baseball 4 -> "
+ A38 HD38800 1981, Entex Select-A-Game cartridge: Pinball -> "
+ *A41 HD38800 1982, Gakken Puck Monster
+ *A42 HD38800 1981, Akai GX-77
+ *A51 HD38800 1981, Actronics(Hanzawa) Twinvader (larger white version)
+ @A70 HD38800 1982, Coleco Galaxian
+ @A73 HD38800 1982, Mattel Star Hawk (PT-317B)
+ @A77 HD38800 1982, Bandai Frisky Tom (PT-327A)
+ @A88 HD38800 1982, Tomy Tron (THN-02)
+ @B01 HD38800 1982, Gakken Crazy Kong
+ @B19 HD38800 1982, Bandai Zaxxon
+ @B23 HD38800 1982, Tomy Kingman (THF-01II)
+ *B24 HD38800 1982, Actronics(Hanzawa) Wanted G-Man
+ *B29 HD38800 1984, Tomy Portable 6000 Bombman
+ *B31 HD38800 1983, Gongoll Frog Prince (ET-806)
+ *B35 HD38800 1983, Bandai Gundam vs Gelgoog Zaku
+ @B43 HD38800 1983, Bandai Dokodemo Dorayaki Doraemon (PT-412)
+ @B52 HD38800 1983, Bandai Ultraman Monster Battle (PT-424)
+
+ @A09 HD38820 1980, Mattel World Championship Baseball
+ @A13 HD38820 1981, Entex Galaxian 2
+ @A23 HD38820 1981, Entex Pac Man 2
+ @A28 HD38820 1981, Coleco Pac-Man (ver 1)
+ @A29 HD38820 1981, Coleco Pac-Man (ver 2)
+ *A32 HD38820 198?, Gakken Super Cobra
+ *A38 HD38820 1982, Entex Crazy Climber
+ @A42 HD38820 1982, Entex Stargate
+ @A43 HD38820 1982, Entex Turtles
+ @A45 HD38820 1982, Coleco Donkey Kong
+ @A49 HD38820 1983, Bandai Zackman
+ @A61 HD38820 1983, Coleco Ms. Pac-Man
+ @A63 HD38820 1983, Bandai Pengo
+ @A65 HD38820 1983, Bandai Burger Time (PT-389)
+ @A69 HD38820 1983, Gakken Dig Dug
+ @A70 HD38820 1983, Parker Brothers Q*Bert
+ @A85 HD38820 1984, Bandai Machine Man (PT-438)
+ @A88 HD38820 1984, Bandai Pair Match (PT-460) (1/2)
+ @A89 HD38820 1984, Bandai Pair Match (PT-460) (2/2)
+
+ A75 HD44801 1982, Alpha 8201 protection MCU -> machine/alpha8201.*
+ B35 HD44801 1983, Alpha 8302 protection MCU (see 8201)
+ B42 HD44801 1983, Alpha 8303 protection MCU (see 8201)
+ *B43 HD44801 1983, Alpha 8304 protection MCU (see 8201)
+ C57 HD44801 1985, Alpha 8505 protection MCU (see 8201)
+ *C89 HD44801 1986, CXG Computachess IV
+
+ *A14 HD44840 1982, CXG Advanced Portachess
(* means undumped unless noted, @ denotes it's in this driver)
@@ -77,6 +79,9 @@
Or it could be a race condition: irq happening too late/early.
- epacman2 booting the game in demo mode, pacman should go straight to the
upper-left power pill: mcu cycle/interrupt timing related
+ - kevtris's HMCS40 ROM dumps are incomplete, missing MCU factory test code from
+ the 2nd half of the ROM, none of the games access it though and it's impossible
+ to execute unless the chip is in testmode.
- Though very uncommon when compared to games with LED/lamp display, some
games may manipulate VFD plate brightness by strobing it longer/shorter,
eg. cgalaxn when a ship explodes.
@@ -97,7 +102,6 @@
// internal artwork (complete)
#include "pairmtch.lh"
-#include "sag.lh"
// internal artwork (bezel overlay)
#include "bambball.lh"
@@ -2433,161 +2437,6 @@ ROM_END
/***************************************************************************
- Entex Select-A-Game (HMCS40 MCU cartridges)
- * see gamelist for cartridge info
- * cyan/red VFD display Futaba DM-16Z + cyan VFD 9-digit panel Futaba 9-ST-11A 1F
-
- The console is the peripheral, the heart of the system is the cartridge.
- Cartridges with a HMCS40 MCU are implemented in this driver.
-
- MAME external artwork is recommended, needed for per-game VFD overlays.
-
-***************************************************************************/
-
-class sag_state : public hh_hmcs40_state
-{
-public:
- sag_state(const machine_config &mconfig, device_type type, const char *tag) :
- hh_hmcs40_state(mconfig, type, tag)
- { }
-
- void update_display();
- DECLARE_WRITE8_MEMBER(plate_w);
- DECLARE_WRITE16_MEMBER(grid_w);
- DECLARE_READ16_MEMBER(input_r);
- void sag(machine_config &config);
-};
-
-// handlers
-
-void sag_state::update_display()
-{
- // grid 0-7 are the 'pixels'
- m_display->matrix_partial(0, 8, m_grid, m_plate, false);
-
- // grid 8-11 are 7segs
- u8 seg = bitswap<8>(m_plate,3,4,5,6,7,8,9,10);
- m_display->matrix_partial(8, 4, m_grid >> 8, seg);
-}
-
-WRITE8_MEMBER(sag_state::plate_w)
-{
- // R0x-R3x: vfd plate
- int shift = offset * 4;
- m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
- update_display();
-}
-
-WRITE16_MEMBER(sag_state::grid_w)
-{
- // D0: speaker out
- m_speaker->level_w(data & 1);
-
- // D2-D7: input mux
- m_inp_mux = data >> 2 & 0x3f;
-
- // D1-D12: vfd grid
- m_grid = data >> 1 & 0xfff;
- update_display();
-}
-
-READ16_MEMBER(sag_state::input_r)
-{
- // D13-D15: multiplexed inputs
- return read_inputs(6) << 13;
-}
-
-// config
-
-static INPUT_PORTS_START( sag )
- PORT_START("IN.0") // D2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_NAME("P1 Button 1")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 3")
- PORT_CONFNAME( 0x04, 0x04, "Game" )
- PORT_CONFSETTING( 0x04, "1" )
- PORT_CONFSETTING( 0x00, "2" )
-
- PORT_START("IN.1") // D3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Button 2")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 4")
- PORT_BIT( 0x04, 0x04, IPT_CUSTOM ) PORT_CONDITION("FAKE", 0x03, EQUALS, 0x01) // 1 player
-
- PORT_START("IN.2") // D4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_NAME("P1 Button 3")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 1")
- PORT_CONFNAME( 0x04, 0x00, DEF_STR( Difficulty ) )
- PORT_CONFSETTING( 0x00, "1" )
- PORT_CONFSETTING( 0x04, "2" )
-
- PORT_START("IN.3") // D5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("P1 Button 4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 2")
- PORT_BIT( 0x04, 0x04, IPT_CUSTOM ) PORT_CONDITION("FAKE", 0x03, EQUALS, 0x00) // demo
-
- PORT_START("IN.4") // D6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button 5")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Button 5")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button 7")
-
- PORT_START("IN.5") // D7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button 6")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Button 6")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Button 7")
-
- PORT_START("FAKE") // shared D3/D5
- PORT_CONFNAME( 0x03, 0x01, DEF_STR( Players ) )
- PORT_CONFSETTING( 0x00, "Demo" )
- PORT_CONFSETTING( 0x01, "1" )
- PORT_CONFSETTING( 0x02, "2" )
-INPUT_PORTS_END
-
-void sag_state::sag(machine_config &config)
-{
- /* basic machine hardware */
- HD38800(config, m_maincpu, 450000); // approximation
- m_maincpu->write_r<0>().set(FUNC(sag_state::plate_w));
- m_maincpu->write_r<1>().set(FUNC(sag_state::plate_w));
- m_maincpu->write_r<2>().set(FUNC(sag_state::plate_w));
- m_maincpu->write_r<3>().set(FUNC(sag_state::plate_w));
- m_maincpu->write_d().set(FUNC(sag_state::grid_w));
- m_maincpu->read_d().set(FUNC(sag_state::input_r));
-
- /* video hardware */
- PWM_DISPLAY(config, m_display).set_size(8+4, 14);
- m_display->set_segmask(0xf00, 0x7f);
- config.set_default_layout(layout_sag);
-
- /* sound hardware */
- SPEAKER(config, "mono").front_center();
- SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
-}
-
-// roms
-
-ROM_START( sag_si2 )
- ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD( "inv2_hd38800a31", 0x0000, 0x1000, BAD_DUMP CRC(29c8c100) SHA1(41cd413065659c6d7d5b2408de2ca6d51c49629a) )
- ROM_CONTINUE( 0x1e80, 0x0100 )
-ROM_END
-
-ROM_START( sag_bb4 )
- ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD( "b-b5_hd38800a37", 0x0000, 0x1000, CRC(64852bd5) SHA1(fb1c24ca43934ceb6fc35ac7c35b71e6e843dbc5) )
- ROM_CONTINUE( 0x1e80, 0x0100 )
-ROM_END
-
-ROM_START( sag_pb )
- ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD( "pinb_hd38800a38", 0x0000, 0x1000, CRC(6e53a56b) SHA1(13f057eab2e4cfbb3ef1247a041abff15ae727c9) )
- ROM_CONTINUE( 0x1e80, 0x0100 )
-ROM_END
-
-
-
-
-
-/***************************************************************************
-
Entex Galaxian 2 (manufactured in Japan)
* PCB labels ENTEX GALAXIAN PB-118/116/097 80-210137/135/114
* Hitachi QFP HD38820A13 MCU
@@ -3929,17 +3778,17 @@ ROM_END
/***************************************************************************
- Tomy Kingman (manufactured in Japan)
- * PCB label THF-01II 2E138E01/2E128E02
- * Hitachi HD38800B23 MCU
- * cyan/red/blue VFD display Futaba DM-65ZK 3A
+ Tomy(tronic) Tron (manufactured in Japan)
+ * PCB label THN-02 2E114E07
+ * Hitachi HD38800A88 MCU
+ * cyan/red/green VFD display NEC FIP10AM24T no. 2-8 1
***************************************************************************/
-class kingman_state : public hh_hmcs40_state
+class tmtron_state : public hh_hmcs40_state
{
public:
- kingman_state(const machine_config &mconfig, device_type type, const char *tag) :
+ tmtron_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_hmcs40_state(mconfig, type, tag)
{ }
@@ -3947,21 +3796,21 @@ public:
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
- void update_int0();
- DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); }
- void kingman(machine_config &config);
+ void update_int1();
+ DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); }
+ void tmtron(machine_config &config);
};
// handlers
-void kingman_state::update_display()
+void tmtron_state::update_display()
{
- u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
- u32 plate = bitswap<24>(m_plate,23,6,7,5,4,3,2,1,0,13,12,20,19,18,17,16,10,11,9,8,14,15,13,12);
+ u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,1,2,3,4,5,6,7,8,9,0);
+ u32 plate = bitswap<24>(m_plate,23,5,2,21,1,6,7,9,10,11,21,0,19,3,4,8,3,18,17,16,12,13,14,15);
m_display->matrix(grid, plate);
}
-WRITE8_MEMBER(kingman_state::plate_w)
+WRITE8_MEMBER(tmtron_state::plate_w)
{
// R0x-R3x: vfd plate
int shift = offset * 4;
@@ -3969,69 +3818,69 @@ WRITE8_MEMBER(kingman_state::plate_w)
update_display();
}
-WRITE16_MEMBER(kingman_state::grid_w)
+WRITE16_MEMBER(tmtron_state::grid_w)
{
- // D6: speaker out
- m_speaker->level_w(data >> 6 & 1);
+ // D4: speaker out
+ m_speaker->level_w(data >> 4 & 1);
// D12-D15: input mux
u8 inp_mux = data >> 12 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
- update_int0();
+ update_int1();
}
- // D7-D15: vfd grid
- m_grid = data >> 7 & 0x1ff;
+ // D6-D15: vfd grid
+ m_grid = data >> 6 & 0x3ff;
- // D0-D4: more plates
- m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x1f0000);
+ // D0-D3,D5: more plates
+ m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x2f0000);
update_display();
}
-void kingman_state::update_int0()
+void tmtron_state::update_int1()
{
- // INT0 on multiplexed inputs
- set_interrupt(0, read_inputs(4));
+ // INT1 on multiplexed inputs
+ set_interrupt(1, read_inputs(4));
}
// config
-static INPUT_PORTS_START( kingman )
- PORT_START("IN.0") // D12 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
+static INPUT_PORTS_START( tmtron )
+ PORT_START("IN.0") // D12 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
- PORT_START("IN.1") // D13 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
+ PORT_START("IN.1") // D13 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
- PORT_START("IN.2") // D14 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
+ PORT_START("IN.2") // D14 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
- PORT_START("IN.3") // D15 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
+ PORT_START("IN.3") // D15 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
- PORT_START("IN.4") // INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, 1)
+ PORT_START("IN.4") // INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, 0)
INPUT_PORTS_END
-void kingman_state::kingman(machine_config &config)
+void tmtron_state::tmtron(machine_config &config)
{
/* basic machine hardware */
HD38800(config, m_maincpu, 400000); // approximation
- m_maincpu->write_r<0>().set(FUNC(kingman_state::plate_w));
- m_maincpu->write_r<1>().set(FUNC(kingman_state::plate_w));
- m_maincpu->write_r<2>().set(FUNC(kingman_state::plate_w));
- m_maincpu->write_r<3>().set(FUNC(kingman_state::plate_w));
- m_maincpu->write_d().set(FUNC(kingman_state::grid_w));
+ m_maincpu->write_r<0>().set(FUNC(tmtron_state::plate_w));
+ m_maincpu->write_r<1>().set(FUNC(tmtron_state::plate_w));
+ m_maincpu->write_r<2>().set(FUNC(tmtron_state::plate_w));
+ m_maincpu->write_r<3>().set(FUNC(tmtron_state::plate_w));
+ m_maincpu->write_d().set(FUNC(tmtron_state::grid_w));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
screen.set_refresh_hz(60);
- screen.set_size(374, 1080);
+ screen.set_size(1920, 662);
screen.set_visarea_full();
- PWM_DISPLAY(config, m_display).set_size(9, 23);
+ PWM_DISPLAY(config, m_display).set_size(10, 23);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -4040,13 +3889,13 @@ void kingman_state::kingman(machine_config &config)
// roms
-ROM_START( kingman )
+ROM_START( tmtron )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD( "hd38800b23", 0x0000, 0x1000, CRC(f8dfe14f) SHA1(660610d92ae7e5f92bddf5a3bcc2296b2ec3946b) )
+ ROM_LOAD( "hd38800a88", 0x0000, 0x1000, CRC(33db9670) SHA1(d6f747a59356526698784047bcfdbb59e79b9a23) )
ROM_CONTINUE( 0x1e80, 0x0100 )
- ROM_REGION( 396320, "screen", 0)
- ROM_LOAD( "kingman.svg", 0, 396320, CRC(3f52d2a9) SHA1(9291f1a1da3d19c3d6dedb995de0a5feba75b442) )
+ ROM_REGION( 384174, "screen", 0)
+ ROM_LOAD( "tmtron.svg", 0, 384174, CRC(06bd9e63) SHA1(fb93013ec42dc05f7029ef3c3073c84867f0d077) )
ROM_END
@@ -4055,17 +3904,17 @@ ROM_END
/***************************************************************************
- Tomy(tronic) Tron (manufactured in Japan)
- * PCB label THN-02 2E114E07
- * Hitachi HD38800A88 MCU
- * cyan/red/green VFD display NEC FIP10AM24T no. 2-8 1
+ Tomy Kingman (manufactured in Japan)
+ * PCB label THF-01II 2E138E01/2E128E02
+ * Hitachi HD38800B23 MCU
+ * cyan/red/blue VFD display Futaba DM-65ZK 3A
***************************************************************************/
-class tmtron_state : public hh_hmcs40_state
+class kingman_state : public hh_hmcs40_state
{
public:
- tmtron_state(const machine_config &mconfig, device_type type, const char *tag) :
+ kingman_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_hmcs40_state(mconfig, type, tag)
{ }
@@ -4073,21 +3922,21 @@ public:
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
- void update_int1();
- DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int1(); }
- void tmtron(machine_config &config);
+ void update_int0();
+ DECLARE_INPUT_CHANGED_MEMBER(input_changed) { update_int0(); }
+ void kingman(machine_config &config);
};
// handlers
-void tmtron_state::update_display()
+void kingman_state::update_display()
{
- u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,1,2,3,4,5,6,7,8,9,0);
- u32 plate = bitswap<24>(m_plate,23,5,2,21,1,6,7,9,10,11,21,0,19,3,4,8,3,18,17,16,12,13,14,15);
+ u16 grid = bitswap<16>(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
+ u32 plate = bitswap<24>(m_plate,23,6,7,5,4,3,2,1,0,13,12,20,19,18,17,16,10,11,9,8,14,15,13,12);
m_display->matrix(grid, plate);
}
-WRITE8_MEMBER(tmtron_state::plate_w)
+WRITE8_MEMBER(kingman_state::plate_w)
{
// R0x-R3x: vfd plate
int shift = offset * 4;
@@ -4095,69 +3944,69 @@ WRITE8_MEMBER(tmtron_state::plate_w)
update_display();
}
-WRITE16_MEMBER(tmtron_state::grid_w)
+WRITE16_MEMBER(kingman_state::grid_w)
{
- // D4: speaker out
- m_speaker->level_w(data >> 4 & 1);
+ // D6: speaker out
+ m_speaker->level_w(data >> 6 & 1);
// D12-D15: input mux
u8 inp_mux = data >> 12 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
- update_int1();
+ update_int0();
}
- // D6-D15: vfd grid
- m_grid = data >> 6 & 0x3ff;
+ // D7-D15: vfd grid
+ m_grid = data >> 7 & 0x1ff;
- // D0-D3,D5: more plates
- m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x2f0000);
+ // D0-D4: more plates
+ m_plate = (m_plate & 0x00ffff) | (data << 16 & 0x1f0000);
update_display();
}
-void tmtron_state::update_int1()
+void kingman_state::update_int0()
{
- // INT1 on multiplexed inputs
- set_interrupt(1, read_inputs(4));
+ // INT0 on multiplexed inputs
+ set_interrupt(0, read_inputs(4));
}
// config
-static INPUT_PORTS_START( tmtron )
- PORT_START("IN.0") // D12 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
+static INPUT_PORTS_START( kingman )
+ PORT_START("IN.0") // D12 INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
- PORT_START("IN.1") // D13 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
+ PORT_START("IN.1") // D13 INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
- PORT_START("IN.2") // D14 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
+ PORT_START("IN.2") // D14 INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
- PORT_START("IN.3") // D15 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, 0)
+ PORT_START("IN.3") // D15 INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, 0)
- PORT_START("IN.4") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, 0)
+ PORT_START("IN.4") // INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, 1)
INPUT_PORTS_END
-void tmtron_state::tmtron(machine_config &config)
+void kingman_state::kingman(machine_config &config)
{
/* basic machine hardware */
HD38800(config, m_maincpu, 400000); // approximation
- m_maincpu->write_r<0>().set(FUNC(tmtron_state::plate_w));
- m_maincpu->write_r<1>().set(FUNC(tmtron_state::plate_w));
- m_maincpu->write_r<2>().set(FUNC(tmtron_state::plate_w));
- m_maincpu->write_r<3>().set(FUNC(tmtron_state::plate_w));
- m_maincpu->write_d().set(FUNC(tmtron_state::grid_w));
+ m_maincpu->write_r<0>().set(FUNC(kingman_state::plate_w));
+ m_maincpu->write_r<1>().set(FUNC(kingman_state::plate_w));
+ m_maincpu->write_r<2>().set(FUNC(kingman_state::plate_w));
+ m_maincpu->write_r<3>().set(FUNC(kingman_state::plate_w));
+ m_maincpu->write_d().set(FUNC(kingman_state::grid_w));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
screen.set_refresh_hz(60);
- screen.set_size(1920, 662);
+ screen.set_size(374, 1080);
screen.set_visarea_full();
- PWM_DISPLAY(config, m_display).set_size(10, 23);
+ PWM_DISPLAY(config, m_display).set_size(9, 23);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -4166,13 +4015,13 @@ void tmtron_state::tmtron(machine_config &config)
// roms
-ROM_START( tmtron )
+ROM_START( kingman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD( "hd38800a88", 0x0000, 0x1000, CRC(33db9670) SHA1(d6f747a59356526698784047bcfdbb59e79b9a23) )
+ ROM_LOAD( "hd38800b23", 0x0000, 0x1000, CRC(f8dfe14f) SHA1(660610d92ae7e5f92bddf5a3bcc2296b2ec3946b) )
ROM_CONTINUE( 0x1e80, 0x0100 )
- ROM_REGION( 384174, "screen", 0)
- ROM_LOAD( "tmtron.svg", 0, 384174, CRC(06bd9e63) SHA1(fb93013ec42dc05f7029ef3c3073c84867f0d077) )
+ ROM_REGION( 396320, "screen", 0)
+ ROM_LOAD( "kingman.svg", 0, 396320, CRC(3f52d2a9) SHA1(9291f1a1da3d19c3d6dedb995de0a5feba75b442) )
ROM_END
@@ -4312,9 +4161,6 @@ CONS( 1981, cpacman, 0, 0, cpacman, cpacman, cpacman_state, empty_in
CONS( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, cpacman_state, empty_init, "Coleco", "Pac-Man (Coleco, Rev. 28)", MACHINE_SUPPORTS_SAVE )
CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, cmspacmn_state, empty_init, "Coleco", "Ms. Pac-Man (Coleco)", MACHINE_SUPPORTS_SAVE )
-CONS( 1981, sag_si2, 0, 0, sag, sag, sag_state, empty_init, "Entex", "Select-A-Game: Space Invader 2", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) // suspect bad dump
-CONS( 1981, sag_bb4, 0, 0, sag, sag, sag_state, empty_init, "Entex", "Select-A-Game: Baseball 4", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1981, sag_pb, 0, 0, sag, sag, sag_state, empty_init, "Entex", "Select-A-Game: Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1981, egalaxn2, 0, 0, egalaxn2, egalaxn2, egalaxn2_state, empty_init, "Entex", "Galaxian 2 (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, epacman2, 0, 0, epacman2, epacman2, epacman2_state, empty_init, "Entex", "Pac Man 2 (Entex, cyan Pacman)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, epacman2r, epacman2, 0, epacman2, epacman2, epacman2_state, empty_init, "Entex", "Pac Man 2 (Entex, red Pacman)", MACHINE_SUPPORTS_SAVE )
@@ -4330,7 +4176,7 @@ CONS( 1982, msthawk, 0, 0, msthawk, msthawk, msthawk_state, empty_in
CONS( 1983, pbqbert, 0, 0, pbqbert, pbqbert, pbqbert_state, empty_init, "Parker Brothers", "Q*Bert (Parker Brothers)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, tmtron, 0, 0, tmtron, tmtron, tmtron_state, empty_init, "Tomy", "Tron (Tomy)", MACHINE_SUPPORTS_SAVE )
CONS( 1982, kingman, 0, 0, kingman, kingman, kingman_state, empty_init, "Tomy", "Kingman", MACHINE_SUPPORTS_SAVE )
-CONS( 1984, tmtron, 0, 0, tmtron, tmtron, tmtron_state, empty_init, "Tomy", "Tron (Tomy)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, vinvader, 0, 0, vinvader, vinvader, vinvader_state, empty_init, "VTech", "Invaders (VTech)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp
index 9a566101ef4..8ae80c8ba9f 100644
--- a/src/mame/drivers/hh_pic16.cpp
+++ b/src/mame/drivers/hh_pic16.cpp
@@ -20,7 +20,7 @@
@053 1655A 1979, Atari Touch Me
@0?? 1655A 1979, Tiger Half Court Computer Basketball/Sears Electronic Basketball (custom label)
@061 1655A 1980, Lakeside Le Boom
- *081 1655A 19??, Ramtex Space Invaders/Block Buster
+ *081 1655A 1981, Ramtex Space Invaders/Block Buster
@094 1655A 1980, GAF Melody Madness
@110 1650A 1979, Tiger/Tandy Rocket Pinball
*123 1655A? 1980, Kingsford Match Me/Mini Match Me
diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp
index bf6c16a0b26..fcee0b6d14d 100644
--- a/src/mame/drivers/hh_sm510.cpp
+++ b/src/mame/drivers/hh_sm510.cpp
@@ -279,7 +279,7 @@ u8 hh_sm510_state::read_inputs(int columns, int fixed)
void hh_sm510_state::update_k_line()
{
// this is necessary because the MCU can wake up on K input activity
- m_maincpu->set_input_line(SM510_INPUT_LINE_K, input_r(machine().dummy_space(), 0, 0xff) ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(SM510_INPUT_LINE_K, input_r() ? ASSERT_LINE : CLEAR_LINE);
}
INPUT_CHANGED_MEMBER(hh_sm510_state::input_changed)
@@ -293,7 +293,7 @@ WRITE8_MEMBER(hh_sm510_state::input_w)
update_k_line();
}
-READ8_MEMBER(hh_sm510_state::input_r)
+u8 hh_sm510_state::input_r()
{
return read_inputs(m_inp_lines, m_inp_fixed);
}
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 8af983a1c31..cb5708dae9e 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -8,6 +8,7 @@
part of a series is (or will be) in its own driver, see:
- eva: Chrysler EVA-11 (and EVA-24)
- microvsn: Milton Bradley MicroVision
+ - sag: Entex Select-A-Game Machine
(contd.) hh_tms1k child drivers:
- tispellb: TI Spelling B series gen. 1
@@ -72,7 +73,7 @@
@MP3208 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750B)
@MP3226 TMS1000 1978, Milton Bradley Simon (Rev A)
*MP3232 TMS1000 1979, Fonas 2-Player Baseball (no "MP" on chip label)
- *MP3260 TMS1000 1979, Electroplay Quickfire
+ @MP3260 TMS1000 1979, Electroplay Quickfire
@MP3300 TMS1000 1979, Milton Bradley Simon (Rev F)
@MP3301A TMS1000 1979, Milton Bradley Big Trak
@MP3320A TMS1000 1979, Coleco Head to Head: Electronic Basketball
@@ -124,7 +125,7 @@
@MP7351 TMS1400 1982, Parker Brothers Master Merlin
@MP7551 TMS1670 1980, Entex Color Football 4 (6009)
@MPF553 TMS1670 1980, Gakken/Entex Jackpot: Gin Rummy & Black Jack (6008) (note: assume F to be a misprint)
- *MP7573 TMS1670? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable)
+ MP7573 TMS1670 1981, Entex Select-A-Game cartridge: Football 4 -> sag.cpp
*M95041 ? 1983, Tsukuda Game Pachinko (? note: 40-pin, VFD-capable)
inconsistent:
@@ -223,6 +224,7 @@
#include "mmerlin.lh" // clickable
#include "monkeysee.lh"
#include "phpball.lh"
+#include "qfire.lh" // clickable
#include "quizwizc.lh"
#include "raisedvl.lh"
#include "simon.lh" // clickable
@@ -2282,7 +2284,7 @@ ROM_START( quizwizc )
ROM_LOAD( "m32001", 0x0000, 0x0400, CRC(053657eb) SHA1(38c84f7416f79aa679f434a3d35df54cd9aa528a) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1000_common3_micro.pla", 0, 867, CRC(80912d0a) SHA1(7ae5293ed4d93f5b7a64d43fe30c3639f39fbe5a) )
+ ROM_LOAD( "tms1000_common4_micro.pla", 0, 867, CRC(80912d0a) SHA1(7ae5293ed4d93f5b7a64d43fe30c3639f39fbe5a) )
ROM_REGION( 365, "maincpu:opla", 0 )
ROM_LOAD( "tms1000_quizwizc_output.pla", 0, 365, CRC(475b7053) SHA1(8f61bf736eb41d7029a6b165cc0a184ba0a70a2a) )
ROM_END
@@ -3148,6 +3150,122 @@ ROM_END
/***************************************************************************
+ Electroplay Quickfire
+ * TMS1000NLL MP3260 (die label same)
+ * 2 7seg LEDs, 5 lamps, 3 lightsensors, lightgun
+
+ To play it in MAME, either use the clickable artwork with -mouse, or set
+ button 1 to "Z or X or C" and each lightsensor to one of those keys.
+ Although the game seems mostly playable without having to use the gun trigger
+
+***************************************************************************/
+
+class qfire_state : public hh_tms1k_state
+{
+public:
+ qfire_state(const machine_config &mconfig, device_type type, const char *tag) :
+ hh_tms1k_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE16_MEMBER(write_r);
+ DECLARE_WRITE16_MEMBER(write_o);
+ DECLARE_READ8_MEMBER(read_k);
+ void qfire(machine_config &config);
+};
+
+// handlers
+
+WRITE16_MEMBER(qfire_state::write_r)
+{
+ // R1,R2,R5: input mux
+ m_inp_mux = (data >> 1 & 3) | (data >> 3 & 4);
+
+ // R3,R4,R6-R8: leds (direct)
+ m_display->write_row(2, (data >> 3 & 3) | (data >> 4 & 0x1c));
+ m_display->update();
+
+ // R9: speaker out
+ m_speaker->level_w(data >> 9 & 1);
+}
+
+WRITE16_MEMBER(qfire_state::write_o)
+{
+ // O0: 1st digit "1"
+ // O1-O7: 2nd digit segments
+ m_display->write_row(0, (data & 1) ? 6 : 0);
+ m_display->write_row(1, data >> 1 & 0x7f);
+ m_display->update();
+}
+
+READ8_MEMBER(qfire_state::read_k)
+{
+ // K: multiplexed inputs
+ return read_inputs(3);
+}
+
+// config
+
+static INPUT_PORTS_START( qfire )
+ PORT_START("IN.0") // R1
+ PORT_CONFNAME( 0x0f, 0x00, "Game" )
+ PORT_CONFSETTING( 0x00, "1" )
+ PORT_CONFSETTING( 0x08, "2" )
+ PORT_CONFSETTING( 0x04, "3" )
+ PORT_CONFSETTING( 0x02, "4" )
+ PORT_CONFSETTING( 0x01, "5" )
+ PORT_CONFSETTING( 0x06, "6" )
+
+ PORT_START("IN.1") // R2
+ PORT_CONFNAME( 0x07, 0x04, DEF_STR( Difficulty ) )
+ PORT_CONFSETTING( 0x04, "A" )
+ PORT_CONFSETTING( 0x02, "B" )
+ PORT_CONFSETTING( 0x01, "C" )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.2") // R5
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Lightsensor 1")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Lightsensor 2")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Lightsensor 3")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // lightgun trigger, also turns on lightgun lamp
+INPUT_PORTS_END
+
+void qfire_state::qfire(machine_config &config)
+{
+ /* basic machine hardware */
+ TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=39K, C=47pF
+ m_maincpu->k().set(FUNC(qfire_state::read_k));
+ m_maincpu->r().set(FUNC(qfire_state::write_r));
+ m_maincpu->o().set(FUNC(qfire_state::write_o));
+
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(3, 7);
+ m_display->set_segmask(3, 0x7f);
+ config.set_default_layout(layout_qfire);
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+ SPEAKER_SOUND(config, m_speaker);
+ m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
+}
+
+// roms
+
+ROM_START( qfire )
+ ROM_REGION( 0x0400, "maincpu", 0 )
+ ROM_LOAD( "mp3260", 0x0000, 0x0400, CRC(f6e28376) SHA1(6129584c55a1629b458694cdc97edccb77ab00ba) )
+
+ ROM_REGION( 867, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms1000_common3_micro.pla", 0, 867, CRC(52f7c1f1) SHA1(dbc2634dcb98eac173ad0209df487cad413d08a5) )
+ ROM_REGION( 365, "maincpu:opla", 0 )
+ ROM_LOAD( "tms1000_qfire_output.pla", 0, 365, CRC(8f7668a9) SHA1(c8faeff0f88bfea8f032ce5bc583f049e8930c11) )
+ROM_END
+
+
+
+
+
+/***************************************************************************
+
Entex (Electronic) Soccer
* TMS1000NL MP0158 (die label same)
* 2 7seg LEDs, 30 other LEDs, 1-bit sound
@@ -5287,7 +5405,7 @@ WRITE16_MEMBER(ginv2000_state::write_r)
// R11,R12: TMS1024 S1,S0 (S2 forced high)
// R13: TMS1024 STD
- m_expander->write_s(space, 0, (data >> 12 & 1) | (data >> 10 & 2) | 4);
+ m_expander->write_s((data >> 12 & 1) | (data >> 10 & 2) | 4);
m_expander->write_std(data >> 13 & 1);
// R1-R10: VFD grid
@@ -5298,7 +5416,7 @@ WRITE16_MEMBER(ginv2000_state::write_r)
WRITE16_MEMBER(ginv2000_state::write_o)
{
// O4-O7: TMS1024 H1-H4
- m_expander->write_h(space, 0, data >> 4 & 0xf);
+ m_expander->write_h(data >> 4 & 0xf);
}
READ8_MEMBER(ginv2000_state::read_k)
@@ -7006,7 +7124,7 @@ ROM_START( simon )
ROM_LOAD( "tms1000.u1", 0x0000, 0x0400, CRC(9961719d) SHA1(35dddb018a8a2b31f377ab49c1f0cb76951b81c0) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1000_simon_micro.pla", 0, 867, CRC(52f7c1f1) SHA1(dbc2634dcb98eac173ad0209df487cad413d08a5) )
+ ROM_LOAD( "tms1000_common3_micro.pla", 0, 867, CRC(52f7c1f1) SHA1(dbc2634dcb98eac173ad0209df487cad413d08a5) )
ROM_REGION( 365, "maincpu:opla", 0 ) // unused
ROM_LOAD( "tms1000_simon_output.pla", 0, 365, CRC(2943c71b) SHA1(bd5bb55c57e7ba27e49c645937ec1d4e67506601) )
ROM_END
@@ -7016,7 +7134,7 @@ ROM_START( simonf )
ROM_LOAD( "mp3300", 0x0000, 0x0400, CRC(b9fcf93a) SHA1(45960e4242a08495f2a99fc5d44728eabd93cd9f) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1000_simon_micro.pla", 0, 867, CRC(52f7c1f1) SHA1(dbc2634dcb98eac173ad0209df487cad413d08a5) )
+ ROM_LOAD( "tms1000_common3_micro.pla", 0, 867, CRC(52f7c1f1) SHA1(dbc2634dcb98eac173ad0209df487cad413d08a5) )
ROM_REGION( 365, "maincpu:opla", 0 ) // unused
ROM_LOAD( "tms1000_simon_output.pla", 0, 365, CRC(2943c71b) SHA1(bd5bb55c57e7ba27e49c645937ec1d4e67506601) )
ROM_END
@@ -7369,7 +7487,7 @@ ROM_START( bigtrak )
ROM_LOAD( "mp3301a", 0x0000, 0x0400, CRC(1351bcdd) SHA1(68865389c25b541c09a742be61f8fb6488134d4e) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1000_common3_micro.pla", 0, 867, CRC(80912d0a) SHA1(7ae5293ed4d93f5b7a64d43fe30c3639f39fbe5a) )
+ ROM_LOAD( "tms1000_common4_micro.pla", 0, 867, CRC(80912d0a) SHA1(7ae5293ed4d93f5b7a64d43fe30c3639f39fbe5a) )
ROM_REGION( 365, "maincpu:opla", 0 )
ROM_LOAD( "tms1000_bigtrak_output.pla", 0, 365, CRC(63be45f6) SHA1(918e38a223152db883c1a6f7acf56e87d7074734) )
ROM_END
@@ -11454,7 +11572,7 @@ INPUT_PORTS_END
void ditto_state::ditto(machine_config &config)
{
/* basic machine hardware */
- TMS1730(config, m_maincpu, 275000); // approximation - RC osc. R=100K, C=47pF
+ TMS1700(config, m_maincpu, 275000); // approximation - RC osc. R=100K, C=47pF
m_maincpu->k().set_ioport("IN.0");
m_maincpu->r().set(FUNC(ditto_state::write_r));
m_maincpu->o().set(FUNC(ditto_state::write_o));
@@ -11732,7 +11850,7 @@ WRITE16_MEMBER(tbreakup_state::write_r)
// R3-R5: TMS1025 port S
// R2: TMS1025 STD pin
- m_expander->write_s(space, 0, data >> 3 & 7);
+ m_expander->write_s(data >> 3 & 7);
m_expander->write_std(data >> 2 & 1);
// R0,R1: select digit
@@ -11743,7 +11861,7 @@ WRITE16_MEMBER(tbreakup_state::write_r)
WRITE16_MEMBER(tbreakup_state::write_o)
{
// O0-O3: TMS1025 port H
- m_expander->write_h(space, 0, data & 0xf);
+ m_expander->write_h(data & 0xf);
// O0-O7: led state
m_o = data;
@@ -12120,7 +12238,7 @@ public:
void update_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
+ u8 read_k();
void xl25(machine_config &config);
protected:
@@ -12138,7 +12256,7 @@ void xl25_state::machine_reset()
void xl25_state::update_halt()
{
// O5+K4 go to HALT pin (used when pressing store/recall button)
- bool halt = !((m_o & 0x20) || (read_k(machine().dummy_space(), 0) & 4));
+ bool halt = !((m_o & 0x20) || (read_k() & 4));
m_maincpu->set_input_line(INPUT_LINE_HALT, halt ? ASSERT_LINE : CLEAR_LINE);
}
@@ -12168,7 +12286,7 @@ WRITE16_MEMBER(xl25_state::write_o)
update_halt();
}
-READ8_MEMBER(xl25_state::read_k)
+u8 xl25_state::read_k()
{
// K: multiplexed inputs
// K4 also goes to MCU halt
@@ -12306,6 +12424,8 @@ CONS( 1979, cnfball, 0, 0, cnfball, cnfball, cnfball_state, emp
CONS( 1979, cnfball2, 0, 0, cnfball2, cnfball2, cnfball2_state, empty_init, "Conic", "Electronic Football II (Conic)", MACHINE_SUPPORTS_SAVE )
CONS( 1979, eleciq, 0, 0, eleciq, eleciq, eleciq_state, empty_init, "Conic", "Electronic I.Q.", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1979, qfire, 0, 0, qfire, qfire, qfire_state, empty_init, "Electroplay", "Quickfire", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+
CONS( 1979, esoccer, 0, 0, esoccer, esoccer, esoccer_state, empty_init, "Entex", "Electronic Soccer (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1979, ebball, 0, 0, ebball, ebball, ebball_state, empty_init, "Entex", "Electronic Baseball (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1979, ebball2, 0, 0, ebball2, ebball2, ebball2_state, empty_init, "Entex", "Electronic Baseball 2 (Entex)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index 2f296a5e45c..ca25960204c 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -271,7 +271,7 @@ WRITE_LINE_MEMBER(pcjr_state::keyb_interrupt)
{
int data;
- if(state && (data = m_keyboard->read(machine().dummy_space(), 0)))
+ if(state && (data = m_keyboard->read()))
{
uint8_t parity = 0;
int i;
diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp
index fe9ba3d88c3..929cf810a8b 100644
--- a/src/mame/drivers/indy_indigo2.cpp
+++ b/src/mame/drivers/indy_indigo2.cpp
@@ -500,7 +500,7 @@ void ip22_state::indigo2_4415(machine_config &config)
* 0d <- 00 High Const BRG = (CLK / (2 x Desired Rate x BR Clock period)) - 2
* 0e <- 01 Mics: BRG enable
* 03 <- c1 Receiver: as above + Receiver enable
- * 05 <- ea Transmitter: as above + Transmitetr enable
+ * 05 <- ea Transmitter: as above + Transmitter enable
* 00 <- 10 Reset External/status IE
*/
diff --git a/src/mame/drivers/instruct.cpp b/src/mame/drivers/instruct.cpp
index 3dd09c9c9d2..cb7d4a0ff2e 100644
--- a/src/mame/drivers/instruct.cpp
+++ b/src/mame/drivers/instruct.cpp
@@ -208,17 +208,14 @@ INTERRUPT_GEN_MEMBER( instruct_state::t2l_int )
{
uint8_t switches = ioport("SW")->read();
- // Set vector from INDIRECT sw
- uint8_t vector = BIT(switches, 0) ? 0x87 : 0x07;
-
// Check INT sw & key
if (BIT(switches, 1))
- device.execute().set_input_line_and_vector(0, BIT(hwkeys, 1) ? ASSERT_LINE : CLEAR_LINE, vector); // S2650
+ device.execute().set_input_line(0, BIT(hwkeys, 1) ? ASSERT_LINE : CLEAR_LINE);
else
// process ac input
{
m_irqstate ^= 1;
- device.execute().set_input_line_and_vector(0, m_irqstate ? ASSERT_LINE : CLEAR_LINE, vector); // S2650
+ device.execute().set_input_line(0, m_irqstate ? ASSERT_LINE : CLEAR_LINE);
}
}
}
@@ -430,6 +427,8 @@ void instruct_state::instruct(machine_config &config)
m_maincpu->set_periodic_int(FUNC(instruct_state::t2l_int), attotime::from_hz(120));
m_maincpu->sense_handler().set(FUNC(instruct_state::sense_r));
m_maincpu->flag_handler().set(FUNC(instruct_state::flag_w));
+ // Set vector from INDIRECT sw
+ m_maincpu->intack_handler().set([this]() { return BIT(ioport("SW")->read(), 0) ? 0x87 : 0x07; });
/* video hardware */
config.set_default_layout(layout_instruct);
diff --git a/src/mame/drivers/intellect02.cpp b/src/mame/drivers/intellect02.cpp
index 3a2b9f731f0..cd18f788260 100644
--- a/src/mame/drivers/intellect02.cpp
+++ b/src/mame/drivers/intellect02.cpp
@@ -63,7 +63,6 @@ public:
m_ppi8255(*this, "ppi8255"),
m_display(*this, "display"),
m_beeper(*this, "beeper"),
- m_cart(*this, "cartslot"),
m_inputs(*this, "IN.%u", 0)
{ }
@@ -81,15 +80,12 @@ private:
required_device<i8255_device> m_ppi8255;
required_device<pwm_display_device> m_display;
required_device<beep_device> m_beeper;
- required_device<generic_slot_device> m_cart;
required_ioport_array<2> m_inputs;
// address maps
void main_map(address_map &map);
void main_io(address_map &map);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
-
// I/O handlers
void update_display();
DECLARE_READ8_MEMBER(input_r);
@@ -125,18 +121,6 @@ INPUT_CHANGED_MEMBER(intel02_state::reset_button)
I/O
******************************************************************************/
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(intel02_state::cart_load)
-{
- u32 size = m_cart->common_get_size("rom");
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
// I8255 PPI
void intel02_state::update_display()
@@ -254,10 +238,7 @@ void intel02_state::intel02(machine_config &config)
m_beeper->add_route(ALL_OUTPUTS, "speaker", 0.25);
/* cartridge */
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "intellect02", "bin");
- m_cart->set_device_load(FUNC(intel02_state::cart_load));
- m_cart->set_must_be_loaded(true);
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "intellect02").set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("intellect02");
}
diff --git a/src/mame/drivers/jack.cpp b/src/mame/drivers/jack.cpp
index 2b15acd8fa7..55c17ff96ee 100644
--- a/src/mame/drivers/jack.cpp
+++ b/src/mame/drivers/jack.cpp
@@ -146,7 +146,7 @@ READ8_MEMBER(jack_state::striv_question_r)
}
-WRITE8_MEMBER(jack_state::joinem_control_w)
+void jack_state::joinem_control_w(uint8_t data)
{
// d0: related to test mode?
// d1: unused?
@@ -904,7 +904,7 @@ MACHINE_START_MEMBER(jack_state,joinem)
MACHINE_RESET_MEMBER(jack_state,joinem)
{
- joinem_control_w(m_maincpu->space(AS_PROGRAM), 0, 0, 0xff);
+ joinem_control_w(0);
}
diff --git a/src/mame/drivers/jedi.cpp b/src/mame/drivers/jedi.cpp
index 9d0cf14ef59..59cc14454c8 100644
--- a/src/mame/drivers/jedi.cpp
+++ b/src/mame/drivers/jedi.cpp
@@ -225,8 +225,8 @@ READ8_MEMBER(jedi_state::novram_data_r)
WRITE8_MEMBER(jedi_state::novram_data_w)
{
- m_novram[0]->write(space, offset, data & 0x0f);
- m_novram[1]->write(space, offset, data >> 4);
+ m_novram[0]->write(offset, data & 0x0f);
+ m_novram[1]->write(offset, data >> 4);
}
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index 509eb45d9ce..a5bf02afa5c 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -203,7 +203,7 @@ WRITE8_MEMBER(k28_state::mcu_p2_w)
m_vfd->data_w(data & 1);
// d0-d3: VSM data, input mux and SC-01 phoneme lower nibble
- m_tms6100->add_w(space, 0, data);
+ m_tms6100->add_w(data);
m_inp_mux = (m_inp_mux & ~0xf) | (~data & 0xf);
m_phoneme = (m_phoneme & ~0xf) | (data & 0xf);
}
diff --git a/src/mame/drivers/konamigs.cpp b/src/mame/drivers/konamigs.cpp
index 2fdcf91695e..a2c9d0a47a0 100644
--- a/src/mame/drivers/konamigs.cpp
+++ b/src/mame/drivers/konamigs.cpp
@@ -114,7 +114,7 @@ protected:
// Q2SD GPU
DECLARE_READ16_MEMBER(gpu_r);
- DECLARE_WRITE16_MEMBER(gpu_w);
+ void gpu_w(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff);
DECLARE_READ16_MEMBER(vram_r);
DECLARE_WRITE16_MEMBER(vram_w);
DECLARE_WRITE_LINE_MEMBER(vblank);
@@ -332,7 +332,7 @@ READ16_MEMBER(gsan_state::gpu_r)
return m_gpuregs[offset];
}
-WRITE16_MEMBER(gsan_state::gpu_w)
+void gsan_state::gpu_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
u16 prevval = m_gpuregs[offset];
COMBINE_DATA(&m_gpuregs[offset]);
@@ -688,7 +688,7 @@ void gsan_state::do_render(bool vbkem)
m_uymax = m_gpuregs[0x8e / 2] = m_vram[listoffs++];
break;
case 0x16: // WPR
- gpu_w(machine().dummy_space(), m_vram[listoffs] & 0x3ff, m_vram[listoffs + 1]);
+ gpu_w(m_vram[listoffs] & 0x3ff, m_vram[listoffs + 1]);
listoffs += 2;
break;
case 0x17: // SCLIP
diff --git a/src/mame/drivers/konamim2.cpp b/src/mame/drivers/konamim2.cpp
index 1c3d8ac46fb..400814a14bf 100644
--- a/src/mame/drivers/konamim2.cpp
+++ b/src/mame/drivers/konamim2.cpp
@@ -1124,7 +1124,7 @@ void konamim2_state::konamim2(machine_config &config)
m_ppc2->set_addrmap(AS_PROGRAM, &konamim2_state::m2_map);
// M2 hardware
- M2_BDA(config, m_bda, M2_CLOCK, m_ppc1, m_ppc2);
+ M2_BDA(config, m_bda, M2_CLOCK, m_ppc1, m_ppc2, m_cde);
m_bda->set_ram_size(m2_bda_device::RAM_8MB, m2_bda_device::RAM_8MB);
m_bda->subdevice<m2_powerbus_device>("powerbus")->int_handler().set(FUNC(konamim2_state::ppc1_int));
m_bda->subdevice<m2_memctl_device>("memctl")->gpio_out_handler<3>().set(FUNC(konamim2_state::ppc2_int)).invert();
@@ -1133,7 +1133,7 @@ void konamim2_state::konamim2(machine_config &config)
m_bda->ldac_handler().set(FUNC(konamim2_state::ldac_out));
m_bda->rdac_handler().set(FUNC(konamim2_state::rdac_out));
- M2_CDE(config, m_cde, M2_CLOCK, m_ppc1);
+ M2_CDE(config, m_cde, M2_CLOCK, m_ppc1, m_bda);
m_cde->int_handler().set(":bda:powerbus", FUNC(m2_powerbus_device::int_line<BDAINT_EXTD4_LINE>));
m_cde->set_syscfg(SYSCONFIG_ARCADE);
m_cde->sdbg_out().set(FUNC(konamim2_state::cde_sdbg_out));
diff --git a/src/mame/drivers/korgds8.cpp b/src/mame/drivers/korgds8.cpp
index d742cb8d318..f6d80b7b8d2 100644
--- a/src/mame/drivers/korgds8.cpp
+++ b/src/mame/drivers/korgds8.cpp
@@ -204,7 +204,7 @@ void korg_ds8_state::palette_init_ds8(palette_device &palette)
void korg_ds8_state::ds8(machine_config &config)
{
- UPD7810(config, m_maincpu, 12_MHz_XTAL); // µPD78C10CW
+ UPD78C10(config, m_maincpu, 12_MHz_XTAL); // µPD78C10CW
m_maincpu->set_addrmap(AS_PROGRAM, &korg_ds8_state::mem_map);
m_maincpu->pa_in_cb().set(FUNC(korg_ds8_state::kbd_sw_r));
m_maincpu->pb_out_cb().set(FUNC(korg_ds8_state::scan_w));
diff --git a/src/mame/drivers/korgz3.cpp b/src/mame/drivers/korgz3.cpp
index 48c8d3ce530..f0ffd54d4a0 100644
--- a/src/mame/drivers/korgz3.cpp
+++ b/src/mame/drivers/korgz3.cpp
@@ -12,6 +12,8 @@
#include "machine/adc0808.h"
#include "machine/nvram.h"
#include "machine/pic8259.h"
+#include "sound/ym2151.h"
+#include "speaker.h"
class korgz3_state : public driver_device
{
@@ -94,7 +96,7 @@ void korgz3_state::synth_map(address_map &map)
map(0x0000, 0x0027).m(m_synthcpu, FUNC(hd6301y_cpu_device::hd6301y_io));
map(0x0040, 0x013f).ram();
map(0x2000, 0x2000).nopr();
- //map(0x3800, 0x3801).rw("ymsnd", FUNC(ym2414_device::read), FUNC(ym2414_device::write));
+ map(0x3800, 0x3801).rw("ymsnd", FUNC(ym2414_device::read), FUNC(ym2414_device::write));
map(0x4000, 0x7fff).ram().share("nvram");
map(0x8000, 0xffff).rom().region("hd6303_program", 0);
}
@@ -125,7 +127,12 @@ void korgz3_state::korgz3(machine_config &config)
M58990(config, m_adc, 1'000'000); // M58990P-1
- //YM2414(config, "ymsnd", ?'???'???); // YM2414B
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ ym2414_device &ymsnd(YM2414(config, "ymsnd", 3'579'545)); // YM2414B
+ ymsnd.add_route(0, "lspeaker", 0.60);
+ ymsnd.add_route(1, "rspeaker", 0.60);
}
ROM_START(korgz3)
diff --git a/src/mame/drivers/kron.cpp b/src/mame/drivers/kron.cpp
index 15bd855a8f6..d0e8753386b 100644
--- a/src/mame/drivers/kron.cpp
+++ b/src/mame/drivers/kron.cpp
@@ -279,7 +279,7 @@ INTERRUPT_GEN_MEMBER(kron180_state::interrupt)
WRITE_LINE_MEMBER(kron180_state::keyb_interrupt)
{
- if(state && (m_kbd_data = m_keyboard->read(machine().dummy_space(), 0)))
+ if(state && (m_kbd_data = m_keyboard->read()))
{
LOGKBD("%s(%02x)\n", FUNCNAME, m_kbd_data);
m_maincpu->set_input_line(2, ASSERT_LINE);
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 8090e588ed4..e9a0ca224b1 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -931,7 +931,7 @@ READ16_MEMBER( ksys573_state::ge765pwbba_r )
{
case 0x4c:
case 0x4d:
- return m_upd4701->read_y(space, offset & 1);
+ return m_upd4701->read_y(offset & 1);
default:
verboselog( 0, "ge765pwbba_r: unhandled offset %08x %08x\n", offset, mem_mask );
diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp
index a1ea225a14d..fbf525ccf1e 100644
--- a/src/mame/drivers/kyocera.cpp
+++ b/src/mame/drivers/kyocera.cpp
@@ -202,7 +202,7 @@ uint8_t kc85_state::uart_r()
m_uart->drr_w(1);
}
- return m_uart->read(machine().dummy_space(), 0);
+ return m_uart->read();
}
void kc85_state::uart_ctrl_w(uint8_t data)
diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp
index ecf2b427351..477cb85fdd0 100644
--- a/src/mame/drivers/laserbat.cpp
+++ b/src/mame/drivers/laserbat.cpp
@@ -409,7 +409,7 @@ GFXDECODE_END
INTERRUPT_GEN_MEMBER(laserbat_state_base::laserbat_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
void laserbat_state_base::init_laserbat()
@@ -470,6 +470,7 @@ void laserbat_state_base::laserbat_base(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &laserbat_state_base::laserbat_io_map);
m_maincpu->set_vblank_int("screen", FUNC(laserbat_state_base::laserbat_interrupt));
m_maincpu->sense_handler().set(m_screen, FUNC(screen_device::vblank));
+ m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x0a; });
// video hardware
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/m68705prg.cpp b/src/mame/drivers/m68705prg.cpp
index 80b07e07cf5..a56269b3559 100644
--- a/src/mame/drivers/m68705prg.cpp
+++ b/src/mame/drivers/m68705prg.cpp
@@ -168,7 +168,7 @@ protected:
m_pb_val = data;
u8 const *const ptr(m_eprom_image->get_rom_base());
- m_mcu->pa_w(space, 0, ptr ? ptr[m_addr & m_mcu_region.mask()] : 0xff);
+ m_mcu->pa_w(ptr ? ptr[m_addr & m_mcu_region.mask()] : 0xff);
m_digits[0] = s_7seg[(m_addr >> 0) & 0x0f];
m_digits[1] = s_7seg[(m_addr >> 4) & 0x0f];
diff --git a/src/mame/drivers/malzak.cpp b/src/mame/drivers/malzak.cpp
index 58541cb3cc3..86ac06d4be3 100644
--- a/src/mame/drivers/malzak.cpp
+++ b/src/mame/drivers/malzak.cpp
@@ -25,11 +25,14 @@
0x1700 - 0x17ff | Work RAM - contains hiscore table, coin count
0x1800 - 0x1fff | SAA 5050 video RAM
- TODO - I/O ports (0x00 for sprite->background collisions)
- sound (2x SN76477)
- playfield graphics may be banked, tiles above 0x1f are incorrect
- sprite->sprite collisions aren't quite perfect
- (you can often fly through flying missiles)
+ TODO:
+ - implement sprite-playfield collisions;
+ - sprite-playfield colors are dubious at best;
+ - Tiles may be flipped for playfield in final stage;
+ - improve gfx layers superimposing, honor PAL timings;
+ - sound (2x SN76477)
+ - sprite->sprite collisions aren't quite perfect
+ (you can often fly through flying missiles) <- does this still occur -AS?
Notes:
- Test mode in Malzak II should be enabled by setting a POT to position
@@ -76,7 +79,7 @@
READ8_MEMBER(malzak_state::fake_VRLE_r)
{
- return (m_s2636[0]->read_data(space, 0xcb) & 0x3f) + (m_screen->vblank() ? 0x40 : 0x00);
+ return (m_s2636[0]->read_data(0xcb) & 0x3f) + (m_screen->vblank() ? 0x40 : 0x00);
}
READ8_MEMBER(malzak_state::s2636_portA_r)
@@ -111,7 +114,7 @@ void malzak_state::malzak_map(address_map &map)
map(0x1400, 0x14ff).mirror(0x6000).rw(m_s2636[0], FUNC(s2636_device::read_data), FUNC(s2636_device::write_data));
map(0x14cb, 0x14cb).mirror(0x6000).r(FUNC(malzak_state::fake_VRLE_r));
map(0x1500, 0x15ff).mirror(0x6000).rw(m_s2636[1], FUNC(s2636_device::read_data), FUNC(s2636_device::write_data));
- map(0x1600, 0x16ff).mirror(0x6000).ram().w(FUNC(malzak_state::malzak_playfield_w));
+ map(0x1600, 0x16ff).mirror(0x6000).ram().w(FUNC(malzak_state::playfield_w));
map(0x1700, 0x17ff).mirror(0x6000).ram();
map(0x1800, 0x1fff).mirror(0x6000).ram().share("videoram");
map(0x2000, 0x2fff).rom();
@@ -133,7 +136,7 @@ void malzak_state::malzak2_map(address_map &map)
map(0x14cb, 0x14cb).mirror(0x6000).r(FUNC(malzak_state::fake_VRLE_r));
map(0x14cc, 0x14cc).mirror(0x6000).r(FUNC(malzak_state::s2636_portA_r));
map(0x1500, 0x15ff).mirror(0x6000).rw(m_s2636[1], FUNC(s2636_device::read_data), FUNC(s2636_device::write_data));
- map(0x1600, 0x16ff).mirror(0x6000).ram().w(FUNC(malzak_state::malzak_playfield_w));
+ map(0x1600, 0x16ff).mirror(0x6000).ram().w(FUNC(malzak_state::playfield_w));
map(0x1700, 0x17ff).mirror(0x6000).ram().share("nvram");
map(0x1800, 0x1fff).mirror(0x6000).ram().share("videoram");
map(0x2000, 0x2fff).rom();
@@ -144,7 +147,7 @@ void malzak_state::malzak2_map(address_map &map)
READ8_MEMBER(malzak_state::s2650_data_r)
{
- popmessage("S2650 data port read");
+// popmessage("S2650 data port read");
return 0xff;
}
@@ -158,22 +161,25 @@ WRITE8_MEMBER(malzak_state::port40_w)
// the selected version
// logerror("%s S2650: port 0x40 write: 0x%02x\n", machine().describe_context(), data);
m_mainbank->set_entry((data & 0x40) >> 6);
-}
-
-WRITE8_MEMBER(malzak_state::port60_w)
-{
- m_malzak_x = data;
- // logerror("I/O: port 0x60 write 0x%02x\n", data);
-}
-
-WRITE8_MEMBER(malzak_state::portc0_w)
-{
- m_malzak_y = data;
- // logerror("I/O: port 0xc0 write 0x%02x\n", data);
+ // bit 7 is set at final stage
+ u8 gfx_bank = ((data & 0x80) >> 7);
+ if (m_playfield_bank != gfx_bank)
+ {
+ m_playfield_bank = gfx_bank;
+ m_playfield_tilemap->mark_all_dirty();
+ }
}
READ8_MEMBER(malzak_state::collision_r)
{
+ // s2636 (0 only?) <-> tilemap collision detection
+ // yyyy ---- y collision
+ // 0100 -> upper tilemap border (pixel 160)
+ // 1101 -> lower (pixel 448)
+ // pix / 32 = suggested value+1
+ // ---- xxxx x collision
+ // TODO: verify scroll offsets
+
// High 4 bits seem to refer to the row affected.
if(++m_collision_counter > 15)
m_collision_counter = 0;
@@ -259,41 +265,22 @@ static const gfx_layout charlayout =
static GFXDECODE_START( gfx_malzak )
- GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 16*16 )
GFXDECODE_END
-
-void malzak_state::malzak_palette(palette_device &palette) const
-{
- for (int i = 0; i < 8 * 8; i++)
- {
- palette.set_pen_color(i * 2 + 0, pal1bit(i >> 3), pal1bit(i >> 4), pal1bit(i >> 5));
- palette.set_pen_color(i * 2 + 1, pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
- }
-}
-
-
-READ8_MEMBER(malzak_state::videoram_r)
-{
- return m_videoram[offset];
-}
-
void malzak_state::machine_start()
{
m_mainbank->configure_entries(0, 2, memregion("user2")->base(), 0x400);
save_item(NAME(m_playfield_code));
- save_item(NAME(m_malzak_x));
- save_item(NAME(m_malzak_y));
+ save_item(NAME(m_scrollx));
+ save_item(NAME(m_scrolly));
save_item(NAME(m_collision_counter));
}
void malzak_state::machine_reset()
{
std::fill(std::begin(m_playfield_code), std::end(m_playfield_code), 0);
-
- m_malzak_x = 0;
- m_malzak_y = 0;
}
void malzak_state::malzak(machine_config &config)
@@ -307,6 +294,7 @@ void malzak_state::malzak(machine_config &config)
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ // TODO: convert to PAL set_raw
m_screen->set_refresh_hz(50);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
m_screen->set_size(480, 512); /* vert size is a guess */
@@ -314,7 +302,7 @@ void malzak_state::malzak(machine_config &config)
m_screen->set_screen_update(FUNC(malzak_state::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_malzak);
- PALETTE(config, m_palette, FUNC(malzak_state::malzak_palette), 128);
+ PALETTE(config, m_palette, FUNC(malzak_state::palette_init), 128);
S2636(config, m_s2636[0], 0);
m_s2636[0]->set_offsets(0, -16); // -8, -16
@@ -408,8 +396,12 @@ ROM_START( malzak2 )
ROM_REGION( 0x0800, "gfx1", 0 )
ROM_LOAD( "malzak.1", 0x0000, 0x0800, CRC(74d5ff7b) SHA1(cae326370dc83b86542f9d070e2dc91b1b833356) )
+
+ ROM_REGION( 0x0100, "nvram", 0 )
+ // default nvram so that game boots in version II off the bat
+ ROM_LOAD( "malzak2.nv", 0x0000, 0x0100, CRC(aadf03d8) SHA1(9d751c4249faab7f5d88d0c99f33468f439641ad) )
ROM_END
-GAME( 19??, malzak, 0, malzak, malzak, malzak_state, empty_init, ROT0, "Kitronix", "Malzak", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 19??, malzak2, malzak, malzak2, malzak2, malzak_state, empty_init, ROT0, "Kitronix", "Malzak II", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 19??, malzak, 0, malzak, malzak, malzak_state, empty_init, ROT0, "Kitronix", "Malzak", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
+GAME( 19??, malzak2, malzak, malzak2, malzak2, malzak_state, empty_init, ROT0, "Kitronix", "Malzak II", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/mcb216.cpp b/src/mame/drivers/mcb216.cpp
index 43e0e5022aa..5807868b2be 100644
--- a/src/mame/drivers/mcb216.cpp
+++ b/src/mame/drivers/mcb216.cpp
@@ -69,7 +69,7 @@ READ8_MEMBER(mcb216_state::tms5501_status_r)
{
// D7 D6 D5 D4 D3 D2 D1 D0
// TBE RDA IPG TBE RDA SRV ORE FME
- return bitswap<8>(m_tms5501->sta_r(space, 0), 4, 3, 5, 4, 3, 2, 1, 0);
+ return bitswap<8>(m_tms5501->sta_r(), 4, 3, 5, 4, 3, 2, 1, 0);
}
void mcb216_state::mcb216_mem(address_map &map)
diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp
index 75e23c47632..83343b2d718 100644
--- a/src/mame/drivers/mcr.cpp
+++ b/src/mame/drivers/mcr.cpp
@@ -293,7 +293,7 @@
#include "dpoker.lh"
-WRITE8_MEMBER(mcr_state::mcr_control_port_w)
+void mcr_state::mcr_control_port_w(uint8_t data)
{
/*
Bit layout is as follows:
@@ -320,7 +320,7 @@ WRITE8_MEMBER(mcr_state::mcr_control_port_w)
*
*************************************/
-READ8_MEMBER(mcr_state::solarfox_ip0_r)
+uint8_t mcr_state::solarfox_ip0_r()
{
/* This is a kludge; according to the wiring diagram, the player 2 */
/* controls are hooked up as documented below. If you go into test */
@@ -334,7 +334,7 @@ READ8_MEMBER(mcr_state::solarfox_ip0_r)
}
-READ8_MEMBER(mcr_state::solarfox_ip1_r)
+uint8_t mcr_state::solarfox_ip1_r()
{
/* same deal as above */
if (m_mcr_cocktail_flip)
@@ -351,7 +351,7 @@ READ8_MEMBER(mcr_state::solarfox_ip1_r)
*
*************************************/
-READ8_MEMBER(mcr_state::kick_ip1_r)
+uint8_t mcr_state::kick_ip1_r()
{
return (ioport("DIAL2")->read() << 4) & 0xf0;
}
@@ -396,7 +396,7 @@ INPUT_CHANGED_MEMBER(mcr_dpoker_state::coin_in_hit)
}
}
-READ8_MEMBER(mcr_dpoker_state::ip0_r)
+uint8_t mcr_dpoker_state::ip0_r()
{
// d0: Coin-in Hit
// d1: Coin-in Release
@@ -411,7 +411,7 @@ READ8_MEMBER(mcr_dpoker_state::ip0_r)
}
-WRITE8_MEMBER(mcr_dpoker_state::lamps1_w)
+void mcr_dpoker_state::lamps1_w(uint8_t data)
{
// cpanel button lamps (white)
m_lamps[0] = BIT(data, 0); // hold 1
@@ -424,7 +424,7 @@ WRITE8_MEMBER(mcr_dpoker_state::lamps1_w)
m_lamps[7] = BIT(data, 3); // stand
}
-WRITE8_MEMBER(mcr_dpoker_state::lamps2_w)
+void mcr_dpoker_state::lamps2_w(uint8_t data)
{
// d5: button lamp: service or change
m_lamps[8] = BIT(data, 5);
@@ -436,7 +436,7 @@ WRITE8_MEMBER(mcr_dpoker_state::lamps2_w)
// d6, d7: unused?
}
-WRITE8_MEMBER(mcr_dpoker_state::output_w)
+void mcr_dpoker_state::output_w(uint8_t data)
{
// d0: ? coin return
// d1: ? divertor (active low)
@@ -452,7 +452,7 @@ WRITE8_MEMBER(mcr_dpoker_state::output_w)
m_output = data;
}
-WRITE8_MEMBER(mcr_dpoker_state::meters_w)
+void mcr_dpoker_state::meters_w(uint8_t data)
{
// meters?
}
@@ -465,13 +465,13 @@ WRITE8_MEMBER(mcr_dpoker_state::meters_w)
*
*************************************/
-WRITE8_MEMBER(mcr_state::wacko_op4_w)
+void mcr_state::wacko_op4_w(uint8_t data)
{
m_input_mux = data & 1;
}
-READ8_MEMBER(mcr_state::wacko_ip1_r)
+uint8_t mcr_state::wacko_ip1_r()
{
if (!m_input_mux)
return ioport("ssio:IP1")->read();
@@ -480,7 +480,7 @@ READ8_MEMBER(mcr_state::wacko_ip1_r)
}
-READ8_MEMBER(mcr_state::wacko_ip2_r)
+uint8_t mcr_state::wacko_ip2_r()
{
if (!m_input_mux)
return ioport("ssio:IP2")->read();
@@ -496,14 +496,14 @@ READ8_MEMBER(mcr_state::wacko_ip2_r)
*
*************************************/
-READ8_MEMBER(mcr_state::kroozr_ip1_r)
+uint8_t mcr_state::kroozr_ip1_r()
{
int dial = ioport("DIAL")->read();
return ((dial & 0x80) >> 1) | ((dial & 0x70) >> 4);
}
-WRITE8_MEMBER(mcr_state::kroozr_op4_w)
+void mcr_state::kroozr_op4_w(uint8_t data)
{
/*
bit 2 = ship control
@@ -520,7 +520,7 @@ WRITE8_MEMBER(mcr_state::kroozr_op4_w)
*
*************************************/
-WRITE8_MEMBER(mcr_state::journey_op4_w)
+void mcr_state::journey_op4_w(uint8_t data)
{
/* if we're not playing the sample yet, start it */
if (!m_samples->playing(0))
@@ -538,7 +538,7 @@ WRITE8_MEMBER(mcr_state::journey_op4_w)
*
*************************************/
-WRITE8_MEMBER(mcr_state::twotiger_op4_w)
+void mcr_state::twotiger_op4_w(uint8_t data)
{
for (int i = 0; i < 2; i++)
{
@@ -562,7 +562,7 @@ WRITE8_MEMBER(mcr_state::twotiger_op4_w)
*
*************************************/
-WRITE8_MEMBER(mcr_state::dotron_op4_w)
+void mcr_state::dotron_op4_w(uint8_t data)
{
/*
Flasher Control:
@@ -621,7 +621,7 @@ WRITE8_MEMBER(mcr_state::dotron_op4_w)
/* bit 4 = SEL0 (J1-8) on squawk n talk board */
/* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */
- m_squawk_n_talk->sound_select(machine().dummy_space(), offset, data & 0x0f);
+ m_squawk_n_talk->sound_select(data & 0x0f);
m_squawk_n_talk->sound_int(BIT(data, 4));
}
@@ -633,7 +633,7 @@ WRITE8_MEMBER(mcr_state::dotron_op4_w)
*
*************************************/
-READ8_MEMBER(mcr_nflfoot_state::ip2_r)
+uint8_t mcr_nflfoot_state::ip2_r()
{
/* bit 7 = J3-2 on IPU board = TXDA on SIO */
uint8_t val = m_ipu_sio_txda << 7;
@@ -641,7 +641,7 @@ READ8_MEMBER(mcr_nflfoot_state::ip2_r)
}
-WRITE8_MEMBER(mcr_nflfoot_state::op4_w)
+void mcr_nflfoot_state::op4_w(uint8_t data)
{
/* bit 7 = J3-7 on IPU board = /RXDA on SIO */
m_ipu_sio->rxa_w(!((data >> 7) & 1));
@@ -651,7 +651,7 @@ WRITE8_MEMBER(mcr_nflfoot_state::op4_w)
/* bit 4 = SEL0 (J1-8) on squawk n talk board */
/* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */
- m_squawk_n_talk->sound_select(machine().dummy_space(), offset, data & 0x0f);
+ m_squawk_n_talk->sound_select(data & 0x0f);
m_squawk_n_talk->sound_int(BIT(data, 4));
}
@@ -663,25 +663,25 @@ WRITE8_MEMBER(mcr_nflfoot_state::op4_w)
*
*************************************/
-READ8_MEMBER(mcr_state::demoderb_ip1_r)
+uint8_t mcr_state::demoderb_ip1_r()
{
return ioport("ssio:IP1")->read() |
(ioport(m_input_mux ? "ssio:IP1.ALT2" : "ssio:IP1.ALT1")->read() << 2);
}
-READ8_MEMBER(mcr_state::demoderb_ip2_r)
+uint8_t mcr_state::demoderb_ip2_r()
{
return ioport("ssio:IP2")->read() |
(ioport(m_input_mux ? "ssio:IP2.ALT2" : "ssio:IP2.ALT1")->read() << 2);
}
-WRITE8_MEMBER(mcr_state::demoderb_op4_w)
+void mcr_state::demoderb_op4_w(uint8_t data)
{
if (data & 0x40) m_input_mux = 1;
if (data & 0x80) m_input_mux = 0;
- m_turbo_cheap_squeak->write(space, offset, data);
+ m_turbo_cheap_squeak->write(data);
}
@@ -2908,10 +2908,10 @@ void mcr_dpoker_state::init_dpoker()
m_maincpu->space(AS_IO).install_read_port(0x28, 0x28, "P28");
m_maincpu->space(AS_IO).install_read_port(0x2c, 0x2c, "P2C");
- m_maincpu->space(AS_IO).install_write_handler(0x2c, 0x2c, write8_delegate(*this, FUNC(mcr_dpoker_state::lamps1_w)));
- m_maincpu->space(AS_IO).install_write_handler(0x30, 0x30, write8_delegate(*this, FUNC(mcr_dpoker_state::lamps2_w)));
- m_maincpu->space(AS_IO).install_write_handler(0x34, 0x34, write8_delegate(*this, FUNC(mcr_dpoker_state::output_w)));
- m_maincpu->space(AS_IO).install_write_handler(0x3f, 0x3f, write8_delegate(*this, FUNC(mcr_dpoker_state::meters_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x2c, 0x2c, write8smo_delegate(*this, FUNC(mcr_dpoker_state::lamps1_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x30, 0x30, write8smo_delegate(*this, FUNC(mcr_dpoker_state::lamps2_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x34, 0x34, write8smo_delegate(*this, FUNC(mcr_dpoker_state::output_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x3f, 0x3f, write8smo_delegate(*this, FUNC(mcr_dpoker_state::meters_w)));
m_coin_status = 0;
m_output = 0;
@@ -2942,7 +2942,7 @@ void mcr_state::init_twotiger()
mcr_init(90010, 91399, 90913);
m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcr_state::twotiger_op4_w));
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, 0, read8_delegate(*this, FUNC(mcr_state::twotiger_videoram_r)), write8_delegate(*this, FUNC(mcr_state::twotiger_videoram_w)));
+ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, 0, read8sm_delegate(*this, FUNC(mcr_state::twotiger_videoram_r)), write8sm_delegate(*this, FUNC(mcr_state::twotiger_videoram_w)));
}
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp
index b0602f799db..ab2f9eb7407 100644
--- a/src/mame/drivers/mcr3.cpp
+++ b/src/mame/drivers/mcr3.cpp
@@ -118,7 +118,7 @@
-WRITE8_MEMBER(mcr3_state::mcrmono_control_port_w)
+void mcr3_state::mcrmono_control_port_w(uint8_t data)
{
/*
Bit layout is as follows:
@@ -143,28 +143,28 @@ WRITE8_MEMBER(mcr3_state::mcrmono_control_port_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::demoderm_ip1_r)
+uint8_t mcr3_state::demoderm_ip1_r()
{
return ioport("MONO.IP1")->read() |
(ioport(m_input_mux ? "MONO.IP1.ALT2" : "MONO.IP1.ALT1")->read() << 2);
}
-READ8_MEMBER(mcr3_state::demoderm_ip2_r)
+uint8_t mcr3_state::demoderm_ip2_r()
{
return ioport("MONO.IP2")->read() |
(ioport(m_input_mux ? "MONO.IP2.ALT2" : "MONO.IP2.ALT1")->read() << 2);
}
-WRITE8_MEMBER(mcr3_state::demoderm_op6_w)
+void mcr3_state::demoderm_op6_w(uint8_t data)
{
/* top 2 bits select the input */
if (data & 0x80) m_input_mux = 0;
if (data & 0x40) m_input_mux = 1;
/* low 5 bits control the turbo CS */
- m_turbo_cheap_squeak->write(space, offset, data);
+ m_turbo_cheap_squeak->write(data);
}
@@ -175,13 +175,13 @@ WRITE8_MEMBER(mcr3_state::demoderm_op6_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::maxrpm_ip1_r)
+uint8_t maxrpm_state::maxrpm_ip1_r()
{
return m_latched_input;
}
-READ8_MEMBER(mcr3_state::maxrpm_ip2_r)
+uint8_t maxrpm_state::maxrpm_ip2_r()
{
/* this is a blatant hack, should really do a better implementation */
static const uint8_t shift_bits[5] = { 0x00, 0x05, 0x06, 0x01, 0x02 };
@@ -226,24 +226,24 @@ READ8_MEMBER(mcr3_state::maxrpm_ip2_r)
}
-WRITE8_MEMBER(mcr3_state::maxrpm_op5_w)
+void maxrpm_state::maxrpm_op5_w(uint8_t data)
{
/* latch bits 1-4 as input to the ADC0844 */
m_maxrpm_adc_control = (data >> 1) & 0x0f;
/* remaining bits go to standard connections */
- mcrmono_control_port_w(space, offset, data);
+ mcrmono_control_port_w(data);
}
-WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
+void maxrpm_state::maxrpm_op6_w(uint8_t data)
{
/*
Reflective Sensor Control:
4 bits of input from OP5 are routed to a transceiver at U2, and
ultimately on to the low 4 I/O pins of the ADC0844. The /EN on
the transceiver is directly connected to J2-2. Note that two bits
- get swapped in the process: OP53 = MA3 and OP54 = MA2.
+ get swapped in the process: OP53 = MA3 and OP54 = MA2.
In order to perform a read or a write to the ADC0844, the /RD and
/WR signals are directly controlled via J2-8 and J2-7 respectively.
@@ -266,7 +266,7 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
m_maxrpm_adc->write(bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0));
/* low 5 bits control the turbo CS */
- m_turbo_cheap_squeak->write(space, offset, data);
+ m_turbo_cheap_squeak->write(data);
}
@@ -277,19 +277,19 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::rampage_ip4_r)
+uint8_t mcr3_state::rampage_ip4_r()
{
- return ioport("MONO.IP4")->read() | (m_sounds_good->read(space,0) << 7);
+ return ioport("MONO.IP4")->read() | (m_sounds_good->read() << 7);
}
-WRITE8_MEMBER(mcr3_state::rampage_op6_w)
+void mcr3_state::rampage_op6_w(uint8_t data)
{
/* bit 5 controls reset of the Sounds Good board */
m_sounds_good->reset_write((~data >> 5) & 1);
/* low 5 bits go directly to the Sounds Good board */
- m_sounds_good->write(space, offset, data);
+ m_sounds_good->write(data);
}
@@ -300,13 +300,13 @@ WRITE8_MEMBER(mcr3_state::rampage_op6_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::powerdrv_ip2_r)
+uint8_t mcr3_state::powerdrv_ip2_r()
{
- return ioport("MONO.IP2")->read() | (m_sounds_good->read(space, 0) << 7);
+ return ioport("MONO.IP2")->read() | (m_sounds_good->read() << 7);
}
-WRITE8_MEMBER(mcr3_state::powerdrv_op5_w)
+void mcr3_state::powerdrv_op5_w(uint8_t data)
{
/*
Lamp Board:
@@ -323,17 +323,17 @@ WRITE8_MEMBER(mcr3_state::powerdrv_op5_w)
m_lamps[2] = BIT(data, 1);
/* remaining bits go to standard connections */
- mcrmono_control_port_w(space, offset, data);
+ mcrmono_control_port_w(data);
}
-WRITE8_MEMBER(mcr3_state::powerdrv_op6_w)
+void mcr3_state::powerdrv_op6_w(uint8_t data)
{
/* bit 5 controls reset of the Sounds Good board */
m_sounds_good->reset_write((~data >> 5) & 1);
/* low 5 bits go directly to the Sounds Good board */
- m_sounds_good->write(space, offset, data);
+ m_sounds_good->write(data);
}
@@ -344,16 +344,16 @@ WRITE8_MEMBER(mcr3_state::powerdrv_op6_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::stargrds_ip0_r)
+uint8_t mcr3_state::stargrds_ip0_r()
{
uint8_t result = ioport("MONO.IP0")->read();
if (m_input_mux)
result = (result & ~0x0a) | (ioport("MONO.IP0.ALT")->read() & 0x0a);
- return (result & ~0x10) | ((m_sounds_good->read(space, 0) << 4) & 0x10);
+ return (result & ~0x10) | ((m_sounds_good->read() << 4) & 0x10);
}
-WRITE8_MEMBER(mcr3_state::stargrds_op5_w)
+void mcr3_state::stargrds_op5_w(uint8_t data)
{
/* bit 1 controls input muxing on port 0 */
m_input_mux = (data >> 1) & 1;
@@ -366,17 +366,17 @@ WRITE8_MEMBER(mcr3_state::stargrds_op5_w)
m_lamps[2] = BIT(data, 4);
/* remaining bits go to standard connections */
- mcrmono_control_port_w(space, offset, data);
+ mcrmono_control_port_w(data);
}
-WRITE8_MEMBER(mcr3_state::stargrds_op6_w)
+void mcr3_state::stargrds_op6_w(uint8_t data)
{
/* bit 6 controls reset of the Sounds Good board */
m_sounds_good->reset_write((~data >> 6) & 1);
/* unline the other games, the STROBE is in the high bit instead of the low bit */
- m_sounds_good->write(space, offset, (data << 1) | (data >> 7));
+ m_sounds_good->write((data << 1) | (data >> 7));
}
@@ -387,20 +387,20 @@ WRITE8_MEMBER(mcr3_state::stargrds_op6_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::spyhunt_ip1_r)
+uint8_t mcrsc_csd_state::spyhunt_ip1_r()
{
return ioport("ssio:IP1")->read() | (m_cheap_squeak_deluxe->stat_r() << 5);
}
-READ8_MEMBER(mcr3_state::spyhunt_ip2_r)
+uint8_t mcrsc_csd_state::spyhunt_ip2_r()
{
/* multiplexed steering wheel/gas pedal */
return ioport(m_input_mux ? "ssio:IP2.ALT" : "ssio:IP2")->read();
}
-WRITE8_MEMBER(mcr3_state::spyhunt_op4_w)
+void mcrsc_csd_state::spyhunt_op4_w(uint8_t data)
{
/* Spy Hunter uses port 4 for talking to the Cheap Squeak Deluxe */
/* (and for toggling the lamps and muxing the analog inputs) */
@@ -441,7 +441,7 @@ WRITE8_MEMBER(mcr3_state::spyhunt_op4_w)
*
*************************************/
-READ8_MEMBER(mcr3_state::turbotag_ip2_r)
+uint8_t mcrsc_csd_state::turbotag_ip2_r()
{
/* multiplexed steering wheel/gas pedal */
if (m_input_mux)
@@ -451,7 +451,7 @@ READ8_MEMBER(mcr3_state::turbotag_ip2_r)
}
-READ8_MEMBER(mcr3_state::turbotag_kludge_r)
+uint8_t mcrsc_csd_state::turbotag_kludge_r()
{
/* The checksum on the ttprog1.bin ROM seems to be bad by 1 bit */
/* The checksum should come out to $82 but it should be $92 */
@@ -1128,7 +1128,7 @@ void mcr3_state::mono_tcs(machine_config &config)
m_turbo_cheap_squeak->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
}
-void mcr3_state::maxrpm(machine_config &config)
+void maxrpm_state::maxrpm(machine_config &config)
{
mono_tcs(config);
@@ -1180,7 +1180,7 @@ void mcr3_state::mcrscroll(machine_config &config)
/* Spy Hunter = scrolling system with an SSIO and a cheap squeak deluxe */
-void mcr3_state::mcrsc_csd(machine_config &config)
+void mcrsc_csd_state::mcrsc_csd(machine_config &config)
{
mcrscroll(config);
@@ -1569,26 +1569,26 @@ void mcr3_state::mcr_common_init()
void mcr3_state::init_demoderm()
{
mcr_common_init();
- m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8_delegate(*this, FUNC(mcr3_state::demoderm_ip1_r)));
- m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8_delegate(*this, FUNC(mcr3_state::demoderm_ip2_r)));
- m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::demoderm_op6_w)));
+ m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8smo_delegate(*this, FUNC(mcr3_state::demoderm_ip1_r)));
+ m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8smo_delegate(*this, FUNC(mcr3_state::demoderm_ip2_r)));
+ m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::demoderm_op6_w)));
}
void mcr3_state::init_sarge()
{
mcr_common_init();
- m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*m_turbo_cheap_squeak, FUNC(midway_turbo_cheap_squeak_device::write)));
+ m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*m_turbo_cheap_squeak, FUNC(midway_turbo_cheap_squeak_device::write)));
}
-void mcr3_state::init_maxrpm()
+void maxrpm_state::init_maxrpm()
{
mcr_common_init();
- m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8_delegate(*this, FUNC(mcr3_state::maxrpm_ip1_r)));
- m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8_delegate(*this, FUNC(mcr3_state::maxrpm_ip2_r)));
- m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8_delegate(*this, FUNC(mcr3_state::maxrpm_op5_w)));
- m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::maxrpm_op6_w)));
+ m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_ip1_r)));
+ m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_ip2_r)));
+ m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_op5_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_op6_w)));
save_item(NAME(m_maxrpm_adc_control));
save_item(NAME(m_maxrpm_last_shift));
@@ -1600,35 +1600,35 @@ void mcr3_state::init_maxrpm()
void mcr3_state::init_rampage()
{
mcr_common_init();
- m_maincpu->space(AS_IO).install_read_handler(0x04, 0x04, read8_delegate(*this, FUNC(mcr3_state::rampage_ip4_r)));
- m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::rampage_op6_w)));
+ m_maincpu->space(AS_IO).install_read_handler(0x04, 0x04, read8smo_delegate(*this, FUNC(mcr3_state::rampage_ip4_r)));
+ m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::rampage_op6_w)));
}
void mcr3_state::init_powerdrv()
{
mcr_common_init();
- m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8_delegate(*this, FUNC(mcr3_state::powerdrv_ip2_r)));
- m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8_delegate(*this, FUNC(mcr3_state::powerdrv_op5_w)));
- m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::powerdrv_op6_w)));
+ m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8smo_delegate(*this, FUNC(mcr3_state::powerdrv_ip2_r)));
+ m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8smo_delegate(*this, FUNC(mcr3_state::powerdrv_op5_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::powerdrv_op6_w)));
}
void mcr3_state::init_stargrds()
{
mcr_common_init();
- m_maincpu->space(AS_IO).install_read_handler(0x00, 0x00, read8_delegate(*this, FUNC(mcr3_state::stargrds_ip0_r)));
- m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8_delegate(*this, FUNC(mcr3_state::stargrds_op5_w)));
- m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::stargrds_op6_w)));
+ m_maincpu->space(AS_IO).install_read_handler(0x00, 0x00, read8smo_delegate(*this, FUNC(mcr3_state::stargrds_ip0_r)));
+ m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8smo_delegate(*this, FUNC(mcr3_state::stargrds_op5_w)));
+ m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::stargrds_op6_w)));
}
-void mcr3_state::init_spyhunt()
+void mcrsc_csd_state::init_spyhunt()
{
mcr_common_init();
- m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcr3_state::spyhunt_ip1_r));
- m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcr3_state::spyhunt_ip2_r));
- m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcr3_state::spyhunt_op4_w));
+ m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcrsc_csd_state::spyhunt_ip1_r));
+ m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcrsc_csd_state::spyhunt_ip2_r));
+ m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcrsc_csd_state::spyhunt_op4_w));
m_spyhunt_sprite_color_mask = 0x00;
m_spyhunt_scroll_offset = 16;
@@ -1645,12 +1645,12 @@ void mcr3_state::init_crater()
}
-void mcr3_state::init_turbotag()
+void mcrsc_csd_state::init_turbotag()
{
mcr_common_init();
- m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcr3_state::spyhunt_ip1_r));
- m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcr3_state::turbotag_ip2_r));
- m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcr3_state::spyhunt_op4_w));
+ m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcrsc_csd_state::spyhunt_ip1_r));
+ m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcrsc_csd_state::turbotag_ip2_r));
+ m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcrsc_csd_state::spyhunt_op4_w));
m_spyhunt_sprite_color_mask = 0x00;
m_spyhunt_scroll_offset = 88;
@@ -1659,7 +1659,7 @@ void mcr3_state::init_turbotag()
m_cheap_squeak_deluxe->suspend_cpu();
/* kludge for bad ROM read */
- m_maincpu->space(AS_PROGRAM).install_read_handler(0x0b53, 0x0b53, read8_delegate(*this, FUNC(mcr3_state::turbotag_kludge_r)));
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x0b53, 0x0b53, read8smo_delegate(*this, FUNC(mcrsc_csd_state::turbotag_kludge_r)));
}
@@ -1673,14 +1673,14 @@ void mcr3_state::init_turbotag()
/* MCR monoboard games */
GAME( 1984, demoderm, demoderb, mono_tcs, demoderm, mcr3_state, init_demoderm, ROT0, "Bally Midway", "Demolition Derby (MCR-3 Mono Board Version)", MACHINE_SUPPORTS_SAVE )
GAME( 1985, sarge, 0, mono_tcs, sarge, mcr3_state, init_sarge, ROT0, "Bally Midway", "Sarge", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, maxrpm, 0, maxrpm, maxrpm, mcr3_state, init_maxrpm, ROT0, "Bally Midway", "Max RPM (ver 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, maxrpm, 0, maxrpm, maxrpm, maxrpm_state, init_maxrpm, ROT0, "Bally Midway", "Max RPM (ver 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, rampage, 0, mono_sg, rampage, mcr3_state, init_rampage, ROT0, "Bally Midway", "Rampage (Rev 3, 8/27/86)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, rampage2, rampage, mono_sg, rampage, mcr3_state, init_rampage, ROT0, "Bally Midway", "Rampage (Rev 2, 8/4/86)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, powerdrv, 0, mono_sg, powerdrv, mcr3_state, init_powerdrv, ROT0, "Bally Midway", "Power Drive", MACHINE_SUPPORTS_SAVE )
GAME( 1987, stargrds, 0, mono_sg, stargrds, mcr3_state, init_stargrds, ROT0, "Bally Midway", "Star Guards", MACHINE_SUPPORTS_SAVE )
/* MCR scrolling games */
-GAMEL( 1983, spyhunt, 0, mcrsc_csd, spyhunt, mcr3_state, init_spyhunt, ROT90, "Bally Midway", "Spy Hunter", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
-GAMEL( 1983, spyhuntp, spyhunt, mcrsc_csd, spyhunt, mcr3_state, init_spyhunt, ROT90, "Bally Midway (Playtronic license)", "Spy Hunter (Playtronic license)", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
-GAME( 1984, crater, 0, mcrscroll, crater, mcr3_state, init_crater, ORIENTATION_FLIP_X, "Bally Midway", "Crater Raider", MACHINE_SUPPORTS_SAVE )
-GAMEL( 1985, turbotag, 0, mcrsc_csd, turbotag, mcr3_state, init_turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", MACHINE_SUPPORTS_SAVE, layout_turbotag )
+GAMEL( 1983, spyhunt, 0, mcrsc_csd, spyhunt, mcrsc_csd_state, init_spyhunt, ROT90, "Bally Midway", "Spy Hunter", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
+GAMEL( 1983, spyhuntp, spyhunt, mcrsc_csd, spyhunt, mcrsc_csd_state, init_spyhunt, ROT90, "Bally Midway (Playtronic license)", "Spy Hunter (Playtronic license)", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
+GAME( 1984, crater, 0, mcrscroll, crater, mcr3_state, init_crater, ORIENTATION_FLIP_X, "Bally Midway", "Crater Raider", MACHINE_SUPPORTS_SAVE )
+GAMEL( 1985, turbotag, 0, mcrsc_csd, turbotag, mcrsc_csd_state, init_turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", MACHINE_SUPPORTS_SAVE, layout_turbotag )
diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp
index 280bbab4453..0a1b72f3ff6 100644
--- a/src/mame/drivers/mcr68.cpp
+++ b/src/mame/drivers/mcr68.cpp
@@ -78,7 +78,7 @@ WRITE16_MEMBER(mcr68_state::xenophobe_control_w)
{
COMBINE_DATA(&m_control_word);
/* m_sounds_good->reset_write(~m_control_word & 0x0020);*/
- m_sounds_good->write(space, offset, ((m_control_word & 0x000f) << 1) | ((m_control_word & 0x0010) >> 4));
+ m_sounds_good->write(((m_control_word & 0x000f) << 1) | ((m_control_word & 0x0010) >> 4));
}
@@ -93,7 +93,7 @@ WRITE16_MEMBER(mcr68_state::blasted_control_w)
{
COMBINE_DATA(&m_control_word);
/* m_sounds_good->reset_write(~m_control_word & 0x0020);*/
- m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x1f);
+ m_sounds_good->write((m_control_word >> 8) & 0x1f);
}
@@ -109,14 +109,14 @@ READ16_MEMBER(mcr68_state::spyhunt2_port_0_r)
int result = ioport("IN0")->read();
int analog = m_adc->read();
- return result | ((m_sounds_good->read(space, 0) & 1) << 5) | (analog << 8);
+ return result | ((m_sounds_good->read() & 1) << 5) | (analog << 8);
}
READ16_MEMBER(mcr68_state::spyhunt2_port_1_r)
{
int result = ioport("IN1")->read();
- return result | ((m_turbo_cheap_squeak->read(space, 0) & 1) << 7);
+ return result | ((m_turbo_cheap_squeak->read() & 1) << 7);
}
@@ -125,10 +125,10 @@ WRITE16_MEMBER(mcr68_state::spyhunt2_control_w)
COMBINE_DATA(&m_control_word);
/* m_turbo_cheap_squeak->reset_write(~m_control_word & 0x0080);*/
- m_turbo_cheap_squeak->write(space, offset, (m_control_word >> 8) & 0x001f);
+ m_turbo_cheap_squeak->write((m_control_word >> 8) & 0x001f);
m_sounds_good->reset_write(~m_control_word & 0x2000);
- m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x001f);
+ m_sounds_good->write((m_control_word >> 8) & 0x001f);
m_adc->write((m_control_word >> 3) & 0x0f);
}
diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp
index 424591c3f0b..afc8c0fc236 100644
--- a/src/mame/drivers/meadows.cpp
+++ b/src/mame/drivers/meadows.cpp
@@ -201,7 +201,7 @@ WRITE8_MEMBER(meadows_state::meadows_audio_w)
INPUT_CHANGED_MEMBER(meadows_state::coin_inserted)
{
- m_maincpu->set_input_line_and_vector(0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82); // S2650
+ m_maincpu->set_input_line(0, (newval ? ASSERT_LINE : CLEAR_LINE));
}
@@ -626,6 +626,7 @@ void meadows_state::meadows(machine_config &config)
/* basic machine hardware */
S2650(config, m_maincpu, MASTER_CLOCK/8); /* 5MHz / 8 = 625 kHz */
m_maincpu->set_addrmap(AS_PROGRAM, &meadows_state::meadows_main_map);
+ m_maincpu->intack_handler().set([]() { return 0x82; });
S2650(config, m_audiocpu, MASTER_CLOCK/8); /* 5MHz / 8 = 625 kHz */
m_audiocpu->set_addrmap(AS_PROGRAM, &meadows_state::audio_map);
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index 1f8aba16840..16d13878d9c 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -3435,8 +3435,11 @@ ROM_START( kickoffb )
ROM_REGION( 0x010000, "oki1", 0 ) /* Samples */
ROM_LOAD( "k-1.1h", 0x000000, 0x010000, CRC(4e09f403) SHA1(5d2ec598333e968b3a9ac797e93e4d3830436d26) )
- ROM_REGION( 0x0200, "proms", 0 ) /* Priority PROM */
- ROM_LOAD( "kick.bin", 0x0000, 0x0200, CRC(85b30ac4) SHA1(b03f577ceb0f26b67453ffa52ef61fea76a93184) )
+ ROM_REGION( 0x200, "proms", ROMREGION_ERASEFF ) // this bootleg has no PROMs
+
+ ROM_REGION( 0x208, "plds", 0 ) // protected
+ ROM_LOAD( "pal16l8b-2cn.12k", 0x000, 0x0104, NO_DUMP )
+ ROM_LOAD( "pal16l8b-2cn.12p", 0x104, 0x0104, NO_DUMP )
ROM_END
/***************************************************************************
@@ -5017,8 +5020,8 @@ GAME( 1988, p47, 0, system_A, p47, megasys1_state, emp
GAME( 1988, p47j, p47, system_A, p47, megasys1_state, empty_init, ROT0, "Jaleco", "P-47 - The Freedom Fighter (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, p47je, p47, system_A, p47, megasys1_state, empty_init, ROT0, "Jaleco", "P-47 - The Freedom Fighter (Japan, Export)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, p47b, p47, p47b, p47, megasys1_state, empty_init, ROT0, "bootleg","P-47 - The Freedom Fighter (World, bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, kickoff, 0, system_A, kickoff, megasys1_state, empty_init, ROT0, "Jaleco", "Kick Off (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, kickoffb, kickoff, kickoffb, kickoff, megasys1_state, empty_init, ROT0, "bootleg (Comodo)", "Kick Off (bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // OKI needs to be checked
+GAME( 1988, kickoff, 0, system_A, kickoff, megasys1_state, empty_init, ROT0, "Jaleco", "Kick Off - Jaleco Cup (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, kickoffb, kickoff, kickoffb, kickoff, megasys1_state, empty_init, ROT0, "bootleg (Comodo)", "Kick Off - World Cup (bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // OKI needs to be checked
GAME( 1988, tshingen, 0, system_A, tshingen, megasys1_state, init_phantasm, ROT0, "Jaleco", "Shingen Samurai-Fighter (Japan, English)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1988, tshingena,tshingen, system_A, tshingen, megasys1_state, init_phantasm, ROT0, "Jaleco", "Takeda Shingen (Japan, Japanese)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1988, kazan, 0, system_A_iganinju, kazan, megasys1_state, init_iganinju, ROT0, "Jaleco", "Ninja Kazan (World)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp
index 2ef77b5a178..63bb06f44b4 100644
--- a/src/mame/drivers/metro.cpp
+++ b/src/mame/drivers/metro.cpp
@@ -3162,7 +3162,7 @@ void metro_state::batlbubl(machine_config &config)
void metro_state::metro_upd7810_sound(machine_config &config)
{
- upd7810_device &upd(UPD7810(config, m_audiocpu, 24_MHz_XTAL/2));
+ upd78c10_device &upd(UPD78C10(config, m_audiocpu, 24_MHz_XTAL/2));
upd.rxd_func().set(FUNC(metro_state::rxd_r));
upd.set_addrmap(AS_PROGRAM, &metro_state::upd7810_map);
upd.pa_in_cb().set(FUNC(metro_state::upd7810_porta_r));
@@ -3173,7 +3173,7 @@ void metro_state::metro_upd7810_sound(machine_config &config)
void metro_state::daitorid_upd7810_sound(machine_config &config)
{
- upd7810_device &upd(UPD7810(config, m_audiocpu, 12_MHz_XTAL));
+ upd78c10_device &upd(UPD78C10(config, m_audiocpu, 12_MHz_XTAL));
upd.rxd_func().set(FUNC(metro_state::rxd_r));
upd.set_addrmap(AS_PROGRAM, &metro_state::upd7810_map);
upd.pa_in_cb().set(FUNC(metro_state::upd7810_porta_r));
diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp
index 9db756816c7..5154a1609d5 100644
--- a/src/mame/drivers/micral.cpp
+++ b/src/mame/drivers/micral.cpp
@@ -121,7 +121,7 @@ READ8_MEMBER( micral_state::unk_r )
READ8_MEMBER( micral_state::keyin_r )
{
m_uart->write_rdav(0);
- u8 result = m_uart->get_received_data();
+ u8 result = m_uart->receive();
m_uart->write_rdav(1);
return result;
}
diff --git a/src/mame/drivers/microterm_f8.cpp b/src/mame/drivers/microterm_f8.cpp
index 6591e7b3dc5..be9068af4e0 100644
--- a/src/mame/drivers/microterm_f8.cpp
+++ b/src/mame/drivers/microterm_f8.cpp
@@ -230,7 +230,7 @@ WRITE8_MEMBER(microterm_f8_state::vram_w)
WRITE8_MEMBER(microterm_f8_state::uart_transmit_w)
{
- m_uart->set_transmit_data((data & 0x7f) | (m_dsw[2]->read() & 0x10) << 3);
+ m_uart->transmit((data & 0x7f) | (m_dsw[2]->read() & 0x10) << 3);
}
bool microterm_f8_state::poll_keyboard()
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index 113582978d7..a7cf6a2e9c4 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -91,6 +91,8 @@ private:
DECLARE_READ16_MEMBER(mjmux_r);
DECLARE_WRITE16_MEMBER(okim1_rombank_w);
DECLARE_WRITE16_MEMBER(okim0_rombank_w);
+ DECOSPR_PRIORITY_CB_MEMBER(pri_callback);
+
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -101,7 +103,6 @@ private:
void miragemj_state::video_start()
{
- m_sprgen->alloc_sprite_bitmap();
}
uint32_t miragemj_state::screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@@ -111,17 +112,14 @@ uint32_t miragemj_state::screen_update_mirage(screen_device &screen, bitmap_rgb3
flip_screen_set(BIT(flip, 7));
m_sprgen->set_flip_screen(BIT(flip, 7));
- m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
-
m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
+ screen.priority().fill(0, cliprect);
bitmap.fill(256, cliprect); /* not verified */
- m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
- m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0x1ff);
- m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
- m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0x1ff);
-
+ m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
+ m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
return 0;
}
@@ -263,6 +261,15 @@ static GFXDECODE_START( gfx_mirage )
GFXDECODE_END
+DECOSPR_PRIORITY_CB_MEMBER(miragemj_state::pri_callback)
+{
+ u32 mask = 0; // above everything
+ if (extpri)
+ mask |= GFX_PMASK_2; // under the uppermost playfield
+
+ return mask;
+}
+
DECO16IC_BANK_CB_MEMBER(miragemj_state::bank_callback)
{
return ((bank >> 4) & 0x7) * 0x1000;
@@ -304,8 +311,6 @@ void miragemj_state::mirage(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
@@ -318,6 +323,7 @@ void miragemj_state::mirage(machine_config &config)
DECO_SPRITE(config, m_sprgen, 0);
m_sprgen->set_gfx_region(2);
+ m_sprgen->set_pri_callback(FUNC(miragemj_state::pri_callback));
m_sprgen->set_gfxdecode_tag("gfxdecode");
/* sound hardware */
diff --git a/src/mame/drivers/missb2.cpp b/src/mame/drivers/missb2.cpp
index 94fb1414a08..e9a9af47827 100644
--- a/src/mame/drivers/missb2.cpp
+++ b/src/mame/drivers/missb2.cpp
@@ -463,7 +463,7 @@ void missb2_state::machine_reset()
MACHINE_RESET_CALL_MEMBER(common);
m_oki->reset();
- bublbobl_bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0x00, 0xFF); // force a bankswitch write of all zeroes, as /RESET clears the latch
+ bublbobl_bankswitch_w(0x00); // force a bankswitch write of all zeroes, as /RESET clears the latch
}
void missb2_state::missb2(machine_config &config)
diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp
index 6aa4787d203..868fae7611d 100644
--- a/src/mame/drivers/missile.cpp
+++ b/src/mame/drivers/missile.cpp
@@ -1507,7 +1507,7 @@ GAME( 1981, suprmatk, missile, missile, suprmatk, missile_state, init_suprmatk,
GAME( 1981, suprmatkd,missile, missile, suprmatk, missile_state, empty_init, ROT0, "Atari / General Computer Corporation", "Super Missile Attack (not encrypted)", MACHINE_SUPPORTS_SAVE )
/* the following bootleg has extremely similar program ROMs to missile1, but has different unknown sound hardware and 2 more ROMs */
-GAME( 1981, missilea, missile, missilea, missile, missile_state, empty_init, ROT0, "bootleg (Ugames)", "Missile Attack", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, missilea, missile, missilea, missile, missile_state, empty_init, ROT0, "bootleg (U.Games)", "Missile Attack (U.Games bootleg of Missile Command)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
/* the following bootlegs are on different hardware and don't work */
GAME( 1980, mcombat, missile, missileb, missileb, missile_state, empty_init, ROT0, "bootleg (Videotron)", "Missile Combat (Videotron bootleg, set 1)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp
index 6577dda9104..e8e4fe7f905 100644
--- a/src/mame/drivers/model1.cpp
+++ b/src/mame/drivers/model1.cpp
@@ -1069,7 +1069,7 @@ static INPUT_PORTS_START( swa )
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(27,227) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
PORT_START("THROTTLE")
- PORT_BIT( 0xff, 0xe4, IPT_PEDAL ) PORT_MINMAX(28,228) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_REVERSE
+ PORT_BIT( 0xff, 0x7f, IPT_PEDAL ) PORT_MINMAX(28,200) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_REVERSE
PORT_START("STICK2X")
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(27,227) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(2) PORT_REVERSE
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 91b373a4d25..ecb21e91978 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -3482,26 +3482,18 @@ ROM_START( vf2o ) /* Virtua Fighter 2, Model 2A */
ROM_END
ROM_START( airwlkrs )
- ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program
+ ROM_REGION( 0x200000, "maincpu", 0 )
ROM_LOAD32_WORD( "j_2-14_ic12_fe7e.12", 0x000000, 0x080000, CRC(8851a8d7) SHA1(fe4b1fab4c641718c026ea54c2b2777f3f206f2c) )
ROM_LOAD32_WORD( "j_2-14_ic13_d539.13", 0x000002, 0x080000, CRC(72287ee0) SHA1(634d5dcd815883cd03ec633f08e1920adc15c53c) )
- ROM_REGION32_LE( 0x2400000, "main_data", 0 ) // Data
- ROM_LOAD32_WORD( "mpr-19236.10", 0x000000, 0x200000, CRC(d1bfbebe) SHA1(67ea1d2423682e83126dbf31f9b526e213cd25fd) )
- ROM_LOAD32_WORD( "mpr-19237.11", 0x000002, 0x200000, CRC(fbcb7b52) SHA1(4428008f9cc62aaf9479009363116c3dafe0626d) )
- ROM_LOAD32_WORD( "11-7_ic8_d400.8", 0x400000, 0x080000, CRC(37f300bd) SHA1(eb43583917cbf4501e9d21ea721577b36764cc6f) )
- ROM_LOAD32_WORD( "11-7_ic9_6e4a.9", 0x400002, 0x080000, CRC(454e4a09) SHA1(177715de3dffbaed0eaff2d5e859460a650bea42) )
- ROM_COPY( "main_data", 0x400000, 0x500000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0x600000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0x700000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0x800000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0x900000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0xa00000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0xb00000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0xc00000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0xd00000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0xe00000, 0x100000 )
- ROM_COPY( "main_data", 0x400000, 0xf00000, 0x100000 )
+ ROM_REGION32_LE( 0x2400000, "main_data", 0 )
+ ROM_LOAD32_WORD( "mpr-19236.10", 0x000000, 0x400000, CRC(3c26e978) SHA1(2503cc3f2d6cfbbf351d3c3fd622dd7412e115b1) )
+ ROM_LOAD32_WORD( "mpr-19237.11", 0x000002, 0x400000, CRC(961328b1) SHA1(719b5378bfa4a28071838f2d69079589bc1f0dab) )
+ ROM_LOAD32_WORD( "11-7_ic8_d400.8", 0x800000, 0x080000, CRC(37f300bd) SHA1(eb43583917cbf4501e9d21ea721577b36764cc6f) )
+ ROM_LOAD32_WORD( "11-7_ic9_6e4a.9", 0x800002, 0x080000, CRC(454e4a09) SHA1(177715de3dffbaed0eaff2d5e859460a650bea42) )
+ ROM_COPY( "main_data", 0x800000, 0x900000, 0x100000 )
+ ROM_COPY( "main_data", 0x800000, 0xa00000, 0x200000 )
+ ROM_COPY( "main_data", 0x800000, 0xc00000, 0x400000 )
ROM_REGION32_LE( 0x800000, "copro_data", ROMREGION_ERASE00 ) // Copro extra data (collision/height map/etc)
@@ -3509,14 +3501,14 @@ ROM_START( airwlkrs )
ROM_LOAD32_WORD( "mpr-19235.16", 0x000000, 0x200000, CRC(eaad8f92) SHA1(a44094c8d4b91b84e20fad1cf1df77f0bb79837d) )
ROM_LOAD32_WORD( "mpr-19232.20", 0x000002, 0x200000, CRC(fd153001) SHA1(f36dea1013106c9bfc6c4b2c0e7155de80445197) )
- ROM_REGION( 0x1000000, "textures", ROMREGION_ERASEFF ) // Textures
+ ROM_REGION( 0x1000000, "textures", ROMREGION_ERASEFF )
ROM_LOAD32_WORD( "mpr-19234.25", 0x000000, 0x200000, CRC(d7d69493) SHA1(9502d5f7e1ba6c372b7797c1fadd5d9bffd6a553) )
ROM_LOAD32_WORD( "mpr-19233.24", 0x000002, 0x200000, CRC(7a2e51f1) SHA1(be9c9c9bf9c7c7e3262f6eaf4a7c2eeb62cf0962) )
- ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program
+ ROM_REGION( 0x080000, "audiocpu", 0 )
ROM_LOAD16_WORD_SWAP( "10-18_ic30_30f2.30", 0x000000, 0x080000, CRC(de335a79) SHA1(136b13a317d001e58c9b83e63a3372453a1ad27e) )
- ROM_REGION16_BE( 0x800000, "samples", 0 ) // Samples
+ ROM_REGION16_BE( 0x800000, "samples", 0 )
ROM_LOAD16_WORD_SWAP( "mpr-19243.31", 0x000000, 0x200000, CRC(10f530c0) SHA1(c33c513f921c59323bc91ab1bde83bbd8aafc092) )
ROM_LOAD16_WORD_SWAP( "mpr-19242.32", 0x200000, 0x200000, CRC(c0772a28) SHA1(85982cb03566067428be96947dc3cf96c4b29c2c) )
ROM_LOAD16_WORD_SWAP( "mpr-19241.36", 0x400000, 0x200000, CRC(226fa430) SHA1(766e81bed7a224f32eb1d03660da77fd2b2cda8f) )
@@ -7086,7 +7078,7 @@ GAME( 1997, zeroguna, zerogun, zeroguna, zerogun, model2a_state, init_zer
GAME( 1997, zerogunaj, zerogun, zeroguna, zerogun, model2a_state, init_zerogun, ROT0, "Psikyo", "Zero Gunner (Japan, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, motoraid, 0, manxtt, motoraid, model2a_state, empty_init, ROT0, "Sega", "Motor Raid - Twin", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1997, motoraiddx,motoraid, manxtt, motoraid, model2a_state, empty_init, ROT0, "Sega", "Motor Raid - Twin/DX", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1997, airwlkrs, 0, model2a, vf2, model2a_state, empty_init, ROT0, "Data East", "Air Walkers", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // missing 3D
+GAME( 1997, airwlkrs, 0, model2a, vf2, model2a_state, empty_init, ROT0, "Data East", "Air Walkers", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1998, dynamcop, 0, model2a_5881, dynamcop, model2a_state, empty_init, ROT0, "Sega", "Dynamite Cop (Export, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, dyndeka2, dynamcop, model2a_5881, dynamcop, model2a_state, empty_init, ROT0, "Sega", "Dynamite Deka 2 (Japan, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, pltkidsa, pltkids, model2a_5881, pltkids, model2a_state, init_pltkids, ROT0, "Psikyo", "Pilot Kids (Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/mpc3000.cpp b/src/mame/drivers/mpc3000.cpp
index 7209f45f14a..fddecf2138b 100644
--- a/src/mame/drivers/mpc3000.cpp
+++ b/src/mame/drivers/mpc3000.cpp
@@ -15,7 +15,7 @@
SCSI: MB89352
LCD: LC7981
Quad-UART: TE7774
- Panel controller CPU: NEC uPD7810 @ 12 MHz
+ Panel controller CPU: NEC uPD78C10AGQ @ 12 MHz
Sound DSP: L7A1045-L6048
DSP's wavedata bus is 16 bits wide and has 24 address bits
@@ -215,7 +215,7 @@ void mpc3000_state::mpc3000(machine_config &config)
hiledlatch.q_out_cb<6>().set_output("led14").invert(); // 16 Levels
hiledlatch.q_out_cb<7>().set_output("led15").invert(); // After
- UPD7810(config, m_subcpu, 12_MHz_XTAL);
+ UPD78C10(config, m_subcpu, 12_MHz_XTAL);
m_subcpu->set_addrmap(AS_PROGRAM, &mpc3000_state::mpc3000_sub_map);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
diff --git a/src/mame/drivers/mpu4dealem.cpp b/src/mame/drivers/mpu4dealem.cpp
index 3f43cad3629..e526651e9a1 100644
--- a/src/mame/drivers/mpu4dealem.cpp
+++ b/src/mame/drivers/mpu4dealem.cpp
@@ -9,8 +9,6 @@ the Deal 'Em board design, rather than the one they ultimately used, suggesting
// - Deal 'Em lockouts vary on certain cabinets (normally connected to AUX2, but not there?)
-// - Deal 'Em has bad tiles (apostrophe, logo, bottom corner), black should actually be transparent
-// to give black on green. (Possibly colour 0 being used in place of colour 10?)
#include "emu.h"
@@ -21,6 +19,7 @@ the Deal 'Em board design, rather than the one they ultimately used, suggesting
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
+#include "tilemap.h"
class mpu4dealem_state : public mpu4_state
@@ -35,17 +34,42 @@ public:
void dealem(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
optional_shared_ptr<uint8_t> m_dealem_videoram;
DECLARE_MACHINE_RESET(dealem_vid);
void dealem_palette(palette_device &palette) const;
uint32_t screen_update_dealem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE_LINE_MEMBER(dealem_vsync_changed);
required_device<gfxdecode_device> m_gfxdecode;
void dealem_memmap(address_map &map);
+ TILE_GET_INFO_MEMBER(tile_info);
+ tilemap_t *m_tilemap;
};
+void mpu4dealem_state::video_start()
+{
+ m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(mpu4dealem_state::tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 40, 32);
+}
+
+
+TILE_GET_INFO_MEMBER(mpu4dealem_state::tile_info)
+{
+ // 7654---- background color
+ // ----3--- unused
+ // -----210 tile bits 10-8
+
+ uint8_t data = m_dealem_videoram[0x1000 + tile_index];
+ uint8_t attr = m_dealem_videoram[0x0000 + tile_index];
+
+ uint16_t tile = ((attr & 0x07) << 8) | data;
+ uint8_t color = (attr >> 4) & 0x0f;
+
+ tileinfo.set(0, tile, color, 0);
+}
+
static const gfx_layout dealemcharlayout =
{
@@ -98,54 +122,53 @@ void mpu4dealem_state::dealem_palette(palette_device &palette) const
2, resistances_b, weights_b, 1000, 0);
uint8_t const *color_prom = memregion("proms")->base();
- unsigned const len = memregion("proms")->bytes();
- for (int i = 0; i < len; i++)
+
+ for (int i = 0; i < 16; i++)
{
int bit0, bit1, bit2;
- /* red component */
- bit0 = BIT(*color_prom, 0);
- bit1 = BIT(*color_prom, 1);
- bit2 = BIT(*color_prom, 2);
+ // red component
+ bit0 = BIT(color_prom[i], 0);
+ bit1 = BIT(color_prom[i], 1);
+ bit2 = BIT(color_prom[i], 2);
int const r = combine_weights(weights_r, bit0, bit1, bit2);
- /* green component */
- bit0 = BIT(*color_prom, 3);
- bit1 = BIT(*color_prom, 4);
- bit2 = BIT(*color_prom, 5);
+
+ // green component
+ bit0 = BIT(color_prom[i], 3);
+ bit1 = BIT(color_prom[i], 4);
+ bit2 = BIT(color_prom[i], 5);
int const g = combine_weights(weights_g, bit0, bit1, bit2);
- /* blue component */
- bit0 = BIT(*color_prom, 6);
- bit1 = BIT(*color_prom, 7);
+
+ // blue component
+ bit0 = BIT(color_prom[i], 6);
+ bit1 = BIT(color_prom[i], 7);
int const b = combine_weights(weights_b, bit0, bit1);
- palette.set_pen_color(i, rgb_t(r, g, b));
- color_prom++;
+ palette.set_indirect_color(i, rgb_t(r, g, b));
}
-}
-
-uint32_t mpu4dealem_state::screen_update_dealem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- int count = 0;
- for (int y = 0; y < 32; y++)
+ for (int i = 0; i < 256; i++)
{
- for (int x = 0; x < 40; x++)
- {
- int const tile = m_dealem_videoram[count + 0x1000] | (m_dealem_videoram[count] << 8);
- count++;
- m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8);
- }
+ if ((i % 16) == 0)
+ // the background color is set to each of the 16 colors
+ palette.set_pen_indirect(i, i / 16);
+ else
+ // the rest of the palette is just a copy
+ palette.set_pen_indirect(i, i % 16);
}
- return 0;
}
-WRITE_LINE_MEMBER(mpu4dealem_state::dealem_vsync_changed)
+uint32_t mpu4dealem_state::screen_update_dealem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- m_maincpu->set_input_line(INPUT_LINE_NMI, state);
+ m_tilemap->mark_all_dirty();
+ m_tilemap->draw(screen, bitmap, cliprect, 0, 0);
+
+ return 0;
}
+
/*************************************
*
* Machine driver
@@ -216,20 +239,18 @@ void mpu4dealem_state::dealem(machine_config &config)
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_size((54+1)*8, (32+1)*8); /* Taken from 6845 init, registers 00 & 04. Normally programmed with (value-1) */
- screen.set_visarea(0*8, 40*8-1, 0*8, 31*8-1); /* Taken from 6845 init, registers 01 & 06 */
- screen.set_refresh_hz(56); /* Measured accurately from the flip-flop, but 6845 handles this */
+ screen.set_raw(MPU4_MASTER_CLOCK, 440, 0, 320, 279, 0, 248); // 6.88 MHz
screen.set_screen_update(FUNC(mpu4dealem_state::screen_update_dealem));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_dealem);
- PALETTE(config, m_palette, FUNC(mpu4dealem_state::dealem_palette), 32);
+ PALETTE(config, m_palette, FUNC(mpu4dealem_state::dealem_palette), 256, 16);
- hd6845s_device &crtc(HD6845S(config, "crtc", MPU4_MASTER_CLOCK / 4 / 8)); /* HD68B45 */
+ hd6845s_device &crtc(HD6845S(config, "crtc", MPU4_MASTER_CLOCK / 8)); // 0.86 MHz
crtc.set_screen("screen");
crtc.set_show_border_area(false);
crtc.set_char_width(8);
- crtc.out_vsync_callback().set(FUNC(mpu4dealem_state::dealem_vsync_changed));
+ crtc.out_vsync_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
}
@@ -371,7 +392,7 @@ ROM_START( v4dealem )
ROM_LOAD( "zenndlem.u24", 0x0000, 0x10000, CRC(3a1950c4) SHA1(7138346d4e8b3cffbd9751b4d7ebd367b9ad8da9) ) /* text layer */
ROM_REGION( 0x020, "proms", 0 )
- ROM_LOAD( "zenndlem.u22", 0x000, 0x020, CRC(29988304) SHA1(42f61b8f9e1ee96b65db3b70833eb2f6e7a6ae0a) )
+ ROM_LOAD( "zenndlem.u22", 0x000, 0x020, CRC(29988304) SHA1(42f61b8f9e1ee96b65db3b70833eb2f6e7a6ae0a) ) // data duplicated twice
ROM_REGION( 0x200, "plds", 0 )
ROM_LOAD( "zenndlem.u10", 0x000, 0x104, CRC(e3103c05) SHA1(91b7be75c5fb37025039ab54b484e46a033969b5) )
@@ -382,4 +403,4 @@ and reel assembly with this kit and a supplied monitor. This explains why the ca
The original Deal 'Em ran on Summit Coin hardware, and was made by someone else.
Two further different releases were made, running on the Barcrest MPU4 Video, rather than this one. These are Deal 'Em Again and Deal 'Em 2000*/
-GAME( 1987, v4dealem, 0, dealem, dealem, mpu4dealem_state, empty_init, ROT0, "Zenitone","Deal 'Em (MPU4 Conversion Kit, v7.0)",MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1987, v4dealem, 0, dealem, dealem, mpu4dealem_state, empty_init, ROT0, "Zenitone","Deal 'Em (MPU4 Conversion Kit, v7.0)", 0 )
diff --git a/src/mame/drivers/ms0515.cpp b/src/mame/drivers/ms0515.cpp
index 2c000f6994b..86e77dcba66 100644
--- a/src/mame/drivers/ms0515.cpp
+++ b/src/mame/drivers/ms0515.cpp
@@ -88,7 +88,7 @@ private:
uint32_t screen_update_ms0515(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
- DECLARE_WRITE16_MEMBER(ms0515_bank_w);
+ void ms0515_bank_w(uint16_t data);
DECLARE_READ16_MEMBER(ms0515_halt_r);
DECLARE_WRITE16_MEMBER(ms0515_halt_w);
@@ -189,11 +189,11 @@ void ms0515_state::ms0515_mem(address_map &map)
* 13 parallel port ... signal
* 14-15 unused
*/
-WRITE16_MEMBER(ms0515_state::ms0515_bank_w)
+void ms0515_state::ms0515_bank_w(uint16_t data)
{
uint8_t *ram = m_ram->pointer();
- LOGBANK("Bank <- %04x & %04x (vblank %d timer %d)\n", data, mem_mask, BIT(data, 8), BIT(data, 9));
+ LOGBANK("Bank <- %04x (vblank %d timer %d)\n", data, BIT(data, 8), BIT(data, 9));
if (BIT(data ^ m_bankreg, 8)) irq2_w(BIT(data, 8) ? ASSERT_LINE : CLEAR_LINE);
@@ -355,7 +355,7 @@ WRITE_LINE_MEMBER(ms0515_state::pit8253_out2_changed)
void ms0515_state::machine_reset()
{
uint8_t *ram = m_ram->pointer();
- ms0515_bank_w(machine().dummy_space(), 0, 0);
+ ms0515_bank_w(0);
m_video_ram = ram + 0000000 + 0340000;
m_blink = 0;
diff --git a/src/mame/drivers/mw8080bw.cpp b/src/mame/drivers/mw8080bw.cpp
index baf26541597..583eb5b9f77 100644
--- a/src/mame/drivers/mw8080bw.cpp
+++ b/src/mame/drivers/mw8080bw.cpp
@@ -3090,8 +3090,8 @@ ROM_END
/* 596 */ GAMEL( 1976, seawolf, 0, seawolf, seawolf, seawolf_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "Sea Wolf (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_seawolf )
/* 596 */ GAMEL( 1976, seawolfo, seawolf, seawolf, seawolf, seawolf_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "Sea Wolf (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_seawolf )
-/* 597 */ GAMEL( 1975, gunfight, 0, gunfight, gunfight, gunfight_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "Gun Fight (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_gunfight )
-/* 597 */ GAMEL( 1975, gunfighto, gunfight, gunfight, gunfight, gunfight_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "Gun Fight (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_gunfight )
+/* 597 */ GAMEL( 1975, gunfight, 0, gunfight, gunfight, gunfight_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "Gun Fight (set 1)", MACHINE_SUPPORTS_SAVE, layout_gunfight )
+/* 597 */ GAMEL( 1975, gunfighto, gunfight, gunfight, gunfight, gunfight_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "Gun Fight (set 2)", MACHINE_SUPPORTS_SAVE, layout_gunfight )
/* 604 Gun Fight (cocktail, dump does not exist) */
/* 605 */ GAME( 1976, tornbase, 0, tornbase, tornbase, mw8080bw_state, empty_init, ROT0, "Dave Nutting Associates / Midway / Taito", "Tornado Baseball / Ball Park", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
/* 610 */ GAMEL( 1976, 280zzzap, 0, zzzap, zzzap, mw8080bw_state, empty_init, ROT0, "Dave Nutting Associates / Midway", "280-ZZZAP", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE, layout_280zzzap )
diff --git a/src/mame/drivers/mz2500.cpp b/src/mame/drivers/mz2500.cpp
index e04a521dd53..967b4cfc2bf 100644
--- a/src/mame/drivers/mz2500.cpp
+++ b/src/mame/drivers/mz2500.cpp
@@ -1183,14 +1183,14 @@ READ8_MEMBER(mz2500_state::rp5c15_8_r)
{
uint8_t rtc_index = (m_maincpu->state_int(Z80_B));
- return m_rtc->read(space, rtc_index);
+ return m_rtc->read(rtc_index);
}
WRITE8_MEMBER(mz2500_state::rp5c15_8_w)
{
uint8_t rtc_index = (m_maincpu->state_int(Z80_B));
- m_rtc->write(space, rtc_index, data);
+ m_rtc->write(rtc_index, data);
}
diff --git a/src/mame/drivers/namcos10.cpp b/src/mame/drivers/namcos10.cpp
index 84eb4069976..b54e80cb327 100644
--- a/src/mame/drivers/namcos10.cpp
+++ b/src/mame/drivers/namcos10.cpp
@@ -37,6 +37,7 @@ Mr Driller 2 (DR21 Ver.A) (C) Namco, 2000
Mr Driller 2 (DR22 Ver.A) (C) Namco, 2000
Mr Driller G (DRG1 Ver.A) (C) Namco, 2001
NFL Classic Football (NCF3 Ver.A) (C) Namco, 2003
+Pacman Ball (PMB2 Ver.A) (C) Namco, 2003
Panicuru Panekuru (PPA1 Ver.A) (C) Namco, 2001
*Photo Battle (C) Namco, 2001
Point Blank 3 (GNN2 Ver. A) (C) Namco, 2000
@@ -277,6 +278,7 @@ Kono Tako 10021 Ver.A KC034A 8E, 8
Kotoba no Puzzle Mojipittan KPM1 Ver.A KC012A 8E, 8D, 7E N/A
Mr Driller G DRG1 Ver.A KC007A 8E, 8D, 7E N/A
NFL Classic Football NCF3 Ver.A KC027A 8E, 8D, 7E, 7D N/A
+Pacman Ball PMB2 Ver.A KC026A 8E, 8D N/A
Panicuru Panekuru PPA1 Ver.A KC017A 8E, 8D, 7E N/A
Point Blank 3 GNN2 Ver.A KC002A 8E, 8D N/A see note 3
Sekai Kaseki Hakken SKH1 Ver.A KC035A 8E, 8D N/A also has a Namco S10 MGEX10 (8681960201) PCB, unverified title
@@ -1304,6 +1306,15 @@ ROM_START( gegemdb )
ROM_LOAD( "nvram.bin", 0x0000, 0x8000, CRC(c0c87c71) SHA1(263f7f3df772644bcf973413d3fac9ae305fda6c) )
ROM_END
+ROM_START( pacmball )
+ ROM_REGION32_LE( 0x400000, "maincpu:rom", 0 ) /* bios */
+ ROM_FILL( 0x0000000, 0x400000, 0x55 )
+
+ ROM_REGION16_LE( 0x2100000, "user2", 0 ) /* main prg */
+ ROM_LOAD( "k9f2808u0c.8e", 0x0000000, 0x1080000, CRC(7b6f814d) SHA1(728167866d9350150b5fd9ebcf8fe7280efedb91) )
+ ROM_LOAD( "k9f2808u0c.8d", 0x1080000, 0x1080000, CRC(f79d7199) SHA1(4ef9b758ee778e12f7fef717e063597299fb8219) )
+ROM_END
+
GAME( 2000, mrdrilr2, 0, ns10_mrdrilr2, namcos10, namcos10_state, init_mrdrilr2, ROT0, "Namco", "Mr. Driller 2 (Japan, DR21 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // PORT_4WAY joysticks
GAME( 2000, mrdrlr2a, mrdrilr2, ns10_mrdrilr2, namcos10, namcos10_state, init_mrdrilr2, ROT0, "Namco", "Mr. Driller 2 (World, DR22 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // PORT_4WAY joysticks
GAME( 2000, ptblank3, 0, namcos10_memn, namcos10, namcos10_state, init_gunbalna, ROT0, "Namco", "Point Blank 3 (World, GNN2 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
@@ -1320,6 +1331,7 @@ GAME( 2002, panikuru, 0, namcos10_memn, namcos10, namcos10_state, init_p
GAME( 2002, gamshara, 0, ns10_gamshara, namcos10, namcos10_state, init_gamshara, ROT0, "Mitchell", "Gamshara (World, 10021 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Ver. 20020912A ETC
GAME( 2002, gamsharaj, gamshara, ns10_gamshara, namcos10, namcos10_state, init_gamshara, ROT0, "Mitchell", "Gamshara (Japan, 10021 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
GAME( 2003, nflclsfb, 0, ns10_nflclsfb, namcos10, namcos10_state, init_nflclsfb, ROT0, "Namco", "NFL Classic Football (US, NCF3 Ver.A.)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+GAME( 2003, pacmball, 0, namcos10_memn, namcos10, namcos10_state, empty_init, ROT0, "Namco", "Pacman BALL (PMB2 Ver.A.)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
GAME( 2003, konotako, 0, ns10_konotako, namcos10, namcos10_state, init_konotako, ROT0, "Mitchell", "Kono Tako (10021 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
GAME( 2004, sekaikh, 0, namcos10_memn, namcos10, namcos10_state, empty_init, ROT0, "Namco", "Sekai Kaseki Hakken (Japan, SKH1 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
GAME( 2004, taiko6, 0, namcos10_memn, namcos10, namcos10_state, empty_init, ROT0, "Namco", "Taiko no Tatsujin 6 (Japan, TK61 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index 81cc18e0057..c4527b50f8b 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -38,7 +38,7 @@
* - there's a sprite limit per scanline, eg. timecris submarine explosion smoke partially erases sprites on real hardware
* - cybrcycc speed dial needle is missing
* - global offset is wrong in non-super22 servicemode video test, and above that, it flickers in acedrvrw, victlapw
- * - dirtdash polys are broken at the start section of the mountain level, maybe bad rom?
+ * - dirtdash polys are broken at the start section of the mountain level, maybe bad rom? - need to verify the pointrom dumps
* - ridgerac fogging isn't applied to the upper/side part of the sky (best seen when driving down a hill), it's fine in ridgera2
* czram contents is rather odd here and partly cleared (probably the cause?):
* $0000-$0d7f - gradual increase from $00-$7c
@@ -5455,15 +5455,15 @@ ROM_START( dirtdash )
ROM_LOAD( "dt1ccrh.1d", 0x200000, 0x080000, CRC(af257064) SHA1(0da561d9f8824618c00209ccef6146e9f3ad72bb) )
ROM_REGION( 0x480000, "pointrom", 0 ) /* 3d model data */
- ROM_LOAD( "dt1ptrl0.18k", 0x000000, 0x080000, CRC(4e0cac3a) SHA1(c2778e9e93be2de729c6f118caf62ac9f48efbb0) )
- ROM_LOAD( "dt1ptrl1.16k", 0x080000, 0x080000, CRC(59ba9dba) SHA1(a2e9488cf0ff255284c06a1ef653ae86c0d98adc) )
- ROM_LOAD( "dt1ptrl2.15k", 0x100000, 0x080000, CRC(cfe80c67) SHA1(ba3bc48aa39712e63c915070a76974fbd560dee6) )
- ROM_LOAD( "dt1ptrm0.18j", 0x180000, 0x080000, CRC(41f34337) SHA1(7e624e7b6fdefe156168b1c9cc5e919db3b2fbaa) )
- ROM_LOAD( "dt1ptrm1.16j", 0x200000, 0x080000, CRC(d68541fc) SHA1(6b00079bd8f2db26e71968de289cea93458aebe9) )
- ROM_LOAD( "dt1ptrm2.15j", 0x280000, 0x080000, CRC(71e6714d) SHA1(6aad6db3be5020213d7add61c7d927ae9c4fea4e) )
- ROM_LOAD( "dt1ptru0.18f", 0x300000, 0x080000, CRC(4909bd7d) SHA1(0e4ef3987c43ef0438331b82b50dcc97363a45d0) )
- ROM_LOAD( "dt1ptru1.16f", 0x380000, 0x080000, CRC(4a5097df) SHA1(a9c814b0ed4bd92accd0e57be8e3d887114b06a5) )
- ROM_LOAD( "dt1ptru2.15f", 0x400000, 0x080000, CRC(1171eaf5) SHA1(168365ea619386f218585c49025cdd7fd1224082) )
+ ROM_LOAD( "dt1ptrl0.18k", 0x000000, 0x080000, BAD_DUMP CRC(4e0cac3a) SHA1(c2778e9e93be2de729c6f118caf62ac9f48efbb0) )
+ ROM_LOAD( "dt1ptrl1.16k", 0x080000, 0x080000, BAD_DUMP CRC(59ba9dba) SHA1(a2e9488cf0ff255284c06a1ef653ae86c0d98adc) )
+ ROM_LOAD( "dt1ptrl2.15k", 0x100000, 0x080000, BAD_DUMP CRC(cfe80c67) SHA1(ba3bc48aa39712e63c915070a76974fbd560dee6) )
+ ROM_LOAD( "dt1ptrm0.18j", 0x180000, 0x080000, BAD_DUMP CRC(41f34337) SHA1(7e624e7b6fdefe156168b1c9cc5e919db3b2fbaa) )
+ ROM_LOAD( "dt1ptrm1.16j", 0x200000, 0x080000, BAD_DUMP CRC(d68541fc) SHA1(6b00079bd8f2db26e71968de289cea93458aebe9) )
+ ROM_LOAD( "dt1ptrm2.15j", 0x280000, 0x080000, BAD_DUMP CRC(71e6714d) SHA1(6aad6db3be5020213d7add61c7d927ae9c4fea4e) )
+ ROM_LOAD( "dt1ptru0.18f", 0x300000, 0x080000, BAD_DUMP CRC(4909bd7d) SHA1(0e4ef3987c43ef0438331b82b50dcc97363a45d0) )
+ ROM_LOAD( "dt1ptru1.16f", 0x380000, 0x080000, BAD_DUMP CRC(4a5097df) SHA1(a9c814b0ed4bd92accd0e57be8e3d887114b06a5) )
+ ROM_LOAD( "dt1ptru2.15f", 0x400000, 0x080000, BAD_DUMP CRC(1171eaf5) SHA1(168365ea619386f218585c49025cdd7fd1224082) )
ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */
ROM_LOAD( "dt1wavea.2l", 0x000000, 0x400000, CRC(cbd52e40) SHA1(dc995dd919548c96a90efb0375e5b5f1055e05cb) )
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 637ce33983f..b5b5a26b461 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -9499,7 +9499,7 @@ ROM_START( ngdup23a )
NAOMI_DEFAULT_EEPROM
DISK_REGION( "gdrom" )
- DISK_IMAGE_READONLY( "gds-0023a", 0, SHA1(cfd49a1f56e4ddd198f2237a87d412d48c1251e1) )
+ DISK_IMAGE_READONLY( "gds-0023a", 0, SHA1(3a306c90ff2ecb9858578a96429097295cc3e284) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) // uses the vf4 pic
//PIC16C622A (317-0314-COM)
diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp
index d3eb65fd42b..4c5ed87ee3d 100644
--- a/src/mame/drivers/nascom1.cpp
+++ b/src/mame/drivers/nascom1.cpp
@@ -205,12 +205,12 @@ WRITE8_MEMBER( nascom_state::nascom1_port_00_w )
READ8_MEMBER( nascom_state::nascom1_port_01_r )
{
- return m_hd6402->get_received_data();
+ return m_hd6402->receive();
}
WRITE8_MEMBER( nascom_state::nascom1_port_01_w )
{
- m_hd6402->set_transmit_data(data);
+ m_hd6402->transmit(data);
}
READ8_MEMBER( nascom_state::nascom1_port_02_r )
diff --git a/src/mame/drivers/nes_clone.cpp b/src/mame/drivers/nes_clone.cpp
index 4a03b5b95d9..ae21b8647e1 100644
--- a/src/mame/drivers/nes_clone.cpp
+++ b/src/mame/drivers/nes_clone.cpp
@@ -18,10 +18,14 @@ public:
nes_clone_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
+ m_screen(*this, "screen"),
+ m_io0(*this, "IO0"),
+ m_io1(*this, "IO1"),
m_ppu(*this, "ppu")
{ }
void nes_clone(machine_config &config);
+ void nes_clone_pal(machine_config &config);
void init_nes_clone();
@@ -30,15 +34,47 @@ protected:
virtual void machine_reset() override;
virtual void video_start() override;
- WRITE8_MEMBER(sprite_dma_w);
+ DECLARE_WRITE8_MEMBER(sprite_dma_w);
+
+ virtual DECLARE_READ8_MEMBER(in0_r);
+ virtual DECLARE_READ8_MEMBER(in1_r);
+ virtual DECLARE_WRITE8_MEMBER(in0_w);
+
+ void nes_clone_basemap(address_map &map);
+
+ uint8_t* m_mainrom;
+ int m_mainromsize;
-private:
required_device<n2a03_device> m_maincpu;
+ required_device<screen_device> m_screen;
+ optional_ioport m_io0;
+ optional_ioport m_io1;
+ uint8_t m_latch0;
+ uint8_t m_latch1;
+
+private:
required_device<ppu2c0x_device> m_ppu;
void nes_clone_map(address_map &map);
};
+class nes_clone_dnce2000_state : public nes_clone_state
+{
+public:
+ nes_clone_dnce2000_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_clone_state(mconfig, type, tag)
+ { }
+ void nes_clone_dnce2000(machine_config& config);
+
+private:
+ void nes_clone_dnce2000_map(address_map& map);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ DECLARE_READ8_MEMBER(rom_r);
+ DECLARE_WRITE8_MEMBER(bank_w);
+ int m_rombase;
+};
+
WRITE8_MEMBER(nes_clone_state::sprite_dma_w)
{
@@ -46,15 +82,89 @@ WRITE8_MEMBER(nes_clone_state::sprite_dma_w)
m_ppu->spriteram_dma(space, source);
}
-void nes_clone_state::nes_clone_map(address_map &map)
+// Standard NES style inputs (not using bus device as there are no real NES controller ports etc. these are all-in-one units and can be custom
+READ8_MEMBER(nes_clone_state::in0_r)
+{
+ //logerror("%s: in0_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch0 & 1;
+ m_latch0 >>= 1;
+ return ret;
+}
+
+READ8_MEMBER(nes_clone_state::in1_r)
+{
+ //logerror("%s: in1_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch1 & 1;
+ m_latch1 >>= 1;
+ return ret;
+}
+
+WRITE8_MEMBER(nes_clone_state::in0_w)
+{
+ //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
+ if (data & 0x01)
+ return;
+
+ m_latch0 = m_io0->read();
+ m_latch1 = m_io1->read();
+}
+
+
+void nes_clone_state::nes_clone_basemap(address_map& map)
{
map(0x0000, 0x07ff).ram();
map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write));
+
+ map(0x4016, 0x4016).rw(FUNC(nes_clone_state::in0_r), FUNC(nes_clone_state::in0_w));
+ map(0x4017, 0x4017).r(FUNC(nes_clone_state::in1_r));
+
map(0x4014, 0x4014).w(FUNC(nes_clone_state::sprite_dma_w));
+}
+
+void nes_clone_state::nes_clone_map(address_map& map)
+{
+ nes_clone_basemap(map);
map(0x8000, 0xffff).rom();
}
static INPUT_PORTS_START( nes_clone )
+ PORT_START("IO0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("A")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
+
+ PORT_START("IO1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("A")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
+INPUT_PORTS_END
+
+
+static INPUT_PORTS_START( dnce2000 )
+ PORT_START("IO0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Down-Left")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("Down-Right")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1) PORT_NAME("Up-Left / Select")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) PORT_NAME("Up-Right / Start")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_16WAY // NOT A JOYSTICK!!
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_16WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_16WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_16WAY
+
+ PORT_START("IO1")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
void nes_clone_state::video_start()
@@ -63,11 +173,20 @@ void nes_clone_state::video_start()
void nes_clone_state::machine_reset()
{
+ m_latch0 = 0;
+ m_latch1 = 0;
}
void nes_clone_state::machine_start()
{
+ m_mainrom = memregion("maincpu")->base();
+ m_mainromsize = memregion("maincpu")->bytes();
+
+ save_item(NAME(m_latch0));
+ save_item(NAME(m_latch1));
+}
+
// m_nt_ram = std::make_unique<uint8_t[]>(0x1000);
// m_nt_page[0] = m_nt_ram.get();
// m_nt_page[1] = m_nt_ram.get() + 0x400;
@@ -77,7 +196,6 @@ void nes_clone_state::machine_start()
// m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(*this, FUNC(nes_clone_state::nes_clone_nt_r)), write8_delegate(*this, FUNC(nes_clone_state::nes_clone_nt_w)));
// m_ppu->space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, "bank1");
// membank("bank1")->set_base(memregion("gfx1")->base());
-}
void nes_clone_state::nes_clone(machine_config &config)
{
@@ -86,11 +204,12 @@ void nes_clone_state::nes_clone(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_state::nes_clone_map);
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_size(32*8, 262);
- screen.set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
- screen.set_screen_update("ppu", FUNC(ppu2c0x_device::screen_update));
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60.0988);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((113.66/(NTSC_APU_CLOCK.dvalue()/1000000)) * (ppu2c0x_device::VBLANK_LAST_SCANLINE_NTSC-ppu2c0x_device::VBLANK_FIRST_SCANLINE+1+2)));
+ m_screen->set_size(32*8, 262);
+ m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
+ m_screen->set_screen_update(m_ppu, FUNC(ppu2c0x_device::screen_update));
PPU_2C02(config, m_ppu);
m_ppu->set_cpu_tag("maincpu");
@@ -101,6 +220,66 @@ void nes_clone_state::nes_clone(machine_config &config)
m_maincpu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
+void nes_clone_state::nes_clone_pal(machine_config &config)
+{
+ /* basic machine hardware */
+ N2A03(config, m_maincpu, PALC_APU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_state::nes_clone_map);
+
+ /* video hardware */
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50.0070);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((113.66 / (PALC_APU_CLOCK.dvalue() / 1000000)) * (ppu2c0x_device::VBLANK_LAST_SCANLINE_PAL - ppu2c0x_device::VBLANK_FIRST_SCANLINE_PALC + 1 + 2)));
+ m_screen->set_size(32 * 8, 312);
+ m_screen->set_visarea(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
+ m_screen->set_screen_update(m_ppu, FUNC(ppu2c0x_device::screen_update));
+
+ PPU_PALC(config, m_ppu);
+ m_ppu->set_cpu_tag("maincpu");
+ m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+ m_maincpu->add_route(ALL_OUTPUTS, "mono", 0.50);
+}
+
+void nes_clone_dnce2000_state::nes_clone_dnce2000(machine_config& config)
+{
+ nes_clone_pal(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_dnce2000_state::nes_clone_dnce2000_map);
+}
+
+
+
+void nes_clone_dnce2000_state::nes_clone_dnce2000_map(address_map& map)
+{
+ nes_clone_basemap(map);
+ map(0x8000, 0xffff).rw(FUNC(nes_clone_dnce2000_state::rom_r), FUNC(nes_clone_dnce2000_state::bank_w));
+}
+
+
+void nes_clone_dnce2000_state::machine_reset()
+{
+ nes_clone_state::machine_reset();
+ m_rombase = 0;
+}
+
+void nes_clone_dnce2000_state::machine_start()
+{
+ nes_clone_state::machine_start();
+ save_item(NAME(m_rombase));
+}
+
+READ8_MEMBER(nes_clone_dnce2000_state::rom_r)
+{
+ return m_mainrom[(offset + (m_rombase * 0x8000)) & (m_mainromsize - 1)];
+}
+
+WRITE8_MEMBER(nes_clone_dnce2000_state::bank_w)
+{
+ m_rombase = data;
+}
+
ROM_START( pjoypj001 )
ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "powerjoy_pj001_lh28f008sc_89a6.bin", 0x00000, 0x100000, CRC(e655e0aa) SHA1(c96d3422e26451c366fee2151fedccb95014cbc7) )
@@ -114,6 +293,11 @@ ROM_START( afbm7800 )
ROM_LOAD( "atariflashbackmini7800.bin", 0x00000, 0x100000, CRC(da4d9483) SHA1(c04465ff5bd5ca7abf088fe771b8e71c157afb89) )
ROM_END
+ROM_START( dnce2000 ) // use Mapper 241 if you want to run this in a NES emulator
+ ROM_REGION( 0x40000, "maincpu", 0 )
+ ROM_LOAD( "dance.bin", 0x00000, 0x40000, CRC(0982bb50) SHA1(bd608159d7e624ea345f2a188de51cb1aa116421) )
+ROM_END
+
void nes_clone_state::init_nes_clone()
{
@@ -123,3 +307,5 @@ CONS( 200?, pjoypj001, 0, 0, nes_clone, nes_clone, nes_clone_state, init_nes_clo
// "Flashback Mini 7800 uses normal NES-style hardware, together with a mapper chipset similar to the Waixing kk33xx cartridges (NES 2.0 Mapper 534)"
CONS( 2004, afbm7800, 0, 0, nes_clone, nes_clone, nes_clone_state, init_nes_clone, "Atari", "Atari Flashback Mini 7800", MACHINE_NOT_WORKING )
+
+CONS( 200?, dnce2000, 0, 0, nes_clone_dnce2000, dnce2000, nes_clone_dnce2000_state, init_nes_clone, "Shenzhen Soyin Electric Appliance Ind. Co., Ltd.", "Dance 2000 / Hot 2000 (Jin Bao TV Dancing Carpet, SY-2000-04)", 0 )
diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp
index d5aa746e8ff..9e91743fa18 100644
--- a/src/mame/drivers/nes_vt.cpp
+++ b/src/mame/drivers/nes_vt.cpp
@@ -2,56 +2,9 @@
// copyright-holders:David Haywood
/***************************************************************************
- nes_vt.c
+ nes_vt.cpp
- The 'VT' series are SoC solutions that implement enhanced NES hardware
- there are several generations of these chips each adding additional
- functionality.
-
- This list is incomplete
-
- VT01 - plain famiclone?
- VT02 - banking scheme to access 32MB, Dual APU with PCM support
- VT03 - above + 4bpp sprite / bg modes, enhanced palette
-
- VT08 - ?
-
- VT09 - alt 4bpp modes?
-
- VT16 - ?
- VT18 - ?
-
- VT33 (?) - used in FC Pocket, dgun2573
- Adds scrambled opcodes (XORed with 0xA1) and RGB444 palette mode,
- and more advanced PCM modes (CPU and video working, sound NYI)
-
- VT368 (?) - used in DGUN2561, lxcmcy
- Various enhancements not yet emulated. Different banking, possibly an ALU,
- larger palette space
-
- VT36x (?) - used in SY889
- Uses SQI rather than parallel flash
- Vaguely OneBus compatible but some registers different ($411C in particular)
- Uses RGB format for palettes
- Credit to NewRisingSun2 for much of the reverse engineering
- same chipset used in Mogis M320, but uses more advanced feature set.
-
- (more)
-
-
-
- todo (VT03):
-
- APU refactoring to allow for mostly doubled up functionality + PCM channel
- *more*
-
- todo (newer VTxx):
-
- new PCM audio in FC Pocket and DGUN-2573
- add support for VT368 (?) in DGUN-2561 and lxcmcy
- add support for the VT369 (?) featurs used by the MOGIS M320
-
- todo (general)
+ TODO
Add more Famiclone roms here, there should be plenty more dumps of VTxx
based systems floating about.
@@ -67,61 +20,23 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/m6502/n2a03.h"
-#include "machine/bankdev.h"
-#include "video/ppu2c0x_vt.h"
-#include "machine/m6502_vtscr.h"
-#include "machine/m6502_swap_op_d5_d6.h"
-#include "screen.h"
-#include "speaker.h"
+#include "machine/nes_vt_soc.h"
-class nes_vt_state : public driver_device
+class nes_vt_base_state : public driver_device
{
public:
- nes_vt_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_base_state(const machine_config& mconfig, device_type type, const char* tag) :
driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
m_io0(*this, "IO0"),
m_io1(*this, "IO1"),
- m_screen(*this, "screen"),
- m_ppu(*this, "ppu"),
- m_apu(*this, "apu"),
m_cartsel(*this, "CARTSEL"),
m_exin0(*this, "EXTRAIN0"),
m_exin1(*this, "EXTRAIN1"),
m_exin2(*this, "EXTRAIN2"),
m_exin3(*this, "EXTRAIN3"),
- m_prg(*this, "prg"),
- m_initial_e000_bank(0xff),
- m_ntram(nullptr),
- m_chrram(nullptr),
- m_prgbank0(*this, "prg_bank0"),
- m_prgbank1(*this, "prg_bank1"),
- m_prgbank2(*this, "prg_bank2"),
- m_prgbank3(*this, "prg_bank3"),
m_prgrom(*this, "mainrom")
{ }
- void nes_vt_base(machine_config& config);
- void nes_vt_base_pal(machine_config& config);
-
- void nes_vt(machine_config& config);
-
- void nes_vt_4k_ram(machine_config& config);
- void nes_vt_4k_ram_pal(machine_config& config);
-
- /* OneBus read callbacks for getting sprite and tile data during rendering */
- DECLARE_READ8_MEMBER(spr_r);
- DECLARE_READ8_MEMBER(chr_r);
-
- /* Misc PPU */
- DECLARE_WRITE8_MEMBER(vt_dma_w);
- DECLARE_WRITE8_MEMBER(vt_fixed_dma_w);
-
- // TODO: give these better register names so it's clearer what is remapped
- void set_8000_scramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5, uint8_t reg6, uint8_t reg7);
- void set_410x_scramble(uint8_t reg0, uint8_t reg1);
-
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -130,46 +45,19 @@ protected:
virtual DECLARE_READ8_MEMBER(in1_r);
virtual DECLARE_WRITE8_MEMBER(in0_w);
- uint32_t screen_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect);
-
void nes_vt_map(address_map& map);
- required_device<cpu_device> m_maincpu;
+
optional_ioport m_io0;
optional_ioport m_io1;
uint8_t m_latch0;
uint8_t m_latch1;
- required_device<screen_device> m_screen;
- required_device<ppu_vt03_device> m_ppu;
- required_device<nesapu_device> m_apu;
-
- /* APU handling */
- DECLARE_READ8_MEMBER(psg1_4014_r);
- DECLARE_READ8_MEMBER(psg1_4015_r);
- DECLARE_WRITE8_MEMBER(psg1_4015_w);
- DECLARE_WRITE8_MEMBER(psg1_4017_w);
-
- /* VT03 extension handling */
- DECLARE_WRITE8_MEMBER(vt03_410x_w);
- DECLARE_READ8_MEMBER(vt03_410x_r);
-
/* Misc */
- uint32_t m_ahigh;
- void update_banks();
+ uint32_t m_ahigh; // external banking bits
uint8_t m_4242;
uint8_t m_411c;
uint8_t m_411d;
- uint8_t m_413x[8]; // CY only?
-
- uint8_t m_8000_scramble[8];
- uint8_t m_410x_scramble[2];
-
- void scrambled_410x_w(uint16_t offset, uint8_t data);
- void scrambled_8000_w(address_space& space, uint16_t offset, uint8_t data);
-
- DECLARE_WRITE8_MEMBER(vt03_8000_w);
- DECLARE_WRITE8_MEMBER(vt03_4034_w);
optional_ioport m_cartsel;
optional_ioport m_exin0;
@@ -177,69 +65,68 @@ protected:
optional_ioport m_exin2;
optional_ioport m_exin3;
- required_device<address_map_bank_device> m_prg;
+ required_region_ptr<uint8_t> m_prgrom;
- void nes_vt_4k_ram_map(address_map& map);
+ DECLARE_READ8_MEMBER(vt_rom_r);
+ DECLARE_WRITE8_MEMBER(vtspace_w);
+
+ void configure_soc(nes_vt_soc_device* soc);
- /* Misc */
- DECLARE_READ8_MEMBER(rs232flags_region_r);
+ DECLARE_READ8_MEMBER(upper_412c_r);
+ DECLARE_READ8_MEMBER(upper_412d_r);
+ DECLARE_WRITE8_MEMBER(upper_412c_w);
- uint8_t m_initial_e000_bank;
private:
/* APU handling */
- DECLARE_WRITE_LINE_MEMBER(apu_irq);
- DECLARE_READ8_MEMBER(apu_read_mem);
/* Extra IO */
- DECLARE_WRITE8_MEMBER(extra_io_control_w);
- virtual DECLARE_READ8_MEMBER(extrain_01_r);
- virtual DECLARE_READ8_MEMBER(extrain_23_r);
- virtual DECLARE_WRITE8_MEMBER(extraout_01_w);
- virtual DECLARE_WRITE8_MEMBER(extraout_23_w);
+ DECLARE_READ8_MEMBER(extrain_0_r);
+ DECLARE_READ8_MEMBER(extrain_1_r);
+ DECLARE_READ8_MEMBER(extrain_2_r);
+ DECLARE_READ8_MEMBER(extrain_3_r);
+};
- DECLARE_WRITE8_MEMBER(chr_w);
-
- void prg_map(address_map& map);
-
- /* expansion nametable - todo, see if we can refactor NES code to be reusable without having to add full NES bus etc. */
- std::unique_ptr<uint8_t[]> m_ntram;
- std::unique_ptr<uint8_t[]> m_chrram;
-
- DECLARE_READ8_MEMBER(nt_r);
- DECLARE_WRITE8_MEMBER(nt_w);
-
- void scanline_irq(int scanline, int vblank, int blanked);
- void hblank_irq(int scanline, int vblank, int blanked);
- void video_irq(bool hblank, int scanline, int vblank, int blanked);
-
- uint8_t m_410x[0xc];
+class nes_vt_state : public nes_vt_base_state
+{
+public:
+ nes_vt_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_base_state(mconfig, type, tag),
+ m_soc(*this, "soc")
+ { }
- uint8_t m_vdma_ctrl;
+ void nes_vt_pal_2mb(machine_config& config);
+ void nes_vt_pal_4mb(machine_config& config);
+ void nes_vt_pal_8mb(machine_config& config);
- int m_timer_irq_enabled;
- int m_timer_running;
- int m_timer_val;
+ void nes_vt_512kb(machine_config& config);
+ void nes_vt_1mb(machine_config& config);
+ void nes_vt_2mb(machine_config& config);
+ void nes_vt_4mb(machine_config& config);
+ void nes_vt_8mb(machine_config& config);
+ void nes_vt_16mb(machine_config& config);
+ void nes_vt_32mb(machine_config& config);
- uint8_t m_8000_addr_latch;
+ void nes_vt_4k_ram(machine_config& config);
+ void nes_vt_4k_ram_16mb(machine_config& config);
- /* banking etc. */
- int m_romsize;
- int m_numbanks;
- uint32_t get_banks(uint8_t bnk);
+ void nes_vt_4k_ram_pal(machine_config& config);
- int calculate_real_video_address(int addr, int extended, int readtype);
+ void vt_external_space_map_32mbyte(address_map& map);
+ void vt_external_space_map_16mbyte(address_map& map);
+ void vt_external_space_map_8mbyte(address_map& map);
+ void vt_external_space_map_4mbyte(address_map& map);
+ void vt_external_space_map_2mbyte(address_map& map);
+ void vt_external_space_map_1mbyte(address_map& map);
+ void vt_external_space_map_512kbyte(address_map& map);
- required_memory_bank m_prgbank0;
- required_memory_bank m_prgbank1;
- required_memory_bank m_prgbank2;
- required_memory_bank m_prgbank3;
- required_region_ptr<uint8_t> m_prgrom;
+protected:
+ required_device<nes_vt_soc_device> m_soc;
- uint16_t decode_nt_addr(uint16_t addr);
- void do_dma(uint8_t data, bool has_ntsc_bug);
+ DECLARE_WRITE8_MEMBER(vt03_8000_mapper_w) { m_soc->vt03_8000_mapper_w(space, offset, data); }
};
+
class nes_vt_swap_op_d5_d6_state : public nes_vt_state
{
public:
@@ -248,11 +135,13 @@ public:
{ }
void nes_vt_vh2009(machine_config& config);
- void nes_vt_senwld(machine_config& config);
+ void nes_vt_vh2009_4mb(machine_config& config);
+ void nes_vt_vh2009_8mb(machine_config& config);
-protected:
+ void nes_vt_senwld_512kb(machine_config& config);
-private:
+protected:
+ void vt_external_space_map_senwld_512kbyte(address_map& map);
};
class nes_vt_pjoy_state : public nes_vt_state
@@ -262,8 +151,7 @@ public:
nes_vt_state(mconfig, type, tag)
{ }
-protected:
- virtual void machine_reset() override;
+ void nes_vt_pjoy_4mb(machine_config& config);
};
class nes_vt_waixing_state : public nes_vt_state
@@ -273,8 +161,8 @@ public:
nes_vt_state(mconfig, type, tag)
{ }
-protected:
- virtual void machine_reset() override;
+ void nes_vt_waixing_512kb(machine_config& config);
+ void nes_vt_waixing_2mb(machine_config& config);
};
class nes_vt_waixing_alt_state : public nes_vt_waixing_state
@@ -284,8 +172,7 @@ public:
nes_vt_waixing_state(mconfig, type, tag)
{ }
-protected:
- virtual void machine_reset() override;
+ void nes_vt_waixing_alt_pal_8mb(machine_config& config);
};
@@ -295,8 +182,6 @@ public:
nes_vt_timetp36_state(const machine_config& mconfig, device_type type, const char* tag) :
nes_vt_state(mconfig, type, tag)
{ }
-
-protected:
};
class nes_vt_hum_state : public nes_vt_state
@@ -305,9 +190,9 @@ public:
nes_vt_hum_state(const machine_config& mconfig, device_type type, const char* tag) :
nes_vt_state(mconfig, type, tag)
{ }
-
-protected:
- virtual void machine_reset() override;
+
+ void nes_vt_hummer_2mb(machine_config& config);
+ void nes_vt_hummer_4mb(machine_config& config);
};
class nes_vt_sp69_state : public nes_vt_state
@@ -317,24 +202,21 @@ public:
nes_vt_state(mconfig, type, tag)
{ }
-protected:
- virtual void machine_reset() override;
+ void nes_vt_4mb_sp69(machine_config& config);
};
-class nes_vt_ablping_state : public nes_vt_sp69_state
+class nes_vt_ablping_state : public nes_vt_state
{
public:
nes_vt_ablping_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt_sp69_state(mconfig, type, tag)
+ nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_ablping(machine_config& config);
+ void nes_vt_2mb_ablping(machine_config& config);
private:
- void nes_vt_ablping_map(address_map& map);
-
- DECLARE_READ8_MEMBER(ablping_410f_r);
- DECLARE_WRITE8_MEMBER(ablping_410f_w);
+ DECLARE_READ8_MEMBER(ablping_extraio_r);
+ DECLARE_WRITE8_MEMBER(ablping_extraio_w);
};
class nes_vt_cy_state : public nes_vt_state
@@ -345,24 +227,22 @@ public:
{ }
void nes_vt_cy(machine_config& config);
+
+ void nes_vt_cy_bigger(machine_config& config);
+
+
void nes_vt_bt(machine_config& config);
+ void nes_vt_bt_2x16mb(machine_config& config);
+
+ void vt_external_space_map_bitboy_2x16mbyte(address_map& map);
private:
void nes_vt_cy_map(address_map& map);
void nes_vt_bt_map(address_map& map);
- DECLARE_WRITE8_MEMBER(vt03_41bx_w);
- DECLARE_READ8_MEMBER(vt03_41bx_r);
- DECLARE_WRITE8_MEMBER(vt03_411c_w);
- DECLARE_WRITE8_MEMBER(vt03_412c_w);
-
- DECLARE_WRITE8_MEMBER(vt03_48ax_w);
- DECLARE_READ8_MEMBER(vt03_48ax_r);
+ DECLARE_WRITE8_MEMBER(bittboy_412c_w);
- DECLARE_WRITE8_MEMBER(vt03_413x_w);
- DECLARE_READ8_MEMBER(vt03_413x_r);
- DECLARE_READ8_MEMBER(vt03_414f_r);
- DECLARE_READ8_MEMBER(vt03_415c_r);
+ DECLARE_READ8_MEMBER(vt_rom_banked_r);
};
class nes_vt_cy_lexibook_state : public nes_vt_cy_state
@@ -395,20 +275,41 @@ public:
{ }
void nes_vt_dg(machine_config& config);
+ void nes_vt_dg_baddma_16mb(machine_config& config);
+ void nes_vt_dg_1mb(machine_config& config);
+
void nes_vt_fa(machine_config& config);
+ void nes_vt_fa_4x16mb(machine_config& config);
protected:
- DECLARE_WRITE8_MEMBER(vtfp_4242_w);
private:
+ READ8_MEMBER(vt_rom_banked_r);
+ void vt_external_space_map_fapocket_4x16mbyte(address_map& map);
+
void nes_vt_dg_map(address_map& map);
+ void nes_vt_dg_baddma_map(address_map& map);
void nes_vt_fa_map(address_map& map);
- DECLARE_READ8_MEMBER(vtfa_412c_r);
- DECLARE_WRITE8_MEMBER(vtfa_412c_w);
- DECLARE_WRITE8_MEMBER(vt03_411c_w);
+ DECLARE_READ8_MEMBER(fapocket_412c_r);
+ DECLARE_WRITE8_MEMBER(fapocket_412c_w);
+
};
+class nes_vt_dg_fapocket_state : public nes_vt_dg_state
+{
+public:
+ nes_vt_dg_fapocket_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_dg_state(mconfig, type, tag)
+ { }
+
+protected:
+ virtual void machine_reset() override;
+};
+
+
+
+
class nes_vt_hh_state : public nes_vt_dg_state
{
public:
@@ -417,24 +318,33 @@ public:
{ }
void nes_vt_hh(machine_config& config);
+ void nes_vt_hh_4mb(machine_config& config);
+ void nes_vt_hh_8mb(machine_config& config);
+
void nes_vt_vg(machine_config& config);
- void nes_vt_vg_baddma(machine_config& config);
+ void nes_vt_vg_4mb(machine_config& config);
+ void nes_vt_vg_8mb(machine_config& config);
+ void nes_vt_vg_16mb(machine_config& config);
+
+
+ void nes_vt_vg_1mb_majkon(machine_config& config);
void nes_vt_fp(machine_config& config);
+ void nes_vt_fp_16mb(machine_config& config);
+ void nes_vt_fp_32mb(machine_config& config);
+ void nes_vt_fp_bigger(machine_config& config);
+ void nes_vt_fp_4x16mb(machine_config& config);
+
void nes_vt_fp_pal(machine_config& config);
+ void nes_vt_fp_pal_32mb(machine_config& config);
private:
- void nes_vt_hh_map(address_map& map);
- void nes_vt_hh_baddma_map(address_map& map);
- void nes_vt_fp_map(address_map& map);
+ DECLARE_READ8_MEMBER(vt_rom_banked_r);
+ void vt_external_space_map_fp_2x32mbyte(address_map& map);
- DECLARE_WRITE8_MEMBER(vtfp_411e_w);
- DECLARE_WRITE8_MEMBER(vtfp_4a00_w);
- DECLARE_WRITE8_MEMBER(vtfp_412c_w);
- DECLARE_READ8_MEMBER(vtfp_412d_r);
- DECLARE_READ8_MEMBER(vtfp_4119_r);
+ void nes_vt_fp_map(address_map& map);
- DECLARE_READ8_MEMBER(vthh_414a_r);
- DECLARE_WRITE8_MEMBER(vtfp_411d_w);
+ DECLARE_READ8_MEMBER(fcpocket_412d_r);
+ DECLARE_WRITE8_MEMBER(fcpocket_412c_w);
};
class nes_vt_ablpinb_state : public nes_vt_state
@@ -472,11 +382,7 @@ public:
void init_sudoku();
- void nes_vt_sudoku(machine_config& config);
-
-protected:
- //virtual void machine_start() override;
- //virtual void machine_reset() override;
+ void nes_vt_sudoku_512kb(machine_config& config);
private:
virtual DECLARE_READ8_MEMBER(in0_r) override;
@@ -484,1159 +390,251 @@ private:
virtual DECLARE_WRITE8_MEMBER(in0_w) override;
};
-class nes_vt_majgnc_state : public nes_vt_state
+class nes_vt_vg_1mb_majgnc_state : public nes_vt_state
{
public:
- nes_vt_majgnc_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_vg_1mb_majgnc_state(const machine_config& mconfig, device_type type, const char* tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_majgnc(machine_config& config);
-
-protected:
-
-private:
+ void nes_vt_vg_1mb_majgnc(machine_config& config);
};
-/* Standard I/O handlers (NES Controller clone) */
-
-READ8_MEMBER(nes_vt_state::in0_r)
+READ8_MEMBER(nes_vt_base_state::vt_rom_r)
{
- //logerror("%s: in0_r\n", machine().describe_context());
- uint8_t ret = 0x40;
- ret |= m_latch0 & 1;
- m_latch0 >>= 1;
- return ret;
+ return m_prgrom[offset];
}
-READ8_MEMBER(nes_vt_state::in1_r)
+WRITE8_MEMBER(nes_vt_base_state::vtspace_w)
{
- //logerror("%s: in1_r\n", machine().describe_context());
- uint8_t ret = 0x40;
- ret |= m_latch1 & 1;
- m_latch1 >>= 1;
- return ret;
+ logerror("%s: vtspace_w %08x : %02x", machine().describe_context(), offset, data);
}
-WRITE8_MEMBER(nes_vt_state::in0_w)
+// VTxx can address 25-bit address space (32MB of ROM) so use maps with mirroring in depending on ROM size
+void nes_vt_state::vt_external_space_map_32mbyte(address_map &map)
{
- //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
- if (data & 0x01)
- return;
-
- m_latch0 = m_io0->read();
- m_latch1 = m_io1->read();
-}
-
-/* Lexibook I/O handlers */
-
-READ8_MEMBER(nes_vt_cy_lexibook_state::in0_r)
-{
- //logerror("%s: in0_r\n", machine().describe_context());
- uint8_t ret = m_latch0_bit;
- return ret;
-}
-
-READ8_MEMBER(nes_vt_cy_lexibook_state::in1_r)
-{
- //logerror("%s: in1_r\n", machine().describe_context());
- uint8_t ret = m_latch1_bit;
- return ret;
-}
-
-WRITE8_MEMBER(nes_vt_cy_lexibook_state::in0_w)
-{
- //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
- if ((!(data & 0x01)) && (m_previous_port0 & 0x01)) // 0x03 -> 0x02 transition
- {
- m_latch0 = m_io0->read();
- m_latch1 = m_io1->read();
- }
-
- if ((!(data & 0x02)) && (m_previous_port0 & 0x02)) // 0x02 -> 0x00 transition
- {
- m_latch0_bit = m_latch0 & 0x01;
- m_latch0 >>= 1;
- m_latch1_bit = m_latch1 & 0x01;
- m_latch1 >>= 1;
- }
-
- m_previous_port0 = data;
+ map(0x0000000, 0x1ffffff).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-
-uint32_t nes_vt_state::get_banks(uint8_t bnk)
+void nes_vt_state::vt_external_space_map_16mbyte(address_map &map)
{
- switch (m_410x[0xb] & 0x07)
- {
- case 0: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xC0) | (bnk & 0x3F)); // makes bank 0xff at 0xe000 map to 0x07e000 by default for vectors at 0x007fffx
- case 1: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xE0) | (bnk & 0x1F));
- case 2: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xF0) | (bnk & 0x0F));
- case 3: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xF8) | (bnk & 0x07));
- case 4: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xFC) | (bnk & 0x03));
- case 5: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xFE) | (bnk & 0x01));
- case 6: return ((m_410x[0x0] & 0xF0) << 4) + (m_410x[0xa]);
- case 7: return ((m_410x[0x0] & 0xF0) << 4) + bnk;
- }
-
- return 0;
+ map(0x0000000, 0x0ffffff).mirror(0x1000000).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-// 8000 needs to bank in 60000 ( bank 0x30 )
-void nes_vt_state::update_banks()
+void nes_vt_state::vt_external_space_map_8mbyte(address_map &map)
{
- uint32_t amod = m_ahigh >> 13;
-
- uint8_t bank;
-
- // 8000-9fff
- if ((m_410x[0xb] & 0x40) != 0 || (m_410x[0x5] & 0x40) == 0)
- {
- if ((m_410x[0x5] & 0x40) == 0)
- bank = m_410x[0x7];
- else
- bank = m_410x[0x9];
- }
- else
- bank = 0xfe;
-
- m_prgbank0->set_entry((amod | get_banks(bank)) & (m_numbanks - 1));
-
- // a000-bfff
- bank = m_410x[0x8];
- m_prgbank1->set_entry((amod | get_banks(bank)) & (m_numbanks - 1));
-
- // c000-dfff
- if ((m_410x[0xb] & 0x40) != 0 || (m_410x[0x5] & 0x40) != 0)
- {
- if ((m_410x[0x5] & 0x40) == 0)
- bank = m_410x[0x9];
- else
- bank = m_410x[0x7];
- }
- else
- bank = 0xfe;
-
- m_prgbank2->set_entry((amod | get_banks(bank)) & (m_numbanks - 1));
-
- // e000 - ffff
- bank = m_initial_e000_bank;
- m_prgbank3->set_entry((amod | get_banks(bank)) & (m_numbanks - 1));
+ map(0x0000000, 0x07fffff).mirror(0x1800000).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-uint16_t nes_vt_state::decode_nt_addr(uint16_t addr)
+void nes_vt_state::vt_external_space_map_4mbyte(address_map &map)
{
- bool vert_mirror = !(m_410x[0x6] & 0x01);
- int a11 = (addr >> 11) & 0x01;
- int a10 = (addr >> 10) & 0x01;
- uint16_t base = (addr & 0x3FF);
- return ((vert_mirror ? a10 : a11) << 10) | base;
+ map(0x0000000, 0x03fffff).mirror(0x1c00000).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-WRITE8_MEMBER(nes_vt_state::vt03_410x_w)
+void nes_vt_state::vt_external_space_map_2mbyte(address_map &map)
{
- scrambled_410x_w(offset, data);
+ map(0x0000000, 0x01fffff).mirror(0x1e00000).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-READ8_MEMBER(nes_vt_state::vt03_410x_r)
+void nes_vt_state::vt_external_space_map_1mbyte(address_map &map)
{
- return m_410x[offset];
+ map(0x0000000, 0x00fffff).mirror(0x1f00000).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-// ablping polls this (also writes here) what is it? 4-bit DAC? PCM? (inputs only start responding once it finishes writing data on startup but takes longer than a sample should)
-// (this is the extended IO port on VT)
-READ8_MEMBER(nes_vt_ablping_state::ablping_410f_r)
+void nes_vt_state::vt_external_space_map_512kbyte(address_map &map)
{
- // needs to change at least
- return machine().rand();//0x00;
-};
-
-WRITE8_MEMBER(nes_vt_ablping_state::ablping_410f_w)
-{
- popmessage("ablping_410f_w %02x", data);
-};
-
-// Source: https://wiki.nesdev.com/w/index.php/NES_2.0_submappers/Proposals#NES_2.0_Mapper_256
-
-void nes_vt_state::scrambled_410x_w(uint16_t offset, uint8_t data)
-{
- switch (offset)
- {
- case 0x0:
- m_410x[0x0] = data;
- update_banks();
- break;
-
- case 0x1:
- // latch timer value
- m_410x[0x1] = data;
- m_timer_running = 0;
- break;
-
- case 0x2:
- //logerror("vt03_4102_w %02x\n", data);
- // load latched value and start counting
- m_410x[0x2] = data; // value doesn't matter?
- m_timer_val = m_410x[0x1];
- m_timer_running = 1;
- break;
-
- case 0x3:
- //logerror("vt03_4103_w %02x\n", data);
- m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
- // disable timer irq
- m_410x[0x3] = data; // value doesn't matter?
- m_timer_irq_enabled = 0;
- break;
-
- case 0x4:
- //logerror("vt03_4104_w %02x\n", data);
- // enable timer irq
- m_410x[0x4] = data; // value doesn't matter?
- m_timer_irq_enabled = 1;
- break;
-
- case 0x5:
- logerror("vt03_4105_w %02x\n", data);
- m_410x[0x5] = data;
- update_banks();
- break;
-
- case 0x6:
- m_410x[0x6] = data;
- break;
-
- case 0x7:
- m_410x[m_410x_scramble[0]] = data;
- update_banks();
- break;
-
- case 0x8:
- m_410x[m_410x_scramble[1]] = data;
- update_banks();
- break;
-
- case 0x9:
- logerror("vt03_4109_w %02x\n", data);
- m_410x[0x9] = data;
- update_banks();
- break;
-
- case 0xa:
- logerror("vt03_410aw %02x\n", data);
- m_410x[0xa] = data;
- update_banks();
- break;
-
- case 0xb:
- /*
-
- D7 TSYNEN - Timer clock select 0:AD12, 1:HSYNC
- D6 Prg Bank 0 Reg 2 enable / disable 0:Disable 1:Enable
- D5 RS232 enable / disable 0:Disable 1:Enable
- D4 Bus output control 0: normal 1: tristate
- D3 6000-7fff and 8000-ffff control - 0 will not active XRWB, 1 will activate
- D2-D0 - program bank 0 selector
-
- */
-
- logerror("vt03_410b_w %02x\n", data);
- m_410x[0xb] = data;
- update_banks();
- break;
- }
+ map(0x0000000, 0x007ffff).mirror(0x1f80000).rw(FUNC(nes_vt_state::vt_rom_r), FUNC(nes_vt_state::vt03_8000_mapper_w));
}
-WRITE8_MEMBER(nes_vt_cy_state::vt03_41bx_w)
+// Win Lose Draw has RAM as well as ROM
+void nes_vt_swap_op_d5_d6_state::vt_external_space_map_senwld_512kbyte(address_map &map)
{
- logerror("vt03_41bx_w %02x %02x\n", offset, data);
+ map(0x0000000, 0x007ffff).rw(FUNC(nes_vt_swap_op_d5_d6_state::vt_rom_r), FUNC(nes_vt_swap_op_d5_d6_state::vtspace_w));
+ map(0x0100000, 0x010ffff).ram();
+ map(0x0180000, 0x01fffff).rw(FUNC(nes_vt_swap_op_d5_d6_state::vt_rom_r), FUNC(nes_vt_swap_op_d5_d6_state::vtspace_w));
}
-WRITE8_MEMBER(nes_vt_dg_state::vt03_411c_w)
+// bitboy is 2 16Mbyte banks
+READ8_MEMBER(nes_vt_cy_state::vt_rom_banked_r)
{
- logerror("vt03_411c_w %02x\n", data);
- m_411c = data;
- update_banks();
+ return m_prgrom[m_ahigh | offset];
}
-WRITE8_MEMBER(nes_vt_cy_state::vt03_411c_w)
+void nes_vt_cy_state::vt_external_space_map_bitboy_2x16mbyte(address_map &map)
{
- logerror("vt03_411c_w %02x\n", data);
- m_411c = data;
- update_banks();
+ map(0x0000000, 0x0ffffff).mirror(0x1000000).rw(FUNC(nes_vt_cy_state::vt_rom_banked_r), FUNC(nes_vt_cy_state::vt03_8000_mapper_w));
}
-WRITE8_MEMBER(nes_vt_cy_state::vt03_412c_w)
+// fapocket is 4 16Mbyte banks
+READ8_MEMBER(nes_vt_dg_state::vt_rom_banked_r)
{
- logerror("vt03_412c_w %02x\n", data);
- m_ahigh = (data & 0x04) ? (1 << 24) : 0x0;
- update_banks();
+ return m_prgrom[m_ahigh | offset];
}
-WRITE8_MEMBER(nes_vt_hh_state::vtfp_412c_w)
+void nes_vt_dg_state::vt_external_space_map_fapocket_4x16mbyte(address_map &map)
{
- logerror("vtfp_412c_w %02x\n", data);
- m_ahigh = (data & 0x01) ? (1 << 25) : 0x0;
- update_banks();
+ map(0x0000000, 0x0ffffff).mirror(0x1000000).rw(FUNC(nes_vt_dg_state::vt_rom_banked_r), FUNC(nes_vt_dg_state::vt03_8000_mapper_w));
}
-WRITE8_MEMBER(nes_vt_dg_state::vtfp_4242_w)
+READ8_MEMBER(nes_vt_hh_state::vt_rom_banked_r)
{
- logerror("vtfp_4242_w %02x\n", data);
- m_4242 = data;
+ return m_prgrom[m_ahigh | offset];
}
-WRITE8_MEMBER(nes_vt_hh_state::vtfp_411d_w)
+void nes_vt_hh_state::vt_external_space_map_fp_2x32mbyte(address_map &map)
{
- logerror("vtfp_411d_w %02x\n", data);
- m_411d = data;
- update_banks();
+ map(0x0000000, 0x1ffffff).rw(FUNC(nes_vt_hh_state::vt_rom_banked_r), FUNC(nes_vt_hh_state::vt03_8000_mapper_w));
}
-WRITE8_MEMBER(nes_vt_dg_state::vtfa_412c_w)
+READ8_MEMBER(nes_vt_base_state::extrain_0_r)
{
- logerror("vtfa_412c_w %02x\n", data);
- m_ahigh = 0;
- m_ahigh |= (data & 0x01) ? (1 << 25) : 0x0;
- m_ahigh |= (data & 0x02) ? (1 << 24) : 0x0;
-
- //m_ahigh |= (m_cartsel->read() == 0x01) ? (1 << 25) : 0x0;
- update_banks();
-}
-
-READ8_MEMBER(nes_vt_dg_state::vtfa_412c_r)
-{
- if (m_cartsel)
- return m_cartsel->read();
- else
- return 0;
-}
-
-READ8_MEMBER(nes_vt_hh_state::vtfp_412d_r)
-{
- if (m_cartsel)
- return m_cartsel->read();
- else
- return 0;
-}
-
-READ8_MEMBER(nes_vt_cy_state::vt03_41bx_r)
-{
- switch (offset)
- {
- case 0x07:
- return 0x04;
- default:
- return 0x00;
- }
-}
-
-WRITE8_MEMBER(nes_vt_cy_state::vt03_48ax_w)
-{
- logerror("vt03_48ax_w %02x %02x\n", offset, data);
-}
-
-READ8_MEMBER(nes_vt_cy_state::vt03_48ax_r)
-{
- switch (offset)
- {
- case 0x04:
- return 0x01;
- case 0x05:
- return 0x01;
- default:
- return 0x00;
- }
-}
-
-WRITE8_MEMBER(nes_vt_cy_state::vt03_413x_w)
-{
- logerror("vt03_413x_w %02x %02x\n", offset, data);
- // VT168 style ALU ??
- m_413x[offset] = data;
- if (offset == 0x5)
- {
- uint32_t res = uint32_t((m_413x[5] << 8) | m_413x[4]) * uint32_t((m_413x[1] << 8) | m_413x[0]);
- m_413x[0] = res & 0xFF;
- m_413x[1] = (res >> 8) & 0xFF;
- m_413x[2] = (res >> 16) & 0xFF;
- m_413x[3] = (res >> 24) & 0xFF;
- m_413x[6] = 0x00;
-
- }
- else if (offset == 0x6)
- {
- /*uint32_t res = uint32_t((m_413x[5] << 8) | m_413x[4]) * uint32_t((m_413x[1] << 8) | m_413x[0]);
- m_413x[0] = res & 0xFF;
- m_413x[1] = (res >> 8) & 0xFF;
- m_413x[2] = (res >> 16) & 0xFF;
- m_413x[3] = (res >> 24) & 0xFF;*/
- m_413x[6] = 0x00;
- }
-}
-
-
-READ8_MEMBER(nes_vt_cy_state::vt03_413x_r)
-{
- logerror("vt03_413x_r %02x\n", offset);
- return m_413x[offset];
-}
-
-READ8_MEMBER(nes_vt_cy_state::vt03_414f_r)
-{
- return 0xff;
-}
-
-READ8_MEMBER(nes_vt_cy_state::vt03_415c_r)
-{
- return 0xff;
-}
-
-READ8_MEMBER(nes_vt_hh_state::vthh_414a_r)
-{
- return 0x80;
-}
-
-
-READ8_MEMBER(nes_vt_state::spr_r)
-{
- if (m_4242 & 0x1 || m_411d & 0x04)
- {
- return m_chrram[offset];
- }
+ if (m_exin0)
+ return m_exin0->read();
else
{
- int realaddr = calculate_real_video_address(offset, 0, 1);
- return m_prgrom[realaddr & (m_romsize - 1)];
+ logerror("%s: extrain_0_r (not hooked up)\n", machine().describe_context());
}
+ return 0x00;
}
-READ8_MEMBER(nes_vt_state::chr_r)
+READ8_MEMBER(nes_vt_base_state::extrain_1_r)
{
- if (m_4242 & 0x1 || m_411d & 0x04)
- {
- return m_chrram[offset];
- }
+ if (m_exin1)
+ return m_exin1->read();
else
{
- int realaddr = calculate_real_video_address(offset, 1, 0);
- return m_prgrom[realaddr & (m_romsize - 1)];
- }
-}
-
-
-WRITE8_MEMBER(nes_vt_state::chr_w)
-{
- if (m_4242 & 0x1 || m_411d & 0x04)
- {
- logerror("vram write %04x %02x\n", offset, data);
- m_chrram[offset] = data;
+ logerror("%s: extrain_1_r (not hooked up)\n", machine().describe_context());
}
- /*int realaddr = calculate_real_video_address(offset, 1, 0);
- return m_prgrom[realaddr & (m_romsize-1)];*/
-}
-
-WRITE8_MEMBER(nes_vt_hh_state::vtfp_411e_w)
-{
- logerror("411e_w %02x\n", data);
- if (data == 0x05)
- dynamic_cast<m6502_vtscr&>(*m_maincpu).set_next_scramble(true);
- else if (data == 0x00)
- dynamic_cast<m6502_vtscr&>(*m_maincpu).set_next_scramble(false);
+ return 0x00;
}
-WRITE8_MEMBER(nes_vt_hh_state::vtfp_4a00_w)
+READ8_MEMBER(nes_vt_base_state::extrain_2_r)
{
- logerror("4a00_w %02x\n", data);
- //if(data == 0x80)
- // dynamic_cast<m6502_vtscr&>(*m_maincpu).set_scramble(false);
-}
-
-
-void nes_vt_state::scanline_irq(int scanline, int vblank, int blanked)
-{
- video_irq(false, scanline, vblank, blanked);
-}
-
-void nes_vt_state::hblank_irq(int scanline, int vblank, int blanked)
-{
- video_irq(true, scanline, vblank, blanked);
-}
-
-void nes_vt_state::video_irq(bool hblank, int scanline, int vblank, int blanked)
-{
- //TSYNEN
- if (((m_410x[0xb] >> 7) & 0x01) == hblank)
- {
- int irqstate = 0;
-
- //logerror("scanline_irq %d\n", scanline);
-
- if (m_timer_running && scanline < 0xe0)
- {
- m_timer_val--;
-
- if (m_timer_val < 0)
- {
- if (m_timer_irq_enabled && !blanked)
- {
- logerror("scanline_irq %d\n", scanline);
- irqstate = 1;
- }
- }
- }
-
- if (irqstate)
- m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
- //else
- // m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
- }
-}
-
-/* todo, handle custom VT nametable stuff here */
-READ8_MEMBER(nes_vt_state::nt_r)
-{
- return m_ntram[decode_nt_addr(offset)];
-}
-
-WRITE8_MEMBER(nes_vt_state::nt_w)
-{
- //logerror("nt wr %04x %02x", offset, data);
- m_ntram[decode_nt_addr(offset)] = data;
-}
-
-void nes_vt_state::machine_start()
-{
- m_romsize = memregion("mainrom")->bytes();
- m_numbanks = m_romsize / 0x2000;
-
- m_prg->set_bank(0);
-
- m_prgbank0->configure_entries(0, m_numbanks, &m_prgrom[0x00000], 0x2000);
- m_prgbank1->configure_entries(0, m_numbanks, &m_prgrom[0x00000], 0x2000);
- m_prgbank2->configure_entries(0, m_numbanks, &m_prgrom[0x00000], 0x2000);
- m_prgbank3->configure_entries(0, m_numbanks, &m_prgrom[0x00000], 0x2000);
-
- save_item(NAME(m_410x));
- save_item(NAME(m_413x));
-
- save_item(NAME(m_411c));
- save_item(NAME(m_411d));
- save_item(NAME(m_4242));
-
- save_item(NAME(m_8000_addr_latch));
-
- save_item(NAME(m_timer_irq_enabled));
- save_item(NAME(m_timer_running));
- save_item(NAME(m_timer_val));
- save_item(NAME(m_vdma_ctrl));
-
- m_ntram = std::make_unique<uint8_t[]>(0x2000);
- save_pointer(NAME(m_ntram), 0x2000);
-
- m_chrram = std::make_unique<uint8_t[]>(0x2000);
- save_pointer(NAME(m_chrram), 0x2000);
-
- m_ppu->set_scanline_callback(*this, FUNC(nes_vt_state::scanline_irq));
- m_ppu->set_hblank_callback(*this, FUNC(nes_vt_state::hblank_irq));
-
- //m_ppu->set_hblank_callback(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::hblank_irq)));
- //m_ppu->space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::chr_r)), write8_delegate(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::chr_w)));
- m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(*this, FUNC(nes_vt_state::nt_r)), write8_delegate(*this, FUNC(nes_vt_state::nt_w)));
- m_ppu->space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(*this, FUNC(nes_vt_state::chr_r)), write8_delegate(*this, FUNC(nes_vt_state::chr_w)));
-}
-
-void nes_vt_state::machine_reset()
-{
- // what are the actual defaults?
- m_410x[0x0] = 0x00;
- m_410x[0x1] = 0x00;
- m_410x[0x2] = 0x00;
- m_410x[0x3] = 0x00;
- m_410x[0x4] = 0x00;
- m_410x[0x5] = 0x00;
- m_410x[0x6] = 0x00;
- m_410x[0x7] = 0x00;
- m_410x[0x8] = 0x01;
- m_410x[0x9] = 0x02;
- m_410x[0xa] = 0x00;
- m_410x[0xb] = 0x00;
- m_411c = 0x00;
- m_411d = 0x00;
- m_4242 = 0x00;
-
- if (m_cartsel)
- m_ahigh = (m_cartsel->read() == 0x01) ? (1 << 25) : 0x0;
- else
- m_ahigh = 0;
-
- m_timer_irq_enabled = 0;
- m_timer_running = 0;
- m_timer_val = 0;
- m_vdma_ctrl = 0;
-
- update_banks();
-
- // 'no scramble' configuration
- m_8000_scramble[0x0] = 0x6;
- m_8000_scramble[0x1] = 0x7;
- m_8000_scramble[0x2] = 0x2;
- m_8000_scramble[0x3] = 0x3;
- m_8000_scramble[0x4] = 0x4;
- m_8000_scramble[0x5] = 0x5;
- m_8000_scramble[0x6] = 0x7;
- m_8000_scramble[0x7] = 0x8;
-
- m_410x_scramble[0x0] = 0x7;
- m_410x_scramble[0x1] = 0x8;
-}
-
-int nes_vt_state::calculate_real_video_address(int addr, int extended, int readtype)
-{
- // might be a VT09 only feature (alt 4bpp mode?)
- int alt_order = m_ppu->get_201x_reg(0x0) & 0x40;
-
- if (readtype == 0)
- {
- if (m_ppu->get_201x_reg(0x0) & 0x10)
- {
- extended = 1;
- }
- else
- {
- extended = 0;
- }
- }
- else if (readtype == 1)
- {
- if (m_ppu->get_201x_reg(0x0) & 0x08)
- {
- extended = 1;
- }
- else
- {
- extended = 0;
- }
- }
-
- /*
- Calculating TVA17 - TVA10
-
- --------------------------------------------------------------------------------------------
- | COMR7 | AD[12:10] | TVA17 | TVA16 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
- | (4105, 0x80) | (2006) | | | | | | | | |
- --------------------------------------------------------------------------------------------
- | 0/1/C/D | RV47 | RV46 | RV45 | RV44 | RV43 | RV42 | RV41 | AD10 | ** RV40 is never used
- | 2/3/E/F | RV57 | RV56 | RV55 | RV54 | RV53 | RV52 | RV51 | AD10 | ** RV50 is never used
- | 4/8 | RV07 | RV06 | RV05 | RV04 | RV03 | RV02 | RV01 | RV00 |
- | 5/9 | RV17 | RV16 | RV15 | RV14 | RV13 | RV12 | RV11 | RV10 |
- | 6/A | RV27 | RV26 | RV25 | RV24 | RV23 | RV22 | RV21 | RV20 |
- | 7/B | RV37 | RV36 | RV35 | RV34 | RV33 | RV32 | RV31 | RV30 |
- --------------------------------------------------------------------------------------------
-
- m_r2012 = rv0x
- m_r2013 = rv1x
- m_r2014 = rv2x
- m_r2015 = rv3x
- m_r2016 = rv4x
- m_r2017 = rv5x
-
- */
- int finaladdr = 0;
-
- int sel = (addr & 0x1c00) | ((m_410x[0x5] & 0x80) ? 0x2000 : 0x000);
-
- int vbank_tva17_tva10 = 0x00;
-
- switch ((sel >> 10) & 0xf)
- {
- case 0x0:
- case 0x1:
- case 0xc:
- case 0xd:
- vbank_tva17_tva10 = (m_ppu->get_201x_reg(0x6) & 0xfe) | ((addr & 0x0400) ? 1 : 0);
- break;
-
- case 0x2:
- case 0x3:
- case 0xe:
- case 0xf:
- vbank_tva17_tva10 = (m_ppu->get_201x_reg(0x7) & 0xfe) | ((addr & 0x0400) ? 1 : 0);
- break;
-
- case 0x4:
- case 0x8:
- vbank_tva17_tva10 = m_ppu->get_201x_reg(0x2);
- break;
-
- case 0x5:
- case 0x9:
- vbank_tva17_tva10 = m_ppu->get_201x_reg(0x3);
- break;
-
- case 0x6:
- case 0xa:
- vbank_tva17_tva10 = m_ppu->get_201x_reg(0x4);
- break;
-
- case 0x7:
- case 0xb:
- vbank_tva17_tva10 = m_ppu->get_201x_reg(0x5);
- break;
-
- }
-
- /*
- Calculating VA17 - VA10 (requires TVA17-TVA10 to have been calculated)
-
- ------------------------------------------------------------------------------
- | VB0S[2:0] | VA[17:10] |
- | 201a & 0x7 | VA17 | VA16 | VA15 | VA14 | VA13 | VA12 | VA11 | VA10 |
- |-----------------------------------------------------------------------------
- | 0x0 | TVA17 | TVA16 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
- | 0x1 | TV67 | TVA16 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
- | 0x2 | RV67 | RV66 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
- | 0x3 | INVALID ***************************************************** |
- | 0x4 | RV67 | RV66 | RV65 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
- | 0x5 | RV67 | RV66 | RV65 | RV64 | TVA13 | TVA12 | TVA11 | TVA10 |
- | 0x6 | RV67 | RV66 | RV65 | RV64 | RV63 | TVA12 | TVA11 | TVA10 |
- | 0x7 | INVALID ***************************************************** |
- ------------------------------------------------------------------------------
-
- RV67- RV63 = 0x201a & 0xf8
-
- */
-
- int va17_va10 = 0;
-
- int swit = m_ppu->get_201x_reg(0xa);
-
- switch (swit & 0x07)
- {
- case 0x0: va17_va10 = vbank_tva17_tva10; break;
- case 0x1: va17_va10 = (vbank_tva17_tva10 & 0x7f) | (m_ppu->get_201x_reg(0xa) & 0x80); break;
- case 0x2: va17_va10 = (vbank_tva17_tva10 & 0x3f) | (m_ppu->get_201x_reg(0xa) & 0xc0); break;
- case 0x3: return -1;
- case 0x4: va17_va10 = (vbank_tva17_tva10 & 0x1f) | (m_ppu->get_201x_reg(0xa) & 0xe0); break;
- case 0x5: va17_va10 = (vbank_tva17_tva10 & 0x0f) | (m_ppu->get_201x_reg(0xa) & 0xf0); break;
- case 0x6: va17_va10 = (vbank_tva17_tva10 & 0x07) | (m_ppu->get_201x_reg(0xa) & 0xf8); break;
- case 0x7: return -1;
- }
-
- int va34 = m_ppu->get_va34();
-
- if (!extended)
- {
- int is4bpp = 0;
- if (readtype == 0) is4bpp = m_ppu->get_201x_reg(0x0) & 0x02;
- else if (readtype == 1) is4bpp = m_ppu->get_201x_reg(0x0) & 0x04;
-
- int va20_va18 = (m_ppu->get_201x_reg(0x8) & 0x70) >> 4;
-
- finaladdr = ((m_410x[0x0] & 0x0F) << 21) | (va20_va18 << 18) | (va17_va10 << 10) | (addr & 0x03ff);
-
- if (is4bpp)
- {
- if (!alt_order)
- {
- finaladdr = ((finaladdr & ~0xf) << 1) | (va34 << 4) | (finaladdr & 0xf);
- }
- else
- {
- finaladdr = (finaladdr << 1) | va34;
- }
- }
- }
+ if (m_exin2)
+ return m_exin2->read();
else
{
- int eva2_eva0 = 0x00;
- int is4bpp = 0;
-
- switch (readtype)
- {
- case 0: // background display
- is4bpp = m_ppu->get_201x_reg(0x0) & 0x02;
-
- eva2_eva0 |= m_ppu->get_m_read_bg4_bg3();
-
- if (m_ppu->get_201x_reg(0x1) & 0x02)
- {
- if (m_410x[0x6] & 0x1) eva2_eva0 |= 0x4;
- }
- else
- {
- if (m_ppu->get_201x_reg(0x8) & 0x08) eva2_eva0 |= 0x4;
- }
- break;
-
- case 1: // sprite display
- is4bpp = m_ppu->get_201x_reg(0x0) & 0x04; // 16 colors or 16-pixel wide (both adjust the read)
-
- eva2_eva0 |= m_ppu->get_speva2_speva0();
-
- break;
-
- case 2: // CPU R/W access
- // todo
- break;
- }
-
- finaladdr = ((m_410x[0x0] & 0x0f) << 21) | (va17_va10 << 13) | (eva2_eva0 << 10) | (addr & 0x03ff);
-
- if (is4bpp)
- {
- if (!alt_order)
- {
- finaladdr = ((finaladdr & ~0xf) << 1) | (va34 << 4) | (finaladdr & 0xf);
- }
- else
- {
- finaladdr = (finaladdr << 1) | va34;
- }
-
- }
+ logerror("%s: extrain_2_r (not hooked up)\n", machine().describe_context());
}
- return m_ahigh | finaladdr;
+ return 0x00;
}
-/*
- nes_vt_state::vt03_8000_w notes
-
- used for MMC3/other mapper compatibility
- some consoles have scrambled registers for crude copy protection
-*/
-
-void nes_vt_state::scrambled_8000_w(address_space& space, uint16_t offset, uint8_t data)
+READ8_MEMBER(nes_vt_base_state::extrain_3_r)
{
- uint16_t addr = offset + 0x8000;
- if ((m_411d & 0x01) && (m_411d & 0x03))
- {
- //CNROM compat
- logerror("vtxx_cnrom_8000_w (%04x) %02x\n", offset + 0x8000, data);
- m_ppu->set_201x_reg(0x6, data * 8);
- m_ppu->set_201x_reg(0x7, data * 8 + 2);
- m_ppu->set_201x_reg(0x2, data * 8 + 4);
- m_ppu->set_201x_reg(0x3, data * 8 + 5);
- m_ppu->set_201x_reg(0x4, data * 8 + 6);
- m_ppu->set_201x_reg(0x5, data * 8 + 7);
-
- }
- else if (m_411d & 0x01)
- {
- //MMC1 compat, TODO
- logerror("vtxx_mmc1_8000_w (%04x) %02x\n", offset + 0x8000, data);
-
- }
- else if (m_411d & 0x02)
- {
- //UNROM compat
- logerror("vtxx_unrom_8000_w (%04x) %02x\n", offset + 0x8000, data);
-
- m_410x[0x7] = ((data & 0x0F) << 1);
- m_410x[0x8] = ((data & 0x0F) << 1) + 1;
- update_banks();
- }
+ if (m_exin3)
+ return m_exin3->read();
else
{
- //logerror("vtxx_mmc3_8000_w (%04x) %02x\n", offset+0x8000, data );
-
- //MMC3 compat
- if ((addr < 0xA000) && !(addr & 0x01))
- {
- logerror("scrambled_8000_w (%04x) %02x (banking)\n", offset + 0x8000, data);
- // Bank select
- m_8000_addr_latch = data & 0x07;
- // Bank config
- m_410x[0x05] = data & ~(1 << 5);
- update_banks();
- }
- else if ((addr < 0xA000) && (addr & 0x01))
- {
- logerror("scrambled_8000_w (%04x) %02x (other scrambled stuff)\n", offset + 0x8000, data);
-
- switch (m_410x[0x05] & 0x07)
- {
- case 0x00:
- m_ppu->set_201x_reg(m_8000_scramble[0], data);
- break;
-
- case 0x01:
- m_ppu->set_201x_reg(m_8000_scramble[1], data);
- break;
-
- case 0x02: // hand?
- m_ppu->set_201x_reg(m_8000_scramble[2], data);
- break;
-
- case 0x03: // dog?
- m_ppu->set_201x_reg(m_8000_scramble[3], data);
- break;
-
- case 0x04: // ball thrown
- m_ppu->set_201x_reg(m_8000_scramble[4], data);
- break;
-
- case 0x05: // ball thrown
- m_ppu->set_201x_reg(m_8000_scramble[5], data);
- break;
- case 0x06:
- m_410x[m_8000_scramble[6]] = data;
- //m_410x[0x9] = data;
- update_banks();
- break;
-
- case 0x07:
- m_410x[m_8000_scramble[7]] = data;
- update_banks();
- break;
- }
- }
- else if ((addr >= 0xA000) && (addr < 0xC000) && !(addr & 0x01))
- {
- // Mirroring
- m_410x[0x6] &= 0xFE;
- m_410x[0x6] |= data & 0x01;
- }
- else if ((addr >= 0xA000) && (addr < 0xC000) && (addr & 0x01))
- {
- // PRG RAM control, ignore
- }
- else if ((addr >= 0xC000) && (addr < 0xE000) && !(addr & 0x01))
- {
- // IRQ latch
- vt03_410x_w(space, 1, data);
- }
- else if ((addr >= 0xC000) && (addr < 0xE000) && (addr & 0x01))
- {
- // IRQ reload
- vt03_410x_w(space, 2, data);
- }
- else if ((addr >= 0xE000) && !(addr & 0x01))
- {
- // IRQ disable
- vt03_410x_w(space, 3, data);
- }
- else if ((addr >= 0xE000) && (addr & 0x01))
- {
- // IRQ enable
- vt03_410x_w(space, 4, data);
- }
- else
- {
-
- }
+ logerror("%s: extrain_3_r (not hooked up)\n", machine().describe_context());
}
+ return 0x00;
}
-// MMC3 compatibility mode
-
-void nes_vt_state::set_8000_scramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5, uint8_t reg6, uint8_t reg7)
-{
- m_8000_scramble[0] = reg0; // TODO: name the regs
- m_8000_scramble[1] = reg1;
- m_8000_scramble[2] = reg2;
- m_8000_scramble[3] = reg3;
- m_8000_scramble[4] = reg4;
- m_8000_scramble[5] = reg5;
- m_8000_scramble[6] = reg6;
- m_8000_scramble[7] = reg7;
-}
-
-void nes_vt_state::set_410x_scramble(uint8_t reg0, uint8_t reg1)
-{
- m_410x_scramble[0] = reg0; // TODO: name the regs
- m_410x_scramble[1] = reg1;
-}
+/* Standard I/O handlers (NES Controller clone) */
-WRITE8_MEMBER(nes_vt_state::vt03_8000_w)
+READ8_MEMBER(nes_vt_base_state::in0_r)
{
- scrambled_8000_w(space, offset, data);
- //logerror("%s: vt03_8000_w (%04x) %02x\n", machine().describe_context(), offset+0x8000, data );
+ //logerror("%s: in0_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch0 & 1;
+ m_latch0 >>= 1;
+ return ret;
}
-/* APU plumbing, this is because we have a plain M6502 core in the VT03, otherwise this is handled in the core */
-
-READ8_MEMBER(nes_vt_state::psg1_4014_r)
+READ8_MEMBER(nes_vt_base_state::in1_r)
{
- //return m_apu->read(0x14);
- return 0x00;
+ //logerror("%s: in1_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch1 & 1;
+ m_latch1 >>= 1;
+ return ret;
}
-READ8_MEMBER(nes_vt_state::psg1_4015_r)
+WRITE8_MEMBER(nes_vt_base_state::in0_w)
{
- return m_apu->read(0x15);
-}
+ //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
+ if (data & 0x01)
+ return;
-WRITE8_MEMBER(nes_vt_state::psg1_4015_w)
-{
- m_apu->write(0x15, data);
+ m_latch0 = m_io0->read();
+ m_latch1 = m_io1->read();
}
-WRITE8_MEMBER(nes_vt_state::psg1_4017_w)
-{
- m_apu->write(0x17, data);
-}
+/* Lexibook I/O handlers */
-// early units (VT03?) have a DMA bug in NTSC mode
-WRITE8_MEMBER(nes_vt_state::vt_dma_w)
+READ8_MEMBER(nes_vt_cy_lexibook_state::in0_r)
{
- do_dma(data, true);
+ //logerror("%s: in0_r\n", machine().describe_context());
+ uint8_t ret = m_latch0_bit;
+ return ret;
}
-// later units (VT09?) don't appear to have the NTSC DMA bug? (or something else is incorrectly compensating for it in our emulation)
-WRITE8_MEMBER(nes_vt_state::vt_fixed_dma_w)
+READ8_MEMBER(nes_vt_cy_lexibook_state::in1_r)
{
- do_dma(data, false);
+ //logerror("%s: in1_r\n", machine().describe_context());
+ uint8_t ret = m_latch1_bit;
+ return ret;
}
-
-void nes_vt_state::do_dma(uint8_t data, bool has_ntsc_bug)
+WRITE8_MEMBER(nes_vt_cy_lexibook_state::in0_w)
{
- // only NTSC systems have 'broken' DMA which requires the DMA addresses to be shifted by 1, PAL systems work as expected
- if (m_ppu->get_is_pal())
- has_ntsc_bug = false;
-
- uint8_t dma_mode = m_vdma_ctrl & 0x01;
- uint8_t dma_len = (m_vdma_ctrl >> 1) & 0x07;
- uint8_t src_nib_74 = (m_vdma_ctrl >> 4) & 0x0F;
-
- int length = 256;
- switch (dma_len)
- {
- case 0x0: length = 256; break;
- case 0x4: length = 16; break;
- case 0x5: length = 32; break;
- case 0x6: length = 64; break;
- case 0x7: length = 128; break;
- }
-
- uint16_t src_addr = (data << 8) | (src_nib_74 << 4);
- logerror("vthh dma start ctrl=%02x addr=%04x\n", m_vdma_ctrl, src_addr);
-
- if (dma_mode == 1)
- {
- logerror("vdma dest %04x\n", m_ppu->get_vram_dest());
- }
-
- if (has_ntsc_bug && (dma_mode == 1) && ((m_ppu->get_vram_dest() & 0xFF00) == 0x3F00) && !(m_ppu->get_201x_reg(0x1) & 0x80))
- {
- length -= 1;
- src_addr += 1;
- }
- else if ((dma_mode == 1) && ((m_ppu->get_vram_dest() & 0xFF00) == 0x3F01) && !(m_ppu->get_201x_reg(0x1) & 0x80))
+ //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
+ if ((!(data & 0x01)) && (m_previous_port0 & 0x01)) // 0x03 -> 0x02 transition
{
- // Legacy mode for DGUN-2573 compat
- m_ppu->set_vram_dest(0x3F00);
- m_ppu->set_palette_mode(PAL_MODE_VT0x);
+ m_latch0 = m_io0->read();
+ m_latch1 = m_io1->read();
}
- for (int i = 0; i < length; i++)
+ if ((!(data & 0x02)) && (m_previous_port0 & 0x02)) // 0x02 -> 0x00 transition
{
- uint8_t spriteData = m_maincpu->space(AS_PROGRAM).read_byte(src_addr + i);
- if (dma_mode)
- {
- m_maincpu->space(AS_PROGRAM).write_byte(0x2007, spriteData);
- }
- else
- {
- m_maincpu->space(AS_PROGRAM).write_byte(0x2004, spriteData);
- }
- //if(((src_addr + i) & 0xFF) == length && (i != 0)) break;
+ m_latch0_bit = m_latch0 & 0x01;
+ m_latch0 >>= 1;
+ m_latch1_bit = m_latch1 & 0x01;
+ m_latch1 >>= 1;
}
- // should last (length * 4 - 1) CPU cycles.
- //((device_t*)m_maincpu)->execute().adjust_icount(-(length * 4 - 1));
+ m_previous_port0 = data;
}
-WRITE8_MEMBER(nes_vt_state::vt03_4034_w)
-{
- logerror("vt03_4034_w %02x\n", data);
- m_vdma_ctrl = data;
-}
-WRITE8_MEMBER(nes_vt_state::extra_io_control_w)
+// ablping polls this (also writes here) what is it? 4-bit DAC? PCM? (inputs only start responding once it finishes writing data on startup but takes longer than a sample should)
+// (this is the extended IO port on VT)
+READ8_MEMBER(nes_vt_ablping_state::ablping_extraio_r)
{
- /*
- 410d Extra I/O control
-
- 0x01 Extra I/O port 0 mode (1 = output, 0 = input)
- 0x02 Extra I/O port 0 enable (1 = enable, 0 = disable)
- 0x04 Extra I/O port 1 mode (1 = output, 0 = input)
- 0x08 Extra I/O port 1 enable (1 = enable, 0 = disable)
- 0x10 Extra I/O port 2 mode (1 = output, 0 = input)
- 0x20 Extra I/O port 2 enable (1 = enable, 0 = disable)
- 0x40 Extra I/O port 3 mode (1 = output, 0 = input)
- 0x80 Extra I/O port 3 enable (1 = enable, 0 = disable)
- */
-
- logerror("%s: extra_io_control_w %02x\n", machine().describe_context(), data);
-}
+ // needs to change at least
+ return machine().rand()&0xf;
+};
-READ8_MEMBER(nes_vt_state::extrain_01_r)
+WRITE8_MEMBER(nes_vt_ablping_state::ablping_extraio_w)
{
- // TODO: check status of 410d port to make sure we only read from enabled ports
- uint8_t in0 = 0x00, in1 = 0x00;
- if (m_exin0)
- in0 = m_exin0->read() & 0x0f;
- if (m_exin1)
- in1 = m_exin1->read() & 0x0f;
+ popmessage("ablping_extraio_w %02x", data);
+};
- return in0 | (in1<<4);
-}
-READ8_MEMBER(nes_vt_state::extrain_23_r)
+void nes_vt_base_state::machine_start()
{
- // TODO: check status of 410d port to make sure we only read from enabled ports
- uint8_t in2 = 0x00, in3 = 0x00;
- if (m_exin2)
- in2 = m_exin2->read() & 0x0f;
- if (m_exin3)
- in3 = m_exin3->read() & 0x0f;
-
- return in2 | (in3<<4);
}
-WRITE8_MEMBER(nes_vt_state::extraout_01_w)
+void nes_vt_base_state::machine_reset()
{
- // TODO: use callbacks for this as output can be hooked up to anything
- logerror("%s: extraout_01_w %02x\n", machine().describe_context(), data);
-}
-WRITE8_MEMBER(nes_vt_state::extraout_23_w)
-{
- // TODO: use callbacks for this as output can be hooked up to anything
- logerror("%s: extraout_23_w %02x\n", machine().describe_context(), data);
}
-READ8_MEMBER(nes_vt_state::rs232flags_region_r)
+void nes_vt_dg_fapocket_state::machine_reset()
{
- /*
- 0x4119 RS232 Flags + Region
-
- 0x01 - RX bit 8
- 0x02 - RERFF (error status)
- 0x04 - unused
- 0x08 - XPORN (PAL = 1 NTSC = 0)
- 0x10 - XF5OR6 (50hz = 1 60hz = 0)
- 0x20 - RINGF (receive status)
- 0x40 - TIFLAG (completed sending data status)
- 0x80 - RIFLAG (completed receiving data status)
- */
- uint8_t ret = 0x00;
-
- // Palette DMA is buggy on NTSC systems (at least for regular VT03)
- // so the palette DMA writes will change based on the reading of these flags
-
- ret |= m_ppu->get_is_pal() ? 0x08 : 0x00;
- ret |= m_ppu->get_is_50hz() ? 0x10 : 0x00;
+ nes_vt_base_state::machine_reset();
- return ret;
+ // fapocket needs this, fcpocket instead reads the switch in software?
+ if (m_cartsel)
+ m_ahigh = (m_cartsel->read() == 0x01) ? (1 << 25) : 0x0;
+ else
+ m_ahigh = 0;
}
void nes_vt_ablpinb_state::machine_start()
{
- nes_vt_state::machine_start();
+ nes_vt_base_state::machine_start();
save_item(NAME(m_plunger_off));
save_item(NAME(m_plunger_state_count));
@@ -1646,7 +644,7 @@ void nes_vt_ablpinb_state::machine_start()
void nes_vt_ablpinb_state::machine_reset()
{
- nes_vt_state::machine_reset();
+ nes_vt_base_state::machine_reset();
m_plunger_off = 0;
m_plunger_state_count = 0;
@@ -1719,353 +717,303 @@ WRITE8_MEMBER(nes_vt_sudoku_state::in0_w)
{
}
-void nes_vt_state::nes_vt_map(address_map &map)
+
+/* not strictly needed, but helps us see where things are in ROM to aid with figuring out banking schemes*/
+static const gfx_layout helper_layout =
{
- map(0x0000, 0x07ff).ram();
- // ddrdismx relies on the mirroring
- map(0x2000, 0x2007).mirror(0x00e0).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); /* standard PPU registers */
- map(0x2010, 0x201f).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::read_extended), FUNC(ppu_vt03_device::write_extended)); /* extra VT PPU registers */
+ 8,8,
+ RGN_FRAC(1,1),
+ 4,
+ { 0*64, 1*64, 2*64, 3*64 },
+ { 0,1,2,3,4,5,6,7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 4*64
+};
- map(0x4000, 0x4013).rw(m_apu, FUNC(nesapu_device::read), FUNC(nesapu_device::write));
- map(0x4014, 0x4014).r(FUNC(nes_vt_state::psg1_4014_r)).w(FUNC(nes_vt_state::vt_dma_w));
- map(0x4015, 0x4015).rw(FUNC(nes_vt_state::psg1_4015_r), FUNC(nes_vt_state::psg1_4015_w)); /* PSG status / first control register */
- map(0x4016, 0x4016).rw(FUNC(nes_vt_state::in0_r), FUNC(nes_vt_state::in0_w));
- map(0x4017, 0x4017).r(FUNC(nes_vt_state::in1_r)).w(FUNC(nes_vt_state::psg1_4017_w));
+static const gfx_layout helper2_layout =
+{
+ 8,8,
+ RGN_FRAC(1,1),
+ 4,
+ { 0*8, 1*8, 2*8, 3*8 },
+ { 0,1,2,3,4,5,6,7 },
+ { 0*16, 1*16, 2*16, 3*16,4*16,5*16,5*16,6*16,7*16 },
+ 4*64
+};
- map(0x4034, 0x4034).w(FUNC(nes_vt_state::vt03_4034_w));
+static GFXDECODE_START( vt03_gfx_helper )
+ GFXDECODE_ENTRY( "mainrom", 0, helper_layout, 0x0, 2 )
+ GFXDECODE_ENTRY( "mainrom", 0, helper2_layout, 0x0, 2 )
+GFXDECODE_END
- map(0x4100, 0x410b).r(FUNC(nes_vt_state::vt03_410x_r)).w(FUNC(nes_vt_state::vt03_410x_w));
- // 0x410c unused
- map(0x410d, 0x410d).w(FUNC(nes_vt_state::extra_io_control_w));
- map(0x410e, 0x410e).rw(FUNC(nes_vt_state::extrain_01_r), FUNC(nes_vt_state::extraout_01_w));
- map(0x410f, 0x410f).rw(FUNC(nes_vt_state::extrain_23_r), FUNC(nes_vt_state::extraout_23_w));
- // 0x4114 RS232 timer (low)
- // 0x4115 RS232 timer (high)
- // 0x4116 unused
- // 0x4117 unused
- // 0x4118 unused
- map(0x4119, 0x4119).r(FUNC(nes_vt_state::rs232flags_region_r));
- // 0x411a RS232 TX data
- // 0x411b RS232 RX data
+void nes_vt_base_state::configure_soc(nes_vt_soc_device* soc)
+{
+ soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_32mbyte);
+ soc->read_0_callback().set(FUNC(nes_vt_base_state::in0_r));
+ soc->read_1_callback().set(FUNC(nes_vt_base_state::in1_r));
+ soc->write_0_callback().set(FUNC(nes_vt_base_state::in0_w));
- map(0x8000, 0xffff).m(m_prg, FUNC(address_map_bank_device::amap8));
- map(0x8000, 0xffff).w(FUNC(nes_vt_state::vt03_8000_w));
- map(0x6000, 0x7fff).ram();
+ soc->extra_read_0_callback().set(FUNC(nes_vt_base_state::extrain_0_r));
+ soc->extra_read_1_callback().set(FUNC(nes_vt_base_state::extrain_1_r));
+ soc->extra_read_2_callback().set(FUNC(nes_vt_base_state::extrain_2_r));
+ soc->extra_read_3_callback().set(FUNC(nes_vt_base_state::extrain_3_r));
}
-/* Some later VT models have more RAM */
-void nes_vt_state::nes_vt_4k_ram_map(address_map &map)
+
+
+void nes_vt_sudoku_state::nes_vt_sudoku_512kb(machine_config &config)
{
- nes_vt_map(map);
- map(0x0800, 0x0fff).ram();
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_sudoku_state::vt_external_space_map_512kbyte);
}
-void nes_vt_ablping_state::nes_vt_ablping_map(address_map &map)
+void nes_vt_vg_1mb_majgnc_state::nes_vt_vg_1mb_majgnc(machine_config &config)
{
- nes_vt_map(map);
- map(0x410f, 0x410f).rw(FUNC(nes_vt_ablping_state::ablping_410f_r), FUNC(nes_vt_ablping_state::ablping_410f_w));
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_VG);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_vg_1mb_majgnc_state::vt_external_space_map_1mbyte);
}
-void nes_vt_cy_state::nes_vt_cy_map(address_map &map)
+void nes_vt_state::nes_vt_512kb(machine_config& config)
{
- nes_vt_4k_ram_map(map);
- map(0x41b0, 0x41bf).r(FUNC(nes_vt_cy_state::vt03_41bx_r)).w(FUNC(nes_vt_cy_state::vt03_41bx_w));
- map(0x48a0, 0x48af).r(FUNC(nes_vt_cy_state::vt03_48ax_r)).w(FUNC(nes_vt_cy_state::vt03_48ax_w));
- map(0x4130, 0x4136).r(FUNC(nes_vt_cy_state::vt03_413x_r)).w(FUNC(nes_vt_cy_state::vt03_413x_w));
- map(0x414F, 0x414F).r(FUNC(nes_vt_cy_state::vt03_414f_r));
- map(0x415C, 0x415C).r(FUNC(nes_vt_cy_state::vt03_415c_r));
-
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_512kbyte);
}
-void nes_vt_cy_state::nes_vt_bt_map(address_map &map)
+void nes_vt_state::nes_vt_1mb(machine_config& config)
{
- nes_vt_4k_ram_map(map);
- map(0x412c, 0x412c).w(FUNC(nes_vt_cy_state::vt03_412c_w));
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_1mbyte);
}
-
-void nes_vt_hh_state::nes_vt_hh_map(address_map &map)
+void nes_vt_state::nes_vt_2mb(machine_config& config)
{
- map(0x0000, 0x1fff).mask(0x0fff).ram();
- map(0x2000, 0x2007).mirror(0x00e0).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); /* standard PPU registers */
- map(0x2010, 0x201f).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::read_extended), FUNC(ppu_vt03_device::write_extended)); /* extra VT PPU registers */
-
- map(0x4000, 0x4013).rw(m_apu, FUNC(nesapu_device::read), FUNC(nesapu_device::write));
- map(0x4015, 0x4015).rw(FUNC(nes_vt_hh_state::psg1_4015_r), FUNC(nes_vt_hh_state::psg1_4015_w)); /* PSG status / first control register */
- map(0x4016, 0x4016).rw(FUNC(nes_vt_hh_state::in0_r), FUNC(nes_vt_hh_state::in0_w));
- map(0x4017, 0x4017).r(FUNC(nes_vt_hh_state::in1_r)).w(FUNC(nes_vt_hh_state::psg1_4017_w));
-
- map(0x4100, 0x410b).r(FUNC(nes_vt_hh_state::vt03_410x_r)).w(FUNC(nes_vt_hh_state::vt03_410x_w));
-
- map(0x8000, 0xffff).m(m_prg, FUNC(address_map_bank_device::amap8));
- map(0x8000, 0xffff).w(FUNC(nes_vt_hh_state::vt03_8000_w));
-
- map(0x4034, 0x4034).w(FUNC(nes_vt_hh_state::vt03_4034_w));
- map(0x4014, 0x4014).r(FUNC(nes_vt_hh_state::psg1_4014_r)).w(FUNC(nes_vt_hh_state::vt_fixed_dma_w));
-
- map(0x4119, 0x4119).r(FUNC(nes_vt_hh_state::rs232flags_region_r));
- map(0x414a, 0x414a).r(FUNC(nes_vt_hh_state::vthh_414a_r));
- map(0x411d, 0x411d).w(FUNC(nes_vt_hh_state::vtfp_411d_w));
-
- map(0x6000, 0x7fff).ram();
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_2mbyte);
}
-void nes_vt_hh_state::nes_vt_hh_baddma_map(address_map &map)
+void nes_vt_state::nes_vt_4mb(machine_config& config)
{
- nes_vt_hh_map(map);
- map(0x4014, 0x4014).w(FUNC(nes_vt_hh_state::vt_dma_w));
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_4mbyte);
}
-
-READ8_MEMBER(nes_vt_hh_state::vtfp_4119_r)
+void nes_vt_state::nes_vt_8mb(machine_config& config)
{
- // would be PAL/NTSC etc. in base system, maybe different here?
- return 0x00;
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_8mbyte);
}
-void nes_vt_hh_state::nes_vt_fp_map(address_map &map)
+void nes_vt_state::nes_vt_16mb(machine_config& config)
{
- nes_vt_hh_map(map);
- map(0x411e, 0x411e).w(FUNC(nes_vt_hh_state::vtfp_411e_w));
- map(0x4a00, 0x4a00).w(FUNC(nes_vt_hh_state::vtfp_4a00_w));
- map(0x412c, 0x412c).w(FUNC(nes_vt_hh_state::vtfp_412c_w));
- map(0x412d, 0x412d).r(FUNC(nes_vt_hh_state::vtfp_412d_r));
- map(0x4242, 0x4242).w(FUNC(nes_vt_hh_state::vtfp_4242_w));
- map(0x4119, 0x4119).r(FUNC(nes_vt_hh_state::vtfp_4119_r));
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_16mbyte);
}
-
-void nes_vt_dg_state::nes_vt_dg_map(address_map &map)
+void nes_vt_state::nes_vt_32mb(machine_config& config)
{
- map(0x0000, 0x1fff).ram();
- map(0x2000, 0x2007).mirror(0x00e0).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); /* standard PPU registers */
- map(0x2010, 0x201f).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::read_extended), FUNC(ppu_vt03_device::write_extended)); /* extra VT PPU registers */
-
- map(0x4000, 0x4013).rw(m_apu, FUNC(nesapu_device::read), FUNC(nesapu_device::write));
- map(0x4015, 0x4015).rw(FUNC(nes_vt_dg_state::psg1_4015_r), FUNC(nes_vt_dg_state::psg1_4015_w)); /* PSG status / first control register */
- map(0x4016, 0x4016).rw(FUNC(nes_vt_dg_state::in0_r), FUNC(nes_vt_dg_state::in0_w));
- map(0x4017, 0x4017).r(FUNC(nes_vt_dg_state::in1_r)).w(FUNC(nes_vt_dg_state::psg1_4017_w));
-
- map(0x4100, 0x410b).r(FUNC(nes_vt_dg_state::vt03_410x_r)).w(FUNC(nes_vt_dg_state::vt03_410x_w));
-
- map(0x411c, 0x411c).w(FUNC(nes_vt_dg_state::vt03_411c_w));
-
- map(0x8000, 0xffff).m(m_prg, FUNC(address_map_bank_device::amap8));
- map(0x8000, 0xffff).w(FUNC(nes_vt_dg_state::vt03_8000_w));
-
- map(0x4034, 0x4034).w(FUNC(nes_vt_dg_state::vt03_4034_w));
- map(0x4014, 0x4014).r(FUNC(nes_vt_dg_state::psg1_4014_r)).w(FUNC(nes_vt_dg_state::vt_fixed_dma_w));
- map(0x6000, 0x7fff).ram();
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_32mbyte);
}
-
-void nes_vt_dg_state::nes_vt_fa_map(address_map &map)
+void nes_vt_state::nes_vt_pal_2mb(machine_config& config)
{
- nes_vt_dg_map(map);
-
- map(0x412c, 0x412c).r(FUNC(nes_vt_dg_state::vtfa_412c_r)).w(FUNC(nes_vt_dg_state::vtfa_412c_w));
- map(0x4242, 0x4242).w(FUNC(nes_vt_dg_state::vtfp_4242_w));
+ NES_VT_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_2mbyte);
}
-void nes_vt_state::prg_map(address_map &map)
+void nes_vt_state::nes_vt_pal_4mb(machine_config& config)
{
- map(0x0000, 0x1fff).bankr("prg_bank0");
- map(0x2000, 0x3fff).bankr("prg_bank1");
- map(0x4000, 0x5fff).bankr("prg_bank2");
- map(0x6000, 0x7fff).bankr("prg_bank3");
+ NES_VT_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_4mbyte);
}
-
-
-WRITE_LINE_MEMBER(nes_vt_state::apu_irq)
+void nes_vt_state::nes_vt_pal_8mb(machine_config& config)
{
-// set_input_line(N2A03_APU_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+ NES_VT_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_8mbyte);
}
-READ8_MEMBER(nes_vt_state::apu_read_mem)
+void nes_vt_waixing_state::nes_vt_waixing_512kb(machine_config &config)
{
- return 0x00;//mintf->program->read_byte(offset);
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_waixing_state::vt_external_space_map_512kbyte);
+ m_soc->set_201x_descramble(0x3, 0x2, 0x7, 0x6, 0x5, 0x4);
}
-/* not strictly needed, but helps us see where things are in ROM to aid with figuring out banking schemes*/
-static const gfx_layout helper_layout =
+void nes_vt_waixing_state::nes_vt_waixing_2mb(machine_config &config)
{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { 0*64, 1*64, 2*64, 3*64 },
- { 0,1,2,3,4,5,6,7 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
- 4*64
-};
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_waixing_state::vt_external_space_map_2mbyte);
+ m_soc->set_201x_descramble(0x3, 0x2, 0x7, 0x6, 0x5, 0x4);
+}
-static const gfx_layout helper2_layout =
+void nes_vt_waixing_alt_state::nes_vt_waixing_alt_pal_8mb(machine_config &config)
{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { 0*8, 1*8, 2*8, 3*8 },
- { 0,1,2,3,4,5,6,7 },
- { 0*16, 1*16, 2*16, 3*16,4*16,5*16,5*16,6*16,7*16 },
- 4*64
-};
-
-static GFXDECODE_START( vt03_gfx_helper )
- GFXDECODE_ENTRY( "mainrom", 0, helper_layout, 0x0, 2 )
- GFXDECODE_ENTRY( "mainrom", 0, helper2_layout, 0x0, 2 )
-GFXDECODE_END
+ NES_VT_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_waixing_alt_state::vt_external_space_map_8mbyte);
+ m_soc->set_201x_descramble(0x3, 0x2, 0x7, 0x6, 0x5, 0x4);
+ m_soc->set_8000_scramble(0x5, 0x4, 0x3, 0x2, 0x7, 0x6, 0x7, 0x8);
+}
-uint32_t nes_vt_state::screen_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect)
+void nes_vt_hum_state::nes_vt_hummer_2mb(machine_config& config)
{
- return m_ppu->screen_update(screen, bitmap, cliprect);
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_sp69_state::vt_external_space_map_2mbyte);
+ m_soc->set_201x_descramble(0x7, 0x6, 0x5, 0x4, 0x2, 0x3);
+ m_soc->set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x7, 0x8);
+ GFXDECODE(config, "gfxdecode", "soc:ppu", vt03_gfx_helper);
}
-void nes_vt_state::nes_vt_base(machine_config &config)
+void nes_vt_hum_state::nes_vt_hummer_4mb(machine_config& config)
{
- /* basic machine hardware */
- M6502_VTSCR(config, m_maincpu, NTSC_APU_CLOCK); // selectable speed?
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_state::nes_vt_map);
-
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_refresh_hz(60.0988);
- m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((113.66/(NTSC_APU_CLOCK.dvalue()/1000000)) *
- (ppu2c0x_device::VBLANK_LAST_SCANLINE_NTSC-ppu2c0x_device::VBLANK_FIRST_SCANLINE+1+2)));
- m_screen->set_size(32*8, 262);
- m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
- m_screen->set_screen_update(FUNC(nes_vt_state::screen_update));
-
- GFXDECODE(config, "gfxdecode", "ppu", vt03_gfx_helper);
-
- PPU_VT03(config, m_ppu, N2A03_NTSC_XTAL);
- m_ppu->set_cpu_tag(m_maincpu);
- m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
- m_ppu->read_bg().set(FUNC(nes_vt_state::chr_r));
- m_ppu->read_sp().set(FUNC(nes_vt_state::spr_r));
+ nes_vt_hummer_2mb(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hum_state::vt_external_space_map_4mbyte);
+}
- ADDRESS_MAP_BANK(config, "prg").set_map(&nes_vt_state::prg_map).set_options(ENDIANNESS_LITTLE, 8, 15, 0x8000);
+void nes_vt_pjoy_state::nes_vt_pjoy_4mb(machine_config &config)
+{
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_sp69_state::vt_external_space_map_4mbyte);
+ m_soc->set_201x_descramble(0x2, 0x3, 0x4, 0x5, 0x6, 0x7);
+ m_soc->set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x8, 0x7);
+ m_soc->set_410x_scramble(0x8, 0x7);
+ GFXDECODE(config, "gfxdecode", "soc:ppu", vt03_gfx_helper);
+}
- /* sound hardware */
- SPEAKER(config, "mono").front_center();
- /* this should actually be a custom *almost* doubled up APU, however requires more thought
- than just using 2 APUs as registers in the 2nd one affect the PCM channel mode but the
- DMA control still comes from the 1st, but in the new mode, sound always outputs via the
- 2nd. Probably need to split the APU into interface and sound gen logic. */
- NES_APU(config, m_apu, NTSC_APU_CLOCK);
- m_apu->irq().set(FUNC(nes_vt_state::apu_irq));
- m_apu->mem_read().set(FUNC(nes_vt_state::apu_read_mem));
- m_apu->add_route(ALL_OUTPUTS, "mono", 0.50);
+void nes_vt_sp69_state::nes_vt_4mb_sp69(machine_config& config)
+{
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_sp69_state::vt_external_space_map_4mbyte);
+ m_soc->set_201x_descramble(0x4, 0x7, 0x2, 0x6, 0x5, 0x3);
+ m_soc->set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x7, 0x8);
+ GFXDECODE(config, "gfxdecode", "soc:ppu", vt03_gfx_helper);
}
-void nes_vt_state::nes_vt_base_pal(machine_config &config)
+void nes_vt_ablping_state::nes_vt_2mb_ablping(machine_config &config)
{
- nes_vt_base(config);
+ NES_VT_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
+ configure_soc(m_soc);
- m_maincpu->set_clock(PALC_APU_CLOCK);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_ablping_state::vt_external_space_map_2mbyte);
+ m_soc->set_201x_descramble(0x4, 0x7, 0x2, 0x6, 0x5, 0x3);
+ m_soc->set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x7, 0x8);
- PPU_VT03PAL(config.replace(), m_ppu, N2A03_PAL_XTAL);
- m_ppu->set_cpu_tag(m_maincpu);
- m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
- m_ppu->read_bg().set(FUNC(nes_vt_state::chr_r));
- m_ppu->read_sp().set(FUNC(nes_vt_state::spr_r));
+ m_soc->extra_read_2_callback().set(FUNC(nes_vt_ablping_state::ablping_extraio_r));
+ m_soc->extra_read_3_callback().set(FUNC(nes_vt_ablping_state::ablping_extraio_r));
+ m_soc->extra_write_2_callback().set(FUNC(nes_vt_ablping_state::ablping_extraio_w));
+ m_soc->extra_write_3_callback().set(FUNC(nes_vt_ablping_state::ablping_extraio_w));
- /* video hardware */
- m_screen->set_refresh_hz(50.0070);
- m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((113.66 / (PALC_APU_CLOCK.dvalue() / 1000000)) *
- (ppu2c0x_device::VBLANK_LAST_SCANLINE_PAL - ppu2c0x_device::VBLANK_FIRST_SCANLINE_PALC + 1 + 2)));
- m_screen->set_size(32 * 8, 312);
- m_screen->set_visarea(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
+ GFXDECODE(config, "gfxdecode", "soc:ppu", vt03_gfx_helper);
}
-
-
-void nes_vt_sudoku_state::nes_vt_sudoku(machine_config &config)
+READ8_MEMBER(nes_vt_base_state::upper_412c_r)
{
- nes_vt_base(config);
+ logerror("%s: upper_412c_r\n", machine().describe_context());
+ return 0x00;
}
-void nes_vt_majgnc_state::nes_vt_majgnc(machine_config &config)
+READ8_MEMBER(nes_vt_base_state::upper_412d_r)
{
- nes_vt_base(config);
- m_ppu->set_palette_mode(PAL_MODE_NEW_VG);
+ logerror("%s: upper_412d_r\n", machine().describe_context());
+ return 0x00;
}
-void nes_vt_state::nes_vt(machine_config &config)
+WRITE8_MEMBER(nes_vt_base_state::upper_412c_w)
{
- nes_vt_base(config);
+ logerror("%s: upper_412c_w %02x\n", machine().describe_context(), data);
}
-void nes_vt_waixing_state::machine_reset()
+
+void nes_vt_state::nes_vt_4k_ram(machine_config &config)
{
- nes_vt_state::machine_reset();
+ /* basic machine hardware */
+ NES_VT_SOC_4KRAM(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
- m_ppu->set_201x_descramble(0x3, 0x2, 0x7, 0x6, 0x5, 0x4); // reasonable
-}
+ GFXDECODE(config, "gfxdecode", "soc:ppu", vt03_gfx_helper);
-void nes_vt_waixing_alt_state::machine_reset()
-{
- nes_vt_waixing_state::machine_reset();
- set_8000_scramble(0x5, 0x4, 0x3, 0x2, 0x7, 0x6, 0x7, 0x8);
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt_state::upper_412c_r));
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt_state::upper_412d_r));
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt_state::upper_412c_w));
}
-void nes_vt_hum_state::machine_reset()
+void nes_vt_state::nes_vt_4k_ram_16mb(machine_config &config)
{
- nes_vt_state::machine_reset();
-
- m_ppu->set_201x_descramble(0x7, 0x6, 0x5, 0x4, 0x2, 0x3);
- set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x7, 0x8);
+ nes_vt_4k_ram(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_16mbyte);
}
-void nes_vt_pjoy_state::machine_reset()
+void nes_vt_state::nes_vt_4k_ram_pal(machine_config &config)
{
- nes_vt_state::machine_reset();
-
- m_ppu->set_201x_descramble(0x2, 0x3, 0x4, 0x5, 0x6, 0x7);
- set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x8, 0x7);
- set_410x_scramble(0x8, 0x7);
+ nes_vt_4k_ram(config); // TODO, use PAL
}
-void nes_vt_sp69_state::machine_reset()
+void nes_vt_cy_state::nes_vt_cy(machine_config &config)
{
- nes_vt_state::machine_reset();
+ nes_vt_4k_ram(config);
- m_ppu->set_201x_descramble(0x4, 0x7, 0x2, 0x6, 0x5, 0x3);
- set_8000_scramble(0x6, 0x7, 0x2, 0x3, 0x4, 0x5, 0x7, 0x8);
+ NES_VT_SOC_4KRAM_CY(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
}
-void nes_vt_ablping_state::nes_vt_ablping(machine_config &config)
+void nes_vt_cy_state::nes_vt_cy_bigger(machine_config &config)
{
- nes_vt(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_ablping_state::nes_vt_ablping_map);
+ nes_vt_cy(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_cy_state::vt_external_space_map_32mbyte); // must be some banking of this kind of VT can address over 32mb
}
-void nes_vt_state::nes_vt_4k_ram(machine_config &config)
+void nes_vt_cy_state::nes_vt_bt(machine_config &config)
{
- nes_vt(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_state::nes_vt_4k_ram_map);
-}
+ nes_vt_4k_ram(config);
-void nes_vt_state::nes_vt_4k_ram_pal(machine_config &config)
-{
- nes_vt_base_pal(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_state::nes_vt_4k_ram_map);
+ NES_VT_SOC_4KRAM_BT(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
}
-void nes_vt_cy_state::nes_vt_cy(machine_config &config)
+
+WRITE8_MEMBER(nes_vt_cy_state::bittboy_412c_w)
{
- nes_vt_4k_ram(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_cy_state::nes_vt_cy_map);
+ //bittboy (ok), mc_pg150 (not working)
+ logerror("%s: vt03_412c_extbank_w %02x\n", machine().describe_context(), data);
+ m_ahigh = (data & 0x04) ? (1 << 24) : 0x0;
}
-void nes_vt_cy_state::nes_vt_bt(machine_config &config)
+void nes_vt_cy_state::nes_vt_bt_2x16mb(machine_config& config)
{
- nes_vt_4k_ram(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_cy_state::nes_vt_bt_map);
+ nes_vt_bt(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_cy_state::vt_external_space_map_bitboy_2x16mbyte);
+
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt_cy_state::bittboy_412c_w));
}
void nes_vt_dg_state::nes_vt_dg(machine_config &config)
{
nes_vt_4k_ram(config);
+
+ NES_VT_SOC_8KRAM_DG(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ /*
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_dg_state::nes_vt_dg_map);
m_screen->set_refresh_hz(50.0070);
@@ -2073,22 +1021,57 @@ void nes_vt_dg_state::nes_vt_dg(machine_config &config)
(ppu2c0x_device::VBLANK_LAST_SCANLINE_PAL-ppu2c0x_device::VBLANK_FIRST_SCANLINE+1+2)));
m_screen->set_size(32*8, 312);
m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
+ */
}
-void nes_vt_hh_state::nes_vt_vg(machine_config &config)
+void nes_vt_dg_state::nes_vt_dg_1mb(machine_config& config)
{
nes_vt_dg(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::nes_vt_hh_map);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_dg_state::vt_external_space_map_1mbyte);
+}
+
+void nes_vt_dg_state::nes_vt_dg_baddma_16mb(machine_config& config)
+{
+ nes_vt_dg(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_dg_state::vt_external_space_map_16mbyte);
- m_ppu->set_palette_mode(PAL_MODE_NEW_VG);
}
-void nes_vt_hh_state::nes_vt_vg_baddma(machine_config &config)
+void nes_vt_hh_state::nes_vt_vg(machine_config &config)
{
nes_vt_dg(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::nes_vt_hh_baddma_map);
- m_ppu->set_palette_mode(PAL_MODE_NEW_VG);
+ NES_VT_SOC_8KRAM_DG(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_VG);
+ m_soc->force_bad_dma();
+}
+
+void nes_vt_hh_state::nes_vt_vg_8mb(machine_config& config)
+{
+ nes_vt_vg(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_8mbyte);
+}
+
+void nes_vt_hh_state::nes_vt_vg_4mb(machine_config& config)
+{
+ nes_vt_vg(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_4mbyte);
+}
+
+void nes_vt_hh_state::nes_vt_vg_16mb(machine_config& config)
+{
+ nes_vt_vg(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_16mbyte);
+}
+
+void nes_vt_hh_state::nes_vt_vg_1mb_majkon(machine_config &config)
+{
+ nes_vt_dg(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_1mbyte);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_VG);
}
@@ -2096,15 +1079,34 @@ void nes_vt_hh_state::nes_vt_vg_baddma(machine_config &config)
void nes_vt_hh_state::nes_vt_hh(machine_config &config)
{
nes_vt_4k_ram(config);
+
+ NES_VT_SOC_4KRAM_HH(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB);
+ m_soc->force_bad_dma();
+
+ /*
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::nes_vt_hh_map);
- m_ppu->set_palette_mode(PAL_MODE_NEW_RGB);
- /* video hardware */
m_screen->set_refresh_hz(50.0070);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((106.53/(PAL_APU_CLOCK.dvalue()/1000000)) *
(ppu2c0x_device::VBLANK_LAST_SCANLINE_PAL-ppu2c0x_device::VBLANK_FIRST_SCANLINE+1+2)));
m_screen->set_size(32*8, 312);
m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
+ */
+}
+
+void nes_vt_hh_state::nes_vt_hh_8mb(machine_config& config)
+{
+ nes_vt_hh(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_8mbyte);
+}
+
+void nes_vt_hh_state::nes_vt_hh_4mb(machine_config& config)
+{
+ nes_vt_hh(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_4mbyte);
}
static INPUT_PORTS_START( nes_vt )
@@ -2144,44 +1146,148 @@ static INPUT_PORTS_START( nes_vt_ddr )
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
+
+READ8_MEMBER(nes_vt_hh_state::fcpocket_412d_r)
+{
+ if (m_cartsel)
+ return m_cartsel->read();
+ else
+ return 0;
+}
+
+WRITE8_MEMBER(nes_vt_hh_state::fcpocket_412c_w)
+{
+ // fcpocket
+ logerror("%s: vtfp_412c_extbank_w %02x\n", machine().describe_context(), data);
+ m_ahigh = (data & 0x01) ? (1 << 25) : 0x0;
+}
+
void nes_vt_hh_state::nes_vt_fp(machine_config &config)
{
nes_vt_4k_ram(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::nes_vt_fp_map);
- m_ppu->set_palette_mode(PAL_MODE_NEW_RGB12);
+ NES_VT_SOC_4KRAM_FP(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
+ m_soc->force_bad_dma();
+}
+
+
+
+void nes_vt_hh_state::nes_vt_fp_4x16mb(machine_config& config)
+{
+ nes_vt_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_fp_2x32mbyte);
+
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt_hh_state::fcpocket_412c_w));
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt_hh_state::fcpocket_412d_r));
+}
+
+void nes_vt_hh_state::nes_vt_fp_32mb(machine_config& config)
+{
+ nes_vt_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_32mbyte);
+}
+
+void nes_vt_hh_state::nes_vt_fp_bigger(machine_config& config)
+{
+ nes_vt_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_32mbyte); // must be some kind of banking, or this VT can address > 32Mbyte
+}
+
+void nes_vt_hh_state::nes_vt_fp_16mb(machine_config& config)
+{
+ nes_vt_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_16mbyte);
}
void nes_vt_hh_state::nes_vt_fp_pal(machine_config &config)
{
- nes_vt_4k_ram_pal(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::nes_vt_fp_map);
+ nes_vt_fp(config);
+
+ // set to PAL
+}
+
+void nes_vt_hh_state::nes_vt_fp_pal_32mb(machine_config& config)
+{
+ nes_vt_4k_ram(config);
- m_ppu->set_palette_mode(PAL_MODE_NEW_RGB12);
+ NES_VT_SOC_4KRAM_FP_PAL(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
+ m_soc->force_bad_dma();
+
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hh_state::vt_external_space_map_32mbyte);
}
-void nes_vt_dg_state::nes_vt_fa(machine_config &config)
+
+void nes_vt_dg_state::nes_vt_fa(machine_config& config)
{
nes_vt_4k_ram(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_dg_state::nes_vt_fa_map);
+
+ NES_VT_SOC_8KRAM_FA(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+}
+
+
+READ8_MEMBER(nes_vt_dg_state::fapocket_412c_r)
+{
+ if (m_cartsel)
+ return m_cartsel->read();
+ else
+ return 0;
+}
+
+WRITE8_MEMBER(nes_vt_dg_state::fapocket_412c_w)
+{
+ // fapocket (ok?) (also uses bank from config switch for fake cartridge slot)
+ logerror("%s: vtfa_412c_extbank_w %02x\n", machine().describe_context(), data);
+ m_ahigh = 0;
+ m_ahigh |= (data & 0x01) ? (1 << 25) : 0x0;
+ m_ahigh |= (data & 0x02) ? (1 << 24) : 0x0;
+}
+
+void nes_vt_dg_state::nes_vt_fa_4x16mb(machine_config& config) // fapocket
+{
+ nes_vt_fa(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_dg_state::vt_external_space_map_fapocket_4x16mbyte);
+
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt_dg_state::fapocket_412c_r));
+ dynamic_cast<nes_vt_soc_4kram_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt_dg_state::fapocket_412c_w));
}
void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009(machine_config &config)
{
- nes_vt(config);
+ NES_VT_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ NES_VT_SOC_SCRAMBLE(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
- M6502_SWAP_OP_D5_D6(config.replace(), m_maincpu, NTSC_APU_CLOCK);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::nes_vt_map);
+ //m_soc->set_default_palette_mode(PAL_MODE_NEW_VG); // gives better title screens, but worse ingame, must be able to switch
+}
- //m_ppu->set_palette_mode(PAL_MODE_NEW_VG); // gives better title screens, but worse ingame, must be able to switch
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_4mb(machine_config& config)
+{
+ nes_vt_vh2009(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_4mbyte);
}
-void nes_vt_swap_op_d5_d6_state::nes_vt_senwld(machine_config &config)
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_8mb(machine_config& config)
{
nes_vt_vh2009(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_8mbyte);
+}
+
- m_ppu->set_palette_mode(PAL_MODE_NEW_VG);
+void nes_vt_swap_op_d5_d6_state::nes_vt_senwld_512kb(machine_config &config)
+{
+ nes_vt_vh2009(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_senwld_512kbyte);
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_VG);
}
static INPUT_PORTS_START( nes_vt_fp )
@@ -2393,8 +1499,9 @@ ROM_START( mc_dgear )
ROM_END
ROM_START( dgun2500 )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "dgun2500.bin", 0x00000, 0x2000000, CRC(a2f963f3) SHA1(e29ed20ccdcf25b5640a607b3d2c9e6a4944e172) ) // 1ST AND 2ND HALF IDENTICAL
+ ROM_REGION( 0x1000000, "mainrom", 0 )
+ ROM_LOAD( "dgun2500.bin", 0x00000, 0x1000000, CRC(a2f963f3) SHA1(e29ed20ccdcf25b5640a607b3d2c9e6a4944e172) ) // 1ST AND 2ND HALF IDENTICAL
+ ROM_IGNORE(0x1000000)
ROM_END
ROM_START( dgun2561 )
@@ -2427,8 +1534,8 @@ ROM_START( lxcmcy )
ROM_END
ROM_START( lxcmcysw )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "jl2365swr-1.u2", 0x00000, 0x2000000, CRC(60ece391) SHA1(655de6b36ba596d873de2839522b948ccf45e006) )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ ROM_LOAD( "jl2365swr-1.u2", 0x2000000, 0x2000000, CRC(60ece391) SHA1(655de6b36ba596d873de2839522b948ccf45e006) )
ROM_CONTINUE(0x0000000, 0x2000000)
ROM_END
@@ -2456,7 +1563,7 @@ ROM_START( red5mam )
ROM_END
ROM_START( cybar120 )
- ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_REGION( 0x1000000, "mainrom", 0 )
ROM_LOAD( "m2500p-vt09-epson,20091222ver05,_30r-sx1067-01_pcb,_12r0cob128m_12001-3d05_fw.bin", 0x00000, 0x1000000, CRC(f7138980) SHA1(de31264ee3a5a5c77a86733b2e2d6845fee91ea5) )
ROM_END
@@ -2543,8 +1650,9 @@ ROM_START( mc_7x6ss )
ROM_END
ROM_START( mc_8x6ss )
- ROM_REGION( 0x200000, "mainrom", 0 ) // odd size rom, does it need stripping?
- ROM_LOAD( "888888-in-1, 8 bit slim station, newpxp-dvt22-a pcb.bin", 0x00000, 0x100ce1, CRC(47149d0b) SHA1(5a8733886b550e3235dd90fb415b5a602e967f91) )
+ ROM_REGION( 0x100000, "mainrom", 0 ) // odd size rom, does it need stripping?
+ ROM_LOAD( "888888-in-1, 8 bit slim station, newpxp-dvt22-a pcb.bin", 0x00000, 0x100000, CRC(47149d0b) SHA1(5a8733886b550e3235dd90fb415b5a602e967f91) )
+ ROM_IGNORE(0xce1)
ROM_END
// PXP2 8Bit Slim Station
@@ -2632,12 +1740,12 @@ ROM_START( ddrstraw )
ROM_END
ROM_START( majkon )
- ROM_REGION( 0x200000, "mainrom", ROMREGION_ERASEFF )
+ ROM_REGION( 0x100000, "mainrom", ROMREGION_ERASEFF )
ROM_LOAD( "konamicollectorsseries.bin", 0x00000, 0x100000, CRC(47505e51) SHA1(3bfb05d7cfa2bb4c115335f0383fa4aa59db0b28) )
ROM_END
ROM_START( majgnc )
- ROM_REGION( 0x200000, "mainrom", ROMREGION_ERASEFF )
+ ROM_REGION( 0x100000, "mainrom", ROMREGION_ERASEFF )
ROM_LOAD( "majescogoldennuggetcasino_st29w800at_002000d7.bin", 0x00000, 0x100000, CRC(1a156a9d) SHA1(08be4079dd68c9cf05bb92e11a3da4f092d7cfea) )
ROM_END
@@ -2646,30 +1754,11 @@ ROM_START( sudopptv )
ROM_LOAD( "sudokupnptvgame_29lv400tc_000422b9.bin", 0x00000, 0x80000, CRC(722cc36d) SHA1(1f6d1f57478cf175a36722b39c52eded4b669f81) )
ROM_END
-
ROM_START( ablping )
ROM_REGION( 0x200000, "mainrom", 0 )
ROM_LOAD( "abl_pingpong.bin", 0x00000, 0x200000, CRC(b31de1fb) SHA1(94e8afb2315ba1fa0892191c8e1832391e401c70) )
ROM_END
-
-
-#if 0
-ROM_START( mc_15kin1 )
- ROM_REGION( 0x200000, "mainrom", 0 )
- ROM_LOAD( "15000in1.bin", 0x00000, 0x200000, CRC(29a8cb96) SHA1(c4b31964fbfc5ee97d4a4c7e4d418ea5d84a568d) )
-ROM_END
-
-ROM_START( mc_18kin1 )
- ROM_REGION( 0x400000, "mainrom", 0 )
- ROM_LOAD( "18000in1.bin", 0x00000, 0x400000, CRC(23c0c325) SHA1(4ad53b5e5a8e65571fd39760278cdf7a6371da47) )
-ROM_END
-
-ROM_START( gx121in1 )
- ROM_REGION( 0x400000, "mainrom", 0 )
- ROM_LOAD( "gx121in1.bin", 0x00000, 0x400000, CRC(0282d975) SHA1(9ead7505b99a60834724a5818ee120e03c8bf975) )
-ROM_END
-#endif
ROM_START( dgun2573 )
ROM_REGION( 0x2000000, "mainrom", 0 )
ROM_LOAD( "dgun2573.bin", 0x00000, 0x2000000, BAD_DUMP CRC(cde71a53) SHA1(d0d4c1965876291861781ecde46b1142b062f1f3) )
@@ -2756,16 +1845,18 @@ ROM_START( ppgc200g )
ROM_LOAD( "m29dw641.u2", 0x00000, 0x800000, CRC(b16dc677) SHA1(c1984fde4caf9345d41d127db946d1c21ec43ae0) )
ROM_END
-ROM_START( fcpocket )
- ROM_REGION( 0x8000000, "mainrom", 0 )
- ROM_LOAD( "s29gl01gp.bin", 0x00000, 0x8000000, CRC(8703b18a) SHA1(07943443294e80ca93f83181c8bdbf950b87c52f) )
-ROM_END
+
ROM_START( mog_m320 )
ROM_REGION( 0x800000, "mainrom", 0 )
ROM_LOAD( "w25q64fv.bin", 0x00000, 0x800000, CRC(3c5e1b36) SHA1(4bcbf35ebf2b1714ccde5de758a89a6a39528f89) )
ROM_END
+ROM_START( fcpocket )
+ ROM_REGION( 0x8000000, "mainrom", 0 )
+ ROM_LOAD( "s29gl01gp.bin", 0x00000, 0x8000000, CRC(8703b18a) SHA1(07943443294e80ca93f83181c8bdbf950b87c52f) ) // 2nd half = 0x00 (so 64MByte of content)
+ROM_END
+
ROM_START( fapocket )
ROM_REGION( 0x4000000, "mainrom", 0 )
ROM_LOAD( "s29gl512n.bin", 0x00000, 0x4000000, CRC(37d0fb06) SHA1(0146a2fae32e23b65d4032c508f0d12cedd399c3) )
@@ -2777,7 +1868,7 @@ ROM_START( zdog )
ROM_END
ROM_START( otrail )
- ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_REGION( 0x100000, "mainrom", 0 )
ROM_LOAD( "g25q80cw.bin", 0x00000, 0x100000, CRC(b20a03ba) SHA1(c4ca8e590b07baaebed747537bc8f92e44bdd219) ) // dumped as QD25Q80C
ROM_REGION( 0x200, "seeprom", 0 )
@@ -2788,63 +1879,63 @@ ROM_END
// earlier version of vdogdemo
-CONS( 200?, vdogdeme, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT", "V-Dog (prototype, earlier)", MACHINE_NOT_WORKING )
+CONS( 200?, vdogdeme, 0, 0, nes_vt_1mb, nes_vt, nes_vt_state, empty_init, "VRT", "V-Dog (prototype, earlier)", MACHINE_NOT_WORKING )
// this is glitchy even in other emulators, might just be entirely unfinished, it selects banks but they don't contain the required gfx?
-CONS( 200?, vdogdemo, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT", "V-Dog (prototype)", MACHINE_NOT_WORKING )
+CONS( 200?, vdogdemo, 0, 0, nes_vt_512kb, nes_vt, nes_vt_state, empty_init, "VRT", "V-Dog (prototype)", MACHINE_NOT_WORKING )
// Bundled as "VT03 Demo" on the V.R. Technology VT SDK
-CONS( 200?, pinkjelly, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT / Simmer Technology Co., Ltd.", "VRT VT SDK 'Pink Jelly' (VT03 Demo)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, pinkjelly, 0, 0, nes_vt_2mb, nes_vt, nes_vt_state, empty_init, "VRT / Simmer Technology Co., Ltd.", "VRT VT SDK 'Pink Jelly' (VT03 Demo)", MACHINE_IMPERFECT_GRAPHICS )
// Bundled as "C-Compiler Demo Program 2" on the V.R. Technology VT SDK
-CONS( 200?, vtpinball, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT / OJ-Jungle", "VRT VT SDK 'Pinball' (C-Compiler Demo Program 2)", MACHINE_NOT_WORKING )
+CONS( 200?, vtpinball, 0, 0, nes_vt_512kb, nes_vt, nes_vt_state, empty_init, "VRT / OJ-Jungle", "VRT VT SDK 'Pinball' (C-Compiler Demo Program 2)", MACHINE_NOT_WORKING )
// Bundled as "Sound Generator FMDemo" on the V.R. Technology VT SDK
-CONS( 200?, vtsndtest, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT", "VRT VT SDK 'VT03 Sound Test' (Sound Generator FMDemo)", MACHINE_IMPERFECT_CONTROLS )
+CONS( 200?, vtsndtest, 0, 0, nes_vt_512kb, nes_vt, nes_vt_state, empty_init, "VRT", "VRT VT SDK 'VT03 Sound Test' (Sound Generator FMDemo)", MACHINE_IMPERFECT_CONTROLS )
// Bundled as "Demo for VT03 Pic32" on the V.R. Technology VT SDK
-CONS( 200?, vtboxing, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT", "VRT VT SDK 'Boxing' (Demo for VT03 Pic32)", MACHINE_NOT_WORKING )
+CONS( 200?, vtboxing, 0, 0, nes_vt_512kb, nes_vt, nes_vt_state, empty_init, "VRT", "VRT VT SDK 'Boxing' (Demo for VT03 Pic32)", MACHINE_NOT_WORKING )
// Menu system clearly started off as 'vtpinball' Many elements seem similar to Family Pinball for the Famicom.
// 050329 (29th March 2005) date on PCB
-CONS( 2005, ablpinb, 0, 0, nes_vt_base_pal, ablpinb, nes_vt_ablpinb_state, empty_init, "Advance Bright Ltd", "Pinball (P8002, ABL TV Game)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 2005, ablpinb, 0, 0, nes_vt_pal_2mb, ablpinb, nes_vt_ablpinb_state, empty_init, "Advance Bright Ltd", "Pinball (P8002, ABL TV Game)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// Black pad marked 'SUDOKU' with tails on the S and U characters looping over the logo. Box says "Plug and Play Sudoku"
// Has 2 sets of 4 buttons in circular 'direction pad' layouts (on the left for directions, on the right for functions) and 9 red numbered buttons with red power LED on left of them, and reset button on right
-CONS( 200?, papsudok, 0, 0, nes_vt_sudoku, sudoku, nes_vt_sudoku_state, init_sudoku, "<unknown>", "Plug and Play Sudoku (VT based?)", MACHINE_NOT_WORKING )
+CONS( 200?, papsudok, 0, 0, nes_vt_sudoku_512kb, sudoku, nes_vt_sudoku_state, init_sudoku, "<unknown>", "Plug and Play Sudoku (VT based?)", MACHINE_NOT_WORKING )
// should be VT03 based
// for testing 'Shark', 'Octopus', 'Harbor', and 'Earth Fighter' use the extended colour modes, other games just seem to use standard NES modes
-CONS( 200?, mc_dgear, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "dreamGEAR", "dreamGEAR 75-in-1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_dgear, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "dreamGEAR", "dreamGEAR 75-in-1", MACHINE_IMPERFECT_GRAPHICS )
// all software in this runs in the VT03 enhanced mode, it also includes an actual licensed VT03 port of Frogger.
// all games work OK except Frogger which has serious graphical issues
-CONS( 2006, vgtablet, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "Performance Designed Products (licensed by Konami)", "VG Pocket Tablet (VG-4000)", MACHINE_NOT_WORKING ) // raster timing is broken for Frogger
+CONS( 2006, vgtablet, 0, 0, nes_vt_vg_4mb, nes_vt, nes_vt_hh_state, empty_init, "Performance Designed Products (licensed by Konami)", "VG Pocket Tablet (VG-4000)", MACHINE_NOT_WORKING ) // raster timing is broken for Frogger
// There is a 2004 Majesco Frogger "TV game" that appears to contain the same version of Frogger as above but with no other games, so probably fits here.
-CONS( 2004, majkon, 0, 0, nes_vt_vg_baddma, nes_vt, nes_vt_hh_state, empty_init, "Majesco (licensed from Konami)", "Konami Collector's Series Arcade Advanced", MACHINE_NOT_WORKING ) // raster timing is broken for Frogger, palette issues
+CONS( 2004, majkon, 0, 0, nes_vt_vg_1mb_majkon, nes_vt, nes_vt_hh_state, empty_init, "Majesco (licensed from Konami)", "Konami Collector's Series Arcade Advanced", MACHINE_NOT_WORKING ) // raster timing is broken for Frogger, palette issues
-CONS( 200?, majgnc, 0, 0, nes_vt_majgnc, majgnc, nes_vt_majgnc_state, empty_init, "Majesco", "Golden Nugget Casino", MACHINE_NOT_WORKING )
+CONS( 200?, majgnc, 0, 0, nes_vt_vg_1mb_majgnc, majgnc, nes_vt_vg_1mb_majgnc_state, empty_init, "Majesco", "Golden Nugget Casino", MACHINE_NOT_WORKING )
// small black unit, dpad on left, 4 buttons (A,B,X,Y) on right, Start/Reset/Select in middle, unit text "Sudoku Plug & Play TV Game"
-CONS( 200?, sudopptv, 0, 0, nes_vt, nes_vt, nes_vt_waixing_state, empty_init, "Smart Planet", "Sudoku Plug & Play TV Game '6 Intelligent Games'", MACHINE_NOT_WORKING )
+CONS( 200?, sudopptv, 0, 0, nes_vt_waixing_512kb, nes_vt, nes_vt_waixing_state, empty_init, "Smart Planet", "Sudoku Plug & Play TV Game '6 Intelligent Games'", MACHINE_NOT_WORKING )
-CONS( 200?, megapad, 0, 0, nes_vt, nes_vt, nes_vt_waixing_state, empty_init, "Waixing", "Megapad 31-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // Happy Biqi has broken sprites, investigate before promoting
+CONS( 200?, megapad, 0, 0, nes_vt_waixing_2mb, nes_vt, nes_vt_waixing_state, empty_init, "Waixing", "Megapad 31-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // Happy Biqi has broken sprites, investigate before promoting
// 060303 date code on PCB
-CONS( 2006, ablmini, 0, 0, nes_vt_base_pal, nes_vt, nes_vt_waixing_alt_state, empty_init, "Advance Bright Ltd", "Double Players Mini Joystick 80-in-1 (MJ8500, ABL TV Game)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2006, ablmini, 0, 0, nes_vt_waixing_alt_pal_8mb, nes_vt, nes_vt_waixing_alt_state, empty_init, "Advance Bright Ltd", "Double Players Mini Joystick 80-in-1 (MJ8500, ABL TV Game)", MACHINE_IMPERFECT_GRAPHICS )
// needs PCM samples, Y button is not mapped (not used by any of the games?)
-CONS( 200?, timetp36, 0, 0, nes_vt_base_pal, timetp36, nes_vt_timetp36_state, empty_init, "TimeTop", "Super Game 36-in-1 (TimeTop SuperGame) (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, timetp36, 0, 0, nes_vt_pal_4mb, timetp36, nes_vt_timetp36_state, empty_init, "TimeTop", "Super Game 36-in-1 (TimeTop SuperGame) (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// this is VT09 based
// it boots, most games correct, but palette issues in some games still (usually they appear greyscale)
// and colors overall a bit off
-CONS( 2009, cybar120, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "Defender", "Defender M2500P 120-in-1", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2005, vgpocket, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "Performance Designed Products", "VG Pocket (VG-2000)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, vgpmini, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "Performance Designed Products", "VG Pocket Mini (VG-1500)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2009, cybar120, 0, 0, nes_vt_vg_16mb, nes_vt, nes_vt_hh_state, empty_init, "Defender", "Defender M2500P 120-in-1", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2005, vgpocket, 0, 0, nes_vt_vg_4mb, nes_vt, nes_vt_hh_state, empty_init, "Performance Designed Products", "VG Pocket (VG-2000)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, vgpmini, 0, 0, nes_vt_vg_4mb, nes_vt, nes_vt_hh_state, empty_init, "Performance Designed Products", "VG Pocket Mini (VG-1500)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS )
// VG Pocket Max (VG-2500) (blue case, 75 games)
// VG Pocket Max (VG-3000) (white case, 75 games) (does the game selection differ, or only the case?)
// VG Pocket Caplet is likely SunPlus hardware instead. (has common SunPlus games)
@@ -2852,21 +1943,22 @@ CONS( 200?, vgpmini, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "
// Runs fine, non-sport 121 in 1 games perfect, but minor graphical issues in
// sport games, also no sound in menu or sport games due to missing PCM
// emulation
-CONS( 200?, dgun2500, 0, 0, nes_vt_dg, nes_vt, nes_vt_dg_state, empty_init, "dreamGEAR", "dreamGEAR Wireless Motion Control with 130 games (DGUN-2500)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
+CONS( 200?, dgun2500, 0, 0, nes_vt_dg_baddma_16mb, nes_vt, nes_vt_dg_state, empty_init, "dreamGEAR", "dreamGEAR Wireless Motion Control with 130 games (DGUN-2500)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
// don't even get to menu. very enhanced chipset, VT368/9?
-CONS( 2012, dgun2561, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "dreamGEAR", "My Arcade Portable Gaming System (DGUN-2561)", MACHINE_NOT_WORKING )
-CONS( 2016, dgun2593, 0, 0, nes_vt_fp, nes_vt, nes_vt_hh_state, empty_init, "dreamGEAR", "My Arcade Retro Arcade Machine - 300 Handheld Video Games (DGUN-2593)", MACHINE_NOT_WORKING )
+CONS( 2012, dgun2561, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "dreamGEAR", "My Arcade Portable Gaming System (DGUN-2561)", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 2016, dgun2593, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "dreamGEAR", "My Arcade Retro Arcade Machine - 300 Handheld Video Games (DGUN-2593)", MACHINE_NOT_WORKING ) // 128Mbyte ROM, must be externally banked or different addressing scheme
-CONS( 200?, lxcmcy, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade", MACHINE_NOT_WORKING )
-CONS( 200?, lxcmc250, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - 250-in-1 (JL2375)", MACHINE_NOT_WORKING )
-CONS( 200?, lxcmcysw, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Star Wars Rebels", MACHINE_NOT_WORKING )
-CONS( 200?, lxcmcyfz, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Frozen", MACHINE_NOT_WORKING )
-CONS( 200?, lxcmcydp, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Disney Princess", MACHINE_NOT_WORKING )
+CONS( 200?, lxcmcy, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmc250, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - 250-in-1 (JL2375)", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcysw, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Star Wars Rebels", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcyfz, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Frozen", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcydp, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Disney Princess", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
// GB-NO13-Main-VT389-2 on PCBs
-CONS( 2016, rtvgc300, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - 300 Games", MACHINE_NOT_WORKING )
-CONS( 2017, rtvgc300fz,0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - Frozen - 300 Games", MACHINE_NOT_WORKING )
+CONS( 2016, rtvgc300, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - 300 Games", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 2017, rtvgc300fz,0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - Frozen - 300 Games", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+
/* The following are also confirmed to be NES/VT derived units, most having a standard set of games with a handful of lazy graphic mods thrown in to fit the unit theme
@@ -2890,120 +1982,127 @@ CONS( 2017, rtvgc300fz,0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empt
*/
// intial code isn't valid? scrambled?
-CONS( 201?, red5mam, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Red5", "Mini Arcade Machine (Red5)", MACHINE_NOT_WORKING )
+CONS( 201?, red5mam, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Red5", "Mini Arcade Machine (Red5)", MACHINE_NOT_WORKING ) // 128Mbyte ROM, must be externally banked or different addressing scheme
-// boots, same platform with scrambled opcodes as FC pocket
-// palette issues in some games because they actually use the old VT style palette
-// but no way to switch?
-// some menu gfx broken, probably because this is a bad dump
-CONS( 2015, dgun2573, 0, 0, nes_vt_fp, nes_vt, nes_vt_hh_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-CONS( 201?, denv150, 0, 0, nes_vt_fp, nes_vt, nes_vt_hh_state, empty_init, "Denver", "Denver Game Console GMP-240C 150-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 201?, denv150, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Denver", "Denver Game Console GMP-240C 150-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
// CPU die is marked 'VH2009' There's also a 62256 RAM chip on the PCB, some scrambled opcodes
-CONS( 200?, polmega, 0, 0, nes_vt_vh2009, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "Polaroid", "Megamax GPD001SDG", MACHINE_NOT_WORKING )
-CONS( 200?, silv35, 0, 0, nes_vt_vh2009, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "SilverLit", "35 in 1 Super Twins", MACHINE_NOT_WORKING )
+CONS( 200?, polmega, 0, 0, nes_vt_vh2009_4mb, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "Polaroid", "Megamax GPD001SDG", MACHINE_NOT_WORKING )
+CONS( 200?, silv35, 0, 0, nes_vt_vh2009_4mb, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "SilverLit", "35 in 1 Super Twins", MACHINE_NOT_WORKING )
// die is marked as VH2009, as above, but no scrambled opcodes here
-CONS( 201?, techni4, 0, 0, nes_vt_base_pal, nes_vt, nes_vt_state, empty_init, "Technigame", "Technigame Super 4-in-1 Sports (PAL)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 201?, techni4, 0, 0, nes_vt_pal_2mb, nes_vt, nes_vt_state, empty_init, "Technigame", "Technigame Super 4-in-1 Sports (PAL)", MACHINE_IMPERFECT_GRAPHICS )
// same encryption as above, but seems like newer hardware (or the above aren't using most of the features)
-CONS( 200?, lpgm240, 0, 0, nes_vt_vh2009, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "<unknown>", "Let's Play! Game Machine 240 in 1", MACHINE_NOT_WORKING ) // mini 'retro-arcade' style cabinet
+CONS( 200?, lpgm240, 0, 0, nes_vt_vh2009_8mb, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "<unknown>", "Let's Play! Game Machine 240 in 1", MACHINE_NOT_WORKING ) // mini 'retro-arcade' style cabinet
// this has 'Shark' and 'Octopus' etc. like mc_dgear but uses scrambled bank registers
-CONS( 200?, mc_sp69, 0, 0, nes_vt, nes_vt, nes_vt_sp69_state, empty_init, "<unknown>", "Sports Game 69 in 1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
+// This was also often found in cart form with SunPlus / Famiclone hybrid systems to boost the game count, eg. the WiWi (ROM verified to match)
+CONS( 200?, mc_sp69, 0, 0, nes_vt_4mb_sp69, nes_vt, nes_vt_sp69_state, empty_init, "<unknown>", "Sports Game 69 in 1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
// this game was also sold by dreamGEAR and several others companies, each time with a different name and different case, although the dumped version was from ABL, and it hasn't been confirmed that the ROMs are identical for the other units
// Super Ping Pong appears on the title screen, but not the box / product art which simply has "Ping Pong Plug & Play TV Game" on front/back/bottom/manual, and "Table Tennis Plug & Play TV Game" on left/right sides. Product code is PP1100
// PCB has PP1100-MB 061110 on it, possible date YYMMDD code? (pinball is 050329, guitar fever is 070516, air blaster 050423, kickboxing 061011 etc.)
-CONS( 2006, ablping, 0, 0, nes_vt_ablping, nes_vt, nes_vt_ablping_state, empty_init, "Advance Bright Ltd", "Ping Pong / Table Tennis / Super Ping Pong (PP1100, ABL TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 2006, ablping, 0, 0, nes_vt_2mb_ablping, nes_vt, nes_vt_ablping_state, empty_init, "Advance Bright Ltd", "Ping Pong / Table Tennis / Super Ping Pong (PP1100, ABL TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// Hummer systems, scrambled bank register
-CONS( 200?, mc_sam60, 0, 0, nes_vt, nes_vt, nes_vt_hum_state, empty_init, "Hummer Technology Co., Ltd.", "Samuri (60 in 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-CONS( 200?, zdog, 0, 0, nes_vt, nes_vt, nes_vt_hum_state, empty_init, "Hummer Technology Co., Ltd.", "ZDog (44 in 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, mc_sam60, 0, 0, nes_vt_hummer_2mb, nes_vt, nes_vt_hum_state, empty_init, "Hummer Technology Co., Ltd.", "Samuri (60 in 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, zdog, 0, 0, nes_vt_hummer_4mb, nes_vt, nes_vt_hum_state, empty_init, "Hummer Technology Co., Ltd.", "ZDog (44 in 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// very plain menus
-CONS( 200?, pjoyn50, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "PowerJoy Navigator 50 in 1", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, pjoys30, 0, 0, nes_vt, nes_vt, nes_vt_pjoy_state, empty_init, "<unknown>", "PowerJoy Supermax 30 in 1", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, pjoys60, 0, 0, nes_vt, nes_vt, nes_vt_pjoy_state, empty_init, "<unknown>", "PowerJoy Supermax 60 in 1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, pjoyn50, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "PowerJoy Navigator 50 in 1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, pjoys30, 0, 0, nes_vt_pjoy_4mb, nes_vt, nes_vt_pjoy_state, empty_init, "<unknown>", "PowerJoy Supermax 30 in 1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, pjoys60, 0, 0, nes_vt_pjoy_4mb, nes_vt, nes_vt_pjoy_state, empty_init, "<unknown>", "PowerJoy Supermax 60 in 1", MACHINE_IMPERFECT_GRAPHICS )
// has a non-enhanced version of 'Octopus' as game 30
-CONS( 200?, sarc110, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "Super Arcade 110 (set 1)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, sarc110a, sarc110, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "Super Arcade 110 (set 2)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, sarc110, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Super Arcade 110 (set 1)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, sarc110a, sarc110, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Super Arcade 110 (set 2)", MACHINE_IMPERFECT_GRAPHICS )
// both offer chinese or english menus
-CONS( 200?, mc_110cb, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "CoolBoy", "110 in 1 CoolBaby (CoolBoy RS-1S)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, mc_138cb, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "CoolBoy", "138 in 1 CoolBaby (CoolBoy RS-5, PCB060-10009011V1.3)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_110cb, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "CoolBoy", "110 in 1 CoolBaby (CoolBoy RS-1S)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_138cb, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "CoolBoy", "138 in 1 CoolBaby (CoolBoy RS-5, PCB060-10009011V1.3)", MACHINE_IMPERFECT_GRAPHICS )
// doesn't boot, bad dump
-CONS( 201?, cbrs8, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "CoolBoy", "CoolBoy RS-8 168 in 1", MACHINE_NOT_WORKING )
+CONS( 201?, cbrs8, 0, 0, nes_vt_16mb, nes_vt, nes_vt_state, empty_init, "CoolBoy", "CoolBoy RS-8 168 in 1", MACHINE_NOT_WORKING )
-CONS( 201?, rfcp168, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "Retro FC Plus 168 in 1 Handheld", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // "RETRO_FC_V3.5" (doesn't boot, ends up in weeds after jumping to bank with no code, dump not verified)
+CONS( 201?, rfcp168, 0, 0, nes_vt_16mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Retro FC Plus 168 in 1 Handheld", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // "RETRO_FC_V3.5" (doesn't boot, ends up in weeds after jumping to bank with no code, dump not verified)
-CONS( 200?, gprnrs1, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "Game Prince RS-1", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, gprnrs16, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "Game Prince RS-16", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, gprnrs1, 0, 0, nes_vt_8mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Game Prince RS-1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, gprnrs16, 0, 0, nes_vt_32mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Game Prince RS-16", MACHINE_IMPERFECT_GRAPHICS )
// Notes about the DDR games:
// * Missing PCM sounds (unsupported in NES VT APU code right now)
// * Console has stereo output (dual RCA connectors).
-CONS( 2006, ddrdismx, 0, 0, nes_vt, nes_vt_ddr, nes_vt_state, empty_init, "Majesco (licensed from Konami, Disney)", "Dance Dance Revolution Disney Mix", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // shows (c)2001 Disney onscreen, but that's recycled art from the Playstation release, actual release was 2006
-CONS( 2006, ddrstraw, 0, 0, nes_vt, nes_vt_ddr, nes_vt_state, empty_init, "Majesco (licensed from Konami)", "Dance Dance Revolution Strawberry Shortcake", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 2006, ddrdismx, 0, 0, nes_vt_2mb, nes_vt_ddr, nes_vt_state, empty_init, "Majesco (licensed from Konami, Disney)", "Dance Dance Revolution Disney Mix", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // shows (c)2001 Disney onscreen, but that's recycled art from the Playstation release, actual release was 2006
+CONS( 2006, ddrstraw, 0, 0, nes_vt_2mb, nes_vt_ddr, nes_vt_state, empty_init, "Majesco (licensed from Konami)", "Dance Dance Revolution Strawberry Shortcake", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// unsorted, these were all in nes.xml listed as ONE BUS systems
-CONS( 200?, mc_dg101, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "dreamGEAR", "dreamGEAR 101 in 1", MACHINE_IMPERFECT_GRAPHICS ) // dreamGear, but no enhanced games?
-CONS( 200?, mc_aa2, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "100 in 1 Arcade Action II (AT-103)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, mc_105te, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "2011 Super HiK 105 in 1 Turbo Edition", MACHINE_NOT_WORKING )
-CONS( 200?, mc_8x6cb, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "CoolBoy", "888888 in 1 (Coolboy AEF-390)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-CONS( 200?, mc_9x6ss, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "999999 in 1 (PXP2 Slim Station)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, mc_9x6sa, mc_9x6ss, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "999999 in 1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, mc_7x6ss, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "777777 in 1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 200?, mc_8x6ss, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "888888 in 1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2004, mc_dcat8, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "100 in 1 (D-CAT8 8bit Console, set 1) (v5.01.11-frd, BL 20041217)", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2004, mc_dcat8a, mc_dcat8, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "100 in 1 (D-CAT8 8bit Console, set 2)", MACHINE_IMPERFECT_GRAPHICS )
-
-// Runs well, minor GFX issues in intro
-CONS( 2017, sy889, 0, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "SY Corp", "SY-889 300 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2016, sy888b, 0, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "SY Corp", "SY-888B 288 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
-
+CONS( 200?, mc_dg101, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "dreamGEAR", "dreamGEAR 101 in 1", MACHINE_IMPERFECT_GRAPHICS ) // dreamGear, but no enhanced games?
+CONS( 200?, mc_aa2, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "100 in 1 Arcade Action II (AT-103)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_105te, 0, 0, nes_vt_8mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "2011 Super HiK 105 in 1 Turbo Edition", MACHINE_NOT_WORKING )
+CONS( 200?, mc_8x6cb, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "CoolBoy", "888888 in 1 (Coolboy AEF-390)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 200?, mc_9x6ss, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "999999 in 1 (PXP2 Slim Station)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_9x6sa, mc_9x6ss, 0, nes_vt_2mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "999999 in 1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_7x6ss, 0, 0, nes_vt_1mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "777777 in 1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 200?, mc_8x6ss, 0, 0, nes_vt_1mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "888888 in 1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2004, mc_dcat8, 0, 0, nes_vt_8mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "100 in 1 (D-CAT8 8bit Console, set 1) (v5.01.11-frd, BL 20041217)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2004, mc_dcat8a, mc_dcat8, 0, nes_vt_8mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "100 in 1 (D-CAT8 8bit Console, set 2)", MACHINE_IMPERFECT_GRAPHICS )
-// Same hardware as SY-889
-CONS( 201?, mc_cb280, 0, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "CoolBoy", "Coolboy RS-18 (280 in 1)", MACHINE_IMPERFECT_GRAPHICS )
// Runs well, only issues in SMB3 which crashes
-CONS( 2017, bittboy, 0, 0, nes_vt_bt, nes_vt, nes_vt_cy_state, empty_init, "BittBoy", "BittBoy Mini FC 300 in 1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2017, bittboy, 0, 0, nes_vt_bt_2x16mb, nes_vt, nes_vt_cy_state, empty_init, "BittBoy", "BittBoy Mini FC 300 in 1", MACHINE_IMPERFECT_GRAPHICS ) // has external banking (2x 16mbyte banks)
// Runs well, all games seem to work
-CONS( 201?, mc_89in1, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "89 in 1 Mini Game Console (060-92023011V1.0)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 201?, mc_89in1, 0, 0, nes_vt_4mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "89 in 1 Mini Game Console (060-92023011V1.0)", MACHINE_IMPERFECT_GRAPHICS )
// Broken GFX, investigate
-CONS( 201?, mc_pg150, 0, 0, nes_vt_bt, nes_vt, nes_vt_cy_state, empty_init, "<unknown>", "Pocket Games 150 in 1", MACHINE_NOT_WORKING )
+CONS( 201?, mc_pg150, 0, 0, nes_vt_bt_2x16mb, nes_vt, nes_vt_cy_state, empty_init, "<unknown>", "Pocket Games 150 in 1", MACHINE_NOT_WORKING ) // has external banking
// No title screen, but press start and menu and games run fine. Makes odd
// memory accesses which probably explain broken title screen
-CONS( 201?, mc_hh210, 0, 0, nes_vt_4k_ram, nes_vt, nes_vt_state, empty_init, "<unknown>", "Handheld 210 in 1", MACHINE_NOT_WORKING )
+CONS( 201?, mc_hh210, 0, 0, nes_vt_4k_ram_16mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Handheld 210 in 1", MACHINE_NOT_WORKING )
// First half of games don't work, probably bad dump
-CONS( 201?, dvnimbus, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "<unknown>", "DVTech Nimbus 176 in 1", MACHINE_NOT_WORKING )
+CONS( 201?, dvnimbus, 0, 0, nes_vt_vg_16mb, nes_vt, nes_vt_hh_state, empty_init, "<unknown>", "DVTech Nimbus 176 in 1", MACHINE_NOT_WORKING )
// Works fine, VT02 based
-CONS( 201?, mc_tv200, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "Thumbs Up", "200 in 1 Retro TV Game", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 201?, mc_tv200, 0, 0, nes_vt_8mb, nes_vt, nes_vt_state, empty_init, "Thumbs Up", "200 in 1 Retro TV Game", MACHINE_IMPERFECT_GRAPHICS )
// probably another Thumbs Up product? cursor doesn't work unless nes_vt_hh machine is used? possibly newer than VT02 as it runs from an SPI ROM, might just not use enhanced features. Some minor game name changes to above (eg Smackdown just becomes Wrestling)
-CONS( 201?, unkra200, mc_tv200, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "<unknown>", "200 in 1 Retro Arcade", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 201?, unkra200, mc_tv200, 0, nes_vt_hh_8mb, nes_vt, nes_vt_hh_state, empty_init, "<unknown>", "200 in 1 Retro Arcade", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2015, rminitv, 0, 0, nes_vt_fp_pal, nes_vt, nes_vt_hh_state, empty_init, "Orb Gaming", "Retro 'Mini TV' Console 300-in-1", MACHINE_IMPERFECT_GRAPHICS )
// available in a number of colours, with various brands, but likely all the same.
// This was a red coloured pad, contains various unlicensed bootleg reskinned NES game eg Blob Buster is a hack of Dig Dug 2 and there are also hacks of Xevious, Donkey Kong Jr, Donkey Kong 3 and many others.
-CONS( 201?, ppgc200g, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "<unknown>", "Plug & Play Game Controller with 200 Games (Supreme 200)", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 201?, ppgc200g, 0, 0, nes_vt_8mb, nes_vt, nes_vt_state, empty_init, "<unknown>", "Plug & Play Game Controller with 200 Games (Supreme 200)", MACHINE_IMPERFECT_GRAPHICS )
+
-// New platform with scrambled opcodes, same as DGUN-2561. Runs fine with minor GFX and sound issues in menu
-// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a GPIO
-CONS( 2016, fcpocket, 0, 0, nes_vt_fp, nes_vt_fp, nes_vt_hh_state, empty_init, "<unknown>", "FC Pocket 600 in 1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// Probably VT09 or similar
// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a ROM high address bit
// (which can also be overriden by GPIO)
-CONS( 2017, fapocket, 0, 0, nes_vt_fa, nes_vt_fa, nes_vt_dg_state, empty_init, "<unknown>", "Family Pocket 638 in 1", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2017, fapocket, 0, 0, nes_vt_fa_4x16mb, nes_vt_fa, nes_vt_dg_fapocket_state, empty_init, "<unknown>", "Family Pocket 638 in 1", MACHINE_IMPERFECT_GRAPHICS ) // has external banking (4x 16mbyte banks)
+
+
+CONS( 2017, otrail, 0, 0, nes_vt_dg_1mb, nes_vt, nes_vt_dg_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+
+CONS( 2005, senwld, 0, 0, nes_vt_senwld_512kb, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "Senario", "Win, Lose or Draw (Senario)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // needs RAM in banked space, Alpha display emulating, Touchpad emulating etc.
+
+
+
+// Runs well, minor GFX issues in intro
+CONS( 2017, sy889, 0, 0, nes_vt_hh_8mb, nes_vt, nes_vt_hh_state, empty_init, "SY Corp", "SY-889 300 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2016, sy888b, 0, 0, nes_vt_hh_4mb, nes_vt, nes_vt_hh_state, empty_init, "SY Corp", "SY-888B 288 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
+
+// Same hardware as SY-889
+CONS( 201?, mc_cb280, 0, 0, nes_vt_hh_4mb, nes_vt, nes_vt_hh_state, empty_init, "CoolBoy", "Coolboy RS-18 (280 in 1)", MACHINE_IMPERFECT_GRAPHICS )
// Plays intro music but then crashes. same hardware as SY-88x but uses more features
-CONS( 2016, mog_m320, 0, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
+CONS( 2016, mog_m320, 0, 0, nes_vt_hh_8mb, nes_vt, nes_vt_hh_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
-CONS( 2017, otrail, 0, 0, nes_vt_dg, nes_vt, nes_vt_dg_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2005, senwld, 0, 0, nes_vt_senwld, nes_vt, nes_vt_swap_op_d5_d6_state, empty_init, "Senario", "Win, Lose or Draw (Senario)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // needs RAM in banked space, Alpha display emulating, Touchpad emulating etc.
+// similar menus to above, but with opcode scrambling
+// palette issues in some games because they actually use the old VT style palette
+// but no way to switch?
+// some menu gfx broken, probably because this is a bad dump
+CONS( 2015, dgun2573, 0, 0, nes_vt_fp_32mb, nes_vt, nes_vt_hh_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 2015, rminitv, 0, 0, nes_vt_fp_pal_32mb, nes_vt, nes_vt_hh_state, empty_init, "Orb Gaming", "Retro 'Mini TV' Console 300-in-1", MACHINE_IMPERFECT_GRAPHICS ) // single 32Mbyte bank!
+// New platform with scrambled opcodes, same as DGUN-2561. Runs fine with minor GFX and sound issues in menu
+// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a GPIO
+CONS( 2016, fcpocket, 0, 0, nes_vt_fp_4x16mb, nes_vt_fp, nes_vt_hh_state, empty_init, "<unknown>", "FC Pocket 600 in 1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has external banking (2x 32mbyte banks)
diff --git a/src/mame/drivers/newbrain.cpp b/src/mame/drivers/newbrain.cpp
index 8bd827fb7c3..8504e93ba83 100644
--- a/src/mame/drivers/newbrain.cpp
+++ b/src/mame/drivers/newbrain.cpp
@@ -172,7 +172,7 @@ READ8_MEMBER( newbrain_state::iorq_r )
break;
case 2: // COP
- data = m_cop->microbus_rd(space, 0);
+ data = m_cop->microbus_rd();
break;
}
break;
@@ -215,7 +215,7 @@ WRITE8_MEMBER( newbrain_state::iorq_w )
break;
case 2: // COP
- m_cop->microbus_wr(space, offset, data);
+ m_cop->microbus_wr(data);
break;
case 3: // ENRG1
diff --git a/src/mame/drivers/news_r3k.cpp b/src/mame/drivers/news_r3k.cpp
new file mode 100644
index 00000000000..4fde0f4e98b
--- /dev/null
+++ b/src/mame/drivers/news_r3k.cpp
@@ -0,0 +1,523 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+/*
+ * Sony NEWS R3000 systems.
+ *
+ * Sources:
+ *
+ * TODO
+ * - graphics
+ * - sound
+ */
+
+#include "emu.h"
+
+#include "cpu/mips/mips1.h"
+
+// memory
+#include "machine/ram.h"
+
+// various hardware
+#include "machine/timekpr.h"
+#include "machine/z80scc.h"
+#include "machine/am79c90.h"
+#include "machine/upd765.h"
+#include "machine/dmac_0448.h"
+#include "machine/news_hid.h"
+#include "machine/cxd1185.h"
+
+// video
+#include "screen.h"
+
+// audio
+#include "sound/spkrdev.h"
+#include "speaker.h"
+
+// busses and connectors
+#include "machine/nscsi_bus.h"
+#include "bus/nscsi/cd.h"
+#include "bus/nscsi/hd.h"
+#include "bus/rs232/rs232.h"
+
+#include "imagedev/floppy.h"
+#include "formats/pc_dsk.h"
+
+#include "debugger.h"
+
+#define VERBOSE 0
+#include "logmacro.h"
+
+class news_r3k_state : public driver_device
+{
+public:
+ news_r3k_state(machine_config const &mconfig, device_type type, char const *tag)
+ : driver_device(mconfig, type, tag)
+ , m_cpu(*this, "cpu")
+ , m_ram(*this, "ram")
+ , m_dma(*this, "dma")
+ , m_rtc(*this, "rtc")
+ , m_scc(*this, "scc")
+ , m_net(*this, "net")
+ , m_fdc(*this, "fdc")
+ , m_lcd(*this, "lcd")
+ , m_hid(*this, "hid")
+ , m_scsi(*this, "scsi:7:cxd1185")
+ , m_serial(*this, "serial%u", 0U)
+ , m_scsibus(*this, "scsi")
+ , m_vram(*this, "vram")
+ , m_led(*this, "led%u", 0U)
+ {
+ }
+
+protected:
+ // driver_device overrides
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ // address maps
+ void cpu_map(address_map &map);
+
+ // machine config
+ void common(machine_config &config);
+
+public:
+ void nws3260(machine_config &config);
+
+ void init_common();
+
+protected:
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rectangle const &cliprect);
+
+ void inten_w(offs_t offset, u16 data, u16 mem_mask);
+ u16 inten_r() { return m_inten; }
+ u16 intst_r() { return m_intst; }
+ void intclr_w(offs_t offset, u16 data, u16 mem_mask);
+
+ enum irq_number : unsigned
+ {
+ EXT3 = 0,
+ EXT1 = 1,
+ SLOT3 = 2,
+ SLOT1 = 3,
+ DMA = 4,
+ LANCE = 5,
+ SCC = 6,
+ BEEP = 7,
+ CBSY = 8,
+ CFLT = 9,
+ MOUSE = 10,
+ KBD = 11,
+ TIMER = 12,
+ BERR = 13,
+ ABORT = 14,
+ PERR = 15,
+ };
+ template <irq_number Number> void irq_w(int state);
+ void int_check();
+
+ u32 bus_error();
+ void itimer_w(u8 data);
+ void itimer(void *ptr, s32 param);
+ u8 debug_r() { return m_debug; }
+ void debug_w(u8 data);
+
+ DECLARE_FLOPPY_FORMATS(floppy_formats);
+
+ // devices
+ required_device<r3000a_device> m_cpu;
+ required_device<ram_device> m_ram;
+ required_device<dmac_0448_device> m_dma;
+ required_device<m48t02_device> m_rtc;
+ required_device<z80scc_device> m_scc;
+ required_device<am7990_device> m_net;
+ required_device<upd72067_device> m_fdc;
+
+ required_device<screen_device> m_lcd;
+ required_device<news_hid_hle_device> m_hid;
+ required_device<cxd1185_device> m_scsi;
+
+ required_device_array<rs232_port_device, 2> m_serial;
+ required_device<nscsi_bus_device> m_scsibus;
+
+ required_shared_ptr<u32> m_vram;
+ output_finder<4> m_led;
+
+ std::unique_ptr<u16[]> m_net_ram;
+
+ emu_timer *m_itimer;
+
+ u16 m_inten;
+ u16 m_intst;
+ u8 m_debug;
+
+ static unsigned const NUM_INT = 4;
+ bool m_int_state[NUM_INT];
+};
+
+FLOPPY_FORMATS_MEMBER(news_r3k_state::floppy_formats)
+ FLOPPY_PC_FORMAT
+FLOPPY_FORMATS_END
+
+void news_r3k_state::machine_start()
+{
+ m_led.resolve();
+
+ m_net_ram = std::make_unique<u16[]>(8192);
+
+ m_itimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(news_r3k_state::itimer), this));
+
+ for (bool &int_state : m_int_state)
+ int_state = false;
+}
+
+void news_r3k_state::machine_reset()
+{
+}
+
+void news_r3k_state::init_common()
+{
+ // map the configured ram
+ m_cpu->space(0).install_ram(0x00000000, m_ram->mask(), m_ram->pointer());
+
+ // HACK: hardwire the rate until fdc is better understood
+ m_fdc->set_rate(500000);
+
+ // HACK: signal floppy density?
+ m_scsi->port_w(0x02);
+}
+
+void news_r3k_state::cpu_map(address_map &map)
+{
+ map(0x08000000, 0x080fffff).ram().share("vram");
+
+ // FIXME: silence a lot of unhandled graphics addresses
+ map(0x187702b0, 0x187702b3).nopw().umask32(0xffff);
+ map(0x187c0000, 0x187c0003).nopw(); // palette?
+ map(0x187e0000, 0x187e000f).nopw(); // lcdc?
+ map(0x18f702b0, 0x18f702b3).nopw().umask32(0xffff);
+ map(0x18fc0000, 0x18fc0003).nopw(); // palette?
+ map(0x18fe0000, 0x18fe0003).nopw(); // lcdc?
+
+ // respond to absent hardware probes
+ // 0x18500000 lcdc?
+ map(0x18600000, 0x186fffff).r(FUNC(news_r3k_state::bus_error)); // ??
+ map(0x18780000, 0x18780003).r(FUNC(news_r3k_state::bus_error)); // nwb-225
+ map(0x18c30000, 0x18c30003).r(FUNC(news_r3k_state::bus_error)); // second lance (ram at 18c20000, id at 18c38000)
+ map(0x18c40000, 0x18c40003).r(FUNC(news_r3k_state::bus_error)); // second scc
+ map(0x18c40004, 0x18c40007).r(FUNC(news_r3k_state::bus_error)); // third scc
+ //map(0x18c40100, 0x18c40118); // scc #1-#4 port/status
+ map(0x18c70000, 0x18c70003).r(FUNC(news_r3k_state::bus_error)); // third lance (ram at 18c60000, id at 18c78000)
+ map(0x18e00000, 0x18e00003).r(FUNC(news_r3k_state::bus_error)); // nwb-252/nwb-253 crt
+ map(0x18ff0000, 0x18ff0003).r(FUNC(news_r3k_state::bus_error)); // nwb-252/nwb-253 ctrl
+
+ map(0x1fc00000, 0x1fc1ffff).rom().region("eprom", 0);
+ //map(0x1fc40004, 0x1fc40004).w().umask32(0xff); ??
+ // 1fc40007 // powreb?
+ map(0x1fc80000, 0x1fc80001).rw(FUNC(news_r3k_state::inten_r), FUNC(news_r3k_state::inten_w));
+ map(0x1fc80002, 0x1fc80003).r(FUNC(news_r3k_state::intst_r));
+ map(0x1fc80004, 0x1fc80005).w(FUNC(news_r3k_state::intclr_w));
+ map(0x1fc80006, 0x1fc80006).w(FUNC(news_r3k_state::itimer_w));
+
+ // 1fcc0000 // cstrobe?
+ // 1fcc0002 // sccstatus0?
+ map(0x1fcc0003, 0x1fcc0003).rw(FUNC(news_r3k_state::debug_r), FUNC(news_r3k_state::debug_w));
+ // 1fcc0007 // sccvect?
+
+ map(0x1fd00000, 0x1fd00007).m(m_hid, FUNC(news_hid_hle_device::map));
+ map(0x1fd40000, 0x1fd40003).noprw(); // FIXME: ignore buzzer for now
+
+ map(0x1fe00000, 0x1fe0000f).m(m_dma, FUNC(dmac_0448_device::map));
+ map(0x1fe00100, 0x1fe0010f).m(m_scsi, FUNC(cxd1185_device::map));
+ map(0x1fe00200, 0x1fe00203).m(m_fdc, FUNC(upd72067_device::map));
+ map(0x1fe00300, 0x1fe00300).lr8([]() { return 0xff; }, "sound_r"); // HACK: disable sound
+ //map(0x1fe00300, 0x1fe00307); // sound
+ map(0x1fe40000, 0x1fe40003).portr("SW2");
+ //map(0x1fe70000, 0x1fe9ffff).ram(); // ??
+ map(0x1fe80000, 0x1fe800ff).rom().region("idrom", 0).mirror(0x0003ff00);
+ map(0x1fec0000, 0x1fec0003).rw(m_scc, FUNC(z80scc_device::ab_dc_r), FUNC(z80scc_device::ab_dc_w));
+
+ map(0x1ff40000, 0x1ff407ff).rw(m_rtc, FUNC(m48t02_device::read), FUNC(m48t02_device::write));
+ map(0x1ff50000, 0x1ff50003).r(FUNC(news_r3k_state::bus_error)); // lfbm?
+ map(0x1ff80000, 0x1ff80003).rw(m_net, FUNC(am7990_device::regs_r), FUNC(am7990_device::regs_w));
+ map(0x1ffc0000, 0x1ffc3fff).lrw16(
+ [this](offs_t offset) { return m_net_ram[offset]; }, "net_ram_r",
+ [this](offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_net_ram[offset]); }, "net_ram_w");
+}
+
+static INPUT_PORTS_START(nws3260)
+ PORT_START("SW2")
+ // TODO: other combinations of switches 1-3 may be valid
+ PORT_DIPNAME(0x07000000, 0x02000000, "Display") PORT_DIPLOCATION("SW2:1,2,3")
+ PORT_DIPSETTING(0x00000000, "Console")
+ PORT_DIPSETTING(0x02000000, "LCD")
+ PORT_DIPNAME(0x08000000, 0x00000000, "Boot Device") PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING(0x00000000, "Disk")
+ PORT_DIPSETTING(0x08000000, "Network")
+ PORT_DIPNAME(0x10000000, 0x00000000, "Automatic Boot") PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING(0x00000000, DEF_STR(Off))
+ PORT_DIPSETTING(0x10000000, DEF_STR(On))
+ PORT_DIPNAME(0x20000000, 0x00000000, "Diagnostic Mode") PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING(0x00000000, DEF_STR(Off))
+ PORT_DIPSETTING(0x20000000, DEF_STR(On))
+ // TODO: not completely clear what this switch does
+ PORT_DIPNAME(0x40000000, 0x00000000, "RAM") PORT_DIPLOCATION("SW2:7")
+ PORT_DIPSETTING(0x00000000, "Enabled")
+ PORT_DIPSETTING(0x40000000, "Disabled")
+ PORT_DIPNAME(0x80000000, 0x00000000, "Console Baud") PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING(0x00000000, "9600")
+ PORT_DIPSETTING(0x80000000, "1200")
+
+ PORT_START("SW3")
+ 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)
+INPUT_PORTS_END
+
+u32 news_r3k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rectangle const &cliprect)
+{
+ u32 *pixel_pointer = m_vram;
+
+ for (int y = screen.visible_area().min_y; y <= screen.visible_area().max_y; y++)
+ {
+ for (int x = screen.visible_area().min_x; x <= screen.visible_area().max_x; x += 4)
+ {
+ u32 const pixel_data = *pixel_pointer++;
+
+ bitmap.pix(y, x + 0) = u8(pixel_data >> 24) ? rgb_t::white() : rgb_t::black();
+ bitmap.pix(y, x + 1) = u8(pixel_data >> 16) ? rgb_t::white() : rgb_t::black();
+ bitmap.pix(y, x + 2) = u8(pixel_data >> 8) ? rgb_t::white() : rgb_t::black();
+ bitmap.pix(y, x + 3) = u8(pixel_data >> 0) ? rgb_t::white() : rgb_t::black();
+ }
+ }
+
+ return 0;
+}
+
+void news_r3k_state::inten_w(offs_t offset, u16 data, u16 mem_mask)
+{
+ COMBINE_DATA(&m_inten);
+
+ int_check();
+}
+
+template <news_r3k_state::irq_number Number> void news_r3k_state::irq_w(int state)
+{
+ LOG("irq number %d state %d\n", Number, state);
+
+ if (state)
+ m_intst |= 1U << Number;
+ else
+ m_intst &= ~(1U << Number);
+
+ int_check();
+}
+
+void news_r3k_state::intclr_w(offs_t offset, u16 data, u16 mem_mask)
+{
+ m_intst &= ~(data & mem_mask);
+
+ int_check();
+}
+
+void news_r3k_state::int_check()
+{
+ // TODO: assume 44422222 11100000
+ static int const int_line[] = { INPUT_LINE_IRQ0, INPUT_LINE_IRQ1, INPUT_LINE_IRQ2, INPUT_LINE_IRQ4 };
+ static u16 const int_mask[] = { 0x001f, 0x00e0, 0x1f00, 0xe000 };
+
+ for (unsigned i = 0; i < NUM_INT; i++)
+ {
+ bool const int_state = m_intst & m_inten & int_mask[i];
+
+ if (m_int_state[i] != int_state)
+ {
+ m_int_state[i] = int_state;
+ m_cpu->set_input_line(int_line[i], int_state);
+ }
+ }
+}
+
+u32 news_r3k_state::bus_error()
+{
+ if (!machine().side_effects_disabled())
+ irq_w<BERR>(ASSERT_LINE);
+
+ return 0;
+}
+
+void news_r3k_state::itimer_w(u8 data)
+{
+ LOG("itimer_w 0x%02x (%s)\n", data, machine().describe_context());
+
+ // TODO: assume 0xff stops the timer
+ u8 const ticks = data + 1;
+
+ m_itimer->adjust(attotime::from_ticks(ticks, 800), 0, attotime::from_ticks(ticks, 800));
+}
+
+void news_r3k_state::itimer(void *ptr, s32 param)
+{
+ irq_w<TIMER>(ASSERT_LINE);
+}
+
+void news_r3k_state::debug_w(u8 data)
+{
+ /*
+ * The low four bits of this register control the diagnostic LEDs labelled 1-4
+ * with bit 0 correspondig to LED #1, and a 0 value enabling the LED. A non-
+ * exhaustive list of diagnostic codes produced by the PROM follows:
+ *
+ * 4321 Stage
+ * ...x EPROM checksum
+ * ..x. NVRAM test (byte)
+ * ..xx NVRAM test (word)
+ * .x.. NVRAM test (dword)
+ * .x.x read dip-switch SW2
+ * .xx. write test 0x1fe70000-1fe9ffff?
+ * .xxx address decode
+ * x... NVRAM test (dword)
+ * x..x RAM sizing
+ * x.x. inventory/boot
+ *
+ */
+ LOG("debug_w 0x%02x (%s)\n", data, machine().describe_context());
+
+ for (unsigned i = 0; i < 4; i++)
+ if (BIT(data, i + 4))
+ m_led[i] = BIT(data, i);
+
+ m_debug = data;
+}
+
+static void news_scsi_devices(device_slot_interface &device)
+{
+ device.option_add("harddisk", NSCSI_HARDDISK);
+ device.option_add("cdrom", NSCSI_CDROM);
+}
+
+void news_r3k_state::common(machine_config &config)
+{
+ R3000A(config, m_cpu, 20_MHz_XTAL, 32768, 32768);
+ m_cpu->set_addrmap(AS_PROGRAM, &news_r3k_state::cpu_map);
+ m_cpu->set_fpu(mips1_device_base::MIPS_R3010Av4);
+
+ // 3 banks of 4x30-pin SIMMs with parity, first bank is soldered
+ RAM(config, m_ram);
+ m_ram->set_default_size("16M");
+ // TODO: confirm each bank supports 4x1M or 4x4M
+ m_ram->set_extra_options("4M,8M,12M,20M,24M,32M,36M,48M");
+
+ DMAC_0448(config, m_dma, 0);
+ m_dma->set_bus(m_cpu, 0);
+ m_dma->out_int_cb().set(FUNC(news_r3k_state::irq_w<DMA>));
+ m_dma->dma_r_cb<1>().set(m_fdc, FUNC(upd72067_device::dma_r));
+ m_dma->dma_w_cb<1>().set(m_fdc, FUNC(upd72067_device::dma_w));
+ // TODO: channel 2 audio
+ // TODO: channel 3 video
+
+ M48T02(config, m_rtc);
+
+ SCC85C30(config, m_scc, 4.9152_MHz_XTAL);
+ m_scc->out_int_callback().set(FUNC(news_r3k_state::irq_w<SCC>));
+
+ // scc channel A
+ RS232_PORT(config, m_serial[0], default_rs232_devices, nullptr);
+ m_serial[0]->cts_handler().set(m_scc, FUNC(z80scc_device::ctsa_w));
+ m_serial[0]->dcd_handler().set(m_scc, FUNC(z80scc_device::dcda_w));
+ m_serial[0]->rxd_handler().set(m_scc, FUNC(z80scc_device::rxa_w));
+ m_scc->out_rtsa_callback().set(m_serial[0], FUNC(rs232_port_device::write_rts));
+ m_scc->out_txda_callback().set(m_serial[0], FUNC(rs232_port_device::write_txd));
+
+ // scc channel B
+ RS232_PORT(config, m_serial[1], default_rs232_devices, nullptr);
+ m_serial[1]->cts_handler().set(m_scc, FUNC(z80scc_device::ctsb_w));
+ m_serial[1]->dcd_handler().set(m_scc, FUNC(z80scc_device::dcdb_w));
+ m_serial[1]->rxd_handler().set(m_scc, FUNC(z80scc_device::rxb_w));
+ m_scc->out_rtsb_callback().set(m_serial[1], FUNC(rs232_port_device::write_rts));
+ m_scc->out_txdb_callback().set(m_serial[1], FUNC(rs232_port_device::write_txd));
+
+ AM7990(config, m_net);
+ m_net->intr_out().set(FUNC(news_r3k_state::irq_w<LANCE>)).invert();
+ m_net->dma_in().set([this](offs_t offset) { return m_net_ram[offset >> 1]; });
+ m_net->dma_out().set([this](offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_net_ram[offset >> 1]); });
+
+ UPD72067(config, m_fdc, 16_MHz_XTAL);
+ m_fdc->intrq_wr_callback().set(m_dma, FUNC(dmac_0448_device::irq<1>));
+ m_fdc->drq_wr_callback().set(m_dma, FUNC(dmac_0448_device::drq<1>));
+ FLOPPY_CONNECTOR(config, "fdc:0", "35hd", FLOPPY_35_HD, true, floppy_formats).enable_sound(false);
+
+ // scsi bus and devices
+ NSCSI_BUS(config, m_scsibus);
+ // inquiry content for hard disk is "HITACHI DK312C CS01"
+ NSCSI_CONNECTOR(config, "scsi:0", news_scsi_devices, "harddisk");
+ NSCSI_CONNECTOR(config, "scsi:1", news_scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:2", news_scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:3", news_scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:4", news_scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:5", news_scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:6", news_scsi_devices, nullptr);
+
+ // scsi host adapter
+ NSCSI_CONNECTOR(config, "scsi:7").option_set("cxd1185", CXD1185).clock(16_MHz_XTAL).machine_config(
+ [this](device_t *device)
+ {
+ cxd1185_device &adapter = downcast<cxd1185_device &>(*device);
+
+ adapter.irq_out_cb().set(m_dma, FUNC(dmac_0448_device::irq<0>));
+ adapter.drq_out_cb().set(m_dma, FUNC(dmac_0448_device::drq<0>));
+ adapter.port_out_cb().set(
+ [this](u8 data)
+ {
+ LOG("floppy %s\n", BIT(data, 0) ? "mount" : "eject");
+ });
+
+ subdevice<dmac_0448_device>(":dma")->dma_r_cb<0>().set(adapter, FUNC(cxd1185_device::dma_r));
+ subdevice<dmac_0448_device>(":dma")->dma_w_cb<0>().set(adapter, FUNC(cxd1185_device::dma_w));
+ });
+
+ /*
+ * FIXME: the screen is supposed to be an 1120x780 monochrome (black/white)
+ * LCD, with an HD64646FS LCD controller. The boot prom is happy if we just
+ * ignore the LCDC and pretend the screen is 1024 pixels wide. NEWS-OS
+ * should detect LCD-MONO 1120x780 1 plane; X server changes mode but probe
+ * and mode change method isn't understood yet.
+ */
+ SCREEN(config, m_lcd, SCREEN_TYPE_LCD);
+ m_lcd->set_raw(47185920, 1024, 0, 1024, 768, 0, 768);
+ m_lcd->set_screen_update(FUNC(news_r3k_state::screen_update));
+
+ NEWS_HID_HLE(config, m_hid);
+ m_hid->irq_out<news_hid_hle_device::KEYBOARD>().set(FUNC(news_r3k_state::irq_w<KBD>));
+ m_hid->irq_out<news_hid_hle_device::MOUSE>().set(FUNC(news_r3k_state::irq_w<MOUSE>));
+}
+
+void news_r3k_state::nws3260(machine_config &config)
+{
+ common(config);
+}
+
+ROM_START(nws3260)
+ ROM_REGION32_BE(0x20000, "eprom", 0)
+ ROM_SYSTEM_BIOS(0, "nws3260", "NWS-3260 v2.0A")
+ ROMX_LOAD("mpu-16__ver.2.0a__1990_sony.ic64", 0x00000, 0x20000, CRC(61222991) SHA1(076fab0ad0682cd7dacc7094e42efe8558cbaaa1), ROM_BIOS(0))
+
+ /*
+ * This is probably a 4-bit device: only the low 4 bits in each location
+ * are used, and are merged together into bytes when copied into RAM, with
+ * the most-significant bits at the lower address. The sum of resulting
+ * big-endian 32-bit words must be zero.
+ *
+ * offset purpose
+ * 0x00 magic number (0x0f 0x0f)
+ * 0x10 ethernet mac address (low 4 bits of 12 bytes)
+ * 0x28 machine identification (low 4 bits of 8 bytes)
+ * 0x60 model number (null-terminated string)
+ */
+ ROM_REGION32_BE(0x100, "idrom", 0)
+ ROM_LOAD("idrom.bin", 0x000, 0x100, CRC(17a3d9c6) SHA1(d300e6908210f540951211802c38ad7f8037aa15) BAD_DUMP)
+ROM_END
+
+/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
+COMP(1991, nws3260, 0, 0, nws3260, nws3260, news_r3k_state, init_common, "Sony", "NWS-3260", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND)
diff --git a/src/mame/drivers/nforcepc.cpp b/src/mame/drivers/nforcepc.cpp
index 2d4c21dcede..afa0ff16c86 100644
--- a/src/mame/drivers/nforcepc.cpp
+++ b/src/mame/drivers/nforcepc.cpp
@@ -907,12 +907,12 @@ void it8703f_device::map_lpt(address_map& map)
READ8_MEMBER(it8703f_device::lpt_read)
{
- return pc_lpt_lptdev->read(space, offset, mem_mask);
+ return pc_lpt_lptdev->read(offset);
}
WRITE8_MEMBER(it8703f_device::lpt_write)
{
- pc_lpt_lptdev->write(space, offset, data, mem_mask);
+ pc_lpt_lptdev->write(offset, data);
}
void it8703f_device::map_lpt_addresses()
@@ -977,7 +977,7 @@ READ8_MEMBER(it8703f_device::at_keybc_r)
switch (offset) //m_kbdc
{
case 0:
- return m_kbdc->data_r(space, 0);
+ return m_kbdc->data_r(0);
}
return 0xff;
@@ -988,18 +988,18 @@ WRITE8_MEMBER(it8703f_device::at_keybc_w)
switch (offset)
{
case 0:
- m_kbdc->data_w(space, 0, data);
+ m_kbdc->data_w(0, data);
}
}
READ8_MEMBER(it8703f_device::keybc_status_r)
{
- return m_kbdc->data_r(space, 4);
+ return m_kbdc->data_r(4);
}
WRITE8_MEMBER(it8703f_device::keybc_command_w)
{
- m_kbdc->data_w(space, 4, data);
+ m_kbdc->data_w(4, data);
}
void it8703f_device::map_keyboard_addresses()
diff --git a/src/mame/drivers/nibble.cpp b/src/mame/drivers/nibble.cpp
index f9b41fa9fd0..dfe35d1767b 100644
--- a/src/mame/drivers/nibble.cpp
+++ b/src/mame/drivers/nibble.cpp
@@ -336,7 +336,7 @@ GFXDECODE_END
void nibble_state::nibble(machine_config &config)
{
- UPD7811(config, m_maincpu, MASTER_CLOCK); // type guessed; clock not verified
+ UPD78C11(config, m_maincpu, MASTER_CLOCK); // type guessed; clock not verified
m_maincpu->set_addrmap(AS_PROGRAM, &nibble_state::nibble_map);
//m_maincpu->set_vblank_int("screen", FUNC(nibble_state::nibble_interrupt));
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index ce90a961847..1ee3acb0569 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -1286,7 +1286,7 @@ void nmk16_state::bjtwin_map(address_map &map)
map(0x084020, 0x08402f).w("nmk112", FUNC(nmk112_device::okibank_w)).umask16(0x00ff);
map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x094001, 0x094001).w(FUNC(nmk16_state::tilebank_w));
- map(0x094002, 0x094003).nopw(); /* IRQ enable? */
+ map(0x094003, 0x094003).w(FUNC(nmk16_state::bjtwin_scroll_w)); // sabotenb specific?
map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0");
map(0x0f0000, 0x0fffff).ram().share("mainram");
}
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index a29e62c1d34..f7baa3bfd9d 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -163,11 +163,11 @@ private:
// screen
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
// basic io
- DECLARE_WRITE16_MEMBER(IPConReg_w);
+ void IPConReg_w(uint16_t data);
DECLARE_WRITE16_MEMBER(EPConReg_w);
- DECLARE_WRITE16_MEMBER(FIFOReg_w);
+ void FIFOReg_w(uint16_t data);
DECLARE_WRITE16_MEMBER(FIFOBus_w);
- DECLARE_WRITE16_MEMBER(DiskReg_w);
+ void DiskReg_w(uint16_t data);
DECLARE_WRITE16_MEMBER(LoadDispAddr_w);
// uarts
@@ -310,7 +310,7 @@ uint32_t notetaker_state::screen_update(screen_device &screen, bitmap_ind16 &bit
return 0;
}
-WRITE16_MEMBER(notetaker_state::IPConReg_w)
+void notetaker_state::IPConReg_w(uint16_t data)
{
m_BootSeqDone = (data&0x80)?1:0;
m_ProcLock = (data&0x40)?1:0; // bus lock for this processor (hold other processor in wait state)
@@ -363,7 +363,7 @@ WRITE16_MEMBER( notetaker_state::KeyChipReset_w )
}
/* FIFO (DAC) Stuff and ADC stuff */
-WRITE16_MEMBER(notetaker_state::FIFOReg_w)
+void notetaker_state::FIFOReg_w(uint16_t data)
{
m_SetSH = (data&0x8000)?1:0;
m_SHConA = (data&0x4000)?1:0;
@@ -397,7 +397,7 @@ WRITE16_MEMBER(notetaker_state::FIFOBus_w)
m_outfifo_head_ptr&=0xF;
}
-WRITE16_MEMBER( notetaker_state::DiskReg_w )
+void notetaker_state::DiskReg_w(uint16_t data)
{
/* See http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19781023_More_NoteTaker_IO_Information.pdf
but note that bit 12 (called bit 3 in documentation) was changed between
@@ -793,14 +793,14 @@ void notetaker_state::iop_reset()
m_eiauart->write_xr(0); // MR - pin 21
m_eiauart->write_xr(1); // ''
// reset the IPConReg ls273 latch at #f1
- IPConReg_w(m_iop_cpu->space(AS_PROGRAM), 0, 0x0000, 0xffff);
+ IPConReg_w(0x0000);
// Clear the DAC FIFO
for (int i=0; i<16; i++) m_outfifo[i] = 0;
m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0;
// reset the FIFOReg latch at #h9
- FIFOReg_w(m_iop_cpu->space(AS_PROGRAM), 0, 0x0000, 0xffff);
+ FIFOReg_w(0x0000);
// reset the DiskReg latches at #c4 and #b4 on the disk/display/eia controller board
- DiskReg_w(m_iop_cpu->space(AS_PROGRAM), 0, 0x0000, 0xffff);
+ DiskReg_w(0x0000);
// reset the framebuffer display address counter:
m_DispAddr = 0;
}
diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp
index 342521c4536..e18a3675cea 100644
--- a/src/mame/drivers/nss.cpp
+++ b/src/mame/drivers/nss.cpp
@@ -353,12 +353,10 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
DECLARE_WRITE_LINE_MEMBER(nss_vblank_irq);
- DECLARE_READ8_MEMBER(spc_ram_100_r);
- DECLARE_WRITE8_MEMBER(spc_ram_100_w);
void bios_io_map(address_map &map);
void bios_map(address_map &map);
void snes_map(address_map &map);
- void spc_mem(address_map &map);
+ void spc_map(address_map &map);
};
@@ -374,25 +372,13 @@ uint32_t nss_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap,
void nss_state::snes_map(address_map &map)
{
map(0x000000, 0x7dffff).rw(FUNC(nss_state::snes_r_bank1), FUNC(nss_state::snes_w_bank1));
- map(0x7e0000, 0x7fffff).ram(); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
+ map(0x7e0000, 0x7fffff).ram().share("wram"); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
map(0x800000, 0xffffff).rw(FUNC(nss_state::snes_r_bank2), FUNC(nss_state::snes_w_bank2)); /* Mirror and ROM */
}
-READ8_MEMBER(nss_state::spc_ram_100_r)
+void nss_state::spc_map(address_map &map)
{
- return m_spc700->spc_ram_r(offset + 0x100);
-}
-
-WRITE8_MEMBER(nss_state::spc_ram_100_w)
-{
- m_spc700->spc_ram_w(offset + 0x100, data);
-}
-
-void nss_state::spc_mem(address_map &map)
-{
- map(0x0000, 0x00ef).rw(m_spc700, FUNC(snes_sound_device::spc_ram_r), FUNC(snes_sound_device::spc_ram_w)); /* lower 32k ram */
- map(0x00f0, 0x00ff).rw(m_spc700, FUNC(snes_sound_device::spc_io_r), FUNC(snes_sound_device::spc_io_w)); /* spc io */
- map(0x0100, 0xffff).rw(FUNC(nss_state::spc_ram_100_r), FUNC(nss_state::spc_ram_100_w));
+ map(0x0000, 0xffff).ram().share("aram");
}
/* NSS specific */
@@ -577,7 +563,7 @@ WRITE8_MEMBER(nss_state::port_01_w)
---- ---x Maybe SNES CPU/PPU reset? (0=Reset, 1=Run)
*/
m_input_disabled = BIT(data, 7) ^ 1;
- m_spc700->set_volume((data & 0x20) ? 0.0 : 100.0);
+ m_s_dsp->set_volume((data & 0x20) ? 0.0 : 100.0);
m_cart_sel = (data & 0xc) >> 2;
@@ -587,7 +573,7 @@ WRITE8_MEMBER(nss_state::port_01_w)
m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
/* also reset the device */
if (!(data & 1))
- m_spc700->reset();
+ m_s_dsp->reset();
}
WRITE8_MEMBER(nss_state::port_02_w)
@@ -839,8 +825,10 @@ void nss_state::nss(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &nss_state::snes_map);
// runs at 24.576 MHz / 12 = 2.048 MHz
- SPC700(config, m_soundcpu, XTAL(24'576'000) / 12);
- m_soundcpu->set_addrmap(AS_PROGRAM, &nss_state::spc_mem);
+ S_SMP(config, m_soundcpu, XTAL(24'576'000) / 12);
+ m_soundcpu->set_addrmap(AS_DATA, &nss_state::spc_map);
+ m_soundcpu->dsp_io_read_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_r));
+ m_soundcpu->dsp_io_write_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_w));
config.set_perfect_quantum(m_maincpu);
@@ -857,9 +845,11 @@ void nss_state::nss(machine_config &config)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- SNES_SOUND(config, m_spc700, XTAL(24'576'000) / 12);
- m_spc700->add_route(0, "lspeaker", 1.00);
- m_spc700->add_route(1, "rspeaker", 1.00);
+
+ S_DSP(config, m_s_dsp, XTAL(24'576'000) / 12);
+ m_s_dsp->set_addrmap(0, &nss_state::spc_map);
+ m_s_dsp->add_route(0, "lspeaker", 1.00);
+ m_s_dsp->add_route(1, "rspeaker", 1.00);
/* video hardware */
/* TODO: the screen should actually superimpose, but for the time being let's just separate outputs */
@@ -892,8 +882,6 @@ void nss_state::nss(machine_config &config)
***************************************************************************/
#define NSS_BIOS \
- ROM_REGION(0x100, "sound_ipl", 0) /* IPL ROM */ \
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) \
ROM_REGION(0x8000, "bios", 0) /* Bios CPU */ \
ROM_SYSTEM_BIOS( 0, "single", "Nintendo Super System (Single Cart BIOS)" ) \
ROMX_LOAD("nss-ic14.02.ic14", 0x00000, 0x8000, CRC(e06cb58f) SHA1(62f507e91a2797919a78d627af53f029c7d81477), ROM_BIOS(0) ) /* bios */ \
diff --git a/src/mame/drivers/nyny.cpp b/src/mame/drivers/nyny.cpp
index 39cb9e8246b..5a944c1c75a 100644
--- a/src/mame/drivers/nyny.cpp
+++ b/src/mame/drivers/nyny.cpp
@@ -145,7 +145,7 @@ private:
DECLARE_WRITE8_MEMBER(audio_1_command_w);
DECLARE_WRITE8_MEMBER(audio_1_answer_w);
- DECLARE_WRITE8_MEMBER(audio_2_command_w);
+ void audio_2_command_w(uint8_t data);
DECLARE_READ8_MEMBER(nyny_pia_1_2_r);
DECLARE_WRITE8_MEMBER(nyny_pia_1_2_w);
DECLARE_WRITE_LINE_MEMBER(main_cpu_irq);
@@ -233,7 +233,7 @@ WRITE8_MEMBER(nyny_state::pia_2_port_b_w)
m_star_enable = data & 0x10;
/* bits 5-7 go to the music board connector */
- audio_2_command_w(m_maincpu->space(AS_PROGRAM), 0, data & 0xe0);
+ audio_2_command_w(data & 0xe0);
}
@@ -396,7 +396,7 @@ WRITE8_MEMBER(nyny_state::nyny_ay8910_37_port_a_w)
*
*************************************/
-WRITE8_MEMBER(nyny_state::audio_2_command_w)
+void nyny_state::audio_2_command_w(uint8_t data)
{
m_soundlatch2->write((data & 0x60) >> 5);
m_audiocpu2->set_input_line(M6802_IRQ_LINE, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE);
diff --git a/src/mame/drivers/oneshot.cpp b/src/mame/drivers/oneshot.cpp
index 59c379c77af..a3e8aa41971 100644
--- a/src/mame/drivers/oneshot.cpp
+++ b/src/mame/drivers/oneshot.cpp
@@ -114,13 +114,6 @@ For One Shot One Kill:
chip appears to be unpopulated for One Shot One Kill.
The ROM board for One Shot One Kill has 8 additional logic chips along the front edge of the PCB
-For Mad Donna:
- At least one PCB (in an eBay auction) has shown original ROM labels as:
- MADDONNA
- TMAD_B15 (B15 being the PCB location of ROM)
- 160595 (Date, IE: May 16th, 1995)
-
- It has NOT be verified as to which set this corresponds to or if this set had been dumped.
Clock measurements:
SCN68000C8N64: 12MHz
@@ -526,23 +519,30 @@ ROM_START( oneshot )
ROM_LOAD( "1shot.mb", 0x00000, 0x10000, CRC(6b213183) SHA1(599c59d155d11edb151bfaed1d24ef964462a447) ) // motherboard rom, unknown purpose
ROM_END
+/*
+For this set of Mad Donna, original ROM labels follow this format:
+ MADDONNA
+ TMAD_B15 (B15 being the PCB location of ROM)
+ 160595 (Date, IE: May 16th, 1995)
+*/
ROM_START( maddonna )
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 Code */
- ROM_LOAD16_BYTE( "maddonna.b16", 0x00000, 0x20000, CRC(643f9054) SHA1(77907ecdb02a525f9beed7fee203431eda16c831) )
- ROM_LOAD16_BYTE( "maddonna.b15", 0x00001, 0x20000, CRC(e36c0e26) SHA1(f261b2c74eeca05df302aa4956f5d02121d42054) )
+ ROM_LOAD16_BYTE( "maddonna_tmad_b16_160595.ua24", 0x00000, 0x20000, CRC(643f9054) SHA1(77907ecdb02a525f9beed7fee203431eda16c831) )
+ ROM_LOAD16_BYTE( "maddonna_tmad_b15_160595.ua22", 0x00001, 0x20000, CRC(e36c0e26) SHA1(f261b2c74eeca05df302aa4956f5d02121d42054) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* Z80 Code */
- ROM_LOAD( "x13.ua2", 0x00000, 0x010000, CRC(f2080071) SHA1(68cbae9559879b2dc19c41a7efbd13ab4a569d3f) ) // b13
+ ROM_LOAD( "maddonna_tmad_b13_160595.ua2", 0x00000, 0x010000, CRC(f2080071) SHA1(68cbae9559879b2dc19c41a7efbd13ab4a569d3f) )
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
- ROM_LOAD( "maddonna.b5", 0x000000, 0x080000, CRC(838d3244) SHA1(7339143481ec043219825f282450ff53bb718f8c) )
- ROM_LOAD( "maddonna.b7", 0x080000, 0x080000, CRC(4920d2ec) SHA1(e72a374bca81ffa4f925326455e007df7227ae08) )
- ROM_LOAD( "maddonna.b9", 0x100000, 0x080000, CRC(3a8a3feb) SHA1(832654902963c163644134431fd1221e1895cfec) )
- ROM_LOAD( "maddonna.b11", 0x180000, 0x080000, CRC(6f9b7fdf) SHA1(14ced1d43eae3b6db4a0a4c12fb26cbd13eb7428) )
- ROM_LOAD( "maddonna.b6", 0x200000, 0x080000, CRC(b02e9e0e) SHA1(6e527a2bfda0f4f420c10139c75dac2704e08d08) )
- ROM_LOAD( "maddonna.b8", 0x280000, 0x080000, CRC(03f1de40) SHA1(bb0c0525155404c0740ac5f048f71ae7651a5941) )
- ROM_LOAD( "maddonna.b10", 0x300000, 0x080000, CRC(87936423) SHA1(dda42f3685427edad7686d9712ff07d2fd9bf57e) )
- ROM_LOAD( "maddonna.b12", 0x380000, 0x080000, CRC(879ab23c) SHA1(5288016542a10e60ccb28a930d8dfe4db41c6fc6) )
+ ROM_LOAD( "maddonna_tmad_b5_160595.ui16a", 0x000000, 0x080000, CRC(838d3244) SHA1(7339143481ec043219825f282450ff53bb718f8c) )
+ ROM_LOAD( "maddonna_tmad_b7_160595.ui13a", 0x080000, 0x080000, CRC(4920d2ec) SHA1(e72a374bca81ffa4f925326455e007df7227ae08) )
+ ROM_LOAD( "maddonna_tmad_b9_160595.ui11a", 0x100000, 0x080000, CRC(3a8a3feb) SHA1(832654902963c163644134431fd1221e1895cfec) )
+ ROM_LOAD( "maddonna_tmad_b11_160595.ui8a", 0x180000, 0x080000, CRC(6f9b7fdf) SHA1(14ced1d43eae3b6db4a0a4c12fb26cbd13eb7428) )
+ ROM_LOAD( "maddonna_tmad_b6_160595.ui16", 0x200000, 0x080000, CRC(b02e9e0e) SHA1(6e527a2bfda0f4f420c10139c75dac2704e08d08) )
+ ROM_LOAD( "maddonna_tmad_b8_160595.ui13", 0x280000, 0x080000, CRC(03f1de40) SHA1(bb0c0525155404c0740ac5f048f71ae7651a5941) )
+ ROM_LOAD( "maddonna_tmad_b10_160595.ui11", 0x300000, 0x080000, CRC(87936423) SHA1(dda42f3685427edad7686d9712ff07d2fd9bf57e) )
+ ROM_LOAD( "maddonna_tmad_b12_160595.ui8", 0x380000, 0x080000, CRC(879ab23c) SHA1(5288016542a10e60ccb28a930d8dfe4db41c6fc6) )
ROM_REGION( 0x100000, "oki", ROMREGION_ERASE00 ) /* Samples */
/* no samples for this game */
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp
index a47806a0201..b3e23171df8 100644
--- a/src/mame/drivers/pacman.cpp
+++ b/src/mame/drivers/pacman.cpp
@@ -390,7 +390,7 @@ MACHINE_RESET_MEMBER(pacman_state,mschamp)
MACHINE_RESET_MEMBER(pacman_state,superabc)
{
- superabc_bank_w(m_maincpu->space(AS_PROGRAM), 0, 0);
+ superabc_bank_w(0);
}
MACHINE_RESET_MEMBER(pacman_state,maketrax)
@@ -727,7 +727,7 @@ READ8_MEMBER(pacman_state::bigbucks_question_r)
WRITE_LINE_MEMBER(pacman_state::s2650_interrupt)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
WRITE8_MEMBER(pacman_state::porky_banking_w)
@@ -844,7 +844,7 @@ READ8_MEMBER(pacman_state::rocktrv2_question_r)
The two PROMs on the main board at 7F and 4A are also replaced with PROMs from the kit
*/
-WRITE8_MEMBER(pacman_state::superabc_bank_w)
+void pacman_state::superabc_bank_w(uint8_t data)
{
// d4-d6: bank
int bank = data >> 4 & 7;
@@ -3773,6 +3773,7 @@ void pacman_state::s2650games(machine_config &config)
maincpu.set_addrmap(AS_PROGRAM, &pacman_state::s2650games_map);
maincpu.set_addrmap(AS_DATA, &pacman_state::s2650games_dataport);
maincpu.sense_handler().set("screen", FUNC(screen_device::vblank)).invert();
+ maincpu.intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
m_mainlatch->q_out_cb<0>().set_nop();
m_mainlatch->q_out_cb<1>().set_nop();
@@ -7616,7 +7617,7 @@ GAME( 1981, abscam, puckman, piranha, mspacman, pacman_state, init_eyes,
GAME( 1981, piranhah, puckman, pacman, mspacman, pacman_state, empty_init, ROT90, "hack", "Piranha (hack)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, titanpac, puckman, piranha, mspacman, pacman_state, init_eyes, ROT90, "hack", "Titan (Pac-Man hack)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, pacmanfm, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "bootleg (FAMARE S.A.)", "Pac Man (FAMARE S.A. bootleg of Puck Man)", MACHINE_SUPPORTS_SAVE )
-GAME( 1980, pacmanug, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "bootleg (U.G.)", "Pac Man (U.G. bootleg of Puck Man)", MACHINE_SUPPORTS_SAVE )
+GAME( 1980, pacmanug, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "bootleg (U.Games)", "Pac Man (U.Games bootleg of Puck Man)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, pacplus, 0, pacman, pacman, pacman_state, init_pacplus, ROT90, "Namco (Midway license)", "Pac-Man Plus", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/pasopia.cpp b/src/mame/drivers/pasopia.cpp
index d4baccd0d58..7fe2af76b2e 100644
--- a/src/mame/drivers/pasopia.cpp
+++ b/src/mame/drivers/pasopia.cpp
@@ -72,7 +72,7 @@ private:
DECLARE_WRITE8_MEMBER(vram_addr_hi_w);
DECLARE_WRITE8_MEMBER(screen_mode_w);
DECLARE_READ8_MEMBER(rombank_r);
- DECLARE_READ8_MEMBER(keyb_r);
+ uint8_t keyb_r();
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_WRITE_LINE_MEMBER(speaker_w);
MC6845_UPDATE_ROW(crtc_update_row);
@@ -112,7 +112,7 @@ private:
// needed to scan the keyboard, as the pio emulation doesn't do it.
TIMER_CALLBACK_MEMBER( pasopia_state::pio_timer )
{
- m_pio->port_b_write(keyb_r(generic_space(),0,0xff));
+ m_pio->port_b_write(keyb_r());
}
MC6845_UPDATE_ROW( pasopia_state::crtc_update_row )
@@ -268,7 +268,7 @@ READ8_MEMBER( pasopia_state::rombank_r )
return (m_ram_bank) ? 4 : 0;
}
-READ8_MEMBER( pasopia_state::keyb_r )
+uint8_t pasopia_state::keyb_r()
{
u8 data = 0xff;
for (u8 i = 0; i < 3; i++)
diff --git a/src/mame/drivers/pasopia7.cpp b/src/mame/drivers/pasopia7.cpp
index 35360246447..87f1bb02094 100644
--- a/src/mame/drivers/pasopia7.cpp
+++ b/src/mame/drivers/pasopia7.cpp
@@ -75,31 +75,34 @@ public:
void init_p7_lcd();
void init_p7_raster();
+protected:
+ virtual void machine_start() override;
+
private:
- DECLARE_READ8_MEMBER(vram_r);
- DECLARE_WRITE8_MEMBER(vram_w);
- DECLARE_WRITE8_MEMBER(pasopia7_memory_ctrl_w);
- DECLARE_WRITE8_MEMBER(pac2_w);
- DECLARE_READ8_MEMBER(pac2_r);
- DECLARE_WRITE8_MEMBER(ram_bank_w);
- DECLARE_WRITE8_MEMBER(pasopia7_6845_w);
- DECLARE_READ8_MEMBER(pasopia7_io_r);
- DECLARE_WRITE8_MEMBER(pasopia7_io_w);
- DECLARE_READ8_MEMBER(pasopia7_fdc_r);
- DECLARE_WRITE8_MEMBER(pasopia7_fdc_w);
- DECLARE_READ8_MEMBER(keyb_r);
- DECLARE_WRITE8_MEMBER(mux_w);
- DECLARE_READ8_MEMBER(crtc_portb_r);
- DECLARE_WRITE8_MEMBER(screen_mode_w);
- DECLARE_WRITE8_MEMBER(plane_reg_w);
- DECLARE_WRITE8_MEMBER(video_attr_w);
- DECLARE_WRITE8_MEMBER(video_misc_w);
- DECLARE_WRITE8_MEMBER(nmi_mask_w);
- DECLARE_READ8_MEMBER(unk_r);
- DECLARE_READ8_MEMBER(nmi_reg_r);
- DECLARE_WRITE8_MEMBER(nmi_reg_w);
- DECLARE_READ8_MEMBER(nmi_porta_r);
- DECLARE_READ8_MEMBER(nmi_portb_r);
+ uint8_t vram_r(offs_t offset);
+ void vram_w(offs_t offset, uint8_t data);
+ void memory_ctrl_w(uint8_t data);
+ void pac2_w(offs_t offset, uint8_t data);
+ uint8_t pac2_r(offs_t offset);
+ void ram_bank_w(offs_t offset, uint8_t data);
+ void pasopia7_6845_w(offs_t offset, uint8_t data);
+ uint8_t io_r(offs_t offset);
+ void io_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 keyb_r();
+ void mux_w(uint8_t data);
+ uint8_t crtc_portb_r();
+ void screen_mode_w(uint8_t data);
+ void plane_reg_w(uint8_t data);
+ void video_attr_w(uint8_t data);
+ void video_misc_w(uint8_t data);
+ void nmi_mask_w(uint8_t data);
+ uint8_t unk_r();
+ uint8_t nmi_reg_r();
+ void nmi_reg_w(uint8_t data);
+ uint8_t nmi_porta_r();
+ uint8_t nmi_portb_r();
DECLARE_WRITE_LINE_MEMBER(speaker_w);
TIMER_CALLBACK_MEMBER(pio_timer);
DECLARE_VIDEO_START(pasopia7);
@@ -109,6 +112,8 @@ private:
void pasopia7_io(address_map &map);
void pasopia7_mem(address_map &map);
+ std::unique_ptr<uint8_t[]> m_work_ram;
+ std::unique_ptr<uint8_t[]> m_vram;
uint8_t m_vram_sel;
uint8_t m_mio_sel;
std::unique_ptr<uint8_t[]> m_p7_pal;
@@ -164,10 +169,18 @@ private:
#define VDP_CLOCK 14.318181_MHz_XTAL / 16
#define LCD_CLOCK VDP_CLOCK/10
+void pasopia7_state::machine_start()
+{
+ m_work_ram = std::make_unique<uint8_t[]>(0x10000);
+ std::fill(&m_work_ram[0], &m_work_ram[0x10000], 0xff);
+
+ m_vram = make_unique_clear<uint8_t[]>(0x10000);
+}
+
// needed to scan the keyboard, as the pio emulation doesn't do it.
TIMER_CALLBACK_MEMBER( pasopia7_state::pio_timer )
{
- m_pio->port_b_write(keyb_r(generic_space(),0,0xff));
+ m_pio->port_b_write(keyb_r());
}
VIDEO_START_MEMBER(pasopia7_state,pasopia7)
@@ -177,7 +190,6 @@ VIDEO_START_MEMBER(pasopia7_state,pasopia7)
void pasopia7_state::draw_cg4_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
{
- uint8_t *vram = memregion("vram")->base();
int x,y,xi,yi;
int count;
@@ -192,8 +204,8 @@ void pasopia7_state::draw_cg4_screen(bitmap_ind16 &bitmap,const rectangle &clipr
{
int pen_b,pen_r,pen_g,color;
- pen_b = (vram[count+0x0000]>>(7-xi)) & 1;
- pen_r = (vram[count+0x4000]>>(7-xi)) & 1;
+ pen_b = (m_vram[count+0x0000]>>(7-xi)) & 1;
+ pen_r = (m_vram[count+0x4000]>>(7-xi)) & 1;
pen_g = 0;//(p7_vram[count+0x8000]>>(7-xi)) & 1;
color = pen_g<<2 | pen_r<<1 | pen_b<<0;
@@ -208,7 +220,6 @@ void pasopia7_state::draw_cg4_screen(bitmap_ind16 &bitmap,const rectangle &clipr
void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
{
- uint8_t *vram = memregion("vram")->base();
uint8_t *gfx_data = memregion("font")->base();
int x,y,xi,yi;
int count;
@@ -219,8 +230,8 @@ void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &clipre
{
for(x=0;x<width;x++)
{
- int tile = vram[count+0x8000];
- int attr = vram[count+0xc000];
+ int tile = m_vram[count+0x8000];
+ int attr = m_vram[count+0xc000];
int color = attr & 7;
for(yi=0;yi<8;yi++)
@@ -266,7 +277,6 @@ void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &clipre
void pasopia7_state::draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
{
- uint8_t *vram = memregion("vram")->base();
uint8_t *gfx_data = memregion("font")->base();
int x,y,xi,yi;
int count;
@@ -277,11 +287,11 @@ void pasopia7_state::draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cli
{
for(x=0;x<width;x++)
{
- int tile = vram[count+0x8000];
+ int tile = m_vram[count+0x8000];
for(yi=0;yi<8;yi++)
{
- int attr = vram[count+0xc000+yi];
+ int attr = m_vram[count+0xc000+yi];
if(attr & 0x80)
{
@@ -289,9 +299,9 @@ void pasopia7_state::draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cli
{
int pen,pen_b,pen_r,pen_g;
- pen_b = (vram[count+yi+0x0000]>>(7-xi)) & 1;
- pen_r = (vram[count+yi+0x4000]>>(7-xi)) & 1;
- pen_g = (vram[count+yi+0x8000]>>(7-xi)) & 1;
+ pen_b = (m_vram[count+yi+0x0000]>>(7-xi)) & 1;
+ pen_r = (m_vram[count+yi+0x4000]>>(7-xi)) & 1;
+ pen_g = (m_vram[count+yi+0x8000]>>(7-xi)) & 1;
pen = pen_g<<2 | pen_r<<1 | pen_b<<0;
@@ -362,16 +372,13 @@ uint32_t pasopia7_state::screen_update_pasopia7(screen_device &screen, bitmap_in
return 0;
}
-READ8_MEMBER( pasopia7_state::vram_r )
+uint8_t pasopia7_state::vram_r(offs_t offset)
{
- uint8_t *vram = memregion("vram")->base();
uint8_t res;
if (m_vram_sel == 0)
{
- uint8_t *work_ram = memregion("maincpu")->base();
-
- return work_ram[offset+0x8000];
+ return m_work_ram[offset+0x8000];
}
if (m_pal_sel && (m_plane_reg & 0x70) == 0x00)
@@ -380,22 +387,20 @@ READ8_MEMBER( pasopia7_state::vram_r )
res = 0xff;
if ((m_plane_reg & 0x11) == 0x11)
- res &= vram[offset | 0x0000];
+ res &= m_vram[offset | 0x0000];
if ((m_plane_reg & 0x22) == 0x22)
- res &= vram[offset | 0x4000];
+ res &= m_vram[offset | 0x4000];
if ((m_plane_reg & 0x44) == 0x44)
{
- res &= vram[offset | 0x8000];
- m_attr_latch = vram[offset | 0xc000] & 0x87;
+ res &= m_vram[offset | 0x8000];
+ m_attr_latch = m_vram[offset | 0xc000] & 0x87;
}
return res;
}
-WRITE8_MEMBER( pasopia7_state::vram_w )
+void pasopia7_state::vram_w(offs_t offset, uint8_t data)
{
- uint8_t *vram = memregion("vram")->base();
-
if (m_vram_sel)
{
if (m_pal_sel && (m_plane_reg & 0x70) == 0x00)
@@ -405,28 +410,27 @@ WRITE8_MEMBER( pasopia7_state::vram_w )
}
if (m_plane_reg & 0x10)
- vram[(offset & 0x3fff) | 0x0000] = (m_plane_reg & 1) ? data : 0xff;
+ m_vram[(offset & 0x3fff) | 0x0000] = (m_plane_reg & 1) ? data : 0xff;
if (m_plane_reg & 0x20)
- vram[(offset & 0x3fff) | 0x4000] = (m_plane_reg & 2) ? data : 0xff;
+ m_vram[(offset & 0x3fff) | 0x4000] = (m_plane_reg & 2) ? data : 0xff;
if (m_plane_reg & 0x40)
{
- vram[(offset & 0x3fff) | 0x8000] = (m_plane_reg & 4) ? data : 0xff;
+ m_vram[(offset & 0x3fff) | 0x8000] = (m_plane_reg & 4) ? data : 0xff;
m_attr_latch = m_attr_wrap ? m_attr_latch : m_attr_data;
- vram[(offset & 0x3fff) | 0xc000] = m_attr_latch;
+ m_vram[(offset & 0x3fff) | 0xc000] = m_attr_latch;
}
}
else
{
- uint8_t *work_ram = memregion("maincpu")->base();
-
- work_ram[offset+0x8000] = data;
+ m_work_ram[offset+0x8000] = data;
}
}
-WRITE8_MEMBER( pasopia7_state::pasopia7_memory_ctrl_w )
+void pasopia7_state::memory_ctrl_w(uint8_t data)
{
- uint8_t *work_ram = memregion("maincpu")->base();
+ uint8_t *work_ram = m_work_ram.get();
uint8_t *basic = memregion("basic")->base();
+ uint8_t *bios = memregion("bios")->base();
switch(data & 3)
{
@@ -437,7 +441,7 @@ WRITE8_MEMBER( pasopia7_state::pasopia7_memory_ctrl_w )
break;
case 1: //select Basic ROM + BIOS ROM
membank("bank1")->set_base(basic + 0x00000);
- membank("bank2")->set_base(work_ram + 0x10000);
+ membank("bank2")->set_base(bios + 0x00000);
break;
case 2: //select Work RAM
membank("bank1")->set_base(work_ram + 0x00000);
@@ -454,15 +458,8 @@ WRITE8_MEMBER( pasopia7_state::pasopia7_memory_ctrl_w )
// printf("%02x\n",m_vram_sel);
}
-#if 0
-READ8_MEMBER( pasopia7_state::fdc_r )
-{
- return machine().rand();
-}
-#endif
-
-WRITE8_MEMBER( pasopia7_state::pac2_w )
+void pasopia7_state::pac2_w(offs_t offset, uint8_t data)
{
/*
select register:
@@ -510,7 +507,7 @@ WRITE8_MEMBER( pasopia7_state::pac2_w )
}
}
-READ8_MEMBER( pasopia7_state::pac2_r )
+uint8_t pasopia7_state::pac2_r(offs_t offset)
{
if(offset == 2)
{
@@ -538,14 +535,12 @@ READ8_MEMBER( pasopia7_state::pac2_r )
}
/* writes always occurs to the RAM banks, even if the ROMs are selected. */
-WRITE8_MEMBER( pasopia7_state::ram_bank_w )
+void pasopia7_state::ram_bank_w(offs_t offset, uint8_t data)
{
- uint8_t *work_ram = memregion("maincpu")->base();
-
- work_ram[offset] = data;
+ m_work_ram[offset] = data;
}
-WRITE8_MEMBER( pasopia7_state::pasopia7_6845_w )
+void pasopia7_state::pasopia7_6845_w(offs_t offset, uint8_t data)
{
if(offset == 0)
{
@@ -583,7 +578,7 @@ void pasopia7_state::pasopia_nmi_trap()
}
}
-READ8_MEMBER( pasopia7_state::pasopia7_fdc_r )
+uint8_t pasopia7_state::fdc_r(offs_t offset)
{
switch(offset)
{
@@ -595,7 +590,7 @@ READ8_MEMBER( pasopia7_state::pasopia7_fdc_r )
return 0xff;
}
-WRITE8_MEMBER( pasopia7_state::pasopia7_fdc_w )
+void pasopia7_state::fdc_w(offs_t offset, uint8_t data)
{
switch(offset)
{
@@ -612,7 +607,7 @@ WRITE8_MEMBER( pasopia7_state::pasopia7_fdc_w )
}
-READ8_MEMBER( pasopia7_state::pasopia7_io_r )
+uint8_t pasopia7_state::io_r(offs_t offset)
{
if(m_mio_sel)
{
@@ -638,7 +633,7 @@ READ8_MEMBER( pasopia7_state::pasopia7_io_r )
return m_crtc->register_r();
else
if(io_port >= 0x18 && io_port <= 0x1b)
- return pac2_r(space, io_port & 3);
+ return pac2_r(io_port & 3);
else
if(io_port >= 0x20 && io_port <= 0x23)
{
@@ -656,7 +651,7 @@ READ8_MEMBER( pasopia7_state::pasopia7_io_r )
// else if(io_port == 0x3c) { bankswitch }
else
// if(io_port >= 0xe0 && io_port <= 0xe6)
-// return pasopia7_fdc_r(space, offset & 7);
+// return fdc_r(offset & 7);
// else
{
logerror("(PC=%06x) Read i/o address %02x\n",m_maincpu->pc(),io_port);
@@ -665,7 +660,7 @@ READ8_MEMBER( pasopia7_state::pasopia7_io_r )
return 0xff;
}
-WRITE8_MEMBER( pasopia7_state::pasopia7_io_w )
+void pasopia7_state::io_w(offs_t offset, uint8_t data)
{
if(m_mio_sel)
{
@@ -684,10 +679,10 @@ WRITE8_MEMBER( pasopia7_state::pasopia7_io_w )
m_ppi1->write(io_port & 3, data);
else
if(io_port >= 0x10 && io_port <= 0x11)
- pasopia7_6845_w(space, io_port-0x10, data);
+ pasopia7_6845_w(io_port-0x10, data);
else
if(io_port >= 0x18 && io_port <= 0x1b)
- pac2_w(space, io_port & 3, data);
+ pac2_w(io_port & 3, data);
else
if(io_port >= 0x20 && io_port <= 0x23)
{
@@ -708,10 +703,10 @@ WRITE8_MEMBER( pasopia7_state::pasopia7_io_w )
m_sn2->write(data);
else
if(io_port == 0x3c)
- pasopia7_memory_ctrl_w(space,0, data);
+ memory_ctrl_w(data);
else
if(io_port >= 0xe0 && io_port <= 0xe6)
- pasopia7_fdc_w(space, offset & 7, data);
+ fdc_w(offset & 7, data);
else
{
logerror("(PC=%06x) Write i/o address %02x = %02x\n",m_maincpu->pc(),offset,data);
@@ -731,7 +726,7 @@ void pasopia7_state::pasopia7_mem(address_map &map)
void pasopia7_state::pasopia7_io(address_map &map)
{
map.unmap_value_high();
- map(0x0000, 0xffff).rw(FUNC(pasopia7_state::pasopia7_io_r), FUNC(pasopia7_state::pasopia7_io_w));
+ map(0x0000, 0xffff).rw(FUNC(pasopia7_state::io_r), FUNC(pasopia7_state::io_w));
}
static INPUT_PORTS_START( pasopia7 )
@@ -789,7 +784,7 @@ static GFXDECODE_START( gfx_pasopia7 )
GFXDECODE_ENTRY( "kanji", 0x00000, p7_chars_16x16, 0, 0x10 )
GFXDECODE_END
-READ8_MEMBER( pasopia7_state::keyb_r )
+uint8_t pasopia7_state::keyb_r()
{
u8 data = 0xff;
for (u8 j=0; j<3; j++)
@@ -801,7 +796,7 @@ READ8_MEMBER( pasopia7_state::keyb_r )
return data;
}
-WRITE8_MEMBER( pasopia7_state::mux_w )
+void pasopia7_state::mux_w(uint8_t data)
{
m_mux_data = data;
}
@@ -814,7 +809,7 @@ static const z80_daisy_config p7_daisy[] =
{ nullptr }
};
-READ8_MEMBER( pasopia7_state::crtc_portb_r )
+uint8_t pasopia7_state::crtc_portb_r()
{
// --x- ---- vsync bit
// ---x ---- hardcoded bit, defines if the system screen is raster (1) or LCD (0)
@@ -825,7 +820,7 @@ READ8_MEMBER( pasopia7_state::crtc_portb_r )
return 0x40 | (m_attr_latch & 0x87) | vsync | vdisp | (m_screen_type << 4);
}
-WRITE8_MEMBER( pasopia7_state::screen_mode_w )
+void pasopia7_state::screen_mode_w(uint8_t data)
{
if(data & 0x5f)
printf("GFX MODE %02x\n",data);
@@ -836,14 +831,14 @@ WRITE8_MEMBER( pasopia7_state::screen_mode_w )
// printf("%02x\n",m_gfx_mode);
}
-WRITE8_MEMBER( pasopia7_state::plane_reg_w )
+void pasopia7_state::plane_reg_w(uint8_t data)
{
//if(data & 0x11)
//printf("PLANE %02x\n",data);
m_plane_reg = data;
}
-WRITE8_MEMBER( pasopia7_state::video_attr_w )
+void pasopia7_state::video_attr_w(uint8_t data)
{
//printf("VIDEO ATTR %02x | TEXT_PAGE %02x\n",data & 0xf,data & 0x70);
m_attr_data = (data & 0x7) | ((data & 0x8)<<4);
@@ -851,7 +846,7 @@ WRITE8_MEMBER( pasopia7_state::video_attr_w )
//#include "debugger.h"
-WRITE8_MEMBER( pasopia7_state::video_misc_w )
+void pasopia7_state::video_misc_w(uint8_t data)
{
/*
--x- ---- blinking
@@ -869,7 +864,7 @@ WRITE8_MEMBER( pasopia7_state::video_misc_w )
//m_pal_sel = data & 0x02;
}
-WRITE8_MEMBER( pasopia7_state::nmi_mask_w )
+void pasopia7_state::nmi_mask_w(uint8_t data)
{
/*
--x- ---- tape motor
@@ -893,18 +888,18 @@ WRITE8_MEMBER( pasopia7_state::nmi_mask_w )
}
/* TODO: investigate on these. */
-READ8_MEMBER( pasopia7_state::unk_r )
+uint8_t pasopia7_state::unk_r()
{
return 0xff;//machine().rand();
}
-READ8_MEMBER( pasopia7_state::nmi_reg_r )
+uint8_t pasopia7_state::nmi_reg_r()
{
//printf("C\n");
return 0xfc | m_bank_reg;//machine().rand();
}
-WRITE8_MEMBER( pasopia7_state::nmi_reg_w )
+void pasopia7_state::nmi_reg_w(uint8_t data)
{
/*
x--- ---- NMI mask
@@ -914,12 +909,12 @@ WRITE8_MEMBER( pasopia7_state::nmi_reg_w )
m_nmi_enable_reg = data & 0x40;
}
-READ8_MEMBER( pasopia7_state::nmi_porta_r )
+uint8_t pasopia7_state::nmi_porta_r()
{
return 0xff;
}
-READ8_MEMBER( pasopia7_state::nmi_portb_r )
+uint8_t pasopia7_state::nmi_portb_r()
{
u8 data = (m_cass->input() > +0.04) ? 0x20 : 0;
return 0xd9 | data | m_nmi_trap | m_nmi_reset;
@@ -937,12 +932,12 @@ WRITE_LINE_MEMBER( pasopia7_state::speaker_w )
void pasopia7_state::machine_reset()
{
- uint8_t *bios = memregion("maincpu")->base();
+ uint8_t *bios = memregion("bios")->base();
- membank("bank1")->set_base(bios + 0x10000);
- membank("bank2")->set_base(bios + 0x10000);
-// membank("bank3")->set_base(bios + 0x10000);
-// membank("bank4")->set_base(bios + 0x10000);
+ membank("bank1")->set_base(bios);
+ membank("bank2")->set_base(bios);
+// membank("bank3")->set_base(bios);
+// membank("bank4")->set_base(bios);
m_nmi_reset |= 4;
m_porta_2 = 0xFF;
@@ -1071,8 +1066,8 @@ void pasopia7_state::p7_lcd(machine_config &config)
/* ROM definition */
ROM_START( pasopia7 )
- ROM_REGION( 0x14000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD( "bios.rom", 0x10000, 0x4000, CRC(b8111407) SHA1(ac93ae62db4c67de815f45de98c79cfa1313857d))
+ ROM_REGION( 0x4000, "bios", ROMREGION_ERASEFF )
+ ROM_LOAD( "bios.rom", 0x0000, 0x4000, CRC(b8111407) SHA1(ac93ae62db4c67de815f45de98c79cfa1313857d))
ROM_REGION( 0x8000, "basic", ROMREGION_ERASEFF )
ROM_LOAD( "basic.rom", 0x0000, 0x8000, CRC(8a58fab6) SHA1(5e1a91dfb293bca5cf145b0a0c63217f04003ed1))
@@ -1088,14 +1083,12 @@ ROM_START( pasopia7 )
ROM_REGION( 0x8000, "rampac2", ROMREGION_ERASEFF )
// ROM_LOAD( "rampac2.bin", 0x0000, 0x8000, CRC(0e4f09bd) SHA1(4088906d57e4f6085a75b249a6139a0e2eb531a1) )
-
- ROM_REGION( 0x10000, "vram", ROMREGION_ERASE00 )
ROM_END
/* using an identical ROMset from now, but the screen type is different */
ROM_START( pasopia7lcd )
- ROM_REGION( 0x14000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD( "bios.rom", 0x10000, 0x4000, CRC(b8111407) SHA1(ac93ae62db4c67de815f45de98c79cfa1313857d))
+ ROM_REGION( 0x4000, "bios", ROMREGION_ERASEFF )
+ ROM_LOAD( "bios.rom", 0x0000, 0x4000, CRC(b8111407) SHA1(ac93ae62db4c67de815f45de98c79cfa1313857d))
ROM_REGION( 0x8000, "basic", ROMREGION_ERASEFF )
ROM_LOAD( "basic.rom", 0x0000, 0x8000, CRC(8a58fab6) SHA1(5e1a91dfb293bca5cf145b0a0c63217f04003ed1))
@@ -1111,8 +1104,6 @@ ROM_START( pasopia7lcd )
ROM_REGION( 0x8000, "rampac2", ROMREGION_ERASEFF )
// ROM_LOAD( "rampac2.bin", 0x0000, 0x8000, CRC(0e4f09bd) SHA1(4088906d57e4f6085a75b249a6139a0e2eb531a1) )
-
- ROM_REGION( 0x10000, "vram", ROMREGION_ERASE00 )
ROM_END
diff --git a/src/mame/drivers/pcw16.cpp b/src/mame/drivers/pcw16.cpp
index f1772001a3b..32e3b4154f1 100644
--- a/src/mame/drivers/pcw16.cpp
+++ b/src/mame/drivers/pcw16.cpp
@@ -497,7 +497,7 @@ WRITE8_MEMBER(pcw16_state::pcw16_keyboard_control_w)
/* busy */
m_keyboard_state |= PCW16_KEYBOARD_BUSY_STATUS;
/* keyboard takes data */
- m_keyboard->write(space, 0, m_keyboard_data_shift);
+ m_keyboard->write(m_keyboard_data_shift);
/* set clock low - no furthur transmissions */
pcw16_keyboard_set_clock_state(0);
/* set int */
@@ -532,7 +532,7 @@ WRITE_LINE_MEMBER(pcw16_state::pcw16_keyboard_callback)
{
int data;
- data = m_keyboard->read(machine().dummy_space(), 0);
+ data = m_keyboard->read();
if (data)
{
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index 26ab0fe87c7..72861de561b 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -1350,7 +1350,7 @@ static void iot_tyi(device_t *device, int op2, int nac, int mb, int *io, int ac)
{
state->m_io_status &= ~io_st_tyi;
if (USE_SBS)
- state->m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0); /* PDP1 - interrupt it, baby */
+ state->m_maincpu->set_input_line(0, CLEAR_LINE); /* PDP1 - interrupt it, baby */
}
}
@@ -1709,7 +1709,7 @@ void pdp1_state::pdp1_keyboard()
m_typewriter.tb = (i << 4) + j;
m_io_status |= io_st_tyi;
#if USE_SBS
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0); /* PDP1 - interrupt it, baby */
+ m_maincpu->set_input_line(0, ASSERT_LINE); /* PDP1 - interrupt it, baby */
#endif
m_maincpu->set_state_int(PDP1_PF1, 1);
pdp1_typewriter_drawchar(m_typewriter.tb); /* we want to echo input */
diff --git a/src/mame/drivers/pgm.cpp b/src/mame/drivers/pgm.cpp
index e7ce0bce684..6d08c04dee8 100644
--- a/src/mame/drivers/pgm.cpp
+++ b/src/mame/drivers/pgm.cpp
@@ -4611,7 +4611,7 @@ ROM_START( ddp3 )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(17731c9d) SHA1(0e0aa0ec01035323985ac8e08228a0fd6edf6689) ) //bitmap-1
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
@@ -4638,7 +4638,7 @@ ROM_START( ddpdoj )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(17731c9d) SHA1(0e0aa0ec01035323985ac8e08228a0fd6edf6689) ) //bitmap-1
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
@@ -4666,7 +4666,7 @@ ROM_START( ddpdoja )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(17731c9d) SHA1(0e0aa0ec01035323985ac8e08228a0fd6edf6689) ) //bitmap-1
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
@@ -4693,7 +4693,7 @@ ROM_START( ddpdojb )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(17731c9d) SHA1(0e0aa0ec01035323985ac8e08228a0fd6edf6689) ) //bitmap-1
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
@@ -4703,6 +4703,36 @@ ROM_START( ddpdojb )
ROM_LOAD( "ddp3_defaults.nv", 0x0000000, 0x020000, CRC(571e96c0) SHA1(348940c77ca348213331b85b9b1d3aabb96a528a) )
ROM_END
+ROM_START( ddpdojp )
+ ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
+ ROM_LOAD16_WORD_SWAP( "pgmbios.u20.27c210", 0x00000, 0x020000, CRC(1d2a7c15) SHA1(025a9f2bb64887699bf7ccab0f2ccfc55c3ad75c) )
+ ROM_LOAD16_WORD_SWAP( "ca008.cod_prom.u13.27c322", 0x100000, 0x400000, CRC(2ba7fa3b) SHA1(c4c5425a2455cb95555d94bbf8afc83cf0b140e8) )
+
+ ROM_REGION( 0xa00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
+ ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM bios
+ ROM_LOAD( "fnt_cg.0_cgrom0.u8.27c322", 0x180000, 0x0400000, CRC(1805e198) SHA1(23db96eddfb47dfef9dcfab52ae2582ad3c0fc90) )
+ ROM_LOAD( "fnt_cg.1_cgrom1.u10.27c322", 0x580000, 0x0400000, CRC(f06ce99c) SHA1(24482e2bb2485855e300b6b3e07962d4f0a6ab83) )
+
+ ROM_REGION16_LE( 0x2000000, "sprcol", 0 ) /* Sprite Colour Data */
+ ROM_LOAD( "sp_cg.0_imcs0.u11.27c322", 0x0000000, 0x0400000, CRC(c66bdd8e) SHA1(dde26821a3ef8ad5c3c29e11c55f8f6953c085dd) )
+ ROM_LOAD( "sp_cg.1_imcs1.u13.27c322", 0x0400000, 0x0400000, CRC(d30eac89) SHA1(78b18ff71136df0ffadb87fc53b60943dd62bcdd) )
+ ROM_LOAD( "sp_cg.2_imcs2.u15.27c322", 0x0800000, 0x0400000, CRC(f31b010e) SHA1(1987e9cd2abcf57be990853fbd305474e58da5b8) )
+ ROM_LOAD( "sp_cg.3_imcs3.u17.27c322", 0x0c00000, 0x0400000, CRC(01ec23f5) SHA1(ff22642f914b0f8911a221df1e9073bdc9434660) )
+
+ ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
+ ROM_LOAD( "sp_mp.0_bitcs0.u5.27c322", 0x0000000, 0x0400000, CRC(e30494a4) SHA1(12d216252a916be4fd8d77b89497cee9b04861e5) )
+ ROM_LOAD( "sp_mp.1_bitcs1.u6.27c322", 0x0400000, 0x0400000, CRC(0239daec) SHA1(506c4d8a4bfa988d81565c47f742f1b06175915e) )
+
+ ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
+ ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
+ ROM_LOAD( "sndmask.rom_mcs1.u3.27c322", 0x400000, 0x400000, CRC(5a0dbd76) SHA1(06ab202f6bd5ebfb35b9d8cc7a8fb83ec8840659) )
+
+ ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
+ ROM_LOAD( "ddp3_defaults.nv", 0x0000000, 0x020000, CRC(571e96c0) SHA1(348940c77ca348213331b85b9b1d3aabb96a528a) )
+ROM_END
+
+
+
/* this expects Magic values in NVRAM to boot */
ROM_START( ddpdojblk )
ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
@@ -4721,7 +4751,7 @@ ROM_START( ddpdojblk )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(17731c9d) SHA1(0e0aa0ec01035323985ac8e08228a0fd6edf6689) ) //bitmap-1
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
@@ -4748,7 +4778,7 @@ ROM_START( ddpdojblka )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(17731c9d) SHA1(0e0aa0ec01035323985ac8e08228a0fd6edf6689) ) //bitmap-1
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // same as standard PGM bios
@@ -4776,7 +4806,7 @@ ROM_START( ddpdojblkbl )
ROM_LOAD( "a04402w064.u8", 0x0800000, 0x0800000, CRC(752167b0) SHA1(c33c3398dd8e479c9d5bd348924958a6aecbf0fc) ) //image-2
ROM_REGION16_LE( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
- ROM_LOAD( "b04401w064.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1
+ ROM_LOAD( "b04401w064_corrupt.u1", 0x0000000, 0x0800000, CRC(8cbff066) SHA1(eef1cd566bc70ebf45f047e56026803d5c1dac43) ) //bitmap-1 - bootlegs were based off a corrupt dump of the ROM
ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
PGM_AUDIO_BIOS
@@ -4945,11 +4975,11 @@ GAME( 2002, ddp3, 0, pgm_arm_type1_cave, ddp3, pgm_arm_
GAME( 2002, ddpdoj, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05.Master Ver, 68k Label V101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // is there a v101 without the . after 05?
GAME( 2002, ddpdoja, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05.Master Ver, 68k Label V100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 2002, ddpdojb, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ddpdojp, ddp3, pgm, ddp3, pgm_state, init_pgm, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05 Master Ver, location test)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // unprotected, but still has strings related to the protection ASIC
GAME( 2002, ddpdojblk, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07.Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07.Black Ver" (new)
GAME( 2002, ddpdojblka, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07 Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07 Black Ver" (new)
GAME( 2012, ddpdojblkbl,ddp3, pgm_arm_type1, pgm, pgm_arm_type1_state, init_kovsh, ROT270, "bootleg", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07 Black Ver., bootleg Knights of Valour Super Heroes conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // the extra . in the revision has been added by bootlegger
-
// the exact text of the 'version' shows which revision of the game it is; the newest has 2 '.' symbols in the string, the oldest, none.
// the only difference between 'ket' and 'ket1' is the ROM fill at 0x1443bc-0x1c88cd, on ket1 it seems to be randomized / garbage data, on ket it's all 0xff, both have been seen on more than one PCB.
GAME( 2002, ket, 0, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/picno.cpp b/src/mame/drivers/picno.cpp
index b789a83eceb..9e4e2cd9d61 100644
--- a/src/mame/drivers/picno.cpp
+++ b/src/mame/drivers/picno.cpp
@@ -24,7 +24,7 @@ Can't do anything until the internal ROM is dumped.
******************************************************************************************************************************/
#include "emu.h"
-#include "cpu/h8/h83002.h"
+#include "cpu/h8500/h8532.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
@@ -44,23 +44,17 @@ public:
void picno(machine_config &config);
private:
- void io_map(address_map &map);
void mem_map(address_map &map);
- required_device<cpu_device> m_maincpu;
+ required_device<h8532_device> m_maincpu;
};
void picno_state::mem_map(address_map &map)
{
- map(0x00000, 0x07fff).rom().region("roms", 0); // 32kb internal rom
- map(0x0fb80, 0x0ff7f).ram(); // internal ram
- map(0x0ff80, 0x0ffff); // internal controls
- map(0x10000, 0x8ffff).rom().region("roms", 0x8000); // guess
-}
-
-void picno_state::io_map(address_map &map)
-{
-// map.global_mask(0xff);
+ //map(0x00000, 0x07fff).rom().region("roms", 0); // 32kb internal rom
+ //map(0x0fb80, 0x0ff7f).ram(); // internal ram
+ //map(0x0ff80, 0x0ffff); // internal controls
+ map(0x10000, 0x8ffff).rom().region("roms", 0); // guess
}
static INPUT_PORTS_START( picno )
@@ -69,13 +63,13 @@ INPUT_PORTS_END
void picno_state::picno(machine_config &config)
{
/* basic machine hardware */
- H83002(config, m_maincpu, XTAL(20'000'000)); /* TODO: correct CPU type (H8/532), crystal is a guess, divided by 2 in the cpu */
+ HD6435328(config, m_maincpu, 20'000'000); // TODO: clock is a guess, divided by 2 in the cpu
m_maincpu->set_addrmap(AS_PROGRAM, &picno_state::mem_map);
- m_maincpu->set_addrmap(AS_IO, &picno_state::io_map);
- //MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") // no speaker in the unit, but there's a couple of sockets on the back
- //MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- //MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ //SPEAKER(config, "lspeaker").front_left(); // no speaker in the unit, but there's a couple of sockets on the back
+ //SPEAKER(config, "rspeaker").front_right();
+ //sound.add_route(0, "lspeaker", 1.0);
+ //sound.add_route(1, "rspeaker", 1.0);
GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "picno_cart");
@@ -83,15 +77,19 @@ void picno_state::picno(machine_config &config)
}
ROM_START( picno )
- ROM_REGION16_BE(0x88000, "roms", 0)
+ ROM_REGION(0x8000, "maincpu", ROMREGION_ERASE00)
ROM_LOAD( "hd6435328f10.u5", 0x00000, 0x08000, NO_DUMP ) // internal rom
- ROM_LOAD( "rx001-z8-v3j.u2", 0x08000, 0x80000, CRC(e3c8929d) SHA1(1716f09b0a594b3782d257330282d77b6ca6fa0d) ) //HN62334BP
+
+ ROM_REGION(0x80000, "roms", 0)
+ ROM_LOAD( "rx001-z8-v3j.u2", 0x00000, 0x80000, CRC(e3c8929d) SHA1(1716f09b0a594b3782d257330282d77b6ca6fa0d) ) //HN62334BP
ROM_END
ROM_START( picno2 )
- ROM_REGION16_BE(0x88000, "roms", 0)
+ ROM_REGION(0x8000, "maincpu", ROMREGION_ERASE00)
ROM_LOAD( "hd6435328f10.u5", 0x00000, 0x08000, NO_DUMP ) // internal rom
- ROM_LOAD( "rx001-z8-v4j.u2", 0x08000, 0x80000, CRC(ae89a9a5) SHA1(51ed458ffd151e19019beb23517263efce4be272) ) //HN62334BP
+
+ ROM_REGION(0x80000, "roms", 0)
+ ROM_LOAD( "rx001-z8-v4j.u2", 0x00000, 0x80000, CRC(ae89a9a5) SHA1(51ed458ffd151e19019beb23517263efce4be272) ) //HN62334BP
ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
diff --git a/src/mame/drivers/pipeline.cpp b/src/mame/drivers/pipeline.cpp
index 9bee07159fe..5879f28940a 100644
--- a/src/mame/drivers/pipeline.cpp
+++ b/src/mame/drivers/pipeline.cpp
@@ -213,7 +213,7 @@ READ8_MEMBER(pipeline_state::protection_r)
TIMER_CALLBACK_MEMBER(pipeline_state::protection_deferred_w)
{
- m_mcu->pa_w(m_mcu->space(AS_PROGRAM), 0, param);
+ m_mcu->pa_w(param);
}
WRITE8_MEMBER(pipeline_state::protection_w)
diff --git a/src/mame/drivers/pktgaldx.cpp b/src/mame/drivers/pktgaldx.cpp
index f6d73c3d60c..4d403610520 100644
--- a/src/mame/drivers/pktgaldx.cpp
+++ b/src/mame/drivers/pktgaldx.cpp
@@ -362,8 +362,6 @@ void pktgaldx_state::pktgaldx(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/plus4.cpp b/src/mame/drivers/plus4.cpp
index adbae9c81a7..138418eeca5 100644
--- a/src/mame/drivers/plus4.cpp
+++ b/src/mame/drivers/plus4.cpp
@@ -280,13 +280,13 @@ uint8_t plus4_state::read_memory(address_space &space, offs_t offset, int ba, in
if (!scs && m_vslsi)
{
- data = m_vslsi->read(space, offset & 0x03);
+ data = m_vslsi->read(offset & 0x03);
}
else if (!user)
{
if (m_spi_user)
{
- data = m_spi_user->read(space, 0);
+ data = m_spi_user->read();
}
data &= ~0x04;
@@ -298,7 +298,7 @@ uint8_t plus4_state::read_memory(address_space &space, offs_t offset, int ba, in
}
else if (!keyport)
{
- data = m_spi_kb->read(space, 0);
+ data = m_spi_kb->read();
}
else if (!cs0)
{
@@ -407,11 +407,11 @@ WRITE8_MEMBER( plus4_state::write )
if (!scs && m_vslsi)
{
- m_vslsi->write(space, offset & 0x03, data);
+ m_vslsi->write(offset & 0x03, data);
}
else if (!user && m_spi_user)
{
- m_spi_user->write(space, 0, data);
+ m_spi_user->write(data);
}
else if (!_6551 && m_acia)
{
@@ -423,7 +423,7 @@ WRITE8_MEMBER( plus4_state::write )
}
else if (!keyport)
{
- m_spi_kb->write(space, 0, data);
+ m_spi_kb->write(data);
}
else if (offset < 0xfd00 || offset >= 0xff20)
{
diff --git a/src/mame/drivers/pntnpuzl.cpp b/src/mame/drivers/pntnpuzl.cpp
index 5c3be86461e..c456ab24e9e 100644
--- a/src/mame/drivers/pntnpuzl.cpp
+++ b/src/mame/drivers/pntnpuzl.cpp
@@ -368,7 +368,7 @@ void pntnpuzl_state::pntnpuzl(machine_config &config)
m_via->writepb_handler().append("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(5);
// CB2 used for serial communication with 8798
- i8x9x_device &mcu(P8098(config, "mcu", 12_MHz_XTAL)); // clock generated by ASIC
+ i8x9x_device &mcu(P8798(config, "mcu", 12_MHz_XTAL)); // clock generated by ASIC
mcu.set_addrmap(AS_PROGRAM, &pntnpuzl_state::mcu_map); // FIXME: this is all internal
mcu.ach6_cb().set_constant(0x180); // ?
mcu.ach7_cb().set_constant(0x180); // ?
diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp
index fd915b179cf..df390f444e0 100644
--- a/src/mame/drivers/proteus3.cpp
+++ b/src/mame/drivers/proteus3.cpp
@@ -173,7 +173,7 @@ void proteus3_state::kbd_put(u8 data)
{
if (data == 0x08)
data = 0x0f; // take care of backspace (bios 1 and 2)
- m_pia->write_portb(data);
+ m_pia->portb_w(data);
m_pia->cb1_w(1);
m_pia->cb1_w(0);
}
diff --git a/src/mame/drivers/psikyo.cpp b/src/mame/drivers/psikyo.cpp
index 07759e6b2a0..4a21b874d11 100644
--- a/src/mame/drivers/psikyo.cpp
+++ b/src/mame/drivers/psikyo.cpp
@@ -224,20 +224,20 @@ uint8_t psikyo_state::s1945_mcu_control_r()
}
template<int Layer>
-WRITE32_MEMBER(psikyo_state::vram_w)
+u16 psikyo_state::vram_r(offs_t offset)
+{
+ return m_vram[Layer][offset];
+}
+
+template<int Layer>
+void psikyo_state::vram_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_vram[Layer][offset]);
- for (int size = 0; size < 4; size++)
+ const u32 tilemap_indexes = m_tilemap[Layer]->rows() * m_tilemap[Layer]->cols();
+ while (offset < tilemap_indexes)
{
- if (ACCESSING_BITS_16_31)
- {
- m_tilemap[Layer][size]->mark_tile_dirty(offset * 2);
- }
-
- if (ACCESSING_BITS_0_15)
- {
- m_tilemap[Layer][size]->mark_tile_dirty(offset * 2 + 1);
- }
+ m_tilemap[Layer]->mark_tile_dirty(offset);
+ offset += 0x1000;
}
}
@@ -255,8 +255,8 @@ void psikyo_state::psikyo_map(address_map &map)
map(0x000000, 0x0fffff).rom(); // ROM (not all used)
map(0x400000, 0x401fff).ram().share("spriteram"); // Sprites, buffered by two frames (list buffered + fb buffered)
map(0x600000, 0x601fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); // Palette
- map(0x800000, 0x801fff).ram().w(FUNC(psikyo_state::vram_w<0>)).share("vram_0"); // Layer 0
- map(0x802000, 0x803fff).ram().w(FUNC(psikyo_state::vram_w<1>)).share("vram_1"); // Layer 1
+ map(0x800000, 0x801fff).rw(FUNC(psikyo_state::vram_r<0>), FUNC(psikyo_state::vram_w<0>)).share("vram_0"); // Layer 0
+ map(0x802000, 0x803fff).rw(FUNC(psikyo_state::vram_r<1>), FUNC(psikyo_state::vram_w<1>)).share("vram_1"); // Layer 1
map(0x804000, 0x807fff).ram().share("vregs"); // RAM + Vregs
// map(0xc00000, 0xc0000b).r(FUNC(psikyo_state::input_r)); // Depends on board
// map(0xc00004, 0xc0000b).w(FUNC(psikyo_state::s1945_mcu_w)); // MCU on sh404
@@ -290,8 +290,8 @@ void psikyo_state::psikyo_bootleg_map(address_map &map)
map(0x400000, 0x401fff).ram().share("spriteram"); // Sprites, buffered by two frames (list buffered + fb buffered)
map(0x600000, 0x601fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); // Palette
- map(0x800000, 0x801fff).ram().w(FUNC(psikyo_state::vram_w<0>)).share("vram_0"); // Layer 0
- map(0x802000, 0x803fff).ram().w(FUNC(psikyo_state::vram_w<1>)).share("vram_1"); // Layer 1
+ map(0x800000, 0x801fff).rw(FUNC(psikyo_state::vram_r<0>), FUNC(psikyo_state::vram_w<0>)).share("vram_0"); // Layer 0
+ map(0x802000, 0x803fff).rw(FUNC(psikyo_state::vram_r<1>), FUNC(psikyo_state::vram_w<1>)).share("vram_1"); // Layer 1
map(0x804000, 0x807fff).ram().share("vregs"); // RAM + Vregs
map(0xc00000, 0xc0000b).r(FUNC(psikyo_state::gunbird_input_r)); // input ports
@@ -990,20 +990,9 @@ INPUT_PORTS_END
***************************************************************************/
-static const gfx_layout layout_16x16x4 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- {STEP4(0,1)},
- {STEP16(0,4)},
- {STEP16(0,4*16)},
- 16*16*4
-};
-
static GFXDECODE_START( gfx_psikyo )
- GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x000, 0x20 ) // [0] Sprites
- GFXDECODE_ENTRY( "gfx2", 0, layout_16x16x4, 0x800, 0x48 ) // [1] Layer 0 + 1
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_16x16x4_packed_msb, 0x000, 0x20 ) // [0] Sprites
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_16x16x4_packed_msb, 0x800, 0x48 ) // [1] Layer 0 + 1
GFXDECODE_END
@@ -1053,7 +1042,6 @@ void psikyo_state::sngkace(machine_config &config)
m_screen->set_visarea(0, 320-1, 0, 256-32-1);
m_screen->set_screen_update(FUNC(psikyo_state::screen_update));
m_screen->screen_vblank().set(FUNC(psikyo_state::screen_vblank));
- m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_psikyo);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000);
@@ -1100,7 +1088,6 @@ void psikyo_state::gunbird(machine_config &config)
m_screen->set_visarea(0, 320-1, 0, 256-32-1);
m_screen->set_screen_update(FUNC(psikyo_state::screen_update));
m_screen->screen_vblank().set(FUNC(psikyo_state::screen_vblank));
- m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_psikyo);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000);
@@ -1142,7 +1129,6 @@ void psikyo_state::s1945bl(machine_config &config) /* Bootleg hardware based on
m_screen->set_visarea(0, 320-1, 0, 256-32-1);
m_screen->set_screen_update(FUNC(psikyo_state::screen_update_bootleg));
m_screen->screen_vblank().set(FUNC(psikyo_state::screen_vblank_bootleg));
- m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_psikyo);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000);
@@ -1186,7 +1172,6 @@ void psikyo_state::s1945(machine_config &config)
m_screen->set_visarea(0, 320-1, 0, 256-32-1);
m_screen->set_screen_update(FUNC(psikyo_state::screen_update));
m_screen->screen_vblank().set(FUNC(psikyo_state::screen_vblank));
- m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_psikyo);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000);
@@ -1249,7 +1234,7 @@ ROM_START( samuraia )
ROM_REGION( 0x100000, "ymsnd", 0 ) /* Samples */
ROM_LOAD( "u68.bin", 0x000000, 0x100000, CRC(9a7f6c34) SHA1(c549b209bce1d2c6eeb512db198ad20c3f5fb0ea) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u11.bin", 0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
ROM_END
@@ -1272,7 +1257,7 @@ ROM_START( sngkace )
ROM_REGION( 0x100000, "ymsnd", 0 ) /* Samples */
ROM_LOAD( "u68.bin", 0x000000, 0x100000, CRC(9a7f6c34) SHA1(c549b209bce1d2c6eeb512db198ad20c3f5fb0ea) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u11.bin", 0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
ROM_END
@@ -1295,7 +1280,7 @@ ROM_START( sngkacea ) // the roms have a very visible "." symbol after the numbe
ROM_REGION( 0x100000, "ymsnd", 0 ) /* Samples */
ROM_LOAD( "u68.bin", 0x000000, 0x100000, CRC(9a7f6c34) SHA1(c549b209bce1d2c6eeb512db198ad20c3f5fb0ea) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u11.bin", 0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
ROM_END
@@ -1341,7 +1326,7 @@ ROM_START( gunbird )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(e187ed4f) SHA1(05060723d89b1d05714447a14b5f5888ff3c2306) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u3.bin", 0x000000, 0x040000, CRC(0905aeb2) SHA1(8cca09f7dfe3f804e77515f7b1b1bdbeb7bb3d80) )
ROM_REGION( 0x0002, "pals", 0 )
@@ -1372,7 +1357,7 @@ ROM_START( gunbirdk )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(e187ed4f) SHA1(05060723d89b1d05714447a14b5f5888ff3c2306) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u3.bin", 0x000000, 0x040000, CRC(0905aeb2) SHA1(8cca09f7dfe3f804e77515f7b1b1bdbeb7bb3d80) )
ROM_END
@@ -1399,7 +1384,7 @@ ROM_START( gunbirdj )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(e187ed4f) SHA1(05060723d89b1d05714447a14b5f5888ff3c2306) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u3.bin", 0x000000, 0x040000, CRC(0905aeb2) SHA1(8cca09f7dfe3f804e77515f7b1b1bdbeb7bb3d80) )
ROM_END
@@ -1427,7 +1412,7 @@ ROM_START( btlkroad )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(0f33049f) SHA1(ca4fd5f3906685ace1af40b75f5678231d7324e8) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u3.bin", 0x000000, 0x040000, CRC(30d541ed) SHA1(6f7fb5f5ecbce7c086185392de164ebb6887e780) )
ROM_REGION( 0x0400, "plds", 0 )
@@ -1459,7 +1444,7 @@ ROM_START( btlkroadk )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(0f33049f) SHA1(ca4fd5f3906685ace1af40b75f5678231d7324e8) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u3.bin", 0x000000, 0x040000, CRC(30d541ed) SHA1(6f7fb5f5ecbce7c086185392de164ebb6887e780) )
ROM_REGION( 0x0400, "plds", 0 )
@@ -1506,7 +1491,7 @@ ROM_START( s1945n )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(a44a4a9b) SHA1(5378256752d709daed0b5f4199deebbcffe84e10) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
ROM_END
@@ -1533,7 +1518,7 @@ ROM_START( s1945nj )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* DELTA-T Samples */
ROM_LOAD( "u64.bin", 0x000000, 0x080000, CRC(a44a4a9b) SHA1(5378256752d709daed0b5f4199deebbcffe84e10) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
ROM_END
@@ -1555,7 +1540,7 @@ ROM_START( s1945bl ) /* closely based on s1945nj set, unsurprising because it's
ROM_REGION( 0x100000, "oki", 0 ) /* OKI Samples */
ROM_LOAD( "rv27c040.m6", 0x000000, 0x080000, CRC(c22e5b65) SHA1(d807bd7c136d6b51f54258b44ebf3eecbd5b35fa) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
// in 27c010-a 0x460E:01 but should 0x00. Might be bit rot or error when bootleggers copied U1 as all other graphics data matches.
ROM_LOAD16_BYTE( "27c010-b", 0x000000, 0x020000, CRC(e38d5ab7) SHA1(73a708ebc305cb6297efd3296da23c87898e805e) ) // u1.bin [even] IDENTICAL
ROM_LOAD16_BYTE( "27c010-a", 0x000001, 0x020000, CRC(cb8c65ec) SHA1(a55c5c5067b50a1243e7ba60fa1f9569bfed5de8) ) // u1.bin [odd] 99.999237%
@@ -1662,7 +1647,7 @@ ROM_START( s1945 )
ROM_REGION( 0x400000, "ymf", 0 ) /* Samples */
ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(a839cf47) SHA1(e179eb505c80d5bb3ccd9e228f2cf428c62b72ee) ) // 8 bit signed pcm (16KHz)
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
ROM_END
@@ -1690,7 +1675,7 @@ ROM_START( s1945a )
ROM_REGION( 0x400000, "ymf", 0 ) /* Samples */
ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(a839cf47) SHA1(e179eb505c80d5bb3ccd9e228f2cf428c62b72ee) ) // 8 bit signed pcm (16KHz)
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
ROM_END
@@ -1718,7 +1703,7 @@ ROM_START( s1945j )
ROM_REGION( 0x400000, "ymf", 0 ) /* Samples */
ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(a839cf47) SHA1(e179eb505c80d5bb3ccd9e228f2cf428c62b72ee) ) // 8 bit signed pcm (16KHz)
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
ROM_END
@@ -1746,7 +1731,7 @@ ROM_START( s1945k ) /* Same MCU as the current parent set, region dip has no eff
ROM_REGION( 0x400000, "ymf", 0 ) /* Samples */
ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(a839cf47) SHA1(e179eb505c80d5bb3ccd9e228f2cf428c62b72ee) ) // 8 bit signed pcm (16KHz)
- ROM_REGION( 0x040000, "spritelut", 0 ) /* */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(dee22654) SHA1(5df05b0029ff7b1f7f04b41da7823d2aa8034bd2) )
ROM_END
@@ -1796,7 +1781,7 @@ ROM_START( tengai )
ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(a63633c5) SHA1(89e75a40518926ebcc7d88dea86c01ba0bb496e5) ) // 8 bit signed pcm (16KHz)
ROM_LOAD( "u62.bin", 0x200000, 0x200000, CRC(3ad0c357) SHA1(35f78cfa2eafa93ab96b24e336f569ee84af06b6) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(681d7d55) SHA1(b0b28471440d747adbc4d22d1918f89f6ede1615) )
ROM_END
@@ -1824,7 +1809,7 @@ ROM_START( tengaij )
ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(a63633c5) SHA1(89e75a40518926ebcc7d88dea86c01ba0bb496e5) ) // 8 bit signed pcm (16KHz)
ROM_LOAD( "u62.bin", 0x200000, 0x200000, CRC(3ad0c357) SHA1(35f78cfa2eafa93ab96b24e336f569ee84af06b6) )
- ROM_REGION( 0x040000, "spritelut", 0 ) /* Sprites LUT */
+ ROM_REGION16_LE( 0x040000, "spritelut", 0 ) /* Sprites LUT */
ROM_LOAD( "u1.bin", 0x000000, 0x040000, CRC(681d7d55) SHA1(b0b28471440d747adbc4d22d1918f89f6ede1615) )
ROM_END
diff --git a/src/mame/drivers/punchout.cpp b/src/mame/drivers/punchout.cpp
index 2b64436a90c..503d74a0a3a 100644
--- a/src/mame/drivers/punchout.cpp
+++ b/src/mame/drivers/punchout.cpp
@@ -209,7 +209,7 @@ READ8_MEMBER(punchout_state::spunchout_exp_r)
// d5: _ALARM from RP5C01
// d6: COUNTER OUT from RP5H01
// d7: DATA OUT from RP5H01 - always 0?
- uint8_t ret = m_rtc->read(space, offset >> 4 & 0xf) & 0xf;
+ uint8_t ret = m_rtc->read(offset >> 4 & 0xf) & 0xf;
ret |= 0x10;
ret |= m_rtc->alarm_r() ? 0x00 : 0x20;
ret |= m_rp5h01->counter_r() ? 0x00 : 0x40;
@@ -221,7 +221,7 @@ READ8_MEMBER(punchout_state::spunchout_exp_r)
WRITE8_MEMBER(punchout_state::spunchout_exp_w)
{
// d0-d3: D0-D3 to RP5C01
- m_rtc->write(space, offset >> 4 & 0xf, data & 0xf);
+ m_rtc->write(offset >> 4 & 0xf, data & 0xf);
}
WRITE8_MEMBER(punchout_state::spunchout_rp5h01_reset_w)
diff --git a/src/mame/drivers/pv1000.cpp b/src/mame/drivers/pv1000.cpp
index 1ca3c7fa860..ea64fcaa2b8 100644
--- a/src/mame/drivers/pv1000.cpp
+++ b/src/mame/drivers/pv1000.cpp
@@ -150,7 +150,7 @@ public:
private:
DECLARE_WRITE8_MEMBER(io_w);
DECLARE_READ8_MEMBER(io_r);
- DECLARE_WRITE8_MEMBER(gfxram_w);
+ void gfxram_w(offs_t offset, uint8_t data);
uint8_t m_io_regs[8];
uint8_t m_fd_data;
@@ -197,7 +197,7 @@ void pv1000_state::pv1000_io(address_map &map)
}
-WRITE8_MEMBER( pv1000_state::gfxram_w )
+void pv1000_state::gfxram_w(offs_t offset, uint8_t data)
{
uint8_t *gfxram = memregion( "gfxram" )->base();
@@ -382,7 +382,7 @@ void pv1000_state::pv1000_postload()
{
// restore GFX ram
for (int i = 0; i < 0x400; i++)
- gfxram_w(m_maincpu->space(AS_PROGRAM), i, m_gfxram[i]);
+ gfxram_w(i, m_gfxram[i]);
}
void pv1000_state::machine_start()
diff --git a/src/mame/drivers/px8.cpp b/src/mame/drivers/px8.cpp
index 98288519fa8..a925282f4ac 100644
--- a/src/mame/drivers/px8.cpp
+++ b/src/mame/drivers/px8.cpp
@@ -21,7 +21,7 @@
- display
- jumpers
- ROM capsule
- - uPD7001
+ - uPD7001 (controlled by uPD7508)
- RAM disk (64K/128K RAM, Z80, 4K ROM)
- modem (82C55)
- Multi-Unit (60K RAM, ROM capsule, modem, 82C55)
@@ -32,6 +32,8 @@
#include "emu.h"
#include "includes/px8.h"
+#include "machine/rescap.h"
+#include "machine/upd7001.h"
#include "screen.h"
#include "softlist.h"
#include "speaker.h"
@@ -744,8 +746,8 @@ void px8_state::px8(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &px8_state::px8_mem);
m_maincpu->set_addrmap(AS_IO, &px8_state::px8_io);
- /* slave cpu (HD6303) */
- m6803_cpu_device &slave(M6803(config, HD6303_TAG, XTAL_CR1 / 4)); /* 614 kHz */
+ /* slave cpu (HD6303CA) */
+ hd6301_cpu_device &slave(HD6301V1(config, HD6303_TAG, XTAL_CR1 / 4)); /* 614 kHz */
slave.set_addrmap(AS_PROGRAM, &px8_state::px8_slave_mem);
slave.set_disable();
@@ -776,7 +778,9 @@ void px8_state::px8(machine_config &config)
GENERIC_CARTSLOT(config, "capsule2", generic_plain_slot, "px8_cart", "bin,rom");
/* devices */
- I8251(config, I8251_TAG, 0);
+ I8251(config, I8251_TAG, XTAL_CR1 / 4);
+
+ UPD7001(config, UPD7001_TAG, RES_K(27), CAP_P(47));
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
diff --git a/src/mame/drivers/quasar.cpp b/src/mame/drivers/quasar.cpp
index abc220960fb..4bb931d739c 100644
--- a/src/mame/drivers/quasar.cpp
+++ b/src/mame/drivers/quasar.cpp
@@ -272,7 +272,7 @@ GFXDECODE_END
INTERRUPT_GEN_MEMBER(quasar_state::quasar_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
// ****************************************
@@ -307,6 +307,7 @@ void quasar_state::quasar(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &quasar_state::quasar_data);
m_maincpu->set_vblank_int("screen", FUNC(quasar_state::quasar_interrupt));
m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));
+ m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
i8035_device &soundcpu(I8035(config, "soundcpu", 6000000)); /* 6MHz crystal divide by 15 in CPU */
soundcpu.set_addrmap(AS_PROGRAM, &quasar_state::sound_map);
diff --git a/src/mame/drivers/raiden2.cpp b/src/mame/drivers/raiden2.cpp
index e25baea3afe..097fd061c7d 100644
--- a/src/mame/drivers/raiden2.cpp
+++ b/src/mame/drivers/raiden2.cpp
@@ -1306,8 +1306,8 @@ ROM_START( raiden2 )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1347,8 +1347,8 @@ ROM_START( raiden2g )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1407,8 +1407,8 @@ ROM_START( raiden2hk )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1483,8 +1483,8 @@ ROM_START( raiden2j )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1524,8 +1524,8 @@ ROM_START( raiden2sw ) // original board with serial # 0008307
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1565,8 +1565,8 @@ ROM_START( raiden2f ) // original board with serial # 12476 that matches raiden2
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1606,8 +1606,8 @@ ROM_START( raiden2nl )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1647,8 +1647,8 @@ ROM_START( raiden2u )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1688,8 +1688,8 @@ ROM_START( raiden2i )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1730,8 +1730,8 @@ ROM_START( raiden2k )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1788,8 +1788,8 @@ ROM_START( raiden2e )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1829,8 +1829,8 @@ ROM_START( raiden2ea )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1870,8 +1870,8 @@ ROM_START( raiden2eu ) // same as raiden2ea, different region
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1915,8 +1915,8 @@ ROM_START( raiden2eua ) // sort of a mixture of raiden2e easy set with voice ROM
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -1960,8 +1960,8 @@ ROM_START( raiden2eg ) // this is the same code revision as raiden2eua but a ger
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -2005,8 +2005,8 @@ ROM_START( raiden2eup )
// Common Raiden II PALs below
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "jj4b02__ami18cv8-15.u0342.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341.jed", 0x0000, 0x335, CRC(d1a039af) SHA1(f88ff8674d5be17ae9085b51aefcf6abf0574883) )
+ ROM_LOAD( "jj4b02__ami18cv8-15.u0342", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "jj4b01__mmipal16l8bcn.u0341", 0x0000, 0x117, CRC(20931f21) SHA1(95ce9cfbfb280dfc6a326e378684eff3c6f54701) )
// Common Raiden II soldered mask ROMs below
ROM_REGION( 0x40000, "user2", 0 ) /* COPX */
@@ -2586,10 +2586,10 @@ ROM_START( zeroteam ) // Fabtek, US licensee, displays 'USA' under zero team log
ROM_LOAD( "seibu__6.u105.4a", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // alternate label "6"
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
ROM_START( zeroteama ) // No licensee, original japan?
@@ -2623,10 +2623,10 @@ ROM_START( zeroteama ) // No licensee, original japan?
ROM_LOAD( "6.u105.4a", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.bin
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
/* this set, consisting of updated program ROMs, is a later version or hack of zero team to incorporate the writing
@@ -2667,10 +2667,10 @@ ROM_START( zeroteamb ) // No licensee, later japan?
ROM_LOAD( "6.u105.4a", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.4a
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
ROM_START( zeroteamc ) // Liang Hwa, Taiwan licensee, no special word under logo on title
@@ -2704,10 +2704,10 @@ ROM_START( zeroteamc ) // Liang Hwa, Taiwan licensee, no special word under logo
ROM_LOAD( "6.c.u105.4a", 0x00000, 0x40000, CRC(b4a6e899) SHA1(175ab656db3c3258ff10eede89890f62435d2298) )
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
ROM_START( zeroteamd ) // Dream Soft, Korea licensee, no special word under logo on title; board had serial 'no 1041' on it.
@@ -2742,10 +2742,10 @@ ROM_START( zeroteamd ) // Dream Soft, Korea licensee, no special word under logo
ROM_LOAD( "8.u105.4a", 0x00000, 0x40000, CRC(b4a6e899) SHA1(175ab656db3c3258ff10eede89890f62435d2298) ) // same ROM as '6' labeled one in zeroteamc above but has '8' written on label in pen
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
// A version of the above exists (which dr.kitty used to own) which DOES have 'Korea' under the logo on title, needs dumping
@@ -2780,10 +2780,10 @@ ROM_START( zeroteams ) // No license, displays 'Selection' under logo
ROM_LOAD( "6.u105.4a", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.bin
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
/*
@@ -2829,10 +2829,10 @@ ROM_START( zeroteamsr )
ROM_LOAD( "6.u105.4a", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.4a
ROM_REGION( 0x10000, "pals", 0 ) /* PALS */
- ROM_LOAD( "v3c001.pal.u0310.jed", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
- ROM_LOAD( "v3c002.tibpal16l8-25.u0322.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c003.ami18cv8p-15.u0619.jed", 0x0000, 0x288, NO_DUMP)
- ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310.jed", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
+ ROM_LOAD( "v3c001.pal.u0310", 0x0000, 0x288, NO_DUMP) // located UNDER v3c004x, unknown pal type
+ ROM_LOAD( "v3c002.tibpal16l8-25.u0322", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c003.ami18cv8p-15.u0619", 0x0000, 0x288, NO_DUMP)
+ ROM_LOAD( "v3c004x.ami18cv8pc-25.u0310", 0x0000, 0x288, NO_DUMP) // located piggybacking on v3c001 and attached to some rework wires
ROM_END
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index 2d8fa1b174b..9104616d519 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -1640,7 +1640,7 @@ READ8_MEMBER(rainbow_base_state::corvus_status_r)
output().set_value("led2", 0);
switch_off_timer->adjust(attotime::from_msec(500));
- uint8_t status = m_corvus_hdc->status_r(space, 0);
+ uint8_t status = m_corvus_hdc->status_r();
uint8_t data = BIT(status, 7); // 0x80 BUSY (Set = Busy, Clear = Ready)
data |= BIT(status, 6) << 1; // 0x40 DIR. (Controller -> Host, or Host->Controller)
return data;
diff --git a/src/mame/drivers/rfslots8085.cpp b/src/mame/drivers/rfslots8085.cpp
new file mode 100644
index 00000000000..ce9eed19762
--- /dev/null
+++ b/src/mame/drivers/rfslots8085.cpp
@@ -0,0 +1,128 @@
+// license:BSD-3-Clause
+// copyright-holders:
+/***************************************************************************
+
+ 8085-based slots by Recreativos Franco
+
+ IC17 = NEC uPD8155HC-2 Static RAM I/O Timer
+ IC21 = NEC uPD8279C-2 Programmable Keyboard Display Interface
+ IC24 = Toshiba TMP8255AP-5 Programmable Peripheral Interface
+ IC32 = 27C128
+ IC34 = Toshiba TC5517APL 2.048 Word X 8 Bit CMOS Static RAM
+ IC31 = uPD8085AC CPU (Xtal 5.0688 MHz)
+ IC33 = AMD P8212 8-Bit IO Port
+ IC40 = Signetics SCN8035A MCU (Xtal 6.000 MHz)
+ IC44 = 27128
+ IC39 = AY-3-8910A
+ IC38 = AY-3-8910A
+
+***************************************************************************/
+
+#include "emu.h"
+#include "cpu/i8085/i8085.h"
+#include "cpu/mcs48/mcs48.h"
+#include "machine/i8155.h"
+#include "machine/i8212.h"
+#include "machine/i8255.h"
+#include "machine/i8279.h"
+#include "sound/ay8910.h"
+#include "speaker.h"
+
+class rfslots8085_state : public driver_device
+{
+public:
+ rfslots8085_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ {
+ }
+
+ void unkrfslt(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ void main_io_map(address_map &map);
+ void main_map(address_map &map);
+ void sound_io_map(address_map &map);
+ void sound_map(address_map &map);
+
+ required_device<i8085a_cpu_device> m_maincpu;
+ required_device<i8035_device> m_audiocpu;
+};
+
+void rfslots8085_state::machine_start()
+{
+}
+
+void rfslots8085_state::main_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x8000, 0x87ff).ram();
+}
+
+void rfslots8085_state::main_io_map(address_map &map)
+{
+ map.global_mask(0xff);
+}
+
+void rfslots8085_state::sound_map(address_map &map)
+{
+ map(0x000, 0xfff).rom(); // external EPROM
+}
+
+void rfslots8085_state::sound_io_map(address_map &map)
+{
+}
+
+static INPUT_PORTS_START(unkrfslt)
+ PORT_START("DSW") // 1 x 6-dips bank
+ PORT_BIT(0x80, 0x80, IPT_UNKNOWN)
+ PORT_BIT(0x40, 0x40, IPT_UNKNOWN)
+ PORT_BIT(0x20, 0x20, IPT_UNKNOWN)
+ PORT_BIT(0x10, 0x10, IPT_UNKNOWN)
+ PORT_BIT(0x08, 0x08, IPT_UNKNOWN)
+ PORT_BIT(0x04, 0x04, IPT_UNKNOWN)
+ PORT_BIT(0x02, 0x02, IPT_UNKNOWN)
+ PORT_BIT(0x01, 0x01, IPT_UNKNOWN)
+INPUT_PORTS_END
+
+void rfslots8085_state::unkrfslt(machine_config &config)
+{
+ I8085A(config, m_maincpu, 5.0688_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &rfslots8085_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &rfslots8085_state::main_io_map);
+
+ I8035(config, m_audiocpu, 6_MHz_XTAL / 2); // divider unknown
+ m_audiocpu->set_addrmap(AS_PROGRAM, &rfslots8085_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &rfslots8085_state::sound_io_map);
+
+ I8155(config, "i8155", 0);
+
+ I8255(config, "i8255");
+
+ I8212(config, "i8212");
+
+ I8279(config, "i8279", 0);
+
+ SPEAKER(config, "mono").front_center();
+
+ AY8910(config, "ay0", 6_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.50); // divider unknown
+
+ AY8910(config, "ay1", 6_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.50); // divider unknown
+}
+
+// May be "Limon y Baby 100"
+ROM_START(unkrfslt)
+ ROM_REGION(0x4000, "maincpu", 0)
+ ROM_LOAD("m1-31_b_1704.ic32", 0x0000, 0x4000, CRC(a74a85b7) SHA1(f562495a6b97f34165cc9fd5c750664701cac21f))
+
+ ROM_REGION(0x1000, "audiocpu", 0)
+ ROM_LOAD( "8a.ic44", 0x0000, 0x1000, CRC(51b564b6) SHA1(8992a5cb4dff8c6b38b77a7e0199a71f2969b496) )
+ ROM_IGNORE( 0x3000 ) // 0xff filled and it's outside of the 8035's global address mask (fff)
+ROM_END
+
+// Date "25-05-87" engraved on the PCB
+GAME( 1987?, unkrfslt, 0, unkrfslt, unkrfslt, rfslots8085_state, empty_init, ROT0, "Recreativos Franco", "unknown Recreativos Franco slot machine", MACHINE_IS_SKELETON_MECHANICAL )
diff --git a/src/mame/drivers/rmhaihai.cpp b/src/mame/drivers/rmhaihai.cpp
index 09c913747fe..071bed5a799 100644
--- a/src/mame/drivers/rmhaihai.cpp
+++ b/src/mame/drivers/rmhaihai.cpp
@@ -48,20 +48,20 @@ public:
m_msm(*this, "msm"),
m_gfxdecode(*this, "gfxdecode"),
m_colorram(*this, "colorram"),
- m_videoram(*this, "videoram")
+ m_videoram(*this, "videoram"),
+ m_key(*this, "KEY%u", 0)
{ }
void init_rmhaihai();
void rmhaihai(machine_config &config);
protected:
- DECLARE_WRITE8_MEMBER(videoram_w);
- DECLARE_WRITE8_MEMBER(colorram_w);
- DECLARE_READ8_MEMBER(keyboard_r);
- DECLARE_WRITE8_MEMBER(keyboard_w);
- DECLARE_READ8_MEMBER(samples_r);
- DECLARE_WRITE8_MEMBER(ctrl_w);
- DECLARE_WRITE8_MEMBER(adpcm_w);
+ void videoram_w(offs_t offset, uint8_t data);
+ void colorram_w(offs_t offset, uint8_t data);
+ uint8_t keyboard_r();
+ void keyboard_w(uint8_t data);
+ void ctrl_w(uint8_t data);
+ void adpcm_w(uint8_t data);
virtual void video_start() override;
@@ -79,9 +79,11 @@ protected:
required_shared_ptr<uint8_t> m_colorram;
required_shared_ptr<uint8_t> m_videoram;
+ required_ioport_array<2> m_key;
+
tilemap_t *m_bg_tilemap;
- int m_keyboard_cmd;
- int m_gfxbank;
+ uint8_t m_keyboard_cmd;
+ uint8_t m_gfxbank;
};
@@ -96,26 +98,34 @@ public:
class themj_state : public rmhaihai_state
{
public:
- using rmhaihai_state::rmhaihai_state;
+ themj_state(const machine_config &mconfig, device_type type, const char *tag) :
+ rmhaihai_state(mconfig, type, tag),
+ m_cpubank(*this, "cpubank%u", 1)
+ { }
+
void themj(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
+
+private:
+ required_memory_bank_array<2> m_cpubank;
+
void themj_io_map(address_map &map);
void themj_map(address_map &map);
- DECLARE_WRITE8_MEMBER(themj_rombank_w);
+ void themj_rombank_w(uint8_t data);
};
-WRITE8_MEMBER(rmhaihai_state::videoram_w)
+void rmhaihai_state::videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(rmhaihai_state::colorram_w)
+void rmhaihai_state::colorram_w(offs_t offset, uint8_t data)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
@@ -148,34 +158,30 @@ uint32_t rmhaihai_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
// TODO: this device is shared with Speed Attack
-READ8_MEMBER(rmhaihai_state::keyboard_r)
+uint8_t rmhaihai_state::keyboard_r()
{
- static const char *const keynames[] = { "KEY0", "KEY1" };
-
logerror("%04x: keyboard_r\n",m_maincpu->pc());
switch(m_maincpu->pc())
{
- /* read keyboard */
+ // read keyboard
case 0x0280:
case 0x0aba: // rmhaihai, rmhaisei
case 0x0b2a: // rmhaihib
case 0x0ab4: // rmhaijin
case 0x0aea: // themj
{
- int i;
-
- for (i = 0; i < 31; i++)
+ for (int i = 0; i < 31; i++)
{
- if (ioport(keynames[i/16])->read() & (1 << (i & 15))) return i+1;
+ if (m_key[i/16]->read() & (1 << (i & 15))) return i+1;
}
- if (ioport("KEY1")->read() & 0x8000) return 0x80; // coin
+ if (m_key[1]->read() & 0x8000) return 0x80; // coin
return 0;
}
case 0x02aa:
case 0x5c7b: // rmhaihai, rmhaisei, rmhaijin
case 0x5950: // rmhaihib
case 0x5bf3: // themj, but the test is NOPed out!
- return 0xcc; /* keyboard_cmd = 0xcb */
+ return 0xcc; // keyboard_cmd = 0xcb
case 0x13a: // additional checks done by rmhaijin
@@ -196,29 +202,24 @@ READ8_MEMBER(rmhaihai_state::keyboard_r)
return 0;
}
- /* there are many more reads whose function is unknown, returning 0 seems fine */
+ // there are many more reads whose function is unknown, returning 0 seems fine
return 0;
}
-WRITE8_MEMBER(rmhaihai_state::keyboard_w)
+void rmhaihai_state::keyboard_w(uint8_t data)
{
-logerror("%04x: keyboard_w %02x\n",m_maincpu->pc(),data);
+ logerror("%04x: keyboard_w %02x\n",m_maincpu->pc(),data);
m_keyboard_cmd = data;
}
-READ8_MEMBER(rmhaihai_state::samples_r)
-{
- return memregion("adpcm")->base()[offset];
-}
-
-WRITE8_MEMBER(rmhaihai_state::adpcm_w)
+void rmhaihai_state::adpcm_w(uint8_t data)
{
m_msm->data_w(data); // bit0..3
m_msm->reset_w(BIT(data, 5)); // bit 5
m_msm->vclk_w(BIT(data, 4)); // bit4
}
-WRITE8_MEMBER(rmhaihai_state::ctrl_w)
+void rmhaihai_state::ctrl_w(uint8_t data)
{
flip_screen_set(data & 0x01);
@@ -229,26 +230,26 @@ WRITE8_MEMBER(rmhaihai_state::ctrl_w)
// (data & 0x10) is medal in service mode
- m_gfxbank = (data & 0x40) >> 6; /* rmhaisei only */
+ m_gfxbank = (data & 0x40) >> 6; // rmhaisei only
}
-WRITE8_MEMBER(themj_state::themj_rombank_w)
+void themj_state::themj_rombank_w(uint8_t data)
{
logerror("banksw %d\n", data & 0x03);
- membank("bank1")->set_entry(data & 0x03);
- membank("bank2")->set_entry(data & 0x03);
+ m_cpubank[0]->set_entry(data & 0x03);
+ m_cpubank[1]->set_entry(data & 0x03);
}
void themj_state::machine_start()
{
- membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
- membank("bank2")->configure_entries(0, 4, memregion("maincpu")->base() + 0x12000, 0x4000);
+ m_cpubank[0]->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
+ m_cpubank[1]->configure_entries(0, 4, memregion("maincpu")->base() + 0x12000, 0x4000);
}
void themj_state::machine_reset()
{
- membank("bank1")->set_entry(0);
- membank("bank2")->set_entry(0);
+ m_cpubank[0]->set_entry(0);
+ m_cpubank[1]->set_entry(0);
}
@@ -257,17 +258,17 @@ void rmhaihai_state::rmhaihai_map(address_map &map)
{
map(0x0000, 0x9fff).rom();
map(0xa000, 0xa7ff).ram().share("nvram");
- map(0xa800, 0xafff).ram().w(FUNC(rmhaihai_state::colorram_w)).share("colorram");
- map(0xb000, 0xb7ff).ram().w(FUNC(rmhaihai_state::videoram_w)).share("videoram");
+ map(0xa800, 0xafff).ram().w(FUNC(rmhaihai_state::colorram_w)).share(m_colorram);
+ map(0xb000, 0xb7ff).ram().w(FUNC(rmhaihai_state::videoram_w)).share(m_videoram);
map(0xb83c, 0xb83c).nopw(); // ??
map(0xbc00, 0xbc00).nopw(); // ??
map(0xc000, 0xdfff).rom();
- map(0xe000, 0xffff).rom(); /* rmhaisei only */
+ map(0xe000, 0xffff).rom(); // rmhaisei only
}
void rmhaihai_state::rmhaihai_io_map(address_map &map)
{
- map(0x0000, 0x7fff).r(FUNC(rmhaihai_state::samples_r));
+ map(0x0000, 0x7fff).rom().region("adpcm", 0);
map(0x8000, 0x8000).r(FUNC(rmhaihai_state::keyboard_r)).nopw(); // ??
map(0x8001, 0x8001).nopr().w(FUNC(rmhaihai_state::keyboard_w)); // ??
map(0x8020, 0x8020).r("aysnd", FUNC(ay8910_device::data_r));
@@ -282,17 +283,17 @@ void rmhaihai_state::rmhaihai_io_map(address_map &map)
void themj_state::themj_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
- map(0x8000, 0x9fff).bankr("bank1");
+ map(0x8000, 0x9fff).bankr(m_cpubank[0]);
map(0xa000, 0xa7ff).ram();
- map(0xa800, 0xafff).ram().w(FUNC(themj_state::colorram_w)).share("colorram");
- map(0xb000, 0xb7ff).ram().w(FUNC(themj_state::videoram_w)).share("videoram");
- map(0xc000, 0xdfff).bankr("bank2");
+ map(0xa800, 0xafff).ram().w(FUNC(themj_state::colorram_w)).share(m_colorram);
+ map(0xb000, 0xb7ff).ram().w(FUNC(themj_state::videoram_w)).share(m_videoram);
+ map(0xc000, 0xdfff).bankr(m_cpubank[1]);
map(0xe000, 0xffff).rom();
}
void themj_state::themj_io_map(address_map &map)
{
- map(0x0000, 0x7fff).r(FUNC(themj_state::samples_r));
+ map(0x0000, 0x7fff).rom().region("adpcm", 0);
map(0x8000, 0x8000).r(FUNC(themj_state::keyboard_r)).nopw(); // ??
map(0x8001, 0x8001).nopr().w(FUNC(themj_state::keyboard_w)); // ??
map(0x8020, 0x8020).r("aysnd", FUNC(ay8910_device::data_r));
@@ -382,7 +383,7 @@ static INPUT_PORTS_START( mjctrl )
INPUT_PORTS_END
static INPUT_PORTS_START( rmhaihai )
- PORT_START("DSW2") /* dsw2 */
+ PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, "Unknown 2-1" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -396,7 +397,7 @@ static INPUT_PORTS_START( rmhaihai )
PORT_DIPSETTING( 0xfa, "7" )
PORT_DIPSETTING( 0xfc, "8 (Difficult)" )
- PORT_START("DSW1") /* dsw1 */
+ PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Free_Play ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -423,7 +424,7 @@ static INPUT_PORTS_START( rmhaihai )
INPUT_PORTS_END
static INPUT_PORTS_START( rmhaihib )
- PORT_START("DSW2") /* dsw2 */
+ PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, "Unknown 2-1" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -448,7 +449,7 @@ static INPUT_PORTS_START( rmhaihib )
PORT_DIPSETTING( 0x20, "30%" )
PORT_DIPSETTING( 0x00, "20%" )
- PORT_START("DSW1") /* dsw1 */
+ PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Bet Max" )
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPSETTING( 0x00, "2" )
@@ -476,9 +477,9 @@ static INPUT_PORTS_START( rmhaihib )
// PORT_START("EXTRA") // 11
// PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_3)
-// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE4 ) /* RAM clear */
+// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE4 ) // RAM clear
// PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
-// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Analyzer */
+// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
// PORT_BIT( 0xF0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -506,15 +507,15 @@ GFXDECODE_END
void rmhaihai_state::rmhaihai(machine_config &config)
{
- /* basic machine hardware */
- Z80(config, m_maincpu, 20000000/4); /* 5 MHz ??? */
+ // basic machine hardware
+ Z80(config, m_maincpu, 20000000/4); // 5 MHz ???
m_maincpu->set_addrmap(AS_PROGRAM, &rmhaihai_state::rmhaihai_map);
m_maincpu->set_addrmap(AS_IO, &rmhaihai_state::rmhaihai_io_map);
m_maincpu->set_vblank_int("screen", FUNC(rmhaihai_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- /* video hardware */
+ // video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
@@ -526,7 +527,7 @@ void rmhaihai_state::rmhaihai(machine_config &config)
GFXDECODE(config, m_gfxdecode, "palette", gfx_rmhaihai);
PALETTE(config, "palette", palette_device::RGB_444_PROMS, "proms", 0x100);
- /* sound hardware */
+ // sound hardware
SPEAKER(config, "mono").front_center();
ay8910_device &aysnd(AY8910(config, "aysnd", 20000000/16));
@@ -543,7 +544,7 @@ void rmhaisei_state::rmhaisei(machine_config &config)
{
rmhaihai(config);
- /* video hardware */
+ // video hardware
m_gfxdecode->set_info(gfx_themj);
subdevice<palette_device>("palette")->set_entries(0x200);
}
@@ -552,13 +553,13 @@ void themj_state::themj(machine_config &config)
{
rmhaihai(config);
- /* basic machine hardware */
+ // basic machine hardware
m_maincpu->set_addrmap(AS_PROGRAM, &themj_state::themj_map);
m_maincpu->set_addrmap(AS_IO, &themj_state::themj_io_map);
config.device_remove("nvram");
- /* video hardware */
+ // video hardware
m_gfxdecode->set_info(gfx_themj);
subdevice<palette_device>("palette")->set_entries(0x200);
}
@@ -587,14 +588,14 @@ ROM_START( rmhaihai )
ROM_LOAD( "s1-7.5a", 0x0c000, 0x4000, CRC(be59e742) SHA1(19d253f72f760f6350f76b313cf8aca7e3f90e8d) )
ROM_LOAD( "s0-12.11a", 0x10000, 0x4000, CRC(e4229389) SHA1(b14d7855b66fe03c1485cb735cb20f59f19f248f) )
ROM_LOAD( "s1-11.10a", 0x14000, 0x4000, CRC(029ef909) SHA1(fd867b8e1ccd5b88f18409ff17939ec8420c6131) )
- /* 0x18000-0x1ffff empty space filled by the init function */
+ // 0x18000-0x1ffff empty space filled by the init function
ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "s2.13b", 0x0000, 0x0100, CRC(911d32a5) SHA1(36f2b62009918862c13f3eda05a21403b4d9607f) )
ROM_LOAD( "s1.13a", 0x0100, 0x0100, CRC(e9be978a) SHA1(50c7ca7a7496cb6fe5e8ce0db693ccb82dbbb8c6) )
ROM_LOAD( "s3.13c", 0x0200, 0x0100, CRC(609775a6) SHA1(70a787aec0852e106216a4ca9891d36aef60b189) )
- ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples, read directly by the main CPU */
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
ROM_LOAD( "s0-1.5g", 0x00000, 0x8000, CRC(65e55b7e) SHA1(3852fb3b37eccdcddff05d8ef4a742fcb8b63473) )
ROM_END
@@ -614,14 +615,14 @@ ROM_START( rmhaihai2 )
ROM_LOAD( "s1-7.5a", 0x0c000, 0x4000, CRC(be59e742) SHA1(19d253f72f760f6350f76b313cf8aca7e3f90e8d) )
ROM_LOAD( "s0-12.11a", 0x10000, 0x4000, CRC(e4229389) SHA1(b14d7855b66fe03c1485cb735cb20f59f19f248f) )
ROM_LOAD( "s1-11.10a", 0x14000, 0x4000, CRC(029ef909) SHA1(fd867b8e1ccd5b88f18409ff17939ec8420c6131) )
- /* 0x18000-0x1ffff empty space filled by the init function */
+ // 0x18000-0x1ffff empty space filled by the init function
ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "s2.13b", 0x0000, 0x0100, CRC(911d32a5) SHA1(36f2b62009918862c13f3eda05a21403b4d9607f) )
ROM_LOAD( "s1.13a", 0x0100, 0x0100, CRC(e9be978a) SHA1(50c7ca7a7496cb6fe5e8ce0db693ccb82dbbb8c6) )
ROM_LOAD( "s3.13c", 0x0200, 0x0100, CRC(609775a6) SHA1(70a787aec0852e106216a4ca9891d36aef60b189) )
- ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples, read directly by the main CPU */
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
ROM_LOAD( "s0-1.5g", 0x00000, 0x8000, CRC(65e55b7e) SHA1(3852fb3b37eccdcddff05d8ef4a742fcb8b63473) )
ROM_END
@@ -641,14 +642,14 @@ ROM_START( rmhaihib )
ROM_LOAD( "s1-7.5a", 0x0c000, 0x4000, CRC(be59e742) SHA1(19d253f72f760f6350f76b313cf8aca7e3f90e8d) )
ROM_LOAD( "s0-12.11a", 0x10000, 0x4000, CRC(e4229389) SHA1(b14d7855b66fe03c1485cb735cb20f59f19f248f) )
ROM_LOAD( "s1-11.10a", 0x14000, 0x4000, CRC(029ef909) SHA1(fd867b8e1ccd5b88f18409ff17939ec8420c6131) )
- /* 0x18000-0x1ffff empty space filled by the init function */
+ // 0x18000-0x1ffff empty space filled by the init function
ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "s2.13b", 0x0000, 0x0100, CRC(911d32a5) SHA1(36f2b62009918862c13f3eda05a21403b4d9607f) )
ROM_LOAD( "s1.13a", 0x0100, 0x0100, CRC(e9be978a) SHA1(50c7ca7a7496cb6fe5e8ce0db693ccb82dbbb8c6) )
ROM_LOAD( "s3.13c", 0x0200, 0x0100, CRC(609775a6) SHA1(70a787aec0852e106216a4ca9891d36aef60b189) )
- ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples, read directly by the main CPU */
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
ROM_LOAD( "s0-1.5g", 0x00000, 0x8000, CRC(65e55b7e) SHA1(3852fb3b37eccdcddff05d8ef4a742fcb8b63473) )
ROM_END
@@ -668,14 +669,14 @@ ROM_START( rmhaijin )
ROM_LOAD( "s-2-7.5a", 0x0c000, 0x4000, CRC(e92658bd) SHA1(db4b55bb10c38357729bb0f59a9ff66f4b81a220) )
ROM_LOAD( "s-1-12.11a", 0x10000, 0x4000, CRC(7502a191) SHA1(e3543a2cf78d4046a580d972f68a4f10aa066144) )
ROM_LOAD( "s-2-11.10a", 0x14000, 0x4000, CRC(9ebbc607) SHA1(8ab707f2a197772bae94e9129eb3f40d408c88bf) )
- /* 0x18000-0x1ffff empty space filled by the init function */
+ // 0x18000-0x1ffff empty space filled by the init function
ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "s5.13b", 0x0000, 0x0100, CRC(153aa7bf) SHA1(945db334e27be431a34670b2d94de639f67038d1) )
ROM_LOAD( "s4.13a", 0x0100, 0x0100, CRC(5d643e6e) SHA1(df34be9d4cb0129069c2ed40c916c84674b62bb3) )
ROM_LOAD( "s6.13c", 0x0200, 0x0100, CRC(fd6ff344) SHA1(cd00985f8bbff1ab5a149a00320d861ac8655bf8) )
- ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples, read directly by the main CPU */
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
ROM_LOAD( "s-0-1.5g", 0x00000, 0x8000, CRC(65e55b7e) SHA1(3852fb3b37eccdcddff05d8ef4a742fcb8b63473) )
ROM_END
@@ -696,51 +697,77 @@ ROM_START( rmhaisei )
ROM_LOAD( "sei-1.a5", 0x18000, 0x8000, CRC(fe6555f8) SHA1(b3201f465f9e897ec5805512e3ff488ef77f2f25) )
ROM_LOAD( "sei-6.a11", 0x20000, 0x8000, CRC(86f1b462) SHA1(ccabbdca44840de5f9b8f6af24117e545b8f1ef7) )
ROM_LOAD( "sei-5.a9", 0x28000, 0x8000, CRC(8bf780bc) SHA1(5ef72ee3f45f1cdde06131797faf26a9776f6a13) )
- /* 0x30000-0x3ffff empty space filled by the init function */
+ // 0x30000-0x3ffff empty space filled by the init function
ROM_REGION( 0x0600, "proms", 0 )
ROM_LOAD( "2.bpr", 0x0000, 0x0200, CRC(9ad2afcd) SHA1(6cd4cd5f693ee882a98598e8f86ee2baf3b105bf) )
ROM_LOAD( "1.bpr", 0x0200, 0x0200, CRC(9b036f82) SHA1(4b14084e5a6674e69bd4bbc3a483c277bfc73808) )
ROM_LOAD( "3.bpr", 0x0400, 0x0200, CRC(0fa1a50a) SHA1(9e8a2c9554a61bfdacb434f8c22c1085b1c93aa1) )
- ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples, read directly by the main CPU */
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
ROM_LOAD( "sei-7.h5", 0x00000, 0x8000, CRC(3e412c1a) SHA1(bc5e324ea26b8dd1e37c4e8b0d7ba712c1222bc7) )
ROM_END
ROM_START( themj )
- ROM_REGION( 0x20000, "maincpu", 0 ) /* CPU */
+ ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "t7.bin", 0x00000, 0x02000, CRC(a58563c3) SHA1(53faeb66606214eb97ef8ff9affe68705e18a0b3) )
ROM_CONTINUE( 0x06000, 0x02000 )
ROM_LOAD( "t8.bin", 0x04000, 0x02000, CRC(bdf29475) SHA1(6296561da9c3a299d69bba8a98362c40b677ea9a) )
ROM_CONTINUE( 0x02000, 0x02000 )
ROM_LOAD( "t9.bin", 0x0e000, 0x02000, CRC(d5537d03) SHA1(ba27e83fcc9b6962373e2f723fc681481ec76864) )
- ROM_LOAD( "no1.bin", 0x10000, 0x10000, CRC(a67dd977) SHA1(835648c5df51053c883d90d7309e53232b945ceb) ) /* banked */
+ ROM_LOAD( "no1.bin", 0x10000, 0x10000, CRC(a67dd977) SHA1(835648c5df51053c883d90d7309e53232b945ceb) ) // banked
- ROM_REGION( 0x40000, "gfx1", 0 ) /* gfx */
+ ROM_REGION( 0x40000, "gfx1", 0 )
ROM_LOAD( "t3.bin", 0x00000, 0x8000, CRC(f0735c62) SHA1(5ff0da7fc72512797ec59ee57467fa81abcfdb8b) )
ROM_LOAD( "t4.bin", 0x08000, 0x8000, CRC(952227fa) SHA1(7c2b5fe18bbaa482d93ab99a8f886838b596df8d) )
ROM_LOAD( "t5.bin", 0x10000, 0x8000, CRC(3deea9b4) SHA1(e445b545a8d293f6a5724e6c484cb1062c631bcc) )
ROM_LOAD( "t6.bin", 0x18000, 0x8000, CRC(47717958) SHA1(b25a9bd72bf5aa024ce2631440bb2ad762544e54) )
ROM_LOAD( "t1.bin", 0x20000, 0x8000, CRC(9b9a458e) SHA1(91146bd3ed7ed016c90ae5c3e3510d0d8d216ba5) )
ROM_LOAD( "t2.bin", 0x28000, 0x8000, CRC(4702375f) SHA1(9e824007e3e26ad6fb2ccbbcf35aa7cfdf5c469e) )
- /* 0x30000-0x3ffff empty space filled by the init function */
+ // 0x30000-0x3ffff empty space filled by the init function
ROM_REGION( 0x0600, "proms", 0 )
ROM_LOAD( "5.bin", 0x0000, 0x0200, CRC(062fb055) SHA1(20a6d236e3ab1df8c471cccca31ec05442595c82) )
ROM_LOAD( "4.bin", 0x0200, 0x0200, CRC(9f81a6d7) SHA1(2735815c0c922d0c81559d792fcaa39bd9615536) )
ROM_LOAD( "6.bin", 0x0400, 0x0200, CRC(61373ec7) SHA1(73861914aae29e3996f9991f324c358a29c46969) )
- ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples, read directly by the main CPU */
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
ROM_LOAD( "t0.bin", 0x00000, 0x8000, CRC(3e412c1a) SHA1(bc5e324ea26b8dd1e37c4e8b0d7ba712c1222bc7) )
ROM_END
+ROM_START( themj2 ) // SS-01A main PCB + SUBBOARD2 sub PCB. All ROMs on main PCB but no1.rom1
+ ROM_REGION( 0x20000, "maincpu", 0 )
+ ROM_LOAD( "7.11g", 0x00000, 0x02000, CRC(2e8cdd78) SHA1(3136b7c79422d86c14560b370dc25c99b453156d) ) // 27128
+ ROM_CONTINUE( 0x06000, 0x02000 )
+ ROM_LOAD( "8.8g", 0x04000, 0x02000, CRC(15da6103) SHA1(681aa0df820dd010f90146c3c58a5b37cea93431) ) // 27128
+ ROM_CONTINUE( 0x02000, 0x02000 )
+ ROM_LOAD( "t9.6g", 0x0e000, 0x02000, CRC(d5537d03) SHA1(ba27e83fcc9b6962373e2f723fc681481ec76864) ) // 2764
+ ROM_LOAD( "no1.rom1", 0x10000, 0x10000, CRC(a67dd977) SHA1(835648c5df51053c883d90d7309e53232b945ceb) ) // 27512, banked
+
+ ROM_REGION( 0x40000, "gfx1", 0 ) // all 27256s
+ ROM_LOAD( "3.8a", 0x00000, 0x8000, CRC(f0735c62) SHA1(5ff0da7fc72512797ec59ee57467fa81abcfdb8b) )
+ ROM_LOAD( "4.7a", 0x08000, 0x8000, CRC(952227fa) SHA1(7c2b5fe18bbaa482d93ab99a8f886838b596df8d) )
+ ROM_LOAD( "5.6a", 0x10000, 0x8000, CRC(3deea9b4) SHA1(e445b545a8d293f6a5724e6c484cb1062c631bcc) )
+ ROM_LOAD( "6.5a", 0x18000, 0x8000, CRC(47717958) SHA1(b25a9bd72bf5aa024ce2631440bb2ad762544e54) )
+ ROM_LOAD( "1.11a", 0x20000, 0x8000, CRC(9b9a458e) SHA1(91146bd3ed7ed016c90ae5c3e3510d0d8d216ba5) )
+ ROM_LOAD( "2.12a", 0x28000, 0x8000, CRC(4702375f) SHA1(9e824007e3e26ad6fb2ccbbcf35aa7cfdf5c469e) )
+ // 0x30000-0x3ffff empty space filled by the init function
+
+ ROM_REGION( 0x0600, "proms", 0 ) // all 82S131s
+ ROM_LOAD( "s2.13b", 0x0000, 0x0200, CRC(062fb055) SHA1(20a6d236e3ab1df8c471cccca31ec05442595c82) )
+ ROM_LOAD( "s1.13a", 0x0200, 0x0200, CRC(9f81a6d7) SHA1(2735815c0c922d0c81559d792fcaa39bd9615536) )
+ ROM_LOAD( "s3.13c", 0x0400, 0x0200, CRC(61373ec7) SHA1(73861914aae29e3996f9991f324c358a29c46969) )
+
+ ROM_REGION( 0x8000, "adpcm", 0 ) // ADPCM samples, read directly by the main CPU
+ ROM_LOAD( "t0.bin", 0x00000, 0x8000, CRC(3e412c1a) SHA1(bc5e324ea26b8dd1e37c4e8b0d7ba712c1222bc7) ) // 27256
+ROM_END
void rmhaihai_state::init_rmhaihai()
{
int size = memregion("gfx1")->bytes() / 2;
uint8_t *rom = memregion("gfx1")->base() + size;
- /* unpack the high bit of gfx */
+ // unpack the high bit of gfx
for (int b = size - 0x4000; b >= 0; b -= 0x4000)
{
if (b) memcpy(rom + b, rom + b/2, 0x2000);
@@ -758,4 +785,5 @@ GAME( 1985, rmhaihai2, rmhaihai, rmhaihai, rmhaihai, rmhaihai_state, init_rmhaih
GAME( 1985, rmhaihib, rmhaihai, rmhaihai, rmhaihib, rmhaihai_state, init_rmhaihai, ROT0, "Alba", "Real Mahjong Haihai [BET] (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, rmhaijin, 0, rmhaihai, rmhaihai, rmhaihai_state, init_rmhaihai, ROT0, "Alba", "Real Mahjong Haihai Jinji Idou Hen (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, rmhaisei, 0, rmhaisei, rmhaihai, rmhaisei_state, init_rmhaihai, ROT0, "Visco", "Real Mahjong Haihai Seichouhen (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, themj, 0, themj, rmhaihai, themj_state, init_rmhaihai, ROT0, "Visco", "The Mah-jong (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, themj, 0, themj, rmhaihai, themj_state, init_rmhaihai, ROT0, "Visco", "The Mah-jong (Japan, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, themj2, themj, themj, rmhaihai, themj_state, init_rmhaihai, ROT0, "Visco", "The Mah-jong (Japan, set 2)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/rohga.cpp b/src/mame/drivers/rohga.cpp
index 937919ba648..90343e117a5 100644
--- a/src/mame/drivers/rohga.cpp
+++ b/src/mame/drivers/rohga.cpp
@@ -893,8 +893,6 @@ void rohga_state::rohga(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x64);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -908,8 +906,6 @@ void rohga_state::rohga(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x10);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -983,8 +979,6 @@ void rohga_state::wizdfire(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -998,8 +992,6 @@ void rohga_state::wizdfire(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x10);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
@@ -1078,8 +1070,6 @@ void rohga_state::nitrobal(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_32x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1093,8 +1083,6 @@ void rohga_state::nitrobal(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_32x32);
m_deco_tilegen[1]->set_pf2_size(DECO_32x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0);
m_deco_tilegen[1]->set_pf2_col_bank(0);
m_deco_tilegen[1]->set_pf1_col_mask(0);
@@ -1174,8 +1162,6 @@ void rohga_state::schmeisr(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x64);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x10);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -1189,8 +1175,6 @@ void rohga_state::schmeisr(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x00);
m_deco_tilegen[1]->set_pf2_col_bank(0x10);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/roland_d10.cpp b/src/mame/drivers/roland_d10.cpp
index 0485a892522..46d33a3c5c2 100644
--- a/src/mame/drivers/roland_d10.cpp
+++ b/src/mame/drivers/roland_d10.cpp
@@ -236,14 +236,14 @@ void roland_d10_state::d10_map(address_map &map)
map(0x0300, 0x0300).w(FUNC(roland_d10_state::lcd_data_w));
map(0x0380, 0x0380).rw(FUNC(roland_d10_state::lcd_ctrl_r), FUNC(roland_d10_state::lcd_ctrl_w));
map(0x0c00, 0x0dff).rw("keyscan", FUNC(mb63h149_device::read), FUNC(mb63h149_device::write));
- map(0x1000, 0x7fff).rom().region("maincpu", 0x1000);
- map(0x8000, 0xbfff).m(m_bank, FUNC(address_map_bank_device::amap8));
+ map(0x1000, 0x7fff).rom().region("firmware", 0x1000);
+ map(0x8000, 0xbfff).m(m_bank, FUNC(address_map_bank_device::amap16));
map(0xc000, 0xffff).rw(FUNC(roland_d10_state::fixed_r), FUNC(roland_d10_state::fixed_w));
}
void roland_d10_state::d10_bank_map(address_map &map)
{
- map(0x00000, 0x0ffff).rom().region("maincpu", 0);
+ map(0x00000, 0x0ffff).rom().region("firmware", 0);
map(0x40000, 0x47fff).ram();
map(0x80000, 0x87fff).ram().share("rams");
map(0xa0000, 0xbffff).rom().region("presets", 0);
@@ -254,18 +254,19 @@ void roland_d10_state::d110_map(address_map &map)
{
map(0x0100, 0x0100).w(FUNC(roland_d10_state::bank_w));
map(0x0200, 0x0200).w(FUNC(roland_d10_state::so_w));
- map(0x021a, 0x021a).portr("SC0").nopw();
- map(0x021c, 0x021c).portr("SC1");
+ map(0x021a, 0x021b).portr("SC0").nopw();
+ map(0x021c, 0x021d).portr("SC1");
map(0x0300, 0x0300).w(FUNC(roland_d10_state::lcd_data_w));
map(0x0380, 0x0380).rw(FUNC(roland_d10_state::lcd_ctrl_r), FUNC(roland_d10_state::lcd_ctrl_w));
- map(0x1000, 0x7fff).rom().region("maincpu", 0x1000);
+ //map(0x1000, 0x7fff).rom().region("firmware", 0x1000);
+ map(0x1000, 0x7fff).lr8([this](offs_t offset) { return m_bank->space(0).read_byte(offset + 0x01000); }, "firmware_r");
map(0x8000, 0xbfff).m(m_bank, FUNC(address_map_bank_device::amap8));
map(0xc000, 0xffff).rw(FUNC(roland_d10_state::fixed_r), FUNC(roland_d10_state::fixed_w));
}
void roland_d10_state::d110_bank_map(address_map &map)
{
- map(0x00000, 0x0ffff).rom().region("maincpu", 0);
+ map(0x00000, 0x0ffff).rom().region("firmware", 0);
map(0x40000, 0x47fff).ram().share("rams");
map(0x80000, 0x9ffff).rom().region("presets", 0);
map(0xc0000, 0xc7fff).ram().share("memcs");
@@ -273,14 +274,14 @@ void roland_d10_state::d110_bank_map(address_map &map)
void roland_d10_state::d10(machine_config &config)
{
- P8098(config, m_maincpu, 12_MHz_XTAL);
+ N8097BH(config, m_maincpu, 12_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &roland_d10_state::d10_map);
m_maincpu->serial_tx_cb().set(FUNC(roland_d10_state::midi_w));
m_maincpu->in_p0_cb().set(FUNC(roland_d10_state::port0_r));
ADDRESS_MAP_BANK(config, m_bank);
m_bank->set_endianness(ENDIANNESS_LITTLE);
- m_bank->set_data_width(8); // FIXME: actually 16 with dynamic bus sizing
+ m_bank->set_data_width(16);
m_bank->set_addr_width(20);
m_bank->set_stride(0x4000);
m_bank->set_addrmap(0, &roland_d10_state::d10_bank_map);
@@ -315,15 +316,16 @@ void roland_d10_state::d110(machine_config &config)
{
d10(config);
+ // D-110 ties BUSWIDTH to GND to make all external accesses 8 bits wide
m_maincpu->set_addrmap(AS_PROGRAM, &roland_d10_state::d110_map);
- //m_bank->set_data_width(8);
+ m_bank->set_data_width(8);
m_bank->set_addrmap(0, &roland_d10_state::d110_bank_map);
config.device_remove("keyscan");
}
ROM_START( d10 )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION16_LE( 0x10000, "firmware", 0 )
ROM_DEFAULT_BIOS( "106" )
ROM_SYSTEM_BIOS( 0, "102", "Firmware 1.02" )
@@ -334,7 +336,7 @@ ROM_START( d10 )
ROMX_LOAD( "d-10a_1.06.ic14", 1, 0x8000, CRC(ea90848a) SHA1(1689b47210e4033b922816a1817c430358d96641), ROM_BIOS(1) | ROM_SKIP(1) ) // AM27C256-200DC
ROMX_LOAD( "d-10b_1.06.ic13", 0, 0x8000, CRC(26dbbf48) SHA1(f6063c2e3000e08a0dc3e45c8ee9400916f5493c), ROM_BIOS(1) | ROM_SKIP(1) ) // AM27C256-155DC
- ROM_REGION( 0x20000, "presets", 0 )
+ ROM_REGION16_LE( 0x20000, "presets", 0 )
ROM_LOAD( "r15179873-lh5310-97.ic12", 0, 0x20000, CRC(580a8f9e) SHA1(05587a0542b01625dcde37de5bb339880e47eb93) )
ROM_REGION( 0x100000, "la32", 0 )
@@ -346,7 +348,7 @@ ROM_START( d10 )
ROM_END
ROM_START( d110 )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION( 0x10000, "firmware", 0 )
ROM_DEFAULT_BIOS( "110" )
ROM_SYSTEM_BIOS( 0, "106", "Firmware 1.06" )
diff --git a/src/mame/drivers/roland_jv80.cpp b/src/mame/drivers/roland_jv80.cpp
new file mode 100644
index 00000000000..92a6ec121bb
--- /dev/null
+++ b/src/mame/drivers/roland_jv80.cpp
@@ -0,0 +1,62 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Roland JV-80 & JV-880 synthesizers.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "cpu/h8500/h8532.h"
+//#include "machine/nvram.h"
+
+class roland_jv80_state : public driver_device
+{
+public:
+ roland_jv80_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ {
+ }
+
+ void jv880(machine_config &config);
+
+private:
+ void mem_map(address_map &map);
+
+ required_device<h8532_device> m_maincpu;
+};
+
+
+void roland_jv80_state::mem_map(address_map &map)
+{
+ map(0x08000, 0x3ffff).rom().region("progrom", 0x8000);
+}
+
+static INPUT_PORTS_START(jv880)
+INPUT_PORTS_END
+
+void roland_jv80_state::jv880(machine_config &config)
+{
+ HD6435328(config, m_maincpu, 20_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_jv80_state::mem_map);
+
+ //NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // LC36256AML-10 (IC18) + CR2032 battery
+
+ //TC6116(config, "pcm", 23.2_MHz_XTAL);
+}
+
+ROM_START(jv880)
+ ROM_REGION(0x8000, "maincpu", ROMREGION_ERASE00)
+ ROM_LOAD("roland_r15199810_6435328b86f.ic16", 0x0000, 0x8000, NO_DUMP)
+
+ ROM_REGION(0x40000, "progrom", 0)
+ ROM_LOAD("roland_jv-880_v1.01.ic17", 0x00000, 0x40000, CRC(5f19c95f) SHA1(38ec496f16dfa02d35f934cf32d8302aaf5f236e))
+
+ ROM_REGION(0x400000, "waverom", 0)
+ ROM_LOAD("roland-a_r15209312_lh5375n2.ic27", 0x000000, 0x200000, NO_DUMP)
+ ROM_LOAD("roland-b_r15209313_lh5375n3.ic25", 0x200000, 0x200000, NO_DUMP)
+ROM_END
+
+//SYST(1992, jv80, 0, 0, jv80, jv80, roland_jv80_state, empty_init, "Roland", "JV-80 Multi Timbral Synthesizer", MACHINE_IS_SKELETON)
+SYST(1992, jv880, 0, 0, jv880, jv880, roland_jv80_state, empty_init, "Roland", "JV-880 Multi Timbral Synthesizer Module", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/roland_jx8p.cpp b/src/mame/drivers/roland_jx8p.cpp
index 7a6dc1bba17..37136fd1ddb 100644
--- a/src/mame/drivers/roland_jx8p.cpp
+++ b/src/mame/drivers/roland_jx8p.cpp
@@ -16,8 +16,8 @@
#include "machine/mb63h149.h"
#include "machine/nvram.h"
//#include "machine/pg800.h"
-//#include "machine/rescap.h"
-//#include "machine/upd7001.h"
+#include "machine/rescap.h"
+#include "machine/upd7001.h"
class roland_jx8p_state : public driver_device
{
@@ -32,6 +32,7 @@ public:
void jx8p(machine_config &config);
void jx8po(machine_config &config);
void jx10(machine_config &config);
+ void mks70(machine_config &config);
private:
u8 switches_r(offs_t offset);
@@ -312,6 +313,10 @@ void roland_jx8p_state::jx8p(machine_config &config)
{
HD6303R(config, m_assignercpu, 16_MHz_XTAL / 2); // HD63B03RP
m_assignercpu->set_addrmap(AS_PROGRAM, &roland_jx8p_state::jx8p_assigner_map);
+ m_assignercpu->in_p1_cb().set("adc", FUNC(upd7001_device::eoc_so_r)).bit(0);
+ m_assignercpu->out_p1_cb().set("adc", FUNC(upd7001_device::sck_w)).bit(1);
+ m_assignercpu->out_p1_cb().append("adc", FUNC(upd7001_device::si_w)).bit(2);
+ m_assignercpu->out_p1_cb().append("adc", FUNC(upd7001_device::cs_w)).bit(3);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5517APL + battery
@@ -320,7 +325,8 @@ void roland_jx8p_state::jx8p(machine_config &config)
GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, nullptr, "jx8p_cart");
- //UPD7001(config, "adc", RES_K(27), CAP_P(47));
+ upd7001_device &adc(UPD7001(config, "adc", RES_K(27), CAP_P(47)));
+ adc.dl_w(1);
//UPD7537(config, "displaycpu", 400_kHz_XTAL);
@@ -338,6 +344,10 @@ void roland_jx8p_state::jx10(machine_config &config)
{
HD6303R(config, m_assignercpu, 16_MHz_XTAL / 2); // HD63B03RP
m_assignercpu->set_addrmap(AS_PROGRAM, &roland_jx8p_state::superjx_assigner_map);
+ m_assignercpu->in_p1_cb().set("adc", FUNC(upd7001_device::eoc_so_r)).bit(0);
+ m_assignercpu->out_p1_cb().set("adc", FUNC(upd7001_device::sck_w)).bit(1);
+ m_assignercpu->out_p1_cb().append("adc", FUNC(upd7001_device::si_w)).bit(2);
+ m_assignercpu->out_p1_cb().append("adc", FUNC(upd7001_device::cs_w)).bit(3);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5564PL-20 + battery
@@ -346,7 +356,8 @@ void roland_jx8p_state::jx10(machine_config &config)
GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, nullptr, "jx8p_cart");
- //UPD7001(config, "adc", RES_K(27), CAP_P(47));
+ upd7001_device &adc(UPD7001(config, "adc", RES_K(27), CAP_P(47)));
+ adc.dl_w(1);
//UPD7538A(config, "displaycpu", 600_kHz_XTAL);
@@ -354,6 +365,16 @@ void roland_jx8p_state::jx10(machine_config &config)
SUPERJX_SYNTH(config, "upper", 16_MHz_XTAL / 2);
}
+void roland_jx8p_state::mks70(machine_config &config)
+{
+ jx10(config);
+
+ m_assignercpu->in_p1_cb().set_constant(0x01);
+ m_assignercpu->out_p1_cb().set_nop();
+
+ config.device_remove("adc");
+}
+
ROM_START(jx8p)
ROM_REGION(0x4000, "assigner", 0)
ROM_LOAD("jx8p_a3-1.ic6", 0x0000, 0x4000, CRC(fc566635) SHA1(aa7ce16107553f337eb87bbe6171062950389ea1))
@@ -421,4 +442,4 @@ ROM_END
SYST(1985, jx8p, 0, 0, jx8p, jx8p, roland_jx8p_state, empty_init, "Roland", "JX-8P Polyphonic Synthesizer (Ver. 3.x)", MACHINE_IS_SKELETON)
SYST(1985, jx8po, jx8p, 0, jx8po, jx8p, roland_jx8p_state, empty_init, "Roland", "JX-8P Polyphonic Synthesizer (Ver. 2.x)", MACHINE_IS_SKELETON)
SYST(1986, jx10, 0, 0, jx10, jx10, roland_jx8p_state, empty_init, "Roland", "JX-10 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON)
-SYST(1987, mks70, jx10, 0, jx10, mks70, roland_jx8p_state, empty_init, "Roland", "MKS-70 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON)
+SYST(1987, mks70, jx10, 0, mks70, mks70, roland_jx8p_state, empty_init, "Roland", "MKS-70 Super JX Polyphonic Synthesizer", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/roland_ra30.cpp b/src/mame/drivers/roland_ra30.cpp
new file mode 100644
index 00000000000..ad0615b9a34
--- /dev/null
+++ b/src/mame/drivers/roland_ra30.cpp
@@ -0,0 +1,52 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Roland RA-30 Realtime Arranger.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "cpu/h8500/h8510.h"
+
+class roland_ra30_state : public driver_device
+{
+public:
+ roland_ra30_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ {
+ }
+
+ void ra30(machine_config &config);
+
+private:
+ void mem_map(address_map &map);
+
+ required_device<h8510_device> m_maincpu;
+};
+
+void roland_ra30_state::mem_map(address_map &map)
+{
+ map(0x000000, 0x07ffff).mirror(0x100000).rom().region("progrom", 0);
+}
+
+
+static INPUT_PORTS_START(ra30)
+INPUT_PORTS_END
+
+void roland_ra30_state::ra30(machine_config &config)
+{
+ HD6415108(config, m_maincpu, 20'000'000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_ra30_state::mem_map);
+}
+
+ROM_START(ra30)
+ ROM_REGION16_BE(0x80000, "progrom", 0)
+ ROM_LOAD("roland_r00892534_hn62444bp_e85.ic22", 0x00000, 0x80000, CRC(c8b75d6f) SHA1(68472f2fa6ee2cab77b153c0131dcf2d76e0dce2))
+
+ ROM_REGION(0x80000, "stylerom", 0)
+ ROM_LOAD("roland_r00679623_hn62444bp_e76.ic18", 0x00000, 0x80000, CRC(3c1670a6) SHA1(d0ef77143f64a20c6a151746eb0bfad15a98b2e5))
+ROM_END
+
+SYST(1995, ra30, 0, 0, ra30, ra30, roland_ra30_state, empty_init, "Roland", "RA-30 Realtime Arranger", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/roland_s10.cpp b/src/mame/drivers/roland_s10.cpp
new file mode 100644
index 00000000000..41deab96b34
--- /dev/null
+++ b/src/mame/drivers/roland_s10.cpp
@@ -0,0 +1,299 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Roland S-10 and related samplers.
+
+ MKS-100 is S-10 without the keyboard; the two use the same main board.
+ S-220 also lacks a keyboard interface but implements a four-channel
+ VCA.
+
+****************************************************************************/
+
+#include "emu.h"
+//#include "bus/midi/midi.h"
+#include "cpu/mcs51/mcs51.h"
+#include "machine/i8251.h"
+#include "machine/mb62h195.h"
+#include "machine/mb63h149.h"
+#include "machine/nvram.h"
+#include "machine/rescap.h"
+#include "machine/upd7001.h"
+#include "video/hd44780.h"
+#include "emupal.h"
+#include "screen.h"
+
+class roland_s10_state : public driver_device
+{
+public:
+ roland_s10_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_io(*this, "io")
+ , m_usart(*this, "usart")
+ , m_lcdc(*this, "lcdc")
+ {
+ }
+
+ void s10(machine_config &config);
+ void mks100(machine_config &config);
+
+protected:
+ HD44780_PIXEL_UPDATE(lcd_pixel_update);
+
+ u8 qdd_r(offs_t offset);
+ void qdd_w(offs_t offset, u8 data);
+ void lcd_data_w(offs_t offset, u8 data);
+ void led_data_w(offs_t offset, u8 data);
+ u8 sw_scan_r(offs_t offset);
+ void sw_scan_w(offs_t offset, u8 data);
+ void led_latch_w(u8 data);
+
+ void prog_map(address_map &map);
+ void s10_ext_map(address_map &map);
+ void mks100_ext_map(address_map &map);
+
+ void palette_init(palette_device &palette);
+
+ required_device<mcs51_cpu_device> m_maincpu;
+ required_device<mb62h195_device> m_io;
+ required_device<i8251_device> m_usart;
+ required_device<hd44780_device> m_lcdc;
+};
+
+class roland_s220_state : public roland_s10_state
+{
+public:
+ roland_s220_state(const machine_config &mconfig, device_type type, const char *tag)
+ : roland_s10_state(mconfig, type, tag)
+ {
+ }
+
+ void s220(machine_config &config);
+
+private:
+ HD44780_PIXEL_UPDATE(lcd_pixel_update);
+
+ void output_control_w(offs_t offset, u8 data);
+ void vca_cv_w(offs_t offset, u8 data);
+ void led_latch1_w(u8 data);
+ void led_latch2_w(u8 data);
+
+ void s220_ext_map(address_map &map);
+};
+
+
+HD44780_PIXEL_UPDATE(roland_s10_state::lcd_pixel_update)
+{
+ if (x < 5 && y < 8 && line < 2 && pos < 8)
+ bitmap.pix16(y, (line * 8 + pos) * 6 + x) = state;
+}
+
+HD44780_PIXEL_UPDATE(roland_s220_state::lcd_pixel_update)
+{
+ if (x < 5 && y < 8 && line < 2 && pos < 16)
+ bitmap.pix16(line * 8 + y, pos * 6 + x) = state;
+}
+
+u8 roland_s10_state::qdd_r(offs_t offset)
+{
+ if (!BIT(offset, 1))
+ return m_usart->read(offset);
+
+ return 0;
+}
+
+void roland_s10_state::qdd_w(offs_t offset, u8 data)
+{
+ if (!BIT(offset, 1))
+ m_usart->write(offset, data);
+}
+
+void roland_s10_state::lcd_data_w(offs_t offset, u8 data)
+{
+ if (offset == 0)
+ m_lcdc->control_w(data);
+ else
+ m_lcdc->data_w(data);
+}
+
+void roland_s10_state::led_data_w(offs_t offset, u8 data)
+{
+}
+
+u8 roland_s10_state::sw_scan_r(offs_t offset)
+{
+ return 0;
+}
+
+void roland_s10_state::sw_scan_w(offs_t offset, u8 data)
+{
+}
+
+void roland_s10_state::led_latch_w(u8 data)
+{
+}
+
+void roland_s220_state::output_control_w(offs_t offset, u8 data)
+{
+}
+
+void roland_s220_state::vca_cv_w(offs_t offset, u8 data)
+{
+}
+
+void roland_s220_state::led_latch1_w(u8 data)
+{
+}
+
+void roland_s220_state::led_latch2_w(u8 data)
+{
+}
+
+void roland_s10_state::prog_map(address_map &map)
+{
+ map(0x0000, 0xffff).rom().region("program", 0);
+}
+
+void roland_s10_state::mks100_ext_map(address_map &map)
+{
+ map(0x4000, 0x4003).mirror(0xffc).rw(FUNC(roland_s10_state::qdd_r), FUNC(roland_s10_state::qdd_w));
+ map(0x6000, 0x7fff).ram().share("nvram");
+ map(0x8000, 0x80ff).mirror(0xf00).w(FUNC(roland_s10_state::lcd_data_w));
+ map(0x9000, 0x90ff).mirror(0xf00).w(FUNC(roland_s10_state::led_data_w));
+ map(0xa000, 0xa0ff).mirror(0xf00).rw(FUNC(roland_s10_state::sw_scan_r), FUNC(roland_s10_state::sw_scan_w));
+ map(0xc000, 0xc000).mirror(0xfff).w(FUNC(roland_s10_state::led_latch_w));
+ //map(0xe000, 0xffff).rw("wave", FUNC(rf5c36_device::read), FUNC(rf5c36_device::write));
+}
+
+void roland_s10_state::s10_ext_map(address_map &map)
+{
+ mks100_ext_map(map);
+ map(0x5000, 0x57ff).mirror(0x800).rw("keyscan", FUNC(mb63h149_device::read), FUNC(mb63h149_device::write));
+ //map(0xb000, 0xb000).mirror(0xfff).rw(FUNC(roland_s10_state::upd7001_r), FUNC(mb63h149_device::upd7001_w));
+}
+
+void roland_s220_state::s220_ext_map(address_map &map)
+{
+ map(0x0000, 0x000f).mirror(0x3ff0).w(FUNC(roland_s220_state::output_control_w));
+ map(0x4000, 0x4003).mirror(0xffc).rw(FUNC(roland_s220_state::qdd_r), FUNC(roland_s220_state::qdd_w));
+ map(0x5000, 0x5000).mirror(0xfff).w(FUNC(roland_s220_state::led_latch1_w));
+ map(0x6000, 0x7fff).ram().share("nvram");
+ map(0x8000, 0x80ff).mirror(0xf00).w(FUNC(roland_s220_state::lcd_data_w));
+ map(0x9000, 0x90ff).mirror(0xf00).w(FUNC(roland_s220_state::vca_cv_w));
+ map(0xa000, 0xa0ff).mirror(0xf00).rw(FUNC(roland_s220_state::sw_scan_r), FUNC(roland_s220_state::sw_scan_w));
+ map(0xc000, 0xc000).mirror(0xfff).w(FUNC(roland_s220_state::led_latch2_w));
+ //map(0xe000, 0xffff).rw("wave", FUNC(rf5c36_device::read), FUNC(rf5c36_device::write));
+}
+
+
+static INPUT_PORTS_START(s10)
+INPUT_PORTS_END
+
+static INPUT_PORTS_START(mks100)
+INPUT_PORTS_END
+
+static INPUT_PORTS_START(s220)
+INPUT_PORTS_END
+
+void roland_s10_state::palette_init(palette_device &palette)
+{
+ palette.set_pen_color(0, rgb_t(131, 136, 139));
+ palette.set_pen_color(1, rgb_t( 92, 83, 88));
+}
+
+void roland_s10_state::s10(machine_config &config)
+{
+ I8032(config, m_maincpu, 12_MHz_XTAL); // SAB8032A
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_s10_state::prog_map);
+ m_maincpu->set_addrmap(AS_IO, &roland_s10_state::s10_ext_map);
+
+ MB62H195(config, m_io);
+ m_io->lc_callback().set(m_lcdc, FUNC(hd44780_device::write));
+ m_io->sout_callback().set("adc", FUNC(upd7001_device::si_w));
+ m_io->sck_callback().set("adc", FUNC(upd7001_device::sck_w));
+ m_io->sin_callback().set("adc", FUNC(upd7001_device::so_r));
+ m_io->adc_callback().set("adc", FUNC(upd7001_device::cs_w));
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5564PL-20 + battery
+
+ I8251(config, m_usart, 6.5_MHz_XTAL / 2); // MB89251A
+
+ //MB87013(config, "qddia", 6.5_MHz_XTAL);
+
+ mb63h149_device &keyscan(MB63H149(config, "keyscan", 12_MHz_XTAL));
+ keyscan.int_callback().set_inputline(m_maincpu, MCS51_T1_LINE);
+
+ // LCD unit: LM16155C
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update));
+ screen.set_size(6*16, 8*1);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", FUNC(roland_s10_state::palette_init), 2);
+
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 8);
+ m_lcdc->set_pixel_update_cb(FUNC(roland_s10_state::lcd_pixel_update));
+ m_lcdc->set_busy_factor(0.005);
+
+ UPD7001(config, "adc", RES_K(27), CAP_P(47));
+
+ //RF5C36(config, "wave", 26.88_MHz_XTAL);
+}
+
+void roland_s10_state::mks100(machine_config &config)
+{
+ s10(config);
+ m_maincpu->set_addrmap(AS_IO, &roland_s10_state::mks100_ext_map);
+
+ m_io->sout_callback().set_nop();
+ m_io->sck_callback().set_nop();
+ m_io->sin_callback().set_constant(1);
+ m_io->adc_callback().set_nop();
+
+ config.device_remove("keyscan");
+ config.device_remove("adc");
+}
+
+void roland_s220_state::s220(machine_config &config)
+{
+ s10(config);
+ m_maincpu->set_addrmap(AS_IO, &roland_s220_state::s220_ext_map);
+
+ m_io->sout_callback().set_nop();
+ m_io->sck_callback().set_nop();
+ m_io->sin_callback().set_constant(1);
+ m_io->adc_callback().set_nop();
+
+ config.device_remove("keyscan");
+ config.device_remove("adc");
+
+ // LCD unit: LDS7A1681A
+ subdevice<screen_device>("screen")->set_size(6*16, 8*2);
+ subdevice<screen_device>("screen")->set_visarea_full();
+ m_lcdc->set_pixel_update_cb(FUNC(roland_s220_state::lcd_pixel_update));
+}
+
+
+ROM_START(s10)
+ ROM_REGION(0x10000, "program", 0)
+ ROM_LOAD("s-10_roland_2-0-7.ic26", 0x00000, 0x10000, CRC(5e588042) SHA1(a41e626bce036bcc9699bede3af137c2888ac704))
+ROM_END
+
+ROM_START(mks100)
+ ROM_REGION(0x10000, "program", 0)
+ ROM_LOAD("roland_mks-100_v1.04_ic26.bin", 0x00000, 0x10000, CRC(39a94481) SHA1(8c6e84d3298f44512d36fe57b80c8f6ea050197c))
+ROM_END
+
+ROM_START(s220)
+ ROM_REGION(0x10000, "program", 0)
+ ROM_LOAD("roland_s-220_v1.04_ic25.bin", 0x00000, 0x10000, CRC(1b74b694) SHA1(11ce4b47abe48116eb34d575e3da46387240c2b1))
+ROM_END
+
+SYST(1986, s10, 0, 0, s10, s10, roland_s10_state, empty_init, "Roland", "S-10 Digital Sampling Keyboard", MACHINE_IS_SKELETON)
+SYST(1987, mks100, s10, 0, mks100, mks100, roland_s10_state, empty_init, "Roland", "MKS-100 Digital Sampler", MACHINE_IS_SKELETON)
+SYST(1987, s220, 0, 0, s220, s220, roland_s220_state, empty_init, "Roland", "S-220 Digital Sampler", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/roland_s50.cpp b/src/mame/drivers/roland_s50.cpp
new file mode 100644
index 00000000000..7249d8dc8c2
--- /dev/null
+++ b/src/mame/drivers/roland_s50.cpp
@@ -0,0 +1,435 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Roland S-50 and related samplers.
+
+****************************************************************************/
+
+#include "emu.h"
+//#include "bus/midi/midi.h"
+#include "cpu/mcs96/i8x9x.h"
+#include "imagedev/floppy.h"
+#include "machine/bankdev.h"
+#include "machine/mb63h149.h"
+#include "machine/timer.h"
+#include "machine/wd_fdc.h"
+#include "video/tms3556.h"
+#include "emupal.h"
+#include "screen.h"
+
+class roland_s50_state : public driver_device
+{
+public:
+ roland_s50_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_sram(*this, "sram")
+ , m_io(*this, "io")
+ , m_fdc(*this, "fdc")
+ , m_floppy(*this, "fdc:0")
+ , m_vdp(*this, "vdp")
+ , m_keyscan(*this, "keyscan")
+ {
+ }
+
+ void s50(machine_config &config);
+ void s550(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+ TIMER_DEVICE_CALLBACK_MEMBER(vdp_timer);
+
+ void p2_w(u8 data);
+ void ioga_out_w(u8 data);
+ u8 floppy_status_r();
+ u8 floppy_unknown_r();
+ u16 key_r(offs_t offset);
+ void key_w(offs_t offset, u16 data);
+
+ void sram_map(address_map &map);
+ void vram_map(address_map &map);
+
+private:
+ void mem_map(address_map &map);
+ void s50_io_map(address_map &map);
+ void s550_io_map(address_map &map);
+
+protected:
+ required_device<i8x9x_device> m_maincpu;
+ required_device<address_map_bank_device> m_sram;
+ optional_device<address_map_bank_device> m_io;
+ required_device<wd_fdc_digital_device_base> m_fdc;
+ required_device<floppy_connector> m_floppy;
+ required_device<tms3556_device> m_vdp;
+ //required_device<sa16_device> m_wave;
+ optional_device<mb63h149_device> m_keyscan;
+};
+
+class roland_w30_state : public roland_s50_state
+{
+public:
+ roland_w30_state(const machine_config &mconfig, device_type type, const char *tag)
+ : roland_s50_state(mconfig, type, tag)
+ {
+ }
+
+ void w30(machine_config &config);
+#ifdef UNUSED_DEFINITION
+ void s330(machine_config &config);
+#endif
+
+private:
+ DECLARE_WRITE_LINE_MEMBER(fdc_irq_w);
+ DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
+
+ u8 unknown_status_r();
+ u8 unknown2_status_r();
+
+ void w30_mem_map(address_map &map);
+#ifdef UNUSED_DEFINITION
+ void s330_mem_map(address_map &map);
+#endif
+};
+
+void roland_s50_state::machine_start()
+{
+ m_fdc->set_floppy(m_floppy->get_device());
+ m_fdc->dden_w(0);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(roland_s50_state::vdp_timer)
+{
+ // FIXME: internalize this ridiculousness
+ m_vdp->interrupt();
+}
+
+
+void roland_s50_state::p2_w(u8 data)
+{
+ m_io->set_bank(BIT(data, 5));
+}
+
+void roland_s50_state::ioga_out_w(u8 data)
+{
+ m_sram->set_bank(BIT(data, 6, 2));
+}
+
+u8 roland_s50_state::floppy_status_r()
+{
+ return m_fdc->intrq_r() << 2;
+}
+
+u8 roland_s50_state::floppy_unknown_r()
+{
+ return 1;
+}
+
+u16 roland_s50_state::key_r(offs_t offset)
+{
+ return m_keyscan->read(offset) << 1;
+}
+
+void roland_s50_state::key_w(offs_t offset, u16 data)
+{
+ m_keyscan->write(offset, data >> 1);
+}
+
+WRITE_LINE_MEMBER(roland_w30_state::fdc_irq_w)
+{
+}
+
+WRITE_LINE_MEMBER(roland_w30_state::fdc_drq_w)
+{
+}
+
+u8 roland_w30_state::unknown_status_r()
+{
+ return 0x1c;
+}
+
+u8 roland_w30_state::unknown2_status_r()
+{
+ return 0x23;
+}
+
+
+void roland_s50_state::mem_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom().region("program", 0);
+ map(0x4000, 0x7fff).ram().share("common");
+ map(0x8000, 0xbfff).m(m_sram, FUNC(address_map_bank_device::amap16));
+ map(0xc000, 0xffff).m(m_io, FUNC(address_map_bank_device::amap16));
+}
+
+void roland_s50_state::s50_io_map(address_map &map)
+{
+ map(0x0000, 0x0000).w(FUNC(roland_s50_state::ioga_out_w));
+ map(0x0200, 0x0200).r(FUNC(roland_s50_state::floppy_status_r));
+ map(0x0300, 0x0300).r(FUNC(roland_s50_state::floppy_unknown_r));
+ map(0x0800, 0x0807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
+ map(0x1200, 0x1200).r(m_vdp, FUNC(tms3556_device::vram_r));
+ map(0x1202, 0x1203).nopr();
+ map(0x1202, 0x1202).w(m_vdp, FUNC(tms3556_device::vram_w));
+ map(0x1204, 0x1204).rw(m_vdp, FUNC(tms3556_device::reg_r), FUNC(tms3556_device::reg_w));
+ //map(0x0000, 0x3fff).rw(m_wave, FUNC(rf5c16_device::read), FUNC(rf5c16_device::write)).umask16(0xff00);
+ map(0x4000, 0x4fff).mirror(0x3000).rw(FUNC(roland_s50_state::key_r), FUNC(roland_s50_state::key_w));
+}
+
+void roland_s50_state::s550_io_map(address_map &map)
+{
+ map(0x0000, 0x0000).w(FUNC(roland_s50_state::ioga_out_w));
+ map(0x0200, 0x0200).r(FUNC(roland_s50_state::floppy_status_r));
+ map(0x0300, 0x0300).r(FUNC(roland_s50_state::floppy_unknown_r));
+ map(0x0800, 0x0807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
+ map(0x1000, 0x1000).r(m_vdp, FUNC(tms3556_device::vram_r));
+ map(0x1002, 0x1003).nopr();
+ map(0x1002, 0x1002).w(m_vdp, FUNC(tms3556_device::vram_w));
+ map(0x1004, 0x1004).rw(m_vdp, FUNC(tms3556_device::reg_r), FUNC(tms3556_device::reg_w));
+ //map(0x0000, 0x3fff).rw(m_wave, FUNC(rf5c16_device::read), FUNC(rf5c16_device::write)).umask16(0xff00);
+}
+
+void roland_w30_state::w30_mem_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom().region("program", 0);
+ map(0x4000, 0x7fff).ram().share("common");
+ map(0x8000, 0xbfff).m(m_sram, FUNC(address_map_bank_device::amap16)); // TODO: banking differs
+ map(0xd806, 0xd806).r(FUNC(roland_w30_state::unknown_status_r));
+ map(0xe402, 0xe402).r(FUNC(roland_w30_state::unknown2_status_r));
+ //map(0xc000, 0xffff).rw(m_wave, FUNC(sa16_device::read), FUNC(sa16_device::write)).umask16(0xff00);
+}
+
+#ifdef UNUSED_DEFINITION
+void roland_w30_state::s330_mem_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom().region("program", 0);
+ map(0x4000, 0x7fff).ram().share("common");
+ map(0x8000, 0xbfff).m(m_sram, FUNC(address_map_bank_device::amap16)); // TODO: banking differs?
+ //map(0xc000, 0xffff).rw(m_wave, FUNC(sa16_device::read), FUNC(sa16_device::write)).umask16(0xff00);
+}
+#endif
+
+void roland_s50_state::sram_map(address_map &map)
+{
+ map(0x0000, 0x3fff).ram().share("common");
+ map(0x4000, 0xffff).ram();
+}
+
+void roland_s50_state::vram_map(address_map &map)
+{
+ map(0x0000, 0xffff).ram();
+}
+
+static INPUT_PORTS_START(s50)
+INPUT_PORTS_END
+
+static INPUT_PORTS_START(s550)
+INPUT_PORTS_END
+
+static INPUT_PORTS_START(w30)
+INPUT_PORTS_END
+
+#ifdef UNUSED_DEFINITION
+static INPUT_PORTS_START(s330)
+INPUT_PORTS_END
+#endif
+
+static void s50_floppies(device_slot_interface &device)
+{
+ device.option_add("35dd", FLOPPY_35_DD);
+}
+
+void roland_s50_state::s50(machine_config &config)
+{
+ C8095_90(config, m_maincpu, 24_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_s50_state::mem_map);
+ m_maincpu->out_p2_cb().set(FUNC(roland_s50_state::p2_w));
+
+ ADDRESS_MAP_BANK(config, m_sram);
+ m_sram->set_endianness(ENDIANNESS_LITTLE);
+ m_sram->set_data_width(16);
+ m_sram->set_addr_width(16);
+ m_sram->set_stride(0x4000);
+ m_sram->set_addrmap(0, &roland_s50_state::sram_map);
+
+ ADDRESS_MAP_BANK(config, m_io);
+ m_io->set_endianness(ENDIANNESS_LITTLE);
+ m_io->set_data_width(16);
+ m_io->set_addr_width(15);
+ m_io->set_stride(0x4000);
+ m_io->set_addrmap(0, &roland_s50_state::s50_io_map);
+
+ MB63H149(config, m_keyscan, 24_MHz_XTAL / 2);
+ //m_keyscan->int_callback().set_inputline(m_maincpu, i8x9x_device::EXTINT_LINE);
+
+ WD1772(config, m_fdc, 8_MHz_XTAL); // WD1770-00 or WD1772-02
+ //m_fdc->drq_wr_callback().set_inputline(m_maincpu, i8x9x_device::HSI2_LINE);
+ //m_fdc->intrq_wr_callback().set_inputline(m_maincpu, i8x9x_device::HSI3_LINE);
+
+ // Floppy unit: FDD4261A0K or FDD4251G0K
+ FLOPPY_CONNECTOR(config, m_floppy, s50_floppies, "35dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+
+ //UPD7538A(config, "fipcpu", 600_kHz_XTAL);
+
+ TMS3556(config, m_vdp, 14.3496_MHz_XTAL); // TMS3556NL
+ m_vdp->set_addrmap(0, &roland_s50_state::vram_map);
+ //m_vdp->vsync_callback().set_inputline(m_maincpu, i8x9x_device::HSI1_LINE).invert();
+ m_vdp->set_screen("screen");
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ screen.set_screen_update(m_vdp, FUNC(tms3556_device::screen_update));
+ screen.set_size(tms3556_device::TOTAL_WIDTH, tms3556_device::TOTAL_HEIGHT*2);
+ screen.set_visarea(0, tms3556_device::TOTAL_WIDTH-1, 0, tms3556_device::TOTAL_HEIGHT-1);
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", palette_device::RGB_3BIT);
+
+ TIMER(config, "vdp_timer").configure_scanline(FUNC(roland_s50_state::vdp_timer), "screen", 0, 1);
+
+ //RF5C16(config, m_wave, 26.88_MHz_XTAL);
+ //m_wave->int_callback().set_inputline(m_maincpu, i8x9x_device::HSI0_LINE);
+}
+
+void roland_s50_state::s550(machine_config &config)
+{
+ s50(config);
+
+ m_io->set_addrmap(0, &roland_s50_state::s550_io_map);
+
+ //UPD7537(config.device_replace(), "fipcpu", 400_kHz_XTAL);
+
+ config.device_remove("keyscan");
+}
+
+void roland_w30_state::w30(machine_config &config)
+{
+ N8097BH(config, m_maincpu, 24_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_w30_state::w30_mem_map);
+
+ ADDRESS_MAP_BANK(config, m_sram);
+ m_sram->set_endianness(ENDIANNESS_LITTLE);
+ m_sram->set_data_width(16);
+ m_sram->set_addr_width(16);
+ m_sram->set_stride(0x4000);
+ m_sram->set_addrmap(0, &roland_w30_state::sram_map);
+
+ MB63H149(config, m_keyscan, 24_MHz_XTAL / 2);
+ //m_keyscan->int_callback().set_inputline(m_maincpu, i8x9x_device::EXTINT_LINE);
+
+ WD1772(config, m_fdc, 8_MHz_XTAL); // WD1772-02
+ m_fdc->intrq_wr_callback().set(FUNC(roland_w30_state::fdc_irq_w));
+ m_fdc->drq_wr_callback().set(FUNC(roland_w30_state::fdc_drq_w));
+
+ // Floppy unit: FX-354 (307F1JC)
+ FLOPPY_CONNECTOR(config, m_floppy, s50_floppies, "35dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+
+ //MB89352(config, "scsic", 8_MHz_XTAL); // by option
+
+ // LCD unit: LM240142
+
+ TMS3556(config, m_vdp, 14.3496_MHz_XTAL); // TMS3556NL
+ m_vdp->set_addrmap(0, &roland_w30_state::vram_map);
+ m_vdp->set_screen("screen");
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ screen.set_screen_update(m_vdp, FUNC(tms3556_device::screen_update));
+ screen.set_size(tms3556_device::TOTAL_WIDTH, tms3556_device::TOTAL_HEIGHT*2);
+ screen.set_visarea(0, tms3556_device::TOTAL_WIDTH-1, 0, tms3556_device::TOTAL_HEIGHT-1);
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", palette_device::RGB_3BIT);
+
+ TIMER(config, "vdp_timer").configure_scanline(FUNC(roland_w30_state::vdp_timer), "screen", 0, 1);
+
+ //R15229874(config, m_wave, 26.88_MHz_XTAL);
+ //m_wave->int_callback().set_inputline(m_maincpu, i8x9x_device::HSI0_LINE);
+}
+
+#ifdef UNUSED_DEFINITION
+void roland_w30_state::s330(machine_config &config)
+{
+ P8097(config, m_maincpu, 24_MHz_XTAL / 2); // P8097-90
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_w30_state::s330_mem_map);
+
+ ADDRESS_MAP_BANK(config, m_sram);
+ m_sram->set_endianness(ENDIANNESS_LITTLE);
+ m_sram->set_data_width(16);
+ m_sram->set_addr_width(16);
+ m_sram->set_stride(0x4000);
+ m_sram->set_addrmap(0, &roland_w30_state::sram_map);
+
+ WD1772(config, m_fdc, 8_MHz_XTAL); // WD1772-02
+ m_fdc->intrq_wr_callback().set(FUNC(roland_w30_state::fdc_irq_w));
+ m_fdc->drq_wr_callback().set(FUNC(roland_w30_state::fdc_drq_w));
+
+ // Floppy unit: ND-362S-A
+ FLOPPY_CONNECTOR(config, m_floppy, s50_floppies, "35dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+
+ // LCD unit: DM1620-5BL7 (MW-5F)
+
+ TMS3556(config, m_vdp, 14.3496_MHz_XTAL); // TMS3556NL
+ m_vdp->set_addrmap(0, &roland_w30_state::vram_map);
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ screen.set_screen_update(m_vdp, FUNC(tms3556_device::screen_update));
+ screen.set_size(tms3556_device::TOTAL_WIDTH, tms3556_device::TOTAL_HEIGHT*2);
+ screen.set_visarea(0, tms3556_device::TOTAL_WIDTH-1, 0, tms3556_device::TOTAL_HEIGHT-1);
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", palette_device::RGB_3BIT);
+
+ TIMER(config, "vdp_timer").configure_scanline(FUNC(roland_w30_state::vdp_timer), "screen", 0, 1);
+
+ //R15229874(config, m_wave, 26.88_MHz_XTAL);
+ //m_wave->int_callback().set_inputline(m_maincpu, i8x9x_device::HSI0_LINE);
+}
+#endif
+
+ROM_START(s50)
+ ROM_REGION16_LE(0x4000, "program", 0)
+ // PROMs contain identical data but are mapped with even bytes loaded from IC64 and odd bytes from IC65
+ ROM_LOAD("s-50.ic64", 0x0000, 0x4000, CRC(9a911016) SHA1(00a829d7921556c41d872c10b7bbb82b62b6c5cf))
+ ROM_LOAD("s-50.ic65", 0x0000, 0x4000, CRC(9a911016) SHA1(00a829d7921556c41d872c10b7bbb82b62b6c5cf))
+
+ ROM_REGION(0x1000, "fipcpu", 0) // on panel board
+ ROM_LOAD("upd7538a-013_15179240.ic1", 0x0000, 0x1000, NO_DUMP)
+ROM_END
+
+ROM_START(s550)
+ ROM_REGION16_LE(0x4000, "program", 0)
+ // PROMs contain identical data but are mapped with even bytes loaded from IC6 and odd bytes from IC3
+ ROM_LOAD("s-550_2-0-0.ic6", 0x0000, 0x4000, CRC(9dbc93b7) SHA1(bd9219772773f51e5ad7872daa1eaf03ec23f2c5))
+ ROM_LOAD("s-550_2-0-0.ic3", 0x0000, 0x4000, CRC(9dbc93b7) SHA1(bd9219772773f51e5ad7872daa1eaf03ec23f2c5))
+
+ ROM_REGION(0x800, "fipcpu", 0)
+ ROM_LOAD("upd7537c-014_15179201.ic35", 0x000, 0x800, NO_DUMP)
+ROM_END
+
+ROM_START(w30)
+ ROM_REGION16_LE(0x4000, "program", 0)
+ ROM_LOAD16_BYTE("w-30_1-0-3.ic19", 0x0000, 0x2000, CRC(4aa83074) SHA1(6d6f3f9dc58a4aed7cbc5d8cfce4a8b3bc2a276a))
+ ROM_LOAD16_BYTE("w-30_1-0-3.ic20", 0x0001, 0x2000, CRC(9c5e3c7f) SHA1(42a0463322be5f965967d531d3636376785c9820))
+ROM_END
+
+#ifdef UNUSED_DEFINITION
+ROM_START(s330)
+ ROM_REGION16_LE(0x4000, "program", 0)
+ ROM_LOAD16_BYTE("s-330.ic15", 0x0000, 0x2000, NO_DUMP)
+ ROM_LOAD16_BYTE("s-330.ic14", 0x0001, 0x2000, NO_DUMP)
+ROM_END
+#endif
+
+SYST(1987, s50, 0, 0, s50, s50, roland_s50_state, empty_init, "Roland", "S-50 Digital Sampling Keyboard", MACHINE_IS_SKELETON)
+SYST(1987, s550, s50, 0, s550, s550, roland_s50_state, empty_init, "Roland", "S-550 Digital Sampler", MACHINE_IS_SKELETON)
+SYST(1988, w30, 0, 0, w30, w30, roland_w30_state, empty_init, "Roland", "W-30 Music Workstation", MACHINE_IS_SKELETON)
+//SYST(1988, s330, w30, 0, s330, s330, roland_w30_state, empty_init, "Roland", "S-330 Digital Sampler", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/roland_sc55.cpp b/src/mame/drivers/roland_sc55.cpp
index 0616c32b744..cf815587388 100644
--- a/src/mame/drivers/roland_sc55.cpp
+++ b/src/mame/drivers/roland_sc55.cpp
@@ -38,7 +38,7 @@
#include "emu.h"
#include "machine/ram.h"
-#include "cpu/mcs96/i8x9x.h"
+#include "cpu/h8500/h8532.h"
static INPUT_PORTS_START( sc55 )
INPUT_PORTS_END
@@ -51,7 +51,7 @@ public:
void sc55(machine_config &config);
private:
- required_device<i8x9x_device> m_maincpu;
+ required_device<h8532_device> m_maincpu;
void sc55_map(address_map &map);
};
@@ -64,23 +64,26 @@ sc55_state::sc55_state(const machine_config &mconfig, device_type type, const ch
void sc55_state::sc55_map(address_map &map)
{
- map(0x1000, 0x3fff).rom().region("maincpu", 0x1000);
+ map(0x40000, 0x7ffff).rom().region("progrom", 0);
}
void sc55_state::sc55(machine_config &config)
{
- P8098(config, m_maincpu, XTAL(20'000'000)); // probably not?
+ HD6435328(config, m_maincpu, 20_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &sc55_state::sc55_map);
}
ROM_START( sc55 )
- ROM_REGION( 0x40000, "maincpu", 0 ) // additional H8/532 code and patch data - revisions match main CPU revisions
+ ROM_REGION( 0x8000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "roland_r15199778_6435328a97f.ic30", 0x0000, 0x8000, NO_DUMP )
+
+ ROM_REGION( 0x40000, "progrom", 0 ) // additional H8/532 code and patch data - revisions match main CPU revisions
ROM_LOAD( "roland_r15209363.ic23", 0x000000, 0x040000, CRC(2dc58549) SHA1(9c17f85e784dc1549ac1f98d457b353393331f6b) )
- ROM_REGION( 0x300000, "la", 0 )
+ ROM_REGION( 0x300000, "waverom", 0 )
ROM_LOAD( "roland-gss.a_r15209276.ic28", 0x000000, 0x100000, CRC(1ac774d3) SHA1(8cc3c0d7ec0993df81d4ca1970e01a4b0d8d3775) )
ROM_LOAD( "roland-gss.b_r15209277.ic27", 0x100000, 0x100000, CRC(8dcc592a) SHA1(80e6eb130c18c09955551563f78906163c55cc11) )
ROM_LOAD( "roland-gss.c_r15209281.ic26", 0x200000, 0x100000, CRC(e21ebc04) SHA1(7454b817778179806f3f9d1985b3a2ef67ace76f) )
ROM_END
-CONS( 1991, sc55, 0, 0, sc55, sc55, sc55_state, empty_init, "Roland", "Sound Canvas SC-55", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+SYST( 1991, sc55, 0, 0, sc55, sc55, sc55_state, empty_init, "Roland", "Sound Canvas SC-55", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/roland_sc88.cpp b/src/mame/drivers/roland_sc88.cpp
new file mode 100644
index 00000000000..0cc04e0f744
--- /dev/null
+++ b/src/mame/drivers/roland_sc88.cpp
@@ -0,0 +1,65 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Roland SC-88 MIDI sound generator.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "cpu/h8500/h8510.h"
+//#include "cpu/m6502/m38881.h"
+#include "machine/nvram.h"
+
+class roland_sc88_state : public driver_device
+{
+public:
+ roland_sc88_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ {
+ }
+
+ void sc88vl(machine_config &config);
+
+private:
+ void main_map(address_map &map);
+
+ required_device<h8510_device> m_maincpu;
+};
+
+
+void roland_sc88_state::main_map(address_map &map)
+{
+ map(0x000000, 0x07ffff).rom().region("progrom", 0);
+ map(0x080000, 0x08ffff).ram().share("nvram");
+}
+
+static INPUT_PORTS_START(sc88vl)
+INPUT_PORTS_END
+
+void roland_sc88_state::sc88vl(machine_config &config)
+{
+ HD6415108(config, m_maincpu, 20_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roland_sc88_state::main_map);
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // SRM2A256SLM-70 x2 + battery
+
+ //M38881M2(config, "subcpu", 20_MHz_XTAL / 2);
+}
+
+ROM_START(sc88vl)
+ ROM_REGION16_BE(0x80000, "progrom", 0)
+ ROM_LOAD16_WORD_SWAP("roland_sc88_vl-1.04.ic29", 0x00000, 0x80000, CRC(66aa5762) SHA1(3a20f8f8cefd0d5e1edb103046f6fe94bb73ac7a))
+
+ ROM_REGION(0x2000, "subcpu", 0)
+ ROM_LOAD("roland-r00232667-m38881m2-150gp.ic23", 0x0000, 0x2000, NO_DUMP)
+
+ ROM_REGION16_LE(0x800000, "waverom", 0)
+ ROM_LOAD("roland-r00785356-hn624316fbc25.ic10", 0x000000, 0x200000, NO_DUMP)
+ ROM_LOAD("roland-r00785367-hn624316fbc26.ic7", 0x200000, 0x200000, NO_DUMP)
+ ROM_LOAD("roland-r00788489-hn624316fbc27.ic4", 0x400000, 0x200000, NO_DUMP)
+ ROM_LOAD("roland-r00788490-hn624316fbc28.ic2", 0x600000, 0x200000, NO_DUMP)
+ROM_END
+
+SYST(1995, sc88vl, 0, 0, sc88vl, sc88vl, roland_sc88_state, empty_init, "Roland", "SoundCanvas SC-88VL", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/runaway.cpp b/src/mame/drivers/runaway.cpp
index 96a05fbec07..527cd6ffb89 100644
--- a/src/mame/drivers/runaway.cpp
+++ b/src/mame/drivers/runaway.cpp
@@ -45,7 +45,7 @@ void runaway_state::machine_reset()
{
m_interrupt_timer->adjust(m_screen->time_until_pos(16), 16);
if (m_earom.found())
- earom_control_w(machine().dummy_space(), 0, 0);
+ earom_control_w(0);
}
@@ -89,7 +89,7 @@ WRITE8_MEMBER(runaway_state::earom_write)
m_earom->set_data(data);
}
-WRITE8_MEMBER(runaway_state::earom_control_w)
+void runaway_state::earom_control_w(uint8_t data)
{
// CK = DB0, C1 = /DB2, C2 = DB1, CS1 = DB3, /CS2 = GND
m_earom->set_control(BIT(data, 3), 1, !BIT(data, 2), BIT(data, 1));
diff --git a/src/mame/drivers/rz1.cpp b/src/mame/drivers/rz1.cpp
index eced82164a0..85d1dd30ed8 100644
--- a/src/mame/drivers/rz1.cpp
+++ b/src/mame/drivers/rz1.cpp
@@ -389,7 +389,7 @@ void rz1_state::rz1(machine_config &config)
ROM_START( rz1 )
ROM_REGION(0x1000, "maincpu", 0)
- ROM_LOAD("upd7811.bin", 0x0000, 0x1000, CRC(597ac04a) SHA1(96451a764296eaa22aaad3cba121226dcba865f4))
+ ROM_LOAD("upd7811g-120.bin", 0x0000, 0x1000, CRC(597ac04a) SHA1(96451a764296eaa22aaad3cba121226dcba865f4))
ROM_REGION(0x4000, "program", 0)
ROM_LOAD("program.bin", 0x0000, 0x4000, CRC(b44b2652) SHA1(b77f8daece9adb177b6ce1ef518fc3238b8c0a9c))
diff --git a/src/mame/drivers/rzone.cpp b/src/mame/drivers/rzone.cpp
index 30a25362b41..c191db0a6ad 100644
--- a/src/mame/drivers/rzone.cpp
+++ b/src/mame/drivers/rzone.cpp
@@ -69,7 +69,7 @@ private:
DECLARE_WRITE8_MEMBER(t1_write_r);
DECLARE_WRITE8_MEMBER(t1_write_s);
- virtual DECLARE_READ8_MEMBER(input_r) override;
+ virtual u8 input_r() override;
void t2_update_audio();
DECLARE_WRITE8_MEMBER(t2_write_r);
@@ -173,7 +173,7 @@ WRITE8_MEMBER(rzone_state::t1_write_s)
sclock_w(data >> 1 & 1);
}
-READ8_MEMBER(rzone_state::input_r)
+u8 rzone_state::input_r()
{
// K1: SDATA
return sdata_r();
diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp
index 9eca1fc247d..e2e9036abe8 100644
--- a/src/mame/drivers/s11.cpp
+++ b/src/mame/drivers/s11.cpp
@@ -310,7 +310,7 @@ WRITE8_MEMBER( s11_state::pia34_pa_w )
WRITE8_MEMBER( s11_state::pia34_pb_w )
{
if(m_pia40)
- m_pia40->write_portb(data);
+ m_pia40->portb_w(data);
else
m_bg->data_w(data);
}
@@ -366,7 +366,7 @@ WRITE_LINE_MEMBER( s11_state::pia40_cb2_w )
WRITE8_MEMBER( s11_state::pia40_pb_w )
{
- m_pia34->write_portb(data);
+ m_pia34->portb_w(data);
}
void s11_state::init_s11()
diff --git a/src/mame/drivers/sag.cpp b/src/mame/drivers/sag.cpp
new file mode 100644
index 00000000000..f3c58916db8
--- /dev/null
+++ b/src/mame/drivers/sag.cpp
@@ -0,0 +1,348 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+// thanks-to:Kevin Horton, Sean Riddle
+/***************************************************************************
+
+Entex Select-A-Game Machine, handheld game console.
+Technically, the main unit is the peripheral(buttons, display, speaker, power),
+and the cartridge holds the MCU(processor, ROM, RAM).
+
+Hardware notes:
+- cyan/red VFD display Futaba DM-16Z + cyan VFD 9-digit panel Futaba 9-ST-11A 1F
+- 1-bit sound, two 7-button control panels attached to each side
+- edge connector to cartridge, MCU on cartridge (see below for each MCU type)
+
+Games released, MCU: (*denotes undumped)
+- Baseball 4 - HD38800
+- *Basketball 3 - ?
+- Football 4 - TMS1670
+- *Pac-Man 2 - HD38800?
+- Pinball - HD38800
+- *Space Invader 2 - HD38800 - is dumped, but need redump
+
+Battleship and Turtles were announced but unreleased.
+A 2nd version of the console was also announced, called Table Top Game Machine,
+but Entex didn't release it. Their next console was the Adventure Vision.
+
+MAME external artwork is recommended for the per-game VFD overlays. For internal
+artwork, remember that the orientation can be rotated in the video options.
+By default, the "visitor" side is at the bottom. This is how most of the games
+are played, Space Invader 2 is an exception.
+
+TODO:
+- add softwarelist? impractical with different MCUs, and no CPU inside console
+- add the rest of the games
+
+***************************************************************************/
+
+#include "emu.h"
+#include "cpu/hmcs40/hmcs40.h"
+#include "cpu/tms1000/tms1400.h"
+#include "video/pwm.h"
+#include "sound/spkrdev.h"
+#include "speaker.h"
+
+#include "sag.lh"
+
+
+namespace {
+
+class base_state : public driver_device
+{
+public:
+ base_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_display(*this, "display"),
+ m_speaker(*this, "speaker"),
+ m_inputs(*this, "IN.%u", 0)
+ { }
+
+ void shared(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+ void update_display();
+ u8 input_r();
+ void speaker_w(int state);
+
+ u16 m_grid = 0;
+ u16 m_plate = 0;
+
+private:
+ required_device<pwm_display_device> m_display;
+ required_device<speaker_sound_device> m_speaker;
+ required_ioport_array<6> m_inputs;
+};
+
+void base_state::machine_start()
+{
+ save_item(NAME(m_grid));
+ save_item(NAME(m_plate));
+}
+
+class hmcs40_state : public base_state
+{
+public:
+ hmcs40_state(const machine_config &mconfig, device_type type, const char *tag) :
+ base_state(mconfig, type, tag),
+ m_maincpu(*this, "maincpu")
+ { }
+
+ void sag(machine_config &config);
+
+private:
+ required_device<hmcs40_cpu_device> m_maincpu;
+
+ DECLARE_WRITE8_MEMBER(write_r);
+ DECLARE_WRITE16_MEMBER(write_d);
+ DECLARE_READ16_MEMBER(read_d);
+};
+
+class tms1k_state : public base_state
+{
+public:
+ tms1k_state(const machine_config &mconfig, device_type type, const char *tag) :
+ base_state(mconfig, type, tag),
+ m_maincpu(*this, "maincpu")
+ { }
+
+ void sag(machine_config &config);
+
+private:
+ required_device<tms1k_base_device> m_maincpu;
+
+ DECLARE_WRITE16_MEMBER(write_r);
+ DECLARE_WRITE16_MEMBER(write_o);
+ DECLARE_READ8_MEMBER(read_k);
+};
+
+
+
+/******************************************************************************
+ I/O
+******************************************************************************/
+
+// main unit
+
+void base_state::update_display()
+{
+ // grid 0-7 are the 'pixels'
+ m_display->matrix_partial(0, 8, m_grid, m_plate, false);
+
+ // grid 8-13 are 7segs
+ u8 seg = bitswap<7>(m_plate,4,5,6,7,8,9,10);
+ m_display->matrix_partial(8, 6, m_grid >> 8, seg);
+}
+
+u8 base_state::input_r()
+{
+ u8 data = 0;
+
+ // grid 1-6 double as input mux
+ for (int i = 0; i < 6; i++)
+ if (BIT(m_grid, i + 1))
+ data |= m_inputs[i]->read();
+
+ return data;
+}
+
+void base_state::speaker_w(int state)
+{
+ m_speaker->level_w(state);
+}
+
+
+// cartridge type 1: HD38800
+
+WRITE8_MEMBER(hmcs40_state::write_r)
+{
+ // R0x-R3x: vfd plate
+ int shift = offset * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+ update_display();
+}
+
+WRITE16_MEMBER(hmcs40_state::write_d)
+{
+ // D0: speaker out
+ speaker_w(data & 1);
+
+ // D1-D12: vfd grid (10 and 11 unused)
+ m_grid = bitswap<14>(data,9,10,0,0,11,12,1,2,3,4,5,6,7,8) & 0x33ff;
+ update_display();
+}
+
+READ16_MEMBER(hmcs40_state::read_d)
+{
+ // D13-D15: multiplexed inputs
+ return input_r() << 13;
+}
+
+
+// cartridge type 2: TMS1670
+
+WRITE16_MEMBER(tms1k_state::write_r)
+{
+ // R0: speaker out
+ speaker_w(data & 1);
+
+ // R1-R12: vfd grid (0 and 7 unused)
+ // R13,R14: vfd plate 3,2
+ m_grid = bitswap<14>(data,7,8,9,10,11,12,0,1,2,3,4,5,6,0) & 0x3f7e;
+ m_plate = (m_plate & 0xff0) | bitswap<2>(data,13,14) << 2;
+ update_display();
+}
+
+WRITE16_MEMBER(tms1k_state::write_o)
+{
+ // O0-O7: vfd plate 4-11
+ m_plate = (m_plate & 0xf) | data << 4;
+ update_display();
+}
+
+READ8_MEMBER(tms1k_state::read_k)
+{
+ // K1-K4: multiplexed inputs
+ return input_r();
+}
+
+
+
+/******************************************************************************
+ Input Ports
+******************************************************************************/
+
+static INPUT_PORTS_START( sag ) // P1 = Visitor (left side), P2 = Home (right side)
+ PORT_START("IN.0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Button 6")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button 6")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button 7")
+
+ PORT_START("IN.1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Button 5")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button 5")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Button 7")
+
+ PORT_START("IN.2")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Button 2")
+ PORT_BIT( 0x04, 0x04, IPT_CUSTOM ) PORT_CONDITION("FAKE", 0x03, EQUALS, 0x00) // demo
+
+ PORT_START("IN.3")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 3")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_NAME("P1 Button 1")
+ PORT_CONFNAME( 0x04, 0x00, DEF_STR( Difficulty ) )
+ PORT_CONFSETTING( 0x00, "1" )
+ PORT_CONFSETTING( 0x04, "2" )
+
+ PORT_START("IN.4")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 2")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("P1 Button 4")
+ PORT_BIT( 0x04, 0x04, IPT_CUSTOM ) PORT_CONDITION("FAKE", 0x03, EQUALS, 0x01) // 1 player
+
+ PORT_START("IN.5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Button 1")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_NAME("P1 Button 3")
+ PORT_CONFNAME( 0x04, 0x04, "Game" )
+ PORT_CONFSETTING( 0x04, "1" )
+ PORT_CONFSETTING( 0x00, "2" )
+
+ PORT_START("FAKE") // shared IN.2/IN.4
+ PORT_CONFNAME( 0x03, 0x01, DEF_STR( Players ) )
+ PORT_CONFSETTING( 0x00, "Demo" )
+ PORT_CONFSETTING( 0x01, "1" )
+ PORT_CONFSETTING( 0x02, "2" )
+INPUT_PORTS_END
+
+
+
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
+
+void base_state::shared(machine_config &config)
+{
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(8+6, 14);
+ m_display->set_segmask(0x3f00, 0x7f);
+ config.set_default_layout(layout_sag);
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
+
+void hmcs40_state::sag(machine_config &config)
+{
+ /* basic machine hardware */
+ HD38800(config, m_maincpu, 450000); // approximation
+ m_maincpu->write_r<0>().set(FUNC(hmcs40_state::write_r));
+ m_maincpu->write_r<1>().set(FUNC(hmcs40_state::write_r));
+ m_maincpu->write_r<2>().set(FUNC(hmcs40_state::write_r));
+ m_maincpu->write_r<3>().set(FUNC(hmcs40_state::write_r));
+ m_maincpu->write_d().set(FUNC(hmcs40_state::write_d));
+ m_maincpu->read_d().set(FUNC(hmcs40_state::read_d));
+
+ shared(config);
+}
+
+void tms1k_state::sag(machine_config &config)
+{
+ /* basic machine hardware */
+ TMS1670(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF
+ m_maincpu->k().set(FUNC(tms1k_state::read_k));
+ m_maincpu->r().set(FUNC(tms1k_state::write_r));
+ m_maincpu->o().set(FUNC(tms1k_state::write_o));
+
+ shared(config);
+}
+
+
+
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
+
+ROM_START( sag_sinv2 )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "inv2_hd38800a31", 0x0000, 0x1000, BAD_DUMP CRC(29c8c100) SHA1(41cd413065659c6d7d5b2408de2ca6d51c49629a) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+ROM_START( sag_baseb4 )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "b-b5_hd38800a37", 0x0000, 0x1000, CRC(64852bd5) SHA1(fb1c24ca43934ceb6fc35ac7c35b71e6e843dbc5) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+ROM_START( sag_pinb )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "pinb_hd38800a38", 0x0000, 0x1000, CRC(6e53a56b) SHA1(13f057eab2e4cfbb3ef1247a041abff15ae727c9) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+ROM_START( sag_footb4 )
+ ROM_REGION( 0x1000, "maincpu", 0 )
+ ROM_LOAD( "ftba_mp7573", 0x0000, 0x1000, CRC(b17dd9e3) SHA1(9c9e7a56643233ef2adff7b68a6df19e6ca176c2) ) // die label TMS1400, MP7573
+
+ ROM_REGION( 867, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) )
+ ROM_REGION( 557, "maincpu:opla", 0 )
+ ROM_LOAD( "tms1400_sag_fb4_output.pla", 0, 557, CRC(f15dc6a1) SHA1(ee11a64037895ac566e902b6b590ff62a7f703b0) )
+ROM_END
+
+} // anonymous namespace
+
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
+
+// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
+CONS( 1981, sag_sinv2, 0, 0, sag, sag, hmcs40_state, empty_init, "Entex", "Select-A-Game Machine: Space Invader 2", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) // suspect bad dump
+CONS( 1981, sag_baseb4, 0, 0, sag, sag, hmcs40_state, empty_init, "Entex", "Select-A-Game Machine: Baseball 4", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1981, sag_pinb, 0, 0, sag, sag, hmcs40_state, empty_init, "Entex", "Select-A-Game Machine: Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+
+CONS( 1981, sag_footb4, 0, 0, sag, sag, tms1k_state, empty_init, "Entex", "Select-A-Game Machine: Football 4", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
diff --git a/src/mame/drivers/saitek_cp2000.cpp b/src/mame/drivers/saitek_cp2000.cpp
index c8f31d5127d..8d63aaabcfc 100644
--- a/src/mame/drivers/saitek_cp2000.cpp
+++ b/src/mame/drivers/saitek_cp2000.cpp
@@ -6,10 +6,17 @@
SciSys Chess Partner 2000, also sold by Novag with the same name.
It's probably the last SciSys / Novag collaboration.
-- 3850PK CPU at ~2MHz, 3853PK memory interface
+Hardware notes:
+- 3850PK CPU at ~2.8MHz, 3853PK memory interface
- 4KB ROM, 256 bytes RAM(2*2111N)
- 4-digit 7seg panel, sensory chessboard
+3850 is officially rated 2MHz, and even the CP2000 manual says it runs at 2MHz,
+but tests show that the chesscomputer runs at a much higher speed. Three individual
+CP2000 were measured, by timing move calculation, and one recording to verify
+beeper pitch and display blinking rate. Real CP2000 CPU frequency is in the
+2.63MHz to 2.91MHz range.
+
Entering moves is not as friendly as newer sensory games. The player is expected
to press ENTER after their own move, but if they (accidentally) press it after
doing the computer's move, the computer takes your turn.
@@ -213,12 +220,12 @@ INPUT_PORTS_END
void cp2000_state::cp2000(machine_config &config)
{
/* basic machine hardware */
- F8(config, m_maincpu, 2000000);
+ F8(config, m_maincpu, 2800000); // see driver notes
m_maincpu->set_addrmap(AS_PROGRAM, &cp2000_state::main_map);
m_maincpu->set_addrmap(AS_IO, &cp2000_state::main_io);
m_maincpu->set_irq_acknowledge_callback("f3853", FUNC(f3853_device::int_acknowledge));
- f3853_device &f3853(F3853(config, "f3853", 2000000));
+ f3853_device &f3853(F3853(config, "f3853", 2800000));
f3853.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ);
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
diff --git a/src/mame/drivers/saitek_mark5.cpp b/src/mame/drivers/saitek_mark5.cpp
index 6b0ecbb5f6a..2fa81958029 100644
--- a/src/mame/drivers/saitek_mark5.cpp
+++ b/src/mame/drivers/saitek_mark5.cpp
@@ -112,7 +112,7 @@ private:
DECLARE_WRITE8_MEMBER(lcd_data_w);
DECLARE_WRITE8_MEMBER(sound_w);
DECLARE_READ8_MEMBER(sound_r);
- DECLARE_WRITE8_MEMBER(reset_irq_w);
+ void reset_irq_w(u8 data);
DECLARE_READ8_MEMBER(reset_irq_r);
DECLARE_READ8_MEMBER(input_r);
DECLARE_READ8_MEMBER(cb_rom_r);
@@ -152,7 +152,7 @@ void mark5_state::machine_start()
void mark5_state::machine_reset()
{
- reset_irq_w(machine().dummy_space(), 0, 0);
+ reset_irq_w(0);
}
@@ -210,7 +210,7 @@ TIMER_CALLBACK_MEMBER(mark5_state::interrupt)
write_lcd(m_lcd_lcd ^ 1);
}
-WRITE8_MEMBER(mark5_state::reset_irq_w)
+void mark5_state::reset_irq_w(u8 data)
{
// MC14020 R
m_irqtimer->adjust(attotime::from_hz((19.6608_MHz_XTAL / 10 / 0x1000) * 2));
@@ -220,7 +220,7 @@ WRITE8_MEMBER(mark5_state::reset_irq_w)
READ8_MEMBER(mark5_state::reset_irq_r)
{
if (!machine().side_effects_disabled())
- reset_irq_w(space, offset, 0);
+ reset_irq_w(0);
return 0xff;
}
diff --git a/src/mame/drivers/saitek_prschess.cpp b/src/mame/drivers/saitek_prschess.cpp
index 014db97a4fc..679ba5c23ab 100644
--- a/src/mame/drivers/saitek_prschess.cpp
+++ b/src/mame/drivers/saitek_prschess.cpp
@@ -13,7 +13,7 @@ computer and shake it when one of the sensors is malfunctioning.
Hardware notes:
- 6502A @ 2MHz
- 16KB ROM(2*HN482764G), 2KB RAM(HM6116P-4)
-- 64+12 leds, magnet sensors chessboard
+- buzzer, 64+12 leds, magnet sensors chessboard
TODO:
- verify CPU speed / XTAL
@@ -91,7 +91,7 @@ void prschess_state::machine_start()
void prschess_state::update_display()
{
u16 led_data = m_led_data[1] << 8 | m_led_data[0];
- led_data = bitswap<16>(led_data, 15,14,5,4,3,2,1,0,7,6,13,12,11,10,9,8);
+ led_data = bitswap<16>(led_data,15,14,5,4,3,2,1,0, 7,6,13,12,11,10,9,8);
m_display->matrix(1 << m_inp_mux, led_data);
}
@@ -214,8 +214,8 @@ void prschess_state::prschess(machine_config &config)
ROM_START( prschess )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("yo3_rl", 0xc000, 0x2000, CRC(862c3f42) SHA1(e2d2f1d7a0382b0774e86ca83e270dab1df700c2) ) // HN482764G
- ROM_LOAD("yo3_rh", 0xe000, 0x2000, CRC(ef95cb9f) SHA1(02f763cf9cab1b4be8964ddb5d93efb05a898123) ) // "
+ ROM_LOAD("y03_rl", 0xc000, 0x2000, CRC(862c3f42) SHA1(e2d2f1d7a0382b0774e86ca83e270dab1df700c2) ) // HN482764G
+ ROM_LOAD("y03_rh", 0xe000, 0x2000, CRC(ef95cb9f) SHA1(02f763cf9cab1b4be8964ddb5d93efb05a898123) ) // "
ROM_END
} // anonymous namespace
diff --git a/src/mame/drivers/saitek_schess.cpp b/src/mame/drivers/saitek_schess.cpp
new file mode 100644
index 00000000000..66b3e5896a5
--- /dev/null
+++ b/src/mame/drivers/saitek_schess.cpp
@@ -0,0 +1,254 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+// thanks-to:bataais
+/******************************************************************************
+
+SciSys Sensor Chess (model 221)
+(not to be confused with Saitek Kasparov Sensor Chess)
+
+Two versions were released. The 1st version is fake-wood brown plastic, and 2nd
+version is grey plastic. The brown version only has 256 bytes RAM. The grey version
+has 1KB but does not use the extra available RAM. The ROM(software) is assumed to
+be the same for each version.
+
+Buttons are unresponsive, this also applies to the chessboard buttons. The program
+is not interrupt-driven and only checks the buttons around twice per second. The user
+needs to hold a button for up to half a second to get a response. In MAME, a delay is
+applied to the sensorboard interface to make sure that all clicks work there. But that
+also means it's not possible to play blitz style (which wouldn't be possible on the
+real device anyway, since it reacts so slowly).
+
+Hardware notes:
+- Synertek 6502A @ ~2MHz
+- 4KB ROM(AMI 2332)
+- 1KB RAM(2*2114), or 256 bytes RAM(GTE 3539)
+- buzzer, 64+12 leds, button chessboard
+- expansion slot at top-tight (dummy empty cartridge by default)
+
+Expansion modules: (* denotes not dumped)
+- *Strong Play Module
+- Classical Style Super Strong
+- *Hyper Modern Super Strong
+
+******************************************************************************/
+
+#include "emu.h"
+#include "cpu/m6502/m6502.h"
+#include "machine/sensorboard.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/pwm.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+#include "speaker.h"
+
+// internal artwork
+#include "saitek_schess.lh" // clickable
+
+
+namespace {
+
+class schess_state : public driver_device
+{
+public:
+ schess_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_board(*this, "board"),
+ m_display(*this, "display"),
+ m_dac(*this, "dac"),
+ m_inputs(*this, "IN.%u", 0)
+ { }
+
+ // machine configs
+ void schess(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ // devices/pointers
+ required_device<cpu_device> m_maincpu;
+ required_device<sensorboard_device> m_board;
+ required_device<pwm_display_device> m_display;
+ required_device<dac_bit_interface> m_dac;
+ required_ioport_array<3> m_inputs;
+
+ // address maps
+ void main_map(address_map &map);
+
+ // I/O handlers
+ void update_display();
+ DECLARE_WRITE8_MEMBER(leds1_w);
+ DECLARE_WRITE8_MEMBER(leds2_w);
+ DECLARE_WRITE8_MEMBER(control_w);
+ DECLARE_READ8_MEMBER(input_r);
+
+ u8 m_inp_mux = 0;
+ u8 m_led_data = 0;
+};
+
+void schess_state::machine_start()
+{
+ save_item(NAME(m_inp_mux));
+ save_item(NAME(m_led_data));
+}
+
+
+
+/******************************************************************************
+ I/O
+******************************************************************************/
+
+void schess_state::update_display()
+{
+ u8 led_data = bitswap<8>(m_led_data,4,5,6,7,3,2,1,0);
+ m_display->matrix_partial(0, 8, 1 << m_inp_mux, led_data);
+}
+
+WRITE8_MEMBER(schess_state::leds1_w)
+{
+ // chessboard leds (muxed)
+ m_led_data = ~data;
+ update_display();
+}
+
+WRITE8_MEMBER(schess_state::leds2_w)
+{
+ // button panel leds (direct)
+ m_display->write_row(8 + (offset ? 1 : 0), ~data);
+ m_display->update();
+}
+
+WRITE8_MEMBER(schess_state::control_w)
+{
+ // d0-d3: input mux, led select
+ m_inp_mux = data & 0xf;
+ update_display();
+
+ // d5: speaker out
+ m_dac->write(BIT(data, 5));
+
+ // other: ?
+}
+
+READ8_MEMBER(schess_state::input_r)
+{
+ u8 data = 0;
+
+ // read chessboard sensors
+ if (m_inp_mux < 8)
+ data = m_board->read_file(m_inp_mux);
+
+ // read other buttons
+ else if (m_inp_mux < 10)
+ data = m_inputs[m_inp_mux & 1]->read();
+ else
+ data = m_inputs[2]->read();
+
+ return bitswap<8>(data,4,5,6,7,3,2,1,0);
+}
+
+
+
+/******************************************************************************
+ Address Maps
+******************************************************************************/
+
+void schess_state::main_map(address_map &map)
+{
+ map(0x0000, 0x03ff).ram();
+ map(0x4000, 0x4000).w(FUNC(schess_state::leds1_w));
+ map(0x4800, 0x4800).w(FUNC(schess_state::control_w));
+ map(0x5000, 0x5000).select(0x0800).w(FUNC(schess_state::leds2_w));
+ map(0x6000, 0x6000).r(FUNC(schess_state::input_r));
+ map(0x8000, 0x8fff).r("cartslot", FUNC(generic_slot_device::read_rom));
+ map(0xf000, 0xffff).rom();
+}
+
+
+
+/******************************************************************************
+ Input Ports
+******************************************************************************/
+
+static INPUT_PORTS_START( schess )
+ PORT_START("IN.0")
+ PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Player V Computer")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Knight")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King")
+
+ PORT_START("IN.1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Reset")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Change Sides")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Hint")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Clear Board")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Legal")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Rook")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen")
+
+ PORT_START("IN.2")
+ PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Player V Player")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Interrupt")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Move")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify / Set Up")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Bishop")
+INPUT_PORTS_END
+
+
+
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
+
+void schess_state::schess(machine_config &config)
+{
+ /* basic machine hardware */
+ M6502(config, m_maincpu, 2000000); // approximation, no XTAL
+ m_maincpu->set_addrmap(AS_PROGRAM, &schess_state::main_map);
+
+ SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
+ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
+ m_board->set_delay(attotime::from_ticks(1115000, 2000000)); // see driver notes
+
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "schess_cart");
+ SOFTWARE_LIST(config, "cart_list").set_original("saitek_schess");
+
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(8+2, 8);
+ config.set_default_layout(layout_saitek_schess);
+
+ /* sound hardware */
+ SPEAKER(config, "speaker").front_center();
+ DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+}
+
+
+
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
+
+ROM_START( schess )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD("y02-rom", 0xf000, 0x1000, CRC(25181e03) SHA1(4d3a606b196b9019c00795b2cd65ce10fbef932c) ) // AMI 2332
+ROM_END
+
+} // anonymous namespace
+
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
+
+// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS
+CONS( 1981, schess, 0, 0, schess, schess, schess_state, empty_init, "SciSys", "Sensor Chess", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/saitek_stratos.cpp b/src/mame/drivers/saitek_stratos.cpp
index 70883a631ea..ddaf9bb1f47 100644
--- a/src/mame/drivers/saitek_stratos.cpp
+++ b/src/mame/drivers/saitek_stratos.cpp
@@ -512,7 +512,7 @@ void stratos_state::stratos(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* extension rom */
- GENERIC_CARTSLOT(config, m_extrom, generic_plain_slot, "saitek_egr", "bin");
+ GENERIC_CARTSLOT(config, m_extrom, generic_plain_slot, "saitek_egr");
m_extrom->set_device_load(FUNC(stratos_state::extrom_load));
SOFTWARE_LIST(config, "cart_list").set_original("saitek_egr");
diff --git a/src/mame/drivers/saitek_superstar.cpp b/src/mame/drivers/saitek_superstar.cpp
index 4c45c489963..9ad58074453 100644
--- a/src/mame/drivers/saitek_superstar.cpp
+++ b/src/mame/drivers/saitek_superstar.cpp
@@ -61,7 +61,6 @@ public:
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_extrom(*this, "extrom"),
m_inputs(*this, "IN.%u", 0)
{ }
@@ -78,7 +77,6 @@ private:
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
- optional_device<generic_slot_device> m_extrom;
required_ioport_array<2> m_inputs;
// address maps
@@ -89,14 +87,11 @@ private:
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_READ8_MEMBER(input_r);
- u8 m_inp_mux;
-
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(extrom_load);
+ u8 m_inp_mux = 0;
};
void star_state::machine_start()
{
- m_inp_mux = 0;
save_item(NAME(m_inp_mux));
}
@@ -106,20 +101,6 @@ void star_state::machine_start()
I/O
******************************************************************************/
-// Extension ROM
-
-DEVICE_IMAGE_LOAD_MEMBER(star_state::extrom_load)
-{
- u32 size = m_extrom->common_get_size("rom");
- m_extrom->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_extrom->common_load_rom(m_extrom->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
-
-// TTL
-
WRITE8_MEMBER(star_state::control_w)
{
// d0-d3: input mux, led select
@@ -242,9 +223,7 @@ void star_state::tstar432(machine_config &config)
config.set_default_layout(layout_saitek_tstar432);
/* extension rom */
- GENERIC_CARTSLOT(config, m_extrom, generic_plain_slot, "saitek_kso", "bin");
- m_extrom->set_device_load(FUNC(star_state::extrom_load));
-
+ GENERIC_CARTSLOT(config, "extrom", generic_plain_slot, "saitek_kso");
SOFTWARE_LIST(config, "cart_list").set_original("saitek_kso");
}
diff --git a/src/mame/drivers/sapi1.cpp b/src/mame/drivers/sapi1.cpp
index b1cd1733f1f..225d4f89224 100644
--- a/src/mame/drivers/sapi1.cpp
+++ b/src/mame/drivers/sapi1.cpp
@@ -611,7 +611,7 @@ WRITE8_MEMBER(sapi_state::port13_w)
READ8_MEMBER( sapi_state::port40_r )
{
- return ~m_uart->get_received_data();
+ return ~m_uart->receive();
}
READ8_MEMBER(sapi_state::port41_r)
@@ -624,7 +624,7 @@ READ8_MEMBER(sapi_state::port41_r)
WRITE8_MEMBER( sapi_state::port43_w )
{
- m_uart->set_transmit_data(~data);
+ m_uart->transmit(~data);
}
READ_LINE_MEMBER( sapi_state::si )
diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp
index 4916d3d0640..da71f6ddbdb 100644
--- a/src/mame/drivers/scobra.cpp
+++ b/src/mame/drivers/scobra.cpp
@@ -54,6 +54,7 @@ public:
{ }
void mimonkey(machine_config &config);
+ void mimonkeyug(machine_config &config);
void stratgyx(machine_config &config);
void type1(machine_config &config);
void type2(machine_config &config);
@@ -91,6 +92,7 @@ private:
void hustlerb_sound_map(address_map &map);
void hustlerb6_map(address_map &map);
void mimonkey_map(address_map &map);
+ void mimonkeyug_map(address_map &map);
void minefldfe_map(address_map &map);
void rescuefe_map(address_map &map);
void scobra_sound_io_map(address_map &map);
@@ -277,7 +279,27 @@ void scobra_state::mimonkey_map(address_map &map)
map(0xc000, 0xffff).rom();
}
-// weird address map like anteateruk in galaxian.c (also a free enterprise set)
+void scobra_state::mimonkeyug_map(address_map &map)
+{
+ map(0x0000, 0x47ff).rom();
+ map(0x6000, 0x6000).portr("IN0"); // ok
+ map(0x6800, 0x6800).portr("IN1");
+ map(0x7000, 0x7000).portr("IN2");
+ map(0x8000, 0x87ff).ram(); // ok
+ map(0x8800, 0x8bff).ram().w(FUNC(scobra_state::galaxold_videoram_w)).share("videoram").mirror(0x0400);
+ map(0x9000, 0x903f).ram().w(FUNC(scobra_state::galaxold_attributesram_w)).share("attributesram");
+ map(0x9040, 0x905f).ram().share("spriteram");
+ map(0x9060, 0x907f).ram().share("bulletsram");
+ map(0x9080, 0x90ff).ram();
+ map(0xa800, 0xa802).w(FUNC(scobra_state::galaxold_gfxbank_w)); // ok
+ map(0xa801, 0xa801).w(FUNC(scobra_state::galaxold_nmi_enable_w)); // ok
+ map(0xa806, 0xa806).w(FUNC(scobra_state::galaxold_flip_screen_x_w)); // ok
+ map(0xa807, 0xa807).w(FUNC(scobra_state::galaxold_flip_screen_y_w)); // ok
+ map(0xb000, 0xb000).r("watchdog", FUNC(watchdog_timer_device::reset_r)); // ok
+ map(0xc000, 0xffff).rom();
+}
+
+// weird address map like anteateruk in galaxian.cpp (also a free enterprise set)
void scobra_state::rescuefe_map(address_map &map)
{
map(0x0000, 0x05ff).rom();
@@ -827,8 +849,6 @@ static INPUT_PORTS_START( hustler )
INPUT_PORTS_END
-
-
static INPUT_PORTS_START( mimonkey )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
@@ -886,6 +906,57 @@ static INPUT_PORTS_START( mimonsco )
INPUT_PORTS_END
+static INPUT_PORTS_START( mimonkeyug )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0xc0, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
+ PORT_DIPSETTING( 0x80, "3" )
+ PORT_DIPSETTING( 0x00, "4" )
+
+ PORT_START("IN2")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x06, 0x06, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
+ PORT_DIPNAME( 0x08, 0x08, "Infinite Lives (Cheat)")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) // actually only 2 of the following should be dips
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
void scobra_state::type1(machine_config &config)
{
/* basic machine hardware */
@@ -1008,6 +1079,41 @@ void scobra_state::mimonkey(machine_config &config)
MCFG_VIDEO_START_OVERRIDE(scobra_state,mimonkey)
}
+void scobra_state::mimonkeyug(machine_config &config)
+{
+ Z80(config, m_maincpu, 18432000/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::mimonkeyug_map);
+
+ MCFG_MACHINE_RESET_OVERRIDE(scobra_state,scramble)
+
+ ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0));
+ ttl7474_9m_1.output_cb().set(FUNC(scobra_state::galaxold_7474_9m_1_callback));
+
+ ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2", 0));
+ ttl7474_9m_2.comp_output_cb().set(FUNC(scobra_state::galaxold_7474_9m_2_q_callback));
+
+ TIMER(config, "int_timer").configure_generic(FUNC(scobra_state::galaxold_interrupt_timer));
+
+ WATCHDOG_TIMER(config, "watchdog");
+
+ /* video hardware */
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(16000.0/132/2);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(scobra_state::screen_update_galaxold));
+ m_screen->set_palette(m_palette);
+
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_scobra);
+ PALETTE(config, m_palette, FUNC(scobra_state::scrambold_palette), 32+64+2+1); // 32 for characters, 64 for stars, 2 for bullets, 1 for background
+
+ MCFG_VIDEO_START_OVERRIDE(scobra_state,mimonkey)
+
+ SPEAKER(config, "mono").front_center();
+
+ // discrete audio
+}
void scobra_state::type2(machine_config &config)
{
@@ -1803,33 +1909,55 @@ ROM_START( mimonsco )
ROM_LOAD( "82s123.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) )
ROM_END
+ROM_START( mimonkeyug ) // this bootleg has significant hardware changes: no audio CPU or sound chips, no 8255s. Only discrete sound. Also 0x800 more ROM.
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "mig.m.1-g.7l-bottom", 0x0000, 0x1000, CRC(5667c124) SHA1(49e5393bc0d2e54c3466e6567a934ed048624dfb) )
+ ROM_LOAD( "mig.m.2-g.7f-bottom", 0x1000, 0x1000, CRC(0ddd41d4) SHA1(dfd879738fa9dfbd6335e20291087270329a49dc) )
+ ROM_LOAD( "mig.m.3-g.8l-bottom", 0x2000, 0x1000, CRC(6c421e34) SHA1(f5038160617e7e24dcea973f02df84134458abc7) )
+ ROM_LOAD( "mig.m.4-g.8i-bottom", 0x3000, 0x1000, CRC(5dec8f11) SHA1(7182b0eef9ea60d5336810e151ce5f8bbfc3b4fc) )
+ ROM_LOAD( "mig.m.9-g.8f", 0x4000, 0x0800, CRC(14bb1708) SHA1(724292f1537340e0182087ff5c604f5ecb7b73fb) )
+ ROM_LOAD( "mig.m.5-g.7l-top", 0xc000, 0x1000, CRC(b4e5c32d) SHA1(18e53519e8f4e813109cfaf45f2f66444e6fa1a2) )
+ ROM_LOAD( "mig.m.6-g.7f-top", 0xd000, 0x1000, CRC(0ad81502) SHA1(f2b46bf645a405a2e7a427592c918cbf553a5aa7) )
+ ROM_LOAD( "mig.m.7-g.8l-top", 0xe000, 0x1000, CRC(5093b483) SHA1(ab91b9a8bd36344aae8a7100d0b0effeef3c618c) )
+ ROM_LOAD( "mig.m.8-g.8i-top", 0xf000, 0x1000, CRC(6a51c513) SHA1(b570f5ea8d8cf8375e8bd61b1c0998ed2896f46a) )
+
+ ROM_REGION( 0x4000, "gfx1", 0 )
+ ROM_LOAD( "mig.m.10-g.1h-bottom", 0x0000, 0x1000, CRC(f73a8412) SHA1(9baf4336cceb9b039372b0a1c733910aeab5ec6d) )
+ ROM_LOAD( "mig.m.11-g.1h-top", 0x1000, 0x1000, CRC(3828c9db) SHA1(eaf9e81c803ad2be6c2db3104f07f80788378286) )
+ ROM_LOAD( "mig.m.12-g.1k-bottom", 0x2000, 0x1000, CRC(9e0e9289) SHA1(79d412dbceb364bc798feda658b15792feb63338) )
+ ROM_LOAD( "mig.m.13-g.1k-top", 0x3000, 0x1000, CRC(92085b0c) SHA1(a791703fa9f17e42450c871d902430fc3c6b10ef) )
+
+ ROM_REGION( 0x0020, "proms", 0 )
+ ROM_LOAD( "sn74s288n.6l", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) )
+ROM_END
-GAME( 1981, stratgyx, 0, stratgyx, stratgyx, scobra_state, init_stratgyx, ROT0, "Konami", "Strategy X", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, stratgys, stratgyx, stratgyx, stratgyx, scobra_state, init_stratgyx, ROT0, "Konami (Stern Electronics license)", "Strategy X (Stern Electronics)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, strongx, stratgyx, stratgyx, stratgyx, scobra_state, init_stratgyx, ROT0, "bootleg", "Strong X", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, stratgyx, 0, stratgyx, stratgyx, scobra_state, init_stratgyx, ROT0, "Konami", "Strategy X", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, stratgys, stratgyx, stratgyx, stratgyx, scobra_state, init_stratgyx, ROT0, "Konami (Stern Electronics license)", "Strategy X (Stern Electronics)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, strongx, stratgyx, stratgyx, stratgyx, scobra_state, init_stratgyx, ROT0, "bootleg", "Strong X", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, darkplnt, 0, darkplnt, darkplnt, scobra_state, init_darkplnt, ROT180, "Stern Electronics", "Dark Planet", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, darkplnt, 0, darkplnt, darkplnt, scobra_state, init_darkplnt, ROT180, "Stern Electronics", "Dark Planet", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, tazmani2, tazmania, type2, tazmani2, scobra_state, init_tazmani2, ROT90, "Stern Electronics", "Tazz-Mania (set 2, alt hardware)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, tazmani3, tazmania, tazmani3, tazmani3, scobra_state, empty_init, ROT90, "bootleg (Arfyc / Rodmar)", "Tazz-Mania (Arfyc / Rodmar bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, tazmaniet, tazmania, tazmani3, tazmani3, scobra_state, init_tazmaniet,ROT90, "bootleg (U.R.V. BBCPE)", "Tazz-Mania - El Trompa (U.R.V. BBCPE bootleg)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
+GAME( 1982, tazmani2, tazmania, type2, tazmani2, scobra_state, init_tazmani2, ROT90, "Stern Electronics", "Tazz-Mania (set 2, alt hardware)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, tazmani3, tazmania, tazmani3, tazmani3, scobra_state, empty_init, ROT90, "bootleg (Arfyc / Rodmar)", "Tazz-Mania (Arfyc / Rodmar bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, tazmaniet, tazmania, tazmani3, tazmani3, scobra_state, init_tazmaniet,ROT90, "bootleg (U.R.V. BBCPE)", "Tazz-Mania - El Trompa (U.R.V. BBCPE bootleg)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
-GAME( 1982, rescue, 0, rescue, rescue, scobra_state, init_rescue, ROT90, "Stern Electronics", "Rescue", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, rescueb, rescue, rescueb, rescue, scobra_state, init_rescue, ROT90, "bootleg (Videl Games)", "Tuono Blu (bootleg of Rescue)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, aponow, rescue, rescue, rescue, scobra_state, init_rescue, ROT90, "bootleg", "Apocaljpse Now (bootleg of Rescue)", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, rescuefe, rescue, rescuefe, rescue, scobra_state, empty_init, ROT90, "bootleg (Free Enterprise Games)", "Rescue (Free Enterprise Games, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1982, rescue, 0, rescue, rescue, scobra_state, init_rescue, ROT90, "Stern Electronics", "Rescue", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, rescueb, rescue, rescueb, rescue, scobra_state, init_rescue, ROT90, "bootleg (Videl Games)", "Tuono Blu (bootleg of Rescue)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, aponow, rescue, rescue, rescue, scobra_state, init_rescue, ROT90, "bootleg", "Apocaljpse Now (bootleg of Rescue)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, rescuefe, rescue, rescuefe, rescue, scobra_state, empty_init, ROT90, "bootleg (Free Enterprise Games)", "Rescue (Free Enterprise Games, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-GAME( 1983, minefld, 0, minefld, minefld, scobra_state, init_minefld, ROT90, "Stern Electronics", "Minefield", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, minefldfe, minefld, minefldfe, minefldfe, scobra_state, empty_init, ROT90, "bootleg (The Logicshop)", "Minefield (The Logicshop, bootleg)", MACHINE_SUPPORTS_SAVE ) // The Logicshop ('licensed' from Free Enterprise Games?
+GAME( 1983, minefld, 0, minefld, minefld, scobra_state, init_minefld, ROT90, "Stern Electronics", "Minefield", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, minefldfe, minefld, minefldfe, minefldfe, scobra_state, empty_init, ROT90, "bootleg (The Logicshop)", "Minefield (The Logicshop, bootleg)", MACHINE_SUPPORTS_SAVE ) // The Logicshop ('licensed' from Free Enterprise Games?
-GAME( 1981, hustler, 0, hustler, hustler, scobra_state, init_hustler, ROT90, "Konami", "Video Hustler", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, hustlerd, hustler, hustler, hustler, scobra_state, init_hustlerd, ROT90, "Konami (Dynamo Games license)", "Video Hustler (Dynamo Games)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, billiard, hustler, hustler, hustler, scobra_state, init_billiard, ROT90, "bootleg", "The Billiards (Video Hustler bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, hustlerb, hustler, hustlerb, hustler, scobra_state, empty_init, ROT90, "bootleg (Digimatic)", "Video Hustler (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, hustlerb2, hustler, hustler, hustler, scobra_state, init_hustlerd, ROT90, "bootleg", "Fatsy Gambler (Video Hustler bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, hustlerb4, hustler, hustlerb4, hustler, scobra_state, empty_init, ROT90, "bootleg", "Video Hustler (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, hustlerb5, hustler, hustlerb, hustler, scobra_state, empty_init, ROT90, "bootleg", "Video Hustler (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, hustlerb6, hustler, hustlerb6, hustler, scobra_state, empty_init, ROT90, "bootleg", "Video Hustler (bootleg, set 4)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // stuck on boot, dump verified good
+GAME( 1981, hustler, 0, hustler, hustler, scobra_state, init_hustler, ROT90, "Konami", "Video Hustler", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerd, hustler, hustler, hustler, scobra_state, init_hustlerd, ROT90, "Konami (Dynamo Games license)", "Video Hustler (Dynamo Games)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, billiard, hustler, hustler, hustler, scobra_state, init_billiard, ROT90, "bootleg", "The Billiards (Video Hustler bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerb, hustler, hustlerb, hustler, scobra_state, empty_init, ROT90, "bootleg (Digimatic)", "Video Hustler (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerb2, hustler, hustler, hustler, scobra_state, init_hustlerd, ROT90, "bootleg", "Fatsy Gambler (Video Hustler bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerb4, hustler, hustlerb4, hustler, scobra_state, empty_init, ROT90, "bootleg", "Video Hustler (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerb5, hustler, hustlerb, hustler, scobra_state, empty_init, ROT90, "bootleg", "Video Hustler (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerb6, hustler, hustlerb6, hustler, scobra_state, empty_init, ROT90, "bootleg", "Video Hustler (bootleg, set 4)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // stuck on boot, dump verified good
-GAME( 1982, mimonkey, 0, mimonkey, mimonkey, scobra_state, init_mimonkey, ROT90, "Universal Video Games", "Mighty Monkey", MACHINE_SUPPORTS_SAVE )
-GAME( 1982, mimonsco, mimonkey, mimonkey, mimonsco, scobra_state, init_mimonsco, ROT90, "bootleg", "Mighty Monkey (bootleg on Super Cobra hardware)", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, mimonkey, 0, mimonkey, mimonkey, scobra_state, init_mimonkey, ROT90, "Universal Video Games", "Mighty Monkey", MACHINE_SUPPORTS_SAVE )
+GAME( 1982, mimonsco, mimonkey, mimonkey, mimonsco, scobra_state, init_mimonsco, ROT90, "bootleg", "Mighty Monkey (bootleg on Super Cobra hardware)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, mimonkeyug, mimonkey, mimonkeyug, mimonkeyug, scobra_state, init_mimonsco, ROT90, "bootleg (U.Games)", "Mighty Monkey (U.Games bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp
index 64c8b504994..6f28b4f99bf 100644
--- a/src/mame/drivers/scramble.cpp
+++ b/src/mame/drivers/scramble.cpp
@@ -1538,6 +1538,7 @@ void scramble_state::hunchbks(machine_config &config)
maincpu.set_addrmap(AS_PROGRAM, &scramble_state::hunchbks_map);
maincpu.set_addrmap(AS_IO, &scramble_state::hunchbks_readport);
maincpu.sense_handler().set("screen", FUNC(screen_device::vblank));
+ maincpu.intack_handler().set_constant(0x03);
maincpu.set_vblank_int("screen", FUNC(scramble_state::hunchbks_vh_interrupt));
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
diff --git a/src/mame/drivers/seabattl.cpp b/src/mame/drivers/seabattl.cpp
index a16c2fa0e20..f38c0789921 100644
--- a/src/mame/drivers/seabattl.cpp
+++ b/src/mame/drivers/seabattl.cpp
@@ -449,7 +449,7 @@ void seabattl_state::machine_reset()
INTERRUPT_GEN_MEMBER(seabattl_state::seabattl_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
static const gfx_layout tiles32x16x3_layout =
@@ -489,7 +489,7 @@ void seabattl_state::seabattl(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &seabattl_state::seabattl_data_map);
m_maincpu->set_vblank_int("screen", FUNC(seabattl_state::seabattl_interrupt));
m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));
-
+ m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
S2636(config, m_s2636, 0);
m_s2636->set_offsets(-13, -29);
m_s2636->add_route(ALL_OUTPUTS, "mono", 0.10);
diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp
index 3568c2307d0..f3ea4735ae9 100644
--- a/src/mame/drivers/seattle.cpp
+++ b/src/mame/drivers/seattle.cpp
@@ -381,8 +381,8 @@ private:
DECLARE_READ32_MEMBER(seattle_interrupt_enable_r);
DECLARE_WRITE32_MEMBER(seattle_interrupt_enable_w);
DECLARE_WRITE32_MEMBER(vblank_clear_w);
- DECLARE_READ32_MEMBER(analog_port_r);
- DECLARE_WRITE32_MEMBER(analog_port_w);
+ uint32_t analog_port_r();
+ void analog_port_w(uint32_t data);
DECLARE_READ32_MEMBER(carnevil_gun_r);
DECLARE_WRITE32_MEMBER(carnevil_gun_w);
DECLARE_WRITE32_MEMBER(cmos_w);
@@ -397,8 +397,8 @@ private:
DECLARE_WRITE32_MEMBER(status_leds_w);
DECLARE_READ32_MEMBER(ethernet_r);
DECLARE_WRITE32_MEMBER(ethernet_w);
- DECLARE_READ32_MEMBER(output_r);
- DECLARE_WRITE32_MEMBER(output_w);
+ uint32_t output_r();
+ void output_w(uint32_t data);
DECLARE_READ32_MEMBER(widget_r);
DECLARE_WRITE32_MEMBER(widget_w);
DECLARE_WRITE32_MEMBER(wheel_board_w);
@@ -663,13 +663,13 @@ WRITE_LINE_MEMBER(seattle_state::vblank_assert)
*
*************************************/
-READ32_MEMBER(seattle_state::analog_port_r)
+uint32_t seattle_state::analog_port_r()
{
return m_pending_analog_read;
}
-WRITE32_MEMBER(seattle_state::analog_port_w)
+void seattle_state::analog_port_w(uint32_t data)
{
if (data < 8 || data > 15)
logerror("%08X:Unexpected analog port select = %08X\n", m_maincpu->pc(), data);
@@ -856,14 +856,14 @@ void seattle_state::update_widget_irq()
}
-READ32_MEMBER(seattle_state::output_r)
+uint32_t seattle_state::output_r()
{
- logerror("%08X:output_r(%d)\n", m_maincpu->pc(), offset);
+ logerror("%08X:output_r\n", m_maincpu->pc());
return 0;
}
-WRITE32_MEMBER(seattle_state::output_w)
+void seattle_state::output_w(uint32_t data)
{
uint8_t arg = data & 0xFF;
@@ -929,11 +929,11 @@ READ32_MEMBER(seattle_state::widget_r)
break;
case WREG_OUTPUT:
- result = output_r(m_maincpu->space(AS_PROGRAM), 0, mem_mask);
+ result = output_r();
break;
case WREG_ANALOG:
- result = analog_port_r(m_maincpu->space(AS_PROGRAM), 0, mem_mask);
+ result = analog_port_r();
break;
case WREG_ETHER_DATA:
@@ -964,11 +964,11 @@ WRITE32_MEMBER(seattle_state::widget_w)
break;
case WREG_OUTPUT:
- output_w(m_maincpu->space(AS_PROGRAM), 0, data, mem_mask);
+ output_w(data);
break;
case WREG_ANALOG:
- analog_port_w(m_maincpu->space(AS_PROGRAM), 0, data, mem_mask);
+ analog_port_w(data);
break;
case WREG_ETHER_DATA:
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index 2347bc6907f..83f23757da4 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -181,7 +181,7 @@ READ8_MEMBER(segag80r_state::g80r_opcode_r)
return op;
}
-offs_t segag80r_state::decrypt_offset(address_space &space, offs_t offset)
+offs_t segag80r_state::decrypt_offset(offs_t offset)
{
if (m_scrambled_write_pc == 0xffff)
return offset;
@@ -195,14 +195,14 @@ offs_t segag80r_state::decrypt_offset(address_space &space, offs_t offset)
WRITE8_MEMBER(segag80r_state::mainram_w)
{
- m_mainram[decrypt_offset(space, offset)] = data;
+ m_mainram[decrypt_offset(offset)] = data;
}
-WRITE8_MEMBER(segag80r_state::vidram_w){ segag80r_videoram_w(space, decrypt_offset(space, offset), data); }
-WRITE8_MEMBER(segag80r_state::monsterb_vidram_w){ monsterb_videoram_w(space, decrypt_offset(space, offset), data); }
-WRITE8_MEMBER(segag80r_state::pignewt_vidram_w){ pignewt_videoram_w(space, decrypt_offset(space, offset), data); }
-WRITE8_MEMBER(segag80r_state::sindbadm_vidram_w){ sindbadm_videoram_w(space, decrypt_offset(space, offset), data); }
-WRITE8_MEMBER(segag80r_state::usb_ram_w){ m_usbsnd->ram_w(space, decrypt_offset(m_maincpu->space(AS_PROGRAM), offset), data); }
+WRITE8_MEMBER(segag80r_state::vidram_w){ segag80r_videoram_w(space, decrypt_offset(offset), data); }
+WRITE8_MEMBER(segag80r_state::monsterb_vidram_w){ monsterb_videoram_w(space, decrypt_offset(offset), data); }
+WRITE8_MEMBER(segag80r_state::pignewt_vidram_w){ pignewt_videoram_w(space, decrypt_offset(offset), data); }
+WRITE8_MEMBER(segag80r_state::sindbadm_vidram_w){ sindbadm_videoram_w(space, decrypt_offset(offset), data); }
+WRITE8_MEMBER(segag80r_state::usb_ram_w){ m_usbsnd->ram_w(space, decrypt_offset(offset), data); }
diff --git a/src/mame/drivers/segag80v.cpp b/src/mame/drivers/segag80v.cpp
index 136bfb3a4a4..2635e58b081 100644
--- a/src/mame/drivers/segag80v.cpp
+++ b/src/mame/drivers/segag80v.cpp
@@ -201,7 +201,7 @@ READ8_MEMBER(segag80v_state::g80v_opcode_r)
return op;
}
-offs_t segag80v_state::decrypt_offset(address_space &space, offs_t offset)
+offs_t segag80v_state::decrypt_offset(offs_t offset)
{
if (m_scrambled_write_pc == 0xffff)
return offset;
@@ -215,13 +215,13 @@ offs_t segag80v_state::decrypt_offset(address_space &space, offs_t offset)
WRITE8_MEMBER(segag80v_state::mainram_w)
{
- m_mainram[decrypt_offset(space, offset)] = data;
+ m_mainram[decrypt_offset(offset)] = data;
}
-WRITE8_MEMBER(segag80v_state::usb_ram_w){ m_usb->ram_w(space, decrypt_offset(m_maincpu->space(AS_PROGRAM), offset), data); }
+WRITE8_MEMBER(segag80v_state::usb_ram_w){ m_usb->ram_w(space, decrypt_offset(offset), data); }
WRITE8_MEMBER(segag80v_state::vectorram_w)
{
- m_vectorram[decrypt_offset(space, offset)] = data;
+ m_vectorram[decrypt_offset(offset)] = data;
}
diff --git a/src/mame/drivers/segajw.cpp b/src/mame/drivers/segajw.cpp
index 6eba9fb6db0..50b81dbb3eb 100644
--- a/src/mame/drivers/segajw.cpp
+++ b/src/mame/drivers/segajw.cpp
@@ -177,8 +177,7 @@ void segajw_state::segajw_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
- map(0x080000, 0x080001).rw("hd63484", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x080002, 0x080003).rw("hd63484", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x080000, 0x080003).rw("hd63484", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x180000, 0x180001).portr("DSW0");
map(0x180005, 0x180005).r("soundlatch2", FUNC(generic_latch_8_device::read)).w(m_soundlatch, FUNC(generic_latch_8_device::write)).umask16(0x00ff);
diff --git a/src/mame/drivers/segas18.cpp b/src/mame/drivers/segas18.cpp
index 46ce91d7ec5..4265839a7ab 100644
--- a/src/mame/drivers/segas18.cpp
+++ b/src/mame/drivers/segas18.cpp
@@ -582,7 +582,7 @@ WRITE8_MEMBER( segas18_state::lghost_gun_recoil_w )
READ16_MEMBER( segas18_state::wwally_custom_io_r )
{
if (offset >= 0x3000/2 && offset < 0x3018/2)
- return m_upd4701[(offset & 0x0018/2) >> 2]->read_xy(space, offset & 0x0006/2);
+ return m_upd4701[(offset & 0x0018/2) >> 2]->read_xy(offset & 0x0006/2);
return m_mapper->open_bus_r();
}
@@ -591,7 +591,7 @@ READ16_MEMBER( segas18_state::wwally_custom_io_r )
WRITE16_MEMBER( segas18_state::wwally_custom_io_w )
{
if (offset >= 0x3000/2 && offset < 0x3018/2)
- m_upd4701[(offset & 0x0018/2) >> 2]->reset_xy_r(space, 0);
+ m_upd4701[(offset & 0x0018/2) >> 2]->reset_xy_r();
}
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index 07404fd7eba..f3986f6b473 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -1041,10 +1041,10 @@ void seibuspi_state::spi_map(address_map &map)
map(0x00000688, 0x00000688).w(FUNC(seibuspi_state::z80_prg_transfer_w));
map(0x0000068c, 0x0000068c).w(FUNC(seibuspi_state::z80_enable_w));
map(0x0000068e, 0x0000068e).w(FUNC(seibuspi_state::rf2_layer_bank_w));
- map(0x000006d0, 0x000006d0).w("ds2404", FUNC(ds2404_device::ds2404_1w_reset_w));
- map(0x000006d4, 0x000006d4).w("ds2404", FUNC(ds2404_device::ds2404_data_w));
- map(0x000006d8, 0x000006d8).w("ds2404", FUNC(ds2404_device::ds2404_clk_w));
- map(0x000006dc, 0x000006dc).r("ds2404", FUNC(ds2404_device::ds2404_data_r));
+ map(0x000006d0, 0x000006d0).w("ds2404", FUNC(ds2404_device::_1w_reset_w));
+ map(0x000006d4, 0x000006d4).w("ds2404", FUNC(ds2404_device::data_w));
+ map(0x000006d8, 0x000006d8).w("ds2404", FUNC(ds2404_device::clk_w));
+ map(0x000006dc, 0x000006dc).r("ds2404", FUNC(ds2404_device::data_r));
map(0x000006dd, 0x000006dd).r(FUNC(seibuspi_state::spi_ds2404_unknown_r));
map(0x00a00000, 0x013fffff).rom().region("sound01", 0);
}
@@ -1060,10 +1060,10 @@ void seibuspi_state::rdft2_map(address_map &map)
map(0x00000688, 0x00000688).w(FUNC(seibuspi_state::z80_prg_transfer_w));
map(0x0000068c, 0x0000068c).w(FUNC(seibuspi_state::z80_enable_w));
map(0x0000068e, 0x0000068e).w(FUNC(seibuspi_state::rf2_layer_bank_w));
- map(0x000006d0, 0x000006d0).w("ds2404", FUNC(ds2404_device::ds2404_1w_reset_w));
- map(0x000006d4, 0x000006d4).w("ds2404", FUNC(ds2404_device::ds2404_data_w));
- map(0x000006d8, 0x000006d8).w("ds2404", FUNC(ds2404_device::ds2404_clk_w));
- map(0x000006dc, 0x000006dc).r("ds2404", FUNC(ds2404_device::ds2404_data_r));
+ map(0x000006d0, 0x000006d0).w("ds2404", FUNC(ds2404_device::_1w_reset_w));
+ map(0x000006d4, 0x000006d4).w("ds2404", FUNC(ds2404_device::data_w));
+ map(0x000006d8, 0x000006d8).w("ds2404", FUNC(ds2404_device::clk_w));
+ map(0x000006dc, 0x000006dc).r("ds2404", FUNC(ds2404_device::data_r));
map(0x000006dd, 0x000006dd).r(FUNC(seibuspi_state::spi_ds2404_unknown_r));
map(0x00a00000, 0x013fffff).rom().region("sound01", 0);
}
@@ -1077,10 +1077,10 @@ void seibuspi_state::sxx2e_map(address_map &map)
map(0x00000684, 0x00000684).r(FUNC(seibuspi_state::sound_fifo_status_r));
map(0x00000688, 0x0000068b).noprw(); // ?
map(0x0000068c, 0x0000068f).nopw();
- map(0x000006d0, 0x000006d0).w("ds2404", FUNC(ds2404_device::ds2404_1w_reset_w));
- map(0x000006d4, 0x000006d4).w("ds2404", FUNC(ds2404_device::ds2404_data_w));
- map(0x000006d8, 0x000006d8).w("ds2404", FUNC(ds2404_device::ds2404_clk_w));
- map(0x000006dc, 0x000006dc).r("ds2404", FUNC(ds2404_device::ds2404_data_r));
+ map(0x000006d0, 0x000006d0).w("ds2404", FUNC(ds2404_device::_1w_reset_w));
+ map(0x000006d4, 0x000006d4).w("ds2404", FUNC(ds2404_device::data_w));
+ map(0x000006d8, 0x000006d8).w("ds2404", FUNC(ds2404_device::clk_w));
+ map(0x000006dc, 0x000006dc).r("ds2404", FUNC(ds2404_device::data_r));
map(0x000006dd, 0x000006dd).r(FUNC(seibuspi_state::spi_ds2404_unknown_r));
}
diff --git a/src/mame/drivers/sfcbox.cpp b/src/mame/drivers/sfcbox.cpp
index ec46a34fd43..e6a4b7649b5 100644
--- a/src/mame/drivers/sfcbox.cpp
+++ b/src/mame/drivers/sfcbox.cpp
@@ -155,12 +155,10 @@ private:
DECLARE_WRITE8_MEMBER( snes_map_1_w );
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_READ8_MEMBER(spc_ram_100_r);
- DECLARE_WRITE8_MEMBER(spc_ram_100_w);
void sfcbox_io(address_map &map);
void sfcbox_map(address_map &map);
void snes_map(address_map &map);
- void spc_mem(address_map &map);
+ void spc_map(address_map &map);
};
uint32_t sfcbox_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
@@ -172,25 +170,13 @@ uint32_t sfcbox_state::screen_update( screen_device &screen, bitmap_rgb32 &bitma
void sfcbox_state::snes_map(address_map &map)
{
map(0x000000, 0x7dffff).rw(FUNC(sfcbox_state::snes_r_bank1), FUNC(sfcbox_state::snes_w_bank1));
- map(0x7e0000, 0x7fffff).ram(); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
+ map(0x7e0000, 0x7fffff).ram().share("wram"); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
map(0x800000, 0xffffff).rw(FUNC(sfcbox_state::snes_r_bank2), FUNC(sfcbox_state::snes_w_bank2)); /* Mirror and ROM */
}
-READ8_MEMBER(sfcbox_state::spc_ram_100_r)
+void sfcbox_state::spc_map(address_map &map)
{
- return m_spc700->spc_ram_r(offset + 0x100);
-}
-
-WRITE8_MEMBER(sfcbox_state::spc_ram_100_w)
-{
- m_spc700->spc_ram_w(offset + 0x100, data);
-}
-
-void sfcbox_state::spc_mem(address_map &map)
-{
- map(0x0000, 0x00ef).rw(m_spc700, FUNC(snes_sound_device::spc_ram_r), FUNC(snes_sound_device::spc_ram_w)); /* lower 32k ram */
- map(0x00f0, 0x00ff).rw(m_spc700, FUNC(snes_sound_device::spc_io_r), FUNC(snes_sound_device::spc_io_w)); /* spc io */
- map(0x0100, 0xffff).rw(FUNC(sfcbox_state::spc_ram_100_r), FUNC(sfcbox_state::spc_ram_100_w));
+ map(0x0000, 0xffff).ram().share("aram");
}
void sfcbox_state::sfcbox_map(address_map &map)
@@ -463,8 +449,10 @@ void sfcbox_state::sfcbox(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &sfcbox_state::snes_map);
// runs at 24.576 MHz / 12 = 2.048 MHz
- SPC700(config, m_soundcpu, XTAL(24'576'000) / 12);
- m_soundcpu->set_addrmap(AS_PROGRAM, &sfcbox_state::spc_mem);
+ S_SMP(config, m_soundcpu, XTAL(24'576'000) / 12);
+ m_soundcpu->set_addrmap(AS_DATA, &sfcbox_state::spc_map);
+ m_soundcpu->dsp_io_read_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_r));
+ m_soundcpu->dsp_io_write_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_w));
config.set_perfect_quantum(m_maincpu);
@@ -479,9 +467,11 @@ void sfcbox_state::sfcbox(machine_config &config)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- SNES_SOUND(config, m_spc700, XTAL(24'576'000) / 12);
- m_spc700->add_route(0, "lspeaker", 1.00);
- m_spc700->add_route(1, "rspeaker", 1.00);
+
+ S_DSP(config, m_s_dsp, XTAL(24'576'000) / 12);
+ m_s_dsp->set_addrmap(0, &sfcbox_state::spc_map);
+ m_s_dsp->add_route(0, "lspeaker", 1.00);
+ m_s_dsp->add_route(1, "rspeaker", 1.00);
/* video hardware */
/* TODO: the screen should actually superimpose, but for the time being let's just separate outputs */
@@ -516,8 +506,6 @@ void sfcbox_state::sfcbox(machine_config &config)
#define SFCBOX_BIOS \
ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) \
- ROM_REGION( 0x100, "sound_ipl", 0 ) \
- ROM_LOAD( "spc700.rom", 0x00, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) \
ROM_REGION( 0x10000, "krom", 0 ) \
ROM_LOAD( "krom1.ic1", 0x00000, 0x10000, CRC(c9010002) SHA1(f4c74086a83b728b1c1af3a021a60efa80eff5a4) ) \
ROM_REGION( 0x100000, "user3", 0 ) \
diff --git a/src/mame/drivers/shanghai.cpp b/src/mame/drivers/shanghai.cpp
index a1203ce93f4..856ccc04be8 100644
--- a/src/mame/drivers/shanghai.cpp
+++ b/src/mame/drivers/shanghai.cpp
@@ -120,8 +120,7 @@ void shanghai_state::shangha2_map(address_map &map)
void shanghai_state::shanghai_portmap(address_map &map)
{
- map(0x00, 0x01).rw("hd63484", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x02, 0x03).rw("hd63484", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x00, 0x03).rw("hd63484", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x20, 0x23).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)).umask16(0x00ff);
map(0x40, 0x41).portr("P1");
map(0x44, 0x45).portr("P2");
@@ -135,8 +134,7 @@ void shanghai_state::shangha2_portmap(address_map &map)
map(0x00, 0x01).portr("P1");
map(0x10, 0x11).portr("P2");
map(0x20, 0x21).portr("SYSTEM");
- map(0x30, 0x31).rw("hd63484", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x32, 0x33).rw("hd63484", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x30, 0x33).rw("hd63484", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x40, 0x43).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)).umask16(0x00ff);
map(0x50, 0x50).w(FUNC(shanghai_state::shanghai_coin_w));
}
@@ -144,8 +142,7 @@ void shanghai_state::shangha2_portmap(address_map &map)
void shanghai_state::kothello_map(address_map &map)
{
map(0x00000, 0x07fff).ram();
- map(0x08010, 0x08011).rw("hd63484", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x08012, 0x08013).rw("hd63484", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x08010, 0x08013).rw("hd63484", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x09010, 0x09011).portr("P1");
map(0x09012, 0x09013).portr("P2");
map(0x09014, 0x09015).portr("SYSTEM");
diff --git a/src/mame/drivers/sigmab52.cpp b/src/mame/drivers/sigmab52.cpp
index 659662240c5..14a8c07149a 100644
--- a/src/mame/drivers/sigmab52.cpp
+++ b/src/mame/drivers/sigmab52.cpp
@@ -318,8 +318,7 @@ void sigmab52_state::jwildb52_map(address_map &map)
map(0xf720, 0xf727).rw("6840ptm_1", FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
- map(0xf730, 0xf730).rw("hd63484", FUNC(hd63484_device::status8_r), FUNC(hd63484_device::address8_w));
- map(0xf731, 0xf731).rw("hd63484", FUNC(hd63484_device::data8_r), FUNC(hd63484_device::data8_w));
+ map(0xf730, 0xf731).rw("hd63484", FUNC(hd63484_device::read8), FUNC(hd63484_device::write8));
map(0xf740, 0xf740).r(FUNC(sigmab52_state::in0_r));
map(0xf741, 0xf741).portr("IN1");
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index be31c5e2848..577cd2e4ce9 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -406,8 +406,6 @@ void simpl156_state::chainrec(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/snes.cpp b/src/mame/drivers/snes.cpp
index f6a3890d3df..851a73bc3e4 100644
--- a/src/mame/drivers/snes.cpp
+++ b/src/mame/drivers/snes.cpp
@@ -28,9 +28,7 @@
#include "emu.h"
#include "includes/snes.h"
-#include "audio/snes_snd.h"
-#include "cpu/spc700/spc700.h"
#include "machine/snescx4.h"
#include "bus/snes/snes_slot.h"
@@ -92,13 +90,10 @@ private:
DECLARE_READ8_MEMBER( pfest94_lo_r );
DECLARE_WRITE8_MEMBER( pfest94_lo_w );
- DECLARE_READ8_MEMBER( spc_ram_100_r );
- DECLARE_WRITE8_MEMBER( spc_ram_100_w );
-
// input related
SNESCTRL_ONSCREEN_CB(onscreen_cb);
SNESCTRL_GUNLATCH_CB(gun_latch_cb);
- virtual DECLARE_WRITE8_MEMBER(io_read) override;
+ virtual void io_read() override;
virtual uint8_t oldjoy1_read(int latched) override;
virtual uint8_t oldjoy2_read(int latched) override;
virtual void write_joy_latch(uint8_t data) override;
@@ -122,18 +117,6 @@ private:
*
*************************************/
-// SPC access
-
-READ8_MEMBER(snes_console_state::spc_ram_100_r )
-{
- return m_spc700->spc_ram_r(offset + 0x100);
-}
-
-WRITE8_MEMBER(snes_console_state::spc_ram_100_w )
-{
- m_spc700->spc_ram_w(offset + 0x100, data);
-}
-
// Memory access for the various types of carts
//---------------------------------------------------------------------------------
@@ -165,7 +148,7 @@ READ8_MEMBER( snes_console_state::snes20_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else if (address < 0x8000)
@@ -225,7 +208,7 @@ WRITE8_MEMBER( snes_console_state::snes20_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
snes_w_io(space, address, data);
}
@@ -260,7 +243,7 @@ READ8_MEMBER( snes_console_state::snes20_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else if (address < 0x8000)
@@ -321,7 +304,7 @@ READ8_MEMBER( snes_console_state::snes21_lo_r )
if (offset < 0x400000 && address < 0x8000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else
@@ -354,7 +337,7 @@ WRITE8_MEMBER( snes_console_state::snes21_lo_w )
if (offset < 0x400000 && address < 0x8000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
snes_w_io(space, address, data);
else
@@ -383,7 +366,7 @@ READ8_MEMBER( snes_console_state::snes21_hi_r )
if (offset < 0x400000 && address < 0x8000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else
@@ -416,7 +399,7 @@ WRITE8_MEMBER( snes_console_state::snes21_hi_w )
if (offset < 0x400000 && address < 0x8000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
snes_w_io(space, address, data);
else
@@ -449,7 +432,7 @@ READ8_MEMBER( snes_console_state::snessfx_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x3000 && address < 0x3300)
@@ -475,7 +458,7 @@ READ8_MEMBER( snes_console_state::snessfx_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x3000 && address < 0x3300)
@@ -500,7 +483,7 @@ WRITE8_MEMBER( snes_console_state::snessfx_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
{
if (address >= 0x3000 && address < 0x3300)
@@ -531,7 +514,7 @@ READ8_MEMBER( snes_console_state::snessa1_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x2200 && address < 0x2400)
@@ -557,7 +540,7 @@ READ8_MEMBER( snes_console_state::snessa1_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x2200 && address < 0x2400)
@@ -584,7 +567,7 @@ WRITE8_MEMBER( snes_console_state::snessa1_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
{
if (address >= 0x2200 && address < 0x2400)
@@ -618,7 +601,7 @@ READ8_MEMBER( snes_console_state::snes7110_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
uint16_t limit = (m_cartslot->get_type() == SNES_SPC7110_RTC) ? 0x4843 : 0x4840;
@@ -647,7 +630,7 @@ READ8_MEMBER( snes_console_state::snes7110_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
uint16_t limit = (m_cartslot->get_type() == SNES_SPC7110_RTC) ? 0x4843 : 0x4840;
@@ -683,7 +666,7 @@ WRITE8_MEMBER( snes_console_state::snes7110_lo_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
{
uint16_t limit = (m_cartslot->get_type() == SNES_SPC7110_RTC) ? 0x4843 : 0x4840;
@@ -716,7 +699,7 @@ READ8_MEMBER( snes_console_state::snessdd1_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x4800 && address < 0x4808)
@@ -754,7 +737,7 @@ WRITE8_MEMBER( snes_console_state::snessdd1_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
{
if (address >= 0x4300 && address < 0x4380)
@@ -786,7 +769,7 @@ READ8_MEMBER( snes_console_state::snesbsx_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x2188 && address < 0x21a0)
@@ -814,7 +797,7 @@ WRITE8_MEMBER( snes_console_state::snesbsx_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
{
if (address >= 0x2188 && address < 0x21a0)
@@ -847,7 +830,7 @@ READ8_MEMBER( snes_console_state::snesbsx_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
{
if (address >= 0x2188 && address < 0x21a0)
@@ -886,7 +869,7 @@ READ8_MEMBER( snes_console_state::snessgb_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else if (address < 0x8000)
@@ -911,7 +894,7 @@ WRITE8_MEMBER( snes_console_state::snessgb_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
snes_w_io(space, address, data);
else if (address < 0x8000)
@@ -935,7 +918,7 @@ READ8_MEMBER( snes_console_state::pfest94_hi_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else if (address < 0x8000)
@@ -961,7 +944,7 @@ WRITE8_MEMBER( snes_console_state::pfest94_hi_w )
if (offset < 0x400000)
{
if (address < 0x2000)
- space.write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000)
snes_w_io(space, address, data);
else if (address < 0x8000)
@@ -983,7 +966,7 @@ READ8_MEMBER( snes_console_state::pfest94_lo_r )
if (offset < 0x400000)
{
if (address < 0x2000)
- return space.read_byte(0x7e0000 + address);
+ return m_wram[address];
else if (address < 0x6000)
return snes_r_io(space, address);
else if (address < 0x8000)
@@ -1018,15 +1001,13 @@ WRITE8_MEMBER( snes_console_state::pfest94_lo_w )
void snes_console_state::snes_map(address_map &map)
{
// map(0x000000, 0x7dffff).rw(FUNC(snes_console_state::snes20_lo_r), FUNC(snes_console_state::snes20_lo_w));
- map(0x7e0000, 0x7fffff).ram(); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
+ map(0x7e0000, 0x7fffff).ram().share("wram"); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
// map(0x800000, 0xffffff).rw(FUNC(snes_console_state::snes20_hi_r), FUNC(snes_console_state::snes20_hi_w));
}
void snes_console_state::spc_map(address_map &map)
{
- map(0x0000, 0x00ef).rw(m_spc700, FUNC(snes_sound_device::spc_ram_r), FUNC(snes_sound_device::spc_ram_w)); /* lower 32k ram */
- map(0x00f0, 0x00ff).rw(m_spc700, FUNC(snes_sound_device::spc_io_r), FUNC(snes_sound_device::spc_io_w)); /* spc io */
- map(0x0100, 0xffff).rw(FUNC(snes_console_state::spc_ram_100_r), FUNC(snes_console_state::spc_ram_100_w));
+ map(0x0000, 0xffff).ram().share("aram");
}
@@ -1101,7 +1082,7 @@ INPUT_PORTS_END
*
*************************************/
-WRITE8_MEMBER(snes_console_state::io_read)
+void snes_console_state::io_read()
{
// is automatic reading on? if so, read 16bits from oldjoy1/2
if (SNES_CPU_REG(NMITIMEN) & 1)
@@ -1340,8 +1321,10 @@ void snes_console_state::snes(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &snes_console_state::snes_map);
// runs at 24.576 MHz / 12 = 2.048 MHz
- SPC700(config, m_soundcpu, XTAL(24'576'000) / 12);
- m_soundcpu->set_addrmap(AS_PROGRAM, &snes_console_state::spc_map);
+ S_SMP(config, m_soundcpu, XTAL(24'576'000) / 12);
+ m_soundcpu->set_addrmap(AS_DATA, &snes_console_state::spc_map);
+ m_soundcpu->dsp_io_read_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_r));
+ m_soundcpu->dsp_io_write_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_w));
//config.set_maximum_quantum(attotime::from_hz(48000));
config.set_perfect_quantum(m_maincpu);
@@ -1365,9 +1348,11 @@ void snes_console_state::snes(machine_config &config)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- SNES_SOUND(config, m_spc700, XTAL(24'576'000) / 12);
- m_spc700->add_route(0, "lspeaker", 1.00);
- m_spc700->add_route(1, "rspeaker", 1.00);
+
+ S_DSP(config, m_s_dsp, XTAL(24'576'000) / 12);
+ m_s_dsp->set_addrmap(0, &snes_console_state::spc_map);
+ m_s_dsp->add_route(0, "lspeaker", 1.00);
+ m_s_dsp->add_route(1, "rspeaker", 1.00);
SNS_CART_SLOT(config, m_cartslot, MCLK_NTSC, snes_cart, nullptr);
m_cartslot->irq_callback().set_inputline(m_maincpu, G65816_LINE_IRQ);
@@ -1399,9 +1384,6 @@ void snes_console_state::snespal(machine_config &config)
ROM_START( snes )
ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 )
-
- ROM_REGION( 0x100, "sound_ipl", 0 ) /* IPL ROM */
- ROM_LOAD( "spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) /* boot rom */
ROM_END
#define rom_snespal rom_snes
diff --git a/src/mame/drivers/snesb.cpp b/src/mame/drivers/snesb.cpp
index 1854e3605fc..8490830a4a9 100644
--- a/src/mame/drivers/snesb.cpp
+++ b/src/mame/drivers/snesb.cpp
@@ -192,12 +192,10 @@ private:
DECLARE_READ8_MEMBER(snesb_dsw1_r);
DECLARE_READ8_MEMBER(snesb_dsw2_r);
DECLARE_READ8_MEMBER(snesb_coin_r);
- DECLARE_READ8_MEMBER(spc_ram_100_r);
- DECLARE_WRITE8_MEMBER(spc_ram_100_w);
DECLARE_MACHINE_RESET(ffight2b);
void mcu_io_map(address_map &map);
void snesb_map(address_map &map);
- void spc_mem(address_map &map);
+ void spc_map(address_map &map);
};
@@ -332,25 +330,13 @@ READ8_MEMBER(snesb_state::snesb_coin_r)
void snesb_state::snesb_map(address_map &map)
{
map(0x000000, 0x7dffff).rw(FUNC(snesb_state::snes_r_bank1), FUNC(snesb_state::snes_w_bank1));
- map(0x7e0000, 0x7fffff).ram(); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
+ map(0x7e0000, 0x7fffff).ram().share("wram"); /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */
map(0x800000, 0xffffff).rw(FUNC(snesb_state::snes_r_bank2), FUNC(snesb_state::snes_w_bank2)); /* Mirror and ROM */
}
-READ8_MEMBER(snesb_state::spc_ram_100_r)
+void snesb_state::spc_map(address_map &map)
{
- return m_spc700->spc_ram_r(offset + 0x100);
-}
-
-WRITE8_MEMBER(snesb_state::spc_ram_100_w)
-{
- m_spc700->spc_ram_w(offset + 0x100, data);
-}
-
-void snesb_state::spc_mem(address_map &map)
-{
- map(0x0000, 0x00ef).rw(m_spc700, FUNC(snes_sound_device::spc_ram_r), FUNC(snes_sound_device::spc_ram_w)); /* lower 32k ram */
- map(0x00f0, 0x00ff).rw(m_spc700, FUNC(snes_sound_device::spc_io_r), FUNC(snes_sound_device::spc_io_w)); /* spc io */
- map(0x0100, 0xffff).rw(FUNC(snesb_state::spc_ram_100_r), FUNC(snesb_state::spc_ram_100_w));
+ map(0x0000, 0xffff).ram().share("aram");
}
static INPUT_PORTS_START( snes_common )
@@ -821,8 +807,10 @@ void snesb_state::kinstb(machine_config &config)
/* audio CPU */
// runs at 24.576 MHz / 12 = 2.048 MHz
- SPC700(config, m_soundcpu, XTAL(24'576'000) / 12);
- m_soundcpu->set_addrmap(AS_PROGRAM, &snesb_state::spc_mem);
+ S_SMP(config, m_soundcpu, XTAL(24'576'000) / 12);
+ m_soundcpu->set_addrmap(AS_DATA, &snesb_state::spc_map);
+ m_soundcpu->dsp_io_read_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_r));
+ m_soundcpu->dsp_io_write_callback().set(m_s_dsp, FUNC(s_dsp_device::dsp_io_w));
config.set_perfect_quantum(m_maincpu);
@@ -839,9 +827,11 @@ void snesb_state::kinstb(machine_config &config)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- SNES_SOUND(config, m_spc700, XTAL(24'576'000) / 12);
- m_spc700->add_route(0, "lspeaker", 1.00);
- m_spc700->add_route(1, "rspeaker", 1.00);
+
+ S_DSP(config, m_s_dsp, XTAL(24'576'000) / 12);
+ m_s_dsp->set_addrmap(0, &snesb_state::spc_map);
+ m_s_dsp->add_route(0, "lspeaker", 1.00);
+ m_s_dsp->add_route(1, "rspeaker", 1.00);
}
MACHINE_RESET_MEMBER( snesb_state, ffight2b )
@@ -1371,9 +1361,6 @@ ROM_START( kinstb )
ROM_LOAD( "3.u16", 0x200000, 0x100000, CRC(7a40f7dd) SHA1(cebe632e8d2d68d0619077cc1e931af73c9a723b) )
ROM_LOAD( "4.u17", 0x300000, 0x100000, CRC(3d7564c1) SHA1(392b513991897668d5dd469ac84a34f785895774) )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_END
@@ -1413,9 +1400,6 @@ ROM_START( ffight2b )
ROM_CONTINUE( 0x078000, 0x008000 )
ROM_LOAD( "ff2_1.u8", 0x100000, 0x040000, CRC(ea315ac1) SHA1(a85de091882d35bc77dc99677511828ff7c20350) )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_END
@@ -1425,9 +1409,6 @@ ROM_START( iron )
ROM_LOAD( "5.c10.bin", 0x080000, 0x080000, CRC(0c3a0b5b) SHA1(1e8ab860689137e0e94731f1af2cfc561492b5bd) )
ROM_LOAD( "4.c11.bin", 0x100000, 0x040000, CRC(2aa417c7) SHA1(24b375e5bbd4be5dcd31b63ea98fbbadd53d543e) )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_END
@@ -1438,18 +1419,12 @@ ROM_START( denseib )
ROM_LOAD( "dj.u16", 0x100000, 0x0080000, CRC(7cb71fd7) SHA1(7673e9dcaabe804e2d637e67eabca1683dad4245) )
ROM_LOAD( "dj.u17", 0x180000, 0x0080000, CRC(de29dd89) SHA1(441aefbc7ee64515ee66431ef504e76dc8dc5ca3) )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_END
ROM_START( denseib2 )
ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_REGION( 0x200000, "user7", 0 )
@@ -1462,9 +1437,6 @@ ROM_END
ROM_START( sblast2b )
ROM_REGION( 0x180000, "user3", ROMREGION_ERASEFF )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_REGION( 0x180000, "user7", 0 )
@@ -1511,18 +1483,12 @@ ROM_START( legendsb )
ROM_CONTINUE( 0x0f0000, 0x008000 )
ROM_CONTINUE( 0x078000, 0x008000 )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_END
ROM_START( endless )
ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_REGION( 0x200000, "user7", 0 )
@@ -1535,9 +1501,6 @@ ROM_END
ROM_START( rushbets )
ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_REGION( 0x200000, "user7", 0 )
@@ -1550,9 +1513,6 @@ ROM_END
ROM_START( venom )
ROM_REGION( 0x300000, "user3", ROMREGION_ERASEFF )
- ROM_REGION(0x100, "sound_ipl", 0)
- ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
-
ROM_REGION(0x800, "user6", ROMREGION_ERASEFF)
ROM_REGION( 0x300000, "user7", 0 )
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index c878b7f46d1..f08c801f6d9 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -2258,6 +2258,27 @@ static INPUT_PORTS_START( tnk3 )
INPUT_PORTS_END
+static INPUT_PORTS_START( tnk3b )
+ PORT_INCLUDE( tnk3 )
+
+ // no rotary joystick in this version. Player fires in the direction he's facing.
+ // this is accomplished by hooking the joystick input to the rotary input, plus
+ // of course the code is patched to handle that.
+
+ PORT_MODIFY("IN1")
+ PORT_BIT( 0x21, 0x01, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x42, 0x02, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x84, 0x04, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x18, 0x08, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_MODIFY("IN2")
+ PORT_BIT( 0x21, 0x01, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x42, 0x02, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x84, 0x04, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x18, 0x08, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
+INPUT_PORTS_END
+
+
static INPUT_PORTS_START( athena )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
@@ -4522,7 +4543,41 @@ ROM_END
ROM_START( tnk3j )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "p1.4e", 0x0000, 0x4000, CRC(03aca147) SHA1(9ce4cfdfbd22f10e13c8e474dc2e5aa3bfd57e0b) )
+ ROM_LOAD( "p1.4e", 0x0000, 0x4000, CRC(03aca147) SHA1(9ce4cfdfbd22f10e13c8e474dc2e5aa3bfd57e0b) )
+ ROM_LOAD( "tnk3-p2.bin", 0x4000, 0x4000, CRC(0ae0a483) SHA1(6a1ba86da4fd75bfb00855db04eac2727ec4159e) )
+ ROM_LOAD( "tnk3-p3.bin", 0x8000, 0x4000, CRC(d16dd4db) SHA1(dcbc61251c13e11ce3cdd7a5ad200cd2d2758cab) )
+
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "tnk3-p4.bin", 0x0000, 0x4000, CRC(01b45a90) SHA1(85ba3b157cd6463c92ed831bb48d38f3a16f9537) )
+ ROM_LOAD( "tnk3-p5.bin", 0x4000, 0x4000, CRC(60db6667) SHA1(9c4bb99473c6d9b8ac9086b7364b6278b70757f6) )
+ ROM_LOAD( "tnk3-p6.bin", 0x8000, 0x4000, CRC(4761fde7) SHA1(dadf60e33f5dd8108478ca480bcef6b2624cfca8) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "tnk3-p10.bin", 0x0000, 0x4000, CRC(7bf0a517) SHA1(0197feeaf511ac59f3df8195ec57e947fb08e995) )
+ ROM_LOAD( "tnk3-p11.bin", 0x4000, 0x4000, CRC(0569ce27) SHA1(7aa73f57ad97445ce5729f05cd8d24973886dbf5) )
+
+ ROM_REGION( 0x0c00, "proms", 0 )
+ ROM_LOAD( "7122.2", 0x000, 0x400, CRC(34c06bc6) SHA1(bb68e96a8fcc754840420952dab961e03bf6acdd) )
+ ROM_LOAD( "7122.1", 0x400, 0x400, CRC(6d0ac66a) SHA1(e792218ec43dd10473dc020afed8527cf43ea0d0) )
+ ROM_LOAD( "7122.0", 0x800, 0x400, CRC(4662b4c8) SHA1(391c2b8a17ce2e092b46a17fc4170dc1e3bde426) )
+
+ ROM_REGION( 0x4000, "tx_tiles", 0 )
+ ROM_LOAD( "p14.1e", 0x0000, 0x2000, CRC(6bd575ca) SHA1(446bb929fa19a7ff8b92731f71ab3e3252899f07) )
+ ROM_RELOAD( 0x2000, 0x2000 )
+
+ ROM_REGION( 0x8000, "bg_tiles", 0 )
+ ROM_LOAD( "tnk3-p12.bin", 0x0000, 0x4000, CRC(ff495a16) SHA1(e6b97a63efe58018260ff34f0ea4edc81718cb14) )
+ ROM_LOAD( "tnk3-p13.bin", 0x4000, 0x4000, CRC(f8344843) SHA1(c741dc84b48f830f6d4eaa4476f5c2a391153acc) )
+
+ ROM_REGION( 0x0c000, "sp16_tiles", 0 )
+ ROM_LOAD( "tnk3-p7.bin", 0x00000, 0x4000, CRC(06b92c88) SHA1(b39c2cc4a58937d89f9b0c9093b9742509db64a3) )
+ ROM_LOAD( "tnk3-p8.bin", 0x04000, 0x4000, CRC(63d0e2eb) SHA1(96182639bb620d9692a4c8266130769c44dd29f8) )
+ ROM_LOAD( "tnk3-p9.bin", 0x08000, 0x4000, CRC(872e3fac) SHA1(98e7e9315fe7ccc51151c67dc60a362a1c2d8372) )
+ROM_END
+
+ROM_START( tnk3b ) // Korean bootleg, hacked to use standard joysticks. Only the first program ROM differs
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "tnk3-p1a.bin", 0x0000, 0x4000, CRC(26c45b82) SHA1(5ba944e9508a935f77e1555c6920b0bc638b6423) )
ROM_LOAD( "tnk3-p2.bin", 0x4000, 0x4000, CRC(0ae0a483) SHA1(6a1ba86da4fd75bfb00855db04eac2727ec4159e) )
ROM_LOAD( "tnk3-p3.bin", 0x8000, 0x4000, CRC(d16dd4db) SHA1(dcbc61251c13e11ce3cdd7a5ad200cd2d2758cab) )
@@ -6365,6 +6420,7 @@ GAME( 1985, alphamis, aso, aso, alphamis, snk_state, empty_init, RO
GAME( 1985, arian, aso, aso, alphamis, snk_state, empty_init, ROT270, "SNK", "Arian Mission", 0 )
GAME( 1985, tnk3, 0, tnk3, tnk3, snk_state, empty_init, ROT270, "SNK", "T.N.K III (US)", 0 )
GAME( 1985, tnk3j, tnk3, tnk3, tnk3, snk_state, empty_init, ROT270, "SNK", "T.A.N.K (Japan)", 0 )
+GAME( 1985, tnk3b, tnk3, tnk3, tnk3b, snk_state, empty_init, ROT270, "SNK", "T.A.N.K (bootleg, 8-way joystick)", 0 )
GAME( 1986, athena, 0, athena, athena, snk_state, empty_init, ROT0, "SNK", "Athena", 0 )
GAME( 1986, athenab, athena, athena, athena, snk_state, empty_init, ROT0, "SNK", "Athena (bootleg)", 0 ) // is this really a bootleg?
GAME( 1987, sathena, athena, athena, athena, snk_state, empty_init, ROT0, "bootleg", "Super Athena (bootleg)", 0 )
diff --git a/src/mame/drivers/softbox.cpp b/src/mame/drivers/softbox.cpp
index 1d9d7cb6ef2..f5c18764eff 100644
--- a/src/mame/drivers/softbox.cpp
+++ b/src/mame/drivers/softbox.cpp
@@ -257,7 +257,7 @@ READ8_MEMBER( softbox_state::ppi1_pc_r )
*/
- uint8_t status = m_hdc->status_r(space, 0);
+ uint8_t status = m_hdc->status_r();
uint8_t data = 0;
data |= (status & corvus_hdc_device::CONTROLLER_BUSY) ? 0 : 0x10;
diff --git a/src/mame/drivers/spg2xx_jakks.cpp b/src/mame/drivers/spg2xx_jakks.cpp
index 0242c27e26b..705a580c288 100644
--- a/src/mame/drivers/spg2xx_jakks.cpp
+++ b/src/mame/drivers/spg2xx_jakks.cpp
@@ -20,6 +20,8 @@ public:
void walle(machine_config& config);
void mk(machine_config& config);
+ void jakks_mpac(machine_config& config);
+
private:
void mem_map_2m_mkram(address_map& map);
DECLARE_WRITE16_MEMBER(portc_w) override;
@@ -91,6 +93,27 @@ static INPUT_PORTS_START( mk )
PORT_CONFSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
+static INPUT_PORTS_START( jak_mpac )
+ PORT_START("P1")
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 )
+ PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu")
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+
+ PORT_START("P3")
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
+ PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("DIALX") // for Pole Position, joystick can be twisted like a dial/wheel (limited?) (check range) (note, range is different to GKR unit)
+ PORT_BIT(0x03ff, 0x0000, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x03ff)
+INPUT_PORTS_END
+
void jakks_state::base_config(machine_config& config)
{
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
@@ -137,6 +160,13 @@ void jakks_state::mk(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_RANDOM);
}
+void jakks_state::jakks_mpac(machine_config &config)
+{
+ base_config(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &jakks_state::mem_map_1m);
+
+ m_maincpu->adc_in<0>().set_ioport("DIALX");
+}
ROM_START( jak_batm )
@@ -158,9 +188,19 @@ ROM_START( jak_mk )
ROM_LOAD16_WORD_SWAP( "jakmk.bin", 0x000000, 0x400000, CRC(b7d7683e) SHA1(e54a020ee746d240267ef78bed7aea744351b421) )
ROM_END
+ROM_START( jak_mpacw )
+ ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD16_WORD_SWAP( "wirelessnamco.bin", 0x000000, 0x200000, CRC(78a318ca) SHA1(3c2601cbb023edb6a1f3d4bce686e0be1ef63eee) )
+ROM_END
+
+
// JAKKS Pacific Inc TV games
CONS( 2004, jak_batm, 0, 0, batman, batman, jakks_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "The Batman (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 2008, jak_wall, 0, 0, walle, walle, jakks_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wall-E (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// you could link 2 pads of this together for 2 player mode as you could with WWE (feature not emulated)
CONS( 2004, jak_mk, 0, 0, mk, mk, jakks_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Mortal Kombat (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+
+// this is an older unit than the jak_mpac Game Key Ready set and features no GameKey branding
+CONS( 2004, jak_mpacw,0, 0, jakks_mpac, jak_mpac, jakks_state, empty_init, "JAKKS Pacific Inc / Namco / HotGen Ltd", "Ms. Pac-Man 7-in-1 (Wireless) (Ms. Pac-Man, Pole Position, Galaga, Xevious, Mappy, New Rally X, Bosconian) (18 AUG 2004 A)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NM (3 keys available [Dig Dug, New Rally-X], [Rally-X, Pac-Man, Bosconian], [Pac-Man, Bosconian])
+
diff --git a/src/mame/drivers/spg2xx_jakks_sharp.cpp b/src/mame/drivers/spg2xx_jakks_sharp.cpp
new file mode 100644
index 00000000000..38707799aec
--- /dev/null
+++ b/src/mame/drivers/spg2xx_jakks_sharp.cpp
@@ -0,0 +1,79 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz, David Haywood
+
+// Sharp Cookie units were published by JAKKS Pacific under the 'Child Guidance' brand (battery compartments etc. still have JAKKS branding)
+
+#include "emu.h"
+#include "includes/spg2xx.h"
+#include "machine/nvram.h"
+
+class jakks_sharp_state : public spg2xx_game_state
+{
+public:
+ jakks_sharp_state(const machine_config &mconfig, device_type type, const char *tag) :
+ spg2xx_game_state(mconfig, type, tag)
+ { }
+
+ void base_config(machine_config& config);
+ void base_config_pal(machine_config& config);
+
+private:
+};
+
+static INPUT_PORTS_START( jak_sharp )
+ PORT_START("P1")
+ PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Menu / Pause")
+ PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
+
+ PORT_START("P2")
+ PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("P3")
+ PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // PAL/NTSC flag, set to PAL (not verified, based on other JAKKS units)
+ PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+void jakks_sharp_state::base_config(machine_config& config)
+{
+ SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
+
+ spg2xx_base(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &jakks_sharp_state::mem_map_1m);
+
+ m_maincpu->porta_in().set_ioport("P1");
+ m_maincpu->portb_in().set_ioport("P2");
+ m_maincpu->portc_in().set_ioport("P3");
+}
+
+void jakks_sharp_state::base_config_pal(machine_config& config)
+{
+ base_config(config);
+
+ m_maincpu->set_pal(true);
+ m_screen->set_refresh_hz(50);
+}
+
+
+ROM_START( jsc_thom )
+ ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD16_WORD_SWAP( "shckthomas.bin", 0x000000, 0x200000, CRC(bc9549ed) SHA1(7925a8ac166f9c7a56bc5f9d4f9f774af1c92d05) )
+ROM_END
+
+// has UK specific voice actors, US versions on YouTube have different voices not present in this set
+CONS( 2007, jsc_thom, 0, 0, base_config_pal, jak_sharp, jakks_sharp_state, empty_init, "JAKKS Pacific Inc / Child Guidance / Pronto Games", "Thomas & Friends - Learning Circus Express (Sharp Cookie) (PAL, UK)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3 released) - The upper part of this one is pink/purple.
+
+// The Amazing Spider-Man - Great Math Caper
+// Scooby-Doo! - The Pirate's Puzzles
+// Go Diego Go - Aztec ABC Adventure
+// Dora the Explorer - Dora Saves the Mermaids
diff --git a/src/mame/drivers/spg2xx_jakks_tvtouch.cpp b/src/mame/drivers/spg2xx_jakks_tvtouch.cpp
index 6762454f54f..f258d639355 100644
--- a/src/mame/drivers/spg2xx_jakks_tvtouch.cpp
+++ b/src/mame/drivers/spg2xx_jakks_tvtouch.cpp
@@ -209,7 +209,7 @@ READ16_MEMBER(jakks_tvtouch_state::portb_r)
READ16_MEMBER(jakks_tvtouch_state::portc_r)
{
- uint16_t data = m_i2cmem->read_sda();
+ uint16_t data = (m_i2cmem->read_sda() & 1) | (m_io_p3->read() & 0xfffe);
return data;
}
diff --git a/src/mame/drivers/srumbler.cpp b/src/mame/drivers/srumbler.cpp
index be68eac5b0b..22f8c554e28 100644
--- a/src/mame/drivers/srumbler.cpp
+++ b/src/mame/drivers/srumbler.cpp
@@ -23,7 +23,7 @@
#include "speaker.h"
-WRITE8_MEMBER(srumbler_state::bankswitch_w)
+void srumbler_state::bankswitch_w(uint8_t data)
{
/*
banking is controlled by two PROMs. 0000-4fff is mapped to the same
@@ -57,7 +57,7 @@ void srumbler_state::machine_start()
}
/* initialize banked ROM pointers */
- bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0);
+ bankswitch_w(0);
}
TIMER_DEVICE_CALLBACK_MEMBER(srumbler_state::interrupt)
diff --git a/src/mame/drivers/sshangha.cpp b/src/mame/drivers/sshangha.cpp
index 6a820da2c52..571bf7c52b6 100644
--- a/src/mame/drivers/sshangha.cpp
+++ b/src/mame/drivers/sshangha.cpp
@@ -155,51 +155,6 @@ WRITE16_MEMBER( sshangha_state::sshangha_protection_region_8_146_w )
m_deco146->write_data( deco146_addr, data, mem_mask, cs );
}
-/*
-
- Swizzle palette writes a bit so that the 'tilemap_12_combine_draw' code in the tilemap device works with this game (used for girl, see attract mode)
-
- Normal Palette layout
-
- 0x000 - 0x3ff Sprites 2
- 0x400 - 0x7ff Tilemap PF1
- 0x800 - 0xbff Sprites 1
- 0xc00 - 0xfff Tilemap PF2
-
- rearranged to
-
- 0x000 - 0x3ff Sprites 1
- 0x400 - 0x7ff Sprites 2
- 0x800 - 0xbff Tilemap PF2
- 0xc00 - 0xfff Tilemap PF1
-
-*/
-
-WRITE16_MEMBER(sshangha_state::palette_w)
-{
- switch (offset & 0x600)
- {
- case 0x000: offset = (offset & 0x1ff) | 0x200; break;
- case 0x200: offset = (offset & 0x1ff) | 0x600; break;
- case 0x400: offset = (offset & 0x1ff) | 0x000; break;
- case 0x600: offset = (offset & 0x1ff) | 0x400; break;
- }
-
- m_palette->write16(offset, data, mem_mask);
-}
-
-READ16_MEMBER(sshangha_state::palette_r)
-{
- switch (offset & 0x600)
- {
- case 0x000: offset = (offset & 0x1ff) | 0x200; break;
- case 0x200: offset = (offset & 0x1ff) | 0x600; break;
- case 0x400: offset = (offset & 0x1ff) | 0x000; break;
- case 0x600: offset = (offset & 0x1ff) | 0x400; break;
- }
- return m_palette->read16(offset);
-}
-
void sshangha_state::sshangha_map(address_map &map)
{
map.global_mask(0x3fffff);
@@ -223,7 +178,7 @@ void sshangha_state::sshangha_map(address_map &map)
map(0x370000, 0x370001).r(FUNC(sshangha_state::deco_71_r));
map(0x370000, 0x370007).nopw();
- map(0x380000, 0x380fff).ram().rw(FUNC(sshangha_state::palette_r),FUNC(sshangha_state::palette_w)).share("palette");
+ map(0x380000, 0x380fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x381000, 0x383fff).ram(); // unused palette area
map(0x3e0000, 0x3e3fff).rw(FUNC(sshangha_state::sshangha_protection_region_8_146_r), FUNC(sshangha_state::sshangha_protection_region_8_146_w));
map(0x3ec000, 0x3f3fff).ram();
@@ -248,7 +203,7 @@ void sshangha_state::sshanghab_map(address_map &map)
map(0x340000, 0x340fff).ram(); // original spriteram, used as a buffer here
- map(0x380000, 0x380fff).ram().rw(FUNC(sshangha_state::palette_r),FUNC(sshangha_state::palette_w)).share("palette");
+ map(0x380000, 0x380fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x381000, 0x383fff).ram(); // unused palette area
map(0x3c0000, 0x3c07ff).ram().share(m_spriteram); // bootleg spriteram
@@ -375,11 +330,11 @@ INPUT_PORTS_END
static const gfx_layout charlayout =
{
8,8, /* 8*8 chars */
- 4096,
+ RGN_FRAC(1,2),
4, /* 4 bits per pixel */
- { 8, 0, 0x100000*8+8,0x100000*8+0 },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
+ { 8, 0, RGN_FRAC(1,2)+8,RGN_FRAC(1,2)+0 },
+ { STEP8(0,1) },
+ { STEP8(0,8*2) },
16*8
};
@@ -388,11 +343,9 @@ static const gfx_layout tilelayout =
16,16,
RGN_FRAC(1,2),
4,
- { 8, 0, 0x100000*8+8, 0x100000*8+0 },
- { 32*8+0, 32*8+1, 32*8+2, 32*8+3, 32*8+4, 32*8+5, 32*8+6, 32*8+7,
- 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
- 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
+ { 8, 0, RGN_FRAC(1,2)+8, RGN_FRAC(1,2)+0 },
+ { STEP8(16*8*2,1), STEP8(0,1) },
+ { STEP16(0,8*2) },
64*8
};
@@ -410,6 +363,12 @@ DECO16IC_BANK_CB_MEMBER(sshangha_state::bank_callback)
return (bank >> 4) * 0x1000;
}
+// similar as tattass (deco32.cpp) but base color is pf2 color bank
+u16 sshangha_state::mix_callback(u16 p, u16 p2)
+{
+ return (p2 & 0x300) ^ (((p & 0x10) << 5) | (p & 0x0f) | ((p2 & 0x0f) << 4));
+}
+
void sshangha_state::sshangha(machine_config &config)
{
/* basic machine hardware */
@@ -420,7 +379,6 @@ void sshangha_state::sshangha(machine_config &config)
Z80(config, m_audiocpu, 16_MHz_XTAL / 4);
m_audiocpu->set_addrmap(AS_PROGRAM, &sshangha_state::sound_map);
-
config.set_maximum_quantum(attotime::from_hz(6000));
screen_device& screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
@@ -432,19 +390,18 @@ void sshangha_state::sshangha(machine_config &config)
GFXDECODE(config, "gfxdecode", m_palette, gfx_sshangha);
- PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 0x4000);
+ PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 0x4000/4);
DECO16IC(config, m_tilegen, 0);
m_tilegen->set_pf1_size(DECO_64x32);
m_tilegen->set_pf2_size(DECO_64x32);
- m_tilegen->set_pf1_trans_mask(0x0f);
- m_tilegen->set_pf2_trans_mask(0x0f);
- m_tilegen->set_pf1_col_bank(0x30);
- m_tilegen->set_pf2_col_bank(0x20);
+ m_tilegen->set_pf1_col_bank(0x10);
+ m_tilegen->set_pf2_col_bank(0x30);
m_tilegen->set_pf1_col_mask(0x0f);
m_tilegen->set_pf2_col_mask(0x0f);
m_tilegen->set_bank1_callback(FUNC(sshangha_state::bank_callback));
m_tilegen->set_bank2_callback(FUNC(sshangha_state::bank_callback));
+ m_tilegen->set_mix_callback(FUNC(sshangha_state::mix_callback));
m_tilegen->set_pf12_8x8_bank(0);
m_tilegen->set_pf12_16x16_bank(1);
m_tilegen->set_gfxdecode_tag("gfxdecode");
@@ -463,17 +420,14 @@ void sshangha_state::sshangha(machine_config &config)
m_deco146->port_c_cb().set_ioport("DSW");
/* sound hardware */
- SPEAKER(config, "lspeaker").front_left(); // sure it's stereo?
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "mono").front_center();
ym2203_device &ymsnd(YM2203(config, "ymsnd", 16_MHz_XTAL / 4));
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
- ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 0.33);
- ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 0.33);
+ ymsnd.add_route(ALL_OUTPUTS, "mono", 0.33);
okim6295_device &oki(OKIM6295(config, "oki", 16_MHz_XTAL / 8, okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified
- oki.add_route(ALL_OUTPUTS, "lspeaker", 0.27);
- oki.add_route(ALL_OUTPUTS, "rspeaker", 0.27);
+ oki.add_route(ALL_OUTPUTS, "mono", 0.27);
}
void sshangha_state::sshanghab(machine_config &config)
diff --git a/src/mame/drivers/sstrangr.cpp b/src/mame/drivers/sstrangr.cpp
index 752f772fcfa..c83a1ed145c 100644
--- a/src/mame/drivers/sstrangr.cpp
+++ b/src/mame/drivers/sstrangr.cpp
@@ -3,14 +3,332 @@
/*******************************************************/
/* */
/* Yachiyo "Space Stranger/Space Stranger 2" */
+/* The cocktail version is also known as */
+/* "Super Space Stranger" but it is the same game */
/* */
/*******************************************************/
+/*
+********************************************************
+
+Space Stranger hardware info by Guru
+
+This is a black/white Space Invaders clone made by Yachiyo Electric Co. Ltd. using colored cellophane
+to make it look colored. The gameplay is mostly the same as any other Space Invaders game except the mother
+ship changes direction randomly and if the player hits the shields 50 points are deducted from the score.
+So be careful, score can go to 0 very quickly!
+The sounds are very close to Taito Space Invaders, possibly even identical.
+The hardware has a built-in service mode with RAM/ROM test and I/O check.
+When enabling the I/O check, if ROMs or RAM are bad various sounds are made to denote the bad chips.
+The following table summarizes the chip locations and sounds made. Note a bad CPU will also cause sounds
+to be made on bootup but the I/O check or other in-game tests will not be available.
+
+Chip# Type Sounds Made
+------------------------------------------------------
+38 4116 RAM UFO Flying then Extra Ship
+39 4116 RAM Player Shoot then Extra Ship
+40 4116 RAM Player Explosion then Extra Ship
+41 4116 RAM Invader Explosion then Extra Ship
+51 4116 RAM UFO Flying then silence
+52 4116 RAM Player Shoot then silence
+53 4116 RAM Player Explosion then silence
+54 4116 RAM Invader Explosion then silence
+58 EPROM 01 Player Shoot then Invader Explosion \
+59 EPROM 02 UFO Flying then Invader Explosion |
+60 EPROM 03 Invader Explosion |
+61 EPROM 04 Player Explosion then Invader Explosion |
+62 EPROM 05 Player Shoot then Player Explosion | also with Invader movement sounds
+63 EPROM 06 Player Explosion then UFO Flying |
+64 EPROM 07 Player Explosion |
+65 EPROM 08 Player Shoot then UFO Flying /
+
+There are schematics available for Space Stranger but the scans are too small to read so completely useless.
+There is another game known as 'Super Space Stranger' that has a service manual available with schematics.
+It is also known as 'Mark Stranger 2' and is a color version of the same game.
+There is a Super Space Stranger flyer that shows the game as b/w with color bars. The game has 'Super Space Stranger'
+printed on the control panel of the b/w cocktail cabinet but the manual also just says 'Space Stranger' in many places,
+so there is some uncertainty about exactly what the color version is called. The title screen of the color version just
+says 'Space Stranger'. Super Space Stranger is said to be made by Banpresto but that is false because Banpresto didn't
+exist until 1989. Additionally there is no evidence in the game or on the control panel or marquee or PCB stating any
+other manufacturer other than Yachiyo.
+It gets more complicated... the Super Space Stranger service manual has text at the bottom of each page 'HOEI SANGYO CORPORATION'
+At the time Hoei (founded in 1977) was doing arcade-related work for Sega but there is no evidence to suggest the
+PCB was manufactured by Hoei. It is possible Hoei made the PCB for Yachiyo since they were also doing arcade work
+for Sega, although exactly what work (hardware or software) is unknown. Hoei changed their name to Coreland in 1982
+and later in 1989 they became Banpresto.
+
+
+Bottom Board
+------------
+
+YD7000-1A
+ |------------------------------------------------|
+ | 18.432MHz |----------| |
+ | M5L8224 | 8080 | |
+ | |----------| |
+ | 7400 7404 |
+ | |
+ | 7474 7474 7408 7400 |
+ | |
+|--| 7420 7404 7408 7408 7442 |
+| |
+| 7404 74161 7408 7408 |
+|5 HSS_01 |
+|0 7400 74161 74157 74157 |
+|P |
+|I 7474 74161 74157 74157 HSS_02 |
+|N |
+| 7402 74161 74157 74157 |
+|E HSS_03 |
+|D 7408 7474 7408 7408 |
+|G |
+|E 7404 7410 74367 74367 HSS_04 |
+| |
+|C 74165 74174 74174 |
+|O HSS_05 |
+|N 7408 74165 74367 74367 |
+|N |
+| HSS_06 |
+| 7432 4116 4116 |
+|--| |
+ | 4116 4116 HSS_07 |
+ | 74121 |
+ | 4116 4116 |
+ | 7400 7432 HSS_08 |
+ | 4116 4116 |
+ | 10MHz 7404 EMPTY |
+ | DIP24_SKT |
+ |------------------------------------------------|
+Notes: All IC's shown.
+ 8080 CPU - AM8080 or M5L8080 CPU. Clock 2.048MHz (18.432/9 via M5L8224 Clock Generator IC)
+ M5L8224 - Mitsubishi M5L8224 Clock Generator/Divider IC. Divider is fixed at divide-by-9
+ HSS* - 2708 EPROMs
+ 4116 - Mitsubishi M58759S-25 16k x1-bit DRAM compatible with 4116
+ EMPTY - Space for a 24 pin ROM but not populated with anything
+ DIP24_SKT - DIP24 socket, empty
+
+
+Top PCB
+-------
+
+YD7000-2B
+ |----------------------------------------|
+ | |
+ | |
+ | |
+ | 4030 4006 |
+ | |
+ | |
+ | LM380 LM3900 |
+|--| |
+| |
+| LM3900 |
+|5 53200 7408 |
+|0 VR2 |
+|P 74367 7414 |
+|I SW(5) LM3900 |
+|N 74367 7414 |
+| |
+|E 74367 7414 LM3900 |
+|D VR3 |
+|G |
+|E LM3900 |
+| |
+|C VR7 |
+|O LM3900 |
+|N |
+|N VR4 |
+| LM3900 |
+| 74174 7407 |
+|--| VR1 |
+ | 53204 SN76477 |
+ | |
+ | VR5 |
+ | 74174 53217 1455 M53210 |
+ | |
+ | 1455 `VR6 |
+ | |
+ |----------------------------------------|
+Notes: All IC's shown.
+ SN76477 - Texas Instruments Complex Sound Generator
+ LM3900 - Quad Operational Amplifier
+ LM380 - 2.5W Power Amplifier
+ 1455 - MC1455 equivalent to NE555 Timer
+ VR1-7 - Volume Pots
+ VR1 -UFO flying sound (generated by the SN76477 IC)
+ VR2 -Shoot sound
+ VR3 -Player explosion sound
+ VR4 -Invader hit sound
+ VR5 -Bonus extra base sound
+ VR6 -Invader movement sound
+ VR7 -UFO hit sound
+ VR8 - Master volume pot (50k) mounted inside the cabinet (connected to edge connector, not mounted on the PCB)
+ SW(5) - 5-position DIP Switch marked 'SW'
+ 53204 - Mitsubishi branded logic chip equivalent to 7404
+ 53217 - Mitsubishi branded logic chip equivalent to 7417
+ 53210 - Mitsubishi branded logic chip equivalent to 7410
+ 53200 - Mitsubishi branded logic chip equivalent to 7400
+
+
+Joiner Board (parts side shown)
+------------
+
+YD7000-M2
+|-----------------| |-----------------|
+|* 14-WAY CONN | |* 14-WAY CONN |
+| LEFT |--------------------------------| RIGHT |
+| |
+| |------------------------------------------------------------| | <--- Top board plugs in here
+| |------------------------------------------------------------| |
+| |
+| |------------------------------------------------------------| | <--- Bottom board plugs in here
+| |------------------------------------------------------------| |
+| |
+|--------------------------------------------------------------------|
+Notes:
+ The long slots are KEL 4800-100-035 100 pin female card edge connectors with 0.156" pin spacing.
+ On the diagram above * denotes pin 1 of the 14 pin connectors.
+ Space Stranger uses this board to join the top and bottom boards together and provides a way to wire up the
+ controls/video/power etc to the machine via the left and right 14-way edge connectors.
+ The game has a table/upright mode that can be changed by connecting two jumper pads on the joiner PCB with a solder blob.
+ This is located at pin 40 on the top board and is conveniently made available on the back side of the joiner board
+ with the two solder pads. When open it sets table mode, when closed it sets upright mode.
+
+ Pinout of edge connector
+ ------------------------
+
+ LEFT PARTS LEFT SOLDER RIGHT PARTS RIGHT SOLDER
+ ------------------------- ---------------------------
+ GND 1 A GND GND 1 A GND
+ GND 2 B GND GND 2 B GND
+ NC 3 C COIN COUNTER NC 3 C VR8 MASTER VOLUME POT RIGHT PIN \ (left pin of volume pot unconnected)
+ NC 4 D NC NC 4 D VR8 MASTER VOLUME POT MIDDLE PIN /
+ 1P START 5 E I/O CHECK 5V 5 E 5V
+ 2P START 6 F COIN 5V 6 F 5V
+ UNKNOWN 7 G SERVICE COIN *2P SHOOT 7 G NC
+ 1P RIGHT 8 H 2P RIGHT 12V 8 H 12V
+ 1P LEFT 9 I 2P LEFT 12V 9 I 12V
+ 1P SHOOT 10 J 2P SHOOT -5V 10 J -5V
+ SPKR + 11 K SPKR - -5V 11 K -5V
+ NC 12 L NC *2P RIGHT 12 L *2P LEFT A (* - 2P controls for table)
+ SYNC 13 M VIDEO 12V 13 M 12V
+ GND 14 N GND 12V 14 N 12V
+
+Note: NC means No Connection.
+To access the I/O Check Mode, ground R17 (side near edge connector) on the top board or ground pin E
+of the left edge connector then power up the game.
+The I/O test screen shows 3x 8-bit memory locations with bits that change when controls and settings
+are adjusted. Note if sounds are heard, check the RAM/ROM test table above.
+For the purpose of describing each bit, they will be called Byte A, B & C.
+With all DIP switches off and controls at default positions, the 8-bit memory locations look like
+this in the default state:
+ 1 1 1 1 1 0 0 0 <-- Byte A
+ 0 0 0 1 0 0 0 0 <-- Byte B
+ % 0 1 1 1 1 1 1 <-- Byte C
+0 means open, 1 means closed. & denotes moving fast between 0 and 1
+Refer to the table below for the meaning of each bit.
+Bits described on each line are the position(s) denoted by the X and
+as read from the screen left to right.
+
+Byte A
+------
+X X X X X - - - : Dip Switches 1-5. 1 when DSW is off, 0 when DSW is on
+- - - - - X - - : Fire Player 2 (Note when pressed, the characters on screen are flipped vertically. This is normal)
+- - - - - - X - : Left Player 2
+- - - - - - - X : Right Player 2
+
+Byte B
+------
+X - - - - - - - : Coin
+- X - - - - - - : 2 Player Start
+- - X - - - - - : 1 Player Start
+- - - X - - - - : I/O Check (always 1 when in the I/O check mode)
+- - - - X - - - : Table/Upright setting. 0 for table, 1 for upright
+- - - - - X - - : Fire Player 1
+- - - - - - X - : Left Player 1
+- - - - - - - X : Right Player 1
+
+Byte C
+------
+X - - - - - - - : Interrupt. This is always rapidly moving between 0 and 1
+- X - - - - - - : Rapid Fire (only used on color version)
+- - X X X X X X : Always 1
+
+
+Color version Space Stranger 2 / Mark Stranger 2 etc
+----------------------------------------------------
+As well as a different PCB number (YD-7700), the color version PCB has one 64kbit mask ROM and one 2708 EPROM
+for the code and an extra 2708 EPROM near the 10MHz crystal for color data and a few extra logic chips, so it
+is easy to spot the color version just by looking at the bottom PCB. The top board is identical to the older
+b/w version Space Stranger top board and sounds are also identical between versions.
+
+Bottom Board
+------------
+
+YD7700-1G
+ |------------------------------------------------|
+ | 18.432MHz |----------| |
+ | 7408 M5L8224 | 8080 | |
+ | |----------| |
+ | 7408 7408 7400 7404 |
+ | |
+ | 7474 7474 7408 7400 |
+ | |
+|--| 7420 7404 7408 7408 7442 |
+| |
+| 7404 74161 7408 7408 |
+|5 DIP24 |
+|0 7400 74161 74157 74157 |
+|P |
+|I 7474 74161 74157 74157 DIP24 |
+|N |
+| 7402 74161 74157 74157 |
+|E DIP24 |
+|D 7408 7474 7408 7408 |
+|G |
+|E 7404 7410 74367 74367 DIP24 |
+| |
+|C 74165 74174 74174 |
+|O DIP24 |
+|N 7417 7408 74165 74367 74367 |
+|N |
+| DIP24 |
+| 7402 7432 7420 4116 4116 |
+|--| |
+ | 4116 4116 DIP24 |
+ | 7400 74121 |
+ | 4116 4116 |
+ | 74174 7400 7432 DIP24 |
+ | 4116 4116 8KMASK |
+ | 10MHz 7404 2708 |
+ | 2708 74367 74367 |
+ |------------------------------------------------|
+Notes: All IC's shown.
+ 8080 CPU - AM8080 or M5L8080 CPU. Clock 2.048MHz (18.432/9 via M5L8224 Clock Generator IC)
+ M5L8224 - Mitsubishi M5L8224 Clock Generator/Divider IC. Divider is fixed at divide-by-9
+ 2708 - 2708 EPROMs
+ 4116 - Mitsubishi M58759S-25 16k x1-bit DRAM compatible with 4116
+ DIP24 - DIP24 socket, empty. Note early revisions used 2708 EPROMs at these locations, and no 8K mask ROM
+
+
+PCB video reference for Space Stranger 2: https://www.youtube.com/watch?v=mn8hCd_uqcI
+
+TODO:
+ * Using sound samples from Space Invaders (real PCB sounds virtually identical anyway). Get schematics and use netlist instead.
+ * Fix attract mode and I/O test random sound (should be silent)
+ * Screen should flash red when losing a life in Space Stranger 2 (see video reference)
+
+********************************************************/
+
+
#include "emu.h"
#include "cpu/i8085/i8085.h"
+#include "sound/samples.h"
+#include "sound/sn76477.h"
#include "emupal.h"
#include "screen.h"
+#include "speaker.h"
#include "sstrangr.lh"
@@ -21,6 +339,8 @@ public:
sstrangr_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
+ m_samples(*this, "samples"),
+ m_sn(*this, "snsnd"),
m_palette(*this, "palette"),
m_ram(*this, "ram")
{ }
@@ -28,16 +348,22 @@ public:
void sstrngr2(machine_config &config);
void sstrangr(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
+ required_device<samples_device> m_samples;
+ required_device<sn76477_device> m_sn;
optional_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_ram;
uint8_t m_flip_screen;
+ uint8_t m_last_sound1;
+ uint8_t m_last_sound2;
- DECLARE_WRITE8_MEMBER(port_w);
-
- virtual void video_start() override;
+ void port44_w(uint8_t data);
+ void port42_w(uint8_t data);
uint32_t screen_update_sstrangr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_sstrngr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -55,22 +381,22 @@ private:
void sstrangr_state::video_start()
{
+ m_last_sound1 = m_last_sound2 = 0xff;
+
save_item(NAME(m_flip_screen));
+ save_item(NAME(m_last_sound1));
+ save_item(NAME(m_last_sound2));
}
uint32_t sstrangr_state::screen_update_sstrangr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- offs_t offs;
-
- for (offs = 0; offs < 0x2000; offs++)
+ for (offs_t offs = 0; offs < 0x2000; offs++)
{
- int i;
-
uint8_t x = offs << 3;
int y = offs >> 5;
uint8_t data = m_ram[offs];
- for (i = 0; i < 8; i++)
+ for (int i = 0; i < 8; i++)
{
pen_t pen;
@@ -133,12 +459,36 @@ uint32_t sstrangr_state::screen_update_sstrngr2(screen_device &screen, bitmap_rg
}
-WRITE8_MEMBER(sstrangr_state::port_w)
+void sstrangr_state::port44_w(uint8_t data)
{
+ uint8_t rising_bits = data & ~m_last_sound2;
+ if (BIT(rising_bits, 0)) m_samples->start(4, 3); // fleet move 1
+ if (BIT(rising_bits, 1)) m_samples->start(4, 4); // fleet move 2
+ if (BIT(rising_bits, 2)) m_samples->start(4, 5); // fleet move 3
+ if (BIT(rising_bits, 3)) m_samples->start(4, 6); // fleet move 4
+ if (BIT(rising_bits, 4)) m_samples->start(3, 7); // Hit Saucer
+
+ m_sn->enable_w(!BIT(data, 0)); // Saucer Sound
+
+ m_last_sound2 = data;
+
m_flip_screen = data & 0x20;
}
+void sstrangr_state::port42_w(uint8_t data)
+{
+ uint8_t rising_bits = data & ~m_last_sound1;
+ if (BIT(rising_bits, 0)) logerror("42 0 data: %02x rb: %02x\n", data, rising_bits);
+ if (BIT(rising_bits, 1)) m_samples->start(0, 0); // Shoot
+ if (BIT(rising_bits, 2)) m_samples->start(1, 1); // Death
+ if (BIT(rising_bits, 3)) m_samples->start(2, 2); // Hit
+ if (BIT(rising_bits, 4)) m_samples->start(5, 8); // Bonus
+ //if (BIT(rising_bits, 5)) logerror("42 bit 5"); // 1x after starting a game/life
+
+ m_sn->enable_w(!BIT(data, 0)); // Saucer Sound
+ m_last_sound1 = data;
+}
void sstrangr_state::sstrangr_map(address_map &map)
{
@@ -152,64 +502,100 @@ void sstrangr_state::sstrangr_map(address_map &map)
void sstrangr_state::sstrangr_io_map(address_map &map)
{
map(0x41, 0x41).portr("DSW");
- map(0x42, 0x42).portr("INPUTS");
- map(0x44, 0x44).portr("EXT").w(FUNC(sstrangr_state::port_w));
+ map(0x42, 0x42).portr("INPUTS").w(FUNC(sstrangr_state::port42_w));
+ map(0x44, 0x44).portr("EXT").w(FUNC(sstrangr_state::port44_w));
}
-
static INPUT_PORTS_START( sstrangr )
- PORT_START("DSW")
- PORT_DIPNAME( 0x03, 0x01, "Extra Play" )
+ PORT_START("DSW") // 1 x 5-dip bank
+ PORT_DIPNAME( 0x03, 0x01, "Extra Play" ) PORT_DIPLOCATION("SW:1,2")
PORT_DIPSETTING( 0x00, "Never" )
PORT_DIPSETTING( 0x01, "3000" )
PORT_DIPSETTING( 0x02, "4000" )
PORT_DIPSETTING( 0x03, "5000" )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x04, "4" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, "1000" )
PORT_DIPSETTING( 0x00, "2000" )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Must be ACTIVE_LOW for game to boot */
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW:5" ) // Must be ACTIVE_LOW (OFF) for game to boot
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
PORT_START("INPUTS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_SERVICE( 0x08, IP_ACTIVE_HIGH )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_SERVICE( 0x08, IP_ACTIVE_HIGH ) // This is an edge connector pin for testing ROM/RAM and I/O ports
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("EDGE:1") // This is an edge connector pin that is
+ PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) // brought out to two solder pads on the
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) // Joiner PCB
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
- PORT_START("EXT") /* External switches */
+ PORT_START("EXT") // External switches
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
+static const char *const sstrangr_sample_names[] =
+{
+ "*invaders",
+ "1", // shot/missile
+ "2", // base hit/explosion
+ "3", // invader hit
+ "4", // fleet move 1
+ "5", // fleet move 2
+ "6", // fleet move 3
+ "7", // fleet move 4
+ "8", // UFO/saucer hit
+ "9", // bonus base
+ nullptr
+};
void sstrangr_state::sstrangr(machine_config &config)
{
- /* basic machine hardware */
- I8080(config, m_maincpu, 1996800); /* clock is a guess, taken from mw8080bw */
+ // basic machine hardware
+ I8080A(config, m_maincpu, XTAL(18'432'000)/9); // M5L8080AP, measured 2047840 Hz
m_maincpu->set_addrmap(AS_PROGRAM, &sstrangr_state::sstrangr_map);
m_maincpu->set_addrmap(AS_IO, &sstrangr_state::sstrangr_io_map);
m_maincpu->set_periodic_int(FUNC(sstrangr_state::irq0_line_hold), attotime::from_hz(2*60));
- /* video hardware */
+ // video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_size(32*8, 262); /* vert size is a guess, taken from mw8080bw */
+ screen.set_size(32*8, 262); // vert size is a guess, taken from mw8080bw
screen.set_visarea(0*8, 32*8-1, 4*8, 32*8-1);
screen.set_refresh_hz(60);
screen.set_screen_update(FUNC(sstrangr_state::screen_update_sstrangr));
- /* sound hardware */
+ // sound hardware
+ SPEAKER(config, "mono").front_center();
+
+ SN76477(config, m_sn);
+ m_sn->set_noise_params(0, 0, 0);
+ m_sn->set_decay_res(0);
+ m_sn->set_attack_params(0, RES_K(100));
+ m_sn->set_amp_res(RES_K(56));
+ m_sn->set_feedback_res(RES_K(10));
+ m_sn->set_vco_params(0, CAP_U(0.1), RES_K(8.2));
+ m_sn->set_pitch_voltage(5.0);
+ m_sn->set_slf_params(CAP_U(1.0), RES_K(120));
+ m_sn->set_oneshot_params(0, 0);
+ m_sn->set_vco_mode(1);
+ m_sn->set_mixer_params(0, 0, 0);
+ m_sn->set_envelope_params(1, 0);
+ m_sn->set_enable(1);
+ m_sn->add_route(ALL_OUTPUTS, "mono", 0.5);
+
+ SAMPLES(config, m_samples);
+ m_samples->set_channels(6);
+ m_samples->set_samples_names(sstrangr_sample_names);
+ m_samples->add_route(ALL_OUTPUTS, "mono", 1.0);
}
@@ -220,22 +606,25 @@ void sstrangr_state::sstrangr(machine_config &config)
/* */
/*******************************************************/
-/* color version of Space Stranger, board has Stranger 2 written on it */
+// Color version of Space Stranger, board has Stranger 2 written on it.
+// Clarification required for the above comment.
+// Stranger 2? Really? The number on the PCB is YD7700-1G with no other markings present.
+// The game is actually known as Super Space Stranger according to the manual.
static INPUT_PORTS_START( sstrngr2 )
PORT_START("DSW")
- PORT_DIPNAME( 0x03, 0x01, "Extra Play" )
+ PORT_DIPNAME( 0x03, 0x01, "Extra Play" ) PORT_DIPLOCATION("SW:1,2")
PORT_DIPSETTING( 0x00, "Never" )
PORT_DIPSETTING( 0x01, "3000" )
PORT_DIPSETTING( 0x02, "4000" )
PORT_DIPSETTING( 0x03, "5000" )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x04, "4" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, "1000" )
PORT_DIPSETTING( 0x00, "2000" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR(Coinage) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW:5")
PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
@@ -243,23 +632,23 @@ static INPUT_PORTS_START( sstrngr2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
PORT_START("INPUTS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_SERVICE( 0x08, IP_ACTIVE_HIGH )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_SERVICE( 0x08, IP_ACTIVE_HIGH ) // This is an edge connector pin for testing ROM/RAM and I/O ports
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("EDGE:1") // This is an edge connector pin that is
+ PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) // brought out to two solder pads on the
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) // Joiner PCB
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
PORT_START("EXT") /* External switches */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_DIPNAME( 0x02, 0x00, "Player's Bullet Speed (Cheat)" )
+ PORT_DIPNAME( 0x02, 0x00, "Player's Bullet Speed" ) PORT_DIPLOCATION("EDGE:2") // This is an edge connector pin listed in the manual as 'Fast Shoot'
PORT_DIPSETTING( 0x00, "Slow" )
PORT_DIPSETTING( 0x02, "Fast" )
- PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -267,7 +656,7 @@ void sstrangr_state::sstrngr2(machine_config &config)
{
sstrangr(config);
- /* video hardware */
+ // video hardware
subdevice<screen_device>("screen")->set_screen_update(FUNC(sstrangr_state::screen_update_sstrngr2));
PALETTE(config, m_palette, palette_device::RBG_3BIT);
@@ -292,10 +681,10 @@ ROM_START( sstrangr2 )
ROM_LOAD( "4764.09", 0x0000, 0x2000, CRC(d88f86cc) SHA1(9f284ee50caf3c64bd04a79a798de620348881bc) )
ROM_LOAD( "2708.10", 0x6000, 0x0400, CRC(eba304c1) SHA1(3fa6fbb29fa46c146283f69a712bfc51cbb2a43c) )
- ROM_REGION( 0x0400, "proms", 0 ) /* color maps player 1/player 2 */
+ ROM_REGION( 0x0400, "proms", 0 ) // color maps player 1/player 2
ROM_LOAD( "2708.15", 0x0000, 0x0400, CRC(c176a89d) SHA1(955dd540dc3787091c3f34ae122a13e6b7523414) )
ROM_END
-GAMEL( 1978, sstrangr, 0, sstrangr, sstrangr, sstrangr_state, empty_init, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE, layout_sstrangr )
-GAME( 1979, sstrangr2, sstrangr, sstrngr2, sstrngr2, sstrangr_state, empty_init, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger 2", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAMEL( 1978, sstrangr, 0, sstrangr, sstrangr, sstrangr_state, empty_init, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_sstrangr )
+GAME( 1979, sstrangr2, sstrangr, sstrngr2, sstrngr2, sstrangr_state, empty_init, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp
index 5f2a7e4de38..970b12979a1 100644
--- a/src/mame/drivers/ssv.cpp
+++ b/src/mame/drivers/ssv.cpp
@@ -260,7 +260,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ssv_state::interrupt)
}
}
-WRITE_LINE_MEMBER(ssv_state::gdfs_adc_int_w)
+WRITE_LINE_MEMBER(gdfs_state::adc_int_w)
{
if (state)
{
@@ -452,12 +452,12 @@ void ssv_state::drifto94_map(address_map &map)
Mobil Suit Gundam Final Shooting
***************************************************************************/
-READ16_MEMBER(ssv_state::gdfs_eeprom_r)
+READ16_MEMBER(gdfs_state::eeprom_r)
{
return m_adc->data_r() | (m_eeprom->do_read() << 8);
}
-WRITE16_MEMBER(ssv_state::gdfs_eeprom_w)
+WRITE16_MEMBER(gdfs_state::eeprom_w)
{
if (data & ~0x7b00)
logerror("%s - Unknown EEPROM bit written %04X\n",machine().describe_context(),data);
@@ -482,18 +482,18 @@ WRITE16_MEMBER(ssv_state::gdfs_eeprom_w)
}
-void ssv_state::gdfs_map(address_map &map)
+void gdfs_state::gdfs_map(address_map &map)
{
ssv_map(map, 0xc00000);
- map(0x400000, 0x41ffff).ram().w(FUNC(ssv_state::gdfs_tmapram_w)).share("gdfs_tmapram");
+ map(0x400000, 0x41ffff).ram().w(FUNC(gdfs_state::tmapram_w)).share("gdfs_tmapram");
map(0x420000, 0x43ffff).ram();
map(0x440000, 0x44003f).ram().share("gdfs_tmapscroll");
- map(0x500000, 0x500001).w(FUNC(ssv_state::gdfs_eeprom_w));
- map(0x540000, 0x540001).r(FUNC(ssv_state::gdfs_eeprom_r));
+ map(0x500000, 0x500001).w(FUNC(gdfs_state::eeprom_w));
+ map(0x540000, 0x540001).r(FUNC(gdfs_state::eeprom_r));
map(0x600000, 0x600fff).ram();
- map(0x800000, 0x87ffff).rw(m_gdfs_st0020, FUNC(st0020_device::sprram_r), FUNC(st0020_device::sprram_w));
- map(0x8c0000, 0x8c00ff).rw(m_gdfs_st0020, FUNC(st0020_device::regs_r), FUNC(st0020_device::regs_w));
- map(0x900000, 0x9fffff).rw(m_gdfs_st0020, FUNC(st0020_device::gfxram_r), FUNC(st0020_device::gfxram_w));
+ map(0x800000, 0x87ffff).rw(m_st0020, FUNC(st0020_device::sprram_r), FUNC(st0020_device::sprram_w));
+ map(0x8c0000, 0x8c00ff).rw(m_st0020, FUNC(st0020_device::regs_r), FUNC(st0020_device::regs_w));
+ map(0x900000, 0x9fffff).rw(m_st0020, FUNC(st0020_device::gfxram_r), FUNC(st0020_device::gfxram_w));
}
@@ -736,49 +736,46 @@ void ssv_state::survarts_map(address_map &map)
***************************************************************************/
-READ16_MEMBER(ssv_state::sxyreact_ballswitch_r)
+READ16_MEMBER(sxyreact_state::ballswitch_r)
{
- return m_io_service.read_safe(0);
+ return m_io_service->read();
}
-READ16_MEMBER(ssv_state::sxyreact_dial_r)
+uint8_t sxyreact_state::dial_r()
{
- return ((m_sxyreact_serial >> 1) & 0x80);
+ return m_sxyreact_adc->eoc_so_r() ? 0x80 : 0;
}
-
-WRITE16_MEMBER(ssv_state::sxyreact_dial_w)
+void sxyreact_state::dial_w(uint8_t data)
{
- if (ACCESSING_BITS_0_7)
- {
- if (data & 0x20)
- m_sxyreact_serial = m_io_paddle.read_safe(0) & 0xff;
-
- if ( (m_sxyreact_dial & 0x40) && !(data & 0x40) ) // $40 -> $00
- m_sxyreact_serial <<= 1; // shift 1 bit
-
- m_sxyreact_dial = data;
- }
+ m_sxyreact_adc->cs_w(BIT(data, 5));
+ m_sxyreact_adc->sck_w(BIT(data, 6));
}
-WRITE16_MEMBER(ssv_state::sxyreact_motor_w)
+WRITE16_MEMBER(sxyreact_state::motor_w)
{
// popmessage("%04X",data); // 8 = motor on; 0 = motor off
}
-void ssv_state::sxyreact_map(address_map &map)
+void ssv_state::cairblad_map(address_map &map)
{
ssv_map(map, 0xe00000);
// map(0x020000, 0x03ffff).rw(FUNC(ssv_state::mainram_r), FUNC(ssv_state::mainram_w)); // sxyreac2 reads / writes here, why?
map(0x210000, 0x210001).r("watchdog", FUNC(watchdog_timer_device::reset16_r));
// map(0x210002, 0x210003).nopw(); // ? 1 at the start
map(0x21000e, 0x21000f).w(FUNC(ssv_state::lockout_inv_w)); // Inverted lockout lines
- map(0x500002, 0x500003).r(FUNC(ssv_state::sxyreact_ballswitch_r)); // ?
- map(0x500004, 0x500005).rw(FUNC(ssv_state::sxyreact_dial_r), FUNC(ssv_state::sxyreact_motor_w)); // Dial Value (serial)
- map(0x520000, 0x520001).w(FUNC(ssv_state::sxyreact_dial_w)); // Dial Value (advance 1 bit)
map(0x580000, 0x58ffff).ram().share("nvram"); // NVRAM
}
+void sxyreact_state::sxyreact_map(address_map &map)
+{
+ cairblad_map(map);
+ map(0x500002, 0x500003).r(FUNC(sxyreact_state::ballswitch_r)); // ?
+ map(0x500004, 0x500004).r(FUNC(sxyreact_state::dial_r)); // Dial Value (serial)
+ map(0x500004, 0x500005).w(FUNC(sxyreact_state::motor_w));
+ map(0x520000, 0x520000).w(FUNC(sxyreact_state::dial_w)); // Dial Value (advance 1 bit)
+}
+
/***************************************************************************
Twin Eagle II
@@ -870,12 +867,12 @@ void ssv_state::jsk_v810_mem(address_map &map)
Eagle Shot Golf
***************************************************************************/
-WRITE8_MEMBER(ssv_state::eaglshot_gfxrom_bank_w)
+void eaglshot_state::gfxrom_bank_w(uint8_t data)
{
membank("gfxrom")->set_entry(data < 6 ? data : 6);
}
-WRITE8_MEMBER(ssv_state::eaglshot_trackball_w)
+void eaglshot_state::trackball_w(uint8_t data)
{
// All these get toggled during trackball reads; the precise arrangement is uncertain
m_upd4701->cs_w(!BIT(data, 6));
@@ -887,28 +884,28 @@ WRITE8_MEMBER(ssv_state::eaglshot_trackball_w)
-READ16_MEMBER(ssv_state::eaglshot_gfxram_r)
+uint16_t eaglshot_state::gfxram_r(offs_t offset, uint16_t mem_mask)
{
- return m_eaglshot_gfxram[offset + (m_scroll[0x76/2] & 0xf) * 0x40000/2];
+ return m_gfxram[offset + (m_scroll[0x76/2] & 0xf) * 0x40000/2];
}
-WRITE16_MEMBER(ssv_state::eaglshot_gfxram_w)
+void eaglshot_state::gfxram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
offset += (m_scroll[0x76/2] & 0xf) * 0x40000/2;
- COMBINE_DATA(&m_eaglshot_gfxram[offset]);
+ COMBINE_DATA(&m_gfxram[offset]);
m_gfxdecode->gfx(0)->mark_dirty(offset / (16*8/2));
}
-void ssv_state::eaglshot_map(address_map &map)
+void eaglshot_state::eaglshot_map(address_map &map)
{
ssv_map(map, 0xf00000);
- map(0x180000, 0x1bffff).rw(FUNC(ssv_state::eaglshot_gfxram_r), FUNC(ssv_state::eaglshot_gfxram_w));
+ map(0x180000, 0x1bffff).rw(FUNC(eaglshot_state::gfxram_r), FUNC(eaglshot_state::gfxram_w));
map(0x210000, 0x210001).nopr(); // .r("watchdog", FUNC(watchdog_timer_device::reset16_r)); // Watchdog
// map(0x210002, 0x210003).nopw(); // ? 0,4 at the start
- map(0x21000e, 0x21000f).w(FUNC(ssv_state::lockout_inv_w)); // Inverted lockout lines
- map(0x800000, 0x800000).w(FUNC(ssv_state::eaglshot_gfxrom_bank_w));
- map(0x900000, 0x900000).w(FUNC(ssv_state::eaglshot_trackball_w));
+ map(0x21000e, 0x21000f).w(FUNC(eaglshot_state::lockout_inv_w)); // Inverted lockout lines
+ map(0x800000, 0x800000).w(FUNC(eaglshot_state::gfxrom_bank_w));
+ map(0x900000, 0x900000).w(FUNC(eaglshot_state::trackball_w));
map(0xa00000, 0xbfffff).bankr("gfxrom");
map(0xc00000, 0xc007ff).ram().share("nvram"); // NVRAM
map(0xd00000, 0xd00000).r(m_upd4701, FUNC(upd4701_device::d_r));
@@ -2539,14 +2536,12 @@ void ssv_state::init_ssv_tilescram()
// srmp4
// ((uint16_t *)memregion("maincpu")->base())[0x2b38/2] = 0x037a; /* patch to see gal test mode */
-void ssv_state::init_sexy()
+void sxyreact_state::init_sexy()
{
init_ssv_tilescram();
- save_item(NAME(m_sxyreact_serial));
- save_item(NAME(m_sxyreact_dial));
}
-void ssv_state::init_eaglshot()
+void eaglshot_state::init_eaglshot()
{
init_ssv_tilescram();
membank("gfxrom")->configure_entries(0, 6+1, memregion("gfxdata")->base(), 0x200000);
@@ -2632,12 +2627,12 @@ void ssv_state::drifto94(machine_config &config)
m_screen->set_visarea(0, (0xcd-0x25)*2-1, 0, (0x101-0x13)-1);
}
-void ssv_state::gdfs(machine_config &config)
+void gdfs_state::gdfs(machine_config &config)
{
ssv(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::gdfs_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &gdfs_state::gdfs_map);
EEPROM_93C46_16BIT(config, m_eeprom);
@@ -2646,18 +2641,16 @@ void ssv_state::gdfs(machine_config &config)
m_adc->in_callback<1>().set_ioport("GUNY1");
m_adc->in_callback<2>().set_ioport("GUNX2");
m_adc->in_callback<3>().set_ioport("GUNY2");
- m_adc->eoc_callback().set(FUNC(ssv_state::gdfs_adc_int_w));
+ m_adc->eoc_callback().set(FUNC(gdfs_state::adc_int_w));
/* video hardware */
m_screen->set_visarea(0, (0xd5-0x2c)*2-1, 0, (0x102-0x12)-1);
- m_screen->set_screen_update(FUNC(ssv_state::screen_update_gdfs));
+ m_screen->set_screen_update(FUNC(gdfs_state::screen_update));
- ST0020_SPRITES(config, m_gdfs_st0020, 0);
- m_gdfs_st0020->set_palette(m_palette);
+ ST0020_SPRITES(config, m_st0020, 0);
+ m_st0020->set_palette(m_palette);
m_gfxdecode->set_info(gfx_gdfs);
-
- MCFG_VIDEO_START_OVERRIDE(ssv_state,gdfs)
}
void ssv_state::hypreact(machine_config &config)
@@ -2827,12 +2820,12 @@ void ssv_state::dynagear(machine_config &config)
m_screen->set_visarea(0, (0xd4-0x2c)*2-1, 0, (0x102 - 0x12)-1);
}
-void ssv_state::eaglshot(machine_config &config)
+void eaglshot_state::eaglshot(machine_config &config)
{
ssv(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::eaglshot_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &eaglshot_state::eaglshot_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -2844,39 +2837,45 @@ void ssv_state::eaglshot(machine_config &config)
/* video hardware */
m_screen->set_visarea(0, (0xca - 0x2a)*2-1, 0, (0xf6 - 0x16)-1);
- m_screen->set_screen_update(FUNC(ssv_state::screen_update_eaglshot));
+ m_screen->set_screen_update(FUNC(eaglshot_state::screen_update));
m_gfxdecode->set_info(gfx_eaglshot);
-
- MCFG_VIDEO_START_OVERRIDE(ssv_state,eaglshot)
}
-void ssv_state::sxyreact(machine_config &config)
+void sxyreact_state::sxyreact(machine_config &config)
{
ssv(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::sxyreact_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sxyreact_state::sxyreact_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog");
+ UPD7001(config, m_sxyreact_adc, 1'500'000); // FIXME: runs too fast because CPU doesn't wait long enough
+ m_sxyreact_adc->a0_callback().set_ioport("PADDLE");
+ m_sxyreact_adc->dl_w(1);
+ m_sxyreact_adc->si_w(0);
+
/* video hardware */
m_screen->set_visarea(0, (0xcb - 0x22)*2-1, 0, (0xfe - 0x0e)-1);
}
-void ssv_state::sxyreac2(machine_config &config)
+void sxyreact_state::sxyreac2(machine_config &config)
{
ssv(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::sxyreact_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sxyreact_state::sxyreact_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog");
+ UPD7001(config, m_sxyreact_adc, 1'500'000); // FIXME: runs too fast because CPU doesn't wait long enough
+ m_sxyreact_adc->a0_callback().set_ioport("PADDLE");
+
/* video hardware */
m_screen->set_visarea(0, (0xcb - 0x23)*2-1, 0, (0xfe - 0x0e)-1);
}
@@ -2886,7 +2885,7 @@ void ssv_state::cairblad(machine_config &config)
ssv(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::sxyreact_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::cairblad_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -4850,14 +4849,14 @@ GAME( 1993, survartsj, survarts, survarts, survarts, ssv_state, init_ssv,
GAME( 1994, drifto94, 0, drifto94, drifto94, ssv_state, init_ssv, ROT0, "Visco", "Drift Out '94 - The Hard Order (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1994, eaglshot, 0, eaglshot, eaglshot, ssv_state, init_eaglshot, ROT0, "Sammy", "Eagle Shot Golf (US)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1994, eaglshotj, eaglshot, eaglshot, eaglshot, ssv_state, init_eaglshot, ROT0, "Sammy", "Eagle Shot Golf (Japan, bootleg?)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // from a bootleg ROM board with no proper Seta / Sammy markings, possibly original ROM tho?
+GAME( 1994, eaglshot, 0, eaglshot, eaglshot, eaglshot_state, init_eaglshot, ROT0, "Sammy", "Eagle Shot Golf (US)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, eaglshotj, eaglshot, eaglshot, eaglshot, eaglshot_state, init_eaglshot, ROT0, "Sammy", "Eagle Shot Golf (Japan, bootleg?)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // from a bootleg ROM board with no proper Seta / Sammy markings, possibly original ROM tho?
GAME( 1995, hypreact, 0, hypreact, hypreact, ssv_state, init_ssv, ROT0, "Sammy", "Mahjong Hyper Reaction (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1994, twineag2, 0, twineag2, twineag2, ssv_state, init_ssv_irq1, ROT270, "Seta", "Twin Eagle II - The Rescue Mission", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1995, gdfs, 0, gdfs, gdfs, ssv_state, init_ssv, ROT0, "Banpresto", "Mobile Suit Gundam Final Shooting (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // title screen spells the title "Mobil" but standardized spelling is "Mobile" it also lists the company name as "Banprest" instead of "Banpresto"
+GAME( 1995, gdfs, 0, gdfs, gdfs, gdfs_state, init_ssv, ROT0, "Banpresto", "Mobile Suit Gundam Final Shooting (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // title screen spells the title "Mobil" but standardized spelling is "Mobile" it also lists the company name as "Banprest" instead of "Banpresto"
// Ultra X Weapon: "developed by Seta" in ending screen
GAME( 1995, ultrax, 0, ultrax, ultrax, ssv_state, init_ssv_irq1, ROT270, "Banpresto / Tsuburaya Productions / Seta", "Ultra X Weapons / Ultra Keibitai", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 95-01-30 13:27:15 on startup
@@ -4882,9 +4881,9 @@ GAME( 1997, srmp7, 0, srmp7, srmp7, ssv_state, init_ssv,
GAME( 1998, ryorioh, 0, ryorioh, ryorioh, ssv_state, init_ssv, ROT0, "Visco", "Gourmet Battle Quiz Ryohrioh CooKing (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1998, sxyreact, 0, sxyreact, sxyreact, ssv_state, init_sexy, ROT0, "Sammy", "Pachinko Sexy Reaction (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1998, sxyreact, 0, sxyreact, sxyreact, sxyreact_state, init_sexy, ROT0, "Sammy", "Pachinko Sexy Reaction (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1999, sxyreac2, 0, sxyreac2, sxyreact, ssv_state, init_sexy, ROT0, "Sammy", "Pachinko Sexy Reaction 2 (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1999, sxyreac2, 0, sxyreac2, sxyreact, sxyreact_state, init_sexy, ROT0, "Sammy", "Pachinko Sexy Reaction 2 (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1999, cairblad, 0, cairblad, cairblad, ssv_state, init_ssv_tilescram, ROT270, "Sammy", "Change Air Blade (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/starrider.cpp b/src/mame/drivers/starrider.cpp
index a4e1f7ea68c..5b37d33585e 100644
--- a/src/mame/drivers/starrider.cpp
+++ b/src/mame/drivers/starrider.cpp
@@ -397,7 +397,7 @@ void sr_state::starrider(machine_config &config)
m_main_pia1->readpa_handler().set_ioport("IN2");
// CA1 is the /END SCREEN signal
// CA2 is the 4MS signal
- m_main_pia1->writepb_handler().set(m_sound_pia1, FUNC(pia6821_device::write_portb));
+ m_main_pia1->writepb_handler().set(m_sound_pia1, FUNC(pia6821_device::portb_w));
m_main_pia1->cb2_handler().set(m_sound_pia1, FUNC(pia6821_device::ca1_w));
m_main_pia1->irqa_handler().set("main.irq", FUNC(input_merger_device::in_w<0>));
m_main_pia1->irqb_handler().set("main.irq", FUNC(input_merger_device::in_w<1>));
@@ -755,7 +755,7 @@ void sr_state::sound_pia2_pa(u8 data)
m_sound_pia2_pa_out = data;
if (diff & ~m_sound_pia2_pb_in & 0x77U)
{
- m_sound_pia2->write_portb(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
+ m_sound_pia2->portb_w(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
m_sound_pia2->ca1_w((0x07U == ((m_sound_pia2_pb_in | m_sound_pia2_pa_out) & 0x07U)) ? 1 : 0);
m_sound_pia2->ca2_w((0x70U == ((m_sound_pia2_pb_in | m_sound_pia2_pa_out) & 0x70U)) ? 1 : 0);
}
@@ -767,7 +767,7 @@ DECLARE_WRITE_LINE_MEMBER(sr_state::sound_fifo0_ir)
m_sound_pia2_pb_in |= 0x08U;
else
m_sound_pia2_pb_in &= 0xf7U;
- m_sound_pia2->write_portb(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
+ m_sound_pia2->portb_w(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
}
DECLARE_WRITE_LINE_MEMBER(sr_state::sound_fifo1_ir)
@@ -776,7 +776,7 @@ DECLARE_WRITE_LINE_MEMBER(sr_state::sound_fifo1_ir)
m_sound_pia2_pb_in |= 0x80U;
else
m_sound_pia2_pb_in &= 0x7fU;
- m_sound_pia2->write_portb(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
+ m_sound_pia2->portb_w(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
}
template <unsigned N> WRITE_LINE_MEMBER(sr_state::sound_fifo_or)
@@ -787,7 +787,7 @@ template <unsigned N> WRITE_LINE_MEMBER(sr_state::sound_fifo_or)
m_sound_pia2_pb_in &= ~(u8(1) << (N + 4));
if (!BIT(m_sound_pia2_pa_out, N + 4))
{
- m_sound_pia2->write_portb(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
+ m_sound_pia2->portb_w(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
m_sound_pia2->ca2_w((0x70U == ((m_sound_pia2_pb_in | m_sound_pia2_pa_out) & 0x70U)) ? 1 : 0);
}
}
@@ -800,7 +800,7 @@ template <unsigned N> WRITE_LINE_MEMBER(sr_state::sound_fifo_flag)
m_sound_pia2_pb_in &= ~(u8(1) << N);
if (!BIT(m_sound_pia2_pa_out, N))
{
- m_sound_pia2->write_portb(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
+ m_sound_pia2->portb_w(m_sound_pia2_pb_in | (m_sound_pia2_pa_out & 0x77U));
m_sound_pia2->ca1_w((0x07U == ((m_sound_pia2_pb_in | m_sound_pia2_pa_out) & 0x07U)) ? 1 : 0);
}
}
diff --git a/src/mame/drivers/subhuntr.cpp b/src/mame/drivers/subhuntr.cpp
index b96c8e257dd..efa2e43e19c 100644
--- a/src/mame/drivers/subhuntr.cpp
+++ b/src/mame/drivers/subhuntr.cpp
@@ -124,7 +124,7 @@ void subhuntr_state::machine_reset()
INTERRUPT_GEN_MEMBER(subhuntr_state::subhuntr_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
static const gfx_layout tiles8x8_layout =
@@ -152,6 +152,7 @@ void subhuntr_state::subhuntr(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &subhuntr_state::subhuntr_data_map);
m_maincpu->set_vblank_int("screen", FUNC(subhuntr_state::subhuntr_interrupt));
m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank));
+ m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; });
//s2636_device &s2636(S2636(config, "s2636", 0));
//s2636.set_offsets(3, -21);
diff --git a/src/mame/drivers/supbtime.cpp b/src/mame/drivers/supbtime.cpp
index eae426e01fc..a6a6eba7c64 100644
--- a/src/mame/drivers/supbtime.cpp
+++ b/src/mame/drivers/supbtime.cpp
@@ -347,8 +347,6 @@ void supbtime_state::supbtime(machine_config &config)
DECO16IC(config, m_deco_tilegen, 0);
m_deco_tilegen->set_pf1_size(DECO_64x32);
m_deco_tilegen->set_pf2_size(DECO_64x32);
- m_deco_tilegen->set_pf1_trans_mask(0x0f);
- m_deco_tilegen->set_pf2_trans_mask(0x0f);
m_deco_tilegen->set_pf1_col_bank(0x00);
m_deco_tilegen->set_pf2_col_bank(0x10);
m_deco_tilegen->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/superqix.cpp b/src/mame/drivers/superqix.cpp
index c295f17cbaa..7333bffe7f7 100644
--- a/src/mame/drivers/superqix.cpp
+++ b/src/mame/drivers/superqix.cpp
@@ -355,7 +355,7 @@ TIMER_CALLBACK_MEMBER(superqix_state::bootleg_mcu_port1_w_cb)
//already after a synchronize, and doing another one would be redundant
}
- mcu_port2_w(m_mcu->space(AS_PROGRAM), 0, m_bl_fake_port2, 0xff); // finally write to port 2, which will do another synchronize
+ mcu_port2_w(m_bl_fake_port2); // finally write to port 2, which will do another synchronize
}
WRITE8_MEMBER(superqix_state::bootleg_mcu_port1_w)
@@ -395,7 +395,7 @@ WRITE8_MEMBER(superqix_state::bootleg_mcu_port3_w)
m_bl_port3_out = data;
}
-WRITE8_MEMBER(superqix_state::mcu_port2_w)
+void superqix_state::mcu_port2_w(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(superqix_state::mcu_port2_w_cb), this), data);
}
@@ -955,7 +955,7 @@ MACHINE_RESET_MEMBER(superqix_state, superqix)
// the act of clearing this latch asserts the z80 reset, and the mcu must clear it itself by writing
// to the p2 latch with bit 5 set.
m_port2_raw = 0x01; // force the following function into latching a zero write by having bit 0 falling edge
- mcu_port2_w(m_mcu->space(AS_PROGRAM), 0, 0x00, 0xff);
+ mcu_port2_w(0x00);
m_mcu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
}
diff --git a/src/mame/drivers/taito_b.cpp b/src/mame/drivers/taito_b.cpp
index 36954a57171..d840b50a8b6 100644
--- a/src/mame/drivers/taito_b.cpp
+++ b/src/mame/drivers/taito_b.cpp
@@ -559,8 +559,7 @@ void taitob_c_state::realpunc_map(address_map &map)
map(0x18c000, 0x18c001).w(FUNC(taitob_c_state::realpunc_output_w));
map(0x200000, 0x27ffff).m(m_tc0180vcu, FUNC(tc0180vcu_device::tc0180vcu_memrw));
map(0x280000, 0x281fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
- map(0x300000, 0x300001).rw("hd63484", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x300002, 0x300003).rw("hd63484", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x300000, 0x300003).rw("hd63484", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
// map(0x320000, 0x320001).nop(); // ?
map(0x320002, 0x320003).nopr();
map(0x320002, 0x320002).w("tc0140syt", FUNC(tc0140syt_device::master_comm_w));
diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp
index 0d971a33a12..2a525e32f2c 100644
--- a/src/mame/drivers/taito_f2.cpp
+++ b/src/mame/drivers/taito_f2.cpp
@@ -3539,11 +3539,11 @@ void taitof2_state::cameltrya(machine_config &config)
void taitof2_state::driveout(machine_config &config)
{
/* basic machine hardware */
- M68000(config, m_maincpu, 24000000/2); /* 12 MHz */
+ M68000(config, m_maincpu, 14_MHz_XTAL); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &taitof2_state::driveout_map);
m_maincpu->set_vblank_int("screen", FUNC(taitof2_state::interrupt));
- Z80(config, m_audiocpu, 24000000/6); /* 4 MHz */
+ Z80(config, m_audiocpu, 8_MHz_XTAL / 2); // verified on PCB
m_audiocpu->set_addrmap(AS_PROGRAM, &taitof2_state::driveout_sound_map);
TC0510NIO(config, m_tc0510nio, 0);
@@ -3583,7 +3583,7 @@ void taitof2_state::driveout(machine_config &config)
SPEAKER(config, "lspeaker").front_left(); /* does it ? */
SPEAKER(config, "rspeaker").front_right();
- OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified
+ OKIM6295(config, m_oki, 8_MHz_XTAL / 8, okim6295_device::PIN7_LOW); // verified on PCB
m_oki->set_addrmap(0, &taitof2_state::driveout_oki_map);
m_oki->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
m_oki->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
@@ -5263,25 +5263,25 @@ ROM_END
ROM_START( driveout )
ROM_REGION( 0x100000, "maincpu", 0 ) /* 1024k for 68000 code */
- ROM_LOAD16_BYTE( "driveout.003", 0x00000, 0x80000, CRC(dc431e4e) SHA1(6002cb7a2bd05e28a2413942998a5c7e11fc1432) )
- ROM_LOAD16_BYTE( "driveout.002", 0x00001, 0x80000, CRC(6f9063f4) SHA1(7ea55126a2f6391322740432d835cd06450909ae) )
+ ROM_LOAD16_BYTE( "4.u3", 0x00000, 0x80000, CRC(dc431e4e) SHA1(6002cb7a2bd05e28a2413942998a5c7e11fc1432) )
+ ROM_LOAD16_BYTE( "5.u2", 0x00001, 0x80000, CRC(6f9063f4) SHA1(7ea55126a2f6391322740432d835cd06450909ae) )
ROM_REGION( 0x080000, "tc0100scn_1", ROMREGION_ERASEFF )
/* empty */
ROM_REGION( 0x080000, "sprites", 0 ) /* OBJ */
- ROM_LOAD16_BYTE( "driveout.084", 0x00000, 0x40000, CRC(530ac420) SHA1(d66006958580205d0962871ba7d0b40a067bb9af) )
- ROM_LOAD16_BYTE( "driveout.081", 0x00001, 0x40000, CRC(0e9a3e9e) SHA1(7bb21e6fc930a5e1913bffb626958d0ee22d5883) )
+ ROM_LOAD16_BYTE( "6.u84", 0x00000, 0x40000, CRC(530ac420) SHA1(d66006958580205d0962871ba7d0b40a067bb9af) )
+ ROM_LOAD16_BYTE( "7.u81", 0x00001, 0x40000, CRC(0e9a3e9e) SHA1(7bb21e6fc930a5e1913bffb626958d0ee22d5883) )
ROM_REGION( 0x080000, "tc0430grw", 0 ) /* pivot gfx */
- ROM_LOAD( "do_piv.rom", 0x00000, 0x80000, CRC(c4f012f7) SHA1(4ad6a88f6a7f89b2b4c62c2b376d4e7b43c3d442) )
+ ROM_LOAD( "8.u37", 0x00000, 0x80000, CRC(c4f012f7) SHA1(4ad6a88f6a7f89b2b4c62c2b376d4e7b43c3d442) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "driveout.020", 0x0000, 0x8000, CRC(99aaeb2e) SHA1(c7eb174f2ddcd8fd2b73b5251f434a20a9627b49) )
+ ROM_LOAD( "3.u20", 0x0000, 0x8000, CRC(99aaeb2e) SHA1(c7eb174f2ddcd8fd2b73b5251f434a20a9627b49) ) // found on another PCB double sized with the first half 0xff filled
ROM_REGION( 0xa0000, "oki", 0 ) /* ADPCM samples */
- ROM_LOAD( "driveout.028", 0x00000, 0x80000, CRC(cbde0b66) SHA1(b264aa525ff40c7813182031825cd052db887000) ) /* banked */
- ROM_LOAD( "driveout.029", 0x80000, 0x20000, CRC(0aba2026) SHA1(f592e3b294d44f499fdca4cc31646e55d8c3dfbf) ) /* sandwiched */
+ ROM_LOAD( "1.u28", 0x00000, 0x80000, CRC(cbde0b66) SHA1(b264aa525ff40c7813182031825cd052db887000) ) /* banked */
+ ROM_LOAD( "2.u29", 0x80000, 0x20000, CRC(0aba2026) SHA1(f592e3b294d44f499fdca4cc31646e55d8c3dfbf) ) /* sandwiched */
ROM_END
diff --git a/src/mame/drivers/taito_l.cpp b/src/mame/drivers/taito_l.cpp
index a1a78cf1f21..77c6b120cd9 100644
--- a/src/mame/drivers/taito_l.cpp
+++ b/src/mame/drivers/taito_l.cpp
@@ -585,8 +585,8 @@ void horshoes_state::horshoes_map(address_map &map)
map(0x8000, 0x9fff).ram();
map(0xa000, 0xa003).r(FUNC(horshoes_state::extport_select_and_ym2203_r)).w(m_ymsnd, FUNC(ym2203_device::write));
map(0xa800, 0xa800).select(0x000c).lr8(NAME(
- [this](address_space &space, offs_t offset, u8 mem_mask) {
- return m_upd4701->read_xy(space, offset >> 2, mem_mask);
+ [this](offs_t offset) {
+ return m_upd4701->read_xy(offset >> 2);
}));
map(0xa802, 0xa802).r(m_upd4701, FUNC(upd4701_device::reset_x_r));
map(0xa803, 0xa803).r(m_upd4701, FUNC(upd4701_device::reset_y_r));
diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp
index 448f6d48ee7..96c42eb4661 100644
--- a/src/mame/drivers/tandy1t.cpp
+++ b/src/mame/drivers/tandy1t.cpp
@@ -339,7 +339,7 @@ READ8_MEMBER(tandy1000_state::tandy1000_pio_r)
case 0:
if (m_tandy_ppi_ack)
{
- m_tandy_ppi_porta = m_keyboard->read(space, 0);
+ m_tandy_ppi_porta = m_keyboard->read();
m_tandy_ppi_ack = 0;
}
data = m_tandy_ppi_porta;
@@ -359,7 +359,7 @@ READ8_MEMBER(tandy1000_state::tandy1000_pio_r)
WRITE8_MEMBER( tandy1000_state::nmi_vram_bank_w )
{
- m_mb->nmi_enable_w(space, 0, data & 0x80);
+ m_mb->nmi_enable_w(data & 0x80);
vram_bank_w(space, 0, data & 0x1e);
m_video->disable_w((data & 1) ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp
index e37a91829ae..bf2ec76d79b 100644
--- a/src/mame/drivers/tandy2k.cpp
+++ b/src/mame/drivers/tandy2k.cpp
@@ -213,7 +213,7 @@ READ8_MEMBER( tandy2k_state::kbint_clr_r )
m_kb->busy_w(1);
m_pic1->ir0_w(CLEAR_LINE);
- return m_pc_keyboard->read(space, 0);
+ return m_pc_keyboard->read();
}
return 0xff;
diff --git a/src/mame/drivers/tg100.cpp b/src/mame/drivers/tg100.cpp
index 031c877e635..08eb1811998 100644
--- a/src/mame/drivers/tg100.cpp
+++ b/src/mame/drivers/tg100.cpp
@@ -28,7 +28,7 @@
#include "emu.h"
-#include "cpu/h8/h83002.h"
+#include "cpu/h8500/h8520.h"
#include "sound/multipcm.h"
#include "screen.h"
@@ -46,9 +46,8 @@ public:
void tg100(machine_config &config);
private:
- required_device<cpu_device> m_maincpu;
+ required_device<h8520_device> m_maincpu;
required_device<multipcm_device> m_ymw258;
- void tg100_io_map(address_map &map);
void tg100_map(address_map &map);
void ymw258_map(address_map &map);
};
@@ -60,11 +59,6 @@ void tg100_state::tg100_map(address_map &map)
map(0x00080000, 0x0009ffff).rom().region("prgrom", 0x00000);
}
-void tg100_state::tg100_io_map(address_map &map)
-{
-// map.global_mask(0xff);
-}
-
static INPUT_PORTS_START( tg100 )
INPUT_PORTS_END
@@ -76,9 +70,8 @@ void tg100_state::ymw258_map(address_map &map)
void tg100_state::tg100(machine_config &config)
{
/* basic machine hardware */
- H83002(config, m_maincpu, XTAL(20'000'000)); /* TODO: correct CPU type (H8/520) */
+ HD6435208(config, m_maincpu, XTAL(20'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &tg100_state::tg100_map);
- m_maincpu->set_addrmap(AS_IO, &tg100_state::tg100_io_map);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
@@ -90,9 +83,12 @@ void tg100_state::tg100(machine_config &config)
}
ROM_START( tg100 )
+ ROM_REGION(0x20000, "prgrom", 0)
+ ROM_LOAD( "xk731c0.ic4", 0x00000, 0x20000, CRC(8fb6139c) SHA1(483103a2ffc63a90a2086c597baa2b2745c3a1c2) )
- ROM_REGION16_BE(0x20000, "prgrom", 0) // H8/520 memory bus is 8 bit actually
- ROM_LOAD16_WORD_SWAP( "xk731c0.ic4", 0x00000, 0x20000, CRC(8fb6139c) SHA1(483103a2ffc63a90a2086c597baa2b2745c3a1c2) )
+ ROM_REGION(0x4000, "maincpu", 0)
+ ROM_LOAD( "hd6435208a00p.bin", 0x0000, 0x4000, NO_DUMP )
+ ROM_COPY( "prgrom", 0x0000, 0x0000, 0x4000 )
ROM_REGION(0x200000, "ymw258", 0)
ROM_LOAD( "xk992a0.ic6", 0x000000, 0x200000, CRC(01dc6954) SHA1(32ec77a46f4d005538c735f56ad48fa7243c63be) )
diff --git a/src/mame/drivers/toratora.cpp b/src/mame/drivers/toratora.cpp
index b53ba43f42c..8def7118f0d 100644
--- a/src/mame/drivers/toratora.cpp
+++ b/src/mame/drivers/toratora.cpp
@@ -201,7 +201,7 @@ INTERRUPT_GEN_MEMBER(toratora_state::toratora_timer)
if (m_timer & 0x100)
popmessage("watchdog!");
- m_pia_u1->write_porta(ioport("INPUT")->read() & 0x0f);
+ m_pia_u1->porta_w(ioport("INPUT")->read() & 0x0f);
m_pia_u1->ca1_w(ioport("INPUT")->read() & 0x10);
m_pia_u1->ca2_w(ioport("INPUT")->read() & 0x20);
}
diff --git a/src/mame/drivers/triviaquiz.cpp b/src/mame/drivers/triviaquiz.cpp
index b4914976e4d..6fe3e3ded96 100644
--- a/src/mame/drivers/triviaquiz.cpp
+++ b/src/mame/drivers/triviaquiz.cpp
@@ -24,14 +24,16 @@
Norway sport 2
TODO:
- * hook up questions ROMs
- * sound
- * nvram?
- * https://www.tvspels-nostalgi.com/pcb_unk.htm shows red background. Faulty PCB adapter or bad emulation?
+ * sound (discrete?)
+ * https://www.tvspels-nostalgi.com/pcb_unk.htm shows red background. Faulty harness or bad emulation?
+ * several unmapped read and writes both in program and in IO map
+ * proper fix for the 'faulty link problem, call attendant' message
*/
#include "emu.h"
#include "cpu/tms9900/tms9995.h"
+#include "machine/bankdev.h"
+#include "machine/nvram.h"
#include "video/tms9928a.h"
#include "screen.h"
@@ -40,40 +42,51 @@ class triviaquiz_state : public driver_device
public:
triviaquiz_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu")
+ m_maincpu(*this, "maincpu"),
+ m_bankdev(*this, "bankdev")
{ }
void triviaquiz(machine_config &config);
protected:
- virtual void machine_start() override;
virtual void machine_reset() override;
private:
required_device<tms9995_device> m_maincpu;
+ required_device<address_map_bank_device> m_bankdev;
void prg_map(address_map &map);
+ void romboard_map(address_map &map);
void io_map(address_map &map);
};
-void triviaquiz_state::prg_map(address_map &map) // TODO: check everything
+void triviaquiz_state::prg_map(address_map &map)
{
map(0x0000, 0x5fff).rom().region("maincpu", 0);
- // map(0x6000, 0x6000).w
- // map(0x6002, 0x6005).r
+ map(0x6000, 0x7fff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
+ map(0x6000, 0x6000).lw8(NAME([this] (uint8_t data) { m_bankdev->set_bank(data); }));
map(0x8000, 0x8000).rw("vdp", FUNC(tms9129_device::vram_read), FUNC(tms9129_device::vram_write));
map(0x8002, 0x8002).rw("vdp", FUNC(tms9129_device::register_read), FUNC(tms9129_device::register_write));
- // map(0x8040, 0x8040).w
map(0x8100, 0x8100).portr("IN0");
map(0x8200, 0x8200).portr("IN1");
map(0x8300, 0x8300).portr("IN2");
map(0x8600, 0x8600).portr("DSW1");
- // map(0x8700, 0x8700).portr("DSW2"); // not populated
- map(0xa000, 0xa7ff).ram();
+ map(0x8700, 0x8700).nopr(); // DSW2, not populated
+ map(0xa000, 0xa7ff).ram().share("nvram");
map(0xe000, 0xe7ff).ram();
}
+void triviaquiz_state::romboard_map(address_map &map)
+{
+ map(0x00000, 0x00000).lr8(NAME([]() -> uint8_t { return 0x3e; })); // 00
+ map(0x20000, 0x27fff).rom().region("questions", 0x00000); // 10-13
+ map(0x40000, 0x47fff).rom().region("questions", 0x08000); // 20-23
+ map(0x60000, 0x67fff).rom().region("questions", 0x10000); // 30-33
+ map(0x80000, 0x87fff).rom().region("questions", 0x18000); // 40-43
+ map(0xa0000, 0xa7fff).rom().region("questions", 0x20000); // 50-53
+}
+
void triviaquiz_state::io_map(address_map &map)
{
}
@@ -92,7 +105,7 @@ static INPUT_PORTS_START( triviaquiz )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gives 'bad switch'
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gives 'bad switch'
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) // these work also as start buttons?
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) // these work also as start buttons
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
@@ -109,7 +122,7 @@ static INPUT_PORTS_START( triviaquiz )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gives 'bad switch'
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gives 'bad switch'
- PORT_START("DSW1") // only read at boot
+ PORT_START("DSW1")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x00, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x00, "SW1:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x00, "SW1:3")
@@ -117,18 +130,13 @@ static INPUT_PORTS_START( triviaquiz )
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x00, "SW1:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x00, "SW1:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x00, "SW1:7")
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
// DSW2 not populated
INPUT_PORTS_END
-
-void triviaquiz_state::machine_start()
-{
-}
-
void triviaquiz_state::machine_reset()
{
//TODO: check these
@@ -142,6 +150,14 @@ void triviaquiz_state::triviaquiz(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &triviaquiz_state::prg_map);
m_maincpu->set_addrmap(AS_IO, &triviaquiz_state::io_map);
+ ADDRESS_MAP_BANK(config, m_bankdev, 0);
+ m_bankdev->set_addrmap(AS_PROGRAM, &triviaquiz_state::romboard_map);
+ m_bankdev->set_data_width(8);
+ m_bankdev->set_addr_width(20);
+ m_bankdev->set_stride(0x2000);
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+
tms9129_device &vdp(TMS9129(config, "vdp", 10.738635_MHz_XTAL)); //TMS9129NL, 10.73864 XTAL on one PCB, 10.70000 on another
vdp.set_screen("screen");
vdp.set_vram_size(0x4000); // verified
@@ -184,5 +200,5 @@ ROM_START( triviaqz2 )
ROM_LOAD( "norway_historie_1.bin", 0x20000, 0x8000, CRC(b2fbce41) SHA1(9e94fc4efd03aff180a5bd94727f5be59647af52) )
ROM_END
-GAME( 1985, triviaqz, 0, triviaquiz, triviaquiz, triviaquiz_state, empty_init, ROT0, "Intermatic Manufacturing", "Professor Trivia (set 1)", MACHINE_IS_SKELETON ) // or Trivia Video Quiz? Professor Trivia appears on more screens
-GAME( 1985, triviaqz2, triviaqz, triviaquiz, triviaquiz, triviaquiz_state, empty_init, ROT0, "Intermatic Manufacturing", "Professor Trivia (set 2)", MACHINE_IS_SKELETON ) // both need question ROMs hook up
+GAME( 1985, triviaqz, 0, triviaquiz, triviaquiz, triviaquiz_state, empty_init, ROT0, "Intermatic Manufacturing", "Professor Trivia (set 1)", MACHINE_NO_SOUND ) // or Trivia Video Quiz? Professor Trivia appears on more screens
+GAME( 1985, triviaqz2, triviaqz, triviaquiz, triviaquiz, triviaquiz_state, empty_init, ROT0, "Intermatic Manufacturing", "Professor Trivia (set 2)", MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/trkfldch.cpp b/src/mame/drivers/trkfldch.cpp
index 35b414516f0..f5b771af04e 100644
--- a/src/mame/drivers/trkfldch.cpp
+++ b/src/mame/drivers/trkfldch.cpp
@@ -303,20 +303,23 @@ void trkfldch_state::draw_sprites(screen_device& screen, bitmap_ind16& bitmap, c
m_spriteram[i + 1] yyyy yyyy
m_spriteram[i + 2] tttt tttt
m_spriteram[i + 3] xxxx xxxx
- m_spriteram[i + 4] --zfF-t-x
+ m_spriteram[i + 4] --zfF-tdx
p = palette bits
- t = tile bites
+ t = tile bits
y = y pos bits
x = x pos bits
z = priority
fF = x/y flip
+ d = pixel double
*/
int y = m_spriteram[i + 1];
int x = m_spriteram[i + 3];
int tile = m_spriteram[i + 2];
+ int doublesize = m_spriteram[i + 4] & 0x02;
+
int tilehigh = m_spriteram[i + 4] & 0x04;
int tilehigh2 = m_spriteram[i + 0] & 0x04;
int tilehigh3 = m_spriteram[i + 0] & 0x08;
@@ -361,8 +364,7 @@ void trkfldch_state::draw_sprites(screen_device& screen, bitmap_ind16& bitmap, c
}
-
- gfx->transpen(bitmap, cliprect, tile + tilegfxbase, pal, flipx, flipy, x, y, 0);
+ gfx->zoom_transpen(bitmap, cliprect, tile + tilegfxbase, pal, flipx, flipy, x, y, doublesize ? 0x20000 : 0x10000, doublesize ? 0x20000 : 0x10000, 0);
}
}
diff --git a/src/mame/drivers/turbo.cpp b/src/mame/drivers/turbo.cpp
index 7836095a08b..19cc25500b7 100644
--- a/src/mame/drivers/turbo.cpp
+++ b/src/mame/drivers/turbo.cpp
@@ -1119,6 +1119,61 @@ ROM_END
ROM_START( turbob )
ROM_REGION( 0x6000, "maincpu", 0 )
+ // C revision label on all ROMs
+ ROM_LOAD( "epr-1363_t5c.ic76", 0x0000, 0x2000, CRC(a9c9571e) SHA1(724f8c1c13d3bf25bb675519e1388fd6882c4d0b) ) /* CPU module stamped as 834-0128 */
+ ROM_LOAD( "epr-1364_t5c.ic89", 0x2000, 0x2000, CRC(dc1f8352) SHA1(687a9a8e4f830809f712b590be343fe7b292b9fb) )
+ ROM_LOAD( "epr-1365_t5c.ic103", 0x4000, 0x2000, CRC(6edc455f) SHA1(e83439ace7a152c4e0e49793cf3cd2a3a2015845) )
+
+ ROM_REGION( 0x20000, "sprites", 0 ) /* sprite data */
+ ROM_LOAD( "epr-1246.prom-ic84", 0x00000, 0x2000, CRC(555bfe9a) SHA1(1e56385475eeff044dcd9b44a154991d3efe995e) ) /* level 0 */
+ ROM_RELOAD( 0x02000, 0x2000 )
+ ROM_LOAD( "epr-1247.prom-ic86", 0x04000, 0x2000, CRC(c8c5e4d5) SHA1(da70297340ddea0cd7fe04f2d94ea65f8202d0e5) ) /* level 1 */
+ ROM_RELOAD( 0x06000, 0x2000 )
+ ROM_LOAD( "epr-1248.prom-ic88", 0x08000, 0x2000, CRC(82fe5b94) SHA1(b96688ca0cfd90fdc4ee7c2e6c0b66726cc5713c) ) /* level 2 */
+ ROM_RELOAD( 0x0a000, 0x2000 )
+ ROM_LOAD( "epr-1249.prom-ic90", 0x0c000, 0x2000, CRC(e258e009) SHA1(598d382db0f789ea2fde749b7467abed545de25a) ) /* level 3 */
+ ROM_LOAD( "epr-1250.prom-ic108",0x0e000, 0x2000, CRC(aee6e05e) SHA1(99b9b1ec996746ddf713ed38192f350f1f32a847) )
+ ROM_LOAD( "epr-1251.prom-ic92", 0x10000, 0x2000, CRC(292573de) SHA1(3ddc980d11478a6a6e4082c2f76c1ab82ffe2f36) ) /* level 4 */
+ ROM_LOAD( "epr-1252.prom-ic110",0x12000, 0x2000, CRC(aee6e05e) SHA1(99b9b1ec996746ddf713ed38192f350f1f32a847) )
+ ROM_LOAD( "epr-1253.prom-ic94", 0x14000, 0x2000, CRC(92783626) SHA1(13979eb964112436182d2a92f21803bcc28f4a4a) ) /* level 5 */
+ ROM_LOAD( "epr-1254.prom-ic112",0x16000, 0x2000, CRC(aee6e05e) SHA1(99b9b1ec996746ddf713ed38192f350f1f32a847) )
+ ROM_LOAD( "epr-1255.prom-ic32", 0x18000, 0x2000, CRC(485dcef9) SHA1(0f760ebb42cc2580a29758c72428a41d74477ce6) ) /* level 6 */
+ ROM_LOAD( "epr-1256.prom-ic47", 0x1a000, 0x2000, CRC(aee6e05e) SHA1(99b9b1ec996746ddf713ed38192f350f1f32a847) )
+ ROM_LOAD( "epr-1257.prom-ic34", 0x1c000, 0x2000, CRC(4ca984ce) SHA1(99f294fb203f23929b44baa2dd1825c67dde08a1) ) /* level 7 */
+ ROM_LOAD( "epr-1258.prom-ic49", 0x1e000, 0x2000, CRC(aee6e05e) SHA1(99b9b1ec996746ddf713ed38192f350f1f32a847) )
+
+ ROM_REGION( 0x1000, "fgtiles", 0 ) /* foreground data */
+ ROM_LOAD( "epr-1244.cpu-ic111", 0x0000, 0x0800, CRC(17f67424) SHA1(6126562510f1509f3487faaa3b9d7470ab600a2c) )
+ ROM_LOAD( "epr-1245.cpu-ic122", 0x0800, 0x0800, CRC(2ba0b46b) SHA1(5d4d4f19ad7a911c7b37db190a420faf665546b4) )
+
+ ROM_REGION( 0x4800, "road", 0 ) /* road data */
+ ROM_LOAD( "epr-1125.cpu-ic1", 0x0000, 0x0800, CRC(65b5d44b) SHA1(bbdd5db013c9d876e9666f17c48569c7531bfc08) )
+ ROM_LOAD( "epr-1126.cpu-ic2", 0x0800, 0x0800, CRC(685ace1b) SHA1(99c8d36ac910169b27676d18c894433c2ba44853) )
+ ROM_LOAD( "epr-1127.cpu-ic13", 0x1000, 0x0800, CRC(9233c9ca) SHA1(cbf9a0f564d8ace1ccd701c1769dbc001d465851) )
+ ROM_LOAD( "epr-1238.cpu-ic14", 0x1800, 0x0800, CRC(d94fd83f) SHA1(1e3a68259d2ede623d5a7306fdf693a4eab301f0) )
+ ROM_LOAD( "epr-1239.cpu-ic27", 0x2000, 0x0800, CRC(4c41124f) SHA1(d73a9441552c77fb3078553195794311a950d589) )
+ ROM_LOAD( "epr-1240.cpu-ic28", 0x2800, 0x0800, CRC(371d6282) SHA1(f5902b357d976822d46aa6404b7bd30855d435a9) )
+ ROM_LOAD( "epr-1241.cpu-ic41", 0x3000, 0x0800, CRC(1109358a) SHA1(27a5351a4e87309671e72115299420315a93dba6) )
+ ROM_LOAD( "epr-1242.cpu-ic42", 0x3800, 0x0800, CRC(04866769) SHA1(1f9c0d53766fdaf8de57d3df05f291c2ca3dc5fb) )
+ ROM_LOAD( "epr-1243.cpu-ic74", 0x4000, 0x0800, CRC(29854c48) SHA1(cab89bc30f83d9746931ddf6f95a6d0c8a517e5d) )
+
+ ROM_REGION( 0x1020, "proms", 0 ) /* various PROMs */
+ ROM_LOAD( "pr-1114.prom-ic13", 0x0000, 0x0020, CRC(78aded46) SHA1(c78afe804f8b8e837b0c502de5b8715a41fb92b9) ) /* road red/green color table */
+ ROM_LOAD( "pr-1115.prom-ic18", 0x0020, 0x0020, CRC(5394092c) SHA1(129ff61104979ff6a3c3af8bf81c04ae9b133c9e) ) /* road collision/enable */
+ ROM_LOAD( "pr-1116.prom-ic20", 0x0040, 0x0020, CRC(3956767d) SHA1(073aaf57175526660fcf7af2e16e7f1d1aaba9a9) ) /* collision detection */
+ ROM_LOAD( "pr-1117.prom-ic21", 0x0060, 0x0020, CRC(f06d9907) SHA1(f11db7800f41b03e79f5eef8d7ef3ae0a6277518) ) /* road green/blue color table */
+ ROM_LOAD( "pr-1118.cpu-ic99", 0x0100, 0x0100, CRC(07324cfd) SHA1(844abc2042d6810fa34d84ff1ed57744886c6ea6) ) /* background color table */
+ ROM_LOAD( "pr-1119.cpu-ic50", 0x0200, 0x0200, CRC(57ebd4bc) SHA1(932649da3537666f95833a8a8aff506217bd9aa1) ) /* sprite Y scaling */
+ ROM_LOAD( "pr-1120.cpu-ic62", 0x0400, 0x0200, CRC(8dd4c8a8) SHA1(e8d9cf08f115d57c44746fa0ff28f47b064b4193) ) /* video timing */
+ ROM_LOAD( "pr-1121.prom-ic29", 0x0600, 0x0200, CRC(7692f497) SHA1(42468c0705df9928e15ff8deb7e793a6c0c04353) ) /* palette */
+ ROM_LOAD( "pr-1122.prom-ic11", 0x0800, 0x0400, CRC(1a86ce70) SHA1(cab708b9a089b2e28f2298c1e4fae6e200923527) ) /* sprite priorities */
+ ROM_LOAD( "pr-1123.prom-ic12", 0x0c00, 0x0400, CRC(02d2cb52) SHA1(c34d6b60355747ce20fcb8d322df0e188d187f10) ) /* sprite/road/background priorities */
+ ROM_LOAD( "pr-1279.sound-ic40", 0x1000, 0x0020, CRC(b369a6ae) SHA1(dda7c6cf58ce5173f29a3084c85393c0c4587086) ) /* sound board PROM */
+ROM_END
+
+
+ROM_START( turboc )
+ ROM_REGION( 0x6000, "maincpu", 0 )
// B revision label on 1st rom, A revision for 2nd / 3rd, 2nd rom was faulty, 3rd rom matched existing set, existing 2nd rom passes rom check.
ROM_LOAD( "epr-1363_t5b.ic76", 0x0000, 0x2000, CRC(f7f28149) SHA1(08aec3edd6d756b14b2f10fe5abd22ac83c79fcc) ) /* CPU module stamped as 834-0128 */
ROM_LOAD( "epr-1364_t5a.ic89", 0x2000, 0x2000, CRC(6a341693) SHA1(428927c4a14bf82225875012c255d25dcffaf2ab) )
@@ -1171,7 +1226,7 @@ ROM_START( turbob )
ROM_LOAD( "pr-1279.sound-ic40", 0x1000, 0x0020, CRC(b369a6ae) SHA1(dda7c6cf58ce5173f29a3084c85393c0c4587086) ) /* sound board PROM */
ROM_END
-ROM_START( turboc )
+ROM_START( turbod )
ROM_REGION( 0x6000, "maincpu", 0 )
ROM_LOAD( "epr-1363_t5a.ic76", 0x0000, 0x2000, CRC(5c110fb6) SHA1(fdcdf488bd112db12aa22c4b7e9f34004185d4ce) )
ROM_LOAD( "epr-1364_t5a.ic89", 0x2000, 0x2000, CRC(6a341693) SHA1(428927c4a14bf82225875012c255d25dcffaf2ab) )
@@ -1225,7 +1280,7 @@ ROM_START( turboc )
ROM_END
-ROM_START( turbod )
+ROM_START( turboe )
ROM_REGION( 0x6000, "maincpu", 0 )
// no letter on rom labels, numbered 1363-1365, possibly the original 1363-1365 revision? - service mode still shows the older EPR-1262 through EPR-1264 tho?
ROM_LOAD( "1363.ic76", 0x0000, 0x2000, CRC(b6329a00) SHA1(02ca3d7703607bc0390a14d838fafb01a3e3cdef) ) /* CPU module stamped as 834-0128 */
@@ -1802,9 +1857,10 @@ void turbo_state::init_turbo_noenc()
GAMEL( 1981, turbo, 0, turbo, turbo, turbo_state, init_turbo_noenc, ROT270, "Sega", "Turbo (program 1513-1515)", MACHINE_IMPERFECT_SOUND , layout_turbo )
GAMEL( 1981, turboa, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1262-1264)", MACHINE_IMPERFECT_SOUND , layout_turbo )
-GAMEL( 1981, turbob, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365 rev B)", MACHINE_IMPERFECT_SOUND , layout_turbo )
-GAMEL( 1981, turboc, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365 rev A)", MACHINE_IMPERFECT_SOUND , layout_turbo )
-GAMEL( 1981, turbod, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365)", MACHINE_IMPERFECT_SOUND , layout_turbo ) // but still reports 1262-1264 in the test mode?
+GAMEL( 1981, turbob, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365 rev C)", MACHINE_IMPERFECT_SOUND , layout_turbo )
+GAMEL( 1981, turboc, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365 rev B)", MACHINE_IMPERFECT_SOUND , layout_turbo )
+GAMEL( 1981, turbod, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365 rev A)", MACHINE_IMPERFECT_SOUND , layout_turbo )
+GAMEL( 1981, turboe, turbo, turbo, turbo, turbo_state, init_turbo_enc, ROT270, "Sega", "Turbo (encrypted, program 1363-1365)", MACHINE_IMPERFECT_SOUND , layout_turbo ) // but still reports 1262-1264 in the test mode?
GAMEL( 1981, turbobl, turbo, turbo, turbo, turbo_state, init_turbo_noenc, ROT270, "bootleg", "Indianapolis (bootleg of Turbo)", MACHINE_IMPERFECT_SOUND , layout_turbo ) // decrypted bootleg of a 1262-1264 set
GAMEL( 1982, subroc3d, 0, subroc3d, subroc3d, turbo_state, empty_init, ORIENTATION_FLIP_X, "Sega", "Subroc-3D", MACHINE_IMPERFECT_SOUND , layout_subroc3d )
diff --git a/src/mame/drivers/tv990.cpp b/src/mame/drivers/tv990.cpp
index 6544df8851d..f0f85f6230c 100644
--- a/src/mame/drivers/tv990.cpp
+++ b/src/mame/drivers/tv990.cpp
@@ -303,17 +303,17 @@ uint32_t tv990_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
READ8_MEMBER(tv990_state::kbdc_r)
{
if(offset)
- return m_kbdc->data_r(space, 4);
+ return m_kbdc->data_r(4);
else
- return m_kbdc->data_r(space, 0);
+ return m_kbdc->data_r(0);
}
WRITE8_MEMBER(tv990_state::kbdc_w)
{
if(offset)
- m_kbdc->data_w(space, 4, data);
+ m_kbdc->data_w(4, data);
else
- m_kbdc->data_w(space, 0, data);
+ m_kbdc->data_w(0, data);
}
void tv990_state::tv990_mem(address_map &map)
diff --git a/src/mame/drivers/ultrsprt.cpp b/src/mame/drivers/ultrsprt.cpp
index 6569419423f..f79dd7229da 100644
--- a/src/mame/drivers/ultrsprt.cpp
+++ b/src/mame/drivers/ultrsprt.cpp
@@ -36,26 +36,26 @@ public:
void ultrsprt(machine_config &config);
private:
- static const uint32_t VRAM_PAGES = 2;
- static const uint32_t VRAM_PAGE_BYTES = 512 * 1024;
+ static const u32 VRAM_PAGES = 2;
+ static const u32 VRAM_PAGE_BYTES = 512 * 1024;
required_device<ppc_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<k056800_device> m_k056800;
- required_shared_ptr<uint32_t> m_workram;
+ required_shared_ptr<u32> m_workram;
required_device<palette_device> m_palette;
required_device<eeprom_serial_93cxx_device> m_eeprom;
required_device_array<upd4701_device, 2> m_upd;
required_ioport m_service;
- DECLARE_READ8_MEMBER(eeprom_r);
- DECLARE_WRITE8_MEMBER(eeprom_w);
- DECLARE_READ16_MEMBER(upd1_r);
- DECLARE_READ16_MEMBER(upd2_r);
- DECLARE_WRITE32_MEMBER(int_ack_w);
+ u8 eeprom_r();
+ void eeprom_w(u8 data);
+ u16 upd1_r(offs_t offset);
+ u16 upd2_r(offs_t offset);
+ void int_ack_w(u32 data);
- uint32_t screen_update_ultrsprt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update_ultrsprt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void sound_map(address_map &map);
void ultrsprt_map(address_map &map);
@@ -63,25 +63,25 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- std::unique_ptr<uint8_t[]> m_vram;
- uint32_t m_cpu_vram_page;
+ std::unique_ptr<u8[]> m_vram;
+ u32 m_cpu_vram_page;
};
/*****************************************************************************/
-uint32_t ultrsprt_state::screen_update_ultrsprt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 ultrsprt_state::screen_update_ultrsprt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint8_t *vram = m_vram.get() + (m_cpu_vram_page ^ 1) * VRAM_PAGE_BYTES;
+ u8 *vram = m_vram.get() + (m_cpu_vram_page ^ 1) * VRAM_PAGE_BYTES;
for (int y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
int fb_index = y * 1024;
- uint16_t *dest = &bitmap.pix16(y, cliprect.min_x);
+ u16 *dest = &bitmap.pix16(y, cliprect.min_x);
for (int x = cliprect.min_x; x <= cliprect.max_x; ++x)
{
- uint8_t p1 = vram[BYTE4_XOR_BE(fb_index + x + 512)];
+ u8 p1 = vram[BYTE4_XOR_BE(fb_index + x + 512)];
if (p1 == 0)
*dest++ = vram[BYTE4_XOR_BE(fb_index + x)];
@@ -96,18 +96,18 @@ uint32_t ultrsprt_state::screen_update_ultrsprt(screen_device &screen, bitmap_in
/*****************************************************************************/
-WRITE32_MEMBER(ultrsprt_state::int_ack_w)
+void ultrsprt_state::int_ack_w(u32 data)
{
m_maincpu->set_input_line(INPUT_LINE_IRQ1, CLEAR_LINE);
}
-READ8_MEMBER(ultrsprt_state::eeprom_r)
+u8 ultrsprt_state::eeprom_r()
{
return m_service->read();
}
-WRITE8_MEMBER(ultrsprt_state::eeprom_w)
+void ultrsprt_state::eeprom_w(u8 data)
{
/*
.... ...x - EEPROM DI
@@ -123,7 +123,7 @@ WRITE8_MEMBER(ultrsprt_state::eeprom_w)
m_eeprom->clk_write(!BIT(data, 1));
m_eeprom->cs_write(BIT(data, 2));
- uint32_t vram_page = (data & 0x08) >> 3;
+ u32 vram_page = (data & 0x08) >> 3;
if (vram_page != m_cpu_vram_page)
{
membank("vram")->set_entry(vram_page);
@@ -139,14 +139,14 @@ WRITE8_MEMBER(ultrsprt_state::eeprom_w)
m_audiocpu->set_input_line(INPUT_LINE_RESET, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE);
}
-READ16_MEMBER(ultrsprt_state::upd1_r)
+u16 ultrsprt_state::upd1_r(offs_t offset)
{
- return m_upd[0]->read_xy(space, offset * 2) | (m_upd[0]->read_xy(space, offset * 2 + 1) << 8);
+ return m_upd[0]->read_xy(offset * 2) | (m_upd[0]->read_xy(offset * 2 + 1) << 8);
}
-READ16_MEMBER(ultrsprt_state::upd2_r)
+u16 ultrsprt_state::upd2_r(offs_t offset)
{
- return m_upd[1]->read_xy(space, offset * 2) | (m_upd[1]->read_xy(space, offset * 2 + 1) << 8);
+ return m_upd[1]->read_xy(offset * 2) | (m_upd[1]->read_xy(offset * 2 + 1) << 8);
}
/*****************************************************************************/
@@ -218,7 +218,7 @@ void ultrsprt_state::machine_start()
/* configure fast RAM regions for DRC */
m_maincpu->ppcdrc_add_fastram(0xff000000, 0xff01ffff, false, m_workram);
- m_vram = std::make_unique<uint8_t[]>(VRAM_PAGE_BYTES * VRAM_PAGES);
+ m_vram = std::make_unique<u8[]>(VRAM_PAGE_BYTES * VRAM_PAGES);
membank("vram")->configure_entries(0, VRAM_PAGES, m_vram.get(), VRAM_PAGE_BYTES);
diff --git a/src/mame/drivers/unkpoker.cpp b/src/mame/drivers/unkpoker.cpp
index c5b3462dc42..331caac43aa 100644
--- a/src/mame/drivers/unkpoker.cpp
+++ b/src/mame/drivers/unkpoker.cpp
@@ -16,7 +16,7 @@ Two 2112 Rams
Two 5101 Rams (Low Power Versions, one connected to Battery)
Four position DIP Switch - DIP 1 changes on screen text from
-normal to high lighted as seen pics. Other DIPS unknown.
+normal to highlighted as seen in pics. Other DIPs unknown.
Sound?
@@ -25,7 +25,8 @@ Date of manufacture unknown. Latest date codes on logic chips is 1980.
Chaneman 3/20/2019
-TODO: everything
+TODO: stuck if it isn't immediately coined up at boot.
+ Game can be tested by keeping COIN1 (5 by default) pressed at boot.
*******************************************************************************************/
@@ -76,7 +77,7 @@ uint32_t unkpoker_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
uint8_t chr = m_videoram[x + ma] & 0x7f;
uint8_t gfx = m_chargen[(chr << 3) | ra];
- /* Display a scanline of a character */
+ // Display a scanline of a character
*p++ = BIT(gfx, 7);
*p++ = BIT(gfx, 6);
*p++ = BIT(gfx, 5);
@@ -93,23 +94,43 @@ uint32_t unkpoker_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
}
-void unkpoker_state::mem_map(address_map &map) {
+void unkpoker_state::mem_map(address_map &map)
+{
map(0x0000,0x0fff).rom();
map(0x1000,0x1fff).ram();
- map(0x8000,0x83ff).ram().share("videoram");
+ map(0x8000,0x83ff).ram().share(m_videoram);
}
-void unkpoker_state::io_map(address_map &map) {
- map(0x01,0x01).portr("IN");
- map(0x02,0x02).portr("DSW");
+void unkpoker_state::io_map(address_map &map)
+{
+ map(0x01,0x01).portr("IN1"); // writes here
+ map(0x02,0x02).portr("DSW"); // writes here, seems sound related
+ map(0x04,0x04).portr("IN2");
}
static INPUT_PORTS_START( unkpoker )
- PORT_START("IN")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("DSW")
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // does something
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_NAME("Ante")
+ 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_COIN1 )
+
+ PORT_START("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // does something
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_CANCEL )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL )
+
+ PORT_START("DSW") // seem to change coinage, but DSW:1 should do something different (see notes on top of the driver)
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW:3")
diff --git a/src/mame/drivers/vamphalf.cpp b/src/mame/drivers/vamphalf.cpp
index 0d37129f1f4..d265742af15 100644
--- a/src/mame/drivers/vamphalf.cpp
+++ b/src/mame/drivers/vamphalf.cpp
@@ -78,14 +78,14 @@ public:
vamphalf_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_wram(*this,"wram")
- , m_wram32(*this,"wram32")
- , m_okibank(*this,"okibank")
+ , m_wram(*this, "wram")
+ , m_wram32(*this, "wram32")
+ , m_okibank(*this, "okibank")
, m_palette(*this, "palette")
, m_soundlatch(*this, "soundlatch")
, m_eeprom(*this, "eeprom")
, m_gfxdecode(*this, "gfxdecode")
- , m_tiles(*this,"tiles", 0U)
+ , m_tiles(*this, "tiles", 0U)
, m_okiregion(*this, "oki%u", 1)
, m_photosensors(*this, "PHOTO_SENSORS")
, m_has_extra_gfx(false)
@@ -115,6 +115,7 @@ public:
void init_coolminii();
void init_mrdig();
void init_jmpbreak();
+ void init_jmpbreaka();
void init_poosho();
void init_newxpang();
void init_worldadv();
@@ -199,6 +200,7 @@ private:
DECLARE_READ16_MEMBER(dquizgo2_speedup_r);
DECLARE_READ32_MEMBER(aoh_speedup_r);
DECLARE_READ16_MEMBER(jmpbreak_speedup_r);
+ DECLARE_READ16_MEMBER(jmpbreaka_speedup_r);
DECLARE_READ16_MEMBER(poosho_speedup_r);
DECLARE_READ16_MEMBER(newxpang_speedup_r);
DECLARE_READ16_MEMBER(worldadv_speedup_r);
@@ -1658,6 +1660,24 @@ ROM_START( jmpbreak ) /* Released February 1999 */
ROM_LOAD( "vrom1.bin", 0x00000, 0x40000, CRC(1b6e3671) SHA1(bd601460387b56c989785ae03d5bb3c6cdb30a50) )
ROM_END
+ROM_START( jmpbreaka ) // PCB has a New Impeuropex sticker, so sold in the Italian market. There also an hand-written IMP 28.04.99
+ ROM_REGION16_BE( 0x100000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "2.rom1", 0x00000, 0x80000, CRC(553af133) SHA1(e2ae803e8f58426417093cc4b3784dee858f41ef) )
+ ROM_LOAD( "3.rom2", 0x80000, 0x80000, CRC(bd0a5eed) SHA1(9aaf83e4dcd4d02fb9b1c3156264c013a6873972) )
+
+ ROM_REGION( 0x800000, "gfx", 0 ) // these were not dumped for this set
+ ROM_LOAD32_WORD( "roml00.bin", 0x000000, 0x200000, BAD_DUMP CRC(4b99190a) SHA1(30af068f7d9f9f349db5696c19ab53ac33304271) )
+ ROM_LOAD32_WORD( "romu00.bin", 0x000002, 0x200000, BAD_DUMP CRC(e93762f8) SHA1(cc589b59e3ab7aa7092e96a1ff8a9de8a499b257) )
+ ROM_LOAD32_WORD( "roml01.bin", 0x400000, 0x200000, BAD_DUMP CRC(6796a104) SHA1(3f7352cd37f78c1b01f7df45344ee7800db110f9) )
+ ROM_LOAD32_WORD( "romu01.bin", 0x400002, 0x200000, BAD_DUMP CRC(0cc907c8) SHA1(86029eca0870f3b7dd4f1ee8093ccb09077cc00b) )
+
+ ROM_REGION( 0x40000, "oki1", 0 )
+ ROM_LOAD( "1.vrom1", 0x00000, 0x40000, CRC(1b6e3671) SHA1(bd601460387b56c989785ae03d5bb3c6cdb30a50) )
+
+ ROM_REGION( 0x2dd, "plds", 0 )
+ ROM_LOAD( "palce22v10h.gal1", 0x000, 0x2dd, CRC(0ff86470) SHA1(0cc2bd2958c71d0bb58081a8f88327b09e92e2ea) )
+ROM_END
+
ROM_START( poosho ) /* Released November 1999 - Updated sequel to Jumping Break for Korean market */
ROM_REGION16_BE( 0x100000, "maincpu", ROMREGION_ERASE00 ) /* Hyperstone CPU Code */
ROM_LOAD( "rom1.bin", 0x00000, 0x80000, CRC(2072c120) SHA1(cf066cd277840fdbb7a854a052a80b2fbb582278) )
@@ -3169,6 +3189,19 @@ READ16_MEMBER(vamphalf_state::jmpbreak_speedup_r)
return m_wram[0x906f4 / 2];
}
+READ16_MEMBER(vamphalf_state::jmpbreaka_speedup_r)
+{
+ if (m_maincpu->pc() == 0x909ac)
+ {
+ if (irq_active())
+ m_maincpu->spin_until_interrupt();
+ else
+ m_maincpu->eat_cycles(50);
+ }
+
+ return m_wram[0xe1dfc / 2];
+}
+
READ16_MEMBER(vamphalf_state::poosho_speedup_r)
{
if (m_maincpu->pc() == 0xa8c78)
@@ -3487,6 +3520,14 @@ void vamphalf_state::init_jmpbreak()
m_palshift = 0;
}
+void vamphalf_state::init_jmpbreaka()
+{
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0x00e1dfc, 0x00e1dfd, read16_delegate(*this, FUNC(vamphalf_state::jmpbreaka_speedup_r)));
+ m_maincpu->space(AS_PROGRAM).install_write_handler(0xe0000000, 0xe0000003, write16smo_delegate(*this, FUNC(vamphalf_state::jmpbreak_flipscreen_w)));
+
+ m_palshift = 0;
+}
+
void vamphalf_state::init_mrdig()
{
m_maincpu->space(AS_PROGRAM).install_read_handler(0x0e0768, 0x0e0769, read16_delegate(*this, FUNC(vamphalf_state::mrdig_speedup_r)));
@@ -3532,7 +3573,8 @@ void vamphalf_state::init_boonggab()
GAME( 1999, coolmini, 0, coolmini, common, vamphalf_state, init_coolmini, ROT0, "SemiCom", "Cool Minigame Collection", MACHINE_SUPPORTS_SAVE )
GAME( 1999, coolminii, coolmini, coolmini, common, vamphalf_state, init_coolminii, ROT0, "SemiCom", "Cool Minigame Collection (Italy)", MACHINE_SUPPORTS_SAVE )
-GAME( 1999, jmpbreak, 0, jmpbreak, common, vamphalf_state, init_jmpbreak, ROT0, "F2 System", "Jumping Break" , MACHINE_SUPPORTS_SAVE )
+GAME( 1999, jmpbreak, 0, jmpbreak, common, vamphalf_state, init_jmpbreak, ROT0, "F2 System", "Jumping Break (set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, jmpbreaka, jmpbreak, jmpbreak, common, vamphalf_state, init_jmpbreaka, ROT0, "F2 System", "Jumping Break (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1999, poosho, 0, jmpbreak, common, vamphalf_state, init_poosho, ROT0, "F2 System", "Poosho Poosho" , MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/vaportra.cpp b/src/mame/drivers/vaportra.cpp
index a6f593ce1df..80881936c23 100644
--- a/src/mame/drivers/vaportra.cpp
+++ b/src/mame/drivers/vaportra.cpp
@@ -236,8 +236,6 @@ void vaportra_state::vaportra(machine_config &config)
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_pf1_size(DECO_64x32);
m_deco_tilegen[0]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[0]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[0]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[0]->set_pf1_col_bank(0x00);
m_deco_tilegen[0]->set_pf2_col_bank(0x20);
m_deco_tilegen[0]->set_pf1_col_mask(0x0f);
@@ -251,8 +249,6 @@ void vaportra_state::vaportra(machine_config &config)
DECO16IC(config, m_deco_tilegen[1], 0);
m_deco_tilegen[1]->set_pf1_size(DECO_64x32);
m_deco_tilegen[1]->set_pf2_size(DECO_64x32);
- m_deco_tilegen[1]->set_pf1_trans_mask(0x0f);
- m_deco_tilegen[1]->set_pf2_trans_mask(0x0f);
m_deco_tilegen[1]->set_pf1_col_bank(0x30);
m_deco_tilegen[1]->set_pf2_col_bank(0x40);
m_deco_tilegen[1]->set_pf1_col_mask(0x0f);
diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp
index 4d4b7c67ea8..82b7eda570b 100644
--- a/src/mame/drivers/vc4000.cpp
+++ b/src/mame/drivers/vc4000.cpp
@@ -534,6 +534,7 @@ void vc4000_state::vc4000(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &vc4000_state::vc4000_mem);
m_maincpu->sense_handler().set(FUNC(vc4000_state::vc4000_vsync_r));
m_maincpu->set_periodic_int(FUNC(vc4000_state::vc4000_video_line), attotime::from_hz(312*53)); // GOLF needs this exact value
+ m_maincpu->intack_handler().set([]() { return 0x03; });
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp
index 2b7460c6f6c..956582d95e8 100644
--- a/src/mame/drivers/vgmplay.cpp
+++ b/src/mame/drivers/vgmplay.cpp
@@ -393,6 +393,7 @@ enum vgmplay_inputs : uint8_t
VGMPLAY_PLAY,
VGMPLAY_RESTART,
VGMPLAY_LOOP,
+ VGMPLAY_VIZ,
};
class vgmplay_state : public driver_device
@@ -2757,6 +2758,8 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state::load_file)
device.set_unscaled_clock(c & ~0xc0000000);
if (device.unscaled_clock() != 0)
dynamic_cast<device_sound_interface *>(&device)->set_output_gain(ALL_OUTPUTS, chip_volume);
+ else
+ dynamic_cast<device_sound_interface *>(&device)->set_output_gain(ALL_OUTPUTS, 0);
return (c & 0x80000000) != 0;
});
@@ -3154,6 +3157,9 @@ INPUT_CHANGED_MEMBER(vgmplay_state::key_pressed)
case VGMPLAY_LOOP:
m_vgmplay->toggle_loop();
break;
+ case VGMPLAY_VIZ:
+ m_mixer->cycle_viz_mode();
+ break;
}
}
@@ -3164,6 +3170,7 @@ static INPUT_PORTS_START( vgmplay )
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_PLAY) PORT_NAME("Play")
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_RESTART) PORT_NAME("Restart")
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_LOOP) PORT_NAME("Loop")
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_VIZ) PORT_NAME("Visualization Mode")
INPUT_PORTS_END
void vgmplay_state::file_map(address_map &map)
diff --git a/src/mame/drivers/vic20.cpp b/src/mame/drivers/vic20.cpp
index 2ab6080b114..86f8bfa2e9b 100644
--- a/src/mame/drivers/vic20.cpp
+++ b/src/mame/drivers/vic20.cpp
@@ -809,8 +809,8 @@ void vic20_state::vic20(machine_config &config, const char* softlist_filter)
m_vic->set_addrmap(0, &vic20_state::vic_videoram_map);
m_vic->set_addrmap(1, &vic20_state::vic_colorram_map);
- m_vic->potx_rd_callback().set(m_joy, FUNC(vcs_control_port_device::pot_x_r));
- m_vic->poty_rd_callback().set(m_joy, FUNC(vcs_control_port_device::pot_y_r));
+ m_vic->potx_rd_callback().set(m_joy, FUNC(vcs_control_port_device::read_pot_x));
+ m_vic->poty_rd_callback().set(m_joy, FUNC(vcs_control_port_device::read_pot_y));
m_vic->add_route(ALL_OUTPUTS, "mono", 0.25);
PET_DATASSETTE_PORT(config, m_cassette, 0);
diff --git a/src/mame/drivers/videosaa.cpp b/src/mame/drivers/videosaa.cpp
index 84768b1a296..4d43ba2bde0 100644
--- a/src/mame/drivers/videosaa.cpp
+++ b/src/mame/drivers/videosaa.cpp
@@ -1,37 +1,72 @@
-// license:BSD-3-Clause
-// copyright-holders:
-/*
- Skeleton driver for gambling (?) games running on very similar PCBs manufactured by 'Videos A A'.
+// license: BSD-3-Clause
+// copyright-holders: Dirk Best
+/***************************************************************************
+
+ Joker Lady
+ Lady Gum
+ Paradar
+ Winner
+
+ © 1995? Videos A A
+
+ TODO:
+ - Palette
+ - Unknown tile attributes
+
+ Notes:
- Probably manufactured in Italy since PCBs are marked 'lato componenti' (components side) and 'lato
- saldature' (solder side). Lady Gum's 68HC705 ROM contains strings in French, though.
+ Probably manufactured in Italy since PCBs are marked 'lato componenti'
+ (components side) and 'lato saldature' (solder side). Lady Gum's 68HC705
+ ROM contains strings in French, though.
PCBs couldn't be tested so game titles are taken from ROM stickers.
- The only complete dump is Lady Gum, all the others are missing at least the 68HC705 internal ROM.
+ The only complete dump is Lady Gum, all the others are missing at least
+ the 68HC705 internal ROM.
- Hardware overview:
- Main CPU: MC68HC705C8ACS (verified on Winner, stickers and PCB marks on other games say 68HC705)
- CRTC: HD46505SP-2
- Sound: NEC D7759C
- RAM: 2 x 6116 or equivalent
- OSC: 10 MHz
- Dips: 1 x 8 dips bank
-*/
+ On the first service mode screen hold PROG (HOLD5), then push COIN (HOLD1)
+ to adjust the coin values.
+
+ Hardware:
+ - CPU: MC68HC705C8ACS (verified on Winner, stickers/PCB marks say 68HC705)
+ - CRTC: HD46505SP-2
+ - Sound: NEC D7759C
+ - RAM: 2x 6116 or equivalent
+ - OSC: 10 MHz
+ - Dips: 1x 8 dips bank
+
+***************************************************************************/
#include "emu.h"
-#include "emupal.h"
#include "cpu/m6805/m68hc05.h"
#include "sound/upd7759.h"
#include "video/mc6845.h"
+
+#include "emupal.h"
#include "screen.h"
+#include "speaker.h"
+#include "tilemap.h"
+
+#include "videosaa.lh"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
class videosaa_state : public driver_device
{
public:
videosaa_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , m_maincpu(*this, "maincpu")
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_crtc(*this, "crtc"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_adpcm(*this, "adpcm"),
+ m_in0(*this, "in0"),
+ m_in1(*this, "in1"),
+ m_dip(*this, "dip"),
+ m_lamps(*this, "lamp%u", 0U)
{ }
void videosaa(machine_config &config);
@@ -39,78 +74,368 @@ public:
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
- virtual void video_start() override;
private:
- required_device<cpu_device> m_maincpu;
-
+ required_device<m68hc705c8a_device> m_maincpu;
+ required_device<hd6845s_device> m_crtc;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<upd7759_device> m_adpcm;
+
+ required_ioport m_in0;
+ required_ioport m_in1;
+ required_ioport m_dip;
+
+ output_finder<6> m_lamps;
+
+ uint8_t maincpu_porta_r();
+ void maincpu_porta_w(uint8_t data);
+ void maincpu_portb_w(uint8_t data);
+ void maincpu_portc_w(uint8_t data);
+ uint8_t maincpu_portd_r();
+
+ uint8_t m_porta;
+ uint8_t m_portb;
+ uint8_t m_portc;
+
+ uint8_t m_chip_latch;
+ uint8_t m_video_latch[4];
+
+ TILE_GET_INFO_MEMBER(tile_info);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void videosaa_palette(palette_device &palette) const;
+
+ std::unique_ptr<uint8_t[]> m_vram0;
+ std::unique_ptr<uint8_t[]> m_vram1;
+
+ tilemap_t *m_tilemap;
};
-void videosaa_state::video_start()
+
+//**************************************************************************
+// INPUT PORT DEFINITIONS
+//**************************************************************************
+
+static INPUT_PORTS_START( videosaa )
+ PORT_START("in0")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) // aux
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) // aux
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_COIN1)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_COIN2)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) // aux
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) // aux
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("O.GUM-LOT")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE)
+
+ PORT_START("in1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) // aux
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT) PORT_NAME("LOT")
+
+ PORT_START("dip")
+ PORT_DIPNAME(0x03, 0x03, "Payout")
+ PORT_DIPSETTING( 0x00, "40%")
+ PORT_DIPSETTING( 0x01, "50%")
+ PORT_DIPSETTING( 0x02, "60%")
+ PORT_DIPSETTING( 0x03, "70%")
+ PORT_DIPLOCATION("DIP:1,2")
+ PORT_DIPNAME(0x04, 0x04, "Limit 1 Coin")
+ PORT_DIPSETTING( 0x04, DEF_STR( No ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ))
+ PORT_DIPLOCATION("DIP:3")
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP:5" )
+ PORT_DIPNAME(0x20, 0x20, "Auto Hold")
+ PORT_DIPSETTING( 0x20, DEF_STR( No ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ))
+ PORT_DIPLOCATION("DIP:6")
+ PORT_DIPNAME(0x40, 0x40, "Kings or Better")
+ PORT_DIPSETTING( 0x40, DEF_STR( No ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ))
+ PORT_DIPLOCATION("DIP:7")
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP:8" )
+INPUT_PORTS_END
+
+
+//**************************************************************************
+// VIDEO EMULATION
+//**************************************************************************
+
+TILE_GET_INFO_MEMBER(videosaa_state::tile_info)
{
+ // 7------- tile bit 8
+ // -65----- unknown
+ // ---4---- tile bit 9
+ // ----3--- unknown (or tile bit 9?)
+ // -----210 color
+
+ uint8_t data = m_vram0[tile_index];
+ uint8_t attr = m_vram1[tile_index];
+
+ uint16_t tile = (BIT(attr, 4) << 9) | (BIT(attr, 7) << 8) | data;
+
+ tileinfo.set(0, tile, attr & 0x07, 0);
}
uint32_t videosaa_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
+ m_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
-static INPUT_PORTS_START( videosaa )
-INPUT_PORTS_END
+static GFXDECODE_START( gfx )
+ GFXDECODE_ENTRY( "gfx", 0, gfx_8x8x3_planar, 0, 8 )
+GFXDECODE_END
-static const gfx_layout tiles_layout = // seems to give reasonable results but needs verifying
+void videosaa_state::videosaa_palette(palette_device &palette) const
{
- 8,8,
- RGN_FRAC(1,3),
- 3,
- { RGN_FRAC(1,3), RGN_FRAC(2,3), RGN_FRAC(0,3) },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
- 8*8
-};
+ // basic 3 bit palette
+ for (int i = 0; i < 8; i++)
+ palette.set_indirect_color(i, rgb_t(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1)));
+
+ // wrong
+ palette.set_pen_indirect( 0, 0);
+ palette.set_pen_indirect( 7, 7);
+ palette.set_pen_indirect( 8, 0);
+ palette.set_pen_indirect(14, 7);
+ palette.set_pen_indirect(15, 6);
+ palette.set_pen_indirect(16, 0);
+ palette.set_pen_indirect(21, 7);
+ palette.set_pen_indirect(23, 5);
+ palette.set_pen_indirect(24, 0);
+ palette.set_pen_indirect(28, 7);
+ palette.set_pen_indirect(31, 4);
+ palette.set_pen_indirect(32, 0);
+ palette.set_pen_indirect(35, 7);
+ palette.set_pen_indirect(39, 3);
+ palette.set_pen_indirect(40, 0);
+ palette.set_pen_indirect(42, 7);
+ palette.set_pen_indirect(48, 2);
+ palette.set_pen_indirect(48, 7);
+ palette.set_pen_indirect(49, 0);
+ palette.set_pen_indirect(55, 1);
+ palette.set_pen_indirect(56, 0);
+ palette.set_pen_indirect(63, 0);
+}
-static GFXDECODE_START( gfx )
- GFXDECODE_ENTRY( "gfx", 0, tiles_layout, 0, 1 )
-GFXDECODE_END
+
+//**************************************************************************
+// MACHINE EMULATION
+//**************************************************************************
+
+uint8_t videosaa_state::maincpu_porta_r()
+{
+ return m_porta;
+}
+
+void videosaa_state::maincpu_porta_w(uint8_t data)
+{
+ m_porta = data;
+}
+
+void videosaa_state::maincpu_portb_w(uint8_t data)
+{
+ // 7------- porta latch
+ // -654---- porta latch address
+ // ----3--- portc latch
+ // -----210 portc latch address
+
+ if (BIT(data, 7) == 1)
+ {
+ switch ((data >> 4) & 0x07)
+ {
+ case 0:
+ m_porta = m_in0->read();
+ break;
+
+ case 1:
+ m_porta = m_in1->read();
+ break;
+
+ case 2:
+ // 76------ always 0
+ // --5----- 1 while playing, reset with "O.GUM-LOT" key
+ // ---43--- always 0
+ // -----2-- always 1
+ // ------1- toggles on first coin in
+ // -------0 always 0
+ break;
+
+ case 3:
+ // 76------ not used
+ // --5----- start lamp
+ // ---43210 hold lamps 5 to 1
+ m_lamps[0] = BIT(m_porta, 0);
+ m_lamps[1] = BIT(m_porta, 1);
+ m_lamps[2] = BIT(m_porta, 2);
+ m_lamps[3] = BIT(m_porta, 3);
+ m_lamps[4] = BIT(m_porta, 4);
+ m_lamps[5] = BIT(m_porta, 5);
+ break;
+
+ case 4:
+ // always 0?
+ if (m_porta)
+ logerror("Latch 4 port A = %02x\n", m_porta);
+ break;
+
+ case 5:
+ m_adpcm->port_w(m_porta);
+ break;
+
+ case 6:
+ m_porta = m_dip->read();
+ break;
+
+ case 7:
+ // 7------- mc6845 cs
+ // -6------ mc6845 rs
+ // --5----- unknown
+ // ---4---- unknown
+ // ----3--- unknown
+ // -----2-- upd7759 reset
+ // ------1- upd7759 start
+ // -------0 unknown
+ m_chip_latch = m_porta;
+ m_adpcm->start_w(BIT(m_chip_latch, 1));
+ m_adpcm->reset_w(BIT(m_chip_latch, 2));
+ break;
+ }
+ }
+
+ if (BIT(data, 3) == 1)
+ {
+ switch ((data >> 0) & 0x07)
+ {
+ case 0:
+ m_video_latch[0] = m_portc;
+
+ if (m_video_latch[0] < 0x08)
+ {
+ offs_t address = (m_video_latch[0] << 8) | m_video_latch[1];
+
+ m_vram0[address] = m_video_latch[3];
+ m_vram1[address] = m_video_latch[2];
+
+ m_tilemap->mark_tile_dirty(address);
+ }
+ else
+ logerror("VRAM high write: %02x\n", m_video_latch[0]);
+
+ break;
+
+ case 1:
+ m_video_latch[1] = m_portc;
+ break;
+
+ case 2:
+ m_video_latch[2] = m_portc;
+ break;
+
+ case 3:
+ m_video_latch[3] = m_portc;
+ break;
+
+ case 4:
+ if (BIT(m_chip_latch, 7) == 0 && BIT(m_chip_latch, 6) == 0)
+ m_crtc->address_w(m_portc);
+
+ if (BIT(m_chip_latch, 7) == 0 && BIT(m_chip_latch, 6) == 1)
+ m_crtc->register_w(m_portc);
+
+ break;
+
+ default:
+ logerror("Unknown latch port C: %d = %02x\n", (data >> 0) & 0x07, m_portc);
+ }
+ }
+
+ m_portb = data;
+}
+
+void videosaa_state::maincpu_portc_w(uint8_t data)
+{
+ m_portc = data;
+}
+
+uint8_t videosaa_state::maincpu_portd_r()
+{
+ // 7------- upd7759 busy
+ // -6543210 unused
+
+ return m_adpcm->busy_r() << 7;
+}
void videosaa_state::machine_start()
{
+ // allocate space for vram
+ m_vram0 = make_unique_clear<uint8_t[]>(0x800);
+ m_vram1 = make_unique_clear<uint8_t[]>(0x800);
+
+ m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(videosaa_state::tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+
+ m_lamps.resolve();
+
+ // register for savestates
+ save_pointer(NAME(m_vram0), 0x800);
+ save_pointer(NAME(m_vram1), 0x800);
+ save_item(NAME(m_chip_latch));
+ save_pointer(NAME(m_video_latch), 4);
}
void videosaa_state::machine_reset()
{
+ m_porta = 0;
+ m_portb = 0;
+ m_portc = 0;
}
+
+//**************************************************************************
+// MACHINE DEFINTIONS
+//**************************************************************************
+
void videosaa_state::videosaa(machine_config &config)
{
- /* basic machine hardware */
- M68HC705C8A(config, m_maincpu, 10_MHz_XTAL); // unknown divider
-
- /* video hardware */
- // all wrong
+ M68HC705C8A(config, m_maincpu, 10_MHz_XTAL / 4); // unknown divider
+ m_maincpu->porta_r().set(FUNC(videosaa_state::maincpu_porta_r));
+ m_maincpu->porta_w().set(FUNC(videosaa_state::maincpu_porta_w));
+ m_maincpu->portb_w().set(FUNC(videosaa_state::maincpu_portb_w));
+ m_maincpu->portc_w().set(FUNC(videosaa_state::maincpu_portc_w));
+ m_maincpu->portd_r().set(FUNC(videosaa_state::maincpu_portd_r));
+
+ // video hardware
screen_device& screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size(640, 480);
- screen.set_visarea(0, 640-1, 0, 480-1);
+ screen.set_raw(10_MHz_XTAL / 2, 320, 0, 256, 312, 0, 256); // 5 MHz?
screen.set_screen_update(FUNC(videosaa_state::screen_update));
- HD6845S(config, "crtc", 10_MHz_XTAL); // unknown divider
+ HD6845S(config, m_crtc, 10_MHz_XTAL / 16); // 0.625 MHz?
+ m_crtc->set_screen("screen");
+ m_crtc->set_show_border_area(false);
+ m_crtc->set_char_width(8);
+ m_crtc->out_vsync_callback().set_inputline(m_maincpu, M68HC05_IRQ_LINE);
- GFXDECODE(config, "gfxdecode", "palette", gfx);
+ GFXDECODE(config, m_gfxdecode, "palette", gfx);
- PALETTE(config, "palette", palette_device::RGB_3BIT);
+ PALETTE(config, "palette", FUNC(videosaa_state::videosaa_palette), 64, 8);
- /* sound hardware */
- UPD7759(config, "upd");
-}
+ // sound hardware
+ SPEAKER(config, "mono").front_center();
-/***************************************************************************
+ UPD7759(config, m_adpcm);
+ m_adpcm->add_route(ALL_OUTPUTS, "mono", 0.50);
+
+ config.set_default_layout(layout_videosaa);
+}
- Game drivers
-***************************************************************************/
+//**************************************************************************
+// ROM DEFINITIONS
+//**************************************************************************
ROM_START( jokrlady )
ROM_REGION(0x2000, "maincpu", 0)
@@ -121,7 +446,7 @@ ROM_START( jokrlady )
ROM_LOAD( "jokerlady-video1.7b", 0x2000, 0x2000, CRC(196932d8) SHA1(5130f03dd88f841a00ef328f12c6211bec377c77) )
ROM_LOAD( "jokerlady-video2.8b", 0x4000, 0x2000, CRC(58d62dbd) SHA1(cfcab2ca0c081f62185ce59e98124e2c5d368f49) )
- ROM_REGION( 0x10000, "upd", 0 )
+ ROM_REGION( 0x10000, "adpcm", 0 )
ROM_LOAD( "jokerlady-msg0.5a", 0x00000, 0x10000, NO_DUMP ) // 27512, damaged, reads weren't consistent
ROM_REGION( 0x200, "plds", 0 )
@@ -131,13 +456,14 @@ ROM_END
ROM_START( ladygum )
ROM_REGION(0x2000, "maincpu", 0)
ROM_LOAD( "68hc705-ladygum-4.0d", 0x0000, 0x2000, CRC(ea099edf) SHA1(eb0e4ccb025cf2a71d2016d501b4da11f8d21677) ) // actual label 68hc705-ladygum-#4.0d
+ ROM_FILL(0x1353, 1, 0x0f) // increase watchdog timeout, cpu core issue?
ROM_REGION( 0x6000, "gfx", 0 ) // all 27C64
ROM_LOAD( "ladygum-video0.5b", 0x0000, 0x2000, CRC(c1b72a5b) SHA1(abb9c19be474a83e4f4568a5431634ba7a61d8db) )
ROM_LOAD( "ladygum-video1.7b", 0x2000, 0x2000, CRC(70448e1f) SHA1(3c0a94284193e7d0f4efb8ffa746b9150d0119e4) )
ROM_LOAD( "ladygum-video2.8b", 0x4000, 0x2000, CRC(58d62dbd) SHA1(cfcab2ca0c081f62185ce59e98124e2c5d368f49) )
- ROM_REGION( 0x10000, "upd", 0 )
+ ROM_REGION( 0x10000, "adpcm", 0 )
ROM_LOAD( "ladygum-msg0.5a", 0x00000, 0x10000, CRC(c1f23f58) SHA1(c89579e53545291638be66e51512458b67251f67) ) // 27512
ROM_REGION( 0x200, "plds", 0 )
@@ -153,7 +479,7 @@ ROM_START( paradar )
ROM_LOAD( "paradar-video1.7b", 0x2000, 0x2000, CRC(72b05246) SHA1(65988850188915583870a7fbb23b84193c1e753d) )
ROM_LOAD( "paradar-video2.8b", 0x4000, 0x2000, CRC(b5eb61a0) SHA1(3ce63c7a68cf3e5343ceec53d477a1322e7f2929) )
- ROM_REGION( 0x10000, "upd", 0 )
+ ROM_REGION( 0x10000, "adpcm", 0 )
ROM_LOAD( "paradar-msg0.5a", 0x00000, 0x10000, CRC(81f7c0cb) SHA1(15ee0c12a8f9c94beac7e5fe894e5f82a53d9fc1) ) // 27512
ROM_REGION( 0x200, "plds", 0 )
@@ -169,14 +495,20 @@ ROM_START( winner ) // dump confirmed from 3 different PCBs
ROM_LOAD( "winner-video1.7b", 0x2000, 0x2000, CRC(caa4ef76) SHA1(2dab5bbe2a4bd60247219a9fc38cae017b81cdbf) )
ROM_LOAD( "winner-video2.8b", 0x4000, 0x2000, CRC(ed520709) SHA1(10707aa2985eea06724c1f32c55c3c6b17e57333) )
- ROM_REGION( 0x10000, "upd", 0 )
+ ROM_REGION( 0x10000, "adpcm", 0 )
ROM_LOAD( "winner-msg0.5a", 0x00000, 0x10000, CRC(81f7c0cb) SHA1(15ee0c12a8f9c94beac7e5fe894e5f82a53d9fc1) ) // 27512
ROM_REGION( 0x200, "plds", 0 )
ROM_LOAD( "palce16v8h-25pc-4.9c", 0x000, 0x117, CRC(ac0347ee) SHA1(26b27d2037400c06e63528e0e59be6d7d1a81cab) )
ROM_END
-GAME( 1995?, jokrlady, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Joker Lady", MACHINE_IS_SKELETON )
-GAME( 1995?, ladygum, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Lady Gum", MACHINE_IS_SKELETON )
-GAME( 1995?, paradar, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Paradar", MACHINE_IS_SKELETON )
-GAME( 1995?, winner, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Winner", MACHINE_IS_SKELETON )
+
+//**************************************************************************
+// SYSTEM DRIVERS
+//**************************************************************************
+
+// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROTATION COMPANY FULLNAME FLAGS
+GAME( 1995?, jokrlady, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Joker Lady", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+GAME( 1995?, ladygum, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Lady Gum", MACHINE_SUPPORTS_SAVE | MACHINE_WRONG_COLORS )
+GAME( 1995?, paradar, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Paradar", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+GAME( 1995?, winner, 0, videosaa, videosaa, videosaa_state, empty_init, ROT0, "Videos A A", "Winner", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/vis.cpp b/src/mame/drivers/vis.cpp
index 0bd0aa7dc61..d0805bedcad 100644
--- a/src/mame/drivers/vis.cpp
+++ b/src/mame/drivers/vis.cpp
@@ -446,14 +446,14 @@ READ8_MEMBER(vis_vga_device::visvgamem_r)
if(!(vga.sequencer.data[0x25] & 0x40))
return mem_r(space, offset, mem_mask);
u16 win = (vga.sequencer.data[0x1e] & 0x0f) == 3 ? m_wina : m_winb; // this doesn't seem quite right
- return mem_linear_r(space, (offset + (win * 64)) & 0x3ffff, mem_mask);
+ return mem_linear_r((offset + (win * 64)) & 0x3ffff);
}
WRITE8_MEMBER(vis_vga_device::visvgamem_w)
{
if(!(vga.sequencer.data[0x25] & 0x40))
return mem_w(space, offset, data, mem_mask);
- return mem_linear_w(space, (offset + (m_wina * 64)) & 0x3ffff, data, mem_mask);
+ return mem_linear_w((offset + (m_wina * 64)) & 0x3ffff, data);
}
READ8_MEMBER(vis_vga_device::vga_r)
diff --git a/src/mame/drivers/vp415.cpp b/src/mame/drivers/vp415.cpp
index 2205be96254..5c69ca4883a 100644
--- a/src/mame/drivers/vp415.cpp
+++ b/src/mame/drivers/vp415.cpp
@@ -222,7 +222,7 @@ WRITE8_MEMBER(vp415_state::ctrl_regs_w)
break;
case 1: // WR3
logerror("%s: ctrl_regs_w: WR3 (UPI-41): %d=%02x\n", machine().describe_context(), (offset >> 9) & 1, data);
- m_ctrlmcu->upi41_master_w(space, (offset >> 9) & 1, data);
+ m_ctrlmcu->upi41_master_w((offset >> 9) & 1, data);
break;
case 2:
logerror("%s: ctrl_regs_w: N.C. write %02x\n", machine().describe_context(), data);
@@ -244,7 +244,7 @@ READ8_MEMBER(vp415_state::ctrl_regs_r)
logerror("%s: ctrl_regs_r: RDEN: %02x\n", machine().describe_context(), value);
break;
case 1: // /RD3
- value = m_ctrlmcu->upi41_master_r(space, (offset >> 9) & 1);
+ value = m_ctrlmcu->upi41_master_r((offset >> 9) & 1);
logerror("%s: ctrl_regs_r: RD3 (UPI-41): %d (%02x)\n", machine().describe_context(), (offset >> 9) & 1, value);
break;
case 2: // /RD2
diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp
index c2d9295884b..667f2142c79 100644
--- a/src/mame/drivers/vt240.cpp
+++ b/src/mame/drivers/vt240.cpp
@@ -84,7 +84,7 @@ private:
DECLARE_WRITE8_MEMBER(patmult_w);
DECLARE_WRITE8_MEMBER(vpat_w);
DECLARE_READ16_MEMBER(vram_r);
- DECLARE_WRITE16_MEMBER(vram_w);
+ void vram_w(offs_t offset, uint16_t data);
DECLARE_READ8_MEMBER(vom_r);
DECLARE_WRITE8_MEMBER(vom_w);
DECLARE_READ8_MEMBER(nvr_store_r);
@@ -208,8 +208,8 @@ UPD7220_DISPLAY_PIXELS_MEMBER( vt240_state::hgdc_draw )
if(!BIT(m_reg0, 7))
{
- vram_w(generic_space(), address >> 1, 0);
- vram_w(generic_space(), (0x20000 + address) >> 1, 0);
+ vram_w(address >> 1, 0);
+ vram_w((0x20000 + address) >> 1, 0);
}
gfx1 = m_video_ram[(address & 0x7fff) >> 1];
@@ -386,7 +386,7 @@ READ16_MEMBER(vt240_state::vram_r)
return 0;
}
-WRITE16_MEMBER(vt240_state::vram_w)
+void vt240_state::vram_w(offs_t offset, uint16_t data)
{
uint8_t *video_ram = (uint8_t *)(&m_video_ram[0]);
offset <<= 1;
diff --git a/src/mame/drivers/vt52.cpp b/src/mame/drivers/vt52.cpp
index 369de8b2afa..89af231c04b 100644
--- a/src/mame/drivers/vt52.cpp
+++ b/src/mame/drivers/vt52.cpp
@@ -190,9 +190,9 @@ void vt52_state::vert_count_w(u8 data)
void vt52_state::uart_xd_w(u8 data)
{
if (BIT(m_data_sw->read(), 2))
- m_uart->set_transmit_data(data | 0x80);
+ m_uart->transmit(data | 0x80);
else
- m_uart->set_transmit_data(data & 0x7f);
+ m_uart->transmit(data & 0x7f);
}
void vt52_state::gated_serial_output(bool state)
diff --git a/src/mame/drivers/wangpc.cpp b/src/mame/drivers/wangpc.cpp
index 2e9e322123b..da7f603ba2e 100644
--- a/src/mame/drivers/wangpc.cpp
+++ b/src/mame/drivers/wangpc.cpp
@@ -569,7 +569,7 @@ READ8_MEMBER( wangpc_state::uart_r )
check_level2_interrupts();
- uint8_t data = m_uart->read(space, 0);
+ uint8_t data = m_uart->read();
if (LOG) logerror("%s: UART read %02x\n", machine().describe_context(), data);
@@ -608,7 +608,7 @@ WRITE8_MEMBER( wangpc_state::uart_w )
m_uart_tbre = 0;
check_level2_interrupts();
- m_uart->write(space, 0, data);
+ m_uart->write(data);
}
diff --git a/src/mame/drivers/whitestar.cpp b/src/mame/drivers/whitestar.cpp
index d09795d2da2..c7645b3b48f 100644
--- a/src/mame/drivers/whitestar.cpp
+++ b/src/mame/drivers/whitestar.cpp
@@ -2502,6 +2502,22 @@ ROM_START(strikext)
ROM_LOAD_SND_8M("sxsnda.u36", 0x100000, CRC(a0bc0edb) SHA1(1025a28fe9a0e3681e8e99b513da29ec294da045))
ROM_LOAD_SND_8M("sxsnda.u37", 0x180000, CRC(4c08c33c) SHA1(36bfad0c59fd228db76a6ff36698edd929c11336))
ROM_END
+ROM_START(strikext_100)
+ ROM_REGION(0x80000, "user1", 0)
+ ROM_LOAD("sxcpua.100", 0x00000, 0x20000, CRC(ee4742dd) SHA1(1b334f857ccb34f09eba69f3a40b589f6a712811))
+ ROM_RELOAD(0x20000, 0x20000)
+ ROM_RELOAD(0x40000, 0x20000)
+ ROM_RELOAD(0x60000, 0x20000)
+ ROM_REGION(0x80000, "dmdcpu", 0)
+ ROM_LOAD("sxdispa.103", 0x00000, 0x80000, CRC(e4cf849f) SHA1(27b61f1659762b396ca3af375e28f9c56500f79e))
+ ROM_REGION(0x010000, "soundcpu", 0)
+ ROM_LOAD("sxsnda.u7",0x0000,0x10000,CRC(e7e1a0cb) SHA1(be8b3e4d4232519db8344ae9e75f77d159bb1911))
+ ROM_REGION(0x1000000, "bsmt", 0 )
+ ROM_LOAD_SND_8M("sxsnda.u17", 0x000000, CRC(aeeed88f) SHA1(e150fd243feffcdc5d66487e840cefdfb50213da))
+ ROM_LOAD_SND_8M("sxsnda.u21", 0x080000, CRC(62c9bfe3) SHA1(14a65a673a33b7e3d3005f76acf3098dc37958f8))
+ ROM_LOAD_SND_8M("sxsnda.u36", 0x100000, CRC(a0bc0edb) SHA1(1025a28fe9a0e3681e8e99b513da29ec294da045))
+ ROM_LOAD_SND_8M("sxsnda.u37", 0x180000, CRC(4c08c33c) SHA1(36bfad0c59fd228db76a6ff36698edd929c11336))
+ROM_END
ROM_START(strknew)
ROM_REGION(0x80000, "user1", 0)
ROM_LOAD("sxcpua.102", 0x00000, 0x20000, CRC(5e5f0fb8) SHA1(1425d66064e59193ce7cacb496c12ae956670435))
@@ -3581,6 +3597,7 @@ GAME(1997, swtril41, swtril43, whitestar, whitestar, whitestar_state, em
GAME(1997, startrp, 0, whitestar, whitestar, whitestar_state, empty_init, ROT0, "Sega", "Starship Troopers (2.01)", MACHINE_IS_PINBALL)
GAME(1997, startrp2, startrp, whitestar, whitestar, whitestar_state, empty_init, ROT0, "Sega", "Starship Troopers (2.00)", MACHINE_IS_PINBALL)
GAME(2000, strikext, 0, whitestar, whitestar, whitestar_state, empty_init, ROT0, "Stern", "Striker Xtreme (1.02)", MACHINE_IS_PINBALL)
+GAME(2000, strikext_100, strikext, whitestar, whitestar, whitestar_state, empty_init, ROT0, "Stern", "Striker Xtreme (1.00)", MACHINE_IS_PINBALL)
GAME(1999, strknew, strikext, whitestarm, whitestar, whitestar_state, empty_init, ROT0, "Stern", "Striker Xtreme (ARM7 Sound Board)", MACHINE_IS_PINBALL)
GAME(2000, strxt_uk, strikext, whitestar, whitestar, whitestar_state, empty_init, ROT0, "Stern", "Striker Xtreme (1.01 UK)", MACHINE_IS_PINBALL)
GAME(2000, strxt_gr, strikext, whitestar, whitestar, whitestar_state, empty_init, ROT0, "Stern", "Striker Xtreme (1.03 Germany)", MACHINE_IS_PINBALL)
diff --git a/src/mame/drivers/wicat.cpp b/src/mame/drivers/wicat.cpp
index 03965f3fc51..d4380542985 100644
--- a/src/mame/drivers/wicat.cpp
+++ b/src/mame/drivers/wicat.cpp
@@ -630,7 +630,7 @@ READ8_MEMBER(wicat_state::videosram_r)
WRITE8_MEMBER(wicat_state::videosram_w)
{
if(!(offset & 0x01))
- m_videosram->write(space,offset/2,data);
+ m_videosram->write(offset/2,data);
}
WRITE8_MEMBER(wicat_state::videosram_store_w)
@@ -666,7 +666,7 @@ READ8_MEMBER(wicat_state::video_timer_r)
m_videouart->drr_w(1);
m_videouart->drr_w(0);
}
- return m_videouart->read(space,0);
+ return m_videouart->read();
}
return ret;
}
@@ -675,7 +675,7 @@ WRITE8_MEMBER(wicat_state::video_timer_w)
{
logerror("I/O port 0x%04x write %02x\n",offset,data);
if(offset == 0x02)
- m_videouart->write(space,0,data);
+ m_videouart->write(data);
}
READ8_MEMBER(wicat_state::video_status_r)
diff --git a/src/mame/drivers/wildpkr.cpp b/src/mame/drivers/wildpkr.cpp
index 020face7887..a5f75a822f6 100644
--- a/src/mame/drivers/wildpkr.cpp
+++ b/src/mame/drivers/wildpkr.cpp
@@ -317,8 +317,7 @@ void wildpkr_state::wildpkr_map(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x113fff).ram();
- map(0x800000, 0x800001).rw("acrtc", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x800002, 0x800003).rw("acrtc", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x800000, 0x800003).rw("acrtc", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x800080, 0x80009f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
map(0x800180, 0x800180).r(FUNC(wildpkr_state::unknown_read8));
map(0x800181, 0x800181).w(FUNC(wildpkr_state::unknown_write8));
@@ -336,8 +335,7 @@ void wildpkr_state::tabpkr_map(address_map &map)
map(0x000000, 0x2fffff).rom();
map(0x300000, 0x303fff).ram();
map(0x400000, 0x400fff).ram().w(FUNC(wildpkr_state::nvram_w)).share("nvram");
- map(0x500000, 0x500001).rw("acrtc", FUNC(hd63484_device::status16_r), FUNC(hd63484_device::address16_w));
- map(0x500002, 0x500003).rw("acrtc", FUNC(hd63484_device::data16_r), FUNC(hd63484_device::data16_w));
+ map(0x500000, 0x500003).rw("acrtc", FUNC(hd63484_device::read16), FUNC(hd63484_device::write16));
map(0x500021, 0x500021).rw("ramdac", FUNC(ramdac_device::index_r), FUNC(ramdac_device::index_w));
map(0x500023, 0x500023).rw("ramdac", FUNC(ramdac_device::pal_r), FUNC(ramdac_device::pal_w));
map(0x500025, 0x500025).rw("ramdac", FUNC(ramdac_device::mask_r), FUNC(ramdac_device::mask_w));
diff --git a/src/mame/drivers/wiping.cpp b/src/mame/drivers/wiping.cpp
index 04cf412bfc2..6c2d86abade 100644
--- a/src/mame/drivers/wiping.cpp
+++ b/src/mame/drivers/wiping.cpp
@@ -361,31 +361,31 @@ ROM_END
ROM_START( rugrats )
ROM_REGION( 0x10000, "maincpu", 0 ) /* main cpu code */
- ROM_LOAD( "rugr1d1", 0x0000, 0x2000, CRC(e7e1bd6d) SHA1(985799b1bfd001c6304e6166180745cb019f834e) )
- ROM_LOAD( "rugr2d2", 0x2000, 0x2000, CRC(5f47b9ad) SHA1(2d3eb737ea8e86691293e432e866d2623d6b6b1b) )
- ROM_LOAD( "rugr3d3", 0x4000, 0x2000, CRC(3d748d1a) SHA1(2b301119b6eb3f0f9bb2ad734cff1d25365dfe99) )
+ ROM_LOAD( "1.1d", 0x0000, 0x2000, CRC(e7e1bd6d) SHA1(985799b1bfd001c6304e6166180745cb019f834e) )
+ ROM_LOAD( "2.2d", 0x2000, 0x2000, CRC(5f47b9ad) SHA1(2d3eb737ea8e86691293e432e866d2623d6b6b1b) )
+ ROM_LOAD( "3.3d", 0x4000, 0x2000, CRC(3d748d1a) SHA1(2b301119b6eb3f0f9bb2ad734cff1d25365dfe99) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "rugr4c4", 0x0000, 0x2000, CRC(d4a92c38) SHA1(4a31cfef9f084b4d2934595155bf0f3dd589efb3) )
+ ROM_LOAD( "4.3b", 0x0000, 0x2000, CRC(d4a92c38) SHA1(4a31cfef9f084b4d2934595155bf0f3dd589efb3) )
ROM_REGION( 0x1000, "gfx1", 0 )
- ROM_LOAD( "rugr8d2", 0x0000, 0x1000, CRC(a3dcaca5) SHA1(d71f9090bf95dfd035ee0e0619a1cce575033cf3) ) /* chars */
+ ROM_LOAD( "8.2d", 0x0000, 0x1000, CRC(a3dcaca5) SHA1(d71f9090bf95dfd035ee0e0619a1cce575033cf3) ) /* chars */
ROM_REGION( 0x2000, "gfx2", 0 )
- ROM_LOAD( "rugr7c13", 0x0000, 0x2000, CRC(fe1191dd) SHA1(80ebf093f7a32f4cc9dc89dcc44cab6e3db4fca1) ) /* sprites */
+ ROM_LOAD( "7.13c", 0x0000, 0x2000, CRC(fe1191dd) SHA1(80ebf093f7a32f4cc9dc89dcc44cab6e3db4fca1) ) /* sprites */
ROM_REGION( 0x0220, "proms", 0 )
- ROM_LOAD( "prom.13g", 0x0000, 0x0020, CRC(f21238f0) SHA1(944627d1551453c7f828d96b83fd4eeb038b20ad) ) /* palette */
- ROM_LOAD( "prom.4f", 0x0020, 0x0100, CRC(cfc90f3d) SHA1(99f7dc0d14c62d4c676c96310c219c696c9a7897) ) /* char lookup table */
- ROM_LOAD( "prom.11e", 0x0120, 0x0100, CRC(cfc90f3d) SHA1(99f7dc0d14c62d4c676c96310c219c696c9a7897) ) /* sprite lookup table */
+ ROM_LOAD( "g13.13g", 0x0000, 0x0020, CRC(f21238f0) SHA1(944627d1551453c7f828d96b83fd4eeb038b20ad) ) /* palette */
+ ROM_LOAD( "eiif4.4f", 0x0020, 0x0100, CRC(cfc90f3d) SHA1(99f7dc0d14c62d4c676c96310c219c696c9a7897) ) /* char lookup table */
+ ROM_LOAD( "eiif4.11e", 0x0120, 0x0100, CRC(cfc90f3d) SHA1(99f7dc0d14c62d4c676c96310c219c696c9a7897) ) /* sprite lookup table */
ROM_REGION( 0x4000, "samples", 0 ) /* samples */
- ROM_LOAD( "rugr5c8", 0x0000, 0x2000, CRC(67bafbbf) SHA1(2085492b58ce44f61a42320c54595b79fdf7a91c) )
- ROM_LOAD( "rugr6c9", 0x2000, 0x2000, CRC(cac84a87) SHA1(90f6c514d0cdbeb4c8c979597db79ebcdf443df4) )
+ ROM_LOAD( "5.8c", 0x0000, 0x2000, CRC(67bafbbf) SHA1(2085492b58ce44f61a42320c54595b79fdf7a91c) )
+ ROM_LOAD( "6.9c", 0x2000, 0x2000, CRC(cac84a87) SHA1(90f6c514d0cdbeb4c8c979597db79ebcdf443df4) )
ROM_REGION( 0x0200, "soundproms", 0 ) /* 4bit->8bit sample expansion PROMs */
- ROM_LOAD( "wip-e8.bin", 0x0000, 0x0100, CRC(bd2c080b) SHA1(9782bb5001e96db56bc29df398187f700bce4f8e) ) /* low 4 bits */
- ROM_LOAD( "wip-e9.bin", 0x0100, 0x0100, CRC(4017a2a6) SHA1(dadef2de7a1119758c8e6d397aa42815b0218889) ) /* high 4 bits */
+ ROM_LOAD( "e8.8e", 0x0000, 0x0100, CRC(bd2c080b) SHA1(9782bb5001e96db56bc29df398187f700bce4f8e) ) /* low 4 bits */
+ ROM_LOAD( "e9.9e", 0x0100, 0x0100, CRC(4017a2a6) SHA1(dadef2de7a1119758c8e6d397aa42815b0218889) ) /* high 4 bits */
ROM_END
diff --git a/src/mame/drivers/wxstar4000.cpp b/src/mame/drivers/wxstar4000.cpp
index 4b0b1592e18..f81b5f68af5 100644
--- a/src/mame/drivers/wxstar4000.cpp
+++ b/src/mame/drivers/wxstar4000.cpp
@@ -59,6 +59,7 @@
#include "cpu/m68000/m68000.h"
#include "cpu/mcs51/mcs51.h"
#include "machine/gen_latch.h"
+#include "machine/icm7170.h"
#include "machine/nvram.h"
#include "machine/timer.h"
#include "video/bt47x.h"
@@ -76,9 +77,10 @@ public:
m_gfxsubcpu(*this, "gfxsubcpu"),
m_datacpu(*this, "datacpu"),
m_iocpu(*this, "iocpu"),
- m_mainram(*this, "extram"),
+ m_mainram(*this, "mainram"),
m_extram(*this, "extram"),
- m_vram(*this, "vram")
+ m_vram(*this, "vram"),
+ m_rtc(*this, "rtc")
{ }
void wxstar4k(machine_config &config);
@@ -102,6 +104,7 @@ private:
optional_device<m68010_device> m_maincpu, m_gfxcpu;
optional_device<mcs51_cpu_device> m_gfxsubcpu, m_datacpu, m_iocpu;
optional_shared_ptr<uint16_t> m_mainram, m_extram, m_vram;
+ required_device<icm7170_device> m_rtc;
DECLARE_READ16_MEMBER(buserr_r)
{
@@ -138,7 +141,7 @@ void wxstar4k_state::cpubd_main(address_map &map)
// FDF000 - cause IRQ 6 on graphics card
// FDF004 - cause IRQ 6 on graphics card 2 (not used)
// FDF008 - reset watchdog
- // FDFFC0-FDFFE2 - ICM7170 RTC, registers every 2 bytes
+ map(0xfdffc0, 0xfdffe3).rw(m_rtc, FUNC(icm7170_device::read), FUNC(icm7170_device::write)).umask16(0x00ff);
map(0xfe0000, 0xffffff).rom().region("maincpu", 0);
}
@@ -255,6 +258,8 @@ void wxstar4k_state::wxstar4k(machine_config &config)
screen.set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xBGR_888, 256);
+
+ ICM7170(config, m_rtc, XTAL(32'768));
}
ROM_START( wxstar4k )
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index 4737c7fc512..15a33588b9b 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -249,13 +249,13 @@ READ16_MEMBER(x68k_state::scc_r )
switch(offset)
{
case 0:
- return m_scc->reg_r(space, 0);
+ return m_scc->reg_r(0);
case 1:
return read_mouse();
case 2:
- return m_scc->reg_r(space, 1);
+ return m_scc->reg_r(1);
case 3:
- return m_scc->reg_r(space, 3);
+ return m_scc->reg_r(3);
default:
return 0xff;
}
@@ -268,7 +268,7 @@ WRITE16_MEMBER(x68k_state::scc_w )
switch(offset)
{
case 0:
- m_scc->reg_w(space, 0,(uint8_t)data);
+ m_scc->reg_w(0,(uint8_t)data);
if((m_scc->get_reg_b(5) & 0x02) != m_scc_prev)
{
if(m_scc->get_reg_b(5) & 0x02) // Request to Send
@@ -281,13 +281,13 @@ WRITE16_MEMBER(x68k_state::scc_w )
}
break;
case 1:
- m_scc->reg_w(space, 2,(uint8_t)data);
+ m_scc->reg_w(2,(uint8_t)data);
break;
case 2:
- m_scc->reg_w(space, 1,(uint8_t)data);
+ m_scc->reg_w(1,(uint8_t)data);
break;
case 3:
- m_scc->reg_w(space, 3,(uint8_t)data);
+ m_scc->reg_w(3,(uint8_t)data);
break;
}
m_scc_prev = m_scc->get_reg_b(5) & 0x02;
diff --git a/src/mame/drivers/ymtx81z.cpp b/src/mame/drivers/ymtx81z.cpp
new file mode 100644
index 00000000000..21892a615b6
--- /dev/null
+++ b/src/mame/drivers/ymtx81z.cpp
@@ -0,0 +1,160 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/****************************************************************************
+
+ Skeleton driver for Yamaha TX81Z.
+
+****************************************************************************/
+
+#include "emu.h"
+//#include "bus/midi/midi.h"
+#include "cpu/m6800/m6801.h"
+#include "machine/clock.h"
+#include "machine/nvram.h"
+#include "sound/ym2151.h"
+#include "video/hd44780.h"
+#include "emupal.h"
+#include "screen.h"
+#include "speaker.h"
+
+class ymtx81z_state : public driver_device
+{
+public:
+ ymtx81z_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ {
+ }
+
+ void tx81z(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ HD44780_PIXEL_UPDATE(lcd_pixel_update);
+ void palette_init(palette_device &palette);
+
+ void mem_map(address_map &map);
+
+ required_device<hd6303x_cpu_device> m_maincpu;
+};
+
+HD44780_PIXEL_UPDATE(ymtx81z_state::lcd_pixel_update)
+{
+ if (x < 5 && y < 8 && line < 2 && pos < 16)
+ bitmap.pix16(line * 8 + y, pos * 6 + x) = state;
+}
+
+void ymtx81z_state::palette_init(palette_device &palette)
+{
+ palette.set_pen_color(0, rgb_t(131, 136, 139));
+ palette.set_pen_color(1, rgb_t( 92, 83, 88));
+}
+
+void ymtx81z_state::machine_start()
+{
+ membank("rombank")->configure_entries(0, 2, memregion("program")->base(), 0x8000);
+}
+
+void ymtx81z_state::mem_map(address_map &map)
+{
+ map(0x0000, 0x001f).m(m_maincpu, FUNC(hd6303x_cpu_device::hd6301x_io));
+ map(0x0040, 0x00ff).ram(); // internal RAM
+ map(0x2000, 0x2001).mirror(0x1ffe).rw("ymsnd", FUNC(ym2414_device::read), FUNC(ym2414_device::write));
+ map(0x4000, 0x4001).mirror(0x1ffe).rw("lcdc", FUNC(hd44780_device::read), FUNC(hd44780_device::write));
+ map(0x6000, 0x7fff).ram().share("nvram");
+ map(0x8000, 0xffff).bankr("rombank");
+}
+
+static INPUT_PORTS_START(tx81z)
+ PORT_START("P2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) // actually cassette data
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) // actually 500 kHz clock
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) // actually MIDI In data
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Cursor")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_VOLUME_UP) PORT_NAME("Master Volume " UTF8_RIGHT)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_VOLUME_DOWN) PORT_NAME("Master Volume " UTF8_LEFT)
+
+ PORT_START("P5")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) // actually INT1 from YM2414
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON9) PORT_NAME("Store/Eq Copy")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) // actually MR from analog wait circuit tied to LCDE
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Data Entry Inc")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Data Entry Dec")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Voice Parameter " UTF8_RIGHT)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Voice Parameter " UTF8_LEFT)
+
+ PORT_START("P6")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON6) PORT_NAME("Play/Perform")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON7) PORT_NAME("Edit/Compare")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON8) PORT_NAME("Utility")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED)
+INPUT_PORTS_END
+
+void ymtx81z_state::tx81z(machine_config &config)
+{
+ HD6303X(config, m_maincpu, 7.15909_MHz_XTAL); // HD63B03XP
+ m_maincpu->set_addrmap(AS_PROGRAM, &ymtx81z_state::mem_map);
+ m_maincpu->in_p2_cb().set_ioport("P2");
+ m_maincpu->in_p5_cb().set_ioport("P5");
+ m_maincpu->in_p6_cb().set_ioport("P6");
+ m_maincpu->out_p6_cb().set_membank("rombank").bit(3);
+ m_maincpu->out_p6_cb().append_output("led1").bit(4);
+ m_maincpu->out_p6_cb().append_output("led2").bit(5);
+ m_maincpu->out_p6_cb().append_output("led3").bit(6);
+ m_maincpu->out_p6_cb().append_output("led4").bit(7);
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5564PL-15/-20 + CR2032 battery
+
+ CLOCK(config, "midiclock", 500_kHz_XTAL);
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update));
+ screen.set_size(6*16, 8*2);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", FUNC(ymtx81z_state::palette_init), 2);
+
+ hd44780_device &lcdc(HD44780(config, "lcdc", 0));
+ lcdc.set_lcd_size(2, 16);
+ lcdc.set_pixel_update_cb(FUNC(ymtx81z_state::lcd_pixel_update));
+
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ ym2414_device &ymsnd(YM2414(config, "ymsnd", 7.15909_MHz_XTAL / 2));
+ ymsnd.irq_handler().set_inputline(m_maincpu, HD6301_IRQ_LINE);
+ ymsnd.add_route(0, "lspeaker", 0.60);
+ ymsnd.add_route(1, "rspeaker", 0.60);
+}
+
+ROM_START(tx81z)
+ ROM_REGION(0x10000, "program", 0)
+ ROM_SYSTEM_BIOS(0, "last", "Last Revision")
+ ROMX_LOAD("tx81z-last-revision.ic15", 0x00000, 0x10000, CRC(2d635c40) SHA1(cae098724079d7b8a711351c3132d7332ca43751), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS(1, "v16", "Version 1.6")
+ ROMX_LOAD("tx81z-v1.6.ic15", 0x00000, 0x10000, CRC(ab9b7347) SHA1(208a72c0dc615825c442240e520a6a3c5fe860ea), ROM_BIOS(1))
+ ROM_SYSTEM_BIOS(2, "v15", "Version 1.5")
+ ROMX_LOAD("tx81z-27512-image-version-1_5.ic15", 0x00000, 0x10000, CRC(64ab615b) SHA1(82cdd8637caf3828aee5ccf25f1ed92ae5d65d3b), ROM_BIOS(2))
+ ROM_SYSTEM_BIOS(3, "v14", "Version 1.4")
+ ROMX_LOAD("tx81z-v1.4.ic15", 0x00000, 0x10000, CRC(694a13e2) SHA1(0b656a8040748f1e4ee73df2a9436fee1c724be8), ROM_BIOS(3))
+ ROM_SYSTEM_BIOS(4, "v13", "Version 1.3")
+ ROMX_LOAD("tx81z-v1.3.ic15", 0x00000, 0x10000, CRC(7abd5a61) SHA1(93ae5498ce650fe09952ca81c9ac3821f44c20dc), ROM_BIOS(4))
+ ROM_SYSTEM_BIOS(5, "v12", "Version 1.2")
+ ROMX_LOAD("tx81z-v1.2.ic15", 0x00000, 0x10000, CRC(8378f744) SHA1(d76b573d4deb67f0e1553c9c17804e970b392803), ROM_BIOS(5))
+ ROM_SYSTEM_BIOS(6, "v11", "Version 1.1")
+ ROMX_LOAD("tx81z-v1.1.ic15", 0x00000, 0x10000, CRC(3e78db9f) SHA1(52eafb9a1cb3ffb68e8b8dd7a2b85d9e607f9e1c), ROM_BIOS(6))
+ ROM_SYSTEM_BIOS(7, "v10", "Version 1.0")
+ ROMX_LOAD("tx81z-27512-image-first-version-1_0.ic15", 0x00000, 0x10000, CRC(2f9628fa) SHA1(ce62dfb9a86da092c469fd25328b5447375f5bb2), ROM_BIOS(7))
+ROM_END
+
+SYST(1987, tx81z, 0, 0, tx81z, tx81z, ymtx81z_state, empty_init, "Yamaha", "TX81Z FM Tone Generator", MACHINE_IS_SKELETON)
+//SYST(1988, dx11, 0, 0, dx11, dx11, ymtx81z_state, empty_init, "Yamaha", "DX11 Digital Programmable Algorithm Synthesizer", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/yunsung8.cpp b/src/mame/drivers/yunsung8.cpp
index 8dff608fb5a..0be817736ad 100644
--- a/src/mame/drivers/yunsung8.cpp
+++ b/src/mame/drivers/yunsung8.cpp
@@ -16,7 +16,7 @@ Sound Chips : OKI M5205 + YM3812
Year + Game Board#
---------------------------------------------------------------------------
95 Cannon Ball YS-ROCK-970712 or 940712?
-95 Magix / Rock YS-ROCK-970712
+95 Magix / Rock YS-ROCK-940712
94? Rock Tris YS-ROCK-940712
---------------------------------------------------------------------------
@@ -395,10 +395,11 @@ void yunsung8_state::yunsung8(machine_config &config)
Magix
Yun Sung, 1995
-YS-ROCK-970712
+YS-ROCK-940712
+-------------------------------------+
|VOL YM3014 6116 04|
| M5205 400KHz 03|
+| 09 |
| Z80A CXK5118PN-15L 02|
| 08 GM76C28-10 01|
| MCM2018AN45 |
@@ -411,7 +412,7 @@ YS-ROCK-970712
| U66 +--------+ 06|
| HM6264 05|
| 07 HM6264 |
-| Z80B YM3812 16MHz |
+| Z80B YM3812 10 16MHz |
+-------------------------------------+
Main CPU: Z80B
@@ -442,6 +443,10 @@ ROM_START( magix )
ROM_REGION( 0x40000, "text", 0 ) /* Text */
ROM_LOAD( "yunsung8.05", 0x00000, 0x20000, CRC(862d378c) SHA1(a4e2cf14b5b25c6b8725dd285ddea65ce9ee257a) ) // only first $8000 bytes != 0
ROM_LOAD( "yunsung8.06", 0x20000, 0x20000, CRC(8b2ab901) SHA1(1a5c05dd0cf830b645357a62d8e6e876b44c6b7f) ) // only first $8000 bytes != 0
+
+ ROM_REGION( 0x0002, "plds", 0 ) /* PAL's and GAL's */
+ ROM_LOAD( "palce20v8h.09", 0x0000, 0x0001, NO_DUMP ) /* PALCE20V8H-25PC/4 - security fuse blown */
+ ROM_LOAD( "palce20v8h.10", 0x0000, 0x0001, NO_DUMP ) /* PALCE20V8H-25PC/4 - security fuse blown */
ROM_END
/***************************************************************************
@@ -470,6 +475,10 @@ ROM_START( magixb )
ROM_REGION( 0x40000, "text", 0 ) /* Text */
ROM_LOAD( "5.bin", 0x00000, 0x20000, CRC(11b99819) SHA1(4b20feea227cefd2e905601d934538a13ba6685b) ) // only first $8000 bytes != 0
ROM_LOAD( "6.bin", 0x20000, 0x20000, CRC(361a864c) SHA1(e0bb78b49fc3d461d6ac46ad97a9d04112783132) ) // only first $8000 bytes != 0
+
+ ROM_REGION( 0x0002, "plds", 0 ) /* PAL's and GAL's */
+ ROM_LOAD( "palce20v8h.09", 0x0000, 0x0001, NO_DUMP ) /* PALCE20V8H-25PC/4 - security fuse blown */
+ ROM_LOAD( "palce20v8h.10", 0x0000, 0x0001, NO_DUMP ) /* PALCE20V8H-25PC/4 - security fuse blown */
ROM_END
diff --git a/src/mame/drivers/zac_1.cpp b/src/mame/drivers/zac_1.cpp
index bdab90b2c47..66c9207ed83 100644
--- a/src/mame/drivers/zac_1.cpp
+++ b/src/mame/drivers/zac_1.cpp
@@ -223,10 +223,7 @@ void zac_1_state::machine_reset()
TIMER_DEVICE_CALLBACK_MEMBER(zac_1_state::zac_1_inttimer)
{
if (m_t_c > 0x40)
- {
- uint8_t vector = (ioport("TEST")->read() ) ? 0x10 : 0x18;
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, vector); // S2650
- }
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
else
m_t_c++;
}
@@ -268,6 +265,7 @@ void zac_1_state::zac_1(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &zac_1_state::zac_1_data);
m_maincpu->sense_handler().set(FUNC(zac_1_state::serial_r));
m_maincpu->flag_handler().set(FUNC(zac_1_state::serial_w));
+ m_maincpu->intack_handler().set([this]() { return (ioport("TEST")->read() ) ? 0x10 : 0x18; });
NVRAM(config, "ram", nvram_device::DEFAULT_ALL_0);
diff --git a/src/mame/drivers/zac_2.cpp b/src/mame/drivers/zac_2.cpp
index 867b108feb4..0b3ea675771 100644
--- a/src/mame/drivers/zac_2.cpp
+++ b/src/mame/drivers/zac_2.cpp
@@ -192,7 +192,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(zac_2_state::zac_2_inttimer)
{
// a pulse is sent via a capacitor (similar to what one finds at a reset pin)
if (m_t_c > 0x80)
- m_maincpu->pulse_input_line_and_vector(INPUT_LINE_IRQ0, 0xbf, 2 * m_maincpu->minimum_quantum_time());
+ m_maincpu->pulse_input_line(INPUT_LINE_IRQ0, 2 * m_maincpu->minimum_quantum_time());
else
m_t_c++;
}
@@ -220,6 +220,8 @@ void zac_2_state::zac_2(machine_config &config)
m_maincpu->set_addrmap(AS_DATA, &zac_2_state::zac_2_data);
m_maincpu->sense_handler().set(FUNC(zac_2_state::serial_r));
m_maincpu->flag_handler().set(FUNC(zac_2_state::serial_w));
+ m_maincpu->intack_handler().set_constant(0xbf);
+
NVRAM(config, "ram", nvram_device::DEFAULT_ALL_0);
TIMER(config, "zac_2_inttimer").configure_periodic(FUNC(zac_2_state::zac_2_inttimer), attotime::from_hz(200));
diff --git a/src/mame/includes/abc80x.h b/src/mame/includes/abc80x.h
index a22025a9563..833a22aac74 100644
--- a/src/mame/includes/abc80x.h
+++ b/src/mame/includes/abc80x.h
@@ -306,7 +306,7 @@ public:
DECLARE_READ8_MEMBER( cli_r );
DECLARE_WRITE8_MEMBER( sso_w );
DECLARE_READ8_MEMBER( sti_r );
- DECLARE_WRITE8_MEMBER( sto_w );
+ void sto_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( keydtr_w );
DECLARE_WRITE_LINE_MEMBER( hs_w );
DECLARE_WRITE_LINE_MEMBER( vs_w );
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index 304eba01c44..13d0eb4d51f 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -454,7 +454,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( centronics_select_w );
DECLARE_READ16_MEMBER( custom_chip_r );
- DECLARE_WRITE16_MEMBER( custom_chip_w );
+ void custom_chip_w(offs_t offset, uint16_t data);
DECLARE_WRITE_LINE_MEMBER( paula_int_w );
@@ -491,11 +491,6 @@ public:
uint16_t m_agnus_id;
uint16_t m_denise_id;
- void write_custom_chip(uint16_t offset, uint16_t data, uint16_t mem_mask = 0xffff)
- {
- custom_chip_w(m_maincpu->space(AS_PROGRAM), offset, data, mem_mask);
- }
-
void blitter_setup();
void amiga_base(machine_config &config);
diff --git a/src/mame/includes/apexc.h b/src/mame/includes/apexc.h
index a1a954e9aff..e57c59f91f2 100644
--- a/src/mame/includes/apexc.h
+++ b/src/mame/includes/apexc.h
@@ -43,7 +43,7 @@ private:
void apexc_palette(palette_device &palette) const;
uint32_t screen_update_apexc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(apexc_interrupt);
- DECLARE_WRITE8_MEMBER(tape_write);
+ void tape_write(uint8_t data);
void draw_led(bitmap_ind16 &bitmap, int x, int y, int state);
void draw_char(bitmap_ind16 &bitmap, char character, int x, int y, int color);
void draw_string(bitmap_ind16 &bitmap, const char *buf, int x, int y, int color);
diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h
index adb9d2b2f27..71081755291 100644
--- a/src/mame/includes/asteroid.h
+++ b/src/mame/includes/asteroid.h
@@ -55,7 +55,7 @@ public:
DECLARE_READ8_MEMBER(earom_read);
DECLARE_WRITE8_MEMBER(earom_write);
- DECLARE_WRITE8_MEMBER(earom_control_w);
+ void earom_control_w(uint8_t data);
DECLARE_READ_LINE_MEMBER(clock_r);
diff --git a/src/mame/includes/atarist.h b/src/mame/includes/atarist.h
index cc369d40452..6d2b662f50c 100644
--- a/src/mame/includes/atarist.h
+++ b/src/mame/includes/atarist.h
@@ -86,11 +86,11 @@ public:
st_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, M68000_TAG),
+ m_ikbd(*this, HD6301V1_TAG),
m_fdc(*this, WD1772_TAG),
m_floppy(*this, WD1772_TAG ":%u", 0U),
m_mfp(*this, MC68901_TAG),
- m_acia0(*this, MC6850_0_TAG),
- m_acia1(*this, MC6850_1_TAG),
+ m_acia(*this, {MC6850_0_TAG, MC6850_1_TAG}),
m_centronics(*this, CENTRONICS_TAG),
m_cart(*this, "cartslot"),
m_ram(*this, RAM_TAG),
@@ -128,12 +128,17 @@ public:
m_led(*this, "led1")
{ }
+ DECLARE_WRITE_LINE_MEMBER( write_monochrome );
+
+ void st(machine_config &config);
+
+protected:
required_device<m68000_base_device> m_maincpu;
+ required_device<cpu_device> m_ikbd;
required_device<wd1772_device> m_fdc;
required_device_array<floppy_connector, 2> m_floppy;
required_device<mc68901_device> m_mfp;
- required_device<acia6850_device> m_acia0;
- required_device<acia6850_device> m_acia1;
+ required_device_array<acia6850_device, 2> m_acia;
required_device<centronics_device> m_centronics;
required_device<generic_slot_device> m_cart;
required_device<ram_device> m_ram;
@@ -238,7 +243,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( ikbd_tx_w );
- DECLARE_WRITE_LINE_MEMBER( write_acia_clock );
+ DECLARE_WRITE_LINE_MEMBER( reset_w );
void toggle_dma_fifo();
void flush_dma_fifo();
@@ -327,14 +332,11 @@ public:
int m_monochrome;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
- DECLARE_WRITE_LINE_MEMBER( write_monochrome );
void common(machine_config &config);
- void st(machine_config &config);
void ikbd_map(address_map &map);
void cpu_space_map(address_map &map);
void st_map(address_map &map);
-protected:
void keyboard(machine_config &config);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h
index de9365839bd..0d91d97ede7 100644
--- a/src/mame/includes/btime.h
+++ b/src/mame/includes/btime.h
@@ -141,6 +141,7 @@ public:
void mmonkey(machine_config &config);
void bnj(machine_config &config);
void cookrace(machine_config &config);
+ void protenn(machine_config &config);
void wtennis(machine_config &config);
void sdtennis(machine_config &config);
void tisland(machine_config &config);
@@ -154,6 +155,7 @@ public:
void disco_map(address_map &map);
void lnc_map(address_map &map);
void mmonkey_map(address_map &map);
+ void protenn_map(address_map &map);
void tisland_map(address_map &map);
void zoar_map(address_map &map);
};
diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h
index 617ab7db620..5c008dbc16a 100644
--- a/src/mame/includes/bublbobl.h
+++ b/src/mame/includes/bublbobl.h
@@ -91,9 +91,9 @@ public:
void common_sreset(int state);
- DECLARE_WRITE8_MEMBER(bublbobl_bankswitch_w);
- DECLARE_WRITE8_MEMBER(tokio_bankswitch_w);
- DECLARE_WRITE8_MEMBER(tokio_videoctrl_w);
+ void bublbobl_bankswitch_w(uint8_t data);
+ void tokio_bankswitch_w(uint8_t data);
+ void tokio_videoctrl_w(uint8_t data);
DECLARE_WRITE8_MEMBER(bublbobl_nmitrigger_w);
DECLARE_READ8_MEMBER(tokiob_mcu_r);
DECLARE_WRITE8_MEMBER(bublbobl_soundcpu_reset_w);
diff --git a/src/mame/includes/bwidow.h b/src/mame/includes/bwidow.h
index 8484bc6e014..5bdea57a1eb 100644
--- a/src/mame/includes/bwidow.h
+++ b/src/mame/includes/bwidow.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE8_MEMBER(irq_ack_w);
DECLARE_READ8_MEMBER(earom_read);
DECLARE_WRITE8_MEMBER(earom_write);
- DECLARE_WRITE8_MEMBER(earom_control_w);
+ void earom_control_w(uint8_t data);
void bwidow_map(address_map &map);
void bwidowp_map(address_map &map);
diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h
index d509a5aa203..1591809daf7 100644
--- a/src/mame/includes/cave.h
+++ b/src/mame/includes/cave.h
@@ -100,6 +100,14 @@ protected:
virtual void device_post_load() override;
private:
+
+ enum
+ {
+ TYPE_ZOOM = 0,
+ TYPE_NOZOOM = 1,
+ TYPE_ISPWRINST2 = 2
+ };
+
void (cave_state::*m_get_sprite_info)(int chip);
void (cave_state::*m_sprite_draw)(int chip, int priority);
@@ -116,6 +124,7 @@ private:
void soundlatch_ack_w(u8 data);
void gaia_coin_w(u8 data);
u16 donpachi_videoregs_r(offs_t offset);
+ template<int Chip> void videoregs_w(offs_t offset, u16 data, u16 mem_mask);
void korokoro_leds_w(offs_t offset, u16 data, u16 mem_mask);
template<int Chip> void pwrinst2_vctrl_w(offs_t offset, u16 data, u16 mem_mask);
u16 sailormn_input0_r();
@@ -246,6 +255,7 @@ private:
u16 m_sprite_base_pal;
u16 m_sprite_granularity;
+ u32 m_max_sprite_clk[4]; // max usable clock for sprites
/* misc */
int m_time_vblank_irq;
diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h
index c9b57d2c9c8..be9dc38a15b 100644
--- a/src/mame/includes/centiped.h
+++ b/src/mame/includes/centiped.h
@@ -98,7 +98,7 @@ private:
DECLARE_WRITE_LINE_MEMBER(bullsdrt_coin_count_w);
DECLARE_READ8_MEMBER(earom_read);
DECLARE_WRITE8_MEMBER(earom_write);
- DECLARE_WRITE8_MEMBER(earom_control_w);
+ void earom_control_w(uint8_t data);
DECLARE_READ8_MEMBER(caterplr_unknown_r);
DECLARE_WRITE8_MEMBER(caterplr_AY8910_w);
DECLARE_READ8_MEMBER(caterplr_AY8910_r);
diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h
index b6bc976e0b9..7d9bda9d32c 100644
--- a/src/mame/includes/champbas.h
+++ b/src/mame/includes/champbas.h
@@ -52,8 +52,6 @@ public:
protected:
// handlers
DECLARE_WRITE_LINE_MEMBER(irq_enable_w);
- DECLARE_WRITE_LINE_MEMBER(mcu_switch_w);
- DECLARE_WRITE_LINE_MEMBER(mcu_start_w);
DECLARE_READ8_MEMBER(champbja_protection_r);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
diff --git a/src/mame/includes/cninja.h b/src/mame/includes/cninja.h
index c0a07a7999e..a88f1b979bc 100644
--- a/src/mame/includes/cninja.h
+++ b/src/mame/includes/cninja.h
@@ -81,6 +81,7 @@ public:
DECO16IC_BANK_CB_MEMBER(mutantf_2_bank_callback);
DECOSPR_PRIORITY_CB_MEMBER(pri_callback);
+ u16 robocop2_mix_callback(u16 p, u16 p2);
DECLARE_READ16_MEMBER( edrandy_protection_region_6_146_r );
DECLARE_WRITE16_MEMBER( edrandy_protection_region_6_146_w );
diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h
index 05404550052..5ed60fd5abb 100644
--- a/src/mame/includes/dec8.h
+++ b/src/mame/includes/dec8.h
@@ -136,7 +136,7 @@ private:
DECLARE_WRITE8_MEMBER(dec8_i8751_w);
DECLARE_WRITE8_MEMBER(csilver_i8751_w);
DECLARE_WRITE8_MEMBER(dec8_bank_w);
- DECLARE_WRITE8_MEMBER(ghostb_bank_w);
+ void ghostb_bank_w(uint8_t data);
DECLARE_WRITE8_MEMBER(csilver_control_w);
DECLARE_WRITE8_MEMBER(dec8_sound_w);
DECLARE_WRITE8_MEMBER(csilver_adpcm_data_w);
diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h
index afda3b5b7ea..8f6d2baca09 100644
--- a/src/mame/includes/deco32.h
+++ b/src/mame/includes/deco32.h
@@ -123,6 +123,7 @@ private:
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void tile_callback(u32 &tile, u32 &colour, int layer, bool is_8x8);
DECO16IC_BANK_CB_MEMBER(bank_callback);
DECOSPR_PRIORITY_CB_MEMBER(captaven_pri_callback);
@@ -193,6 +194,7 @@ private:
u16 port_b_tattass();
DECO16IC_BANK_CB_MEMBER(bank_callback);
+ u16 mix_callback(u16 p, u16 p2);
void nslasher_map(address_map &map);
void tattass_map(address_map &map);
diff --git a/src/mame/includes/dgnalpha.h b/src/mame/includes/dgnalpha.h
index eea5ddf2af0..d5bb5b3078f 100644
--- a/src/mame/includes/dgnalpha.h
+++ b/src/mame/includes/dgnalpha.h
@@ -44,10 +44,7 @@ public:
m_pia_2(*this, PIA2_TAG),
m_ay8912(*this, AY8912_TAG),
m_fdc(*this, WD2797_TAG),
- m_floppy0(*this, WD2797_TAG ":0"),
- m_floppy1(*this, WD2797_TAG ":1"),
- m_floppy2(*this, WD2797_TAG ":2"),
- m_floppy3(*this, WD2797_TAG ":3")
+ m_floppy(*this, WD2797_TAG ":%u", 0U)
{
}
@@ -84,12 +81,7 @@ private:
required_device<pia6821_device> m_pia_2;
required_device<ay8912_device> m_ay8912;
required_device<wd2797_device> m_fdc;
- required_device<floppy_connector> m_floppy0;
- required_device<floppy_connector> m_floppy1;
- required_device<floppy_connector> m_floppy2;
- required_device<floppy_connector> m_floppy3;
-
- uint8_t m_just_reset;
+ required_device_array<floppy_connector, 4> m_floppy;
/* modem */
uint8_t modem_r(offs_t offset);
diff --git a/src/mame/includes/digdug.h b/src/mame/includes/digdug.h
index 9c7258544a6..313ebb05ddb 100644
--- a/src/mame/includes/digdug.h
+++ b/src/mame/includes/digdug.h
@@ -47,7 +47,7 @@ private:
DECLARE_READ8_MEMBER(earom_read);
DECLARE_WRITE8_MEMBER(earom_write);
- DECLARE_WRITE8_MEMBER(earom_control_w);
+ void earom_control_w(uint8_t data);
virtual void machine_start() override;
void digdug_map(address_map &map);
diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h
index 8a98fd8e46f..00aee2d5df8 100644
--- a/src/mame/includes/equites.h
+++ b/src/mame/includes/equites.h
@@ -32,7 +32,6 @@ public:
m_bg_videoram(*this, "bg_videoram"),
m_spriteram(*this, "spriteram"),
m_spriteram_2(*this, "spriteram_2"),
- m_mcuram(*this, "mcuram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_audio8155(*this, "audio8155"),
@@ -41,7 +40,6 @@ public:
m_palette(*this, "palette"),
m_screen(*this, "screen"),
m_alpha_8201(*this, "alpha_8201"),
- m_fakemcu(*this, "mcu"),
m_msm(*this, "msm"),
m_dac_1(*this, "dac1"),
m_dac_2(*this, "dac2"),
@@ -54,7 +52,6 @@ public:
std::unique_ptr<uint8_t[]> m_fg_videoram; // 8bits
required_shared_ptr<uint16_t> m_spriteram;
optional_shared_ptr<uint16_t> m_spriteram_2;
- optional_shared_ptr<uint8_t> m_mcuram;
/* video-related */
tilemap_t *m_fg_tilemap;
@@ -84,7 +81,6 @@ public:
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
required_device<alpha_8201_device> m_alpha_8201;
- optional_device<cpu_device> m_fakemcu;
required_device<msm5232_device> m_msm;
required_device<dac_byte_interface> m_dac_1;
required_device<dac_byte_interface> m_dac_2;
@@ -99,10 +95,6 @@ public:
DECLARE_WRITE8_MEMBER(equites_8155_portc_w);
DECLARE_READ16_MEMBER(equites_spriteram_kludge_r);
DECLARE_WRITE8_MEMBER(mainlatch_w);
- DECLARE_READ8_MEMBER(mcu_ram_r);
- DECLARE_WRITE8_MEMBER(mcu_ram_w);
- DECLARE_WRITE_LINE_MEMBER(mcu_start_w);
- DECLARE_WRITE_LINE_MEMBER(mcu_switch_w);
DECLARE_READ8_MEMBER(equites_fg_videoram_r);
DECLARE_WRITE8_MEMBER(equites_fg_videoram_w);
DECLARE_WRITE16_MEMBER(equites_bg_videoram_w);
@@ -127,6 +119,7 @@ public:
void unpack_block(const char *region, int offset, int size);
void unpack_region(const char *region);
void equites(machine_config &config);
+ void bngotime(machine_config &config);
protected:
virtual void machine_start() override;
@@ -134,7 +127,6 @@ protected:
void common_sound(machine_config &config);
void equites_map(address_map &map);
void equites_common_map(address_map &map);
- void mcu_map(address_map &map);
void sound_map(address_map &map);
void sound_portmap(address_map &map);
};
@@ -144,7 +136,6 @@ class gekisou_state : public equites_state
public:
using equites_state::equites_state;
DECLARE_READ_LINE_MEMBER(gekisou_unknown_bit_r);
- void bngotime(machine_config &config);
void gekisou(machine_config &config);
protected:
@@ -163,7 +154,6 @@ public:
using equites_state::equites_state;
void init_splndrbt();
void splndrbt(machine_config &config);
- void hvoltage(machine_config &config);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/freekick.h b/src/mame/includes/freekick.h
index c7ecc6d8397..72b120d20ff 100644
--- a/src/mame/includes/freekick.h
+++ b/src/mame/includes/freekick.h
@@ -22,6 +22,7 @@ public:
void base(machine_config &config);
void oigas(machine_config &config);
void pbillrd(machine_config &config);
+ void pbillrdbl(machine_config &config);
void gigas(machine_config &config);
void gigasm(machine_config &config);
void pbillrdm(machine_config &config);
@@ -30,6 +31,7 @@ public:
void init_gigas();
void init_gigasb();
+ void init_pbillrdbl();
void init_pbillrds();
private:
@@ -95,4 +97,5 @@ private:
void omega_io_map(address_map &map);
void omega_map(address_map &map);
void pbillrd_map(address_map &map);
+ void pbillrdbl_map(address_map &map);
};
diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h
index c204c01099c..3949ac17a24 100644
--- a/src/mame/includes/galaxold.h
+++ b/src/mame/includes/galaxold.h
@@ -222,7 +222,7 @@ public:
TIMER_CALLBACK_MEMBER(stars_blink_callback);
TIMER_CALLBACK_MEMBER(stars_scroll_callback);
TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer);
- IRQ_CALLBACK_MEMBER(hunchbkg_irq_callback);
+ uint8_t hunchbkg_intack();
void state_save_register();
void video_start_common();
diff --git a/src/mame/includes/gb.h b/src/mame/includes/gb.h
index 50ead96a8d1..a00f34824bd 100644
--- a/src/mame/includes/gb.h
+++ b/src/mame/includes/gb.h
@@ -65,7 +65,7 @@ public:
bool m_bios_disable;
- DECLARE_WRITE8_MEMBER(gb_io_w);
+ void gb_io_w(offs_t offset, uint8_t data);
DECLARE_WRITE8_MEMBER(gb_io2_w);
DECLARE_WRITE8_MEMBER(sgb_io_w);
DECLARE_READ8_MEMBER(gb_ie_r);
diff --git a/src/mame/includes/hh_sm510.h b/src/mame/includes/hh_sm510.h
index 707a98f49a4..67de09dcbc6 100644
--- a/src/mame/includes/hh_sm510.h
+++ b/src/mame/includes/hh_sm510.h
@@ -55,7 +55,7 @@ protected:
virtual void update_k_line();
virtual DECLARE_WRITE16_MEMBER(sm510_lcd_segment_w);
virtual DECLARE_WRITE16_MEMBER(sm500_lcd_segment_w);
- virtual DECLARE_READ8_MEMBER(input_r);
+ virtual u8 input_r();
virtual DECLARE_WRITE8_MEMBER(input_w);
virtual DECLARE_WRITE8_MEMBER(piezo_r1_w);
virtual DECLARE_WRITE8_MEMBER(piezo_r2_w);
diff --git a/src/mame/includes/irobot.h b/src/mame/includes/irobot.h
index 37e68472445..6a650bf25b8 100644
--- a/src/mame/includes/irobot.h
+++ b/src/mame/includes/irobot.h
@@ -65,9 +65,9 @@ private:
DECLARE_WRITE8_MEMBER(irobot_clearfirq_w);
DECLARE_READ8_MEMBER(irobot_sharedmem_r);
DECLARE_WRITE8_MEMBER(irobot_sharedmem_w);
- DECLARE_WRITE8_MEMBER(irobot_statwr_w);
- DECLARE_WRITE8_MEMBER(irobot_out0_w);
- DECLARE_WRITE8_MEMBER(irobot_rom_banksel_w);
+ void irobot_statwr_w(uint8_t data);
+ void irobot_out0_w(uint8_t data);
+ void irobot_rom_banksel_w(uint8_t data);
DECLARE_READ8_MEMBER(irobot_status_r);
DECLARE_WRITE8_MEMBER(irobot_paletteram_w);
DECLARE_READ8_MEMBER(quad_pokeyn_r);
diff --git a/src/mame/includes/jack.h b/src/mame/includes/jack.h
index 07e118fb7a6..ff3a62715fb 100644
--- a/src/mame/includes/jack.h
+++ b/src/mame/includes/jack.h
@@ -69,7 +69,7 @@ private:
int m_remap_address[16];
IRQ_CALLBACK_MEMBER(jack_sh_irq_ack);
- DECLARE_WRITE8_MEMBER(joinem_control_w);
+ void joinem_control_w(uint8_t data);
DECLARE_WRITE8_MEMBER(joinem_scroll_w);
DECLARE_READ8_MEMBER(striv_question_r);
DECLARE_WRITE8_MEMBER(jack_videoram_w);
diff --git a/src/mame/includes/legionna.h b/src/mame/includes/legionna.h
index 518e2c96670..177bfd28cc9 100644
--- a/src/mame/includes/legionna.h
+++ b/src/mame/includes/legionna.h
@@ -8,7 +8,7 @@
#include "sound/okim6295.h"
#include "audio/seibu.h"
#include "machine/gen_latch.h"
-#include "machine/seibucop/seibucop.h"
+#include "machine/seibucop.h"
#include "video/seibu_crtc.h"
#include "emupal.h"
#include "tilemap.h"
diff --git a/src/mame/includes/lynx.h b/src/mame/includes/lynx.h
index dad968322fe..01d10bb5a1d 100644
--- a/src/mame/includes/lynx.h
+++ b/src/mame/includes/lynx.h
@@ -178,7 +178,7 @@ private:
DECLARE_READ8_MEMBER(mikey_read);
DECLARE_WRITE8_MEMBER(mikey_write);
DECLARE_READ8_MEMBER(lynx_memory_config_r);
- DECLARE_WRITE8_MEMBER(lynx_memory_config_w);
+ void lynx_memory_config_w(uint8_t data);
void lynx_divide();
void lynx_multiply();
uint8_t lynx_timer_read(int which, int offset);
diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h
index f67c2aa363b..73c895c308a 100644
--- a/src/mame/includes/malzak.h
+++ b/src/mame/includes/malzak.h
@@ -15,6 +15,7 @@
#include "video/saa5050.h"
#include "emupal.h"
#include "screen.h"
+#include "tilemap.h"
class malzak_state : public driver_device
{
@@ -48,13 +49,6 @@ private:
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_memory_bank m_mainbank;
- /* misc */
-// int playfield_x[256];
-// int playfield_y[256];
- int m_playfield_code[256];
- int m_malzak_x;
- int m_malzak_y;
- int m_collision_counter;
DECLARE_READ8_MEMBER(fake_VRLE_r);
DECLARE_READ8_MEMBER(s2636_portA_r);
@@ -63,16 +57,27 @@ private:
DECLARE_WRITE8_MEMBER(port60_w);
DECLARE_WRITE8_MEMBER(portc0_w);
DECLARE_READ8_MEMBER(collision_r);
- DECLARE_WRITE8_MEMBER(malzak_playfield_w);
+ DECLARE_WRITE8_MEMBER(playfield_w);
DECLARE_READ8_MEMBER(videoram_r);
- void malzak_palette(palette_device &palette) const;
+ void palette_init(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ virtual void video_start() override;
void malzak2_map(address_map &map);
void malzak_data_map(address_map &map);
void malzak_io_map(address_map &map);
void malzak_map(address_map &map);
+
+ TILE_GET_INFO_MEMBER(get_tile_info);
+ std::unique_ptr<bitmap_rgb32> m_trom_bitmap;
+ std::unique_ptr<bitmap_rgb32> m_playfield_bitmap;
+ tilemap_t *m_playfield_tilemap;
+ int m_playfield_code[256];
+ int m_scrollx;
+ int m_scrolly;
+ int m_collision_counter;
+ u8 m_playfield_bank;
};
#endif // MAME_INCLUDES_MALZAK_H
diff --git a/src/mame/includes/mbee.h b/src/mame/includes/mbee.h
index 0aaa193cdcf..cc8fd0fa0fe 100644
--- a/src/mame/includes/mbee.h
+++ b/src/mame/includes/mbee.h
@@ -109,7 +109,7 @@ private:
DECLARE_WRITE8_MEMBER(video_low_w);
DECLARE_WRITE8_MEMBER(video_high_w);
DECLARE_WRITE8_MEMBER(pio_port_b_w);
- DECLARE_READ8_MEMBER(pio_port_b_r);
+ uint8_t pio_port_b_r();
DECLARE_WRITE_LINE_MEMBER(pio_ardy);
DECLARE_WRITE_LINE_MEMBER(crtc_vs);
DECLARE_READ8_MEMBER(fdc_status_r);
diff --git a/src/mame/includes/mcr.h b/src/mame/includes/mcr.h
index 15e3a1cc098..64b0397e968 100644
--- a/src/mame/includes/mcr.h
+++ b/src/mame/includes/mcr.h
@@ -48,27 +48,27 @@ public:
m_palette(*this, "palette")
{ }
- DECLARE_WRITE8_MEMBER(mcr_control_port_w);
- DECLARE_WRITE8_MEMBER(mcr_paletteram9_w);
- DECLARE_WRITE8_MEMBER(mcr_90009_videoram_w);
- DECLARE_WRITE8_MEMBER(mcr_90010_videoram_w);
- DECLARE_READ8_MEMBER(twotiger_videoram_r);
- DECLARE_WRITE8_MEMBER(twotiger_videoram_w);
- DECLARE_WRITE8_MEMBER(mcr_91490_videoram_w);
- DECLARE_READ8_MEMBER(solarfox_ip0_r);
- DECLARE_READ8_MEMBER(solarfox_ip1_r);
- DECLARE_READ8_MEMBER(kick_ip1_r);
- DECLARE_WRITE8_MEMBER(wacko_op4_w);
- DECLARE_READ8_MEMBER(wacko_ip1_r);
- DECLARE_READ8_MEMBER(wacko_ip2_r);
- DECLARE_READ8_MEMBER(kroozr_ip1_r);
- DECLARE_WRITE8_MEMBER(kroozr_op4_w);
- DECLARE_WRITE8_MEMBER(journey_op4_w);
- DECLARE_WRITE8_MEMBER(twotiger_op4_w);
- DECLARE_WRITE8_MEMBER(dotron_op4_w);
- DECLARE_READ8_MEMBER(demoderb_ip1_r);
- DECLARE_READ8_MEMBER(demoderb_ip2_r);
- DECLARE_WRITE8_MEMBER(demoderb_op4_w);
+ void mcr_control_port_w(uint8_t data);
+ void mcr_paletteram9_w(offs_t offset, uint8_t data);
+ void mcr_90009_videoram_w(offs_t offset, uint8_t data);
+ void mcr_90010_videoram_w(offs_t offset, uint8_t data);
+ uint8_t twotiger_videoram_r(offs_t offset);
+ void twotiger_videoram_w(offs_t offset, uint8_t data);
+ void mcr_91490_videoram_w(offs_t offset, uint8_t data);
+ uint8_t solarfox_ip0_r();
+ uint8_t solarfox_ip1_r();
+ uint8_t kick_ip1_r();
+ void wacko_op4_w(uint8_t data);
+ uint8_t wacko_ip1_r();
+ uint8_t wacko_ip2_r();
+ uint8_t kroozr_ip1_r();
+ void kroozr_op4_w(uint8_t data);
+ void journey_op4_w(uint8_t data);
+ void twotiger_op4_w(uint8_t data);
+ void dotron_op4_w(uint8_t data);
+ uint8_t demoderb_ip1_r();
+ uint8_t demoderb_ip2_r();
+ void demoderb_op4_w(uint8_t data);
void init_mcr_91490();
void init_kroozr();
@@ -150,11 +150,11 @@ public:
m_lamps(*this, "lamp%u", 0U)
{ }
- DECLARE_READ8_MEMBER(ip0_r);
- DECLARE_WRITE8_MEMBER(lamps1_w);
- DECLARE_WRITE8_MEMBER(lamps2_w);
- DECLARE_WRITE8_MEMBER(output_w);
- DECLARE_WRITE8_MEMBER(meters_w);
+ uint8_t ip0_r();
+ void lamps1_w(uint8_t data);
+ void lamps2_w(uint8_t data);
+ void output_w(uint8_t data);
+ void meters_w(uint8_t data);
DECLARE_INPUT_CHANGED_MEMBER(coin_in_hit);
@@ -191,11 +191,11 @@ public:
DECLARE_WRITE_LINE_MEMBER(sio_txda_w);
DECLARE_WRITE_LINE_MEMBER(sio_txdb_w);
- DECLARE_WRITE8_MEMBER(ipu_laserdisk_w);
- DECLARE_READ8_MEMBER(ipu_watchdog_r);
- DECLARE_WRITE8_MEMBER(ipu_watchdog_w);
- DECLARE_READ8_MEMBER(ip2_r);
- DECLARE_WRITE8_MEMBER(op4_w);
+ void ipu_laserdisk_w(offs_t offset, uint8_t data);
+ uint8_t ipu_watchdog_r();
+ void ipu_watchdog_w(uint8_t data);
+ uint8_t ip2_r();
+ void op4_w(uint8_t data);
TIMER_CALLBACK_MEMBER(ipu_watchdog_reset);
TIMER_DEVICE_CALLBACK_MEMBER(ipu_interrupt);
diff --git a/src/mame/includes/mcr3.h b/src/mame/includes/mcr3.h
index 14a3129c9c6..5916e77fb59 100644
--- a/src/mame/includes/mcr3.h
+++ b/src/mame/includes/mcr3.h
@@ -23,78 +23,59 @@ public:
mcr3_state(const machine_config &mconfig, device_type type, const char *tag)
: mcr_state(mconfig, type, tag)
, m_spyhunt_alpharam(*this, "spyhunt_alpha")
- , m_maxrpm_adc(*this, "adc")
- , m_lamplatch(*this, "lamplatch")
, m_screen(*this, "screen")
, m_lamps(*this, "lamp%u", 0U)
{ }
- DECLARE_WRITE8_MEMBER(mcr3_videoram_w);
- DECLARE_WRITE8_MEMBER(spyhunt_videoram_w);
- DECLARE_WRITE8_MEMBER(spyhunt_alpharam_w);
- DECLARE_WRITE8_MEMBER(spyhunt_scroll_value_w);
- DECLARE_WRITE8_MEMBER(mcrmono_control_port_w);
- DECLARE_READ8_MEMBER(demoderm_ip1_r);
- DECLARE_READ8_MEMBER(demoderm_ip2_r);
- DECLARE_WRITE8_MEMBER(demoderm_op6_w);
- DECLARE_READ8_MEMBER(maxrpm_ip1_r);
- DECLARE_READ8_MEMBER(maxrpm_ip2_r);
- DECLARE_WRITE8_MEMBER(maxrpm_op5_w);
- DECLARE_WRITE8_MEMBER(maxrpm_op6_w);
- DECLARE_READ8_MEMBER(rampage_ip4_r);
- DECLARE_WRITE8_MEMBER(rampage_op6_w);
- DECLARE_READ8_MEMBER(powerdrv_ip2_r);
- DECLARE_WRITE8_MEMBER(powerdrv_op5_w);
- DECLARE_WRITE8_MEMBER(powerdrv_op6_w);
- DECLARE_READ8_MEMBER(stargrds_ip0_r);
- DECLARE_WRITE8_MEMBER(stargrds_op5_w);
- DECLARE_WRITE8_MEMBER(stargrds_op6_w);
- DECLARE_READ8_MEMBER(spyhunt_ip1_r);
- DECLARE_READ8_MEMBER(spyhunt_ip2_r);
- DECLARE_WRITE8_MEMBER(spyhunt_op4_w);
- DECLARE_READ8_MEMBER(turbotag_ip2_r);
- DECLARE_READ8_MEMBER(turbotag_kludge_r);
+ void mcrmono(machine_config &config);
+ void mono_tcs(machine_config &config);
+ void mcrscroll(machine_config &config);
+ void mono_sg(machine_config &config);
+
void init_crater();
void init_demoderm();
- void init_turbotag();
void init_powerdrv();
void init_stargrds();
- void init_maxrpm();
void init_rampage();
- void init_spyhunt();
void init_sarge();
+
+protected:
+ void mcr3_videoram_w(offs_t offset, uint8_t data);
+ void spyhunt_videoram_w(offs_t offset, uint8_t data);
+ void spyhunt_alpharam_w(offs_t offset, uint8_t data);
+ void spyhunt_scroll_value_w(offs_t offset, uint8_t data);
+ void mcrmono_control_port_w(uint8_t data);
+ uint8_t demoderm_ip1_r();
+ uint8_t demoderm_ip2_r();
+ void demoderm_op6_w(uint8_t data);
+ uint8_t rampage_ip4_r();
+ void rampage_op6_w(uint8_t data);
+ uint8_t powerdrv_ip2_r();
+ void powerdrv_op5_w(uint8_t data);
+ void powerdrv_op6_w(uint8_t data);
+ uint8_t stargrds_ip0_r();
+ void stargrds_op5_w(uint8_t data);
+ void stargrds_op6_w(uint8_t data);
+
DECLARE_VIDEO_START(spyhunt);
void spyhunt_palette(palette_device &palette) const;
uint32_t screen_update_mcr3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_spyhunt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void mcrmono(machine_config &config);
- void maxrpm(machine_config &config);
- void mcrsc_csd(machine_config &config);
- void mono_tcs(machine_config &config);
- void mcrscroll(machine_config &config);
- void mono_sg(machine_config &config);
void mcrmono_map(address_map &map);
void mcrmono_portmap(address_map &map);
void spyhunt_map(address_map &map);
void spyhunt_portmap(address_map &map);
-protected:
+
virtual void machine_start() override { m_lamps.resolve(); }
virtual void video_start() override;
-private:
optional_shared_ptr<uint8_t> m_spyhunt_alpharam;
- optional_device<adc0844_device> m_maxrpm_adc;
- optional_device<cd4099_device> m_lamplatch;
required_device<screen_device> m_screen;
output_finder<3> m_lamps;
uint8_t m_latched_input;
- uint8_t m_maxrpm_adc_control;
- uint8_t m_maxrpm_last_shift;
- int8_t m_maxrpm_p1_shift;
- int8_t m_maxrpm_p2_shift;
uint8_t m_spyhunt_sprite_color_mask;
int16_t m_spyhunt_scroll_offset;
int16_t m_spyhunt_scrollx;
@@ -109,4 +90,53 @@ private:
void mcr_common_init();
};
+class maxrpm_state : public mcr3_state
+{
+public:
+ maxrpm_state(const machine_config &mconfig, device_type type, const char *tag)
+ : mcr3_state(mconfig, type, tag)
+ , m_maxrpm_adc(*this, "adc")
+ { }
+
+ void maxrpm(machine_config &config);
+
+ void init_maxrpm();
+
+private:
+ uint8_t maxrpm_ip1_r();
+ uint8_t maxrpm_ip2_r();
+ void maxrpm_op5_w(uint8_t data);
+ void maxrpm_op6_w(uint8_t data);
+
+ required_device<adc0844_device> m_maxrpm_adc;
+
+ uint8_t m_maxrpm_adc_control;
+ uint8_t m_maxrpm_last_shift;
+ int8_t m_maxrpm_p1_shift;
+ int8_t m_maxrpm_p2_shift;
+};
+
+class mcrsc_csd_state : public mcr3_state
+{
+public:
+ mcrsc_csd_state(const machine_config &mconfig, device_type type, const char *tag)
+ : mcr3_state(mconfig, type, tag)
+ , m_lamplatch(*this, "lamplatch")
+ { }
+
+ void mcrsc_csd(machine_config &config);
+
+ void init_spyhunt();
+ void init_turbotag();
+
+private:
+ uint8_t spyhunt_ip1_r();
+ uint8_t spyhunt_ip2_r();
+ void spyhunt_op4_w(uint8_t data);
+ uint8_t turbotag_ip2_r();
+ uint8_t turbotag_kludge_r();
+
+ optional_device<cd4099_device> m_lamplatch;
+};
+
#endif // MAME_INCLUDES_MCR3_H
diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h
index 5e7d714afa7..010a1f3cc40 100644
--- a/src/mame/includes/nmk16.h
+++ b/src/mame/includes/nmk16.h
@@ -153,6 +153,7 @@ protected:
void mustang_scroll_w(u16 data);
void raphero_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
template<unsigned Layer> void scroll_w(offs_t offset, u8 data);
+ void bjtwin_scroll_w(offs_t offset, u8 data);
void vandyke_scroll_w(offs_t offset, u16 data);
void vandykeb_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void manybloc_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
diff --git a/src/mame/includes/pacman.h b/src/mame/includes/pacman.h
index fc45c05f8fc..2e2ed18dfd8 100644
--- a/src/mame/includes/pacman.h
+++ b/src/mame/includes/pacman.h
@@ -154,7 +154,7 @@ protected:
DECLARE_WRITE_LINE_MEMBER(jrpacman_spritebank_w);
DECLARE_WRITE8_MEMBER(jrpacman_scroll_w);
DECLARE_WRITE_LINE_MEMBER(jrpacman_bgpriority_w);
- DECLARE_WRITE8_MEMBER(superabc_bank_w);
+ void superabc_bank_w(uint8_t data);
public:
void init_maketrax();
diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h
index d16e50509ba..ef3fdf2a77b 100644
--- a/src/mame/includes/psikyo.h
+++ b/src/mame/includes/psikyo.h
@@ -24,7 +24,7 @@ class psikyo_state : public driver_device
public:
psikyo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
- , m_vram(*this, "vram_%u", 0)
+ , m_vram(*this, "vram_%u", 0U, (u8)32)
, m_vregs(*this, "vregs")
, m_bootleg_spritebuffer(*this, "boot_spritebuf")
, m_spritelut(*this, "spritelut")
@@ -43,6 +43,8 @@ public:
, m_spriteram(*this, "spriteram")
{
std::fill(std::begin(m_old_linescroll), std::end(m_old_linescroll), ~u32(0));
+ std::fill(std::begin(m_old_tmapsize), std::end(m_old_tmapsize), ~u32(0));
+ std::fill(std::begin(m_tmapsize), std::end(m_tmapsize), ~u32(0));
}
void sngkace(machine_config &config);
@@ -64,11 +66,11 @@ public:
private:
/* memory pointers */
- required_shared_ptr_array<u32, 2> m_vram;
+ required_shared_ptr_array<u16, 2> m_vram;
required_shared_ptr<u32> m_vregs;
optional_shared_ptr<u32> m_bootleg_spritebuffer;
- required_memory_region m_spritelut;
+ required_region_ptr<u16> m_spritelut;
optional_memory_bank m_audiobank;
optional_memory_bank m_okibank;
optional_ioport m_in_dsw;
@@ -86,10 +88,12 @@ private:
u32 primask;
};
- tilemap_t *m_tilemap[2][4];
+ tilemap_t *m_tilemap[2];
u8 m_tilemap_bank[2];
bool m_ka302c_banking;
u32 m_old_linescroll[2];
+ u32 m_old_tmapsize[2];
+ u32 m_tmapsize[2];
std::unique_ptr<sprite_t[]> m_spritelist;
struct sprite_t *m_sprite_ptr_pre;
u16 m_sprite_ctrl;
@@ -120,22 +124,23 @@ private:
DECLARE_READ32_MEMBER(s1945_input_r);
DECLARE_WRITE8_MEMBER(s1945bl_okibank_w);
template<int Shift> DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
- template<int Layer> DECLARE_WRITE32_MEMBER(vram_w);
+ template<int Layer> u16 vram_r(offs_t offset);
+ template<int Layer> void vram_w(offs_t offset, u16 data, u16 mem_mask);
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
+ template<int Layer> TILEMAP_MAPPER_MEMBER(tile_scan);
virtual void machine_start() override;
virtual void machine_reset() override;
DECLARE_VIDEO_START(sngkace);
DECLARE_VIDEO_START(psikyo);
- u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- u32 screen_update_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ u32 screen_update_bootleg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
DECLARE_WRITE_LINE_MEMBER(screen_vblank_bootleg);
void switch_bgbanks(u8 tmap, u8 bank);
- void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void get_sprites();
void get_sprites_bootleg();
- u16 tilemap_width(u8 size);
void s1945_mcu_init();
/* devices */
diff --git a/src/mame/includes/raiden2.h b/src/mame/includes/raiden2.h
index 3027b1eaab3..44d12afd786 100644
--- a/src/mame/includes/raiden2.h
+++ b/src/mame/includes/raiden2.h
@@ -6,7 +6,7 @@
#pragma once
#include "audio/seibu.h"
-#include "machine/seibucop/seibucop.h"
+#include "machine/seibucop.h"
#include "video/bufsprite.h"
#include "video/seibu_crtc.h"
#include "emupal.h"
diff --git a/src/mame/includes/runaway.h b/src/mame/includes/runaway.h
index 3e34bf2c34f..d57ec35406e 100644
--- a/src/mame/includes/runaway.h
+++ b/src/mame/includes/runaway.h
@@ -32,7 +32,7 @@ private:
DECLARE_WRITE8_MEMBER(runaway_irq_ack_w);
DECLARE_READ8_MEMBER(earom_read);
DECLARE_WRITE8_MEMBER(earom_write);
- DECLARE_WRITE8_MEMBER(earom_control_w);
+ void earom_control_w(uint8_t data);
DECLARE_WRITE8_MEMBER(runaway_paletteram_w);
DECLARE_WRITE8_MEMBER(runaway_video_ram_w);
DECLARE_WRITE_LINE_MEMBER(tile_bank_w);
diff --git a/src/mame/includes/scramble.h b/src/mame/includes/scramble.h
index a57266e9d2e..681d0ee753e 100644
--- a/src/mame/includes/scramble.h
+++ b/src/mame/includes/scramble.h
@@ -35,7 +35,7 @@ public:
optional_device<tmsprom_device> m_tmsprom;
optional_shared_ptr<uint8_t> m_soundram;
optional_device<digitalker_device> m_digitalker;
- required_device<generic_latch_8_device> m_soundlatch;
+ optional_device<generic_latch_8_device> m_soundlatch;
optional_ioport m_dial;
diff --git a/src/mame/includes/segag80r.h b/src/mame/includes/segag80r.h
index 0d2e9c0e6e5..7e11eada7f7 100644
--- a/src/mame/includes/segag80r.h
+++ b/src/mame/includes/segag80r.h
@@ -174,7 +174,7 @@ private:
void draw_background_spaceod(bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_background_page_scroll(bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_background_full_scroll(bitmap_ind16 &bitmap, const rectangle &cliprect);
- offs_t decrypt_offset(address_space &space, offs_t offset);
+ offs_t decrypt_offset(offs_t offset);
inline uint8_t demangle(uint8_t d7d6, uint8_t d5d4, uint8_t d3d2, uint8_t d1d0);
void monsterb_expand_gfx(const char *region);
diff --git a/src/mame/includes/segag80v.h b/src/mame/includes/segag80v.h
index ca0430a995f..39429e9dc07 100644
--- a/src/mame/includes/segag80v.h
+++ b/src/mame/includes/segag80v.h
@@ -95,7 +95,7 @@ private:
uint32_t screen_update_segag80v(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
inline bool adjust_xy(int rawx, int rawy, int *outx, int *outy);
void sega_generate_vector_list();
- offs_t decrypt_offset(address_space &space, offs_t offset);
+ offs_t decrypt_offset(offs_t offset);
inline uint8_t demangle(uint8_t d7d6, uint8_t d5d4, uint8_t d3d2, uint8_t d1d0);
void main_map(address_map &map);
diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h
index 9f02a5c022d..5577d0d0d9c 100644
--- a/src/mame/includes/snes.h
+++ b/src/mame/includes/snes.h
@@ -4,9 +4,9 @@
#ifndef MAME_INCLUDES_SNES_H
#define MAME_INCLUDES_SNES_H
-#include "cpu/spc700/spc700.h"
#include "cpu/g65816/g65816.h"
-#include "audio/snes_snd.h"
+#include "machine/s_smp.h"
+#include "sound/s_dsp.h"
#include "video/snes_ppu.h"
#include "screen.h"
@@ -303,9 +303,10 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
- m_spc700(*this, "spc700"),
+ m_s_dsp(*this, "s_dsp"),
m_ppu(*this, "ppu"),
- m_screen(*this, "screen")
+ m_screen(*this, "screen"),
+ m_wram(*this, "wram")
{ }
void init_snes();
@@ -316,6 +317,11 @@ public:
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
enum
{
TIMER_NMI_TICK,
@@ -385,11 +391,13 @@ protected:
/* devices */
required_device<_5a22_device> m_maincpu;
- required_device<spc700_device> m_soundcpu;
- required_device<snes_sound_device> m_spc700;
+ required_device<s_smp_device> m_soundcpu;
+ required_device<s_dsp_device> m_s_dsp;
required_device<snes_ppu_device> m_ppu;
required_device<screen_device> m_screen;
+ required_shared_ptr<u8> m_wram;
+
inline int dma_abus_valid(uint32_t address);
inline uint8_t abus_read(address_space &space, uint32_t abus);
inline void dma_transfer(address_space &space, uint8_t dma, uint32_t abus, uint16_t bbus);
@@ -408,7 +416,7 @@ protected:
void snes_init_ram();
// input related
- virtual DECLARE_WRITE8_MEMBER(io_read);
+ virtual void io_read();
virtual uint8_t oldjoy1_read(int latched);
virtual uint8_t oldjoy2_read(int latched);
@@ -432,10 +440,6 @@ protected:
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_snes_cart);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_sufami_cart);
void snes_init_timers();
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
/* Special chips, checked at init and used in memory handlers */
diff --git a/src/mame/includes/srumbler.h b/src/mame/includes/srumbler.h
index 8a5a45bfdea..941b7b4f635 100644
--- a/src/mame/includes/srumbler.h
+++ b/src/mame/includes/srumbler.h
@@ -33,7 +33,7 @@ private:
tilemap_t *m_fg_tilemap;
int m_scroll[4];
- DECLARE_WRITE8_MEMBER(bankswitch_w);
+ void bankswitch_w(uint8_t data);
DECLARE_WRITE8_MEMBER(foreground_w);
DECLARE_WRITE8_MEMBER(background_w);
DECLARE_WRITE8_MEMBER(_4009_w);
diff --git a/src/mame/includes/sshangha.h b/src/mame/includes/sshangha.h
index 611ecfa76c5..a0408c59544 100644
--- a/src/mame/includes/sshangha.h
+++ b/src/mame/includes/sshangha.h
@@ -53,6 +53,7 @@ private:
int m_video_control;
DECO16IC_BANK_CB_MEMBER(bank_callback);
+ u16 mix_callback(u16 p, u16 p2);
DECLARE_READ16_MEMBER(sshangha_protection_region_8_146_r);
DECLARE_WRITE16_MEMBER(sshangha_protection_region_8_146_w);
@@ -61,9 +62,6 @@ private:
DECLARE_READ16_MEMBER(deco_71_r);
DECLARE_READ16_MEMBER(sshanghab_protection16_r);
- DECLARE_READ16_MEMBER(palette_r);
- DECLARE_WRITE16_MEMBER(palette_w);
-
DECLARE_READ8_MEMBER(sound_shared_r);
DECLARE_WRITE8_MEMBER(sound_shared_w);
diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h
index 23819cdf9dd..21e2fad64e5 100644
--- a/src/mame/includes/ssv.h
+++ b/src/mame/includes/ssv.h
@@ -11,6 +11,7 @@
#include "machine/eepromser.h"
#include "machine/timer.h"
#include "machine/upd4701.h"
+#include "machine/upd7001.h"
#include "sound/es5506.h"
#include "emupal.h"
#include "screen.h"
@@ -23,29 +24,20 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ensoniq(*this, "ensoniq"),
- m_eeprom(*this, "eeprom"),
m_dsp(*this, "dsp"),
- m_upd4701(*this, "upd4701"),
- m_adc(*this, "adc"),
m_mainram(*this, "mainram"),
m_spriteram(*this, "spriteram"),
m_scroll(*this, "scroll"),
m_irq_vectors(*this, "irq_vectors"),
- m_gdfs_tmapram(*this, "gdfs_tmapram"),
- m_gdfs_tmapscroll(*this, "gdfs_tmapscroll"),
- m_gdfs_st0020(*this, "st0020_spr"),
m_input_sel(*this, "input_sel"),
m_raster_interrupt_enabled(false),
m_io_key(*this, "KEY%u", 0U),
- m_io_service(*this, "SERVICE"),
- m_io_paddle(*this, "PADDLE"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette")
{ }
void ssv(machine_config &config);
- void gdfs(machine_config &config);
void dynagear(machine_config &config);
void hypreac2(machine_config &config);
void meosism(machine_config &config);
@@ -56,12 +48,9 @@ public:
void twineag2(machine_config &config);
void ryorioh(machine_config &config);
void janjans1(machine_config &config);
- void eaglshot(machine_config &config);
void survarts(machine_config &config);
- void sxyreac2(machine_config &config);
void ultrax(machine_config &config);
void vasara(machine_config &config);
- void sxyreact(machine_config &config);
void mslider(machine_config &config);
void jsk(machine_config &config);
void hypreact(machine_config &config);
@@ -71,27 +60,19 @@ public:
void init_ssv();
void init_ssv_tilescram();
- void init_eaglshot();
- void init_sexy();
void init_ssv_irq1();
void init_jsk();
void init_pastelis();
-private:
+protected:
required_device<cpu_device> m_maincpu;
required_device<es5506_device> m_ensoniq;
- optional_device<eeprom_serial_93cxx_device> m_eeprom;
optional_device<upd96050_device> m_dsp;
- optional_device<upd4701_device> m_upd4701;
- optional_device<adc0808_device> m_adc;
required_shared_ptr<uint16_t> m_mainram;
required_shared_ptr<uint16_t> m_spriteram;
required_shared_ptr<uint16_t> m_scroll;
required_shared_ptr<uint16_t> m_irq_vectors;
- optional_shared_ptr<uint16_t> m_gdfs_tmapram;
- optional_shared_ptr<uint16_t> m_gdfs_tmapscroll;
- optional_device<st0020_device> m_gdfs_st0020;
optional_shared_ptr<uint16_t> m_input_sel;
int m_tile_code[16];
@@ -100,12 +81,8 @@ private:
int m_shadow_pen_shift;
uint8_t m_requested_int;
uint16_t m_irq_enable;
- std::unique_ptr<uint16_t[]> m_eaglshot_gfxram;
- tilemap_t *m_gdfs_tmap;
int m_interrupt_ultrax;
bool m_raster_interrupt_enabled;
- uint16_t m_sxyreact_serial;
- int m_sxyreact_dial;
uint32_t m_latches[8];
DECLARE_WRITE16_MEMBER(irq_ack_w);
@@ -124,37 +101,19 @@ private:
DECLARE_READ16_MEMBER(srmp7_irqv_r);
DECLARE_WRITE16_MEMBER(srmp7_sound_bank_w);
DECLARE_READ16_MEMBER(srmp7_input_r);
- DECLARE_READ16_MEMBER(sxyreact_ballswitch_r);
- DECLARE_READ16_MEMBER(sxyreact_dial_r);
- DECLARE_WRITE16_MEMBER(sxyreact_dial_w);
- DECLARE_WRITE16_MEMBER(sxyreact_motor_w);
DECLARE_READ32_MEMBER(latch32_r);
DECLARE_WRITE32_MEMBER(latch32_w);
DECLARE_READ16_MEMBER(latch16_r);
DECLARE_WRITE16_MEMBER(latch16_w);
- DECLARE_WRITE8_MEMBER(eaglshot_gfxrom_bank_w);
- DECLARE_WRITE8_MEMBER(eaglshot_trackball_w);
- DECLARE_READ16_MEMBER(eaglshot_gfxram_r);
- DECLARE_WRITE16_MEMBER(eaglshot_gfxram_w);
- DECLARE_WRITE16_MEMBER(gdfs_tmapram_w);
DECLARE_READ16_MEMBER(vblank_r);
DECLARE_WRITE16_MEMBER(scroll_w);
- DECLARE_READ16_MEMBER(gdfs_eeprom_r);
- DECLARE_WRITE16_MEMBER(gdfs_eeprom_w);
-
- TILE_GET_INFO_MEMBER(get_tile_info_0);
virtual void machine_reset() override;
virtual void video_start() override;
- DECLARE_VIDEO_START(gdfs);
- DECLARE_VIDEO_START(eaglshot);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_gdfs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_eaglshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
- DECLARE_WRITE_LINE_MEMBER(gdfs_adc_int_w);
void update_irq_state();
IRQ_CALLBACK_MEMBER(irq_callback);
@@ -170,11 +129,10 @@ private:
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void enable_video(int enable);
+ void cairblad_map(address_map &map);
void drifto94_map(address_map &map);
void dsp_data_map(address_map &map);
void dsp_prg_map(address_map &map);
- void eaglshot_map(address_map &map);
- void gdfs_map(address_map &map);
void hypreac2_map(address_map &map);
void hypreact_map(address_map &map);
void janjans1_map(address_map &map);
@@ -187,13 +145,10 @@ private:
void srmp4_map(address_map &map);
void srmp7_map(address_map &map);
void survarts_map(address_map &map);
- void sxyreact_map(address_map &map);
void twineag2_map(address_map &map);
void ultrax_map(address_map &map);
optional_ioport_array<4> m_io_key;
- optional_ioport m_io_service;
- optional_ioport m_io_paddle;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -201,4 +156,98 @@ private:
void ssv_map(address_map &map, u32 rom);
};
+class gdfs_state : public ssv_state
+{
+public:
+ gdfs_state(const machine_config &mconfig, device_type type, const char *tag) :
+ ssv_state(mconfig, type, tag),
+ m_adc(*this, "adc"),
+ m_eeprom(*this, "eeprom"),
+ m_st0020(*this, "st0020_spr"),
+ m_tmapram(*this, "gdfs_tmapram"),
+ m_tmapscroll(*this, "gdfs_tmapscroll")
+ { }
+
+ void gdfs(machine_config &config);
+
+protected:
+ virtual void video_start() override;
+
+private:
+ DECLARE_WRITE_LINE_MEMBER(adc_int_w);
+
+ DECLARE_READ16_MEMBER(eeprom_r);
+ DECLARE_WRITE16_MEMBER(eeprom_w);
+
+ void gdfs_map(address_map &map);
+
+ TILE_GET_INFO_MEMBER(get_tile_info_0);
+ void tmapram_w(offs_t offset, uint16_t data, uint16_t mem_mask);
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ required_device<adc0808_device> m_adc;
+ required_device<eeprom_serial_93cxx_device> m_eeprom;
+ required_device<st0020_device> m_st0020;
+ required_shared_ptr<uint16_t> m_tmapram;
+ required_shared_ptr<uint16_t> m_tmapscroll;
+
+ tilemap_t *m_tmap;
+};
+
+class eaglshot_state : public ssv_state
+{
+public:
+ eaglshot_state(const machine_config &mconfig, device_type type, const char *tag) :
+ ssv_state(mconfig, type, tag),
+ m_upd4701(*this, "upd4701")
+ { }
+
+ void eaglshot(machine_config &config);
+
+ void init_eaglshot();
+
+protected:
+ virtual void video_start() override;
+
+private:
+ void gfxrom_bank_w(uint8_t data);
+ void trackball_w(uint8_t data);
+ uint16_t gfxram_r(offs_t offset, uint16_t mem_mask);
+ void gfxram_w(offs_t offset, uint16_t data, uint16_t mem_mask);
+
+ void eaglshot_map(address_map &map);
+
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ required_device<upd4701_device> m_upd4701;
+
+ std::unique_ptr<uint16_t[]> m_gfxram;
+};
+
+class sxyreact_state : public ssv_state
+{
+public:
+ sxyreact_state(const machine_config &mconfig, device_type type, const char *tag) :
+ ssv_state(mconfig, type, tag),
+ m_sxyreact_adc(*this, "adc"),
+ m_io_service(*this, "SERVICE")
+ { }
+
+ void sxyreact(machine_config &config);
+ void sxyreac2(machine_config &config);
+
+ void init_sexy();
+
+private:
+ DECLARE_READ16_MEMBER(ballswitch_r);
+ uint8_t dial_r();
+ void dial_w(uint8_t data);
+ DECLARE_WRITE16_MEMBER(motor_w);
+
+ void sxyreact_map(address_map &map);
+
+ required_device<upd7001_device> m_sxyreact_adc;
+ required_ioport m_io_service;
+};
+
#endif // MAME_INCLUDES_SSV_H
diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h
index c8bae09b8c6..a58ce727a8e 100644
--- a/src/mame/includes/super80.h
+++ b/src/mame/includes/super80.h
@@ -90,7 +90,7 @@ private:
DECLARE_READ8_MEMBER(io_read_byte);
DECLARE_WRITE8_MEMBER(io_write_byte);
DECLARE_WRITE8_MEMBER(pio_port_a_w);
- DECLARE_READ8_MEMBER(pio_port_b_r);
+ uint8_t pio_port_b_r();
DECLARE_MACHINE_RESET(super80);
DECLARE_MACHINE_RESET(super80r);
DECLARE_VIDEO_START(super80);
diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h
index 1a44b4639c4..76c48e220ce 100644
--- a/src/mame/includes/superqix.h
+++ b/src/mame/includes/superqix.h
@@ -111,7 +111,7 @@ private:
DECLARE_READ8_MEMBER(z80_semaphore_assert_r);
DECLARE_WRITE8_MEMBER(bootleg_mcu_port1_w);
- DECLARE_WRITE8_MEMBER(mcu_port2_w);
+ void mcu_port2_w(uint8_t data);
DECLARE_WRITE8_MEMBER(mcu_port3_w);
DECLARE_READ8_MEMBER(mcu_port3_r);
DECLARE_READ8_MEMBER(bootleg_mcu_port3_r);
diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h
index 07a245e6cec..b3c32ea5878 100644
--- a/src/mame/includes/tnzs.h
+++ b/src/mame/includes/tnzs.h
@@ -88,7 +88,7 @@ protected:
DECLARE_READ8_MEMBER(mcu_r);
DECLARE_WRITE8_MEMBER(mcu_w);
- DECLARE_READ8_MEMBER(analog_r);
+ uint8_t analog_r(offs_t offset);
void tnzs_sub_map(address_map &map);
diff --git a/src/mame/includes/z80ne.h b/src/mame/includes/z80ne.h
index addb7e0a690..969a7800dda 100644
--- a/src/mame/includes/z80ne.h
+++ b/src/mame/includes/z80ne.h
@@ -113,7 +113,7 @@ protected:
DECLARE_READ8_MEMBER(lx383_r);
DECLARE_WRITE8_MEMBER(lx383_w);
DECLARE_READ8_MEMBER(lx385_ctrl_r);
- DECLARE_WRITE8_MEMBER(lx385_ctrl_w);
+ void lx385_ctrl_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(lx385_uart_tx_clock_w);
TIMER_CALLBACK_MEMBER(z80ne_cassette_tc);
diff --git a/src/mame/layout/conic_cchess2.lay b/src/mame/layout/conic_cchess2.lay
new file mode 100644
index 00000000000..32c77646f73
--- /dev/null
+++ b/src/mame/layout/conic_cchess2.lay
@@ -0,0 +1,530 @@
+<?xml version="1.0"?>
+<!--
+license:CC0
+-->
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="led" defstate="0">
+ <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
+ <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
+ </element>
+
+ <element name="text_1">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_4">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_5">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_7">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_8">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_e">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_f">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_g">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_h">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+
+<!-- sb board -->
+
+ <element name="cblack"><rect><color red="0.41" green="0.4" blue="0.39" /></rect></element>
+ <element name="cwhite"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
+
+ <element name="hlbb" defstate="0">
+ <text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0" green="0" blue="0" />
+ </disk>
+ </element>
+
+ <element name="piece" defstate="0">
+ <image file="chess/wp.png" state="1"/>
+ <image file="chess/wn.png" state="2"/>
+ <image file="chess/wb.png" state="3"/>
+ <image file="chess/wr.png" state="4"/>
+ <image file="chess/wq.png" state="5"/>
+ <image file="chess/wk.png" state="6"/>
+
+ <image file="chess/bp.png" state="7"/>
+ <image file="chess/bn.png" state="8"/>
+ <image file="chess/bb.png" state="9"/>
+ <image file="chess/br.png" state="10"/>
+ <image file="chess/bq.png" state="11"/>
+ <image file="chess/bk.png" state="12"/>
+
+ <!-- selected pieces -->
+ <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
+ <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
+ <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
+ <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
+ <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
+ <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
+
+ <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
+ <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
+ <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
+ <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
+ <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
+ <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
+ </element>
+
+ <group name="sb_board">
+ <bounds x="0" y="0" width="80" height="80" />
+
+ <!-- squares (avoid seams) -->
+ <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+
+ <!-- leds -->
+ <repeat count="8">
+ <param name="y" start="8.3" increment="10" />
+ <param name="i2" start="7" increment="-1" />
+
+ <repeat count="8">
+ <param name="x" start="8.3" increment="10" />
+ <param name="i1" start="0" increment="1" />
+ <bezel name="~i2~.~i1~" element="led"><bounds x="~x~" y="~y~" width="1.5" height="1.5" /></bezel>
+ </repeat>
+ </repeat>
+
+ <!-- sensors, pieces -->
+ <repeat count="8">
+ <param name="y" start="0" increment="10" />
+ <param name="i" start="8" increment="-1" />
+
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+
+ <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
+ </repeat>
+ </group>
+
+
+<!-- sb ui -->
+
+ <element name="hlub" defstate="0">
+ <rect state="1"><color red="0" green="0" blue="0" /></rect>
+ </element>
+
+ <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uib3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu2a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu3a" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="2">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+ <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu3c" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="1">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+
+ <group name="sb_ui">
+ <bounds x="0" y="0" width="10" height="80" />
+ <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
+ <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
+ <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
+
+ <!-- board -->
+ <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
+
+ <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
+ <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- spawn -->
+ <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
+
+ <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
+ <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+
+ <!-- hand -->
+ <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
+ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
+ <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
+
+ <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
+ <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- undo -->
+ <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+
+ <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
+ <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
+ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
+ </group>
+
+
+<!-- buttons -->
+
+ <element name="brown"><rect><color red="0.58" green="0.37" blue="0.18" /></rect></element>
+ <element name="bmask"><rect><color red="0.91" green="0.89" blue="0.89" /></rect></element>
+
+ <element name="but_rb" defstate="0">
+ <rect state="0"><color red="0.13" green="0.1" blue="0.1" /></rect>
+ <rect state="1"><color red="0.25" green="0.22" blue="0.22" /></rect>
+ </element>
+ <element name="but_db" defstate="0">
+ <disk state="0"><color red="0.13" green="0.1" blue="0.1" /></disk>
+ <disk state="1"><color red="0.25" green="0.22" blue="0.22" /></disk>
+ </element>
+ <element name="but_dw" defstate="0">
+ <disk state="0"><color red="0.74" green="0.73" blue="0.72" /></disk>
+ <disk state="1"><color red="0.59" green="0.58" blue="0.58" /></disk>
+ </element>
+
+ <element name="switch" defstate="2">
+ <text string=" "><bounds x="0" y="0" width="1" height="1.2" /></text>
+ <rect state="1">
+ <bounds x="0" y="0" width="1" height="1" />
+ <color red="0.13" green="0.1" blue="0.1" />
+ </rect>
+ <rect state="2">
+ <bounds x="0" y="0.2" width="1" height="1" />
+ <color red="0.13" green="0.1" blue="0.1" />
+ </rect>
+ </element>
+
+ <element name="text_ll1"><text string="MODIFY"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_ll2"><text string="PLAY"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_ll3"><text string="BLACK"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_ll4"><text string="WHITE"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_ll5"><text string="RESET"><color red="1" green="1" blue="1" /></text></element>
+
+ <element name="text_lm1"><text string="LEARN"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_lm2"><text string="CLEAR"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_lm3"><text string="LEVEL"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_lm4"><text string="ENTER"><color red="1" green="1" blue="1" /></text></element>
+
+ <element name="text_l1"><text string="1"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l2"><text string="2"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l3"><text string="3"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l4"><text string="4"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l5"><text string="5"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l6"><text string="6"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l7"><text string="7"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l8"><text string="8"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l9"><text string="9"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l10"><text string="10"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l11"><text string="11"><color red="1" green="1" blue="1" /></text></element>
+ <element name="text_l12"><text string="12"><color red="1" green="1" blue="1" /></text></element>
+
+ <element name="text_p6"><image file="chess/wk.png"/></element>
+ <element name="text_p5"><image file="chess/wq.png"/></element>
+ <element name="text_p4"><image file="chess/wr.png"/></element>
+ <element name="text_p3"><image file="chess/wb.png"/></element>
+ <element name="text_p2"><image file="chess/wn.png"/></element>
+ <element name="text_p1"><image file="chess/wp.png"/></element>
+
+ <group name="buttons">
+ <bounds x="0" y="-1.2" width="88" height="18.5" />
+
+ <element ref="text_ll1"><bounds x="20.5" y="0.2" width="7.5" height="2" /></element>
+ <element ref="text_ll2"><bounds x="21.5" y="13.9" width="5.5" height="2" /></element>
+ <element ref="text_ll3"><bounds x="29.5" y="0.2" width="5.5" height="2" /></element>
+ <element ref="text_ll4"><bounds x="29.5" y="13.9" width="5.5" height="2" /></element>
+ <element ref="text_ll5"><bounds x="13.5" y="13.9" width="6.7" height="2" /></element>
+
+ <element ref="text_lm1"><bounds x="39.3" y="0.2" width="5.1" height="2" /></element>
+ <element ref="text_lm2"><bounds x="44.7" y="0.2" width="5.1" height="2" /></element>
+ <element ref="text_lm3"><bounds x="50.1" y="0.2" width="5.1" height="2" /></element>
+ <element ref="text_lm4"><bounds x="42" y="13.9" width="10.5" height="2" /></element>
+
+ <element ref="text_l7"><bounds x="58.8" y="0.2" width="2.7" height="2" /></element>
+ <element ref="text_l8"><bounds x="63.3" y="0.2" width="2.7" height="2" /></element>
+ <element ref="text_l9"><bounds x="67.8" y="0.2" width="2.7" height="2" /></element>
+ <element ref="text_l10"><bounds x="72.3" y="0.2" width="2.7" height="2" /></element>
+ <element ref="text_l11"><bounds x="76.8" y="0.2" width="2.7" height="2" /></element>
+ <element ref="text_l12"><bounds x="81.3" y="0.2" width="2.7" height="2" /></element>
+
+ <element ref="text_l1"><bounds x="58.8" y="13.9" width="2.7" height="2" /></element>
+ <element ref="text_l2"><bounds x="63.3" y="13.9" width="2.7" height="2" /></element>
+ <element ref="text_l3"><bounds x="67.8" y="13.9" width="2.7" height="2" /></element>
+ <element ref="text_l4"><bounds x="72.3" y="13.9" width="2.7" height="2" /></element>
+ <element ref="text_l5"><bounds x="76.8" y="13.9" width="2.7" height="2" /></element>
+ <element ref="text_l6"><bounds x="81.3" y="13.9" width="2.7" height="2" /></element>
+
+ <repeat count="6">
+ <param name="x" start="58.1" increment="4.5" />
+ <param name="i" start="1" increment="1" />
+ <element ref="text_p~i~"><bounds x="~x~" y="6" width="3.9" height="3.9" /></element>
+ </repeat>
+
+ <element ref="brown" blend="add"><bounds x="0" y="-1.2" width="88" height="18.5" /></element>
+ <element ref="bmask" blend="multiply"><bounds x="0" y="-1.2" width="88" height="18.5" /></element>
+
+ <element ref="switch" inputtag="IN.0" inputmask="0x0c" inputraw="1"><bounds x="22.5" y="2.3" width="3.5" height="11.4" /></element>
+ <element ref="switch" inputtag="IN.1" inputmask="0x03" inputraw="1"><bounds x="30.5" y="2.3" width="3.5" height="11.4" /></element>
+ <element ref="but_dw" inputtag="RESET" inputmask="0x01"><bounds x="15.5" y="10.3" width="2.7" height="2.7" /></element>
+
+ <element ref="but_dw" inputtag="IN.4" inputmask="0x02"><bounds x="40.5" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.6" inputmask="0x02"><bounds x="45.9" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.4" inputmask="0x04"><bounds x="51.3" y="3" width="2.7" height="2.7" /></element>
+
+ <element ref="but_db" inputtag="IN.4" inputmask="0x01"><bounds x="40.25" y="9.9" width="3.5" height="3.5" /></element>
+ <element ref="but_db" inputtag="IN.4" inputmask="0x01"><bounds x="50.75" y="9.9" width="3.5" height="3.5" /></element>
+ <element ref="but_rb" inputtag="IN.4" inputmask="0x01"><bounds x="42.0" y="9.9" width="10.5" height="3.5" /></element>
+
+ <element ref="but_db" inputtag="IN.6" inputmask="0x04"><bounds x="58.8" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_db" inputtag="IN.6" inputmask="0x08"><bounds x="63.3" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_db" inputtag="IN.7" inputmask="0x01"><bounds x="67.8" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_db" inputtag="IN.7" inputmask="0x02"><bounds x="72.3" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_db" inputtag="IN.7" inputmask="0x04"><bounds x="76.8" y="3" width="2.7" height="2.7" /></element>
+ <element ref="but_db" inputtag="IN.7" inputmask="0x08"><bounds x="81.3" y="3" width="2.7" height="2.7" /></element>
+
+ <element ref="but_dw" inputtag="IN.6" inputmask="0x01"><bounds x="58.8" y="10.3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.5" inputmask="0x08"><bounds x="63.3" y="10.3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.5" inputmask="0x04"><bounds x="67.8" y="10.3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.5" inputmask="0x02"><bounds x="72.3" y="10.3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.5" inputmask="0x01"><bounds x="76.8" y="10.3" width="2.7" height="2.7" /></element>
+ <element ref="but_dw" inputtag="IN.4" inputmask="0x08"><bounds x="81.3" y="10.3" width="2.7" height="2.7" /></element>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="-13" right="88" top="-1" bottom="107" />
+
+ <bezel element="cwhite"><bounds x="0" y="-1" width="88" height="88" /></bezel>
+
+ <group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
+ <group ref="sb_ui"><bounds x="-11.5" y="3" width="10" height="80" /></group>
+
+ <group ref="buttons"><bounds x="0" y="88.5" width="88" height="18.5" /></group>
+
+ <!-- chessboard coords -->
+ <bezel element="text_8"><bounds x="1.2" y="7" width="2" height="2" /></bezel>
+ <bezel element="text_7"><bounds x="1.2" y="17" width="2" height="2" /></bezel>
+ <bezel element="text_6"><bounds x="1.2" y="27" width="2" height="2" /></bezel>
+ <bezel element="text_5"><bounds x="1.2" y="37" width="2" height="2" /></bezel>
+ <bezel element="text_4"><bounds x="1.2" y="47" width="2" height="2" /></bezel>
+ <bezel element="text_3"><bounds x="1.2" y="57" width="2" height="2" /></bezel>
+ <bezel element="text_2"><bounds x="1.2" y="67" width="2" height="2" /></bezel>
+ <bezel element="text_1"><bounds x="1.2" y="77" width="2" height="2" /></bezel>
+
+ <bezel element="text_a"><bounds x="8" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_b"><bounds x="18" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_c"><bounds x="28" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_d"><bounds x="38" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_e"><bounds x="48" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_f"><bounds x="58" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_g"><bounds x="68" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_h"><bounds x="78" y="84" width="2" height="2" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/fidel_eas_priv.lay b/src/mame/layout/fidel_eas_priv.lay
deleted file mode 100644
index 873bdb3eb54..00000000000
--- a/src/mame/layout/fidel_eas_priv.lay
+++ /dev/null
@@ -1,592 +0,0 @@
-<?xml version="1.0"?>
-<!--
-license:CC0
--->
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
- <element name="black"><rect><color red="0.35" green="0.05" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
- </element>
-
- <element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
- </element>
- <element name="led2" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.14" green="0.014" blue="0.02" /></disk>
- </element>
-
- <element name="but" defstate="0">
- <disk state="0"><color red="0.17" green="0.15" blue="0.15" /></disk>
- <disk state="1"><color red="0.34" green="0.3" blue="0.3" /></disk>
- </element>
-
- <element name="text_1"><text string="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_2"><text string="2"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_3"><text string="3"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_4"><text string="4"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_5"><text string="5"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_6"><text string="6"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_7"><text string="7"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_8"><text string="8"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
- <element name="text_a"><text string="A"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b"><text string="B"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_c"><text string="C"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_d"><text string="D"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_e"><text string="E"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_f"><text string="F"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_g"><text string="G"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_h"><text string="H"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
- <element name="text_p1"><text string="[K]"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_p2"><text string="[Q]"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_p3"><text string="[R]"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_p4"><text string="[B]"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_p5"><text string="[N]"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_p6"><text string="[P]"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
- <element name="text_b1"><text string="GAME"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b1a"><text string="CONTROL"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b2"><text string="spk"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b3"><text string="PB"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b4"><text string="PV"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b5"><text string="TM"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b6"><text string="ST"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b7"><text string="TB"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b8"><text string="LV"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b9"><text string="DM"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b10"><text string="CL"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_b11"><text string="RV"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
- <element name="text_r1"><text string="YOUR MOVE" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r2"><text string="CHECK" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
-
-<!-- sb board -->
-
- <element name="cblack"><rect><color red="0.56" green="0.33" blue="0.12" /></rect></element>
- <element name="cwhite"><rect><color red="0.84" green="0.75" blue="0.50" /></rect></element>
-
- <element name="hlbb" defstate="0">
- <text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
- <disk state="1">
- <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
- <color red="0" green="0" blue="0" />
- </disk>
- </element>
-
- <element name="piece" defstate="0">
- <image file="chess/wp.png" state="1"/>
- <image file="chess/wn.png" state="2"/>
- <image file="chess/wb.png" state="3"/>
- <image file="chess/wr.png" state="4"/>
- <image file="chess/wq.png" state="5"/>
- <image file="chess/wk.png" state="6"/>
-
- <image file="chess/bp.png" state="7"/>
- <image file="chess/bn.png" state="8"/>
- <image file="chess/bb.png" state="9"/>
- <image file="chess/br.png" state="10"/>
- <image file="chess/bq.png" state="11"/>
- <image file="chess/bk.png" state="12"/>
-
- <!-- selected pieces -->
- <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
- <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
- <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
- <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
- <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
- <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
-
- <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
- <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
- <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
- <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
- <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
- <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
- </element>
-
- <group name="sb_board">
- <bounds x="0" y="0" width="80" height="80" />
-
- <!-- squares (avoid seams) -->
- <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel>
-
- <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel>
-
- <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel>
-
- <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel>
-
- <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel>
-
- <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel>
-
- <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel>
- <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel>
- <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel>
-
- <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel>
- <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel>
- <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel>
- <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel>
- <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel>
- <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel>
- <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
- <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
-
- <!-- sensors, pieces -->
- <repeat count="8">
- <param name="y" start="0" increment="10" />
- <param name="i" start="8" increment="-1" />
-
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
-
- <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
- <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
- </repeat>
- </group>
-
-
-<!-- sb ui -->
-
- <element name="hlub" defstate="0">
- <rect state="1"><color red="0" green="0" blue="0" /></rect>
- </element>
-
- <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uib2">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uib3">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uih2">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uiu2a">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uiu2b">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uiu2c">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uiu2d">
- <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
- <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_uiu3a" defstate="0">
- <simplecounter maxstate="999" digits="1" align="2">
- <color red="0.81" green="0.8" blue="0.79" />
- </simplecounter>
- </element>
- <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_uiu3c" defstate="0">
- <simplecounter maxstate="999" digits="1" align="1">
- <color red="0.81" green="0.8" blue="0.79" />
- </simplecounter>
- </element>
-
- <group name="sb_ui">
- <bounds x="0" y="0" width="10" height="80" />
- <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
- <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
- <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
- <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
- <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
-
- <!-- board -->
- <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
- <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
- <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
-
- <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
- <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
-
- <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
-
- <!-- spawn -->
- <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
- <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
- <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
-
- <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
- <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
- <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
- <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
- <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
- <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
- <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
- <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
- <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
- <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
- <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
- <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
-
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
-
- <!-- hand -->
- <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
- <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
- <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
-
- <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
- <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
-
- <!-- undo -->
- <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
- <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
- <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
- <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
- <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
- <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
- <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
- <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
- <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
-
- <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
- <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
-
- <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
- <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
- <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
- </group>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-2.25" right="138" top="7" bottom="86" />
-
- <group ref="sb_board"><bounds x="9" y="9" width="75" height="75" /></group>
- <group ref="sb_ui"><bounds x="-1.3125" y="9" width="9.375" height="75" /></group>
-
- <!-- chessboard 2 bezel -->
-
- <bezel element="black"><bounds x="88" y="9" width="48" height="75" /></bezel>
- <bezel element="blackb"><bounds x="88.5" y="9.5" width="48" height="75" /></bezel>
-
- <bezel element="black"><bounds x="93" y="15" width="41" height="41" /></bezel>
- <bezel element="white"><bounds x="93.5" y="15.5" width="40" height="40" /></bezel>
-
- <bezel element="black"><bounds x="98.5" y="15.25" width="5" height="5.25" /></bezel>
- <bezel element="black"><bounds x="108.5" y="15.25" width="5" height="5.25" /></bezel>
- <bezel element="black"><bounds x="118.5" y="15.25" width="5" height="5.25" /></bezel>
- <bezel element="black"><bounds x="128.5" y="15.25" width="5.25" height="5.25" /></bezel>
-
- <bezel element="black"><bounds x="93.25" y="20.5" width="5.25" height="5" /></bezel>
- <bezel element="black"><bounds x="103.5" y="20.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="113.5" y="20.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="123.5" y="20.5" width="5" height="5" /></bezel>
-
- <bezel element="black"><bounds x="98.5" y="25.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="108.5" y="25.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="118.5" y="25.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="128.5" y="25.5" width="5.25" height="5" /></bezel>
-
- <bezel element="black"><bounds x="93.25" y="30.5" width="5.25" height="5" /></bezel>
- <bezel element="black"><bounds x="103.5" y="30.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="113.5" y="30.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="123.5" y="30.5" width="5" height="5" /></bezel>
-
- <bezel element="black"><bounds x="98.5" y="35.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="108.5" y="35.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="118.5" y="35.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="128.5" y="35.5" width="5.25" height="5" /></bezel>
-
- <bezel element="black"><bounds x="93.25" y="40.5" width="5.25" height="5" /></bezel>
- <bezel element="black"><bounds x="103.5" y="40.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="113.5" y="40.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="123.5" y="40.5" width="5" height="5" /></bezel>
-
- <bezel element="black"><bounds x="98.5" y="45.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="108.5" y="45.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="118.5" y="45.5" width="5" height="5" /></bezel>
- <bezel element="black"><bounds x="128.5" y="45.5" width="5.25" height="5" /></bezel>
-
- <bezel element="black"><bounds x="93.25" y="50.5" width="5.25" height="5.25" /></bezel>
- <bezel element="black"><bounds x="103.5" y="50.5" width="5" height="5.25" /></bezel>
- <bezel element="black"><bounds x="113.5" y="50.5" width="5" height="5.25" /></bezel>
- <bezel element="black"><bounds x="123.5" y="50.5" width="5" height="5.25" /></bezel>
-
- <!-- chessboard 2 coords -->
-
- <bezel element="text_8"><bounds x="91" y="17.1" width="2" height="1.5" /></bezel>
- <bezel element="text_7"><bounds x="91" y="22.1" width="2" height="1.5" /></bezel>
- <bezel element="text_6"><bounds x="91" y="27.1" width="2" height="1.5" /></bezel>
- <bezel element="text_5"><bounds x="91" y="32.1" width="2" height="1.5" /></bezel>
- <bezel element="text_4"><bounds x="91" y="37.1" width="2" height="1.5" /></bezel>
- <bezel element="text_3"><bounds x="91" y="42.1" width="2" height="1.5" /></bezel>
- <bezel element="text_2"><bounds x="91" y="47.1" width="2" height="1.5" /></bezel>
- <bezel element="text_1"><bounds x="91" y="52.1" width="2" height="1.5" /></bezel>
-
- <bezel element="text_8"><bounds x="134" y="17.1" width="2" height="1.5" /></bezel>
- <bezel element="text_7"><bounds x="134" y="22.1" width="2" height="1.5" /></bezel>
- <bezel element="text_6"><bounds x="134" y="27.1" width="2" height="1.5" /></bezel>
- <bezel element="text_5"><bounds x="134" y="32.1" width="2" height="1.5" /></bezel>
- <bezel element="text_4"><bounds x="134" y="37.1" width="2" height="1.5" /></bezel>
- <bezel element="text_3"><bounds x="134" y="42.1" width="2" height="1.5" /></bezel>
- <bezel element="text_2"><bounds x="134" y="47.1" width="2" height="1.5" /></bezel>
- <bezel element="text_1"><bounds x="134" y="52.1" width="2" height="1.5" /></bezel>
-
- <bezel element="text_a"><bounds x="95" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_b"><bounds x="100" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_c"><bounds x="105" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_d"><bounds x="110" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_e"><bounds x="115" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_f"><bounds x="120" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_g"><bounds x="125" y="13" width="2" height="1.5" /></bezel>
- <bezel element="text_h"><bounds x="130" y="13" width="2" height="1.5" /></bezel>
-
- <bezel element="text_a"><bounds x="95" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_b"><bounds x="100" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_c"><bounds x="105" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_d"><bounds x="110" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_e"><bounds x="115" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_f"><bounds x="120" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_g"><bounds x="125" y="56.5" width="2" height="1.5" /></bezel>
- <bezel element="text_h"><bounds x="130" y="56.5" width="2" height="1.5" /></bezel>
-
- <!-- chessboard 2 leds -->
-
- <bezel name="0.8" element="led"><bounds x="95.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.8" element="led"><bounds x="100.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.8" element="led"><bounds x="105.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.8" element="led"><bounds x="110.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.8" element="led"><bounds x="115.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.8" element="led"><bounds x="120.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.8" element="led"><bounds x="125.25" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.8" element="led"><bounds x="130.25" y="17.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.9" element="led"><bounds x="95.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.9" element="led"><bounds x="100.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.9" element="led"><bounds x="105.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.9" element="led"><bounds x="110.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.9" element="led"><bounds x="115.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.9" element="led"><bounds x="120.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.9" element="led"><bounds x="125.25" y="22.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.9" element="led"><bounds x="130.25" y="22.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.10" element="led"><bounds x="95.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.10" element="led"><bounds x="100.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.10" element="led"><bounds x="105.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.10" element="led"><bounds x="110.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.10" element="led"><bounds x="115.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.10" element="led"><bounds x="120.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.10" element="led"><bounds x="125.25" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.10" element="led"><bounds x="130.25" y="27.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.11" element="led"><bounds x="95.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.11" element="led"><bounds x="100.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.11" element="led"><bounds x="105.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.11" element="led"><bounds x="110.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.11" element="led"><bounds x="115.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.11" element="led"><bounds x="120.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.11" element="led"><bounds x="125.25" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.11" element="led"><bounds x="130.25" y="32.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.12" element="led"><bounds x="95.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.12" element="led"><bounds x="100.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.12" element="led"><bounds x="105.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.12" element="led"><bounds x="110.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.12" element="led"><bounds x="115.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.12" element="led"><bounds x="120.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.12" element="led"><bounds x="125.25" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.12" element="led"><bounds x="130.25" y="37.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.13" element="led"><bounds x="95.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.13" element="led"><bounds x="100.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.13" element="led"><bounds x="105.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.13" element="led"><bounds x="110.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.13" element="led"><bounds x="115.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.13" element="led"><bounds x="120.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.13" element="led"><bounds x="125.25" y="42.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.13" element="led"><bounds x="130.25" y="42.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.14" element="led"><bounds x="95.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.14" element="led"><bounds x="100.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.14" element="led"><bounds x="105.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.14" element="led"><bounds x="110.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.14" element="led"><bounds x="115.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.14" element="led"><bounds x="120.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.14" element="led"><bounds x="125.25" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.14" element="led"><bounds x="130.25" y="47.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.15" element="led"><bounds x="95.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.15" element="led"><bounds x="100.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="2.15" element="led"><bounds x="105.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="3.15" element="led"><bounds x="110.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="4.15" element="led"><bounds x="115.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="5.15" element="led"><bounds x="120.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="6.15" element="led"><bounds x="125.25" y="52.25" width="1.5" height="1.5" /></bezel>
- <bezel name="7.15" element="led"><bounds x="130.25" y="52.25" width="1.5" height="1.5" /></bezel>
-
- <!-- bottom side -->
-
- <bezel name="8.8" element="led2"><bounds x="101.1" y="62.7" width="1.5" height="1.5" /></bezel>
- <bezel name="8.9" element="led2"><bounds x="104.1" y="62.7" width="1.5" height="1.5" /></bezel>
- <bezel name="8.10" element="led2"><bounds x="107.1" y="62.7" width="1.5" height="1.5" /></bezel>
- <bezel name="8.11" element="led2"><bounds x="110.1" y="62.7" width="1.5" height="1.5" /></bezel>
- <bezel name="8.12" element="led2"><bounds x="113.1" y="62.7" width="1.5" height="1.5" /></bezel>
- <bezel name="8.13" element="led2"><bounds x="116.1" y="62.7" width="1.5" height="1.5" /></bezel>
-
- <bezel name="8.14" element="led2"><bounds x="128.1" y="62.7" width="1.5" height="1.5" /></bezel>
- <bezel name="8.15" element="led2"><bounds x="128.1" y="66.7" width="1.5" height="1.5" /></bezel>
-
- <bezel element="but" inputtag="IN.0" inputmask="0x01"><bounds x="93" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.0" inputmask="0x02"><bounds x="96" y="66.7" width="1.5" height="1.5" /></bezel>
-
- <bezel element="but" inputtag="IN.0" inputmask="0x04"><bounds x="101.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.0" inputmask="0x08"><bounds x="104.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.0" inputmask="0x10"><bounds x="107.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.0" inputmask="0x20"><bounds x="110.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.0" inputmask="0x40"><bounds x="113.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.0" inputmask="0x80"><bounds x="116.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.1" inputmask="0x01"><bounds x="119.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.1" inputmask="0x02"><bounds x="122.1" y="66.7" width="1.5" height="1.5" /></bezel>
- <bezel element="but" inputtag="IN.1" inputmask="0x04"><bounds x="125.1" y="66.7" width="1.5" height="1.5" /></bezel>
-
- <bezel element="text_p1"><bounds x="100.1" y="64.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_p2"><bounds x="103.1" y="64.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_p3"><bounds x="106.1" y="64.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_p4"><bounds x="109.1" y="64.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_p5"><bounds x="112.1" y="64.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_p6"><bounds x="115.1" y="64.5" width="3.5" height="1.5" /></bezel>
-
- <bezel element="text_b1"><bounds x="90" y="68.5" width="7.5" height="1.5" /></bezel>
- <bezel element="text_b1a"><bounds x="90" y="70" width="7.5" height="1.5" /></bezel>
- <bezel element="text_b2"><bounds x="93" y="64.6" width="7.5" height="1.5" /></bezel>
-
- <bezel element="text_b3"><bounds x="100.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b4"><bounds x="103.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b5"><bounds x="106.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b6"><bounds x="109.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b7"><bounds x="112.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b8"><bounds x="115.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b9"><bounds x="118.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b10"><bounds x="121.1" y="68.5" width="3.5" height="1.5" /></bezel>
- <bezel element="text_b11"><bounds x="124.1" y="68.5" width="3.5" height="1.5" /></bezel>
-
- <bezel element="text_r1"><bounds x="130.5" y="62.7" width="10" height="1.5" /></bezel>
- <bezel element="text_r2"><bounds x="130.5" y="66.7" width="10" height="1.5" /></bezel>
-
- <!-- panel 7seg leds -->
-
- <bezel name="digit1" element="digit">
- <bounds x="93" y="75.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit0" element="digit">
- <bounds x="98.66" y="75.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit2" element="digit">
- <bounds x="107.16" y="75.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit3" element="digit">
- <bounds x="112.82" y="75.5" width="5.66" height="8.5" />
- </bezel>
-
- <bezel name="0.7" element="led">
- <bounds x="105.58" y="77" width="0.85" height="0.85" />
- </bezel>
- <bezel name="1.7" element="led">
- <bounds x="105.13" y="81.65" width="0.85" height="0.85" />
- </bezel>
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/qfire.lay b/src/mame/layout/qfire.lay
new file mode 100644
index 00000000000..8bd183d544e
--- /dev/null
+++ b/src/mame/layout/qfire.lay
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+license:CC0
+-->
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="whited"><disk><color red="0.85" green="0.85" blue="0.85" /></disk></element>
+ <element name="blackd"><disk><color red="0" green="0" blue="0" /></disk></element>
+ <element name="redd"><disk><color red="0.8" green="0.14" blue="0.16" /></disk></element>
+ <element name="greend"><disk><color red="0.15" green="0.8" blue="0.1" /></disk></element>
+ <element name="yellowd"><disk><color red="0.8" green="0.78" blue="0.1" /></disk></element>
+ <element name="black"><rect><color red="0" green="0" blue="0" /></rect></element>
+ <element name="gray"><rect><color red="0.16" green="0.15" blue="0.15" /></rect></element>
+
+ <element name="text_skill"><text string="SKILL:"><color red="0.85" green="0.85" blue="0.85" /></text></element>
+ <element name="text_game"><text string="GAME:"><color red="0.85" green="0.85" blue="0.85" /></text></element>
+ <element name="text_sw"><text string="&#x25ba;"><color red="0.8" green="0.14" blue="0.16" /></text></element>
+
+ <element name="switch_skill" defstate="0">
+ <text state="0x04" string="A" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x02" string="B" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x01" string="C" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ </element>
+
+ <element name="switch_game" defstate="0">
+ <text state="0x00" string="1" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x08" string="2" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x04" string="3" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x02" string="4" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x01" string="5" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ <text state="0x06" string="6" align="2"><color red="0.85" green="0.85" blue="0.85" /></text>
+ </element>
+
+ <element name="hl" defstate="0">
+ <disk state="1"><color red="1" green="1" blue="1" /></disk>
+ </element>
+
+ <element name="ledr" defstate="0">
+ <disk state="0"><color red="0.2" green="0.04" blue="0.05" /></disk>
+ <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
+ </element>
+ <element name="ledg" defstate="0">
+ <disk state="0"><color red="0.05" green="0.2" blue="0.04" /></disk>
+ <disk state="1"><color red="0.23" green="1.0" blue="0.2" /></disk>
+ </element>
+ <element name="ledy" defstate="0">
+ <disk state="0"><color red="0.2" green="0.18" blue="0.04" /></disk>
+ <disk state="1"><color red="1.0" green="0.9" blue="0.2" /></disk>
+ </element>
+
+ <element name="digit" defstate="0">
+ <led7seg><color red="1.0" green="0.2" blue="0.23" /></led7seg>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="47" right="161" top="34" bottom="121" />
+
+ <!-- targets -->
+ <bezel element="yellowd"><bounds x="51" y="38" width="28" height="28" /></bezel>
+ <bezel element="whited"><bounds x="53" y="40" width="24" height="24" /></bezel>
+ <bezel element="black"><bounds x="53" y="51.75" width="24" height="0.5" /></bezel>
+ <bezel element="black"><bounds x="64.75" y="40" width="0.5" height="24" /></bezel>
+ <bezel element="blackd"><bounds x="63" y="50" width="4" height="4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="62" y="49" width="6" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="whited"><bounds x="63" y="75" width="4" height="4" /></bezel>
+ <bezel element="yellowd"><bounds x="63.625" y="75.625" width="2.75" height="2.75" /></bezel>
+ <bezel name="2.2" element="ledy"><bounds x="64.25" y="76.25" width="1.5" height="1.5" /></bezel>
+
+ <bezel element="redd"><bounds x="90" y="60" width="28" height="28" /></bezel>
+ <bezel element="whited"><bounds x="92" y="62" width="24" height="24" /></bezel>
+ <bezel element="black"><bounds x="92" y="73.75" width="24" height="0.5" /></bezel>
+ <bezel element="black"><bounds x="103.75" y="62" width="0.5" height="24" /></bezel>
+ <bezel element="blackd"><bounds x="102" y="72" width="4" height="4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="101" y="71" width="6" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="whited"><bounds x="102" y="47" width="4" height="4" /></bezel>
+ <bezel element="redd"><bounds x="102.625" y="47.625" width="2.75" height="2.75" /></bezel>
+ <bezel name="2.3" element="ledr"><bounds x="103.25" y="48.25" width="1.5" height="1.5" /></bezel>
+
+ <bezel element="greend"><bounds x="129" y="38" width="28" height="28" /></bezel>
+ <bezel element="whited"><bounds x="131" y="40" width="24" height="24" /></bezel>
+ <bezel element="black"><bounds x="131" y="51.75" width="24" height="0.5" /></bezel>
+ <bezel element="black"><bounds x="142.75" y="40" width="0.5" height="24" /></bezel>
+ <bezel element="blackd"><bounds x="141" y="50" width="4" height="4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="140" y="49" width="6" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="whited"><bounds x="141" y="75" width="4" height="4" /></bezel>
+ <bezel element="greend"><bounds x="141.625" y="75.625" width="2.75" height="2.75" /></bezel>
+ <bezel name="2.4" element="ledg"><bounds x="142.25" y="76.25" width="1.5" height="1.5" /></bezel>
+
+ <!-- score panel -->
+ <bezel element="gray"><bounds x="86" y="100" width="36" height="0.5" /></bezel>
+
+ <bezel name="digit0" element="digit"><bounds x="100" y="104" width="4" height="6" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="104" y="104" width="4" height="6" /></bezel>
+
+ <bezel name="2.0" element="ledr"><bounds x="90" y="106.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.1" element="ledy"><bounds x="116.5" y="106.25" width="1.5" height="1.5" /></bezel>
+
+ <bezel element="text_game"><bounds x="85" y="115" width="8" height="2.5" /></bezel>
+ <bezel element="text_sw"><bounds x="93" y="115" width="2.5" height="2.5" /></bezel>
+ <bezel element="switch_game" inputtag="IN.0" inputmask="0x0f" inputraw="1"><bounds x="93" y="115" width="4" height="2.5" /></bezel>
+
+ <bezel element="text_skill"><bounds x="110" y="115" width="8" height="2.5" /></bezel>
+ <bezel element="text_sw"><bounds x="118" y="115" width="2.5" height="2.5" /></bezel>
+ <bezel element="switch_skill" inputtag="IN.1" inputmask="0x07" inputraw="1"><bounds x="118" y="115" width="4" height="2.5" /></bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/sag.lay b/src/mame/layout/sag.lay
index b08be043690..2b1a36222b4 100644
--- a/src/mame/layout/sag.lay
+++ b/src/mame/layout/sag.lay
@@ -4,7 +4,7 @@ license:CC0
-->
<mamelayout version="2">
- <!-- define elements -->
+<!-- define elements -->
<element name="digit" defstate="0">
<led7seg><color red="0.4" green="1.0" blue="0.95" /></led7seg>
@@ -67,160 +67,169 @@ license:CC0
</element>
- <!-- build screen -->
+<!-- build screen -->
- <view name="Internal Layout">
+ <group name="display">
<bounds left="-0.3" right="23" top="-0.3" bottom="23.3" />
<!-- main panel -->
-
- <bezel name="7.1" element="sr"><bounds x="0" y="0" width="1.7" height="0.9" /></bezel>
- <bezel name="7.3" element="sr"><bounds x="2" y="0" width="1.7" height="0.9" /></bezel>
- <bezel name="7.5" element="sr"><bounds x="4" y="0" width="1.7" height="0.9" /></bezel>
- <bezel name="7.7" element="sr"><bounds x="6" y="0" width="1.7" height="0.9" /></bezel>
- <bezel name="7.9" element="sr"><bounds x="8" y="0" width="1.7" height="0.9" /></bezel>
- <bezel name="7.11" element="sr"><bounds x="10" y="0" width="1.7" height="0.9" /></bezel>
- <bezel name="7.13" element="sr"><bounds x="12" y="0" width="1.7" height="0.9" /></bezel>
-
- <bezel name="7.0" element="sc"><bounds x="0" y="1.15" width="1.7" height="0.9" /></bezel>
- <bezel name="7.2" element="sc"><bounds x="2" y="1.15" width="1.7" height="0.9" /></bezel>
- <bezel name="7.4" element="sc"><bounds x="4" y="1.15" width="1.7" height="0.9" /></bezel>
- <bezel name="7.6" element="sc"><bounds x="6" y="1.15" width="1.7" height="0.9" /></bezel>
- <bezel name="7.8" element="sc"><bounds x="8" y="1.15" width="1.7" height="0.9" /></bezel>
- <bezel name="7.10" element="sc"><bounds x="10" y="1.15" width="1.7" height="0.9" /></bezel>
- <bezel name="7.12" element="sc"><bounds x="12" y="1.15" width="1.7" height="0.9" /></bezel>
-
- <bezel name="6.1" element="sr"><bounds x="0" y="3" width="1.7" height="0.9" /></bezel>
- <bezel name="6.3" element="sr"><bounds x="2" y="3" width="1.7" height="0.9" /></bezel>
- <bezel name="6.5" element="sr"><bounds x="4" y="3" width="1.7" height="0.9" /></bezel>
- <bezel name="6.7" element="sr"><bounds x="6" y="3" width="1.7" height="0.9" /></bezel>
- <bezel name="6.9" element="sr"><bounds x="8" y="3" width="1.7" height="0.9" /></bezel>
- <bezel name="6.11" element="sr"><bounds x="10" y="3" width="1.7" height="0.9" /></bezel>
- <bezel name="6.13" element="sr"><bounds x="12" y="3" width="1.7" height="0.9" /></bezel>
-
- <bezel name="6.0" element="sc"><bounds x="0" y="4.15" width="1.7" height="0.9" /></bezel>
- <bezel name="6.2" element="sc"><bounds x="2" y="4.15" width="1.7" height="0.9" /></bezel>
- <bezel name="6.4" element="sc"><bounds x="4" y="4.15" width="1.7" height="0.9" /></bezel>
- <bezel name="6.6" element="sc"><bounds x="6" y="4.15" width="1.7" height="0.9" /></bezel>
- <bezel name="6.8" element="sc"><bounds x="8" y="4.15" width="1.7" height="0.9" /></bezel>
- <bezel name="6.10" element="sc"><bounds x="10" y="4.15" width="1.7" height="0.9" /></bezel>
- <bezel name="6.12" element="sc"><bounds x="12" y="4.15" width="1.7" height="0.9" /></bezel>
-
-
- <bezel name="5.1" element="sr"><bounds x="0" y="6" width="1.7" height="0.9" /></bezel>
- <bezel name="5.3" element="sr"><bounds x="2" y="6" width="1.7" height="0.9" /></bezel>
- <bezel name="5.5" element="sr"><bounds x="4" y="6" width="1.7" height="0.9" /></bezel>
- <bezel name="5.7" element="sr"><bounds x="6" y="6" width="1.7" height="0.9" /></bezel>
- <bezel name="5.9" element="sr"><bounds x="8" y="6" width="1.7" height="0.9" /></bezel>
- <bezel name="5.11" element="sr"><bounds x="10" y="6" width="1.7" height="0.9" /></bezel>
- <bezel name="5.13" element="sr"><bounds x="12" y="6" width="1.7" height="0.9" /></bezel>
-
- <bezel name="5.0" element="sc"><bounds x="0" y="7.15" width="1.7" height="0.9" /></bezel>
- <bezel name="5.2" element="sc"><bounds x="2" y="7.15" width="1.7" height="0.9" /></bezel>
- <bezel name="5.4" element="sc"><bounds x="4" y="7.15" width="1.7" height="0.9" /></bezel>
- <bezel name="5.6" element="sc"><bounds x="6" y="7.15" width="1.7" height="0.9" /></bezel>
- <bezel name="5.8" element="sc"><bounds x="8" y="7.15" width="1.7" height="0.9" /></bezel>
- <bezel name="5.10" element="sc"><bounds x="10" y="7.15" width="1.7" height="0.9" /></bezel>
- <bezel name="5.12" element="sc"><bounds x="12" y="7.15" width="1.7" height="0.9" /></bezel>
-
-
- <bezel name="4.1" element="sr"><bounds x="0" y="9" width="1.7" height="0.9" /></bezel>
- <bezel name="4.3" element="sr"><bounds x="2" y="9" width="1.7" height="0.9" /></bezel>
- <bezel name="4.5" element="sr"><bounds x="4" y="9" width="1.7" height="0.9" /></bezel>
- <bezel name="4.7" element="sr"><bounds x="6" y="9" width="1.7" height="0.9" /></bezel>
- <bezel name="4.9" element="sr"><bounds x="8" y="9" width="1.7" height="0.9" /></bezel>
- <bezel name="4.11" element="sr"><bounds x="10" y="9" width="1.7" height="0.9" /></bezel>
- <bezel name="4.13" element="sr"><bounds x="12" y="9" width="1.7" height="0.9" /></bezel>
-
- <bezel name="4.0" element="sc"><bounds x="0" y="10.15" width="1.7" height="0.9" /></bezel>
- <bezel name="4.2" element="sc"><bounds x="2" y="10.15" width="1.7" height="0.9" /></bezel>
- <bezel name="4.4" element="sc"><bounds x="4" y="10.15" width="1.7" height="0.9" /></bezel>
- <bezel name="4.6" element="sc"><bounds x="6" y="10.15" width="1.7" height="0.9" /></bezel>
- <bezel name="4.8" element="sc"><bounds x="8" y="10.15" width="1.7" height="0.9" /></bezel>
- <bezel name="4.10" element="sc"><bounds x="10" y="10.15" width="1.7" height="0.9" /></bezel>
- <bezel name="4.12" element="sc"><bounds x="12" y="10.15" width="1.7" height="0.9" /></bezel>
-
-
- <bezel name="3.1" element="sr"><bounds x="0" y="12" width="1.7" height="0.9" /></bezel>
- <bezel name="3.3" element="sr"><bounds x="2" y="12" width="1.7" height="0.9" /></bezel>
- <bezel name="3.5" element="sr"><bounds x="4" y="12" width="1.7" height="0.9" /></bezel>
- <bezel name="3.7" element="sr"><bounds x="6" y="12" width="1.7" height="0.9" /></bezel>
- <bezel name="3.9" element="sr"><bounds x="8" y="12" width="1.7" height="0.9" /></bezel>
- <bezel name="3.11" element="sr"><bounds x="10" y="12" width="1.7" height="0.9" /></bezel>
- <bezel name="3.13" element="sr"><bounds x="12" y="12" width="1.7" height="0.9" /></bezel>
-
- <bezel name="3.0" element="sc"><bounds x="0" y="13.15" width="1.7" height="0.9" /></bezel>
- <bezel name="3.2" element="sc"><bounds x="2" y="13.15" width="1.7" height="0.9" /></bezel>
- <bezel name="3.4" element="sc"><bounds x="4" y="13.15" width="1.7" height="0.9" /></bezel>
- <bezel name="3.6" element="sc"><bounds x="6" y="13.15" width="1.7" height="0.9" /></bezel>
- <bezel name="3.8" element="sc"><bounds x="8" y="13.15" width="1.7" height="0.9" /></bezel>
- <bezel name="3.10" element="sc"><bounds x="10" y="13.15" width="1.7" height="0.9" /></bezel>
- <bezel name="3.12" element="sc"><bounds x="12" y="13.15" width="1.7" height="0.9" /></bezel>
-
-
- <bezel name="2.1" element="sr"><bounds x="0" y="15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.3" element="sr"><bounds x="2" y="15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.5" element="sr"><bounds x="4" y="15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.7" element="sr"><bounds x="6" y="15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.9" element="sr"><bounds x="8" y="15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.11" element="sr"><bounds x="10" y="15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.13" element="sr"><bounds x="12" y="15" width="1.7" height="0.9" /></bezel>
-
- <bezel name="2.0" element="sc"><bounds x="0" y="16.15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.2" element="sc"><bounds x="2" y="16.15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.4" element="sc"><bounds x="4" y="16.15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.6" element="sc"><bounds x="6" y="16.15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.8" element="sc"><bounds x="8" y="16.15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.10" element="sc"><bounds x="10" y="16.15" width="1.7" height="0.9" /></bezel>
- <bezel name="2.12" element="sc"><bounds x="12" y="16.15" width="1.7" height="0.9" /></bezel>
-
-
- <bezel name="1.1" element="sr"><bounds x="0" y="18" width="1.7" height="0.9" /></bezel>
- <bezel name="1.3" element="sr"><bounds x="2" y="18" width="1.7" height="0.9" /></bezel>
- <bezel name="1.5" element="sr"><bounds x="4" y="18" width="1.7" height="0.9" /></bezel>
- <bezel name="1.7" element="sr"><bounds x="6" y="18" width="1.7" height="0.9" /></bezel>
- <bezel name="1.9" element="sr"><bounds x="8" y="18" width="1.7" height="0.9" /></bezel>
- <bezel name="1.11" element="sr"><bounds x="10" y="18" width="1.7" height="0.9" /></bezel>
- <bezel name="1.13" element="sr"><bounds x="12" y="18" width="1.7" height="0.9" /></bezel>
-
- <bezel name="1.0" element="sc"><bounds x="0" y="19.15" width="1.7" height="0.9" /></bezel>
- <bezel name="1.2" element="sc"><bounds x="2" y="19.15" width="1.7" height="0.9" /></bezel>
- <bezel name="1.4" element="sc"><bounds x="4" y="19.15" width="1.7" height="0.9" /></bezel>
- <bezel name="1.6" element="sc"><bounds x="6" y="19.15" width="1.7" height="0.9" /></bezel>
- <bezel name="1.8" element="sc"><bounds x="8" y="19.15" width="1.7" height="0.9" /></bezel>
- <bezel name="1.10" element="sc"><bounds x="10" y="19.15" width="1.7" height="0.9" /></bezel>
- <bezel name="1.12" element="sc"><bounds x="12" y="19.15" width="1.7" height="0.9" /></bezel>
-
-
- <bezel name="0.1" element="sr"><bounds x="0" y="21" width="1.7" height="0.9" /></bezel>
- <bezel name="0.3" element="sr"><bounds x="2" y="21" width="1.7" height="0.9" /></bezel>
- <bezel name="0.5" element="sr"><bounds x="4" y="21" width="1.7" height="0.9" /></bezel>
- <bezel name="0.7" element="sr"><bounds x="6" y="21" width="1.7" height="0.9" /></bezel>
- <bezel name="0.9" element="sr"><bounds x="8" y="21" width="1.7" height="0.9" /></bezel>
- <bezel name="0.11" element="sr"><bounds x="10" y="21" width="1.7" height="0.9" /></bezel>
- <bezel name="0.13" element="sr"><bounds x="12" y="21" width="1.7" height="0.9" /></bezel>
-
- <bezel name="0.0" element="sc"><bounds x="0" y="22.15" width="1.7" height="0.9" /></bezel>
- <bezel name="0.2" element="sc"><bounds x="2" y="22.15" width="1.7" height="0.9" /></bezel>
- <bezel name="0.4" element="sc"><bounds x="4" y="22.15" width="1.7" height="0.9" /></bezel>
- <bezel name="0.6" element="sc"><bounds x="6" y="22.15" width="1.7" height="0.9" /></bezel>
- <bezel name="0.8" element="sc"><bounds x="8" y="22.15" width="1.7" height="0.9" /></bezel>
- <bezel name="0.10" element="sc"><bounds x="10" y="22.15" width="1.7" height="0.9" /></bezel>
- <bezel name="0.12" element="sc"><bounds x="12" y="22.15" width="1.7" height="0.9" /></bezel>
-
- <!-- 7seg panel -->
-
+ <bezel name="0.1" element="sr"><bounds x="0" y="0" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.3" element="sr"><bounds x="2" y="0" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.5" element="sr"><bounds x="4" y="0" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.7" element="sr"><bounds x="6" y="0" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.9" element="sr"><bounds x="8" y="0" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.11" element="sr"><bounds x="10" y="0" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.13" element="sr"><bounds x="12" y="0" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="0.0" element="sc"><bounds x="0" y="1.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.2" element="sc"><bounds x="2" y="1.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.4" element="sc"><bounds x="4" y="1.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.6" element="sc"><bounds x="6" y="1.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.8" element="sc"><bounds x="8" y="1.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.10" element="sc"><bounds x="10" y="1.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="0.12" element="sc"><bounds x="12" y="1.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="1.1" element="sr"><bounds x="0" y="3" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.3" element="sr"><bounds x="2" y="3" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.5" element="sr"><bounds x="4" y="3" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.7" element="sr"><bounds x="6" y="3" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.9" element="sr"><bounds x="8" y="3" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.11" element="sr"><bounds x="10" y="3" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.13" element="sr"><bounds x="12" y="3" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="1.0" element="sc"><bounds x="0" y="4.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.2" element="sc"><bounds x="2" y="4.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.4" element="sc"><bounds x="4" y="4.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.6" element="sc"><bounds x="6" y="4.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.8" element="sc"><bounds x="8" y="4.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.10" element="sc"><bounds x="10" y="4.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="1.12" element="sc"><bounds x="12" y="4.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="2.1" element="sr"><bounds x="0" y="6" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.3" element="sr"><bounds x="2" y="6" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.5" element="sr"><bounds x="4" y="6" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.7" element="sr"><bounds x="6" y="6" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.9" element="sr"><bounds x="8" y="6" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.11" element="sr"><bounds x="10" y="6" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.13" element="sr"><bounds x="12" y="6" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="2.0" element="sc"><bounds x="0" y="7.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.2" element="sc"><bounds x="2" y="7.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.4" element="sc"><bounds x="4" y="7.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.6" element="sc"><bounds x="6" y="7.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.8" element="sc"><bounds x="8" y="7.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.10" element="sc"><bounds x="10" y="7.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="2.12" element="sc"><bounds x="12" y="7.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="3.1" element="sr"><bounds x="0" y="9" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.3" element="sr"><bounds x="2" y="9" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.5" element="sr"><bounds x="4" y="9" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.7" element="sr"><bounds x="6" y="9" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.9" element="sr"><bounds x="8" y="9" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.11" element="sr"><bounds x="10" y="9" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.13" element="sr"><bounds x="12" y="9" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="3.0" element="sc"><bounds x="0" y="10.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.2" element="sc"><bounds x="2" y="10.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.4" element="sc"><bounds x="4" y="10.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.6" element="sc"><bounds x="6" y="10.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.8" element="sc"><bounds x="8" y="10.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.10" element="sc"><bounds x="10" y="10.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="3.12" element="sc"><bounds x="12" y="10.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="4.1" element="sr"><bounds x="0" y="12" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.3" element="sr"><bounds x="2" y="12" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.5" element="sr"><bounds x="4" y="12" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.7" element="sr"><bounds x="6" y="12" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.9" element="sr"><bounds x="8" y="12" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.11" element="sr"><bounds x="10" y="12" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.13" element="sr"><bounds x="12" y="12" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="4.0" element="sc"><bounds x="0" y="13.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.2" element="sc"><bounds x="2" y="13.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.4" element="sc"><bounds x="4" y="13.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.6" element="sc"><bounds x="6" y="13.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.8" element="sc"><bounds x="8" y="13.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.10" element="sc"><bounds x="10" y="13.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="4.12" element="sc"><bounds x="12" y="13.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="5.1" element="sr"><bounds x="0" y="15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.3" element="sr"><bounds x="2" y="15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.5" element="sr"><bounds x="4" y="15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.7" element="sr"><bounds x="6" y="15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.9" element="sr"><bounds x="8" y="15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.11" element="sr"><bounds x="10" y="15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.13" element="sr"><bounds x="12" y="15" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="5.0" element="sc"><bounds x="0" y="16.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.2" element="sc"><bounds x="2" y="16.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.4" element="sc"><bounds x="4" y="16.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.6" element="sc"><bounds x="6" y="16.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.8" element="sc"><bounds x="8" y="16.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.10" element="sc"><bounds x="10" y="16.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="5.12" element="sc"><bounds x="12" y="16.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="6.1" element="sr"><bounds x="0" y="18" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.3" element="sr"><bounds x="2" y="18" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.5" element="sr"><bounds x="4" y="18" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.7" element="sr"><bounds x="6" y="18" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.9" element="sr"><bounds x="8" y="18" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.11" element="sr"><bounds x="10" y="18" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.13" element="sr"><bounds x="12" y="18" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="6.0" element="sc"><bounds x="0" y="19.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.2" element="sc"><bounds x="2" y="19.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.4" element="sc"><bounds x="4" y="19.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.6" element="sc"><bounds x="6" y="19.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.8" element="sc"><bounds x="8" y="19.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.10" element="sc"><bounds x="10" y="19.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="6.12" element="sc"><bounds x="12" y="19.15" width="1.7" height="0.9" /></bezel>
+
+
+ <bezel name="7.1" element="sr"><bounds x="0" y="21" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.3" element="sr"><bounds x="2" y="21" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.5" element="sr"><bounds x="4" y="21" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.7" element="sr"><bounds x="6" y="21" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.9" element="sr"><bounds x="8" y="21" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.11" element="sr"><bounds x="10" y="21" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.13" element="sr"><bounds x="12" y="21" width="1.7" height="0.9" /></bezel>
+
+ <bezel name="7.0" element="sc"><bounds x="0" y="22.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.2" element="sc"><bounds x="2" y="22.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.4" element="sc"><bounds x="4" y="22.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.6" element="sc"><bounds x="6" y="22.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.8" element="sc"><bounds x="8" y="22.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.10" element="sc"><bounds x="10" y="22.15" width="1.7" height="0.9" /></bezel>
+ <bezel name="7.12" element="sc"><bounds x="12" y="22.15" width="1.7" height="0.9" /></bezel>
+
+ <!-- 7seg panel (3 of them N/C) -->
<bezel element="digit"><bounds x="20" y="2" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
- <bezel name="digit11" element="digit"><bounds x="20" y="4" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
- <bezel name="digit10" element="digit"><bounds x="20" y="6" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ <bezel name="digit8" element="digit"><bounds x="20" y="4" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ <bezel name="digit9" element="digit"><bounds x="20" y="6" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
<bezel element="digit"><bounds x="20" y="8" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
- <bezel name="digit99" element="digit"><bounds x="20" y="10" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
- <bezel name="digit99" element="digit"><bounds x="20" y="12" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ <bezel name="digit10" element="digit"><bounds x="20" y="10" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ <bezel name="digit11" element="digit"><bounds x="20" y="12" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
<bezel element="digit"><bounds x="20" y="14" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
- <bezel name="digit9" element="digit"><bounds x="20" y="16" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
- <bezel name="digit8" element="digit"><bounds x="20" y="18" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ <bezel name="digit12" element="digit"><bounds x="20" y="16" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ <bezel name="digit13" element="digit"><bounds x="20" y="18" width="2.5" height="1.5" /><orientation rotate="90" /></bezel>
+ </group>
+
+ <view name="Internal Layout">
+ <bounds left="-0.3" right="23" top="-0.3" bottom="23.3" />
+
+ <!-- default display orientation: visitor side at bottom -->
+ <group ref="display">
+ <bounds left="-0.3" right="23" top="-0.3" bottom="23.3" />
+ <orientation rotate="180" />
+ </group>
</view>
</mamelayout>
diff --git a/src/mame/layout/saitek_prschess.lay b/src/mame/layout/saitek_prschess.lay
index c938e7243b8..996d7b988da 100644
--- a/src/mame/layout/saitek_prschess.lay
+++ b/src/mame/layout/saitek_prschess.lay
@@ -6,8 +6,6 @@ license:CC0
<!-- define elements -->
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
-
<element name="hl" defstate="0">
<text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
<disk state="1">
@@ -426,6 +424,7 @@ license:CC0
<element name="8.3" ref="led2"><bounds x="123.25" y="70.666" width="1.5" height="1.5" /></element>
<element name="8.5" ref="led2"><bounds x="123.25" y="79.000" width="1.5" height="1.5" /></element>
+ <!-- there are no visible button squares, buttons are behind the labels -->
<element ref="hl" blend="add" inputtag="IN.0" inputmask="0x80"><bounds x="95" y="32.000" width="10" height="6" /></element>
<element ref="hl" blend="add" inputtag="IN.0" inputmask="0x40"><bounds x="95" y="40.333" width="10" height="6" /></element>
<element ref="hl" blend="add" inputtag="IN.0" inputmask="0x20"><bounds x="95" y="48.666" width="10" height="6" /></element>
diff --git a/src/mame/layout/saitek_schess.lay b/src/mame/layout/saitek_schess.lay
new file mode 100644
index 00000000000..2c84fe6a416
--- /dev/null
+++ b/src/mame/layout/saitek_schess.lay
@@ -0,0 +1,477 @@
+<?xml version="1.0"?>
+<!--
+license:CC0
+-->
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="led" defstate="0">
+ <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
+ <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
+ </element>
+
+ <element name="text_hn1"><text string="1"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn2"><text string="2"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn3"><text string="3"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn4"><text string="4"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn5"><text string="5"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn6"><text string="6"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn7"><text string="7"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hn8"><text string="8"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+
+ <element name="text_hl1"><text string="A"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl2"><text string="B"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl3"><text string="C"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl4"><text string="D"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl5"><text string="E"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl6"><text string="F"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl7"><text string="G"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_hl8"><text string="H"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+
+
+<!-- sb board -->
+
+ <element name="cblack"><rect><color red="0.41" green="0.4" blue="0.39" /></rect></element>
+ <element name="cwhite"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
+
+ <element name="hlbb" defstate="0">
+ <text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0" green="0" blue="0" />
+ </disk>
+ </element>
+
+ <element name="piece" defstate="0">
+ <image file="chess/wp.png" state="1"/>
+ <image file="chess/wn.png" state="2"/>
+ <image file="chess/wb.png" state="3"/>
+ <image file="chess/wr.png" state="4"/>
+ <image file="chess/wq.png" state="5"/>
+ <image file="chess/wk.png" state="6"/>
+
+ <image file="chess/bp.png" state="7"/>
+ <image file="chess/bn.png" state="8"/>
+ <image file="chess/bb.png" state="9"/>
+ <image file="chess/br.png" state="10"/>
+ <image file="chess/bq.png" state="11"/>
+ <image file="chess/bk.png" state="12"/>
+
+ <!-- selected pieces -->
+ <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
+ <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
+ <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
+ <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
+ <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
+ <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
+
+ <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
+ <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
+ <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
+ <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
+ <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
+ <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
+ </element>
+
+ <group name="sb_board">
+ <bounds x="0" y="0" width="80" height="80" />
+
+ <!-- squares (avoid seams) -->
+ <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+
+ <!-- leds -->
+ <repeat count="8">
+ <param name="y" start="8.3" increment="10" />
+ <param name="i1" start="7" increment="-1" />
+
+ <repeat count="8">
+ <param name="x" start="0.2" increment="10" />
+ <param name="i2" start="0" increment="1" />
+ <bezel name="~i2~.~i1~" element="led"><bounds x="~x~" y="~y~" width="1.5" height="1.5" /></bezel>
+ </repeat>
+ </repeat>
+
+ <!-- sensors, pieces -->
+ <repeat count="8">
+ <param name="y" start="0" increment="10" />
+ <param name="i" start="8" increment="-1" />
+
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+
+ <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
+ </repeat>
+ </group>
+
+
+<!-- sb ui -->
+
+ <element name="hlub" defstate="0">
+ <rect state="1"><color red="0" green="0" blue="0" /></rect>
+ </element>
+
+ <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uib3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu2a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu3a" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="2">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+ <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu3c" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="1">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+
+ <group name="sb_ui">
+ <bounds x="0" y="0" width="10" height="80" />
+ <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
+ <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
+ <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
+
+ <!-- board -->
+ <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
+
+ <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
+ <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- spawn -->
+ <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
+
+ <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
+ <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+
+ <!-- hand -->
+ <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
+ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
+ <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
+
+ <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
+ <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- undo -->
+ <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+
+ <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
+ <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
+ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
+ </group>
+
+
+<!-- buttons -->
+
+ <element name="black"><rect><color red="0.21" green="0.2" blue="0.2" /></rect></element>
+ <element name="rmask"><rect><color red="0.73" green="0.03" blue="0.09" /></rect></element>
+
+ <element name="hl" defstate="0">
+ <rect state="1"><color red="1" green="1" blue="1" /></rect>
+ </element>
+
+ <element name="text_l1"><text string="WHITE"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l2a"><text string="CLEAR"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l2b"><text string="BOARD"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l3a"><text string="VERIFY /"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l3b"><text string="SET UP"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l4"><text string="LEVEL"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l5"><text string="LEGAL"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l6"><text string="MOVE"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l7a"><text string="TAKE"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l7b"><text string="BACK"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l8"><text string="HINT"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l9"><text string="INTERRUPT"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l10a"><text string="PLAYER V"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l10b"><text string="COMPUTER"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l11a"><text string="CHANGE"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l11b"><text string="SIDES"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l12a"><text string="PLAYER V"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l12b"><text string="PLAYER"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l13"><text string="COMPUTING"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+ <element name="text_l14"><text string="RESET"><color red="0.61" green="0.62" blue="0.63" /></text></element>
+
+ <element name="text_p1"><image file="chess/wk.png"></image></element>
+ <element name="text_p2"><image file="chess/wq.png"></image></element>
+ <element name="text_p3"><image file="chess/wr.png"></image></element>
+ <element name="text_p4"><image file="chess/wb.png"></image></element>
+ <element name="text_p5"><image file="chess/wn.png"></image></element>
+ <element name="text_p6"><image file="chess/wp.png"></image></element>
+
+ <group name="buttons">
+ <bounds x="-1" y="0" width="20" height="30" />
+
+ <element ref="text_p1"><bounds x="1.6" y="0" width="1.8" height="1.8" /></element>
+ <element ref="text_p2"><bounds x="7.6" y="0" width="1.8" height="1.8" /></element>
+ <element ref="text_p3"><bounds x="13.6" y="0" width="1.8" height="1.8" /></element>
+ <element ref="text_p5"><bounds x="1.6" y="4" width="1.8" height="1.8" /></element>
+ <element ref="text_p4"><bounds x="7.6" y="4" width="1.8" height="1.8" /></element>
+ <element ref="text_p6"><bounds x="13.6" y="4" width="1.8" height="1.8" /></element>
+ <element ref="rmask" blend="multiply"><bounds x="0" y="0" width="20" height="20" /></element>
+
+ <element ref="text_l1"><bounds x="0" y="8.4" width="5" height="0.9" /></element>
+ <element ref="text_l2a"><bounds x="6" y="8" width="5" height="0.9" /></element>
+ <element ref="text_l2b"><bounds x="6" y="8.8" width="5" height="0.9" /></element>
+ <element ref="text_l3a"><bounds x="12" y="8" width="5" height="0.9" /></element>
+ <element ref="text_l3b"><bounds x="12" y="8.8" width="5" height="0.9" /></element>
+
+ <element ref="text_l4"><bounds x="0" y="12.4" width="5" height="0.9" /></element>
+ <element ref="text_l5"><bounds x="6" y="12.4" width="5" height="0.9" /></element>
+ <element ref="text_l6"><bounds x="12" y="12.4" width="5" height="0.9" /></element>
+
+ <element ref="text_l7a"><bounds x="0" y="16" width="5" height="0.9" /></element>
+ <element ref="text_l7b"><bounds x="0" y="16.8" width="5" height="0.9" /></element>
+ <element ref="text_l8"><bounds x="6" y="16.4" width="5" height="0.9" /></element>
+ <element ref="text_l9"><bounds x="12" y="16.4" width="5" height="0.9" /></element>
+
+ <element ref="text_l10a"><bounds x="0" y="20" width="5" height="0.9" /></element>
+ <element ref="text_l10b"><bounds x="0" y="20.8" width="5" height="0.9" /></element>
+ <element ref="text_l11a"><bounds x="6" y="20" width="5" height="0.9" /></element>
+ <element ref="text_l11b"><bounds x="6" y="20.8" width="5" height="0.9" /></element>
+ <element ref="text_l12a"><bounds x="12" y="20" width="5" height="0.9" /></element>
+ <element ref="text_l12b"><bounds x="12" y="20.8" width="5" height="0.9" /></element>
+
+ <element ref="text_l13"><bounds x="-1" y="26.15" width="7" height="0.9" /></element>
+ <element ref="text_l14"><bounds x="12" y="26.15" width="5" height="0.9" /></element>
+
+ <element ref="black" blend="add"><bounds x="0" y="0" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="6" y="0" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="0" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="0" y="4" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="6" y="4" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="4" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="0" y="8" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="6" y="8" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="8" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="0" y="12" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="6" y="12" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="12" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="0" y="16" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="6" y="16" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="16" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="0" y="20" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="6" y="20" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="20" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="0" y="25.75" width="5" height="3" /></element>
+ <element ref="black" blend="add"><bounds x="12" y="25.75" width="5" height="3" /></element>
+
+
+ <element name="8.5" ref="led"><bounds x="2.07" y="1.85" width="0.86" height="0.86" /></element>
+ <element name="8.4" ref="led"><bounds x="8.07" y="1.85" width="0.86" height="0.86" /></element>
+ <element name="8.3" ref="led"><bounds x="14.07" y="1.85" width="0.86" height="0.86" /></element>
+ <element name="8.2" ref="led"><bounds x="2.07" y="5.85" width="0.86" height="0.86" /></element>
+ <element name="8.1" ref="led"><bounds x="8.07" y="5.85" width="0.86" height="0.86" /></element>
+ <element name="8.0" ref="led"><bounds x="14.07" y="5.85" width="0.86" height="0.86" /></element>
+
+ <element name="9.5" ref="led"><bounds x="2.07" y="9.85" width="0.86" height="0.86" /></element>
+ <element name="9.4" ref="led"><bounds x="14.07" y="9.85" width="0.86" height="0.86" /></element>
+ <element name="9.3" ref="led"><bounds x="2.07" y="21.85" width="0.86" height="0.86" /></element>
+ <element name="9.2" ref="led"><bounds x="8.07" y="21.85" width="0.86" height="0.86" /></element>
+ <element name="9.1" ref="led"><bounds x="14.07" y="21.85" width="0.86" height="0.86" /></element>
+ <element name="9.0" ref="led"><bounds x="2.07" y="27.4" width="0.86" height="0.86" /></element>
+
+ <element ref="hl" inputtag="IN.0" inputmask="0x80"><bounds x="0" y="0" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x80"><bounds x="6" y="0" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x40"><bounds x="12" y="0" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x40"><bounds x="0" y="4" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x80"><bounds x="6" y="4" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x40"><bounds x="12" y="4" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x20"><bounds x="0" y="8" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x10"><bounds x="6" y="8" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x20"><bounds x="12" y="8" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x10"><bounds x="0" y="12" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x20"><bounds x="6" y="12" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x10"><bounds x="12" y="12" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x08"><bounds x="0" y="16" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x08"><bounds x="6" y="16" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x08"><bounds x="12" y="16" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x04"><bounds x="0" y="20" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x04"><bounds x="6" y="20" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x04"><bounds x="12" y="20" width="5" height="3" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x02"><bounds x="12" y="25.75" width="5" height="3" /><color alpha="0.15" /></element>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="-6" right="132" top="6" bottom="94" />
+
+ <group ref="sb_board"><bounds x="10" y="10" width="80" height="80" /></group>
+ <group ref="sb_ui"><bounds x="-4.5" y="10" width="10" height="80" /></group>
+
+ <group ref="buttons"><bounds x="96" y="40" width="34.75" height="52.125" /></group>
+
+ <repeat count="8">
+ <param name="x" start="10" increment="10" />
+ <param name="i" start="1" increment="1" />
+ <element ref="text_hl~i~"><bounds x="~x~" y="91" width="10" height="2" /></element>
+ </repeat>
+ <repeat count="8">
+ <param name="y" start="14" increment="10" />
+ <param name="i" start="8" increment="-1" />
+ <element ref="text_hn~i~"><bounds x="6" y="~y~" width="4" height="2" /></element>
+ </repeat>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/sstrangr.lay b/src/mame/layout/sstrangr.lay
index 2e1cdd9e71e..a938fa4d150 100644
--- a/src/mame/layout/sstrangr.lay
+++ b/src/mame/layout/sstrangr.lay
@@ -5,31 +5,35 @@ license:CC0
<mamelayout version="2">
<element name="overlay upright">
<rect>
- <bounds left="0" top="0" right="224" bottom="256" />
- <color red="1" green="1" blue="1" />
- </rect>
- <rect>
<bounds left="0" top="0" right="67" bottom="32" />
<color red="0.113" green="0.672" blue="0.980" />
</rect>
<rect>
- <bounds left="68" top="0" right="148" bottom="32" />
+ <bounds left="67" top="0" right="148" bottom="32" />
<color red="0.039" green="0.922" blue="0.625" />
</rect>
<rect>
- <bounds left="149" top="0" right="224" bottom="32" />
+ <bounds left="148" top="0" right="224" bottom="32" />
<color red="0.113" green="0.672" blue="0.980" />
</rect>
<rect>
- <bounds left="0" top="32" right="224" bottom="63" />
+ <bounds left="0" top="32" right="224" bottom="64" />
<color red="0.832" green="0.199" blue="0.375" />
</rect>
<rect>
- <bounds left="0" top="64" right="224" bottom="231" />
+ <bounds left="0" top="64" right="224" bottom="186" />
+ <color red="1" green="1" blue="0.322" />
+ </rect>
+ <rect>
+ <bounds left="0" top="186" right="224" bottom="215" />
+ <color red="1" green="0.647" blue="0" />
+ </rect>
+ <rect>
+ <bounds left="0" top="215" right="224" bottom="231" />
<color red="1" green="1" blue="0.322" />
</rect>
<rect>
- <bounds left="0" top="232" right="224" bottom="256" />
+ <bounds left="0" top="231" right="224" bottom="256" />
<color red="0.113" green="0.672" blue="0.980" />
</rect>
</element>
diff --git a/src/mame/layout/videosaa.lay b/src/mame/layout/videosaa.lay
new file mode 100644
index 00000000000..3daf74a10e7
--- /dev/null
+++ b/src/mame/layout/videosaa.lay
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+license: CC0
+copyright-holders: Dirk Best
+
+Simple layout for games running on Videos A A hardware
+-->
+
+<mamelayout version="2">
+ <element name="background">
+ </element>
+ <element name="button" defstate="0">
+ <rect state="0">
+ <color red="0.2" green="0.2" blue="0.2" />
+ </rect>
+ <rect state="1">
+ <color red="0.8" green="0.8" blue="0.8" />
+ </rect>
+ </element>
+ <element name="start" defstate="0">
+ <rect state="0">
+ <color red="0.2" green="0.2" blue="0.2" />
+ </rect>
+ <rect state="1">
+ <color red="0.8" green="0.8" blue="0.8" />
+ </rect>
+ <text string="START"><color red="0.1" green="0.1" blue="0.1" /></text>
+ </element>
+ <view name="Buttons">
+ <backdrop element="background">
+ <bounds x="0" y="0" width="640" height="640" />
+ </backdrop>
+ <screen index="0">
+ <bounds left="0" top="0" right="640" bottom="480" />
+ </screen>
+ <cpanel name="lamp0" element="button" inputtag="in1" inputmask="0x01">
+ <bounds x="80" y="505" width="70" height="35" />
+ </cpanel>
+ <cpanel name="lamp1" element="button" inputtag="in1" inputmask="0x02">
+ <bounds x="180" y="505" width="70" height="35" />
+ </cpanel>
+ <cpanel name="lamp2" element="button" inputtag="in1" inputmask="0x04">
+ <bounds x="280" y="505" width="70" height="35" />
+ </cpanel>
+ <cpanel name="lamp3" element="button" inputtag="in1" inputmask="0x08">
+ <bounds x="380" y="505" width="70" height="35" />
+ </cpanel>
+ <cpanel name="lamp4" element="button" inputtag="in1" inputmask="0x10">
+ <bounds x="480" y="505" width="70" height="35" />
+ </cpanel>
+ <cpanel name="lamp5" element="start" inputtag="in1" inputmask="0x20">
+ <bounds x="250" y="565" width="130" height="35" />
+ </cpanel>
+ </view>
+</mamelayout>
diff --git a/src/mame/machine/3dom2.cpp b/src/mame/machine/3dom2.cpp
index b6bc96e2f7b..e90a307dd67 100644
--- a/src/mame/machine/3dom2.cpp
+++ b/src/mame/machine/3dom2.cpp
@@ -213,6 +213,7 @@ m2_bda_device::m2_bda_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, M2_BDA, tag, owner, clock),
m_cpu1(*this, finder_base::DUMMY_TAG),
m_cpu2(*this, finder_base::DUMMY_TAG),
+ m_cde(*this, finder_base::DUMMY_TAG),
m_videores_in(*this),
m_memctl(*this, "memctl"),
m_powerbus(*this, "powerbus"),
@@ -471,21 +472,14 @@ void m2_bda_device::configure_ppc_address_map(address_space &space)
space.install_readwrite_handler(POWERBUS_BASE, POWERBUS_BASE + DEVICE_MASK,read32_delegate(*m_powerbus, FUNC(m2_powerbus_device::read)), write32_delegate(*m_powerbus, FUNC(m2_powerbus_device::write)), 0xffffffffffffffffULL);
space.install_readwrite_handler(MEMCTL_BASE, MEMCTL_BASE + DEVICE_MASK, read32_delegate(*m_memctl, FUNC(m2_memctl_device::read)), write32_delegate(*m_memctl, FUNC(m2_memctl_device::write)), 0xffffffffffffffffULL);
space.install_readwrite_handler(VDU_BASE, VDU_BASE + DEVICE_MASK, read32_delegate(*m_vdu, FUNC(m2_vdu_device::read)), write32_delegate(*m_vdu, FUNC(m2_vdu_device::write)), 0xffffffffffffffffULL);
- space.install_readwrite_handler(TE_BASE, TE_BASE + DEVICE_MASK, read32_delegate(*m_te, FUNC(m2_te_device::read)), write32_delegate(*m_te, FUNC(m2_te_device::write)), 0xffffffffffffffffULL);
+ space.install_readwrite_handler(TE_BASE, TE_BASE + DEVICE_MASK, read32sm_delegate(*m_te, FUNC(m2_te_device::read)), write32sm_delegate(*m_te, FUNC(m2_te_device::write)), 0xffffffffffffffffULL);
space.install_readwrite_handler(DSP_BASE, DSP_BASE + DEVICE_MASK, read32_delegate(*m_dspp, FUNC(dspp_device::read)), write32_delegate(*m_dspp, FUNC(dspp_device::write)), 0xffffffffffffffffULL);
space.install_readwrite_handler(CTRLPORT_BASE, CTRLPORT_BASE + DEVICE_MASK,read32_delegate(*m_ctrlport, FUNC(m2_ctrlport_device::read)), write32_delegate(*m_ctrlport, FUNC(m2_ctrlport_device::write)), 0xffffffffffffffffULL);
space.install_readwrite_handler(MPEG_BASE, MPEG_BASE + DEVICE_MASK, read32_delegate(*m_mpeg, FUNC(m2_mpeg_device::read)), write32_delegate(*m_mpeg, FUNC(m2_mpeg_device::write)), 0xffffffffffffffffULL);
space.install_readwrite_handler(CPUID_BASE, CPUID_BASE + DEVICE_MASK, read32_delegate(*this, FUNC(m2_bda_device::cpu_id_r)), write32_delegate(*this, FUNC(m2_bda_device::cpu_id_w)), 0xffffffffffffffffULL);
-
- // Find and install the CDE
- m2_cde_device *cde = downcast<m2_cde_device *>(machine().device("cde"));
-
- if (!cde)
- throw emu_fatalerror("BDA: Could not find the CDE device!");
-
- space.install_readwrite_handler(SLOT4_BASE, SLOT4_BASE + SLOT_MASK, read32_delegate(*cde, FUNC(m2_cde_device::read)), write32_delegate(*cde, FUNC(m2_cde_device::write)), 0xffffffffffffffffULL);
+ space.install_readwrite_handler(SLOT4_BASE, SLOT4_BASE + SLOT_MASK, read32_delegate(*m_cde, FUNC(m2_cde_device::read)), write32_delegate(*m_cde, FUNC(m2_cde_device::write)), 0xffffffffffffffffULL);
}
@@ -1497,6 +1491,7 @@ WRITE32_MEMBER( m2_ctrlport_device::write )
m2_cde_device::m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, M2_CDE, tag, owner, clock),
m_cpu1(*this, finder_base::DUMMY_TAG),
+ m_bda(*this, finder_base::DUMMY_TAG),
m_int_handler(*this),
m_sdbg_out_handler(*this)
{
@@ -1509,13 +1504,6 @@ m2_cde_device::m2_cde_device(const machine_config &mconfig, const char *tag, dev
void m2_cde_device::device_start()
{
- // Find our friend the BDA
- m_bda = downcast<m2_bda_device *>(machine().device("bda"));
- assert(m_bda != nullptr);
-
- if (m_bda == nullptr)
- throw device_missing_dependencies();
-
// Resolve callbacks
m_int_handler.resolve_safe();
m_sdbg_out_handler.resolve_safe();
diff --git a/src/mame/machine/3dom2.h b/src/mame/machine/3dom2.h
index 4e59f116ec4..137f9dce6cf 100644
--- a/src/mame/machine/3dom2.h
+++ b/src/mame/machine/3dom2.h
@@ -119,12 +119,13 @@ public:
RAM_16MB = 16
};
- template <typename T, typename U>
- m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu1_tag, U &&cpu2_tag)
+ template <typename T, typename U, typename V>
+ m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu1_tag, U &&cpu2_tag, V &&cde_tag)
: m2_bda_device(mconfig, tag, owner, clock)
{
m_cpu1.set_tag(std::forward<T>(cpu1_tag));
m_cpu2.set_tag(std::forward<U>(cpu2_tag));
+ m_cde.set_tag(std::forward<V>(cde_tag));
}
m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -211,6 +212,7 @@ private:
public: // TODO: THIS SHOULD NOT BE PUBLIC
required_device<ppc_device> m_cpu1;
required_device<ppc_device> m_cpu2;
+ required_device<m2_cde_device> m_cde;
devcb_read_line m_videores_in;
// Sub-devices
@@ -505,11 +507,12 @@ private:
class m2_cde_device : public device_t
{
public:
- template <typename T>
- m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu1_tag)
+ template <typename T, typename U>
+ m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu1_tag, U &&bda_tag)
: m2_cde_device(mconfig, tag, owner, clock)
{
m_cpu1.set_tag(std::forward<T>(cpu1_tag));
+ m_bda.set_tag(std::forward<U>(bda_tag));
}
m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -701,7 +704,7 @@ private:
}
required_device<ppc_device> m_cpu1;
- m2_bda_device *m_bda; // todo
+ required_device<m2_bda_device> m_bda;
devcb_write_line m_int_handler;
devcb_write32 m_sdbg_out_handler;
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp
index b786d8ce85c..a8b136017db 100644
--- a/src/mame/machine/6883sam.cpp
+++ b/src/mame/machine/6883sam.cpp
@@ -88,6 +88,8 @@ sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, d
, m_space_FFE0(*this)
, m_space_FFF2(*this)
{
+ for (int i = 0; i < 8; i++)
+ m_banks[i].m_memory_offset = 0;
}
sam6883_friend_device_interface::sam6883_friend_device_interface(const machine_config &mconfig, device_t &device, int divider)
diff --git a/src/mame/machine/alpha8201.cpp b/src/mame/machine/alpha8201.cpp
index 5b510c92b89..b287e605154 100644
--- a/src/mame/machine/alpha8201.cpp
+++ b/src/mame/machine/alpha8201.cpp
@@ -26,12 +26,12 @@ Splendor Blast 1985 8303 (post)
Gekisou 1985 8304 (post)
The Koukou Yakyuu 1985 8304 (post)
High Voltage 1985 8304?(post says 8404, but readme says 8304)
-unknown CLS bingo game 1986 8505
+Bingo Time 1986 8505
ALPHA-8201: "44801A75" -> HD44801, ROM code = A75
ALPHA-8302: "44801B35" -> HD44801, ROM code = B35
ALPHA-8303: "44801B42" -> HD44801, ROM code = B42
-ALPHA-8304: ?
+ALPHA-8304: "44801B43" -> HD44801, ROM code = B43
ALPHA-8505: "44801C57" -> HD44801, ROM code = C57
diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp
index ddec93c8012..1290fd28294 100644
--- a/src/mame/machine/amiga.cpp
+++ b/src/mame/machine/amiga.cpp
@@ -326,7 +326,7 @@ TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback )
void amiga_state::set_interrupt(int interrupt)
{
- custom_chip_w(m_maincpu->space(AS_PROGRAM), REG_INTREQ, interrupt, 0xffff);
+ custom_chip_w(REG_INTREQ, interrupt);
}
bool amiga_state::int2_pending()
@@ -1256,7 +1256,7 @@ READ16_MEMBER( amiga_state::custom_chip_r )
return 0xffff;
}
-WRITE16_MEMBER( amiga_state::custom_chip_w )
+void amiga_state::custom_chip_w(offs_t offset, uint16_t data)
{
uint16_t temp;
offset &= 0xff;
@@ -1265,7 +1265,7 @@ WRITE16_MEMBER( amiga_state::custom_chip_w )
logerror("%06X:write to custom %s = %04X\n", m_maincpu->pc(), s_custom_reg_names[offset & 0xff], data);
// paula will handle some of those registers
- m_paula->reg_w(space, offset, data, mem_mask);
+ m_paula->reg_w(offset, data);
switch (offset)
{
diff --git a/src/mame/machine/apexc.cpp b/src/mame/machine/apexc.cpp
index e5b2b5a0f2f..ac6ac199ef1 100644
--- a/src/mame/machine/apexc.cpp
+++ b/src/mame/machine/apexc.cpp
@@ -75,7 +75,7 @@ apexc_tape_puncher_image_device::apexc_tape_puncher_image_device(const machine_c
Punch a tape character
*/
-WRITE8_MEMBER(apexc_tape_puncher_image_device::write)
+void apexc_tape_puncher_image_device::write(uint8_t data)
{
if (exists())
{
diff --git a/src/mame/machine/apexc.h b/src/mame/machine/apexc.h
index 8d2ba5f59d5..0a616cf7ebc 100644
--- a/src/mame/machine/apexc.h
+++ b/src/mame/machine/apexc.h
@@ -111,7 +111,7 @@ public:
virtual bool is_reset_on_load() const noexcept override { return false; }
virtual const char *file_extensions() const noexcept override { return "tap"; }
- DECLARE_WRITE8_MEMBER(write);
+ void write(uint8_t data);
private:
virtual void device_start() override { }
diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp
index 031f27fb196..86f8cc67ac3 100644
--- a/src/mame/machine/archimds.cpp
+++ b/src/mame/machine/archimds.cpp
@@ -471,7 +471,7 @@ READ32_MEMBER( archimedes_state::ioc_ctrl_r )
}
case KART: // keyboard read
- return m_kart->read(space,0);
+ return m_kart->read();
case IRQ_STATUS_A:
return (m_ioc_regs[IRQ_STATUS_A] & 0x7f) | 0x80; // Force IRQ is always '1'
@@ -552,7 +552,7 @@ WRITE32_MEMBER( archimedes_state::ioc_ctrl_w )
break;
case KART:
- m_kart->write(space,0,data);
+ m_kart->write(data);
break;
case IRQ_MASK_A:
@@ -811,10 +811,10 @@ WRITE32_MEMBER(archimedes_state::archimedes_ioc_w)
case 0x18: // latch B
/*
---- x--- floppy controller reset
+ ---x ---- printer strobe
*/
m_fdc->dden_w(BIT(data, 1));
- if (!(data & 8))
- m_fdc->soft_reset();
+ m_fdc->mr_w(BIT(data, 3));
if(data & ~0xa)
printf("%02x Latch B\n",data);
return;
diff --git a/src/mame/machine/asteroid.cpp b/src/mame/machine/asteroid.cpp
index c22dd37822c..69c8818de1c 100644
--- a/src/mame/machine/asteroid.cpp
+++ b/src/mame/machine/asteroid.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard van der Bas
/***************************************************************************
- machine.c
+ machine/asteroid.cpp
Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
I/O ports)
@@ -106,7 +106,7 @@ READ8_MEMBER(asteroid_state::asteroid_DSW1_r)
m_dsw_sel->i0a_w(BIT(val, 6));
m_dsw_sel->i0b_w(BIT(val, 7));
- m_dsw_sel->s_w(space, 0, offset & 0x03);
+ m_dsw_sel->s_w(offset & 0x03);
return 0xfc | (m_dsw_sel->zb_r() << 1) | m_dsw_sel->za_r();
}
@@ -133,7 +133,7 @@ void asteroid_state::machine_reset()
{
m_dvg->reset_w();
if (m_earom.found())
- earom_control_w(machine().dummy_space(), 0, 0);
+ earom_control_w(0);
/* reset RAM banks if present */
if (m_ram1.target() != nullptr)
diff --git a/src/mame/machine/balsente.cpp b/src/mame/machine/balsente.cpp
index b8c9939079b..af750998a90 100644
--- a/src/mame/machine/balsente.cpp
+++ b/src/mame/machine/balsente.cpp
@@ -248,8 +248,8 @@ READ8_MEMBER(balsente_state::novram_8bit_r)
WRITE8_MEMBER(balsente_state::novram_8bit_w)
{
- m_novram[0]->write(space, offset, data & 0x0f);
- m_novram[1]->write(space, offset, data >> 4);
+ m_novram[0]->write(offset, data & 0x0f);
+ m_novram[1]->write(offset, data >> 4);
}
diff --git a/src/mame/machine/bublbobl.cpp b/src/mame/machine/bublbobl.cpp
index c9d9f2c9ce2..8824c4519fd 100644
--- a/src/mame/machine/bublbobl.cpp
+++ b/src/mame/machine/bublbobl.cpp
@@ -40,7 +40,7 @@ void bublbobl_state::common_sreset(int state)
// 44 74 74 76 or 76 36 76 once or more per frame...
*/
-WRITE8_MEMBER(bublbobl_state::bublbobl_bankswitch_w)
+void bublbobl_state::bublbobl_bankswitch_w(uint8_t data)
{
//logerror("bankswitch_w: write of %02X\n", data);
/* bits 0-2 select ROM bank */
@@ -72,7 +72,7 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_bankswitch_w)
\-------- ? used (idle high, /SRESET?)
// bublboblp: test and main: 00 C8 C9 C8 C9...; tokio: test 00 09 09 49 main 00 09 C8 CF
*/
-WRITE8_MEMBER(bublbobl_state::tokio_bankswitch_w)
+void bublbobl_state::tokio_bankswitch_w(uint8_t data)
{
/* bits 0-2 select ROM bank */
membank("bank1")->set_entry(data & 7);
@@ -99,7 +99,7 @@ WRITE8_MEMBER(bublbobl_state::tokio_bankswitch_w)
|\------- ? used (idle high, /SBRES? or /SBINT?)
\-------- VHINV (flip screen)
*/
-WRITE8_MEMBER(bublbobl_state::tokio_videoctrl_w)
+void bublbobl_state::tokio_videoctrl_w(uint8_t data)
{
//logerror("tokio_videoctrl_w: write of %02X\n", data);
/* bits 0-3 not used? */
@@ -424,7 +424,7 @@ WRITE8_MEMBER(bub68705_state::port_b_w)
//logerror("%04x: 68705 port B write %02x\n", m_mcu->pc(), data);
if (BIT(mem_mask, 0) && !BIT(data, 0) && BIT(m_port_b_out, 0))
- m_mcu->pa_w(space, 0, m_latch);
+ m_mcu->pa_w(m_latch);
if (BIT(mem_mask, 1) && BIT(data, 1) && !BIT(m_port_b_out, 1)) /* positive edge trigger */
{
diff --git a/src/mame/machine/decocass.cpp b/src/mame/machine/decocass.cpp
index fbda017d473..43cc85dad2f 100644
--- a/src/mame/machine/decocass.cpp
+++ b/src/mame/machine/decocass.cpp
@@ -251,7 +251,7 @@ READ8_MEMBER(decocass_type1_state::decocass_type1_r)
if (1 == (offset & 1))
{
if (0 == (offset & E5XX_MASK))
- data = m_mcu->upi41_master_r(space,1);
+ data = m_mcu->upi41_master_r(1);
else
data = 0xff;
@@ -281,11 +281,11 @@ READ8_MEMBER(decocass_type1_state::decocass_type1_r)
}
if (0 == (offset & E5XX_MASK))
- data = m_mcu->upi41_master_r(space,0);
+ data = m_mcu->upi41_master_r(0);
else
data = 0xff;
- save = data; /* save the unmodifed data for the latch */
+ save = data; /* save the unmodified data for the latch */
promaddr = 0;
int promshift = 0;
@@ -528,7 +528,7 @@ READ8_MEMBER(decocass_type2_state::decocass_type2_r)
else
{
if (0 == (offset & E5XX_MASK))
- data = m_mcu->upi41_master_r(space,offset);
+ data = m_mcu->upi41_master_r(offset);
else
data = offset & 0xff;
@@ -565,7 +565,7 @@ WRITE8_MEMBER(decocass_type2_state::decocass_type2_w)
LOG(3,("PROM:%s D2:%d", m_type2_xx_latch ? "on" : "off", m_type2_d2_latch));
}
}
- m_mcu->upi41_master_w(space,offset & 1, data);
+ m_mcu->upi41_master_w(offset & 1, data);
#ifdef MAME_DEBUG
decocass_fno(offset, data);
@@ -608,7 +608,7 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,1);
+ data = m_mcu->upi41_master_r(1);
LOG(4,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data));
}
else
@@ -629,7 +629,7 @@ READ8_MEMBER(decocass_type3_state::decocass_type3_r)
{
if (0 == (offset & E5XX_MASK))
{
- save = m_mcu->upi41_master_r(space,0);
+ save = m_mcu->upi41_master_r(0);
switch (m_type3_swap)
{
case TYPE3_SWAP_01:
@@ -812,7 +812,7 @@ WRITE8_MEMBER(decocass_type3_state::decocass_type3_w)
}
}
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
- m_mcu->upi41_master_w(space,offset, data);
+ m_mcu->upi41_master_w(offset, data);
}
/***************************************************************************
@@ -836,7 +836,7 @@ READ8_MEMBER(decocass_type4_state::decocass_type4_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,1);
+ data = m_mcu->upi41_master_r(1);
LOG(4,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data));
}
else
@@ -859,7 +859,7 @@ READ8_MEMBER(decocass_type4_state::decocass_type4_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,0);
+ data = m_mcu->upi41_master_r(0);
LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.'));
}
else
@@ -899,7 +899,7 @@ WRITE8_MEMBER(decocass_type4_state::decocass_type4_w)
}
}
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
- m_mcu->upi41_master_w(space,offset, data);
+ m_mcu->upi41_master_w(offset, data);
}
/***************************************************************************
@@ -919,7 +919,7 @@ READ8_MEMBER(decocass_type5_state::decocass_type5_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,1);
+ data = m_mcu->upi41_master_r(1);
LOG(4,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data));
}
else
@@ -939,7 +939,7 @@ READ8_MEMBER(decocass_type5_state::decocass_type5_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,0);
+ data = m_mcu->upi41_master_r(0);
LOG(3,("%10s 6502-PC: %04x decocass_type5_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.'));
}
else
@@ -976,7 +976,7 @@ WRITE8_MEMBER(decocass_type5_state::decocass_type5_w)
}
}
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
- m_mcu->upi41_master_w(space,offset, data);
+ m_mcu->upi41_master_w(offset, data);
}
/***************************************************************************
@@ -995,7 +995,7 @@ READ8_MEMBER(decocass_nodong_state::decocass_nodong_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,1);
+ data = m_mcu->upi41_master_r(1);
LOG(4,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data));
}
else
@@ -1008,7 +1008,7 @@ READ8_MEMBER(decocass_nodong_state::decocass_nodong_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,0);
+ data = m_mcu->upi41_master_r(0);
LOG(3,("%10s 6502-PC: %04x decocass_nodong_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.'));
}
else
@@ -1039,7 +1039,7 @@ READ8_MEMBER(decocass_widel_state::decocass_widel_r)
{
if (m_widel_latch && !machine().side_effects_disabled())
m_widel_ctrs = (m_widel_ctrs + 0x100) & 0xfffff;
- data = m_mcu->upi41_master_r(space,1);
+ data = m_mcu->upi41_master_r(1);
LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- 8041 STATUS\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data));
}
else
@@ -1064,7 +1064,7 @@ READ8_MEMBER(decocass_widel_state::decocass_widel_r)
{
if (0 == (offset & E5XX_MASK))
{
- data = m_mcu->upi41_master_r(space,0);
+ data = m_mcu->upi41_master_r(0);
LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, (data >= 32) ? data : '.'));
}
else
@@ -1108,7 +1108,7 @@ WRITE8_MEMBER(decocass_widel_state::decocass_widel_w)
}
}
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
- m_mcu->upi41_master_w(space,offset, data);
+ m_mcu->upi41_master_w(offset, data);
}
/***************************************************************************
@@ -1170,7 +1170,7 @@ WRITE8_MEMBER(decocass_state::decocass_e5xx_w)
if (0 == (offset & E5XX_MASK))
{
LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", machine().time().as_string(6), m_maincpu->pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA"));
- m_mcu->upi41_master_w(space,offset & 1, data);
+ m_mcu->upi41_master_w(offset & 1, data);
#ifdef MAME_DEBUG
decocass_fno(offset, data);
#endif
diff --git a/src/mame/machine/dgnalpha.cpp b/src/mame/machine/dgnalpha.cpp
index dc48b3fa712..c13884e227c 100644
--- a/src/mame/machine/dgnalpha.cpp
+++ b/src/mame/machine/dgnalpha.cpp
@@ -77,7 +77,6 @@ keeping track of it in a variable in the driver.
void dragon_alpha_state::device_start(void)
{
dragon_state::device_start();
- save_item(NAME(m_just_reset));
}
@@ -89,7 +88,6 @@ void dragon_alpha_state::device_start(void)
void dragon_alpha_state::device_reset(void)
{
dragon_state::device_reset();
- m_just_reset = 1;
}
@@ -242,7 +240,7 @@ WRITE8_MEMBER( dragon_alpha_state::pia2_pa_w )
m_ay8912->data_w(m_pia_2->b_output());
break;
case 0x02: /* Read from selected port */
- m_pia_2->write_portb(m_ay8912->data_r());
+ m_pia_2->portb_w(m_ay8912->data_r());
break;
case 0x03: /* Select port to write to */
m_ay8912->address_w(m_pia_2->b_output());
@@ -317,19 +315,16 @@ WRITE8_MEMBER( dragon_alpha_state::psg_porta_write )
floppy_image_device *floppy = nullptr;
- if (BIT(data, 0)) floppy = m_floppy0->get_device();
- if (BIT(data, 1)) floppy = m_floppy1->get_device();
- if (BIT(data, 2)) floppy = m_floppy2->get_device();
- if (BIT(data, 3)) floppy = m_floppy3->get_device();
+ for (int n = 0; n < 4; n++)
+ if (BIT(data, n))
+ floppy = m_floppy[n]->get_device();
m_fdc->set_floppy(floppy);
// todo: turning the motor on with bit 4 isn't giving the drive enough
// time to spin up, how does it work in hardware?
- if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(0);
- if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(0);
- if (m_floppy2->get_device()) m_floppy2->get_device()->mon_w(0);
- if (m_floppy3->get_device()) m_floppy3->get_device()->mon_w(0);
+ for (auto &f : m_floppy)
+ if (f->get_device()) f->get_device()->mon_w(0);
m_fdc->dden_w(BIT(data, 5));
}
@@ -347,15 +342,8 @@ WRITE_LINE_MEMBER( dragon_alpha_state::fdc_intrq_w )
{
if (state)
{
- if (m_just_reset)
- {
- m_just_reset = 0;
- }
- else
- {
- if (m_pia_2->ca2_output_z())
- m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
- }
+ if (m_pia_2->ca2_output_z())
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
else
{
diff --git a/src/mame/machine/dmac_0448.cpp b/src/mame/machine/dmac_0448.cpp
new file mode 100644
index 00000000000..578c09fafd8
--- /dev/null
+++ b/src/mame/machine/dmac_0448.cpp
@@ -0,0 +1,189 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+/*
+ * Sony NEWS DMAC 0448 device.
+ *
+ * Sources:
+ * - https://github.com/NetBSD/src/blob/trunk/sys/arch/newsmips/dev/dmac_0448.h
+ *
+ * TODO:
+ * - 16 and 32 bit transfers
+ * - terminal count handling
+ * - save state
+ */
+
+#include "emu.h"
+#include "dmac_0448.h"
+
+#define VERBOSE 0
+#include "logmacro.h"
+
+DEFINE_DEVICE_TYPE(DMAC_0448, dmac_0448_device, "dmac_0448", "Sony DMA Controller 0448")
+
+dmac_0448_device::dmac_0448_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, DMAC_0448, tag, owner, clock)
+ , m_bus(*this, finder_base::DUMMY_TAG, -1, 32)
+ , m_out_int(*this)
+ , m_dma_r(*this)
+ , m_dma_w(*this)
+{
+}
+
+void dmac_0448_device::map(address_map &map)
+{
+ map(0x2, 0x2).r(FUNC(dmac_0448_device::cstat_r));
+ map(0x3, 0x3).w(FUNC(dmac_0448_device::cctl_w));
+ map(0x4, 0x4).rw(FUNC(dmac_0448_device::ctrcl_r), FUNC(dmac_0448_device::ctrcl_w));
+ map(0x5, 0x5).rw(FUNC(dmac_0448_device::ctrcm_r), FUNC(dmac_0448_device::ctrcm_w));
+ map(0x6, 0x6).rw(FUNC(dmac_0448_device::ctrch_r), FUNC(dmac_0448_device::ctrch_w));
+ map(0x7, 0x7).rw(FUNC(dmac_0448_device::ctag_r), FUNC(dmac_0448_device::ctag_w));
+ map(0x8, 0x8).rw(FUNC(dmac_0448_device::cwid_r), FUNC(dmac_0448_device::cwid_w));
+ map(0x9, 0x9).rw(FUNC(dmac_0448_device::cofsl_r), FUNC(dmac_0448_device::cofsl_w));
+ map(0xa, 0xa).rw(FUNC(dmac_0448_device::cofsh_r), FUNC(dmac_0448_device::cofsh_w));
+
+ map(0xc, 0xd).rw(FUNC(dmac_0448_device::cmap_r), FUNC(dmac_0448_device::cmap_w));
+ map(0xe, 0xe).w(FUNC(dmac_0448_device::gsel_w));
+ map(0xf, 0xf).r(FUNC(dmac_0448_device::gstat_r));
+}
+
+void dmac_0448_device::device_start()
+{
+ m_out_int.resolve();
+
+ m_dma_r.resolve_all_safe(0);
+ m_dma_w.resolve_all_safe();
+
+ m_irq_check = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dmac_0448_device::irq_check), this));
+ m_dma_check = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dmac_0448_device::dma_check), this));
+
+ m_out_int_state = false;
+ m_gsel = 0;
+ m_gstat = 0;
+}
+
+void dmac_0448_device::device_reset()
+{
+ m_irq_check->adjust(attotime::zero);
+}
+
+void dmac_0448_device::set_irq_line(int number, int state)
+{
+ u8 const mask = 1U << (number * 2);
+
+ if (state)
+ m_gstat |= mask;
+ else
+ m_gstat &= ~mask;
+
+ m_irq_check->adjust(attotime::zero);
+}
+
+void dmac_0448_device::irq_check(void *ptr, s32 param)
+{
+ bool const out_int_stat = bool(m_gstat & 0x55);
+
+ if (out_int_stat != m_out_int_state)
+ {
+ m_out_int_state = out_int_stat;
+ m_out_int(m_out_int_state);
+ }
+}
+
+void dmac_0448_device::set_drq_line(int channel, int state)
+{
+ u8 const mask = 1U << ((channel * 2) + 1);
+
+ if (state)
+ m_gstat |= mask;
+ else
+ m_gstat &= ~mask;
+
+ if (state)
+ m_dma_check->adjust(attotime::zero);
+}
+
+void dmac_0448_device::cctl_w(u8 data)
+{
+ if ((data & CS_ENABLE) && !(m_channel[m_gsel].cctl & CS_ENABLE))
+ {
+ LOG("transfer started address 0x%08x count 0x%x\n",
+ u32(m_channel[m_gsel].cmap[m_channel[m_gsel].ctag]) << 12 | m_channel[m_gsel].cofs, m_channel[m_gsel].ctrc);
+ }
+ m_channel[m_gsel].cctl = data;
+
+ m_dma_check->adjust(attotime::zero);
+}
+
+void dmac_0448_device::dma_check(void *ptr, s32 param)
+{
+ bool active = false;
+
+ for (unsigned channel = 0; channel < 4; channel++)
+ {
+ // check drq active
+ if (!BIT(m_gstat, (channel * 2) + 1))
+ continue;
+
+ dma_channel &dma = m_channel[channel];
+
+ // check channel enabled
+ if (!(dma.cctl & CS_ENABLE))
+ return;
+
+ // check transfer count
+ if (!dma.ctrc)
+ return;
+
+ // TODO: confirm if this is correct
+ u32 const address = u32(dma.cmap[dma.ctag]) << 12 | dma.cofs;
+
+ // perform dma transfer
+ if (dma.cctl & CS_MODE)
+ {
+ // device to memory
+ u8 const data = m_dma_r[channel]();
+
+ LOG("dma_r data 0x%02x address 0x%08x\n", data, address);
+
+ m_bus->write_byte(address, data);
+ }
+ else
+ {
+ // memory to device
+ u8 const data = m_bus->read_byte(address);
+
+ LOG("dma_w data 0x%02x address 0x%08x\n", data, address);
+
+ m_dma_w[channel](data);
+ }
+
+ // increment offset
+ if (dma.cofs == 0xfff)
+ {
+ // advance to next page
+ dma.cofs = 0;
+ dma.ctag++;
+ }
+ else
+ dma.cofs++;
+
+ // decrement count
+ dma.ctrc--;
+
+ // set terminal count flag
+ if (!dma.ctrc)
+ {
+ LOG("transfer complete\n");
+ dma.cstat |= CS_TCZ;
+
+ // TODO: terminal count interrupt?
+ }
+
+ if (BIT(m_gstat, (channel * 2) + 1))
+ active = true;
+ }
+
+ if (active)
+ m_dma_check->adjust(attotime::zero);
+}
diff --git a/src/mame/machine/dmac_0448.h b/src/mame/machine/dmac_0448.h
new file mode 100644
index 00000000000..e85e8b1ecff
--- /dev/null
+++ b/src/mame/machine/dmac_0448.h
@@ -0,0 +1,99 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+#ifndef MAME_MACHINE_DMAC_0448_H
+#define MAME_MACHINE_DMAC_0448_H
+
+#pragma once
+
+class dmac_0448_device : public device_t
+{
+public:
+ dmac_0448_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+
+ // configuration
+ template <typename T> void set_bus(T &&tag, int spacenum) { m_bus.set_tag(std::forward<T>(tag), spacenum); }
+ auto out_int_cb() { return m_out_int.bind(); }
+ template <unsigned Channel> auto dma_r_cb() { return m_dma_r[Channel].bind(); }
+ template <unsigned Channel> auto dma_w_cb() { return m_dma_w[Channel].bind(); }
+
+ // line handlers
+ template <unsigned IRQ> void irq(int state) { set_irq_line(IRQ, state); }
+ template <unsigned DRQ> void drq(int state) { set_drq_line(DRQ, state); }
+
+ void map(address_map &map);
+
+protected:
+ // device_t overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ void set_irq_line(int number, int state);
+ void set_drq_line(int channel, int state);
+
+ u8 cstat_r() { return m_channel[m_gsel].cstat; }
+ u8 ctrcl_r() { return u8(m_channel[m_gsel].ctrc >> 0); }
+ u8 ctrcm_r() { return u8(m_channel[m_gsel].ctrc >> 8); }
+ u8 ctrch_r() { return u8(m_channel[m_gsel].ctrc >> 16); }
+ u8 ctag_r() { return m_channel[m_gsel].ctag; }
+ u8 cwid_r() { return m_channel[m_gsel].cwid; }
+ u8 cofsl_r() { return u8(m_channel[m_gsel].cofs >> 0); }
+ u8 cofsh_r() { return u8(m_channel[m_gsel].cofs >> 8); }
+ u16 cmap_r() { return m_channel[m_gsel].cmap[m_channel[m_gsel].ctag]; }
+ u8 gstat_r() { return m_gstat; }
+
+ void cctl_w(u8 data);
+ void ctrcl_w(u8 data) { m_channel[m_gsel].ctrc = (m_channel[m_gsel].ctrc & 0xffff00U) | (u32(data) << 0); }
+ void ctrcm_w(u8 data) { m_channel[m_gsel].ctrc = (m_channel[m_gsel].ctrc & 0xff00ffU) | (u32(data) << 8); }
+ void ctrch_w(u8 data) { m_channel[m_gsel].ctrc = (m_channel[m_gsel].ctrc & 0x00ffffU) | (u32(data) << 16); }
+ void ctag_w(u8 data) { m_channel[m_gsel].ctag = data; }
+ void cwid_w(u8 data) { m_channel[m_gsel].cwid = data; }
+ void cofsl_w(u8 data) { m_channel[m_gsel].cofs = (m_channel[m_gsel].cofs & 0xff00U) | (u16(data) << 0); }
+ void cofsh_w(u8 data) { m_channel[m_gsel].cofs = (m_channel[m_gsel].cofs & 0x00ffU) | (u16(data & 0x0f) << 8); }
+ void cmap_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_channel[m_gsel].cmap[m_channel[m_gsel].ctag]); }
+ void gsel_w(u8 data) { m_gsel = data; }
+
+ void irq_check(void *ptr = nullptr, s32 param = 0);
+ void dma_check(void *ptr = nullptr, s32 param = 0);
+
+ required_address_space m_bus;
+
+ devcb_write_line m_out_int;
+ devcb_read8::array<4> m_dma_r;
+ devcb_write8::array<4> m_dma_w;
+
+ emu_timer *m_irq_check;
+ emu_timer *m_dma_check;
+
+ enum cstat_mask : u8
+ {
+ CS_ENABLE = 0x01, // channel enable
+ CS_MODE = 0x02, // transfer to memory
+ CS_RESET = 0x04, // reset channel
+ CS_ZINTEN = 0x08, // terminal count interrupt?
+ CS_APAD = 0x10, // auto pad
+ CS_AFIX = 0x20,
+ CS_A28 = 0x40,
+ CS_TCZ = 0x80, // transfer count zero?
+ };
+
+ struct dma_channel
+ {
+ u8 cstat; // channel status
+ u8 cctl; // channel control
+ u32 ctrc; // channel counter
+ u8 ctag; // channel tag
+ u8 cwid; // channel width
+ u16 cofs; // channel offset
+ u16 cmap[256];
+ }
+ m_channel[4];
+ u8 m_gsel; // channel select
+ u8 m_gstat; // general status
+
+ bool m_out_int_state;
+};
+
+DECLARE_DEVICE_TYPE(DMAC_0448, dmac_0448_device)
+
+#endif // MAME_MACHINE_DMAC_0448_H
diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp
index 5afb60fedea..4ea59fe10c2 100644
--- a/src/mame/machine/dmv_keyb.cpp
+++ b/src/mame/machine/dmv_keyb.cpp
@@ -293,7 +293,7 @@ WRITE8_MEMBER( dmv_keyboard_device::port2_w )
DECLARE_WRITE_LINE_MEMBER(dmv_keyboard_device::sd_poll_w)
{
if (m_sd_poll_state && !state)
- m_maincpu->upi41_master_w(m_maincpu->space(), 0, 0);
+ m_maincpu->upi41_master_w(0, 0);
m_sd_poll_state = state;
}
diff --git a/src/mame/machine/galaxold.cpp b/src/mame/machine/galaxold.cpp
index c94628c1427..cef896131f2 100644
--- a/src/mame/machine/galaxold.cpp
+++ b/src/mame/machine/galaxold.cpp
@@ -13,7 +13,7 @@
#include "includes/galaxold.h"
-IRQ_CALLBACK_MEMBER(galaxold_state::hunchbkg_irq_callback)
+uint8_t galaxold_state::hunchbkg_intack()
{
m_maincpu->set_input_line(0, CLEAR_LINE);
return 0x03;
@@ -162,7 +162,7 @@ void galaxold_state::init_4in1()
INTERRUPT_GEN_MEMBER(galaxold_state::hunchbks_vh_interrupt)
{
- device.execute().pulse_input_line_and_vector(0, 0x03, device.execute().minimum_quantum_time());
+ m_maincpu->pulse_input_line(0, m_maincpu->minimum_quantum_time());
}
void galaxold_state::init_bullsdrtg()
diff --git a/src/mame/machine/gb.cpp b/src/mame/machine/gb.cpp
index 7ff5a39667c..c6333808378 100644
--- a/src/mame/machine/gb.cpp
+++ b/src/mame/machine/gb.cpp
@@ -143,8 +143,8 @@ void gb_state::gb_init_regs()
SIODATA = 0x00;
SIOCONT = 0x7E;
- gb_io_w(m_maincpu->space(AS_PROGRAM), 0x05, 0x00); /* TIMECNT */
- gb_io_w(m_maincpu->space(AS_PROGRAM), 0x06, 0x00); /* TIMEMOD */
+ gb_io_w(0x05, 0x00); /* TIMECNT */
+ gb_io_w(0x06, 0x00); /* TIMEMOD */
}
@@ -223,7 +223,7 @@ MACHINE_RESET_MEMBER(gb_state,sgb)
}
-WRITE8_MEMBER(gb_state::gb_io_w)
+void gb_state::gb_io_w(offs_t offset, uint8_t data)
{
static const uint8_t timer_shifts[4] = {10, 4, 6, 8};
@@ -462,7 +462,7 @@ WRITE8_MEMBER(gb_state::sgb_io_w)
return;
default:
/* we didn't handle the write, so pass it to the GB handler */
- gb_io_w(space, offset, data);
+ gb_io_w(offset, data);
return;
}
@@ -605,7 +605,7 @@ WRITE8_MEMBER(gb_state::gb_timer_callback)
WRITE8_MEMBER(gb_state::gbc_io_w)
{
- gb_io_w(space, offset, data);
+ gb_io_w(offset, data);
// On CGB the internal serial transfer clock is selectable
if (offset == 0x02)
diff --git a/src/mame/machine/imds2ioc.cpp b/src/mame/machine/imds2ioc.cpp
index 63fef276e77..0a0bbf9eacb 100644
--- a/src/mame/machine/imds2ioc.cpp
+++ b/src/mame/machine/imds2ioc.cpp
@@ -112,7 +112,7 @@ WRITE8_MEMBER(imds2ioc_device::start_timer_w)
READ8_MEMBER(imds2ioc_device::kb_read)
{
- return m_kbcpu->upi41_master_r(space, (offset & 2) >> 1);
+ return m_kbcpu->upi41_master_r((offset & 2) >> 1);
}
READ8_MEMBER(imds2ioc_device::kb_port_p2_r)
@@ -399,12 +399,12 @@ I8275_DRAW_CHARACTER_MEMBER(imds2ioc_device::crtc_display_pixels)
READ8_MEMBER(imds2ioc_device::pio_master_r)
{
- return m_iocpio->upi41_master_r(space, offset);
+ return m_iocpio->upi41_master_r(offset);
}
WRITE8_MEMBER(imds2ioc_device::pio_master_w)
{
- m_iocpio->upi41_master_w(space, offset, data);
+ m_iocpio->upi41_master_w(offset, data);
}
void imds2ioc_device::device_resolve_objects()
diff --git a/src/mame/machine/irobot.cpp b/src/mame/machine/irobot.cpp
index a56f073ede2..493a4005ff0 100644
--- a/src/mame/machine/irobot.cpp
+++ b/src/mame/machine/irobot.cpp
@@ -62,7 +62,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(irobot_state::irobot_irvg_done_callback)
m_irvg_running = 0;
}
-WRITE8_MEMBER(irobot_state::irobot_statwr_w)
+void irobot_state::irobot_statwr_w(uint8_t data)
{
logerror("write %2x ", data);
IR_CPU_STATE();
@@ -96,7 +96,7 @@ WRITE8_MEMBER(irobot_state::irobot_statwr_w)
m_statwr = data;
}
-WRITE8_MEMBER(irobot_state::irobot_out0_w)
+void irobot_state::irobot_out0_w(uint8_t data)
{
uint8_t *RAM = memregion("maincpu")->base();
@@ -118,7 +118,7 @@ WRITE8_MEMBER(irobot_state::irobot_out0_w)
m_alphamap = (data & 0x80);
}
-WRITE8_MEMBER(irobot_state::irobot_rom_banksel_w)
+void irobot_state::irobot_rom_banksel_w(uint8_t data)
{
uint8_t *RAM = memregion("maincpu")->base();
@@ -188,10 +188,9 @@ void irobot_state::machine_reset()
m_irvg_running = 0;
m_irmb_running = 0;
- address_space &space = machine().dummy_space();
- irobot_rom_banksel_w(space, 0, 0);
- irobot_out0_w(space, 0, 0);
- irobot_statwr_w(space, 0, 0);
+ irobot_rom_banksel_w(0);
+ irobot_out0_w(0);
+ irobot_statwr_w(0);
m_outx = 0;
}
diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp
index 305eacc1dc9..e4b1290c8a1 100644
--- a/src/mame/machine/lisa.cpp
+++ b/src/mame/machine/lisa.cpp
@@ -1704,7 +1704,7 @@ READ16_MEMBER(lisa_state::lisa_IO_r)
switch ((offset & 0x0600) >> 9)
{
case 0: /* serial ports control */
- answer = m_scc->reg_r(space, offset&7);
+ answer = m_scc->reg_r(offset&7);
break;
case 2: /* parallel port */
@@ -1828,7 +1828,7 @@ WRITE16_MEMBER(lisa_state::lisa_IO_w)
switch ((offset & 0x0600) >> 9)
{
case 0: /* serial ports control */
- m_scc->reg_w(space, offset&7, data);
+ m_scc->reg_w(offset&7, data);
break;
case 2: /* paralel port */
diff --git a/src/mame/machine/lynx.cpp b/src/mame/machine/lynx.cpp
index d6fa79da37c..856fbcb4e7a 100644
--- a/src/mame/machine/lynx.cpp
+++ b/src/mame/machine/lynx.cpp
@@ -1877,7 +1877,7 @@ READ8_MEMBER(lynx_state::lynx_memory_config_r)
return m_memory_config;
}
-WRITE8_MEMBER(lynx_state::lynx_memory_config_w)
+void lynx_state::lynx_memory_config_w(uint8_t data)
{
/* bit 7: hispeed, uses page mode accesses (4 instead of 5 cycles )
* when these are safe in the cpu */
@@ -1891,7 +1891,7 @@ WRITE8_MEMBER(lynx_state::lynx_memory_config_w)
void lynx_state::machine_reset()
{
- lynx_memory_config_w(m_maincpu->space(AS_PROGRAM), 0, 0);
+ lynx_memory_config_w(0);
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_maincpu->set_input_line(M65SC02_IRQ_LINE, CLEAR_LINE);
@@ -1926,7 +1926,7 @@ void lynx_state::machine_reset()
void lynx_state::lynx_postload()
{
- lynx_memory_config_w(m_maincpu->space(AS_PROGRAM), 0, m_memory_config);
+ lynx_memory_config_w(m_memory_config);
}
void lynx_state::machine_start()
diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp
index 4f42dd272b5..ab59e67cccf 100644
--- a/src/mame/machine/mac.cpp
+++ b/src/mame/machine/mac.cpp
@@ -1169,7 +1169,7 @@ READ16_MEMBER ( mac_state::mac_scc_r )
{
uint16_t result;
- result = m_scc->reg_r(space, offset);
+ result = m_scc->reg_r(offset);
return (result << 8) | result;
}
@@ -1177,12 +1177,12 @@ READ16_MEMBER ( mac_state::mac_scc_r )
WRITE16_MEMBER ( mac_state::mac_scc_w )
{
- m_scc->reg_w(space, offset, data);
+ m_scc->reg_w(offset, data);
}
WRITE16_MEMBER ( mac_state::mac_scc_2_w )
{
- m_scc->reg_w(space, offset, data >> 8);
+ m_scc->reg_w(offset, data >> 8);
}
/* ********************************** *
diff --git a/src/mame/machine/macpci.cpp b/src/mame/machine/macpci.cpp
index 4986892f6a7..cbc31a32dd2 100644
--- a/src/mame/machine/macpci.cpp
+++ b/src/mame/machine/macpci.cpp
@@ -168,18 +168,18 @@ READ32_MEMBER(macpci_state::mac_read_id)
READ16_MEMBER ( macpci_state::mac_scc_r )
{
- uint16_t result = m_scc->reg_r(space, offset);
+ uint16_t result = m_scc->reg_r(offset);
return (result << 8) | result;
}
WRITE16_MEMBER ( macpci_state::mac_scc_w )
{
- m_scc->reg_w(space, offset, data);
+ m_scc->reg_w(offset, data);
}
WRITE16_MEMBER ( macpci_state::mac_scc_2_w )
{
- m_scc->reg_w(space, offset, data >> 8);
+ m_scc->reg_w(offset, data >> 8);
}
READ8_MEMBER(macpci_state::mac_5396_r)
diff --git a/src/mame/machine/mb62h195.cpp b/src/mame/machine/mb62h195.cpp
new file mode 100644
index 00000000000..7e8a0671c34
--- /dev/null
+++ b/src/mame/machine/mb62h195.cpp
@@ -0,0 +1,75 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Roland MB62H195 gate array
+
+ This is one of Roland's several multifunction I/O gate arrays including
+ built-in address latches and chip select decoders. This one's
+ particular features include both an LCD data FIFO (write-only) and a
+ parallel/serial converter for a µPD7001 ADC (the clock for which is
+ based on an internal oscillator).
+
+***************************************************************************/
+
+#include "emu.h"
+#include "mb62h195.h"
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(MB62H195, mb62h195_device, "mb62h195", "Roland MB62H195 I/O")
+
+
+//**************************************************************************
+// DEVICE IMPLEMENTATION
+//**************************************************************************
+
+//-------------------------------------------------
+// mb62h195_device - constructor
+//-------------------------------------------------
+
+mb62h195_device::mb62h195_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, MB62H195, tag, owner, clock)
+ , m_lc_callback(*this)
+ , m_r_callback(*this)
+ , m_t_callback(*this)
+ , m_da_callback(*this)
+ , m_dc_callback(*this)
+ , m_sout_callback(*this)
+ , m_sck_callback(*this)
+ , m_sin_callback(*this)
+ , m_adc_callback(*this)
+{
+}
+
+
+//-------------------------------------------------
+// device_resolve_objects - resolve objects that
+// may be needed for other devices to set
+// initial conditions at start time
+//-------------------------------------------------
+
+void mb62h195_device::device_resolve_objects()
+{
+ m_lc_callback.resolve_safe();
+ m_r_callback.resolve_safe(0xff);
+ m_t_callback.resolve_safe();
+ m_da_callback.resolve_safe();
+ m_dc_callback.resolve_safe();
+ m_sout_callback.resolve_safe();
+ m_sck_callback.resolve_safe();
+ m_sin_callback.resolve_safe(1);
+ m_adc_callback.resolve_safe();
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void mb62h195_device::device_start()
+{
+}
diff --git a/src/mame/machine/mb62h195.h b/src/mame/machine/mb62h195.h
new file mode 100644
index 00000000000..4ceb81f4533
--- /dev/null
+++ b/src/mame/machine/mb62h195.h
@@ -0,0 +1,60 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Roland MB62H195 gate array
+
+***************************************************************************/
+
+#ifndef MAME_MACHINE_MB62H195_H
+#define MAME_MACHINE_MB62H195_H
+
+#pragma once
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> mb62h195_device
+
+class mb62h195_device : public device_t
+{
+public:
+ // device type constructor
+ mb62h195_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
+
+ // configuration
+ auto lc_callback() { return m_lc_callback.bind(); }
+ auto r_callback() { return m_r_callback.bind(); }
+ auto t_callback() { return m_t_callback.bind(); }
+ auto da_callback() { return m_da_callback.bind(); }
+ auto dc_callback() { return m_dc_callback.bind(); }
+ auto sout_callback() { return m_sout_callback.bind(); }
+ auto sck_callback() { return m_sck_callback.bind(); }
+ auto sin_callback() { return m_sin_callback.bind(); }
+ auto adc_callback() { return m_adc_callback.bind(); }
+
+ // CPU read/write handlers (TODO)
+
+ // device-specific overrides
+ virtual void device_resolve_objects() override;
+ virtual void device_start() override;
+
+private:
+ // callback objects
+ devcb_write8 m_lc_callback;
+ devcb_read8 m_r_callback;
+ devcb_write8 m_t_callback;
+ devcb_write16 m_da_callback;
+ devcb_write8 m_dc_callback;
+ devcb_write_line m_sout_callback;
+ devcb_write_line m_sck_callback;
+ devcb_read_line m_sin_callback;
+ devcb_write_line m_adc_callback;
+};
+
+
+// device type declaration
+DECLARE_DEVICE_TYPE(MB62H195, mb62h195_device)
+
+#endif // MAME_MACHINE_MB62H195_H
diff --git a/src/mame/machine/mbee.cpp b/src/mame/machine/mbee.cpp
index a9bddd6c112..f8225e1074f 100644
--- a/src/mame/machine/mbee.cpp
+++ b/src/mame/machine/mbee.cpp
@@ -56,7 +56,7 @@ WRITE8_MEMBER( mbee_state::pio_port_b_w )
m_speaker->level_w(BIT(data, 6));
}
-READ8_MEMBER( mbee_state::pio_port_b_r )
+uint8_t mbee_state::pio_port_b_r()
{
uint8_t data = 0;
@@ -185,7 +185,7 @@ TIMER_CALLBACK_MEMBER( mbee_state::timer_newkb )
m_b2 = 1; // set irq
if (m_b2)
- m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
+ m_pio->port_b_write(pio_port_b_r());
timer_set(attotime::from_hz(50), TIMER_MBEE_NEWKB);
}
@@ -252,7 +252,7 @@ WRITE_LINE_MEMBER( mbee_state::rtc_irq_w )
m_b7_rtc = (state) ? 0 : 1; // inverted by IC15 (pins 8,9,10)
if ((m_io_config->read() & 0xc0) == 0x40) // RTC selected in config menu
- m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
+ m_pio->port_b_write(pio_port_b_r());
}
diff --git a/src/mame/machine/mcr.cpp b/src/mame/machine/mcr.cpp
index df34fe95650..3b4323d94fe 100644
--- a/src/mame/machine/mcr.cpp
+++ b/src/mame/machine/mcr.cpp
@@ -158,7 +158,7 @@ WRITE_LINE_MEMBER(mcr_nflfoot_state::sio_txdb_w)
m_ipu_sio->rxb_w(state);
}
-WRITE8_MEMBER(mcr_nflfoot_state::ipu_laserdisk_w)
+void mcr_nflfoot_state::ipu_laserdisk_w(offs_t offset, uint8_t data)
{
/* bit 3 enables (1) LD video regardless of PIX SW */
/* bit 2 enables (1) LD right channel audio */
@@ -179,16 +179,17 @@ TIMER_CALLBACK_MEMBER(mcr_nflfoot_state::ipu_watchdog_reset)
m_ipu_sio->reset();
}
-READ8_MEMBER(mcr_nflfoot_state::ipu_watchdog_r)
+uint8_t mcr_nflfoot_state::ipu_watchdog_r()
{
/* watchdog counter is clocked by 7.3728MHz crystal / 16 */
/* watchdog is tripped when 14-bit counter overflows => / 32768 = 14.0625Hz*/
- m_ipu_watchdog_timer->adjust(attotime::from_hz(7372800 / 16 / 32768));
+ if (!machine().side_effects_disabled())
+ m_ipu_watchdog_timer->adjust(attotime::from_hz(7372800 / 16 / 32768));
return 0xff;
}
-WRITE8_MEMBER(mcr_nflfoot_state::ipu_watchdog_w)
+void mcr_nflfoot_state::ipu_watchdog_w(uint8_t data)
{
- ipu_watchdog_r(space,0);
+ (void)ipu_watchdog_r();
}
diff --git a/src/mame/machine/mexico86.cpp b/src/mame/machine/mexico86.cpp
index ab90d2e3e85..be55217dd6f 100644
--- a/src/mame/machine/mexico86.cpp
+++ b/src/mame/machine/mexico86.cpp
@@ -302,7 +302,7 @@ WRITE8_MEMBER(mexico86_state::mexico86_68705_port_b_w)
}
}
- m_mcu->pa_w(space, 0, (BIT(mem_mask, 0) && !BIT(data, 0)) ? m_latch : 0xff);
+ m_mcu->pa_w((BIT(mem_mask, 0) && !BIT(data, 0)) ? m_latch : 0xff);
if (BIT(mem_mask, 1) && !BIT(data, 1) && BIT(m_port_b_out, 1))
{
diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp
index 560e6a4b838..bb5b5ef2051 100644
--- a/src/mame/machine/midwayic.cpp
+++ b/src/mame/machine/midwayic.cpp
@@ -757,7 +757,7 @@ void midway_ioasic_device::device_start()
if (m_has_dcs)
{
m_dcs->set_fifo_callbacks(
- read16_delegate(*this, FUNC(midway_ioasic_device::fifo_r)),
+ read16smo_delegate(*this, FUNC(midway_ioasic_device::fifo_r)),
read16_delegate(*this, FUNC(midway_ioasic_device::fifo_status_r)),
write_line_delegate(*this, FUNC(midway_ioasic_device::fifo_reset_w)));
m_dcs->set_io_callbacks(
@@ -854,7 +854,7 @@ WRITE_LINE_MEMBER(midway_ioasic_device::ioasic_output_full)
*
*************************************/
-READ16_MEMBER(midway_ioasic_device::fifo_r)
+uint16_t midway_ioasic_device::fifo_r()
{
uint16_t result = 0;
diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h
index 4e0a18a36d8..3c629688ac9 100644
--- a/src/mame/machine/midwayic.h
+++ b/src/mame/machine/midwayic.h
@@ -164,7 +164,7 @@ public:
void fifo_full_w(uint16_t data);
DECLARE_WRITE_LINE_MEMBER(fifo_reset_w);
- DECLARE_READ16_MEMBER(fifo_r);
+ uint16_t fifo_r();
DECLARE_READ16_MEMBER(fifo_status_r);
DECLARE_WRITE_LINE_MEMBER(ioasic_input_empty);
diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp
index 25cc0ce4aa2..2fd51da858b 100644
--- a/src/mame/machine/msx.cpp
+++ b/src/mame/machine/msx.cpp
@@ -294,12 +294,12 @@ WRITE8_MEMBER( msx2_state::msx_rtc_latch_w )
WRITE8_MEMBER( msx2_state::msx_rtc_reg_w )
{
- m_rtc->write(space, m_rtc_latch, data);
+ m_rtc->write(m_rtc_latch, data);
}
READ8_MEMBER( msx2_state::msx_rtc_reg_r )
{
- return m_rtc->read(space, m_rtc_latch);
+ return m_rtc->read(m_rtc_latch);
}
diff --git a/src/mame/machine/nes_vt_soc.cpp b/src/mame/machine/nes_vt_soc.cpp
new file mode 100644
index 00000000000..b6edaa70cd7
--- /dev/null
+++ b/src/mame/machine/nes_vt_soc.cpp
@@ -0,0 +1,1587 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+/***************************************************************************
+
+ The 'VT' series are SoC solutions that implement enhanced NES hardware
+ there are several generations of these chips each adding additional
+ functionality.
+
+ This list is incomplete
+
+ VT01 - plain famiclone?
+ VT02 - banking scheme to access 32MB, Dual APU with PCM support
+ VT03 - above + 4bpp sprite / bg modes, enhanced palette
+
+ VT08 - ?
+
+ VT09 - alt 4bpp modes?
+
+ VT16 - ?
+ VT18 - ?
+
+ VT33 (?) - used in FC Pocket, dgun2573
+ Adds scrambled opcodes (XORed with 0xA1) and RGB444 palette mode,
+ and more advanced PCM modes (CPU and video working, sound NYI)
+
+ VT368 (?) - used in DGUN2561, lxcmcy
+ Various enhancements not yet emulated. Different banking, possibly an ALU,
+ larger palette space
+
+ VT36x (?) - used in SY889
+ Uses SQI rather than parallel flash
+ Vaguely OneBus compatible but some registers different ($411C in particular)
+ Uses RGB format for palettes
+ Credit to NewRisingSun2 for much of the reverse engineering
+ same chipset used in Mogis M320, but uses more advanced feature set.
+
+ (more)
+
+
+
+ todo (VT03):
+
+ APU refactoring to allow for mostly doubled up functionality + PCM channel
+ *more*
+
+ todo (newer VTxx):
+
+ new PCM audio in FC Pocket and DGUN-2573
+ add support for VT368 (?) in DGUN-2561 and lxcmcy
+ add support for the VT369 (?) featurs used by the MOGIS M320
+
+**************************************************************************/
+
+#include "emu.h"
+#include "nes_vt_soc.h"
+
+// TODO: identify what kind of SoCs each of these are (some are probably meant to be the same chip, just with subsets of the features added at the moment, especially the CY/BT/HH ones)
+// also work out if some of these features (eg. opcode scrambling) should be done with external callbacks, sometimes the die was the same (VH2009) but encryption not always present (pin control or external feature?)
+
+DEFINE_DEVICE_TYPE(NES_VT_SOC, nes_vt_soc_device, "nes_vt_soc", "VTxx series System on a Chip (NTSC)")
+DEFINE_DEVICE_TYPE(NES_VT_SOC_PAL, nes_vt_soc_pal_device, "nes_vt_soc_pal", "VTxx series System on a Chip (PAL)")
+
+DEFINE_DEVICE_TYPE(NES_VT_SOC_SCRAMBLE, nes_vt_soc_scramble_device, "nes_vt_soc_scram", "VTxx series System on a Chip (with simple Opcode scrambling)")
+
+DEFINE_DEVICE_TYPE(NES_VT_SOC_4KRAM, nes_vt_soc_4kram_device, "nes_vt_soc_4k", "VTxx series System on a Chip (with 4KByte RAM)")
+DEFINE_DEVICE_TYPE(NES_VT_SOC_4KRAM_CY, nes_vt_soc_4kram_cy_device, "nes_vt_soc_4k_cy", "VTxx series System on a Chip (with 4KByte RAM) (CY)")
+DEFINE_DEVICE_TYPE(NES_VT_SOC_4KRAM_BT, nes_vt_soc_4kram_bt_device, "nes_vt_soc_4k_bt", "VTxx series System on a Chip (with 4KByte RAM) (BT)")
+DEFINE_DEVICE_TYPE(NES_VT_SOC_4KRAM_HH, nes_vt_soc_4kram_hh_device, "nes_vt_soc_4k_hh", "VTxx series System on a Chip (with 4KByte RAM) (HH)")
+
+DEFINE_DEVICE_TYPE(NES_VT_SOC_4KRAM_FP, nes_vt_soc_4kram_fp_device, "nes_vt_soc_4k_fp", "VTxx series System on a Chip (with 4KByte RAM) (FP) (NTSC)")
+DEFINE_DEVICE_TYPE(NES_VT_SOC_4KRAM_FP_PAL, nes_vt_soc_4kram_fp_pal_device, "nes_vt_soc_4k_fp_pal", "VTxx series System on a Chip (with 4KByte RAM) (FP) (PAL)")
+
+DEFINE_DEVICE_TYPE(NES_VT_SOC_8KRAM_DG, nes_vt_soc_8kram_dg_device, "nes_vt_soc_8k_dg", "VTxx series System on a Chip (with 8KByte RAM) (DG)")
+DEFINE_DEVICE_TYPE(NES_VT_SOC_8KRAM_FA, nes_vt_soc_8kram_fa_device, "nes_vt_soc_8k_fa", "VTxx series System on a Chip (with 8KByte RAM) (FA)")
+
+void nes_vt_soc_device::program_map(address_map &map)
+{
+}
+
+nes_vt_soc_device::nes_vt_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+ device_t(mconfig, type, tag, owner, clock),
+ device_memory_interface(mconfig, *this),
+ m_maincpu(*this, "maincpu"),
+ m_screen(*this, "screen"),
+ m_ppu(*this, "ppu"),
+ m_apu(*this, "apu"),
+ m_initial_e000_bank(0xff),
+ m_ntram(nullptr),
+ m_chrram(nullptr),
+ m_space_config("program", ENDIANNESS_LITTLE, 8, 25, 0, address_map_constructor(FUNC(nes_vt_soc_device::program_map), this)),
+ m_write_0_callback(*this),
+ m_read_0_callback(*this),
+ m_read_1_callback(*this),
+ m_extra_write_0_callback(*this),
+ m_extra_write_1_callback(*this),
+ m_extra_write_2_callback(*this),
+ m_extra_write_3_callback(*this),
+ m_extra_read_0_callback(*this),
+ m_extra_read_1_callback(*this),
+ m_extra_read_2_callback(*this),
+ m_extra_read_3_callback(*this)
+{
+ // 'no scramble' configuration
+ for (int i = 0; i < 6; i++)
+ m_2012_2017_descramble[i] = 2 + i;
+
+ // 'no scramble' configuration
+ m_8000_scramble[0x0] = 0x6;
+ m_8000_scramble[0x1] = 0x7;
+ m_8000_scramble[0x2] = 0x2;
+ m_8000_scramble[0x3] = 0x3;
+ m_8000_scramble[0x4] = 0x4;
+ m_8000_scramble[0x5] = 0x5;
+ m_8000_scramble[0x6] = 0x7;
+ m_8000_scramble[0x7] = 0x8;
+
+ // 'no scramble' configuration
+ m_410x_scramble[0x0] = 0x7;
+ m_410x_scramble[0x1] = 0x8;
+
+ m_default_palette_mode = PAL_MODE_VT0x;
+ m_force_baddma = false;
+}
+
+nes_vt_soc_device::nes_vt_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_device(mconfig, NES_VT_SOC, tag, owner, clock)
+{
+}
+
+nes_vt_soc_pal_device::nes_vt_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_device(mconfig, NES_VT_SOC_PAL, tag, owner, clock)
+{
+}
+
+
+nes_vt_soc_scramble_device::nes_vt_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_device(mconfig, NES_VT_SOC_SCRAMBLE, tag, owner, clock)
+{
+}
+
+nes_vt_soc_4kram_device::nes_vt_soc_4kram_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_device(mconfig, NES_VT_SOC_4KRAM, tag, owner, clock)
+{
+}
+
+nes_vt_soc_4kram_device::nes_vt_soc_4kram_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_device(mconfig, type, tag, owner, clock),
+ m_upper_write_412c_callback(*this),
+ m_upper_read_412c_callback(*this),
+ m_upper_read_412d_callback(*this)
+{
+}
+
+nes_vt_soc_4kram_cy_device::nes_vt_soc_4kram_cy_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_device(mconfig, NES_VT_SOC_4KRAM_CY, tag, owner, clock)
+{
+}
+
+nes_vt_soc_4kram_bt_device::nes_vt_soc_4kram_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_device(mconfig, NES_VT_SOC_4KRAM_BT, tag, owner, clock)
+{
+}
+
+
+nes_vt_soc_4kram_hh_device::nes_vt_soc_4kram_hh_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_device(mconfig, type, tag, owner, clock)
+{
+}
+
+nes_vt_soc_4kram_hh_device::nes_vt_soc_4kram_hh_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_hh_device(mconfig, NES_VT_SOC_4KRAM_HH, tag, owner, clock)
+{
+}
+
+
+nes_vt_soc_4kram_fp_device::nes_vt_soc_4kram_fp_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_fp_device(mconfig, NES_VT_SOC_4KRAM_FP, tag, owner, clock)
+{
+}
+
+nes_vt_soc_4kram_fp_device::nes_vt_soc_4kram_fp_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_hh_device(mconfig, type, tag, owner, clock)
+{
+}
+
+nes_vt_soc_4kram_fp_pal_device::nes_vt_soc_4kram_fp_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_fp_device(mconfig, NES_VT_SOC_4KRAM_FP_PAL, tag, owner, clock)
+{
+}
+
+nes_vt_soc_8kram_dg_device::nes_vt_soc_8kram_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_4kram_device(mconfig, type, tag, owner, clock)
+{
+}
+
+nes_vt_soc_8kram_dg_device::nes_vt_soc_8kram_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_8kram_dg_device(mconfig, NES_VT_SOC_8KRAM_DG, tag, owner, clock)
+{
+}
+
+nes_vt_soc_8kram_fa_device::nes_vt_soc_8kram_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt_soc_8kram_dg_device(mconfig, NES_VT_SOC_8KRAM_FA, tag, owner, clock)
+{
+}
+
+void nes_vt_soc_device::device_start()
+{
+ save_item(NAME(m_410x));
+
+ save_item(NAME(m_411c));
+ save_item(NAME(m_411d));
+ save_item(NAME(m_4242));
+
+ save_item(NAME(m_8000_addr_latch));
+
+ save_item(NAME(m_timer_irq_enabled));
+ save_item(NAME(m_timer_running));
+ save_item(NAME(m_timer_val));
+ save_item(NAME(m_vdma_ctrl));
+
+ m_ntram = std::make_unique<uint8_t[]>(0x2000);
+ save_pointer(NAME(m_ntram), 0x2000);
+
+ m_chrram = std::make_unique<uint8_t[]>(0x2000);
+ save_pointer(NAME(m_chrram), 0x2000);
+
+ m_ppu->set_scanline_callback(*this, FUNC(nes_vt_soc_device::scanline_irq));
+ m_ppu->set_hblank_callback(*this, FUNC(nes_vt_soc_device::hblank_irq));
+
+ //m_ppu->set_hblank_callback(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::hblank_irq)));
+ //m_ppu->space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::chr_r)), write8_delegate(*m_cartslot->m_cart, FUNC(device_nes_cart_interface::chr_w)));
+ m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(*this, FUNC(nes_vt_soc_device::nt_r)), write8_delegate(*this, FUNC(nes_vt_soc_device::nt_w)));
+ m_ppu->space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(*this, FUNC(nes_vt_soc_device::chr_r)), write8_delegate(*this, FUNC(nes_vt_soc_device::chr_w)));
+
+ m_write_0_callback.resolve_safe();
+ m_read_0_callback.resolve_safe(0xff);
+ m_read_1_callback.resolve_safe(0xff);
+
+ m_extra_write_0_callback.resolve_safe();
+ m_extra_write_1_callback.resolve_safe();
+ m_extra_write_2_callback.resolve_safe();
+ m_extra_write_3_callback.resolve_safe();
+
+ m_extra_read_0_callback.resolve_safe(0xff);
+ m_extra_read_1_callback.resolve_safe(0xff);
+ m_extra_read_2_callback.resolve_safe(0xff);
+ m_extra_read_3_callback.resolve_safe(0xff);
+}
+
+void nes_vt_soc_device::device_reset()
+{
+ // what are the actual defaults?
+ m_410x[0x0] = 0x00;
+ m_410x[0x1] = 0x00;
+ m_410x[0x2] = 0x00;
+ m_410x[0x3] = 0x00;
+ m_410x[0x4] = 0x00;
+ m_410x[0x5] = 0x00;
+ m_410x[0x6] = 0x00;
+ m_410x[0x7] = 0x00;
+ m_410x[0x8] = 0x01;
+ m_410x[0x9] = 0x02;
+ m_410x[0xa] = 0x00;
+ m_410x[0xb] = 0x00;
+ m_411c = 0x00;
+ m_411d = 0x00;
+ m_4242 = 0x00;
+
+ m_timer_irq_enabled = 0;
+ m_timer_running = 0;
+ m_timer_val = 0;
+ m_vdma_ctrl = 0;
+
+ update_banks();
+
+ m_ppu->set_201x_descramble(m_2012_2017_descramble[0], m_2012_2017_descramble[1], m_2012_2017_descramble[2], m_2012_2017_descramble[3], m_2012_2017_descramble[4], m_2012_2017_descramble[5]);
+ m_ppu->set_palette_mode(m_default_palette_mode);
+
+}
+
+uint32_t nes_vt_soc_device::get_banks(uint8_t bnk)
+{
+ switch (m_410x[0xb] & 0x07)
+ {
+ case 0: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xC0) | (bnk & 0x3F)); // makes bank 0xff at 0xe000 map to 0x07e000 by default for vectors at 0x007fffx
+ case 1: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xE0) | (bnk & 0x1F));
+ case 2: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xF0) | (bnk & 0x0F));
+ case 3: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xF8) | (bnk & 0x07));
+ case 4: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xFC) | (bnk & 0x03));
+ case 5: return ((m_410x[0x0] & 0xF0) << 4) + ((m_410x[0xa] & 0xFE) | (bnk & 0x01));
+ case 6: return ((m_410x[0x0] & 0xF0) << 4) + (m_410x[0xa]);
+ case 7: return ((m_410x[0x0] & 0xF0) << 4) + bnk;
+ }
+
+ return 0;
+}
+
+// 8000 needs to bank in 60000 ( bank 0x30 )
+void nes_vt_soc_device::update_banks()
+{
+ //uint32_t amod = m_ahigh >> 13;
+
+ uint8_t bank;
+
+ // 8000-9fff
+ if ((m_410x[0xb] & 0x40) != 0 || (m_410x[0x5] & 0x40) == 0)
+ {
+ if ((m_410x[0x5] & 0x40) == 0)
+ bank = m_410x[0x7];
+ else
+ bank = m_410x[0x9];
+ }
+ else
+ bank = 0xfe;
+
+ m_bankaddr[0] = ((/*amod |*/ get_banks(bank)) );
+
+ // a000-bfff
+ bank = m_410x[0x8];
+ m_bankaddr[1] = ((/*amod |*/ get_banks(bank)) );
+
+ // c000-dfff
+ if ((m_410x[0xb] & 0x40) != 0 || (m_410x[0x5] & 0x40) != 0)
+ {
+ if ((m_410x[0x5] & 0x40) == 0)
+ bank = m_410x[0x9];
+ else
+ bank = m_410x[0x7];
+ }
+ else
+ bank = 0xfe;
+
+ m_bankaddr[2] = ((/*amod |*/ get_banks(bank)) );
+
+ // e000 - ffff
+ bank = m_initial_e000_bank;
+ m_bankaddr[3] = ((/*amod |*/ get_banks(bank)) );
+}
+
+uint16_t nes_vt_soc_device::decode_nt_addr(uint16_t addr)
+{
+ bool vert_mirror = !(m_410x[0x6] & 0x01);
+ int a11 = (addr >> 11) & 0x01;
+ int a10 = (addr >> 10) & 0x01;
+ uint16_t base = (addr & 0x3FF);
+ return ((vert_mirror ? a10 : a11) << 10) | base;
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::vt03_410x_w)
+{
+ scrambled_410x_w(offset, data);
+}
+
+READ8_MEMBER(nes_vt_soc_device::vt03_410x_r)
+{
+ return m_410x[offset];
+}
+
+
+// Source: https://wiki.nesdev.com/w/index.php/NES_2.0_submappers/Proposals#NES_2.0_Mapper_256
+
+void nes_vt_soc_device::scrambled_410x_w(uint16_t offset, uint8_t data)
+{
+ switch (offset)
+ {
+ case 0x0:
+ m_410x[0x0] = data;
+ update_banks();
+ break;
+
+ case 0x1:
+ // latch timer value
+ m_410x[0x1] = data;
+ m_timer_running = 0;
+ break;
+
+ case 0x2:
+ //logerror("vt03_4102_w %02x\n", data);
+ // load latched value and start counting
+ m_410x[0x2] = data; // value doesn't matter?
+ m_timer_val = m_410x[0x1];
+ m_timer_running = 1;
+ break;
+
+ case 0x3:
+ //logerror("vt03_4103_w %02x\n", data);
+ m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
+ // disable timer irq
+ m_410x[0x3] = data; // value doesn't matter?
+ m_timer_irq_enabled = 0;
+ break;
+
+ case 0x4:
+ //logerror("vt03_4104_w %02x\n", data);
+ // enable timer irq
+ m_410x[0x4] = data; // value doesn't matter?
+ m_timer_irq_enabled = 1;
+ break;
+
+ case 0x5:
+ logerror("vt03_4105_w %02x\n", data);
+ m_410x[0x5] = data;
+ update_banks();
+ break;
+
+ case 0x6:
+ m_410x[0x6] = data;
+ break;
+
+ case 0x7:
+ m_410x[m_410x_scramble[0]] = data;
+ update_banks();
+ break;
+
+ case 0x8:
+ m_410x[m_410x_scramble[1]] = data;
+ update_banks();
+ break;
+
+ case 0x9:
+ logerror("vt03_4109_w %02x\n", data);
+ m_410x[0x9] = data;
+ update_banks();
+ break;
+
+ case 0xa:
+ logerror("vt03_410aw %02x\n", data);
+ m_410x[0xa] = data;
+ update_banks();
+ break;
+
+ case 0xb:
+ /*
+
+ D7 TSYNEN - Timer clock select 0:AD12, 1:HSYNC
+ D6 Prg Bank 0 Reg 2 enable / disable 0:Disable 1:Enable
+ D5 RS232 enable / disable 0:Disable 1:Enable
+ D4 Bus output control 0: normal 1: tristate
+ D3 6000-7fff and 8000-ffff control - 0 will not active XRWB, 1 will activate
+ D2-D0 - program bank 0 selector
+
+ */
+
+ logerror("vt03_410b_w %02x\n", data);
+ m_410x[0xb] = data;
+ update_banks();
+ break;
+ }
+}
+
+
+
+READ8_MEMBER(nes_vt_soc_device::spr_r)
+{
+ if (m_4242 & 0x1 || m_411d & 0x04)
+ {
+ return m_chrram[offset];
+ }
+ else
+ {
+ int realaddr = calculate_real_video_address(offset, 0, 1);
+
+ address_space& spc = this->space(AS_PROGRAM);
+ return spc.read_byte(realaddr);
+ }
+}
+
+READ8_MEMBER(nes_vt_soc_device::chr_r)
+{
+ if (m_4242 & 0x1 || m_411d & 0x04)
+ {
+ return m_chrram[offset];
+ }
+ else
+ {
+ int realaddr = calculate_real_video_address(offset, 1, 0);
+
+ address_space& spc = this->space(AS_PROGRAM);
+ return spc.read_byte(realaddr);
+ }
+}
+
+
+WRITE8_MEMBER(nes_vt_soc_device::chr_w)
+{
+ if (m_4242 & 0x1 || m_411d & 0x04)
+ {
+ logerror("vram write %04x %02x\n", offset, data);
+ m_chrram[offset] = data;
+ }
+}
+
+
+
+void nes_vt_soc_device::scanline_irq(int scanline, int vblank, int blanked)
+{
+ video_irq(false, scanline, vblank, blanked);
+}
+
+void nes_vt_soc_device::hblank_irq(int scanline, int vblank, int blanked)
+{
+ video_irq(true, scanline, vblank, blanked);
+}
+
+void nes_vt_soc_device::video_irq(bool hblank, int scanline, int vblank, int blanked)
+{
+ //TSYNEN
+ if (((m_410x[0xb] >> 7) & 0x01) == hblank)
+ {
+ int irqstate = 0;
+
+ //logerror("scanline_irq %d\n", scanline);
+
+ if (m_timer_running && scanline < 0xe0)
+ {
+ m_timer_val--;
+
+ if (m_timer_val < 0)
+ {
+ if (m_timer_irq_enabled && !blanked)
+ {
+ logerror("scanline_irq %d\n", scanline);
+ irqstate = 1;
+ }
+ }
+ }
+
+ if (irqstate)
+ m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
+ //else
+ // m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
+ }
+}
+
+/* todo, handle custom VT nametable stuff here */
+READ8_MEMBER(nes_vt_soc_device::nt_r)
+{
+ return m_ntram[decode_nt_addr(offset)];
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::nt_w)
+{
+ //logerror("nt wr %04x %02x", offset, data);
+ m_ntram[decode_nt_addr(offset)] = data;
+}
+
+
+
+
+
+
+int nes_vt_soc_device::calculate_real_video_address(int addr, int extended, int readtype)
+{
+ // might be a VT09 only feature (alt 4bpp mode?)
+ int alt_order = m_ppu->get_201x_reg(0x0) & 0x40;
+
+ if (readtype == 0)
+ {
+ if (m_ppu->get_201x_reg(0x0) & 0x10)
+ {
+ extended = 1;
+ }
+ else
+ {
+ extended = 0;
+ }
+ }
+ else if (readtype == 1)
+ {
+ if (m_ppu->get_201x_reg(0x0) & 0x08)
+ {
+ extended = 1;
+ }
+ else
+ {
+ extended = 0;
+ }
+ }
+
+ /*
+ Calculating TVA17 - TVA10
+
+ --------------------------------------------------------------------------------------------
+ | COMR7 | AD[12:10] | TVA17 | TVA16 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
+ | (4105, 0x80) | (2006) | | | | | | | | |
+ --------------------------------------------------------------------------------------------
+ | 0/1/C/D | RV47 | RV46 | RV45 | RV44 | RV43 | RV42 | RV41 | AD10 | ** RV40 is never used
+ | 2/3/E/F | RV57 | RV56 | RV55 | RV54 | RV53 | RV52 | RV51 | AD10 | ** RV50 is never used
+ | 4/8 | RV07 | RV06 | RV05 | RV04 | RV03 | RV02 | RV01 | RV00 |
+ | 5/9 | RV17 | RV16 | RV15 | RV14 | RV13 | RV12 | RV11 | RV10 |
+ | 6/A | RV27 | RV26 | RV25 | RV24 | RV23 | RV22 | RV21 | RV20 |
+ | 7/B | RV37 | RV36 | RV35 | RV34 | RV33 | RV32 | RV31 | RV30 |
+ --------------------------------------------------------------------------------------------
+
+ m_r2012 = rv0x
+ m_r2013 = rv1x
+ m_r2014 = rv2x
+ m_r2015 = rv3x
+ m_r2016 = rv4x
+ m_r2017 = rv5x
+
+ */
+ int finaladdr = 0;
+
+ int sel = (addr & 0x1c00) | ((m_410x[0x5] & 0x80) ? 0x2000 : 0x000);
+
+ int vbank_tva17_tva10 = 0x00;
+
+ switch ((sel >> 10) & 0xf)
+ {
+ case 0x0:
+ case 0x1:
+ case 0xc:
+ case 0xd:
+ vbank_tva17_tva10 = (m_ppu->get_201x_reg(0x6) & 0xfe) | ((addr & 0x0400) ? 1 : 0);
+ break;
+
+ case 0x2:
+ case 0x3:
+ case 0xe:
+ case 0xf:
+ vbank_tva17_tva10 = (m_ppu->get_201x_reg(0x7) & 0xfe) | ((addr & 0x0400) ? 1 : 0);
+ break;
+
+ case 0x4:
+ case 0x8:
+ vbank_tva17_tva10 = m_ppu->get_201x_reg(0x2);
+ break;
+
+ case 0x5:
+ case 0x9:
+ vbank_tva17_tva10 = m_ppu->get_201x_reg(0x3);
+ break;
+
+ case 0x6:
+ case 0xa:
+ vbank_tva17_tva10 = m_ppu->get_201x_reg(0x4);
+ break;
+
+ case 0x7:
+ case 0xb:
+ vbank_tva17_tva10 = m_ppu->get_201x_reg(0x5);
+ break;
+
+ }
+
+ /*
+ Calculating VA17 - VA10 (requires TVA17-TVA10 to have been calculated)
+
+ ------------------------------------------------------------------------------
+ | VB0S[2:0] | VA[17:10] |
+ | 201a & 0x7 | VA17 | VA16 | VA15 | VA14 | VA13 | VA12 | VA11 | VA10 |
+ |-----------------------------------------------------------------------------
+ | 0x0 | TVA17 | TVA16 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
+ | 0x1 | TV67 | TVA16 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
+ | 0x2 | RV67 | RV66 | TVA15 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
+ | 0x3 | INVALID ***************************************************** |
+ | 0x4 | RV67 | RV66 | RV65 | TVA14 | TVA13 | TVA12 | TVA11 | TVA10 |
+ | 0x5 | RV67 | RV66 | RV65 | RV64 | TVA13 | TVA12 | TVA11 | TVA10 |
+ | 0x6 | RV67 | RV66 | RV65 | RV64 | RV63 | TVA12 | TVA11 | TVA10 |
+ | 0x7 | INVALID ***************************************************** |
+ ------------------------------------------------------------------------------
+
+ RV67- RV63 = 0x201a & 0xf8
+
+ */
+
+ int va17_va10 = 0;
+
+ int swit = m_ppu->get_201x_reg(0xa);
+
+ switch (swit & 0x07)
+ {
+ case 0x0: va17_va10 = vbank_tva17_tva10; break;
+ case 0x1: va17_va10 = (vbank_tva17_tva10 & 0x7f) | (m_ppu->get_201x_reg(0xa) & 0x80); break;
+ case 0x2: va17_va10 = (vbank_tva17_tva10 & 0x3f) | (m_ppu->get_201x_reg(0xa) & 0xc0); break;
+ case 0x3: return -1;
+ case 0x4: va17_va10 = (vbank_tva17_tva10 & 0x1f) | (m_ppu->get_201x_reg(0xa) & 0xe0); break;
+ case 0x5: va17_va10 = (vbank_tva17_tva10 & 0x0f) | (m_ppu->get_201x_reg(0xa) & 0xf0); break;
+ case 0x6: va17_va10 = (vbank_tva17_tva10 & 0x07) | (m_ppu->get_201x_reg(0xa) & 0xf8); break;
+ case 0x7: return -1;
+ }
+
+ int va34 = m_ppu->get_va34();
+
+ if (!extended)
+ {
+ int is4bpp = 0;
+ if (readtype == 0) is4bpp = m_ppu->get_201x_reg(0x0) & 0x02;
+ else if (readtype == 1) is4bpp = m_ppu->get_201x_reg(0x0) & 0x04;
+
+ int va20_va18 = (m_ppu->get_201x_reg(0x8) & 0x70) >> 4;
+
+ finaladdr = ((m_410x[0x0] & 0x0F) << 21) | (va20_va18 << 18) | (va17_va10 << 10) | (addr & 0x03ff);
+
+ if (is4bpp)
+ {
+ if (!alt_order)
+ {
+ finaladdr = ((finaladdr & ~0xf) << 1) | (va34 << 4) | (finaladdr & 0xf);
+ }
+ else
+ {
+ finaladdr = (finaladdr << 1) | va34;
+ }
+ }
+ }
+ else
+ {
+ int eva2_eva0 = 0x00;
+ int is4bpp = 0;
+
+ switch (readtype)
+ {
+ case 0: // background display
+ is4bpp = m_ppu->get_201x_reg(0x0) & 0x02;
+
+ eva2_eva0 |= m_ppu->get_m_read_bg4_bg3();
+
+ if (m_ppu->get_201x_reg(0x1) & 0x02)
+ {
+ if (m_410x[0x6] & 0x1) eva2_eva0 |= 0x4;
+ }
+ else
+ {
+ if (m_ppu->get_201x_reg(0x8) & 0x08) eva2_eva0 |= 0x4;
+ }
+ break;
+
+ case 1: // sprite display
+ is4bpp = m_ppu->get_201x_reg(0x0) & 0x04; // 16 colors or 16-pixel wide (both adjust the read)
+
+ eva2_eva0 |= m_ppu->get_speva2_speva0();
+
+ break;
+
+ case 2: // CPU R/W access
+ // todo
+ break;
+ }
+
+ finaladdr = ((m_410x[0x0] & 0x0f) << 21) | (va17_va10 << 13) | (eva2_eva0 << 10) | (addr & 0x03ff);
+
+ if (is4bpp)
+ {
+ if (!alt_order)
+ {
+ finaladdr = ((finaladdr & ~0xf) << 1) | (va34 << 4) | (finaladdr & 0xf);
+ }
+ else
+ {
+ finaladdr = (finaladdr << 1) | va34;
+ }
+
+ }
+ }
+ return /*m_ahigh |*/ finaladdr;
+}
+
+/*
+ nes_vt_soc_device::vt03_8000_mapper_w notes
+
+ used for MMC3/other mapper compatibility
+ some consoles have scrambled registers for crude copy protection
+
+ is this always there with VT based games? it maps where mappers would be on a NES cartridge
+ but then seems to be able to alter internal state of extended PPU registers, which is awkward
+*/
+
+void nes_vt_soc_device::scrambled_8000_w(address_space& space, uint16_t offset, uint8_t data)
+{
+ offset &= 0x7fff;
+
+ uint16_t addr = m_real_access_address; // we need the actual write address, not the translated one, to keep bittboy happy
+ if ((m_411d & 0x01) && (m_411d & 0x03))
+ {
+ //CNROM compat
+ logerror("%s: vtxx_cnrom_8000_w real address: (%04x) translated address: (%04x) %02x\n", machine().describe_context(), addr, offset + 0x8000, data);
+ m_ppu->set_201x_reg(0x6, data * 8);
+ m_ppu->set_201x_reg(0x7, data * 8 + 2);
+ m_ppu->set_201x_reg(0x2, data * 8 + 4);
+ m_ppu->set_201x_reg(0x3, data * 8 + 5);
+ m_ppu->set_201x_reg(0x4, data * 8 + 6);
+ m_ppu->set_201x_reg(0x5, data * 8 + 7);
+
+ }
+ else if (m_411d & 0x01)
+ {
+ //MMC1 compat, TODO
+ logerror("%s: vtxx_mmc1_8000_w real address: (%04x) translated address: (%04x) %02x\n", machine().describe_context(), addr, offset + 0x8000, data);
+
+ }
+ else if (m_411d & 0x02)
+ {
+ //UNROM compat
+ logerror("%s: vtxx_unrom_8000_w real address: (%04x) translated address: (%04x) %02x\n", machine().describe_context(), addr, offset + 0x8000, data);
+
+ m_410x[0x7] = ((data & 0x0F) << 1);
+ m_410x[0x8] = ((data & 0x0F) << 1) + 1;
+ update_banks();
+ }
+ else
+ {
+ //logerror("%s: vtxx_mmc3_8000_w real address: (%04x) translated address: (%04x) %02x\n", machine().describe_context(), addr, offset+0x8000, data );
+
+ //MMC3 compat
+ if ((addr < 0xA000) && !(addr & 0x01))
+ {
+ logerror("%s: scrambled_8000_w real address: (%04x) translated address: (%04x) %02x (banking)\n", machine().describe_context(), addr, offset + 0x8000, data);
+ // Bank select
+ m_8000_addr_latch = data & 0x07;
+ // Bank config
+ m_410x[0x05] = data & ~(1 << 5);
+ update_banks();
+ }
+ else if ((addr < 0xA000) && (addr & 0x01))
+ {
+ logerror("%s: scrambled_8000_w real address: (%04x) translated address: (%04x) %02x (other scrambled stuff)\n", machine().describe_context(), addr, offset + 0x8000, data);
+
+ switch (m_410x[0x05] & 0x07)
+ {
+ case 0x00:
+ m_ppu->set_201x_reg(m_8000_scramble[0], data);
+ break;
+
+ case 0x01:
+ m_ppu->set_201x_reg(m_8000_scramble[1], data);
+ break;
+
+ case 0x02: // hand?
+ m_ppu->set_201x_reg(m_8000_scramble[2], data);
+ break;
+
+ case 0x03: // dog?
+ m_ppu->set_201x_reg(m_8000_scramble[3], data);
+ break;
+
+ case 0x04: // ball thrown
+ m_ppu->set_201x_reg(m_8000_scramble[4], data);
+ break;
+
+ case 0x05: // ball thrown
+ m_ppu->set_201x_reg(m_8000_scramble[5], data);
+ break;
+ case 0x06:
+ m_410x[m_8000_scramble[6]] = data;
+ //m_410x[0x9] = data;
+ update_banks();
+ break;
+
+ case 0x07:
+ m_410x[m_8000_scramble[7]] = data;
+ update_banks();
+ break;
+ }
+ }
+ else if ((addr >= 0xA000) && (addr < 0xC000) && !(addr & 0x01))
+ {
+ // Mirroring
+ m_410x[0x6] &= 0xFE;
+ m_410x[0x6] |= data & 0x01;
+ }
+ else if ((addr >= 0xA000) && (addr < 0xC000) && (addr & 0x01))
+ {
+ // PRG RAM control, ignore
+ }
+ else if ((addr >= 0xC000) && (addr < 0xE000) && !(addr & 0x01))
+ {
+ // IRQ latch
+ vt03_410x_w(space, 1, data);
+ }
+ else if ((addr >= 0xC000) && (addr < 0xE000) && (addr & 0x01))
+ {
+ // IRQ reload
+ vt03_410x_w(space, 2, data);
+ }
+ else if ((addr >= 0xE000) && !(addr & 0x01))
+ {
+ // IRQ disable
+ vt03_410x_w(space, 3, data);
+ }
+ else if ((addr >= 0xE000) && (addr & 0x01))
+ {
+ // IRQ enable
+ vt03_410x_w(space, 4, data);
+ }
+ else
+ {
+
+ }
+ }
+}
+
+// MMC3 compatibility mode
+
+void nes_vt_soc_device::set_8000_scramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5, uint8_t reg6, uint8_t reg7)
+{
+ m_8000_scramble[0] = reg0; // TODO: name the regs
+ m_8000_scramble[1] = reg1;
+ m_8000_scramble[2] = reg2;
+ m_8000_scramble[3] = reg3;
+ m_8000_scramble[4] = reg4;
+ m_8000_scramble[5] = reg5;
+ m_8000_scramble[6] = reg6;
+ m_8000_scramble[7] = reg7;
+}
+
+void nes_vt_soc_device::set_410x_scramble(uint8_t reg0, uint8_t reg1)
+{
+ m_410x_scramble[0] = reg0; // TODO: name the regs
+ m_410x_scramble[1] = reg1;
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::vt03_8000_mapper_w)
+{
+ scrambled_8000_w(space, offset, data);
+ //logerror("%s: vt03_8000_mapper_w (%04x) %02x\n", machine().describe_context(), offset+0x8000, data );
+}
+
+/* APU plumbing, this is because we have a plain M6502 core in the VT03, otherwise this is handled in the core */
+
+READ8_MEMBER(nes_vt_soc_device::psg1_4014_r)
+{
+ //return m_apu->read(0x14);
+ return 0x00;
+}
+
+READ8_MEMBER(nes_vt_soc_device::psg1_4015_r)
+{
+ return m_apu->read(0x15);
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::psg1_4015_w)
+{
+ m_apu->write(0x15, data);
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::psg1_4017_w)
+{
+ m_apu->write(0x17, data);
+}
+
+// early units (VT03?) have a DMA bug in NTSC mode
+WRITE8_MEMBER(nes_vt_soc_device::vt_dma_w)
+{
+ if (!m_force_baddma)
+ do_dma(data, true);
+ else
+ do_dma(data, false);
+}
+
+
+
+void nes_vt_soc_device::do_dma(uint8_t data, bool has_ntsc_bug)
+{
+ // only NTSC systems have 'broken' DMA which requires the DMA addresses to be shifted by 1, PAL systems work as expected
+ if (m_ppu->get_is_pal())
+ has_ntsc_bug = false;
+
+ uint8_t dma_mode = m_vdma_ctrl & 0x01;
+ uint8_t dma_len = (m_vdma_ctrl >> 1) & 0x07;
+ uint8_t src_nib_74 = (m_vdma_ctrl >> 4) & 0x0F;
+
+ int length = 256;
+ switch (dma_len)
+ {
+ case 0x0: length = 256; break;
+ case 0x4: length = 16; break;
+ case 0x5: length = 32; break;
+ case 0x6: length = 64; break;
+ case 0x7: length = 128; break;
+ }
+
+ uint16_t src_addr = (data << 8) | (src_nib_74 << 4);
+ logerror("vthh dma start ctrl=%02x addr=%04x\n", m_vdma_ctrl, src_addr);
+
+ if (dma_mode == 1)
+ {
+ logerror("vdma dest %04x\n", m_ppu->get_vram_dest());
+ }
+
+ if (has_ntsc_bug && (dma_mode == 1) && ((m_ppu->get_vram_dest() & 0xFF00) == 0x3F00) && !(m_ppu->get_201x_reg(0x1) & 0x80))
+ {
+ length -= 1;
+ src_addr += 1;
+ }
+ else if ((dma_mode == 1) && ((m_ppu->get_vram_dest() & 0xFF00) == 0x3F01) && !(m_ppu->get_201x_reg(0x1) & 0x80))
+ {
+ // Legacy mode for DGUN-2573 compat
+ m_ppu->set_vram_dest(0x3F00);
+ m_ppu->set_palette_mode(PAL_MODE_VT0x);
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ uint8_t spriteData = m_maincpu->space(AS_PROGRAM).read_byte(src_addr + i);
+ if (dma_mode)
+ {
+ m_maincpu->space(AS_PROGRAM).write_byte(0x2007, spriteData);
+ }
+ else
+ {
+ m_maincpu->space(AS_PROGRAM).write_byte(0x2004, spriteData);
+ }
+ //if(((src_addr + i) & 0xFF) == length && (i != 0)) break;
+ }
+
+ // should last (length * 4 - 1) CPU cycles.
+ //((device_t*)m_maincpu)->execute().adjust_icount(-(length * 4 - 1));
+}
+
+
+WRITE8_MEMBER(nes_vt_soc_device::vt03_4034_w)
+{
+ logerror("vt03_4034_w %02x\n", data);
+ m_vdma_ctrl = data;
+}
+
+READ8_MEMBER(nes_vt_soc_device::in0_r)
+{
+ return m_read_0_callback();
+}
+
+READ8_MEMBER(nes_vt_soc_device::in1_r)
+{
+ return m_read_1_callback();
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::in0_w)
+{
+ m_write_0_callback(offset, data);
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::extra_io_control_w)
+{
+ /*
+ 410d Extra I/O control
+
+ 0x01 Extra I/O port 0 mode (1 = output, 0 = input)
+ 0x02 Extra I/O port 0 enable (1 = enable, 0 = disable)
+ 0x04 Extra I/O port 1 mode (1 = output, 0 = input)
+ 0x08 Extra I/O port 1 enable (1 = enable, 0 = disable)
+ 0x10 Extra I/O port 2 mode (1 = output, 0 = input)
+ 0x20 Extra I/O port 2 enable (1 = enable, 0 = disable)
+ 0x40 Extra I/O port 3 mode (1 = output, 0 = input)
+ 0x80 Extra I/O port 3 enable (1 = enable, 0 = disable)
+ */
+
+ logerror("%s: extra_io_control_w %02x\n", machine().describe_context(), data);
+}
+
+READ8_MEMBER(nes_vt_soc_device::extrain_01_r)
+{
+ // TODO: check status of 410d port to make sure we only read from enabled ports
+ uint8_t in0 = 0x00, in1 = 0x00;
+
+ in0 = m_extra_read_0_callback() & 0x0f;
+ in1 = m_extra_read_1_callback() & 0x0f;
+
+ return in0 | (in1<<4);
+}
+
+READ8_MEMBER(nes_vt_soc_device::extrain_23_r)
+{
+ // TODO: check status of 410d port to make sure we only read from enabled ports
+ uint8_t in2 = 0x00, in3 = 0x00;
+
+ in2 = m_extra_read_2_callback() & 0x0f;
+ in3 = m_extra_read_3_callback() & 0x0f;
+
+ return in2 | (in3<<4);
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::extraout_01_w)
+{
+ // TODO: use callbacks for this as output can be hooked up to anything
+ logerror("%s: extraout_01_w %02x\n", machine().describe_context(), data);
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::extraout_23_w)
+{
+ // TODO: use callbacks for this as output can be hooked up to anything
+ logerror("%s: extraout_23_w %02x\n", machine().describe_context(), data);
+}
+
+READ8_MEMBER(nes_vt_soc_device::rs232flags_region_r)
+{
+ /*
+ 0x4119 RS232 Flags + Region
+
+ 0x01 - RX bit 8
+ 0x02 - RERFF (error status)
+ 0x04 - unused
+ 0x08 - XPORN (PAL = 1 NTSC = 0)
+ 0x10 - XF5OR6 (50hz = 1 60hz = 0)
+ 0x20 - RINGF (receive status)
+ 0x40 - TIFLAG (completed sending data status)
+ 0x80 - RIFLAG (completed receiving data status)
+ */
+ uint8_t ret = 0x00;
+
+ // Palette DMA is buggy on NTSC systems (at least for regular VT03)
+ // so the palette DMA writes will change based on the reading of these flags
+
+ ret |= m_ppu->get_is_pal() ? 0x08 : 0x00;
+ ret |= m_ppu->get_is_50hz() ? 0x10 : 0x00;
+
+ return ret;
+}
+
+
+READ8_MEMBER(nes_vt_soc_device::external_space_read)
+{
+ address_space& spc = this->space(AS_PROGRAM);
+ int bank = (offset & 0x6000) >> 13;
+ int address = (m_bankaddr[bank] * 0x2000) + (offset & 0x1fff);
+ m_real_access_address = offset + 0x8000;
+ return spc.read_byte(address);
+}
+
+WRITE8_MEMBER(nes_vt_soc_device::external_space_write)
+{
+ address_space& spc = this->space(AS_PROGRAM);
+ int bank = (offset & 0x6000) >> 13;
+ int address = (m_bankaddr[bank] * 0x2000) + (offset&0x1fff);
+ m_real_access_address = offset + 0x8000;
+ spc.write_byte(address, data);
+};
+
+void nes_vt_soc_device::nes_vt_map(address_map &map)
+{
+ map(0x0000, 0x07ff).ram();
+
+ // ddrdismx relies on the mirroring
+ map(0x2000, 0x2007).mirror(0x00e0).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); // standard PPU registers
+ map(0x2010, 0x201f).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::read_extended), FUNC(ppu_vt03_device::write_extended)); // extra VT PPU registers
+
+ map(0x4000, 0x4013).rw(m_apu, FUNC(nesapu_device::read), FUNC(nesapu_device::write));
+
+
+ map(0x4014, 0x4014).r(FUNC(nes_vt_soc_device::psg1_4014_r)).w(FUNC(nes_vt_soc_device::vt_dma_w));
+ map(0x4015, 0x4015).rw(FUNC(nes_vt_soc_device::psg1_4015_r), FUNC(nes_vt_soc_device::psg1_4015_w)); // PSG status / first control register
+ map(0x4016, 0x4016).rw(FUNC(nes_vt_soc_device::in0_r), FUNC(nes_vt_soc_device::in0_w));
+ map(0x4017, 0x4017).r(FUNC(nes_vt_soc_device::in1_r)).w(FUNC(nes_vt_soc_device::psg1_4017_w));
+
+ map(0x4034, 0x4034).w(FUNC(nes_vt_soc_device::vt03_4034_w));
+
+ map(0x4100, 0x410b).r(FUNC(nes_vt_soc_device::vt03_410x_r)).w(FUNC(nes_vt_soc_device::vt03_410x_w));
+ // 0x410c unused
+ map(0x410d, 0x410d).w(FUNC(nes_vt_soc_device::extra_io_control_w));
+ map(0x410e, 0x410e).rw(FUNC(nes_vt_soc_device::extrain_01_r), FUNC(nes_vt_soc_device::extraout_01_w));
+ map(0x410f, 0x410f).rw(FUNC(nes_vt_soc_device::extrain_23_r), FUNC(nes_vt_soc_device::extraout_23_w));
+ // 0x4114 RS232 timer (low)
+ // 0x4115 RS232 timer (high)
+ // 0x4116 unused
+ // 0x4117 unused
+ // 0x4118 unused
+ map(0x4119, 0x4119).r(FUNC(nes_vt_soc_device::rs232flags_region_r));
+ // 0x411a RS232 TX data
+ // 0x411b RS232 RX data
+
+
+ map(0x8000, 0xffff).rw(FUNC(nes_vt_soc_device::external_space_read), FUNC(nes_vt_soc_device::external_space_write));
+ map(0x6000, 0x7fff).ram();
+}
+
+
+
+WRITE_LINE_MEMBER(nes_vt_soc_device::apu_irq)
+{
+ // TODO
+// set_input_line(N2A03_APU_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+READ8_MEMBER(nes_vt_soc_device::apu_read_mem)
+{
+ // TODO
+ return 0x00;//mintf->program->read_byte(offset);
+}
+
+uint32_t nes_vt_soc_device::screen_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect)
+{
+ return m_ppu->screen_update(screen, bitmap, cliprect);
+}
+
+
+device_memory_interface::space_config_vector nes_vt_soc_device::memory_space_config() const
+{
+ return space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_space_config)
+ };
+}
+
+void nes_vt_soc_device::do_pal_timings_and_ppu_replacement(machine_config& config)
+{
+ m_maincpu->set_clock(PALC_APU_CLOCK);
+
+ PPU_VT03PAL(config.replace(), m_ppu, N2A03_PAL_XTAL);
+ m_ppu->set_cpu_tag(m_maincpu);
+ m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_ppu->read_bg().set(FUNC(nes_vt_soc_device::chr_r));
+ m_ppu->read_sp().set(FUNC(nes_vt_soc_device::spr_r));
+ m_ppu->set_screen(m_screen);
+
+ m_screen->set_refresh_hz(50.0070);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((113.66 / (PALC_APU_CLOCK.dvalue() / 1000000)) *
+ (ppu2c0x_device::VBLANK_LAST_SCANLINE_PAL - ppu2c0x_device::VBLANK_FIRST_SCANLINE_PALC + 1 + 2)));
+ m_screen->set_size(32 * 8, 312);
+ m_screen->set_visarea(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
+}
+
+
+void nes_vt_soc_device::device_add_mconfig(machine_config &config)
+{
+ M6502(config, m_maincpu, NTSC_APU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_device::nes_vt_map);
+
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60.0988);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((113.66/(NTSC_APU_CLOCK.dvalue()/1000000)) *
+ (ppu2c0x_device::VBLANK_LAST_SCANLINE_NTSC-ppu2c0x_device::VBLANK_FIRST_SCANLINE+1+2)));
+ m_screen->set_size(32*8, 262);
+ m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nes_vt_soc_device::screen_update));
+
+ PPU_VT03(config, m_ppu, N2A03_NTSC_XTAL);
+ m_ppu->set_cpu_tag(m_maincpu);
+ m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_ppu->read_bg().set(FUNC(nes_vt_soc_device::chr_r));
+ m_ppu->read_sp().set(FUNC(nes_vt_soc_device::spr_r));
+ m_ppu->set_screen(m_screen);
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+
+ /* this should actually be a custom *almost* doubled up APU, however requires more thought
+ than just using 2 APUs as registers in the 2nd one affect the PCM channel mode but the
+ DMA control still comes from the 1st, but in the new mode, sound always outputs via the
+ 2nd. Probably need to split the APU into interface and sound gen logic. */
+ NES_APU(config, m_apu, NTSC_APU_CLOCK);
+ m_apu->irq().set(FUNC(nes_vt_soc_device::apu_irq));
+ m_apu->mem_read().set(FUNC(nes_vt_soc_device::apu_read_mem));
+ m_apu->add_route(ALL_OUTPUTS, "mono", 0.50);
+}
+
+void nes_vt_soc_pal_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ do_pal_timings_and_ppu_replacement(config);
+}
+
+
+/***********************************************************************************************************************************************************/
+/* 'Scramble' specifics */
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_scramble_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+
+ M6502_SWAP_OP_D5_D6(config.replace(), m_maincpu, NTSC_APU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_scramble_device::nes_vt_map);
+}
+
+/***********************************************************************************************************************************************************/
+/* '4K' specifics */
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_4kram_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_4kram_device::nes_vt_map);
+}
+
+void nes_vt_soc_4kram_device::device_start()
+{
+ nes_vt_soc_device::device_start();
+
+ m_upper_write_412c_callback.resolve_safe();
+ m_upper_read_412c_callback.resolve_safe(0xff);
+ m_upper_read_412d_callback.resolve_safe(0xff);
+}
+
+void nes_vt_soc_4kram_device::nes_vt_4k_ram_map(address_map &map)
+{
+ nes_vt_soc_device::nes_vt_map(map);
+ map(0x0800, 0x0fff).ram();
+
+// map(0x412c, 0x412c).rw(FUNC(nes_vt_soc_4kram_device::vtfp_412c_r, FUNC(nes_vt_soc_4kram_device::vtfp_412c_extbank_w)); // GPIO
+// map(0x412d, 0x412d).r(FUNC(nes_vt_soc_4kram_device::vtfp_412d_r)); // GPIO
+
+}
+
+/***********************************************************************************************************************************************************/
+/* 'CY' specifics (base = '4K') */
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_4kram_cy_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_4kram_cy_device::nes_vt_cy_map);
+}
+
+void nes_vt_soc_4kram_cy_device::nes_vt_cy_map(address_map &map)
+{
+ nes_vt_4k_ram_map(map);
+ map(0x41b0, 0x41bf).r(FUNC(nes_vt_soc_4kram_cy_device::vt03_41bx_r)).w(FUNC(nes_vt_soc_4kram_cy_device::vt03_41bx_w));
+ map(0x4130, 0x4136).r(FUNC(nes_vt_soc_4kram_cy_device::vt03_413x_r)).w(FUNC(nes_vt_soc_4kram_cy_device::vt03_413x_w));
+ map(0x414f, 0x414f).r(FUNC(nes_vt_soc_4kram_cy_device::vt03_414f_r));
+ map(0x415c, 0x415c).r(FUNC(nes_vt_soc_4kram_cy_device::vt03_415c_r));
+
+ map(0x48a0, 0x48af).r(FUNC(nes_vt_soc_4kram_cy_device::vt03_48ax_r)).w(FUNC(nes_vt_soc_4kram_cy_device::vt03_48ax_w));
+}
+
+void nes_vt_soc_4kram_cy_device::device_start()
+{
+ nes_vt_soc_device::device_start();
+ save_item(NAME(m_413x));
+}
+
+
+READ8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_41bx_r)
+{
+ switch (offset)
+ {
+ case 0x07:
+ return 0x04;
+ default:
+ return 0x00;
+ }
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_41bx_w)
+{
+ logerror("vt03_41bx_w %02x %02x\n", offset, data);
+}
+
+READ8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_413x_r)
+{
+ logerror("vt03_413x_r %02x\n", offset);
+ return m_413x[offset];
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_413x_w)
+{
+ logerror("vt03_413x_w %02x %02x\n", offset, data);
+ // VT168 style ALU ??
+ m_413x[offset] = data;
+ if (offset == 0x5)
+ {
+ uint32_t res = uint32_t((m_413x[5] << 8) | m_413x[4]) * uint32_t((m_413x[1] << 8) | m_413x[0]);
+ m_413x[0] = res & 0xFF;
+ m_413x[1] = (res >> 8) & 0xFF;
+ m_413x[2] = (res >> 16) & 0xFF;
+ m_413x[3] = (res >> 24) & 0xFF;
+ m_413x[6] = 0x00;
+
+ }
+ else if (offset == 0x6)
+ {
+ /*uint32_t res = uint32_t((m_413x[5] << 8) | m_413x[4]) * uint32_t((m_413x[1] << 8) | m_413x[0]);
+ m_413x[0] = res & 0xFF;
+ m_413x[1] = (res >> 8) & 0xFF;
+ m_413x[2] = (res >> 16) & 0xFF;
+ m_413x[3] = (res >> 24) & 0xFF;*/
+ m_413x[6] = 0x00;
+ }
+}
+
+READ8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_414f_r)
+{
+ return 0xff;
+}
+
+READ8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_415c_r)
+{
+ return 0xff;
+}
+
+
+WRITE8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_48ax_w)
+{
+ logerror("vt03_48ax_w %02x %02x\n", offset, data);
+}
+
+READ8_MEMBER(nes_vt_soc_4kram_cy_device::vt03_48ax_r)
+{
+ switch (offset)
+ {
+ case 0x04:
+ return 0x01;
+ case 0x05:
+ return 0x01;
+ default:
+ return 0x00;
+ }
+}
+
+/***********************************************************************************************************************************************************/
+/* 'BT' specifics (base = '4K') */
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_4kram_bt_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_4kram_bt_device::nes_vt_bt_map);
+}
+
+void nes_vt_soc_4kram_bt_device::nes_vt_bt_map(address_map &map)
+{
+ nes_vt_4k_ram_map(map);
+ map(0x412c, 0x412c).w(FUNC(nes_vt_soc_4kram_bt_device::vt03_412c_extbank_w));
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_bt_device::vt03_412c_extbank_w)
+{
+ m_upper_write_412c_callback(data);
+}
+
+
+/***********************************************************************************************************************************************************/
+/* 'HH' specifics (base = '4K') */
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_4kram_hh_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_4kram_hh_device::nes_vt_hh_map);
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_hh_device::vtfp_411d_w)
+{
+ // controls chram access and mapper emulation modes in later models
+ logerror("vtfp_411d_w %02x\n", data);
+ m_411d = data;
+ update_banks();
+}
+
+READ8_MEMBER(nes_vt_soc_4kram_hh_device::vthh_414a_r)
+{
+ return 0x80;
+}
+
+void nes_vt_soc_4kram_hh_device::nes_vt_hh_map(address_map &map)
+{
+ nes_vt_soc_device::nes_vt_map(map);
+
+ map(0x0000, 0x1fff).mask(0x0fff).ram();
+
+ map(0x414a, 0x414a).r(FUNC(nes_vt_soc_4kram_hh_device::vthh_414a_r));
+ map(0x411d, 0x411d).w(FUNC(nes_vt_soc_4kram_hh_device::vtfp_411d_w));
+}
+
+/***********************************************************************************************************************************************************/
+/* 'FP' specifics (base = 'HH') */ // used by fcpocket, dgun2573, rminitv
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_4kram_fp_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+
+ M6502_VTSCR(config.replace(), m_maincpu, NTSC_APU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_4kram_fp_device::nes_vt_fp_map);
+}
+
+
+READ8_MEMBER(nes_vt_soc_4kram_fp_device::vtfp_4119_r)
+{
+ // would be PAL/NTSC etc. in base system, maybe different here?
+ return 0x00;
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_fp_device::vtfp_411e_w)
+{
+ logerror("411e_w %02x\n", data);
+ if (data == 0x05)
+ dynamic_cast<m6502_vtscr&>(*m_maincpu).set_next_scramble(true);
+ else if (data == 0x00)
+ dynamic_cast<m6502_vtscr&>(*m_maincpu).set_next_scramble(false);
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_fp_device::vtfp_4a00_w)
+{
+ logerror("4a00_w %02x\n", data);
+ //if(data == 0x80)
+ // dynamic_cast<m6502_vtscr&>(*m_maincpu).set_scramble(false);
+}
+
+
+WRITE8_MEMBER(nes_vt_soc_4kram_fp_device::vtfp_412c_extbank_w)
+{
+ m_upper_write_412c_callback(data);
+}
+
+READ8_MEMBER(nes_vt_soc_4kram_fp_device::vtfp_412d_r)
+{
+ return m_upper_read_412d_callback();
+}
+
+WRITE8_MEMBER(nes_vt_soc_4kram_fp_device::vtfp_4242_w)
+{
+ logerror("vtfp_4242_w %02x\n", data);
+ m_4242 = data;
+}
+
+void nes_vt_soc_4kram_fp_device::nes_vt_fp_map(address_map &map)
+{
+ nes_vt_soc_4kram_hh_device::nes_vt_hh_map(map);
+
+ map(0x4119, 0x4119).r(FUNC(nes_vt_soc_4kram_fp_device::vtfp_4119_r));
+ map(0x411e, 0x411e).w(FUNC(nes_vt_soc_4kram_fp_device::vtfp_411e_w)); // encryption toggle
+
+ map(0x412c, 0x412c).w(FUNC(nes_vt_soc_4kram_fp_device::vtfp_412c_extbank_w)); // GPIO
+ map(0x412d, 0x412d).r(FUNC(nes_vt_soc_4kram_fp_device::vtfp_412d_r)); // GPIO
+
+ map(0x4242, 0x4242).w(FUNC(nes_vt_soc_4kram_fp_device::vtfp_4242_w));
+
+ map(0x4a00, 0x4a00).w(FUNC(nes_vt_soc_4kram_fp_device::vtfp_4a00_w));
+}
+
+void nes_vt_soc_4kram_fp_pal_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_4kram_fp_device::device_add_mconfig(config);
+ do_pal_timings_and_ppu_replacement(config);
+}
+
+/***********************************************************************************************************************************************************/
+/* 'DG' specifics (base = '4K') */
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_8kram_dg_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_8kram_dg_device::nes_vt_dg_map);
+}
+
+WRITE8_MEMBER(nes_vt_soc_8kram_dg_device::vt03_411c_w)
+{
+ logerror("vt03_411c_w %02x\n", data);
+ m_411c = data;
+ update_banks();
+}
+
+void nes_vt_soc_8kram_dg_device::nes_vt_dg_map(address_map &map)
+{
+ nes_vt_soc_device::nes_vt_map(map);
+
+ map(0x0000, 0x1fff).ram();
+ map(0x411c, 0x411c).w(FUNC(nes_vt_soc_8kram_dg_device::vt03_411c_w));
+}
+
+/***********************************************************************************************************************************************************/
+/* 'FA' specifics (base = 'DG') */ // used by fapocket
+/***********************************************************************************************************************************************************/
+
+void nes_vt_soc_8kram_fa_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_soc_8kram_fa_device::nes_vt_fa_map);
+}
+
+READ8_MEMBER(nes_vt_soc_8kram_fa_device::vtfa_412c_r)
+{
+ return m_upper_read_412c_callback();
+}
+
+WRITE8_MEMBER(nes_vt_soc_8kram_fa_device::vtfa_412c_extbank_w)
+{
+ m_upper_write_412c_callback(data);
+
+}
+
+WRITE8_MEMBER(nes_vt_soc_8kram_fa_device::vtfp_4242_w)
+{
+ logerror("vtfp_4242_w %02x\n", data);
+ m_4242 = data;
+}
+
+void nes_vt_soc_8kram_fa_device::nes_vt_fa_map(address_map &map)
+{
+ nes_vt_soc_8kram_dg_device::nes_vt_dg_map(map);
+
+ map(0x412c, 0x412c).r(FUNC(nes_vt_soc_8kram_fa_device::vtfa_412c_r)).w(FUNC(nes_vt_soc_8kram_fa_device::vtfa_412c_extbank_w));
+ map(0x4242, 0x4242).w(FUNC(nes_vt_soc_8kram_fa_device::vtfp_4242_w));
+}
+
diff --git a/src/mame/machine/nes_vt_soc.h b/src/mame/machine/nes_vt_soc.h
new file mode 100644
index 00000000000..0e9b57bdcf9
--- /dev/null
+++ b/src/mame/machine/nes_vt_soc.h
@@ -0,0 +1,343 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#ifndef MAME_MACHINE_NES_VT_H
+#define MAME_MACHINE_NES_VT_H
+
+#pragma once
+
+#include "cpu/m6502/n2a03.h"
+#include "machine/m6502_vtscr.h"
+#include "machine/m6502_swap_op_d5_d6.h"
+#include "video/ppu2c0x_vt.h"
+#include "screen.h"
+#include "speaker.h"
+
+class nes_vt_soc_device : public device_t, public device_memory_interface
+{
+public:
+ nes_vt_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ void program_map(address_map &map);
+
+ DECLARE_WRITE8_MEMBER(vt03_8000_mapper_w);
+
+ // 8-bit ports
+ auto write_0_callback() { return m_write_0_callback.bind(); }
+ auto read_0_callback() { return m_read_0_callback.bind(); }
+ auto read_1_callback() { return m_read_1_callback.bind(); }
+
+ // 4-bit ports
+ auto extra_read_0_callback() { return m_extra_read_0_callback.bind(); }
+ auto extra_read_1_callback() { return m_extra_read_1_callback.bind(); }
+ auto extra_read_2_callback() { return m_extra_read_2_callback.bind(); }
+ auto extra_read_3_callback() { return m_extra_read_3_callback.bind(); }
+
+ auto extra_write_0_callback() { return m_extra_write_0_callback.bind(); }
+ auto extra_write_1_callback() { return m_extra_write_1_callback.bind(); }
+ auto extra_write_2_callback() { return m_extra_write_2_callback.bind(); }
+ auto extra_write_3_callback() { return m_extra_write_3_callback.bind(); }
+
+ void set_201x_descramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5)
+ {
+ m_2012_2017_descramble[0] = reg0; // TOOD: name regs
+ m_2012_2017_descramble[1] = reg1;
+ m_2012_2017_descramble[2] = reg2;
+ m_2012_2017_descramble[3] = reg3;
+ m_2012_2017_descramble[4] = reg4;
+ m_2012_2017_descramble[5] = reg5;
+ };
+
+ void set_8000_scramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5, uint8_t reg6, uint8_t reg7);
+ void set_410x_scramble(uint8_t reg0, uint8_t reg1);
+ void force_bad_dma() { m_force_baddma = true; };
+
+ void set_default_palette_mode(vtxx_pal_mode pmode) { m_default_palette_mode = pmode; }
+
+protected:
+ nes_vt_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual space_config_vector memory_space_config() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<screen_device> m_screen;
+ required_device<ppu_vt03_device> m_ppu;
+ required_device<nesapu_device> m_apu;
+
+ void nes_vt_map(address_map& map);
+
+ uint32_t get_banks(uint8_t bnk);
+ void update_banks();
+ uint16_t decode_nt_addr(uint16_t addr);
+ DECLARE_WRITE8_MEMBER(vt03_410x_w);
+ DECLARE_READ8_MEMBER(vt03_410x_r);
+ void scrambled_410x_w(uint16_t offset, uint8_t data);
+ DECLARE_READ8_MEMBER(spr_r);
+ DECLARE_READ8_MEMBER(chr_r);
+ DECLARE_WRITE8_MEMBER(chr_w);
+ void scanline_irq(int scanline, int vblank, int blanked);
+ void hblank_irq(int scanline, int vblank, int blanked);
+ void video_irq(bool hblank, int scanline, int vblank, int blanked);
+ DECLARE_READ8_MEMBER(nt_r);
+ DECLARE_WRITE8_MEMBER(nt_w);
+ int calculate_real_video_address(int addr, int extended, int readtype);
+ void scrambled_8000_w(address_space& space, uint16_t offset, uint8_t data);
+ DECLARE_READ8_MEMBER(psg1_4014_r);
+ DECLARE_READ8_MEMBER(psg1_4015_r);
+ DECLARE_WRITE8_MEMBER(psg1_4015_w);
+ DECLARE_WRITE8_MEMBER(psg1_4017_w);
+ DECLARE_WRITE8_MEMBER(vt_dma_w);
+ DECLARE_WRITE8_MEMBER(vt_fixed_dma_w);
+ void do_dma(uint8_t data, bool has_ntsc_bug);
+ DECLARE_WRITE8_MEMBER(vt03_4034_w);
+
+ DECLARE_READ8_MEMBER(in0_r);
+ DECLARE_READ8_MEMBER(in1_r);
+ DECLARE_WRITE8_MEMBER(in0_w);
+
+ DECLARE_WRITE8_MEMBER(extra_io_control_w);
+ DECLARE_READ8_MEMBER(extrain_01_r);
+ DECLARE_READ8_MEMBER(extrain_23_r);
+ DECLARE_WRITE8_MEMBER(extraout_01_w);
+ DECLARE_WRITE8_MEMBER(extraout_23_w);
+ DECLARE_READ8_MEMBER(rs232flags_region_r);
+
+ uint32_t screen_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect);
+
+ uint8_t m_410x[0xc];
+
+ uint8_t m_vdma_ctrl;
+ int m_timer_irq_enabled;
+ int m_timer_running;
+ int m_timer_val;
+
+ uint8_t m_8000_scramble[8];
+ uint8_t m_410x_scramble[2];
+
+ uint8_t m_8000_addr_latch;
+
+ uint8_t m_4242;
+ uint8_t m_411c;
+ uint8_t m_411d;
+
+ uint8_t m_initial_e000_bank;
+ /* expansion nametable - todo, see if we can refactor NES code to be reusable without having to add full NES bus etc. */
+ std::unique_ptr<uint8_t[]> m_ntram;
+ std::unique_ptr<uint8_t[]> m_chrram;
+
+ DECLARE_WRITE_LINE_MEMBER(apu_irq);
+ DECLARE_READ8_MEMBER(apu_read_mem);
+
+ DECLARE_READ8_MEMBER(external_space_read);
+ DECLARE_WRITE8_MEMBER(external_space_write);
+
+ void do_pal_timings_and_ppu_replacement(machine_config& config);
+
+private:
+
+ address_space_config m_space_config;
+
+ int m_bankaddr[4];
+ uint16_t m_real_access_address;
+
+ devcb_write8 m_write_0_callback;
+ devcb_read8 m_read_0_callback;
+ devcb_read8 m_read_1_callback;
+
+ devcb_write8 m_extra_write_0_callback;
+ devcb_write8 m_extra_write_1_callback;
+ devcb_write8 m_extra_write_2_callback;
+ devcb_write8 m_extra_write_3_callback;
+
+ devcb_read8 m_extra_read_0_callback;
+ devcb_read8 m_extra_read_1_callback;
+ devcb_read8 m_extra_read_2_callback;
+ devcb_read8 m_extra_read_3_callback;
+
+ uint8_t m_2012_2017_descramble[0x6]; // passed to PPU in reset
+ vtxx_pal_mode m_default_palette_mode;
+ bool m_force_baddma;
+};
+
+class nes_vt_soc_pal_device : public nes_vt_soc_device
+{
+public:
+ nes_vt_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config& config) override;
+};
+
+class nes_vt_soc_scramble_device : public nes_vt_soc_device
+{
+public:
+ nes_vt_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config& config) override;
+};
+
+class nes_vt_soc_4kram_device : public nes_vt_soc_device
+{
+public:
+ nes_vt_soc_4kram_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+ auto upper_read_412c_callback() { return m_upper_read_412c_callback.bind(); }
+ auto upper_read_412d_callback() { return m_upper_read_412d_callback.bind(); }
+
+ auto upper_write_412c_callback() { return m_upper_write_412c_callback.bind(); }
+
+
+protected:
+ nes_vt_soc_4kram_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock);
+ void device_start() override;
+
+ virtual void device_add_mconfig(machine_config& config) override;
+
+ void nes_vt_4k_ram_map(address_map& map);
+
+ devcb_write8 m_upper_write_412c_callback;
+
+ devcb_read8 m_upper_read_412c_callback;
+ devcb_read8 m_upper_read_412d_callback;
+};
+
+class nes_vt_soc_4kram_cy_device : public nes_vt_soc_4kram_device
+{
+public:
+ nes_vt_soc_4kram_cy_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config& config) override;
+ void device_start() override;
+
+ void nes_vt_cy_map(address_map& map);
+
+ DECLARE_READ8_MEMBER(vt03_41bx_r);
+ DECLARE_WRITE8_MEMBER(vt03_41bx_w);
+
+ DECLARE_READ8_MEMBER(vt03_413x_r);
+ DECLARE_WRITE8_MEMBER(vt03_413x_w);
+
+ DECLARE_READ8_MEMBER(vt03_414f_r);
+
+ DECLARE_READ8_MEMBER(vt03_415c_r);
+
+ DECLARE_WRITE8_MEMBER(vt03_48ax_w);
+ DECLARE_READ8_MEMBER(vt03_48ax_r);
+
+ uint8_t m_413x[8]; // CY only?
+};
+
+class nes_vt_soc_4kram_bt_device : public nes_vt_soc_4kram_device
+{
+public:
+ nes_vt_soc_4kram_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config& config) override;
+
+ void nes_vt_bt_map(address_map& map);
+
+ DECLARE_WRITE8_MEMBER(vt03_412c_extbank_w);
+};
+
+class nes_vt_soc_4kram_hh_device : public nes_vt_soc_4kram_device
+{
+public:
+ nes_vt_soc_4kram_hh_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ nes_vt_soc_4kram_hh_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock);
+
+ virtual void device_add_mconfig(machine_config& config) override;
+
+ void nes_vt_hh_map(address_map& map);
+
+ DECLARE_READ8_MEMBER(vthh_414a_r);
+ DECLARE_WRITE8_MEMBER(vtfp_411d_w);
+
+};
+
+class nes_vt_soc_4kram_fp_device : public nes_vt_soc_4kram_hh_device
+{
+public:
+ nes_vt_soc_4kram_fp_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ nes_vt_soc_4kram_fp_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock);
+
+ virtual void device_add_mconfig(machine_config& config) override;
+
+ void nes_vt_fp_map(address_map& map);
+
+ DECLARE_READ8_MEMBER(vtfp_4119_r);
+ DECLARE_WRITE8_MEMBER(vtfp_411e_w);
+ DECLARE_WRITE8_MEMBER(vtfp_412c_extbank_w);
+ DECLARE_READ8_MEMBER(vtfp_412d_r);
+ DECLARE_WRITE8_MEMBER(vtfp_4242_w);
+ DECLARE_WRITE8_MEMBER(vtfp_4a00_w);
+};
+
+class nes_vt_soc_4kram_fp_pal_device : public nes_vt_soc_4kram_fp_device
+{
+public:
+ nes_vt_soc_4kram_fp_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ virtual void device_add_mconfig(machine_config& config) override;
+};
+
+
+class nes_vt_soc_8kram_dg_device : public nes_vt_soc_4kram_device
+{
+public:
+ nes_vt_soc_8kram_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+ nes_vt_soc_8kram_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock);
+
+ virtual void device_add_mconfig(machine_config& config) override;
+
+ void nes_vt_dg_map(address_map& map);
+
+ DECLARE_WRITE8_MEMBER(vt03_411c_w);
+};
+
+class nes_vt_soc_8kram_fa_device : public nes_vt_soc_8kram_dg_device
+{
+public:
+ nes_vt_soc_8kram_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+
+protected:
+
+ virtual void device_add_mconfig(machine_config& config) override;
+
+ void nes_vt_fa_map(address_map& map);
+
+ DECLARE_READ8_MEMBER(vtfa_412c_r);
+ DECLARE_WRITE8_MEMBER(vtfa_412c_extbank_w);
+ DECLARE_WRITE8_MEMBER(vtfp_4242_w);
+};
+
+
+DECLARE_DEVICE_TYPE(NES_VT_SOC, nes_vt_soc_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_PAL, nes_vt_soc_pal_device)
+
+DECLARE_DEVICE_TYPE(NES_VT_SOC_SCRAMBLE, nes_vt_soc_scramble_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_4KRAM, nes_vt_soc_4kram_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_4KRAM_CY, nes_vt_soc_4kram_cy_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_4KRAM_BT, nes_vt_soc_4kram_bt_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_4KRAM_HH, nes_vt_soc_4kram_hh_device)
+
+DECLARE_DEVICE_TYPE(NES_VT_SOC_4KRAM_FP, nes_vt_soc_4kram_fp_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_4KRAM_FP_PAL, nes_vt_soc_4kram_fp_pal_device)
+
+DECLARE_DEVICE_TYPE(NES_VT_SOC_8KRAM_DG, nes_vt_soc_8kram_dg_device)
+DECLARE_DEVICE_TYPE(NES_VT_SOC_8KRAM_FA, nes_vt_soc_8kram_fa_device)
+
+#endif // MAME_MACHINE_NES_VT_H
diff --git a/src/mame/machine/news_hid.cpp b/src/mame/machine/news_hid.cpp
new file mode 100644
index 00000000000..b770e79fba2
--- /dev/null
+++ b/src/mame/machine/news_hid.cpp
@@ -0,0 +1,343 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+/*
+ * Sony NEWS keyboard and mouse (high-level emulation).
+ *
+ * Sources:
+ *
+ * - https://github.com/tmk/tmk_keyboard/tree/master/converter/news_usb
+ * - https://github.com/NetBSD/src/blob/trunk/sys/dev/news/newskeymap.c
+ * - https://github.com/NetBSD/src/blob/trunk/sys/arch/newsmips/dev/ms_hb.c
+ *
+ * TODO:
+ * - other languages (esp. Japanese)
+ * - other variations
+ * - dip switches
+ */
+
+#include "emu.h"
+#include "news_hid.h"
+
+#include "machine/keyboard.ipp"
+
+#define VERBOSE 0
+#include "logmacro.h"
+
+DEFINE_DEVICE_TYPE(NEWS_HID_HLE, news_hid_hle_device, "news_hid_hle", "Sony NEWS Keyboard and Mouse (HLE)")
+
+news_hid_hle_device::news_hid_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, NEWS_HID_HLE, tag, owner, clock)
+ , device_matrix_keyboard_interface(mconfig, *this, "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7")
+ , m_mouse_x_axis(*this, "mouse_x_axis")
+ , m_mouse_y_axis(*this, "mouse_y_axis")
+ , m_mouse_buttons(*this, "mouse_buttons")
+ , m_irq_out_cb(*this)
+{
+}
+
+void news_hid_hle_device::map(address_map &map)
+{
+ map(0x0, 0x0).r(FUNC(news_hid_hle_device::data_r<KEYBOARD>));
+ map(0x1, 0x1).r(FUNC(news_hid_hle_device::status_r<KEYBOARD>));
+ map(0x2, 0x2).w(FUNC(news_hid_hle_device::reset_w<KEYBOARD>));
+ map(0x3, 0x3).w(FUNC(news_hid_hle_device::init_w<KEYBOARD>));
+ map(0x4, 0x4).r(FUNC(news_hid_hle_device::data_r<MOUSE>));
+ map(0x5, 0x5).r(FUNC(news_hid_hle_device::status_r<MOUSE>));
+ map(0x6, 0x6).w(FUNC(news_hid_hle_device::reset_w<MOUSE>));
+ map(0x7, 0x7).w(FUNC(news_hid_hle_device::init_w<MOUSE>));
+}
+
+void news_hid_hle_device::device_start()
+{
+ m_irq_out_cb.resolve_all_safe();
+
+ //save_item(NAME(m_fifo));
+ save_item(NAME(m_irq_out_state));
+
+ save_item(NAME(m_mouse_x));
+ save_item(NAME(m_mouse_y));
+ save_item(NAME(m_mouse_b));
+ save_item(NAME(m_mouse_enable));
+}
+
+void news_hid_hle_device::device_reset()
+{
+ m_fifo[KEYBOARD].clear();
+ m_fifo[MOUSE].clear();
+
+ out_irq<KEYBOARD>(false);
+ out_irq<MOUSE>(false);
+
+ m_mouse_enable = false;
+
+ reset_key_state();
+ start_processing(attotime::from_hz(1'200));
+}
+
+void news_hid_hle_device::key_make(u8 row, u8 column)
+{
+ LOG("key_make row %d col %d\n", row, column);
+
+ push_key((row << 4) | column);
+}
+
+void news_hid_hle_device::key_break(u8 row, u8 column)
+{
+ LOG("key_break row %d col %d\n", row, column);
+
+ push_key(0x80 | (row << 4) | column);
+}
+
+void news_hid_hle_device::push_key(u8 code)
+{
+ m_fifo[KEYBOARD].enqueue(code);
+
+ out_irq<KEYBOARD>(true);
+}
+
+// HACK: abuse the keyboard row scanner to sample the mouse too
+void news_hid_hle_device::scan_complete()
+{
+ if (!m_mouse_enable)
+ return;
+
+ // read mouse state
+ s16 const x = m_mouse_x_axis->read();
+ s16 const y = m_mouse_y_axis->read();
+ u8 const b = m_mouse_buttons->read();
+
+ // compute delta
+ s8 const dx = x - m_mouse_x;
+ s8 const dy = y - m_mouse_y;
+ u8 const db = b ^ m_mouse_b;
+
+ // report if fifo has room and position or buttons changed
+ if ((m_fifo[MOUSE].queue_length() < 6) && (dx || dy || db))
+ {
+ LOG("mouse dx %d dy %d db %d\n", dx, dy, db);
+
+ // compute sign
+ u8 const sx = (dx < 0) ? 0x08 : 0x00;
+ u8 const sy = (dy < 0) ? 0x10 : 0x00;
+
+ // transmit data
+ m_fifo[MOUSE].enqueue(0x80 | sy | sx | b);
+ m_fifo[MOUSE].enqueue(dx & 0x7f);
+ m_fifo[MOUSE].enqueue(dy & 0x7f);
+
+ // update mouse state
+ m_mouse_x = x;
+ m_mouse_y = y;
+ m_mouse_b = b;
+
+ out_irq<MOUSE>(true);
+ }
+}
+
+template <news_hid_hle_device::news_hid_device Device> void news_hid_hle_device::out_irq(bool state)
+{
+ if (m_irq_out_state[Device] != state)
+ {
+ m_irq_out_state[Device] = state;
+ m_irq_out_cb[Device](state);
+ }
+}
+
+template <news_hid_hle_device::news_hid_device Device> u8 news_hid_hle_device::data_r()
+{
+ if (m_fifo[Device].empty())
+ return 0;
+
+ if (!machine().side_effects_disabled())
+ {
+ u8 const data = m_fifo[Device].dequeue();
+
+ if (m_fifo[Device].empty())
+ out_irq<Device>(false);
+
+ return data;
+ }
+ else
+ return m_fifo[Device].peek();
+}
+
+template <news_hid_hle_device::news_hid_device Device> void news_hid_hle_device::reset_w(u8 data)
+{
+ LOG("reset_w<%d> 0x%02x\n", Device, data);
+ m_fifo[Device].clear();
+
+ out_irq<Device>(false);
+}
+
+template <news_hid_hle_device::news_hid_device Device> void news_hid_hle_device::init_w(u8 data)
+{
+ LOG("init_w<%d> 0x%02x\n", Device, data);
+
+ // HACK: prevent unexpected mouse activity from crashing NEWS-OS
+ if (Device == MOUSE)
+ m_mouse_enable = bool(data);
+}
+
+INPUT_PORTS_START(news_hid_hle_device)
+ PORT_START("ROW0")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@')
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+
+ PORT_START("ROW1")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^')
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9)
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
+
+ PORT_START("ROW2")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
+
+ PORT_START("ROW3")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~')
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
+
+ PORT_START("ROW4")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_MAMEKEY(RSHIFT))
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Alternate") PORT_CODE(KEYCODE_LALT)
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Nfer") // muhenkan?
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Xfer") // henkan?
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) // eisu?
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) // kana?
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) // Execute?
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 8") PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 9") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP -") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 4") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
+
+ PORT_START("ROW5")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP +") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 2") PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 3") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) // Separator?
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP 0") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP .") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER_PAD)
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP *") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK))
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP /") PORT_CODE(KEYCODE_SLASH_PAD)
+
+ PORT_START("ROW6")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KP Tab")
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11))
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Help")
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Insert") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clear")
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Prior") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(PGUP))
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Next") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(PGDN))
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("ROW7")
+ PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("mouse_x_axis")
+ PORT_BIT(0xffff, 0, IPT_MOUSE_X) PORT_SENSITIVITY(100)
+
+ PORT_START("mouse_y_axis")
+ PORT_BIT(0xffff, 0, IPT_MOUSE_Y) PORT_SENSITIVITY(100)
+
+ PORT_START("mouse_buttons")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("Left Button")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("Right Button")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_CODE(MOUSECODE_BUTTON3) PORT_NAME("Middle Button")
+ PORT_BIT(0xf8, IP_ACTIVE_HIGH, IPT_UNUSED)
+INPUT_PORTS_END
+
+ioport_constructor news_hid_hle_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(news_hid_hle_device);
+}
diff --git a/src/mame/machine/news_hid.h b/src/mame/machine/news_hid.h
new file mode 100644
index 00000000000..bb5cc8f7da4
--- /dev/null
+++ b/src/mame/machine/news_hid.h
@@ -0,0 +1,66 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+#ifndef MAME_MACHINE_NEWS_HID_H
+#define MAME_MACHINE_NEWS_HID_H
+
+#pragma once
+
+#include "machine/keyboard.h"
+
+class news_hid_hle_device
+ : public device_t
+ , public device_matrix_keyboard_interface<8U>
+{
+public:
+ news_hid_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0);
+
+ enum news_hid_device : unsigned
+ {
+ KEYBOARD = 0,
+ MOUSE = 1,
+ };
+ template <news_hid_device Device> auto irq_out() { return m_irq_out_cb[Device].bind(); }
+
+ void map(address_map &map);
+
+protected:
+ // device_t overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual ioport_constructor device_input_ports() const override;
+
+ // device_matrix_keyboard_interface overrides
+ virtual void key_make(u8 row, u8 column) override;
+ virtual void key_break(u8 row, u8 column) override;
+ virtual void scan_complete() override;
+
+private:
+ void push_key(u8 code);
+
+ template <news_hid_device Device> void out_irq(bool state);
+
+ template <news_hid_device Device> u8 status_r() { return (!m_fifo[Device].empty() ? 2 : 0) | (m_fifo[Device].full() ? 1 : 0); }
+ template <news_hid_device Device> u8 data_r();
+ template <news_hid_device Device> void reset_w(u8 data);
+ template <news_hid_device Device> void init_w(u8 data);
+
+ required_ioport m_mouse_x_axis;
+ required_ioport m_mouse_y_axis;
+ required_ioport m_mouse_buttons;
+
+ devcb_write_line::array<2> m_irq_out_cb;
+
+ util::fifo<u8, 8> m_fifo[2];
+ bool m_irq_out_state[2];
+
+ // mouse state
+ s16 m_mouse_x;
+ s16 m_mouse_y;
+ u8 m_mouse_b;
+ bool m_mouse_enable;
+};
+
+DECLARE_DEVICE_TYPE(NEWS_HID_HLE, news_hid_hle_device)
+
+#endif // MAME_MACHINE_NEWS_HID_H
diff --git a/src/mame/machine/qix.cpp b/src/mame/machine/qix.cpp
index 776dab2a964..579fd77fc32 100644
--- a/src/mame/machine/qix.cpp
+++ b/src/mame/machine/qix.cpp
@@ -157,7 +157,7 @@ WRITE8_MEMBER(qixmcu_state::coin_w)
logerror("qixmcu_state, coin_w = %02X\n", data);
/* this is a callback called by pia6821_device::write(), so I don't need to synchronize */
/* the CPUs - they have already been synchronized by qix_pia_w() */
- m_mcu->pa_w(space, 0, data, mem_mask);
+ m_mcu->pa_w(data);
}
diff --git a/src/mame/machine/seibucop/seibucop.cpp b/src/mame/machine/seibucop.cpp
index 96a0b8d1120..366ac23f489 100644
--- a/src/mame/machine/seibucop/seibucop.cpp
+++ b/src/mame/machine/seibucop.cpp
@@ -109,6 +109,12 @@
// use Z to dump out table info
//#define TABLE_DUMPER
+#define LOG_Commands 0
+#define LOG_Phytagoras 0
+#define LOG_Division 0
+#define LOG_Move0205 0
+#define LOG_Move0905 0
+
#include "seibucop_dma.hxx"
#include "seibucop_cmd.hxx"
diff --git a/src/mame/machine/seibucop/seibucop.h b/src/mame/machine/seibucop.h
index 714485fe420..ff95ba29c8c 100644
--- a/src/mame/machine/seibucop/seibucop.h
+++ b/src/mame/machine/seibucop.h
@@ -7,14 +7,10 @@
***************************************************************************/
-#ifndef RAIDEN2COP_H
-#define RAIDEN2COP_H
+#ifndef MAME_MACHINE_SEIBUCOP_H
+#define MAME_MACHINE_SEIBUCOP_H
-#define LOG_Commands 0
-#define LOG_Phytagoras 0
-#define LOG_Division 0
-#define LOG_Move0205 0
-#define LOG_Move0905 0
+#pragma once
class raiden2cop_device : public device_t
@@ -271,4 +267,4 @@ private:
DECLARE_DEVICE_TYPE(RAIDEN2COP, raiden2cop_device)
-#endif /* RAIDEN2COP_H */
+#endif // MAME_MACHINE_SEIBUCOP_H
diff --git a/src/mame/machine/seibucop/seibucop_cmd.hxx b/src/mame/machine/seibucop_cmd.hxx
index f51bfcb7450..51f486c1bc7 100644
--- a/src/mame/machine/seibucop/seibucop_cmd.hxx
+++ b/src/mame/machine/seibucop_cmd.hxx
@@ -1,3 +1,6 @@
+// license:LGPL-2.1+
+// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina
+
/* Main COP functionality */
// notes about tables:
diff --git a/src/mame/machine/seibucop/seibucop_dma.hxx b/src/mame/machine/seibucop_dma.hxx
index e57e2c19d03..61870b7d792 100644
--- a/src/mame/machine/seibucop/seibucop_dma.hxx
+++ b/src/mame/machine/seibucop_dma.hxx
@@ -1,3 +1,5 @@
+// license:LGPL-2.1+
+// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina
// ALL games use this - tilemap DMA (RAM -> private buffer)
void raiden2cop_device::dma_tilemap_buffer()
@@ -184,5 +186,3 @@ void raiden2cop_device::dma_zsorting(uint16_t data)
for(int i=0; i<data; i++)
m_host_space->write_word(cop_sort_lookup + 2*i, entries[i].val);
}
-
-
diff --git a/src/mame/machine/snes.cpp b/src/mame/machine/snes.cpp
index a0f4281ef4d..de23003f30b 100644
--- a/src/mame/machine/snes.cpp
+++ b/src/mame/machine/snes.cpp
@@ -114,7 +114,7 @@ TIMER_CALLBACK_MEMBER(snes_state::snes_reset_hdma)
TIMER_CALLBACK_MEMBER(snes_state::snes_update_io)
{
- io_read(m_maincpu->space(AS_PROGRAM),0,0,0);
+ io_read();
SNES_CPU_REG(HVBJOY) &= 0xfe; /* Clear busy bit */
m_io_timer->adjust(attotime::never);
@@ -390,7 +390,7 @@ READ8_MEMBER( snes_state::snes_r_io )
// APU is mirrored from 2140 to 217f
if (offset >= APU00 && offset < WMDATA)
{
- return m_spc700->spc_port_out(offset & 0x3);
+ return m_soundcpu->spc_port_out_r(offset & 0x3);
}
// DMA accesses are from 4300 to 437f
@@ -404,7 +404,7 @@ READ8_MEMBER( snes_state::snes_r_io )
switch (offset) // offset is from 0x000000
{
case WMDATA: /* Data to read from WRAM */
- value = m_maincpu->space(AS_PROGRAM).read_byte(0x7e0000 + m_wram_address++);
+ value = m_wram[m_wram_address++];
m_wram_address &= 0x1ffff;
return value;
@@ -480,7 +480,7 @@ WRITE8_MEMBER( snes_state::snes_w_io )
if (offset >= APU00 && offset < WMDATA)
{
// printf("816: %02x to APU @ %d (PC=%06x)\n", data, offset & 3,m_maincpu->pc());
- m_spc700->spc_port_in(offset & 0x3, data);
+ m_soundcpu->spc_port_in_w(offset & 0x3, data);
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
return;
}
@@ -496,7 +496,7 @@ WRITE8_MEMBER( snes_state::snes_w_io )
switch (offset)
{
case WMDATA: /* Data to write to WRAM */
- m_maincpu->space(AS_PROGRAM).write_byte(0x7e0000 + m_wram_address++, data );
+ m_wram[m_wram_address++] = data;
m_wram_address &= 0x1ffff;
return;
case WMADDL: /* Address to read/write to wram (low) */
@@ -720,7 +720,7 @@ READ8_MEMBER(snes_state::snes_r_bank1)
if (offset < 0x400000)
{
if (address < 0x2000) /* Mirror of Low RAM */
- value = m_maincpu->space(AS_PROGRAM).read_byte(0x7e0000 + address);
+ value = m_wram[address];
else if (address < 0x6000) /* I/O */
value = snes_r_io(space, address);
else if (address < 0x8000)
@@ -831,7 +831,7 @@ WRITE8_MEMBER(snes_state::snes_w_bank1)
if (offset < 0x400000)
{
if (address < 0x2000) /* Mirror of Low RAM */
- m_maincpu->space(AS_PROGRAM).write_byte(0x7e0000 + address, data);
+ m_wram[address] = data;
else if (address < 0x6000) /* I/O */
snes_w_io(space, address, data);
else if (address < 0x8000)
@@ -928,7 +928,7 @@ WRITE8_MEMBER(snes_state::snes_w_bank2)
*************************************/
-WRITE8_MEMBER(snes_state::io_read)
+void snes_state::io_read()
{
static const char *const portnames[2][2] =
{
@@ -1034,14 +1034,14 @@ void snes_state::snes_init_timers()
void snes_state::snes_init_ram()
{
- address_space &cpu0space = m_maincpu->space(AS_PROGRAM);
int i;
/* Init work RAM - 0x55 isn't exactly right but it's close */
/* make sure it happens to the 65816 (CPU 0) */
- for (i = 0; i < (128*1024); i++)
+ const size_t size = m_wram.bytes();
+ for (i = 0; i < size; i++)
{
- cpu0space.write_byte(0x7e0000 + i, 0x55);
+ m_wram[i] = 0x55;
}
/* Inititialize registers/variables */
diff --git a/src/mame/machine/super80.cpp b/src/mame/machine/super80.cpp
index 5dfaad799f6..bbf5a4040d6 100644
--- a/src/mame/machine/super80.cpp
+++ b/src/mame/machine/super80.cpp
@@ -12,10 +12,10 @@
WRITE8_MEMBER( super80_state::pio_port_a_w )
{
m_keylatch = data;
- m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff)); // refresh kbd int
+ m_pio->port_b_write(pio_port_b_r()); // refresh kbd int
}
-READ8_MEMBER( super80_state::pio_port_b_r )
+uint8_t super80_state::pio_port_b_r()
{
uint8_t data = 0xff;
@@ -60,7 +60,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( super80_state::timer_k )
m_key_pressed--;
else
if (!m_key_pressed)
- m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
+ m_pio->port_b_write(pio_port_b_r());
}
/* cassette load circuit
diff --git a/src/mame/machine/swim.cpp b/src/mame/machine/swim.cpp
index df0ff3ec816..bc3a4277799 100644
--- a/src/mame/machine/swim.cpp
+++ b/src/mame/machine/swim.cpp
@@ -94,7 +94,7 @@ void swim_device::device_reset()
// read - reads a byte from the FDC
//-------------------------------------------------
-uint8_t swim_device::read(uint8_t offset)
+uint8_t swim_device::read(offs_t offset)
{
uint8_t result = 0;
@@ -128,7 +128,7 @@ uint8_t swim_device::read(uint8_t offset)
// write - write a byte to the FDC
//-------------------------------------------------
-void swim_device::write(uint8_t offset, uint8_t data)
+void swim_device::write(offs_t offset, uint8_t data)
{
if (m_swim_mode == SWIM_MODE_IWM)
{
diff --git a/src/mame/machine/swim.h b/src/mame/machine/swim.h
index e36c08f8c74..f7d86130ad1 100644
--- a/src/mame/machine/swim.h
+++ b/src/mame/machine/swim.h
@@ -33,8 +33,8 @@ public:
swim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
- virtual uint8_t read(uint8_t offset) override;
- virtual void write(uint8_t offset, uint8_t data) override;
+ virtual uint8_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint8_t data) override;
protected:
// device-level overrides
diff --git a/src/mame/machine/swtpc09.cpp b/src/mame/machine/swtpc09.cpp
index f394e7089dd..f35285f9973 100644
--- a/src/mame/machine/swtpc09.cpp
+++ b/src/mame/machine/swtpc09.cpp
@@ -967,7 +967,7 @@ void swtpc09_state::machine_reset()
m_brg->rsa_w(baud_rate_high);
m_brg->rsb_w(1);
- m_pia->write_portb(0);
+ m_pia->portb_w(0);
m_pia->cb1_w(0);
m_pia->ca2_w(0);
m_pia->cb2_w(0);
diff --git a/src/mame/machine/taito68705interface.cpp b/src/mame/machine/taito68705interface.cpp
index 23119510709..04daafa7829 100644
--- a/src/mame/machine/taito68705interface.cpp
+++ b/src/mame/machine/taito68705interface.cpp
@@ -70,7 +70,7 @@ WRITE8_MEMBER(taito68705_mcu_device_base::data_w)
m_host_flag = true;
m_host_latch = data;
if (m_latch_driven)
- m_mcu->pa_w(space, 0, data);
+ m_mcu->pa_w(data);
m_mcu->set_input_line(M68705_IRQ_LINE, m_host_flag ? ASSERT_LINE : CLEAR_LINE);
}
@@ -147,7 +147,7 @@ void taito68705_mcu_device_base::latch_control(u8 data, u8 &value, unsigned host
if (BIT(data, host_bit))
{
m_latch_driven = false;
- m_mcu->pa_w(m_mcu->space(AS_PROGRAM), 0, 0xff);
+ m_mcu->pa_w(0xff);
if (!BIT(value, host_bit))
{
m_host_flag = false;
@@ -157,7 +157,7 @@ void taito68705_mcu_device_base::latch_control(u8 data, u8 &value, unsigned host
else
{
m_latch_driven = true;
- m_mcu->pa_w(m_mcu->space(AS_PROGRAM), 0, m_host_latch);
+ m_mcu->pa_w(m_host_latch);
}
// PB2 sets the MCU semaphore when low
diff --git a/src/mame/machine/taitocchip.cpp b/src/mame/machine/taitocchip.cpp
index c366ea984e4..15f8ff429d0 100644
--- a/src/mame/machine/taitocchip.cpp
+++ b/src/mame/machine/taitocchip.cpp
@@ -217,7 +217,7 @@ void taito_cchip_device::cchip_map(address_map &map)
void taito_cchip_device::device_add_mconfig(machine_config &config)
{
- upd7811_device &upd(UPD7811(config, m_upd7811, DERIVED_CLOCK(1, 1)));
+ upd78c11_device &upd(UPD78C11(config, m_upd7811, DERIVED_CLOCK(1, 1)));
upd.set_addrmap(AS_PROGRAM, &taito_cchip_device::cchip_map);
upd.pa_in_cb().set([this] { return m_in_pa_cb(); });
upd.pb_in_cb().set([this] { return m_in_pb_cb(); });
diff --git a/src/mame/machine/tigeroad.cpp b/src/mame/machine/tigeroad.cpp
index 1c5a10febac..fd58b706705 100644
--- a/src/mame/machine/tigeroad.cpp
+++ b/src/mame/machine/tigeroad.cpp
@@ -28,7 +28,7 @@ WRITE16_MEMBER(pushman_state::pushman_mcu_comm_w)
m_host_latch = swapendian_int16(data);
break;
case 1:
- m_mcu->pd_w(space, 0, data & 0x00ff);
+ m_mcu->pd_w(data & 0x00ff);
m_host_semaphore = true;
m_mcu->set_input_line(M68705_IRQ_LINE, ASSERT_LINE);
break;
@@ -56,15 +56,15 @@ WRITE8_MEMBER(pushman_state::mcu_pc_w)
{
if (BIT(data, 0))
{
- m_mcu->pa_w(space, 0, 0xff);
- m_mcu->pb_w(space, 0, 0xff);
+ m_mcu->pa_w(0xff);
+ m_mcu->pb_w(0xff);
}
else
{
m_host_semaphore = false;
m_mcu->set_input_line(M68705_IRQ_LINE, CLEAR_LINE);
- m_mcu->pa_w(space, 0, (m_host_latch >> 0) & 0x00ff);
- m_mcu->pb_w(space, 0, (m_host_latch >> 8) & 0x00ff);
+ m_mcu->pa_w((m_host_latch >> 0) & 0x00ff);
+ m_mcu->pb_w((m_host_latch >> 8) & 0x00ff);
}
if (BIT(m_mcu_latch_ctl, 1) && !BIT(data, 1))
diff --git a/src/mame/machine/tnzs.cpp b/src/mame/machine/tnzs.cpp
index 213063e9e16..5e87d6f57a5 100644
--- a/src/mame/machine/tnzs.cpp
+++ b/src/mame/machine/tnzs.cpp
@@ -20,7 +20,7 @@
READ8_MEMBER(tnzs_mcu_state::mcu_r)
{
- uint8_t data = m_mcu->upi41_master_r(space, offset & 1);
+ uint8_t data = m_mcu->upi41_master_r(offset & 1);
m_subcpu->yield();
// logerror("%s: read %02x from mcu $c00%01x\n", m_maincpu->pcbase(), data, offset);
@@ -32,7 +32,7 @@ WRITE8_MEMBER(tnzs_mcu_state::mcu_w)
{
// logerror("%s: write %02x to mcu $c00%01x\n", m_maincpu->pcbase(), data, offset);
- m_mcu->upi41_master_w(space, offset & 1, data);
+ m_mcu->upi41_master_w(offset & 1, data);
}
READ8_MEMBER(tnzs_mcu_state::mcu_port1_r)
@@ -67,10 +67,10 @@ WRITE8_MEMBER(tnzs_mcu_state::mcu_port2_w)
m_input_select = data & 0xf;
}
-READ8_MEMBER(tnzs_mcu_state::analog_r)
+uint8_t tnzs_mcu_state::analog_r(offs_t offset)
{
if (m_upd4701.found())
- return m_upd4701->read_xy(space, offset);
+ return m_upd4701->read_xy(offset);
return 0;
}
diff --git a/src/mame/machine/vt100_kbd.cpp b/src/mame/machine/vt100_kbd.cpp
index 591e0789cc4..6531b28a313 100644
--- a/src/mame/machine/vt100_kbd.cpp
+++ b/src/mame/machine/vt100_kbd.cpp
@@ -284,7 +284,7 @@ WRITE_LINE_MEMBER(vt100_keyboard_device::signal_line_w)
if (dav)
{
- u8 data = m_uart->get_received_data();
+ u8 data = m_uart->receive();
m_online_led = BIT(data, 5) ? 1 : 0;
m_local_led = BIT(data, 5) ? 0 : 1;
m_locked_led = BIT(data, 4) ? 0 : 1;
@@ -331,7 +331,7 @@ WRITE8_MEMBER(vt100_keyboard_device::key_scan_w)
{
if (data != 0xff)
LOG("Keycode pressed: %02X\n", (data >> 1) & 0x7f);
- m_uart->set_transmit_data((data >> 1) & 0x7f);
+ m_uart->transmit((data >> 1) & 0x7f);
}
}
diff --git a/src/mame/machine/williams.cpp b/src/mame/machine/williams.cpp
index 5395fa363fd..fa29150dc37 100644
--- a/src/mame/machine/williams.cpp
+++ b/src/mame/machine/williams.cpp
@@ -155,7 +155,7 @@ void williams2_state::bank_select_w(u8 data)
TIMER_CALLBACK_MEMBER(williams_state::deferred_snd_cmd_w)
{
- m_pia[2]->write_portb(param);
+ m_pia[2]->portb_w(param);
m_pia[2]->cb1_w((param == 0xff) ? 0 : 1);
}
@@ -172,7 +172,7 @@ void playball_state::snd_cmd_w(u8 data)
TIMER_CALLBACK_MEMBER(williams2_state::deferred_snd_cmd_w)
{
- m_pia[2]->write_porta(param);
+ m_pia[2]->porta_w(param);
}
void williams2_state::snd_cmd_w(u8 data)
@@ -414,8 +414,8 @@ TIMER_CALLBACK_MEMBER(blaster_state::deferred_snd_cmd_w)
uint8_t l_data = param | 0x80;
uint8_t r_data = (param >> 1 & 0x40) | (param & 0x3f) | 0x80;
- m_pia[2]->write_portb(l_data); m_pia[2]->cb1_w((l_data == 0xff) ? 0 : 1);
- m_pia[3]->write_portb(r_data); m_pia[3]->cb1_w((r_data == 0xff) ? 0 : 1);
+ m_pia[2]->portb_w(l_data); m_pia[2]->cb1_w((l_data == 0xff) ? 0 : 1);
+ m_pia[3]->portb_w(r_data); m_pia[3]->cb1_w((r_data == 0xff) ? 0 : 1);
}
@@ -504,7 +504,7 @@ void joust2_state::machine_start()
TIMER_CALLBACK_MEMBER(joust2_state::deferred_snd_cmd_w)
{
- m_pia[2]->write_porta(param & 0xff);
+ m_pia[2]->porta_w(param & 0xff);
}
diff --git a/src/mame/machine/z80ne.cpp b/src/mame/machine/z80ne.cpp
index aefb0b7dc44..36e8bb487b3 100644
--- a/src/mame/machine/z80ne.cpp
+++ b/src/mame/machine/z80ne.cpp
@@ -270,7 +270,7 @@ void z80ne_state::base_reset()
m_uart->write_cs(1);
m_uart_clock->set_unscaled_clock(m_cass_data.speed * 16);
- lx385_ctrl_w(m_maincpu->space(AS_PROGRAM), 0, 0);
+ lx385_ctrl_w(0);
}
@@ -473,7 +473,7 @@ READ8_MEMBER(z80ne_state::lx385_ctrl_r)
#define LX385_CASSETTE_MOTOR_MASK ((1<<3)|(1<<4))
-WRITE8_MEMBER(z80ne_state::lx385_ctrl_w)
+void z80ne_state::lx385_ctrl_w(uint8_t data)
{
/* Translate data to control signals
* 0 bit1=0, bit0=0 UART Reset pulse
@@ -555,7 +555,7 @@ READ8_MEMBER(z80net_state::lx388_mc6847_videoram_r)
READ8_MEMBER(z80net_state::lx387_data_r)
{
- uint8_t data = m_lx387_kr2376->data_r(space, 0) & 0x7f;
+ uint8_t data = m_lx387_kr2376->data_r() & 0x7f;
data |= m_lx387_kr2376->get_output_pin(kr2376_device::KR2376_SO) << 7;
return data;
}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 9ed45d4cbf8..a870b822d86 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -2742,6 +2742,11 @@ edmv035f // Edom MV035F motherboard (486)
td4ipaio // TD-4IP-UMC-AIO motherboard (486)
dvbslan // Datavan Book-Size LAN station (386sx)
486igb21 // 486IG-B-2-1 motherboard (486)
+euroat // Schneider Euro AT
+pg750 // Siemens PG 750
+pg750eisa // Siemens PG 750 486 EISA
+samdm286 // Samsung Deskmaster 286-12
+zdz248 // Zenith Z-248
@source:atari_s1.cpp
@@ -9420,6 +9425,7 @@ discof // (c) 1982
lnc // (c) 1981
mmonkey // (c) 1982 Technos Japan + Roller Tron
mmonkeyj // (c) 1982 Technos Japan + Roller Tron
+protenn // (c) 1982
protennb // bootleg
sdtennis // (c) 1983
tisland // (c) 1982
@@ -10523,6 +10529,9 @@ concstd
@source:concept.cpp
concept // 1982 Corvus Concept
+@source:conic_cchess2.cpp
+cncchess2
+
@source:contra.cpp
contra // GX633 (c) 1987
contra1 // GX633 (c) 1987
@@ -10662,6 +10671,7 @@ forgottnuaa // 7/1988 (c) 1988 (USA)
ganbare // 11/04/2000 (c) 2000 (Japan)
ghouls // 12/1988 (c) 1988 (World)
ghoulsu // 12/1988 (c) 1988 (USA)
+gulunpa //
knights // 27/11/1991 (c) 1991 (World)
knightsb2 // bootleg
knightsj // 27/11/1991 (c) 1991 (Japan)
@@ -11835,6 +11845,7 @@ cobracom // (c) 1988 Data East Corporation (World/US)
cobracoma // (c) 1988 Data East Corporation (World/US)
cobracomb // (c) 1988 Data East Corporation (World/US)
cobracomj // (c) 1988 Data East Corporation (Japan)
+cobracomjb // bootleg
csilver // (c) 1987 Data East Corporation (Japan)
csilverj // (c) 1987 Data East Corporation (Japan)
csilverja // (c) 1987 Data East Corporation (Japan)
@@ -12927,7 +12938,8 @@ rad_sinv
rad_tetr
airblsjs
buzztime
-sudoelan
+sudelan3
+sudelan
carlecfg
pvmilfin
@@ -13472,10 +13484,10 @@ fex68km4 //
@source:fidel_elite.cpp
feasbu //
feasgla //
+feasglaa //
feag //
feag2100 //
feag2100a //
-fepriv //
fpres //
fpresbu //
@@ -13666,6 +13678,7 @@ gigasm2 // (c) 1986 Sega
gigasm2b // (c) 1986 bootleg
oigas // (c) 1986 bootleg
pbillrd // (c) 1987 Nihon System
+pbillrdbl // (c) 1987 bootleg
pbillrds // (c) 1987 Nihon System (Sega license?)
pbillrdsa // (c) 1987 Nihon System (Sega license?)
@@ -14694,6 +14707,7 @@ gijoea // GX069 (c) 1991 (Asia)
gijoeea // GX069 (c) 1991 (World)
gijoej // GX069 (c) 1991 (Japan)
gijoeu // GX069 (c) 1991 (US)
+gijoeua // GX069 (c) 1991 (US)
@source:gimix.cpp
gimix //
@@ -15719,9 +15733,6 @@ mwcbaseb // Mattel
packmon // Bandai
pairmtch // Bandai
pbqbert // Parker Brothers
-sag_si2 // Entex
-sag_bb4 // Entex
-sag_pb // Entex
tmtron // Tomy
vinvader // VTech
zackman // Bandai
@@ -15929,6 +15940,7 @@ merlin // Parker Bros
mmerlin // Parker Bros
monkeysee // Tandy Radio Shack
phpball // Tomy
+qfire // Electroplay
quizwizc // Coleco
raisedvl // Entex
simon // Milton Bradley
@@ -30323,6 +30335,7 @@ mrdrilrg // 2001.03 Mr. Driller G (DRG1 Ver.A)
mrdrilrga // 2001.03 Mr. Driller G ALT (DRG1 Ver.A)
mrdrlr2a // 2000.?? Mr Driller 2 (DR22 Ver.A)
nflclsfb // 2003.?? NFL Classic Football
+pacmball // 2003.?? Pacman Ball
panikuru // 2002.03 Panicuru Panekuru
ptblank3 // 2000.12 Point Blank 3 (GNN2 Ver.A)
sekaikh // 2004.04 Sekai Kaseki Hakken (Japan, SKH1 Ver.A)
@@ -31435,6 +31448,7 @@ nespal // Nintendo Entertainment System PAL
@source:nes_clone.cpp
pjoypj001
afbm7800
+dnce2000
@source:nes_sh6578.cpp
bandgpad
@@ -31546,6 +31560,9 @@ newbrainmd //
news // "Virus"??? ((c) 1993 Poby in ROM VIRUS.4)
newsa // "Jeansole / Poby
+@source:news_r3k.cpp
+nws3260 // Sony NEWS NWS-3260
+
@source:next.cpp
next //
nextct //
@@ -33173,6 +33190,7 @@ ddp3 // (c) 2002 DoDonPachi Dai-Ou-Jou / DoDonPachi I
ddpdoj //
ddpdoja //
ddpdojb //
+ddpdojp //
ddpdojblk //
ddpdojblka //
ddpdojblkbl //
@@ -34544,6 +34562,9 @@ ds2 //
oz750 // 199? Sharp Wizard OZ-750
rex6000 //
+@source:rfslots8085.cpp
+unkrfslt //
+
@source:rgum.cpp
rgum //
@@ -34572,6 +34593,7 @@ rmhaihib // (c) 1985 Alba
rmhaijin // (c) 1986 Alba
rmhaisei // (c) 1986 Visco
themj // (c) 1987 Visco
+themj2 // (c) 1987 Visco
@source:rmnimbus.cpp
nimbus // RM Nimbus 186
@@ -34614,6 +34636,9 @@ d50 //
d50o //
d550 //
+@source:roland_jv80.cpp
+jv880 //
+
@source:roland_jx3p.cpp
gr700 //
jx3p //
@@ -34634,9 +34659,25 @@ r8 //
r8m //
r8mk2 //
+@source:roland_ra30.cpp
+ra30 //
+
+@source:roland_s10.cpp
+mks100 //
+s10 //
+s220 //
+
+@source:roland_s50.cpp
+s50 //
+s550 //
+w30 //
+
@source:roland_sc55.cpp
sc55 // 1991 Sound Canvas SC-55
+@source:roland_sc88.cpp
+sc88vl //
+
@source:roland_tb303.cpp
tb303 // Roland
@@ -35011,6 +35052,12 @@ sacstate //
safarir // (c) 1980 Shin Nihon Kikaku (SNK) + Taito license
safarirj // (c) 1979 Shin Nihon Kikaku (SNK)
+@source:sag.cpp
+sag_baseb4
+sag_footb4
+sag_pinb
+sag_sinv2
+
@source:sage2.cpp
sage2 //
@@ -35039,6 +35086,9 @@ risc2500 //
risc2500a //
montreux //
+@source:saitek_schess.cpp
+schess
+
@source:saitek_ssystem3.cpp
ssystem3 // Chess Champion Super System III / MK III
@@ -35356,6 +35406,7 @@ hustlerb5 // bootleg
hustlerb6 // bootleg
hustlerd // GX343 (c) 1981 Konami + Dynamo Games license
mimonkey // (c) 1982 Universal Video Games (US Copyright Office info - http://cocatalog.loc.gov)
+mimonkeyug // (c) 1982 bootleg
mimonsco // (c) 1982 bootleg
minefld // (c) 1983 Stern
minefldfe // bootleg
@@ -36939,6 +36990,7 @@ tdfever2 // A6006 'TD'?(c) 1988
tdfever2b // bootleg
tdfeverj // A6006 'TD' (c) 1987
tnk3 // A5001 (c) 1985
+tnk3b // bootleg
tnk3j // A5001 (c) 1985
vangrd2 // A2005 (c) 1984
victroad // A6002 (c) 1986
@@ -37237,6 +37289,7 @@ icanpian //
jak_batm // The Batman, 2004
jak_wall //
jak_mk
+jak_mpacw
@source:spg2xx_jakks_gkr.cpp
jak_wwe //
@@ -37260,6 +37313,9 @@ jak_care //
jak_nick //
jak_sbfc //
+@source:spg2xx_jakks_sharp.cpp
+jsc_thom
+
@source:spg2xx_jakks_tvtouch.cpp
tvtchsw
tvtchspd
@@ -39780,6 +39836,7 @@ turbob // (c) 1981 Sega
turbobl // bootleg
turboc // (c) 1981 Sega
turbod // (c) 1981 Sega
+turboe // (c) 1981 Sega
zoom909 // (c) 1982 Sega
@source:turrett.cpp
@@ -40019,6 +40076,7 @@ dquizgo2 // (c) 2000 Semicom
dtfamily // (c) 2001 Semicom
finalgdr // (c) 2001 Semicom
jmpbreak // (c) 1999 F2 System
+jmpbreaka // (c) 1999 F2 System
poosho // (c) 1999 F2 System
luplup // (c) 1999 Omega System
luplup29 // (c) 1999 Omega System
@@ -40922,6 +40980,7 @@ sprk_103 //
startrp //
startrp2 //
strikext //
+strikext_100 //
strknew //
strxt_fr //
strxt_gr //
@@ -41595,6 +41654,9 @@ mu100 // 1997 MU-100
mu100r // 1997 MU-100 Rackable version
mu100b // 1998 MU-100B
+@source:ymtx81z.cpp
+tx81z //
+
@source:ymvl70.cpp
vl70 // 1996 VL70-m
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index cd6eadf3811..66725538ca2 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -181,6 +181,7 @@ comquest.cpp
comx35.cpp
concept.cpp
conchess.cpp
+conic_cchess2.cpp
controlid.cpp
cortex.cpp
cosmicos.cpp
@@ -604,6 +605,7 @@ nes_clone.cpp
nes_sh6578.cpp
nes_vt.cpp
newbrain.cpp
+news_r3k.cpp
next.cpp
nforcepc.cpp
ngen.cpp
@@ -758,11 +760,16 @@ rmnimbus.cpp
roland_cm32p.cpp
roland_d10.cpp
roland_d50.cpp
+roland_jv80.cpp
roland_jx3p.cpp
roland_jx8p.cpp
roland_mt32.cpp
roland_r8.cpp
+roland_ra30.cpp
+roland_s10.cpp
+roland_s50.cpp
roland_sc55.cpp
+roland_sc88.cpp
roland_tb303.cpp
roland_tr606.cpp
roland_tr707.cpp
@@ -772,6 +779,7 @@ rx78.cpp
rz1.cpp
rzone.cpp
sacstate.cpp
+sag.cpp
sage2.cpp
saitek_chesstrv.cpp
saitek_corona.cpp
@@ -780,6 +788,7 @@ saitek_delta1.cpp
saitek_mark5.cpp
saitek_prschess.cpp
saitek_risc2500.cpp
+saitek_schess.cpp
saitek_ssystem3.cpp
saitek_stratos.cpp
saitek_superstar.cpp
@@ -841,6 +850,7 @@ spg2xx_dreamlife.cpp
spg2xx_ican.cpp
spg2xx_jakks.cpp
spg2xx_jakks_gkr.cpp
+spg2xx_jakks_sharp.cpp
spg2xx_jakks_tvtouch.cpp
spg2xx_lexibook.cpp
spg2xx_mysprtch.cpp
@@ -1050,6 +1060,7 @@ xor100.cpp
ymmu100.cpp
ymmu50.cpp
ymmu80.cpp
+ymtx81z.cpp
ymvl70.cpp
z100.cpp
z1013.cpp
diff --git a/src/mame/nl.lst b/src/mame/nl.lst
index fe8a59900a2..977fd48ba67 100644
--- a/src/mame/nl.lst
+++ b/src/mame/nl.lst
@@ -275,6 +275,10 @@ marioe // (c) 1983 Nintendo of America
marioj // (c) 1983 Nintendo
masao // bootleg
+@source:mw8080bw.cpp
+gunfight // 597 [1975] Dave Nutting Associates / Midway
+gunfighto // 597 [1975] Dave Nutting Associates / Midway
+
@source:palestra.cpp
palestra
diff --git a/src/mame/video/3dom2_te.cpp b/src/mame/video/3dom2_te.cpp
index 5b6d6b633e5..7aa79a67924 100644
--- a/src/mame/video/3dom2_te.cpp
+++ b/src/mame/video/3dom2_te.cpp
@@ -757,22 +757,11 @@ void m2_te_device::device_reset()
}
-//-------------------------------------------------
-// device_post_load - device-specific post-load
-//-------------------------------------------------
-
-void m2_te_device::device_post_load()
-{
-
-}
-
-
-
/***************************************************************************
PUBLIC FUNCTIONS
***************************************************************************/
-READ32_MEMBER( m2_te_device::read )
+uint32_t m2_te_device::read(offs_t offset)
{
uint32_t unit = (offset >> 11) & 7;
uint32_t reg = offset & 0x1ff;
@@ -828,7 +817,7 @@ READ32_MEMBER( m2_te_device::read )
return 0;
}
-WRITE32_MEMBER( m2_te_device::write )
+void m2_te_device::write(offs_t offset, uint32_t data)
{
uint32_t unit = (offset >> 11) & 7;
uint32_t reg = offset & 0x1ff;
@@ -3334,8 +3323,6 @@ void m2_te_device::illegal_inst()
void m2_te_device::execute()
{
- address_space &space = machine().driver_data()->generic_space();
-
#if TEST_TIMING
memset(g_statistics, 0, sizeof(g_statistics));
#endif
@@ -3353,7 +3340,7 @@ void m2_te_device::execute()
while (cnt-- >= 0)
{
- write(space, offs >> 2, irp_fetch(), 0xffffffff);
+ write(offs >> 2, irp_fetch());
offs += 4;
if (m_state != TE_RUNNING)
diff --git a/src/mame/video/3dom2_te.h b/src/mame/video/3dom2_te.h
index bf318dfe9af..cf8d84cbf8b 100644
--- a/src/mame/video/3dom2_te.h
+++ b/src/mame/video/3dom2_te.h
@@ -32,8 +32,8 @@ public:
auto listend_int_handler() { return m_listend_int_handler.bind(); }
auto winclip_int_handler() { return m_winclip_int_handler.bind(); }
- DECLARE_READ32_MEMBER(read);
- DECLARE_WRITE32_MEMBER(write);
+ uint32_t read(offs_t offset);
+ void write(offs_t offset, uint32_t data);
uint32_t *tram_ptr() const { return &m_tram[0]; }
@@ -48,7 +48,6 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual void device_post_load() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
diff --git a/src/mame/video/abc806.cpp b/src/mame/video/abc806.cpp
index 0bb243df817..f146812cbb2 100644
--- a/src/mame/video/abc806.cpp
+++ b/src/mame/video/abc806.cpp
@@ -163,7 +163,7 @@ READ8_MEMBER( abc806_state::sti_r )
// sto_w -
//-------------------------------------------------
-WRITE8_MEMBER( abc806_state::sto_w )
+void abc806_state::sto_w(uint8_t data)
{
int level = BIT(data, 7);
diff --git a/src/mame/video/amiga.cpp b/src/mame/video/amiga.cpp
index abd16693a13..1194a8d422c 100644
--- a/src/mame/video/amiga.cpp
+++ b/src/mame/video/amiga.cpp
@@ -217,7 +217,7 @@ int amiga_state::copper_execute_next(int xpos)
{
if (LOG_COPPER)
logerror("%02X.%02X: Write to %s = %04x\n", m_last_scanline, xpos / 2, s_custom_reg_names[m_copper_pending_offset & 0xff], m_copper_pending_data);
- write_custom_chip(m_copper_pending_offset, m_copper_pending_data);
+ custom_chip_w(m_copper_pending_offset, m_copper_pending_data);
m_copper_pending_offset = 0;
}
@@ -273,7 +273,7 @@ int amiga_state::copper_execute_next(int xpos)
{
if (LOG_COPPER)
logerror("%02X.%02X: Write to %s = %04x\n", m_last_scanline, xpos / 2, s_custom_reg_names[word0 & 0xff], word1);
- write_custom_chip(word0, word1);
+ custom_chip_w(word0, word1);
}
else // additional 2 cycles needed for non-Agnus registers
{
diff --git a/src/mame/video/antic.cpp b/src/mame/video/antic.cpp
index 8185e482ac7..0fa61651518 100644
--- a/src/mame/video/antic.cpp
+++ b/src/mame/video/antic.cpp
@@ -2043,16 +2043,16 @@ TIMER_CALLBACK_MEMBER( antic_device::scanline_render )
if( m_w.dmactl & DMA_MISSILE )
{
m_steal_cycles += 1;
- m_gtia->write(space, 0x11, RDPMGFXD(space, 3*256));
+ m_gtia->write(0x11, RDPMGFXD(space, 3*256));
}
/* transport player data to GTIA ? */
if( m_w.dmactl & DMA_PLAYER )
{
m_steal_cycles += 4;
- m_gtia->write(space, 0x0d, RDPMGFXD(space, 4*256));
- m_gtia->write(space, 0x0e, RDPMGFXD(space, 5*256));
- m_gtia->write(space, 0x0f, RDPMGFXD(space, 6*256));
- m_gtia->write(space, 0x10, RDPMGFXD(space, 7*256));
+ m_gtia->write(0x0d, RDPMGFXD(space, 4*256));
+ m_gtia->write(0x0e, RDPMGFXD(space, 5*256));
+ m_gtia->write(0x0f, RDPMGFXD(space, 6*256));
+ m_gtia->write(0x10, RDPMGFXD(space, 7*256));
}
}
else
@@ -2062,17 +2062,17 @@ TIMER_CALLBACK_MEMBER( antic_device::scanline_render )
{
if( (m_scanline & 1) == 0 ) /* even line ? */
m_steal_cycles += 1;
- m_gtia->write(space, 0x11, RDPMGFXS(space, 3*128));
+ m_gtia->write(0x11, RDPMGFXS(space, 3*128));
}
/* transport player data to GTIA ? */
if( m_w.dmactl & DMA_PLAYER )
{
if( (m_scanline & 1) == 0 ) /* even line ? */
m_steal_cycles += 4;
- m_gtia->write(space, 0x0d, RDPMGFXS(space, 4*128));
- m_gtia->write(space, 0x0e, RDPMGFXS(space, 5*128));
- m_gtia->write(space, 0x0f, RDPMGFXS(space, 6*128));
- m_gtia->write(space, 0x10, RDPMGFXS(space, 7*128));
+ m_gtia->write(0x0d, RDPMGFXS(space, 4*128));
+ m_gtia->write(0x0e, RDPMGFXS(space, 5*128));
+ m_gtia->write(0x0f, RDPMGFXS(space, 6*128));
+ m_gtia->write(0x10, RDPMGFXS(space, 7*128));
}
}
}
diff --git a/src/mame/video/cave.cpp b/src/mame/video/cave.cpp
index d43266a74ca..9d6ff52caa1 100644
--- a/src/mame/video/cave.cpp
+++ b/src/mame/video/cave.cpp
@@ -162,15 +162,15 @@ VIDEO_START_MEMBER(cave_state,ppsatan)
/***************************************************************************
- Sprites Drawing
+ Zoomed Sprites Drawing
+
+ Sprite format with zoom, 16 bytes per each sprites
Offset: Bits: Value:
- 00.w fedc ba98 76-- ---- X Position
- ---- ---- --54 3210
+ 00.w X Position*
- 02.w fedc ba98 76-- ---- Y Position
- ---- ---- --54 3210
+ 02.w Y Position*
04.w fe-- ---- ---- ----
--dc ba98 ---- ---- Color
@@ -189,6 +189,42 @@ VIDEO_START_MEMBER(cave_state,ppsatan)
0E.w Unused
+ * S.9.6 Fixed point or 10 bit signed integer,
+ Configured from videoregs
+
+
+ Sprites Drawing
+
+ Sprite format without zoom, 16 bytes per each sprites
+
+ Offset: Bits: Value:
+
+ 00.w fe-- ---- ---- ----
+ --dc ba98 ---- ---- Color
+ ---- ---- 76-- ----
+ ---- ---- --54 ---- Priority
+ ---- ---- ---- 3--- Flip X
+ ---- ---- ---- -2-- Flip Y
+ ---- ---- ---- --10 Code High Bit(s?)
+
+ 02.w Code Low Bits
+
+ 04.w fedc ba-- ---- ----
+ ---- --98 7654 3210 X Position**
+
+ 06.w fedc ba-- ---- ----
+ ---- --98 7654 3210 Y Position**
+
+ 08.w fedc ba98 ---- ---- Tile Size X
+ ---- ---- 7654 3210 Tile Size Y
+
+ 0A.w Unused
+
+ 0C.w Unused
+
+ 0E.w Unused
+
+ ** 10 bit signed only? need verifications.
***************************************************************************/
@@ -211,18 +247,23 @@ void cave_state::get_sprite_info_cave(int chip)
const u16 *source = m_spriteram[chip] + (0x4000 / 2) * m_spriteram_bank[chip];
const u16 *finish = source + (0x4000 / 2);
+ u32 clk = 0; // used clock cycle for sprites
for (; source < finish; source += 8)
{
+ clk += 32; // 32 clock per each sprites
+ if (clk > m_max_sprite_clk[chip])
+ break;
+
int x, y;
int total_width_f, total_height_f;
- if (m_spritetype[0] == 2) /* Hot Dog Storm */
+ if ((m_videoregs[chip][5] & 0x3000) == 0) // if bit 12/13 is 0 (or seperated per X and Y?)
{
x = (source[0] & 0x3ff) << 8;
y = (source[1] & 0x3ff) << 8;
}
- else /* all others */
+ else
{
x = source[0] << 2;
y = source[1] << 2;
@@ -239,6 +280,10 @@ void cave_state::get_sprite_info_cave(int chip)
if (!sprite->tile_width || !sprite->tile_height)
continue;
+ clk += sprite->tile_width * sprite->tile_height; // 256 clock per each sprite blocks
+ if (clk > m_max_sprite_clk[chip])
+ break;
+
/* Bound checking */
code %= code_max;
sprite->pen_data = base_gfx + (16 * 16) * code;
@@ -275,7 +320,7 @@ void cave_state::get_sprite_info_cave(int chip)
sprite->ycount0 = sprite->zoomy_re - 1;
}
- if (m_spritetype[0] == 2)
+ if ((m_videoregs[chip][5] & 0x3000) == 0)
{
x >>= 8;
y >>= 8;
@@ -334,16 +379,21 @@ void cave_state::get_sprite_info_donpachi(int chip)
const u16 *source = m_spriteram[chip] + (0x4000 / 2) * m_spriteram_bank[chip];
const u16 *finish = source + (0x4000 / 2);
+ u32 clk = 0; // used clock cycle for sprites
for (; source < finish; source += 8)
{
+ clk += 32; // 32 clock per each sprites
+ if (clk > m_max_sprite_clk[chip])
+ break;
+
int y;
const u16 attr = source[0];
u32 code = source[1] + ((attr & 3) << 16);
int x = source[2] & 0x3ff;
- if (m_spritetype[0] == 3) /* pwrinst2 */
+ if (m_spritetype[0] & TYPE_ISPWRINST2) /* pwrinst2 */
y = (source[3] + 1) & 0x3ff;
else
y = source[3] & 0x3ff;
@@ -364,10 +414,14 @@ void cave_state::get_sprite_info_donpachi(int chip)
x + sprite->total_width <= 0 || x >= max_x || y + sprite->total_height <= 0 || y >= max_y)
{continue;}
+ clk += sprite->tile_width * sprite->tile_height; // 256 clock per each sprite blocks
+ if (clk > m_max_sprite_clk[chip])
+ break;
+
int flipx = attr & 0x0008;
int flipy = attr & 0x0004;
- if (m_spritetype[0] == 3) /* pwrinst2 */
+ if (m_spritetype[0] & TYPE_ISPWRINST2) /* pwrinst2 */
{
sprite->priority = ((attr & 0x0010) >> 4) + 2;
sprite->base_pen = m_sprite_base_pal + ((((attr & 0x3f00) >> 8) + ((attr & 0x0020) << 1)) * m_sprite_granularity);
@@ -398,7 +452,7 @@ void cave_state::get_sprite_info_donpachi(int chip)
void cave_state::sprite_init()
{
- if (m_spritetype[0] == 0 || m_spritetype[0] == 2) // most of the games
+ if ((m_spritetype[0] & TYPE_NOZOOM) == 0) // most of the games
{
m_get_sprite_info = &cave_state::get_sprite_info_cave;
m_spritetype[1] = CAVE_SPRITETYPE_ZOOM;
@@ -422,8 +476,20 @@ void cave_state::sprite_init()
for (int chip = 0; chip < 4; chip++)
{
+ m_max_sprite_clk[chip] = 0;
if (m_videoregs[chip])
{
+ for (int screen = 0; screen < 4; screen++)
+ {
+ if (m_screen[screen])
+ {
+ const u32 new_clk = (m_screen[screen]->visible_area().width() > 360 ? 512 : 448) * 272 * 2; // whole screen size related?
+ if (m_max_sprite_clk[chip] < new_clk)
+ {
+ m_max_sprite_clk[chip] = new_clk;
+ }
+ }
+ }
m_num_sprites[chip] = m_spriteram[chip].bytes() / 0x10 / 2;
m_sprite[chip] = std::make_unique<sprite_cave []>(m_num_sprites[chip]);
}
@@ -840,7 +906,8 @@ void cave_state::do_blit_32(int chip, const sprite_cave *sprite)
return;
y1--; y2--;
}
- else {
+ else
+ {
y1 = sprite->y;
y2 = y1 + sprite->total_height;
dy = 1;
@@ -1038,7 +1105,7 @@ void cave_state::sprite_draw_donpachi_zbuf(int chip, int priority)
Screen Drawing
- Layers Control Registers (cave_vctrl_0..2)
+ Layers Control Registers (vctrl_0..3)
Offset: Bits: Value:
@@ -1069,7 +1136,7 @@ void cave_state::sprite_draw_donpachi_zbuf(int chip, int priority)
Row-scroll: a different scroll value is specified for each scan line.
- Sprites Registers (cave_videoregs)
+ Sprites Registers (videoregs)
Offset: Bits: Value:
@@ -1338,6 +1405,7 @@ void cave_state::get_sprite_info(int chip)
}
}
}
+
void cave_state::device_post_load()
{
for (int chip = 0; chip < 4; chip++)
diff --git a/src/mame/video/cninja.cpp b/src/mame/video/cninja.cpp
index fbd6e004ea8..3362e679f7a 100644
--- a/src/mame/video/cninja.cpp
+++ b/src/mame/video/cninja.cpp
@@ -206,20 +206,6 @@ uint32_t cninja_state::screen_update_robocop2(screen_device &screen, bitmap_ind1
uint16_t flip = m_deco_tilegen[0]->pf_control_r(0);
uint16_t priority = m_priority;
- /* One of the tilemap chips can switch between 2 tilemaps at 4bpp, or 1 at 8bpp */
- if (priority & 4)
- {
- m_deco_tilegen[1]->set_tilemap_colour_mask(0, 0);
- m_deco_tilegen[1]->set_tilemap_colour_mask(1, 0);
- m_deco_tilegen[1]->pf12_set_gfxbank(0, 4);
- }
- else
- {
- m_deco_tilegen[1]->set_tilemap_colour_mask(0, 0xf);
- m_deco_tilegen[1]->set_tilemap_colour_mask(1, 0xf);
- m_deco_tilegen[1]->pf12_set_gfxbank(0, 2);
- }
-
/* Update playfields */
flip_screen_set(BIT(flip, 7));
m_sprgen[0]->set_flip_screen(BIT(flip, 7));
@@ -238,11 +224,18 @@ uint32_t cninja_state::screen_update_robocop2(screen_device &screen, bitmap_ind1
{
case 8:
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
- m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
+ if (priority & 4)
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 4);
+ else
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
break;
default:
case 0:
- m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
+ if (priority & 4)
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 2);
+ else
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
+
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
break;
}
diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp
index fc438ea482e..3a12145330d 100644
--- a/src/mame/video/cps1.cpp
+++ b/src/mame/video/cps1.cpp
@@ -1241,6 +1241,18 @@ static const struct gfx_range mapper_RCM63B_table[] =
{ 0 }
};
+#define mapper_gulunpa { 0x8000, 0, 0, 0 }, mapper_gulunpa_table
+static const struct gfx_range mapper_gulunpa_table[] =
+{
+ /* type start end bank */
+ // TODO: guesswork
+ { GFXTYPE_SCROLL1, 0x0000, 0x7fff, 0 },
+ { GFXTYPE_SCROLL3, 0x4000, 0x5fff, 0 },
+ { GFXTYPE_SCROLL2, 0x2000, 0x3fff, 0 },
+ { GFXTYPE_SPRITES, 0x6000, 0x7fff, 0 },
+ { 0 }
+};
+
#define mapper_PKB10B { 0x8000, 0, 0, 0 }, mapper_PKB10B_table
static const struct gfx_range mapper_PKB10B_table[] =
@@ -1646,7 +1658,8 @@ static const struct CPS1config cps1_config_table[]=
{"pang3b", CPS_B_21_DEF, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ // should use one of these three CP1B1F,CP1B8K,CP1B9K
{"pang3b2", CPS_B_21_DEF, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ // should use one of these three CP1B1F,CP1B8K,CP1B9K
{"ganbare", CPS_B_21_DEF, mapper_sfzch }, // wrong, this set uses GBPR2, dumped but equations still not added
-
+ {"gulunpa", CPS_B_21_DEF, mapper_gulunpa }, // wrong
+
/* CPS Changer */
{"sfach", CPS_B_21_DEF, mapper_sfzch }, // wrong, this set uses an unknown PAL, still not dumped
diff --git a/src/mame/video/decbac06.cpp b/src/mame/video/decbac06.cpp
index c575ba10bda..84e6f19be1f 100644
--- a/src/mame/video/decbac06.cpp
+++ b/src/mame/video/decbac06.cpp
@@ -90,10 +90,6 @@ deco_bac06_device::deco_bac06_device(const machine_config &mconfig, const char *
, m_gfxregion8x8(0)
, m_gfxregion16x16(0)
, m_wide(0)
- , m_bppmult_8x8(0)
- , m_bppmask_8x8(0)
- , m_bppmult_16x16(0)
- , m_bppmask_16x16(0)
, m_gfxdecode(*this, finder_base::DUMMY_TAG)
, m_thedeep_kludge(0)
{
@@ -113,12 +109,6 @@ void deco_bac06_device::device_start()
create_tilemaps(m_gfxregion8x8, m_gfxregion16x16);
m_gfxcolmask = 0x0f;
- m_bppmult_8x8 = m_gfxdecode->gfx(m_gfxregion8x8)->granularity();
- m_bppmask_8x8 = m_gfxdecode->gfx(m_gfxregion8x8)->depth() - 1;
-
- m_bppmult_16x16 = m_gfxdecode->gfx(m_gfxregion16x16)->granularity();
- m_bppmask_16x16 = m_gfxdecode->gfx(m_gfxregion16x16)->depth() - 1;
-
m_rambank = 0;
m_flip_screen = false;
@@ -199,8 +189,8 @@ TILE_GET_INFO_MEMBER(deco_bac06_device::get_pf8x8_tile_info)
if (m_rambank & 1) tile_index += 0x1000;
int tile = m_pf_data[tile_index];
int colourpri = (tile >> 12);
- int flags = (m_pf_control_0[0] & 2) ? 0 : TILE_FLIPX;
- tileinfo.set(m_tile_region_8,tile & 0xfff,0,flags);
+ u32 flags = (m_pf_control_0[0] & 2) ? 0 : TILE_FLIPX;
+ tileinfo.set(m_tile_region_8,tile & 0xfff,colourpri,flags);
tileinfo.category = colourpri;
}
@@ -209,8 +199,8 @@ TILE_GET_INFO_MEMBER(deco_bac06_device::get_pf16x16_tile_info)
if (m_rambank & 1) tile_index += 0x1000;
int tile = m_pf_data[tile_index];
int colourpri = (tile >> 12);
- int flags = (BIT(m_pf_control_0[0], 1) ^ m_thedeep_kludge) ? 0 : TILE_FLIPX;
- tileinfo.set(m_tile_region_16,tile & 0xfff,0,flags);
+ u32 flags = (BIT(m_pf_control_0[0], 1) ^ m_thedeep_kludge) ? 0 : TILE_FLIPX;
+ tileinfo.set(m_tile_region_16,tile & 0xfff,colourpri,flags);
tileinfo.category = colourpri;
}
@@ -223,6 +213,10 @@ void deco_bac06_device::create_tilemaps(int region8x8, int region16x16)
m_pf8x8_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(deco_bac06_device::get_pf8x8_tile_info)), tilemap_mapper_delegate(*this, FUNC(deco_bac06_device::tile_shape1_8x8_scan)), 8, 8, 64, 64);
m_pf8x8_tilemap[2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(deco_bac06_device::get_pf8x8_tile_info)), tilemap_mapper_delegate(*this, FUNC(deco_bac06_device::tile_shape2_8x8_scan)), 8, 8, 32, 128);
+ m_pf8x8_tilemap[0]->set_transparent_pen(0);
+ m_pf8x8_tilemap[1]->set_transparent_pen(0);
+ m_pf8x8_tilemap[2]->set_transparent_pen(0);
+
if (m_wide == 2)
{
m_pf16x16_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(deco_bac06_device::get_pf16x16_tile_info)), tilemap_mapper_delegate(*this, FUNC(deco_bac06_device::tile_shape0_scan)), 16, 16, 256, 16);
@@ -241,6 +235,10 @@ void deco_bac06_device::create_tilemaps(int region8x8, int region16x16)
m_pf16x16_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(deco_bac06_device::get_pf16x16_tile_info)), tilemap_mapper_delegate(*this, FUNC(deco_bac06_device::tile_shape1_scan)), 16, 16, 32, 32);
m_pf16x16_tilemap[2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(deco_bac06_device::get_pf16x16_tile_info)), tilemap_mapper_delegate(*this, FUNC(deco_bac06_device::tile_shape2_scan)), 16, 16, 16, 64);
}
+
+ m_pf16x16_tilemap[0]->set_transparent_pen(0);
+ m_pf16x16_tilemap[1]->set_transparent_pen(0);
+ m_pf16x16_tilemap[2]->set_transparent_pen(0);
}
void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap,
@@ -251,13 +249,11 @@ void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap,
const u16 *colscroll_ptr,
const u16 *control0,
const u16 *control1,
- int flags,
+ u32 flags,
u16 penmask,
u16 pencondition,
u16 colprimask,
u16 colpricondition,
- u8 bppmult,
- u8 bppmask,
u8 pri,
u8 pmask)
{
@@ -291,6 +287,10 @@ void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap,
const int width_mask = src_bitmap.width() - 1;
const int height_mask = src_bitmap.height() - 1;
+ // initialize draw layer flags
+ if ((flags & (TILEMAP_DRAW_LAYER0 | TILEMAP_DRAW_LAYER1 | TILEMAP_DRAW_LAYER2)) == 0)
+ flags |= TILEMAP_DRAW_LAYER0;
+
/* Column scroll & row scroll may per applied per pixel, there are
shift registers for each which control the granularity of the row/col
offset (down to per line level for row, and per 8 lines for column).
@@ -334,15 +334,20 @@ void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap,
column_offset=colscroll_ptr[((src_x >> 3) >> (control1[2] & 0xf)) & (0x3f >> (control1[2] & 0xf))];
const u16 p = src_bitmap.pix16((src_y + column_offset) & height_mask, src_x & width_mask);
- const u8 colpri = flags_bitmap.pix8((src_y + column_offset) & height_mask, src_x & width_mask) & 0xf;
+ const u8 colpri = flags_bitmap.pix8((src_y + column_offset) & height_mask, src_x & width_mask);
+
+ const bool is_drawed = ((flags & TILEMAP_DRAW_OPAQUE) ||
+ ((colpri & TILEMAP_PIXEL_LAYER0) && (flags & TILEMAP_DRAW_LAYER0)) ||
+ ((colpri & TILEMAP_PIXEL_LAYER1) && (flags & TILEMAP_DRAW_LAYER1)) ||
+ ((colpri & TILEMAP_PIXEL_LAYER2) && (flags & TILEMAP_DRAW_LAYER2)));
src_x++;
- if ((flags & TILEMAP_DRAW_OPAQUE) || (p & bppmask))
+ if (is_drawed)
{
if ((p & penmask) == pencondition)
if((colpri & colprimask) == colpricondition)
{
- dstpix[x] = p + (colpri & m_gfxcolmask) * bppmult;
+ dstpix[x] = p;
dstpri[x] = (dstpri[x] & pmask) | pri;
}
}
@@ -351,10 +356,9 @@ void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap,
}
}
-void deco_bac06_device::deco_bac06_pf_draw(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,int flags,u16 penmask, u16 pencondition,u16 colprimask, u16 colpricondition, u8 pri, u8 primask)
+void deco_bac06_device::deco_bac06_pf_draw(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,u32 flags,u16 penmask, u16 pencondition,u16 colprimask, u16 colpricondition, u8 pri, u8 primask)
{
tilemap_t* tm = nullptr;
- u8 bppmult = 0, bppmask = 0;
int tm_dimensions = m_pf_control_0[3] & 0x3;
if (tm_dimensions == 3) tm_dimensions = 1; // 3 is invalid / the same as 1?
@@ -364,14 +368,10 @@ void deco_bac06_device::deco_bac06_pf_draw(screen_device &screen,bitmap_ind16 &b
if (m_supports_8x8)
{
tm = m_pf8x8_tilemap[tm_dimensions];
- bppmult = m_bppmult_8x8;
- bppmask = m_bppmask_8x8;
}
else if (m_supports_16x16)
{
tm = m_pf16x16_tilemap[tm_dimensions];
- bppmult = m_bppmult_16x16;
- bppmask = m_bppmask_16x16;
}
}
else // 16x16 tiles mode is selected
@@ -379,40 +379,31 @@ void deco_bac06_device::deco_bac06_pf_draw(screen_device &screen,bitmap_ind16 &b
if (m_supports_16x16)
{
tm = m_pf16x16_tilemap[tm_dimensions];
- bppmult = m_bppmult_16x16;
- bppmask = m_bppmask_16x16;
}
else if (m_supports_8x8)
{
tm = m_pf8x8_tilemap[tm_dimensions];
- bppmult = m_bppmult_8x8;
- bppmask = m_bppmask_8x8;
}
}
if (tm)
- custom_tilemap_draw(bitmap,screen.priority(),cliprect,tm,m_pf_rowscroll.get(),m_pf_colscroll.get(),m_pf_control_0,m_pf_control_1,flags, penmask, pencondition, colprimask, colpricondition, bppmult, bppmask, pri, primask);
+ custom_tilemap_draw(bitmap,screen.priority(),cliprect,tm,m_pf_rowscroll.get(),m_pf_colscroll.get(),m_pf_control_0,m_pf_control_1,flags, penmask, pencondition, colprimask, colpricondition, pri, primask);
}
// used for pocket gal bootleg, which doesn't set registers properly and simply expects a fixed size tilemap.
-void deco_bac06_device::deco_bac06_pf_draw_bootleg(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,int flags, int mode, int type, u8 pri, u8 primask)
+void deco_bac06_device::deco_bac06_pf_draw_bootleg(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,u32 flags, int mode, int type, u8 pri, u8 primask)
{
tilemap_t* tm = nullptr;
- u8 bppmult, bppmask;
if (!mode)
{
tm = m_pf8x8_tilemap[type];
- bppmult = m_bppmult_8x8;
- bppmask = m_bppmask_8x8;
}
else
{
tm = m_pf16x16_tilemap[type];
- bppmult = m_bppmult_16x16;
- bppmask = m_bppmask_16x16;
}
- custom_tilemap_draw(bitmap,screen.priority(),cliprect,tm,m_pf_rowscroll.get(),m_pf_colscroll.get(),nullptr,nullptr,flags, 0, 0, 0, 0, bppmult, bppmask, pri, primask);
+ custom_tilemap_draw(bitmap,screen.priority(),cliprect,tm,m_pf_rowscroll.get(),m_pf_colscroll.get(),nullptr,nullptr,flags, 0, 0, 0, 0, pri, primask);
}
diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h
index 9607daea8bb..8029343fa78 100644
--- a/src/mame/video/decbac06.h
+++ b/src/mame/video/decbac06.h
@@ -45,8 +45,8 @@ public:
u16 m_pf_control_0[8];
u16 m_pf_control_1[8];
- void deco_bac06_pf_draw(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,int flags,u16 penmask, u16 pencondition,u16 colprimask, u16 colpricondition, u8 pri = 0, u8 primask = 0xff);
- void deco_bac06_pf_draw_bootleg(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,int flags, int mode, int type, u8 pri = 0, u8 primask = 0xff);
+ void deco_bac06_pf_draw(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,u32 flags,u16 penmask, u16 pencondition,u16 colprimask, u16 colpricondition, u8 pri = 0, u8 primask = 0xff);
+ void deco_bac06_pf_draw_bootleg(screen_device &screen,bitmap_ind16 &bitmap,const rectangle &cliprect,u32 flags, int mode, int type, u8 pri = 0, u8 primask = 0xff);
/* I wonder if pf_control_0 is really registers, or a selection of pins.
@@ -114,12 +114,6 @@ protected:
u8 m_gfxregion16x16;
int m_wide;
- u8 m_bppmult_8x8;
- u8 m_bppmask_8x8;
-
- u8 m_bppmult_16x16;
- u8 m_bppmask_16x16;
-
void custom_tilemap_draw(bitmap_ind16 &bitmap,
bitmap_ind8 &primap,
const rectangle &cliprect,
@@ -128,9 +122,8 @@ protected:
const u16 *colscroll_ptr,
const u16 *control0,
const u16 *control1,
- int flags,
+ u32 flags,
u16 penmask, u16 pencondition,u16 colprimask, u16 colpricondition,
- u8 bppmult, u8 bppmask,
u8 pri = 0, u8 pmask = 0xff);
private:
diff --git a/src/mame/video/deco16ic.cpp b/src/mame/video/deco16ic.cpp
index 26413167c0f..31d8124096c 100644
--- a/src/mame/video/deco16ic.cpp
+++ b/src/mame/video/deco16ic.cpp
@@ -42,7 +42,8 @@
Heavy Smash MBG 156 52 141 153,153,153
Night Slashers DE-0397-0 MBH 156 52,52,52 74, 141 104 153,153,153,99,200
Night Slashers DE-0395-1 MBH 156 52,52,52 74, 141 104 113,113,153,99,200
- Locked N Loaded MBM 101 ? 74, 74 146 113,186,187
+3 Locked N Loaded MBM 156 ? 74, 74 146 153,186,187
+4 Locked N Loaded (Conv.) MBM 101 ? 74, 74 146 113,186,187
Joe & Mac Return MBN 156 52 141 223,223
2 Charlie Ninja MBR 156 52 141 223,223
World Cup Volleyball 95 MBX 156 52 141 ?
@@ -61,7 +62,8 @@
Note 1: Mitchell game on DECO PCB board number DEC-22V0 (S-NK-3220)
Note 2: Mitchell games on DECO PCB board number MT5601-0
-Note 3: Fighter's History uses the 156 Encrypted ARM cpu with the encryption disabled
+Note 3: Fighter's History, Locked N Loaded uses the 156 Encrypted ARM cpu with the encryption disabled
+Note 4: Dragon gun conversion PCB
Note *: Ganbare! Gonta!! 2 / Lady Killer Part 2 - Party Time
Note: A version of Night Slashers runs on the DE-0395-1 using the 156 encryption, while a version
@@ -184,19 +186,18 @@ deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag,
, m_pf12_control(nullptr)
, m_pf1_rowscroll_ptr(nullptr)
, m_pf2_rowscroll_ptr(nullptr)
+ , m_tile_cb(*this)
, m_bank1_cb(*this)
, m_bank2_cb(*this)
+ , m_mix_cb(*this)
, m_use_custom_pf1(0)
, m_use_custom_pf2(0)
, m_pf1_bank(0)
, m_pf2_bank(0)
, m_pf12_last_small(0)
, m_pf12_last_big(0)
- , m_pf1_8bpp_mode(0)
, m_pf1_size(0)
, m_pf2_size(0)
- , m_pf1_trans_mask(0xf)
- , m_pf2_trans_mask(0xf)
, m_pf1_colour_bank(0)
, m_pf2_colour_bank(0)
, m_pf1_colourmask(0xf)
@@ -216,8 +217,10 @@ void deco16ic_device::device_start()
if(!m_gfxdecode->started())
throw device_missing_dependencies();
+ m_tile_cb.resolve();
m_bank1_cb.resolve();
m_bank2_cb.resolve();
+ m_mix_cb.resolve();
int fullheight1 = 0;
int fullwidth1 = 0;
@@ -249,8 +252,6 @@ void deco16ic_device::device_start()
m_pf1_tilemap_16x16->set_transparent_pen(0);
m_pf2_tilemap_16x16->set_transparent_pen(0);
- m_pf1_8bpp_mode = 0;
-
m_pf1_data = make_unique_clear<u16[]>(0x2000 / 2);
m_pf2_data = make_unique_clear<u16[]>(0x2000 / 2);
m_pf12_control = make_unique_clear<u16[]>(0x10 / 2);
@@ -264,8 +265,6 @@ void deco16ic_device::device_start()
save_item(NAME(m_pf12_last_small));
save_item(NAME(m_pf12_last_big));
- save_item(NAME(m_pf1_8bpp_mode));
-
save_pointer(NAME(m_pf1_data), 0x2000 / 2);
save_pointer(NAME(m_pf2_data), 0x2000 / 2);
save_pointer(NAME(m_pf12_control), 0x10 / 2);
@@ -294,8 +293,8 @@ TILEMAP_MAPPER_MEMBER(deco16ic_device::deco16_scan_rows)
TILE_GET_INFO_MEMBER(deco16ic_device::get_pf2_tile_info)
{
- const u16 tile = m_pf2_data[tile_index];
- u8 colour = (tile >> 12) & 0xf;
+ u32 tile = m_pf2_data[tile_index];
+ u32 colour = (tile >> 12) & 0xf;
u8 flags = 0;
if (tile & 0x8000)
@@ -312,16 +311,20 @@ TILE_GET_INFO_MEMBER(deco16ic_device::get_pf2_tile_info)
}
}
+ tile &= 0xfff;
+ if (!m_tile_cb.isnull())
+ m_tile_cb(tile, colour, 1, false);
+
tileinfo.set(m_pf12_16x16_gfx_bank,
- (tile & 0xfff) | m_pf2_bank,
+ tile + m_pf2_bank,
(colour & m_pf2_colourmask) + m_pf2_colour_bank,
flags);
}
TILE_GET_INFO_MEMBER(deco16ic_device::get_pf1_tile_info)
{
- const u16 tile = m_pf1_data[tile_index];
- u8 colour = (tile >> 12) & 0xf;
+ u32 tile = m_pf1_data[tile_index];
+ u32 colour = (tile >> 12) & 0xf;
u8 flags = 0;
if (tile & 0x8000)
@@ -338,29 +341,20 @@ TILE_GET_INFO_MEMBER(deco16ic_device::get_pf1_tile_info)
}
}
- if (m_pf1_8bpp_mode)
- {
- // Captain America operates this chip in 8bpp mode.
- // In 8bpp mode you appear to only get 1 layer, not 2, but you also
- // have an extra 2 tile bits, and 2 less colour bits.
- tileinfo.set(m_pf12_16x16_gfx_bank,
- (tile & 0x3fff) | m_pf1_bank,
- ((colour & m_pf1_colourmask) + m_pf1_colour_bank)>>2,
- flags);
- }
- else
- {
- tileinfo.set(m_pf12_16x16_gfx_bank,
- (tile & 0xfff) | m_pf1_bank,
- (colour & m_pf1_colourmask) + m_pf1_colour_bank,
- flags);
- }
+ tile &= 0xfff;
+ if (!m_tile_cb.isnull())
+ m_tile_cb(tile, colour, 0, false);
+
+ tileinfo.set(m_pf12_16x16_gfx_bank,
+ tile + m_pf1_bank,
+ (colour & m_pf1_colourmask) + m_pf1_colour_bank,
+ flags);
}
TILE_GET_INFO_MEMBER(deco16ic_device::get_pf2_tile_info_b)
{
- const u16 tile = m_pf2_data[tile_index];
- u8 colour = (tile >> 12) & 0xf;
+ u32 tile = m_pf2_data[tile_index];
+ u32 colour = (tile >> 12) & 0xf;
u8 flags = 0;
if (tile & 0x8000)
@@ -377,16 +371,20 @@ TILE_GET_INFO_MEMBER(deco16ic_device::get_pf2_tile_info_b)
}
}
+ tile &= 0xfff;
+ if (!m_tile_cb.isnull())
+ m_tile_cb(tile, colour, 1, true);
+
tileinfo.set(m_pf12_8x8_gfx_bank,
- (tile & 0xfff) | m_pf2_bank,
+ tile + m_pf2_bank,
(colour & m_pf2_colourmask) + m_pf2_colour_bank,
flags);
}
TILE_GET_INFO_MEMBER(deco16ic_device::get_pf1_tile_info_b)
{
- const u16 tile = m_pf1_data[tile_index];
- u8 colour = (tile >> 12) & 0xf;
+ u32 tile = m_pf1_data[tile_index];
+ u32 colour = (tile >> 12) & 0xf;
u8 flags = 0;
if (tile & 0x8000)
@@ -403,8 +401,12 @@ TILE_GET_INFO_MEMBER(deco16ic_device::get_pf1_tile_info_b)
}
}
+ tile &= 0xfff;
+ if (!m_tile_cb.isnull())
+ m_tile_cb(tile, colour, 0, true);
+
tileinfo.set(m_pf12_8x8_gfx_bank,
- (tile & 0xfff) | m_pf1_bank,
+ tile + m_pf1_bank,
(colour & m_pf1_colourmask) + m_pf1_colour_bank,
flags);
}
@@ -436,10 +438,8 @@ void deco16ic_device::custom_tilemap_draw(
const u16 control1,
int combine_mask,
int combine_shift,
- int trans_mask,
int flags,
u8 priority,
- int is_tattoo,
u8 pmask
)
{
@@ -448,11 +448,12 @@ void deco16ic_device::custom_tilemap_draw(
if (sizeof(*dest) == 2) rgb = 0;
else rgb = 1;
- gfx_element *gfx = m_gfxdecode->gfx(BIT(control1, 7) ? m_pf12_8x8_gfx_bank : m_pf12_16x16_gfx_bank);
tilemap_t *tilemap0 = BIT(control1, 7) ? tilemap0_8x8 : tilemap0_16x16;
tilemap_t *tilemap1 = BIT(control1, 7) ? tilemap1_8x8 : tilemap1_16x16;
const bitmap_ind16 *src_bitmap0 = tilemap0 ? &tilemap0->pixmap() : nullptr;
const bitmap_ind16 *src_bitmap1 = tilemap1 ? &tilemap1->pixmap() : nullptr;
+ const bitmap_ind8 *src_flagsmap0 = tilemap0 ? &tilemap0->flagsmap() : nullptr;
+ const bitmap_ind8 *src_flagsmap1 = tilemap1 ? &tilemap1->flagsmap() : nullptr;
int column_offset, src_x = 0;
const int row_type = 1 << ((control0 >> 3) & 0xf);
const int col_type = 8 << (control0 & 7);
@@ -464,6 +465,10 @@ void deco16ic_device::custom_tilemap_draw(
if (!BIT(control0, 7))
return;
+ // initialize draw layer flags
+ if ((flags & (TILEMAP_DRAW_LAYER0 | TILEMAP_DRAW_LAYER1 | TILEMAP_DRAW_LAYER2)) == 0)
+ flags |= TILEMAP_DRAW_LAYER0;
+
const int starty = cliprect.top();
const int endy = cliprect.bottom() + 1;
@@ -490,23 +495,30 @@ void deco16ic_device::custom_tilemap_draw(
column_offset = 0;
u16 p = src_bitmap0->pix16((src_y + column_offset) & height_mask, src_x);
+ u8 f = src_flagsmap0->pix8((src_y + column_offset) & height_mask, src_x);
if (src_bitmap1)
{
- if (!is_tattoo)
+ f |= src_flagsmap1->pix8((src_y + column_offset) & height_mask, src_x) & ~TILEMAP_DRAW_CATEGORY_MASK;
+ if (!m_mix_cb.isnull())
{
- // does boogie wings actually use this, or is the tattoo assassin code correct in this mode?
- p |= (src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x) & combine_mask) << combine_shift;
+ const u16 p2 = src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x);
+ p = m_mix_cb(p, p2);
}
else
{
- const u16 p2 = src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x);
- p = gfx->colorbase() + (m_pf1_colour_bank * gfx->granularity()) + (((p & 0x30) << 4) | (p & 0x0f) | ((p2 & 0x0f) << 4));
+ // does boogie wings actually use this, or is the tattoo assassin code correct in this mode?
+ p |= (src_bitmap1->pix16((src_y + column_offset) & height_mask, src_x) & combine_mask) << combine_shift;
}
}
src_x = (src_x + 1) & width_mask;
- if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
+ const bool is_drawn = ((flags & TILEMAP_DRAW_OPAQUE) ||
+ ((f & TILEMAP_PIXEL_LAYER0) && (flags & TILEMAP_DRAW_LAYER0)) ||
+ ((f & TILEMAP_PIXEL_LAYER1) && (flags & TILEMAP_DRAW_LAYER1)) ||
+ ((f & TILEMAP_PIXEL_LAYER2) && (flags & TILEMAP_DRAW_LAYER2)));
+
+ if (is_drawn)
{
dest = &bitmap.pix(y);
if (!rgb) dest[x] = p;
@@ -540,12 +552,6 @@ void deco16ic_device::set_transmask(int tmap, int group, u32 fgmask, u32 bgmask)
}
}
-/* captain america seems to have a similar 8bpp feature to robocop2, investigate merging */
-void deco16ic_device::set_pf1_8bpp_mode(int mode)
-{
- m_pf1_8bpp_mode = mode;
-}
-
/* robocop 2 can switch between 2 tilemaps at 4bpp, or 1 at 8bpp */
void deco16ic_device::set_tilemap_colour_mask(int tmap, int mask)
{
@@ -952,7 +958,7 @@ void deco16ic_device::tilemap_1_draw_common(screen_device &screen, _BitmapClass
{
if (m_use_custom_pf1)
{
- custom_tilemap_draw(screen, bitmap, cliprect, m_pf1_tilemap_8x8, m_pf1_tilemap_16x16, nullptr, nullptr, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0, 0, m_pf1_trans_mask, flags, priority, 0, pmask);
+ custom_tilemap_draw(screen, bitmap, cliprect, m_pf1_tilemap_8x8, m_pf1_tilemap_16x16, nullptr, nullptr, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0, 0, flags, priority, pmask);
}
else
{
@@ -975,7 +981,7 @@ void deco16ic_device::tilemap_2_draw_common(screen_device &screen, _BitmapClass
{
if (m_use_custom_pf2)
{
- custom_tilemap_draw(screen, bitmap, cliprect, m_pf2_tilemap_8x8, m_pf2_tilemap_16x16, nullptr, nullptr, m_pf2_rowscroll_ptr, m_pf12_control[3], m_pf12_control[4], m_pf12_control[5] >> 8, m_pf12_control[6] >> 8, 0, 0, m_pf2_trans_mask, flags, priority, 0, pmask);
+ custom_tilemap_draw(screen, bitmap, cliprect, m_pf2_tilemap_8x8, m_pf2_tilemap_16x16, nullptr, nullptr, m_pf2_rowscroll_ptr, m_pf12_control[3], m_pf12_control[4], m_pf12_control[5] >> 8, m_pf12_control[6] >> 8, 0, 0, flags, priority, pmask);
}
else
{
@@ -996,12 +1002,12 @@ void deco16ic_device::tilemap_2_draw(screen_device &screen, bitmap_rgb32 &bitmap
/*****************************************************************************************/
// Combines the output of two 4BPP tilemaps into an 8BPP tilemap
-void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, u8 priority, int is_tattoo, u8 pmask)
+void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, u8 priority, u8 pmask)
{
- custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo, pmask);
+ custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, flags, priority, pmask);
}
-void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flags, u8 priority, int is_tattoo, u8 pmask)
+void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flags, u8 priority, u8 pmask)
{
- custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo, pmask);
+ custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, flags, priority, pmask);
}
diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h
index 0a93cd6613b..15b1ad92c7d 100644
--- a/src/mame/video/deco16ic.h
+++ b/src/mame/video/deco16ic.h
@@ -25,7 +25,9 @@
TYPE DEFINITIONS
***************************************************************************/
+typedef device_delegate<void (u32 &tile, u32 &colour, int layer, bool is_8x8)> deco16_tile_cb_delegate;
typedef device_delegate<int (int bank)> deco16_bank_cb_delegate;
+typedef device_delegate<u16 (u16 p, u16 p2)> deco16_mix_cb_delegate;
class deco16ic_device : public device_t, public device_video_interface
{
@@ -35,12 +37,12 @@ public:
// configuration
template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
// void set_palette_tag(const char *tag);
+ template <typename... T> void set_tile_callback(T &&... args) { m_tile_cb.set(std::forward<T>(args)...); }
template <typename... T> void set_bank1_callback(T &&... args) { m_bank1_cb.set(std::forward<T>(args)...); }
template <typename... T> void set_bank2_callback(T &&... args) { m_bank2_cb.set(std::forward<T>(args)...); }
+ template <typename... T> void set_mix_callback(T &&... args) { m_mix_cb.set(std::forward<T>(args)...); }
void set_pf1_size(int size) { m_pf1_size = size; }
void set_pf2_size(int size) { m_pf2_size = size; }
- void set_pf1_trans_mask(int mask) { m_pf1_trans_mask = mask; }
- void set_pf2_trans_mask(int mask) { m_pf2_trans_mask = mask; }
void set_pf1_col_mask(int mask) { m_pf1_colourmask = mask; }
void set_pf2_col_mask(int mask) { m_pf2_colourmask = mask; }
void set_pf1_col_bank(int bank) { m_pf1_colour_bank = bank; }
@@ -48,7 +50,6 @@ public:
void set_pf12_8x8_bank(int bank) { m_pf12_8x8_gfx_bank = bank; }
void set_pf12_16x16_bank(int bank) { m_pf12_16x16_gfx_bank = bank; }
-
void pf1_data_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void pf2_data_w(offs_t offset, u16 data, u16 mem_mask = ~0);
@@ -81,16 +82,13 @@ public:
void tilemap_2_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flags, u8 priority, u8 pmask = 0xff);
/* used by boogwing, nitrobal */
- void tilemap_12_combine_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, u8 priority, int is_tattoo = false, u8 pmask = 0xff);
- void tilemap_12_combine_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flags, u8 priority, int is_tattoo = false, u8 pmask = 0xff);
+ void tilemap_12_combine_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, u8 priority, u8 pmask = 0xff);
+ void tilemap_12_combine_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flags, u8 priority, u8 pmask = 0xff);
/* used by robocop2 */
void set_tilemap_colour_mask(int tmap, int mask);
void pf12_set_gfxbank(int small, int big);
- /* used by captaven */
- void set_pf1_8bpp_mode(int mode);
-
/* used by cninja */
void set_transmask(int tmap, int group, u32 fgmask, u32 bgmask);
@@ -119,10 +117,8 @@ public:
const u16 control1,
int combine_mask,
int combine_shift,
- int trans_mask,
int flags,
u8 priority,
- int is_tattoo,
u8 pmask = 0xff);
protected:
@@ -141,17 +137,19 @@ private:
tilemap_t *m_pf1_tilemap_16x16, *m_pf2_tilemap_16x16;
tilemap_t *m_pf1_tilemap_8x8, *m_pf2_tilemap_8x8;
+ deco16_tile_cb_delegate m_tile_cb;
+
deco16_bank_cb_delegate m_bank1_cb;
deco16_bank_cb_delegate m_bank2_cb;
+ deco16_mix_cb_delegate m_mix_cb;
+
int m_use_custom_pf1, m_use_custom_pf2;
int m_pf1_bank, m_pf2_bank;
int m_pf12_last_small, m_pf12_last_big;
- int m_pf1_8bpp_mode;
int m_pf1_size;
int m_pf2_size;
- int m_pf1_trans_mask, m_pf2_trans_mask;
int m_pf1_colour_bank, m_pf2_colour_bank;
int m_pf1_colourmask, m_pf2_colourmask;
int m_pf12_8x8_gfx_bank, m_pf12_16x16_gfx_bank;
diff --git a/src/mame/video/deco32.cpp b/src/mame/video/deco32.cpp
index 7fd9112092b..afc17a93a69 100644
--- a/src/mame/video/deco32.cpp
+++ b/src/mame/video/deco32.cpp
@@ -104,7 +104,6 @@ void deco32_state::allocate_rowscroll(int size1, int size2, int size3, int size4
void captaven_state::video_start()
{
- m_deco_tilegen[1]->set_pf1_8bpp_mode(1);
deco32_state::allocate_spriteram(0);
deco32_state::allocate_rowscroll(0x4000/4, 0x2000/4, 0x4000/4, 0x2000/4);
deco32_state::video_start();
@@ -134,7 +133,6 @@ void nslasher_state::video_start()
void dragngun_state::video_start()
{
- //m_deco_tilegen[0]->set_pf1_8bpp_mode(1); // despite being 8bpp this doesn't require the same shifting as captaven, why not?
m_screen->register_screen_bitmap(m_temp_render_bitmap);
deco32_state::allocate_rowscroll(0x4000/4, 0x2000/4, 0x4000/4, 0x2000/4);
deco32_state::allocate_buffered_palette();
@@ -423,7 +421,7 @@ u32 nslasher_state::screen_update_nslasher(screen_device &screen, bitmap_rgb32 &
/* Draw playfields & sprites */
if (m_pri & 2)
{
- m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 1, 1);
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 1);
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
}
else
@@ -625,7 +623,7 @@ u32 nslasher_state::screen_update_tattass(screen_device &screen, bitmap_rgb32 &b
/* Draw playfields & sprites */
if (m_pri & 2)
{
- m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 1, 1);
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 1);
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
}
else
diff --git a/src/mame/video/docastle.cpp b/src/mame/video/docastle.cpp
index a1a46497e8a..4b2f63cacee 100644
--- a/src/mame/video/docastle.cpp
+++ b/src/mame/video/docastle.cpp
@@ -79,12 +79,12 @@ WRITE8_MEMBER(docastle_state::docastle_colorram_w)
READ8_MEMBER(docastle_state::inputs_flipscreen_r)
{
// inputs pass through LS244 non-inverting buffer
- uint8_t buf = (m_inp[1]->read_h(space, 0) << 4) | m_inp[0]->read_h(space, 0);
+ uint8_t buf = (m_inp[1]->read_h() << 4) | m_inp[0]->read_h();
// LS273 latches address bits on rising edge of address decode
flip_screen_set(BIT(offset, 7));
- m_inp[0]->write_s(space, 0, offset & 7);
- m_inp[1]->write_s(space, 0, offset & 7);
+ m_inp[0]->write_s(offset & 7);
+ m_inp[1]->write_s(offset & 7);
return buf;
}
diff --git a/src/mame/video/gic.cpp b/src/mame/video/gic.cpp
index 30f882c68b8..3934d67455c 100644
--- a/src/mame/video/gic.cpp
+++ b/src/mame/video/gic.cpp
@@ -186,7 +186,7 @@ uint32_t gic_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
for(uint8_t cx=0;cx<GIC_LEFT_W;cx++){
draw_char_left(XSTART+(cx*GIC_CHAR_W),
YSTART+(cy*GIC_CHAR_H),
- m_ram(machine().dummy_space(), current, 0xff),
+ m_ram(current),
m_bitmap);
current++;
}
@@ -199,7 +199,7 @@ uint32_t gic_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
for(uint8_t cy=0;cy<GIC_RIGHT_H;cy++){
for(uint8_t cx=0;cx<GIC_RIGHT_W;cx++){
//complex case
- uint8_t data = m_ram(machine().dummy_space(), current++, 0xff);
+ uint8_t data = m_ram(current++);
size_t currX = (XSTART+ (cx*(3+GIC_CHAR_W)));
size_t currUP = (YSTART+ (cy*(2*GIC_CHAR_H)));
@@ -295,7 +295,7 @@ void gic_device::sound_stream_update(sound_stream &stream, stream_sample_t **inp
//lo for 1824(228*8)
//hi for 1824(228*8)
- uint8_t audioByte = m_ram(machine().dummy_space(), GIC_AUDIO_BYTE, 0xff)*2;
+ uint8_t audioByte = m_ram(GIC_AUDIO_BYTE)*2;
if(!audioByte){
for(size_t i = 0; i < samples; i++)
diff --git a/src/mame/video/gtia.cpp b/src/mame/video/gtia.cpp
index b87881176e0..2efe01b0851 100644
--- a/src/mame/video/gtia.cpp
+++ b/src/mame/video/gtia.cpp
@@ -252,7 +252,7 @@ void gtia_device::device_reset()
/* reset the GTIA read/write/helper registers */
for (int i = 0; i < 32; i++)
- write(machine().dummy_space(), i, 0);
+ write(i, 0);
if (is_ntsc())
m_r.pal = 0xff;
@@ -509,7 +509,7 @@ void gtia_device::recalc_m3()
-WRITE8_MEMBER( gtia_device::write )
+void gtia_device::write(offs_t offset, uint8_t data)
{
/* used for mixing hue/lum of different colors */
// static uint8_t lumpm0=0,lumpm1=0,lumpm2=0,lumpm3=0,lumpm4=0;
diff --git a/src/mame/video/gtia.h b/src/mame/video/gtia.h
index 72300edafe8..2ab3e7cf55c 100644
--- a/src/mame/video/gtia.h
+++ b/src/mame/video/gtia.h
@@ -35,7 +35,7 @@ public:
auto write_callback() { return m_write_cb.bind(); }
DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ void write(offs_t offset, uint8_t data);
uint16_t *get_color_lookup() { return m_color_lookup; }
void set_color_lookup(int i, uint16_t data) { m_color_lookup[i] = data; }
diff --git a/src/mame/video/malzak.cpp b/src/mame/video/malzak.cpp
index 88f406cc398..864ec8df4fb 100644
--- a/src/mame/video/malzak.cpp
+++ b/src/mame/video/malzak.cpp
@@ -17,68 +17,100 @@
#include "emu.h"
#include "includes/malzak.h"
-uint32_t malzak_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+void malzak_state::palette_init(palette_device &palette) const
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
+ for (int i = 0; i < 8 * 8; i++)
+ {
+ palette.set_pen_color(i * 2 + 0, pal1bit(i >> 3), pal1bit(i >> 4), pal1bit(i >> 5));
+ palette.set_pen_color(i * 2 + 1, pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ }
+}
- bitmap.fill(rgb_t::black(), cliprect);
+READ8_MEMBER(malzak_state::videoram_r)
+{
+ return m_videoram[offset];
+}
- m_trom->screen_update(screen, bitmap, cliprect);
+WRITE8_MEMBER(malzak_state::port60_w)
+{
+ m_scrollx = data;
+// logerror("I/O: port 0x60 write 0x%02x\n", data);
+ m_playfield_tilemap->set_scrollx(0, m_scrollx + 48);
+}
- // playfield - not sure exactly how this works...
- for (int x = 0; x < 16; x++)
- for (int y = 0; y < 16; y++)
- {
- int sx = ((x * 16 - 48) - m_malzak_x) * 2;
- int sy = ((y * 16) - m_malzak_y) * 2;
+WRITE8_MEMBER(malzak_state::portc0_w)
+{
+ m_scrolly = data;
+// logerror("I/O: port 0xc0 write 0x%02x\n", data);
+ m_playfield_tilemap->set_scrolly(0, m_scrolly);
+}
- if (sx < -271*2)
- sx += 512*2;
- if (sx < -15*2)
- sx += 256*2;
+//TODO: how readback works with this arrangement? Never occurs in-game
+WRITE8_MEMBER(malzak_state::playfield_w)
+{
+ int tile = ((m_scrollx / 16) * 16) + (offset / 16);
- m_gfxdecode->gfx(0)->zoom_transpen(bitmap,cliprect, m_playfield_code[x * 16 + y], 2, 0, 0, sx, sy, 0x20000, 0x20000, 0);
- }
+// m_playfield_x[tile] = m_malzak_x / 16;
+// m_playfield_y[tile] = m_malzak_y;
+ m_playfield_code[tile] = data;
+ m_playfield_tilemap->mark_tile_dirty(tile);
+ // POST only, adds to the scrollx base address?
+// if (offset & 0xf)
+// popmessage("GFX: 0x16%02x write 0x%02x\n", offset, data);
+}
- /* update the S2636 chips */
+TILE_GET_INFO_MEMBER(malzak_state::get_tile_info)
+{
+ u8 code = (m_playfield_code[tile_index] & 0x1f) | (m_playfield_bank << 5);
+ u8 color = ((m_playfield_code[tile_index] & 0xe0) >> 5);
+ tileinfo.set(0, code, color, 0);
+}
+
+void malzak_state::video_start()
+{
+ int width = m_screen->width();
+ int height = m_screen->height();
+ m_trom_bitmap = std::make_unique<bitmap_rgb32>(width, height);
+ m_playfield_bitmap = std::make_unique<bitmap_rgb32>(width, height);
+ m_playfield_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(malzak_state::get_tile_info)), TILEMAP_SCAN_COLS, 16, 16, 16, 16);
+}
+
+uint32_t malzak_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
+
+ bitmap.fill(rgb_t::black(), cliprect);
+
+ // prepare bitmaps
+ m_trom->screen_update(screen, *m_trom_bitmap, cliprect);
+ m_playfield_tilemap->draw(screen, *m_playfield_bitmap, cliprect, 0, 0);
bitmap_ind16 const &s2636_0_bitmap = m_s2636[0]->update(cliprect);
bitmap_ind16 const &s2636_1_bitmap = m_s2636[1]->update(cliprect);
- /* copy the S2636 images into the main bitmap */
+ // Superimpose
+ // TODO: update for PAL size
+ for (int y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
- for (int y = cliprect.min_y; y <= cliprect.max_y / 2; y++)
+ int sy = y / 2;
+ for (int x = cliprect.min_x; x <= cliprect.max_x; ++x)
{
- for (int x = cliprect.min_x; x <= cliprect.max_x / 2; x++)
- {
- int pixel0 = s2636_0_bitmap.pix16(y, x);
- int pixel1 = s2636_1_bitmap.pix16(y, x);
-
- if (S2636_IS_PIXEL_DRAWN(pixel0)) {
- bitmap.pix32(y*2, x*2) = palette[S2636_PIXEL_COLOR(pixel0)];
- bitmap.pix32(y*2+1, x*2) = palette[S2636_PIXEL_COLOR(pixel0)];
- bitmap.pix32(y*2, x*2+1) = palette[S2636_PIXEL_COLOR(pixel0)];
- bitmap.pix32(y*2+1, x*2+1) = palette[S2636_PIXEL_COLOR(pixel0)];
- }
-
- if (S2636_IS_PIXEL_DRAWN(pixel1)) {
- bitmap.pix32(y*2, x*2) = palette[S2636_PIXEL_COLOR(pixel1)];
- bitmap.pix32(y*2+1, x*2) = palette[S2636_PIXEL_COLOR(pixel1)];
- bitmap.pix32(y*2, x*2+1) = palette[S2636_PIXEL_COLOR(pixel1)];
- bitmap.pix32(y*2+1, x*2+1) = palette[S2636_PIXEL_COLOR(pixel1)];
- }
- }
+ int sx = x / 2;
+ int s2636_pix_0 = s2636_0_bitmap.pix16(sy, sx);
+ int s2636_pix_1 = s2636_1_bitmap.pix16(sy, sx);
+ rgb_t trom_pix = m_trom_bitmap->pix32(y, x);
+ rgb_t play_pix = m_playfield_bitmap->pix32(sy, sx);
+
+ // SAA5050 > s2636[1] > s2636[0] > playfield
+ if (trom_pix != rgb_t::black())
+ bitmap.pix32(y, x) = trom_pix;
+ else if (S2636_IS_PIXEL_DRAWN(s2636_pix_1))
+ bitmap.pix32(y, x) = palette[S2636_PIXEL_COLOR(s2636_pix_1)];
+ else if (S2636_IS_PIXEL_DRAWN(s2636_pix_0))
+ bitmap.pix32(y, x) = palette[S2636_PIXEL_COLOR(s2636_pix_0)];
+ else
+ bitmap.pix32(y, x) = play_pix;
}
}
return 0;
}
-
-WRITE8_MEMBER(malzak_state::malzak_playfield_w)
-{
- int tile = ((m_malzak_x / 16) * 16) + (offset / 16);
-
-// m_playfield_x[tile] = m_malzak_x / 16;
-// m_playfield_y[tile] = m_malzak_y;
- m_playfield_code[tile] = (data & 0x1f);
- logerror("GFX: 0x16%02x write 0x%02x\n", offset, data);
-}
diff --git a/src/mame/video/mbee.cpp b/src/mame/video/mbee.cpp
index 0724f991cf7..61f8c8c2a92 100644
--- a/src/mame/video/mbee.cpp
+++ b/src/mame/video/mbee.cpp
@@ -50,7 +50,7 @@ WRITE_LINE_MEMBER( mbee_state::crtc_vs )
{
m_b7_vs = state;
if ((m_io_config->read() & 0xc0) == 0) // VS selected in config menu
- m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
+ m_pio->port_b_write(pio_port_b_r());
}
/***********************************************************
diff --git a/src/mame/video/mcr.cpp b/src/mame/video/mcr.cpp
index 1afb17da42c..48738c0eeef 100644
--- a/src/mame/video/mcr.cpp
+++ b/src/mame/video/mcr.cpp
@@ -159,7 +159,7 @@ void mcr_state::journey_set_color(int index, int data)
}
-WRITE8_MEMBER(mcr_state::mcr_paletteram9_w)
+void mcr_state::mcr_paletteram9_w(offs_t offset, uint8_t data)
{
// palette RAM is actually 9 bit (a 93419 SRAM)
// however, there is no way for the CPU to read back
@@ -177,14 +177,14 @@ WRITE8_MEMBER(mcr_state::mcr_paletteram9_w)
*
*************************************/
-WRITE8_MEMBER(mcr_state::mcr_90009_videoram_w)
+void mcr_state::mcr_90009_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(mcr_state::mcr_90010_videoram_w)
+void mcr_state::mcr_90010_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset / 2);
@@ -200,14 +200,14 @@ WRITE8_MEMBER(mcr_state::mcr_90010_videoram_w)
}
-READ8_MEMBER(mcr_state::twotiger_videoram_r)
+uint8_t mcr_state::twotiger_videoram_r(offs_t offset)
{
/* Two Tigers swizzles the address bits on videoram */
int effoffs = ((offset << 1) & 0x7fe) | ((offset >> 10) & 1);
return m_videoram[effoffs];
}
-WRITE8_MEMBER(mcr_state::twotiger_videoram_w)
+void mcr_state::twotiger_videoram_w(offs_t offset, uint8_t data)
{
/* Two Tigers swizzles the address bits on videoram */
int effoffs = ((offset << 1) & 0x7fe) | ((offset >> 10) & 1);
@@ -221,7 +221,7 @@ WRITE8_MEMBER(mcr_state::twotiger_videoram_w)
}
-WRITE8_MEMBER(mcr_state::mcr_91490_videoram_w)
+void mcr_state::mcr_91490_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset / 2);
diff --git a/src/mame/video/mcr3.cpp b/src/mame/video/mcr3.cpp
index 41927444bb2..68531f397bf 100644
--- a/src/mame/video/mcr3.cpp
+++ b/src/mame/video/mcr3.cpp
@@ -119,28 +119,28 @@ VIDEO_START_MEMBER(mcr3_state,spyhunt)
*
*************************************/
-WRITE8_MEMBER(mcr3_state::mcr3_videoram_w)
+void mcr3_state::mcr3_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset / 2);
}
-WRITE8_MEMBER(mcr3_state::spyhunt_videoram_w)
+void mcr3_state::spyhunt_videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(mcr3_state::spyhunt_alpharam_w)
+void mcr3_state::spyhunt_alpharam_w(offs_t offset, uint8_t data)
{
m_spyhunt_alpharam[offset] = data;
m_alpha_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(mcr3_state::spyhunt_scroll_value_w)
+void mcr3_state::spyhunt_scroll_value_w(offs_t offset, uint8_t data)
{
switch (offset)
{
diff --git a/src/mame/video/nmk16.cpp b/src/mame/video/nmk16.cpp
index d0b71ada106..f05e3735c18 100644
--- a/src/mame/video/nmk16.cpp
+++ b/src/mame/video/nmk16.cpp
@@ -183,6 +183,11 @@ void nmk16_state::mustang_scroll_w(u16 data)
m_bg_tilemap[0]->set_scrollx(0,m_mustang_bg_xscroll - m_videoshift);
}
+void nmk16_state::bjtwin_scroll_w(offs_t offset, u8 data)
+{
+ m_bg_tilemap[0]->set_scrolly(0,-data);
+}
+
void nmk16_state::vandyke_scroll_w(offs_t offset, u16 data)
{
m_vscroll[offset] = data;
diff --git a/src/mame/video/psikyo.cpp b/src/mame/video/psikyo.cpp
index 0e85f0c5249..b2e8d8dfc42 100644
--- a/src/mame/video/psikyo.cpp
+++ b/src/mame/video/psikyo.cpp
@@ -76,24 +76,34 @@ Offset:
template<int Layer>
TILE_GET_INFO_MEMBER(psikyo_state::get_tile_info)
{
- u16 code = ((u16 *)m_vram[Layer].target())[BYTE_XOR_BE(tile_index)];
+ u16 code = m_vram[Layer][tile_index & 0xfff];
tileinfo.set(1,
(code & 0x1fff) + 0x2000 * m_tilemap_bank[Layer],
((code >> 13) & 7) + (Layer * 0x40),
0);
}
+template<int Layer>
+TILEMAP_MAPPER_MEMBER(psikyo_state::tile_scan)
+{
+ switch (m_tmapsize[Layer])
+ {
+ case 0: return (col & 0x3f) | ((row & 0x3f) << 6) | ((col & 0xc0) << 6) | ((row & 0x40) << 8);
+ case 1: return (col & 0x7f) | ((row & 0x1f) << 7) | ((col & 0x80) << 5) | ((row & 0x60) << 8);
+ case 2: return (col & 0xff) | ((row & 0x0f) << 8) | ((row & 0x70) << 8);
+ default: return (col & 0x1f) | ((row & 0x7f) << 5) | ((col & 0xe0) << 7);
+ }
+}
+
void psikyo_state::switch_bgbanks(u8 tmap, u8 bank)
{
if (bank != m_tilemap_bank[tmap])
{
m_tilemap_bank[tmap] = bank;
- for (int size = 0; size < 4; size++)
- m_tilemap[tmap][size]->mark_all_dirty();
+ m_tilemap[tmap]->mark_all_dirty();
}
}
-
VIDEO_START_MEMBER(psikyo_state,psikyo)
{
m_spritelist = std::make_unique<sprite_t[]>(0x800/2*8*8);
@@ -101,18 +111,18 @@ VIDEO_START_MEMBER(psikyo_state,psikyo)
/* The Hardware is Capable of Changing the Dimensions of the Tilemaps, its safer to create
the various sized tilemaps now as opposed to later */
- for (int size = 0; size < 4; size++)
- {
- m_tilemap[0][size] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(psikyo_state::get_tile_info<0>)), TILEMAP_SCAN_ROWS, 16, 16, 0x20 << size, 0x80 >> size);
- m_tilemap[1][size] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(psikyo_state::get_tile_info<1>)), TILEMAP_SCAN_ROWS, 16, 16, 0x20 << size, 0x80 >> size);
+ m_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(psikyo_state::get_tile_info<0>)), tilemap_mapper_delegate(*this, FUNC(psikyo_state::tile_scan<0>)), 16, 16, 256, 128);
+ m_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(psikyo_state::get_tile_info<1>)), tilemap_mapper_delegate(*this, FUNC(psikyo_state::tile_scan<1>)), 16, 16, 256, 128);
- for (int layer = 0; layer < 2; layer++)
- {
- m_tilemap[layer][size]->set_scroll_rows(1);
- m_tilemap[layer][size]->set_scroll_cols(1);
- }
+ for (int layer = 0; layer < 2; layer++)
+ {
+ m_tilemap[layer]->set_scroll_rows(1);
+ m_tilemap[layer]->set_scroll_cols(1);
}
+
save_item(NAME(m_old_linescroll));
+ save_item(NAME(m_old_tmapsize));
+ save_item(NAME(m_tmapsize));
save_item(NAME(m_sprite_ctrl));
}
@@ -176,8 +186,6 @@ void psikyo_state::get_sprites()
m_sprite_ctrl = m_spriteram->buffer()[0x1ffe / 4] & 0xffff;
static const int pri[] = { 0, 0xfc, 0xff, 0xff };
const u16 *spritelist = (u16 *)(m_spriteram->buffer() + 0x1800 / 4);
- const u8 *TILES = m_spritelut->base(); // Sprites LUT
- u32 const TILES_LEN = m_spritelut->bytes();
u16 const width = m_screen->width();
u16 const height = m_screen->height();
@@ -248,10 +256,8 @@ void psikyo_state::get_sprites()
{
for (int dx = xstart; dx != xend; dx += xinc)
{
- u32 const addr = (code * 2) & (TILES_LEN - 1);
-
m_sprite_ptr_pre->gfx = 0;
- m_sprite_ptr_pre->code = TILES[addr+1] * 256 + TILES[addr];
+ m_sprite_ptr_pre->code = m_spritelut[code & m_spritelut.mask()];
m_sprite_ptr_pre->color = attr >> 8;
m_sprite_ptr_pre->flipx = flipx;
m_sprite_ptr_pre->flipy = flipy;
@@ -287,8 +293,6 @@ void psikyo_state::get_sprites_bootleg()
m_sprite_ctrl = m_spriteram->buffer()[0x1ffe / 4] & 0xffff;
static const int pri[] = { 0, 0xfc, 0xff, 0xff };
const u16 *spritelist = (u16 *)(m_spriteram->buffer() + 0x1800 / 4);
- const u8 *TILES = m_spritelut->base(); // Sprites LUT
- u32 const TILES_LEN = m_spritelut->bytes();
u16 const width = m_screen->width();
u16 const height = m_screen->height();
@@ -341,7 +345,6 @@ void psikyo_state::get_sprites_bootleg()
zoomx = 32 - zoomx;
zoomy = 32 - zoomy;
-
if (flip_screen())
{
x = width - x - (nx * zoomx) / 2;
@@ -360,10 +363,8 @@ void psikyo_state::get_sprites_bootleg()
{
for (int dx = xstart; dx != xend; dx += xinc)
{
- u32 const addr = (code * 2) & (TILES_LEN-1);
-
m_sprite_ptr_pre->gfx = 0;
- m_sprite_ptr_pre->code = TILES[addr+1] * 256 + TILES[addr];
+ m_sprite_ptr_pre->code = m_spritelut[code & m_spritelut.mask()];
m_sprite_ptr_pre->color = attr >> 8;
m_sprite_ptr_pre->flipx = flipx;
m_sprite_ptr_pre->flipy = flipy;
@@ -388,7 +389,7 @@ void psikyo_state::get_sprites_bootleg()
}
}
-void psikyo_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+void psikyo_state::draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
struct sprite_t *sprite_ptr = m_sprite_ptr_pre;
u32 transmask = 0;
@@ -427,23 +428,14 @@ void psikyo_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, con
***************************************************************************/
-u16 psikyo_state::tilemap_width(u8 size)
-{
- return (0x80 * 16) >> size;
-}
-
-u32 psikyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 psikyo_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- u16 bgpen = 0;
+ u32 bgpen = 0;
int i, layers_ctrl = -1;
- u32 tmsize[2];
-
u32 scrollx[2]{ m_vregs[0x406 / 4], m_vregs[0x40e / 4] }, scrolly[2]{ m_vregs[0x402 / 4], m_vregs[0x40a / 4] };
u32 layer_ctrl[2]{ m_vregs[0x412 / 4], m_vregs[0x416 / 4] };
- tilemap_t *tmptilemap[2];
-
flip_screen_set(~m_in_dsw->read() & 0x00010000); // hardwired to a DSW bit
/* Layers enable (not quite right) */
@@ -456,7 +448,7 @@ u32 psikyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
6- 7: tilemap size
8 : per-line rowscroll
9 : per-tile rowscroll
- 10 : tilebank (btlkroad/gunbird/s1945jn only)
+ 10 : tilebank (btlkroad/gunbird/s1945n only)
11-15: ? */
/*
@@ -483,37 +475,31 @@ u32 psikyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
switch_bgbanks(layer, (layer_ctrl[layer] & 0x400) >> 10);
}
- switch ((layer_ctrl[layer] & 0x00c0) >> 6)
+ u32 new_size = ((layer_ctrl[layer] & 0x00c0) >> 6);
+ if (m_old_tmapsize[layer] != new_size)
{
- case 0: tmsize[layer] = 1; break;
- case 1: tmsize[layer] = 2; break;
- case 2: tmsize[layer] = 3; break;
- default: tmsize[layer] = 0; break;
+ m_tmapsize[layer] = new_size;
+ m_tilemap[layer]->mark_mapping_dirty();
}
- tmptilemap[layer] = m_tilemap[layer][tmsize[layer]];
-
- tmptilemap[layer]->enable(~layer_ctrl[layer] & 1);
+ m_tilemap[layer]->enable(~layer_ctrl[layer] & 1);
/* Layers scrolling */
- tmptilemap[layer]->set_scrolly(0, scrolly[layer]);
+ m_tilemap[layer]->set_scrolly(0, scrolly[layer]);
if (layer_ctrl[layer] & 0x0300) /* per-line rowscroll */
{
int tile_rowscroll = (layer_ctrl[layer] & 0x0200) >> 7; /* per-tile rowscroll */
assert(tile_rowscroll == 0 || tile_rowscroll == 4);
if (m_old_linescroll[layer] != (layer_ctrl[layer] & 0x0300))
{
- for (int i = 0; i < 4; i++)
- {
- m_tilemap[layer][i]->set_scroll_rows(tilemap_width(i));
- }
+ m_tilemap[layer]->set_scroll_rows(0x800);
m_old_linescroll[layer] = (layer_ctrl[layer] & 0x0300);
}
for (i = 0; i < 256; i++) /* 256 screen lines */
{
int x0 = ((u16 *)m_vregs.target())[BYTE_XOR_BE((layer * 0x200)/2 + (i >> tile_rowscroll))];
- tmptilemap[layer]->set_scrollx(
- (i + scrolly[layer]) % (tilemap_width(tmsize[layer])),
+ m_tilemap[layer]->set_scrollx(
+ (i + scrolly[layer]) & 0x7ff,
scrollx[layer] + x0 );
}
}
@@ -521,22 +507,19 @@ u32 psikyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
{
if (m_old_linescroll[layer] != (layer_ctrl[layer] & 0x0300))
{
- for (int i = 0; i < 4; i++)
- {
- m_tilemap[layer][i]->set_scroll_rows(1);
- }
+ m_tilemap[layer]->set_scroll_rows(1);
m_old_linescroll[layer] = (layer_ctrl[layer] & 0x0300);
}
- tmptilemap[layer]->set_scrollx(0, scrollx[layer]);
+ m_tilemap[layer]->set_scrollx(0, scrollx[layer]);
}
- tmptilemap[layer]->set_transparent_pen((layer_ctrl[layer] & 8 ? 0 : 15));
+ m_tilemap[layer]->set_transparent_pen((layer_ctrl[layer] & 8 ? 0 : 15));
}
// TODO : is this correct?
if (layers_ctrl & 1)
- bgpen = ((layer_ctrl[0] & 8) ? 0x800 : 0x80f);
+ bgpen = m_palette->pen(((layer_ctrl[0] & 8) ? 0x800 : 0x80f));
else if (layers_ctrl & 2)
- bgpen = ((layer_ctrl[1] & 8) ? 0xc00 : 0xc0f);
+ bgpen = m_palette->pen(((layer_ctrl[1] & 8) ? 0xc00 : 0xc0f));
else
bgpen = m_palette->black_pen(); // TODO
@@ -545,10 +528,10 @@ u32 psikyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
screen.priority().fill(0, cliprect);
if (layers_ctrl & 1)
- tmptilemap[0]->draw(screen, bitmap, cliprect, layer_ctrl[0] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1);
+ m_tilemap[0]->draw(screen, bitmap, cliprect, layer_ctrl[0] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1);
if (layers_ctrl & 2)
- tmptilemap[1]->draw(screen, bitmap, cliprect, layer_ctrl[1] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 2);
+ m_tilemap[1]->draw(screen, bitmap, cliprect, layer_ctrl[1] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 2);
if (layers_ctrl & 4)
draw_sprites(screen, bitmap, cliprect);
@@ -564,18 +547,14 @@ u32 psikyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
*/
-u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- u16 bgpen = 0;
+ u32 bgpen = 0;
int i, layers_ctrl = -1;
- u32 tmsize[2];
-
u32 scrollx[2]{ m_vregs[0x406 / 4], m_vregs[0x40e / 4] }, scrolly[2]{ m_vregs[0x402 / 4], m_vregs[0x40a / 4] };
u32 layer_ctrl[2]{ m_vregs[0x412 / 4], m_vregs[0x416 / 4] };
- tilemap_t *tmptilemap[2];
-
flip_screen_set(~m_in_dsw->read() & 0x00010000); // hardwired to a DSW bit
/* Layers enable (not quite right) */
@@ -588,7 +567,7 @@ u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_ind16 &bit
6- 7: tilemap size
8 : per-line rowscroll
9 : per-tile rowscroll
- 10 : tilebank (btlkroad/gunbird/s1945jn only)
+ 10 : tilebank (btlkroad/gunbird/s1945n only)
11-15: ? */
/*
@@ -615,20 +594,17 @@ u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_ind16 &bit
switch_bgbanks(layer, (layer_ctrl[layer] & 0x400) >> 10);
}
- switch ((layer_ctrl[layer] & 0x00c0) >> 6)
+ u32 new_size = ((layer_ctrl[layer] & 0x00c0) >> 6);
+ if (m_old_tmapsize[layer] != new_size)
{
- case 0: tmsize[layer] = 1; break;
- case 1: tmsize[layer] = 2; break;
- case 2: tmsize[layer] = 3; break;
- default: tmsize[layer] = 0; break;
+ m_tmapsize[layer] = new_size;
+ m_tilemap[layer]->mark_mapping_dirty();
}
- tmptilemap[layer] = m_tilemap[layer][tmsize[layer]];
-
- tmptilemap[layer]->enable(~layer_ctrl[layer] & 1);
+ m_tilemap[layer]->enable(~layer_ctrl[layer] & 1);
/* Layers scrolling */
- tmptilemap[layer]->set_scrolly(0, scrolly[layer]);
+ m_tilemap[layer]->set_scrolly(0, scrolly[layer]);
if (layer_ctrl[layer] & 0x0300) /* per-line rowscroll */
{
@@ -636,40 +612,34 @@ u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_ind16 &bit
assert(tile_rowscroll == 0 || tile_rowscroll == 4);
if (m_old_linescroll[layer] != (layer_ctrl[layer] & 0x0300))
{
- for (int i = 0; i < 4; i++)
- {
- m_tilemap[layer][i]->set_scroll_rows(tilemap_width(i));
- }
+ m_tilemap[layer]->set_scroll_rows(0x800);
m_old_linescroll[layer] = (layer_ctrl[layer] & 0x0300);
}
for (i = 0; i < 256; i++) /* 256 screen lines */
{
int x0 = ((u16 *)m_vregs.target())[BYTE_XOR_BE((layer * 0x200)/2 + (i >> tile_rowscroll))];
- tmptilemap[layer]->set_scrollx(
- (i + scrolly[layer]) % (tilemap_width(tmsize[layer])),
- scrollx[layer] + x0 );
+ m_tilemap[layer]->set_scrollx(
+ (i + scrolly[layer]) & 0x7ff,
+ scrollx[layer] + x0);
}
}
else
{
if (m_old_linescroll[layer] != (layer_ctrl[layer] & 0x0300))
{
- for (int i = 0; i < 4; i++)
- {
- m_tilemap[layer][i]->set_scroll_rows(1);
- }
+ m_tilemap[layer]->set_scroll_rows(1);
m_old_linescroll[layer] = (layer_ctrl[layer] & 0x0300);
}
- tmptilemap[layer]->set_scrollx(0, scrollx[layer]);
+ m_tilemap[layer]->set_scrollx(0, scrollx[layer]);
}
- tmptilemap[layer]->set_transparent_pen((layer_ctrl[layer] & 8 ? 0 : 15));
+ m_tilemap[layer]->set_transparent_pen((layer_ctrl[layer] & 8 ? 0 : 15));
}
// TODO : is this correct?
if (layers_ctrl & 1)
- bgpen = ((layer_ctrl[0] & 8) ? 0x800 : 0x80f);
+ bgpen = m_palette->pen(((layer_ctrl[0] & 8) ? 0x800 : 0x80f));
else if (layers_ctrl & 2)
- bgpen = ((layer_ctrl[1] & 8) ? 0xc00 : 0xc0f);
+ bgpen = m_palette->pen(((layer_ctrl[1] & 8) ? 0xc00 : 0xc0f));
else
bgpen = m_palette->black_pen(); // TODO
@@ -678,10 +648,10 @@ u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_ind16 &bit
screen.priority().fill(0, cliprect);
if (layers_ctrl & 1)
- tmptilemap[0]->draw(screen, bitmap, cliprect, layer_ctrl[0] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1);
+ m_tilemap[0]->draw(screen, bitmap, cliprect, layer_ctrl[0] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1);
if (layers_ctrl & 2)
- tmptilemap[1]->draw(screen, bitmap, cliprect, layer_ctrl[1] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 2);
+ m_tilemap[1]->draw(screen, bitmap, cliprect, layer_ctrl[1] & 2 ? TILEMAP_DRAW_OPAQUE : 0, 2);
if (layers_ctrl & 4)
draw_sprites(screen, bitmap, cliprect);
diff --git a/src/mame/video/sshangha.cpp b/src/mame/video/sshangha.cpp
index b8f4aac1cb3..7d0fe0d43ad 100644
--- a/src/mame/video/sshangha.cpp
+++ b/src/mame/video/sshangha.cpp
@@ -54,21 +54,20 @@ uint32_t sshangha_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
// TODO: fully verify draw order / priorities
/* the tilemap 4bpp + 4bpp = 8bpp mixing actually seems external to the tilemap, note video_control is not part of the tilemap chip */
- if (combine_tilemaps) {
- m_tilegen->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 0, 1);
- }
- else {
+ if (combine_tilemaps)
+ m_tilegen->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 0);
+ else
m_tilegen->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
- }
+
// pri, primask,palbase,palmask
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x000, 0x000, 0x000, 0x0ff); // low+high pri spr1 (definitely needs to be below low pri spr2 - game tiles & definitely needs to be below tilemap1 - lightning on win screen in traditional mode)
- m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x200, 0x200, 0x100, 0x0ff); // low pri spr2 (definitely needs to be below tilemap1 - 2nd level failure screen etc.)
+ m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x000, 0x000, 0x200, 0x0ff); // low+high pri spr1 (definitely needs to be below low pri spr2 - game tiles & definitely needs to be below tilemap1 - lightning on win screen in traditional mode)
+ m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x200, 0x200, 0x000, 0x0ff); // low pri spr2 (definitely needs to be below tilemap1 - 2nd level failure screen etc.)
if (!combine_tilemaps)
m_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
// pri, primask,palbase,palmask
- m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x000, 0x200, 0x100, 0x0ff); // high pri spr2 (definitely needs to be above tilemap1 - title logo)
+ m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x000, 0x200, 0x000, 0x0ff); // high pri spr2 (definitely needs to be above tilemap1 - title logo)
return 0;
}
diff --git a/src/mame/video/ssv.cpp b/src/mame/video/ssv.cpp
index 1bbfd96cab8..b1cd23169d3 100644
--- a/src/mame/video/ssv.cpp
+++ b/src/mame/video/ssv.cpp
@@ -212,37 +212,37 @@ void ssv_state::video_start()
save_item(NAME(m_shadow_pen_shift));
}
-VIDEO_START_MEMBER(ssv_state,eaglshot)
+void eaglshot_state::video_start()
{
ssv_state::video_start();
- m_eaglshot_gfxram = std::make_unique<uint16_t[]>(16 * 0x40000 / 2);
+ m_gfxram = std::make_unique<uint16_t[]>(16 * 0x40000 / 2);
- m_gfxdecode->gfx(0)->set_source((uint8_t *)m_eaglshot_gfxram.get());
+ m_gfxdecode->gfx(0)->set_source((uint8_t *)m_gfxram.get());
- save_pointer(NAME(m_eaglshot_gfxram), 16 * 0x40000 / 2);
+ save_pointer(NAME(m_gfxram), 16 * 0x40000 / 2);
}
-TILE_GET_INFO_MEMBER(ssv_state::get_tile_info_0)
+TILE_GET_INFO_MEMBER(gdfs_state::get_tile_info_0)
{
- uint16_t tile = m_gdfs_tmapram[tile_index];
+ uint16_t tile = m_tmapram[tile_index];
tileinfo.set(1, tile, 0, TILE_FLIPXY( tile >> 14 ));
}
-WRITE16_MEMBER(ssv_state::gdfs_tmapram_w)
+void gdfs_state::tmapram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
- COMBINE_DATA(&m_gdfs_tmapram[offset]);
- m_gdfs_tmap->mark_tile_dirty(offset);
+ COMBINE_DATA(&m_tmapram[offset]);
+ m_tmap->mark_tile_dirty(offset);
}
-VIDEO_START_MEMBER(ssv_state,gdfs)
+void gdfs_state::video_start()
{
ssv_state::video_start();
- m_gdfs_tmap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ssv_state::get_tile_info_0)), TILEMAP_SCAN_ROWS, 16,16, 0x100,0x100);
+ m_tmap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gdfs_state::get_tile_info_0)), TILEMAP_SCAN_ROWS, 16,16, 0x100,0x100);
- m_gdfs_tmap->set_transparent_pen(0);
+ m_tmap->set_transparent_pen(0);
}
/***************************************************************************
@@ -939,21 +939,21 @@ void ssv_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
***************************************************************************/
-uint32_t ssv_state::screen_update_eaglshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t eaglshot_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- return screen_update(screen, bitmap, cliprect);
+ return ssv_state::screen_update(screen, bitmap, cliprect);
}
-uint32_t ssv_state::screen_update_gdfs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t gdfs_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- screen_update(screen, bitmap, cliprect);
+ ssv_state::screen_update(screen, bitmap, cliprect);
// draw zooming sprites
- m_gdfs_st0020->update_screen(screen, bitmap, cliprect, false);
+ m_st0020->update_screen(screen, bitmap, cliprect, false);
- m_gdfs_tmap->set_scrollx(0, m_gdfs_tmapscroll[0x0c/2]);
- m_gdfs_tmap->set_scrolly(0, m_gdfs_tmapscroll[0x10/2]);
- m_gdfs_tmap->draw(screen, bitmap, cliprect, 0, 0);
+ m_tmap->set_scrollx(0, m_tmapscroll[0x0c/2]);
+ m_tmap->set_scrolly(0, m_tmapscroll[0x10/2]);
+ m_tmap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
diff --git a/src/mame/video/tmap038.cpp b/src/mame/video/tmap038.cpp
index 4725d38ce35..d12e5c2d9d1 100644
--- a/src/mame/video/tmap038.cpp
+++ b/src/mame/video/tmap038.cpp
@@ -138,6 +138,10 @@ tilemap038_device::tilemap038_device(const machine_config &mconfig, const char *
, m_gfxdecode(*this, finder_base::DUMMY_TAG)
, m_gfxno(0)
, m_038_cb(*this)
+ , m_xoffs(0)
+ , m_flipped_xoffs(0)
+ , m_yoffs(0)
+ , m_flipped_yoffs(0)
{
}
diff --git a/src/mame/video/tmap038.h b/src/mame/video/tmap038.h
index 3a0773c24cf..28076199641 100644
--- a/src/mame/video/tmap038.h
+++ b/src/mame/video/tmap038.h
@@ -23,6 +23,8 @@ public:
template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
template <typename... T> void set_tile_callback(T &&... args) { m_038_cb.set(std::forward<T>(args)...); }
void set_gfx(u16 no) { m_gfxno = no; }
+ void set_xoffs(int xoffs, int flipped_xoffs) { m_xoffs = xoffs; m_flipped_xoffs = flipped_xoffs; }
+ void set_yoffs(int yoffs, int flipped_yoffs) { m_yoffs = yoffs; m_flipped_yoffs = flipped_yoffs; }
// call to do the rendering etc.
template<class _BitmapClass>
@@ -71,12 +73,12 @@ public:
// vregs
bool flipx() const { return BIT(~m_vregs[0], 15); }
bool rowscroll_en() const { return BIT(m_vregs[0], 14) && (m_lineram != nullptr); }
- u16 scrollx() const { return m_vregs[0] & 0x1ff; }
+ int scrollx() const { return (m_vregs[0] & 0x1ff) + (flipx() ? m_flipped_xoffs : m_xoffs); }
bool flipy() const { return BIT(~m_vregs[1], 15); }
bool rowselect_en() const { return BIT(m_vregs[1], 14) && (m_lineram != nullptr); }
bool tiledim() const { return m_tiledim; }
- u16 scrolly() const { return m_vregs[1] & 0x1ff; }
+ int scrolly() const { return (m_vregs[1] & 0x1ff) + (flipy() ? m_flipped_yoffs : m_yoffs); }
bool enable() const { return BIT(~m_vregs[2], 4); }
u16 external() const { return m_vregs[2] & 0xf; }
@@ -101,6 +103,9 @@ private:
tmap038_cb_delegate m_038_cb;
tilemap_t* m_tmap;
+
+ int m_xoffs, m_flipped_xoffs;
+ int m_yoffs, m_flipped_yoffs;
};
diff --git a/src/mame/video/vc4000.cpp b/src/mame/video/vc4000.cpp
index 63be0c8015c..49723216c22 100644
--- a/src/mame/video/vc4000.cpp
+++ b/src/mame/video/vc4000.cpp
@@ -641,7 +641,7 @@ INTERRUPT_GEN_MEMBER(vc4000_state::vc4000_video_line)
(m_video.sprites[1].finished_now) |
(m_video.sprites[0].finished_now)) && (!m_irq_pause))
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 3); // S2650
+ m_maincpu->set_input_line(0, ASSERT_LINE);
m_irq_pause=1;
}
}
diff --git a/src/mame/video/zac2650.cpp b/src/mame/video/zac2650.cpp
index 81cd781083f..c0ed41cd4cf 100644
--- a/src/mame/video/zac2650.cpp
+++ b/src/mame/video/zac2650.cpp
@@ -35,7 +35,7 @@ WRITE8_MEMBER(zac2650_state::zac_s2636_w)
m_gfxdecode->gfx(2)->mark_dirty(offset/8);
if (offset == 0xc7)
{
- m_s2636->write_data(space, offset, data);
+ m_s2636->write_data(offset, data);
}
}
diff --git a/src/osd/modules/debugger/qt/debuggerview.cpp b/src/osd/modules/debugger/qt/debuggerview.cpp
index 7dc16c0a3de..150ca8519c5 100644
--- a/src/osd/modules/debugger/qt/debuggerview.cpp
+++ b/src/osd/modules/debugger/qt/debuggerview.cpp
@@ -10,6 +10,9 @@
#include "modules/lib/osdobj_common.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
+#define horizontalAdvance width
+#endif
DebuggerView::DebuggerView(const debug_view_type& type,
running_machine* machine,
@@ -49,7 +52,7 @@ void DebuggerView::paintEvent(QPaintEvent* event)
{
// Tell the MAME debug view how much real estate is available
QFontMetrics actualFont = fontMetrics();
- const double fontWidth = actualFont.width(QString(100, '_')) / 100.;
+ const double fontWidth = actualFont.horizontalAdvance(QString(100, '_')) / 100.;
const int fontHeight = std::max(1, actualFont.lineSpacing());
m_view->set_visible_size(debug_view_xy(width()/fontWidth, height()/fontHeight));
@@ -240,7 +243,7 @@ void DebuggerView::mousePressEvent(QMouseEvent* event)
if (event->button() == Qt::LeftButton)
{
QFontMetrics actualFont = fontMetrics();
- const double fontWidth = actualFont.width(QString(100, '_')) / 100.;
+ const double fontWidth = actualFont.horizontalAdvance(QString(100, '_')) / 100.;
const int fontHeight = std::max(1, actualFont.lineSpacing());
debug_view_xy topLeft = m_view->visible_position();
diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp
index 6c95e04df80..2124effcbbd 100644
--- a/src/osd/modules/debugger/qt/memorywindow.cpp
+++ b/src/osd/modules/debugger/qt/memorywindow.cpp
@@ -18,6 +18,9 @@
#include "debug/debugcon.h"
#include "debug/debugcpu.h"
+#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
+#define horizontalAdvance width
+#endif
MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) :
WindowQt(machine, nullptr)
@@ -334,7 +337,7 @@ void DebuggerMemView::mousePressEvent(QMouseEvent* event)
if (leftClick || rightClick)
{
QFontMetrics actualFont = fontMetrics();
- const double fontWidth = actualFont.width(QString(100, '_')) / 100.;
+ const double fontWidth = actualFont.horizontalAdvance(QString(100, '_')) / 100.;
const int fontHeight = std::max(1, actualFont.lineSpacing());
debug_view_xy topLeft = view()->visible_position();
diff --git a/src/tools/jedutil.cpp b/src/tools/jedutil.cpp
index 49b5d00cd38..c342d1bbef9 100644
--- a/src/tools/jedutil.cpp
+++ b/src/tools/jedutil.cpp
@@ -94,11 +94,12 @@
PAL20X8 = QP24 QF1600
PAL20X10 = QP24 QF1600
- PAL22V10 = QP24 QF5828?
-
GAL20V8A = QP24 QF2706
GAL22V10 = QP24 QF5892
+ PALCE22V10 = QP24 QF5828
+ PAL22V10 = QP24 QF5828
+
28-pin devices:
PLS100 = QP28 QF1928 (Tri-State)
82S100 = QP20 QF1928 (Tri-State)
@@ -290,6 +291,7 @@ static void print_pal20ra10_product_terms(const pal_data* pal, const jed_data* j
static void print_pal20x4_product_terms(const pal_data* pal, const jed_data* jed);
static void print_pal20x8_product_terms(const pal_data* pal, const jed_data* jed);
static void print_pal20x10_product_terms(const pal_data* pal, const jed_data* jed);
+static void print_palce22v10_pal22v10_product_terms(const pal_data* pal, const jed_data* jed);
static void print_82s153_pls153_product_terms(const pal_data* pal, const jed_data* jed);
static void print_ck2605_product_terms(const pal_data* pal, const jed_data* jed);
#if defined(ricoh_pals)
@@ -353,6 +355,7 @@ static void config_pal20ra10_pins(const pal_data* pal, const jed_data* jed);
static void config_pal20x4_pins(const pal_data* pal, const jed_data* jed);
static void config_pal20x8_pins(const pal_data* pal, const jed_data* jed);
static void config_pal20x10_pins(const pal_data* pal, const jed_data* jed);
+static void config_palce22v10_pal22v10_pins(const pal_data* pal, const jed_data* jed);
static void config_82s153_pls153_pins(const pal_data* pal, const jed_data* jed);
static void config_ck2605_pins(const pal_data* pal, const jed_data* jed);
#if defined(ricoh_pals)
@@ -665,6 +668,18 @@ static pin_fuse_rows pal20x10pinfuserows[] = {
{22, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 280}, /* Registered Output */
{23, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 120}}; /* Registered Output */
+static pin_fuse_rows palce22v10_pal22v10pinfuserows[] = {
+ {14, 5368, 5412, 5720},
+ {15, 4884, 4928, 5324},
+ {16, 4312, 4356, 4840},
+ {17, 3652, 3696, 4268},
+ {18, 2904, 2948, 3608},
+ {19, 2156, 2200, 2860},
+ {20, 1496, 1540, 2112},
+ {21, 924, 968, 1452},
+ {22, 440, 484, 880},
+ {23, 44, 88, 396}};
+
static pin_fuse_rows _82s153_pls153pinfuserows[] = {
{9, 1472, 0, 0},
{11, 1508, 0, 0},
@@ -1456,6 +1471,30 @@ static pin_fuse_columns pal20x10pinfusecolumns[] = {
{23, 3, 2}
};
+static pin_fuse_columns palce22v10_pal22v10pinfusecolumns[] = {
+ {1, 1, 0},
+ {2, 5, 4},
+ {3, 9, 8},
+ {4, 13, 12},
+ {5, 17, 16},
+ {6, 21, 20},
+ {7, 25, 24},
+ {8, 29, 28},
+ {9, 33, 32},
+ {10, 37, 36},
+ {11, 41, 40},
+ {13, 43, 42},
+ {14, 39, 38},
+ {15, 35, 34},
+ {16, 31, 30},
+ {17, 27, 26},
+ {18, 23, 22},
+ {19, 19, 18},
+ {20, 15, 14},
+ {21, 11, 10},
+ {22, 7, 6},
+ {23, 3, 2}};
+
static pin_fuse_columns _82s153_pls153pinfusecolumns[] = {
{1, 1, 0},
{2, 3, 2},
@@ -2167,9 +2206,22 @@ static pal_data paldata[] = {
config_pal20x10_pins,
nullptr,
nullptr},
- /*{"PAL22V10", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
- {"GAL20V8A", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
+ /*{"GAL20V8A", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
{"GAL22V10", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
+ {"PAL22V10", 5828,
+ palce22v10_pal22v10pinfuserows, ARRAY_LENGTH(palce22v10_pal22v10pinfuserows),
+ palce22v10_pal22v10pinfusecolumns, ARRAY_LENGTH(palce22v10_pal22v10pinfusecolumns),
+ print_palce22v10_pal22v10_product_terms,
+ config_palce22v10_pal22v10_pins,
+ nullptr,
+ nullptr},
+ {"PALCE22V10", 5828,
+ palce22v10_pal22v10pinfuserows, ARRAY_LENGTH(palce22v10_pal22v10pinfuserows),
+ palce22v10_pal22v10pinfusecolumns, ARRAY_LENGTH(palce22v10_pal22v10pinfusecolumns),
+ print_palce22v10_pal22v10_product_terms,
+ config_palce22v10_pal22v10_pins,
+ nullptr,
+ nullptr},
{"82S153", 1842,
_82s153_pls153pinfuserows, ARRAY_LENGTH(_82s153_pls153pinfuserows),
_82s153_pls153pinfusecolumns, ARRAY_LENGTH(_82s153_pls153pinfusecolumns),
@@ -3710,6 +3762,42 @@ static void print_pal20x10_product_terms(const pal_data* pal, const jed_data* je
/*-------------------------------------------------
+ print_palce22v10_pal22v10_product_terms - prints the product
+ terms for a PALCE22V10 and PAL22V10
+-------------------------------------------------*/
+
+static void print_palce22v10_pal22v10_product_terms(const pal_data* pal, const jed_data* jed)
+{
+ char buffer[200];
+
+ print_product_terms(pal, jed);
+
+ /* Synchronous Preset */
+
+ generate_product_terms(pal, jed, 5764, buffer);
+
+ if (strlen(buffer))
+ {
+ printf("Synchronous Preset:\n\n");
+ printf("%s\n", buffer);
+ printf("\n");
+ }
+
+ /* Asynchronous Reset */
+
+ generate_product_terms(pal, jed, 0, buffer);
+
+ if (strlen(buffer))
+ {
+ printf("Asynchronous Reset:\n\n");
+ printf("%s\n", buffer);
+ printf("\n");
+ }
+}
+
+
+
+/*-------------------------------------------------
print_82s153_pls153_product_terms - prints the product
terms for a 82S153/PLS153
-------------------------------------------------*/
@@ -5930,6 +6018,87 @@ static void config_pal20x10_pins(const pal_data* pal, const jed_data* jed)
/*-------------------------------------------------
+ config_palce22v10_pal22v10_pins - configures the pins for
+ a PALCE22V10
+-------------------------------------------------*/
+
+static void config_palce22v10_pal22v10_pins(const pal_data* pal, const jed_data* jed)
+{
+ typedef struct _output_logic_macrocell output_logic_macrocell;
+ struct _output_logic_macrocell
+ {
+ uint16_t pin;
+ uint16_t s0_fuse; /* output polarity (0 - low, 1 - high) */
+ uint16_t s1_fuse; /* registers allowed (0 - registered, 1 - not registered) */
+ };
+
+ static output_logic_macrocell macrocells[] = {
+ {14, 5826, 5827},
+ {15, 5824, 5825},
+ {16, 5822, 5823},
+ {17, 5820, 5821},
+ {18, 5818, 5819},
+ {19, 5816, 5817},
+ {20, 5814, 5815},
+ {21, 5812, 5813},
+ {22, 5810, 5811},
+ {23, 5808, 5809}};
+ static uint16_t input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
+ pin_output_config output_pins[ARRAY_LENGTH(macrocells)];
+ uint16_t index, output_pin_count;
+
+ output_pin_count = 0;
+
+ for (index = 0; index < ARRAY_LENGTH(output_pins); ++index)
+ {
+ if (jed_get_fuse(jed, macrocells[index].s1_fuse))
+ {
+ /* Combinatorial output or dedicated input */
+
+ if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
+ {
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
+
+ if (!jed_get_fuse(jed, macrocells[index].s0_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ }
+ else
+ {
+ /* Registered output */
+
+ output_pins[output_pin_count].pin = macrocells[index].pin;
+ output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED;
+
+ if (!jed_get_fuse(jed, macrocells[index].s0_fuse))
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
+ }
+ else
+ {
+ output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
+ }
+
+ ++output_pin_count;
+ }
+ }
+
+ set_input_pins(input_pins, ARRAY_LENGTH(input_pins));
+ set_output_pins(output_pins, output_pin_count);
+}
+
+
+
+/*-------------------------------------------------
config_82s153_pls153_pins - configures the pins for
a 82S153/PLS153
-------------------------------------------------*/
@@ -7323,6 +7492,8 @@ static int print_usage()
" jedutil -view <source.jed> <device> -- dump JED logic equations\n"
" jedutil -view <source.bin> <device> -- dump binary logic equations\n"
" jedutil -viewlist -- view list of supported devices\n"
+ " jedutil -listcompatible <source.jed> -- list compatible devices\n"
+ " jedutil -listcompatible <source.bin> -- list compatible devices\n"
);
return 0;
@@ -7577,6 +7748,77 @@ static int command_viewlist(int argc, char *argv[])
}
+
+/*-------------------------------------------------
+ command_listcompatible - views the list of
+ compatible devices
+-------------------------------------------------*/
+
+static int command_listcompatible(int argc, char *argv[])
+{
+ int result = 0;
+ const char *srcfile;
+ int is_jed;
+ jed_data jed;
+ int err;
+ int index;
+
+ if (argc != 1)
+ {
+ return print_usage();
+ }
+
+ /* extract arguments */
+ srcfile = argv[0];
+
+ /* does the source end in '.jed'? */
+ is_jed = is_jed_file(srcfile);
+
+ /* read the source file */
+ err = read_source_file(srcfile);
+ if (err != 0)
+ {
+ result = 1;
+ goto end;
+ }
+
+ /* if the source is JED, convert to binary */
+ if (is_jed)
+ {
+ /* read the JEDEC data */
+ err = jed_parse(srcbuf, srcbuflen, &jed);
+ switch (err)
+ {
+ case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid .JED file\n"); result = 1; goto end;
+ case JEDERR_BAD_XMIT_SUM: fprintf(stderr, "Fatal error: Bad transmission checksum\n"); result = 1; goto end;
+ case JEDERR_BAD_FUSE_SUM: fprintf(stderr, "Fatal error: Bad fusemap checksum\n"); result = 1; goto end;
+ }
+ }
+ else
+ {
+ /* read the binary data */
+ err = jedbin_parse(srcbuf, srcbuflen, &jed);
+ switch (err)
+ {
+ case JEDERR_INVALID_DATA: fprintf(stderr, "Fatal error: Invalid binary JEDEC file\n"); result = 1; goto end;
+ }
+ }
+
+ for (index = 0; index < ARRAY_LENGTH(paldata); ++index)
+ {
+ if (paldata[index].numfuses == jed.numfuses)
+ {
+ printf("%s\n", paldata[index].name);
+ }
+ }
+
+end:
+ free(srcbuf);
+ return result;
+}
+
+
+
/*-------------------------------------------------
main - primary entry point
-------------------------------------------------*/
@@ -7584,9 +7826,10 @@ static int command_viewlist(int argc, char *argv[])
int main(int argc, char *argv[])
{
command_entry command_entries[] = {
- {"-convert", &command_convert},
- {"-view", &command_view},
- {"-viewlist", &command_viewlist}};
+ {"-convert", &command_convert},
+ {"-view", &command_view},
+ {"-viewlist", &command_viewlist},
+ {"-listcompatible", &command_listcompatible}};
int index;
if (argc < 2)
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index d82d2cf5792..7f8a34190a1 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -16,7 +16,6 @@ using util::BIT;
#include "cpu/8x300/8x300dasm.h"
#include "cpu/adsp2100/2100dasm.h"
-#include "cpu/alph8201/8201dasm.h"
#include "cpu/alpha/alphad.h"
#include "cpu/alto2/alto2dsm.h"
#include "cpu/am29000/am29dasm.h"
@@ -58,6 +57,7 @@ using util::BIT;
#include "cpu/h8/h8hd.h"
#include "cpu/h8/h8s2000d.h"
#include "cpu/h8/h8s2600d.h"
+#include "cpu/h8500/h8500dasm.h"
#include "cpu/hcd62121/hcd62121d.h"
#include "cpu/hd61700/hd61700d.h"
#include "cpu/hmcs40/hmcs40d.h"
@@ -116,6 +116,7 @@ using util::BIT;
#include "cpu/pdp1/pdp1dasm.h"
#include "cpu/pdp1/tx0dasm.h"
#include "cpu/pdp8/pdp8dasm.h"
+#include "cpu/pic16/pic16d.h"
#include "cpu/pic16c5x/16c5xdsm.h"
#include "cpu/pic16c62x/16c62xdsm.h"
#include "cpu/powerpc/ppc_dasm.h"
@@ -160,6 +161,7 @@ using util::BIT;
#include "cpu/tms9900/tms99com.h"
#include "cpu/ucom4/ucom4d.h"
#include "cpu/unsp/unspdasm.h"
+#include "cpu/upd177x/upd177xd.h"
#include "cpu/upd7725/dasm7725.h"
#include "cpu/upd7810/upd7810_dasm.h"
#include "cpu/upd78k/upd78k0d.h"
@@ -331,7 +333,6 @@ static const dasm_table_entry dasm_table[] =
{ "alpha_nt", le, 0, []() -> util::disasm_interface * { return new alpha_disassembler(alpha_disassembler::TYPE_NT); } },
{ "alpha_unix", le, 0, []() -> util::disasm_interface * { return new alpha_disassembler(alpha_disassembler::TYPE_UNIX); } },
{ "alpha_vms", le, 0, []() -> util::disasm_interface * { return new alpha_disassembler(alpha_disassembler::TYPE_VMS); } },
- { "alpha8201", le, 0, []() -> util::disasm_interface * { return new alpha8201_disassembler; } },
{ "alto2", be, -2, []() -> util::disasm_interface * { return new alto2_disassembler; } },
{ "am29000", be, 0, []() -> util::disasm_interface * { return new am29000_disassembler; } },
{ "amis2000", le, 0, []() -> util::disasm_interface * { return new amis2000_disassembler; } },
@@ -385,6 +386,7 @@ static const dasm_table_entry dasm_table[] =
{ "h8h", be, 0, []() -> util::disasm_interface * { return new h8h_disassembler; } },
{ "h8s2000", be, 0, []() -> util::disasm_interface * { return new h8s2000_disassembler; } },
{ "h8s2600", be, 0, []() -> util::disasm_interface * { return new h8s2600_disassembler; } },
+ { "h8500", be, 0, []() -> util::disasm_interface * { return new h8500_disassembler; } },
{ "hc11", be, 0, []() -> util::disasm_interface * { return new hc11_disassembler; } },
{ "hcd62121", le, 0, []() -> util::disasm_interface * { return new hcd62121_disassembler; } },
{ "hd61700", le, -1, []() -> util::disasm_interface * { return new hd61700_disassembler; } },
@@ -467,6 +469,7 @@ static const dasm_table_entry dasm_table[] =
{ "patinho_feio", le, 0, []() -> util::disasm_interface * { return new patinho_feio_disassembler; } },
{ "pdp1", be, 0, []() -> util::disasm_interface * { return new pdp1_disassembler; } },
{ "pdp8", be, 0, []() -> util::disasm_interface * { return new pdp8_disassembler; } },
+ { "pic16", le, -1, []() -> util::disasm_interface * { return new pic16_disassembler; } },
{ "pic16c5x", le, -1, []() -> util::disasm_interface * { return new pic16c5x_disassembler; } },
{ "pic16c62x", le, -1, []() -> util::disasm_interface * { return new pic16c62x_disassembler; } },
{ "powerpc", be, 0, []() -> util::disasm_interface * { return new powerpc_disassembler; } },
@@ -537,6 +540,7 @@ static const dasm_table_entry dasm_table[] =
{ "unsp10", be, -1, []() -> util::disasm_interface * { return new unsp_disassembler; } },
{ "unsp12", be, -1, []() -> util::disasm_interface * { return new unsp_12_disassembler; } },
{ "unsp20", be, -1, []() -> util::disasm_interface * { return new unsp_20_disassembler; } },
+ { "upd177x", be, -1, []() -> util::disasm_interface * { return new upd177x_disassembler; } },
{ "upd7725", be, -2, []() -> util::disasm_interface * { return new necdsp_disassembler; } },
{ "upd7801", le, 0, []() -> util::disasm_interface * { return new upd7801_disassembler; } },
{ "upd78c05", le, 0, []() -> util::disasm_interface * { return new upd78c05_disassembler; } },