summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/mame/machine
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/mame/machine')
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.cpp20
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.h28
-rw-r--r--src/mame/machine/315-5881_crypt.cpp48
-rw-r--r--src/mame/machine/315-5881_crypt.h40
-rw-r--r--src/mame/machine/315_5296.cpp2
-rw-r--r--src/mame/machine/315_5296.h10
-rw-r--r--src/mame/machine/3do.cpp58
-rw-r--r--src/mame/machine/6883sam.cpp26
-rw-r--r--src/mame/machine/6883sam.h78
-rw-r--r--src/mame/machine/abc1600mac.cpp48
-rw-r--r--src/mame/machine/abc1600mac.h32
-rw-r--r--src/mame/machine/abc80kb.cpp4
-rw-r--r--src/mame/machine/abc80kb.h4
-rw-r--r--src/mame/machine/ac1.cpp50
-rw-r--r--src/mame/machine/acitya.cpp10
-rw-r--r--src/mame/machine/advision.cpp6
-rw-r--r--src/mame/machine/aim65.cpp14
-rw-r--r--src/mame/machine/ajax.cpp4
-rw-r--r--src/mame/machine/alpha8201.cpp6
-rw-r--r--src/mame/machine/alpha8201.h10
-rw-r--r--src/mame/machine/amiga.cpp98
-rw-r--r--src/mame/machine/amigakbd.cpp6
-rw-r--r--src/mame/machine/amigakbd.h12
-rw-r--r--src/mame/machine/amstrad.cpp114
-rw-r--r--src/mame/machine/apollo.cpp78
-rw-r--r--src/mame/machine/apollo_dbg.cpp42
-rw-r--r--src/mame/machine/apollo_kbd.cpp36
-rw-r--r--src/mame/machine/apollo_kbd.h32
-rw-r--r--src/mame/machine/apple2.cpp60
-rw-r--r--src/mame/machine/apple2gs.cpp98
-rw-r--r--src/mame/machine/apple3.cpp34
-rw-r--r--src/mame/machine/apricotkb.cpp8
-rw-r--r--src/mame/machine/apricotkb.h6
-rw-r--r--src/mame/machine/archimds.cpp52
-rw-r--r--src/mame/machine/arkanoid.cpp14
-rw-r--r--src/mame/machine/asic65.cpp82
-rw-r--r--src/mame/machine/asic65.h28
-rw-r--r--src/mame/machine/asteroid.cpp4
-rw-r--r--src/mame/machine/at.cpp20
-rw-r--r--src/mame/machine/at.h22
-rw-r--r--src/mame/machine/atari400.cpp4
-rw-r--r--src/mame/machine/atari_vg.cpp2
-rw-r--r--src/mame/machine/atari_vg.h2
-rw-r--r--src/mame/machine/atarifdc.cpp42
-rw-r--r--src/mame/machine/atarifdc.h14
-rw-r--r--src/mame/machine/atarigen.cpp38
-rw-r--r--src/mame/machine/atarigen.h64
-rw-r--r--src/mame/machine/atarixga.cpp58
-rw-r--r--src/mame/machine/atarixga.h22
-rw-r--r--src/mame/machine/awboard.cpp30
-rw-r--r--src/mame/machine/awboard.h30
-rw-r--r--src/mame/machine/b2m.cpp20
-rw-r--r--src/mame/machine/bagman.cpp8
-rw-r--r--src/mame/machine/balsente.cpp30
-rw-r--r--src/mame/machine/bbc.cpp26
-rw-r--r--src/mame/machine/bebox.cpp92
-rw-r--r--src/mame/machine/beezer.cpp2
-rw-r--r--src/mame/machine/beta.cpp4
-rw-r--r--src/mame/machine/beta.h4
-rw-r--r--src/mame/machine/bfm_bd1.cpp6
-rw-r--r--src/mame/machine/bfm_bd1.h26
-rw-r--r--src/mame/machine/bfm_bda.cpp6
-rw-r--r--src/mame/machine/bfm_bda.h26
-rw-r--r--src/mame/machine/bfm_comn.cpp18
-rw-r--r--src/mame/machine/bfm_comn.h2
-rw-r--r--src/mame/machine/bfm_sc45_helper.cpp46
-rw-r--r--src/mame/machine/bk.cpp4
-rw-r--r--src/mame/machine/bonzeadv.cpp20
-rw-r--r--src/mame/machine/btime.cpp4
-rw-r--r--src/mame/machine/bublbobl.cpp2
-rw-r--r--src/mame/machine/buggychl.cpp2
-rw-r--r--src/mame/machine/buggychl.h24
-rw-r--r--src/mame/machine/c117.cpp8
-rw-r--r--src/mame/machine/c117.h10
-rw-r--r--src/mame/machine/carpolo.cpp8
-rw-r--r--src/mame/machine/cat702.cpp18
-rw-r--r--src/mame/machine/cat702.h12
-rw-r--r--src/mame/machine/cbm_snqk.cpp10
-rw-r--r--src/mame/machine/cbm_snqk.h4
-rw-r--r--src/mame/machine/cchip.cpp2
-rw-r--r--src/mame/machine/cclimber.cpp20
-rw-r--r--src/mame/machine/cdi070.cpp60
-rw-r--r--src/mame/machine/cdi070.h138
-rw-r--r--src/mame/machine/cdicdic.cpp296
-rw-r--r--src/mame/machine/cdicdic.h52
-rw-r--r--src/mame/machine/cdislave.cpp18
-rw-r--r--src/mame/machine/cdislave.h34
-rw-r--r--src/mame/machine/chaknpop.cpp6
-rw-r--r--src/mame/machine/coco.cpp46
-rw-r--r--src/mame/machine/coco12.cpp14
-rw-r--r--src/mame/machine/coco3.cpp8
-rw-r--r--src/mame/machine/coco_vhd.cpp24
-rw-r--r--src/mame/machine/coco_vhd.h14
-rw-r--r--src/mame/machine/compiskb.cpp6
-rw-r--r--src/mame/machine/compiskb.h6
-rw-r--r--src/mame/machine/concept.cpp8
-rw-r--r--src/mame/machine/cps2crypt.cpp46
-rw-r--r--src/mame/machine/cuda.cpp8
-rw-r--r--src/mame/machine/cuda.h34
-rw-r--r--src/mame/machine/cx4data.hxx10
-rw-r--r--src/mame/machine/cx4fn.hxx104
-rw-r--r--src/mame/machine/cx4oam.hxx80
-rw-r--r--src/mame/machine/cx4ops.hxx34
-rw-r--r--src/mame/machine/cybiko.cpp20
-rw-r--r--src/mame/machine/dai.cpp4
-rw-r--r--src/mame/machine/dc-ctrl.cpp16
-rw-r--r--src/mame/machine/dc-ctrl.h10
-rw-r--r--src/mame/machine/dc.cpp54
-rw-r--r--src/mame/machine/dccons.cpp2
-rw-r--r--src/mame/machine/dec0.cpp6
-rw-r--r--src/mame/machine/dec_lk201.cpp26
-rw-r--r--src/mame/machine/dec_lk201.h44
-rw-r--r--src/mame/machine/deco102.cpp12
-rw-r--r--src/mame/machine/deco102.h2
-rw-r--r--src/mame/machine/deco104.cpp2
-rw-r--r--src/mame/machine/deco104.h2
-rw-r--r--src/mame/machine/deco146.cpp40
-rw-r--r--src/mame/machine/deco146.h66
-rw-r--r--src/mame/machine/deco156.cpp6
-rw-r--r--src/mame/machine/deco222.cpp8
-rw-r--r--src/mame/machine/deco222.h8
-rw-r--r--src/mame/machine/decocass.cpp74
-rw-r--r--src/mame/machine/decocass_tape.cpp26
-rw-r--r--src/mame/machine/decocass_tape.h20
-rw-r--r--src/mame/machine/decocpu6.cpp4
-rw-r--r--src/mame/machine/decocpu6.h4
-rw-r--r--src/mame/machine/decocpu7.cpp8
-rw-r--r--src/mame/machine/decocpu7.h6
-rw-r--r--src/mame/machine/decocrpt.cpp22
-rw-r--r--src/mame/machine/decopincpu.cpp18
-rw-r--r--src/mame/machine/decopincpu.h14
-rw-r--r--src/mame/machine/dgn_beta.cpp22
-rw-r--r--src/mame/machine/dgnalpha.cpp8
-rw-r--r--src/mame/machine/dmv_keyb.cpp2
-rw-r--r--src/mame/machine/dmv_keyb.h4
-rw-r--r--src/mame/machine/docastle.cpp8
-rw-r--r--src/mame/machine/docg3.cpp124
-rw-r--r--src/mame/machine/docg3.h100
-rw-r--r--src/mame/machine/dragon.cpp10
-rw-r--r--src/mame/machine/egret.cpp8
-rw-r--r--src/mame/machine/egret.h34
-rw-r--r--src/mame/machine/einstein.cpp6
-rw-r--r--src/mame/machine/electron.cpp14
-rw-r--r--src/mame/machine/esqlcd.cpp4
-rw-r--r--src/mame/machine/esqlcd.h10
-rw-r--r--src/mame/machine/esqpanel.cpp14
-rw-r--r--src/mame/machine/esqpanel.h26
-rw-r--r--src/mame/machine/esqvfd.cpp16
-rw-r--r--src/mame/machine/esqvfd.h30
-rw-r--r--src/mame/machine/fd1089.cpp38
-rw-r--r--src/mame/machine/fd1089.h32
-rw-r--r--src/mame/machine/fd1094.cpp80
-rw-r--r--src/mame/machine/fd1094.h44
-rw-r--r--src/mame/machine/fddebug.cpp212
-rw-r--r--src/mame/machine/flstory.cpp6
-rw-r--r--src/mame/machine/fm_scsi.cpp20
-rw-r--r--src/mame/machine/fm_scsi.h42
-rw-r--r--src/mame/machine/gaelco2.cpp20
-rw-r--r--src/mame/machine/gaelco3d.cpp12
-rw-r--r--src/mame/machine/gaelco3d.h10
-rw-r--r--src/mame/machine/gaelcrpt.cpp2
-rw-r--r--src/mame/machine/galaxold.cpp4
-rw-r--r--src/mame/machine/galaxy.cpp12
-rw-r--r--src/mame/machine/gamecom.cpp32
-rw-r--r--src/mame/machine/gamepock.cpp12
-rw-r--r--src/mame/machine/gb.cpp20
-rw-r--r--src/mame/machine/gdrom.cpp16
-rw-r--r--src/mame/machine/gdrom.h14
-rw-r--r--src/mame/machine/harddriv.cpp94
-rw-r--r--src/mame/machine/hec2hrp.cpp12
-rw-r--r--src/mame/machine/hng64_net.cpp4
-rw-r--r--src/mame/machine/hp48.cpp36
-rw-r--r--src/mame/machine/ie15_kbd.cpp22
-rw-r--r--src/mame/machine/ie15_kbd.h18
-rw-r--r--src/mame/machine/igs022.cpp56
-rw-r--r--src/mame/machine/igs022.h8
-rw-r--r--src/mame/machine/igs025.cpp4
-rw-r--r--src/mame/machine/igs025.h20
-rw-r--r--src/mame/machine/igs028.cpp46
-rw-r--r--src/mame/machine/igs028.h12
-rw-r--r--src/mame/machine/igs036crypt.cpp30
-rw-r--r--src/mame/machine/igs036crypt.h26
-rw-r--r--src/mame/machine/inder_sb.cpp2
-rw-r--r--src/mame/machine/inder_sb.h8
-rw-r--r--src/mame/machine/inder_vid.cpp8
-rw-r--r--src/mame/machine/inder_vid.h4
-rw-r--r--src/mame/machine/intv.cpp8
-rw-r--r--src/mame/machine/irem_cpu.cpp30
-rw-r--r--src/mame/machine/irem_cpu.h30
-rw-r--r--src/mame/machine/irobot.cpp52
-rw-r--r--src/mame/machine/isbc_215g.cpp16
-rw-r--r--src/mame/machine/isbc_215g.h18
-rw-r--r--src/mame/machine/iteagle_fpga.cpp34
-rw-r--r--src/mame/machine/iteagle_fpga.h52
-rw-r--r--src/mame/machine/itech8.cpp114
-rw-r--r--src/mame/machine/jalcrpt.cpp24
-rw-r--r--src/mame/machine/jumpshot.cpp10
-rw-r--r--src/mame/machine/jvs13551.cpp26
-rw-r--r--src/mame/machine/jvs13551.h24
-rw-r--r--src/mame/machine/k573cass.cpp16
-rw-r--r--src/mame/machine/k573cass.h16
-rw-r--r--src/mame/machine/k573dio.cpp8
-rw-r--r--src/mame/machine/k573dio.h10
-rw-r--r--src/mame/machine/k573mcr.cpp2
-rw-r--r--src/mame/machine/k573mcr.h2
-rw-r--r--src/mame/machine/k573msu.cpp2
-rw-r--r--src/mame/machine/k573msu.h2
-rw-r--r--src/mame/machine/k573npu.cpp2
-rw-r--r--src/mame/machine/k573npu.h2
-rw-r--r--src/mame/machine/k7659kb.cpp32
-rw-r--r--src/mame/machine/k7659kb.h10
-rw-r--r--src/mame/machine/kabuki.cpp36
-rw-r--r--src/mame/machine/kabuki.h30
-rw-r--r--src/mame/machine/kaneko_calc3.cpp56
-rw-r--r--src/mame/machine/kaneko_calc3.h40
-rw-r--r--src/mame/machine/kaneko_hit.cpp20
-rw-r--r--src/mame/machine/kaneko_hit.h20
-rw-r--r--src/mame/machine/kaneko_toybox.cpp46
-rw-r--r--src/mame/machine/kaneko_toybox.h26
-rw-r--r--src/mame/machine/kay_kbd.cpp32
-rw-r--r--src/mame/machine/kaypro.cpp10
-rw-r--r--src/mame/machine/kc.cpp46
-rw-r--r--src/mame/machine/kc_keyb.cpp8
-rw-r--r--src/mame/machine/kc_keyb.h6
-rw-r--r--src/mame/machine/km035.cpp2
-rw-r--r--src/mame/machine/km035.h8
-rw-r--r--src/mame/machine/konami1.cpp10
-rw-r--r--src/mame/machine/konami1.h12
-rw-r--r--src/mame/machine/konamigx.cpp42
-rw-r--r--src/mame/machine/konppc.cpp28
-rw-r--r--src/mame/machine/konppc.h44
-rw-r--r--src/mame/machine/leland.cpp60
-rw-r--r--src/mame/machine/lisa.cpp46
-rw-r--r--src/mame/machine/llc.cpp8
-rw-r--r--src/mame/machine/lviv.cpp14
-rw-r--r--src/mame/machine/lynx.cpp74
-rw-r--r--src/mame/machine/m1comm.cpp10
-rw-r--r--src/mame/machine/m1comm.h28
-rw-r--r--src/mame/machine/m20_8086.cpp4
-rw-r--r--src/mame/machine/m20_8086.h2
-rw-r--r--src/mame/machine/m20_kbd.cpp12
-rw-r--r--src/mame/machine/m20_kbd.h6
-rw-r--r--src/mame/machine/m24_kbd.cpp4
-rw-r--r--src/mame/machine/m24_kbd.h4
-rw-r--r--src/mame/machine/m24_z8000.cpp20
-rw-r--r--src/mame/machine/m24_z8000.h8
-rw-r--r--src/mame/machine/m2comm.cpp6
-rw-r--r--src/mame/machine/m2comm.h26
-rw-r--r--src/mame/machine/m3comm.cpp24
-rw-r--r--src/mame/machine/m3comm.h24
-rw-r--r--src/mame/machine/mac.cpp56
-rw-r--r--src/mame/machine/macadb.cpp12
-rw-r--r--src/mame/machine/mackbd.cpp6
-rw-r--r--src/mame/machine/mackbd.h4
-rw-r--r--src/mame/machine/macpci.cpp6
-rw-r--r--src/mame/machine/macrtc.cpp4
-rw-r--r--src/mame/machine/macrtc.h28
-rw-r--r--src/mame/machine/maple-dc.cpp18
-rw-r--r--src/mame/machine/maple-dc.h8
-rw-r--r--src/mame/machine/mapledev.cpp8
-rw-r--r--src/mame/machine/mapledev.h16
-rw-r--r--src/mame/machine/mathbox.cpp18
-rw-r--r--src/mame/machine/mathbox.h6
-rw-r--r--src/mame/machine/mbc55x.cpp42
-rw-r--r--src/mame/machine/mbee.cpp52
-rw-r--r--src/mame/machine/mc80.cpp4
-rw-r--r--src/mame/machine/mc8123.cpp10
-rw-r--r--src/mame/machine/mc8123.h2
-rw-r--r--src/mame/machine/mcr.cpp6
-rw-r--r--src/mame/machine/mcr68.cpp8
-rw-r--r--src/mame/machine/mega32x.cpp58
-rw-r--r--src/mame/machine/mega32x.h66
-rw-r--r--src/mame/machine/megacd.cpp68
-rw-r--r--src/mame/machine/megacd.h68
-rw-r--r--src/mame/machine/megacdcd.cpp74
-rw-r--r--src/mame/machine/megacdcd.h80
-rw-r--r--src/mame/machine/megadriv.cpp44
-rw-r--r--src/mame/machine/meters.cpp12
-rw-r--r--src/mame/machine/meters.h12
-rw-r--r--src/mame/machine/mexico86.cpp20
-rw-r--r--src/mame/machine/micro3d.cpp54
-rw-r--r--src/mame/machine/microdrv.cpp6
-rw-r--r--src/mame/machine/microdrv.h6
-rw-r--r--src/mame/machine/micropolis.cpp8
-rw-r--r--src/mame/machine/micropolis.h26
-rw-r--r--src/mame/machine/microtan.cpp24
-rw-r--r--src/mame/machine/midikbd.cpp4
-rw-r--r--src/mame/machine/midikbd.h10
-rw-r--r--src/mame/machine/midtunit.cpp22
-rw-r--r--src/mame/machine/midwayic.cpp58
-rw-r--r--src/mame/machine/midwayic.h92
-rw-r--r--src/mame/machine/midyunit.cpp4
-rw-r--r--src/mame/machine/mie.cpp18
-rw-r--r--src/mame/machine/mie.h18
-rw-r--r--src/mame/machine/mikro80.cpp4
-rw-r--r--src/mame/machine/mm1kb.cpp8
-rw-r--r--src/mame/machine/mm1kb.h4
-rw-r--r--src/mame/machine/model1.cpp148
-rw-r--r--src/mame/machine/model3.cpp24
-rw-r--r--src/mame/machine/ms7004.cpp2
-rw-r--r--src/mame/machine/ms7004.h6
-rw-r--r--src/mame/machine/msx.cpp28
-rw-r--r--src/mame/machine/msx_matsushita.cpp6
-rw-r--r--src/mame/machine/msx_matsushita.h14
-rw-r--r--src/mame/machine/msx_s1985.cpp6
-rw-r--r--src/mame/machine/msx_s1985.h10
-rw-r--r--src/mame/machine/msx_switched.cpp6
-rw-r--r--src/mame/machine/msx_switched.h4
-rw-r--r--src/mame/machine/msx_systemflags.cpp2
-rw-r--r--src/mame/machine/msx_systemflags.h8
-rw-r--r--src/mame/machine/mtx.cpp22
-rw-r--r--src/mame/machine/mw8080bw.cpp12
-rw-r--r--src/mame/machine/mz700.cpp44
-rw-r--r--src/mame/machine/mz80.cpp4
-rw-r--r--src/mame/machine/n64.cpp140
-rw-r--r--src/mame/machine/namco06.cpp4
-rw-r--r--src/mame/machine/namco06.h4
-rw-r--r--src/mame/machine/namco50.cpp6
-rw-r--r--src/mame/machine/namco50.h8
-rw-r--r--src/mame/machine/namco51.cpp2
-rw-r--r--src/mame/machine/namco51.h22
-rw-r--r--src/mame/machine/namco53.cpp6
-rw-r--r--src/mame/machine/namco53.h4
-rw-r--r--src/mame/machine/namco62.cpp2
-rw-r--r--src/mame/machine/namco62.h2
-rw-r--r--src/mame/machine/namco_settings.cpp2
-rw-r--r--src/mame/machine/namco_settings.h4
-rw-r--r--src/mame/machine/namcoic.cpp130
-rw-r--r--src/mame/machine/namcoio.cpp8
-rw-r--r--src/mame/machine/namcoio.h22
-rw-r--r--src/mame/machine/namcomcu.cpp10
-rw-r--r--src/mame/machine/namcomcu.h10
-rw-r--r--src/mame/machine/namcond1.cpp4
-rw-r--r--src/mame/machine/namcos1.cpp2
-rw-r--r--src/mame/machine/namcos2.cpp24
-rw-r--r--src/mame/machine/naomi.cpp24
-rw-r--r--src/mame/machine/naomibd.cpp16
-rw-r--r--src/mame/machine/naomibd.h20
-rw-r--r--src/mame/machine/naomig1.cpp18
-rw-r--r--src/mame/machine/naomig1.h12
-rw-r--r--src/mame/machine/naomigd.cpp118
-rw-r--r--src/mame/machine/naomigd.h60
-rw-r--r--src/mame/machine/naomim1.cpp32
-rw-r--r--src/mame/machine/naomim1.h28
-rw-r--r--src/mame/machine/naomim2.cpp18
-rw-r--r--src/mame/machine/naomim2.h16
-rw-r--r--src/mame/machine/naomim4.cpp38
-rw-r--r--src/mame/machine/naomim4.h32
-rw-r--r--src/mame/machine/naomirom.cpp8
-rw-r--r--src/mame/machine/naomirom.h10
-rw-r--r--src/mame/machine/nb1413m3.cpp4
-rw-r--r--src/mame/machine/nb1414m4.cpp38
-rw-r--r--src/mame/machine/nc.cpp2
-rw-r--r--src/mame/machine/nes.cpp14
-rw-r--r--src/mame/machine/nextkbd.cpp36
-rw-r--r--src/mame/machine/nextkbd.h18
-rw-r--r--src/mame/machine/nextmo.cpp8
-rw-r--r--src/mame/machine/nextmo.h10
-rw-r--r--src/mame/machine/ng_memcard.cpp2
-rw-r--r--src/mame/machine/ng_memcard.h4
-rw-r--r--src/mame/machine/ngen_kb.cpp16
-rw-r--r--src/mame/machine/ngen_kb.h12
-rw-r--r--src/mame/machine/nmk004.cpp2
-rw-r--r--src/mame/machine/nmk004.h6
-rw-r--r--src/mame/machine/nmk112.cpp4
-rw-r--r--src/mame/machine/nmk112.h10
-rw-r--r--src/mame/machine/ns10crypt.cpp4
-rw-r--r--src/mame/machine/ns10crypt.h6
-rw-r--r--src/mame/machine/ns11prot.cpp30
-rw-r--r--src/mame/machine/ns11prot.h26
-rw-r--r--src/mame/machine/octo_kbd.cpp10
-rw-r--r--src/mame/machine/octo_kbd.h12
-rw-r--r--src/mame/machine/ondra.cpp4
-rw-r--r--src/mame/machine/opwolf.cpp30
-rw-r--r--src/mame/machine/orion.cpp8
-rw-r--r--src/mame/machine/osborne1.cpp36
-rw-r--r--src/mame/machine/pacplus.cpp10
-rw-r--r--src/mame/machine/partner.cpp14
-rw-r--r--src/mame/machine/pc1251.cpp10
-rw-r--r--src/mame/machine/pc1350.cpp4
-rw-r--r--src/mame/machine/pc1401.cpp6
-rw-r--r--src/mame/machine/pc1403.cpp10
-rw-r--r--src/mame/machine/pc1512kb.cpp6
-rw-r--r--src/mame/machine/pc1512kb.h2
-rw-r--r--src/mame/machine/pc9801_118.cpp4
-rw-r--r--src/mame/machine/pc9801_118.h6
-rw-r--r--src/mame/machine/pc9801_26.cpp4
-rw-r--r--src/mame/machine/pc9801_26.h4
-rw-r--r--src/mame/machine/pc9801_86.cpp10
-rw-r--r--src/mame/machine/pc9801_86.h10
-rw-r--r--src/mame/machine/pc9801_cbus.cpp2
-rw-r--r--src/mame/machine/pc9801_cbus.h2
-rw-r--r--src/mame/machine/pc9801_cd.cpp2
-rw-r--r--src/mame/machine/pc9801_cd.h2
-rw-r--r--src/mame/machine/pc9801_kbd.cpp6
-rw-r--r--src/mame/machine/pc9801_kbd.h8
-rw-r--r--src/mame/machine/pcd_kbd.cpp2
-rw-r--r--src/mame/machine/pcd_kbd.h4
-rw-r--r--src/mame/machine/pce.cpp6
-rw-r--r--src/mame/machine/pce220_ser.cpp8
-rw-r--r--src/mame/machine/pce220_ser.h40
-rw-r--r--src/mame/machine/pce_cd.cpp60
-rw-r--r--src/mame/machine/pce_cd.h70
-rw-r--r--src/mame/machine/pcecommn.cpp6
-rw-r--r--src/mame/machine/pcecommn.h6
-rw-r--r--src/mame/machine/pcshare.cpp2
-rw-r--r--src/mame/machine/pcshare.h4
-rw-r--r--src/mame/machine/pecom.cpp8
-rw-r--r--src/mame/machine/pgmcrypt.cpp198
-rw-r--r--src/mame/machine/pgmprot_igs025_igs012.cpp16
-rw-r--r--src/mame/machine/pgmprot_igs025_igs022.cpp12
-rw-r--r--src/mame/machine/pgmprot_igs025_igs022.h2
-rw-r--r--src/mame/machine/pgmprot_igs025_igs028.cpp2
-rw-r--r--src/mame/machine/pgmprot_igs025_igs028.h2
-rw-r--r--src/mame/machine/pgmprot_igs027a_type1.cpp84
-rw-r--r--src/mame/machine/pgmprot_igs027a_type1.h50
-rw-r--r--src/mame/machine/pgmprot_igs027a_type2.cpp10
-rw-r--r--src/mame/machine/pgmprot_igs027a_type2.h8
-rw-r--r--src/mame/machine/pgmprot_igs027a_type3.cpp56
-rw-r--r--src/mame/machine/pgmprot_igs027a_type3.h16
-rw-r--r--src/mame/machine/pgmprot_orlegend.h10
-rw-r--r--src/mame/machine/pk8020.cpp44
-rw-r--r--src/mame/machine/playch10.cpp54
-rw-r--r--src/mame/machine/pmd85.cpp26
-rw-r--r--src/mame/machine/poly88.cpp22
-rw-r--r--src/mame/machine/pp01.cpp16
-rw-r--r--src/mame/machine/primo.cpp16
-rw-r--r--src/mame/machine/prof80mmu.cpp2
-rw-r--r--src/mame/machine/prof80mmu.h4
-rw-r--r--src/mame/machine/psion_pack.cpp16
-rw-r--r--src/mame/machine/psion_pack.h24
-rw-r--r--src/mame/machine/psxcd.cpp54
-rw-r--r--src/mame/machine/psxcd.h50
-rw-r--r--src/mame/machine/pxa255.h164
-rw-r--r--src/mame/machine/qimi.cpp4
-rw-r--r--src/mame/machine/qimi.h6
-rw-r--r--src/mame/machine/qix.cpp18
-rw-r--r--src/mame/machine/qx10kbd.cpp6
-rw-r--r--src/mame/machine/qx10kbd.h6
-rw-r--r--src/mame/machine/r2crypt.cpp32
-rw-r--r--src/mame/machine/radio86.cpp18
-rw-r--r--src/mame/machine/rbisland.cpp84
-rw-r--r--src/mame/machine/rm380z.cpp6
-rw-r--r--src/mame/machine/rmnimbus.cpp172
-rw-r--r--src/mame/machine/rmnkbd.cpp8
-rw-r--r--src/mame/machine/rmnkbd.h8
-rw-r--r--src/mame/machine/rx01.cpp10
-rw-r--r--src/mame/machine/rx01.h22
-rw-r--r--src/mame/machine/s32comm.cpp8
-rw-r--r--src/mame/machine/s32comm.h26
-rw-r--r--src/mame/machine/samcoupe.cpp12
-rw-r--r--src/mame/machine/saturn.cpp32
-rw-r--r--src/mame/machine/scramble.cpp72
-rw-r--r--src/mame/machine/sec.cpp26
-rw-r--r--src/mame/machine/sec.h40
-rw-r--r--src/mame/machine/segabb.cpp2
-rw-r--r--src/mame/machine/segabb.h2
-rw-r--r--src/mame/machine/segacrp2_device.cpp58
-rw-r--r--src/mame/machine/segacrp2_device.h20
-rw-r--r--src/mame/machine/segacrpt_device.cpp116
-rw-r--r--src/mame/machine/segacrpt_device.h62
-rw-r--r--src/mame/machine/segag80.cpp38
-rw-r--r--src/mame/machine/segag80.h2
-rw-r--r--src/mame/machine/segaic16.cpp68
-rw-r--r--src/mame/machine/segaic16.h58
-rw-r--r--src/mame/machine/segas32.cpp16
-rw-r--r--src/mame/machine/seibucop/seibucop.cpp64
-rw-r--r--src/mame/machine/seibucop/seibucop.h166
-rw-r--r--src/mame/machine/seibucop/seibucop_cmd.hxx90
-rw-r--r--src/mame/machine/seibucop/seibucop_dma.hxx22
-rw-r--r--src/mame/machine/seibuspi.cpp36
-rw-r--r--src/mame/machine/seibuspi.h12
-rw-r--r--src/mame/machine/seicop.cpp14
-rw-r--r--src/mame/machine/seicop.h12
-rw-r--r--src/mame/machine/sgi.cpp2
-rw-r--r--src/mame/machine/sgi.h84
-rw-r--r--src/mame/machine/simpsons.cpp2
-rw-r--r--src/mame/machine/slapfght.cpp14
-rw-r--r--src/mame/machine/slapstic.cpp6
-rw-r--r--src/mame/machine/sms.cpp76
-rw-r--r--src/mame/machine/snes.cpp72
-rw-r--r--src/mame/machine/snescx4.cpp54
-rw-r--r--src/mame/machine/snescx4.h14
-rw-r--r--src/mame/machine/sorcerer.cpp24
-rw-r--r--src/mame/machine/spec_snqk.cpp114
-rw-r--r--src/mame/machine/spec_snqk.h30
-rw-r--r--src/mame/machine/special.cpp22
-rw-r--r--src/mame/machine/st0016.cpp36
-rw-r--r--src/mame/machine/st0016.h24
-rw-r--r--src/mame/machine/starwars.cpp12
-rw-r--r--src/mame/machine/stfight.cpp14
-rw-r--r--src/mame/machine/stvprot.cpp12
-rw-r--r--src/mame/machine/subsino.cpp24
-rw-r--r--src/mame/machine/subsino.h18
-rw-r--r--src/mame/machine/super80.cpp16
-rw-r--r--src/mame/machine/swim.cpp12
-rw-r--r--src/mame/machine/swim.h18
-rw-r--r--src/mame/machine/swtpc09.cpp18
-rw-r--r--src/mame/machine/tait8741.cpp12
-rw-r--r--src/mame/machine/tait8741.h50
-rw-r--r--src/mame/machine/taitoio.cpp6
-rw-r--r--src/mame/machine/taitoio.h14
-rw-r--r--src/mame/machine/tandy2kb.cpp4
-rw-r--r--src/mame/machine/tandy2kb.h4
-rw-r--r--src/mame/machine/tatsumi.cpp6
-rw-r--r--src/mame/machine/tecmosys.cpp20
-rw-r--r--src/mame/machine/teleprinter.cpp12
-rw-r--r--src/mame/machine/teleprinter.h8
-rw-r--r--src/mame/machine/theglobp.cpp10
-rw-r--r--src/mame/machine/thomflop.cpp132
-rw-r--r--src/mame/machine/thomflop.h4
-rw-r--r--src/mame/machine/thomson.cpp148
-rw-r--r--src/mame/machine/ti85.cpp18
-rw-r--r--src/mame/machine/ticket.cpp4
-rw-r--r--src/mame/machine/ticket.h28
-rw-r--r--src/mame/machine/tnzs.cpp6
-rw-r--r--src/mame/machine/toaplan1.cpp8
-rw-r--r--src/mame/machine/trs80.cpp26
-rw-r--r--src/mame/machine/trs80m2kb.cpp4
-rw-r--r--src/mame/machine/trs80m2kb.h4
-rw-r--r--src/mame/machine/twincobr.cpp4
-rw-r--r--src/mame/machine/tx1.cpp72
-rw-r--r--src/mame/machine/upd65031.cpp10
-rw-r--r--src/mame/machine/upd65031.h32
-rw-r--r--src/mame/machine/ut88.cpp12
-rw-r--r--src/mame/machine/v1050kb.cpp4
-rw-r--r--src/mame/machine/v1050kb.h4
-rw-r--r--src/mame/machine/vector06.cpp16
-rw-r--r--src/mame/machine/vectrex.cpp2
-rw-r--r--src/mame/machine/victor9k_fdc.cpp16
-rw-r--r--src/mame/machine/victor9k_fdc.h32
-rw-r--r--src/mame/machine/victor9kb.cpp4
-rw-r--r--src/mame/machine/victor9kb.h6
-rw-r--r--src/mame/machine/volfied.cpp40
-rw-r--r--src/mame/machine/vsnes.cpp58
-rw-r--r--src/mame/machine/vtech2.cpp8
-rw-r--r--src/mame/machine/wangpckb.cpp2
-rw-r--r--src/mame/machine/wangpckb.h4
-rw-r--r--src/mame/machine/williams.cpp6
-rw-r--r--src/mame/machine/wpc.cpp4
-rw-r--r--src/mame/machine/wpc.h34
-rw-r--r--src/mame/machine/wpc_lamp.cpp4
-rw-r--r--src/mame/machine/wpc_lamp.h6
-rw-r--r--src/mame/machine/wpc_out.cpp6
-rw-r--r--src/mame/machine/wpc_out.h6
-rw-r--r--src/mame/machine/wpc_pic.cpp12
-rw-r--r--src/mame/machine/wpc_pic.h4
-rw-r--r--src/mame/machine/wpc_shift.cpp2
-rw-r--r--src/mame/machine/wpc_shift.h6
-rw-r--r--src/mame/machine/wswan.cpp18
-rw-r--r--src/mame/machine/x1.cpp2
-rw-r--r--src/mame/machine/x68k_hdc.cpp2
-rw-r--r--src/mame/machine/x68k_hdc.h2
-rw-r--r--src/mame/machine/x68k_kbd.cpp10
-rw-r--r--src/mame/machine/x68k_kbd.h12
-rw-r--r--src/mame/machine/x820kb.cpp4
-rw-r--r--src/mame/machine/x820kb.h8
-rw-r--r--src/mame/machine/xbox.cpp86
-rw-r--r--src/mame/machine/xbox_usb.cpp94
-rw-r--r--src/mame/machine/z80bin.cpp8
-rw-r--r--src/mame/machine/z80bin.h2
-rw-r--r--src/mame/machine/z80ne.cpp32
-rw-r--r--src/mame/machine/zndip.cpp2
-rw-r--r--src/mame/machine/zndip.h4
-rw-r--r--src/mame/machine/zs01.cpp58
-rw-r--r--src/mame/machine/zs01.h24
-rw-r--r--src/mame/machine/zx.cpp20
-rw-r--r--src/mame/machine/zx8302.cpp10
-rw-r--r--src/mame/machine/zx8302.h18
569 files changed, 7100 insertions, 7100 deletions
diff --git a/src/mame/machine/315-5838_317-0229_comp.cpp b/src/mame/machine/315-5838_317-0229_comp.cpp
index 9c340e7cc38..a203d873499 100644
--- a/src/mame/machine/315-5838_317-0229_comp.cpp
+++ b/src/mame/machine/315-5838_317-0229_comp.cpp
@@ -52,7 +52,7 @@ extern const device_type SEGA315_5838_COMP = &device_creator<sega_315_5838_comp_
//#define DEBUG_DATA_DUMP
-sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGA315_5838_COMP, "Sega 315-5838 / 317-0029 Compression (Encryption?)", tag, owner, clock, "sega315_5838", __FILE__)
{
}
@@ -104,10 +104,10 @@ READ32_MEMBER(sega_315_5838_comp_device::decathlt_prot2_r)
}
-UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int channel)
+uint32_t sega_315_5838_comp_device::genericdecathlt_prot_r(uint32_t mem_mask, int channel)
{
-// UINT32 *fake0 = (UINT32*)memregion( ":fake0" )->base();
-// UINT32 retvalue = 0xffff;
+// uint32_t *fake0 = (uint32_t*)memregion( ":fake0" )->base();
+// uint32_t retvalue = 0xffff;
switch (m_srcoffset)
{
@@ -115,7 +115,7 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch
m_decathlt_lastcount++;
- UINT32 tempdata = 0;
+ uint32_t tempdata = 0;
tempdata |= m_channel[channel].m_read_ch(m_srcoffset) << 0;
m_srcoffset++;
tempdata |= m_channel[channel].m_read_ch(m_srcoffset) << 16;
@@ -186,7 +186,7 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch
return 0xffffffff;
}
-void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int channel)
+void sega_315_5838_comp_device::set_prot_addr(uint32_t data, uint32_t mem_mask, int channel)
{
// printf("set_prot_addr\n");
COMBINE_DATA(&m_srcoffset);
@@ -232,7 +232,7 @@ void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int
}
-void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel)
+void sega_315_5838_comp_device::set_upload_mode(uint16_t data, int channel)
{
if ((data == 0x8000) || (data == 0x0000))
{
@@ -251,7 +251,7 @@ void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel)
}
}
-void sega_315_5838_comp_device::upload_table_data(UINT16 data, int channel)
+void sega_315_5838_comp_device::upload_table_data(uint16_t data, int channel)
{
if (m_decathlt_prot_uploadmode == 1)
{
@@ -281,7 +281,7 @@ void sega_315_5838_comp_device::upload_table_data(UINT16 data, int channel)
}
}
-void sega_315_5838_comp_device::write_prot_data(UINT32 data, UINT32 mem_mask, int channel, int rev_words)
+void sega_315_5838_comp_device::write_prot_data(uint32_t data, uint32_t mem_mask, int channel, int rev_words)
{
if (mem_mask==0xffff0000)
{
@@ -327,7 +327,7 @@ void sega_315_5838_comp_device::install_decathlt_protection()
READ32_MEMBER(sega_315_5838_comp_device::doa_prot_r)
{
- UINT32 retval = 0;
+ uint32_t retval = 0;
if (offset == 0x7ff8/4)
{
diff --git a/src/mame/machine/315-5838_317-0229_comp.h b/src/mame/machine/315-5838_317-0229_comp.h
index cc66fe1c137..1d741c73ac3 100644
--- a/src/mame/machine/315-5838_317-0229_comp.h
+++ b/src/mame/machine/315-5838_317-0229_comp.h
@@ -8,7 +8,7 @@
#define CHANNELS 2
-typedef device_delegate<UINT16 (UINT32)> sega_dec_read_delegate;
+typedef device_delegate<uint16_t (uint32_t)> sega_dec_read_delegate;
extern const device_type SEGA315_5838_COMP;
@@ -22,7 +22,7 @@ class sega_315_5838_comp_device : public device_t
{
public:
// construction/destruction
- sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
sega_dec_read_delegate m_read_ch2;
@@ -40,13 +40,13 @@ public:
DECLARE_READ32_MEMBER(decathlt_prot1_r);
DECLARE_READ32_MEMBER(decathlt_prot2_r);
- UINT32 genericdecathlt_prot_r(UINT32 mem_mask, int channel);
+ uint32_t genericdecathlt_prot_r(uint32_t mem_mask, int channel);
- void write_prot_data(UINT32 data, UINT32 mem_mask, int channel, int rev_words);
+ void write_prot_data(uint32_t data, uint32_t mem_mask, int channel, int rev_words);
- void upload_table_data(UINT16 data, int channel);
- void set_upload_mode(UINT16 data, int channel);
- void set_prot_addr(UINT32 data, UINT32 mem_mask, int channel);
+ void upload_table_data(uint16_t data, int channel);
+ void set_upload_mode(uint16_t data, int channel);
+ void set_prot_addr(uint32_t data, uint32_t mem_mask, int channel);
DECLARE_WRITE32_MEMBER(decathlt_prot1_w_doa);
DECLARE_WRITE32_MEMBER(decathlt_prot1_w);
@@ -65,14 +65,14 @@ protected:
virtual void device_reset() override;
private:
- UINT16 m_decathlt_prottable1[24];
- UINT16 m_decathlt_dictionaryy[128];
+ uint16_t m_decathlt_prottable1[24];
+ uint16_t m_decathlt_dictionaryy[128];
- UINT32 m_srcoffset;
+ uint32_t m_srcoffset;
- UINT32 m_decathlt_lastcount;
- UINT32 m_decathlt_prot_uploadmode;
- UINT32 m_decathlt_prot_uploadoffset;
+ uint32_t m_decathlt_lastcount;
+ uint32_t m_decathlt_prot_uploadmode;
+ uint32_t m_decathlt_prot_uploadoffset;
// Decathlete specific variables and functions (see machine/decathlt.c)
@@ -89,7 +89,7 @@ private:
// Doa
int m_protstate;
int m_prot_a;
- UINT8 m_protram[256];
+ uint8_t m_protram[256];
};
#endif
diff --git a/src/mame/machine/315-5881_crypt.cpp b/src/mame/machine/315-5881_crypt.cpp
index 9d7545b57ee..a3da4752d76 100644
--- a/src/mame/machine/315-5881_crypt.cpp
+++ b/src/mame/machine/315-5881_crypt.cpp
@@ -20,7 +20,7 @@
extern const device_type SEGA315_5881_CRYPT = &device_creator<sega_315_5881_crypt_device>;
-sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGA315_5881_CRYPT, "Sega 315-5881 Encryption", tag, owner, clock, "sega315_5881", __FILE__)
{
}
@@ -29,9 +29,9 @@ sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mco
void sega_315_5881_crypt_device::device_start()
{
- buffer = std::make_unique<UINT8[]>(BUFFER_SIZE);
- line_buffer = std::make_unique<UINT8[]>(LINE_SIZE);
- line_buffer_prev = std::make_unique<UINT8[]>(LINE_SIZE);
+ buffer = std::make_unique<uint8_t[]>(BUFFER_SIZE);
+ line_buffer = std::make_unique<uint8_t[]>(LINE_SIZE);
+ line_buffer_prev = std::make_unique<uint8_t[]>(LINE_SIZE);
m_read.bind_relative_to(*owner());
@@ -75,7 +75,7 @@ void sega_315_5881_crypt_device::device_reset()
buffer_bit = 0;
}
-UINT16 sega_315_5881_crypt_device::do_decrypt(UINT8 *&base)
+uint16_t sega_315_5881_crypt_device::do_decrypt(uint8_t *&base)
{
if(!enc_ready)
enc_start();
@@ -101,13 +101,13 @@ UINT16 sega_315_5881_crypt_device::do_decrypt(UINT8 *&base)
return (base[0] << 8) | base[1];
}
-void sega_315_5881_crypt_device::set_addr_low(UINT16 data)
+void sega_315_5881_crypt_device::set_addr_low(uint16_t data)
{
prot_cur_address = (prot_cur_address & 0xffff0000) | data;
enc_ready = false;
}
-void sega_315_5881_crypt_device::set_addr_high(UINT16 data)
+void sega_315_5881_crypt_device::set_addr_high(uint16_t data)
{
prot_cur_address = (prot_cur_address & 0x0000ffff) | (data << 16);
enc_ready = false;
@@ -116,7 +116,7 @@ void sega_315_5881_crypt_device::set_addr_high(UINT16 data)
buffer_bit2 = 15;
}
-void sega_315_5881_crypt_device::set_subkey(UINT16 data)
+void sega_315_5881_crypt_device::set_subkey(uint16_t data)
{
subkey = data;
enc_ready = false;
@@ -536,7 +536,7 @@ const int sega_315_5881_crypt_device::fn2_sequence_key_scheduling[16] = {77,34,8
const int sega_315_5881_crypt_device::fn2_middle_result_scheduling[16] = {1,10,44,68,74,78,81,95,2,4,30,40,41,51,53,58};
-int sega_315_5881_crypt_device::feistel_function(int input, const struct sbox *sboxes, UINT32 subkeys)
+int sega_315_5881_crypt_device::feistel_function(int input, const struct sbox *sboxes, uint32_t subkeys)
{
int k,m;
int aux;
@@ -566,18 +566,18 @@ noticing that the weak key-scheduling would allow to create some pregenerated lo
of the function. Even so, it would still be pretty slow, so caching techniques could be a wiser option here.
**************************/
-UINT16 sega_315_5881_crypt_device::block_decrypt(UINT32 game_key, UINT16 sequence_key, UINT16 counter, UINT16 data)
+uint16_t sega_315_5881_crypt_device::block_decrypt(uint32_t game_key, uint16_t sequence_key, uint16_t counter, uint16_t data)
{
int j;
int aux, aux2;
int A, B;
int middle_result;
- UINT32 fn1_subkeys[4];
- UINT32 fn2_subkeys[4];
+ uint32_t fn1_subkeys[4];
+ uint32_t fn2_subkeys[4];
/* Game-key scheduling; this could be done just once per game at initialization time */
- memset(fn1_subkeys, 0, sizeof(UINT32) * 4);
- memset(fn2_subkeys, 0, sizeof(UINT32) * 4);
+ memset(fn1_subkeys, 0, sizeof(uint32_t) * 4);
+ memset(fn2_subkeys, 0, sizeof(uint32_t) * 4);
for (j = 0; j < FN1GK; ++j) {
if (BIT(game_key, fn1_game_key_scheduling[j][0]) != 0) {
@@ -670,14 +670,14 @@ UINT16 sega_315_5881_crypt_device::block_decrypt(UINT32 game_key, UINT16 sequenc
}
-UINT16 sega_315_5881_crypt_device::get_decrypted_16()
+uint16_t sega_315_5881_crypt_device::get_decrypted_16()
{
- UINT16 enc;
+ uint16_t enc;
enc = m_read(prot_cur_address);
- UINT16 dec = block_decrypt(key, subkey, prot_cur_address, enc);
- UINT16 res = (dec & 3) | (dec_hist & 0xfffc);
+ uint16_t dec = block_decrypt(key, subkey, prot_cur_address, enc);
+ uint16_t res = (dec & 3) | (dec_hist & 0xfffc);
dec_hist = dec;
prot_cur_address ++;
@@ -733,7 +733,7 @@ void sega_315_5881_crypt_device::enc_fill()
{
assert(buffer_pos == BUFFER_SIZE);
for(int i = 0; i != BUFFER_SIZE; i+=2) {
- UINT16 val = get_decrypted_16();
+ uint16_t val = get_decrypted_16();
buffer[i] = val;
buffer[i+1] = val >> 8;
block_pos+=2;
@@ -767,7 +767,7 @@ void sega_315_5881_crypt_device::enc_fill()
count = ccc + 1
11111111 - empty node
*/
-const UINT8 sega_315_5881_crypt_device::trees[9][2][32] = {
+const uint8_t sega_315_5881_crypt_device::trees[9][2][32] = {
{
{0x01,0x10,0x0f,0x05,0xc4,0x13,0x87,0x0a,0xcc,0x81,0xce,0x0c,0x86,0x0e,0x84,0xc2,
0x11,0xc1,0xc3,0xcf,0x15,0xc8,0xcd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,},
@@ -857,8 +857,8 @@ int sega_315_5881_crypt_device::get_compressed_bit()
void sega_315_5881_crypt_device::line_fill()
{
assert(line_buffer_pos == line_buffer_size);
- UINT8 *lp = line_buffer.get();
- UINT8 *lc = line_buffer_prev.get();
+ uint8_t *lp = line_buffer.get();
+ uint8_t *lc = line_buffer_prev.get();
line_buffer.swap(line_buffer_prev);
@@ -871,7 +871,7 @@ void sega_315_5881_crypt_device::line_fill()
int slot = i ? i < line_buffer_size - 7 ? 1 : (i & 7) + 1 : 0;
- UINT32 tmp = 0;
+ uint32_t tmp = 0;
while (!(tmp&0x80))
if(get_compressed_bit())
tmp = trees[slot][1][tmp];
@@ -892,7 +892,7 @@ void sega_315_5881_crypt_device::line_fill()
} else {
// Get a byte in the stream and write n times
- UINT8 byte;
+ uint8_t byte;
byte = get_compressed_bit() << 1;
byte = (byte | get_compressed_bit()) << 1;
byte = (byte | get_compressed_bit()) << 1;
diff --git a/src/mame/machine/315-5881_crypt.h b/src/mame/machine/315-5881_crypt.h
index feacc5ce3e9..109ec4c23b9 100644
--- a/src/mame/machine/315-5881_crypt.h
+++ b/src/mame/machine/315-5881_crypt.h
@@ -6,7 +6,7 @@
#ifndef __SEGA315_5881_CRYPT__
#define __SEGA315_5881_CRYPT__
-typedef device_delegate<UINT16 (UINT32)> sega_m2_read_delegate;
+typedef device_delegate<uint16_t (uint32_t)> sega_m2_read_delegate;
extern const device_type SEGA315_5881_CRYPT;
@@ -18,13 +18,13 @@ class sega_315_5881_crypt_device : public device_t
{
public:
// construction/destruction
- sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- UINT16 do_decrypt(UINT8 *&base);
- void set_addr_low(UINT16 data);
- void set_addr_high(UINT16 data);
- void set_subkey(UINT16 data);
+ uint16_t do_decrypt(uint8_t *&base);
+ void set_addr_low(uint16_t data);
+ void set_addr_high(uint16_t data);
+ void set_subkey(uint16_t data);
sega_m2_read_delegate m_read;
@@ -46,20 +46,20 @@ private:
FLAG_COMPRESSED = 0x20000
};
- UINT32 key;
+ uint32_t key;
- std::unique_ptr<UINT8[]> buffer;
- std::unique_ptr<UINT8[]> line_buffer;
- std::unique_ptr<UINT8[]> line_buffer_prev;
- UINT32 prot_cur_address;
- UINT16 subkey, dec_hist;
- UINT32 dec_header;
+ std::unique_ptr<uint8_t[]> buffer;
+ std::unique_ptr<uint8_t[]> line_buffer;
+ std::unique_ptr<uint8_t[]> line_buffer_prev;
+ uint32_t prot_cur_address;
+ uint16_t subkey, dec_hist;
+ uint32_t dec_header;
bool enc_ready;
int buffer_pos, line_buffer_pos, line_buffer_size, buffer_bit, buffer_bit2;
- UINT8 buffer2[2];
- UINT16 buffer2a;
+ uint8_t buffer2[2];
+ uint16_t buffer2a;
int block_size;
int block_pos;
@@ -67,7 +67,7 @@ private:
int done_compression;
struct sbox {
- UINT8 table[64];
+ uint8_t table[64];
int inputs[6]; // positions of the inputs bits, -1 means no input except from key
int outputs[2]; // positions of the output bits
};
@@ -83,12 +83,12 @@ private:
static const int fn2_sequence_key_scheduling[16];
static const int fn2_middle_result_scheduling[16];
- static const UINT8 trees[9][2][32];
+ static const uint8_t trees[9][2][32];
- int feistel_function(int input, const struct sbox *sboxes, UINT32 subkeys);
- UINT16 block_decrypt(UINT32 game_key, UINT16 sequence_key, UINT16 counter, UINT16 data);
+ int feistel_function(int input, const struct sbox *sboxes, uint32_t subkeys);
+ uint16_t block_decrypt(uint32_t game_key, uint16_t sequence_key, uint16_t counter, uint16_t data);
- UINT16 get_decrypted_16();
+ uint16_t get_decrypted_16();
int get_compressed_bit();
void enc_start();
diff --git a/src/mame/machine/315_5296.cpp b/src/mame/machine/315_5296.cpp
index 34aa0da1d22..310a0bbd820 100644
--- a/src/mame/machine/315_5296.cpp
+++ b/src/mame/machine/315_5296.cpp
@@ -31,7 +31,7 @@ const device_type SEGA_315_5296 = &device_creator<sega_315_5296_device>;
// sega_315_5296_device - constructor
//-------------------------------------------------
-sega_315_5296_device::sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+sega_315_5296_device::sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGA_315_5296, "Sega 315-5296 I/O", tag, owner, clock, "315_5296", __FILE__),
m_in_pa_cb(*this),
m_in_pb_cb(*this),
diff --git a/src/mame/machine/315_5296.h b/src/mame/machine/315_5296.h
index b28b465b573..0e2c2229611 100644
--- a/src/mame/machine/315_5296.h
+++ b/src/mame/machine/315_5296.h
@@ -72,7 +72,7 @@
class sega_315_5296_device : public device_t
{
public:
- sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast<sega_315_5296_device &>(device).m_in_pa_cb.set_callback(object); }
@@ -100,7 +100,7 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
- UINT8 debug_peek_output(offs_t offset) { return m_output_latch[offset & 7]; }
+ uint8_t debug_peek_output(offs_t offset) { return m_output_latch[offset & 7]; }
protected:
// device-level overrides
@@ -134,9 +134,9 @@ private:
devcb_write8 *m_out_port_cb[8];
devcb_write_line *m_out_cnt_cb[3];
- UINT8 m_output_latch[8];
- UINT8 m_cnt;
- UINT8 m_dir;
+ uint8_t m_output_latch[8];
+ uint8_t m_cnt;
+ uint8_t m_dir;
};
// device type definition
diff --git a/src/mame/machine/3do.cpp b/src/mame/machine/3do.cpp
index 6a9d5e23b7a..9f1ef4208da 100644
--- a/src/mame/machine/3do.cpp
+++ b/src/mame/machine/3do.cpp
@@ -102,7 +102,7 @@ IRQ1
0x00000001 DMA Player bus
*/
-void _3do_state::m_3do_request_fiq(UINT32 irq_req, UINT8 type)
+void _3do_state::m_3do_request_fiq(uint32_t irq_req, uint8_t type)
{
if(type)
m_clio.irq1 |= irq_req;
@@ -130,8 +130,8 @@ TIMER_DEVICE_CALLBACK_MEMBER( _3do_state::timer_x16_cb )
--x- reload flag
---x decrement flag (enable)
*/
- UINT8 timer_flag;
- UINT8 carry_val;
+ uint8_t timer_flag;
+ uint8_t carry_val;
carry_val = 1;
@@ -197,7 +197,7 @@ WRITE8_MEMBER(_3do_state::_3do_nvarea_w) { m_nvmem[offset] = data; }
*/
READ32_MEMBER(_3do_state::_3do_slow2_r){
- UINT32 data = 0;
+ uint32_t data = 0;
logerror( "%08X: UNK_318 read offset = %08X\n", m_maincpu->pc(), offset );
@@ -235,8 +235,8 @@ WRITE32_MEMBER(_3do_state::_3do_slow2_w)
READ32_MEMBER(_3do_state::_3do_svf_r)
{
- UINT32 addr = ( offset & ( 0x07fc / 4 ) ) << 9;
- UINT32 *p = m_vram + addr;
+ uint32_t addr = ( offset & ( 0x07fc / 4 ) ) << 9;
+ uint32_t *p = m_vram + addr;
logerror( "%08X: SVF read offset = %08X\n", m_maincpu->pc(), offset*4 );
@@ -260,8 +260,8 @@ READ32_MEMBER(_3do_state::_3do_svf_r)
WRITE32_MEMBER(_3do_state::_3do_svf_w)
{
- UINT32 addr = ( offset & ( 0x07fc / 4 ) ) << 9;
- UINT32 *p = m_vram + addr;
+ uint32_t addr = ( offset & ( 0x07fc / 4 ) ) << 9;
+ uint32_t *p = m_vram + addr;
logerror( "%08X: SVF write offset = %08X, data = %08X, mask = %08X\n", m_maincpu->pc(), offset*4, data, mem_mask );
@@ -269,7 +269,7 @@ WRITE32_MEMBER(_3do_state::_3do_svf_w)
{
case 0x0000/4: /* SPORT transfer */
{
- UINT32 keep_bits = data ^ 0xffffffff;
+ uint32_t keep_bits = data ^ 0xffffffff;
for ( int i = 0; i < 512; i++ )
{
@@ -282,8 +282,8 @@ WRITE32_MEMBER(_3do_state::_3do_svf_w)
break;
case 0x4000/4: /* Flash write */
{
- UINT32 keep_bits = data ^ 0xffffffff;
- UINT32 new_bits = m_svf.color & data;
+ uint32_t keep_bits = data ^ 0xffffffff;
+ uint32_t new_bits = m_svf.color & data;
for ( int i = 0; i < 512; i++ )
{
@@ -663,7 +663,7 @@ READ32_MEMBER(_3do_state::_3do_clio_r)
/* TODO: for debug, to be removed once that we write the CPU core */
if(offset >= 0x3800/4 && offset <= 0x39ff/4)
{
- UINT32 res = 0;
+ uint32_t res = 0;
offset &= (0x1ff/4);
res = (m_dspp.EO[(offset<<1)+0] << 16);
res |= (m_dspp.EO[(offset<<1)+1] & 0xffff);
@@ -672,7 +672,7 @@ READ32_MEMBER(_3do_state::_3do_clio_r)
if(offset >= 0x3c00/4 && offset <= 0x3fff/4)
{
- UINT16 res;
+ uint16_t res;
offset &= (0x3ff/4);
res = m_dspp.EO[offset] & 0xffff;
return res;
@@ -926,16 +926,16 @@ WRITE32_MEMBER(_3do_state::_3do_clio_w)
break;
case 0x0200/4:
- m_clio.timer_ctrl |= (UINT64)data;
+ m_clio.timer_ctrl |= (uint64_t)data;
break;
case 0x0204/4:
- m_clio.timer_ctrl &= ~(UINT64)data;
+ m_clio.timer_ctrl &= ~(uint64_t)data;
break;
case 0x0208/4:
- m_clio.timer_ctrl |= ((UINT64)data << 32);
+ m_clio.timer_ctrl |= ((uint64_t)data << 32);
break;
case 0x020c/4:
- m_clio.timer_ctrl &= ~((UINT64)data << 32);
+ m_clio.timer_ctrl &= ~((uint64_t)data << 32);
break;
case 0x0220/4:
@@ -1036,20 +1036,20 @@ VIDEO_START_MEMBER(_3do_state,_3do)
}
-UINT32 _3do_state::screen_update__3do(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+uint32_t _3do_state::screen_update__3do(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- UINT32 *source_p = m_vram + 0x1c0000 / 4;
+ uint32_t *source_p = m_vram + 0x1c0000 / 4;
for ( int y = 0; y < 120; y++ )
{
- UINT32 *dest_p0 = &bitmap.pix32(22 + y * 2, 254 );
- UINT32 *dest_p1 = &bitmap.pix32(22 + y * 2 + 1, 254 );
+ uint32_t *dest_p0 = &bitmap.pix32(22 + y * 2, 254 );
+ uint32_t *dest_p1 = &bitmap.pix32(22 + y * 2 + 1, 254 );
for ( int x = 0; x < 320; x++ )
{
/* Every dword contains two pixels, upper word is top pixel, lower is bottom. */
- UINT32 lower = *source_p & 0xffff;
- UINT32 upper = ( *source_p >> 16 ) & 0xffff;
+ uint32_t lower = *source_p & 0xffff;
+ uint32_t upper = ( *source_p >> 16 ) & 0xffff;
int r, g, b;
/* Format is RGB555 */
@@ -1112,13 +1112,13 @@ void _3do_state::m_3do_clio_init( screen_device *screen )
m_clio.revision = 0x02022000 /* 0x04000000 */;
m_clio.unclerev = 0x03800000;
m_clio.expctl = 0x80; /* ARM has the expansion bus */
- m_dspp.N = std::make_unique<UINT16[]>(0x800 );
- m_dspp.EI = std::make_unique<UINT16[]>(0x400 );
- m_dspp.EO = std::make_unique<UINT16[]>(0x400 );
+ m_dspp.N = std::make_unique<uint16_t[]>(0x800 );
+ m_dspp.EI = std::make_unique<uint16_t[]>(0x400 );
+ m_dspp.EO = std::make_unique<uint16_t[]>(0x400 );
- memset(m_dspp.N.get(), 0, sizeof(UINT16) * 0x400);
- memset(m_dspp.EI.get(), 0, sizeof(UINT16) * 0x400);
- memset(m_dspp.EO.get(), 0, sizeof(UINT16) * 0x400);
+ memset(m_dspp.N.get(), 0, sizeof(uint16_t) * 0x400);
+ memset(m_dspp.EI.get(), 0, sizeof(uint16_t) * 0x400);
+ memset(m_dspp.EO.get(), 0, sizeof(uint16_t) * 0x400);
save_pointer(NAME(m_dspp.N.get()), 0x800);
save_pointer(NAME(m_dspp.EI.get()), 0x400);
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp
index dca01ed0a31..ce07281231f 100644
--- a/src/mame/machine/6883sam.cpp
+++ b/src/mame/machine/6883sam.cpp
@@ -70,7 +70,7 @@ const device_type SAM6883 = &device_creator<sam6883_device>;
// ctor
//-------------------------------------------------
-sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SAM6883, "SAM6883", tag, owner, clock, "sam6883", __FILE__),
m_cpu_tag(nullptr),
m_cpu_space_ref(AS_PROGRAM),
@@ -119,7 +119,7 @@ void sam6883_device::device_start()
// configure_bank - bank configuration
//-------------------------------------------------
-void sam6883_device::configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only)
+void sam6883_device::configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only)
{
configure_bank(bank, memory, memory_size, is_read_only, read8_delegate(), write8_delegate());
}
@@ -141,7 +141,7 @@ void sam6883_device::configure_bank(int bank, read8_delegate rhandler, write8_de
// configure_bank - bank configuration
//-------------------------------------------------
-void sam6883_device::configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler)
+void sam6883_device::configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler)
{
assert((bank >= 0) && (bank < ARRAY_LENGTH(m_banks)));
m_banks[bank].m_memory = memory;
@@ -276,7 +276,7 @@ void sam6883_device::update_memory(void)
else
{
// ROM/RAM
- UINT16 ram_base = (m_sam_state & SAM_STATE_P1) ? 0x8000 : 0x0000;
+ uint16_t ram_base = (m_sam_state & SAM_STATE_P1) ? 0x8000 : 0x0000;
m_space_0000.point(&m_banks[0], ram_base, m_banks[0].m_memory_size);
m_counter_mask = 0x7FFF;
m_counter_or = ram_base;
@@ -367,7 +367,7 @@ READ8_MEMBER( sam6883_device::read )
WRITE8_MEMBER( sam6883_device::write )
{
/* alter the SAM state */
- UINT16 xorval = alter_sam_state(offset);
+ uint16_t xorval = alter_sam_state(offset);
/* based on the mask, apply effects */
if (xorval & (SAM_STATE_TY|SAM_STATE_M1|SAM_STATE_M0|SAM_STATE_P1))
@@ -445,7 +445,7 @@ WRITE_LINE_MEMBER( sam6883_device::hs_w )
// sam_space::ctor
//-------------------------------------------------
-template<UINT16 _addrstart, UINT16 _addrend>
+template<uint16_t _addrstart, uint16_t _addrend>
sam6883_device::sam_space<_addrstart, _addrend>::sam_space(sam6883_device &owner)
: m_owner(owner)
{
@@ -460,7 +460,7 @@ sam6883_device::sam_space<_addrstart, _addrend>::sam_space(sam6883_device &owner
// sam_space::cpu_space
//-------------------------------------------------
-template<UINT16 _addrstart, UINT16 _addrend>
+template<uint16_t _addrstart, uint16_t _addrend>
address_space &sam6883_device::sam_space<_addrstart, _addrend>::cpu_space() const
{
assert(m_owner.m_cpu_space != nullptr);
@@ -473,8 +473,8 @@ address_space &sam6883_device::sam_space<_addrstart, _addrend>::cpu_space() cons
// sam_space::point
//-------------------------------------------------
-template<UINT16 _addrstart, UINT16 _addrend>
-void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank, UINT16 offset, UINT32 length)
+template<uint16_t _addrstart, uint16_t _addrend>
+void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank, uint16_t offset, uint32_t length)
{
if (LOG_SAM)
{
@@ -496,8 +496,8 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank
//-------------------------------------------------
// sam_space::point_specific_bank
//-------------------------------------------------
-template<UINT16 _addrstart, UINT16 _addrend>
-void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const sam_bank *bank, UINT32 offset, UINT32 length, memory_bank *&memory_bank, UINT32 addrstart, UINT32 addrend, bool is_write)
+template<uint16_t _addrstart, uint16_t _addrend>
+void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const sam_bank *bank, uint32_t offset, uint32_t length, memory_bank *&memory_bank, uint32_t addrstart, uint32_t addrend, bool is_write)
{
if (bank->m_memory != nullptr)
{
@@ -513,7 +513,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const
auto tag = string_format("bank%04X_%c", addrstart, is_write ? 'w' : 'r');
// determine "nop_addrstart" - where the bank ends, and above which is AM_NOP
- UINT32 nop_addrstart = (length != ~0)
+ uint32_t nop_addrstart = (length != ~0)
? std::min(addrend + 1, addrstart + length)
: addrend + 1;
@@ -552,7 +552,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const
{
// this bank uses handlers - first thing's first, assert that we are not doing
// any weird stuff with offfsets and lengths - that isn't supported in this path
- assert((offset == 0) && (length == (UINT32)~0));
+ assert((offset == 0) && (length == (uint32_t)~0));
if (is_write)
{
diff --git a/src/mame/machine/6883sam.h b/src/mame/machine/6883sam.h
index f3a42f1f528..fc0258df3f9 100644
--- a/src/mame/machine/6883sam.h
+++ b/src/mame/machine/6883sam.h
@@ -35,48 +35,48 @@ public:
protected:
// SAM state constants
- static const UINT16 SAM_STATE_TY = 0x8000;
- static const UINT16 SAM_STATE_M1 = 0x4000;
- static const UINT16 SAM_STATE_M0 = 0x2000;
- static const UINT16 SAM_STATE_R1 = 0x1000;
- static const UINT16 SAM_STATE_R0 = 0x0800;
- static const UINT16 SAM_STATE_P1 = 0x0400;
- static const UINT16 SAM_STATE_F6 = 0x0200;
- static const UINT16 SAM_STATE_F5 = 0x0100;
- static const UINT16 SAM_STATE_F4 = 0x0080;
- static const UINT16 SAM_STATE_F3 = 0x0040;
- static const UINT16 SAM_STATE_F2 = 0x0020;
- static const UINT16 SAM_STATE_F1 = 0x0010;
- static const UINT16 SAM_STATE_F0 = 0x0008;
- static const UINT16 SAM_STATE_V2 = 0x0004;
- static const UINT16 SAM_STATE_V1 = 0x0002;
- static const UINT16 SAM_STATE_V0 = 0x0001;
+ static const uint16_t SAM_STATE_TY = 0x8000;
+ static const uint16_t SAM_STATE_M1 = 0x4000;
+ static const uint16_t SAM_STATE_M0 = 0x2000;
+ static const uint16_t SAM_STATE_R1 = 0x1000;
+ static const uint16_t SAM_STATE_R0 = 0x0800;
+ static const uint16_t SAM_STATE_P1 = 0x0400;
+ static const uint16_t SAM_STATE_F6 = 0x0200;
+ static const uint16_t SAM_STATE_F5 = 0x0100;
+ static const uint16_t SAM_STATE_F4 = 0x0080;
+ static const uint16_t SAM_STATE_F3 = 0x0040;
+ static const uint16_t SAM_STATE_F2 = 0x0020;
+ static const uint16_t SAM_STATE_F1 = 0x0010;
+ static const uint16_t SAM_STATE_F0 = 0x0008;
+ static const uint16_t SAM_STATE_V2 = 0x0004;
+ static const uint16_t SAM_STATE_V1 = 0x0002;
+ static const uint16_t SAM_STATE_V0 = 0x0001;
// incidentals
cpu_device * m_cpu;
// device state
- UINT16 m_sam_state;
+ uint16_t m_sam_state;
- ATTR_FORCE_INLINE UINT16 display_offset(void)
+ ATTR_FORCE_INLINE uint16_t display_offset(void)
{
return ((m_sam_state & (SAM_STATE_F0|SAM_STATE_F1|SAM_STATE_F2|SAM_STATE_F3|SAM_STATE_F4|SAM_STATE_F5|SAM_STATE_F6)) / SAM_STATE_F0) << 9;
}
- ATTR_FORCE_INLINE UINT16 alter_sam_state(offs_t offset)
+ ATTR_FORCE_INLINE uint16_t alter_sam_state(offs_t offset)
{
/* determine the mask */
- UINT16 mask = 1 << (offset >> 1);
+ uint16_t mask = 1 << (offset >> 1);
/* determine the new state */
- UINT16 new_state;
+ uint16_t new_state;
if (offset & 0x0001)
new_state = m_sam_state | mask;
else
new_state = m_sam_state & ~mask;
/* specify the new state */
- UINT16 xorval = m_sam_state ^ new_state;
+ uint16_t xorval = m_sam_state ^ new_state;
m_sam_state = new_state;
return xorval;
}
@@ -87,7 +87,7 @@ protected:
class sam6883_device : public device_t, public sam6883_friend_device
{
public:
- sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_res_rd_callback(device_t &device, _Object object) { return downcast<sam6883_device &>(device).m_read_res.set_callback(object); }
@@ -99,7 +99,7 @@ public:
}
// called to configure banks
- void configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only);
+ void configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only);
void configure_bank(int bank, read8_delegate rhandler, write8_delegate whandler);
// typically called by VDG
@@ -142,8 +142,8 @@ private:
// points to with the S2/S1/S0 output
struct sam_bank
{
- UINT8 * m_memory;
- UINT32 m_memory_size;
+ uint8_t * m_memory;
+ uint32_t m_memory_size;
offs_t m_memory_offset;
bool m_memory_read_only;
read8_delegate m_rhandler;
@@ -152,21 +152,21 @@ private:
// represents one of the memory "spaces" (e.g. - $8000-$9FFF) that
// can ultimately point to a bank
- template<UINT16 _addrstart, UINT16 _addrend>
+ template<uint16_t _addrstart, uint16_t _addrend>
class sam_space
{
public:
sam_space(sam6883_device &owner);
- void point(const sam_bank *bank, UINT16 offset, UINT32 length = ~0);
+ void point(const sam_bank *bank, uint16_t offset, uint32_t length = ~0);
private:
sam6883_device & m_owner;
memory_bank * m_read_bank;
memory_bank * m_write_bank;
- UINT32 m_length;
+ uint32_t m_length;
address_space &cpu_space() const;
- void point_specific_bank(const sam_bank *bank, UINT32 offset, UINT32 mask, memory_bank *&memory_bank, UINT32 addrstart, UINT32 addrend, bool is_write);
+ void point_specific_bank(const sam_bank *bank, uint32_t offset, uint32_t mask, memory_bank *&memory_bank, uint32_t addrstart, uint32_t addrend, bool is_write);
};
const char * m_cpu_tag;
@@ -185,16 +185,16 @@ private:
sam_space<0xFF40, 0xFF5F> m_space_FF40;
sam_space<0xFF60, 0xFFBF> m_space_FF60;
sam_space<0xFFE0, 0xFFFF> m_space_FFE0;
- UINT16 m_counter_mask;
- UINT16 m_counter_or;
+ uint16_t m_counter_mask;
+ uint16_t m_counter_or;
// SAM state
- UINT16 m_counter;
- UINT8 m_counter_xdiv;
- UINT8 m_counter_ydiv;
+ uint16_t m_counter;
+ uint8_t m_counter_xdiv;
+ uint8_t m_counter_ydiv;
// dummy scratch memory
- UINT8 m_dummy[0x8000];
+ uint8_t m_dummy[0x8000];
// typically called by CPU
DECLARE_READ8_MEMBER( read );
@@ -203,7 +203,7 @@ private:
// called when there is a carry out of bit 3 on the counter
ATTR_FORCE_INLINE void counter_carry_bit3(void)
{
- UINT8 x_division;
+ uint8_t x_division;
switch((m_sam_state & (SAM_STATE_V2|SAM_STATE_V1|SAM_STATE_V0)) / SAM_STATE_V0)
{
case 0x00: x_division = 1; break;
@@ -231,7 +231,7 @@ private:
// called when there is a carry out of bit 4 on the counter
ATTR_FORCE_INLINE void counter_carry_bit4(void)
{
- UINT8 y_division;
+ uint8_t y_division;
switch((m_sam_state & (SAM_STATE_V2|SAM_STATE_V1|SAM_STATE_V0)) / SAM_STATE_V0)
{
case 0x00: y_division = 12; break;
@@ -255,7 +255,7 @@ private:
}
// other members
- void configure_bank(int bank, UINT8 *memory, UINT32 memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler);
+ void configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only, read8_delegate rhandler, write8_delegate whandler);
void horizontal_sync(void);
void update_state(void);
void update_memory(void);
diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp
index 0c1642597a6..8a797394157 100644
--- a/src/mame/machine/abc1600mac.cpp
+++ b/src/mame/machine/abc1600mac.cpp
@@ -108,7 +108,7 @@ const tiny_rom_entry *abc1600_mac_device::device_rom_region() const
// abc1600_mac_device - constructor
//-------------------------------------------------
-abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ABC1600_MAC, "ABC 1600 MAC", tag, owner, clock, "abc1600mac", __FILE__),
device_memory_interface(mconfig, *this),
m_space_config("program", ENDIANNESS_LITTLE, 8, 22, 0, *ADDRESS_MAP_NAME(program_map)),
@@ -202,7 +202,7 @@ offs_t abc1600_mac_device::get_segment_address(offs_t offset)
// get_page_address -
//-------------------------------------------------
-offs_t abc1600_mac_device::get_page_address(offs_t offset, UINT8 segd)
+offs_t abc1600_mac_device::get_page_address(offs_t offset, uint8_t segd)
{
return ((segd & 0x3f) << 4) | ((offset >> 11) & 0x0f);
}
@@ -216,11 +216,11 @@ offs_t abc1600_mac_device::translate_address(offs_t offset, int *nonx, int *wp)
{
// segment
offs_t sega = get_segment_address(offset);
- UINT8 segd = m_segment_ram[sega];
+ uint8_t segd = m_segment_ram[sega];
// page
offs_t pga = get_page_address(offset, segd);
- UINT16 page_data = m_page_ram[pga];
+ uint16_t page_data = m_page_ram[pga];
offs_t virtual_offset = ((page_data & 0x3ff) << 11) | (offset & 0x7ff);
@@ -244,7 +244,7 @@ offs_t abc1600_mac_device::translate_address(offs_t offset, int *nonx, int *wp)
// read_user_memory -
//-------------------------------------------------
-UINT8 abc1600_mac_device::read_user_memory(offs_t offset)
+uint8_t abc1600_mac_device::read_user_memory(offs_t offset)
{
int nonx = 0, wp = 0;
offs_t virtual_offset = translate_address(offset, &nonx, &wp);
@@ -257,7 +257,7 @@ UINT8 abc1600_mac_device::read_user_memory(offs_t offset)
// write_user_memory -
//-------------------------------------------------
-void abc1600_mac_device::write_user_memory(offs_t offset, UINT8 data)
+void abc1600_mac_device::write_user_memory(offs_t offset, uint8_t data)
{
int nonx = 0, wp = 0;
offs_t virtual_offset = translate_address(offset, &nonx, &wp);
@@ -272,9 +272,9 @@ void abc1600_mac_device::write_user_memory(offs_t offset, UINT8 data)
// read_supervisor_memory -
//-------------------------------------------------
-UINT8 abc1600_mac_device::read_supervisor_memory(address_space &space, offs_t offset)
+uint8_t abc1600_mac_device::read_supervisor_memory(address_space &space, offs_t offset)
{
- UINT8 data = 0;
+ uint8_t data = 0;
if (!A2 && !A1)
{
@@ -300,7 +300,7 @@ UINT8 abc1600_mac_device::read_supervisor_memory(address_space &space, offs_t of
// write_supervisor_memory -
//-------------------------------------------------
-void abc1600_mac_device::write_supervisor_memory(address_space &space, offs_t offset, UINT8 data)
+void abc1600_mac_device::write_supervisor_memory(address_space &space, offs_t offset, uint8_t data)
{
if (!A2 && !A1)
{
@@ -326,7 +326,7 @@ void abc1600_mac_device::write_supervisor_memory(address_space &space, offs_t of
int abc1600_mac_device::get_fc()
{
- UINT16 fc = m_cpu->get_fc();
+ uint16_t fc = m_cpu->get_fc();
m_ifc2 = !(!(MAGIC || FC0) || FC2);
@@ -342,7 +342,7 @@ READ8_MEMBER( abc1600_mac_device::read )
{
int fc = get_fc();
- UINT8 data = 0;
+ uint8_t data = 0;
if (!BOOTE && !A19 && !A18 && !A17)
{
@@ -402,7 +402,7 @@ READ8_MEMBER( abc1600_mac_device::cause_r )
*/
- UINT8 data = 0x02;
+ uint8_t data = 0x02;
// DMA status
data |= m_cause;
@@ -462,7 +462,7 @@ READ8_MEMBER( abc1600_mac_device::segment_r )
*/
offs_t sega = get_segment_address(offset);
- UINT8 segd = m_segment_ram[sega];
+ uint8_t segd = m_segment_ram[sega];
return (READ_MAGIC << 7) | (segd & 0x7f);
}
@@ -529,13 +529,13 @@ READ8_MEMBER( abc1600_mac_device::page_r )
// segment
offs_t sega = get_segment_address(offset);
- UINT8 segd = m_segment_ram[sega];
+ uint8_t segd = m_segment_ram[sega];
// page
offs_t pga = get_page_address(offset, segd);
- UINT16 pgd = m_page_ram[pga];
+ uint16_t pgd = m_page_ram[pga];
- UINT8 data = 0;
+ uint8_t data = 0;
if (A0)
{
@@ -584,7 +584,7 @@ WRITE8_MEMBER( abc1600_mac_device::page_w )
// segment
offs_t sega = get_segment_address(offset);
- UINT8 segd = m_segment_ram[sega];
+ uint8_t segd = m_segment_ram[sega];
// page
offs_t pga = get_page_address(offset, segd);
@@ -606,11 +606,11 @@ WRITE8_MEMBER( abc1600_mac_device::page_w )
// get_dma_address -
//-------------------------------------------------
-offs_t abc1600_mac_device::get_dma_address(int index, UINT16 offset)
+offs_t abc1600_mac_device::get_dma_address(int index, uint16_t offset)
{
// A0 = DMA15, A1 = BA1, A2 = BA2
- UINT8 dmamap_addr = index | BIT(offset, 15);
- UINT8 dmamap = m_dmamap[dmamap_addr];
+ uint8_t dmamap_addr = index | BIT(offset, 15);
+ uint8_t dmamap = m_dmamap[dmamap_addr];
m_cause = (dmamap & 0x1f) << 3;
@@ -622,7 +622,7 @@ offs_t abc1600_mac_device::get_dma_address(int index, UINT16 offset)
// dma_mreq_r - DMA memory read
//-------------------------------------------------
-UINT8 abc1600_mac_device::dma_mreq_r(int index, UINT16 offset)
+uint8_t abc1600_mac_device::dma_mreq_r(int index, uint16_t offset)
{
offs_t virtual_offset = get_dma_address(index, offset);
@@ -636,7 +636,7 @@ UINT8 abc1600_mac_device::dma_mreq_r(int index, UINT16 offset)
// dma_mreq_w - DMA memory write
//-------------------------------------------------
-void abc1600_mac_device::dma_mreq_w(int index, UINT16 offset, UINT8 data)
+void abc1600_mac_device::dma_mreq_w(int index, uint16_t offset, uint8_t data)
{
offs_t virtual_offset = get_dma_address(index, offset);
@@ -650,7 +650,7 @@ void abc1600_mac_device::dma_mreq_w(int index, UINT16 offset, UINT8 data)
// dma_iorq_r - DMA I/O read
//-------------------------------------------------
-UINT8 abc1600_mac_device::dma_iorq_r(int index, UINT16 offset)
+uint8_t abc1600_mac_device::dma_iorq_r(int index, uint16_t offset)
{
offs_t virtual_offset = 0x1fe000 | get_dma_address(index, offset);
@@ -664,7 +664,7 @@ UINT8 abc1600_mac_device::dma_iorq_r(int index, UINT16 offset)
// dma_iorq_w - DMA I/O write
//-------------------------------------------------
-void abc1600_mac_device::dma_iorq_w(int index, UINT16 offset, UINT8 data)
+void abc1600_mac_device::dma_iorq_w(int index, uint16_t offset, uint8_t data)
{
offs_t virtual_offset = 0x1fe000 | get_dma_address(index, offset);
diff --git a/src/mame/machine/abc1600mac.h b/src/mame/machine/abc1600mac.h
index 207e3d9e5f2..0cd3adfbdfe 100644
--- a/src/mame/machine/abc1600mac.h
+++ b/src/mame/machine/abc1600mac.h
@@ -46,7 +46,7 @@ class abc1600_mac_device : public device_t,
public device_memory_interface
{
public:
- abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -101,24 +101,24 @@ private:
int get_current_task(offs_t offset);
offs_t get_segment_address(offs_t offset);
- offs_t get_page_address(offs_t offset, UINT8 segd);
+ offs_t get_page_address(offs_t offset, uint8_t segd);
offs_t translate_address(offs_t offset, int *nonx, int *wp);
- UINT8 read_user_memory(offs_t offset);
- void write_user_memory(offs_t offset, UINT8 data);
+ uint8_t read_user_memory(offs_t offset);
+ void write_user_memory(offs_t offset, uint8_t data);
int get_fc();
- UINT8 read_supervisor_memory(address_space &space, offs_t offset);
- void write_supervisor_memory(address_space &space, offs_t offset, UINT8 data);
- offs_t get_dma_address(int index, UINT16 offset);
- UINT8 dma_mreq_r(int index, UINT16 offset);
- void dma_mreq_w(int index, UINT16 offset, UINT8 data);
- UINT8 dma_iorq_r(int index, UINT16 offset);
- void dma_iorq_w(int index, UINT16 offset, UINT8 data);
+ uint8_t read_supervisor_memory(address_space &space, offs_t offset);
+ void write_supervisor_memory(address_space &space, offs_t offset, uint8_t data);
+ offs_t get_dma_address(int index, uint16_t offset);
+ uint8_t dma_mreq_r(int index, uint16_t offset);
+ void dma_mreq_w(int index, uint16_t offset, uint8_t data);
+ uint8_t dma_iorq_r(int index, uint16_t offset);
+ void dma_iorq_w(int index, uint16_t offset, uint8_t data);
const address_space_config m_space_config;
required_memory_region m_rom;
- optional_shared_ptr<UINT8> m_segment_ram;
- optional_shared_ptr<UINT16> m_page_ram;
+ optional_shared_ptr<uint8_t> m_segment_ram;
+ optional_shared_ptr<uint16_t> m_page_ram;
required_device<watchdog_timer_device> m_watchdog;
@@ -126,9 +126,9 @@ private:
m68000_base_device *m_cpu;
int m_ifc2;
- UINT8 m_task;
- UINT8 m_dmamap[8];
- UINT8 m_cause;
+ uint8_t m_task;
+ uint8_t m_dmamap[8];
+ uint8_t m_cause;
};
diff --git a/src/mame/machine/abc80kb.cpp b/src/mame/machine/abc80kb.cpp
index c5d7e4dfeb0..6c6c8509697 100644
--- a/src/mame/machine/abc80kb.cpp
+++ b/src/mame/machine/abc80kb.cpp
@@ -167,7 +167,7 @@ ioport_constructor abc80_keyboard_device::device_input_ports() const
// abc80_keyboard_device - constructor
//-------------------------------------------------
-abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ABC80_KEYBOARD, "ABC-80 Keyboard", tag, owner, clock, "abc80kb", __FILE__),
m_write_keydown(*this),
m_maincpu(*this, I8048_TAG)
@@ -199,7 +199,7 @@ void abc80_keyboard_device::device_reset()
// data_r - keyboard data read
//-------------------------------------------------
-UINT8 abc80_keyboard_device::data_r()
+uint8_t abc80_keyboard_device::data_r()
{
return 0;
}
diff --git a/src/mame/machine/abc80kb.h b/src/mame/machine/abc80kb.h
index 134d3f59e91..6a2b17101ed 100644
--- a/src/mame/machine/abc80kb.h
+++ b/src/mame/machine/abc80kb.h
@@ -43,7 +43,7 @@ class abc80_keyboard_device : public device_t
{
public:
// construction/destruction
- abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_keydown_wr_callback(device_t &device, _Object object) { return downcast<abc80_keyboard_device &>(device).m_write_keydown.set_callback(object); }
@@ -52,7 +52,7 @@ public:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
- UINT8 data_r();
+ uint8_t data_r();
protected:
// device-level overrides
diff --git a/src/mame/machine/ac1.cpp b/src/mame/machine/ac1.cpp
index e504807ef96..cfb7387f211 100644
--- a/src/mame/machine/ac1.cpp
+++ b/src/mame/machine/ac1.cpp
@@ -15,7 +15,7 @@
READ8_MEMBER(ac1_state::ac1_port_b_r)
{
- UINT8 data = 0x7f;
+ uint8_t data = 0x7f;
if (m_cassette->input() > 0.03)
data |= 0x80;
@@ -27,30 +27,30 @@ READ8_MEMBER(ac1_state::ac1_port_b_r)
READ8_MEMBER(ac1_state::ac1_port_a_r)
{
- UINT8 line0 = m_io_line[0]->read();
- UINT8 line1 = m_io_line[1]->read();
- UINT8 line2 = m_io_line[2]->read();
- UINT8 line3 = m_io_line[3]->read();
- UINT8 line4 = m_io_line[4]->read();
- UINT8 line5 = m_io_line[5]->read();
- UINT8 line6 = m_io_line[6]->read();
-
- UINT8 SH = BNOT(BIT(line6,0));
- UINT8 CTRL = BNOT(BIT(line6,1));
- UINT8 SPACE = BIT(line6,2);
- UINT8 ENTER = BIT(line6,3);
- UINT8 BACK = BIT(line6,4);
-
- UINT8 all = line0 | line1 | line2 | line3 | line4 | line5;
- UINT8 s1 = BNOT(BIT(all,0));UINT8 z1 = (line0 !=0) ? 0 : 1;
- UINT8 s2 = BNOT(BIT(all,1));UINT8 z2 = (line1 !=0) ? 0 : 1;
- UINT8 s3 = BNOT(BIT(all,2));UINT8 z3 = (line2 !=0) ? 0 : 1;
- UINT8 s4 = BNOT(BIT(all,3));UINT8 z4 = (line3 !=0) ? 0 : 1;
- UINT8 s5 = BNOT(BIT(all,4));UINT8 z5 = (line4 !=0) ? 0 : 1;
- UINT8 s6 = BNOT(BIT(all,5));UINT8 z6 = (line5 !=0) ? 0 : 1;
- UINT8 s7 = BNOT(BIT(all,6));
- UINT8 s8 = BNOT(BIT(all,7));
- UINT8 tast,td0,td1,td2,td3,td4,td5,td6,dg5;
+ uint8_t line0 = m_io_line[0]->read();
+ uint8_t line1 = m_io_line[1]->read();
+ uint8_t line2 = m_io_line[2]->read();
+ uint8_t line3 = m_io_line[3]->read();
+ uint8_t line4 = m_io_line[4]->read();
+ uint8_t line5 = m_io_line[5]->read();
+ uint8_t line6 = m_io_line[6]->read();
+
+ uint8_t SH = BNOT(BIT(line6,0));
+ uint8_t CTRL = BNOT(BIT(line6,1));
+ uint8_t SPACE = BIT(line6,2);
+ uint8_t ENTER = BIT(line6,3);
+ uint8_t BACK = BIT(line6,4);
+
+ uint8_t all = line0 | line1 | line2 | line3 | line4 | line5;
+ uint8_t s1 = BNOT(BIT(all,0));uint8_t z1 = (line0 !=0) ? 0 : 1;
+ uint8_t s2 = BNOT(BIT(all,1));uint8_t z2 = (line1 !=0) ? 0 : 1;
+ uint8_t s3 = BNOT(BIT(all,2));uint8_t z3 = (line2 !=0) ? 0 : 1;
+ uint8_t s4 = BNOT(BIT(all,3));uint8_t z4 = (line3 !=0) ? 0 : 1;
+ uint8_t s5 = BNOT(BIT(all,4));uint8_t z5 = (line4 !=0) ? 0 : 1;
+ uint8_t s6 = BNOT(BIT(all,5));uint8_t z6 = (line5 !=0) ? 0 : 1;
+ uint8_t s7 = BNOT(BIT(all,6));
+ uint8_t s8 = BNOT(BIT(all,7));
+ uint8_t tast,td0,td1,td2,td3,td4,td5,td6,dg5;
/* Additional double keys */
if (SPACE) {
diff --git a/src/mame/machine/acitya.cpp b/src/mame/machine/acitya.cpp
index f986e9fa00d..68b7aec03e8 100644
--- a/src/mame/machine/acitya.cpp
+++ b/src/mame/machine/acitya.cpp
@@ -22,7 +22,7 @@ void pacman_state::acitya_decrypt_rom_8()
{
int oldbyte,inverted_oldbyte,newbyte;
int mem;
- UINT8 *RAM;
+ uint8_t *RAM;
RAM = memregion("maincpu")->base();
@@ -57,7 +57,7 @@ void pacman_state::acitya_decrypt_rom_9()
{
int oldbyte,inverted_oldbyte,newbyte;
int mem;
- UINT8 *RAM;
+ uint8_t *RAM;
RAM = memregion("maincpu")->base();
@@ -89,7 +89,7 @@ void pacman_state::acitya_decrypt_rom_A()
{
int oldbyte,inverted_oldbyte,newbyte;
int mem;
- UINT8 *RAM;
+ uint8_t *RAM;
RAM = memregion("maincpu")->base();
@@ -121,7 +121,7 @@ void pacman_state::acitya_decrypt_rom_B()
{
int oldbyte,inverted_oldbyte,newbyte;
int mem;
- UINT8 *RAM;
+ uint8_t *RAM;
RAM = memregion("maincpu")->base();
@@ -180,7 +180,7 @@ READ8_MEMBER(pacman_state::acitya_decrypt_rom )
MACHINE_START_MEMBER(pacman_state,acitya)
{
- UINT8 *RAM = memregion("maincpu")->base();
+ uint8_t *RAM = memregion("maincpu")->base();
/* While the PAL supports up to 16 decryption methods, only four
are actually used in the PAL. Therefore, we'll take a little
diff --git a/src/mame/machine/advision.cpp b/src/mame/machine/advision.cpp
index 792cf6b0719..d75589a9f0c 100644
--- a/src/mame/machine/advision.cpp
+++ b/src/mame/machine/advision.cpp
@@ -86,7 +86,7 @@ WRITE8_MEMBER( advision_state::bankswitch_w )
READ8_MEMBER( advision_state::ext_ram_r )
{
- UINT8 data = m_ext_ram[m_rambank + offset];
+ uint8_t data = m_ext_ram[m_rambank + offset];
if (!m_video_enable)
{
@@ -176,8 +176,8 @@ READ8_MEMBER( advision_state::vsync_r )
READ8_MEMBER( advision_state::controller_r )
{
// Get joystick switches
- UINT8 in = m_joy->read();
- UINT8 data = in | 0x0f;
+ uint8_t in = m_joy->read();
+ uint8_t data = in | 0x0f;
// Get buttons
if (in & 0x02) data = data & 0xf7; /* Button 3 */
diff --git a/src/mame/machine/aim65.cpp b/src/mame/machine/aim65.cpp
index 98ca49c57e9..c66eee06764 100644
--- a/src/mame/machine/aim65.cpp
+++ b/src/mame/machine/aim65.cpp
@@ -115,7 +115,7 @@ READ8_MEMBER( aim65_state::aim65_riot_b_r )
"keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7"
};
- UINT8 row, data = 0xff;
+ uint8_t row, data = 0xff;
/* scan keyboard rows */
for (row = 0; row < 8; row++)
@@ -185,7 +185,7 @@ WRITE8_MEMBER( aim65_state::aim65_pb_w )
d0/1 = printer data (not emulated)
*/
- UINT8 bits = data ^ m_pb_save;
+ uint8_t bits = data ^ m_pb_save;
m_pb_save = data;
if (BIT(bits, 7))
@@ -220,7 +220,7 @@ READ8_MEMBER( aim65_state::aim65_pb_r )
d3 = kb/tty switch
*/
- UINT8 data = ioport("switches")->read();
+ uint8_t data = ioport("switches")->read();
data |= (m_cassette1->input() > +0.03) ? 0x80 : 0;
data |= 0x40; // TTY must be H if not used.
data |= m_pb_save & 0x37;
@@ -287,7 +287,7 @@ device - the output will be gibberish.
bool m_flag_a;
bool m_flag_b;
bool m_printer_level;
- UINT16 *m_printerRAM;
+ uint16_t *m_printerRAM;
*/
@@ -378,7 +378,7 @@ WRITE8_MEMBER( aim65_state::aim65_pa_w )
VIDEO_START_MEMBER(aim65_state,aim65)
{
m_print_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aim65_state::aim65_printer_timer),this));
- m_printerRAM = std::make_unique<UINT16[]>((600 * 10 * 2) / 2);
+ m_printerRAM = std::make_unique<uint16_t[]>((600 * 10 * 2) / 2);
memset(m_printerRAM, 0, videoram_size);
VIDEO_START_CALL_MEMBER(generic);
m_printer_x = 0;
@@ -394,8 +394,8 @@ SCREEN_UPDATE( aim65 )
aim65_state *state = screen.machine().driver_data<aim65_state>();
/* Display printer output */
bool dir = 1;
- UINT8 b,x,pen;
- UINT16 y;
+ uint8_t b,x,pen;
+ uint16_t y;
for (y = 0; y<500; y++)
{
diff --git a/src/mame/machine/ajax.cpp b/src/mame/machine/ajax.cpp
index 5f38deb1281..4093229d307 100644
--- a/src/mame/machine/ajax.cpp
+++ b/src/mame/machine/ajax.cpp
@@ -196,8 +196,8 @@ WRITE8_MEMBER(ajax_state::bankswitch_2_w)
void ajax_state::machine_start()
{
- UINT8 *MAIN = memregion("maincpu")->base();
- UINT8 *SUB = memregion("sub")->base();
+ uint8_t *MAIN = memregion("maincpu")->base();
+ uint8_t *SUB = memregion("sub")->base();
membank("mainbank")->configure_entries(0, 4, &MAIN[0x00000], 0x2000);
membank("mainbank")->configure_entries(4, 8, &MAIN[0x10000], 0x2000);
diff --git a/src/mame/machine/alpha8201.cpp b/src/mame/machine/alpha8201.cpp
index 88813b1be9f..87c06da6370 100644
--- a/src/mame/machine/alpha8201.cpp
+++ b/src/mame/machine/alpha8201.cpp
@@ -282,7 +282,7 @@ const device_type ALPHA_8201 = &device_creator<alpha_8201_device>;
// alpha_8201_device - constructor
//-------------------------------------------------
-alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ALPHA_8201, "ALPHA-8201", tag, owner, clock, "alpha8201", __FILE__),
m_mcu(*this, "mcu")
{
@@ -295,7 +295,7 @@ alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *
void alpha_8201_device::device_start()
{
- m_shared_ram = make_unique_clear<UINT8[]>(0x400);
+ m_shared_ram = make_unique_clear<uint8_t[]>(0x400);
// zerofill
m_bus = 0;
@@ -364,7 +364,7 @@ void alpha_8201_device::mcu_update_address()
READ8_MEMBER(alpha_8201_device::mcu_data_r)
{
- UINT8 ret = 0;
+ uint8_t ret = 0;
if (m_bus && ~m_mcu_d & 4)
ret = m_shared_ram[m_mcu_address];
diff --git a/src/mame/machine/alpha8201.h b/src/mame/machine/alpha8201.h
index 1db8eb64a3a..fb24349333c 100644
--- a/src/mame/machine/alpha8201.h
+++ b/src/mame/machine/alpha8201.h
@@ -14,7 +14,7 @@
class alpha_8201_device : public device_t
{
public:
- alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~alpha_8201_device() {}
DECLARE_READ8_MEMBER(mcu_data_r);
@@ -39,10 +39,10 @@ private:
// internal state
int m_bus; // shared RAM bus direction
- UINT16 m_mcu_address; // MCU side RAM address
- UINT16 m_mcu_d; // MCU D output data
- UINT8 m_mcu_r[4]; // MCU R0-R3 output data
- std::unique_ptr<UINT8[]> m_shared_ram; // 1KB RAM
+ uint16_t m_mcu_address; // MCU side RAM address
+ uint16_t m_mcu_d; // MCU D output data
+ uint8_t m_mcu_r[4]; // MCU R0-R3 output data
+ std::unique_ptr<uint8_t[]> m_shared_ram; // 1KB RAM
void mcu_update_address();
void mcu_writeram();
diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp
index 8a8b111de72..032b14b2026 100644
--- a/src/mame/machine/amiga.cpp
+++ b/src/mame/machine/amiga.cpp
@@ -378,7 +378,7 @@ TIMER_CALLBACK_MEMBER( amiga_state::amiga_irq_proc )
// INPUTS
//**************************************************************************
-UINT16 amiga_state::joy0dat_r()
+uint16_t amiga_state::joy0dat_r()
{
if (!m_input_device.found() || (m_input_device->read() & 0x10))
return m_joy0dat_port.read_safe(0xffff);
@@ -386,7 +386,7 @@ UINT16 amiga_state::joy0dat_r()
return (m_p1_mouse_y.read_safe(0xff) << 8) | m_p1_mouse_x.read_safe(0xff);
}
-UINT16 amiga_state::joy1dat_r()
+uint16_t amiga_state::joy1dat_r()
{
if (!m_input_device.found() || m_input_device->read() & 0x20)
return m_joy1dat_port.read_safe(0xffff);
@@ -396,7 +396,7 @@ UINT16 amiga_state::joy1dat_r()
CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
{
- UINT8 bits = m_joy_ports[(int)(uintptr_t)param].read_safe(0xff);
+ uint8_t bits = m_joy_ports[(int)(uintptr_t)param].read_safe(0xff);
int up = (bits >> 0) & 1;
int down = (bits >> 1) & 1;
@@ -417,15 +417,15 @@ CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
*
*************************************/
-static UINT32 blit_ascending(amiga_state *state)
+static uint32_t blit_ascending(amiga_state *state)
{
- UINT32 shifta = (CUSTOM_REG(REG_BLTCON0) >> 12) & 0xf;
- UINT32 shiftb = (CUSTOM_REG(REG_BLTCON1) >> 12) & 0xf;
- UINT32 height = CUSTOM_REG(REG_BLTSIZV);
- UINT32 width = CUSTOM_REG(REG_BLTSIZH);
- UINT32 acca = 0, accb = 0;
- UINT32 blitsum = 0;
- UINT32 x, y;
+ uint32_t shifta = (CUSTOM_REG(REG_BLTCON0) >> 12) & 0xf;
+ uint32_t shiftb = (CUSTOM_REG(REG_BLTCON1) >> 12) & 0xf;
+ uint32_t height = CUSTOM_REG(REG_BLTSIZV);
+ uint32_t width = CUSTOM_REG(REG_BLTSIZH);
+ uint32_t acca = 0, accb = 0;
+ uint32_t blitsum = 0;
+ uint32_t x, y;
/* iterate over the height */
for (y = 0; y < height; y++)
@@ -433,9 +433,9 @@ static UINT32 blit_ascending(amiga_state *state)
/* iterate over the width */
for (x = 0; x < width; x++)
{
- UINT16 abc0, abc1, abc2, abc3;
- UINT32 tempa, tempd = 0;
- UINT32 b;
+ uint16_t abc0, abc1, abc2, abc3;
+ uint32_t tempa, tempd = 0;
+ uint32_t b;
/* fetch data for A */
if (CUSTOM_REG(REG_BLTCON0) & 0x0800)
@@ -479,7 +479,7 @@ static UINT32 blit_ascending(amiga_state *state)
/* now loop over bits and compute the destination value */
for (b = 0; b < 4; b++)
{
- UINT32 bit;
+ uint32_t bit;
/* shift previous data up 4 bits */
tempd <<= 4;
@@ -539,29 +539,29 @@ static UINT32 blit_ascending(amiga_state *state)
*
*************************************/
-static UINT32 blit_descending(amiga_state *state)
+static uint32_t blit_descending(amiga_state *state)
{
- UINT32 fill_exclusive = (CUSTOM_REG(REG_BLTCON1) >> 4);
- UINT32 fill_inclusive = (CUSTOM_REG(REG_BLTCON1) >> 3);
- UINT32 shifta = (CUSTOM_REG(REG_BLTCON0) >> 12) & 0xf;
- UINT32 shiftb = (CUSTOM_REG(REG_BLTCON1) >> 12) & 0xf;
- UINT32 height = CUSTOM_REG(REG_BLTSIZV);
- UINT32 width = CUSTOM_REG(REG_BLTSIZH);
- UINT32 acca = 0, accb = 0;
- UINT32 blitsum = 0;
- UINT32 x, y;
+ uint32_t fill_exclusive = (CUSTOM_REG(REG_BLTCON1) >> 4);
+ uint32_t fill_inclusive = (CUSTOM_REG(REG_BLTCON1) >> 3);
+ uint32_t shifta = (CUSTOM_REG(REG_BLTCON0) >> 12) & 0xf;
+ uint32_t shiftb = (CUSTOM_REG(REG_BLTCON1) >> 12) & 0xf;
+ uint32_t height = CUSTOM_REG(REG_BLTSIZV);
+ uint32_t width = CUSTOM_REG(REG_BLTSIZH);
+ uint32_t acca = 0, accb = 0;
+ uint32_t blitsum = 0;
+ uint32_t x, y;
/* iterate over the height */
for (y = 0; y < height; y++)
{
- UINT32 fill_state = (CUSTOM_REG(REG_BLTCON1) >> 2) & 1;
+ uint32_t fill_state = (CUSTOM_REG(REG_BLTCON1) >> 2) & 1;
/* iterate over the width */
for (x = 0; x < width; x++)
{
- UINT16 abc0, abc1, abc2, abc3;
- UINT32 tempa, tempd = 0;
- UINT32 b;
+ uint16_t abc0, abc1, abc2, abc3;
+ uint32_t tempa, tempd = 0;
+ uint32_t b;
/* fetch data for A */
if (CUSTOM_REG(REG_BLTCON0) & 0x0800)
@@ -604,8 +604,8 @@ static UINT32 blit_descending(amiga_state *state)
/* now loop over bits and compute the destination value */
for (b = 0; b < 4; b++)
{
- UINT32 prev_fill_state;
- UINT32 bit;
+ uint32_t prev_fill_state;
+ uint32_t bit;
/* shift previous data up 4 bits */
tempd >>= 4;
@@ -720,12 +720,12 @@ static UINT32 blit_descending(amiga_state *state)
BLTAMOD = 4 * (dy - dx) and BLTBMOD = 4 * dy.
*/
-static UINT32 blit_line(amiga_state *state)
+static uint32_t blit_line(amiga_state *state)
{
- UINT32 singlemode = (CUSTOM_REG(REG_BLTCON1) & 0x0002) ? 0x0000 : 0xffff;
- UINT32 singlemask = 0xffff;
- UINT32 blitsum = 0;
- UINT32 height;
+ uint32_t singlemode = (CUSTOM_REG(REG_BLTCON1) & 0x0002) ? 0x0000 : 0xffff;
+ uint32_t singlemask = 0xffff;
+ uint32_t blitsum = 0;
+ uint32_t height;
/* see if folks are breaking the rules */
if (CUSTOM_REG(REG_BLTSIZH) != 0x0002)
@@ -739,8 +739,8 @@ static UINT32 blit_line(amiga_state *state)
/* iterate over the line height */
while (height--)
{
- UINT16 abc0, abc1, abc2, abc3;
- UINT32 tempa, tempb, tempd = 0;
+ uint16_t abc0, abc1, abc2, abc3;
+ uint32_t tempa, tempb, tempd = 0;
int b, dx, dy;
/* fetch data for C */
@@ -766,7 +766,7 @@ static UINT32 blit_line(amiga_state *state)
/* now loop over bits and compute the destination value */
for (b = 0; b < 4; b++)
{
- UINT32 bit;
+ uint32_t bit;
/* shift previous data up 4 bits */
tempd <<= 4;
@@ -831,7 +831,7 @@ static UINT32 blit_line(amiga_state *state)
if (dx)
{
/* adjust the A shift value */
- UINT32 temp = CUSTOM_REG(REG_BLTCON0) + (INT32)(dx << 12);
+ uint32_t temp = CUSTOM_REG(REG_BLTCON0) + (int32_t)(dx << 12);
CUSTOM_REG(REG_BLTCON0) = temp;
/* if we went from 0xf to 0x0 or vice-versa, adjust the actual pointers */
@@ -846,8 +846,8 @@ static UINT32 blit_line(amiga_state *state)
if (dy)
{
/* BLTCMOD seems to be used for both C and D pointers */
- CUSTOM_REG_LONG(REG_BLTCPTH) += dy * (INT16)(CUSTOM_REG_SIGNED(REG_BLTCMOD) & ~1);
- CUSTOM_REG_LONG(REG_BLTDPTH) += dy * (INT16)(CUSTOM_REG_SIGNED(REG_BLTCMOD) & ~1);
+ CUSTOM_REG_LONG(REG_BLTCPTH) += dy * (int16_t)(CUSTOM_REG_SIGNED(REG_BLTCMOD) & ~1);
+ CUSTOM_REG_LONG(REG_BLTDPTH) += dy * (int16_t)(CUSTOM_REG_SIGNED(REG_BLTCMOD) & ~1);
/* reset the single mask since we're on a new line */
singlemask = 0xffff;
@@ -874,7 +874,7 @@ static UINT32 blit_line(amiga_state *state)
TIMER_CALLBACK_MEMBER( amiga_state::amiga_blitter_proc )
{
amiga_state *state = machine().driver_data<amiga_state>();
- UINT32 blitsum = 0;
+ uint32_t blitsum = 0;
/* logging */
if (LOG_BLITS)
@@ -1027,7 +1027,7 @@ WRITE_LINE_MEMBER( amiga_state::centronics_select_w )
READ16_MEMBER( amiga_state::cia_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
if ((offset & 0x1000/2) == 0 && ACCESSING_BITS_0_7)
data |= m_cia_0->read(space, offset >> 7);
@@ -1092,7 +1092,7 @@ WRITE_LINE_MEMBER( amiga_state::cia_0_irq )
READ8_MEMBER( amiga_state::cia_1_port_a_read )
{
- UINT8 data = 0;
+ uint8_t data = 0;
// bit 0 to 2, centronics
data |= m_centronics_busy << 0;
@@ -1147,7 +1147,7 @@ void amiga_state::custom_chip_reset()
READ16_MEMBER( amiga_state::custom_chip_r )
{
amiga_state *state = this;
- UINT16 temp;
+ uint16_t temp;
if (LOG_CUSTOM)
logerror("%06X:read from custom %s\n", space.device().safe_pc(), amiga_custom_names[offset & 0xff]);
@@ -1261,7 +1261,7 @@ READ16_MEMBER( amiga_state::custom_chip_r )
WRITE16_MEMBER( amiga_state::custom_chip_w )
{
amiga_state *state = space.machine().driver_data<amiga_state>();
- UINT16 temp;
+ uint16_t temp;
offset &= 0xff;
if (LOG_CUSTOM)
@@ -1574,8 +1574,8 @@ void amiga_state::serial_adjust()
{
amiga_state *state = this;
- UINT32 divisor = (CUSTOM_REG(REG_SERPER) & 0x7fff) + 1;
- UINT32 baud = m_sound->clock() / divisor;
+ uint32_t divisor = (CUSTOM_REG(REG_SERPER) & 0x7fff) + 1;
+ uint32_t baud = m_sound->clock() / divisor;
m_serial_timer->adjust(attotime::from_hz(baud) / 2, 0, attotime::from_hz(baud));
}
diff --git a/src/mame/machine/amigakbd.cpp b/src/mame/machine/amigakbd.cpp
index 55f832310ac..21d1c11d71e 100644
--- a/src/mame/machine/amigakbd.cpp
+++ b/src/mame/machine/amigakbd.cpp
@@ -260,7 +260,7 @@ ioport_constructor amigakbd_device::device_input_ports() const
// amigakbd_device - constructor
//-------------------------------------------------
-amigakbd_device::amigakbd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+amigakbd_device::amigakbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AMIGAKBD, "Amiga 500 Keyboard with 6570-036 MPU", tag, owner, clock, "amigakbd", __FILE__),
m_write_kclk(*this),
m_write_kdat(*this),
@@ -394,7 +394,7 @@ void amigakbd_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
INPUT_CHANGED_MEMBER( amigakbd_device::check_reset )
{
- UINT8 keys = m_special->read();
+ uint8_t keys = m_special->read();
// ctrl-amiga-amiga pressed?
if (!BIT(keys, 6) && !BIT(keys, 3) && !BIT(keys, 2))
@@ -421,7 +421,7 @@ void amigakbd_device::update_irqs()
READ8_MEMBER( amigakbd_device::port_a_r )
{
- UINT8 data = 0xfc;
+ uint8_t data = 0xfc;
// kdat & kclk
data |= m_kdat << 0;
diff --git a/src/mame/machine/amigakbd.h b/src/mame/machine/amigakbd.h
index 1ae08514d97..687401a1c20 100644
--- a/src/mame/machine/amigakbd.h
+++ b/src/mame/machine/amigakbd.h
@@ -42,7 +42,7 @@ class amigakbd_device : public device_t
{
public:
// construction/destruction
- amigakbd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ amigakbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_kclk_wr_callback(device_t &device, _Object object)
{ return downcast<amigakbd_device &>(device).m_write_kclk.set_callback(object); }
@@ -130,11 +130,11 @@ private:
int m_kdat;
int m_kclk;
- UINT8 m_port_c;
- UINT8 m_port_d;
- UINT16 m_latch;
- UINT16 m_counter;
- UINT8 m_control;
+ uint8_t m_port_c;
+ uint8_t m_port_d;
+ uint16_t m_latch;
+ uint16_t m_counter;
+ uint8_t m_control;
};
// device type definition
diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp
index 1cda012e914..611a2cbaf41 100644
--- a/src/mame/machine/amstrad.cpp
+++ b/src/mame/machine/amstrad.cpp
@@ -67,7 +67,7 @@ enum {
// This is the sequence for unlocking the ASIC in the CPC+/GX4000
// These are outed to port &bc00, after syncing the lock by outing a non-zero value then a zero to &bc00
// To lock the ASIC again, repeat the sequence without the last &ee
-static const UINT8 asic_unlock_seq[15] =
+static const uint8_t asic_unlock_seq[15] =
{
0xff, 0x77, 0xb3, 0x51, 0xa8, 0xd4, 0x62, 0x39, 0x9c, 0x46, 0x2b, 0x15, 0x8a, 0xcd, 0xee
};
@@ -290,7 +290,7 @@ with different data and be able to select the other entries - not tested on a re
and not supported by this driver */
PALETTE_INIT_MEMBER(amstrad_state,kccomp)
{
- const UINT8 *color_prom = memregion("proms")->base();
+ const uint8_t *color_prom = memregion("proms")->base();
int i;
color_prom = color_prom+0x018000;
@@ -599,7 +599,7 @@ TIMER_CALLBACK_MEMBER(amstrad_state::amstrad_video_update_timer)
}
/* Set the new colour from the GateArray */
-void amstrad_state::amstrad_vh_update_colour(int PenIndex, UINT16 hw_colour_index)
+void amstrad_state::amstrad_vh_update_colour(int PenIndex, uint16_t hw_colour_index)
{
if ( m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000 )
{
@@ -622,7 +622,7 @@ void amstrad_state::amstrad_vh_update_colour(int PenIndex, UINT16 hw_colour_inde
}
-void amstrad_state::aleste_vh_update_colour(int PenIndex, UINT16 hw_colour_index)
+void amstrad_state::aleste_vh_update_colour(int PenIndex, uint16_t hw_colour_index)
{
timer_set(attotime::from_usec(0), TIMER_VIDEO_UPDATE, 0);
m_GateArray_render_colours[PenIndex] = hw_colour_index+32;
@@ -653,7 +653,7 @@ void amstrad_state::amstrad_update_video()
if ( m_gate_array.draw_p )
{
- UINT32 cycles_passed = (now - m_gate_array.last_draw_time ).as_ticks(XTAL_16MHz);
+ uint32_t cycles_passed = (now - m_gate_array.last_draw_time ).as_ticks(XTAL_16MHz);
while( cycles_passed )
{
@@ -701,9 +701,9 @@ void amstrad_state::amstrad_update_video()
void amstrad_state::amstrad_plus_gate_array_get_video_data()
{
- UINT16 caddr;
- UINT16 ma = ( m_gate_array.ma - m_asic.split_ma_started ) + m_asic.split_ma_base;
- UINT16 ra = m_gate_array.ra + ( ( m_asic.ram[0x2804] >> 4 ) & 0x07 );
+ uint16_t caddr;
+ uint16_t ma = ( m_gate_array.ma - m_asic.split_ma_started ) + m_asic.split_ma_base;
+ uint16_t ra = m_gate_array.ra + ( ( m_asic.ram[0x2804] >> 4 ) & 0x07 );
if ( ra > 7 )
{
@@ -728,7 +728,7 @@ void amstrad_state::amstrad_plus_update_video()
if ( m_gate_array.draw_p )
{
- UINT32 cycles_passed = (now - m_gate_array.last_draw_time ).as_ticks(XTAL_16MHz);
+ uint32_t cycles_passed = (now - m_gate_array.last_draw_time ).as_ticks(XTAL_16MHz);
while( cycles_passed )
{
@@ -751,7 +751,7 @@ void amstrad_state::amstrad_plus_update_video()
m_gate_array.colour_ticks--;
if ( ! m_gate_array.colour_ticks )
{
- UINT16 caddr;
+ uint16_t caddr;
m_gate_array.data <<= 1;
if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
@@ -766,7 +766,7 @@ void amstrad_state::amstrad_plus_update_video()
{
case 8:
{
- UINT16 caddr;
+ uint16_t caddr;
m_gate_array.data = m_ram->pointer()[ m_gate_array.address + 1 ];
if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
@@ -803,9 +803,9 @@ void amstrad_state::amstrad_plus_update_video()
void amstrad_state::amstrad_plus_update_video_sprites()
{
- UINT16 *p;
+ uint16_t *p;
int i;
- UINT16 horiz;
+ uint16_t horiz;
if ( m_gate_array.y < 0 )
return;
@@ -818,14 +818,14 @@ void amstrad_state::amstrad_plus_update_video_sprites()
p = &m_gate_array.bitmap->pix16(m_gate_array.y, horiz );
for ( i = 15 * 8; i >= 0; i -= 8 )
{
- UINT8 xmag = ( m_asic.ram[ 0x2000 + i + 4 ] >> 2 ) & 0x03;
- UINT8 ymag = m_asic.ram[ 0x2000 + i + 4 ] & 0x03;
+ uint8_t xmag = ( m_asic.ram[ 0x2000 + i + 4 ] >> 2 ) & 0x03;
+ uint8_t ymag = m_asic.ram[ 0x2000 + i + 4 ] & 0x03;
/* Check if sprite is enabled */
if ( xmag && ymag )
{
- INT16 spr_x = m_asic.ram[ 0x2000 + i ] + ( m_asic.ram[ 0x2001 + i ] << 8 );
- INT16 spr_y = m_asic.ram[ 0x2002 + i ] + ( m_asic.ram[ 0x2003 + i ] << 8 );
+ int16_t spr_x = m_asic.ram[ 0x2000 + i ] + ( m_asic.ram[ 0x2001 + i ] << 8 );
+ int16_t spr_y = m_asic.ram[ 0x2002 + i ] + ( m_asic.ram[ 0x2003 + i ] << 8 );
xmag -= 1;
ymag -= 1;
@@ -834,16 +834,16 @@ void amstrad_state::amstrad_plus_update_video_sprites()
//if(i == 0) printf("%i <= %i, %i < %i, %i < %i, %i > 0\n", spr_y,m_asic.vpos,m_asic.vpos,spr_y+(16<<ymag),spr_x,(m_asic.h_end - horiz),spr_x+(16<<xmag));
if ( spr_y <= m_asic.vpos && m_asic.vpos < spr_y + ( 16 << ymag ) && spr_x < (m_asic.h_end - horiz) && spr_x + ( 16 << xmag ) > 0 )
{
- UINT16 spr_addr = i * 32 + ( ( ( m_asic.vpos - spr_y ) >> ymag ) * 16 );
+ uint16_t spr_addr = i * 32 + ( ( ( m_asic.vpos - spr_y ) >> ymag ) * 16 );
int j, k;
for ( j = 0; j < 16; j++ )
{
for ( k = 0; k < ( 1 << xmag ); k++ )
{
- INT16 x = spr_x + ( j << xmag ) + k;
+ int16_t x = spr_x + ( j << xmag ) + k;
if ( x >= 0 && x < (m_asic.h_end - horiz))
{
- UINT8 spr_col = ( m_asic.ram[ spr_addr + j ] & 0x0f ) * 2;
+ uint8_t spr_col = ( m_asic.ram[ spr_addr + j ] & 0x0f ) * 2;
if ( spr_col )
p[x] = m_asic.ram[ 0x2420 + spr_col ] + ( m_asic.ram[ 0x2421 + spr_col ] << 8 );
}
@@ -1093,7 +1093,7 @@ VIDEO_START_MEMBER(amstrad_state,amstrad)
}
-UINT32 amstrad_state::screen_update_amstrad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t amstrad_state::screen_update_amstrad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
copybitmap( bitmap, *m_gate_array.bitmap, 0, 0, 0, 0, cliprect );
return 0;
@@ -1146,7 +1146,7 @@ WRITE_LINE_MEMBER(amstrad_state::cpc_romdis)
-----------------*/
void amstrad_state::amstrad_setLowerRom()
{
- UINT8 *bank_base;
+ uint8_t *bank_base;
/* b2 : "1" Lower rom area disable or "0" Lower rom area enable */
if ( m_system_type == SYSTEM_CPC || m_system_type == SYSTEM_ALESTE )
@@ -1246,7 +1246,7 @@ void amstrad_state::amstrad_setLowerRom()
-----------------*/
void amstrad_state::amstrad_setUpperRom()
{
- UINT8 *bank_base = nullptr;
+ uint8_t *bank_base = nullptr;
/* b3 : "1" Upper rom area disable or "0" Upper rom area enable */
if ( ! ( m_gate_array.mrer & 0x08 ) && m_gate_array.romdis == 0)
@@ -1300,7 +1300,7 @@ void amstrad_state::AmstradCPC_GA_SetRamConfiguration()
int ConfigurationIndex = m_GateArray_RamConfiguration & 0x07;
int BankIndex,i;
unsigned char *BankAddr;
- UINT8 banknum = (m_GateArray_RamConfiguration & 0x38) >> 3;
+ uint8_t banknum = (m_GateArray_RamConfiguration & 0x38) >> 3;
/* if b5 = 0 */
if(m_ram->size() > 65536)
@@ -1310,7 +1310,7 @@ void amstrad_state::AmstradCPC_GA_SetRamConfiguration()
BankIndex = RamConfigurations[(ConfigurationIndex << 2) + i];
if(BankIndex > 3)
{
- UINT8 maxbank = ((m_ram->size()-65536) / 65536);
+ uint8_t maxbank = ((m_ram->size()-65536) / 65536);
BankAddr = m_ram->pointer() + (BankIndex << 14) + ((banknum%maxbank)*0x10000);
}
else
@@ -1406,7 +1406,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_4000_w)
m_asic.ram[offset] = data & 0x0f;
else
{
- UINT8* RAM = (UINT8*)m_bank11->base();
+ uint8_t* RAM = (uint8_t*)m_bank11->base();
RAM[offset] = data;
}
}
@@ -1509,7 +1509,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_6000_w)
}
else
{
- UINT8* RAM = (UINT8*)m_bank12->base();
+ uint8_t* RAM = (uint8_t*)m_bank12->base();
RAM[offset] = data;
}
}
@@ -1522,7 +1522,7 @@ READ8_MEMBER(amstrad_state::amstrad_plus_asic_4000_r)
return m_asic.ram[offset];
else
{
- UINT8* RAM = (UINT8*)m_bank3->base();
+ uint8_t* RAM = (uint8_t*)m_bank3->base();
return RAM[offset];
}
}
@@ -1565,7 +1565,7 @@ READ8_MEMBER(amstrad_state::amstrad_plus_asic_6000_r)
}
else
{
- UINT8* RAM = (UINT8*)m_bank4->base();
+ uint8_t* RAM = (uint8_t*)m_bank4->base();
return RAM[offset];
}
}
@@ -1602,7 +1602,7 @@ Bit 7 Bit 6 Function
Note 1 : This function is not available in the Gate-Array, but is performed by a device at the same I/O port address location. In the CPC464,CPC664 and KC compact, this function is performed in a memory-expansion (e.g. Dk'Tronics 64K Ram Expansion), if this expansion is not present then the function is not available. In the CPC6128, this function is performed by a PAL located on the main PCB, or a memory-expansion. In the 464+ and 6128+ this function is performed by the ASIC or a memory expansion. Please read the document on Ram Management for more information.*/
-void amstrad_state::amstrad_GateArray_write(UINT8 dataToGateArray)
+void amstrad_state::amstrad_GateArray_write(uint8_t dataToGateArray)
{
/* Get Bit 7 and 6 of the dataToGateArray = Gate Array function selected */
switch ((dataToGateArray & 0xc0)>>6)
@@ -1733,7 +1733,7 @@ WRITE8_MEMBER(amstrad_state::aleste_msx_mapper)
int ramptr = (data & 0x3f) * 0x4000;
int rampage = data & 0x3f;
int function = (data & 0xc0) >> 6;
- UINT8 *ram = m_ram->pointer();
+ uint8_t *ram = m_ram->pointer();
// It is assumed that functions are all mapped to each port &7cff-&7fff, and b8 and b9 are only used for RAM bank location
switch(function)
@@ -2249,20 +2249,20 @@ void amstrad_state::amstrad_handle_snapshot(unsigned char *pSnapshot)
if ((pSnapshot[0x01b] & 1)==1)
{
- m_maincpu->set_state_int(Z80_IFF1, (UINT64)1);
+ m_maincpu->set_state_int(Z80_IFF1, (uint64_t)1);
}
else
{
- m_maincpu->set_state_int(Z80_IFF1, (UINT64)0);
+ m_maincpu->set_state_int(Z80_IFF1, (uint64_t)0);
}
if ((pSnapshot[0x01c] & 1)==1)
{
- m_maincpu->set_state_int(Z80_IFF2, (UINT64)1);
+ m_maincpu->set_state_int(Z80_IFF2, (uint64_t)1);
}
else
{
- m_maincpu->set_state_int(Z80_IFF2, (UINT64)0);
+ m_maincpu->set_state_int(Z80_IFF2, (uint64_t)0);
}
RegData = (pSnapshot[0x01d] & 0x0ff) | ((pSnapshot[0x01e] & 0x0ff)<<8);
@@ -2772,8 +2772,8 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int)
// update AMX mouse inputs (normally done every 1/300th of a second)
if (m_io_ctrltype.read_safe(0) == 1)
{
- static UINT8 prev_x,prev_y;
- UINT8 data_x, data_y;
+ static uint8_t prev_x,prev_y;
+ uint8_t data_x, data_y;
m_amx_mouse_data = 0x0f;
data_x = m_io_mouse1.read_safe(0);
@@ -2799,7 +2799,7 @@ IRQ_CALLBACK_MEMBER(amstrad_state::amstrad_cpu_acknowledge_int)
/* the following timings have been measured! */
-static const UINT8 amstrad_cycle_table_op[256] = {
+static const uint8_t amstrad_cycle_table_op[256] = {
4, 12, 8, 8, 4, 4, 8, 4, 4, 12, 8, 8, 4, 4, 8, 4,
12, 12, 8, 8, 4, 4, 8, 4, 12, 12, 8, 8, 4, 4, 8, 4,
8, 12, 20, 8, 4, 4, 8, 4, 8, 12, 20, 8, 4, 4, 8, 4,
@@ -2818,7 +2818,7 @@ static const UINT8 amstrad_cycle_table_op[256] = {
8, 12, 12, 4, 12, 16, 8, 16, 8, 8, 12, 4, 12, 4, 8, 16
};
-static const UINT8 amstrad_cycle_table_cb[256]=
+static const uint8_t amstrad_cycle_table_cb[256]=
{
4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 12, 4,
4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 12, 4,
@@ -2838,7 +2838,7 @@ static const UINT8 amstrad_cycle_table_cb[256]=
4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 12, 4
};
-static const UINT8 amstrad_cycle_table_ed[256]=
+static const uint8_t amstrad_cycle_table_ed[256]=
{
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
@@ -2858,7 +2858,7 @@ static const UINT8 amstrad_cycle_table_ed[256]=
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
-static const UINT8 amstrad_cycle_table_xy[256]=
+static const uint8_t amstrad_cycle_table_xy[256]=
{
4, 12, 8, 8, 4, 4, 8, 4, 4, 12, 8, 8, 4, 4, 8, 4,
12, 12, 8, 8, 4, 4, 8, 4, 12, 12, 8, 8, 4, 4, 8, 4,
@@ -2878,7 +2878,7 @@ static const UINT8 amstrad_cycle_table_xy[256]=
8, 12, 12, 4, 12, 16, 8, 16, 8, 8, 12, 4, 12, 4, 8, 16
};
-static const UINT8 amstrad_cycle_table_xycb[256]=
+static const uint8_t amstrad_cycle_table_xycb[256]=
{
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
@@ -2898,7 +2898,7 @@ static const UINT8 amstrad_cycle_table_xycb[256]=
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
};
-static const UINT8 amstrad_cycle_table_ex[256]=
+static const uint8_t amstrad_cycle_table_ex[256]=
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2924,13 +2924,13 @@ static const UINT8 amstrad_cycle_table_ex[256]=
void amstrad_state::enumerate_roms()
{
- UINT8 m_rom_count = 1;
- UINT8 *rom = m_region_maincpu->base();
+ uint8_t m_rom_count = 1;
+ uint8_t *rom = m_region_maincpu->base();
bool slot7 = false;
if (m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000)
{
- UINT8 *crt = m_region_cart->base();
+ uint8_t *crt = m_region_cart->base();
int bank_mask = (m_cart->get_rom_size() / 0x4000) - 1;
/* ROMs are stored on the inserted cartridge in the Plus/GX4000 */
@@ -3071,12 +3071,12 @@ void amstrad_state::amstrad_common_init()
/* Using the cool code Juergen has provided, I will override
the timing tables with the values for the amstrad */
m_maincpu->z80_set_cycle_tables(
- (const UINT8*)amstrad_cycle_table_op,
- (const UINT8*)amstrad_cycle_table_cb,
- (const UINT8*)amstrad_cycle_table_ed,
- (const UINT8*)amstrad_cycle_table_xy,
- (const UINT8*)amstrad_cycle_table_xycb,
- (const UINT8*)amstrad_cycle_table_ex);
+ (const uint8_t*)amstrad_cycle_table_op,
+ (const uint8_t*)amstrad_cycle_table_cb,
+ (const uint8_t*)amstrad_cycle_table_ed,
+ (const uint8_t*)amstrad_cycle_table_xy,
+ (const uint8_t*)amstrad_cycle_table_xycb,
+ (const uint8_t*)amstrad_cycle_table_ex);
/* Juergen is a cool dude! */
}
@@ -3262,7 +3262,7 @@ MACHINE_RESET_MEMBER(amstrad_state,aleste)
/* load snapshot */
SNAPSHOT_LOAD_MEMBER( amstrad_state,amstrad)
{
- std::vector<UINT8> snapshot;
+ std::vector<uint8_t> snapshot;
/* get file size */
if (snapshot_size < 8)
@@ -3285,7 +3285,7 @@ SNAPSHOT_LOAD_MEMBER( amstrad_state,amstrad)
DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge)
{
- UINT32 size = m_cart->common_get_size("rom");
+ uint32_t size = m_cart->common_get_size("rom");
unsigned char header[12];
bool is_cpr = FALSE;
logerror("IMG: loading CPC+ cartridge file\n");
@@ -3336,9 +3336,9 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge)
// 'cb01' represent Cartridge block 1, and is loaded to &4000-&7fff
// ... and so on.
- UINT32 offset = 0;
- UINT8 *crt = m_cart->get_rom_base();
- std::vector<UINT8> temp_copy;
+ uint32_t offset = 0;
+ uint8_t *crt = m_cart->get_rom_base();
+ std::vector<uint8_t> temp_copy;
temp_copy.resize(size);
image.fread(&temp_copy[0], size);
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index 8adf11a98c5..5575a5fd90c 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -59,7 +59,7 @@
#undef VERBOSE
#define VERBOSE 0
-static UINT16 config = 0;
+static uint16_t config = 0;
/***************************************************************************
apollo_config - check configuration setting
@@ -127,7 +127,7 @@ INPUT_PORTS_END
class apollo_config_device : public device_t
{
public:
- apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_config_complete() override;
@@ -141,7 +141,7 @@ extern const device_type APOLLO_CONF;
const device_type APOLLO_CONF = &device_creator<apollo_config_device>;
-apollo_config_device::apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+apollo_config_device::apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, APOLLO_CONF, "Apollo Configuration", tag, owner, clock, "apollo_config", __FILE__)
{
}
@@ -187,8 +187,8 @@ void apollo_config_device::device_reset()
#define CPU_CONTROL_REGISTER_ADDRESS 0x010100
-static UINT16 cpu_status_register = APOLLO_CSR_SR_BIT15 | APOLLO_CSR_SR_SERVICE;
-static UINT16 cpu_control_register = 0x0000;
+static uint16_t cpu_status_register = APOLLO_CSR_SR_BIT15 | APOLLO_CSR_SR_SERVICE;
+static uint16_t cpu_control_register = 0x0000;
/*-------------------------------------------------
apollo_csr_get/set_servicemode
@@ -204,19 +204,19 @@ static void apollo_csr_set_servicemode(int mode)
apollo_csr_set_status_register(1, mode ? APOLLO_CSR_SR_SERVICE : 0);
}
-UINT16 apollo_csr_get_control_register(void)
+uint16_t apollo_csr_get_control_register(void)
{
return cpu_control_register;
}
-UINT16 apollo_csr_get_status_register(void)
+uint16_t apollo_csr_get_status_register(void)
{
return cpu_status_register;
}
-void apollo_csr_set_status_register(UINT16 mask, UINT16 data)
+void apollo_csr_set_status_register(uint16_t mask, uint16_t data)
{
- UINT16 new_value = (cpu_status_register & ~mask) | (data & mask);
+ uint16_t new_value = (cpu_status_register & ~mask) | (data & mask);
if (new_value != cpu_status_register)
{
@@ -313,15 +313,15 @@ READ16_MEMBER(apollo_state::apollo_csr_control_register_r)
#undef VERBOSE
#define VERBOSE 0
-static UINT16 address_translation_map[0x400];
+static uint16_t address_translation_map[0x400];
-static UINT16 dma_page_register[16] =
+static uint16_t dma_page_register[16] =
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-static const UINT8 channel2page_register[8] = { 7, 3, 1, 2, 0, 11, 9, 10};
+static const uint8_t channel2page_register[8] = { 7, 3, 1, 2, 0, 11, 9, 10};
-static UINT8 dn3000_dma_channel1 = 1; // 1 = memory/ctape, 2 = floppy dma channel
-static UINT8 dn3000_dma_channel2 = 5; // 5 = memory dma channel
+static uint8_t dn3000_dma_channel1 = 1; // 1 = memory/ctape, 2 = floppy dma channel
+static uint8_t dn3000_dma_channel2 = 5; // 5 = memory dma channel
/*-------------------------------------------------
DN3000/DN3500 DMA Controller 1 at 0x9000/0x10c00
@@ -333,7 +333,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_1_w){
}
READ8_MEMBER(apollo_state::apollo_dma_1_r){
- UINT8 data = m_dma8237_1->read(space, offset);
+ uint8_t data = m_dma8237_1->read(space, offset);
SLOG1(("apollo_dma_1_r: reading DMA Controller 1 at offset %02x = %02x", offset, data));
return data;
}
@@ -363,7 +363,7 @@ READ8_MEMBER(apollo_state::apollo_dma_2_r){
break;
}
}
- UINT8 data = m_dma8237_2->read(space, offset / 2);
+ uint8_t data = m_dma8237_2->read(space, offset / 2);
SLOG1(("apollo_dma_2_r: reading DMA Controller 2 at offset %02x = %02x", offset/2, data));
return data;
}
@@ -378,7 +378,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_page_register_w){
}
READ8_MEMBER(apollo_state::apollo_dma_page_register_r){
- UINT8 data = dma_page_register[offset & 0x0f];
+ uint8_t data = dma_page_register[offset & 0x0f];
SLOG1(("reading DMA Page Register at offset %02x = %02x", offset, data));
return data;
}
@@ -393,13 +393,13 @@ WRITE16_MEMBER(apollo_state::apollo_address_translation_map_w){
}
READ16_MEMBER(apollo_state::apollo_address_translation_map_r){
- UINT16 data = address_translation_map[offset & 0x3ff];
+ uint16_t data = address_translation_map[offset & 0x3ff];
SLOG2(("reading Address Translation Map at offset %02x = %04x", offset, data));
return data;
}
READ8_MEMBER(apollo_state::apollo_dma_read_byte){
- UINT8 data;
+ uint8_t data;
offs_t page_offset;
if (apollo_is_dn3000()) {
@@ -440,7 +440,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_write_byte){
}
READ8_MEMBER(apollo_state::apollo_dma_read_word){
- UINT16 data;
+ uint16_t data;
offs_t page_offset;
if (apollo_is_dn3000()) {
@@ -578,7 +578,7 @@ void apollo_state::apollo_pic_set_irq_line(int irq, int state)
IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge)
{
- UINT32 vector = m_pic8259_master->acknowledge();
+ uint32_t vector = m_pic8259_master->acknowledge();
if ((vector & 0x0f) == APOLLO_IRQ_PIC_SLAVE) {
vector = m_pic8259_slave->acknowledge();
}
@@ -694,7 +694,7 @@ WRITE8_MEMBER(apollo_state::apollo_rtc_w)
READ8_MEMBER(apollo_state::apollo_rtc_r)
{
- UINT8 data;
+ uint8_t data;
m_rtc->write(space, 0, offset);
data = m_rtc->read(space, 1);
if (offset >= 0x0b && offset <= 0x0c)
@@ -725,7 +725,7 @@ TIMER_CALLBACK_MEMBER( apollo_state::apollo_rtc_timer )
#define VERBOSE 0
apollo_sio::apollo_sio(const machine_config &mconfig, const char *tag,
- device_t *owner, UINT32 clock) :
+ device_t *owner, uint32_t clock) :
mc68681_device(mconfig, tag, owner, clock),
m_csrb(0),
m_ip6(0)
@@ -734,7 +734,7 @@ apollo_sio::apollo_sio(const machine_config &mconfig, const char *tag,
void apollo_sio::device_reset()
{
- UINT8 input_data = apollo_get_ram_config_byte();
+ uint8_t input_data = apollo_get_ram_config_byte();
ip0_w((input_data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
ip1_w((input_data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
ip2_w((input_data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
@@ -881,7 +881,7 @@ const device_type APOLLO_NI = &device_creator<apollo_ni> ;
//-------------------------------------------------
apollo_ni::apollo_ni(const machine_config &mconfig, const char *tag,
- device_t *owner, UINT32 clock) :
+ device_t *owner, uint32_t clock) :
device_t(mconfig, APOLLO_NI, "Node ID", tag, owner, clock, "node_id",
__FILE__), device_image_interface(mconfig, *this)
{
@@ -923,7 +923,7 @@ void apollo_ni::device_reset()
// set node ID
//-------------------------------------------------
-void apollo_ni::set_node_id(UINT32 node_id)
+void apollo_ni::set_node_id(uint32_t node_id)
{
m_node_id = node_id;
CLOG1(("apollo_ni::set_node_id: node ID is %x", node_id));
@@ -940,7 +940,7 @@ WRITE16_MEMBER(apollo_ni::write)
READ16_MEMBER(apollo_ni::read)
{
- UINT16 data = 0;
+ uint16_t data = 0;
switch (offset & 0x0f)
{
case 1: // msb
@@ -971,17 +971,17 @@ image_init_result apollo_ni::call_load()
{
CLOG1(("apollo_ni::call_load: %s", filename()));
- UINT64 size = length();
+ uint64_t size = length();
if (size != 32)
{
CLOG(("apollo_ni::call_load: %s has unexpected file size %d", filename(), size));
}
else
{
- UINT8 data[32];
+ uint8_t data[32];
fread(data, sizeof(data));
- UINT8 checksum = data[2] + data[4] + data[6];
+ uint8_t checksum = data[2] + data[4] + data[6];
if (checksum != data[30])
{
CLOG(("apollo_ni::call_load: checksum is %02x - should be %02x", checksum, data[30]));
@@ -1010,7 +1010,7 @@ image_init_result apollo_ni::call_create(int format_type, util::option_resolutio
}
else
{
- UINT32 node_id = 0;
+ uint32_t node_id = 0;
sscanf(basename_noext(), "%x", &node_id);
if (node_id == 0 || node_id > 0xfffff)
{
@@ -1018,7 +1018,7 @@ image_init_result apollo_ni::call_create(int format_type, util::option_resolutio
}
else
{
- UINT8 data[32];
+ uint8_t data[32];
memset(data, 0, sizeof(data));
data[2] = node_id >> 16;
data[4] = node_id >> 8;
@@ -1048,7 +1048,7 @@ void apollo_ni::call_unload()
void apollo_ni::set_node_id_from_disk()
{
omti8621_apollo_device *omti8621 = machine().device<omti8621_apollo_device>("isa1:wdc");
- UINT8 db[0x50];
+ uint8_t db[0x50];
// check label of physical volume and get sector data of logical volume 1
// Note: sector data starts with 32 byte block header
@@ -1057,7 +1057,7 @@ void apollo_ni::set_node_id_from_disk()
&& omti8621->get_sector(0, db, sizeof(db), 0) == sizeof(db)
&& memcmp(db + 0x22, "APOLLO", 6) == 0)
{
- UINT16 sector1 = apollo_is_dn5500() ? 4 : 1;
+ uint16_t sector1 = apollo_is_dn5500() ? 4 : 1;
if (omti8621->get_sector(sector1, db, sizeof(db), 0) == sizeof(db))
{
@@ -1228,7 +1228,7 @@ MACHINE_START_MEMBER(apollo_state,apollo)
MACHINE_RESET_MEMBER(apollo_state,apollo)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
- UINT8 year = apollo_rtc_r(space, 9);
+ uint8_t year = apollo_rtc_r(space, 9);
MLOG1(("machine_reset_apollo"));
@@ -1288,7 +1288,7 @@ const device_type APOLLO_STDIO = &device_creator<apollo_stdio_device> ;
//-------------------------------------------------
apollo_stdio_device::apollo_stdio_device(const machine_config &mconfig,
- const char *tag, device_t *owner, UINT32 clock) :
+ const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, APOLLO_STDIO, "Apollo STDIO", tag, owner, clock,
"apollo_stdio", __FILE__), device_serial_interface(mconfig, *this),
m_tx_w(*this)
@@ -1344,7 +1344,7 @@ void apollo_stdio_device::device_timer(emu_timer &timer, device_timer_id id,
void apollo_stdio_device::rcv_complete() // Rx completed receiving byte
{
receive_register_extract();
- UINT8 data = get_received_char();
+ uint8_t data = get_received_char();
// output data to stdout (FIXME: '\r' may confuse ceterm)
if (data != '\r')
@@ -1383,7 +1383,7 @@ void apollo_stdio_device::tra_callback() // Tx send bit
TIMER_CALLBACK_MEMBER(apollo_stdio_device::poll_timer)
{
#if defined(__linux__)
- UINT8 data;
+ uint8_t data;
while (::read(STDIN_FILENO, &data, 1) == 1)
{
xmit_char(data == '\n' ? '\r' : data);
@@ -1391,7 +1391,7 @@ TIMER_CALLBACK_MEMBER(apollo_stdio_device::poll_timer)
#endif
}
-void apollo_stdio_device::xmit_char(UINT8 data)
+void apollo_stdio_device::xmit_char(uint8_t data)
{
CLOG1(("xmit_char %02x - %c", data, data));
diff --git a/src/mame/machine/apollo_dbg.cpp b/src/mame/machine/apollo_dbg.cpp
index f2991f8934c..1b551fa38ee 100644
--- a/src/mame/machine/apollo_dbg.cpp
+++ b/src/mame/machine/apollo_dbg.cpp
@@ -863,9 +863,9 @@ static const char* trap8[] = {
// get parameter string for parameter type and value at addr
-static const char *get_param(m68000_base_device *m68k, UINT32 addr, char type)
+static const char *get_param(m68000_base_device *m68k, uint32_t addr, char type)
{
- UINT32 value = ~0;
+ uint32_t value = ~0;
// FIXME:
static char sb[256];
@@ -873,7 +873,7 @@ static const char *get_param(m68000_base_device *m68k, UINT32 addr, char type)
int i;
char ch;
int maxlen = sizeof(sb) - 2;
- UINT32 value1;
+ uint32_t value1;
sb[0] = 0;
@@ -936,8 +936,8 @@ static const char *get_param(m68000_base_device *m68k, UINT32 addr, char type)
static const char* get_svc_call(m68000_base_device *m68k, int trap_no,
int trap_code, char *sb)
{
- UINT32 sp = REG_A(m68k)[7];
- UINT32 pa;
+ uint32_t sp = REG_A(m68k)[7];
+ uint32_t pa;
const char * name = nullptr;
const char * param = nullptr;
@@ -1035,13 +1035,13 @@ static const char* get_svc_call(m68000_base_device *m68k, int trap_no,
static const char * disassemble(m68000_base_device *m68k, offs_t pc, char* sb)
{
- UINT8 oprom[10];
- UINT8 opram[10];
- UINT32 options = 0;
+ uint8_t oprom[10];
+ uint8_t opram[10];
+ uint32_t options = 0;
// remember bus error state
- UINT32 tmp_buserror_occurred = m68k->mmu_tmp_buserror_occurred;
- UINT32 tmp_buserror_address = m68k->mmu_tmp_buserror_address;
+ uint32_t tmp_buserror_occurred = m68k->mmu_tmp_buserror_occurred;
+ uint32_t tmp_buserror_address = m68k->mmu_tmp_buserror_address;
m68k->mmu_tmp_buserror_occurred = 0;
m68k->mmu_tmp_rw = 1;
@@ -1070,13 +1070,13 @@ static const char * disassemble(m68000_base_device *m68k, offs_t pc, char* sb)
return sb;
}
-static const UINT16 *get_data(m68000_base_device *m68k, offs_t addr)
+static const uint16_t *get_data(m68000_base_device *m68k, offs_t addr)
{
- static UINT16 data[4];
+ static uint16_t data[4];
// remember bus error state
- UINT32 tmp_buserror_occurred = m68k->mmu_tmp_buserror_occurred;
- UINT32 tmp_buserror_address = m68k->mmu_tmp_buserror_address;
+ uint32_t tmp_buserror_occurred = m68k->mmu_tmp_buserror_occurred;
+ uint32_t tmp_buserror_address = m68k->mmu_tmp_buserror_address;
m68k->mmu_tmp_buserror_occurred = 0;
m68k->mmu_tmp_rw = 1;
@@ -1103,16 +1103,16 @@ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc)
{
// trap data remembered for next rte
static struct {
- UINT32 pc;
- UINT32 sp;
- UINT16 trap_no;
- UINT16 trap_code;
+ uint32_t pc;
+ uint32_t sp;
+ uint16_t trap_no;
+ uint16_t trap_code;
} trap = { 0, 0, 0, 0 };
if (apollo_config( APOLLO_CONF_TRAP_TRACE | APOLLO_CONF_FPU_TRACE))
{
- UINT32 ppc_save;
- UINT16 ir;
+ uint32_t ppc_save;
+ uint16_t ir;
m68000_base_device *m68k = device;
m68k->mmu_tmp_buserror_occurred = 0;
@@ -1140,7 +1140,7 @@ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc)
}
else if (ir == 0x4e73) // RTE
{
- const UINT16 *data = get_data(m68k, REG_A(m68k)[7]);
+ const uint16_t *data = get_data(m68k, REG_A(m68k)[7]);
if ( REG_USP(m68k) == 0 && (data[0] & 0x2000) == 0) {
DLOG(("%s sp=%08x RTE: sr=%04x pc=%04x%04x v=%04x usp=%08x",
apollo_cpu_context(device->machine().firstcpu),
diff --git a/src/mame/machine/apollo_kbd.cpp b/src/mame/machine/apollo_kbd.cpp
index 837418b4adc..e86c2465d65 100644
--- a/src/mame/machine/apollo_kbd.cpp
+++ b/src/mame/machine/apollo_kbd.cpp
@@ -61,7 +61,7 @@ const device_type APOLLO_KBD = &device_creator<apollo_kbd_device>;
// apollo_kbd_device - constructor
//-------------------------------------------------
-apollo_kbd_device::apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+apollo_kbd_device::apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, APOLLO_KBD, "Apollo Keyboard", tag, owner, clock, "apollo_kbd", __FILE__),
device_serial_interface(mconfig, *this),
m_tx_w(*this),
@@ -269,7 +269,7 @@ void apollo_kbd_device::mouse::read_mouse()
}
else if (b != m_last_b || x != m_last_x || y != m_last_y)
{
- UINT8 mouse_data[4];
+ uint8_t mouse_data[4];
int mouse_data_size;
int dx = x - m_last_x;
@@ -321,7 +321,7 @@ int apollo_kbd_device::keyboard_is_german()
return (m_german_r() == ASSERT_LINE) ? true : false;
}
-void apollo_kbd_device::set_mode(UINT16 mode)
+void apollo_kbd_device::set_mode(uint16_t mode)
{
xmit_char(0xff);
xmit_char(mode);
@@ -348,7 +348,7 @@ void apollo_kbd_device::tra_complete() // Tx completed sending byte
void apollo_kbd_device::rcv_complete() // Rx completed receiving byte
{
receive_register_extract();
- UINT8 data = get_received_char();
+ uint8_t data = get_received_char();
kgetchar(data);
}
@@ -359,11 +359,11 @@ void apollo_kbd_device::tra_callback() // Tx send bit
m_tx_w(bit);
}
-void apollo_kbd_device::input_callback(UINT8 state)
+void apollo_kbd_device::input_callback(uint8_t state)
{
}
-void apollo_kbd_device::xmit_char(UINT8 data)
+void apollo_kbd_device::xmit_char(uint8_t data)
{
// if tx is busy it'll pick this up automatically when it completes
if (!m_tx_busy)
@@ -386,7 +386,7 @@ void apollo_kbd_device::xmit_char(UINT8 data)
putdata - put keyboard data to sio
-------------------------------------------------*/
-void apollo_kbd_device::putdata(const UINT8 *data, int data_length)
+void apollo_kbd_device::putdata(const uint8_t *data, int data_length)
{
// send data only if no real Apollo keyboard has been connected
if (m_mode > KBD_MODE_1_KEYSTATE)
@@ -406,12 +406,12 @@ void apollo_kbd_device::putdata(const UINT8 *data, int data_length)
void apollo_kbd_device::putstring(const char *data)
{
- putdata((UINT8 *) data, strlen(data));
+ putdata((uint8_t *) data, strlen(data));
}
-void apollo_kbd_device::kgetchar(UINT8 data)
+void apollo_kbd_device::kgetchar(uint8_t data)
{
- static const UINT8 ff1116_data[] = { 0x00, 0xff, 0x00 };
+ static const uint8_t ff1116_data[] = { 0x00, 0xff, 0x00 };
LOG1(("getchar <- %02x", data));
@@ -502,15 +502,15 @@ void apollo_kbd_device::kgetchar(UINT8 data)
}
}
-int apollo_kbd_device::push_scancode(UINT8 code, UINT8 repeat)
+int apollo_kbd_device::push_scancode(uint8_t code, uint8_t repeat)
{
int n_chars = 0;
- UINT16 key_code = 0;
- UINT8 caps = BIT(machine().root_device().ioport("keyboard4")->read(),0);
- UINT8 shift = BIT(machine().root_device().ioport("keyboard4")->read(),1) | BIT(machine().root_device().ioport("keyboard4")->read(),5);
- UINT8 ctrl = BIT(machine().root_device().ioport("keyboard4")->read(),2);
- UINT8 numlock = BIT(machine().root_device().ioport("keyboard4")->read(),6);
- UINT16 index;
+ uint16_t key_code = 0;
+ uint8_t caps = BIT(machine().root_device().ioport("keyboard4")->read(),0);
+ uint8_t shift = BIT(machine().root_device().ioport("keyboard4")->read(),1) | BIT(machine().root_device().ioport("keyboard4")->read(),5);
+ uint8_t ctrl = BIT(machine().root_device().ioport("keyboard4")->read(),2);
+ uint8_t numlock = BIT(machine().root_device().ioport("keyboard4")->read(),6);
+ uint16_t index;
if (keyboard_is_german())
{
@@ -672,7 +672,7 @@ TIMER_CALLBACK_MEMBER(apollo_kbd_device::kbd_scan_timer)
}
}
-UINT16 apollo_kbd_device::m_code_table[] = {
+uint16_t apollo_kbd_device::m_code_table[] = {
/* Key | Keycap | Down | Up |Unshifted|Shifted|Control|Caps Lock|Up Trans|Auto */
/* Number| Legend | Code | Code|Code | Code | Code |Code | Code |Repeat*/
diff --git a/src/mame/machine/apollo_kbd.h b/src/mame/machine/apollo_kbd.h
index 7e5fafe4fba..69921a444ad 100644
--- a/src/mame/machine/apollo_kbd.h
+++ b/src/mame/machine/apollo_kbd.h
@@ -47,7 +47,7 @@ class apollo_kbd_device : public device_t, public device_serial_interface
{
public:
// construction/destruction
- apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_tx_cb(device_t &device, _Object object) { return downcast<apollo_kbd_device &>(device).m_tx_w.set_callback(object); }
template<class _Object> static devcb_base &set_german_cb(device_t &device, _Object object) { return downcast<apollo_kbd_device &>(device).m_german_r.set_callback(object); }
@@ -65,7 +65,7 @@ private:
virtual void rcv_complete() override; // Rx completed receiving byte
virtual void tra_complete() override; // Tx completed sending byte
virtual void tra_callback() override; // Tx send bit
- void input_callback(UINT8 state);
+ void input_callback(uint8_t state);
TIMER_CALLBACK_MEMBER( kbd_scan_timer );
@@ -73,15 +73,15 @@ private:
template <typename Format, typename... Params>
void logerror(Format &&fmt, Params &&... args) const;
- void kgetchar(UINT8 data);
+ void kgetchar(uint8_t data);
int keyboard_is_german();
- void set_mode(UINT16 mode);
- void putdata(const UINT8 *data, int data_length);
+ void set_mode(uint16_t mode);
+ void putdata(const uint8_t *data, int data_length);
void putstring(const char *data);
- int push_scancode( UINT8 code, UINT8 repeat);
+ int push_scancode( uint8_t code, uint8_t repeat);
void scan_keyboard();
// the keyboard beeper
@@ -121,11 +121,11 @@ private:
static const int XMIT_RING_SIZE = 64;
- UINT8 m_xmitring[XMIT_RING_SIZE];
+ uint8_t m_xmitring[XMIT_RING_SIZE];
int m_xmit_read, m_xmit_write;
bool m_tx_busy;
- void xmit_char(UINT8 data);
+ void xmit_char(uint8_t data);
beeper m_beeper;
mouse m_mouse;
@@ -141,18 +141,18 @@ private:
ioport_port *m_io_mouse3;
/* Receiver */
- UINT32 m_rx_message;
- UINT16 m_loopback_mode;
+ uint32_t m_rx_message;
+ uint16_t m_loopback_mode;
emu_timer* m_timer;
- UINT16 m_mode;
- UINT16 m_delay; // key press delay after initial press
- UINT16 m_repeat; // key press repeat rate
- UINT16 m_last_pressed; // last key pressed, for repeat key handling
+ uint16_t m_mode;
+ uint16_t m_delay; // key press delay after initial press
+ uint16_t m_repeat; // key press repeat rate
+ uint16_t m_last_pressed; // last key pressed, for repeat key handling
int m_keytime[0x80]; // time until next key press (1 ms)
- UINT8 m_keyon[0x80]; // is 1 if key is pressed
+ uint8_t m_keyon[0x80]; // is 1 if key is pressed
- static UINT16 m_code_table[];
+ static uint16_t m_code_table[];
};
// device type definition
diff --git a/src/mame/machine/apple2.cpp b/src/mame/machine/apple2.cpp
index b6c1b9ed651..6ed41ea5d9b 100644
--- a/src/mame/machine/apple2.cpp
+++ b/src/mame/machine/apple2.cpp
@@ -62,8 +62,8 @@ void apple2_state::apple2_update_memory()
read8_delegate *rh;
write8_delegate *wh;
offs_t begin, end_r, end_w;
- UINT8 *rbase, *wbase;
- UINT32 offset;
+ uint8_t *rbase, *wbase;
+ uint32_t offset;
bank_disposition_t bank_disposition;
int wh_nop = 0;
@@ -378,7 +378,7 @@ READ8_MEMBER(apple2_state::apple2_c080_r)
if ((m_machinetype == LASER128) && (slot == 5))
{
offset &= 0xf;
- UINT8 retval = m_exp_regs[offset];
+ uint8_t retval = m_exp_regs[offset];
if (offset == 3)
{
@@ -513,7 +513,7 @@ WRITE8_MEMBER(apple2_state::apple2_c080_w)
}
/* returns default CnXX slotram for a slot space */
-INT8 apple2_state::apple2_slotram_r(address_space &space, int slotnum, int offset)
+int8_t apple2_state::apple2_slotram_r(address_space &space, int slotnum, int offset)
{
if (m_slot_ram)
{
@@ -1097,7 +1097,7 @@ static const apple2_memmap_entry tk2000_memmap_entries[] =
{ 0 }
};
-void apple2_state::apple2_setvar(UINT32 val, UINT32 mask)
+void apple2_state::apple2_setvar(uint32_t val, uint32_t mask)
{
LOG(("apple2_setvar(): val=0x%06x mask=0x%06x pc=0x%04x\n", val, mask,
(unsigned int) m_maincpu->pc()));
@@ -1127,7 +1127,7 @@ void apple2_state::apple2_setvar(UINT32 val, UINT32 mask)
* with FIX:
* ----------------------------------------------------------------------- */
-UINT8 apple2_state::apple2_getfloatingbusvalue()
+uint8_t apple2_state::apple2_getfloatingbusvalue()
{
enum
{
@@ -1301,7 +1301,7 @@ void apple2_state::machine_reset()
m_joystick_x1_time = m_joystick_y1_time = 0;
m_joystick_x2_time = m_joystick_y2_time = 0;
- memset(m_exp_regs, 0, sizeof(UINT8) * 0x10);
+ memset(m_exp_regs, 0, sizeof(uint8_t) * 0x10);
m_exp_wptr = m_exp_liveptr = 0;
}
@@ -1743,7 +1743,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxrame000_w )
READ8_MEMBER ( apple2_state::apple2_c00x_r )
{
- UINT8 result = 0;
+ uint8_t result = 0;
if(!space.debugger_access())
{
@@ -1783,7 +1783,7 @@ READ8_MEMBER ( apple2_state::apple2_c00x_r )
WRITE8_MEMBER ( apple2_state::apple2_c00x_w )
{
- UINT32 mask;
+ uint32_t mask;
mask = 1 << (offset / 2);
apple2_setvar((offset & 1) ? mask : 0, mask);
@@ -1797,7 +1797,7 @@ WRITE8_MEMBER ( apple2_state::apple2_c00x_w )
READ8_MEMBER( apple2_state::apple2_c01x_r )
{
- UINT8 result = apple2_getfloatingbusvalue() & 0x7F;
+ uint8_t result = apple2_getfloatingbusvalue() & 0x7F;
if(!space.debugger_access())
{
@@ -1917,7 +1917,7 @@ READ8_MEMBER ( apple2_state::apple2_c05x_r )
{
if(!space.debugger_access())
{
- UINT32 mask;
+ uint32_t mask;
if (m_machinetype == TK2000)
{
@@ -2078,7 +2078,7 @@ int apple2_state::apple2_fdc_has_525()
return 1; //apple525_get_count(machine) > 0;
}
-static void apple2_fdc_set_lines(device_t *device, UINT8 lines)
+static void apple2_fdc_set_lines(device_t *device, uint8_t lines)
{
apple2_state *state = device->machine().driver_data<apple2_state>();
if (state->m_fdc_diskreg & 0x40)
@@ -2127,10 +2127,10 @@ static void apple2_fdc_set_enable_lines(device_t *device,int enable_mask)
-static UINT8 apple2_fdc_read_data(device_t *device)
+static uint8_t apple2_fdc_read_data(device_t *device)
{
apple2_state *state = device->machine().driver_data<apple2_state>();
- UINT8 result = 0x00;
+ uint8_t result = 0x00;
if (state->m_fdc_diskreg & 0x40)
{
@@ -2153,7 +2153,7 @@ static UINT8 apple2_fdc_read_data(device_t *device)
-static void apple2_fdc_write_data(device_t *device, UINT8 data)
+static void apple2_fdc_write_data(device_t *device, uint8_t data)
{
apple2_state *state = device->machine().driver_data<apple2_state>();
if (state->m_fdc_diskreg & 0x40)
@@ -2201,7 +2201,7 @@ static int apple2_fdc_read_status(device_t *device)
}
-void apple2_state::apple2_iwm_setdiskreg(UINT8 data)
+void apple2_state::apple2_iwm_setdiskreg(uint8_t data)
{
m_fdc_diskreg = data & 0xC0;
if (apple2_fdc_has_35())
@@ -2275,7 +2275,7 @@ void apple2_state::apple2eplus_init_common(void *apple2cp_ce00_ram)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)apple2cp_ce00_ram;
+ mem_cfg.auxmem = (uint8_t*)apple2cp_ce00_ram;
apple2_setup_memory(&mem_cfg);
}
@@ -2300,8 +2300,8 @@ MACHINE_START_MEMBER(apple2_state,apple2cp)
/* there appears to be some hidden RAM that is swapped in on the Apple
* IIc plus; I have not found any official documentation but the BIOS
* clearly uses this area as writeable memory */
- apple2cp_ce00_ram = auto_alloc_array(machine(), UINT8, 0x200);
- memset(apple2cp_ce00_ram, 0, sizeof(UINT8) * 0x200);
+ apple2cp_ce00_ram = auto_alloc_array(machine(), uint8_t, 0x200);
+ memset(apple2cp_ce00_ram, 0, sizeof(uint8_t) * 0x200);
m_machinetype = APPLE_IICPLUS;
@@ -2322,7 +2322,7 @@ MACHINE_START_MEMBER(apple2_state,apple2e)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)nullptr;
+ mem_cfg.auxmem = (uint8_t*)nullptr;
apple2_setup_memory(&mem_cfg);
}
@@ -2336,7 +2336,7 @@ MACHINE_START_MEMBER(apple2_state,laser128)
apple2_init_common();
// 1 MB of expansion RAM in slot 5
- m_exp_ram = std::make_unique<UINT8[]>(1024*1024);
+ m_exp_ram = std::make_unique<uint8_t[]>(1024*1024);
memset(m_exp_ram.get(), 0xff, 1024*1024);
m_exp_bankhior = 0xf0;
@@ -2353,7 +2353,7 @@ MACHINE_START_MEMBER(apple2_state,laser128)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)nullptr;
+ mem_cfg.auxmem = (uint8_t*)nullptr;
apple2_setup_memory(&mem_cfg);
}
@@ -2373,7 +2373,7 @@ MACHINE_START_MEMBER(apple2_state,apple2orig)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)apple2cp_ce00_ram;
+ mem_cfg.auxmem = (uint8_t*)apple2cp_ce00_ram;
apple2_setup_memory(&mem_cfg);
}
@@ -2393,7 +2393,7 @@ MACHINE_START_MEMBER(apple2_state,space84)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)apple2cp_ce00_ram;
+ mem_cfg.auxmem = (uint8_t*)apple2cp_ce00_ram;
apple2_setup_memory(&mem_cfg);
}
@@ -2413,7 +2413,7 @@ MACHINE_START_MEMBER(apple2_state,laba2p)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)apple2cp_ce00_ram;
+ mem_cfg.auxmem = (uint8_t*)apple2cp_ce00_ram;
apple2_setup_memory(&mem_cfg);
}
@@ -2432,11 +2432,11 @@ MACHINE_START_MEMBER(apple2_state,tk2000)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = tk2000_memmap_entries;
- mem_cfg.auxmem = (UINT8*)nullptr;
+ mem_cfg.auxmem = (uint8_t*)nullptr;
apple2_setup_memory(&mem_cfg);
}
-int apple2_state::apple2_pressed_specialkey(UINT8 key)
+int apple2_state::apple2_pressed_specialkey(uint8_t key)
{
return (m_kbspecial.read_safe(0) & key)
|| (m_joybuttons.read_safe(0) & key);
@@ -2533,7 +2533,7 @@ READ_LINE_MEMBER(apple2_state::ay3600_control_r)
return CLEAR_LINE;
}
-static const UINT8 a2_key_remap[0x32][4] =
+static const uint8_t a2_key_remap[0x32][4] =
{
/* norm shft ctrl both */
{ 0x33,0x23,0x33,0x23 }, /* 3 # 00 */
@@ -2612,8 +2612,8 @@ WRITE_LINE_MEMBER(apple2_state::ay3600_iie_data_ready_w)
{
if (state == ASSERT_LINE)
{
- UINT8 *decode = m_kbdrom->base();
- UINT16 trans;
+ uint8_t *decode = m_kbdrom->base();
+ uint16_t trans;
m_lastchar = m_ay3600->b_r();
diff --git a/src/mame/machine/apple2gs.cpp b/src/mame/machine/apple2gs.cpp
index 91430cdce15..37cee8f58e5 100644
--- a/src/mame/machine/apple2gs.cpp
+++ b/src/mame/machine/apple2gs.cpp
@@ -139,7 +139,7 @@
void apple2gs_state::process_clock()
{
- UINT8 operation;
+ uint8_t operation;
seconds_t current_interval;
/* update clock_curtime */
@@ -233,7 +233,7 @@ void apple2gs_state::process_clock()
* Interrupts
* ----------------------------------------------------------------------- */
-const char *apple2gs_state::apple2gs_irq_name(UINT16 irq_mask)
+const char *apple2gs_state::apple2gs_irq_name(uint16_t irq_mask)
{
switch(irq_mask)
{
@@ -250,7 +250,7 @@ const char *apple2gs_state::apple2gs_irq_name(UINT16 irq_mask)
return nullptr;
}
-void apple2gs_state::apple2gs_add_irq(UINT16 irq_mask)
+void apple2gs_state::apple2gs_add_irq(uint16_t irq_mask)
{
if ((m_pending_irqs & irq_mask) == 0x00)
{
@@ -264,7 +264,7 @@ void apple2gs_state::apple2gs_add_irq(UINT16 irq_mask)
-void apple2gs_state::apple2gs_remove_irq(UINT16 irq_mask)
+void apple2gs_state::apple2gs_remove_irq(uint16_t irq_mask)
{
if (m_pending_irqs & irq_mask)
{
@@ -317,7 +317,7 @@ TIMER_CALLBACK_MEMBER(apple2gs_state::apple2gs_qsecond_tick)
#if !RUN_ADB_MICRO
-UINT8 apple2gs_state::adb_read_memory(UINT32 address)
+uint8_t apple2gs_state::adb_read_memory(uint32_t address)
{
if (address < ARRAY_LENGTH(m_adb_memory))
return m_adb_memory[address];
@@ -327,7 +327,7 @@ UINT8 apple2gs_state::adb_read_memory(UINT32 address)
-void apple2gs_state::adb_write_memory(UINT32 address, UINT8 data)
+void apple2gs_state::adb_write_memory(uint32_t address, uint8_t data)
{
if (address < ARRAY_LENGTH(m_adb_memory))
m_adb_memory[address] = data;
@@ -335,21 +335,21 @@ void apple2gs_state::adb_write_memory(UINT32 address, UINT8 data)
-void apple2gs_state::adb_set_mode(UINT8 mode)
+void apple2gs_state::adb_set_mode(uint8_t mode)
{
m_adb_mode = mode;
}
-void apple2gs_state::adb_set_config(UINT8 b1, UINT8 b2, UINT8 b3)
+void apple2gs_state::adb_set_config(uint8_t b1, uint8_t b2, uint8_t b3)
{
/* ignore for now */
}
-void apple2gs_state::adb_post_response(const UINT8 *bytes, size_t length)
+void apple2gs_state::adb_post_response(const uint8_t *bytes, size_t length)
{
assert(length < ARRAY_LENGTH(m_adb_response_bytes));
memcpy(m_adb_response_bytes, bytes, length);
@@ -361,16 +361,16 @@ void apple2gs_state::adb_post_response(const UINT8 *bytes, size_t length)
-void apple2gs_state::adb_post_response_1(UINT8 b)
+void apple2gs_state::adb_post_response_1(uint8_t b)
{
adb_post_response(&b, 1);
}
-void apple2gs_state::adb_post_response_2(UINT8 b1, UINT8 b2)
+void apple2gs_state::adb_post_response_2(uint8_t b1, uint8_t b2)
{
- UINT8 b[2];
+ uint8_t b[2];
b[0] = b1;
b[1] = b2;
adb_post_response(b, 2);
@@ -380,8 +380,8 @@ void apple2gs_state::adb_post_response_2(UINT8 b1, UINT8 b2)
void apple2gs_state::adb_do_command()
{
int device;
- UINT32 address;
- UINT8 val;
+ uint32_t address;
+ uint8_t val;
m_adb_state = ADBSTATE_IDLE;
if (LOG_ADB)
@@ -467,9 +467,9 @@ void apple2gs_state::adb_do_command()
}
-UINT8 apple2gs_state::adb_read_datareg()
+uint8_t apple2gs_state::adb_read_datareg()
{
- UINT8 result;
+ uint8_t result;
switch(m_adb_state)
{
@@ -495,7 +495,7 @@ UINT8 apple2gs_state::adb_read_datareg()
}
-void apple2gs_state::adb_write_datareg(UINT8 data)
+void apple2gs_state::adb_write_datareg(uint8_t data)
{
if (LOG_ADB)
logerror("adb_write_datareg(): data=0x%02x\n", data);
@@ -612,13 +612,13 @@ void apple2gs_state::adb_write_datareg(UINT8 data)
// real rom 3 h/w reads 0x90 when idle, 0x98 when key pressed
// current MESS reads back 0xb0 when idle
-UINT8 apple2gs_state::adb_read_kmstatus()
+uint8_t apple2gs_state::adb_read_kmstatus()
{
return m_adb_kmstatus;
}
-void apple2gs_state::adb_write_kmstatus(UINT8 data)
+void apple2gs_state::adb_write_kmstatus(uint8_t data)
{
m_adb_kmstatus &= ~0x54;
m_adb_kmstatus |= data & 0x54;
@@ -626,11 +626,11 @@ void apple2gs_state::adb_write_kmstatus(UINT8 data)
-UINT8 apple2gs_state::adb_read_mousedata()
+uint8_t apple2gs_state::adb_read_mousedata()
{
- UINT8 result = 0x00;
- UINT8 absolute;
- INT8 delta;
+ uint8_t result = 0x00;
+ uint8_t absolute;
+ int8_t delta;
if (m_adb_kmstatus & 0x80) // mouse register full
{
@@ -659,7 +659,7 @@ UINT8 apple2gs_state::adb_read_mousedata()
}
-INT8 apple2gs_state::seven_bit_diff(UINT8 v1, UINT8 v2)
+int8_t apple2gs_state::seven_bit_diff(uint8_t v1, uint8_t v2)
{
v1 -= v2;
if (v1 & 0x40)
@@ -673,7 +673,7 @@ INT8 apple2gs_state::seven_bit_diff(UINT8 v1, UINT8 v2)
void apple2gs_state::adb_check_mouse()
{
- UINT8 new_mouse_x, new_mouse_y;
+ uint8_t new_mouse_x, new_mouse_y;
/* read mouse values */
if ((m_adb_kmstatus & 0x80) == 0x00)
@@ -698,7 +698,7 @@ void apple2gs_state::adb_check_mouse()
#endif
-void apple2gs_state::apple2gs_set_scanint(UINT8 data)
+void apple2gs_state::apple2gs_set_scanint(uint8_t data)
{
/* second interrupt */
if ((m_vgcint & 0x40) && !(data & 0x40))
@@ -729,7 +729,7 @@ TIMER_CALLBACK_MEMBER(apple2gs_state::apple2gs_scanline_tick)
/* check scanline interrupt bits if we're in super hi-res and the current scanline is within the active display area */
if ((m_newvideo & 0x80) && (scanline >= (BORDER_TOP-1)) && (scanline < (200+BORDER_TOP-1)))
{
- UINT8 scb;
+ uint8_t scb;
scb = m_slowmem[0x19D00 + scanline - BORDER_TOP + 1];
@@ -785,7 +785,7 @@ TIMER_CALLBACK_MEMBER(apple2gs_state::apple2gs_scanline_tick)
READ8_MEMBER( apple2gs_state::gssnd_r )
{
- UINT8 ret = 0;
+ uint8_t ret = 0;
switch (offset)
{
@@ -797,7 +797,7 @@ READ8_MEMBER( apple2gs_state::gssnd_r )
if (m_sndglu_ctrl & 0x40) // docram access
{
- UINT8 *docram = memregion("es5503")->base();
+ uint8_t *docram = memregion("es5503")->base();
m_sndglu_dummy_read = docram[m_sndglu_addr];
}
else
@@ -837,7 +837,7 @@ WRITE8_MEMBER( apple2gs_state::gssnd_w )
case 1: // data write
if (m_sndglu_ctrl & 0x40) // docram access
{
- UINT8 *docram = memregion("es5503")->base();
+ uint8_t *docram = memregion("es5503")->base();
docram[m_sndglu_addr] = data;
}
else
@@ -871,7 +871,7 @@ WRITE8_MEMBER( apple2gs_state::gssnd_w )
int apple2gs_state::apple2gs_get_vpos()
{
int result, scan;
- static const UINT8 top_border_vert[BORDER_TOP] =
+ static const uint8_t top_border_vert[BORDER_TOP] =
{
0xfa, 0xfa, 0xfa, 0xfa, 0xfb, 0xfb, 0xfb, 0xfb,
0xfc, 0xfc, 0xfc, 0xfd, 0xfd, 0xfe, 0xfe, 0xff,
@@ -894,7 +894,7 @@ int apple2gs_state::apple2gs_get_vpos()
READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r )
{
- UINT8 result;
+ uint8_t result;
scc8530_t *scc;
if(space.debugger_access())
@@ -943,7 +943,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r )
result = 0;
{
- UINT8 temp = m_kbspecial->read();
+ uint8_t temp = m_kbspecial->read();
if (temp & 1) // capslock
{
result |= 4;
@@ -1447,7 +1447,7 @@ static void apple2gs_mem_004000(running_machine &machine,offs_t begin, offs_t en
meminfo->write_handler = (state->m_flags & VAR_RAMWRT) ? &state->write_delegates_2gs4000[0] : &state->write_delegates_2gs4000[1];
}
-static void apple2gs_mem_xxD000(running_machine &machine,apple2_meminfo *meminfo, UINT32 lcmem)
+static void apple2gs_mem_xxD000(running_machine &machine,apple2_meminfo *meminfo, uint32_t lcmem)
{
apple2gs_state *state = machine.driver_data<apple2gs_state>();
if (state->m_flags & VAR_LCRAM)
@@ -1475,7 +1475,7 @@ static void apple2gs_mem_xxD000(running_machine &machine,apple2_meminfo *meminfo
}
}
-static void apple2gs_mem_xxE000(running_machine &machine,apple2_meminfo *meminfo, UINT32 lcmem)
+static void apple2gs_mem_xxE000(running_machine &machine,apple2_meminfo *meminfo, uint32_t lcmem)
{
apple2gs_state *state = machine.driver_data<apple2gs_state>();
if (state->m_flags & VAR_LCRAM)
@@ -1590,9 +1590,9 @@ static const apple2_memmap_entry apple2gs_memmap_entries[] =
-UINT8 *apple2gs_state::apple2gs_getslotmem(offs_t address)
+uint8_t *apple2gs_state::apple2gs_getslotmem(offs_t address)
{
- UINT8 *rom;
+ uint8_t *rom;
address %= 0x00FFFF;
assert(address >= 0xC000);
@@ -1605,9 +1605,9 @@ UINT8 *apple2gs_state::apple2gs_getslotmem(offs_t address)
-UINT8 apple2gs_state::apple2gs_xxCxxx_r(address_space &space, offs_t address)
+uint8_t apple2gs_state::apple2gs_xxCxxx_r(address_space &space, offs_t address)
{
- UINT8 result;
+ uint8_t result;
int slot;
if ((m_shadow & 0x40) && ((address & 0xF00000) == 0x000000)) // shadow all banks and C0xx?
@@ -1687,7 +1687,7 @@ UINT8 apple2gs_state::apple2gs_xxCxxx_r(address_space &space, offs_t address)
-void apple2gs_state::apple2gs_xxCxxx_w(address_space &space, offs_t address, UINT8 data)
+void apple2gs_state::apple2gs_xxCxxx_w(address_space &space, offs_t address, uint8_t data)
{
int slot;
@@ -1821,7 +1821,7 @@ void apple2gs_state::apple2gs_setup_memory()
apple2_memmap_config cfg;
/* allocate memory for E00000-E1FFFF */
- m_slowmem = make_unique_clear<UINT8[]>(128*1024);
+ m_slowmem = make_unique_clear<uint8_t[]>(128*1024);
save_pointer(m_slowmem.get(), "APPLE2GS_SLOWMEM", 128*1024);
// install expanded memory
@@ -1972,7 +1972,7 @@ MACHINE_START_MEMBER(apple2gs_state,apple2gscommon)
machine().device<nvram_device>("nvram")->set_base(m_clock_bram, sizeof(m_clock_bram));
/* save state stuff. note that the driver takes care of docram. */
- UINT8* ram = m_ram->pointer();
+ uint8_t* ram = m_ram->pointer();
save_pointer(ram, "APPLE2GS_RAM", m_ram->size());
save_item(m_newvideo, "NEWVIDEO");
@@ -2061,9 +2061,9 @@ void apple2gs_state::apple2gs_refresh_delegates()
* Keym_glu / low-level ADB emulation
* ----------------------------------------------------------------------- */
#if RUN_ADB_MICRO
-UINT8 apple2gs_state::keyglu_mcu_read(UINT8 offset)
+uint8_t apple2gs_state::keyglu_mcu_read(uint8_t offset)
{
- UINT8 rv = m_glu_regs[offset];
+ uint8_t rv = m_glu_regs[offset];
// printf("MCU reads reg %x\n", offset);
@@ -2085,7 +2085,7 @@ UINT8 apple2gs_state::keyglu_mcu_read(UINT8 offset)
return rv;
}
-void apple2gs_state::keyglu_mcu_write(UINT8 offset, UINT8 data)
+void apple2gs_state::keyglu_mcu_write(uint8_t offset, uint8_t data)
{
m_glu_regs[offset] = data;
@@ -2127,13 +2127,13 @@ void apple2gs_state::keyglu_mcu_write(UINT8 offset, UINT8 data)
C027 KMSTATUS = GLU system status register
*/
-UINT8 apple2gs_state::keyglu_816_read(UINT8 offset)
+uint8_t apple2gs_state::keyglu_816_read(uint8_t offset)
{
switch (offset)
{
case GLU_C000:
{
- UINT8 rv;
+ uint8_t rv;
rv = m_glu_regs[GLU_KEY_DATA] & 0x7f;
if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE)
{
@@ -2145,7 +2145,7 @@ UINT8 apple2gs_state::keyglu_816_read(UINT8 offset)
case GLU_C010:
{
- UINT8 rv;
+ uint8_t rv;
rv = m_glu_regs[GLU_KEY_DATA] & 0x7f;
if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE)
{
@@ -2209,7 +2209,7 @@ UINT8 apple2gs_state::keyglu_816_read(UINT8 offset)
return 0xff;
}
-void apple2gs_state::keyglu_816_write(UINT8 offset, UINT8 data)
+void apple2gs_state::keyglu_816_write(uint8_t offset, uint8_t data)
{
if (offset < GLU_C000)
{
diff --git a/src/mame/machine/apple3.cpp b/src/mame/machine/apple3.cpp
index 1edd8fdbbd8..238e0f46f27 100644
--- a/src/mame/machine/apple3.cpp
+++ b/src/mame/machine/apple3.cpp
@@ -62,7 +62,7 @@
READ8_MEMBER(apple3_state::apple3_c0xx_r)
{
- UINT8 result = 0xFF;
+ uint8_t result = 0xFF;
device_a2bus_card_interface *slotdevice;
switch(offset)
@@ -77,7 +77,7 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0x08: case 0x09: case 0x0A: case 0x0B:
case 0x0C: case 0x0D: case 0x0E: case 0x0F:
{
- UINT8 tmp = m_kbspecial->read();
+ uint8_t tmp = m_kbspecial->read();
result = 0x7c | (m_transchar & 0x80);
@@ -476,9 +476,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple3_state::apple3_interrupt)
m_via_1->write_cb2(machine().first_screen()->vblank());
}
-UINT8 *apple3_state::apple3_bankaddr(UINT16 bank, offs_t offset)
+uint8_t *apple3_state::apple3_bankaddr(uint16_t bank, offs_t offset)
{
- if (bank != (UINT16) ~0)
+ if (bank != (uint16_t) ~0)
{
bank %= m_ram->size() / 0x8000;
if ((bank + 1) == (m_ram->size() / 0x8000))
@@ -489,7 +489,7 @@ UINT8 *apple3_state::apple3_bankaddr(UINT16 bank, offs_t offset)
return &m_ram->pointer()[offset];
}
-UINT8 *apple3_state::apple3_get_zpa_addr(offs_t offset)
+uint8_t *apple3_state::apple3_get_zpa_addr(offs_t offset)
{
m_zpa = (((offs_t) m_via_0_b) * 0x100) + offset;
@@ -503,8 +503,8 @@ UINT8 *apple3_state::apple3_get_zpa_addr(offs_t offset)
void apple3_state::apple3_update_memory()
{
- UINT16 bank;
- UINT8 page;
+ uint16_t bank;
+ uint8_t page;
if (LOG_MEMORY)
{
@@ -589,7 +589,7 @@ void apple3_state::apple3_update_memory()
-void apple3_state::apple3_via_out(UINT8 *var, UINT8 data)
+void apple3_state::apple3_via_out(uint8_t *var, uint8_t data)
{
if (*var != data)
{
@@ -680,9 +680,9 @@ MACHINE_RESET_MEMBER(apple3_state,apple3)
-UINT8 *apple3_state::apple3_get_indexed_addr(offs_t offset)
+uint8_t *apple3_state::apple3_get_indexed_addr(offs_t offset)
{
- UINT8 *result = nullptr;
+ uint8_t *result = nullptr;
// m_indir_bank is guaranteed to be between 0x80 and 0x8f
if (m_indir_bank == 0x8f)
@@ -784,14 +784,14 @@ void apple3_state::apple3_postload()
READ8_MEMBER(apple3_state::apple3_memory_r)
{
- UINT8 rv = 0xff;
+ uint8_t rv = 0xff;
// (zp), y or (zp,x) read
if (!space.debugger_access())
{
if ((m_indir_bank & 0x80) && (offset >= 0x100))
{
- UINT8 *test;
+ uint8_t *test;
test = apple3_get_indexed_addr(offset);
if (test)
@@ -922,7 +922,7 @@ WRITE8_MEMBER(apple3_state::apple3_memory_w)
{
if ((m_indir_bank & 0x80) && (offset >= 0x100))
{
- UINT8 *test;
+ uint8_t *test;
test = apple3_get_indexed_addr(offset);
if (test)
@@ -1133,7 +1133,7 @@ READ_LINE_MEMBER(apple3_state::ay3600_control_r)
return CLEAR_LINE;
}
-static const UINT8 key_remap[0x50][4] =
+static const uint8_t key_remap[0x50][4] =
{
/* norm shft ctrl both */
{ 0x9b,0x9b,0x9b,0x9b }, /* Escape 00 */
@@ -1224,7 +1224,7 @@ WRITE_LINE_MEMBER(apple3_state::ay3600_data_ready_w)
if (state == ASSERT_LINE)
{
- UINT16 trans;
+ uint16_t trans;
int mod = 0;
m_lastchar = m_ay3600->b_r();
@@ -1246,7 +1246,7 @@ WRITE_LINE_MEMBER(apple3_state::ay3600_data_ready_w)
void apple3_state::pdl_handler(int offset)
{
- UINT8 pdlread;
+ uint8_t pdlread;
switch (offset)
{
@@ -1341,7 +1341,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple3_state::paddle_timer)
WRITE_LINE_MEMBER(apple3_state::a2bus_irq_w)
{
- UINT8 irq_mask = m_a2bus->get_a2bus_irq_mask();
+ uint8_t irq_mask = m_a2bus->get_a2bus_irq_mask();
m_via_1->write_ca1(state);
m_via_1->write_pa7(state);
diff --git a/src/mame/machine/apricotkb.cpp b/src/mame/machine/apricotkb.cpp
index d58997bb40a..2717e8cb397 100644
--- a/src/mame/machine/apricotkb.cpp
+++ b/src/mame/machine/apricotkb.cpp
@@ -245,7 +245,7 @@ ioport_constructor apricot_keyboard_device::device_input_ports() const
// apricot_keyboard_device - constructor
//-------------------------------------------------
-apricot_keyboard_device::apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+apricot_keyboard_device::apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, APRICOT_KEYBOARD, "Apricot Keyboard", tag, owner, clock, "aprikb", __FILE__),
m_write_txd(*this),
m_y(*this, "Y%u", 0),
@@ -278,9 +278,9 @@ void apricot_keyboard_device::device_reset()
// read_keyboard -
//-------------------------------------------------
-UINT8 apricot_keyboard_device::read_keyboard()
+uint8_t apricot_keyboard_device::read_keyboard()
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
for (int i = 0; i < 13; i++)
{
@@ -327,7 +327,7 @@ READ8_MEMBER( apricot_keyboard_device::kb_p6_r )
*/
- UINT8 modifiers = m_modifiers->read();
+ uint8_t modifiers = m_modifiers->read();
return modifiers << 1;
}
diff --git a/src/mame/machine/apricotkb.h b/src/mame/machine/apricotkb.h
index 5cc9ed9d2ac..cc5da305b38 100644
--- a/src/mame/machine/apricotkb.h
+++ b/src/mame/machine/apricotkb.h
@@ -42,7 +42,7 @@ class apricot_keyboard_device : public device_t
{
public:
// construction/destruction
- apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_txd_wr_callback(device_t &device, _Object object) { return downcast<apricot_keyboard_device &>(device).m_write_txd.set_callback(object); }
@@ -51,7 +51,7 @@ public:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
- UINT8 read_keyboard();
+ uint8_t read_keyboard();
DECLARE_READ8_MEMBER( kb_lo_r );
DECLARE_READ8_MEMBER( kb_hi_r );
@@ -73,7 +73,7 @@ private:
required_ioport_array<13> m_y;
required_ioport m_modifiers;
- UINT16 m_kb_y;
+ uint16_t m_kb_y;
};
diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp
index a82c38c91c9..ad0d68d0611 100644
--- a/src/mame/machine/archimds.cpp
+++ b/src/mame/machine/archimds.cpp
@@ -34,7 +34,7 @@
#include "debugger.h"
static const int page_sizes[4] = { 4096, 8192, 16384, 32768 };
-static const UINT32 pixel_rate[4] = { 8000000, 12000000, 16000000, 24000000};
+static const uint32_t pixel_rate[4] = { 8000000, 12000000, 16000000, 24000000};
#define IOC_LOG 0
@@ -126,10 +126,10 @@ void archimedes_state::vidc_vblank()
void archimedes_state::vidc_video_tick()
{
address_space &space = m_maincpu->space(AS_PROGRAM);
- static UINT8 *vram = m_region_vram->base();
- UINT32 size;
- UINT32 m_vidc_ccur;
- UINT32 offset_ptr;
+ static uint8_t *vram = m_region_vram->base();
+ uint32_t size;
+ uint32_t m_vidc_ccur;
+ uint32_t offset_ptr;
size = m_vidc_vidend-m_vidc_vidstart+0x10;
@@ -165,10 +165,10 @@ void archimedes_state::vidc_video_tick()
void archimedes_state::vidc_audio_tick()
{
address_space &space = m_maincpu->space(AS_PROGRAM);
- UINT8 ulaw_comp;
- INT16 res;
- UINT8 ch;
- static const INT16 mulawTable[256] =
+ uint8_t ulaw_comp;
+ int16_t res;
+ uint8_t ch;
+ static const int16_t mulawTable[256] =
{
-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
@@ -206,7 +206,7 @@ void archimedes_state::vidc_audio_tick()
for(ch=0;ch<8;ch++)
{
- UINT8 ulaw_temp = (space.read_byte(m_vidc_sndstart+m_vidc_sndcur + ch)) ^ 0xff;
+ uint8_t ulaw_temp = (space.read_byte(m_vidc_sndstart+m_vidc_sndcur + ch)) ^ 0xff;
ulaw_comp = (ulaw_temp>>1) | ((ulaw_temp&1)<<7);
@@ -314,14 +314,14 @@ void archimedes_state::archimedes_init()
READ32_MEMBER(archimedes_state::archimedes_memc_logical_r)
{
- UINT32 page, poffs;
+ uint32_t page, poffs;
// are we mapping in the boot ROM?
if (m_memc_latchrom)
{
- UINT32 *rom;
+ uint32_t *rom;
- rom = (UINT32 *)m_region_maincpu->base();
+ rom = (uint32_t *)m_region_maincpu->base();
return rom[offset & 0x1fffff];
}
@@ -352,7 +352,7 @@ READ32_MEMBER(archimedes_state::archimedes_memc_logical_r)
WRITE32_MEMBER(archimedes_state::archimedes_memc_logical_w)
{
- UINT32 page, poffs;
+ uint32_t page, poffs;
// if the boot ROM is mapped, ignore writes
if (m_memc_latchrom)
@@ -381,14 +381,14 @@ WRITE32_MEMBER(archimedes_state::archimedes_memc_logical_w)
/* Aristocrat Mark 5 - same as normal AA except with Dram emulator */
READ32_MEMBER(archimedes_state::aristmk5_drame_memc_logical_r)
{
- UINT32 page, poffs;
+ uint32_t page, poffs;
// are we mapping in the boot ROM?
if (m_memc_latchrom)
{
- UINT32 *rom;
+ uint32_t *rom;
- rom = (UINT32 *)m_region_maincpu->base();
+ rom = (uint32_t *)m_region_maincpu->base();
return rom[offset & 0x1fffff];
}
@@ -430,7 +430,7 @@ READ32_MEMBER(archimedes_state::aristmk5_drame_memc_logical_r)
void archimedes_state::archimedes_driver_init()
{
- m_archimedes_memc_physmem = reinterpret_cast<UINT32 *>(memshare("physicalram")->ptr());
+ m_archimedes_memc_physmem = reinterpret_cast<uint32_t *>(memshare("physicalram")->ptr());
// address_space &space = m_maincpu->space(AS_PROGRAM);
// space.set_direct_update_handler(direct_update_delegate(FUNC(a310_setopbase), &machine));
}
@@ -475,7 +475,7 @@ void archimedes_state::latch_timer_cnt(int tmr)
{
double time = m_timer[tmr]->elapsed().as_double();
time *= 2000000.0; // find out how many 2 MHz ticks have gone by
- m_ioc_timerout[tmr] = m_ioc_timercnt[tmr] - (UINT32)time;
+ m_ioc_timerout[tmr] = m_ioc_timercnt[tmr] - (uint32_t)time;
}
bool archimedes_state::check_floppy_ready()
@@ -509,8 +509,8 @@ READ32_MEMBER( archimedes_state::ioc_ctrl_r )
{
case CONTROL:
{
- UINT8 i2c_data = 1;
- UINT8 flyback; //internal name for vblank here
+ uint8_t i2c_data = 1;
+ uint8_t flyback; //internal name for vblank here
int vert_pos;
bool floppy_ready_state;
@@ -708,7 +708,7 @@ WRITE32_MEMBER( archimedes_state::ioc_ctrl_w )
READ32_MEMBER(archimedes_state::archimedes_ioc_r)
{
- UINT32 ioc_addr;
+ uint32_t ioc_addr;
ioc_addr = offset*4;
@@ -779,7 +779,7 @@ READ32_MEMBER(archimedes_state::archimedes_ioc_r)
WRITE32_MEMBER(archimedes_state::archimedes_ioc_w)
{
- UINT32 ioc_addr;
+ uint32_t ioc_addr;
ioc_addr = offset*4;
@@ -927,8 +927,8 @@ void archimedes_state::vidc_dynamic_res_change()
WRITE32_MEMBER(archimedes_state::archimedes_vidc_w)
{
- UINT32 reg = data>>24;
- UINT32 val = data & 0xffffff;
+ uint32_t reg = data>>24;
+ uint32_t val = data & 0xffffff;
//#ifdef MAME_DEBUG
static const char *const vrnames[] =
{
@@ -1155,7 +1155,7 @@ The physical page is encoded differently depending on the page size :
WRITE32_MEMBER(archimedes_state::archimedes_memc_page_w)
{
- UINT32 log, phys, memc;
+ uint32_t log, phys, memc;
// perms = (data & 0x300)>>8;
log = phys = memc = 0;
diff --git a/src/mame/machine/arkanoid.cpp b/src/mame/machine/arkanoid.cpp
index bda577de801..7f3af3157ce 100644
--- a/src/mame/machine/arkanoid.cpp
+++ b/src/mame/machine/arkanoid.cpp
@@ -144,7 +144,7 @@ READ8_MEMBER(arkanoid_state::arkanoid_68705_port_c_r)
WRITE8_MEMBER(arkanoid_state::arkanoid_68705_port_c_w)
{
m_portC_internal = data|0xF0;
- UINT8 changed_m_portC_out = (m_portC_out^(m_portC_internal|(~m_ddrC)));
+ uint8_t changed_m_portC_out = (m_portC_out^(m_portC_internal|(~m_ddrC)));
m_portC_out = (m_portC_internal|(~m_ddrC));
/* bits 0 and 1 are inputs, should never be set as outputs here. if they are, ignore them. */
@@ -176,7 +176,7 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_68705_ddr_c_w)
{
if ((data|0xF0)^m_ddrC) // if ddr changed, recalculate the port c output
{
- UINT8 changed_m_portC_out = (m_portC_out^(m_portC_internal|(~(data|0xF0))));
+ uint8_t changed_m_portC_out = (m_portC_out^(m_portC_internal|(~(data|0xF0))));
m_portC_out = (m_portC_internal|(~(data|0xF0)));
/* bits 0 and 1 are inputs, should never be set as outputs here. if they are, ignore them. */
@@ -291,7 +291,7 @@ TO DO (2006.09.12) :
/* Kludge for some bootlegs that read this address */
READ8_MEMBER(arkanoid_state::arkanoid_bootleg_f000_r)
{
- UINT8 arkanoid_bootleg_val = 0x00;
+ uint8_t arkanoid_bootleg_val = 0x00;
switch (m_bootleg_id)
{
@@ -333,7 +333,7 @@ READ8_MEMBER(arkanoid_state::arkanoid_bootleg_f000_r)
/* Kludge for some bootlegs that read this address */
READ8_MEMBER(arkanoid_state::arkanoid_bootleg_f002_r)
{
- UINT8 arkanoid_bootleg_val = 0x00;
+ uint8_t arkanoid_bootleg_val = 0x00;
switch (m_bootleg_id)
{
@@ -682,9 +682,9 @@ READ8_MEMBER(arkanoid_state::block2_bootleg_f000_r)
/* Kludge for some bootlegs that read this address */
READ8_MEMBER(arkanoid_state::arkanoid_bootleg_d008_r)
{
- UINT8 arkanoid_bootleg_d008_bit[8];
- UINT8 arkanoid_bootleg_d008_val;
- UINT8 arkanoid_paddle_value = ioport("MUX")->read();
+ uint8_t arkanoid_bootleg_d008_bit[8];
+ uint8_t arkanoid_bootleg_d008_val;
+ uint8_t arkanoid_paddle_value = ioport("MUX")->read();
int b;
arkanoid_bootleg_d008_bit[4] = arkanoid_bootleg_d008_bit[6] = arkanoid_bootleg_d008_bit[7] = 0; /* untested bits */
diff --git a/src/mame/machine/asic65.cpp b/src/mame/machine/asic65.cpp
index 58b46fda1fb..a1ea4d222a1 100644
--- a/src/mame/machine/asic65.cpp
+++ b/src/mame/machine/asic65.cpp
@@ -36,7 +36,7 @@
#define MAX_COMMANDS 0x2b
-static const UINT8 command_map[3][MAX_COMMANDS] =
+static const uint8_t command_map[3][MAX_COMMANDS] =
{
{
/* standard version */
@@ -84,7 +84,7 @@ static const UINT8 command_map[3][MAX_COMMANDS] =
const device_type ASIC65 = &device_creator<asic65_device>;
-asic65_device::asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+asic65_device::asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ASIC65, "Atari ASIC65", tag, owner, clock, "asic65", __FILE__),
m_asic65_type(0),
m_command(0),
@@ -239,8 +239,8 @@ WRITE16_MEMBER( asic65_device::data_w )
READ16_MEMBER( asic65_device::read )
{
- INT64 element, result64 = 0;
- UINT16 result = 0;
+ int64_t element, result64 = 0;
+ uint16_t result = 0;
/* rom-based just returns latched data */
if (m_asic65_type == ASIC65_ROMBASED)
@@ -282,21 +282,21 @@ READ16_MEMBER( asic65_device::read )
case OP_SIN: /* sin */
if (m_param_index >= 1)
- result = (int)(16384. * sin(M_PI * (double)(INT16)m_param[0] / 32768.));
+ result = (int)(16384. * sin(M_PI * (double)(int16_t)m_param[0] / 32768.));
break;
case OP_COS: /* cos */
if (m_param_index >= 1)
- result = (int)(16384. * cos(M_PI * (double)(INT16)m_param[0] / 32768.));
+ result = (int)(16384. * cos(M_PI * (double)(int16_t)m_param[0] / 32768.));
break;
case OP_ATAN: /* vector angle */
if (m_param_index >= 4)
{
- INT32 xint = (INT32)((m_param[0] << 16) | m_param[1]);
- INT32 yint = (INT32)((m_param[2] << 16) | m_param[3]);
+ int32_t xint = (int32_t)((m_param[0] << 16) | m_param[1]);
+ int32_t yint = (int32_t)((m_param[2] << 16) | m_param[3]);
double a = atan2((double)yint, (double)xint);
- result = (INT16)(a * 32768. / M_PI);
+ result = (int16_t)(a * 32768. / M_PI);
}
break;
@@ -305,29 +305,29 @@ READ16_MEMBER( asic65_device::read )
/* in Race Drivin' will be off */
if (m_param_index >= 9+6)
{
- INT32 v0 = (INT32)((m_param[9] << 16) | m_param[10]);
- INT32 v1 = (INT32)((m_param[11] << 16) | m_param[12]);
- INT32 v2 = (INT32)((m_param[13] << 16) | m_param[14]);
+ int32_t v0 = (int32_t)((m_param[9] << 16) | m_param[10]);
+ int32_t v1 = (int32_t)((m_param[11] << 16) | m_param[12]);
+ int32_t v2 = (int32_t)((m_param[13] << 16) | m_param[14]);
/* 2 results per element */
switch (m_result_index / 2)
{
case 0:
- result64 = (INT64)v0 * (INT16)m_param[0] +
- (INT64)v1 * (INT16)m_param[3] +
- (INT64)v2 * (INT16)m_param[6];
+ result64 = (int64_t)v0 * (int16_t)m_param[0] +
+ (int64_t)v1 * (int16_t)m_param[3] +
+ (int64_t)v2 * (int16_t)m_param[6];
break;
case 1:
- result64 = (INT64)v0 * (INT16)m_param[1] +
- (INT64)v1 * (INT16)m_param[4] +
- (INT64)v2 * (INT16)m_param[7];
+ result64 = (int64_t)v0 * (int16_t)m_param[1] +
+ (int64_t)v1 * (int16_t)m_param[4] +
+ (int64_t)v2 * (int16_t)m_param[7];
break;
case 2:
- result64 = (INT64)v0 * (INT16)m_param[2] +
- (INT64)v1 * (INT16)m_param[5] +
- (INT64)v2 * (INT16)m_param[8];
+ result64 = (int64_t)v0 * (int16_t)m_param[2] +
+ (int64_t)v1 * (int16_t)m_param[5] +
+ (int64_t)v2 * (int16_t)m_param[8];
break;
}
@@ -341,29 +341,29 @@ READ16_MEMBER( asic65_device::read )
case OP_MATRIXMULT: /* matrix multiply???? */
if (m_param_index >= 9+6)
{
- INT32 v0 = (INT32)((m_param[9] << 16) | m_param[10]);
- INT32 v1 = (INT32)((m_param[11] << 16) | m_param[12]);
- INT32 v2 = (INT32)((m_param[13] << 16) | m_param[14]);
+ int32_t v0 = (int32_t)((m_param[9] << 16) | m_param[10]);
+ int32_t v1 = (int32_t)((m_param[11] << 16) | m_param[12]);
+ int32_t v2 = (int32_t)((m_param[13] << 16) | m_param[14]);
/* 2 results per element */
switch (m_result_index / 2)
{
case 0:
- result64 = (INT64)v0 * (INT16)m_param[0] +
- (INT64)v1 * (INT16)m_param[1] +
- (INT64)v2 * (INT16)m_param[2];
+ result64 = (int64_t)v0 * (int16_t)m_param[0] +
+ (int64_t)v1 * (int16_t)m_param[1] +
+ (int64_t)v2 * (int16_t)m_param[2];
break;
case 1:
- result64 = (INT64)v0 * (INT16)m_param[3] +
- (INT64)v1 * (INT16)m_param[4] +
- (INT64)v2 * (INT16)m_param[5];
+ result64 = (int64_t)v0 * (int16_t)m_param[3] +
+ (int64_t)v1 * (int16_t)m_param[4] +
+ (int64_t)v2 * (int16_t)m_param[5];
break;
case 2:
- result64 = (INT64)v0 * (INT16)m_param[6] +
- (INT64)v1 * (INT16)m_param[7] +
- (INT64)v2 * (INT16)m_param[8];
+ result64 = (int64_t)v0 * (int16_t)m_param[6] +
+ (int64_t)v1 * (int16_t)m_param[7] +
+ (int64_t)v2 * (int16_t)m_param[8];
break;
}
@@ -389,22 +389,22 @@ READ16_MEMBER( asic65_device::read )
/* return 0 == scale factor for 1/z */
/* return 1 == transformed X */
/* return 2 == transformed Y, taking height into account */
- element = (INT16)m_param[0];
+ element = (int16_t)m_param[0];
if (m_param_index == 2)
{
- result64 = (element * (INT16)m_param[1]) >> 8;
+ result64 = (element * (int16_t)m_param[1]) >> 8;
result64 -= 1;
if (result64 > 0x3fff) result64 = 0;
}
else if (m_param_index == 3)
{
- result64 = (element * (INT16)m_param[2]) >> 15;
+ result64 = (element * (int16_t)m_param[2]) >> 15;
result64 += 0xa8;
}
else if (m_param_index == 4)
{
- result64 = (INT16)((element * (INT16)m_param[3]) >> 10);
- result64 = (INT16)m_yorigin - result64 - (result64 << 1);
+ result64 = (int16_t)((element * (int16_t)m_param[3]) >> 10);
+ result64 = (int16_t)m_yorigin - result64 - (result64 << 1);
}
result = result64 & 0xffff;
}
@@ -416,13 +416,13 @@ READ16_MEMBER( asic65_device::read )
case OP_SETBANK: /* set a bank */
{
- static const UINT8 banklist[] =
+ static const uint8_t banklist[] =
{
1,4,0,4,4,3,4,2, 4,4,4,4,4,4,4,4,
3,3,4,4,1,1,0,0, 4,4,4,4,2,2,4,4,
4,4
};
- static const UINT16 bankaddr[][8] =
+ static const uint16_t bankaddr[][8] =
{
{ 0x77c0,0x77ce,0x77c2,0x77cc,0x77c4,0x77ca,0x77c6,0x77c8 },
{ 0x77d0,0x77de,0x77d2,0x77dc,0x77d4,0x77da,0x77d6,0x77d8 },
@@ -442,7 +442,7 @@ READ16_MEMBER( asic65_device::read )
case OP_VERIFYBANK: /* verify a bank */
{
- static const UINT16 bankverify[] =
+ static const uint16_t bankverify[] =
{
0x0eb2,0x1000,0x171b,0x3d28
};
diff --git a/src/mame/machine/asic65.h b/src/mame/machine/asic65.h
index 0f481e2b6c0..1a4111afc51 100644
--- a/src/mame/machine/asic65.h
+++ b/src/mame/machine/asic65.h
@@ -18,7 +18,7 @@
class asic65_device : public device_t
{
public:
- asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// (static) configuration helpers
static void set_type(device_t &device, int type) { downcast<asic65_device &>(device).m_asic65_type = type; }
@@ -48,23 +48,23 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- UINT8 m_asic65_type;
+ uint8_t m_asic65_type;
int m_command;
- UINT16 m_param[32];
- UINT16 m_yorigin;
- UINT8 m_param_index;
- UINT8 m_result_index;
- UINT8 m_reset_state;
- UINT8 m_last_bank;
+ uint16_t m_param[32];
+ uint16_t m_yorigin;
+ uint8_t m_param_index;
+ uint8_t m_result_index;
+ uint8_t m_reset_state;
+ uint8_t m_last_bank;
/* ROM-based interface states */
required_device<cpu_device> m_ourcpu;
- UINT8 m_tfull;
- UINT8 m_68full;
- UINT8 m_cmd;
- UINT8 m_xflg;
- UINT16 m_68data;
- UINT16 m_tdata;
+ uint8_t m_tfull;
+ uint8_t m_68full;
+ uint8_t m_cmd;
+ uint8_t m_xflg;
+ uint16_t m_68data;
+ uint16_t m_tdata;
FILE * m_log;
};
diff --git a/src/mame/machine/asteroid.cpp b/src/mame/machine/asteroid.cpp
index de7eb074d29..eb236c12fd1 100644
--- a/src/mame/machine/asteroid.cpp
+++ b/src/mame/machine/asteroid.cpp
@@ -122,8 +122,8 @@ void asteroid_state::machine_start()
/* configure RAM banks if present (not on llander) */
if (m_ram1.target() != nullptr)
{
- UINT8 *ram1 = reinterpret_cast<UINT8 *>(memshare("ram1")->ptr());
- UINT8 *ram2 = reinterpret_cast<UINT8 *>(memshare("ram2")->ptr());
+ uint8_t *ram1 = reinterpret_cast<uint8_t *>(memshare("ram1")->ptr());
+ uint8_t *ram2 = reinterpret_cast<uint8_t *>(memshare("ram2")->ptr());
/* swapped */
m_ram1->configure_entry(1, ram2);
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index fe5e4bf790b..43239c8095e 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -17,7 +17,7 @@
const device_type AT_MB = &device_creator<at_mb_device>;
-at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AT_MB, "PC/AT Motherboard", tag, owner, clock, "at_mb", __FILE__),
m_maincpu(*this, ":maincpu"),
m_isabus(*this, "isabus"),
@@ -173,7 +173,7 @@ READ8_MEMBER( at_mb_device::get_slave_ack )
*
*************************************************************************/
-void at_mb_device::speaker_set_spkrdata(UINT8 data)
+void at_mb_device::speaker_set_spkrdata(uint8_t data)
{
m_at_spkrdata = data ? 1 : 0;
m_speaker->level_w(m_at_spkrdata & m_pit_out2);
@@ -202,7 +202,7 @@ WRITE_LINE_MEMBER( at_mb_device::pit8254_out2_changed )
READ8_MEMBER( at_mb_device::page8_r )
{
- UINT8 data = m_at_pages[offset % 0x10];
+ uint8_t data = m_at_pages[offset % 0x10];
switch(offset % 8)
{
@@ -264,7 +264,7 @@ READ8_MEMBER(at_mb_device::dma_read_byte)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1)
return 0xff;
- UINT8 result;
+ uint8_t result;
offs_t page_offset = ((offs_t) m_dma_offset[0][m_dma_channel]) << 16;
result = prog_space.read_byte(page_offset + offset);
@@ -288,7 +288,7 @@ READ8_MEMBER(at_mb_device::dma_read_word)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1)
return 0xff;
- UINT16 result;
+ uint16_t result;
offs_t page_offset = ((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16;
result = prog_space.read_word((page_offset & 0xfe0000) | (offset << 1));
@@ -312,9 +312,9 @@ READ8_MEMBER( at_mb_device::dma8237_0_dack_r ) { return m_isabus->dack_r(0); }
READ8_MEMBER( at_mb_device::dma8237_1_dack_r ) { return m_isabus->dack_r(1); }
READ8_MEMBER( at_mb_device::dma8237_2_dack_r ) { return m_isabus->dack_r(2); }
READ8_MEMBER( at_mb_device::dma8237_3_dack_r ) { return m_isabus->dack_r(3); }
-READ8_MEMBER( at_mb_device::dma8237_5_dack_r ) { UINT16 ret = m_isabus->dack16_r(5); m_dma_high_byte = ret & 0xff00; return ret; }
-READ8_MEMBER( at_mb_device::dma8237_6_dack_r ) { UINT16 ret = m_isabus->dack16_r(6); m_dma_high_byte = ret & 0xff00; return ret; }
-READ8_MEMBER( at_mb_device::dma8237_7_dack_r ) { UINT16 ret = m_isabus->dack16_r(7); m_dma_high_byte = ret & 0xff00; return ret; }
+READ8_MEMBER( at_mb_device::dma8237_5_dack_r ) { uint16_t ret = m_isabus->dack16_r(5); m_dma_high_byte = ret & 0xff00; return ret; }
+READ8_MEMBER( at_mb_device::dma8237_6_dack_r ) { uint16_t ret = m_isabus->dack16_r(6); m_dma_high_byte = ret & 0xff00; return ret; }
+READ8_MEMBER( at_mb_device::dma8237_7_dack_r ) { uint16_t ret = m_isabus->dack16_r(7); m_dma_high_byte = ret & 0xff00; return ret; }
WRITE8_MEMBER( at_mb_device::dma8237_0_dack_w ){ m_isabus->dack_w(0, data); }
@@ -358,7 +358,7 @@ WRITE8_MEMBER( at_mb_device::write_rtc )
}
}
-UINT32 at_mb_device::a20_286(bool state)
+uint32_t at_mb_device::a20_286(bool state)
{
return (state ? 0xffffff : 0xefffff);
}
@@ -379,7 +379,7 @@ WRITE_LINE_MEMBER( at_mb_device::dack7_w ) { set_dma_channel(7, state); }
READ8_MEMBER( at_mb_device::portb_r )
{
- UINT8 data = m_at_speaker;
+ uint8_t data = m_at_speaker;
data &= ~0xd0; /* AT BIOS don't likes this being set */
/* 0x10 is the dram refresh line bit, 15.085us. */
diff --git a/src/mame/machine/at.h b/src/mame/machine/at.h
index 98f22c0ce2d..12d6895197c 100644
--- a/src/mame/machine/at.h
+++ b/src/mame/machine/at.h
@@ -16,7 +16,7 @@
class at_mb_device : public device_t
{
public:
- at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_ADDRESS_MAP(map, 16);
@@ -59,14 +59,14 @@ public:
DECLARE_READ8_MEMBER(dma_read_word);
DECLARE_WRITE8_MEMBER(dma_write_word);
- UINT32 a20_286(bool state);
+ uint32_t a20_286(bool state);
protected:
void device_start() override;
void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const override;
private:
void set_dma_channel(int channel, int state);
- void speaker_set_spkrdata(UINT8 data);
+ void speaker_set_spkrdata(uint8_t data);
required_device<cpu_device> m_maincpu;
required_device<isa16_device> m_isabus;
@@ -76,16 +76,16 @@ private:
required_device<pit8254_device> m_pit8254;
required_device<speaker_sound_device> m_speaker;
required_device<mc146818_device> m_mc146818;
- UINT8 m_at_spkrdata;
- UINT8 m_pit_out2;
+ uint8_t m_at_spkrdata;
+ uint8_t m_pit_out2;
int m_dma_channel;
bool m_cur_eop;
- UINT8 m_dma_offset[2][4];
- UINT8 m_at_pages[0x10];
- UINT16 m_dma_high_byte;
- UINT8 m_at_speaker;
- UINT8 m_channel_check;
- UINT8 m_nmi_enabled;
+ uint8_t m_dma_offset[2][4];
+ uint8_t m_at_pages[0x10];
+ uint16_t m_dma_high_byte;
+ uint8_t m_at_speaker;
+ uint8_t m_channel_check;
+ uint8_t m_nmi_enabled;
};
extern const device_type AT_MB;
diff --git a/src/mame/machine/atari400.cpp b/src/mame/machine/atari400.cpp
index a2bf49f3b0d..d911c1c2ce5 100644
--- a/src/mame/machine/atari400.cpp
+++ b/src/mame/machine/atari400.cpp
@@ -91,7 +91,7 @@ POKEY_INTERRUPT_CB_MEMBER(atari_common_state::interrupt_cb)
POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a800_keyboard)
{
int ipt;
- UINT8 ret = 0x00;
+ uint8_t ret = 0x00;
/* decode special */
switch (k543210)
@@ -155,7 +155,7 @@ POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a800_keyboard)
POKEY_KEYBOARD_CB_MEMBER(atari_common_state::a5200_keypads)
{
int ipt;
- UINT8 ret = 0x00;
+ uint8_t ret = 0x00;
/* decode special */
switch (k543210)
diff --git a/src/mame/machine/atari_vg.cpp b/src/mame/machine/atari_vg.cpp
index c7d8d514817..0ae26eef201 100644
--- a/src/mame/machine/atari_vg.cpp
+++ b/src/mame/machine/atari_vg.cpp
@@ -41,7 +41,7 @@ const device_type ATARIVGEAROM = &device_creator<atari_vg_earom_device>;
// atari_vg_earom_device - constructor
//-------------------------------------------------
-atari_vg_earom_device::atari_vg_earom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_vg_earom_device::atari_vg_earom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARIVGEAROM, "Atari VG EAROM", tag, owner, clock, "atari_vg_earom", __FILE__),
device_nvram_interface(mconfig, *this)
{
diff --git a/src/mame/machine/atari_vg.h b/src/mame/machine/atari_vg.h
index 3d7aba7b440..49515261e4b 100644
--- a/src/mame/machine/atari_vg.h
+++ b/src/mame/machine/atari_vg.h
@@ -26,7 +26,7 @@ class atari_vg_earom_device : public device_t,
{
public:
// construction/destruction
- atari_vg_earom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_vg_earom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index 0221eb398e4..83c870ffac4 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -45,21 +45,21 @@
struct atari_dsk_format
{
- UINT8 density;
- UINT8 tracks;
- UINT8 door;
- UINT8 sta1;
- UINT8 spt;
- UINT8 doublesided;
- UINT8 highdensity;
- UINT8 seclen_hi;
- UINT8 seclen_lo;
- UINT8 status;
- UINT8 sta2;
- UINT8 sta3;
- UINT8 sta4;
- UINT8 cr;
- UINT8 info[65+1];
+ uint8_t density;
+ uint8_t tracks;
+ uint8_t door;
+ uint8_t sta1;
+ uint8_t spt;
+ uint8_t doublesided;
+ uint8_t highdensity;
+ uint8_t seclen_hi;
+ uint8_t seclen_lo;
+ uint8_t status;
+ uint8_t sta2;
+ uint8_t sta3;
+ uint8_t sta4;
+ uint8_t cr;
+ uint8_t info[65+1];
};
/* combined with the size the image should have */
@@ -113,7 +113,7 @@ void atari_fdc_device::atari_load_proc(device_image_interface &image, bool is_cr
int id = floppy_get_drive(image);
int size, i;
- m_drv[id].image = std::make_unique<UINT8[]>(MAXSIZE);
+ m_drv[id].image = std::make_unique<uint8_t[]>(MAXSIZE);
if (!m_drv[id].image)
return;
@@ -141,7 +141,7 @@ void atari_fdc_device::atari_load_proc(device_image_interface &image, bool is_cr
/* re allocate the buffer; we don't want to be too lazy ;) */
- //m_drv[id].image = (UINT8*)image.image_realloc(m_drv[id].image, size);
+ //m_drv[id].image = (uint8_t*)image.image_realloc(m_drv[id].image, size);
// hack alert, this means we can only load ATR via the softlist at the moment, image.filetype returns "" :/
bool is_softlist_entry = image.software_entry() != nullptr;
@@ -351,9 +351,9 @@ void atari_fdc_device::atari_load_proc(device_image_interface &image, bool is_cr
* F->A 128/256 byte CKS bad sector table
*
*****************************************************************************/
-static void make_chksum(device_t *device,UINT8 * chksum, UINT8 data)
+static void make_chksum(device_t *device,uint8_t * chksum, uint8_t data)
{
- UINT8 newone;
+ uint8_t newone;
newone= *chksum + data;
if (newone < *chksum)
newone++;
@@ -386,7 +386,7 @@ void atari_fdc_device::clr_serin(int ser_delay)
pokey->serin_ready(ser_delay * 40);
}
-void atari_fdc_device::add_serin(UINT8 data, int with_checksum)
+void atari_fdc_device::add_serin(uint8_t data, int with_checksum)
{
m_serin_buff[m_serin_count++] = data;
if (with_checksum)
@@ -751,7 +751,7 @@ legacy_floppy_image_device *atari_fdc_device::atari_floppy_get_device_child(int
const device_type ATARI_FDC = &device_creator<atari_fdc_device>;
-atari_fdc_device::atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_fdc_device::atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_FDC, "Atari FDC", tag, owner, clock, "atari_fdc", __FILE__),
m_serout_count(0),
m_serout_offs(0),
diff --git a/src/mame/machine/atarifdc.h b/src/mame/machine/atarifdc.h
index 355dea59aad..f7d8045e207 100644
--- a/src/mame/machine/atarifdc.h
+++ b/src/mame/machine/atarifdc.h
@@ -13,7 +13,7 @@
class atari_fdc_device : public device_t
{
public:
- atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( serin_r );
DECLARE_WRITE8_MEMBER( serout_w );
@@ -29,14 +29,14 @@ private:
void clr_serout(int expect_data);
void add_serout(int expect_data);
void clr_serin(int ser_delay);
- void add_serin(UINT8 data, int with_checksum);
+ void add_serin(uint8_t data, int with_checksum);
void a800_serial_command();
void a800_serial_write();
legacy_floppy_image_device *atari_floppy_get_device_child(int drive);
struct atari_drive
{
- std::unique_ptr<UINT8[]> image; /* alloc'd image */
+ std::unique_ptr<uint8_t[]> image; /* alloc'd image */
int type; /* type of image (XFD, ATR, DSK) */
int mode; /* 0 read only, != 0 read/write */
int density; /* 0 SD, 1 MD, 2 DD */
@@ -51,14 +51,14 @@ private:
int m_serout_count;
int m_serout_offs;
- UINT8 m_serout_buff[512];
- UINT8 m_serout_chksum;
+ uint8_t m_serout_buff[512];
+ uint8_t m_serout_chksum;
// int m_serout_delay;
int m_serin_count;
int m_serin_offs;
- UINT8 m_serin_buff[512];
- UINT8 m_serin_chksum;
+ uint8_t m_serin_buff[512];
+ uint8_t m_serin_chksum;
int m_serin_delay;
atari_drive m_drv[4];
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index ab9a2117bc1..baa7f4b465e 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -55,7 +55,7 @@ const device_type ATARI_SOUND_COMM = &device_creator<atari_sound_comm_device>;
// atari_sound_comm_device - constructor
//-------------------------------------------------
-atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_SOUND_COMM, "Atari Sound Communications", tag, owner, clock, "atarscom", __FILE__),
m_sound_cpu_tag(nullptr),
m_main_int_cb(*this),
@@ -348,7 +348,7 @@ const device_type ATARI_VAD = &device_creator<atari_vad_device>;
// atari_vad_device - constructor
//-------------------------------------------------
-atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_VAD, "Atari VAD", tag, owner, clock, "atarivad", __FILE__),
device_video_interface(mconfig, *this),
m_scanline_int_cb(*this),
@@ -378,7 +378,7 @@ atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *ta
WRITE16_MEMBER(atari_vad_device::control_write)
{
- UINT16 newword = m_control[offset];
+ uint16_t newword = m_control[offset];
COMBINE_DATA(&newword);
internal_control_write(offset, newword);
}
@@ -441,7 +441,7 @@ WRITE16_MEMBER(atari_vad_device::playfield_latched_lsb_w)
{
m_playfield_tilemap->write(space, offset, data, mem_mask);
if ((m_control[0x0a] & 0x80) != 0)
- m_playfield_tilemap->write_ext(space, offset, m_control[0x1d], UINT16(0x00ff));
+ m_playfield_tilemap->write_ext(space, offset, m_control[0x1d], uint16_t(0x00ff));
}
@@ -455,7 +455,7 @@ WRITE16_MEMBER(atari_vad_device::playfield_latched_msb_w)
{
m_playfield_tilemap->write(space, offset, data, mem_mask);
if ((m_control[0x0a] & 0x80) != 0)
- m_playfield_tilemap->write_ext(space, offset, m_control[0x1c], UINT16(0xff00));
+ m_playfield_tilemap->write_ext(space, offset, m_control[0x1c], uint16_t(0xff00));
}
@@ -469,7 +469,7 @@ WRITE16_MEMBER(atari_vad_device::playfield2_latched_msb_w)
{
m_playfield2_tilemap->write(space, offset, data, mem_mask);
if ((m_control[0x0a] & 0x80) != 0)
- m_playfield2_tilemap->write_ext(space, offset, m_control[0x1c], UINT16(0xff00));
+ m_playfield2_tilemap->write_ext(space, offset, m_control[0x1c], uint16_t(0xff00));
}
@@ -557,10 +557,10 @@ void atari_vad_device::device_timer(emu_timer &timer, device_timer_id id, int pa
// control registers and EOF updates
//-------------------------------------------------
-void atari_vad_device::internal_control_write(offs_t offset, UINT16 newword)
+void atari_vad_device::internal_control_write(offs_t offset, uint16_t newword)
{
// switch off the offset
- UINT16 oldword = m_control[offset];
+ uint16_t oldword = m_control[offset];
m_control[offset] = newword;
switch (offset)
{
@@ -697,7 +697,7 @@ inline void atari_vad_device::update_pf_xscrolls()
// direct control writes.
//-------------------------------------------------
-void atari_vad_device::update_parameter(UINT16 newword)
+void atari_vad_device::update_parameter(uint16_t newword)
{
switch (newword & 15)
{
@@ -893,7 +893,7 @@ void atari_eeprom_device::device_reset()
// atari_eeprom_2804_device - constructor
//-------------------------------------------------
-atari_eeprom_2804_device::atari_eeprom_2804_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_eeprom_2804_device::atari_eeprom_2804_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_eeprom_device(mconfig, ATARI_EEPROM_2804, "Atari EEPROM Interface (2804)", tag, owner, "atari2804", __FILE__)
{
}
@@ -918,7 +918,7 @@ machine_config_constructor atari_eeprom_2804_device::device_mconfig_additions()
// atari_eeprom_2816_device - constructor
//-------------------------------------------------
-atari_eeprom_2816_device::atari_eeprom_2816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_eeprom_2816_device::atari_eeprom_2816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_eeprom_device(mconfig, ATARI_EEPROM_2816, "Atari EEPROM Interface (2816)", tag, owner, "atari2816", __FILE__)
{
}
@@ -1190,7 +1190,7 @@ void atarigen_state::device_post_load()
// slapstic and sets the chip number.
//-------------------------------------------------
-void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, UINT8 *mem)
+void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, uint8_t *mem)
{
if (!m_slapstic_device.found())
fatalerror("Slapstic device is missing\n");
@@ -1202,7 +1202,7 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t
// install the memory handlers
address_space &program = device.space(AS_PROGRAM);
program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, 0, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
- m_slapstic = (UINT16 *)mem;
+ m_slapstic = (uint16_t *)mem;
// allocate memory for a copy of bank 0
m_slapstic_bank0.resize(0x2000);
@@ -1331,24 +1331,24 @@ void atarigen_state::blend_gfx(int gfx0, int gfx1, int mask0, int mask1)
{
gfx_element *gx0 = m_gfxdecode->gfx(gfx0);
gfx_element *gx1 = m_gfxdecode->gfx(gfx1);
- UINT8 *srcdata, *dest;
+ uint8_t *srcdata, *dest;
int c, x, y;
// allocate memory for the assembled data
- srcdata = auto_alloc_array(machine(), UINT8, gx0->elements() * gx0->width() * gx0->height());
+ srcdata = auto_alloc_array(machine(), uint8_t, gx0->elements() * gx0->width() * gx0->height());
// loop over elements
dest = srcdata;
for (c = 0; c < gx0->elements(); c++)
{
- const UINT8 *c0base = gx0->get_data(c);
- const UINT8 *c1base = gx1->get_data(c);
+ const uint8_t *c0base = gx0->get_data(c);
+ const uint8_t *c1base = gx1->get_data(c);
// loop over height
for (y = 0; y < gx0->height(); y++)
{
- const UINT8 *c0 = c0base;
- const UINT8 *c1 = c1base;
+ const uint8_t *c0 = c0base;
+ const uint8_t *c1 = c1base;
for (x = 0; x < gx0->width(); x++)
*dest++ = (*c0++ & mask0) | (*c1++ & mask1);
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index b73eb42dd50..9927be55daa 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -108,7 +108,7 @@ class atari_sound_comm_device : public device_t
{
public:
// construction/destruction
- atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
static void static_set_sound_cpu(device_t &device, const char *cputag);
@@ -163,10 +163,10 @@ private:
m6502_device * m_sound_cpu;
bool m_main_to_sound_ready;
bool m_sound_to_main_ready;
- UINT8 m_main_to_sound_data;
- UINT8 m_sound_to_main_data;
- UINT8 m_timed_int;
- UINT8 m_ym2151_int;
+ uint8_t m_main_to_sound_data;
+ uint8_t m_sound_to_main_data;
+ uint8_t m_timed_int;
+ uint8_t m_ym2151_int;
};
@@ -181,7 +181,7 @@ class atari_vad_device : public device_t,
{
public:
// construction/destruction
- atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &static_set_scanline_int_cb(device_t &device, _Object object) { return downcast<atari_vad_device &>(device).m_scanline_int_cb.set_callback(object); }
@@ -219,9 +219,9 @@ private:
};
// internal helpers
- void internal_control_write(offs_t offset, UINT16 newword);
+ void internal_control_write(offs_t offset, uint16_t newword);
void update_pf_xscrolls();
- void update_parameter(UINT16 newword);
+ void update_parameter(uint16_t newword);
void update_tilerow(emu_timer &timer, int scanline);
void eof_update(emu_timer &timer);
@@ -233,22 +233,22 @@ private:
required_device<tilemap_device> m_playfield_tilemap;
optional_device<tilemap_device> m_playfield2_tilemap;
optional_device<atari_motion_objects_device> m_mob;
- optional_shared_ptr<UINT16> m_eof_data;
+ optional_shared_ptr<uint16_t> m_eof_data;
emu_timer * m_scanline_int_timer;
emu_timer * m_tilerow_update_timer;
emu_timer * m_eof_timer;
- UINT32 m_palette_bank; // which palette bank is enabled
- //UINT32 m_pf0_xscroll; // playfield 1 xscroll
- UINT32 m_pf0_xscroll_raw; // playfield 1 xscroll raw value
- UINT32 m_pf0_yscroll; // playfield 1 yscroll
- UINT32 m_pf1_xscroll_raw; // playfield 2 xscroll raw value
- UINT32 m_pf1_yscroll; // playfield 2 yscroll
- UINT32 m_mo_xscroll; // sprite xscroll
- UINT32 m_mo_yscroll; // sprite xscroll
+ uint32_t m_palette_bank; // which palette bank is enabled
+ //uint32_t m_pf0_xscroll; // playfield 1 xscroll
+ uint32_t m_pf0_xscroll_raw; // playfield 1 xscroll raw value
+ uint32_t m_pf0_yscroll; // playfield 1 yscroll
+ uint32_t m_pf1_xscroll_raw; // playfield 2 xscroll raw value
+ uint32_t m_pf1_yscroll; // playfield 2 yscroll
+ uint32_t m_mo_xscroll; // sprite xscroll
+ uint32_t m_mo_yscroll; // sprite xscroll
- UINT16 m_control[0x40/2]; // control data
+ uint16_t m_control[0x40/2]; // control data
};
@@ -293,7 +293,7 @@ class atari_eeprom_2804_device : public atari_eeprom_device
{
public:
// construction/destruction
- atari_eeprom_2804_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_eeprom_2804_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
@@ -304,7 +304,7 @@ class atari_eeprom_2816_device : public atari_eeprom_device
{
public:
// construction/destruction
- atari_eeprom_2816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_eeprom_2816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
@@ -355,7 +355,7 @@ public:
DECLARE_WRITE16_MEMBER(video_int_ack_w);
// slapstic helpers
- void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, UINT8 *mem);
+ void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, uint8_t *mem);
void slapstic_update_bank(int bank);
DECLARE_WRITE16_MEMBER(slapstic_w);
DECLARE_READ16_MEMBER(slapstic_r);
@@ -380,24 +380,24 @@ public:
TID_ATARIGEN_LAST
};
- UINT8 m_scanline_int_state;
- UINT8 m_sound_int_state;
- UINT8 m_video_int_state;
+ uint8_t m_scanline_int_state;
+ uint8_t m_sound_int_state;
+ uint8_t m_video_int_state;
- optional_shared_ptr<UINT16> m_xscroll;
- optional_shared_ptr<UINT16> m_yscroll;
+ optional_shared_ptr<uint16_t> m_xscroll;
+ optional_shared_ptr<uint16_t> m_yscroll;
/* internal state */
- UINT8 m_slapstic_num;
- UINT16 * m_slapstic;
- UINT8 m_slapstic_bank;
- std::vector<UINT8> m_slapstic_bank0;
+ uint8_t m_slapstic_num;
+ uint16_t * m_slapstic;
+ uint8_t m_slapstic_bank;
+ std::vector<uint8_t> m_slapstic_bank0;
offs_t m_slapstic_last_pc;
offs_t m_slapstic_last_address;
offs_t m_slapstic_base;
offs_t m_slapstic_mirror;
- UINT32 m_scanlines_per_callback;
+ uint32_t m_scanlines_per_callback;
atarigen_screen_timer m_screen_timer[2];
@@ -406,7 +406,7 @@ public:
optional_device<gfxdecode_device> m_gfxdecode;
optional_device<screen_device> m_screen;
optional_device<palette_device> m_palette;
- optional_shared_ptr<UINT16> m_generic_paletteram_16;
+ optional_shared_ptr<uint16_t> m_generic_paletteram_16;
optional_device<atari_slapstic_device> m_slapstic_device;
};
diff --git a/src/mame/machine/atarixga.cpp b/src/mame/machine/atarixga.cpp
index 7680a09005a..93054e84fce 100644
--- a/src/mame/machine/atarixga.cpp
+++ b/src/mame/machine/atarixga.cpp
@@ -24,7 +24,7 @@
extern const device_type ATARI_XGA = &device_creator<atari_xga_device>;
-atari_xga_device::atari_xga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_xga_device::atari_xga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_XGA, "Atari XGA", tag, owner, clock, "xga", __FILE__),
m_mode(FPGA_RESET),
m_address(0),
@@ -42,16 +42,16 @@ atari_xga_device::atari_xga_device(const machine_config &mconfig, const char *ta
void atari_xga_device::device_start()
{
- m_ram = std::make_unique<UINT16[]>(RAM_WORDS);
+ m_ram = std::make_unique<uint16_t[]>(RAM_WORDS);
- save_pointer(NAME(m_ram.get()), RAM_WORDS * sizeof(UINT16));
+ save_pointer(NAME(m_ram.get()), RAM_WORDS * sizeof(uint16_t));
save_item(NAME(m_address));
save_item(NAME(m_ciphertext));
}
void atari_xga_device::device_reset()
{
- memset(m_ram.get(), 0, RAM_WORDS * sizeof(UINT16));
+ memset(m_ram.get(), 0, RAM_WORDS * sizeof(uint16_t));
m_mode = FPGA_RESET;
m_address = 0;
m_ciphertext = 0;
@@ -69,7 +69,7 @@ void atari_xga_device::device_reset()
// Moto Frenzy
/* key 0x10 is special, it has 15 "identical twins". */
-static const UINT8 kmap[128] =
+static const uint8_t kmap[128] =
{
0x6B,0x11,0x1B,0x19,0x4B,0x50,0x17,0x09,
0x5D,0x69,0x43,0x33,0x0F,0x0C,0x28,0x3F,
@@ -97,9 +97,9 @@ static const UINT8 kmap[128] =
*
*************************************/
-UINT16 atari_xga_device::ctz(UINT16 x)
+uint16_t atari_xga_device::ctz(uint16_t x)
{
- UINT16 n = 0;
+ uint16_t n = 0;
if (x == 0) return 16;
if (!(x & 0x00FF)) n += 8, x >>= 8;
if (!(x & 0x000F)) n += 4, x >>= 4;
@@ -108,7 +108,7 @@ UINT16 atari_xga_device::ctz(UINT16 x)
return n;
}
-size_t atari_xga_device::popcount(UINT16 x)
+size_t atari_xga_device::popcount(uint16_t x)
{
size_t count = 0;
while (x != 0)
@@ -119,33 +119,33 @@ size_t atari_xga_device::popcount(UINT16 x)
return count;
}
-UINT16 atari_xga_device::parity(UINT16 x)
+uint16_t atari_xga_device::parity(uint16_t x)
{
return popcount(x) & 1;
}
-UINT16 atari_xga_device::lfsr1(UINT16 x)
+uint16_t atari_xga_device::lfsr1(uint16_t x)
{
- const UINT16 bit = parity(x & 0x8016);
+ const uint16_t bit = parity(x & 0x8016);
return (x << 1) | bit;
}
-UINT16 atari_xga_device::lfsr2(UINT16 x)
+uint16_t atari_xga_device::lfsr2(uint16_t x)
{
- UINT16 bit = parity(x & 0x002D);
+ uint16_t bit = parity(x & 0x002D);
return (x >> 1) | (bit << 15);
}
-UINT16 atari_xga_device::powers2(UINT8 k, UINT16 x)
+uint16_t atari_xga_device::powers2(uint8_t k, uint16_t x)
{
- static const UINT16 L[16] = {
+ static const uint16_t L[16] = {
0x5E85,0xBD0B,0x2493,0x17A3,
0x2F47,0x0005,0x000B,0x0017,
0x002F,0x005E,0x00BD,0x017A,
0x02F4,0x05E8,0x0BD0,0x17A1
};
- UINT16 t = (x == 16) ? (L[4] ^ L[5]) : L[x];
+ uint16_t t = (x == 16) ? (L[4] ^ L[5]) : L[x];
for (size_t i = 0; i < k; ++i)
t = lfsr1(t);
@@ -153,9 +153,9 @@ UINT16 atari_xga_device::powers2(UINT8 k, UINT16 x)
return t;
}
-UINT16 atari_xga_device::decipher(UINT8 k, UINT16 c)
+uint16_t atari_xga_device::decipher(uint8_t k, uint16_t c)
{
- UINT16 p = 0;
+ uint16_t p = 0;
/* Only 128 keys internally, if high bit set,
then find the 7-bit "twin" by xor 0xA8. */
@@ -167,7 +167,7 @@ UINT16 atari_xga_device::decipher(UINT8 k, UINT16 c)
if ((c & (c - 1)) == 0)
return powers2(k, ctz(c));
- for (UINT16 bit = 0; bit < 5; ++bit)
+ for (uint16_t bit = 0; bit < 5; ++bit)
{
if ((c >> bit) & 1)
{
@@ -175,7 +175,7 @@ UINT16 atari_xga_device::decipher(UINT8 k, UINT16 c)
}
}
- for (UINT16 bit = 5; bit < 16; ++bit)
+ for (uint16_t bit = 5; bit < 16; ++bit)
{
if ((c >> bit) & 1)
{
@@ -183,8 +183,8 @@ UINT16 atari_xga_device::decipher(UINT8 k, UINT16 c)
}
}
- UINT16 x = 0x8010;
- for (UINT16 i = 0; i < k + 3; ++i)
+ uint16_t x = 0x8010;
+ for (uint16_t i = 0; i < k + 3; ++i)
{
if (x == c)
{
@@ -214,9 +214,9 @@ WRITE32_MEMBER(atari_xga_device::write)
case FPGA_SETKEY:
/* Write table to FPGA SRAM. */
if (ACCESSING_BITS_16_31)
- m_ram[offset << 1] = UINT16 (data >> 16);
+ m_ram[offset << 1] = uint16_t (data >> 16);
if (ACCESSING_BITS_0_15)
- m_ram[(offset << 1) + 1] = UINT16(data & 0xFFFF);
+ m_ram[(offset << 1) + 1] = uint16_t(data & 0xFFFF);
break;
case FPGA_DECIPHER:
@@ -224,12 +224,12 @@ WRITE32_MEMBER(atari_xga_device::write)
if (ACCESSING_BITS_16_31)
{
m_address = offset << 2;
- m_ciphertext = UINT16(data >> 16);
+ m_ciphertext = uint16_t(data >> 16);
}
if (ACCESSING_BITS_0_15)
{
m_address = (offset << 2) + 2;
- m_ciphertext = UINT16(data & 0xFFFF);
+ m_ciphertext = uint16_t(data & 0xFFFF);
}
break;
}
@@ -253,10 +253,10 @@ READ32_MEMBER(atari_xga_device::read)
if (m_mode == FPGA_RESET)
return 0;
- UINT32 plaintext = 0;
+ uint32_t plaintext = 0;
if (m_mode == FPGA_DECIPHER)
{
- UINT16 address = (offset << 2) - 0x400;
+ uint16_t address = (offset << 2) - 0x400;
if (ACCESSING_BITS_0_15)
address += 2;
@@ -264,7 +264,7 @@ READ32_MEMBER(atari_xga_device::read)
/* Reply with decrypted plaintext */
if (address == m_address)
{
- UINT16 key_offset, key_byte;
+ uint16_t key_offset, key_byte;
/* Algorithm to select key byte based on offset. */
key_offset = ((((address >> 4) & 1) ^ 1) << 0)
diff --git a/src/mame/machine/atarixga.h b/src/mame/machine/atarixga.h
index 8d6980a3ac3..933cf68fce7 100644
--- a/src/mame/machine/atarixga.h
+++ b/src/mame/machine/atarixga.h
@@ -17,7 +17,7 @@ class atari_xga_device : public device_t
{
public:
// construction/destruction
- atari_xga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_xga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE32_MEMBER(write);
DECLARE_READ32_MEMBER(read);
@@ -36,18 +36,18 @@ private:
FPGA_DECIPHER
};
- UINT16 powers2(UINT8 k, UINT16 x);
- UINT16 lfsr2(UINT16 x);
- UINT16 lfsr1(UINT16 x);
- UINT16 parity(UINT16 x);
- size_t popcount(UINT16 x);
- UINT16 ctz(UINT16 x);
- UINT16 decipher(UINT8 k, UINT16 c);
+ uint16_t powers2(uint8_t k, uint16_t x);
+ uint16_t lfsr2(uint16_t x);
+ uint16_t lfsr1(uint16_t x);
+ uint16_t parity(uint16_t x);
+ size_t popcount(uint16_t x);
+ uint16_t ctz(uint16_t x);
+ uint16_t decipher(uint8_t k, uint16_t c);
fpga_mode m_mode;
- UINT16 m_address; // last written address
- UINT16 m_ciphertext; // last written ciphertext
- std::unique_ptr<UINT16[]> m_ram; // CY7C185-45PC, only 16-Kbit used
+ uint16_t m_address; // last written address
+ uint16_t m_ciphertext; // last written ciphertext
+ std::unique_ptr<uint16_t[]> m_ram; // CY7C185-45PC, only 16-Kbit used
};
diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp
index 1e734800c2c..85be7ef263a 100644
--- a/src/mame/machine/awboard.cpp
+++ b/src/mame/machine/awboard.cpp
@@ -165,7 +165,7 @@ DEVICE_ADDRESS_MAP_START(submap, 16, aw_rom_board)
AM_RANGE(0x40, 0x41) AM_READWRITE(pio_r, pio_w)
ADDRESS_MAP_END
-aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: naomi_g1_device(mconfig, AW_ROM_BOARD, "Sammy Atomiswave ROM Board", tag, owner, clock, "aw_rom_board", __FILE__)
, m_region(*this, DEVICE_SELF)
, m_keyregion(*this, finder_base::DUMMY_TAG)
@@ -230,10 +230,10 @@ const aw_rom_board::sbox_set aw_rom_board::sboxes_table[4] =
},
};
-UINT16 aw_rom_board::decrypt(UINT16 cipherText, UINT32 address, const UINT32 key)
+uint16_t aw_rom_board::decrypt(uint16_t cipherText, uint32_t address, const uint32_t key)
{
- UINT8 b0,b1,b2,b3;
- UINT16 aux;
+ uint8_t b0,b1,b2,b3;
+ uint16_t aux;
const int* pbox = permutation_table[key>>18];
const sbox_set* ss = &sboxes_table[(key>>16)&3];
@@ -263,7 +263,7 @@ void aw_rom_board::set_key()
if (m_keyregion->bytes() != 4)
throw emu_fatalerror("AW-ROM-BOARD: key region %s has incorrect size (%d, expected 4)\n", m_keyregion.finder_tag(), m_keyregion->bytes());
- const UINT8 *krp = m_keyregion->base();
+ const uint8_t *krp = m_keyregion->base();
rombd_key = (krp[0] << 24) | (krp[1] << 16) | (krp[2] << 8) | krp[3];
}
@@ -298,10 +298,10 @@ void aw_rom_board::device_reset()
READ16_MEMBER(aw_rom_board::pio_r)
{
- UINT32 roffset = epr_offset & 0x3ffffff;
+ uint32_t roffset = epr_offset & 0x3ffffff;
if (roffset >= (mpr_offset / 2))
roffset += mpr_bank * 0x4000000;
- UINT16 retval = (m_region->bytes() > (roffset * 2)) ? m_region->u16(roffset) : 0; // not endian-safe?
+ uint16_t retval = (m_region->bytes() > (roffset * 2)) ? m_region->u16(roffset) : 0; // not endian-safe?
return retval;
}
@@ -359,26 +359,26 @@ void aw_rom_board::recalc_dma_offset(int mode)
case MPR_RECORD:
dma_offset = mpr_offset + mpr_record_index * 0x40;
- dma_limit = std::min((UINT32)0x8000000, m_region->bytes());
+ dma_limit = std::min((uint32_t)0x8000000, m_region->bytes());
break;
case MPR_FILE: {
- UINT32 filedata_offs = (mpr_bank * 0x8000000 + mpr_offset + mpr_first_file_index * 0x40 + 8) / 2;
+ uint32_t filedata_offs = (mpr_bank * 0x8000000 + mpr_offset + mpr_first_file_index * 0x40 + 8) / 2;
dma_offset = decrypt16(filedata_offs) | (decrypt16(filedata_offs + 1) << 16);
dma_offset = (mpr_offset + dma_offset + mpr_file_offset * 2) & 0x7ffffff;
- dma_limit = std::min((UINT32)0x8000000, m_region->bytes());
+ dma_limit = std::min((uint32_t)0x8000000, m_region->bytes());
break;
}
}
if (dma_offset >= mpr_offset) {
- UINT32 bank_base = mpr_bank * 0x8000000;
+ uint32_t bank_base = mpr_bank * 0x8000000;
dma_offset += bank_base;
dma_limit = std::min(dma_limit + bank_base, m_region->bytes());
}
}
-void aw_rom_board::dma_get_position(UINT8 *&base, UINT32 &limit, bool to_mainram)
+void aw_rom_board::dma_get_position(uint8_t *&base, uint32_t &limit, bool to_mainram)
{
if(!to_mainram) {
limit = 0;
@@ -386,14 +386,14 @@ void aw_rom_board::dma_get_position(UINT8 *&base, UINT32 &limit, bool to_mainram
return;
}
- UINT32 offset = dma_offset / 2;
+ uint32_t offset = dma_offset / 2;
for (int i = 0; i < 16; i++)
decrypted_buf[i] = decrypt16(offset + i);
- base = (UINT8*)decrypted_buf;
+ base = (uint8_t*)decrypted_buf;
limit = 32;
}
-void aw_rom_board::dma_advance(UINT32 size)
+void aw_rom_board::dma_advance(uint32_t size)
{
dma_offset += size;
}
diff --git a/src/mame/machine/awboard.h b/src/mame/machine/awboard.h
index 5ae885079c1..acc075bc209 100644
--- a/src/mame/machine/awboard.h
+++ b/src/mame/machine/awboard.h
@@ -12,7 +12,7 @@
class aw_rom_board : public naomi_g1_device
{
public:
- aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_keyregion(device_t &device, const char *keyregion);
@@ -31,33 +31,33 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual void dma_get_position(UINT8 *&base, UINT32 &limit, bool to_mainram) override;
- virtual void dma_advance(UINT32 size) override;
+ virtual void dma_get_position(uint8_t *&base, uint32_t &limit, bool to_mainram) override;
+ virtual void dma_advance(uint32_t size) override;
private:
enum { EPR, MPR_RECORD, MPR_FILE };
required_memory_region m_region;
optional_memory_region m_keyregion;
- UINT32 rombd_key;
- UINT32 mpr_offset, mpr_bank;
- UINT32 epr_offset, mpr_file_offset;
- UINT16 mpr_record_index, mpr_first_file_index;
- UINT16 decrypted_buf[16];
+ uint32_t rombd_key;
+ uint32_t mpr_offset, mpr_bank;
+ uint32_t epr_offset, mpr_file_offset;
+ uint16_t mpr_record_index, mpr_first_file_index;
+ uint16_t decrypted_buf[16];
- UINT32 dma_offset, dma_limit;
+ uint32_t dma_offset, dma_limit;
struct sbox_set {
- UINT8 S0[32];
- UINT8 S1[16];
- UINT8 S2[16];
- UINT8 S3[8];
+ uint8_t S0[32];
+ uint8_t S1[16];
+ uint8_t S2[16];
+ uint8_t S3[8];
};
static const int permutation_table[4][16];
static const sbox_set sboxes_table[4];
- static UINT16 decrypt(UINT16 cipherText, UINT32 address, const UINT32 key);
- UINT16 decrypt16(UINT32 address) { return decrypt(m_region->u16(address), address, rombd_key); }
+ static uint16_t decrypt(uint16_t cipherText, uint32_t address, const uint32_t key);
+ uint16_t decrypt16(uint32_t address) { return decrypt(m_region->u16(address), address, rombd_key); }
void set_key();
void recalc_dma_offset(int mode);
diff --git a/src/mame/machine/b2m.cpp b/src/mame/machine/b2m.cpp
index 10e9f587c21..e771ffa3529 100644
--- a/src/mame/machine/b2m.cpp
+++ b/src/mame/machine/b2m.cpp
@@ -21,7 +21,7 @@
READ8_MEMBER(b2m_state::b2m_keyboard_r)
{
- UINT8 key = 0x00;
+ uint8_t key = 0x00;
if (offset < 0x100) {
if ((offset & 0x01)!=0) { key |= ioport("LINE0")->read(); }
if ((offset & 0x02)!=0) { key |= ioport("LINE1")->read(); }
@@ -42,9 +42,9 @@ READ8_MEMBER(b2m_state::b2m_keyboard_r)
void b2m_state::b2m_set_bank(int bank)
{
- UINT8 *rom;
+ uint8_t *rom;
address_space &space = m_maincpu->space(AS_PROGRAM);
- UINT8 *ram = m_ram->pointer();
+ uint8_t *ram = m_ram->pointer();
space.install_write_bank(0x0000, 0x27ff, "bank1");
space.install_write_bank(0x2800, 0x2fff, "bank2");
@@ -179,8 +179,8 @@ WRITE_LINE_MEMBER( b2m_state::b2m_fdc_drq )
WRITE8_MEMBER(b2m_state::b2m_ext_8255_portc_w)
{
- UINT8 drive = ((data >> 1) & 1) ^ 1;
- UINT8 side = (data & 1) ^ 1;
+ uint8_t drive = ((data >> 1) & 1) ^ 1;
+ uint8_t side = (data & 1) ^ 1;
static const char *names[] = { "fd0", "fd1"};
floppy_image_device *floppy = nullptr;
@@ -210,7 +210,7 @@ WRITE8_MEMBER(b2m_state::b2m_ext_8255_portc_w)
READ8_MEMBER(b2m_state::b2m_romdisk_porta_r)
{
- UINT8 *romdisk = memregion("maincpu")->base() + 0x12000;
+ uint8_t *romdisk = memregion("maincpu")->base() + 0x12000;
return romdisk[m_b2m_romdisk_msb*256+m_b2m_romdisk_lsb];
}
@@ -232,11 +232,11 @@ DRIVER_INIT_MEMBER(b2m_state,b2m)
WRITE8_MEMBER(b2m_state::b2m_palette_w)
{
- UINT8 b = (3 - ((data >> 6) & 3)) * 0x55;
- UINT8 g = (3 - ((data >> 4) & 3)) * 0x55;
- UINT8 r = (3 - ((data >> 2) & 3)) * 0x55;
+ uint8_t b = (3 - ((data >> 6) & 3)) * 0x55;
+ uint8_t g = (3 - ((data >> 4) & 3)) * 0x55;
+ uint8_t r = (3 - ((data >> 2) & 3)) * 0x55;
- UINT8 bw = (3 - (data & 3)) * 0x55;
+ uint8_t bw = (3 - (data & 3)) * 0x55;
m_b2m_color[offset & 3] = data;
diff --git a/src/mame/machine/bagman.cpp b/src/mame/machine/bagman.cpp
index ede20bbb513..1b51fbb35a1 100644
--- a/src/mame/machine/bagman.cpp
+++ b/src/mame/machine/bagman.cpp
@@ -29,7 +29,7 @@
** 1 - fuse blown: disconnected from input (equal to 1)
** 0 - fuse not blown: connected to input (ie. x, not x, q, not q accordingly)
*/
-static const UINT8 fusemap[64*32]=
+static const uint8_t fusemap[64*32]=
{
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,1,
@@ -100,8 +100,8 @@ static const UINT8 fusemap[64*32]=
void bagman_state::update_pal()
{
-UINT16 rowoffs;
-UINT8 row, column, val;
+uint16_t rowoffs;
+uint8_t row, column, val;
/*calculate all rows ANDs*/
for (row = 0; row < 64; row++)
@@ -203,7 +203,7 @@ UINT8 row, column, val;
WRITE8_MEMBER(bagman_state::pal16r6_w)
{
-UINT8 line;
+uint8_t line;
line = offset * 4;
m_columnvalue[line ] = data & 1;
diff --git a/src/mame/machine/balsente.cpp b/src/mame/machine/balsente.cpp
index 8cb63a2e3a6..3390a42fbe4 100644
--- a/src/mame/machine/balsente.cpp
+++ b/src/mame/machine/balsente.cpp
@@ -49,7 +49,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(balsente_state::balsente_interrupt_timer)
/* if we're a shooter, we do a little more work */
if (m_shooter)
{
- UINT8 tempx, tempy;
+ uint8_t tempx, tempy;
/* we latch the beam values on the first interrupt after VBLANK */
if (param == 64)
@@ -186,8 +186,8 @@ void balsente_state::machine_reset()
void balsente_state::poly17_init()
{
- UINT32 i, x = 0;
- UINT8 *p, *r;
+ uint32_t i, x = 0;
+ uint8_t *p, *r;
/* allocate memory */
p = m_poly17;
@@ -209,8 +209,8 @@ void balsente_state::poly17_init()
inline void balsente_state::noise_gen_chip(int chip, int count, short *buffer)
{
/* noise generator runs at 100kHz */
- UINT32 step = (100000 << 14) / CEM3394_SAMPLE_RATE;
- UINT32 noise_counter = m_noise_position[chip];
+ uint32_t step = (100000 << 14) / CEM3394_SAMPLE_RATE;
+ uint32_t noise_counter = m_noise_position[chip];
while (count--)
{
@@ -244,7 +244,7 @@ WRITE8_MEMBER(balsente_state::balsente_random_reset_w)
READ8_MEMBER(balsente_state::balsente_random_num_r)
{
- UINT32 cc;
+ uint32_t cc;
/* CPU runs at 1.25MHz, noise source at 100kHz --> multiply by 12.5 */
cc = m_maincpu->total_cycles();
@@ -328,7 +328,7 @@ WRITE8_MEMBER(balsente_state::balsente_misc_output_w)
void balsente_state::m6850_update_io()
{
- UINT8 new_state;
+ uint8_t new_state;
/* sound -> main CPU communications */
if (!(m_m6850_sound_status & 0x02))
@@ -940,7 +940,7 @@ READ8_MEMBER(balsente_state::balsente_counter_state_r)
WRITE8_MEMBER(balsente_state::balsente_counter_control_w)
{
- UINT8 diff_counter_control = m_counter_control ^ data;
+ uint8_t diff_counter_control = m_counter_control ^ data;
/* set the new global value */
m_counter_control = data;
@@ -987,7 +987,7 @@ WRITE8_MEMBER(balsente_state::balsente_counter_control_w)
WRITE8_MEMBER(balsente_state::balsente_chip_select_w)
{
- static const UINT8 register_map[8] =
+ static const uint8_t register_map[8] =
{
CEM3394_VCO_FREQUENCY,
CEM3394_FINAL_GAIN,
@@ -1059,7 +1059,7 @@ WRITE8_MEMBER(balsente_state::balsente_dac_data_w)
/* if there are open channels, force the values in */
if ((m_chip_select & 0x3f) != 0x3f)
{
- UINT8 temp = m_chip_select;
+ uint8_t temp = m_chip_select;
balsente_chip_select_w(space, 0, 0x3f);
balsente_chip_select_w(space, 0, temp);
}
@@ -1102,7 +1102,7 @@ WRITE8_MEMBER(balsente_state::spiker_expand_w)
READ8_MEMBER(balsente_state::spiker_expand_r)
{
- UINT8 left, right;
+ uint8_t left, right;
/* first rotate each nibble */
m_spiker_expand_bits = ((m_spiker_expand_bits << 1) & 0xee) | ((m_spiker_expand_bits >> 3) & 0x11);
@@ -1121,8 +1121,8 @@ READ8_MEMBER(balsente_state::spiker_expand_r)
void balsente_state::update_grudge_steering()
{
- UINT8 wheel[3];
- INT8 diff[3];
+ uint8_t wheel[3];
+ int8_t diff[3];
/* read the current steering values */
wheel[0] = ioport("AN0")->read();
@@ -1177,7 +1177,7 @@ READ8_MEMBER(balsente_state::grudge_steering_r)
READ8_MEMBER(balsente_state::shrike_shared_6809_r)
{
- UINT16 mem_mask_int = offset & 1 ? 0xff00 : 0x00ff;
+ uint16_t mem_mask_int = offset & 1 ? 0xff00 : 0x00ff;
switch( offset )
{
@@ -1191,7 +1191,7 @@ READ8_MEMBER(balsente_state::shrike_shared_6809_r)
WRITE8_MEMBER(balsente_state::shrike_shared_6809_w)
{
- UINT16 mem_mask_int = offset & 1 ? 0xff00 : 0x00ff;
+ uint16_t mem_mask_int = offset & 1 ? 0xff00 : 0x00ff;
m_shrike_shared[offset >> 1] = ( m_shrike_shared[offset >> 1] & mem_mask_int ) | ( data << ( mem_mask_int & 0x8 ) );
}
diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp
index e284ea720e6..32d3e876085 100644
--- a/src/mame/machine/bbc.cpp
+++ b/src/mame/machine/bbc.cpp
@@ -157,7 +157,7 @@ WRITE8_MEMBER(bbc_state::bbc_memorybp1_w)
DIRECT_UPDATE_MEMBER(bbc_state::bbcbp_direct_handler)
{
- UINT8 *RAM = m_region_maincpu->base();
+ uint8_t *RAM = m_region_maincpu->base();
if (m_vdusel == 0)
{
// not in shadow ram mode so just read normal ram
@@ -182,7 +182,7 @@ DIRECT_UPDATE_MEMBER(bbc_state::bbcbp_direct_handler)
WRITE8_MEMBER(bbc_state::bbc_memorybp2_w)
{
- UINT8 *RAM = m_region_maincpu->base();
+ uint8_t *RAM = m_region_maincpu->base();
if (m_vdusel==0)
{
// not in shadow ram mode so just write to normal ram
@@ -426,7 +426,7 @@ DIRECT_UPDATE_MEMBER(bbc_state::bbcm_direct_handler)
WRITE8_MEMBER(bbc_state::bbc_memorybm2_w)
{
- UINT8 *RAM = m_region_maincpu->base();
+ uint8_t *RAM = m_region_maincpu->base();
if (m_ACCCON_X)
{
RAM[offset + 0xb000] = data;
@@ -1574,7 +1574,7 @@ WRITE8_MEMBER(bbc_state::bbcm_wd1772l_write)
image_init_result bbc_state::bbc_load_rom(device_image_interface &image, generic_slot_device *slot)
{
- UINT32 size = slot->common_get_size("rom");
+ uint32_t size = slot->common_get_size("rom");
// socket accepts 8K and 16K ROM only
if (size != 0x2000 && size != 0x4000)
@@ -1597,7 +1597,7 @@ image_init_result bbc_state::bbcm_load_cart(device_image_interface &image, gener
{
if (image.software_entry() == nullptr)
{
- UINT32 filesize = image.length();
+ uint32_t filesize = image.length();
if (filesize != 0x8000)
{
@@ -1611,8 +1611,8 @@ image_init_result bbc_state::bbcm_load_cart(device_image_interface &image, gener
}
else
{
- UINT32 size_lo = image.get_software_region_length("lorom");
- UINT32 size_hi = image.get_software_region_length("uprom");
+ uint32_t size_lo = image.get_software_region_length("lorom");
+ uint32_t size_hi = image.get_software_region_length("uprom");
if (size_lo + size_hi != 0x8000)
{
@@ -1652,11 +1652,11 @@ DRIVER_INIT_MEMBER(bbc_state,bbc)
// setup pointers for optional EPROMs
-void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size)
+void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, uint32_t shift, uint32_t size)
{
std::string region_tag;
memory_region *tmp_reg;
- UINT8 *eprom[4];
+ uint8_t *eprom[4];
if (m_exp1 && (tmp_reg = memregion(region_tag.assign(m_exp1->tag()).append(GENERIC_ROM_REGION_TAG).c_str())))
eprom[0] = tmp_reg->base() + shift;
else
@@ -1686,11 +1686,11 @@ void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, U
}
}
-void bbc_state::bbcm_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size)
+void bbc_state::bbcm_setup_banks(memory_bank *membank, int banks, uint32_t shift, uint32_t size)
{
std::string region_tag;
memory_region *tmp_reg;
- UINT8 *eprom[2];
+ uint8_t *eprom[2];
if (m_exp1 && (tmp_reg = memregion(region_tag.assign(m_exp1->tag()).append(GENERIC_ROM_REGION_TAG).c_str())))
eprom[0] = tmp_reg->base() + shift;
else
@@ -1725,7 +1725,7 @@ MACHINE_RESET_MEMBER(bbc_state, bbca)
m_Speech = m_bbcconfig.read_safe(0) & 0x04;
m_SWRAMtype = m_bbcconfig.read_safe(0) & 0x18;
- UINT8 *RAM = m_region_maincpu->base();
+ uint8_t *RAM = m_region_maincpu->base();
m_bank1->set_base(RAM);
if (m_ram->size() == 32*1024)
@@ -1760,7 +1760,7 @@ MACHINE_RESET_MEMBER(bbc_state, bbcb)
m_Speech = m_bbcconfig.read_safe(1) & 0x04;
m_SWRAMtype = m_bbcconfig.read_safe(0) & 0x18;
- UINT8 *RAM = m_region_maincpu->base();
+ uint8_t *RAM = m_region_maincpu->base();
m_bank1->set_base(RAM);
m_bank3->set_base(RAM + 0x4000);
diff --git a/src/mame/machine/bebox.cpp b/src/mame/machine/bebox.cpp
index c13fa303c8b..2fc0a30f0f8 100644
--- a/src/mame/machine/bebox.cpp
+++ b/src/mame/machine/bebox.cpp
@@ -111,7 +111,7 @@
*
*************************************/
-static void bebox_mbreg32_w(UINT32 *target, UINT64 data, UINT64 mem_mask)
+static void bebox_mbreg32_w(uint32_t *target, uint64_t data, uint64_t mem_mask)
{
int i;
@@ -130,22 +130,22 @@ static void bebox_mbreg32_w(UINT32 *target, UINT64 data, UINT64 mem_mask)
READ64_MEMBER(bebox_state::bebox_cpu0_imask_r )
{
- return ((UINT64) m_cpu_imask[0]) << 32;
+ return ((uint64_t) m_cpu_imask[0]) << 32;
}
READ64_MEMBER(bebox_state::bebox_cpu1_imask_r )
{
- return ((UINT64) m_cpu_imask[1]) << 32;
+ return ((uint64_t) m_cpu_imask[1]) << 32;
}
READ64_MEMBER(bebox_state::bebox_interrupt_sources_r )
{
- return ((UINT64) m_interrupts) << 32;
+ return ((uint64_t) m_interrupts) << 32;
}
WRITE64_MEMBER(bebox_state::bebox_cpu0_imask_w )
{
- UINT32 old_imask = m_cpu_imask[0];
+ uint32_t old_imask = m_cpu_imask[0];
bebox_mbreg32_w(&m_cpu_imask[0], data, mem_mask);
@@ -162,7 +162,7 @@ WRITE64_MEMBER(bebox_state::bebox_cpu0_imask_w )
WRITE64_MEMBER(bebox_state::bebox_cpu1_imask_w )
{
- UINT32 old_imask = m_cpu_imask[1];
+ uint32_t old_imask = m_cpu_imask[1];
bebox_mbreg32_w(&m_cpu_imask[1], data, mem_mask);
@@ -179,7 +179,7 @@ WRITE64_MEMBER(bebox_state::bebox_cpu1_imask_w )
READ64_MEMBER(bebox_state::bebox_crossproc_interrupts_r )
{
- UINT32 result;
+ uint32_t result;
result = m_crossproc_interrupts;
/* return a different result depending on which CPU is accessing this handler */
@@ -188,14 +188,14 @@ READ64_MEMBER(bebox_state::bebox_crossproc_interrupts_r )
else
result &= ~0x02000000;
- return ((UINT64) result) << 32;
+ return ((uint64_t) result) << 32;
}
WRITE64_MEMBER(bebox_state::bebox_crossproc_interrupts_w )
{
static const struct
{
- UINT32 mask;
+ uint32_t mask;
int cpunum;
int active_high;
int inputline;
@@ -207,7 +207,7 @@ WRITE64_MEMBER(bebox_state::bebox_crossproc_interrupts_w )
{ 0x04000000, 1, 0, 0/*PPC_INPUT_LINE_TLBISYNC*/ }
};
int i, line;
- UINT32 old_crossproc_interrupts = m_crossproc_interrupts;
+ uint32_t old_crossproc_interrupts = m_crossproc_interrupts;
cpu_device *cpus[] = { m_ppc1, m_ppc2 };
bebox_mbreg32_w(&m_crossproc_interrupts, data, mem_mask);
@@ -237,7 +237,7 @@ WRITE64_MEMBER(bebox_state::bebox_crossproc_interrupts_w )
WRITE64_MEMBER(bebox_state::bebox_processor_resets_w )
{
- UINT8 b = (UINT8) (data >> 56);
+ uint8_t b = (uint8_t) (data >> 56);
if (b & 0x20)
{
@@ -248,7 +248,7 @@ WRITE64_MEMBER(bebox_state::bebox_processor_resets_w )
void bebox_state::bebox_update_interrupts()
{
- UINT32 interrupt;
+ uint32_t interrupt;
cpu_device *cpus[] = { m_ppc1, m_ppc2 };
for (int cpunum = 0; cpunum < 2; cpunum++)
@@ -303,7 +303,7 @@ void bebox_state::bebox_set_irq_bit(unsigned int interrupt_bit, int val)
"SMI0",
nullptr
};
- UINT32 old_interrupts;
+ uint32_t old_interrupts;
if (LOG_INTERRUPTS)
{
@@ -348,10 +348,10 @@ WRITE_LINE_MEMBER( bebox_state::fdc_interrupt )
READ64_MEMBER(bebox_state::bebox_interrupt_ack_r )
{
- UINT32 result;
+ uint32_t result;
result = m_pic8259_1->acknowledge();
bebox_set_irq_bit(5, 0); /* HACK */
- return ((UINT64) result) << 56;
+ return ((uint64_t) result) << 56;
}
@@ -398,24 +398,24 @@ WRITE_LINE_MEMBER(bebox_state::bebox_ide_interrupt)
/*
static READ64_MEMBER(bebox_state::bebox_video_r )
{
- UINT64 result = 0;
+ uint64_t result = 0;
mem_mask = FLIPENDIAN_INT64(mem_mask);
if (ACCESSING_BITS_0_7)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 0, mem_mask >> 0) << 0;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 0, mem_mask >> 0) << 0;
if (ACCESSING_BITS_8_15)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 1, mem_mask >> 8) << 8;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 1, mem_mask >> 8) << 8;
if (ACCESSING_BITS_16_23)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 2, mem_mask >> 16) << 16;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 2, mem_mask >> 16) << 16;
if (ACCESSING_BITS_24_31)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 3, mem_mask >> 24) << 24;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 3, mem_mask >> 24) << 24;
if (ACCESSING_BITS_32_39)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 4, mem_mask >> 32) << 32;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 4, mem_mask >> 32) << 32;
if (ACCESSING_BITS_40_47)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 5, mem_mask >> 40) << 40;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 5, mem_mask >> 40) << 40;
if (ACCESSING_BITS_48_55)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 6, mem_mask >> 48) << 48;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 6, mem_mask >> 48) << 48;
if (ACCESSING_BITS_56_63)
- result |= (UINT64)vga_mem_linear_r(space, offset * 8 + 7, mem_mask >> 56) << 56;
+ result |= (uint64_t)vga_mem_linear_r(space, offset * 8 + 7, mem_mask >> 56) << 56;
return FLIPENDIAN_INT64(result);
}
@@ -451,7 +451,7 @@ static WRITE64_MEMBER(bebox_state::bebox_video_w )
READ8_MEMBER(bebox_state::bebox_page_r)
{
- UINT8 data = m_at_pages[offset % 0x10];
+ uint8_t data = m_at_pages[offset % 0x10];
switch(offset % 8)
{
@@ -480,19 +480,19 @@ WRITE8_MEMBER(bebox_state::bebox_page_w)
{
case 1:
m_dma_offset[(offset / 8) & 1][2] &= 0xFF00;
- m_dma_offset[(offset / 8) & 1][2] |= ((UINT16 ) data) << 0;
+ m_dma_offset[(offset / 8) & 1][2] |= ((uint16_t ) data) << 0;
break;
case 2:
m_dma_offset[(offset / 8) & 1][3] &= 0xFF00;
- m_dma_offset[(offset / 8) & 1][3] |= ((UINT16 ) data) << 0;
+ m_dma_offset[(offset / 8) & 1][3] |= ((uint16_t ) data) << 0;
break;
case 3:
m_dma_offset[(offset / 8) & 1][1] &= 0xFF00;
- m_dma_offset[(offset / 8) & 1][1] |= ((UINT16 ) data) << 0;
+ m_dma_offset[(offset / 8) & 1][1] |= ((uint16_t ) data) << 0;
break;
case 7:
m_dma_offset[(offset / 8) & 1][0] &= 0xFF00;
- m_dma_offset[(offset / 8) & 1][0] |= ((UINT16 ) data) << 0;
+ m_dma_offset[(offset / 8) & 1][0] |= ((uint16_t ) data) << 0;
break;
}
}
@@ -504,19 +504,19 @@ WRITE8_MEMBER(bebox_state::bebox_80000480_w)
{
case 1:
m_dma_offset[(offset / 8) & 1][2] &= 0x00FF;
- m_dma_offset[(offset / 8) & 1][2] |= ((UINT16 ) data) << 8;
+ m_dma_offset[(offset / 8) & 1][2] |= ((uint16_t ) data) << 8;
break;
case 2:
m_dma_offset[(offset / 8) & 1][3] &= 0x00FF;
- m_dma_offset[(offset / 8) & 1][3] |= ((UINT16 ) data) << 8;
+ m_dma_offset[(offset / 8) & 1][3] |= ((uint16_t ) data) << 8;
break;
case 3:
m_dma_offset[(offset / 8) & 1][1] &= 0x00FF;
- m_dma_offset[(offset / 8) & 1][1] |= ((UINT16 ) data) << 8;
+ m_dma_offset[(offset / 8) & 1][1] |= ((uint16_t ) data) << 8;
break;
case 7:
m_dma_offset[(offset / 8) & 1][0] &= 0x00FF;
- m_dma_offset[(offset / 8) & 1][0] |= ((UINT16 ) data) << 8;
+ m_dma_offset[(offset / 8) & 1][0] |= ((uint16_t ) data) << 8;
break;
}
}
@@ -621,30 +621,30 @@ WRITE8_MEMBER(bebox_state::bebox_flash_w )
READ64_MEMBER(bebox_state::scsi53c810_r )
{
int reg = offset*8;
- UINT64 r = 0;
+ uint64_t r = 0;
if (!ACCESSING_BITS_56_63) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+0) << 56;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+0) << 56;
}
if (!ACCESSING_BITS_48_55) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+1) << 48;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+1) << 48;
}
if (!ACCESSING_BITS_40_47) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+2) << 40;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+2) << 40;
}
if (!ACCESSING_BITS_32_39) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+3) << 32;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+3) << 32;
}
if (!ACCESSING_BITS_24_31) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+4) << 24;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+4) << 24;
}
if (!ACCESSING_BITS_16_23) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+5) << 16;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+5) << 16;
}
if (!ACCESSING_BITS_8_15) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+6) << 8;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+6) << 8;
}
if (!ACCESSING_BITS_0_7) {
- r |= (UINT64)m_lsi53c810->lsi53c810_reg_r(reg+7) << 0;
+ r |= (uint64_t)m_lsi53c810->lsi53c810_reg_r(reg+7) << 0;
}
return r;
@@ -681,10 +681,10 @@ WRITE64_MEMBER(bebox_state::scsi53c810_w )
}
-UINT32 scsi53c810_pci_read(device_t *busdevice, device_t *device, int function, int offset, UINT32 mem_mask)
+uint32_t scsi53c810_pci_read(device_t *busdevice, device_t *device, int function, int offset, uint32_t mem_mask)
{
bebox_state *state = device->machine().driver_data<bebox_state>();
- UINT32 result = 0;
+ uint32_t result = 0;
if (function == 0)
{
@@ -707,7 +707,7 @@ UINT32 scsi53c810_pci_read(device_t *busdevice, device_t *device, int function,
}
-void scsi53c810_pci_write(device_t *busdevice, device_t *device, int function, int offset, UINT32 data, UINT32 mem_mask)
+void scsi53c810_pci_write(device_t *busdevice, device_t *device, int function, int offset, uint32_t data, uint32_t mem_mask)
{
bebox_state *state = device->machine().driver_data<bebox_state>();
offs_t addr;
@@ -800,7 +800,7 @@ DRIVER_INIT_MEMBER(bebox_state,bebox)
* the crash
*/
{
- static UINT64 ops[2] =
+ static uint64_t ops[2] =
{
/* li r0, 0x0700 */
/* mtspr ctr, r0 */
diff --git a/src/mame/machine/beezer.cpp b/src/mame/machine/beezer.cpp
index c8ffe89b5ba..55fb06f1292 100644
--- a/src/mame/machine/beezer.cpp
+++ b/src/mame/machine/beezer.cpp
@@ -138,7 +138,7 @@ WRITE8_MEMBER(beezer_state::beezer_bankswitch_w)
}
else
{
- UINT8 *rom = memregion("maincpu")->base() + 0x10000;
+ uint8_t *rom = memregion("maincpu")->base() + 0x10000;
space.install_ram(0xc000, 0xcfff, rom + (data & 0x07) * 0x2000 + ((data & 0x08) ? 0x1000: 0));
}
}
diff --git a/src/mame/machine/beta.cpp b/src/mame/machine/beta.cpp
index 52f1500f884..9185aa933f3 100644
--- a/src/mame/machine/beta.cpp
+++ b/src/mame/machine/beta.cpp
@@ -26,7 +26,7 @@ BUGS:
const device_type BETA_DISK = &device_creator<beta_disk_device>;
-beta_disk_device::beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+beta_disk_device::beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BETA_DISK, "Beta Disk Interface", tag, owner, clock, "betadisk", __FILE__)
, m_betadisk_active(0)
, m_wd179x(*this, "wd179x")
@@ -107,7 +107,7 @@ READ8_MEMBER(beta_disk_device::data_r)
READ8_MEMBER(beta_disk_device::state_r)
{
if (m_betadisk_active==1) {
- UINT8 result = 0x3F; // actually open bus
+ uint8_t result = 0x3F; // actually open bus
result |= m_wd179x->drq_r() ? 0x40 : 0;
result |= m_wd179x->intrq_r() ? 0x80 : 0;
return result;
diff --git a/src/mame/machine/beta.h b/src/mame/machine/beta.h
index 8aa23e21c35..c1ffa85db4d 100644
--- a/src/mame/machine/beta.h
+++ b/src/mame/machine/beta.h
@@ -20,7 +20,7 @@
class beta_disk_device : public device_t
{
public:
- beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~beta_disk_device() {}
DECLARE_READ8_MEMBER(status_r);
@@ -40,7 +40,7 @@ public:
void enable();
void disable();
- UINT8 m_betadisk_active;
+ uint8_t m_betadisk_active;
protected:
// device-level overrides
diff --git a/src/mame/machine/bfm_bd1.cpp b/src/mame/machine/bfm_bd1.cpp
index 78132ae5acf..3c1b6ea32f4 100644
--- a/src/mame/machine/bfm_bd1.cpp
+++ b/src/mame/machine/bfm_bd1.cpp
@@ -33,7 +33,7 @@ const device_type BFM_BD1 = &device_creator<bfm_bd1_t>;
*/
-static const UINT16 BD1charset[]=
+static const uint16_t BD1charset[]=
{ // FEDC BA98 7654 3210
0xA626, // 1010 0110 0010 0110 @.
0xE027, // 1110 0000 0010 0111 A.
@@ -101,7 +101,7 @@ static const UINT16 BD1charset[]=
0x4406, // 0100 0100 0000 0110 ?
};
-bfm_bd1_t::bfm_bd1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+bfm_bd1_t::bfm_bd1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BFM_BD1, "BFM BD1 VFD controller", tag, owner, clock, "bfm_bd1", __FILE__),
m_port_val(0)
{
@@ -162,7 +162,7 @@ void bfm_bd1_t::device_reset()
memset(m_attrs, 0, sizeof(m_attrs));
}
-UINT16 bfm_bd1_t::set_display(UINT16 segin)
+uint16_t bfm_bd1_t::set_display(uint16_t segin)
{
return BITSWAP16(segin,8,12,11,7,6,4,10,3,14,15,0,13,9,5,1,2);
}
diff --git a/src/mame/machine/bfm_bd1.h b/src/mame/machine/bfm_bd1.h
index 70742e807f9..02026b586b1 100644
--- a/src/mame/machine/bfm_bd1.h
+++ b/src/mame/machine/bfm_bd1.h
@@ -15,28 +15,28 @@
class bfm_bd1_t : public device_t
{
public:
- bfm_bd1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ bfm_bd1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void static_set_value(device_t &device, int val);
int write_char(int data);
virtual void update_display();
- UINT8 m_port_val;
+ uint8_t m_port_val;
void blank(int data);
void shift_clock(int state);
void setdata(int segdata, int data);
- UINT16 set_display(UINT16 segin);
+ uint16_t set_display(uint16_t segin);
DECLARE_WRITE_LINE_MEMBER( sclk );
DECLARE_WRITE_LINE_MEMBER( data );
DECLARE_WRITE_LINE_MEMBER( por );
protected:
- static const UINT8 AT_NORMAL = 0x00;
- static const UINT8 AT_FLASH = 0x01;
- static const UINT8 AT_BLANK = 0x02;
- static const UINT8 AT_FLASHED = 0x80; // set when character should be blinked off
+ static const uint8_t AT_NORMAL = 0x00;
+ static const uint8_t AT_FLASH = 0x01;
+ static const uint8_t AT_BLANK = 0x02;
+ static const uint8_t AT_FLASHED = 0x80; // set when character should be blinked off
int m_cursor_pos;
int m_window_start; // display window start pos 0-15
@@ -52,12 +52,12 @@ protected:
int m_sclk;
int m_data;
- UINT8 m_cursor;
- UINT16 m_chars[16];
- UINT16 m_outputs[16];
- UINT8 m_attrs[16];
- UINT16 m_user_data; // user defined character data (16 bit)
- UINT16 m_user_def; // user defined character state
+ uint8_t m_cursor;
+ uint16_t m_chars[16];
+ uint16_t m_outputs[16];
+ uint8_t m_attrs[16];
+ uint16_t m_user_data; // user defined character data (16 bit)
+ uint16_t m_user_def; // user defined character state
virtual void device_start() override;
virtual void device_reset() override;
diff --git a/src/mame/machine/bfm_bda.cpp b/src/mame/machine/bfm_bda.cpp
index 0984bf7ecab..2efd4a9f630 100644
--- a/src/mame/machine/bfm_bda.cpp
+++ b/src/mame/machine/bfm_bda.cpp
@@ -15,7 +15,7 @@ const device_type BFM_BDA = &device_creator<bfm_bda_t>;
//I currently use the BDA character set, until a suitable image can be programmed
-static const UINT16 BDAcharset[]=
+static const uint16_t BDAcharset[]=
{ // FEDC BA98 7654 3210
0xA626, // 1010 0110 0010 0110 @.
0xE027, // 1110 0000 0010 0111 A.
@@ -83,7 +83,7 @@ static const UINT16 BDAcharset[]=
0x4406, // 0100 0100 0000 0110 ?
};
-bfm_bda_t::bfm_bda_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+bfm_bda_t::bfm_bda_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BFM_BDA, "BFM BDA VFD controller", tag, owner, clock, "bfm_bda", __FILE__),
m_port_val(0)
{
@@ -144,7 +144,7 @@ void bfm_bda_t::device_reset()
memset(m_attrs, 0, sizeof(m_attrs));
}
-UINT16 bfm_bda_t::set_display(UINT16 segin)
+uint16_t bfm_bda_t::set_display(uint16_t segin)
{
return BITSWAP16(segin,8,12,11,7,6,4,10,3,14,15,0,13,9,5,1,2);
}
diff --git a/src/mame/machine/bfm_bda.h b/src/mame/machine/bfm_bda.h
index 3570c478f81..1e5c8a664cd 100644
--- a/src/mame/machine/bfm_bda.h
+++ b/src/mame/machine/bfm_bda.h
@@ -15,25 +15,25 @@
class bfm_bda_t : public device_t
{
public:
- bfm_bda_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ bfm_bda_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void static_set_value(device_t &device, int val);
int write_char(int data);
virtual void update_display();
- UINT8 m_port_val;
+ uint8_t m_port_val;
void blank(int data);
void shift_data(int data);
void setdata(int segdata, int data);
- UINT16 set_display(UINT16 segin);
+ uint16_t set_display(uint16_t segin);
protected:
- static const UINT8 AT_NORMAL = 0x00;
- static const UINT8 AT_FLASH = 0x01;
- static const UINT8 AT_BLANK = 0x02;
- static const UINT8 AT_FLASHED = 0x80; // set when character should be blinked off
+ static const uint8_t AT_NORMAL = 0x00;
+ static const uint8_t AT_FLASH = 0x01;
+ static const uint8_t AT_BLANK = 0x02;
+ static const uint8_t AT_FLASHED = 0x80; // set when character should be blinked off
int m_cursor_pos;
int m_window_start; // display window start pos 0-15
@@ -48,12 +48,12 @@ protected:
int m_display_mode;
int m_flash_rate;
int m_flash_control;
- UINT8 m_cursor;
- UINT16 m_chars[16];
- UINT16 m_outputs[16];
- UINT8 m_attrs[16];
- UINT16 m_user_data; // user defined character data (16 bit)
- UINT16 m_user_def; // user defined character state
+ uint8_t m_cursor;
+ uint16_t m_chars[16];
+ uint16_t m_outputs[16];
+ uint8_t m_attrs[16];
+ uint16_t m_user_data; // user defined character data (16 bit)
+ uint16_t m_user_def; // user defined character state
virtual void device_start() override;
virtual void device_reset() override;
diff --git a/src/mame/machine/bfm_comn.cpp b/src/mame/machine/bfm_comn.cpp
index 1faa709b40a..dd381a9b0d9 100644
--- a/src/mame/machine/bfm_comn.cpp
+++ b/src/mame/machine/bfm_comn.cpp
@@ -4,14 +4,14 @@
#include "emu.h"
-static const UINT16 AddressDecode[]=
+static const uint16_t AddressDecode[]=
{
0x0800,0x1000,0x0001,0x0004,0x0008,0x0020,0x0080,0x0200,
0x0100,0x0040,0x0002,0x0010,0x0400,0x2000,0x4000,0x8000,
0
};
-static const UINT8 DataDecode[]=
+static const uint8_t DataDecode[]=
{
0x02,0x08,0x20,0x40,0x10,0x04,0x01,0x80,
0
@@ -19,24 +19,24 @@ static const UINT8 DataDecode[]=
///////////////////////////////////////////////////////////////////////////
-void bfm_decode_mainrom(running_machine &machine, const char *rom_region, UINT8* codec_data)
+void bfm_decode_mainrom(running_machine &machine, const char *rom_region, uint8_t* codec_data)
{
- UINT8 *rom;
+ uint8_t *rom;
rom = machine.root_device().memregion(rom_region)->base();
{
- std::vector<UINT8> tmp(0x10000);
+ std::vector<uint8_t> tmp(0x10000);
int i;
memcpy(&tmp[0], rom, 0x10000);
for ( i = 0; i < 256; i++ )
{
- UINT8 data,pattern,newdata,*tab;
+ uint8_t data,pattern,newdata,*tab;
data = i;
- tab = (UINT8*)DataDecode;
+ tab = (uint8_t*)DataDecode;
pattern = 0x01;
newdata = 0;
@@ -52,9 +52,9 @@ void bfm_decode_mainrom(running_machine &machine, const char *rom_region, UINT8*
for ( int address = 0; address < 0x10000; address++)
{
int newaddress,pattern;
- UINT16 *tab;
+ uint16_t *tab;
- tab = (UINT16*)AddressDecode;
+ tab = (uint16_t*)AddressDecode;
pattern = 0x0001;
newaddress = 0;
do
diff --git a/src/mame/machine/bfm_comn.h b/src/mame/machine/bfm_comn.h
index d45c0291b4e..a53191f4ffd 100644
--- a/src/mame/machine/bfm_comn.h
+++ b/src/mame/machine/bfm_comn.h
@@ -2,4 +2,4 @@
// copyright-holders:David Haywood
-void bfm_decode_mainrom(running_machine &machine, const char *rom_region, UINT8* codec_data);
+void bfm_decode_mainrom(running_machine &machine, const char *rom_region, uint8_t* codec_data);
diff --git a/src/mame/machine/bfm_sc45_helper.cpp b/src/mame/machine/bfm_sc45_helper.cpp
index 4c269798ba9..a6312c70e64 100644
--- a/src/mame/machine/bfm_sc45_helper.cpp
+++ b/src/mame/machine/bfm_sc45_helper.cpp
@@ -16,7 +16,7 @@ int find_project_string(running_machine &machine, int addrxor, int mode)
// search for the title
const int strlength = 14;
char title_string[] = "PROJECT NUMBER";
- UINT8 *src = machine.root_device().memregion( "maincpu" )->base();
+ uint8_t *src = machine.root_device().memregion( "maincpu" )->base();
int size = machine.root_device().memregion( "maincpu" )->bytes();
int search_start = 0;
@@ -42,8 +42,8 @@ int find_project_string(running_machine &machine, int addrxor, int mode)
int found = 1;
for (j=search_start;j<strlength;j+=search_step)
{
- UINT8 rom = src[(i+j)^addrxor];
- UINT8 chr = title_string[j];
+ uint8_t rom = src[(i+j)^addrxor];
+ uint8_t chr = title_string[j];
if (rom != chr)
{
@@ -66,7 +66,7 @@ int find_project_string(running_machine &machine, int addrxor, int mode)
while (!end)
{
- UINT8 rom;
+ uint8_t rom;
int addr;
if (mode==0)
{
@@ -136,8 +136,8 @@ sc4inputinfo sc4inputs[32][16];
bool compare_input_code(running_machine &machine, int addr)
{
- UINT16 *src = (UINT16*)machine.root_device().memregion( "maincpu" )->base();
- UINT16* rom = &src[addr];
+ uint16_t *src = (uint16_t*)machine.root_device().memregion( "maincpu" )->base();
+ uint16_t* rom = &src[addr];
if ((rom[0] != 0x48e7) || (rom[1] != 0x3020) || (rom[2] != 0x322f) || (rom[3] != 0x0010) || (rom[4] != 0x227c))
@@ -162,11 +162,11 @@ int find_input_strings(running_machine &machine)
int foundat = -1;
- UINT32 startblock = 0;
- UINT32 endblock = 0;
+ uint32_t startblock = 0;
+ uint32_t endblock = 0;
- UINT16 *rom = (UINT16*)machine.root_device().memregion( "maincpu" )->base();
- UINT8 *rom8 = machine.root_device().memregion( "maincpu" )->base();
+ uint16_t *rom = (uint16_t*)machine.root_device().memregion( "maincpu" )->base();
+ uint8_t *rom8 = machine.root_device().memregion( "maincpu" )->base();
for (int i=0;i<(0x100000-0x40)/2;i++)
{
@@ -184,19 +184,19 @@ int find_input_strings(running_machine &machine)
{
for (int j = startblock / 2; j < endblock / 2; j+=4)
{
- UINT16 portpos = rom[j + 0];
+ uint16_t portpos = rom[j + 0];
int port = (portpos & 0x1f);
int pos = (portpos >> 5);
- UINT16 unk2 = rom[j + 1];
- UINT32 stringaddr = (rom[j + 2] << 16) | rom[j + 3];
+ uint16_t unk2 = rom[j + 1];
+ uint32_t stringaddr = (rom[j + 2] << 16) | rom[j + 3];
sc45helperlog("(port %02x position %02x) unk %04x addr %08x ", port,pos, unk2, stringaddr);
std::string tempstring;
for (int k = stringaddr; k < stringaddr + 6; k++)
{
- UINT8 chr = rom8[k^1];
+ uint8_t chr = rom8[k^1];
if ((chr == 0xff) || (chr == 0x00))
{
@@ -458,8 +458,8 @@ int find_lamp_strings(running_machine &machine)
- UINT16 *rom = (UINT16*)machine.root_device().memregion( "maincpu" )->base();
- UINT8 *rom8 = machine.root_device().memregion( "maincpu" )->base();
+ uint16_t *rom = (uint16_t*)machine.root_device().memregion( "maincpu" )->base();
+ uint8_t *rom8 = machine.root_device().memregion( "maincpu" )->base();
// sc45helperlog("------------ LAMPS -----------------\n");
@@ -467,11 +467,11 @@ int find_lamp_strings(running_machine &machine)
{
for (int j = startblock / 2; j < endblock / 2; j+=3)
{
- UINT16 portpos = rom[j + 0];
+ uint16_t portpos = rom[j + 0];
int row = portpos & 0xf;
int col = (portpos >> 4 ) & 0xf;
- UINT32 stringaddr = (rom[j + 1] << 16) | rom[j + 2];
+ uint32_t stringaddr = (rom[j + 1] << 16) | rom[j + 2];
//sc45helperlog("(row %02d, col %02d, unused %02x) addr %08x ", row,col, (portpos&0xff00)>>8, stringaddr);
@@ -479,7 +479,7 @@ int find_lamp_strings(running_machine &machine)
for (int k = stringaddr; k < stringaddr + 10; k++)
{
- UINT8 chr = rom8[k^1];
+ uint8_t chr = rom8[k^1];
if ((chr == 0xff) || (chr == 0x00))
{
@@ -843,8 +843,8 @@ int find_reel_strings(running_machine &machine)
- UINT16 *rom = (UINT16*)machine.root_device().memregion( "maincpu" )->base();
- UINT8 *rom8 = machine.root_device().memregion( "maincpu" )->base();
+ uint16_t *rom = (uint16_t*)machine.root_device().memregion( "maincpu" )->base();
+ uint8_t *rom8 = machine.root_device().memregion( "maincpu" )->base();
@@ -870,7 +870,7 @@ int find_reel_strings(running_machine &machine)
sc45helperlog("<reel stateoffset=\"%d\" symbollist=\"", shifted);
}
- UINT32 stringaddr = (rom[j + 0] << 16) | rom[j + 1];
+ uint32_t stringaddr = (rom[j + 0] << 16) | rom[j + 1];
stringaddr &= 0xfffff;
if (stringaddr >= (0x10000 - 16))
@@ -882,7 +882,7 @@ int find_reel_strings(running_machine &machine)
for (int k = stringaddr; k < stringaddr + 10; k++)
{
- UINT8 chr = rom8[k^1];
+ uint8_t chr = rom8[k^1];
if ((chr == 0xff) || (chr == 0x00))
{
diff --git a/src/mame/machine/bk.cpp b/src/mame/machine/bk.cpp
index 605b66dc74b..10cbd4df372 100644
--- a/src/mame/machine/bk.cpp
+++ b/src/mame/machine/bk.cpp
@@ -17,7 +17,7 @@
TIMER_CALLBACK_MEMBER(bk_state::keyboard_callback)
{
- UINT8 code, i, j;
+ uint8_t code, i, j;
static const char *const keynames[] = {
"LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6",
"LINE7", "LINE8", "LINE9", "LINE10", "LINE11"
@@ -102,7 +102,7 @@ READ16_MEMBER(bk_state::bk_vid_scrool_r)
READ16_MEMBER(bk_state::bk_key_press_r)
{
double level = m_cassette->input();
- UINT16 cas;
+ uint16_t cas;
if (level < 0)
{
cas = 0x00;
diff --git a/src/mame/machine/bonzeadv.cpp b/src/mame/machine/bonzeadv.cpp
index b2bec33c7e1..fe49790ca32 100644
--- a/src/mame/machine/bonzeadv.cpp
+++ b/src/mame/machine/bonzeadv.cpp
@@ -28,17 +28,17 @@
struct cchip_mapping
{
- UINT16 xmin;
- UINT16 xmax;
- UINT16 ymin;
- UINT16 ymax;
- UINT16 sx;
- UINT16 sy;
- UINT16 px;
- UINT16 py;
+ uint16_t xmin;
+ uint16_t xmax;
+ uint16_t ymin;
+ uint16_t ymax;
+ uint16_t sx;
+ uint16_t sy;
+ uint16_t px;
+ uint16_t py;
};
-static const UINT16 CLEV[][13] =
+static const uint16_t CLEV[][13] =
{
/* map start player start player y-range player x-range map y-range map x-range time */
{ 0x0000, 0x0018, 0x0020, 0x0030, 0x0028, 0x00D0, 0x0050, 0x0090, 0x0000, 0x0118, 0x0000, 0x0C90, 0x3800 },
@@ -310,7 +310,7 @@ void asuka_state::WriteLevelData()
for (i = 0; i < 13; i++)
{
- UINT16 v = CLEV[m_current_round][i];
+ uint16_t v = CLEV[m_current_round][i];
m_cval[2 * i + 0] = v & 0xff;
m_cval[2 * i + 1] = v >> 8;
diff --git a/src/mame/machine/btime.cpp b/src/mame/machine/btime.cpp
index fb70d3419bc..02f653948b0 100644
--- a/src/mame/machine/btime.cpp
+++ b/src/mame/machine/btime.cpp
@@ -8,7 +8,7 @@
READ8_MEMBER(btime_state::mmonkey_protection_r)
{
- UINT8 *RAM = memregion("maincpu")->base();
+ uint8_t *RAM = memregion("maincpu")->base();
int ret = 0;
if (offset == 0x0000)
@@ -25,7 +25,7 @@ READ8_MEMBER(btime_state::mmonkey_protection_r)
WRITE8_MEMBER(btime_state::mmonkey_protection_w)
{
- UINT8 *RAM = memregion("maincpu")->base();
+ uint8_t *RAM = memregion("maincpu")->base();
if (offset == 0)
{
diff --git a/src/mame/machine/bublbobl.cpp b/src/mame/machine/bublbobl.cpp
index 1b9a288e153..2e66aad50ff 100644
--- a/src/mame/machine/bublbobl.cpp
+++ b/src/mame/machine/bublbobl.cpp
@@ -57,7 +57,7 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_nmitrigger_w)
}
-static const UINT8 tokio_prot_data[] =
+static const uint8_t tokio_prot_data[] =
{
0x6c,
0x7f,0x5f,0x7f,0x6f,0x5f,0x77,0x5f,0x7f,0x5f,0x7f,0x5f,0x7f,0x5b,0x7f,0x5f,0x7f,
diff --git a/src/mame/machine/buggychl.cpp b/src/mame/machine/buggychl.cpp
index 608189588f2..843113992b5 100644
--- a/src/mame/machine/buggychl.cpp
+++ b/src/mame/machine/buggychl.cpp
@@ -7,7 +7,7 @@
const device_type BUGGYCHL_MCU = &device_creator<buggychl_mcu_device>;
-buggychl_mcu_device::buggychl_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+buggychl_mcu_device::buggychl_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BUGGYCHL_MCU, "M68705 MCU Simulation (Buggy Challenge)", tag, owner, clock, "buggychl_mcu", __FILE__),
m_port_a_in(0),
m_port_a_out(0),
diff --git a/src/mame/machine/buggychl.h b/src/mame/machine/buggychl.h
index 7f7a3e7c1e8..ec76e77e467 100644
--- a/src/mame/machine/buggychl.h
+++ b/src/mame/machine/buggychl.h
@@ -3,7 +3,7 @@
class buggychl_mcu_device : public device_t
{
public:
- buggychl_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ buggychl_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~buggychl_mcu_device() {}
DECLARE_WRITE8_MEMBER( buggychl_mcu_w );
@@ -27,17 +27,17 @@ protected:
private:
// internal state
- UINT8 m_port_a_in;
- UINT8 m_port_a_out;
- UINT8 m_ddr_a;
- UINT8 m_port_b_in;
- UINT8 m_port_b_out;
- UINT8 m_ddr_b;
- UINT8 m_port_c_in;
- UINT8 m_port_c_out;
- UINT8 m_ddr_c;
- UINT8 m_from_main;
- UINT8 m_from_mcu;
+ uint8_t m_port_a_in;
+ uint8_t m_port_a_out;
+ uint8_t m_ddr_a;
+ uint8_t m_port_b_in;
+ uint8_t m_port_b_out;
+ uint8_t m_ddr_b;
+ uint8_t m_port_c_in;
+ uint8_t m_port_c_out;
+ uint8_t m_ddr_c;
+ uint8_t m_from_main;
+ uint8_t m_from_mcu;
int m_mcu_sent;
int m_main_sent;
device_t *m_mcu;
diff --git a/src/mame/machine/c117.cpp b/src/mame/machine/c117.cpp
index 5ca4c429074..b1d86b3ee03 100644
--- a/src/mame/machine/c117.cpp
+++ b/src/mame/machine/c117.cpp
@@ -38,7 +38,7 @@ const device_type NAMCO_C117 = &device_creator<namco_c117_device>;
// namco_c117_device - constructor
//-------------------------------------------------
-namco_c117_device::namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+namco_c117_device::namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_C117, "Namco C117 MMU", tag, owner, clock, "namco_c117", __FILE__),
device_memory_interface(mconfig, *this),
m_subres_cb(*this),
@@ -160,7 +160,7 @@ WRITE8_MEMBER(namco_c117_device::sound_watchdog_w)
}
-void namco_c117_device::register_w(int whichcpu, offs_t offset, UINT8 data)
+void namco_c117_device::register_w(int whichcpu, offs_t offset, uint8_t data)
{
int reg = (offset >> 9) & 0xf;
bool unknown_reg = false;
@@ -219,9 +219,9 @@ void namco_c117_device::register_w(int whichcpu, offs_t offset, UINT8 data)
logerror("'%s' writing to unknown CUS117 register %04X = %02X\n", (whichcpu ? m_subcpu_tag : m_maincpu_tag), offset, data);
}
-void namco_c117_device::bankswitch(int whichcpu, int whichbank, int a0, UINT8 data)
+void namco_c117_device::bankswitch(int whichcpu, int whichbank, int a0, uint8_t data)
{
- UINT32 &bank = m_offsets[whichcpu][whichbank];
+ uint32_t &bank = m_offsets[whichcpu][whichbank];
// even writes set a22-a21; odd writes set a20-a13
if (a0 == 0)
diff --git a/src/mame/machine/c117.h b/src/mame/machine/c117.h
index 7c224781c4d..1ff70089072 100644
--- a/src/mame/machine/c117.h
+++ b/src/mame/machine/c117.h
@@ -30,7 +30,7 @@ class namco_c117_device :
{
public:
//construction/destruction
- namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration
static void set_cpu_tags(device_t &device, const char *maintag, const char *subtag);
@@ -57,13 +57,13 @@ protected:
private:
// internal helpers
- void register_w(int whichcpu, offs_t offset, UINT8 data);
- void bankswitch(int whichcpu, int whichbank, int a0, UINT8 data);
+ void register_w(int whichcpu, offs_t offset, uint8_t data);
+ void bankswitch(int whichcpu, int whichbank, int a0, uint8_t data);
void kick_watchdog(int whichcpu);
// internal state
- UINT32 m_offsets[2][8];
- UINT8 m_subres, m_wdog;
+ uint32_t m_offsets[2][8];
+ uint8_t m_subres, m_wdog;
// callbacks
devcb_write_line m_subres_cb;
diff --git a/src/mame/machine/carpolo.cpp b/src/mame/machine/carpolo.cpp
index a252fe6ac42..721e23cbda1 100644
--- a/src/mame/machine/carpolo.cpp
+++ b/src/mame/machine/carpolo.cpp
@@ -89,7 +89,7 @@ WRITE_LINE_MEMBER(carpolo_state::carpolo_7474_2u_2_q_cb)
}
-void carpolo_state::carpolo_generate_ball_screen_interrupt(UINT8 cause)
+void carpolo_state::carpolo_generate_ball_screen_interrupt(uint8_t cause)
{
m_ball_screen_collision_cause = cause;
@@ -198,7 +198,7 @@ READ8_MEMBER(carpolo_state::carpolo_interrupt_cause_r)
INTERRUPT_GEN_MEMBER(carpolo_state::carpolo_timer_interrupt)
{
- UINT8 port_value;
+ uint8_t port_value;
int player;
@@ -392,7 +392,7 @@ READ8_MEMBER(carpolo_state::pia_0_port_b_r)
READ8_MEMBER(carpolo_state::pia_1_port_a_r)
{
- UINT8 ret;
+ uint8_t ret;
/* bit 0 - Player 4 steering input (left or right)
bit 1 - Player 3 steering input (left or right)
@@ -415,7 +415,7 @@ READ8_MEMBER(carpolo_state::pia_1_port_a_r)
READ8_MEMBER(carpolo_state::pia_1_port_b_r)
{
- UINT8 ret;
+ uint8_t ret;
/* bit 4 - Player 4 steering input (wheel moving or stopped)
bit 5 - Player 3 steering input (wheel moving or stopped)
diff --git a/src/mame/machine/cat702.cpp b/src/mame/machine/cat702.cpp
index 8811ac3e4a5..69f57604ca1 100644
--- a/src/mame/machine/cat702.cpp
+++ b/src/mame/machine/cat702.cpp
@@ -88,7 +88,7 @@
const device_type CAT702 = &device_creator<cat702_device>;
-cat702_device::cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+cat702_device::cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CAT702, "CAT702", tag, owner, clock, "cat702", __FILE__),
m_region(*this, DEVICE_SELF),
m_dataout_handler(*this)
@@ -124,10 +124,10 @@ void cat702_device::device_start()
// Given the value for x7..x0 and linear transform coefficients a7..a0
// compute the value of the transform
#if 0
-static int c_linear(UINT8 x, UINT8 a)
+static int c_linear(uint8_t x, uint8_t a)
{
int i;
- UINT8 r;
+ uint8_t r;
x &= a;
r = 0;
for(i=0; i<8; i++)
@@ -138,12 +138,12 @@ static int c_linear(UINT8 x, UINT8 a)
#endif
// Derive the sbox xor mask for a given input and select bit
-UINT8 cat702_device::compute_sbox_coef(int sel, int bit)
+uint8_t cat702_device::compute_sbox_coef(int sel, int bit)
{
if(!sel)
return m_transform[bit];
- UINT8 r = compute_sbox_coef((sel-1) & 7, (bit-1) & 7);
+ uint8_t r = compute_sbox_coef((sel-1) & 7, (bit-1) & 7);
r = (r << 1)|(((r >> 7)^(r >> 6)) & 1);
if(bit != 7)
return r;
@@ -155,7 +155,7 @@ UINT8 cat702_device::compute_sbox_coef(int sel, int bit)
void cat702_device::apply_bit_sbox(int sel)
{
int i;
- UINT8 r = 0;
+ uint8_t r = 0;
for(i=0; i<8; i++)
if(m_state & (1<<i))
r ^= compute_sbox_coef(sel, i);
@@ -164,10 +164,10 @@ void cat702_device::apply_bit_sbox(int sel)
}
// Apply a sbox
-void cat702_device::apply_sbox(const UINT8 *sbox)
+void cat702_device::apply_sbox(const uint8_t *sbox)
{
int i;
- UINT8 r = 0;
+ uint8_t r = 0;
for(i=0; i<8; i++)
if(m_state & (1<<i))
r ^= sbox[i];
@@ -195,7 +195,7 @@ WRITE_LINE_MEMBER(cat702_device::write_select)
WRITE_LINE_MEMBER(cat702_device::write_clock)
{
- static const UINT8 initial_sbox[8] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x7f };
+ static const uint8_t initial_sbox[8] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x7f };
if (!state && m_clock && !m_select)
{
diff --git a/src/mame/machine/cat702.h b/src/mame/machine/cat702.h
index 3ec6b57485a..bf7a2925a92 100644
--- a/src/mame/machine/cat702.h
+++ b/src/mame/machine/cat702.h
@@ -17,7 +17,7 @@ extern const device_type CAT702;
class cat702_device : public device_t
{
public:
- cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_dataout_handler(device_t &device, _Object object) { return downcast<cat702_device &>(device).m_dataout_handler.set_callback(object); }
@@ -30,18 +30,18 @@ protected:
virtual void device_start() override;
private:
- UINT8 compute_sbox_coef(int sel, int bit);
+ uint8_t compute_sbox_coef(int sel, int bit);
void apply_bit_sbox(int sel);
- void apply_sbox(const UINT8 *sbox);
+ void apply_sbox(const uint8_t *sbox);
optional_memory_region m_region;
- UINT8 m_transform[8];
+ uint8_t m_transform[8];
int m_select;
int m_clock;
int m_datain;
- UINT8 m_state;
- UINT8 m_bit;
+ uint8_t m_state;
+ uint8_t m_bit;
devcb_write_line m_dataout_handler;
};
diff --git a/src/mame/machine/cbm_snqk.cpp b/src/mame/machine/cbm_snqk.cpp
index 988575ae54e..ceb4ab67315 100644
--- a/src/mame/machine/cbm_snqk.cpp
+++ b/src/mame/machine/cbm_snqk.cpp
@@ -25,12 +25,12 @@
image_init_result general_cbm_loadsnap( device_image_interface &image, const char *file_type, int snapshot_size,
- address_space &space, offs_t offset, void (*cbm_sethiaddress)(address_space &space, UINT16 hiaddress) )
+ address_space &space, offs_t offset, void (*cbm_sethiaddress)(address_space &space, uint16_t hiaddress) )
{
char buffer[7];
- std::vector<UINT8> data;
- UINT32 bytesread;
- UINT16 address = 0;
+ std::vector<uint8_t> data;
+ uint32_t bytesread;
+ uint16_t address = 0;
int i;
if (!file_type)
@@ -87,7 +87,7 @@ error:
return image_init_result::FAIL;
}
-void cbm_quick_sethiaddress( address_space &space, UINT16 hiaddress )
+void cbm_quick_sethiaddress( address_space &space, uint16_t hiaddress )
{
space.write_byte(0xae, hiaddress & 0xff);
space.write_byte(0x31, hiaddress & 0xff);
diff --git a/src/mame/machine/cbm_snqk.h b/src/mame/machine/cbm_snqk.h
index 74ed76a134e..25fbcab989b 100644
--- a/src/mame/machine/cbm_snqk.h
+++ b/src/mame/machine/cbm_snqk.h
@@ -14,8 +14,8 @@
#define CBM_QUICKLOAD_DELAY_SECONDS 3
image_init_result general_cbm_loadsnap( device_image_interface &image, const char *file_type, int snapshot_size,
- address_space &space, offs_t offset, void (*cbm_sethiaddress)(address_space &space, UINT16 hiaddress) );
+ address_space &space, offs_t offset, void (*cbm_sethiaddress)(address_space &space, uint16_t hiaddress) );
-void cbm_quick_sethiaddress( address_space &space, UINT16 hiaddress );
+void cbm_quick_sethiaddress( address_space &space, uint16_t hiaddress );
#endif /* __CBM_SNQK_H__ */
diff --git a/src/mame/machine/cchip.cpp b/src/mame/machine/cchip.cpp
index 2149d4c0c08..2ab59e3b8ec 100644
--- a/src/mame/machine/cchip.cpp
+++ b/src/mame/machine/cchip.cpp
@@ -38,7 +38,7 @@ This code requires that the player & coin inputs be in input ports 2-4.
/* This code for sound communication is a hack, it will not be
identical to the code derived from the real c-chip */
-static const UINT8 superman_code[40] =
+static const uint8_t superman_code[40] =
{
0x48, 0xe7, 0x80, 0x80, /* MOVEM.L D0/A0,-(A7) ( Preserve Regs ) */
0x20, 0x6d, 0x1c, 0x40, /* MOVEA.L ($1C40,A5),A0 ( Load sound pointer in A0 ) */
diff --git a/src/mame/machine/cclimber.cpp b/src/mame/machine/cclimber.cpp
index 78275edb63e..e659624d970 100644
--- a/src/mame/machine/cclimber.cpp
+++ b/src/mame/machine/cclimber.cpp
@@ -6,14 +6,14 @@
/* set to 1 to fix protection check after bonus round (see notes in pacman.c driver) */
#define CANNONB_HACK 0
-void cclimber_state::cclimber_decode(const UINT8 convtable[8][16])
+void cclimber_state::cclimber_decode(const uint8_t convtable[8][16])
{
- UINT8 *rom = memregion("maincpu")->base();
+ uint8_t *rom = memregion("maincpu")->base();
for (int A = 0x0000;A < 0x6000;A++)
{
int i,j;
- UINT8 src = rom[A];
+ uint8_t src = rom[A];
/* pick the translation table from bit 0 of the address */
/* and from bits 1 7 of the source data */
@@ -29,7 +29,7 @@ void cclimber_state::cclimber_decode(const UINT8 convtable[8][16])
DRIVER_INIT_MEMBER(cclimber_state,cclimber)
{
- static const UINT8 convtable[8][16] =
+ static const uint8_t convtable[8][16] =
{
/* 0xff marks spots which are unused and therefore unknown */
{ 0x44,0x14,0x54,0x10,0x11,0x41,0x05,0x50,0x51,0x00,0x40,0x55,0x45,0x04,0x01,0x15 },
@@ -47,7 +47,7 @@ DRIVER_INIT_MEMBER(cclimber_state,cclimber)
DRIVER_INIT_MEMBER(cclimber_state,cclimberj)
{
- static const UINT8 convtable[8][16] =
+ static const uint8_t convtable[8][16] =
{
{ 0x41,0x54,0x51,0x14,0x05,0x10,0x01,0x55,0x44,0x11,0x00,0x50,0x15,0x40,0x04,0x45 },
{ 0x50,0x11,0x40,0x55,0x51,0x14,0x45,0x04,0x54,0x15,0x10,0x05,0x44,0x01,0x00,0x41 },
@@ -65,7 +65,7 @@ DRIVER_INIT_MEMBER(cclimber_state,cclimberj)
DRIVER_INIT_MEMBER(cclimber_state,ckongb)
{
int A;
- UINT8 *rom = memregion("maincpu")->base();
+ uint8_t *rom = memregion("maincpu")->base();
for (A = 0x0000;A < 0x6000;A++) /* all the program ROMs are encrypted */
{
@@ -76,7 +76,7 @@ DRIVER_INIT_MEMBER(cclimber_state,ckongb)
#if CANNONB_HACK
void ::cannonb_patch()
{
- UINT8 *rom = memregion("maincpu")->base();
+ uint8_t *rom = memregion("maincpu")->base();
rom[0x2ba0] = 0x21;
rom[0x2ba1] = 0xfb;
@@ -88,13 +88,13 @@ void ::cannonb_patch()
DRIVER_INIT_MEMBER(cclimber_state,cannonb)
{
int A;
- UINT8 *rom = memregion("maincpu")->base();
+ uint8_t *rom = memregion("maincpu")->base();
for (A = 0x0000;A < 0x1000;A++) /* only first ROM is encrypted */
{
- UINT8 src;
+ uint8_t src;
int i;
- static const UINT8 xor_tab[4] ={0x92, 0x82, 0x12, 0x10};
+ static const uint8_t xor_tab[4] ={0x92, 0x82, 0x12, 0x10};
src = rom[A+0x10000];
diff --git a/src/mame/machine/cdi070.cpp b/src/mame/machine/cdi070.cpp
index 4bbb0e26aa5..6f4bfbbd3b5 100644
--- a/src/mame/machine/cdi070.cpp
+++ b/src/mame/machine/cdi070.cpp
@@ -54,7 +54,7 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t& device, int n_level, co
// cdi68070_device - constructor
//-------------------------------------------------
-cdi68070_device::cdi68070_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cdi68070_device::cdi68070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MACHINE_CDI68070, "CDI68070", tag, owner, clock, "cdi68070", __FILE__)
{
}
@@ -210,8 +210,8 @@ void cdi68070_device::device_reset()
m_mmu.desc[index].base = 0;
}
- memset(m_seeds, 0, 10 * sizeof(UINT16));
- memset(m_state, 0, 8 * sizeof(UINT8));
+ memset(m_seeds, 0, 10 * sizeof(uint16_t));
+ memset(m_state, 0, 8 * sizeof(uint8_t));
m_mcu_value = 0;
m_mcu_ack = 0;
}
@@ -222,7 +222,7 @@ void cdi68070_device::set_timer_callback(int channel)
{
case 0:
{
- UINT32 compare = 0x10000 - m_timers.timer0;
+ uint32_t compare = 0x10000 - m_timers.timer0;
attotime period = attotime::from_hz(CLOCK_A/192) * compare;
m_timers.timer0_timer->adjust(period);
break;
@@ -234,12 +234,12 @@ void cdi68070_device::set_timer_callback(int channel)
}
}
-void cdi68070_device::set_quizard_mcu_ack(UINT8 ack)
+void cdi68070_device::set_quizard_mcu_ack(uint8_t ack)
{
m_mcu_ack = ack;
}
-void cdi68070_device::set_quizard_mcu_value(UINT16 value)
+void cdi68070_device::set_quizard_mcu_value(uint16_t value)
{
m_mcu_value = value;
}
@@ -252,7 +252,7 @@ TIMER_CALLBACK_MEMBER( cdi68070_device::timer0_callback )
m_timers.timer_status_register |= TSR_OV0;
if(m_picr1 & 7)
{
- UINT8 interrupt = m_picr1 & 7;
+ uint8_t interrupt = m_picr1 & 7;
m_timers.timer_status_register |= TSR_OV0;
if(interrupt)
{
@@ -268,7 +268,7 @@ void cdi68070_device::uart_rx_check()
{
if((m_uart.command_register & 3) == 1)
{
- UINT32 div = 0x10000 >> ((m_uart.clock_select >> 4) & 7);
+ uint32_t div = 0x10000 >> ((m_uart.clock_select >> 4) & 7);
m_uart.rx_timer->adjust(attotime::from_hz((49152000 / div) / 8));
}
else
@@ -293,7 +293,7 @@ void cdi68070_device::uart_tx_check()
if(m_uart.tx_timer->remaining() == attotime::never)
{
- UINT32 div = 0x10000 >> (m_uart.clock_select & 7);
+ uint32_t div = 0x10000 >> (m_uart.clock_select & 7);
m_uart.tx_timer->adjust(attotime::from_hz((49152000 / div) / 8));
}
}
@@ -303,14 +303,14 @@ void cdi68070_device::uart_tx_check()
}
}
-void cdi68070_device::uart_rx(UINT8 data)
+void cdi68070_device::uart_rx(uint8_t data)
{
m_uart.receive_pointer++;
m_uart.receive_buffer[m_uart.receive_pointer] = data;
uart_rx_check();
}
-void cdi68070_device::uart_tx(UINT8 data)
+void cdi68070_device::uart_tx(uint8_t data)
{
m_uart.transmit_pointer++;
m_uart.transmit_buffer[m_uart.transmit_pointer] = data;
@@ -338,7 +338,7 @@ TIMER_CALLBACK_MEMBER( cdi68070_device::rx_callback )
{
verboselog(*this, 2, "scc68070_rx_callback: Receiving %02x\n", m_uart.receive_holding_register);
- UINT8 interrupt = (m_picr2 >> 4) & 7;
+ uint8_t interrupt = (m_picr2 >> 4) & 7;
if(interrupt)
{
state->m_maincpu->set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt);
@@ -346,7 +346,7 @@ TIMER_CALLBACK_MEMBER( cdi68070_device::rx_callback )
}
m_uart.status_register |= USR_RXRDY;
- UINT32 div = 0x10000 >> ((m_uart.clock_select >> 4) & 7);
+ uint32_t div = 0x10000 >> ((m_uart.clock_select >> 4) & 7);
m_uart.rx_timer->adjust(attotime::from_hz((49152000 / div) / 8));
}
else
@@ -362,13 +362,13 @@ TIMER_CALLBACK_MEMBER( cdi68070_device::rx_callback )
uart_rx_check();
}
-void cdi68070_device::quizard_rx(UINT8 data)
+void cdi68070_device::quizard_rx(uint8_t data)
{
uart_rx(0x5a);
uart_rx(data);
}
-void cdi68070_device::quizard_set_seeds(UINT8 *rx)
+void cdi68070_device::quizard_set_seeds(uint8_t *rx)
{
m_seeds[0] = (rx[1] << 8) | rx[0];
m_seeds[1] = (rx[3] << 8) | rx[2];
@@ -384,12 +384,12 @@ void cdi68070_device::quizard_set_seeds(UINT8 *rx)
void cdi68070_device::quizard_calculate_state()
{
- //const UINT16 desired_bitfield = mcu_value;
- const UINT16 field0 = 0x00ff;
- const UINT16 field1 = m_mcu_value ^ 0x00ff;
+ //const uint16_t desired_bitfield = mcu_value;
+ const uint16_t field0 = 0x00ff;
+ const uint16_t field1 = m_mcu_value ^ 0x00ff;
- UINT16 total0 = 0;
- UINT16 total1 = 0;
+ uint16_t total0 = 0;
+ uint16_t total1 = 0;
for(int index = 0; index < 10; index++)
{
@@ -403,19 +403,19 @@ void cdi68070_device::quizard_calculate_state()
}
}
- UINT16 hi0 = (total0 >> 8) + 0x40;
+ uint16_t hi0 = (total0 >> 8) + 0x40;
m_state[2] = hi0 / 2;
m_state[3] = hi0 - m_state[2];
- UINT16 lo0 = (total0 & 0x00ff) + 0x40;
+ uint16_t lo0 = (total0 & 0x00ff) + 0x40;
m_state[0] = lo0 / 2;
m_state[1] = lo0 - m_state[0];
- UINT16 hi1 = (total1 >> 8) + 0x40;
+ uint16_t hi1 = (total1 >> 8) + 0x40;
m_state[6] = hi1 / 2;
m_state[7] = hi1 - m_state[6];
- UINT16 lo1 = (total1 & 0x00ff) + 0x40;
+ uint16_t lo1 = (total1 & 0x00ff) + 0x40;
m_state[4] = lo1 / 2;
m_state[5] = lo1 - m_state[4];
}
@@ -436,9 +436,9 @@ void cdi68070_device::mcu_frame()
void cdi68070_device::quizard_handle_byte_tx()
{
static int state = 0;
- static UINT8 rx[0x100];
- static UINT8 rx_ptr = 0xff;
- UINT8 tx = m_uart.transmit_holding_register;
+ static uint8_t rx[0x100];
+ static uint8_t rx_ptr = 0xff;
+ uint8_t tx = m_uart.transmit_holding_register;
switch(state)
{
@@ -535,7 +535,7 @@ TIMER_CALLBACK_MEMBER( cdi68070_device::tx_callback )
if(((m_uart.command_register >> 2) & 3) == 1)
{
- UINT8 interrupt = m_picr2 & 7;
+ uint8_t interrupt = m_picr2 & 7;
if(interrupt)
{
state->m_maincpu->set_input_line_vector(M68K_IRQ_1 + (interrupt - 1), 56 + interrupt);
@@ -554,7 +554,7 @@ TIMER_CALLBACK_MEMBER( cdi68070_device::tx_callback )
}
m_uart.transmit_pointer--;
- UINT32 div = 0x10000 >> (m_uart.clock_select & 7);
+ uint32_t div = 0x10000 >> (m_uart.clock_select & 7);
m_uart.tx_timer->adjust(attotime::from_hz((49152000 / div) / 8));
}
else
@@ -993,7 +993,7 @@ WRITE16_MEMBER( cdi68070_device::periphs_w )
m_timers.timer_status_register &= ~(data >> 8);
if(!m_timers.timer_status_register)
{
- UINT8 interrupt = m_picr1 & 7;
+ uint8_t interrupt = m_picr1 & 7;
state->m_maincpu->set_input_line(M68K_IRQ_1 + (interrupt - 1), CLEAR_LINE);
}
}
diff --git a/src/mame/machine/cdi070.h b/src/mame/machine/cdi070.h
index 7f3cff2d905..2d944e3609c 100644
--- a/src/mame/machine/cdi070.h
+++ b/src/mame/machine/cdi070.h
@@ -140,16 +140,16 @@ class cdi68070_device : public device_t
{
public:
// construction/destruction
- cdi68070_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cdi68070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// external callbacks
- void uart_rx(UINT8 data);
- void uart_tx(UINT8 data);
+ void uart_rx(uint8_t data);
+ void uart_tx(uint8_t data);
// UART Access for Quizard
- void set_quizard_mcu_value(UINT16 value);
- void set_quizard_mcu_ack(UINT8 ack);
- void quizard_rx(UINT8 data);
+ void set_quizard_mcu_value(uint16_t value);
+ void set_quizard_mcu_ack(uint8_t ack);
+ void quizard_rx(uint8_t data);
void mcu_frame();
@@ -163,76 +163,76 @@ public:
// register structures
struct i2c_regs_t
{
- UINT8 reserved0;
- UINT8 data_register;
- UINT8 reserved1;
- UINT8 address_register;
- UINT8 reserved2;
- UINT8 status_register;
- UINT8 reserved3;
- UINT8 control_register;
- UINT8 reserved;
- UINT8 clock_control_register;
+ uint8_t reserved0;
+ uint8_t data_register;
+ uint8_t reserved1;
+ uint8_t address_register;
+ uint8_t reserved2;
+ uint8_t status_register;
+ uint8_t reserved3;
+ uint8_t control_register;
+ uint8_t reserved;
+ uint8_t clock_control_register;
};
struct uart_regs_t
{
- UINT8 reserved0;
- UINT8 mode_register;
- UINT8 reserved1;
- UINT8 status_register;
- UINT8 reserved2;
- UINT8 clock_select;
- UINT8 reserved3;
- UINT8 command_register;
- UINT8 reserved4;
- UINT8 transmit_holding_register;
- UINT8 reserved5;
- UINT8 receive_holding_register;
-
- INT16 receive_pointer;
- UINT8 receive_buffer[32768];
+ uint8_t reserved0;
+ uint8_t mode_register;
+ uint8_t reserved1;
+ uint8_t status_register;
+ uint8_t reserved2;
+ uint8_t clock_select;
+ uint8_t reserved3;
+ uint8_t command_register;
+ uint8_t reserved4;
+ uint8_t transmit_holding_register;
+ uint8_t reserved5;
+ uint8_t receive_holding_register;
+
+ int16_t receive_pointer;
+ uint8_t receive_buffer[32768];
emu_timer* rx_timer;
- INT16 transmit_pointer;
- UINT8 transmit_buffer[32768];
+ int16_t transmit_pointer;
+ uint8_t transmit_buffer[32768];
emu_timer* tx_timer;
};
struct timer_regs_t
{
- UINT8 timer_status_register;
- UINT8 timer_control_register;
- UINT16 reload_register;
- UINT16 timer0;
- UINT16 timer1;
- UINT16 timer2;
+ uint8_t timer_status_register;
+ uint8_t timer_control_register;
+ uint16_t reload_register;
+ uint16_t timer0;
+ uint16_t timer1;
+ uint16_t timer2;
emu_timer* timer0_timer;
};
struct dma_channel_t
{
- UINT8 channel_status;
- UINT8 channel_error;
+ uint8_t channel_status;
+ uint8_t channel_error;
- UINT8 reserved0[2];
+ uint8_t reserved0[2];
- UINT8 device_control;
- UINT8 operation_control;
- UINT8 sequence_control;
- UINT8 channel_control;
+ uint8_t device_control;
+ uint8_t operation_control;
+ uint8_t sequence_control;
+ uint8_t channel_control;
- UINT8 reserved1[3];
+ uint8_t reserved1[3];
- UINT16 transfer_counter;
+ uint16_t transfer_counter;
- UINT32 memory_address_counter;
+ uint32_t memory_address_counter;
- UINT8 reserved2[4];
+ uint8_t reserved2[4];
- UINT32 device_address_counter;
+ uint32_t device_address_counter;
- UINT8 reserved3[40];
+ uint8_t reserved3[40];
};
struct dma_regs_t
@@ -242,26 +242,26 @@ public:
struct mmu_desc_t
{
- UINT16 attr;
- UINT16 length;
- UINT8 undefined;
- UINT8 segment;
- UINT16 base;
+ uint16_t attr;
+ uint16_t length;
+ uint8_t undefined;
+ uint8_t segment;
+ uint16_t base;
};
struct mmu_regs_t
{
- UINT8 status;
- UINT8 control;
+ uint8_t status;
+ uint8_t control;
- UINT8 reserved[0x3e];
+ uint8_t reserved[0x3e];
mmu_desc_t desc[8];
};
dma_regs_t& dma() { return m_dma; }
- UINT16 get_lir() { return m_lir; }
+ uint16_t get_lir() { return m_lir; }
protected:
// device-level overrides
@@ -275,15 +275,15 @@ private:
void set_timer_callback(int channel);
// internal state
- UINT16 m_seeds[10];
- UINT8 m_state[8];
+ uint16_t m_seeds[10];
+ uint8_t m_state[8];
- UINT16 m_mcu_value;
- UINT8 m_mcu_ack;
+ uint16_t m_mcu_value;
+ uint8_t m_mcu_ack;
- UINT16 m_lir;
- UINT8 m_picr1;
- UINT8 m_picr2;
+ uint16_t m_lir;
+ uint8_t m_picr1;
+ uint8_t m_picr2;
i2c_regs_t m_i2c;
uart_regs_t m_uart;
@@ -293,7 +293,7 @@ private:
// non-static internal members
void quizard_calculate_state();
- void quizard_set_seeds(UINT8 *rx);
+ void quizard_set_seeds(uint8_t *rx);
void quizard_handle_byte_tx();
};
diff --git a/src/mame/machine/cdicdic.cpp b/src/mame/machine/cdicdic.cpp
index bc01d5a6164..a5c5628c6cf 100644
--- a/src/mame/machine/cdicdic.cpp
+++ b/src/mame/machine/cdicdic.cpp
@@ -86,7 +86,7 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t& device, int n_level, co
// GLOBAL VARIABLES
//**************************************************************************
-const INT32 cdicdic_device::s_cdic_adpcm_filter_coef[5][2] =
+const int32_t cdicdic_device::s_cdic_adpcm_filter_coef[5][2] =
{
{ 0,0 },
{ 60,0 },
@@ -99,9 +99,9 @@ const INT32 cdicdic_device::s_cdic_adpcm_filter_coef[5][2] =
// INLINES
//**************************************************************************
-static inline int CDIC_IS_VALID_SAMPLE_BUF(UINT16 *cdram, UINT16 addr)
+static inline int CDIC_IS_VALID_SAMPLE_BUF(uint16_t *cdram, uint16_t addr)
{
- UINT8 *cdram8 = ((UINT8*)cdram) + addr + 8;
+ uint8_t *cdram8 = ((uint8_t*)cdram) + addr + 8;
if(cdram8[2] != 0xff)
{
return 1;
@@ -109,9 +109,9 @@ static inline int CDIC_IS_VALID_SAMPLE_BUF(UINT16 *cdram, UINT16 addr)
return 0;
}
-static inline double CDIC_SAMPLE_BUF_FREQ(UINT16 *cdram, UINT16 addr)
+static inline double CDIC_SAMPLE_BUF_FREQ(uint16_t *cdram, uint16_t addr)
{
- UINT8 *cdram8 = ((UINT8*)cdram) + addr + 8;
+ uint8_t *cdram8 = ((uint8_t*)cdram) + addr + 8;
switch(cdram8[2] & 0x3f)
{
case 0:
@@ -129,9 +129,9 @@ static inline double CDIC_SAMPLE_BUF_FREQ(UINT16 *cdram, UINT16 addr)
}
}
-static inline int CDIC_SAMPLE_BUF_SIZE(UINT16 *cdram, UINT16 addr)
+static inline int CDIC_SAMPLE_BUF_SIZE(uint16_t *cdram, uint16_t addr)
{
- UINT8 *cdram8 = ((UINT8*)cdram) + addr + 8;
+ uint8_t *cdram8 = ((uint8_t*)cdram) + addr + 8;
switch(cdram8[2] & 0x3f)
{
case 0:
@@ -151,7 +151,7 @@ static inline int CDIC_SAMPLE_BUF_SIZE(UINT16 *cdram, UINT16 addr)
}
}
-static inline INT16 clamp(INT16 in)
+static inline int16_t clamp(int16_t in)
{
return in;
}
@@ -160,16 +160,16 @@ static inline INT16 clamp(INT16 in)
// MEMBER FUNCTIONS
//**************************************************************************
-UINT32 cdicdic_device::increment_cdda_frame_bcd(UINT32 bcd)
+uint32_t cdicdic_device::increment_cdda_frame_bcd(uint32_t bcd)
{
- UINT8 nybbles[6] =
+ uint8_t nybbles[6] =
{
- static_cast<UINT8>(bcd & 0x0000000f),
- static_cast<UINT8>((bcd & 0x000000f0) >> 4),
- static_cast<UINT8>((bcd & 0x00000f00) >> 8),
- static_cast<UINT8>((bcd & 0x0000f000) >> 12),
- static_cast<UINT8>((bcd & 0x000f0000) >> 16),
- static_cast<UINT8>((bcd & 0x00f00000) >> 20)
+ static_cast<uint8_t>(bcd & 0x0000000f),
+ static_cast<uint8_t>((bcd & 0x000000f0) >> 4),
+ static_cast<uint8_t>((bcd & 0x00000f00) >> 8),
+ static_cast<uint8_t>((bcd & 0x0000f000) >> 12),
+ static_cast<uint8_t>((bcd & 0x000f0000) >> 16),
+ static_cast<uint8_t>((bcd & 0x00f00000) >> 20)
};
nybbles[0]++;
if(nybbles[0] == 5 && nybbles[1] == 7)
@@ -200,16 +200,16 @@ UINT32 cdicdic_device::increment_cdda_frame_bcd(UINT32 bcd)
return (nybbles[5] << 20) | (nybbles[4] << 16) | (nybbles[3] << 12) | (nybbles[2] << 8) | (nybbles[1] << 4) | nybbles[0];
}
-UINT32 cdicdic_device::increment_cdda_sector_bcd(UINT32 bcd)
+uint32_t cdicdic_device::increment_cdda_sector_bcd(uint32_t bcd)
{
- UINT8 nybbles[6] =
+ uint8_t nybbles[6] =
{
- static_cast<UINT8>(bcd & 0x0000000f),
- static_cast<UINT8>((bcd & 0x000000f0) >> 4),
- static_cast<UINT8>((bcd & 0x00000f00) >> 8),
- static_cast<UINT8>((bcd & 0x0000f000) >> 12),
- static_cast<UINT8>((bcd & 0x000f0000) >> 16),
- static_cast<UINT8>((bcd & 0x00f00000) >> 20)
+ static_cast<uint8_t>(bcd & 0x0000000f),
+ static_cast<uint8_t>((bcd & 0x000000f0) >> 4),
+ static_cast<uint8_t>((bcd & 0x00000f00) >> 8),
+ static_cast<uint8_t>((bcd & 0x0000f000) >> 12),
+ static_cast<uint8_t>((bcd & 0x000f0000) >> 16),
+ static_cast<uint8_t>((bcd & 0x00f00000) >> 20)
};
nybbles[2]++;
if(nybbles[2] == 10)
@@ -230,24 +230,24 @@ UINT32 cdicdic_device::increment_cdda_sector_bcd(UINT32 bcd)
return (nybbles[5] << 20) | (nybbles[4] << 16) | (nybbles[3] << 12) | (nybbles[2] << 8) | (nybbles[1] << 4) | nybbles[0];
}
-void cdicdic_device::decode_xa_mono(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp)
+void cdicdic_device::decode_xa_mono(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp)
{
- INT32 l0 = cdic_xa_last[0];
- INT32 l1 = cdic_xa_last[1];
+ int32_t l0 = cdic_xa_last[0];
+ int32_t l1 = cdic_xa_last[1];
- for(INT32 b = 0; b < 18; b++)
+ for(int32_t b = 0; b < 18; b++)
{
- for(INT32 s = 0; s < 4; s++)
+ for(int32_t s = 0; s < 4; s++)
{
- UINT8 flags = xa[(4 + (s << 1)) ^ 1];
- UINT8 shift = flags & 0xf;
- UINT8 filter = flags >> 4;
- INT32 f0 = s_cdic_adpcm_filter_coef[filter][0];
- INT32 f1 = s_cdic_adpcm_filter_coef[filter][1];
+ uint8_t flags = xa[(4 + (s << 1)) ^ 1];
+ uint8_t shift = flags & 0xf;
+ uint8_t filter = flags >> 4;
+ int32_t f0 = s_cdic_adpcm_filter_coef[filter][0];
+ int32_t f1 = s_cdic_adpcm_filter_coef[filter][1];
- for(INT32 i = 0; i < 28; i++)
+ for(int32_t i = 0; i < 28; i++)
{
- INT16 d = (xa[(16 + (i << 2) + s) ^ 1] & 0xf) << 12;
+ int16_t d = (xa[(16 + (i << 2) + s) ^ 1] & 0xf) << 12;
d = clamp((d >> shift) + (((l0 * f0) + (l1 * f1) + 32) >> 6));
*dp = d;
dp++;
@@ -261,9 +261,9 @@ void cdicdic_device::decode_xa_mono(INT32 *cdic_xa_last, const UINT8 *xa, INT16
f0 = s_cdic_adpcm_filter_coef[filter][0];
f1 = s_cdic_adpcm_filter_coef[filter][1];
- for(INT32 i = 0; i < 28; i++)
+ for(int32_t i = 0; i < 28; i++)
{
- INT16 d = (xa[(16 + (i << 2) + s) ^ 1] >> 4) << 12;
+ int16_t d = (xa[(16 + (i << 2) + s) ^ 1] >> 4) << 12;
d = clamp((d >> shift) + (((l0 * f0) + (l1 * f1) + 32) >> 6));
*dp = d;
dp++;
@@ -281,22 +281,22 @@ void cdicdic_device::decode_xa_mono(INT32 *cdic_xa_last, const UINT8 *xa, INT16
void cdicdic_device::decode_xa_mono8(int *cdic_xa_last, const unsigned char *xa, signed short *dp)
{
- INT32 l0 = cdic_xa_last[0];
- INT32 l1 = cdic_xa_last[1];
+ int32_t l0 = cdic_xa_last[0];
+ int32_t l1 = cdic_xa_last[1];
- for(INT32 b = 0; b < 18; b++)
+ for(int32_t b = 0; b < 18; b++)
{
- for(INT32 s = 0; s < 4; s++)
+ for(int32_t s = 0; s < 4; s++)
{
- UINT8 flags = xa[(4 + s) ^ 1];
- UINT8 shift = flags & 0xf;
- UINT8 filter = flags >> 4;
- INT32 f0 = s_cdic_adpcm_filter_coef[filter][0];
- INT32 f1 = s_cdic_adpcm_filter_coef[filter][1];
+ uint8_t flags = xa[(4 + s) ^ 1];
+ uint8_t shift = flags & 0xf;
+ uint8_t filter = flags >> 4;
+ int32_t f0 = s_cdic_adpcm_filter_coef[filter][0];
+ int32_t f1 = s_cdic_adpcm_filter_coef[filter][1];
- for(INT32 i = 0; i < 28; i++)
+ for(int32_t i = 0; i < 28; i++)
{
- INT16 d = (xa[(16 + (i << 2) + s) ^ 1] << 8);
+ int16_t d = (xa[(16 + (i << 2) + s) ^ 1] << 8);
d = clamp((d >> shift) + (((l0 * f0) + (l1 * f1) + 32) >> 6));
*dp = d;
dp++;
@@ -312,34 +312,34 @@ void cdicdic_device::decode_xa_mono8(int *cdic_xa_last, const unsigned char *xa,
cdic_xa_last[1] = l1;
}
-void cdicdic_device::decode_xa_stereo(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp)
+void cdicdic_device::decode_xa_stereo(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp)
{
- INT32 l0=cdic_xa_last[0];
- INT32 l1=cdic_xa_last[1];
- INT32 l2=cdic_xa_last[2];
- INT32 l3=cdic_xa_last[3];
+ int32_t l0=cdic_xa_last[0];
+ int32_t l1=cdic_xa_last[1];
+ int32_t l2=cdic_xa_last[2];
+ int32_t l3=cdic_xa_last[3];
- for(INT32 b = 0; b < 18; b++)
+ for(int32_t b = 0; b < 18; b++)
{
- for(INT32 s = 0; s < 4; s++)
+ for(int32_t s = 0; s < 4; s++)
{
- UINT8 flags0 = xa[(4 + (s << 1)) ^ 1];
- UINT8 shift0 = flags0 & 0xf;
- UINT8 filter0 = flags0 >> 4;
- UINT8 flags1 = xa[(5 + (s << 1)) ^ 1];
- UINT8 shift1 = flags1 & 0xf;
- UINT8 filter1 = flags1 >> 4;
-
- INT32 f0 = s_cdic_adpcm_filter_coef[filter0][0];
- INT32 f1 = s_cdic_adpcm_filter_coef[filter0][1];
- INT32 f2 = s_cdic_adpcm_filter_coef[filter1][0];
- INT32 f3 = s_cdic_adpcm_filter_coef[filter1][1];
-
- for(INT32 i = 0; i < 28; i++)
+ uint8_t flags0 = xa[(4 + (s << 1)) ^ 1];
+ uint8_t shift0 = flags0 & 0xf;
+ uint8_t filter0 = flags0 >> 4;
+ uint8_t flags1 = xa[(5 + (s << 1)) ^ 1];
+ uint8_t shift1 = flags1 & 0xf;
+ uint8_t filter1 = flags1 >> 4;
+
+ int32_t f0 = s_cdic_adpcm_filter_coef[filter0][0];
+ int32_t f1 = s_cdic_adpcm_filter_coef[filter0][1];
+ int32_t f2 = s_cdic_adpcm_filter_coef[filter1][0];
+ int32_t f3 = s_cdic_adpcm_filter_coef[filter1][1];
+
+ for(int32_t i = 0; i < 28; i++)
{
- INT16 d=xa[(16 + (i << 2) + s) ^ 1];
- INT16 d0 = (d & 0xf) << 12;
- INT16 d1 = (d >> 4) << 12;
+ int16_t d=xa[(16 + (i << 2) + s) ^ 1];
+ int16_t d0 = (d & 0xf) << 12;
+ int16_t d1 = (d >> 4) << 12;
d0 = clamp((d0 >> shift0) + (((l0 * f0) + (l1 * f1) + 32) >> 6));
*dp = d0;
dp++;
@@ -363,32 +363,32 @@ void cdicdic_device::decode_xa_stereo(INT32 *cdic_xa_last, const UINT8 *xa, INT1
cdic_xa_last[3] = l3;
}
-void cdicdic_device::decode_xa_stereo8(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp)
+void cdicdic_device::decode_xa_stereo8(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp)
{
- INT32 l0 = cdic_xa_last[0];
- INT32 l1 = cdic_xa_last[1];
- INT32 l2 = cdic_xa_last[2];
- INT32 l3 = cdic_xa_last[3];
+ int32_t l0 = cdic_xa_last[0];
+ int32_t l1 = cdic_xa_last[1];
+ int32_t l2 = cdic_xa_last[2];
+ int32_t l3 = cdic_xa_last[3];
- for(INT32 b = 0; b < 18; b++)
+ for(int32_t b = 0; b < 18; b++)
{
- for(INT32 s = 0; s < 4; s += 2)
+ for(int32_t s = 0; s < 4; s += 2)
{
- UINT8 flags0 = xa[(4 + s) ^ 1];
- UINT8 shift0 = flags0 & 0xf;
- UINT8 filter0 = flags0 >> 4;
- UINT8 flags1 = xa[(5 + s) ^ 1];
- UINT8 shift1 = flags1 & 0xf;
- UINT8 filter1 = flags1 >> 4;
- INT32 f0 = s_cdic_adpcm_filter_coef[filter0][0];
- INT32 f1 = s_cdic_adpcm_filter_coef[filter0][1];
- INT32 f2 = s_cdic_adpcm_filter_coef[filter1][0];
- INT32 f3 = s_cdic_adpcm_filter_coef[filter1][1];
-
- for(INT32 i = 0; i < 28; i++)
+ uint8_t flags0 = xa[(4 + s) ^ 1];
+ uint8_t shift0 = flags0 & 0xf;
+ uint8_t filter0 = flags0 >> 4;
+ uint8_t flags1 = xa[(5 + s) ^ 1];
+ uint8_t shift1 = flags1 & 0xf;
+ uint8_t filter1 = flags1 >> 4;
+ int32_t f0 = s_cdic_adpcm_filter_coef[filter0][0];
+ int32_t f1 = s_cdic_adpcm_filter_coef[filter0][1];
+ int32_t f2 = s_cdic_adpcm_filter_coef[filter1][0];
+ int32_t f3 = s_cdic_adpcm_filter_coef[filter1][1];
+
+ for(int32_t i = 0; i < 28; i++)
{
- INT16 d0 = (xa[(16 + (i << 2) + s + 0) ^ 1] << 8);
- INT16 d1 = (xa[(16 + (i << 2) + s + 1) ^ 1] << 8);
+ int16_t d0 = (xa[(16 + (i << 2) + s + 0) ^ 1] << 8);
+ int16_t d1 = (xa[(16 + (i << 2) + s + 1) ^ 1] << 8);
d0 = clamp((d0 >> shift0) + (((l0 * f0) + (l1 * f1) + 32) >> 6));
*dp = d0;
@@ -413,16 +413,16 @@ void cdicdic_device::decode_xa_stereo8(INT32 *cdic_xa_last, const UINT8 *xa, INT
cdic_xa_last[3] = l3;
}
-void cdicdic_device::decode_audio_sector(const UINT8 *xa, INT32 triggered)
+void cdicdic_device::decode_audio_sector(const uint8_t *xa, int32_t triggered)
{
// Get XA format from sector header
cdi_state *state = machine().driver_data<cdi_state>();
- const UINT8 *hdr = xa + 4;
- INT32 channels;
- INT32 bits = 4;
- INT32 index = 0;
- INT16 samples[18*28*16+16];
+ const uint8_t *hdr = xa + 4;
+ int32_t channels;
+ int32_t bits = 4;
+ int32_t index = 0;
+ int16_t samples[18*28*16+16];
if(hdr[2] == 0xff && triggered == 1)
{
@@ -568,7 +568,7 @@ void cdicdic_device::sample_trigger()
verboselog(*this, 0, "Hit audio_sample_trigger, with m_decode_addr == %04x, calling decode_audio_sector\n", m_decode_addr );
// Decode the data at Z+4, the same offset as a normal CD sector.
- decode_audio_sector(((UINT8*)m_ram.get()) + (m_decode_addr & 0x3ffe) + 4, 1);
+ decode_audio_sector(((uint8_t*)m_ram.get()) + (m_decode_addr & 0x3ffe) + 4, 1);
// Swap buffer positions to indicate our new buffer position at the next read
m_decode_addr ^= 0x1a00;
@@ -609,18 +609,18 @@ void cdicdic_device::process_delayed_command()
case 0x2a: // Read Mode 2
//case 0x2c: // Seek
{
- UINT8 buffer[2560] = { 0 };
- UINT32 msf = m_time >> 8;
- UINT32 lba = 0;
+ uint8_t buffer[2560] = { 0 };
+ uint32_t msf = m_time >> 8;
+ uint32_t lba = 0;
int index = 0;
- UINT8 nybbles[6] =
+ uint8_t nybbles[6] =
{
- static_cast<UINT8>(msf & 0x0000000f),
- static_cast<UINT8>((msf & 0x000000f0) >> 4),
- static_cast<UINT8>((msf & 0x00000f00) >> 8),
- static_cast<UINT8>((msf & 0x0000f000) >> 12),
- static_cast<UINT8>((msf & 0x000f0000) >> 16),
- static_cast<UINT8>((msf & 0x00f00000) >> 20)
+ static_cast<uint8_t>(msf & 0x0000000f),
+ static_cast<uint8_t>((msf & 0x000000f0) >> 4),
+ static_cast<uint8_t>((msf & 0x00000f00) >> 8),
+ static_cast<uint8_t>((msf & 0x0000f000) >> 12),
+ static_cast<uint8_t>((msf & 0x000f0000) >> 16),
+ static_cast<uint8_t>((msf & 0x00f00000) >> 20)
};
if(msf & 0x000080)
{
@@ -706,7 +706,7 @@ void cdicdic_device::process_delayed_command()
m_ram[(m_data_buffer & 5) * (0xa00/2) + (index - 6)] = (buffer[index*2] << 8) | buffer[index*2 + 1];
}
- decode_audio_sector(((UINT8*)m_ram.get()) + ((m_data_buffer & 5) * 0xa00 + 4), 0);
+ decode_audio_sector(((uint8_t*)m_ram.get()) + ((m_data_buffer & 5) * 0xa00 + 4), 0);
//printf( "Setting CDIC interrupt line\n" );
verboselog(*this, 0, "%s", "Setting CDIC interrupt line for audio sector\n" );
@@ -776,23 +776,23 @@ void cdicdic_device::process_delayed_command()
case 0x28: // Play CDDA audio
{
- UINT8 buffer[2560] = { 0 };
+ uint8_t buffer[2560] = { 0 };
int index = 0;
- UINT32 msf = (m_time & 0xffff7f00) >> 8;
- UINT32 next_msf = increment_cdda_frame_bcd((m_time & 0xffff7f00) >> 8);
- UINT32 rounded_next_msf = increment_cdda_sector_bcd((m_time & 0xffff0000) >> 8);
- UINT32 lba = 0;
-// UINT32 next_lba = 0;
- UINT8 nybbles[6] =
+ uint32_t msf = (m_time & 0xffff7f00) >> 8;
+ uint32_t next_msf = increment_cdda_frame_bcd((m_time & 0xffff7f00) >> 8);
+ uint32_t rounded_next_msf = increment_cdda_sector_bcd((m_time & 0xffff0000) >> 8);
+ uint32_t lba = 0;
+// uint32_t next_lba = 0;
+ uint8_t nybbles[6] =
{
- static_cast<UINT8>(msf & 0x0000000f),
- static_cast<UINT8>((msf & 0x000000f0) >> 4),
- static_cast<UINT8>((msf & 0x00000f00) >> 8),
- static_cast<UINT8>((msf & 0x0000f000) >> 12),
- static_cast<UINT8>((msf & 0x000f0000) >> 16),
- static_cast<UINT8>((msf & 0x00f00000) >> 20)
+ static_cast<uint8_t>(msf & 0x0000000f),
+ static_cast<uint8_t>((msf & 0x000000f0) >> 4),
+ static_cast<uint8_t>((msf & 0x00000f00) >> 8),
+ static_cast<uint8_t>((msf & 0x0000f000) >> 12),
+ static_cast<uint8_t>((msf & 0x000f0000) >> 16),
+ static_cast<uint8_t>((msf & 0x00f00000) >> 20)
};
-/* UINT8 next_nybbles[6] =
+/* uint8_t next_nybbles[6] =
{
rounded_next_msf & 0x0000000f,
(rounded_next_msf & 0x000000f0) >> 4,
@@ -850,19 +850,19 @@ void cdicdic_device::process_delayed_command()
}
case 0x2c: // Seek
{
- UINT8 buffer[2560] = { 0 };
+ uint8_t buffer[2560] = { 0 };
int index = 0;
- UINT32 msf = (m_time & 0xffff7f00) >> 8;
- UINT32 next_msf = increment_cdda_frame_bcd((m_time & 0xffff7f00) >> 8);
- UINT32 lba = 0;
- UINT8 nybbles[6] =
+ uint32_t msf = (m_time & 0xffff7f00) >> 8;
+ uint32_t next_msf = increment_cdda_frame_bcd((m_time & 0xffff7f00) >> 8);
+ uint32_t lba = 0;
+ uint8_t nybbles[6] =
{
- static_cast<UINT8>(msf & 0x0000000f),
- static_cast<UINT8>((msf & 0x000000f0) >> 4),
- static_cast<UINT8>((msf & 0x00000f00) >> 8),
- static_cast<UINT8>((msf & 0x0000f000) >> 12),
- static_cast<UINT8>((msf & 0x000f0000) >> 16),
- static_cast<UINT8>((msf & 0x00f00000) >> 20)
+ static_cast<uint8_t>(msf & 0x0000000f),
+ static_cast<uint8_t>((msf & 0x000000f0) >> 4),
+ static_cast<uint8_t>((msf & 0x00000f00) >> 8),
+ static_cast<uint8_t>((msf & 0x0000f000) >> 12),
+ static_cast<uint8_t>((msf & 0x000f0000) >> 16),
+ static_cast<uint8_t>((msf & 0x00f00000) >> 20)
};
lba = nybbles[0] + nybbles[1]*10 + ((nybbles[2] + nybbles[3]*10)*75) + ((nybbles[4] + nybbles[5]*10)*75*60);
@@ -905,7 +905,7 @@ void cdicdic_device::process_delayed_command()
READ16_MEMBER( cdicdic_device::regs_r )
{
cdi_state *state = machine().driver_data<cdi_state>();
- UINT32 addr = offset + 0x3c00/2;
+ uint32_t addr = offset + 0x3c00/2;
switch(addr)
{
@@ -918,7 +918,7 @@ READ16_MEMBER( cdicdic_device::regs_r )
return m_time >> 16;
case 0x3c04/2: // Time register (LSW)
- verboselog(*this, 0, "cdic_r: Time Register (LSW) = %04x & %04x\n", (UINT16)(m_time & 0x0000ffff), mem_mask);
+ verboselog(*this, 0, "cdic_r: Time Register (LSW) = %04x & %04x\n", (uint16_t)(m_time & 0x0000ffff), mem_mask);
return m_time & 0x0000ffff;
case 0x3c06/2: // File register
@@ -939,7 +939,7 @@ READ16_MEMBER( cdicdic_device::regs_r )
case 0x3ff4/2: // ABUF
{
- UINT16 temp = m_audio_buffer;
+ uint16_t temp = m_audio_buffer;
m_audio_buffer &= 0x7fff;
if(!((m_audio_buffer | m_x_buffer) & 0x8000))
{
@@ -953,7 +953,7 @@ READ16_MEMBER( cdicdic_device::regs_r )
case 0x3ff6/2: // XBUF
{
- UINT16 temp = m_x_buffer;
+ uint16_t temp = m_x_buffer;
m_x_buffer &= 0x7fff;
if(!((m_audio_buffer | m_x_buffer) & 0x8000))
{
@@ -990,7 +990,7 @@ WRITE16_MEMBER( cdicdic_device::regs_w )
{
cdi_state *state = machine().driver_data<cdi_state>();
- UINT32 addr = offset + 0x3c00/2;
+ uint32_t addr = offset + 0x3c00/2;
switch(addr)
{
@@ -1045,11 +1045,11 @@ WRITE16_MEMBER( cdicdic_device::regs_w )
case 0x3ff8/2:
{
- UINT32 start = state->m_scc->dma().channel[0].memory_address_counter;
- UINT32 count = state->m_scc->dma().channel[0].transfer_counter;
- UINT32 index = 0;
- UINT32 device_index = (data & 0x3fff) >> 1;
- UINT16 *memory = state->m_planea;
+ uint32_t start = state->m_scc->dma().channel[0].memory_address_counter;
+ uint32_t count = state->m_scc->dma().channel[0].transfer_counter;
+ uint32_t index = 0;
+ uint32_t device_index = (data & 0x3fff) >> 1;
+ uint16_t *memory = state->m_planea;
verboselog(*this, 0, "memory address counter: %08x\n", state->m_scc->dma().channel[0].memory_address_counter);
verboselog(*this, 0, "cdic_w: DMA Control Register = %04x & %04x\n", data, mem_mask);
verboselog(*this, 0, "Doing copy, transferring %04x bytes\n", count * 2 );
@@ -1161,7 +1161,7 @@ WRITE16_MEMBER( cdicdic_device::regs_w )
// cdicdic_device - constructor
//-------------------------------------------------
-cdicdic_device::cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cdicdic_device::cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MACHINE_CDICDIC, "CDICDIC", tag, owner, clock, "cdicdic", __FILE__)
{
}
@@ -1193,7 +1193,7 @@ void cdicdic_device::device_start()
m_audio_sample_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cdicdic_device::audio_sample_trigger), this));
m_audio_sample_timer->adjust(attotime::never);
- m_ram = std::make_unique<UINT16[]>(0x3c00/2);
+ m_ram = std::make_unique<uint16_t[]>(0x3c00/2);
}
//-------------------------------------------------
diff --git a/src/mame/machine/cdicdic.h b/src/mame/machine/cdicdic.h
index 33ca053e066..7663dd33fcf 100644
--- a/src/mame/machine/cdicdic.h
+++ b/src/mame/machine/cdicdic.h
@@ -51,7 +51,7 @@ class cdicdic_device : public device_t
{
public:
// construction/destruction
- cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// non-static internal members
void sample_trigger();
@@ -74,45 +74,45 @@ protected:
private:
// internal state
- UINT16 m_command; // CDIC Command Register (0x303c00)
- UINT32 m_time; // CDIC Time Register (0x303c02)
- UINT16 m_file; // CDIC File Register (0x303c06)
- UINT32 m_channel; // CDIC Channel Register (0x303c08)
- UINT16 m_audio_channel; // CDIC Audio Channel Register (0x303c0c)
-
- UINT16 m_audio_buffer; // CDIC Audio Buffer Register (0x303ff4)
- UINT16 m_x_buffer; // CDIC X-Buffer Register (0x303ff6)
- UINT16 m_dma_control; // CDIC DMA Control Register (0x303ff8)
- UINT16 m_z_buffer; // CDIC Z-Buffer Register (0x303ffa)
- UINT16 m_interrupt_vector; // CDIC Interrupt Vector Register (0x303ffc)
- UINT16 m_data_buffer; // CDIC Data Buffer Register (0x303ffe)
+ uint16_t m_command; // CDIC Command Register (0x303c00)
+ uint32_t m_time; // CDIC Time Register (0x303c02)
+ uint16_t m_file; // CDIC File Register (0x303c06)
+ uint32_t m_channel; // CDIC Channel Register (0x303c08)
+ uint16_t m_audio_channel; // CDIC Audio Channel Register (0x303c0c)
+
+ uint16_t m_audio_buffer; // CDIC Audio Buffer Register (0x303ff4)
+ uint16_t m_x_buffer; // CDIC X-Buffer Register (0x303ff6)
+ uint16_t m_dma_control; // CDIC DMA Control Register (0x303ff8)
+ uint16_t m_z_buffer; // CDIC Z-Buffer Register (0x303ffa)
+ uint16_t m_interrupt_vector; // CDIC Interrupt Vector Register (0x303ffc)
+ uint16_t m_data_buffer; // CDIC Data Buffer Register (0x303ffe)
emu_timer *m_interrupt_timer;
cdrom_file *m_cd;
emu_timer *m_audio_sample_timer;
- INT32 m_audio_sample_freq;
- INT32 m_audio_sample_size;
+ int32_t m_audio_sample_freq;
+ int32_t m_audio_sample_size;
- UINT16 m_decode_addr;
- UINT8 m_decode_delay;
+ uint16_t m_decode_addr;
+ uint8_t m_decode_delay;
attotime m_decode_period;
int m_xa_last[4];
- std::unique_ptr<UINT16[]> m_ram;
+ std::unique_ptr<uint16_t[]> m_ram;
// static internal members
- static void decode_xa_mono(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp);
- static void decode_xa_mono8(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp);
- static void decode_xa_stereo(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp);
- static void decode_xa_stereo8(INT32 *cdic_xa_last, const UINT8 *xa, INT16 *dp);
+ static void decode_xa_mono(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp);
+ static void decode_xa_mono8(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp);
+ static void decode_xa_stereo(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp);
+ static void decode_xa_stereo8(int32_t *cdic_xa_last, const uint8_t *xa, int16_t *dp);
- static const INT32 s_cdic_adpcm_filter_coef[5][2];
+ static const int32_t s_cdic_adpcm_filter_coef[5][2];
// non-static internal members
- UINT32 increment_cdda_frame_bcd(UINT32 bcd);
- UINT32 increment_cdda_sector_bcd(UINT32 bcd);
- void decode_audio_sector(const UINT8 *xa, INT32 triggered);
+ uint32_t increment_cdda_frame_bcd(uint32_t bcd);
+ uint32_t increment_cdda_sector_bcd(uint32_t bcd);
+ void decode_audio_sector(const uint8_t *xa, int32_t triggered);
};
// device type definition
diff --git a/src/mame/machine/cdislave.cpp b/src/mame/machine/cdislave.cpp
index fbf21c839c8..23141055e59 100644
--- a/src/mame/machine/cdislave.cpp
+++ b/src/mame/machine/cdislave.cpp
@@ -62,7 +62,7 @@ TIMER_CALLBACK_MEMBER( cdislave_device::trigger_readback_int )
m_interrupt_timer->adjust(attotime::never);
}
-void cdislave_device::prepare_readback(const attotime &delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd)
+void cdislave_device::prepare_readback(const attotime &delay, uint8_t channel, uint8_t count, uint8_t data0, uint8_t data1, uint8_t data2, uint8_t data3, uint8_t cmd)
{
m_channel[channel].m_out_index = 0;
m_channel[channel].m_out_count = count;
@@ -79,12 +79,12 @@ void cdislave_device::perform_mouse_update()
{
cdi_state *state = machine().driver_data<cdi_state>();
- UINT16 x = state->m_mousex->read();
- UINT16 y = state->m_mousey->read();
- UINT8 buttons = state->m_mousebtn->read();
+ uint16_t x = state->m_mousex->read();
+ uint16_t y = state->m_mousey->read();
+ uint8_t buttons = state->m_mousebtn->read();
- UINT16 old_mouse_x = m_real_mouse_x;
- UINT16 old_mouse_y = m_real_mouse_y;
+ uint16_t old_mouse_x = m_real_mouse_x;
+ uint16_t old_mouse_y = m_real_mouse_y;
if(m_real_mouse_x == 0xffff)
{
@@ -128,7 +128,7 @@ READ16_MEMBER( cdislave_device::slave_r )
if(m_channel[offset].m_out_count)
{
- UINT8 ret = m_channel[offset].m_out_buf[m_channel[offset].m_out_index];
+ uint8_t ret = m_channel[offset].m_out_buf[m_channel[offset].m_out_index];
verboselog(*this, 0, "slave_r: Channel %d: %d, %02x\n", offset, m_channel[offset].m_out_index, ret );
if(m_channel[offset].m_out_index == 0)
{
@@ -161,7 +161,7 @@ READ16_MEMBER( cdislave_device::slave_r )
void cdislave_device::set_mouse_position()
{
-// UINT16 x, y;
+// uint16_t x, y;
//printf( "Set mouse position: %02x %02x %02x\n", m_in_buf[0], m_in_buf[1], m_in_buf[2] );
@@ -418,7 +418,7 @@ WRITE16_MEMBER( cdislave_device::slave_w )
// cdislave_device - constructor
//-------------------------------------------------
-cdislave_device::cdislave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cdislave_device::cdislave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MACHINE_CDISLAVE, "CDISLAVE", tag, owner, clock, "cdislave", __FILE__)
{
}
diff --git a/src/mame/machine/cdislave.h b/src/mame/machine/cdislave.h
index 4211574c018..29e748f9528 100644
--- a/src/mame/machine/cdislave.h
+++ b/src/mame/machine/cdislave.h
@@ -46,12 +46,12 @@ class cdislave_device : public device_t
{
public:
// construction/destruction
- cdislave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cdislave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// external callbacks
DECLARE_INPUT_CHANGED_MEMBER( mouse_update );
- UINT8* get_lcd_state() { return m_lcd_state; }
+ uint8_t* get_lcd_state() { return m_lcd_state; }
DECLARE_READ16_MEMBER( slave_r );
DECLARE_WRITE16_MEMBER( slave_w );
@@ -73,35 +73,35 @@ private:
public:
channel_state() { }
- UINT8 m_out_buf[4];
- UINT8 m_out_index;
- UINT8 m_out_count;
- UINT8 m_out_cmd;
+ uint8_t m_out_buf[4];
+ uint8_t m_out_index;
+ uint8_t m_out_count;
+ uint8_t m_out_cmd;
};
channel_state m_channel[4];
emu_timer *m_interrupt_timer;
- UINT8 m_in_buf[17];
- UINT8 m_in_index;
- UINT8 m_in_count;
+ uint8_t m_in_buf[17];
+ uint8_t m_in_index;
+ uint8_t m_in_count;
- UINT8 m_polling_active;
+ uint8_t m_polling_active;
- UINT8 m_xbus_interrupt_enable;
+ uint8_t m_xbus_interrupt_enable;
- UINT8 m_lcd_state[16];
+ uint8_t m_lcd_state[16];
- UINT16 m_real_mouse_x;
- UINT16 m_real_mouse_y;
+ uint16_t m_real_mouse_x;
+ uint16_t m_real_mouse_y;
- UINT16 m_fake_mouse_x;
- UINT16 m_fake_mouse_y;
+ uint16_t m_fake_mouse_x;
+ uint16_t m_fake_mouse_y;
// static internal members
// non-static internal members
- void prepare_readback(const attotime &delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd);
+ void prepare_readback(const attotime &delay, uint8_t channel, uint8_t count, uint8_t data0, uint8_t data1, uint8_t data2, uint8_t data3, uint8_t cmd);
void perform_mouse_update();
void set_mouse_position();
};
diff --git a/src/mame/machine/chaknpop.cpp b/src/mame/machine/chaknpop.cpp
index c6f31df3312..50c39d2aafc 100644
--- a/src/mame/machine/chaknpop.cpp
+++ b/src/mame/machine/chaknpop.cpp
@@ -12,7 +12,7 @@
/* mcu data that is extracted from the real board! */
/* updated on 2st Jun 2003 */
-static const UINT8 mcu_data[256] = {
+static const uint8_t mcu_data[256] = {
0x3a, 0xe6, 0x80, 0xc6, 0x0e, 0xdd, 0x77, 0xfd,
0x7e, 0xfe, 0x10, 0x38, 0x10, 0xdd, 0x7e, 0x03,
0xc6, 0x08, 0xdd, 0x77, 0x03, 0xdd, 0x7e, 0xff,
@@ -47,7 +47,7 @@ static const UINT8 mcu_data[256] = {
0x10, 0xfc, 0x3e, 0x01, 0x32, 0x5b, 0x81, 0xc9
};
-void chaknpop_state::mcu_update_seed( UINT8 data )
+void chaknpop_state::mcu_update_seed( uint8_t data )
{
if (!(data & 0x80))
{
@@ -87,7 +87,7 @@ READ8_MEMBER(chaknpop_state::mcu_port_c_r)
WRITE8_MEMBER(chaknpop_state::mcu_port_a_w)
{
- UINT8 mcu_command;
+ uint8_t mcu_command;
mcu_command = data + m_mcu_seed;
m_mcu_result = 0;
diff --git a/src/mame/machine/coco.cpp b/src/mame/machine/coco.cpp
index beb835077ef..84dc7a482e8 100644
--- a/src/mame/machine/coco.cpp
+++ b/src/mame/machine/coco.cpp
@@ -243,9 +243,9 @@ void coco_state::device_timer(emu_timer &timer, device_timer_id id, int param, v
// CoCo 1/2 you should get $F627 instead.
//-------------------------------------------------
-UINT8 coco_state::floating_bus_read(void)
+uint8_t coco_state::floating_bus_read(void)
{
- UINT8 result;
+ uint8_t result;
// this method calls program.read_byte() - therefore we run the risk of a stack overflow if we don't check for
// a reentrant invocation
@@ -264,11 +264,11 @@ UINT8 coco_state::floating_bus_read(void)
address_space &program = m_maincpu->space(AS_PROGRAM);
// get the previous and current PC
- UINT16 prev_pc = m_maincpu->pcbase();
- UINT16 pc = m_maincpu->pc();
+ uint16_t prev_pc = m_maincpu->pcbase();
+ uint16_t pc = m_maincpu->pc();
// get the byte; and skip over header bytes
- UINT8 byte = program.read_byte(prev_pc);
+ uint8_t byte = program.read_byte(prev_pc);
if ((byte == 0x10) || (byte == 0x11))
byte = program.read_byte(++prev_pc);
@@ -459,7 +459,7 @@ READ8_MEMBER( coco_state::pia1_pb_r )
{
// Port B: lines in output mode are handled automatically by the PIA object.
// We only need to specify the input lines here
- UINT32 ram_size = m_ram->size();
+ uint32_t ram_size = m_ram->size();
// For the CoCo 1, the logic has been changed to only select 64K rams
// if there is more than 16K of memory, as the Color Basic 1.0 rom
@@ -663,7 +663,7 @@ void coco_state::update_sound(void)
*
* Source: Page 31 of the Tandy Color Computer Serice Manual
*/
- UINT8 single_bit_sound = (m_pia_1->b_output() & 0x02) ? 0x80 : 0x00;
+ uint8_t single_bit_sound = (m_pia_1->b_output() & 0x02) ? 0x80 : 0x00;
/* determine the sound mux status */
soundmux_status_t status = soundmux_status();
@@ -671,12 +671,12 @@ void coco_state::update_sound(void)
/* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */
bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1));
bool bCartSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2));
- UINT8 cassette_sound = (bCassSoundEnable ? 0x40 : 0);
- UINT8 cart_sound = (bCartSoundEnable ? 0x40 : 0);
+ uint8_t cassette_sound = (bCassSoundEnable ? 0x40 : 0);
+ uint8_t cart_sound = (bCartSoundEnable ? 0x40 : 0);
/* determine the value to send to the DAC (this is used by the Joystick read as well as audio out) */
m_dac_output = (m_pia_1->a_output() & 0xFC) >> 2;
- UINT8 dac_sound = (status == SOUNDMUX_ENABLE ? m_dac_output << 1 : 0);
+ uint8_t dac_sound = (status == SOUNDMUX_ENABLE ? m_dac_output << 1 : 0);
/* The CoCo uses a single DAC for both audio output and joystick axis position measurement.
* To avoid introducing artifacts while reading the axis positions, some software will disable
@@ -768,7 +768,7 @@ bool coco_state::is_joystick_hires(int joystick_index)
// poll_joystick
//-------------------------------------------------
-void coco_state::poll_joystick(bool *joyin, UINT8 *buttons)
+void coco_state::poll_joystick(bool *joyin, uint8_t *buttons)
{
static const analog_input_t s_empty = {};
static const int joy_rat_table[] = {15, 24, 42, 33 };
@@ -781,7 +781,7 @@ void coco_state::poll_joystick(bool *joyin, UINT8 *buttons)
/* determine the JOYIN value */
const analog_input_t *analog;
bool joyin_value;
- UINT8 joyval;
+ uint8_t joyval;
int dclg_vpos;
switch(joystick_type(joystick))
{
@@ -850,11 +850,11 @@ void coco_state::poll_joystick(bool *joyin, UINT8 *buttons)
void coco_state::poll_keyboard(void)
{
- UINT8 pia0_pb = m_pia_0->b_output();
- UINT8 pia0_pb_z = m_pia_0->port_b_z_mask();
+ uint8_t pia0_pb = m_pia_0->b_output();
+ uint8_t pia0_pb_z = m_pia_0->port_b_z_mask();
- UINT8 pia0_pa = 0x7F;
- UINT8 pia0_pa_z = 0x7F;
+ uint8_t pia0_pa = 0x7F;
+ uint8_t pia0_pa_z = 0x7F;
/* poll the keyboard, and update PA6-PA0 accordingly*/
for (unsigned i = 0; i < m_keyboard.size(); i++)
@@ -875,7 +875,7 @@ void coco_state::poll_keyboard(void)
/* poll the joystick (*/
bool joyin;
- UINT8 buttons;
+ uint8_t buttons;
poll_joystick(&joyin, &buttons);
/* PA7 comes from JOYIN */
@@ -896,7 +896,7 @@ void coco_state::poll_keyboard(void)
// on the CoCo 3 controls a GIME input
//-------------------------------------------------
-void coco_state::update_keyboard_input(UINT8 value, UINT8 z)
+void coco_state::update_keyboard_input(uint8_t value, uint8_t z)
{
m_pia_0->set_a_input(value, z);
}
@@ -983,7 +983,7 @@ void coco_state::update_prinout(bool prinout)
// pia1_pa_changed - called when PIA1 PA changes
//-------------------------------------------------
-void coco_state::pia1_pa_changed(UINT8 data)
+void coco_state::pia1_pa_changed(uint8_t data)
{
update_sound(); // DAC is connected to PIA1 PA2-PA7
poll_keyboard();
@@ -997,7 +997,7 @@ void coco_state::pia1_pa_changed(UINT8 data)
// pia1_pb_changed - called when PIA1 PB changes
//-------------------------------------------------
-void coco_state::pia1_pb_changed(UINT8 data)
+void coco_state::pia1_pb_changed(uint8_t data)
{
update_sound(); // singe_bit_sound is connected to PIA1 PB1
}
@@ -1080,7 +1080,7 @@ void coco_state::poll_hires_joystick(void)
double value = m_joystick.input(joystick_index, axis) / 255.0;
value *= is_cocomax3 ? 2500.0 : 4160.0;
value += is_cocomax3 ? 400.0 : 592.0;
- attotime duration = m_maincpu->clocks_to_attotime((UINT64) value) * 8;
+ attotime duration = m_maincpu->clocks_to_attotime((uint64_t) value) * 8;
m_hiresjoy_transition_timer[axis]->adjust(duration);
}
else if (!m_hiresjoy_ca && newvalue)
@@ -1120,7 +1120,7 @@ coco_vhd_image_device *coco_state::current_vhd(void)
READ8_MEMBER( coco_state::ff60_read )
{
- UINT8 result;
+ uint8_t result;
if ((current_vhd() != nullptr) && (offset >= 32) && (offset <= 37))
{
@@ -1354,7 +1354,7 @@ static const char *const os9syscalls[] =
};
-offs_t coco_state::dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
+offs_t coco_state::dasm_override(device_t &device, char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
{
unsigned call;
unsigned result = 0;
diff --git a/src/mame/machine/coco12.cpp b/src/mame/machine/coco12.cpp
index e2f3fbdb521..ac98b91468e 100644
--- a/src/mame/machine/coco12.cpp
+++ b/src/mame/machine/coco12.cpp
@@ -29,10 +29,10 @@ void coco12_state::device_start()
void coco12_state::configure_sam()
{
cococart_slot_device *cart = m_cococart;
- UINT8 *ram = m_ram->pointer();
- UINT32 ram_size = m_ram->size();
- UINT8 *rom = memregion(MAINCPU_TAG)->base();
- UINT8 *cart_rom = cart->get_cart_base();
+ uint8_t *ram = m_ram->pointer();
+ uint32_t ram_size = m_ram->size();
+ uint8_t *rom = memregion(MAINCPU_TAG)->base();
+ uint8_t *cart_rom = cart->get_cart_base();
m_sam->configure_bank(0, ram, ram_size, false); // $0000-$7FFF
m_sam->configure_bank(1, &rom[0x0000], 0x2000, true); // $8000-$9FFF
@@ -82,7 +82,7 @@ WRITE_LINE_MEMBER( coco12_state::field_sync )
READ8_MEMBER( coco12_state::sam_read )
{
- UINT8 data = m_ram->read(offset);
+ uint8_t data = m_ram->read(offset);
m_vdg->as_w(data & 0x80 ? ASSERT_LINE : CLEAR_LINE);
m_vdg->inv_w(data & 0x40 ? ASSERT_LINE : CLEAR_LINE);
return data;
@@ -94,7 +94,7 @@ READ8_MEMBER( coco12_state::sam_read )
// pia1_pb_changed
//-------------------------------------------------
-void coco12_state::pia1_pb_changed(UINT8 data)
+void coco12_state::pia1_pb_changed(uint8_t data)
{
/* call inherited function */
coco_state::pia1_pb_changed(data);
@@ -113,7 +113,7 @@ void coco12_state::pia1_pb_changed(UINT8 data)
// update_cart_base
//-------------------------------------------------
-void coco12_state::update_cart_base(UINT8 *cart_base)
+void coco12_state::update_cart_base(uint8_t *cart_base)
{
m_sam->configure_bank(3, cart_base, 0x4000, true); // $C000-$FEFF
}
diff --git a/src/mame/machine/coco3.cpp b/src/mame/machine/coco3.cpp
index 40624853dec..dab68c0761e 100644
--- a/src/mame/machine/coco3.cpp
+++ b/src/mame/machine/coco3.cpp
@@ -65,7 +65,7 @@ WRITE8_MEMBER( coco3_state::ff20_write )
READ8_MEMBER( coco3_state::ff40_read )
{
- UINT8 result = 0x00;
+ uint8_t result = 0x00;
if (m_gime->spare_chip_select_enabled())
result = coco_state::ff40_read(space, offset, mem_mask);
return result;
@@ -111,7 +111,7 @@ bool coco3_state::irq_get_line(void)
// update_keyboard_input
//-------------------------------------------------
-void coco3_state::update_keyboard_input(UINT8 value, UINT8 z)
+void coco3_state::update_keyboard_input(uint8_t value, uint8_t z)
{
coco_state::update_keyboard_input(value, z);
m_gime->set_il1(value == 0xFF);
@@ -135,7 +135,7 @@ void coco3_state::cart_w(bool state)
// update_cart_base
//-------------------------------------------------
-void coco3_state::update_cart_base(UINT8 *cart_base)
+void coco3_state::update_cart_base(uint8_t *cart_base)
{
m_gime->update_cart_rom();
}
@@ -146,7 +146,7 @@ void coco3_state::update_cart_base(UINT8 *cart_base)
// screen_update
//-------------------------------------------------
-UINT32 coco3_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+uint32_t coco3_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
bool result;
if (!strcmp(screen.tag(), ":" COMPOSITE_SCREEN_TAG))
diff --git a/src/mame/machine/coco_vhd.cpp b/src/mame/machine/coco_vhd.cpp
index 1a0c7e680da..1fd772418d9 100644
--- a/src/mame/machine/coco_vhd.cpp
+++ b/src/mame/machine/coco_vhd.cpp
@@ -71,7 +71,7 @@ const device_type COCO_VHD = &device_creator<coco_vhd_image_device>;
// coco_vhd_image_device - constructor
//-------------------------------------------------
-coco_vhd_image_device::coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+coco_vhd_image_device::coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, COCO_VHD, "Virtual Hard Disk", tag, owner, clock, "coco_vhd_image", __FILE__),
device_image_interface(mconfig, *this)
{
@@ -130,13 +130,13 @@ image_init_result coco_vhd_image_device::call_load()
// coco_vhd_readwrite
//-------------------------------------------------
-void coco_vhd_image_device::coco_vhd_readwrite(UINT8 data)
+void coco_vhd_image_device::coco_vhd_readwrite(uint8_t data)
{
int result, i;
- UINT32 bytes_to_read;
- UINT32 bytes_to_write;
- UINT64 seek_position;
- UINT64 total_size;
+ uint32_t bytes_to_read;
+ uint32_t bytes_to_write;
+ uint64_t seek_position;
+ uint64_t total_size;
char buffer[1024];
/* access the image */
@@ -147,7 +147,7 @@ void coco_vhd_image_device::coco_vhd_readwrite(UINT8 data)
}
/* perform the seek */
- seek_position = ((UINT64) 256) * m_logical_record_number;
+ seek_position = ((uint64_t) 256) * m_logical_record_number;
total_size = length();
result = fseek(std::min(seek_position, total_size), SEEK_SET);
if (result < 0)
@@ -163,7 +163,7 @@ void coco_vhd_image_device::coco_vhd_readwrite(UINT8 data)
{
memset(buffer, 0, sizeof(buffer));
- bytes_to_write = (UINT32)std::min(seek_position - total_size, (UINT64) sizeof(buffer));
+ bytes_to_write = (uint32_t)std::min(seek_position - total_size, (uint64_t) sizeof(buffer));
result = fwrite(buffer, bytes_to_write);
if (result != bytes_to_write)
{
@@ -181,7 +181,7 @@ void coco_vhd_image_device::coco_vhd_readwrite(UINT8 data)
memset(buffer, 0, 256);
if (total_size > seek_position)
{
- bytes_to_read = (UINT32)std::min((UINT64) 256, total_size - seek_position);
+ bytes_to_read = (uint32_t)std::min((uint64_t) 256, total_size - seek_position);
result = fread(buffer, bytes_to_read);
if (result != bytes_to_read)
{
@@ -225,9 +225,9 @@ void coco_vhd_image_device::coco_vhd_readwrite(UINT8 data)
-UINT8 coco_vhd_image_device::read(offs_t offset)
+uint8_t coco_vhd_image_device::read(offs_t offset)
{
- UINT8 result = 0;
+ uint8_t result = 0;
switch(offset)
{
@@ -242,7 +242,7 @@ UINT8 coco_vhd_image_device::read(offs_t offset)
-void coco_vhd_image_device::write(offs_t offset, UINT8 data)
+void coco_vhd_image_device::write(offs_t offset, uint8_t data)
{
int pos;
diff --git a/src/mame/machine/coco_vhd.h b/src/mame/machine/coco_vhd.h
index 02c6ef1574e..87f9fa57147 100644
--- a/src/mame/machine/coco_vhd.h
+++ b/src/mame/machine/coco_vhd.h
@@ -23,7 +23,7 @@ class coco_vhd_image_device : public device_t,
{
public:
// construction/destruction
- coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~coco_vhd_image_device();
// image-level overrides
@@ -41,22 +41,22 @@ public:
// specific implementation
DECLARE_READ8_MEMBER(read) { return read(offset); }
DECLARE_WRITE8_MEMBER(write) { write(offset, data); }
- UINT8 read(offs_t offset);
- void write(offs_t offset, UINT8 data);
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
protected:
// device-level overrides
virtual void device_config_complete() override;
virtual void device_start() override;
- void coco_vhd_readwrite(UINT8 data);
+ void coco_vhd_readwrite(uint8_t data);
private:
cpu_device * m_cpu;
address_space * m_cpu_space;
- UINT32 m_logical_record_number;
- UINT32 m_buffer_address;
- UINT8 m_status;
+ uint32_t m_logical_record_number;
+ uint32_t m_buffer_address;
+ uint8_t m_status;
};
// device type definition
diff --git a/src/mame/machine/compiskb.cpp b/src/mame/machine/compiskb.cpp
index a83dc9fd6b8..12262b17159 100644
--- a/src/mame/machine/compiskb.cpp
+++ b/src/mame/machine/compiskb.cpp
@@ -235,7 +235,7 @@ ioport_constructor compis_keyboard_device::device_input_ports() const
// compis_keyboard_device - constructor
//-------------------------------------------------
-compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, COMPIS_KEYBOARD, "Compis Keyboard", tag, owner, clock, "compiskb", __FILE__),
m_maincpu(*this, I8748_TAG),
m_speaker(*this, SPEAKER_TAG),
@@ -324,7 +324,7 @@ WRITE8_MEMBER( compis_keyboard_device::bus_w )
READ8_MEMBER( compis_keyboard_device::p1_r )
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
switch (m_keylatch)
{
@@ -349,7 +349,7 @@ READ8_MEMBER( compis_keyboard_device::p1_r )
READ8_MEMBER( compis_keyboard_device::p2_r )
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
switch (m_keylatch)
{
diff --git a/src/mame/machine/compiskb.h b/src/mame/machine/compiskb.h
index 0dd79a6f453..4585e39241a 100644
--- a/src/mame/machine/compiskb.h
+++ b/src/mame/machine/compiskb.h
@@ -37,7 +37,7 @@ class compis_keyboard_device : public device_t
{
public:
// construction/destruction
- compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_out_tx_handler(device_t &device, _Object object) { return downcast<compis_keyboard_device &>(device).m_out_tx_handler.set_callback(object); }
@@ -69,8 +69,8 @@ private:
required_ioport m_special;
devcb_write_line m_out_tx_handler;
- UINT8 m_bus;
- UINT8 m_keylatch;
+ uint8_t m_bus;
+ uint8_t m_keylatch;
};
diff --git a/src/mame/machine/concept.cpp b/src/mame/machine/concept.cpp
index 7beeb8fe1d7..1192bd7bd62 100644
--- a/src/mame/machine/concept.cpp
+++ b/src/mame/machine/concept.cpp
@@ -61,12 +61,12 @@ void concept_state::video_start()
{
}
-UINT32 concept_state::screen_update_concept(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t concept_state::screen_update_concept(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* resolution is 720*560 */
- UINT16 *videoram = m_videoram;
+ uint16_t *videoram = m_videoram;
int x, y;
- UINT16 *line;
+ uint16_t *line;
for (y = 0; y < 560; y++)
{
@@ -138,7 +138,7 @@ WRITE8_MEMBER(concept_state::via_out_a)
*/
READ8_MEMBER(concept_state::via_in_b)
{
- UINT8 status;
+ uint8_t status;
status = ((ioport("DSW0")->read() & 0x80) >> 1) | ((ioport("DSW0")->read() & 0x40) << 1);
LOG(("via_in_b: VIA port B (DIP switches, Video, Comm Rate) - status: 0x%2.2x\n", status));
diff --git a/src/mame/machine/cps2crypt.cpp b/src/mame/machine/cps2crypt.cpp
index 0171570fbd9..efdff933a9f 100644
--- a/src/mame/machine/cps2crypt.cpp
+++ b/src/mame/machine/cps2crypt.cpp
@@ -134,7 +134,7 @@ static const int fn2_groupB[8] = { 3, 5, 9, 10, 8, 15, 12, 11 };
struct sbox
{
- const UINT8 table[64];
+ const uint8_t table[64];
const int inputs[6]; // positions of the inputs bits, -1 means no input except from key
const int outputs[2]; // positions of the output bits
};
@@ -144,8 +144,8 @@ struct sbox
// following one
struct optimised_sbox
{
- UINT8 input_lookup[256];
- UINT8 output[64];
+ uint8_t input_lookup[256];
+ uint8_t output[64];
};
@@ -442,7 +442,7 @@ static const struct sbox fn2_r4_boxes[4] =
/******************************************************************************/
-static UINT8 fn(UINT8 in, const struct optimised_sbox *sboxes, UINT32 key)
+static uint8_t fn(uint8_t in, const struct optimised_sbox *sboxes, uint32_t key)
{
const struct optimised_sbox *sbox1 = &sboxes[0];
const struct optimised_sbox *sbox2 = &sboxes[1];
@@ -460,7 +460,7 @@ static UINT8 fn(UINT8 in, const struct optimised_sbox *sboxes, UINT32 key)
// srckey is the 64-bit master key (2x32 bits)
// dstkey will contain the 96-bit key for the 1st FN (4x24 bits)
-static void expand_1st_key(UINT32 *dstkey, const UINT32 *srckey)
+static void expand_1st_key(uint32_t *dstkey, const uint32_t *srckey)
{
static const int bits[96] =
{
@@ -495,7 +495,7 @@ static void expand_1st_key(UINT32 *dstkey, const UINT32 *srckey)
// srckey is the 64-bit master key (2x32 bits) XORed with the subkey
// dstkey will contain the 96-bit key for the 2nd FN (4x24 bits)
-static void expand_2nd_key(UINT32 *dstkey, const UINT32 *srckey)
+static void expand_2nd_key(uint32_t *dstkey, const uint32_t *srckey)
{
static const int bits[96] =
{
@@ -532,7 +532,7 @@ static void expand_2nd_key(UINT32 *dstkey, const UINT32 *srckey)
// seed is the 16-bit seed generated by the first FN
// subkey will contain the 64-bit key to be XORed with the master key
// for the 2nd FN (2x32 bits)
-static void expand_subkey(UINT32* subkey, UINT16 seed)
+static void expand_subkey(uint32_t* subkey, uint16_t seed)
{
// Note that each row of the table is a permutation of the seed bits.
static const int bits[64] =
@@ -553,12 +553,12 @@ static void expand_subkey(UINT32* subkey, UINT16 seed)
-static UINT16 feistel(UINT16 val, const int *bitsA, const int *bitsB,
+static uint16_t feistel(uint16_t val, const int *bitsA, const int *bitsB,
const struct optimised_sbox* boxes1, const struct optimised_sbox* boxes2, const struct optimised_sbox* boxes3, const struct optimised_sbox* boxes4,
- UINT32 key1, UINT32 key2, UINT32 key3, UINT32 key4)
+ uint32_t key1, uint32_t key2, uint32_t key3, uint32_t key4)
{
- UINT8 l = BITSWAP8(val, bitsB[7],bitsB[6],bitsB[5],bitsB[4],bitsB[3],bitsB[2],bitsB[1],bitsB[0]);
- UINT8 r = BITSWAP8(val, bitsA[7],bitsA[6],bitsA[5],bitsA[4],bitsA[3],bitsA[2],bitsA[1],bitsA[0]);
+ uint8_t l = BITSWAP8(val, bitsB[7],bitsB[6],bitsB[5],bitsB[4],bitsB[3],bitsB[2],bitsB[1],bitsB[0]);
+ uint8_t r = BITSWAP8(val, bitsA[7],bitsA[6],bitsA[5],bitsA[4],bitsA[3],bitsA[2],bitsA[1],bitsA[0]);
l ^= fn(r, boxes1, key1);
r ^= fn(l, boxes2, key2);
@@ -586,7 +586,7 @@ static UINT16 feistel(UINT16 val, const int *bitsA, const int *bitsB,
-static int extract_inputs(UINT32 val, const int *inputs)
+static int extract_inputs(uint32_t val, const int *inputs)
{
int i;
int res = 0;
@@ -632,10 +632,10 @@ static void optimise_sboxes(struct optimised_sbox* out, const struct sbox* in)
-static void cps2_decrypt(running_machine &machine, UINT16 *rom, UINT16 *dec, int length, const UINT32 *master_key, UINT32 lower_limit, UINT32 upper_limit)
+static void cps2_decrypt(running_machine &machine, uint16_t *rom, uint16_t *dec, int length, const uint32_t *master_key, uint32_t lower_limit, uint32_t upper_limit)
{
int i;
- UINT32 key1[4];
+ uint32_t key1[4];
struct optimised_sbox sboxes1[4*4];
struct optimised_sbox sboxes2[4*4];
@@ -664,9 +664,9 @@ static void cps2_decrypt(running_machine &machine, UINT16 *rom, UINT16 *dec, int
for (i = 0; i < 0x10000; ++i)
{
int a;
- UINT16 seed;
- UINT32 subkey[2];
- UINT32 key2[4];
+ uint16_t seed;
+ uint32_t subkey[2];
+ uint32_t key2[4];
if ((i & 0xff) == 0)
{
@@ -732,8 +732,8 @@ static void cps2_decrypt(running_machine &machine, UINT16 *rom, UINT16 *dec, int
struct game_keys
{
const char *name; /* game driver name */
- const UINT32 keys[2];
- UINT32 upper_limit;
+ const uint32_t keys[2];
+ uint32_t upper_limit;
};
@@ -745,9 +745,9 @@ DRIVER_INIT_MEMBER(cps_state,cps2crypt)
{
if (m_region_key)
{
- UINT32 key[2];
- UINT32 lower;
- UINT32 upper;
+ uint32_t key[2];
+ uint32_t lower;
+ uint32_t upper;
int b;
@@ -787,6 +787,6 @@ DRIVER_INIT_MEMBER(cps_state,cps2crypt)
logerror("cps2 decrypt 0x%08x,0x%08x,0x%08x,0x%08x\n", key[0], key[1], lower, upper);
// we have a proper key so use it to decrypt
- cps2_decrypt(machine(), (UINT16 *)memregion("maincpu")->base(), m_decrypted_opcodes, memregion("maincpu")->bytes(), key, lower / 2, upper / 2);
+ cps2_decrypt(machine(), (uint16_t *)memregion("maincpu")->base(), m_decrypted_opcodes, memregion("maincpu")->bytes(), key, lower / 2, upper / 2);
}
}
diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp
index b42b8ee11f3..c578e6a3181 100644
--- a/src/mame/machine/cuda.cpp
+++ b/src/mame/machine/cuda.cpp
@@ -108,7 +108,7 @@ const tiny_rom_entry *cuda_device::device_rom_region() const
// LIVE DEVICE
//**************************************************************************
-void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data)
+void cuda_device::send_port(address_space &space, uint8_t offset, uint8_t data)
{
// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->pc());
@@ -211,7 +211,7 @@ WRITE8_MEMBER( cuda_device::ddr_w )
READ8_MEMBER( cuda_device::ports_r )
{
- UINT8 incoming = 0;
+ uint8_t incoming = 0;
switch (offset)
{
@@ -382,7 +382,7 @@ WRITE8_MEMBER( cuda_device::pram_w )
// cuda_device - constructor
//-------------------------------------------------
-cuda_device::cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cuda_device::cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CUDA, "Apple Cuda", tag, owner, clock, "cuda", __FILE__),
device_nvram_interface(mconfig, *this),
write_reset(*this),
@@ -440,7 +440,7 @@ void cuda_device::device_start()
save_item(NAME(pram));
save_item(NAME(disk_pram));
- UINT8 *rom = device().machine().root_device().memregion(device().subtag(CUDA_CPU_TAG).c_str())->base();
+ uint8_t *rom = device().machine().root_device().memregion(device().subtag(CUDA_CPU_TAG).c_str())->base();
if (rom)
{
diff --git a/src/mame/machine/cuda.h b/src/mame/machine/cuda.h
index a236acffc94..9d6786e9803 100644
--- a/src/mame/machine/cuda.h
+++ b/src/mame/machine/cuda.h
@@ -60,7 +60,7 @@ class cuda_device : public device_t, public device_nvram_interface
{
public:
// construction/destruction
- cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void static_set_type(device_t &device, int type);
@@ -86,12 +86,12 @@ public:
DECLARE_WRITE8_MEMBER( pram_w );
// VIA interface routines
- UINT8 get_treq() { return treq; }
- void set_tip(UINT8 val) { tip = val; }
- void set_byteack(UINT8 val) { byteack = val; }
- UINT8 get_via_data() { return via_data; }
- void set_via_data(UINT8 dat) { via_data = dat; }
- UINT8 get_via_clock() { return via_clock; }
+ uint8_t get_treq() { return treq; }
+ void set_tip(uint8_t val) { tip = val; }
+ void set_byteack(uint8_t val) { byteack = val; }
+ uint8_t get_via_data() { return via_data; }
+ void set_via_data(uint8_t dat) { via_data = dat; }
+ uint8_t get_via_clock() { return via_clock; }
void set_adb_line(int linestate) { adb_in = (linestate == ASSERT_LINE) ? true : false; }
int get_adb_dtime() { return m_adb_dtime; }
@@ -116,23 +116,23 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- UINT8 ddrs[3];
- UINT8 ports[3];
- UINT8 pll_ctrl;
- UINT8 timer_ctrl;
- UINT8 timer_counter, ripple_counter;
- UINT8 onesec;
- UINT8 treq, byteack, tip, via_data, via_clock, last_adb;
- UINT64 last_adb_time;
+ uint8_t ddrs[3];
+ uint8_t ports[3];
+ uint8_t pll_ctrl;
+ uint8_t timer_ctrl;
+ uint8_t timer_counter, ripple_counter;
+ uint8_t onesec;
+ uint8_t treq, byteack, tip, via_data, via_clock, last_adb;
+ uint64_t last_adb_time;
bool cuda_controls_power;
bool adb_in;
int reset_line;
int m_adb_dtime;
emu_timer *m_timer, *m_prog_timer;
- UINT8 pram[0x100], disk_pram[0x100];
+ uint8_t pram[0x100], disk_pram[0x100];
bool pram_loaded;
- void send_port(address_space &space, UINT8 offset, UINT8 data);
+ void send_port(address_space &space, uint8_t offset, uint8_t data);
};
// device type definition
diff --git a/src/mame/machine/cx4data.hxx b/src/mame/machine/cx4data.hxx
index b7d1610a304..a76343eb896 100644
--- a/src/mame/machine/cx4data.hxx
+++ b/src/mame/machine/cx4data.hxx
@@ -10,7 +10,7 @@
***************************************************************************/
-static const UINT8 CX4_immediate_data[48] =
+static const uint8_t CX4_immediate_data[48] =
{
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f,
@@ -18,7 +18,7 @@ static const UINT8 CX4_immediate_data[48] =
0x00, 0x00, 0x01, 0xff, 0xff, 0xfe, 0x00, 0x01, 0x00, 0xff, 0xfe, 0x00
};
-static const UINT16 CX4_wave_data[40] =
+static const uint16_t CX4_wave_data[40] =
{
0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000a, 0x000c, 0x000e,
0x0200, 0x0202, 0x0204, 0x0206, 0x0208, 0x020a, 0x020c, 0x020e,
@@ -27,7 +27,7 @@ static const UINT16 CX4_wave_data[40] =
0x0800, 0x0802, 0x0804, 0x0806, 0x0808, 0x080a, 0x080c, 0x080e
};
-static const UINT32 CX4_sin_table[256] =
+static const uint32_t CX4_sin_table[256] =
{
0x000000, 0x000324, 0x000648, 0x00096c, 0x000c8f, 0x000fb2, 0x0012d5, 0x0015f6,
0x001917, 0x001c37, 0x001f56, 0x002273, 0x002590, 0x0028aa, 0x002bc4, 0x002edb,
@@ -63,7 +63,7 @@ static const UINT32 CX4_sin_table[256] =
0xff013b, 0xff00f1, 0xff00b1, 0xff007b, 0xff004e, 0xff002c, 0xff0013, 0xff0004
};
-static const INT16 CX4_SinTable[512] =
+static const int16_t CX4_SinTable[512] =
{
0, 402, 804, 1206, 1607, 2009, 2410, 2811,
3211, 3611, 4011, 4409, 4808, 5205, 5602, 5997,
@@ -131,7 +131,7 @@ static const INT16 CX4_SinTable[512] =
-3211, -2811, -2410, -2009, -1607, -1206, -804, -402
};
-static const INT16 CX4_CosTable[512] =
+static const int16_t CX4_CosTable[512] =
{
32767, 32765, 32758, 32745, 32728, 32706, 32679, 32647,
32610, 32568, 32521, 32469, 32413, 32351, 32285, 32214,
diff --git a/src/mame/machine/cx4fn.hxx b/src/mame/machine/cx4fn.hxx
index 2b5a302a227..37c1e4b1967 100644
--- a/src/mame/machine/cx4fn.hxx
+++ b/src/mame/machine/cx4fn.hxx
@@ -11,7 +11,7 @@
***************************************************************************/
#include <math.h>
-#define CX4_Tan(a) (CX4_CosTable[a] ? ((((INT32)CX4_SinTable[a]) << 16) / CX4_CosTable[a]) : 0x80000000)
+#define CX4_Tan(a) (CX4_CosTable[a] ? ((((int32_t)CX4_SinTable[a]) << 16) / CX4_CosTable[a]) : 0x80000000)
#define CX4_sar(b, n) ((b) >> (n))
#ifdef PI
#undef PI
@@ -41,8 +41,8 @@ static void CX4_C4TransfWireFrame(void)
cx4.c4y = cx4.c4x2 * sin(cx4.tanval) + cx4.c4y2 * cos(cx4.tanval);
//Scale
- cx4.C4WFXVal = (INT16)(cx4.c4x * cx4.C4WFScale / (0x90 * (cx4.c4z + 0x95)) * 0x95);
- cx4.C4WFYVal = (INT16)(cx4.c4y * cx4.C4WFScale / (0x90 * (cx4.c4z + 0x95)) * 0x95);
+ cx4.C4WFXVal = (int16_t)(cx4.c4x * cx4.C4WFScale / (0x90 * (cx4.c4z + 0x95)) * 0x95);
+ cx4.C4WFYVal = (int16_t)(cx4.c4y * cx4.C4WFScale / (0x90 * (cx4.c4z + 0x95)) * 0x95);
}
static void CX4_C4CalcWireFrame(void)
@@ -90,18 +90,18 @@ static void CX4_C4TransfWireFrame2(void)
cx4.c4y = cx4.c4x2 * sin(cx4.tanval) + cx4.c4y2 * cos(cx4.tanval);
//Scale
- cx4.C4WFXVal = (INT16)(cx4.c4x * cx4.C4WFScale / 0x100);
- cx4.C4WFYVal = (INT16)(cx4.c4y * cx4.C4WFScale / 0x100);
+ cx4.C4WFXVal = (int16_t)(cx4.c4x * cx4.C4WFScale / 0x100);
+ cx4.C4WFYVal = (int16_t)(cx4.c4y * cx4.C4WFScale / 0x100);
}
static void CX4_C4DrawWireFrame(running_machine &machine)
{
- UINT32 line = CX4_readl(0x1f80);
- UINT32 point1, point2;
- INT16 X1, Y1, Z1;
- INT16 X2, Y2, Z2;
- UINT8 Color;
- INT32 i;
+ uint32_t line = CX4_readl(0x1f80);
+ uint32_t point1, point2;
+ int16_t X1, Y1, Z1;
+ int16_t X2, Y2, Z2;
+ uint8_t Color;
+ int32_t i;
address_space &space = machine.device<cpu_device>("maincpu")->space(AS_PROGRAM);
for(i = cx4.ram[0x0295]; i > 0; i--, line += 5)
@@ -109,7 +109,7 @@ static void CX4_C4DrawWireFrame(running_machine &machine)
if(space.read_byte(line) == 0xff &&
space.read_byte(line + 1) == 0xff)
{
- INT32 tmp = line - 5;
+ int32_t tmp = line - 5;
while(space.read_byte(tmp + 2) == 0xff &&
space.read_byte(tmp + 3) == 0xff &&
(tmp + 2) >= 0)
@@ -147,13 +147,13 @@ static void CX4_C4DrawWireFrame(running_machine &machine)
}
}
-static void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT16 Z2, UINT8 Color)
+static void CX4_C4DrawLine(int32_t X1, int32_t Y1, int16_t Z1, int32_t X2, int32_t Y2, int16_t Z2, uint8_t Color)
{
- INT32 i;
+ int32_t i;
//Transform coordinates
- cx4.C4WFXVal = (INT16)X1;
- cx4.C4WFYVal = (INT16)Y1;
+ cx4.C4WFXVal = (int16_t)X1;
+ cx4.C4WFYVal = (int16_t)Y1;
cx4.C4WFZVal = Z1;
cx4.C4WFScale = CX4_read(0x1f90);
cx4.C4WFX2Val = CX4_read(0x1f86);
@@ -163,29 +163,29 @@ static void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT
X1 = (cx4.C4WFXVal + 48) << 8;
Y1 = (cx4.C4WFYVal + 48) << 8;
- cx4.C4WFXVal = (INT16)X2;
- cx4.C4WFYVal = (INT16)Y2;
+ cx4.C4WFXVal = (int16_t)X2;
+ cx4.C4WFYVal = (int16_t)Y2;
cx4.C4WFZVal = Z2;
CX4_C4TransfWireFrame2();
X2 = (cx4.C4WFXVal + 48) << 8;
Y2 = (cx4.C4WFYVal + 48) << 8;
//Get line info
- cx4.C4WFXVal = (INT16)(X1 >> 8);
- cx4.C4WFYVal = (INT16)(Y1 >> 8);
- cx4.C4WFX2Val = (INT16)(X2 >> 8);
- cx4.C4WFY2Val = (INT16)(Y2 >> 8);
+ cx4.C4WFXVal = (int16_t)(X1 >> 8);
+ cx4.C4WFYVal = (int16_t)(Y1 >> 8);
+ cx4.C4WFX2Val = (int16_t)(X2 >> 8);
+ cx4.C4WFY2Val = (int16_t)(Y2 >> 8);
CX4_C4CalcWireFrame();
- X2 = (INT16)cx4.C4WFXVal;
- Y2 = (INT16)cx4.C4WFYVal;
+ X2 = (int16_t)cx4.C4WFXVal;
+ Y2 = (int16_t)cx4.C4WFYVal;
//Render line
for(i = cx4.C4WFDist ? cx4.C4WFDist : 1; i > 0; i--)
{
if(X1 > 0xff && Y1 > 0xff && X1 < 0x6000 && Y1 < 0x6000)
{
- UINT16 addr = (((Y1 >> 8) >> 3) << 8) - (((Y1 >> 8) >> 3) << 6) + (((X1 >> 8) >> 3) << 4) + ((Y1 >> 8) & 7) * 2;
- UINT8 bit = 0x80 >> ((X1 >> 8) & 7);
+ uint16_t addr = (((Y1 >> 8) >> 3) << 8) - (((Y1 >> 8) >> 3) << 6) + (((X1 >> 8) >> 3) << 4) + ((Y1 >> 8) & 7) * 2;
+ uint8_t bit = 0x80 >> ((X1 >> 8) & 7);
cx4.ram[addr + 0x300] &= ~bit;
cx4.ram[addr + 0x301] &= ~bit;
if(Color & 1)
@@ -204,25 +204,25 @@ static void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT
static void CX4_C4DoScaleRotate(int row_padding)
{
- INT16 A, B, C, D;
- INT32 x, y;
+ int16_t A, B, C, D;
+ int32_t x, y;
//Calculate Pixel Resolution
- UINT8 w = CX4_read(0x1f89) & ~7;
- UINT8 h = CX4_read(0x1f8c) & ~7;
+ uint8_t w = CX4_read(0x1f89) & ~7;
+ uint8_t h = CX4_read(0x1f8c) & ~7;
- INT32 Cx = (INT16)CX4_readw(0x1f83);
- INT32 Cy = (INT16)CX4_readw(0x1f86);
+ int32_t Cx = (int16_t)CX4_readw(0x1f83);
+ int32_t Cy = (int16_t)CX4_readw(0x1f86);
- INT32 LineX, LineY;
- UINT32 X, Y;
- UINT8 byte;
- INT32 outidx = 0;
- UINT8 bit = 0x80;
+ int32_t LineX, LineY;
+ uint32_t X, Y;
+ uint8_t byte;
+ int32_t outidx = 0;
+ uint8_t bit = 0x80;
//Calculate matrix
- INT32 XScale = CX4_readw(0x1f8f);
- INT32 YScale = CX4_readw(0x1f92);
+ int32_t XScale = CX4_readw(0x1f8f);
+ int32_t YScale = CX4_readw(0x1f92);
if(XScale & 0x8000)
{
@@ -235,38 +235,38 @@ static void CX4_C4DoScaleRotate(int row_padding)
if(CX4_readw(0x1f80) == 0)
{ //no rotation
- A = (INT16)XScale;
+ A = (int16_t)XScale;
B = 0;
C = 0;
- D = (INT16)YScale;
+ D = (int16_t)YScale;
}
else if(CX4_readw(0x1f80) == 128)
{ //90 degree rotation
A = 0;
- B = (INT16)(-YScale);
- C = (INT16)XScale;
+ B = (int16_t)(-YScale);
+ C = (int16_t)XScale;
D = 0;
}
else if(CX4_readw(0x1f80) == 256)
{ //180 degree rotation
- A = (INT16)(-XScale);
+ A = (int16_t)(-XScale);
B = 0;
C = 0;
- D = (INT16)(-YScale);
+ D = (int16_t)(-YScale);
}
else if(CX4_readw(0x1f80) == 384)
{ //270 degree rotation
A = 0;
- B = (INT16)YScale;
- C = (INT16)(-XScale);
+ B = (int16_t)YScale;
+ C = (int16_t)(-XScale);
D = 0;
}
else
{
- A = (INT16) CX4_sar(CX4_CosTable[CX4_readw(0x1f80) & 0x1ff] * XScale, 15);
- B = (INT16)(-CX4_sar(CX4_SinTable[CX4_readw(0x1f80) & 0x1ff] * YScale, 15));
- C = (INT16) CX4_sar(CX4_SinTable[CX4_readw(0x1f80) & 0x1ff] * XScale, 15);
- D = (INT16) CX4_sar(CX4_CosTable[CX4_readw(0x1f80) & 0x1ff] * YScale, 15);
+ A = (int16_t) CX4_sar(CX4_CosTable[CX4_readw(0x1f80) & 0x1ff] * XScale, 15);
+ B = (int16_t)(-CX4_sar(CX4_SinTable[CX4_readw(0x1f80) & 0x1ff] * YScale, 15));
+ C = (int16_t) CX4_sar(CX4_SinTable[CX4_readw(0x1f80) & 0x1ff] * XScale, 15);
+ D = (int16_t) CX4_sar(CX4_CosTable[CX4_readw(0x1f80) & 0x1ff] * YScale, 15);
}
//Clear the output RAM
@@ -292,7 +292,7 @@ static void CX4_C4DoScaleRotate(int row_padding)
}
else
{
- UINT32 addr = (Y >> 12) * w + (X >> 12);
+ uint32_t addr = (Y >> 12) * w + (X >> 12);
byte = CX4_read(0x600 + (addr >> 1));
if(addr & 1)
{
diff --git a/src/mame/machine/cx4oam.hxx b/src/mame/machine/cx4oam.hxx
index abf74defea2..f249bdad550 100644
--- a/src/mame/machine/cx4oam.hxx
+++ b/src/mame/machine/cx4oam.hxx
@@ -13,16 +13,16 @@
//Build OAM
static void CX4_op00_00(running_machine &machine)
{
- INT32 i;
+ int32_t i;
- UINT32 oamptr = cx4.ram[0x626] << 2;
- UINT16 globalx, globaly;
- UINT32 oamptr2;
- INT16 sprx, spry;
- UINT8 sprname, sprattr;
- UINT8 sprcount;
- UINT8 offset;
- UINT32 srcptr;
+ uint32_t oamptr = cx4.ram[0x626] << 2;
+ uint16_t globalx, globaly;
+ uint32_t oamptr2;
+ int16_t sprx, spry;
+ uint8_t sprname, sprattr;
+ uint8_t sprcount;
+ uint8_t offset;
+ uint32_t srcptr;
for(i = 0x1fd; i > oamptr && i >= 0; i -= 4)
{
@@ -49,7 +49,7 @@ static void CX4_op00_00(running_machine &machine)
address_space &space = machine.device<cpu_device>("maincpu")->space(AS_PROGRAM);
for(i = cx4.ram[0x620]; i > 0 && sprcount > 0; i--, srcptr += 16)
{
- UINT32 spraddr = CX4_readl(srcptr + 7);
+ uint32_t spraddr = CX4_readl(srcptr + 7);
sprx = CX4_readw(srcptr) - globalx;
spry = CX4_readw(srcptr + 2) - globaly;
@@ -58,11 +58,11 @@ static void CX4_op00_00(running_machine &machine)
if(space.read_byte(spraddr))
{
- INT16 x, y;
- INT32 sprcnt;
+ int16_t x, y;
+ int32_t sprcnt;
for(sprcnt = space.read_byte(spraddr++); sprcnt > 0 && sprcount > 0; sprcnt--, spraddr += 4)
{
- x = (INT8)space.read_byte(spraddr + 1);
+ x = (int8_t)space.read_byte(spraddr + 1);
if(sprattr & 0x40)
{
x = -x - ((space.read_byte(spraddr) & 0x20) ? 16 : 8);
@@ -70,7 +70,7 @@ static void CX4_op00_00(running_machine &machine)
x += sprx;
if(x >= -16 && x <= 272)
{
- y = (INT8)space.read_byte(spraddr + 2);
+ y = (int8_t)space.read_byte(spraddr + 2);
if(sprattr & 0x80)
{
y = -y - ((space.read_byte(spraddr) & 0x20) ? 16 : 8);
@@ -78,8 +78,8 @@ static void CX4_op00_00(running_machine &machine)
y += spry;
if(y >= -16 && y <= 224)
{
- cx4.ram[oamptr ] = (UINT8)x;
- cx4.ram[oamptr + 1] = (UINT8)y;
+ cx4.ram[oamptr ] = (uint8_t)x;
+ cx4.ram[oamptr + 1] = (uint8_t)y;
cx4.ram[oamptr + 2] = sprname + space.read_byte(spraddr + 3);
cx4.ram[oamptr + 3] = sprattr ^ (space.read_byte(spraddr) & 0xc0);
cx4.ram[oamptr2] &= ~(3 << offset);
@@ -104,8 +104,8 @@ static void CX4_op00_00(running_machine &machine)
}
else if(sprcount > 0)
{
- cx4.ram[oamptr ] = (UINT8)sprx;
- cx4.ram[oamptr + 1] = (UINT8)spry;
+ cx4.ram[oamptr ] = (uint8_t)sprx;
+ cx4.ram[oamptr + 1] = (uint8_t)spry;
cx4.ram[oamptr + 2] = sprname;
cx4.ram[oamptr + 3] = sprattr;
cx4.ram[oamptr2] &= ~(3 << offset);
@@ -137,8 +137,8 @@ static void CX4_op00_03(void)
//Transform Lines
static void CX4_op00_05(running_machine &machine)
{
- INT32 i;
- UINT32 ptr = 0, ptr2 = 0;
+ int32_t i;
+ uint32_t ptr = 0, ptr2 = 0;
cx4.C4WFX2Val = CX4_read(0x1f83);
cx4.C4WFY2Val = CX4_read(0x1f86);
@@ -195,21 +195,21 @@ static void CX4_op00_08(running_machine &machine)
//Disintegrate
static void CX4_op00_0b(running_machine &machine)
{
- UINT8 width, height;
- UINT32 startx, starty;
- UINT32 srcptr;
- UINT32 x, y;
- INT32 scalex, scaley;
- INT32 cx, cy;
- INT32 i, j;
+ uint8_t width, height;
+ uint32_t startx, starty;
+ uint32_t srcptr;
+ uint32_t x, y;
+ int32_t scalex, scaley;
+ int32_t cx, cy;
+ int32_t i, j;
width = CX4_read(0x1f89);
height = CX4_read(0x1f8c);
cx = CX4_readw(0x1f80);
cy = CX4_readw(0x1f83);
- scalex = (INT16)CX4_readw(0x1f86);
- scaley = (INT16)CX4_readw(0x1f8f);
+ scalex = (int16_t)CX4_readw(0x1f86);
+ scaley = (int16_t)CX4_readw(0x1f8f);
startx = -cx * scalex + (cx << 8);
starty = -cy * scaley + (cy << 8);
srcptr = 0x600;
@@ -225,9 +225,9 @@ static void CX4_op00_0b(running_machine &machine)
{
if((x >> 8) < width && (y >> 8) < height && (y >> 8) * width + (x >> 8) < 0x2000)
{
- UINT8 pixel = (j & 1) ? (cx4.ram[srcptr] >> 4) : (cx4.ram[srcptr]);
- INT32 index = (y >> 11) * width * 4 + (x >> 11) * 32 + ((y >> 8) & 7) * 2;
- UINT8 mask = 0x80 >> ((x >> 8) & 7);
+ uint8_t pixel = (j & 1) ? (cx4.ram[srcptr] >> 4) : (cx4.ram[srcptr]);
+ int32_t index = (y >> 11) * width * 4 + (x >> 11) * 32 + ((y >> 8) & 7) * 2;
+ uint8_t mask = 0x80 >> ((x >> 8) & 7);
if(pixel & 1) cx4.ram[index ] |= mask;
if(pixel & 2) cx4.ram[index + 1] |= mask;
@@ -246,19 +246,19 @@ static void CX4_op00_0b(running_machine &machine)
static void CX4_op00_0c(running_machine &machine)
{
int i, j;
- UINT32 destptr = 0;
- UINT32 waveptr = CX4_read(0x1f83);
- UINT16 mask1 = 0xc0c0;
- UINT16 mask2 = 0x3f3f;
+ uint32_t destptr = 0;
+ uint32_t waveptr = CX4_read(0x1f83);
+ uint16_t mask1 = 0xc0c0;
+ uint16_t mask2 = 0x3f3f;
for(j = 0; j < 0x10; j++)
{
do
{
- INT16 height = -((INT8)CX4_read(waveptr + 0xb00)) - 16;
+ int16_t height = -((int8_t)CX4_read(waveptr + 0xb00)) - 16;
for(i = 0; i < 40; i++)
{
- UINT16 temp = CX4_readw(destptr + CX4_wave_data[i]) & mask2;
+ uint16_t temp = CX4_readw(destptr + CX4_wave_data[i]) & mask2;
if(height >= 0)
{
if(height < 8)
@@ -281,10 +281,10 @@ static void CX4_op00_0c(running_machine &machine)
do
{
- INT16 height = -((INT8)CX4_read(waveptr + 0xb00)) - 16;
+ int16_t height = -((int8_t)CX4_read(waveptr + 0xb00)) - 16;
for(i = 0; i < 40; i++)
{
- UINT16 temp = CX4_readw(destptr + CX4_wave_data[i]) & mask2;
+ uint16_t temp = CX4_readw(destptr + CX4_wave_data[i]) & mask2;
if(height >= 0)
{
if(height < 8)
diff --git a/src/mame/machine/cx4ops.hxx b/src/mame/machine/cx4ops.hxx
index 02b97bc944d..9496f0a3ecd 100644
--- a/src/mame/machine/cx4ops.hxx
+++ b/src/mame/machine/cx4ops.hxx
@@ -35,7 +35,7 @@ static void CX4_op01(running_machine& machine)
//Propulsion
static void CX4_op05(running_machine &machine)
{
- INT32 temp = 0x10000;
+ int32_t temp = 0x10000;
if(CX4_readw(0x1f83))
{
temp = CX4_sar((temp / CX4_readw(0x1f83)) * CX4_readw(0x1f81), 8);
@@ -51,8 +51,8 @@ static void CX4_op0d(running_machine &machine)
cx4.C41FDistVal = CX4_readw(0x1f86);
cx4.tanval = sqrt(((double)cx4.C41FYVal) * ((double)cx4.C41FYVal) + ((double)cx4.C41FXVal) * ((double)cx4.C41FXVal));
cx4.tanval = (double)cx4.C41FDistVal / cx4.tanval;
- cx4.C41FYVal = (INT16)(((double)cx4.C41FYVal * cx4.tanval) * 0.99);
- cx4.C41FXVal = (INT16)(((double)cx4.C41FXVal * cx4.tanval) * 0.98);
+ cx4.C41FYVal = (int16_t)(((double)cx4.C41FYVal * cx4.tanval) * 0.99);
+ cx4.C41FXVal = (int16_t)(((double)cx4.C41FXVal * cx4.tanval) * 0.98);
CX4_writew(machine, 0x1f89, cx4.C41FXVal);
CX4_writew(machine, 0x1f8c, cx4.C41FYVal);
}
@@ -116,7 +116,7 @@ static void CX4_op15(running_machine &machine)
cx4.C41FXVal = CX4_readw(0x1f80);
cx4.C41FYVal = CX4_readw(0x1f83);
temp = sqrt((double)cx4.C41FXVal * (double)cx4.C41FXVal + (double)cx4.C41FYVal * (double)cx4.C41FYVal);
- cx4.C41FDist = (INT16)temp;
+ cx4.C41FDist = (int16_t)temp;
CX4_writew(machine, 0x1f80, cx4.C41FDist);
}
@@ -132,7 +132,7 @@ static void CX4_op1f(running_machine &machine)
else
{
cx4.tanval = ((double)cx4.C41FYVal) / ((double)cx4.C41FXVal);
- cx4.C41FAngleRes = (INT16)(atan(cx4.tanval) / (PI * 2) * 512);
+ cx4.C41FAngleRes = (int16_t)(atan(cx4.tanval) / (PI * 2) * 512);
cx4.C41FAngleRes = cx4.C41FAngleRes;
if(cx4.C41FXVal < 0)
{
@@ -146,20 +146,20 @@ static void CX4_op1f(running_machine &machine)
//Trapezoid
static void CX4_op22(void)
{
- INT16 angle1 = CX4_readw(0x1f8c) & 0x1ff;
- INT16 angle2 = CX4_readw(0x1f8f) & 0x1ff;
- INT32 tan1 = CX4_Tan(angle1);
- INT32 tan2 = CX4_Tan(angle2);
- INT16 y = CX4_readw(0x1f83) - CX4_readw(0x1f89);
- INT16 left, right;
- INT32 j;
+ int16_t angle1 = CX4_readw(0x1f8c) & 0x1ff;
+ int16_t angle2 = CX4_readw(0x1f8f) & 0x1ff;
+ int32_t tan1 = CX4_Tan(angle1);
+ int32_t tan2 = CX4_Tan(angle2);
+ int16_t y = CX4_readw(0x1f83) - CX4_readw(0x1f89);
+ int16_t left, right;
+ int32_t j;
for(j = 0; j < 225; j++, y++)
{
if(y >= 0)
{
- left = CX4_sar((INT32)tan1 * y, 16) - CX4_readw(0x1f80) + CX4_readw(0x1f86);
- right = CX4_sar((INT32)tan2 * y, 16) - CX4_readw(0x1f80) + CX4_readw(0x1f86) + CX4_readw(0x1f93);
+ left = CX4_sar((int32_t)tan1 * y, 16) - CX4_readw(0x1f80) + CX4_readw(0x1f86);
+ right = CX4_sar((int32_t)tan2 * y, 16) - CX4_readw(0x1f80) + CX4_readw(0x1f86) + CX4_readw(0x1f93);
if(left < 0 && right < 0)
{
@@ -194,8 +194,8 @@ static void CX4_op22(void)
left = 1;
right = 0;
}
- cx4.ram[j + 0x800] = (UINT8)left;
- cx4.ram[j + 0x900] = (UINT8)right;
+ cx4.ram[j + 0x800] = (uint8_t)left;
+ cx4.ram[j + 0x900] = (uint8_t)right;
}
}
@@ -227,7 +227,7 @@ static void CX4_op2d(running_machine &machine)
//Sum
static void CX4_op40(void)
{
- UINT32 i;
+ uint32_t i;
cx4.r0 = 0;
for(i=0;i<0x800;i++)
{
diff --git a/src/mame/machine/cybiko.cpp b/src/mame/machine/cybiko.cpp
index aa0d116b6dd..116d7676cdc 100644
--- a/src/mame/machine/cybiko.cpp
+++ b/src/mame/machine/cybiko.cpp
@@ -38,7 +38,7 @@ DRIVER_INIT_MEMBER(cybiko_state,cybikoxt)
QUICKLOAD_LOAD_MEMBER( cybiko_state, cybiko )
{
- image.fread(m_flash1->get_ptr(), std::min(image.length(), UINT64(0x84000)));
+ image.fread(m_flash1->get_ptr(), std::min(image.length(), uint64_t(0x84000)));
return image_init_result::PASS;
}
@@ -46,9 +46,9 @@ QUICKLOAD_LOAD_MEMBER( cybiko_state, cybiko )
QUICKLOAD_LOAD_MEMBER( cybiko_state, cybikoxt )
{
address_space &dest = m_maincpu->space(AS_PROGRAM);
- UINT32 size = std::min(image.length(), UINT64(RAMDISK_SIZE));
+ uint32_t size = std::min(image.length(), uint64_t(RAMDISK_SIZE));
- std::vector<UINT8> buffer(size);
+ std::vector<uint8_t> buffer(size);
image.fread(&buffer[0], size);
for (int byte = 0; byte < size; byte++)
dest.write_byte(0x400000 + byte, buffer[byte]);
@@ -86,7 +86,7 @@ void cybiko_state::machine_reset()
READ16_MEMBER( cybiko_state::cybiko_lcd_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
if (ACCESSING_BITS_8_15) data |= (m_crtc->reg_idx_r(space, offset) << 8);
if (ACCESSING_BITS_0_7) data |= (m_crtc->reg_dat_r(space, offset) << 0);
return data;
@@ -100,8 +100,8 @@ WRITE16_MEMBER( cybiko_state::cybiko_lcd_w )
int cybiko_state::cybiko_key_r( offs_t offset, int mem_mask)
{
- UINT16 data = 0xFFFF;
- for (UINT8 i = 0; i < 15; i++)
+ uint16_t data = 0xFFFF;
+ for (uint8_t i = 0; i < 15; i++)
{
if (m_input[i].found() && !BIT(offset, i))
data &= ~m_input[i]->read();
@@ -120,7 +120,7 @@ READ16_MEMBER( cybiko_state::cybikov1_key_r )
READ16_MEMBER( cybiko_state::cybikov2_key_r )
{
- UINT16 data = cybiko_key_r(offset, mem_mask);
+ uint16_t data = cybiko_key_r(offset, mem_mask);
if (!BIT(offset, 0))
data |= 0x0002; // or else [esc] does not work in "lost in labyrinth"
return data;
@@ -134,7 +134,7 @@ READ16_MEMBER( cybiko_state::cybikoxt_key_r )
#if 0
READ16_MEMBER( cybiko_state::cybikov1_io_reg_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
#if 0
_logerror( 2, ("cybikov1_io_reg_r (%08X)\n", offset));
switch (offset)
@@ -182,7 +182,7 @@ READ16_MEMBER( cybiko_state::cybikov1_io_reg_r )
READ16_MEMBER( cybiko_state::cybikov2_io_reg_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
#if 0
_logerror( 2, ("cybikov2_io_reg_r (%08X)\n", offset));
switch (offset)
@@ -230,7 +230,7 @@ READ16_MEMBER( cybiko_state::cybikov2_io_reg_r )
READ16_MEMBER( cybiko_state::cybikoxt_io_reg_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
#if 0
_logerror( 2, ("cybikoxt_io_reg_r (%08X)\n", offset));
switch (offset)
diff --git a/src/mame/machine/dai.cpp b/src/mame/machine/dai.cpp
index 9ea8258f805..f785feeed92 100644
--- a/src/mame/machine/dai.cpp
+++ b/src/mame/machine/dai.cpp
@@ -55,7 +55,7 @@ void dai_state::dai_update_memory(int dai_rom_bank)
READ8_MEMBER(dai_state::dai_keyboard_r)
{
- UINT8 data = 0x00;
+ uint8_t data = 0x00;
static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" };
for (int i = 0; i < 8; i++)
@@ -122,7 +122,7 @@ void dai_state::machine_reset()
READ8_MEMBER(dai_state::dai_io_discrete_devices_r)
{
- UINT8 data = 0x00;
+ uint8_t data = 0x00;
switch(offset & 0x000f) {
case 0x00:
diff --git a/src/mame/machine/dc-ctrl.cpp b/src/mame/machine/dc-ctrl.cpp
index f2b5531b64a..36bada88469 100644
--- a/src/mame/machine/dc-ctrl.cpp
+++ b/src/mame/machine/dc-ctrl.cpp
@@ -29,7 +29,7 @@ void dc_controller_device::static_set_versions(device_t &device, const char *ver
ctrl.versions = versions;
}
-dc_controller_device::dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dc_controller_device::dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
maple_device(mconfig, DC_CONTROLLER, "Dreamcast Controller", tag, owner, clock, "dcctrl", __FILE__)
{
memset(port_tag, 0, sizeof(port_tag));
@@ -39,7 +39,7 @@ dc_controller_device::dc_controller_device(const machine_config &mconfig, const
versions = "Version 1.010,1998/09/28,315-6211-AB ,Analog Module : The 4th Edition.5/8 +DF";
}
-void dc_controller_device::maple_w(const UINT32 *data, UINT32 in_size)
+void dc_controller_device::maple_w(const uint32_t *data, uint32_t in_size)
{
switch(data[0] & 0xff) {
case 0x01: // Device request
@@ -70,7 +70,7 @@ void dc_controller_device::maple_w(const UINT32 *data, UINT32 in_size)
}
}
-void dc_controller_device::fixed_status(UINT32 *dest)
+void dc_controller_device::fixed_status(uint32_t *dest)
{
dest[0] = 0x20000000; // Controller
dest[1] =
@@ -85,17 +85,17 @@ void dc_controller_device::fixed_status(UINT32 *dest)
dest[2] = 0; // No 2nd function
dest[3] = 0; // No 3rd function
dest[4] = 0x00ff; // Every region, no expansion
- copy_with_spaces(((UINT8 *)dest) + 18, id, 30);
- copy_with_spaces(((UINT8 *)dest) + 48, license, 60);
+ copy_with_spaces(((uint8_t *)dest) + 18, id, 30);
+ copy_with_spaces(((uint8_t *)dest) + 48, license, 60);
dest[27] = 0x01f401ae; // standby 43mA, max 50mA
}
-void dc_controller_device::free_status(UINT32 *dest)
+void dc_controller_device::free_status(uint32_t *dest)
{
- copy_with_spaces((UINT8 *)dest, versions, 80);
+ copy_with_spaces((uint8_t *)dest, versions, 80);
}
-void dc_controller_device::read(UINT32 *dest)
+void dc_controller_device::read(uint32_t *dest)
{
dest[0] = 0x21000000; // Controller
dest[1] =
diff --git a/src/mame/machine/dc-ctrl.h b/src/mame/machine/dc-ctrl.h
index ed408ea7885..afc935c5f75 100644
--- a/src/mame/machine/dc-ctrl.h
+++ b/src/mame/machine/dc-ctrl.h
@@ -29,23 +29,23 @@ class dc_controller_device : public maple_device
{
public:
// construction/destruction
- dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void static_set_port_tag(device_t &device, int port, const char *tag);
static void static_set_id(device_t &device, const char *id);
static void static_set_license(device_t &device, const char *license);
static void static_set_versions(device_t &device, const char *versions);
- void maple_w(const UINT32 *data, UINT32 in_size) override;
+ void maple_w(const uint32_t *data, uint32_t in_size) override;
protected:
// device-level overrides
virtual void device_start() override;
private:
- void fixed_status(UINT32 *dest);
- void free_status(UINT32 *dest);
- void read(UINT32 *dest);
+ void fixed_status(uint32_t *dest);
+ void free_status(uint32_t *dest);
+ void read(uint32_t *dest);
const char *port_tag[8];
const char *id, *license, *versions;
diff --git a/src/mame/machine/dc.cpp b/src/mame/machine/dc.cpp
index e74d9757967..d35ec8612cb 100644
--- a/src/mame/machine/dc.cpp
+++ b/src/mame/machine/dc.cpp
@@ -77,7 +77,7 @@ static const char *const sysctrl_names[] =
#endif
-void dc_state::generic_dma(UINT32 main_adr, void *dma_ptr, UINT32 length, UINT32 size, bool to_mainram)
+void dc_state::generic_dma(uint32_t main_adr, void *dma_ptr, uint32_t length, uint32_t size, bool to_mainram)
{
sh4_ddt_dma ddt;
if(to_mainram)
@@ -194,7 +194,7 @@ TIMER_CALLBACK_MEMBER(dc_state::ch2_dma_irq)
void dc_state::g2_dma_execute(address_space &space, int channel)
{
- UINT32 src,dst,size;
+ uint32_t src,dst,size;
dst = m_g2_dma[channel].g2_addr;
src = m_g2_dma[channel].root_addr;
size = 0;
@@ -234,7 +234,7 @@ void dc_state::g2_dma_execute(address_space &space, int channel)
// register decode helpers
// this accepts only 32-bit accesses
-int dc_state::decode_reg32_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)
+int dc_state::decode_reg32_64(uint32_t offset, uint64_t mem_mask, uint64_t *shift)
{
int reg = offset * 2;
@@ -257,7 +257,7 @@ int dc_state::decode_reg32_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)
}
// this accepts only 32 and 16 bit accesses
-int dc_state::decode_reg3216_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)
+int dc_state::decode_reg3216_64(uint32_t offset, uint64_t mem_mask, uint64_t *shift)
{
int reg = offset * 2;
@@ -282,7 +282,7 @@ int dc_state::decode_reg3216_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)
int dc_state::dc_compute_interrupt_level()
{
- UINT32 ln,lx,le;
+ uint32_t ln,lx,le;
ln=dc_sysctrl_regs[SB_ISTNRM] & dc_sysctrl_regs[SB_IML6NRM];
lx=dc_sysctrl_regs[SB_ISTEXT] & dc_sysctrl_regs[SB_IML6EXT];
@@ -367,7 +367,7 @@ void dc_state::dc_update_interrupt_status()
READ64_MEMBER(dc_state::dc_sysctrl_r )
{
int reg;
- UINT64 shift;
+ uint64_t shift;
reg = decode_reg32_64(offset, mem_mask, &shift);
@@ -378,19 +378,19 @@ READ64_MEMBER(dc_state::dc_sysctrl_r )
}
#endif
- return (UINT64)dc_sysctrl_regs[reg] << shift;
+ return (uint64_t)dc_sysctrl_regs[reg] << shift;
}
WRITE64_MEMBER(dc_state::dc_sysctrl_w )
{
int reg;
- UINT64 shift;
- UINT32 old,dat;
- UINT32 address;
+ uint64_t shift;
+ uint32_t old,dat;
+ uint32_t address;
struct sh4_ddt_dma ddtdata;
reg = decode_reg32_64(offset, mem_mask, &shift);
- dat = (UINT32)(data >> shift);
+ dat = (uint32_t)(data >> shift);
old = dc_sysctrl_regs[reg];
dc_sysctrl_regs[reg] = dat; // 5f6800+off*4=dat
switch (reg)
@@ -479,7 +479,7 @@ WRITE64_MEMBER(dc_state::dc_sysctrl_w )
READ64_MEMBER(dc_state::dc_gdrom_r )
{
- UINT32 off;
+ uint32_t off;
if ((int)~mem_mask & 1)
{
@@ -500,16 +500,16 @@ READ64_MEMBER(dc_state::dc_gdrom_r )
WRITE64_MEMBER(dc_state::dc_gdrom_w )
{
- UINT32 dat,off;
+ uint32_t dat,off;
if ((int)~mem_mask & 1)
{
- dat=(UINT32)(data >> 32);
+ dat=(uint32_t)(data >> 32);
off=(offset << 1) | 1;
}
else
{
- dat=(UINT32)data;
+ dat=(uint32_t)data;
off=offset << 1;
}
@@ -519,22 +519,22 @@ WRITE64_MEMBER(dc_state::dc_gdrom_w )
READ64_MEMBER(dc_state::dc_g2_ctrl_r )
{
int reg;
- UINT64 shift;
+ uint64_t shift;
reg = decode_reg32_64(offset, mem_mask, &shift);
osd_printf_verbose("G2CTRL: Unmapped read %08x\n", 0x5f7800+reg*4);
- return (UINT64)g2bus_regs[reg] << shift;
+ return (uint64_t)g2bus_regs[reg] << shift;
}
WRITE64_MEMBER(dc_state::dc_g2_ctrl_w )
{
int reg;
- UINT64 shift;
- UINT32 dat;
- UINT8 old;
+ uint64_t shift;
+ uint32_t dat;
+ uint8_t old;
reg = decode_reg32_64(offset, mem_mask, &shift);
- dat = (UINT32)(data >> shift);
+ dat = (uint32_t)(data >> shift);
g2bus_regs[reg] = dat; // 5f7800+reg*4=dat
@@ -584,7 +584,7 @@ WRITE64_MEMBER(dc_state::dc_g2_ctrl_w )
}
}
-int dc_state::decode_reg_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)
+int dc_state::decode_reg_64(uint32_t offset, uint64_t mem_mask, uint64_t *shift)
{
int reg = offset * 2;
@@ -609,7 +609,7 @@ int dc_state::decode_reg_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)
READ64_MEMBER(dc_state::dc_modem_r )
{
int reg;
- UINT64 shift;
+ uint64_t shift;
reg = decode_reg32_64(offset, mem_mask, &shift);
@@ -627,11 +627,11 @@ READ64_MEMBER(dc_state::dc_modem_r )
WRITE64_MEMBER(dc_state::dc_modem_w )
{
int reg;
- UINT64 shift;
- UINT32 dat;
+ uint64_t shift;
+ uint32_t dat;
reg = decode_reg32_64(offset, mem_mask, &shift);
- dat = (UINT32)(data >> shift);
+ dat = (uint32_t)(data >> shift);
osd_printf_verbose("%s",string_format("MODEM: [%08x=%x] write %I64x to %x, mask %I64x\n", 0x600000+reg*4, dat, data, offset, mem_mask).c_str());
}
@@ -674,7 +674,7 @@ void dc_state::machine_reset()
READ32_MEMBER(dc_state::dc_aica_reg_r)
{
-// osd_printf_verbose("%s",string_format("AICA REG: [%08x] read %I64x, mask %I64x\n", 0x700000+reg*4, (UINT64)offset, mem_mask).c_str());
+// osd_printf_verbose("%s",string_format("AICA REG: [%08x] read %I64x, mask %I64x\n", 0x700000+reg*4, (uint64_t)offset, mem_mask).c_str());
if(offset == 0x2c00/4)
return m_armrst;
diff --git a/src/mame/machine/dccons.cpp b/src/mame/machine/dccons.cpp
index 0a0792c14d6..cc040d07456 100644
--- a/src/mame/machine/dccons.cpp
+++ b/src/mame/machine/dccons.cpp
@@ -40,7 +40,7 @@ WRITE_LINE_MEMBER(dc_cons_state::ata_interrupt)
TIMER_CALLBACK_MEMBER(dc_cons_state::atapi_xfer_end )
{
- UINT8 sector_buffer[ 4096 ];
+ uint8_t sector_buffer[ 4096 ];
atapi_timer->adjust(attotime::never);
diff --git a/src/mame/machine/dec0.cpp b/src/mame/machine/dec0.cpp
index cd8d501efda..7a1c48ee654 100644
--- a/src/mame/machine/dec0.cpp
+++ b/src/mame/machine/dec0.cpp
@@ -346,7 +346,7 @@ WRITE16_MEMBER(dec0_state::robocop_68000_share_w)
void dec0_state::h6280_decrypt(const char *cputag)
{
int i;
- UINT8 *RAM = memregion(cputag)->base();
+ uint8_t *RAM = memregion(cputag)->base();
/* Read each byte, decrypt it */
for (i = 0x00000; i < 0x10000; i++)
@@ -355,7 +355,7 @@ void dec0_state::h6280_decrypt(const char *cputag)
DRIVER_INIT_MEMBER(dec0_state,hippodrm)
{
- UINT8 *RAM = memregion("sub")->base();
+ uint8_t *RAM = memregion("sub")->base();
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x180000, 0x18003f, read16_delegate(FUNC(dec0_state::hippodrm_68000_share_r),this), write16_delegate(FUNC(dec0_state::hippodrm_68000_share_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xffc800, 0xffcfff, write16_delegate(FUNC(dec0_state::sprite_mirror_w),this));
@@ -373,7 +373,7 @@ DRIVER_INIT_MEMBER(dec0_state,hippodrm)
DRIVER_INIT_MEMBER(dec0_state,slyspy)
{
- UINT8 *RAM = memregion("audiocpu")->base();
+ uint8_t *RAM = memregion("audiocpu")->base();
h6280_decrypt("audiocpu");
/* Slyspy sound cpu has some protection */
diff --git a/src/mame/machine/dec_lk201.cpp b/src/mame/machine/dec_lk201.cpp
index e9fb58aaaf0..3e611d1f4e0 100644
--- a/src/mame/machine/dec_lk201.cpp
+++ b/src/mame/machine/dec_lk201.cpp
@@ -510,7 +510,7 @@ ioport_constructor lk201_device::device_input_ports() const
// lk201_device - constructor
//-------------------------------------------------
-lk201_device::lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+lk201_device::lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, LK201, "DEC LK201 keyboard", tag, owner, clock, "lk201", __FILE__),
device_serial_interface(mconfig, *this),
m_maincpu(*this, LK201_CPU_TAG),
@@ -639,9 +639,9 @@ void lk201_device::update_interrupts()
READ8_MEMBER( lk201_device::timer_r )
{
- static UINT16 count;
+ static uint16_t count;
- UINT8 ret = m_timer.regs[offset];
+ uint8_t ret = m_timer.regs[offset];
switch (offset)
{
@@ -664,7 +664,7 @@ READ8_MEMBER( lk201_device::timer_r )
WRITE8_MEMBER( lk201_device::timer_w )
{
- static UINT16 count;
+ static uint16_t count;
static int save_tsr;
m_timer.regs[offset] = data;
@@ -695,14 +695,14 @@ WRITE8_MEMBER( lk201_device::ddr_w )
{
// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->pc());
- UINT8 olddata = ddrs[offset];
+ uint8_t olddata = ddrs[offset];
ddrs[offset] = data;
send_port(space, offset, ports[offset] & olddata);
}
READ8_MEMBER( lk201_device::ports_r )
{
- UINT8 incoming = 0;
+ uint8_t incoming = 0;
// apply data direction registers
incoming &= (ddrs[offset] ^ 0xff);
@@ -716,17 +716,17 @@ READ8_MEMBER( lk201_device::ports_r )
WRITE8_MEMBER( lk201_device::ports_w )
{
- UINT8 olddata = ports[offset];
+ uint8_t olddata = ports[offset];
ports[offset] = data; // "port writes are independent of DDRC"
send_port(space, offset, olddata & ddrs[offset]);
// printf("\nPORT %c write %02x (OLD = %02x) (DDR = %02x) (PC=%x)\n", 'A' + offset, data, olddata, ddrs[offset], m_maincpu->pc());
}
-void lk201_device::send_port(address_space &space, UINT8 offset, UINT8 olddata)
+void lk201_device::send_port(address_space &space, uint8_t offset, uint8_t olddata)
{
- UINT8 porta = ports[0] & ddrs[0];
- UINT8 portb = ports[1] & ddrs[1];
- UINT8 portc = ports[2] & ddrs[2];
+ uint8_t porta = ports[0] & ddrs[0];
+ uint8_t portb = ports[1] & ddrs[1];
+ uint8_t portc = ports[2] & ddrs[2];
switch (offset)
{
@@ -817,7 +817,7 @@ void lk201_device::send_port(address_space &space, UINT8 offset, UINT8 olddata)
READ8_MEMBER( lk201_device::sci_r )
{
- UINT8 incoming = 0;
+ uint8_t incoming = 0;
switch (offset)
{
@@ -880,7 +880,7 @@ WRITE8_MEMBER( lk201_device::sci_w )
READ8_MEMBER( lk201_device::spi_r )
{
- UINT8 incoming = 0;
+ uint8_t incoming = 0;
switch (offset)
{
diff --git a/src/mame/machine/dec_lk201.h b/src/mame/machine/dec_lk201.h
index 87b61ad3af6..5db6a35219a 100644
--- a/src/mame/machine/dec_lk201.h
+++ b/src/mame/machine/dec_lk201.h
@@ -48,7 +48,7 @@ class lk201_device : public device_t, public device_serial_interface
{
public:
// construction/destruction
- lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(ddr_r);
DECLARE_WRITE8_MEMBER(ddr_w);
@@ -78,36 +78,36 @@ protected:
virtual void tra_callback() override; // Tx send bit
private:
- UINT8 ddrs[3];
- UINT8 ports[3];
- UINT8 led_data;
- UINT8 kbd_data;
+ uint8_t ddrs[3];
+ uint8_t ports[3];
+ uint8_t led_data;
+ uint8_t kbd_data;
union {
struct {
- UINT8 tcr;
- UINT8 tsr;
- UINT8 icrh;
- UINT8 icrl;
- UINT8 ocrh;
- UINT8 ocrl;
- UINT8 crh;
- UINT8 crl;
- UINT8 acrh;
- UINT8 acrl;
+ uint8_t tcr;
+ uint8_t tsr;
+ uint8_t icrh;
+ uint8_t icrl;
+ uint8_t ocrh;
+ uint8_t ocrl;
+ uint8_t crh;
+ uint8_t crl;
+ uint8_t acrh;
+ uint8_t acrl;
};
- UINT8 regs[10];
+ uint8_t regs[10];
} m_timer;
emu_timer *m_count;
emu_timer *m_beeper;
- UINT8 sci_ctl2;
- UINT8 sci_status;
- //UINT8 sci_data;
+ uint8_t sci_ctl2;
+ uint8_t sci_status;
+ //uint8_t sci_data;
- UINT8 spi_status;
- UINT8 spi_data;
+ uint8_t spi_status;
+ uint8_t spi_data;
required_device<cpu_device> m_maincpu;
required_device<beep_device> m_speaker;
@@ -131,7 +131,7 @@ private:
required_ioport m_kbd16;
required_ioport m_kbd17;
- void send_port(address_space &space, UINT8 offset, UINT8 data);
+ void send_port(address_space &space, uint8_t offset, uint8_t data);
void update_interrupts();
int m_kbd_state;
diff --git a/src/mame/machine/deco102.cpp b/src/mame/machine/deco102.cpp
index bc6e7d9cabf..210ee3f6afa 100644
--- a/src/mame/machine/deco102.cpp
+++ b/src/mame/machine/deco102.cpp
@@ -13,13 +13,13 @@
#include "cpu/m68000/m68000.h"
#include "machine/deco102.h"
-static UINT16 decrypt(UINT16 data, int address, int select_xor)
+static uint16_t decrypt(uint16_t data, int address, int select_xor)
{
- static const UINT16 xors[16] =
+ static const uint16_t xors[16] =
{
0xb52c,0x2458,0x139a,0xc998,0xce8e,0x5144,0x0429,0xaad4,0xa331,0x3645,0x69a3,0xac64,0x1a53,0x5083,0x4dea,0xd237
};
- static const UINT8 bitswaps[16][16] =
+ static const uint8_t bitswaps[16][16] =
{
{ 12,8,13,11,14,10,15,9, 3,2,1,0,4,5,6,7 }, { 10,11,14,12,15,13,8,9, 6,7,5,3,0,4,2,1 },
{ 14,13,15,9,8,12,11,10, 7,4,1,5,6,0,3,2 }, { 15,14,8,9,10,11,13,12, 1,2,7,3,4,6,0,5 },
@@ -31,7 +31,7 @@ static UINT16 decrypt(UINT16 data, int address, int select_xor)
{ 13,8,12,14,11,15,10,9, 7,6,5,4,3,2,1,0 }, { 15,14,13,12,11,10,9,8, 0,6,7,4,3,2,1,5 }
};
int j, xorval;
- const UINT8 *bs;
+ const uint8_t *bs;
// calculate bitswap to use
j = ((address ^ select_xor) & 0xf0) >> 4;
@@ -49,9 +49,9 @@ static UINT16 decrypt(UINT16 data, int address, int select_xor)
bs[8],bs[9],bs[10],bs[11],bs[12],bs[13],bs[14],bs[15]);
}
-void deco102_decrypt_cpu(UINT16 *rom, UINT16 *opcodes, int size, int address_xor, int data_select_xor, int opcode_select_xor)
+void deco102_decrypt_cpu(uint16_t *rom, uint16_t *opcodes, int size, int address_xor, int data_select_xor, int opcode_select_xor)
{
- std::vector<UINT16> buf(size / 2);
+ std::vector<uint16_t> buf(size / 2);
memcpy(&buf[0], rom, size);
diff --git a/src/mame/machine/deco102.h b/src/mame/machine/deco102.h
index 449745e6eb0..ea87834e47b 100644
--- a/src/mame/machine/deco102.h
+++ b/src/mame/machine/deco102.h
@@ -1,4 +1,4 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
-void deco102_decrypt_cpu(UINT16 *rom, UINT16 *opcodes, int size, int address_xor, int data_select_xor, int opcode_select_xor);
+void deco102_decrypt_cpu(uint16_t *rom, uint16_t *opcodes, int size, int address_xor, int data_select_xor, int opcode_select_xor);
diff --git a/src/mame/machine/deco104.cpp b/src/mame/machine/deco104.cpp
index 554ad3ac47f..f750c6f776d 100644
--- a/src/mame/machine/deco104.cpp
+++ b/src/mame/machine/deco104.cpp
@@ -1055,7 +1055,7 @@ const device_type DECO104PROT = &device_creator<deco104_device>;
-deco104_device::deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+deco104_device::deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: deco_146_base_device(mconfig, DECO104PROT, "DECO 104 Protection", tag, owner, clock, "deco104", __FILE__)
{
m_bankswitch_swap_read_address = 0x66;
diff --git a/src/mame/machine/deco104.h b/src/mame/machine/deco104.h
index 5576f7fd6b2..a4fb85f8bf5 100644
--- a/src/mame/machine/deco104.h
+++ b/src/mame/machine/deco104.h
@@ -13,7 +13,7 @@
class deco104_device : public deco_146_base_device
{
public:
- deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/mame/machine/deco146.cpp b/src/mame/machine/deco146.cpp
index 0f0cd068100..cb60367241c 100644
--- a/src/mame/machine/deco146.cpp
+++ b/src/mame/machine/deco146.cpp
@@ -1122,9 +1122,9 @@ deco146port_xx port_table[] = {
/* 0x7fe */ { 0x04c, { NIB1__, NIB2__, NIB0__, NIB3__ }, 0, 1 }
};
-UINT16 reorder(UINT16 input, UINT8 *weights)
+uint16_t reorder(uint16_t input, uint8_t *weights)
{
- UINT16 temp = 0;
+ uint16_t temp = 0;
for(int i = 0; i < 16; i++)
{
if(input & (1 << i)) // if input bit is set
@@ -1143,7 +1143,7 @@ UINT16 reorder(UINT16 input, UINT8 *weights)
/* there are probably less dumb ways of doing the CS logic, it could be hooked up
more like the system16 mapper chips */
-void deco_146_base_device::write_data(address_space &space, UINT16 address, UINT16 data, UINT16 mem_mask, UINT8 &csflags)
+void deco_146_base_device::write_data(address_space &space, uint16_t address, uint16_t data, uint16_t mem_mask, uint8_t &csflags)
{
address = BITSWAP16(address>>1, 15,14,13,12,11,10, m_external_addrswap[9],m_external_addrswap[8] ,m_external_addrswap[7],m_external_addrswap[6],m_external_addrswap[5],m_external_addrswap[4],m_external_addrswap[3],m_external_addrswap[2],m_external_addrswap[1],m_external_addrswap[0]) << 1;
@@ -1200,7 +1200,7 @@ void deco_146_base_device::write_data(address_space &space, UINT16 address, UINT
-UINT16 deco_146_base_device::read_protport(UINT16 address, UINT16 mem_mask)
+uint16_t deco_146_base_device::read_protport(uint16_t address, uint16_t mem_mask)
{
// if we read the last written address immediately after then ignore all other logic and just return what was written unmodified
if ((address==m_latchaddr) && (m_latchflag==1))
@@ -1215,7 +1215,7 @@ UINT16 deco_146_base_device::read_protport(UINT16 address, UINT16 mem_mask)
if (m_magic_read_address_xor_enabled) address ^= m_magic_read_address_xor;
int location = 0;
- UINT16 realret = read_data_getloc(address, location);
+ uint16_t realret = read_data_getloc(address, location);
@@ -1236,7 +1236,7 @@ UINT16 deco_146_base_device::read_protport(UINT16 address, UINT16 mem_mask)
return realret;
}
-void deco_146_base_device::write_protport(address_space &space, UINT16 address, UINT16 data, UINT16 mem_mask)
+void deco_146_base_device::write_protport(address_space &space, uint16_t address, uint16_t data, uint16_t mem_mask)
{
m_latchaddr = address;
m_latchdata = data;
@@ -1269,11 +1269,11 @@ void deco_146_base_device::write_protport(address_space &space, UINT16 address,
-UINT16 deco_146_base_device::read_data(UINT16 address, UINT16 mem_mask, UINT8 &csflags)
+uint16_t deco_146_base_device::read_data(uint16_t address, uint16_t mem_mask, uint8_t &csflags)
{
address = BITSWAP16(address>>1, 15,14,13,12,11,10, m_external_addrswap[9],m_external_addrswap[8] ,m_external_addrswap[7],m_external_addrswap[6],m_external_addrswap[5],m_external_addrswap[4],m_external_addrswap[3],m_external_addrswap[2],m_external_addrswap[1],m_external_addrswap[0]) << 1;
- UINT16 retdata = 0;
+ uint16_t retdata = 0;
csflags = 0;
int upper_addr_bits = (address & 0x7800) >> 11;
@@ -1319,7 +1319,7 @@ UINT16 deco_146_base_device::read_data(UINT16 address, UINT16 mem_mask, UINT8 &c
-deco_146_base_device::deco_146_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+deco_146_base_device::deco_146_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_sound_latch(*this, ":soundlatch")
{
@@ -1346,31 +1346,31 @@ void deco_146_base_device::device_config_complete()
-UINT16 deco_146_base_device::port_dummy_cb(int unused)
+uint16_t deco_146_base_device::port_dummy_cb(int unused)
{
return 0x00;
}
-void deco_146_base_device::soundlatch_dummy(address_space &space, UINT16 data, UINT16 mem_mask)
+void deco_146_base_device::soundlatch_dummy(address_space &space, uint16_t data, uint16_t mem_mask)
{
}
-UINT16 deco_146_base_device::port_a_default(int unused)
+uint16_t deco_146_base_device::port_a_default(int unused)
{
return ioport(":INPUTS")->read();
}
-UINT16 deco_146_base_device::port_b_default(int unused)
+uint16_t deco_146_base_device::port_b_default(int unused)
{
return ioport(":SYSTEM")->read();
}
-UINT16 deco_146_base_device::port_c_default(int unused)
+uint16_t deco_146_base_device::port_c_default(int unused)
{
return ioport(":DSW")->read();
}
-void deco_146_base_device::soundlatch_default(address_space &space, UINT16 data, UINT16 mem_mask)
+void deco_146_base_device::soundlatch_default(address_space &space, uint16_t data, uint16_t mem_mask)
{
if (m_sound_latch != nullptr)
m_sound_latch->write(space, 0, data & 0xff);
@@ -1385,7 +1385,7 @@ void deco_146_base_device::set_port_a_cb(device_t &device,deco146_port_read_cb p
void deco_146_base_device::set_port_b_cb(device_t &device,deco146_port_read_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_port_b_r = port_cb; }
void deco_146_base_device::set_port_c_cb(device_t &device,deco146_port_read_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_port_c_r = port_cb; }
void deco_146_base_device::set_soundlatch_cb(device_t &device,deco146_port_write_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_soundlatch_w = port_cb; }
-void deco_146_base_device::set_interface_scramble(device_t &device,UINT8 a9, UINT8 a8, UINT8 a7, UINT8 a6, UINT8 a5, UINT8 a4, UINT8 a3,UINT8 a2,UINT8 a1,UINT8 a0)
+void deco_146_base_device::set_interface_scramble(device_t &device,uint8_t a9, uint8_t a8, uint8_t a7, uint8_t a6, uint8_t a5, uint8_t a4, uint8_t a3,uint8_t a2,uint8_t a1,uint8_t a0)
{
deco_146_base_device &dev = downcast<deco_146_base_device &>(device);
dev.m_external_addrswap[9] = a9;
@@ -1471,9 +1471,9 @@ void deco_146_base_device::device_reset()
const device_type DECO146PROT = &device_creator<deco146_device>;
-UINT16 deco_146_base_device::read_data_getloc(UINT16 address, int& location)
+uint16_t deco_146_base_device::read_data_getloc(uint16_t address, int& location)
{
- UINT16 retdata = 0;
+ uint16_t retdata = 0;
location = m_lookup_table[address>>1].write_offset;
@@ -1497,7 +1497,7 @@ UINT16 deco_146_base_device::read_data_getloc(UINT16 address, int& location)
retdata = m_rambank1[location>>1];
}
- UINT16 realret = reorder(retdata, &m_lookup_table[address>>1].mapping[0] );
+ uint16_t realret = reorder(retdata, &m_lookup_table[address>>1].mapping[0] );
if (m_lookup_table[address>>1].use_xor) realret ^= m_xor;
if (m_lookup_table[address>>1].use_nand) realret = (realret & ~m_nand);
@@ -1506,7 +1506,7 @@ UINT16 deco_146_base_device::read_data_getloc(UINT16 address, int& location)
}
-deco146_device::deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+deco146_device::deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: deco_146_base_device(mconfig, DECO146PROT, "DECO 146 Protection", tag, owner, clock, "deco146", __FILE__)
{
m_bankswitch_swap_read_address = 0x78;
diff --git a/src/mame/machine/deco146.h b/src/mame/machine/deco146.h
index f38479dfc51..924e70b2357 100644
--- a/src/mame/machine/deco146.h
+++ b/src/mame/machine/deco146.h
@@ -6,8 +6,8 @@
#include "machine/gen_latch.h"
-typedef device_delegate<UINT16 (int unused)> deco146_port_read_cb;
-typedef device_delegate<void (address_space &space, UINT16 data, UINT16 mem_mask)> deco146_port_write_cb;
+typedef device_delegate<uint16_t (int unused)> deco146_port_read_cb;
+typedef device_delegate<void (address_space &space, uint16_t data, uint16_t mem_mask)> deco146_port_write_cb;
#define MCFG_DECO146_SET_PORTA_CALLBACK( _class, _method) \
@@ -70,7 +70,7 @@ typedef device_delegate<void (address_space &space, UINT16 data, UINT16 mem_mask
struct deco146port_xx
{
int write_offset;
- UINT8 mapping[16];
+ uint8_t mapping[16];
int use_xor;
int use_nand;
};
@@ -82,17 +82,17 @@ struct deco146port_xx
class deco_146_base_device : public device_t
{
public:
- //deco_146_base_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- deco_146_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ //deco_146_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ deco_146_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
- void write_data(address_space &space, UINT16 address, UINT16 data, UINT16 mem_mask, UINT8 &csflags);
- UINT16 read_data(UINT16 address, UINT16 mem_mask, UINT8 &csflags);
+ void write_data(address_space &space, uint16_t address, uint16_t data, uint16_t mem_mask, uint8_t &csflags);
+ uint16_t read_data(uint16_t address, uint16_t mem_mask, uint8_t &csflags);
static void set_port_a_cb(device_t &device,deco146_port_read_cb port_cb);
static void set_port_b_cb(device_t &device,deco146_port_read_cb port_cb);
static void set_port_c_cb(device_t &device,deco146_port_read_cb port_cb);
static void set_soundlatch_cb(device_t &device,deco146_port_write_cb port_cb);
- static void set_interface_scramble(device_t &device,UINT8 a9, UINT8 a8, UINT8 a7, UINT8 a6, UINT8 a5, UINT8 a4, UINT8 a3,UINT8 a2,UINT8 a1,UINT8 a0);
+ static void set_interface_scramble(device_t &device,uint8_t a9, uint8_t a8, uint8_t a7, uint8_t a6, uint8_t a5, uint8_t a4, uint8_t a3,uint8_t a2,uint8_t a1,uint8_t a0);
static void set_use_magic_read_address_xor(device_t &device, int use_xor);
@@ -104,22 +104,22 @@ public:
deco146_port_read_cb m_port_c_r;
deco146_port_write_cb m_soundlatch_w;
- UINT16 port_a_default(int unused);
- UINT16 port_b_default(int unused);
- UINT16 port_c_default(int unused);
- UINT16 port_dummy_cb(int unused);
- void soundlatch_default(address_space &space, UINT16 data, UINT16 mem_mask);
- void soundlatch_dummy(address_space &space, UINT16 data, UINT16 mem_mask);
+ uint16_t port_a_default(int unused);
+ uint16_t port_b_default(int unused);
+ uint16_t port_c_default(int unused);
+ uint16_t port_dummy_cb(int unused);
+ void soundlatch_default(address_space &space, uint16_t data, uint16_t mem_mask);
+ void soundlatch_dummy(address_space &space, uint16_t data, uint16_t mem_mask);
- UINT8 m_bankswitch_swap_read_address;
- UINT16 m_magic_read_address_xor;
+ uint8_t m_bankswitch_swap_read_address;
+ uint16_t m_magic_read_address_xor;
int m_magic_read_address_xor_enabled;
- UINT8 m_xor_port;
- UINT8 m_mask_port;
- UINT8 m_soundlatch_port;
+ uint8_t m_xor_port;
+ uint8_t m_mask_port;
+ uint8_t m_soundlatch_port;
- UINT8 m_external_addrswap[10];
+ uint8_t m_external_addrswap[10];
deco146port_xx* m_lookup_table;
@@ -137,27 +137,27 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- UINT16 read_protport(UINT16 address, UINT16 mem_mask);
- virtual void write_protport(address_space &space, UINT16 address, UINT16 data, UINT16 mem_mask);
- virtual UINT16 read_data_getloc(UINT16 address, int& location);
+ uint16_t read_protport(uint16_t address, uint16_t mem_mask);
+ virtual void write_protport(address_space &space, uint16_t address, uint16_t data, uint16_t mem_mask);
+ virtual uint16_t read_data_getloc(uint16_t address, int& location);
- UINT16 m_rambank0[0x80];
- UINT16 m_rambank1[0x80];
+ uint16_t m_rambank0[0x80];
+ uint16_t m_rambank1[0x80];
int m_current_rambank;
- UINT16 m_nand;
- UINT16 m_xor;
- UINT16 m_soundlatch;
+ uint16_t m_nand;
+ uint16_t m_xor;
+ uint16_t m_soundlatch;
- UINT16 m_latchaddr;
- UINT16 m_latchdata;
+ uint16_t m_latchaddr;
+ uint16_t m_latchdata;
- UINT8 m_configregion; // which value of upper 4 address lines accesses the config region
+ uint8_t m_configregion; // which value of upper 4 address lines accesses the config region
int m_latchflag;
private:
- UINT8 region_selects[6];
+ uint8_t region_selects[6];
optional_device<generic_latch_8_device> m_sound_latch;
};
@@ -167,7 +167,7 @@ extern const device_type DECO146BASE;
class deco146_device : public deco_146_base_device
{
public:
- deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type DECO146PROT;
diff --git a/src/mame/machine/deco156.cpp b/src/mame/machine/deco156.cpp
index a5f190e1adc..3258c55a66d 100644
--- a/src/mame/machine/deco156.cpp
+++ b/src/mame/machine/deco156.cpp
@@ -36,7 +36,7 @@
#include "machine/deco156.h"
-static void decrypt(UINT32 *src, UINT32 *dst, int length)
+static void decrypt(uint32_t *src, uint32_t *dst, int length)
{
int a;
@@ -126,9 +126,9 @@ static void decrypt(UINT32 *src, UINT32 *dst, int length)
void deco156_decrypt(running_machine &machine)
{
- UINT32 *rom = (UINT32 *)machine.root_device().memregion("maincpu")->base();
+ uint32_t *rom = (uint32_t *)machine.root_device().memregion("maincpu")->base();
int length = machine.root_device().memregion("maincpu")->bytes();
- std::vector<UINT32> buf(length/4);
+ std::vector<uint32_t> buf(length/4);
memcpy(&buf[0], rom, length);
decrypt(&buf[0], rom, length);
diff --git a/src/mame/machine/deco222.cpp b/src/mame/machine/deco222.cpp
index 1df8a720dd2..722a2f0e2ac 100644
--- a/src/mame/machine/deco222.cpp
+++ b/src/mame/machine/deco222.cpp
@@ -8,7 +8,7 @@
#include "deco222.h"
-deco_222_device::deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+deco_222_device::deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_222, "DECO 222", tag, owner, clock, "deco222", __FILE__)
{
}
@@ -25,14 +25,14 @@ void deco_222_device::device_reset()
static_cast<mi_decrypt *>(mintf)->had_written = false;
}
-UINT8 deco_222_device::mi_decrypt::read_sync(UINT16 adr)
+uint8_t deco_222_device::mi_decrypt::read_sync(uint16_t adr)
{
return BITSWAP8(direct->read_byte(adr) ,7,5,6,4,3,2,1,0);
}
-deco_c10707_device::deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+deco_c10707_device::deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_C10707, "DECO C10707", tag, owner, clock, "decoc10707", __FILE__)
{
}
@@ -49,7 +49,7 @@ void deco_c10707_device::device_reset()
static_cast<mi_decrypt *>(mintf)->had_written = false;
}
-UINT8 deco_c10707_device::mi_decrypt::read_sync(UINT16 adr)
+uint8_t deco_c10707_device::mi_decrypt::read_sync(uint16_t adr)
{
return BITSWAP8(direct->read_byte(adr) ,7,5,6,4,3,2,1,0);
}
diff --git a/src/mame/machine/deco222.h b/src/mame/machine/deco222.h
index 9a7c8ba8822..3d765e5aee4 100644
--- a/src/mame/machine/deco222.h
+++ b/src/mame/machine/deco222.h
@@ -6,7 +6,7 @@
class deco_222_device : public m6502_device {
public:
- deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
class mi_decrypt : public mi_default_normal {
@@ -14,7 +14,7 @@ protected:
bool had_written;
virtual ~mi_decrypt() {}
- virtual UINT8 read_sync(UINT16 adr) override;
+ virtual uint8_t read_sync(uint16_t adr) override;
};
virtual void device_start() override;
@@ -28,7 +28,7 @@ static const device_type DECO_222 = &device_creator<deco_222_device>;
class deco_c10707_device : public m6502_device {
public:
- deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
class mi_decrypt : public mi_default_normal {
@@ -36,7 +36,7 @@ protected:
bool had_written;
virtual ~mi_decrypt() {}
- virtual UINT8 read_sync(UINT16 adr) override;
+ virtual uint8_t read_sync(uint16_t adr) override;
};
virtual void device_start() override;
diff --git a/src/mame/machine/decocass.cpp b/src/mame/machine/decocass.cpp
index c0bb1c642e9..f1529ebba4e 100644
--- a/src/mame/machine/decocass.cpp
+++ b/src/mame/machine/decocass.cpp
@@ -14,14 +14,14 @@
/* dongle type #1: jumpers C and D assignments */
#define MAKE_MAP(m0,m1,m2,m3,m4,m5,m6,m7) \
- ((UINT32)(m0)) | \
- ((UINT32)(m1) << 3) | \
- ((UINT32)(m2) << 6) | \
- ((UINT32)(m3) << 9) | \
- ((UINT32)(m4) << 12) | \
- ((UINT32)(m5) << 15) | \
- ((UINT32)(m6) << 18) | \
- ((UINT32)(m7) << 21)
+ ((uint32_t)(m0)) | \
+ ((uint32_t)(m1) << 3) | \
+ ((uint32_t)(m2) << 6) | \
+ ((uint32_t)(m3) << 9) | \
+ ((uint32_t)(m4) << 12) | \
+ ((uint32_t)(m5) << 15) | \
+ ((uint32_t)(m6) << 18) | \
+ ((uint32_t)(m7) << 21)
#define T1MAP(x, m) (((m)>>(x*3))&7)
@@ -66,14 +66,14 @@ WRITE8_MEMBER(decocass_state::decocass_sound_command_w)
READ8_MEMBER(decocass_state::decocass_sound_data_r)
{
- UINT8 data = m_soundlatch2->read(space, 0);
+ uint8_t data = m_soundlatch2->read(space, 0);
LOG(2,("CPU %s sound data <- $%02x\n", space.device().tag(), data));
return data;
}
READ8_MEMBER(decocass_state::decocass_sound_ack_r)
{
- UINT8 data = m_sound_ack; /* D6+D7 */
+ uint8_t data = m_sound_ack; /* D6+D7 */
LOG(4,("CPU %s sound ack <- $%02x\n", space.device().tag(), data));
return data;
}
@@ -87,7 +87,7 @@ WRITE8_MEMBER(decocass_state::decocass_sound_data_w)
READ8_MEMBER(decocass_state::decocass_sound_command_r)
{
- UINT8 data = m_soundlatch->read(space, 0);
+ uint8_t data = m_soundlatch->read(space, 0);
LOG(4,("CPU %s sound command <- $%02x\n", space.device().tag(), data));
m_audiocpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
m_sound_ack &= ~0x80;
@@ -116,7 +116,7 @@ READ8_MEMBER(decocass_state::decocass_sound_nmi_enable_r)
READ8_MEMBER(decocass_state::decocass_sound_data_ack_reset_r)
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
LOG(2,("CPU %s sound ack rst <- $%02x\n", space.device().tag(), data));
m_sound_ack &= ~0x40;
return data;
@@ -158,7 +158,7 @@ WRITE8_MEMBER(decocass_state::decocass_adc_w)
*/
READ8_MEMBER(decocass_state::decocass_input_r)
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
static const char *const portnames[] = { "IN0", "IN1", "IN2" };
switch (offset & 7)
@@ -211,7 +211,7 @@ WRITE8_MEMBER(decocass_state::decocass_reset_w)
#ifdef MAME_DEBUG
-void decocass_state::decocass_fno( offs_t offset, UINT8 data )
+void decocass_state::decocass_fno( offs_t offset, uint8_t data )
{
/* 8041ENA/ and is this a FNO write (function number)? */
if (0 == (m_i8041_p2 & 0x01))
@@ -246,7 +246,7 @@ READ8_MEMBER(decocass_state::decocass_type1_r)
if (!m_type1_map)
return 0x00;
- UINT8 data;
+ uint8_t data;
if (1 == (offset & 1))
{
@@ -264,8 +264,8 @@ READ8_MEMBER(decocass_state::decocass_type1_r)
else
{
offs_t promaddr;
- UINT8 save;
- UINT8 *prom = space.machine().root_device().memregion("dongle")->base();
+ uint8_t save;
+ uint8_t *prom = space.machine().root_device().memregion("dongle")->base();
if (m_firsttime)
{
@@ -333,7 +333,7 @@ READ8_MEMBER(decocass_state::decocass_type1_r)
*
***************************************************************************/
-static UINT8 type1_latch_26_pass_3_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T1DIRECT,T1PROM, T1PROM,T1LATCH,T1PROM };
+static uint8_t type1_latch_26_pass_3_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T1DIRECT,T1PROM, T1PROM,T1LATCH,T1PROM };
/***************************************************************************
*
@@ -345,7 +345,7 @@ static UINT8 type1_latch_26_pass_3_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T
*
***************************************************************************/
-static UINT8 type1_pass_136_table[8] ={ T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM,T1PROM,T1DIRECT,T1PROM };
+static uint8_t type1_pass_136_table[8] ={ T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM,T1PROM,T1DIRECT,T1PROM };
/***************************************************************************
*
@@ -358,7 +358,7 @@ static UINT8 type1_pass_136_table[8] ={ T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM,T
*
***************************************************************************/
-static UINT8 type1_latch_xab_pass_x54_table[8] = { T1PROM,T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM };
+static uint8_t type1_latch_xab_pass_x54_table[8] = { T1PROM,T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM,T1DIRECT,T1PROM };
/***************************************************************************
*
@@ -371,7 +371,7 @@ static UINT8 type1_latch_xab_pass_x54_table[8] = { T1PROM,T1PROM,T1DIRECT,T1PROM
*
***************************************************************************/
-static UINT8 type1_latch_27_pass_3_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T1DIRECT,T1PROM,T1PROM,T1PROM,T1LATCH };
+static uint8_t type1_latch_27_pass_3_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T1DIRECT,T1PROM,T1PROM,T1PROM,T1LATCH };
/***************************************************************************
*
@@ -384,7 +384,7 @@ static UINT8 type1_latch_27_pass_3_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T
*
***************************************************************************/
-static UINT8 type1_latch_26_pass_5_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T1PROM,T1PROM,T1DIRECT,T1LATCH,T1PROM };
+static uint8_t type1_latch_26_pass_5_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T1PROM,T1PROM,T1DIRECT,T1LATCH,T1PROM };
/***************************************************************************
*
@@ -397,7 +397,7 @@ static UINT8 type1_latch_26_pass_5_inv_2_table[8] = { T1PROM,T1PROM,T1LATCHINV,T
*
***************************************************************************/
-static UINT8 type1_latch_16_pass_3_inv_1_table[8] = { T1PROM,T1LATCHINV,T1PROM,T1DIRECT,T1PROM,T1PROM,T1LATCH,T1PROM };
+static uint8_t type1_latch_16_pass_3_inv_1_table[8] = { T1PROM,T1LATCHINV,T1PROM,T1DIRECT,T1PROM,T1PROM,T1LATCH,T1PROM };
/***************************************************************************
*
@@ -418,7 +418,7 @@ static UINT8 type1_latch_16_pass_3_inv_1_table[8] = { T1PROM,T1LATCHINV,T1PROM,T
*
***************************************************************************/
-static UINT8 type1_map1100[8] = { T1PROM,T1PROM,T1LATCHINV,T1PROM,T1DIRECT,T1PROM,T1LATCH,T1PROM };
+static uint8_t type1_map1100[8] = { T1PROM,T1PROM,T1LATCHINV,T1PROM,T1DIRECT,T1PROM,T1LATCH,T1PROM };
MACHINE_RESET_MEMBER(decocass_state,cocean1a) /* 10 */
{
@@ -442,13 +442,13 @@ MACHINE_RESET_MEMBER(decocass_state,cocean1a) /* 10 */
***************************************************************************/
READ8_MEMBER(decocass_state::decocass_type2_r)
{
- UINT8 data;
+ uint8_t data;
if (1 == m_type2_xx_latch)
{
if (1 == (offset & 1))
{
- UINT8 *prom = memregion("dongle")->base();
+ uint8_t *prom = memregion("dongle")->base();
data = prom[256 * m_type2_d2_latch + m_type2_promaddr];
LOG(3,("%10s 6502-PC: %04x decocass_type2_r(%02x): $%02x <- prom[%03x]\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, 256 * m_type2_d2_latch + m_type2_promaddr));
}
@@ -524,13 +524,13 @@ WRITE8_MEMBER(decocass_state::decocass_type2_w)
***************************************************************************/
READ8_MEMBER(decocass_state::decocass_type3_r)
{
- UINT8 data, save;
+ uint8_t data, save;
if (1 == (offset & 1))
{
if (1 == m_type3_pal_19)
{
- UINT8 *prom = memregion("dongle")->base();
+ uint8_t *prom = memregion("dongle")->base();
data = prom[m_type3_ctrs];
LOG(3,("%10s 6502-PC: %04x decocass_type3_r(%02x): $%02x <- prom[$%03x]\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_type3_ctrs));
if (++m_type3_ctrs == 4096)
@@ -762,7 +762,7 @@ WRITE8_MEMBER(decocass_state::decocass_type3_w)
READ8_MEMBER(decocass_state::decocass_type4_r)
{
- UINT8 data;
+ uint8_t data;
if (1 == (offset & 1))
{
@@ -781,7 +781,7 @@ READ8_MEMBER(decocass_state::decocass_type4_r)
{
if (m_type4_latch)
{
- UINT8 *prom = space.machine().root_device().memregion("dongle")->base();
+ uint8_t *prom = space.machine().root_device().memregion("dongle")->base();
data = prom[m_type4_ctrs];
LOG(3,("%10s 6502-PC: %04x decocass_type4_r(%02x): $%02x '%c' <- PROM[%04x]\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.', m_type4_ctrs));
@@ -845,7 +845,7 @@ WRITE8_MEMBER(decocass_state::decocass_type4_w)
READ8_MEMBER(decocass_state::decocass_type5_r)
{
- UINT8 data;
+ uint8_t data;
if (1 == (offset & 1))
{
@@ -921,7 +921,7 @@ WRITE8_MEMBER(decocass_state::decocass_type5_w)
READ8_MEMBER(decocass_state::decocass_nodong_r)
{
- UINT8 data;
+ uint8_t data;
if (1 == (offset & 1))
{
@@ -961,12 +961,12 @@ READ8_MEMBER(decocass_state::decocass_nodong_r)
READ8_MEMBER(decocass_state::decocass_e5xx_r)
{
- UINT8 data;
+ uint8_t data;
/* E5x2-E5x3 and mirrors */
if (2 == (offset & E5XX_MASK))
{
- UINT8 bot_eot = (m_cassette->get_status_bits() >> 5) & 1;
+ uint8_t bot_eot = (m_cassette->get_status_bits() >> 5) & 1;
data =
(BIT(m_i8041_p1, 7) << 0) | /* D0 = P17 - REQ/ */
@@ -1406,7 +1406,7 @@ MACHINE_RESET_MEMBER(decocass_state,csdtenis)
MACHINE_RESET_MEMBER(decocass_state,czeroize)
{
- UINT8 *mem = memregion("dongle")->base();
+ uint8_t *mem = memregion("dongle")->base();
decocass_state::machine_reset();
LOG(0,("dongle type #3 (PAL)\n"));
m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this);
@@ -1510,7 +1510,7 @@ WRITE8_MEMBER(decocass_state::i8041_p1_w)
READ8_MEMBER(decocass_state::i8041_p1_r)
{
- UINT8 data = m_i8041_p1;
+ uint8_t data = m_i8041_p1;
if (data != m_i8041_p1_read_latch)
{
@@ -1554,7 +1554,7 @@ WRITE8_MEMBER(decocass_state::i8041_p2_w)
READ8_MEMBER(decocass_state::i8041_p2_r)
{
- UINT8 data;
+ uint8_t data;
data = (m_i8041_p2 & ~0xe0) | m_cassette->get_status_bits();
diff --git a/src/mame/machine/decocass_tape.cpp b/src/mame/machine/decocass_tape.cpp
index 982cd9018aa..a4ae654f5b9 100644
--- a/src/mame/machine/decocass_tape.cpp
+++ b/src/mame/machine/decocass_tape.cpp
@@ -54,11 +54,11 @@
#define REGION_BOT_GAP_LEN_CLOCKS TAPE_MSEC_TO_CLOCKS(300) /* 300ms */
#define REGION_BOT_GAP_END_CLOCK (REGION_BOT_GAP_START_CLOCK+REGION_BOT_GAP_LEN_CLOCKS)
-static UINT16 tape_crc16_byte(UINT16 crc, UINT8 data);
+static uint16_t tape_crc16_byte(uint16_t crc, uint8_t data);
const device_type DECOCASS_TAPE = &device_creator<decocass_tape_device>;
-decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DECOCASS_TAPE, "DECO Cassette Tape", tag, owner, clock, "decocass_tape", __FILE__),
m_tape_timer(nullptr),
m_speed(0),
@@ -108,7 +108,7 @@ void decocass_tape_device::device_start()
/* compute CRCs for each block */
for (curblock = 0; curblock < numblocks; curblock++)
{
- UINT16 crc = 0;
+ uint16_t crc = 0;
int testval;
/* first CRC the 256 bytes of data */
@@ -143,7 +143,7 @@ void decocass_tape_device::device_reset()
CRC data
-------------------------------------------------*/
-static UINT16 tape_crc16_byte(UINT16 crc, UINT8 data)
+static uint16_t tape_crc16_byte(uint16_t crc, uint8_t data)
{
int bit;
@@ -214,7 +214,7 @@ const char *decocass_tape_device::describe_state()
/* in the main data area, the clock alternates at the clock rate */
if (m_bytenum >= BYTE_LEADIN && m_bytenum <= BYTE_LEADOUT)
- clk = ((UINT32)(m_clockpos - REGION_BOT_GAP_END_CLOCK) & 1) ? 0 : 1;
+ clk = ((uint32_t)(m_clockpos - REGION_BOT_GAP_END_CLOCK) & 1) ? 0 : 1;
else if (m_bytenum == BYTE_LONGCLOCK)
clk = 1;
else
@@ -264,7 +264,7 @@ TIMER_CALLBACK_MEMBER( decocass_tape_device::tape_clock_callback )
/* everything else is data */
else
{
- UINT32 dataclock = m_clockpos - REGION_BOT_GAP_END_CLOCK;
+ uint32_t dataclock = m_clockpos - REGION_BOT_GAP_END_CLOCK;
/* compute the block number */
m_region = (tape_region)(REGION_DATA_BLOCK_0 + dataclock / (TAPE_CLOCKS_PER_BYTE * BYTE_BLOCK_TOTAL));
@@ -289,9 +289,9 @@ TIMER_CALLBACK_MEMBER( decocass_tape_device::tape_clock_callback )
bits from the tape
-------------------------------------------------*/
-UINT8 decocass_tape_device::get_status_bits()
+uint8_t decocass_tape_device::get_status_bits()
{
- UINT8 tape_bits = 0;
+ uint8_t tape_bits = 0;
/* bit 0x20 is the BOT/EOT signal, which is also set in the leader/trailer area */
if (m_region == REGION_LEADER || m_region == REGION_BOT || m_region == REGION_EOT || m_region == REGION_TRAILER)
@@ -302,11 +302,11 @@ UINT8 decocass_tape_device::get_status_bits()
if (m_region >= REGION_DATA_BLOCK_0 && m_region <= REGION_DATA_BLOCK_255)
{
int blocknum = m_region - REGION_DATA_BLOCK_0;
- UINT8 byteval = 0x00;
+ uint8_t byteval = 0x00;
/* in the main data area, the clock alternates at the clock rate */
if (m_bytenum >= BYTE_LEADIN && m_bytenum <= BYTE_LEADOUT)
- tape_bits |= ((UINT32)(m_clockpos - REGION_BOT_GAP_END_CLOCK) & 1) ? 0x00 : 0x40;
+ tape_bits |= ((uint32_t)(m_clockpos - REGION_BOT_GAP_END_CLOCK) & 1) ? 0x00 : 0x40;
/* in the longclock area, the clock holds high */
else if (m_bytenum == BYTE_LONGCLOCK)
@@ -347,7 +347,7 @@ UINT8 decocass_tape_device::get_status_bits()
present
-------------------------------------------------*/
-UINT8 decocass_tape_device::is_present()
+uint8_t decocass_tape_device::is_present()
{
return m_tape_data.found();
}
@@ -358,10 +358,10 @@ UINT8 decocass_tape_device::is_present()
playback
-------------------------------------------------*/
-void decocass_tape_device::change_speed(INT8 newspeed)
+void decocass_tape_device::change_speed(int8_t newspeed)
{
attotime newperiod;
- INT8 absnewspeed;
+ int8_t absnewspeed;
/* do nothing if speed has not changed */
if (m_speed == newspeed)
diff --git a/src/mame/machine/decocass_tape.h b/src/mame/machine/decocass_tape.h
index 4d7f03ada4a..ee6b2837308 100644
--- a/src/mame/machine/decocass_tape.h
+++ b/src/mame/machine/decocass_tape.h
@@ -6,12 +6,12 @@
class decocass_tape_device : public device_t
{
public:
- decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~decocass_tape_device() {}
- UINT8 get_status_bits();
- UINT8 is_present();
- void change_speed(INT8 newspeed);
+ uint8_t get_status_bits();
+ uint8_t is_present();
+ void change_speed(int8_t newspeed);
protected:
// device-level overrides
@@ -57,14 +57,14 @@ private:
// internal state
emu_timer * m_tape_timer; /* timer for running the tape */
- INT8 m_speed; /* speed: <-1=fast rewind, -1=reverse, 0=stopped, 1=normal, >1=fast forward */
+ int8_t m_speed; /* speed: <-1=fast rewind, -1=reverse, 0=stopped, 1=normal, >1=fast forward */
tape_region m_region; /* current region */
tape_byte m_bytenum; /* byte number within a datablock */
- UINT8 m_bitnum; /* bit number within a byte */
- UINT32 m_clockpos; /* the current clock position of the tape */
- UINT32 m_numclocks; /* total number of clocks on the entire tape */
- UINT16 m_crc16[256]; /* CRC16 for each block */
- optional_region_ptr<UINT8> m_tape_data;
+ uint8_t m_bitnum; /* bit number within a byte */
+ uint32_t m_clockpos; /* the current clock position of the tape */
+ uint32_t m_numclocks; /* total number of clocks on the entire tape */
+ uint16_t m_crc16[256]; /* CRC16 for each block */
+ optional_region_ptr<uint8_t> m_tape_data;
const char *describe_state();
TIMER_CALLBACK_MEMBER( tape_clock_callback );
diff --git a/src/mame/machine/decocpu6.cpp b/src/mame/machine/decocpu6.cpp
index 957c602976f..28cdac73105 100644
--- a/src/mame/machine/decocpu6.cpp
+++ b/src/mame/machine/decocpu6.cpp
@@ -8,7 +8,7 @@
#include "decocpu6.h"
-deco_cpu6_device::deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+deco_cpu6_device::deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_CPU6, "DECO CPU-6", tag, owner, clock, "decocpu6", __FILE__)
{
}
@@ -24,7 +24,7 @@ void deco_cpu6_device::device_reset()
m6502_device::device_reset();
}
-UINT8 deco_cpu6_device::mi_decrypt::read_sync(UINT16 adr)
+uint8_t deco_cpu6_device::mi_decrypt::read_sync(uint16_t adr)
{
if (adr&1)
return BITSWAP8(direct->read_byte(adr),6,4,7,5,3,2,1,0);
diff --git a/src/mame/machine/decocpu6.h b/src/mame/machine/decocpu6.h
index 27279a6cbe1..0de17580c16 100644
--- a/src/mame/machine/decocpu6.h
+++ b/src/mame/machine/decocpu6.h
@@ -7,13 +7,13 @@
class deco_cpu6_device : public m6502_device {
public:
- deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
class mi_decrypt : public mi_default_normal {
public:
virtual ~mi_decrypt() {}
- virtual UINT8 read_sync(UINT16 adr) override;
+ virtual uint8_t read_sync(uint16_t adr) override;
};
virtual void device_start() override;
diff --git a/src/mame/machine/decocpu7.cpp b/src/mame/machine/decocpu7.cpp
index dc6bb85dff8..61b959d061b 100644
--- a/src/mame/machine/decocpu7.cpp
+++ b/src/mame/machine/decocpu7.cpp
@@ -3,7 +3,7 @@
#include "decocpu7.h"
-deco_cpu7_device::deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+deco_cpu7_device::deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_CPU7, "DECO CPU-7", tag, owner, clock, "decocpu7", __FILE__)
{
}
@@ -20,9 +20,9 @@ void deco_cpu7_device::device_reset()
static_cast<mi_decrypt *>(mintf)->had_written = false;
}
-UINT8 deco_cpu7_device::mi_decrypt::read_sync(UINT16 adr)
+uint8_t deco_cpu7_device::mi_decrypt::read_sync(uint16_t adr)
{
- UINT8 res = direct->read_byte(adr);
+ uint8_t res = direct->read_byte(adr);
if(had_written) {
had_written = false;
if((adr & 0x0104) == 0x0104)
@@ -31,7 +31,7 @@ UINT8 deco_cpu7_device::mi_decrypt::read_sync(UINT16 adr)
return res;
}
-void deco_cpu7_device::mi_decrypt::write(UINT16 adr, UINT8 val)
+void deco_cpu7_device::mi_decrypt::write(uint16_t adr, uint8_t val)
{
program->write_byte(adr, val);
had_written = true;
diff --git a/src/mame/machine/decocpu7.h b/src/mame/machine/decocpu7.h
index 2f2490ed46c..d03007efc04 100644
--- a/src/mame/machine/decocpu7.h
+++ b/src/mame/machine/decocpu7.h
@@ -6,7 +6,7 @@
class deco_cpu7_device : public m6502_device {
public:
- deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
class mi_decrypt : public mi_default_normal {
@@ -14,8 +14,8 @@ protected:
bool had_written;
virtual ~mi_decrypt() {}
- virtual UINT8 read_sync(UINT16 adr) override;
- virtual void write(UINT16 adr, UINT8 val) override;
+ virtual uint8_t read_sync(uint16_t adr) override;
+ virtual void write(uint16_t adr, uint8_t val) override;
};
virtual void device_start() override;
diff --git a/src/mame/machine/decocrpt.cpp b/src/mame/machine/decocrpt.cpp
index 680481a3e52..dda584c2d76 100644
--- a/src/mame/machine/decocrpt.cpp
+++ b/src/mame/machine/decocrpt.cpp
@@ -46,13 +46,13 @@ Sotsugyo Shousho 1995
#include "emu.h"
#include "machine/decocrpt.h"
-static const UINT16 xor_masks[16] =
+static const uint16_t xor_masks[16] =
{
0xd556,0x73cb,0x2963,0x4b9a,0xb3bc,0xbc73,0xcbc9,0xaeb5,
0x1e6d,0xd5b5,0xe676,0x5cc5,0x395a,0xdaae,0x2629,0xe59e,
};
-static const UINT8 swap_patterns[8][16] =
+static const uint8_t swap_patterns[8][16] =
{
{ 0xf,0x8,0x9,0xc,0xa,0xd,0xb,0xe, 0x2,0x7,0x4,0x3,0x1,0x5,0x6,0x0 },
{ 0xc,0xa,0xb,0x9,0x8,0xf,0xe,0xd, 0x6,0x0,0x3,0x5,0x7,0x4,0x2,0x1 },
@@ -64,7 +64,7 @@ static const UINT8 swap_patterns[8][16] =
{ 0x9,0x8,0xe,0xa,0xf,0xb,0xd,0xc, 0x6,0x0,0x5,0x2,0x4,0x1,0x3,0x7 },
};
-static const UINT8 deco56_xor_table[0x800] =
+static const uint8_t deco56_xor_table[0x800] =
{
0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9,10, 7,11,11, 9,11, 3, 7,10,12,13, 3,14, 0, 0, 9, 0,15, 3, 4,14,
6, 3,14,14, 3,12, 3,13, 9, 5,13, 3, 8, 2, 7,14, 2, 5, 1, 2, 3, 4,14,11, 8, 0, 6, 7,10, 3, 4, 7,
@@ -132,7 +132,7 @@ static const UINT8 deco56_xor_table[0x800] =
11, 6, 3, 0, 5,11,14,14,14, 4,13, 6,11, 6, 4,12,15, 2, 4, 1, 1, 5, 1,15, 7, 0, 5, 0, 0, 0,12, 1,
};
-static const UINT16 deco56_address_table[0x800] =
+static const uint16_t deco56_address_table[0x800] =
{
0x527,0x1a1,0x2f6,0x523,0x297,0x005,0x141,0x3b4,0x539,0x794,0x6dd,0x498,0x59b,0x119,0x5db,0x631,
0x2f1,0x565,0x409,0x158,0x2d6,0x16e,0x571,0x0b9,0x543,0x52b,0x668,0x0c0,0x5fd,0x216,0x5ea,0x24e,
@@ -264,7 +264,7 @@ static const UINT16 deco56_address_table[0x800] =
0x625,0x4bc,0x335,0x42b,0x5d8,0x07d,0x03f,0x089,0x7e9,0x07c,0x1cf,0x024,0x188,0x53b,0x2bf,0x726,
};
-static const UINT8 deco56_swap_table[0x800] =
+static const uint8_t deco56_swap_table[0x800] =
{
4,0,7,2,0,0,7,2,0,1,6,3,2,2,2,2,0,5,6,3,7,0,0,5,1,1,1,7,1,0,0,0,
2,5,6,6,2,0,4,1,5,0,1,7,4,7,0,4,6,2,1,5,3,1,2,4,6,4,2,0,4,3,3,7,
@@ -332,7 +332,7 @@ static const UINT8 deco56_swap_table[0x800] =
6,5,6,0,1,1,6,0,6,1,7,2,4,5,6,5,0,4,0,3,2,3,7,7,0,3,5,0,4,1,1,1,
};
-static const UINT8 deco74_xor_table[0x800] =
+static const uint8_t deco74_xor_table[0x800] =
{
13,13, 0,10, 8,15,12, 0,10, 8,13,15,12, 3,15, 2,11, 1, 8,10,13, 4,10,12,11, 2, 0, 3, 0,11, 8,11,
5,14,11, 2, 5, 3, 8,11, 8,13,14, 4, 3,13,11,10,14, 6, 9,11,11, 8, 0,15, 2, 4, 5, 7,15, 8,13,11,
@@ -400,7 +400,7 @@ static const UINT8 deco74_xor_table[0x800] =
7, 7,12, 5, 3,14, 1, 5, 1,10, 6, 7, 9, 8,15, 7,13,11, 4, 5, 4,10,14,14,12, 1,13,14,15,14,15,10,
};
-static const UINT16 deco74_address_table[0x800] =
+static const uint16_t deco74_address_table[0x800] =
{
0x526,0x684,0x15f,0x1ad,0x736,0x341,0x4c3,0x23c,0x3eb,0x01f,0x18e,0x375,0x029,0x227,0x707,0x506,
0x5ce,0x0dc,0x5dc,0x5fd,0x15c,0x013,0x7b9,0x3c1,0x77d,0x1eb,0x53d,0x4a9,0x66e,0x0a9,0x4e2,0x361,
@@ -532,7 +532,7 @@ static const UINT16 deco74_address_table[0x800] =
0x174,0x060,0x674,0x6ec,0x7bb,0x288,0x6ee,0x737,0x34c,0x617,0x4bc,0x5d5,0x78c,0x465,0x126,0x626,
};
-static const UINT8 deco74_swap_table[0x800] =
+static const uint8_t deco74_swap_table[0x800] =
{
2,7,5,7,1,1,4,4,7,5,6,7,7,3,4,3,0,2,1,3,0,4,7,7,2,5,3,1,4,4,6,7,
6,7,4,5,1,3,0,3,7,2,5,0,1,5,2,1,4,0,6,1,1,2,4,2,1,0,6,5,2,6,4,6,
@@ -600,11 +600,11 @@ static const UINT8 deco74_swap_table[0x800] =
4,7,2,2,1,3,4,4,1,7,0,2,5,4,7,3,7,6,1,5,6,0,7,4,1,1,5,2,2,6,7,2,
};
-static void deco_decrypt(running_machine &machine,const char *rgntag,const UINT8 *xor_table,const UINT16 *address_table,const UINT8 *swap_table,int remap_only)
+static void deco_decrypt(running_machine &machine,const char *rgntag,const uint8_t *xor_table,const uint16_t *address_table,const uint8_t *swap_table,int remap_only)
{
- UINT16 *rom = (UINT16 *)machine.root_device().memregion(rgntag)->base();
+ uint16_t *rom = (uint16_t *)machine.root_device().memregion(rgntag)->base();
int len = machine.root_device().memregion(rgntag)->bytes()/2;
- std::vector<UINT16> buffer(len);
+ std::vector<uint16_t> buffer(len);
int i;
/* we work on 16-bit words but data is loaded as 8-bit, so swap bytes on LSB machines */
diff --git a/src/mame/machine/decopincpu.cpp b/src/mame/machine/decopincpu.cpp
index e1ad37b8b89..c0f7087e2f4 100644
--- a/src/mame/machine/decopincpu.cpp
+++ b/src/mame/machine/decopincpu.cpp
@@ -128,7 +128,7 @@ WRITE8_MEMBER( decocpu_type1_device::lamp1_w )
READ8_MEMBER( decocpu_type1_device::display_strobe_r )
{
- UINT8 ret = 0x80;
+ uint8_t ret = 0x80;
if(BIT(ioport("DIAGS")->read(), 4)) // W7 Jumper
ret &= ~0x80;
@@ -262,7 +262,7 @@ ioport_constructor decocpu_type1_device::device_input_ports() const
return INPUT_PORTS_NAME( decocpu1 );
}
-decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DECOCPU1, "Data East Pinball CPU Board Type 1", tag, owner, clock, "decocpu1", __FILE__),
m_cpu(*this,"maincpu"),
m_pia21(*this, "pia21"),
@@ -281,7 +281,7 @@ decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, const
m_write_solenoid(*this)
{}
-decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_cpu(*this,"maincpu"),
m_pia21(*this, "pia21"),
@@ -302,7 +302,7 @@ decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device
void decocpu_type1_device::device_start()
{
- UINT8* ROM = memregion(m_cputag)->base();
+ uint8_t* ROM = memregion(m_cputag)->base();
// resolve callbacks
m_read_display.resolve_safe(0);
@@ -327,11 +327,11 @@ void decocpu_type1_device::static_set_cpuregion(device_t &device, const char *ta
cpuboard.m_cputag = tag;
}
-decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: decocpu_type1_device(mconfig, DECOCPU2, "Data East Pinball CPU Board Type 2", tag, owner, clock, "decocpu2", __FILE__)
{}
-decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: decocpu_type1_device(mconfig, type, name, tag, owner, clock, shortname, source)
{}
@@ -345,11 +345,11 @@ void decocpu_type2_device::device_start()
decocpu_type1_device::device_start();
}
-decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: decocpu_type2_device(mconfig, DECOCPU3, "Data East Pinball CPU Board Type 3", tag, owner, clock, "decocpu3", __FILE__)
{}
-decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: decocpu_type2_device(mconfig, type, name, tag, owner, clock, shortname, source)
{}
@@ -358,7 +358,7 @@ void decocpu_type3_device::device_start()
decocpu_type1_device::device_start();
}
-decocpu_type3b_device::decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+decocpu_type3b_device::decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: decocpu_type3_device(mconfig, DECOCPU3, "Data East Pinball CPU Board Type 3B", tag, owner, clock, "decocpu3b", __FILE__)
{}
diff --git a/src/mame/machine/decopincpu.h b/src/mame/machine/decopincpu.h
index 7a8264e8508..e4e5fffa304 100644
--- a/src/mame/machine/decopincpu.h
+++ b/src/mame/machine/decopincpu.h
@@ -64,8 +64,8 @@
class decocpu_type1_device : public device_t
{
public:
- decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- decocpu_type1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ decocpu_type1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
required_device<cpu_device> m_cpu;
required_device<pia6821_device> m_pia21;
required_device<pia6821_device> m_pia24;
@@ -134,8 +134,8 @@ private:
class decocpu_type2_device : public decocpu_type1_device
{
public:
- decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- decocpu_type2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ decocpu_type2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
protected:
// overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -145,8 +145,8 @@ protected:
class decocpu_type3_device : public decocpu_type2_device
{
public:
- decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- decocpu_type3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ decocpu_type3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
protected:
// overrides
@@ -156,7 +156,7 @@ protected:
class decocpu_type3b_device : public decocpu_type3_device
{
public:
- decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// overrides
diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp
index 3ce329ca8fe..d9f66ae9c3f 100644
--- a/src/mame/machine/dgn_beta.cpp
+++ b/src/mame/machine/dgn_beta.cpp
@@ -142,7 +142,7 @@ void dgn_beta_state::UpdateBanks(int first, int last)
address_space &space_0 = m_maincpu->space(AS_PROGRAM);
address_space &space_1 = machine().device(DMACPU_TAG)->memory().space(AS_PROGRAM);
int Page;
- UINT8 *readbank;
+ uint8_t *readbank;
int bank_start;
int bank_end;
int MapPage;
@@ -213,7 +213,7 @@ void dgn_beta_state::UpdateBanks(int first, int last)
//
void dgn_beta_state::SetDefaultTask()
{
-// UINT8 *videoram = m_videoram;
+// uint8_t *videoram = m_videoram;
int Idx;
LOG_DEFAULT_TASK(("SetDefaultTask()\n"));
@@ -747,12 +747,12 @@ void dgn_beta_state::cpu0_recalc_irq(int state)
pia6821_device *pia_0 = machine().device<pia6821_device>( PIA_0_TAG );
pia6821_device *pia_1 = machine().device<pia6821_device>( PIA_1_TAG );
pia6821_device *pia_2 = machine().device<pia6821_device>( PIA_2_TAG );
- UINT8 pia0_irq_a = pia_0->irq_a_state();
- UINT8 pia1_irq_a = pia_1->irq_a_state();
- UINT8 pia1_irq_b = pia_1->irq_b_state();
- UINT8 pia2_irq_a = pia_2->irq_a_state();
- UINT8 pia2_irq_b = pia_2->irq_b_state();
- UINT8 IRQ;
+ uint8_t pia0_irq_a = pia_0->irq_a_state();
+ uint8_t pia1_irq_a = pia_1->irq_a_state();
+ uint8_t pia1_irq_b = pia_1->irq_b_state();
+ uint8_t pia2_irq_a = pia_2->irq_a_state();
+ uint8_t pia2_irq_b = pia_2->irq_b_state();
+ uint8_t IRQ;
if (pia0_irq_a || pia1_irq_a || pia1_irq_b || pia2_irq_a || pia2_irq_b)
IRQ = ASSERT_LINE;
@@ -766,8 +766,8 @@ void dgn_beta_state::cpu0_recalc_irq(int state)
void dgn_beta_state::cpu0_recalc_firq(int state)
{
pia6821_device *pia_0 = machine().device<pia6821_device>( PIA_0_TAG );
- UINT8 pia0_irq_b = pia_0->irq_b_state();
- UINT8 FIRQ;
+ uint8_t pia0_irq_b = pia_0->irq_b_state();
+ uint8_t FIRQ;
if (pia0_irq_b)
FIRQ = ASSERT_LINE;
@@ -1101,7 +1101,7 @@ static const char *const os9syscalls[] =
};
-offs_t dgn_beta_state::dgnbeta_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
+offs_t dgn_beta_state::dgnbeta_dasm_override(device_t &device, char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
{
unsigned call;
unsigned result = 0;
diff --git a/src/mame/machine/dgnalpha.cpp b/src/mame/machine/dgnalpha.cpp
index 760df71256a..3523f97ecab 100644
--- a/src/mame/machine/dgnalpha.cpp
+++ b/src/mame/machine/dgnalpha.cpp
@@ -102,7 +102,7 @@ void dragon_alpha_state::device_reset(void)
// modem_r
//-------------------------------------------------
-UINT8 dragon_alpha_state::modem_r(offs_t offset)
+uint8_t dragon_alpha_state::modem_r(offs_t offset)
{
return 0xFF;
}
@@ -113,7 +113,7 @@ UINT8 dragon_alpha_state::modem_r(offs_t offset)
// modem_w
//-------------------------------------------------
-void dragon_alpha_state::modem_w(offs_t offset, UINT8 data)
+void dragon_alpha_state::modem_w(offs_t offset, uint8_t data)
{
}
@@ -129,7 +129,7 @@ void dragon_alpha_state::modem_w(offs_t offset, UINT8 data)
READ8_MEMBER( dragon_alpha_state::ff20_read )
{
- UINT8 result = 0x00;
+ uint8_t result = 0x00;
switch(offset & 0x0f)
{
@@ -220,7 +220,7 @@ WRITE8_MEMBER( dragon_alpha_state::ff20_write )
WRITE8_MEMBER( dragon_alpha_state::pia2_pa_w )
{
- UINT8 ddr = ~m_pia_2->port_b_z_mask();
+ uint8_t ddr = ~m_pia_2->port_b_z_mask();
/* If bit 2 of the pia2 ddra is 1 then this pin is an output so use it */
/* to control the paging of the boot and basic roms */
diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp
index 48af0593f83..9d8e58134f0 100644
--- a/src/mame/machine/dmv_keyb.cpp
+++ b/src/mame/machine/dmv_keyb.cpp
@@ -207,7 +207,7 @@ ioport_constructor dmv_keyboard_device::device_input_ports() const
// dmv_keyboard_device - constructor
//-------------------------------------------------
-dmv_keyboard_device::dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+dmv_keyboard_device::dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DMV_KEYBOARD, "Decision Mate V Keyboard", tag, owner, clock, "dmv_keyboard", __FILE__)
, m_maincpu(*this, "mcu")
, m_keyboard(*this, "COL.%u", 0)
diff --git a/src/mame/machine/dmv_keyb.h b/src/mame/machine/dmv_keyb.h
index e83e6957641..f0a2930210a 100644
--- a/src/mame/machine/dmv_keyb.h
+++ b/src/mame/machine/dmv_keyb.h
@@ -34,7 +34,7 @@ class dmv_keyboard_device : public device_t
{
public:
// construction/destruction
- dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
@@ -58,7 +58,7 @@ private:
required_device<upi41_cpu_device> m_maincpu;
required_ioport_array<16> m_keyboard;
- UINT8 m_col;
+ uint8_t m_col;
int m_sd_data_state;
int m_sd_poll_state;
};
diff --git a/src/mame/machine/docastle.cpp b/src/mame/machine/docastle.cpp
index d4bc39159a6..3d34c7f1668 100644
--- a/src/mame/machine/docastle.cpp
+++ b/src/mame/machine/docastle.cpp
@@ -36,7 +36,7 @@ if it was a small shared buffer. The order of operations is:
READ8_MEMBER(docastle_state::docastle_shared0_r)
{
if (offset == 8 && LOG)
- logerror("CPU #0 shared0r clock = %d\n", (UINT32)m_maincpu->total_cycles());
+ logerror("CPU #0 shared0r clock = %d\n", (uint32_t)m_maincpu->total_cycles());
return m_buffer0[offset];
}
@@ -45,7 +45,7 @@ READ8_MEMBER(docastle_state::docastle_shared0_r)
READ8_MEMBER(docastle_state::docastle_shared1_r)
{
if (offset == 8 && LOG)
- logerror("CPU #1 shared1r clock = %d\n", (UINT32)m_slave->total_cycles());
+ logerror("CPU #1 shared1r clock = %d\n", (uint32_t)m_slave->total_cycles());
return m_buffer1[offset];
}
@@ -57,7 +57,7 @@ WRITE8_MEMBER(docastle_state::docastle_shared0_w)
logerror("CPU #1 shared0w %02x %02x %02x %02x %02x %02x %02x %02x %02x clock = %d\n",
m_buffer0[0], m_buffer0[1], m_buffer0[2], m_buffer0[3],
m_buffer0[4], m_buffer0[5], m_buffer0[6], m_buffer0[7],
- data, (UINT32)m_slave->total_cycles());
+ data, (uint32_t)m_slave->total_cycles());
m_buffer0[offset] = data;
@@ -75,7 +75,7 @@ WRITE8_MEMBER(docastle_state::docastle_shared1_w)
logerror("CPU #0 shared1w %02x %02x %02x %02x %02x %02x %02x %02x %02x clock = %d\n",
m_buffer1[0], m_buffer1[1], m_buffer1[2], m_buffer1[3],
m_buffer1[4], m_buffer1[5], m_buffer1[6], m_buffer1[7],
- data, (UINT32)m_maincpu->total_cycles());
+ data, (uint32_t)m_maincpu->total_cycles());
/* freeze execution of the master CPU until the slave has used the shared memory */
if (offset == 8)
diff --git a/src/mame/machine/docg3.cpp b/src/mame/machine/docg3.cpp
index 1d6fee6c0c6..4ab93b55ea0 100644
--- a/src/mame/machine/docg3.cpp
+++ b/src/mame/machine/docg3.cpp
@@ -38,33 +38,33 @@ const device_type DISKONCHIP_G3 = &device_creator<diskonchip_g3_device>;
// diskonchip_g3_device - constructor
//-------------------------------------------------
-diskonchip_g3_device::diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+diskonchip_g3_device::diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DISKONCHIP_G3, "DiskOnChip G3", tag, owner, clock, "diskonchip_g3", __FILE__),
device_nvram_interface(mconfig, *this)
{
}
-UINT32 diskonchip_g3_device::g3_offset_data_1()
+uint32_t diskonchip_g3_device::g3_offset_data_1()
{
// printf( "block %d pages %d page %d planes %d plane %d user_data_size %d extra_area_size %d\n", doc->block, doc->pages, doc->page, doc->planes, doc->plane, doc->user_data_size, doc->extra_area_size);
return ((((m_block * m_pages) + m_page) * m_planes) + m_plane) * (m_user_data_size + m_extra_area_size);
}
-UINT32 diskonchip_g3_device::g3_offset_data_2()
+uint32_t diskonchip_g3_device::g3_offset_data_2()
{
return ((((m_block * m_pages) + m_page) * m_planes) + m_plane) * 16;
}
-UINT32 diskonchip_g3_device::g3_offset_data_3()
+uint32_t diskonchip_g3_device::g3_offset_data_3()
{
return m_block * 8;
}
-UINT8 diskonchip_g3_device::g3_read_data()
+uint8_t diskonchip_g3_device::g3_read_data()
{
- UINT8 data = 0;
- UINT32 offset;
+ uint8_t data = 0;
+ uint32_t offset;
if (m_test == 0)
{
// read page data (512 + 16)
@@ -105,7 +105,7 @@ UINT8 diskonchip_g3_device::g3_read_data()
READ16_MEMBER( diskonchip_g3_device::sec_1_r )
{
- UINT16 data;
+ uint16_t data;
if (m_sec_2[0x1B] & 0x40)
{
data = g3_read_data();
@@ -119,9 +119,9 @@ READ16_MEMBER( diskonchip_g3_device::sec_1_r )
return data;
}
-void diskonchip_g3_device::g3_write_data(UINT8 data)
+void diskonchip_g3_device::g3_write_data(uint8_t data)
{
- UINT32 offset;
+ uint32_t offset;
if (m_test == 3)
{
// read page data (512 + 16)
@@ -132,7 +132,7 @@ void diskonchip_g3_device::g3_write_data(UINT8 data)
}
if (m_transfer_offset == 0)
{
- const UINT8 xxx[] = { 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ const uint8_t xxx[] = { 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
offset = g3_offset_data_2();
memcpy( m_data[1].get() + offset, xxx, 16);
}
@@ -169,7 +169,7 @@ WRITE16_MEMBER( diskonchip_g3_device::sec_1_w )
// #define DoC_G3_FlashCtrl 0x1038
// #define DoC_G3_Nop 0x103e
-UINT16 diskonchip_g3_device::sec_2_read_1000()
+uint16_t diskonchip_g3_device::sec_2_read_1000()
{
if (m_device == 0)
{
@@ -181,7 +181,7 @@ UINT16 diskonchip_g3_device::sec_2_read_1000()
}
}
-UINT16 diskonchip_g3_device::sec_2_read_1074()
+uint16_t diskonchip_g3_device::sec_2_read_1074()
{
if (m_device == 0)
{
@@ -193,16 +193,16 @@ UINT16 diskonchip_g3_device::sec_2_read_1074()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_1042()
+uint8_t diskonchip_g3_device::sec_2_read_1042()
{
- UINT8 data;
+ uint8_t data;
if ((m_block == 0) && (m_page == 0) && (m_transfersize == 0x27))
{
data = 0x07;
}
else
{
- UINT32 offset = g3_offset_data_2() + 0x02;
+ uint32_t offset = g3_offset_data_2() + 0x02;
data = m_data[1][offset]; //0x07; //data & ~(1 << 7);
if ((m_sec_2[0x41] & 0x10) == 0)
{
@@ -220,11 +220,11 @@ UINT8 diskonchip_g3_device::sec_2_read_1042()
return data;
}
-UINT8 diskonchip_g3_device::sec_2_read_1046()
+uint8_t diskonchip_g3_device::sec_2_read_1046()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x06;
+ uint32_t offset = g3_offset_data_2() + 0x06;
return m_data[1][offset];
}
else
@@ -233,11 +233,11 @@ UINT8 diskonchip_g3_device::sec_2_read_1046()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_1048()
+uint8_t diskonchip_g3_device::sec_2_read_1048()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x08;
+ uint32_t offset = g3_offset_data_2() + 0x08;
return m_data[1][offset];
}
else
@@ -246,11 +246,11 @@ UINT8 diskonchip_g3_device::sec_2_read_1048()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_1049()
+uint8_t diskonchip_g3_device::sec_2_read_1049()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x09;
+ uint32_t offset = g3_offset_data_2() + 0x09;
return m_data[1][offset];
}
else
@@ -259,11 +259,11 @@ UINT8 diskonchip_g3_device::sec_2_read_1049()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_104A()
+uint8_t diskonchip_g3_device::sec_2_read_104A()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x0A;
+ uint32_t offset = g3_offset_data_2() + 0x0A;
return m_data[1][offset];
}
else
@@ -272,11 +272,11 @@ UINT8 diskonchip_g3_device::sec_2_read_104A()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_104B()
+uint8_t diskonchip_g3_device::sec_2_read_104B()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x0B;
+ uint32_t offset = g3_offset_data_2() + 0x0B;
return m_data[1][offset];
}
else
@@ -285,11 +285,11 @@ UINT8 diskonchip_g3_device::sec_2_read_104B()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_104C()
+uint8_t diskonchip_g3_device::sec_2_read_104C()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x0C;
+ uint32_t offset = g3_offset_data_2() + 0x0C;
return m_data[1][offset];
}
else
@@ -298,11 +298,11 @@ UINT8 diskonchip_g3_device::sec_2_read_104C()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_104D()
+uint8_t diskonchip_g3_device::sec_2_read_104D()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x0D;
+ uint32_t offset = g3_offset_data_2() + 0x0D;
return m_data[1][offset];
}
else
@@ -311,11 +311,11 @@ UINT8 diskonchip_g3_device::sec_2_read_104D()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_104E()
+uint8_t diskonchip_g3_device::sec_2_read_104E()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x0E;
+ uint32_t offset = g3_offset_data_2() + 0x0E;
return m_data[1][offset];
}
else
@@ -324,11 +324,11 @@ UINT8 diskonchip_g3_device::sec_2_read_104E()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_104F()
+uint8_t diskonchip_g3_device::sec_2_read_104F()
{
if (m_test == 0)
{
- UINT32 offset = g3_offset_data_2() + 0x0F;
+ uint32_t offset = g3_offset_data_2() + 0x0F;
return m_data[1][offset];
}
else
@@ -337,22 +337,22 @@ UINT8 diskonchip_g3_device::sec_2_read_104F()
}
}
-UINT8 diskonchip_g3_device::sec_2_read_100E()
+uint8_t diskonchip_g3_device::sec_2_read_100E()
{
return 0x81;
}
-UINT8 diskonchip_g3_device::sec_2_read_1014()
+uint8_t diskonchip_g3_device::sec_2_read_1014()
{
return 0x01;
}
-UINT8 diskonchip_g3_device::sec_2_read_1022()
+uint8_t diskonchip_g3_device::sec_2_read_1022()
{
return 0x85;
}
-UINT8 diskonchip_g3_device::sec_2_read_1038()
+uint8_t diskonchip_g3_device::sec_2_read_1038()
{
// bit 0 = ?
// bit 1 = ? error 0x7C
@@ -372,9 +372,9 @@ UINT8 diskonchip_g3_device::sec_2_read_1038()
}
}
-UINT16 diskonchip_g3_device::sec_2_read16(UINT32 offset)
+uint16_t diskonchip_g3_device::sec_2_read16(uint32_t offset)
{
- UINT16 data = (m_sec_2[offset+0] << 0) + (m_sec_2[offset+1] << 8);
+ uint16_t data = (m_sec_2[offset+0] << 0) + (m_sec_2[offset+1] << 8);
switch (0x1000 + offset)
{
// ?
@@ -403,9 +403,9 @@ UINT16 diskonchip_g3_device::sec_2_read16(UINT32 offset)
return data;
}
-UINT8 diskonchip_g3_device::sec_2_read8(UINT32 offset)
+uint8_t diskonchip_g3_device::sec_2_read8(uint32_t offset)
{
- UINT8 data = m_sec_2[offset];
+ uint8_t data = m_sec_2[offset];
switch (0x1000 + offset)
{
// ?
@@ -434,10 +434,10 @@ UINT8 diskonchip_g3_device::sec_2_read8(UINT32 offset)
return data;
}
-void diskonchip_g3_device::sec_2_write_100C(UINT8 data)
+void diskonchip_g3_device::sec_2_write_100C(uint8_t data)
{
const char *mode_name[] = { "reset", "normal", "deep power down" };
- UINT32 mode = data & 3;
+ uint32_t mode = data & 3;
verboselog(*this, 5, "mode %d (%s)\n", mode, mode_name[mode]);
if (mode == 0)
{
@@ -445,7 +445,7 @@ void diskonchip_g3_device::sec_2_write_100C(UINT8 data)
}
}
-void diskonchip_g3_device::sec_2_write_1032(UINT8 data)
+void diskonchip_g3_device::sec_2_write_1032(uint8_t data)
{
verboselog(*this, 5, "flash select %02X\n", data);
if ((data == 0x12) || (data == 0x27))
@@ -459,9 +459,9 @@ void diskonchip_g3_device::sec_2_write_1032(UINT8 data)
void diskonchip_g3_device::g3_erase_block()
{
- UINT32 offset;
+ uint32_t offset;
int i, j;
- const UINT8 xxx[] = { 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0xCE, 0x00, 0xCF, 0x72, 0xFC, 0x1B, 0xA9, 0xC7, 0xB9, 0x00 };
+ const uint8_t xxx[] = { 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0xCE, 0x00, 0xCF, 0x72, 0xFC, 0x1B, 0xA9, 0xC7, 0xB9, 0x00 };
verboselog(*this, 5, "erase block %04X\n", m_block);
for (i=0;i<m_pages;i++)
{
@@ -484,7 +484,7 @@ void diskonchip_g3_device::g3_erase_block()
// 'maincpu' (028848E4): diskonchip_sec_2_write_1034: unknown value 11/1D
// 'maincpu' (028848E4): diskonchip_sec_2_write_1034: unknown value 10/1D
-void diskonchip_g3_device::sec_2_write_1034(UINT8 data)
+void diskonchip_g3_device::sec_2_write_1034(uint8_t data)
{
verboselog(*this, 5, "flash command %02X\n", data);
if ((m_sec_2[0x32] == 0x0E) && (data == 0x00))
@@ -590,14 +590,14 @@ void diskonchip_g3_device::sec_2_write_1034(UINT8 data)
}
}
-void diskonchip_g3_device::sec_2_write_1036(UINT8 data)
+void diskonchip_g3_device::sec_2_write_1036(uint8_t data)
{
if (m_sec_2[0x34] == 0x60)
{
m_data_1036 |= data << (8 * m_data_1036_count++);
if (m_data_1036_count == 3)
{
- UINT32 block, page, plane;
+ uint32_t block, page, plane;
block = (m_data_1036 >> 7);
if (block >= m_blocks) fatalerror( "DOCG3: invalid block (%d)\n", block);
plane = (m_data_1036 >> 6) & 1;
@@ -616,7 +616,7 @@ void diskonchip_g3_device::sec_2_write_1036(UINT8 data)
m_data_1036 |= data << (8 * m_data_1036_count++);
if (m_data_1036_count == 4)
{
- UINT32 block, page, plane, unk;
+ uint32_t block, page, plane, unk;
block = (m_data_1036 >> 15);
plane = (m_data_1036 >> 14) & 1;
page = (m_data_1036 >> 8) & 0x3F;
@@ -638,19 +638,19 @@ void diskonchip_g3_device::sec_2_write_1036(UINT8 data)
}
}
-void diskonchip_g3_device::sec_2_write_1040(UINT16 data)
+void diskonchip_g3_device::sec_2_write_1040(uint16_t data)
{
m_transfersize = (data & 0x3FF);
verboselog(*this, 5, "flash transfer size %04X\n", m_transfersize);
}
-void diskonchip_g3_device::sec_2_write_100A(UINT8 data)
+void diskonchip_g3_device::sec_2_write_100A(uint8_t data)
{
m_device = data & 3;
verboselog(*this, 5, "select device %d\n", m_device);
}
-void diskonchip_g3_device::sec_2_write16(UINT32 offset, UINT16 data)
+void diskonchip_g3_device::sec_2_write16(uint32_t offset, uint16_t data)
{
m_sec_2[offset+0] = (data >> 0) & 0xFF;
m_sec_2[offset+1] = (data >> 8) & 0xFF;
@@ -672,7 +672,7 @@ void diskonchip_g3_device::sec_2_write16(UINT32 offset, UINT16 data)
}
}
-void diskonchip_g3_device::sec_2_write8(UINT32 offset, UINT8 data)
+void diskonchip_g3_device::sec_2_write8(uint32_t offset, uint8_t data)
{
m_sec_2[offset] = data;
verboselog(*this, 9, "(DOC) %08X <- %02X\n", 0x1000 + offset, data);
@@ -734,7 +734,7 @@ WRITE16_MEMBER( diskonchip_g3_device::sec_2_w )
READ16_MEMBER( diskonchip_g3_device::sec_3_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
verboselog(*this, 9, "(DOC) %08X -> %04X\n", 0x1800 + (offset << 1), data);
return data;
}
@@ -777,12 +777,12 @@ void diskonchip_g3_device::device_start()
memset(m_sec_2, 0, sizeof(m_sec_2));
- m_data[0] = std::make_unique<UINT8[]>(m_data_size[0]);
- memset(m_data[0].get(), 0, sizeof(UINT8) * m_data_size[0]);
- m_data[1] = std::make_unique<UINT8[]>(m_data_size[1]);
- memset(m_data[1].get(), 0, sizeof(UINT8) * m_data_size[1]);
- m_data[2] = std::make_unique<UINT8[]>(m_data_size[2]);
- memset(m_data[2].get(), 0, sizeof(UINT8) * m_data_size[2]);
+ m_data[0] = std::make_unique<uint8_t[]>(m_data_size[0]);
+ memset(m_data[0].get(), 0, sizeof(uint8_t) * m_data_size[0]);
+ m_data[1] = std::make_unique<uint8_t[]>(m_data_size[1]);
+ memset(m_data[1].get(), 0, sizeof(uint8_t) * m_data_size[1]);
+ m_data[2] = std::make_unique<uint8_t[]>(m_data_size[2]);
+ memset(m_data[2].get(), 0, sizeof(uint8_t) * m_data_size[2]);
// diskonchip_load( device, "diskonchip");
diff --git a/src/mame/machine/docg3.h b/src/mame/machine/docg3.h
index 36423f12641..76346933d1e 100644
--- a/src/mame/machine/docg3.h
+++ b/src/mame/machine/docg3.h
@@ -22,7 +22,7 @@ class diskonchip_g3_device : public device_t,
{
public:
// construction/destruction
- diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_size(int _size) { m_size = _size; }
protected:
@@ -42,59 +42,59 @@ public:
DECLARE_READ16_MEMBER( sec_3_r );
DECLARE_WRITE16_MEMBER( sec_3_w );
private:
- UINT32 g3_offset_data_1();
- UINT32 g3_offset_data_2();
- UINT32 g3_offset_data_3();
- UINT8 g3_read_data();
- void g3_write_data(UINT8 data);
- UINT16 sec_2_read_1000();
- UINT16 sec_2_read_1074();
- UINT8 sec_2_read_1042();
- UINT8 sec_2_read_1046();
- UINT8 sec_2_read_1048();
- UINT8 sec_2_read_1049();
- UINT8 sec_2_read_104A();
- UINT8 sec_2_read_104B();
- UINT8 sec_2_read_104C();
- UINT8 sec_2_read_104D();
- UINT8 sec_2_read_104E();
- UINT8 sec_2_read_104F();
- UINT8 sec_2_read_100E();
- UINT8 sec_2_read_1014();
- UINT8 sec_2_read_1022();
- UINT8 sec_2_read_1038();
- UINT16 sec_2_read16(UINT32 offset);
- UINT8 sec_2_read8(UINT32 offset);
- void sec_2_write_100C(UINT8 data);
- void sec_2_write_1032(UINT8 data);
+ uint32_t g3_offset_data_1();
+ uint32_t g3_offset_data_2();
+ uint32_t g3_offset_data_3();
+ uint8_t g3_read_data();
+ void g3_write_data(uint8_t data);
+ uint16_t sec_2_read_1000();
+ uint16_t sec_2_read_1074();
+ uint8_t sec_2_read_1042();
+ uint8_t sec_2_read_1046();
+ uint8_t sec_2_read_1048();
+ uint8_t sec_2_read_1049();
+ uint8_t sec_2_read_104A();
+ uint8_t sec_2_read_104B();
+ uint8_t sec_2_read_104C();
+ uint8_t sec_2_read_104D();
+ uint8_t sec_2_read_104E();
+ uint8_t sec_2_read_104F();
+ uint8_t sec_2_read_100E();
+ uint8_t sec_2_read_1014();
+ uint8_t sec_2_read_1022();
+ uint8_t sec_2_read_1038();
+ uint16_t sec_2_read16(uint32_t offset);
+ uint8_t sec_2_read8(uint32_t offset);
+ void sec_2_write_100C(uint8_t data);
+ void sec_2_write_1032(uint8_t data);
void g3_erase_block();
- void sec_2_write_1034(UINT8 data);
- void sec_2_write_1036(UINT8 data);
- void sec_2_write_1040(UINT16 data);
- void sec_2_write_100A(UINT8 data);
- void sec_2_write16(UINT32 offset, UINT16 data);
- void sec_2_write8(UINT32 offset, UINT8 data);
+ void sec_2_write_1034(uint8_t data);
+ void sec_2_write_1036(uint8_t data);
+ void sec_2_write_1040(uint16_t data);
+ void sec_2_write_100A(uint8_t data);
+ void sec_2_write16(uint32_t offset, uint16_t data);
+ void sec_2_write8(uint32_t offset, uint8_t data);
int m_size;
- UINT32 m_planes;
- UINT32 m_blocks;
- UINT32 m_pages;
- UINT32 m_user_data_size;
- UINT32 m_extra_area_size;
- std::unique_ptr<UINT8[]> m_data[3];
- UINT32 m_data_size[3];
- UINT8 m_sec_2[0x800];
- UINT32 m_data_1036;
- UINT32 m_data_1036_count;
- UINT32 m_transfer_offset;
- UINT8 m_device;
- UINT32 m_block;
- UINT32 m_page;
- UINT32 m_plane;
- UINT32 m_transfersize;
- UINT8 m_test;
- UINT32 m_address_count;
+ uint32_t m_planes;
+ uint32_t m_blocks;
+ uint32_t m_pages;
+ uint32_t m_user_data_size;
+ uint32_t m_extra_area_size;
+ std::unique_ptr<uint8_t[]> m_data[3];
+ uint32_t m_data_size[3];
+ uint8_t m_sec_2[0x800];
+ uint32_t m_data_1036;
+ uint32_t m_data_1036_count;
+ uint32_t m_transfer_offset;
+ uint8_t m_device;
+ uint32_t m_block;
+ uint32_t m_page;
+ uint32_t m_plane;
+ uint32_t m_transfersize;
+ uint8_t m_test;
+ uint32_t m_address_count;
};
// device type definition
diff --git a/src/mame/machine/dragon.cpp b/src/mame/machine/dragon.cpp
index 12c902d5c93..0e5f9cb553e 100644
--- a/src/mame/machine/dragon.cpp
+++ b/src/mame/machine/dragon.cpp
@@ -48,7 +48,7 @@ easier to manage.
// pia1_pa_changed - called when PIA1 PA changes
//-------------------------------------------------
-void dragon_state::pia1_pa_changed(UINT8 data)
+void dragon_state::pia1_pa_changed(uint8_t data)
{
/* call inherited function */
coco12_state::pia1_pa_changed(data);
@@ -56,7 +56,7 @@ void dragon_state::pia1_pa_changed(UINT8 data)
/* if strobe bit is high send data from pia0 port b to dragon parallel printer */
if (data & 0x02)
{
- UINT8 output = m_pia_1->b_output();
+ uint8_t output = m_pia_1->b_output();
m_printer->output(output);
}
}
@@ -72,7 +72,7 @@ void dragon_state::pia1_pa_changed(UINT8 data)
READ8_MEMBER( dragon64_state::ff00_read )
{
- UINT8 result = 0x00;
+ uint8_t result = 0x00;
switch(offset & 0x07)
{
@@ -113,11 +113,11 @@ WRITE8_MEMBER( dragon64_state::ff00_write )
// pia1_pb_changed
//-------------------------------------------------
-void dragon64_state::pia1_pb_changed(UINT8 data)
+void dragon64_state::pia1_pb_changed(uint8_t data)
{
dragon_state::pia1_pb_changed(data);
- UINT8 ddr = ~m_pia_1->port_b_z_mask();
+ uint8_t ddr = ~m_pia_1->port_b_z_mask();
/* If bit 2 of the pia1 ddrb is 1 then this pin is an output so use it */
/* to control the paging of the 32k and 64k basic roms */
diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp
index 9a211847e52..1aee97637e2 100644
--- a/src/mame/machine/egret.cpp
+++ b/src/mame/machine/egret.cpp
@@ -107,7 +107,7 @@ const tiny_rom_entry *egret_device::device_rom_region() const
// LIVE DEVICE
//**************************************************************************
-void egret_device::send_port(address_space &space, UINT8 offset, UINT8 data)
+void egret_device::send_port(address_space &space, uint8_t offset, uint8_t data)
{
switch (offset)
{
@@ -208,7 +208,7 @@ WRITE8_MEMBER( egret_device::ddr_w )
READ8_MEMBER( egret_device::ports_r )
{
- UINT8 incoming = 0;
+ uint8_t incoming = 0;
switch (offset)
{
@@ -333,7 +333,7 @@ WRITE8_MEMBER( egret_device::pram_w )
// egret_device - constructor
//-------------------------------------------------
-egret_device::egret_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+egret_device::egret_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EGRET, "Apple Egret", tag, owner, clock, "egret", __FILE__),
device_nvram_interface(mconfig, *this),
write_reset(*this),
@@ -389,7 +389,7 @@ void egret_device::device_start()
save_item(NAME(pram));
save_item(NAME(disk_pram));
- UINT8 *rom = device().machine().root_device().memregion(device().subtag(EGRET_CPU_TAG).c_str())->base();
+ uint8_t *rom = device().machine().root_device().memregion(device().subtag(EGRET_CPU_TAG).c_str())->base();
if (rom)
{
diff --git a/src/mame/machine/egret.h b/src/mame/machine/egret.h
index 75f8e1888ed..8ab3b085cd7 100644
--- a/src/mame/machine/egret.h
+++ b/src/mame/machine/egret.h
@@ -59,7 +59,7 @@ class egret_device : public device_t, public device_nvram_interface
{
public:
// construction/destruction
- egret_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ egret_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
static void static_set_type(device_t &device, int type);
@@ -85,12 +85,12 @@ public:
DECLARE_WRITE8_MEMBER( pram_w );
// interface routines
- UINT8 get_xcvr_session() { return xcvr_session; }
- void set_via_full(UINT8 val) { via_full = val; }
- void set_sys_session(UINT8 val) { sys_session = val; }
- UINT8 get_via_data() { return via_data; }
- void set_via_data(UINT8 dat) { via_data = dat; }
- UINT8 get_via_clock() { return via_clock; }
+ uint8_t get_xcvr_session() { return xcvr_session; }
+ void set_via_full(uint8_t val) { via_full = val; }
+ void set_sys_session(uint8_t val) { sys_session = val; }
+ uint8_t get_via_data() { return via_data; }
+ void set_via_data(uint8_t dat) { via_data = dat; }
+ uint8_t get_via_clock() { return via_clock; }
void set_adb_line(int linestate) { adb_in = (linestate == ASSERT_LINE) ? true : false; }
int get_adb_dtime() { return m_adb_dtime; }
@@ -115,23 +115,23 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- UINT8 ddrs[3];
- UINT8 ports[3];
- UINT8 pll_ctrl;
- UINT8 timer_ctrl;
- UINT8 timer_counter;
- UINT8 onesec;
- UINT8 xcvr_session, via_full, sys_session, via_data, via_clock, last_adb;
- UINT64 last_adb_time;
+ uint8_t ddrs[3];
+ uint8_t ports[3];
+ uint8_t pll_ctrl;
+ uint8_t timer_ctrl;
+ uint8_t timer_counter;
+ uint8_t onesec;
+ uint8_t xcvr_session, via_full, sys_session, via_data, via_clock, last_adb;
+ uint64_t last_adb_time;
bool egret_controls_power;
bool adb_in;
int reset_line;
int m_adb_dtime;
emu_timer *m_timer;
- UINT8 pram[0x100], disk_pram[0x100];
+ uint8_t pram[0x100], disk_pram[0x100];
bool pram_loaded;
- void send_port(address_space &space, UINT8 offset, UINT8 data);
+ void send_port(address_space &space, uint8_t offset, uint8_t data);
};
// device type definition
diff --git a/src/mame/machine/einstein.cpp b/src/mame/machine/einstein.cpp
index a2582ee93e3..0a9035df945 100644
--- a/src/mame/machine/einstein.cpp
+++ b/src/mame/machine/einstein.cpp
@@ -26,7 +26,7 @@ const device_type EINSTEIN_KEYBOARD_DAISY = &device_creator<einstein_keyboard_da
// z80ctc_device - constructor
//-------------------------------------------------
-einstein_keyboard_daisy_device::einstein_keyboard_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+einstein_keyboard_daisy_device::einstein_keyboard_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EINSTEIN_KEYBOARD_DAISY, "Einstein keyboard daisy chain", tag, owner, clock, "einstein_keyboard", __FILE__),
device_z80daisy_interface(mconfig, *this)
{
@@ -89,7 +89,7 @@ const device_type EINSTEIN_ADC_DAISY = &device_creator<einstein_adc_daisy_device
// z80ctc_device - constructor
//-------------------------------------------------
-einstein_adc_daisy_device::einstein_adc_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+einstein_adc_daisy_device::einstein_adc_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EINSTEIN_ADC_DAISY, "Einstein ADC daisy chain", tag, owner, clock, "einstein_adc_daisy", __FILE__),
device_z80daisy_interface(mconfig, *this)
{
@@ -154,7 +154,7 @@ const device_type EINSTEIN_FIRE_DAISY = &device_creator<einstein_fire_daisy_devi
// z80ctc_device - constructor
//-------------------------------------------------
-einstein_fire_daisy_device::einstein_fire_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+einstein_fire_daisy_device::einstein_fire_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EINSTEIN_FIRE_DAISY, "Einstein fire button daisy chain", tag, owner, clock, "einstein_fire_daisy", __FILE__),
device_z80daisy_interface(mconfig, *this)
{
diff --git a/src/mame/machine/electron.cpp b/src/mame/machine/electron.cpp
index 10091c75bdd..23b3a00e799 100644
--- a/src/mame/machine/electron.cpp
+++ b/src/mame/machine/electron.cpp
@@ -145,7 +145,7 @@ TIMER_CALLBACK_MEMBER(electron_state::electron_tape_timer_handler)
READ8_MEMBER(electron_state::electron_read_keyboard)
{
- UINT8 data = 0;
+ uint8_t data = 0;
//logerror( "PC=%04x: keyboard read from paged rom area, address: %04x", activecpu_get_pc(), offset );
for (int i = 0; i < 14; i++)
@@ -193,7 +193,7 @@ WRITE8_MEMBER(electron_state::electron_jim_w)
READ8_MEMBER(electron_state::electron_sheila_r)
{
- UINT8 data = ((UINT8 *)memregion("user1")->base())[0x43E00 + offset];
+ uint8_t data = ((uint8_t *)memregion("user1")->base())[0x43E00 + offset];
switch ( offset & 0x0f )
{
case 0x00: /* Interrupt status */
@@ -212,7 +212,7 @@ READ8_MEMBER(electron_state::electron_sheila_r)
}
static const int electron_palette_offset[4] = { 0, 4, 5, 1 };
-static const UINT16 electron_screen_base[8] = { 0x3000, 0x3000, 0x3000, 0x4000, 0x5800, 0x5800, 0x6000, 0x5800 };
+static const uint16_t electron_screen_base[8] = { 0x3000, 0x3000, 0x3000, 0x4000, 0x5800, 0x5800, 0x6000, 0x5800 };
WRITE8_MEMBER(electron_state::electron_sheila_w)
{
@@ -307,7 +307,7 @@ WRITE8_MEMBER(electron_state::electron_sheila_w)
m_ula.screen_mode = ( data >> 3 ) & 0x07;
m_ula.screen_base = electron_screen_base[ m_ula.screen_mode ];
m_ula.screen_size = 0x8000 - m_ula.screen_base;
- m_ula.vram = (UINT8 *)m_ram->pointer() + m_ula.screen_base;
+ m_ula.vram = (uint8_t *)m_ram->pointer() + m_ula.screen_base;
logerror( "ULA: screen mode set to %d\n", m_ula.screen_mode );
m_ula.cassette_motor_mode = ( data >> 6 ) & 0x01;
m_cassette->change_state(m_ula.cassette_motor_mode ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MOTOR_DISABLED );
@@ -375,12 +375,12 @@ void electron_state::machine_reset()
m_ula.screen_size = 0x8000 - 0x3000;
m_ula.screen_addr = 0;
m_ula.tape_running = 0;
- m_ula.vram = (UINT8 *)m_ram->pointer() + m_ula.screen_base;
+ m_ula.vram = (uint8_t *)m_ram->pointer() + m_ula.screen_base;
}
void electron_state::machine_start()
{
- UINT8 *lo_rom, *up_rom;
+ uint8_t *lo_rom, *up_rom;
std::string region_tag;
memory_region *cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
@@ -409,7 +409,7 @@ DEVICE_IMAGE_LOAD_MEMBER( electron_state, electron_cart )
{
if (image.software_entry() == nullptr)
{
- UINT32 filesize = image.length();
+ uint32_t filesize = image.length();
if (filesize != 16384)
{
diff --git a/src/mame/machine/esqlcd.cpp b/src/mame/machine/esqlcd.cpp
index f98d70f9b12..f03cb36d2fb 100644
--- a/src/mame/machine/esqlcd.cpp
+++ b/src/mame/machine/esqlcd.cpp
@@ -341,7 +341,7 @@ void esq2x16_sq1_t::write_char(int data)
#endif
}
//--------------------------------------------------------------------------------------------------------------------------------------------
-esq2x16_sq1_t::esq2x16_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ2x16_SQ1, "Ensoniq 2x16 VFD (SQ-1 variant)", tag, owner, clock, "esq2x16_sq1", __FILE__)
+esq2x16_sq1_t::esq2x16_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : esqvfd_t(mconfig, ESQ2x16_SQ1, "Ensoniq 2x16 VFD (SQ-1 variant)", tag, owner, clock, "esq2x16_sq1", __FILE__)
{
m_rows = 2;
m_cols = 16;
@@ -393,7 +393,7 @@ void esq2x16_sq1_t::page_reset()
m_lcdPos = m_LcdCommand = 0;
}
//--------------------------------------------------------------------------------------------------------------------------------------------
-char esq2x16_sq1_t::RotateLcdChar(UINT8 lcdChar, int charRow)
+char esq2x16_sq1_t::RotateLcdChar(uint8_t lcdChar, int charRow)
{
char lcdCharRow = 0;
for (int cc=0; cc<5; cc++){
diff --git a/src/mame/machine/esqlcd.h b/src/mame/machine/esqlcd.h
index 0fa306f5161..eb5aaaa648c 100644
--- a/src/mame/machine/esqlcd.h
+++ b/src/mame/machine/esqlcd.h
@@ -17,7 +17,7 @@
class esq2x16_sq1_t : public esqvfd_t {
public:
- esq2x16_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esq2x16_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void write_char(int data) override;
virtual void update_display() override;
@@ -26,15 +26,15 @@ public:
void lcd_reset();
void page_reset();
- char RotateLcdChar(UINT8 lcdChar, int charRow);
+ char RotateLcdChar(uint8_t lcdChar, int charRow);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
- UINT8 m_lcdpg[4][32];
+ uint8_t m_lcdpg[4][32];
int m_lcdPage;
int m_lcdPos,m_lcdSavedPos;
- UINT8 m_leds[16];
- UINT8 m_ledsDirty[16];
+ uint8_t m_leds[16];
+ uint8_t m_ledsDirty[16];
private:
int m_LcdCommand;
diff --git a/src/mame/machine/esqpanel.cpp b/src/mame/machine/esqpanel.cpp
index 4c084a6d5c5..741e8e71003 100644
--- a/src/mame/machine/esqpanel.cpp
+++ b/src/mame/machine/esqpanel.cpp
@@ -26,7 +26,7 @@ const device_type ESQPANEL2x16_SQ1 = &device_creator<esqpanel2x16_sq1_device>;
// esqpanel_device - constructor
//-------------------------------------------------
-esqpanel_device::esqpanel_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+esqpanel_device::esqpanel_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_serial_interface(mconfig, *this),
m_write_tx(*this),
@@ -71,7 +71,7 @@ void esqpanel_device::device_timer(emu_timer &timer, device_timer_id id, int par
void esqpanel_device::rcv_complete() // Rx completed receiving byte
{
receive_register_extract();
- UINT8 data = get_received_char();
+ uint8_t data = get_received_char();
// if (data >= 0xe0) printf("Got %02x from motherboard (second %s)\n", data, m_bCalibSecondByte ? "yes" : "no");
@@ -172,7 +172,7 @@ void esqpanel_device::tra_callback() // Tx send bit
m_write_tx(transmit_register_get_data_bit());
}
-void esqpanel_device::xmit_char(UINT8 data)
+void esqpanel_device::xmit_char(uint8_t data)
{
// printf("Panel: xmit %02x\n", data);
@@ -193,7 +193,7 @@ void esqpanel_device::xmit_char(UINT8 data)
}
}
-void esqpanel_device::set_analog_value(offs_t offset, UINT16 value)
+void esqpanel_device::set_analog_value(offs_t offset, uint16_t value)
{
m_write_analog(offset, value);
}
@@ -209,7 +209,7 @@ machine_config_constructor esqpanel1x22_device::device_mconfig_additions() const
return MACHINE_CONFIG_NAME( esqpanel1x22 );
}
-esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esqpanel_device(mconfig, ESQPANEL1x22, "Ensoniq front panel with 1x22 VFD", tag, owner, clock, "esqpanel122", __FILE__),
m_vfd(*this, "vfd")
{
@@ -227,7 +227,7 @@ machine_config_constructor esqpanel2x40_device::device_mconfig_additions() const
return MACHINE_CONFIG_NAME( esqpanel2x40 );
}
-esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esqpanel_device(mconfig, ESQPANEL2x40, "Ensoniq front panel with 2x40 VFD", tag, owner, clock, "esqpanel240", __FILE__),
m_vfd(*this, "vfd")
{
@@ -244,7 +244,7 @@ machine_config_constructor esqpanel2x16_sq1_device::device_mconfig_additions() c
return MACHINE_CONFIG_NAME( esqpanel2x16_sq1 );
}
// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
-esqpanel2x16_sq1_device::esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+esqpanel2x16_sq1_device::esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esqpanel_device(mconfig, ESQPANEL2x16_SQ1, "Ensoniq front panel with 2x16 LCD", tag, owner, clock, "esqpanel216_sq1", __FILE__),
m_vfd(*this, "vfd")
{
diff --git a/src/mame/machine/esqpanel.h b/src/mame/machine/esqpanel.h
index 46f9f07ec03..64b8ee67b40 100644
--- a/src/mame/machine/esqpanel.h
+++ b/src/mame/machine/esqpanel.h
@@ -56,15 +56,15 @@ class esqpanel_device : public device_t, public device_serial_interface
{
public:
// construction/destruction
- esqpanel_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ esqpanel_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
template<class _Object> static devcb_base &set_tx_wr_callback(device_t &device, _Object object) { return downcast<esqpanel_device &>(device).m_write_tx.set_callback(object); }
template<class _Object> static devcb_base &set_analog_wr_callback(device_t &device, _Object object) { return downcast<esqpanel_device &>(device).m_write_analog.set_callback(object); }
- virtual void send_to_display(UINT8 data) = 0;
+ virtual void send_to_display(uint8_t data) = 0;
- void xmit_char(UINT8 data);
- void set_analog_value(offs_t offset, UINT16 value);
+ void xmit_char(uint8_t data);
+ void set_analog_value(offs_t offset, uint16_t value);
protected:
// device-level overrides
@@ -87,18 +87,18 @@ private:
devcb_write_line m_write_tx;
devcb_write16 m_write_analog;
- UINT8 m_xmitring[XMIT_RING_SIZE];
+ uint8_t m_xmitring[XMIT_RING_SIZE];
int m_xmit_read, m_xmit_write;
bool m_tx_busy;
};
class esqpanel1x22_device : public esqpanel_device {
public:
- esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
required_device<esq1x22_t> m_vfd;
- virtual void send_to_display(UINT8 data) override { m_vfd->write_char(data); }
+ virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -108,11 +108,11 @@ private:
class esqpanel2x40_device : public esqpanel_device {
public:
- esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
required_device<esq2x40_t> m_vfd;
- virtual void send_to_display(UINT8 data) override { m_vfd->write_char(data); }
+ virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -122,11 +122,11 @@ private:
class esqpanel2x40_sq1_device : public esqpanel_device {
public:
- esqpanel2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esqpanel2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
required_device<esq2x40_sq1_t> m_vfd;
- virtual void send_to_display(UINT8 data) override { m_vfd->write_char(data); }
+ virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -137,11 +137,11 @@ private:
// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
class esqpanel2x16_sq1_device : public esqpanel_device {
public:
- esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
required_device<esq2x16_sq1_t> m_vfd;
- virtual void send_to_display(UINT8 data) override { m_vfd->write_char(data); }
+ virtual void send_to_display(uint8_t data) override { m_vfd->write_char(data); }
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
diff --git a/src/mame/machine/esqvfd.cpp b/src/mame/machine/esqvfd.cpp
index a4acad6deaf..3c879a4451e 100644
--- a/src/mame/machine/esqvfd.cpp
+++ b/src/mame/machine/esqvfd.cpp
@@ -14,7 +14,7 @@ const device_type ESQ2x40 = &device_creator<esq2x40_t>;
const device_type ESQ2x40_SQ1 = &device_creator<esq2x40_sq1_t>;
// adapted from bfm_bd1, rearranged to work with ASCII data used by the Ensoniq h/w
-static const UINT16 font[]=
+static const uint16_t font[]=
{ // FEDC BA98 7654 3210
0x0000, // 0000 0000 0000 0000 (space)
0x0000, // 0000 0000 0000 0000 ! (not defined)
@@ -114,7 +114,7 @@ static const UINT16 font[]=
0x0000, // 0000 0000 0000 0000 (DEL)
};
-esqvfd_t::esqvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+esqvfd_t::esqvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
@@ -139,9 +139,9 @@ void esqvfd_t::device_timer(emu_timer &timer, device_timer_id id, int param, voi
}
// why isn't the font just stored in this order?
-UINT32 esqvfd_t::conv_segments(UINT16 segin)
+uint32_t esqvfd_t::conv_segments(uint16_t segin)
{
- UINT32 segout = 0;
+ uint32_t segout = 0;
if ( segin & 0x0004 ) segout |= 0x0001;
if ( segin & 0x0002 ) segout |= 0x0002;
@@ -171,7 +171,7 @@ void esqvfd_t::update_display()
{
if (m_dirty[row][col])
{
- UINT32 segdata = conv_segments(font[m_chars[row][col]]);
+ uint32_t segdata = conv_segments(font[m_chars[row][col]]);
// force bottom bar on all underlined chars
if (m_attrs[row][col] & AT_UNDERLINE)
@@ -281,7 +281,7 @@ void esq2x40_t::write_char(int data)
update_display();
}
-esq2x40_t::esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ2x40, "Ensoniq 2x40 VFD", tag, owner, clock, "esq2x40", __FILE__)
+esq2x40_t::esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : esqvfd_t(mconfig, ESQ2x40, "Ensoniq 2x40 VFD", tag, owner, clock, "esq2x40", __FILE__)
{
m_rows = 2;
m_cols = 40;
@@ -334,7 +334,7 @@ void esq1x22_t::write_char(int data)
update_display();
}
-esq1x22_t::esq1x22_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ1x22, "Ensoniq 1x22 VFD", tag, owner, clock, "esq1x22", __FILE__)
+esq1x22_t::esq1x22_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : esqvfd_t(mconfig, ESQ1x22, "Ensoniq 1x22 VFD", tag, owner, clock, "esq1x22", __FILE__)
{
m_rows = 1;
m_cols = 22;
@@ -398,7 +398,7 @@ void esq2x40_sq1_t::write_char(int data)
}
}
-esq2x40_sq1_t::esq2x40_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ2x40_SQ1, "Ensoniq 2x40 VFD (SQ-1 variant)", tag, owner, clock, "esq2x40_sq1", __FILE__)
+esq2x40_sq1_t::esq2x40_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : esqvfd_t(mconfig, ESQ2x40_SQ1, "Ensoniq 2x40 VFD (SQ-1 variant)", tag, owner, clock, "esq2x40_sq1", __FILE__)
{
m_rows = 2;
m_cols = 40;
diff --git a/src/mame/machine/esqvfd.h b/src/mame/machine/esqvfd.h
index 174ea5157d7..c4043f35956 100644
--- a/src/mame/machine/esqvfd.h
+++ b/src/mame/machine/esqvfd.h
@@ -25,21 +25,21 @@
class esqvfd_t : public device_t {
public:
- esqvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ esqvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
DECLARE_WRITE8_MEMBER( write ) { write_char(data); }
virtual void write_char(int data) = 0;
virtual void update_display();
- UINT32 conv_segments(UINT16 segin);
+ uint32_t conv_segments(uint16_t segin);
protected:
- static const UINT8 AT_NORMAL = 0x00;
- static const UINT8 AT_BOLD = 0x01;
- static const UINT8 AT_UNDERLINE = 0x02;
- static const UINT8 AT_BLINK = 0x04;
- static const UINT8 AT_BLINKED = 0x80; // set when character should be blinked off
+ static const uint8_t AT_NORMAL = 0x00;
+ static const uint8_t AT_BOLD = 0x01;
+ static const uint8_t AT_UNDERLINE = 0x02;
+ static const uint8_t AT_BLINK = 0x04;
+ static const uint8_t AT_BLINKED = 0x80; // set when character should be blinked off
virtual void device_start() override;
virtual void device_reset() override;
@@ -48,16 +48,16 @@ protected:
int m_cursx, m_cursy;
int m_savedx, m_savedy;
int m_rows, m_cols;
- UINT8 m_curattr;
- UINT8 m_lastchar;
- UINT8 m_chars[2][40];
- UINT8 m_attrs[2][40];
- UINT8 m_dirty[2][40];
+ uint8_t m_curattr;
+ uint8_t m_lastchar;
+ uint8_t m_chars[2][40];
+ uint8_t m_attrs[2][40];
+ uint8_t m_dirty[2][40];
};
class esq1x22_t : public esqvfd_t {
public:
- esq1x22_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esq1x22_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void write_char(int data) override;
@@ -69,7 +69,7 @@ private:
class esq2x40_t : public esqvfd_t {
public:
- esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void write_char(int data) override;
@@ -81,7 +81,7 @@ private:
class esq2x40_sq1_t : public esqvfd_t {
public:
- esq2x40_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ esq2x40_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void write_char(int data) override;
diff --git a/src/mame/machine/fd1089.cpp b/src/mame/machine/fd1089.cpp
index f786bf29c2d..bf12b35cbae 100644
--- a/src/mame/machine/fd1089.cpp
+++ b/src/mame/machine/fd1089.cpp
@@ -66,7 +66,7 @@
{
if ("we must encrypt this data table position")
{
- UINT8 byteval;
+ uint8_t byteval;
do
{
@@ -88,7 +88,7 @@
{
if ("we mustn't encrypt this data table position")
{
- UINT8 byteval;
+ uint8_t byteval;
do
{
@@ -146,7 +146,7 @@ const device_type FD1089A = &device_creator<fd1089a_device>;
const device_type FD1089B = &device_creator<fd1089b_device>;
// common base lookup table, shared between A and B variants
-const UINT8 fd1089_base_device::s_basetable_fd1089[0x100] =
+const uint8_t fd1089_base_device::s_basetable_fd1089[0x100] =
{
0x00,0x1c,0x76,0x6a,0x5e,0x42,0x24,0x38,0x4b,0x67,0xad,0x81,0xe9,0xc5,0x03,0x2f,
0x45,0x69,0xaf,0x83,0xe7,0xcb,0x01,0x2d,0x02,0x1e,0x78,0x64,0x5c,0x40,0x2a,0x36,
@@ -221,7 +221,7 @@ ADDRESS_MAP_END
// fd1089_base_device - constructor
//-------------------------------------------------
-fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: m68000_device(mconfig, tag, owner, clock, shortname, source),
m_region(*this, DEVICE_SELF),
m_key(*this, "key"),
@@ -234,12 +234,12 @@ fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_typ
m_address_map[AS_DECRYPTED_OPCODES] = ADDRESS_MAP_NAME(decrypted_opcodes_map);
}
-fd1089a_device::fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+fd1089a_device::fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: fd1089_base_device(mconfig, FD1089A, "FD1089A", tag, owner, clock, "fd1089a", __FILE__)
{
}
-fd1089b_device::fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+fd1089b_device::fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: fd1089_base_device(mconfig, FD1089B, "FD1089B", tag, owner, clock, "fd1089b", __FILE__)
{
}
@@ -254,10 +254,10 @@ void fd1089_base_device::device_start()
m68000_device::device_start();
// get a pointer to the ROM region
- UINT16 *rombase = reinterpret_cast<UINT16 *>(m_region->base());
+ uint16_t *rombase = reinterpret_cast<uint16_t *>(m_region->base());
// determine length and resize our internal buffers
- UINT32 romsize = m_region->bytes();
+ uint32_t romsize = m_region->bytes();
m_plaintext.resize(romsize/2);
// copy the plaintext
@@ -279,7 +279,7 @@ void fd1089_base_device::device_start()
// decode
//-------------------------------------------------
-UINT8 fd1089_base_device::rearrange_key(UINT8 table, bool opcode)
+uint8_t fd1089_base_device::rearrange_key(uint8_t table, bool opcode)
{
if (!opcode)
{
@@ -336,13 +336,13 @@ UINT8 fd1089_base_device::rearrange_key(UINT8 table, bool opcode)
// according to FD1089A rules
//-------------------------------------------------
-UINT8 fd1089a_device::decode(UINT8 val, UINT8 key, bool opcode)
+uint8_t fd1089a_device::decode(uint8_t val, uint8_t key, bool opcode)
{
// special case - don't decrypt
if (key == 0x40)
return val;
- UINT8 table = rearrange_key(key, opcode);
+ uint8_t table = rearrange_key(key, opcode);
const decrypt_parameters &p = s_addr_params[table >> 4];
val = BITSWAP8(val, p.s7,p.s6,p.s5,p.s4,p.s3,p.s2,p.s1,p.s0) ^ p.xorval;
@@ -356,7 +356,7 @@ UINT8 fd1089a_device::decode(UINT8 val, UINT8 key, bool opcode)
val = s_basetable_fd1089[val];
- UINT8 family = table & 0x07;
+ uint8_t family = table & 0x07;
if (opcode == 0)
{
if (BIT(~table,6) & BIT(table,2)) family ^= 8;
@@ -396,13 +396,13 @@ UINT8 fd1089a_device::decode(UINT8 val, UINT8 key, bool opcode)
// according to FD1089B rules
//-------------------------------------------------
-UINT8 fd1089b_device::decode(UINT8 val, UINT8 key, bool opcode)
+uint8_t fd1089b_device::decode(uint8_t val, uint8_t key, bool opcode)
{
// special case - don't decrypt
if (key == 0x40)
return val;
- UINT8 table = rearrange_key(key, opcode);
+ uint8_t table = rearrange_key(key, opcode);
const decrypt_parameters &p = s_addr_params[table >> 4];
val = BITSWAP8(val, p.s7,p.s6,p.s5,p.s4,p.s3,p.s2,p.s1,p.s0) ^ p.xorval;
@@ -416,7 +416,7 @@ UINT8 fd1089b_device::decode(UINT8 val, UINT8 key, bool opcode)
val = s_basetable_fd1089[val];
- UINT8 xorval = 0;
+ uint8_t xorval = 0;
if (opcode == 0)
{
if (BIT(~table,6) & BIT(table,2)) xorval ^= 0x01;
@@ -455,7 +455,7 @@ UINT8 fd1089b_device::decode(UINT8 val, UINT8 key, bool opcode)
// as either an opcode or as data
//-------------------------------------------------
-UINT16 fd1089_base_device::decrypt_one(offs_t addr, UINT16 val, const UINT8 *key, bool opcode)
+uint16_t fd1089_base_device::decrypt_one(offs_t addr, uint16_t val, const uint8_t *key, bool opcode)
{
// pick the translation table from bits ff022a of the address
int tbl_num = ((addr & 0x000002) >> 1) |
@@ -464,7 +464,7 @@ UINT16 fd1089_base_device::decrypt_one(offs_t addr, UINT16 val, const UINT8 *key
((addr & 0x000200) >> 6) |
((addr & 0xff0000) >> 12);
- UINT16 src = ((val & 0x0008) >> 3) |
+ uint16_t src = ((val & 0x0008) >> 3) |
((val & 0x0040) >> 5) |
((val & 0xfc00) >> 8);
@@ -483,11 +483,11 @@ UINT16 fd1089_base_device::decrypt_one(offs_t addr, UINT16 val, const UINT8 *key
// and data
//-------------------------------------------------
-void fd1089_base_device::decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr, UINT16 *opcodesptr, UINT16 *dataptr)
+void fd1089_base_device::decrypt(offs_t baseaddr, uint32_t size, const uint16_t *srcptr, uint16_t *opcodesptr, uint16_t *dataptr)
{
for (offs_t offset = 0; offset < size; offset += 2)
{
- UINT16 src = srcptr[offset / 2];
+ uint16_t src = srcptr[offset / 2];
opcodesptr[offset / 2] = decrypt_one(baseaddr + offset, src, &m_key[0], true);
dataptr[offset / 2] = decrypt_one(baseaddr + offset, src, &m_key[0], false);
}
diff --git a/src/mame/machine/fd1089.h b/src/mame/machine/fd1089.h
index 0bf37ba75b9..f77427ff3f6 100644
--- a/src/mame/machine/fd1089.h
+++ b/src/mame/machine/fd1089.h
@@ -39,36 +39,36 @@ class fd1089_base_device : public m68000_device
{
public:
// construction/destruction
- fd1089_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ fd1089_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
// explicit decryption helpers
- void decrypt(offs_t baseaddr, UINT32 size, offs_t regionoffs, UINT16 *opcodesptr, UINT16 *dataptr) { decrypt(baseaddr, size, &m_plaintext[regionoffs/2], opcodesptr, dataptr); }
+ void decrypt(offs_t baseaddr, uint32_t size, offs_t regionoffs, uint16_t *opcodesptr, uint16_t *dataptr) { decrypt(baseaddr, size, &m_plaintext[regionoffs/2], opcodesptr, dataptr); }
protected:
// device overrides
virtual void device_start() override;
// internal helpers
- UINT8 rearrange_key(UINT8 table, bool opcode);
- virtual UINT8 decode(UINT8 val, UINT8 key, bool opcode) = 0;
- UINT16 decrypt_one(offs_t addr, UINT16 val, const UINT8 *key, bool opcode);
- void decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr, UINT16 *opcodesptr, UINT16 *dataptr);
+ uint8_t rearrange_key(uint8_t table, bool opcode);
+ virtual uint8_t decode(uint8_t val, uint8_t key, bool opcode) = 0;
+ uint16_t decrypt_one(offs_t addr, uint16_t val, const uint8_t *key, bool opcode);
+ void decrypt(offs_t baseaddr, uint32_t size, const uint16_t *srcptr, uint16_t *opcodesptr, uint16_t *dataptr);
// internal state
required_memory_region m_region;
- required_region_ptr<UINT8> m_key;
- std::vector<UINT16> m_plaintext;
- required_shared_ptr<UINT16> m_decrypted_opcodes;
+ required_region_ptr<uint8_t> m_key;
+ std::vector<uint16_t> m_plaintext;
+ required_shared_ptr<uint16_t> m_decrypted_opcodes;
// internal types
struct decrypt_parameters
{
- UINT8 xorval;
- UINT8 s7,s6,s5,s4,s3,s2,s1,s0;
+ uint8_t xorval;
+ uint8_t s7,s6,s5,s4,s3,s2,s1,s0;
};
// static tables
- static const UINT8 s_basetable_fd1089[0x100];
+ static const uint8_t s_basetable_fd1089[0x100];
static const decrypt_parameters s_addr_params[16];
static const decrypt_parameters s_data_params_a[16];
};
@@ -81,10 +81,10 @@ class fd1089a_device : public fd1089_base_device
{
public:
// construction/destruction
- fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual UINT8 decode(UINT8 val, UINT8 key, bool opcode) override;
+ virtual uint8_t decode(uint8_t val, uint8_t key, bool opcode) override;
};
@@ -95,10 +95,10 @@ class fd1089b_device : public fd1089_base_device
{
public:
// construction/destruction
- fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual UINT8 decode(UINT8 val, UINT8 key, bool opcode) override;
+ virtual uint8_t decode(uint8_t val, uint8_t key, bool opcode) override;
};
diff --git a/src/mame/machine/fd1094.cpp b/src/mame/machine/fd1094.cpp
index 7080c9630ff..93cfe1d9a99 100644
--- a/src/mame/machine/fd1094.cpp
+++ b/src/mame/machine/fd1094.cpp
@@ -130,13 +130,13 @@
successfully for all known keys, given the values of the 'shift' and 'B'
parameters, as well as an initial 'seed' for the generator:
- void genkey(UINT32 seed, UINT8 *output)
+ void genkey(uint32_t seed, uint8_t *output)
{
int bytenum;
for (bytenum = 4; bytenum < 8192; bytenum++)
{
- UINT8 byteval;
+ uint8_t byteval;
seed = seed * 0x29;
seed += seed << 16;
@@ -393,7 +393,7 @@ const device_type FD1094 = &device_creator<fd1094_device>;
0x1e7a,
this only happens with 317-0162 so far; I assume it is a fault in the CPU.
*/
-const UINT16 fd1094_device::s_masked_opcodes[] =
+const uint16_t fd1094_device::s_masked_opcodes[] =
{
0x013a,0x033a,0x053a,0x073a,0x083a,0x093a,0x0b3a,0x0d3a,0x0f3a,
@@ -510,7 +510,7 @@ void fd1094_decryption_cache::reset()
// of the region we are caching
//-------------------------------------------------
-void fd1094_decryption_cache::configure(offs_t baseaddress, UINT32 size, offs_t rgnoffset)
+void fd1094_decryption_cache::configure(offs_t baseaddress, uint32_t size, offs_t rgnoffset)
{
// if something important changes, throw away what we have
if (m_baseaddress != baseaddress || m_size != size || m_rgnoffset != rgnoffset)
@@ -528,7 +528,7 @@ void fd1094_decryption_cache::configure(offs_t baseaddress, UINT32 size, offs_t
// decrypted opcodes for the given state
//-------------------------------------------------
-UINT16 *fd1094_decryption_cache::decrypted_opcodes(UINT8 state)
+uint16_t *fd1094_decryption_cache::decrypted_opcodes(uint8_t state)
{
// if we have already decrypted this state, use it
if (!m_decrypted_opcodes[state].empty())
@@ -552,7 +552,7 @@ UINT16 *fd1094_decryption_cache::decrypted_opcodes(UINT8 state)
//-------------------------------------------------
-fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: m68000_device(mconfig, tag, owner, clock, "fd1094", __FILE__)
, m_decrypted_opcodes_bank(*this, "^fd1094_decrypted_opcodes")
, m_state(0x00)
@@ -635,7 +635,7 @@ void fd1094_device::change_state(int newstate)
void fd1094_device::device_start()
{
m_srcbase = m_rom;
- UINT32 size = m_rom.bytes();
+ uint32_t size = m_rom.bytes();
// if no ROM region, see if there's a memory share with our name
if (!m_rom.found())
@@ -644,7 +644,7 @@ void fd1094_device::device_start()
if (!share)
throw emu_fatalerror("FD1094 found no data to decrypt!");
- m_srcbase = reinterpret_cast<UINT16 *>(share->ptr());
+ m_srcbase = reinterpret_cast<uint16_t *>(share->ptr());
size = share->bytes();
}
@@ -704,12 +704,12 @@ void fd1094_device::device_postload()
// (physical address / 2)
//-------------------------------------------------
-UINT16 fd1094_device::decrypt_one(offs_t address, UINT16 val, const UINT8 *main_key, UINT8 state, bool vector_fetch)
+uint16_t fd1094_device::decrypt_one(offs_t address, uint16_t val, const uint8_t *main_key, uint8_t state, bool vector_fetch)
{
// extract and adjust the global key
- UINT8 gkey1 = main_key[1];
- UINT8 gkey2 = main_key[2];
- UINT8 gkey3 = main_key[3];
+ uint8_t gkey1 = main_key[1];
+ uint8_t gkey2 = main_key[2];
+ uint8_t gkey3 = main_key[3];
if (state & 0x0001)
{
gkey1 ^= 0x04; // global_xor1
@@ -760,13 +760,13 @@ UINT16 fd1094_device::decrypt_one(offs_t address, UINT16 val, const UINT8 *main_
}
// for address xx0000-xx0006 (but only if >= 000008), use key xx2000-xx2006
- UINT8 mainkey;
+ uint8_t mainkey;
if ((address & 0x0ffc) == 0 && address >= 4)
mainkey = main_key[(address & 0x1fff) | 0x1000];
else
mainkey = main_key[address & 0x1fff];
- UINT8 key_F;
+ uint8_t key_F;
if (address & 0x1000) key_F = BIT(mainkey,7);
else key_F = BIT(mainkey,6);
@@ -780,40 +780,40 @@ UINT16 fd1094_device::decrypt_one(offs_t address, UINT16 val, const UINT8 *main_
if (address <= 1) key_F = 0;
}
- UINT8 global_xor0 = 1^BIT(gkey1,5);
- UINT8 global_xor1 = 1^BIT(gkey1,2);
- UINT8 global_swap2 = 1^BIT(gkey1,0);
+ uint8_t global_xor0 = 1^BIT(gkey1,5);
+ uint8_t global_xor1 = 1^BIT(gkey1,2);
+ uint8_t global_swap2 = 1^BIT(gkey1,0);
- UINT8 global_swap0a = 1^BIT(gkey2,5);
- UINT8 global_swap0b = 1^BIT(gkey2,2);
+ uint8_t global_swap0a = 1^BIT(gkey2,5);
+ uint8_t global_swap0b = 1^BIT(gkey2,2);
- UINT8 global_swap3 = 1^BIT(gkey3,6);
- UINT8 global_swap1 = 1^BIT(gkey3,4);
- UINT8 global_swap4 = 1^BIT(gkey3,2);
+ uint8_t global_swap3 = 1^BIT(gkey3,6);
+ uint8_t global_swap1 = 1^BIT(gkey3,4);
+ uint8_t global_swap4 = 1^BIT(gkey3,2);
- UINT8 key_0a = BIT(mainkey,0) ^ BIT(gkey3,1);
- UINT8 key_0b = BIT(mainkey,0) ^ BIT(gkey1,7);
- UINT8 key_0c = BIT(mainkey,0) ^ BIT(gkey1,1);
+ uint8_t key_0a = BIT(mainkey,0) ^ BIT(gkey3,1);
+ uint8_t key_0b = BIT(mainkey,0) ^ BIT(gkey1,7);
+ uint8_t key_0c = BIT(mainkey,0) ^ BIT(gkey1,1);
- UINT8 key_1a = BIT(mainkey,1) ^ BIT(gkey2,7);
- UINT8 key_1b = BIT(mainkey,1) ^ BIT(gkey1,3);
+ uint8_t key_1a = BIT(mainkey,1) ^ BIT(gkey2,7);
+ uint8_t key_1b = BIT(mainkey,1) ^ BIT(gkey1,3);
- UINT8 key_2a = BIT(mainkey,2) ^ BIT(gkey3,7);
- UINT8 key_2b = BIT(mainkey,2) ^ BIT(gkey1,4);
+ uint8_t key_2a = BIT(mainkey,2) ^ BIT(gkey3,7);
+ uint8_t key_2b = BIT(mainkey,2) ^ BIT(gkey1,4);
- UINT8 key_3a = BIT(mainkey,3) ^ BIT(gkey2,0);
- UINT8 key_3b = BIT(mainkey,3) ^ BIT(gkey3,3);
+ uint8_t key_3a = BIT(mainkey,3) ^ BIT(gkey2,0);
+ uint8_t key_3b = BIT(mainkey,3) ^ BIT(gkey3,3);
- UINT8 key_4a = BIT(mainkey,4) ^ BIT(gkey2,3);
- UINT8 key_4b = BIT(mainkey,4) ^ BIT(gkey3,0);
+ uint8_t key_4a = BIT(mainkey,4) ^ BIT(gkey2,3);
+ uint8_t key_4b = BIT(mainkey,4) ^ BIT(gkey3,0);
- UINT8 key_5a = BIT(mainkey,5) ^ BIT(gkey3,5);
- UINT8 key_5b = BIT(mainkey,5) ^ BIT(gkey1,6);
+ uint8_t key_5a = BIT(mainkey,5) ^ BIT(gkey3,5);
+ uint8_t key_5b = BIT(mainkey,5) ^ BIT(gkey1,6);
- UINT8 key_6a = BIT(mainkey,6) ^ BIT(gkey2,1);
- UINT8 key_6b = BIT(mainkey,6) ^ BIT(gkey2,6);
+ uint8_t key_6a = BIT(mainkey,6) ^ BIT(gkey2,1);
+ uint8_t key_6b = BIT(mainkey,6) ^ BIT(gkey2,6);
- UINT8 key_7a = BIT(mainkey,7) ^ BIT(gkey2,4);
+ uint8_t key_7a = BIT(mainkey,7) ^ BIT(gkey2,4);
if (val & 0x8000) // block invariant: val & 0x8000 != 0
@@ -891,7 +891,7 @@ UINT16 fd1094_device::decrypt_one(offs_t address, UINT16 val, const UINT8 *main_
// decrypt - decrypt a buffers' worth of opcodes
//-------------------------------------------------
-void fd1094_device::decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr, UINT16 *opcodesptr, UINT8 state)
+void fd1094_device::decrypt(offs_t baseaddr, uint32_t size, const uint16_t *srcptr, uint16_t *opcodesptr, uint8_t state)
{
for (offs_t offset = 0; offset < size; offset += 2)
opcodesptr[offset / 2] = decrypt_one((baseaddr + offset) / 2, srcptr[offset / 2], &m_key[0], state, (baseaddr + offset) < 8);
@@ -903,7 +903,7 @@ void fd1094_device::decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr,
// for standard cases
//-------------------------------------------------
-void fd1094_device::default_state_change(UINT8 state)
+void fd1094_device::default_state_change(uint8_t state)
{
m_decrypted_opcodes_bank->set_base(m_cache.decrypted_opcodes(state));
}
diff --git a/src/mame/machine/fd1094.h b/src/mame/machine/fd1094.h
index 5981f0640a0..ba04da2858a 100644
--- a/src/mame/machine/fd1094.h
+++ b/src/mame/machine/fd1094.h
@@ -44,19 +44,19 @@ public:
// getters
fd1094_device &fd1094() const { return m_fd1094; }
- UINT16 *decrypted_opcodes(UINT8 state);
+ uint16_t *decrypted_opcodes(uint8_t state);
// operations
void reset();
- void configure(offs_t baseaddress, UINT32 size, offs_t rgnoffset);
+ void configure(offs_t baseaddress, uint32_t size, offs_t rgnoffset);
protected:
// internal state
fd1094_device & m_fd1094;
- UINT32 m_baseaddress;
- UINT32 m_size;
- UINT32 m_rgnoffset;
- std::vector<UINT16> m_decrypted_opcodes[256];
+ uint32_t m_baseaddress;
+ uint32_t m_size;
+ uint32_t m_rgnoffset;
+ std::vector<uint16_t> m_decrypted_opcodes[256];
};
@@ -66,16 +66,16 @@ protected:
class fd1094_device : public m68000_device
{
public:
- typedef delegate<void (UINT8)> state_change_delegate;
+ typedef delegate<void (uint8_t)> state_change_delegate;
// construction/destruction
- fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// explicit decryption helpers
- void decrypt(offs_t baseaddr, UINT32 size, offs_t regionoffs, UINT16 *opcodesptr, UINT8 state) { decrypt(baseaddr, size, &m_srcbase[regionoffs/2], opcodesptr, state); }
+ void decrypt(offs_t baseaddr, uint32_t size, offs_t regionoffs, uint16_t *opcodesptr, uint8_t state) { decrypt(baseaddr, size, &m_srcbase[regionoffs/2], opcodesptr, state); }
// live state management
- UINT8 state() const { return m_irqmode ? m_key[0] : m_state; }
+ uint8_t state() const { return m_irqmode ? m_key[0] : m_state; }
void change_state(int newstate = -1);
void notify_state_change(state_change_delegate callback) { m_state_change = callback; }
@@ -96,9 +96,9 @@ protected:
virtual void device_postload();
// internal helpers
- UINT16 decrypt_one(offs_t address, UINT16 val, const UINT8 *main_key, UINT8 state, bool vector_fetch);
- void decrypt(offs_t baseaddr, UINT32 size, const UINT16 *srcptr, UINT16 *opcodesptr, UINT8 state);
- void default_state_change(UINT8 state);
+ uint16_t decrypt_one(offs_t address, uint16_t val, const uint8_t *main_key, uint8_t state, bool vector_fetch);
+ void decrypt(offs_t baseaddr, uint32_t size, const uint16_t *srcptr, uint16_t *opcodesptr, uint8_t state);
+ void default_state_change(uint8_t state);
IRQ_CALLBACK_MEMBER( irq_callback );
// static helpers
@@ -106,25 +106,25 @@ protected:
DECLARE_WRITE_LINE_MEMBER(rte_callback);
// internal state
- UINT8 m_state;
+ uint8_t m_state;
bool m_irqmode;
state_change_delegate m_state_change;
fd1094_decryption_cache m_cache;
- UINT16 const *m_srcbase;
- optional_region_ptr<UINT16> m_rom;
- required_region_ptr<UINT8> m_key;
- UINT8 m_masked_opcodes_lookup[2][65536/8/2];
+ uint16_t const *m_srcbase;
+ optional_region_ptr<uint16_t> m_rom;
+ required_region_ptr<uint8_t> m_key;
+ uint8_t m_masked_opcodes_lookup[2][65536/8/2];
// static tables
- static const UINT16 s_masked_opcodes[];
+ static const uint16_t s_masked_opcodes[];
};
struct fd1094_constraint
{
offs_t pc;
- UINT16 state;
- UINT16 value;
- UINT16 mask;
+ uint16_t state;
+ uint16_t value;
+ uint16_t mask;
};
#endif
diff --git a/src/mame/machine/fddebug.cpp b/src/mame/machine/fddebug.cpp
index 22276a29f66..ee7fe6f69f0 100644
--- a/src/mame/machine/fddebug.cpp
+++ b/src/mame/machine/fddebug.cpp
@@ -198,16 +198,16 @@ struct fd1094_possibility
{
offs_t basepc; /* starting PC of the possibility */
int length; /* number of words */
- UINT8 instrbuffer[10]; /* instruction data for disassembler */
- UINT8 keybuffer[10]; /* array of key values to produce the instruction data */
- UINT8 iffy; /* is this an iffy possibility? */
+ uint8_t instrbuffer[10]; /* instruction data for disassembler */
+ uint8_t keybuffer[10]; /* array of key values to produce the instruction data */
+ uint8_t iffy; /* is this an iffy possibility? */
char dasm[256]; /* disassembly */
};
/* an entry in the opcode table */
struct optable_entry
{
- UINT32 flags; /* per-opcode flags */
+ uint32_t flags; /* per-opcode flags */
const char * string; /* identifying string */
};
@@ -218,41 +218,41 @@ struct optable_entry
***************************************************************************/
/* array of PCs not to stop at */
-static UINT8 * ignorepc;
-static UINT8 ignore_all;
+static uint8_t * ignorepc;
+static uint8_t ignore_all;
/* array of information about each opcode */
static optable_entry * optable;
/* buffer for undoing operations */
-static UINT8 * undobuff;
+static uint8_t * undobuff;
/* array of possible instruction decodings */
static fd1094_possibility posslist[4*4*4*4*4];
static int posscount;
/* array of possible seeds */
-static UINT32 * possible_seed;
+static uint32_t * possible_seed;
/* array of constraints */
static fd1094_constraint constraints[MAX_CONSTRAINTS];
static int constcount;
/* stack of search addresses */
-static UINT32 searchstack[MAX_SEARCH_DEPTH];
+static uint32_t searchstack[MAX_SEARCH_DEPTH];
static int searchsp;
/* current key generation parameters */
-static UINT32 fd1094_global;
-static UINT32 fd1094_seed;
-static UINT8 keydirty;
+static uint32_t fd1094_global;
+static uint32_t fd1094_seed;
+static uint8_t keydirty;
/* pointers to our data */
-static UINT16 * coderegion;
-static UINT32 coderegion_words;
-static UINT8 * keyregion;
-static UINT16 * keystatus;
-static UINT32 keystatus_words;
+static uint16_t * coderegion;
+static uint32_t coderegion_words;
+static uint8_t * keyregion;
+static uint16_t * keystatus;
+static uint32_t keystatus_words;
/* key changed callback */
static void (*key_changed)(running_machine &);
@@ -286,18 +286,18 @@ static void execute_fdcset(running_machine &machine, int ref, int params, const
static void execute_fdclist(running_machine &machine, int ref, int params, const char **param);
static void execute_fdcsearch(running_machine &machine, int ref, int params, const char **param);
-static fd1094_possibility *try_all_possibilities(address_space &space, int basepc, int offset, int length, UINT8 *instrbuffer, UINT8 *keybuffer, fd1094_possibility *possdata);
-static void tag_possibility(running_machine &machine, fd1094_possibility *possdata, UINT8 status);
+static fd1094_possibility *try_all_possibilities(address_space &space, int basepc, int offset, int length, uint8_t *instrbuffer, uint8_t *keybuffer, fd1094_possibility *possdata);
+static void tag_possibility(running_machine &machine, fd1094_possibility *possdata, uint8_t status);
static void perform_constrained_search(running_machine &machine);
-static UINT32 find_global_key_matches(UINT32 startwith, UINT16 *output);
-static int find_constraint_sequence(UINT32 global, int quick);
-static int does_key_work_for_constraints(const UINT16 *base, UINT8 *key);
-static UINT32 reconstruct_base_seed(int keybaseaddr, UINT32 startseed);
+static uint32_t find_global_key_matches(uint32_t startwith, uint16_t *output);
+static int find_constraint_sequence(uint32_t global, int quick);
+static int does_key_work_for_constraints(const uint16_t *base, uint8_t *key);
+static uint32_t reconstruct_base_seed(int keybaseaddr, uint32_t startseed);
static void build_optable(running_machine &machine);
-static int validate_ea(address_space &space, UINT32 pc, UINT8 modereg, const UINT8 *parambase, UINT32 flags);
-static int validate_opcode(address_space &space, UINT32 pc, const UINT8 *opdata, int maxwords);
+static int validate_ea(address_space &space, uint32_t pc, uint8_t modereg, const uint8_t *parambase, uint32_t flags);
+static int validate_opcode(address_space &space, uint32_t pc, const uint8_t *opdata, int maxwords);
@@ -328,7 +328,7 @@ static inline int addr_to_keyaddr(offs_t address)
always be 1
-----------------------------------------------*/
-static inline UINT8 mask_for_keyaddr(offs_t address)
+static inline uint8_t mask_for_keyaddr(offs_t address)
{
/* the first half of the key always has bit 0x80 set; the second half 0x40 */
/* however, the values at 0000-0003 and 1000-1003 don't follow this rule */
@@ -346,7 +346,7 @@ static inline UINT8 mask_for_keyaddr(offs_t address)
the specified number of steps
-----------------------------------------------*/
-static inline UINT32 advance_seed(UINT32 seed, int count)
+static inline uint32_t advance_seed(uint32_t seed, int count)
{
/* iterate over the seed for 'count' reps */
while (count--)
@@ -363,7 +363,7 @@ static inline UINT32 advance_seed(UINT32 seed, int count)
from a seed and apply the given mask
-----------------------------------------------*/
-static inline UINT8 key_value_from_seed(UINT32 seed, UINT8 mask)
+static inline uint8_t key_value_from_seed(uint32_t seed, uint8_t mask)
{
/* put bits 16-21 of the seed in the low 6 bits and OR with the mask */
return ((~seed >> 16) & 0x3f) | mask;
@@ -376,15 +376,15 @@ static inline UINT8 key_value_from_seed(UINT32 seed, UINT8 mask)
given seed
-----------------------------------------------*/
-static inline void generate_key_bytes(UINT8 *dest, UINT32 keyoffs, UINT32 count, UINT32 seed)
+static inline void generate_key_bytes(uint8_t *dest, uint32_t keyoffs, uint32_t count, uint32_t seed)
{
int bytenum;
/* generate 'count' bytes of a key */
for (bytenum = 0; bytenum < count; bytenum++)
{
- UINT32 keyaddr = (keyoffs + bytenum) & 0x1fff;
- UINT8 mask = mask_for_keyaddr(keyaddr);
+ uint32_t keyaddr = (keyoffs + bytenum) & 0x1fff;
+ uint8_t mask = mask_for_keyaddr(keyaddr);
/* advance the seed first, then store the derived value */
seed = advance_seed(seed, 1);
@@ -398,7 +398,7 @@ static inline void generate_key_bytes(UINT8 *dest, UINT32 keyoffs, UINT32 count,
an opcode based on the opcode
-----------------------------------------------*/
-static inline UINT8 get_opcode_length(UINT16 opcode)
+static inline uint8_t get_opcode_length(uint16_t opcode)
{
/* return the length from the table */
return optable[opcode].flags >> 28;
@@ -410,7 +410,7 @@ static inline UINT8 get_opcode_length(UINT16 opcode)
constraint
-----------------------------------------------*/
-static inline void set_constraint(fd1094_constraint *constraint, UINT32 pc, UINT16 state, UINT16 value, UINT16 mask)
+static inline void set_constraint(fd1094_constraint *constraint, uint32_t pc, uint16_t state, uint16_t value, uint16_t mask)
{
constraint->pc = pc;
constraint->state = state;
@@ -436,7 +436,7 @@ static inline void print_possibilities(running_machine &machine)
0=no, 1=yes, 2=unlikely
-----------------------------------------------*/
-static inline int pc_is_valid(address_space &space, UINT32 pc, UINT32 flags)
+static inline int pc_is_valid(address_space &space, uint32_t pc, uint32_t flags)
{
/* if we're odd or out of range, fail */
if ((pc & 1) == 1)
@@ -454,7 +454,7 @@ static inline int pc_is_valid(address_space &space, UINT32 pc, UINT32 flags)
valid? 0=no, 1=yes, 2=unlikely
-----------------------------------------------*/
-static inline int addr_is_valid(address_space &space, UINT32 addr, UINT32 flags)
+static inline int addr_is_valid(address_space &space, uint32_t addr, uint32_t flags)
{
/* if this a JMP, the address is a PC */
if (flags & OF_JMP)
@@ -489,22 +489,22 @@ void fd1094_init_debugging(running_machine &machine, const char *cpureg, const c
key_changed = changed;
/* set up the regions */
- coderegion = (UINT16 *)machine.root_device().memregion(cpureg)->base();
+ coderegion = (uint16_t *)machine.root_device().memregion(cpureg)->base();
coderegion_words = machine.root_device().memregion(cpureg)->bytes() / 2;
- keyregion = (UINT8 *)machine.root_device().memregion(keyreg)->base();
- keystatus = (UINT16 *)machine.root_device().memregion(statreg)->base();
+ keyregion = (uint8_t *)machine.root_device().memregion(keyreg)->base();
+ keystatus = (uint16_t *)machine.root_device().memregion(statreg)->base();
keystatus_words = machine.root_device().memregion(statreg)->bytes() / 2;
assert(coderegion_words == keystatus_words);
/* allocate memory for the ignore table */
- ignorepc = make_unique_clear<UINT8>(1 << 23);
+ ignorepc = make_unique_clear<uint8_t>(1 << 23);
/* allocate memory for the undo buffer */
- undobuff = std::make_unique<UINT8[]>(keystatus_words * 2);
+ undobuff = std::make_unique<uint8_t[]>(keystatus_words * 2);
memcpy(undobuff, keystatus, keystatus_words * 2);
/* allocate memory for the possible seeds array */
- possible_seed = std::make_unique<UINT32[]>(65536);
+ possible_seed = std::make_unique<uint32_t[]>(65536);
/* build the opcode table */
build_optable(machine);
@@ -561,8 +561,8 @@ static void set_default_key_params(running_machine &machine)
static const struct
{
const char * gamename;
- UINT32 global;
- UINT32 seed;
+ uint32_t global;
+ uint32_t seed;
} default_keys[] =
{
{ "altbeastj1", 0xFCAFF9F9, 0x177AC6 },
@@ -691,7 +691,7 @@ void fd1094_regenerate_key(running_machine &machine)
static int instruction_hook(device_t &device, offs_t curpc)
{
int curfdstate = fd1094_set_state(keyregion, -1);
- UINT8 instrbuffer[10], keybuffer[5];
+ uint8_t instrbuffer[10], keybuffer[5];
int i, keystat;
/* quick exit if we're ignoring */
@@ -703,7 +703,7 @@ static int instruction_hook(device_t &device, offs_t curpc)
keystatus[curpc/2] = (keystatus[curpc/2] & ~STATE_MASK) | (curfdstate << 8);
if (keystat == STATUS_LOCKED || keystat == STATUS_NOCHANGE)
{
- UINT16 opcode = fd1094_decode(curpc/2, coderegion[curpc/2], keyregion, 0);
+ uint16_t opcode = fd1094_decode(curpc/2, coderegion[curpc/2], keyregion, 0);
int length = get_opcode_length(opcode);
for (i = 1; i < length; i++)
{
@@ -776,7 +776,7 @@ static void execute_fdoutput(running_machine &machine, int ref, int params, cons
static void execute_fdseed(running_machine &machine, int ref, int params, const char **param)
{
- UINT64 num1, num2;
+ uint64_t num1, num2;
/* extract the parameters */
if (!machine.debugger().commands().validate_number_parameter(param[0], &num1))
@@ -803,7 +803,7 @@ static void execute_fdseed(running_machine &machine, int ref, int params, const
static void execute_fdlockguess(running_machine &machine, int ref, int params, const char **param)
{
- UINT64 num1;
+ uint64_t num1;
/* extract the parameter */
if (!machine.debugger().commands().validate_number_parameter(param[0], &num1))
@@ -838,7 +838,7 @@ static void execute_fdeliminate(running_machine &machine, int ref, int params, c
/* extract parameters */
for (pnum = 0; pnum < params; pnum++)
{
- UINT64 num1;
+ uint64_t num1;
/* extract the parameters */
if (!machine.debugger().commands().validate_number_parameter(param[pnum], &num1))
@@ -886,7 +886,7 @@ static void execute_fdunlock(running_machine &machine, int ref, int params, cons
device_t *cpu = machine.debugger().cpu().get_visible_cpu();
/* support 0 or 1 parameters */
- UINT64 offset;
+ uint64_t offset;
if (params != 1 || !machine.debugger().commands().validate_number_parameter(param[0], &offset))
offset = cpu->safe_pc();
int keyaddr = addr_to_keyaddr(offset / 2);
@@ -898,7 +898,7 @@ static void execute_fdunlock(running_machine &machine, int ref, int params, cons
const int reps = keystatus_words / KEY_SIZE;
for (int repnum = 0; repnum < reps; repnum++)
{
- UINT16 *dest = &keystatus[repnum * KEY_SIZE + keyaddr];
+ uint16_t *dest = &keystatus[repnum * KEY_SIZE + keyaddr];
if ((*dest & STATUS_MASK) == STATUS_LOCKED)
*dest &= ~STATUS_MASK & ~HIBITS_MASK;
@@ -930,7 +930,7 @@ static void execute_fdignore(running_machine &machine, int ref, int params, cons
return;
}
- UINT64 offset;
+ uint64_t offset;
if (params != 1 || !machine.debugger().commands().validate_number_parameter(param[0], &offset))
offset = cpu->safe_pc();
offset /= 2;
@@ -1001,7 +1001,7 @@ static void execute_fdstatus(running_machine &machine, int ref, int params, cons
static void execute_fdstate(running_machine &machine, int ref, int params, const char **param)
{
- UINT64 newstate;
+ uint64_t newstate;
/* set the new state if we got a parameter */
if (params > 0)
@@ -1029,7 +1029,7 @@ static void execute_fdpc(running_machine &machine, int ref, int params, const ch
device_t *cpu = machine.debugger().cpu().get_visible_cpu();
/* support 0 or 1 parameters */
- UINT64 newpc = 0;
+ uint64_t newpc = 0;
if (!machine.debugger().commands().validate_number_parameter(param[0], &newpc))
newpc = cpu->safe_pc();
@@ -1051,8 +1051,8 @@ static void execute_fdsearch(running_machine &machine, int ref, int params, cons
address_space &space = machine->debugger().cpu().get_visible_cpu()->memory().space(AS_PROGRAM);
int pc = space.device().safe_pc();
int length, first = TRUE;
- UINT8 instrdata[2];
- UINT16 decoded;
+ uint8_t instrdata[2];
+ uint16_t decoded;
/* if we don't match, reset the stack */
if (searchsp == 0 || searchstack[searchsp-1] != pc)
@@ -1115,14 +1115,14 @@ static void execute_fdsearch(running_machine &machine, int ref, int params, cons
/* handle branches */
if (optable[decoded].flags & OF_BRANCH)
{
- int deltapc = (INT8)decoded;
+ int deltapc = (int8_t)decoded;
int targetpc;
/* extract the delta PC */
if ((optable[decoded].flags & OF_ISIZEMASK) == OF_IMMW)
- deltapc = (INT16)fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0);
+ deltapc = (int16_t)fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0);
else if ((optable[decoded].flags & OF_ISIZEMASK) == OF_IMML)
- deltapc = (INT32)(fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0) << 16) + fd1094_decode((pc+4)/2, coderegion[(pc+4)/2], keyregion, 0);
+ deltapc = (int32_t)(fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0) << 16) + fd1094_decode((pc+4)/2, coderegion[(pc+4)/2], keyregion, 0);
/* for everything but unconditional branches, push the target on the stack; else just go there */
targetpc = (pc + 2 + deltapc) & 0xffffff;
@@ -1143,9 +1143,9 @@ static void execute_fdsearch(running_machine &machine, int ref, int params, cons
/* determine the target PC */
if ((decoded & 0x3f) == 0x38)
- targetpc = (INT16)fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0);
+ targetpc = (int16_t)fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0);
else
- targetpc = (INT32)(fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0) << 16) + fd1094_decode((pc+4)/2, coderegion[(pc+4)/2], keyregion, 0);
+ targetpc = (int32_t)(fd1094_decode((pc+2)/2, coderegion[(pc+2)/2], keyregion, 0) << 16) + fd1094_decode((pc+4)/2, coderegion[(pc+4)/2], keyregion, 0);
/* for jsr's, add a stack entry to explore the destination; else just go there */
if ((decoded & 0xffc0) == 0x4e80)
@@ -1178,7 +1178,7 @@ static void execute_fddasm(running_machine &machine, int ref, int params, const
int origstate = fd1094_set_state(keyregion, -1);
const char *filename;
int skipped = FALSE;
- UINT32 pcaddr;
+ uint32_t pcaddr;
/* extract the parameters */
filename = param[0];
@@ -1195,11 +1195,11 @@ static void execute_fddasm(running_machine &machine, int ref, int params, const
/* now do the disassembly */
for (pcaddr = 0; pcaddr < coderegion_words; )
{
- UINT8 instrbuffer[10];
+ uint8_t instrbuffer[10];
int unknowns = FALSE;
int length, pcoffs;
char disasm[256];
- UINT16 decoded;
+ uint16_t decoded;
int pnum;
/* if we haven't visited this word, go to the next */
@@ -1259,7 +1259,7 @@ static void execute_fddasm(running_machine &machine, int ref, int params, const
/* if we have unknowns, display them as well */
if (unknowns > 0)
{
- UINT8 keybuffer[5];
+ uint8_t keybuffer[5];
int posscount = try_all_possibilities(space, pcaddr * 2, 0, 0, instrbuffer, keybuffer, posslist) - posslist;
for (pnum = 0; pnum < posscount; pnum++)
if (strcmp(disasm, posslist[pnum].dasm) != 0)
@@ -1290,7 +1290,7 @@ static void execute_fddasm(running_machine &machine, int ref, int params, const
static void execute_fdcset(running_machine &machine, int ref, int params, const char **param)
{
- UINT64 pc, value, mask = 0xffff, state = FD1094_STATE_RESET;
+ uint64_t pc, value, mask = 0xffff, state = FD1094_STATE_RESET;
int cnum;
/* extract the parameters */
@@ -1311,7 +1311,7 @@ static void execute_fdcset(running_machine &machine, int ref, int params, const
/* validate parameters */
if ((pc & 1) != 0 || pc > 0xffffff)
{
- machine.debugger().console().printf("Invalid PC specified (%08X)\n", (UINT32)pc);
+ machine.debugger().console().printf("Invalid PC specified (%08X)\n", (uint32_t)pc);
return;
}
@@ -1379,11 +1379,11 @@ static void execute_fdcsearch(running_machine &machine, int ref, int params, con
length
-----------------------------------------------*/
-static fd1094_possibility *try_all_possibilities(address_space &space, int basepc, int offset, int length, UINT8 *instrbuffer, UINT8 *keybuffer, fd1094_possibility *possdata)
+static fd1094_possibility *try_all_possibilities(address_space &space, int basepc, int offset, int length, uint8_t *instrbuffer, uint8_t *keybuffer, fd1094_possibility *possdata)
{
- UINT8 keymask, keystat;
- UINT16 possvalue[4];
- UINT8 posskey[4];
+ uint8_t keymask, keystat;
+ uint16_t possvalue[4];
+ uint8_t posskey[4];
int numposs = 0;
int decoded;
int keyaddr;
@@ -1408,7 +1408,7 @@ static fd1094_possibility *try_all_possibilities(address_space &space, int basep
else
{
/* remember the original key and iterate over high bits */
- UINT8 origkey = keyregion[keyaddr];
+ uint8_t origkey = keyregion[keyaddr];
for (hibit = 0x00; hibit < 0x100; hibit += 0x40)
if ((hibit & keymask) == keymask)
{
@@ -1418,7 +1418,7 @@ static fd1094_possibility *try_all_possibilities(address_space &space, int basep
/* see if we already got that value */
for (i = 0; i < numposs; i++)
- if ((UINT16)decoded == possvalue[i])
+ if ((uint16_t)decoded == possvalue[i])
break;
/* if not, add it to the list */
@@ -1503,12 +1503,12 @@ static fd1094_possibility *try_all_possibilities(address_space &space, int basep
with the specified status
-----------------------------------------------*/
-static void tag_possibility(running_machine &machine, f