summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/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/devices/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/devices/machine')
-rw-r--r--src/devices/machine/40105.cpp8
-rw-r--r--src/devices/machine/40105.h12
-rw-r--r--src/devices/machine/53c7xx.cpp20
-rw-r--r--src/devices/machine/53c7xx.h58
-rw-r--r--src/devices/machine/53c810.cpp52
-rw-r--r--src/devices/machine/53c810.h80
-rw-r--r--src/devices/machine/64h156.cpp2
-rw-r--r--src/devices/machine/64h156.h12
-rw-r--r--src/devices/machine/6522via.cpp18
-rw-r--r--src/devices/machine/6522via.h60
-rw-r--r--src/devices/machine/6525tpi.cpp18
-rw-r--r--src/devices/machine/6525tpi.h24
-rw-r--r--src/devices/machine/6532riot.cpp30
-rw-r--r--src/devices/machine/6532riot.h40
-rw-r--r--src/devices/machine/6821pia.cpp76
-rw-r--r--src/devices/machine/6821pia.h98
-rw-r--r--src/devices/machine/68230pit.cpp110
-rw-r--r--src/devices/machine/68230pit.h128
-rw-r--r--src/devices/machine/68307.cpp18
-rw-r--r--src/devices/machine/68307.h40
-rw-r--r--src/devices/machine/68307bus.cpp2
-rw-r--r--src/devices/machine/68307bus.h2
-rw-r--r--src/devices/machine/68307sim.cpp46
-rw-r--r--src/devices/machine/68307sim.h48
-rw-r--r--src/devices/machine/68307tmu.cpp8
-rw-r--r--src/devices/machine/68307tmu.h10
-rw-r--r--src/devices/machine/68340.cpp4
-rw-r--r--src/devices/machine/68340.h12
-rw-r--r--src/devices/machine/68340sim.h4
-rw-r--r--src/devices/machine/6840ptm.cpp6
-rw-r--r--src/devices/machine/6840ptm.h42
-rw-r--r--src/devices/machine/6850acia.cpp6
-rw-r--r--src/devices/machine/6850acia.h10
-rw-r--r--src/devices/machine/68561mpcc.cpp14
-rw-r--r--src/devices/machine/68561mpcc.h16
-rw-r--r--src/devices/machine/7200fifo.cpp8
-rw-r--r--src/devices/machine/7200fifo.h12
-rw-r--r--src/devices/machine/74123.cpp2
-rw-r--r--src/devices/machine/74123.h2
-rw-r--r--src/devices/machine/74145.cpp8
-rw-r--r--src/devices/machine/74145.h8
-rw-r--r--src/devices/machine/74148.cpp2
-rw-r--r--src/devices/machine/74148.h2
-rw-r--r--src/devices/machine/74153.cpp2
-rw-r--r--src/devices/machine/74153.h2
-rw-r--r--src/devices/machine/74181.cpp8
-rw-r--r--src/devices/machine/74181.h18
-rw-r--r--src/devices/machine/7474.cpp2
-rw-r--r--src/devices/machine/7474.h20
-rw-r--r--src/devices/machine/8042kbdc.cpp10
-rw-r--r--src/devices/machine/8042kbdc.h8
-rw-r--r--src/devices/machine/8530scc.cpp26
-rw-r--r--src/devices/machine/8530scc.h26
-rw-r--r--src/devices/machine/aakart.cpp6
-rw-r--r--src/devices/machine/aakart.h26
-rw-r--r--src/devices/machine/adc0808.cpp2
-rw-r--r--src/devices/machine/adc0808.h4
-rw-r--r--src/devices/machine/adc083x.cpp12
-rw-r--r--src/devices/machine/adc083x.h44
-rw-r--r--src/devices/machine/adc1038.cpp2
-rw-r--r--src/devices/machine/adc1038.h2
-rw-r--r--src/devices/machine/adc1213x.cpp8
-rw-r--r--src/devices/machine/adc1213x.h12
-rw-r--r--src/devices/machine/aicartc.cpp6
-rw-r--r--src/devices/machine/aicartc.h8
-rw-r--r--src/devices/machine/akiko.cpp72
-rw-r--r--src/devices/machine/akiko.h56
-rw-r--r--src/devices/machine/am53cf96.cpp6
-rw-r--r--src/devices/machine/am53cf96.h16
-rw-r--r--src/devices/machine/am9517a.cpp14
-rw-r--r--src/devices/machine/am9517a.h32
-rw-r--r--src/devices/machine/amigafdc.cpp46
-rw-r--r--src/devices/machine/amigafdc.h48
-rw-r--r--src/devices/machine/appldriv.cpp16
-rw-r--r--src/devices/machine/appldriv.h10
-rw-r--r--src/devices/machine/applefdc.cpp28
-rw-r--r--src/devices/machine/applefdc.h44
-rw-r--r--src/devices/machine/at28c16.cpp12
-rw-r--r--src/devices/machine/at28c16.h4
-rw-r--r--src/devices/machine/at29x.cpp12
-rw-r--r--src/devices/machine/at29x.h12
-rw-r--r--src/devices/machine/at45dbxx.cpp40
-rw-r--r--src/devices/machine/at45dbxx.h62
-rw-r--r--src/devices/machine/at_keybc.cpp2
-rw-r--r--src/devices/machine/at_keybc.h6
-rw-r--r--src/devices/machine/atadev.h4
-rw-r--r--src/devices/machine/ataflash.cpp8
-rw-r--r--src/devices/machine/ataflash.h8
-rw-r--r--src/devices/machine/atahle.cpp24
-rw-r--r--src/devices/machine/atahle.h44
-rw-r--r--src/devices/machine/ataintf.cpp16
-rw-r--r--src/devices/machine/ataintf.h10
-rw-r--r--src/devices/machine/atapicdr.cpp6
-rw-r--r--src/devices/machine/atapicdr.h8
-rw-r--r--src/devices/machine/atapihle.cpp2
-rw-r--r--src/devices/machine/atapihle.h2
-rw-r--r--src/devices/machine/autoconfig.cpp10
-rw-r--r--src/devices/machine/autoconfig.h10
-rw-r--r--src/devices/machine/ay31015.cpp22
-rw-r--r--src/devices/machine/ay31015.h42
-rw-r--r--src/devices/machine/bankdev.cpp2
-rw-r--r--src/devices/machine/bankdev.h14
-rw-r--r--src/devices/machine/bcreader.cpp14
-rw-r--r--src/devices/machine/bcreader.h8
-rw-r--r--src/devices/machine/buffer.cpp2
-rw-r--r--src/devices/machine/buffer.h6
-rw-r--r--src/devices/machine/cdp1852.cpp2
-rw-r--r--src/devices/machine/cdp1852.h6
-rw-r--r--src/devices/machine/cdp1871.cpp6
-rw-r--r--src/devices/machine/cdp1871.h4
-rw-r--r--src/devices/machine/clock.cpp2
-rw-r--r--src/devices/machine/clock.h2
-rw-r--r--src/devices/machine/com8116.cpp6
-rw-r--r--src/devices/machine/com8116.h6
-rw-r--r--src/devices/machine/corvushd.cpp96
-rw-r--r--src/devices/machine/corvushd.h254
-rw-r--r--src/devices/machine/cr511b.cpp2
-rw-r--r--src/devices/machine/cr511b.h4
-rw-r--r--src/devices/machine/cr589.cpp6
-rw-r--r--src/devices/machine/cr589.h8
-rw-r--r--src/devices/machine/cs4031.cpp12
-rw-r--r--src/devices/machine/cs4031.h24
-rw-r--r--src/devices/machine/cs8221.cpp4
-rw-r--r--src/devices/machine/cs8221.h12
-rw-r--r--src/devices/machine/diablo_hd.cpp64
-rw-r--r--src/devices/machine/diablo_hd.h30
-rw-r--r--src/devices/machine/dmac.cpp8
-rw-r--r--src/devices/machine/dmac.h18
-rw-r--r--src/devices/machine/dp8390.cpp26
-rw-r--r--src/devices/machine/dp8390.h90
-rw-r--r--src/devices/machine/ds1204.cpp8
-rw-r--r--src/devices/machine/ds1204.h18
-rw-r--r--src/devices/machine/ds128x.cpp2
-rw-r--r--src/devices/machine/ds128x.h2
-rw-r--r--src/devices/machine/ds1302.cpp2
-rw-r--r--src/devices/machine/ds1302.h12
-rw-r--r--src/devices/machine/ds1315.cpp8
-rw-r--r--src/devices/machine/ds1315.h4
-rw-r--r--src/devices/machine/ds1386.cpp38
-rw-r--r--src/devices/machine/ds1386.h34
-rw-r--r--src/devices/machine/ds2401.cpp4
-rw-r--r--src/devices/machine/ds2401.h8
-rw-r--r--src/devices/machine/ds2404.cpp18
-rw-r--r--src/devices/machine/ds2404.h40
-rw-r--r--src/devices/machine/ds75160a.cpp4
-rw-r--r--src/devices/machine/ds75160a.h4
-rw-r--r--src/devices/machine/ds75161a.cpp2
-rw-r--r--src/devices/machine/ds75161a.h2
-rw-r--r--src/devices/machine/e0516.cpp2
-rw-r--r--src/devices/machine/e0516.h2
-rw-r--r--src/devices/machine/e05a03.cpp4
-rw-r--r--src/devices/machine/e05a03.h10
-rw-r--r--src/devices/machine/e05a30.cpp14
-rw-r--r--src/devices/machine/e05a30.h22
-rw-r--r--src/devices/machine/eeprom.cpp38
-rw-r--r--src/devices/machine/eeprom.h28
-rw-r--r--src/devices/machine/eeprompar.cpp2
-rw-r--r--src/devices/machine/eeprompar.h2
-rw-r--r--src/devices/machine/eepromser.cpp10
-rw-r--r--src/devices/machine/eepromser.h28
-rw-r--r--src/devices/machine/er2055.cpp12
-rw-r--r--src/devices/machine/er2055.h26
-rw-r--r--src/devices/machine/f3853.cpp18
-rw-r--r--src/devices/machine/f3853.h24
-rw-r--r--src/devices/machine/fdc37c665gt.cpp4
-rw-r--r--src/devices/machine/fdc37c665gt.h2
-rw-r--r--src/devices/machine/fga002.cpp114
-rw-r--r--src/devices/machine/fga002.h110
-rw-r--r--src/devices/machine/gayle.cpp8
-rw-r--r--src/devices/machine/gayle.h8
-rw-r--r--src/devices/machine/gen_latch.cpp12
-rw-r--r--src/devices/machine/gen_latch.h18
-rw-r--r--src/devices/machine/genpc.cpp8
-rw-r--r--src/devices/machine/genpc.h34
-rw-r--r--src/devices/machine/gt64xxx.cpp48
-rw-r--r--src/devices/machine/gt64xxx.h34
-rw-r--r--src/devices/machine/hd63450.cpp2
-rw-r--r--src/devices/machine/hd63450.h2
-rw-r--r--src/devices/machine/hd64610.cpp8
-rw-r--r--src/devices/machine/hd64610.h8
-rw-r--r--src/devices/machine/hdc92x4.cpp54
-rw-r--r--src/devices/machine/hdc92x4.h52
-rw-r--r--src/devices/machine/hp_taco.cpp30
-rw-r--r--src/devices/machine/hp_taco.h26
-rw-r--r--src/devices/machine/i2cmem.cpp4
-rw-r--r--src/devices/machine/i2cmem.h6
-rw-r--r--src/devices/machine/i6300esb.cpp26
-rw-r--r--src/devices/machine/i6300esb.h24
-rw-r--r--src/devices/machine/i80130.cpp4
-rw-r--r--src/devices/machine/i80130.h4
-rw-r--r--src/devices/machine/i8155.cpp16
-rw-r--r--src/devices/machine/i8155.h22
-rw-r--r--src/devices/machine/i8212.cpp2
-rw-r--r--src/devices/machine/i8212.h4
-rw-r--r--src/devices/machine/i8214.cpp8
-rw-r--r--src/devices/machine/i8214.h8
-rw-r--r--src/devices/machine/i82371sb.cpp24
-rw-r--r--src/devices/machine/i82371sb.h16
-rw-r--r--src/devices/machine/i8243.cpp2
-rw-r--r--src/devices/machine/i8243.h12
-rw-r--r--src/devices/machine/i82439hx.cpp6
-rw-r--r--src/devices/machine/i82439hx.h14
-rw-r--r--src/devices/machine/i8251.cpp12
-rw-r--r--src/devices/machine/i8251.h26
-rw-r--r--src/devices/machine/i82541.cpp2
-rw-r--r--src/devices/machine/i82541.h2
-rw-r--r--src/devices/machine/i8255.cpp46
-rw-r--r--src/devices/machine/i8255.h28
-rw-r--r--src/devices/machine/i8257.cpp6
-rw-r--r--src/devices/machine/i8257.h16
-rw-r--r--src/devices/machine/i8271.cpp22
-rw-r--r--src/devices/machine/i8271.h30
-rw-r--r--src/devices/machine/i8279.cpp40
-rw-r--r--src/devices/machine/i8279.h26
-rw-r--r--src/devices/machine/i82875p.cpp12
-rw-r--r--src/devices/machine/i82875p.h24
-rw-r--r--src/devices/machine/i8355.cpp10
-rw-r--r--src/devices/machine/i8355.h10
-rw-r--r--src/devices/machine/idectrl.cpp26
-rw-r--r--src/devices/machine/idectrl.h26
-rw-r--r--src/devices/machine/idehd.cpp20
-rw-r--r--src/devices/machine/idehd.h46
-rw-r--r--src/devices/machine/im6402.cpp2
-rw-r--r--src/devices/machine/im6402.h6
-rw-r--r--src/devices/machine/input_merger.cpp6
-rw-r--r--src/devices/machine/input_merger.h6
-rw-r--r--src/devices/machine/ins8154.cpp4
-rw-r--r--src/devices/machine/ins8154.h16
-rw-r--r--src/devices/machine/ins8250.cpp20
-rw-r--r--src/devices/machine/ins8250.h50
-rw-r--r--src/devices/machine/intelfsh.cpp84
-rw-r--r--src/devices/machine/intelfsh.h112
-rw-r--r--src/devices/machine/jvsdev.cpp36
-rw-r--r--src/devices/machine/jvsdev.h34
-rw-r--r--src/devices/machine/jvshost.cpp30
-rw-r--r--src/devices/machine/jvshost.h18
-rw-r--r--src/devices/machine/k033906.cpp6
-rw-r--r--src/devices/machine/k033906.h10
-rw-r--r--src/devices/machine/k053252.cpp2
-rw-r--r--src/devices/machine/k053252.h10
-rw-r--r--src/devices/machine/k056230.cpp2
-rw-r--r--src/devices/machine/k056230.h4
-rw-r--r--src/devices/machine/kb3600.cpp8
-rw-r--r--src/devices/machine/kb3600.h4
-rw-r--r--src/devices/machine/keyboard.cpp28
-rw-r--r--src/devices/machine/keyboard.h40
-rw-r--r--src/devices/machine/keyboard.ipp48
-rw-r--r--src/devices/machine/kr2376.cpp4
-rw-r--r--src/devices/machine/kr2376.h2
-rw-r--r--src/devices/machine/laserdsc.cpp78
-rw-r--r--src/devices/machine/laserdsc.h70
-rw-r--r--src/devices/machine/latch.cpp4
-rw-r--r--src/devices/machine/latch.h4
-rw-r--r--src/devices/machine/latch8.cpp22
-rw-r--r--src/devices/machine/latch8.h64
-rw-r--r--src/devices/machine/lc89510.cpp2
-rw-r--r--src/devices/machine/lc89510.h2
-rw-r--r--src/devices/machine/ldp1000.cpp14
-rw-r--r--src/devices/machine/ldp1000.h14
-rw-r--r--src/devices/machine/ldp1450.cpp16
-rw-r--r--src/devices/machine/ldp1450.h30
-rw-r--r--src/devices/machine/ldpr8210.cpp84
-rw-r--r--src/devices/machine/ldpr8210.h58
-rw-r--r--src/devices/machine/ldstub.h24
-rw-r--r--src/devices/machine/ldv1000.cpp28
-rw-r--r--src/devices/machine/ldv1000.h38
-rw-r--r--src/devices/machine/ldvp931.cpp18
-rw-r--r--src/devices/machine/ldvp931.h42
-rw-r--r--src/devices/machine/legscsi.cpp10
-rw-r--r--src/devices/machine/legscsi.h10
-rw-r--r--src/devices/machine/lh5810.cpp2
-rw-r--r--src/devices/machine/lh5810.h6
-rw-r--r--src/devices/machine/linflash.cpp10
-rw-r--r--src/devices/machine/linflash.h8
-rw-r--r--src/devices/machine/lpc-acpi.cpp6
-rw-r--r--src/devices/machine/lpc-acpi.h16
-rw-r--r--src/devices/machine/lpc-pit.cpp6
-rw-r--r--src/devices/machine/lpc-pit.h6
-rw-r--r--src/devices/machine/lpc-rtc.cpp10
-rw-r--r--src/devices/machine/lpc-rtc.h14
-rw-r--r--src/devices/machine/lpc.cpp2
-rw-r--r--src/devices/machine/lpc.h6
-rw-r--r--src/devices/machine/lpci.cpp10
-rw-r--r--src/devices/machine/lpci.h14
-rw-r--r--src/devices/machine/m6m80011ap.cpp2
-rw-r--r--src/devices/machine/m6m80011ap.h18
-rw-r--r--src/devices/machine/mb14241.cpp4
-rw-r--r--src/devices/machine/mb14241.h6
-rw-r--r--src/devices/machine/mb3773.cpp2
-rw-r--r--src/devices/machine/mb3773.h2
-rw-r--r--src/devices/machine/mb8421.cpp2
-rw-r--r--src/devices/machine/mb8421.h6
-rw-r--r--src/devices/machine/mb87078.cpp2
-rw-r--r--src/devices/machine/mb87078.h6
-rw-r--r--src/devices/machine/mb8795.cpp8
-rw-r--r--src/devices/machine/mb8795.h16
-rw-r--r--src/devices/machine/mb89352.cpp6
-rw-r--r--src/devices/machine/mb89352.h48
-rw-r--r--src/devices/machine/mb89363b.cpp2
-rw-r--r--src/devices/machine/mb89363b.h2
-rw-r--r--src/devices/machine/mb89371.cpp2
-rw-r--r--src/devices/machine/mb89371.h2
-rw-r--r--src/devices/machine/mc146818.cpp8
-rw-r--r--src/devices/machine/mc146818.h8
-rw-r--r--src/devices/machine/mc2661.cpp10
-rw-r--r--src/devices/machine/mc2661.h14
-rw-r--r--src/devices/machine/mc68328.cpp60
-rw-r--r--src/devices/machine/mc68328.h346
-rw-r--r--src/devices/machine/mc6843.cpp14
-rw-r--r--src/devices/machine/mc6843.h38
-rw-r--r--src/devices/machine/mc6846.cpp14
-rw-r--r--src/devices/machine/mc6846.h44
-rw-r--r--src/devices/machine/mc6852.cpp8
-rw-r--r--src/devices/machine/mc6852.h20
-rw-r--r--src/devices/machine/mc6854.cpp16
-rw-r--r--src/devices/machine/mc6854.h42
-rw-r--r--src/devices/machine/mc68681.cpp50
-rw-r--r--src/devices/machine/mc68681.h70
-rw-r--r--src/devices/machine/mc68901.cpp10
-rw-r--r--src/devices/machine/mc68901.h56
-rw-r--r--src/devices/machine/mccs1850.cpp14
-rw-r--r--src/devices/machine/mccs1850.h14
-rw-r--r--src/devices/machine/mcf5206e.cpp18
-rw-r--r--src/devices/machine/mcf5206e.h52
-rw-r--r--src/devices/machine/microtch.cpp6
-rw-r--r--src/devices/machine/microtch.h16
-rw-r--r--src/devices/machine/mm58167.cpp4
-rw-r--r--src/devices/machine/mm58167.h2
-rw-r--r--src/devices/machine/mm58274c.cpp2
-rw-r--r--src/devices/machine/mm58274c.h2
-rw-r--r--src/devices/machine/mm74c922.cpp6
-rw-r--r--src/devices/machine/mm74c922.h6
-rw-r--r--src/devices/machine/mos6526.cpp44
-rw-r--r--src/devices/machine/mos6526.h66
-rw-r--r--src/devices/machine/mos6529.cpp2
-rw-r--r--src/devices/machine/mos6529.h4
-rw-r--r--src/devices/machine/mos6530.cpp28
-rw-r--r--src/devices/machine/mos6530.h32
-rw-r--r--src/devices/machine/mos6530n.cpp68
-rw-r--r--src/devices/machine/mos6530n.h34
-rw-r--r--src/devices/machine/mos6551.cpp22
-rw-r--r--src/devices/machine/mos6551.h36
-rw-r--r--src/devices/machine/mos6702.cpp2
-rw-r--r--src/devices/machine/mos6702.h2
-rw-r--r--src/devices/machine/mos8706.cpp2
-rw-r--r--src/devices/machine/mos8706.h2
-rw-r--r--src/devices/machine/mos8722.cpp4
-rw-r--r--src/devices/machine/mos8722.h10
-rw-r--r--src/devices/machine/mos8726.cpp4
-rw-r--r--src/devices/machine/mos8726.h2
-rw-r--r--src/devices/machine/mpu401.cpp2
-rw-r--r--src/devices/machine/mpu401.h10
-rw-r--r--src/devices/machine/msm5832.cpp6
-rw-r--r--src/devices/machine/msm5832.h6
-rw-r--r--src/devices/machine/msm58321.cpp8
-rw-r--r--src/devices/machine/msm58321.h6
-rw-r--r--src/devices/machine/msm6242.cpp36
-rw-r--r--src/devices/machine/msm6242.h30
-rw-r--r--src/devices/machine/ncr5380.cpp8
-rw-r--r--src/devices/machine/ncr5380.h16
-rw-r--r--src/devices/machine/ncr5380n.cpp24
-rw-r--r--src/devices/machine/ncr5380n.h14
-rw-r--r--src/devices/machine/ncr5390.cpp36
-rw-r--r--src/devices/machine/ncr5390.h22
-rw-r--r--src/devices/machine/ncr539x.cpp12
-rw-r--r--src/devices/machine/ncr539x.h36
-rw-r--r--src/devices/machine/netlist.cpp50
-rw-r--r--src/devices/machine/netlist.h52
-rw-r--r--src/devices/machine/nmc9306.cpp6
-rw-r--r--src/devices/machine/nmc9306.h14
-rw-r--r--src/devices/machine/nsc810.cpp6
-rw-r--r--src/devices/machine/nsc810.h36
-rw-r--r--src/devices/machine/nscsi_bus.cpp40
-rw-r--r--src/devices/machine/nscsi_bus.h38
-rw-r--r--src/devices/machine/nscsi_cb.cpp2
-rw-r--r--src/devices/machine/nscsi_cb.h8
-rw-r--r--src/devices/machine/nscsi_cd.cpp8
-rw-r--r--src/devices/machine/nscsi_cd.h6
-rw-r--r--src/devices/machine/nscsi_hd.cpp16
-rw-r--r--src/devices/machine/nscsi_hd.h10
-rw-r--r--src/devices/machine/nscsi_s1410.cpp8
-rw-r--r--src/devices/machine/nscsi_s1410.h8
-rw-r--r--src/devices/machine/nvram.cpp4
-rw-r--r--src/devices/machine/nvram.h2
-rw-r--r--src/devices/machine/pc_fdc.cpp14
-rw-r--r--src/devices/machine/pc_fdc.h14
-rw-r--r--src/devices/machine/pc_lpt.cpp2
-rw-r--r--src/devices/machine/pc_lpt.h6
-rw-r--r--src/devices/machine/pccard.cpp2
-rw-r--r--src/devices/machine/pccard.h2
-rw-r--r--src/devices/machine/pcf8593.cpp4
-rw-r--r--src/devices/machine/pcf8593.h12
-rw-r--r--src/devices/machine/pci-apic.cpp2
-rw-r--r--src/devices/machine/pci-apic.h2
-rw-r--r--src/devices/machine/pci-ide.cpp6
-rw-r--r--src/devices/machine/pci-ide.h4
-rw-r--r--src/devices/machine/pci-sata.cpp2
-rw-r--r--src/devices/machine/pci-sata.h2
-rw-r--r--src/devices/machine/pci-smbus.cpp4
-rw-r--r--src/devices/machine/pci-smbus.h10
-rw-r--r--src/devices/machine/pci-usb.cpp4
-rw-r--r--src/devices/machine/pci-usb.h4
-rw-r--r--src/devices/machine/pci.cpp76
-rw-r--r--src/devices/machine/pci.h90
-rw-r--r--src/devices/machine/pci9050.cpp10
-rw-r--r--src/devices/machine/pci9050.h6
-rw-r--r--src/devices/machine/pckeybrd.cpp18
-rw-r--r--src/devices/machine/pckeybrd.h24
-rw-r--r--src/devices/machine/pdc.cpp16
-rw-r--r--src/devices/machine/pdc.h28
-rw-r--r--src/devices/machine/pic8259.cpp14
-rw-r--r--src/devices/machine/pic8259.h44
-rw-r--r--src/devices/machine/pit8253.cpp40
-rw-r--r--src/devices/machine/pit8253.h34
-rw-r--r--src/devices/machine/pla.cpp20
-rw-r--r--src/devices/machine/pla.h36
-rw-r--r--src/devices/machine/r10696.cpp12
-rw-r--r--src/devices/machine/r10696.h8
-rw-r--r--src/devices/machine/r10788.cpp6
-rw-r--r--src/devices/machine/r10788.h18
-rw-r--r--src/devices/machine/ra17xx.cpp2
-rw-r--r--src/devices/machine/ra17xx.h6
-rw-r--r--src/devices/machine/ram.cpp12
-rw-r--r--src/devices/machine/ram.h24
-rw-r--r--src/devices/machine/rf5c296.cpp8
-rw-r--r--src/devices/machine/rf5c296.h6
-rw-r--r--src/devices/machine/roc10937.cpp16
-rw-r--r--src/devices/machine/roc10937.h22
-rw-r--r--src/devices/machine/rp5c01.cpp4
-rw-r--r--src/devices/machine/rp5c01.h10
-rw-r--r--src/devices/machine/rp5c15.cpp4
-rw-r--r--src/devices/machine/rp5c15.h10
-rw-r--r--src/devices/machine/rp5h01.cpp4
-rw-r--r--src/devices/machine/rp5h01.h8
-rw-r--r--src/devices/machine/rtc4543.cpp6
-rw-r--r--src/devices/machine/rtc4543.h6
-rw-r--r--src/devices/machine/rtc65271.cpp28
-rw-r--r--src/devices/machine/rtc65271.h16
-rw-r--r--src/devices/machine/rtc9701.cpp10
-rw-r--r--src/devices/machine/rtc9701.h12
-rw-r--r--src/devices/machine/s2636.cpp22
-rw-r--r--src/devices/machine/s2636.h12
-rw-r--r--src/devices/machine/s3520cf.cpp10
-rw-r--r--src/devices/machine/s3520cf.h16
-rw-r--r--src/devices/machine/s3c2400.cpp6
-rw-r--r--src/devices/machine/s3c2400.h346
-rw-r--r--src/devices/machine/s3c2410.cpp10
-rw-r--r--src/devices/machine/s3c2410.h468
-rw-r--r--src/devices/machine/s3c2440.cpp10
-rw-r--r--src/devices/machine/s3c2440.h514
-rw-r--r--src/devices/machine/s3c24xx.hxx388
-rw-r--r--src/devices/machine/s3c44b0.cpp202
-rw-r--r--src/devices/machine/s3c44b0.h334
-rw-r--r--src/devices/machine/scnxx562.cpp186
-rw-r--r--src/devices/machine/scnxx562.h274
-rw-r--r--src/devices/machine/serflash.cpp12
-rw-r--r--src/devices/machine/serflash.h26
-rw-r--r--src/devices/machine/smartmed.cpp56
-rw-r--r--src/devices/machine/smartmed.h26
-rw-r--r--src/devices/machine/smc91c9x.cpp22
-rw-r--r--src/devices/machine/smc91c9x.h26
-rw-r--r--src/devices/machine/smpc.cpp32
-rw-r--r--src/devices/machine/sonydriv.cpp16
-rw-r--r--src/devices/machine/sonydriv.h8
-rw-r--r--src/devices/machine/spchrom.cpp2
-rw-r--r--src/devices/machine/spchrom.h4
-rw-r--r--src/devices/machine/steppers.cpp4
-rw-r--r--src/devices/machine/steppers.h42
-rw-r--r--src/devices/machine/strata.cpp32
-rw-r--r--src/devices/machine/strata.h14
-rw-r--r--src/devices/machine/stvcd.cpp148
-rw-r--r--src/devices/machine/t10mmc.cpp14
-rw-r--r--src/devices/machine/t10mmc.h14
-rw-r--r--src/devices/machine/t10sbc.cpp6
-rw-r--r--src/devices/machine/t10sbc.h8
-rw-r--r--src/devices/machine/t10spc.cpp6
-rw-r--r--src/devices/machine/t10spc.h20
-rw-r--r--src/devices/machine/tc009xlvc.cpp18
-rw-r--r--src/devices/machine/tc009xlvc.h32
-rw-r--r--src/devices/machine/terminal.cpp26
-rw-r--r--src/devices/machine/terminal.h20
-rw-r--r--src/devices/machine/timehelp.h6
-rw-r--r--src/devices/machine/timekpr.cpp28
-rw-r--r--src/devices/machine/timekpr.h38
-rw-r--r--src/devices/machine/tmc0430.cpp6
-rw-r--r--src/devices/machine/tmc0430.h12
-rw-r--r--src/devices/machine/tmp68301.cpp24
-rw-r--r--src/devices/machine/tmp68301.h22
-rw-r--r--src/devices/machine/tms1024.cpp6
-rw-r--r--src/devices/machine/tms1024.h12
-rw-r--r--src/devices/machine/tms5501.cpp14
-rw-r--r--src/devices/machine/tms5501.h22
-rw-r--r--src/devices/machine/tms6100.cpp14
-rw-r--r--src/devices/machine/tms6100.h26
-rw-r--r--src/devices/machine/tms9901.cpp6
-rw-r--r--src/devices/machine/tms9901.h2
-rw-r--r--src/devices/machine/tms9902.cpp12
-rw-r--r--src/devices/machine/tms9902.h20
-rw-r--r--src/devices/machine/upd1990a.cpp6
-rw-r--r--src/devices/machine/upd1990a.h10
-rw-r--r--src/devices/machine/upd4701.cpp8
-rw-r--r--src/devices/machine/upd4701.h8
-rw-r--r--src/devices/machine/upd4992.cpp2
-rw-r--r--src/devices/machine/upd4992.h4
-rw-r--r--src/devices/machine/upd7002.cpp2
-rw-r--r--src/devices/machine/upd7002.h2
-rw-r--r--src/devices/machine/upd71071.cpp6
-rw-r--r--src/devices/machine/upd71071.h28
-rw-r--r--src/devices/machine/upd765.cpp64
-rw-r--r--src/devices/machine/upd765.h78
-rw-r--r--src/devices/machine/v3021.cpp6
-rw-r--r--src/devices/machine/v3021.h6
-rw-r--r--src/devices/machine/vrc4373.cpp32
-rw-r--r--src/devices/machine/vrc4373.h16
-rw-r--r--src/devices/machine/vt82c496.cpp8
-rw-r--r--src/devices/machine/vt82c496.h14
-rw-r--r--src/devices/machine/vt83c461.cpp4
-rw-r--r--src/devices/machine/vt83c461.h8
-rw-r--r--src/devices/machine/watchdog.cpp4
-rw-r--r--src/devices/machine/watchdog.h10
-rw-r--r--src/devices/machine/wd11c00_17.cpp16
-rw-r--r--src/devices/machine/wd11c00_17.h14
-rw-r--r--src/devices/machine/wd2010.cpp50
-rw-r--r--src/devices/machine/wd2010.h36
-rw-r--r--src/devices/machine/wd33c93.cpp22
-rw-r--r--src/devices/machine/wd33c93.h22
-rw-r--r--src/devices/machine/wd7600.cpp10
-rw-r--r--src/devices/machine/wd7600.h32
-rw-r--r--src/devices/machine/wd_fdc.cpp120
-rw-r--r--src/devices/machine/wd_fdc.h120
-rw-r--r--src/devices/machine/wozfdc.cpp26
-rw-r--r--src/devices/machine/wozfdc.h20
-rw-r--r--src/devices/machine/x2212.cpp10
-rw-r--r--src/devices/machine/x2212.h8
-rw-r--r--src/devices/machine/x76f041.cpp6
-rw-r--r--src/devices/machine/x76f041.h18
-rw-r--r--src/devices/machine/x76f100.cpp6
-rw-r--r--src/devices/machine/x76f100.h14
-rw-r--r--src/devices/machine/ym2148.cpp6
-rw-r--r--src/devices/machine/ym2148.h16
-rw-r--r--src/devices/machine/z80ctc.cpp8
-rw-r--r--src/devices/machine/z80ctc.h22
-rw-r--r--src/devices/machine/z80dart.cpp36
-rw-r--r--src/devices/machine/z80dart.h46
-rw-r--r--src/devices/machine/z80dma.cpp18
-rw-r--r--src/devices/machine/z80dma.h38
-rw-r--r--src/devices/machine/z80pio.cpp22
-rw-r--r--src/devices/machine/z80pio.h56
-rw-r--r--src/devices/machine/z80scc.cpp134
-rw-r--r--src/devices/machine/z80scc.h210
-rw-r--r--src/devices/machine/z80sio.cpp52
-rw-r--r--src/devices/machine/z80sio.h74
-rw-r--r--src/devices/machine/z80sti.cpp8
-rw-r--r--src/devices/machine/z80sti.h38
-rw-r--r--src/devices/machine/z8536.cpp28
-rw-r--r--src/devices/machine/z8536.h24
556 files changed, 7105 insertions, 7105 deletions
diff --git a/src/devices/machine/40105.cpp b/src/devices/machine/40105.cpp
index c220f9eb18c..8dec8b78cec 100644
--- a/src/devices/machine/40105.cpp
+++ b/src/devices/machine/40105.cpp
@@ -34,7 +34,7 @@ const device_type CMOS_40105 = &device_creator<cmos_40105_device>;
// cmos_40105_device - constructor
//-------------------------------------------------
-cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CMOS_40105, "40105", tag, owner, clock, "40105", __FILE__),
m_write_dir(*this),
m_write_dor(*this), m_d(0), m_q(0), m_dir(0), m_dor(0), m_si(0), m_so(0)
@@ -68,7 +68,7 @@ void cmos_40105_device::device_start()
void cmos_40105_device::device_reset()
{
- m_fifo = std::queue<UINT8>();
+ m_fifo = std::queue<uint8_t>();
m_dir = 1;
m_dor = 0;
@@ -83,7 +83,7 @@ void cmos_40105_device::device_reset()
// read - read Q
//-------------------------------------------------
-UINT8 cmos_40105_device::read()
+uint8_t cmos_40105_device::read()
{
return m_q;
}
@@ -93,7 +93,7 @@ UINT8 cmos_40105_device::read()
// write - write D
//-------------------------------------------------
-void cmos_40105_device::write(UINT8 data)
+void cmos_40105_device::write(uint8_t data)
{
m_d = data & 0x0f;
}
diff --git a/src/devices/machine/40105.h b/src/devices/machine/40105.h
index 09411a0d3e3..67d3a58274e 100644
--- a/src/devices/machine/40105.h
+++ b/src/devices/machine/40105.h
@@ -37,13 +37,13 @@ class cmos_40105_device : public device_t
{
public:
// construction/destruction
- cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _dir> void set_dir_callback(_dir dir) { m_write_dir.set_callback(dir); }
template<class _dor> void set_dor_callback(_dor dor) { m_write_dor.set_callback(dor); }
- UINT8 read();
- void write(UINT8 data);
+ uint8_t read();
+ void write(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( si_w );
DECLARE_WRITE_LINE_MEMBER( so_w );
@@ -60,10 +60,10 @@ private:
devcb_write_line m_write_dir;
devcb_write_line m_write_dor;
- std::queue<UINT8> m_fifo;
+ std::queue<uint8_t> m_fifo;
- UINT8 m_d;
- UINT8 m_q;
+ uint8_t m_d;
+ uint8_t m_q;
int m_dir;
int m_dor;
diff --git a/src/devices/machine/53c7xx.cpp b/src/devices/machine/53c7xx.cpp
index c77baa6a8dc..daabe348188 100644
--- a/src/devices/machine/53c7xx.cpp
+++ b/src/devices/machine/53c7xx.cpp
@@ -58,7 +58,7 @@ const device_type NCR53C7XX = &device_creator<ncr53c7xx_device>;
// ncr53c7xx_device - constructor/destructor
//-------------------------------------------------
-ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nscsi_device(mconfig, NCR53C7XX, "53C7xx SCSI", tag, owner, clock, "ncr537xx", __FILE__),
device_execute_interface(mconfig, *this),
m_icount(0),
@@ -187,7 +187,7 @@ READ32_MEMBER( ncr53c7xx_device::read )
{
VERBOSE_LOG(machine(), 1, "REG R: [%x] (%08X)\n", offset, mem_mask);
- UINT32 ret = 0;
+ uint32_t ret = 0;
switch (offset)
{
@@ -700,7 +700,7 @@ void ncr53c7xx_device::send_byte()
set_scsi_state( (m_scsi_state & STATE_MASK) | (SEND_WAIT_SETTLE << SUB_SHIFT) );
- UINT32 data = m_host_read(m_dnad & ~3, 0xffffffff);
+ uint32_t data = m_host_read(m_dnad & ~3, 0xffffffff);
data = data >> ((m_dnad & 3) * 8) & 0xff;
++m_dnad;
@@ -742,8 +742,8 @@ void ncr53c7xx_device::device_timer(emu_timer &timer, device_timer_id id, int pa
void ncr53c7xx_device::step(bool timeout)
{
- UINT32 ctrl = scsi_bus->ctrl_r();
- UINT32 data = scsi_bus->data_r();
+ uint32_t ctrl = scsi_bus->ctrl_r();
+ uint32_t data = scsi_bus->data_r();
VERBOSE_LOG(machine(), 2, "Step: CTRL:%x DATA:%x (%d.%d) Timeout:%d\n", ctrl, data, m_scsi_state & STATE_MASK, m_scsi_state >> SUB_SHIFT, timeout);
@@ -1058,8 +1058,8 @@ void ncr53c7xx_device::step(bool timeout)
{
m_last_data = scsi_bus->data_r();
- UINT32 shift = (8 * (m_dnad & 3));
- UINT32 mem_mask = 0xff << shift;
+ uint32_t shift = (8 * (m_dnad & 3));
+ uint32_t mem_mask = 0xff << shift;
m_host_write(m_dnad & ~3, data << shift, mem_mask);
++m_dnad;
@@ -1138,7 +1138,7 @@ void ncr53c7xx_device::execute_run()
m_finished = false;
// Fetch the instruction
- UINT32 inst = m_host_read(m_dsp, 0xffffffff);
+ uint32_t inst = m_host_read(m_dsp, 0xffffffff);
m_dcmd = inst >> 24;
m_dbc = inst & 0xffffff;
@@ -1534,7 +1534,7 @@ void ncr53c7xx_device::io_i_waitreselect()
void ncr53c7xx_device::io_i_set()
{
- UINT32 mask = 0;
+ uint32_t mask = 0;
if (m_dbc & (1 << 3))
mask |= S_ATN;
@@ -1554,7 +1554,7 @@ void ncr53c7xx_device::io_i_set()
void ncr53c7xx_device::io_i_clear()
{
- UINT32 mask = 0;
+ uint32_t mask = 0;
if (m_dbc & (1 << 3))
mask |= S_ATN;
diff --git a/src/devices/machine/53c7xx.h b/src/devices/machine/53c7xx.h
index 00d87c6337d..f343f8472dc 100644
--- a/src/devices/machine/53c7xx.h
+++ b/src/devices/machine/53c7xx.h
@@ -72,7 +72,7 @@ class ncr53c7xx_device : public nscsi_device,
{
public:
// construction/destruction
- ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<ncr53c7xx_device &>(device).m_irq_handler.set_callback(object); }
@@ -178,40 +178,40 @@ private:
// SCSI registers
- UINT8 m_scntl[2];
- UINT8 m_sdid;
- UINT8 m_sien;
- UINT8 m_scid;
- UINT8 m_sxfer;
- UINT8 m_sodl;
- UINT8 m_socl;
- UINT8 m_sfbr;
- UINT8 m_sidl;
- UINT8 m_sbdl;
- UINT8 m_sbcl;
- UINT8 m_dstat;
- UINT8 m_sstat[3];
- UINT8 m_ctest[8];
- UINT32 m_temp;
- UINT8 m_dfifo;
- UINT8 m_istat;
- UINT32 m_dbc;
- UINT8 m_dcmd;
- UINT32 m_dnad;
- UINT32 m_dsp;
- UINT32 m_dsps;
- UINT8 m_dmode;
- UINT8 m_dien;
- UINT8 m_dwt;
- UINT8 m_dcntl;
+ uint8_t m_scntl[2];
+ uint8_t m_sdid;
+ uint8_t m_sien;
+ uint8_t m_scid;
+ uint8_t m_sxfer;
+ uint8_t m_sodl;
+ uint8_t m_socl;
+ uint8_t m_sfbr;
+ uint8_t m_sidl;
+ uint8_t m_sbdl;
+ uint8_t m_sbcl;
+ uint8_t m_dstat;
+ uint8_t m_sstat[3];
+ uint8_t m_ctest[8];
+ uint32_t m_temp;
+ uint8_t m_dfifo;
+ uint8_t m_istat;
+ uint32_t m_dbc;
+ uint8_t m_dcmd;
+ uint32_t m_dnad;
+ uint32_t m_dsp;
+ uint32_t m_dsps;
+ uint8_t m_dmode;
+ uint8_t m_dien;
+ uint8_t m_dwt;
+ uint8_t m_dcntl;
// other state
int m_scsi_state;
bool m_connected;
bool m_finished;
- UINT8 m_last_data;
- UINT32 m_xfr_phase;
+ uint8_t m_last_data;
+ uint32_t m_xfr_phase;
emu_timer *m_tm;
int m_scripts_state;
diff --git a/src/devices/machine/53c810.cpp b/src/devices/machine/53c810.cpp
index 2d6b7049016..1ea3bd8e1cc 100644
--- a/src/devices/machine/53c810.cpp
+++ b/src/devices/machine/53c810.cpp
@@ -9,9 +9,9 @@
#define DMA_MAX_ICOUNT 512 /* Maximum number of DMA Scripts opcodes to run */
#define DASM_OPCODES 0
-UINT32 lsi53c810_device::FETCH()
+uint32_t lsi53c810_device::FETCH()
{
- UINT32 r = m_fetch_cb(dsp);
+ uint32_t r = m_fetch_cb(dsp);
dsp += 4;
return r;
}
@@ -23,8 +23,8 @@ void lsi53c810_device::dmaop_invalid()
void lsi53c810_device::dmaop_move_memory()
{
- UINT32 src = FETCH();
- UINT32 dst = FETCH();
+ uint32_t src = FETCH();
+ uint32_t dst = FETCH();
int count;
count = dcmd & 0xffffff;
@@ -51,9 +51,9 @@ void lsi53c810_device::dmaop_interrupt()
void lsi53c810_device::dmaop_block_move()
{
- UINT32 address;
- UINT32 count;
- INT32 dsps;
+ uint32_t address;
+ uint32_t count;
+ int32_t dsps;
address = FETCH();
count = dcmd & 0x00ffffff;
@@ -65,7 +65,7 @@ void lsi53c810_device::dmaop_block_move()
// table indirect
if (dcmd & 0x10000000)
{
- dsps = (INT32)address&0xffffff;
+ dsps = (int32_t)address&0xffffff;
// sign extend
if (dsps & 0x00800000)
{
@@ -95,7 +95,7 @@ void lsi53c810_device::dmaop_block_move()
void lsi53c810_device::dmaop_select()
{
-// UINT32 operand;
+// uint32_t operand;
// operand = FETCH();
@@ -122,7 +122,7 @@ void lsi53c810_device::dmaop_select()
void lsi53c810_device::dmaop_wait_disconnect()
{
-// UINT32 operand;
+// uint32_t operand;
// operand = FETCH();
@@ -140,7 +140,7 @@ void lsi53c810_device::dmaop_wait_disconnect()
void lsi53c810_device::dmaop_wait_reselect()
{
- // UINT32 operand;
+ // uint32_t operand;
// operand = FETCH();
@@ -158,7 +158,7 @@ void lsi53c810_device::dmaop_wait_reselect()
void lsi53c810_device::dmaop_set()
{
-// UINT32 operand;
+// uint32_t operand;
// operand = FETCH();
@@ -187,7 +187,7 @@ void lsi53c810_device::dmaop_set()
void lsi53c810_device::dmaop_clear()
{
-// UINT32 operand;
+// uint32_t operand;
// operand = FETCH();
@@ -289,10 +289,10 @@ int lsi53c810_device::scripts_compute_branch()
return passed;
}
-UINT32 lsi53c810_device::scripts_get_jump_dest()
+uint32_t lsi53c810_device::scripts_get_jump_dest()
{
- INT32 dsps;
- UINT32 dest;
+ int32_t dsps;
+ uint32_t dest;
dsps = FETCH();
@@ -309,7 +309,7 @@ UINT32 lsi53c810_device::scripts_get_jump_dest()
dsps += dsp;
}
- dest = (UINT32)dsps;
+ dest = (uint32_t)dsps;
logerror("cur DSP %x, dest %x\n", dsp, dest);
@@ -394,7 +394,7 @@ void lsi53c810_device::dma_exec()
}
}
-UINT8 lsi53c810_device::lsi53c810_reg_r( int offset )
+uint8_t lsi53c810_device::lsi53c810_reg_r( int offset )
{
// logerror("53c810: read reg %d:0x%x (PC=%x)\n", offset, offset, space.device().safe_pc());
switch(offset)
@@ -477,7 +477,7 @@ UINT8 lsi53c810_device::lsi53c810_reg_r( int offset )
//return 0;
}
-void lsi53c810_device::lsi53c810_reg_w(int offset, UINT8 data)
+void lsi53c810_device::lsi53c810_reg_w(int offset, uint8_t data)
{
// logerror("53c810: %02x to reg %d:0x%x (PC=%x)\n", data, offset, offset, space.device().safe_pc());
switch(offset)
@@ -610,7 +610,7 @@ void lsi53c810_device::lsi53c810_reg_w(int offset, UINT8 data)
}
}
-void lsi53c810_device::add_opcode(UINT8 op, UINT8 mask, opcode_handler_delegate handler)
+void lsi53c810_device::add_opcode(uint8_t op, uint8_t mask, opcode_handler_delegate handler)
{
for (int i = 0; i < 256; i++)
{
@@ -621,7 +621,7 @@ void lsi53c810_device::add_opcode(UINT8 op, UINT8 mask, opcode_handler_delegate
}
}
-lsi53c810_device::lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+lsi53c810_device::lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: legacy_scsi_host_adapter(mconfig, LSI53C810, "53C810 SCSI", tag, owner, clock, "lsi53c810", __FILE__)
{
}
@@ -663,17 +663,17 @@ void lsi53c810_device::device_start()
*
*************************************/
-UINT32 lsi53c810_device::lsi53c810_dasm_fetch(UINT32 pc)
+uint32_t lsi53c810_device::lsi53c810_dasm_fetch(uint32_t pc)
{
return m_fetch_cb(pc);
}
-unsigned lsi53c810_device::lsi53c810_dasm(char *buf, UINT32 pc)
+unsigned lsi53c810_device::lsi53c810_dasm(char *buf, uint32_t pc)
{
unsigned result = 0;
const char *op_mnemonic = nullptr;
- UINT32 op = lsi53c810_dasm_fetch(pc);
- UINT32 dest;
+ uint32_t op = lsi53c810_dasm_fetch(pc);
+ uint32_t dest;
int i;
static const char *const phases[] =
@@ -699,7 +699,7 @@ unsigned lsi53c810_device::lsi53c810_dasm(char *buf, UINT32 pc)
{
static const struct
{
- UINT32 flag;
+ uint32_t flag;
const char *text;
} flags[] =
{
diff --git a/src/devices/machine/53c810.h b/src/devices/machine/53c810.h
index 49ac2281e2f..b00bf57e8ed 100644
--- a/src/devices/machine/53c810.h
+++ b/src/devices/machine/53c810.h
@@ -8,25 +8,25 @@
typedef device_delegate<void (int state)> lsi53c810_irq_delegate;
#define LSI53C810_IRQ_CB(name) void name(int state)
-typedef device_delegate<void (UINT32 src, UINT32 dst, int length, int byteswap)> lsi53c810_dma_delegate;
-#define LSI53C810_DMA_CB(name) void name(UINT32 src, UINT32 dst, int length, int byteswap)
+typedef device_delegate<void (uint32_t src, uint32_t dst, int length, int byteswap)> lsi53c810_dma_delegate;
+#define LSI53C810_DMA_CB(name) void name(uint32_t src, uint32_t dst, int length, int byteswap)
-typedef device_delegate<UINT32 (UINT32 dsp)> lsi53c810_fetch_delegate;
-#define LSI53C810_FETCH_CB(name) UINT32 name(UINT32 dsp)
+typedef device_delegate<uint32_t (uint32_t dsp)> lsi53c810_fetch_delegate;
+#define LSI53C810_FETCH_CB(name) uint32_t name(uint32_t dsp)
class lsi53c810_device : public legacy_scsi_host_adapter
{
public:
// construction/destruction
- lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_irq_callback(device_t &device, lsi53c810_irq_delegate callback) { downcast<lsi53c810_device &>(device).m_irq_cb = callback; }
static void set_dma_callback(device_t &device, lsi53c810_dma_delegate callback) { downcast<lsi53c810_device &>(device).m_dma_cb = callback; }
static void set_fetch_callback(device_t &device, lsi53c810_fetch_delegate callback) { downcast<lsi53c810_device &>(device).m_fetch_cb = callback; }
- UINT8 lsi53c810_reg_r( int offset );
- void lsi53c810_reg_w(int offset, UINT8 data);
+ uint8_t lsi53c810_reg_r( int offset );
+ void lsi53c810_reg_w(int offset, uint8_t data);
protected:
// device-level overrides
@@ -40,7 +40,7 @@ private:
lsi53c810_dma_delegate m_dma_cb;
lsi53c810_fetch_delegate m_fetch_cb;
- UINT32 FETCH();
+ uint32_t FETCH();
void dmaop_invalid();
void dmaop_move_memory();
void dmaop_interrupt();
@@ -54,44 +54,44 @@ private:
void dmaop_move_to_sfbr();
void dmaop_read_modify_write();
int scripts_compute_branch();
- UINT32 scripts_get_jump_dest();
+ uint32_t scripts_get_jump_dest();
void dmaop_jump();
void dmaop_call();
void dmaop_return();
void dmaop_store();
void dmaop_load();
void dma_exec();
- void add_opcode(UINT8 op, UINT8 mask, opcode_handler_delegate handler);
- UINT32 lsi53c810_dasm_fetch(UINT32 pc);
- unsigned lsi53c810_dasm(char *buf, UINT32 pc);
-
- UINT8 scntl0;
- UINT8 scntl1;
- UINT8 scntl2;
- UINT8 scntl3;
- UINT8 scid;
- UINT8 sxfer;
- UINT8 socl;
- UINT8 istat;
- UINT8 dstat;
- UINT8 sstat0;
- UINT8 sstat1;
- UINT8 sstat2;
- UINT8 dien;
- UINT8 dcntl;
- UINT8 dmode;
- UINT32 temp;
- UINT32 dsa;
- UINT32 dsp;
- UINT32 dsps;
- UINT32 dcmd;
- UINT8 sien0;
- UINT8 sien1;
- UINT8 stime0;
- UINT8 respid;
- UINT8 stest1;
- UINT8 scratch_a[4];
- UINT8 scratch_b[4];
+ void add_opcode(uint8_t op, uint8_t mask, opcode_handler_delegate handler);
+ uint32_t lsi53c810_dasm_fetch(uint32_t pc);
+ unsigned lsi53c810_dasm(char *buf, uint32_t pc);
+
+ uint8_t scntl0;
+ uint8_t scntl1;
+ uint8_t scntl2;
+ uint8_t scntl3;
+ uint8_t scid;
+ uint8_t sxfer;
+ uint8_t socl;
+ uint8_t istat;
+ uint8_t dstat;
+ uint8_t sstat0;
+ uint8_t sstat1;
+ uint8_t sstat2;
+ uint8_t dien;
+ uint8_t dcntl;
+ uint8_t dmode;
+ uint32_t temp;
+ uint32_t dsa;
+ uint32_t dsp;
+ uint32_t dsps;
+ uint32_t dcmd;
+ uint8_t sien0;
+ uint8_t sien1;
+ uint8_t stime0;
+ uint8_t respid;
+ uint8_t stest1;
+ uint8_t scratch_a[4];
+ uint8_t scratch_b[4];
int dma_icount;
int halted;
int carry;
diff --git a/src/devices/machine/64h156.cpp b/src/devices/machine/64h156.cpp
index 243627e1f1e..849109f1b11 100644
--- a/src/devices/machine/64h156.cpp
+++ b/src/devices/machine/64h156.cpp
@@ -54,7 +54,7 @@ const device_type C64H156 = &device_creator<c64h156_device>;
// c64h156_device - constructor
//-------------------------------------------------
-c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, C64H156, "64H156", tag, owner, clock, "c64h156", __FILE__),
m_write_atn(*this),
m_write_sync(*this),
diff --git a/src/devices/machine/64h156.h b/src/devices/machine/64h156.h
index 6cab8bb369d..08d68a994e4 100644
--- a/src/devices/machine/64h156.h
+++ b/src/devices/machine/64h156.h
@@ -92,7 +92,7 @@ class c64h156_device : public device_t
{
public:
// construction/destruction
- c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_atn_wr_callback(device_t &device, _Object object) { return downcast<c64h156_device &>(device).m_write_atn.set_callback(object); }
template<class _Object> static devcb_base &set_sync_wr_callback(device_t &device, _Object object) { return downcast<c64h156_device &>(device).m_write_sync.set_callback(object); }
@@ -141,18 +141,18 @@ private:
int oe;
int soe;
int accl;
- UINT8 accl_yb;
+ uint8_t accl_yb;
attotime edge;
- UINT16 shift_reg;
+ uint16_t shift_reg;
int cycle_counter;
int cell_counter;
int bit_counter;
int zero_counter;
int cycles_until_random_flux;
- UINT8 yb;
- UINT8 shift_reg_write;
+ uint8_t yb;
+ uint8_t shift_reg_write;
attotime write_start_time;
attotime write_buffer[32];
int write_position;
@@ -171,7 +171,7 @@ private:
int m_soe;
int m_oe;
int m_ted;
- UINT8 m_yb;
+ uint8_t m_yb;
int m_atni;
int m_atna;
diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp
index 56a35e19040..2949b77c594 100644
--- a/src/devices/machine/6522via.cpp
+++ b/src/devices/machine/6522via.cpp
@@ -110,9 +110,9 @@
INLINE FUNCTIONS
***************************************************************************/
-UINT16 via6522_device::get_counter1_value()
+uint16_t via6522_device::get_counter1_value()
{
- UINT16 val;
+ uint16_t val;
if(m_t1_active)
{
@@ -142,7 +142,7 @@ ADDRESS_MAP_END
// via6522_device - constructor
//-------------------------------------------------
-via6522_device::via6522_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+via6522_device::via6522_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, VIA6522, "6522 VIA", tag, owner, clock, "via6522", __FILE__),
m_in_a_handler(*this),
m_in_b_handler(*this),
@@ -442,7 +442,7 @@ void via6522_device::device_timer(emu_timer &timer, device_timer_id id, int para
}
}
-UINT8 via6522_device::input_pa()
+uint8_t via6522_device::input_pa()
{
/// TODO: REMOVE THIS
if (!m_in_a_handler.isnull())
@@ -458,11 +458,11 @@ UINT8 via6522_device::input_pa()
void via6522_device::output_pa()
{
- UINT8 pa = (m_out_a & m_ddr_a) | ~m_ddr_a;
+ uint8_t pa = (m_out_a & m_ddr_a) | ~m_ddr_a;
m_out_a_handler(pa);
}
-UINT8 via6522_device::input_pb()
+uint8_t via6522_device::input_pb()
{
/// TODO: REMOVE THIS
if (m_ddr_b != 0xff && !m_in_b_handler.isnull())
@@ -470,7 +470,7 @@ UINT8 via6522_device::input_pb()
m_in_b = m_in_b_handler(0);
}
- UINT8 pb = (m_out_b & m_ddr_b) + (m_in_b & ~m_ddr_b);
+ uint8_t pb = (m_out_b & m_ddr_b) + (m_in_b & ~m_ddr_b);
if (T1_SET_PB7(m_acr))
pb = (pb & 0x7f) | (m_t1_pb7 << 7);
@@ -480,7 +480,7 @@ UINT8 via6522_device::input_pb()
void via6522_device::output_pb()
{
- UINT8 pb = (m_out_b & m_ddr_b) | ~m_ddr_b;
+ uint8_t pb = (m_out_b & m_ddr_b) | ~m_ddr_b;
if (T1_SET_PB7(m_acr))
pb = (pb & 0x7f) | (m_t1_pb7 << 7);
@@ -811,7 +811,7 @@ WRITE8_MEMBER( via6522_device::write )
case VIA_ACR:
{
- UINT16 counter1 = get_counter1_value();
+ uint16_t counter1 = get_counter1_value();
m_acr = data;
output_pb();
diff --git a/src/devices/machine/6522via.h b/src/devices/machine/6522via.h
index 467ff0885fb..316606ea35c 100644
--- a/src/devices/machine/6522via.h
+++ b/src/devices/machine/6522via.h
@@ -64,7 +64,7 @@ class via6522_device : public device_t
{
public:
// construction/destruction
- via6522_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ via6522_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// TODO: REMOVE THESE
template<class _Object> static devcb_base &set_readpa_handler(device_t &device, _Object object) { return downcast<via6522_device &>(device).m_in_a_handler.set_callback(object); }
@@ -140,7 +140,7 @@ private:
static const device_timer_id TIMER_T2 = 2;
static const device_timer_id TIMER_CA2 = 3;
- UINT16 get_counter1_value();
+ uint16_t get_counter1_value();
void set_int(int data);
void clear_int(int data);
@@ -149,9 +149,9 @@ private:
void write_pa(int line, int state);
void write_pb(int line, int state);
- UINT8 input_pa();
+ uint8_t input_pa();
void output_pa();
- UINT8 input_pb();
+ uint8_t input_pb();
void output_pb();
void output_irq();
@@ -168,49 +168,49 @@ private:
devcb_write_line m_cb2_handler;
devcb_write_line m_irq_handler;
- UINT8 m_in_a;
+ uint8_t m_in_a;
int m_in_ca1;
int m_in_ca2;
- UINT8 m_out_a;
+ uint8_t m_out_a;
int m_out_ca2;
- UINT8 m_ddr_a;
- UINT8 m_latch_a;
+ uint8_t m_ddr_a;
+ uint8_t m_latch_a;
- UINT8 m_in_b;
+ uint8_t m_in_b;
int m_in_cb1;
int m_in_cb2;
- UINT8 m_out_b;
+ uint8_t m_out_b;
int m_out_cb1;
int m_out_cb2;
- UINT8 m_ddr_b;
- UINT8 m_latch_b;
-
- UINT8 m_t1cl;
- UINT8 m_t1ch;
- UINT8 m_t1ll;
- UINT8 m_t1lh;
- UINT8 m_t2cl;
- UINT8 m_t2ch;
- UINT8 m_t2ll;
- UINT8 m_t2lh;
-
- UINT8 m_sr;
- UINT8 m_pcr;
- UINT8 m_acr;
- UINT8 m_ier;
- UINT8 m_ifr;
+ uint8_t m_ddr_b;
+ uint8_t m_latch_b;
+
+ uint8_t m_t1cl;
+ uint8_t m_t1ch;
+ uint8_t m_t1ll;
+ uint8_t m_t1lh;
+ uint8_t m_t2cl;
+ uint8_t m_t2ch;
+ uint8_t m_t2ll;
+ uint8_t m_t2lh;
+
+ uint8_t m_sr;
+ uint8_t m_pcr;
+ uint8_t m_acr;
+ uint8_t m_ier;
+ uint8_t m_ifr;
emu_timer *m_t1;
attotime m_time1;
- UINT8 m_t1_active;
+ uint8_t m_t1_active;
int m_t1_pb7;
emu_timer *m_t2;
attotime m_time2;
- UINT8 m_t2_active;
+ uint8_t m_t2_active;
emu_timer *m_ca2_timer;
emu_timer *m_shift_timer;
- UINT8 m_shift_counter;
+ uint8_t m_shift_counter;
};
diff --git a/src/devices/machine/6525tpi.cpp b/src/devices/machine/6525tpi.cpp
index 8d5a43a2b35..1658ce08d5b 100644
--- a/src/devices/machine/6525tpi.cpp
+++ b/src/devices/machine/6525tpi.cpp
@@ -106,7 +106,7 @@
const device_type TPI6525 = &device_creator<tpi6525_device>;
-tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TPI6525, "6525 TPI", tag, owner, clock, "tpi6525", __FILE__),
m_out_irq_cb(*this),
m_in_pa_cb(*this),
@@ -296,7 +296,7 @@ WRITE_LINE_MEMBER( tpi6525_device::i4_w )
READ8_MEMBER( tpi6525_device::pa_r )
{
- UINT8 data = m_in_a;
+ uint8_t data = m_in_a;
if (!m_in_pa_cb.isnull())
data = m_in_pa_cb(offset);
@@ -315,7 +315,7 @@ WRITE8_MEMBER( tpi6525_device::pa_w )
READ8_MEMBER( tpi6525_device::pb_r )
{
- UINT8 data = m_in_b;
+ uint8_t data = m_in_b;
if (!m_in_pb_cb.isnull())
data = m_in_pb_cb(offset);
@@ -334,7 +334,7 @@ WRITE8_MEMBER( tpi6525_device::pb_w )
READ8_MEMBER( tpi6525_device::pc_r )
{
- UINT8 data = m_in_c;
+ uint8_t data = m_in_c;
if (!m_in_pc_cb.isnull())
data &= m_in_pc_cb(offset);
@@ -353,7 +353,7 @@ WRITE8_MEMBER( tpi6525_device::pc_w )
READ8_MEMBER( tpi6525_device::read )
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
switch (offset & 7)
{
@@ -537,7 +537,7 @@ WRITE8_MEMBER( tpi6525_device::write )
}
}
-void tpi6525_device::port_line_w(UINT8 &port, int line, int state)
+void tpi6525_device::port_line_w(uint8_t &port, int line, int state)
{
port &= ~(1 << line);
port |= state << line;
@@ -545,17 +545,17 @@ void tpi6525_device::port_line_w(UINT8 &port, int line, int state)
/* this should probably be done better, needed for amigacd.c */
-UINT8 tpi6525_device::get_ddr_a()
+uint8_t tpi6525_device::get_ddr_a()
{
return m_ddr_a;
}
-UINT8 tpi6525_device::get_ddr_b()
+uint8_t tpi6525_device::get_ddr_b()
{
return m_ddr_b;
}
-UINT8 tpi6525_device::get_ddr_c()
+uint8_t tpi6525_device::get_ddr_c()
{
return m_ddr_c;
}
diff --git a/src/devices/machine/6525tpi.h b/src/devices/machine/6525tpi.h
index a1699ea213b..ed927d2e11a 100644
--- a/src/devices/machine/6525tpi.h
+++ b/src/devices/machine/6525tpi.h
@@ -39,7 +39,7 @@
class tpi6525_device : public device_t
{
public:
- tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~tpi6525_device() {}
template<class _Object> static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<tpi6525_device &>(device).m_out_irq_cb.set_callback(object); }
@@ -77,9 +77,9 @@ public:
WRITE_LINE_MEMBER( pb6_w ) { port_line_w(m_in_b, 6, state); }
WRITE_LINE_MEMBER( pb7_w ) { port_line_w(m_in_b, 7, state); }
- UINT8 get_ddr_a();
- UINT8 get_ddr_b();
- UINT8 get_ddr_c();
+ uint8_t get_ddr_a();
+ uint8_t get_ddr_b();
+ uint8_t get_ddr_c();
protected:
// device-level overrides
@@ -102,22 +102,22 @@ private:
devcb_write_line m_out_ca_cb;
devcb_write_line m_out_cb_cb;
- UINT8 m_port_a, m_ddr_a, m_in_a;
- UINT8 m_port_b, m_ddr_b, m_in_b;
- UINT8 m_port_c, m_ddr_c, m_in_c;
+ uint8_t m_port_a, m_ddr_a, m_in_a;
+ uint8_t m_port_b, m_ddr_b, m_in_b;
+ uint8_t m_port_c, m_ddr_c, m_in_c;
- UINT8 m_ca_level, m_cb_level, m_interrupt_level;
+ uint8_t m_ca_level, m_cb_level, m_interrupt_level;
- UINT8 m_cr;
- UINT8 m_air;
+ uint8_t m_cr;
+ uint8_t m_air;
- UINT8 m_irq_level[5];
+ uint8_t m_irq_level[5];
void set_interrupt();
void clear_interrupt();
// helper function to write a single line
- static void port_line_w(UINT8 &port, int line, int state);
+ static void port_line_w(uint8_t &port, int line, int state);
};
extern const device_type TPI6525;
diff --git a/src/devices/machine/6532riot.cpp b/src/devices/machine/6532riot.cpp
index 8ef5566fbde..7ed81903115 100644
--- a/src/devices/machine/6532riot.cpp
+++ b/src/devices/machine/6532riot.cpp
@@ -62,7 +62,7 @@ void riot6532_device::update_irqstate()
according to the DDR
-------------------------------------------------*/
-UINT8 riot6532_device::apply_ddr(const riot6532_port *port)
+uint8_t riot6532_device::apply_ddr(const riot6532_port *port)
{
return (port->m_out & port->m_ddr) | (port->m_in & ~port->m_ddr);
}
@@ -75,7 +75,7 @@ UINT8 riot6532_device::apply_ddr(const riot6532_port *port)
void riot6532_device::update_pa7_state()
{
- UINT8 data = apply_ddr(&m_port[0]) & 0x80;
+ uint8_t data = apply_ddr(&m_port[0]) & 0x80;
/* if the state changed in the correct direction, set the PA7 flag and update IRQs */
if ((m_pa7prev ^ data) && (m_pa7dir ^ data) == 0)
@@ -91,7 +91,7 @@ void riot6532_device::update_pa7_state()
get_timer - return the current timer value
-------------------------------------------------*/
-UINT8 riot6532_device::get_timer()
+uint8_t riot6532_device::get_timer()
{
/* if idle, return 0 */
if (m_timerstate == TIMER_IDLE)
@@ -151,14 +151,14 @@ WRITE8_MEMBER( riot6532_device::write )
reg_w(offset, data);
}
-void riot6532_device::reg_w(UINT8 offset, UINT8 data)
+void riot6532_device::reg_w(uint8_t offset, uint8_t data)
{
/* if A4 == 1 and A2 == 1, we are writing to the timer */
if ((offset & 0x14) == 0x14)
{
- static const UINT8 timershift[4] = { 0, 3, 6, 10 };
+ static const uint8_t timershift[4] = { 0, 3, 6, 10 };
attotime curtime = machine().time();
- INT64 target;
+ int64_t target;
/* A0-A1 contain the timer divisor */
m_timershift = timershift[offset & 3];
@@ -236,9 +236,9 @@ READ8_MEMBER( riot6532_device::read )
return reg_r(offset, space.debugger_access());
}
-UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
+uint8_t riot6532_device::reg_r(uint8_t offset, bool debugger_access)
{
- UINT8 val;
+ uint8_t val;
/* if A2 == 1 and A0 == 1, we are reading interrupt flags */
if ((offset & 0x05) == 0x05)
@@ -321,7 +321,7 @@ UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
porta_in_set - set port A input value
-------------------------------------------------*/
-void riot6532_device::porta_in_set(UINT8 data, UINT8 mask)
+void riot6532_device::porta_in_set(uint8_t data, uint8_t mask)
{
m_port[0].m_in = (m_port[0].m_in & ~mask) | (data & mask);
update_pa7_state();
@@ -332,7 +332,7 @@ void riot6532_device::porta_in_set(UINT8 data, UINT8 mask)
portb_in_set - set port B input value
-------------------------------------------------*/
-void riot6532_device::portb_in_set(UINT8 data, UINT8 mask)
+void riot6532_device::portb_in_set(uint8_t data, uint8_t mask)
{
m_port[1].m_in = (m_port[1].m_in & ~mask) | (data & mask);
}
@@ -342,7 +342,7 @@ void riot6532_device::portb_in_set(UINT8 data, UINT8 mask)
porta_in_get - return port A input value
-------------------------------------------------*/
-UINT8 riot6532_device::porta_in_get()
+uint8_t riot6532_device::porta_in_get()
{
return m_port[0].m_in;
}
@@ -352,7 +352,7 @@ UINT8 riot6532_device::porta_in_get()
portb_in_get - return port B input value
-------------------------------------------------*/
-UINT8 riot6532_device::portb_in_get()
+uint8_t riot6532_device::portb_in_get()
{
return m_port[1].m_in;
}
@@ -362,7 +362,7 @@ UINT8 riot6532_device::portb_in_get()
porta_in_get - return port A output value
-------------------------------------------------*/
-UINT8 riot6532_device::porta_out_get()
+uint8_t riot6532_device::porta_out_get()
{
return m_port[0].m_out;
}
@@ -372,7 +372,7 @@ UINT8 riot6532_device::porta_out_get()
portb_in_get - return port B output value
-------------------------------------------------*/
-UINT8 riot6532_device::portb_out_get()
+uint8_t riot6532_device::portb_out_get()
{
return m_port[1].m_out;
}
@@ -386,7 +386,7 @@ UINT8 riot6532_device::portb_out_get()
// riot6532_device - constructor
//-------------------------------------------------
-riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, RIOT6532, "6532 RIOT", tag, owner, clock, "riot6532", __FILE__),
m_in_pa_cb(*this),
m_out_pa_cb(*this),
diff --git a/src/devices/machine/6532riot.h b/src/devices/machine/6532riot.h
index dd1699c6c48..4ab030fe96d 100644
--- a/src/devices/machine/6532riot.h
+++ b/src/devices/machine/6532riot.h
@@ -45,7 +45,7 @@ class riot6532_device : public device_t
{
public:
// construction/destruction
- riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast<riot6532_device &>(device).m_in_pa_cb.set_callback(object); }
template<class _Object> static devcb_base &set_out_pa_callback(device_t &device, _Object object) { return downcast<riot6532_device &>(device).m_out_pa_cb.set_callback(object); }
@@ -56,17 +56,17 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
- UINT8 reg_r(UINT8 offset, bool debugger_access = false);
- void reg_w(UINT8 offset, UINT8 data);
+ uint8_t reg_r(uint8_t offset, bool debugger_access = false);
+ void reg_w(uint8_t offset, uint8_t data);
- void porta_in_set(UINT8 data, UINT8 mask);
- void portb_in_set(UINT8 data, UINT8 mask);
+ void porta_in_set(uint8_t data, uint8_t mask);
+ void portb_in_set(uint8_t data, uint8_t mask);
- UINT8 porta_in_get();
- UINT8 portb_in_get();
+ uint8_t porta_in_get();
+ uint8_t portb_in_get();
- UINT8 porta_out_get();
- UINT8 portb_out_get();
+ uint8_t porta_out_get();
+ uint8_t portb_out_get();
void timer_end();
@@ -74,9 +74,9 @@ protected:
class riot6532_port
{
public:
- UINT8 m_in;
- UINT8 m_out;
- UINT8 m_ddr;
+ uint8_t m_in;
+ uint8_t m_out;
+ uint8_t m_ddr;
devcb_read8 *m_in_cb;
devcb_write8 *m_out_cb;
};
@@ -91,9 +91,9 @@ protected:
private:
void update_irqstate();
- UINT8 apply_ddr(const riot6532_port *port);
+ uint8_t apply_ddr(const riot6532_port *port);
void update_pa7_state();
- UINT8 get_timer();
+ uint8_t get_timer();
riot6532_port m_port[2];
@@ -103,15 +103,15 @@ private:
devcb_write8 m_out_pb_cb;
devcb_write_line m_irq_cb;
- UINT8 m_irqstate;
- UINT8 m_irqenable;
+ uint8_t m_irqstate;
+ uint8_t m_irqenable;
int m_irq;
- UINT8 m_pa7dir; /* 0x80 = high-to-low, 0x00 = low-to-high */
- UINT8 m_pa7prev;
+ uint8_t m_pa7dir; /* 0x80 = high-to-low, 0x00 = low-to-high */
+ uint8_t m_pa7prev;
- UINT8 m_timershift;
- UINT8 m_timerstate;
+ uint8_t m_timershift;
+ uint8_t m_timerstate;
emu_timer * m_timer;
enum
diff --git a/src/devices/machine/6821pia.cpp b/src/devices/machine/6821pia.cpp
index a2a08180086..85a5b4d9c3e 100644
--- a/src/devices/machine/6821pia.cpp
+++ b/src/devices/machine/6821pia.cpp
@@ -49,7 +49,7 @@ const device_type PIA6821 = &device_creator<pia6821_device>;
// pia6821_device - constructor
//-------------------------------------------------
-pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PIA6821, "6821 PIA", tag, owner, clock, "pia6821", __FILE__),
m_in_a_handler(*this),
m_in_b_handler(*this),
@@ -218,10 +218,10 @@ void pia6821_device::update_interrupts()
// get_in_a_value
//-------------------------------------------------
-UINT8 pia6821_device::get_in_a_value()
+uint8_t pia6821_device::get_in_a_value()
{
- UINT8 port_a_data = 0;
- UINT8 ret;
+ uint8_t port_a_data = 0;
+ uint8_t ret;
// update the input
if (!m_in_a_handler.isnull())
@@ -262,9 +262,9 @@ UINT8 pia6821_device::get_in_a_value()
// get_in_b_value
//-------------------------------------------------
-UINT8 pia6821_device::get_in_b_value()
+uint8_t pia6821_device::get_in_b_value()
{
- UINT8 ret;
+ uint8_t ret;
if (m_ddr_b == 0xff)
{
@@ -273,7 +273,7 @@ UINT8 pia6821_device::get_in_b_value()
}
else
{
- UINT8 port_b_data;
+ uint8_t port_b_data;
// update the input
if (!m_in_b_handler.isnull())
@@ -311,9 +311,9 @@ UINT8 pia6821_device::get_in_b_value()
// get_out_a_value
//-------------------------------------------------
-UINT8 pia6821_device::get_out_a_value()
+uint8_t pia6821_device::get_out_a_value()
{
- UINT8 ret;
+ uint8_t ret;
if (m_ddr_a == 0xff)
{
@@ -334,7 +334,7 @@ UINT8 pia6821_device::get_out_a_value()
// get_out_b_value
//-------------------------------------------------
-UINT8 pia6821_device::get_out_b_value()
+uint8_t pia6821_device::get_out_b_value()
{
// input pins are high-impedance - we just send them as zeros for backwards compatibility
return m_out_b & m_ddr_b;
@@ -404,9 +404,9 @@ void pia6821_device::set_out_cb2(int data)
// port_a_r
//-------------------------------------------------
-UINT8 pia6821_device::port_a_r()
+uint8_t pia6821_device::port_a_r()
{
- UINT8 ret = get_in_a_value();
+ uint8_t ret = get_in_a_value();
// IRQ flags implicitly cleared by a read
m_irq_a1 = FALSE;
@@ -436,9 +436,9 @@ UINT8 pia6821_device::port_a_r()
// ddr_a_r
//-------------------------------------------------
-UINT8 pia6821_device::ddr_a_r()
+uint8_t pia6821_device::ddr_a_r()
{
- UINT8 ret = m_ddr_a;
+ uint8_t ret = m_ddr_a;
LOG(("PIA #%s: DDR A read = %02X\n", tag(), ret));
@@ -450,9 +450,9 @@ UINT8 pia6821_device::ddr_a_r()
// port_b_r
//-------------------------------------------------
-UINT8 pia6821_device::port_b_r()
+uint8_t pia6821_device::port_b_r()
{
- UINT8 ret = get_in_b_value();
+ uint8_t ret = get_in_b_value();
// This read will implicitly clear the IRQ B1 flag. If CB2 is in write-strobe
// mode with CB1 restore, and a CB1 active transition set the flag,
@@ -478,9 +478,9 @@ UINT8 pia6821_device::port_b_r()
// ddr_b_r
//-------------------------------------------------
-UINT8 pia6821_device::ddr_b_r()
+uint8_t pia6821_device::ddr_b_r()
{
- UINT8 ret = m_ddr_b;
+ uint8_t ret = m_ddr_b;
LOG(("PIA #%s: DDR B read = %02X\n", tag(), ret));
@@ -492,9 +492,9 @@ UINT8 pia6821_device::ddr_b_r()
// control_a_r
//-------------------------------------------------
-UINT8 pia6821_device::control_a_r()
+uint8_t pia6821_device::control_a_r()
{
- UINT8 ret;
+ uint8_t ret;
// update CA1 & CA2 if callback exists, these in turn may update IRQ's
if (!m_in_ca1_handler.isnull())
@@ -541,9 +541,9 @@ UINT8 pia6821_device::control_a_r()
// control_b_r
//-------------------------------------------------
-UINT8 pia6821_device::control_b_r()
+uint8_t pia6821_device::control_b_r()
{
- UINT8 ret;
+ uint8_t ret;
// update CB1 & CB2 if callback exists, these in turn may update IRQ's
if(!m_in_cb1_handler.isnull())
@@ -586,9 +586,9 @@ UINT8 pia6821_device::control_b_r()
// read
//-------------------------------------------------
-UINT8 pia6821_device::reg_r(UINT8 offset)
+uint8_t pia6821_device::reg_r(uint8_t offset)
{
- UINT8 ret;
+ uint8_t ret;
switch (offset & 0x03)
{
@@ -636,7 +636,7 @@ UINT8 pia6821_device::reg_r(UINT8 offset)
void pia6821_device::send_to_out_a_func(const char* message)
{
// input pins are pulled high
- UINT8 data = get_out_a_value();
+ uint8_t data = get_out_a_value();
LOG(("PIA #%s: %s = %02X\n", tag(), message, data));
@@ -663,7 +663,7 @@ void pia6821_device::send_to_out_a_func(const char* message)
void pia6821_device::send_to_out_b_func(const char* message)
{
// input pins are high-impedance - we just send them as zeros for backwards compatibility
- UINT8 data = get_out_b_value();
+ uint8_t data = get_out_b_value();
LOG(("PIA #%s: %s = %02X\n", tag(), message, data));
@@ -687,7 +687,7 @@ void pia6821_device::send_to_out_b_func(const char* message)
// port_a_w
//-------------------------------------------------
-void pia6821_device::port_a_w(UINT8 data)
+void pia6821_device::port_a_w(uint8_t data)
{
// buffer the output value
m_out_a = data;
@@ -700,7 +700,7 @@ void pia6821_device::port_a_w(UINT8 data)
// ddr_a_w
//-------------------------------------------------
-void pia6821_device::ddr_a_w(UINT8 data)
+void pia6821_device::ddr_a_w(uint8_t data)
{
if(data == 0x00)
{
@@ -729,7 +729,7 @@ void pia6821_device::ddr_a_w(UINT8 data)
// port_b_w
//-------------------------------------------------
-void pia6821_device::port_b_w(UINT8 data)
+void pia6821_device::port_b_w(uint8_t data)
{
// buffer the output value
m_out_b = data;
@@ -755,7 +755,7 @@ void pia6821_device::port_b_w(UINT8 data)
// ddr_b_w
//-------------------------------------------------
-void pia6821_device::ddr_b_w(UINT8 data)
+void pia6821_device::ddr_b_w(uint8_t data)
{
if (data == 0x00)
{
@@ -784,7 +784,7 @@ void pia6821_device::ddr_b_w(UINT8 data)
// control_a_w
//-------------------------------------------------
-void pia6821_device::control_a_w(UINT8 data)
+void pia6821_device::control_a_w(uint8_t data)
{
// bit 7 and 6 are read only
data &= 0x3f;
@@ -822,7 +822,7 @@ void pia6821_device::control_a_w(UINT8 data)
// control_b_w
//-------------------------------------------------
-void pia6821_device::control_b_w(UINT8 data)
+void pia6821_device::control_b_w(uint8_t data)
{
int temp;
@@ -856,7 +856,7 @@ void pia6821_device::control_b_w(UINT8 data)
// write
//-------------------------------------------------
-void pia6821_device::reg_w(UINT8 offset, UINT8 data)
+void pia6821_device::reg_w(uint8_t offset, uint8_t data)
{
switch (offset & 0x03)
{
@@ -898,7 +898,7 @@ void pia6821_device::reg_w(UINT8 offset, UINT8 data)
// set_a_input
//-------------------------------------------------
-void pia6821_device::set_a_input(UINT8 data, UINT8 z_mask)
+void pia6821_device::set_a_input(uint8_t data, uint8_t z_mask)
{
assert_always(m_in_a_handler.isnull(), "pia6821_porta_w() called when in_a_func implemented");
@@ -914,7 +914,7 @@ void pia6821_device::set_a_input(UINT8 data, UINT8 z_mask)
// pia6821_porta_w
//-------------------------------------------------
-void pia6821_device::porta_w(UINT8 data)
+void pia6821_device::porta_w(uint8_t data)
{
set_a_input(data, 0);
}
@@ -924,7 +924,7 @@ void pia6821_device::porta_w(UINT8 data)
// a_output
//-------------------------------------------------
-UINT8 pia6821_device::a_output()
+uint8_t pia6821_device::a_output()
{
m_out_a_needs_pulled = false;
@@ -1021,7 +1021,7 @@ int pia6821_device::ca2_output_z()
// portb_w
//-------------------------------------------------
-void pia6821_device::portb_w(UINT8 data)
+void pia6821_device::portb_w(uint8_t data)
{
assert_always(m_in_b_handler.isnull(), "pia_set_input_b() called when in_b_func implemented");
@@ -1036,7 +1036,7 @@ void pia6821_device::portb_w(UINT8 data)
// b_output
//-------------------------------------------------
-UINT8 pia6821_device::b_output()
+uint8_t pia6821_device::b_output()
{
m_out_b_needs_pulled = false;
diff --git a/src/devices/machine/6821pia.h b/src/devices/machine/6821pia.h
index 64631184d29..6eafbe75645 100644
--- a/src/devices/machine/6821pia.h
+++ b/src/devices/machine/6821pia.h
@@ -78,7 +78,7 @@ class pia6821_device : public device_t
{
public:
// construction/destruction
- pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
// TODO: REMOVE THESE
@@ -102,13 +102,13 @@ public:
DECLARE_READ8_MEMBER( read_alt ) { return reg_r(((offset << 1) & 0x02) | ((offset >> 1) & 0x01)); }
DECLARE_WRITE8_MEMBER( write_alt ) { reg_w(((offset << 1) & 0x02) | ((offset >> 1) & 0x01), data); }
- UINT8 port_b_z_mask() const { return ~m_ddr_b; } // see first note in .c
- void set_port_a_z_mask(UINT8 data) { m_port_a_z_mask = data; }// see second note in .c
+ uint8_t port_b_z_mask() const { return ~m_ddr_b; } // see first note in .c
+ void set_port_a_z_mask(uint8_t data) { m_port_a_z_mask = data; }// see second note in .c
DECLARE_WRITE8_MEMBER( porta_w ) { porta_w(data); }
- void porta_w(UINT8 data);
- void set_a_input(UINT8 data, UINT8 z_mask);
- UINT8 a_output();
+ void porta_w(uint8_t data);
+ void set_a_input(uint8_t data, uint8_t z_mask);
+ uint8_t a_output();
DECLARE_WRITE_LINE_MEMBER( ca1_w );
@@ -117,8 +117,8 @@ public:
int ca2_output_z();
DECLARE_WRITE8_MEMBER( portb_w ) { portb_w(data); }
- void portb_w(UINT8 data);
- UINT8 b_output();
+ void portb_w(uint8_t data);
+ uint8_t b_output();
DECLARE_WRITE_LINE_MEMBER( cb1_w );
@@ -135,39 +135,39 @@ protected:
virtual void device_reset() override;
private:
- UINT8 reg_r(UINT8 offset);
- void reg_w(UINT8 offset, UINT8 data);
+ uint8_t reg_r(uint8_t offset);
+ void reg_w(uint8_t offset, uint8_t data);
void update_interrupts();
- UINT8 get_in_a_value();
- UINT8 get_in_b_value();
+ uint8_t get_in_a_value();
+ uint8_t get_in_b_value();
- UINT8 get_out_a_value();
- UINT8 get_out_b_value();
+ uint8_t get_out_a_value();
+ uint8_t get_out_b_value();
void set_out_ca2(int data);
void set_out_cb2(int data);
- UINT8 port_a_r();
- UINT8 ddr_a_r();
- UINT8 control_a_r();
+ uint8_t port_a_r();
+ uint8_t ddr_a_r();
+ uint8_t control_a_r();
- UINT8 port_b_r();
- UINT8 ddr_b_r();
- UINT8 control_b_r();
+ uint8_t port_b_r();
+ uint8_t ddr_b_r();
+ uint8_t control_b_r();
void send_to_out_a_func(const char* message);
void send_to_out_b_func(const char* message);
- void port_a_w(UINT8 data);
- void ddr_a_w(UINT8 data);
+ void port_a_w(uint8_t data);
+ void ddr_a_w(uint8_t data);
- void port_b_w(UINT8 data);
- void ddr_b_w(UINT8 data);
+ void port_b_w(uint8_t data);
+ void ddr_b_w(uint8_t data);
- void control_a_w(UINT8 data);
- void control_b_w(UINT8 data);
+ void control_a_w(uint8_t data);
+ void control_b_w(uint8_t data);
devcb_read8 m_in_a_handler;
devcb_read8 m_in_b_handler;
@@ -181,29 +181,29 @@ private:
devcb_write_line m_irqa_handler;
devcb_write_line m_irqb_handler;
- UINT8 m_in_a;
- UINT8 m_in_ca1;
- UINT8 m_in_ca2;
- UINT8 m_out_a;
- UINT8 m_out_ca2;
- UINT8 m_port_a_z_mask;
- UINT8 m_ddr_a;
- UINT8 m_ctl_a;
- UINT8 m_irq_a1;
- UINT8 m_irq_a2;
- UINT8 m_irq_a_state;
-
- UINT8 m_in_b;
- UINT8 m_in_cb1;
- UINT8 m_in_cb2;
- UINT8 m_out_b;
- UINT8 m_out_cb2;
- UINT8 m_last_out_cb2_z;
- UINT8 m_ddr_b;
- UINT8 m_ctl_b;
- UINT8 m_irq_b1;
- UINT8 m_irq_b2;
- UINT8 m_irq_b_state;
+ uint8_t m_in_a;
+ uint8_t m_in_ca1;
+ uint8_t m_in_ca2;
+ uint8_t m_out_a;
+ uint8_t m_out_ca2;
+ uint8_t m_port_a_z_mask;
+ uint8_t m_ddr_a;
+ uint8_t m_ctl_a;
+ uint8_t m_irq_a1;
+ uint8_t m_irq_a2;
+ uint8_t m_irq_a_state;
+
+ uint8_t m_in_b;
+ uint8_t m_in_cb1;
+ uint8_t m_in_cb2;
+ uint8_t m_out_b;
+ uint8_t m_out_cb2;
+ uint8_t m_last_out_cb2_z;
+ uint8_t m_ddr_b;
+ uint8_t m_ctl_b;
+ uint8_t m_irq_b1;
+ uint8_t m_irq_b2;
+ uint8_t m_irq_b_state;
// variables that indicate if access a line externally -
// used to for logging purposes ONLY
diff --git a/src/devices/machine/68230pit.cpp b/src/devices/machine/68230pit.cpp
index 725d6fa42cd..14add04b023 100644
--- a/src/devices/machine/68230pit.cpp
+++ b/src/devices/machine/68230pit.cpp
@@ -53,7 +53,7 @@ const device_type PIT68230 = &device_creator<pit68230_device>;
//-------------------------------------------------
// pit68230_device - constructors
//-------------------------------------------------
-pit68230_device::pit68230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source)
+pit68230_device::pit68230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint32_t variant, const char *shortname, const char *source)
: device_t (mconfig, type, name, tag, owner, clock, shortname, source)
, m_pa_out_cb(*this)
, m_pa_in_cb(*this)
@@ -89,7 +89,7 @@ pit68230_device::pit68230_device(const machine_config &mconfig, device_type type
}
-pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t (mconfig, PIT68230, "PIT68230", tag, owner, clock, "pit68230", __FILE__)
, m_pa_out_cb (*this)
, m_pa_in_cb(*this)
@@ -192,7 +192,7 @@ void pit68230_device::device_reset ()
//-------------------------------------------------
// device_timer - handler timer events
//-------------------------------------------------
-void pit68230_device::device_timer (emu_timer &timer, device_timer_id id, INT32 param, void *ptr)
+void pit68230_device::device_timer (emu_timer &timer, device_timer_id id, int32_t param, void *ptr)
{
switch(id)
{
@@ -212,14 +212,14 @@ void pit68230_device::device_timer (emu_timer &timer, device_timer_id id, INT32
}
}
-void pit68230_device::h1_set (UINT8 state)
+void pit68230_device::h1_set (uint8_t state)
{
LOG(("%s %s %d @ m_psr %2x => ",tag(), FUNCNAME, state, m_psr));
if (state) m_psr |= 1; else m_psr &= ~1;
LOG(("%02x %lld\n", m_psr, machine ().firstcpu->total_cycles ()));
}
-void pit68230_device::portb_setbit (UINT8 bit, UINT8 state)
+void pit68230_device::portb_setbit (uint8_t bit, uint8_t state)
{
LOG(("%s %s %d/%d @ m_pbdr %2x => ", tag(), FUNCNAME, bit, state, m_pbdr));
if (state) m_pbdr |= (1 << bit); else m_pbdr &= ~(1 << bit);
@@ -227,47 +227,47 @@ void pit68230_device::portb_setbit (UINT8 bit, UINT8 state)
}
#if VERBOSE > 2
-static INT32 ow_cnt = 0;
-static INT32 ow_data = 0;
-static INT32 ow_ofs = 0;
+static int32_t ow_cnt = 0;
+static int32_t ow_data = 0;
+static int32_t ow_ofs = 0;
#endif
-void pit68230_device::wr_pitreg_pgcr(UINT8 data)
+void pit68230_device::wr_pitreg_pgcr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pgcr = data;
}
-void pit68230_device::wr_pitreg_psrr(UINT8 data)
+void pit68230_device::wr_pitreg_psrr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_psrr = data;
}
-void pit68230_device::wr_pitreg_paddr(UINT8 data)
+void pit68230_device::wr_pitreg_paddr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_paddr = data;
}
-void pit68230_device::wr_pitreg_pbddr(UINT8 data)
+void pit68230_device::wr_pitreg_pbddr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pbddr = data;
}
-void pit68230_device::wr_pitreg_pcddr(UINT8 data)
+void pit68230_device::wr_pitreg_pcddr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pcddr = data;
}
-void pit68230_device::wr_pitreg_pivr(UINT8 data)
+void pit68230_device::wr_pitreg_pivr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": Not implemented yet\n", FUNCNAME, data, tag()));
}
-void pit68230_device::wr_pitreg_pacr(UINT8 data)
+void pit68230_device::wr_pitreg_pacr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pacr = data;
@@ -290,13 +290,13 @@ void pit68230_device::wr_pitreg_pacr(UINT8 data)
m_h2_out_cb (m_pacr & 0x08 ? 1 : 0); // TODO: Check mode and submodes
}
-void pit68230_device::wr_pitreg_pbcr(UINT8 data)
+void pit68230_device::wr_pitreg_pbcr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pbcr = data;
}
-void pit68230_device::wr_pitreg_padr(UINT8 data)
+void pit68230_device::wr_pitreg_padr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_padr |= (data & m_paddr);
@@ -304,7 +304,7 @@ void pit68230_device::wr_pitreg_padr(UINT8 data)
m_pa_out_cb ((offs_t)0, m_padr);
}
-void pit68230_device::wr_pitreg_pbdr(UINT8 data)
+void pit68230_device::wr_pitreg_pbdr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pbdr |= (data & m_pbddr);
@@ -312,7 +312,7 @@ void pit68230_device::wr_pitreg_pbdr(UINT8 data)
m_pb_out_cb ((offs_t)0, m_pbdr & m_pbddr);
}
-void pit68230_device::wr_pitreg_pcdr(UINT8 data)
+void pit68230_device::wr_pitreg_pcdr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_pcdr |= (data & m_pcddr);
@@ -320,7 +320,7 @@ void pit68230_device::wr_pitreg_pcdr(UINT8 data)
m_pc_out_cb ((offs_t)0, m_pcdr);
}
-void pit68230_device::wr_pitreg_psr(UINT8 data)
+void pit68230_device::wr_pitreg_psr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_psr = data;
@@ -388,7 +388,7 @@ TCR bit 0 - Timer Enable
0 Disabled
1 Enabled
*/
-void pit68230_device::wr_pitreg_tcr(UINT8 data)
+void pit68230_device::wr_pitreg_tcr(uint8_t data)
{
int tout = 0;
int tiack = 0;
@@ -441,34 +441,34 @@ void pit68230_device::wr_pitreg_tcr(UINT8 data)
}
}
-void pit68230_device::wr_pitreg_tivr(UINT8 data)
+void pit68230_device::wr_pitreg_tivr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": \n", FUNCNAME, data, tag()));
m_tivr = data;
}
-void pit68230_device::wr_pitreg_cprh(UINT8 data)
+void pit68230_device::wr_pitreg_cprh(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_cpr &= ~0xff0000;
m_cpr |= ((data << 16) & 0xff0000);
}
-void pit68230_device::wr_pitreg_cprm(UINT8 data)
+void pit68230_device::wr_pitreg_cprm(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_cpr &= ~0x00ff00;
m_cpr |= ((data << 8) & 0x00ff00);
}
-void pit68230_device::wr_pitreg_cprl(UINT8 data)
+void pit68230_device::wr_pitreg_cprl(uint8_t data)
{
LOG(("%s(%02x) \"%s\": %s - %02x\n", FUNCNAME, data, tag(), FUNCNAME, data));
m_cpr &= ~0x0000ff;
m_cpr |= ((data << 0) & 0x0000ff);
}
-void pit68230_device::wr_pitreg_tsr(UINT8 data)
+void pit68230_device::wr_pitreg_tsr(uint8_t data)
{
LOG(("%s(%02x) \"%s\": \n", FUNCNAME, data, tag()));
m_tsr = data;
@@ -521,60 +521,60 @@ WRITE8_MEMBER (pit68230_device::write)
}
#if VERBOSE > 2
-static INT32 or_cnt = 0;
-static INT32 or_data = 0;
-static INT32 or_ofs = 0;
+static int32_t or_cnt = 0;
+static int32_t or_data = 0;
+static int32_t or_ofs = 0;
#endif
-UINT8 pit68230_device::rr_pitreg_pgcr()
+uint8_t pit68230_device::rr_pitreg_pgcr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_pgcr));
return m_pgcr;
}
-UINT8 pit68230_device::rr_pitreg_psrr()
+uint8_t pit68230_device::rr_pitreg_psrr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_psrr));
return m_psrr;
}
-UINT8 pit68230_device::rr_pitreg_paddr()
+uint8_t pit68230_device::rr_pitreg_paddr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_paddr));
return m_paddr;
}
-UINT8 pit68230_device::rr_pitreg_pbddr()
+uint8_t pit68230_device::rr_pitreg_pbddr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_pbddr));
return m_pbddr;
}
-UINT8 pit68230_device::rr_pitreg_pcddr()
+uint8_t pit68230_device::rr_pitreg_pcddr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_pcddr));
return m_pcddr;
}
-UINT8 pit68230_device::rr_pitreg_pivr()
+uint8_t pit68230_device::rr_pitreg_pivr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_pivr));
return m_pivr;
}
-UINT8 pit68230_device::rr_pitreg_pacr()
+uint8_t pit68230_device::rr_pitreg_pacr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_pacr));
return m_pacr;
}
-UINT8 pit68230_device::rr_pitreg_pbcr()
+uint8_t pit68230_device::rr_pitreg_pbcr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_pbcr));
return m_pbcr;
}
-UINT8 pit68230_device::rr_pitreg_padr()
+uint8_t pit68230_device::rr_pitreg_padr()
{
m_padr &= m_paddr;
m_padr |= (m_pa_in_cb() & ~m_paddr);
@@ -589,7 +589,7 @@ UINT8 pit68230_device::rr_pitreg_padr()
* mode/submode, reading or writing may affect the double-buffered handshake
* mechanism. The port B data register is not affected by the assertion of the
* RESET pin. PB0-PB7 sits on pins 17-24 on a 48 pin DIP package */
-UINT8 pit68230_device::rr_pitreg_pbdr()
+uint8_t pit68230_device::rr_pitreg_pbdr()
{
m_pbdr &= m_pbddr;
m_pbdr |= (m_pb_in_cb() & ~m_pbddr);
@@ -597,7 +597,7 @@ UINT8 pit68230_device::rr_pitreg_pbdr()
return m_pbdr;
}
-UINT8 pit68230_device::rr_pitreg_pcdr()
+uint8_t pit68230_device::rr_pitreg_pcdr()
{
m_pcdr &= m_pcddr;
m_pcdr |= (m_pc_in_cb() & ~m_pcddr);
@@ -609,10 +609,10 @@ UINT8 pit68230_device::rr_pitreg_pcdr()
It is a read-only address and no other PI/T condition is affected. In all modes,
the instantaneous pin level is read and no input latching is performed except at the
data bus interface. Writes to this address are answered with DTACK, but the data is ignored.*/
-UINT8 pit68230_device::rr_pitreg_paar()
+uint8_t pit68230_device::rr_pitreg_paar()
{
// NOTE: no side effect emulated so using ..padr
- UINT8 ret;
+ uint8_t ret;
ret = m_pa_in_cb();
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, ret));
return ret;
@@ -622,10 +622,10 @@ UINT8 pit68230_device::rr_pitreg_paar()
It is a read-only address and no other PI/T condition is affected. In all modes,
the instantaneous pin level is read and no input latching is performed except at the
data bus interface.Writes to this address are answered with DTACK, but the data is ignored.*/
-UINT8 pit68230_device::rr_pitreg_pbar()
+uint8_t pit68230_device::rr_pitreg_pbar()
{
// NOTE: no side effect emulated so using ..pbdr
- UINT8 ret;
+ uint8_t ret;
ret = m_pb_in_cb();
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, ret));
return ret;
@@ -637,68 +637,68 @@ UINT8 pit68230_device::rr_pitreg_pbar()
* register. Bits 3-0 are the respective status bits referred to throughout this document.
* Their interpretation depends on the programmed mode/submode of the PI/T. For bits
* 3-0 a one is the active or asserted state. */
-UINT8 pit68230_device::rr_pitreg_psr()
+uint8_t pit68230_device::rr_pitreg_psr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_psr));
return m_psr;
}
-UINT8 pit68230_device::rr_pitreg_tcr()
+uint8_t pit68230_device::rr_pitreg_tcr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_tcr));
return m_tcr;
}
-UINT8 pit68230_device::rr_pitreg_tivr()
+uint8_t pit68230_device::rr_pitreg_tivr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_tivr));
return m_tivr;
}
-UINT8 pit68230_device::rr_pitreg_cprh()
+uint8_t pit68230_device::rr_pitreg_cprh()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, (m_cpr >> 16) & 0xff));
return (m_cpr >> 16) & 0xff;
}
-UINT8 pit68230_device::rr_pitreg_cprm()
+uint8_t pit68230_device::rr_pitreg_cprm()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, (m_cpr >> 8) & 0xff));
return (m_cpr >> 8) & 0xff;
}
-UINT8 pit68230_device::rr_pitreg_cprl()
+uint8_t pit68230_device::rr_pitreg_cprl()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, (m_cpr >> 0) & 0xff));
return (m_cpr >> 0) & 0xff;
}
-UINT8 pit68230_device::rr_pitreg_cntrh()
+uint8_t pit68230_device::rr_pitreg_cntrh()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, (m_cntr >> 16) & 0xff));
return (m_cntr >> 16) & 0xff;
}
-UINT8 pit68230_device::rr_pitreg_cntrm()
+uint8_t pit68230_device::rr_pitreg_cntrm()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, (m_cntr >> 8) & 0xff));
return (m_cntr >> 8) & 0xff;
}
-UINT8 pit68230_device::rr_pitreg_cntrl()
+uint8_t pit68230_device::rr_pitreg_cntrl()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, (m_cntr >> 0) & 0xff));
return (m_cntr >> 0) & 0xff;
}
-UINT8 pit68230_device::rr_pitreg_tsr()
+uint8_t pit68230_device::rr_pitreg_tsr()
{
LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_tsr));
return m_tsr;
}
READ8_MEMBER (pit68230_device::read){
- UINT8 data;
+ uint8_t data;
switch (offset) {
case PIT_68230_PGCR: data = rr_pitreg_pgcr(); break;
diff --git a/src/devices/machine/68230pit.h b/src/devices/machine/68230pit.h
index 06736741867..556ac56fa16 100644
--- a/src/devices/machine/68230pit.h
+++ b/src/devices/machine/68230pit.h
@@ -107,8 +107,8 @@ class pit68230_device : public device_t//, public device_execute_interface
{
public:
// construction/destruction
- pit68230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
- pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pit68230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint32_t variant, const char *shortname, const char *source);
+ pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_pa_in_callback (device_t &device, _Object object){ return downcast<pit68230_device &>(device).m_pa_in_cb.set_callback (object); }
template<class _Object> static devcb_base &set_pa_out_callback (device_t &device, _Object object){ return downcast<pit68230_device &>(device).m_pa_out_cb.set_callback (object); }
template<class _Object> static devcb_base &set_pb_in_callback (device_t &device, _Object object){ return downcast<pit68230_device &>(device).m_pb_in_cb.set_callback (object); }
@@ -123,53 +123,53 @@ class pit68230_device : public device_t//, public device_execute_interface
DECLARE_WRITE8_MEMBER (write);
DECLARE_READ8_MEMBER (read);
- void h1_set (UINT8 state);
- void portb_setbit (UINT8 bit, UINT8 state);
-
- void wr_pitreg_pgcr(UINT8 data);
- void wr_pitreg_psrr(UINT8 data);
- void wr_pitreg_paddr(UINT8 data);
- void wr_pitreg_pbddr(UINT8 data);
- void wr_pitreg_pcddr(UINT8 data);
- void wr_pitreg_pivr(UINT8 data);
- void wr_pitreg_pacr(UINT8 data);
- void wr_pitreg_pbcr(UINT8 data);
- void wr_pitreg_padr(UINT8 data);
- void wr_pitreg_pbdr(UINT8 data);
- void wr_pitreg_paar(UINT8 data);
- void wr_pitreg_pbar(UINT8 data);
- void wr_pitreg_pcdr(UINT8 data);
- void wr_pitreg_psr(UINT8 data);
- void wr_pitreg_tcr(UINT8 data);
- void wr_pitreg_tivr(UINT8 data);
- void wr_pitreg_cprh(UINT8 data);
- void wr_pitreg_cprm(UINT8 data);
- void wr_pitreg_cprl(UINT8 data);
- void wr_pitreg_tsr(UINT8 data);
-
- UINT8 rr_pitreg_pgcr();
- UINT8 rr_pitreg_psrr();
- UINT8 rr_pitreg_paddr();
- UINT8 rr_pitreg_pbddr();
- UINT8 rr_pitreg_pcddr();
- UINT8 rr_pitreg_pivr();
- UINT8 rr_pitreg_pacr();
- UINT8 rr_pitreg_pbcr();
- UINT8 rr_pitreg_padr();
- UINT8 rr_pitreg_pbdr();
- UINT8 rr_pitreg_paar();
- UINT8 rr_pitreg_pbar();
- UINT8 rr_pitreg_pcdr();
- UINT8 rr_pitreg_psr();
- UINT8 rr_pitreg_tcr();
- UINT8 rr_pitreg_tivr();
- UINT8 rr_pitreg_cprh();
- UINT8 rr_pitreg_cprm();
- UINT8 rr_pitreg_cprl();
- UINT8 rr_pitreg_cntrh();
- UINT8 rr_pitreg_cntrm();
- UINT8 rr_pitreg_cntrl();
- UINT8 rr_pitreg_tsr();
+ void h1_set (uint8_t state);
+ void portb_setbit (uint8_t bit, uint8_t state);
+
+ void wr_pitreg_pgcr(uint8_t data);
+ void wr_pitreg_psrr(uint8_t data);
+ void wr_pitreg_paddr(uint8_t data);
+ void wr_pitreg_pbddr(uint8_t data);
+ void wr_pitreg_pcddr(uint8_t data);
+ void wr_pitreg_pivr(uint8_t data);
+ void wr_pitreg_pacr(uint8_t data);
+ void wr_pitreg_pbcr(uint8_t data);
+ void wr_pitreg_padr(uint8_t data);
+ void wr_pitreg_pbdr(uint8_t data);
+ void wr_pitreg_paar(uint8_t data);
+ void wr_pitreg_pbar(uint8_t data);
+ void wr_pitreg_pcdr(uint8_t data);
+ void wr_pitreg_psr(uint8_t data);
+ void wr_pitreg_tcr(uint8_t data);
+ void wr_pitreg_tivr(uint8_t data);
+ void wr_pitreg_cprh(uint8_t data);
+ void wr_pitreg_cprm(uint8_t data);
+ void wr_pitreg_cprl(uint8_t data);
+ void wr_pitreg_tsr(uint8_t data);
+
+ uint8_t rr_pitreg_pgcr();
+ uint8_t rr_pitreg_psrr();
+ uint8_t rr_pitreg_paddr();
+ uint8_t rr_pitreg_pbddr();
+ uint8_t rr_pitreg_pcddr();
+ uint8_t rr_pitreg_pivr();
+ uint8_t rr_pitreg_pacr();
+ uint8_t rr_pitreg_pbcr();
+ uint8_t rr_pitreg_padr();
+ uint8_t rr_pitreg_pbdr();
+ uint8_t rr_pitreg_paar();
+ uint8_t rr_pitreg_pbar();
+ uint8_t rr_pitreg_pcdr();
+ uint8_t rr_pitreg_psr();
+ uint8_t rr_pitreg_tcr();
+ uint8_t rr_pitreg_tivr();
+ uint8_t rr_pitreg_cprh();
+ uint8_t rr_pitreg_cprm();
+ uint8_t rr_pitreg_cprl();
+ uint8_t rr_pitreg_cntrh();
+ uint8_t rr_pitreg_cntrm();
+ uint8_t rr_pitreg_cntrl();
+ uint8_t rr_pitreg_tsr();
protected:
@@ -212,23 +212,23 @@ protected:
devcb_write_line m_h4_out_cb;
// peripheral ports
- UINT8 m_pgcr; // Port General Control register
- UINT8 m_psrr; // Port Service Request register
- UINT8 m_paddr; // Port A Data Direction register
- UINT8 m_pbddr; // Port B Data Direction register
- UINT8 m_pcddr; // Port C Data Direction register
- UINT8 m_pivr; // Ports Interrupt vector
- UINT8 m_pacr; // Port A Control register
- UINT8 m_pbcr; // Port B Control register
- UINT8 m_padr; // Port A Data register
- UINT8 m_pbdr; // Port B Data register
- UINT8 m_pcdr; // Port C Data register
- UINT8 m_psr; // Port Status Register
- UINT8 m_tcr; // Timer Control Register
- UINT8 m_tivr; // Timer Interrupt Vector register
+ uint8_t m_pgcr; // Port General Control register
+ uint8_t m_psrr; // Port Service Request register
+ uint8_t m_paddr; // Port A Data Direction register
+ uint8_t m_pbddr; // Port B Data Direction register
+ uint8_t m_pcddr; // Port C Data Direction register
+ uint8_t m_pivr; // Ports Interrupt vector
+ uint8_t m_pacr; // Port A Control register
+ uint8_t m_pbcr; // Port B Control register
+ uint8_t m_padr; // Port A Data register
+ uint8_t m_pbdr; // Port B Data register
+ uint8_t m_pcdr; // Port C Data register
+ uint8_t m_psr; // Port Status Register
+ uint8_t m_tcr; // Timer Control Register
+ uint8_t m_tivr; // Timer Interrupt Vector register
int m_cpr; // Counter Preload Registers (3 x 8 = 24 bits)
int m_cntr; // - The 24 bit Counter
- UINT8 m_tsr; // Timer Status Register
+ uint8_t m_tsr; // Timer Status Register
// Timers
emu_timer *pit_timer;
diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp
index cbdd2c1eed8..70a272a5436 100644
--- a/src/devices/machine/68307.cpp
+++ b/src/devices/machine/68307.cpp
@@ -52,7 +52,7 @@ machine_config_constructor m68307cpu_device::device_mconfig_additions() const
}
-m68307cpu_device::m68307cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+m68307cpu_device::m68307cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: m68000_device(mconfig, "MC68307", tag, owner, clock, M68307, 16,24, ADDRESS_MAP_NAME(m68307_internal_map), "mc68307", __FILE__),
write_irq(*this),
write_a_tx(*this),
@@ -111,43 +111,43 @@ int m68307_calc_cs(m68307cpu_device *m68k, offs_t address)
-UINT16 m68307cpu_device::simple_read_immediate_16_m68307(offs_t address)
+uint16_t m68307cpu_device::simple_read_immediate_16_m68307(offs_t address)
{
// m68307_currentcs = m68307_calc_cs(this, address);
return m_direct->read_word(address);
}
-UINT8 m68307cpu_device::read_byte_m68307(offs_t address)
+uint8_t m68307cpu_device::read_byte_m68307(offs_t address)
{
// m68307_currentcs = m68307_calc_cs(this, address);
return m_space->read_byte(address);
}
-UINT16 m68307cpu_device::read_word_m68307(offs_t address)
+uint16_t m68307cpu_device::read_word_m68307(offs_t address)
{
// m68307_currentcs = m68307_calc_cs(this, address);
return m_space->read_word(address);
}
-UINT32 m68307cpu_device::read_dword_m68307(offs_t address)
+uint32_t m68307cpu_device::read_dword_m68307(offs_t address)
{
// m68307_currentcs = m68307_calc_cs(this, address);
return m_space->read_dword(address);
}
-void m68307cpu_device::write_byte_m68307(offs_t address, UINT8 data)
+void m68307cpu_device::write_byte_m68307(offs_t address, uint8_t data)
{
// m68307_currentcs = m68307_calc_cs(this, address);
m_space->write_byte(address, data);
}
-void m68307cpu_device::write_word_m68307(offs_t address, UINT16 data)
+void m68307cpu_device::write_word_m68307(offs_t address, uint16_t data)
{
// m68307_currentcs = m68307_calc_cs(this, address);
m_space->write_word(address, data);
}
-void m68307cpu_device::write_dword_m68307(offs_t address, UINT32 data)
+void m68307cpu_device::write_dword_m68307(offs_t address, uint32_t data)
{
// m68307_currentcs = m68307_calc_cs(this, address);
m_space->write_dword(address, data);
@@ -185,7 +185,7 @@ void m68307cpu_device::set_port_callbacks(m68307_porta_read_delegate porta_r, m6
-UINT16 m68307cpu_device::get_cs(offs_t address)
+uint16_t m68307cpu_device::get_cs(offs_t address)
{
m68307_currentcs = m68307_calc_cs(this, address);
diff --git a/src/devices/machine/68307.h b/src/devices/machine/68307.h
index 60ae61db49a..dba86a8f996 100644
--- a/src/devices/machine/68307.h
+++ b/src/devices/machine/68307.h
@@ -16,10 +16,10 @@
#include "machine/mc68681.h"
-typedef device_delegate<UINT8 (address_space &space, bool dedicated, UINT8 line_mask)> m68307_porta_read_delegate;
-typedef device_delegate<void (address_space &space, bool dedicated, UINT8 data, UINT8 line_mask)> m68307_porta_write_delegate;
-typedef device_delegate<UINT16 (address_space &space, bool dedicated, UINT16 line_mask)> m68307_portb_read_delegate;
-typedef device_delegate<void (address_space &space, bool dedicated, UINT16 data, UINT16 line_mask)> m68307_portb_write_delegate;
+typedef device_delegate<uint8_t (address_space &space, bool dedicated, uint8_t line_mask)> m68307_porta_read_delegate;
+typedef device_delegate<void (address_space &space, bool dedicated, uint8_t data, uint8_t line_mask)> m68307_porta_write_delegate;
+typedef device_delegate<uint16_t (address_space &space, bool dedicated, uint16_t line_mask)> m68307_portb_read_delegate;
+typedef device_delegate<void (address_space &space, bool dedicated, uint16_t data, uint16_t line_mask)> m68307_portb_write_delegate;
/* trampolines so we can specify the 68681 serial configuration when adding the CPU */
@@ -39,7 +39,7 @@ typedef device_delegate<void (address_space &space, bool dedicated, UINT16 data,
class m68307cpu_device : public m68000_device {
public:
- m68307cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ m68307cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
/* trampolines so we can specify the 68681 serial configuration when adding the CPU */
template<class _Object> static devcb_base &set_irq_cb(device_t &device, _Object object) { return downcast<m68307cpu_device &>(device).write_irq.set_callback(object); }
@@ -57,15 +57,15 @@ public:
devcb_read8 read_inport;
devcb_write8 write_outport;
- UINT16 simple_read_immediate_16_m68307(offs_t address);
+ uint16_t simple_read_immediate_16_m68307(offs_t address);
- UINT8 read_byte_m68307(offs_t address);
- UINT16 read_word_m68307(offs_t address);
- UINT32 read_dword_m68307(offs_t address);
- void write_byte_m68307(offs_t address, UINT8 data);
- void write_word_m68307(offs_t address, UINT16 data);
- void write_dword_m68307(offs_t address, UINT32 data);
+ uint8_t read_byte_m68307(offs_t address);
+ uint16_t read_word_m68307(offs_t address);
+ uint32_t read_dword_m68307(offs_t address);
+ void write_byte_m68307(offs_t address, uint8_t data);
+ void write_word_m68307(offs_t address, uint16_t data);
+ void write_dword_m68307(offs_t address, uint32_t data);
/* 68307 peripheral modules */
@@ -74,9 +74,9 @@ public:
// m68307_serial* m68307SERIAL;
m68307_timer* m68307TIMER;
- UINT16 m68307_base;
- UINT16 m68307_scrhigh;
- UINT16 m68307_scrlow;
+ uint16_t m68307_base;
+ uint16_t m68307_scrhigh;
+ uint16_t m68307_scrlow;
int m68307_currentcs;
@@ -96,7 +96,7 @@ public:
/* callbacks for internal ports */
void set_port_callbacks(m68307_porta_read_delegate porta_r, m68307_porta_write_delegate porta_w, m68307_portb_read_delegate portb_r, m68307_portb_write_delegate portb_w);
void set_interrupt(int level, int vector);
- UINT16 get_cs(offs_t address);
+ uint16_t get_cs(offs_t address);
void timer0_interrupt();
void timer1_interrupt();
void serial_interrupt(int vector);
@@ -110,11 +110,11 @@ public:
void init16_m68307(address_space &space);
- virtual UINT32 disasm_min_opcode_bytes() const override { return 2; };
- virtual UINT32 disasm_max_opcode_bytes() const override { return 10; };
+ virtual uint32_t disasm_min_opcode_bytes() const override { return 2; };
+ virtual uint32_t disasm_max_opcode_bytes() const override { return 10; };
- virtual UINT32 execute_min_cycles() const override { return 4; };
- virtual UINT32 execute_max_cycles() const override { return 158; };
+ virtual uint32_t execute_min_cycles() const override { return 4; };
+ virtual uint32_t execute_max_cycles() const override { return 158; };
required_device<mc68681_device> m_duart;
protected:
diff --git a/src/devices/machine/68307bus.cpp b/src/devices/machine/68307bus.cpp
index 4d6b2928d40..91c193f2d4e 100644
--- a/src/devices/machine/68307bus.cpp
+++ b/src/devices/machine/68307bus.cpp
@@ -12,7 +12,7 @@ READ8_MEMBER( m68307cpu_device::m68307_internal_mbus_r )
m68307cpu_device *m68k = this;
m68307_mbus* mbus = m68k->m68307MBUS;
assert(mbus != nullptr);
- UINT8 retval;
+ uint8_t retval;
if (mbus)
{
diff --git a/src/devices/machine/68307bus.h b/src/devices/machine/68307bus.h
index 5131ad4c9c5..eb6db9811ae 100644
--- a/src/devices/machine/68307bus.h
+++ b/src/devices/machine/68307bus.h
@@ -13,7 +13,7 @@ class m68307_mbus
{
public:
- UINT16 m_MFCR;
+ uint16_t m_MFCR;
bool m_busy;
bool m_intpend;
diff --git a/src/devices/machine/68307sim.cpp b/src/devices/machine/68307sim.cpp
index 7d293d6f8d7..47479cae1da 100644
--- a/src/devices/machine/68307sim.cpp
+++ b/src/devices/machine/68307sim.cpp
@@ -140,18 +140,18 @@ WRITE16_MEMBER( m68307cpu_device::m68307_internal_sim_w )
}
-void m68307_sim::write_pacnt(UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_pacnt(uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_pacnt);
}
-void m68307_sim::write_paddr(UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_paddr(uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_paddr);
}
-UINT16 m68307_sim::read_padat(m68307cpu_device* m68k, address_space &space, UINT16 mem_mask)
+uint16_t m68307_sim::read_padat(m68307cpu_device* m68k, address_space &space, uint16_t mem_mask)
{
int pc = space.device().safe_pc();
@@ -159,12 +159,12 @@ UINT16 m68307_sim::read_padat(m68307cpu_device* m68k, address_space &space, UINT
{
// for general purpose bits, if configured as 'output' then anything output gets latched
// and anything configured as input is read from the port
- UINT8 outputbits = m_paddr;
- UINT8 inputbits = ~m_paddr;
- UINT8 general_purpose_bits = ~m_pacnt;
- UINT8 indat = m68k->m_m68307_porta_r(space, false, (inputbits & general_purpose_bits)&mem_mask) & ((inputbits & general_purpose_bits) & mem_mask); // read general purpose input lines
+ uint8_t outputbits = m_paddr;
+ uint8_t inputbits = ~m_paddr;
+ uint8_t general_purpose_bits = ~m_pacnt;
+ uint8_t indat = m68k->m_m68307_porta_r(space, false, (inputbits & general_purpose_bits)&mem_mask) & ((inputbits & general_purpose_bits) & mem_mask); // read general purpose input lines
indat |= m68k->m_m68307_porta_r(space, true, (inputbits & ~general_purpose_bits)&mem_mask) & ((inputbits & ~general_purpose_bits)& mem_mask); // read dedicated input lines
- UINT8 outdat = (m_padat & outputbits) & general_purpose_bits; // read general purpose output lines (reads latched data)
+ uint8_t outdat = (m_padat & outputbits) & general_purpose_bits; // read general purpose output lines (reads latched data)
return (indat | outdat);
@@ -177,7 +177,7 @@ UINT16 m68307_sim::read_padat(m68307cpu_device* m68k, address_space &space, UINT
}
-void m68307_sim::write_padat(m68307cpu_device* m68k, address_space &space, UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_padat(m68307cpu_device* m68k, address_space &space, uint16_t data, uint16_t mem_mask)
{
int pc = space.device().safe_pc();
COMBINE_DATA(&m_padat);
@@ -192,17 +192,17 @@ void m68307_sim::write_padat(m68307cpu_device* m68k, address_space &space, UINT1
}
}
-void m68307_sim::write_pbcnt(UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_pbcnt(uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_pbcnt);
}
-void m68307_sim::write_pbddr(UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_pbddr(uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_pbddr);
}
-UINT16 m68307_sim::read_pbdat(m68307cpu_device* m68k, address_space &space, UINT16 mem_mask)
+uint16_t m68307_sim::read_pbdat(m68307cpu_device* m68k, address_space &space, uint16_t mem_mask)
{
int pc = space.device().safe_pc();
@@ -210,13 +210,13 @@ UINT16 m68307_sim::read_pbdat(m68307cpu_device* m68k, address_space &space, UINT
{
// for general purpose bits, if configured as 'output' then anything output gets latched
// and anything configured as input is read from the port
- UINT16 outputbits = m_pbddr;
- UINT16 inputbits = ~m_pbddr;
- UINT16 general_purpose_bits = ~m_pbcnt;
+ uint16_t outputbits = m_pbddr;
+ uint16_t inputbits = ~m_pbddr;
+ uint16_t general_purpose_bits = ~m_pbcnt;
- UINT16 indat = m68k->m_m68307_portb_r(space, false, (inputbits & general_purpose_bits)&mem_mask) & ((inputbits & general_purpose_bits) & mem_mask); // read general purpose input lines
+ uint16_t indat = m68k->m_m68307_portb_r(space, false, (inputbits & general_purpose_bits)&mem_mask) & ((inputbits & general_purpose_bits) & mem_mask); // read general purpose input lines
indat |= m68k->m_m68307_portb_r(space, true, (inputbits & ~general_purpose_bits)&mem_mask) & ((inputbits & ~general_purpose_bits)& mem_mask); // read dedicated input lines
- UINT16 outdat = (m_pbdat & outputbits) & general_purpose_bits; // read general purpose output lines (reads latched data)
+ uint16_t outdat = (m_pbdat & outputbits) & general_purpose_bits; // read general purpose output lines (reads latched data)
return (indat | outdat);
}
@@ -228,7 +228,7 @@ UINT16 m68307_sim::read_pbdat(m68307cpu_device* m68k, address_space &space, UINT
}
-void m68307_sim::write_pbdat(m68307cpu_device* m68k, address_space &space, UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_pbdat(m68307cpu_device* m68k, address_space &space, uint16_t data, uint16_t mem_mask)
{
int pc = space.device().safe_pc();
COMBINE_DATA(&m_pbdat);
@@ -243,7 +243,7 @@ void m68307_sim::write_pbdat(m68307cpu_device* m68k, address_space &space, UINT1
}
}
-void m68307_sim::write_licr1(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_licr1(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_licr1);
data = m_licr1;
@@ -259,10 +259,10 @@ void m68307_sim::write_licr1(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mas
m68k->logerror("\n");
}
-void m68307_sim::write_licr2(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_licr2(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_licr2);
- UINT16 newdata = m_licr2;
+ uint16_t newdata = m_licr2;
m68k->logerror("m_licr2 value %04x : Details :\n", newdata);
m68k->logerror("int8ipl %01x\n", (newdata>>0)&7);
m68k->logerror("pir8 %01x\n", (newdata>>3)&1);
@@ -283,7 +283,7 @@ void m68307_sim::write_licr2(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mas
}
-void m68307_sim::write_picr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_picr(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_picr);
data = m_picr;
@@ -295,7 +295,7 @@ void m68307_sim::write_picr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask
m68k->logerror("\n");
}
-void m68307_sim::write_pivr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask)
+void m68307_sim::write_pivr(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_pivr);
data = m_pivr;
diff --git a/src/devices/machine/68307sim.h b/src/devices/machine/68307sim.h
index 2198e19d956..0d7c5ceea1a 100644
--- a/src/devices/machine/68307sim.h
+++ b/src/devices/machine/68307sim.h
@@ -36,39 +36,39 @@ class m68307_sim
{
public:
- UINT16 m_pacnt; // 8-bit
- UINT16 m_paddr; // 8-bit
- UINT16 m_padat; // 8-bit
+ uint16_t m_pacnt; // 8-bit
+ uint16_t m_paddr; // 8-bit
+ uint16_t m_padat; // 8-bit
- UINT16 m_pbcnt;
- UINT16 m_pbddr;
- UINT16 m_pbdat;
+ uint16_t m_pbcnt;
+ uint16_t m_pbddr;
+ uint16_t m_pbdat;
- UINT16 m_pivr; // 8-bit
+ uint16_t m_pivr; // 8-bit
- UINT16 m_br[4];
- UINT16 m_or[4];
- UINT16 m_picr;
- UINT16 m_licr1;
- UINT16 m_licr2;
+ uint16_t m_br[4];
+ uint16_t m_or[4];
+ uint16_t m_picr;
+ uint16_t m_licr1;
+ uint16_t m_licr2;
- void write_pacnt(UINT16 data, UINT16 mem_mask);
- void write_paddr(UINT16 data, UINT16 mem_mask);
- UINT16 read_padat(m68307cpu_device* m68k, address_space &space, UINT16 mem_mask);
- void write_padat(m68307cpu_device* m68k, address_space &space, UINT16 data, UINT16 mem_mask);
+ void write_pacnt(uint16_t data, uint16_t mem_mask);
+ void write_paddr(uint16_t data, uint16_t mem_mask);
+ uint16_t read_padat(m68307cpu_device* m68k, address_space &space, uint16_t mem_mask);
+ void write_padat(m68307cpu_device* m68k, address_space &space, uint16_t data, uint16_t mem_mask);
- void write_pbcnt(UINT16 data, UINT16 mem_mask);
- void write_pbddr(UINT16 data, UINT16 mem_mask);
- UINT16 read_pbdat(m68307cpu_device* m68k, address_space &space, UINT16 mem_mask);
- void write_pbdat(m68307cpu_device* m68k, address_space &space, UINT16 data, UINT16 mem_mask);
+ void write_pbcnt(uint16_t data, uint16_t mem_mask);
+ void write_pbddr(uint16_t data, uint16_t mem_mask);
+ uint16_t read_pbdat(m68307cpu_device* m68k, address_space &space, uint16_t mem_mask);
+ void write_pbdat(m68307cpu_device* m68k, address_space &space, uint16_t data, uint16_t mem_mask);
- void write_licr1(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask);
- void write_licr2(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask);
- void write_picr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask);
- void write_pivr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask);
+ void write_licr1(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask);
+ void write_licr2(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask);
+ void write_picr(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask);
+ void write_pivr(m68307cpu_device* m68k, uint16_t data, uint16_t mem_mask);
void reset(void);
};
diff --git a/src/devices/machine/68307tmu.cpp b/src/devices/machine/68307tmu.cpp
index e3c8e595f7c..5deb48a9f85 100644
--- a/src/devices/machine/68307tmu.cpp
+++ b/src/devices/machine/68307tmu.cpp
@@ -142,7 +142,7 @@ void m68307_timer::init(m68307cpu_device *device)
wd_mametimer = device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m68307_timer::wd_timer_callback),this), parent);
}
-UINT16 m68307_timer::read_tcn(UINT16 mem_mask, int which)
+uint16_t m68307_timer::read_tcn(uint16_t mem_mask, int which)
{
// we should return the current timer value by
// calculating what it should be based on the time
@@ -150,14 +150,14 @@ UINT16 m68307_timer::read_tcn(UINT16 mem_mask, int which)
return 0x3a98;
}
-void m68307_timer::write_ter(UINT16 data, UINT16 mem_mask, int which)
+void m68307_timer::write_ter(uint16_t data, uint16_t mem_mask, int which)
{
assert(which >= 0 && which < ARRAY_LENGTH(singletimer));
m68307_single_timer* tptr = &singletimer[which];
if (data & 0x2) tptr->regs[m68307TIMER_TMR] &= ~0x2;
}
-void m68307_timer::write_tmr(UINT16 data, UINT16 mem_mask, int which)
+void m68307_timer::write_tmr(uint16_t data, uint16_t mem_mask, int which)
{
m68307cpu_device* m68k = parent;
assert(which >= 0 && which < ARRAY_LENGTH(singletimer));
@@ -208,7 +208,7 @@ void m68307_timer::write_tmr(UINT16 data, UINT16 mem_mask, int which)
}
-void m68307_timer::write_trr(UINT16 data, UINT16 mem_mask, int which)
+void m68307_timer::write_trr(uint16_t data, uint16_t mem_mask, int which)
{
assert(which >= 0 && which < ARRAY_LENGTH(singletimer));
m68307_single_timer* tptr = &singletimer[which];
diff --git a/src/devices/machine/68307tmu.h b/src/devices/machine/68307tmu.h
index 660bdaeeb41..8ecdfa8a86f 100644
--- a/src/devices/machine/68307tmu.h
+++ b/src/devices/machine/68307tmu.h
@@ -17,7 +17,7 @@ class m68307cpu_device;
struct m68307_single_timer
{
- UINT16 regs[0x8];
+ uint16_t regs[0x8];
bool enabled;
emu_timer *mametimer;
};
@@ -31,10 +31,10 @@ class m68307_timer
emu_timer *wd_mametimer;
m68307cpu_device *parent;
- void write_tmr(UINT16 data, UINT16 mem_mask, int which);
- void write_trr(UINT16 data, UINT16 mem_mask, int which);
- void write_ter(UINT16 data, UINT16 mem_mask, int which);
- UINT16 read_tcn(UINT16 mem_mask, int which);
+ void write_tmr(uint16_t data, uint16_t mem_mask, int which);
+ void write_trr(uint16_t data, uint16_t mem_mask, int which);
+ void write_ter(uint16_t data, uint16_t mem_mask, int which);
+ uint16_t read_tcn(uint16_t mem_mask, int which);
void init(m68307cpu_device *device);
void reset(void);
diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp
index f65c820ab33..312139f528e 100644
--- a/src/devices/machine/68340.cpp
+++ b/src/devices/machine/68340.cpp
@@ -32,7 +32,7 @@ int m68340_calc_cs(m68340cpu_device *m68k, offs_t address)
-UINT16 m68340cpu_device::get_cs(offs_t address)
+uint16_t m68340cpu_device::get_cs(offs_t address)
{
m68340_currentcs = m68340_calc_cs(this, address);
@@ -109,7 +109,7 @@ ADDRESS_MAP_END
-m68340cpu_device::m68340cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+m68340cpu_device::m68340cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: fscpu32_device(mconfig, "MC68340", tag, owner, clock, M68340, 32,32, ADDRESS_MAP_NAME(m68340_internal_map), "mc68340", __FILE__)
{
m68340SIM = nullptr;
diff --git a/src/devices/machine/68340.h b/src/devices/machine/68340.h
index 5e9d4b5d908..b6883423193 100644
--- a/src/devices/machine/68340.h
+++ b/src/devices/machine/68340.h
@@ -21,7 +21,7 @@
class m68340cpu_device : public fscpu32_device {
public:
- m68340cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ m68340cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
int m68340_currentcs;
@@ -32,13 +32,13 @@ public:
m68340_serial* m68340SERIAL;
m68340_timer* m68340TIMER;
- UINT32 m68340_base;
+ uint32_t m68340_base;
- UINT16 m_avr;
- UINT16 m_picr;
- UINT16 m_pitr;
+ uint16_t m_avr;
+ uint16_t m_picr;
+ uint16_t m_pitr;
- UINT16 get_cs(offs_t address);
+ uint16_t get_cs(offs_t address);
READ32_MEMBER( m68340_internal_base_r );
WRITE32_MEMBER( m68340_internal_base_w );
diff --git a/src/devices/machine/68340sim.h b/src/devices/machine/68340sim.h
index 493fa9805ce..821de60b319 100644
--- a/src/devices/machine/68340sim.h
+++ b/src/devices/machine/68340sim.h
@@ -53,8 +53,8 @@ class m68340_sim
{
public:
- UINT32 m_am[4];
- UINT32 m_ba[4];
+ uint32_t m_am[4];
+ uint32_t m_ba[4];
void reset(void);
};
diff --git a/src/devices/machine/6840ptm.cpp b/src/devices/machine/6840ptm.cpp
index 1d3d2eeddf9..3e5858b2164 100644
--- a/src/devices/machine/6840ptm.cpp
+++ b/src/devices/machine/6840ptm.cpp
@@ -69,7 +69,7 @@ const device_type PTM6840 = &device_creator<ptm6840_device>;
// ptm6840_device - constructor
//-------------------------------------------------
-ptm6840_device::ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ptm6840_device::ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PTM6840, "6840 PTM", tag, owner, clock, "ptm6840", __FILE__),
m_internal_clock(0.0),
m_out_cb{*this, *this, *this},
@@ -304,7 +304,7 @@ void ptm6840_device::update_interrupts()
// compute_counter - Compute Counter
//-------------------------------------------------
-UINT16 ptm6840_device::compute_counter( int counter ) const
+uint16_t ptm6840_device::compute_counter( int counter ) const
{
double clock;
@@ -496,7 +496,7 @@ WRITE8_MEMBER( ptm6840_device::write )
case PTM_6840_CTRL2:
{
int idx = (offset == 1) ? 1 : (m_control_reg[1] & CR1_SELECT) ? 0 : 2;
- UINT8 diffs = data ^ m_control_reg[idx];
+ uint8_t diffs = data ^ m_control_reg[idx];
m_t3_divisor = (m_control_reg[2] & T3_PRESCALE_EN) ? 8 : 1;
m_mode[idx] = (data >> 3) & 0x07;
m_control_reg[idx] = data;
diff --git a/src/devices/machine/6840ptm.h b/src/devices/machine/6840ptm.h
index fdbc931fbc7..0362ded05f6 100644
--- a/src/devices/machine/6840ptm.h
+++ b/src/devices/machine/6840ptm.h
@@ -49,7 +49,7 @@ class ptm6840_device : public device_t
{
public:
// construction/destruction
- ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_internal_clock(device_t &device, double clock) { downcast<ptm6840_device &>(device).m_internal_clock = clock; }
static void set_external_clocks(device_t &device, double clock0, double clock1, double clock2) { downcast<ptm6840_device &>(device).m_external_clock[0] = clock0; downcast<ptm6840_device &>(device).m_external_clock[1] = clock1; downcast<ptm6840_device &>(device).m_external_clock[2] = clock2; }
@@ -58,14 +58,14 @@ public:
int status(int clock) const { return m_enabled[clock]; } // get whether timer is enabled
int irq_state() const { return m_irq; } // get IRQ state
- UINT16 count(int counter) const { return compute_counter(counter); } // get counter value
+ uint16_t count(int counter) const { return compute_counter(counter); } // get counter value
void set_ext_clock(int counter, double clock); // set clock frequency
int ext_clock(int counter) const { return m_external_clock[counter]; } // get clock frequency
DECLARE_WRITE8_MEMBER( write );
- void write(offs_t offset, UINT8 data) { write(machine().driver_data()->generic_space(), offset, data); }
+ void write(offs_t offset, uint8_t data) { write(machine().driver_data()->generic_space(), offset, data); }
DECLARE_READ8_MEMBER( read );
- UINT8 read(offs_t offset) { return read(machine().driver_data()->generic_space(), offset); }
+ uint8_t read(offs_t offset) { return read(machine().driver_data()->generic_space(), offset); }
void set_gate(int idx, int state);
DECLARE_WRITE_LINE_MEMBER( set_g1 );
@@ -90,7 +90,7 @@ private:
void tick(int counter, int count);
void timeout(int idx);
- UINT16 compute_counter(int counter) const;
+ uint16_t compute_counter(int counter) const;
void reload_count(int idx);
enum
@@ -131,26 +131,26 @@ private:
devcb_write_line m_out_cb[3];
devcb_write_line m_irq_cb;
- UINT8 m_control_reg[3];
- UINT8 m_output[3]; // Output states
- UINT8 m_gate[3]; // Input gate states
- UINT8 m_clk[3]; // Clock states
- UINT8 m_enabled[3];
- UINT8 m_mode[3];
- UINT8 m_fired[3];
- UINT8 m_t3_divisor;
- UINT8 m_t3_scaler;
- UINT8 m_irq;
- UINT8 m_status_reg;
- UINT8 m_status_read_since_int;
- UINT8 m_lsb_buffer;
- UINT8 m_msb_buffer;
+ uint8_t m_control_reg[3];
+ uint8_t m_output[3]; // Output states
+ uint8_t m_gate[3]; // Input gate states
+ uint8_t m_clk[3]; // Clock states
+ uint8_t m_enabled[3];
+ uint8_t m_mode[3];
+ uint8_t m_fired[3];
+ uint8_t m_t3_divisor;
+ uint8_t m_t3_scaler;
+ uint8_t m_irq;
+ uint8_t m_status_reg;
+ uint8_t m_status_read_since_int;
+ uint8_t m_lsb_buffer;
+ uint8_t m_msb_buffer;
// Each PTM has 3 timers
emu_timer *m_timer[3];
- UINT16 m_latch[3];
- UINT16 m_counter[3];
+ uint16_t m_latch[3];
+ uint16_t m_counter[3];
static const char *const opmode[];
};
diff --git a/src/devices/machine/6850acia.cpp b/src/devices/machine/6850acia.cpp
index 82615fbaf32..99882640fc4 100644
--- a/src/devices/machine/6850acia.cpp
+++ b/src/devices/machine/6850acia.cpp
@@ -64,7 +64,7 @@ const device_type ACIA6850 = &device_creator<acia6850_device>;
// acia6850_device - constructor
//-------------------------------------------------
-acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ACIA6850, "6850 ACIA", tag, owner, clock, "acia6850", __FILE__),
m_txd_handler(*this),
m_rts_handler(*this),
@@ -88,7 +88,7 @@ acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag,
{
}
-acia6850_device::acia6850_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)
+acia6850_device::acia6850_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_txd_handler(*this),
m_rts_handler(*this),
@@ -169,7 +169,7 @@ void acia6850_device::device_reset()
READ8_MEMBER( acia6850_device::status_r )
{
- UINT8 status = m_status;
+ uint8_t status = m_status;
if (status & SR_CTS)
{
diff --git a/src/devices/machine/6850acia.h b/src/devices/machine/6850acia.h
index df8c4a3bc29..0163dd7f4ca 100644
--- a/src/devices/machine/6850acia.h
+++ b/src/devices/machine/6850acia.h
@@ -28,7 +28,7 @@ class acia6850_device : public device_t
{
public:
// construction/destruction
- acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast<acia6850_device &>(device).m_txd_handler.set_callback(object); }
@@ -47,7 +47,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( write_txc );
protected:
- acia6850_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);
+ acia6850_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-level overrides
virtual void device_start() override;
@@ -99,9 +99,9 @@ private:
devcb_write_line m_rts_handler;
devcb_write_line m_irq_handler;
- UINT8 m_status;
- UINT8 m_tdr;
- UINT8 m_rdr;
+ uint8_t m_status;
+ uint8_t m_tdr;
+ uint8_t m_rdr;
bool m_first_master_reset;
int m_dcd_irq_pending;
diff --git a/src/devices/machine/68561mpcc.cpp b/src/devices/machine/68561mpcc.cpp
index 29c5673a052..7ee3880877c 100644
--- a/src/devices/machine/68561mpcc.cpp
+++ b/src/devices/machine/68561mpcc.cpp
@@ -27,7 +27,7 @@ const device_type MPCC68561 = &device_creator<mpcc68561_t>;
IMPLEMENTATION
***************************************************************************/
-mpcc68561_t::mpcc68561_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+mpcc68561_t::mpcc68561_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, MPCC68561, "Rockwell 68561 MPCC", tag, owner, clock, "mpcc68561", __FILE__), mode(0), reg(0), status(0), IRQV(0), MasterIRQEnable(0), lastIRQStat(0), IRQType(),
intrq_cb(*this)
{
@@ -211,7 +211,7 @@ void mpcc68561_t::acknowledge()
mpcc_getreg
-------------------------------------------------*/
-UINT8 mpcc68561_t::getreg()
+uint8_t mpcc68561_t::getreg()
{
/* Not yet implemented */
#if LOG_MPCC
@@ -220,7 +220,7 @@ UINT8 mpcc68561_t::getreg()
if (reg == 0)
{
- UINT8 rv = 0;
+ uint8_t rv = 0;
Chan *ourCh = &channel[0];
@@ -241,7 +241,7 @@ UINT8 mpcc68561_t::getreg()
mpcc_putreg
-------------------------------------------------*/
-void mpcc68561_t::putreg(int ch, UINT8 data)
+void mpcc68561_t::putreg(int ch, uint8_t data)
{
Chan *pChan = &channel[ch];
@@ -367,7 +367,7 @@ void mpcc68561_t::putreg(int ch, UINT8 data)
mpcc68561_get_reg_a
-------------------------------------------------*/
-UINT8 mpcc68561_t::get_reg_a(int reg)
+uint8_t mpcc68561_t::get_reg_a(int reg)
{
return channel[0].reg_val[reg];
}
@@ -378,7 +378,7 @@ UINT8 mpcc68561_t::get_reg_a(int reg)
mpcc68561_set_reg_a
-------------------------------------------------*/
-void mpcc68561_t::set_reg_a(int reg, UINT8 data)
+void mpcc68561_t::set_reg_a(int reg, uint8_t data)
{
channel[0].reg_val[reg] = data;
}
@@ -391,7 +391,7 @@ void mpcc68561_t::set_reg_a(int reg, UINT8 data)
READ8_MEMBER( mpcc68561_t::reg_r)
{
- UINT8 result = 0;
+ uint8_t result = 0;
offset %= 4;
diff --git a/src/devices/machine/68561mpcc.h b/src/devices/machine/68561mpcc.h
index bb0bb4c2c6d..ed38b7bdb01 100644
--- a/src/devices/machine/68561mpcc.h
+++ b/src/devices/machine/68561mpcc.h
@@ -31,12 +31,12 @@ public:
IRQ_B_EXT
};
- mpcc68561_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ mpcc68561_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast<mpcc68561_t &>(device).intrq_cb.set_callback(object); }
- UINT8 get_reg_a(int reg);
- void set_reg_a(int reg, UINT8 data);
+ uint8_t get_reg_a(int reg);
+ void set_reg_a(int reg, uint8_t data);
void set_status(int status);
@@ -65,12 +65,12 @@ private:
bool syncHunt;
bool DCDEnable;
bool CTSEnable;
- UINT8 rxData;
- UINT8 txData;
+ uint8_t rxData;
+ uint8_t txData;
emu_timer *baudtimer;
- UINT8 reg_val[22];
+ uint8_t reg_val[22];
};
int mode;
@@ -89,8 +89,8 @@ private:
void initchannel(int ch);
void resetchannel(int ch);
void acknowledge();
- UINT8 getreg();
- void putreg(int ch, UINT8 data);
+ uint8_t getreg();
+ void putreg(int ch, uint8_t data);
};
/***************************************************************************
diff --git a/src/devices/machine/7200fifo.cpp b/src/devices/machine/7200fifo.cpp
index 59e659ae9b5..d8bab32e758 100644
--- a/src/devices/machine/7200fifo.cpp
+++ b/src/devices/machine/7200fifo.cpp
@@ -19,7 +19,7 @@ const device_type FIFO7200 = &device_creator<fifo7200_device>;
// fifo7200_device - constructor
//-------------------------------------------------
-fifo7200_device::fifo7200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+fifo7200_device::fifo7200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, FIFO7200, "IDT7200 FIFO", tag, owner, clock, "fifo7200", __FILE__),
m_ram_size(0), m_read_ptr(0), m_write_ptr(0), m_ef(0), m_ff(0), m_hf(0),
m_ef_handler(*this),
@@ -73,7 +73,7 @@ void fifo7200_device::device_reset()
-void fifo7200_device::fifo_write(UINT16 data)
+void fifo7200_device::fifo_write(uint16_t data)
{
if (m_ff)
{
@@ -104,7 +104,7 @@ void fifo7200_device::fifo_write(UINT16 data)
}
}
-UINT16 fifo7200_device::fifo_read()
+uint16_t fifo7200_device::fifo_read()
{
if (m_ef)
{
@@ -112,7 +112,7 @@ UINT16 fifo7200_device::fifo_read()
return 0x1ff;
}
- UINT16 ret = m_buffer[m_read_ptr];
+ uint16_t ret = m_buffer[m_read_ptr];
m_read_ptr = (m_read_ptr + 1) % m_ram_size;
// update flags
diff --git a/src/devices/machine/7200fifo.h b/src/devices/machine/7200fifo.h
index 044484de076..ea58ea0dfa7 100644
--- a/src/devices/machine/7200fifo.h
+++ b/src/devices/machine/7200fifo.h
@@ -81,7 +81,7 @@ The following chips are functionally equivalent and pin-compatible.
class fifo7200_device : public device_t
{
public:
- fifo7200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ fifo7200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_ef_handler(device_t &device, _Object object) { return downcast<fifo7200_device &>(device).m_ef_handler.set_callback(object); }
@@ -95,11 +95,11 @@ public:
// normal configuration
DECLARE_WRITE16_MEMBER( data_word_w ) { fifo_write(data); }
- DECLARE_READ16_MEMBER( data_word_r ) { return (UINT16)fifo_read(); }
+ DECLARE_READ16_MEMBER( data_word_r ) { return (uint16_t)fifo_read(); }
// use these for simple configurations that don't have d8/q8 connected
DECLARE_WRITE8_MEMBER( data_byte_w ) { fifo_write(data); }
- DECLARE_READ8_MEMBER( data_byte_r ) { return (UINT8)fifo_read(); }
+ DECLARE_READ8_MEMBER( data_byte_r ) { return (uint8_t)fifo_read(); }
protected:
// device-level overrides
@@ -107,10 +107,10 @@ protected:
virtual void device_reset() override;
private:
- void fifo_write(UINT16 data);
- UINT16 fifo_read();
+ void fifo_write(uint16_t data);
+ uint16_t fifo_read();
- std::vector<UINT16> m_buffer;
+ std::vector<uint16_t> m_buffer;
int m_ram_size;
int m_read_ptr;
diff --git a/src/devices/machine/74123.cpp b/src/devices/machine/74123.cpp
index 0263ad0eb4b..ad3cd7d2a0c 100644
--- a/src/devices/machine/74123.cpp
+++ b/src/devices/machine/74123.cpp
@@ -28,7 +28,7 @@ const device_type TTL74123 = &device_creator<ttl74123_device>;
// ttl74123_device - constructor
//-------------------------------------------------
-ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TTL74123, "74123 TTL", tag, owner, clock, "ttl74123", __FILE__), m_timer(nullptr),
m_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE),
m_res(1.0),
diff --git a/src/devices/machine/74123.h b/src/devices/machine/74123.h
index 898dd48e6ea..0fd9ad6ad70 100644
--- a/src/devices/machine/74123.h
+++ b/src/devices/machine/74123.h
@@ -96,7 +96,7 @@ class ttl74123_device : public device_t
{
public:
// construction/destruction
- ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_connection_type(device_t &device, int type) { downcast<ttl74123_device &>(device).m_connection_type = type; }
static void set_resistor_value(device_t &device, double value) { downcast<ttl74123_device &>(device).m_res = value; }
diff --git a/src/devices/machine/74145.cpp b/src/devices/machine/74145.cpp
index f85439398de..218a65829f5 100644
--- a/src/devices/machine/74145.cpp
+++ b/src/devices/machine/74145.cpp
@@ -59,7 +59,7 @@ const device_type TTL74145 = &device_creator<ttl74145_device>;
// ttl74145_device - constructor
//-------------------------------------------------
-ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TTL74145, "TTL74145", tag, owner, clock, "ttl74145", __FILE__)
, m_output_line_0_cb(*this)
, m_output_line_1_cb(*this)
@@ -111,10 +111,10 @@ void ttl74145_device::device_reset()
IMPLEMENTATION
***************************************************************************/
-void ttl74145_device::write(UINT8 data)
+void ttl74145_device::write(uint8_t data)
{
/* decode number */
- UINT16 new_number = bcd_2_dec(data & 0x0f);
+ uint16_t new_number = bcd_2_dec(data & 0x0f);
/* call output callbacks if the number changed */
if (new_number != m_number)
@@ -136,7 +136,7 @@ void ttl74145_device::write(UINT8 data)
}
-UINT16 ttl74145_device::read()
+uint16_t ttl74145_device::read()
{
return (1 << m_number) & 0x3ff;
}
diff --git a/src/devices/machine/74145.h b/src/devices/machine/74145.h
index a6472f69291..8f44de45bb1 100644
--- a/src/devices/machine/74145.h
+++ b/src/devices/machine/74145.h
@@ -54,7 +54,7 @@ class ttl74145_device : public device_t
{
public:
// construction/destruction
- ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_output_line_0_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_0_cb.set_callback(object); }
template<class _Object> static devcb_base &set_output_line_1_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_1_cb.set_callback(object); }
@@ -67,8 +67,8 @@ public:
template<class _Object> static devcb_base &set_output_line_8_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_8_cb.set_callback(object); }
template<class _Object> static devcb_base &set_output_line_9_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_9_cb.set_callback(object); }
- UINT16 read();
- void write(UINT8 data);
+ uint16_t read();
+ void write(uint8_t data);
protected:
// device-level overrides
virtual void device_start() override;
@@ -87,7 +87,7 @@ private:
devcb_write_line m_output_line_9_cb;
/* decoded number */
- UINT16 m_number;
+ uint16_t m_number;
};
// device type definition
diff --git a/src/devices/machine/74148.cpp b/src/devices/machine/74148.cpp
index 71520535f63..8786d2aa7b4 100644
--- a/src/devices/machine/74148.cpp
+++ b/src/devices/machine/74148.cpp
@@ -46,7 +46,7 @@
const device_type TTL74148 = &device_creator<ttl74148_device>;
-ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TTL74148, "74148 TTL", tag, owner, clock, "74148", __FILE__),
m_enable_input(0),
m_output(0),
diff --git a/src/devices/machine/74148.h b/src/devices/machine/74148.h
index 37ca98cf0ec..c7301e11588 100644
--- a/src/devices/machine/74148.h
+++ b/src/devices/machine/74148.h
@@ -52,7 +52,7 @@ typedef device_delegate<void (void)> ttl74148_output_delegate;
class ttl74148_device : public device_t
{
public:
- ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~ttl74148_device() {}
static void set_output_callback(device_t &device, ttl74148_output_delegate callback) { downcast<ttl74148_device &>(device).m_output_cb = callback; }
diff --git a/src/devices/machine/74153.cpp b/src/devices/machine/74153.cpp
index d5b8ad37634..591fcdedbd1 100644
--- a/src/devices/machine/74153.cpp
+++ b/src/devices/machine/74153.cpp
@@ -41,7 +41,7 @@
const device_type TTL74153 = &device_creator<ttl74153_device>;
-ttl74153_device::ttl74153_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ttl74153_device::ttl74153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TTL74153, "74153 TTL", tag, owner, clock, "74153", __FILE__),
m_a(0),
m_b(0)
diff --git a/src/devices/machine/74153.h b/src/devices/machine/74153.h
index 491fce01565..77194610742 100644
--- a/src/devices/machine/74153.h
+++ b/src/devices/machine/74153.h
@@ -47,7 +47,7 @@ typedef device_delegate<void (void)> ttl74153_output_delegate;
class ttl74153_device : public device_t
{
public:
- ttl74153_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ttl74153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~ttl74153_device() {}
static void set_output_callback(device_t &device, ttl74153_output_delegate callback) { downcast<ttl74153_device &>(device).m_output_cb = callback; }
diff --git a/src/devices/machine/74181.cpp b/src/devices/machine/74181.cpp
index a58b2cd190c..ea92cb061d5 100644
--- a/src/devices/machine/74181.cpp
+++ b/src/devices/machine/74181.cpp
@@ -26,7 +26,7 @@ const device_type TTL74181 = &device_creator<ttl74181_device>;
// ttl74181_device - constructor
//-------------------------------------------------
-ttl74181_device::ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ttl74181_device::ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, TTL74181, "74181 TTL", tag, owner, clock, "ttl74181", __FILE__),
m_a(0),
m_b(0),
@@ -98,7 +98,7 @@ void ttl74181_device::update()
m_cn = (!(m_c & bp0 & bp1 & bp2 & bp3)) | m_g;
}
-void ttl74181_device::input_a_w(UINT8 data)
+void ttl74181_device::input_a_w(uint8_t data)
{
data &= 0x0f;
@@ -109,7 +109,7 @@ void ttl74181_device::input_a_w(UINT8 data)
}
}
-void ttl74181_device::input_b_w(UINT8 data)
+void ttl74181_device::input_b_w(uint8_t data)
{
data &= 0x0f;
@@ -120,7 +120,7 @@ void ttl74181_device::input_b_w(UINT8 data)
}
}
-void ttl74181_device::select_w(UINT8 data)
+void ttl74181_device::select_w(uint8_t data)
{
data &= 0x0f;
diff --git a/src/devices/machine/74181.h b/src/devices/machine/74181.h
index 563acb3943e..d883b24995f 100644
--- a/src/devices/machine/74181.h
+++ b/src/devices/machine/74181.h
@@ -33,17 +33,17 @@ class ttl74181_device : public device_t
{
public:
// construction/destruction
- ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inputs
- void input_a_w(UINT8 data);
- void input_b_w(UINT8 data);
- void select_w(UINT8 data);
+ void input_a_w(uint8_t data);
+ void input_b_w(uint8_t data);
+ void select_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( mode_w );
DECLARE_WRITE_LINE_MEMBER( carry_w );
// outputs
- UINT8 function_r() { return m_f; }
+ uint8_t function_r() { return m_f; }
DECLARE_READ_LINE_MEMBER( carry_r ) { return m_cn; }
DECLARE_READ_LINE_MEMBER( generate_r ) { return m_g; }
DECLARE_READ_LINE_MEMBER( propagate_r ) { return m_p; }
@@ -58,14 +58,14 @@ private:
void update();
// inputs
- UINT8 m_a;
- UINT8 m_b;
- UINT8 m_s;
+ uint8_t m_a;
+ uint8_t m_b;
+ uint8_t m_s;
int m_m;
int m_c;
// outputs
- UINT8 m_f;
+ uint8_t m_f;
int m_cn;
int m_g;
int m_p;
diff --git a/src/devices/machine/7474.cpp b/src/devices/machine/7474.cpp
index 1b6ce95033d..50852c76e0c 100644
--- a/src/devices/machine/7474.cpp
+++ b/src/devices/machine/7474.cpp
@@ -55,7 +55,7 @@ const device_type TTL7474 = &device_creator<ttl7474_device>;
// ttl7474_device - constructor
//-------------------------------------------------
-ttl7474_device::ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ttl7474_device::ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TTL7474, "7474 TTL", tag, owner, clock, "7474", __FILE__),
m_output_func(*this),
m_comp_output_func(*this)
diff --git a/src/devices/machine/7474.h b/src/devices/machine/7474.h
index 15ece073ad1..7cafd0563be 100644
--- a/src/devices/machine/7474.h
+++ b/src/devices/machine/7474.h
@@ -69,7 +69,7 @@ class ttl7474_device : public device_t
{
public:
// construction/destruction
- ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_output_cb(device_t &device, _Object object) { return downcast<ttl7474_device &>(device).m_output_func.set_callback(object); }
@@ -95,19 +95,19 @@ private:
devcb_write_line m_comp_output_func;
// inputs
- UINT8 m_clear; // pin 1/13
- UINT8 m_preset; // pin 4/10
- UINT8 m_clk; // pin 3/11
- UINT8 m_d; // pin 2/12
+ uint8_t m_clear; // pin 1/13
+ uint8_t m_preset; // pin 4/10
+ uint8_t m_clk; // pin 3/11
+ uint8_t m_d; // pin 2/12
// outputs
- UINT8 m_output; // pin 5/9
- UINT8 m_output_comp; // pin 6/8
+ uint8_t m_output; // pin 5/9
+ uint8_t m_output_comp; // pin 6/8
// internal
- UINT8 m_last_clock;
- UINT8 m_last_output;
- UINT8 m_last_output_comp;
+ uint8_t m_last_clock;
+ uint8_t m_last_output;
+ uint8_t m_last_output_comp;
void update();
void init();
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp
index 72b3718c821..bbd3ea3e469 100644
--- a/src/devices/machine/8042kbdc.cpp
+++ b/src/devices/machine/8042kbdc.cpp
@@ -196,7 +196,7 @@ const device_type KBDC8042 = &device_creator<kbdc8042_device>;
// kbdc8042_device - constructor
//-------------------------------------------------
-kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, KBDC8042, "8042 Keyboard Controller", tag, owner, clock, "kbdc8042", __FILE__)
, m_keyboard_dev(*this, "at_keyboard")
, m_system_reset_cb(*this)
@@ -249,9 +249,9 @@ void kbdc8042_device::device_reset()
at_8042_set_outport(0xfe, 1);
}
-void kbdc8042_device::at_8042_set_outport(UINT8 data, int initial)
+void kbdc8042_device::at_8042_set_outport(uint8_t data, int initial)
{
- UINT8 change;
+ uint8_t change;
change = initial ? 0xFF : (m_outport ^ data);
m_outport = data;
if (change & 0x02)
@@ -267,7 +267,7 @@ WRITE_LINE_MEMBER( kbdc8042_device::keyboard_w )
at_8042_check_keyboard();
}
-void kbdc8042_device::at_8042_receive(UINT8 data)
+void kbdc8042_device::at_8042_receive(uint8_t data)
{
if (LOG_KEYBOARD)
logerror("at_8042_receive Received 0x%02x\n", data);
@@ -334,7 +334,7 @@ void kbdc8042_device::at_8042_clear_keyboard_received()
READ8_MEMBER(kbdc8042_device::data_r)
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (offset) {
case 0:
diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h
index 75ea3d4f2d8..a08279f77fa 100644
--- a/src/devices/machine/8042kbdc.h
+++ b/src/devices/machine/8042kbdc.h
@@ -54,7 +54,7 @@ class kbdc8042_device : public device_t
{
public:
// construction/destruction
- kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -71,8 +71,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( write_out2 );
DECLARE_WRITE_LINE_MEMBER( keyboard_w );
- void at_8042_set_outport(UINT8 data, int initial);
- void at_8042_receive(UINT8 data);
+ void at_8042_set_outport(uint8_t data, int initial);
+ void at_8042_receive(uint8_t data);
void at_8042_check_keyboard();
void at_8042_clear_keyboard_received();
@@ -81,7 +81,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- UINT8 m_inport, m_outport, m_data, m_command;
+ uint8_t m_inport, m_outport, m_data, m_command;
struct {
int received;
diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp
index 88cd30a3388..ee7631d241c 100644
--- a/src/devices/machine/8530scc.cpp
+++ b/src/devices/machine/8530scc.cpp
@@ -25,7 +25,7 @@ const device_type SCC8530 = &device_creator<scc8530_t>;
IMPLEMENTATION
***************************************************************************/
-scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, SCC8530, "Zilog 8530 SCC (Legacy)", tag, owner, clock, "scc8530l", __FILE__), mode(0), reg(0), status(0), IRQV(0), MasterIRQEnable(0), lastIRQStat(0), IRQType(),
intrq_cb(*this)
{
@@ -214,7 +214,7 @@ void scc8530_t::acknowledge()
scc_getareg
-------------------------------------------------*/
-UINT8 scc8530_t::getareg()
+uint8_t scc8530_t::getareg()
{
/* Not yet implemented */
#if LOG_SCC
@@ -223,7 +223,7 @@ UINT8 scc8530_t::getareg()
if (reg == 0)
{
- UINT8 rv = 0;
+ uint8_t rv = 0;
Chan *ourCh = &channel[0];
@@ -246,7 +246,7 @@ UINT8 scc8530_t::getareg()
scc_getareg
-------------------------------------------------*/
-UINT8 scc8530_t::getbreg()
+uint8_t scc8530_t::getbreg()
{
#if LOG_SCC
printf("SCC: port B reg %i read 0x%02x\n", reg, channel[1].reg_val[reg]);
@@ -254,7 +254,7 @@ UINT8 scc8530_t::getbreg()
if (reg == 0)
{
- UINT8 rv = 0;
+ uint8_t rv = 0;
Chan *ourCh = &channel[1];
@@ -285,7 +285,7 @@ UINT8 scc8530_t::getbreg()
scc_putreg
-------------------------------------------------*/
-void scc8530_t::putreg(int ch, UINT8 data)
+void scc8530_t::putreg(int ch, uint8_t data)
{
Chan *pChan = &channel[ch];
@@ -417,7 +417,7 @@ void scc8530_t::putreg(int ch, UINT8 data)
scc8530_get_reg_a
-------------------------------------------------*/
-UINT8 scc8530_t::get_reg_a(int reg)
+uint8_t scc8530_t::get_reg_a(int reg)
{
return channel[0].reg_val[reg];
}
@@ -428,7 +428,7 @@ UINT8 scc8530_t::get_reg_a(int reg)
scc8530_get_reg_b
-------------------------------------------------*/
-UINT8 scc8530_t::get_reg_b(int reg)
+uint8_t scc8530_t::get_reg_b(int reg)
{
return channel[1].reg_val[reg];
}
@@ -439,7 +439,7 @@ UINT8 scc8530_t::get_reg_b(int reg)
scc8530_set_reg_a
-------------------------------------------------*/
-void scc8530_t::set_reg_a(int reg, UINT8 data)
+void scc8530_t::set_reg_a(int reg, uint8_t data)
{
channel[0].reg_val[reg] = data;
}
@@ -450,7 +450,7 @@ void scc8530_t::set_reg_a(int reg, UINT8 data)
scc8530_set_reg_b
-------------------------------------------------*/
-void scc8530_t::set_reg_b(int reg, UINT8 data)
+void scc8530_t::set_reg_b(int reg, uint8_t data)
{
channel[1].reg_val[reg] = data;
}
@@ -474,9 +474,9 @@ READ8_MEMBER(scc8530_t::reg_r)
// port for either SCC channel.
//-------------------------------------------------
-UINT8 scc8530_t::read_reg(int offset)
+uint8_t scc8530_t::read_reg(int offset)
{
- UINT8 result = 0;
+ uint8_t result = 0;
switch(offset)
{
@@ -518,7 +518,7 @@ WRITE8_MEMBER( scc8530_t::reg_w )
// port for either SCC channel.
//-------------------------------------------------
-void scc8530_t::write_reg(int offset, UINT8 data)
+void scc8530_t::write_reg(int offset, uint8_t data)
{
//offset & 3;
diff --git a/src/devices/machine/8530scc.h b/src/devices/machine/8530scc.h
index b711f7cdabe..a13f102d1ac 100644
--- a/src/devices/machine/8530scc.h
+++ b/src/devices/machine/8530scc.h
@@ -29,22 +29,22 @@ public:
IRQ_B_EXT
};
- scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast<scc8530_t &>(device).intrq_cb.set_callback(object); }
- UINT8 get_reg_a(int reg);
- UINT8 get_reg_b(int reg);
- void set_reg_a(int reg, UINT8 data);
- void set_reg_b(int reg, UINT8 data);
+ uint8_t get_reg_a(int reg);
+ uint8_t get_reg_b(int reg);
+ void set_reg_a(int reg, uint8_t data);
+ void set_reg_b(int reg, uint8_t data);
void set_status(int status);
DECLARE_READ8_MEMBER(reg_r);
DECLARE_WRITE8_MEMBER(reg_w);
- void write_reg(int offset, UINT8 data);
- UINT8 read_reg(int offset);
+ void write_reg(int offset, uint8_t data);
+ uint8_t read_reg(int offset);
protected:
virtual void device_start() override;
@@ -68,12 +68,12 @@ private:
bool syncHunt;
bool DCDEnable;
bool CTSEnable;
- UINT8 rxData;
- UINT8 txData;
+ uint8_t rxData;
+ uint8_t txData;
emu_timer *baudtimer;
- UINT8 reg_val[16];
+ uint8_t reg_val[16];
};
int mode;
@@ -92,9 +92,9 @@ private:
void initchannel(int ch);
void resetchannel(int ch);
void acknowledge();
- UINT8 getareg();
- UINT8 getbreg();
- void putreg(int ch, UINT8 data);
+ uint8_t getareg();
+ uint8_t getbreg();
+ void putreg(int ch, uint8_t data);
};
/***************************************************************************
diff --git a/src/devices/machine/aakart.cpp b/src/devices/machine/aakart.cpp
index c7b9e260243..cd39e31bf0c 100644
--- a/src/devices/machine/aakart.cpp
+++ b/src/devices/machine/aakart.cpp
@@ -39,7 +39,7 @@ const device_type AAKART = &device_creator<aakart_device>;
// aakart_device - constructor
//-------------------------------------------------
-aakart_device::aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+aakart_device::aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AAKART, "AAKART", tag, owner, clock, "aakart", __FILE__), m_rxtimer(nullptr), m_txtimer(nullptr), m_mousetimer(nullptr), m_keybtimer(nullptr),
m_out_tx_cb(*this),
m_out_rx_cb(*this), m_tx_latch(0), m_rx(0), m_new_command(0), m_status(0), m_mouse_enable(0), m_keyb_enable(0), m_keyb_row(0), m_keyb_col(0), m_keyb_state(0)
@@ -178,7 +178,7 @@ WRITE8_MEMBER( aakart_device::write )
m_new_command |= 1;
}
-void aakart_device::send_keycode_down(UINT8 row, UINT8 col)
+void aakart_device::send_keycode_down(uint8_t row, uint8_t col)
{
//printf("keycode down\n");
m_keyb_row = row | 0xc0;
@@ -186,7 +186,7 @@ void aakart_device::send_keycode_down(UINT8 row, UINT8 col)
m_keyb_state = 1;
}
-void aakart_device::send_keycode_up(UINT8 row, UINT8 col)
+void aakart_device::send_keycode_up(uint8_t row, uint8_t col)
{
//printf("keycode up\n");
m_keyb_row = row | 0xd0;
diff --git a/src/devices/machine/aakart.h b/src/devices/machine/aakart.h
index 15eefd6bf92..9e81fb2f6b0 100644
--- a/src/devices/machine/aakart.h
+++ b/src/devices/machine/aakart.h
@@ -43,7 +43,7 @@ class aakart_device : public device_t
{
public:
// construction/destruction
- aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_out_tx_callback(device_t &device, _Object object) { return downcast<aakart_device &>(device).m_out_tx_cb.set_callback(object); }
template<class _Object> static devcb_base &set_out_rx_callback(device_t &device, _Object object) { return downcast<aakart_device &>(device).m_out_rx_cb.set_callback(object); }
@@ -51,8 +51,8 @@ public:
// I/O operations
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ8_MEMBER( read );
- void send_keycode_down(UINT8 row, UINT8 col);
- void send_keycode_up(UINT8 row, UINT8 col);
+ void send_keycode_down(uint8_t row, uint8_t col);
+ void send_keycode_up(uint8_t row, uint8_t col);
protected:
// device-level overrides
virtual void device_validity_check(validity_checker &valid) const override;
@@ -72,16 +72,16 @@ private:
devcb_write_line m_out_tx_cb;
devcb_write_line m_out_rx_cb;
- UINT8 m_tx_latch;
- //UINT8 m_rx_latch;
- UINT8 m_rx;
- UINT8 m_new_command;
- UINT8 m_status;
- UINT8 m_mouse_enable;
- UINT8 m_keyb_enable;
- UINT8 m_keyb_row;
- UINT8 m_keyb_col;
- UINT8 m_keyb_state;
+ uint8_t m_tx_latch;
+ //uint8_t m_rx_latch;
+ uint8_t m_rx;
+ uint8_t m_new_command;
+ uint8_t m_status;
+ uint8_t m_mouse_enable;
+ uint8_t m_keyb_enable;
+ uint8_t m_keyb_row;
+ uint8_t m_keyb_col;
+ uint8_t m_keyb_state;
};
diff --git a/src/devices/machine/adc0808.cpp b/src/devices/machine/adc0808.cpp
index da7b21f883e..902133161d4 100644
--- a/src/devices/machine/adc0808.cpp
+++ b/src/devices/machine/adc0808.cpp
@@ -23,7 +23,7 @@ const device_type ADC0808 = &device_creator<adc0808_device>;
// adc0808_device - constructor
//-------------------------------------------------
-adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ADC0808, "ADC0808", tag, owner, clock, "adc0808", __FILE__),
m_out_eoc_cb(*this),
m_address(0),
diff --git a/src/devices/machine/adc0808.h b/src/devices/machine/adc0808.h
index 9a863e4ef81..3bb7aa1dff8 100644
--- a/src/devices/machine/adc0808.h
+++ b/src/devices/machine/adc0808.h
@@ -80,7 +80,7 @@ class adc0808_device : public device_t
{
public:
// construction/destruction
- adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_out_eoc_callback(device_t &device, _Object object) { return downcast<adc0808_device &>(device).m_out_eoc_cb.set_callback(object); }
static void set_in_vref_pos_callback(device_t &device, adc0808_analog_read_delegate callback) { downcast<adc0808_device &>(device).m_in_vref_pos_cb = callback; }
@@ -122,7 +122,7 @@ private:
int m_eoc; // end of conversion pin
int m_next_eoc; // next value end of conversion pin
- UINT8 m_sar; // successive approximation register
+ uint8_t m_sar; // successive approximation register
int m_cycle; // clock cycle counter
int m_bit; // bit counter
diff --git a/src/devices/machine/adc083x.cpp b/src/devices/machine/adc083x.cpp
index 690c2d0e1fd..375bc442a93 100644
--- a/src/devices/machine/adc083x.cpp
+++ b/src/devices/machine/adc083x.cpp
@@ -51,7 +51,7 @@ const device_type ADC0832 = &device_creator<adc0832_device>;
const device_type ADC0834 = &device_creator<adc0834_device>;
const device_type ADC0838 = &device_creator<adc0838_device>;
-adc083x_device::adc083x_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)
+adc083x_device::adc083x_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_cs(0),
m_clk(0),
@@ -68,25 +68,25 @@ adc083x_device::adc083x_device(const machine_config &mconfig, device_type type,
{
}
-adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: adc083x_device(mconfig, ADC0831, "ADC0831", tag, owner, clock, "adc0831", __FILE__)
{
m_mux_bits = 0;
}
-adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: adc083x_device(mconfig, ADC0832, "ADC0832", tag, owner, clock, "adc0832", __FILE__)
{
m_mux_bits = 2;
}
-adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: adc083x_device(mconfig, ADC0834, "ADC0834", tag, owner, clock, "adc0834", __FILE__)
{
m_mux_bits = 3;
}
-adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: adc083x_device(mconfig, ADC0838, "ADC0838", tag, owner, clock, "adc0838", __FILE__)
{
m_mux_bits = 4;
@@ -176,7 +176,7 @@ WRITE_LINE_MEMBER( adc083x_device::cs_write )
adc083x_device::conversion
-------------------------------------------------*/
-UINT8 adc083x_device::conversion()
+uint8_t adc083x_device::conversion()
{
int result;
int positive_channel = ADC083X_AGND;
diff --git a/src/devices/machine/adc083x.h b/src/devices/machine/adc083x.h
index 6a97973acca..b8fe1268591 100644
--- a/src/devices/machine/adc083x.h
+++ b/src/devices/machine/adc083x.h
@@ -17,8 +17,8 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef device_delegate<double (UINT8 input)> adc083x_input_delegate;
-#define ADC083X_INPUT_CB(name) double name(UINT8 input)
+typedef device_delegate<double (uint8_t input)> adc083x_input_delegate;
+#define ADC083X_INPUT_CB(name) double name(uint8_t input)
#define MCFG_ADC083X_INPUT_CB(_class, _method) \
adc083x_device::set_input_callback(*device, adc083x_input_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
@@ -46,7 +46,7 @@ typedef device_delegate<double (UINT8 input)> adc083x_input_delegate;
class adc083x_device : public device_t
{
public:
- adc083x_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);
+ adc083x_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);
// static configuration helpers
static void set_input_callback(device_t &device, adc083x_input_delegate input_callback) { downcast<adc083x_device &>(device).m_input_callback = input_callback; }
@@ -62,27 +62,27 @@ protected:
// device-level overrides
virtual void device_start() override;
- INT32 m_mux_bits;
+ int32_t m_mux_bits;
private:
- UINT8 conversion();
+ uint8_t conversion();
void clear_sars();
// internal state
- INT32 m_cs;
- INT32 m_clk;
- INT32 m_di;
- INT32 m_se;
- INT32 m_sars;
- INT32 m_do;
- INT32 m_sgl;
- INT32 m_odd;
- INT32 m_sel1;
- INT32 m_sel0;
- INT32 m_state;
- INT32 m_bit;
- INT32 m_output;
+ int32_t m_cs;
+ int32_t m_clk;
+ int32_t m_di;
+ int32_t m_se;
+ int32_t m_sars;
+ int32_t m_do;
+ int32_t m_sgl;
+ int32_t m_odd;
+ int32_t m_sel1;
+ int32_t m_sel0;
+ int32_t m_state;
+ int32_t m_bit;
+ int32_t m_output;
adc083x_input_delegate m_input_callback;
};
@@ -90,7 +90,7 @@ private:
class adc0831_device : public adc083x_device
{
public:
- adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type ADC0831;
@@ -99,7 +99,7 @@ extern const device_type ADC0831;
class adc0832_device : public adc083x_device
{
public:
- adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type ADC0832;
@@ -108,7 +108,7 @@ extern const device_type ADC0832;
class adc0834_device : public adc083x_device
{
public:
- adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type ADC0834;
@@ -117,7 +117,7 @@ extern const device_type ADC0834;
class adc0838_device : public adc083x_device
{
public:
- adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type ADC0838;
diff --git a/src/devices/machine/adc1038.cpp b/src/devices/machine/adc1038.cpp
index 1f1e2fb3180..d0591c867b6 100644
--- a/src/devices/machine/adc1038.cpp
+++ b/src/devices/machine/adc1038.cpp
@@ -15,7 +15,7 @@
const device_type ADC1038 = &device_creator<adc1038_device>;
-adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ADC1038, "ADC1038", tag, owner, clock, "adc1038", __FILE__), m_cycle(0), m_clk(0), m_adr(0), m_data_in(0), m_data_out(0), m_adc_data(0), m_sars(0),
m_gticlub_hack(0)
{
diff --git a/src/devices/machine/adc1038.h b/src/devices/machine/adc1038.h
index 84e6ecf2f29..f3b74bd0290 100644
--- a/src/devices/machine/adc1038.h
+++ b/src/devices/machine/adc1038.h
@@ -26,7 +26,7 @@ typedef device_delegate<int (int input)> adc1038_input_delegate;
class adc1038_device : public device_t
{
public:
- adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~adc1038_device() {}
static void set_input_callback(device_t &device, adc1038_input_delegate callback) { downcast<adc1038_device &>(device).m_input_cb = callback; }
diff --git a/src/devices/machine/adc1213x.cpp b/src/devices/machine/adc1213x.cpp
index b3aec60a8e7..ed501313156 100644
--- a/src/devices/machine/adc1213x.cpp
+++ b/src/devices/machine/adc1213x.cpp
@@ -36,7 +36,7 @@
const device_type ADC12130 = &device_creator<adc12130_device>;
-adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: adc12138_device(mconfig, ADC12130, "ADC12130", tag, owner, clock, "adc12130", __FILE__)
{
}
@@ -44,7 +44,7 @@ adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag,
const device_type ADC12132 = &device_creator<adc12132_device>;
-adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: adc12138_device(mconfig, ADC12132, "ADC12132", tag, owner, clock, "adc12132", __FILE__)
{
}
@@ -52,11 +52,11 @@ adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag,
const device_type ADC12138 = &device_creator<adc12138_device>;
-adc12138_device::adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+adc12138_device::adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ADC12138, "ADC12138", tag, owner, clock, "adc12138", __FILE__)
{
}
-adc12138_device::adc12138_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)
+adc12138_device::adc12138_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)
{
}
diff --git a/src/devices/machine/adc1213x.h b/src/devices/machine/adc1213x.h
index 361cd3dede8..56251fdae91 100644
--- a/src/devices/machine/adc1213x.h
+++ b/src/devices/machine/adc1213x.h
@@ -17,8 +17,8 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef device_delegate<double (UINT8 input)> adc1213x_ipt_convert_delegate;
-#define ADC12138_IPT_CONVERT_CB(name) double name(UINT8 input)
+typedef device_delegate<double (uint8_t input)> adc1213x_ipt_convert_delegate;
+#define ADC12138_IPT_CONVERT_CB(name) double name(uint8_t input)
/***************************************************************************
MACROS / CONSTANTS
@@ -27,8 +27,8 @@ typedef device_delegate<double (UINT8 input)> adc1213x_ipt_convert_delegate;
class adc12138_device : public device_t
{
public:
- adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- adc12138_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);
+ adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ adc12138_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);
~adc12138_device() {}
static void set_ipt_convert_callback(device_t &device, adc1213x_ipt_convert_delegate callback) { downcast<adc12138_device &>(device).m_ipt_read_cb = callback; }
@@ -69,7 +69,7 @@ extern const device_type ADC12138;
class adc12130_device : public adc12138_device
{
public:
- adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type ADC12130;
@@ -77,7 +77,7 @@ extern const device_type ADC12130;
class adc12132_device : public adc12138_device
{
public:
- adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
extern const device_type ADC12132;
diff --git a/src/devices/machine/aicartc.cpp b/src/devices/machine/aicartc.cpp
index e4ed8fa44b0..4ca6bee31bd 100644
--- a/src/devices/machine/aicartc.cpp
+++ b/src/devices/machine/aicartc.cpp
@@ -30,7 +30,7 @@ const device_type AICARTC = &device_creator<aicartc_device>;
// aicartc_device - constructor
//-------------------------------------------------
-aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AICARTC, "AICA RTC", tag, owner, clock, "aicartc", __FILE__),
device_rtc_interface(mconfig, *this), m_rtc_reg_lo(0), m_rtc_reg_hi(0), m_rtc_tick(0), m_we(0), m_clock_timer(nullptr)
{
@@ -66,7 +66,7 @@ void aicartc_device::rtc_clock_updated(int year, int month, int day, int day_of_
const int month_to_day_conversion[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
// put the seconds
- UINT32 current_time = second;
+ uint32_t current_time = second;
// put the minutes
current_time += minute * 60;
@@ -128,7 +128,7 @@ void aicartc_device::device_timer(emu_timer &timer, device_timer_id id, int para
READ16_MEMBER( aicartc_device::read )
{
- UINT16 res;
+ uint16_t res;
res = 0;
switch(offset)
diff --git a/src/devices/machine/aicartc.h b/src/devices/machine/aicartc.h
index f923ce073ca..ba06de45db2 100644
--- a/src/devices/machine/aicartc.h
+++ b/src/devices/machine/aicartc.h
@@ -32,15 +32,15 @@ class aicartc_device : public device_t,
{
public:
// construction/destruction
- aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
DECLARE_WRITE16_MEMBER( write );
DECLARE_READ16_MEMBER( read );
- UINT16 m_rtc_reg_lo,m_rtc_reg_hi;
- UINT16 m_rtc_tick;
- UINT8 m_we;
+ uint16_t m_rtc_reg_lo,m_rtc_reg_hi;
+ uint16_t m_rtc_tick;
+ uint8_t m_we;
protected:
// device-level overrides
diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp
index 6a2772187f8..ed356996633 100644
--- a/src/devices/machine/akiko.cpp
+++ b/src/devices/machine/akiko.cpp
@@ -55,7 +55,7 @@ machine_config_constructor akiko_device::device_mconfig_additions() const
// akiko_device - constructor
//-------------------------------------------------
-akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AKIKO, "CBM AKIKO", tag, owner, clock, "akiko", __FILE__),
m_c2p_input_index(0),
m_c2p_output_index(0),
@@ -177,9 +177,9 @@ void akiko_device::device_reset()
/* create the TOC table */
if ( m_cdrom != nullptr && cdrom_get_last_track(m_cdrom) )
{
- UINT8 *p;
+ uint8_t *p;
int i, addrctrl = cdrom_get_adr_control( m_cdrom, 0 );
- UINT32 discend;
+ uint32_t discend;
discend = cdrom_get_track_start(m_cdrom,cdrom_get_last_track(m_cdrom)-1);
discend += cdrom_get_toc(m_cdrom)->tracks[cdrom_get_last_track(m_cdrom)-1].frames;
@@ -187,7 +187,7 @@ void akiko_device::device_reset()
m_cdrom_numtracks = cdrom_get_last_track(m_cdrom)+3;
- m_cdrom_toc = std::make_unique<UINT8[]>(13*m_cdrom_numtracks);
+ m_cdrom_toc = std::make_unique<uint8_t[]>(13*m_cdrom_numtracks);
memset( m_cdrom_toc.get(), 0, 13*m_cdrom_numtracks);
p = m_cdrom_toc.get();
@@ -208,7 +208,7 @@ void akiko_device::device_reset()
for( i = 0; i < cdrom_get_last_track(m_cdrom); i++ )
{
- UINT32 trackpos = cdrom_get_track_start(m_cdrom,i);
+ uint32_t trackpos = cdrom_get_track_start(m_cdrom,i);
trackpos = lba_to_msf(trackpos);
addrctrl = cdrom_get_adr_control( m_cdrom, i );
@@ -241,7 +241,7 @@ void akiko_device::device_stop()
}
}
-void akiko_device::nvram_write(UINT32 data)
+void akiko_device::nvram_write(uint32_t data)
{
m_i2c_scl_out = BIT(data, 31);
m_i2c_sda_out = BIT(data, 30);
@@ -252,9 +252,9 @@ void akiko_device::nvram_write(UINT32 data)
m_sda_w(m_i2c_sda_out);
}
-UINT32 akiko_device::nvram_read()
+uint32_t akiko_device::nvram_read()
{
- UINT32 v = 0;
+ uint32_t v = 0;
if (m_i2c_scl_dir)
v |= m_i2c_scl_out << 31;
@@ -276,7 +276,7 @@ UINT32 akiko_device::nvram_read()
*
************************************/
-void akiko_device::c2p_write(UINT32 data)
+void akiko_device::c2p_write(uint32_t data)
{
m_c2p_input_buffer[m_c2p_input_index] = data;
m_c2p_input_index++;
@@ -284,9 +284,9 @@ void akiko_device::c2p_write(UINT32 data)
m_c2p_output_index = 0;
}
-UINT32 akiko_device::c2p_read()
+uint32_t akiko_device::c2p_read()
{
- UINT32 val;
+ uint32_t val;
if ( m_c2p_output_index == 0 )
{
@@ -354,7 +354,7 @@ void akiko_device::cdda_stop()
}
}
-void akiko_device::cdda_play(UINT32 lba, UINT32 num_blocks)
+void akiko_device::cdda_play(uint32_t lba, uint32_t num_blocks)
{
if (m_cdda != nullptr)
{
@@ -383,7 +383,7 @@ void akiko_device::cdda_pause(int pause)
}
}
-UINT8 akiko_device::cdda_getstatus(UINT32 *lba)
+uint8_t akiko_device::cdda_getstatus(uint32_t *lba)
{
if ( lba ) *lba = 0;
@@ -411,7 +411,7 @@ UINT8 akiko_device::cdda_getstatus(UINT32 *lba)
return 0x15; /* no audio status */
}
-void akiko_device::set_cd_status(UINT32 status)
+void akiko_device::set_cd_status(uint32_t status)
{
amiga_state *amiga = machine().driver_data<amiga_state>();
@@ -432,7 +432,7 @@ TIMER_CALLBACK_MEMBER(akiko_device::frame_proc)
if (m_cdda != nullptr)
{
- UINT8 s = cdda_getstatus(nullptr);
+ uint8_t s = cdda_getstatus(nullptr);
if ( s == 0x11 )
{
@@ -443,9 +443,9 @@ TIMER_CALLBACK_MEMBER(akiko_device::frame_proc)
}
}
-static UINT32 lba_from_triplet( UINT8 *triplet )
+static uint32_t lba_from_triplet( uint8_t *triplet )
{
- UINT32 r;
+ uint32_t r;
r = bcd_2_dec(triplet[0]) * (60*75);
r += bcd_2_dec(triplet[1]) * 75;
@@ -456,7 +456,7 @@ static UINT32 lba_from_triplet( UINT8 *triplet )
TIMER_CALLBACK_MEMBER(akiko_device::dma_proc)
{
- UINT8 buf[2352];
+ uint8_t buf[2352];
int index;
if ( (m_cdrom_dmacontrol & 0x04000000) == 0 )
@@ -470,12 +470,12 @@ TIMER_CALLBACK_MEMBER(akiko_device::dma_proc)
if ( m_cdrom_readreqmask & ( 1 << index ) )
{
amiga_state *amiga = machine().driver_data<amiga_state>();
- UINT32 track = cdrom_get_track( m_cdrom, m_cdrom_lba_cur );
- UINT32 datasize;// = cdrom_get_toc(m_cdrom)->tracks[track].datasize;
- UINT32 subsize = cdrom_get_toc( m_cdrom )->tracks[track].subsize;
+ uint32_t track = cdrom_get_track( m_cdrom, m_cdrom_lba_cur );
+ uint32_t datasize;// = cdrom_get_toc(m_cdrom)->tracks[track].datasize;
+ uint32_t subsize = cdrom_get_toc( m_cdrom )->tracks[track].subsize;
int i;
- UINT32 curmsf = lba_to_msf( m_cdrom_lba_cur );
+ uint32_t curmsf = lba_to_msf( m_cdrom_lba_cur );
memset( buf, 0, 16 );
buf[3] = m_cdrom_lba_cur - m_cdrom_lba_start;
@@ -506,7 +506,7 @@ TIMER_CALLBACK_MEMBER(akiko_device::dma_proc)
for( i = 0; i < 2352; i += 2 )
{
- UINT16 data;
+ uint16_t data;
data = buf[i];
data <<= 8;
@@ -542,11 +542,11 @@ void akiko_device::start_dma()
m_dma_timer->adjust( attotime::from_usec( CD_SECTOR_TIME / m_cdrom_speed ) );
}
-void akiko_device::setup_response( int len, UINT8 *r1 )
+void akiko_device::setup_response( int len, uint8_t *r1 )
{
int resp_addr = m_cdrom_address[1];
- UINT8 resp_csum = 0xff;
- UINT8 resp_buffer[32];
+ uint8_t resp_csum = 0xff;
+ uint8_t resp_buffer[32];
int i;
memset( resp_buffer, 0, sizeof( resp_buffer ) );
@@ -571,8 +571,8 @@ void akiko_device::setup_response( int len, UINT8 *r1 )
TIMER_CALLBACK_MEMBER( akiko_device::cd_delayed_cmd )
{
- UINT8 resp[32];
- UINT8 cddastatus;
+ uint8_t resp[32];
+ uint8_t cddastatus;
if ( m_cdrom_status[0] & 0x10000000 )
return;
@@ -612,14 +612,14 @@ TIMER_CALLBACK_MEMBER( akiko_device::cd_delayed_cmd )
void akiko_device::update_cdrom()
{
- UINT8 resp[32], cmdbuf[32];
+ uint8_t resp[32], cmdbuf[32];
if ( m_cdrom_status[0] & 0x10000000 )
return;
while ( m_cdrom_cmd_start != m_cdrom_cmd_end )
{
- UINT32 cmd_addr = m_cdrom_address[1] + 0x200 + m_cdrom_cmd_start;
+ uint32_t cmd_addr = m_cdrom_address[1] + 0x200 + m_cdrom_cmd_start;
int cmd = m_space->read_byte( cmd_addr );
memset( resp, 0, sizeof( resp ) );
@@ -658,7 +658,7 @@ void akiko_device::update_cdrom()
else if ( cmd == 0x04 ) /* seek/read/play cd multi command */
{
int i;
- UINT32 startpos, endpos;
+ uint32_t startpos, endpos;
for( i = 0; i < 13; i++ )
{
@@ -728,7 +728,7 @@ void akiko_device::update_cdrom()
}
else if ( cmd == 0x06 ) /* read subq */
{
- UINT32 lba;
+ uint32_t lba;
resp[1] = 0x00;
@@ -736,9 +736,9 @@ void akiko_device::update_cdrom()
if ( lba > 0 )
{
- UINT32 disk_pos;
- UINT32 track_pos;
- UINT32 track;
+ uint32_t disk_pos;
+ uint32_t track_pos;
+ uint32_t track;
int addrctrl;
track = cdrom_get_track(m_cdrom, lba);
@@ -791,7 +791,7 @@ void akiko_device::update_cdrom()
READ32_MEMBER( akiko_device::read )
{
- UINT32 retval;
+ uint32_t retval;
if ( LOG_AKIKO && offset < (0x30/4) )
{
diff --git a/src/devices/machine/akiko.h b/src/devices/machine/akiko.h
index 3fd1b586fb6..6b6ccc44fca 100644
--- a/src/devices/machine/akiko.h
+++ b/src/devices/machine/akiko.h
@@ -49,7 +49,7 @@
class akiko_device : public device_t
{
public:
- akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~akiko_device() {}
// callbacks
@@ -83,10 +83,10 @@ private:
address_space *m_space;
// chunky to planar converter
- UINT32 m_c2p_input_buffer[8];
- UINT32 m_c2p_output_buffer[8];
- UINT32 m_c2p_input_index;
- UINT32 m_c2p_output_index;
+ uint32_t m_c2p_input_buffer[8];
+ uint32_t m_c2p_output_buffer[8];
+ uint32_t m_c2p_input_index;
+ uint32_t m_c2p_output_index;
// i2c bus
int m_i2c_scl_out;
@@ -95,48 +95,48 @@ private:
int m_i2c_sda_dir;
// cdrom
- UINT32 m_cdrom_status[2];
- UINT32 m_cdrom_address[2];
- UINT32 m_cdrom_track_index;
- UINT32 m_cdrom_lba_start;
- UINT32 m_cdrom_lba_end;
- UINT32 m_cdrom_lba_cur;
- UINT16 m_cdrom_readmask;
- UINT16 m_cdrom_readreqmask;
- UINT32 m_cdrom_dmacontrol;
- UINT32 m_cdrom_numtracks;
- UINT8 m_cdrom_speed;
- UINT8 m_cdrom_cmd_start;
- UINT8 m_cdrom_cmd_end;
- UINT8 m_cdrom_cmd_resp;
+ uint32_t m_cdrom_status[2];
+ uint32_t m_cdrom_address[2];
+ uint32_t m_cdrom_track_index;
+ uint32_t m_cdrom_lba_start;
+ uint32_t m_cdrom_lba_end;
+ uint32_t m_cdrom_lba_cur;
+ uint16_t m_cdrom_readmask;
+ uint16_t m_cdrom_readreqmask;
+ uint32_t m_cdrom_dmacontrol;
+ uint32_t m_cdrom_numtracks;
+ uint8_t m_cdrom_speed;
+ uint8_t m_cdrom_cmd_start;
+ uint8_t m_cdrom_cmd_end;
+ uint8_t m_cdrom_cmd_resp;
cdda_device *m_cdda;
cdrom_file *m_cdrom;
- std::unique_ptr<UINT8[]> m_cdrom_toc;
+ std::unique_ptr<uint8_t[]> m_cdrom_toc;
emu_timer *m_dma_timer;
emu_timer *m_frame_timer;
int m_cdrom_is_device;
- void nvram_write(UINT32 data);
- UINT32 nvram_read();
+ void nvram_write(uint32_t data);
+ uint32_t nvram_read();
- void c2p_write(UINT32 data);
- UINT32 c2p_read();
+ void c2p_write(uint32_t data);
+ uint32_t c2p_read();
void cdda_stop();
- void cdda_play(UINT32 lba, UINT32 num_blocks);
+ void cdda_play(uint32_t lba, uint32_t num_blocks);
void cdda_pause(int pause);
- UINT8 cdda_getstatus(UINT32 *lba);
- void set_cd_status(UINT32 status);
+ uint8_t cdda_getstatus(uint32_t *lba);
+ void set_cd_status(uint32_t status);
TIMER_CALLBACK_MEMBER( frame_proc );
TIMER_CALLBACK_MEMBER( dma_proc );
void start_dma();
- void setup_response( int len, UINT8 *r1 );
+ void setup_response( int len, uint8_t *r1 );
TIMER_CALLBACK_MEMBER( cd_delayed_cmd );
void update_cdrom();
diff --git a/src/devices/machine/am53cf96.cpp b/src/devices/machine/am53cf96.cpp
index 595a38f985b..60bfe25ddb0 100644
--- a/src/devices/machine/am53cf96.cpp
+++ b/src/devices/machine/am53cf96.cpp
@@ -146,7 +146,7 @@ WRITE8_MEMBER( am53cf96_device::write )
}
}
-am53cf96_device::am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+am53cf96_device::am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
legacy_scsi_host_adapter(mconfig, AM53CF96, "53CF96 SCSI", tag, owner, clock, "am53cf96", __FILE__),
m_irq_handler(*this)
{
@@ -174,7 +174,7 @@ void am53cf96_device::device_start()
}
// retrieve data from the SCSI controller
-void am53cf96_device::dma_read_data(int bytes, UINT8 *pData)
+void am53cf96_device::dma_read_data(int bytes, uint8_t *pData)
{
scsi_regs[REG_STATUS] |= 0x10; // indicate DMA finished
@@ -182,7 +182,7 @@ void am53cf96_device::dma_read_data(int bytes, UINT8 *pData)
}
// write data to the SCSI controller
-void am53cf96_device::dma_write_data(int bytes, UINT8 *pData)
+void am53cf96_device::dma_write_data(int bytes, uint8_t *pData)
{
// int i;
diff --git a/src/devices/machine/am53cf96.h b/src/devices/machine/am53cf96.h
index 1c078d6e3f6..ec2697bab5b 100644
--- a/src/devices/machine/am53cf96.h
+++ b/src/devices/machine/am53cf96.h
@@ -41,7 +41,7 @@ class am53cf96_device : public legacy_scsi_host_adapter
{
public:
// construction/destruction
- am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<am53cf96_device &>(device).m_irq_handler.set_callback(object); }
@@ -49,8 +49,8 @@ public:
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
- void dma_read_data(int bytes, UINT8 *pData);
- void dma_write_data(int bytes, UINT8 *pData);
+ void dma_read_data(int bytes, uint8_t *pData);
+ void dma_write_data(int bytes, uint8_t *pData);
protected:
// device-level overrides
@@ -60,11 +60,11 @@ protected:
private:
static const device_timer_id TIMER_TRANSFER = 0;
- UINT8 scsi_regs[32];
- UINT8 fifo[16];
- UINT8 fptr;
- UINT8 xfer_state;
- UINT8 last_id;
+ uint8_t scsi_regs[32];
+ uint8_t fifo[16];
+ uint8_t fptr;
+ uint8_t xfer_state;
+ uint8_t last_id;
emu_timer* m_transfer_timer;
devcb_write_line m_irq_handler;
diff --git a/src/devices/machine/am9517a.cpp b/src/devices/machine/am9517a.cpp
index 3465ee58b87..5b370560847 100644
--- a/src/devices/machine/am9517a.cpp
+++ b/src/devices/machine/am9517a.cpp
@@ -316,7 +316,7 @@ inline void am9517a_device::dma_write()
switch (MODE_TRANSFER_MASK)
{
case MODE_TRANSFER_VERIFY: {
- UINT8 v1 = m_in_memr_cb(offset);
+ uint8_t v1 = m_in_memr_cb(offset);
if(0 && m_temp != v1)
logerror("%s: verify error %02x vs. %02x\n", tag(), m_temp, v1);
break;
@@ -472,7 +472,7 @@ void am9517a_device::end_of_process()
//-------------------------------------------------
-am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
+am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
device_execute_interface(mconfig, *this),
m_icount(0),
@@ -499,7 +499,7 @@ am9517a_device::am9517a_device(const machine_config &mconfig, device_type type,
}
-am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AM9517A, "AM9517A", tag, owner, clock, "am9517a", __FILE__),
device_execute_interface(mconfig, *this),
m_icount(0),
@@ -526,12 +526,12 @@ am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, d
{
}
-upd71071_v53_device::upd71071_v53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+upd71071_v53_device::upd71071_v53_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: am9517a_device(mconfig, V53_DMAU, "V53 DMAU", tag, owner, clock, "v53_dmau")
{
}
-pcxport_dmac_device::pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pcxport_dmac_device::pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: am9517a_device(mconfig, PCXPORT_DMAC, "PC Transporter DMAC", tag, owner, clock, "pcx_dmac")
{
}
@@ -811,7 +811,7 @@ void am9517a_device::execute_run()
READ8_MEMBER( am9517a_device::read )
{
- UINT8 data = 0;
+ uint8_t data = 0;
if (!BIT(offset, 3))
{
@@ -1105,7 +1105,7 @@ void upd71071_v53_device::device_reset()
READ8_MEMBER(upd71071_v53_device::read)
{
- UINT8 ret = 0;
+ uint8_t ret = 0;
int channel = m_selected_channel;
if (LOG) logerror("DMA: read from register %02x\n",offset);
diff --git a/src/devices/machine/am9517a.h b/src/devices/machine/am9517a.h
index 764f29e12c4..fd309c935e2 100644
--- a/src/devices/machine/am9517a.h
+++ b/src/devices/machine/am9517a.h
@@ -50,8 +50,8 @@ class am9517a_device : public device_t,
public:
// construction/destruction
- am9517a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
- am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ am9517a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname);
+ am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_out_hreq_callback(device_t &device, _Object object) { return downcast<am9517a_device &>(device).m_out_hreq_cb.set_callback(object); }
template<class _Object> static devcb_base &set_out_eop_callback(device_t &device, _Object object) { return downcast<am9517a_device &>(device).m_out_eop_cb.set_callback(object); }
@@ -95,15 +95,15 @@ protected:
virtual void end_of_process();
int m_icount;
- UINT32 m_address_mask;
+ uint32_t m_address_mask;
struct
{
- UINT32 m_address;
- UINT16 m_count;
- UINT32 m_base_address;
- UINT16 m_base_count;
- UINT8 m_mode;
+ uint32_t m_address;
+ uint16_t m_count;
+ uint32_t m_base_address;
+ uint16_t m_base_count;
+ uint8_t m_mode;
} m_channel[4];
int m_msb;
@@ -114,11 +114,11 @@ protected:
int m_state;
int m_current_channel;
int m_last_channel;
- UINT8 m_command;
- UINT8 m_mask;
- UINT8 m_status;
- UINT16 m_temp;
- UINT8 m_request;
+ uint8_t m_command;
+ uint8_t m_mask;
+ uint8_t m_status;
+ uint16_t m_temp;
+ uint8_t m_request;
private:
inline void dma_request(int channel, int state);
@@ -162,7 +162,7 @@ class upd71071_v53_device : public am9517a_device
{
public:
// construction/destruction
- upd71071_v53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ upd71071_v53_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual DECLARE_READ8_MEMBER( read ) override;
virtual DECLARE_WRITE8_MEMBER( write ) override;
@@ -174,7 +174,7 @@ protected:
int m_selected_channel;
int m_base;
- UINT8 m_command_high;
+ uint8_t m_command_high;
};
@@ -183,7 +183,7 @@ class pcxport_dmac_device : public am9517a_device
{
public:
// construction/destruction
- pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual void device_reset() override;
diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp
index d71b4f458dc..81f7efd2fb5 100644
--- a/src/devices/machine/amigafdc.cpp
+++ b/src/devices/machine/amigafdc.cpp
@@ -18,7 +18,7 @@ FLOPPY_FORMATS_MEMBER( amiga_fdc::floppy_formats )
FLOPPY_ADF_FORMAT
FLOPPY_FORMATS_END
-amiga_fdc::amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+amiga_fdc::amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, AMIGA_FDC, "Amiga FDC", tag, owner, clock, "amiga_fdc", __FILE__),
m_write_index(*this), floppy(nullptr), t_gen(nullptr), dsklen(0), pre_dsklen(0), dsksync(0), dskbyt(0), adkcon(0), dmacon(0), dskpt(0), dma_value(0), dma_state(0)
{
@@ -71,7 +71,7 @@ void amiga_fdc::dma_done()
state->custom_chip_w(REG_INTREQ, INTENA_SETCLR | INTENA_DSKBLK);
}
-void amiga_fdc::dma_write(UINT16 value)
+void amiga_fdc::dma_write(uint16_t value)
{
amiga_state *state = machine().driver_data<amiga_state>();
state->chip_ram_w(dskpt, value);
@@ -85,10 +85,10 @@ void amiga_fdc::dma_write(UINT16 value)
dma_done();
}
-UINT16 amiga_fdc::dma_read()
+uint16_t amiga_fdc::dma_read()
{
amiga_state *state = machine().driver_data<amiga_state>();
- UINT16 res = state->chip_ram_r(dskpt);
+ uint16_t res = state->chip_ram_r(dskpt);
dskpt += 2;
dsklen--;
@@ -347,19 +347,19 @@ void amiga_fdc::dma_check()
}
-void amiga_fdc::adkcon_set(UINT16 data)
+void amiga_fdc::adkcon_set(uint16_t data)
{
live_sync();
adkcon = data;
live_run();
}
-UINT16 amiga_fdc::adkcon_r(void)
+uint16_t amiga_fdc::adkcon_r(void)
{
return adkcon;
}
-void amiga_fdc::dsklen_w(UINT16 data)
+void amiga_fdc::dsklen_w(uint16_t data)
{
live_sync();
if(!(data & 0x8000) || (data == pre_dsklen)) {
@@ -371,38 +371,38 @@ void amiga_fdc::dsklen_w(UINT16 data)
live_run();
}
-void amiga_fdc::dskpth_w(UINT16 data)
+void amiga_fdc::dskpth_w(uint16_t data)
{
live_sync();
dskpt = (dskpt & 0xffff) | (data << 16);
live_run();
}
-void amiga_fdc::dskptl_w(UINT16 data)
+void amiga_fdc::dskptl_w(uint16_t data)
{
live_sync();
dskpt = (dskpt & 0xffff0000) | data;
live_run();
}
-UINT16 amiga_fdc::dskpth_r()
+uint16_t amiga_fdc::dskpth_r()
{
return dskpt >> 16;
}
-UINT16 amiga_fdc::dskptl_r()
+uint16_t amiga_fdc::dskptl_r()
{
return dskpt;
}
-void amiga_fdc::dsksync_w(UINT16 data)
+void amiga_fdc::dsksync_w(uint16_t data)
{
live_sync();
dsksync = data;
live_run();
}
-void amiga_fdc::dmacon_set(UINT16 data)
+void amiga_fdc::dmacon_set(uint16_t data)
{
live_sync();
dmacon = data;
@@ -410,9 +410,9 @@ void amiga_fdc::dmacon_set(UINT16 data)
live_run();
}
-UINT16 amiga_fdc::dskbytr_r()
+uint16_t amiga_fdc::dskbytr_r()
{
- UINT16 res = dskbyt;
+ uint16_t res = dskbyt;
dskbyt &= 0x7fff;
return res;
}
@@ -484,9 +484,9 @@ WRITE8_MEMBER( amiga_fdc::ciaaprb_w )
live_run();
}
-UINT8 amiga_fdc::ciaapra_r()
+uint8_t amiga_fdc::ciaapra_r()
{
- UINT8 ret = 0x3c;
+ uint8_t ret = 0x3c;
if(floppy) {
//if(!floppy->ready_r()) fixit: seems to not work well with multiple disk drives
ret &= ~0x20;
@@ -538,7 +538,7 @@ int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, co
if(transition_time == 0xffff && !when.is_never() && etime >= when)
transition_time = counter;
if(slot < 8) {
- UINT8 mask = 1 << slot;
+ uint8_t mask = 1 << slot;
if(phase_add & mask)
counter += 258;
else if(phase_sub & mask)
@@ -562,15 +562,15 @@ int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, co
int bit = transition_time != 0xffff;
if(transition_time != 0xffff) {
- static const UINT8 pha[8] = { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 };
- static const UINT8 phs[8] = { 0, 0, 0, 0, 0x1, 0x3, 0x7, 0xf };
- static const UINT8 freqa[4][8] = {
+ static const uint8_t pha[8] = { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 };
+ static const uint8_t phs[8] = { 0, 0, 0, 0, 0x1, 0x3, 0x7, 0xf };
+ static const uint8_t freqa[4][8] = {
{ 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 },
{ 0x7, 0x3, 0x1, 0, 0, 0, 0, 0 },
{ 0x7, 0x3, 0x1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
- static const UINT8 freqs[4][8] = {
+ static const uint8_t freqs[4][8] = {
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0x1, 0x3, 0x7 },
{ 0, 0, 0, 0, 0, 0x1, 0x3, 0x7 },
@@ -624,7 +624,7 @@ bool amiga_fdc::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_devic
attotime etime = ctime+delays[slot];
if(etime > limit)
return true;
- UINT16 pre_counter = counter;
+ uint16_t pre_counter = counter;
counter += increment;
if(bit && !(pre_counter & 0x400) && (counter & 0x400))
if(write_position < ARRAY_LENGTH(write_buffer))
diff --git a/src/devices/machine/amigafdc.h b/src/devices/machine/amigafdc.h
index 2cef736e6cf..3a91a50ea15 100644
--- a/src/devices/machine/amigafdc.h
+++ b/src/devices/machine/amigafdc.h
@@ -11,24 +11,24 @@
class amiga_fdc : public device_t {
public:
- amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_index_wr_callback(device_t &device, _Object object) { return downcast<amiga_fdc &>(device).m_write_index.set_callback(object); }
DECLARE_WRITE8_MEMBER(ciaaprb_w);
- UINT8 ciaapra_r();
- UINT16 dskbytr_r();
- UINT16 dskpth_r();
- UINT16 dskptl_r();
+ uint8_t ciaapra_r();
+ uint16_t dskbytr_r();
+ uint16_t dskpth_r();
+ uint16_t dskptl_r();
- void dsksync_w(UINT16 data);
- void dskpth_w(UINT16 data);
- void dskptl_w(UINT16 data);
- void dsklen_w(UINT16 data);
- void adkcon_set(UINT16 data);
- void dmacon_set(UINT16 data);
- UINT16 adkcon_r(void);
+ void dsksync_w(uint16_t data);
+ void dskpth_w(uint16_t data);
+ void dskptl_w(uint16_t data);
+ void dsklen_w(uint16_t data);
+ void adkcon_set(uint16_t data);
+ void dmacon_set(uint16_t data);
+ uint16_t adkcon_r(void);
DECLARE_FLOPPY_FORMATS( floppy_formats );
@@ -54,12 +54,12 @@ private:
};
struct pll_t {
- UINT16 counter;
- UINT16 increment;
- UINT16 transition_time;
- UINT8 history;
- UINT8 slot;
- UINT8 phase_add, phase_sub, freq_add, freq_sub;
+ uint16_t counter;
+ uint16_t increment;
+ uint16_t transition_time;
+ uint8_t history;
+ uint8_t slot;
+ uint8_t phase_add, phase_sub, freq_add, freq_sub;
attotime ctime;
attotime delays[38];
@@ -80,7 +80,7 @@ private:
struct live_info {
attotime tm;
int state, next_state;
- UINT16 shift_reg;
+ uint16_t shift_reg;
int bit_counter;
pll_t pll;
};
@@ -93,9 +93,9 @@ private:
live_info cur_live, checkpoint_live;
emu_timer *t_gen;
- UINT16 dsklen, pre_dsklen, dsksync, dskbyt, adkcon, dmacon;
- UINT32 dskpt;
- UINT16 dma_value;
+ uint16_t dsklen, pre_dsklen, dsksync, dskbyt, adkcon, dmacon;
+ uint32_t dskpt;
+ uint16_t dma_value;
int dma_state;
@@ -104,8 +104,8 @@ private:
bool dma_enabled();
void dma_check();
void dma_done();
- void dma_write(UINT16 value);
- UINT16 dma_read();
+ void dma_write(uint16_t value);
+ uint16_t dma_read();
void live_start();
void checkpoint();
diff --git a/src/devices/machine/appldriv.cpp b/src/devices/machine/appldriv.cpp
index c5b86d071e2..43fc944eb6c 100644
--- a/src/devices/machine/appldriv.cpp
+++ b/src/devices/machine/appldriv.cpp
@@ -124,10 +124,10 @@ static void apple525_seek_disk(apple525_floppy_image_device *img, signed int ste
disk->tween_tracks = 0;
}
-static void apple525_disk_set_lines(device_t *device,device_t *image, UINT8 new_state)
+static void apple525_disk_set_lines(device_t *device,device_t *image, uint8_t new_state)
{
apple525_floppy_image_device *cur_disk;
- UINT8 old_state;
+ uint8_t old_state;
unsigned int phase;
cur_disk = get_device(image);
@@ -174,7 +174,7 @@ int apple525_get_count(device_t *device)
return cnt;
}
-void apple525_set_lines(device_t *device, UINT8 lines)
+void apple525_set_lines(device_t *device, uint8_t lines)
{
int i, count;
device_t *image;
@@ -192,9 +192,9 @@ void apple525_set_lines(device_t *device, UINT8 lines)
}
/* reads/writes a byte; write_value is -1 for read only */
-static UINT8 apple525_process_byte(device_t *img, int write_value)
+static uint8_t apple525_process_byte(device_t *img, int write_value)
{
- UINT8 read_value;
+ uint8_t read_value;
apple525_floppy_image_device *disk;
int spinfract_divisor;
int spinfract_dividend;
@@ -256,14 +256,14 @@ static device_t *apple525_selected_image(device_t *device)
return nullptr;
}
-UINT8 apple525_read_data(device_t *device)
+uint8_t apple525_read_data(device_t *device)
{
device_t *image;
image = apple525_selected_image(device);
return image ? apple525_process_byte(image, -1) : 0xFF;
}
-void apple525_write_data(device_t *device,UINT8 data)
+void apple525_write_data(device_t *device,uint8_t data)
{
device_t *image;
image = apple525_selected_image(device);
@@ -297,7 +297,7 @@ const device_type FLOPPY_APPLE = &device_creator<apple525_floppy_image_device>;
// apple525_floppy_image_device - constructor
//-------------------------------------------------
-apple525_floppy_image_device::apple525_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+apple525_floppy_image_device::apple525_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: legacy_floppy_image_device(mconfig, FLOPPY_APPLE, "Apple Disk II", tag, owner, clock, "floppy_apple", __FILE__)
{
}
diff --git a/src/devices/machine/appldriv.h b/src/devices/machine/appldriv.h
index b98d63f7748..1725c1a5814 100644
--- a/src/devices/machine/appldriv.h
+++ b/src/devices/machine/appldriv.h
@@ -15,11 +15,11 @@
#include "imagedev/flopdrv.h"
#include "formats/ap2_dsk.h"
-void apple525_set_lines(device_t *device,UINT8 lines);
+void apple525_set_lines(device_t *device,uint8_t lines);
void apple525_set_enable_lines(device_t *device,int enable_mask);
-UINT8 apple525_read_data(device_t *device);
-void apple525_write_data(device_t *device,UINT8 data);
+uint8_t apple525_read_data(device_t *device);
+void apple525_write_data(device_t *device,uint8_t data);
int apple525_read_status(device_t *device);
int apple525_get_count(running_machine &machine);
@@ -27,7 +27,7 @@ class apple525_floppy_image_device : public legacy_floppy_image_device
{
public:
// construction/destruction
- apple525_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ apple525_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual image_init_result call_load() override;
virtual void call_unload() override;
@@ -43,7 +43,7 @@ public:
unsigned int track_dirty : 1;
int position;
int spin_count; /* simulate drive spin to fool RWTS test at $BD34 */
- UINT8 track_data[APPLE2_NIBBLE_SIZE * APPLE2_SECTOR_COUNT];
+ uint8_t track_data[APPLE2_NIBBLE_SIZE * APPLE2_SECTOR_COUNT];
protected:
virtual void device_start() override;
diff --git a/src/devices/machine/applefdc.cpp b/src/devices/machine/applefdc.cpp
index 06bf5cba948..56ea8288fe3 100644
--- a/src/devices/machine/applefdc.cpp
+++ b/src/devices/machine/applefdc.cpp
@@ -105,7 +105,7 @@ enum
// ctor
//-------------------------------------------------
-applefdc_base_device::applefdc_base_device(applefdc_base_device::applefdc_t fdc_type, const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+applefdc_base_device::applefdc_base_device(applefdc_base_device::applefdc_t fdc_type, 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_type(fdc_type),
m_interface(nullptr)
@@ -199,7 +199,7 @@ int applefdc_base_device::iwm_enable2()
// iwm_readenable2handshake - hackish function
//-------------------------------------------------
-UINT8 applefdc_base_device::iwm_readenable2handshake()
+uint8_t applefdc_base_device::iwm_readenable2handshake()
{
/* R. Nabet : This function looks more like a hack than a real feature of the IWM; */
/* it is not called from the Mac Plus driver */
@@ -214,9 +214,9 @@ UINT8 applefdc_base_device::iwm_readenable2handshake()
// statusreg_r - reads the status register
//-------------------------------------------------
-UINT8 applefdc_base_device::statusreg_r()
+uint8_t applefdc_base_device::statusreg_r()
{
- UINT8 result;
+ uint8_t result;
int status;
const applefdc_interface *intf = get_interface();
@@ -243,7 +243,7 @@ UINT8 applefdc_base_device::statusreg_r()
// iwm_modereg_w - changes the mode register
//-------------------------------------------------
-void applefdc_base_device::iwm_modereg_w(UINT8 data)
+void applefdc_base_device::iwm_modereg_w(uint8_t data)
{
m_mode = data & 0x1f; /* write mode register */
@@ -257,10 +257,10 @@ void applefdc_base_device::iwm_modereg_w(UINT8 data)
// read_reg - reads a register
//-------------------------------------------------
-UINT8 applefdc_base_device::read_reg(int lines)
+uint8_t applefdc_base_device::read_reg(int lines)
{
const applefdc_interface *intf = get_interface();
- UINT8 result = 0;
+ uint8_t result = 0;
switch(lines)
{
@@ -308,7 +308,7 @@ UINT8 applefdc_base_device::read_reg(int lines)
// write_reg - writes a register
//-------------------------------------------------
-void applefdc_base_device::write_reg(UINT8 data)
+void applefdc_base_device::write_reg(uint8_t data)
{
const applefdc_interface *intf = get_interface();
@@ -441,10 +441,10 @@ void applefdc_base_device::iwm_access(int offset)
// read - reads a byte from the FDC
//-------------------------------------------------
-UINT8 applefdc_base_device::read(UINT8 offset)
+uint8_t applefdc_base_device::read(uint8_t offset)
{
const applefdc_interface *intf = get_interface();
- UINT8 result = 0;
+ uint8_t result = 0;
// normalize offset
offset &= 0xf;
@@ -504,7 +504,7 @@ UINT8 applefdc_base_device::read(UINT8 offset)
// write - writes a byte to the FDC
//-------------------------------------------------
-void applefdc_base_device::write(UINT8 offset, UINT8 data)
+void applefdc_base_device::write(uint8_t offset, uint8_t data)
{
const applefdc_interface *intf = get_interface();
@@ -553,7 +553,7 @@ void applefdc_base_device::write(UINT8 offset, UINT8 data)
// get_lines - accessor
//-------------------------------------------------
-UINT8 applefdc_base_device::get_lines()
+uint8_t applefdc_base_device::get_lines()
{
return m_lines & 0x0f;
}
@@ -566,7 +566,7 @@ UINT8 applefdc_base_device::get_lines()
const device_type APPLEFDC = &device_creator<applefdc_device>;
-applefdc_device::applefdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+applefdc_device::applefdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: applefdc_base_device(APPLEFDC_APPLE2, mconfig, APPLEFDC, "Apple FDC", tag, owner, clock, "apple_fdc", __FILE__)
{
}
@@ -579,7 +579,7 @@ applefdc_device::applefdc_device(const machine_config &mconfig, const char *tag,
const device_type IWM = &device_creator<iwm_device>;
-iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: applefdc_base_device(APPLEFDC_IWM, mconfig, IWM, "Apple IWM (Integrated Woz Machine)", tag, owner, clock, "iwm", __FILE__)
{
}
diff --git a/src/devices/machine/applefdc.h b/src/devices/machine/applefdc.h
index 7a105b777a1..872e69031ba 100644
--- a/src/devices/machine/applefdc.h
+++ b/src/devices/machine/applefdc.h
@@ -42,11 +42,11 @@ extern const device_type SWIM;
struct applefdc_interface
{
- void (*set_lines)(device_t *device, UINT8 lines);
+ void (*set_lines)(device_t *device, uint8_t lines);
void (*set_enable_lines)(device_t *device, int enable_mask);
- UINT8 (*read_data)(device_t *device);
- void (*write_data)(device_t *device, UINT8 data);
+ uint8_t (*read_data)(device_t *device);
+ void (*write_data)(device_t *device, uint8_t data);
int (*read_status)(device_t *device);
};
@@ -63,17 +63,17 @@ public:
static void static_set_config(device_t &device, const applefdc_interface *intrf) { downcast<applefdc_base_device &>(device).m_interface = intrf; }
// read/write handlers
- virtual UINT8 read(UINT8 offset);
- virtual void write(UINT8 offset, UINT8 data);
+ virtual uint8_t read(uint8_t offset);
+ virtual void write(uint8_t offset, uint8_t data);
// read/write handlers overloads
- UINT8 read(offs_t offset) { return read((UINT8) offset); }
- void write(offs_t offset, UINT8 data) { write((UINT8) offset, data); }
- DECLARE_READ8_MEMBER( read ) { return read((UINT8) offset); }
- DECLARE_WRITE8_MEMBER( write ) { write((UINT8) offset, data); }
+ uint8_t read(offs_t offset) { return read((uint8_t) offset); }
+ void write(offs_t offset, uint8_t data) { write((uint8_t) offset, data); }
+ DECLARE_READ8_MEMBER( read ) { return read((uint8_t) offset); }
+ DECLARE_WRITE8_MEMBER( write ) { write((uint8_t) offset, data); }
// accessor
- UINT8 get_lines();
+ uint8_t get_lines();
protected:
enum applefdc_t
@@ -84,7 +84,7 @@ protected:
};
// constructor
- applefdc_base_device(applefdc_t fdc_type, const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ applefdc_base_device(applefdc_t fdc_type, 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-level overrides
virtual void device_start() override;
@@ -92,7 +92,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// other protecteds
- virtual void iwm_modereg_w(UINT8 data);
+ virtual void iwm_modereg_w(uint8_t data);
private:
// data that is constant for the lifetime of the emulation
@@ -101,18 +101,18 @@ private:
const applefdc_interface *m_interface;
// data that changes at emulation time
- UINT8 m_write_byte;
- UINT8 m_lines; /* flags from IWM_MOTOR - IWM_Q7 */
- UINT8 m_mode; /* 0-31; see above */
- UINT8 m_handshake_hack; /* not sure what this is for */
+ uint8_t m_write_byte;
+ uint8_t m_lines; /* flags from IWM_MOTOR - IWM_Q7 */
+ uint8_t m_mode; /* 0-31; see above */
+ uint8_t m_handshake_hack; /* not sure what this is for */
// functions
const applefdc_interface *get_interface();
int iwm_enable2();
- UINT8 iwm_readenable2handshake();
- UINT8 statusreg_r();
- UINT8 read_reg(int lines);
- void write_reg(UINT8 data);
+ uint8_t iwm_readenable2handshake();
+ uint8_t statusreg_r();
+ uint8_t read_reg(int lines);
+ void write_reg(uint8_t data);
void turn_motor_onoff(bool status);
void iwm_access(int offset);
};
@@ -126,7 +126,7 @@ private:
class applefdc_device : public applefdc_base_device
{
public:
- applefdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ applefdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
@@ -138,7 +138,7 @@ public:
class iwm_device : public applefdc_base_device
{
public:
- iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp
index bc6900924eb..1169ad3b468 100644
--- a/src/devices/machine/at28c16.cpp
+++ b/src/devices/machine/at28c16.cpp
@@ -39,7 +39,7 @@ const device_type AT28C16 = &device_creator<at28c16_device>;
// at28c16_device - constructor
//-------------------------------------------------
-at28c16_device::at28c16_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
+at28c16_device::at28c16_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock )
: device_t(mconfig, AT28C16, "AT28C16", tag, owner, clock, "at28c16", __FILE__),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
@@ -114,7 +114,7 @@ void at28c16_device::device_reset()
void at28c16_device::nvram_default()
{
- UINT16 default_value = 0xff;
+ uint16_t default_value = 0xff;
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
space(AS_PROGRAM).write_byte( offs, default_value );
@@ -136,7 +136,7 @@ void at28c16_device::nvram_default()
void at28c16_device::nvram_read( emu_file &file )
{
- std::vector<UINT8> buffer( AT28C16_TOTAL_BYTES );
+ std::vector<uint8_t> buffer( AT28C16_TOTAL_BYTES );
file.read( &buffer[0], AT28C16_TOTAL_BYTES );
@@ -153,7 +153,7 @@ void at28c16_device::nvram_read( emu_file &file )
void at28c16_device::nvram_write( emu_file &file )
{
- std::vector<UINT8> buffer ( AT28C16_TOTAL_BYTES );
+ std::vector<uint8_t> buffer ( AT28C16_TOTAL_BYTES );
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
@@ -211,7 +211,7 @@ READ8_MEMBER( at28c16_device::read )
{
if( m_last_write >= 0 )
{
- UINT8 data = m_last_write ^ 0x80;
+ uint8_t data = m_last_write ^ 0x80;
// logerror( "%s: AT28C16: read( %04x ) write status %02x\n", machine.describe_context(), offset, data );
return data;
}
@@ -222,7 +222,7 @@ READ8_MEMBER( at28c16_device::read )
offset += AT28C16_ID_BYTES;
}
- UINT8 data = this->space(AS_PROGRAM).read_byte( offset );
+ uint8_t data = this->space(AS_PROGRAM).read_byte( offset );
// logerror( "%s: AT28C16: read( %04x ) data %02x\n", machine.describe_context(), offset, data );
return data;
}
diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h
index c33f92785e8..9cbbfdaca17 100644
--- a/src/devices/machine/at28c16.h
+++ b/src/devices/machine/at28c16.h
@@ -35,7 +35,7 @@ class at28c16_device :
{
public:
// construction/destruction
- at28c16_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock );
+ at28c16_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock );
// I/O operations
DECLARE_WRITE8_MEMBER( write );
@@ -65,7 +65,7 @@ protected:
int m_a9_12v;
int m_oe_12v;
int m_last_write;
- optional_region_ptr<UINT8> m_default_data;
+ optional_region_ptr<uint8_t> m_default_data;
};
diff --git a/src/devices/machine/at29x.cpp b/src/devices/machine/at29x.cpp
index bb2bdd8b8b9..0842a32a7dc 100644
--- a/src/devices/machine/at29x.cpp
+++ b/src/devices/machine/at29x.cpp
@@ -54,7 +54,7 @@ enum
Constructor for all variants
*/
-at29x_device::at29x_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)
+at29x_device::at29x_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_nvram_interface(mconfig, *this),
m_memory_size(0), // bytes
@@ -70,7 +70,7 @@ at29x_device::at29x_device(const machine_config &mconfig, device_type type, cons
/*
Constructor for AT29C020
*/
-at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: at29x_device(mconfig, AT29C020, "ATMEL 29C020 256K x 8 FEEPROM", tag, owner, clock, "at29c020", __FILE__)
{
m_memory_size = 256*1024;
@@ -81,7 +81,7 @@ at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag,
/*
Constructor for AT29C040
*/
-at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: at29x_device(mconfig, AT29C040, "ATMEL 29C040 512K x 8 FEEPROM", tag, owner, clock, "at29c040", __FILE__)
{
m_memory_size = 512*1024;
@@ -92,7 +92,7 @@ at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag,
/*
Constructor for AT29C040A
*/
-at29c040a_device::at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at29c040a_device::at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: at29x_device(mconfig, AT29C040A, "ATMEL 29C040A 512K x 8 FEEPROM", tag, owner, clock, "at29c040a", __FILE__)
{
m_memory_size = 512*1024;
@@ -479,8 +479,8 @@ WRITE8_MEMBER( at29x_device::write )
void at29x_device::device_start(void)
{
- m_programming_buffer = std::make_unique<UINT8[]>(m_sector_size);
- m_eememory = std::make_unique<UINT8[]>(m_memory_size+2);
+ m_programming_buffer = std::make_unique<uint8_t[]>(m_sector_size);
+ m_eememory = std::make_unique<uint8_t[]>(m_memory_size+2);
m_programming_timer = timer_alloc(PRGTIMER);
// TODO: Complete 16-bit handling
diff --git a/src/devices/machine/at29x.h b/src/devices/machine/at29x.h
index 924a17e0f70..ca37c31b0db 100644
--- a/src/devices/machine/at29x.h
+++ b/src/devices/machine/at29x.h
@@ -34,7 +34,7 @@ enum s_pgm_t
class at29x_device : public device_t, public device_nvram_interface
{
public:
- at29x_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);
+ at29x_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);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -63,7 +63,7 @@ protected:
private:
void sync_flags(void);
- std::unique_ptr<UINT8[]> m_eememory;
+ std::unique_ptr<uint8_t[]> m_eememory;
bool m_lower_bbl; // set when lower boot block lockout is enabled
bool m_higher_bbl; // set when upper boot block lockout is enabled
@@ -78,7 +78,7 @@ private:
bool m_disabling_sdb; // set when a sdp disable command is in progress
bool m_toggle_bit; // indicates flashing in progress (toggles for each query)
- std::unique_ptr<UINT8[]> m_programming_buffer;
+ std::unique_ptr<uint8_t[]> m_programming_buffer;
int m_programming_last_offset;
emu_timer* m_programming_timer;
};
@@ -89,19 +89,19 @@ private:
class at29c020_device : public at29x_device
{
public:
- at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class at29c040_device : public at29x_device
{
public:
- at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class at29c040a_device : public at29x_device
{
public:
- at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
#define MCFG_AT29C020_ADD(_tag ) \
diff --git a/src/devices/machine/at45dbxx.cpp b/src/devices/machine/at45dbxx.cpp
index 8b127986679..13255b298e0 100644
--- a/src/devices/machine/at45dbxx.cpp
+++ b/src/devices/machine/at45dbxx.cpp
@@ -45,7 +45,7 @@ const device_type AT45DB161 = &device_creator<at45db161_device>;
// at45db041_device - constructor
//-------------------------------------------------
-at45db041_device::at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at45db041_device::at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AT45DB041, "AT45DB041", tag, owner, clock, "at45db041", __FILE__),
device_nvram_interface(mconfig, *this),
write_so(*this)
@@ -53,7 +53,7 @@ at45db041_device::at45db041_device(const machine_config &mconfig, const char *ta
}
-at45db041_device::at45db041_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)
+at45db041_device::at45db041_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_nvram_interface(mconfig, *this),
write_so(*this)
@@ -61,13 +61,13 @@ at45db041_device::at45db041_device(const machine_config &mconfig, device_type ty
}
-at45db081_device::at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at45db081_device::at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: at45db041_device(mconfig, AT45DB081, "AT45DB081", tag, owner, clock, "at45db081", __FILE__)
{
}
-at45db161_device::at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at45db161_device::at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: at45db041_device(mconfig, AT45DB161, "AT45DB161", tag, owner, clock, "at45db161", __FILE__)
{
}
@@ -147,7 +147,7 @@ void at45db041_device::nvram_default()
memory_region *region = memregion(DEVICE_SELF);
if (region != nullptr)
{
- UINT32 bytes = region->bytes();
+ uint32_t bytes = region->bytes();
if (bytes > m_size)
bytes = m_size;
@@ -175,9 +175,9 @@ void at45db041_device::nvram_write(emu_file &file)
file.write(&m_data[0], m_size);
}
-UINT8 at45db041_device::read_byte()
+uint8_t at45db041_device::read_byte()
{
- UINT8 data;
+ uint8_t data;
// check mode
if ((m_mode != FLASH_MODE_SO) || (!m_io.data)) return 0;
// read byte
@@ -187,46 +187,46 @@ UINT8 at45db041_device::read_byte()
return data;
}
-void at45db041_device::flash_set_io(UINT8* data, UINT32 size, UINT32 pos)
+void at45db041_device::flash_set_io(uint8_t* data, uint32_t size, uint32_t pos)
{
m_io.data = data;
m_io.size = size;
m_io.pos = pos;
}
-UINT32 at45db041_device::flash_get_page_addr()
+uint32_t at45db041_device::flash_get_page_addr()
{
return ((m_cmd.data[1] & 0x0F) << 7) | ((m_cmd.data[2] & 0xFE) >> 1);
}
-UINT32 at45db041_device::flash_get_byte_addr()
+uint32_t at45db041_device::flash_get_byte_addr()
{
return ((m_cmd.data[2] & 0x01) << 8) | ((m_cmd.data[3] & 0xFF) >> 0);
}
-UINT32 at45db081_device::flash_get_page_addr()
+uint32_t at45db081_device::flash_get_page_addr()
{
return ((m_cmd.data[1] & 0x1F) << 7) | ((m_cmd.data[2] & 0xFE) >> 1);
}
-UINT32 at45db161_device::flash_get_page_addr()
+uint32_t at45db161_device::flash_get_page_addr()
{
return ((m_cmd.data[1] & 0x3F) << 6) | ((m_cmd.data[2] & 0xFC) >> 2);
}
-UINT32 at45db161_device::flash_get_byte_addr()
+uint32_t at45db161_device::flash_get_byte_addr()
{
return ((m_cmd.data[2] & 0x03) << 8) | ((m_cmd.data[3] & 0xFF) >> 0);
}
-void at45db041_device::write_byte(UINT8 data)
+void at45db041_device::write_byte(uint8_t data)
{
// check mode
if (m_mode != FLASH_MODE_SI) return;
// process byte
if (m_cmd.size < 8)
{
- UINT8 opcode;
+ uint8_t opcode;
_logerror( 2, ("at45dbxx_write_byte (%02X)\n", data));
// add to command buffer
m_cmd.data[m_cmd.size++] = data;
@@ -254,8 +254,8 @@ void at45db041_device::write_byte(UINT8 data)
// 8 bits command + 4 bits reserved + 11 bits page address + 9 bits don't care
if (m_cmd.size == 4)
{
- UINT32 page;
- UINT8 comp;
+ uint32_t page;
+ uint8_t comp;
page = flash_get_page_addr();
_logerror( 1, ("at45dbxx opcode %02X - main memory page to buffer 1 compare [%04X]\n", opcode, page));
comp = memcmp( &m_data[page * page_size()], &m_buffer1[0], page_size()) == 0 ? 0 : 1;
@@ -272,7 +272,7 @@ void at45db041_device::write_byte(UINT8 data)
// 8 bits command + 4 bits reserved + 11 bits page address + 9 bits buffer address + 32 bits don't care
if (m_cmd.size == 8)
{
- UINT32 page, byte;
+ uint32_t page, byte;
page = flash_get_page_addr();
byte = flash_get_byte_addr();
_logerror( 1, ("at45dbxx opcode %02X - main memory page read [%04X/%04X]\n", opcode, page, byte));
@@ -288,7 +288,7 @@ void at45db041_device::write_byte(UINT8 data)
// 8 bits command + 4 bits reserved + 11 bits page address + 9 bits buffer address
if (m_cmd.size == 4)
{
- UINT32 page, byte;
+ uint32_t page, byte;
page = flash_get_page_addr();
byte = flash_get_byte_addr();
_logerror( 1, ("at45dbxx opcode %02X - main memory page program through buffer 1 [%04X/%04X]\n",opcode, page, byte));
@@ -341,7 +341,7 @@ WRITE_LINE_MEMBER(at45db041_device::cs_w)
// complete program command
if ((m_cmd.size >= 4) && (m_cmd.data[0] == FLASH_CMD_82))
{
- UINT32 page, byte;
+ uint32_t page, byte;
page = flash_get_page_addr();
byte = flash_get_byte_addr();
_logerror( 1, ("at45dbxx - program data stored in buffer 1 into selected page in main memory [%04X/%04X]\n", page, byte));
diff --git a/src/devices/machine/at45dbxx.h b/src/devices/machine/at45dbxx.h
index 449d95f9651..85425cd1ded 100644
--- a/src/devices/machine/at45dbxx.h
+++ b/src/devices/machine/at45dbxx.h
@@ -41,15 +41,15 @@ class at45db041_device : public device_t,
public device_nvram_interface
{
public:
- at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- at45db041_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);
+ at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ at45db041_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);
DECLARE_WRITE_LINE_MEMBER(cs_w);
DECLARE_WRITE_LINE_MEMBER(sck_w);
DECLARE_WRITE_LINE_MEMBER(si_w);
DECLARE_READ_LINE_MEMBER(so_r);
- UINT8 *get_ptr() { return &m_data[0]; }
+ uint8_t *get_ptr() { return &m_data[0]; }
template<class _Object> static devcb_base &set_so_cb(device_t &device, _Object object) { return downcast<at45db041_device &>(device).write_so.set_callback(object); }
devcb_write_line write_so;
@@ -67,25 +67,25 @@ protected:
protected:
virtual int num_pages() const { return 2048; }
virtual int page_size() const { return 264; }
- virtual UINT8 device_id() const { return 0x18; }
+ virtual uint8_t device_id() const { return 0x18; }
- UINT8 read_byte();
- void flash_set_io(UINT8* data, UINT32 size, UINT32 pos);
- virtual UINT32 flash_get_page_addr();
- virtual UINT32 flash_get_byte_addr();
- void write_byte(UINT8 data);
+ uint8_t read_byte();
+ void flash_set_io(uint8_t* data, uint32_t size, uint32_t pos);
+ virtual uint32_t flash_get_page_addr();
+ virtual uint32_t flash_get_byte_addr();
+ void write_byte(uint8_t data);
// internal state
- std::vector<UINT8> m_data;
- UINT32 m_size;
- UINT8 m_mode;
- UINT8 m_status;
- std::vector<UINT8> m_buffer1;
- //std::vector<UINT8> m_buffer2;
- UINT8 m_si_byte;
- UINT8 m_si_bits;
- UINT8 m_so_byte;
- UINT8 m_so_bits;
+ std::vector<uint8_t> m_data;
+ uint32_t m_size;
+ uint8_t m_mode;
+ uint8_t m_status;
+ std::vector<uint8_t> m_buffer1;
+ //std::vector<uint8_t> m_buffer2;
+ uint8_t m_si_byte;
+ uint8_t m_si_bits;
+ uint8_t m_so_byte;
+ uint8_t m_so_bits;
struct AT45DBXX_PINS
{
@@ -100,15 +100,15 @@ protected:
struct AT45DBXX_IO
{
- UINT8 *data;
- UINT32 size;
- UINT32 pos;
+ uint8_t *data;
+ uint32_t size;
+ uint32_t pos;
} m_io;
struct AT45DBXX_CMD
{
- UINT8 data[8];
- UINT8 size;
+ uint8_t data[8];
+ uint8_t size;
} m_cmd;
};
@@ -117,14 +117,14 @@ protected:
class at45db081_device : public at45db041_device
{
public:
- at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual int num_pages() const override { return 4096; }
virtual int page_size() const override { return 264; }
- virtual UINT8 device_id() const override { return 0x20; }
+ virtual uint8_t device_id() const override { return 0x20; }
- virtual UINT32 flash_get_page_addr() override;
+ virtual uint32_t flash_get_page_addr() override;
};
// ======================> at45db161_device
@@ -132,15 +132,15 @@ protected:
class at45db161_device : public at45db041_device
{
public:
- at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual int num_pages() const override { return 4096; }
virtual int page_size() const override { return 528; }
- virtual UINT8 device_id() const override { return 0x28; }
+ virtual uint8_t device_id() const override { return 0x28; }
- virtual UINT32 flash_get_page_addr() override;
- virtual UINT32 flash_get_byte_addr() override;
+ virtual uint32_t flash_get_page_addr() override;
+ virtual uint32_t flash_get_byte_addr() override;
};
diff --git a/src/devices/machine/at_keybc.cpp b/src/devices/machine/at_keybc.cpp
index f6e5b76283c..56b3907e638 100644
--- a/src/devices/machine/at_keybc.cpp
+++ b/src/devices/machine/at_keybc.cpp
@@ -58,7 +58,7 @@ ROM_END
// at_keyboard_controller_device - constructor
//-------------------------------------------------
-at_keyboard_controller_device::at_keyboard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+at_keyboard_controller_device::at_keyboard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AT_KEYBOARD_CONTROLLER, "AT Keyboard Controller", tag, owner, clock, "at_keybc", __FILE__),
m_cpu(nullptr),
m_system_reset_cb(*this),
diff --git a/src/devices/machine/at_keybc.h b/src/devices/machine/at_keybc.h
index 5854f0f4f5d..591b43f9d89 100644
--- a/src/devices/machine/at_keybc.h
+++ b/src/devices/machine/at_keybc.h
@@ -47,7 +47,7 @@ class at_keyboard_controller_device : public device_t
{
public:
// construction/destruction
- at_keyboard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ at_keyboard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_system_reset_callback(device_t &device, _Object object) { return downcast<at_keyboard_controller_device &>(device).m_system_reset_cb.set_callback(object); }
template<class _Object> static devcb_base &set_gate_a20_callback(device_t &device, _Object object) { return downcast<at_keyboard_controller_device &>(device).m_gate_a20_cb.set_callback(object); }
@@ -96,8 +96,8 @@ private:
devcb_write_line m_keyboard_clock_cb;
devcb_write_line m_keyboard_data_cb;
- UINT8 m_clock_signal;
- UINT8 m_data_signal;
+ uint8_t m_clock_signal;
+ uint8_t m_data_signal;
};
diff --git a/src/devices/machine/atadev.h b/src/devices/machine/atadev.h
index 3b96a6b580c..d889bc8f346 100644
--- a/src/devices/machine/atadev.h
+++ b/src/devices/machine/atadev.h
@@ -23,11 +23,11 @@ public:
ata_device_interface(const machine_config &mconfig, device_t &device);
virtual ~ata_device_interface() {}
- virtual UINT16 read_dma() = 0;
+ virtual uint16_t read_dma() = 0;
virtual DECLARE_READ16_MEMBER(read_cs0) = 0;
virtual DECLARE_READ16_MEMBER(read_cs1) = 0;
- virtual void write_dma(UINT16 data) = 0;
+ virtual void write_dma(uint16_t data) = 0;
virtual DECLARE_WRITE16_MEMBER(write_cs0) = 0;
virtual DECLARE_WRITE16_MEMBER(write_cs1) = 0;
virtual DECLARE_WRITE_LINE_MEMBER(write_dmack) = 0;
diff --git a/src/devices/machine/ataflash.cpp b/src/devices/machine/ataflash.cpp
index a7491f1eb1e..7ff624a5421 100644
--- a/src/devices/machine/ataflash.cpp
+++ b/src/devices/machine/ataflash.cpp
@@ -8,7 +8,7 @@
const device_type ATA_FLASH_PCCARD = &device_creator<ata_flash_pccard_device>;
-ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
ide_hdd_device(mconfig, ATA_FLASH_PCCARD, "ATA Flash PCCARD", tag, owner, clock, "ataflash", __FILE__), m_gnetreadlock(0), m_locked(0)
{
}
@@ -25,7 +25,7 @@ void ata_flash_pccard_device::device_reset()
{
ide_hdd_device::device_reset();
- UINT32 metalength;
+ uint32_t metalength;
memset(m_key, 0, sizeof(m_key));
memset(m_cis, 0xff, 512);
@@ -99,9 +99,9 @@ WRITE16_MEMBER( ata_flash_pccard_device::write_reg )
{
if(offset >= 0x280 && offset <= 0x288 && m_handle != nullptr)
{
- UINT8 v = data;
+ uint8_t v = data;
int pos = offset - 0x280;
- UINT8 k = pos < sizeof(m_key) ? m_key[pos] : 0;
+ uint8_t k = pos < sizeof(m_key) ? m_key[pos] : 0;
if(v == k)
{
diff --git a/src/devices/machine/ataflash.h b/src/devices/machine/ataflash.h
index e0504b2f180..d54d09d552b 100644
--- a/src/devices/machine/ataflash.h
+++ b/src/devices/machine/ataflash.h
@@ -14,7 +14,7 @@ class ata_flash_pccard_device : public ide_hdd_device,
public pccard_interface
{
public:
- ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual DECLARE_READ16_MEMBER(read_memory) override;
virtual DECLARE_WRITE16_MEMBER(write_memory) override;
@@ -32,9 +32,9 @@ protected:
virtual bool is_ready() override;
private:
- UINT8 m_cis[512];
- UINT8 m_key[5];
- UINT8 m_gnetreadlock;
+ uint8_t m_cis[512];
+ uint8_t m_key[5];
+ uint8_t m_gnetreadlock;
int m_locked;
};
diff --git a/src/devices/machine/atahle.cpp b/src/devices/machine/atahle.cpp
index ce25fdcd679..df2714dd407 100644
--- a/src/devices/machine/atahle.cpp
+++ b/src/devices/machine/atahle.cpp
@@ -39,7 +39,7 @@ enum
#define DEVICE1_PDIAG_TIME (attotime::from_msec(2))
#define DIAGNOSTIC_TIME (attotime::from_msec(2))
-ata_hle_device::ata_hle_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)
+ata_hle_device::ata_hle_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),
ata_device_interface(mconfig, *this),
device_slot_card_interface(mconfig, *this),
@@ -326,7 +326,7 @@ bool ata_hle_device::set_features()
return false;
}
-int ata_hle_device::bit_to_mode(UINT16 word)
+int ata_hle_device::bit_to_mode(uint16_t word)
{
switch (word>>8)
{
@@ -369,10 +369,10 @@ int ata_hle_device::ultra_dma_mode()
return bit_to_mode(m_identify_buffer[88]);
}
-UINT16 ata_hle_device::read_data()
+uint16_t ata_hle_device::read_data()
{
/* fetch the correct amount of data */
- UINT16 result = m_buffer[m_buffer_offset++];
+ uint16_t result = m_buffer[m_buffer_offset++];
if (!m_8bit_data_transfers)
result |= m_buffer[m_buffer_offset++] << 8;
@@ -386,7 +386,7 @@ UINT16 ata_hle_device::read_data()
return result;
}
-void ata_hle_device::write_data(UINT16 data)
+void ata_hle_device::write_data(uint16_t data)
{
/* store the correct amount of data */
m_buffer[m_buffer_offset++] = data;
@@ -542,9 +542,9 @@ WRITE_LINE_MEMBER( ata_hle_device::write_pdiag )
}
}
-UINT16 ata_hle_device::read_dma()
+uint16_t ata_hle_device::read_dma()
{
- UINT16 result = 0xffff;
+ uint16_t result = 0xffff;
if (device_selected())
{
@@ -590,7 +590,7 @@ READ16_MEMBER( ata_hle_device::read_cs0 )
// if (offset != IDE_CS0_DATA_RW && offset != IDE_CS0_STATUS_R)
LOG(("%s:IDE cs0 read at %X, mem_mask=%d\n", machine().describe_context(), offset, mem_mask));
- UINT16 result = 0xffff;
+ uint16_t result = 0xffff;
if (device_selected() || m_single_device)
{
@@ -708,7 +708,7 @@ READ16_MEMBER( ata_hle_device::read_cs1 )
// if (offset != IDE_CS1_ALTERNATE_STATUS_R)
LOG(("%s:IDE cs1 read at %X, mem_mask=%d\n", machine().describe_context(), offset, mem_mask));
- UINT16 result = 0xffff;
+ uint16_t result = 0xffff;
if (device_selected() || m_single_device)
{
@@ -768,7 +768,7 @@ READ16_MEMBER( ata_hle_device::read_cs1 )
return result;
}
-void ata_hle_device::write_dma( UINT16 data )
+void ata_hle_device::write_dma( uint16_t data )
{
if (device_selected())
{
@@ -827,7 +827,7 @@ WRITE16_MEMBER( ata_hle_device::write_cs0 )
}
else
{
- UINT8 old;
+ uint8_t old;
switch (offset)
{
@@ -926,7 +926,7 @@ WRITE16_MEMBER( ata_hle_device::write_cs1 )
}
else
{
- UINT8 old;
+ uint8_t old;
switch (offset)
{
diff --git a/src/devices/machine/atahle.h b/src/devices/machine/atahle.h
index 29bc23bf9cd..82189c6b536 100644
--- a/src/devices/machine/atahle.h
+++ b/src/devices/machine/atahle.h
@@ -20,13 +20,13 @@ class ata_hle_device : public device_t,
public device_slot_card_interface
{
public:
- ata_hle_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);
+ ata_hle_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);
- virtual UINT16 read_dma() override;
+ virtual uint16_t read_dma() override;
virtual DECLARE_READ16_MEMBER(read_cs0) override;
virtual DECLARE_READ16_MEMBER(read_cs1) override;
- virtual void write_dma(UINT16 data) override;
+ virtual void write_dma(uint16_t data) override;
virtual DECLARE_WRITE16_MEMBER(write_cs0) override;
virtual DECLARE_WRITE16_MEMBER(write_cs1) override;
virtual DECLARE_WRITE_LINE_MEMBER(write_csel) override;
@@ -49,7 +49,7 @@ protected:
int dev() { return (m_device_head & IDE_DEVICE_HEAD_DRV) >> 4; }
bool device_selected() { return m_csel == dev(); }
- virtual UINT8 calculate_status() { return m_status; }
+ virtual uint8_t calculate_status() { return m_status; }
virtual void soft_reset();
virtual void process_command();
virtual void finished_command();
@@ -60,10 +60,10 @@ protected:
virtual bool is_ready() = 0;
virtual void perform_diagnostic() = 0;
virtual void signature() = 0;
- virtual UINT16 read_data();
- virtual void write_data(UINT16 data);
+ virtual uint16_t read_data();
+ virtual void write_data(uint16_t data);
- int bit_to_mode(UINT16 word);
+ int bit_to_mode(uint16_t word);
int single_word_dma_mode();
int multi_word_dma_mode();
int ultra_dma_mode();
@@ -175,21 +175,21 @@ protected:
attotime MINIMUM_COMMAND_TIME;
- std::vector<UINT8> m_buffer;
- UINT16 m_buffer_offset;
- UINT16 m_buffer_size;
- UINT8 m_error;
- UINT8 m_feature;
- UINT16 m_sector_count;
- UINT8 m_sector_number;
- UINT8 m_cylinder_low;
- UINT8 m_cylinder_high;
- UINT8 m_device_head;
- UINT8 m_status;
- UINT8 m_command;
- UINT8 m_device_control;
-
- UINT16 m_identify_buffer[256];
+ std::vector<uint8_t> m_buffer;
+ uint16_t m_buffer_offset;
+ uint16_t m_buffer_size;
+ uint8_t m_error;
+ uint8_t m_feature;
+ uint16_t m_sector_count;
+ uint8_t m_sector_number;
+ uint8_t m_cylinder_low;
+ uint8_t m_cylinder_high;
+ uint8_t m_device_head;
+ uint8_t m_status;
+ uint8_t m_command;
+ uint8_t m_device_control;
+
+ uint16_t m_identify_buffer[256];
bool m_revert_to_defaults;
bool m_8bit_data_transfers;
diff --git a/src/devices/machine/ataintf.cpp b/src/devices/machine/ataintf.cpp
index b9c51351e71..7ec7dd8838d 100644
--- a/src/devices/machine/ataintf.cpp
+++ b/src/devices/machine/ataintf.cpp
@@ -122,9 +122,9 @@ WRITE_LINE_MEMBER( ata_interface_device::pdiag1_write_line )
*
*************************************/
-UINT16 ata_interface_device::read_dma()
+uint16_t ata_interface_device::read_dma()
{
- UINT16 result = 0xffff;
+ uint16_t result = 0xffff;
for (auto & elem : m_slot)
if (elem->dev() != nullptr)
result &= elem->dev()->read_dma();
@@ -135,7 +135,7 @@ UINT16 ata_interface_device::read_dma()
READ16_MEMBER( ata_interface_device::read_cs0 )
{
- UINT16 result = mem_mask;
+ uint16_t result = mem_mask;
for (auto & elem : m_slot)
if (elem->dev() != nullptr)
result &= elem->dev()->read_cs0(space, offset, mem_mask);
@@ -149,7 +149,7 @@ READ16_MEMBER( ata_interface_device::read_cs0 )
READ16_MEMBER( ata_interface_device::read_cs1 )
{
- UINT16 result = mem_mask;
+ uint16_t result = mem_mask;
for (auto & elem : m_slot)
if (elem->dev() != nullptr)
result &= elem->dev()->read_cs1(space, offset, mem_mask);
@@ -166,7 +166,7 @@ READ16_MEMBER( ata_interface_device::read_cs1 )
*
*************************************/
-void ata_interface_device::write_dma( UINT16 data )
+void ata_interface_device::write_dma( uint16_t data )
{
// printf( "%s: write_dma %04x\n", machine().describe_context(), data );
@@ -207,7 +207,7 @@ SLOT_INTERFACE_START(ata_devices)
SLOT_INTERFACE("cdrom", ATAPI_CDROM)
SLOT_INTERFACE_END
-ata_interface_device::ata_interface_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) :
+ata_interface_device::ata_interface_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_irq_handler(*this),
m_dmarq_handler(*this),
@@ -217,7 +217,7 @@ ata_interface_device::ata_interface_device(const machine_config &mconfig, device
const device_type ATA_INTERFACE = &device_creator<ata_interface_device>;
-ata_interface_device::ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ata_interface_device::ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ATA_INTERFACE, "ATA Interface", tag, owner, clock, "ata_interface", __FILE__),
m_irq_handler(*this),
m_dmarq_handler(*this),
@@ -296,7 +296,7 @@ const device_type ATA_SLOT = &device_creator<ata_slot_device>;
// ata_slot_device - constructor
//-------------------------------------------------
-ata_slot_device::ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ata_slot_device::ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATA_SLOT, "ATA Connector", tag, owner, clock, "ata_slot", __FILE__),
device_slot_interface(mconfig, *this),
m_dev(nullptr)
diff --git a/src/devices/machine/ataintf.h b/src/devices/machine/ataintf.h
index d1752d5923b..018796414ff 100644
--- a/src/devices/machine/ataintf.h
+++ b/src/devices/machine/ataintf.h
@@ -26,7 +26,7 @@ class ata_slot_device : public device_t,
{
public:
// construction/destruction
- ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
ata_device_interface *dev() { return m_dev; }
protected:
@@ -77,18 +77,18 @@ SLOT_INTERFACE_EXTERN(ata_devices);
class ata_interface_device : public device_t
{
public:
- ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- ata_interface_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);
+ ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ata_interface_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);
// static configuration helpers
template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<ata_interface_device &>(device).m_irq_handler.set_callback(object); }
template<class _Object> static devcb_base &set_dmarq_handler(device_t &device, _Object object) { return downcast<ata_interface_device &>(device).m_dmarq_handler.set_callback(object); }
template<class _Object> static devcb_base &set_dasp_handler(device_t &device, _Object object) { return downcast<ata_interface_device &>(device).m_dasp_handler.set_callback(object); }
- UINT16 read_dma();
+ uint16_t read_dma();
virtual DECLARE_READ16_MEMBER(read_cs0);
virtual DECLARE_READ16_MEMBER(read_cs1);
- void write_dma(UINT16 data);
+ void write_dma(uint16_t data);
virtual DECLARE_WRITE16_MEMBER(write_cs0);
virtual DECLARE_WRITE16_MEMBER(write_cs1);
DECLARE_WRITE_LINE_MEMBER(write_dmack);
diff --git a/src/devices/machine/atapicdr.cpp b/src/devices/machine/atapicdr.cpp
index deb0da52c52..268a5a71b4c 100644
--- a/src/devices/machine/atapicdr.cpp
+++ b/src/devices/machine/atapicdr.cpp
@@ -10,17 +10,17 @@
const device_type ATAPI_CDROM = &device_creator<atapi_cdrom_device>;
const device_type ATAPI_FIXED_CDROM = &device_creator<atapi_fixed_cdrom_device>;
-atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
atapi_hle_device(mconfig, ATAPI_CDROM, "ATAPI CDROM", tag, owner, clock, "cdrom", __FILE__)
{
}
-atapi_cdrom_device::atapi_cdrom_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) :
+atapi_cdrom_device::atapi_cdrom_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) :
atapi_hle_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
-atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
atapi_cdrom_device(mconfig, ATAPI_FIXED_CDROM, "ATAPI fixed CDROM", tag, owner, clock, "cdrom_fixed", __FILE__)
{
}
diff --git a/src/devices/machine/atapicdr.h b/src/devices/machine/atapicdr.h
index 041081a0cd0..1105506c84f 100644
--- a/src/devices/machine/atapicdr.h
+++ b/src/devices/machine/atapicdr.h
@@ -20,10 +20,10 @@ class atapi_cdrom_device : public atapi_hle_device,
public t10mmc
{
public:
- atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- atapi_cdrom_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);
+ atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ atapi_cdrom_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);
- UINT16 *identify_device_buffer() { return m_identify_buffer; }
+ uint16_t *identify_device_buffer() { return m_identify_buffer; }
protected:
// device-level overrides
@@ -41,7 +41,7 @@ protected:
class atapi_fixed_cdrom_device : public atapi_cdrom_device
{
public:
- atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual void device_reset() override;
};
diff --git a/src/devices/machine/atapihle.cpp b/src/devices/machine/atapihle.cpp
index 1216e7a91ad..010921e944f 100644
--- a/src/devices/machine/atapihle.cpp
+++ b/src/devices/machine/atapihle.cpp
@@ -2,7 +2,7 @@
// copyright-holders:smf
#include "atapihle.h"
-atapi_hle_device::atapi_hle_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)
+atapi_hle_device::atapi_hle_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)
: ata_hle_device(mconfig, type, name, tag, owner, clock, shortname, source),
m_packet(0),
m_data_size(0)
diff --git a/src/devices/machine/atapihle.h b/src/devices/machine/atapihle.h
index d124259e577..2e44816a2ca 100644
--- a/src/devices/machine/atapihle.h
+++ b/src/devices/machine/atapihle.h
@@ -20,7 +20,7 @@ class atapi_hle_device : public ata_hle_device,
public virtual t10spc
{
public:
- atapi_hle_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);
+ atapi_hle_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);
enum atapi_features_flag_t
{
diff --git a/src/devices/machine/autoconfig.cpp b/src/devices/machine/autoconfig.cpp
index 02afb595985..e05d153be63 100644
--- a/src/devices/machine/autoconfig.cpp
+++ b/src/devices/machine/autoconfig.cpp
@@ -80,13 +80,13 @@ void amiga_autoconfig::autoconfig_can_shutup(bool state)
m_cfg[0x04] |= (state ? 0x04 : 0x00) << 12;
}
-void amiga_autoconfig::autoconfig_product(UINT8 data)
+void amiga_autoconfig::autoconfig_product(uint8_t data)
{
m_cfg[0x02] = ~((data & 0xf0) >> 4) << 12;
m_cfg[0x03] = ~((data & 0x0f) >> 0) << 12;
}
-void amiga_autoconfig::autoconfig_manufacturer(UINT16 data)
+void amiga_autoconfig::autoconfig_manufacturer(uint16_t data)
{
m_cfg[0x08] = ~((data & 0xf000) >> 12) << 12;
m_cfg[0x09] = ~((data & 0x0f00) >> 8) << 12;
@@ -94,7 +94,7 @@ void amiga_autoconfig::autoconfig_manufacturer(UINT16 data)
m_cfg[0x0b] = ~((data & 0x000f) >> 0) << 12;
}
-void amiga_autoconfig::autoconfig_serial(UINT32 data)
+void amiga_autoconfig::autoconfig_serial(uint32_t data)
{
m_cfg[0x0c] = ~((data & 0xf0000000) >> 28) << 12;
m_cfg[0x0d] = ~((data & 0x0f000000) >> 24) << 12;
@@ -106,7 +106,7 @@ void amiga_autoconfig::autoconfig_serial(UINT32 data)
m_cfg[0x13] = ~((data & 0x0000000f) >> 0) << 12;
}
-void amiga_autoconfig::autoconfig_rom_vector(UINT16 data)
+void amiga_autoconfig::autoconfig_rom_vector(uint16_t data)
{
m_cfg[0x14] = ~((data & 0xf000) >> 12) << 12;
m_cfg[0x15] = ~((data & 0x0f00) >> 8) << 12;
@@ -121,7 +121,7 @@ void amiga_autoconfig::autoconfig_rom_vector(UINT16 data)
READ16_MEMBER( amiga_autoconfig::autoconfig_read )
{
- UINT16 data = m_cfg[offset] | 0x0fff;
+ uint16_t data = m_cfg[offset] | 0x0fff;
if (VERBOSE && !space.debugger_access())
space.device().logerror("autoconfig_read %04x @ %02x [mask = %04x]\n", data, offset, mem_mask);
diff --git a/src/devices/machine/autoconfig.h b/src/devices/machine/autoconfig.h
index 042d3886189..f061f0d2e7e 100644
--- a/src/devices/machine/autoconfig.h
+++ b/src/devices/machine/autoconfig.h
@@ -56,19 +56,19 @@ protected:
void autoconfig_can_shutup(bool state);
// product number, manufacturer number, serial number
- void autoconfig_product(UINT8 data);
- void autoconfig_manufacturer(UINT16 data);
- void autoconfig_serial(UINT32 data);
+ void autoconfig_product(uint8_t data);
+ void autoconfig_manufacturer(uint16_t data);
+ void autoconfig_serial(uint32_t data);
// rom vector
- void autoconfig_rom_vector(UINT16 data);
+ void autoconfig_rom_vector(uint16_t data);
// called once we have received a valid base address from the host system
virtual void autoconfig_base_address(offs_t address) = 0;
private:
// configuration information about our autoconfig board, 256 nibbles
- UINT16 m_cfg[0x40];
+ uint16_t m_cfg[0x40];
};
#endif // __AUTOCONFIG_H__
diff --git a/src/devices/machine/ay31015.cpp b/src/devices/machine/ay31015.cpp
index 659e16e281b..0e17222c0e6 100644
--- a/src/devices/machine/ay31015.cpp
+++ b/src/devices/machine/ay31015.cpp
@@ -97,7 +97,7 @@ Start bit (low), Bit 0, Bit 1... highest bit, Parity bit (if enabled), 1-2 stop
const device_type AY31015 = &device_creator<ay31015_device>;
const device_type AY51013 = &device_creator<ay51013_device>;
-ay31015_device::ay31015_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)
+ay31015_device::ay31015_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_control_reg(0),
m_status_reg(0),
@@ -125,7 +125,7 @@ ay31015_device::ay31015_device(const machine_config &mconfig, device_type type,
elem = 0;
}
-ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AY31015, "AY-3-1015", tag, owner, clock, "ay31015", __FILE__),
m_control_reg(0),
m_status_reg(0),
@@ -153,7 +153,7 @@ ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, d
elem = 0;
}
-ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: ay31015_device(mconfig, AY31015, "AY-5-1013", tag, owner, clock, "ay51013", __FILE__)
{
}
@@ -210,7 +210,7 @@ void ay31015_device::device_reset()
}
-inline UINT8 ay31015_device::get_si()
+inline uint8_t ay31015_device::get_si()
{
if (!m_read_si_cb.isnull())
m_pins[AY31015_SI] = m_read_si_cb(0) ? 1 : 0;
@@ -228,7 +228,7 @@ inline void ay31015_device::set_so( int data )
}
-inline int ay31015_device::update_status_pin( UINT8 reg_bit, ay31015_output_pin_t pin )
+inline int ay31015_device::update_status_pin( uint8_t reg_bit, ay31015_output_pin_t pin )
{
int new_value = (m_status_reg & reg_bit) ? 1 : 0;
@@ -428,7 +428,7 @@ TIMER_CALLBACK_MEMBER( ay31015_device::rx_process )
TIMER_CALLBACK_MEMBER( ay31015_device::tx_process )
{
- UINT8 t1;
+ uint8_t t1;
switch (m_tx_state)
{
case IDLE:
@@ -561,7 +561,7 @@ TIMER_CALLBACK_MEMBER( ay31015_device::tx_process )
void ay31015_device::internal_reset()
{
/* total pulses = 16 * data-bits */
- UINT8 t1;
+ uint8_t t1;
if (m_control_reg & CONTROL_NB2)
t1 = (m_control_reg & CONTROL_NB1) ? 8 : 7;
@@ -586,7 +586,7 @@ void ay31015_device::internal_reset()
void ay51013_device::internal_reset()
{
/* total pulses = 16 * data-bits */
- UINT8 t1;
+ uint8_t t1;
if (m_control_reg & CONTROL_NB2)
t1 = (m_control_reg & CONTROL_NB1) ? 8 : 7;
@@ -612,7 +612,7 @@ void ay51013_device::internal_reset()
void ay31015_device::transfer_control_pins()
{
- UINT8 control = 0;
+ uint8_t control = 0;
control |= m_pins[AY31015_NP ] ? CONTROL_NP : 0;
control |= m_pins[AY31015_TSB] ? CONTROL_TSB : 0;
@@ -733,7 +733,7 @@ void ay31015_device::set_transmitter_clock( double new_clock )
ay31015_get_received_data - return a byte to the computer
-------------------------------------------------*/
-UINT8 ay31015_device::get_received_data()
+uint8_t ay31015_device::get_received_data()
{
return m_rx_buffer;
}
@@ -742,7 +742,7 @@ UINT8 ay31015_device::get_received_data()
/*-------------------------------------------------
ay31015_set_transmit_data - accept a byte to transmit, if able
-------------------------------------------------*/
-void ay31015_device::set_transmit_data( UINT8 data )
+void ay31015_device::set_transmit_data( uint8_t data )
{
if (m_status_reg & STATUS_TBMT)
{
diff --git a/src/devices/machine/ay31015.h b/src/devices/machine/ay31015.h
index ab511bfe940..ded0ba7da87 100644
--- a/src/devices/machine/ay31015.h
+++ b/src/devices/machine/ay31015.h
@@ -61,8 +61,8 @@ ALLOW_SAVE_TYPE(state_t);
class ay31015_device : public device_t
{
public:
- ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- ay31015_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);
+ ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ay31015_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);
~ay31015_device() {}
static void set_tx_clock(device_t &device, double tx_clock) { downcast<ay31015_device &>(device).m_tx_clock = tx_clock; }
@@ -89,12 +89,12 @@ public:
/* Reead the received data */
/* The received data is available on RD8-RD1 (pins 5-12) */
- UINT8 get_received_data();
+ uint8_t get_received_data();
/* Set the transmitter buffer */
/* The data to transmit is set on DB1-DB8 (pins 26-33) */
- void set_transmit_data( UINT8 data );
+ void set_transmit_data( uint8_t data );
protected:
// device-level overrides
@@ -104,9 +104,9 @@ protected:
virtual void internal_reset();
// internal state
- inline UINT8 get_si();
+ inline uint8_t get_si();
inline void set_so(int data);
- inline int update_status_pin(UINT8 reg_bit, ay31015_output_pin_t pin);
+ inline int update_status_pin(uint8_t reg_bit, ay31015_output_pin_t pin);
void update_status_pins();
void transfer_control_pins();
inline void update_rx_timer();
@@ -116,26 +116,26 @@ protected:
int m_pins[41];
- UINT8 m_control_reg;
- UINT8 m_status_reg;
- UINT16 m_second_stop_bit; // 0, 8, 16
- UINT16 m_total_pulses; // bits * 16
- UINT8 m_internal_sample;
+ uint8_t m_control_reg;
+ uint8_t m_status_reg;
+ uint16_t m_second_stop_bit; // 0, 8, 16
+ uint16_t m_total_pulses; // bits * 16
+ uint8_t m_internal_sample;
state_t m_rx_state;
- UINT8 m_rx_data; // byte being received
- UINT8 m_rx_buffer; // received byte waiting to be accepted by computer
- UINT8 m_rx_bit_count;
- UINT8 m_rx_parity;
- UINT16 m_rx_pulses; // total pulses left
+ uint8_t m_rx_data; // byte being received
+ uint8_t m_rx_buffer; // received byte waiting to be accepted by computer
+ uint8_t m_rx_bit_count;
+ uint8_t m_rx_parity;
+ uint16_t m_rx_pulses; // total pulses left
double m_rx_clock; /* RCP - pin 17 */
emu_timer *m_rx_timer;
state_t m_tx_state;
- UINT8 m_tx_data; // byte being sent
- UINT8 m_tx_buffer; // next byte to send
- UINT8 m_tx_parity;
- UINT16 m_tx_pulses; // total pulses left
+ uint8_t m_tx_data; // byte being sent
+ uint8_t m_tx_buffer; // next byte to send
+ uint8_t m_tx_parity;
+ uint16_t m_tx_pulses; // total pulses left
double m_tx_clock; /* TCP - pin 40 */
emu_timer *m_tx_timer;
@@ -147,7 +147,7 @@ protected:
class ay51013_device : public ay31015_device
{
public:
- ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual void internal_reset() override;
diff --git a/src/devices/machine/bankdev.cpp b/src/devices/machine/bankdev.cpp
index 0b4571f9a87..be9bc47d63d 100644
--- a/src/devices/machine/bankdev.cpp
+++ b/src/devices/machine/bankdev.cpp
@@ -5,7 +5,7 @@
// device type definition
const device_type ADDRESS_MAP_BANK = &device_creator<address_map_bank_device>;
-address_map_bank_device::address_map_bank_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
+address_map_bank_device::address_map_bank_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock )
: device_t(mconfig, ADDRESS_MAP_BANK, "Address Map Bank", tag, owner, clock, "address_map_bank", __FILE__),
device_memory_interface(mconfig, *this),
m_endianness(ENDIANNESS_NATIVE),
diff --git a/src/devices/machine/bankdev.h b/src/devices/machine/bankdev.h
index 946faef53f0..9b162780ea0 100644
--- a/src/devices/machine/bankdev.h
+++ b/src/devices/machine/bankdev.h
@@ -25,13 +25,13 @@ class address_map_bank_device :
{
public:
// construction/destruction
- address_map_bank_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock );
+ address_map_bank_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock );
// static configuration helpers
static void set_endianness(device_t &device, endianness_t endianness) { downcast<address_map_bank_device &>(device).m_endianness = endianness; }
- static void set_databus_width(device_t &device, UINT8 databus_width) { downcast<address_map_bank_device &>(device).m_databus_width = databus_width; }
- static void set_addrbus_width(device_t &device, UINT8 addrbus_width) { downcast<address_map_bank_device &>(device).m_addrbus_width = addrbus_width; }
- static void set_stride(device_t &device, UINT32 stride) { downcast<address_map_bank_device &>(device).m_stride = stride; }
+ static void set_databus_width(device_t &device, uint8_t databus_width) { downcast<address_map_bank_device &>(device).m_databus_width = databus_width; }
+ static void set_addrbus_width(device_t &device, uint8_t addrbus_width) { downcast<address_map_bank_device &>(device).m_addrbus_width = addrbus_width; }
+ static void set_stride(device_t &device, uint32_t stride) { downcast<address_map_bank_device &>(device).m_stride = stride; }
DECLARE_ADDRESS_MAP(amap8, 8);
DECLARE_ADDRESS_MAP(amap16, 16);
@@ -60,9 +60,9 @@ protected:
private:
// internal state
endianness_t m_endianness;
- UINT8 m_databus_width;
- UINT8 m_addrbus_width;
- UINT32 m_stride;
+ uint8_t m_databus_width;
+ uint8_t m_addrbus_width;
+ uint32_t m_stride;
address_space_config m_program_config;
address_space *m_program;
offs_t m_offset;
diff --git a/src/devices/machine/bcreader.cpp b/src/devices/machine/bcreader.cpp
index 4d05a779835..9b286f49281 100644
--- a/src/devices/machine/bcreader.cpp
+++ b/src/devices/machine/bcreader.cpp
@@ -59,7 +59,7 @@ const device_type BARCODE_READER = &device_creator<barcode_reader_device>;
// barcode_reader_device - constructor
//-------------------------------------------------
-barcode_reader_device::barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+barcode_reader_device::barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BARCODE_READER, "Barcode Reader", tag, owner, clock, "bcreader", __FILE__)
, m_byte_length(0)
, m_pixel_length(0)
@@ -93,7 +93,7 @@ void barcode_reader_device::device_start()
//-------------------------------------------------
// Left Odd
-static const UINT8 bcread_data_LO[10][7] =
+static const uint8_t bcread_data_LO[10][7] =
{
{1, 1, 1, 0, 0, 1, 0}, {1, 1, 0, 0, 1, 1, 0},
{1, 1, 0, 1, 1, 0, 0}, {1, 0, 0, 0, 0, 1, 0},
@@ -103,7 +103,7 @@ static const UINT8 bcread_data_LO[10][7] =
};
// Left Even
-static const UINT8 bcread_data_LE[10][7] =
+static const uint8_t bcread_data_LE[10][7] =
{
{1, 0, 1, 1, 0, 0, 0}, {1, 0, 0, 1, 1, 0, 0},
{1, 1, 0, 0, 1, 0, 0}, {1, 0, 1, 1, 1, 1, 0},
@@ -113,7 +113,7 @@ static const UINT8 bcread_data_LE[10][7] =
};
// Right Even
-static const UINT8 bcread_data_RE[10][7] =
+static const uint8_t bcread_data_RE[10][7] =
{
{0, 0, 0, 1, 1, 0, 1}, {0, 0, 1, 1, 0, 0, 1},
{0, 0, 1, 0, 0, 1, 1}, {0, 1, 1, 1, 1, 0, 1},
@@ -124,7 +124,7 @@ static const UINT8 bcread_data_RE[10][7] =
// EAN-13 added an extra digit to determine
// the parity type of the first digits block
-static const UINT8 bcread_parity_type[10][6] =
+static const uint8_t bcread_parity_type[10][6] =
{
{1, 1, 1, 1, 1, 1}, {1, 1, 0, 1, 0, 0},
{1, 1, 0, 0, 1, 0}, {1, 1, 0, 0, 0, 1},
@@ -264,13 +264,13 @@ void barcode_reader_device::write_code(const char *barcode, int len)
// the codes by bytes
//-------------------------------------------------
-UINT8 barcode_reader_device::read_code()
+uint8_t barcode_reader_device::read_code()
{
if (m_new_code)
{
if (m_byte_count < m_byte_length)
{
- UINT8 val = m_byte_data[m_byte_count];
+ uint8_t val = m_byte_data[m_byte_count];
m_byte_count++;
return val;
}
diff --git a/src/devices/machine/bcreader.h b/src/devices/machine/bcreader.h
index ecb6908e0ae..bc94f6dd92e 100644
--- a/src/devices/machine/bcreader.h
+++ b/src/devices/machine/bcreader.h
@@ -24,12 +24,12 @@ class barcode_reader_device : public device_t
{
public:
// construction/destruction
- barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void write_code(const char *barcode, int len);
int get_pending_code() { return m_new_code; }
int get_byte_length() { return m_byte_length; }
- UINT8 read_code();
+ uint8_t read_code();
int read_pixel();
// TODO: add checksum validation!
@@ -40,8 +40,8 @@ protected:
// device-level overrides
virtual void device_start() override;
- UINT8 m_byte_data[13];
- UINT8 m_pixel_data[100];
+ uint8_t m_byte_data[13];
+ uint8_t m_pixel_data[100];
int m_byte_length;
int m_pixel_length;
int m_byte_count;
diff --git a/src/devices/machine/buffer.cpp b/src/devices/machine/buffer.cpp
index 6b2058c6937..7497f49ecd4 100644
--- a/src/devices/machine/buffer.cpp
+++ b/src/devices/machine/buffer.cpp
@@ -5,7 +5,7 @@
const device_type INPUT_BUFFER = &device_creator<input_buffer_device>;
-input_buffer_device::input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+input_buffer_device::input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, INPUT_BUFFER, "Input Buffer", tag, owner, clock, "input_buffer", __FILE__),
m_input_data(0xff)
{
diff --git a/src/devices/machine/buffer.h b/src/devices/machine/buffer.h
index 7c719c918af..812f9f89f78 100644
--- a/src/devices/machine/buffer.h
+++ b/src/devices/machine/buffer.h
@@ -6,9 +6,9 @@
class input_buffer_device : public device_t
{
public:
- input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- UINT8 read() { return m_input_data; }
+ uint8_t read() { return m_input_data; }
DECLARE_READ8_MEMBER(read) { return read(); }
DECLARE_WRITE_LINE_MEMBER(write_bit0) { if (state) m_input_data |= 0x01; else m_input_data &= ~0x01; }
@@ -23,7 +23,7 @@ public:
protected:
virtual void device_start() override;
- UINT8 m_input_data;
+ uint8_t m_input_data;
};
extern const device_type INPUT_BUFFER;
diff --git a/src/devices/machine/cdp1852.cpp b/src/devices/machine/cdp1852.cpp
index 52fe18eb82b..2bfae3f3a5a 100644
--- a/src/devices/machine/cdp1852.cpp
+++ b/src/devices/machine/cdp1852.cpp
@@ -38,7 +38,7 @@ enum
// cdp1852_device - constructor
//-------------------------------------------------
-cdp1852_device::cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+cdp1852_device::cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CDP1852, "CDP1852 I/O", tag, owner, clock, "cdp1852", __FILE__),
m_read_mode(*this),
m_write_sr(*this),
diff --git a/src/devices/machine/cdp1852.h b/src/devices/machine/cdp1852.h
index eb8cef75dd4..dafdf4147cf 100644
--- a/src/devices/machine/cdp1852.h
+++ b/src/devices/machine/cdp1852.h
@@ -58,7 +58,7 @@ class cdp1852_device : public device_t
{
public:
// construction/destruction
- cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_mode_rd_callback(device_t &device, _Object object) { return downcast<cdp1852_device &>(device).m_read_mode.set_callback(object); }
template<class _Object> static devcb_base &set_sr_wr_callback(device_t &device, _Object object) { return downcast<cdp1852_device &>(device).m_write_sr.set_callback(object); }
@@ -83,8 +83,8 @@ private:
devcb_write8 m_write_data;
int m_new_data; // new data written
- UINT8 m_data; // data latch
- UINT8 m_next_data; // next data
+ uint8_t m_data; // data latch
+ uint8_t m_next_data; // next data
int m_sr; // service request flag
int m_next_sr; // next value of service request flag
diff --git a/src/devices/machine/cdp1871.cpp b/src/devices/machine/cdp1871.cpp
index e685f8c43ad..2a3e8444f3f 100644
--- a/src/devices/machine/cdp1871.cpp
+++ b/src/devices/machine/cdp1871.cpp
@@ -22,7 +22,7 @@ const device_type CDP1871 = &device_creator<cdp1871_device>;
// MACROS / CONSTANTS
//**************************************************************************
-const UINT8 cdp1871_device::key_codes[4][11][8] =
+const uint8_t cdp1871_device::key_codes[4][11][8] =
{
// normal
{
@@ -95,7 +95,7 @@ const UINT8 cdp1871_device::key_codes[4][11][8] =
// cdp1871_device - constructor
//-------------------------------------------------
-cdp1871_device::cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+cdp1871_device::cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CDP1871, "RCA CDP1871", tag, owner, clock, "cdp1871", __FILE__),
m_read_d1(*this),
m_read_d2(*this),
@@ -235,7 +235,7 @@ void cdp1871_device::clock_scan_counters()
void cdp1871_device::detect_keypress()
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (m_drive) {
case 0: data = m_read_d1(0); break;
diff --git a/src/devices/machine/cdp1871.h b/src/devices/machine/cdp1871.h
index 02238822057..e6759505403 100644
--- a/src/devices/machine/cdp1871.h
+++ b/src/devices/machine/cdp1871.h
@@ -93,7 +93,7 @@ class cdp1871_device : public device_t
{
public:
// construction/destruction
- cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_d1_rd_callback(device_t &device, _Object object) { return downcast<cdp1871_device &>(device).m_read_d1.set_callback(object); }
template<class _Object> static devcb_base &set_d2_rd_callback(device_t &device, _Object object) { return downcast<cdp1871_device &>(device).m_read_d2.set_callback(object); }
@@ -160,7 +160,7 @@ private:
// timers
emu_timer *m_scan_timer; // keyboard scan timer
- static const UINT8 key_codes[4][11][8];
+ static const uint8_t key_codes[4][11][8];
};
diff --git a/src/devices/machine/clock.cpp b/src/devices/machine/clock.cpp
index 70d3bd4fade..e933f28ddda 100644
--- a/src/devices/machine/clock.cpp
+++ b/src/devices/machine/clock.cpp
@@ -4,7 +4,7 @@
const device_type CLOCK = &device_creator<clock_device>;
-clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CLOCK, "Clock", tag, owner, clock, "clock", __FILE__),
m_signal(0),
m_timer(nullptr),
diff --git a/src/devices/machine/clock.h b/src/devices/machine/clock.h
index 4be97128bfe..6205b408071 100644
--- a/src/devices/machine/clock.h
+++ b/src/devices/machine/clock.h
@@ -13,7 +13,7 @@
class clock_device : public device_t
{
public:
- clock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ clock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_signal_handler(device_t &device, _Object object) { return downcast<clock_device &>(device).m_signal_handler.set_callback(object); }
diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp
index f5c177fef62..84d638c02a7 100644
--- a/src/devices/machine/com8116.cpp
+++ b/src/devices/machine/com8116.cpp
@@ -87,7 +87,7 @@ const int com8116_device::divisors_16X_4_9152MHz_SY2661_2[] =
// com8116_device - constructor
//-------------------------------------------------
-com8116_device::com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+com8116_device::com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, COM8116, "COM8116", tag, owner, clock, "com8116", __FILE__),
m_fx4_handler(*this),
m_fr_handler(*this),
@@ -165,7 +165,7 @@ void com8116_device::device_timer(emu_timer &timer, device_timer_id id, int para
// str_w -
//-------------------------------------------------
-void com8116_device::str_w(UINT8 data)
+void com8116_device::str_w(uint8_t data)
{
int fr_divider = data & 0x0f;
int fr_clock = clock() / m_fr_divisors[fr_divider];
@@ -185,7 +185,7 @@ WRITE8_MEMBER( com8116_device::str_w )
// stt_w -
//-------------------------------------------------
-void com8116_device::stt_w(UINT8 data)
+void com8116_device::stt_w(uint8_t data)
{
int ft_divider = data & 0x0f;
int ft_clock = clock() / m_ft_divisors[ft_divider];
diff --git a/src/devices/machine/com8116.h b/src/devices/machine/com8116.h
index 614be491318..720aa010838 100644
--- a/src/devices/machine/com8116.h
+++ b/src/devices/machine/com8116.h
@@ -51,15 +51,15 @@ class com8116_device : public device_t
{
public:
// construction/destruction
- com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_fx4_handler(device_t &device, _Object object) { return downcast<com8116_device &>(device).m_fx4_handler.set_callback(object); }
template<class _Object> static devcb_base &set_fr_handler(device_t &device, _Object object) { return downcast<com8116_device &>(device).m_fr_handler.set_callback(object); }
template<class _Object> static devcb_base &set_ft_handler(device_t &device, _Object object) { return downcast<com8116_device &>(device).m_ft_handler.set_callback(object); }
- void str_w(UINT8 data);
+ void str_w(uint8_t data);
DECLARE_WRITE8_MEMBER( str_w );
- void stt_w(UINT8 data);
+ void stt_w(uint8_t data);
DECLARE_WRITE8_MEMBER( stt_w );
static const int divisors_16X_5_0688MHz[];
diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp
index d1cdfcd1835..95cd4a17cb9 100644
--- a/src/devices/machine/corvushd.cpp
+++ b/src/devices/machine/corvushd.cpp
@@ -72,7 +72,7 @@
const device_type CORVUS_HDC = &device_creator<corvus_hdc_t>;
-corvus_hdc_t::corvus_hdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+corvus_hdc_t::corvus_hdc_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CORVUS_HDC, "Corvus Flat Cable HDC", tag, owner, clock, "corvus_hdc", __FILE__),
m_status(0),
m_prep_mode(false),
@@ -120,8 +120,8 @@ corvus_hdc_t::corvus_hdc_t(const machine_config &mconfig, const char *tag, devic
// Returns:
// nada
//
-void corvus_hdc_t::dump_buffer(UINT8 *buffer, UINT16 length) {
- UINT16 offset;
+void corvus_hdc_t::dump_buffer(uint8_t *buffer, uint16_t length) {
+ uint16_t offset;
char ascii_dump[16];
logerror("dump_buffer: Dump of %d bytes:\n", length);
@@ -160,7 +160,7 @@ void corvus_hdc_t::dump_buffer(UINT8 *buffer, UINT16 length) {
// Returns:
// Whether the command was invalid or not (true = invalid command)
//
-bool corvus_hdc_t::parse_hdc_command(UINT8 data) {
+bool corvus_hdc_t::parse_hdc_command(uint8_t data) {
m_awaiting_modifier = false; // This is the case by definition
LOG(("parse_hdc_command: Called with data: 0x%2.2x, Prep mode is: %d\n", data, m_prep_mode));
@@ -266,11 +266,11 @@ bool corvus_hdc_t::parse_hdc_command(UINT8 data) {
// Returns:
// status: Command status
//
-UINT8 corvus_hdc_t::corvus_write_sector(UINT8 drv, UINT32 sector, UINT8 *buffer, int len) {
+uint8_t corvus_hdc_t::corvus_write_sector(uint8_t drv, uint32_t sector, uint8_t *buffer, int len) {
hard_disk_file
*disk; // Structures for interface to CHD routines
- UINT8 tbuffer[512]; // Buffer to hold an entire sector
- UINT16 cylinder; // Cylinder this sector resides on
+ uint8_t tbuffer[512]; // Buffer to hold an entire sector
+ uint16_t cylinder; // Cylinder this sector resides on
LOG(("corvus_write_sector: Write Drive: %d, physical sector: 0x%5.5x\n", drv, sector));
@@ -324,10 +324,10 @@ UINT8 corvus_hdc_t::corvus_write_sector(UINT8 drv, UINT32 sector, UINT8 *buffer,
// Returns:
// status: Corvus status
//
-UINT8 corvus_hdc_t::corvus_write_logical_sector(dadr_t *dadr, UINT8 *buffer, int len) {
- UINT8 status; // Status returned from Physical Sector read
- UINT8 drv; // Corvus drive id (1..15)
- UINT32 sector; // Sector number on drive
+uint8_t corvus_hdc_t::corvus_write_logical_sector(dadr_t *dadr, uint8_t *buffer, int len) {
+ uint8_t status; // Status returned from Physical Sector read
+ uint8_t drv; // Corvus drive id (1..15)
+ uint32_t sector; // Sector number on drive
//
// Unencode the first byte of the DADR
@@ -374,11 +374,11 @@ UINT8 corvus_hdc_t::corvus_write_logical_sector(dadr_t *dadr, UINT8 *buffer, int
// Returns:
// status: Corvus status
//
-UINT8 corvus_hdc_t::corvus_read_sector(UINT8 drv, UINT32 sector, UINT8 *buffer, int len) {
+uint8_t corvus_hdc_t::corvus_read_sector(uint8_t drv, uint32_t sector, uint8_t *buffer, int len) {
hard_disk_file
*disk; // Structures for interface to CHD routines
- UINT8 tbuffer[512]; // Buffer to store full sector results in
- UINT16 cylinder;
+ uint8_t tbuffer[512]; // Buffer to store full sector results in
+ uint16_t cylinder;
LOG(("corvus_read_sector: Read Drive: %d, physical sector: 0x%5.5x\n", drv, sector));
@@ -421,10 +421,10 @@ UINT8 corvus_hdc_t::corvus_read_sector(UINT8 drv, UINT32 sector, UINT8 *buffer,
// Returns:
// status: Corvus status
//
-UINT8 corvus_hdc_t::corvus_read_logical_sector(dadr_t *dadr, UINT8 *buffer, int len) {
- UINT8 status; // Status returned from Physical Sector read
- UINT8 drv; // Corvus drive id (1..15)
- UINT32 sector; // Sector number on drive
+uint8_t corvus_hdc_t::corvus_read_logical_sector(dadr_t *dadr, uint8_t *buffer, int len) {
+ uint8_t status; // Status returned from Physical Sector read
+ uint8_t drv; // Corvus drive id (1..15)
+ uint32_t sector; // Sector number on drive
//
// Unencode the first byte of the DADR
@@ -472,13 +472,13 @@ UINT8 corvus_hdc_t::corvus_read_logical_sector(dadr_t *dadr, UINT8 *buffer, int
// Side-effects:
// Fills in the semaphore result code
//
-UINT8 corvus_hdc_t::corvus_lock_semaphore(UINT8 *name) {
+uint8_t corvus_hdc_t::corvus_lock_semaphore(uint8_t *name) {
semaphore_table_block_t
semaphore_table;
- UINT8 offset = 0;
+ uint8_t offset = 0;
bool found = false;
- UINT8 blank_offset = 32; // Initialize to invalid offset
- UINT8 status; // Status returned from Physical Sector read
+ uint8_t blank_offset = 32; // Initialize to invalid offset
+ uint8_t status; // Status returned from Physical Sector read
//
// Read the semaphore table from the drive
@@ -547,12 +547,12 @@ UINT8 corvus_hdc_t::corvus_lock_semaphore(UINT8 *name) {
// Side-effects:
// Fills in the semaphore result code
//
-UINT8 corvus_hdc_t::corvus_unlock_semaphore(UINT8 *name) {
+uint8_t corvus_hdc_t::corvus_unlock_semaphore(uint8_t *name) {
semaphore_table_block_t
semaphore_table;
- UINT8 offset = 0;
+ uint8_t offset = 0;
bool found = false;
- UINT8 status; // Status returned from Physical Sector read
+ uint8_t status; // Status returned from Physical Sector read
//
// Read the semaphore table from the drive
@@ -612,10 +612,10 @@ UINT8 corvus_hdc_t::corvus_unlock_semaphore(UINT8 *name) {
// Disk status
//
//
-UINT8 corvus_hdc_t::corvus_init_semaphore_table() {
+uint8_t corvus_hdc_t::corvus_init_semaphore_table() {
semaphore_table_block_t
semaphore_table;
- UINT8 status;
+ uint8_t status;
memset(semaphore_table.semaphore_block.semaphore_table, 0x20, 256);
@@ -641,22 +641,22 @@ UINT8 corvus_hdc_t::corvus_init_semaphore_table() {
// Returns:
// Status of command
//
-UINT8 corvus_hdc_t::corvus_get_drive_parameters(UINT8 drv) {
- UINT16 capacity; // Number of usable 512-byte blocks
- UINT16 raw_capacity; // Number of actual 512-byte blocks
+uint8_t corvus_hdc_t::corvus_get_drive_parameters(uint8_t drv) {
+ uint16_t capacity; // Number of usable 512-byte blocks
+ uint16_t raw_capacity; // Number of actual 512-byte blocks
union {
- UINT8
+ uint8_t
buffer[512];
disk_parameter_block_t
dpb;
} raw_disk_parameter_block; // Buffer for the Disk Parameter Block
union {
- UINT8
+ uint8_t
buffer[512];
constellation_parameter_block_t
cpb;
} raw_constellation_parameter_block; // Buffer for the Constellation Parameter Block
- UINT8 status; // Status to return
+ uint8_t status; // Status to return
//
// Make sure a valid drive is being accessed
@@ -755,7 +755,7 @@ UINT8 corvus_hdc_t::corvus_get_drive_parameters(UINT8 drv) {
// Returns:
// status: Status of read operation
//
-UINT8 corvus_hdc_t::corvus_read_boot_block(UINT8 block) {
+uint8_t corvus_hdc_t::corvus_read_boot_block(uint8_t block) {
LOG(("corvus_read_boot_block: Reading boot block: %d\n", block));
return corvus_read_sector(1, 25 + block, m_buffer.read_512_response.data, 512);
@@ -792,7 +792,7 @@ UINT8 corvus_hdc_t::corvus_read_boot_block(UINT8 block) {
// Returns:
// Status of command
//
-UINT8 corvus_hdc_t::corvus_enter_prep_mode(UINT8 drv, UINT8 *prep_block) {
+uint8_t corvus_hdc_t::corvus_enter_prep_mode(uint8_t drv, uint8_t *prep_block) {
// on rev b/h drives, sending the "put drive into prep mode"
// command when already in prep mode is an error.
if (m_prep_mode) {
@@ -824,7 +824,7 @@ UINT8 corvus_hdc_t::corvus_enter_prep_mode(UINT8 drv, UINT8 *prep_block) {
// Returns:
// Status of command (always success)
//
-UINT8 corvus_hdc_t::corvus_exit_prep_mode() {
+uint8_t corvus_hdc_t::corvus_exit_prep_mode() {
LOG(("corvus_exit_prep_mode: Prep mode exited\n"));
m_prep_mode = false;
m_prep_drv = 0;
@@ -845,9 +845,9 @@ UINT8 corvus_hdc_t::corvus_exit_prep_mode() {
// Returns:
// Status of command
//
-UINT8 corvus_hdc_t::corvus_read_firmware_block(UINT8 head, UINT8 sector) {
- UINT16 relative_sector; // Relative sector on drive for Physical Read
- UINT8 status;
+uint8_t corvus_hdc_t::corvus_read_firmware_block(uint8_t head, uint8_t sector) {
+ uint16_t relative_sector; // Relative sector on drive for Physical Read
+ uint8_t status;
relative_sector = head * m_sectors_per_track + sector;
@@ -873,9 +873,9 @@ UINT8 corvus_hdc_t::corvus_read_firmware_block(UINT8 head, UINT8 sector) {
// Returns:
// Status of command
//
-UINT8 corvus_hdc_t::corvus_write_firmware_block(UINT8 head, UINT8 sector, UINT8 *buffer) {
- UINT16 relative_sector; // Relative sector on drive for Physical Write
- UINT8 status;
+uint8_t corvus_hdc_t::corvus_write_firmware_block(uint8_t head, uint8_t sector, uint8_t *buffer) {
+ uint16_t relative_sector; // Relative sector on drive for Physical Write
+ uint8_t status;
relative_sector = head * m_sectors_per_track + sector;
@@ -899,11 +899,11 @@ UINT8 corvus_hdc_t::corvus_write_firmware_block(UINT8 head, UINT8 sector, UINT8
// Returns:
// Status of command
//
-UINT8 corvus_hdc_t::corvus_format_drive(UINT8 *pattern, UINT16 len) {
- UINT32 sector;
- UINT32 max_sector;
- UINT8 status = 0;
- UINT8 tbuffer[512];
+uint8_t corvus_hdc_t::corvus_format_drive(uint8_t *pattern, uint16_t len) {
+ uint32_t sector;
+ uint32_t max_sector;
+ uint8_t status = 0;
+ uint8_t tbuffer[512];
// Set up m_tracks_per_cylinder and m_sectors_per_track
corvus_hdc_file(m_prep_drv);
@@ -1371,7 +1371,7 @@ READ8_MEMBER ( corvus_hdc_t::status_r ) {
// Value in the controller data register
//
READ8_MEMBER ( corvus_hdc_t::read ) {
- UINT8 result;
+ uint8_t result;
if((m_status & CONTROLLER_DIRECTION) == 0) { // Check to see if we're in Controller-to-Host mode
logerror("corvus_hdc_data_r: Data register read when in Host-to-Controller mode (status: 0x%2.2x)\n", m_status);
diff --git a/src/devices/machine/corvushd.h b/src/devices/machine/corvushd.h
index cb3bee03594..a85ffdbb9fe 100644
--- a/src/devices/machine/corvushd.h
+++ b/src/devices/machine/corvushd.h
@@ -182,7 +182,7 @@ class corvus_hdc_t : public device_t
{
public:
// construction/destruction
- corvus_hdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ corvus_hdc_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -202,27 +202,27 @@ private:
// Sector addressing scheme for Rev B/H drives used in various commands (Called a DADR in the docs)
struct dadr_t {
- UINT8 address_msn_and_drive;// Most significant nibble: Most signficant nibble of sector address, Least significant nibble: Drive #
- UINT8 address_lsb; // Least significant byte of sector address
- UINT8 address_mid; // Middle byte of sector address
+ uint8_t address_msn_and_drive;// Most significant nibble: Most signficant nibble of sector address, Least significant nibble: Drive #
+ uint8_t address_lsb; // Least significant byte of sector address
+ uint8_t address_mid; // Middle byte of sector address
};
- UINT8 m_status; // Controller status byte (DIRECTION + BUSY/READY)
+ uint8_t m_status; // Controller status byte (DIRECTION + BUSY/READY)
// Prep mode
bool m_prep_mode; // Whether the controller is in Prep Mode or not
- UINT8 m_prep_drv; // If in prep mode, Corvus drive id (1..15) being prepped
+ uint8_t m_prep_drv; // If in prep mode, Corvus drive id (1..15) being prepped
// Physical drive info
- UINT8 m_sectors_per_track; // Number of sectors per track for this drive
- UINT8 m_tracks_per_cylinder;// Number of tracks per cylinder (heads)
- UINT16 m_cylinders_per_drive;// Number of cylinders per drive
+ uint8_t m_sectors_per_track; // Number of sectors per track for this drive
+ uint8_t m_tracks_per_cylinder;// Number of tracks per cylinder (heads)
+ uint16_t m_cylinders_per_drive;// Number of cylinders per drive
// Command Processing
- UINT16 m_offset; // Current offset into raw_data buffer
+ uint16_t m_offset; // Current offset into raw_data buffer
bool m_awaiting_modifier; // We've received a two-byte command and we're waiting for the mod
- UINT16 m_recv_bytes; // Number of bytes expected to be received from Host
- UINT16 m_xmit_bytes; // Number of bytes expected to be transmitted to host
+ uint16_t m_recv_bytes; // Number of bytes expected to be received from Host
+ uint16_t m_xmit_bytes; // Number of bytes expected to be transmitted to host
// Timing-related values
- UINT16 m_last_cylinder; // Last cylinder accessed - for calculating seek times
- UINT32 m_delay; // Delay in microseconds for callback
+ uint16_t m_last_cylinder; // Last cylinder accessed - for calculating seek times
+ uint32_t m_delay; // Delay in microseconds for callback
emu_timer *m_timeout_timer; // Four-second timer for timeouts
emu_timer *m_cmd_timer;
bool m_invalid_command_flag; // I hate this, but it saves a lot more tests
@@ -234,197 +234,197 @@ private:
//
// Raw Buffer
//
- UINT8 raw_data[MAX_COMMAND_SIZE];
+ uint8_t raw_data[MAX_COMMAND_SIZE];
//
// Basic interpretation of code and modifier
//
struct {
- UINT8 code; // First byte of data is the code (command)
- UINT8 modifier; // Second byte of data is the modifier
+ uint8_t code; // First byte of data is the code (command)
+ uint8_t modifier; // Second byte of data is the modifier
} command;
//
// Basic response code
//
struct {
- UINT8 status; // Status code returned by the command executed
+ uint8_t status; // Status code returned by the command executed
} single_byte_response;
//
// Read sector command
//
struct {
- UINT8 code; // Command code
+ uint8_t code; // Command code
dadr_t dadr; // Encoded drive and sector to read
} read_sector_command;
//
// 128-byte Read Sector response
//
struct {
- UINT8 status; // Status code returned by command executed
- UINT8 data[128]; // Data returned from read
+ uint8_t status; // Status code returned by command executed
+ uint8_t data[128]; // Data returned from read
} read_128_response;
//
// 256-byte Read Sector response
//
struct {
- UINT8 status; // Status code returned by command executed
- UINT8 data[256]; // Data returned from read
+ uint8_t status; // Status code returned by command executed
+ uint8_t data[256]; // Data returned from read
} read_256_response;
//
// 512-byte Read Sector response
//
struct {
- UINT8 status; // Status code returned by command executed
- UINT8 data[512]; // Data returned by read
+ uint8_t status; // Status code returned by command executed
+ uint8_t data[512]; // Data returned by read
} read_512_response;
//
// Write 128-byte sector command
//
struct {
- UINT8 code; // Command code
+ uint8_t code; // Command code
dadr_t dadr; // Encoded drive and sector to write
- UINT8 data[128]; // Data to be written
+ uint8_t data[128]; // Data to be written
} write_128_command;
//
// Write 256-byte sector command
//
struct {
- UINT8 code; // Command code
+ uint8_t code; // Command code
dadr_t dadr; // Encoded drive and sector to write
- UINT8 data[256]; // Data to be written
+ uint8_t data[256]; // Data to be written
} write_256_command;
//
// Write 512-byte sector command
//
struct {
- UINT8 code; // Command Code
+ uint8_t code; // Command Code
dadr_t dadr; // Encoded drive and sector to write
- UINT8 data[512]; // Data to be written
+ uint8_t data[512]; // Data to be written
} write_512_command;
//
// Semaphore Lock command
//
struct {
- UINT8 code; // Command code
- UINT8 modifier; // Command code modifier
- UINT8 name[8]; // Semaphore name
+ uint8_t code; // Command code
+ uint8_t modifier; // Command code modifier
+ uint8_t name[8]; // Semaphore name
} lock_semaphore_command;
//
// Semaphore Unlock command
//
struct {
- UINT8 code; // Command code
- UINT8 modifier; // Command code modifier
- UINT8 name[8]; // Semaphore name
+ uint8_t code; // Command code
+ uint8_t modifier; // Command code modifier
+ uint8_t name[8]; // Semaphore name
} unlock_semaphore_command;
//
// Semaphore Lock/Unlock response
//
struct {
- UINT8 status; // Disk access status
- UINT8 result; // Semaphore action status
- UINT8 unused[10]; // Unused
+ uint8_t status; // Disk access status
+ uint8_t result; // Semaphore action status
+ uint8_t unused[10]; // Unused
} semaphore_locking_response;
//
// Initialize Semaphore table command
//
struct {
- UINT8 code; // Command code
- UINT8 modifier; // Command code modifier
- UINT8 unused[3]; // Unused
+ uint8_t code; // Command code
+ uint8_t modifier; // Command code modifier
+ uint8_t unused[3]; // Unused
} init_semaphore_command;
//
// Semaphore Status command
//
struct {
- UINT8 code; // Command code
- UINT8 modifier; // Command code modifier
- UINT8 zero_three; // Don't ask me...
- UINT8 unused[2]; // Unused
+ uint8_t code; // Command code
+ uint8_t modifier; // Command code modifier
+ uint8_t zero_three; // Don't ask me...
+ uint8_t unused[2]; // Unused
} semaphore_status_command;
//
// Semaphore Status response
//
struct {
- UINT8 status; // Disk access status
- UINT8 table[256]; // Contents of the semaphore table
+ uint8_t status; // Disk access status
+ uint8_t table[256]; // Contents of the semaphore table
} semaphore_status_response;
//
// Get Drive Parameters command (0x10)
//
struct {
- UINT8 code; // Command code
- UINT8 drive; // Drive number (starts at 1)
+ uint8_t code; // Command code
+ uint8_t drive; // Drive number (starts at 1)
} get_drive_parameters_command;
//
// Get Drive Parameters command response
//
struct {
- UINT8 status; // Status code returned by command executed
- UINT8 firmware_desc[31]; // Firmware string description
- UINT8 firmware_rev; // Firmware revision number
- UINT8 rom_version; // ROM Version
+ uint8_t status; // Status code returned by command executed
+ uint8_t firmware_desc[31]; // Firmware string description
+ uint8_t firmware_rev; // Firmware revision number
+ uint8_t rom_version; // ROM Version
struct {
- UINT8 sectors_per_track; // Sectors/Track
- UINT8 tracks_per_cylinder; // Tracks/Cylinder (heads)
+ uint8_t sectors_per_track; // Sectors/Track
+ uint8_t tracks_per_cylinder; // Tracks/Cylinder (heads)
struct {
- UINT8 lsb;
- UINT8 msb;
+ uint8_t lsb;
+ uint8_t msb;
} cylinders_per_drive; // Byte-flipped Cylinders/Drive
} track_info;
struct {
- UINT8 lsb; // Least significant byte
- UINT8 midb; // Middle byte
- UINT8 msb; // Most significant byte
+ uint8_t lsb; // Least significant byte
+ uint8_t midb; // Middle byte
+ uint8_t msb; // Most significant byte
} capacity; // 24-bit value, byte-flipped (lsb..msb)
- UINT8 unused[16];
- UINT8 interleave; // Interleave factor
+ uint8_t unused[16];
+ uint8_t interleave; // Interleave factor
struct {
- UINT8 mux_parameters[12];
- UINT8 pipe_name_table_ptr[2]; // Pointer to table of 64 entries, 8 bytes each (table of names)
- UINT8 pipe_ptr_table_ptr[2]; // Pointer to table of 64 entries, 8 bytes each. See pp. 29 - Mass Storage GTI
- UINT8 pipe_area_size[2]; // Size of pipe area (lsb, msb)
+ uint8_t mux_parameters[12];
+ uint8_t pipe_name_table_ptr[2]; // Pointer to table of 64 entries, 8 bytes each (table of names)
+ uint8_t pipe_ptr_table_ptr[2]; // Pointer to table of 64 entries, 8 bytes each. See pp. 29 - Mass Storage GTI
+ uint8_t pipe_area_size[2]; // Size of pipe area (lsb, msb)
struct {
- UINT8 track_offset[2];
+ uint8_t track_offset[2];
} vdo_table[7]; // Virtual drive table
- UINT8 lsi11_vdo_table[8];
- UINT8 lsi11_spare_table[8];
+ uint8_t lsi11_vdo_table[8];
+ uint8_t lsi11_spare_table[8];
} table_info;
- UINT8 drive_number; // Physical drive number
+ uint8_t drive_number; // Physical drive number
struct {
- UINT8 lsb; // Least
- UINT8 midb; // Middle
- UINT8 msb; // Most
+ uint8_t lsb; // Least
+ uint8_t midb; // Middle
+ uint8_t msb; // Most
} physical_capacity; // Physical capacity of drive
} drive_param_response;
//
// 2-byte Boot command (0x14)
//
struct {
- UINT8 code; // Command code
- UINT8 boot_block; // Which boot block to read (0-7)
+ uint8_t code; // Command code
+ uint8_t boot_block; // Which boot block to read (0-7)
} old_boot_command;
//
// Put drive into prep mode command (0x11)
//
struct {
- UINT8 code; // Command code
- UINT8 drive; // Drive number (starts at 1)
- UINT8 prep_block[512]; // Machine code payload
+ uint8_t code; // Command code
+ uint8_t drive; // Drive number (starts at 1)
+ uint8_t prep_block[512]; // Machine code payload
} prep_mode_command;
//
// Read Firmware command (Prep Mode 0x32)
//
struct {
- UINT8 code; // Command Code
- UINT8 encoded_h_s;// Encoded Head (bits 7-5) / Sector (bits 4-0)
+ uint8_t code; // Command Code
+ uint8_t encoded_h_s;// Encoded Head (bits 7-5) / Sector (bits 4-0)
} read_firmware_command;
//
// Write Firmware command (Prep Mode 0x33)
//
struct {
- UINT8 code; // Command Code
- UINT8 encoded_h_s; // Encoded Head (bits 7-5) / Sector (bits 4-0)
- UINT8 data[512]; // Data to be written
+ uint8_t code; // Command Code
+ uint8_t encoded_h_s; // Encoded Head (bits 7-5) / Sector (bits 4-0)
+ uint8_t data[512]; // Data to be written
} write_firmware_command;
//
// Format Drive command (Prep Mode 0x01)
@@ -435,8 +435,8 @@ private:
// all Corvus diagnostic programs send 513 bytes total, including the command, so I'm going with that.
//
struct {
- UINT8 code; // Command Code
- UINT8 pattern[512]; // Pattern to be written
+ uint8_t code; // Command Code
+ uint8_t pattern[512]; // Pattern to be written
} format_drive_revbh_command;
//
// Verify Drive command (Prep Mode 0x07)
@@ -447,75 +447,75 @@ private:
// return a count of 0. That makes this a fixed length response of 2 bytes.
//
struct {
- UINT8 status; // Disk access status
- UINT8 bad_sectors; // Number of bad sectors (always zero)
+ uint8_t status; // Disk access status
+ uint8_t bad_sectors; // Number of bad sectors (always zero)
} verify_drive_response;
} m_buffer;
// Structure of Block #1, the Disk Parameter Block
struct disk_parameter_block_t {
struct {
- UINT8 lsb;
- UINT8 msb;
+ uint8_t lsb;
+ uint8_t msb;
} spared_track[8]; // Spared track table (0xffff indicates end)
- UINT8 interleave; // Interleave factor
- UINT8 reserved;
+ uint8_t interleave; // Interleave factor
+ uint8_t reserved;
struct {
- UINT8 track_offset[2]; // Virtual drive offsets (lsb, msb) 0xffff indicates unused
+ uint8_t track_offset[2]; // Virtual drive offsets (lsb, msb) 0xffff indicates unused
} vdo_table[7];
- UINT8 lsi11_vdo_table[8];
- UINT8 lsi11_spare_table[8];
- UINT8 reserved2[432];
+ uint8_t lsi11_vdo_table[8];
+ uint8_t lsi11_spare_table[8];
+ uint8_t reserved2[432];
struct {
- UINT8 lsb;
- UINT8 msb;
+ uint8_t lsb;
+ uint8_t msb;
} revh_spare_table[16];
};
// Structure of Block #3, the Constellation Parameter Block
struct constellation_parameter_block_t {
- UINT8 mux_parameters[12];
- UINT8 pipe_name_table_ptr[2];
- UINT8 pipe_ptr_table_ptr[2];
- UINT8 pipe_area_size[2];
- UINT8 reserved[470];
- UINT8 software_protection[12];
- UINT8 serial_number[12];
+ uint8_t mux_parameters[12];
+ uint8_t pipe_name_table_ptr[2];
+ uint8_t pipe_ptr_table_ptr[2];
+ uint8_t pipe_area_size[2];
+ uint8_t reserved[470];
+ uint8_t software_protection[12];
+ uint8_t serial_number[12];
};
// Structure of Block #7, the Semaphore Table Block
struct semaphore_table_block_t {
union {
- UINT8 semaphore_table[256]; // Table consists of 256 bytes
+ uint8_t semaphore_table[256]; // Table consists of 256 bytes
struct {
- UINT8 semaphore_name[8]; // Each semaphore name is 8 bytes
+ uint8_t semaphore_name[8]; // Each semaphore name is 8 bytes
} semaphore_entry[32]; // 32 Entries
} semaphore_block;
- UINT8 unused[256]; // Remaining half of block is unused
+ uint8_t unused[256]; // Remaining half of block is unused
};
// Command size structure (number of bytes to xmit and recv for each command)
struct corvus_cmd_t {
- UINT16 recv_bytes; // Number of bytes from host for this command
- UINT16 xmit_bytes; // Number of bytes to return to host
+ uint16_t recv_bytes; // Number of bytes from host for this command
+ uint16_t xmit_bytes; // Number of bytes to return to host
};
- void dump_buffer(UINT8 *buffer, UINT16 length);
- bool parse_hdc_command(UINT8 data);
- UINT8 corvus_write_sector(UINT8 drv, UINT32 sector, UINT8 *buffer, int len);
- UINT8 corvus_write_logical_sector(dadr_t *dadr, UINT8 *buffer, int len);
- UINT8 corvus_read_sector(UINT8 drv, UINT32 sector, UINT8 *buffer, int len);
- UINT8 corvus_read_logical_sector(dadr_t *dadr, UINT8 *buffer, int len);
- UINT8 corvus_lock_semaphore(UINT8 *name);
- UINT8 corvus_unlock_semaphore(UINT8 *name);
- UINT8 corvus_init_semaphore_table();
- UINT8 corvus_get_drive_parameters(UINT8 drv);
- UINT8 corvus_read_boot_block(UINT8 block);
- UINT8 corvus_enter_prep_mode(UINT8 drv, UINT8 *prep_block);
- UINT8 corvus_exit_prep_mode();
- UINT8 corvus_read_firmware_block(UINT8 head, UINT8 sector);
- UINT8 corvus_write_firmware_block(UINT8 head, UINT8 sector, UINT8 *buffer);
- UINT8 corvus_format_drive(UINT8 *pattern, UINT16 len);
+ void dump_buffer(uint8_t *buffer, uint16_t length);
+ bool parse_hdc_command(uint8_t data);
+ uint8_t corvus_write_sector(uint8_t drv, uint32_t sector, uint8_t *buffer, int len);
+ uint8_t corvus_write_logical_sector(dadr_t *dadr, uint8_t *buffer, int len);
+ uint8_t corvus_read_sector(uint8_t drv, uint32_t sector, uint8_t *buffer, int len);
+ uint8_t corvus_read_logical_sector(dadr_t *dadr, uint8_t *buffer, int len);
+ uint8_t corvus_lock_semaphore(uint8_t *name);
+ uint8_t corvus_unlock_semaphore(uint8_t *name);
+ uint8_t corvus_init_semaphore_table();
+ uint8_t corvus_get_drive_parameters(uint8_t drv);
+ uint8_t corvus_read_boot_block(uint8_t block);
+ uint8_t corvus_enter_prep_mode(uint8_t drv, uint8_t *prep_block);
+ uint8_t corvus_exit_prep_mode();
+ uint8_t corvus_read_firmware_block(uint8_t head, uint8_t sector);
+ uint8_t corvus_write_firmware_block(uint8_t head, uint8_t sector, uint8_t *buffer);
+ uint8_t corvus_format_drive(uint8_t *pattern, uint16_t len);
hard_disk_file *corvus_hdc_file(int id);
void corvus_process_command_packet(bool local_invalid_command_flag);
diff --git a/src/devices/machine/cr511b.cpp b/src/devices/machine/cr511b.cpp
index debd3906fbc..e7678ac1537 100644
--- a/src/devices/machine/cr511b.cpp
+++ b/src/devices/machine/cr511b.cpp
@@ -45,7 +45,7 @@ machine_config_constructor cr511b_device::device_mconfig_additions() const
// cr511b_device - constructor
//-------------------------------------------------
-cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CR511B, "CR-511-B CD-ROM drive", tag, owner, clock, "cr511b", __FILE__),
m_cdrom(*this, "cdrom"),
m_cdda(*this, "cdda"),
diff --git a/src/devices/machine/cr511b.h b/src/devices/machine/cr511b.h
index b4b3529f061..a5ab90d6bf6 100644
--- a/src/devices/machine/cr511b.h
+++ b/src/devices/machine/cr511b.h
@@ -75,7 +75,7 @@ class cr511b_device : public device_t
{
public:
// construction/destruction
- cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
template<class _Object> static devcb_base &set_stch_handler(device_t &device, _Object object)
@@ -141,7 +141,7 @@ private:
int m_cmd;
// data transfer
- //UINT8 m_sector_buffer[CD_MAX_SECTOR_DATA];
+ //uint8_t m_sector_buffer[CD_MAX_SECTOR_DATA];
};
// device type definition
diff --git a/src/devices/machine/cr589.cpp b/src/devices/machine/cr589.cpp
index 8c0ae34f6c9..26ac49d1423 100644
--- a/src/devices/machine/cr589.cpp
+++ b/src/devices/machine/cr589.cpp
@@ -80,7 +80,7 @@ void matsushita_cr589_device::ExecCommand()
}
}
-void matsushita_cr589_device::ReadData( UINT8 *data, int dataLength )
+void matsushita_cr589_device::ReadData( uint8_t *data, int dataLength )
{
switch( command[ 0 ] )
{
@@ -110,7 +110,7 @@ void matsushita_cr589_device::ReadData( UINT8 *data, int dataLength )
}
}
-void matsushita_cr589_device::WriteData( UINT8 *data, int dataLength )
+void matsushita_cr589_device::WriteData( uint8_t *data, int dataLength )
{
switch( command[ 0 ] )
{
@@ -139,7 +139,7 @@ void matsushita_cr589_device::WriteData( UINT8 *data, int dataLength )
// device type definition
const device_type CR589 = &device_creator<matsushita_cr589_device>;
-matsushita_cr589_device::matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+matsushita_cr589_device::matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
atapi_cdrom_device(mconfig, CR589, "Matsushita CR589 CD-ROM Drive", tag, owner, clock, "cr589", __FILE__),
device_nvram_interface(mconfig, *this)
{
diff --git a/src/devices/machine/cr589.h b/src/devices/machine/cr589.h
index 9357f9ec43b..b35537b305b 100644
--- a/src/devices/machine/cr589.h
+++ b/src/devices/machine/cr589.h
@@ -20,11 +20,11 @@ class matsushita_cr589_device : public atapi_cdrom_device,
public device_nvram_interface
{
public:
- matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void ExecCommand() override;
- virtual void WriteData( UINT8 *data, int dataLength ) override;
- virtual void ReadData( UINT8 *data, int dataLength ) override;
+ virtual void WriteData( uint8_t *data, int dataLength ) override;
+ virtual void ReadData( uint8_t *data, int dataLength ) override;
// ksys573 changes discs without telling the cdrom_image_device
virtual void process_buffer() override { atapi_hle_device::process_buffer(); }
@@ -40,7 +40,7 @@ protected:
private:
int download;
- UINT8 buffer[ 65536 ];
+ uint8_t buffer[ 65536 ];
int bufferOffset;
};
diff --git a/src/devices/machine/cs4031.cpp b/src/devices/machine/cs4031.cpp
index fd3a303209f..d2c9286fffa 100644
--- a/src/devices/machine/cs4031.cpp
+++ b/src/devices/machine/cs4031.cpp
@@ -154,7 +154,7 @@ machine_config_constructor cs4031_device::device_mconfig_additions() const
// cs4031_device - constructor
//-------------------------------------------------
-cs4031_device::cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+cs4031_device::cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CS4031, "CS4031", tag, owner, clock, "cs4031", __FILE__),
m_read_ior(*this),
m_write_iow(*this),
@@ -263,7 +263,7 @@ void cs4031_device::device_start()
m_keybc = downcast<at_keyboard_controller_device *>(machine().device(m_keybctag));
m_ram = ram_dev->pointer();
- UINT32 ram_size = ram_dev->size();
+ uint32_t ram_size = ram_dev->size();
// install base memory
m_space->install_ram(0x000000, 0x09ffff, m_ram);
@@ -362,7 +362,7 @@ READ8_MEMBER( cs4031_device::dma_read_word )
if (m_dma_channel == -1)
return 0xff;
- UINT16 result = m_space->read_word((page_offset() & 0xfe0000) | (offset << 1));
+ uint16_t result = m_space->read_word((page_offset() & 0xfe0000) | (offset << 1));
m_dma_high_byte = result >> 8;
return result;
@@ -411,7 +411,7 @@ void cs4031_device::update_dma_clock()
{
if (m_dma_clock_divider[m_registers[DMA_CLOCK] & 0x0f] != 0)
{
- UINT32 dma_clock = clock() / m_dma_clock_divider[m_registers[DMA_CLOCK] & 0x0f];
+ uint32_t dma_clock = clock() / m_dma_clock_divider[m_registers[DMA_CLOCK] & 0x0f];
if (!BIT(m_registers[DMA_WAIT_STATE], 0))
dma_clock /= 2;
@@ -503,7 +503,7 @@ WRITE8_MEMBER( cs4031_device::config_address_w )
READ8_MEMBER( cs4031_device::config_data_r )
{
- UINT8 result = 0xff;
+ uint8_t result = 0xff;
if (m_address_valid)
{
@@ -891,7 +891,7 @@ WRITE8_MEMBER( cs4031_device::sysctrl_w )
READ8_MEMBER( cs4031_device::sysctrl_r )
{
- UINT8 result = 0; // reserved bits read as 0?
+ uint8_t result = 0; // reserved bits read as 0?
result |= m_cpureset << 0;
result |= m_fast_gatea20 << 1;
diff --git a/src/devices/machine/cs4031.h b/src/devices/machine/cs4031.h
index 9a194a8699b..629f3ecd6c3 100644
--- a/src/devices/machine/cs4031.h
+++ b/src/devices/machine/cs4031.h
@@ -82,7 +82,7 @@ class cs4031_device : public device_t
{
public:
// construction/destruction
- cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cs4031_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;
@@ -108,9 +108,9 @@ public:
DECLARE_READ8_MEMBER( dma1_ior1_r ) { return m_read_ior(1); }
DECLARE_READ8_MEMBER( dma1_ior2_r ) { return m_read_ior(2); }
DECLARE_READ8_MEMBER( dma1_ior3_r ) { return m_read_ior(3); }
- DECLARE_READ8_MEMBER( dma2_ior1_r ) { UINT16 result = m_read_ior(5); m_dma_high_byte = result >> 8; return result; }
- DECLARE_READ8_MEMBER( dma2_ior2_r ) { UINT16 result = m_read_ior(6); m_dma_high_byte = result >> 8; return result; }
- DECLARE_READ8_MEMBER( dma2_ior3_r ) { UINT16 result = m_read_ior(7); m_dma_high_byte = result >> 8; return result; }
+ DECLARE_READ8_MEMBER( dma2_ior1_r ) { uint16_t result = m_read_ior(5); m_dma_high_byte = result >> 8; return result; }
+ DECLARE_READ8_MEMBER( dma2_ior2_r ) { uint16_t result = m_read_ior(6); m_dma_high_byte = result >> 8; return result; }
+ DECLARE_READ8_MEMBER( dma2_ior3_r ) { uint16_t result = m_read_ior(7); m_dma_high_byte = result >> 8; return result; }
DECLARE_WRITE8_MEMBER( dma1_iow0_w ) { m_write_iow(0, data, 0xffff); }
DECLARE_WRITE8_MEMBER( dma1_iow1_w ) { m_write_iow(1, data, 0xffff); }
DECLARE_WRITE8_MEMBER( dma1_iow2_w ) { m_write_iow(2, data, 0xffff); }
@@ -228,9 +228,9 @@ private:
address_space *m_space;
address_space *m_space_io;
- UINT8 *m_isa;
- UINT8 *m_bios;
- UINT8 *m_ram;
+ uint8_t *m_isa;
+ uint8_t *m_bios;
+ uint8_t *m_ram;
// ipc core devices
required_device<am9517a_device> m_dma1;
@@ -241,11 +241,11 @@ private:
required_device<ds12885_device> m_rtc;
int m_dma_eop;
- UINT8 m_dma_page[0x10];
- UINT8 m_dma_high_byte;
+ uint8_t m_dma_page[0x10];
+ uint8_t m_dma_high_byte;
int m_dma_channel;
- UINT8 m_portb;
+ uint8_t m_portb;
int m_refresh_toggle;
int m_iochck;
int m_nmi_mask;
@@ -276,10 +276,10 @@ private:
SOFT_RESET_AND_GATEA20 = 0x1c
};
- UINT8 m_address;
+ uint8_t m_address;
bool m_address_valid;
- UINT8 m_registers[0x20];
+ uint8_t m_registers[0x20];
};
diff --git a/src/devices/machine/cs8221.cpp b/src/devices/machine/cs8221.cpp
index d7f38de1bd7..2d3d0e2f218 100644
--- a/src/devices/machine/cs8221.cpp
+++ b/src/devices/machine/cs8221.cpp
@@ -58,7 +58,7 @@ static const char *const register_names[] =
// cs8221_device - constructor
//-------------------------------------------------
-cs8221_device::cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cs8221_device::cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CS8221, "CS8221", tag, owner, clock, "cs8221", __FILE__),
m_address(0),
m_address_valid(false)
@@ -118,7 +118,7 @@ WRITE8_MEMBER( cs8221_device::address_w )
READ8_MEMBER( cs8221_device::data_r )
{
- UINT8 result = 0xff;
+ uint8_t result = 0xff;
if (m_address_valid)
{
diff --git a/src/devices/machine/cs8221.h b/src/devices/machine/cs8221.h
index b6a403bafba..6041ae76135 100644
--- a/src/devices/machine/cs8221.h
+++ b/src/devices/machine/cs8221.h
@@ -44,7 +44,7 @@ class cs8221_device : public device_t
{
public:
// construction/destruction
- cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER( address_w );
DECLARE_READ8_MEMBER( data_r );
@@ -65,12 +65,12 @@ private:
// internal state
//address_space *m_space;
- //UINT8 *m_isa;
- //UINT8 *m_bios;
- //UINT8 *m_ram;
+ //uint8_t *m_isa;
+ //uint8_t *m_bios;
+ //uint8_t *m_ram;
// address selection
- UINT8 m_address;
+ uint8_t m_address;
bool m_address_valid;
const char *m_cputag;
@@ -78,7 +78,7 @@ private:
const char *m_biostag;
- UINT8 m_registers[0x10];
+ uint8_t m_registers[0x10];
};
diff --git a/src/devices/machine/diablo_hd.cpp b/src/devices/machine/diablo_hd.cpp
index d5147c2b3a2..6b32fd83495 100644
--- a/src/devices/machine/diablo_hd.cpp
+++ b/src/devices/machine/diablo_hd.cpp
@@ -57,7 +57,7 @@
* </PRE>
*/
-diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, DIABLO_HD, "Diablo Disk", tag, owner, clock, "diablo_hd", __FILE__),
#if DIABLO_DEBUG
m_log_level(8),
@@ -230,20 +230,20 @@ void diablo_hd_device::set_sector_callback(void *cookie, void (*callback)(void *
* 256 words data
*/
typedef struct {
- UINT8 pageno[2*DIABLO_PAGENO_WORDS]; //!< sector page number
- UINT8 header[2*DIABLO_HEADER_WORDS]; //!< sector header words
- UINT8 label[2*DIABLO_LABEL_WORDS]; //!< sector label words
- UINT8 data[2*DIABLO_DATA_WORDS]; //!< sector data words
+ uint8_t pageno[2*DIABLO_PAGENO_WORDS]; //!< sector page number
+ uint8_t header[2*DIABLO_HEADER_WORDS]; //!< sector header words
+ uint8_t label[2*DIABLO_LABEL_WORDS]; //!< sector label words
+ uint8_t data[2*DIABLO_DATA_WORDS]; //!< sector data words
} diablo_sector_t;
/**
- * @brief write a bit into an array of UINT32
+ * @brief write a bit into an array of uint32_t
* @param bits pointer to array of bits
* @param dst destination index
* @param bit bit value
* @return next destination index
*/
-static inline size_t WRBIT(UINT32* bits, size_t dst, int bit)
+static inline size_t WRBIT(uint32_t* bits, size_t dst, int bit)
{
if (bit) {
bits[(dst)/32] |= 1 << ((dst) % 32);
@@ -254,13 +254,13 @@ static inline size_t WRBIT(UINT32* bits, size_t dst, int bit)
}
/**
- * @brief read a bit from an array of UINT32
+ * @brief read a bit from an array of uint32_t
* @param bits pointer to array of bits
* @param src source index
* @param bit reference to the bit to set
* @return next source index
*/
-static inline size_t RDBIT(UINT32* bits, size_t src, int& bit)
+static inline size_t RDBIT(uint32_t* bits, size_t src, int& bit)
{
bit = (bits[src/32] >> (src % 32)) & 1;
return ++src;
@@ -306,7 +306,7 @@ void diablo_hd_device::read_sector()
if (m_disk) {
// allocate a buffer for this page
- m_cache[m_page] = std::make_unique<UINT8[]>(sizeof(diablo_sector_t));
+ m_cache[m_page] = std::make_unique<uint8_t[]>(sizeof(diablo_sector_t));
// and read the page from the hard_disk image
if (hard_disk_read(m_disk, m_page, m_cache[m_page].get())) {
LOG_DRIVE((2,"[DHD%u] CHS:%03d/%d/%02d => page:%d loaded\n", m_unit, m_cylinder, m_head, m_sector, m_page));
@@ -327,7 +327,7 @@ void diablo_hd_device::read_sector()
* @param start start value for the checksum
* @return returns the checksum of the record
*/
-int diablo_hd_device::cksum(UINT8 *src, size_t size, int start)
+int diablo_hd_device::cksum(uint8_t *src, size_t size, int start)
{
int sum = start;
/* compute XOR of all words */
@@ -346,7 +346,7 @@ int diablo_hd_device::cksum(UINT8 *src, size_t size, int start)
* @param size number of words to write
* @return offset to next destination bit
*/
-size_t diablo_hd_device::expand_zeroes(UINT32 *bits, size_t dst, size_t size)
+size_t diablo_hd_device::expand_zeroes(uint32_t *bits, size_t dst, size_t size)
{
for (size_t offs = 0; offs < 32 * size; offs += 2) {
dst = WRBIT(bits, dst, 1); // write the clock bit
@@ -363,7 +363,7 @@ size_t diablo_hd_device::expand_zeroes(UINT32 *bits, size_t dst, size_t size)
* @param size number of words to write
* @return offset to next destination bit
*/
-size_t diablo_hd_device::expand_sync(UINT32 *bits, size_t dst, size_t size)
+size_t diablo_hd_device::expand_sync(uint32_t *bits, size_t dst, size_t size)
{
for (size_t offs = 0; offs < 32 * size - 2; offs += 2) {
dst = WRBIT(bits, dst, 1); // write the clock bit
@@ -383,7 +383,7 @@ size_t diablo_hd_device::expand_sync(UINT32 *bits, size_t dst, size_t size)
* @param size size of the record in bytes
* @return offset to next destination bit
*/
-size_t diablo_hd_device::expand_record(UINT32 *bits, size_t dst, UINT8 *field, size_t size)
+size_t diablo_hd_device::expand_record(uint32_t *bits, size_t dst, uint8_t *field, size_t size)
{
for (size_t offs = 0; offs < size; offs += 2) {
int word = field[size - 2 - offs] + 256 * field[size - 2 - offs + 1];
@@ -405,7 +405,7 @@ size_t diablo_hd_device::expand_record(UINT32 *bits, size_t dst, UINT8 *field, s
* @param size size of the record in bytes
* @return offset to next destination bit
*/
-size_t diablo_hd_device::expand_cksum(UINT32 *bits, size_t dst, UINT8 *field, size_t size)
+size_t diablo_hd_device::expand_cksum(uint32_t *bits, size_t dst, uint8_t *field, size_t size)
{
int word = cksum(field, size, 0521);
for (size_t bit = 0; bit < 32; bit += 2) {
@@ -422,7 +422,7 @@ size_t diablo_hd_device::expand_cksum(UINT32 *bits, size_t dst, UINT8 *field, si
* @param page page number (0 to DRIVE_PAGES-1)
* @return pointer to the newly allocated array of bits
*/
-UINT32* diablo_hd_device::expand_sector()
+uint32_t* diablo_hd_device::expand_sector()
{
size_t dst;
@@ -440,7 +440,7 @@ UINT32* diablo_hd_device::expand_sector()
diablo_sector_t *s = reinterpret_cast<diablo_sector_t *>(m_cache[m_page].get());
/* allocate a bits image */
- UINT32 *bits = auto_alloc_array_clear(machine(), UINT32, 400);
+ uint32_t *bits = auto_alloc_array_clear(machine(), uint32_t, 400);
if (m_diablo31) {
/* write sync bit after (MFROBL-MRPAL) words - 1 bit */
@@ -492,7 +492,7 @@ UINT32* diablo_hd_device::expand_sector()
}
#if DIABLO_DEBUG
-void diablo_hd_device::dump_ascii(UINT8 *src, size_t size)
+void diablo_hd_device::dump_ascii(uint8_t *src, size_t size)
{
size_t offs;
LOG_DRIVE((0," ["));
@@ -511,7 +511,7 @@ void diablo_hd_device::dump_ascii(UINT8 *src, size_t size)
* @param size size of the record in bytes
* @param name name to print before the dump
*/
-size_t diablo_hd_device::dump_record(UINT8 *src, size_t addr, size_t size, const char *name, int cr)
+size_t diablo_hd_device::dump_record(uint8_t *src, size_t addr, size_t size, const char *name, int cr)
{
size_t offs;
LOG_DRIVE((0,"%s:", name));
@@ -545,9 +545,9 @@ size_t diablo_hd_device::dump_record(UINT8 *src, size_t addr, size_t size, const
* @param size number of words to scan for a sync word
* @return next source index for reading
*/
-size_t diablo_hd_device::squeeze_sync(UINT32 *bits, size_t src, size_t size)
+size_t diablo_hd_device::squeeze_sync(uint32_t *bits, size_t src, size_t size)
{
- UINT32 accu = 0;
+ uint32_t accu = 0;
/* hunt for the first 0x0001 word */
for (size_t bitcount = 0, offs = 0; offs < size; /* */) {
/*
@@ -581,9 +581,9 @@ size_t diablo_hd_device::squeeze_sync(UINT32 *bits, size_t src, size_t size)
* @param size number of words to scan for a sync word
* @return next source index for reading
*/
-size_t diablo_hd_device::squeeze_unsync(UINT32 *bits, size_t src, size_t size)
+size_t diablo_hd_device::squeeze_unsync(uint32_t *bits, size_t src, size_t size)
{
- UINT32 accu = 0;
+ uint32_t accu = 0;
/* hunt for the first 0 word (16 x 0 bits) */
for (size_t bitcount = 0, offs = 0; offs < size; /* */) {
/*
@@ -617,9 +617,9 @@ size_t diablo_hd_device::squeeze_unsync(UINT32 *bits, size_t src, size_t size)
* @param size size of the record in bytes
* @return next source index for reading
*/
-size_t diablo_hd_device::squeeze_record(UINT32 *bits, size_t src, UINT8 *field, size_t size)
+size_t diablo_hd_device::squeeze_record(uint32_t *bits, size_t src, uint8_t *field, size_t size)
{
- UINT32 accu = 0;
+ uint32_t accu = 0;
for (size_t bitcount = 0, offs = 0; offs < size; /* */) {
int bit;
src = RDBIT(bits,src,bit); // skip clock
@@ -646,9 +646,9 @@ size_t diablo_hd_device::squeeze_record(UINT32 *bits, size_t src, UINT8 *field,
* @param cksum pointer to an int to receive the checksum word
* @return next source index for reading
*/
-size_t diablo_hd_device::squeeze_cksum(UINT32 *bits, size_t src, int *cksum)
+size_t diablo_hd_device::squeeze_cksum(uint32_t *bits, size_t src, int *cksum)
{
- UINT32 accu = 0;
+ uint32_t accu = 0;
for (size_t bitcount = 0; bitcount < 32; bitcount += 2) {
int bit;
@@ -719,7 +719,7 @@ void diablo_hd_device::squeeze_sector()
LOG_DRIVE((0,"[DHD%u] no bits\n", m_unit));
return;
}
- UINT32 *bits = m_bits[m_page];
+ uint32_t *bits = m_bits[m_page];
// pointer to sector buffer
s = reinterpret_cast<diablo_sector_t *>(m_cache[m_page].get());
@@ -1159,7 +1159,7 @@ void diablo_hd_device::wr_data(int index, int wrdata)
return; // invalid page
}
- UINT32 *bits = expand_sector();
+ uint32_t *bits = expand_sector();
if (!bits) {
LOG_DRIVE((0,"[DHD%u] no bits\n", m_unit));
return; // invalid unit
@@ -1211,7 +1211,7 @@ int diablo_hd_device::rd_data(int index)
return 1; // invalid unit
}
- UINT32 *bits = expand_sector();
+ uint32_t *bits = expand_sector();
if (!bits) {
LOG_DRIVE((0,"[DHD%u] no bits\n", m_unit));
return 1; // invalid page
@@ -1254,7 +1254,7 @@ int diablo_hd_device::rd_clock(int index)
return 1; // invalid page
}
- UINT32 *bits = expand_sector();
+ uint32_t *bits = expand_sector();
if (!bits) {
LOG_DRIVE((0,"[DHD%u] no bits\n", m_unit));
return 1; // invalid unit
@@ -1399,7 +1399,7 @@ void diablo_hd_device::device_reset()
if (!m_handle)
return;
// for units with a CHD assigned to them start the timer
- m_bits = auto_alloc_array_clear(machine(), UINT32*, m_pages);
+ m_bits = auto_alloc_array_clear(machine(), uint32_t*, m_pages);
timer_set(m_sector_time - m_sector_mark_0_time, 1, 0);
read_sector();
}
diff --git a/src/devices/machine/diablo_hd.h b/src/devices/machine/diablo_hd.h
index 786e8ed1139..9601d69dc5d 100644
--- a/src/devices/machine/diablo_hd.h
+++ b/src/devices/machine/diablo_hd.h
@@ -22,7 +22,7 @@ extern const device_type DIABLO_HD;
class diablo_hd_device : public device_t
{
public:
- diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~diablo_hd_device();
static const int DIABLO_UNIT_MAX = 2; //!< max number of drive units
@@ -108,8 +108,8 @@ private:
int m_head; //!< current head (track) number on cylinder
int m_sector; //!< current sector number in track
int m_page; //!< current page (derived from cylinder, head and sector)
- std::unique_ptr<UINT8[]> m_cache[2 * DIABLO_PAGES]; //!< pages raw bytes
- UINT32** m_bits; //!< pages expanded to bits
+ std::unique_ptr<uint8_t[]> m_cache[2 * DIABLO_PAGES]; //!< pages raw bytes
+ uint32_t** m_bits; //!< pages expanded to bits
int m_rdfirst; //!< set to first bit of a sector that is read from
int m_rdlast; //!< set to last bit of a sector that was read from
int m_wrfirst; //!< set to non-zero if a sector is written to
@@ -125,42 +125,42 @@ private:
void read_sector();
//! compute the checksum of a record
- int cksum(UINT8 *src, size_t size, int start);
+ int cksum(uint8_t *src, size_t size, int start);
//! expand a series of clock bits and 0 data bits
- size_t expand_zeroes(UINT32 *bits, size_t dst, size_t size);
+ size_t expand_zeroes(uint32_t *bits, size_t dst, size_t size);
//! expand a series of 0 words and write a final sync bit
- size_t expand_sync(UINT32 *bits, size_t dst, size_t size);
+ size_t expand_sync(uint32_t *bits, size_t dst, size_t size);
//! expand a record of words into a array of bits at dst
- size_t expand_record(UINT32 *bits, size_t dst, UINT8 *field, size_t size);
+ size_t expand_record(uint32_t *bits, size_t dst, uint8_t *field, size_t size);
//! expand a record's checksum word to 32 bits
- size_t expand_cksum(UINT32 *bits, size_t dst, UINT8 *field, size_t size);
+ size_t expand_cksum(uint32_t *bits, size_t dst, uint8_t *field, size_t size);
//! expand a sector into an array of clock and data bits
- UINT32* expand_sector();
+ uint32_t* expand_sector();
#if DIABLO_DEBUG
//! dump a number of words as ASCII characters
- void dump_ascii(UINT8 *src, size_t size);
+ void dump_ascii(uint8_t *src, size_t size);
//! dump a record's contents
- size_t dump_record(UINT8 *src, size_t addr, size_t size, const char *name, int cr);
+ size_t dump_record(uint8_t *src, size_t addr, size_t size, const char *name, int cr);
#endif
//! find a sync bit in an array of clock and data bits
- size_t squeeze_sync(UINT32 *bits, size_t src, size_t size);
+ size_t squeeze_sync(uint32_t *bits, size_t src, size_t size);
//! find a 16 x 0 bits sequence in an array of clock and data bits
- size_t squeeze_unsync(UINT32 *bits, size_t src, size_t size);
+ size_t squeeze_unsync(uint32_t *bits, size_t src, size_t size);
//! squeeze an array of clock and data bits into a sector's record
- size_t squeeze_record(UINT32 *bits, size_t src, UINT8 *field, size_t size);
+ size_t squeeze_record(uint32_t *bits, size_t src, uint8_t *field, size_t size);
//! squeeze an array of 32 clock and data bits into a checksum word
- size_t squeeze_cksum(UINT32 *bits, size_t src, int *cksum);
+ size_t squeeze_cksum(uint32_t *bits, size_t src, int *cksum);
//! squeeze a array of clock and data bits into a sector's data
void squeeze_sector();
diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp
index ba1167eb2d5..ae7fe93efba 100644
--- a/src/devices/machine/dmac.cpp
+++ b/src/devices/machine/dmac.cpp
@@ -37,7 +37,7 @@ const device_type DMAC = &device_creator<dmac_device>;
// dmac_device - constructor
//-------------------------------------------------
-dmac_device::dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dmac_device::dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, DMAC, "DMAC DMA Controller", tag, owner, clock, "dmac", __FILE__),
amiga_autoconfig(),
m_cfgout_handler(*this),
@@ -174,7 +174,7 @@ void dmac_device::start_dma()
READ16_MEMBER( dmac_device::register_read )
{
- UINT16 data = 0xffff;
+ uint16_t data = 0xffff;
// autoconfig handles this
if (offset < 0x20)
@@ -275,7 +275,7 @@ WRITE16_MEMBER( dmac_device::register_write )
logerror("%s('%s'): write wtc hi %04x [mask = %04x]\n", shortname(), basetag(), data, mem_mask);
m_wtc &= 0x0000ffff;
- m_wtc |= ((UINT32) data) << 16;
+ m_wtc |= ((uint32_t) data) << 16;
break;
case 0x41:
@@ -291,7 +291,7 @@ WRITE16_MEMBER( dmac_device::register_write )
logerror("%s('%s'): write acr hi %04x [mask = %04x]\n", shortname(), basetag(), data, mem_mask);
m_acr &= 0x0000ffff;
- m_acr |= ((UINT32) data) << 16;
+ m_acr |= ((uint32_t) data) << 16;
break;
case 0x43:
diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h
index 8580b4c86ab..6dcf201eb3b 100644
--- a/src/devices/machine/dmac.h
+++ b/src/devices/machine/dmac.h
@@ -55,7 +55,7 @@ class dmac_device : public device_t, public amiga_autoconfig
{
public:
// construction/destruction
- dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
template<class _Object> static devcb_base &set_cfgout_handler(device_t &device, _Object object)
@@ -80,8 +80,8 @@ public:
{ return downcast<dmac_device &>(device).m_io_write_handler.set_callback(object); }
void set_address_space(address_space *space) { m_space = space; };
- void set_rom(UINT8 *rom) { m_rom = rom; };
- void set_ram(UINT8 *ram) { m_ram = ram; };
+ void set_rom(uint8_t *rom) { m_rom = rom; };
+ void set_ram(uint8_t *ram) { m_ram = ram; };
// input lines
DECLARE_WRITE_LINE_MEMBER( configin_w );
@@ -140,8 +140,8 @@ private:
devcb_write8 m_io_write_handler;
address_space *m_space;
- UINT8 *m_rom;
- UINT8 *m_ram;
+ uint8_t *m_rom;
+ uint8_t *m_ram;
int m_ram_size;
// autoconfig state
@@ -151,10 +151,10 @@ private:
int m_rst;
// register
- UINT16 m_cntr; // control register
- UINT16 m_istr; // interrupt status register
- UINT32 m_wtc; // word transfer count
- UINT32 m_acr; // address control register
+ uint16_t m_cntr; // control register
+ uint16_t m_istr; // interrupt status register
+ uint32_t m_wtc; // word transfer count
+ uint32_t m_acr; // address control register
bool m_dma_active;
diff --git a/src/devices/machine/dp8390.cpp b/src/devices/machine/dp8390.cpp
index 32d41d73896..64f6fcbb407 100644
--- a/src/devices/machine/dp8390.cpp
+++ b/src/devices/machine/dp8390.cpp
@@ -9,17 +9,17 @@
const device_type DP8390D = &device_creator<dp8390d_device>;
const device_type RTL8019A = &device_creator<rtl8019a_device>;
-dp8390d_device::dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+dp8390d_device::dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: dp8390_device(mconfig, DP8390D, "DP8390D", tag, owner, clock, 10.0f, "dp8390d", __FILE__) {
m_type = TYPE_DP8390D;
}
-rtl8019a_device::rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+rtl8019a_device::rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: dp8390_device(mconfig, RTL8019A, "RTL8019A", tag, owner, clock, 10.0f, "rtl8019a", __FILE__) {
m_type = TYPE_RTL8019A;
}
-dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, float bandwidth, const char *shortname, const char *source)
+dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, float bandwidth, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_network_interface(mconfig, *this, bandwidth), m_type(0),
m_irq_cb(*this),
@@ -64,9 +64,9 @@ void dp8390_device::check_dma_complete() {
}
void dp8390_device::do_tx() {
- std::vector<UINT8> buf;
+ std::vector<uint8_t> buf;
int i;
- UINT32 high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
+ uint32_t high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
if(m_reset) return;
if(LOOPBACK) return; // TODO: loopback
m_regs.tsr = 0;
@@ -91,7 +91,7 @@ void dp8390_device::do_tx() {
check_irq();
}
-void dp8390_device::set_cr(UINT8 newcr) {
+void dp8390_device::set_cr(uint8_t newcr) {
int ostate = ((m_regs.cr & 3) == 2);
m_regs.cr = newcr;
if((newcr & 1) && (ostate == 1)) return stop();
@@ -117,10 +117,10 @@ void dp8390_device::recv_overflow() {
return;
}
-void dp8390_device::recv(UINT8 *buf, int len) {
+void dp8390_device::recv(uint8_t *buf, int len) {
int i;
- UINT16 start = (m_regs.curr << 8), offset;
- UINT32 high16;
+ uint16_t start = (m_regs.curr << 8), offset;
+ uint32_t high16;
if(m_reset) return;
if(m_regs.curr == m_regs.pstop) start = m_regs.pstart << 8;
offset = start + 4;
@@ -162,7 +162,7 @@ void dp8390_device::recv(UINT8 *buf, int len) {
check_irq();
}
-void dp8390_device::recv_cb(UINT8 *buf, int len) {
+void dp8390_device::recv_cb(uint8_t *buf, int len) {
if(!LOOPBACK) recv(buf, len);
}
@@ -175,9 +175,9 @@ WRITE_LINE_MEMBER(dp8390_device::dp8390_reset) {
}
READ16_MEMBER(dp8390_device::dp8390_r) {
- UINT16 data;
+ uint16_t data;
if(m_cs) {
- UINT32 high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
+ uint32_t high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
if(m_regs.dcr & 1) {
m_regs.crda &= ~1;
data = m_mem_read_cb(high16 + m_regs.crda++);
@@ -346,7 +346,7 @@ READ16_MEMBER(dp8390_device::dp8390_r) {
WRITE16_MEMBER(dp8390_device::dp8390_w) {
if(m_cs) {
- UINT32 high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
+ uint32_t high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
if(m_regs.dcr & 1) {
data = DP8390_BYTE_ORDER(data);
m_regs.crda &= ~1;
diff --git a/src/devices/machine/dp8390.h b/src/devices/machine/dp8390.h
index 49341e30e49..9f21cee9e75 100644
--- a/src/devices/machine/dp8390.h
+++ b/src/devices/machine/dp8390.h
@@ -38,7 +38,7 @@ class dp8390_device : public device_t,
{
public:
// construction/destruction
- dp8390_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, float bandwidth, const char *shortname, const char *source);
+ dp8390_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, float bandwidth, const char *shortname, const char *source);
template<class _Object> static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast<dp8390_device &>(device).m_irq_cb.set_callback(object); }
template<class _Object> static devcb_base &set_breq_callback(device_t &device, _Object object) { return downcast<dp8390_device &>(device).m_breq_cb.set_callback(object); }
@@ -49,7 +49,7 @@ public:
DECLARE_READ16_MEMBER( dp8390_r );
DECLARE_WRITE_LINE_MEMBER( dp8390_cs );
DECLARE_WRITE_LINE_MEMBER( dp8390_reset );
- void recv_cb(UINT8 *buf, int len) override;
+ void recv_cb(uint8_t *buf, int len) override;
protected:
// device-level overrides
@@ -69,74 +69,74 @@ private:
devcb_read8 m_mem_read_cb;
devcb_write8 m_mem_write_cb;
- void set_cr(UINT8 newcr);
+ void set_cr(uint8_t newcr);
void check_dma_complete();
void do_tx();
void check_irq() { m_irq_cb((m_regs.imr & m_regs.isr & 0x7f)?ASSERT_LINE:CLEAR_LINE); }
void recv_overflow();
void stop();
- void recv(UINT8 *buf, int len);
+ void recv(uint8_t *buf, int len);
int m_reset;
bool m_cs;
int m_rdma_active;
struct {
- UINT8 cr;
- UINT16 clda;
- UINT8 pstart;
- UINT8 pstop;
- UINT8 bnry;
- UINT8 tsr;
- UINT8 tpsr;
- UINT8 ncr;
- UINT8 fifo;
- UINT16 tbcr;
- UINT8 isr;
- UINT16 crda;
- UINT16 rsar;
- UINT16 rbcr;
- UINT8 rsr;
- UINT8 rcr;
- UINT8 cntr0;
- UINT8 tcr;
- UINT8 cntr1;
- UINT8 dcr;
- UINT8 cntr2;
- UINT8 imr;
-
- UINT8 par[6];
- UINT8 curr;
- UINT8 mar[8];
-
- UINT8 rnpp;
- UINT8 lnpp;
- UINT16 ac;
+ uint8_t cr;
+ uint16_t clda;
+ uint8_t pstart;
+ uint8_t pstop;
+ uint8_t bnry;
+ uint8_t tsr;
+ uint8_t tpsr;
+ uint8_t ncr;
+ uint8_t fifo;
+ uint16_t tbcr;
+ uint8_t isr;
+ uint16_t crda;
+ uint16_t rsar;
+ uint16_t rbcr;
+ uint8_t rsr;
+ uint8_t rcr;
+ uint8_t cntr0;
+ uint8_t tcr;
+ uint8_t cntr1;
+ uint8_t dcr;
+ uint8_t cntr2;
+ uint8_t imr;
+
+ uint8_t par[6];
+ uint8_t curr;
+ uint8_t mar[8];
+
+ uint8_t rnpp;
+ uint8_t lnpp;
+ uint16_t ac;
} m_regs;
struct {
- UINT8 cr9346;
- UINT8 bpage;
- UINT8 config0;
- UINT8 config1;
- UINT8 config2;
- UINT8 config3;
- UINT8 config4;
- UINT8 csnsav;
- UINT8 intr;
+ uint8_t cr9346;
+ uint8_t bpage;
+ uint8_t config0;
+ uint8_t config1;
+ uint8_t config2;
+ uint8_t config3;
+ uint8_t config4;
+ uint8_t csnsav;
+ uint8_t intr;
} m_8019regs;
};
class rtl8019a_device : public dp8390_device
{
public:
- rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class dp8390d_device : public dp8390_device
{
public:
- dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
// device type definition
diff --git a/src/devices/machine/ds1204.cpp b/src/devices/machine/ds1204.cpp
index 56d57267ad3..62df5bce313 100644
--- a/src/devices/machine/ds1204.cpp
+++ b/src/devices/machine/ds1204.cpp
@@ -29,7 +29,7 @@ inline void ATTR_PRINTF( 3, 4 ) ds1204_device::verboselog( int n_level, const ch
// device type definition
const device_type DS1204 = &device_creator<ds1204_device>;
-ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
+ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock )
: device_t( mconfig, DS1204, "DS1204", tag, owner, clock, "ds1204", __FILE__ ),
device_nvram_interface(mconfig, *this),
m_region(*this, DEVICE_SELF),
@@ -80,7 +80,7 @@ void ds1204_device::nvram_default()
}
else
{
- UINT8 *region = m_region->base();
+ uint8_t *region = m_region->base();
memcpy( m_unique_pattern, region, sizeof( m_unique_pattern ) ); region += sizeof( m_unique_pattern );
memcpy( m_identification, region, sizeof( m_identification ) ); region += sizeof( m_identification );
@@ -111,7 +111,7 @@ void ds1204_device::new_state( int state )
m_bit = 0;
}
-void ds1204_device::writebit( UINT8 *buffer )
+void ds1204_device::writebit( uint8_t *buffer )
{
if( m_clk )
{
@@ -131,7 +131,7 @@ void ds1204_device::writebit( UINT8 *buffer )
}
}
-void ds1204_device::readbit( UINT8 *buffer )
+void ds1204_device::readbit( uint8_t *buffer )
{
if( !m_clk )
{
diff --git a/src/devices/machine/ds1204.h b/src/devices/machine/ds1204.h
index 35e84c7771f..20d80bad208 100644
--- a/src/devices/machine/ds1204.h
+++ b/src/devices/machine/ds1204.h
@@ -22,7 +22,7 @@ class ds1204_device : public device_t,
{
public:
// construction/destruction
- ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock );
+ ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock );
DECLARE_WRITE_LINE_MEMBER( write_rst );
DECLARE_WRITE_LINE_MEMBER( write_clk );
@@ -41,8 +41,8 @@ protected:
private:
inline void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, const char *s_fmt, ... );
void new_state(int state);
- void writebit(UINT8 *buffer);
- void readbit(UINT8 *buffer);
+ void writebit(uint8_t *buffer);
+ void readbit(uint8_t *buffer);
enum state_t
{
@@ -80,12 +80,12 @@ private:
int m_dqr;
int m_state;
int m_bit;
- UINT8 m_command[3];
- UINT8 m_compare_register[8];
- UINT8 m_unique_pattern[2];
- UINT8 m_identification[8];
- UINT8 m_security_match[8];
- UINT8 m_secure_memory[16];
+ uint8_t m_command[3];
+ uint8_t m_compare_register[8];
+ uint8_t m_unique_pattern[2];
+ uint8_t m_identification[8];
+ uint8_t m_security_match[8];
+ uint8_t m_secure_memory[16];
};
diff --git a/src/devices/machine/ds128x.cpp b/src/devices/machine/ds128x.cpp
index 5b7fa8e0663..c39e239d6a7 100644
--- a/src/devices/machine/ds128x.cpp
+++ b/src/devices/machine/ds128x.cpp
@@ -10,7 +10,7 @@ const device_type DS12885 = &device_creator<ds12885_device>;
// ds12885_device - constructor
//-------------------------------------------------
-ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: mc146818_device(mconfig, DS12885, "DS12885", tag, owner, clock, "ds12885", __FILE__)
{
}
diff --git a/src/devices/machine/ds128x.h b/src/devices/machine/ds128x.h
index 7dbd2deb92c..feb10b84ecd 100644
--- a/src/devices/machine/ds128x.h
+++ b/src/devices/machine/ds128x.h
@@ -14,7 +14,7 @@ class ds12885_device : public mc146818_device
{
public:
// construction/destruction
- ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual int data_size() override { return 128; }
diff --git a/src/devices/machine/ds1302.cpp b/src/devices/machine/ds1302.cpp
index b6f6b0675b4..1f5c1ad4718 100644
--- a/src/devices/machine/ds1302.cpp
+++ b/src/devices/machine/ds1302.cpp
@@ -72,7 +72,7 @@ const device_type DS1302 = &device_creator<ds1302_device>;
// ds1302_device - constructor
//-------------------------------------------------
-ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS1302, "DS1302", tag, owner, clock, "ds1302", __FILE__),
device_rtc_interface(mconfig, *this),
device_nvram_interface(mconfig, *this)
diff --git a/src/devices/machine/ds1302.h b/src/devices/machine/ds1302.h
index 273bd6bbc9e..b3e318a86f0 100644
--- a/src/devices/machine/ds1302.h
+++ b/src/devices/machine/ds1302.h
@@ -44,7 +44,7 @@ class ds1302_device : public device_t,
{
public:
// construction/destruction
- ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE_LINE_MEMBER( ce_w );
DECLARE_WRITE_LINE_MEMBER( sclk_w );
@@ -76,13 +76,13 @@ private:
int m_io;
int m_state;
int m_bits;
- UINT8 m_cmd;
- UINT8 m_data;
+ uint8_t m_cmd;
+ uint8_t m_data;
int m_addr;
- UINT8 m_reg[9];
- UINT8 m_user[9];
- UINT8 m_ram[0x20];
+ uint8_t m_reg[9];
+ uint8_t m_user[9];
+ uint8_t m_ram[0x20];
// timers
emu_timer *m_clock_timer;
diff --git a/src/devices/machine/ds1315.cpp b/src/devices/machine/ds1315.cpp
index e9c984e4716..ca07dfcd24e 100644
--- a/src/devices/machine/ds1315.cpp
+++ b/src/devices/machine/ds1315.cpp
@@ -27,7 +27,7 @@
const device_type DS1315 = &device_creator<ds1315_device>;
-ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS1315, "Dallas Semiconductor DS1315", tag, owner, clock, "ds1315", __FILE__), m_mode(), m_count(0)
{
}
@@ -69,7 +69,7 @@ void ds1315_device::device_reset()
LOCAL VARIABLES
***************************************************************************/
-static const UINT8 ds1315_pattern[] =
+static const uint8_t ds1315_pattern[] =
{
1, 0, 1, 0, 0, 0, 1, 1,
0, 1, 0, 1, 1, 1, 0, 0,
@@ -135,7 +135,7 @@ READ8_MEMBER( ds1315_device::read_1 )
READ8_MEMBER( ds1315_device::read_data )
{
- UINT8 result;
+ uint8_t result;
if (m_mode == DS_CALENDAR_IO)
{
@@ -233,7 +233,7 @@ void ds1315_device::input_raw_data()
{
int raw[8], i, j;
raw[0] = raw[1] = raw[2] = raw[3] = raw[4] = raw[5] = raw[6] = raw[7] = 0;
- UINT8 flag = 1;
+ uint8_t flag = 1;
for (i = 0; i < 64; i++)
{
diff --git a/src/devices/machine/ds1315.h b/src/devices/machine/ds1315.h
index 1894a05aac7..5fb02f4a694 100644
--- a/src/devices/machine/ds1315.h
+++ b/src/devices/machine/ds1315.h
@@ -31,7 +31,7 @@ ALLOW_SAVE_TYPE(ds1315_mode_t);
class ds1315_device : public device_t
{
public:
- ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~ds1315_device() {}
DECLARE_READ8_MEMBER(read_0);
@@ -56,7 +56,7 @@ private:
void input_raw_data();
int m_count;
- UINT8 m_raw_data[8*8];
+ uint8_t m_raw_data[8*8];
};
extern const device_type DS1315;
diff --git a/src/devices/machine/ds1386.cpp b/src/devices/machine/ds1386.cpp
index 91a6e2f9c06..22d2e51c95b 100644
--- a/src/devices/machine/ds1386.cpp
+++ b/src/devices/machine/ds1386.cpp
@@ -29,7 +29,7 @@
const device_type DS1386_8K = &device_creator<ds1386_8k_device>;
const device_type DS1386_32K = &device_creator<ds1386_32k_device>;
-ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, size_t size)
+ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, size_t size)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
, device_nvram_interface(mconfig, *this)
, m_tod_alarm(0)
@@ -59,12 +59,12 @@ ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, co
{
}
-ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: ds1386_device(mconfig, DS1386_8K, "DS1386-8K", tag, owner, clock, "ds1386_8k", 8192)
{
}
-ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: ds1386_device(mconfig, DS1386_32K, "DS1386-32K", tag, owner, clock, "ds1386_32k", 32768)
{
}
@@ -120,7 +120,7 @@ void ds1386_device::device_start()
save_item(NAME(m_watchdog_alarm));
save_item(NAME(m_square));
- m_ram = std::make_unique<UINT8[]>(m_ram_size);
+ m_ram = std::make_unique<uint8_t[]>(m_ram_size);
memset(&m_ram[0], 0, m_ram_size);
}
@@ -265,9 +265,9 @@ void ds1386_device::advance_hundredths()
}
if (carry)
{
- UINT8 value = 0;
- UINT8 min_value = 0;
- UINT8 max_value = 0;
+ uint8_t value = 0;
+ uint8_t min_value = 0;
+ uint8_t max_value = 0;
if (m_hours & HOURS_12_24)
{
value = m_hours & 0x1f;
@@ -309,13 +309,13 @@ void ds1386_device::advance_hundredths()
if (carry)
{
- UINT8 maxdays;
- static const UINT8 daysinmonth[] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
+ uint8_t maxdays;
+ static const uint8_t daysinmonth[] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
time_helper::inc_bcd(&m_days, 0x07, 0x01, 0x07);
- UINT8 month = time_helper::from_bcd(m_months_enables);
- UINT8 year = time_helper::from_bcd(m_years);
+ uint8_t month = time_helper::from_bcd(m_months_enables);
+ uint8_t year = time_helper::from_bcd(m_years);
if (month == 2 && (year % 4) == 0)
{
@@ -334,7 +334,7 @@ void ds1386_device::advance_hundredths()
}
if (carry)
{
- UINT8 enables = m_months_enables & 0xc0;
+ uint8_t enables = m_months_enables & 0xc0;
carry = time_helper::inc_bcd(&m_months_enables, 0x1f, 0x01, 0x12);
m_months_enables &= 0x3f;
m_months_enables |= enables;
@@ -378,7 +378,7 @@ void ds1386_device::copy_registers_to_ram()
void ds1386_device::check_tod_alarm()
{
- UINT8 mode = BIT(m_days_alarm, 7) | (BIT(m_hours_alarm, 5) << 1) | (BIT(m_minutes_alarm, 3) << 2);
+ uint8_t mode = BIT(m_days_alarm, 7) | (BIT(m_hours_alarm, 5) << 1) | (BIT(m_minutes_alarm, 3) << 2);
bool zeroes = (m_hundredths == 0 && m_seconds == 0);
if (zeroes && (m_ram[REGISTER_COMMAND] & COMMAND_TDF) == 0)
{
@@ -465,9 +465,9 @@ WRITE8_MEMBER( ds1386_device::data_w )
case 0x09: // months
{
- UINT8 old_value = m_ram[offset];
+ uint8_t old_value = m_ram[offset];
m_ram[offset] = data & 0xdf;
- UINT8 changed = old_value ^ data;
+ uint8_t changed = old_value ^ data;
if (changed & DISABLE_SQW)
{
if (m_ram[offset] & DISABLE_SQW)
@@ -506,8 +506,8 @@ WRITE8_MEMBER( ds1386_device::data_w )
safe_inta_cb(0);
}
m_ram[offset] = data;
- UINT8 wd_hundredths = m_ram[REGISTER_WATCHDOG_HUNDREDTHS];
- UINT8 wd_seconds = m_ram[REGISTER_WATCHDOG_SECONDS];
+ uint8_t wd_hundredths = m_ram[REGISTER_WATCHDOG_HUNDREDTHS];
+ uint8_t wd_seconds = m_ram[REGISTER_WATCHDOG_SECONDS];
int total_hundredths = (wd_hundredths & 0xf) + ((wd_hundredths >> 4) & 0xf) * 10 + (wd_seconds & 0xf) * 100 + ((wd_seconds >> 4) & 0xf) * 1000;
m_watchdog_timer->adjust(attotime::from_msec(total_hundredths * 10));
break;
@@ -515,9 +515,9 @@ WRITE8_MEMBER( ds1386_device::data_w )
case 0x0b: // command
{
- UINT8 old = m_ram[offset];
+ uint8_t old = m_ram[offset];
m_ram[offset] = data & 0xfc;
- UINT8 changed = old ^ m_ram[offset];
+ uint8_t changed = old ^ m_ram[offset];
if (changed & COMMAND_IPSW)
{
int old_a = (old & COMMAND_IPSW) ? m_tod_alarm : m_watchdog_alarm;
diff --git a/src/devices/machine/ds1386.h b/src/devices/machine/ds1386.h
index 1146416b923..b7aa5beb93d 100644
--- a/src/devices/machine/ds1386.h
+++ b/src/devices/machine/ds1386.h
@@ -81,7 +81,7 @@ class ds1386_device : public device_t,
public device_nvram_interface
{
public:
- ds1386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, size_t size);
+ ds1386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, size_t size);
DECLARE_WRITE8_MEMBER( data_w );
DECLARE_READ8_MEMBER( data_r );
@@ -171,20 +171,20 @@ protected:
emu_timer *m_inta_timer;
emu_timer *m_intb_timer;
- std::unique_ptr<UINT8[]> m_ram;
- optional_region_ptr<UINT8> m_default_data;
-
- UINT8 m_hundredths;
- UINT8 m_seconds;
- UINT8 m_minutes;
- UINT8 m_minutes_alarm;
- UINT8 m_hours;
- UINT8 m_hours_alarm;
- UINT8 m_days;
- UINT8 m_days_alarm;
- UINT8 m_date;
- UINT8 m_months_enables;
- UINT8 m_years;
+ std::unique_ptr<uint8_t[]> m_ram;
+ optional_region_ptr<uint8_t> m_default_data;
+
+ uint8_t m_hundredths;
+ uint8_t m_seconds;
+ uint8_t m_minutes;
+ uint8_t m_minutes_alarm;
+ uint8_t m_hours;
+ uint8_t m_hours_alarm;
+ uint8_t m_days;
+ uint8_t m_days_alarm;
+ uint8_t m_date;
+ uint8_t m_months_enables;
+ uint8_t m_years;
const size_t m_ram_size;
};
@@ -193,14 +193,14 @@ class ds1386_8k_device : public ds1386_device
{
public:
// construction/destruction
- ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class ds1386_32k_device : public ds1386_device
{
public:
// construction/destruction
- ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
// device type definition
diff --git a/src/devices/machine/ds2401.cpp b/src/devices/machine/ds2401.cpp
index 154deaea628..663b89ce493 100644
--- a/src/devices/machine/ds2401.cpp
+++ b/src/devices/machine/ds2401.cpp
@@ -29,7 +29,7 @@ inline void ds2401_device::verboselog(int n_level, const char *s_fmt, ...)
// device type definition
const device_type DS2401 = &device_creator<ds2401_device>;
-ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS2401, "DS2401", tag, owner, clock, "ds2401", __FILE__), m_state(0), m_bit(0), m_shift(0), m_byte(0), m_rx(false), m_tx(false), m_timer_main(nullptr), m_timer_reset(nullptr)
{
}
@@ -228,7 +228,7 @@ READ_LINE_MEMBER( ds2401_device::read )
return m_tx && m_rx;
}
-UINT8 ds2401_device::direct_read(int index)
+uint8_t ds2401_device::direct_read(int index)
{
return m_data[index];
}
diff --git a/src/devices/machine/ds2401.h b/src/devices/machine/ds2401.h
index 5f4d87131f0..bfeb5c2f6a4 100644
--- a/src/devices/machine/ds2401.h
+++ b/src/devices/machine/ds2401.h
@@ -20,11 +20,11 @@ class ds2401_device : public device_t
{
public:
// construction/destruction
- ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE_LINE_MEMBER( write );
DECLARE_READ_LINE_MEMBER( read );
- UINT8 direct_read(int index);
+ uint8_t direct_read(int index);
protected:
enum {
@@ -55,9 +55,9 @@ protected:
// internal state
int m_state, m_bit, m_shift;
- UINT8 m_byte;
+ uint8_t m_byte;
bool m_rx, m_tx;
- UINT8 m_data[SIZE_DATA];
+ uint8_t m_data[SIZE_DATA];
emu_timer *m_timer_main, *m_timer_reset;
attotime t_samp, t_rdv, t_rstl, t_pdh, t_pdl;
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp
index 68082389cee..65db6cd82fa 100644
--- a/src/devices/machine/ds2404.cpp
+++ b/src/devices/machine/ds2404.cpp
@@ -24,7 +24,7 @@ const device_type DS2404 = &device_creator<ds2404_device>;
// ds2404_device - constructor
//-------------------------------------------------
-ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS2404, "DS2404", tag, owner, clock, "ds2404", __FILE__),
device_nvram_interface(mconfig, *this), m_tick_timer(nullptr), m_ref_year(0), m_ref_month(0), m_ref_day(0),
m_address(0),
@@ -43,7 +43,7 @@ ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, dev
// to set the reference year
//-------------------------------------------------
-void ds2404_device::static_set_ref_year(device_t &device, UINT32 year)
+void ds2404_device::static_set_ref_year(device_t &device, uint32_t year)
{
ds2404_device &ds2404 = downcast<ds2404_device &>(device);
ds2404.m_ref_year = year;
@@ -55,7 +55,7 @@ void ds2404_device::static_set_ref_year(device_t &device, UINT32 year)
// to set the reference month
//-------------------------------------------------
-void ds2404_device::static_set_ref_month(device_t &device, UINT8 month)
+void ds2404_device::static_set_ref_month(device_t &device, uint8_t month)
{
ds2404_device &ds2404 = downcast<ds2404_device &>(device);
ds2404.m_ref_month = month;
@@ -67,7 +67,7 @@ void ds2404_device::static_set_ref_month(device_t &device, UINT8 month)
// to set the reference day
//-------------------------------------------------
-void ds2404_device::static_set_ref_day(device_t &device, UINT8 day)
+void ds2404_device::static_set_ref_day(device_t &device, uint8_t day)
{
ds2404_device &ds2404 = downcast<ds2404_device &>(device);
ds2404.m_ref_day = day;
@@ -107,7 +107,7 @@ void ds2404_device::device_start()
}
-void ds2404_device::ds2404_rom_cmd(UINT8 cmd)
+void ds2404_device::ds2404_rom_cmd(uint8_t cmd)
{
switch(cmd)
{
@@ -121,7 +121,7 @@ void ds2404_device::ds2404_rom_cmd(UINT8 cmd)
}
}
-void ds2404_device::ds2404_cmd(UINT8 cmd)
+void ds2404_device::ds2404_cmd(uint8_t cmd)
{
switch(cmd)
{
@@ -155,7 +155,7 @@ void ds2404_device::ds2404_cmd(UINT8 cmd)
}
}
-UINT8 ds2404_device::ds2404_readmem()
+uint8_t ds2404_device::ds2404_readmem()
{
if( m_address < 0x200 )
{
@@ -168,7 +168,7 @@ UINT8 ds2404_device::ds2404_readmem()
return 0;
}
-void ds2404_device::ds2404_writemem(UINT8 value)
+void ds2404_device::ds2404_writemem(uint8_t value)
{
if( m_address < 0x200 )
{
@@ -194,7 +194,7 @@ WRITE8_MEMBER( ds2404_device::ds2404_3w_reset_w )
READ8_MEMBER( ds2404_device::ds2404_data_r )
{
- UINT8 value = 0;
+ uint8_t value = 0;
switch(m_state[m_state_ptr])
{
case DS2404_STATE_IDLE:
diff --git a/src/devices/machine/ds2404.h b/src/devices/machine/ds2404.h
index 86b9c7be05d..420f9f41207 100644
--- a/src/devices/machine/ds2404.h
+++ b/src/devices/machine/ds2404.h
@@ -49,12 +49,12 @@ class ds2404_device : public device_t,
{
public:
// construction/destruction
- ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
- static void static_set_ref_year(device_t &device, UINT32 m_ref_year);
- static void static_set_ref_month(device_t &device, UINT8 m_ref_month);
- static void static_set_ref_day(device_t &device, UINT8 m_ref_day);
+ static void static_set_ref_year(device_t &device, uint32_t m_ref_year);
+ static void static_set_ref_month(device_t &device, uint8_t m_ref_month);
+ static void static_set_ref_day(device_t &device, uint8_t m_ref_day);
/* 1-wire interface reset */
DECLARE_WRITE8_MEMBER(ds2404_1w_reset_w);
@@ -82,11 +82,11 @@ protected:
private:
- void ds2404_rom_cmd(UINT8 cmd);
- void ds2404_cmd(UINT8 cmd);
+ void ds2404_rom_cmd(uint8_t cmd);
+ void ds2404_cmd(uint8_t cmd);
- UINT8 ds2404_readmem();
- void ds2404_writemem(UINT8 value);
+ uint8_t ds2404_readmem();
+ void ds2404_writemem(uint8_t value);
enum DS2404_STATE
{
@@ -105,18 +105,18 @@ private:
emu_timer *m_tick_timer;
// configuration state
- UINT32 m_ref_year;
- UINT8 m_ref_month;
- UINT8 m_ref_day;
-
- UINT16 m_address;
- UINT16 m_offset;
- UINT16 m_end_offset;
- UINT8 m_a1;
- UINT8 m_a2;
- UINT8 m_sram[512]; /* 4096 bits */
- UINT8 m_ram[32]; /* scratchpad ram, 256 bits */
- UINT8 m_rtc[5]; /* 40-bit RTC counter */
+ uint32_t m_ref_year;
+ uint8_t m_ref_month;
+ uint8_t m_ref_day;
+
+ uint16_t m_address;
+ uint16_t m_offset;
+ uint16_t m_end_offset;
+ uint8_t m_a1;
+ uint8_t m_a2;
+ uint8_t m_sram[512]; /* 4096 bits */
+ uint8_t m_ram[32]; /* scratchpad ram, 256 bits */
+ uint8_t m_rtc[5]; /* 40-bit RTC counter */
DS2404_STATE m_state[8];
int m_state_ptr;
};
diff --git a/src/devices/machine/ds75160a.cpp b/src/devices/machine/ds75160a.cpp
index 1560fa4f0b2..8cda22b6ad9 100644
--- a/src/devices/machine/ds75160a.cpp
+++ b/src/devices/machine/ds75160a.cpp
@@ -26,7 +26,7 @@ const device_type DS75160A = &device_creator<ds75160a_device>;
// ds75160a_device - constructor
//-------------------------------------------------
-ds75160a_device::ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds75160a_device::ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS75160A, "DS75160A", tag, owner, clock, "ds75160a", __FILE__),
m_read(*this),
m_write(*this),
@@ -60,7 +60,7 @@ void ds75160a_device::device_start()
READ8_MEMBER( ds75160a_device::read )
{
- UINT8 data = 0;
+ uint8_t data = 0;
if (!m_te)
{
diff --git a/src/devices/machine/ds75160a.h b/src/devices/machine/ds75160a.h
index 5cb4898322d..877bb5a31f2 100644
--- a/src/devices/machine/ds75160a.h
+++ b/src/devices/machine/ds75160a.h
@@ -48,7 +48,7 @@ class ds75160a_device : public device_t
{
public:
// construction/destruction
- ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _read, class _write> void set_callbacks(_read rd, _write wr) {
m_read.set_callback(rd);
@@ -69,7 +69,7 @@ private:
devcb_read8 m_read;
devcb_write8 m_write;
- UINT8 m_data;
+ uint8_t m_data;
int m_te;
int m_pe;
diff --git a/src/devices/machine/ds75161a.cpp b/src/devices/machine/ds75161a.cpp
index 5ec21a0e003..fbb196c4c15 100644
--- a/src/devices/machine/ds75161a.cpp
+++ b/src/devices/machine/ds75161a.cpp
@@ -26,7 +26,7 @@ const device_type DS75161A = &device_creator<ds75161a_device>;
// ds75161a_device - constructor
//-------------------------------------------------
-ds75161a_device::ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ds75161a_device::ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS75161A, "DS75161A", tag, owner, clock, "ds75161a", __FILE__),
m_in_ren_cb(*this),
m_in_ifc_cb(*this),
diff --git a/src/devices/machine/ds75161a.h b/src/devices/machine/ds75161a.h
index 33c244f6528..2330f200f16 100644
--- a/src/devices/machine/ds75161a.h
+++ b/src/devices/machine/ds75161a.h
@@ -90,7 +90,7 @@ class ds75161a_device : public device_t
{
public:
// construction/destruction
- ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_in_ren_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ren_cb.set_callback(object); }
template<class _Object> static devcb_base &set_in_ifc_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ifc_cb.set_callback(object); }
diff --git a/src/devices/machine/e0516.cpp b/src/devices/machine/e0516.cpp
index acd6c2d0193..2643583caf8 100644
--- a/src/devices/machine/e0516.cpp
+++ b/src/devices/machine/e0516.cpp
@@ -38,7 +38,7 @@ const device_type E0516 = &device_creator<e0516_device>;
// e0516_device - constructor
//-------------------------------------------------
-e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, E0516, "E05-16", tag, owner, clock, "e0516", __FILE__),
device_rtc_interface(mconfig, *this), m_cs(0), m_clk(0), m_data_latch(0), m_reg_latch(0), m_read_write(0), m_state(0), m_bits(0), m_dio(0), m_timer(nullptr)
{
diff --git a/src/devices/machine/e0516.h b/src/devices/machine/e0516.h
index 227c65dd2a5..6760fd7f06c 100644
--- a/src/devices/machine/e0516.h
+++ b/src/devices/machine/e0516.h
@@ -46,7 +46,7 @@ class e0516_device : public device_t,
{
public:
// construction/destruction
- e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE_LINE_MEMBER( cs_w );
DECLARE_WRITE_LINE_MEMBER( clk_w );
diff --git a/src/devices/machine/e05a03.cpp b/src/devices/machine/e05a03.cpp
index b0389abb6df..4f031f3da28 100644
--- a/src/devices/machine/e05a03.cpp
+++ b/src/devices/machine/e05a03.cpp
@@ -16,7 +16,7 @@
const device_type E05A03 = &device_creator<e05a03_device>;
-e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, E05A03, "E05A03", tag, owner, clock, "e05a03", __FILE__),
m_write_nlq_lp(*this),
m_write_pe_lp(*this),
@@ -129,7 +129,7 @@ WRITE8_MEMBER( e05a03_device::write )
READ8_MEMBER( e05a03_device::read )
{
- UINT8 result = 0;
+ uint8_t result = 0;
logerror("%s: e05a03_r(%02x)\n", space.machine().describe_context(), offset);
diff --git a/src/devices/machine/e05a03.h b/src/devices/machine/e05a03.h
index 86b36b673b0..07f84299143 100644
--- a/src/devices/machine/e05a03.h
+++ b/src/devices/machine/e05a03.h
@@ -36,7 +36,7 @@
class e05a03_device : public device_t
{
public:
- e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~e05a03_device() {}
template<class _Object> static devcb_base &set_nlq_lp_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_nlq_lp.set_callback(object); }
@@ -70,7 +70,7 @@ private:
devcb_read8 m_read_data; /* pin 47-54, centronics data input */
/* 24-bit shift register, port 0x00, 0x01 and 0x02 */
- UINT32 m_shift;
+ uint32_t m_shift;
/* port 0x03 */
int m_busy_leading;
@@ -84,13 +84,13 @@ private:
#endif
/* port 0x04 and 0x05 (9-bit) */
- UINT16 m_printhead;
+ uint16_t m_printhead;
/* port 0x06 (4-bit) */
- UINT8 m_pf_motor;
+ uint8_t m_pf_motor;
/* port 0x07 (4-bit) */
- UINT8 m_cr_motor;
+ uint8_t m_cr_motor;
};
extern const device_type E05A03;
diff --git a/src/devices/machine/e05a30.cpp b/src/devices/machine/e05a30.cpp
index 8bb802f9265..386ebd1f641 100644
--- a/src/devices/machine/e05a30.cpp
+++ b/src/devices/machine/e05a30.cpp
@@ -22,7 +22,7 @@
const device_type E05A30 = &device_creator<e05a30_device>;
-e05a30_device::e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+e05a30_device::e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, E05A30, "E05A30", tag, owner, clock, "e05a30", __FILE__),
m_write_printhead(*this),
m_write_pf_stepper(*this),
@@ -94,14 +94,14 @@ void e05a30_device::device_reset()
* MMIO 0xC005 keeps the 9th pin in the MSB.
*/
-void e05a30_device::update_printhead(int pos, UINT8 data)
+void e05a30_device::update_printhead(int pos, uint8_t data)
{
if (pos == 0) {
m_printhead &= 0x01fe;
m_printhead |= (data >> 7);
} else {
m_printhead &= 0x0001;
- m_printhead |= (UINT16) (data << 1);
+ m_printhead |= (uint16_t) (data << 1);
}
m_write_printhead(m_printhead);
}
@@ -119,13 +119,13 @@ void e05a30_device::update_printhead(int pos, UINT8 data)
* For the PF motor, the output data is fed directly to the stepper motor.
*/
-void e05a30_device::update_pf_stepper(UINT8 data)
+void e05a30_device::update_pf_stepper(uint8_t data)
{
m_pf_stepper = data & 0x0f;
m_write_pf_stepper(m_pf_stepper);
}
-static UINT8 cr_sla7020m(UINT8 data)
+static uint8_t cr_sla7020m(uint8_t data)
{
bool ina = BIT(data, 0);
bool inb = BIT(data, 1);
@@ -137,7 +137,7 @@ static UINT8 cr_sla7020m(UINT8 data)
bool outb1 = !inb && tdb;
return (outb1<<3)|(outb0<<2)|(outa1<<1)|(outa0<<0);
}
-void e05a30_device::update_cr_stepper(UINT8 data)
+void e05a30_device::update_cr_stepper(uint8_t data)
{
m_cr_stepper = data & 0x0f;
m_write_cr_stepper(cr_sla7020m(m_cr_stepper));
@@ -196,7 +196,7 @@ WRITE8_MEMBER( e05a30_device::write )
READ8_MEMBER( e05a30_device::read )
{
- UINT8 result = 0;
+ uint8_t result = 0;
LOG("%s: e05a30_r([0xC0%02x]): ", space.machine().describe_context(), offset);
diff --git a/src/devices/machine/e05a30.h b/src/devices/machine/e05a30.h
index f05b3fd35c9..f5f396f63fd 100644
--- a/src/devices/machine/e05a30.h
+++ b/src/devices/machine/e05a30.h
@@ -46,7 +46,7 @@
class e05a30_device : public device_t
{
public:
- e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~e05a30_device() {}
template<class _Object> static devcb_base &set_printhead_wr_callback(device_t &device, _Object object) { return downcast<e05a30_device &>(device).m_write_printhead.set_callback(object); }
@@ -90,24 +90,24 @@ private:
devcb_write_line m_write_centronics_fault;
devcb_write_line m_write_centronics_select;
- void update_printhead(int pos, UINT8 data);
- void update_pf_stepper(UINT8 data);
- void update_cr_stepper(UINT8 data);
+ void update_printhead(int pos, uint8_t data);
+ void update_pf_stepper(uint8_t data);
+ void update_cr_stepper(uint8_t data);
/* port 0x05 and 0x06 (9-bit) */
- UINT16 m_printhead;
+ uint16_t m_printhead;
/* port 0x07 (4-bit) */
- UINT8 m_pf_stepper;
+ uint8_t m_pf_stepper;
/* port 0x08 (4-bit) */
- UINT8 m_cr_stepper;
+ uint8_t m_cr_stepper;
/* Centronics stuff */
- UINT8 m_centronics_data;
+ uint8_t m_centronics_data;
int m_centronics_busy;
int m_centronics_nack;
- UINT8 m_centronics_strobe;
- UINT8 m_centronics_data_latch;
- UINT8 m_centronics_data_latched;
+ uint8_t m_centronics_strobe;
+ uint8_t m_centronics_data_latch;
+ uint8_t m_centronics_data_latched;
};
extern const device_type E05A30;
diff --git a/src/devices/machine/eeprom.cpp b/src/devices/machine/eeprom.cpp
index c7374775042..7e3a552a4d4 100644
--- a/src/devices/machine/eeprom.cpp
+++ b/src/devices/machine/eeprom.cpp
@@ -77,19 +77,19 @@ void eeprom_base_device::static_set_size(device_t &device, int cells, int cellbi
// to set the default data
//-------------------------------------------------
-void eeprom_base_device::static_set_default_data(device_t &device, const UINT8 *data, UINT32 size)
+void eeprom_base_device::static_set_default_data(device_t &device, const uint8_t *data, uint32_t size)
{
eeprom_base_device &eeprom = downcast<eeprom_base_device &>(device);
assert(eeprom.m_data_bits == 8);
- eeprom.m_default_data.u8 = const_cast<UINT8 *>(data);
+ eeprom.m_default_data.u8 = const_cast<uint8_t *>(data);
eeprom.m_default_data_size = size;
}
-void eeprom_base_device::static_set_default_data(device_t &device, const UINT16 *data, UINT32 size)
+void eeprom_base_device::static_set_default_data(device_t &device, const uint16_t *data, uint32_t size)
{
eeprom_base_device &eeprom = downcast<eeprom_base_device &>(device);
assert(eeprom.m_data_bits == 16);
- eeprom.m_default_data.u16 = const_cast<UINT16 *>(data);
+ eeprom.m_default_data.u16 = const_cast<uint16_t *>(data);
eeprom.m_default_data_size = size / 2;
}
@@ -99,7 +99,7 @@ void eeprom_base_device::static_set_default_data(device_t &device, const UINT16
// to set the default value
//-------------------------------------------------
-void eeprom_base_device::static_set_default_value(device_t &device, UINT32 value)
+void eeprom_base_device::static_set_default_value(device_t &device, uint32_t value)
{
eeprom_base_device &eeprom = downcast<eeprom_base_device &>(device);
eeprom.m_default_value = value;
@@ -122,7 +122,7 @@ void eeprom_base_device::static_set_timing(device_t &device, timing_type type, c
// read - read data at the given address
//-------------------------------------------------
-UINT32 eeprom_base_device::read(offs_t address)
+uint32_t eeprom_base_device::read(offs_t address)
{
if (!ready())
logerror("EEPROM: Read performed before previous operation completed!\n");
@@ -134,7 +134,7 @@ UINT32 eeprom_base_device::read(offs_t address)
// write - write data at the given address
//-------------------------------------------------
-void eeprom_base_device::write(offs_t address, UINT32 data)
+void eeprom_base_device::write(offs_t address, uint32_t data)
{
if (!ready())
logerror("EEPROM: Write performed before previous operation completed!\n");
@@ -149,7 +149,7 @@ void eeprom_base_device::write(offs_t address, UINT32 data)
// performed)
//-------------------------------------------------
-void eeprom_base_device::write_all(UINT32 data)
+void eeprom_base_device::write_all(uint32_t data)
{
if (!ready())
logerror("EEPROM: Write all performed before previous operation completed!\n");
@@ -209,8 +209,8 @@ void eeprom_base_device::device_validity_check(validity_checker &valid) const
void eeprom_base_device::device_start()
{
- UINT32 size = (m_data_bits == 8 ? 1 : 2) << m_address_bits;
- m_data = std::make_unique<UINT8 []>(size);
+ uint32_t size = (m_data_bits == 8 ? 1 : 2) << m_address_bits;
+ m_data = std::make_unique<uint8_t []>(size);
// save states
save_item(NAME(m_completion_time));
@@ -236,11 +236,11 @@ void eeprom_base_device::device_reset()
void eeprom_base_device::nvram_default()
{
- UINT32 eeprom_length = 1 << m_address_bits;
- UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8;
+ uint32_t eeprom_length = 1 << m_address_bits;
+ uint32_t eeprom_bytes = eeprom_length * m_data_bits / 8;
// initialize to the default value
- UINT32 default_value = m_default_value_set ? m_default_value : ~0;
+ uint32_t default_value = m_default_value_set ? m_default_value : ~0;
for (offs_t offs = 0; offs < eeprom_length; offs++)
internal_write(offs, default_value);
@@ -280,8 +280,8 @@ void eeprom_base_device::nvram_default()
void eeprom_base_device::nvram_read(emu_file &file)
{
- UINT32 eeprom_length = 1 << m_address_bits;
- UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8;
+ uint32_t eeprom_length = 1 << m_address_bits;
+ uint32_t eeprom_bytes = eeprom_length * m_data_bits / 8;
file.read(&m_data[0], eeprom_bytes);
}
@@ -294,8 +294,8 @@ void eeprom_base_device::nvram_read(emu_file &file)
void eeprom_base_device::nvram_write(emu_file &file)
{
- UINT32 eeprom_length = 1 << m_address_bits;
- UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8;
+ uint32_t eeprom_length = 1 << m_address_bits;
+ uint32_t eeprom_bytes = eeprom_length * m_data_bits / 8;
file.write(&m_data[0], eeprom_bytes);
}
@@ -305,7 +305,7 @@ void eeprom_base_device::nvram_write(emu_file &file)
// internal_read - read data at the given address
//-------------------------------------------------
-UINT32 eeprom_base_device::internal_read(offs_t address)
+uint32_t eeprom_base_device::internal_read(offs_t address)
{
if (m_data_bits == 16)
return m_data[address * 2] | (m_data[address * 2 + 1] << 8);
@@ -319,7 +319,7 @@ UINT32 eeprom_base_device::internal_read(offs_t address)
// address
//-------------------------------------------------
-void eeprom_base_device::internal_write(offs_t address, UINT32 data)
+void eeprom_base_device::internal_write(offs_t address, uint32_t data)
{
if (m_data_bits == 16)
{
diff --git a/src/devices/machine/eeprom.h b/src/devices/machine/eeprom.h
index 7fdcc8cd473..450a7f774d8 100644
--- a/src/devices/machine/eeprom.h
+++ b/src/devices/machine/eeprom.h
@@ -63,15 +63,15 @@ public:
// inline configuration helpers
static void static_set_size(device_t &device, int cells, int cellbits);
- static void static_set_default_data(device_t &device, const UINT8 *data, UINT32 size);
- static void static_set_default_data(device_t &device, const UINT16 *data, UINT32 size);
- static void static_set_default_value(device_t &device, UINT32 value);
+ static void static_set_default_data(device_t &device, const uint8_t *data, uint32_t size);
+ static void static_set_default_data(device_t &device, const uint16_t *data, uint32_t size);
+ static void static_set_default_value(device_t &device, uint32_t value);
static void static_set_timing(device_t &device, timing_type type, const attotime &duration);
// read/write/erase data
- UINT32 read(offs_t address);
- void write(offs_t address, UINT32 data);
- void write_all(UINT32 data);
+ uint32_t read(offs_t address);
+ void write(offs_t address, uint32_t data);
+ void write_all(uint32_t data);
void erase(offs_t address);
void erase_all();
@@ -79,8 +79,8 @@ public:
bool ready() const { return machine().time() >= m_completion_time; }
// internal read/write without side-effects
- UINT32 internal_read(offs_t address);
- void internal_write(offs_t address, UINT32 data);
+ uint32_t internal_read(offs_t address);
+ void internal_write(offs_t address, uint32_t data);
protected:
// device-level overrides
@@ -95,15 +95,15 @@ protected:
optional_memory_region m_region;
- std::unique_ptr<UINT8 []> m_data;
+ std::unique_ptr<uint8_t []> m_data;
// configuration state
- UINT32 m_cells;
- UINT8 m_address_bits;
- UINT8 m_data_bits;
+ uint32_t m_cells;
+ uint8_t m_address_bits;
+ uint8_t m_data_bits;
generic_ptr m_default_data;
- UINT32 m_default_data_size;
- UINT32 m_default_value;
+ uint32_t m_default_data_size;
+ uint32_t m_default_value;
bool m_default_value_set;
attotime m_operation_time[TIMING_COUNT];
diff --git a/src/devices/machine/eeprompar.cpp b/src/devices/machine/eeprompar.cpp
index af575ec1419..cf92b2db69e 100644
--- a/src/devices/machine/eeprompar.cpp
+++ b/src/devices/machine/eeprompar.cpp
@@ -116,7 +116,7 @@ READ8_MEMBER(eeprom_parallel_28xx_device::read)
// macro for defining a new device class
#define DEFINE_PARALLEL_EEPROM_DEVICE(_baseclass, _lowercase, _uppercase, _bits, _cells) \
-eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) \
+eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) \
: eeprom_parallel_##_baseclass##_device(mconfig, EEPROM_PARALLEL_##_uppercase, "Parallel EEPROM " #_uppercase " (" #_cells "x" #_bits ")", tag, owner, #_lowercase, __FILE__) \
{ \
static_set_size(*this, _cells, _bits); \
diff --git a/src/devices/machine/eeprompar.h b/src/devices/machine/eeprompar.h
index e8ed153dd97..e70f22c062b 100644
--- a/src/devices/machine/eeprompar.h
+++ b/src/devices/machine/eeprompar.h
@@ -87,7 +87,7 @@ public:
class eeprom_parallel_##_lowercase##_device : public eeprom_parallel_##_baseclass##_device \
{ \
public: \
- eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); \
+ eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); \
}; \
extern const device_type EEPROM_PARALLEL_##_uppercase;
// standard 28XX class of 8-bit EEPROMs
diff --git a/src/devices/machine/eepromser.cpp b/src/devices/machine/eepromser.cpp
index 347accae06f..90e03109f76 100644
--- a/src/devices/machine/eepromser.cpp
+++ b/src/devices/machine/eepromser.cpp
@@ -780,7 +780,7 @@ void eeprom_serial_x24c44_device::device_start()
// start the base class
eeprom_base_device::device_start();
- INT16 i=0;
+ int16_t i=0;
m_ram_length=0xf;
for (i=0;i<16;i++){
@@ -806,7 +806,7 @@ void eeprom_serial_x24c44_device::device_start()
}
void eeprom_serial_x24c44_device::copy_eeprom_to_ram(){
- UINT16 i=0;
+ uint16_t i=0;
LOG1(("EEPROM TO RAM COPY!!!\n"));
for (i=0;i<16;i++){
m_ram_data[i]=read(i);
@@ -817,7 +817,7 @@ void eeprom_serial_x24c44_device::copy_eeprom_to_ram(){
void eeprom_serial_x24c44_device::copy_ram_to_eeprom(){
- UINT16 i=0;
+ uint16_t i=0;
if (m_store_latch){
LOG1(("RAM TO EEPROM COPY\n"));
for (i=0;i<16;i++){
@@ -910,7 +910,7 @@ void eeprom_serial_x24c44_device::execute_command()
void eeprom_serial_x24c44_device::handle_event(eeprom_event event)
{
-//UINT32 tmp=0;
+//uint32_t tmp=0;
#if (VERBOSE_PRINTF > 0 || VERBOSE_LOGERROR > 0)
// for debugging purposes
if ((event & EVENT_CS_RISING_EDGE) != 0) LOG2(("Event: CS rising\n"));
@@ -1127,7 +1127,7 @@ WRITE_LINE_MEMBER(eeprom_serial_x24c44_device::di_write) { base_di_write(state);
// macro for defining a new device class
#define DEFINE_SERIAL_EEPROM_DEVICE(_baseclass, _lowercase, _uppercase, _bits, _cells, _addrbits) \
-eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) \
+eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) \
: eeprom_serial_##_baseclass##_device(mconfig, EEPROM_SERIAL_##_uppercase##_##_bits##BIT, "Serial EEPROM " #_uppercase " (" #_cells "x" #_bits ")", tag, owner, #_lowercase "_" #_bits, __FILE__) \
{ \
static_set_size(*this, _cells, _bits); \
diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h
index cbba81bfbbe..f52b6b57fa7 100644
--- a/src/devices/machine/eepromser.h
+++ b/src/devices/machine/eepromser.h
@@ -152,22 +152,22 @@ protected:
// configuration state
- UINT8 m_command_address_bits; // number of address bits in a command
+ uint8_t m_command_address_bits; // number of address bits in a command
bool m_streaming_enabled; // true if streaming is enabled
// runtime state
eeprom_state m_state; // current internal state
- UINT8 m_cs_state; // state of the CS line
+ uint8_t m_cs_state; // state of the CS line
attotime m_last_cs_rising_edge_time; // time of the last CS rising edge
- UINT8 m_oe_state; // state of the OE line
- UINT8 m_clk_state; // state of the CLK line
- UINT8 m_di_state; // state of the DI line
+ uint8_t m_oe_state; // state of the OE line
+ uint8_t m_clk_state; // state of the CLK line
+ uint8_t m_di_state; // state of the DI line
bool m_locked; // are we locked against writes?
- UINT32 m_bits_accum; // number of bits accumulated
- UINT32 m_command_address_accum; // accumulator of command+address bits
+ uint32_t m_bits_accum; // number of bits accumulated
+ uint32_t m_command_address_accum; // accumulator of command+address bits
eeprom_command m_command; // current command
- UINT32 m_address; // current address extracted from command
- UINT32 m_shift_register; // holds data coming in/going out
+ uint32_t m_address; // current address extracted from command
+ uint32_t m_shift_register; // holds data coming in/going out
};
@@ -247,10 +247,10 @@ protected:
void copy_ram_to_eeprom();
void copy_eeprom_to_ram();
void device_start() override;
- UINT8 m_ram_length;
- UINT16 m_ram_data[16];
- UINT16 m_reading;
- UINT8 m_store_latch;
+ uint8_t m_ram_length;
+ uint16_t m_ram_data[16];
+ uint16_t m_reading;
+ uint8_t m_store_latch;
};
@@ -264,7 +264,7 @@ protected:
class eeprom_serial_##_lowercase##_##_bits##bit_device : public eeprom_serial_##_baseclass##_device \
{ \
public: \
- eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); \
+ eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); \
}; \
extern const device_type EEPROM_SERIAL_##_uppercase##_##_bits##BIT;
// standard 93CX6 class of 16-bit EEPROMs
diff --git a/src/devices/machine/er2055.cpp b/src/devices/machine/er2055.cpp
index c0c5966b5a9..5953419156e 100644
--- a/src/devices/machine/er2055.cpp
+++ b/src/devices/machine/er2055.cpp
@@ -33,7 +33,7 @@ ADDRESS_MAP_END
// er2055_device - constructor
//-------------------------------------------------
-er2055_device::er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+er2055_device::er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ER2055, "ER2055 EAROM", tag, owner, clock, "er2055", __FILE__),
device_memory_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
@@ -90,7 +90,7 @@ void er2055_device::nvram_default()
if (m_region->bytewidth() != 1)
fatalerror("er2055 region '%s' needs to be an 8-bit region\n", tag());
- UINT8 *default_data = m_region->base();
+ uint8_t *default_data = m_region->base();
for (int byte = 0; byte < SIZE_DATA; byte++)
space(AS_PROGRAM).write_byte(byte, default_data[byte]);
}
@@ -104,7 +104,7 @@ void er2055_device::nvram_default()
void er2055_device::nvram_read(emu_file &file)
{
- UINT8 buffer[SIZE_DATA];
+ uint8_t buffer[SIZE_DATA];
file.read(buffer, sizeof(buffer));
for (int byte = 0; byte < SIZE_DATA; byte++)
space(AS_PROGRAM).write_byte(byte, buffer[byte]);
@@ -118,7 +118,7 @@ void er2055_device::nvram_read(emu_file &file)
void er2055_device::nvram_write(emu_file &file)
{
- UINT8 buffer[SIZE_DATA];
+ uint8_t buffer[SIZE_DATA];
for (int byte = 0; byte < SIZE_DATA; byte++)
buffer[byte] = space(AS_PROGRAM).read_byte(byte);
file.write(buffer, sizeof(buffer));
@@ -136,10 +136,10 @@ void er2055_device::nvram_write(emu_file &file)
// reacts to various combinations
//-------------------------------------------------
-void er2055_device::set_control(UINT8 cs1, UINT8 cs2, UINT8 c1, UINT8 c2, UINT8 ck)
+void er2055_device::set_control(uint8_t cs1, uint8_t cs2, uint8_t c1, uint8_t c2, uint8_t ck)
{
// create a new composite control state
- UINT8 oldstate = m_control_state;
+ uint8_t oldstate = m_control_state;
m_control_state = (ck != 0) ? CK : 0;
m_control_state |= (c1 != 0) ? C1 : 0;
m_control_state |= (c2 != 0) ? C2 : 0;
diff --git a/src/devices/machine/er2055.h b/src/devices/machine/er2055.h
index 82ad9d2c0e9..c5796c1bb27 100644
--- a/src/devices/machine/er2055.h
+++ b/src/devices/machine/er2055.h
@@ -36,15 +36,15 @@ class er2055_device : public device_t,
{
public:
// construction/destruction
- er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
- UINT8 data() const { return m_data; }
- void set_address(UINT8 address) { m_address = address & 0x3f; }
- void set_data(UINT8 data) { m_data = data; }
+ uint8_t data() const { return m_data; }
+ void set_address(uint8_t address) { m_address = address & 0x3f; }
+ void set_data(uint8_t data) { m_data = data; }
// control lines -- all lines are specified as active-high (even CS2)
- void set_control(UINT8 cs1, UINT8 cs2, UINT8 c1, UINT8 c2, UINT8 ck);
+ void set_control(uint8_t cs1, uint8_t cs2, uint8_t c1, uint8_t c2, uint8_t ck);
protected:
// device-level overrides
@@ -60,11 +60,11 @@ protected:
static const int SIZE_DATA = 0x40;
- static const UINT8 CK = 0x01;
- static const UINT8 C1 = 0x02;
- static const UINT8 C2 = 0x04;
- static const UINT8 CS1 = 0x08;
- static const UINT8 CS2 = 0x10;
+ static const uint8_t CK = 0x01;
+ static const uint8_t C1 = 0x02;
+ static const uint8_t C2 = 0x04;
+ static const uint8_t CS1 = 0x08;
+ static const uint8_t CS2 = 0x10;
optional_memory_region m_region;
@@ -72,9 +72,9 @@ protected:
address_space_config m_space_config;
// internal state
- UINT8 m_control_state;
- UINT8 m_address;
- UINT8 m_data;
+ uint8_t m_control_state;
+ uint8_t m_address;
+ uint8_t m_data;
};
diff --git a/src/devices/machine/f3853.cpp b/src/devices/machine/f3853.cpp
index 49deb99f073..747bd3cdc28 100644
--- a/src/devices/machine/f3853.cpp
+++ b/src/devices/machine/f3853.cpp
@@ -49,7 +49,7 @@ const device_type F3853 = &device_creator<f3853_device>;
// f3853_device - constructor
//-------------------------------------------------
-f3853_device::f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+f3853_device::f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, F3853, "F3853", tag, owner, clock, "f3853", __FILE__)
{
}
@@ -60,13 +60,13 @@ f3853_device::f3853_device(const machine_config &mconfig, const char *tag, devic
void f3853_device::device_start()
{
- UINT8 reg = 0xfe;
- for(INT32 i=254 /* Known to get 0xfe after 255 cycles */; i >= 0; i--)
+ uint8_t reg = 0xfe;
+ for(int32_t i=254 /* Known to get 0xfe after 255 cycles */; i >= 0; i--)
{
- INT32 o7 = (reg & 0x80) ? TRUE : FALSE;
- INT32 o5 = (reg & 0x20) ? TRUE : FALSE;
- INT32 o4 = (reg & 0x10) ? TRUE : FALSE;
- INT32 o3 = (reg & 0x08) ? TRUE : FALSE;
+ int32_t o7 = (reg & 0x80) ? TRUE : FALSE;
+ int32_t o5 = (reg & 0x20) ? TRUE : FALSE;
+ int32_t o4 = (reg & 0x10) ? TRUE : FALSE;
+ int32_t o3 = (reg & 0x08) ? TRUE : FALSE;
m_value_to_cycle[reg] = i;
reg <<= 1;
if (!((o7 != o5) != (o4 != o3)))
@@ -121,7 +121,7 @@ void f3853_device::set_interrupt_request_line()
}
-void f3853_device::timer_start(UINT8 value)
+void f3853_device::timer_start(uint8_t value)
{
attotime period = (value != 0xff) ? attotime::from_hz(clock()) * (m_value_to_cycle[value]*31) : attotime::never;
@@ -157,7 +157,7 @@ void f3853_device::set_priority_in_line(int level)
READ8_MEMBER(f3853_device::read)
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (offset)
{
diff --git a/src/devices/machine/f3853.h b/src/devices/machine/f3853.h
index b080b982fc2..ee75fae052c 100644
--- a/src/devices/machine/f3853.h
+++ b/src/devices/machine/f3853.h
@@ -51,9 +51,9 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef device_delegate<void (UINT16 addr, int level)> f3853_interrupt_req_delegate;
+typedef device_delegate<void (uint16_t addr, int level)> f3853_interrupt_req_delegate;
-#define F3853_INTERRUPT_REQ_CB(_name) void _name(UINT16 addr, int level)
+#define F3853_INTERRUPT_REQ_CB(_name) void _name(uint16_t addr, int level)
// ======================> f3853_device
@@ -62,7 +62,7 @@ class f3853_device : public device_t
{
public:
// construction/destruction
- f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_interrupt_req_callback(device_t &device, f3853_interrupt_req_delegate callback) { downcast<f3853_device &>(device).m_interrupt_req_cb = callback; }
@@ -82,22 +82,22 @@ protected:
private:
void set_interrupt_request_line();
- void timer_start(UINT8 value);
+ void timer_start(uint8_t value);
f3853_interrupt_req_delegate m_interrupt_req_cb;
- UINT8 m_high;
- UINT8 m_low; // Bit 7 is set to 0 for timer interrupts, 1 for external interrupts
- INT32 m_external_enable;
- INT32 m_timer_enable;
+ uint8_t m_high;
+ uint8_t m_low; // Bit 7 is set to 0 for timer interrupts, 1 for external interrupts
+ int32_t m_external_enable;
+ int32_t m_timer_enable;
- INT32 m_request_flipflop;
+ int32_t m_request_flipflop;
- INT32 m_priority_line; /* inverted level*/
- INT32 m_external_interrupt_line; /* inverted level */
+ int32_t m_priority_line; /* inverted level*/
+ int32_t m_external_interrupt_line; /* inverted level */
emu_timer *m_timer;
- UINT8 m_value_to_cycle[0x100];
+ uint8_t m_value_to_cycle[0x100];
};
diff --git a/src/devices/machine/fdc37c665gt.cpp b/src/devices/machine/fdc37c665gt.cpp
index 671d0314560..4df67df6d39 100644
--- a/src/devices/machine/fdc37c665gt.cpp
+++ b/src/devices/machine/fdc37c665gt.cpp
@@ -2,7 +2,7 @@
// copyright-holders:smf
#include "fdc37c665gt.h"
-fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, FDC37C665GT, "FDC37C665GT", tag, owner, clock, "fdc37c665gt", __FILE__),
m_uart1(*this, "uart1"),
m_uart2(*this, "uart2")
@@ -11,7 +11,7 @@ fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char
READ8_MEMBER(fdc37c665gt_device::read)
{
- UINT8 data = 0;
+ uint8_t data = 0;
if ((offset & 0x3f8) == 0x3f8)
{
diff --git a/src/devices/machine/fdc37c665gt.h b/src/devices/machine/fdc37c665gt.h
index 569bf8ed0e8..094cc45db75 100644
--- a/src/devices/machine/fdc37c665gt.h
+++ b/src/devices/machine/fdc37c665gt.h
@@ -16,7 +16,7 @@ class fdc37c665gt_device : public device_t
{
public:
// construction/destruction
- fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/devices/machine/fga002.cpp b/src/devices/machine/fga002.cpp
index d89a35bbbc9..b97dfbe7dfc 100644
--- a/src/devices/machine/fga002.cpp
+++ b/src/devices/machine/fga002.cpp
@@ -69,27 +69,27 @@ const device_type FGA002 = &device_creator<fga002_device>;
// fga002_device - constructor
//-------------------------------------------------
-fga002_device::fga002_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source)
+fga002_device::fga002_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint32_t variant, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, m_out_int_cb(*this)
, m_liack4_cb(*this)
, m_liack5_cb(*this)
, m_liack6_cb(*this)
, m_liack7_cb(*this)
- , m_irq_level((UINT8)0)
+ , m_irq_level((uint8_t)0)
{
for (auto & elem : m_int_state)
elem = 0;
}
-fga002_device::fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+fga002_device::fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, FGA002, "FGA-002", tag, owner, clock, "fga002", __FILE__)
, m_out_int_cb(*this)
, m_liack4_cb(*this)
, m_liack5_cb(*this)
, m_liack6_cb(*this)
, m_liack7_cb(*this)
- , m_irq_level((UINT8)0)
+ , m_irq_level((uint8_t)0)
{
for (auto & elem : m_int_state)
elem = 0;
@@ -148,7 +148,7 @@ void fga002_device::device_reset()
//-------------------------------------------------
// device_timer - handler timer events
//-------------------------------------------------
-void fga002_device::device_timer (emu_timer &timer, device_timer_id id, INT32 param, void *ptr)
+void fga002_device::device_timer (emu_timer &timer, device_timer_id id, int32_t param, void *ptr)
{
switch(id)
{
@@ -224,9 +224,9 @@ const fga_irq_t fga002_device::m_irq_sources[] = {
};
-void fga002_device::trigger_interrupt(UINT8 data)
+void fga002_device::trigger_interrupt(uint8_t data)
{
- UINT8 icr = 0;
+ uint8_t icr = 0;
LOGINT(("%s(%02x)\n", FUNCNAME, data));
@@ -353,13 +353,13 @@ int fga002_device::get_irq_level()
Also, if a write access to the TIM0COUNT register is performed, the counter is loaded with the value
stored in the Timer Preload Register.
*/
-void fga002_device::do_fga002reg_tim0preload_w(UINT8 data)
+void fga002_device::do_fga002reg_tim0preload_w(uint8_t data)
{
LOG(("%s(%02x)\n", FUNCNAME, data));
m_fga002[FGA_TIM0PRELOAD] = data;
}
-UINT8 fga002_device::do_fga002reg_tim0preload_r()
+uint8_t fga002_device::do_fga002reg_tim0preload_r()
{
LOG(("%s() %02x\n", FUNCNAME, m_fga002[FGA_TIM0PRELOAD]));
return m_fga002[FGA_TIM0PRELOAD];
@@ -405,7 +405,7 @@ UINT8 fga002_device::do_fga002reg_tim0preload_r()
1111 2 seconds
*/
-void fga002_device::do_fga002reg_tim0ctl_w(UINT8 data)
+void fga002_device::do_fga002reg_tim0ctl_w(uint8_t data)
{
LOG(("%s(%02x)\n", FUNCNAME, data));
if ((data & REG_TIM0CTL_START_STOP) != (m_fga002[FGA_TIM0CTL] & REG_TIM0CTL_START_STOP))
@@ -440,7 +440,7 @@ void fga002_device::do_fga002reg_tim0ctl_w(UINT8 data)
m_fga002[FGA_TIM0CTL] = data;
}
-UINT8 fga002_device::do_fga002reg_tim0ctl_r()
+uint8_t fga002_device::do_fga002reg_tim0ctl_r()
{
LOG(("%s() %02x\n", FUNCNAME, m_fga002[FGA_TIM0CTL]));
return m_fga002[FGA_TIM0CTL];
@@ -453,13 +453,13 @@ UINT8 fga002_device::do_fga002reg_tim0ctl_r()
The Timer Count Register is initialized to the value $FF after reset.
[7:0] Timer Count Value
*/
-void fga002_device::do_fga002reg_tim0count_w(UINT8 data)
+void fga002_device::do_fga002reg_tim0count_w(uint8_t data)
{
LOG(("%s(%02x)\n", FUNCNAME, data));
m_tim0count = m_fga002[FGA_TIM0PRELOAD];
}
-UINT8 fga002_device::do_fga002reg_tim0count_r()
+uint8_t fga002_device::do_fga002reg_tim0count_r()
{
LOG(("%s() %02x\n", FUNCNAME, m_tim0count));
return m_tim0count;
@@ -471,13 +471,13 @@ UINT8 fga002_device::do_fga002reg_tim0count_r()
[3] IRQ enable, 1 = timer interrupt channel enabled, 0 = disabled
[2:0] IRQ level 000 = interrupt disabled 001-111 = Level 1 to 7 interrupt
*/
-void fga002_device::do_fga002reg_icrtim0_w(UINT8 data)
+void fga002_device::do_fga002reg_icrtim0_w(uint8_t data)
{
LOGINT(("%s(%02x)\n", FUNCNAME, data));
m_fga002[FGA_ICRTIM0] = data;
}
-UINT8 fga002_device::do_fga002reg_icrtim0_r()
+uint8_t fga002_device::do_fga002reg_icrtim0_r()
{
LOGINT(("%s() %02x\n", FUNCNAME, m_fga002[FGA_ICRTIM0]));
return m_fga002[FGA_ICRTIM0];
@@ -489,13 +489,13 @@ UINT8 fga002_device::do_fga002reg_icrtim0_r()
[7] The IRQ Status register bit displays if a timer interrupt request is pending. 1 = no interrupt is pending. 0 = interrupt is pending
[6:0] not used
*/
-void fga002_device::do_fga002reg_istim0_w(UINT8 data)
+void fga002_device::do_fga002reg_istim0_w(uint8_t data)
{
LOGINT(("%s(%02x)\n", FUNCNAME, data));
m_fga002[FGA_ISTIM0] &= ~REG_ISTIM0_TIM_INT; // Clear timer interrupt status
}
-UINT8 fga002_device::do_fga002reg_istim0_r()
+uint8_t fga002_device::do_fga002reg_istim0_r()
{
LOGINT(("%s() %02x\n", FUNCNAME, m_fga002[FGA_ISTIM0]));
return m_fga002[FGA_ISTIM0];
@@ -505,7 +505,7 @@ UINT8 fga002_device::do_fga002reg_istim0_r()
/*
* FGA-002 interrupt support
*/
-void fga002_device::do_fga002reg_localiack_w(UINT8 data)
+void fga002_device::do_fga002reg_localiack_w(uint8_t data)
{
m_fga002[FGA_LOCALIACK] = data;
@@ -520,54 +520,54 @@ void fga002_device::do_fga002reg_localiack_w(UINT8 data)
#endif
}
-UINT8 fga002_device::do_fga002reg_localiack_r()
+uint8_t fga002_device::do_fga002reg_localiack_r()
{
- UINT8 ret = m_fga002[FGA_LOCALIACK];
+ uint8_t ret = m_fga002[FGA_LOCALIACK];
LOGINT(("%s() <- %02x\n", FUNCNAME, ret));
return ret;
}
-UINT8 fga002_device::do_fga002reg_ctl3_r()
+uint8_t fga002_device::do_fga002reg_ctl3_r()
{
- UINT8 ret = m_fga002[FGA_CTL3];
+ uint8_t ret = m_fga002[FGA_CTL3];
LOGINT(("%s() <- %02x\n", FUNCNAME, ret));
return ret;
}
-void fga002_device::do_fga002reg_ctl3_w(UINT8 data)
+void fga002_device::do_fga002reg_ctl3_w(uint8_t data)
{
m_fga002[FGA_CTL3] = data;
LOGINT(("%s(%02x)\n", FUNCNAME, data));
}
// Local Interrupt control register methods
-UINT8 fga002_device::do_fga002reg_icrlocal0_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL0]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal1_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL1]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal2_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL2]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal3_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL3]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal4_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL4]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal5_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL5]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal6_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL6]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_icrlocal7_r(){ UINT8 ret = m_fga002[FGA_ICRLOCAL7]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-
-void fga002_device::do_fga002reg_icrlocal0_w(UINT8 data){ m_fga002[FGA_ICRLOCAL0] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal1_w(UINT8 data){ m_fga002[FGA_ICRLOCAL1] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal2_w(UINT8 data){ m_fga002[FGA_ICRLOCAL2] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal3_w(UINT8 data){ m_fga002[FGA_ICRLOCAL3] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal4_w(UINT8 data){ m_fga002[FGA_ICRLOCAL4] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal5_w(UINT8 data){ m_fga002[FGA_ICRLOCAL5] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal6_w(UINT8 data){ m_fga002[FGA_ICRLOCAL6] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
-void fga002_device::do_fga002reg_icrlocal7_w(UINT8 data){ m_fga002[FGA_ICRLOCAL7] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+uint8_t fga002_device::do_fga002reg_icrlocal0_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL0]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal1_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL1]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal2_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL2]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal3_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL3]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal4_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL4]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal5_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL5]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal6_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL6]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_icrlocal7_r(){ uint8_t ret = m_fga002[FGA_ICRLOCAL7]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+
+void fga002_device::do_fga002reg_icrlocal0_w(uint8_t data){ m_fga002[FGA_ICRLOCAL0] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal1_w(uint8_t data){ m_fga002[FGA_ICRLOCAL1] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal2_w(uint8_t data){ m_fga002[FGA_ICRLOCAL2] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal3_w(uint8_t data){ m_fga002[FGA_ICRLOCAL3] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal4_w(uint8_t data){ m_fga002[FGA_ICRLOCAL4] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal5_w(uint8_t data){ m_fga002[FGA_ICRLOCAL5] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal6_w(uint8_t data){ m_fga002[FGA_ICRLOCAL6] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
+void fga002_device::do_fga002reg_icrlocal7_w(uint8_t data){ m_fga002[FGA_ICRLOCAL7] = data; LOGINT(("%s(%02x)\n", FUNCNAME, data)); }
// Local Interrupt Status Register methods
-UINT8 fga002_device::do_fga002reg_islocal0_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL0]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal1_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL1]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal2_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL2]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal3_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL3]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal4_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL4]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal5_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL5]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal6_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL6]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
-UINT8 fga002_device::do_fga002reg_islocal7_r(){ UINT8 ret = m_fga002[FGA_ISLOCAL7]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal0_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL0]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal1_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL1]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal2_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL2]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal3_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL3]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal4_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL4]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal5_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL5]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal6_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL6]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
+uint8_t fga002_device::do_fga002reg_islocal7_r(){ uint8_t ret = m_fga002[FGA_ISLOCAL7]; LOGINT(("%s() <- %02x\n", FUNCNAME, ret)); return ret; }
void fga002_device::islocal_w(int status, int vector, int control, int data)
{
@@ -576,14 +576,14 @@ void fga002_device::islocal_w(int status, int vector, int control, int data)
}
// TODO: support level triggered interrupts, only edge triggered interrupts are supported atm
-void fga002_device::do_fga002reg_islocal0_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL0, INT_LOCAL0, FGA_ICRLOCAL0, data ); }
-void fga002_device::do_fga002reg_islocal1_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL1, INT_LOCAL1, FGA_ICRLOCAL1, data ); }
-void fga002_device::do_fga002reg_islocal2_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL2, INT_LOCAL2, FGA_ICRLOCAL2, data ); }
-void fga002_device::do_fga002reg_islocal3_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL3, INT_LOCAL3, FGA_ICRLOCAL3, data ); }
-void fga002_device::do_fga002reg_islocal4_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL4, INT_LOCAL4, FGA_ICRLOCAL4, data ); m_liack4_cb(); } /* terminate device IRQ */
-void fga002_device::do_fga002reg_islocal5_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL5, INT_LOCAL5, FGA_ICRLOCAL5, data ); m_liack5_cb(); }
-void fga002_device::do_fga002reg_islocal6_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL6, INT_LOCAL6, FGA_ICRLOCAL6, data ); m_liack6_cb(); }
-void fga002_device::do_fga002reg_islocal7_w(UINT8 data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL6, INT_LOCAL7, FGA_ICRLOCAL7, data ); m_liack7_cb(); }
+void fga002_device::do_fga002reg_islocal0_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL0, INT_LOCAL0, FGA_ICRLOCAL0, data ); }
+void fga002_device::do_fga002reg_islocal1_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL1, INT_LOCAL1, FGA_ICRLOCAL1, data ); }
+void fga002_device::do_fga002reg_islocal2_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL2, INT_LOCAL2, FGA_ICRLOCAL2, data ); }
+void fga002_device::do_fga002reg_islocal3_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL3, INT_LOCAL3, FGA_ICRLOCAL3, data ); }
+void fga002_device::do_fga002reg_islocal4_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL4, INT_LOCAL4, FGA_ICRLOCAL4, data ); m_liack4_cb(); } /* terminate device IRQ */
+void fga002_device::do_fga002reg_islocal5_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL5, INT_LOCAL5, FGA_ICRLOCAL5, data ); m_liack5_cb(); }
+void fga002_device::do_fga002reg_islocal6_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL6, INT_LOCAL6, FGA_ICRLOCAL6, data ); m_liack6_cb(); }
+void fga002_device::do_fga002reg_islocal7_w(uint8_t data){ LOGINT(("%s\n", FUNCNAME)); islocal_w( FGA_ISLOCAL6, INT_LOCAL7, FGA_ICRLOCAL7, data ); m_liack7_cb(); }
// Local IRQ callbacks
// TODO: support level triggered interrupts, ICR bit 6, only edge triggered interrupts are supported atm
@@ -722,7 +722,7 @@ WRITE8_MEMBER (fga002_device::write){
}
READ8_MEMBER (fga002_device::read){
- UINT8 ret = 0;
+ uint8_t ret = 0;
LOG(("%s[%04x] ", FUNCNAME, offset));
switch(offset)
diff --git a/src/devices/machine/fga002.h b/src/devices/machine/fga002.h
index 88d5a8d11b5..8722c96761e 100644
--- a/src/devices/machine/fga002.h
+++ b/src/devices/machine/fga002.h
@@ -46,8 +46,8 @@ class fga002_device : public device_t
{
public:
// construction/destruction
- fga002_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
- fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ fga002_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint32_t variant, const char *shortname, const char *source);
+ fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER (write);
DECLARE_READ8_MEMBER (read);
@@ -96,23 +96,23 @@ class fga002_device : public device_t
private:
- UINT8 m_tim0count;
- UINT8 m_fga002[0x500];
+ uint8_t m_tim0count;
+ uint8_t m_fga002[0x500];
- UINT8 do_fga002reg_ctl3_r();
- void do_fga002reg_ctl3_w(UINT8 data);
+ uint8_t do_fga002reg_ctl3_r();
+ void do_fga002reg_ctl3_w(uint8_t data);
/* Timer functions */
- UINT8 do_fga002reg_tim0preload_r();
- void do_fga002reg_tim0preload_w(UINT8 data);
- UINT8 do_fga002reg_tim0ctl_r();
- void do_fga002reg_tim0ctl_w(UINT8 data);
- UINT8 do_fga002reg_tim0count_r();
- void do_fga002reg_tim0count_w(UINT8 data);
- UINT8 do_fga002reg_icrtim0_r();
- void do_fga002reg_icrtim0_w(UINT8 data);
- UINT8 do_fga002reg_istim0_r();
- void do_fga002reg_istim0_w(UINT8 data);
+ uint8_t do_fga002reg_tim0preload_r();
+ void do_fga002reg_tim0preload_w(uint8_t data);
+ uint8_t do_fga002reg_tim0ctl_r();
+ void do_fga002reg_tim0ctl_w(uint8_t data);
+ uint8_t do_fga002reg_tim0count_r();
+ void do_fga002reg_tim0count_w(uint8_t data);
+ uint8_t do_fga002reg_icrtim0_r();
+ void do_fga002reg_icrtim0_w(uint8_t data);
+ uint8_t do_fga002reg_istim0_r();
+ void do_fga002reg_istim0_w(uint8_t data);
emu_timer *fga_timer;
enum
{
@@ -146,47 +146,47 @@ class fga002_device : public device_t
};
/* Interrupt support */
- UINT8 m_irq_level;
- UINT8 do_fga002reg_localiack_r();
- void do_fga002reg_localiack_w(UINT8 data);
-
- UINT8 do_fga002reg_islocal0_r();
- UINT8 do_fga002reg_islocal1_r();
- UINT8 do_fga002reg_islocal2_r();
- UINT8 do_fga002reg_islocal3_r();
- UINT8 do_fga002reg_islocal4_r();
- UINT8 do_fga002reg_islocal5_r();
- UINT8 do_fga002reg_islocal6_r();
- UINT8 do_fga002reg_islocal7_r();
+ uint8_t m_irq_level;
+ uint8_t do_fga002reg_localiack_r();
+ void do_fga002reg_localiack_w(uint8_t data);
+
+ uint8_t do_fga002reg_islocal0_r();
+ uint8_t do_fga002reg_islocal1_r();
+ uint8_t do_fga002reg_islocal2_r();
+ uint8_t do_fga002reg_islocal3_r();
+ uint8_t do_fga002reg_islocal4_r();
+ uint8_t do_fga002reg_islocal5_r();
+ uint8_t do_fga002reg_islocal6_r();
+ uint8_t do_fga002reg_islocal7_r();
void islocal_w(int status, int vector, int control, int data);
- void do_fga002reg_islocal0_w(UINT8 data);
- void do_fga002reg_islocal1_w(UINT8 data);
- void do_fga002reg_islocal2_w(UINT8 data);
- void do_fga002reg_islocal3_w(UINT8 data);
- void do_fga002reg_islocal4_w(UINT8 data);
- void do_fga002reg_islocal5_w(UINT8 data);
- void do_fga002reg_islocal6_w(UINT8 data);
- void do_fga002reg_islocal7_w(UINT8 data);
-
- UINT8 do_fga002reg_icrlocal0_r();
- UINT8 do_fga002reg_icrlocal1_r();
- UINT8 do_fga002reg_icrlocal2_r();
- UINT8 do_fga002reg_icrlocal3_r();
- UINT8 do_fga002reg_icrlocal4_r();
- UINT8 do_fga002reg_icrlocal5_r();
- UINT8 do_fga002reg_icrlocal6_r();
- UINT8 do_fga002reg_icrlocal7_r();
- void do_fga002reg_icrlocal0_w(UINT8 data);
- void do_fga002reg_icrlocal1_w(UINT8 data);
- void do_fga002reg_icrlocal2_w(UINT8 data);
- void do_fga002reg_icrlocal3_w(UINT8 data);
- void do_fga002reg_icrlocal4_w(UINT8 data);
- void do_fga002reg_icrlocal5_w(UINT8 data);
- void do_fga002reg_icrlocal6_w(UINT8 data);
- void do_fga002reg_icrlocal7_w(UINT8 data);
-
- void trigger_interrupt(UINT8 data);
+ void do_fga002reg_islocal0_w(uint8_t data);
+ void do_fga002reg_islocal1_w(uint8_t data);
+ void do_fga002reg_islocal2_w(uint8_t data);
+ void do_fga002reg_islocal3_w(uint8_t data);
+ void do_fga002reg_islocal4_w(uint8_t data);
+ void do_fga002reg_islocal5_w(uint8_t data);
+ void do_fga002reg_islocal6_w(uint8_t data);
+ void do_fga002reg_islocal7_w(uint8_t data);
+
+ uint8_t do_fga002reg_icrlocal0_r();
+ uint8_t do_fga002reg_icrlocal1_r();
+ uint8_t do_fga002reg_icrlocal2_r();
+ uint8_t do_fga002reg_icrlocal3_r();
+ uint8_t do_fga002reg_icrlocal4_r();
+ uint8_t do_fga002reg_icrlocal5_r();
+ uint8_t do_fga002reg_icrlocal6_r();
+ uint8_t do_fga002reg_icrlocal7_r();
+ void do_fga002reg_icrlocal0_w(uint8_t data);
+ void do_fga002reg_icrlocal1_w(uint8_t data);
+ void do_fga002reg_icrlocal2_w(uint8_t data);
+ void do_fga002reg_icrlocal3_w(uint8_t data);
+ void do_fga002reg_icrlocal4_w(uint8_t data);
+ void do_fga002reg_icrlocal5_w(uint8_t data);
+ void do_fga002reg_icrlocal6_w(uint8_t data);
+ void do_fga002reg_icrlocal7_w(uint8_t data);
+
+ void trigger_interrupt(uint8_t data);
void check_interrupts();
enum {
diff --git a/src/devices/machine/gayle.cpp b/src/devices/machine/gayle.cpp
index 93ea9034eb0..2127f41d87f 100644
--- a/src/devices/machine/gayle.cpp
+++ b/src/devices/machine/gayle.cpp
@@ -33,7 +33,7 @@ const device_type GAYLE = &device_creator<gayle_device>;
// gayle_device - constructor
//-------------------------------------------------
-gayle_device::gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+gayle_device::gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, GAYLE, "GAYLE", tag, owner, clock, "gayle", __FILE__),
m_int2_w(*this),
m_cs0_read(*this),
@@ -49,7 +49,7 @@ gayle_device::gayle_device(const machine_config &mconfig, const char *tag, devic
// set_id - set gayle id
//-------------------------------------------------
-void gayle_device::set_id(device_t &device, UINT8 id)
+void gayle_device::set_id(device_t &device, uint8_t id)
{
gayle_device &gayle = downcast<gayle_device &>(device);
gayle.m_gayle_id = id;
@@ -88,7 +88,7 @@ void gayle_device::device_reset()
READ16_MEMBER( gayle_device::gayle_r )
{
- UINT16 data = 0xffff;
+ uint16_t data = 0xffff;
offset <<= 1;
// swap
@@ -188,7 +188,7 @@ WRITE_LINE_MEMBER( gayle_device::ide_interrupt_w )
READ16_MEMBER( gayle_device::gayle_id_r )
{
- UINT16 data;
+ uint16_t data;
if (ACCESSING_BITS_8_15)
data = ((m_gayle_id << m_gayle_id_count++) & 0x80) << 8;
diff --git a/src/devices/machine/gayle.h b/src/devices/machine/gayle.h
index 6ea542dd392..d59bf1c5d67 100644
--- a/src/devices/machine/gayle.h
+++ b/src/devices/machine/gayle.h
@@ -50,7 +50,7 @@ class gayle_device : public device_t
{
public:
// construction/destruction
- gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
template<class _Object> static devcb_base &set_int2_handler(device_t &device, _Object object)
@@ -77,7 +77,7 @@ public:
DECLARE_WRITE16_MEMBER( gayle_id_w );
// inline configuration
- static void set_id(device_t &device, UINT8 id);
+ static void set_id(device_t &device, uint8_t id);
protected:
virtual void device_start() override;
@@ -99,9 +99,9 @@ private:
devcb_read16 m_cs1_read;
devcb_write16 m_cs1_write;
- UINT8 m_gayle_id;
+ uint8_t m_gayle_id;
int m_gayle_id_count;
- UINT8 m_gayle_reg[4];
+ uint8_t m_gayle_reg[4];
};
// device type definition
diff --git a/src/devices/machine/gen_latch.cpp b/src/devices/machine/gen_latch.cpp
index 2a595595c14..f7848abfaee 100644
--- a/src/devices/machine/gen_latch.cpp
+++ b/src/devices/machine/gen_latch.cpp
@@ -23,7 +23,7 @@ const device_type GENERIC_LATCH_8 = &device_creator<generic_latch_8_device>;
// generic_latch_8_device - constructor
//-------------------------------------------------
-generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, GENERIC_LATCH_8, "Generic 8-bit latch", tag, owner, clock, "generic_latch_8", __FILE__),
m_latched_value(0),
m_latch_read(0)
@@ -66,9 +66,9 @@ WRITE_LINE_MEMBER( generic_latch_8_device::clear_w )
// callback to set a latch value
//-------------------------------------------------
-void generic_latch_8_device::sync_callback(void *ptr, INT32 param)
+void generic_latch_8_device::sync_callback(void *ptr, int32_t param)
{
- UINT8 value = param;
+ uint8_t value = param;
// if the latch hasn't been read and the value is changed, log a warning
if (!m_latch_read && m_latched_value != value)
@@ -105,7 +105,7 @@ const device_type GENERIC_LATCH_16 = &device_creator<generic_latch_16_device>;
// generic_latch_16_device - constructor
//-------------------------------------------------
-generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, GENERIC_LATCH_16, "Generic 16-bit latch", tag, owner, clock, "generic_latch_16", __FILE__),
m_latched_value(0),
m_latch_read(0)
@@ -148,9 +148,9 @@ WRITE_LINE_MEMBER( generic_latch_16_device::clear_w )
// callback to set a latch value
//-------------------------------------------------
-void generic_latch_16_device::sync_callback(void *ptr, INT32 param)
+void generic_latch_16_device::sync_callback(void *ptr, int32_t param)
{
- UINT16 value = param;
+ uint16_t value = param;
// if the latch hasn't been read and the value is changed, log a warning
if (!m_latch_read && m_latched_value != value)
diff --git a/src/devices/machine/gen_latch.h b/src/devices/machine/gen_latch.h
index 07938a7b5d9..8076f8c7b14 100644
--- a/src/devices/machine/gen_latch.h
+++ b/src/devices/machine/gen_latch.h
@@ -31,7 +31,7 @@ class generic_latch_8_device : public device_t
{
public:
// construction/destruction
- generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -41,15 +41,15 @@ public:
DECLARE_WRITE_LINE_MEMBER( preset_w );
DECLARE_WRITE_LINE_MEMBER( clear_w );
- void preset_w(UINT16 value) { m_latched_value = value; }
+ void preset_w(uint16_t value) { m_latched_value = value; }
protected:
virtual void device_start() override;
- void sync_callback(void *ptr, INT32 param);
+ void sync_callback(void *ptr, int32_t param);
private:
- UINT16 m_latched_value;
- UINT8 m_latch_read;
+ uint16_t m_latched_value;
+ uint8_t m_latch_read;
};
// device type definition
@@ -62,7 +62,7 @@ class generic_latch_16_device : public device_t
{
public:
// construction/destruction
- generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ16_MEMBER( read );
DECLARE_WRITE16_MEMBER( write );
@@ -75,10 +75,10 @@ public:
protected:
virtual void device_start() override;
- void sync_callback(void *ptr, INT32 param);
+ void sync_callback(void *ptr, int32_t param);
private:
- UINT16 m_latched_value;
- UINT8 m_latch_read;
+ uint16_t m_latched_value;
+ uint8_t m_latch_read;
};
// device type definition
diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp
index 978683d7ab5..9a44c04e1d0 100644
--- a/src/devices/machine/genpc.cpp
+++ b/src/devices/machine/genpc.cpp
@@ -507,7 +507,7 @@ void ibm5160_mb_device::static_set_cputag(device_t &device, const char *tag)
// ibm5160_mb_device - constructor
//-------------------------------------------------
-ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, IBM5160_MOTHERBOARD, "IBM5160_MOTHERBOARD", tag, owner, clock, "ibm5160_mb", __FILE__),
m_maincpu(*owner, "maincpu"),
m_pic8259(*this, "pic8259"),
@@ -611,7 +611,7 @@ machine_config_constructor ibm5150_mb_device::device_mconfig_additions() const
// ibm5150_mb_device - constructor
//-------------------------------------------------
-ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: ibm5160_mb_device(mconfig, tag, owner, clock),
m_cassette(*this, "cassette")
{
@@ -826,7 +826,7 @@ ioport_constructor ec1841_mb_device::device_input_ports() const
// ec1841_mb_device - constructor
//-------------------------------------------------
-ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: ibm5160_mb_device(mconfig, tag, owner, clock)
{
}
@@ -876,7 +876,7 @@ READ8_MEMBER ( ec1841_mb_device::pc_ppi_portc_r )
return data;
}
-pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: ibm5160_mb_device(mconfig, tag, owner, clock)
{
}
diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h
index e766ea367da..9c982c3fccd 100644
--- a/src/devices/machine/genpc.h
+++ b/src/devices/machine/genpc.h
@@ -29,7 +29,7 @@ class ibm5160_mb_device : public device_t
{
public:
// construction/destruction
- ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
static void static_set_cputag(device_t &device, const char *tag);
@@ -55,25 +55,25 @@ public:
/* U73 is an LS74 - dual flip flop */
/* Q2 is set by OUT1 from the 8253 and goes to DRQ1 on the 8237 */
- UINT8 m_u73_q2;
- UINT8 m_out1;
+ uint8_t m_u73_q2;
+ uint8_t m_out1;
int m_dma_channel;
- UINT8 m_dma_offset[4];
- UINT8 m_pc_spkrdata;
- UINT8 m_pit_out2;
+ uint8_t m_dma_offset[4];
+ uint8_t m_pc_spkrdata;
+ uint8_t m_pit_out2;
bool m_cur_eop;
- UINT8 m_nmi_enabled;
+ uint8_t m_nmi_enabled;
int m_ppi_portc_switch_high;
int m_ppi_speaker;
int m_ppi_keyboard_clear;
- UINT8 m_ppi_keyb_clock;
- UINT8 m_ppi_portb;
- UINT8 m_ppi_clock_signal;
- UINT8 m_ppi_data_signal;
- UINT8 m_ppi_shift_register;
- UINT8 m_ppi_shift_enable;
+ uint8_t m_ppi_keyb_clock;
+ uint8_t m_ppi_portb;
+ uint8_t m_ppi_clock_signal;
+ uint8_t m_ppi_data_signal;
+ uint8_t m_ppi_shift_register;
+ uint8_t m_ppi_shift_enable;
// interface to the keyboard
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
@@ -127,7 +127,7 @@ class ibm5150_mb_device : public ibm5160_mb_device
{
public:
// construction/destruction
- ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ibm5150_mb_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;
@@ -157,7 +157,7 @@ class ec1841_mb_device : public ibm5160_mb_device
{
public:
// construction/destruction
- ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ec1841_mb_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;
@@ -181,8 +181,8 @@ class pc_noppi_mb_device : public ibm5160_mb_device
{
public:
// construction/destruction
- pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- UINT8 pit_out2() { return m_pit_out2; } // helper for near-clones with multifunction ics instead of 8255s
+ pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ uint8_t pit_out2() { return m_pit_out2; } // helper for near-clones with multifunction ics instead of 8255s
DECLARE_ADDRESS_MAP(map, 8);
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp
index 15fb9443234..9d38fef3c7f 100644
--- a/src/devices/machine/gt64xxx.cpp
+++ b/src/devices/machine/gt64xxx.cpp
@@ -23,7 +23,7 @@ DEVICE_ADDRESS_MAP_START(cpu_map, 32, gt64xxx_device)
AM_RANGE(0x00000000, 0x00000cff) AM_READWRITE( cpu_if_r, cpu_if_w)
ADDRESS_MAP_END
-gt64xxx_device::gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gt64xxx_device::gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_host_device(mconfig, GT64XXX, "Galileo GT-64XXX System Controller", tag, owner, clock, "gt64xxx", __FILE__),
m_be(0), m_autoconfig(0), m_irq_num(-1),
m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32),
@@ -68,7 +68,7 @@ void gt64xxx_device::device_start()
m_dma_timer->adjust(attotime::never, 0, DMA_TIMER_PERIOD);
// ROM
- UINT32 romSize = m_romRegion->bytes();
+ uint32_t romSize = m_romRegion->bytes();
m_cpu_space->install_rom (0x1fc00000, 0x1fc00000 + romSize - 1, m_romRegion->base());
// ROM MIPS DRC
m_cpu->add_fastram(0x1fc00000, 0x1fc00000 + romSize - 1, TRUE, m_romRegion->base());
@@ -152,7 +152,7 @@ void gt64xxx_device::device_reset()
void gt64xxx_device::map_cpu_space()
{
- UINT32 winStart, winEnd;
+ uint32_t winStart, winEnd;
// ROM region starts at 0x1fc00000
m_cpu_space->unmap_readwrite(0x00000000, 0x1fbfffff);
@@ -176,7 +176,7 @@ void gt64xxx_device::map_cpu_space()
m_ram[ramIndex].resize((winEnd + 1 - winStart) / 4);
m_cpu_space->install_ram(winStart, winEnd, m_ram[ramIndex].data());
//m_cpu->add_fastram(winStart, m_ram[ramIndex].size() * sizeof(m_ram[ramIndex][0]), FALSE, &m_ram[ramIndex][0]);
- //m_cpu->add_fastram(winStart, m_ram[ramIndex].size() * sizeof(UINT32), FALSE, m_ram[ramIndex].data());
+ //m_cpu->add_fastram(winStart, m_ram[ramIndex].size() * sizeof(uint32_t), FALSE, m_ram[ramIndex].data());
if (LOG_GALILEO)
logerror("%s: map_cpu_space ras[%i] start: %08X end: %08X\n", tag(), ramIndex, winStart, winEnd);
}
@@ -254,11 +254,11 @@ void gt64xxx_device::map_cpu_space()
}
}
-void gt64xxx_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
+void gt64xxx_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space)
{
int ramIndex;
- UINT32 winStart, winEnd, winSize;
+ uint32_t winStart, winEnd, winSize;
// Not sure if GREG_RAS_1_0_LO should be added on PCI address map side.
// RAS0
@@ -332,7 +332,7 @@ WRITE_LINE_MEMBER(gt64xxx_device::pci_stall)
// PCI bus control
READ32_MEMBER (gt64xxx_device::pci_config_r)
{
- UINT32 result = 0;
+ uint32_t result = 0;
if (LOG_GALILEO)
logerror("%06X:galileo pci_config_r from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
return result;
@@ -345,7 +345,7 @@ WRITE32_MEMBER (gt64xxx_device::pci_config_w)
// PCI Master Window 0
READ32_MEMBER (gt64xxx_device::master_mem0_r)
{
- UINT32 result = this->space(AS_DATA).read_dword((m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_DATA).read_dword((m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), mem_mask);
if (LOG_PCI)
logerror("%06X:galileo pci mem0 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), result, mem_mask);
return result;
@@ -372,7 +372,7 @@ WRITE32_MEMBER (gt64xxx_device::master_mem0_w)
// PCI Master Window 1
READ32_MEMBER (gt64xxx_device::master_mem1_r)
{
- UINT32 result = this->space(AS_DATA).read_dword((m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_DATA).read_dword((m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), mem_mask);
if (LOG_PCI)
logerror("%06X:galileo pci mem1 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), result, mem_mask);
return result;
@@ -387,7 +387,7 @@ WRITE32_MEMBER (gt64xxx_device::master_mem1_w)
// PCI Master IO
READ32_MEMBER (gt64xxx_device::master_io_r)
{
- UINT32 result = this->space(AS_IO).read_dword((m_reg[GREG_PCI_IO_LO]<<21) | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_IO).read_dword((m_reg[GREG_PCI_IO_LO]<<21) | (offset*4), mem_mask);
if (LOG_PCI && m_prev_addr != offset) {
m_prev_addr = offset;
logerror("%06X:galileo pci io read from offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), result, mem_mask);
@@ -405,7 +405,7 @@ WRITE32_MEMBER (gt64xxx_device::master_io_w)
READ32_MEMBER(gt64xxx_device::ras_0_r)
{
- UINT32 result = m_ram[0][offset];
+ uint32_t result = m_ram[0][offset];
if (LOG_PCI)
logerror("%06X:galileo ras_0 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), offset * 4, result, mem_mask);
return result;
@@ -420,7 +420,7 @@ WRITE32_MEMBER(gt64xxx_device::ras_0_w)
READ32_MEMBER(gt64xxx_device::ras_1_r)
{
- UINT32 result = m_ram[1][offset];
+ uint32_t result = m_ram[1][offset];
if (LOG_PCI)
logerror("%06X:galileo ras_0 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), offset * 4, result, mem_mask);
return result;
@@ -435,7 +435,7 @@ WRITE32_MEMBER(gt64xxx_device::ras_1_w)
READ32_MEMBER(gt64xxx_device::ras_2_r)
{
- UINT32 result = m_ram[2][offset];
+ uint32_t result = m_ram[2][offset];
if (LOG_PCI)
logerror("%06X:galileo ras_0 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), offset * 4, result, mem_mask);
return result;
@@ -450,7 +450,7 @@ WRITE32_MEMBER(gt64xxx_device::ras_2_w)
READ32_MEMBER(gt64xxx_device::ras_3_r)
{
- UINT32 result = m_ram[3][offset];
+ uint32_t result = m_ram[3][offset];
if (LOG_PCI)
logerror("%06X:galileo ras_0 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), offset * 4, result, mem_mask);
return result;
@@ -467,7 +467,7 @@ WRITE32_MEMBER(gt64xxx_device::ras_3_w)
// CPU I/F
READ32_MEMBER (gt64xxx_device::cpu_if_r)
{
- UINT32 result = m_reg[offset];
+ uint32_t result = m_reg[offset];
/* switch off the offset for special cases */
switch (offset)
@@ -483,7 +483,7 @@ READ32_MEMBER (gt64xxx_device::cpu_if_r)
result = timer->count;
if (timer->active)
{
- UINT32 elapsed = (timer->timer->elapsed() * m_clock).as_double();
+ uint32_t elapsed = (timer->timer->elapsed() * m_clock).as_double();
result = (result > elapsed) ? (result - elapsed) : 0;
}
@@ -538,7 +538,7 @@ WRITE32_MEMBER(gt64xxx_device::cpu_if_w)
mem_mask = flipendian_int32(mem_mask);
}
- UINT32 oldata = m_reg[offset];
+ uint32_t oldata = m_reg[offset];
COMBINE_DATA(&m_reg[offset]);
/* switch off the offset for special cases */
@@ -639,7 +639,7 @@ WRITE32_MEMBER(gt64xxx_device::cpu_if_w)
}
else if (timer->active && !(data & mask))
{
- UINT32 elapsed = (timer->timer->elapsed() * m_clock).as_double();
+ uint32_t elapsed = (timer->timer->elapsed() * m_clock).as_double();
timer->active = 0;
timer->count = (timer->count > elapsed) ? (timer->count - elapsed) : 0;
timer->timer->adjust(attotime::never, which);
@@ -666,7 +666,7 @@ WRITE32_MEMBER(gt64xxx_device::cpu_if_w)
case GREG_CONFIG_ADDRESS:
// Type 0 config transactions signalled by Bus Num = 0 and Device Num != 0
// Bits 15:11 get mapped into device number for configuration
- UINT32 modData;
+ uint32_t modData;
if (0 && (data & 0xff0000) == 0x0 && (data & 0xf800)) {
// Type 0 transaction
modData = 0;
@@ -756,7 +756,7 @@ TIMER_CALLBACK_MEMBER(gt64xxx_device::timer_callback)
* Galileo DMA handler
*
*************************************/
-address_space* gt64xxx_device::dma_decode_address(UINT32 &addr)
+address_space* gt64xxx_device::dma_decode_address(uint32_t &addr)
{
for (size_t index = 0; index < proc_addr_bank::ADDR_NUM; ++index)
{
@@ -769,7 +769,7 @@ address_space* gt64xxx_device::dma_decode_address(UINT32 &addr)
int gt64xxx_device::dma_fetch_next(address_space &space, int which)
{
offs_t address = 0;
- UINT32 data;
+ uint32_t data;
/* no-op for unchained mode */
if (!(m_reg[GREG_DMA0_CONTROL + which] & 0x200))
@@ -827,7 +827,7 @@ TIMER_CALLBACK_MEMBER (gt64xxx_device::perform_dma)
{
offs_t srcaddr = m_reg[GREG_DMA0_SOURCE + which];
offs_t dstaddr = m_reg[GREG_DMA0_DEST + which];
- UINT32 bytesleft = m_reg[GREG_DMA0_COUNT + which] & 0xffff;
+ uint32_t bytesleft = m_reg[GREG_DMA0_COUNT + which] & 0xffff;
address_space* srcSpace = dma_decode_address(srcaddr);
address_space* dstSpace = dma_decode_address(dstaddr);
@@ -867,7 +867,7 @@ TIMER_CALLBACK_MEMBER (gt64xxx_device::perform_dma)
m_reg[GREG_DMA0_COUNT + which] = (m_reg[GREG_DMA0_COUNT + which] & ~0xffff) | bytesleft;
m_retry_count++;
- UINT32 configRetryCount = (m_reg[GREG_PCI_TIMEOUT] >> 16) & 0xff;
+ uint32_t configRetryCount = (m_reg[GREG_PCI_TIMEOUT] >> 16) & 0xff;
if (m_retry_count >= configRetryCount && configRetryCount > 0) {
logerror("gt64xxx_device::perform_dma Error! Too many PCI retries. DMA%d: src=%08X dst=%08X bytes=%04X sinc=%d dinc=%d\n", which, srcaddr, dstaddr, bytesleft, srcinc, dstinc);
// Signal error and abort DMA
diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h
index 467e72bcae5..15720d36897 100644
--- a/src/devices/machine/gt64xxx.h
+++ b/src/devices/machine/gt64xxx.h
@@ -173,14 +173,14 @@
struct galileo_timer
{
emu_timer * timer;
- UINT32 count;
- UINT8 active;
+ uint32_t count;
+ uint8_t active;
};
struct galileo_addr_map
{
- UINT32 low_addr;
- UINT32 high_addr;
+ uint32_t low_addr;
+ uint32_t high_addr;
address_space* space;
galileo_addr_map() : low_addr(0xffffffff), high_addr(0x0) {}
};
@@ -196,14 +196,14 @@ struct galileo_device_map
class gt64xxx_device : public pci_host_device {
public:
- gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void reset_all_mappings() override;
- virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space) override;
+ virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
void set_cpu_tag(const char *tag) { cpu_tag = tag;}
- void set_clock(const UINT32 clock) {m_clock = clock;}
+ void set_clock(const uint32_t clock) {m_clock = clock;}
void set_be(const int be) {m_be = be;}
void set_autoconfig(const int autoconfig) {m_autoconfig = autoconfig;}
void set_irq_num(const int irq_num) {m_irq_num = irq_num;}
@@ -255,16 +255,16 @@ protected:
private:
mips3_device *m_cpu;
const char *cpu_tag;
- UINT32 m_clock;
+ uint32_t m_clock;
int m_be, m_autoconfig;
int m_irq_num;
int m_pci_stall_state;
int m_retry_count;
int m_pci_cpu_stalled;
- UINT32 m_cpu_stalled_offset;
- UINT32 m_cpu_stalled_data;
- UINT32 m_cpu_stalled_mem_mask;
+ uint32_t m_cpu_stalled_offset;
+ uint32_t m_cpu_stalled_data;
+ uint32_t m_cpu_stalled_mem_mask;
address_space_config m_mem_config, m_io_config;
@@ -275,19 +275,19 @@ private:
void map_cpu_space();
- UINT32 m_prev_addr;
+ uint32_t m_prev_addr;
/* raw register data */
- UINT32 m_reg[0xd00/4];
+ uint32_t m_reg[0xd00/4];
/* timer info */
galileo_timer m_timer[4];
TIMER_CALLBACK_MEMBER(timer_callback);
/* DMA info */
- INT8 m_dma_active;
+ int8_t m_dma_active;
// Ram
- std::vector<UINT32> m_ram[4];
+ std::vector<uint32_t> m_ram[4];
// Chip Select
galileo_device_map m_cs_map[4];
@@ -308,7 +308,7 @@ private:
galileo_addr_map dma_addr_map[proc_addr_bank::ADDR_NUM];
int dma_fetch_next(address_space &space, int which);
TIMER_CALLBACK_MEMBER(perform_dma);
- address_space* dma_decode_address(UINT32 &addr);
+ address_space* dma_decode_address(uint32_t &addr);
};
diff --git a/src/devices/machine/hd63450.cpp b/src/devices/machine/hd63450.cpp
index e15039fbb38..cc5cbe7940a 100644
--- a/src/devices/machine/hd63450.cpp
+++ b/src/devices/machine/hd63450.cpp
@@ -10,7 +10,7 @@
const device_type HD63450 = &device_creator<hd63450_device>;
-hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HD63450, "Hitachi HD63450", tag, owner, clock, "hd63450", __FILE__),
m_dma_end(*this),
m_dma_error(*this),
diff --git a/src/devices/machine/hd63450.h b/src/devices/machine/hd63450.h
index e303a0d28b2..5cee35500fc 100644
--- a/src/devices/machine/hd63450.h
+++ b/src/devices/machine/hd63450.h
@@ -71,7 +71,7 @@ struct hd63450_regs
class hd63450_device : public device_t
{
public:
- hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~hd63450_device() {}
template<class _Object> static devcb_base &set_dma_end_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_end.set_callback(object); }
diff --git a/src/devices/machine/hd64610.cpp b/src/devices/machine/hd64610.cpp
index f006b2a65d2..c44cc072e61 100644
--- a/src/devices/machine/hd64610.cpp
+++ b/src/devices/machine/hd64610.cpp
@@ -98,7 +98,7 @@ inline void hd64610_device::set_irq_line()
// read_counter -
//-------------------------------------------------
-inline UINT8 hd64610_device::read_counter(int counter)
+inline uint8_t hd64610_device::read_counter(int counter)
{
return bcd_2_dec(m_regs[counter]);
}
@@ -108,7 +108,7 @@ inline UINT8 hd64610_device::read_counter(int counter)
// write_counter -
//-------------------------------------------------
-inline void hd64610_device::write_counter(int counter, UINT8 value)
+inline void hd64610_device::write_counter(int counter, uint8_t value)
{
m_regs[counter] = dec_2_bcd(value);
}
@@ -150,7 +150,7 @@ inline void hd64610_device::check_alarm()
// hd64610_device - constructor
//-------------------------------------------------
-hd64610_device::hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+hd64610_device::hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HD64610, "HD64610", tag, owner, clock, "hd64610", __FILE__),
device_rtc_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
@@ -286,7 +286,7 @@ WRITE_LINE_MEMBER( hd64610_device::h_w )
READ8_MEMBER( hd64610_device::read )
{
- UINT8 data = m_regs[offset & 0x0f];
+ uint8_t data = m_regs[offset & 0x0f];
if (LOG) logerror("HD64610 '%s' Register %u Read %02x\n", tag(), offset, data);
diff --git a/src/devices/machine/hd64610.h b/src/devices/machine/hd64610.h
index 2dc5726ddea..44357443d68 100644
--- a/src/devices/machine/hd64610.h
+++ b/src/devices/machine/hd64610.h
@@ -54,7 +54,7 @@ class hd64610_device : public device_t,
{
public:
// construction/destruction
- hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<hd64610_device &>(device).m_out_irq_cb.set_callback(object); }
template<class _Object> static devcb_base &set_out_1hz_callback(device_t &device, _Object object) { return downcast<hd64610_device &>(device).m_out_1hz_cb.set_callback(object); }
@@ -80,8 +80,8 @@ protected:
private:
inline void set_irq_line();
- inline UINT8 read_counter(int counter);
- inline void write_counter(int counter, UINT8 value);
+ inline uint8_t read_counter(int counter);
+ inline void write_counter(int counter, uint8_t value);
inline void check_alarm();
static const device_timer_id TIMER_UPDATE_COUNTER = 0;
@@ -89,7 +89,7 @@ private:
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_1hz_cb;
- UINT8 m_regs[0x10]; // Internal registers
+ uint8_t m_regs[0x10]; // Internal registers
int m_hline_state; // H-Start/Stop line
int m_irq_out; // alarm output
diff --git a/src/devices/machine/hdc92x4.cpp b/src/devices/machine/hdc92x4.cpp
index 8de7457143a..0cc0aa32934 100644
--- a/src/devices/machine/hdc92x4.cpp
+++ b/src/devices/machine/hdc92x4.cpp
@@ -468,7 +468,7 @@ const hdc92x4_device::cmddef hdc92x4_device::s_command[] =
/*
Standard constructor for the base class and the two variants
*/
-hdc92x4_device::hdc92x4_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)
+hdc92x4_device::hdc92x4_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_out_intrq(*this),
m_out_dmarq(*this),
@@ -480,13 +480,13 @@ hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type,
{
}
-hdc9224_device::hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+hdc9224_device::hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: hdc92x4_device(mconfig, HDC9224, "SMC HDC9224 Universal Disk Controller", tag, owner, clock, "hdc9224", __FILE__)
{
m_is_hdc9234 = false;
}
-hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: hdc92x4_device(mconfig, HDC9234, "SMC HDC9234 Universal Disk Controller", tag, owner, clock, "hdc9234", __FILE__)
{
m_is_hdc9234 = true;
@@ -496,7 +496,7 @@ hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, d
/*
Set or reset some bits.
*/
-void hdc92x4_device::set_bits(UINT8& byte, int mask, bool set)
+void hdc92x4_device::set_bits(uint8_t& byte, int mask, bool set)
{
if (set) byte |= mask;
else byte &= ~mask;
@@ -628,7 +628,7 @@ bool hdc92x4_device::bad_sector()
return (m_selected_drive_type != TYPE_AT) && ((m_register_r[CURRENT_HEAD] & 0x80)!=0);
}
-UINT8 hdc92x4_device::current_command()
+uint8_t hdc92x4_device::current_command()
{
return m_register_w[COMMAND];
}
@@ -1565,7 +1565,7 @@ void hdc92x4_device::tape_backup()
*/
void hdc92x4_device::poll_drives()
{
- UINT8 drivebit;
+ uint8_t drivebit;
if (m_substate == UNDEF)
{
logerror("POLL DRIVES command %02x\n", current_command());
@@ -2947,7 +2947,7 @@ void hdc92x4_device::live_run_until(attotime limit)
{
m_out_dip(ASSERT_LINE);
m_live_state.byte_counter--;
- UINT8 headbyte = m_in_dma(0, 0xff);
+ uint8_t headbyte = m_in_dma(0, 0xff);
write_on_track(encode(headbyte), 1, (m_live_state.byte_counter>0)? WRITE_HEADER : WRITE_HEADER_CRC);
@@ -2968,7 +2968,7 @@ void hdc92x4_device::live_run_until(attotime limit)
case WRITE_HEADER_CRC:
if (m_live_state.byte_counter > 0)
{
- UINT8 crct = (m_live_state.crc >> 8) & 0xff;
+ uint8_t crct = (m_live_state.crc >> 8) & 0xff;
if (TRACE_WRITE && TRACE_DETAIL) logerror("Write CRC byte %02x\n", crct);
m_live_state.byte_counter--;
write_on_track(encode(crct), 1, WRITE_HEADER_CRC);
@@ -3694,7 +3694,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit)
{
m_out_dip(ASSERT_LINE);
m_live_state.byte_counter--;
- UINT8 headbyte = m_in_dma(0, 0xff);
+ uint8_t headbyte = m_in_dma(0, 0xff);
if (TRACE_HEADER) logerror("%02x\n", headbyte);
write_on_track(encode_hd(headbyte), 1, (m_live_state.byte_counter>0)? WRITE_HEADER : WRITE_HEADER_CRC);
@@ -3711,7 +3711,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit)
case WRITE_HEADER_CRC:
if (m_live_state.byte_counter > 0)
{
- UINT8 crct = (m_live_state.crc >> 8) & 0xff;
+ uint8_t crct = (m_live_state.crc >> 8) & 0xff;
if (TRACE_HEADER) logerror("%02x\n", crct);
m_live_state.byte_counter--;
write_on_track(encode_hd(crct), 1, WRITE_HEADER_CRC);
@@ -3833,7 +3833,7 @@ void hdc92x4_device::live_abort()
comprised by WRITE_TRACK_(NEXT_)BYTE
Arguments: byte to be written, number, state on return
*/
-void hdc92x4_device::write_on_track(UINT16 encoded, int repeat, int next_state)
+void hdc92x4_device::write_on_track(uint16_t encoded, int repeat, int next_state)
{
m_live_state.repeat = repeat;
m_live_state.state = WRITE_TRACK_BYTE;
@@ -3854,7 +3854,7 @@ void hdc92x4_device::skip_on_track(int repeat, int next_state)
m_live_state.return_state = next_state;
}
-UINT8 hdc92x4_device::get_data_from_encoding(UINT16 raw)
+uint8_t hdc92x4_device::get_data_from_encoding(uint16_t raw)
{
unsigned int value = 0;
@@ -3952,10 +3952,10 @@ bool hdc92x4_device::write_one_bit(const attotime &limit)
return false;
}
-UINT16 hdc92x4_device::encode(UINT8 byte)
+uint16_t hdc92x4_device::encode(uint8_t byte)
{
- UINT16 raw;
- UINT8 check_pos;
+ uint16_t raw;
+ uint8_t check_pos;
bool last_bit_set;
check_pos = 0x80;
@@ -4003,7 +4003,7 @@ void hdc92x4_device::encode_again()
encode_raw(m_live_state.shift_reg_save);
}
-void hdc92x4_device::encode_raw(UINT16 raw)
+void hdc92x4_device::encode_raw(uint16_t raw)
{
m_live_state.bit_counter = 16;
m_live_state.shift_reg = m_live_state.shift_reg_save = raw;
@@ -4060,7 +4060,7 @@ void hdc92x4_device::checkpoint()
*/
bool hdc92x4_device::read_from_mfmhd(const attotime &limit)
{
- UINT16 data = 0;
+ uint16_t data = 0;
bool offlimit = false;
if (m_harddisk != nullptr)
@@ -4098,7 +4098,7 @@ bool hdc92x4_device::read_from_mfmhd(const attotime &limit)
}
else
{
- UINT16 separated = data;
+ uint16_t separated = data;
m_live_state.shift_reg = data;
if (m_hd_encoding == MFM_BYTE)
@@ -4137,7 +4137,7 @@ bool hdc92x4_device::read_from_mfmhd(const attotime &limit)
*/
bool hdc92x4_device::write_to_mfmhd(const attotime &limit)
{
- UINT16 data;
+ uint16_t data;
int count;
bool offlimit = false;
@@ -4183,10 +4183,10 @@ bool hdc92x4_device::write_to_mfmhd(const attotime &limit)
return false;
}
-UINT16 hdc92x4_device::encode_hd(UINT8 byte)
+uint16_t hdc92x4_device::encode_hd(uint8_t byte)
{
- UINT16 cells;
- UINT8 check_pos;
+ uint16_t cells;
+ uint8_t check_pos;
bool last_bit_set;
check_pos = 0x80;
@@ -4227,9 +4227,9 @@ UINT16 hdc92x4_device::encode_hd(UINT8 byte)
return cells;
}
-UINT16 hdc92x4_device::encode_a1_hd()
+uint16_t hdc92x4_device::encode_a1_hd()
{
- UINT16 cells = 0;
+ uint16_t cells = 0;
switch (m_hd_encoding)
{
@@ -4260,7 +4260,7 @@ UINT16 hdc92x4_device::encode_a1_hd()
*/
READ8_MEMBER( hdc92x4_device::read )
{
- UINT8 reply;
+ uint8_t reply;
if ((offset & 1) == 0)
{
// Data register
@@ -4491,7 +4491,7 @@ void hdc92x4_device::set_command_done()
Read the drive status over the auxbus
(as said, let the controller board push the values into the controller)
*/
-void hdc92x4_device::auxbus_in(UINT8 data)
+void hdc92x4_device::auxbus_in(uint8_t data)
{
// Kill unwanted input via auxbus until we are initialized.
if (!m_initialized)
@@ -4653,7 +4653,7 @@ void hdc92x4_device::auxbus_out()
}
}
-void hdc92x4_device::dma_address_out(UINT8 addrub, UINT8 addrhb, UINT8 addrlb)
+void hdc92x4_device::dma_address_out(uint8_t addrub, uint8_t addrhb, uint8_t addrlb)
{
if (TRACE_DMA) logerror("Setting DMA address %06x\n", (addrub<<16 | addrhb<<8 | addrlb)&0xffffff);
m_out_auxbus((offs_t)HDC_OUTPUT_DMA_ADDR, addrub);
diff --git a/src/devices/machine/hdc92x4.h b/src/devices/machine/hdc92x4.h
index ab7011c5ec7..ae3601d5846 100644
--- a/src/devices/machine/hdc92x4.h
+++ b/src/devices/machine/hdc92x4.h
@@ -79,7 +79,7 @@ enum
class hdc92x4_device : public device_t
{
public:
- hdc92x4_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);
+ hdc92x4_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);
// Accesors from the CPU side
DECLARE_READ8_MEMBER( read );
@@ -98,7 +98,7 @@ public:
// auxbus_in is intended to read events from the drives
// In the real chip the status is polled; to avoid unnecessary load
// we implement it as a push call
- void auxbus_in( UINT8 data );
+ void auxbus_in( uint8_t data );
// We pretend that the data separator is part of this controller. It is
// in fact a separate circuit. The clock divider must be properly set
@@ -131,8 +131,8 @@ protected:
int m_register_pointer;
// Read and write registers
- UINT8 m_register_w[12];
- UINT8 m_register_r[15];
+ uint8_t m_register_w[12];
+ uint8_t m_register_r[15];
// Interrupt management (outgoing INT pin)
void set_interrupt(line_state intr);
@@ -144,19 +144,19 @@ protected:
mfm_harddisk_device* m_harddisk;
// internal register OUTPUT1
- UINT8 m_output1, m_output1_old;
+ uint8_t m_output1, m_output1_old;
// internal register OUTPUT2
- UINT8 m_output2, m_output2_old;
+ uint8_t m_output2, m_output2_old;
// Write the output registers to the latches
void auxbus_out();
// Write the DMA address to the external latches
- void dma_address_out(UINT8 addrub, UINT8 addrhb, UINT8 addrlb);
+ void dma_address_out(uint8_t addrub, uint8_t addrhb, uint8_t addrlb);
// Intermediate storage for register
- UINT8 m_regvalue;
+ uint8_t m_regvalue;
// Drive type that has been selected in drive_select
int m_selected_drive_type;
@@ -198,7 +198,7 @@ protected:
std::string ttsn();
// Utility routine to set or reset bits
- void set_bits(UINT8& byte, int mask, bool set);
+ void set_bits(uint8_t& byte, int mask, bool set);
// Event handling
line_state m_line_level;
@@ -213,16 +213,16 @@ protected:
struct live_info
{
attotime time;
- UINT16 shift_reg;
- UINT16 shift_reg_save;
- UINT16 crc;
+ uint16_t shift_reg;
+ uint16_t shift_reg_save;
+ uint16_t crc;
int bit_counter;
int bit_count_total; // used for timeout handling
int byte_counter;
bool data_separator_phase;
bool last_data_bit;
- UINT8 clock_reg;
- UINT8 data_reg;
+ uint8_t clock_reg;
+ uint8_t data_reg;
int state;
int next_state;
int repeat; // for formatting
@@ -258,7 +258,7 @@ protected:
bool found_mark(int state);
// Delivers the data bits from the given encoding
- UINT8 get_data_from_encoding(UINT16 raw);
+ uint8_t get_data_from_encoding(uint16_t raw);
// ==============================================
// PLL functions and interface to floppy and harddisk
@@ -268,7 +268,7 @@ protected:
fdc_pll_t m_pll, m_checkpoint_pll;
// Clock divider value
- UINT8 m_clock_divider;
+ uint8_t m_clock_divider;
// MFM HD encoding type
mfmhd_enc_t m_hd_encoding;
@@ -278,14 +278,14 @@ protected:
// Puts the word into the shift register directly. Changes the m_live_state members
// shift_reg, and last_data_bit
- void encode_raw(UINT16 word);
+ void encode_raw(uint16_t word);
// Encodes a byte in FM or MFM. Called by encode_byte.
- UINT16 encode(UINT8 byte);
+ uint16_t encode(uint8_t byte);
// Encodes a byte in FM or MFM. Called by encode_byte.
- UINT16 encode_hd(UINT8 byte);
- UINT16 encode_a1_hd();
+ uint16_t encode_hd(uint8_t byte);
+ uint16_t encode_a1_hd();
// Encode the latest byte again
void encode_again();
@@ -297,7 +297,7 @@ protected:
bool write_one_bit(const attotime &limit);
// Writes to the current position on the track
- void write_on_track(UINT16 raw, int count, int next_state);
+ void write_on_track(uint16_t raw, int count, int next_state);
// Skips bytes on the track
void skip_on_track(int count, int next_state);
@@ -318,8 +318,8 @@ protected:
typedef struct
{
- UINT8 baseval;
- UINT8 mask;
+ uint8_t baseval;
+ uint8_t mask;
cmdfunc command;
} cmddef;
@@ -436,7 +436,7 @@ protected:
int current_cylinder();
// Delivers the current command
- UINT8 current_command();
+ uint8_t current_command();
// Step time (minus pulse width)
virtual int step_time() =0;
@@ -490,7 +490,7 @@ protected:
class hdc9224_device : public hdc92x4_device
{
public:
- hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
int step_time() override;
@@ -500,7 +500,7 @@ protected:
class hdc9234_device : public hdc92x4_device
{
public:
- hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
int step_time() override;
diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp
index 62f1924a4ea..0f427765875 100644
--- a/src/devices/machine/hp_taco.cpp
+++ b/src/devices/machine/hp_taco.cpp
@@ -280,7 +280,7 @@ static const hp_taco_device::tape_pos_t tape_holes[] = {
const device_type HP_TACO = &device_creator<hp_taco_device>;
// Constructors
-hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
+hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
device_image_interface(mconfig , *this),
m_irq_handler(*this),
@@ -291,7 +291,7 @@ hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type,
clear_state();
}
-hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HP_TACO, "HP TACO", tag, owner, clock, "TACO", __FILE__),
device_image_interface(mconfig , *this),
m_irq_handler(*this),
@@ -336,7 +336,7 @@ WRITE16_MEMBER(hp_taco_device::reg_w)
READ16_MEMBER(hp_taco_device::reg_r)
{
- UINT16 res = 0;
+ uint16_t res = 0;
// Any I/O activity clears IRQ
irq_w(false);
@@ -671,7 +671,7 @@ void hp_taco_device::update_tach_reg(void)
tape_pos_t pos = current_tape_pos();
tape_pos_t pos_int = pos / TAPE_POS_FRACT;
tape_pos_t ref_int = m_tach_reg_ref / TAPE_POS_FRACT;
- UINT16 reg_value = (UINT16)(abs(pos_int - ref_int) + m_tach_reg);
+ uint16_t reg_value = (uint16_t)(abs(pos_int - ref_int) + m_tach_reg);
LOG_0(("Tach = %04x @ pos = %d, ref_pos = %d\n" , reg_value , pos , m_tach_reg_ref));
@@ -741,11 +741,11 @@ attotime hp_taco_device::time_to_stopping_pos(void) const
return time_to_distance(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST);
}
-bool hp_taco_device::start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0)
+bool hp_taco_device::start_tape_cmd(uint16_t cmd_reg , uint16_t must_be_1 , uint16_t must_be_0)
{
m_cmd_reg = cmd_reg;
- UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
+ uint16_t to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
// Bits in STATUS_ERR_MASK must always be 0
must_be_0 |= STATUS_ERR_MASK;
@@ -1054,8 +1054,8 @@ void hp_taco_device::clear_tape(void)
void hp_taco_device::dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words)
{
if (n_words) {
- UINT32 tmp32;
- UINT16 tmp16;
+ uint32_t tmp32;
+ uint16_t tmp16;
tmp32 = n_words;
fwrite(&tmp32 , sizeof(tmp32));
@@ -1072,7 +1072,7 @@ void hp_taco_device::dump_sequence(tape_track_t::const_iterator it_start , unsig
void hp_taco_device::save_tape(void)
{
- UINT32 tmp32;
+ uint32_t tmp32;
fseek(0, SEEK_SET);
@@ -1094,14 +1094,14 @@ void hp_taco_device::save_tape(void)
}
dump_sequence(it_start , n_words);
// End of track
- tmp32 = (UINT32)-1;
+ tmp32 = (uint32_t)-1;
fwrite(&tmp32 , sizeof(tmp32));
}
}
bool hp_taco_device::load_track(tape_track_t& track)
{
- UINT32 tmp32;
+ uint32_t tmp32;
track.clear();
@@ -1110,7 +1110,7 @@ bool hp_taco_device::load_track(tape_track_t& track)
return false;
}
- if (tmp32 == (UINT32)-1) {
+ if (tmp32 == (uint32_t)-1) {
return true;
}
@@ -1123,7 +1123,7 @@ bool hp_taco_device::load_track(tape_track_t& track)
tape_pos_t pos = (tape_pos_t)tmp32;
for (unsigned i = 0; i < n_words; i++) {
- UINT16 tmp16;
+ uint16_t tmp16;
if (fread(&tmp16 , sizeof(tmp16)) != sizeof(tmp16)) {
return false;
@@ -1137,7 +1137,7 @@ bool hp_taco_device::load_track(tape_track_t& track)
bool hp_taco_device::load_tape(void)
{
- UINT32 magic;
+ uint32_t magic;
if (fread(&magic , sizeof(magic)) != sizeof(magic) ||
magic != FILE_MAGIC) {
@@ -1536,7 +1536,7 @@ void hp_taco_device::cmd_fsm(void)
}
}
-void hp_taco_device::start_cmd_exec(UINT16 new_cmd_reg)
+void hp_taco_device::start_cmd_exec(uint16_t new_cmd_reg)
{
LOG_0(("New cmd %02x @ %g cmd %02x st %d\n" , CMD_CODE(new_cmd_reg) , machine().time().as_double() , CMD_CODE(m_cmd_reg) , m_cmd_state));
diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h
index 49cfeacd141..6bd66c1b4e5 100644
--- a/src/devices/machine/hp_taco.h
+++ b/src/devices/machine/hp_taco.h
@@ -27,8 +27,8 @@ class hp_taco_device : public device_t ,
{
public:
// construction/destruction
- hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
- hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname);
+ hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_irq_handler.set_callback(object); }
@@ -57,10 +57,10 @@ public:
virtual const char *file_extensions() const override;
// Tape position, 1 unit = 1 inch / (968 * 1024)
- typedef INT32 tape_pos_t;
+ typedef int32_t tape_pos_t;
// Words stored on tape
- typedef UINT16 tape_word_t;
+ typedef uint16_t tape_word_t;
protected:
// device-level overrides
@@ -79,16 +79,16 @@ private:
devcb_write_line m_sts_handler;
// Registers
- UINT16 m_data_reg;
+ uint16_t m_data_reg;
bool m_data_reg_full;
- UINT16 m_cmd_reg;
- UINT16 m_status_reg;
- UINT16 m_tach_reg;
+ uint16_t m_cmd_reg;
+ uint16_t m_status_reg;
+ uint16_t m_tach_reg;
tape_pos_t m_tach_reg_ref;
bool m_tach_reg_frozen;
- UINT16 m_checksum_reg;
+ uint16_t m_checksum_reg;
bool m_clear_checksum_reg;
- UINT16 m_timing_reg;
+ uint16_t m_timing_reg;
// State
bool m_irq;
@@ -125,7 +125,7 @@ private:
// Reading & writing
bool m_tape_wr;
tape_pos_t m_rw_pos;
- UINT16 m_next_word;
+ uint16_t m_next_word;
tape_track_t::iterator m_rd_it;
bool m_rd_it_valid;
@@ -153,7 +153,7 @@ private:
attotime time_to_distance(tape_pos_t distance) const;
attotime time_to_target(tape_pos_t target) const;
attotime time_to_stopping_pos(void) const;
- bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
+ bool start_tape_cmd(uint16_t cmd_reg , uint16_t must_be_1 , uint16_t must_be_0);
void stop_tape(void);
tape_track_t& current_track(void);
static tape_pos_t word_length(tape_word_t w);
@@ -181,7 +181,7 @@ private:
void terminate_cmd_now(void);
void set_data_timeout(bool long_timeout);
void cmd_fsm(void);
- void start_cmd_exec(UINT16 new_cmd_reg);
+ void start_cmd_exec(uint16_t new_cmd_reg);
image_init_result internal_load(bool is_create);
};
diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp
index bac06e66420..02aa54d2771 100644
--- a/src/devices/machine/i2cmem.cpp
+++ b/src/devices/machine/i2cmem.cpp
@@ -69,7 +69,7 @@ const device_type I2CMEM = &device_creator<i2cmem_device>;
// i2cmem_device - constructor
//-------------------------------------------------
-i2cmem_device::i2cmem_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
+i2cmem_device::i2cmem_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock )
: device_t(mconfig, I2CMEM, "I2C Memory", tag, owner, clock, "i2cmem", __FILE__),
device_nvram_interface(mconfig, *this),
m_region(*this, DEVICE_SELF),
@@ -98,7 +98,7 @@ i2cmem_device::i2cmem_device( const machine_config &mconfig, const char *tag, de
void i2cmem_device::device_start()
{
- m_data = std::make_unique<UINT8 []>(m_data_size);
+ m_data = std::make_unique<uint8_t []>(m_data_size);
m_page.resize( m_page_size );
save_item( NAME(m_scl) );
diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h
index 797df97d70a..e739e7c963f 100644
--- a/src/devices/machine/i2cmem.h
+++ b/src/devices/machine/i2cmem.h
@@ -89,7 +89,7 @@ class i2cmem_device :
{
public:
// construction/destruction
- i2cmem_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock );
+ i2cmem_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock );
static void set_address(device_t &device, int address) { downcast<i2cmem_device &>(device).m_slave_address = address; }
static void set_page_size(device_t &device, int page_size) { downcast<i2cmem_device &>(device).m_page_size = page_size; }
@@ -126,7 +126,7 @@ protected:
optional_memory_region m_region;
// internal state
- std::unique_ptr<UINT8[]> m_data;
+ std::unique_ptr<uint8_t[]> m_data;
int m_slave_address;
int m_page_size;
int m_data_size;
@@ -142,7 +142,7 @@ protected:
int m_shift;
int m_devsel;
int m_byteaddr;
- std::vector<UINT8> m_page;
+ std::vector<uint8_t> m_page;
int m_page_offset;
};
diff --git a/src/devices/machine/i6300esb.cpp b/src/devices/machine/i6300esb.cpp
index 649c437befd..012ed9d6598 100644
--- a/src/devices/machine/i6300esb.cpp
+++ b/src/devices/machine/i6300esb.cpp
@@ -8,7 +8,7 @@ const device_type I6300ESB_LPC = &device_creator<i6300esb_lpc_device>;
DEVICE_ADDRESS_MAP_START(map, 32, i6300esb_watchdog_device)
ADDRESS_MAP_END
-i6300esb_watchdog_device::i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i6300esb_watchdog_device::i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, I6300ESB_WATCHDOG, "i6300ESB southbridge watchdog", tag, owner, clock, "i6300esb_watchdog", __FILE__)
{
}
@@ -86,7 +86,7 @@ DEVICE_ADDRESS_MAP_START(internal_io_map, 32, i6300esb_lpc_device)
ADDRESS_MAP_END
-i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, I6300ESB_LPC, "i6300ESB southbridge ISA/LPC bridge", tag, owner, clock, "i6300esb_lpc", __FILE__),
acpi(*this, "acpi"),
rtc (*this, "rtc"),
@@ -662,15 +662,15 @@ WRITE8_MEMBER (i6300esb_lpc_device::nop_w)
{
}
-void i6300esb_lpc_device::map_bios(address_space *memory_space, UINT32 start, UINT32 end, int idsel)
+void i6300esb_lpc_device::map_bios(address_space *memory_space, uint32_t start, uint32_t end, int idsel)
{
// Ignore idsel, a16 inversion for now
- UINT32 mask = m_region->bytes() - 1;
+ uint32_t mask = m_region->bytes() - 1;
memory_space->install_rom(start, end, m_region->base() + (start & mask));
}
-void i6300esb_lpc_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
+void i6300esb_lpc_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space)
{
if(fwh_dec_en1 & 0x80) {
map_bios(memory_space, 0xfff80000, 0xffffffff, 7);
@@ -713,7 +713,7 @@ void i6300esb_lpc_device::map_extra(UINT64 memory_window_start, UINT64 memory_wi
if(gpio_cntl & 0x10)
logerror("%s: Warning: gpio range enabled at %04x-%04x\n", tag(), gpio_base, gpio_base+63);
- UINT32 hpet = 0xfed00000 + ((gen_cntl & 0x00018000) >> 3);
+ uint32_t hpet = 0xfed00000 + ((gen_cntl & 0x00018000) >> 3);
logerror("%s: Warning: hpet at %08x-%08x\n", tag(), hpet, hpet+0x3ff);
if(lpc_en & 0x1000)
@@ -728,26 +728,26 @@ void i6300esb_lpc_device::map_extra(UINT64 memory_window_start, UINT64 memory_wi
logerror("%s: Warning: gameport at 200-207\n", tag());
if(lpc_en & 0x0008) {
- UINT16 fdc = lpc_if_fdd_lpt_range & 0x10 ? 0x370 : 0x3f0;
+ uint16_t fdc = lpc_if_fdd_lpt_range & 0x10 ? 0x370 : 0x3f0;
logerror("%s: Warning: floppy at %04x-%04x\n", tag(), fdc, fdc+7);
}
if(lpc_en & 0x0004) {
- static const UINT16 lpt_pos[4] = { 0x378, 0x278, 0x3bc, 0x000 };
- UINT16 lpt = lpt_pos[lpc_if_fdd_lpt_range & 3];
+ static const uint16_t lpt_pos[4] = { 0x378, 0x278, 0x3bc, 0x000 };
+ uint16_t lpt = lpt_pos[lpc_if_fdd_lpt_range & 3];
if(lpt)
logerror("%s: Warning: lpt at %04x-%04x %04x-%04x\n", tag(), lpt, lpt+7, lpt+0x400, lpt+0x407);
}
- static const UINT16 com_pos[8] = { 0x3f8, 0x2f8, 0x220, 0x228, 0x238, 0x2e8, 0x338, 0x3e8 };
+ static const uint16_t com_pos[8] = { 0x3f8, 0x2f8, 0x220, 0x228, 0x238, 0x2e8, 0x338, 0x3e8 };
if(lpc_en & 0x0002) {
- UINT16 comb = com_pos[(lpc_if_com_range >> 4) & 7];
+ uint16_t comb = com_pos[(lpc_if_com_range >> 4) & 7];
logerror("%s: Warning: comb at %04x-%04x\n", tag(), comb, comb+7);
}
if(lpc_en & 0x0001) {
- UINT16 coma = com_pos[lpc_if_com_range & 7];
+ uint16_t coma = com_pos[lpc_if_com_range & 7];
logerror("%s: Warning: coma at %04x-%04x\n", tag(), coma, coma+7);
}
diff --git a/src/devices/machine/i6300esb.h b/src/devices/machine/i6300esb.h
index e3f216123bc..0472f8e75e3 100644
--- a/src/devices/machine/i6300esb.h
+++ b/src/devices/machine/i6300esb.h
@@ -18,11 +18,11 @@
class i6300esb_lpc_device : public pci_device {
public:
- i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void reset_all_mappings() override;
- virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space) override;
+ virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
virtual DECLARE_ADDRESS_MAP(config_map, 32) override;
@@ -39,13 +39,13 @@ private:
DECLARE_ADDRESS_MAP(internal_io_map, 32);
- UINT32 pmbase, gpio_base, fwh_sel1, gen_cntl, etr1, rst_cnt2, gpi_rout;
- UINT16 bios_cntl, pci_dma_cfg, gen1_dec, lpc_en, gen2_dec, fwh_sel2, func_dis, gen_pmcon_1;
- UINT16 mon_trp_rng[4], mon_trp_msk;
- UINT8 pirq_rout[8];
- UINT8 acpi_cntl, tco_cntl, gpio_cntl, serirq_cntl, d31_err_cfg, d31_err_sts, gen_sta, back_cntl, rtc_conf;
- UINT8 lpc_if_com_range, lpc_if_fdd_lpt_range, lpc_if_sound_range, fwh_dec_en1, fwh_dec_en2, siu_config_port;
- UINT8 gen_pmcon_2, gen_pmcon_3, apm_cnt, apm_sts, mon_fwd_en, nmi_sc;
+ uint32_t pmbase, gpio_base, fwh_sel1, gen_cntl, etr1, rst_cnt2, gpi_rout;
+ uint16_t bios_cntl, pci_dma_cfg, gen1_dec, lpc_en, gen2_dec, fwh_sel2, func_dis, gen_pmcon_1;
+ uint16_t mon_trp_rng[4], mon_trp_msk;
+ uint8_t pirq_rout[8];
+ uint8_t acpi_cntl, tco_cntl, gpio_cntl, serirq_cntl, d31_err_cfg, d31_err_sts, gen_sta, back_cntl, rtc_conf;
+ uint8_t lpc_if_com_range, lpc_if_fdd_lpt_range, lpc_if_sound_range, fwh_dec_en1, fwh_dec_en2, siu_config_port;
+ uint8_t gen_pmcon_2, gen_pmcon_3, apm_cnt, apm_sts, mon_fwd_en, nmi_sc;
int siu_config_state;
DECLARE_WRITE8_MEMBER (nop_w);
@@ -140,12 +140,12 @@ private:
DECLARE_READ8_MEMBER (nmi_sc_r); // 61
DECLARE_WRITE8_MEMBER (nmi_sc_w);
- void map_bios(address_space *memory_space, UINT32 start, UINT32 end, int idsel);
+ void map_bios(address_space *memory_space, uint32_t start, uint32_t end, int idsel);
};
class i6300esb_watchdog_device : public pci_device {
public:
- i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual void device_start() override;
diff --git a/src/devices/machine/i80130.cpp b/src/devices/machine/i80130.cpp
index 83c840fa30d..3d196195598 100644
--- a/src/devices/machine/i80130.cpp
+++ b/src/devices/machine/i80130.cpp
@@ -30,7 +30,7 @@ ADDRESS_MAP_END
READ16_MEMBER( i80130_device::io_r )
{
- UINT16 data = 0;
+ uint16_t data = 0;
switch (offset)
{
@@ -130,7 +130,7 @@ machine_config_constructor i80130_device::device_mconfig_additions() const
// i80130_device - constructor
//-------------------------------------------------
-i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I80130, "I80130", tag, owner, clock, "i80130", __FILE__),
m_pic(*this, "pic"),
m_pit(*this, "pit"),
diff --git a/src/devices/machine/i80130.h b/src/devices/machine/i80130.h
index d5ef5800011..c7f035e67fc 100644
--- a/src/devices/machine/i80130.h
+++ b/src/devices/machine/i80130.h
@@ -51,7 +51,7 @@ class i80130_device : public device_t
{
public:
// construction/destruction
- i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<i80130_device &>(device).m_write_irq.set_callback(object); }
template<class _Object> static devcb_base &set_ack_wr_callback(device_t &device, _Object object) { return downcast<i80130_device &>(device).m_write_ack.set_callback(object); }
@@ -67,7 +67,7 @@ public:
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
- UINT8 inta_r() { return m_pic->acknowledge(); }
+ uint8_t inta_r() { return m_pic->acknowledge(); }
DECLARE_WRITE_LINE_MEMBER( ir0_w ) { m_pic->ir0_w(state); }
DECLARE_WRITE_LINE_MEMBER( ir1_w ) { m_pic->ir1_w(state); }
diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp
index b3d4098398a..7e0d80aaf03 100644
--- a/src/devices/machine/i8155.cpp
+++ b/src/devices/machine/i8155.cpp
@@ -108,7 +108,7 @@ ADDRESS_MAP_END
// INLINE HELPERS
//**************************************************************************
-inline UINT8 i8155_device::get_timer_mode()
+inline uint8_t i8155_device::get_timer_mode()
{
return (m_count_length >> 8) & TIMER_MODE_MASK;
}
@@ -154,9 +154,9 @@ inline int i8155_device::get_port_mode(int port)
return mode;
}
-inline UINT8 i8155_device::read_port(int port)
+inline uint8_t i8155_device::read_port(int port)
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (get_port_mode(port))
{
@@ -177,7 +177,7 @@ inline UINT8 i8155_device::read_port(int port)
return data;
}
-inline void i8155_device::write_port(int port, UINT8 data)
+inline void i8155_device::write_port(int port, uint8_t data)
{
switch (get_port_mode(port))
{
@@ -202,7 +202,7 @@ inline void i8155_device::write_port(int port, UINT8 data)
// i8155_device - constructor
//-------------------------------------------------
-i8155_device::i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8155_device::i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8155, "8155 RIOT", tag, owner, clock, "i8155", __FILE__),
device_memory_interface(mconfig, *this),
m_in_pa_cb(*this),
@@ -352,7 +352,7 @@ const address_space_config *i8155_device::memory_space_config(address_spacenum s
READ8_MEMBER( i8155_device::io_r )
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (offset & 0x07)
{
@@ -392,7 +392,7 @@ READ8_MEMBER( i8155_device::io_r )
// register_w - register write
//-------------------------------------------------
-void i8155_device::register_w(int offset, UINT8 data)
+void i8155_device::register_w(int offset, uint8_t data)
{
switch (offset & 0x07)
{
@@ -557,7 +557,7 @@ WRITE8_MEMBER( i8155_device::ale_w )
READ8_MEMBER( i8155_device::read )
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (m_io_m)
{
diff --git a/src/devices/machine/i8155.h b/src/devices/machine/i8155.h
index 085ffe15196..5fe8cf41715 100644
--- a/src/devices/machine/i8155.h
+++ b/src/devices/machine/i8155.h
@@ -75,7 +75,7 @@ class i8155_device : public device_t,
{
public:
// construction/destruction
- i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast<i8155_device &>(device).m_in_pa_cb.set_callback(object); }
template<class _Object> static devcb_base &set_in_pb_callback(device_t &device, _Object object) { return downcast<i8155_device &>(device).m_in_pb_cb.set_callback(object); }
@@ -103,14 +103,14 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
- inline UINT8 get_timer_mode();
+ inline uint8_t get_timer_mode();
inline void timer_output();
inline void pulse_timer_output();
inline int get_port_mode(int port);
- inline UINT8 read_port(int port);
- inline void write_port(int port, UINT8 data);
+ inline uint8_t read_port(int port);
+ inline void write_port(int port, uint8_t data);
- void register_w(int offset, UINT8 data);
+ void register_w(int offset, uint8_t data);
private:
devcb_read8 m_in_pa_cb;
@@ -126,16 +126,16 @@ private:
// CPU interface
int m_io_m; // I/O or memory select
- UINT8 m_ad; // address
+ uint8_t m_ad; // address
// registers
- UINT8 m_command; // command register
- UINT8 m_status; // status register
- UINT8 m_output[3]; // output latches
+ uint8_t m_command; // command register
+ uint8_t m_status; // status register
+ uint8_t m_output[3]; // output latches
// counter
- UINT16 m_count_length; // count length register
- UINT16 m_counter; // counter register
+ uint16_t m_count_length; // count length register
+ uint16_t m_counter; // counter register
int m_to; // timer output
// timers
diff --git a/src/devices/machine/i8212.cpp b/src/devices/machine/i8212.cpp
index 0ece5f05c1c..a9b12e5937c 100644
--- a/src/devices/machine/i8212.cpp
+++ b/src/devices/machine/i8212.cpp
@@ -30,7 +30,7 @@ const device_type I8212 = &device_creator<i8212_device>;
// i8212_device - constructor
//-------------------------------------------------
-i8212_device::i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+i8212_device::i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, I8212, "I8212", tag, owner, clock, "i8212", __FILE__),
m_write_irq(*this),
m_read_di(*this),
diff --git a/src/devices/machine/i8212.h b/src/devices/machine/i8212.h
index ea62ce9eefb..3ced6e05d6f 100644
--- a/src/devices/machine/i8212.h
+++ b/src/devices/machine/i8212.h
@@ -67,7 +67,7 @@ class i8212_device : public device_t
{
public:
// construction/destruction
- i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<i8212_device &>(device).m_write_irq.set_callback(object); }
template<class _Object> static devcb_base &set_di_rd_callback(device_t &device, _Object object) { return downcast<i8212_device &>(device).m_read_di.set_callback(object); }
@@ -91,7 +91,7 @@ private:
int m_md; // mode
int m_stb; // strobe
- UINT8 m_data; // data latch
+ uint8_t m_data; // data latch
};
diff --git a/src/devices/machine/i8214.cpp b/src/devices/machine/i8214.cpp
index 4a93504137e..4efeb83bf2a 100644
--- a/src/devices/machine/i8214.cpp
+++ b/src/devices/machine/i8214.cpp
@@ -86,7 +86,7 @@ void i8214_device::check_interrupt()
// i8214_device - constructor
//-------------------------------------------------
-i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8214, "I8214", tag, owner, clock, "i8214", __FILE__)
, m_write_irq(*this)
, m_write_enlg(*this)
@@ -129,9 +129,9 @@ void i8214_device::device_start()
// a_r -
//-------------------------------------------------
-UINT8 i8214_device::a_r()
+uint8_t i8214_device::a_r()
{
- UINT8 a = m_a & 0x07;
+ uint8_t a = m_a & 0x07;
if (LOG) logerror("I8214 '%s' A: %01x\n", tag(), a);
@@ -143,7 +143,7 @@ UINT8 i8214_device::a_r()
// b_w -
//-------------------------------------------------
-void i8214_device::b_w(UINT8 data)
+void i8214_device::b_w(uint8_t data)
{
m_current_status = data & 0x07;
diff --git a/src/devices/machine/i8214.h b/src/devices/machine/i8214.h
index 60757d92cef..782a5a98934 100644
--- a/src/devices/machine/i8214.h
+++ b/src/devices/machine/i8214.h
@@ -52,7 +52,7 @@ class i8214_device : public device_t
{
public:
// construction/destruction
- i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<i8214_device &>(device).m_write_irq.set_callback(object); }
template<class _Object> static devcb_base &set_enlg_wr_callback(device_t &device, _Object object) { return downcast<i8214_device &>(device).m_write_enlg.set_callback(object); }
@@ -61,8 +61,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( etlg_w );
DECLARE_WRITE_LINE_MEMBER( inte_w );
- UINT8 a_r();
- void b_w(UINT8 data);
+ uint8_t a_r();
+ void b_w(uint8_t data);
void r_w(int line, int state);
protected:
@@ -81,7 +81,7 @@ private:
int m_int_dis; // interrupt (latch) disable flip-flop
int m_a; // request level
int m_current_status;
- UINT8 m_r; // interrupt request latch
+ uint8_t m_r; // interrupt request latch
int m_sgs; // status group select
int m_etlg; // enable this level group
};
diff --git a/src/devices/machine/i82371sb.cpp b/src/devices/machine/i82371sb.cpp
index e1081dac406..eb3b6c0f57e 100644
--- a/src/devices/machine/i82371sb.cpp
+++ b/src/devices/machine/i82371sb.cpp
@@ -31,7 +31,7 @@ DEVICE_ADDRESS_MAP_START(internal_io_map, 32, i82371sb_isa_device)
AM_RANGE(0x00ec, 0x00ef) AM_WRITE8 (nop_w, 0x0000ff00) // Non-existing, used for delays by the bios/os
ADDRESS_MAP_END
-i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, I82371SB_ISA, "i82371sb southbridge ISA bridge", tag, owner, clock, "i82371sb_isa", __FILE__),
m_boot_state_hook(*this)
{
@@ -260,14 +260,14 @@ WRITE8_MEMBER(i82371sb_isa_device::cthtmr_w)
-void i82371sb_isa_device::map_bios(address_space *memory_space, UINT32 start, UINT32 end)
+void i82371sb_isa_device::map_bios(address_space *memory_space, uint32_t start, uint32_t end)
{
- UINT32 mask = m_region->bytes() - 1;
+ uint32_t mask = m_region->bytes() - 1;
memory_space->install_rom(start, end, m_region->base() + (start & mask));
}
-void i82371sb_isa_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
+void i82371sb_isa_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space)
{
map_bios(memory_space, 0xfffe0000, 0xffffffff);
map_bios(memory_space, 0x000e0000, 0x000fffff);
@@ -315,7 +315,7 @@ void i82371sb_isa_device::map_extra(UINT64 memory_window_start, UINT64 memory_wi
if(gpio_cntl & 0x10)
logerror("%s: Warning: gpio range enabled at %04x-%04x\n", tag(), gpio_base, gpio_base+63);
- UINT32 hpet = 0xfed00000 + ((gen_cntl & 0x00018000) >> 3);
+ uint32_t hpet = 0xfed00000 + ((gen_cntl & 0x00018000) >> 3);
logerror("%s: Warning: hpet at %08x-%08x\n", tag(), hpet, hpet+0x3ff);
if(lpc_en & 0x1000)
@@ -330,26 +330,26 @@ void i82371sb_isa_device::map_extra(UINT64 memory_window_start, UINT64 memory_wi
logerror("%s: Warning: gameport at 200-207\n", tag());
if(lpc_en & 0x0008) {
- UINT16 fdc = lpc_if_fdd_lpt_range & 0x10 ? 0x370 : 0x3f0;
+ uint16_t fdc = lpc_if_fdd_lpt_range & 0x10 ? 0x370 : 0x3f0;
logerror("%s: Warning: floppy at %04x-%04x\n", tag(), fdc, fdc+7);
}
if(lpc_en & 0x0004) {
- static const UINT16 lpt_pos[4] = { 0x378, 0x278, 0x3bc, 0x000 };
- UINT16 lpt = lpt_pos[lpc_if_fdd_lpt_range & 3];
+ static const uint16_t lpt_pos[4] = { 0x378, 0x278, 0x3bc, 0x000 };
+ uint16_t lpt = lpt_pos[lpc_if_fdd_lpt_range & 3];
if(lpt)
logerror("%s: Warning: lpt at %04x-%04x %04x-%04x\n", tag(), lpt, lpt+7, lpt+0x400, lpt+0x407);
}
- static const UINT16 com_pos[8] = { 0x3f8, 0x2f8, 0x220, 0x228, 0x238, 0x2e8, 0x338, 0x3e8 };
+ static const uint16_t com_pos[8] = { 0x3f8, 0x2f8, 0x220, 0x228, 0x238, 0x2e8, 0x338, 0x3e8 };
if(lpc_en & 0x0002) {
- UINT16 comb = com_pos[(lpc_if_com_range >> 4) & 7];
+ uint16_t comb = com_pos[(lpc_if_com_range >> 4) & 7];
logerror("%s: Warning: comb at %04x-%04x\n", tag(), comb, comb+7);
}
if(lpc_en & 0x0001) {
- UINT16 coma = com_pos[lpc_if_com_range & 7];
+ uint16_t coma = com_pos[lpc_if_com_range & 7];
logerror("%s: Warning: coma at %04x-%04x\n", tag(), coma, coma+7);
}
diff --git a/src/devices/machine/i82371sb.h b/src/devices/machine/i82371sb.h
index 35912f96561..16862728cc8 100644
--- a/src/devices/machine/i82371sb.h
+++ b/src/devices/machine/i82371sb.h
@@ -15,13 +15,13 @@
class i82371sb_isa_device : public pci_device {
public:
- i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_boot_state_hook(device_t &device, _Object object) { return downcast<i82371sb_isa_device &>(device).m_boot_state_hook.set_callback(object); }
virtual void reset_all_mappings() override;
- virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space) override;
+ virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
virtual DECLARE_ADDRESS_MAP(config_map, 32) override;
DECLARE_ADDRESS_MAP(internal_io_map, 32);
@@ -71,12 +71,12 @@ protected:
private:
devcb_write8 m_boot_state_hook;
- UINT32 see;
- UINT16 xbcs, mstat, pcsc, smien, smireq;
- UINT8 iort, pirqrc[4], tom, mbirq0, mbdma[2], apicbase;
- UINT8 dlc, smicntl, ftmr, ctlmtr, cthmtr;
+ uint32_t see;
+ uint16_t xbcs, mstat, pcsc, smien, smireq;
+ uint8_t iort, pirqrc[4], tom, mbirq0, mbdma[2], apicbase;
+ uint8_t dlc, smicntl, ftmr, ctlmtr, cthmtr;
- void map_bios(address_space *memory_space, UINT32 start, UINT32 end);
+ void map_bios(address_space *memory_space, uint32_t start, uint32_t end);
};
extern const device_type I82371SB_ISA;
diff --git a/src/devices/machine/i8243.cpp b/src/devices/machine/i8243.cpp
index f63159b5739..241888bb31a 100644
--- a/src/devices/machine/i8243.cpp
+++ b/src/devices/machine/i8243.cpp
@@ -22,7 +22,7 @@ const device_type I8243 = &device_creator<i8243_device>;
// i8243_device - constructor
//-------------------------------------------------
-i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8243, "8243 I/O Expander", tag, owner, clock, "i8243", __FILE__), m_p2out(0), m_p2(0), m_opcode(0), m_prog(0),
m_readhandler(*this),
m_writehandler(*this)
diff --git a/src/devices/machine/i8243.h b/src/devices/machine/i8243.h
index 5157056491d..9cae49d0333 100644
--- a/src/devices/machine/i8243.h
+++ b/src/devices/machine/i8243.h
@@ -41,7 +41,7 @@ class i8243_device : public device_t
{
public:
// construction/destruction
- i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_read_handler(device_t &device, _Object object) { return downcast<i8243_device &>(device).m_readhandler.set_callback(object); }
@@ -61,11 +61,11 @@ protected:
private:
- UINT8 m_p[4]; /* 4 ports' worth of data */
- UINT8 m_p2out; /* port 2 bits that will be returned */
- UINT8 m_p2; /* most recent port 2 value */
- UINT8 m_opcode; /* latched opcode */
- UINT8 m_prog; /* previous PROG state */
+ uint8_t m_p[4]; /* 4 ports' worth of data */
+ uint8_t m_p2out; /* port 2 bits that will be returned */
+ uint8_t m_p2; /* most recent port 2 value */
+ uint8_t m_opcode; /* latched opcode */
+ uint8_t m_prog; /* previous PROG state */
devcb_read8 m_readhandler;
devcb_write8 m_writehandler;
diff --git a/src/devices/machine/i82439hx.cpp b/src/devices/machine/i82439hx.cpp
index 10a2d340fe6..ff3ff18c677 100644
--- a/src/devices/machine/i82439hx.cpp
+++ b/src/devices/machine/i82439hx.cpp
@@ -24,7 +24,7 @@ DEVICE_ADDRESS_MAP_START(config_map, 32, i82439hx_host_device)
AM_INHERIT_FROM(pci_host_device::config_map)
ADDRESS_MAP_END
-i82439hx_host_device::i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i82439hx_host_device::i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_host_device(mconfig, I82439HX, "i82439hx northbridge", tag, owner, clock, "i82439hx", __FILE__)
{
}
@@ -81,8 +81,8 @@ void i82439hx_host_device::device_reset()
errsyn = 0x00;
}
-void i82439hx_host_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
+void i82439hx_host_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space)
{
io_space->install_device(0, 0xffff, *static_cast<pci_host_device *>(this), &pci_host_device::io_configuration_access_map);
diff --git a/src/devices/machine/i82439hx.h b/src/devices/machine/i82439hx.h
index 55b6e7bf18d..dd694bc6acc 100644
--- a/src/devices/machine/i82439hx.h
+++ b/src/devices/machine/i82439hx.h
@@ -14,7 +14,7 @@
class i82439hx_host_device : public pci_host_device {
public:
- i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_cpu_tag(const char *tag);
void set_ram_size(int ram_size);
@@ -49,8 +49,8 @@ public:
virtual void reset_all_mappings() override;
- virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
- UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space) override;
+ virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+ uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
virtual DECLARE_ADDRESS_MAP(config_map, 32) override;
@@ -62,11 +62,11 @@ private:
const char *cpu_tag;
int ram_size;
cpu_device *cpu;
- std::vector<UINT32> ram;
+ std::vector<uint32_t> ram;
- UINT8 pcon, cc, dramec, dramc, dramt;
- UINT8 pam[7], drb[8];
- UINT8 drt, drat, smram, errcmd, errsts, errsyn;
+ uint8_t pcon, cc, dramec, dramc, dramt;
+ uint8_t pam[7], drb[8];
+ uint8_t drt, drat, smram, errcmd, errsts, errsyn;
};
extern const device_type I82439HX;
diff --git a/src/devices/machine/i8251.cpp b/src/devices/machine/i8251.cpp
index 7b0d272970d..2fc9ef798b6 100644
--- a/src/devices/machine/i8251.cpp
+++ b/src/devices/machine/i8251.cpp
@@ -37,7 +37,7 @@ const device_type V53_SCU = &device_creator<v53_scu_device>;
// i8251_device - constructor
//-------------------------------------------------
-i8251_device::i8251_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
+i8251_device::i8251_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
device_serial_interface(mconfig, *this),
m_txd_handler(*this),
@@ -55,7 +55,7 @@ i8251_device::i8251_device(const machine_config &mconfig, device_type type, cons
{
}
-i8251_device::i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8251_device::i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8251, "8251 USART", tag, owner, clock, "i8251", __FILE__),
device_serial_interface(mconfig, *this),
m_txd_handler(*this),
@@ -73,7 +73,7 @@ i8251_device::i8251_device(const machine_config &mconfig, const char *tag, devic
{
}
-v53_scu_device::v53_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+v53_scu_device::v53_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i8251_device(mconfig, V53_SCU, "V53 SCU", tag, owner, clock, "v53_scu")
{
}
@@ -216,7 +216,7 @@ void i8251_device::transmit_clock()
}
/* if diserial has bits to send, make them so */
if (!is_transmit_register_empty()) {
- UINT8 data = transmit_register_get_data_bit();
+ uint8_t data = transmit_register_get_data_bit();
m_txd_handler(data);
}
@@ -637,7 +637,7 @@ WRITE8_MEMBER(i8251_device::control_w)
READ8_MEMBER(i8251_device::status_r)
{
- UINT8 status = (m_dsr << 7) | m_status;
+ uint8_t status = (m_dsr << 7) | m_status;
LOG(("status: %02x\n", status));
return status;
@@ -681,7 +681,7 @@ WRITE8_MEMBER(i8251_device::data_w)
bit of data has been received
-------------------------------------------------*/
-void i8251_device::receive_character(UINT8 ch)
+void i8251_device::receive_character(uint8_t ch)
{
m_rx_data = ch;
diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h
index 7a2f7ec55fd..a556851beb7 100644
--- a/src/devices/machine/i8251.h
+++ b/src/devices/machine/i8251.h
@@ -42,8 +42,8 @@ class i8251_device : public device_t,
{
public:
// construction/destruction
- i8251_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
- i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8251_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname);
+ i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast<i8251_device &>(device).m_txd_handler.set_callback(object); }
@@ -68,7 +68,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( write_rxc );
/// TODO: REMOVE THIS
- void receive_character(UINT8 ch);
+ void receive_character(uint8_t ch);
/// TODO: this shouldn't be public
enum
@@ -114,18 +114,18 @@ private:
devcb_write_line m_syndet_handler;
/* flags controlling how i8251_control_w operates */
- UINT8 m_flags;
+ uint8_t m_flags;
/* offset into sync_bytes used during sync byte transfer */
- UINT8 m_sync_byte_offset;
+ uint8_t m_sync_byte_offset;
/* number of sync bytes written so far */
- UINT8 m_sync_byte_count;
+ uint8_t m_sync_byte_count;
/* the sync bytes written */
- UINT8 m_sync_bytes[2];
+ uint8_t m_sync_bytes[2];
/* status of i8251 */
- UINT8 m_status;
- UINT8 m_command;
+ uint8_t m_status;
+ uint8_t m_command;
/* mode byte - bit definitions depend on mode - e.g. synchronous, asynchronous */
- UINT8 m_mode_byte;
+ uint8_t m_mode_byte;
int m_cts;
int m_dsr;
@@ -137,16 +137,16 @@ private:
int m_br_factor;
/* data being received */
- UINT8 m_rx_data;
+ uint8_t m_rx_data;
/* tx buffer */
- UINT8 m_tx_data;
+ uint8_t m_tx_data;
};
class v53_scu_device : public i8251_device
{
public:
// construction/destruction
- v53_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ v53_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
diff --git a/src/devices/machine/i82541.cpp b/src/devices/machine/i82541.cpp
index 8e5a1467183..bbec58fe55d 100644
--- a/src/devices/machine/i82541.cpp
+++ b/src/devices/machine/i82541.cpp
@@ -13,7 +13,7 @@ ADDRESS_MAP_END
DEVICE_ADDRESS_MAP_START(registers_io_map, 32, i82541_device)
ADDRESS_MAP_END
-i82541_device::i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i82541_device::i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, I82541, "I82541 ethernet controller", tag, owner, clock, "i82541", __FILE__)
{
}
diff --git a/src/devices/machine/i82541.h b/src/devices/machine/i82541.h
index 475a94dc2be..2f94b773f7e 100644
--- a/src/devices/machine/i82541.h
+++ b/src/devices/machine/i82541.h
@@ -12,7 +12,7 @@
class i82541_device : public pci_device {
public:
- i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual void device_start() override;
diff --git a/src/devices/machine/i8255.cpp b/src/devices/machine/i8255.cpp
index 7e6a769f904..ff78e63ab01 100644
--- a/src/devices/machine/i8255.cpp
+++ b/src/devices/machine/i8255.cpp
@@ -257,7 +257,7 @@ inline int i8255_device::port_c_upper_mode()
// i8255_device - constructor
//-------------------------------------------------
-i8255_device::i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8255_device::i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8255, "8255 PPI", tag, owner, clock, "i8255", __FILE__),
m_in_pa_cb(*this),
m_in_pb_cb(*this),
@@ -311,9 +311,9 @@ void i8255_device::device_reset()
// read_mode0 -
//-------------------------------------------------
-UINT8 i8255_device::read_mode0(int port)
+uint8_t i8255_device::read_mode0(int port)
{
- UINT8 data;
+ uint8_t data;
if (port_mode(port) == MODE_OUTPUT)
{
@@ -334,9 +334,9 @@ UINT8 i8255_device::read_mode0(int port)
// read_mode1 -
//-------------------------------------------------
-UINT8 i8255_device::read_mode1(int port)
+uint8_t i8255_device::read_mode1(int port)
{
- UINT8 data;
+ uint8_t data;
if (port_mode(port) == MODE_OUTPUT)
{
@@ -366,9 +366,9 @@ UINT8 i8255_device::read_mode1(int port)
// read_mode2 -
//-------------------------------------------------
-UINT8 i8255_device::read_mode2()
+uint8_t i8255_device::read_mode2()
{
- UINT8 data;
+ uint8_t data;
// read data from input latch
data = m_input[PORT_A];
@@ -390,11 +390,11 @@ UINT8 i8255_device::read_mode2()
// read_pc -
//-------------------------------------------------
-UINT8 i8255_device::read_pc()
+uint8_t i8255_device::read_pc()
{
- UINT8 data = 0;
- UINT8 mask = 0;
- UINT8 b_mask = 0x0f;
+ uint8_t data = 0;
+ uint8_t mask = 0;
+ uint8_t b_mask = 0x0f;
// PC upper
switch (group_mode(GROUP_A))
@@ -483,7 +483,7 @@ UINT8 i8255_device::read_pc()
// write_mode0 -
//-------------------------------------------------
-void i8255_device::write_mode0(int port, UINT8 data)
+void i8255_device::write_mode0(int port, uint8_t data)
{
if (port_mode(port) == MODE_OUTPUT)
{
@@ -505,7 +505,7 @@ void i8255_device::write_mode0(int port, UINT8 data)
// write_mode1 -
//-------------------------------------------------
-void i8255_device::write_mode1(int port, UINT8 data)
+void i8255_device::write_mode1(int port, uint8_t data)
{
if (port_mode(port) == MODE_OUTPUT)
{
@@ -533,7 +533,7 @@ void i8255_device::write_mode1(int port, UINT8 data)
// write_mode2 -
//-------------------------------------------------
-void i8255_device::write_mode2(UINT8 data)
+void i8255_device::write_mode2(uint8_t data)
{
// latch output data
m_output[PORT_A] = data;
@@ -555,9 +555,9 @@ void i8255_device::write_mode2(UINT8 data)
void i8255_device::output_pc()
{
- UINT8 data = 0;
- UINT8 mask = 0;
- UINT8 b_mask = 0x0f;
+ uint8_t data = 0;
+ uint8_t mask = 0;
+ uint8_t b_mask = 0x0f;
// PC upper
switch (group_mode(GROUP_A))
@@ -635,7 +635,7 @@ void i8255_device::output_pc()
// set_mode -
//-------------------------------------------------
-void i8255_device::set_mode(UINT8 data)
+void i8255_device::set_mode(uint8_t data)
{
m_control = data;
@@ -766,7 +766,7 @@ void i8255_device::set_pc_bit(int bit, int state)
READ8_MEMBER( i8255_device::read )
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (offset & 0x03)
{
@@ -875,9 +875,9 @@ READ8_MEMBER( i8255_device::pa_r )
// pb_r - port A read
//-------------------------------------------------
-UINT8 i8255_device::pa_r()
+uint8_t i8255_device::pa_r()
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
if (port_mode(PORT_A) == MODE_OUTPUT)
{
@@ -902,9 +902,9 @@ READ8_MEMBER( i8255_device::pb_r )
// pb_r - port B read
//-------------------------------------------------
-UINT8 i8255_device::pb_r()
+uint8_t i8255_device::pb_r()
{
- UINT8 data = 0xff;
+ uint8_t data = 0xff;
if (port_mode(PORT_B) == MODE_OUTPUT)
{
diff --git a/src/devices/machine/i8255.h b/src/devices/machine/i8255.h
index 1fa41e727a5..21b53561e5c 100644
--- a/src/devices/machine/i8255.h
+++ b/src/devices/machine/i8255.h
@@ -68,7 +68,7 @@ class i8255_device : public device_t
{
public:
// construction/destruction
- i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast<i8255_device &>(device).m_in_pa_cb.set_callback(object); }
template<class _Object> static devcb_base &set_in_pb_callback(device_t &device, _Object object) { return downcast<i8255_device &>(device).m_in_pb_cb.set_callback(object); }
@@ -81,10 +81,10 @@ public:
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ8_MEMBER( pa_r );
- UINT8 pa_r();
+ uint8_t pa_r();
DECLARE_READ8_MEMBER( pb_r );
- UINT8 pb_r();
+ uint8_t pb_r();
DECLARE_WRITE_LINE_MEMBER( pc2_w );
DECLARE_WRITE_LINE_MEMBER( pc4_w );
@@ -108,15 +108,15 @@ private:
inline int port_c_lower_mode();
inline int port_c_upper_mode();
- UINT8 read_mode0(int port);
- UINT8 read_mode1(int port);
- UINT8 read_mode2();
- UINT8 read_pc();
- void write_mode0(int port, UINT8 data);
- void write_mode1(int port, UINT8 data);
- void write_mode2(UINT8 data);
+ uint8_t read_mode0(int port);
+ uint8_t read_mode1(int port);
+ uint8_t read_mode2();
+ uint8_t read_pc();
+ void write_mode0(int port, uint8_t data);
+ void write_mode1(int port, uint8_t data);
+ void write_mode2(uint8_t data);
void output_pc();
- void set_mode(UINT8 data);
+ void set_mode(uint8_t data);
void set_pc_bit(int bit, int state);
devcb_read8 m_in_pa_cb;
@@ -127,9 +127,9 @@ private:
devcb_write8 m_out_pb_cb;
devcb_write8 m_out_pc_cb;
- UINT8 m_control; // mode control word
- UINT8 m_output[3]; // output latch
- UINT8 m_input[3]; // input latch
+ uint8_t m_control; // mode control word
+ uint8_t m_output[3]; // output latch
+ uint8_t m_input[3]; // input latch
int m_ibf[2]; // input buffer full flag
int m_obf[2]; // output buffer full flag, negative logic
diff --git a/src/devices/machine/i8257.cpp b/src/devices/machine/i8257.cpp
index a54d21697cc..7bac8ea817d 100644
--- a/src/devices/machine/i8257.cpp
+++ b/src/devices/machine/i8257.cpp
@@ -181,7 +181,7 @@ inline void i8257_device::dma_write()
switch (MODE_TRANSFER_MASK)
{
case MODE_TRANSFER_VERIFY: {
- UINT8 v1 = m_in_memr_cb(offset);
+ uint8_t v1 = m_in_memr_cb(offset);
if(0 && m_temp != v1)
logerror("%s: verify error %02x vs. %02x\n", tag(), m_temp, v1);
break;
@@ -257,7 +257,7 @@ inline void i8257_device::advance()
// i8257_device - constructor
//-------------------------------------------------
-i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8257, "Intel 8257", tag, owner, clock, "i8257", __FILE__),
device_execute_interface(mconfig, *this),
m_icount(0),
@@ -491,7 +491,7 @@ void i8257_device::execute_run()
READ8_MEMBER( i8257_device::read )
{
- UINT8 data = 0;
+ uint8_t data = 0;
if (!BIT(offset, 3))
{
diff --git a/src/devices/machine/i8257.h b/src/devices/machine/i8257.h
index ad02ece924e..0c4fd5a2f4a 100644
--- a/src/devices/machine/i8257.h
+++ b/src/devices/machine/i8257.h
@@ -101,7 +101,7 @@ class i8257_device : public device_t,
{
public:
// construction/destruction
- i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -164,10 +164,10 @@ private:
int m_state;
int m_current_channel;
int m_last_channel;
- UINT8 m_transfer_mode;
- UINT8 m_status;
- UINT8 m_request;
- UINT8 m_temp;
+ uint8_t m_transfer_mode;
+ uint8_t m_status;
+ uint8_t m_request;
+ uint8_t m_temp;
devcb_write_line m_out_hrq_cb;
devcb_write_line m_out_tc_cb;
@@ -192,9 +192,9 @@ private:
struct
{
- UINT16 m_address;
- UINT16 m_count;
- UINT8 m_mode;
+ uint16_t m_address;
+ uint16_t m_count;
+ uint8_t m_mode;
} m_channel[4];
};
diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp
index dfd098a5f82..be0fa7576a0 100644
--- a/src/devices/machine/i8271.cpp
+++ b/src/devices/machine/i8271.cpp
@@ -5,7 +5,7 @@
const device_type I8271 = &device_creator<i8271_device>;
-i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, I8271, "Intel 8271", tag, owner, clock, "i8271", __FILE__), ready_connected(false), mode(0), main_phase(0),
intrq_cb(*this),
drq_cb(*this),
@@ -131,7 +131,7 @@ void i8271_device::set_floppy(floppy_image_device *flop)
READ8_MEMBER(i8271_device::sr_r)
{
- UINT32 ret = (irq ? SR_IRQ : 0);
+ uint32_t ret = (irq ? SR_IRQ : 0);
switch(main_phase) {
case PHASE_CMD:
ret |= SR_CF;
@@ -200,7 +200,7 @@ WRITE8_MEMBER(i8271_device::param_w)
}
}
-bool i8271_device::set_output(UINT8 data)
+bool i8271_device::set_output(uint8_t data)
{
if(main_phase == PHASE_EXEC) {
if(drq) {
@@ -213,7 +213,7 @@ bool i8271_device::set_output(UINT8 data)
return true;
}
-bool i8271_device::get_input(UINT8 *data)
+bool i8271_device::get_input(uint8_t *data)
{
if(main_phase == PHASE_EXEC) {
if(drq) {
@@ -470,7 +470,7 @@ void i8271_device::live_run(attotime limit)
case SCAN_SECTOR_DATA_BYTE:
if(!scan_done)
{
- UINT8 data = 0;
+ uint8_t data = 0;
if(!get_input(&data)) {
live_delay(IDLE);
return;
@@ -545,7 +545,7 @@ void i8271_device::live_run(attotime limit)
cur_live.crc = 0xffff;
live_write_raw(BIT(command[0], 2) ? 0xf56a : 0xf56f);
} else if(cur_live.byte_counter < 7+sector_size) {
- UINT8 data = 0;
+ uint8_t data = 0;
if(!get_input(&data)) {
live_delay(IDLE);
return;
@@ -602,7 +602,7 @@ void i8271_device::live_run(attotime limit)
cur_live.crc = 0xffff;
live_write_raw(0xf57e);
} else if(cur_live.byte_counter < 11) {
- UINT8 data = 0;
+ uint8_t data = 0;
if(!get_input(&data)) {
live_delay(IDLE);
return;
@@ -1312,7 +1312,7 @@ void i8271_device::write_data_continue(floppy_info &fi)
}
}
-int i8271_device::calc_sector_size(UINT8 size)
+int i8271_device::calc_sector_size(uint8_t size)
{
return size > 7 ? 16384 : 128 << size;
}
@@ -1686,16 +1686,16 @@ bool i8271_device::write_one_bit(const attotime &limit)
return false;
}
-void i8271_device::live_write_raw(UINT16 raw)
+void i8271_device::live_write_raw(uint16_t raw)
{
// logerror("write %04x %04x\n", raw, cur_live.crc);
cur_live.shift_reg = raw;
cur_live.data_bit_context = raw & 1;
}
-void i8271_device::live_write_fm(UINT8 fm)
+void i8271_device::live_write_fm(uint8_t fm)
{
- UINT16 raw = 0xaaaa;
+ uint16_t raw = 0xaaaa;
for(int i=0; i<8; i++)
if(fm & (0x80 >> i))
raw |= 0x4000 >> (2*i);
diff --git a/src/devices/machine/i8271.h b/src/devices/machine/i8271.h
index 5c63393a43f..03f2bdb5a3c 100644
--- a/src/devices/machine/i8271.h
+++ b/src/devices/machine/i8271.h
@@ -26,7 +26,7 @@
class i8271_device : public device_t
{
public:
- i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~i8271_device() {}
template<class _Object> static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast<i8271_device &>(device).intrq_cb.set_callback(object); }
@@ -177,7 +177,7 @@ private:
int id;
int main_state, sub_state;
int dir, counter;
- UINT8 pcn, badtrack[2];
+ uint8_t pcn, badtrack[2];
bool live, index, ready;
};
@@ -187,12 +187,12 @@ private:
attotime tm;
int state, next_state;
floppy_info *fi;
- UINT16 shift_reg;
- UINT16 crc;
+ uint16_t shift_reg;
+ uint16_t crc;
int bit_counter, byte_counter, previous_type;
bool data_separator_phase, data_bit_context;
- UINT8 data_reg;
- UINT8 idbuf[6];
+ uint8_t data_reg;
+ uint8_t idbuf[6];
fdc_pll_t pll;
};
@@ -209,10 +209,10 @@ private:
floppy_info flopi[2];
int command_pos, sectors_read, scan_len;
- UINT8 command[6], dma_data, oport;
- UINT8 rr, scan_sec, moder;
- UINT8 precomp, perpmode, scan_cnt[2];
- UINT8 srate, hset, icnt, hload;
+ uint8_t command[6], dma_data, oport;
+ uint8_t rr, scan_sec, moder;
+ uint8_t precomp, perpmode, scan_cnt[2];
+ uint8_t srate, hset, icnt, hload;
int sector_size;
int cur_rate;
int idle_icnt;
@@ -245,7 +245,7 @@ private:
void set_irq(bool state);
bool get_ready(int fid);
- int calc_sector_size(UINT8 size);
+ int calc_sector_size(uint8_t size);
int check_command();
void start_command(int cmd);
@@ -281,13 +281,13 @@ private:
void live_delay(int state);
void live_sync();
void live_run(attotime limit = attotime::never);
- void live_write_raw(UINT16 raw);
- void live_write_fm(UINT8 fm);
+ void live_write_raw(uint16_t raw);
+ void live_write_fm(uint8_t fm);
bool read_one_bit(const attotime &limit);
bool write_one_bit(const attotime &limit);
- bool set_output(UINT8 data);
- bool get_input(UINT8 *data);
+ bool set_output(uint8_t data);
+ bool get_input(uint8_t *data);
};
extern const device_type I8271;
diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp
index 725d1aa4827..389397f8677 100644
--- a/src/devices/machine/i8279.cpp
+++ b/src/devices/machine/i8279.cpp
@@ -89,7 +8