From ddb290d5f615019c33c42b8d94e5a5254cabcf33 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 22 Oct 2016 13:13:17 +0200 Subject: 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 --- src/devices/machine/40105.cpp | 8 +- src/devices/machine/40105.h | 12 +- src/devices/machine/53c7xx.cpp | 20 +- src/devices/machine/53c7xx.h | 58 ++-- src/devices/machine/53c810.cpp | 52 ++-- src/devices/machine/53c810.h | 80 +++--- src/devices/machine/64h156.cpp | 2 +- src/devices/machine/64h156.h | 12 +- src/devices/machine/6522via.cpp | 18 +- src/devices/machine/6522via.h | 60 ++-- src/devices/machine/6525tpi.cpp | 18 +- src/devices/machine/6525tpi.h | 24 +- src/devices/machine/6532riot.cpp | 30 +- src/devices/machine/6532riot.h | 40 +-- src/devices/machine/6821pia.cpp | 76 +++--- src/devices/machine/6821pia.h | 98 +++---- src/devices/machine/68230pit.cpp | 110 ++++---- src/devices/machine/68230pit.h | 128 ++++----- src/devices/machine/68307.cpp | 18 +- src/devices/machine/68307.h | 40 +-- src/devices/machine/68307bus.cpp | 2 +- src/devices/machine/68307bus.h | 2 +- src/devices/machine/68307sim.cpp | 46 ++-- src/devices/machine/68307sim.h | 48 ++-- src/devices/machine/68307tmu.cpp | 8 +- src/devices/machine/68307tmu.h | 10 +- src/devices/machine/68340.cpp | 4 +- src/devices/machine/68340.h | 12 +- src/devices/machine/68340sim.h | 4 +- src/devices/machine/6840ptm.cpp | 6 +- src/devices/machine/6840ptm.h | 42 +-- src/devices/machine/6850acia.cpp | 6 +- src/devices/machine/6850acia.h | 10 +- src/devices/machine/68561mpcc.cpp | 14 +- src/devices/machine/68561mpcc.h | 16 +- src/devices/machine/7200fifo.cpp | 8 +- src/devices/machine/7200fifo.h | 12 +- src/devices/machine/74123.cpp | 2 +- src/devices/machine/74123.h | 2 +- src/devices/machine/74145.cpp | 8 +- src/devices/machine/74145.h | 8 +- src/devices/machine/74148.cpp | 2 +- src/devices/machine/74148.h | 2 +- src/devices/machine/74153.cpp | 2 +- src/devices/machine/74153.h | 2 +- src/devices/machine/74181.cpp | 8 +- src/devices/machine/74181.h | 18 +- src/devices/machine/7474.cpp | 2 +- src/devices/machine/7474.h | 20 +- src/devices/machine/8042kbdc.cpp | 10 +- src/devices/machine/8042kbdc.h | 8 +- src/devices/machine/8530scc.cpp | 26 +- src/devices/machine/8530scc.h | 26 +- src/devices/machine/aakart.cpp | 6 +- src/devices/machine/aakart.h | 26 +- src/devices/machine/adc0808.cpp | 2 +- src/devices/machine/adc0808.h | 4 +- src/devices/machine/adc083x.cpp | 12 +- src/devices/machine/adc083x.h | 44 +-- src/devices/machine/adc1038.cpp | 2 +- src/devices/machine/adc1038.h | 2 +- src/devices/machine/adc1213x.cpp | 8 +- src/devices/machine/adc1213x.h | 12 +- src/devices/machine/aicartc.cpp | 6 +- src/devices/machine/aicartc.h | 8 +- src/devices/machine/akiko.cpp | 72 ++--- src/devices/machine/akiko.h | 56 ++-- src/devices/machine/am53cf96.cpp | 6 +- src/devices/machine/am53cf96.h | 16 +- src/devices/machine/am9517a.cpp | 14 +- src/devices/machine/am9517a.h | 32 +-- src/devices/machine/amigafdc.cpp | 46 ++-- src/devices/machine/amigafdc.h | 48 ++-- src/devices/machine/appldriv.cpp | 16 +- src/devices/machine/appldriv.h | 10 +- src/devices/machine/applefdc.cpp | 28 +- src/devices/machine/applefdc.h | 44 +-- src/devices/machine/at28c16.cpp | 12 +- src/devices/machine/at28c16.h | 4 +- src/devices/machine/at29x.cpp | 12 +- src/devices/machine/at29x.h | 12 +- src/devices/machine/at45dbxx.cpp | 40 +-- src/devices/machine/at45dbxx.h | 62 ++--- src/devices/machine/at_keybc.cpp | 2 +- src/devices/machine/at_keybc.h | 6 +- src/devices/machine/atadev.h | 4 +- src/devices/machine/ataflash.cpp | 8 +- src/devices/machine/ataflash.h | 8 +- src/devices/machine/atahle.cpp | 24 +- src/devices/machine/atahle.h | 44 +-- src/devices/machine/ataintf.cpp | 16 +- src/devices/machine/ataintf.h | 10 +- src/devices/machine/atapicdr.cpp | 6 +- src/devices/machine/atapicdr.h | 8 +- src/devices/machine/atapihle.cpp | 2 +- src/devices/machine/atapihle.h | 2 +- src/devices/machine/autoconfig.cpp | 10 +- src/devices/machine/autoconfig.h | 10 +- src/devices/machine/ay31015.cpp | 22 +- src/devices/machine/ay31015.h | 42 +-- src/devices/machine/bankdev.cpp | 2 +- src/devices/machine/bankdev.h | 14 +- src/devices/machine/bcreader.cpp | 14 +- src/devices/machine/bcreader.h | 8 +- src/devices/machine/buffer.cpp | 2 +- src/devices/machine/buffer.h | 6 +- src/devices/machine/cdp1852.cpp | 2 +- src/devices/machine/cdp1852.h | 6 +- src/devices/machine/cdp1871.cpp | 6 +- src/devices/machine/cdp1871.h | 4 +- src/devices/machine/clock.cpp | 2 +- src/devices/machine/clock.h | 2 +- src/devices/machine/com8116.cpp | 6 +- src/devices/machine/com8116.h | 6 +- src/devices/machine/corvushd.cpp | 96 +++---- src/devices/machine/corvushd.h | 254 ++++++++--------- src/devices/machine/cr511b.cpp | 2 +- src/devices/machine/cr511b.h | 4 +- src/devices/machine/cr589.cpp | 6 +- src/devices/machine/cr589.h | 8 +- src/devices/machine/cs4031.cpp | 12 +- src/devices/machine/cs4031.h | 24 +- src/devices/machine/cs8221.cpp | 4 +- src/devices/machine/cs8221.h | 12 +- src/devices/machine/diablo_hd.cpp | 64 ++--- src/devices/machine/diablo_hd.h | 30 +- src/devices/machine/dmac.cpp | 8 +- src/devices/machine/dmac.h | 18 +- src/devices/machine/dp8390.cpp | 26 +- src/devices/machine/dp8390.h | 90 +++--- src/devices/machine/ds1204.cpp | 8 +- src/devices/machine/ds1204.h | 18 +- src/devices/machine/ds128x.cpp | 2 +- src/devices/machine/ds128x.h | 2 +- src/devices/machine/ds1302.cpp | 2 +- src/devices/machine/ds1302.h | 12 +- src/devices/machine/ds1315.cpp | 8 +- src/devices/machine/ds1315.h | 4 +- src/devices/machine/ds1386.cpp | 38 +-- src/devices/machine/ds1386.h | 34 +-- src/devices/machine/ds2401.cpp | 4 +- src/devices/machine/ds2401.h | 8 +- src/devices/machine/ds2404.cpp | 18 +- src/devices/machine/ds2404.h | 40 +-- src/devices/machine/ds75160a.cpp | 4 +- src/devices/machine/ds75160a.h | 4 +- src/devices/machine/ds75161a.cpp | 2 +- src/devices/machine/ds75161a.h | 2 +- src/devices/machine/e0516.cpp | 2 +- src/devices/machine/e0516.h | 2 +- src/devices/machine/e05a03.cpp | 4 +- src/devices/machine/e05a03.h | 10 +- src/devices/machine/e05a30.cpp | 14 +- src/devices/machine/e05a30.h | 22 +- src/devices/machine/eeprom.cpp | 38 +-- src/devices/machine/eeprom.h | 28 +- src/devices/machine/eeprompar.cpp | 2 +- src/devices/machine/eeprompar.h | 2 +- src/devices/machine/eepromser.cpp | 10 +- src/devices/machine/eepromser.h | 28 +- src/devices/machine/er2055.cpp | 12 +- src/devices/machine/er2055.h | 26 +- src/devices/machine/f3853.cpp | 18 +- src/devices/machine/f3853.h | 24 +- src/devices/machine/fdc37c665gt.cpp | 4 +- src/devices/machine/fdc37c665gt.h | 2 +- src/devices/machine/fga002.cpp | 114 ++++---- src/devices/machine/fga002.h | 110 ++++---- src/devices/machine/gayle.cpp | 8 +- src/devices/machine/gayle.h | 8 +- src/devices/machine/gen_latch.cpp | 12 +- src/devices/machine/gen_latch.h | 18 +- src/devices/machine/genpc.cpp | 8 +- src/devices/machine/genpc.h | 34 +-- src/devices/machine/gt64xxx.cpp | 48 ++-- src/devices/machine/gt64xxx.h | 34 +-- src/devices/machine/hd63450.cpp | 2 +- src/devices/machine/hd63450.h | 2 +- src/devices/machine/hd64610.cpp | 8 +- src/devices/machine/hd64610.h | 8 +- src/devices/machine/hdc92x4.cpp | 54 ++-- src/devices/machine/hdc92x4.h | 52 ++-- src/devices/machine/hp_taco.cpp | 30 +- src/devices/machine/hp_taco.h | 26 +- src/devices/machine/i2cmem.cpp | 4 +- src/devices/machine/i2cmem.h | 6 +- src/devices/machine/i6300esb.cpp | 26 +- src/devices/machine/i6300esb.h | 24 +- src/devices/machine/i80130.cpp | 4 +- src/devices/machine/i80130.h | 4 +- src/devices/machine/i8155.cpp | 16 +- src/devices/machine/i8155.h | 22 +- src/devices/machine/i8212.cpp | 2 +- src/devices/machine/i8212.h | 4 +- src/devices/machine/i8214.cpp | 8 +- src/devices/machine/i8214.h | 8 +- src/devices/machine/i82371sb.cpp | 24 +- src/devices/machine/i82371sb.h | 16 +- src/devices/machine/i8243.cpp | 2 +- src/devices/machine/i8243.h | 12 +- src/devices/machine/i82439hx.cpp | 6 +- src/devices/machine/i82439hx.h | 14 +- src/devices/machine/i8251.cpp | 12 +- src/devices/machine/i8251.h | 26 +- src/devices/machine/i82541.cpp | 2 +- src/devices/machine/i82541.h | 2 +- src/devices/machine/i8255.cpp | 46 ++-- src/devices/machine/i8255.h | 28 +- src/devices/machine/i8257.cpp | 6 +- src/devices/machine/i8257.h | 16 +- src/devices/machine/i8271.cpp | 22 +- src/devices/machine/i8271.h | 30 +- src/devices/machine/i8279.cpp | 40 +-- src/devices/machine/i8279.h | 26 +- src/devices/machine/i82875p.cpp | 12 +- src/devices/machine/i82875p.h | 24 +- src/devices/machine/i8355.cpp | 10 +- src/devices/machine/i8355.h | 10 +- src/devices/machine/idectrl.cpp | 26 +- src/devices/machine/idectrl.h | 26 +- src/devices/machine/idehd.cpp | 20 +- src/devices/machine/idehd.h | 46 ++-- src/devices/machine/im6402.cpp | 2 +- src/devices/machine/im6402.h | 6 +- src/devices/machine/input_merger.cpp | 6 +- src/devices/machine/input_merger.h | 6 +- src/devices/machine/ins8154.cpp | 4 +- src/devices/machine/ins8154.h | 16 +- src/devices/machine/ins8250.cpp | 20 +- src/devices/machine/ins8250.h | 50 ++-- src/devices/machine/intelfsh.cpp | 84 +++--- src/devices/machine/intelfsh.h | 112 ++++---- src/devices/machine/jvsdev.cpp | 36 +-- src/devices/machine/jvsdev.h | 34 +-- src/devices/machine/jvshost.cpp | 30 +- src/devices/machine/jvshost.h | 18 +- src/devices/machine/k033906.cpp | 6 +- src/devices/machine/k033906.h | 10 +- src/devices/machine/k053252.cpp | 2 +- src/devices/machine/k053252.h | 10 +- src/devices/machine/k056230.cpp | 2 +- src/devices/machine/k056230.h | 4 +- src/devices/machine/kb3600.cpp | 8 +- src/devices/machine/kb3600.h | 4 +- src/devices/machine/keyboard.cpp | 28 +- src/devices/machine/keyboard.h | 40 +-- src/devices/machine/keyboard.ipp | 48 ++-- src/devices/machine/kr2376.cpp | 4 +- src/devices/machine/kr2376.h | 2 +- src/devices/machine/laserdsc.cpp | 78 +++--- src/devices/machine/laserdsc.h | 70 ++--- src/devices/machine/latch.cpp | 4 +- src/devices/machine/latch.h | 4 +- src/devices/machine/latch8.cpp | 22 +- src/devices/machine/latch8.h | 64 ++--- src/devices/machine/lc89510.cpp | 2 +- src/devices/machine/lc89510.h | 2 +- src/devices/machine/ldp1000.cpp | 14 +- src/devices/machine/ldp1000.h | 14 +- src/devices/machine/ldp1450.cpp | 16 +- src/devices/machine/ldp1450.h | 30 +- src/devices/machine/ldpr8210.cpp | 84 +++--- src/devices/machine/ldpr8210.h | 58 ++-- src/devices/machine/ldstub.h | 24 +- src/devices/machine/ldv1000.cpp | 28 +- src/devices/machine/ldv1000.h | 38 +-- src/devices/machine/ldvp931.cpp | 18 +- src/devices/machine/ldvp931.h | 42 +-- src/devices/machine/legscsi.cpp | 10 +- src/devices/machine/legscsi.h | 10 +- src/devices/machine/lh5810.cpp | 2 +- src/devices/machine/lh5810.h | 6 +- src/devices/machine/linflash.cpp | 10 +- src/devices/machine/linflash.h | 8 +- src/devices/machine/lpc-acpi.cpp | 6 +- src/devices/machine/lpc-acpi.h | 16 +- src/devices/machine/lpc-pit.cpp | 6 +- src/devices/machine/lpc-pit.h | 6 +- src/devices/machine/lpc-rtc.cpp | 10 +- src/devices/machine/lpc-rtc.h | 14 +- src/devices/machine/lpc.cpp | 2 +- src/devices/machine/lpc.h | 6 +- src/devices/machine/lpci.cpp | 10 +- src/devices/machine/lpci.h | 14 +- src/devices/machine/m6m80011ap.cpp | 2 +- src/devices/machine/m6m80011ap.h | 18 +- src/devices/machine/mb14241.cpp | 4 +- src/devices/machine/mb14241.h | 6 +- src/devices/machine/mb3773.cpp | 2 +- src/devices/machine/mb3773.h | 2 +- src/devices/machine/mb8421.cpp | 2 +- src/devices/machine/mb8421.h | 6 +- src/devices/machine/mb87078.cpp | 2 +- src/devices/machine/mb87078.h | 6 +- src/devices/machine/mb8795.cpp | 8 +- src/devices/machine/mb8795.h | 16 +- src/devices/machine/mb89352.cpp | 6 +- src/devices/machine/mb89352.h | 48 ++-- src/devices/machine/mb89363b.cpp | 2 +- src/devices/machine/mb89363b.h | 2 +- src/devices/machine/mb89371.cpp | 2 +- src/devices/machine/mb89371.h | 2 +- src/devices/machine/mc146818.cpp | 8 +- src/devices/machine/mc146818.h | 8 +- src/devices/machine/mc2661.cpp | 10 +- src/devices/machine/mc2661.h | 14 +- src/devices/machine/mc68328.cpp | 60 ++-- src/devices/machine/mc68328.h | 346 +++++++++++------------ src/devices/machine/mc6843.cpp | 14 +- src/devices/machine/mc6843.h | 38 +-- src/devices/machine/mc6846.cpp | 14 +- src/devices/machine/mc6846.h | 44 +-- src/devices/machine/mc6852.cpp | 8 +- src/devices/machine/mc6852.h | 20 +- src/devices/machine/mc6854.cpp | 16 +- src/devices/machine/mc6854.h | 42 +-- src/devices/machine/mc68681.cpp | 50 ++-- src/devices/machine/mc68681.h | 70 ++--- src/devices/machine/mc68901.cpp | 10 +- src/devices/machine/mc68901.h | 56 ++-- src/devices/machine/mccs1850.cpp | 14 +- src/devices/machine/mccs1850.h | 14 +- src/devices/machine/mcf5206e.cpp | 18 +- src/devices/machine/mcf5206e.h | 52 ++-- src/devices/machine/microtch.cpp | 6 +- src/devices/machine/microtch.h | 16 +- src/devices/machine/mm58167.cpp | 4 +- src/devices/machine/mm58167.h | 2 +- src/devices/machine/mm58274c.cpp | 2 +- src/devices/machine/mm58274c.h | 2 +- src/devices/machine/mm74c922.cpp | 6 +- src/devices/machine/mm74c922.h | 6 +- src/devices/machine/mos6526.cpp | 44 +-- src/devices/machine/mos6526.h | 66 ++--- src/devices/machine/mos6529.cpp | 2 +- src/devices/machine/mos6529.h | 4 +- src/devices/machine/mos6530.cpp | 28 +- src/devices/machine/mos6530.h | 32 +-- src/devices/machine/mos6530n.cpp | 68 ++--- src/devices/machine/mos6530n.h | 34 +-- src/devices/machine/mos6551.cpp | 22 +- src/devices/machine/mos6551.h | 36 +-- src/devices/machine/mos6702.cpp | 2 +- src/devices/machine/mos6702.h | 2 +- src/devices/machine/mos8706.cpp | 2 +- src/devices/machine/mos8706.h | 2 +- src/devices/machine/mos8722.cpp | 4 +- src/devices/machine/mos8722.h | 10 +- src/devices/machine/mos8726.cpp | 4 +- src/devices/machine/mos8726.h | 2 +- src/devices/machine/mpu401.cpp | 2 +- src/devices/machine/mpu401.h | 10 +- src/devices/machine/msm5832.cpp | 6 +- src/devices/machine/msm5832.h | 6 +- src/devices/machine/msm58321.cpp | 8 +- src/devices/machine/msm58321.h | 6 +- src/devices/machine/msm6242.cpp | 36 +-- src/devices/machine/msm6242.h | 30 +- src/devices/machine/ncr5380.cpp | 8 +- src/devices/machine/ncr5380.h | 16 +- src/devices/machine/ncr5380n.cpp | 24 +- src/devices/machine/ncr5380n.h | 14 +- src/devices/machine/ncr5390.cpp | 36 +-- src/devices/machine/ncr5390.h | 22 +- src/devices/machine/ncr539x.cpp | 12 +- src/devices/machine/ncr539x.h | 36 +-- src/devices/machine/netlist.cpp | 50 ++-- src/devices/machine/netlist.h | 52 ++-- src/devices/machine/nmc9306.cpp | 6 +- src/devices/machine/nmc9306.h | 14 +- src/devices/machine/nsc810.cpp | 6 +- src/devices/machine/nsc810.h | 36 +-- src/devices/machine/nscsi_bus.cpp | 40 +-- src/devices/machine/nscsi_bus.h | 38 +-- src/devices/machine/nscsi_cb.cpp | 2 +- src/devices/machine/nscsi_cb.h | 8 +- src/devices/machine/nscsi_cd.cpp | 8 +- src/devices/machine/nscsi_cd.h | 6 +- src/devices/machine/nscsi_hd.cpp | 16 +- src/devices/machine/nscsi_hd.h | 10 +- src/devices/machine/nscsi_s1410.cpp | 8 +- src/devices/machine/nscsi_s1410.h | 8 +- src/devices/machine/nvram.cpp | 4 +- src/devices/machine/nvram.h | 2 +- src/devices/machine/pc_fdc.cpp | 14 +- src/devices/machine/pc_fdc.h | 14 +- src/devices/machine/pc_lpt.cpp | 2 +- src/devices/machine/pc_lpt.h | 6 +- src/devices/machine/pccard.cpp | 2 +- src/devices/machine/pccard.h | 2 +- src/devices/machine/pcf8593.cpp | 4 +- src/devices/machine/pcf8593.h | 12 +- src/devices/machine/pci-apic.cpp | 2 +- src/devices/machine/pci-apic.h | 2 +- src/devices/machine/pci-ide.cpp | 6 +- src/devices/machine/pci-ide.h | 4 +- src/devices/machine/pci-sata.cpp | 2 +- src/devices/machine/pci-sata.h | 2 +- src/devices/machine/pci-smbus.cpp | 4 +- src/devices/machine/pci-smbus.h | 10 +- src/devices/machine/pci-usb.cpp | 4 +- src/devices/machine/pci-usb.h | 4 +- src/devices/machine/pci.cpp | 76 +++--- src/devices/machine/pci.h | 90 +++--- src/devices/machine/pci9050.cpp | 10 +- src/devices/machine/pci9050.h | 6 +- src/devices/machine/pckeybrd.cpp | 18 +- src/devices/machine/pckeybrd.h | 24 +- src/devices/machine/pdc.cpp | 16 +- src/devices/machine/pdc.h | 28 +- src/devices/machine/pic8259.cpp | 14 +- src/devices/machine/pic8259.h | 44 +-- src/devices/machine/pit8253.cpp | 40 +-- src/devices/machine/pit8253.h | 34 +-- src/devices/machine/pla.cpp | 20 +- src/devices/machine/pla.h | 36 +-- src/devices/machine/r10696.cpp | 12 +- src/devices/machine/r10696.h | 8 +- src/devices/machine/r10788.cpp | 6 +- src/devices/machine/r10788.h | 18 +- src/devices/machine/ra17xx.cpp | 2 +- src/devices/machine/ra17xx.h | 6 +- src/devices/machine/ram.cpp | 12 +- src/devices/machine/ram.h | 24 +- src/devices/machine/rf5c296.cpp | 8 +- src/devices/machine/rf5c296.h | 6 +- src/devices/machine/roc10937.cpp | 16 +- src/devices/machine/roc10937.h | 22 +- src/devices/machine/rp5c01.cpp | 4 +- src/devices/machine/rp5c01.h | 10 +- src/devices/machine/rp5c15.cpp | 4 +- src/devices/machine/rp5c15.h | 10 +- src/devices/machine/rp5h01.cpp | 4 +- src/devices/machine/rp5h01.h | 8 +- src/devices/machine/rtc4543.cpp | 6 +- src/devices/machine/rtc4543.h | 6 +- src/devices/machine/rtc65271.cpp | 28 +- src/devices/machine/rtc65271.h | 16 +- src/devices/machine/rtc9701.cpp | 10 +- src/devices/machine/rtc9701.h | 12 +- src/devices/machine/s2636.cpp | 22 +- src/devices/machine/s2636.h | 12 +- src/devices/machine/s3520cf.cpp | 10 +- src/devices/machine/s3520cf.h | 16 +- src/devices/machine/s3c2400.cpp | 6 +- src/devices/machine/s3c2400.h | 346 +++++++++++------------ src/devices/machine/s3c2410.cpp | 10 +- src/devices/machine/s3c2410.h | 468 +++++++++++++++---------------- src/devices/machine/s3c2440.cpp | 10 +- src/devices/machine/s3c2440.h | 514 +++++++++++++++++------------------ src/devices/machine/s3c24xx.hxx | 388 +++++++++++++------------- src/devices/machine/s3c44b0.cpp | 202 +++++++------- src/devices/machine/s3c44b0.h | 334 +++++++++++------------ src/devices/machine/scnxx562.cpp | 186 ++++++------- src/devices/machine/scnxx562.h | 274 +++++++++---------- src/devices/machine/serflash.cpp | 12 +- src/devices/machine/serflash.h | 26 +- src/devices/machine/smartmed.cpp | 56 ++-- src/devices/machine/smartmed.h | 26 +- src/devices/machine/smc91c9x.cpp | 22 +- src/devices/machine/smc91c9x.h | 26 +- src/devices/machine/smpc.cpp | 32 +-- src/devices/machine/sonydriv.cpp | 16 +- src/devices/machine/sonydriv.h | 8 +- src/devices/machine/spchrom.cpp | 2 +- src/devices/machine/spchrom.h | 4 +- src/devices/machine/steppers.cpp | 4 +- src/devices/machine/steppers.h | 42 +-- src/devices/machine/strata.cpp | 32 +-- src/devices/machine/strata.h | 14 +- src/devices/machine/stvcd.cpp | 148 +++++----- src/devices/machine/t10mmc.cpp | 14 +- src/devices/machine/t10mmc.h | 14 +- src/devices/machine/t10sbc.cpp | 6 +- src/devices/machine/t10sbc.h | 8 +- src/devices/machine/t10spc.cpp | 6 +- src/devices/machine/t10spc.h | 20 +- src/devices/machine/tc009xlvc.cpp | 18 +- src/devices/machine/tc009xlvc.h | 32 +-- src/devices/machine/terminal.cpp | 26 +- src/devices/machine/terminal.h | 20 +- src/devices/machine/timehelp.h | 6 +- src/devices/machine/timekpr.cpp | 28 +- src/devices/machine/timekpr.h | 38 +-- src/devices/machine/tmc0430.cpp | 6 +- src/devices/machine/tmc0430.h | 12 +- src/devices/machine/tmp68301.cpp | 24 +- src/devices/machine/tmp68301.h | 22 +- src/devices/machine/tms1024.cpp | 6 +- src/devices/machine/tms1024.h | 12 +- src/devices/machine/tms5501.cpp | 14 +- src/devices/machine/tms5501.h | 22 +- src/devices/machine/tms6100.cpp | 14 +- src/devices/machine/tms6100.h | 26 +- src/devices/machine/tms9901.cpp | 6 +- src/devices/machine/tms9901.h | 2 +- src/devices/machine/tms9902.cpp | 12 +- src/devices/machine/tms9902.h | 20 +- src/devices/machine/upd1990a.cpp | 6 +- src/devices/machine/upd1990a.h | 10 +- src/devices/machine/upd4701.cpp | 8 +- src/devices/machine/upd4701.h | 8 +- src/devices/machine/upd4992.cpp | 2 +- src/devices/machine/upd4992.h | 4 +- src/devices/machine/upd7002.cpp | 2 +- src/devices/machine/upd7002.h | 2 +- src/devices/machine/upd71071.cpp | 6 +- src/devices/machine/upd71071.h | 28 +- src/devices/machine/upd765.cpp | 64 ++--- src/devices/machine/upd765.h | 78 +++--- src/devices/machine/v3021.cpp | 6 +- src/devices/machine/v3021.h | 6 +- src/devices/machine/vrc4373.cpp | 32 +-- src/devices/machine/vrc4373.h | 16 +- src/devices/machine/vt82c496.cpp | 8 +- src/devices/machine/vt82c496.h | 14 +- src/devices/machine/vt83c461.cpp | 4 +- src/devices/machine/vt83c461.h | 8 +- src/devices/machine/watchdog.cpp | 4 +- src/devices/machine/watchdog.h | 10 +- src/devices/machine/wd11c00_17.cpp | 16 +- src/devices/machine/wd11c00_17.h | 14 +- src/devices/machine/wd2010.cpp | 50 ++-- src/devices/machine/wd2010.h | 36 +-- src/devices/machine/wd33c93.cpp | 22 +- src/devices/machine/wd33c93.h | 22 +- src/devices/machine/wd7600.cpp | 10 +- src/devices/machine/wd7600.h | 32 +-- src/devices/machine/wd_fdc.cpp | 120 ++++---- src/devices/machine/wd_fdc.h | 120 ++++---- src/devices/machine/wozfdc.cpp | 26 +- src/devices/machine/wozfdc.h | 20 +- src/devices/machine/x2212.cpp | 10 +- src/devices/machine/x2212.h | 8 +- src/devices/machine/x76f041.cpp | 6 +- src/devices/machine/x76f041.h | 18 +- src/devices/machine/x76f100.cpp | 6 +- src/devices/machine/x76f100.h | 14 +- src/devices/machine/ym2148.cpp | 6 +- src/devices/machine/ym2148.h | 16 +- src/devices/machine/z80ctc.cpp | 8 +- src/devices/machine/z80ctc.h | 22 +- src/devices/machine/z80dart.cpp | 36 +-- src/devices/machine/z80dart.h | 46 ++-- src/devices/machine/z80dma.cpp | 18 +- src/devices/machine/z80dma.h | 38 +-- src/devices/machine/z80pio.cpp | 22 +- src/devices/machine/z80pio.h | 56 ++-- src/devices/machine/z80scc.cpp | 134 ++++----- src/devices/machine/z80scc.h | 210 +++++++------- src/devices/machine/z80sio.cpp | 52 ++-- src/devices/machine/z80sio.h | 74 ++--- src/devices/machine/z80sti.cpp | 8 +- src/devices/machine/z80sti.h | 38 +-- src/devices/machine/z8536.cpp | 28 +- src/devices/machine/z8536.h | 24 +- 556 files changed, 7105 insertions(+), 7105 deletions(-) (limited to 'src/devices/machine') 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 - 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(); + m_fifo = std::queue(); 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 void set_dir_callback(_dir dir) { m_write_dir.set_callback(dir); } template 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 m_fifo; + std::queue 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 - 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 static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(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 lsi53c810_irq_delegate; #define LSI53C810_IRQ_CB(name) void name(int state) -typedef device_delegate lsi53c810_dma_delegate; -#define LSI53C810_DMA_CB(name) void name(UINT32 src, UINT32 dst, int length, int byteswap) +typedef device_delegate lsi53c810_dma_delegate; +#define LSI53C810_DMA_CB(name) void name(uint32_t src, uint32_t dst, int length, int byteswap) -typedef device_delegate lsi53c810_fetch_delegate; -#define LSI53C810_FETCH_CB(name) UINT32 name(UINT32 dsp) +typedef device_delegate 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(device).m_irq_cb = callback; } static void set_dma_callback(device_t &device, lsi53c810_dma_delegate callback) { downcast(device).m_dma_cb = callback; } static void set_fetch_callback(device_t &device, lsi53c810_fetch_delegate callback) { downcast(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 - 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 static devcb_base &set_atn_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_atn.set_callback(object); } template static devcb_base &set_sync_wr_callback(device_t &device, _Object object) { return downcast(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 static devcb_base &set_readpa_handler(device_t &device, _Object object) { return downcast(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(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 static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast(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 static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } template static devcb_base &set_out_pa_callback(device_t &device, _Object object) { return downcast(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 - 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 - 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 static devcb_base &set_pa_in_callback (device_t &device, _Object object){ return downcast(device).m_pa_in_cb.set_callback (object); } template static devcb_base &set_pa_out_callback (device_t &device, _Object object){ return downcast(device).m_pa_out_cb.set_callback (object); } template static devcb_base &set_pb_in_callback (device_t &device, _Object object){ return downcast(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 m68307_porta_read_delegate; -typedef device_delegate m68307_porta_write_delegate; -typedef device_delegate m68307_portb_read_delegate; -typedef device_delegate m68307_portb_write_delegate; +typedef device_delegate m68307_porta_read_delegate; +typedef device_delegate m68307_porta_write_delegate; +typedef device_delegate m68307_portb_read_delegate; +typedef device_delegate m68307_portb_write_delegate; /* trampolines so we can specify the 68681 serial configuration when adding the CPU */ @@ -39,7 +39,7 @@ typedef device_delegate static devcb_base &set_irq_cb(device_t &device, _Object object) { return downcast(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 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 - 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(device).m_internal_clock = clock; } static void set_external_clocks(device_t &device, double clock0, double clock1, double clock2) { downcast(device).m_external_clock[0] = clock0; downcast(device).m_external_clock[1] = clock1; downcast(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 - 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 static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast(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; 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 static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast(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 - 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 static devcb_base &set_ef_handler(device_t &device, _Object object) { return downcast(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 m_buffer; + std::vector 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 - 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(device).m_connection_type = type; } static void set_resistor_value(device_t &device, double value) { downcast(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 - 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 static devcb_base &set_output_line_0_callback(device_t &device, _Object object) { return downcast(device).m_output_line_0_cb.set_callback(object); } template static devcb_base &set_output_line_1_callback(device_t &device, _Object object) { return downcast(device).m_output_line_1_cb.set_callback(object); } @@ -67,8 +67,8 @@ public: template static devcb_base &set_output_line_8_callback(device_t &device, _Object object) { return downcast(device).m_output_line_8_cb.set_callback(object); } template static devcb_base &set_output_line_9_callback(device_t &device, _Object object) { return downcast(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(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 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(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(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 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(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 - 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 - 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 static devcb_base &set_output_cb(device_t &device, _Object object) { return downcast(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 - 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; 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 static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast(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 - 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 static devcb_base &set_out_tx_callback(device_t &device, _Object object) { return downcast(device).m_out_tx_cb.set_callback(object); } template static devcb_base &set_out_rx_callback(device_t &device, _Object object) { return downcast(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 - 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 static devcb_base &set_out_eoc_callback(device_t &device, _Object object) { return downcast(device).m_out_eoc_cb.set_callback(object); } static void set_in_vref_pos_callback(device_t &device, adc0808_analog_read_delegate callback) { downcast(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; const device_type ADC0834 = &device_creator; const device_type ADC0838 = &device_creator; -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 adc083x_input_delegate; -#define ADC083X_INPUT_CB(name) double name(UINT8 input) +typedef device_delegate 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 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(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(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 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(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(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(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(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 adc1213x_ipt_convert_delegate; -#define ADC12138_IPT_CONVERT_CB(name) double name(UINT8 input) +typedef device_delegate adc1213x_ipt_convert_delegate; +#define ADC12138_IPT_CONVERT_CB(name) double name(uint8_t input) /*************************************************************************** MACROS / CONSTANTS @@ -27,8 +27,8 @@ typedef device_delegate 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(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 - 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(13*m_cdrom_numtracks); + m_cdrom_toc = std::make_unique(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(); @@ -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(); - 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 m_cdrom_toc; + std::unique_ptr 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 static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(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 static devcb_base &set_out_hreq_callback(device_t &device, _Object object) { return downcast(device).m_out_hreq_cb.set_callback(object); } template static devcb_base &set_out_eop_callback(device_t &device, _Object object) { return downcast(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(); 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(); - 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 static devcb_base &set_index_wr_callback(device_t &device, _Object object) { return downcast(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 - 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(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(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(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 - 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 buffer( AT28C16_TOTAL_BYTES ); + std::vector 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 buffer ( AT28C16_TOTAL_BYTES ); + std::vector 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 m_default_data; + optional_region_ptr 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(m_sector_size); - m_eememory = std::make_unique(m_memory_size+2); + m_programming_buffer = std::make_unique(m_sector_size); + m_eememory = std::make_unique(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 m_eememory; + std::unique_ptr 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 m_programming_buffer; + std::unique_ptr 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; // 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 static devcb_base &set_so_cb(device_t &device, _Object object) { return downcast(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 m_data; - UINT32 m_size; - UINT8 m_mode; - UINT8 m_status; - std::vector m_buffer1; - //std::vector m_buffer2; - UINT8 m_si_byte; - UINT8 m_si_bits; - UINT8 m_so_byte; - UINT8 m_so_bits; + std::vector m_data; + uint32_t m_size; + uint8_t m_mode; + uint8_t m_status; + std::vector m_buffer1; + //std::vector 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 static devcb_base &set_system_reset_callback(device_t &device, _Object object) { return downcast(device).m_system_reset_cb.set_callback(object); } template static devcb_base &set_gate_a20_callback(device_t &device, _Object object) { return downcast(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(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 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 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(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 - 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 static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(device).m_irq_handler.set_callback(object); } template static devcb_base &set_dmarq_handler(device_t &device, _Object object) { return downcast(device).m_dmarq_handler.set_callback(object); } template static devcb_base &set_dasp_handler(device_t &device, _Object object) { return downcast(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; const device_type ATAPI_FIXED_CDROM = &device_creator; -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; const device_type AY51013 = &device_creator; -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(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( 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(device).m_endianness = endianness; } - static void set_databus_width(device_t &device, UINT8 databus_width) { downcast(device).m_databus_width = databus_width; } - static void set_addrbus_width(device_t &device, UINT8 addrbus_width) { downcast(device).m_addrbus_width = addrbus_width; } - static void set_stride(device_t &device, UINT32 stride) { downcast(device).m_stride = stride; } + static void set_databus_width(device_t &device, uint8_t databus_width) { downcast(device).m_databus_width = databus_width; } + static void set_addrbus_width(device_t &device, uint8_t addrbus_width) { downcast(device).m_addrbus_width = addrbus_width; } + static void set_stride(device_t &device, uint32_t stride) { downcast(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 - 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(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 static devcb_base &set_mode_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_mode.set_callback(object); } template static devcb_base &set_sr_wr_callback(device_t &device, _Object object) { return downcast(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; // 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 static devcb_base &set_d1_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_d1.set_callback(object); } template static devcb_base &set_d2_rd_callback(device_t &device, _Object object) { return downcast(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(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 static devcb_base &set_signal_handler(device_t &device, _Object object) { return downcast(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 static devcb_base &set_fx4_handler(device_t &device, _Object object) { return downcast(device).m_fx4_handler.set_callback(object); } template static devcb_base &set_fr_handler(device_t &device, _Object object) { return downcast(device).m_fr_handler.set_callback(object); } template static devcb_base &set_ft_handler(device_t &device, _Object object) { return downcast(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(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 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(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(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 m_dma1; @@ -241,11 +241,11 @@ private: required_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 @@ * */ -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(sizeof(diablo_sector_t)); + m_cache[m_page] = std::make_unique(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(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(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 m_cache[2 * DIABLO_PAGES]; //!< pages raw bytes - UINT32** m_bits; //!< pages expanded to bits + std::unique_ptr 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 - 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 static devcb_base &set_cfgout_handler(device_t &device, _Object object) @@ -80,8 +80,8 @@ public: { return downcast(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; const device_type RTL8019A = &device_creator; -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 buf; + std::vector 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 static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast(device).m_irq_cb.set_callback(object); } template static devcb_base &set_breq_callback(device_t &device, _Object object) { return downcast(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( 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 - 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 - 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(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; const device_type DS1386_32K = &device_creator; -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(m_ram_size); + m_ram = std::make_unique(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 m_ram; - optional_region_ptr 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 m_ram; + optional_region_ptr 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(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 - 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(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(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(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 - 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 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 - 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 static devcb_base &set_in_ren_callback(device_t &device, _Object object) { return downcast(device).m_in_ren_cb.set_callback(object); } template static devcb_base &set_in_ifc_callback(device_t &device, _Object object) { return downcast(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 - 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(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 static devcb_base &set_nlq_lp_wr_callback(device_t &device, _Object object) { return downcast(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(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 static devcb_base &set_printhead_wr_callback(device_t &device, _Object object) { return downcast(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(device); assert(eeprom.m_data_bits == 8); - eeprom.m_default_data.u8 = const_cast(data); + eeprom.m_default_data.u8 = const_cast(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(device); assert(eeprom.m_data_bits == 16); - eeprom.m_default_data.u16 = const_cast(data); + eeprom.m_default_data.u16 = const_cast(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(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(size); + uint32_t size = (m_data_bits == 8 ? 1 : 2) << m_address_bits; + m_data = std::make_unique(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 m_data; + std::unique_ptr 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 - 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 f3853_interrupt_req_delegate; +typedef device_delegate 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(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 - 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 - 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(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 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 - 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 - 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 m_ram[4]; + std::vector 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(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 static devcb_base &set_dma_end_callback(device_t &device, _Object object) { return downcast(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 static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast(device).m_out_irq_cb.set_callback(object); } template static devcb_base &set_out_1hz_callback(device_t &device, _Object object) { return downcast(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; // 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 static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(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 - 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(m_data_size); + m_data = std::make_unique(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(device).m_slave_address = address; } static void set_page_size(device_t &device, int page_size) { downcast(device).m_page_size = page_size; } @@ -126,7 +126,7 @@ protected: optional_memory_region m_region; // internal state - std::unique_ptr m_data; + std::unique_ptr 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 m_page; + std::vector 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; 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 static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } template static devcb_base &set_ack_wr_callback(device_t &device, _Object object) { return downcast(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 static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } template static devcb_base &set_in_pb_callback(device_t &device, _Object object) { return downcast(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 - 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 static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } template static devcb_base &set_di_rd_callback(device_t &device, _Object object) { return downcast(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 static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } template static devcb_base &set_enlg_wr_callback(device_t &device, _Object object) { return downcast(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 static devcb_base &set_boot_state_hook(device_t &device, _Object object) { return downcast(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 - 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 static devcb_base &set_read_handler(device_t &device, _Object object) { return downcast(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(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 ram; + std::vector 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; // 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 static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast(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 static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } template static devcb_base &set_in_pb_callback(device_t &device, _Object object) { return downcast(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(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 static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast(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 +89,7 @@ const device_type I8279 = &device_creator; // i8279_device - constructor //------------------------------------------------- -i8279_device::i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i8279_device::i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, I8279, "8279 KDC", tag, owner, clock, "i8279", __FILE__), m_out_irq_cb(*this), m_out_sl_cb(*this), @@ -126,7 +126,7 @@ void i8279_device::device_start() void i8279_device::device_reset() { - UINT8 i; + uint8_t i; // startup values are unknown: setting to 0 for (i = 2; i < 8; i++) m_cmd[i] = 0; @@ -157,10 +157,10 @@ void i8279_device::timer_adjust() // If this is too long, the sensor mode doesn't work correctly. #if 0 - UINT8 divider = (m_cmd[1]) ? m_cmd[1] : 1; - UINT32 new_clock = clock() / divider; + uint8_t divider = (m_cmd[1]) ? m_cmd[1] : 1; + uint32_t new_clock = clock() / divider; #else - UINT32 new_clock = 2000; + uint32_t new_clock = 2000; #endif if (m_clock != new_clock) @@ -175,8 +175,8 @@ void i8279_device::timer_adjust() void i8279_device::clear_display() { // clear all digits - UINT8 i,patterns[4] = { 0, 0, 0x20, 0xff }; - UINT8 data = patterns[(m_cmd[6] & 12) >> 2]; + uint8_t i,patterns[4] = { 0, 0, 0x20, 0xff }; + uint8_t data = patterns[(m_cmd[6] & 12) >> 2]; // The CD high bit (also done by CA) if (m_cmd[6] & 0x11) @@ -203,9 +203,9 @@ void i8279_device::set_irq(bool state) } -void i8279_device::new_key(UINT8 data, bool skey, bool ckey) +void i8279_device::new_key(uint8_t data, bool skey, bool ckey) { - UINT8 i, rl, sl; + uint8_t i, rl, sl; for (i = 0; BIT(data, i); i++) {}; rl = i; if (BIT(m_cmd[0], 0)) @@ -220,7 +220,7 @@ void i8279_device::new_key(UINT8 data, bool skey, bool ckey) } -void i8279_device::new_fifo(UINT8 data) +void i8279_device::new_fifo(uint8_t data) { // see if already overrun if (BIT(m_status, 5)) @@ -236,7 +236,7 @@ void i8279_device::new_fifo(UINT8 data) m_fifo[m_status & 7] = data; // bump fifo size & turn off underrun - UINT8 fifo_size = m_status & 7; + uint8_t fifo_size = m_status & 7; if ((fifo_size)==7) m_status |= 8; // full else @@ -261,9 +261,9 @@ void i8279_device::timer_mainloop() // bit 3 - number of digits to display // bit 4 - left or right entry - UINT8 scanner_mask = BIT(m_cmd[0], 0) ? 15 : BIT(m_cmd[0], 3) ? 15 : 7; + uint8_t scanner_mask = BIT(m_cmd[0], 0) ? 15 : BIT(m_cmd[0], 3) ? 15 : 7; bool decoded = BIT(m_cmd[0], 0); - UINT8 kbd_type = (m_cmd[0] & 6) >> 1; + uint8_t kbd_type = (m_cmd[0] & 6) >> 1; bool shift_key = 1; bool ctrl_key = 1; bool strobe_pulse = 0; @@ -290,10 +290,10 @@ void i8279_device::timer_mainloop() if ( !m_in_rl_cb.isnull() ) { - UINT8 rl = m_in_rl_cb(0); + uint8_t rl = m_in_rl_cb(0); // see if key still down from last time - UINT16 key_down = (m_scanner << 8) | rl; + uint16_t key_down = (m_scanner << 8) | rl; if (key_down == m_key_down) rl = 0xff; else @@ -312,7 +312,7 @@ void i8279_device::timer_mainloop() break; case 2: { - UINT8 addr = m_scanner &7; + uint8_t addr = m_scanner &7; if (decoded) for (addr=0; !BIT(m_scanner, addr); addr++) {}; @@ -366,9 +366,9 @@ READ8_MEMBER( i8279_device::status_r ) READ8_MEMBER( i8279_device::data_r ) { - UINT8 i; + uint8_t i; bool sensor_mode = ((m_cmd[0] & 6)==4); - UINT8 data; + uint8_t data; if (m_read_flag) { // read the display ram @@ -397,7 +397,7 @@ READ8_MEMBER( i8279_device::data_r ) { // read a key from fifo data = m_fifo[0]; - UINT8 fifo_size = m_status & 7; + uint8_t fifo_size = m_status & 7; switch (m_status & 0x38) { case 0x00: // no errors @@ -434,7 +434,7 @@ READ8_MEMBER( i8279_device::data_r ) WRITE8_MEMBER( i8279_device::cmd_w ) {//printf("Command: %X=%X ",data>>5,data&31); - UINT8 cmd = data >> 5; + uint8_t cmd = data >> 5; data &= 0x1f; m_cmd[cmd] = data; switch (cmd) diff --git a/src/devices/machine/i8279.h b/src/devices/machine/i8279.h index 3da46da3121..615e8dfdba2 100644 --- a/src/devices/machine/i8279.h +++ b/src/devices/machine/i8279.h @@ -74,7 +74,7 @@ class i8279_device : public device_t { public: // construction/destruction - i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast(device).m_out_irq_cb.set_callback(object); } template static devcb_base &set_out_sl_callback(device_t &device, _Object object) { return downcast(device).m_out_sl_cb.set_callback(object); } @@ -104,8 +104,8 @@ private: void timer_adjust(); void clear_display(); - void new_key(UINT8 data, bool skey, bool ckey); - void new_fifo(UINT8 data); + void new_key(uint8_t data, bool skey, bool ckey); + void new_fifo(uint8_t data); void set_irq(bool state); devcb_write_line m_out_irq_cb; // IRQ @@ -118,20 +118,20 @@ private: emu_timer *m_timer; - UINT8 m_d_ram[16]; // display ram - UINT8 m_d_ram_ptr; - UINT8 m_s_ram[8]; // might be same as fifo ram - UINT8 m_s_ram_ptr; - UINT8 m_fifo[8]; // queued keystrokes - UINT8 m_cmd[8]; // Device settings - UINT8 m_status; // Returned via status_r - UINT32 m_clock; // Internal scan clock - UINT8 m_scanner; // next output on SL lines + uint8_t m_d_ram[16]; // display ram + uint8_t m_d_ram_ptr; + uint8_t m_s_ram[8]; // might be same as fifo ram + uint8_t m_s_ram_ptr; + uint8_t m_fifo[8]; // queued keystrokes + uint8_t m_cmd[8]; // Device settings + uint8_t m_status; // Returned via status_r + uint32_t m_clock; // Internal scan clock + uint8_t m_scanner; // next output on SL lines bool m_autoinc; // auto-increment flag bool m_read_flag; // read from where bool m_ctrl_key; // previous state of strobe input - UINT16 m_key_down; + uint16_t m_key_down; }; diff --git a/src/devices/machine/i82875p.cpp b/src/devices/machine/i82875p.cpp index 58f8b3264c9..a1ab51f59e4 100644 --- a/src/devices/machine/i82875p.cpp +++ b/src/devices/machine/i82875p.cpp @@ -41,7 +41,7 @@ DEVICE_ADDRESS_MAP_START(config_map, 32, i82875p_host_device) AM_INHERIT_FROM(pci_host_device::config_map) ADDRESS_MAP_END -i82875p_host_device::i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i82875p_host_device::i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_host_device(mconfig, I82875P_HOST, "I82875P Northbridge", tag, owner, clock, "i82875p_host", __FILE__) { } @@ -341,12 +341,12 @@ void i82875p_host_device::device_reset() skpd = 0x0000; } -void i82875p_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 i82875p_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(this), &pci_host_device::io_configuration_access_map); - UINT32 top = toud << 16; + uint32_t top = toud << 16; if(esmramc & 1) { switch((esmramc >> 1) & 3) { case 2: top += 512*1024; break; @@ -426,7 +426,7 @@ void i82875p_host_device::map_extra(UINT64 memory_window_start, UINT64 memory_wi } -i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : agp_bridge_device(mconfig, I82875P_AGP, "I82875P AGP Bridge", tag, owner, clock, "i82875p_agp", __FILE__) { } @@ -449,7 +449,7 @@ DEVICE_ADDRESS_MAP_START(overflow_map, 32, i82875p_overflow_device) ADDRESS_MAP_END -i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, I82875P_OVERFLOW, "I82875P Configuration Overflow", tag, owner, clock, "i82875p_overflow", __FILE__) { } diff --git a/src/devices/machine/i82875p.h b/src/devices/machine/i82875p.h index 4f7723e64a7..2d40094c2da 100644 --- a/src/devices/machine/i82875p.h +++ b/src/devices/machine/i82875p.h @@ -20,15 +20,15 @@ class i82875p_host_device : public pci_host_device { public: - i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i82875p_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); 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; @@ -88,17 +88,17 @@ private: const char *cpu_tag; int ram_size; cpu_device *cpu; - std::vector ram; + std::vector ram; - UINT8 agpm, fpllcont, pam[8], smram, esmramc; - UINT8 apsize, amtt, lptt; - UINT16 toud, mchcfg, errcmd, smicmd, scicmd, skpd; - UINT32 agpctrl, attbase; + uint8_t agpm, fpllcont, pam[8], smram, esmramc; + uint8_t apsize, amtt, lptt; + uint16_t toud, mchcfg, errcmd, smicmd, scicmd, skpd; + uint32_t agpctrl, attbase; }; class i82875p_agp_device : public agp_bridge_device { public: - i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: virtual void device_start() override; @@ -107,7 +107,7 @@ protected: class i82875p_overflow_device : public pci_device { public: - i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER (dram_row_boundary_r); @@ -127,8 +127,8 @@ protected: private: DECLARE_ADDRESS_MAP(overflow_map, 32); - UINT8 dram_row_boundary[8], dram_row_attribute[4]; - UINT32 dram_timing, dram_controller_mode; + uint8_t dram_row_boundary[8], dram_row_attribute[4]; + uint32_t dram_timing, dram_controller_mode; }; extern const device_type I82875P_HOST; diff --git a/src/devices/machine/i8355.cpp b/src/devices/machine/i8355.cpp index cf53a098a19..bb3731aab58 100644 --- a/src/devices/machine/i8355.cpp +++ b/src/devices/machine/i8355.cpp @@ -56,9 +56,9 @@ ADDRESS_MAP_END // read_port - read from input port //------------------------------------------------- -inline UINT8 i8355_device::read_port(int port) +inline uint8_t i8355_device::read_port(int port) { - UINT8 data = m_output[port] & m_ddr[port]; + uint8_t data = m_output[port] & m_ddr[port]; if (m_ddr[port] != 0xff) { @@ -74,7 +74,7 @@ inline UINT8 i8355_device::read_port(int port) // write_port - write to output port //------------------------------------------------- -inline void i8355_device::write_port(int port, UINT8 data) +inline void i8355_device::write_port(int port, uint8_t data) { m_output[port] = data; @@ -92,7 +92,7 @@ inline void i8355_device::write_port(int port, UINT8 data) // i8355_device - constructor //------------------------------------------------- -i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, I8355, "Intel 8355", tag, owner, clock, "i8355", __FILE__), device_memory_interface(mconfig, *this), m_in_pa_cb(*this), @@ -153,7 +153,7 @@ READ8_MEMBER( i8355_device::io_r ) { int port = offset & 0x01; - UINT8 data = 0; + uint8_t data = 0; switch (offset & 0x03) { diff --git a/src/devices/machine/i8355.h b/src/devices/machine/i8355.h index 7337fa0193d..2acb4aff6a5 100644 --- a/src/devices/machine/i8355.h +++ b/src/devices/machine/i8355.h @@ -73,7 +73,7 @@ class i8355_device : public device_t, { public: // construction/destruction - i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } template static devcb_base &set_out_pa_callback(device_t &device, _Object object) { return downcast(device).m_out_pa_cb.set_callback(object); } @@ -93,8 +93,8 @@ protected: // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; - 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); private: devcb_read8 m_in_pa_cb; @@ -104,8 +104,8 @@ private: devcb_write8 m_out_pb_cb; // registers - UINT8 m_output[2]; // output latches - UINT8 m_ddr[2]; // DDR latches + uint8_t m_output[2]; // output latches + uint8_t m_ddr[2]; // DDR latches const address_space_config m_space_config; }; diff --git a/src/devices/machine/idectrl.cpp b/src/devices/machine/idectrl.cpp index 5be4dcd3d5a..54e05b55c2d 100644 --- a/src/devices/machine/idectrl.cpp +++ b/src/devices/machine/idectrl.cpp @@ -26,12 +26,12 @@ const device_type IDE_CONTROLLER = &device_creator; -ide_controller_device::ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +ide_controller_device::ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ata_interface_device(mconfig, IDE_CONTROLLER, "IDE Controller", tag, owner, clock, "ide_controller", __FILE__) { } -ide_controller_device::ide_controller_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) : +ide_controller_device::ide_controller_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_interface_device(mconfig, type, name, tag, owner, clock, shortname, source) { } @@ -89,19 +89,19 @@ WRITE16_MEMBER( ide_controller_device::write_cs1 ) const device_type IDE_CONTROLLER_32 = &device_creator; -ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ide_controller_device(mconfig, IDE_CONTROLLER, "IDE Controller (32 bit)", tag, owner, clock, "ide_controller32", __FILE__) { } -ide_controller_32_device::ide_controller_32_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) : +ide_controller_32_device::ide_controller_32_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) : ide_controller_device(mconfig, type, name, tag, owner, clock, shortname, source) { } READ32_MEMBER(ide_controller_32_device::read_cs0) { - UINT32 data = 0; + uint32_t data = 0; if (ACCESSING_BITS_0_15) { @@ -120,7 +120,7 @@ READ32_MEMBER(ide_controller_32_device::read_cs0) READ32_MEMBER(ide_controller_32_device::read_cs1) { - UINT32 data = 0; + uint32_t data = 0; if (ACCESSING_BITS_0_15) { @@ -168,7 +168,7 @@ WRITE32_MEMBER(ide_controller_32_device::write_cs1) const device_type BUS_MASTER_IDE_CONTROLLER = &device_creator; -bus_master_ide_controller_device::bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +bus_master_ide_controller_device::bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ide_controller_32_device(mconfig, BUS_MASTER_IDE_CONTROLLER, "Bus Master IDE Controller", tag, owner, clock, "bus_master_ide_controller", __FILE__), m_dma_address(0), m_dma_bytes_left(0), @@ -275,8 +275,8 @@ WRITE32_MEMBER( bus_master_ide_controller_device::bmdma_w ) if( ACCESSING_BITS_0_7 ) { /* Bus Master IDE Command register */ - UINT8 old = m_bus_master_command; - UINT8 val = data & 0xff; + uint8_t old = m_bus_master_command; + uint8_t val = data & 0xff; /* save the "Read or Write Control" bit 3 and the "Start/Stop Bus Master" bit 0 */ m_bus_master_command = (old & 0xf6) | (val & 0x09); @@ -307,8 +307,8 @@ WRITE32_MEMBER( bus_master_ide_controller_device::bmdma_w ) if( ACCESSING_BITS_16_23 ) { /* Bus Master IDE Status register */ - UINT8 old = m_bus_master_status; - UINT8 val = data >> 16; + uint8_t old = m_bus_master_status; + uint8_t val = data >> 16; /* save the DMA capable bits */ m_bus_master_status = (old & 0x9f) | (val & 0x60); @@ -360,7 +360,7 @@ void bus_master_ide_controller_device::execute_dma() if (m_bus_master_command & 8) { // read from ata bus - UINT16 data = read_dma(); + uint16_t data = read_dma(); // write to memory m_dma_space->write_byte(m_dma_address++, data & 0xff); @@ -369,7 +369,7 @@ void bus_master_ide_controller_device::execute_dma() else { // read from memory; - UINT16 data = m_dma_space->read_byte(m_dma_address++); + uint16_t data = m_dma_space->read_byte(m_dma_address++); data |= m_dma_space->read_byte(m_dma_address++) << 8; // write to ata bus diff --git a/src/devices/machine/idectrl.h b/src/devices/machine/idectrl.h index 1d5a184b809..3ecb1c3bf39 100644 --- a/src/devices/machine/idectrl.h +++ b/src/devices/machine/idectrl.h @@ -30,8 +30,8 @@ class ide_controller_device : public ata_interface_device { public: - ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ide_controller_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); + ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_controller_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 DECLARE_READ16_MEMBER(read_cs0) override; virtual DECLARE_READ16_MEMBER(read_cs1) override; @@ -53,8 +53,8 @@ extern const device_type IDE_CONTROLLER; class ide_controller_32_device : public ide_controller_device { public: - ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ide_controller_32_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); + ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_controller_32_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 DECLARE_READ32_MEMBER(read_cs0); virtual DECLARE_READ32_MEMBER(read_cs1); @@ -85,8 +85,8 @@ extern const device_type IDE_CONTROLLER_32; class bus_master_ide_controller_device : public ide_controller_32_device { public: - bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - static void set_bus_master_space(device_t &device, const char *bmcpu, UINT32 bmspace) {bus_master_ide_controller_device &ide = downcast(device); ide.m_bmcpu = bmcpu; ide.m_bmspace = bmspace; } + bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + static void set_bus_master_space(device_t &device, const char *bmcpu, uint32_t bmspace) {bus_master_ide_controller_device &ide = downcast(device); ide.m_bmcpu = bmcpu; ide.m_bmspace = bmspace; } DECLARE_READ32_MEMBER( bmdma_r ); DECLARE_WRITE32_MEMBER( bmdma_w ); @@ -101,17 +101,17 @@ private: void execute_dma(); const char *m_bmcpu; - UINT32 m_bmspace; + uint32_t m_bmspace; address_space * m_dma_space; - UINT8 m_dma_address_xor; + uint8_t m_dma_address_xor; offs_t m_dma_address; - UINT32 m_dma_bytes_left; + uint32_t m_dma_bytes_left; offs_t m_dma_descriptor; - UINT8 m_dma_last_buffer; - UINT8 m_bus_master_command; - UINT8 m_bus_master_status; - UINT32 m_bus_master_descriptor; + uint8_t m_dma_last_buffer; + uint8_t m_bus_master_command; + uint8_t m_bus_master_status; + uint32_t m_bus_master_descriptor; int m_irq; int m_dmarq; }; diff --git a/src/devices/machine/idehd.cpp b/src/devices/machine/idehd.cpp index f56c6f68558..35e90f6193f 100644 --- a/src/devices/machine/idehd.cpp +++ b/src/devices/machine/idehd.cpp @@ -19,7 +19,7 @@ #define TIME_FULL_STROKE_SEEK (attotime::from_usec(13000)) #define TIME_AVERAGE_ROTATIONAL_LATENCY (attotime::from_usec(1300)) -ata_mass_storage_device::ata_mass_storage_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_mass_storage_device::ata_mass_storage_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_can_identify_device(0), m_num_cylinders(0), @@ -36,7 +36,7 @@ ata_mass_storage_device::ata_mass_storage_device(const machine_config &mconfig, * *************************************/ -UINT32 ata_mass_storage_device::lba_address() +uint32_t ata_mass_storage_device::lba_address() { /* LBA direct? */ if (m_device_head & IDE_DEVICE_HEAD_L) @@ -54,11 +54,11 @@ UINT32 ata_mass_storage_device::lba_address() * *************************************/ -static void swap_strncpy(UINT16 *dst, const char *src, int field_size_in_words) +static void swap_strncpy(uint16_t *dst, const char *src, int field_size_in_words) { for (int i = 0; i < field_size_in_words; i++) { - UINT16 d; + uint16_t d; if (*src) { @@ -309,7 +309,7 @@ void ata_mass_storage_device::finished_command() void ata_mass_storage_device::next_sector() { - UINT8 cur_head = m_device_head & IDE_DEVICE_HEAD_HS; + uint8_t cur_head = m_device_head & IDE_DEVICE_HEAD_HS; /* LBA direct? */ if (m_device_head & IDE_DEVICE_HEAD_L) @@ -779,13 +779,13 @@ const device_type IDE_HARDDISK = &device_creator; // ide_hdd_device - constructor //------------------------------------------------- -ide_hdd_device::ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ide_hdd_device::ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ata_mass_storage_device(mconfig, IDE_HARDDISK, "IDE Hard Disk", tag, owner, clock, "hdd", __FILE__), m_image(*this, "image") { } -ide_hdd_device::ide_hdd_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) +ide_hdd_device::ide_hdd_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_mass_storage_device(mconfig, type, name, tag, owner, clock, shortname, source), m_image(*this, "image") { @@ -821,7 +821,7 @@ void ide_hdd_device::device_reset() } // build the features page - UINT32 metalength; + uint32_t metalength; if (m_handle->read_metadata (HARD_DISK_IDENT_METADATA_TAG, 0, &m_buffer[0], 512, metalength) == CHDERR_NONE) { for( int w = 0; w < 256; w++ ) @@ -840,9 +840,9 @@ void ide_hdd_device::device_reset() ata_mass_storage_device::device_reset(); } -UINT8 ide_hdd_device::calculate_status() +uint8_t ide_hdd_device::calculate_status() { - UINT8 result = ata_hle_device::calculate_status(); + uint8_t result = ata_hle_device::calculate_status(); if (m_last_status_timer->elapsed() > TIME_PER_ROTATION) { diff --git a/src/devices/machine/idehd.h b/src/devices/machine/idehd.h index 8acc9e14474..f979d25285b 100644 --- a/src/devices/machine/idehd.h +++ b/src/devices/machine/idehd.h @@ -20,17 +20,17 @@ class ata_mass_storage_device : public ata_hle_device { public: - ata_mass_storage_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_mass_storage_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; } - void set_master_password(const UINT8 *password) + void set_master_password(const uint8_t *password) { m_master_password = password; m_master_password_enable = (password != nullptr); } - void set_user_password(const UINT8 *password) + void set_user_password(const uint8_t *password) { m_user_password = password; m_user_password_enable = (password != nullptr); @@ -39,8 +39,8 @@ public: protected: virtual void device_start() override; - virtual int read_sector(UINT32 lba, void *buffer) = 0; - virtual int write_sector(UINT32 lba, const void *buffer) = 0; + virtual int read_sector(uint32_t lba, void *buffer) = 0; + virtual int write_sector(uint32_t lba, const void *buffer) = 0; virtual attotime seek_time(); void ide_build_identify_device(); @@ -56,14 +56,14 @@ protected: virtual void signature() override; int m_can_identify_device; - UINT16 m_num_cylinders; - UINT8 m_num_sectors; - UINT8 m_num_heads; + uint16_t m_num_cylinders; + uint8_t m_num_sectors; + uint8_t m_num_heads; - virtual UINT32 lba_address(); + virtual uint32_t lba_address(); private: - void set_geometry(UINT8 sectors, UINT8 heads) { m_num_sectors = sectors; m_num_heads = heads; } + void set_geometry(uint8_t sectors, uint8_t heads) { m_num_sectors = sectors; m_num_heads = heads; } void finished_read(); void finished_write(); void next_sector(); @@ -71,14 +71,14 @@ private: void read_first_sector(); void soft_reset() override; - UINT32 m_cur_lba; - UINT16 m_block_count; - UINT16 m_sectors_until_int; + uint32_t m_cur_lba; + uint16_t m_block_count; + uint16_t m_sectors_until_int; - UINT8 m_master_password_enable; - UINT8 m_user_password_enable; - const UINT8 * m_master_password; - const UINT8 * m_user_password; + uint8_t m_master_password_enable; + uint8_t m_user_password_enable; + const uint8_t * m_master_password; + const uint8_t * m_user_password; }; // ======================> ide_hdd_device @@ -87,8 +87,8 @@ class ide_hdd_device : public ata_mass_storage_device { public: // construction/destruction - ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ide_hdd_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); + ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_hdd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: // device-level overrides @@ -98,9 +98,9 @@ protected: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual int read_sector(UINT32 lba, void *buffer) override { if (m_disk == nullptr) return 0; return hard_disk_read(m_disk, lba, buffer); } - virtual int write_sector(UINT32 lba, const void *buffer) override { if (m_disk == nullptr) return 0; return hard_disk_write(m_disk, lba, buffer); } - virtual UINT8 calculate_status() override; + virtual int read_sector(uint32_t lba, void *buffer) override { if (m_disk == nullptr) return 0; return hard_disk_read(m_disk, lba, buffer); } + virtual int write_sector(uint32_t lba, const void *buffer) override { if (m_disk == nullptr) return 0; return hard_disk_write(m_disk, lba, buffer); } + virtual uint8_t calculate_status() override; chd_file *m_handle; hard_disk_file *m_disk; diff --git a/src/devices/machine/im6402.cpp b/src/devices/machine/im6402.cpp index ed27e61279a..4cc898d8e52 100644 --- a/src/devices/machine/im6402.cpp +++ b/src/devices/machine/im6402.cpp @@ -75,7 +75,7 @@ inline void im6402_device::set_tre(int state) // im6402_device - constructor //------------------------------------------------- -im6402_device::im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +im6402_device::im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, IM6402, "Intersil IM6402", tag, owner, clock, "im6402", __FILE__), device_serial_interface(mconfig, *this), m_write_tro(*this), diff --git a/src/devices/machine/im6402.h b/src/devices/machine/im6402.h index 05f0b33861a..24d45796d12 100644 --- a/src/devices/machine/im6402.h +++ b/src/devices/machine/im6402.h @@ -79,7 +79,7 @@ class im6402_device : public device_t, { public: // construction/destruction - im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void set_rrc(device_t &device, int rrc) { downcast(device).m_rrc = rrc; } static void set_trc(device_t &device, int trc) { downcast(device).m_trc = trc; } @@ -151,12 +151,12 @@ private: int m_pi; // receiver - UINT8 m_rbr; + uint8_t m_rbr; int m_rrc; int m_rrc_count; // transmitter - UINT8 m_tbr; + uint8_t m_tbr; int m_trc; int m_trc_count; }; diff --git a/src/devices/machine/input_merger.cpp b/src/devices/machine/input_merger.cpp index ceedca5d556..8c45c5b8794 100644 --- a/src/devices/machine/input_merger.cpp +++ b/src/devices/machine/input_merger.cpp @@ -32,7 +32,7 @@ const device_type INPUT_MERGER_ACTIVE_LOW = &device_creator; // ins8154_device - constructor //------------------------------------------------- -ins8154_device::ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ins8154_device::ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, INS8154, "INS8154 RAM I/O", tag, owner, clock, "ins8154", __FILE__), m_in_a_cb(*this), m_out_a_cb(*this), @@ -94,7 +94,7 @@ void ins8154_device::device_reset() READ8_MEMBER(ins8154_device::ins8154_r) { - UINT8 val = 0xff; + uint8_t val = 0xff; if (offset > 0x24) { diff --git a/src/devices/machine/ins8154.h b/src/devices/machine/ins8154.h index 6a38a840c89..b49e5368ae6 100644 --- a/src/devices/machine/ins8154.h +++ b/src/devices/machine/ins8154.h @@ -68,7 +68,7 @@ class ins8154_device : public device_t { public: // construction/destruction - ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_in_a_callback(device_t &device, _Object object) { return downcast(device).m_in_a_cb.set_callback(object); } template static devcb_base &set_out_a_callback(device_t &device, _Object object) { return downcast(device).m_out_a_cb.set_callback(object); } @@ -99,13 +99,13 @@ private: devcb_write_line m_out_irq_cb; /* registers */ - UINT8 m_in_a; /* Input Latch Port A */ - UINT8 m_in_b; /* Input Latch Port B */ - UINT8 m_out_a; /* Output Latch Port A */ - UINT8 m_out_b; /* Output Latch Port B */ - UINT8 m_mdr; /* Mode Definition Register */ - UINT8 m_odra; /* Output Definition Register Port A */ - UINT8 m_odrb; /* Output Definition Register Port B */ + uint8_t m_in_a; /* Input Latch Port A */ + uint8_t m_in_b; /* Input Latch Port B */ + uint8_t m_out_a; /* Output Latch Port A */ + uint8_t m_out_b; /* Output Latch Port B */ + uint8_t m_mdr; /* Mode Definition Register */ + uint8_t m_odra; /* Output Definition Register Port A */ + uint8_t m_odrb; /* Output Definition Register Port B */ }; diff --git a/src/devices/machine/ins8250.cpp b/src/devices/machine/ins8250.cpp index 6607d7844da..98a80adcb93 100644 --- a/src/devices/machine/ins8250.cpp +++ b/src/devices/machine/ins8250.cpp @@ -91,7 +91,7 @@ const device_type NS16450 = &device_creator; const device_type NS16550 = &device_creator; const device_type PC16552D = &device_creator; -ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_type type, const char* name, const char *tag, device_t *owner, UINT32 clock, const char *shortname) +ins8250_uart_device::ins8250_uart_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_out_tx_cb(*this), @@ -109,25 +109,25 @@ ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_t m_regs.ier = 0; } -ins8250_device::ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ins8250_device::ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ins8250_uart_device(mconfig, INS8250, "National Semiconductor INS8250", tag, owner, clock, "ins8250") { m_device_type = TYPE_INS8250; } -ns16450_device::ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ns16450_device::ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ins8250_uart_device(mconfig, NS16450, "National Semiconductor NS16450", tag, owner, clock, "ns16450") { m_device_type = TYPE_NS16450; } -ns16550_device::ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ns16550_device::ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ins8250_uart_device(mconfig, NS16550, "National Semiconductor NS16550", tag, owner, clock, "ns16550") { m_device_type = TYPE_NS16550; } -pc16552_device::pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +pc16552_device::pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PC16552D, "National Semiconductor PC16552D", tag, owner, clock, "pc16552d", __FILE__) { } @@ -496,7 +496,7 @@ void ins8250_uart_device::tra_callback() void ins8250_uart_device::update_msr() { - UINT8 data; + uint8_t data; int change; if (m_regs.mcr & 0x10) @@ -643,15 +643,15 @@ void ns16550_device::device_timer(emu_timer &timer, device_timer_id id, int para } } -void ns16550_device::push_tx(UINT8 data) +void ns16550_device::push_tx(uint8_t data) { m_tfifo[m_thead] = data; ++m_thead &= 0x0f; } -UINT8 ns16550_device::pop_rx() +uint8_t ns16550_device::pop_rx() { - UINT8 data = m_rfifo[m_rtail]; + uint8_t data = m_rfifo[m_rtail]; clear_int(COM_INT_PENDING_CHAR_TIMEOUT & ~1); // don't clear bit 1 yet if(m_rnum) @@ -676,7 +676,7 @@ UINT8 ns16550_device::pop_rx() return data; } -void ns16550_device::set_fcr(UINT8 data) +void ns16550_device::set_fcr(uint8_t data) { const int bytes_per_int[] = {1, 4, 8, 14}; if(!(data & 1)) diff --git a/src/devices/machine/ins8250.h b/src/devices/machine/ins8250.h index 547c3dea602..4da3b0fb9af 100644 --- a/src/devices/machine/ins8250.h +++ b/src/devices/machine/ins8250.h @@ -19,7 +19,7 @@ class ins8250_uart_device : public device_t, public device_serial_interface { public: - ins8250_uart_device(const machine_config &mconfig, device_type type, const char* name, const char *tag, device_t *owner, UINT32 clock, const char *shortname); + ins8250_uart_device(const machine_config &mconfig, device_type type, const char* name, const char *tag, device_t *owner, uint32_t clock, const char *shortname); template static devcb_base &set_out_tx_callback(device_t &device, _Object object) { return downcast(device).m_out_tx_cb.set_callback(object); } template static devcb_base &set_out_dtr_callback(device_t &device, _Object object) { return downcast(device).m_out_dtr_cb.set_callback(object); } @@ -44,9 +44,9 @@ protected: virtual void tra_callback() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual void set_fcr(UINT8 data) {} - virtual void push_tx(UINT8 data) {} - virtual UINT8 pop_rx() { return 0; } + virtual void set_fcr(uint8_t data) {} + virtual void push_tx(uint8_t data) {} + virtual uint8_t pop_rx() { return 0; } void trigger_int(int flag); void clear_int(int flag); @@ -60,20 +60,20 @@ protected: }; int m_device_type; struct { - UINT8 thr; /* 0 -W transmitter holding register */ - UINT8 rbr; /* 0 R- receiver buffer register */ - UINT8 ier; /* 1 RW interrupt enable register */ - UINT16 dl; /* 0/1 RW divisor latch (if DLAB = 1) */ - UINT8 iir; /* 2 R- interrupt identification register */ - UINT8 fcr; - UINT8 lcr; /* 3 RW line control register (bit 7: DLAB) */ - UINT8 mcr; /* 4 RW modem control register */ - UINT8 lsr; /* 5 R- line status register */ - UINT8 msr; /* 6 R- modem status register */ - UINT8 scr; /* 7 RW scratch register */ + uint8_t thr; /* 0 -W transmitter holding register */ + uint8_t rbr; /* 0 R- receiver buffer register */ + uint8_t ier; /* 1 RW interrupt enable register */ + uint16_t dl; /* 0/1 RW divisor latch (if DLAB = 1) */ + uint8_t iir; /* 2 R- interrupt identification register */ + uint8_t fcr; + uint8_t lcr; /* 3 RW line control register (bit 7: DLAB) */ + uint8_t mcr; /* 4 RW modem control register */ + uint8_t lsr; /* 5 R- line status register */ + uint8_t msr; /* 6 R- modem status register */ + uint8_t scr; /* 7 RW scratch register */ } m_regs; private: - UINT8 m_int_pending; + uint8_t m_int_pending; devcb_write_line m_out_tx_cb; devcb_write_line m_out_dtr_cb; @@ -96,33 +96,33 @@ private: class ins8250_device : public ins8250_uart_device { public: - ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class ns16450_device : public ins8250_uart_device { public: - ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class ns16550_device : public ins8250_uart_device { public: - ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: virtual void device_start() override; virtual void device_reset() override; virtual void rcv_complete() override; virtual void tra_complete() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual void set_fcr(UINT8 data) override; - virtual void push_tx(UINT8 data) override; - virtual UINT8 pop_rx() override; + virtual void set_fcr(uint8_t data) override; + virtual void push_tx(uint8_t data) override; + virtual uint8_t pop_rx() override; private: void set_timer() { m_timeout->adjust(attotime::from_hz((clock()*4*8)/(m_regs.dl*16))); } int m_rintlvl; - UINT8 m_rfifo[16]; - UINT8 m_tfifo[16]; + uint8_t m_rfifo[16]; + uint8_t m_tfifo[16]; int m_rhead, m_rtail, m_rnum; int m_thead, m_ttail; emu_timer *m_timeout; @@ -131,7 +131,7 @@ private: class pc16552_device : public device_t { public: - pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER(read) { return ((offset & 8) ? m_chan1 : m_chan0)->ins8250_r(space, offset & 7, mem_mask); } DECLARE_WRITE8_MEMBER(write) { ((offset & 8) ? m_chan1 : m_chan0)->ins8250_w(space, offset & 7, data, mem_mask); } diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp index 19a871a018e..88e3cdddec8 100644 --- a/src/devices/machine/intelfsh.cpp +++ b/src/devices/machine/intelfsh.cpp @@ -120,7 +120,7 @@ const device_type SST_39VF400A = &device_creator; // intelfsh_device - constructor //------------------------------------------------- -intelfsh_device::intelfsh_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) +intelfsh_device::intelfsh_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), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -332,100 +332,100 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type break; } -intelfsh8_device::intelfsh8_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) +intelfsh8_device::intelfsh8_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) : intelfsh_device(mconfig, type, name, tag, owner, clock, variant, shortname, source) { } -intelfsh16_device::intelfsh16_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) +intelfsh16_device::intelfsh16_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) : intelfsh_device(mconfig, type, name, tag, owner, clock, variant, shortname, source) { } -intel_28f016s5_device::intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_28f016s5_device::intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, INTEL_28F016S5, "Intel 28F016S5 Flash", tag, owner, clock, FLASH_INTEL_28F016S5, "intel_28f016s5", __FILE__) { } -fujitsu_29f160t_device::fujitsu_29f160t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +fujitsu_29f160t_device::fujitsu_29f160t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, FUJITSU_29F160T, "Fujitsu 29F160 Flash", tag, owner, clock, FLASH_FUJITSU_29F160T, "fujitsu_29f160t", __FILE__) { } -fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, FUJITSU_29F016A, "Fujitsu 29F016A Flash", tag, owner, clock, FLASH_FUJITSU_29F016A, "fujitsu_29f016a", __FILE__) { } -fujitsu_29dl16x_device::fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +fujitsu_29dl16x_device::fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, FUJITSU_29DL16X, "Fujitsu 29DL16X Flash", tag, owner, clock, FLASH_FUJITSU_29DL16X, "fujitsu_29dl16x", __FILE__) { } -sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, SHARP_LH28F016S, "Sharp LH28F016S Flash", tag, owner, clock, FLASH_SHARP_LH28F016S, "sharp_lh28f016s", __FILE__) { } -sharp_lh28f016s_16bit_device::sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sharp_lh28f016s_16bit_device::sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, SHARP_LH28F016S_16BIT, "Sharp LH28F016S Flash (16-bit)", tag, owner, clock, FLASH_SHARP_LH28F016S_16BIT, "sharp_lh28f016s_16bit", __FILE__) { } -atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, ATMEL_29C010, "Atmel 29C010 Flash", tag, owner, clock, FLASH_ATMEL_29C010, "atmel_29c010", __FILE__) { } -amd_29f010_device::amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +amd_29f010_device::amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, AMD_29F010, "AMD 29F010 Flash", tag, owner, clock, FLASH_AMD_29F010, "amd_29f010", __FILE__) { } -amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, AMD_29F040, "AMD 29F040 Flash", tag, owner, clock, FLASH_AMD_29F040, "amd_29f040", __FILE__) { } -amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, AMD_29F080, "AMD 29F080 Flash", tag, owner, clock, FLASH_AMD_29F080, "amd_29f080", __FILE__) { } -amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, AMD_29F400T, "AMD 29F400 Flash", tag, owner, clock, FLASH_AMD_29F400T, "amd_29f400t", __FILE__) { } -amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, AMD_29F800T, "AMD 29F800 Flash", tag, owner, clock, FLASH_AMD_29F800T, "amd_29f800t", __FILE__) { } -amd_29lv200t_device::amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +amd_29lv200t_device::amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, AMD_29LV200T, "AMD 29LV200T Flash", tag, owner, clock, FLASH_AMD_29LV200T, "amd_29lv200t", __FILE__) { } -intel_e28f008sa_device::intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_e28f008sa_device::intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, INTEL_E28F008SA, "Intel E28F008SA Flash", tag, owner, clock, FLASH_INTEL_E28F008SA, "intel_e28f008sa", __FILE__) { } -macronix_29l001mc_device::macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +macronix_29l001mc_device::macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, MACRONIX_29L001MC, "Macronix 29L001MC Flash", tag, owner, clock, FLASH_MACRONIX_29L001MC, "macronix_29l001mc", __FILE__) { } -macronix_29lv160tmc_device::macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +macronix_29lv160tmc_device::macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, MACRONIX_29LV160TMC, "Macronix 29LV160TMC Flash", tag, owner, clock, FLASH_MACRONIX_29LV160TMC, "macronix_29lv160tmc", __FILE__) { } -panasonic_mn63f805mnp_device::panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +panasonic_mn63f805mnp_device::panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, PANASONIC_MN63F805MNP, "Panasonic MN63F805MNP Flash", tag, owner, clock, FLASH_PANASONIC_MN63F805MNP, "panasonic_mn63f805mnp", __FILE__) { } -sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, SANYO_LE26FV10N1TS, "Sanyo LE26FV10N1TS Flash", tag, owner, clock, FLASH_SANYO_LE26FV10N1TS, "sanyo_le26fv10n1ts", __FILE__) { } -sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, SST_28SF040, "SST 28SF040 Flash", tag, owner, clock, FLASH_SST_28SF040, "sst_28sf040", __FILE__) { } -sst_39vf020_device::sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sst_39vf020_device::sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, SST_39VF020, "SST 39VF020 Flash", tag, owner, clock, FLASH_SST_39VF020, "sst_39vf020", __FILE__) { } -sharp_lh28f400_device::sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sharp_lh28f400_device::sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, SHARP_LH28F400, "Sharp LH28F400 Flash", tag, owner, clock, FLASH_SHARP_LH28F400, "sharp_lh28f400", __FILE__) { } -intel_te28f160_device::intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_te28f160_device::intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, INTEL_TE28F160, "Intel TE28F160 Flash", tag, owner, clock, FLASH_INTEL_TE28F160, "intel_te28f160", __FILE__) { } -intel_te28f320_device::intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_te28f320_device::intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, INTEL_TE28F320, "Intel TE28F320 Flash", tag, owner, clock, FLASH_INTEL_TE28F320, "intel_te28f320", __FILE__) { } -intel_e28f400b_device::intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_e28f400b_device::intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, INTEL_E28F400B, "Intel E28F400B Flash", tag, owner, clock, FLASH_INTEL_E28F400B, "intel_e28f400b", __FILE__) { } -sharp_unk128mbit_device::sharp_unk128mbit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sharp_unk128mbit_device::sharp_unk128mbit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, SHARP_UNK128MBIT, "Sharp Unknown 128Mbit Flash", tag, owner, clock, FLASH_SHARP_UNK128MBIT, "sharp_unk128mbit", __FILE__) { } -intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, INTEL_28F320J3D, "Intel 28F320J3D Flash", tag, owner, clock, FLASH_INTEL_28F320J3D, "intel_28f320j3d", __FILE__) { } -intel_28f320j5_device::intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +intel_28f320j5_device::intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, INTEL_28F320J5, "Intel 28F320J3D_a Flash", tag, owner, clock, FLASH_INTEL_28F320J5, "intel_28f320j5", __FILE__) { } -sst_39vf400a_device::sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sst_39vf400a_device::sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh16_device(mconfig, SST_39VF400A, "SST 39VF400A Flash", tag, owner, clock, FLASH_SST_39VF400A, "sst_39vf400a", __FILE__) { } -tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : intelfsh8_device(mconfig, TMS_29F040, "Texas Instruments 29F040 Flash", tag, owner, clock, FLASH_TMS_29F040, "tms_29f040", __FILE__) { } //------------------------------------------------- @@ -434,7 +434,7 @@ tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char * void intelfsh_device::device_start() { - m_data = std::make_unique(m_size); + m_data = std::make_unique(m_size); m_timer = timer_alloc(); save_item( NAME(m_status) ); @@ -473,7 +473,7 @@ void intelfsh_device::nvram_default() // region always wins if (m_region.found()) { - UINT32 bytes = m_region->bytes(); + uint32_t bytes = m_region->bytes(); if (bytes > m_size) bytes = m_size; @@ -485,7 +485,7 @@ void intelfsh_device::nvram_default() else { for (offs_t offs = 0; offs < bytes; offs += 2) { - UINT16 v = m_region->u16(offs / 2); + uint16_t v = m_region->u16(offs / 2); m_data[offs] = v >> 8; m_data[offs+1] = v; } @@ -525,9 +525,9 @@ void intelfsh_device::nvram_write(emu_file &file) // bit-width-specific readers //------------------------------------------------- -UINT32 intelfsh_device::read_full(UINT32 address) +uint32_t intelfsh_device::read_full(uint32_t address) { - UINT32 data = 0; + uint32_t data = 0; address += m_bank << 16; switch( m_flash_mode ) { @@ -637,7 +637,7 @@ UINT32 intelfsh_device::read_full(UINT32 address) // bit-width-specific writers //------------------------------------------------- -void intelfsh_device::write_full(UINT32 address, UINT32 data) +void intelfsh_device::write_full(uint32_t address, uint32_t data) { //logerror( "intelflash_write( %u : %08x, %08x )\n", m_flash_mode, address, data ); @@ -858,7 +858,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data) { // sector erase // clear the 4k/64k block containing the current address to all 0xffs - UINT32 base = address * ((m_bits == 16) ? 2 : 1); + uint32_t base = address * ((m_bits == 16) ? 2 : 1); if (m_sector_is_4k) { memset(&m_data[base & ~0xfff], 0xff, 4 * 1024); @@ -969,7 +969,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data) if (m_type == FLASH_SST_28SF040) { // clear the 256 bytes block containing the current address to all 0xffs - UINT32 base = address * ((m_bits == 16) ? 2 : 1); + uint32_t base = address * ((m_bits == 16) ? 2 : 1); memset(&m_data[base & ~0xff], 0xff, 256); m_timer->adjust( attotime::from_msec( 4 ) ); @@ -984,7 +984,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data) // 40000-5ffff - 128KB main block // 60000-7ffff - 128KB main block // erase duration is 0.3s for boot and parameter blocks, and 0.6s for main blocks - UINT32 base = (address & 0x3ffff) * 2; + uint32_t base = (address & 0x3ffff) * 2; int size, duration; if (base < 0x4000) { @@ -1019,7 +1019,7 @@ void intelfsh_device::write_full(UINT32 address, UINT32 data) else { // clear the 64k block containing the current address to all 0xffs - UINT32 base = address * ((m_bits == 16) ? 2 : 1); + uint32_t base = address * ((m_bits == 16) ? 2 : 1); memset(&m_data[base & ~0xffff], 0xff, 64 * 1024); m_timer->adjust( attotime::from_seconds( 1 ) ); diff --git a/src/devices/machine/intelfsh.h b/src/devices/machine/intelfsh.h index 44e54e8f32b..a222add0830 100644 --- a/src/devices/machine/intelfsh.h +++ b/src/devices/machine/intelfsh.h @@ -148,11 +148,11 @@ public: FLASH_SST_39VF400A }; - UINT8 *base() { return &m_data[0]; } + uint8_t *base() { return &m_data[0]; } protected: // construction/destruction - intelfsh_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); + intelfsh_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); protected: // device-level overrides @@ -165,32 +165,32 @@ protected: virtual void nvram_write(emu_file &file) override; // derived helpers - UINT32 read_full(UINT32 offset); - void write_full(UINT32 offset, UINT32 data); + uint32_t read_full(uint32_t offset); + void write_full(uint32_t offset, uint32_t data); optional_memory_region m_region; // configuration state - UINT32 m_type; - INT32 m_size; - UINT8 m_bits; - UINT32 m_addrmask; - UINT16 m_device_id; - UINT8 m_maker_id; + uint32_t m_type; + int32_t m_size; + uint8_t m_bits; + uint32_t m_addrmask; + uint16_t m_device_id; + uint8_t m_maker_id; bool m_sector_is_4k; bool m_sector_is_16k; bool m_top_boot_sector; - UINT8 m_page_size; + uint8_t m_page_size; // internal state - std::unique_ptr m_data; - UINT8 m_status; - INT32 m_erase_sector; - INT32 m_flash_mode; + std::unique_ptr m_data; + uint8_t m_status; + int32_t m_erase_sector; + int32_t m_flash_mode; bool m_flash_master_lock; emu_timer * m_timer; - INT32 m_bank; - UINT8 m_byte_count; + int32_t m_bank; + uint8_t m_byte_count; }; @@ -200,17 +200,17 @@ class intelfsh8_device : public intelfsh_device { protected: // construction/destruction - intelfsh8_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); + intelfsh8_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); public: // public interface - UINT8 read(offs_t offset) { return read_full(offset); } - void write(offs_t offset, UINT8 data) { write_full(offset, data); } + uint8_t read(offs_t offset) { return read_full(offset); } + void write(offs_t offset, uint8_t data) { write_full(offset, data); } DECLARE_READ8_MEMBER(read) { return read_full(offset); } DECLARE_WRITE8_MEMBER(write) { write_full(offset, data); } - UINT8 read_raw(offs_t offset) { return m_data[offset]; } - void write_raw(offs_t offset, UINT8 data) { m_data[offset] = data; } + uint8_t read_raw(offs_t offset) { return m_data[offset]; } + void write_raw(offs_t offset, uint8_t data) { m_data[offset] = data; } }; @@ -220,17 +220,17 @@ class intelfsh16_device : public intelfsh_device { protected: // construction/destruction - intelfsh16_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); + intelfsh16_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); public: // public interface - UINT16 read(offs_t offset) { return read_full(offset); } - void write(offs_t offset, UINT16 data) { write_full(offset, data); } + uint16_t read(offs_t offset) { return read_full(offset); } + void write(offs_t offset, uint16_t data) { write_full(offset, data); } DECLARE_READ16_MEMBER(read) { return read_full(offset); } DECLARE_WRITE16_MEMBER(write) { write_full(offset, data); } - UINT16 read_raw(offs_t offset) { return m_data[offset*2] | (m_data[offset*2+1] << 8); } - void write_raw(offs_t offset, UINT16 data) { m_data[offset*2] = data; m_data[offset*2+1] = data >> 8; } + uint16_t read_raw(offs_t offset) { return m_data[offset*2] | (m_data[offset*2+1] << 8); } + void write_raw(offs_t offset, uint16_t data) { m_data[offset*2] = data; m_data[offset*2+1] = data >> 8; } }; @@ -240,176 +240,176 @@ public: class intel_28f016s5_device : public intelfsh8_device { public: - intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fujitsu_29f160t_device : public intelfsh8_device { public: - fujitsu_29f160t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fujitsu_29f160t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fujitsu_29f016a_device : public intelfsh8_device { public: - fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fujitsu_29dl16x_device : public intelfsh8_device { public: - fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class atmel_29c010_device : public intelfsh8_device { public: - atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class amd_29f010_device : public intelfsh8_device { public: - amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class amd_29f040_device : public intelfsh8_device { public: - amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class amd_29f080_device : public intelfsh8_device { public: - amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class amd_29f400t_device : public intelfsh8_device { public: - amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class amd_29f800t_device : public intelfsh8_device { public: - amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class amd_29lv200t_device : public intelfsh8_device { public: - amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sharp_lh28f016s_device : public intelfsh8_device { public: - sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sharp_lh28f016s_16bit_device : public intelfsh16_device { public: - sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class intel_e28f008sa_device : public intelfsh8_device { public: - intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class macronix_29l001mc_device : public intelfsh8_device { public: - macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class macronix_29lv160tmc_device : public intelfsh8_device { public: - macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class panasonic_mn63f805mnp_device : public intelfsh8_device { public: - panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sanyo_le26fv10n1ts_device : public intelfsh8_device { public: - sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sst_28sf040_device : public intelfsh8_device { public: - sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sst_39vf020_device : public intelfsh8_device { public: - sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class tms_29f040_device : public intelfsh8_device { public: - tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // 16-bit variants class sharp_lh28f400_device : public intelfsh16_device { public: - sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class intel_te28f160_device : public intelfsh16_device { public: - intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class intel_te28f320_device : public intelfsh16_device { public: - intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class intel_e28f400b_device : public intelfsh16_device { public: - intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sharp_unk128mbit_device : public intelfsh16_device { public: - sharp_unk128mbit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sharp_unk128mbit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class intel_28f320j3d_device : public intelfsh16_device { public: - intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class intel_28f320j5_device : public intelfsh16_device { public: - intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class sst_39vf400a_device : public intelfsh16_device { public: - sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; diff --git a/src/devices/machine/jvsdev.cpp b/src/devices/machine/jvsdev.cpp index c70f8a9fce6..6fb4fd76b18 100644 --- a/src/devices/machine/jvsdev.cpp +++ b/src/devices/machine/jvsdev.cpp @@ -9,7 +9,7 @@ void jvs_device::static_set_jvs_host_tag(device_t &device, const char *jvs_host_ jvsdev.jvs_host_tag = jvs_host_tag; } -jvs_device::jvs_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) +jvs_device::jvs_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), jvs_outputs(0), jvs_address(0), jvs_reset_counter(0) { jvs_host_tag = nullptr; @@ -21,17 +21,17 @@ const char *jvs_device::device_id() return ""; } -UINT8 jvs_device::command_format_version() +uint8_t jvs_device::command_format_version() { return 0x13; } -UINT8 jvs_device::jvs_standard_version() +uint8_t jvs_device::jvs_standard_version() { return 0x30; } -UINT8 jvs_device::comm_method_version() +uint8_t jvs_device::comm_method_version() { return 0x10; } @@ -44,7 +44,7 @@ void jvs_device::chain(jvs_device *dev) next_device = dev; } -void jvs_device::message(UINT8 dest, const UINT8 *send_buffer, UINT32 send_size, UINT8 *recv_buffer, UINT32 &recv_size) +void jvs_device::message(uint8_t dest, const uint8_t *send_buffer, uint32_t send_size, uint8_t *recv_buffer, uint32_t &recv_size) { recv_size = 0; @@ -63,8 +63,8 @@ void jvs_device::message(UINT8 dest, const UINT8 *send_buffer, UINT32 send_size, // dest=0xff is broadcast if(dest == 0xff || dest == jvs_address) { - const UINT8 *s = send_buffer; - UINT8 *d = recv_buffer; + const uint8_t *s = send_buffer; + uint8_t *d = recv_buffer; *d++ = 0x01; while(s < send_buffer + send_size) { int len = handle_message(s, send_size-(s-send_buffer), d); @@ -89,9 +89,9 @@ void jvs_device::message(UINT8 dest, const UINT8 *send_buffer, UINT32 send_size, next_device->message(dest, send_buffer, send_size, recv_buffer, recv_size); } -int jvs_device::handle_message(const UINT8 *send_buffer, UINT32 send_size, UINT8 *&recv_buffer) +int jvs_device::handle_message(const uint8_t *send_buffer, uint32_t send_size, uint8_t *&recv_buffer) { - UINT32 old_reset_counter = jvs_reset_counter; + uint32_t old_reset_counter = jvs_reset_counter; jvs_reset_counter = 0; switch(send_buffer[0]) { @@ -209,44 +209,44 @@ void jvs_device::device_reset() jvs_outputs = 0; } -void jvs_device::function_list(UINT8 *&buf) +void jvs_device::function_list(uint8_t *&buf) { } -bool jvs_device::coin_counters(UINT8 *&buf, UINT8 count) +bool jvs_device::coin_counters(uint8_t *&buf, uint8_t count) { return false; } -bool jvs_device::coin_add(UINT8 slot, INT32 count) +bool jvs_device::coin_add(uint8_t slot, int32_t count) { return false; } -bool jvs_device::switches(UINT8 *&buf, UINT8 count_players, UINT8 bytes_per_switch) +bool jvs_device::switches(uint8_t *&buf, uint8_t count_players, uint8_t bytes_per_switch) { return false; } -bool jvs_device::analogs(UINT8 *&buf, UINT8 count) +bool jvs_device::analogs(uint8_t *&buf, uint8_t count) { return false; } -bool jvs_device::swoutputs(UINT8 count, const UINT8 *vals) +bool jvs_device::swoutputs(uint8_t count, const uint8_t *vals) { return false; } -bool jvs_device::swoutputs(UINT8 id, UINT8 val) +bool jvs_device::swoutputs(uint8_t id, uint8_t val) { return false; } -void jvs_device::handle_output(ioport_port *port, UINT8 id, UINT8 val) +void jvs_device::handle_output(ioport_port *port, uint8_t id, uint8_t val) { - UINT32 m = 1 << id; + uint32_t m = 1 << id; switch(val) { case 0: jvs_outputs &= ~m; break; case 1: jvs_outputs |= m; break; diff --git a/src/devices/machine/jvsdev.h b/src/devices/machine/jvsdev.h index 22a95e2b1a7..1cff880d8ea 100644 --- a/src/devices/machine/jvsdev.h +++ b/src/devices/machine/jvsdev.h @@ -13,17 +13,17 @@ class jvs_host; class jvs_device : public device_t { public: - jvs_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); + jvs_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 void static_set_jvs_host_tag(device_t &device, const char *jvs_host_tag); void chain(jvs_device *dev); - void message(UINT8 dest, const UINT8 *send_buffer, UINT32 send_size, UINT8 *recv_buffer, UINT32 &recv_size); + void message(uint8_t dest, const uint8_t *send_buffer, uint32_t send_size, uint8_t *recv_buffer, uint32_t &recv_size); bool get_address_set_line(); protected: - UINT32 jvs_outputs; + uint32_t jvs_outputs; - void handle_output(ioport_port *port, UINT8 id, UINT8 val); + void handle_output(ioport_port *port, uint8_t id, uint8_t val); // device-level overrides virtual void device_start() override; @@ -31,24 +31,24 @@ protected: // JVS device overrides virtual const char *device_id(); - virtual UINT8 command_format_version(); - virtual UINT8 jvs_standard_version(); - virtual UINT8 comm_method_version(); - virtual void function_list(UINT8 *&buf); - virtual bool switches(UINT8 *&buf, UINT8 count_players, UINT8 bytes_per_switch); - virtual bool coin_counters(UINT8 *&buf, UINT8 count); - virtual bool coin_add(UINT8 slot, INT32 count); - virtual bool analogs(UINT8 *&buf, UINT8 count); - virtual bool swoutputs(UINT8 count, const UINT8 *vals); - virtual bool swoutputs(UINT8 id, UINT8 val); + virtual uint8_t command_format_version(); + virtual uint8_t jvs_standard_version(); + virtual uint8_t comm_method_version(); + virtual void function_list(uint8_t *&buf); + virtual bool switches(uint8_t *&buf, uint8_t count_players, uint8_t bytes_per_switch); + virtual bool coin_counters(uint8_t *&buf, uint8_t count); + virtual bool coin_add(uint8_t slot, int32_t count); + virtual bool analogs(uint8_t *&buf, uint8_t count); + virtual bool swoutputs(uint8_t count, const uint8_t *vals); + virtual bool swoutputs(uint8_t id, uint8_t val); private: const char *jvs_host_tag; jvs_device *next_device; - UINT8 jvs_address; - UINT32 jvs_reset_counter; + uint8_t jvs_address; + uint32_t jvs_reset_counter; - int handle_message(const UINT8 *send_buffer, UINT32 send_size, UINT8 *&recv_buffer); + int handle_message(const uint8_t *send_buffer, uint32_t send_size, uint8_t *&recv_buffer); }; #endif diff --git a/src/devices/machine/jvshost.cpp b/src/devices/machine/jvshost.cpp index bca7f7c618c..fb8872751fb 100644 --- a/src/devices/machine/jvshost.cpp +++ b/src/devices/machine/jvshost.cpp @@ -28,13 +28,13 @@ void jvs_host::device_reset() memset(recv_buffer, 0, sizeof(recv_buffer)); } -jvs_host::jvs_host(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +jvs_host::jvs_host(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), send_size(0), recv_size(0), recv_is_encoded(false) { first_device = nullptr; } -void jvs_host::push(UINT8 val) +void jvs_host::push(uint8_t val) { send_buffer[send_size++] = val; } @@ -82,7 +82,7 @@ void jvs_host::commit_encoded() } -void jvs_host::get_raw_reply(const UINT8 *&buffer, UINT32 &size) +void jvs_host::get_raw_reply(const uint8_t *&buffer, uint32_t &size) { if(recv_is_encoded) { decode(recv_buffer, recv_size); @@ -92,7 +92,7 @@ void jvs_host::get_raw_reply(const UINT8 *&buffer, UINT32 &size) size = recv_size; } -void jvs_host::get_encoded_reply(const UINT8 *&buffer, UINT32 &size) +void jvs_host::get_encoded_reply(const uint8_t *&buffer, uint32_t &size) { if(!recv_is_encoded) { encode(recv_buffer, recv_size); @@ -113,20 +113,20 @@ bool jvs_host::get_address_set_line() } -void jvs_host::encode(UINT8 *buffer, UINT32 &size) +void jvs_host::encode(uint8_t *buffer, uint32_t &size) { if(!size) return; - UINT32 add = 1; - UINT8 sum = 0; - for(UINT32 i=0; i; // k033906_device - constructor //------------------------------------------------- -k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, K033906, "K033906 PCI bridge", tag, owner, clock, "k033906", __FILE__) , m_reg_set(0) , m_voodoo(*this, finder_base::DUMMY_TAG) @@ -47,7 +47,7 @@ WRITE_LINE_MEMBER(k033906_device::set_reg) m_reg_set = state & 1; } -UINT32 k033906_device::reg_r(int reg) +uint32_t k033906_device::reg_r(int reg) { switch (reg) { @@ -63,7 +63,7 @@ UINT32 k033906_device::reg_r(int reg) //return 0; } -void k033906_device::reg_w(int reg, UINT32 data) +void k033906_device::reg_w(int reg, uint32_t data) { switch (reg) { diff --git a/src/devices/machine/k033906.h b/src/devices/machine/k033906.h index e493244ce81..20d4b076413 100644 --- a/src/devices/machine/k033906.h +++ b/src/devices/machine/k033906.h @@ -33,7 +33,7 @@ class k033906_device : public device_t { public: // construction/destruction - k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void set_voodoo_tag(device_t &device, const char *tag) { downcast(device).m_voodoo.set_tag(tag); } @@ -50,8 +50,8 @@ protected: private: - UINT32 reg_r(int reg); - void reg_w(int reg, UINT32 data); + uint32_t reg_r(int reg); + void reg_w(int reg, uint32_t data); /* i/o lines */ @@ -59,8 +59,8 @@ private: required_device m_voodoo; - UINT32 m_reg[256]; - UINT32 m_ram[32768]; + uint32_t m_reg[256]; + uint32_t m_ram[32768]; }; diff --git a/src/devices/machine/k053252.cpp b/src/devices/machine/k053252.cpp index b1fc225f022..bcd41295f9b 100644 --- a/src/devices/machine/k053252.cpp +++ b/src/devices/machine/k053252.cpp @@ -65,7 +65,7 @@ TODO: const device_type K053252 = &device_creator; -k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, K053252, "K053252 Timing/Interrupt", tag, owner, clock, "k053252", __FILE__) , device_video_interface(mconfig, *this) , m_int1_en_cb(*this) diff --git a/src/devices/machine/k053252.h b/src/devices/machine/k053252.h index 54787a6ee78..577654559c8 100644 --- a/src/devices/machine/k053252.h +++ b/src/devices/machine/k053252.h @@ -34,7 +34,7 @@ class k053252_device : public device_t, public device_video_interface { public: - k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~k053252_device() {} template static devcb_base &set_int1_en_callback(device_t &device, _Object object) { return downcast(device).m_int1_en_cb.set_callback(object); } @@ -62,10 +62,10 @@ protected: private: // internal state - UINT8 m_regs[16]; - UINT16 m_hc,m_hfp,m_hbp; - UINT16 m_vc,m_vfp,m_vbp; - UINT8 m_vsw,m_hsw; + uint8_t m_regs[16]; + uint16_t m_hc,m_hfp,m_hbp; + uint16_t m_vc,m_vfp,m_vbp; + uint8_t m_vsw,m_hsw; devcb_write_line m_int1_en_cb; devcb_write_line m_int2_en_cb; diff --git a/src/devices/machine/k056230.cpp b/src/devices/machine/k056230.cpp index 6c143a02fb4..d666813951b 100644 --- a/src/devices/machine/k056230.cpp +++ b/src/devices/machine/k056230.cpp @@ -21,7 +21,7 @@ const device_type K056230 = &device_creator; // k056230_device - constructor //------------------------------------------------- -k056230_device::k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +k056230_device::k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, K056230, "K056230 LANC", tag, owner, clock, "k056230", __FILE__) , m_is_thunderh(0) , m_cpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/k056230.h b/src/devices/machine/k056230.h index 4fa8d165fd1..1b34ef40c5a 100644 --- a/src/devices/machine/k056230.h +++ b/src/devices/machine/k056230.h @@ -36,7 +36,7 @@ class k056230_device : public device_t { public: // construction/destruction - k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void set_cpu_tag(device_t &device, const char *tag) { downcast(device).m_cpu.set_tag(tag); } static void set_thunderh_hack(device_t &device, int thunderh) { downcast(device).m_is_thunderh = thunderh; } @@ -61,7 +61,7 @@ private: int m_is_thunderh; required_device m_cpu; - UINT32 m_ram[0x2000]; + uint32_t m_ram[0x2000]; }; diff --git a/src/devices/machine/kb3600.cpp b/src/devices/machine/kb3600.cpp index ca5fb5e7e76..fdb5f2ec429 100644 --- a/src/devices/machine/kb3600.cpp +++ b/src/devices/machine/kb3600.cpp @@ -42,7 +42,7 @@ const device_type AY3600 = &device_creator; // ay3600_device - constructor //------------------------------------------------- -ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, AY3600, "AY-5-3600", tag, owner, clock, "ay3600", __FILE__), m_read_x0(*this), m_read_x1(*this), @@ -116,7 +116,7 @@ void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param for (int x = 0; x < 9; x++) { - UINT16 data = 0; + uint16_t data = 0; switch(x) { @@ -191,9 +191,9 @@ void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param // b_r - //------------------------------------------------- -UINT16 ay3600_device::b_r() +uint16_t ay3600_device::b_r() { - UINT16 data = m_b; + uint16_t data = m_b; m_write_data_ready(0); diff --git a/src/devices/machine/kb3600.h b/src/devices/machine/kb3600.h index 1d0529e7a0c..7b58d172301 100644 --- a/src/devices/machine/kb3600.h +++ b/src/devices/machine/kb3600.h @@ -101,10 +101,10 @@ class ay3600_device : public device_t { public: // construction/destruction - ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // public interface - UINT16 b_r(); + uint16_t b_r(); template static devcb_base &set_x0_cb(device_t &device, _Object rd) { return downcast(device).m_read_x0.set_callback(rd); } template static devcb_base &set_x1_cb(device_t &device, _Object rd) { return downcast(device).m_read_x1.set_callback(rd); } diff --git a/src/devices/machine/keyboard.cpp b/src/devices/machine/keyboard.cpp index d244bfc4d32..6347138c5f1 100644 --- a/src/devices/machine/keyboard.cpp +++ b/src/devices/machine/keyboard.cpp @@ -29,7 +29,7 @@ WRITE8_MEMBER( xxx_state::kbd_put ) namespace { -UINT8 const TRANSLATION_TABLE[][2][4][16] = { +uint8_t const TRANSLATION_TABLE[][2][4][16] = { { { // ANSI { '`', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 0x08U, 0x7fU, 0x1bU }, @@ -247,7 +247,7 @@ generic_keyboard_device::generic_keyboard_device( char const *name, char const *tag, device_t *owner, - UINT32 clock, + uint32_t clock, char const *shortname, char const *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source) @@ -260,7 +260,7 @@ generic_keyboard_device::generic_keyboard_device( } -generic_keyboard_device::generic_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock) +generic_keyboard_device::generic_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) : generic_keyboard_device(mconfig, GENERIC_KEYBOARD, "Generic Keyboard", tag, owner, clock, "generic_keyboard", __FILE__) { } @@ -296,40 +296,40 @@ void generic_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, } -void generic_keyboard_device::key_make(UINT8 row, UINT8 column) +void generic_keyboard_device::key_make(uint8_t row, uint8_t column) { send_translated((row << 4) | column); typematic_start(row, column, typematic_delay(), typematic_period()); } -void generic_keyboard_device::key_repeat(UINT8 row, UINT8 column) +void generic_keyboard_device::key_repeat(uint8_t row, uint8_t column) { send_translated((row << 4) | column); } -void generic_keyboard_device::send_key(UINT8 code) +void generic_keyboard_device::send_key(uint8_t code) { m_keyboard_cb(offs_t(0), code); } -bool generic_keyboard_device::translate(UINT8 code, UINT8 &translated) const +bool generic_keyboard_device::translate(uint8_t code, uint8_t &translated) const { unsigned const row((code >> 4) & 0x03U); unsigned const col((code >> 0) & 0x0fU); unsigned const layout(m_config->read() & 0x0001U); - UINT16 const modifiers(m_modifiers->read()); + uint16_t const modifiers(m_modifiers->read()); bool const shift(bool(modifiers & 0x02U) != (bool(modifiers & 0x04U) && CAPS_TABLE[row][col])); bool const ctrl(modifiers & 0x01U); bool const meta(modifiers & 0x08U); unsigned const map(ctrl ? 2U : shift ? 1U : 0U); - UINT8 const result(TRANSLATION_TABLE[map][layout][row][col]); - if (result == UINT8(~0U)) + uint8_t const result(TRANSLATION_TABLE[map][layout][row][col]); + if (result == uint8_t(~0U)) { return false; } @@ -341,9 +341,9 @@ bool generic_keyboard_device::translate(UINT8 code, UINT8 &translated) const } -void generic_keyboard_device::will_scan_row(UINT8 row) +void generic_keyboard_device::will_scan_row(uint8_t row) { - UINT16 const modifiers(m_modifiers->read()); + uint16_t const modifiers(m_modifiers->read()); if (modifiers != m_last_modifiers) typematic_restart(typematic_delay(), typematic_period()); @@ -351,9 +351,9 @@ void generic_keyboard_device::will_scan_row(UINT8 row) } -void generic_keyboard_device::send_translated(UINT8 code) +void generic_keyboard_device::send_translated(uint8_t code) { - UINT8 translated; + uint8_t translated; if (translate(code, translated)) send_key(translated); } diff --git a/src/devices/machine/keyboard.h b/src/devices/machine/keyboard.h index 343c8991bcb..1d69996e564 100644 --- a/src/devices/machine/keyboard.h +++ b/src/devices/machine/keyboard.h @@ -36,7 +36,7 @@ INPUT_PORTS_EXTERN( generic_keyboard ); TYPE DECLARATIONS ***************************************************************************/ -template +template class device_matrix_keyboard_interface : public device_interface { protected: @@ -51,15 +51,15 @@ protected: void stop_processing(); void reset_key_state(); - void typematic_start(UINT8 row, UINT8 column, attotime const &delay, attotime const &interval); + void typematic_start(uint8_t row, uint8_t column, attotime const &delay, attotime const &interval); void typematic_restart(attotime const &delay, attotime const &interval); void typematic_stop(); - bool typematic_is(UINT8 row, UINT8 column) const { return (m_typematic_row == row) && (m_typematic_column == column); } + bool typematic_is(uint8_t row, uint8_t column) const { return (m_typematic_row == row) && (m_typematic_column == column); } - virtual void key_make(UINT8 row, UINT8 column) = 0; - virtual void key_repeat(UINT8 row, UINT8 column); - virtual void key_break(UINT8 row, UINT8 column); - virtual void will_scan_row(UINT8 row); + virtual void key_make(uint8_t row, uint8_t column) = 0; + virtual void key_repeat(uint8_t row, uint8_t column); + virtual void key_break(uint8_t row, uint8_t column); + virtual void will_scan_row(uint8_t row); bool are_all_keys_up(); @@ -76,10 +76,10 @@ private: emu_timer *m_typematic_timer; required_ioport m_key_rows[ROW_COUNT]; ioport_value m_key_states[ROW_COUNT]; - UINT8 m_next_row; - UINT8 m_processing; - UINT8 m_typematic_row; - UINT8 m_typematic_column; + uint8_t m_next_row; + uint8_t m_processing; + uint8_t m_typematic_row; + uint8_t m_typematic_column; }; @@ -92,14 +92,14 @@ public: char const *name, char const *tag, device_t *owner, - UINT32 clock, + uint32_t clock, char const *shortname, char const *source); generic_keyboard_device( const machine_config &mconfig, const char *tag, device_t *owner, - UINT32 clock); + uint32_t clock); template static devcb_base &set_keyboard_callback(device_t &device, Object object) { return downcast(device).m_keyboard_cb.set_callback(object); } @@ -109,23 +109,23 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual void key_make(UINT8 row, UINT8 column) override; - virtual void key_repeat(UINT8 row, UINT8 column) override; - virtual void send_key(UINT8 code); - virtual bool translate(UINT8 code, UINT8 &translated) const; + virtual void key_make(uint8_t row, uint8_t column) override; + virtual void key_repeat(uint8_t row, uint8_t column) override; + virtual void send_key(uint8_t code); + virtual bool translate(uint8_t code, uint8_t &translated) const; required_ioport m_config; required_ioport m_modifiers; private: - virtual void will_scan_row(UINT8 row) override; + virtual void will_scan_row(uint8_t row) override; void typematic(); - void send_translated(UINT8 code); + void send_translated(uint8_t code); attotime typematic_delay() const; attotime typematic_period() const; - UINT16 m_last_modifiers; + uint16_t m_last_modifiers; devcb_write8 m_keyboard_cb; }; diff --git a/src/devices/machine/keyboard.ipp b/src/devices/machine/keyboard.ipp index b96954dd8bc..28681ba024d 100644 --- a/src/devices/machine/keyboard.ipp +++ b/src/devices/machine/keyboard.ipp @@ -15,7 +15,7 @@ #include -template +template template device_matrix_keyboard_interface::device_matrix_keyboard_interface(machine_config const &mconfig, device_t &device, T &&... tags) : device_interface(device, "matrix_keyboard") @@ -30,7 +30,7 @@ device_matrix_keyboard_interface::device_matrix_keyboard_interface(ma } -template +template void device_matrix_keyboard_interface::interface_pre_start() { m_scan_timer = device().timer_alloc(TIMER_ID_SCAN); @@ -40,7 +40,7 @@ void device_matrix_keyboard_interface::interface_pre_start() } -template +template void device_matrix_keyboard_interface::interface_post_start() { device().save_item(NAME(m_key_states)); @@ -51,7 +51,7 @@ void device_matrix_keyboard_interface::interface_post_start() } -template +template void device_matrix_keyboard_interface::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { switch (id) @@ -60,14 +60,14 @@ void device_matrix_keyboard_interface::device_timer(emu_timer &timer, scan_row(); break; case TIMER_ID_TYPEMATIC: - assert((m_typematic_row != UINT8(~0U)) || (m_typematic_column != UINT8(~0U))); + assert((m_typematic_row != uint8_t(~0U)) || (m_typematic_column != uint8_t(~0U))); key_repeat(m_typematic_row, m_typematic_column); break; } } -template +template void device_matrix_keyboard_interface::start_processing(const attotime &period) { m_processing = 1U; @@ -75,7 +75,7 @@ void device_matrix_keyboard_interface::start_processing(const attotim } -template +template void device_matrix_keyboard_interface::stop_processing() { m_scan_timer->reset(); @@ -83,7 +83,7 @@ void device_matrix_keyboard_interface::stop_processing() } -template +template void device_matrix_keyboard_interface::reset_key_state() { std::fill(std::begin(m_key_states), std::end(m_key_states), ioport_value(0U)); @@ -91,8 +91,8 @@ void device_matrix_keyboard_interface::reset_key_state() } -template -void device_matrix_keyboard_interface::typematic_start(UINT8 row, UINT8 column, attotime const &delay, attotime const &interval) +template +void device_matrix_keyboard_interface::typematic_start(uint8_t row, uint8_t column, attotime const &delay, attotime const &interval) { m_typematic_row = row; m_typematic_column = column; @@ -100,24 +100,24 @@ void device_matrix_keyboard_interface::typematic_start(UINT8 row, UIN } -template +template void device_matrix_keyboard_interface::typematic_restart(attotime const &delay, attotime const &interval) { - if ((m_typematic_row != UINT8(~0U)) || (m_typematic_column != UINT8(~0U))) + if ((m_typematic_row != uint8_t(~0U)) || (m_typematic_column != uint8_t(~0U))) m_typematic_timer->adjust(delay, 0, interval); } -template +template void device_matrix_keyboard_interface::typematic_stop() { - m_typematic_row = UINT8(~0U); - m_typematic_column = UINT8(~0U); + m_typematic_row = uint8_t(~0U); + m_typematic_column = uint8_t(~0U); m_typematic_timer->reset(); } -template +template void device_matrix_keyboard_interface::scan_row() { assert(m_next_row < ARRAY_LENGTH(m_key_rows)); @@ -130,7 +130,7 @@ void device_matrix_keyboard_interface::scan_row() ioport_value const change(state ^ keys); ioport_value mask(1U); - for (UINT8 column = 0U; m_processing && (state != keys); ++column, mask <<= 1) + for (uint8_t column = 0U; m_processing && (state != keys); ++column, mask <<= 1) { if (change & mask) { @@ -146,27 +146,27 @@ void device_matrix_keyboard_interface::scan_row() } -template -void device_matrix_keyboard_interface::key_repeat(UINT8 row, UINT8 column) +template +void device_matrix_keyboard_interface::key_repeat(uint8_t row, uint8_t column) { } -template -void device_matrix_keyboard_interface::key_break(UINT8 row, UINT8 column) +template +void device_matrix_keyboard_interface::key_break(uint8_t row, uint8_t column) { if (typematic_is(row, column)) typematic_stop(); } -template -void device_matrix_keyboard_interface::will_scan_row(UINT8 row) +template +void device_matrix_keyboard_interface::will_scan_row(uint8_t row) { } -template +template bool device_matrix_keyboard_interface::are_all_keys_up() { return 0U == std::accumulate( diff --git a/src/devices/machine/kr2376.cpp b/src/devices/machine/kr2376.cpp index 169a8b5f60d..8133143fd22 100644 --- a/src/devices/machine/kr2376.cpp +++ b/src/devices/machine/kr2376.cpp @@ -9,7 +9,7 @@ #include "emu.h" #include "kr2376.h" -static const UINT8 KR2376_KEY_CODES[3][8][11] = +static const uint8_t KR2376_KEY_CODES[3][8][11] = { // normal { @@ -66,7 +66,7 @@ static const UINT8 KR2376_KEY_CODES[3][8][11] = const device_type KR2376 = &device_creator; -kr2376_device::kr2376_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +kr2376_device::kr2376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, KR2376, "SMC KR2376", tag, owner, clock, "kr2376", __FILE__), m_write_strobe(*this) { diff --git a/src/devices/machine/kr2376.h b/src/devices/machine/kr2376.h index 080bfec4b90..d73ccfa4f58 100644 --- a/src/devices/machine/kr2376.h +++ b/src/devices/machine/kr2376.h @@ -54,7 +54,7 @@ enum kr2376_output_pin_t class kr2376_device : public device_t { public: - kr2376_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + kr2376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~kr2376_device() {} template static devcb_base &set_strobe_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_strobe.set_callback(object); } diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp index 40632fa42c6..6c20da364e4 100644 --- a/src/devices/machine/laserdsc.cpp +++ b/src/devices/machine/laserdsc.cpp @@ -31,21 +31,21 @@ //************************************************************************** // these specs code from IEC 60857, for NTSC players -const UINT32 LEAD_IN_MIN_RADIUS_IN_UM = 53500; // 53.5 mm -const UINT32 PROGRAM_MIN_RADIUS_IN_UM = 55000; // 55 mm -const UINT32 PROGRAM_MAX_RADIUS_IN_UM = 145000; // 145 mm -const UINT32 LEAD_OUT_MIN_SIZE_IN_UM = 2000; // 2 mm +const uint32_t LEAD_IN_MIN_RADIUS_IN_UM = 53500; // 53.5 mm +const uint32_t PROGRAM_MIN_RADIUS_IN_UM = 55000; // 55 mm +const uint32_t PROGRAM_MAX_RADIUS_IN_UM = 145000; // 145 mm +const uint32_t LEAD_OUT_MIN_SIZE_IN_UM = 2000; // 2 mm // the track pitch is defined as a range; we pick a nominal pitch // that ensures we can fit 54,000 tracks -//const UINT32 MIN_TRACK_PITCH_IN_NM = 1400; // 1.4 um -//const UINT32 MAX_TRACK_PITCH_IN_NM = 2000; // 2 um -const UINT32 NOMINAL_TRACK_PITCH_IN_NM = (PROGRAM_MAX_RADIUS_IN_UM - PROGRAM_MIN_RADIUS_IN_UM) * 1000 / 54000; +//const uint32_t MIN_TRACK_PITCH_IN_NM = 1400; // 1.4 um +//const uint32_t MAX_TRACK_PITCH_IN_NM = 2000; // 2 um +const uint32_t NOMINAL_TRACK_PITCH_IN_NM = (PROGRAM_MAX_RADIUS_IN_UM - PROGRAM_MIN_RADIUS_IN_UM) * 1000 / 54000; // we simulate extra lead-in and lead-out tracks -const UINT32 VIRTUAL_LEAD_IN_TRACKS = (PROGRAM_MIN_RADIUS_IN_UM - LEAD_IN_MIN_RADIUS_IN_UM) * 1000 / NOMINAL_TRACK_PITCH_IN_NM; -const UINT32 MAX_TOTAL_TRACKS = 54000; -const UINT32 VIRTUAL_LEAD_OUT_TRACKS = LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINAL_TRACK_PITCH_IN_NM; +const uint32_t VIRTUAL_LEAD_IN_TRACKS = (PROGRAM_MIN_RADIUS_IN_UM - LEAD_IN_MIN_RADIUS_IN_UM) * 1000 / NOMINAL_TRACK_PITCH_IN_NM; +const uint32_t MAX_TOTAL_TRACKS = 54000; +const uint32_t VIRTUAL_LEAD_OUT_TRACKS = LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINAL_TRACK_PITCH_IN_NM; @@ -57,7 +57,7 @@ const UINT32 VIRTUAL_LEAD_OUT_TRACKS = LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINAL_ // laserdisc_device - constructor //------------------------------------------------- -laserdisc_device::laserdisc_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) +laserdisc_device::laserdisc_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_sound_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -121,7 +121,7 @@ laserdisc_device::~laserdisc_device() // read from the disc //------------------------------------------------- -UINT32 laserdisc_device::get_field_code(laserdisc_field_code code, bool zero_if_squelched) +uint32_t laserdisc_device::get_field_code(laserdisc_field_code code, bool zero_if_squelched) { // return nothing if the video is off (external devices can't sense) if (zero_if_squelched && m_videosquelch) @@ -152,7 +152,7 @@ UINT32 laserdisc_device::get_field_code(laserdisc_field_code code, bool zero_if_ // screen_update - handle updating the screen //------------------------------------------------- -UINT32 laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { // handle the overlay if present screen_bitmap &overbitmap = m_overbitmap[m_overindex]; @@ -233,7 +233,7 @@ void laserdisc_device::static_set_audio(device_t &device, laserdisc_audio_delega // static_set_overlay - set the overlay parameters //------------------------------------------------- -void laserdisc_device::static_set_overlay(device_t &device, UINT32 width, UINT32 height, screen_update_ind16_delegate update) +void laserdisc_device::static_set_overlay(device_t &device, uint32_t width, uint32_t height, screen_update_ind16_delegate update) { laserdisc_device &ld = downcast(device); ld.m_overwidth = width; @@ -243,7 +243,7 @@ void laserdisc_device::static_set_overlay(device_t &device, UINT32 width, UINT32 ld.m_overupdate_rgb32 = screen_update_rgb32_delegate(); } -void laserdisc_device::static_set_overlay(device_t &device, UINT32 width, UINT32 height, screen_update_rgb32_delegate update) +void laserdisc_device::static_set_overlay(device_t &device, uint32_t width, uint32_t height, screen_update_rgb32_delegate update) { laserdisc_device &ld = downcast(device); ld.m_overwidth = width; @@ -259,7 +259,7 @@ void laserdisc_device::static_set_overlay(device_t &device, UINT32 width, UINT32 // memregion //------------------------------------------------- -void laserdisc_device::static_set_overlay_clip(device_t &device, INT32 minx, INT32 maxx, INT32 miny, INT32 maxy) +void laserdisc_device::static_set_overlay_clip(device_t &device, int32_t minx, int32_t maxx, int32_t miny, int32_t maxy) { downcast(device).m_overclip.set(minx, maxx, miny, maxy); } @@ -416,8 +416,8 @@ void laserdisc_device::device_timer(emu_timer &timer, device_timer_id id, int pa void laserdisc_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { // compute AND values based on the squelch - INT16 leftand = (m_audiosquelch & 1) ? 0x0000 : 0xffff; - INT16 rightand = (m_audiosquelch & 2) ? 0x0000 : 0xffff; + int16_t leftand = (m_audiosquelch & 1) ? 0x0000 : 0xffff; + int16_t rightand = (m_audiosquelch & 2) ? 0x0000 : 0xffff; // see if we have enough samples to fill the buffer; if not, drop out int samples_avail = m_audiobufin - m_audiobufout; @@ -436,8 +436,8 @@ void laserdisc_device::sound_stream_update(sound_stream &stream, stream_sample_t // otherwise, stream from our buffer else { - INT16 *buffer0 = &m_audiobuffer[0][0]; - INT16 *buffer1 = &m_audiobuffer[1][0]; + int16_t *buffer0 = &m_audiobuffer[0][0]; + int16_t *buffer1 = &m_audiobuffer[1][0]; int sampout = m_audiobufout; // copy samples, clearing behind us as we go @@ -479,7 +479,7 @@ void laserdisc_device::sound_stream_update(sound_stream &stream, stream_sample_t // slider speed //------------------------------------------------- -void laserdisc_device::set_slider_speed(INT32 tracks_per_vsync) +void laserdisc_device::set_slider_speed(int32_t tracks_per_vsync) { // update to the current time update_slider_pos(); @@ -507,7 +507,7 @@ void laserdisc_device::set_slider_speed(INT32 tracks_per_vsync) // a certain number of tracks //------------------------------------------------- -void laserdisc_device::advance_slider(INT32 numtracks) +void laserdisc_device::advance_slider(int32_t numtracks) { // first update to the current time update_slider_pos(); @@ -550,9 +550,9 @@ laserdisc_device::slider_position laserdisc_device::get_slider_position() // that works for most situations //------------------------------------------------- -INT32 laserdisc_device::generic_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime, player_state_info &newstate) +int32_t laserdisc_device::generic_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime, player_state_info &newstate) { - INT32 advanceby = 0; + int32_t advanceby = 0; int frame; // start by assuming the state doesn't change @@ -688,7 +688,7 @@ INT32 laserdisc_device::generic_update(const vbi_metadata &vbi, int fieldnum, co // otherwise, if we got frame data from the VBI, update our seeking logic else if (m_player_state.m_substate == 0 && frame != FRAME_NOT_PRESENT) { - INT32 delta = (m_player_state.m_param - 2) - frame; + int32_t delta = (m_player_state.m_param - 2) - frame; // if we're within a couple of frames, just play until we hit it if (delta >= 0 && delta <= 2) @@ -772,7 +772,7 @@ void laserdisc_device::init_disc() throw emu_fatalerror("Laserdisc video must be interlaced!"); // determine the maximum track and allocate a frame buffer - UINT32 totalhunks = m_disc->hunk_count(); + uint32_t totalhunks = m_disc->hunk_count(); m_chdtracks = totalhunks / 2; // allocate memory for the precomputed per-frame metadata @@ -869,7 +869,7 @@ void laserdisc_device::init_audio() m_stream = stream_alloc(0, 2, 48000); // allocate audio buffers - m_audiomaxsamples = ((UINT64)m_samplerate * 1000000 + m_fps_times_1million - 1) / m_fps_times_1million; + m_audiomaxsamples = ((uint64_t)m_samplerate * 1000000 + m_fps_times_1million - 1) / m_fps_times_1million; m_audiobufsize = m_audiomaxsamples * 4; m_audiobuffer[0].resize(m_audiobufsize); m_audiobuffer[1].resize(m_audiobufsize); @@ -885,15 +885,15 @@ void laserdisc_device::init_audio() // given color pattern //------------------------------------------------- -void laserdisc_device::fillbitmap_yuy16(bitmap_yuy16 &bitmap, UINT8 yval, UINT8 cr, UINT8 cb) +void laserdisc_device::fillbitmap_yuy16(bitmap_yuy16 &bitmap, uint8_t yval, uint8_t cr, uint8_t cb) { - UINT16 color0 = (yval << 8) | cb; - UINT16 color1 = (yval << 8) | cr; + uint16_t color0 = (yval << 8) | cb; + uint16_t color1 = (yval << 8) | cr; // write 32 bits of color (2 pixels at a time) for (int y = 0; y < bitmap.height(); y++) { - UINT16 *dest = &bitmap.pix16(y); + uint16_t *dest = &bitmap.pix16(y); for (int x = 0; x < bitmap.width() / 2; x++) { *dest++ = color0; @@ -925,14 +925,14 @@ void laserdisc_device::update_slider_pos() // determine how many tracks we covered and advance if (m_attospertrack >= 0) { - INT32 tracks_covered = delta / m_attospertrack; + int32_t tracks_covered = delta / m_attospertrack; add_and_clamp_track(tracks_covered); if (tracks_covered != 0) m_sliderupdate += attotime(0, tracks_covered * m_attospertrack); } else { - INT32 tracks_covered = delta / -m_attospertrack; + int32_t tracks_covered = delta / -m_attospertrack; add_and_clamp_track(-tracks_covered); if (tracks_covered != 0) m_sliderupdate += attotime(0, tracks_covered * -m_attospertrack); @@ -986,10 +986,10 @@ laserdisc_device::frame_data &laserdisc_device::current_frame() void laserdisc_device::read_track_data() { // compute the chdhunk number we are going to read - INT32 chdtrack = m_curtrack - 1 - VIRTUAL_LEAD_IN_TRACKS; - chdtrack = (std::max)(chdtrack, 0); - chdtrack = (std::min)(chdtrack, m_chdtracks - 1); - UINT32 readhunk = chdtrack * 2 + m_fieldnum; + int32_t chdtrack = m_curtrack - 1 - VIRTUAL_LEAD_IN_TRACKS; + chdtrack = (std::max)(chdtrack, 0); + chdtrack = (std::min)(chdtrack, m_chdtracks - 1); + uint32_t readhunk = chdtrack * 2 + m_fieldnum; // cheat and look up the metadata we are about to retrieve vbi_metadata vbidata = { 0 }; @@ -1046,7 +1046,7 @@ void laserdisc_device::read_track_data() // set the VBI data for the new field from our precomputed data if (!m_vbidata.empty()) { - UINT32 vbiframe; + uint32_t vbiframe; vbi_metadata_unpack(&m_metadata[m_fieldnum], &vbiframe, &m_vbidata[readhunk * VBI_PACKED_BYTES]); } @@ -1118,7 +1118,7 @@ void laserdisc_device::process_track_data() if (m_avhuff_config.audio[chnum] == &m_audiobuffer[chnum][0]) { // move data to the end - UINT32 samplesleft = m_audiobufsize - m_audiobufin; + uint32_t samplesleft = m_audiobufsize - m_audiobufin; samplesleft = std::min(samplesleft, m_audiocursamples); memmove(&m_audiobuffer[chnum][m_audiobufin], &m_audiobuffer[chnum][0], samplesleft * 2); diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h index 7816bfa2d21..ada53fdd4d0 100644 --- a/src/devices/machine/laserdsc.h +++ b/src/devices/machine/laserdsc.h @@ -115,7 +115,7 @@ class laserdisc_device; // delegates typedef delegate laserdisc_get_disc_delegate; -typedef delegate laserdisc_audio_delegate; +typedef delegate laserdisc_audio_delegate; // ======================> laserdisc_overlay_config @@ -140,7 +140,7 @@ class laserdisc_device : public device_t, { protected: // construction/destruction - laserdisc_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); + laserdisc_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 ~laserdisc_device(); public: @@ -149,14 +149,14 @@ public: // core control and status bool video_active() { return (!m_videosquelch && current_frame().m_numfields >= 2); } bitmap_yuy16 &get_video() { return (!video_active()) ? m_emptyframe : current_frame().m_visbitmap; } - UINT32 get_field_code(laserdisc_field_code code, bool zero_if_squelched); + uint32_t get_field_code(laserdisc_field_code code, bool zero_if_squelched); // video interface void video_enable(bool enable) { m_videoenable = enable; } void overlay_enable(bool enable) { m_overenable = enable; } // video update callback - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); // configuration bool overlay_configured() const { return (m_overwidth > 0 && m_overheight > 0 && (!m_overupdate_ind16.isnull() || !m_overupdate_rgb32.isnull())); } @@ -166,9 +166,9 @@ public: // static configuration helpers static void static_set_get_disc(device_t &device, laserdisc_get_disc_delegate callback); static void static_set_audio(device_t &device, laserdisc_audio_delegate callback); - static void static_set_overlay(device_t &device, UINT32 width, UINT32 height, screen_update_ind16_delegate update); - static void static_set_overlay(device_t &device, UINT32 width, UINT32 height, screen_update_rgb32_delegate update); - static void static_set_overlay_clip(device_t &device, INT32 minx, INT32 maxx, INT32 miny, INT32 maxy); + static void static_set_overlay(device_t &device, uint32_t width, uint32_t height, screen_update_ind16_delegate update); + static void static_set_overlay(device_t &device, uint32_t width, uint32_t height, screen_update_rgb32_delegate update); + static void static_set_overlay_clip(device_t &device, int32_t minx, int32_t maxx, int32_t miny, int32_t maxy); static void static_set_overlay_position(device_t &device, float posx, float posy); static void static_set_overlay_scale(device_t &device, float scalex, float scaley); static void static_set_overlay_palette(device_t &device, const char *tag); @@ -228,14 +228,14 @@ protected: struct player_state_info { player_state m_state; // current state - INT32 m_substate; // internal sub-state; starts at 0 on any state change - INT32 m_param; // parameter for current state + int32_t m_substate; // internal sub-state; starts at 0 on any state change + int32_t m_param; // parameter for current state attotime m_endtime; // minimum ending time for current state }; // subclass overrides virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) = 0; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) = 0; + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) = 0; virtual void player_overlay(bitmap_yuy16 &bitmap) = 0; // device-level overrides @@ -251,10 +251,10 @@ protected: // subclass helpers void set_audio_squelch(bool squelchleft, bool squelchright) { m_stream->update(); m_audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); } void set_video_squelch(bool squelch) { m_videosquelch = squelch; } - void set_slider_speed(INT32 tracks_per_vsync); - void advance_slider(INT32 numtracks); + void set_slider_speed(int32_t tracks_per_vsync); + void advance_slider(int32_t numtracks); slider_position get_slider_position(); - INT32 generic_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime, player_state_info &curstate); + int32_t generic_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime, player_state_info &curstate); // general helpers bool is_start_of_frame(const vbi_metadata &vbi); @@ -270,16 +270,16 @@ private: { bitmap_yuy16 m_bitmap; // cached bitmap bitmap_yuy16 m_visbitmap; // wrapper around bitmap with only visible lines - UINT8 m_numfields; // number of fields in this frame - INT32 m_lastfield; // last absolute field number + uint8_t m_numfields; // number of fields in this frame + int32_t m_lastfield; // last absolute field number }; // internal helpers void init_disc(); void init_video(); void init_audio(); - void add_and_clamp_track(INT32 delta) { m_curtrack += delta; m_curtrack = std::max(m_curtrack, 1); m_curtrack = std::min(m_curtrack, INT32(m_maxtrack) - 1); } - void fillbitmap_yuy16(bitmap_yuy16 &bitmap, UINT8 yval, UINT8 cr, UINT8 cb); + void add_and_clamp_track(int32_t delta) { m_curtrack += delta; m_curtrack = std::max(m_curtrack, 1); m_curtrack = std::min(m_curtrack, int32_t(m_maxtrack) - 1); } + void fillbitmap_yuy16(bitmap_yuy16 &bitmap, uint8_t yval, uint8_t cr, uint8_t cb); void update_slider_pos(); void vblank_state_changed(screen_device &screen, bool vblank_state); frame_data ¤t_frame(); @@ -293,49 +293,49 @@ private: laserdisc_get_disc_delegate m_getdisc_callback; laserdisc_audio_delegate m_audio_callback; // audio streaming callback laserdisc_overlay_config m_orig_config; // original overlay configuration - UINT32 m_overwidth; // overlay screen width - UINT32 m_overheight; // overlay screen height + uint32_t m_overwidth; // overlay screen width + uint32_t m_overheight; // overlay screen height rectangle m_overclip; // overlay visarea screen_update_ind16_delegate m_overupdate_ind16; // overlay update delegate screen_update_rgb32_delegate m_overupdate_rgb32; // overlay update delegate // disc parameters chd_file * m_disc; // handle to the disc itself - std::vector m_vbidata; // pointer to precomputed VBI data + std::vector m_vbidata; // pointer to precomputed VBI data int m_width; // width of video int m_height; // height of video - UINT32 m_fps_times_1million; // frame rate of video + uint32_t m_fps_times_1million; // frame rate of video int m_samplerate; // audio samplerate int m_readresult; // result of the most recent read - UINT32 m_chdtracks; // number of tracks in the CHD + uint32_t m_chdtracks; // number of tracks in the CHD avhuff_decompress_config m_avhuff_config; // decompression configuration // async operations osd_work_queue * m_work_queue; // work queue - UINT32 m_queued_hunknum; // queued hunk + uint32_t m_queued_hunknum; // queued hunk // core states - UINT8 m_audiosquelch; // audio squelch state: bit 0 = audio 1, bit 1 = audio 2 - UINT8 m_videosquelch; // video squelch state: bit 0 = on/off - UINT8 m_fieldnum; // field number (0 or 1) - INT32 m_curtrack; // current track at this end of this vsync - UINT32 m_maxtrack; // maximum track number + uint8_t m_audiosquelch; // audio squelch state: bit 0 = audio 1, bit 1 = audio 2 + uint8_t m_videosquelch; // video squelch state: bit 0 = on/off + uint8_t m_fieldnum; // field number (0 or 1) + int32_t m_curtrack; // current track at this end of this vsync + uint32_t m_maxtrack; // maximum track number attoseconds_t m_attospertrack; // attoseconds per track, or 0 if not moving attotime m_sliderupdate; // time of last slider update // video data frame_data m_frame[3]; // circular list of frames - UINT8 m_videoindex; // index of the current video buffer + uint8_t m_videoindex; // index of the current video buffer bitmap_yuy16 m_emptyframe; // blank frame // audio data sound_stream * m_stream; - std::vector m_audiobuffer[2]; // buffer for audio samples - UINT32 m_audiobufsize; // size of buffer - UINT32 m_audiobufin; // input index - UINT32 m_audiobufout; // output index - UINT32 m_audiocursamples; // current samples this track - UINT32 m_audiomaxsamples; // maximum samples per track + std::vector m_audiobuffer[2]; // buffer for audio samples + uint32_t m_audiobufsize; // size of buffer + uint32_t m_audiobufin; // input index + uint32_t m_audiobufout; // output index + uint32_t m_audiocursamples; // current samples this track + uint32_t m_audiomaxsamples; // maximum samples per track // metadata vbi_metadata m_metadata[2]; // metadata parsed from the stream, for each field diff --git a/src/devices/machine/latch.cpp b/src/devices/machine/latch.cpp index 55aaf7dfeba..b6e04c6ec97 100644 --- a/src/devices/machine/latch.cpp +++ b/src/devices/machine/latch.cpp @@ -5,7 +5,7 @@ const device_type OUTPUT_LATCH = &device_creator; -output_latch_device::output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +output_latch_device::output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, OUTPUT_LATCH, "Output Latch", tag, owner, clock, "output_latch", __FILE__), m_resolved(false), m_bit0(-1), @@ -39,7 +39,7 @@ void output_latch_device::device_start() save_item(NAME(m_bit7)); } -void output_latch_device::write(UINT8 data) +void output_latch_device::write(uint8_t data) { if (!m_resolved) { diff --git a/src/devices/machine/latch.h b/src/devices/machine/latch.h index 66e08614b66..d4e49ed838b 100644 --- a/src/devices/machine/latch.h +++ b/src/devices/machine/latch.h @@ -30,7 +30,7 @@ class output_latch_device : public device_t { public: - output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_bit0_handler(device_t &device, _Object object) { return downcast(device).m_bit0_handler.set_callback(object); } template static devcb_base &set_bit1_handler(device_t &device, _Object object) { return downcast(device).m_bit1_handler.set_callback(object); } @@ -41,7 +41,7 @@ public: template static devcb_base &set_bit6_handler(device_t &device, _Object object) { return downcast(device).m_bit6_handler.set_callback(object); } template static devcb_base &set_bit7_handler(device_t &device, _Object object) { return downcast(device).m_bit7_handler.set_callback(object); } - void write(UINT8 data); + void write(uint8_t data); DECLARE_WRITE8_MEMBER(write) { write(data); } protected: diff --git a/src/devices/machine/latch8.cpp b/src/devices/machine/latch8.cpp index 9213f8e50c6..f201c6a95d1 100644 --- a/src/devices/machine/latch8.cpp +++ b/src/devices/machine/latch8.cpp @@ -11,16 +11,16 @@ #include "emu.h" #include "latch8.h" -void latch8_device::update(UINT8 new_val, UINT8 mask) +void latch8_device::update(uint8_t new_val, uint8_t mask) { - UINT8 old_val = m_value; + uint8_t old_val = m_value; m_value = (m_value & ~mask) | (new_val & mask); if (m_has_write) { int i; - UINT8 changed = old_val ^ m_value; + uint8_t changed = old_val ^ m_value; for (i=0; i<8; i++) if (((changed & (1<generic_space(), m_offset[i] , (m_value >> i) & 1); @@ -37,8 +37,8 @@ void latch8_device::update(UINT8 new_val, UINT8 mask) TIMER_CALLBACK_MEMBER( latch8_device::timerproc ) { - UINT8 new_val = param & 0xFF; - UINT8 mask = param >> 8; + uint8_t new_val = param & 0xFF; + uint8_t mask = param >> 8; update( new_val, mask); } @@ -47,7 +47,7 @@ TIMER_CALLBACK_MEMBER( latch8_device::timerproc ) READ8_MEMBER( latch8_device::read ) { - UINT8 res; + uint8_t res; assert(offset == 0); @@ -92,7 +92,7 @@ WRITE8_MEMBER( latch8_device::reset_w ) /* read bit x */ /* return (latch >> x) & 0x01 */ -UINT8 latch8_device::bitx_r( offs_t offset, int bit) +uint8_t latch8_device::bitx_r( offs_t offset, int bit) { assert( offset == 0); @@ -120,10 +120,10 @@ READ8_MEMBER( latch8_device::bit7_q_r) { return bitx_r(offset, 7) ^ 1; } /* write bit x from data into bit determined by offset */ /* latch = (latch & ~(1<> x) & 0x01) << offset) */ -void latch8_device::bitx_w(int bit, offs_t offset, UINT8 data) +void latch8_device::bitx_w(int bit, offs_t offset, uint8_t data) { - UINT8 mask = (1<> bit) & 0x01) << offset); + uint8_t mask = (1<> bit) & 0x01) << offset); assert( offset < 8); @@ -145,7 +145,7 @@ WRITE8_MEMBER( latch8_device::bit7_w ) { bitx_w(7, offset, data); } const device_type LATCH8 = &device_creator; -latch8_device::latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +latch8_device::latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, LATCH8, "8 bit latch", tag, owner, clock, "latch8", __FILE__), m_value(0), m_has_write(0), diff --git a/src/devices/machine/latch8.h b/src/devices/machine/latch8.h index dce9ea6f87a..6d9ce374558 100644 --- a/src/devices/machine/latch8.h +++ b/src/devices/machine/latch8.h @@ -27,7 +27,7 @@ class latch8_device : public device_t { public: - latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); /* write & read full byte */ @@ -75,27 +75,27 @@ public: DECLARE_WRITE8_MEMBER( bit6_w ); DECLARE_WRITE8_MEMBER( bit7_w ); - static void set_maskout(device_t &device, UINT32 maskout) { downcast(device).m_maskout = maskout; } - static void set_xorvalue(device_t &device, UINT32 xorvalue) { downcast(device).m_xorvalue = xorvalue; } - static void set_nosync(device_t &device, UINT32 nosync) { downcast(device).m_nosync = nosync; } - - template static devcb_base &set_write_0(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[0] = offset; return downcast(device).m_write_0.set_callback(object); } - template static devcb_base &set_write_1(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[1] = offset; return downcast(device).m_write_1.set_callback(object); } - template static devcb_base &set_write_2(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[2] = offset; return downcast(device).m_write_2.set_callback(object); } - template static devcb_base &set_write_3(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[3] = offset; return downcast(device).m_write_3.set_callback(object); } - template static devcb_base &set_write_4(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[4] = offset; return downcast(device).m_write_4.set_callback(object); } - template static devcb_base &set_write_5(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[5] = offset; return downcast(device).m_write_5.set_callback(object); } - template static devcb_base &set_write_6(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[6] = offset; return downcast(device).m_write_6.set_callback(object); } - template static devcb_base &set_write_7(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[7] = offset; return downcast(device).m_write_7.set_callback(object); } - - template static devcb_base &set_read_0(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[0] = offset; return downcast(device).m_read_0.set_callback(object); } - template static devcb_base &set_read_1(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[1] = offset; return downcast(device).m_read_1.set_callback(object); } - template static devcb_base &set_read_2(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[2] = offset; return downcast(device).m_read_2.set_callback(object); } - template static devcb_base &set_read_3(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[3] = offset; return downcast(device).m_read_3.set_callback(object); } - template static devcb_base &set_read_4(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[4] = offset; return downcast(device).m_read_4.set_callback(object); } - template static devcb_base &set_read_5(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[5] = offset; return downcast(device).m_read_5.set_callback(object); } - template static devcb_base &set_read_6(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[6] = offset; return downcast(device).m_read_6.set_callback(object); } - template static devcb_base &set_read_7(device_t &device, _Object object, UINT32 offset) { downcast(device).m_offset[7] = offset; return downcast(device).m_read_7.set_callback(object); } + static void set_maskout(device_t &device, uint32_t maskout) { downcast(device).m_maskout = maskout; } + static void set_xorvalue(device_t &device, uint32_t xorvalue) { downcast(device).m_xorvalue = xorvalue; } + static void set_nosync(device_t &device, uint32_t nosync) { downcast(device).m_nosync = nosync; } + + template static devcb_base &set_write_0(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[0] = offset; return downcast(device).m_write_0.set_callback(object); } + template static devcb_base &set_write_1(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[1] = offset; return downcast(device).m_write_1.set_callback(object); } + template static devcb_base &set_write_2(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[2] = offset; return downcast(device).m_write_2.set_callback(object); } + template static devcb_base &set_write_3(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[3] = offset; return downcast(device).m_write_3.set_callback(object); } + template static devcb_base &set_write_4(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[4] = offset; return downcast(device).m_write_4.set_callback(object); } + template static devcb_base &set_write_5(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[5] = offset; return downcast(device).m_write_5.set_callback(object); } + template static devcb_base &set_write_6(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[6] = offset; return downcast(device).m_write_6.set_callback(object); } + template static devcb_base &set_write_7(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[7] = offset; return downcast(device).m_write_7.set_callback(object); } + + template static devcb_base &set_read_0(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[0] = offset; return downcast(device).m_read_0.set_callback(object); } + template static devcb_base &set_read_1(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[1] = offset; return downcast(device).m_read_1.set_callback(object); } + template static devcb_base &set_read_2(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[2] = offset; return downcast(device).m_read_2.set_callback(object); } + template static devcb_base &set_read_3(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[3] = offset; return downcast(device).m_read_3.set_callback(object); } + template static devcb_base &set_read_4(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[4] = offset; return downcast(device).m_read_4.set_callback(object); } + template static devcb_base &set_read_5(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[5] = offset; return downcast(device).m_read_5.set_callback(object); } + template static devcb_base &set_read_6(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[6] = offset; return downcast(device).m_read_6.set_callback(object); } + template static devcb_base &set_read_7(device_t &device, _Object object, uint32_t offset) { downcast(device).m_offset[7] = offset; return downcast(device).m_read_7.set_callback(object); } protected: // device-level overrides @@ -104,19 +104,19 @@ protected: virtual void device_validity_check(validity_checker &valid) const override; TIMER_CALLBACK_MEMBER( timerproc ); - void update(UINT8 new_val, UINT8 mask); - inline UINT8 bitx_r( offs_t offset, int bit); - inline void bitx_w(int bit, offs_t offset, UINT8 data); + void update(uint8_t new_val, uint8_t mask); + inline uint8_t bitx_r( offs_t offset, int bit); + inline void bitx_w(int bit, offs_t offset, uint8_t data); private: // internal state - UINT8 m_value; - UINT8 m_has_write; - UINT8 m_has_read; + uint8_t m_value; + uint8_t m_has_write; + uint8_t m_has_read; /* only for byte reads, does not affect bit reads and node_map */ - UINT32 m_maskout; - UINT32 m_xorvalue; /* after mask */ - UINT32 m_nosync; + uint32_t m_maskout; + uint32_t m_xorvalue; /* after mask */ + uint32_t m_nosync; devcb_write8 m_write_0; devcb_write8 m_write_1; @@ -136,7 +136,7 @@ private: devcb_read8 m_read_6; devcb_read8 m_read_7; - UINT32 m_offset[8]; + uint32_t m_offset[8]; }; extern const device_type LATCH8; diff --git a/src/devices/machine/lc89510.cpp b/src/devices/machine/lc89510.cpp index 9ad9f4cb37a..daa1498085f 100644 --- a/src/devices/machine/lc89510.cpp +++ b/src/devices/machine/lc89510.cpp @@ -11,7 +11,7 @@ const device_type LC89510 = &device_creator; -lc89510_device::lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +lc89510_device::lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, LC89510, "lc89510_device", tag, owner, clock, "lc89510", __FILE__) { } diff --git a/src/devices/machine/lc89510.h b/src/devices/machine/lc89510.h index 0d7ebedcf71..a254a40928b 100644 --- a/src/devices/machine/lc89510.h +++ b/src/devices/machine/lc89510.h @@ -6,7 +6,7 @@ class lc89510_device : public device_t { public: - lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/ldp1000.cpp b/src/devices/machine/ldp1000.cpp index 5e04009b1fa..2c9e8535a34 100644 --- a/src/devices/machine/ldp1000.cpp +++ b/src/devices/machine/ldp1000.cpp @@ -38,7 +38,7 @@ const device_type SONY_LDP1000 = &device_creator; // ldp1000_device - constructor //------------------------------------------------- -sony_ldp1000_device::sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sony_ldp1000_device::sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, SONY_LDP1000, "Sony LDP-1000", tag, owner, clock, "ldp1000", __FILE__) { } @@ -104,7 +104,7 @@ void sony_ldp1000_device::player_vsync(const vbi_metadata &vbi, int fieldnum, co // the first visible line of the frame //------------------------------------------------- -INT32 sony_ldp1000_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +int32_t sony_ldp1000_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { //printf("%d update\n",fieldnum); @@ -118,7 +118,7 @@ INT32 sony_ldp1000_device::player_update(const vbi_metadata &vbi, int fieldnum, READ8_MEMBER( sony_ldp1000_device::status_r ) { - UINT8 res = m_status; + uint8_t res = m_status; m_status = stat_undef; return res; } @@ -131,7 +131,7 @@ void sony_ldp1000_device::set_new_player_state(ldp1000_player_state which) } // TODO: probably don't even need a size ... -void sony_ldp1000_device::set_new_player_bcd(UINT8 data) +void sony_ldp1000_device::set_new_player_bcd(uint8_t data) { m_internal_bcd[m_index_state] = data; m_index_state ++; @@ -141,9 +141,9 @@ void sony_ldp1000_device::set_new_player_bcd(UINT8 data) m_status = stat_ack; } -UINT32 sony_ldp1000_device::bcd_to_raw() +uint32_t sony_ldp1000_device::bcd_to_raw() { - UINT32 res = 0; + uint32_t res = 0; for(int i=0;i<6;i++) res |= (m_internal_bcd[i] & 0xf) << i*4; return res; @@ -151,7 +151,7 @@ UINT32 sony_ldp1000_device::bcd_to_raw() void sony_ldp1000_device::exec_enter_cmd() { - //const UINT32 saved_frame = bcd_to_raw(); + //const uint32_t saved_frame = bcd_to_raw(); switch(m_player_state) { diff --git a/src/devices/machine/ldp1000.h b/src/devices/machine/ldp1000.h index 6d6f94a62c3..e5fc53f0d7e 100644 --- a/src/devices/machine/ldp1000.h +++ b/src/devices/machine/ldp1000.h @@ -34,7 +34,7 @@ class sony_ldp1000_device : public laserdisc_device { public: // construction/destruction - sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations TODO: both actually protected DECLARE_WRITE8_MEMBER( command_w ); @@ -48,7 +48,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; virtual void player_overlay(bitmap_yuy16 &bitmap) override { } enum ldp1000_status { @@ -68,17 +68,17 @@ protected: }; private: - UINT8 m_command; + uint8_t m_command; ldp1000_status m_status; ldp1000_player_state m_player_state; bool m_audio_enable[2]; // TODO: sub-class into a specific internal player state void set_new_player_state(ldp1000_player_state which); - void set_new_player_bcd(UINT8 data); - UINT32 bcd_to_raw(); + void set_new_player_bcd(uint8_t data); + uint32_t bcd_to_raw(); void exec_enter_cmd(); - UINT8 m_internal_bcd[0x10]; - UINT8 m_index_state; + uint8_t m_internal_bcd[0x10]; + uint8_t m_index_state; }; diff --git a/src/devices/machine/ldp1450.cpp b/src/devices/machine/ldp1450.cpp index 2abf465f074..f30a154f013 100644 --- a/src/devices/machine/ldp1450.cpp +++ b/src/devices/machine/ldp1450.cpp @@ -45,7 +45,7 @@ const device_type SONY_LDP1450 = &device_creator; // ldp1450_device - constructor //------------------------------------------------- -sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, SONY_LDP1450, "Sony LDP-1450", tag, owner, clock, "ldp1450", __FILE__) { } @@ -115,7 +115,7 @@ void sony_ldp1450_device::player_vsync(const vbi_metadata &vbi, int fieldnum, co // the first visible line of the frame //------------------------------------------------- -INT32 sony_ldp1450_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +int32_t sony_ldp1450_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { //printf("%d update\n",fieldnum); @@ -133,7 +133,7 @@ void sony_ldp1450_device::set_new_player_state(ldp1450_player_state which) m_index_state = 0; } -void sony_ldp1450_device::set_new_player_bcd(UINT8 data) +void sony_ldp1450_device::set_new_player_bcd(uint8_t data) { printf("Frame data BCD %02x\n",data); @@ -145,9 +145,9 @@ void sony_ldp1450_device::set_new_player_bcd(UINT8 data) m_status = LDP_STAT_ACK; } -UINT32 sony_ldp1450_device::bcd_to_raw() +uint32_t sony_ldp1450_device::bcd_to_raw() { - UINT32 res = 0; + uint32_t res = 0; for(int i=0;i<6;i++) res |= (m_internal_bcd[i] & 0xf) << i*4; return res; @@ -155,7 +155,7 @@ UINT32 sony_ldp1450_device::bcd_to_raw() void sony_ldp1450_device::exec_enter_cmd() { - const UINT32 saved_frame = bcd_to_raw(); + const uint32_t saved_frame = bcd_to_raw(); switch(m_player_state) { @@ -175,7 +175,7 @@ void sony_ldp1450_device::exec_enter_cmd() m_player_state = player_standby; } -void sony_ldp1450_device::command_w(UINT8 data) +void sony_ldp1450_device::command_w(uint8_t data) { printf("CMD %02x\n",data); m_command = data; @@ -327,7 +327,7 @@ void sony_ldp1450_device::command_w(UINT8 data) break; case 0x60: /* Addr Inq (get current frame number) */ - for (UINT8 & elem : m_internal_bcd) + for (uint8_t & elem : m_internal_bcd) { printf("Return frame %02x\n",elem); m_status = elem; diff --git a/src/devices/machine/ldp1450.h b/src/devices/machine/ldp1450.h index 9380ede4cfd..efeefcfa044 100644 --- a/src/devices/machine/ldp1450.h +++ b/src/devices/machine/ldp1450.h @@ -33,11 +33,11 @@ class sony_ldp1450_device : public laserdisc_device { public: // construction/destruction - sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations TODO: both actually protected - void command_w(UINT8 data); - UINT8 status_r() const { return m_status; } + void command_w(uint8_t data); + uint8_t status_r() const { return m_status; } protected: // device-level overrides @@ -47,14 +47,14 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; virtual void player_overlay(bitmap_yuy16 &bitmap) override { } - UINT8 m_ld_frame_index; - UINT8 m_ld_frame[5]; - UINT8 m_ld_command_current_byte; - UINT8 m_ld_command_to_send[5]; - UINT8 m_ld_command_total_bytes; + uint8_t m_ld_frame_index; + uint8_t m_ld_frame[5]; + uint8_t m_ld_command_current_byte; + uint8_t m_ld_command_to_send[5]; + uint8_t m_ld_command_total_bytes; enum LD_INPUT_STATE { @@ -77,16 +77,16 @@ protected: }; private: - UINT8 m_command; - UINT8 m_status; + uint8_t m_command; + uint8_t m_status; ldp1450_player_state m_player_state; bool m_audio_enable[2]; void set_new_player_state(ldp1450_player_state which); - void set_new_player_bcd(UINT8 data); - UINT32 bcd_to_raw(); + void set_new_player_bcd(uint8_t data); + uint32_t bcd_to_raw(); void exec_enter_cmd(); - UINT8 m_internal_bcd[0x10]; - UINT8 m_index_state; + uint8_t m_internal_bcd[0x10]; + uint8_t m_index_state; }; diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp index 12518a3ded9..e90b2df40e1 100644 --- a/src/devices/machine/ldpr8210.cpp +++ b/src/devices/machine/ldpr8210.cpp @@ -73,7 +73,7 @@ const device_type SIMUTREK_SPECIAL = &device_creator; // bitmaps for the characters -static const UINT8 text_bitmap[0x40][7] = +static const uint8_t text_bitmap[0x40][7] = { { 0 }, // @ { 0x20,0x50,0x88,0x88,0xf8,0x88,0x88 }, // A @@ -179,7 +179,7 @@ ROM_END // pioneer_pr8210_device - constructor //------------------------------------------------- -pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, PIONEER_PR8210, "Pioneer PR-8210", tag, owner, clock, "pr8210", __FILE__), m_control(0), m_lastcommand(0), @@ -195,7 +195,7 @@ pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, cons { } -pioneer_pr8210_device::pioneer_pr8210_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) +pioneer_pr8210_device::pioneer_pr8210_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) : laserdisc_device(mconfig, type, name, tag, owner, clock, shortname, source), m_control(0), m_lastcommand(0), @@ -217,10 +217,10 @@ pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, devi // line is toggled //------------------------------------------------- -void pioneer_pr8210_device::control_w(UINT8 data) +void pioneer_pr8210_device::control_w(uint8_t data) { // set the new value and remember the last - UINT8 prev = m_control; + uint8_t prev = m_control; m_control = data; // handle rising edge @@ -258,7 +258,7 @@ void pioneer_pr8210_device::control_w(UINT8 data) if ((m_accumulator & 0x383) == 0x80) { // data is stored to the PIA in bit-reverse order - UINT8 newcommand = (m_accumulator >> 2) & 0x1f; + uint8_t newcommand = (m_accumulator >> 2) & 0x1f; m_pia.porta = BITSWAP8(newcommand, 0,1,2,3,4,5,6,7); // the MCU logic requires a 0 to execute many commands; however, nobody @@ -328,7 +328,7 @@ void pioneer_pr8210_device::device_timer(emu_timer &timer, device_timer_id id, i // logging if (LOG_VBLANK_VBI) { - UINT32 line1718 = get_field_code(LASERDISC_CODE_LINE1718, FALSE); + uint32_t line1718 = get_field_code(LASERDISC_CODE_LINE1718, FALSE); if ((line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) printf("%3d:VBI(%05d)\n", screen().vpos(), VBI_CAV_PICTURE(line1718)); else @@ -340,8 +340,8 @@ void pioneer_pr8210_device::device_timer(emu_timer &timer, device_timer_id id, i m_pia.vbi2 = 0xff; if (focus_on() && laser_on()) { - UINT32 line16 = get_field_code(LASERDISC_CODE_LINE16, FALSE); - UINT32 line1718 = get_field_code(LASERDISC_CODE_LINE1718, FALSE); + uint32_t line16 = get_field_code(LASERDISC_CODE_LINE16, FALSE); + uint32_t line1718 = get_field_code(LASERDISC_CODE_LINE1718, FALSE); if (line1718 == VBI_CODE_LEADIN) m_pia.vbi1 &= ~0x01; if (line1718 == VBI_CODE_LEADOUT) @@ -432,7 +432,7 @@ void pioneer_pr8210_device::player_vsync(const vbi_metadata &vbi, int fieldnum, // first visible line of the frame //------------------------------------------------- -INT32 pioneer_pr8210_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +int32_t pioneer_pr8210_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // logging if (LOG_VBLANK_VBI) @@ -481,7 +481,7 @@ void pioneer_pr8210_device::player_overlay(bitmap_yuy16 &bitmap) READ8_MEMBER( pioneer_pr8210_device::i8049_pia_r ) { - UINT8 result = 0xff; + uint8_t result = 0xff; switch (offset) { // (20-26) 7 characters for the chapter/frame @@ -529,7 +529,7 @@ READ8_MEMBER( pioneer_pr8210_device::i8049_pia_r ) WRITE8_MEMBER( pioneer_pr8210_device::i8049_pia_w ) { - UINT8 value; + uint8_t value; switch (offset) { // (20-30) 17 characters for the display @@ -611,7 +611,7 @@ READ8_MEMBER( pioneer_pr8210_device::i8049_bus_r ) $01 = (in) SLOW TIMER OUT */ - UINT8 result = 0x00; + uint8_t result = 0x00; // bus bit 6: slider position limit detector, inside and outside slider_position sliderpos = get_slider_position(); @@ -656,7 +656,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_port1_w ) */ // set the new value - UINT8 prev = m_i8049_port1; + uint8_t prev = m_i8049_port1; m_i8049_port1 = data; // bit 7 selects the direction of slider movement for JUMP TRG and scanning @@ -713,7 +713,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_port2_w ) */ // set the new value - UINT8 prev = m_i8049_port2; + uint8_t prev = m_i8049_port2; m_i8049_port2 = data; // on the falling edge of bit 5, start the slow timer @@ -756,7 +756,7 @@ READ8_MEMBER( pioneer_pr8210_device::i8049_t1_r ) // characters //------------------------------------------------- -void pioneer_pr8210_device::overlay_draw_group(bitmap_yuy16 &bitmap, const UINT8 *text, int count, float xstart) +void pioneer_pr8210_device::overlay_draw_group(bitmap_yuy16 &bitmap, const uint8_t *text, int count, float xstart) { // rease the background overlay_erase(bitmap, xstart, xstart + ((OVERLAY_X_PIXELS + 1) * count + 1) * OVERLAY_PIXEL_WIDTH); @@ -779,19 +779,19 @@ void pioneer_pr8210_device::overlay_draw_group(bitmap_yuy16 &bitmap, const UINT8 void pioneer_pr8210_device::overlay_erase(bitmap_yuy16 &bitmap, float xstart, float xend) { - UINT32 xmin = (UINT32)(xstart * 256.0f * float(bitmap.width())); - UINT32 xmax = (UINT32)(xend * 256.0f * float(bitmap.width())); + uint32_t xmin = (uint32_t)(xstart * 256.0f * float(bitmap.width())); + uint32_t xmax = (uint32_t)(xend * 256.0f * float(bitmap.width())); - for (UINT32 y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++) + for (uint32_t y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++) { - UINT16 *dest = &bitmap.pix16(y, xmin >> 8); - UINT16 ymax = *dest >> 8; - UINT16 ymin = ymax * 3 / 8; - UINT16 yres = ymin + ((ymax - ymin) * (xmin & 0xff)) / 256; + uint16_t *dest = &bitmap.pix16(y, xmin >> 8); + uint16_t ymax = *dest >> 8; + uint16_t ymin = ymax * 3 / 8; + uint16_t yres = ymin + ((ymax - ymin) * (xmin & 0xff)) / 256; *dest = (yres << 8) | (*dest & 0xff); dest++; - for (UINT32 x = (xmin | 0xff) + 1; x < xmax; x += 0x100) + for (uint32_t x = (xmin | 0xff) + 1; x < xmax; x += 0x100) { yres = (*dest >> 8) * 3 / 8; *dest = (yres << 8) | (*dest & 0xff); @@ -812,32 +812,32 @@ void pioneer_pr8210_device::overlay_erase(bitmap_yuy16 &bitmap, float xstart, fl // of the text overlay //------------------------------------------------- -void pioneer_pr8210_device::overlay_draw_char(bitmap_yuy16 &bitmap, UINT8 ch, float xstart) +void pioneer_pr8210_device::overlay_draw_char(bitmap_yuy16 &bitmap, uint8_t ch, float xstart) { - UINT32 xminbase = (UINT32)(xstart * 256.0f * float(bitmap.width())); - UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * float(bitmap.width())); + uint32_t xminbase = (uint32_t)(xstart * 256.0f * float(bitmap.width())); + uint32_t xsize = (uint32_t)(OVERLAY_PIXEL_WIDTH * 256.0f * float(bitmap.width())); // iterate over pixels - const UINT8 *chdataptr = &text_bitmap[ch & 0x3f][0]; - for (UINT32 y = 0; y < OVERLAY_Y_PIXELS; y++) + const uint8_t *chdataptr = &text_bitmap[ch & 0x3f][0]; + for (uint32_t y = 0; y < OVERLAY_Y_PIXELS; y++) { - UINT8 chdata = *chdataptr++; + uint8_t chdata = *chdataptr++; - for (UINT32 x = 0; x < OVERLAY_X_PIXELS; x++, chdata <<= 1) + for (uint32_t x = 0; x < OVERLAY_X_PIXELS; x++, chdata <<= 1) if (chdata & 0x80) { - UINT32 xmin = xminbase + x * xsize; - UINT32 xmax = xmin + xsize; - for (UINT32 yy = 0; yy < OVERLAY_PIXEL_HEIGHT; yy++) + uint32_t xmin = xminbase + x * xsize; + uint32_t xmax = xmin + xsize; + for (uint32_t yy = 0; yy < OVERLAY_PIXEL_HEIGHT; yy++) { - UINT16 *dest = &bitmap.pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8); - UINT16 ymax = 0xff; - UINT16 ymin = *dest >> 8; - UINT16 yres = ymin + ((ymax - ymin) * (~xmin & 0xff)) / 256; + uint16_t *dest = &bitmap.pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8); + uint16_t ymax = 0xff; + uint16_t ymin = *dest >> 8; + uint16_t yres = ymin + ((ymax - ymin) * (~xmin & 0xff)) / 256; *dest = (yres << 8) | (*dest & 0xff); dest++; - for (UINT32 xx = (xmin | 0xff) + 1; xx < xmax; xx += 0x100) + for (uint32_t xx = (xmin | 0xff) + 1; xx < xmax; xx += 0x100) *dest++ = 0xf080; ymax = 0xff; @@ -889,7 +889,7 @@ ROM_END // simutrek_special_device - constructor //------------------------------------------------- -simutrek_special_device::simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +simutrek_special_device::simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pioneer_pr8210_device(mconfig, SIMUTREK_SPECIAL, "Simutrek Modified PR-8210", tag, owner, clock, "simutrek", __FILE__), m_i8748_cpu(*this, "simutrek"), m_audio_squelch(0), @@ -907,7 +907,7 @@ simutrek_special_device::simutrek_special_device(const machine_config &mconfig, // port is written to //------------------------------------------------- -void simutrek_special_device::data_w(UINT8 data) +void simutrek_special_device::data_w(uint8_t data) { synchronize(TID_LATCH_DATA, data); if (LOG_SIMUTREK) @@ -1055,7 +1055,7 @@ READ8_MEMBER( simutrek_special_device::i8748_port2_r ) WRITE8_MEMBER( simutrek_special_device::i8748_port2_w ) { // update stat - UINT8 prev = m_i8748_port2; + uint8_t prev = m_i8748_port2; m_i8748_port2 = data; // bit $20 goes to the serial line diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h index 3cca97ce7b7..b16c0ffb64b 100644 --- a/src/devices/machine/ldpr8210.h +++ b/src/devices/machine/ldpr8210.h @@ -45,15 +45,15 @@ extern const device_type SIMUTREK_SPECIAL; class pioneer_pia { public: - UINT8 frame[7]; // (20-26) 7 characters for the chapter/frame - UINT8 text[17]; // (20-30) 17 characters for the display - UINT8 control; // (40) control lines - UINT8 latchdisplay; // flag: set if the display was latched - UINT8 portb; // (60) port B value (LEDs) - UINT8 display; // (80) display enable - UINT8 porta; // (A0) port A value (from serial decoder) - UINT8 vbi1; // (C0) VBI decoding state 1 - UINT8 vbi2; // (E0) VBI decoding state 2 + uint8_t frame[7]; // (20-26) 7 characters for the chapter/frame + uint8_t text[17]; // (20-30) 17 characters for the display + uint8_t control; // (40) control lines + uint8_t latchdisplay; // flag: set if the display was latched + uint8_t portb; // (60) port B value (LEDs) + uint8_t display; // (80) display enable + uint8_t porta; // (A0) port A value (from serial decoder) + uint8_t vbi1; // (C0) VBI decoding state 1 + uint8_t vbi2; // (E0) VBI decoding state 2 }; @@ -64,11 +64,11 @@ class pioneer_pr8210_device : public laserdisc_device { public: // construction/destruction - pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - pioneer_pr8210_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); + pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pioneer_pr8210_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); // input and output - void control_w(UINT8 data); + void control_w(uint8_t data); protected: // timer IDs @@ -88,7 +88,7 @@ protected: // subclass overrides virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; virtual void player_overlay(bitmap_yuy16 &bitmap) override; // internal helpers @@ -111,14 +111,14 @@ public: protected: // internal overlay helpers - void overlay_draw_group(bitmap_yuy16 &bitmap, const UINT8 *text, int count, float xstart); + void overlay_draw_group(bitmap_yuy16 &bitmap, const uint8_t *text, int count, float xstart); void overlay_erase(bitmap_yuy16 &bitmap, float xstart, float xend); - void overlay_draw_char(bitmap_yuy16 &bitmap, UINT8 ch, float xstart); + void overlay_draw_char(bitmap_yuy16 &bitmap, uint8_t ch, float xstart); // internal state - UINT8 m_control; // control line state - UINT8 m_lastcommand; // last command seen - UINT16 m_accumulator; // bit accumulator + uint8_t m_control; // control line state + uint8_t m_lastcommand; // last command seen + uint16_t m_accumulator; // bit accumulator attotime m_lastcommandtime; // time of the last command attotime m_lastbittime; // time of last bit received attotime m_firstbittime; // time of first bit in command @@ -128,8 +128,8 @@ protected: attotime m_slowtrg; // time of the last SLOW TRG pioneer_pia m_pia; // PIA state bool m_vsync; // live VSYNC state - UINT8 m_i8049_port1; // 8049 port 1 state - UINT8 m_i8049_port2; // 8049 port 2 state + uint8_t m_i8049_port1; // 8049 port 1 state + uint8_t m_i8049_port2; // 8049 port 2 state }; @@ -139,12 +139,12 @@ class simutrek_special_device : public pioneer_pr8210_device { public: // construction/destruction - simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // input and output - void data_w(UINT8 data); - UINT8 ready_r() const { return !m_data_ready; } - UINT8 status_r() const { return ((m_i8748_port2 & 0x03) == 0x03) ? ASSERT_LINE : CLEAR_LINE; } + void data_w(uint8_t data); + uint8_t ready_r() const { return !m_data_ready; } + uint8_t status_r() const { return ((m_i8748_port2 & 0x03) == 0x03) ? ASSERT_LINE : CLEAR_LINE; } // external controls void set_external_audio_squelch(int state); @@ -181,12 +181,12 @@ public: protected: // internal state required_device m_i8748_cpu; - UINT8 m_audio_squelch; // audio squelch value - UINT8 m_data; // parallel data for simutrek + uint8_t m_audio_squelch; // audio squelch value + uint8_t m_data; // parallel data for simutrek bool m_data_ready; // ready flag for simutrek data - UINT8 m_i8748_port2; // 8748 port 2 state - UINT8 m_controlnext; // latch to control next pair of fields - UINT8 m_controlthis; // latched value for our control over the current pair of fields + uint8_t m_i8748_port2; // 8748 port 2 state + uint8_t m_controlnext; // latch to control next pair of fields + uint8_t m_controlthis; // latched value for our control over the current pair of fields }; diff --git a/src/devices/machine/ldstub.h b/src/devices/machine/ldstub.h index e7ffe1898cd..41d638f42ae 100644 --- a/src/devices/machine/ldstub.h +++ b/src/devices/machine/ldstub.h @@ -46,20 +46,20 @@ class pioneer_pr7820_device : public laserdisc_device { public: // construction/destruction - pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, PIONEER_PR7820, "Pioneer PR-7820", tag, owner, clock, "pr7820", __FILE__) { } // input/output - UINT8 data_available_r() { return CLEAR_LINE; } - UINT8 ready_r() { return ASSERT_LINE; } - UINT8 data_r() { return 0; } - void data_w(UINT8 data) { } - void enter_w(UINT8 data) { } + uint8_t data_available_r() { return CLEAR_LINE; } + uint8_t ready_r() { return ASSERT_LINE; } + uint8_t data_r() { return 0; } + void data_w(uint8_t data) { } + void enter_w(uint8_t data) { } protected: // subclass overrides virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { } - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { return fieldnum; } + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { return fieldnum; } virtual void player_overlay(bitmap_yuy16 &bitmap) override { } }; @@ -70,18 +70,18 @@ class phillips_22vp932_device : public laserdisc_device { public: // construction/destruction - phillips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + phillips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, PHILLIPS_22VP932, "Phillips 22VP932", tag, owner, clock, "22vp932", __FILE__) { } // input/output - UINT8 data_r() { return 0; } - void data_w(UINT8 data) { } - void enter_w(UINT8 data) { } + uint8_t data_r() { return 0; } + void data_w(uint8_t data) { } + void enter_w(uint8_t data) { } protected: // subclass overrides virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { } - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { return fieldnum; } + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override { return fieldnum; } virtual void player_overlay(bitmap_yuy16 &bitmap) override { } }; diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp index 81947c2b73f..e1b4f8e1a70 100644 --- a/src/devices/machine/ldv1000.cpp +++ b/src/devices/machine/ldv1000.cpp @@ -121,7 +121,7 @@ ROM_END // pioneer_ldv1000_device - constructor //------------------------------------------------- -pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, PIONEER_LDV1000, "Pioneer LD-V1000", tag, owner, clock, "ldv1000", __FILE__), m_z80_cpu(*this, "ldv1000"), m_z80_ctc(*this, "ldvctc"), @@ -148,7 +148,7 @@ pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, co // LD-V1000 //------------------------------------------------- -void pioneer_ldv1000_device::data_w(UINT8 data) +void pioneer_ldv1000_device::data_w(uint8_t data) { m_command = data; if (LOG_COMMANDS) @@ -160,7 +160,7 @@ void pioneer_ldv1000_device::data_w(UINT8 data) // enter_w - set the state of the ENTER strobe //------------------------------------------------- -void pioneer_ldv1000_device::enter_w(UINT8 data) +void pioneer_ldv1000_device::enter_w(uint8_t data) { } @@ -234,7 +234,7 @@ void pioneer_ldv1000_device::device_timer(emu_timer &timer, device_timer_id id, case TID_VBI_DATA_FETCH: { // appears to return data in reverse order - UINT32 lines[3]; + uint32_t lines[3]; lines[0] = get_field_code(LASERDISC_CODE_LINE1718, false); lines[1] = get_field_code(LASERDISC_CODE_LINE17, false); lines[2] = get_field_code(LASERDISC_CODE_LINE16, false); @@ -246,8 +246,8 @@ void pioneer_ldv1000_device::device_timer(emu_timer &timer, device_timer_id id, // loop over lines for (int line = 0; line < 3; line++) { - UINT8 *dest = &m_vbi[line * 7]; - UINT32 data = lines[line]; + uint8_t *dest = &m_vbi[line * 7]; + uint32_t data = lines[line]; // the logic only processes leadin/leadout/frame number codes if (data == VBI_CODE_LEADIN || data == VBI_CODE_LEADOUT || (data & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) @@ -328,7 +328,7 @@ void pioneer_ldv1000_device::player_vsync(const vbi_metadata &vbi, int fieldnum, // the first visible line of the frame //------------------------------------------------- -INT32 pioneer_ldv1000_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +int32_t pioneer_ldv1000_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { if (LOG_FRAMES_SEEN) { @@ -389,7 +389,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_w ) READ8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_r ) { // reads from offset 3 constitute actual reads from the display and decoder chips - UINT8 result = 0; + uint8_t result = 0; if (offset == 3) { // selection 4 represents the VBI data reading @@ -411,7 +411,7 @@ READ8_MEMBER( pioneer_ldv1000_device::z80_decoder_display_port_r ) READ8_MEMBER( pioneer_ldv1000_device::z80_controller_r ) { // note that this is a cheesy implementation; the real thing relies on exquisite timing - UINT8 result = m_command ^ 0xff; + uint8_t result = m_command ^ 0xff; m_command = 0xff; return result; } @@ -467,7 +467,7 @@ READ8_MEMBER( pioneer_ldv1000_device::ppi0_portc_r ) $80 = DUMP (N20-1) -- code reads the state and waits for it to change */ - UINT8 result = 0x00; + uint8_t result = 0x00; if (!m_vsync) result |= 0x10; if (!m_vbiready) @@ -491,7 +491,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::ppi0_portc_w ) */ // set the new value - UINT8 prev = m_portc0; + uint8_t prev = m_portc0; m_portc0 = data; if (LOG_PORT_IO && ((data ^ prev) & 0x0f) != 0) { @@ -531,7 +531,7 @@ READ8_MEMBER( pioneer_ldv1000_device::ppi1_porta_r ) */ slider_position sliderpos = get_slider_position(); - UINT8 result = 0x00; + uint8_t result = 0x00; // bit 0: /FOCUS LOCK if (!focus_on()) @@ -581,7 +581,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::ppi1_portb_w ) */ // set the new value - UINT8 prev = m_portb1; + uint8_t prev = m_portb1; m_portb1 = data; if (LOG_PORT_IO && ((data ^ prev) & 0xff) != 0) { @@ -635,7 +635,7 @@ WRITE8_MEMBER( pioneer_ldv1000_device::ppi1_portc_w ) */ // set the new value - UINT8 prev = m_portc1; + uint8_t prev = m_portc1; m_portc1 = data; if (LOG_PORT_IO && ((data ^ prev) & 0xcf) != 0) { diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h index 0ea017d4214..ea543159a33 100644 --- a/src/devices/machine/ldv1000.h +++ b/src/devices/machine/ldv1000.h @@ -51,16 +51,16 @@ class pioneer_ldv1000_device : public laserdisc_device { public: // construction/destruction - pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template void set_command_strobe_callback(_cmd_strobe_cb latch) { m_command_strobe_cb.set_callback(latch); } // input and output - void data_w(UINT8 data); - void enter_w(UINT8 data); - UINT8 status_r() const { return m_status; } - UINT8 status_strobe_r() const { return (m_portc1 & 0x20) ? ASSERT_LINE : CLEAR_LINE; } - UINT8 command_strobe_r() const { return (m_portc1 & 0x10) ? ASSERT_LINE : CLEAR_LINE; } + void data_w(uint8_t data); + void enter_w(uint8_t data); + uint8_t status_r() const { return m_status; } + uint8_t status_strobe_r() const { return (m_portc1 & 0x20) ? ASSERT_LINE : CLEAR_LINE; } + uint8_t command_strobe_r() const { return (m_portc1 & 0x10) ? ASSERT_LINE : CLEAR_LINE; } protected: // timer IDs @@ -80,7 +80,7 @@ protected: // subclass overrides virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; virtual void player_overlay(bitmap_yuy16 &bitmap) override { } // internal helpers @@ -111,24 +111,24 @@ protected: devcb_write_line m_command_strobe_cb; /* communication status */ - UINT8 m_command; /* command byte to the player */ - UINT8 m_status; /* status byte from the player */ + uint8_t m_command; /* command byte to the player */ + uint8_t m_status; /* status byte from the player */ bool m_vsync; /* VSYNC state */ /* I/O port states */ - UINT8 m_counter_start; /* starting value for counter */ - UINT8 m_counter; /* current counter value */ - UINT8 m_portc0; /* port C on PPI 0 */ - UINT8 m_portb1; /* port B on PPI 1 */ - UINT8 m_portc1; /* port C on PPI 1 */ + uint8_t m_counter_start; /* starting value for counter */ + uint8_t m_counter; /* current counter value */ + uint8_t m_portc0; /* port C on PPI 0 */ + uint8_t m_portb1; /* port B on PPI 1 */ + uint8_t m_portc1; /* port C on PPI 1 */ /* display/decode circuit emulation */ - UINT8 m_portselect; /* selection of which port to access */ - UINT8 m_display[2][20]; /* display lines */ - UINT8 m_dispindex; /* index within the display line */ - UINT8 m_vbi[7*3]; /* VBI data */ + uint8_t m_portselect; /* selection of which port to access */ + uint8_t m_display[2][20]; /* display lines */ + uint8_t m_dispindex; /* index within the display line */ + uint8_t m_vbi[7*3]; /* VBI data */ bool m_vbiready; /* VBI ready flag */ - UINT8 m_vbiindex; /* index within the VBI data */ + uint8_t m_vbiindex; /* index within the VBI data */ }; diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp index 712f70c2b2e..d2d445f3336 100644 --- a/src/devices/machine/ldvp931.cpp +++ b/src/devices/machine/ldvp931.cpp @@ -86,7 +86,7 @@ ROM_END // phillips_22vp931_device - constructor //------------------------------------------------- -phillips_22vp931_device::phillips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +phillips_22vp931_device::phillips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : laserdisc_device(mconfig, PHILLIPS_22VP931, "Phillips 22VP931", tag, owner, clock, "22vp931", __FILE__), m_i8049_cpu(*this, "vp931"), m_tracktimer(nullptr), @@ -112,7 +112,7 @@ phillips_22vp931_device::phillips_22vp931_device(const machine_config &mconfig, // reset_w - write to the reset line //------------------------------------------------- -void phillips_22vp931_device::reset_w(UINT8 data) +void phillips_22vp931_device::reset_w(uint8_t data) { // control the CPU state m_i8049_cpu->set_input_line(INPUT_LINE_RESET, data); @@ -128,7 +128,7 @@ void phillips_22vp931_device::reset_w(UINT8 data) // 22VP931 //------------------------------------------------- -UINT8 phillips_22vp931_device::data_r() +uint8_t phillips_22vp931_device::data_r() { // if data is pending, clear the pending flag and notify any callbacks if (m_tocontroller_pending) @@ -200,9 +200,9 @@ void phillips_22vp931_device::device_timer(emu_timer &timer, device_timer_id id, { case TID_VBI_DATA_FETCH: { - UINT32 line = param >> 2; + uint32_t line = param >> 2; int which = param & 3; - UINT32 code = 0; + uint32_t code = 0; // fetch the code and compute the DATIC latched value if (line >= LASERDISC_CODE_LINE16 && line <= LASERDISC_CODE_LINE18) @@ -323,7 +323,7 @@ void phillips_22vp931_device::player_vsync(const vbi_metadata &vbi, int fieldnum // the first visible line of the frame //------------------------------------------------- -INT32 phillips_22vp931_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) +int32_t phillips_22vp931_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // set the first VBI timer to go at the start of line 16 timer_set(screen().time_until_pos(16*2), TID_VBI_DATA_FETCH, LASERDISC_CODE_LINE16 << 2); @@ -389,7 +389,7 @@ WRITE8_MEMBER( phillips_22vp931_device::i8049_output1_w ) $01 = OSM */ - INT32 speed; + int32_t speed; if (LOG_PORTS && (m_i8049_out1 ^ data) & 0x08) { @@ -518,7 +518,7 @@ READ8_MEMBER( phillips_22vp931_device::i8049_port1_r ) $20 = P15 = (in) D105 */ - UINT8 result = 0x00; + uint8_t result = 0x00; if (!m_daticerp) result |= 0x40; return result; @@ -608,7 +608,7 @@ READ8_MEMBER( phillips_22vp931_device::i8049_port2_r ) $10 = P24 = (in) D124 -> 0 when data from controller is present, reset to 1 on a read */ - UINT8 result = 0x00; + uint8_t result = 0x00; if (!m_tocontroller_pending) result |= 0x20; if (!m_fromcontroller_pending) diff --git a/src/devices/machine/ldvp931.h b/src/devices/machine/ldvp931.h index b35fa988039..c6445e06510 100644 --- a/src/devices/machine/ldvp931.h +++ b/src/devices/machine/ldvp931.h @@ -48,14 +48,14 @@ public: typedef delegate data_ready_delegate; // construction/destruction - phillips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + phillips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // input and output - void data_w(UINT8 data) { synchronize(TID_DEFERRED_DATA, data); } - void reset_w(UINT8 data); - UINT8 data_r(); - UINT8 ready_r() { return m_fromcontroller_pending ? CLEAR_LINE : ASSERT_LINE; } - UINT8 data_available_r() { return m_tocontroller_pending ? ASSERT_LINE : CLEAR_LINE; } + void data_w(uint8_t data) { synchronize(TID_DEFERRED_DATA, data); } + void reset_w(uint8_t data); + uint8_t data_r(); + uint8_t ready_r() { return m_fromcontroller_pending ? CLEAR_LINE : ASSERT_LINE; } + uint8_t data_available_r() { return m_tocontroller_pending ? ASSERT_LINE : CLEAR_LINE; } // configuration void set_data_ready_callback(data_ready_delegate callback) { m_data_ready = callback; } @@ -81,7 +81,7 @@ protected: // subclass overrides virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; + virtual int32_t player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) override; virtual void player_overlay(bitmap_yuy16 &bitmap) override { } public: @@ -108,30 +108,30 @@ protected: data_ready_delegate m_data_ready; // data ready callback // I/O port states - UINT8 m_i8049_out0; // output 0 state - UINT8 m_i8049_out1; // output 1 state - UINT8 m_i8049_port1; // port 1 state + uint8_t m_i8049_out0; // output 0 state + uint8_t m_i8049_out1; // output 1 state + uint8_t m_i8049_port1; // port 1 state // DATIC circuit implementation - UINT8 m_daticval; // latched DATIC value - UINT8 m_daticerp; // /ERP value from DATIC - UINT8 m_datastrobe; // DATA STROBE line from DATIC + uint8_t m_daticval; // latched DATIC value + uint8_t m_daticerp; // /ERP value from DATIC + uint8_t m_datastrobe; // DATA STROBE line from DATIC // communication status - UINT8 m_reset_state; // state of the reset input - UINT8 m_fromcontroller; // command byte from the controller + uint8_t m_reset_state; // state of the reset input + uint8_t m_fromcontroller; // command byte from the controller bool m_fromcontroller_pending; // true if data is pending - UINT8 m_tocontroller; // command byte to the controller + uint8_t m_tocontroller; // command byte to the controller bool m_tocontroller_pending; // true if data is pending // tracking - INT8 m_trackdir; // direction of tracking - UINT8 m_trackstate; // state of tracking + int8_t m_trackdir; // direction of tracking + uint8_t m_trackstate; // state of tracking // debugging - UINT8 m_cmdbuf[3]; // 3 bytes worth of commands - UINT8 m_cmdcount; // number of command bytes seen - INT16 m_advanced; // number of frames advanced + uint8_t m_cmdbuf[3]; // 3 bytes worth of commands + uint8_t m_cmdcount; // number of command bytes seen + int16_t m_advanced; // number of frames advanced }; diff --git a/src/devices/machine/legscsi.cpp b/src/devices/machine/legscsi.cpp index 133fdd393b2..9b86bb0d111 100644 --- a/src/devices/machine/legscsi.cpp +++ b/src/devices/machine/legscsi.cpp @@ -2,7 +2,7 @@ // copyright-holders:smf #include "legscsi.h" -legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +legacy_scsi_host_adapter::legacy_scsi_host_adapter(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_selected(0) , m_scsi_port(*this, finder_base::DUMMY_TAG) @@ -38,7 +38,7 @@ bool legacy_scsi_host_adapter::select(int id) return false; } -void legacy_scsi_host_adapter::send_command(UINT8 *data, int bytes) +void legacy_scsi_host_adapter::send_command(uint8_t *data, int bytes) { scsihle_device *scsidev = get_device(m_selected); if (scsidev != nullptr) @@ -84,7 +84,7 @@ int legacy_scsi_host_adapter::get_phase(void) } } -void legacy_scsi_host_adapter::read_data(UINT8 *data, int bytes) +void legacy_scsi_host_adapter::read_data(uint8_t *data, int bytes) { scsihle_device *scsidev = get_device(m_selected); if (scsidev != nullptr) @@ -97,7 +97,7 @@ void legacy_scsi_host_adapter::read_data(UINT8 *data, int bytes) } } -void legacy_scsi_host_adapter::write_data(UINT8 *data, int bytes) +void legacy_scsi_host_adapter::write_data(uint8_t *data, int bytes) { scsihle_device *scsidev = get_device(m_selected); if (scsidev != nullptr) @@ -110,7 +110,7 @@ void legacy_scsi_host_adapter::write_data(UINT8 *data, int bytes) } } -UINT8 legacy_scsi_host_adapter::get_status() +uint8_t legacy_scsi_host_adapter::get_status() { scsihle_device *scsidev = get_device(m_selected); if (scsidev != nullptr) diff --git a/src/devices/machine/legscsi.h b/src/devices/machine/legscsi.h index b3d8800972c..09384c8585d 100644 --- a/src/devices/machine/legscsi.h +++ b/src/devices/machine/legscsi.h @@ -13,7 +13,7 @@ class legacy_scsi_host_adapter : public device_t { public: - legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + legacy_scsi_host_adapter(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 void set_scsi_port(device_t &device, const char *tag) { downcast(device).m_scsi_port.set_tag(tag); } @@ -22,12 +22,12 @@ protected: void reset_bus(); bool select(int id); - void send_command(UINT8 *data, int bytes); + void send_command(uint8_t *data, int bytes); int get_length(); int get_phase(); - void read_data(UINT8 *data, int bytes); - void write_data(UINT8 *data, int bytes); - UINT8 get_status(); + void read_data(uint8_t *data, int bytes); + void write_data(uint8_t *data, int bytes); + uint8_t get_status(); private: int m_selected; diff --git a/src/devices/machine/lh5810.cpp b/src/devices/machine/lh5810.cpp index 88b9b8d51c7..a0a5ad0590d 100644 --- a/src/devices/machine/lh5810.cpp +++ b/src/devices/machine/lh5810.cpp @@ -27,7 +27,7 @@ const device_type LH5810 = &device_creator; // lh5810_device - constructor //------------------------------------------------- -lh5810_device::lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +lh5810_device::lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, LH5810, "LH5810", tag, owner, clock, "lh5810", __FILE__), m_porta_r_cb(*this), m_porta_w_cb(*this), diff --git a/src/devices/machine/lh5810.h b/src/devices/machine/lh5810.h index 63bff576958..dcfbf58fb6d 100644 --- a/src/devices/machine/lh5810.h +++ b/src/devices/machine/lh5810.h @@ -68,7 +68,7 @@ class lh5810_device : public device_t { public: // construction/destruction - lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_porta_r_callback(device_t &device, _Object object) { return downcast(device).m_porta_r_cb.set_callback(object); } template static devcb_base &set_porta_w_callback(device_t &device, _Object object) { return downcast(device).m_porta_w_cb.set_callback(object); } @@ -95,8 +95,8 @@ private: devcb_write_line m_out_int_cb; //IRQ callback - UINT8 m_reg[0x10]; - UINT8 m_irq; + uint8_t m_reg[0x10]; + uint8_t m_irq; }; diff --git a/src/devices/machine/linflash.cpp b/src/devices/machine/linflash.cpp index efc9583981b..5c49d224612 100644 --- a/src/devices/machine/linflash.cpp +++ b/src/devices/machine/linflash.cpp @@ -2,7 +2,7 @@ // copyright-holders:smf #include "linflash.h" -linear_flash_pccard_device::linear_flash_pccard_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) : +linear_flash_pccard_device::linear_flash_pccard_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_memory_interface(mconfig, *this), device_slot_card_interface(mconfig, *this), m_space(nullptr) @@ -21,7 +21,7 @@ const address_space_config *linear_flash_pccard_device::memory_space_config( add READ16_MEMBER( linear_flash_pccard_device::read_memory ) { - UINT16 data = m_space->read_word(offset * 2, mem_mask); + uint16_t data = m_space->read_word(offset * 2, mem_mask); //printf( "<%08x %04x %04x\n", offset, data, mem_mask ); return data; } @@ -47,7 +47,7 @@ static ADDRESS_MAP_START(linear_flash_pccard_16mb, AS_0, 16, linear_flash_pccard AM_RANGE(0x00c00000, 0x00ffffff) AM_DEVREADWRITE8("4u", intelfsh8_device, read, write, 0xff00) ADDRESS_MAP_END -linear_flash_pccard_16mb_device::linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +linear_flash_pccard_16mb_device::linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_16MB, "Linear Flash PCCARD (16MB)", tag, owner, clock, "linearflash16mb", __FILE__) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, *ADDRESS_MAP_NAME( linear_flash_pccard_16mb ) ); @@ -92,7 +92,7 @@ static ADDRESS_MAP_START(linear_flash_pccard_32mb, AS_0, 16, linear_flash_pccard AM_RANGE(0x01c00000, 0x01ffffff) AM_DEVREADWRITE8("8u", intelfsh8_device, read, write, 0xff00) ADDRESS_MAP_END -linear_flash_pccard_32mb_device::linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +linear_flash_pccard_32mb_device::linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_32MB, "Linear Flash PCCARD (32MB)", tag, owner, clock, "linearflash32mb", __FILE__) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, *ADDRESS_MAP_NAME( linear_flash_pccard_32mb ) ); @@ -161,7 +161,7 @@ static ADDRESS_MAP_START(linear_flash_pccard_64mb, AS_0, 16, linear_flash_pccard AM_RANGE(0x03c00000, 0x03ffffff) AM_DEVREADWRITE8("16u", intelfsh8_device, read, write, 0xff00) ADDRESS_MAP_END -linear_flash_pccard_64mb_device::linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +linear_flash_pccard_64mb_device::linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_64MB, "Linear Flash PCCARD (64MB)", tag, owner, clock, "linearflash64mb", __FILE__) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, *ADDRESS_MAP_NAME( linear_flash_pccard_64mb ) ); diff --git a/src/devices/machine/linflash.h b/src/devices/machine/linflash.h index e6acfcf4ef3..3d486b35c9f 100644 --- a/src/devices/machine/linflash.h +++ b/src/devices/machine/linflash.h @@ -19,7 +19,7 @@ public: virtual DECLARE_WRITE16_MEMBER(write_memory) override; protected: - linear_flash_pccard_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); + linear_flash_pccard_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; @@ -37,7 +37,7 @@ extern const device_type LINEAR_FLASH_PCCARD_16MB; class linear_flash_pccard_16mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides @@ -50,7 +50,7 @@ extern const device_type LINEAR_FLASH_PCCARD_32MB; class linear_flash_pccard_32mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides @@ -62,7 +62,7 @@ extern const device_type LINEAR_FLASH_PCCARD_64MB; class linear_flash_pccard_64mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides diff --git a/src/devices/machine/lpc-acpi.cpp b/src/devices/machine/lpc-acpi.cpp index 72d066affaa..50f5774aacf 100644 --- a/src/devices/machine/lpc-acpi.cpp +++ b/src/devices/machine/lpc-acpi.cpp @@ -36,13 +36,13 @@ DEVICE_ADDRESS_MAP_START(map, 32, lpc_acpi_device) AM_RANGE(0x70, 0x73) AM_READWRITE8 (sw_irq_gen_r, sw_irq_gen_w, 0x000000ff) ADDRESS_MAP_END -lpc_acpi_device::lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +lpc_acpi_device::lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : lpc_device(mconfig, LPC_ACPI, "LPC ACPI", tag, owner, clock, "lpc_acpi", __FILE__) { } -void lpc_acpi_device::map_device(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 lpc_acpi_device::map_device(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(io_offset, io_window_end, *this, &lpc_acpi_device::map); } diff --git a/src/devices/machine/lpc-acpi.h b/src/devices/machine/lpc-acpi.h index bde29170f04..68badc4c337 100644 --- a/src/devices/machine/lpc-acpi.h +++ b/src/devices/machine/lpc-acpi.h @@ -10,10 +10,10 @@ class lpc_acpi_device : public lpc_device { public: - lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual void map_device(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_device(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; DECLARE_READ16_MEMBER( pm1_sts_r); DECLARE_WRITE16_MEMBER(pm1_sts_w); @@ -74,11 +74,11 @@ protected: void device_reset() override; private: - UINT32 pm1_cnt, proc_cnt, gpe0_sts, gpe0_en, smi_en, smi_sts; - UINT16 pm1_sts, pm1_en, alt_gp_smi_en, alt_gp_smi_sts, devact_sts, devtrap_en; - UINT16 tco1_sts, tco2_sts, tco1_cnt, tco2_cnt; - UINT8 tco_rld, tco_tmr, tco_dat_in, tco_dat_out, tco_message1, tco_message2; - UINT8 tco_wdstatus, sw_irq_gen; + uint32_t pm1_cnt, proc_cnt, gpe0_sts, gpe0_en, smi_en, smi_sts; + uint16_t pm1_sts, pm1_en, alt_gp_smi_en, alt_gp_smi_sts, devact_sts, devtrap_en; + uint16_t tco1_sts, tco2_sts, tco1_cnt, tco2_cnt; + uint8_t tco_rld, tco_tmr, tco_dat_in, tco_dat_out, tco_message1, tco_message2; + uint8_t tco_wdstatus, sw_irq_gen; DECLARE_ADDRESS_MAP(map, 32); }; diff --git a/src/devices/machine/lpc-pit.cpp b/src/devices/machine/lpc-pit.cpp index 19a07373ec5..84c924263d0 100644 --- a/src/devices/machine/lpc-pit.cpp +++ b/src/devices/machine/lpc-pit.cpp @@ -11,13 +11,13 @@ DEVICE_ADDRESS_MAP_START(map, 32, lpc_pit_device) AM_RANGE(0x50, 0x53) AM_WRITE8 ( control_w, 0xff000000) ADDRESS_MAP_END -lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : lpc_device(mconfig, LPC_PIT, "LPC PIT", tag, owner, clock, "lpc_pit", __FILE__) { } -void lpc_pit_device::map_device(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 lpc_pit_device::map_device(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(io_offset, io_window_end, *this, &lpc_pit_device::map); } diff --git a/src/devices/machine/lpc-pit.h b/src/devices/machine/lpc-pit.h index a9e96a7b401..25fad7f05d2 100644 --- a/src/devices/machine/lpc-pit.h +++ b/src/devices/machine/lpc-pit.h @@ -10,10 +10,10 @@ class lpc_pit_device : public lpc_device { public: - lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual void map_device(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_device(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; DECLARE_READ8_MEMBER( status_r); DECLARE_WRITE8_MEMBER(access_w); diff --git a/src/devices/machine/lpc-rtc.cpp b/src/devices/machine/lpc-rtc.cpp index 455ab99d2fb..985be52dfc8 100644 --- a/src/devices/machine/lpc-rtc.cpp +++ b/src/devices/machine/lpc-rtc.cpp @@ -14,19 +14,19 @@ DEVICE_ADDRESS_MAP_START(extmap, 32, lpc_rtc_device) AM_RANGE(0x70, 0x77) AM_READWRITE8(exttarget_r, exttarget_w, 0xff000000) ADDRESS_MAP_END -lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : lpc_device(mconfig, LPC_RTC, "LPC RTC", tag, owner, clock, "lpc_rtc", __FILE__), cur_index(0), cur_extindex(0) { } -void lpc_rtc_device::map_device(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 lpc_rtc_device::map_device(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(io_offset, io_window_end, *this, &lpc_rtc_device::map); } -void lpc_rtc_device::map_extdevice(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 lpc_rtc_device::map_extdevice(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(io_offset, io_window_end, *this, &lpc_rtc_device::extmap); } diff --git a/src/devices/machine/lpc-rtc.h b/src/devices/machine/lpc-rtc.h index f46a3ca2238..c4c1c611867 100644 --- a/src/devices/machine/lpc-rtc.h +++ b/src/devices/machine/lpc-rtc.h @@ -10,13 +10,13 @@ class lpc_rtc_device : public lpc_device { public: - lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual void map_device(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_device(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 void map_extdevice(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); + virtual void map_extdevice(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); DECLARE_READ8_MEMBER( index_r); DECLARE_WRITE8_MEMBER( index_w); @@ -35,8 +35,8 @@ private: DECLARE_ADDRESS_MAP(map, 32); DECLARE_ADDRESS_MAP(extmap, 32); - UINT8 cur_index, cur_extindex; - UINT8 ram[256]; + uint8_t cur_index, cur_extindex; + uint8_t ram[256]; }; extern const device_type LPC_RTC; diff --git a/src/devices/machine/lpc.cpp b/src/devices/machine/lpc.cpp index afb51435f23..c2b7f681d0f 100644 --- a/src/devices/machine/lpc.cpp +++ b/src/devices/machine/lpc.cpp @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert #include "lpc.h" -lpc_device::lpc_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) : +lpc_device::lpc_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/lpc.h b/src/devices/machine/lpc.h index 6ade06d03ff..c135b616202 100644 --- a/src/devices/machine/lpc.h +++ b/src/devices/machine/lpc.h @@ -7,10 +7,10 @@ class lpc_device : public device_t { public: - lpc_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); + lpc_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 void map_device(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) = 0; + virtual void map_device(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) = 0; }; #endif diff --git a/src/devices/machine/lpci.cpp b/src/devices/machine/lpci.cpp index 004b50dfcaf..c5b53baa840 100644 --- a/src/devices/machine/lpci.cpp +++ b/src/devices/machine/lpci.cpp @@ -89,7 +89,7 @@ const device_type PCI_BUS_LEGACY = &device_creator; //------------------------------------------------- // pci_bus_legacy_device - constructor //------------------------------------------------- -pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PCI_BUS_LEGACY, "PCI Bus Legacy", tag, owner, clock, "pci_bus_legacy", __FILE__), m_father(nullptr) { @@ -107,7 +107,7 @@ pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, cons READ32_MEMBER( pci_bus_legacy_device::read ) { - UINT32 result = 0xffffffff; + uint32_t result = 0xffffffff; int function, reg; offset %= 2; @@ -211,12 +211,12 @@ WRITE32_MEMBER( pci_bus_legacy_device::write ) READ64_MEMBER(pci_bus_legacy_device::read_64be) { - UINT64 result = 0; + uint64_t result = 0; mem_mask = flipendian_int64(mem_mask); if (ACCESSING_BITS_0_31) - result |= (UINT64)read(space, offset * 2 + 0, mem_mask >> 0) << 0; + result |= (uint64_t)read(space, offset * 2 + 0, mem_mask >> 0) << 0; if (ACCESSING_BITS_32_63) - result |= (UINT64)read(space, offset * 2 + 1, mem_mask >> 32) << 32; + result |= (uint64_t)read(space, offset * 2 + 1, mem_mask >> 32) << 32; return flipendian_int64(result); } diff --git a/src/devices/machine/lpci.h b/src/devices/machine/lpci.h index 849f27d206d..b53b3fe1ae0 100644 --- a/src/devices/machine/lpci.h +++ b/src/devices/machine/lpci.h @@ -15,8 +15,8 @@ // TYPE DEFINITIONS //************************************************************************** -typedef UINT32 (*pci_read_func)(device_t *pcibus, device_t *device, int function, int reg, UINT32 mem_mask); -typedef void (*pci_write_func)(device_t *pcibus, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask); +typedef uint32_t (*pci_read_func)(device_t *pcibus, device_t *device, int function, int reg, uint32_t mem_mask); +typedef void (*pci_write_func)(device_t *pcibus, device_t *device, int function, int reg, uint32_t data, uint32_t mem_mask); // ======================> pci_bus_legacy_device @@ -24,7 +24,7 @@ class pci_bus_legacy_device : public device_t { public: // construction/destruction - pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ32_MEMBER( read ); DECLARE_WRITE32_MEMBER( write ); @@ -47,19 +47,19 @@ protected: virtual void device_post_load() override; private: - UINT8 m_busnum; + uint8_t m_busnum; const char * m_devtag[32]; pci_read_func m_read_callback[32]; pci_write_func m_write_callback[32]; const char * m_father; device_t * m_device[32]; pci_bus_legacy_device * m_siblings[8]; - UINT8 m_siblings_busnum[8]; + uint8_t m_siblings_busnum[8]; int m_siblings_count; offs_t m_address; - INT8 m_devicenum; // device number we are addressing - INT8 m_busnumber; // pci bus number we are addressing + int8_t m_devicenum; // device number we are addressing + int8_t m_busnumber; // pci bus number we are addressing pci_bus_legacy_device * m_busnumaddr; // pci bus we are addressing }; diff --git a/src/devices/machine/m6m80011ap.cpp b/src/devices/machine/m6m80011ap.cpp index a8dea68d6ef..be1d92b2079 100644 --- a/src/devices/machine/m6m80011ap.cpp +++ b/src/devices/machine/m6m80011ap.cpp @@ -27,7 +27,7 @@ const device_type M6M80011AP = &device_creator; // m6m80011ap_device - constructor //------------------------------------------------- -m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, M6M80011AP, "M6M80011AP EEPROM", tag, owner, clock, "m6m80011ap", __FILE__), device_nvram_interface(mconfig, *this), m_latch(0), m_reset_line(0), m_cmd_stream_pos(0), m_current_cmd(0), m_read_latch(0), m_current_addr(0), m_eeprom_we(0), m_eeprom_state() { diff --git a/src/devices/machine/m6m80011ap.h b/src/devices/machine/m6m80011ap.h index dfea6c06c14..cbd2e185669 100644 --- a/src/devices/machine/m6m80011ap.h +++ b/src/devices/machine/m6m80011ap.h @@ -43,7 +43,7 @@ class m6m80011ap_device : public device_t, { public: // construction/destruction - m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); @@ -63,16 +63,16 @@ protected: virtual void nvram_write(emu_file &file) override; private: - UINT8 m_latch; - UINT8 m_reset_line; - UINT8 m_cmd_stream_pos; - UINT32 m_current_cmd; - UINT8 m_read_latch; - UINT8 m_current_addr; - UINT8 m_eeprom_we; + uint8_t m_latch; + uint8_t m_reset_line; + uint8_t m_cmd_stream_pos; + uint32_t m_current_cmd; + uint8_t m_read_latch; + uint8_t m_current_addr; + uint8_t m_eeprom_we; eeprom_cmd_t m_eeprom_state; - UINT16 m_eeprom_data[0x80]; + uint16_t m_eeprom_data[0x80]; }; diff --git a/src/devices/machine/mb14241.cpp b/src/devices/machine/mb14241.cpp index 44c49fb4e88..b4593172e27 100644 --- a/src/devices/machine/mb14241.cpp +++ b/src/devices/machine/mb14241.cpp @@ -17,7 +17,7 @@ const device_type MB14241 = &device_creator; -mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB14241, "MB14241 Data Shifter", tag, owner, clock, "mb14241", __FILE__), m_shift_data(0), m_shift_count(0) { } @@ -64,7 +64,7 @@ WRITE8_MEMBER( mb14241_device::shift_count_w ) WRITE8_MEMBER( mb14241_device::shift_data_w ) { - m_shift_data = (m_shift_data >> 8) | ((UINT16)data << 7); + m_shift_data = (m_shift_data >> 8) | ((uint16_t)data << 7); } READ8_MEMBER( mb14241_device::shift_result_r ) diff --git a/src/devices/machine/mb14241.h b/src/devices/machine/mb14241.h index 01c2d1b0dde..88d9e5e01b9 100644 --- a/src/devices/machine/mb14241.h +++ b/src/devices/machine/mb14241.h @@ -13,7 +13,7 @@ class mb14241_device : public device_t { public: - mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE8_MEMBER ( shift_count_w ); DECLARE_WRITE8_MEMBER ( shift_data_w ); @@ -28,8 +28,8 @@ protected: private: // internal state - UINT16 m_shift_data; /* 15 bits only */ - UINT8 m_shift_count; /* 3 bits */ + uint16_t m_shift_data; /* 15 bits only */ + uint8_t m_shift_count; /* 3 bits */ }; extern const device_type MB14241; diff --git a/src/devices/machine/mb3773.cpp b/src/devices/machine/mb3773.cpp index d749d8abc1a..1819825fadd 100644 --- a/src/devices/machine/mb3773.cpp +++ b/src/devices/machine/mb3773.cpp @@ -27,7 +27,7 @@ const device_type MB3773 = &device_creator; // mb3773_device - constructor //------------------------------------------------- -mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ) +mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : device_t(mconfig, MB3773, "MB3773 Power Supply Monitor", tag, owner, clock, "mb3773", __FILE__), m_watchdog_timer(nullptr), m_ck(0) { } diff --git a/src/devices/machine/mb3773.h b/src/devices/machine/mb3773.h index fa6fdd583fa..85142cdaf2b 100644 --- a/src/devices/machine/mb3773.h +++ b/src/devices/machine/mb3773.h @@ -29,7 +29,7 @@ class mb3773_device : { public: // construction/destruction - mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ); + mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ); // I/O operations WRITE_LINE_MEMBER( write_line_ck ); diff --git a/src/devices/machine/mb8421.cpp b/src/devices/machine/mb8421.cpp index 0d3cb819a66..d50240db362 100644 --- a/src/devices/machine/mb8421.cpp +++ b/src/devices/machine/mb8421.cpp @@ -20,7 +20,7 @@ const device_type MB8421 = &device_creator; // mb8421_device - constructor //------------------------------------------------- -mb8421_device::mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mb8421_device::mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB8421, "MB8421 DPSRAM", tag, owner, clock, "mb8421", __FILE__), m_intl_handler(*this), m_intr_handler(*this) diff --git a/src/devices/machine/mb8421.h b/src/devices/machine/mb8421.h index d1d23ab0691..a878eae6361 100644 --- a/src/devices/machine/mb8421.h +++ b/src/devices/machine/mb8421.h @@ -38,14 +38,14 @@ class mb8421_device : public device_t { public: - mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_intl_handler(device_t &device, _Object object) { return downcast(device).m_intl_handler.set_callback(object); } template static devcb_base &set_intr_handler(device_t &device, _Object object) { return downcast(device).m_intr_handler.set_callback(object); } DECLARE_READ_LINE_MEMBER( busy_r ) { return 0; } // _BUSY pin - not emulated - UINT8 peek(offs_t offset) { return m_ram[offset & 0x7ff]; } + uint8_t peek(offs_t offset) { return m_ram[offset & 0x7ff]; } DECLARE_WRITE8_MEMBER( left_w ); DECLARE_READ8_MEMBER( left_r ); @@ -58,7 +58,7 @@ protected: virtual void device_reset() override; private: - UINT8 m_ram[0x800]; + uint8_t m_ram[0x800]; devcb_write_line m_intl_handler; devcb_write_line m_intr_handler; diff --git a/src/devices/machine/mb87078.cpp b/src/devices/machine/mb87078.cpp index a94380456f5..5e0199697bb 100644 --- a/src/devices/machine/mb87078.cpp +++ b/src/devices/machine/mb87078.cpp @@ -104,7 +104,7 @@ static const int mb87078_gain_percent[66] = { const device_type MB87078 = &device_creator; -mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB87078, "MB87078 Volume Controller", tag, owner, clock, "mb87078", __FILE__), m_channel_latch(0), m_reset_comp(0), diff --git a/src/devices/machine/mb87078.h b/src/devices/machine/mb87078.h index 9eeb6c7526f..0192b86db25 100644 --- a/src/devices/machine/mb87078.h +++ b/src/devices/machine/mb87078.h @@ -25,7 +25,7 @@ class mb87078_device : public device_t { public: - mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mb87078_device() {} template static devcb_base &set_gain_changed_callback(device_t &device, _Object object) { return downcast(device).m_gain_changed_cb.set_callback(object); } @@ -57,8 +57,8 @@ private: // internal state int m_gain[4]; /* gain index 0-63,64,65 */ int m_channel_latch; /* current channel */ - UINT8 m_latch[2][4]; /* 6bit+3bit 4 data latches */ - UINT8 m_reset_comp; + uint8_t m_latch[2][4]; /* 6bit+3bit 4 data latches */ + uint8_t m_reset_comp; devcb_write8 m_gain_changed_cb; }; diff --git a/src/devices/machine/mb8795.cpp b/src/devices/machine/mb8795.cpp index 7f2c096023c..a427780578e 100644 --- a/src/devices/machine/mb8795.cpp +++ b/src/devices/machine/mb8795.cpp @@ -18,7 +18,7 @@ DEVICE_ADDRESS_MAP_START(map, 8, mb8795_device) AM_RANGE(0x8, 0xf) AM_READWRITE(mac_r, mac_w) // Mapping limitation, real is up to 0xd ADDRESS_MAP_END -mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB8795, "Fujitsu MB8795", tag, owner, clock, "mb8795", __FILE__), device_network_interface(mconfig, *this, 10), txstat(0), txmask(0), rxstat(0), rxmask(0), txmode(0), rxmode(0), txlen(0), rxlen(0), txcount(0), drq_tx(false), drq_rx(false), irq_tx(false), irq_rx(false), timer_tx(nullptr), timer_rx(nullptr), @@ -72,7 +72,7 @@ void mb8795_device::device_reset() start_send(); } -void mb8795_device::recv_cb(UINT8 *buf, int len) +void mb8795_device::recv_cb(uint8_t *buf, int len) { memcpy(rxbuf, buf, len); rxlen = len; @@ -191,7 +191,7 @@ void mb8795_device::start_send() timer_tx->adjust(attotime::zero); } -void mb8795_device::tx_dma_w(UINT8 data, bool eof) +void mb8795_device::tx_dma_w(uint8_t data, bool eof) { txbuf[txlen++] = data; if(txstat & EN_TXS_READY) { @@ -226,7 +226,7 @@ void mb8795_device::tx_dma_w(UINT8 data, bool eof) timer_tx->adjust(attotime::from_nsec(800)); } -void mb8795_device::rx_dma_r(UINT8 &data, bool &eof) +void mb8795_device::rx_dma_r(uint8_t &data, bool &eof) { drq_rx = false; if(!drq_rx_cb.isnull()) diff --git a/src/devices/machine/mb8795.h b/src/devices/machine/mb8795.h index 4811d38c04d..dede6ff48bf 100644 --- a/src/devices/machine/mb8795.h +++ b/src/devices/machine/mb8795.h @@ -24,7 +24,7 @@ class mb8795_device : public device_t, public device_network_interface { public: - mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_tx_irq_wr_callback(device_t &device, _Object object) { return downcast(device).irq_tx_cb.set_callback(object); } template static devcb_base &set_rx_irq_wr_callback(device_t &device, _Object object) { return downcast(device).irq_rx_cb.set_callback(object); } @@ -50,15 +50,15 @@ public: DECLARE_READ8_MEMBER(mac_r); DECLARE_WRITE8_MEMBER(mac_w); - void tx_dma_w(UINT8 data, bool eof); - void rx_dma_r(UINT8 &data, bool &eof); + void tx_dma_w(uint8_t data, bool eof); + void rx_dma_r(uint8_t &data, bool &eof); protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual void recv_cb(UINT8 *buf, int len) override; + virtual void recv_cb(uint8_t *buf, int len) override; private: enum { TIMER_TX, TIMER_RX }; @@ -101,10 +101,10 @@ private: EN_RST_RESET = 0x80 /* reset interface */ }; - UINT8 mac[6]; - UINT8 txbuf[2000], rxbuf[2000]; - UINT8 txstat, txmask, rxstat, rxmask, txmode, rxmode; - UINT16 txlen, rxlen, txcount; + uint8_t mac[6]; + uint8_t txbuf[2000], rxbuf[2000]; + uint8_t txstat, txmask, rxstat, rxmask, txmode, rxmode; + uint16_t txlen, rxlen, txcount; bool drq_tx, drq_rx, irq_tx, irq_rx; emu_timer *timer_tx, *timer_rx; diff --git a/src/devices/machine/mb89352.cpp b/src/devices/machine/mb89352.cpp index 1b0894c2007..a679e8081e4 100644 --- a/src/devices/machine/mb89352.cpp +++ b/src/devices/machine/mb89352.cpp @@ -115,7 +115,7 @@ const device_type MB89352A = &device_creator; * Device */ -mb89352_device::mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mb89352_device::mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : legacy_scsi_host_adapter(mconfig, MB89352A, "MB89352A", tag, owner, clock, "mb89352", __FILE__), m_irq_cb(*this), m_drq_cb(*this) @@ -161,7 +161,7 @@ void mb89352_device::device_stop() } // get the length of a SCSI command based on it's command byte type -int mb89352_device::get_scsi_cmd_len(UINT8 cbyte) +int mb89352_device::get_scsi_cmd_len(uint8_t cbyte) { int group; @@ -247,7 +247,7 @@ void mb89352_device::set_phase(int phase) READ8_MEMBER( mb89352_device::mb89352_r ) { - UINT8 ret; + uint8_t ret; switch(offset & 0x0f) { case 0x00: // BDID - Bus Device ID diff --git a/src/devices/machine/mb89352.h b/src/devices/machine/mb89352.h index faae5c4ab3f..26cfd272c80 100644 --- a/src/devices/machine/mb89352.h +++ b/src/devices/machine/mb89352.h @@ -60,7 +60,7 @@ class mb89352_device : public legacy_scsi_host_adapter { public: // construction/destruction - mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast(device).m_irq_cb.set_callback(object); } template static devcb_base &set_drq_callback(device_t &device, _Object object) { return downcast(device).m_drq_cb.set_callback(object); } @@ -82,33 +82,33 @@ private: // internal device state goes here static const device_timer_id TIMER_TRANSFER = 0; - int get_scsi_cmd_len(UINT8 cbyte); - //void set_ints(UINT8 flag); + int get_scsi_cmd_len(uint8_t cbyte); + //void set_ints(uint8_t flag); devcb_write_line m_irq_cb; /* irq callback */ devcb_write_line m_drq_cb; /* drq callback */ - UINT8 m_phase; // current SCSI phase - UINT8 m_target; // current SCSI target - UINT8 m_bdid; // Bus device ID (SCSI ID of the bus?) - UINT8 m_ints; // Interrupt Sense - UINT8 m_temp; // Temporary register (To/From SCSI bus) - UINT8 m_data; // Data register - UINT8 m_scmd; // SPC Command register - UINT32 m_transfer_count; // byte transfer counter, also used as a timeout counter for selection. - UINT8 m_int_enable; - UINT8 m_sel_enable; - UINT8 m_resel_enable; - UINT8 m_parity_enable; - UINT8 m_arbit_enable; - UINT8 m_busfree_int_enable; - UINT8 m_line_status; - UINT8 m_spc_status; - UINT8 m_error_status; - UINT8 m_command_index; - UINT8 m_command[16]; - UINT32 m_transfer_index; - UINT8 m_buffer[512]; + uint8_t m_phase; // current SCSI phase + uint8_t m_target; // current SCSI target + uint8_t m_bdid; // Bus device ID (SCSI ID of the bus?) + uint8_t m_ints; // Interrupt Sense + uint8_t m_temp; // Temporary register (To/From SCSI bus) + uint8_t m_data; // Data register + uint8_t m_scmd; // SPC Command register + uint32_t m_transfer_count; // byte transfer counter, also used as a timeout counter for selection. + uint8_t m_int_enable; + uint8_t m_sel_enable; + uint8_t m_resel_enable; + uint8_t m_parity_enable; + uint8_t m_arbit_enable; + uint8_t m_busfree_int_enable; + uint8_t m_line_status; + uint8_t m_spc_status; + uint8_t m_error_status; + uint8_t m_command_index; + uint8_t m_command[16]; + uint32_t m_transfer_index; + uint8_t m_buffer[512]; emu_timer* m_transfer_timer; }; diff --git a/src/devices/machine/mb89363b.cpp b/src/devices/machine/mb89363b.cpp index 2e4f210a865..f4584971424 100644 --- a/src/devices/machine/mb89363b.cpp +++ b/src/devices/machine/mb89363b.cpp @@ -84,7 +84,7 @@ extern const device_type MB89363B = &device_creator; -mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB89363B, "MB89363 I/O", tag, owner, clock, "mb89363b", __FILE__), m_i8255_a(*this, "i8255_a"), m_i8255_b(*this, "i8255_b"), diff --git a/src/devices/machine/mb89363b.h b/src/devices/machine/mb89363b.h index 85b1913e6d1..cc880a4cead 100644 --- a/src/devices/machine/mb89363b.h +++ b/src/devices/machine/mb89363b.h @@ -66,7 +66,7 @@ class mb89363b_device : public device_t { public: // construction/destruction - mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb89363b_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/mb89371.cpp b/src/devices/machine/mb89371.cpp index 1188f295725..22a81d8dbd6 100644 --- a/src/devices/machine/mb89371.cpp +++ b/src/devices/machine/mb89371.cpp @@ -12,7 +12,7 @@ const device_type MB89371 = &device_creator; -mb89371_device::mb89371_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ) +mb89371_device::mb89371_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : device_t(mconfig, MB89371, "MB89371 Dual Serial UART", tag, owner, clock, "mb89371", __FILE__) { } diff --git a/src/devices/machine/mb89371.h b/src/devices/machine/mb89371.h index f7d5c1a2bad..dbdef609cdd 100644 --- a/src/devices/machine/mb89371.h +++ b/src/devices/machine/mb89371.h @@ -17,7 +17,7 @@ class mb89371_device : public device_t { public: // construction/destruction - mb89371_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb89371_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE8_MEMBER( write ); DECLARE_READ8_MEMBER( read ); diff --git a/src/devices/machine/mc146818.cpp b/src/devices/machine/mc146818.cpp index 1b659a610a0..103ebf17409 100644 --- a/src/devices/machine/mc146818.cpp +++ b/src/devices/machine/mc146818.cpp @@ -30,7 +30,7 @@ const device_type MC146818 = &device_creator; // mc146818_device - constructor //------------------------------------------------- -mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC146818, "MC146818 RTC", tag, owner, clock, "mc146818", __FILE__), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -46,7 +46,7 @@ mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, { } -mc146818_device::mc146818_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) +mc146818_device::mc146818_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_region(*this, DEVICE_SELF), @@ -198,7 +198,7 @@ void mc146818_device::nvram_default() memory_region *region = memregion(DEVICE_SELF); if (region != nullptr) { - UINT32 bytes = region->bytes(); + uint32_t bytes = region->bytes(); if (bytes > data_size()) bytes = data_size(); @@ -516,7 +516,7 @@ void mc146818_device::update_irq() READ8_MEMBER( mc146818_device::read ) { - UINT8 data = 0; + uint8_t data = 0; switch (offset) { case 0: diff --git a/src/devices/machine/mc146818.h b/src/devices/machine/mc146818.h index a4651171179..2c62086a4f4 100644 --- a/src/devices/machine/mc146818.h +++ b/src/devices/machine/mc146818.h @@ -57,8 +57,8 @@ class mc146818_device : public device_t, { public: // construction/destruction - mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - mc146818_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); + mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc146818_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); // callbacks template static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } @@ -171,8 +171,8 @@ private: // internal state - UINT8 m_index; - std::vector m_data; + uint8_t m_index; + std::vector m_data; attotime m_last_refresh; diff --git a/src/devices/machine/mc2661.cpp b/src/devices/machine/mc2661.cpp index f93dc1b5ab1..625459361b3 100644 --- a/src/devices/machine/mc2661.cpp +++ b/src/devices/machine/mc2661.cpp @@ -25,7 +25,7 @@ const device_type MC2661 = &device_creator; #define LOG 0 -UINT32 baud_rates[16] = +uint32_t baud_rates[16] = { 50, 75, 110, 135 /*134.5*/, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200 }; @@ -94,7 +94,7 @@ enum // mc2661_device - constructor //------------------------------------------------- -mc2661_device::mc2661_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mc2661_device::mc2661_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC2661, "MC2661", tag, owner, clock, "mc2661", __FILE__), device_serial_interface(mconfig, *this), m_write_txd(*this), @@ -221,7 +221,7 @@ void mc2661_device::rcv_complete() READ8_MEMBER( mc2661_device::read ) { - UINT8 data = 0; + uint8_t data = 0; switch (offset & 0x03) { @@ -331,8 +331,8 @@ WRITE8_MEMBER( mc2661_device::write ) } if(m_mode_index == 1) { - UINT32 rx_baud = baud_rates[data & 0x0f]; - UINT32 tx_baud = baud_rates[data & 0x0f]; + uint32_t rx_baud = baud_rates[data & 0x0f]; + uint32_t tx_baud = baud_rates[data & 0x0f]; if(data & 0x10) // internal receiver clock { // if((m_mr[0] & 0x03) != 0) diff --git a/src/devices/machine/mc2661.h b/src/devices/machine/mc2661.h index a18aa0141f1..f60baf9eea8 100644 --- a/src/devices/machine/mc2661.h +++ b/src/devices/machine/mc2661.h @@ -79,7 +79,7 @@ class mc2661_device : public device_t, { public: // construction/destruction - mc2661_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc2661_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void static_set_rxc(device_t &device, int clock) { downcast(device).m_rxc = clock; } static void static_set_txc(device_t &device, int clock) { downcast(device).m_txc = clock; } @@ -129,12 +129,12 @@ private: int m_rxc; int m_txc; - UINT8 m_rhr; - UINT8 m_thr; - UINT8 m_cr; - UINT8 m_sr; - UINT8 m_mr[2]; - UINT8 m_sync[3]; + uint8_t m_rhr; + uint8_t m_thr; + uint8_t m_cr; + uint8_t m_sr; + uint8_t m_mr[2]; + uint8_t m_sync[3]; int m_mode_index; int m_sync_index; diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp index e2987c1d5f9..052565ae315 100644 --- a/src/devices/machine/mc68328.cpp +++ b/src/devices/machine/mc68328.cpp @@ -31,7 +31,7 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, co const device_type MC68328 = &device_creator; -mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC68328, "MC68328 (DragonBall) Integrated Processor", tag, owner, clock, "mc68328", __FILE__), m_rtc(nullptr), m_pwm(nullptr), m_out_port_a_cb(*this), m_out_port_b_cb(*this), @@ -243,7 +243,7 @@ void mc68328_device::device_reset() } -void mc68328_device::set_interrupt_line(UINT32 line, UINT32 active) +void mc68328_device::set_interrupt_line(uint32_t line, uint32_t active) { if (active) { @@ -320,9 +320,9 @@ void mc68328_device::set_interrupt_line(UINT32 line, UINT32 active) void mc68328_device::poll_port_d_interrupts() { - UINT8 line_transitions = m_regs.pddataedge & m_regs.pdirqedge; - UINT8 line_holds = m_regs.pddata &~ m_regs.pdirqedge; - UINT8 line_interrupts = (line_transitions | line_holds) & m_regs.pdirqen; + uint8_t line_transitions = m_regs.pddataedge & m_regs.pdirqedge; + uint8_t line_holds = m_regs.pddata &~ m_regs.pdirqedge; + uint8_t line_interrupts = (line_transitions | line_holds) & m_regs.pdirqen; if (line_interrupts) { @@ -347,9 +347,9 @@ WRITE_LINE_MEMBER( mc68328_device::set_penirq_line ) } } -void mc68328_device::set_port_d_lines(UINT8 state, int bit) +void mc68328_device::set_port_d_lines(uint8_t state, int bit) { - UINT8 old_button_state = m_regs.pddata; + uint8_t old_button_state = m_regs.pddata; if (state & (1 << bit)) { @@ -365,9 +365,9 @@ void mc68328_device::set_port_d_lines(UINT8 state, int bit) poll_port_d_interrupts(); } -UINT32 mc68328_device::get_timer_frequency(UINT32 index) +uint32_t mc68328_device::get_timer_frequency(uint32_t index) { - UINT32 frequency = 0; + uint32_t frequency = 0; switch (m_regs.tctl[index] & TCTL_CLKSOURCE) { @@ -391,7 +391,7 @@ UINT32 mc68328_device::get_timer_frequency(UINT32 index) return frequency; } -void mc68328_device::maybe_start_timer(UINT32 index, UINT32 new_enable) +void mc68328_device::maybe_start_timer(uint32_t index, uint32_t new_enable) { if ((m_regs.tctl[index] & TCTL_TEN) == TCTL_TEN_ENABLE && (m_regs.tctl[index] & TCTL_CLKSOURCE) > TCTL_CLKSOURCE_STOP) { @@ -405,7 +405,7 @@ void mc68328_device::maybe_start_timer(UINT32 index, UINT32 new_enable) } else { - UINT32 frequency = get_timer_frequency(index); + uint32_t frequency = get_timer_frequency(index); attotime period = (attotime::from_hz(frequency) * m_regs.tcmp[index]); if (new_enable) @@ -422,14 +422,14 @@ void mc68328_device::maybe_start_timer(UINT32 index, UINT32 new_enable) } } -void mc68328_device::timer_compare_event(UINT32 index) +void mc68328_device::timer_compare_event(uint32_t index) { m_regs.tcn[index] = m_regs.tcmp[index]; m_regs.tstat[index] |= TSTAT_COMP; if ((m_regs.tctl[index] & TCTL_FRR) == TCTL_FRR_RESTART) { - UINT32 frequency = get_timer_frequency(index); + uint32_t frequency = get_timer_frequency(index); if (frequency > 0) { @@ -446,7 +446,7 @@ void mc68328_device::timer_compare_event(UINT32 index) } else { - UINT32 frequency = get_timer_frequency(index); + uint32_t frequency = get_timer_frequency(index); if (frequency > 0) { @@ -486,8 +486,8 @@ TIMER_CALLBACK_MEMBER( mc68328_device::pwm_transition ) if (((m_regs.pwmc & PWMC_POL) == 0 && (m_regs.pwmc & PWMC_PIN) != 0) || ((m_regs.pwmc & PWMC_POL) != 0 && (m_regs.pwmc & PWMC_PIN) == 0)) { - UINT32 frequency = 32768 * 506; - UINT32 divisor = 4 << (m_regs.pwmc & PWMC_CLKSEL); // ?? Datasheet says 2 <<, but then we're an octave higher than CoPilot. + uint32_t frequency = 32768 * 506; + uint32_t divisor = 4 << (m_regs.pwmc & PWMC_CLKSEL); // ?? Datasheet says 2 <<, but then we're an octave higher than CoPilot. attotime period; frequency /= divisor; @@ -502,8 +502,8 @@ TIMER_CALLBACK_MEMBER( mc68328_device::pwm_transition ) } else { - UINT32 frequency = 32768 * 506; - UINT32 divisor = 4 << (m_regs.pwmc & PWMC_CLKSEL); // ?? Datasheet says 2 <<, but then we're an octave higher than CoPilot. + uint32_t frequency = 32768 * 506; + uint32_t divisor = 4 << (m_regs.pwmc & PWMC_CLKSEL); // ?? Datasheet says 2 <<, but then we're an octave higher than CoPilot. attotime period; frequency /= divisor; @@ -524,7 +524,7 @@ TIMER_CALLBACK_MEMBER( mc68328_device::rtc_tick ) { if (m_regs.rtcctl & RTCCTL_ENABLE) { - UINT32 set_int = 0; + uint32_t set_int = 0; m_regs.hmsr++; @@ -600,9 +600,9 @@ TIMER_CALLBACK_MEMBER( mc68328_device::rtc_tick ) WRITE16_MEMBER( mc68328_device::write ) { - UINT32 address = offset << 1; - UINT16 temp16[4] = { 0 }; - UINT32 imr_old = m_regs.imr, imr_diff; + uint32_t address = offset << 1; + uint16_t temp16[4] = { 0 }; + uint32_t imr_old = m_regs.imr, imr_diff; switch (address) { @@ -1300,8 +1300,8 @@ WRITE16_MEMBER( mc68328_device::write ) if ((m_regs.pwmc & PWMC_PWMEN) != 0 && m_regs.pwmw != 0 && m_regs.pwmp != 0) { - UINT32 frequency = 32768 * 506; - UINT32 divisor = 4 << (m_regs.pwmc & PWMC_CLKSEL); // ?? Datasheet says 2 <<, but then we're an octave higher than CoPilot. + uint32_t frequency = 32768 * 506; + uint32_t divisor = 4 << (m_regs.pwmc & PWMC_CLKSEL); // ?? Datasheet says 2 <<, but then we're an octave higher than CoPilot. attotime period; frequency /= divisor; period = attotime::from_hz(frequency) * m_regs.pwmw; @@ -1794,8 +1794,8 @@ WRITE16_MEMBER( mc68328_device::write ) READ16_MEMBER( mc68328_device::read ) { - UINT16 temp16; - UINT32 address = offset << 1; + uint16_t temp16; + uint32_t address = offset << 1; switch (address) { @@ -2692,11 +2692,11 @@ READ16_MEMBER( mc68328_device::read ) } /* THIS IS PRETTY MUCH TOTALLY WRONG AND DOESN'T REFLECT THE MC68328'S INTERNAL FUNCTIONALITY AT ALL! */ -UINT32 mc68328_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t mc68328_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT16 *video_ram = (UINT16 *)(machine().device(RAM_TAG)->pointer() + (m_regs.lssa & 0x00ffffff)); - UINT16 word; - UINT16 *line; + uint16_t *video_ram = (uint16_t *)(machine().device(RAM_TAG)->pointer() + (m_regs.lssa & 0x00ffffff)); + uint16_t word; + uint16_t *line; int y, x, b; if (m_regs.lckcon & LCKCON_LCDC_EN) diff --git a/src/devices/machine/mc68328.h b/src/devices/machine/mc68328.h index c01e2ab471b..ac58dff85c8 100644 --- a/src/devices/machine/mc68328.h +++ b/src/devices/machine/mc68328.h @@ -412,201 +412,201 @@ struct mc68328_regs_t { // $(FF)FFF000 - UINT8 scr; // System Control Register - UINT8 unused0[255]; + uint8_t scr; // System Control Register + uint8_t unused0[255]; // $(FF)FFF100 - UINT16 grpbasea; // Chip Select Group A Base Register - UINT16 grpbaseb; // Chip Select Group B Base Register - UINT16 grpbasec; // Chip Select Group C Base Register - UINT16 grpbased; // Chip Select Group D Base Register - UINT16 grpmaska; // Chip Select Group A Mask Register - UINT16 grpmaskb; // Chip Select Group B Mask Register - UINT16 grpmaskc; // Chip Select Group C Mask Register - UINT16 grpmaskd; // Chip Select Group D Mask Register - UINT32 csa0; // Group A Chip Select 0 Register - UINT32 csa1; // Group A Chip Select 1 Register - UINT32 csa2; // Group A Chip Select 2 Register - UINT32 csa3; // Group A Chip Select 3 Register - UINT32 csb0; // Group B Chip Select 0 Register - UINT32 csb1; // Group B Chip Select 1 Register - UINT32 csb2; // Group B Chip Select 2 Register - UINT32 csb3; // Group B Chip Select 3 Register - UINT32 csc0; // Group C Chip Select 0 Register - UINT32 csc1; // Group C Chip Select 1 Register - UINT32 csc2; // Group C Chip Select 2 Register - UINT32 csc3; // Group C Chip Select 3 Register - UINT32 csd0; // Group D Chip Select 0 Register - UINT32 csd1; // Group D Chip Select 1 Register - UINT32 csd2; // Group D Chip Select 2 Register - UINT32 csd3; // Group D Chip Select 3 Register - UINT8 unused1[176]; + uint16_t grpbasea; // Chip Select Group A Base Register + uint16_t grpbaseb; // Chip Select Group B Base Register + uint16_t grpbasec; // Chip Select Group C Base Register + uint16_t grpbased; // Chip Select Group D Base Register + uint16_t grpmaska; // Chip Select Group A Mask Register + uint16_t grpmaskb; // Chip Select Group B Mask Register + uint16_t grpmaskc; // Chip Select Group C Mask Register + uint16_t grpmaskd; // Chip Select Group D Mask Register + uint32_t csa0; // Group A Chip Select 0 Register + uint32_t csa1; // Group A Chip Select 1 Register + uint32_t csa2; // Group A Chip Select 2 Register + uint32_t csa3; // Group A Chip Select 3 Register + uint32_t csb0; // Group B Chip Select 0 Register + uint32_t csb1; // Group B Chip Select 1 Register + uint32_t csb2; // Group B Chip Select 2 Register + uint32_t csb3; // Group B Chip Select 3 Register + uint32_t csc0; // Group C Chip Select 0 Register + uint32_t csc1; // Group C Chip Select 1 Register + uint32_t csc2; // Group C Chip Select 2 Register + uint32_t csc3; // Group C Chip Select 3 Register + uint32_t csd0; // Group D Chip Select 0 Register + uint32_t csd1; // Group D Chip Select 1 Register + uint32_t csd2; // Group D Chip Select 2 Register + uint32_t csd3; // Group D Chip Select 3 Register + uint8_t unused1[176]; // $(FF)FFF200 - UINT16 pllcr; // PLL Control Register - UINT16 pllfsr; // PLL Frequency Select Register - UINT8 pad2[3]; - UINT8 pctlr; // Power Control Register - UINT8 unused3[248]; + uint16_t pllcr; // PLL Control Register + uint16_t pllfsr; // PLL Frequency Select Register + uint8_t pad2[3]; + uint8_t pctlr; // Power Control Register + uint8_t unused3[248]; // $(FF)FFF300 - UINT8 ivr; // Interrupt Vector Register - UINT8 unused4[1]; - UINT16 icr; // Interrupt Control Register - UINT32 imr; // Interrupt Mask Register - UINT32 iwr; // Interrupt Wakeup Enable Register - UINT32 isr; // Interrupt Status Register - UINT32 ipr; // Interrupt Pending Register - UINT8 unused5[236]; + uint8_t ivr; // Interrupt Vector Register + uint8_t unused4[1]; + uint16_t icr; // Interrupt Control Register + uint32_t imr; // Interrupt Mask Register + uint32_t iwr; // Interrupt Wakeup Enable Register + uint32_t isr; // Interrupt Status Register + uint32_t ipr; // Interrupt Pending Register + uint8_t unused5[236]; // $(FF)FFF400 - UINT8 padir; // Port A Direction Register - UINT8 padata; // Port A Data Register - UINT8 unused6[1]; - UINT8 pasel; // Port A Select Register - UINT8 unused7[4]; - - UINT8 pbdir; // Port B Direction Register - UINT8 pbdata; // Port B Data Register - UINT8 unused8[1]; - UINT8 pbsel; // Port B Select Register - UINT8 unused9[4]; - - UINT8 pcdir; // Port C Direction Register - UINT8 pcdata; // Port C Data Register - UINT8 unused10[1]; - UINT8 pcsel; // Port C Select Register - UINT8 unused11[4]; - - UINT8 pddir; // Port D Direction Register - UINT8 pddata; // Port D Data Register - UINT8 pdpuen; // Port D Pullup Enable Register - UINT8 unused12[1]; - UINT8 pdpol; // Port D Polarity Register - UINT8 pdirqen; // Port D IRQ Enable Register - UINT8 pddataedge; // Port D Data Edge Level - UINT8 pdirqedge; // Port D IRQ Edge Register - - UINT8 pedir; // Port E Direction Register - UINT8 pedata; // Port E Data Register - UINT8 pepuen; // Port E Pullup Enable Register - UINT8 pesel; // Port E Select Register - UINT8 unused14[4]; - - UINT8 pfdir; // Port F Direction Register - UINT8 pfdata; // Port F Data Register - UINT8 pfpuen; // Port F Pullup Enable Register - UINT8 pfsel; // Port F Select Register - UINT8 unused15[4]; - - UINT8 pgdir; // Port G Direction Register - UINT8 pgdata; // Port G Data Register - UINT8 pgpuen; // Port G Pullup Enable Register - UINT8 pgsel; // Port G Select Register - UINT8 unused16[4]; - - UINT8 pjdir; // Port J Direction Register - UINT8 pjdata; // Port J Data Register - UINT8 unused17[1]; - UINT8 pjsel; // Port J Select Register - UINT8 unused18[4]; - UINT8 pkdir; // Port K Direction Register - UINT8 pkdata; // Port K Data Register - UINT8 pkpuen; // Port K Pullup Enable Register - UINT8 pksel; // Port K Select Register - UINT8 unused19[4]; - - UINT8 pmdir; // Port M Direction Register - UINT8 pmdata; // Port M Data Register - UINT8 pmpuen; // Port M Pullup Enable Register - UINT8 pmsel; // Port M Select Register - UINT8 unused20[180]; + uint8_t padir; // Port A Direction Register + uint8_t padata; // Port A Data Register + uint8_t unused6[1]; + uint8_t pasel; // Port A Select Register + uint8_t unused7[4]; + + uint8_t pbdir; // Port B Direction Register + uint8_t pbdata; // Port B Data Register + uint8_t unused8[1]; + uint8_t pbsel; // Port B Select Register + uint8_t unused9[4]; + + uint8_t pcdir; // Port C Direction Register + uint8_t pcdata; // Port C Data Register + uint8_t unused10[1]; + uint8_t pcsel; // Port C Select Register + uint8_t unused11[4]; + + uint8_t pddir; // Port D Direction Register + uint8_t pddata; // Port D Data Register + uint8_t pdpuen; // Port D Pullup Enable Register + uint8_t unused12[1]; + uint8_t pdpol; // Port D Polarity Register + uint8_t pdirqen; // Port D IRQ Enable Register + uint8_t pddataedge; // Port D Data Edge Level + uint8_t pdirqedge; // Port D IRQ Edge Register + + uint8_t pedir; // Port E Direction Register + uint8_t pedata; // Port E Data Register + uint8_t pepuen; // Port E Pullup Enable Register + uint8_t pesel; // Port E Select Register + uint8_t unused14[4]; + + uint8_t pfdir; // Port F Direction Register + uint8_t pfdata; // Port F Data Register + uint8_t pfpuen; // Port F Pullup Enable Register + uint8_t pfsel; // Port F Select Register + uint8_t unused15[4]; + + uint8_t pgdir; // Port G Direction Register + uint8_t pgdata; // Port G Data Register + uint8_t pgpuen; // Port G Pullup Enable Register + uint8_t pgsel; // Port G Select Register + uint8_t unused16[4]; + + uint8_t pjdir; // Port J Direction Register + uint8_t pjdata; // Port J Data Register + uint8_t unused17[1]; + uint8_t pjsel; // Port J Select Register + uint8_t unused18[4]; + uint8_t pkdir; // Port K Direction Register + uint8_t pkdata; // Port K Data Register + uint8_t pkpuen; // Port K Pullup Enable Register + uint8_t pksel; // Port K Select Register + uint8_t unused19[4]; + + uint8_t pmdir; // Port M Direction Register + uint8_t pmdata; // Port M Data Register + uint8_t pmpuen; // Port M Pullup Enable Register + uint8_t pmsel; // Port M Select Register + uint8_t unused20[180]; // $(FF)FFF500 - UINT16 pwmc; // PWM Control Register - UINT16 pwmp; // PWM Period Register - UINT16 pwmw; // PWM Width Register - UINT16 pwmcnt; // PWN Counter - UINT8 unused21[248]; + uint16_t pwmc; // PWM Control Register + uint16_t pwmp; // PWM Period Register + uint16_t pwmw; // PWM Width Register + uint16_t pwmcnt; // PWN Counter + uint8_t unused21[248]; // $(FF)FFF600 - UINT16 tctl[2]; // Timer Control Register - UINT16 tprer[2]; // Timer Prescaler Register - UINT16 tcmp[2]; // Timer Compare Register - UINT16 tcr[2]; // Timer Capture Register - UINT16 tcn[2]; // Timer Counter - UINT16 tstat[2]; // Timer Status - UINT16 wctlr; // Watchdog Control Register - UINT16 wcmpr; // Watchdog Compare Register - UINT16 wcn; // Watchdog Counter - UINT8 tclear[2]; // Timer Clearable Status - UINT8 unused22[224]; + uint16_t tctl[2]; // Timer Control Register + uint16_t tprer[2]; // Timer Prescaler Register + uint16_t tcmp[2]; // Timer Compare Register + uint16_t tcr[2]; // Timer Capture Register + uint16_t tcn[2]; // Timer Counter + uint16_t tstat[2]; // Timer Status + uint16_t wctlr; // Watchdog Control Register + uint16_t wcmpr; // Watchdog Compare Register + uint16_t wcn; // Watchdog Counter + uint8_t tclear[2]; // Timer Clearable Status + uint8_t unused22[224]; // $(FF)FFF700 - UINT16 spisr; // SPIS Register - UINT8 unused23[254]; + uint16_t spisr; // SPIS Register + uint8_t unused23[254]; // $(FF)FFF800 - UINT16 spimdata; // SPIM Data Register - UINT16 spimcont; // SPIM Control/Status Register - UINT8 unused24[252]; + uint16_t spimdata; // SPIM Data Register + uint16_t spimcont; // SPIM Control/Status Register + uint8_t unused24[252]; // $(FF)FFF900 - UINT16 ustcnt; // UART Status/Control Register - UINT16 ubaud; // UART Baud Control Register - UINT16 urx; // UART RX Register - UINT16 utx; // UART TX Register - UINT16 umisc; // UART Misc Register - UINT8 unused25[246]; + uint16_t ustcnt; // UART Status/Control Register + uint16_t ubaud; // UART Baud Control Register + uint16_t urx; // UART RX Register + uint16_t utx; // UART TX Register + uint16_t umisc; // UART Misc Register + uint8_t unused25[246]; // $(FF)FFFA00 - UINT32 lssa; // Screen Starting Address Register - UINT8 unused26[1]; - UINT8 lvpw; // Virtual Page Width Register - UINT8 unused27[2]; - UINT16 lxmax; // Screen Width Register - UINT16 lymax; // Screen Height Register - UINT8 unused28[12]; - UINT16 lcxp; // Cursor X Position - UINT16 lcyp; // Cursor Y Position - UINT16 lcwch; // Cursor Width & Height Register - UINT8 unused29[1]; - UINT8 lblkc; // Blink Control Register - UINT8 lpicf; // Panel Interface Config Register - UINT8 lpolcf; // Polarity Config Register - UINT8 unused30[1]; - UINT8 lacdrc; // ACD (M) Rate Control Register - UINT8 unused31[1]; - UINT8 lpxcd; // Pixel Clock Divider Register - UINT8 unused32[1]; - UINT8 lckcon; // Clocking Control Register - UINT8 unused33[1]; - UINT8 llbar; // Last Buffer Address Register - UINT8 unused34[1]; - UINT8 lotcr; // Octet Terminal Count Register - UINT8 unused35[1]; - UINT8 lposr; // Panning Offset Register - UINT8 unused36[3]; - UINT8 lfrcm; // Frame Rate Control Modulation Register - UINT16 lgpmr; // Gray Palette Mapping Register - UINT8 unused37[204]; + uint32_t lssa; // Screen Starting Address Register + uint8_t unused26[1]; + uint8_t lvpw; // Virtual Page Width Register + uint8_t unused27[2]; + uint16_t lxmax; // Screen Width Register + uint16_t lymax; // Screen Height Register + uint8_t unused28[12]; + uint16_t lcxp; // Cursor X Position + uint16_t lcyp; // Cursor Y Position + uint16_t lcwch; // Cursor Width & Height Register + uint8_t unused29[1]; + uint8_t lblkc; // Blink Control Register + uint8_t lpicf; // Panel Interface Config Register + uint8_t lpolcf; // Polarity Config Register + uint8_t unused30[1]; + uint8_t lacdrc; // ACD (M) Rate Control Register + uint8_t unused31[1]; + uint8_t lpxcd; // Pixel Clock Divider Register + uint8_t unused32[1]; + uint8_t lckcon; // Clocking Control Register + uint8_t unused33[1]; + uint8_t llbar; // Last Buffer Address Register + uint8_t unused34[1]; + uint8_t lotcr; // Octet Terminal Count Register + uint8_t unused35[1]; + uint8_t lposr; // Panning Offset Register + uint8_t unused36[3]; + uint8_t lfrcm; // Frame Rate Control Modulation Register + uint16_t lgpmr; // Gray Palette Mapping Register + uint8_t unused37[204]; // $(FF)FFFB00 - UINT32 hmsr; // RTC Hours Minutes Seconds Register - UINT32 alarm; // RTC Alarm Register - UINT8 unused38[4]; - UINT16 rtcctl; // RTC Control Register - UINT16 rtcisr; // RTC Interrupt Status Register - UINT16 rtcienr; // RTC Interrupt Enable Register - UINT16 stpwtch; // Stopwatch Minutes - UINT8 unused42[1260]; + uint32_t hmsr; // RTC Hours Minutes Seconds Register + uint32_t alarm; // RTC Alarm Register + uint8_t unused38[4]; + uint16_t rtcctl; // RTC Control Register + uint16_t rtcisr; // RTC Interrupt Status Register + uint16_t rtcienr; // RTC Interrupt Enable Register + uint16_t stpwtch; // Stopwatch Minutes + uint8_t unused42[1260]; }; class mc68328_device : public device_t { public: - mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mc68328_device() {} static void static_set_cpu_tag(device_t &device, const char *tag) { downcast(device).m_cpu.set_tag(tag); } @@ -639,9 +639,9 @@ public: DECLARE_WRITE16_MEMBER(write); DECLARE_READ16_MEMBER(read); DECLARE_WRITE_LINE_MEMBER(set_penirq_line); - void set_port_d_lines(UINT8 state, int bit); + void set_port_d_lines(uint8_t state, int bit); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: // device-level overrides @@ -650,11 +650,11 @@ protected: private: // internal state - void set_interrupt_line(UINT32 line, UINT32 active); + void set_interrupt_line(uint32_t line, uint32_t active); void poll_port_d_interrupts(); - UINT32 get_timer_frequency(UINT32 index); - void maybe_start_timer(UINT32 index, UINT32 new_enable); - void timer_compare_event(UINT32 index); + uint32_t get_timer_frequency(uint32_t index); + void maybe_start_timer(uint32_t index, uint32_t new_enable); + void timer_compare_event(uint32_t index); void register_state_save(); diff --git a/src/devices/machine/mc6843.cpp b/src/devices/machine/mc6843.cpp index 04a7b6a0906..a7b0684d2cd 100644 --- a/src/devices/machine/mc6843.cpp +++ b/src/devices/machine/mc6843.cpp @@ -74,7 +74,7 @@ static const char *const mc6843_cmd[16] = const device_type MC6843 = &device_creator; -mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC6843, "MC6843 floppy controller", tag, owner, clock, "mc6843", __FILE__), m_write_irq(*this), m_CTAR(0), @@ -164,7 +164,7 @@ void mc6843_device::device_reset() -legacy_floppy_image_device* mc6843_device::floppy_image( UINT8 drive ) +legacy_floppy_image_device* mc6843_device::floppy_image( uint8_t drive ) { legacy_floppy_image_device *img = floppy_get_device( machine(), drive ); if (!img && owner()) { @@ -480,7 +480,7 @@ void mc6843_device::device_timer(emu_timer &timer, device_timer_id id, int param READ8_MEMBER( mc6843_device::read ) { - UINT8 data = 0; + uint8_t data = 0; switch ( offset ) { case 0: /* Data Input Register (DIR) */ @@ -680,7 +680,7 @@ WRITE8_MEMBER( mc6843_device::write ) else if ( (cmd == CMD_FFW) && FWF ) { /* assume we are formatting */ - UINT8 nibble; + uint8_t nibble; nibble = (data & 0x01) | ((data & 0x04) >> 1 )| @@ -704,9 +704,9 @@ WRITE8_MEMBER( mc6843_device::write ) { /* valid address id field */ legacy_floppy_image_device* img = floppy_image( ); - UINT8 track = m_data[1]; - UINT8 sector = m_data[3]; - UINT8 filler = 0xe5; /* standard Thomson filler */ + uint8_t track = m_data[1]; + uint8_t sector = m_data[3]; + uint8_t filler = 0xe5; /* standard Thomson filler */ LOG(( "%f %s mc6843_w: address id detected track=%i sector=%i\n", machine().time().as_double(), machine().describe_context(), track, sector)); img->floppy_drive_format_sector( m_side, sector, track, 0, sector, 0, filler ); } diff --git a/src/devices/machine/mc6843.h b/src/devices/machine/mc6843.h index 9dea3271e0d..73b21140f1a 100644 --- a/src/devices/machine/mc6843.h +++ b/src/devices/machine/mc6843.h @@ -19,7 +19,7 @@ class mc6843_device : public device_t { public: - mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mc6843_device() {} template static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } @@ -46,30 +46,30 @@ private: devcb_write_line m_write_irq; /* registers */ - UINT8 m_CTAR; /* current track */ - UINT8 m_CMR; /* command */ - UINT8 m_ISR; /* interrupt status */ - UINT8 m_SUR; /* set-up */ - UINT8 m_STRA; /* status */ - UINT8 m_STRB; /* status */ - UINT8 m_SAR; /* sector address */ - UINT8 m_GCR; /* general count */ - UINT8 m_CCR; /* CRC control */ - UINT8 m_LTAR; /* logical address track (=track destination) */ + uint8_t m_CTAR; /* current track */ + uint8_t m_CMR; /* command */ + uint8_t m_ISR; /* interrupt status */ + uint8_t m_SUR; /* set-up */ + uint8_t m_STRA; /* status */ + uint8_t m_STRB; /* status */ + uint8_t m_SAR; /* sector address */ + uint8_t m_GCR; /* general count */ + uint8_t m_CCR; /* CRC control */ + uint8_t m_LTAR; /* logical address track (=track destination) */ /* internal state */ - UINT8 m_drive; - UINT8 m_side; - UINT8 m_data[128]; /* sector buffer */ - UINT32 m_data_size; /* size of data */ - UINT32 m_data_idx; /* current read/write position in data */ - UINT32 m_data_id; /* chrd_id for sector write */ - UINT8 m_index_pulse; + uint8_t m_drive; + uint8_t m_side; + uint8_t m_data[128]; /* sector buffer */ + uint32_t m_data_size; /* size of data */ + uint32_t m_data_idx; /* current read/write position in data */ + uint32_t m_data_id; /* chrd_id for sector write */ + uint8_t m_index_pulse; /* trigger delayed actions (bottom halves) */ emu_timer* m_timer_cont; - legacy_floppy_image_device* floppy_image(UINT8 drive); + legacy_floppy_image_device* floppy_image(uint8_t drive); legacy_floppy_image_device* floppy_image(); void status_update(); void cmd_end(); diff --git a/src/devices/machine/mc6846.cpp b/src/devices/machine/mc6846.cpp index 5958ba87f9b..d2cbc0ecdbb 100644 --- a/src/devices/machine/mc6846.cpp +++ b/src/devices/machine/mc6846.cpp @@ -45,7 +45,7 @@ const device_type MC6846 = &device_creator; -mc6846_device::mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc6846_device::mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC6846, "MC6846 Programmable Timer", tag, owner, clock, "mc6846", __FILE__), m_out_port_cb(*this), m_out_cp1_cb(*this), @@ -125,7 +125,7 @@ void mc6846_device::device_reset() } -inline UINT16 mc6846_device::counter() +inline uint16_t mc6846_device::counter() { if ( m_timer_started ) { @@ -477,7 +477,7 @@ WRITE8_MEMBER(mc6846_device::write) break; case 7: - m_latch = ( ((UINT16) m_time_MSB) << 8 ) + data; + m_latch = ( ((uint16_t) m_time_MSB) << 8 ) + data; LOG (( "%s %f: mc6846 COUNT write %i\n", machine().describe_context(), space.machine().time().as_double(), m_latch )); if (!(m_tcr & 0x38)) { @@ -541,28 +541,28 @@ void mc6846_device::set_input_cp2(int data) -UINT8 mc6846_device::get_output_port() +uint8_t mc6846_device::get_output_port() { return PORT; } -UINT8 mc6846_device::get_output_cto() +uint8_t mc6846_device::get_output_cto() { return CTO; } -UINT8 mc6846_device::get_output_cp2() +uint8_t mc6846_device::get_output_cp2() { return m_cp2_cpu; } -UINT16 mc6846_device::get_preset() +uint16_t mc6846_device::get_preset() { return m_preset; } diff --git a/src/devices/machine/mc6846.h b/src/devices/machine/mc6846.h index b174000b739..ef8794c1ebc 100644 --- a/src/devices/machine/mc6846.h +++ b/src/devices/machine/mc6846.h @@ -34,7 +34,7 @@ class mc6846_device : public device_t { public: - mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mc6846_device() {} template static devcb_base &set_out_port_callback(device_t &device, _Object object) { return downcast(device).m_out_port_cb.set_callback(object); } @@ -53,12 +53,12 @@ public: void set_input_cp2(int data); /* polling from outside world */ - UINT8 get_output_port(); - UINT8 get_output_cto(); - UINT8 get_output_cp2(); + uint8_t get_output_port(); + uint8_t get_output_cto(); + uint8_t get_output_cp2(); /* partial access to internal state */ - UINT16 get_preset(); /* timer interval - 1 in us */ + uint16_t get_preset(); /* timer interval - 1 in us */ protected: // device-level overrides @@ -69,26 +69,26 @@ private: // internal state /* registers */ - UINT8 m_csr; /* 0,4: combination status register */ - UINT8 m_pcr; /* 1: peripheral control register */ - UINT8 m_ddr; /* 2: data direction register */ - UINT8 m_pdr; /* 3: peripheral data register (last cpu write) */ - UINT8 m_tcr; /* 5: timer control register */ + uint8_t m_csr; /* 0,4: combination status register */ + uint8_t m_pcr; /* 1: peripheral control register */ + uint8_t m_ddr; /* 2: data direction register */ + uint8_t m_pdr; /* 3: peripheral data register (last cpu write) */ + uint8_t m_tcr; /* 5: timer control register */ /* lines */ - UINT8 m_cp1; /* 1-bit input */ - UINT8 m_cp2; /* 1-bit input/output: last external write */ - UINT8 m_cp2_cpu; /* last cpu write */ - UINT8 m_cto; /* 1-bit timer output (unmasked) */ + uint8_t m_cp1; /* 1-bit input */ + uint8_t m_cp2; /* 1-bit input/output: last external write */ + uint8_t m_cp2_cpu; /* last cpu write */ + uint8_t m_cto; /* 1-bit timer output (unmasked) */ /* internal state */ - UINT8 m_time_MSB; /* MSB buffer register */ - UINT8 m_csr0_to_be_cleared; - UINT8 m_csr1_to_be_cleared; - UINT8 m_csr2_to_be_cleared; - UINT16 m_latch; /* timer latch */ - UINT16 m_preset; /* preset value */ - UINT8 m_timer_started; + uint8_t m_time_MSB; /* MSB buffer register */ + uint8_t m_csr0_to_be_cleared; + uint8_t m_csr1_to_be_cleared; + uint8_t m_csr2_to_be_cleared; + uint16_t m_latch; /* timer latch */ + uint16_t m_preset; /* preset value */ + uint8_t m_timer_started; /* timers */ emu_timer *m_interval; /* interval programmable timer */ @@ -111,7 +111,7 @@ private: int m_old_cif; int m_old_cto; - inline UINT16 counter(); + inline uint16_t counter(); inline void update_irq(); inline void update_cto(); inline void timer_launch(); diff --git a/src/devices/machine/mc6852.cpp b/src/devices/machine/mc6852.cpp index e4a5ffbf1fd..fe0c25e86da 100644 --- a/src/devices/machine/mc6852.cpp +++ b/src/devices/machine/mc6852.cpp @@ -48,7 +48,7 @@ const device_type MC6852 = &device_creator; // mc6852_device - constructor //------------------------------------------------- -mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC6852, "MC6852", tag, owner, clock, "mc6852", __FILE__), device_serial_interface(mconfig, *this), m_write_tx_data(*this), @@ -101,8 +101,8 @@ void mc6852_device::device_start() void mc6852_device::device_reset() { - m_rx_fifo = std::queue(); - m_tx_fifo = std::queue(); + m_rx_fifo = std::queue(); + m_tx_fifo = std::queue(); receive_register_reset(); transmit_register_reset(); @@ -163,7 +163,7 @@ void mc6852_device::rcv_complete() READ8_MEMBER( mc6852_device::read ) { - UINT8 data = 0; + uint8_t data = 0; if (BIT(offset, 0)) { diff --git a/src/devices/machine/mc6852.h b/src/devices/machine/mc6852.h index 4987c64729b..1e0bdeb00c4 100644 --- a/src/devices/machine/mc6852.h +++ b/src/devices/machine/mc6852.h @@ -66,7 +66,7 @@ class mc6852_device : public device_t, { public: // construction/destruction - mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void set_rx_clock(device_t &device, int clock) { downcast(device).m_rx_clock = clock; } static void set_tx_clock(device_t &device, int clock) { downcast(device).m_tx_clock = clock; } @@ -155,16 +155,16 @@ private: devcb_write_line m_write_sm_dtr; devcb_write_line m_write_tuf; - UINT8 m_status; // status register - UINT8 m_cr[3]; // control registers - UINT8 m_scr; // sync code register - UINT8 m_tdr; // transmit data register - UINT8 m_tsr; // transmit shift register - UINT8 m_rdr; // receive data register - UINT8 m_rsr; // receive shift register + uint8_t m_status; // status register + uint8_t m_cr[3]; // control registers + uint8_t m_scr; // sync code register + uint8_t m_tdr; // transmit data register + uint8_t m_tsr; // transmit shift register + uint8_t m_rdr; // receive data register + uint8_t m_rsr; // receive shift register - std::queue m_rx_fifo; - std::queue m_tx_fifo; + std::queue m_rx_fifo; + std::queue m_tx_fifo; int m_rx_clock; int m_tx_clock; diff --git a/src/devices/machine/mc6854.cpp b/src/devices/machine/mc6854.cpp index 3461d58dde5..079d138966e 100644 --- a/src/devices/machine/mc6854.cpp +++ b/src/devices/machine/mc6854.cpp @@ -167,7 +167,7 @@ static const int word_length[4] = { 5, 6, 7, 8 }; const device_type MC6854 = &device_creator; -mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC6854, "MC6854 ADLC", tag, owner, clock, "mc6854", __FILE__), m_out_irq_cb(*this), m_out_txd_cb(*this), @@ -262,14 +262,14 @@ void mc6854_device::device_reset() /* MC6854 fills bit queue */ -void mc6854_device::send_bits( UINT32 data, int len, int zi ) +void mc6854_device::send_bits( uint32_t data, int len, int zi ) { attotime expire; int i; if ( zi ) { /* zero-insertion mode */ - UINT32 d = 0; + uint32_t d = 0; int l = 0; for ( i = 0; i < len; i++, data >>= 1, l++ ) { @@ -310,7 +310,7 @@ void mc6854_device::send_bits( UINT32 data, int len, int zi ) /* CPU push -> tfifo[0] -> ... -> tfifo[MC6854_FIFO_SIZE-1] -> pop */ -void mc6854_device::tfifo_push( UINT8 data ) +void mc6854_device::tfifo_push( uint8_t data ) { int i; @@ -476,7 +476,7 @@ void mc6854_device::tfifo_clear( ) /* MC6854 pushes a field in the FIFO */ -void mc6854_device::rfifo_push( UINT8 d ) +void mc6854_device::rfifo_push( uint8_t d ) { int i, blen = 8; unsigned data = d; @@ -577,7 +577,7 @@ void mc6854_device::rfifo_terminate( ) /* CPU pops the FIFO */ -UINT8 mc6854_device::rfifo_pop( ) +uint8_t mc6854_device::rfifo_pop( ) { int i, data = m_rfifo[ MC6854_FIFO_SIZE - 1 ]; @@ -684,7 +684,7 @@ void mc6854_device::rfifo_clear( ) -int mc6854_device::send_frame( UINT8* data, int len ) +int mc6854_device::send_frame( uint8_t* data, int len ) { if ( m_rstate > 1 || m_tstate > 1 || RTS ) return -1; /* busy */ @@ -837,7 +837,7 @@ READ8_MEMBER( mc6854_device::read ) case 2: /* receiver data register */ case 3: { - UINT8 data = rfifo_pop( ); + uint8_t data = rfifo_pop( ); LOG(( "%f %s mc6854_r: get data $%02X\n", space.machine().time().as_double(), machine().describe_context(), data )); return data; diff --git a/src/devices/machine/mc6854.h b/src/devices/machine/mc6854.h index 9c665d0429b..7f6c3ef9fc3 100644 --- a/src/devices/machine/mc6854.h +++ b/src/devices/machine/mc6854.h @@ -18,8 +18,8 @@ #define MC6854_FIFO_SIZE 3 /* hardcoded size of the 6854 FIFO (this is a hardware limit) */ -typedef device_delegate mc6854_out_frame_delegate; -#define MC6854_OUT_FRAME_CB(name) void name(UINT8 * data, int length) +typedef device_delegate mc6854_out_frame_delegate; +#define MC6854_OUT_FRAME_CB(name) void name(uint8_t * data, int length) #define MCFG_MC6854_OUT_IRQ_CB(_devcb) \ @@ -41,7 +41,7 @@ typedef device_delegate mc6854_out_frame_delegat class mc6854_device : public device_t { public: - mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mc6854_device() {} template static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast(device).m_out_irq_cb.set_callback(object); } @@ -58,7 +58,7 @@ public: DECLARE_WRITE_LINE_MEMBER( set_rx ); /* high-level, frame-based interface */ - int send_frame( UINT8* data, int length ); /* ret -1 if busy */ + int send_frame( uint8_t* data, int length ); /* ret -1 if busy */ /* control lines */ DECLARE_WRITE_LINE_MEMBER( set_cts ); /* 1 = clear-to-send, 0 = busy */ @@ -88,27 +88,27 @@ private: devcb_write_line m_out_dtr_cb; /* 1 = data transmit ready, 0 = busy */ /* registers */ - UINT8 m_cr1, m_cr2, m_cr3, m_cr4; /* control registers */ - UINT8 m_sr1, m_sr2; /* status registers */ + uint8_t m_cr1, m_cr2, m_cr3, m_cr4; /* control registers */ + uint8_t m_sr1, m_sr2; /* status registers */ - UINT8 m_cts, m_dcd; + uint8_t m_cts, m_dcd; /* transmit state */ - UINT8 m_tstate; - UINT16 m_tfifo[MC6854_FIFO_SIZE]; /* X x 8-bit FIFO + full & last marker bits */ - UINT8 m_tones; /* counter for zero-insertion */ + uint8_t m_tstate; + uint16_t m_tfifo[MC6854_FIFO_SIZE]; /* X x 8-bit FIFO + full & last marker bits */ + uint8_t m_tones; /* counter for zero-insertion */ emu_timer *m_ttimer; /* when to ask for more data */ /* receive state */ - UINT8 m_rstate; - UINT32 m_rreg; /* shift register */ - UINT8 m_rones; /* count '1 bits */ - UINT8 m_rsize; /* bits in the shift register */ - UINT16 m_rfifo[MC6854_FIFO_SIZE]; /* X x 8-bit FIFO + full & addr marker bits */ + uint8_t m_rstate; + uint32_t m_rreg; /* shift register */ + uint8_t m_rones; /* count '1 bits */ + uint8_t m_rsize; /* bits in the shift register */ + uint16_t m_rfifo[MC6854_FIFO_SIZE]; /* X x 8-bit FIFO + full & addr marker bits */ /* frame-based interface*/ - UINT8 m_frame[MAX_FRAME_LENGTH]; - UINT32 m_flen, m_fpos; + uint8_t m_frame[MAX_FRAME_LENGTH]; + uint32_t m_flen, m_fpos; /* meaning of tstate / rtate: @@ -120,15 +120,15 @@ private: 6 = variable-length data field(s) */ - void send_bits( UINT32 data, int len, int zi ); - void tfifo_push( UINT8 data ); + void send_bits( uint32_t data, int len, int zi ); + void tfifo_push( uint8_t data ); void tfifo_terminate( ); TIMER_CALLBACK_MEMBER(tfifo_cb); void tfifo_clear( ); - void rfifo_push( UINT8 d ); + void rfifo_push( uint8_t d ); void rfifo_terminate( ); - UINT8 rfifo_pop( ); + uint8_t rfifo_pop( ); void rfifo_clear( ); void update_sr2( ); diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp index de8ede60fda..577b9355c39 100644 --- a/src/devices/machine/mc68681.cpp +++ b/src/devices/machine/mc68681.cpp @@ -64,7 +64,7 @@ MACHINE_CONFIG_END // LIVE DEVICE //************************************************************************** -mc68681_device::mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc68681_device::mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC68681, "MC68681 DUART", tag, owner, clock, "mc68681", __FILE__), m_chanA(*this, CHANA_TAG), m_chanB(*this, CHANB_TAG), @@ -250,7 +250,7 @@ double mc68681_device::duart68681_get_ct_rate() return rate; } -UINT16 mc68681_device::duart68681_get_ct_count() +uint16_t mc68681_device::duart68681_get_ct_count() { double clock = duart68681_get_ct_rate(); return (duart_timer->remaining() * clock).as_double(); @@ -279,7 +279,7 @@ TIMER_CALLBACK_MEMBER( mc68681_device::duart_timer_callback ) // timer driving any serial channels? if (BIT(ACR, 7) == 1) { - UINT8 csr = m_chanA->get_chan_CSR(); + uint8_t csr = m_chanA->get_chan_CSR(); if ((csr & 0xf0) == 0xd0) // tx is timer driven { @@ -307,7 +307,7 @@ TIMER_CALLBACK_MEMBER( mc68681_device::duart_timer_callback ) update_interrupts(); } - int count = std::max(CTR.w.l, UINT16(1)); + int count = std::max(CTR.w.l, uint16_t(1)); duart68681_start_ct(count); } else @@ -322,7 +322,7 @@ TIMER_CALLBACK_MEMBER( mc68681_device::duart_timer_callback ) READ8_MEMBER( mc68681_device::read ) { - UINT8 r = 0xff; + uint8_t r = 0xff; offset &= 0xf; @@ -400,7 +400,7 @@ READ8_MEMBER( mc68681_device::read ) half_period = 0; } - int count = std::max(CTR.w.l, UINT16(1)); + int count = std::max(CTR.w.l, uint16_t(1)); duart68681_start_ct(count); break; } @@ -439,7 +439,7 @@ WRITE8_MEMBER( mc68681_device::write ) case 0x04: /* ACR */ { - UINT8 old_acr = ACR; + uint8_t old_acr = ACR; ACR = data; // bits 6-4: Counter/Timer Mode And Clock Source Select @@ -449,7 +449,7 @@ WRITE8_MEMBER( mc68681_device::write ) if (data & 0x40) { // Entering timer mode - UINT16 count = std::max(CTR.w.l, UINT16(1)); + uint16_t count = std::max(CTR.w.l, uint16_t(1)); half_period = 0; duart68681_start_ct(count); @@ -518,7 +518,7 @@ WRITE8_MEMBER( mc68681_device::write ) WRITE_LINE_MEMBER( mc68681_device::ip0_w ) { - UINT8 newIP = (IP_last_state & ~0x01) | ((state == ASSERT_LINE) ? 1 : 0); + uint8_t newIP = (IP_last_state & ~0x01) | ((state == ASSERT_LINE) ? 1 : 0); if (newIP != IP_last_state) { @@ -538,7 +538,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip0_w ) WRITE_LINE_MEMBER( mc68681_device::ip1_w ) { - UINT8 newIP = (IP_last_state & ~0x02) | ((state == ASSERT_LINE) ? 2 : 0); + uint8_t newIP = (IP_last_state & ~0x02) | ((state == ASSERT_LINE) ? 2 : 0); if (newIP != IP_last_state) { @@ -558,7 +558,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip1_w ) WRITE_LINE_MEMBER( mc68681_device::ip2_w ) { - UINT8 newIP = (IP_last_state & ~0x04) | ((state == ASSERT_LINE) ? 4 : 0); + uint8_t newIP = (IP_last_state & ~0x04) | ((state == ASSERT_LINE) ? 4 : 0); if (newIP != IP_last_state) { @@ -578,7 +578,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip2_w ) WRITE_LINE_MEMBER( mc68681_device::ip3_w ) { - UINT8 newIP = (IP_last_state & ~0x08) | ((state == ASSERT_LINE) ? 8 : 0); + uint8_t newIP = (IP_last_state & ~0x08) | ((state == ASSERT_LINE) ? 8 : 0); if (newIP != IP_last_state) { @@ -598,14 +598,14 @@ WRITE_LINE_MEMBER( mc68681_device::ip3_w ) WRITE_LINE_MEMBER( mc68681_device::ip4_w ) { - UINT8 newIP = (IP_last_state & ~0x10) | ((state == ASSERT_LINE) ? 0x10 : 0); + uint8_t newIP = (IP_last_state & ~0x10) | ((state == ASSERT_LINE) ? 0x10 : 0); // TODO: special mode for ip4 (Ch. A Rx clock) IP_last_state = newIP; } WRITE_LINE_MEMBER( mc68681_device::ip5_w ) { - UINT8 newIP = (IP_last_state & ~0x20) | ((state == ASSERT_LINE) ? 0x20 : 0); + uint8_t newIP = (IP_last_state & ~0x20) | ((state == ASSERT_LINE) ? 0x20 : 0); // TODO: special mode for ip5 (Ch. B Tx clock) IP_last_state = newIP; } @@ -620,7 +620,7 @@ mc68681_channel *mc68681_device::get_channel(int chan) return m_chanB; } -int mc68681_device::calc_baud(int ch, UINT8 data) +int mc68681_device::calc_baud(int ch, uint8_t data) { int baud_rate; @@ -676,7 +676,7 @@ void mc68681_device::set_ISR_bits(int mask) // DUART channel class stuff -mc68681_channel::mc68681_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc68681_channel::mc68681_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC68681_CHANNEL, "MC68681 DUART CHANNEL", tag, owner, clock, "mc68681_channel", __FILE__), device_serial_interface(mconfig, *this), MR1(0), @@ -908,9 +908,9 @@ void mc68681_channel::update_interrupts() //logerror("DEBUG: 68681 int check: after receiver test, SR%c is %02X, ISR is %02X\n", (ch+0x41), duart68681->channel[ch].SR, duart68681->ISR); } -UINT8 mc68681_channel::read_rx_fifo() +uint8_t mc68681_channel::read_rx_fifo() { - UINT8 rv; + uint8_t rv; // printf("read_rx_fifo: rx_fifo_num %d\n", rx_fifo_num); @@ -935,9 +935,9 @@ UINT8 mc68681_channel::read_rx_fifo() return rv; } -UINT8 mc68681_channel::read_chan_reg(int reg) +uint8_t mc68681_channel::read_chan_reg(int reg) { - UINT8 rv = 0xff; + uint8_t rv = 0xff; switch (reg) { @@ -968,7 +968,7 @@ UINT8 mc68681_channel::read_chan_reg(int reg) return rv; } -void mc68681_channel::write_chan_reg(int reg, UINT8 data) +void mc68681_channel::write_chan_reg(int reg, uint8_t data) { switch (reg) { @@ -995,7 +995,7 @@ void mc68681_channel::write_chan_reg(int reg, UINT8 data) } } -void mc68681_channel::write_MR(UINT8 data) +void mc68681_channel::write_MR(uint8_t data) { if ( MR_ptr == 0 ) { @@ -1070,7 +1070,7 @@ void mc68681_channel::recalc_framing() set_data_frame(1, (MR1 & 3)+5, parity, stopbits); } -void mc68681_channel::write_CR(UINT8 data) +void mc68681_channel::write_CR(uint8_t data) { CR = data; @@ -1148,7 +1148,7 @@ void mc68681_channel::write_CR(UINT8 data) update_interrupts(); } -void mc68681_channel::write_TX(UINT8 data) +void mc68681_channel::write_TX(uint8_t data) { tx_data = data; @@ -1178,7 +1178,7 @@ void mc68681_channel::ACR_updated() write_chan_reg(1, CSR); } -UINT8 mc68681_channel::get_chan_CSR() +uint8_t mc68681_channel::get_chan_CSR() { return CSR; } diff --git a/src/devices/machine/mc68681.h b/src/devices/machine/mc68681.h index abae110dbac..f2093fc66cc 100644 --- a/src/devices/machine/mc68681.h +++ b/src/devices/machine/mc68681.h @@ -38,7 +38,7 @@ class mc68681_device; class mc68681_channel : public device_t, public device_serial_interface { public: - mc68681_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc68681_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device-level overrides virtual void device_start() override; @@ -50,31 +50,31 @@ public: virtual void tra_complete() override; // Tx completed sending byte virtual void tra_callback() override; // Tx send bit - UINT8 read_chan_reg(int reg); - void write_chan_reg(int reg, UINT8 data); + uint8_t read_chan_reg(int reg); + void write_chan_reg(int reg, uint8_t data); void update_interrupts(); - UINT8 read_rx_fifo(); + uint8_t read_rx_fifo(); void ACR_updated(); - UINT8 get_chan_CSR(); + uint8_t get_chan_CSR(); private: /* Registers */ - UINT8 CR; /* Command register */ - UINT8 CSR; /* Clock select register */ - UINT8 MR1; /* Mode register 1 */ - UINT8 MR2; /* Mode register 2 */ - UINT8 MR_ptr; /* Mode register pointer */ - UINT8 SR; /* Status register */ + uint8_t CR; /* Command register */ + uint8_t CSR; /* Clock select register */ + uint8_t MR1; /* Mode register 1 */ + uint8_t MR2; /* Mode register 2 */ + uint8_t MR_ptr; /* Mode register pointer */ + uint8_t SR; /* Status register */ /* State */ int tx_baud_rate, rx_baud_rate; /* Receiver */ - UINT8 rx_enabled; - UINT8 rx_fifo[MC68681_RX_FIFO_SIZE]; + uint8_t rx_enabled; + uint8_t rx_fifo[MC68681_RX_FIFO_SIZE]; int rx_fifo_read_ptr; int rx_fifo_write_ptr; int rx_fifo_num; @@ -82,15 +82,15 @@ private: int m_ch; /* Transmitter */ - UINT8 tx_enabled; - UINT8 tx_data; - UINT8 tx_ready; + uint8_t tx_enabled; + uint8_t tx_data; + uint8_t tx_ready; mc68681_device *m_uart; - void write_MR(UINT8 data); - void write_CR(UINT8 data); - void write_TX(UINT8 data); + void write_MR(uint8_t data); + void write_CR(uint8_t data); + void write_TX(uint8_t data); void recalc_framing(); }; @@ -99,7 +99,7 @@ class mc68681_device : public device_t friend class mc68681_channel; public: - mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); required_device m_chanA; required_device m_chanB; @@ -110,10 +110,10 @@ public: // API DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); - UINT8 get_irq_vector() { m_read_vector = true; return IVR; } + uint8_t get_irq_vector() { m_read_vector = true; return IVR; } - DECLARE_WRITE_LINE_MEMBER( rx_a_w ) { m_chanA->device_serial_interface::rx_w((UINT8)state); } - DECLARE_WRITE_LINE_MEMBER( rx_b_w ) { m_chanB->device_serial_interface::rx_w((UINT8)state); } + DECLARE_WRITE_LINE_MEMBER( rx_a_w ) { m_chanA->device_serial_interface::rx_w((uint8_t)state); } + DECLARE_WRITE_LINE_MEMBER( rx_b_w ) { m_chanB->device_serial_interface::rx_w((uint8_t)state); } template static devcb_base &set_irq_cb(device_t &device, _Object object) { return downcast(device).write_irq.set_callback(object); } template static devcb_base &set_a_tx_cb(device_t &device, _Object object) { return downcast(device).write_a_tx.set_callback(object); } @@ -124,7 +124,7 @@ public: devcb_write_line write_irq, write_a_tx, write_b_tx; devcb_read8 read_inport; devcb_write8 write_outport; - INT32 ip3clk, ip4clk, ip5clk, ip6clk; + int32_t ip3clk, ip4clk, ip5clk, ip6clk; // new-style push handlers for input port bits DECLARE_WRITE_LINE_MEMBER( ip0_w ); @@ -144,28 +144,28 @@ private: TIMER_CALLBACK_MEMBER( duart_timer_callback ); /* registers */ - UINT8 ACR; /* Auxiliary Control Register */ - UINT8 IMR; /* Interrupt Mask Register */ - UINT8 ISR; /* Interrupt Status Register */ - UINT8 IVR; /* Interrupt Vector Register */ - UINT8 OPCR; /* Output Port Conf. Register */ - UINT8 OPR; /* Output Port Register */ + uint8_t ACR; /* Auxiliary Control Register */ + uint8_t IMR; /* Interrupt Mask Register */ + uint8_t ISR; /* Interrupt Status Register */ + uint8_t IVR; /* Interrupt Vector Register */ + uint8_t OPCR; /* Output Port Conf. Register */ + uint8_t OPR; /* Output Port Register */ PAIR CTR; /* Counter/Timer Preset Value */ - UINT8 IPCR; /* Input Port Control Register */ + uint8_t IPCR; /* Input Port Control Register */ bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK /* state */ - UINT8 IP_last_state; /* last state of IP bits */ + uint8_t IP_last_state; /* last state of IP bits */ /* timer */ - UINT8 half_period; + uint8_t half_period; emu_timer *duart_timer; double duart68681_get_ct_rate(); - UINT16 duart68681_get_ct_count(); + uint16_t duart68681_get_ct_count(); void duart68681_start_ct(int count); - int calc_baud(int ch, UINT8 data); + int calc_baud(int ch, uint8_t data); int get_ch(mc68681_channel *ch) { return (ch == m_chanA) ? 0 : 1; } void clear_ISR_bits(int mask); void set_ISR_bits(int mask); diff --git a/src/devices/machine/mc68901.cpp b/src/devices/machine/mc68901.cpp index 4d35d2a2c44..fa6256f1871 100644 --- a/src/devices/machine/mc68901.cpp +++ b/src/devices/machine/mc68901.cpp @@ -189,7 +189,7 @@ inline void mc68901_device::check_interrupts() } } -inline void mc68901_device::take_interrupt(UINT16 mask) +inline void mc68901_device::take_interrupt(uint16_t mask) { m_ipr |= mask; @@ -315,7 +315,7 @@ inline void mc68901_device::gpio_input(int bit, int state) void mc68901_device::gpio_output() { - UINT8 new_gpio_output = m_gpip & m_ddr; + uint8_t new_gpio_output = m_gpip & m_ddr; if (m_gpio_output != new_gpio_output) { @@ -332,7 +332,7 @@ void mc68901_device::gpio_output() // mc68901_device - constructor //------------------------------------------------- -mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MC68901, "MC68901 MFP", tag, owner, clock, "mc68901", __FILE__), device_serial_interface(mconfig, *this), m_timer_clock(0), @@ -571,7 +571,7 @@ READ8_MEMBER( mc68901_device::read ) case REGISTER_TSR: { /* clear UE bit (in reality, this won't be cleared until one full clock cycle of the transmitter has passed since the bit was set) */ - UINT8 tsr = m_tsr; + uint8_t tsr = m_tsr; m_tsr &= ~TSR_UNDERRUN_ERROR; return tsr; @@ -591,7 +591,7 @@ READ8_MEMBER( mc68901_device::read ) // register_w - //------------------------------------------------- -void mc68901_device::register_w(offs_t offset, UINT8 data) +void mc68901_device::register_w(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/devices/machine/mc68901.h b/src/devices/machine/mc68901.h index 9bbe8ee2280..a99fa0fe62d 100644 --- a/src/devices/machine/mc68901.h +++ b/src/devices/machine/mc68901.h @@ -94,7 +94,7 @@ class mc68901_device : public device_t, { public: // construction/destruction - mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void set_timer_clock(device_t &device, int timer_clock) { downcast(device).m_timer_clock = timer_clock; } static void set_rx_clock(device_t &device, int rx_clock) { downcast(device).m_rx_clock = rx_clock; } @@ -140,14 +140,14 @@ protected: virtual void rcv_complete() override; void check_interrupts(); - void take_interrupt(UINT16 mask); + void take_interrupt(uint16_t mask); void rx_buffer_full(); void rx_error(); void timer_count(int index); void timer_input(int index, int value); void gpio_input(int bit, int state); void gpio_output(); - void register_w(offs_t offset, UINT8 data); + void register_w(offs_t offset, uint8_t data); private: enum @@ -260,34 +260,34 @@ private: //int m_device_type; /* device type */ /* registers */ - UINT8 m_gpip; /* general purpose I/O register */ - UINT8 m_aer; /* active edge register */ - UINT8 m_ddr; /* data direction register */ - - UINT16 m_ier; /* interrupt enable register */ - UINT16 m_ipr; /* interrupt pending register */ - UINT16 m_isr; /* interrupt in-service register */ - UINT16 m_imr; /* interrupt mask register */ - UINT8 m_vr; /* vector register */ - - UINT8 m_tacr; /* timer A control register */ - UINT8 m_tbcr; /* timer B control register */ - UINT8 m_tcdcr; /* timers C and D control register */ - UINT8 m_tdr[4]; /* timer data registers */ - - UINT8 m_scr; /* synchronous character register */ - UINT8 m_ucr; /* USART control register */ - UINT8 m_tsr; /* transmitter status register */ - UINT8 m_rsr; /* receiver status register */ - UINT8 m_transmit_buffer; /* USART data register */ + uint8_t m_gpip; /* general purpose I/O register */ + uint8_t m_aer; /* active edge register */ + uint8_t m_ddr; /* data direction register */ + + uint16_t m_ier; /* interrupt enable register */ + uint16_t m_ipr; /* interrupt pending register */ + uint16_t m_isr; /* interrupt in-service register */ + uint16_t m_imr; /* interrupt mask register */ + uint8_t m_vr; /* vector register */ + + uint8_t m_tacr; /* timer A control register */ + uint8_t m_tbcr; /* timer B control register */ + uint8_t m_tcdcr; /* timers C and D control register */ + uint8_t m_tdr[4]; /* timer data registers */ + + uint8_t m_scr; /* synchronous character register */ + uint8_t m_ucr; /* USART control register */ + uint8_t m_tsr; /* transmitter status register */ + uint8_t m_rsr; /* receiver status register */ + uint8_t m_transmit_buffer; /* USART data register */ int m_transmit_pending; - UINT8 m_receive_buffer; + uint8_t m_receive_buffer; int m_receive_pending; - UINT8 m_gpio_input; - UINT8 m_gpio_output; + uint8_t m_gpio_input; + uint8_t m_gpio_output; /* counter timer state */ - UINT8 m_tmc[4]; /* timer main counters */ + uint8_t m_tmc[4]; /* timer main counters */ int m_ti[4]; /* timer in latch */ int m_to[4]; /* timer out latch */ @@ -295,7 +295,7 @@ private: //int m_irqlevel; /* interrupt level latch */ /* serial state */ - UINT8 m_next_rsr; /* receiver status register latch */ + uint8_t m_next_rsr; /* receiver status register latch */ int m_rsr_read; /* receiver status register read flag */ // timers diff --git a/src/devices/machine/mccs1850.cpp b/src/devices/machine/mccs1850.cpp index 28d29bab8bc..78f5eee020c 100644 --- a/src/devices/machine/mccs1850.cpp +++ b/src/devices/machine/mccs1850.cpp @@ -113,8 +113,8 @@ const device_type MCCS1850 = &device_creator; inline void mccs1850_device::check_interrupt() { - UINT8 status = m_ram[REGISTER_STATUS]; - UINT8 control = m_ram[REGISTER_CONTROL]; + uint8_t status = m_ram[REGISTER_STATUS]; + uint8_t control = m_ram[REGISTER_CONTROL]; bool interrupt = (((status & STATUS_AI) && (control & CONTROL_AE)) // alarm interrupt || ((status & STATUS_LB) && (control & CONTROL_LBE)) // low battery @@ -152,7 +152,7 @@ inline void mccs1850_device::set_pse_line(bool state) // read_register - //------------------------------------------------- -inline UINT8 mccs1850_device::read_register(offs_t offset) +inline uint8_t mccs1850_device::read_register(offs_t offset) { switch (offset) { @@ -182,7 +182,7 @@ inline UINT8 mccs1850_device::read_register(offs_t offset) // write_register - //------------------------------------------------- -inline void mccs1850_device::write_register(offs_t offset, UINT8 data) +inline void mccs1850_device::write_register(offs_t offset, uint8_t data) { switch (offset) { @@ -248,7 +248,7 @@ inline void mccs1850_device::write_register(offs_t offset, UINT8 data) inline void mccs1850_device::advance_seconds() { - UINT32 alarm = (m_ram[REGISTER_ALARM_LATCH] << 24) | (m_ram[REGISTER_ALARM_LATCH + 1] << 16) | (m_ram[REGISTER_ALARM_LATCH + 2] << 8) | m_ram[REGISTER_ALARM_LATCH + 3]; + uint32_t alarm = (m_ram[REGISTER_ALARM_LATCH] << 24) | (m_ram[REGISTER_ALARM_LATCH + 1] << 16) | (m_ram[REGISTER_ALARM_LATCH + 2] << 8) | m_ram[REGISTER_ALARM_LATCH + 3]; m_counter++; @@ -279,7 +279,7 @@ inline void mccs1850_device::advance_seconds() // mccs1850_device - constructor //------------------------------------------------- -mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MCCS1850, "MCCS1850", tag, owner, clock, "mccs1850", __FILE__), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -380,7 +380,7 @@ void mccs1850_device::nvram_default() if (machine().root_device().memregion(tag()) != nullptr) { - UINT8 *nvram = machine().root_device().memregion(tag())->base(); + uint8_t *nvram = machine().root_device().memregion(tag())->base(); // initialize NVRAM memcpy(m_ram, nvram, 0x20); diff --git a/src/devices/machine/mccs1850.h b/src/devices/machine/mccs1850.h index c029bc3e89b..c90bcae0d83 100644 --- a/src/devices/machine/mccs1850.h +++ b/src/devices/machine/mccs1850.h @@ -54,7 +54,7 @@ class mccs1850_device : public device_t, { public: // construction/destruction - mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_int_wr_callback(device_t &device, _Object object) { return downcast(device).int_cb.set_callback(object); } template static devcb_base &set_pse_wr_callback(device_t &device, _Object object) { return downcast(device).pse_cb.set_callback(object); } @@ -85,21 +85,21 @@ protected: private: inline void check_interrupt(); inline void set_pse_line(bool state); - inline UINT8 read_register(offs_t offset); - inline void write_register(offs_t offset, UINT8 data); + inline uint8_t read_register(offs_t offset); + inline void write_register(offs_t offset, uint8_t data); inline void advance_seconds(); static const device_timer_id TIMER_CLOCK = 0; devcb_write_line int_cb, pse_cb, nuc_cb; - UINT8 m_ram[0x80]; // RAM + uint8_t m_ram[0x80]; // RAM // power supply int m_pse; // power supply enable // counter - UINT32 m_counter; // seconds counter + uint32_t m_counter; // seconds counter // serial interface int m_ce; // chip enable @@ -107,9 +107,9 @@ private: int m_sdo; // serial data out int m_sdi; // serial data in int m_state; // serial interface state - UINT8 m_address; // address counter + uint8_t m_address; // address counter int m_bits; // bit counter - UINT8 m_shift; // shift register + uint8_t m_shift; // shift register // timers emu_timer *m_clock_timer; diff --git a/src/devices/machine/mcf5206e.cpp b/src/devices/machine/mcf5206e.cpp index cdc1a9b6477..a50950a04a8 100644 --- a/src/devices/machine/mcf5206e.cpp +++ b/src/devices/machine/mcf5206e.cpp @@ -206,7 +206,7 @@ WRITE8_MEMBER( mcf5206e_peripheral_device::ICR13_w ) } -inline UINT16 mcf5206e_peripheral_device::CSAR_r(int which, int offset, UINT16 mem_mask) +inline uint16_t mcf5206e_peripheral_device::CSAR_r(int which, int offset, uint16_t mem_mask) { if (offset==0) { @@ -220,7 +220,7 @@ inline UINT16 mcf5206e_peripheral_device::CSAR_r(int which, int offset, UINT16 m } } -inline void mcf5206e_peripheral_device::CSAR_w(int which, int offset, UINT16 data, UINT16 mem_mask) +inline void mcf5206e_peripheral_device::CSAR_w(int which, int offset, uint16_t data, uint16_t mem_mask) { if (offset==0) { @@ -233,19 +233,19 @@ inline void mcf5206e_peripheral_device::CSAR_w(int which, int offset, UINT16 dat } } -inline UINT32 mcf5206e_peripheral_device::CSMR_r(int which, UINT32 mem_mask) +inline uint32_t mcf5206e_peripheral_device::CSMR_r(int which, uint32_t mem_mask) { debuglog("%s: CSMR%d_r\n", this->machine().describe_context(), which); return m_CSMR[0]; } -inline void mcf5206e_peripheral_device::CSMR_w(int which, UINT32 data, UINT32 mem_mask) +inline void mcf5206e_peripheral_device::CSMR_w(int which, uint32_t data, uint32_t mem_mask) { COMBINE_DATA( &m_CSMR[0] ); debuglog("%s: CSMR%d_w %08x\n", this->machine().describe_context(), which, data); } -inline UINT16 mcf5206e_peripheral_device::CSCR_r(int which, int offset, UINT16 mem_mask) +inline uint16_t mcf5206e_peripheral_device::CSCR_r(int which, int offset, uint16_t mem_mask) { if (offset==1) { @@ -259,7 +259,7 @@ inline UINT16 mcf5206e_peripheral_device::CSCR_r(int which, int offset, UINT16 m } } -inline void mcf5206e_peripheral_device::CSCR_w(int which, int offset, UINT16 data, UINT16 mem_mask) +inline void mcf5206e_peripheral_device::CSCR_w(int which, int offset, uint16_t data, uint16_t mem_mask) { if (offset==1) { @@ -649,7 +649,7 @@ WRITE16_MEMBER( mcf5206e_peripheral_device::IMR_w) } } -void mcf5206e_peripheral_device::ICR_info(UINT8 ICR) +void mcf5206e_peripheral_device::ICR_info(uint8_t ICR) { debuglog(" (AutoVector) AVEC : %01x | ", (ICR&0x80)>>7); debuglog("(Interrupt Level) IL : %01x | ", (ICR&0x1c)>>2); // if autovector (AVEC) is used then the vectors referenced are at +24 (+0x18) + IL, ie the standard 68k autovectors, otherwise vector must be provided by device @@ -661,7 +661,7 @@ void mcf5206e_peripheral_device::ICR_info(UINT8 ICR) TIMER_CALLBACK_MEMBER(mcf5206e_peripheral_device::timer1_callback) { - UINT8 ICR = m_ICR[ICR9]; + uint8_t ICR = m_ICR[ICR9]; // technically we should do the vector check in the IRQ callback as well as various checks based on the IRQ masks before asserting the interrupt if (ICR & 0x80) // AVEC @@ -828,7 +828,7 @@ const device_type MCF5206E_PERIPHERAL = &device_creator; -microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MICROTOUCH, "Microtouch Touchscreen", tag, owner, clock, "microtouch", __FILE__), device_serial_interface(mconfig, *this), m_rx_buffer_ptr(0), m_tx_buffer_num(0), m_tx_buffer_ptr(0), m_reset_done(0), m_format(0), m_mode(0), m_last_touch_state(0), m_last_x(0), m_last_y(0), @@ -28,7 +28,7 @@ microtouch_device::microtouch_device(const machine_config &mconfig, const char * { } -int microtouch_device::check_command( const char* commandtocheck, int command_len, UINT8* command_data ) +int microtouch_device::check_command( const char* commandtocheck, int command_len, uint8_t* command_data ) { if ( (command_len == (strlen(commandtocheck) + 2)) && (command_data[0] == 0x01) && @@ -43,7 +43,7 @@ int microtouch_device::check_command( const char* commandtocheck, int command_le } } -void microtouch_device::send_format_table_packet(UINT8 flag, int x, int y) +void microtouch_device::send_format_table_packet(uint8_t flag, int x, int y) { m_tx_buffer[m_tx_buffer_num++] = flag; // lower byte (7bits) of x coordinate diff --git a/src/devices/machine/microtch.h b/src/devices/machine/microtch.h index 4ee60abede7..070fb65d7e0 100644 --- a/src/devices/machine/microtch.h +++ b/src/devices/machine/microtch.h @@ -11,7 +11,7 @@ class microtouch_device : public device_serial_interface { public: - microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &static_set_stx_callback(device_t &device, _Object object) { return downcast(device).m_out_stx_func.set_callback(object); } virtual ioport_constructor device_input_ports() const override; @@ -27,8 +27,8 @@ protected: virtual void tra_complete() override; virtual void rcv_complete() override; private: - int check_command( const char* commandtocheck, int command_len, UINT8* command_data ); - void send_format_table_packet(UINT8 flag, int x, int y); + int check_command( const char* commandtocheck, int command_len, uint8_t* command_data ); + void send_format_table_packet(uint8_t flag, int x, int y); void send_format_decimal_packet(int x, int y); void send_touch_packet(); @@ -44,11 +44,11 @@ private: MODE_STREAM, MODE_POINT }; - UINT8 m_rx_buffer[16]; + uint8_t m_rx_buffer[16]; int m_rx_buffer_ptr; - UINT8 m_tx_buffer[16]; - UINT8 m_tx_buffer_num; - UINT8 m_tx_buffer_ptr; + uint8_t m_tx_buffer[16]; + uint8_t m_tx_buffer_num; + uint8_t m_tx_buffer_ptr; int m_reset_done; int m_format; int m_mode; @@ -62,7 +62,7 @@ private: required_ioport m_touchy; emu_timer* m_timer; bool m_output_valid; - UINT8 m_output; + uint8_t m_output; }; extern const device_type MICROTOUCH; diff --git a/src/devices/machine/mm58167.cpp b/src/devices/machine/mm58167.cpp index 148d97260e8..b9174c75344 100644 --- a/src/devices/machine/mm58167.cpp +++ b/src/devices/machine/mm58167.cpp @@ -51,7 +51,7 @@ typedef enum // mm58167_device - constructor //------------------------------------------------- -mm58167_device::mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mm58167_device::mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MM58167, "National Semiconductor MM58167", tag, owner, clock, "mm58167", __FILE__), device_rtc_interface(mconfig, *this), m_irq_w(*this) @@ -186,7 +186,7 @@ READ8_MEMBER(mm58167_device::read) if (offset == R_CTL_IRQSTATUS && !space.debugger_access()) { // reading the IRQ status clears IRQ line and IRQ status - UINT8 data = m_regs[offset]; + uint8_t data = m_regs[offset]; m_regs[R_CTL_IRQSTATUS] = 0; m_irq_w(CLEAR_LINE); return data; diff --git a/src/devices/machine/mm58167.h b/src/devices/machine/mm58167.h index ab1a1d70eb2..7b5976ef72d 100644 --- a/src/devices/machine/mm58167.h +++ b/src/devices/machine/mm58167.h @@ -34,7 +34,7 @@ class mm58167_device : public device_t, { public: // construction/destruction - mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mm58167_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/mm58274c.cpp b/src/devices/machine/mm58274c.cpp index 0690f775b5d..412b5ac5239 100644 --- a/src/devices/machine/mm58274c.cpp +++ b/src/devices/machine/mm58274c.cpp @@ -47,7 +47,7 @@ enum const device_type MM58274C = &device_creator; -mm58274c_device::mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mm58274c_device::mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MM58274C, "National Semiconductor MM58274C", tag, owner, clock, "mm58274c", __FILE__), m_mode24(0), m_day1(0) diff --git a/src/devices/machine/mm58274c.h b/src/devices/machine/mm58274c.h index f92a795c6db..9c8505da49c 100644 --- a/src/devices/machine/mm58274c.h +++ b/src/devices/machine/mm58274c.h @@ -10,7 +10,7 @@ class mm58274c_device : public device_t { public: - mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mm58274c_device() {} static void set_mode24(device_t &device, int mode) { downcast(device).m_mode24 = mode; } diff --git a/src/devices/machine/mm74c922.cpp b/src/devices/machine/mm74c922.cpp index c822c783b33..7f9e3af798d 100644 --- a/src/devices/machine/mm74c922.cpp +++ b/src/devices/machine/mm74c922.cpp @@ -36,7 +36,7 @@ const device_type MM74C923 = &device_creator; // mm74c922_device - constructor //------------------------------------------------- -mm74c922_device::mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mm74c922_device::mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MM74C922, "MM74C922", tag, owner, clock, "mm74c922", __FILE__), m_write_da(*this), m_read_x1(*this), @@ -101,7 +101,7 @@ void mm74c922_device::device_timer(emu_timer &timer, device_timer_id id, int par // read - //------------------------------------------------- -UINT8 mm74c922_device::read() +uint8_t mm74c922_device::read() { if (LOG) logerror("MM74C922 '%s' Data Read: %02x\n", tag(), m_data); @@ -146,7 +146,7 @@ void mm74c922_device::clock_scan_counters() void mm74c922_device::detect_keypress() { - UINT8 data = 0xff; + uint8_t data = 0xff; switch (m_x) { diff --git a/src/devices/machine/mm74c922.h b/src/devices/machine/mm74c922.h index 4cca5f6e9c3..38d23a78a94 100644 --- a/src/devices/machine/mm74c922.h +++ b/src/devices/machine/mm74c922.h @@ -79,7 +79,7 @@ class mm74c922_device : public device_t { public: // construction/destruction - mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void static_set_cap_osc(device_t &device, double value) { downcast(device).m_cap_osc = value; } static void static_set_cap_debounce(device_t &device, double value) { downcast(device).m_cap_debounce = value; } @@ -91,7 +91,7 @@ public: template static devcb_base &set_x4_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_x4.set_callback(object); } template static devcb_base &set_x5_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_x5.set_callback(object); } - UINT8 read(); + uint8_t read(); protected: // device-level overrides @@ -119,7 +119,7 @@ private: int m_x; // currently scanned column int m_y; // latched row - UINT8 m_data; // data latch + uint8_t m_data; // data latch int m_da; // data available flag int m_next_da; // next value of data available flag diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp index 317c6b8555d..74b86246812 100644 --- a/src/devices/machine/mos6526.cpp +++ b/src/devices/machine/mos6526.cpp @@ -128,7 +128,7 @@ const device_type MOS5710 = &device_creator; inline void mos6526_device::update_pa() { - UINT8 pa = m_pra | (m_pa_in & ~m_ddra); + uint8_t pa = m_pra | (m_pa_in & ~m_ddra); if (m_pa != pa) { @@ -144,7 +144,7 @@ inline void mos6526_device::update_pa() inline void mos6526_device::update_pb() { - UINT8 pb = m_prb | (m_pb_in & ~m_ddrb); + uint8_t pb = m_prb | (m_pb_in & ~m_ddrb); if (CRA_PBON) { @@ -174,7 +174,7 @@ inline void mos6526_device::update_pb() // set_cra - control register A write //------------------------------------------------- -inline void mos6526_device::set_cra(UINT8 data) +inline void mos6526_device::set_cra(uint8_t data) { if (!CRA_STARTED && (data & CRA_START)) { @@ -204,7 +204,7 @@ inline void mos6526_device::set_cra(UINT8 data) // set_crb - control register B write //------------------------------------------------- -inline void mos6526_device::set_crb(UINT8 data) +inline void mos6526_device::set_crb(uint8_t data) { if (!CRB_STARTED && (data & CRB_START)) { @@ -220,7 +220,7 @@ inline void mos6526_device::set_crb(UINT8 data) // bcd_increment - //------------------------------------------------- -inline UINT8 mos6526_device::bcd_increment(UINT8 value) +inline uint8_t mos6526_device::bcd_increment(uint8_t value) { value++; @@ -237,10 +237,10 @@ inline UINT8 mos6526_device::bcd_increment(UINT8 value) inline void mos6526_device::clock_tod() { - UINT8 subsecond = (UINT8) (m_tod >> 0); - UINT8 second = (UINT8) (m_tod >> 8); - UINT8 minute = (UINT8) (m_tod >> 16); - UINT8 hour = (UINT8) (m_tod >> 24); + uint8_t subsecond = (uint8_t) (m_tod >> 0); + uint8_t second = (uint8_t) (m_tod >> 8); + uint8_t minute = (uint8_t) (m_tod >> 16); + uint8_t hour = (uint8_t) (m_tod >> 24); m_tod_count++; @@ -278,10 +278,10 @@ inline void mos6526_device::clock_tod() } } - m_tod = (((UINT32) subsecond) << 0) - | (((UINT32) second) << 8) - | (((UINT32) minute) << 16) - | (((UINT32) hour) << 24); + m_tod = (((uint32_t) subsecond) << 0) + | (((uint32_t) second) << 8) + | (((uint32_t) minute) << 16) + | (((uint32_t) hour) << 24); } @@ -300,7 +300,7 @@ inline void mos8520_device::clock_tod() // read_tod - time-of-day read //------------------------------------------------- -inline UINT8 mos6526_device::read_tod(int offset) +inline uint8_t mos6526_device::read_tod(int offset) { int shift = 8 * offset; @@ -319,7 +319,7 @@ inline UINT8 mos6526_device::read_tod(int offset) // write_tod - time-of-day write //------------------------------------------------- -inline void mos6526_device::write_tod(int offset, UINT8 data) +inline void mos6526_device::write_tod(int offset, uint8_t data) { int shift = 8 * offset; @@ -586,7 +586,7 @@ inline void mos6526_device::synchronize() // mos6526_device - constructor //------------------------------------------------- -mos6526_device::mos6526_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) +mos6526_device::mos6526_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), device_execute_interface(mconfig, *this), m_icount(0), @@ -603,7 +603,7 @@ mos6526_device::mos6526_device(const machine_config &mconfig, device_type type, { } -mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS6526, "MOS6526", tag, owner, clock, "mos6526", __FILE__), device_execute_interface(mconfig, *this), m_icount(0), @@ -619,13 +619,13 @@ mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, d m_write_pb(*this) { } -mos6526a_device::mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6526a_device::mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mos6526_device(mconfig, MOS6526A, "MOS6526A", tag, owner, clock, TYPE_6526A, "mos6526a", __FILE__) { } -mos8520_device::mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos8520_device::mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mos6526_device(mconfig, MOS8520, "MOS8520", tag, owner, clock, TYPE_8520, "mos8520", __FILE__) { } -mos5710_device::mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos5710_device::mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mos6526_device(mconfig, MOS5710, "MOS5710", tag, owner, clock, TYPE_5710, "mos5710", __FILE__) { } @@ -804,7 +804,7 @@ READ8_MEMBER( mos6526_device::read ) if (space.debugger_access()) return 0xff; - UINT8 data = 0; + uint8_t data = 0; switch (offset & 0x0f) { @@ -921,7 +921,7 @@ READ8_MEMBER( mos6526_device::read ) READ8_MEMBER( mos8520_device::read ) { - UINT8 data; + uint8_t data; switch (offset & 0x0f) { diff --git a/src/devices/machine/mos6526.h b/src/devices/machine/mos6526.h index 99bfab3abc3..cf3e89e9fa1 100644 --- a/src/devices/machine/mos6526.h +++ b/src/devices/machine/mos6526.h @@ -108,8 +108,8 @@ class mos6526_device : public device_t, { public: // construction/destruction - mos6526_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); - mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6526_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); + mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void static_set_tod_clock(device_t &device, int clock) { downcast(device).m_tod_clock = clock; } @@ -125,9 +125,9 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - UINT8 pa_r() { return m_pa; } + uint8_t pa_r() { return m_pa; } DECLARE_READ8_MEMBER( pa_r ) { return pa_r(); } - UINT8 pb_r() { return m_pb; } + uint8_t pb_r() { return m_pb; } DECLARE_READ8_MEMBER( pb_r ) { return pb_r(); } DECLARE_READ_LINE_MEMBER( sp_r ) { return m_sp; } @@ -160,17 +160,17 @@ protected: inline void update_interrupt(); inline void update_pa(); inline void update_pb(); - inline void set_cra(UINT8 data); - inline void set_crb(UINT8 data); + inline void set_cra(uint8_t data); + inline void set_crb(uint8_t data); inline void serial_input(); inline void serial_output(); inline void clock_ta(); inline void clock_tb(); inline void clock_pipeline(); - inline UINT8 bcd_increment(UINT8 value); + inline uint8_t bcd_increment(uint8_t value); virtual inline void clock_tod(); - inline UINT8 read_tod(int offset); - inline void write_tod(int offset, UINT8 data); + inline uint8_t read_tod(int offset); + inline void write_tod(int offset, uint8_t data); inline void synchronize(); devcb_write_line m_write_irq; @@ -186,27 +186,27 @@ protected: bool m_irq; int m_ir0; int m_ir1; - UINT8 m_icr; - UINT8 m_imr; + uint8_t m_icr; + uint8_t m_imr; bool m_icr_read; // peripheral ports int m_pc; int m_flag; - UINT8 m_pra; - UINT8 m_prb; - UINT8 m_ddra; - UINT8 m_ddrb; - UINT8 m_pa; - UINT8 m_pb; - UINT8 m_pa_in; - UINT8 m_pb_in; + uint8_t m_pra; + uint8_t m_prb; + uint8_t m_ddra; + uint8_t m_ddrb; + uint8_t m_pa; + uint8_t m_pb; + uint8_t m_pa_in; + uint8_t m_pb_in; // serial int m_sp; int m_cnt; - UINT8 m_sdr; - UINT8 m_shift; + uint8_t m_sdr; + uint8_t m_shift; bool m_sdr_empty; int m_bits; @@ -231,18 +231,18 @@ protected: int m_load_b1; int m_load_b2; int m_oneshot_b0; - UINT16 m_ta; - UINT16 m_tb; - UINT16 m_ta_latch; - UINT16 m_tb_latch; - UINT8 m_cra; - UINT8 m_crb; + uint16_t m_ta; + uint16_t m_tb; + uint16_t m_ta_latch; + uint16_t m_tb_latch; + uint8_t m_cra; + uint8_t m_crb; // time-of-day int m_tod_count; - UINT32 m_tod; - UINT32 m_tod_latch; - UINT32 m_alarm; + uint32_t m_tod; + uint32_t m_tod_latch; + uint32_t m_alarm; bool m_tod_stopped; bool m_tod_latched; emu_timer *m_tod_timer; @@ -254,7 +254,7 @@ protected: class mos6526a_device : public mos6526_device { public: - mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -263,7 +263,7 @@ public: class mos8520_device : public mos6526_device { public: - mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); @@ -278,7 +278,7 @@ protected: class mos5710_device : public mos6526_device { public: - mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos5710_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/mos6529.cpp b/src/devices/machine/mos6529.cpp index ebae2ca6f5a..9c3a1c13b5b 100644 --- a/src/devices/machine/mos6529.cpp +++ b/src/devices/machine/mos6529.cpp @@ -35,7 +35,7 @@ const device_type MOS6529 = &device_creator; // mos6529_device - constructor //------------------------------------------------- -mos6529_device::mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6529_device::mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS6529, "MOS6529", tag, owner, clock, "mos6529", __FILE__), m_input(0), m_p0_handler(*this), diff --git a/src/devices/machine/mos6529.h b/src/devices/machine/mos6529.h index fe9f8a3e063..87763b0575a 100644 --- a/src/devices/machine/mos6529.h +++ b/src/devices/machine/mos6529.h @@ -67,7 +67,7 @@ class mos6529_device : public device_t { public: // construction/destruction - mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_p0_handler(device_t &device, _Object object) { return downcast(device).m_p0_handler.set_callback(object); } template static devcb_base &set_p1_handler(device_t &device, _Object object) { return downcast(device).m_p1_handler.set_callback(object); } @@ -94,7 +94,7 @@ protected: // device-level overrides virtual void device_start() override; - UINT8 m_input; + uint8_t m_input; devcb_write_line m_p0_handler; devcb_write_line m_p1_handler; diff --git a/src/devices/machine/mos6530.cpp b/src/devices/machine/mos6530.cpp index 46979b078f0..2a32917d0c4 100644 --- a/src/devices/machine/mos6530.cpp +++ b/src/devices/machine/mos6530.cpp @@ -40,7 +40,7 @@ enum const device_type MOS6530 = &device_creator; -mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS6530, "MOS6530 RRIOT", tag, owner, clock, "mos6530", __FILE__), m_in_pa_cb(*this), m_out_pa_cb(*this), @@ -118,7 +118,7 @@ void mos6530_device::device_reset() void mos6530_device::update_irqstate() { - UINT8 out = m_port[1].m_out; + uint8_t out = m_port[1].m_out; if (m_irqenable) out = ((m_irqstate & TIMER_FLAG) ? 0x00 : 0x80) | (out & 0x7F); @@ -131,7 +131,7 @@ void mos6530_device::update_irqstate() get_timer - return the current timer value -------------------------------------------------*/ -UINT8 mos6530_device::get_timer() +uint8_t mos6530_device::get_timer() { /* if idle, return 0 */ if (m_timerstate == TIMER_IDLE) @@ -198,9 +198,9 @@ WRITE8_MEMBER( mos6530_device::write ) /* if A2 == 1, we are writing to the timer */ if (offset & 0x04) { - static const UINT8 timershift[4] = { 0, 3, 6, 10 }; + static const uint8_t timershift[4] = { 0, 3, 6, 10 }; attotime curtime = space.machine().time(); - INT64 target; + int64_t target; /* A0-A1 contain the timer divisor */ m_timershift = timershift[offset & 3]; @@ -235,7 +235,7 @@ WRITE8_MEMBER( mos6530_device::write ) /* if A0 == 0, we are writing to the port's output */ else { - UINT8 olddata = port->m_out; + uint8_t olddata = port->m_out; port->m_out = data; if ((offset & 2) && m_irqenable) @@ -259,7 +259,7 @@ WRITE8_MEMBER( mos6530_device::write ) READ8_MEMBER( mos6530_device::read ) { - UINT8 val; + uint8_t val; /* if A2 == 1 and A0 == 1, we are reading interrupt flags */ if ((offset & 0x05) == 0x05) @@ -297,7 +297,7 @@ READ8_MEMBER( mos6530_device::read ) /* if A0 == 0, we are reading the port as an input */ else { - UINT8 out = port->m_out; + uint8_t out = port->m_out; if ((offset & 2) && m_irqenable) out = ((m_irqstate & TIMER_FLAG) ? 0x00 : 0x80) | (out & 0x7F); @@ -321,7 +321,7 @@ READ8_MEMBER( mos6530_device::read ) value -------------------------------------------------*/ -void mos6530_device::porta_in_set(UINT8 data, UINT8 mask) +void mos6530_device::porta_in_set(uint8_t data, uint8_t mask) { m_port[0].m_in = (m_port[0].m_in & ~mask) | (data & mask); } @@ -332,7 +332,7 @@ void mos6530_device::porta_in_set(UINT8 data, UINT8 mask) value -------------------------------------------------*/ -void mos6530_device::portb_in_set(UINT8 data, UINT8 mask) +void mos6530_device::portb_in_set(uint8_t data, uint8_t mask) { m_port[1].m_in = (m_port[1].m_in & ~mask) | (data & mask); } @@ -343,7 +343,7 @@ void mos6530_device::portb_in_set(UINT8 data, UINT8 mask) value -------------------------------------------------*/ -UINT8 mos6530_device::porta_in_get() +uint8_t mos6530_device::porta_in_get() { return m_port[0].m_in; } @@ -354,7 +354,7 @@ UINT8 mos6530_device::porta_in_get() value -------------------------------------------------*/ -UINT8 mos6530_device::portb_in_get() +uint8_t mos6530_device::portb_in_get() { return m_port[1].m_in; } @@ -365,7 +365,7 @@ UINT8 mos6530_device::portb_in_get() value -------------------------------------------------*/ -UINT8 mos6530_device::porta_out_get() +uint8_t mos6530_device::porta_out_get() { return m_port[0].m_out; } @@ -376,7 +376,7 @@ UINT8 mos6530_device::porta_out_get() value -------------------------------------------------*/ -UINT8 mos6530_device::portb_out_get() +uint8_t mos6530_device::portb_out_get() { return m_port[1].m_out; } diff --git a/src/devices/machine/mos6530.h b/src/devices/machine/mos6530.h index c60ff759a1b..db0bc5a0b4c 100644 --- a/src/devices/machine/mos6530.h +++ b/src/devices/machine/mos6530.h @@ -39,9 +39,9 @@ struct mos6530_port { - UINT8 m_in; - UINT8 m_out; - UINT8 m_ddr; + uint8_t m_in; + uint8_t m_out; + uint8_t m_ddr; }; /*************************************************************************** @@ -51,7 +51,7 @@ struct mos6530_port class mos6530_device : public device_t { public: - mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~mos6530_device() {} template static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } @@ -62,11 +62,11 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - 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(); protected: // device-level overrides @@ -84,20 +84,20 @@ private: mos6530_port m_port[2]; - UINT8 m_irqstate; - UINT8 m_irqenable; + uint8_t m_irqstate; + uint8_t m_irqenable; - UINT8 m_timershift; - UINT8 m_timerstate; + uint8_t m_timershift; + uint8_t m_timerstate; emu_timer * m_timer; - UINT32 m_clock; + uint32_t m_clock; void update_irqstate(); - UINT8 get_timer(); + uint8_t get_timer(); - 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); enum { diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp index 98e52547ccd..c28cf6a0d7d 100644 --- a/src/devices/machine/mos6530n.cpp +++ b/src/devices/machine/mos6530n.cpp @@ -73,7 +73,7 @@ ADDRESS_MAP_END READ8_MEMBER(mos6532_t::io_r) { offset &= 0x1f; - UINT8 ret = 0; + uint8_t ret = 0; if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) ret = pa_data_r(space, 0); if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) ret = pa_ddr_r(space, 0); @@ -113,7 +113,7 @@ WRITE8_MEMBER(mos6532_t::io_w) // mos6530_base_t - constructor //------------------------------------------------- -mos6530_base_t::mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : +mos6530_base_t::mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_ram(*this, finder_base::DUMMY_TAG), m_rom(*this, DEVICE_SELF), @@ -177,7 +177,7 @@ mos6530_base_t::mos6530_base_t(const machine_config &mconfig, device_type type, // mos6530_t - constructor //------------------------------------------------- -mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mos6530_base_t(mconfig, MOS6530n, "MOS6530n", tag, owner, clock, "mos6530n", __FILE__) { } @@ -185,7 +185,7 @@ mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *o // mos6532_t - constructor //------------------------------------------------- -mos6532_t::mos6532_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6532_t::mos6532_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mos6530_base_t(mconfig, MOS6532n, "MOS6532n", tag, owner, clock, "mos6532n", __FILE__) { } @@ -322,9 +322,9 @@ void mos6530_base_t::device_timer(emu_timer &timer, device_timer_id id, int para void mos6530_base_t::update_pa() { - UINT8 out = m_pa_out; - UINT8 ddr = m_pa_ddr; - UINT8 data = (out & ddr) | (ddr ^ 0xff); + uint8_t out = m_pa_out; + uint8_t ddr = m_pa_ddr; + uint8_t data = (out & ddr) | (ddr ^ 0xff); if (m_out_pa_cb.isnull()) { @@ -350,9 +350,9 @@ void mos6530_base_t::update_pa() void mos6530_base_t::update_pb() { - UINT8 out = m_pb_out; - UINT8 ddr = m_pb_ddr; - UINT8 data = (out & ddr) | (ddr ^ 0xff); + uint8_t out = m_pb_out; + uint8_t ddr = m_pb_ddr; + uint8_t data = (out & ddr) | (ddr ^ 0xff); if (m_out_pb_cb.isnull()) { @@ -373,9 +373,9 @@ void mos6530_base_t::update_pb() void mos6530_t::update_pb() { - UINT8 out = m_pb_out; - UINT8 ddr = m_pb_ddr; - UINT8 data = (out & ddr) | (ddr ^ 0xff); + uint8_t out = m_pb_out; + uint8_t ddr = m_pb_ddr; + uint8_t data = (out & ddr) | (ddr ^ 0xff); if (m_ie_timer) { @@ -428,9 +428,9 @@ void mos6530_t::update_irq() // get_irq_flags - //------------------------------------------------- -UINT8 mos6530_base_t::get_irq_flags() +uint8_t mos6530_base_t::get_irq_flags() { - UINT8 data = 0; + uint8_t data = 0; if (m_irq_timer) data |= IRQ_TIMER; if (m_irq_edge) data |= IRQ_EDGE; @@ -438,9 +438,9 @@ UINT8 mos6530_base_t::get_irq_flags() return data; } -UINT8 mos6530_t::get_irq_flags() +uint8_t mos6530_t::get_irq_flags() { - UINT8 data = 0; + uint8_t data = 0; if (m_irq_timer) data |= IRQ_TIMER; @@ -454,9 +454,9 @@ UINT8 mos6530_t::get_irq_flags() void mos6530_base_t::edge_detect() { - UINT8 ddr_out = m_pa_ddr; - UINT8 ddr_in = m_pa_ddr ^ 0xff; - UINT8 data = (m_pa_out & ddr_out) | (m_pa_in & ddr_in); + uint8_t ddr_out = m_pa_ddr; + uint8_t ddr_in = m_pa_ddr ^ 0xff; + uint8_t data = (m_pa_out & ddr_out) | (m_pa_in & ddr_in); int state = BIT(data, 7); if ((m_pa7 ^ state) && (m_pa7_dir ^ state) == 0) @@ -505,7 +505,7 @@ void mos6530_base_t::pb_w(int bit, int state) READ8_MEMBER( mos6530_base_t::pa_data_r ) { - UINT8 in = 0; + uint8_t in = 0; if (m_in_pa_cb.isnull()) { @@ -523,10 +523,10 @@ READ8_MEMBER( mos6530_base_t::pa_data_r ) in = m_in_pa_cb(); } - UINT8 out = m_pa_out; - UINT8 ddr_out = m_pa_ddr; - UINT8 ddr_in = m_pa_ddr ^ 0xff; - UINT8 data = (out & ddr_out) | (in & ddr_in); + uint8_t out = m_pa_out; + uint8_t ddr_out = m_pa_ddr; + uint8_t ddr_in = m_pa_ddr ^ 0xff; + uint8_t data = (out & ddr_out) | (in & ddr_in); if (LOG) logerror("%s %s %s '%s' Port A Data In %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); @@ -570,7 +570,7 @@ WRITE8_MEMBER( mos6530_base_t::pa_ddr_w ) READ8_MEMBER( mos6530_base_t::pb_data_r ) { - UINT8 in = 0; + uint8_t in = 0; if (m_in_pb_cb.isnull()) { @@ -588,10 +588,10 @@ READ8_MEMBER( mos6530_base_t::pb_data_r ) in = m_in_pb_cb(); } - UINT8 out = m_pb_out; - UINT8 ddr_out = m_pb_ddr; - UINT8 ddr_in = m_pb_ddr ^ 0xff; - UINT8 data = (out & ddr_out) | (in & ddr_in); + uint8_t out = m_pb_out; + uint8_t ddr_out = m_pb_ddr; + uint8_t ddr_in = m_pb_ddr ^ 0xff; + uint8_t data = (out & ddr_out) | (in & ddr_in); if (LOG) logerror("%s %s %s '%s' Port B Data In %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); @@ -647,9 +647,9 @@ READ8_MEMBER( mos6530_base_t::timer_on_r ) return timer_r(true); } -UINT8 mos6530_base_t::timer_r(bool ie) +uint8_t mos6530_base_t::timer_r(bool ie) { - UINT8 data; + uint8_t data; live_sync(); @@ -676,7 +676,7 @@ UINT8 mos6530_base_t::timer_r(bool ie) READ8_MEMBER( mos6530_base_t::irq_r ) { - UINT8 data = get_irq_flags(); + uint8_t data = get_irq_flags(); if (!space.debugger_access()) { if (m_irq_edge) { @@ -703,7 +703,7 @@ WRITE8_MEMBER( mos6530_base_t::timer_on_w ) timer_w(offset, data, true); } -void mos6530_base_t::timer_w(offs_t offset, UINT8 data, bool ie) +void mos6530_base_t::timer_w(offs_t offset, uint8_t data, bool ie) { live_sync(); diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h index b29fea9af93..05269ae81e7 100644 --- a/src/devices/machine/mos6530n.h +++ b/src/devices/machine/mos6530n.h @@ -188,7 +188,7 @@ class mos6530_base_t : public device_t { public: // construction/destruction - mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); template static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_irq_cb.set_callback(object); } template static devcb_base &set_pa_rd_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } @@ -261,12 +261,12 @@ protected: void update_pa(); virtual void update_pb(); virtual void update_irq(); - virtual UINT8 get_irq_flags(); + virtual uint8_t get_irq_flags(); void edge_detect(); void pa_w(int bit, int state); void pb_w(int bit, int state); - void timer_w(offs_t offset, UINT8 data, bool ie); - UINT8 timer_r(bool ie); + void timer_w(offs_t offset, uint8_t data, bool ie); + uint8_t timer_r(bool ie); DECLARE_READ8_MEMBER( rom_r ) { return m_rom[offset]; } DECLARE_READ8_MEMBER( ram_r ) { return m_ram[offset]; } @@ -286,8 +286,8 @@ protected: DECLARE_WRITE8_MEMBER( timer_on_w ); DECLARE_WRITE8_MEMBER( edge_w ); - optional_shared_ptr m_ram; - optional_region_ptr m_rom; + optional_shared_ptr m_ram; + optional_region_ptr m_rom; devcb_write_line m_irq_cb; devcb_read8 m_in_pa_cb; @@ -327,15 +327,15 @@ protected: devcb_write_line m_out_pb6_cb; devcb_write_line m_out_pb7_cb; - UINT8 m_pa_in; - UINT8 m_pa_out; - UINT8 m_pa_ddr; + uint8_t m_pa_in; + uint8_t m_pa_out; + uint8_t m_pa_ddr; int m_pa7; int m_pa7_dir; - UINT8 m_pb_in; - UINT8 m_pb_out; - UINT8 m_pb_ddr; + uint8_t m_pb_in; + uint8_t m_pb_out; + uint8_t m_pb_ddr; bool m_ie_timer; bool m_irq_timer; @@ -343,7 +343,7 @@ protected: bool m_irq_edge; int m_prescale; - UINT8 m_timer; + uint8_t m_timer; enum { IDLE, @@ -356,7 +356,7 @@ protected: attotime tm, tm_irq; attotime period; int state, next_state; - UINT8 value; + uint8_t value; }; live_info cur_live, checkpoint_live; @@ -376,7 +376,7 @@ class mos6530_t : public mos6530_base_t { public: // construction/destruction - mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(rom_map, 8); virtual DECLARE_ADDRESS_MAP(ram_map, 8); @@ -388,7 +388,7 @@ protected: void update_pb() override; void update_irq() override; - UINT8 get_irq_flags() override; + uint8_t get_irq_flags() override; }; @@ -396,7 +396,7 @@ class mos6532_t : public mos6530_base_t { public: // construction/destruction - mos6532_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6532_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(ram_map, 8); virtual DECLARE_ADDRESS_MAP(io_map, 8); diff --git a/src/devices/machine/mos6551.cpp b/src/devices/machine/mos6551.cpp index 24901ee67e0..3bfc22219e5 100644 --- a/src/devices/machine/mos6551.cpp +++ b/src/devices/machine/mos6551.cpp @@ -12,7 +12,7 @@ const device_type MOS6551 = &device_creator; -mos6551_device::mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mos6551_device::mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS6551, "MOS6551", tag, owner, clock, "mos6551", __FILE__), m_internal_clock(*this, "clock"), m_irq_handler(*this), @@ -269,15 +269,15 @@ void mos6551_device::update_divider() m_internal_clock->set_clock_scale(scale); } -UINT8 mos6551_device::read_rdr() +uint8_t mos6551_device::read_rdr() { m_status &= ~(SR_PARITY_ERROR | SR_FRAMING_ERROR | SR_OVERRUN | SR_RDRF); return m_rdr; } -UINT8 mos6551_device::read_status() +uint8_t mos6551_device::read_status() { - UINT8 status = m_status; + uint8_t status = m_status; if (m_cts) { @@ -293,23 +293,23 @@ UINT8 mos6551_device::read_status() return status; } -UINT8 mos6551_device::read_command() +uint8_t mos6551_device::read_command() { return m_command; } -UINT8 mos6551_device::read_control() +uint8_t mos6551_device::read_control() { return m_control; } -void mos6551_device::write_tdr(UINT8 data) +void mos6551_device::write_tdr(uint8_t data) { m_tdr = data; m_status &= ~SR_TDRE; } -void mos6551_device::write_reset(UINT8 data) +void mos6551_device::write_reset(uint8_t data) { m_status &= ~SR_OVERRUN; m_irq_state &= ~(IRQ_DCD | IRQ_DSR); @@ -317,7 +317,7 @@ void mos6551_device::write_reset(UINT8 data) write_command(m_command & ~0x1f); } -void mos6551_device::write_control(UINT8 data) +void mos6551_device::write_control(uint8_t data) { m_control = data; @@ -338,7 +338,7 @@ void mos6551_device::write_control(UINT8 data) } } -void mos6551_device::write_command(UINT8 data) +void mos6551_device::write_command(uint8_t data) { m_command = data; @@ -437,7 +437,7 @@ int mos6551_device::stoplength() return m_divide; } -void mos6551_device::set_xtal(UINT32 xtal) +void mos6551_device::set_xtal(uint32_t xtal) { m_xtal = xtal; diff --git a/src/devices/machine/mos6551.h b/src/devices/machine/mos6551.h index 9567ccc02a4..8acc224bcf2 100644 --- a/src/devices/machine/mos6551.h +++ b/src/devices/machine/mos6551.h @@ -52,9 +52,9 @@ class mos6551_device : public device_t { public: - mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - static void set_xtal(device_t &device, UINT32 xtal) { downcast(device).set_xtal(xtal); } + static void set_xtal(device_t &device, uint32_t xtal) { downcast(device).set_xtal(xtal); } template static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(device).m_irq_handler.set_callback(object); } template static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast(device).m_txd_handler.set_callback(object); } template static devcb_base &set_rxc_handler(device_t &device, _Object object) { return downcast(device).m_rxc_handler.set_callback(object); } @@ -73,7 +73,7 @@ public: DECLARE_WRITE_LINE_MEMBER(internal_clock); - void set_xtal(UINT32 clock); + void set_xtal(uint32_t clock); protected: virtual void device_start() override; @@ -134,15 +134,15 @@ private: void update_irq(); void update_divider(); - UINT8 read_rdr(); - UINT8 read_status(); - UINT8 read_command(); - UINT8 read_control(); + uint8_t read_rdr(); + uint8_t read_status(); + uint8_t read_command(); + uint8_t read_control(); - void write_tdr(UINT8 data); - void write_reset(UINT8 data); - void write_command(UINT8 data); - void write_control(UINT8 data); + void write_tdr(uint8_t data); + void write_reset(uint8_t data); + void write_command(uint8_t data); + void write_control(uint8_t data); int stoplength(); @@ -159,13 +159,13 @@ private: devcb_write_line m_rts_handler; devcb_write_line m_dtr_handler; - UINT8 m_control; - UINT8 m_command; - UINT8 m_status; - UINT8 m_tdr; - UINT8 m_rdr; + uint8_t m_control; + uint8_t m_command; + uint8_t m_status; + uint8_t m_tdr; + uint8_t m_rdr; - UINT8 m_irq_state; + uint8_t m_irq_state; int m_irq; int m_txd; @@ -173,7 +173,7 @@ private: int m_rts; int m_dtr; - UINT32 m_xtal; + uint32_t m_xtal; int m_divide; int m_cts; int m_dsr; diff --git a/src/devices/machine/mos6702.cpp b/src/devices/machine/mos6702.cpp index 9dc11e24af9..2f0e3d7a122 100644 --- a/src/devices/machine/mos6702.cpp +++ b/src/devices/machine/mos6702.cpp @@ -34,7 +34,7 @@ const device_type MOS6702 = &device_creator; // mos6702_device - constructor //------------------------------------------------- -mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS6702, "MOS6702", tag, owner, clock, "mos6702", __FILE__) { } diff --git a/src/devices/machine/mos6702.h b/src/devices/machine/mos6702.h index 191bff45bcc..fa41e46e15d 100644 --- a/src/devices/machine/mos6702.h +++ b/src/devices/machine/mos6702.h @@ -47,7 +47,7 @@ class mos6702_device : public device_t { public: // construction/destruction - mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos6702_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/mos8706.cpp b/src/devices/machine/mos8706.cpp index ca07506423b..a5cad813b97 100644 --- a/src/devices/machine/mos8706.cpp +++ b/src/devices/machine/mos8706.cpp @@ -35,7 +35,7 @@ const device_type MOS8706 = &device_creator; // mos8706_device - constructor //------------------------------------------------- -mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS8706, "MOS8706", tag, owner, clock, "mos8706", __FILE__) { } diff --git a/src/devices/machine/mos8706.h b/src/devices/machine/mos8706.h index 2fd710e1337..91e00d2b342 100644 --- a/src/devices/machine/mos8706.h +++ b/src/devices/machine/mos8706.h @@ -50,7 +50,7 @@ class mos8706_device : public device_t { public: - mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos8706_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/mos8722.cpp b/src/devices/machine/mos8722.cpp index 214a52faa21..9f081e5c4c0 100644 --- a/src/devices/machine/mos8722.cpp +++ b/src/devices/machine/mos8722.cpp @@ -68,7 +68,7 @@ static const offs_t RCR_TOP_ADDRESS[4] = { 0xf000, 0xf000, 0xe000, 0xc000 }; // mos8722_device - constructor //------------------------------------------------- -mos8722_device::mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mos8722_device::mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS8722, "MOS8722", tag, owner, clock, "mos8722", __FILE__), m_write_z80en(*this), m_write_fsdir(*this), @@ -119,7 +119,7 @@ void mos8722_device::device_reset() // read - register read //------------------------------------------------- -UINT8 mos8722_device::read(offs_t offset, UINT8 data) +uint8_t mos8722_device::read(offs_t offset, uint8_t data) { if (MCR_C64) return data; diff --git a/src/devices/machine/mos8722.h b/src/devices/machine/mos8722.h index 5cbe9681da3..a6991dad1d5 100644 --- a/src/devices/machine/mos8722.h +++ b/src/devices/machine/mos8722.h @@ -73,7 +73,7 @@ class mos8722_device : public device_t { public: // construction/destruction - mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_z80en_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_z80en.set_callback(object); } template static devcb_base &set_fsdir_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_fsdir.set_callback(object); } @@ -82,7 +82,7 @@ public: template static devcb_base &set_sense40_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_sense40.set_callback(object); } - UINT8 read(offs_t offset, UINT8 data); + uint8_t read(offs_t offset, uint8_t data); DECLARE_WRITE8_MEMBER( write ); DECLARE_READ_LINE_MEMBER( fsdir_r ); @@ -139,10 +139,10 @@ private: devcb_read_line m_read_exrom; devcb_read_line m_read_sense40; - UINT8 m_reg[16]; + uint8_t m_reg[16]; - UINT8 m_p0h_latch; - UINT8 m_p1h_latch; + uint8_t m_p0h_latch; + uint8_t m_p1h_latch; }; diff --git a/src/devices/machine/mos8726.cpp b/src/devices/machine/mos8726.cpp index eca6ada5187..621d4d4374f 100644 --- a/src/devices/machine/mos8726.cpp +++ b/src/devices/machine/mos8726.cpp @@ -40,7 +40,7 @@ const device_type MOS8726 = &device_creator; // mos8726_device - constructor //------------------------------------------------- -mos8726_device::mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mos8726_device::mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MOS8726, "MOS8726", tag, owner, clock, "mos8726", __FILE__), device_execute_interface(mconfig, *this), m_icount(0), @@ -90,7 +90,7 @@ void mos8726_device::execute_run() READ8_MEMBER( mos8726_device::read ) { - UINT8 data = 0; + uint8_t data = 0; return data; } diff --git a/src/devices/machine/mos8726.h b/src/devices/machine/mos8726.h index 8edc5e001d9..d8edd76d54d 100644 --- a/src/devices/machine/mos8726.h +++ b/src/devices/machine/mos8726.h @@ -70,7 +70,7 @@ class mos8726_device : public device_t, { public: // construction/destruction - mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mos8726_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/mpu401.cpp b/src/devices/machine/mpu401.cpp index 1dcbf1233f3..8562634db46 100644 --- a/src/devices/machine/mpu401.cpp +++ b/src/devices/machine/mpu401.cpp @@ -119,7 +119,7 @@ const tiny_rom_entry *mpu401_device::device_rom_region() const // mpu401_device - constructor //------------------------------------------------- -mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MPU401, "Roland MPU-401 I/O box", tag, owner, clock, "mpu401", __FILE__), m_ourcpu(*this, M6801_TAG), write_irq(*this) diff --git a/src/devices/machine/mpu401.h b/src/devices/machine/mpu401.h index 899ba727822..cf98056cc81 100644 --- a/src/devices/machine/mpu401.h +++ b/src/devices/machine/mpu401.h @@ -23,7 +23,7 @@ class mpu401_device : public device_t { public: // construction/destruction - mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mpu401_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; @@ -59,10 +59,10 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - UINT8 m_port2; - UINT8 m_command; - UINT8 m_mpudata; - UINT8 m_gatearrstat; + uint8_t m_port2; + uint8_t m_command; + uint8_t m_mpudata; + uint8_t m_gatearrstat; emu_timer *m_timer; }; diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp index 97e89eca2ff..51b98621f69 100644 --- a/src/devices/machine/msm5832.cpp +++ b/src/devices/machine/msm5832.cpp @@ -87,7 +87,7 @@ inline void msm5832_device::write_counter(int counter, int value) // msm5832_device - constructor //------------------------------------------------- -msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSM5832, "MSM5832", tag, owner, clock, "msm5832", __FILE__), device_rtc_interface(mconfig, *this), m_hold(0), @@ -163,7 +163,7 @@ void msm5832_device::rtc_clock_updated(int year, int month, int day, int day_of_ READ8_MEMBER( msm5832_device::data_r ) { - UINT8 data = 0; + uint8_t data = 0; if (m_cs && m_read) { @@ -217,7 +217,7 @@ WRITE8_MEMBER( msm5832_device::data_w ) // address_w - //------------------------------------------------- -void msm5832_device::address_w(UINT8 data) +void msm5832_device::address_w(uint8_t data) { if (LOG) logerror("MSM5832 Address: %01x\n", data & 0x0f); diff --git a/src/devices/machine/msm5832.h b/src/devices/machine/msm5832.h index d436d4ccc78..9e7b32f5a83 100644 --- a/src/devices/machine/msm5832.h +++ b/src/devices/machine/msm5832.h @@ -48,12 +48,12 @@ class msm5832_device : public device_t, { public: // construction/destruction - msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER( data_r ); DECLARE_WRITE8_MEMBER( data_w ); - void address_w(UINT8 data); + void address_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( adj_w ); DECLARE_WRITE_LINE_MEMBER( test_w ); @@ -77,7 +77,7 @@ private: inline int read_counter(int counter); inline void write_counter(int counter, int value); - UINT8 m_reg[13]; // registers + uint8_t m_reg[13]; // registers int m_hold; // counter hold int m_address; // address diff --git a/src/devices/machine/msm58321.cpp b/src/devices/machine/msm58321.cpp index a66f0ba9865..3919146eaaa 100644 --- a/src/devices/machine/msm58321.cpp +++ b/src/devices/machine/msm58321.cpp @@ -51,7 +51,7 @@ enum REGISTER_REF1 }; -static const char *reg_name(UINT8 address) +static const char *reg_name(uint8_t address) { switch(address) { @@ -171,7 +171,7 @@ inline void msm58321_device::write_counter(int address, int data) // msm58321_device - constructor //------------------------------------------------- -msm58321_device::msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +msm58321_device::msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSM58321, "MSM58321", tag, owner, clock, "msm58321", __FILE__), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -333,7 +333,7 @@ void msm58321_device::nvram_write(emu_file &file) void msm58321_device::update_output() { - UINT8 data = 0xf; + uint8_t data = 0xf; if (m_cs1 && m_cs2 && m_read) { @@ -395,7 +395,7 @@ void msm58321_device::update_input() { if (m_cs1 && m_cs2) { - UINT8 data = m_d0_in | (m_d1_in << 1) | (m_d2_in << 2) | (m_d3_in << 3); + uint8_t data = m_d0_in | (m_d1_in << 1) | (m_d2_in << 2) | (m_d3_in << 3); if (m_address_write) { diff --git a/src/devices/machine/msm58321.h b/src/devices/machine/msm58321.h index b4f9de48053..ef6bf799bdd 100644 --- a/src/devices/machine/msm58321.h +++ b/src/devices/machine/msm58321.h @@ -60,7 +60,7 @@ class msm58321_device : public device_t, { public: // construction/destruction - msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_d0_handler(device_t &device, _Object object) { return downcast(device).m_d0_handler.set_callback(object); } @@ -132,8 +132,8 @@ private: int m_test; // test flag int m_cs1; // chip select 1 - UINT8 m_address; // address latch - UINT8 m_reg[13]; // registers + uint8_t m_address; // address latch + uint8_t m_reg[13]; // registers // timers emu_timer *m_clock_timer; diff --git a/src/devices/machine/msm6242.cpp b/src/devices/machine/msm6242.cpp index 9b0b35df2c3..33f029936dd 100644 --- a/src/devices/machine/msm6242.cpp +++ b/src/devices/machine/msm6242.cpp @@ -65,7 +65,7 @@ const device_type MSM6242 = &device_creator; // msm6242_device - constructor //------------------------------------------------- -msm6242_device::msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +msm6242_device::msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSM6242, "MSM6242 RTC", tag, owner, clock, "msm6242", __FILE__), device_rtc_interface(mconfig, *this), m_out_int_handler(*this) @@ -168,7 +168,7 @@ void msm6242_device::device_timer(emu_timer &timer, device_timer_id id, int para // irq //------------------------------------------------- -void msm6242_device::irq(UINT8 irq_type) +void msm6242_device::irq(uint8_t irq_type) { // are we actually raising this particular IRQ? if (m_irq_flag == 1 && m_irq_type == irq_type) @@ -189,26 +189,26 @@ void msm6242_device::irq(UINT8 irq_type) // bump //------------------------------------------------- -UINT64 msm6242_device::bump(int rtc_register, UINT64 delta, UINT64 register_min, UINT64 register_range) +uint64_t msm6242_device::bump(int rtc_register, uint64_t delta, uint64_t register_min, uint64_t register_range) { - UINT64 carry = 0; + uint64_t carry = 0; if (delta > 0) { // get the register value - UINT64 register_value = (rtc_register == RTC_TICKS) + uint64_t register_value = (rtc_register == RTC_TICKS) ? m_tick : get_clock_register(rtc_register); // increment the value - UINT64 new_register_value = ((register_value - register_min + delta) % register_range) + register_min; + uint64_t new_register_value = ((register_value - register_min + delta) % register_range) + register_min; // calculate the cary carry = ((register_value - register_min) + delta) / register_range; // store the new register value if (rtc_register == RTC_TICKS) - m_tick = (UINT16) new_register_value; + m_tick = (uint16_t) new_register_value; else set_clock_register(rtc_register, (int) new_register_value); } @@ -222,7 +222,7 @@ UINT64 msm6242_device::bump(int rtc_register, UINT64 delta, UINT64 register_min, // current_time //------------------------------------------------- -UINT64 msm6242_device::current_time() +uint64_t msm6242_device::current_time() { return machine().time().as_ticks(clock()); } @@ -236,10 +236,10 @@ UINT64 msm6242_device::current_time() void msm6242_device::update_rtc_registers() { // get the absolute current time, in ticks - UINT64 curtime = current_time(); + uint64_t curtime = current_time(); // how long as it been since we last updated? - UINT64 delta = curtime - m_last_update_time; + uint64_t delta = curtime - m_last_update_time; // set current time m_last_update_time = curtime; @@ -286,7 +286,7 @@ void msm6242_device::update_rtc_registers() void msm6242_device::update_timer() { - UINT64 callback_ticks = 0; + uint64_t callback_ticks = 0; attotime callback_time = attotime::never; // we only need to call back if the IRQ flag is on, and we have a handler @@ -316,10 +316,10 @@ void msm6242_device::update_timer() if (callback_ticks > 0) { // get the current time - UINT64 curtime = current_time(); + uint64_t curtime = current_time(); // we need the absolute callback time, in ticks - UINT64 absolute_callback_ticks = curtime + callback_ticks; + uint64_t absolute_callback_ticks = curtime + callback_ticks; // convert that to an attotime attotime absolute_callback_time = attotime::from_ticks(absolute_callback_ticks, clock()); @@ -360,11 +360,11 @@ void msm6242_device::rtc_timer_callback() // get_clock_nibble //------------------------------------------------- -UINT8 msm6242_device::get_clock_nibble(int rtc_register, bool high) +uint8_t msm6242_device::get_clock_nibble(int rtc_register, bool high) { int value = get_clock_register(rtc_register); value /= high ? 10 : 1; - return (UINT8) ((value % 10) & 0x0F); + return (uint8_t) ((value % 10) & 0x0F); } @@ -373,7 +373,7 @@ UINT8 msm6242_device::get_clock_nibble(int rtc_register, bool high) // get_clock_nibble //------------------------------------------------- -const char *msm6242_device::irq_type_string(UINT8 irq_type) +const char *msm6242_device::irq_type_string(uint8_t irq_type) { switch(irq_type) { @@ -398,7 +398,7 @@ const char *msm6242_device::irq_type_string(UINT8 irq_type) READ8_MEMBER( msm6242_device::read ) { int hour, pm; - UINT8 result; + uint8_t result; // update the registers; they may have changed update_rtc_registers(); @@ -469,7 +469,7 @@ READ8_MEMBER( msm6242_device::read ) break; case MSM6242_REG_W: - result = (UINT8) (get_clock_register(RTC_DAY_OF_WEEK) - 1); + result = (uint8_t) (get_clock_register(RTC_DAY_OF_WEEK) - 1); break; case MSM6242_REG_CD: diff --git a/src/devices/machine/msm6242.h b/src/devices/machine/msm6242.h index 149d58eea38..30ce46c7a01 100644 --- a/src/devices/machine/msm6242.h +++ b/src/devices/machine/msm6242.h @@ -26,7 +26,7 @@ class msm6242_device : public device_t, { public: // construction/destruction - msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_int_handler(device_t &device, _Object object) { return downcast(device).m_out_int_handler.set_callback(object); } @@ -49,31 +49,31 @@ protected: private: static const int RTC_TICKS = ~0; - static const UINT8 IRQ_64THSECOND = 0; - static const UINT8 IRQ_SECOND = 1; - static const UINT8 IRQ_MINUTE = 2; - static const UINT8 IRQ_HOUR = 3; + static const uint8_t IRQ_64THSECOND = 0; + static const uint8_t IRQ_SECOND = 1; + static const uint8_t IRQ_MINUTE = 2; + static const uint8_t IRQ_HOUR = 3; // state - UINT8 m_reg[3]; - UINT8 m_irq_flag; - UINT8 m_irq_type; - UINT16 m_tick; + uint8_t m_reg[3]; + uint8_t m_irq_flag; + uint8_t m_irq_type; + uint16_t m_tick; // incidentals devcb_write_line m_out_int_handler; emu_timer * m_timer; - UINT64 m_last_update_time; // last update time, in clock cycles + uint64_t m_last_update_time; // last update time, in clock cycles // methods void rtc_timer_callback(); - UINT64 current_time(); - void irq(UINT8 irq_type); - UINT64 bump(int rtc_register, UINT64 delta, UINT64 register_min, UINT64 register_range); + uint64_t current_time(); + void irq(uint8_t irq_type); + uint64_t bump(int rtc_register, uint64_t delta, uint64_t register_min, uint64_t register_range); void update_rtc_registers(); void update_timer(); - UINT8 get_clock_nibble(int rtc_register, bool high); - static const char *irq_type_string(UINT8 irq_type); + uint8_t get_clock_nibble(int rtc_register, bool high); + static const char *irq_type_string(uint8_t irq_type); }; diff --git a/src/devices/machine/ncr5380.cpp b/src/devices/machine/ncr5380.cpp index fe62190d40f..37c05421424 100644 --- a/src/devices/machine/ncr5380.cpp +++ b/src/devices/machine/ncr5380.cpp @@ -78,7 +78,7 @@ const device_type NCR5380 = &device_creator; // ncr5380_device - constructor/destructor //------------------------------------------------- -ncr5380_device::ncr5380_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +ncr5380_device::ncr5380_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : legacy_scsi_host_adapter(mconfig, NCR5380, "5380 SCSI", tag, owner, clock, "ncr5380", __FILE__), m_irq_cb(*this) { @@ -134,10 +134,10 @@ void ncr5380_device::device_stop() //------------------------------------------------- // Public API //------------------------------------------------- -UINT8 ncr5380_device::ncr5380_read_reg(UINT32 offset) +uint8_t ncr5380_device::ncr5380_read_reg(uint32_t offset) { int reg = offset & 7; - UINT8 rv; + uint8_t rv; switch( reg ) { @@ -218,7 +218,7 @@ UINT8 ncr5380_device::ncr5380_read_reg(UINT32 offset) return rv; } -void ncr5380_device::ncr5380_write_reg(UINT32 offset, UINT8 data) +void ncr5380_device::ncr5380_write_reg(uint32_t offset, uint8_t data) { int reg = offset & 7; diff --git a/src/devices/machine/ncr5380.h b/src/devices/machine/ncr5380.h index 77e8adc58b0..7acf34fe4f0 100644 --- a/src/devices/machine/ncr5380.h +++ b/src/devices/machine/ncr5380.h @@ -41,13 +41,13 @@ class ncr5380_device : public legacy_scsi_host_adapter { public: // construction/destruction - ncr5380_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ncr5380_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast(device).m_irq_cb.set_callback(object); } // our API - UINT8 ncr5380_read_reg(UINT32 offset); - void ncr5380_write_reg(UINT32 offset, UINT8 data); + uint8_t ncr5380_read_reg(uint32_t offset); + void ncr5380_write_reg(uint32_t offset, uint8_t data); protected: // device-level overrides @@ -56,11 +56,11 @@ protected: virtual void device_stop() override; private: - UINT8 m_5380_Registers[8]; - UINT8 m_last_id; - UINT8 m_5380_Command[32]; - INT32 m_cmd_ptr, m_d_ptr, m_d_limit, m_next_req_flag; - UINT8 m_5380_Data[512]; + uint8_t m_5380_Registers[8]; + uint8_t m_last_id; + uint8_t m_5380_Command[32]; + int32_t m_cmd_ptr, m_d_ptr, m_d_limit, m_next_req_flag; + uint8_t m_5380_Data[512]; devcb_write_line m_irq_cb; /* irq callback */ }; diff --git a/src/devices/machine/ncr5380n.cpp b/src/devices/machine/ncr5380n.cpp index cffe173d73c..84e1c08184e 100644 --- a/src/devices/machine/ncr5380n.cpp +++ b/src/devices/machine/ncr5380n.cpp @@ -30,7 +30,7 @@ DEVICE_ADDRESS_MAP_START(map, 8, ncr5380n_device) AM_RANGE(0x7, 0x7) AM_READWRITE(resetparityirq_r, startdmainitrx_w) ADDRESS_MAP_END -ncr5380n_device::ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ncr5380n_device::ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, NCR5380N, "5380 SCSI (new)", tag, owner, clock, "ncr5380", __FILE__), tm(nullptr), status(0), istatus(0), m_mode(0), m_outdata(0), m_busstatus(0), m_dmalatch(0), m_icommand(0), m_tcommand(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0), select_timeout(0), seq(0), tcount(0), mode(0), state(0), irq(false), drq(false), @@ -99,7 +99,7 @@ void ncr5380n_device::reset_disconnect() void ncr5380n_device::scsi_ctrl_changed() { - UINT32 ctrl = scsi_bus->ctrl_r(); + uint32_t ctrl = scsi_bus->ctrl_r(); // printf("scsi_ctrl_changed: lines now %x\n", ctrl); @@ -143,8 +143,8 @@ void ncr5380n_device::device_timer(emu_timer &timer, device_timer_id id, int par void ncr5380n_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(); if(0) printf("%s: state=%d.%d %s\n", @@ -318,11 +318,11 @@ WRITE8_MEMBER(ncr5380n_device::icmd_w) } // any control lines changing? - UINT8 mask = (data & IC_PHASEMASK) ^ (m_icommand & IC_PHASEMASK); + uint8_t mask = (data & IC_PHASEMASK) ^ (m_icommand & IC_PHASEMASK); if (mask) { // translate data to nscsi - UINT8 newdata; + uint8_t newdata; newdata = (data & IC_RST ? S_RST : 0) | (data & IC_ACK ? S_ACK : 0) | @@ -413,8 +413,8 @@ void ncr5380n_device::check_irq() READ8_MEMBER(ncr5380n_device::status_r) { - UINT32 ctrl = scsi_bus->ctrl_r(); - UINT8 res = status | + uint32_t ctrl = scsi_bus->ctrl_r(); + uint8_t res = status | (ctrl & S_RST ? ST_RST : 0) | (ctrl & S_BSY ? ST_BSY : 0) | (ctrl & S_REQ ? ST_REQ : 0) | @@ -433,8 +433,8 @@ WRITE8_MEMBER(ncr5380n_device::selenable_w) READ8_MEMBER(ncr5380n_device::busandstatus_r) { - UINT32 ctrl = scsi_bus->ctrl_r(); - UINT8 res = m_busstatus | + uint32_t ctrl = scsi_bus->ctrl_r(); + uint8_t res = m_busstatus | (ctrl & S_ATN ? BAS_ATN : 0) | (ctrl & S_ACK ? BAS_ACK : 0); @@ -470,7 +470,7 @@ WRITE8_MEMBER(ncr5380n_device::startdmainitrx_w) recv_byte(); } -void ncr5380n_device::dma_w(UINT8 val) +void ncr5380n_device::dma_w(uint8_t val) { // drop DRQ until we're ready for another byte drq_clear(); @@ -482,7 +482,7 @@ void ncr5380n_device::dma_w(UINT8 val) } } -UINT8 ncr5380n_device::dma_r() +uint8_t ncr5380n_device::dma_r() { // drop DRQ drq_clear(); diff --git a/src/devices/machine/ncr5380n.h b/src/devices/machine/ncr5380n.h index 444ef1af32d..fdb83159b50 100644 --- a/src/devices/machine/ncr5380n.h +++ b/src/devices/machine/ncr5380n.h @@ -22,7 +22,7 @@ class ncr5380n_device : public nscsi_device { public: - ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(device).m_irq_handler.set_callback(object); } @@ -52,8 +52,8 @@ public: virtual void scsi_ctrl_changed() override; - UINT8 dma_r(); - void dma_w(UINT8 val); + uint8_t dma_r(); + void dma_w(uint8_t val); protected: virtual void device_start() override; @@ -189,10 +189,10 @@ private: emu_timer *tm; - UINT8 status, istatus, m_mode, m_outdata, m_busstatus, m_dmalatch; - UINT8 m_icommand, m_tcommand; - UINT8 clock_conv, sync_offset, sync_period, bus_id, select_timeout, seq; - UINT16 tcount; + uint8_t status, istatus, m_mode, m_outdata, m_busstatus, m_dmalatch; + uint8_t m_icommand, m_tcommand; + uint8_t clock_conv, sync_offset, sync_period, bus_id, select_timeout, seq; + uint16_t tcount; int mode; int state/*, xfr_phase*/; diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 9de72de9afe..4ae2f6c5f7b 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -21,7 +21,7 @@ DEVICE_ADDRESS_MAP_START(map, 8, ncr5390_device) AM_RANGE(0x9, 0x9) AM_WRITE(clock_w) ADDRESS_MAP_END -ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, NCR5390, "5390 SCSI", tag, owner, clock, "ncr5390", __FILE__), tm(nullptr), config(0), status(0), istatus(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0), select_timeout(0), seq(0), tcount(0), mode(0), fifo_pos(0), command_pos(0), state(0), xfr_phase(0), command_length(0), dma_dir(0), irq(false), drq(false), m_irq_handler(*this), @@ -103,7 +103,7 @@ void ncr5390_device::reset_disconnect() void ncr5390_device::scsi_ctrl_changed() { - UINT32 ctrl = scsi_bus->ctrl_r(); + uint32_t ctrl = scsi_bus->ctrl_r(); if(ctrl & S_RST) { logerror("%s: scsi bus reset\n", tag()); return; @@ -119,9 +119,9 @@ void ncr5390_device::device_timer(emu_timer &timer, device_timer_id id, int para void ncr5390_device::step(bool timeout) { - UINT32 ctrl = scsi_bus->ctrl_r(); - UINT32 data = scsi_bus->data_r(); - UINT8 c = command[0] & 0x7f; + uint32_t ctrl = scsi_bus->ctrl_r(); + uint32_t data = scsi_bus->data_r(); + uint8_t c = command[0] & 0x7f; if(0) logerror("%s: state=%d.%d %s\n", @@ -569,9 +569,9 @@ WRITE8_MEMBER(ncr5390_device::tcount_hi_w) logerror("%s: tcount_hi_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); } -UINT8 ncr5390_device::fifo_pop() +uint8_t ncr5390_device::fifo_pop() { - UINT8 r = fifo[0]; + uint8_t r = fifo[0]; fifo_pos--; memmove(fifo, fifo+1, fifo_pos); if((!fifo_pos) && tcount && dma_dir == DMA_OUT) @@ -579,7 +579,7 @@ UINT8 ncr5390_device::fifo_pop() return r; } -void ncr5390_device::fifo_push(UINT8 val) +void ncr5390_device::fifo_push(uint8_t val) { fifo[fifo_pos++] = val; if(!drq && dma_dir == DMA_IN) @@ -588,7 +588,7 @@ void ncr5390_device::fifo_push(UINT8 val) READ8_MEMBER(ncr5390_device::fifo_r) { - UINT8 r; + uint8_t r; if(fifo_pos) { r = fifo[0]; fifo_pos--; @@ -636,7 +636,7 @@ void ncr5390_device::command_pop_and_chain() void ncr5390_device::start_command() { - UINT8 c = command[0] & 0x7f; + uint8_t c = command[0] & 0x7f; if(!check_valid_command(c)) { logerror("%s: invalid command %02x\n", tag(), command[0]); istatus |= I_ILLEGAL; @@ -712,7 +712,7 @@ void ncr5390_device::start_command() } } -bool ncr5390_device::check_valid_command(UINT8 cmd) +bool ncr5390_device::check_valid_command(uint8_t cmd) { int subcmd = cmd & 15; switch((cmd >> 4) & 7) { @@ -724,7 +724,7 @@ bool ncr5390_device::check_valid_command(UINT8 cmd) return false; } -int ncr5390_device::derive_msg_size(UINT8 msg_id) +int ncr5390_device::derive_msg_size(uint8_t msg_id) { const static int sizes[8] = { 6, 10, 6, 6, 6, 12, 6, 10 }; return sizes[msg_id >> 5]; @@ -749,8 +749,8 @@ void ncr5390_device::check_irq() READ8_MEMBER(ncr5390_device::status_r) { - UINT32 ctrl = scsi_bus->ctrl_r(); - UINT8 res = status | (ctrl & S_MSG ? 4 : 0) | (ctrl & S_CTL ? 2 : 0) | (ctrl & S_INP ? 1 : 0); + uint32_t ctrl = scsi_bus->ctrl_r(); + uint8_t res = status | (ctrl & S_MSG ? 4 : 0) | (ctrl & S_CTL ? 2 : 0) | (ctrl & S_INP ? 1 : 0); logerror("%s: status_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); if(irq) status &= ~(S_GROSS_ERROR|S_PARITY|S_TCC); @@ -765,7 +765,7 @@ WRITE8_MEMBER(ncr5390_device::bus_id_w) READ8_MEMBER(ncr5390_device::istatus_r) { - UINT8 res = istatus; + uint8_t res = istatus; istatus = 0; seq = 0; check_irq(); @@ -825,7 +825,7 @@ void ncr5390_device::dma_set(int dir) drq_set(); } -void ncr5390_device::dma_w(UINT8 val) +void ncr5390_device::dma_w(uint8_t val) { fifo_push(val); tcount--; @@ -833,9 +833,9 @@ void ncr5390_device::dma_w(UINT8 val) drq_clear(); } -UINT8 ncr5390_device::dma_r() +uint8_t ncr5390_device::dma_r() { - UINT8 r = fifo_pop(); + uint8_t r = fifo_pop(); if(!fifo_pos) drq_clear(); tcount--; diff --git a/src/devices/machine/ncr5390.h b/src/devices/machine/ncr5390.h index 7dfac6f5681..200e1acb57e 100644 --- a/src/devices/machine/ncr5390.h +++ b/src/devices/machine/ncr5390.h @@ -14,7 +14,7 @@ class ncr5390_device : public nscsi_device { public: - ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(device).m_irq_handler.set_callback(object); } @@ -44,8 +44,8 @@ public: virtual void scsi_ctrl_changed() override; - UINT8 dma_r(); - void dma_w(UINT8 val); + uint8_t dma_r(); + void dma_w(uint8_t val); protected: virtual void device_start() override; @@ -184,10 +184,10 @@ private: emu_timer *tm; - UINT8 command[2], config, status, istatus; - UINT8 clock_conv, sync_offset, sync_period, bus_id, select_timeout, seq; - UINT8 fifo[16]; - UINT16 tcount; + uint8_t command[2], config, status, istatus; + uint8_t clock_conv, sync_offset, sync_period, bus_id, select_timeout, seq; + uint8_t fifo[16]; + uint16_t tcount; int mode, fifo_pos, command_pos; int state, xfr_phase; int command_length; @@ -202,8 +202,8 @@ private: void start_command(); void step(bool timeout); - bool check_valid_command(UINT8 cmd); - int derive_msg_size(UINT8 msg_id); + bool check_valid_command(uint8_t cmd); + int derive_msg_size(uint8_t msg_id); void function_complete(); void function_bus_complete(); void bus_complete(); @@ -215,8 +215,8 @@ private: void reset_soft(); void reset_disconnect(); - UINT8 fifo_pop(); - void fifo_push(UINT8 val); + uint8_t fifo_pop(); + void fifo_push(uint8_t val); void send_byte(); void recv_byte(); diff --git a/src/devices/machine/ncr539x.cpp b/src/devices/machine/ncr539x.cpp index 3d0a83b5246..67959d7fa08 100644 --- a/src/devices/machine/ncr539x.cpp +++ b/src/devices/machine/ncr539x.cpp @@ -116,7 +116,7 @@ const device_type NCR539X = &device_creator; // ncr539x_device - constructor/destructor //------------------------------------------------- -ncr539x_device::ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +ncr539x_device::ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : legacy_scsi_host_adapter(mconfig, NCR539X, "539x SCSI", tag, owner, clock, "ncr539x", __FILE__), m_out_irq_cb(*this), m_out_drq_cb(*this) @@ -163,13 +163,13 @@ void ncr539x_device::device_reset() m_out_drq_cb(CLEAR_LINE); } -void ncr539x_device::dma_read_data(int bytes, UINT8 *pData) +void ncr539x_device::dma_read_data(int bytes, uint8_t *pData) { read_data(pData, bytes); } -void ncr539x_device::dma_write_data(int bytes, UINT8 *pData) +void ncr539x_device::dma_write_data(int bytes, uint8_t *pData) { write_data(pData, bytes); } @@ -292,7 +292,7 @@ void ncr539x_device::device_timer(emu_timer &timer, device_timer_id tid, int par READ8_MEMBER( ncr539x_device::read ) { - UINT8 rv = 0; + uint8_t rv = 0; #if VERBOSE #if VERBOSE_READS @@ -312,7 +312,7 @@ READ8_MEMBER( ncr539x_device::read ) case 2: // FIFO { - UINT8 fifo_bytes = m_fifo_internal_state & 0x1f; + uint8_t fifo_bytes = m_fifo_internal_state & 0x1f; if (!fifo_bytes) { @@ -753,7 +753,7 @@ void ncr539x_device::check_fifo_executable() } } -void ncr539x_device::fifo_write(UINT8 data) +void ncr539x_device::fifo_write(uint8_t data) { int phase = (m_status & 7); diff --git a/src/devices/machine/ncr539x.h b/src/devices/machine/ncr539x.h index 95b3655228d..3803a1ca975 100644 --- a/src/devices/machine/ncr539x.h +++ b/src/devices/machine/ncr539x.h @@ -27,7 +27,7 @@ class ncr539x_device : public legacy_scsi_host_adapter { public: // construction/destruction - ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast(device).m_out_irq_cb.set_callback(object); } template static devcb_base &set_out_drq_callback(device_t &device, _Object object) { return downcast(device).m_out_drq_cb.set_callback(object); } @@ -36,8 +36,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 @@ -46,37 +46,37 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - void fifo_write(UINT8 data); + void fifo_write(uint8_t data); void check_fifo_executable(); void exec_fifo(); void update_fifo_internal_state(int bytes); - UINT32 m_xfer_count; - UINT32 m_dma_size; - UINT8 m_command; - UINT8 m_last_id; - UINT8 m_timeout; - UINT8 m_sync_xfer_period; - UINT8 m_sync_offset; - UINT8 m_control1, m_control2, m_control3, m_control4; - UINT8 m_clock_factor; - UINT8 m_forced_test; - UINT8 m_data_alignment; + uint32_t m_xfer_count; + uint32_t m_dma_size; + uint8_t m_command; + uint8_t m_last_id; + uint8_t m_timeout; + uint8_t m_sync_xfer_period; + uint8_t m_sync_offset; + uint8_t m_control1, m_control2, m_control3, m_control4; + uint8_t m_clock_factor; + uint8_t m_forced_test; + uint8_t m_data_alignment; bool m_selected; bool m_chipid_available, m_chipid_lock; static const int m_fifo_size = 16; - UINT8 m_fifo_ptr, m_fifo_read_ptr, m_fifo[m_fifo_size]; + uint8_t m_fifo_ptr, m_fifo_read_ptr, m_fifo[m_fifo_size]; //int m_xfer_remaining; // amount in the FIFO when we're in data in phase // read-only registers - UINT8 m_status, m_irq_status, m_internal_state, m_fifo_internal_state; + uint8_t m_status, m_irq_status, m_internal_state, m_fifo_internal_state; static const int m_buffer_size = 2048; - UINT8 m_buffer[m_buffer_size]; + uint8_t m_buffer[m_buffer_size]; int m_buffer_offset, m_buffer_remaining, m_total_data; emu_timer *m_operation_timer; diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index e04d0f31a60..4fa344e4f4c 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -46,7 +46,7 @@ void netlist_mame_sub_interface::static_set_mult_offset(device_t &device, const } -netlist_mame_analog_input_t::netlist_mame_analog_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_analog_input_t::netlist_mame_analog_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_ANALOG_INPUT, "Netlist Analog Input", tag, owner, clock, "netlist_analog_input", __FILE__), netlist_mame_sub_interface(*owner), m_param(nullptr), @@ -82,7 +82,7 @@ void netlist_mame_analog_input_t::device_start() // netlist_mame_analog_output_t // ---------------------------------------------------------------------------------------- -netlist_mame_analog_output_t::netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_analog_output_t::netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_ANALOG_INPUT, "Netlist Analog Output", tag, owner, clock, "netlist_analog_output", __FILE__), netlist_mame_sub_interface(*owner), m_in("") @@ -117,7 +117,7 @@ void netlist_mame_analog_output_t::device_start() // netlist_mame_int_input_t // ---------------------------------------------------------------------------------------- -netlist_mame_int_input_t::netlist_mame_int_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_int_input_t::netlist_mame_int_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_INT_INPUT, "Netlist Logic Input", tag, owner, clock, "netlist_logic_input", __FILE__), netlist_mame_sub_interface(*owner), m_param(nullptr), @@ -127,7 +127,7 @@ netlist_mame_int_input_t::netlist_mame_int_input_t(const machine_config &mconfig { } -void netlist_mame_int_input_t::static_set_params(device_t &device, const char *param_name, const UINT32 mask, const UINT32 shift) +void netlist_mame_int_input_t::static_set_params(device_t &device, const char *param_name, const uint32_t mask, const uint32_t shift) { netlist_mame_int_input_t &netlist = downcast(device); LOG_DEV_CALLS(("static_set_params %s\n", device.tag())); @@ -151,7 +151,7 @@ void netlist_mame_int_input_t::device_start() // netlist_mame_logic_input_t // ---------------------------------------------------------------------------------------- -netlist_mame_logic_input_t::netlist_mame_logic_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_logic_input_t::netlist_mame_logic_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_LOGIC_INPUT, "Netlist Logic Input", tag, owner, clock, "netlist_logic_input", __FILE__), netlist_mame_sub_interface(*owner), m_param(nullptr), @@ -160,7 +160,7 @@ netlist_mame_logic_input_t::netlist_mame_logic_input_t(const machine_config &mco { } -void netlist_mame_logic_input_t::static_set_params(device_t &device, const char *param_name, const UINT32 shift) +void netlist_mame_logic_input_t::static_set_params(device_t &device, const char *param_name, const uint32_t shift) { netlist_mame_logic_input_t &netlist = downcast(device); LOG_DEV_CALLS(("static_set_params %s\n", device.tag())); @@ -183,7 +183,7 @@ void netlist_mame_logic_input_t::device_start() // netlist_mame_stream_input_t // ---------------------------------------------------------------------------------------- -netlist_mame_stream_input_t::netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_stream_input_t::netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_ANALOG_INPUT, "Netlist Stream Input", tag, owner, clock, "netlist_stream_input", __FILE__), netlist_mame_sub_interface(*owner), m_channel(0), @@ -220,7 +220,7 @@ void netlist_mame_stream_input_t::custom_netlist_additions(netlist::setup_t &set // netlist_mame_stream_output_t // ---------------------------------------------------------------------------------------- -netlist_mame_stream_output_t::netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_stream_output_t::netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_ANALOG_INPUT, "Netlist Stream Output", tag, owner, clock, "netlist_stream_output", __FILE__), netlist_mame_sub_interface(*owner), m_channel(0), @@ -294,7 +294,7 @@ static ADDRESS_MAP_START(program_dummy, AS_PROGRAM, 8, netlist_mame_device_t) AM_RANGE(0x000, 0x3ff) AM_ROM ADDRESS_MAP_END -netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NETLIST_CORE, "Netlist core device", tag, owner, clock, "netlist_core", __FILE__), m_icount(0), m_old(netlist::netlist_time::zero()), @@ -304,7 +304,7 @@ netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, cons { } -netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *file) +netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *file) : device_t(mconfig, type, name, tag, owner, clock, shortname, file), m_icount(0), m_old(netlist::netlist_time::zero()), @@ -418,7 +418,7 @@ void netlist_mame_device_t::update_time_x() { const netlist::netlist_time newt(netlist().time()); const netlist::netlist_time delta(newt - m_old + m_rem); - const UINT64 d = delta / m_div; + const uint64_t d = delta / m_div; m_old = newt; m_rem = delta - (m_div * d); m_icount -= d; @@ -452,17 +452,17 @@ ATTR_COLD void netlist_mame_device_t::save_state() } else if (s->m_dt.is_integral) { - if (s->m_dt.size == sizeof(INT64)) - save_pointer((INT64 *) s->m_ptr, s->m_name.cstr(), s->m_count); - else if (s->m_dt.size == sizeof(INT32)) - save_pointer((INT32 *) s->m_ptr, s->m_name.cstr(), s->m_count); - else if (s->m_dt.size == sizeof(INT16)) - save_pointer((INT16 *) s->m_ptr, s->m_name.cstr(), s->m_count); - else if (s->m_dt.size == sizeof(INT8)) - save_pointer((INT8 *) s->m_ptr, s->m_name.cstr(), s->m_count); + if (s->m_dt.size == sizeof(int64_t)) + save_pointer((int64_t *) s->m_ptr, s->m_name.cstr(), s->m_count); + else if (s->m_dt.size == sizeof(int32_t)) + save_pointer((int32_t *) s->m_ptr, s->m_name.cstr(), s->m_count); + else if (s->m_dt.size == sizeof(int16_t)) + save_pointer((int16_t *) s->m_ptr, s->m_name.cstr(), s->m_count); + else if (s->m_dt.size == sizeof(int8_t)) + save_pointer((int8_t *) s->m_ptr, s->m_name.cstr(), s->m_count); #if (PHAS_INT128) else if (s->m_dt.size == sizeof(INT128)) - save_pointer((INT64 *) s->m_ptr, s->m_name.cstr(), s->m_count * 2); + save_pointer((int64_t *) s->m_ptr, s->m_name.cstr(), s->m_count * 2); #endif else netlist().log().fatal("Unknown integral type size {1} for {2}\n", s->m_dt.size, s->m_name.cstr()); @@ -480,7 +480,7 @@ ATTR_COLD void netlist_mame_device_t::save_state() // netlist_mame_cpu_device_t // ---------------------------------------------------------------------------------------- -netlist_mame_cpu_device_t::netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_cpu_device_t::netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist CPU Device", tag, owner, clock, "netlist_cpu", __FILE__), device_execute_interface(mconfig, *this), device_state_interface(mconfig, *this), @@ -525,17 +525,17 @@ void netlist_mame_cpu_device_t::nl_register_devices() setup().factory().register_device( "NETDEV_CALLBACK", "nld_analog_callback", "-"); } -ATTR_COLD UINT64 netlist_mame_cpu_device_t::execute_clocks_to_cycles(UINT64 clocks) const +ATTR_COLD uint64_t netlist_mame_cpu_device_t::execute_clocks_to_cycles(uint64_t clocks) const { return clocks; } -ATTR_COLD UINT64 netlist_mame_cpu_device_t::execute_cycles_to_clocks(UINT64 cycles) const +ATTR_COLD uint64_t netlist_mame_cpu_device_t::execute_cycles_to_clocks(uint64_t cycles) const { return cycles; } -ATTR_COLD offs_t netlist_mame_cpu_device_t::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +ATTR_COLD offs_t netlist_mame_cpu_device_t::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { //char tmp[16]; unsigned startpc = pc; @@ -581,7 +581,7 @@ ATTR_HOT void netlist_mame_cpu_device_t::execute_run() // netlist_mame_sound_device_t // ---------------------------------------------------------------------------------------- -netlist_mame_sound_device_t::netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +netlist_mame_sound_device_t::netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist Sound Device", tag, owner, clock, "netlist_sound", __FILE__), device_sound_interface(mconfig, *this) { diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h index a7e3da059c2..e1b5842fe5c 100644 --- a/src/devices/machine/netlist.h +++ b/src/devices/machine/netlist.h @@ -120,8 +120,8 @@ class netlist_mame_device_t : public device_t public: // construction/destruction - netlist_mame_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - netlist_mame_device_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *file); + netlist_mame_device_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_device_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *file); virtual ~netlist_mame_device_t() { pstring::resetmem(); } static void static_set_constructor(device_t &device, void (*setup_func)(netlist::setup_t &)); @@ -184,7 +184,7 @@ class netlist_mame_cpu_device_t : public netlist_mame_device_t, public: // construction/destruction - netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_cpu_device_t() {} protected: // netlist_mame_device_t @@ -202,15 +202,15 @@ protected: // device_execute_interface overrides - virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const override; - virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const override; + virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override; + virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override; ATTR_HOT virtual void execute_run() override; // device_disasm_interface overrides - ATTR_COLD virtual UINT32 disasm_min_opcode_bytes() const override { return 1; } - ATTR_COLD virtual UINT32 disasm_max_opcode_bytes() const override { return 1; } - ATTR_COLD virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override; + ATTR_COLD virtual uint32_t disasm_min_opcode_bytes() const override { return 1; } + ATTR_COLD virtual uint32_t disasm_max_opcode_bytes() const override { return 1; } + ATTR_COLD virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; // device_memory_interface overrides @@ -258,7 +258,7 @@ class netlist_mame_sound_device_t : public netlist_mame_device_t, public: // construction/destruction - netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_sound_device_t() {} inline sound_stream *get_stream() { return m_stream; } @@ -341,7 +341,7 @@ class netlist_mame_analog_input_t : public device_t, public: // construction/destruction - netlist_mame_analog_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_analog_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_analog_input_t() { } static void static_set_name(device_t &device, const char *param_name); @@ -395,7 +395,7 @@ class netlist_mame_analog_output_t : public device_t, public: // construction/destruction - netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_analog_output_t() { } static void static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate); @@ -421,14 +421,14 @@ class netlist_mame_int_input_t : public device_t, public: // construction/destruction - netlist_mame_int_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_int_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_int_input_t() { } - static void static_set_params(device_t &device, const char *param_name, const UINT32 mask, const UINT32 shift); + static void static_set_params(device_t &device, const char *param_name, const uint32_t mask, const uint32_t shift); - inline void write(const UINT32 val) + inline void write(const uint32_t val) { - const UINT32 v = (val >> m_shift) & m_mask; + const uint32_t v = (val >> m_shift) & m_mask; if (v != (*m_param)()) synchronize(0, v); } @@ -452,8 +452,8 @@ protected: private: netlist::param_int_t *m_param; - UINT32 m_mask; - UINT32 m_shift; + uint32_t m_mask; + uint32_t m_shift; pstring m_param_name; }; @@ -467,14 +467,14 @@ class netlist_mame_logic_input_t : public device_t, public: // construction/destruction - netlist_mame_logic_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_logic_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_logic_input_t() { } - static void static_set_params(device_t &device, const char *param_name, const UINT32 shift); + static void static_set_params(device_t &device, const char *param_name, const uint32_t shift); - inline void write(const UINT32 val) + inline void write(const uint32_t val) { - const UINT32 v = (val >> m_shift) & 1; + const uint32_t v = (val >> m_shift) & 1; if (v != (*m_param)()) synchronize(0, v); } @@ -498,7 +498,7 @@ protected: private: netlist::param_logic_t *m_param; - UINT32 m_shift; + uint32_t m_shift; pstring m_param_name; }; @@ -512,7 +512,7 @@ class netlist_mame_stream_input_t : public device_t, public: // construction/destruction - netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_stream_input_t() { } static void static_set_params(device_t &device, int channel, const char *param_name); @@ -522,7 +522,7 @@ protected: virtual void device_start() override; virtual void custom_netlist_additions(netlist::setup_t &setup) override; private: - UINT32 m_channel; + uint32_t m_channel; pstring m_param_name; }; @@ -536,7 +536,7 @@ class netlist_mame_stream_output_t : public device_t, public: // construction/destruction - netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~netlist_mame_stream_output_t() { } static void static_set_params(device_t &device, int channel, const char *out_name); @@ -546,7 +546,7 @@ protected: virtual void device_start() override; virtual void custom_netlist_additions(netlist::setup_t &setup) override; private: - UINT32 m_channel; + uint32_t m_channel; pstring m_out_name; }; // ---------------------------------------------------------------------------------------- diff --git a/src/devices/machine/nmc9306.cpp b/src/devices/machine/nmc9306.cpp index 85580a6a621..aa495a7791e 100644 --- a/src/devices/machine/nmc9306.cpp +++ b/src/devices/machine/nmc9306.cpp @@ -62,7 +62,7 @@ const device_type NMC9306 = &device_creator; // nmc9306_device - constructor //------------------------------------------------- -inline UINT16 nmc9306_device::read(offs_t offset) +inline uint16_t nmc9306_device::read(offs_t offset) { return m_register[offset]; } @@ -72,7 +72,7 @@ inline UINT16 nmc9306_device::read(offs_t offset) // nmc9306_device - constructor //------------------------------------------------- -inline void nmc9306_device::write(offs_t offset, UINT16 data) +inline void nmc9306_device::write(offs_t offset, uint16_t data) { if (m_ewen) { @@ -103,7 +103,7 @@ inline void nmc9306_device::erase(offs_t offset) // nmc9306_device - constructor //------------------------------------------------- -nmc9306_device::nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +nmc9306_device::nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NMC9306, "NMC9306", tag, owner, clock, "nmc9306", __FILE__), device_nvram_interface(mconfig, *this), m_state(STATE_IDLE), diff --git a/src/devices/machine/nmc9306.h b/src/devices/machine/nmc9306.h index 92aba51965b..8812926189b 100644 --- a/src/devices/machine/nmc9306.h +++ b/src/devices/machine/nmc9306.h @@ -50,7 +50,7 @@ class nmc9306_device : public device_t, { public: // construction/destruction - nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE_LINE_MEMBER( cs_w ); DECLARE_WRITE_LINE_MEMBER( sk_w ); @@ -67,17 +67,17 @@ protected: virtual void nvram_write(emu_file &file) override; private: - inline UINT16 read(offs_t offset); - inline void write(offs_t offset, UINT16 data); + inline uint16_t read(offs_t offset); + inline void write(offs_t offset, uint16_t data); inline void erase(offs_t offset); - UINT16 m_register[16]; + uint16_t m_register[16]; int m_bits; int m_state; - UINT8 m_command; - UINT8 m_address; - UINT16 m_data; + uint8_t m_command; + uint8_t m_address; + uint16_t m_data; bool m_ewen; int m_cs; int m_sk; diff --git a/src/devices/machine/nsc810.cpp b/src/devices/machine/nsc810.cpp index fb2f3466508..24707067761 100644 --- a/src/devices/machine/nsc810.cpp +++ b/src/devices/machine/nsc810.cpp @@ -22,7 +22,7 @@ const device_type NSC810 = &device_creator; -nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NSC810, "National Semiconductor NSC810", tag, owner, clock, "nsc810", __FILE__), m_portA_latch(0), m_portB_latch(0), m_portC_latch(0), m_ddrA(0), m_ddrB(0), m_ddrC(0), m_mode(0), m_timer0(nullptr), m_timer1(nullptr), m_timer0_mode(0), m_timer1_mode(0), m_timer0_counter(0), m_timer1_counter(0), m_timer0_base(0), m_timer1_base(0), m_timer0_running(false), m_timer1_running(false), m_timer0_clock(0), m_timer1_clock(0), m_ramselect(false), @@ -109,7 +109,7 @@ void nsc810_device::device_timer(emu_timer &timer, device_timer_id id, int param READ8_MEMBER(nsc810_device::read) { - UINT8 res = 0xff; + uint8_t res = 0xff; if(m_ramselect) { @@ -182,7 +182,7 @@ READ8_MEMBER(nsc810_device::read) WRITE8_MEMBER(nsc810_device::write) { - UINT32 rate; + uint32_t rate; if(m_ramselect) { diff --git a/src/devices/machine/nsc810.h b/src/devices/machine/nsc810.h index 036b197680d..aa17014eab5 100644 --- a/src/devices/machine/nsc810.h +++ b/src/devices/machine/nsc810.h @@ -15,7 +15,7 @@ class nsc810_device : public device_t { public: // construction/destruction - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_portA_read_callback(device_t &device, _Object object) { return downcast(device).m_portA_r.set_callback(object); } template static devcb_base &set_portB_read_callback(device_t &device, _Object object) { return downcast(device).m_portB_r.set_callback(object); } @@ -26,8 +26,8 @@ public: template static devcb_base &set_timer0_callback(device_t &device, _Object object) { return downcast(device).m_timer0_out.set_callback(object); } template static devcb_base &set_timer1_callback(device_t &device, _Object object) { return downcast(device).m_timer1_out.set_callback(object); } - void set_timer0_clock(UINT32 clk) { m_timer0_clock = clk; } - void set_timer1_clock(UINT32 clk) { m_timer1_clock = clk; } + void set_timer0_clock(uint32_t clk) { m_timer0_clock = clk; } + void set_timer1_clock(uint32_t clk) { m_timer1_clock = clk; } DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); @@ -38,25 +38,25 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - UINT8 m_portA_latch; - UINT8 m_portB_latch; - UINT8 m_portC_latch; - UINT8 m_ddrA; - UINT8 m_ddrB; - UINT8 m_ddrC; - UINT8 m_mode; + uint8_t m_portA_latch; + uint8_t m_portB_latch; + uint8_t m_portC_latch; + uint8_t m_ddrA; + uint8_t m_ddrB; + uint8_t m_ddrC; + uint8_t m_mode; emu_timer* m_timer0; emu_timer* m_timer1; - UINT8 m_timer0_mode; - UINT8 m_timer1_mode; - UINT16 m_timer0_counter; - UINT16 m_timer1_counter; - UINT16 m_timer0_base; - UINT16 m_timer1_base; + uint8_t m_timer0_mode; + uint8_t m_timer1_mode; + uint16_t m_timer0_counter; + uint16_t m_timer1_counter; + uint16_t m_timer0_base; + uint16_t m_timer1_base; bool m_timer0_running; bool m_timer1_running; - UINT32 m_timer0_clock; - UINT32 m_timer1_clock; + uint32_t m_timer0_clock; + uint32_t m_timer1_clock; bool m_ramselect; devcb_read8 m_portA_r; diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp index d0508059758..7edbee58253 100644 --- a/src/devices/machine/nscsi_bus.cpp +++ b/src/devices/machine/nscsi_bus.cpp @@ -5,7 +5,7 @@ const device_type NSCSI_BUS = &device_creator; const device_type NSCSI_CONNECTOR = &device_creator; -nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NSCSI_BUS, "NSCSI Bus", tag, owner, clock, "nscsi_bus", __FILE__), data(0), ctrl(0) { devcnt = 0; @@ -42,7 +42,7 @@ void nscsi_bus_device::regen_ctrl(int refid) "dout", "din ", "cmd ", "stat", "4 ", "5 ", "mout", "min " }; - UINT32 octrl = ctrl; + uint32_t octrl = ctrl; ctrl = 0; for(int i=0; iscsi_ctrl_changed(); } -UINT32 nscsi_bus_device::data_r() const +uint32_t nscsi_bus_device::data_r() const { return data; } -UINT32 nscsi_bus_device::ctrl_r() const +uint32_t nscsi_bus_device::ctrl_r() const { return ctrl; } -void nscsi_bus_device::ctrl_w(int refid, UINT32 lines, UINT32 mask) +void nscsi_bus_device::ctrl_w(int refid, uint32_t lines, uint32_t mask) { - UINT32 c = dev[refid].ctrl; + uint32_t c = dev[refid].ctrl; dev[refid].ctrl = (c & ~mask) | (lines & mask); regen_ctrl(refid); } -void nscsi_bus_device::data_w(int refid, UINT32 lines) +void nscsi_bus_device::data_w(int refid, uint32_t lines) { dev[refid].data = lines; regen_data(); } -void nscsi_bus_device::ctrl_wait(int refid, UINT32 lines, UINT32 mask) +void nscsi_bus_device::ctrl_wait(int refid, uint32_t lines, uint32_t mask) { - UINT32 w = dev[refid].wait_ctrl; + uint32_t w = dev[refid].wait_ctrl; dev[refid].wait_ctrl = (w & ~mask) | (lines & mask); } @@ -132,7 +132,7 @@ void nscsi_bus_device::device_config_complete() } -nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NSCSI_CONNECTOR, "NSCSI Connector Abstraction", tag, owner, clock, "nscsi_connector", __FILE__), device_slot_interface(mconfig, *this) { @@ -151,7 +151,7 @@ nscsi_device *nscsi_connector::get_device() return dynamic_cast(get_card_device()); } -nscsi_device::nscsi_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) : +nscsi_device::nscsi_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_slot_card_interface(mconfig, *this) { @@ -175,7 +175,7 @@ void nscsi_device::device_start() save_item(NAME(scsi_id)); } -nscsi_full_device::nscsi_full_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) : +nscsi_full_device::nscsi_full_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) : nscsi_device(mconfig, type, name, tag, owner, clock, shortname, source) { } @@ -262,8 +262,8 @@ void nscsi_full_device::scsi_ctrl_changed() void nscsi_full_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(); if(ctrl & S_RST) { scsi_bus->data_w(scsi_refid, 0); scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); @@ -451,7 +451,7 @@ void nscsi_full_device::target_recv_byte() step(false); } -void nscsi_full_device::target_send_byte(UINT8 val) +void nscsi_full_device::target_send_byte(uint8_t val) { scsi_bus->ctrl_wait(scsi_refid, S_ACK, S_ACK); scsi_state = (scsi_state & STATE_MASK) | (SEND_BYTE_T_WAIT_ACK_1 << SUB_SHIFT); @@ -460,7 +460,7 @@ void nscsi_full_device::target_send_byte(UINT8 val) step(false); } -UINT8 nscsi_full_device::scsi_get_data(int id, int pos) +uint8_t nscsi_full_device::scsi_get_data(int id, int pos) { switch(id) { case SBUF_MAIN: @@ -472,7 +472,7 @@ UINT8 nscsi_full_device::scsi_get_data(int id, int pos) } } -void nscsi_full_device::scsi_put_data(int id, int pos, UINT8 data) +void nscsi_full_device::scsi_put_data(int id, int pos, uint8_t data) { switch(id) { case SBUF_MAIN: @@ -495,7 +495,7 @@ bool nscsi_full_device::command_done() { if(!data_buffer_pos) return false; - UINT8 h = scsi_cmdbuf[0]; + uint8_t h = scsi_cmdbuf[0]; switch(h >> 5) { case 0: return data_buffer_pos == 6; case 1: return data_buffer_pos == 10; @@ -531,7 +531,7 @@ nscsi_full_device::control *nscsi_full_device::buf_control_pop() return c; } -void nscsi_full_device::scsi_status_complete(UINT8 st) +void nscsi_full_device::scsi_status_complete(uint8_t st) { control *c; c = buf_control_push(); @@ -562,7 +562,7 @@ void nscsi_full_device::scsi_data_out(int buf, int size) c->param2 = size; } -void nscsi_full_device::sense(bool deferred, UINT8 key) +void nscsi_full_device::sense(bool deferred, uint8_t key) { memset(scsi_sense_buffer, 0, sizeof(scsi_sense_buffer)); scsi_sense_buffer[0] = deferred ? 0x71 : 0x70; diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h index c0b35af248e..1bd967568c8 100644 --- a/src/devices/machine/nscsi_bus.h +++ b/src/devices/machine/nscsi_bus.h @@ -17,14 +17,14 @@ class nscsi_device; class nscsi_bus_device : public device_t { public: - nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void ctrl_w(int refid, UINT32 lines, UINT32 mask); - void data_w(int refid, UINT32 lines); - void ctrl_wait(int refid, UINT32 lines, UINT32 mask); + void ctrl_w(int refid, uint32_t lines, uint32_t mask); + void data_w(int refid, uint32_t lines); + void ctrl_wait(int refid, uint32_t lines, uint32_t mask); - UINT32 ctrl_r() const; - UINT32 data_r() const; + uint32_t ctrl_r() const; + uint32_t data_r() const; protected: virtual void device_start() override; @@ -34,14 +34,14 @@ protected: private: struct dev_t { nscsi_device *dev; - UINT32 ctrl, wait_ctrl; - UINT32 data; + uint32_t ctrl, wait_ctrl; + uint32_t data; }; dev_t dev[16]; int devcnt; - UINT32 data, ctrl; + uint32_t data, ctrl; void regen_data(); void regen_ctrl(int refid); @@ -51,7 +51,7 @@ class nscsi_connector: public device_t, public device_slot_interface { public: - nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~nscsi_connector(); nscsi_device *get_device(); @@ -86,7 +86,7 @@ public: S_PHASE_MASK = S_MSG|S_CTL|S_INP }; - nscsi_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); + nscsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); void connect_to_bus(nscsi_bus_device *bus, int refid, int default_scsi_id); virtual void scsi_ctrl_changed(); @@ -101,7 +101,7 @@ protected: class nscsi_full_device : public nscsi_device { public: - nscsi_full_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); + nscsi_full_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 void scsi_ctrl_changed() override; protected: @@ -272,9 +272,9 @@ protected: SBUF_SENSE }; - UINT8 scsi_cmdbuf[4096], scsi_sense_buffer[8]; + uint8_t scsi_cmdbuf[4096], scsi_sense_buffer[8]; int scsi_cmdsize; - UINT8 scsi_identify; + uint8_t scsi_identify; virtual void device_start() override; virtual void device_reset() override; @@ -284,16 +284,16 @@ protected: virtual void scsi_command(); void scsi_unknown_command(); - void scsi_status_complete(UINT8 st); + void scsi_status_complete(uint8_t st); void scsi_data_in(int buf, int size); void scsi_data_out(int buf, int size); - void sense(bool deferred, UINT8 key); + void sense(bool deferred, uint8_t key); int get_lun(int def = 0); void bad_lun(); - virtual UINT8 scsi_get_data(int buf, int offset); - virtual void scsi_put_data(int buf, int offset, UINT8 data); + virtual uint8_t scsi_get_data(int buf, int offset); + virtual void scsi_put_data(int buf, int offset, uint8_t data); // Default delays: @@ -416,7 +416,7 @@ private: void step(bool timeout); void target_recv_byte(); - void target_send_byte(UINT8 val); + void target_send_byte(uint8_t val); void target_send_buffer_byte(); bool command_done(); }; diff --git a/src/devices/machine/nscsi_cb.cpp b/src/devices/machine/nscsi_cb.cpp index 94950098f6a..23c71d45bff 100644 --- a/src/devices/machine/nscsi_cb.cpp +++ b/src/devices/machine/nscsi_cb.cpp @@ -4,7 +4,7 @@ const device_type NSCSI_CB = &device_creator; -nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, NSCSI_CB, "SCSI callback (new)", tag, owner, clock, "nscsi_cb", __FILE__), m_write_rst(*this), m_write_atn(*this), diff --git a/src/devices/machine/nscsi_cb.h b/src/devices/machine/nscsi_cb.h index 547f288842b..4fab2021fe1 100644 --- a/src/devices/machine/nscsi_cb.h +++ b/src/devices/machine/nscsi_cb.h @@ -36,7 +36,7 @@ class nscsi_callback_device : public nscsi_device { public: - nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template void set_rst_callback(_line line) { m_write_rst.set_callback(line); } template void set_atn_callback(_line line) { m_write_atn.set_callback(line); } @@ -50,9 +50,9 @@ public: virtual void scsi_ctrl_changed() override; - UINT8 read() { return scsi_bus->data_r(); } + uint8_t read() { return scsi_bus->data_r(); } DECLARE_READ8_MEMBER( read ) { return read(); } - void write(UINT8 data) { scsi_bus->data_w(scsi_refid, data); } + void write(uint8_t data) { scsi_bus->data_w(scsi_refid, data); } DECLARE_WRITE8_MEMBER( write ) { write(data); } DECLARE_READ_LINE_MEMBER( rst_r ) { return (m_ctrl & S_RST) ? 1 : 0; } @@ -89,7 +89,7 @@ protected: devcb_write_line m_write_sel; devcb_write_line m_write_bsy; - UINT32 m_ctrl; + uint32_t m_ctrl; }; extern const device_type NSCSI_CB; diff --git a/src/devices/machine/nscsi_cd.cpp b/src/devices/machine/nscsi_cd.cpp index 2cc3dc48ae5..35e21a91ebf 100644 --- a/src/devices/machine/nscsi_cd.cpp +++ b/src/devices/machine/nscsi_cd.cpp @@ -5,7 +5,7 @@ const device_type NSCSI_CDROM = &device_creator; -nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_full_device(mconfig, NSCSI_CDROM, "SCSI CDROM", tag, owner, clock, "scsi_cdrom", __FILE__), cdrom(nullptr), bytes_per_sector(0), lba(0), cur_lba(0), blocks(0) { } @@ -40,7 +40,7 @@ machine_config_constructor nscsi_cdrom_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME(scsi_cdrom); } -UINT8 nscsi_cdrom_device::scsi_get_data(int id, int pos) +uint8_t nscsi_cdrom_device::scsi_get_data(int id, int pos) { if(id != 2) return nscsi_full_device::scsi_get_data(id, pos); @@ -136,7 +136,7 @@ void nscsi_cdrom_device::scsi_command() logerror("%s: command READ CAPACITY\n", tag()); - UINT32 temp = cdrom_get_track_start(cdrom, 0xaa); + uint32_t temp = cdrom_get_track_start(cdrom, 0xaa); temp--; // return the last used block on the disc scsi_cmdbuf[0] = (temp>>24) & 0xff; @@ -185,7 +185,7 @@ void nscsi_cdrom_device::scsi_command() scsi_cmdbuf[pos++] = 0x00; // medium type scsi_cmdbuf[pos++] = 0x80; // WP, cache - UINT32 temp = cdrom_get_track_start(cdrom, 0xaa); + uint32_t temp = cdrom_get_track_start(cdrom, 0xaa); temp--; // return the last used block on the disc scsi_cmdbuf[pos++] = 0x08; // Block descriptor length diff --git a/src/devices/machine/nscsi_cd.h b/src/devices/machine/nscsi_cd.h index a251d1a3e98..1299d9bfd8b 100644 --- a/src/devices/machine/nscsi_cd.h +++ b/src/devices/machine/nscsi_cd.h @@ -9,7 +9,7 @@ class nscsi_cdrom_device : public nscsi_full_device { public: - nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual machine_config_constructor device_mconfig_additions() const override; protected: @@ -17,10 +17,10 @@ protected: virtual void device_reset() override; virtual void scsi_command() override; - virtual UINT8 scsi_get_data(int id, int pos) override; + virtual uint8_t scsi_get_data(int id, int pos) override; private: - UINT8 block[2048]; + uint8_t block[2048]; cdrom_file *cdrom; int bytes_per_sector; int lba, cur_lba, blocks; diff --git a/src/devices/machine/nscsi_hd.cpp b/src/devices/machine/nscsi_hd.cpp index d7d3ccb5e5b..a2179e34a77 100644 --- a/src/devices/machine/nscsi_hd.cpp +++ b/src/devices/machine/nscsi_hd.cpp @@ -5,12 +5,12 @@ const device_type NSCSI_HARDDISK = &device_creator; -nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_full_device(mconfig, NSCSI_HARDDISK, "SCSI HARDDISK", tag, owner, clock, "scsi_harddisk", __FILE__), harddisk(nullptr), lba(0), cur_lba(0), blocks(0), bytes_per_sector(0) { } -nscsi_harddisk_device::nscsi_harddisk_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) : +nscsi_harddisk_device::nscsi_harddisk_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) : nscsi_full_device(mconfig, type, name, tag, owner, clock, shortname, source), harddisk(nullptr), lba(0), cur_lba(0), blocks(0), bytes_per_sector(0) { } @@ -50,7 +50,7 @@ machine_config_constructor nscsi_harddisk_device::device_mconfig_additions() con return MACHINE_CONFIG_NAME(scsi_harddisk); } -UINT8 nscsi_harddisk_device::scsi_get_data(int id, int pos) +uint8_t nscsi_harddisk_device::scsi_get_data(int id, int pos) { if(id != 2) return nscsi_full_device::scsi_get_data(id, pos); @@ -65,7 +65,7 @@ UINT8 nscsi_harddisk_device::scsi_get_data(int id, int pos) return block[pos % bytes_per_sector]; } -void nscsi_harddisk_device::scsi_put_data(int id, int pos, UINT8 data) +void nscsi_harddisk_device::scsi_put_data(int id, int pos, uint8_t data) { if(id != 2) { nscsi_full_device::scsi_put_data(id, pos, data); @@ -194,7 +194,7 @@ void nscsi_harddisk_device::scsi_command() scsi_cmdbuf[pos++] = 0x00; // WP, cache hard_disk_info *info = hard_disk_get_info(harddisk); - UINT32 dsize = info->cylinders * info->heads * info->sectors - 1; + uint32_t dsize = info->cylinders * info->heads * info->sectors - 1; scsi_cmdbuf[pos++] = 0x08; // Block descriptor length scsi_cmdbuf[pos++] = 0x00; scsi_cmdbuf[pos++] = (dsize>>16) & 0xff; @@ -265,8 +265,8 @@ void nscsi_harddisk_device::scsi_command() scsi_cmdbuf[pos++] = 0x00; // RPL scsi_cmdbuf[pos++] = 0x00; // Rotational offset scsi_cmdbuf[pos++] = 0x00; // Reserved - scsi_cmdbuf[pos++] = UINT8(10000 >> 8); // Medium rotation rate - scsi_cmdbuf[pos++] = UINT8(10000); // Medium rotation rate + scsi_cmdbuf[pos++] = uint8_t(10000 >> 8); // Medium rotation rate + scsi_cmdbuf[pos++] = uint8_t(10000); // Medium rotation rate scsi_cmdbuf[pos++] = 0x00; // Reserved scsi_cmdbuf[pos++] = 0x00; // Reserved break; @@ -323,7 +323,7 @@ void nscsi_harddisk_device::scsi_command() logerror("%s: command READ CAPACITY\n", tag()); hard_disk_info *info = hard_disk_get_info(harddisk); - UINT32 size = info->cylinders * info->heads * info->sectors - 1; + uint32_t size = info->cylinders * info->heads * info->sectors - 1; scsi_cmdbuf[0] = (size>>24) & 0xff; scsi_cmdbuf[1] = (size>>16) & 0xff; diff --git a/src/devices/machine/nscsi_hd.h b/src/devices/machine/nscsi_hd.h index 2206b3e3a73..873f3b80c64 100644 --- a/src/devices/machine/nscsi_hd.h +++ b/src/devices/machine/nscsi_hd.h @@ -9,8 +9,8 @@ class nscsi_harddisk_device : public nscsi_full_device { public: - nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - nscsi_harddisk_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); + nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nscsi_harddisk_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 machine_config_constructor device_mconfig_additions() const override; @@ -19,10 +19,10 @@ protected: virtual void device_reset() override; virtual void scsi_command() override; - virtual UINT8 scsi_get_data(int id, int pos) override; - virtual void scsi_put_data(int buf, int offset, UINT8 data) override; + virtual uint8_t scsi_get_data(int id, int pos) override; + virtual void scsi_put_data(int buf, int offset, uint8_t data) override; - UINT8 block[512]; + uint8_t block[512]; hard_disk_file *harddisk; int lba, cur_lba, blocks; int bytes_per_sector; diff --git a/src/devices/machine/nscsi_s1410.cpp b/src/devices/machine/nscsi_s1410.cpp index f1725329d9d..4f54f1c0b4a 100644 --- a/src/devices/machine/nscsi_s1410.cpp +++ b/src/devices/machine/nscsi_s1410.cpp @@ -4,7 +4,7 @@ const device_type NSCSI_S1410 = &device_creator; -nscsi_s1410_device::nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +nscsi_s1410_device::nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_harddisk_device(mconfig, NSCSI_S1410, "S1410", tag, owner, clock, "scsi_s1410", __FILE__) { } @@ -60,7 +60,7 @@ void nscsi_s1410_device::scsi_command() blocks = (bytes_per_sector == 256) ? 32 : 17; int track_length = blocks*bytes_per_sector; - std::vector data(track_length); + std::vector data(track_length); memset(&data[0], 0xc6, track_length); if(!hard_disk_write(harddisk, lba, &data[0])) { @@ -120,7 +120,7 @@ void nscsi_s1410_device::scsi_command() } } -UINT8 nscsi_s1410_device::scsi_get_data(int id, int pos) +uint8_t nscsi_s1410_device::scsi_get_data(int id, int pos) { switch(scsi_cmdbuf[0]) { case SC_READ_SECTOR_BUFFER: @@ -131,7 +131,7 @@ UINT8 nscsi_s1410_device::scsi_get_data(int id, int pos) } } -void nscsi_s1410_device::scsi_put_data(int id, int pos, UINT8 data) +void nscsi_s1410_device::scsi_put_data(int id, int pos, uint8_t data) { switch(scsi_cmdbuf[0]) { case SC_FORMAT_ALT_TRACK: diff --git a/src/devices/machine/nscsi_s1410.h b/src/devices/machine/nscsi_s1410.h index 446cf18568d..52cb014e7dd 100644 --- a/src/devices/machine/nscsi_s1410.h +++ b/src/devices/machine/nscsi_s1410.h @@ -9,7 +9,7 @@ class nscsi_s1410_device : public nscsi_harddisk_device { public: - nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // SCSI status returns @@ -65,10 +65,10 @@ protected: virtual void device_reset() override; virtual void scsi_command() override; - virtual UINT8 scsi_get_data(int id, int pos) override; - virtual void scsi_put_data(int buf, int offset, UINT8 data) override; + virtual uint8_t scsi_get_data(int id, int pos) override; + virtual void scsi_put_data(int buf, int offset, uint8_t data) override; - UINT8 params[8]; + uint8_t params[8]; }; extern const device_type NSCSI_S1410; diff --git a/src/devices/machine/nvram.cpp b/src/devices/machine/nvram.cpp index 3a88345eab3..b265bad4831 100644 --- a/src/devices/machine/nvram.cpp +++ b/src/devices/machine/nvram.cpp @@ -22,7 +22,7 @@ const device_type NVRAM = &device_creator; // nvram_device - constructor //------------------------------------------------- -nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NVRAM, "NVRAM", tag, owner, clock, "nvram", __FILE__), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -103,7 +103,7 @@ void nvram_device::nvram_default() // random values case DEFAULT_RANDOM: { - UINT8 *nvram = reinterpret_cast(m_base); + uint8_t *nvram = reinterpret_cast(m_base); for (int index = 0; index < m_length; index++) nvram[index] = machine().rand(); break; diff --git a/src/devices/machine/nvram.h b/src/devices/machine/nvram.h index 1d509882cf0..30ee2d9088a 100644 --- a/src/devices/machine/nvram.h +++ b/src/devices/machine/nvram.h @@ -77,7 +77,7 @@ public: }; // construction/destruction - nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // inline configuration helpers static void static_set_default_value(device_t &device, default_value value); diff --git a/src/devices/machine/pc_fdc.cpp b/src/devices/machine/pc_fdc.cpp index d72db5a0c45..9806abf6903 100644 --- a/src/devices/machine/pc_fdc.cpp +++ b/src/devices/machine/pc_fdc.cpp @@ -45,7 +45,7 @@ DEVICE_ADDRESS_MAP_START(map, 8, pc_fdc_at_device) AM_RANGE(0x7, 0x7) AM_READWRITE(dir_r, ccr_w) ADDRESS_MAP_END -pc_fdc_family_device::pc_fdc_family_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) : +pc_fdc_family_device::pc_fdc_family_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) : pc_fdc_interface(mconfig, type, name, tag, owner, clock, shortname, source), fdc(*this, "upd765"), intrq_cb(*this), drq_cb(*this) @@ -57,12 +57,12 @@ void pc_fdc_family_device::tc_w(bool state) fdc->tc_w(state); } -UINT8 pc_fdc_family_device::dma_r() +uint8_t pc_fdc_family_device::dma_r() { return fdc->dma_r(); } -void pc_fdc_family_device::dma_w(UINT8 data) +void pc_fdc_family_device::dma_w(uint8_t data) { fdc->dma_w(data); } @@ -104,7 +104,7 @@ void pc_fdc_family_device::device_reset() WRITE8_MEMBER( pc_fdc_family_device::dor_w ) { logerror("%s: dor = %02x\n", tag(), data); - UINT8 pdor = dor; + uint8_t pdor = dor; dor = data; for(int i=0; i<4; i++) @@ -140,7 +140,7 @@ WRITE8_MEMBER( pc_fdc_family_device::ccr_w ) fdc->set_rate(rates[data & 3]); } -UINT8 pc_fdc_family_device::do_dir_r() +uint8_t pc_fdc_family_device::do_dir_r() { if(floppy[dor & 3]) return floppy[dor & 3]->dskchg_r() ? 0x00 : 0x80; @@ -183,10 +183,10 @@ void pc_fdc_family_device::check_drq() drq_cb(drq); } -pc_fdc_xt_device::pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pc_fdc_family_device(mconfig, PC_FDC_XT, "PC FDC XT", tag, owner, clock, "pc_fdc_xt", __FILE__) +pc_fdc_xt_device::pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pc_fdc_family_device(mconfig, PC_FDC_XT, "PC FDC XT", tag, owner, clock, "pc_fdc_xt", __FILE__) { } -pc_fdc_at_device::pc_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pc_fdc_family_device(mconfig, PC_FDC_AT, "PC FDC AT", tag, owner, clock, "pc_fdc_at", __FILE__) +pc_fdc_at_device::pc_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pc_fdc_family_device(mconfig, PC_FDC_AT, "PC FDC AT", tag, owner, clock, "pc_fdc_at", __FILE__) { } diff --git a/src/devices/machine/pc_fdc.h b/src/devices/machine/pc_fdc.h index b94fab2a2ca..61785cda61a 100644 --- a/src/devices/machine/pc_fdc.h +++ b/src/devices/machine/pc_fdc.h @@ -26,7 +26,7 @@ class pc_fdc_family_device : public pc_fdc_interface { public: - pc_fdc_family_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); + pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); template static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast(device).intrq_cb.set_callback(object); } template static devcb_base &set_drq_wr_callback(device_t &device, _Object object) { return downcast(device).drq_cb.set_callback(object); } @@ -36,9 +36,9 @@ public: virtual DECLARE_ADDRESS_MAP(map, 8) override; virtual void tc_w(bool state) override; - virtual UINT8 dma_r() override; - virtual void dma_w(UINT8 data) override; - virtual UINT8 do_dir_r() override; + virtual uint8_t dma_r() override; + virtual void dma_w(uint8_t data) override; + virtual uint8_t do_dir_r() override; READ8_MEMBER(dor_r); WRITE8_MEMBER(dor_w); @@ -54,7 +54,7 @@ protected: bool irq, drq, fdc_drq, fdc_irq; devcb_write_line intrq_cb, drq_cb; - UINT8 dor; + uint8_t dor; floppy_image_device *floppy[4]; @@ -64,7 +64,7 @@ protected: class pc_fdc_xt_device : public pc_fdc_family_device { public: - pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; WRITE8_MEMBER(dor_fifo_w); @@ -72,7 +72,7 @@ public: class pc_fdc_at_device : public pc_fdc_family_device { public: - pc_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pc_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; diff --git a/src/devices/machine/pc_lpt.cpp b/src/devices/machine/pc_lpt.cpp index f483c7bb336..93652755d84 100644 --- a/src/devices/machine/pc_lpt.cpp +++ b/src/devices/machine/pc_lpt.cpp @@ -12,7 +12,7 @@ const device_type PC_LPT = &device_creator; -pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PC_LPT, "PC-LPT", tag, owner, clock, "pc_lpt", __FILE__), m_irq(1), m_data(0xff), m_control(0), diff --git a/src/devices/machine/pc_lpt.h b/src/devices/machine/pc_lpt.h index ca2a71f6524..3cf812276d9 100644 --- a/src/devices/machine/pc_lpt.h +++ b/src/devices/machine/pc_lpt.h @@ -21,7 +21,7 @@ class pc_lpt_device : public device_t { public: - pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast(device).m_irq_handler.set_callback(object); } @@ -69,8 +69,8 @@ private: // internal state int m_irq; - UINT8 m_data; - UINT8 m_control; + uint8_t m_data; + uint8_t m_control; int m_irq_enabled; int m_centronics_ack; diff --git a/src/devices/machine/pccard.cpp b/src/devices/machine/pccard.cpp index 3284c2c5d45..a937fe64739 100644 --- a/src/devices/machine/pccard.cpp +++ b/src/devices/machine/pccard.cpp @@ -22,7 +22,7 @@ WRITE16_MEMBER( pccard_interface::write_reg ) const device_type PCCARD_SLOT = &device_creator; -pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PCCARD_SLOT, "PCCARD SLOT", tag, owner, clock, "pccard", __FILE__), device_slot_interface(mconfig, *this), m_pccard(nullptr) diff --git a/src/devices/machine/pccard.h b/src/devices/machine/pccard.h index 2068406d4b2..28f7da2f38d 100644 --- a/src/devices/machine/pccard.h +++ b/src/devices/machine/pccard.h @@ -24,7 +24,7 @@ class pccard_slot_device : public device_t, public device_slot_interface { public: - pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ_LINE_MEMBER(read_line_inserted); DECLARE_READ16_MEMBER(read_memory); diff --git a/src/devices/machine/pcf8593.cpp b/src/devices/machine/pcf8593.cpp index 48e002fdf2d..4620bbdf6cf 100644 --- a/src/devices/machine/pcf8593.cpp +++ b/src/devices/machine/pcf8593.cpp @@ -46,7 +46,7 @@ const device_type PCF8593 = &device_creator; // pcf8593_device - constructor //------------------------------------------------- -pcf8593_device::pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pcf8593_device::pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PCF8593, "PCF8593 RTC", tag, owner, clock, "pcf8593", __FILE__), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this) @@ -185,7 +185,7 @@ WRITE_LINE_MEMBER(pcf8593_device::scl_w) // A2 + xx + .. = write byte if ((m_data_recv[0] == 0xA2) && (m_data_recv_index >= 2)) { - UINT8 rtc_pos, rtc_val; + uint8_t rtc_pos, rtc_val; rtc_pos = m_data_recv[1] + (m_data_recv_index - 2); rtc_val = m_data_recv[m_data_recv_index]; //if (rtc_pos == 0) rtc_val = rtc_val & 3; // what is this doing here? diff --git a/src/devices/machine/pcf8593.h b/src/devices/machine/pcf8593.h index b2b09f9ebd0..9d3d9ce4ed7 100644 --- a/src/devices/machine/pcf8593.h +++ b/src/devices/machine/pcf8593.h @@ -33,7 +33,7 @@ class pcf8593_device : public device_t, public device_nvram_interface { public: - pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE_LINE_MEMBER(scl_w); DECLARE_WRITE_LINE_MEMBER(sda_w); @@ -60,16 +60,16 @@ private: static const device_timer_id TIMER_UPDATE_COUNTER = 0; // internal state - UINT8 m_data[16]; + uint8_t m_data[16]; int m_pin_scl; int m_pin_sda; int m_inp; int m_active; int m_bits; - UINT8 m_data_recv_index; - UINT8 m_data_recv[50]; - UINT8 m_mode; - UINT8 m_pos; + uint8_t m_data_recv_index; + uint8_t m_data_recv[50]; + uint8_t m_mode; + uint8_t m_pos; emu_timer * m_timer; enum { RTC_MODE_NONE, RTC_MODE_SEND, RTC_MODE_RECV }; }; diff --git a/src/devices/machine/pci-apic.cpp b/src/devices/machine/pci-apic.cpp index ce32692c7e6..b0fc3885c7f 100644 --- a/src/devices/machine/pci-apic.cpp +++ b/src/devices/machine/pci-apic.cpp @@ -4,7 +4,7 @@ const device_type APIC = &device_creator; -apic_device::apic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +apic_device::apic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, APIC, "I/O Advanced Programmable Interrupt Controller", tag, owner, clock, "apic", __FILE__) { } diff --git a/src/devices/machine/pci-apic.h b/src/devices/machine/pci-apic.h index 4da0dc00bd3..8fffd1deb85 100644 --- a/src/devices/machine/pci-apic.h +++ b/src/devices/machine/pci-apic.h @@ -10,7 +10,7 @@ class apic_device : public pci_device { public: - apic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + apic_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/pci-ide.cpp b/src/devices/machine/pci-ide.cpp index 0f3f6f8cbb6..ab49e816c2c 100644 --- a/src/devices/machine/pci-ide.cpp +++ b/src/devices/machine/pci-ide.cpp @@ -4,7 +4,7 @@ const device_type IDE_PCI = &device_creator; -ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, IDE_PCI, "IDE PCI interface", tag, owner, clock, "ide_pci", __FILE__), m_ide(*this, "ide"), m_ide2(*this, "ide2"), @@ -94,7 +94,7 @@ void ide_pci_device::device_reset() READ32_MEMBER(ide_pci_device::ide_read_cs1) { // PCI offset starts at 0x3f4, idectrl expects 0x3f0 - UINT32 data = 0; + uint32_t data = 0; data = m_ide->read_cs1(space, ++offset, mem_mask); if (0) logerror("%s:ide_read_cs1 offset=%08X data=%08X mask=%08X\n", machine().describe_context(), offset, data, mem_mask); @@ -110,7 +110,7 @@ WRITE32_MEMBER(ide_pci_device::ide_write_cs1) READ32_MEMBER(ide_pci_device::ide2_read_cs1) { // PCI offset starts at 0x374, idectrl expects 0x370 - UINT32 data = 0; + uint32_t data = 0; data = m_ide2->read_cs1(space, ++offset, mem_mask); return data; } diff --git a/src/devices/machine/pci-ide.h b/src/devices/machine/pci-ide.h index e432f785d79..2d37ebef990 100644 --- a/src/devices/machine/pci-ide.h +++ b/src/devices/machine/pci-ide.h @@ -29,7 +29,7 @@ TODO: class ide_pci_device : public pci_device { public: - ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); required_device m_ide; required_device m_ide2; virtual DECLARE_ADDRESS_MAP(config_map, 32) override; @@ -54,7 +54,7 @@ private: int m_irq_num; devcb_write_line m_irq_handler; - UINT32 m_config_data[0x10]; + uint32_t m_config_data[0x10]; DECLARE_ADDRESS_MAP(chan1_data_command_map, 32); DECLARE_ADDRESS_MAP(chan1_control_map, 32); DECLARE_ADDRESS_MAP(chan2_data_command_map, 32); diff --git a/src/devices/machine/pci-sata.cpp b/src/devices/machine/pci-sata.cpp index 65cc090848b..f8fdaf56db7 100644 --- a/src/devices/machine/pci-sata.cpp +++ b/src/devices/machine/pci-sata.cpp @@ -4,7 +4,7 @@ const device_type SATA = &device_creator; -sata_device::sata_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sata_device::sata_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, SATA, "SATA AHCI interface", tag, owner, clock, "sata", __FILE__) { } diff --git a/src/devices/machine/pci-sata.h b/src/devices/machine/pci-sata.h index 7075b49bb58..19dd69e95b3 100644 --- a/src/devices/machine/pci-sata.h +++ b/src/devices/machine/pci-sata.h @@ -10,7 +10,7 @@ class sata_device : public pci_device { public: - sata_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sata_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/pci-smbus.cpp b/src/devices/machine/pci-smbus.cpp index 13d4d491570..fc6d589b64e 100644 --- a/src/devices/machine/pci-smbus.cpp +++ b/src/devices/machine/pci-smbus.cpp @@ -26,7 +26,7 @@ DEVICE_ADDRESS_MAP_START(map, 32, smbus_device) AM_RANGE(0x14, 0x17) AM_READ8 (notify_dhigh_r, 0xff000000) ADDRESS_MAP_END -smbus_device::smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +smbus_device::smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, SMBUS, "SMBUS interface", tag, owner, clock, "smbus", __FILE__) { } @@ -86,7 +86,7 @@ WRITE8_MEMBER (smbus_device::hst_cnt_w) if(xmit_slva != 0xa1) hst_sts = 4; else { - const UINT8 eeprom[256] = { + const uint8_t eeprom[256] = { 0x80, 0x08, 0x07, 0x0D, 0x0A, 0x02, 0x40, 0x00, 0x04, 0x50, 0x60, 0x00, 0x82, 0x08, 0x00, 0x01, 0x0E, 0x04, 0x08, 0x01, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x28, 0x3C, 0x28, 0x40, 0x60, 0x60, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x46, 0x28, 0x28, 0x55, 0x00, 0x00, diff --git a/src/devices/machine/pci-smbus.h b/src/devices/machine/pci-smbus.h index 2ff96befc9b..6dac1d711a2 100644 --- a/src/devices/machine/pci-smbus.h +++ b/src/devices/machine/pci-smbus.h @@ -10,7 +10,7 @@ class smbus_device : public pci_device { public: - smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER (hst_sts_r); DECLARE_WRITE8_MEMBER (hst_sts_w); @@ -55,11 +55,11 @@ protected: private: DECLARE_ADDRESS_MAP(map, 32); - UINT16 slv_data; + uint16_t slv_data; - UINT8 hst_sts, hst_cnt, hst_cmd, xmit_slva, hst_d0, hst_d1; - UINT8 host_block_db, pec, rcv_slva, aux_sts, aux_ctl; - UINT8 smlink_pin_ctl, smbus_pin_ctl, slv_sts, slv_cmd, notify_daddr, notify_dlow, notify_dhigh; + uint8_t hst_sts, hst_cnt, hst_cmd, xmit_slva, hst_d0, hst_d1; + uint8_t host_block_db, pec, rcv_slva, aux_sts, aux_ctl; + uint8_t smlink_pin_ctl, smbus_pin_ctl, slv_sts, slv_cmd, notify_daddr, notify_dlow, notify_dhigh; }; extern const device_type SMBUS; diff --git a/src/devices/machine/pci-usb.cpp b/src/devices/machine/pci-usb.cpp index 56789e12eb3..8772d6d7555 100644 --- a/src/devices/machine/pci-usb.cpp +++ b/src/devices/machine/pci-usb.cpp @@ -8,7 +8,7 @@ const device_type USB_EHCI = &device_creator; DEVICE_ADDRESS_MAP_START(map, 32, usb_uhci_device) ADDRESS_MAP_END -usb_uhci_device::usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +usb_uhci_device::usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, USB_UHCI, "USB 1.1 UHCI interface", tag, owner, clock, "usb_uhci", __FILE__) { } @@ -27,7 +27,7 @@ void usb_uhci_device::device_reset() DEVICE_ADDRESS_MAP_START(map, 32, usb_ehci_device) ADDRESS_MAP_END -usb_ehci_device::usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +usb_ehci_device::usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, USB_EHCI, "USB 2.0 EHCI interface", tag, owner, clock, "usb_ehci", __FILE__) { } diff --git a/src/devices/machine/pci-usb.h b/src/devices/machine/pci-usb.h index 31541432efd..49b94200bb8 100644 --- a/src/devices/machine/pci-usb.h +++ b/src/devices/machine/pci-usb.h @@ -13,7 +13,7 @@ class usb_uhci_device : public pci_device { public: - usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: virtual void device_start() override; @@ -25,7 +25,7 @@ private: class usb_ehci_device : public pci_device { public: - usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + usb_ehci_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/pci.cpp b/src/devices/machine/pci.cpp index 88cdd21ab64..f5e4197b0b9 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -58,7 +58,7 @@ DEVICE_ADDRESS_MAP_START(config_map, 32, pci_bridge_device) AM_RANGE(0x3c, 0x3f) AM_READWRITE16(bridge_control_r, bridge_control_w, 0xffff0000) ADDRESS_MAP_END -pci_device::pci_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) +pci_device::pci_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_region(*this, DEVICE_SELF) { @@ -69,7 +69,7 @@ pci_device::pci_device(const machine_config &mconfig, device_type type, const ch is_multifunction_device = false; } -void pci_device::set_ids(UINT32 _main_id, UINT8 _revision, UINT32 _pclass, UINT32 _subsystem_id) +void pci_device::set_ids(uint32_t _main_id, uint8_t _revision, uint32_t _pclass, uint32_t _subsystem_id) { main_id = _main_id; revision = _revision; @@ -103,13 +103,13 @@ void pci_device::device_reset() { } -UINT32 pci_device::unmapped_r(offs_t offset, UINT32 mem_mask, int bank) +uint32_t pci_device::unmapped_r(offs_t offset, uint32_t mem_mask, int bank) { logerror("%s: unmapped read from %08x & %08x (%s)\n", machine().describe_context(), offset*4, mem_mask, bank_infos[bank].map.name()); return 0; } -void pci_device::unmapped_w(offs_t offset, UINT32 data, UINT32 mem_mask, int bank) +void pci_device::unmapped_w(offs_t offset, uint32_t data, uint32_t mem_mask, int bank) { logerror("%s: unmapped write to %08x = %08x & %08x (%s)\n", machine().describe_context(), offset*4, data, mem_mask, bank_infos[bank].map.name()); } @@ -148,7 +148,7 @@ WRITE32_MEMBER(pci_device::address_base_w) int bid = bank_reg_infos[offset].bank; if(bank_reg_infos[offset].hi) - bank_infos[bid].adr = (bank_infos[bid].adr & 0xffffffff) | (UINT64(data) << 32); + bank_infos[bid].adr = (bank_infos[bid].adr & 0xffffffff) | (uint64_t(data) << 32); else { bank_infos[bid].adr = (bank_infos[bid].adr & U64(0xffffffff00000000)) | data; } @@ -254,18 +254,18 @@ void pci_device::reset_all_mappings() { } -void pci_device::map_device(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 pci_device::map_device(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) { for(int i=0; iinstall_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped0_r), this), write32_delegate(FUNC(pci_device::unmapped0_w), this)); break; case 1: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped1_r), this), write32_delegate(FUNC(pci_device::unmapped1_w), this)); break; @@ -285,7 +285,7 @@ void pci_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end } space->install_device_delegate(start, end, *this, bi.map); - logerror("map %s at %0*x-%0*x\n", bi.map.name(), bi.flags & M_IO ? 4 : 8, UINT32(start), bi.flags & M_IO ? 4 : 8, UINT32(end)); + logerror("map %s at %0*x-%0*x\n", bi.map.name(), bi.flags & M_IO ? 4 : 8, uint32_t(start), bi.flags & M_IO ? 4 : 8, uint32_t(end)); } map_extra(memory_window_start, memory_window_end, memory_offset, memory_space, @@ -293,20 +293,20 @@ void pci_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end if(expansion_rom_base & 1) { logerror("map expansion rom at %08x-%08x\n", expansion_rom_base & ~1, (expansion_rom_base & ~1) + expansion_rom_size - 1); - UINT32 start = (expansion_rom_base & ~1) + memory_offset; - UINT32 end = start + expansion_rom_size - 1; + uint32_t start = (expansion_rom_base & ~1) + memory_offset; + uint32_t end = start + expansion_rom_size - 1; if(end > memory_window_end) end = memory_window_end; memory_space->install_rom(start, end, (void *)expansion_rom); } } -void pci_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 pci_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) { } -void pci_device::map_config(UINT8 device, address_space *config_space) +void pci_device::map_config(uint8_t device, address_space *config_space) { config_space->install_device(device << 12, (device << 12) | 0xfff, *this, &pci_device::config_map); } @@ -317,7 +317,7 @@ void pci_device::skip_map_regs(int count) assert(bank_reg_count <= 6); } -void pci_device::add_map(UINT64 size, int flags, address_map_delegate &map) +void pci_device::add_map(uint64_t size, int flags, address_map_delegate &map) { assert(bank_count < 6); int bid = bank_count++; @@ -344,7 +344,7 @@ void pci_device::add_map(UINT64 size, int flags, address_map_delegate &map) logerror("Device %s (%s) has 0x%x bytes of %s named %s\n", tag(), name(), size, flags & M_IO ? "io" : "memory", bank_infos[bid].map.name()); } -void pci_device::add_rom(const UINT8 *rom, UINT32 size) +void pci_device::add_rom(const uint8_t *rom, uint32_t size) { expansion_rom = rom; expansion_rom_size = size; @@ -356,13 +356,13 @@ void pci_device::add_rom_from_region() add_rom(m_region->base(), m_region->bytes()); } -void pci_device::set_map_address(int id, UINT64 adr) +void pci_device::set_map_address(int id, uint64_t adr) { bank_infos[id].adr = adr; remap_cb(); } -void pci_device::set_map_size(int id, UINT64 size) +void pci_device::set_map_size(int id, uint64_t size) { bank_infos[id].size = size; remap_cb(); @@ -374,7 +374,7 @@ void pci_device::set_map_flags(int id, int flags) remap_cb(); } -agp_device::agp_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) +agp_device::agp_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) : pci_device(mconfig, type, name, tag, owner, clock, shortname, source) { } @@ -391,14 +391,14 @@ void agp_device::device_reset() -pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, PCI_BRIDGE, "PCI-PCI Bridge", tag, owner, clock, "pci_bridge", __FILE__), device_memory_interface(mconfig, *this), configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) { } -pci_bridge_device::pci_bridge_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) +pci_bridge_device::pci_bridge_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) : pci_device(mconfig, type, name, tag, owner, clock, shortname, source), device_memory_interface(mconfig, *this), configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) @@ -495,8 +495,8 @@ void pci_bridge_device::reset_all_mappings() iolimit = 0; } -void pci_bridge_device::map_device(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 pci_bridge_device::map_device(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) { for(int i = int(all_devices.size())-1; i>=0; i--) if(all_devices[i] != this) @@ -517,25 +517,25 @@ void pci_bridge_device::regenerate_config_mapping() sub_devices[i]->map_config(i, config_space); } -UINT32 pci_bridge_device::do_config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask) +uint32_t pci_bridge_device::do_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask) { if(sub_devices[device]) { - UINT32 data = space(AS_PROGRAM).read_dword((device << 12) | reg, mem_mask); + uint32_t data = space(AS_PROGRAM).read_dword((device << 12) | reg, mem_mask); logerror("config_read %02x:%02x.%x:%02x %08x @ %08x\n", bus, device >> 3, device & 7, reg, data, mem_mask); return data; } else return 0xffffffff; } -UINT32 pci_bridge_device::propagate_config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask) +uint32_t pci_bridge_device::propagate_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask) { - UINT32 data = 0xffffffff; + uint32_t data = 0xffffffff; for(unsigned int i=0; i != all_bridges.size(); i++) data &= all_bridges[i]->config_read(bus, device, reg, mem_mask); return data; } -UINT32 pci_bridge_device::config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask) +uint32_t pci_bridge_device::config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask) { if(bus == secondary_bus) return do_config_read(bus, device, reg, mem_mask); @@ -546,7 +546,7 @@ UINT32 pci_bridge_device::config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT3 return 0xffffffff; } -void pci_bridge_device::do_config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask) +void pci_bridge_device::do_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask) { if(sub_devices[device]) { space(AS_PROGRAM).write_dword((device << 12) | reg, data, mem_mask); @@ -554,13 +554,13 @@ void pci_bridge_device::do_config_write(UINT8 bus, UINT8 device, UINT16 reg, UIN } } -void pci_bridge_device::propagate_config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask) +void pci_bridge_device::propagate_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask) { for(unsigned int i=0; i != all_bridges.size(); i++) all_bridges[i]->config_write(bus, device, reg, data, mem_mask); } -void pci_bridge_device::config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask) +void pci_bridge_device::config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask) { if(bus == secondary_bus) do_config_write(bus, device, reg, data, mem_mask); @@ -782,7 +782,7 @@ WRITE16_MEMBER(pci_bridge_device::bridge_control_w) } -agp_bridge_device::agp_bridge_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) +agp_bridge_device::agp_bridge_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) : pci_bridge_device(mconfig, type, name, tag, owner, clock, shortname, source) { } @@ -805,7 +805,7 @@ DEVICE_ADDRESS_MAP_START(io_configuration_access_map, 32, pci_host_device) ADDRESS_MAP_END -pci_host_device::pci_host_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) +pci_host_device::pci_host_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) : pci_bridge_device(mconfig, type, name, tag, owner, clock, shortname, source) { } @@ -867,7 +867,7 @@ WRITE32_MEMBER(pci_host_device::config_data_w) root_config_write((config_address >> 16) & 0xff, (config_address >> 8) & 0xff, config_address & 0xfc, data, mem_mask); } -UINT32 pci_host_device::root_config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask) +uint32_t pci_host_device::root_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask) { if(bus == 0x00) return do_config_read(bus, device, reg, mem_mask); @@ -875,7 +875,7 @@ UINT32 pci_host_device::root_config_read(UINT8 bus, UINT8 device, UINT16 reg, UI return propagate_config_read(bus, device, reg, mem_mask); } -void pci_host_device::root_config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask) +void pci_host_device::root_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask) { if(bus == 0x00) do_config_write(bus, device, reg, data, mem_mask); @@ -885,7 +885,7 @@ void pci_host_device::root_config_write(UINT8 bus, UINT8 device, UINT16 reg, UIN } -pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PCI_ROOT,"PCI virtual root", tag, owner, clock, "pci_root", __FILE__) { } diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h index 9650efa8132..245ca503009 100644 --- a/src/devices/machine/pci.h +++ b/src/devices/machine/pci.h @@ -30,24 +30,24 @@ public: mapper_cb remap_cb, remap_config_cb; - pci_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); + pci_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); - void set_ids(UINT32 main_id, UINT8 revision, UINT32 pclass, UINT32 subsystem_id); + void set_ids(uint32_t main_id, uint8_t revision, uint32_t pclass, uint32_t subsystem_id); void set_multifunction_device(bool enable); virtual void set_remap_cb(mapper_cb _remap_cb); virtual void reset_all_mappings(); - virtual void map_device(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); - 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); + virtual void map_device(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); + 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); - void map_config(UINT8 device, address_space *config_space); + void map_config(uint8_t device, address_space *config_space); virtual DECLARE_ADDRESS_MAP(config_map, 32); - UINT32 unmapped_r(offs_t offset, UINT32 mem_mask, int bank); - void unmapped_w(offs_t offset, UINT32 data, UINT32 mem_mask, int bank); + uint32_t unmapped_r(offs_t offset, uint32_t mem_mask, int bank); + void unmapped_w(offs_t offset, uint32_t data, uint32_t mem_mask, int bank); READ32_MEMBER (unmapped0_r); WRITE32_MEMBER(unmapped0_w); @@ -97,8 +97,8 @@ protected: // One of the two address_map_delegate map; - UINT64 adr; - UINT32 size; + uint64_t adr; + uint32_t size; int flags; }; @@ -110,36 +110,36 @@ protected: int bank_count, bank_reg_count; bank_reg_info bank_reg_infos[6]; - UINT32 main_id, subsystem_id; - UINT32 pclass; - UINT8 revision; - UINT16 command, command_mask, status; - const UINT8 *expansion_rom; - UINT32 expansion_rom_size; - UINT32 expansion_rom_base; + uint32_t main_id, subsystem_id; + uint32_t pclass; + uint8_t revision; + uint16_t command, command_mask, status; + const uint8_t *expansion_rom; + uint32_t expansion_rom_size; + uint32_t expansion_rom_base; bool is_multifunction_device; virtual void device_start() override; virtual void device_reset() override; void skip_map_regs(int count); - void add_map(UINT64 size, int flags, address_map_delegate &map); - template void add_map(UINT64 size, int flags, void (T::*map)(address_map &map, device_t &device), const char *name) { + void add_map(uint64_t size, int flags, address_map_delegate &map); + template void add_map(uint64_t size, int flags, void (T::*map)(address_map &map, device_t &device), const char *name) { address_map_delegate delegate(map, name, static_cast(this)); add_map(size, flags, delegate); } - void add_rom(const UINT8 *data, UINT32 size); + void add_rom(const uint8_t *data, uint32_t size); void add_rom_from_region(); - void set_map_address(int id, UINT64 adr); - void set_map_size(int id, UINT64 size); + void set_map_address(int id, uint64_t adr); + void set_map_size(int id, uint64_t size); void set_map_flags(int id, int flags); }; class agp_device : public pci_device { public: - agp_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); + agp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: virtual void device_start() override; @@ -148,12 +148,12 @@ protected: class pci_bridge_device : public pci_device, public device_memory_interface { public: - pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - pci_bridge_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); + pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_bridge_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 void set_remap_cb(mapper_cb _remap_cb) override; - virtual void map_device(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_device(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 void reset_all_mappings() override; virtual DECLARE_READ8_MEMBER(header_type_r) override; @@ -204,9 +204,9 @@ protected: std::vector all_devices; std::vector all_bridges; - UINT32 prefetch_baseu, prefetch_limitu; - UINT16 bridge_control, memory_base, memory_limit, prefetch_base, prefetch_limit, iobaseu, iolimitu; - UINT8 primary_bus, secondary_bus, subordinate_bus, iobase, iolimit; + uint32_t prefetch_baseu, prefetch_limitu; + uint16_t bridge_control, memory_base, memory_limit, prefetch_base, prefetch_limit, iobaseu, iolimitu; + uint8_t primary_bus, secondary_bus, subordinate_bus, iobase, iolimit; virtual void device_start() override; virtual void device_reset() override; @@ -215,12 +215,12 @@ protected: virtual device_t *bus_root(); virtual void regenerate_config_mapping(); - UINT32 do_config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask); - UINT32 propagate_config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask); - UINT32 config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask); - void do_config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask); - void propagate_config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask); - void config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask); + uint32_t do_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask); + uint32_t propagate_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask); + uint32_t config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask); + void do_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask); + void propagate_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask); + void config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask); private: address_space_config configure_space_config; @@ -228,7 +228,7 @@ private: class agp_bridge_device : public pci_bridge_device { public: - agp_bridge_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); + agp_bridge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: virtual void device_start() override; @@ -239,35 +239,35 @@ class pci_host_device : public pci_bridge_device { public: DECLARE_ADDRESS_MAP(io_configuration_access_map, 32); - pci_host_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); + pci_host_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: address_space *memory_space, *io_space; - UINT64 memory_window_start, memory_window_end, memory_offset; - UINT64 io_window_start, io_window_end, io_offset; + uint64_t memory_window_start, memory_window_end, memory_offset; + uint64_t io_window_start, io_window_end, io_offset; virtual void device_start() override; virtual void device_reset() override; virtual device_t *bus_root() override; - UINT32 config_address; + uint32_t config_address; DECLARE_READ32_MEMBER(config_address_r); DECLARE_WRITE32_MEMBER(config_address_w); DECLARE_READ32_MEMBER(config_data_r); DECLARE_WRITE32_MEMBER(config_data_w); - UINT32 root_config_read(UINT8 bus, UINT8 device, UINT16 reg, UINT32 mem_mask); - void root_config_write(UINT8 bus, UINT8 device, UINT16 reg, UINT32 data, UINT32 mem_mask); + uint32_t root_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask); + void root_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask); void regenerate_mapping(); }; class pci_root_device : public device_t { public: - pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pci_root_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/pci9050.cpp b/src/devices/machine/pci9050.cpp index 718a64e0fa1..a7ccb5eff62 100644 --- a/src/devices/machine/pci9050.cpp +++ b/src/devices/machine/pci9050.cpp @@ -40,7 +40,7 @@ ADDRESS_MAP_END DEVICE_ADDRESS_MAP_START(empty, 32, pci9050_device) ADDRESS_MAP_END -pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, PCI9050, "PLX PCI9050 PCI to Local Bus Bridge", tag, owner, clock, "pci9050", __FILE__), m_user_input_handler(*this), m_user_output_handler(*this) { @@ -108,8 +108,8 @@ void pci9050_device::device_reset() void pci9050_device::remap_local(int id) { - UINT32 csbase = m_csbase[id]; - UINT32 lasrr = m_lasrr[id]; + uint32_t csbase = m_csbase[id]; + uint32_t lasrr = m_lasrr[id]; logerror("local bus %d csbase=%08x lasrr=%08x\n", id, csbase, lasrr); if(!(csbase & 1)) { @@ -130,7 +130,7 @@ void pci9050_device::remap_local(int id) return; } - UINT32 mask = ~(size - 1); + uint32_t mask = ~(size - 1); if(lasrr & 1) mask &= 0x0ffffffc; else @@ -280,7 +280,7 @@ WRITE32_MEMBER(pci9050_device::cntrl_w) { if (0) logerror("%06X:PCI9050 CNTRL write %08x\n", machine().device("maincpu")->safe_pc(), data); - UINT32 oldData = m_cntrl; + uint32_t oldData = m_cntrl; m_cntrl = data; remap_rom(); if ((oldData ^ m_cntrl) & 0x3000) diff --git a/src/devices/machine/pci9050.h b/src/devices/machine/pci9050.h index a9de08ba6c9..64778d02bfa 100644 --- a/src/devices/machine/pci9050.h +++ b/src/devices/machine/pci9050.h @@ -29,7 +29,7 @@ class pci9050_device : public pci_device { public: - pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // PCI9050 I/O register space handlers DECLARE_READ32_MEMBER( lasrr_r ); @@ -69,8 +69,8 @@ private: device_t *m_devices[4]; address_map_constructor m_maps[4]; - UINT32 m_lasrr[4], m_lasba[4], m_lasbrd[4], m_csbase[4]; - UINT32 m_eromrr, m_eromba, m_erombrd, m_intcsr, m_cntrl; + uint32_t m_lasrr[4], m_lasba[4], m_lasbrd[4], m_csbase[4]; + uint32_t m_eromrr, m_eromba, m_erombrd, m_intcsr, m_cntrl; void remap_local(int id); void remap_rom(); diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index 92e3bd973fd..5aa9e00541c 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -278,7 +278,7 @@ const at_keyboard_device::extended_keyboard_code at_keyboard_device::m_extended_ const device_type PC_KEYB = &device_creator; const device_type AT_KEYB = &device_creator; -pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PC_KEYB, "PC Keyboard", tag, owner, clock, "pc_keyb", __FILE__), m_type(KEYBOARD_TYPE_PC), m_ioport_0(*this, ":pc_keyboard_0"), @@ -293,7 +293,7 @@ pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char { } -pc_keyboard_device::pc_keyboard_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) : +pc_keyboard_device::pc_keyboard_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_ioport_0(*this, ":pc_keyboard_0"), m_ioport_1(*this, ":pc_keyboard_1"), @@ -307,7 +307,7 @@ pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, device_typ { } -at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pc_keyboard_device(mconfig, AT_KEYB, "AT Keyboard", tag, owner, clock, "at_keyb", __FILE__), m_scan_code_set(1) { @@ -389,7 +389,7 @@ WRITE_LINE_MEMBER(pc_keyboard_device::enable) } /* insert a code into the buffer */ -void pc_keyboard_device::queue_insert(UINT8 data) +void pc_keyboard_device::queue_insert(uint8_t data) { if (LOG_KEYBOARD) logerror("keyboard queueing %.2x\n",data); @@ -523,9 +523,9 @@ void at_keyboard_device::helper(const char *codes) * scan keys and stuff make/break codes **************************************************************************/ -UINT32 pc_keyboard_device::readport(int port) +uint32_t pc_keyboard_device::readport(int port) { - UINT32 result = 0; + uint32_t result = 0; switch(port) { case 0: @@ -893,9 +893,9 @@ WRITE8_MEMBER(at_keyboard_device::write) unicode_char_to_at_keycode ***************************************************************************/ -UINT8 pc_keyboard_device::unicode_char_to_at_keycode(char32_t ch) +uint8_t pc_keyboard_device::unicode_char_to_at_keycode(char32_t ch) { - UINT8 b; + uint8_t b; switch(ch) { case '\033': b = 1; break; @@ -1037,7 +1037,7 @@ UINT8 pc_keyboard_device::unicode_char_to_at_keycode(char32_t ch) int pc_keyboard_device::queue_chars(const char32_t *text, size_t text_len) { int i; - UINT8 b; + uint8_t b; for (i = 0; (i < text_len) && ((queue_size()) + 4 < sizeof(m_queue)); i++) { diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h index 58861fc288c..5b493f858e1 100644 --- a/src/devices/machine/pckeybrd.h +++ b/src/devices/machine/pckeybrd.h @@ -19,8 +19,8 @@ class pc_keyboard_device : public device_t { public: - pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - pc_keyboard_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); + pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_keyboard_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_WRITE_LINE_MEMBER(enable); @@ -40,7 +40,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - void queue_insert(UINT8 data); + void queue_insert(uint8_t data); void clear_buffer(void); int m_numlock; @@ -48,8 +48,8 @@ protected: private: void polling(void); - UINT32 readport(int port); - UINT8 unicode_char_to_at_keycode(char32_t ch); + uint32_t readport(int port); + uint8_t unicode_char_to_at_keycode(char32_t ch); virtual void standard_scancode_insert(int our_code, int pressed); virtual void extended_scancode_insert(int code, int pressed) { } @@ -59,13 +59,13 @@ private: bool charqueue_empty(); bool m_on; - UINT8 m_delay; /* 240/60 -> 0,25s */ - UINT8 m_repeat; /* 240/ 8 -> 30/s */ + uint8_t m_delay; /* 240/60 -> 0,25s */ + uint8_t m_repeat; /* 240/ 8 -> 30/s */ - UINT8 m_queue[256]; - UINT8 m_head; - UINT8 m_tail; - UINT8 m_make[128]; + uint8_t m_queue[256]; + uint8_t m_head; + uint8_t m_tail; + uint8_t m_make[128]; optional_ioport m_ioport_0; optional_ioport m_ioport_1; @@ -83,7 +83,7 @@ private: class at_keyboard_device : public pc_keyboard_device { public: - at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE8_MEMBER( write ); diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp index 445aeae094b..12dce85aa7f 100644 --- a/src/devices/machine/pdc.cpp +++ b/src/devices/machine/pdc.cpp @@ -306,7 +306,7 @@ ioport_constructor pdc_device::device_input_ports() const // pdc_device - constructor //------------------------------------------------- -pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PDC, "ROLM PDC", tag, owner, clock, "pdc", __FILE__), m_pdccpu(*this, Z80_TAG), m_dma8237(*this, FDCDMA_TAG), @@ -388,7 +388,7 @@ WRITE8_MEMBER(pdc_device::i8237_dma_mem_w) READ8_MEMBER(pdc_device::i8237_fdc_dma_r) { - UINT8 ret = m_fdc->dma_r(); + uint8_t ret = m_fdc->dma_r(); if(TRACE_PDC_DMA) logerror("PDC: 8237 DMA CHANNEL 0 READ ADDRESS: %08X, DATA: %02X\n", offset, ret ); return ret; } @@ -401,8 +401,8 @@ WRITE8_MEMBER(pdc_device::i8237_fdc_dma_w) READ8_MEMBER(pdc_device::m68k_dma_r) { - UINT32 address; - UINT8 data; + uint32_t address; + uint8_t data; address = fdd_68k_dma_address++; data = m_m68k_r_cb(address); @@ -476,7 +476,7 @@ WRITE8_MEMBER(pdc_device::p0_7_w) READ8_MEMBER(pdc_device::fdd_68k_r) { - UINT8 address = offset + 0x21; + uint8_t address = offset + 0x21; switch(address) { default: @@ -486,7 +486,7 @@ READ8_MEMBER(pdc_device::fdd_68k_r) } WRITE8_MEMBER(pdc_device::fdd_68k_w) { - UINT8 address = offset + 0x21; + uint8_t address = offset + 0x21; switch(address) { case 0x21: /* Port 21: ?? */ @@ -546,7 +546,7 @@ READ8_MEMBER(pdc_device::p38_r) READ8_MEMBER(pdc_device::p39_r) { - UINT8 data = 1; + uint8_t data = 1; if(b_fdc_irq) data |= 8; // Set bit 3 if(TRACE_PDC_CMD) logerror("PDC: Port 0x39 READ: %02X, PC: %X\n", data, space.device().safe_pc()); return data; @@ -554,7 +554,7 @@ READ8_MEMBER(pdc_device::p39_r) WRITE8_MEMBER(pdc_device::p50_5f_w) { - UINT8 address = 0x50 + offset; + uint8_t address = 0x50 + offset; switch(address) { case 0x52: diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h index 23cee250dcc..d4271fbe06d 100644 --- a/src/devices/machine/pdc.h +++ b/src/devices/machine/pdc.h @@ -35,7 +35,7 @@ class pdc_device : public device_t { public: /* Constructor and Destructor */ - pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pdc_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; @@ -72,24 +72,24 @@ public: DECLARE_FLOPPY_FORMATS( floppy_formats ); /* Main CPU accessible registers */ - UINT8 reg_p0; - UINT8 reg_p1; - UINT8 reg_p2; - UINT8 reg_p3; - UINT8 reg_p4; - UINT8 reg_p5; - UINT8 reg_p6; - UINT8 reg_p7; - UINT8 reg_p21; - UINT8 reg_p38; - UINT32 fdd_68k_dma_address; /* FDD <-> m68k DMA read/write address */ + uint8_t reg_p0; + uint8_t reg_p1; + uint8_t reg_p2; + uint8_t reg_p3; + uint8_t reg_p4; + uint8_t reg_p5; + uint8_t reg_p6; + uint8_t reg_p7; + uint8_t reg_p21; + uint8_t reg_p38; + uint32_t fdd_68k_dma_address; /* FDD <-> m68k DMA read/write address */ protected: /* Device-level overrides */ virtual void device_start() override; virtual void device_reset() override; /* Protected variables */ - //UINT32 fdd_68k_dma_address; + //uint32_t fdd_68k_dma_address; bool b_fdc_irq; /* Attached devices */ @@ -100,7 +100,7 @@ protected: //required_device m_floppy; optional_device m_hdc9224; mfm_harddisk_device* m_harddisk; - required_shared_ptr m_pdc_ram; + required_shared_ptr m_pdc_ram; /* Callbacks */ devcb_read8 m_m68k_r_cb; diff --git a/src/devices/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp index 3064e212850..b5120e886cf 100644 --- a/src/devices/machine/pic8259.cpp +++ b/src/devices/machine/pic8259.cpp @@ -27,7 +27,7 @@ void pic8259_device::device_timer(emu_timer &timer, device_timer_id id, int para /* check the various IRQs */ for (int n = 0, irq = m_prio; n < 8; n++, irq = (irq + 1) & 7) { - UINT8 mask = 1 << irq; + uint8_t mask = 1 << irq; /* is this IRQ in service and not cascading and sfnm? */ if ((m_isr & mask) && !(m_master && m_cascade && m_nested && (m_slave & mask))) @@ -59,7 +59,7 @@ void pic8259_device::device_timer(emu_timer &timer, device_timer_id id, int para void pic8259_device::set_irq_line(int irq, int state) { - UINT8 mask = (1 << irq); + uint8_t mask = (1 << irq); if (state) { @@ -88,11 +88,11 @@ void pic8259_device::set_irq_line(int irq, int state) } -UINT32 pic8259_device::acknowledge() +uint32_t pic8259_device::acknowledge() { for (int n = 0, irq = m_prio; n < 8; n++, irq = (irq + 1) & 7) { - UINT8 mask = 1 << irq; + uint8_t mask = 1 << irq; /* is this IRQ pending and enabled? */ if ((m_irr & mask) && !(m_imr & mask)) @@ -149,7 +149,7 @@ IRQ_CALLBACK_MEMBER(pic8259_device::inta_cb) READ8_MEMBER( pic8259_device::read ) { /* NPW 18-May-2003 - Changing 0xFF to 0x00 as per Ruslan */ - UINT8 data = 0x00; + uint8_t data = 0x00; switch(offset) { @@ -235,7 +235,7 @@ WRITE8_MEMBER( pic8259_device::write ) else if ((data & 0x18) == 0x00) { int n = data & 7; - UINT8 mask = 1 << n; + uint8_t mask = 1 << n; /* write OCW2 */ if (LOG_OCW) @@ -430,7 +430,7 @@ void pic8259_device::device_reset() const device_type PIC8259 = &device_creator; -pic8259_device::pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pic8259_device::pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PIC8259, "8259 PIC", tag, owner, clock, "pit8259", __FILE__) , m_out_int_func(*this) , m_sp_en_func(*this) diff --git a/src/devices/machine/pic8259.h b/src/devices/machine/pic8259.h index d02c74bca4f..50f8da14ca8 100644 --- a/src/devices/machine/pic8259.h +++ b/src/devices/machine/pic8259.h @@ -42,7 +42,7 @@ class pic8259_device : public device_t { public: - pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &static_set_out_int_callback(device_t &device, _Object object) { return downcast(device).m_out_int_func.set_callback(object); } template static devcb_base &static_set_sp_en_callback(device_t &device, _Object object) { return downcast(device).m_sp_en_func.set_callback(object); } @@ -50,7 +50,7 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - UINT32 acknowledge(); + uint32_t acknowledge(); DECLARE_WRITE_LINE_MEMBER( ir0_w ) { set_irq_line(0, state); } DECLARE_WRITE_LINE_MEMBER( ir1_w ) { set_irq_line(1, state); } @@ -94,34 +94,34 @@ private: pic8259_state_t m_state; - UINT8 m_isr; - UINT8 m_irr; - UINT8 m_prio; - UINT8 m_imr; - UINT8 m_irq_lines; + uint8_t m_isr; + uint8_t m_irr; + uint8_t m_prio; + uint8_t m_imr; + uint8_t m_irq_lines; - UINT8 m_input; - UINT8 m_ocw3; + uint8_t m_input; + uint8_t m_ocw3; - UINT8 m_master; + uint8_t m_master; /* ICW1 state */ - UINT8 m_level_trig_mode; - UINT8 m_vector_size; - UINT8 m_cascade; - UINT8 m_icw4_needed; - UINT32 m_vector_addr_low; + uint8_t m_level_trig_mode; + uint8_t m_vector_size; + uint8_t m_cascade; + uint8_t m_icw4_needed; + uint32_t m_vector_addr_low; /* ICW2 state */ - UINT8 m_base; - UINT8 m_vector_addr_high; + uint8_t m_base; + uint8_t m_vector_addr_high; /* ICW3 state */ - UINT8 m_slave; + uint8_t m_slave; /* ICW4 state */ - UINT8 m_nested; - UINT8 m_mode; - UINT8 m_auto_eoi; - UINT8 m_is_x86; + uint8_t m_nested; + uint8_t m_mode; + uint8_t m_auto_eoi; + uint8_t m_is_x86; }; extern const device_type PIC8259; diff --git a/src/devices/machine/pit8253.cpp b/src/devices/machine/pit8253.cpp index 978cb6a50b5..3c7ee7922f7 100644 --- a/src/devices/machine/pit8253.cpp +++ b/src/devices/machine/pit8253.cpp @@ -46,7 +46,7 @@ enum const device_type PIT8253 = &device_creator; -pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PIT8253, "8253 PIT", tag, owner, clock, "pit8253", __FILE__), m_clk0(0), m_clk1(0), @@ -57,7 +57,7 @@ pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, d { } -pit8253_device::pit8253_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) : +pit8253_device::pit8253_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_clk0(0), m_clk1(0), @@ -71,7 +71,7 @@ pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, const device_type PIT8254 = &device_creator; -pit8254_device::pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pit8254_device::pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pit8253_device(mconfig, PIT8254, "8254 PIT", tag, owner, clock, "pit8254", __FILE__) { } @@ -190,7 +190,7 @@ void pit8253_device::device_reset() #define CTRL_BCD(control) (((control) >> 0) & 0x01) -inline UINT32 pit8253_device::adjusted_count(int bcd, UINT16 val) +inline uint32_t pit8253_device::adjusted_count(int bcd, uint16_t val) { if (!bcd) return (val == 0) ? 0x10000 : val; @@ -217,10 +217,10 @@ inline UINT32 pit8253_device::adjusted_count(int bcd, UINT16 val) /* This function subtracts 1 from timer->value "cycles" times, taking into account binary or BCD operation, and wrapping around from 0 to 0xFFFF or 0x9999 as necessary. */ -void pit8253_device::decrease_counter_value(pit8253_timer *timer, INT64 cycles) +void pit8253_device::decrease_counter_value(pit8253_timer *timer, int64_t cycles) { - UINT16 value; - UINT8 units, tens, hundreds, thousands; + uint16_t value; + uint8_t units, tens, hundreds, thousands; if (CTRL_BCD(timer->control) == 0) { @@ -309,13 +309,13 @@ void pit8253_device::set_output(pit8253_timer *timer, int output) /* This emulates timer "timer" for "elapsed_cycles" cycles and assumes no callbacks occur during that time. */ -void pit8253_device::simulate2(pit8253_timer *timer, INT64 elapsed_cycles) +void pit8253_device::simulate2(pit8253_timer *timer, int64_t elapsed_cycles) { - UINT32 adjusted_value; + uint32_t adjusted_value; int bcd = CTRL_BCD(timer->control); int mode = CTRL_MODE(timer->control); - static const UINT32 CYCLES_NEVER = (0xffffffff); - UINT32 cycles_to_output = 0; + static const uint32_t CYCLES_NEVER = (0xffffffff); + uint32_t cycles_to_output = 0; LOG2(("simulate2(): simulating %d cycles for %d in mode %d, bcd = %d, phase = %d, gate = %d, output %d, value = 0x%04x\n", (int)elapsed_cycles, timer->index, mode, bcd, timer->phase, timer->gate, timer->output, timer->value)); @@ -705,7 +705,7 @@ void pit8253_device::simulate2(pit8253_timer *timer, INT64 elapsed_cycles) /* This emulates timer "timer" for "elapsed_cycles" cycles, broken down into sections punctuated by callbacks. */ -void pit8253_device::simulate(pit8253_timer *timer, INT64 elapsed_cycles) +void pit8253_device::simulate(pit8253_timer *timer, int64_t elapsed_cycles) { if (elapsed_cycles > 0) simulate2(timer, elapsed_cycles); @@ -721,7 +721,7 @@ void pit8253_device::update(pit8253_timer *timer) years of time. Should be enough for now. */ attotime now = machine().time(); attotime elapsed_time = now - timer->last_updated; - INT64 elapsed_cycles = elapsed_time.as_double() * timer->clockin; + int64_t elapsed_cycles = elapsed_time.as_double() * timer->clockin; LOG1(("update(): timer %d, %d elapsed_cycles\n", timer->index, elapsed_cycles)); @@ -737,7 +737,7 @@ void pit8253_device::update(pit8253_timer *timer) /* We recycle bit 0 of timer->value to hold the phase in mode 3 when count is odd. Since read commands in mode 3 always return even numbers, we need to mask this bit off. */ -UINT16 pit8253_device::masked_value(pit8253_timer *timer) +uint16_t pit8253_device::masked_value(pit8253_timer *timer) { LOG2(("masked_value\n")); if (CTRL_MODE(timer->control) == 3) @@ -753,8 +753,8 @@ UINT16 pit8253_device::masked_value(pit8253_timer *timer) READ8_MEMBER( pit8253_device::read ) { pit8253_timer *timer = get_timer(offset); - UINT8 data; - UINT16 value; + uint8_t data; + uint16_t value; LOG2(("read(): offset %d\n", offset)); @@ -822,7 +822,7 @@ READ8_MEMBER( pit8253_device::read ) /* Loads a new value from the bus to the count register (CR) */ -void pit8253_device::load_count(pit8253_timer *timer, UINT16 newcount) +void pit8253_device::load_count(pit8253_timer *timer, uint16_t newcount) { int mode = CTRL_MODE(timer->control); LOG1(("load_count(): %04x\n", newcount)); @@ -854,7 +854,7 @@ void pit8253_device::load_count(pit8253_timer *timer, UINT16 newcount) void pit8253_device::readback(pit8253_timer *timer, int command) { - UINT16 value; + uint16_t value; update(timer); if ((command & 1) == 0) @@ -904,13 +904,13 @@ void pit8253_device::readback(pit8253_timer *timer, int command) } -void pit8253_device::readback_command(UINT8 data) +void pit8253_device::readback_command(uint8_t data) { /* Readback command. Illegal on 8253 */ /* Todo: find out what (if anything) the 8253 hardware actually does here. */ } -void pit8254_device::readback_command(UINT8 data) +void pit8254_device::readback_command(uint8_t data) { LOG1(("write(): readback %02x\n", data & 0x3f)); diff --git a/src/devices/machine/pit8253.h b/src/devices/machine/pit8253.h index e31ce8a3d19..568491ed600 100644 --- a/src/devices/machine/pit8253.h +++ b/src/devices/machine/pit8253.h @@ -54,8 +54,8 @@ class pit8253_device : public device_t { public: - pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - pit8253_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); + pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pit8253_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); ~pit8253_device() {} // static configuration helpers @@ -106,12 +106,12 @@ protected: emu_timer *updatetimer; /* MAME timer to process updates */ - UINT16 value; /* current counter value ("CE" in Intel docs) */ - UINT16 latch; /* latched counter value ("OL" in Intel docs) */ - UINT16 count; /* new counter value ("CR" in Intel docs) */ - UINT8 control; /* 6-bit control byte */ - UINT8 status; /* status byte - 8254 only */ - UINT8 lowcount; /* LSB of new counter value for 16-bit writes */ + uint16_t value; /* current counter value ("CE" in Intel docs) */ + uint16_t latch; /* latched counter value ("OL" in Intel docs) */ + uint16_t count; /* new counter value ("CR" in Intel docs) */ + uint8_t control; /* 6-bit control byte */ + uint8_t status; /* status byte - 8254 only */ + uint8_t lowcount; /* LSB of new counter value for 16-bit writes */ int rmsb; /* 1 = Next read is MSB of 16-bit value */ int wmsb; /* 1 = Next write is MSB of 16-bit value */ int output; /* 0 = low, 1 = high */ @@ -124,7 +124,7 @@ protected: }; void readback(pit8253_timer *timer, int command); - virtual void readback_command(UINT8 data); + virtual void readback_command(uint8_t data); pit8253_timer *get_timer(int which); private: @@ -142,15 +142,15 @@ private: pit8253_timer m_timers[PIT8253_MAX_TIMER]; - inline UINT32 adjusted_count(int bcd, UINT16 val); - void decrease_counter_value(pit8253_timer *timer, INT64 cycles); + inline uint32_t adjusted_count(int bcd, uint16_t val); + void decrease_counter_value(pit8253_timer *timer, int64_t cycles); void load_counter_value(pit8253_timer *timer); void set_output(pit8253_timer *timer, int output); - void simulate2(pit8253_timer *timer, INT64 elapsed_cycles); - void simulate(pit8253_timer *timer, INT64 elapsed_cycles); + void simulate2(pit8253_timer *timer, int64_t elapsed_cycles); + void simulate(pit8253_timer *timer, int64_t elapsed_cycles); void update(pit8253_timer *timer); - UINT16 masked_value(pit8253_timer *timer); - void load_count(pit8253_timer *timer, UINT16 newcount); + uint16_t masked_value(pit8253_timer *timer); + void load_count(pit8253_timer *timer, uint16_t newcount); void gate_w(int gate, int state); void set_clock_signal(int timerno, int state); }; @@ -161,10 +161,10 @@ extern const device_type PIT8253; class pit8254_device : public pit8253_device { public: - pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual void readback_command(UINT8 data) override; + virtual void readback_command(uint8_t data) override; }; extern const device_type PIT8254; diff --git a/src/devices/machine/pla.cpp b/src/devices/machine/pla.cpp index f2310201771..3ca6da06d6c 100644 --- a/src/devices/machine/pla.cpp +++ b/src/devices/machine/pla.cpp @@ -17,7 +17,7 @@ const device_type PLA = &device_creator; // pla_device - constructor //------------------------------------------------- -pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PLA, "PLA", tag, owner, clock, "pla", __FILE__), m_region(*this, DEVICE_SELF), m_format(PLA_FMT_JEDBIN), @@ -40,8 +40,8 @@ void pla_device::device_start() assert(m_inputs < 32 && m_outputs <= 32); if (m_input_mask == 0) - m_input_mask = ((UINT64)1 << m_inputs) - 1; - m_input_mask = ((UINT64)m_input_mask << 32) | m_input_mask; + m_input_mask = ((uint64_t)1 << m_inputs) - 1; + m_input_mask = ((uint64_t)m_input_mask << 32) | m_input_mask; // parse fusemap parse_fusemap(); @@ -95,7 +95,7 @@ void pla_device::parse_fusemap() } // parse it - UINT32 fusenum = 0; + uint32_t fusenum = 0; for (int p = 0; p < m_terms; p++) { @@ -107,10 +107,10 @@ void pla_device::parse_fusemap() for (int i = 0; i < m_inputs; i++) { // complement - term->and_mask |= (UINT64)jed_get_fuse(&jed, fusenum++) << (i + 32); + term->and_mask |= (uint64_t)jed_get_fuse(&jed, fusenum++) << (i + 32); // true - term->and_mask |= (UINT64)jed_get_fuse(&jed, fusenum++) << i; + term->and_mask |= (uint64_t)jed_get_fuse(&jed, fusenum++) << i; } // OR mask @@ -140,7 +140,7 @@ void pla_device::parse_fusemap() // read - //------------------------------------------------- -UINT32 pla_device::read(UINT32 input) +uint32_t pla_device::read(uint32_t input) { // try the cache first if (input < m_cache_size) @@ -148,7 +148,7 @@ UINT32 pla_device::read(UINT32 input) for (auto cache2_entry : m_cache2) { - if ((UINT32)cache2_entry == input) + if ((uint32_t)cache2_entry == input) { // cache2 hit return cache2_entry >> 32; @@ -156,8 +156,8 @@ UINT32 pla_device::read(UINT32 input) } // cache miss, process terms - UINT64 inputs = ((~(UINT64)input << 32) | input) & m_input_mask; - UINT64 s = 0; + uint64_t inputs = ((~(uint64_t)input << 32) | input) & m_input_mask; + uint64_t s = 0; for (int i = 0; i < m_terms; ++i) { diff --git a/src/devices/machine/pla.h b/src/devices/machine/pla.h index 1fdffd023d9..91352752bd8 100644 --- a/src/devices/machine/pla.h +++ b/src/devices/machine/pla.h @@ -88,19 +88,19 @@ class pla_device : public device_t { public: // construction/destruction - pla_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers - static void set_num_inputs(device_t &device, UINT32 i) { downcast(device).m_inputs = i; } - static void set_num_outputs(device_t &device, UINT32 o) { downcast(device).m_outputs = o; } - static void set_num_terms(device_t &device, UINT32 t) { downcast(device).m_terms = t; } - static void set_inputmask(device_t &device, UINT32 mask) { downcast(device).m_input_mask = mask; } // UINT32! + static void set_num_inputs(device_t &device, uint32_t i) { downcast(device).m_inputs = i; } + static void set_num_outputs(device_t &device, uint32_t o) { downcast(device).m_outputs = o; } + static void set_num_terms(device_t &device, uint32_t t) { downcast(device).m_terms = t; } + static void set_inputmask(device_t &device, uint32_t mask) { downcast(device).m_input_mask = mask; } // uint32_t! static void set_format(device_t &device, int format) { downcast(device).m_format = format; } - UINT32 inputs() { return m_inputs; } - UINT32 outputs() { return m_outputs; } + uint32_t inputs() { return m_inputs; } + uint32_t outputs() { return m_outputs; } - UINT32 read(UINT32 input); + uint32_t read(uint32_t input); protected: // device-level overrides @@ -113,21 +113,21 @@ private: int m_format; - UINT32 m_inputs; - UINT32 m_outputs; - UINT32 m_terms; - UINT64 m_input_mask; - UINT64 m_xor; + uint32_t m_inputs; + uint32_t m_outputs; + uint32_t m_terms; + uint64_t m_input_mask; + uint64_t m_xor; int m_cache_size; - std::vector m_cache; - UINT64 m_cache2[CACHE2_SIZE]; - UINT8 m_cache2_ptr; + std::vector m_cache; + uint64_t m_cache2[CACHE2_SIZE]; + uint8_t m_cache2_ptr; struct term { - UINT64 and_mask; - UINT64 or_mask; + uint64_t and_mask; + uint64_t or_mask; } m_term[MAX_TERMS]; }; diff --git a/src/devices/machine/r10696.cpp b/src/devices/machine/r10696.cpp index 819d31084e9..e04484fa32e 100644 --- a/src/devices/machine/r10696.cpp +++ b/src/devices/machine/r10696.cpp @@ -47,7 +47,7 @@ const device_type R10696 = &device_creator; -r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, R10696, "Rockwell 10696", tag, owner, clock, "r10696", __FILE__), m_io_a(0), m_io_b(0), m_io_c(0), m_iord(*this), m_iowr(*this) @@ -86,9 +86,9 @@ void r10696_device::device_reset() WRITE8_MEMBER( r10696_device::io_w ) { assert(offset < 16); - const UINT8 io_a = m_io_a; - const UINT8 io_b = m_io_b; - const UINT8 io_c = m_io_c; + const uint8_t io_a = m_io_a; + const uint8_t io_b = m_io_b; + const uint8_t io_c = m_io_c; switch (offset) { case 0x0A: // Read Group A @@ -134,8 +134,8 @@ WRITE8_MEMBER( r10696_device::io_w ) READ8_MEMBER( r10696_device::io_r ) { assert(offset < 16); - UINT8 io_a, io_b, io_c; - UINT8 data = 0xf; + uint8_t io_a, io_b, io_c; + uint8_t data = 0xf; switch (offset) { case 0x0A: // Read Group A diff --git a/src/devices/machine/r10696.h b/src/devices/machine/r10696.h index b3e821a9ed9..16c3cd130bf 100644 --- a/src/devices/machine/r10696.h +++ b/src/devices/machine/r10696.h @@ -32,7 +32,7 @@ class r10696_device : public device_t { public: - r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~r10696_device() {} DECLARE_READ8_MEMBER ( io_r ); @@ -46,9 +46,9 @@ protected: virtual void device_reset() override; private: - UINT8 m_io_a; //!< input/output flip-flops group A - UINT8 m_io_b; //!< input/output flip-flops group B - UINT8 m_io_c; //!< input/output flip-flops group C + uint8_t m_io_a; //!< input/output flip-flops group A + uint8_t m_io_b; //!< input/output flip-flops group B + uint8_t m_io_c; //!< input/output flip-flops group C devcb_read8 m_iord; //!< input line (read, offset = group, data = 4 bits) devcb_write8 m_iowr; //!< output line (write, offset = group, data = 4 bits) }; diff --git a/src/devices/machine/r10788.cpp b/src/devices/machine/r10788.cpp index f6e9d65ecbf..f3efa531930 100644 --- a/src/devices/machine/r10788.cpp +++ b/src/devices/machine/r10788.cpp @@ -54,7 +54,7 @@ const device_type R10788 = &device_creator; -r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, R10788, "Rockwell 10788", tag, owner, clock, "r10788", __FILE__), m_ktr(0), m_kts(0), m_kla(0), m_klb(0), m_mask_a(15), m_mask_b(15), m_ker(0), m_io_counter(0), m_scan_counter(0), @@ -111,7 +111,7 @@ void r10788_device::device_reset() */ void r10788_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - UINT8 data; + uint8_t data; switch (id) { case TIMER_DISPLAY: @@ -186,7 +186,7 @@ WRITE8_MEMBER( r10788_device::io_w ) READ8_MEMBER( r10788_device::io_r ) { assert(offset < 16); - UINT8 data = 0xf; + uint8_t data = 0xf; switch (offset) { case KTR: // Transfer Keyboard Return diff --git a/src/devices/machine/r10788.h b/src/devices/machine/r10788.h index d7428074abc..0faed89fcd2 100644 --- a/src/devices/machine/r10788.h +++ b/src/devices/machine/r10788.h @@ -30,7 +30,7 @@ class r10788_device : public device_t { public: - r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~r10788_device() {} enum { @@ -57,14 +57,14 @@ protected: private: static const device_timer_id TIMER_DISPLAY = 0; - UINT8 m_reg[2][16]; //!< display registers - UINT8 m_ktr; //!< transfer keyboard return value - UINT8 m_kts; //!< transfer keyboard strobe value - UINT8 m_kla; //!< display register A value - UINT8 m_klb; //!< display register B value - UINT8 m_mask_a; //!< display enable bits for A - UINT8 m_mask_b; //!< display enable bits for B - UINT8 m_ker; //!< keyboard error value + uint8_t m_reg[2][16]; //!< display registers + uint8_t m_ktr; //!< transfer keyboard return value + uint8_t m_kts; //!< transfer keyboard strobe value + uint8_t m_kla; //!< display register A value + uint8_t m_klb; //!< display register B value + uint8_t m_mask_a; //!< display enable bits for A + uint8_t m_mask_b; //!< display enable bits for B + uint8_t m_ker; //!< keyboard error value int m_io_counter; //!< current I/O register index int m_scan_counter; //!< current display scan devcb_write8 m_display; //!< display updater diff --git a/src/devices/machine/ra17xx.cpp b/src/devices/machine/ra17xx.cpp index c1252181c7d..f1e2d77fac0 100644 --- a/src/devices/machine/ra17xx.cpp +++ b/src/devices/machine/ra17xx.cpp @@ -54,7 +54,7 @@ const device_type RA17XX = &device_creator; -ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RA17XX, "Rockwell A17XX", tag, owner, clock, "ra17xx", __FILE__), m_enable(false), m_iord(*this), diff --git a/src/devices/machine/ra17xx.h b/src/devices/machine/ra17xx.h index 0bc1fc991e4..2b98beea94e 100644 --- a/src/devices/machine/ra17xx.h +++ b/src/devices/machine/ra17xx.h @@ -32,7 +32,7 @@ class ra17xx_device : public device_t { public: - ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~ra17xx_device() {} DECLARE_READ8_MEMBER ( io_r ); @@ -46,8 +46,8 @@ protected: virtual void device_reset() override; private: - UINT8 m_line[16]; //!< input/output flip-flops for 16 I/O lines - UINT8 m_bl; //!< value of BL during the most recent output + uint8_t m_line[16]; //!< input/output flip-flops for 16 I/O lines + uint8_t m_bl; //!< value of BL during the most recent output bool m_enable; //!< true if outputs are enabled devcb_read8 m_iord; //!< input line (read, offset = line, data = 0/1) devcb_write8 m_iowr; //!< output line (write, offset = line, data = 0/1) diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp index 66e8b31cf4f..7a0bc2ac08a 100644 --- a/src/devices/machine/ram.cpp +++ b/src/devices/machine/ram.cpp @@ -27,7 +27,7 @@ const device_type RAM = &device_creator; // ram_device - constructor //------------------------------------------------- -ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RAM, "RAM", tag, owner, clock, "ram", __FILE__) { m_size = 0; @@ -73,7 +73,7 @@ void ram_device::device_validity_check(validity_checker &valid) const { const char *ramsize_string = nullptr; int is_valid = FALSE; - UINT32 specified_ram; + uint32_t specified_ram; const char *gamename_option; /* verify default ram value */ @@ -115,7 +115,7 @@ void ram_device::device_validity_check(validity_checker &valid) const /* try to parse each option */ while(p <= e) { - UINT32 option_ram_size = parse_string(p); + uint32_t option_ram_size = parse_string(p); if (option_ram_size == 0) osd_printf_error("Invalid RAM option: %s\n", p); @@ -171,9 +171,9 @@ void ram_device::device_validity_check(validity_checker &valid) const // integer value //------------------------------------------------- -UINT32 ram_device::parse_string(const char *s) +uint32_t ram_device::parse_string(const char *s) { - UINT32 ram; + uint32_t ram; char suffix = '\0'; sscanf(s, "%u%c", &ram, &suffix); @@ -207,7 +207,7 @@ UINT32 ram_device::parse_string(const char *s) // default_size //------------------------------------------------- -UINT32 ram_device::default_size(void) const +uint32_t ram_device::default_size(void) const { return parse_string(m_default_size); } diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h index 73a62b61f8d..9cf7a9c2ad0 100644 --- a/src/devices/machine/ram.h +++ b/src/devices/machine/ram.h @@ -51,24 +51,24 @@ class ram_device : public device_t { public: // construction/destruction - ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // accessors - UINT32 size(void) const { return m_size; } - UINT32 mask(void) const { return m_size - 1; } - UINT8 *pointer(void) { return &m_pointer[0]; } - static UINT32 parse_string(const char *s); - UINT32 default_size(void) const; + uint32_t size(void) const { return m_size; } + uint32_t mask(void) const { return m_size - 1; } + uint8_t *pointer(void) { return &m_pointer[0]; } + static uint32_t parse_string(const char *s); + uint32_t default_size(void) const; const char *extra_options(void) const { return m_extra_options; } // read/write - UINT8 read(offs_t offset) { return m_pointer[offset % m_size]; } - void write(offs_t offset, UINT8 data) { m_pointer[offset % m_size] = data; } + uint8_t read(offs_t offset) { return m_pointer[offset % m_size]; } + void write(offs_t offset, uint8_t data) { m_pointer[offset % m_size] = data; } // inline configuration helpers static void static_set_default_size(device_t &device, const char *default_size) { downcast(device).m_default_size = default_size; } static void static_set_extra_options(device_t &device, const char *extra_options) { downcast(device).m_extra_options = extra_options; } - static void static_set_default_value(device_t &device, UINT8 default_value) { downcast(device).m_default_value = default_value; } + static void static_set_default_value(device_t &device, uint8_t default_value) { downcast(device).m_default_value = default_value; } protected: virtual void device_start(void) override; @@ -76,13 +76,13 @@ protected: private: // device state - UINT32 m_size; - std::vector m_pointer; + uint32_t m_size; + std::vector m_pointer; // device config const char *m_default_size; const char *m_extra_options; - UINT8 m_default_value; + uint8_t m_default_value; }; diff --git a/src/devices/machine/rf5c296.cpp b/src/devices/machine/rf5c296.cpp index f2da08685ab..80cd19d4a40 100644 --- a/src/devices/machine/rf5c296.cpp +++ b/src/devices/machine/rf5c296.cpp @@ -6,7 +6,7 @@ const device_type RF5C296 = &device_creator; -rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PCCARD_SLOT, "PCCARD SLOT", tag, owner, clock, "pccard", __FILE__), m_rf5c296_reg(0), m_pccard(nullptr), m_pccard_name(nullptr) { } @@ -16,7 +16,7 @@ void rf5c296_device::device_start() m_pccard = machine().device(m_pccard_name); } -void rf5c296_device::reg_w(ATTR_UNUSED UINT8 reg, UINT8 data) +void rf5c296_device::reg_w(ATTR_UNUSED uint8_t reg, uint8_t data) { // fprintf(stderr, "rf5c296_reg_w %02x, %02x (%s)\n", reg, data, machine().describe_context()); switch (reg) @@ -35,7 +35,7 @@ void rf5c296_device::reg_w(ATTR_UNUSED UINT8 reg, UINT8 data) } } -UINT8 rf5c296_device::reg_r(ATTR_UNUSED UINT8 reg) +uint8_t rf5c296_device::reg_r(ATTR_UNUSED uint8_t reg) { // fprintf(stderr, "rf5c296_reg_r %02x (%s)\n", reg, machine().describe_context()); return 0x00; @@ -80,7 +80,7 @@ READ16_MEMBER(rf5c296_device::io_r) offset++; } - UINT16 data; + uint16_t data; switch( offset ) { diff --git a/src/devices/machine/rf5c296.h b/src/devices/machine/rf5c296.h index faab5e738fb..2f9037b240c 100644 --- a/src/devices/machine/rf5c296.h +++ b/src/devices/machine/rf5c296.h @@ -13,7 +13,7 @@ class rf5c296_device : public device_t { public: - rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers static void set_pccard_name(device_t &device, const char *name) { downcast(device).m_pccard_name = name; } @@ -28,8 +28,8 @@ protected: virtual void device_start() override; private: - void reg_w(ATTR_UNUSED UINT8 reg, UINT8 data); - UINT8 reg_r(ATTR_UNUSED UINT8 reg); + void reg_w(ATTR_UNUSED uint8_t reg, uint8_t data); + uint8_t reg_r(ATTR_UNUSED uint8_t reg); unsigned char m_rf5c296_reg; pccard_slot_device *m_pccard; diff --git a/src/devices/machine/roc10937.cpp b/src/devices/machine/roc10937.cpp index c932002e310..009e5109bbc 100644 --- a/src/devices/machine/roc10937.cpp +++ b/src/devices/machine/roc10937.cpp @@ -33,7 +33,7 @@ we actually have 18 segments, including the semicolon portions. 16-bit tables are used to hold the main characters, the rest are OR'd in */ -static const UINT16 roc10937charset[]= +static const uint16_t roc10937charset[]= { // FEDC BA98 7654 3210 0x507F, // 0101 0000 0111 1111 @. 0x44CF, // 0100 0100 1100 1111 A. @@ -125,7 +125,7 @@ static const int roc10937poslut[]= 0//15 }; -rocvfd_t::rocvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : +rocvfd_t::rocvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source) { m_port_val=0; @@ -178,7 +178,7 @@ void rocvfd_t::device_reset() } /////////////////////////////////////////////////////////////////////////// -UINT32 rocvfd_t::set_display(UINT32 segin) +uint32_t rocvfd_t::set_display(uint32_t segin) { return BITSWAP32(segin, 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,11,9,15,13,12,8,10,14,7,6,5,4,3,2,1,0); @@ -246,7 +246,7 @@ void rocvfd_t::shift_clock(int state) /////////////////////////////////////////////////////////////////////////// const device_type ROC10937 = &device_creator; -roc10937_t::roc10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +roc10937_t::roc10937_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : rocvfd_t(mconfig, ROC10937, "Rockwell 10937 VFD controller and compatible", tag, owner, clock, "roc10937", __FILE__) { m_port_val=0; @@ -254,7 +254,7 @@ roc10937_t::roc10937_t(const machine_config &mconfig, const char *tag, device_t const device_type MSC1937 = &device_creator; -msc1937_t::msc1937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +msc1937_t::msc1937_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : rocvfd_t(mconfig, MSC1937, "OKI MSC1937 VFD controller", tag, owner, clock, "msc1937", __FILE__) { m_port_val=0; @@ -262,7 +262,7 @@ msc1937_t::msc1937_t(const machine_config &mconfig, const char *tag, device_t *o const device_type MIC10937 = &device_creator; -mic10937_t::mic10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mic10937_t::mic10937_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : rocvfd_t(mconfig, MIC10937, "Micrel MIC10937 VFD controller", tag, owner, clock, "mic10937", __FILE__) { m_port_val=0; @@ -270,7 +270,7 @@ mic10937_t::mic10937_t(const machine_config &mconfig, const char *tag, device_t const device_type S16LF01 = &device_creator; -s16lf01_t::s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s16lf01_t::s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : rocvfd_t(mconfig, S16LF01, "Samsung 16LF01 Series VFD controller and compatible", tag, owner, clock, "s16lf01", __FILE__) { m_port_val=0; @@ -329,7 +329,7 @@ void rocvfd_t::write_char(int data) const device_type ROC10957 = &device_creator; -roc10957_t::roc10957_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +roc10957_t::roc10957_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : rocvfd_t(mconfig, ROC10957, "Rockwell 10957 VFD controller and compatible", tag, owner, clock, "roc10957", __FILE__) { m_port_val=0; diff --git a/src/devices/machine/roc10937.h b/src/devices/machine/roc10937.h index 403b1bc98de..5a0b19bc5a3 100644 --- a/src/devices/machine/roc10937.h +++ b/src/devices/machine/roc10937.h @@ -59,15 +59,15 @@ class rocvfd_t : public device_t { public: - rocvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + rocvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); // inline configuration helpers static void static_set_value(device_t &device, int val); virtual void update_display(); - UINT8 m_port_val; + uint8_t m_port_val; void shift_clock(int data); void write_char(int data); - UINT32 set_display(UINT32 segin); + uint32_t set_display(uint32_t segin); DECLARE_WRITE_LINE_MEMBER( sclk ); DECLARE_WRITE_LINE_MEMBER( data ); DECLARE_WRITE_LINE_MEMBER( por ); @@ -85,9 +85,9 @@ protected: int m_duty; int m_disp; int m_sclk; - UINT8 m_cursor; - UINT32 m_chars[16]; - UINT32 m_outputs[16]; + uint8_t m_cursor; + uint32_t m_chars[16]; + uint32_t m_outputs[16]; virtual void device_start() override; virtual void device_reset() override; @@ -97,29 +97,29 @@ protected: class roc10937_t : public rocvfd_t { public: - roc10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + roc10937_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class msc1937_t : public rocvfd_t { public: - msc1937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + msc1937_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class mic10937_t : public rocvfd_t { public: - mic10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mic10937_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class roc10957_t : public rocvfd_t { public: - roc10957_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + roc10957_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); void write_char(int data); }; class s16lf01_t : public rocvfd_t { public: - s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; extern const device_type ROC10937; diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp index b2280909fa5..24095b763a5 100644 --- a/src/devices/machine/rp5c01.cpp +++ b/src/devices/machine/rp5c01.cpp @@ -167,7 +167,7 @@ inline void rp5c01_device::check_alarm() // rp5c01_device - constructor //------------------------------------------------- -rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RP5C01, "RP5C01", tag, owner, clock, "rp5c01", __FILE__), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -305,7 +305,7 @@ void rp5c01_device::nvram_write(emu_file &file) READ8_MEMBER( rp5c01_device::read ) { - UINT8 data = 0; + uint8_t data = 0; offset &= 0x0f; switch (offset) diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h index 0043cc19b6c..72b603cb2ad 100644 --- a/src/devices/machine/rp5c01.h +++ b/src/devices/machine/rp5c01.h @@ -52,7 +52,7 @@ class rp5c01_device : public device_t, { public: // construction/destruction - rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_alarm_callback(device_t &device, _Object object) { return downcast(device).m_out_alarm_cb.set_callback(object); } static void remove_battery(device_t &device) { downcast(device).m_battery_backed = false; } @@ -89,11 +89,11 @@ private: devcb_write_line m_out_alarm_cb; bool m_battery_backed; - UINT8 m_reg[2][13]; // clock registers - UINT8 m_ram[13]; // RAM + uint8_t m_reg[2][13]; // clock registers + uint8_t m_ram[13]; // RAM - UINT8 m_mode; // mode register - UINT8 m_reset; // reset register + uint8_t m_mode; // mode register + uint8_t m_reset; // reset register int m_alarm; // alarm output int m_alarm_on; // alarm condition int m_1hz; // 1 Hz condition diff --git a/src/devices/machine/rp5c15.cpp b/src/devices/machine/rp5c15.cpp index 88989b41d7c..415ef887771 100644 --- a/src/devices/machine/rp5c15.cpp +++ b/src/devices/machine/rp5c15.cpp @@ -182,7 +182,7 @@ inline void rp5c15_device::check_alarm() // rp5c15_device - constructor //------------------------------------------------- -rp5c15_device::rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +rp5c15_device::rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RP5C15, "RP5C15", tag, owner, clock, "rp5c15", __FILE__), device_rtc_interface(mconfig, *this), m_out_alarm_cb(*this), @@ -294,7 +294,7 @@ void rp5c15_device::rtc_clock_updated(int year, int month, int day, int day_of_w READ8_MEMBER( rp5c15_device::read ) { - UINT8 data = 0; + uint8_t data = 0; offset &= 0x0f; switch (offset) diff --git a/src/devices/machine/rp5c15.h b/src/devices/machine/rp5c15.h index 4a10eaeae3c..2838c44aacb 100644 --- a/src/devices/machine/rp5c15.h +++ b/src/devices/machine/rp5c15.h @@ -49,7 +49,7 @@ class rp5c15_device : public device_t, { public: // construction/destruction - rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_alarm_callback(device_t &device, _Object object) { return downcast(device).m_out_alarm_cb.set_callback(object); } template static devcb_base &set_out_clkout_callback(device_t &device, _Object object) { return downcast(device).m_out_clkout_cb.set_callback(object); } @@ -79,11 +79,11 @@ private: devcb_write_line m_out_alarm_cb; devcb_write_line m_out_clkout_cb; - UINT8 m_reg[2][13]; // clock registers - UINT8 m_ram[13]; // RAM + uint8_t m_reg[2][13]; // clock registers + uint8_t m_ram[13]; // RAM - UINT8 m_mode; // mode register - UINT8 m_reset; // reset register + uint8_t m_mode; // mode register + uint8_t m_reset; // reset register int m_alarm; // alarm output int m_alarm_on; // alarm condition int m_1hz; // 1 Hz condition diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp index 033e2b18f4c..4ea067a88c6 100644 --- a/src/devices/machine/rp5h01.cpp +++ b/src/devices/machine/rp5h01.cpp @@ -20,7 +20,7 @@ #include "machine/rp5h01.h" // this is the contents of an unprogrammed PROM -UINT8 const rp5h01_device::s_initial_data[0x10] = +uint8_t const rp5h01_device::s_initial_data[0x10] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 @@ -32,7 +32,7 @@ UINT8 const rp5h01_device::s_initial_data[0x10] = const device_type RP5H01 = &device_creator; -rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RP5H01, "RP5H01 6/7-bit Counter", tag, owner, clock, "rp5h01", __FILE__) , m_data(nullptr) , m_rom(*this, DEVICE_SELF, 0x10) diff --git a/src/devices/machine/rp5h01.h b/src/devices/machine/rp5h01.h index e1810b181ff..25d3e97853c 100644 --- a/src/devices/machine/rp5h01.h +++ b/src/devices/machine/rp5h01.h @@ -37,7 +37,7 @@ enum { class rp5h01_device : public device_t { public: - rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE_LINE_MEMBER( enable_w ); /* /CE */ DECLARE_WRITE_LINE_MEMBER( reset_w ); /* RESET */ @@ -54,7 +54,7 @@ protected: virtual void device_reset() override; private: - static UINT8 const s_initial_data[0x10]; + static uint8_t const s_initial_data[0x10]; // internal state int m_counter; @@ -62,8 +62,8 @@ private: int m_enabled; /* chip enable */ int m_old_reset; /* reset pin state (level-triggered) */ int m_old_clock; /* clock pin state (level-triggered) */ - UINT8 const *m_data; - optional_region_ptr m_rom; + uint8_t const *m_data; + optional_region_ptr m_rom; }; extern const device_type RP5H01; diff --git a/src/devices/machine/rtc4543.cpp b/src/devices/machine/rtc4543.cpp index 619ae57ad4a..ee9fb86e800 100644 --- a/src/devices/machine/rtc4543.cpp +++ b/src/devices/machine/rtc4543.cpp @@ -46,14 +46,14 @@ const device_type RTC4543 = &device_creator; // rtc4543_device - constructor //------------------------------------------------- -rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RTC4543, "R4543 RTC", tag, owner, clock, "rtc4543", __FILE__), device_rtc_interface(mconfig, *this), data_cb(*this), m_ce(0), m_clk(0), m_wr(0), m_data(0), m_curbit(0), m_clock_timer(nullptr) { } -rtc4543_device::rtc4543_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *filename) +rtc4543_device::rtc4543_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 *filename) : device_t(mconfig, type, name, tag, owner, clock, shortname, filename), device_rtc_interface(mconfig, *this), data_cb(*this), m_ce(0), m_clk(0), m_wr(0), m_data(0), m_curbit(0), m_clock_timer(nullptr) @@ -353,7 +353,7 @@ const device_type JRC6355E = &device_creator; // jrc6355e_device - constructor //------------------------------------------------- -jrc6355e_device::jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +jrc6355e_device::jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : rtc4543_device(mconfig, JRC6355E, "JRC 6355E RTC", tag, owner, clock, "jrc6355e", __FILE__) { } diff --git a/src/devices/machine/rtc4543.h b/src/devices/machine/rtc4543.h index 9a252424eb2..b8fda782cf2 100644 --- a/src/devices/machine/rtc4543.h +++ b/src/devices/machine/rtc4543.h @@ -45,8 +45,8 @@ class rtc4543_device : public device_t, public: // construction/destruction - rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - rtc4543_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *filename); + rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtc4543_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 *filename); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( wr_w ); @@ -97,7 +97,7 @@ class jrc6355e_device : public rtc4543_device { public: // construction/destruction - jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // rtc4543 overrides diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp index 0c02e4fb176..23367bc7386 100644 --- a/src/devices/machine/rtc65271.cpp +++ b/src/devices/machine/rtc65271.cpp @@ -95,18 +95,18 @@ static const int SQW_freq_table[16] = */ /* - Increment a binary-encoded UINT8 + Increment a binary-encoded uint8_t */ -static UINT8 increment_binary(UINT8 data) +static uint8_t increment_binary(uint8_t data) { return data+1; } /* - Increment a BCD-encoded UINT8 + Increment a BCD-encoded uint8_t */ -static UINT8 increment_BCD(UINT8 data) +static uint8_t increment_BCD(uint8_t data) { if ((data & 0x0f) < 0x09) { @@ -127,9 +127,9 @@ static UINT8 increment_BCD(UINT8 data) /* - Convert a binary-encoded UINT8 to BCD + Convert a binary-encoded uint8_t to BCD */ -static UINT8 binary_to_BCD(UINT8 data) +static uint8_t binary_to_BCD(uint8_t data) { data %= 100; @@ -138,9 +138,9 @@ static UINT8 binary_to_BCD(UINT8 data) /* - Convert a BCD-encoded UINT8 to binary + Convert a BCD-encoded uint8_t to binary */ -static UINT8 BCD_to_binary(UINT8 data) +static uint8_t BCD_to_binary(uint8_t data) { if ((data & 0x0f) >= 0x0a) data = data - 0x0a + 0x10; @@ -175,7 +175,7 @@ void rtc65271_device::nvram_default() void rtc65271_device::nvram_read(emu_file &file) { - UINT8 buf; + uint8_t buf; /* version flag */ if (file.read(&buf, 1) != 1) @@ -261,7 +261,7 @@ void rtc65271_device::nvram_read(emu_file &file) void rtc65271_device::nvram_write(emu_file &file) { - UINT8 buf; + uint8_t buf; /* version flag */ @@ -300,7 +300,7 @@ void rtc65271_device::nvram_write(emu_file &file) xramsel: select RTC register if 0, XRAM if 1 offset: address (A0-A5 pins) */ -UINT8 rtc65271_device::read(int xramsel, offs_t offset) +uint8_t rtc65271_device::read(int xramsel, offs_t offset) { int reply; @@ -362,7 +362,7 @@ READ8_MEMBER( rtc65271_device::xram_r ) xramsel: select RTC register if 0, XRAM if 1 offset: address (A0-A5 pins) */ -void rtc65271_device::write(int xramsel, offs_t offset, UINT8 data) +void rtc65271_device::write(int xramsel, offs_t offset, uint8_t data) { if (xramsel) { @@ -508,7 +508,7 @@ TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_end_update_cb) 31,28,31, 30,31,30, 31,31,30, 31,30,31 }; - UINT8 (*increment)(UINT8 data); + uint8_t (*increment)(uint8_t data); int c59, c23, c12, c11, c29; if (! (m_regs[reg_A] & reg_A_UIP)) @@ -652,7 +652,7 @@ const device_type RTC65271 = &device_creator; // rtc65271_device - constructor //------------------------------------------------- -rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RTC65271, "RTC-65271", tag, owner, clock, "rtc65271", __FILE__), device_nvram_interface(mconfig, *this), m_interrupt_cb(*this) diff --git a/src/devices/machine/rtc65271.h b/src/devices/machine/rtc65271.h index eb97ef6a778..961251f53b8 100644 --- a/src/devices/machine/rtc65271.h +++ b/src/devices/machine/rtc65271.h @@ -22,7 +22,7 @@ class rtc65271_device : public device_t, { public: // construction/destruction - rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides virtual void device_start() override; @@ -39,8 +39,8 @@ public: DECLARE_WRITE8_MEMBER( rtc_w ); DECLARE_WRITE8_MEMBER( xram_w ); private: - UINT8 read(int xramsel, offs_t offset); - void write(int xramsel, offs_t offset, UINT8 data); + uint8_t read(int xramsel, offs_t offset); + void write(int xramsel, offs_t offset, uint8_t data); void field_interrupts(); TIMER_CALLBACK_MEMBER(rtc_SQW_cb); @@ -48,19 +48,19 @@ private: TIMER_CALLBACK_MEMBER(rtc_end_update_cb); /* 64 8-bit registers (10 clock registers, 4 control/status registers, and 50 bytes of user RAM) */ - UINT8 m_regs[64]; - UINT8 m_cur_reg; + uint8_t m_regs[64]; + uint8_t m_cur_reg; /* extended RAM: 4kbytes of battery-backed RAM (in pages of 32 bytes) */ - UINT8 m_xram[4096]; - UINT8 m_cur_xram_page; + uint8_t m_xram[4096]; + uint8_t m_cur_xram_page; /* update timer: called every second */ emu_timer *m_update_timer; /* SQW timer: called every periodic clock half-period */ emu_timer *m_SQW_timer; - UINT8 m_SQW_internal_state; + uint8_t m_SQW_internal_state; /* callback called when interrupt pin state changes (may be nullptr) */ devcb_write_line m_interrupt_cb; diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp index 5023df7ec31..8a2bbc8915e 100644 --- a/src/devices/machine/rtc9701.cpp +++ b/src/devices/machine/rtc9701.cpp @@ -34,7 +34,7 @@ const device_type rtc9701 = &device_creator; // rtc9701_device - constructor //------------------------------------------------- -rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, rtc9701, "RTC-9701", tag, owner, clock, "rtc9701", __FILE__), device_nvram_interface(mconfig, *this), m_latch(0), @@ -45,7 +45,7 @@ rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, d TIMER_CALLBACK_MEMBER(rtc9701_device::timer_callback) { - static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; + static const uint8_t dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; int dpm_count; m_rtc.sec++; @@ -177,9 +177,9 @@ void rtc9701_device::nvram_write(emu_file &file) // rtc_read - used to route RTC reading registers //------------------------------------------------- -inline UINT8 rtc9701_device::rtc_read(UINT8 offset) +inline uint8_t rtc9701_device::rtc_read(uint8_t offset) { - UINT8 res; + uint8_t res; res = 0; @@ -198,7 +198,7 @@ inline UINT8 rtc9701_device::rtc_read(UINT8 offset) return res; } -inline void rtc9701_device::rtc_write(UINT8 offset,UINT8 data) +inline void rtc9701_device::rtc_write(uint8_t offset,uint8_t data) { switch(offset) { diff --git a/src/devices/machine/rtc9701.h b/src/devices/machine/rtc9701.h index c294cb5d9f1..450c0c7c789 100644 --- a/src/devices/machine/rtc9701.h +++ b/src/devices/machine/rtc9701.h @@ -40,7 +40,7 @@ enum rtc9701_state_t struct rtc_regs_t { - UINT8 sec, min, hour, day, wday, month, year; + uint8_t sec, min, hour, day, wday, month, year; }; @@ -51,7 +51,7 @@ class rtc9701_device : public device_t, { public: // construction/destruction - rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations @@ -71,8 +71,8 @@ protected: virtual void nvram_default() override; virtual void nvram_read(emu_file &file) override; virtual void nvram_write(emu_file &file) override; - inline UINT8 rtc_read(UINT8 offset); - inline void rtc_write(UINT8 offset,UINT8 data); + inline uint8_t rtc_read(uint8_t offset); + inline void rtc_write(uint8_t offset,uint8_t data); int m_latch; int m_reset_line; @@ -86,10 +86,10 @@ protected: int rtc9701_address_pos; int rtc9701_current_address; - UINT16 rtc9701_current_data; + uint16_t rtc9701_current_data; int rtc9701_data_pos; - UINT16 rtc9701_data[0x100]; + uint16_t rtc9701_data[0x100]; rtc_regs_t m_rtc; }; diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp index 9946114fe57..569f9d12599 100644 --- a/src/devices/machine/s2636.cpp +++ b/src/devices/machine/s2636.cpp @@ -127,7 +127,7 @@ int const s2636_device::OFFS_OBJ[s2636_device::OBJ_COUNT] = { 0x000, 0x010, 0x02 int const s2636_device::SCORE_START_X[2][s2636_device::SCORE_DIGITS] { { 48, 64, 96, 112 }, { 48, 64, 80, 96 } }; int const s2636_device::SCORE_START_Y[2] = { 20, 200 }; -UINT16 const s2636_device::SCORE_FONT[16][5] = +uint16_t const s2636_device::SCORE_FONT[16][5] = { { 0x0fff, 0x0f0f, 0x0f0f, 0x0f0f, 0x0fff }, { 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00 }, @@ -155,7 +155,7 @@ UINT16 const s2636_device::SCORE_FONT[16][5] = const device_type S2636 = &device_creator; -s2636_device::s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s2636_device::s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S2636, "Signetics 2636", tag, owner, clock, "s2636", __FILE__) , device_video_interface(mconfig, *this) , device_sound_interface(mconfig, *this) @@ -245,7 +245,7 @@ void s2636_device::render_next_line() // pre-clear the line for convenience rectangle const &vis_area = m_screen->visible_area(); - UINT16 *const row = &m_bitmap.pix16(m_screen_line); + uint16_t *const row = &m_bitmap.pix16(m_screen_line); m_bitmap.plot_box(0, m_screen_line, m_bitmap.width(), 1, 0); if ((vis_area.min_y > m_screen_line) || (vis_area.max_y < m_screen_line)) @@ -296,8 +296,8 @@ void s2636_device::render_next_line() m_obj_cnt[i] -= obj_inc; // fetch appropriate line from object - UINT8 const obj_bits = m_registers[OFFS_OBJ[i] + OBJ_HEIGHT - 1 - (m_obj_cnt[i] >> 3)]; - UINT16 const obj_clr = object_color(i) | 0x08 | (0x10 << i); + uint8_t const obj_bits = m_registers[OFFS_OBJ[i] + OBJ_HEIGHT - 1 - (m_obj_cnt[i] >> 3)]; + uint16_t const obj_clr = object_color(i) | 0x08 | (0x10 << i); // blit it to the line ignoring intermediate pixels int const obj_h_cnt = m_registers[OFFS_OBJ[i] + (m_obj_dup[i] ? OFFS_HCB : OFFS_HC)] + m_x_offset; @@ -327,14 +327,14 @@ void s2636_device::render_next_line() } // let's take a look at the score display - UINT16 const bg_clr = m_registers[REG_BG_ENB_CLR] & 0x07; + uint16_t const bg_clr = m_registers[REG_BG_ENB_CLR] & 0x07; int const score_row = m_vis_line - m_y_offset - SCORE_START_Y[m_registers[REG_SCORE_FMT] & 0x01]; if ((0 <= score_row) && (SCORE_HEIGHT > score_row)) { int const (&score_start_x)[SCORE_DIGITS] = SCORE_START_X[(m_registers[REG_SCORE_FMT] >> 1) & 0x01]; for (int i = 0; i < SCORE_DIGITS; i++) { - UINT16 score_bits = SCORE_FONT[score_digit(i)][score_row >> 2]; + uint16_t score_bits = SCORE_FONT[score_digit(i)][score_row >> 2]; int screen_col = vis_area.min_x + ((score_start_x[i] + m_x_offset) * m_divider); while (score_bits && (vis_area.max_x >= screen_col)) { @@ -351,11 +351,11 @@ void s2636_device::render_next_line() bool const bg_draw = bg_enable && (0 <= bg_row) && (BG_HEIGHT > bg_row); int const bg_vbar_offs = OFFS_VBAR_DEF + ((bg_row / 20) << 2) + (((bg_row % 20) >= 2) ? 2 : 0); int const bg_hbar_offs = OFFS_HBAR_DEF + (bg_row / 40); - UINT16 const bg_vbar_bits = (UINT16(m_registers[bg_vbar_offs]) << 8) | UINT16(m_registers[bg_vbar_offs + 1]); - UINT8 const bg_hbar_bits = m_registers[bg_hbar_offs]; + uint16_t const bg_vbar_bits = (uint16_t(m_registers[bg_vbar_offs]) << 8) | uint16_t(m_registers[bg_vbar_offs + 1]); + uint8_t const bg_hbar_bits = m_registers[bg_hbar_offs]; bool const bg_hbar_stretch = bool(bg_hbar_bits & (1 << ((((bg_row % 40) >= 20) ? 3 : 0) + (((bg_row % 20) >= 11) ? 2 : ((bg_row % 20) >= 2) ? 1 : 0)))); int const bg_hbar_width = bg_hbar_stretch ? 8 : (0xc0 == (bg_hbar_bits & 0xc0)) ? 4 : (0x40 == (bg_hbar_bits & 0xc0)) ? 2 : 1; - UINT16 const scrn_clr = bg_enable ? ((m_registers[REG_BG_ENB_CLR] >> 4) & 0x07) : 0x00; + uint16_t const scrn_clr = bg_enable ? ((m_registers[REG_BG_ENB_CLR] >> 4) & 0x07) : 0x00; for (int screen_col = vis_area.min_x, x = 0; vis_area.max_x >= screen_col; x++) { @@ -406,7 +406,7 @@ void s2636_device::render_next_line() READ8_MEMBER( s2636_device::read_data ) { mask_offset(offset); - UINT8 data = m_registers[offset]; + uint8_t data = m_registers[offset]; // TODO: some locations are not readable, should return some garbage diff --git a/src/devices/machine/s2636.h b/src/devices/machine/s2636.h index 2a22aa323d7..ce46ee4581d 100644 --- a/src/devices/machine/s2636.h +++ b/src/devices/machine/s2636.h @@ -41,7 +41,7 @@ class s2636_device : public device_t, public device_sound_interface { public: - s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~s2636_device() {} static void set_offsets(device_t &device, int y_offset, int x_offset) @@ -130,16 +130,16 @@ private: static int const OFFS_OBJ[OBJ_COUNT]; - static UINT16 const SCORE_FONT[16][5]; + static uint16_t const SCORE_FONT[16][5]; static int const SCORE_START_X[2][SCORE_DIGITS]; static int const SCORE_START_Y[2]; static void mask_offset(offs_t &offset) { offset &= ((offset & 0x0c0) == 0x0c0) ? 0x0cf : 0x0ff; } - UINT8 object_scale(int obj) const { return (m_registers[REG_OBJ_SIZE] >> (2 * obj)) & 0x03; } - UINT8 object_color(int obj) const { return (m_registers[REG_OBJ_CLR_1_2 + (obj >> 1)] >> ((obj & 1) ? 0 : 3)) & 0x07; } - UINT8 score_digit(int digit) const { return (m_registers[REG_SCORE_1_2 + (digit >> 1)] >> ((digit & 1) ? 0 : 4)) & 0x0f; } + uint8_t object_scale(int obj) const { return (m_registers[REG_OBJ_SIZE] >> (2 * obj)) & 0x03; } + uint8_t object_color(int obj) const { return (m_registers[REG_OBJ_CLR_1_2 + (obj >> 1)] >> ((obj & 1) ? 0 : 3)) & 0x07; } + uint8_t score_digit(int digit) const { return (m_registers[REG_SCORE_1_2 + (digit >> 1)] >> ((digit & 1) ? 0 : 4)) & 0x0f; } void update_intreq(int value); @@ -153,7 +153,7 @@ private: bitmap_ind16 m_bitmap; // 256-byte register file (not all of this really exists) - UINT8 m_registers[0x100]; + uint8_t m_registers[0x100]; // tracking where we're up to in the screen update bool m_vrst; diff --git a/src/devices/machine/s3520cf.cpp b/src/devices/machine/s3520cf.cpp index e504e5b9022..f0f80d4c7fa 100644 --- a/src/devices/machine/s3520cf.cpp +++ b/src/devices/machine/s3520cf.cpp @@ -35,14 +35,14 @@ const device_type S3520CF = &device_creator; // s3520cf_device - constructor //------------------------------------------------- -s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S3520CF, "S-3520CF RTC", tag, owner, clock, "s3520cf", __FILE__), m_dir(0), m_latch(0), m_reset_line(0), m_read_latch(0), m_current_cmd(0), m_cmd_stream_pos(0), m_rtc_addr(0), m_mode(0), m_sysr(0), m_rtc_state() { } TIMER_CALLBACK_MEMBER(s3520cf_device::timer_callback) { - static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; + static const uint8_t dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; int dpm_count; m_rtc.sec++; @@ -117,9 +117,9 @@ void s3520cf_device::device_reset() // rtc_read - used to route RTC reading registers //------------------------------------------------- -inline UINT8 s3520cf_device::rtc_read(UINT8 offset) +inline uint8_t s3520cf_device::rtc_read(uint8_t offset) { - UINT8 res; + uint8_t res; res = 0; @@ -156,7 +156,7 @@ inline UINT8 s3520cf_device::rtc_read(UINT8 offset) return res; } -inline void s3520cf_device::rtc_write(UINT8 offset,UINT8 data) +inline void s3520cf_device::rtc_write(uint8_t offset,uint8_t data) { if(offset == 0xf) { diff --git a/src/devices/machine/s3520cf.h b/src/devices/machine/s3520cf.h index b2b3fa452a6..beeea5d6cf0 100644 --- a/src/devices/machine/s3520cf.h +++ b/src/devices/machine/s3520cf.h @@ -32,7 +32,7 @@ enum s3520cf_state_t struct rtc_regs_t { - UINT8 sec, min, hour, day, wday, month, year; + uint8_t sec, min, hour, day, wday, month, year; }; @@ -42,7 +42,7 @@ class s3520cf_device : public device_t { public: // construction/destruction - s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); @@ -57,17 +57,17 @@ protected: virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; - inline UINT8 rtc_read(UINT8 offset); - inline void rtc_write(UINT8 offset,UINT8 data); + inline uint8_t rtc_read(uint8_t offset); + inline void rtc_write(uint8_t offset,uint8_t data); int m_dir; int m_latch; int m_reset_line; int m_read_latch; - UINT8 m_current_cmd; - UINT8 m_cmd_stream_pos; - UINT8 m_rtc_addr; - UINT8 m_mode, m_sysr; + uint8_t m_current_cmd; + uint8_t m_cmd_stream_pos; + uint8_t m_rtc_addr; + uint8_t m_mode, m_sysr; s3520cf_state_t m_rtc_state; rtc_regs_t m_rtc; diff --git a/src/devices/machine/s3c2400.cpp b/src/devices/machine/s3c2400.cpp index 8b9d4da016c..361410acf5c 100644 --- a/src/devices/machine/s3c2400.cpp +++ b/src/devices/machine/s3c2400.cpp @@ -33,14 +33,14 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c #include "machine/s3c24xx.hxx" #undef DEVICE_S3C2400 -UINT32 s3c2400_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t s3c2400_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return s3c24xx_video_update(screen, bitmap, cliprect); } const device_type S3C2400 = &device_creator; -s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S3C2400, "Samsung S3C2400", tag, owner, clock, "s3c2400", __FILE__), m_palette(*this, finder_base::DUMMY_TAG), m_cpu(*this, ":maincpu"), @@ -133,7 +133,7 @@ void s3c2400_device::device_reset() s3c24xx_device_reset(); } -void s3c2400_device::s3c2400_uart_fifo_w(int uart, UINT8 data) +void s3c2400_device::s3c2400_uart_fifo_w(int uart, uint8_t data) { s3c24xx_uart_fifo_w(uart, data); } diff --git a/src/devices/machine/s3c2400.h b/src/devices/machine/s3c2400.h index fbd2e5e70d4..c1625d095fc 100644 --- a/src/devices/machine/s3c2400.h +++ b/src/devices/machine/s3c2400.h @@ -352,7 +352,7 @@ enum class s3c2400_device : public device_t { public: - s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~s3c2400_device(); // static configuration @@ -375,22 +375,22 @@ private: // internal state required_device m_palette; public: - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void s3c24xx_reset(); inline int iface_core_pin_r(int pin); void s3c24xx_lcd_reset(); - rgb_t s3c24xx_get_color_tft_16(UINT16 data); - rgb_t s3c24xx_get_color_stn_12(UINT16 data); - rgb_t s3c24xx_get_color_stn_08( UINT8 data); - rgb_t s3c24xx_get_color_stn_01(UINT8 data); - rgb_t s3c24xx_get_color_stn_02(UINT8 data); - rgb_t s3c24xx_get_color_stn_04(UINT8 data); + rgb_t s3c24xx_get_color_tft_16(uint16_t data); + rgb_t s3c24xx_get_color_stn_12(uint16_t data); + rgb_t s3c24xx_get_color_stn_08( uint8_t data); + rgb_t s3c24xx_get_color_stn_01(uint8_t data); + rgb_t s3c24xx_get_color_stn_02(uint8_t data); + rgb_t s3c24xx_get_color_stn_04(uint8_t data); rgb_t s3c24xx_get_color_tpal(); void s3c24xx_lcd_dma_reload(); void s3c24xx_lcd_dma_init(); - UINT32 s3c24xx_lcd_dma_read(); - UINT32 s3c24xx_lcd_dma_read_bits(int count); + uint32_t s3c24xx_lcd_dma_read(); + uint32_t s3c24xx_lcd_dma_read_bits(int count); void s3c24xx_lcd_render_tpal(); void s3c24xx_lcd_render_stn_01(); void s3c24xx_lcd_render_stn_02(); @@ -406,7 +406,7 @@ public: TIMER_CALLBACK_MEMBER( s3c24xx_lcd_timer_exp ); void s3c24xx_video_start(); void bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bitmap_src_1, bitmap_rgb32 &bitmap_src_2); - UINT32 s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); READ32_MEMBER( s3c24xx_lcd_r ); int s3c24xx_lcd_configure_tft(); int s3c24xx_lcd_configure_stn(); @@ -418,18 +418,18 @@ public: READ32_MEMBER( s3c24xx_lcd_palette_r ); WRITE32_MEMBER( s3c24xx_lcd_palette_w ); void s3c24xx_clkpow_reset(); - UINT32 s3c24xx_get_fclk(); - UINT32 s3c24xx_get_hclk(); - UINT32 s3c24xx_get_pclk(); + uint32_t s3c24xx_get_fclk(); + uint32_t s3c24xx_get_hclk(); + uint32_t s3c24xx_get_pclk(); READ32_MEMBER( s3c24xx_clkpow_r ); WRITE32_MEMBER( s3c24xx_clkpow_w ); void s3c24xx_irq_reset(); void s3c24xx_check_pending_irq(); - void s3c24xx_request_irq(UINT32 int_type); + void s3c24xx_request_irq(uint32_t int_type); READ32_MEMBER( s3c24xx_irq_r ); WRITE32_MEMBER( s3c24xx_irq_w ); void s3c24xx_pwm_reset(); - UINT16 s3c24xx_pwm_calc_observation(int ch); + uint16_t s3c24xx_pwm_calc_observation(int ch); READ32_MEMBER( s3c24xx_pwm_r ); void s3c24xx_pwm_start(int timer); void s3c24xx_pwm_stop(int timer); @@ -444,8 +444,8 @@ public: void s3c24xx_dma_start(int ch); void s3c24xx_dma_stop(int ch); void s3c24xx_dma_recalc(int ch); - UINT32 s3c24xx_dma_r(UINT32 ch, UINT32 offset); - void s3c24xx_dma_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_dma_r(uint32_t ch, uint32_t offset); + void s3c24xx_dma_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_dma_0_r ); READ32_MEMBER( s3c24xx_dma_1_r ); READ32_MEMBER( s3c24xx_dma_2_r ); @@ -456,9 +456,9 @@ public: WRITE32_MEMBER( s3c24xx_dma_3_w ); TIMER_CALLBACK_MEMBER( s3c24xx_dma_timer_exp ); void s3c24xx_gpio_reset(); - inline UINT32 iface_gpio_port_r(int port, UINT32 mask); - inline void iface_gpio_port_w(int port, UINT32 mask, UINT32 data); - UINT16 s3c24xx_gpio_get_mask( UINT32 con, int val); + inline uint32_t iface_gpio_port_r(int port, uint32_t mask); + inline void iface_gpio_port_w(int port, uint32_t mask, uint32_t data); + uint16_t s3c24xx_gpio_get_mask( uint32_t con, int val); READ32_MEMBER( s3c24xx_gpio_r ); WRITE32_MEMBER( s3c24xx_gpio_w ); void s3c24xx_memcon_reset(); @@ -468,18 +468,18 @@ public: READ32_MEMBER( s3c24xx_usb_host_r ); WRITE32_MEMBER( s3c24xx_usb_host_w ); void s3c24xx_uart_reset(); - UINT32 s3c24xx_uart_r(UINT32 ch, UINT32 offset); - void s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_uart_r(uint32_t ch, uint32_t offset); + void s3c24xx_uart_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_uart_0_r ); READ32_MEMBER( s3c24xx_uart_1_r ); WRITE32_MEMBER( s3c24xx_uart_0_w ); WRITE32_MEMBER( s3c24xx_uart_1_w ); - void s3c24xx_uart_fifo_w(int uart, UINT8 data); + void s3c24xx_uart_fifo_w(int uart, uint8_t data); void s3c24xx_usb_device_reset(); READ32_MEMBER( s3c24xx_usb_device_r ); WRITE32_MEMBER( s3c24xx_usb_device_w ); void s3c24xx_wdt_reset(); - UINT16 s3c24xx_wdt_calc_current_count(); + uint16_t s3c24xx_wdt_calc_current_count(); READ32_MEMBER( s3c24xx_wdt_r ); void s3c24xx_wdt_start(); void s3c24xx_wdt_stop(); @@ -492,8 +492,8 @@ public: inline int iface_i2c_sda_r(); void i2c_send_start(); void i2c_send_stop(); - UINT8 i2c_receive_byte(int ack); - int i2c_send_byte(UINT8 data); + uint8_t i2c_receive_byte(int ack); + int i2c_send_byte(uint8_t data); void iic_start(); void iic_stop(); void iic_resume(); @@ -501,7 +501,7 @@ public: WRITE32_MEMBER( s3c24xx_iic_w ); TIMER_CALLBACK_MEMBER( s3c24xx_iic_timer_exp ); void s3c24xx_iis_reset(); - inline void iface_i2s_data_w(int ch, UINT16 data); + inline void iface_i2s_data_w(int ch, uint16_t data); void s3c24xx_iis_start(); void s3c24xx_iis_stop(); void s3c24xx_iis_recalc(); @@ -517,13 +517,13 @@ public: void s3c24xx_rtc_check_alarm(); TIMER_CALLBACK_MEMBER( s3c24xx_rtc_timer_update_exp ); void s3c24xx_adc_reset(); - UINT32 iface_adc_data_r(int ch); + uint32_t iface_adc_data_r(int ch); READ32_MEMBER( s3c24xx_adc_r ); void s3c24xx_adc_start(); WRITE32_MEMBER( s3c24xx_adc_w ); void s3c24xx_spi_reset(); - UINT32 s3c24xx_spi_r(UINT32 ch, UINT32 offset); - void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_spi_r(uint32_t ch, uint32_t offset); + void s3c24xx_spi_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_spi_0_r ); WRITE32_MEMBER( s3c24xx_spi_0_w ); void s3c24xx_mmc_reset(); @@ -533,7 +533,7 @@ public: void s3c24xx_device_start(); - void s3c2400_uart_fifo_w(int uart, UINT8 data); + void s3c2400_uart_fifo_w(int uart, uint8_t data); /******************************************************************************* TYPE DEFINITIONS @@ -541,201 +541,201 @@ public: struct s3c24xx_memcon_regs_t { - UINT32 data[0x34/4]; + uint32_t data[0x34/4]; }; struct s3c24xx_usbhost_regs_t { - UINT32 data[0x5C/4]; + uint32_t data[0x5C/4]; }; struct s3c24xx_irq_regs_t { - UINT32 srcpnd; - UINT32 intmod; - UINT32 intmsk; - UINT32 priority; - UINT32 intpnd; - UINT32 intoffset; + uint32_t srcpnd; + uint32_t intmod; + uint32_t intmsk; + uint32_t priority; + uint32_t intpnd; + uint32_t intoffset; }; struct s3c24xx_dma_regs_t { - UINT32 disrc; - UINT32 didst; - UINT32 dcon; - UINT32 dstat; - UINT32 dcsrc; - UINT32 dcdst; - UINT32 dmasktrig; + uint32_t disrc; + uint32_t didst; + uint32_t dcon; + uint32_t dstat; + uint32_t dcsrc; + uint32_t dcdst; + uint32_t dmasktrig; }; struct s3c24xx_clkpow_regs_t { - UINT32 locktime; - UINT32 mpllcon; - UINT32 upllcon; - UINT32 clkcon; - UINT32 clkslow; - UINT32 clkdivn; + uint32_t locktime; + uint32_t mpllcon; + uint32_t upllcon; + uint32_t clkcon; + uint32_t clkslow; + uint32_t clkdivn; }; struct s3c24xx_lcd_regs_t { - UINT32 lcdcon1; - UINT32 lcdcon2; - UINT32 lcdcon3; - UINT32 lcdcon4; - UINT32 lcdcon5; - UINT32 lcdsaddr1; - UINT32 lcdsaddr2; - UINT32 lcdsaddr3; - UINT32 redlut; - UINT32 greenlut; - UINT32 bluelut; - UINT32 reserved[8]; - UINT32 dithmode; - UINT32 tpal; + uint32_t lcdcon1; + uint32_t lcdcon2; + uint32_t lcdcon3; + uint32_t lcdcon4; + uint32_t lcdcon5; + uint32_t lcdsaddr1; + uint32_t lcdsaddr2; + uint32_t lcdsaddr3; + uint32_t redlut; + uint32_t greenlut; + uint32_t bluelut; + uint32_t reserved[8]; + uint32_t dithmode; + uint32_t tpal; }; struct s3c24xx_lcdpal_regs_t { - UINT32 data[0x400/4]; + uint32_t data[0x400/4]; }; struct s3c24xx_uart_regs_t { - UINT32 ulcon; - UINT32 ucon; - UINT32 ufcon; - UINT32 umcon; - UINT32 utrstat; - UINT32 uerstat; - UINT32 ufstat; - UINT32 umstat; - UINT32 utxh; - UINT32 urxh; - UINT32 ubrdiv; + uint32_t ulcon; + uint32_t ucon; + uint32_t ufcon; + uint32_t umcon; + uint32_t utrstat; + uint32_t uerstat; + uint32_t ufstat; + uint32_t umstat; + uint32_t utxh; + uint32_t urxh; + uint32_t ubrdiv; }; struct s3c24xx_pwm_regs_t { - UINT32 tcfg0; - UINT32 tcfg1; - UINT32 tcon; - UINT32 tcntb0; - UINT32 tcmpb0; - UINT32 tcnto0; - UINT32 tcntb1; - UINT32 tcmpb1; - UINT32 tcnto1; - UINT32 tcntb2; - UINT32 tcmpb2; - UINT32 tcnto2; - UINT32 tcntb3; - UINT32 tcmpb3; - UINT32 tcnto3; - UINT32 tcntb4; - UINT32 tcnto4; + uint32_t tcfg0; + uint32_t tcfg1; + uint32_t tcon; + uint32_t tcntb0; + uint32_t tcmpb0; + uint32_t tcnto0; + uint32_t tcntb1; + uint32_t tcmpb1; + uint32_t tcnto1; + uint32_t tcntb2; + uint32_t tcmpb2; + uint32_t tcnto2; + uint32_t tcntb3; + uint32_t tcmpb3; + uint32_t tcnto3; + uint32_t tcntb4; + uint32_t tcnto4; }; struct s3c24xx_usbdev_regs_t { - UINT32 data[0xBC/4]; + uint32_t data[0xBC/4]; }; struct s3c24xx_wdt_regs_t { - UINT32 wtcon; - UINT32 wtdat; - UINT32 wtcnt; + uint32_t wtcon; + uint32_t wtdat; + uint32_t wtcnt; }; struct s3c24xx_iic_regs_t { - UINT32 iiccon; - UINT32 iicstat; - UINT32 iicadd; - UINT32 iicds; + uint32_t iiccon; + uint32_t iicstat; + uint32_t iicadd; + uint32_t iicds; }; struct s3c24xx_iis_regs_t { - UINT32 iiscon; - UINT32 iismod; - UINT32 iispsr; - UINT32 iisfcon; - UINT32 iisfifo; + uint32_t iiscon; + uint32_t iismod; + uint32_t iispsr; + uint32_t iisfcon; + uint32_t iisfifo; }; struct s3c24xx_gpio_regs_t { - UINT32 gpacon; - UINT32 gpadat; - UINT32 gpbcon; - UINT32 gpbdat; - UINT32 gpbup; - UINT32 gpccon; - UINT32 gpcdat; - UINT32 gpcup; - UINT32 gpdcon; - UINT32 gpddat; - UINT32 gpdup; - UINT32 gpecon; - UINT32 gpedat; - UINT32 gpeup; - UINT32 gpfcon; - UINT32 gpfdat; - UINT32 gpfup; - UINT32 gpgcon; - UINT32 gpgdat; - UINT32 gpgup; - UINT32 opencr; - UINT32 misccr; - UINT32 extint; + uint32_t gpacon; + uint32_t gpadat; + uint32_t gpbcon; + uint32_t gpbdat; + uint32_t gpbup; + uint32_t gpccon; + uint32_t gpcdat; + uint32_t gpcup; + uint32_t gpdcon; + uint32_t gpddat; + uint32_t gpdup; + uint32_t gpecon; + uint32_t gpedat; + uint32_t gpeup; + uint32_t gpfcon; + uint32_t gpfdat; + uint32_t gpfup; + uint32_t gpgcon; + uint32_t gpgdat; + uint32_t gpgup; + uint32_t opencr; + uint32_t misccr; + uint32_t extint; }; struct s3c24xx_rtc_regs_t { - UINT32 rtccon; - UINT32 ticnt; - UINT32 reserved[2]; - UINT32 rtcalm; - UINT32 almsec; - UINT32 almmin; - UINT32 almhour; - UINT32 almday; - UINT32 almmon; - UINT32 almyear; - UINT32 rtcrst; - UINT32 bcdsec; - UINT32 bcdmin; - UINT32 bcdhour; - UINT32 bcdday; - UINT32 bcddow; - UINT32 bcdmon; - UINT32 bcdyear; + uint32_t rtccon; + uint32_t ticnt; + uint32_t reserved[2]; + uint32_t rtcalm; + uint32_t almsec; + uint32_t almmin; + uint32_t almhour; + uint32_t almday; + uint32_t almmon; + uint32_t almyear; + uint32_t rtcrst; + uint32_t bcdsec; + uint32_t bcdmin; + uint32_t bcdhour; + uint32_t bcdday; + uint32_t bcddow; + uint32_t bcdmon; + uint32_t bcdyear; }; struct s3c24xx_adc_regs_t { - UINT32 adccon; - UINT32 adcdat; + uint32_t adccon; + uint32_t adcdat; }; struct s3c24xx_spi_regs_t { - UINT32 spcon; - UINT32 spsta; - UINT32 sppin; - UINT32 sppre; - UINT32 sptdat; - UINT32 sprdat; + uint32_t spcon; + uint32_t spsta; + uint32_t sppin; + uint32_t sppre; + uint32_t sptdat; + uint32_t sprdat; }; struct s3c24xx_mmc_regs_t { - UINT32 data[0x40/4]; + uint32_t data[0x40/4]; }; struct s3c24xx_memcon_t @@ -770,18 +770,18 @@ public: s3c24xx_lcd_regs_t regs; emu_timer *timer; std::unique_ptr bitmap[2]; - UINT32 vramaddr_cur; - UINT32 vramaddr_max; - UINT32 offsize; - UINT32 pagewidth_cur; - UINT32 pagewidth_max; - UINT32 bppmode; - UINT32 bswp, hwswp; + uint32_t vramaddr_cur; + uint32_t vramaddr_max; + uint32_t offsize; + uint32_t pagewidth_cur; + uint32_t pagewidth_max; + uint32_t bppmode; + uint32_t bswp, hwswp; int vpos, hpos; double framerate; - UINT32 tpal; - UINT32 hpos_min, hpos_max, vpos_min, vpos_max; - UINT32 dma_data, dma_bits; + uint32_t tpal; + uint32_t hpos_min, hpos_max, vpos_min, vpos_max; + uint32_t dma_data, dma_bits; }; struct s3c24xx_lcdpal_t @@ -798,9 +798,9 @@ public: { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; - UINT32 cnt[5]; - UINT32 cmp[5]; - UINT32 freq[5]; + uint32_t cnt[5]; + uint32_t cmp[5]; + uint32_t freq[5]; }; struct s3c24xx_usbdev_t @@ -825,7 +825,7 @@ public: { s3c24xx_iis_regs_t regs; emu_timer *timer; - UINT16 fifo[16/2]; + uint16_t fifo[16/2]; int fifo_index; }; diff --git a/src/devices/machine/s3c2410.cpp b/src/devices/machine/s3c2410.cpp index c036b1f362c..0b1f00be67a 100644 --- a/src/devices/machine/s3c2410.cpp +++ b/src/devices/machine/s3c2410.cpp @@ -33,14 +33,14 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c #include "machine/s3c24xx.hxx" #undef DEVICE_S3C2410 -UINT32 s3c2410_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t s3c2410_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return s3c24xx_video_update(screen, bitmap, cliprect); } const device_type S3C2410 = &device_creator; -s3c2410_device::s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s3c2410_device::s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S3C2410, "S3C2410 MCU", tag, owner, clock, "s3c2410", __FILE__), m_palette(*this, finder_base::DUMMY_TAG), m_cpu(*this, ":maincpu"), @@ -142,7 +142,7 @@ void s3c2410_device::device_reset() s3c24xx_device_reset(); } -void s3c2410_device::s3c2410_uart_fifo_w( int uart, UINT8 data) +void s3c2410_device::s3c2410_uart_fifo_w( int uart, uint8_t data) { s3c24xx_uart_fifo_w( uart, data); } @@ -157,13 +157,13 @@ WRITE_LINE_MEMBER( s3c2410_device::frnb_w ) s3c24xx_pin_frnb_w(state); } -void s3c2410_device::s3c2410_nand_calculate_mecc( UINT8 *data, UINT32 size, UINT8 *mecc) +void s3c2410_device::s3c2410_nand_calculate_mecc( uint8_t *data, uint32_t size, uint8_t *mecc) { mecc[0] = mecc[1] = mecc[2] = mecc[3] = 0xFF; for (int i = 0; i < size; i++) nand_update_mecc( mecc, i, data[i]); } -void s3c2410_device::s3c2410_request_eint(UINT32 number) +void s3c2410_device::s3c2410_request_eint(uint32_t number) { s3c24xx_request_eint(number); } diff --git a/src/devices/machine/s3c2410.h b/src/devices/machine/s3c2410.h index 6e9b28a9146..3356f4d91fb 100644 --- a/src/devices/machine/s3c2410.h +++ b/src/devices/machine/s3c2410.h @@ -391,7 +391,7 @@ enum #define S3C24XX_SUBINT_TXD0 1 #define S3C24XX_SUBINT_RXD0 0 -static const UINT32 MAP_SUBINT_TO_INT[11] = +static const uint32_t MAP_SUBINT_TO_INT[11] = { S3C24XX_INT_UART0, S3C24XX_INT_UART0, S3C24XX_INT_UART0, S3C24XX_INT_UART1, S3C24XX_INT_UART1, S3C24XX_INT_UART1, @@ -438,7 +438,7 @@ static const UINT32 MAP_SUBINT_TO_INT[11] = class s3c2410_device : public device_t { public: - s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~s3c2410_device(); // static configuration @@ -467,23 +467,23 @@ private: // internal state required_device m_palette; public: - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void s3c24xx_reset(); inline int iface_core_pin_r(int pin); void s3c24xx_lcd_reset(); - rgb_t s3c24xx_get_color_tft_16(UINT16 data); - rgb_t s3c24xx_get_color_tft_24(UINT32 data); - rgb_t s3c24xx_get_color_stn_12(UINT16 data); - rgb_t s3c24xx_get_color_stn_08( UINT8 data); - rgb_t s3c24xx_get_color_stn_01(UINT8 data); - rgb_t s3c24xx_get_color_stn_02(UINT8 data); - rgb_t s3c24xx_get_color_stn_04(UINT8 data); + rgb_t s3c24xx_get_color_tft_16(uint16_t data); + rgb_t s3c24xx_get_color_tft_24(uint32_t data); + rgb_t s3c24xx_get_color_stn_12(uint16_t data); + rgb_t s3c24xx_get_color_stn_08( uint8_t data); + rgb_t s3c24xx_get_color_stn_01(uint8_t data); + rgb_t s3c24xx_get_color_stn_02(uint8_t data); + rgb_t s3c24xx_get_color_stn_04(uint8_t data); rgb_t s3c24xx_get_color_tpal(); void s3c24xx_lcd_dma_reload(); void s3c24xx_lcd_dma_init(); - UINT32 s3c24xx_lcd_dma_read(); - UINT32 s3c24xx_lcd_dma_read_bits(int count); + uint32_t s3c24xx_lcd_dma_read(); + uint32_t s3c24xx_lcd_dma_read_bits(int count); void s3c24xx_lcd_render_tpal(); void s3c24xx_lcd_render_stn_01(); void s3c24xx_lcd_render_stn_02(); @@ -499,7 +499,7 @@ public: TIMER_CALLBACK_MEMBER( s3c24xx_lcd_timer_exp ); void s3c24xx_video_start(); void bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bitmap_src_1, bitmap_rgb32 &bitmap_src_2); - UINT32 s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); READ32_MEMBER( s3c24xx_lcd_r ); int s3c24xx_lcd_configure_tft(); int s3c24xx_lcd_configure_stn(); @@ -511,22 +511,22 @@ public: READ32_MEMBER( s3c24xx_lcd_palette_r ); WRITE32_MEMBER( s3c24xx_lcd_palette_w ); void s3c24xx_clkpow_reset(); - UINT32 s3c24xx_get_fclk(); - UINT32 s3c24xx_get_hclk(); - UINT32 s3c24xx_get_pclk(); + uint32_t s3c24xx_get_fclk(); + uint32_t s3c24xx_get_hclk(); + uint32_t s3c24xx_get_pclk(); READ32_MEMBER( s3c24xx_clkpow_r ); WRITE32_MEMBER( s3c24xx_clkpow_w ); void s3c24xx_irq_reset(); void s3c24xx_check_pending_irq(); - void s3c24xx_request_irq(UINT32 int_type); + void s3c24xx_request_irq(uint32_t int_type); void s3c24xx_check_pending_subirq(); - void s3c24xx_request_subirq( UINT32 int_type); + void s3c24xx_request_subirq( uint32_t int_type); void s3c24xx_check_pending_eint(); - void s3c24xx_request_eint(UINT32 number); + void s3c24xx_request_eint(uint32_t number); READ32_MEMBER( s3c24xx_irq_r ); WRITE32_MEMBER( s3c24xx_irq_w ); void s3c24xx_pwm_reset(); - UINT16 s3c24xx_pwm_calc_observation(int ch); + uint16_t s3c24xx_pwm_calc_observation(int ch); READ32_MEMBER( s3c24xx_pwm_r ); void s3c24xx_pwm_start(int timer); void s3c24xx_pwm_stop(int timer); @@ -541,8 +541,8 @@ public: void s3c24xx_dma_start(int ch); void s3c24xx_dma_stop(int ch); void s3c24xx_dma_recalc(int ch); - UINT32 s3c24xx_dma_r(UINT32 ch, UINT32 offset); - void s3c24xx_dma_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_dma_r(uint32_t ch, uint32_t offset); + void s3c24xx_dma_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_dma_0_r ); READ32_MEMBER( s3c24xx_dma_1_r ); READ32_MEMBER( s3c24xx_dma_2_r ); @@ -553,9 +553,9 @@ public: WRITE32_MEMBER( s3c24xx_dma_3_w ); TIMER_CALLBACK_MEMBER( s3c24xx_dma_timer_exp ); void s3c24xx_gpio_reset(); - inline UINT32 iface_gpio_port_r(int port, UINT32 mask); - inline void iface_gpio_port_w(int port, UINT32 mask, UINT32 data); - UINT16 s3c24xx_gpio_get_mask( UINT32 con, int val); + inline uint32_t iface_gpio_port_r(int port, uint32_t mask); + inline void iface_gpio_port_w(int port, uint32_t mask, uint32_t data); + uint16_t s3c24xx_gpio_get_mask( uint32_t con, int val); READ32_MEMBER( s3c24xx_gpio_r ); WRITE32_MEMBER( s3c24xx_gpio_w ); void s3c24xx_memcon_reset(); @@ -565,20 +565,20 @@ public: READ32_MEMBER( s3c24xx_usb_host_r ); WRITE32_MEMBER( s3c24xx_usb_host_w ); void s3c24xx_uart_reset(); - UINT32 s3c24xx_uart_r(UINT32 ch, UINT32 offset); - void s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_uart_r(uint32_t ch, uint32_t offset); + void s3c24xx_uart_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_uart_0_r ); READ32_MEMBER( s3c24xx_uart_1_r ); READ32_MEMBER( s3c24xx_uart_2_r ); WRITE32_MEMBER( s3c24xx_uart_0_w ); WRITE32_MEMBER( s3c24xx_uart_1_w ); WRITE32_MEMBER( s3c24xx_uart_2_w ); - void s3c24xx_uart_fifo_w(int uart, UINT8 data); + void s3c24xx_uart_fifo_w(int uart, uint8_t data); void s3c24xx_usb_device_reset(); READ32_MEMBER( s3c24xx_usb_device_r ); WRITE32_MEMBER( s3c24xx_usb_device_w ); void s3c24xx_wdt_reset(); - UINT16 s3c24xx_wdt_calc_current_count(); + uint16_t s3c24xx_wdt_calc_current_count(); READ32_MEMBER( s3c24xx_wdt_r ); void s3c24xx_wdt_start(); void s3c24xx_wdt_stop(); @@ -591,8 +591,8 @@ public: inline int iface_i2c_sda_r(); void i2c_send_start(); void i2c_send_stop(); - UINT8 i2c_receive_byte(int ack); - int i2c_send_byte(UINT8 data); + uint8_t i2c_receive_byte(int ack); + int i2c_send_byte(uint8_t data); void iic_start(); void iic_stop(); void iic_resume(); @@ -600,7 +600,7 @@ public: WRITE32_MEMBER( s3c24xx_iic_w ); TIMER_CALLBACK_MEMBER( s3c24xx_iic_timer_exp ); void s3c24xx_iis_reset(); - inline void iface_i2s_data_w(int ch, UINT16 data); + inline void iface_i2s_data_w(int ch, uint16_t data); void s3c24xx_iis_start(); void s3c24xx_iis_stop(); void s3c24xx_iis_recalc(); @@ -616,14 +616,14 @@ public: void s3c24xx_rtc_check_alarm(); TIMER_CALLBACK_MEMBER( s3c24xx_rtc_timer_update_exp ); void s3c24xx_adc_reset(); - UINT32 iface_adc_data_r(int ch); + uint32_t iface_adc_data_r(int ch); READ32_MEMBER( s3c24xx_adc_r ); void s3c24xx_adc_start(); WRITE32_MEMBER( s3c24xx_adc_w ); void s3c24xx_touch_screen(int state); void s3c24xx_spi_reset(); - UINT32 s3c24xx_spi_r(UINT32 ch, UINT32 offset); - void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_spi_r(uint32_t ch, uint32_t offset); + void s3c24xx_spi_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_spi_0_r ); READ32_MEMBER( s3c24xx_spi_1_r ); WRITE32_MEMBER( s3c24xx_spi_0_w ); @@ -632,16 +632,16 @@ public: READ32_MEMBER( s3c24xx_sdi_r ); WRITE32_MEMBER( s3c24xx_sdi_w ); void s3c24xx_nand_reset(); - inline void iface_nand_command_w(UINT8 data); - inline void iface_nand_address_w(UINT8 data); - inline UINT8 iface_nand_data_r(); - inline void iface_nand_data_w(UINT8 data); - void nand_update_mecc( UINT8 *ecc, int pos, UINT8 data); - void s3c24xx_nand_update_ecc(UINT8 data); - void s3c24xx_nand_command_w(UINT8 data); - void s3c24xx_nand_address_w(UINT8 data); - UINT8 s3c24xx_nand_data_r(); - void s3c24xx_nand_data_w(UINT8 data); + inline void iface_nand_command_w(uint8_t data); + inline void iface_nand_address_w(uint8_t data); + inline uint8_t iface_nand_data_r(); + inline void iface_nand_data_w(uint8_t data); + void nand_update_mecc( uint8_t *ecc, int pos, uint8_t data); + void s3c24xx_nand_update_ecc(uint8_t data); + void s3c24xx_nand_command_w(uint8_t data); + void s3c24xx_nand_address_w(uint8_t data); + uint8_t s3c24xx_nand_data_r(); + void s3c24xx_nand_data_w(uint8_t data); READ32_MEMBER( s3c24xx_nand_r ); void s3c24xx_nand_init_ecc(); WRITE32_MEMBER( s3c24xx_nand_w ); @@ -650,10 +650,10 @@ public: void s3c24xx_device_reset(); void s3c24xx_device_start(); - void s3c2410_uart_fifo_w( int uart, UINT8 data); + void s3c2410_uart_fifo_w( int uart, uint8_t data); void s3c2410_touch_screen( int state); - void s3c2410_request_eint( UINT32 number); - void s3c2410_nand_calculate_mecc( UINT8 *data, UINT32 size, UINT8 *mecc); + void s3c2410_request_eint( uint32_t number); + void s3c2410_nand_calculate_mecc( uint8_t *data, uint32_t size, uint8_t *mecc); /******************************************************************************* TYPE DEFINITIONS @@ -661,247 +661,247 @@ public: struct s3c24xx_memcon_regs_t { - UINT32 data[0x34/4]; + uint32_t data[0x34/4]; }; struct s3c24xx_usbhost_regs_t { - UINT32 data[0x5C/4]; + uint32_t data[0x5C/4]; }; struct s3c24xx_irq_regs_t { - UINT32 srcpnd; - UINT32 intmod; - UINT32 intmsk; - UINT32 priority; - UINT32 intpnd; - UINT32 intoffset; - UINT32 subsrcpnd; - UINT32 intsubmsk; + uint32_t srcpnd; + uint32_t intmod; + uint32_t intmsk; + uint32_t priority; + uint32_t intpnd; + uint32_t intoffset; + uint32_t subsrcpnd; + uint32_t intsubmsk; }; struct s3c24xx_dma_regs_t { - UINT32 disrc; - UINT32 disrcc; - UINT32 didst; - UINT32 didstc; - UINT32 dcon; - UINT32 dstat; - UINT32 dcsrc; - UINT32 dcdst; - UINT32 dmasktrig; + uint32_t disrc; + uint32_t disrcc; + uint32_t didst; + uint32_t didstc; + uint32_t dcon; + uint32_t dstat; + uint32_t dcsrc; + uint32_t dcdst; + uint32_t dmasktrig; }; struct s3c24xx_clkpow_regs_t { - UINT32 locktime; - UINT32 mpllcon; - UINT32 upllcon; - UINT32 clkcon; - UINT32 clkslow; - UINT32 clkdivn; + uint32_t locktime; + uint32_t mpllcon; + uint32_t upllcon; + uint32_t clkcon; + uint32_t clkslow; + uint32_t clkdivn; }; struct s3c24xx_lcd_regs_t { - UINT32 lcdcon1; - UINT32 lcdcon2; - UINT32 lcdcon3; - UINT32 lcdcon4; - UINT32 lcdcon5; - UINT32 lcdsaddr1; - UINT32 lcdsaddr2; - UINT32 lcdsaddr3; - UINT32 redlut; - UINT32 greenlut; - UINT32 bluelut; - UINT32 reserved[8]; - UINT32 dithmode; - UINT32 tpal; - UINT32 lcdintpnd; - UINT32 lcdsrcpnd; - UINT32 lcdintmsk; - UINT32 lpcsel; + uint32_t lcdcon1; + uint32_t lcdcon2; + uint32_t lcdcon3; + uint32_t lcdcon4; + uint32_t lcdcon5; + uint32_t lcdsaddr1; + uint32_t lcdsaddr2; + uint32_t lcdsaddr3; + uint32_t redlut; + uint32_t greenlut; + uint32_t bluelut; + uint32_t reserved[8]; + uint32_t dithmode; + uint32_t tpal; + uint32_t lcdintpnd; + uint32_t lcdsrcpnd; + uint32_t lcdintmsk; + uint32_t lpcsel; }; struct s3c24xx_lcdpal_regs_t { - UINT32 data[0x400/4]; + uint32_t data[0x400/4]; }; struct s3c24xx_nand_regs_t { - UINT32 nfconf; - UINT32 nfcmd; - UINT32 nfaddr; - UINT32 nfdata; - UINT32 nfstat; - UINT32 nfecc; + uint32_t nfconf; + uint32_t nfcmd; + uint32_t nfaddr; + uint32_t nfdata; + uint32_t nfstat; + uint32_t nfecc; }; struct s3c24xx_uart_regs_t { - UINT32 ulcon; - UINT32 ucon; - UINT32 ufcon; - UINT32 umcon; - UINT32 utrstat; - UINT32 uerstat; - UINT32 ufstat; - UINT32 umstat; - UINT32 utxh; - UINT32 urxh; - UINT32 ubrdiv; + uint32_t ulcon; + uint32_t ucon; + uint32_t ufcon; + uint32_t umcon; + uint32_t utrstat; + uint32_t uerstat; + uint32_t ufstat; + uint32_t umstat; + uint32_t utxh; + uint32_t urxh; + uint32_t ubrdiv; }; struct s3c24xx_pwm_regs_t { - UINT32 tcfg0; - UINT32 tcfg1; - UINT32 tcon; - UINT32 tcntb0; - UINT32 tcmpb0; - UINT32 tcnto0; - UINT32 tcntb1; - UINT32 tcmpb1; - UINT32 tcnto1; - UINT32 tcntb2; - UINT32 tcmpb2; - UINT32 tcnto2; - UINT32 tcntb3; - UINT32 tcmpb3; - UINT32 tcnto3; - UINT32 tcntb4; - UINT32 tcnto4; + uint32_t tcfg0; + uint32_t tcfg1; + uint32_t tcon; + uint32_t tcntb0; + uint32_t tcmpb0; + uint32_t tcnto0; + uint32_t tcntb1; + uint32_t tcmpb1; + uint32_t tcnto1; + uint32_t tcntb2; + uint32_t tcmpb2; + uint32_t tcnto2; + uint32_t tcntb3; + uint32_t tcmpb3; + uint32_t tcnto3; + uint32_t tcntb4; + uint32_t tcnto4; }; struct s3c24xx_usbdev_regs_t { - UINT32 data[0x130/4]; + uint32_t data[0x130/4]; }; struct s3c24xx_wdt_regs_t { - UINT32 wtcon; - UINT32 wtdat; - UINT32 wtcnt; + uint32_t wtcon; + uint32_t wtdat; + uint32_t wtcnt; }; struct s3c24xx_iic_regs_t { - UINT32 iiccon; - UINT32 iicstat; - UINT32 iicadd; - UINT32 iicds; + uint32_t iiccon; + uint32_t iicstat; + uint32_t iicadd; + uint32_t iicds; }; struct s3c24xx_iis_regs_t { - UINT32 iiscon; - UINT32 iismod; - UINT32 iispsr; - UINT32 iisfcon; - UINT32 iisfifo; + uint32_t iiscon; + uint32_t iismod; + uint32_t iispsr; + uint32_t iisfcon; + uint32_t iisfifo; }; struct s3c24xx_gpio_regs_t { - UINT32 gpacon; - UINT32 gpadat; - UINT32 pad_08; - UINT32 pad_0c; - UINT32 gpbcon; - UINT32 gpbdat; - UINT32 gpbup; - UINT32 pad_1c; - UINT32 gpccon; - UINT32 gpcdat; - UINT32 gpcup; - UINT32 pad_2c; - UINT32 gpdcon; - UINT32 gpddat; - UINT32 gpdup; - UINT32 pad_3c; - UINT32 gpecon; - UINT32 gpedat; - UINT32 gpeup; - UINT32 pad_4c; - UINT32 gpfcon; - UINT32 gpfdat; - UINT32 gpfup; - UINT32 pad_5c; - UINT32 gpgcon; - UINT32 gpgdat; - UINT32 gpgup; - UINT32 pad_6c; - UINT32 gphcon; - UINT32 gphdat; - UINT32 gphup; - UINT32 pad_7c; - UINT32 misccr; - UINT32 dclkcon; - UINT32 extint0; - UINT32 extint1; - UINT32 extint2; - UINT32 eintflt0; - UINT32 eintflt1; - UINT32 eintflt2; - UINT32 eintflt3; - UINT32 eintmask; - UINT32 eintpend; - UINT32 gstatus0; - UINT32 gstatus1; - UINT32 gstatus2; - UINT32 gstatus3; - UINT32 gstatus4; + uint32_t gpacon; + uint32_t gpadat; + uint32_t pad_08; + uint32_t pad_0c; + uint32_t gpbcon; + uint32_t gpbdat; + uint32_t gpbup; + uint32_t pad_1c; + uint32_t gpccon; + uint32_t gpcdat; + uint32_t gpcup; + uint32_t pad_2c; + uint32_t gpdcon; + uint32_t gpddat; + uint32_t gpdup; + uint32_t pad_3c; + uint32_t gpecon; + uint32_t gpedat; + uint32_t gpeup; + uint32_t pad_4c; + uint32_t gpfcon; + uint32_t gpfdat; + uint32_t gpfup; + uint32_t pad_5c; + uint32_t gpgcon; + uint32_t gpgdat; + uint32_t gpgup; + uint32_t pad_6c; + uint32_t gphcon; + uint32_t gphdat; + uint32_t gphup; + uint32_t pad_7c; + uint32_t misccr; + uint32_t dclkcon; + uint32_t extint0; + uint32_t extint1; + uint32_t extint2; + uint32_t eintflt0; + uint32_t eintflt1; + uint32_t eintflt2; + uint32_t eintflt3; + uint32_t eintmask; + uint32_t eintpend; + uint32_t gstatus0; + uint32_t gstatus1; + uint32_t gstatus2; + uint32_t gstatus3; + uint32_t gstatus4; }; struct s3c24xx_rtc_regs_t { - UINT32 rtccon; - UINT32 ticnt; - UINT32 reserved[2]; - UINT32 rtcalm; - UINT32 almsec; - UINT32 almmin; - UINT32 almhour; - UINT32 almday; - UINT32 almmon; - UINT32 almyear; - UINT32 rtcrst; - UINT32 bcdsec; - UINT32 bcdmin; - UINT32 bcdhour; - UINT32 bcdday; - UINT32 bcddow; - UINT32 bcdmon; - UINT32 bcdyear; + uint32_t rtccon; + uint32_t ticnt; + uint32_t reserved[2]; + uint32_t rtcalm; + uint32_t almsec; + uint32_t almmin; + uint32_t almhour; + uint32_t almday; + uint32_t almmon; + uint32_t almyear; + uint32_t rtcrst; + uint32_t bcdsec; + uint32_t bcdmin; + uint32_t bcdhour; + uint32_t bcdday; + uint32_t bcddow; + uint32_t bcdmon; + uint32_t bcdyear; }; struct s3c24xx_adc_regs_t { - UINT32 adccon; - UINT32 adctsc; - UINT32 adcdly; - UINT32 adcdat0; - UINT32 adcdat1; + uint32_t adccon; + uint32_t adctsc; + uint32_t adcdly; + uint32_t adcdat0; + uint32_t adcdat1; }; struct s3c24xx_spi_regs_t { - UINT32 spcon; - UINT32 spsta; - UINT32 sppin; - UINT32 sppre; - UINT32 sptdat; - UINT32 sprdat; + uint32_t spcon; + uint32_t spsta; + uint32_t sppin; + uint32_t sppre; + uint32_t sptdat; + uint32_t sprdat; }; struct s3c24xx_sdi_regs_t { - UINT32 data[0x44/4]; + uint32_t data[0x44/4]; }; struct s3c24xx_memcon_t @@ -936,18 +936,18 @@ public: s3c24xx_lcd_regs_t regs; emu_timer *timer; std::unique_ptr bitmap[2]; - UINT32 vramaddr_cur; - UINT32 vramaddr_max; - UINT32 offsize; - UINT32 pagewidth_cur; - UINT32 pagewidth_max; - UINT32 bppmode; - UINT32 bswp, hwswp; + uint32_t vramaddr_cur; + uint32_t vramaddr_max; + uint32_t offsize; + uint32_t pagewidth_cur; + uint32_t pagewidth_max; + uint32_t bppmode; + uint32_t bswp, hwswp; int vpos, hpos; double framerate; - UINT32 tpal; - UINT32 hpos_min, hpos_max, vpos_min, vpos_max; - UINT32 dma_data, dma_bits; + uint32_t tpal; + uint32_t hpos_min, hpos_max, vpos_min, vpos_max; + uint32_t dma_data, dma_bits; }; struct s3c24xx_lcdpal_t @@ -958,7 +958,7 @@ public: struct s3c24xx_nand_t { s3c24xx_nand_regs_t regs; - UINT8 mecc[3]; + uint8_t mecc[3]; int ecc_pos, data_count; }; @@ -971,9 +971,9 @@ public: { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; - UINT32 cnt[5]; - UINT32 cmp[5]; - UINT32 freq[5]; + uint32_t cnt[5]; + uint32_t cmp[5]; + uint32_t freq[5]; }; struct s3c24xx_usbdev_t @@ -985,7 +985,7 @@ public: { s3c24xx_wdt_regs_t regs; emu_timer *timer; - UINT32 freq, cnt; + uint32_t freq, cnt; }; struct s3c24xx_iic_t @@ -999,7 +999,7 @@ public: { s3c24xx_iis_regs_t regs; emu_timer *timer; - UINT16 fifo[16/2]; + uint16_t fifo[16/2]; int fifo_index; }; @@ -1030,7 +1030,7 @@ public: s3c24xx_sdi_regs_t regs; }; - UINT8 m_steppingstone[4*1024]; + uint8_t m_steppingstone[4*1024]; s3c24xx_memcon_t m_memcon; s3c24xx_usbhost_t m_usbhost; s3c24xx_irq_t m_irq; diff --git a/src/devices/machine/s3c2440.cpp b/src/devices/machine/s3c2440.cpp index 9ad23516c8d..f55686203ab 100644 --- a/src/devices/machine/s3c2440.cpp +++ b/src/devices/machine/s3c2440.cpp @@ -33,14 +33,14 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c #include "machine/s3c24xx.hxx" #undef DEVICE_S3C2440 -UINT32 s3c2440_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t s3c2440_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return s3c24xx_video_update( screen, bitmap, cliprect); } const device_type S3C2440 = &device_creator; -s3c2440_device::s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s3c2440_device::s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S3C2440, "Samsung S3C2440", tag, owner, clock, "s3c2440", __FILE__), m_palette(*this, finder_base::DUMMY_TAG), m_cpu(*this, ":maincpu"), @@ -148,7 +148,7 @@ void s3c2440_device::device_reset() } -void s3c2440_device::s3c2440_uart_fifo_w(int uart, UINT8 data) +void s3c2440_device::s3c2440_uart_fifo_w(int uart, uint8_t data) { s3c24xx_uart_fifo_w( uart, data); } @@ -158,12 +158,12 @@ void s3c2440_device::s3c2440_touch_screen(int state) s3c24xx_touch_screen( state); } -void s3c2440_device::s3c2440_request_irq(UINT32 int_type) +void s3c2440_device::s3c2440_request_irq(uint32_t int_type) { s3c24xx_request_irq( int_type); } -void s3c2440_device::s3c2440_request_eint(UINT32 number) +void s3c2440_device::s3c2440_request_eint(uint32_t number) { s3c24xx_request_eint( number); } diff --git a/src/devices/machine/s3c2440.h b/src/devices/machine/s3c2440.h index 58976ddcf1a..584c5f182f2 100644 --- a/src/devices/machine/s3c2440.h +++ b/src/devices/machine/s3c2440.h @@ -419,7 +419,7 @@ enum #define S3C24XX_SUBINT_TXD0 1 #define S3C24XX_SUBINT_RXD0 0 -static const UINT32 MAP_SUBINT_TO_INT[15] = +static const uint32_t MAP_SUBINT_TO_INT[15] = { S3C24XX_INT_UART0, S3C24XX_INT_UART0, S3C24XX_INT_UART0, S3C24XX_INT_UART1, S3C24XX_INT_UART1, S3C24XX_INT_UART1, @@ -469,7 +469,7 @@ static const UINT32 MAP_SUBINT_TO_INT[15] = class s3c2440_device : public device_t { public: - s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~s3c2440_device(); // static configuration @@ -499,23 +499,23 @@ private: // internal state required_device m_palette; public: - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void s3c24xx_reset(); inline int iface_core_pin_r(int pin); void s3c24xx_lcd_reset(); - rgb_t s3c24xx_get_color_tft_16(UINT16 data); - rgb_t s3c24xx_get_color_tft_24(UINT32 data); - rgb_t s3c24xx_get_color_stn_12(UINT16 data); - rgb_t s3c24xx_get_color_stn_08( UINT8 data); - rgb_t s3c24xx_get_color_stn_01(UINT8 data); - rgb_t s3c24xx_get_color_stn_02(UINT8 data); - rgb_t s3c24xx_get_color_stn_04(UINT8 data); + rgb_t s3c24xx_get_color_tft_16(uint16_t data); + rgb_t s3c24xx_get_color_tft_24(uint32_t data); + rgb_t s3c24xx_get_color_stn_12(uint16_t data); + rgb_t s3c24xx_get_color_stn_08( uint8_t data); + rgb_t s3c24xx_get_color_stn_01(uint8_t data); + rgb_t s3c24xx_get_color_stn_02(uint8_t data); + rgb_t s3c24xx_get_color_stn_04(uint8_t data); rgb_t s3c24xx_get_color_tpal(); void s3c24xx_lcd_dma_reload(); void s3c24xx_lcd_dma_init(); - UINT32 s3c24xx_lcd_dma_read(); - UINT32 s3c24xx_lcd_dma_read_bits(int count); + uint32_t s3c24xx_lcd_dma_read(); + uint32_t s3c24xx_lcd_dma_read_bits(int count); void s3c24xx_lcd_render_tpal(); void s3c24xx_lcd_render_stn_01(); void s3c24xx_lcd_render_stn_02(); @@ -531,7 +531,7 @@ public: TIMER_CALLBACK_MEMBER( s3c24xx_lcd_timer_exp ); void s3c24xx_video_start(); void bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bitmap_src_1, bitmap_rgb32 &bitmap_src_2); - UINT32 s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); READ32_MEMBER( s3c24xx_lcd_r ); int s3c24xx_lcd_configure_tft(); int s3c24xx_lcd_configure_stn(); @@ -543,22 +543,22 @@ public: READ32_MEMBER( s3c24xx_lcd_palette_r ); WRITE32_MEMBER( s3c24xx_lcd_palette_w ); void s3c24xx_clkpow_reset(); - UINT32 s3c24xx_get_fclk(); - UINT32 s3c24xx_get_hclk(); - UINT32 s3c24xx_get_pclk(); + uint32_t s3c24xx_get_fclk(); + uint32_t s3c24xx_get_hclk(); + uint32_t s3c24xx_get_pclk(); READ32_MEMBER( s3c24xx_clkpow_r ); WRITE32_MEMBER( s3c24xx_clkpow_w ); void s3c24xx_irq_reset(); void s3c24xx_check_pending_irq(); - void s3c24xx_request_irq(UINT32 int_type); + void s3c24xx_request_irq(uint32_t int_type); void s3c24xx_check_pending_subirq(); - void s3c24xx_request_subirq( UINT32 int_type); + void s3c24xx_request_subirq( uint32_t int_type); void s3c24xx_check_pending_eint(); - void s3c24xx_request_eint(UINT32 number); + void s3c24xx_request_eint(uint32_t number); READ32_MEMBER( s3c24xx_irq_r ); WRITE32_MEMBER( s3c24xx_irq_w ); void s3c24xx_pwm_reset(); - UINT16 s3c24xx_pwm_calc_observation(int ch); + uint16_t s3c24xx_pwm_calc_observation(int ch); READ32_MEMBER( s3c24xx_pwm_r ); void s3c24xx_pwm_start(int timer); void s3c24xx_pwm_stop(int timer); @@ -573,8 +573,8 @@ public: void s3c24xx_dma_start(int ch); void s3c24xx_dma_stop(int ch); void s3c24xx_dma_recalc(int ch); - UINT32 s3c24xx_dma_r(UINT32 ch, UINT32 offset); - void s3c24xx_dma_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_dma_r(uint32_t ch, uint32_t offset); + void s3c24xx_dma_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_dma_0_r ); READ32_MEMBER( s3c24xx_dma_1_r ); READ32_MEMBER( s3c24xx_dma_2_r ); @@ -585,9 +585,9 @@ public: WRITE32_MEMBER( s3c24xx_dma_3_w ); TIMER_CALLBACK_MEMBER( s3c24xx_dma_timer_exp ); void s3c24xx_gpio_reset(); - inline UINT32 iface_gpio_port_r(int port, UINT32 mask); - inline void iface_gpio_port_w(int port, UINT32 mask, UINT32 data); - UINT16 s3c24xx_gpio_get_mask( UINT32 con, int val); + inline uint32_t iface_gpio_port_r(int port, uint32_t mask); + inline void iface_gpio_port_w(int port, uint32_t mask, uint32_t data); + uint16_t s3c24xx_gpio_get_mask( uint32_t con, int val); READ32_MEMBER( s3c24xx_gpio_r ); WRITE32_MEMBER( s3c24xx_gpio_w ); void s3c24xx_memcon_reset(); @@ -597,20 +597,20 @@ public: READ32_MEMBER( s3c24xx_usb_host_r ); WRITE32_MEMBER( s3c24xx_usb_host_w ); void s3c24xx_uart_reset(); - UINT32 s3c24xx_uart_r(UINT32 ch, UINT32 offset); - void s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_uart_r(uint32_t ch, uint32_t offset); + void s3c24xx_uart_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_uart_0_r ); READ32_MEMBER( s3c24xx_uart_1_r ); READ32_MEMBER( s3c24xx_uart_2_r ); WRITE32_MEMBER( s3c24xx_uart_0_w ); WRITE32_MEMBER( s3c24xx_uart_1_w ); WRITE32_MEMBER( s3c24xx_uart_2_w ); - void s3c24xx_uart_fifo_w(int uart, UINT8 data); + void s3c24xx_uart_fifo_w(int uart, uint8_t data); void s3c24xx_usb_device_reset(); READ32_MEMBER( s3c24xx_usb_device_r ); WRITE32_MEMBER( s3c24xx_usb_device_w ); void s3c24xx_wdt_reset(); - UINT16 s3c24xx_wdt_calc_current_count(); + uint16_t s3c24xx_wdt_calc_current_count(); READ32_MEMBER( s3c24xx_wdt_r ); void s3c24xx_wdt_start(); void s3c24xx_wdt_stop(); @@ -623,8 +623,8 @@ public: inline int iface_i2c_sda_r(); void i2c_send_start(); void i2c_send_stop(); - UINT8 i2c_receive_byte(int ack); - int i2c_send_byte(UINT8 data); + uint8_t i2c_receive_byte(int ack); + int i2c_send_byte(uint8_t data); void iic_start(); void iic_stop(); void iic_resume(); @@ -632,7 +632,7 @@ public: WRITE32_MEMBER( s3c24xx_iic_w ); TIMER_CALLBACK_MEMBER( s3c24xx_iic_timer_exp ); void s3c24xx_iis_reset(); - inline void iface_i2s_data_w(int ch, UINT16 data); + inline void iface_i2s_data_w(int ch, uint16_t data); void s3c24xx_iis_start(); void s3c24xx_iis_stop(); void s3c24xx_iis_recalc(); @@ -648,14 +648,14 @@ public: void s3c24xx_rtc_check_alarm(); TIMER_CALLBACK_MEMBER( s3c24xx_rtc_timer_update_exp ); void s3c24xx_adc_reset(); - UINT32 iface_adc_data_r(int ch); + uint32_t iface_adc_data_r(int ch); READ32_MEMBER( s3c24xx_adc_r ); void s3c24xx_adc_start(); WRITE32_MEMBER( s3c24xx_adc_w ); void s3c24xx_touch_screen(int state); void s3c24xx_spi_reset(); - UINT32 s3c24xx_spi_r(UINT32 ch, UINT32 offset); - void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t s3c24xx_spi_r(uint32_t ch, uint32_t offset); + void s3c24xx_spi_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask); READ32_MEMBER( s3c24xx_spi_0_r ); READ32_MEMBER( s3c24xx_spi_1_r ); WRITE32_MEMBER( s3c24xx_spi_0_w ); @@ -664,17 +664,17 @@ public: READ32_MEMBER( s3c24xx_sdi_r ); WRITE32_MEMBER( s3c24xx_sdi_w ); void s3c24xx_nand_reset(); - inline void iface_nand_command_w(UINT8 data); - inline void iface_nand_address_w(UINT8 data); - inline UINT8 iface_nand_data_r(); - inline void iface_nand_data_w(UINT8 data); - void nand_update_mecc( UINT8 *ecc, int pos, UINT8 data); - void nand_update_secc( UINT8 *ecc, int pos, UINT8 data); - void s3c24xx_nand_update_ecc(UINT8 data); - void s3c24xx_nand_command_w(UINT8 data); - void s3c24xx_nand_address_w(UINT8 data); - UINT8 s3c24xx_nand_data_r(); - void s3c24xx_nand_data_w(UINT8 data); + inline void iface_nand_command_w(uint8_t data); + inline void iface_nand_address_w(uint8_t data); + inline uint8_t iface_nand_data_r(); + inline void iface_nand_data_w(uint8_t data); + void nand_update_mecc( uint8_t *ecc, int pos, uint8_t data); + void nand_update_secc( uint8_t *ecc, int pos, uint8_t data); + void s3c24xx_nand_update_ecc(uint8_t data); + void s3c24xx_nand_command_w(uint8_t data); + void s3c24xx_nand_address_w(uint8_t data); + uint8_t s3c24xx_nand_data_r(); + void s3c24xx_nand_data_w(uint8_t data); READ32_MEMBER( s3c24xx_nand_r ); void s3c24xx_nand_init_ecc(); WRITE32_MEMBER( s3c24xx_nand_w ); @@ -690,10 +690,10 @@ public: void s3c24xx_device_start(); - void s3c2440_uart_fifo_w( int uart, UINT8 data); + void s3c2440_uart_fifo_w( int uart, uint8_t data); void s3c2440_touch_screen( int state); - void s3c2440_request_irq( UINT32 int_type); - void s3c2440_request_eint( UINT32 number); + void s3c2440_request_irq( uint32_t int_type); + void s3c2440_request_eint( uint32_t number); /******************************************************************************* @@ -702,277 +702,277 @@ public: struct s3c24xx_memcon_regs_t { - UINT32 data[0x34/4]; + uint32_t data[0x34/4]; }; struct s3c24xx_usbhost_regs_t { - UINT32 data[0x5C/4]; + uint32_t data[0x5C/4]; }; struct s3c24xx_irq_regs_t { - UINT32 srcpnd; - UINT32 intmod; - UINT32 intmsk; - UINT32 priority; - UINT32 intpnd; - UINT32 intoffset; - UINT32 subsrcpnd; - UINT32 intsubmsk; + uint32_t srcpnd; + uint32_t intmod; + uint32_t intmsk; + uint32_t priority; + uint32_t intpnd; + uint32_t intoffset; + uint32_t subsrcpnd; + uint32_t intsubmsk; }; struct s3c24xx_dma_regs_t { - UINT32 disrc; - UINT32 disrcc; - UINT32 didst; - UINT32 didstc; - UINT32 dcon; - UINT32 dstat; - UINT32 dcsrc; - UINT32 dcdst; - UINT32 dmasktrig; + uint32_t disrc; + uint32_t disrcc; + uint32_t didst; + uint32_t didstc; + uint32_t dcon; + uint32_t dstat; + uint32_t dcsrc; + uint32_t dcdst; + uint32_t dmasktrig; }; struct s3c24xx_clkpow_regs_t { - UINT32 locktime; - UINT32 mpllcon; - UINT32 upllcon; - UINT32 clkcon; - UINT32 clkslow; - UINT32 clkdivn; - UINT32 camdivn; + uint32_t locktime; + uint32_t mpllcon; + uint32_t upllcon; + uint32_t clkcon; + uint32_t clkslow; + uint32_t clkdivn; + uint32_t camdivn; }; struct s3c24xx_lcd_regs_t { - UINT32 lcdcon1; - UINT32 lcdcon2; - UINT32 lcdcon3; - UINT32 lcdcon4; - UINT32 lcdcon5; - UINT32 lcdsaddr1; - UINT32 lcdsaddr2; - UINT32 lcdsaddr3; - UINT32 redlut; - UINT32 greenlut; - UINT32 bluelut; - UINT32 reserved[8]; - UINT32 dithmode; - UINT32 tpal; - UINT32 lcdintpnd; - UINT32 lcdsrcpnd; - UINT32 lcdintmsk; - UINT32 tconsel; + uint32_t lcdcon1; + uint32_t lcdcon2; + uint32_t lcdcon3; + uint32_t lcdcon4; + uint32_t lcdcon5; + uint32_t lcdsaddr1; + uint32_t lcdsaddr2; + uint32_t lcdsaddr3; + uint32_t redlut; + uint32_t greenlut; + uint32_t bluelut; + uint32_t reserved[8]; + uint32_t dithmode; + uint32_t tpal; + uint32_t lcdintpnd; + uint32_t lcdsrcpnd; + uint32_t lcdintmsk; + uint32_t tconsel; }; struct s3c24xx_lcdpal_regs_t { - UINT32 data[0x400/4]; + uint32_t data[0x400/4]; }; struct s3c24xx_nand_regs_t { - UINT32 nfconf; - UINT32 nfcont; - UINT32 nfcmd; - UINT32 nfaddr; - UINT32 nfdata; - UINT32 nfmeccd0; - UINT32 nfmeccd1; - UINT32 nfseccd; - UINT32 nfstat; - UINT32 nfestat0; - UINT32 nfestat1; - UINT32 nfmecc0; - UINT32 nfmecc1; - UINT32 nfsecc; - UINT32 nfsblk; - UINT32 nfeblk; + uint32_t nfconf; + uint32_t nfcont; + uint32_t nfcmd; + uint32_t nfaddr; + uint32_t nfdata; + uint32_t nfmeccd0; + uint32_t nfmeccd1; + uint32_t nfseccd; + uint32_t nfstat; + uint32_t nfestat0; + uint32_t nfestat1; + uint32_t nfmecc0; + uint32_t nfmecc1; + uint32_t nfsecc; + uint32_t nfsblk; + uint32_t nfeblk; }; struct s3c24xx_cam_regs_t { - UINT32 data[0xA4/4]; + uint32_t data[0xA4/4]; }; struct s3c24xx_uart_regs_t { - UINT32 ulcon; - UINT32 ucon; - UINT32 ufcon; - UINT32 umcon; - UINT32 utrstat; - UINT32 uerstat; - UINT32 ufstat; - UINT32 umstat; - UINT32 utxh; - UINT32 urxh; - UINT32 ubrdiv; + uint32_t ulcon; + uint32_t ucon; + uint32_t ufcon; + uint32_t umcon; + uint32_t utrstat; + uint32_t uerstat; + uint32_t ufstat; + uint32_t umstat; + uint32_t utxh; + uint32_t urxh; + uint32_t ubrdiv; }; struct s3c24xx_pwm_regs_t { - UINT32 tcfg0; - UINT32 tcfg1; - UINT32 tcon; - UINT32 tcntb0; - UINT32 tcmpb0; - UINT32 tcnto0; - UINT32 tcntb1; - UINT32 tcmpb1; - UINT32 tcnto1; - UINT32 tcntb2; - UINT32 tcmpb2; - UINT32 tcnto2; - UINT32 tcntb3; - UINT32 tcmpb3; - UINT32 tcnto3; - UINT32 tcntb4; - UINT32 tcnto4; + uint32_t tcfg0; + uint32_t tcfg1; + uint32_t tcon; + uint32_t tcntb0; + uint32_t tcmpb0; + uint32_t tcnto0; + uint32_t tcntb1; + uint32_t tcmpb1; + uint32_t tcnto1; + uint32_t tcntb2; + uint32_t tcmpb2; + uint32_t tcnto2; + uint32_t tcntb3; + uint32_t tcmpb3; + uint32_t tcnto3; + uint32_t tcntb4; + uint32_t tcnto4; }; struct s3c24xx_usbdev_regs_t { - UINT32 data[0x130/4]; + uint32_t data[0x130/4]; }; struct s3c24xx_wdt_regs_t { - UINT32 wtcon; - UINT32 wtdat; - UINT32 wtcnt; + uint32_t wtcon; + uint32_t wtdat; + uint32_t wtcnt; }; struct s3c24xx_iic_regs_t { - UINT32 iiccon; - UINT32 iicstat; - UINT32 iicadd; - UINT32 iicds; - UINT32 iiclc; + uint32_t iiccon; + uint32_t iicstat; + uint32_t iicadd; + uint32_t iicds; + uint32_t iiclc; }; struct s3c24xx_iis_regs_t { - UINT32 iiscon; - UINT32 iismod; - UINT32 iispsr; - UINT32 iisfcon; - UINT32 iisfifo; + uint32_t iiscon; + uint32_t iismod; + uint32_t iispsr; + uint32_t iisfcon; + uint32_t iisfifo; }; struct s3c24xx_gpio_regs_t { - UINT32 gpacon; - UINT32 gpadat; - UINT32 pad_08; - UINT32 pad_0c; - UINT32 gpbcon; - UINT32 gpbdat; - UINT32 gpbup; - UINT32 pad_1c; - UINT32 gpccon; - UINT32 gpcdat; - UINT32 gpcup; - UINT32 pad_2c; - UINT32 gpdcon; - UINT32 gpddat; - UINT32 gpdup; - UINT32 pad_3c; - UINT32 gpecon; - UINT32 gpedat; - UINT32 gpeup; - UINT32 pad_4c; - UINT32 gpfcon; - UINT32 gpfdat; - UINT32 gpfup; - UINT32 pad_5c; - UINT32 gpgcon; - UINT32 gpgdat; - UINT32 gpgup; - UINT32 pad_6c; - UINT32 gphcon; - UINT32 gphdat; - UINT32 gphup; - UINT32 pad_7c; - UINT32 misccr; - UINT32 dclkcon; - UINT32 extint0; - UINT32 extint1; - UINT32 extint2; - UINT32 eintflt0; - UINT32 eintflt1; - UINT32 eintflt2; - UINT32 eintflt3; - UINT32 eintmask; - UINT32 eintpend; - UINT32 gstatus0; - UINT32 gstatus1; - UINT32 gstatus2; - UINT32 gstatus3; - UINT32 gstatus4; - UINT32 pad_c0; - UINT32 pad_c4; - UINT32 pad_c8; - UINT32 mslcon; - UINT32 gpjcon; - UINT32 gpjdat; - UINT32 gpjup; + uint32_t gpacon; + uint32_t gpadat; + uint32_t pad_08; + uint32_t pad_0c; + uint32_t gpbcon; + uint32_t gpbdat; + uint32_t gpbup; + uint32_t pad_1c; + uint32_t gpccon; + uint32_t gpcdat; + uint32_t gpcup; + uint32_t pad_2c; + uint32_t gpdcon; + uint32_t gpddat; + uint32_t gpdup; + uint32_t pad_3c; + uint32_t gpecon; + uint32_t gpedat; + uint32_t gpeup; + uint32_t pad_4c; + uint32_t gpfcon; + uint32_t gpfdat; + uint32_t gpfup; + uint32_t pad_5c; + uint32_t gpgcon; + uint32_t gpgdat; + uint32_t gpgup; + uint32_t pad_6c; + uint32_t gphcon; + uint32_t gphdat; + uint32_t gphup; + uint32_t pad_7c; + uint32_t misccr; + uint32_t dclkcon; + uint32_t extint0; + uint32_t extint1; + uint32_t extint2; + uint32_t eintflt0; + uint32_t eintflt1; + uint32_t eintflt2; + uint32_t eintflt3; + uint32_t eintmask; + uint32_t eintpend; + uint32_t gstatus0; + uint32_t gstatus1; + uint32_t gstatus2; + uint32_t gstatus3; + uint32_t gstatus4; + uint32_t pad_c0; + uint32_t pad_c4; + uint32_t pad_c8; + uint32_t mslcon; + uint32_t gpjcon; + uint32_t gpjdat; + uint32_t gpjup; }; struct s3c24xx_rtc_regs_t { - UINT32 rtccon; - UINT32 ticnt; - UINT32 reserved[2]; - UINT32 rtcalm; - UINT32 almsec; - UINT32 almmin; - UINT32 almhour; - UINT32 almday; - UINT32 almmon; - UINT32 almyear; - UINT32 rtcrst; - UINT32 bcdsec; - UINT32 bcdmin; - UINT32 bcdhour; - UINT32 bcdday; - UINT32 bcddow; - UINT32 bcdmon; - UINT32 bcdyear; + uint32_t rtccon; + uint32_t ticnt; + uint32_t reserved[2]; + uint32_t rtcalm; + uint32_t almsec; + uint32_t almmin; + uint32_t almhour; + uint32_t almday; + uint32_t almmon; + uint32_t almyear; + uint32_t rtcrst; + uint32_t bcdsec; + uint32_t bcdmin; + uint32_t bcdhour; + uint32_t bcdday; + uint32_t bcddow; + uint32_t bcdmon; + uint32_t bcdyear; }; struct s3c24xx_adc_regs_t { - UINT32 adccon; - UINT32 adctsc; - UINT32 adcdly; - UINT32 adcdat0; - UINT32 adcdat1; - UINT32 adcupdn; + uint32_t adccon; + uint32_t adctsc; + uint32_t adcdly; + uint32_t adcdat0; + uint32_t adcdat1; + uint32_t adcupdn; }; struct s3c24xx_spi_regs_t { - UINT32 spcon; - UINT32 spsta; - UINT32 sppin; - UINT32 sppre; - UINT32 sptdat; - UINT32 sprdat; + uint32_t spcon; + uint32_t spsta; + uint32_t sppin; + uint32_t sppre; + uint32_t sptdat; + uint32_t sprdat; }; struct s3c24xx_sdi_regs_t { - UINT32 data[0x44/4]; + uint32_t data[0x44/4]; }; struct s3c24xx_ac97_regs_t { - UINT32 data[0x20/4]; + uint32_t data[0x20/4]; }; struct s3c24xx_memcon_t @@ -1007,18 +1007,18 @@ public: s3c24xx_lcd_regs_t regs; emu_timer *timer; std::unique_ptr bitmap[2]; - UINT32 vramaddr_cur; - UINT32 vramaddr_max; - UINT32 offsize; - UINT32 pagewidth_cur; - UINT32 pagewidth_max; - UINT32 bppmode; - UINT32 bswp, hwswp; + uint32_t vramaddr_cur; + uint32_t vramaddr_max; + uint32_t offsize; + uint32_t pagewidth_cur; + uint32_t pagewidth_max; + uint32_t bppmode; + uint32_t bswp, hwswp; int vpos, hpos; double framerate; - UINT32 tpal; - UINT32 hpos_min, hpos_max, vpos_min, vpos_max; - UINT32 dma_data, dma_bits; + uint32_t tpal; + uint32_t hpos_min, hpos_max, vpos_min, vpos_max; + uint32_t dma_data, dma_bits; }; struct s3c24xx_lcdpal_t @@ -1029,8 +1029,8 @@ public: struct s3c24xx_nand_t { s3c24xx_nand_regs_t regs; - UINT8 mecc[4]; - UINT8 secc[2]; + uint8_t mecc[4]; + uint8_t secc[2]; int ecc_pos, data_count; }; @@ -1048,9 +1048,9 @@ public: { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; - UINT32 cnt[5]; - UINT32 cmp[5]; - UINT32 freq[5]; + uint32_t cnt[5]; + uint32_t cmp[5]; + uint32_t freq[5]; }; struct s3c24xx_usbdev_t @@ -1075,7 +1075,7 @@ public: { s3c24xx_iis_regs_t regs; emu_timer *timer; - UINT16 fifo[16/2]; + uint16_t fifo[16/2]; int fifo_index; }; @@ -1112,7 +1112,7 @@ public: }; - UINT8 m_steppingstone[4*1024]; + uint8_t m_steppingstone[4*1024]; s3c24xx_memcon_t m_memcon; s3c24xx_usbhost_t m_usbhost; s3c24xx_irq_t m_irq; diff --git a/src/devices/machine/s3c24xx.hxx b/src/devices/machine/s3c24xx.hxx index adb57cd1977..5019f40891f 100644 --- a/src/devices/machine/s3c24xx.hxx +++ b/src/devices/machine/s3c24xx.hxx @@ -19,8 +19,8 @@ #define CLOCK_MULTIPLIER 1 -#define BITS(x,m,n) (((x)>>(n))&(((UINT32)1<<((m)-(n)+1))-1)) -#define CLR_BITS(x,m,n) ((x) & ~((((UINT32)1 << ((m) - (n) + 1)) - 1) << n)) +#define BITS(x,m,n) (((x)>>(n))&(((uint32_t)1<<((m)-(n)+1))-1)) +#define CLR_BITS(x,m,n) ((x) & ~((((uint32_t)1 << ((m) - (n) + 1)) - 1) << n)) #if defined(DEVICE_S3C2400) @@ -131,11 +131,11 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_reset() lcd->timer->adjust( attotime::never); } -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_16(UINT16 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_16(uint16_t data) { if ((m_lcd.regs.lcdcon5 & (1 << 11)) == 0) { - UINT8 r, g, b, i; + uint8_t r, g, b, i; r = (BITS( data, 15, 11) << 3); g = (BITS( data, 10, 6) << 3); b = (BITS( data, 5, 1) << 3); @@ -144,7 +144,7 @@ rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_16(UINT16 data) } else { - UINT8 r, g, b; + uint8_t r, g, b; r = BITS( data, 15, 11) << 3; g = BITS( data, 10, 5) << 2; b = BITS( data, 4, 0) << 3; @@ -154,9 +154,9 @@ rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_16(UINT16 data) #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_24(UINT32 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_24(uint32_t data) { - UINT8 r, g, b; + uint8_t r, g, b; r = BITS( data, 23, 16); g = BITS( data, 15, 8); b = BITS( data, 7, 0); @@ -165,25 +165,25 @@ rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_tft_24(UINT32 data) #endif -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_12(UINT16 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_12(uint16_t data) { - UINT8 r, g, b; + uint8_t r, g, b; r = BITS( data, 11, 8) << 4; g = BITS( data, 7, 4) << 4; b = BITS( data, 3, 0) << 4; return rgb_t( r, g, b); } -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_08( UINT8 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_08( uint8_t data) { - UINT8 r, g, b; + uint8_t r, g, b; r = ((m_lcd.regs.redlut >> (BITS( data, 7, 5) << 2)) & 0xF) << 4; g = ((m_lcd.regs.greenlut >> (BITS( data, 4, 2) << 2)) & 0xF) << 4; b = ((m_lcd.regs.bluelut >> (BITS( data, 1, 0) << 2)) & 0xF) << 4; return rgb_t( r, g, b); } -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_01(UINT8 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_01(uint8_t data) { if ((data & 1) == 0) { @@ -195,16 +195,16 @@ rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_01(UINT8 data) } } -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_02(UINT8 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_02(uint8_t data) { - UINT8 r, g, b; + uint8_t r, g, b; r = g = b = ((m_lcd.regs.bluelut >> (BITS( data, 1, 0) << 2)) & 0xF) << 4; return rgb_t( r, g, b); } -rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_04(UINT8 data) +rgb_t S3C24_CLASS_NAME::s3c24xx_get_color_stn_04(uint8_t data) { - UINT8 r, g, b; + uint8_t r, g, b; r = g = b = BITS( data, 3, 0) << 4; return rgb_t( r, g, b); } @@ -250,11 +250,11 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_dma_init() } #if 0 -UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() +uint32_t S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() { address_space& space = m_cpu->memory().space( AS_PROGRAM); - UINT8 *vram, data[4]; - vram = (UINT8 *)space.get_read_ptr( m_lcd.vramaddr_cur); + uint8_t *vram, data[4]; + vram = (uint8_t *)space.get_read_ptr( m_lcd.vramaddr_cur); for (int i = 0; i < 2; i++) { data[i*2+0] = *vram++; @@ -265,7 +265,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() { m_lcd.vramaddr_cur += m_lcd.offsize << 1; m_lcd.pagewidth_cur = 0; - vram = (UINT8 *)space.get_read_ptr( m_lcd.vramaddr_cur); + vram = (uint8_t *)space.get_read_ptr( m_lcd.vramaddr_cur); } } if (m_lcd.hwswp == 0) @@ -293,11 +293,11 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() } #endif -UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() +uint32_t S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() { address_space& space = m_cpu->memory().space( AS_PROGRAM); - UINT8 *vram, data[4]; - vram = (UINT8 *)space.get_read_ptr( m_lcd.vramaddr_cur); + uint8_t *vram, data[4]; + vram = (uint8_t *)space.get_read_ptr( m_lcd.vramaddr_cur); for (int i = 0; i < 2; i++) { if (m_lcd.hwswp == 0) @@ -348,7 +348,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() { m_lcd.vramaddr_cur += m_lcd.offsize << 1; m_lcd.pagewidth_cur = 0; - vram = (UINT8 *)space.get_read_ptr( m_lcd.vramaddr_cur); + vram = (uint8_t *)space.get_read_ptr( m_lcd.vramaddr_cur); } else { @@ -365,9 +365,9 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read() } } -UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read_bits(int count) +uint32_t S3C24_CLASS_NAME::s3c24xx_lcd_dma_read_bits(int count) { - UINT32 data; + uint32_t data; if (count <= m_lcd.dma_bits) { m_lcd.dma_bits -= count; @@ -384,7 +384,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read_bits(int count) } else { - UINT32 temp = s3c24xx_lcd_dma_read(); + uint32_t temp = s3c24xx_lcd_dma_read(); data = BITS( temp, 31, 32 - count); m_lcd.dma_data = temp << count; m_lcd.dma_bits = 32 - count; @@ -392,7 +392,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read_bits(int count) } else { - UINT32 temp = s3c24xx_lcd_dma_read(); + uint32_t temp = s3c24xx_lcd_dma_read(); data = (m_lcd.dma_data >> (32 - count)) | BITS( temp, 31, 32 - (count - m_lcd.dma_bits)); m_lcd.dma_data = temp << (count - m_lcd.dma_bits); m_lcd.dma_bits = 32 - (count - m_lcd.dma_bits); @@ -404,10 +404,10 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_lcd_dma_read_bits(int count) void S3C24_CLASS_NAME::s3c24xx_lcd_render_tpal() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 color = s3c24xx_get_color_tpal(); + uint32_t color = s3c24xx_get_color_tpal(); for (int y = m_lcd.vpos_min; y <= m_lcd.vpos_max; y++) { - UINT32 *scanline = &bitmap.pix32(y, m_lcd.hpos_min); + uint32_t *scanline = &bitmap.pix32(y, m_lcd.hpos_min); for (int x = m_lcd.hpos_min; x <= m_lcd.hpos_max; x++) { *scanline++ = color; @@ -418,10 +418,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tpal() void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_01() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 32; j++) { if (m_flags & S3C24XX_INTERFACE_LCD_REVERSE) @@ -449,10 +449,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_01() void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_02() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 16; j++) { *scanline++ = s3c24xx_get_color_stn_02((data >> 30) & 0x03); @@ -472,10 +472,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_02() void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_04() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 8; j++) { *scanline++ = s3c24xx_get_color_stn_04((data >> 28) & 0x0F); @@ -495,10 +495,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_04() void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_08() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 4; j++) { *scanline++ = s3c24xx_get_color_stn_08((data >> 24) & 0xFF); @@ -518,7 +518,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_08() void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_p() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 16; i++) { *scanline++ = s3c24xx_get_color_stn_12(s3c24xx_lcd_dma_read_bits(12)); @@ -536,10 +536,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_p() void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_u() // not tested { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 2; j++) { *scanline++ = s3c24xx_get_color_stn_12((data >> 16) & 0x0FFF); @@ -559,10 +559,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_u() // not tested void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_01() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 32; j++) { *scanline++ = m_palette->pen_color((data >> 31) & 0x01); @@ -582,10 +582,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_01() void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_02() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 16; j++) { *scanline++ = m_palette->pen_color((data >> 30) & 0x03); @@ -605,10 +605,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_02() void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_04() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 8; j++) { *scanline++ = m_palette->pen_color((data >> 28) & 0x0F); @@ -628,10 +628,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_04() void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_08() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 4; j++) { *scanline++ = m_palette->pen_color((data >> 24) & 0xFF); @@ -651,10 +651,10 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_08() void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_16() { bitmap_rgb32 &bitmap = *m_lcd.bitmap[0]; - UINT32 *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); + uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos); for (int i = 0; i < 4; i++) { - UINT32 data = s3c24xx_lcd_dma_read(); + uint32_t data = s3c24xx_lcd_dma_read(); for (int j = 0; j < 2; j++) { *scanline++ = s3c24xx_get_color_tft_16((data >> 16) & 0xFFFF); @@ -674,7 +674,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_16() TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_timer_exp ) { screen_device *screen = machine().first_screen(); - UINT32 tpalen; + uint32_t tpalen; verboselog( *this, 2, "LCD timer callback\n"); m_lcd.vpos = screen->vpos(); m_lcd.hpos = screen->hpos(); @@ -725,28 +725,28 @@ void S3C24_CLASS_NAME::bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bit { for (int y = 0; y < bitmap_dst.height(); y++) { - UINT32 *line0 = &bitmap_src_1.pix32(y); - UINT32 *line1 = &bitmap_src_2.pix32(y); - UINT32 *line2 = &bitmap_dst.pix32(y); + uint32_t *line0 = &bitmap_src_1.pix32(y); + uint32_t *line1 = &bitmap_src_2.pix32(y); + uint32_t *line2 = &bitmap_dst.pix32(y); for (int x = 0; x < bitmap_dst.width(); x++) { - UINT32 color0 = line0[x]; - UINT32 color1 = line1[x]; - UINT16 r0 = (color0 >> 16) & 0x000000ff; - UINT16 g0 = (color0 >> 8) & 0x000000ff; - UINT16 b0 = (color0 >> 0) & 0x000000ff; - UINT16 r1 = (color1 >> 16) & 0x000000ff; - UINT16 g1 = (color1 >> 8) & 0x000000ff; - UINT16 b1 = (color1 >> 0) & 0x000000ff; - UINT8 r = (UINT8)((r0 + r1) >> 1); - UINT8 g = (UINT8)((g0 + g1) >> 1); - UINT8 b = (UINT8)((b0 + b1) >> 1); + uint32_t color0 = line0[x]; + uint32_t color1 = line1[x]; + uint16_t r0 = (color0 >> 16) & 0x000000ff; + uint16_t g0 = (color0 >> 8) & 0x000000ff; + uint16_t b0 = (color0 >> 0) & 0x000000ff; + uint16_t r1 = (color1 >> 16) & 0x000000ff; + uint16_t g1 = (color1 >> 8) & 0x000000ff; + uint16_t b1 = (color1 >> 0) & 0x000000ff; + uint8_t r = (uint8_t)((r0 + r1) >> 1); + uint8_t g = (uint8_t)((g0 + g1) >> 1); + uint8_t b = (uint8_t)((b0 + b1) >> 1); line2[x] = (r << 16) | (g << 8) | b; } } } -UINT32 S3C24_CLASS_NAME::s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t S3C24_CLASS_NAME::s3c24xx_video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { if (m_lcd.regs.lcdcon1 & (1 << 0)) { @@ -767,13 +767,13 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_video_update(screen_device &screen, bitmap_rgb3 READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_r ) { - UINT32 data = ((UINT32*)&m_lcd.regs)[offset]; + uint32_t data = ((uint32_t*)&m_lcd.regs)[offset]; switch (offset) { case S3C24XX_LCDCON1 : { // make sure line counter is going - UINT32 vpos = machine().first_screen()->vpos(); + uint32_t vpos = machine().first_screen()->vpos(); if (vpos < m_lcd.vpos_min) vpos = m_lcd.vpos_min; if (vpos > m_lcd.vpos_max) vpos = m_lcd.vpos_max; data = (data & ~0xFFFC0000) | ((m_lcd.vpos_max - vpos) << 18); @@ -781,7 +781,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_r ) break; case S3C24XX_LCDCON5 : { - UINT32 vpos = machine().first_screen()->vpos(); + uint32_t vpos = machine().first_screen()->vpos(); data = data & ~0x00018000; if (vpos < m_lcd.vpos_min) data = data | 0x00000000; if (vpos > m_lcd.vpos_max) data = data | 0x00018000; @@ -796,9 +796,9 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_r ) int S3C24_CLASS_NAME::s3c24xx_lcd_configure_tft() { screen_device *screen = machine().first_screen(); - UINT32 vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk; + uint32_t vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk; double framerate, vclk; - UINT32 width, height; + uint32_t width, height; rectangle visarea; verboselog( *this, 5, "s3c24xx_lcd_configure_tft\n"); vspw = BITS( m_lcd.regs.lcdcon2, 5, 0); @@ -836,9 +836,9 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_tft() int S3C24_CLASS_NAME::s3c24xx_lcd_configure_stn() { screen_device *screen = machine().first_screen(); - UINT32 pnrmode, bppmode, clkval, lineval, wdly, hozval, lineblank, wlh, hclk; + uint32_t pnrmode, bppmode, clkval, lineval, wdly, hozval, lineblank, wlh, hclk; double vclk, framerate; - UINT32 width, height; + uint32_t width, height; rectangle visarea; verboselog( *this, 5, "s3c24xx_lcd_configure_stn\n"); pnrmode = BITS( m_lcd.regs.lcdcon1, 6, 5); @@ -881,7 +881,7 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_stn() int S3C24_CLASS_NAME::s3c24xx_lcd_configure() { - UINT32 bppmode; + uint32_t bppmode; verboselog( *this, 5, "s3c24xx_lcd_configure\n"); bppmode = BITS( m_lcd.regs.lcdcon1, 4, 1); if ((bppmode & (1 << 3)) == 0) @@ -925,9 +925,9 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_recalc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_w ) { - UINT32 old_value = ((UINT32*)&m_lcd.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_lcd.regs)[offset]; verboselog( *this, 9, "(LCD) %08X <- %08X\n", S3C24XX_BASE_LCD + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_lcd.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_lcd.regs)[offset]); switch (offset) { case S3C24XX_LCDCON1 : @@ -945,7 +945,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_w ) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_palette_r ) { - UINT32 data = m_lcdpal.regs.data[offset]; + uint32_t data = m_lcdpal.regs.data[offset]; verboselog( *this, 9, "(LCD) %08X -> %08X\n", S3C24XX_BASE_LCDPAL + (offset << 2), data); return data; } @@ -986,9 +986,9 @@ void S3C24_CLASS_NAME::s3c24xx_clkpow_reset() clkpow->regs.clkslow = 4; } -UINT32 S3C24_CLASS_NAME::s3c24xx_get_fclk() +uint32_t S3C24_CLASS_NAME::s3c24xx_get_fclk() { - UINT32 mpllcon, clkslow, mdiv, pdiv, sdiv, fclk; + uint32_t mpllcon, clkslow, mdiv, pdiv, sdiv, fclk; double temp1, temp2; mpllcon = m_clkpow.regs.mpllcon; mdiv = BITS( mpllcon, 19, 12); @@ -1000,11 +1000,11 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_get_fclk() temp1 = 2 * (mdiv + 8) * (double)clock(); #endif temp2 = (double)((pdiv + 2) * (1 << sdiv)); - fclk = (UINT32)(temp1 / temp2); + fclk = (uint32_t)(temp1 / temp2); clkslow = m_clkpow.regs.clkslow; if (BIT( clkslow, 4) == 1) { - UINT32 slow_val = BITS( clkslow, 2, 0); + uint32_t slow_val = BITS( clkslow, 2, 0); if (slow_val > 0) { fclk = fclk / (2 * slow_val); @@ -1013,7 +1013,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_get_fclk() return fclk; } -UINT32 S3C24_CLASS_NAME::s3c24xx_get_hclk() +uint32_t S3C24_CLASS_NAME::s3c24xx_get_hclk() { #if defined(DEVICE_S3C2400) || defined(DEVICE_S3C2410) return s3c24xx_get_fclk() / (BIT( m_clkpow.regs.clkdivn, 1) + 1); @@ -1029,14 +1029,14 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_get_hclk() #endif } -UINT32 S3C24_CLASS_NAME::s3c24xx_get_pclk() +uint32_t S3C24_CLASS_NAME::s3c24xx_get_pclk() { return s3c24xx_get_hclk() / (1 << BIT( m_clkpow.regs.clkdivn, 0)); } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_clkpow_r ) { - UINT32 data = ((UINT32*)&m_clkpow.regs)[offset]; + uint32_t data = ((uint32_t*)&m_clkpow.regs)[offset]; verboselog( *this, 9, "(CLKPOW) %08X -> %08X\n", S3C24XX_BASE_CLKPOW + (offset << 2), data); return data; } @@ -1044,7 +1044,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_clkpow_r ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_clkpow_w ) { verboselog( *this, 9, "(CLKPOW) %08X <- %08X\n", S3C24XX_BASE_CLKPOW + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_clkpow.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_clkpow.regs)[offset]); switch (offset) { case S3C24XX_MPLLCON : @@ -1080,7 +1080,7 @@ void S3C24_CLASS_NAME::s3c24xx_irq_reset() void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() { - UINT32 temp; + uint32_t temp; // normal irq if ((m_irq.regs.intpnd == 0) && (m_irq.regs.intoffset == 0)) // without this "touryuu" crashes @@ -1088,7 +1088,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() temp = (m_irq.regs.srcpnd & ~m_irq.regs.intmsk) & ~m_irq.regs.intmod; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; verboselog( *this, 5, "srcpnd %08X intmsk %08X intmod %08X\n", m_irq.regs.srcpnd, m_irq.regs.intmsk, m_irq.regs.intmod); while ((temp & 1) == 0) { @@ -1121,7 +1121,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() temp = (m_irq.regs.srcpnd & ~m_irq.regs.intmsk) & m_irq.regs.intmod; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; while ((temp & 1) == 0) { int_type++; @@ -1145,7 +1145,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() } } -void S3C24_CLASS_NAME::s3c24xx_request_irq(UINT32 int_type) +void S3C24_CLASS_NAME::s3c24xx_request_irq(uint32_t int_type) { verboselog( *this, 5, "request irq %d\n", int_type); m_irq.regs.srcpnd |= (1 << int_type); @@ -1156,10 +1156,10 @@ void S3C24_CLASS_NAME::s3c24xx_request_irq(UINT32 int_type) void S3C24_CLASS_NAME::s3c24xx_check_pending_subirq() { - UINT32 temp = m_irq.regs.subsrcpnd & ~m_irq.regs.intsubmsk; + uint32_t temp = m_irq.regs.subsrcpnd & ~m_irq.regs.intsubmsk; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; while ((temp & 1) == 0) { int_type++; @@ -1169,7 +1169,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_subirq() } } -ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_subirq( UINT32 int_type) +ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_subirq( uint32_t int_type) { verboselog( *this, 5, "request subirq %d\n", int_type); m_irq.regs.subsrcpnd |= (1 << int_type); @@ -1178,10 +1178,10 @@ ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_subirq( UINT32 int_type) void S3C24_CLASS_NAME::s3c24xx_check_pending_eint() { - UINT32 temp = m_gpio.regs.eintpend & ~m_gpio.regs.eintmask; + uint32_t temp = m_gpio.regs.eintpend & ~m_gpio.regs.eintmask; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; while ((temp & 1) == 0) { int_type++; @@ -1198,7 +1198,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_eint() } } -ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_eint(UINT32 number) +ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_eint(uint32_t number) { verboselog( *this, 5, "request external interrupt %d\n", number); if (number < 4) @@ -1216,16 +1216,16 @@ ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_eint(UINT32 number) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_irq_r ) { - UINT32 data = ((UINT32*)&m_irq.regs)[offset]; + uint32_t data = ((uint32_t*)&m_irq.regs)[offset]; verboselog( *this, 9, "(IRQ) %08X -> %08X\n", S3C24XX_BASE_INT + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_irq_w ) { - UINT32 old_value = ((UINT32*)&m_irq.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_irq.regs)[offset]; verboselog( *this, 9, "(IRQ) %08X <- %08X\n", S3C24XX_BASE_INT + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_irq.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_irq.regs)[offset]); switch (offset) { case S3C24XX_SRCPND : @@ -1275,10 +1275,10 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_reset() } } -UINT16 S3C24_CLASS_NAME::s3c24xx_pwm_calc_observation(int ch) +uint16_t S3C24_CLASS_NAME::s3c24xx_pwm_calc_observation(int ch) { double timeleft, x1, x2; - UINT32 cnto; + uint32_t cnto; timeleft = m_pwm.timer[ch]->remaining( ).as_double(); // printf( "timeleft %f freq %d cntb %d cmpb %d\n", timeleft, m_pwm.freq[ch], m_pwm.cnt[ch], m_pwm.cmp[ch]); x1 = 1 / ((double)m_pwm.freq[ch] / (m_pwm.cnt[ch]- m_pwm.cmp[ch] + 1)); @@ -1291,7 +1291,7 @@ UINT16 S3C24_CLASS_NAME::s3c24xx_pwm_calc_observation(int ch) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_pwm_r ) { - UINT32 data = ((UINT32*)&m_pwm.regs)[offset]; + uint32_t data = ((uint32_t*)&m_pwm.regs)[offset]; switch (offset) { case S3C24XX_TCNTO0 : @@ -1329,7 +1329,7 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_start(int timer) const int mux_table[] = { 2, 4, 8, 16}; const int prescaler_shift[] = { 0, 0, 8, 8, 8}; const int mux_shift[] = { 0, 4, 8, 12, 16}; - UINT32 pclk, prescaler, mux, cnt, cmp, auto_reload; + uint32_t pclk, prescaler, mux, cnt, cmp, auto_reload; double freq, hz; verboselog( *this, 1, "PWM %d start\n", timer); pclk = s3c24xx_get_pclk(); @@ -1431,9 +1431,9 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_recalc(int timer) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_pwm_w ) { - UINT32 old_value = ((UINT32*)&m_pwm.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_pwm.regs)[offset]; verboselog( *this, 9, "(PWM) %08X <- %08X\n", S3C24XX_BASE_PWM + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_pwm.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_pwm.regs)[offset]); switch (offset) { case S3C24XX_TCON : @@ -1501,10 +1501,10 @@ void S3C24_CLASS_NAME::s3c24xx_dma_reload(int ch) void S3C24_CLASS_NAME::s3c24xx_dma_trigger(int ch) { s3c24xx_dma_regs_t *regs = &m_dma[ch].regs; - UINT32 curr_tc, curr_src, curr_dst; + uint32_t curr_tc, curr_src, curr_dst; address_space &space = m_cpu->memory().space( AS_PROGRAM); int dsz, inc_src, inc_dst, servmode, tsz; - const UINT32 ch_int[] = { S3C24XX_INT_DMA0, S3C24XX_INT_DMA1, S3C24XX_INT_DMA2, S3C24XX_INT_DMA3}; + const uint32_t ch_int[] = { S3C24XX_INT_DMA0, S3C24XX_INT_DMA1, S3C24XX_INT_DMA2, S3C24XX_INT_DMA3}; verboselog( *this, 5, "DMA %d trigger\n", ch); curr_tc = S3C24XX_DSTAT_GET_CURR_TC( regs->dstat); dsz = S3C24XX_DCON_GET_DSZ( regs->dcon); @@ -1584,9 +1584,9 @@ void S3C24_CLASS_NAME::s3c24xx_dma_request_pwm() void S3C24_CLASS_NAME::s3c24xx_dma_start(int ch) { - UINT32 addr_src, addr_dst, tc; + uint32_t addr_src, addr_dst, tc; s3c24xx_dma_regs_t *regs = &m_dma[ch].regs; - UINT32 dsz, tsz, reload; + uint32_t dsz, tsz, reload; int inc_src, inc_dst, _int, servmode, swhwsel, hwsrcsel; verboselog( *this, 1, "DMA %d start\n", ch); addr_src = S3C24XX_DISRC_GET_SADDR( regs->disrc); @@ -1632,15 +1632,15 @@ void S3C24_CLASS_NAME::s3c24xx_dma_recalc(int ch) } } -UINT32 S3C24_CLASS_NAME::s3c24xx_dma_r(UINT32 ch, UINT32 offset) +uint32_t S3C24_CLASS_NAME::s3c24xx_dma_r(uint32_t ch, uint32_t offset) { - return ((UINT32*)&m_dma[ch].regs)[offset]; + return ((uint32_t*)&m_dma[ch].regs)[offset]; } -void S3C24_CLASS_NAME::s3c24xx_dma_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +void S3C24_CLASS_NAME::s3c24xx_dma_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask) { - UINT32 old_value = ((UINT32*)&m_dma[ch].regs)[offset]; - COMBINE_DATA(&((UINT32*)&m_dma[ch].regs)[offset]); + uint32_t old_value = ((uint32_t*)&m_dma[ch].regs)[offset]; + COMBINE_DATA(&((uint32_t*)&m_dma[ch].regs)[offset]); switch (offset) { case S3C24XX_DCON : @@ -1667,28 +1667,28 @@ void S3C24_CLASS_NAME::s3c24xx_dma_w(UINT32 ch, UINT32 offset, UINT32 data, UINT READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_0_r ) { - UINT32 data = s3c24xx_dma_r( 0, offset); + uint32_t data = s3c24xx_dma_r( 0, offset); verboselog( *this, 9, "(DMA 0) %08X -> %08X\n", S3C24XX_BASE_DMA_0 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_1_r ) { - UINT32 data = s3c24xx_dma_r( 1, offset); + uint32_t data = s3c24xx_dma_r( 1, offset); verboselog( *this, 9, "(DMA 1) %08X -> %08X\n", S3C24XX_BASE_DMA_1 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_2_r ) { - UINT32 data = s3c24xx_dma_r( 2, offset); + uint32_t data = s3c24xx_dma_r( 2, offset); verboselog( *this, 9, "(DMA 2) %08X -> %08X\n", S3C24XX_BASE_DMA_2 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_3_r ) { - UINT32 data = s3c24xx_dma_r( 3, offset); + uint32_t data = s3c24xx_dma_r( 3, offset); verboselog( *this, 9, "(DMA 3) %08X -> %08X\n", S3C24XX_BASE_DMA_3 + (offset << 2), data); return data; } @@ -1753,7 +1753,7 @@ void S3C24_CLASS_NAME::s3c24xx_gpio_reset() #endif } -UINT32 S3C24_CLASS_NAME::iface_gpio_port_r(int port, UINT32 mask) +uint32_t S3C24_CLASS_NAME::iface_gpio_port_r(int port, uint32_t mask) { if (!m_port_r_cb.isnull()) { @@ -1768,7 +1768,7 @@ UINT32 S3C24_CLASS_NAME::iface_gpio_port_r(int port, UINT32 mask) } } -void S3C24_CLASS_NAME::iface_gpio_port_w(int port, UINT32 mask, UINT32 data) +void S3C24_CLASS_NAME::iface_gpio_port_w(int port, uint32_t mask, uint32_t data) { if (!m_port_w_cb.isnull()) { @@ -1776,9 +1776,9 @@ void S3C24_CLASS_NAME::iface_gpio_port_w(int port, UINT32 mask, UINT32 data) } } -UINT16 S3C24_CLASS_NAME::s3c24xx_gpio_get_mask( UINT32 con, int val) +uint16_t S3C24_CLASS_NAME::s3c24xx_gpio_get_mask( uint32_t con, int val) { - UINT16 mask = 0; + uint16_t mask = 0; for (int i = 0; i < 16; i++) { if (((con >> (i << 1)) & 3) == val) @@ -1792,7 +1792,7 @@ UINT16 S3C24_CLASS_NAME::s3c24xx_gpio_get_mask( UINT32 con, int val) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_gpio_r ) { s3c24xx_gpio_t *gpio = &m_gpio; - UINT32 data = ((UINT32*)&m_gpio.regs)[offset]; + uint32_t data = ((uint32_t*)&m_gpio.regs)[offset]; switch (offset) { case S3C24XX_GPADAT : @@ -1853,10 +1853,10 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_gpio_w ) { s3c24xx_gpio_t *gpio = &m_gpio; #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) - UINT32 old_value = ((UINT32*)&m_gpio.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_gpio.regs)[offset]; #endif verboselog( *this, 9, "(GPIO) %08X <- %08X\n", S3C24XX_BASE_GPIO + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_gpio.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_gpio.regs)[offset]); switch (offset) { case S3C24XX_GPADAT : @@ -1947,7 +1947,7 @@ void S3C24_CLASS_NAME::s3c24xx_memcon_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_memcon_r ) { assert(offset < ARRAY_LENGTH(m_memcon.regs.data)); - UINT32 data = m_memcon.regs.data[offset]; + uint32_t data = m_memcon.regs.data[offset]; verboselog( *this, 9, "(MEMCON) %08X -> %08X\n", S3C24XX_BASE_MEMCON + (offset << 2), data); return data; } @@ -1968,7 +1968,7 @@ void S3C24_CLASS_NAME::s3c24xx_usb_host_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_host_r ) { - UINT32 data = m_usbhost.regs.data[offset]; + uint32_t data = m_usbhost.regs.data[offset]; switch (offset) { // HcCommandStatus @@ -2021,9 +2021,9 @@ void S3C24_CLASS_NAME::s3c24xx_uart_reset() } } -UINT32 S3C24_CLASS_NAME::s3c24xx_uart_r(UINT32 ch, UINT32 offset) +uint32_t S3C24_CLASS_NAME::s3c24xx_uart_r(uint32_t ch, uint32_t offset) { - UINT32 data = ((UINT32*)&m_uart[ch].regs)[offset]; + uint32_t data = ((uint32_t*)&m_uart[ch].regs)[offset]; switch (offset) { case S3C24XX_UTRSTAT : @@ -2033,7 +2033,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_uart_r(UINT32 ch, UINT32 offset) break; case S3C24XX_URXH : { - UINT8 rxdata = data & 0xFF; + uint8_t rxdata = data & 0xFF; verboselog( *this, 5, "UART %d read %02X (%c)\n", ch, rxdata, ((rxdata >= 32) && (rxdata < 128)) ? (char)rxdata : '?'); m_uart[ch].regs.utrstat &= ~1; // [bit 0] Receive buffer data ready } @@ -2042,9 +2042,9 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_uart_r(UINT32 ch, UINT32 offset) return data; } -void S3C24_CLASS_NAME::s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +void S3C24_CLASS_NAME::s3c24xx_uart_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask) { - COMBINE_DATA(&((UINT32*)&m_uart[ch].regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_uart[ch].regs)[offset]); switch (offset) { case S3C24XX_UFCON : @@ -2054,7 +2054,7 @@ void S3C24_CLASS_NAME::s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UIN break; case S3C24XX_UTXH : { - UINT8 txdata = data & 0xFF; + uint8_t txdata = data & 0xFF; verboselog( *this, 5, "UART %d write %02X (%c)\n", ch, txdata, ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); #ifdef UART_PRINTF printf( "%c", ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); @@ -2066,14 +2066,14 @@ void S3C24_CLASS_NAME::s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UIN READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_0_r ) { - UINT32 data = s3c24xx_uart_r( 0, offset); + uint32_t data = s3c24xx_uart_r( 0, offset); // verboselog( *this, 9, "(UART 0) %08X -> %08X\n", S3C24XX_BASE_UART_0 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_1_r ) { - UINT32 data = s3c24xx_uart_r( 1, offset); + uint32_t data = s3c24xx_uart_r( 1, offset); // verboselog( *this, 9, "(UART 1) %08X -> %08X\n", S3C24XX_BASE_UART_1 + (offset << 2), data); return data; } @@ -2082,7 +2082,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_1_r ) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_2_r ) { - UINT32 data = s3c24xx_uart_r( 2, offset); + uint32_t data = s3c24xx_uart_r( 2, offset); // verboselog( *this, 9, "(UART 2) %08X -> %08X\n", S3C24XX_BASE_UART_2 + (offset << 2), data); return data; } @@ -2111,7 +2111,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_2_w ) #endif -void S3C24_CLASS_NAME::s3c24xx_uart_fifo_w(int uart, UINT8 data) +void S3C24_CLASS_NAME::s3c24xx_uart_fifo_w(int uart, uint8_t data) { // printf( "s3c24xx_uart_fifo_w (%c)\n", data); m_uart[uart].regs.urxh = data; @@ -2143,7 +2143,7 @@ void S3C24_CLASS_NAME::s3c24xx_usb_device_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_device_r ) { - UINT32 data = m_usbdev.regs.data[offset]; + uint32_t data = m_usbdev.regs.data[offset]; verboselog( *this, 9, "(USB D) %08X -> %08X\n", S3C24XX_BASE_USBDEV + (offset << 2), data); return data; } @@ -2168,10 +2168,10 @@ void S3C24_CLASS_NAME::s3c24xx_wdt_reset() #if defined(DEVICE_S3C2410) -UINT16 S3C24_CLASS_NAME::s3c24xx_wdt_calc_current_count() +uint16_t S3C24_CLASS_NAME::s3c24xx_wdt_calc_current_count() { double timeleft, x1, x2; - UINT32 cnt; + uint32_t cnt; timeleft = m_wdt.timer->remaining( ).as_double(); // printf( "timeleft %f freq %d cnt %d\n", timeleft, m_wdt.freq, m_wdt.cnt); x1 = 1 / ((double)m_wdt.freq / m_wdt.cnt); @@ -2184,7 +2184,7 @@ UINT16 S3C24_CLASS_NAME::s3c24xx_wdt_calc_current_count() #else -UINT16 S3C24_CLASS_NAME::s3c24xx_wdt_calc_current_count() +uint16_t S3C24_CLASS_NAME::s3c24xx_wdt_calc_current_count() { return 0; } @@ -2193,7 +2193,7 @@ UINT16 S3C24_CLASS_NAME::s3c24xx_wdt_calc_current_count() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_r ) { - UINT32 data = ((UINT32*)&m_wdt.regs)[offset]; + uint32_t data = ((uint32_t*)&m_wdt.regs)[offset]; switch (offset) { case S3C24XX_WTCNT : @@ -2212,7 +2212,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_r ) void S3C24_CLASS_NAME::s3c24xx_wdt_start() { - UINT32 pclk, prescaler, clock; + uint32_t pclk, prescaler, clock; double freq, hz; verboselog( *this, 1, "WDT start\n"); pclk = s3c24xx_get_pclk(); @@ -2249,9 +2249,9 @@ void S3C24_CLASS_NAME::s3c24xx_wdt_recalc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_w ) { - UINT32 old_value = ((UINT32*)&m_wdt.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_wdt.regs)[offset]; verboselog( *this, 9, "(WDT) %08X <- %08X\n", S3C24XX_BASE_WDT + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_wdt.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_wdt.regs)[offset]); switch (offset) { case S3C24XX_WTCON : @@ -2341,9 +2341,9 @@ void S3C24_CLASS_NAME::i2c_send_stop() iface_i2c_scl_w( 0); } -UINT8 S3C24_CLASS_NAME::i2c_receive_byte(int ack) +uint8_t S3C24_CLASS_NAME::i2c_receive_byte(int ack) { - UINT8 data = 0; + uint8_t data = 0; verboselog( *this, 5, "i2c_receive_byte ...\n"); iface_i2c_sda_w( 1); for (int i = 0; i < 8; i++) @@ -2360,7 +2360,7 @@ UINT8 S3C24_CLASS_NAME::i2c_receive_byte(int ack) return data; } -int S3C24_CLASS_NAME::i2c_send_byte(UINT8 data) +int S3C24_CLASS_NAME::i2c_send_byte(uint8_t data) { int ack; verboselog( *this, 5, "i2c_send_byte ...\n"); @@ -2416,7 +2416,7 @@ void S3C24_CLASS_NAME::iic_resume() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_r ) { - UINT32 data = ((UINT32*)&m_iic.regs)[offset]; + uint32_t data = ((uint32_t*)&m_iic.regs)[offset]; switch (offset) { case S3C24XX_IICSTAT : @@ -2431,9 +2431,9 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_r ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_w ) { - UINT32 old_value = ((UINT32*)&m_iic.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_iic.regs)[offset]; verboselog( *this, 9, "(IIC) %08X <- %08X\n", S3C24XX_BASE_IIC + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_iic.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_iic.regs)[offset]); switch (offset) { case S3C24XX_IICCON : @@ -2531,7 +2531,7 @@ void S3C24_CLASS_NAME::s3c24xx_iis_reset() iis->timer->adjust( attotime::never); } -void S3C24_CLASS_NAME::iface_i2s_data_w(int ch, UINT16 data) +void S3C24_CLASS_NAME::iface_i2s_data_w(int ch, uint16_t data) { if (!m_data_w_cb.isnull()) { @@ -2541,7 +2541,7 @@ void S3C24_CLASS_NAME::iface_i2s_data_w(int ch, UINT16 data) void S3C24_CLASS_NAME::s3c24xx_iis_start() { - const UINT32 codeclk_table[] = { 256, 384}; + const uint32_t codeclk_table[] = { 256, 384}; double freq; int pclk, prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk; verboselog( *this, 1, "IIS start\n"); @@ -2575,7 +2575,7 @@ void S3C24_CLASS_NAME::s3c24xx_iis_recalc() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_r ) { - UINT32 data = ((UINT32*)&m_iis.regs)[offset]; + uint32_t data = ((uint32_t*)&m_iis.regs)[offset]; #if 0 switch (offset) { @@ -2592,9 +2592,9 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_r ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_w ) { - UINT32 old_value = ((UINT32*)&m_iis.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_iis.regs)[offset]; verboselog( *this, 9, "(IIS) %08X <- %08X\n", S3C24XX_BASE_IIS + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_iis.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_iis.regs)[offset]); switch (offset) { case S3C24XX_IISCON : @@ -2646,7 +2646,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_r ) { - UINT32 data = ((UINT32*)&m_rtc.regs)[offset]; + uint32_t data = ((uint32_t*)&m_rtc.regs)[offset]; verboselog( *this, 9, "(RTC) %08X -> %08X\n", S3C24XX_BASE_RTC + (offset << 2), data); return data; } @@ -2655,7 +2655,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_recalc() { if (m_rtc.regs.ticnt & (1 << 7)) { - UINT32 ttc; + uint32_t ttc; double freq; ttc = BITS( m_rtc.regs.ticnt, 6, 0); freq = 128 / (ttc + 1); @@ -2671,7 +2671,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_recalc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_w ) { verboselog( *this, 9, "(RTC) %08X <- %08X\n", S3C24XX_BASE_RTC + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_rtc.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_rtc.regs)[offset]); switch (offset) { case S3C24XX_TICNT : @@ -2690,7 +2690,7 @@ TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_timer_tick_count_exp ) void S3C24_CLASS_NAME::s3c24xx_rtc_update() { - UINT32 bcdday_max; + uint32_t bcdday_max; // increase second m_rtc.regs.bcdsec = bcd_adjust( m_rtc.regs.bcdsec + 1); if (m_rtc.regs.bcdsec >= 0x60) @@ -2771,7 +2771,7 @@ void S3C24_CLASS_NAME::s3c24xx_adc_reset() #endif } -UINT32 S3C24_CLASS_NAME::iface_adc_data_r(int ch) +uint32_t S3C24_CLASS_NAME::iface_adc_data_r(int ch) { if (!m_data_r_cb.isnull()) { @@ -2792,7 +2792,7 @@ UINT32 S3C24_CLASS_NAME::iface_adc_data_r(int ch) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_adc_r ) { - UINT32 data = ((UINT32*)&m_adc.regs)[offset]; + uint32_t data = ((uint32_t*)&m_adc.regs)[offset]; switch (offset) { #if defined(DEVICE_S3C2400) @@ -2830,9 +2830,9 @@ void S3C24_CLASS_NAME::s3c24xx_adc_start() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_adc_w ) { - UINT32 old_value = ((UINT32*)&m_adc.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_adc.regs)[offset]; verboselog( *this, 9, "(ADC) %08X <- %08X\n", S3C24XX_BASE_ADC + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_adc.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_adc.regs)[offset]); switch (offset) { case S3C24XX_ADCCON : @@ -2872,9 +2872,9 @@ void S3C24_CLASS_NAME::s3c24xx_spi_reset() } } -UINT32 S3C24_CLASS_NAME::s3c24xx_spi_r(UINT32 ch, UINT32 offset) +uint32_t S3C24_CLASS_NAME::s3c24xx_spi_r(uint32_t ch, uint32_t offset) { - UINT32 data = ((UINT32*)&m_spi[ch].regs)[offset]; + uint32_t data = ((uint32_t*)&m_spi[ch].regs)[offset]; switch (offset) { case S3C24XX_SPSTA : @@ -2886,14 +2886,14 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_spi_r(UINT32 ch, UINT32 offset) return data; } -void S3C24_CLASS_NAME::s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +void S3C24_CLASS_NAME::s3c24xx_spi_w(uint32_t ch, uint32_t offset, uint32_t data, uint32_t mem_mask) { - COMBINE_DATA(&((UINT32*)&m_spi[ch].regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_spi[ch].regs)[offset]); } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_0_r ) { - UINT32 data = s3c24xx_spi_r( 0, offset); + uint32_t data = s3c24xx_spi_r( 0, offset); verboselog( *this, 9, "(SPI 0) %08X -> %08X\n", S3C24XX_BASE_SPI_0 + (offset << 2), data); return data; } @@ -2902,7 +2902,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_0_r ) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_1_r ) { - UINT32 data = s3c24xx_spi_r( 1, offset); + uint32_t data = s3c24xx_spi_r( 1, offset); verboselog( *this, 9, "(SPI 1) %08X -> %08X\n", S3C24XX_BASE_SPI_1 + (offset << 2), data); return data; } @@ -2937,7 +2937,7 @@ void S3C24_CLASS_NAME::s3c24xx_mmc_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_mmc_r ) { - UINT32 data = m_mmc.regs.data[offset]; + uint32_t data = m_mmc.regs.data[offset]; verboselog( *this, 9, "(MMC) %08X -> %08X\n", S3C24XX_BASE_MMC + (offset << 2), data); return data; } @@ -2968,7 +2968,7 @@ void S3C24_CLASS_NAME::s3c24xx_sdi_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_sdi_r ) { - UINT32 data = m_sdi.regs.data[offset]; + uint32_t data = m_sdi.regs.data[offset]; verboselog( *this, 9, "(SDI) %08X -> %08X\n", S3C24XX_BASE_SDI + (offset << 2), data); return data; } @@ -2995,7 +2995,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_reset() #endif } -void S3C24_CLASS_NAME::iface_nand_command_w(UINT8 data) +void S3C24_CLASS_NAME::iface_nand_command_w(uint8_t data) { if (!m_command_w_cb.isnull()) { @@ -3003,7 +3003,7 @@ void S3C24_CLASS_NAME::iface_nand_command_w(UINT8 data) } } -void S3C24_CLASS_NAME::iface_nand_address_w(UINT8 data) +void S3C24_CLASS_NAME::iface_nand_address_w(uint8_t data) { if (!m_address_w_cb.isnull()) { @@ -3011,7 +3011,7 @@ void S3C24_CLASS_NAME::iface_nand_address_w(UINT8 data) } } -UINT8 S3C24_CLASS_NAME::iface_nand_data_r() +uint8_t S3C24_CLASS_NAME::iface_nand_data_r() { if (!m_nand_data_r_cb.isnull()) { @@ -3023,7 +3023,7 @@ UINT8 S3C24_CLASS_NAME::iface_nand_data_r() } } -void S3C24_CLASS_NAME::iface_nand_data_w(UINT8 data) +void S3C24_CLASS_NAME::iface_nand_data_w(uint8_t data) { if (!m_nand_data_w_cb.isnull()) { @@ -3031,10 +3031,10 @@ void S3C24_CLASS_NAME::iface_nand_data_w(UINT8 data) } } -void S3C24_CLASS_NAME::nand_update_mecc( UINT8 *ecc, int pos, UINT8 data) +void S3C24_CLASS_NAME::nand_update_mecc( uint8_t *ecc, int pos, uint8_t data) { int bit[8]; - UINT8 temp; + uint8_t temp; bit[0] = (data >> 0) & 1; bit[1] = (data >> 1) & 1; bit[2] = (data >> 2) & 1; @@ -3067,10 +3067,10 @@ void S3C24_CLASS_NAME::nand_update_mecc( UINT8 *ecc, int pos, UINT8 data) #if defined(DEVICE_S3C2440) -void S3C24_CLASS_NAME::nand_update_secc( UINT8 *ecc, int pos, UINT8 data) +void S3C24_CLASS_NAME::nand_update_secc( uint8_t *ecc, int pos, uint8_t data) { int bit[8]; - UINT8 temp; + uint8_t temp; bit[0] = (data >> 0) & 1; bit[1] = (data >> 1) & 1; bit[2] = (data >> 2) & 1; @@ -3096,10 +3096,10 @@ void S3C24_CLASS_NAME::nand_update_secc( UINT8 *ecc, int pos, UINT8 data) #endif -void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(UINT8 data) +void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(uint8_t data) { s3c24xx_nand_t *nand = &m_nand; - UINT8 temp[4]; + uint8_t temp[4]; #if defined(DEVICE_S3C2410) temp[0] = nand->mecc[0]; temp[1] = nand->mecc[1]; @@ -3129,29 +3129,29 @@ void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(UINT8 data) #endif } -void S3C24_CLASS_NAME::s3c24xx_nand_command_w(UINT8 data) +void S3C24_CLASS_NAME::s3c24xx_nand_command_w(uint8_t data) { verboselog( *this, 5, "NAND write command %02X\n", data); m_nand.data_count = 0; iface_nand_command_w( data); } -void S3C24_CLASS_NAME::s3c24xx_nand_address_w(UINT8 data) +void S3C24_CLASS_NAME::s3c24xx_nand_address_w(uint8_t data) { verboselog( *this, 5, "NAND write address %02X\n", data); m_nand.data_count = 0; iface_nand_address_w( data); } -UINT8 S3C24_CLASS_NAME::s3c24xx_nand_data_r() +uint8_t S3C24_CLASS_NAME::s3c24xx_nand_data_r() { - UINT8 data = iface_nand_data_r(); + uint8_t data = iface_nand_data_r(); verboselog( *this, 5, "NAND read data %02X [%04X]\n", data, m_nand.data_count++); s3c24xx_nand_update_ecc( data); return data; } -void S3C24_CLASS_NAME::s3c24xx_nand_data_w(UINT8 data) +void S3C24_CLASS_NAME::s3c24xx_nand_data_w(uint8_t data) { verboselog( *this, 5, "NAND write data %02X [%04X]\n", data, m_nand.data_count++); iface_nand_data_w( data); @@ -3160,7 +3160,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_data_w(UINT8 data) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_nand_r ) { - UINT32 data = ((UINT32*)&m_nand.regs)[offset]; + uint32_t data = ((uint32_t*)&m_nand.regs)[offset]; switch (offset) { case S3C24XX_NFDATA : @@ -3226,9 +3226,9 @@ void S3C24_CLASS_NAME::s3c24xx_nand_init_ecc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_nand_w ) { - UINT32 old_value = ((UINT32*)&m_nand.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_nand.regs)[offset]; verboselog( *this, 9, "(NAND) %08X <- %08X (%08X)\n", S3C24XX_BASE_NAND + (offset << 2), data, mem_mask); - COMBINE_DATA(&((UINT32*)&m_nand.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_nand.regs)[offset]); switch (offset) { #if defined(DEVICE_S3C2410) @@ -3324,7 +3324,7 @@ void S3C24_CLASS_NAME::s3c24xx_cam_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_cam_r ) { - UINT32 data = m_cam.regs.data[offset]; + uint32_t data = m_cam.regs.data[offset]; verboselog( *this, 9, "(CAM) %08X -> %08X\n", S3C24XX_BASE_CAM + (offset << 2), data); return data; } @@ -3349,7 +3349,7 @@ void S3C24_CLASS_NAME::s3c24xx_ac97_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_ac97_r ) { - UINT32 data = m_ac97.regs.data[offset]; + uint32_t data = m_ac97.regs.data[offset]; verboselog( *this, 9, "(AC97) %08X -> %08X\n", S3C24XX_BASE_AC97 + (offset << 2), data); return data; } @@ -3373,7 +3373,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_auto_boot() if ((om0 == 0) && (om1 == 0)) { int ncon = iface_core_pin_r( S3C24XX_CORE_PIN_NCON); - UINT8 *ptr = m_steppingstone; + uint8_t *ptr = m_steppingstone; int page_size, address_cycle; #if defined(DEVICE_S3C2410) page_size = 512; @@ -3386,7 +3386,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_auto_boot() address_cycle = 4; // byte-page-page-page } #elif defined(DEVICE_S3C2440) - UINT32 port_g = iface_gpio_port_r( S3C24XX_GPIO_PORT_G, 0); + uint32_t port_g = iface_gpio_port_r( S3C24XX_GPIO_PORT_G, 0); if (ncon == 0) { if (BIT( port_g, 13) == 0) diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp index 7660918e1a5..826a94ae600 100644 --- a/src/devices/machine/s3c44b0.cpp +++ b/src/devices/machine/s3c44b0.cpp @@ -31,7 +31,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c const device_type S3C44B0 = &device_creator; -s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, S3C44B0, "Samsung S3C44B0", tag, owner, clock, "s3c44b0", __FILE__), m_cpu(nullptr), m_port_r_cb(*this), m_port_w_cb(*this), @@ -283,8 +283,8 @@ void s3c44b0_device::device_reset() #define CLOCK_MULTIPLIER 1 -#define BITS(x,m,n) (((x)>>(n))&(((UINT32)1<<((m)-(n)+1))-1)) -#define CLR_BITS(x,m,n) ((x) & ~((((UINT32)1 << ((m) - (n) + 1)) - 1) << n)) +#define BITS(x,m,n) (((x)>>(n))&(((uint32_t)1<<((m)-(n)+1))-1)) +#define CLR_BITS(x,m,n) ((x) & ~((((uint32_t)1 << ((m) - (n) + 1)) - 1) << n)) /*************************************************************************** @@ -293,24 +293,24 @@ void s3c44b0_device::device_reset() /* LCD Controller */ -rgb_t s3c44b0_device::lcd_get_color_stn_04(UINT8 data) +rgb_t s3c44b0_device::lcd_get_color_stn_04(uint8_t data) { - UINT8 r, g, b; + uint8_t r, g, b; r = g = b = BITS(data, 3, 0) << 4; return rgb_t(r, g, b); } -UINT8 s3c44b0_device::lcd_get_color_stn_08_r(UINT8 data) +uint8_t s3c44b0_device::lcd_get_color_stn_08_r(uint8_t data) { return ((m_lcd.regs.redlut >> (BITS(data, 7, 5) << 2)) & 0xf) << 4; } -UINT8 s3c44b0_device::lcd_get_color_stn_08_g(UINT8 data) +uint8_t s3c44b0_device::lcd_get_color_stn_08_g(uint8_t data) { return ((m_lcd.regs.greenlut >> (BITS(data, 4, 2) << 2)) & 0xf) << 4; } -UINT8 s3c44b0_device::lcd_get_color_stn_08_b(UINT8 data) +uint8_t s3c44b0_device::lcd_get_color_stn_08_b(uint8_t data) { return ((m_lcd.regs.bluelut >> (BITS(data, 1, 0) << 2)) & 0xf) << 4; } @@ -339,10 +339,10 @@ void s3c44b0_device::lcd_dma_init() lcd_dma_reload(); } -void s3c44b0_device::lcd_dma_read(int count, UINT8 *data) +void s3c44b0_device::lcd_dma_read(int count, uint8_t *data) { address_space &space = m_cpu->space(AS_PROGRAM); - UINT8 *vram = (UINT8 *)space.get_read_ptr(m_lcd.vramaddr_cur); + uint8_t *vram = (uint8_t *)space.get_read_ptr(m_lcd.vramaddr_cur); for (int i = 0; i < count / 2; i++) { if (m_lcd.bswp == 0) @@ -373,7 +373,7 @@ void s3c44b0_device::lcd_dma_read(int count, UINT8 *data) lcd_dma_reload(); } m_lcd.pagewidth_cur = 0; - vram = (UINT8 *)space.get_read_ptr(m_lcd.vramaddr_cur); + vram = (uint8_t *)space.get_read_ptr(m_lcd.vramaddr_cur); } else { @@ -385,8 +385,8 @@ void s3c44b0_device::lcd_dma_read(int count, UINT8 *data) void s3c44b0_device::lcd_render_stn_04() { - UINT8 *bitmap = m_lcd.bitmap.get() + ((m_lcd.vpos - m_lcd.vpos_min) * (m_lcd.hpos_max - m_lcd.hpos_min + 1)) + (m_lcd.hpos - m_lcd.hpos_min); - UINT8 data[16]; + uint8_t *bitmap = m_lcd.bitmap.get() + ((m_lcd.vpos - m_lcd.vpos_min) * (m_lcd.hpos_max - m_lcd.hpos_min + 1)) + (m_lcd.hpos - m_lcd.hpos_min); + uint8_t data[16]; lcd_dma_read(16, data); for (auto & elem : data) { @@ -411,12 +411,12 @@ void s3c44b0_device::lcd_render_stn_04() void s3c44b0_device::lcd_render_stn_08() { - UINT8 *bitmap = m_lcd.bitmap.get() + ((m_lcd.vpos - m_lcd.vpos_min) * (m_lcd.hpos_max - m_lcd.hpos_min + 1)) + (m_lcd.hpos - m_lcd.hpos_min); - UINT8 data[16]; + uint8_t *bitmap = m_lcd.bitmap.get() + ((m_lcd.vpos - m_lcd.vpos_min) * (m_lcd.hpos_max - m_lcd.hpos_min + 1)) + (m_lcd.hpos - m_lcd.hpos_min); + uint8_t data[16]; lcd_dma_read(16, data); for (auto & elem : data) { - UINT8 xxx[3]; + uint8_t xxx[3]; xxx[0] = lcd_get_color_stn_08_r(elem); xxx[1] = lcd_get_color_stn_08_g(elem); xxx[2] = lcd_get_color_stn_08_b(elem); @@ -499,7 +499,7 @@ void s3c44b0_device::video_start() // do nothing } -UINT32 s3c44b0_device::video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t s3c44b0_device::video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { if (m_lcd.regs.lcdcon1 & (1 << 0)) { @@ -507,8 +507,8 @@ UINT32 s3c44b0_device::video_update(screen_device &screen, bitmap_rgb32 &bitmap, { for (int y = 0; y < screen.height(); y++) { - UINT32 *scanline = &bitmap.pix32(y); - UINT8 *vram = m_lcd.bitmap.get() + y * (m_lcd.hpos_max - m_lcd.hpos_min + 1); + uint32_t *scanline = &bitmap.pix32(y); + uint8_t *vram = m_lcd.bitmap.get() + y * (m_lcd.hpos_max - m_lcd.hpos_min + 1); for (int x = 0; x < screen.width(); x++) { *scanline++ = rgb_t(vram[0], vram[1], vram[2]); @@ -521,7 +521,7 @@ UINT32 s3c44b0_device::video_update(screen_device &screen, bitmap_rgb32 &bitmap, { for (int y = 0; y < screen.height(); y++) { - UINT32 *scanline = &bitmap.pix32(y); + uint32_t *scanline = &bitmap.pix32(y); memset(scanline, 0, screen.width() * 4); } } @@ -530,7 +530,7 @@ UINT32 s3c44b0_device::video_update(screen_device &screen, bitmap_rgb32 &bitmap, READ32_MEMBER( s3c44b0_device::lcd_r ) { - UINT32 data = ((UINT32*)&m_lcd.regs)[offset]; + uint32_t data = ((uint32_t*)&m_lcd.regs)[offset]; switch (offset) { case S3C44B0_LCDCON1 : @@ -596,7 +596,7 @@ void s3c44b0_device::lcd_configure() { m_lcd.bitmap = nullptr; } - m_lcd.bitmap = std::make_unique((m_lcd.hpos_max - m_lcd.hpos_min + 1) * (m_lcd.vpos_max - m_lcd.vpos_min + 1) * 3); + m_lcd.bitmap = std::make_unique((m_lcd.hpos_max - m_lcd.hpos_min + 1) * (m_lcd.vpos_max - m_lcd.vpos_min + 1) * 3); m_lcd.frame_period = HZ_TO_ATTOSECONDS(m_lcd.framerate); m_lcd.scantime = m_lcd.frame_period / m_lcd.vpos_end; m_lcd.pixeltime = m_lcd.frame_period / (m_lcd.vpos_end * m_lcd.hpos_end); @@ -635,9 +635,9 @@ void s3c44b0_device::lcd_recalc() WRITE32_MEMBER( s3c44b0_device::lcd_w ) { - UINT32 old_value = ((UINT32*)&m_lcd.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_lcd.regs)[offset]; // verboselog( *this, 9, "(LCD) %08X <- %08X\n", S3C44B0_BASE_LCD + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_lcd.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_lcd.regs)[offset]); switch (offset) { case S3C44B0_LCDCON1 : @@ -654,19 +654,19 @@ WRITE32_MEMBER( s3c44b0_device::lcd_w ) /* Clock & Power Management */ -UINT32 s3c44b0_device::get_mclk() +uint32_t s3c44b0_device::get_mclk() { - UINT32 data, mdiv, pdiv, sdiv; + uint32_t data, mdiv, pdiv, sdiv; data = m_clkpow.regs.pllcon; mdiv = BITS(data, 19, 12); pdiv = BITS(data, 9, 4); sdiv = BITS(data, 1, 0); - return (UINT32)((double)((mdiv + 8) * clock()) / (double)((pdiv + 2) * (1 << sdiv))); + return (uint32_t)((double)((mdiv + 8) * clock()) / (double)((pdiv + 2) * (1 << sdiv))); } READ32_MEMBER( s3c44b0_device::clkpow_r ) { - UINT32 data = ((UINT32*)&m_clkpow.regs)[offset]; + uint32_t data = ((uint32_t*)&m_clkpow.regs)[offset]; verboselog( *this, 9, "(CLKPOW) %08X -> %08X\n", S3C44B0_BASE_CLKPOW + (offset << 2), data); return data; } @@ -674,7 +674,7 @@ READ32_MEMBER( s3c44b0_device::clkpow_r ) WRITE32_MEMBER( s3c44b0_device::clkpow_w ) { verboselog( *this, 9, "(CLKPOW) %08X <- %08X\n", S3C44B0_BASE_CLKPOW + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_clkpow.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_clkpow.regs)[offset]); switch (offset) { case S3C44B0_PLLCON : @@ -699,11 +699,11 @@ WRITE32_MEMBER( s3c44b0_device::clkpow_w ) void s3c44b0_device::check_pending_irq() { // normal irq - UINT32 temp = (m_irq.regs.intpnd & ~m_irq.regs.intmsk) & ~m_irq.regs.intmod; + uint32_t temp = (m_irq.regs.intpnd & ~m_irq.regs.intmsk) & ~m_irq.regs.intmod; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; while ((temp & 1) == 0) { int_type++; @@ -728,7 +728,7 @@ void s3c44b0_device::check_pending_irq() temp = (m_irq.regs.intpnd & ~m_irq.regs.intmsk) & m_irq.regs.intmod; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; while ((temp & 1) == 0) { int_type++; @@ -750,7 +750,7 @@ void s3c44b0_device::check_pending_irq() } } -void s3c44b0_device::request_irq(UINT32 int_type) +void s3c44b0_device::request_irq(uint32_t int_type) { verboselog( *this, 5, "request irq %d\n", int_type); m_irq.regs.intpnd |= (1 << int_type); @@ -759,10 +759,10 @@ void s3c44b0_device::request_irq(UINT32 int_type) void s3c44b0_device::check_pending_eint() { - UINT32 temp = m_gpio.regs.extintpnd; + uint32_t temp = m_gpio.regs.extintpnd; if (temp != 0) { - UINT32 int_type = 0; + uint32_t int_type = 0; while ((temp & 1) == 0) { int_type++; @@ -772,7 +772,7 @@ void s3c44b0_device::check_pending_eint() } } -void s3c44b0_device::request_eint(UINT32 number) +void s3c44b0_device::request_eint(uint32_t number) { verboselog( *this, 5, "request external interrupt %d\n", number); if (number < 4) @@ -788,7 +788,7 @@ void s3c44b0_device::request_eint(UINT32 number) READ32_MEMBER( s3c44b0_device::irq_r ) { - UINT32 data = ((UINT32*)&m_irq.regs)[offset]; + uint32_t data = ((uint32_t*)&m_irq.regs)[offset]; verboselog( *this, 9, "(IRQ) %08X -> %08X\n", S3C44B0_BASE_INT + (offset << 2), data); return data; } @@ -796,7 +796,7 @@ READ32_MEMBER( s3c44b0_device::irq_r ) WRITE32_MEMBER( s3c44b0_device::irq_w ) { verboselog( *this, 9, "(IRQ) %08X <- %08X\n", S3C44B0_BASE_INT + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_irq.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_irq.regs)[offset]); switch (offset) { case S3C44B0_INTMSK : @@ -822,10 +822,10 @@ WRITE32_MEMBER( s3c44b0_device::irq_w ) /* PWM Timer */ -UINT16 s3c44b0_device::pwm_calc_observation(int ch) +uint16_t s3c44b0_device::pwm_calc_observation(int ch) { double timeleft, x1, x2; - UINT32 cnto; + uint32_t cnto; timeleft = (m_pwm.timer[ch]->remaining()).as_double(); // printf( "timeleft %f freq %d cntb %d cmpb %d\n", timeleft, m_pwm.freq[ch], m_pwm.cnt[ch], m_pwm.cmp[ch]); x1 = 1 / ((double)m_pwm.freq[ch] / (m_pwm.cnt[ch]- m_pwm.cmp[ch] + 1)); @@ -838,7 +838,7 @@ UINT16 s3c44b0_device::pwm_calc_observation(int ch) READ32_MEMBER( s3c44b0_device::pwm_r ) { - UINT32 data = ((UINT32*)&m_pwm.regs)[offset]; + uint32_t data = ((uint32_t*)&m_pwm.regs)[offset]; switch (offset) { case S3C44B0_TCNTO0 : @@ -881,7 +881,7 @@ void s3c44b0_device::pwm_start(int timer) const int mux_table[] = { 2, 4, 8, 16}; const int prescaler_shift[] = { 0, 0, 8, 8, 16, 16}; const int mux_shift[] = { 0, 4, 8, 12, 16, 20}; - UINT32 mclk, prescaler, mux, cnt, cmp, auto_reload; + uint32_t mclk, prescaler, mux, cnt, cmp, auto_reload; double freq, hz; verboselog( *this, 1, "PWM %d start\n", timer); mclk = get_mclk(); @@ -993,9 +993,9 @@ void s3c44b0_device::pwm_recalc(int timer) WRITE32_MEMBER( s3c44b0_device::pwm_w ) { - UINT32 old_value = ((UINT32*)&m_pwm.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_pwm.regs)[offset]; verboselog( *this, 9, "(PWM) %08X <- %08X\n", S3C44B0_BASE_PWM + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_pwm.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_pwm.regs)[offset]); switch (offset) { case S3C44B0_TCON : @@ -1084,9 +1084,9 @@ void s3c44b0_device::i2c_send_stop() iface_i2c_scl_w(0); } -UINT8 s3c44b0_device::i2c_receive_byte(int ack) +uint8_t s3c44b0_device::i2c_receive_byte(int ack) { - UINT8 data = 0; + uint8_t data = 0; verboselog( *this, 5, "i2c_receive_byte ...\n"); iface_i2c_sda_w(1); for (int i = 0; i < 8; i++) @@ -1103,7 +1103,7 @@ UINT8 s3c44b0_device::i2c_receive_byte(int ack) return data; } -int s3c44b0_device::i2c_send_byte(UINT8 data) +int s3c44b0_device::i2c_send_byte(uint8_t data) { int ack; verboselog( *this, 5, "i2c_send_byte ...\n"); @@ -1159,7 +1159,7 @@ void s3c44b0_device::iic_resume() READ32_MEMBER( s3c44b0_device::iic_r ) { - UINT32 data = ((UINT32*)&m_iic.regs)[offset]; + uint32_t data = ((uint32_t*)&m_iic.regs)[offset]; switch (offset) { case S3C44B0_IICSTAT : @@ -1174,9 +1174,9 @@ READ32_MEMBER( s3c44b0_device::iic_r ) WRITE32_MEMBER( s3c44b0_device::iic_w ) { - UINT32 old_value = ((UINT32*)&m_iic.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_iic.regs)[offset]; verboselog( *this, 9, "(IIC) %08X <- %08X\n", S3C44B0_BASE_IIC + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_iic.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_iic.regs)[offset]); switch (offset) { case S3C44B0_IICCON : @@ -1268,7 +1268,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::iic_timer_exp ) /* I/O Port */ -inline UINT32 s3c44b0_device::iface_gpio_port_r(int port) +inline uint32_t s3c44b0_device::iface_gpio_port_r(int port) { if (!m_port_r_cb.isnull()) return (m_port_r_cb)(port); @@ -1276,7 +1276,7 @@ inline UINT32 s3c44b0_device::iface_gpio_port_r(int port) return 0; } -inline void s3c44b0_device::iface_gpio_port_w(int port, UINT32 data) +inline void s3c44b0_device::iface_gpio_port_w(int port, uint32_t data) { if (!m_port_w_cb.isnull()) (m_port_w_cb)(port, data, 0xffff); @@ -1284,7 +1284,7 @@ inline void s3c44b0_device::iface_gpio_port_w(int port, UINT32 data) READ32_MEMBER( s3c44b0_device::gpio_r ) { - UINT32 data = ((UINT32*)&m_gpio.regs)[offset]; + uint32_t data = ((uint32_t*)&m_gpio.regs)[offset]; switch (offset) { case S3C44B0_GPADAT : @@ -1329,9 +1329,9 @@ READ32_MEMBER( s3c44b0_device::gpio_r ) WRITE32_MEMBER( s3c44b0_device::gpio_w ) { - UINT32 old_value = ((UINT32*)&m_gpio.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_gpio.regs)[offset]; verboselog( *this, 9, "(GPIO) %08X <- %08X\n", S3C44B0_BASE_GPIO + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_gpio.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_gpio.regs)[offset]); switch (offset) { case S3C44B0_GPADAT : @@ -1380,9 +1380,9 @@ WRITE32_MEMBER( s3c44b0_device::gpio_w ) /* UART */ -UINT32 s3c44b0_device::uart_r(int ch, UINT32 offset) +uint32_t s3c44b0_device::uart_r(int ch, uint32_t offset) { - UINT32 data = ((UINT32*)&m_uart[ch].regs)[offset]; + uint32_t data = ((uint32_t*)&m_uart[ch].regs)[offset]; switch (offset) { case S3C44B0_UTRSTAT : @@ -1392,7 +1392,7 @@ UINT32 s3c44b0_device::uart_r(int ch, UINT32 offset) break; case S3C44B0_URXH : { - UINT8 rxdata = data & 0xFF; + uint8_t rxdata = data & 0xFF; verboselog( *this, 5, "UART %d read %02X (%c)\n", ch, rxdata, ((rxdata >= 32) && (rxdata < 128)) ? (char)rxdata : '?'); m_uart[ch].regs.utrstat &= ~1; // [bit 0] Receive buffer data ready } @@ -1401,14 +1401,14 @@ UINT32 s3c44b0_device::uart_r(int ch, UINT32 offset) return data; } -void s3c44b0_device::uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +void s3c44b0_device::uart_w(int ch, uint32_t offset, uint32_t data, uint32_t mem_mask) { - COMBINE_DATA(&((UINT32*)&m_uart[ch].regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_uart[ch].regs)[offset]); switch (offset) { case S3C44B0_UTXH : { - UINT8 txdata = data & 0xFF; + uint8_t txdata = data & 0xFF; verboselog( *this, 5, "UART %d write %02X (%c)\n", ch, txdata, ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); #ifdef UART_PRINTF printf( "%c", ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); @@ -1417,7 +1417,7 @@ void s3c44b0_device::uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) break; case S3C44B0_UBRDIV : { - UINT32 mclk, hz; + uint32_t mclk, hz; mclk = get_mclk(); hz = (mclk / (m_uart->regs.ubrdiv + 1)) / 16; verboselog( *this, 5, "UART %d - mclk %08X hz %08X\n", ch, mclk, hz); @@ -1429,14 +1429,14 @@ void s3c44b0_device::uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) READ32_MEMBER( s3c44b0_device::uart_0_r ) { - UINT32 data = uart_r(0, offset); + uint32_t data = uart_r(0, offset); // verboselog( *this, 9, "(UART 0) %08X -> %08X\n", S3C44B0_BASE_UART_0 + (offset << 2), data); return data; } READ32_MEMBER( s3c44b0_device::uart_1_r ) { - UINT32 data = uart_r(1, offset); + uint32_t data = uart_r(1, offset); // verboselog( *this, 9, "(UART 1) %08X -> %08X\n", S3C44B0_BASE_UART_1 + (offset << 2), data); return data; } @@ -1453,7 +1453,7 @@ WRITE32_MEMBER( s3c44b0_device::uart_1_w ) uart_w(1, offset, data, mem_mask); } -void s3c44b0_device::uart_fifo_w(int uart, UINT8 data) +void s3c44b0_device::uart_fifo_w(int uart, uint8_t data) { // printf("s3c44b0_uart_fifo_w (%c)\n", data); m_uart[uart].regs.urxh = data; @@ -1473,14 +1473,14 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::uart_timer_exp ) /* Watchdog Timer */ -UINT16 s3c44b0_device::wdt_calc_current_count() +uint16_t s3c44b0_device::wdt_calc_current_count() { return 0; } READ32_MEMBER( s3c44b0_device::wdt_r ) { - UINT32 data = ((UINT32*)&m_wdt.regs)[offset]; + uint32_t data = ((uint32_t*)&m_wdt.regs)[offset]; switch (offset) { case S3C44B0_WTCNT : @@ -1499,7 +1499,7 @@ READ32_MEMBER( s3c44b0_device::wdt_r ) void s3c44b0_device::wdt_start() { - UINT32 mclk, prescaler, clock; + uint32_t mclk, prescaler, clock; double freq, hz; verboselog( *this, 1, "WDT start\n"); mclk = get_mclk(); @@ -1528,9 +1528,9 @@ void s3c44b0_device::wdt_recalc() WRITE32_MEMBER( s3c44b0_device::wdt_w ) { - UINT32 old_value = ((UINT32*)&m_wdt.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_wdt.regs)[offset]; verboselog( *this, 9, "(WDT) %08X <- %08X\n", S3C44B0_BASE_WDT + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_wdt.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_wdt.regs)[offset]); switch (offset) { case S3C44B0_WTCON : @@ -1562,7 +1562,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::wdt_timer_exp ) READ32_MEMBER( s3c44b0_device::cpuwrap_r ) { - UINT32 data = ((UINT32*)&m_cpuwrap.regs)[offset]; + uint32_t data = ((uint32_t*)&m_cpuwrap.regs)[offset]; verboselog( *this, 9, "(CPUWRAP) %08X -> %08X\n", S3C44B0_BASE_CPU_WRAPPER + (offset << 2), data); return data; } @@ -1570,21 +1570,21 @@ READ32_MEMBER( s3c44b0_device::cpuwrap_r ) WRITE32_MEMBER( s3c44b0_device::cpuwrap_w ) { verboselog( *this, 9, "(CPUWRAP) %08X <- %08X\n", S3C44B0_BASE_CPU_WRAPPER + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_cpuwrap.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_cpuwrap.regs)[offset]); } /* A/D Converter */ READ32_MEMBER( s3c44b0_device::adc_r ) { - UINT32 data = ((UINT32*)&m_adc.regs)[offset]; + uint32_t data = ((uint32_t*)&m_adc.regs)[offset]; verboselog( *this, 9, "(ADC) %08X -> %08X\n", S3C44B0_BASE_ADC + (offset << 2), data); return data; } void s3c44b0_device::adc_start() { - UINT32 mclk, prescaler; + uint32_t mclk, prescaler; double freq, hz; verboselog( *this, 1, "ADC start\n"); mclk = get_mclk(); @@ -1611,9 +1611,9 @@ void s3c44b0_device::adc_recalc() WRITE32_MEMBER( s3c44b0_device::adc_w ) { - UINT32 old_value = ((UINT32*)&m_wdt.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_wdt.regs)[offset]; verboselog( *this, 9, "(ADC) %08X <- %08X\n", S3C44B0_BASE_ADC + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_adc.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_adc.regs)[offset]); switch (offset) { case S3C44B0_ADCCON : @@ -1639,14 +1639,14 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::adc_timer_exp ) READ32_MEMBER( s3c44b0_device::sio_r ) { - UINT32 data = ((UINT32*)&m_sio.regs)[offset]; + uint32_t data = ((uint32_t*)&m_sio.regs)[offset]; verboselog( *this, 9, "(SIO) %08X -> %08X\n", S3C44B0_BASE_SIO + (offset << 2), data); return data; } void s3c44b0_device::sio_start() { - UINT32 mclk, prescaler; + uint32_t mclk, prescaler; double freq, hz; verboselog( *this, 1, "SIO start\n"); mclk = get_mclk(); @@ -1675,9 +1675,9 @@ void s3c44b0_device::sio_recalc() WRITE32_MEMBER( s3c44b0_device::sio_w ) { - UINT32 old_value = ((UINT32*)&m_sio.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_sio.regs)[offset]; verboselog( *this, 9, "(SIO) %08X <- %08X\n", S3C44B0_BASE_SIO + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_sio.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_sio.regs)[offset]); switch (offset) { case S3C44B0_SIOCON : @@ -1706,7 +1706,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::sio_timer_exp ) /* IIS */ -inline void s3c44b0_device::iface_i2s_data_w(address_space &space, int ch, UINT16 data) +inline void s3c44b0_device::iface_i2s_data_w(address_space &space, int ch, uint16_t data) { if (!m_data_w_cb.isnull()) (m_data_w_cb)(ch, data, 0); @@ -1714,7 +1714,7 @@ inline void s3c44b0_device::iface_i2s_data_w(address_space &space, int ch, UINT1 void s3c44b0_device::iis_start() { - UINT32 mclk; + uint32_t mclk; int prescaler; double freq, hz; const int div[] = { 2, 4, 6, 8, 10, 12, 14, 16, 1, 0, 3, 0, 5, 0, 7, 0 }; @@ -1735,16 +1735,16 @@ void s3c44b0_device::iis_stop() READ32_MEMBER( s3c44b0_device::iis_r ) { - UINT32 data = ((UINT32*)&m_iis.regs)[offset]; + uint32_t data = ((uint32_t*)&m_iis.regs)[offset]; verboselog( *this, 9, "(IIS) %08X -> %08X\n", S3C44B0_BASE_IIS + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::iis_w ) { - UINT32 old_value = ((UINT32*)&m_iis.regs)[offset]; + uint32_t old_value = ((uint32_t*)&m_iis.regs)[offset]; verboselog( *this, 9, "(IIS) %08X <- %08X\n", S3C44B0_BASE_IIS + (offset << 2), data); - COMBINE_DATA(&((UINT32*)&m_iis.regs)[offset]); + COMBINE_DATA(&((uint32_t*)&m_iis.regs)[offset]); switch (offset) { case S3C44B0_IISCON : @@ -1797,7 +1797,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::iis_timer_exp ) void s3c44b0_device::zdma_trigger(int ch) { address_space &space = m_cpu->space(AS_PROGRAM); - UINT32 saddr, daddr; + uint32_t saddr, daddr; int dal, dst, opt, das, cnt; verboselog( *this, 5, "s3c44b0_zdma_trigger %d\n", ch); dst = BITS(m_zdma->regs.dcsrc, 31, 30); @@ -1853,16 +1853,16 @@ void s3c44b0_device::zdma_start(int ch) zdma_trigger(ch); } -UINT32 s3c44b0_device::zdma_r(int ch, UINT32 offset) +uint32_t s3c44b0_device::zdma_r(int ch, uint32_t offset) { - UINT32 data = ((UINT32*)&m_zdma[ch].regs)[offset]; + uint32_t data = ((uint32_t*)&m_zdma[ch].regs)[offset]; return data; } -void s3c44b0_device::zdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +void s3c44b0_device::zdma_w(int ch, uint32_t offset, uint32_t data, uint32_t mem_mask) { - UINT32 old_value = ((UINT32*)&m_zdma[ch].regs)[offset]; - COMBINE_DATA(&((UINT32*)&m_zdma[ch].regs)[offset]); + uint32_t old_value = ((uint32_t*)&m_zdma[ch].regs)[offset]; + COMBINE_DATA(&((uint32_t*)&m_zdma[ch].regs)[offset]); switch (offset) { case S3C44B0_DCON : @@ -1882,14 +1882,14 @@ void s3c44b0_device::zdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) READ32_MEMBER( s3c44b0_device::zdma_0_r ) { - UINT32 data = zdma_r(0, offset); + uint32_t data = zdma_r(0, offset); verboselog( *this, 9, "(ZDMA 0) %08X -> %08X\n", S3C44B0_BASE_ZDMA_0 + (offset << 2), data); return data; } READ32_MEMBER( s3c44b0_device::zdma_1_r ) { - UINT32 data = zdma_r(1, offset); + uint32_t data = zdma_r(1, offset); verboselog( *this, 9, "(ZDMA 1) %08X -> %08X\n", S3C44B0_BASE_ZDMA_1 + (offset << 2), data); return data; } @@ -1917,7 +1917,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::zdma_timer_exp ) void s3c44b0_device::bdma_trigger(int ch) { address_space &space = m_cpu->space(AS_PROGRAM); - UINT32 saddr, daddr; + uint32_t saddr, daddr; int dal, dst, tdm, das, cnt; verboselog( *this, 5, "s3c44b0_bdma_trigger %d\n", ch); dst = BITS(m_bdma->regs.dcsrc, 31, 30); @@ -1967,9 +1967,9 @@ void s3c44b0_device::bdma_request_iis() bdma_trigger(0); } -UINT32 s3c44b0_device::bdma_r(int ch, UINT32 offset) +uint32_t s3c44b0_device::bdma_r(int ch, uint32_t offset) { - UINT32 data = ((UINT32*)&m_bdma[ch].regs)[offset]; + uint32_t data = ((uint32_t*)&m_bdma[ch].regs)[offset]; return data; } @@ -1996,10 +1996,10 @@ void s3c44b0_device::bdma_stop(int ch) m_bdma[ch].timer->adjust(attotime::never, ch); } -void s3c44b0_device::bdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +void s3c44b0_device::bdma_w(int ch, uint32_t offset, uint32_t data, uint32_t mem_mask) { - UINT32 old_value = ((UINT32*)&m_bdma[ch].regs)[offset]; - COMBINE_DATA(&((UINT32*)&m_bdma[ch].regs)[offset]); + uint32_t old_value = ((uint32_t*)&m_bdma[ch].regs)[offset]; + COMBINE_DATA(&((uint32_t*)&m_bdma[ch].regs)[offset]); switch (offset) { case S3C44B0_DICNT : @@ -2022,14 +2022,14 @@ void s3c44b0_device::bdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) READ32_MEMBER( s3c44b0_device::bdma_0_r ) { - UINT32 data = bdma_r(0, offset); + uint32_t data = bdma_r(0, offset); verboselog( *this, 9, "(BDMA 0) %08X -> %08X\n", S3C44B0_BASE_BDMA_0 + (offset << 2), data); return data; } READ32_MEMBER( s3c44b0_device::bdma_1_r ) { - UINT32 data = bdma_r(1, offset); + uint32_t data = bdma_r(1, offset); verboselog( *this, 9, "(BDMA 1) %08X -> %08X\n", S3C44B0_BASE_BDMA_1 + (offset << 2), data); return data; } diff --git a/src/devices/machine/s3c44b0.h b/src/devices/machine/s3c44b0.h index 05b0c134532..116aa1843a5 100644 --- a/src/devices/machine/s3c44b0.h +++ b/src/devices/machine/s3c44b0.h @@ -286,192 +286,192 @@ struct s3c44b0_memcon_regs_t { - UINT32 data[0x34/4]; + uint32_t data[0x34/4]; }; struct s3c44b0_irq_regs_t { - UINT32 intcon; - UINT32 intpnd; - UINT32 intmod; - UINT32 intmsk; - UINT32 i_pslv; - UINT32 i_pmst; - UINT32 i_cslv; - UINT32 i_cmst; - UINT32 i_ispr; - UINT32 i_ispc; - UINT32 reserved[4]; - UINT32 f_ispr; - UINT32 f_ispc; + uint32_t intcon; + uint32_t intpnd; + uint32_t intmod; + uint32_t intmsk; + uint32_t i_pslv; + uint32_t i_pmst; + uint32_t i_cslv; + uint32_t i_cmst; + uint32_t i_ispr; + uint32_t i_ispc; + uint32_t reserved[4]; + uint32_t f_ispr; + uint32_t f_ispc; }; struct s3c44b0_dma_regs_t { - UINT32 dcon; - UINT32 disrc; - UINT32 didst; - UINT32 dicnt; - UINT32 dcsrc; - UINT32 dcdst; - UINT32 dccnt; + uint32_t dcon; + uint32_t disrc; + uint32_t didst; + uint32_t dicnt; + uint32_t dcsrc; + uint32_t dcdst; + uint32_t dccnt; }; struct s3c44b0_clkpow_regs_t { - UINT32 pllcon; - UINT32 clkcon; - UINT32 clkslow; - UINT32 locktime; + uint32_t pllcon; + uint32_t clkcon; + uint32_t clkslow; + uint32_t locktime; }; struct s3c44b0_lcd_regs_t { - UINT32 lcdcon1; - UINT32 lcdcon2; - UINT32 lcdsaddr1; - UINT32 lcdsaddr2; - UINT32 lcdsaddr3; - UINT32 redlut; - UINT32 greenlut; - UINT32 bluelut; - UINT32 reserved[8]; - UINT32 lcdcon3; - UINT32 dithmode; + uint32_t lcdcon1; + uint32_t lcdcon2; + uint32_t lcdsaddr1; + uint32_t lcdsaddr2; + uint32_t lcdsaddr3; + uint32_t redlut; + uint32_t greenlut; + uint32_t bluelut; + uint32_t reserved[8]; + uint32_t lcdcon3; + uint32_t dithmode; }; struct s3c44b0_uart_regs_t { - UINT32 ulcon; - UINT32 ucon; - UINT32 ufcon; - UINT32 umcon; - UINT32 utrstat; - UINT32 uerstat; - UINT32 ufstat; - UINT32 umstat; - UINT32 utxh; - UINT32 urxh; - UINT32 ubrdiv; + uint32_t ulcon; + uint32_t ucon; + uint32_t ufcon; + uint32_t umcon; + uint32_t utrstat; + uint32_t uerstat; + uint32_t ufstat; + uint32_t umstat; + uint32_t utxh; + uint32_t urxh; + uint32_t ubrdiv; }; struct s3c44b0_sio_regs_t { - UINT32 siocon; - UINT32 siodat; - UINT32 sbrdr; - UINT32 itvcnt; - UINT32 dcntz; + uint32_t siocon; + uint32_t siodat; + uint32_t sbrdr; + uint32_t itvcnt; + uint32_t dcntz; }; struct s3c44b0_pwm_regs_t { - UINT32 tcfg0; - UINT32 tcfg1; - UINT32 tcon; - UINT32 tcntb0; - UINT32 tcmpb0; - UINT32 tcnto0; - UINT32 tcntb1; - UINT32 tcmpb1; - UINT32 tcnto1; - UINT32 tcntb2; - UINT32 tcmpb2; - UINT32 tcnto2; - UINT32 tcntb3; - UINT32 tcmpb3; - UINT32 tcnto3; - UINT32 tcntb4; - UINT32 tcmpb4; - UINT32 tcnto4; - UINT32 tcntb5; - UINT32 tcnto5; + uint32_t tcfg0; + uint32_t tcfg1; + uint32_t tcon; + uint32_t tcntb0; + uint32_t tcmpb0; + uint32_t tcnto0; + uint32_t tcntb1; + uint32_t tcmpb1; + uint32_t tcnto1; + uint32_t tcntb2; + uint32_t tcmpb2; + uint32_t tcnto2; + uint32_t tcntb3; + uint32_t tcmpb3; + uint32_t tcnto3; + uint32_t tcntb4; + uint32_t tcmpb4; + uint32_t tcnto4; + uint32_t tcntb5; + uint32_t tcnto5; }; struct s3c44b0_wdt_regs_t { - UINT32 wtcon; - UINT32 wtdat; - UINT32 wtcnt; + uint32_t wtcon; + uint32_t wtdat; + uint32_t wtcnt; }; struct s3c44b0_iic_regs_t { - UINT32 iiccon; - UINT32 iicstat; - UINT32 iicadd; - UINT32 iicds; + uint32_t iiccon; + uint32_t iicstat; + uint32_t iicadd; + uint32_t iicds; }; struct s3c44b0_iis_regs_t { - UINT32 iiscon; - UINT32 iismod; - UINT32 iispsr; - UINT32 iisfcon; - UINT32 iisfifo; + uint32_t iiscon; + uint32_t iismod; + uint32_t iispsr; + uint32_t iisfcon; + uint32_t iisfifo; }; struct s3c44b0_gpio_regs_t { - UINT32 gpacon; - UINT32 gpadat; - UINT32 gpbcon; - UINT32 gpbdat; - UINT32 gpccon; - UINT32 gpcdat; - UINT32 gpcup; - UINT32 gpdcon; - UINT32 gpddat; - UINT32 gpdup; - UINT32 gpecon; - UINT32 gpedat; - UINT32 gpeup; - UINT32 gpfcon; - UINT32 gpfdat; - UINT32 gpfup; - UINT32 gpgcon; - UINT32 gpgdat; - UINT32 gpgup; - UINT32 spucr; - UINT32 extint; - UINT32 extintpnd; + uint32_t gpacon; + uint32_t gpadat; + uint32_t gpbcon; + uint32_t gpbdat; + uint32_t gpccon; + uint32_t gpcdat; + uint32_t gpcup; + uint32_t gpdcon; + uint32_t gpddat; + uint32_t gpdup; + uint32_t gpecon; + uint32_t gpedat; + uint32_t gpeup; + uint32_t gpfcon; + uint32_t gpfdat; + uint32_t gpfup; + uint32_t gpgcon; + uint32_t gpgdat; + uint32_t gpgup; + uint32_t spucr; + uint32_t extint; + uint32_t extintpnd; }; struct s3c44b0_rtc_regs_t { - UINT32 rtccon; - UINT32 reserved[3]; - UINT32 rtcalm; - UINT32 almsec; - UINT32 almmin; - UINT32 almhour; - UINT32 almday; - UINT32 almmon; - UINT32 almyear; - UINT32 rtcrst; - UINT32 bcdsec; - UINT32 bcdmin; - UINT32 bcdhour; - UINT32 bcdday; - UINT32 bcddow; - UINT32 bcdmon; - UINT32 bcdyear; - UINT32 ticnt; + uint32_t rtccon; + uint32_t reserved[3]; + uint32_t rtcalm; + uint32_t almsec; + uint32_t almmin; + uint32_t almhour; + uint32_t almday; + uint32_t almmon; + uint32_t almyear; + uint32_t rtcrst; + uint32_t bcdsec; + uint32_t bcdmin; + uint32_t bcdhour; + uint32_t bcdday; + uint32_t bcddow; + uint32_t bcdmon; + uint32_t bcdyear; + uint32_t ticnt; }; struct s3c44b0_adc_regs_t { - UINT32 adccon; - UINT32 adcpsr; - UINT32 adcdat; + uint32_t adccon; + uint32_t adcpsr; + uint32_t adcdat; }; struct s3c44b0_cpuwrap_regs_t { - UINT32 syscfg; - UINT32 ncachbe0; - UINT32 ncachbe1; + uint32_t syscfg; + uint32_t ncachbe0; + uint32_t ncachbe1; }; struct s3c44b0_memcon_t @@ -505,17 +505,17 @@ struct s3c44b0_lcd_t { s3c44b0_lcd_regs_t regs; emu_timer *timer; - std::unique_ptr bitmap; - UINT32 vramaddr_cur; - UINT32 vramaddr_max; - UINT32 offsize; - UINT32 pagewidth_cur; - UINT32 pagewidth_max; - UINT32 modesel; - UINT32 bswp; + std::unique_ptr bitmap; + uint32_t vramaddr_cur; + uint32_t vramaddr_max; + uint32_t offsize; + uint32_t pagewidth_cur; + uint32_t pagewidth_max; + uint32_t modesel; + uint32_t bswp; int vpos, hpos; double framerate; - UINT32 hpos_min, hpos_max, hpos_end, vpos_min, vpos_max, vpos_end; + uint32_t hpos_min, hpos_max, hpos_end, vpos_min, vpos_max, vpos_end; attotime frame_time; attoseconds_t frame_period, pixeltime, scantime; }; @@ -536,9 +536,9 @@ struct s3c44b0_pwm_t { s3c44b0_pwm_regs_t regs; emu_timer *timer[6]; - UINT32 cnt[6]; - UINT32 cmp[6]; - UINT32 freq[6]; + uint32_t cnt[6]; + uint32_t cmp[6]; + uint32_t freq[6]; }; struct s3c44b0_wdt_t @@ -558,7 +558,7 @@ struct s3c44b0_iis_t { s3c44b0_iis_regs_t regs; emu_timer *timer; - UINT16 fifo[16/2]; + uint16_t fifo[16/2]; int fifo_index; }; @@ -600,7 +600,7 @@ enum class s3c44b0_device : public device_t { public: - s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~s3c44b0_device() {} template static devcb_base &set_gpio_port_r_callback(device_t &device, _Object object) { return downcast(device).m_port_r_cb.set_callback(object); } @@ -647,8 +647,8 @@ public: DECLARE_WRITE32_MEMBER(bdma_0_w); DECLARE_WRITE32_MEMBER(bdma_1_w); - void request_eint(UINT32 number); - UINT32 video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void request_eint(uint32_t number); + uint32_t video_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: // device-level overrides @@ -658,13 +658,13 @@ protected: private: // internal state // LCD Controller - rgb_t lcd_get_color_stn_04(UINT8 data); - UINT8 lcd_get_color_stn_08_r(UINT8 data); - UINT8 lcd_get_color_stn_08_g(UINT8 data); - UINT8 lcd_get_color_stn_08_b(UINT8 data); + rgb_t lcd_get_color_stn_04(uint8_t data); + uint8_t lcd_get_color_stn_08_r(uint8_t data); + uint8_t lcd_get_color_stn_08_g(uint8_t data); + uint8_t lcd_get_color_stn_08_b(uint8_t data); void lcd_dma_reload(); void lcd_dma_init(); - void lcd_dma_read(int count, UINT8 *data); + void lcd_dma_read(int count, uint8_t *data); void lcd_render_stn_04(); void lcd_render_stn_08(); attotime time_until_pos(int vpos, int hpos); @@ -678,15 +678,15 @@ private: TIMER_CALLBACK_MEMBER(lcd_timer_exp); // Clock & Power Management - UINT32 get_mclk(); + uint32_t get_mclk(); // Interrupt Controller void check_pending_irq(); - void request_irq(UINT32 int_type); + void request_irq(uint32_t int_type); void check_pending_eint(); // PWM Timer - UINT16 pwm_calc_observation(int ch); + uint16_t pwm_calc_observation(int ch); void pwm_start(int timer); void pwm_stop(int timer); void pwm_recalc(int timer); @@ -699,25 +699,25 @@ private: inline int iface_i2c_sda_r(); void i2c_send_start(); void i2c_send_stop(); - UINT8 i2c_receive_byte(int ack); - int i2c_send_byte(UINT8 data); + uint8_t i2c_receive_byte(int ack); + int i2c_send_byte(uint8_t data); void iic_start(); void iic_stop(); void iic_resume(); TIMER_CALLBACK_MEMBER(iic_timer_exp); // I/O Port - inline UINT32 iface_gpio_port_r(int port); - inline void iface_gpio_port_w(int port, UINT32 data); + inline uint32_t iface_gpio_port_r(int port); + inline void iface_gpio_port_w(int port, uint32_t data); // UART - UINT32 uart_r(int ch, UINT32 offset); - void uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask); - void uart_fifo_w(int uart, UINT8 data); + uint32_t uart_r(int ch, uint32_t offset); + void uart_w(int ch, uint32_t offset, uint32_t data, uint32_t mem_mask); + void uart_fifo_w(int uart, uint8_t data); TIMER_CALLBACK_MEMBER(uart_timer_exp); // Watchdog Timer - UINT16 wdt_calc_current_count(); + uint16_t wdt_calc_current_count(); void wdt_start(); void wdt_stop(); void wdt_recalc(); @@ -736,7 +736,7 @@ private: TIMER_CALLBACK_MEMBER(sio_timer_exp); // IIS - inline void iface_i2s_data_w(address_space &space, int ch, UINT16 data); + inline void iface_i2s_data_w(address_space &space, int ch, uint16_t data); void iis_start(); void iis_stop(); TIMER_CALLBACK_MEMBER(iis_timer_exp); @@ -744,17 +744,17 @@ private: // ZDMA void zdma_trigger(int ch); void zdma_start(int ch); - UINT32 zdma_r(int ch, UINT32 offset); - void zdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + uint32_t zdma_r(int ch, uint32_t offset); + void zdma_w(int ch, uint32_t offset, uint32_t data, uint32_t mem_mask); TIMER_CALLBACK_MEMBER(zdma_timer_exp); // BDMA void bdma_trigger(int ch); void bdma_request_iis(); - UINT32 bdma_r(int ch, UINT32 offset); + uint32_t bdma_r(int ch, uint32_t offset); void bdma_start(int ch); void bdma_stop(int ch); - void bdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask); + void bdma_w(int ch, uint32_t offset, uint32_t data, uint32_t mem_mask); TIMER_CALLBACK_MEMBER(bdma_timer_exp); cpu_device *m_cpu; diff --git a/src/devices/machine/scnxx562.cpp b/src/devices/machine/scnxx562.cpp index e47d895bcd4..becc64aa893 100644 --- a/src/devices/machine/scnxx562.cpp +++ b/src/devices/machine/scnxx562.cpp @@ -141,7 +141,7 @@ machine_config_constructor duscc_device::device_mconfig_additions() const //------------------------------------------------- // duscc_device - constructor //------------------------------------------------- -duscc_device::duscc_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) +duscc_device::duscc_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), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -175,7 +175,7 @@ duscc_device::duscc_device(const machine_config &mconfig, device_type type, cons elem = 0; } -duscc_device::duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +duscc_device::duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, DUSCC, "DUSCC", tag, owner, clock, "duscc", __FILE__), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -203,16 +203,16 @@ duscc_device::duscc_device(const machine_config &mconfig, const char *tag, devic elem = 0; } -duscc26562_device::duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +duscc26562_device::duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : duscc_device(mconfig, DUSCC26562, "DUSCC 26562", tag, owner, clock, TYPE_DUSCC26562, "duscc26562", __FILE__){ } -duscc26C562_device::duscc26C562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +duscc26C562_device::duscc26C562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : duscc_device(mconfig, DUSCC26C562, "DUSCC 26C562", tag, owner, clock, TYPE_DUSCC26C562, "duscc26C562", __FILE__){ } -duscc68562_device::duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +duscc68562_device::duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : duscc_device(mconfig, DUSCC68562, "DUSCC 68562", tag, owner, clock, TYPE_DUSCC68562, "duscc68562", __FILE__){ } -duscc68C562_device::duscc68C562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +duscc68C562_device::duscc68C562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : duscc_device(mconfig, DUSCC68C562, "DUSCC 68C562", tag, owner, clock, TYPE_DUSCC68C562, "duscc68C562", __FILE__){ } //------------------------------------------------- @@ -434,7 +434,7 @@ void duscc_device::reset_interrupts() check_interrupts(); } -UINT8 duscc_device::modify_vector(UINT8 vec, int index, UINT8 src) +uint8_t duscc_device::modify_vector(uint8_t vec, int index, uint8_t src) { /* Interrupt Vector Modification @@ -494,8 +494,8 @@ UINT8 duscc_device::modify_vector(UINT8 vec, int index, UINT8 src) //------------------------------------------------- void duscc_device::trigger_interrupt(int index, int state) { - UINT8 vector = m_ivr; - UINT8 source = 0; + uint8_t vector = m_ivr; + uint8_t source = 0; int priority_level = 0; LOGINT(("%s %s:%c %02x \n",FUNCNAME, tag(), 'A' + index, state)); @@ -550,7 +550,7 @@ WRITE8_MEMBER( duscc_device::write ) //************************************************************************** // DUSCC CHANNEL //************************************************************************** -duscc_channel::duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +duscc_channel::duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, DUSCC_CHANNEL, "DUSCC channel", tag, owner, clock, "duscc_channel", __FILE__), device_serial_interface(mconfig, *this), m_brg_rx_rate(0), @@ -871,13 +871,13 @@ void duscc_channel::device_timer(emu_timer &timer, device_timer_id id, int param mode, and if the TEOM on zero count or done control bit (TPR[4)) is asserted, the FIFOed send EOM command will be automatically asserted when the character which causes the count to go to zero is loaded into the transmit FIFO. */ -UINT8 duscc_channel::do_dusccreg_ctcr_r() +uint8_t duscc_channel::do_dusccreg_ctcr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_ctcr)); return m_ctcr; } -void duscc_channel::do_dusccreg_ctcr_w(UINT8 data) +void duscc_channel::do_dusccreg_ctcr_w(uint8_t data) { LOG(("%s(%02x) - not supported yet\n", FUNCNAME, data)); m_ctcr = data; @@ -889,16 +889,16 @@ void duscc_channel::do_dusccreg_ctcr_w(UINT8 data) from preset regsiter command or when.the counter/timer reaches zero count and the zero detect control bit (CTCR[6]) is negated. The minimum 16-bit counter/timer preset value is H'0002'. */ -UINT8 duscc_channel::do_dusccreg_ctprh_r() +uint8_t duscc_channel::do_dusccreg_ctprh_r() { - UINT8 ret = ((m_ctpr >> 8) & 0xff ); + uint8_t ret = ((m_ctpr >> 8) & 0xff ); LOG(("%s(%02x)\n", FUNCNAME, ret)); // return m_ctprh; return ret; } -void duscc_channel::do_dusccreg_ctprh_w(UINT8 data) +void duscc_channel::do_dusccreg_ctprh_w(uint8_t data) { LOG(("%s(%02x) - not supported yet\n", FUNCNAME, data)); // m_ctprh = data; @@ -912,15 +912,15 @@ void duscc_channel::do_dusccreg_ctprh_w(UINT8 data) from preset register command or when the counter/timer reaches zero count and the zero detect control bit (CTCR[6]) is negated. The minimum 16-bit counter/timer preset value is H'0002'. */ -UINT8 duscc_channel::do_dusccreg_ctprl_r() +uint8_t duscc_channel::do_dusccreg_ctprl_r() { - UINT8 ret = (m_ctpr & 0xff); + uint8_t ret = (m_ctpr & 0xff); LOG(("%s(%02x)\n", FUNCNAME, ret)); // return m_ctprl; return ret; } -void duscc_channel::do_dusccreg_ctprl_w(UINT8 data) +void duscc_channel::do_dusccreg_ctprl_w(uint8_t data) { LOG(("%s(%02x) - not supported yet\n", FUNCNAME, data)); // m_ctprl = data; @@ -935,9 +935,9 @@ void duscc_channel::do_dusccreg_ctprl_w(UINT8 data) the read being performed while the CIT is changing. This count may be continued after the register is read. */ -UINT8 duscc_channel::do_dusccreg_cth_r() +uint8_t duscc_channel::do_dusccreg_cth_r() { - UINT8 ret = ((m_ct >> 8) & 0xff ); + uint8_t ret = ((m_ct >> 8) & 0xff ); LOG(("%s(%02x)\n", FUNCNAME, ret)); return ret; @@ -949,9 +949,9 @@ UINT8 duscc_channel::do_dusccreg_cth_r() recommended that the CIT be stopped via a stop counter command before it is read, in order to prevent errors which may occur due to the read being performed while the CIT is changing. This count may be continued after the register is read. */ -UINT8 duscc_channel::do_dusccreg_ctl_r() +uint8_t duscc_channel::do_dusccreg_ctl_r() { - UINT8 ret = (m_ct & 0xff); + uint8_t ret = (m_ct & 0xff); LOG(("%s(%02x)\n", FUNCNAME, ret)); // return m_ctl; return ret; @@ -1029,7 +1029,7 @@ void duscc_channel::rcv_callback() void duscc_channel::rcv_complete() { - UINT8 data; + uint8_t data; receive_register_extract(); data = get_received_char(); @@ -1166,61 +1166,61 @@ int duscc_channel::get_tx_word_length() // register read methods - see correspondning write method for details on each register -UINT8 duscc_channel::do_dusccreg_cmr1_r() +uint8_t duscc_channel::do_dusccreg_cmr1_r() { LOG(("%s(%02x)\n", FUNCNAME, m_cmr1)); return m_cmr1; } -UINT8 duscc_channel::do_dusccreg_cmr2_r() +uint8_t duscc_channel::do_dusccreg_cmr2_r() { LOG(("%s(%02x)\n", FUNCNAME, m_cmr2)); return m_cmr2; } -UINT8 duscc_channel::do_dusccreg_s1r_r() +uint8_t duscc_channel::do_dusccreg_s1r_r() { LOG(("%s(%02x)\n", FUNCNAME, m_s1r)); return m_s1r; } -UINT8 duscc_channel::do_dusccreg_s2r_r() +uint8_t duscc_channel::do_dusccreg_s2r_r() { LOG(("%s(%02x)\n", FUNCNAME, m_s2r)); return m_s2r; } -UINT8 duscc_channel::do_dusccreg_tpr_r() +uint8_t duscc_channel::do_dusccreg_tpr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_tpr)); return m_tpr; } -UINT8 duscc_channel::do_dusccreg_ttr_r() +uint8_t duscc_channel::do_dusccreg_ttr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_ttr)); return m_ttr; } -UINT8 duscc_channel::do_dusccreg_rpr_r() +uint8_t duscc_channel::do_dusccreg_rpr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_rpr)); return m_rpr; } -UINT8 duscc_channel::do_dusccreg_rtr_r() +uint8_t duscc_channel::do_dusccreg_rtr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_rtr)); return m_rtr; } -UINT8 duscc_channel::do_dusccreg_omr_r() +uint8_t duscc_channel::do_dusccreg_omr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_omr)); return m_omr; } -UINT8 duscc_channel::do_dusccreg_pcr_r() +uint8_t duscc_channel::do_dusccreg_pcr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_pcr)); return m_pcr; @@ -1228,15 +1228,15 @@ UINT8 duscc_channel::do_dusccreg_pcr_r() /* Commands to the DUSCC are entered through the channel command register.A read of this register returns the last invoked command (with bits 4 and 5 set to 1). */ -UINT8 duscc_channel::do_dusccreg_ccr_r() +uint8_t duscc_channel::do_dusccreg_ccr_r() { LOG(("%s\n", FUNCNAME)); - return (UINT8) m_ccr | 1 << 4 | 1 << 5; + return (uint8_t) m_ccr | 1 << 4 | 1 << 5; } -UINT8 duscc_channel::do_dusccreg_rxfifo_r() +uint8_t duscc_channel::do_dusccreg_rxfifo_r() { - UINT8 data = 0; + uint8_t data = 0; LOGINT(("%s\n", FUNCNAME)); LOGRX((" - RX rp:%d wp:%d sz:%d\n", m_rx_fifo_rp, m_rx_fifo_wp, m_rx_fifo_sz)); @@ -1256,25 +1256,25 @@ UINT8 duscc_channel::do_dusccreg_rxfifo_r() LOGINT(("- RX FIFO empty despite RxREADY\n")); } - return (UINT8) data; + return (uint8_t) data; } -UINT8 duscc_channel::do_dusccreg_rsr_r() +uint8_t duscc_channel::do_dusccreg_rsr_r() { LOG(("%s: %02x\n", FUNCNAME, m_rsr)); - return (UINT8) m_rsr; + return (uint8_t) m_rsr; } -UINT8 duscc_channel::do_dusccreg_trsr_r() +uint8_t duscc_channel::do_dusccreg_trsr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_trsr)); return m_trsr; } -UINT8 duscc_channel::do_dusccreg_ictsr_r() +uint8_t duscc_channel::do_dusccreg_ictsr_r() { logerror("%s is not implemented yet\n", FUNCNAME); - return (UINT8) m_ictsr; + return (uint8_t) m_ictsr; } /* General Status Register (GSR) @@ -1298,21 +1298,21 @@ UINT8 duscc_channel::do_dusccreg_ictsr_r() FIFO to be read by the CPU. See description of OMR[3]. RxRDY is initially reset (negated) by a chip reset or when a 'reset Channel A receiver' command is invoked. */ -UINT8 duscc_channel::do_dusccreg_gsr_r() +uint8_t duscc_channel::do_dusccreg_gsr_r() { - static UINT8 old_gsr = 0; + static uint8_t old_gsr = 0; if (m_uart->m_gsr != old_gsr) LOG(("%s <- %02x\n", FUNCNAME, m_uart->m_gsr)); old_gsr = m_uart->m_gsr; return m_uart->m_gsr; } -UINT8 duscc_channel::do_dusccreg_ier_r() +uint8_t duscc_channel::do_dusccreg_ier_r() { LOGINT(("%s <- %02x\n", FUNCNAME, m_ier)); - return (UINT8) m_ier; + return (uint8_t) m_ier; } -UINT8 duscc_channel::do_dusccreg_cid_r() +uint8_t duscc_channel::do_dusccreg_cid_r() { LOG(("%s\n", FUNCNAME)); if ( m_uart->m_variant != SET_CMOS ) @@ -1329,7 +1329,7 @@ UINT8 duscc_channel::do_dusccreg_cid_r() return m_cid; } -UINT8 duscc_channel::do_dusccreg_ivr_ivrm_r() +uint8_t duscc_channel::do_dusccreg_ivr_ivrm_r() { LOG(("%s", FUNCNAME)); if ( m_index == duscc_device::CHANNEL_A ) @@ -1344,61 +1344,61 @@ UINT8 duscc_channel::do_dusccreg_ivr_ivrm_r() } } -UINT8 duscc_channel::do_dusccreg_icr_r() +uint8_t duscc_channel::do_dusccreg_icr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_uart->m_icr)); return m_uart->m_icr; } -UINT8 duscc_channel::do_dusccreg_mrr_r() +uint8_t duscc_channel::do_dusccreg_mrr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_mrr)); return m_mrr; } -UINT8 duscc_channel::do_dusccreg_ier1_r() +uint8_t duscc_channel::do_dusccreg_ier1_r() { LOG(("%s(%02x)\n", FUNCNAME, m_ier1)); return m_ier1; } -UINT8 duscc_channel::do_dusccreg_ier2_r() +uint8_t duscc_channel::do_dusccreg_ier2_r() { LOG(("%s(%02x)\n", FUNCNAME, m_ier2)); return m_ier2; } -UINT8 duscc_channel::do_dusccreg_ier3_r() +uint8_t duscc_channel::do_dusccreg_ier3_r() { LOG(("%s(%02x)\n", FUNCNAME, m_ier3)); return m_ier3; } -UINT8 duscc_channel::do_dusccreg_trcr_r() +uint8_t duscc_channel::do_dusccreg_trcr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_trcr)); return m_trcr; } -UINT8 duscc_channel::do_dusccreg_rflr_r() +uint8_t duscc_channel::do_dusccreg_rflr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_rflr)); return m_rflr; } -UINT8 duscc_channel::do_dusccreg_ftlr_r() +uint8_t duscc_channel::do_dusccreg_ftlr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_ftlr)); return m_ftlr; } -UINT8 duscc_channel::do_dusccreg_trmsr_r() +uint8_t duscc_channel::do_dusccreg_trmsr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_trmsr)); return m_trmsr; } -UINT8 duscc_channel::do_dusccreg_telr_r() +uint8_t duscc_channel::do_dusccreg_telr_r() { LOG(("%s(%02x)\n", FUNCNAME, m_telr)); return m_telr; @@ -1462,7 +1462,7 @@ UINT8 duscc_channel::do_dusccreg_telr_r() This mode is required when the external sync mode is selected. 111 Asynchronous. Start/stop format. */ -void duscc_channel::do_dusccreg_cmr1_w(UINT8 data) +void duscc_channel::do_dusccreg_cmr1_w(uint8_t data) { LOG(("%s(%02x)\n", FUNCNAME, data)); m_cmr1 = data; @@ -1540,7 +1540,7 @@ void duscc_channel::do_dusccreg_cmr1_w(UINT8 data) 111 CRC-CCITT: Divisor ~ x16+x12+x5+1, dividend preset to ones. The TX sends the calculated CRC inverted. The RX indicates an error if the computed CRC is not equal to H' FOB8'. Not valid for ASYNC mode. */ -void duscc_channel::do_dusccreg_cmr2_w(UINT8 data) +void duscc_channel::do_dusccreg_cmr2_w(uint8_t data) { LOG(("%s(%02x)\n", FUNCNAME, data)); m_cmr2 = data; @@ -1560,7 +1560,7 @@ void duscc_channel::do_dusccreg_cmr2_w(UINT8 data) BOP primary mode or secondary modes where address comparisons are not made, such as when extended addressing is specified. TODO: Add check in receive_data and set status bits accordingly */ -void duscc_channel::do_dusccreg_s1r_w(UINT8 data) +void duscc_channel::do_dusccreg_s1r_w(uint8_t data) { LOG(("%s(%02x) - not supported yet\n", FUNCNAME, data)); m_s1r = data; @@ -1574,7 +1574,7 @@ void duscc_channel::do_dusccreg_s1r_w(UINT8 data) the register even if parity is specified in CMR1[4:3J. However, a character received w~ parity error, when parity is specified, will not match. If parity Is specified, then any unused bits in this register must be programmed to zeros. In BOP secondary mode using two address octets, it contains the partial address used to compare the second received address octet.*/ -void duscc_channel::do_dusccreg_s2r_w(UINT8 data) +void duscc_channel::do_dusccreg_s2r_w(uint8_t data) { LOG(("%s(%02x) - not supported yet\n", FUNCNAME, data)); m_s2r = data; @@ -1620,7 +1620,7 @@ void duscc_channel::do_dusccreg_s2r_w(UINT8 data) fields is always 8 bits, and the value of this field only applies to the information (I) field, except for the last character of the I field, whose length is specified by OMR[7:5). */ -void duscc_channel::do_dusccreg_tpr_w(UINT8 data) +void duscc_channel::do_dusccreg_tpr_w(uint8_t data) { LOG(("%s(%02x) Setting up Transmit Parameters\n", FUNCNAME, data)); m_tpr = data; @@ -1664,7 +1664,7 @@ void duscc_channel::do_dusccreg_tpr_w(UINT8 data) 0110 300 1110 19.2K 0111 600 1111 38.4K */ -void duscc_channel::do_dusccreg_ttr_w(UINT8 data) +void duscc_channel::do_dusccreg_ttr_w(uint8_t data) { LOG(("%s(%02x) Setting up Transmit Timing\n", FUNCNAME, data)); m_ttr = data; @@ -1763,7 +1763,7 @@ void duscc_channel::do_dusccreg_ttr_w(UINT8 data) of bits assembled for the last character of the l-field is less than the value programmed in this field, RCL not zero (RSR[O]) is asserted and the actual number of bits received is given in TRSR[2:0]. */ -void duscc_channel::do_dusccreg_rpr_w(UINT8 data) +void duscc_channel::do_dusccreg_rpr_w(uint8_t data) { LOG(("%s(%02x) Setting up Receiver Parameters\n", FUNCNAME, data)); m_rpr = data; @@ -1800,7 +1800,7 @@ void duscc_channel::do_dusccreg_rpr_w(UINT8 data) [3:0] Bit Rate Select- This field selects an output from the bit rate generator to be used by the receiver circuits. The actual frequency output from the BRG is 32X the bit rate shown in Table 5.*/ -void duscc_channel::do_dusccreg_rtr_w(UINT8 data) +void duscc_channel::do_dusccreg_rtr_w(uint8_t data) { LOG(("%s(%02x) Setting up Receiver Timing\n", FUNCNAME, data)); m_rtr = data; @@ -1866,7 +1866,7 @@ void duscc_channel::do_dusccreg_rtr_w(UINT8 data) [0] Request-to-Send Output - This bit controls the TxDRQN/GP02N/RTSN and SYNOUTN/RTSN pin, when either is used as a RTS output. The output is High when the bit is a 0 and is Low when the bit is a 1. */ -void duscc_channel::do_dusccreg_omr_w(UINT8 data) +void duscc_channel::do_dusccreg_omr_w(uint8_t data) { LOG(("%s(%02x) Output and Miscellaneous Register\n", FUNCNAME, data)); m_omr = data; @@ -1910,7 +1910,7 @@ void duscc_channel::do_dusccreg_omr_w(UINT8 data) 110 The pin is an output for the transmitter shift register clock. 111 The pin is an output for the receiver shift register clock. */ -void duscc_channel::do_dusccreg_pcr_w(UINT8 data) +void duscc_channel::do_dusccreg_pcr_w(uint8_t data) { LOG(("%c %s(%02x)\n", 'A' + m_index, FUNCNAME, data)); m_pcr = data; @@ -1951,7 +1951,7 @@ void duscc_channel::do_dusccreg_pcr_w(UINT8 data) * TODO: * - support enable/disable of Tx/Rx using m_tra/m_rcv respectivelly */ -void duscc_channel::do_dusccreg_ccr_w(UINT8 data) +void duscc_channel::do_dusccreg_ccr_w(uint8_t data) { int rate; @@ -2053,7 +2053,7 @@ void duscc_channel::do_dusccreg_ccr_w(UINT8 data) return; } -void duscc_channel::do_dusccreg_txfifo_w(UINT8 data) +void duscc_channel::do_dusccreg_txfifo_w(uint8_t data) { LOGTX((" - TX %s(%02x)'%c'\n", FUNCNAME,data, isalnum(data) ? data : ' ')); @@ -2112,21 +2112,21 @@ void duscc_channel::do_dusccreg_txfifo_w(UINT8 data) character by character or on a block basis. For character by character status, the SR bits should be read and then cleared before reading the character data from RxFIFO. For block status, the status register is initially cleared and then read after the message is received. Asserted status bits can be programmed to generate an interrupt (see Interrupt Enable Register).*/ -void duscc_channel::do_dusccreg_rsr_w(UINT8 data) +void duscc_channel::do_dusccreg_rsr_w(uint8_t data) { LOG(("%c %s(%02x)\n", 'A' + m_index, FUNCNAME, data)); m_rsr &= ~data; // Clear only bits which are 1:s return; } -void duscc_channel::do_dusccreg_trsr_w(UINT8 data) +void duscc_channel::do_dusccreg_trsr_w(uint8_t data) { LOG(("%s: %02x - not supported yet\n", FUNCNAME, data)); m_trsr = data; return; } -void duscc_channel::do_dusccreg_ictsr_w(UINT8 data) +void duscc_channel::do_dusccreg_ictsr_w(uint8_t data) { LOG(("%s: %02x - not supported yet\n", FUNCNAME, data)); m_ictsr = data; @@ -2152,7 +2152,7 @@ void duscc_channel::do_dusccreg_ictsr_w(UINT8 data) [0) Channel A Receiver Ready - The assertion of this bit indicates that one or more characters are available in the Channel A receiver FIFO to be read by the CPU. See description of OMR[3]. RxRDY is initially reset (negated) by a chip reset or when a 'reset Channel A receiver' command is invoked.*/ -void duscc_channel::do_dusccreg_gsr_w(UINT8 data) +void duscc_channel::do_dusccreg_gsr_w(uint8_t data) { LOG(("%c %s(%02x)\n", 'A' + m_index, FUNCNAME, data)); m_uart->m_gsr &= (data & REG_GSR_XXREADY_MASK); // Reset only XXREADY bits, the rest needs to be reset by the source @@ -2162,7 +2162,7 @@ void duscc_channel::do_dusccreg_gsr_w(UINT8 data) /* Interrupt Enable Register (IERA, IERB) This register controls whether the assertion of bits in the channel's status registers causes an interrupt to be generated. An additional condition for an interrupt to be generated is that the channel's master interrupt enabled bit, ICR[O] or ICR[1], be asserted.*/ -void duscc_channel::do_dusccreg_ier_w(UINT8 data) +void duscc_channel::do_dusccreg_ier_w(uint8_t data) { LOGINT(("%c %s(%02x)\n", 'A' + m_index, FUNCNAME, data)); if (REG_IER_DCD_CTS & (data ^ m_ier)) LOGINT(("- DCD/CTS interrups %s\n", (data & REG_IER_DCD_CTS) ? "enabled" : "disabled" )); @@ -2178,14 +2178,14 @@ void duscc_channel::do_dusccreg_ier_w(UINT8 data) return; } -void duscc_channel::do_dusccreg_ivr_w(UINT8 data) +void duscc_channel::do_dusccreg_ivr_w(uint8_t data) { m_uart->m_ivr = data; LOG(("%s(%02x)\n", FUNCNAME, data)); return; } -void duscc_channel::do_dusccreg_icr_w(UINT8 data) +void duscc_channel::do_dusccreg_icr_w(uint8_t data) { m_uart->m_icr = data; LOG(("%s(%02x)\n", FUNCNAME, data)); @@ -2198,7 +2198,7 @@ void duscc_channel::do_dusccreg_icr_w(UINT8 data) return; } -void duscc_channel::do_dusccreg_sea_rea_w(UINT8 data) +void duscc_channel::do_dusccreg_sea_rea_w(uint8_t data) { LOG(("%s(%02x)\n", FUNCNAME, data)); if ( m_uart->m_variant != SET_CMOS ) @@ -2214,20 +2214,20 @@ void duscc_channel::do_dusccreg_sea_rea_w(UINT8 data) return; } -void duscc_channel::do_dusccreg_mrr_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } -void duscc_channel::do_dusccreg_ier1_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } -void duscc_channel::do_dusccreg_ier2_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } -void duscc_channel::do_dusccreg_ier3_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } -void duscc_channel::do_dusccreg_trcr_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } -void duscc_channel::do_dusccreg_ftlr_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } -void duscc_channel::do_dusccreg_trmsr_w(UINT8 data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_mrr_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_ier1_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_ier2_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_ier3_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_trcr_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_ftlr_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } +void duscc_channel::do_dusccreg_trmsr_w(uint8_t data){ logerror("%s is not implemented yet\n", FUNCNAME); return; } //------------------------------------------------- // control_read - read register //------------------------------------------------- -UINT8 duscc_channel::read(offs_t &offset) +uint8_t duscc_channel::read(offs_t &offset) { - UINT8 data = 0; + uint8_t data = 0; int reg = (offset | m_a7) & ~0x20; // Add extended rgisters and remove the channel B bit from offset LOG(("\"%s\" %s: %c : Register read '%02x' <- [%02x]", m_owner->tag(), FUNCNAME, 'A' + m_index, data, reg )); LOGR((" * %c Reg %02x -> %02x \n", 'A' + m_index, reg, data)); @@ -2275,7 +2275,7 @@ UINT8 duscc_channel::read(offs_t &offset) // write - write register //------------------------------------------------- -void duscc_channel::write(UINT8 data, offs_t &offset) +void duscc_channel::write(uint8_t data, offs_t &offset) { int reg = (offset | m_a7) & ~0x20; // Add extended rgisters and remove the channel B bit from offset @@ -2328,10 +2328,10 @@ void duscc_channel::write(UINT8 data, offs_t &offset) } /* Get data from top of fifo data but restore read pointer in case of exit latch lock */ -UINT8 duscc_channel::m_rx_fifo_rp_data() +uint8_t duscc_channel::m_rx_fifo_rp_data() { - UINT8 data; - UINT8 old_rp = m_rx_fifo_rp; + uint8_t data; + uint8_t old_rp = m_rx_fifo_rp; m_rx_fifo_rp_step(); data = m_rx_data_fifo[m_rx_fifo_rp]; m_rx_fifo_rp = old_rp; @@ -2370,7 +2370,7 @@ void duscc_channel::m_tx_fifo_rp_step() // receive_data - receive data word into fifo //------------------------------------------------- -void duscc_channel::receive_data(UINT8 data) +void duscc_channel::receive_data(uint8_t data) { LOG(("\"%s\": %c : Receive Data Byte '%02x'\n", m_owner->tag(), 'A' + m_index, data)); diff --git a/src/devices/machine/scnxx562.h b/src/devices/machine/scnxx562.h index 4ae46c1a5f6..58e2a57fe75 100644 --- a/src/devices/machine/scnxx562.h +++ b/src/devices/machine/scnxx562.h @@ -129,7 +129,7 @@ class duscc_channel : public device_t, friend class duscc_device; public: - duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device-level overrides virtual void device_start() override; @@ -143,84 +143,84 @@ public: virtual void rcv_complete() override; // read register handlers - UINT8 do_dusccreg_cmr1_r(); - UINT8 do_dusccreg_cmr2_r(); - UINT8 do_dusccreg_s1r_r(); - UINT8 do_dusccreg_s2r_r(); - UINT8 do_dusccreg_tpr_r(); - UINT8 do_dusccreg_ttr_r(); - UINT8 do_dusccreg_rpr_r(); - UINT8 do_dusccreg_rtr_r(); - UINT8 do_dusccreg_ctprh_r(); - UINT8 do_dusccreg_ctprl_r(); - UINT8 do_dusccreg_ctcr_r(); - UINT8 do_dusccreg_omr_r(); - UINT8 do_dusccreg_cth_r(); - UINT8 do_dusccreg_ctl_r(); - UINT8 do_dusccreg_pcr_r(); - UINT8 do_dusccreg_ccr_r(); - UINT8 do_dusccreg_rxfifo_r(); - UINT8 do_dusccreg_rsr_r(); - UINT8 do_dusccreg_trsr_r(); - UINT8 do_dusccreg_ictsr_r(); - UINT8 do_dusccreg_gsr_r(); - UINT8 do_dusccreg_ier_r(); - UINT8 do_dusccreg_cid_r(); - UINT8 do_dusccreg_ivr_ivrm_r(); - UINT8 do_dusccreg_icr_r(); - UINT8 do_dusccreg_mrr_r(); - UINT8 do_dusccreg_ier1_r(); - UINT8 do_dusccreg_ier2_r(); - UINT8 do_dusccreg_ier3_r(); - UINT8 do_dusccreg_trcr_r(); - UINT8 do_dusccreg_rflr_r(); - UINT8 do_dusccreg_ftlr_r(); - UINT8 do_dusccreg_trmsr_r(); - UINT8 do_dusccreg_telr_r(); + uint8_t do_dusccreg_cmr1_r(); + uint8_t do_dusccreg_cmr2_r(); + uint8_t do_dusccreg_s1r_r(); + uint8_t do_dusccreg_s2r_r(); + uint8_t do_dusccreg_tpr_r(); + uint8_t do_dusccreg_ttr_r(); + uint8_t do_dusccreg_rpr_r(); + uint8_t do_dusccreg_rtr_r(); + uint8_t do_dusccreg_ctprh_r(); + uint8_t do_dusccreg_ctprl_r(); + uint8_t do_dusccreg_ctcr_r(); + uint8_t do_dusccreg_omr_r(); + uint8_t do_dusccreg_cth_r(); + uint8_t do_dusccreg_ctl_r(); + uint8_t do_dusccreg_pcr_r(); + uint8_t do_dusccreg_ccr_r(); + uint8_t do_dusccreg_rxfifo_r(); + uint8_t do_dusccreg_rsr_r(); + uint8_t do_dusccreg_trsr_r(); + uint8_t do_dusccreg_ictsr_r(); + uint8_t do_dusccreg_gsr_r(); + uint8_t do_dusccreg_ier_r(); + uint8_t do_dusccreg_cid_r(); + uint8_t do_dusccreg_ivr_ivrm_r(); + uint8_t do_dusccreg_icr_r(); + uint8_t do_dusccreg_mrr_r(); + uint8_t do_dusccreg_ier1_r(); + uint8_t do_dusccreg_ier2_r(); + uint8_t do_dusccreg_ier3_r(); + uint8_t do_dusccreg_trcr_r(); + uint8_t do_dusccreg_rflr_r(); + uint8_t do_dusccreg_ftlr_r(); + uint8_t do_dusccreg_trmsr_r(); + uint8_t do_dusccreg_telr_r(); // write register handlers - void do_dusccreg_cmr1_w(UINT8 data); - void do_dusccreg_cmr2_w(UINT8 data); - void do_dusccreg_s1r_w(UINT8 data); - void do_dusccreg_s2r_w(UINT8 data); - void do_dusccreg_tpr_w(UINT8 data); - void do_dusccreg_ttr_w(UINT8 data); - void do_dusccreg_rpr_w(UINT8 data); - void do_dusccreg_rtr_w(UINT8 data); - void do_dusccreg_ctprh_w(UINT8 data); - void do_dusccreg_ctprl_w(UINT8 data); - void do_dusccreg_ctcr_w(UINT8 data); - void do_dusccreg_omr_w(UINT8 data); - void do_dusccreg_pcr_w(UINT8 data); - void do_dusccreg_ccr_w(UINT8 data); - void do_dusccreg_txfifo_w(UINT8 data); - void do_dusccreg_rsr_w(UINT8 data); - void do_dusccreg_trsr_w(UINT8 data); - void do_dusccreg_ictsr_w(UINT8 data); - void do_dusccreg_gsr_w(UINT8 data); - void do_dusccreg_ier_w(UINT8 data); - // void do_dusccreg_rea_w(UINT8 data); // Short cutted non complex feature - void do_dusccreg_ivr_w(UINT8 data); - void do_dusccreg_icr_w(UINT8 data); - void do_dusccreg_sea_rea_w(UINT8 data); // Short cutted non complex feature - void do_dusccreg_mrr_w(UINT8 data); - void do_dusccreg_ier1_w(UINT8 data); - void do_dusccreg_ier2_w(UINT8 data); - void do_dusccreg_ier3_w(UINT8 data); - void do_dusccreg_trcr_w(UINT8 data); - void do_dusccreg_ftlr_w(UINT8 data); - void do_dusccreg_trmsr_w(UINT8 data); - - UINT8 read(offs_t &offset); - void write(UINT8 data, offs_t &offset); - - // UINT8 data_read(); - // void data_write(UINT8 data); - - void receive_data(UINT8 data); + void do_dusccreg_cmr1_w(uint8_t data); + void do_dusccreg_cmr2_w(uint8_t data); + void do_dusccreg_s1r_w(uint8_t data); + void do_dusccreg_s2r_w(uint8_t data); + void do_dusccreg_tpr_w(uint8_t data); + void do_dusccreg_ttr_w(uint8_t data); + void do_dusccreg_rpr_w(uint8_t data); + void do_dusccreg_rtr_w(uint8_t data); + void do_dusccreg_ctprh_w(uint8_t data); + void do_dusccreg_ctprl_w(uint8_t data); + void do_dusccreg_ctcr_w(uint8_t data); + void do_dusccreg_omr_w(uint8_t data); + void do_dusccreg_pcr_w(uint8_t data); + void do_dusccreg_ccr_w(uint8_t data); + void do_dusccreg_txfifo_w(uint8_t data); + void do_dusccreg_rsr_w(uint8_t data); + void do_dusccreg_trsr_w(uint8_t data); + void do_dusccreg_ictsr_w(uint8_t data); + void do_dusccreg_gsr_w(uint8_t data); + void do_dusccreg_ier_w(uint8_t data); + // void do_dusccreg_rea_w(uint8_t data); // Short cutted non complex feature + void do_dusccreg_ivr_w(uint8_t data); + void do_dusccreg_icr_w(uint8_t data); + void do_dusccreg_sea_rea_w(uint8_t data); // Short cutted non complex feature + void do_dusccreg_mrr_w(uint8_t data); + void do_dusccreg_ier1_w(uint8_t data); + void do_dusccreg_ier2_w(uint8_t data); + void do_dusccreg_ier3_w(uint8_t data); + void do_dusccreg_trcr_w(uint8_t data); + void do_dusccreg_ftlr_w(uint8_t data); + void do_dusccreg_trmsr_w(uint8_t data); + + uint8_t read(offs_t &offset); + void write(uint8_t data, offs_t &offset); + + // uint8_t data_read(); + // void data_write(uint8_t data); + + void receive_data(uint8_t data); void m_tx_fifo_rp_step(); void m_rx_fifo_rp_step(); - UINT8 m_rx_fifo_rp_data(); + uint8_t m_rx_fifo_rp_data(); DECLARE_WRITE_LINE_MEMBER( write_rx ); DECLARE_WRITE_LINE_MEMBER( cts_w ); @@ -236,46 +236,46 @@ public: int m_rcv; // Register state - UINT8 m_cmr1; - UINT8 m_cmr2; - UINT8 m_s1r; - UINT8 m_s2r; - UINT8 m_tpr; - UINT8 m_ttr; - UINT8 m_rpr; - UINT8 m_rtr; - // UINT8 m_ctprh; - // UINT8 m_ctprl; + uint8_t m_cmr1; + uint8_t m_cmr2; + uint8_t m_s1r; + uint8_t m_s2r; + uint8_t m_tpr; + uint8_t m_ttr; + uint8_t m_rpr; + uint8_t m_rtr; + // uint8_t m_ctprh; + // uint8_t m_ctprl; unsigned int m_ctpr; - UINT8 m_ctcr; - UINT8 m_omr; - // UINT8 m_cth; - // UINT8 m_ctl; + uint8_t m_ctcr; + uint8_t m_omr; + // uint8_t m_cth; + // uint8_t m_ctl; unsigned int m_ct; - UINT8 m_pcr; - UINT8 m_ccr; - UINT8 m_txfifo[4]; - UINT8 m_rxfifo[4]; - UINT8 m_rsr; - UINT8 m_trsr; - UINT8 m_ictsr; - // UINT8 m_gsr; // moved to the device since it is global - UINT8 m_ier; - // UINT8 m_rea; - UINT8 m_cid; - //UINT8 m_ivr; - //UINT8 m_icr; - // UINT8 m_sea; - //UINT8 m_ivrm; - UINT8 m_mrr; - UINT8 m_ier1; - UINT8 m_ier2; - UINT8 m_ier3; - UINT8 m_trcr; - UINT8 m_rflr; - UINT8 m_ftlr; - UINT8 m_trmsr; - UINT8 m_telr; + uint8_t m_pcr; + uint8_t m_ccr; + uint8_t m_txfifo[4]; + uint8_t m_rxfifo[4]; + uint8_t m_rsr; + uint8_t m_trsr; + uint8_t m_ictsr; + // uint8_t m_gsr; // moved to the device since it is global + uint8_t m_ier; + // uint8_t m_rea; + uint8_t m_cid; + //uint8_t m_ivr; + //uint8_t m_icr; + // uint8_t m_sea; + //uint8_t m_ivrm; + uint8_t m_mrr; + uint8_t m_ier1; + uint8_t m_ier2; + uint8_t m_ier3; + uint8_t m_trcr; + uint8_t m_rflr; + uint8_t m_ftlr; + uint8_t m_trmsr; + uint8_t m_telr; protected: enum // Needs to be 0-3 in unmodified prio level @@ -495,8 +495,8 @@ protected: emu_timer *rtxc_timer; emu_timer *trxc_timer; - UINT8 m_rtxc; - UINT8 m_trxc; + uint8_t m_rtxc; + uint8_t m_trxc; enum @@ -513,9 +513,9 @@ protected: TIMER_ID_TRXC }; - UINT16 m_brg_rx_rate; - UINT16 m_brg_tx_rate; - UINT16 m_brg_const; + uint16_t m_brg_rx_rate; + uint16_t m_brg_tx_rate; + uint16_t m_brg_const; // TODO: Implement the 14.4K, 56K and 64K bauds available on the CDUSCC static unsigned int get_baudrate(unsigned int br) @@ -554,20 +554,20 @@ protected: /* FIFOs and rx/tx status */ /* Receiver */ - UINT8 m_rx_data_fifo[16]; // data FIFO - UINT8 m_rx_error_fifo[16]; // error FIFO + uint8_t m_rx_data_fifo[16]; // data FIFO + uint8_t m_rx_error_fifo[16]; // error FIFO int m_rx_fifo_rp; // FIFO read pointer int m_rx_fifo_wp; // FIFO write pointer int m_rx_fifo_sz; // FIFO size - UINT8 m_rx_error; // current error + uint8_t m_rx_error; // current error /* Transmitter */ - UINT8 m_tx_data_fifo[16]; // data FIFO - UINT8 m_tx_error_fifo[16]; // error FIFO + uint8_t m_tx_data_fifo[16]; // data FIFO + uint8_t m_tx_error_fifo[16]; // error FIFO int m_tx_fifo_rp; // FIFO read pointer int m_tx_fifo_wp; // FIFO write pointer int m_tx_fifo_sz; // FIFO size - UINT8 m_tx_error; // current error + uint8_t m_tx_error; // current error int m_rx_clock; // receive clock pulse count int m_rx_first; // first character received @@ -579,14 +579,14 @@ protected: int m_dcd; // data carrier detect latch // transmitter state - UINT8 m_tx_data; // transmit data register + uint8_t m_tx_data; // transmit data register int m_tx_clock; // transmit clock pulse count int m_dtr; // data terminal ready int m_rts; // request to send // synchronous state - UINT16 m_sync; // sync character + uint16_t m_sync; // sync character int m_rcv_mode; int m_index; @@ -607,8 +607,8 @@ class duscc_device : public device_t public: // construction/destruction - duscc_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); - duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + duscc_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); + duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_txda_callback(device_t &device, _Object object) { return downcast(device).m_out_txda_cb.set_callback(object); } template static devcb_base &set_out_dtra_callback(device_t &device, _Object object) { return downcast(device).m_out_dtra_cb.set_callback(object); } @@ -674,7 +674,7 @@ protected: // internal interrupt management void check_interrupts(); void reset_interrupts(); - UINT8 modify_vector(UINT8 vect, int i, UINT8 src); + uint8_t modify_vector(uint8_t vect, int i, uint8_t src); void trigger_interrupt(int index, int state); int get_channel_index(duscc_channel *ch) { return (ch == m_chanA) ? 0 : 1; } @@ -727,10 +727,10 @@ protected: int m_int_state[8]; // interrupt state int m_variant; - UINT8 m_gsr; - UINT8 m_ivr; - UINT8 m_ivrm; - UINT8 m_icr; + uint8_t m_gsr; + uint8_t m_ivr; + uint8_t m_ivrm; + uint8_t m_icr; enum { @@ -759,25 +759,25 @@ extern const device_type DUSCC68C562; class duscc26562_device : public duscc_device { public : - duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class duscc26C562_device : public duscc_device { public : - duscc26C562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + duscc26C562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class duscc68562_device : public duscc_device { public : - duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class duscc68C562_device : public duscc_device { public : - duscc68C562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + duscc68C562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; #endif // __SCNXX562_H__ diff --git a/src/devices/machine/serflash.cpp b/src/devices/machine/serflash.cpp index c8c3eb89797..8ba5cf91ad4 100644 --- a/src/devices/machine/serflash.cpp +++ b/src/devices/machine/serflash.cpp @@ -22,7 +22,7 @@ const device_type SERFLASH = &device_creator; // serflash_device - constructor //------------------------------------------------- -serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SERFLASH, "Serial Flash", tag, owner, clock, "serflash", __FILE__), device_nvram_interface(mconfig, *this), m_length(0), m_region(nullptr), m_flash_state(), m_flash_enab(0), m_flash_cmd_seq(0), m_flash_cmd_prev(0), m_flash_addr_seq(0), m_flash_read_seq(0), m_flash_row(0), @@ -95,7 +95,7 @@ void serflash_device::nvram_read(emu_file &file) if (file.is_open()) { - UINT32 page; + uint32_t page; file.read(&page, 4); while (page < size) { @@ -118,7 +118,7 @@ void serflash_device::nvram_write(emu_file &file) if (m_length % FLASH_PAGE_SIZE) return; // region size must be multiple of flash page size int size = m_length / FLASH_PAGE_SIZE; - UINT32 page = 0; + uint32_t page = 0; while (page < size) { if (m_flashwritemap[page]) @@ -306,8 +306,8 @@ WRITE8_MEMBER( serflash_device::flash_addr_w ) READ8_MEMBER( serflash_device::flash_io_r ) { - UINT8 data = 0x00; -// UINT32 old; + uint8_t data = 0x00; +// uint32_t old; if (!m_flash_enab) return 0xff; @@ -376,7 +376,7 @@ READ8_MEMBER(serflash_device::n3d_flash_r) if (m_last_flash_cmd==0x00) { - UINT8 retdat = m_flash_page_data[m_flash_page_addr]; + uint8_t retdat = m_flash_page_data[m_flash_page_addr]; //logerror("n3d_flash_r %02x %04x\n", offset, m_flash_page_addr); diff --git a/src/devices/machine/serflash.h b/src/devices/machine/serflash.h index e72432cc109..b7df13b6957 100644 --- a/src/devices/machine/serflash.h +++ b/src/devices/machine/serflash.h @@ -42,7 +42,7 @@ class serflash_device : public device_t, public: // construction/destruction - serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER( flash_ready_r ); DECLARE_READ8_MEMBER( flash_io_r ); @@ -70,31 +70,31 @@ protected: // runtime state size_t m_length; - UINT8* m_region; + uint8_t* m_region; flash_state_t m_flash_state; - UINT8 m_flash_enab; + uint8_t m_flash_enab; - UINT8 m_flash_cmd_seq; - UINT32 m_flash_cmd_prev; + uint8_t m_flash_cmd_seq; + uint32_t m_flash_cmd_prev; - UINT8 m_flash_addr_seq; - UINT8 m_flash_read_seq; + uint8_t m_flash_addr_seq; + uint8_t m_flash_read_seq; - UINT16 m_flash_row, m_flash_col; + uint16_t m_flash_row, m_flash_col; int m_flash_page_addr; - UINT16 m_flash_page_index; + uint16_t m_flash_page_index; - std::vector m_flashwritemap; + std::vector m_flashwritemap; - UINT8 m_last_flash_cmd; + uint8_t m_last_flash_cmd; - UINT32 m_flash_addr; + uint32_t m_flash_addr; - UINT8 m_flash_page_data[FLASH_PAGE_SIZE]; + uint8_t m_flash_page_data[FLASH_PAGE_SIZE]; diff --git a/src/devices/machine/smartmed.cpp b/src/devices/machine/smartmed.cpp index d541f7ca52b..608122981af 100644 --- a/src/devices/machine/smartmed.cpp +++ b/src/devices/machine/smartmed.cpp @@ -27,16 +27,16 @@ /* machine-independent big-endian 32-bit integer */ struct UINT32BE { - UINT8 bytes[4]; + uint8_t bytes[4]; }; -static inline UINT32 get_UINT32BE(UINT32BE word) +static inline uint32_t get_UINT32BE(UINT32BE word) { return (word.bytes[0] << 24) | (word.bytes[1] << 16) | (word.bytes[2] << 8) | word.bytes[3]; } #ifdef UNUSED_FUNCTION -static inline void set_UINT32BE(UINT32BE *word, UINT32 data) +static inline void set_UINT32BE(UINT32BE *word, uint32_t data) { word->bytes[0] = (data >> 24) & 0xff; word->bytes[1] = (data >> 16) & 0xff; @@ -48,7 +48,7 @@ static inline void set_UINT32BE(UINT32BE *word, UINT32 data) /* SmartMedia image header */ struct SM_disk_image_header { - UINT8 version; + uint8_t version; UINT32BE page_data_size; UINT32BE page_total_size; UINT32BE num_pages; @@ -57,11 +57,11 @@ struct SM_disk_image_header struct disk_image_format_2_header { - UINT8 data1[3]; - UINT8 padding1[256-3]; - UINT8 data2[16]; - UINT8 data3[16]; - UINT8 padding2[768-32]; + uint8_t data1[3]; + uint8_t padding1[256-3]; + uint8_t data2[16]; + uint8_t data3[16]; + uint8_t padding2[768-32]; }; enum @@ -72,7 +72,7 @@ enum const device_type NAND = &device_creator; -nand_device::nand_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +nand_device::nand_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NAND, "NAND Flash Memory", tag, owner, clock, "nand", __FILE__), m_page_data_size(0), m_page_total_size(0), @@ -88,7 +88,7 @@ nand_device::nand_device(const machine_config &mconfig, const char *tag, device_ memset(m_id, 0, sizeof(m_id)); } -nand_device::nand_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) +nand_device::nand_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_page_data_size(0), m_page_total_size(0), @@ -119,7 +119,7 @@ void nand_device::device_start() m_accumulated_status = 0; m_mp_opcode = 0; m_mode_3065 = 0; - m_pagereg = std::make_unique(m_page_total_size); + m_pagereg = std::make_unique(m_page_total_size); #ifdef SMARTMEDIA_IMAGE_SAVE m_image_format = 0; @@ -150,8 +150,8 @@ image_init_result smartmedia_image_device::smartmedia_format_1() m_page_total_size = get_UINT32BE(custom_header.page_total_size); m_num_pages = get_UINT32BE(custom_header.num_pages); m_log2_pages_per_block = get_UINT32BE(custom_header.log2_pages_per_block); - m_data_ptr = auto_alloc_array(machine(), UINT8, m_page_total_size*m_num_pages); - m_data_uid_ptr = std::make_unique(256 + 16); + m_data_ptr = auto_alloc_array(machine(), uint8_t, m_page_total_size*m_num_pages); + m_data_uid_ptr = std::make_unique(256 + 16); m_mode = SM_M_INIT; m_pointer_mode = SM_PM_A; m_page_addr = 0; @@ -160,7 +160,7 @@ image_init_result smartmedia_image_device::smartmedia_format_1() if (!is_readonly()) m_status |= 0x80; m_accumulated_status = 0; - m_pagereg = std::make_unique(m_page_total_size); + m_pagereg = std::make_unique(m_page_total_size); memset( m_id, 0, sizeof( m_id)); m_id_len = 0; m_col_address_cycles = 1; @@ -189,7 +189,7 @@ image_init_result smartmedia_image_device::smartmedia_format_1() return image_init_result::PASS; } -int smartmedia_image_device::detect_geometry( UINT8 id1, UINT8 id2) +int smartmedia_image_device::detect_geometry( uint8_t id1, uint8_t id2) { int result = FALSE; @@ -245,8 +245,8 @@ image_init_result smartmedia_image_device::smartmedia_format_2() return image_init_result::FAIL; } - m_data_ptr = auto_alloc_array(machine(), UINT8, m_page_total_size*m_num_pages); - m_data_uid_ptr = std::make_unique(256 + 16); + m_data_ptr = auto_alloc_array(machine(), uint8_t, m_page_total_size*m_num_pages); + m_data_uid_ptr = std::make_unique(256 + 16); m_mode = SM_M_INIT; m_pointer_mode = SM_PM_A; m_page_addr = 0; @@ -255,7 +255,7 @@ image_init_result smartmedia_image_device::smartmedia_format_2() if (!is_readonly()) m_status |= 0x80; m_accumulated_status = 0; - m_pagereg = std::make_unique(m_page_total_size); + m_pagereg = std::make_unique(m_page_total_size); m_id_len = 3; memcpy( m_id, custom_header.data1, m_id_len); m_mp_opcode = 0; @@ -282,7 +282,7 @@ image_init_result smartmedia_image_device::smartmedia_format_2() image_init_result smartmedia_image_device::call_load() { image_init_result result; - UINT64 position; + uint64_t position; // try format 1 position = ftell(); result = smartmedia_format_1(); @@ -343,7 +343,7 @@ void smartmedia_image_device::call_unload() m_byte_addr = 0; m_status = 0xC0; m_accumulated_status = 0; - m_pagereg = std::make_unique(m_page_total_size); + m_pagereg = std::make_unique(m_page_total_size); memset( m_id, 0, sizeof( m_id)); m_id_len = 0; m_mp_opcode = 0; @@ -376,13 +376,13 @@ int nand_device::is_busy() void nand_device::set_data_ptr(void *ptr) { - m_data_ptr = (UINT8 *)ptr; + m_data_ptr = (uint8_t *)ptr; } /* write a byte to SmartMedia command port */ -void nand_device::command_w(UINT8 data) +void nand_device::command_w(uint8_t data) { if (!is_present()) return; @@ -593,7 +593,7 @@ void nand_device::command_w(UINT8 data) /* write a byte to SmartMedia address port */ -void nand_device::address_w(UINT8 data) +void nand_device::address_w(uint8_t data) { if (!is_present()) return; @@ -671,9 +671,9 @@ void nand_device::address_w(UINT8 data) /* read a byte from SmartMedia data port */ -UINT8 nand_device::data_r() +uint8_t nand_device::data_r() { - UINT8 reply = 0; + uint8_t reply = 0; if (!is_present()) return 0; @@ -732,7 +732,7 @@ UINT8 nand_device::data_r() /* write a byte to SmartMedia data port */ -void nand_device::data_w(UINT8 data) +void nand_device::data_w(uint8_t data) { if (!is_present()) return; @@ -779,7 +779,7 @@ void nand_device::device_reset() const device_type SMARTMEDIA = &device_creator; -smartmedia_image_device::smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +smartmedia_image_device::smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nand_device(mconfig, SMARTMEDIA, "SmartMedia Flash ROM", tag, owner, clock, "smartmedia", __FILE__), device_image_interface(mconfig, *this) { diff --git a/src/devices/machine/smartmed.h b/src/devices/machine/smartmed.h index f1da965c4e9..d2a7b926008 100644 --- a/src/devices/machine/smartmed.h +++ b/src/devices/machine/smartmed.h @@ -58,8 +58,8 @@ class nand_device : public device_t { public: // construction/destruction - nand_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - nand_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); + nand_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nand_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); template static devcb_base &set_rnb_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_rnb.set_callback(object); } @@ -141,10 +141,10 @@ public: int is_protected(); int is_busy(); - UINT8 data_r(); - void command_w(UINT8 data); - void address_w(UINT8 data); - void data_w(UINT8 data); + uint8_t data_r(); + void command_w(uint8_t data); + void address_w(uint8_t data); + void data_w(uint8_t data); void set_data_ptr(void *ptr); protected: @@ -159,8 +159,8 @@ protected: // 0 means no card loaded int m_log2_pages_per_block; // log2 of number of pages per erase block (usually 4 or 5) - UINT8* m_data_ptr; // FEEPROM data area - std::unique_ptr m_data_uid_ptr; + uint8_t* m_data_ptr; // FEEPROM data area + std::unique_ptr m_data_uid_ptr; sm_mode_t m_mode; // current operation mode pointer_sm_mode_t m_pointer_mode; // pointer mode @@ -172,9 +172,9 @@ protected: int m_status; // current status int m_accumulated_status; // accumulated status - std::unique_ptr m_pagereg; // page register used by program command - UINT8 m_id[5]; // chip ID - UINT8 m_mp_opcode; // multi-plane operation code + std::unique_ptr m_pagereg; // page register used by program command + uint8_t m_id[5]; // chip ID + uint8_t m_mp_opcode; // multi-plane operation code int m_mode_3065; @@ -202,7 +202,7 @@ class smartmedia_image_device : public nand_device, { public: // construction/destruction - smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // image-level overrides virtual iodevice_t image_type() const override { return IO_MEMCARD; } @@ -225,7 +225,7 @@ protected: image_init_result smartmedia_format_1(); image_init_result smartmedia_format_2(); - int detect_geometry( UINT8 id1, UINT8 id2); + int detect_geometry( uint8_t id1, uint8_t id2); }; diff --git a/src/devices/machine/smc91c9x.cpp b/src/devices/machine/smc91c9x.cpp index a38be999136..3ac4bed1312 100644 --- a/src/devices/machine/smc91c9x.cpp +++ b/src/devices/machine/smc91c9x.cpp @@ -105,7 +105,7 @@ static const char *const ethernet_regname[64] = DEVICE INTERFACE ***************************************************************************/ -smc91c9x_device::smc91c9x_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) +smc91c9x_device::smc91c9x_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) { @@ -183,7 +183,7 @@ void smc91c9x_device::device_reset() const device_type SMC91C94 = &device_creator; -smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : smc91c9x_device(mconfig, SMC91C94, "SMC91C94 Ethernet Controller", tag, owner, clock, "smc91c94", __FILE__) { } @@ -191,7 +191,7 @@ smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, const device_type SMC91C96 = &device_creator; -smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : smc91c9x_device(mconfig, SMC91C96, "SMC91C96", tag, owner, clock, "smc91c96", __FILE__) { } @@ -206,8 +206,8 @@ smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, void smc91c9x_device::update_ethernet_irq() { - UINT8 mask = m_reg[EREG_INTERRUPT] >> 8; - UINT8 state = m_reg[EREG_INTERRUPT] & 0xff; + uint8_t mask = m_reg[EREG_INTERRUPT] >> 8; + uint8_t state = m_reg[EREG_INTERRUPT] & 0xff; /* update the IRQ state */ m_irq_state = ((mask & state) != 0); @@ -255,7 +255,7 @@ void smc91c9x_device::finish_enqueue(int param) if (m_fifo_count < ETHER_RX_BUFFERS) { int buffer_len = ((m_tx[3] << 8) | m_tx[2]) & 0x7ff; - UINT8 *packet = &m_rx[m_fifo_count++ * ETHER_BUFFER_SIZE]; + uint8_t *packet = &m_rx[m_fifo_count++ * ETHER_BUFFER_SIZE]; int packet_len; /* compute the packet length */ @@ -299,7 +299,7 @@ void smc91c9x_device::finish_enqueue(int param) process_command - handle MMU commands -------------------------------------------------*/ -void smc91c9x_device::process_command(UINT16 data) +void smc91c9x_device::process_command(uint16_t data) { switch ((data >> 5) & 7) { @@ -377,7 +377,7 @@ void smc91c9x_device::process_command(UINT16 data) READ16_MEMBER( smc91c9x_device::read ) { - UINT32 result; + uint32_t result; /* determine the effective register */ offset %= 8; @@ -398,7 +398,7 @@ READ16_MEMBER( smc91c9x_device::read ) case EREG_DATA_0: /* data register */ case EREG_DATA_1: /* data register */ { - UINT8 *buffer = (m_reg[EREG_POINTER] & 0x8000) ? m_rx : m_tx; + uint8_t *buffer = (m_reg[EREG_POINTER] & 0x8000) ? m_rx : m_tx; int addr = m_reg[EREG_POINTER] & 0x7ff; result = buffer[addr++]; if (ACCESSING_BITS_8_15) @@ -421,7 +421,7 @@ READ16_MEMBER( smc91c9x_device::read ) WRITE16_MEMBER( smc91c9x_device::write ) { - // UINT16 olddata; + // uint16_t olddata; /* determine the effective register */ offset %= 8; @@ -513,7 +513,7 @@ WRITE16_MEMBER( smc91c9x_device::write ) case EREG_DATA_0: /* data register */ case EREG_DATA_1: /* data register */ { - UINT8 *buffer = (m_reg[EREG_POINTER] & 0x8000) ? m_rx : m_tx; + uint8_t *buffer = (m_reg[EREG_POINTER] & 0x8000) ? m_rx : m_tx; int addr = m_reg[EREG_POINTER] & 0x7ff; buffer[addr++] = data; if (ACCESSING_BITS_8_15) diff --git a/src/devices/machine/smc91c9x.h b/src/devices/machine/smc91c9x.h index f3e7032e0e2..f83d7a6a39a 100644 --- a/src/devices/machine/smc91c9x.h +++ b/src/devices/machine/smc91c9x.h @@ -21,7 +21,7 @@ class smc91c9x_device : public device_t { public: - smc91c9x_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); + smc91c9x_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); ~smc91c9x_device() {} template static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast(device).m_irq_handler.set_callback(object); } @@ -39,35 +39,35 @@ private: devcb_write_line m_irq_handler; /* raw register data and masks */ - UINT16 m_reg[64]; - UINT16 m_regmask[64]; + uint16_t m_reg[64]; + uint16_t m_regmask[64]; /* IRQ information */ - UINT8 m_irq_state; + uint8_t m_irq_state; /* allocate information */ - UINT8 m_alloc_count; + uint8_t m_alloc_count; /* transmit/receive FIFOs */ - UINT8 m_fifo_count; - UINT8 m_rx[ETHER_BUFFER_SIZE * ETHER_RX_BUFFERS]; - UINT8 m_tx[ETHER_BUFFER_SIZE]; + uint8_t m_fifo_count; + uint8_t m_rx[ETHER_BUFFER_SIZE * ETHER_RX_BUFFERS]; + uint8_t m_tx[ETHER_BUFFER_SIZE]; /* counters */ - UINT32 m_sent; - UINT32 m_recd; + uint32_t m_sent; + uint32_t m_recd; void update_ethernet_irq(); void update_stats(); void finish_enqueue(int param); - void process_command(UINT16 data); + void process_command(uint16_t data); }; class smc91c94_device : public smc91c9x_device { public: - smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; extern const device_type SMC91C94; @@ -75,7 +75,7 @@ extern const device_type SMC91C94; class smc91c96_device : public smc91c9x_device { public: - smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; extern const device_type SMC91C96; diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp index 3825f2578a5..749f5bc8f8b 100644 --- a/src/devices/machine/smpc.cpp +++ b/src/devices/machine/smpc.cpp @@ -230,7 +230,7 @@ void saturn_state::smpc_system_reset() TIMER_CALLBACK_MEMBER( saturn_state::smpc_change_clock ) { - UINT32 xtal; + uint32_t xtal; if(LOG_SMPC) printf ("Clock change execute at (%d %d)\n",machine().first_screen()->hpos(),machine().first_screen()->vpos()); @@ -382,18 +382,18 @@ TIMER_CALLBACK_MEMBER( saturn_state::intback_peripheral ) if(LOG_PAD_CMD) printf("%d %d %d\n", m_smpc.intback_stage - 1, machine().first_screen()->vpos(), (int)machine().first_screen()->frame_number()); - UINT8 status1 = m_ctrl1 ? m_ctrl1->read_status() : 0xf0; - UINT8 status2 = m_ctrl2 ? m_ctrl2->read_status() : 0xf0; + uint8_t status1 = m_ctrl1 ? m_ctrl1->read_status() : 0xf0; + uint8_t status2 = m_ctrl2 ? m_ctrl2->read_status() : 0xf0; - UINT8 reg_offset = 0; - UINT8 ctrl1_offset = 0; // this is used when there is segatap or multitap connected - UINT8 ctrl2_offset = 0; // this is used when there is segatap or multitap connected + uint8_t reg_offset = 0; + uint8_t ctrl1_offset = 0; // this is used when there is segatap or multitap connected + uint8_t ctrl2_offset = 0; // this is used when there is segatap or multitap connected m_smpc.OREG[reg_offset++] = status1; // read ctrl1 for (int i = 0; i < (status1 & 0xf); i++) { - UINT8 id = m_ctrl1->read_id(i); + uint8_t id = m_ctrl1->read_id(i); m_smpc.OREG[reg_offset++] = id; for (int j = 0; j < (id & 0xf); j++) m_smpc.OREG[reg_offset++] = m_ctrl1->read_ctrl(j + ctrl1_offset); @@ -403,7 +403,7 @@ TIMER_CALLBACK_MEMBER( saturn_state::intback_peripheral ) // read ctrl2 for (int i = 0; i < (status2 & 0xf); i++) { - UINT8 id = m_ctrl2->read_id(i); + uint8_t id = m_ctrl2->read_id(i); m_smpc.OREG[reg_offset++] = id; for (int j = 0; j < (id & 0xf); j++) m_smpc.OREG[reg_offset++] = m_ctrl2->read_ctrl(j + ctrl2_offset); @@ -538,7 +538,7 @@ TIMER_CALLBACK_MEMBER( saturn_state::smpc_audio_reset_line_pulse ) * *******************************************/ -void saturn_state::smpc_comreg_exec(address_space &space, UINT8 data, UINT8 is_stv) +void saturn_state::smpc_comreg_exec(address_space &space, uint8_t data, uint8_t is_stv) { switch (data) { @@ -786,12 +786,12 @@ WRITE8_MEMBER( saturn_state::stv_SMPC_w ) * *******************************************/ -UINT8 saturn_state::smpc_th_control_mode(UINT8 pad_n) +uint8_t saturn_state::smpc_th_control_mode(uint8_t pad_n) { - UINT8 res = 0; + uint8_t res = 0; int th = (pad_n == 0) ? ((m_smpc.PDR1 >> 5) & 3) : ((m_smpc.PDR2 >> 5) & 3); - UINT16 ctrl_read = 0; + uint16_t ctrl_read = 0; if (m_ctrl1 && pad_n == 0) ctrl_read = m_ctrl1->read_direct(); if (m_ctrl2 && pad_n == 1) @@ -832,12 +832,12 @@ UINT8 saturn_state::smpc_th_control_mode(UINT8 pad_n) return res; } -UINT8 saturn_state::smpc_direct_mode(UINT8 pad_n) +uint8_t saturn_state::smpc_direct_mode(uint8_t pad_n) { int hshake = (pad_n == 0) ? ((m_smpc.PDR1 >> 5) & 3) : ((m_smpc.PDR2 >> 5) & 3); const int shift_bit[4] = { 4, 12, 8, 0 }; - UINT16 ctrl_read = 0; + uint16_t ctrl_read = 0; if (m_ctrl1 && pad_n == 0) ctrl_read = m_ctrl1->read_direct(); if (m_ctrl2 && pad_n == 1) @@ -850,7 +850,7 @@ UINT8 saturn_state::smpc_direct_mode(UINT8 pad_n) READ8_MEMBER( saturn_state::saturn_SMPC_r ) { - UINT8 return_data = 0; + uint8_t return_data = 0; if (!(offset & 1)) // avoid reading to even bytes (TODO: is it 0s or 1s?) return 0x00; @@ -871,7 +871,7 @@ READ8_MEMBER( saturn_state::saturn_SMPC_r ) { if ((m_smpc.IOSEL1 && offset == 0x75) || (m_smpc.IOSEL2 && offset == 0x77)) { - UINT8 cur_ddr; + uint8_t cur_ddr; if (((m_ctrl1 && m_ctrl1->read_id(0) != 0x02) || (m_ctrl2 && m_ctrl2->read_id(0) != 0x02)) && !(space.debugger_access())) { diff --git a/src/devices/machine/sonydriv.cpp b/src/devices/machine/sonydriv.cpp index 3c70a4664e7..8bede7912a0 100644 --- a/src/devices/machine/sonydriv.cpp +++ b/src/devices/machine/sonydriv.cpp @@ -76,7 +76,7 @@ struct floppy_t unsigned int loadedtrack_dirty : 1; /* has data in track buffer been modified? */ size_t loadedtrack_size; /* size of loaded track */ size_t loadedtrack_pos; /* position within loaded track */ - UINT8 *loadedtrack_data; /* pointer to track buffer */ + uint8_t *loadedtrack_data; /* pointer to track buffer */ int is_fdhd; /* is drive an FDHD? */ int is_400k; /* drive is single-sided, which means 400K */ @@ -106,7 +106,7 @@ static void load_track_data(device_t *device,int floppy_select) { int track_size; legacy_floppy_image_device *cur_image; - UINT8 *new_data; + uint8_t *new_data; floppy_t *f; f = &sony.floppy[floppy_select]; @@ -121,7 +121,7 @@ static void load_track_data(device_t *device,int floppy_select) track_size = floppy_get_track_size(fimg, f->head, cur_image->floppy_drive_get_current_track()); if (f->loadedtrack_data) auto_free(device->machine(),f->loadedtrack_data); - new_data = auto_alloc_array(device->machine(),UINT8,track_size); + new_data = auto_alloc_array(device->machine(),uint8_t,track_size); if (!new_data) { return; @@ -156,9 +156,9 @@ static void save_track_data(device_t *device, int floppy_select) -UINT8 sony_read_data(device_t *device) +uint8_t sony_read_data(device_t *device) { - UINT8 result = 0; + uint8_t result = 0; legacy_floppy_image_device *cur_image; floppy_t *f; @@ -184,7 +184,7 @@ UINT8 sony_read_data(device_t *device) -void sony_write_data(device_t *device,UINT8 data) +void sony_write_data(device_t *device,uint8_t data) { device_image_interface *cur_image; floppy_t *f; @@ -462,7 +462,7 @@ static void sony_doaction(device_t *device) } } -void sony_set_lines(device_t *device,UINT8 lines) +void sony_set_lines(device_t *device,uint8_t lines) { int old_sony_lines = sony.lines; @@ -531,7 +531,7 @@ const device_type FLOPPY_SONY = &device_creator; // sonydriv_floppy_image_device - constructor //------------------------------------------------- -sonydriv_floppy_image_device::sonydriv_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +sonydriv_floppy_image_device::sonydriv_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : legacy_floppy_image_device(mconfig, FLOPPY_SONY, "Floppy Disk [Sony]", tag, owner, clock, "floppy_sonny", __FILE__) { } diff --git a/src/devices/machine/sonydriv.h b/src/devices/machine/sonydriv.h index 4a48ceb9f9d..b382efd47bf 100644 --- a/src/devices/machine/sonydriv.h +++ b/src/devices/machine/sonydriv.h @@ -24,21 +24,21 @@ enum }; #endif -void sony_set_lines(device_t *device,UINT8 lines); +void sony_set_lines(device_t *device,uint8_t lines); void sony_set_enable_lines(device_t *device,int enable_mask); void sony_set_sel_line(device_t *device,int sel); void sony_set_speed(int speed); -UINT8 sony_read_data(device_t *device); -void sony_write_data(device_t *device,UINT8 data); +uint8_t sony_read_data(device_t *device); +void sony_write_data(device_t *device,uint8_t data); int sony_read_status(device_t *device); class sonydriv_floppy_image_device : public legacy_floppy_image_device { public: // construction/destruction - sonydriv_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + sonydriv_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void call_unload() override; protected: diff --git a/src/devices/machine/spchrom.cpp b/src/devices/machine/spchrom.cpp index 542be5b4ded..10e5ea2fc1e 100644 --- a/src/devices/machine/spchrom.cpp +++ b/src/devices/machine/spchrom.cpp @@ -25,7 +25,7 @@ // device type definition const device_type SPEECHROM = &device_creator; -speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SPEECHROM, "SPEECHROM", tag, owner, clock, "speechrom", __FILE__), m_speechrom_data(nullptr), m_speechROMlen(0), m_speechROMaddr(0), m_load_pointer(0), diff --git a/src/devices/machine/spchrom.h b/src/devices/machine/spchrom.h index c72af249529..14c9824c267 100644 --- a/src/devices/machine/spchrom.h +++ b/src/devices/machine/spchrom.h @@ -14,7 +14,7 @@ class speechrom_device : public device_t { public: // construction/destruction - speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); /// TODO: implement bus behaviour int read(int count); @@ -26,7 +26,7 @@ public: virtual void device_start() override; private: - UINT8 *m_speechrom_data; /* pointer to speech ROM data */ + uint8_t *m_speechrom_data; /* pointer to speech ROM data */ unsigned int m_speechROMlen; /* length of data pointed by speechrom_data, from 0 to 2^18 */ unsigned int m_speechROMaddr; /* 18 bit pointer in ROM */ int m_load_pointer; /* which 4-bit nibble will be affected by load address */ diff --git a/src/devices/machine/steppers.cpp b/src/devices/machine/steppers.cpp index 2f63c8529d3..8164e3706fd 100644 --- a/src/devices/machine/steppers.cpp +++ b/src/devices/machine/steppers.cpp @@ -43,7 +43,7 @@ const device_type STEPPER = &device_creator; -stepper_device::stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +stepper_device::stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, STEPPER, "Stepper Motor", tag, owner, clock, "stepper", __FILE__), m_optic_cb(*this) { @@ -121,7 +121,7 @@ void stepper_device::device_reset() /////////////////////////////////////////////////////////////////////////// -int stepper_device::update(UINT8 pattern) +int stepper_device::update(uint8_t pattern) { int changed = 0; diff --git a/src/devices/machine/steppers.h b/src/devices/machine/steppers.h index 4b180e75355..2f51c195507 100644 --- a/src/devices/machine/steppers.h +++ b/src/devices/machine/steppers.h @@ -101,11 +101,11 @@ extern const device_type STEPPER; class stepper_device : public device_t { public: - stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_optic_handler(device_t &device, _Object object) { return downcast(device).m_optic_cb.set_callback(object); } - static void set_reel_type(device_t &device, UINT8 type) + static void set_reel_type(device_t &device, uint8_t type) { downcast(device).m_type = type; switch ( type ) @@ -131,11 +131,11 @@ public: break; } } - static void set_max_steps(device_t &device, INT16 steps) { downcast(device).m_max_steps = steps; } - static void set_start_index(device_t &device, INT16 index) { downcast(device).m_index_start = index; } - static void set_end_index(device_t &device, INT16 index) { downcast(device).m_index_end = index; } - static void set_index_pattern(device_t &device, INT16 index) { downcast(device).m_index_patt = index; } - static void set_init_phase(device_t &device, UINT8 phase) + static void set_max_steps(device_t &device, int16_t steps) { downcast(device).m_max_steps = steps; } + static void set_start_index(device_t &device, int16_t index) { downcast(device).m_index_start = index; } + static void set_end_index(device_t &device, int16_t index) { downcast(device).m_index_end = index; } + static void set_index_pattern(device_t &device, int16_t index) { downcast(device).m_index_patt = index; } + static void set_init_phase(device_t &device, uint8_t phase) { downcast(device).m_initphase = phase; downcast(device).m_phase = phase; @@ -143,7 +143,7 @@ public: } /* update a motor */ - int update(UINT8 pattern); + int update(uint8_t pattern); /* get current position in half steps */ int get_position() { return m_step_pos; } @@ -158,19 +158,19 @@ protected: virtual void device_reset() override; private: - UINT8 m_pattern; /* coil pattern */ - UINT8 m_old_pattern; /* old coil pattern */ - UINT8 m_initphase; - UINT8 m_phase; /* motor phase */ - UINT8 m_old_phase; /* old phase */ - UINT8 m_type; /* reel type */ - INT16 m_step_pos; /* step position 0 - max_steps */ - INT16 m_max_steps; /* maximum step position */ - INT32 m_abs_step_pos; /* absolute step position */ - INT16 m_index_start; /* start position of index (in half steps) */ - INT16 m_index_end; /* end position of index (in half steps) */ - INT16 m_index_patt; /* pattern needed on coils (0=don't care) */ - UINT8 m_optic; + uint8_t m_pattern; /* coil pattern */ + uint8_t m_old_pattern; /* old coil pattern */ + uint8_t m_initphase; + uint8_t m_phase; /* motor phase */ + uint8_t m_old_phase; /* old phase */ + uint8_t m_type; /* reel type */ + int16_t m_step_pos; /* step position 0 - max_steps */ + int16_t m_max_steps; /* maximum step position */ + int32_t m_abs_step_pos; /* absolute step position */ + int16_t m_index_start; /* start position of index (in half steps) */ + int16_t m_index_end; /* end position of index (in half steps) */ + int16_t m_index_patt; /* pattern needed on coils (0=don't care) */ + uint8_t m_optic; void update_optic(); devcb_write_line m_optic_cb; diff --git a/src/devices/machine/strata.cpp b/src/devices/machine/strata.cpp index 0bf396d83ef..4542acc9d9e 100644 --- a/src/devices/machine/strata.cpp +++ b/src/devices/machine/strata.cpp @@ -46,7 +46,7 @@ const device_type STRATAFLASH = &device_creator; -strataflash_device::strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +strataflash_device::strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, STRATAFLASH, "Intel 28F640J5", tag, owner, clock, "strataflash", __FILE__), device_nvram_interface(mconfig, *this) { @@ -74,7 +74,7 @@ void strataflash_device::nvram_read(emu_file &file) // TODO /* - UINT8 buf; + uint8_t buf; int i; // version flag @@ -93,7 +93,7 @@ void strataflash_device::nvram_read(emu_file &file) return 1; for (i = 0; i < FEEPROM_SIZE; i += 2) { - UINT16 *ptr = (UINT16 *) (&m_flashmemory[i]); + uint16_t *ptr = (uint16_t *) (&m_flashmemory[i]); *ptr = little_endianize_int16(*ptr); } @@ -102,7 +102,7 @@ void strataflash_device::nvram_read(emu_file &file) return 1; for (i = 0; i < PROT_REGS_SIZE; i += 2) { - UINT16 *ptr = (UINT16 *) (&m_prot_regs[i]); + uint16_t *ptr = (uint16_t *) (&m_prot_regs[i]); *ptr = little_endianize_int16(*ptr); } @@ -124,7 +124,7 @@ void strataflash_device::nvram_write(emu_file &file) // TODO /* - UINT8 buf; + uint8_t buf; int i; // version flag @@ -141,28 +141,28 @@ void strataflash_device::nvram_write(emu_file &file) // main FEEPROM area for (i = 0; i < FEEPROM_SIZE; i += 2) { - UINT16 *ptr = (UINT16 *) (&m_flashmemory[i]); + uint16_t *ptr = (uint16_t *) (&m_flashmemory[i]); *ptr = little_endianize_int16(*ptr); } if (file->write(m_flashmemory, FEEPROM_SIZE) != FEEPROM_SIZE) return 1; for (i = 0; i < FEEPROM_SIZE; i += 2) { - UINT16 *ptr = (UINT16 *) (&m_flashmemory[i]); + uint16_t *ptr = (uint16_t *) (&m_flashmemory[i]); *ptr = little_endianize_int16(*ptr); } // protection registers for (i = 0; i < PROT_REGS_SIZE; i += 2) { - UINT16 *ptr = (UINT16 *) (&m_prot_regs[i]); + uint16_t *ptr = (uint16_t *) (&m_prot_regs[i]); *ptr = little_endianize_int16(*ptr); } if (file->write(m_prot_regs, PROT_REGS_SIZE) != PROT_REGS_SIZE) return 1; for (i = 0; i < PROT_REGS_SIZE; i += 2) { - UINT16 *ptr = (UINT16 *) (&m_prot_regs[i]); + uint16_t *ptr = (uint16_t *) (&m_prot_regs[i]); *ptr = little_endianize_int16(*ptr); } @@ -184,7 +184,7 @@ void strataflash_device::device_start(void) m_mode = FM_NORMAL; m_status = 0x80; m_master_lock = 0; - m_flashmemory = std::make_unique(COMPLETE_SIZE); + m_flashmemory = std::make_unique(COMPLETE_SIZE); m_wrbuf = m_flashmemory.get() + FEEPROM_SIZE; m_prot_regs = m_wrbuf + WRBUF_SIZE; @@ -214,7 +214,7 @@ void strataflash_device::device_config_complete() /* read a 8/16-bit word from FEEPROM */ -UINT16 strataflash_device::read8_16(address_space& space, offs_t offset, bus_width_t bus_width) +uint16_t strataflash_device::read8_16(address_space& space, offs_t offset, bus_width_t bus_width) { switch (bus_width) { @@ -234,7 +234,7 @@ UINT16 strataflash_device::read8_16(address_space& space, offs_t offset, bus_wid case bw_8: return m_flashmemory[BYTE_XOR_LE(offset)]; case bw_16: - return *(UINT16*)(m_flashmemory.get()+offset); + return *(uint16_t*)(m_flashmemory.get()+offset); } break; case FM_READSTATUS: @@ -249,7 +249,7 @@ UINT16 strataflash_device::read8_16(address_space& space, offs_t offset, bus_wid case bw_8: return m_prot_regs[BYTE_XOR_LE(offset)]; case bw_16: - return *(UINT16*)(m_prot_regs+offset); + return *(uint16_t*)(m_prot_regs+offset); } } else @@ -404,7 +404,7 @@ UINT16 strataflash_device::read8_16(address_space& space, offs_t offset, bus_wid /* write a 8/16-bit word to FEEPROM */ -void strataflash_device::write8_16(address_space& space, offs_t offset, UINT16 data, bus_width_t bus_width) +void strataflash_device::write8_16(address_space& space, offs_t offset, uint16_t data, bus_width_t bus_width) { switch (bus_width) { @@ -562,7 +562,7 @@ void strataflash_device::write8_16(address_space& space, offs_t offset, UINT16 d m_flashmemory[BYTE_XOR_LE(offset)] &= data; break; case bw_16: - *(UINT16*)(m_flashmemory.get()+offset) &= data; + *(uint16_t*)(m_flashmemory.get()+offset) &= data; break; } } @@ -633,7 +633,7 @@ void strataflash_device::write8_16(address_space& space, offs_t offset, UINT16 d m_prot_regs[BYTE_XOR_LE(offset-0x100)] &= data; break; case bw_16: - *(UINT16*)(m_prot_regs+(offset-0x100)) &= data; + *(uint16_t*)(m_prot_regs+(offset-0x100)) &= data; break; } } diff --git a/src/devices/machine/strata.h b/src/devices/machine/strata.h index 5092d1e891e..76ba982e526 100644 --- a/src/devices/machine/strata.h +++ b/src/devices/machine/strata.h @@ -7,7 +7,7 @@ class strataflash_device : public device_t, public device_nvram_interface { public: - strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // 8-bit access DECLARE_READ8_MEMBER( read8 ); @@ -36,8 +36,8 @@ private: bw_16 }; - UINT16 read8_16(address_space& space, offs_t offset, bus_width_t bus_width); - void write8_16(address_space& space, offs_t offset, UINT16 data, bus_width_t bus_width); + uint16_t read8_16(address_space& space, offs_t offset, bus_width_t bus_width); + void write8_16(address_space& space, offs_t offset, uint16_t data, bus_width_t bus_width); enum fm_mode_t { @@ -63,10 +63,10 @@ private: offs_t m_wrbuf_base; // start address in write buffer command int m_wrbuf_len; // count converted into byte length in write buffer command int m_wrbuf_count; // current count in write buffer command - UINT8* m_wrbuf; // write buffer used by write buffer command - std::unique_ptr m_flashmemory; // main FEEPROM area - UINT8* m_blocklock; // block lock flags - UINT8* m_prot_regs; // protection registers + uint8_t* m_wrbuf; // write buffer used by write buffer command + std::unique_ptr m_flashmemory; // main FEEPROM area + uint8_t* m_blocklock; // block lock flags + uint8_t* m_prot_regs; // protection registers }; extern const device_type STRATAFLASH; diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp index 84b9cd8fb51..7b6ac1f4bd5 100644 --- a/src/devices/machine/stvcd.cpp +++ b/src/devices/machine/stvcd.cpp @@ -79,10 +79,10 @@ int saturn_state::get_timing_command(void) } /* FIXME: assume Saturn CD-ROMs to have a 2 secs pre-gap for now. */ -int saturn_state::get_track_index(UINT32 fad) +int saturn_state::get_track_index(uint32_t fad) { - UINT32 rel_fad; - UINT8 track; + uint32_t rel_fad; + uint8_t track; if(cdrom_get_track_type(cdrom, cdrom_get_track(cdrom, fad)) != CD_TRACK_AUDIO) return 1; @@ -102,12 +102,12 @@ int saturn_state::sega_cdrom_get_adr_control(cdrom_file *file, int track) return BITSWAP8(cdrom_get_adr_control(file, cur_track),3,2,1,0,7,6,5,4); } -void saturn_state::cr_standard_return(UINT16 cur_status) +void saturn_state::cr_standard_return(uint16_t cur_status) { if ((cd_stat & 0x0f00) == CD_STAT_SEEK) { /* During seek state, values returned are from the target position */ - UINT8 seek_track = cdrom_get_track(cdrom, cd_fad_seek-150); + uint8_t seek_track = cdrom_get_track(cdrom, cd_fad_seek-150); cr1 = cur_status | (playtype << 7) | 0x00 | (cdda_repeat_count & 0xf); cr2 = (seek_track == 0xff) ? 0xffff : ((sega_cdrom_get_adr_control(cdrom, seek_track)<<8) | seek_track); @@ -129,7 +129,7 @@ void saturn_state::cr_standard_return(UINT16 cur_status) void saturn_state::cd_exec_command( void ) { - UINT32 temp; + uint32_t temp; if(cr1 != 0 && ((cr1 & 0xff00) != 0x5100) && @@ -301,7 +301,7 @@ void saturn_state::cd_exec_command( void ) case XFERTYPE32_GETDELETESECTOR: if (transpart->size > 0) { - INT32 i; + int32_t i; xfertype32 = XFERTYPE32_INVALID; @@ -342,8 +342,8 @@ void saturn_state::cd_exec_command( void ) break; case 0x10: // Play Disc. FAD is in lowest 7 bits of cr1 and all of cr2. - UINT32 start_pos,end_pos; - UINT8 play_mode; + uint32_t start_pos,end_pos; + uint8_t play_mode; CDROM_LOG(("%s:CD: Play Disc\n", machine().describe_context())) cd_stat = CD_STAT_PLAY; @@ -392,7 +392,7 @@ void saturn_state::cd_exec_command( void ) } else { - UINT8 end_track; + uint8_t end_track; end_track = (end_pos)>>8; fadstoplay = cdrom_get_track_start(cdrom, end_track) - cd_fad_seek; @@ -515,8 +515,8 @@ void saturn_state::cd_exec_command( void ) { case 0: // Get Q { - UINT32 msf_abs,msf_rel; - UINT8 track; + uint32_t msf_abs,msf_rel; + uint8_t track; cr1 = cd_stat | 0; cr2 = 10/2; cr3 = 0; @@ -584,7 +584,7 @@ void saturn_state::cd_exec_command( void ) case 0x30: // Set CD Device connection { - UINT8 parm; + uint8_t parm; // get operation parm = cr3>>8; @@ -630,7 +630,7 @@ void saturn_state::cd_exec_command( void ) // cr1 low + cr2 = FAD0, cr3 low + cr4 = FAD1 // cr3 hi = filter num. { - UINT8 fnum = (cr3>>8)&0xff; + uint8_t fnum = (cr3>>8)&0xff; CDROM_LOG(("%s:CD: Set Filter Range\n", machine().describe_context())) @@ -652,7 +652,7 @@ void saturn_state::cd_exec_command( void ) case 0x42: // Set Filter Subheader conditions { - UINT8 fnum = (cr3>>8)&0xff; + uint8_t fnum = (cr3>>8)&0xff; CDROM_LOG(("%s:CD: Set Filter Subheader conditions %x => chan %x masks %x fid %x vals %x\n", machine().describe_context(), fnum, cr1&0xff, cr2, cr3&0xff, cr4)) @@ -671,7 +671,7 @@ void saturn_state::cd_exec_command( void ) case 0x43: // Get Filter Subheader conditions { - UINT8 fnum = (cr3>>8)&0xff; + uint8_t fnum = (cr3>>8)&0xff; CDROM_LOG(("%s:CD: Set Filter Subheader conditions %x => chan %x masks %x fid %x vals %x\n", machine().describe_context(), fnum, cr1&0xff, cr2, cr3&0xff, cr4)) @@ -687,8 +687,8 @@ void saturn_state::cd_exec_command( void ) case 0x44: // Set Filter Mode { - UINT8 fnum = (cr3>>8)&0xff; - UINT8 mode = (cr1 & 0xff); + uint8_t fnum = (cr3>>8)&0xff; + uint8_t mode = (cr1 & 0xff); // initialize filter? if (mode & 0x80) @@ -709,7 +709,7 @@ void saturn_state::cd_exec_command( void ) case 0x45: // Get Filter Mode { - UINT8 fnum = (cr3>>8)&0xff; + uint8_t fnum = (cr3>>8)&0xff; cr1 = cd_stat | (filters[fnum].mode & 0xff); cr2 = 0; @@ -724,7 +724,7 @@ void saturn_state::cd_exec_command( void ) case 0x46: // Set Filter Connection { /* TODO: maybe condition false is cr3 low? */ - UINT8 fnum = (cr3>>8)&0xff; + uint8_t fnum = (cr3>>8)&0xff; CDROM_LOG(("%s:CD: Set Filter Connection %x => mode %x parm %04x\n", machine().describe_context(), fnum, cr1 & 0xf, cr2)) @@ -748,7 +748,7 @@ void saturn_state::cd_exec_command( void ) if((cr1 & 0xff) == 0x00) { - UINT8 bufnum = cr3>>8; + uint8_t bufnum = cr3>>8; if(bufnum < MAX_FILTERS) { @@ -842,7 +842,7 @@ void saturn_state::cd_exec_command( void ) case 0x51: // get # sectors used in a buffer { - UINT32 bufnum = cr3>>8; + uint32_t bufnum = cr3>>8; CDROM_LOG(("%s:CD: Get Sector Number (bufno %d) = %d blocks\n", machine().describe_context(), bufnum, cr4)) cr1 = cd_stat; @@ -873,16 +873,16 @@ void saturn_state::cd_exec_command( void ) case 0x52: // calculate actual size { - UINT32 bufnum = cr3>>8; - UINT32 sectoffs = cr2; - UINT32 numsect = cr4; + uint32_t bufnum = cr3>>8; + uint32_t sectoffs = cr2; + uint32_t numsect = cr4; CDROM_LOG(("%s:CD: Calculate actual size: buf %x offs %x numsect %x\n", machine().describe_context(), bufnum, sectoffs, numsect)) calcsize = 0; if (partitions[bufnum].size != -1) { - INT32 i; + int32_t i; for (i = 0; i < numsect; i++) { @@ -911,8 +911,8 @@ void saturn_state::cd_exec_command( void ) case 0x54: // get sector info { - UINT32 sectoffs = cr2 & 0xff; - UINT32 bufnum = cr3>>8; + uint32_t sectoffs = cr2 & 0xff; + uint32_t bufnum = cr3>>8; if (bufnum >= MAX_FILTERS || !partitions[bufnum].blocks[sectoffs]) { @@ -974,9 +974,9 @@ void saturn_state::cd_exec_command( void ) case 0x61: // get sector data { - UINT32 sectnum = cr4; - UINT32 sectofs = cr2; - UINT32 bufnum = cr3>>8; + uint32_t sectnum = cr4; + uint32_t sectofs = cr2; + uint32_t bufnum = cr3>>8; CDROM_LOG(("%s:CD: Get sector data (SN %d SO %d BN %d)\n", machine().describe_context(), sectnum, sectofs, bufnum)) @@ -1016,10 +1016,10 @@ void saturn_state::cd_exec_command( void ) case 0x62: // delete sector data { - UINT32 sectnum = cr4; - UINT32 sectofs = cr2; - UINT32 bufnum = cr3>>8; - INT32 i; + uint32_t sectnum = cr4; + uint32_t sectofs = cr2; + uint32_t bufnum = cr3>>8; + int32_t i; CDROM_LOG(("%s:CD: Delete sector data (SN %d SO %d BN %d)\n", machine().describe_context(), sectnum, sectofs, bufnum)) @@ -1069,9 +1069,9 @@ void saturn_state::cd_exec_command( void ) case 0x63: // get then delete sector data { - UINT32 sectnum = cr4; - UINT32 sectofs = cr2; - UINT32 bufnum = cr3>>8; + uint32_t sectnum = cr4; + uint32_t sectofs = cr2; + uint32_t bufnum = cr3>>8; CDROM_LOG(("%s:CD: Get and delete sector data (SN %d SO %d BN %d)\n", machine().describe_context(), sectnum, sectofs, bufnum)) @@ -1113,9 +1113,9 @@ void saturn_state::cd_exec_command( void ) case 0x64: // put sector data /* After Burner 2, Out Run, Fantasy Zone and Dungeon Master Nexus trips this */ { - UINT32 sectnum = cr4 & 0xff; - UINT32 sectofs = cr2; - UINT32 bufnum = cr3>>8; + uint32_t sectnum = cr4 & 0xff; + uint32_t sectofs = cr2; + uint32_t bufnum = cr3>>8; xfertype32 = XFERTYPE32_PUTSECTOR; @@ -1156,9 +1156,9 @@ void saturn_state::cd_exec_command( void ) case 0x66: // copy sector data /* TODO: Sword & Sorcery / Riglord Saga 2 */ { - UINT32 src_filter = (cr3>>8)&0xff; - UINT32 dst_filter = cr1&0xff; - UINT32 sectnum = cr4 & 0xff; + uint32_t src_filter = (cr3>>8)&0xff; + uint32_t dst_filter = cr1&0xff; + uint32_t sectnum = cr4 & 0xff; //cd_stat |= CD_STAT_TRANS; //transpart = &partitions[dst_filter]; @@ -1216,7 +1216,7 @@ void saturn_state::cd_exec_command( void ) case 0x71: // Read directory entry CDROM_LOG(("%s:CD: Read Directory Entry\n", machine().describe_context())) -// UINT32 read_dir; +// uint32_t read_dir; // read_dir = ((cr3&0xff)<<16)|cr4; @@ -1305,7 +1305,7 @@ void saturn_state::cd_exec_command( void ) case 0x74: // Read File CDROM_LOG(("%s:CD: Read File\n", machine().describe_context())) - UINT16 file_offset,file_filter,file_id,file_size; + uint16_t file_offset,file_filter,file_id,file_size; file_offset = ((cr1 & 0xff)<<8)|(cr2 & 0xff); /* correct? */ file_filter = cr3 >> 8; @@ -1421,7 +1421,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( saturn_state::stv_sector_cb ) // global functions void saturn_state::stvcd_reset( void ) { - INT32 i, j; + int32_t i, j; hirqmask = 0xffff; hirqreg = 0xffff; @@ -1507,9 +1507,9 @@ void saturn_state::stvcd_reset( void ) sh1_timer = machine().device("sh1_cmd"); } -saturn_state::blockT *saturn_state::cd_alloc_block(UINT8 *blknum) +saturn_state::blockT *saturn_state::cd_alloc_block(uint8_t *blknum) { - INT32 i; + int32_t i; // search the 200 available blocks for a free one for (i = 0; i < 200; i++) @@ -1538,9 +1538,9 @@ saturn_state::blockT *saturn_state::cd_alloc_block(UINT8 *blknum) void saturn_state::cd_free_block(blockT *blktofree) { - INT32 i; + int32_t i; - CDROM_LOG(("cd_free_block: %x\n", (UINT32)(uintptr_t)blktofree)) + CDROM_LOG(("cd_free_block: %x\n", (uint32_t)(uintptr_t)blktofree)) if(blktofree == nullptr) { @@ -1561,7 +1561,7 @@ void saturn_state::cd_free_block(blockT *blktofree) hirqreg &= ~BFUL; } -void saturn_state::cd_getsectoroffsetnum(UINT32 bufnum, UINT32 *sectoffs, UINT32 *sectnum) +void saturn_state::cd_getsectoroffsetnum(uint32_t bufnum, uint32_t *sectoffs, uint32_t *sectnum) { if (*sectoffs == 0xffff) { @@ -1576,9 +1576,9 @@ void saturn_state::cd_getsectoroffsetnum(UINT32 bufnum, UINT32 *sectoffs, UINT32 void saturn_state::cd_defragblocks(partitionT *part) { - UINT32 i, j; + uint32_t i, j; blockT *temp; - UINT8 temp2; + uint8_t temp2; for (i = 0; i < (MAX_BLOCKS-1); i++) { @@ -1598,9 +1598,9 @@ void saturn_state::cd_defragblocks(partitionT *part) } } -UINT16 saturn_state::cd_readWord(UINT32 addr) +uint16_t saturn_state::cd_readWord(uint32_t addr) { - UINT16 rv; + uint16_t rv; switch (addr & 0xffff) { @@ -1692,7 +1692,7 @@ UINT16 saturn_state::cd_readWord(UINT32 addr) case XFERTYPE_FILEINFO_254: // Lunar 2 if((xfercount % (6 * 2)) == 0) { - UINT32 temp = 2 + (xfercount / (0x6 * 2)); + uint32_t temp = 2 + (xfercount / (0x6 * 2)); // first 4 bytes = FAD finfbuf[0] = (curdir[temp].firstfad>>24)&0xff; @@ -1764,9 +1764,9 @@ UINT16 saturn_state::cd_readWord(UINT32 addr) } -UINT32 saturn_state::cd_readLong(UINT32 addr) +uint32_t saturn_state::cd_readLong(uint32_t addr) { - UINT32 rv = 0; + uint32_t rv = 0; switch (addr & 0xffff) { @@ -1800,7 +1800,7 @@ UINT32 saturn_state::cd_readLong(UINT32 addr) { if (xfertype32 == XFERTYPE32_GETDELETESECTOR) { - INT32 i; + int32_t i; CDROM_LOG(("Killing sectors in done\n")) @@ -1838,7 +1838,7 @@ UINT32 saturn_state::cd_readLong(UINT32 addr) } } -void saturn_state::cd_writeLong(UINT32 addr, UINT32 data) +void saturn_state::cd_writeLong(uint32_t addr, uint32_t data) { switch (addr & 0xffff) { @@ -1885,7 +1885,7 @@ void saturn_state::cd_writeLong(UINT32 addr, UINT32 data) } } -void saturn_state::cd_writeWord(UINT32 addr, UINT16 data) +void saturn_state::cd_writeWord(uint32_t addr, uint16_t data) { switch(addr & 0xffff) { @@ -1947,7 +1947,7 @@ void saturn_state::cd_writeWord(UINT32 addr, UINT16 data) READ32_MEMBER( saturn_state::stvcd_r ) { - UINT32 rv = 0; + uint32_t rv = 0; offset <<= 2; @@ -2057,11 +2057,11 @@ WRITE32_MEMBER( saturn_state::stvcd_w ) } // iso9660 parsing -void saturn_state::read_new_dir(UINT32 fileno) +void saturn_state::read_new_dir(uint32_t fileno) { int foundpd, i; - UINT32 cfad;//, dirfad; - UINT8 sect[2048]; + uint32_t cfad;//, dirfad; + uint8_t sect[2048]; if (fileno == 0xffffff) { @@ -2138,11 +2138,11 @@ void saturn_state::read_new_dir(UINT32 fileno) } // makes the directory pointed to by FAD current -void saturn_state::make_dir_current(UINT32 fad) +void saturn_state::make_dir_current(uint32_t fad) { int i; - UINT32 nextent, numentries; - std::vector sect(MAX_DIR_SIZE); + uint32_t nextent, numentries; + std::vector sect(MAX_DIR_SIZE); direntryT *curentry; memset(§[0], 0, MAX_DIR_SIZE); @@ -2343,7 +2343,7 @@ void saturn_state::cd_readTOC(void) tocbuf[tocptr+11] = fad&0xff; } -saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype, UINT8 *p_ok) +saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype, uint8_t *p_ok) { int match, keepgoing; partitionT *filterprt; @@ -2499,7 +2499,7 @@ saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype, } // read a single sector off the CD, applying the current filter(s) as necessary -saturn_state::partitionT *saturn_state::cd_read_filtered_sector(INT32 fad, UINT8 *p_ok) +saturn_state::partitionT *saturn_state::cd_read_filtered_sector(int32_t fad, uint8_t *p_ok) { int trktype; @@ -2552,7 +2552,7 @@ void saturn_state::cd_playdata( void ) { if ((cd_stat & 0x0f00) == CD_STAT_SEEK) { - INT32 fad_diff; + int32_t fad_diff; //printf("PRE %08x %08x %08x %d\n",cd_curfad,cd_fad_seek,cd_stat,cd_fad_seek - cd_curfad); fad_diff = (cd_fad_seek - cd_curfad); @@ -2588,7 +2588,7 @@ void saturn_state::cd_playdata( void ) if (cdrom) { - UINT8 p_ok; + uint8_t p_ok; if(cdrom_get_track_type(cdrom, cdrom_get_track(cdrom, cd_curfad)) != CD_TRACK_AUDIO) { @@ -2639,7 +2639,7 @@ void saturn_state::cd_playdata( void ) } // loads a single sector off the CD, anywhere from FAD 150 on up -void saturn_state::cd_readblock(UINT32 fad, UINT8 *dat) +void saturn_state::cd_readblock(uint32_t fad, uint8_t *dat) { if (cdrom) { diff --git a/src/devices/machine/t10mmc.cpp b/src/devices/machine/t10mmc.cpp index b6f0fa68f34..bf16dc0d8d5 100644 --- a/src/devices/machine/t10mmc.cpp +++ b/src/devices/machine/t10mmc.cpp @@ -392,10 +392,10 @@ void t10mmc::ExecCommand() // // Read data from the device resulting from the execution of a command -void t10mmc::ReadData( UINT8 *data, int dataLength ) +void t10mmc::ReadData( uint8_t *data, int dataLength ) { - UINT32 temp; - UINT8 tmp_buffer[2048]; + uint32_t temp; + uint8_t tmp_buffer[2048]; switch ( command[0] ) { @@ -515,7 +515,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) data[6] = cdrom_get_track(m_cdrom, m_last_lba) + 1; // track data[7] = 0; // index - UINT32 frame = m_last_lba; + uint32_t frame = m_last_lba; if (msf) { @@ -603,7 +603,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) data[dptr++] = track; data[dptr++] = 0; - UINT32 tstart = cdrom_get_track_start(m_cdrom, cdrom_track); + uint32_t tstart = cdrom_get_track_start(m_cdrom, cdrom_track); if (msf) { @@ -633,7 +633,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) data[dptr++] = 1; data[dptr++] = 0; - UINT32 tstart = cdrom_get_track_start(m_cdrom, 0); + uint32_t tstart = cdrom_get_track_start(m_cdrom, 0); if (msf) { @@ -714,7 +714,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) // // Write data to the CD-ROM device as part of the execution of a command -void t10mmc::WriteData( UINT8 *data, int dataLength ) +void t10mmc::WriteData( uint8_t *data, int dataLength ) { switch (command[ 0 ]) { diff --git a/src/devices/machine/t10mmc.h b/src/devices/machine/t10mmc.h index 8b2f5a73cd7..b473a6f9c2b 100644 --- a/src/devices/machine/t10mmc.h +++ b/src/devices/machine/t10mmc.h @@ -24,8 +24,8 @@ public: virtual void SetDevice( void *device ) override; virtual void GetDevice( void **device ) override; 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; protected: virtual void t10_start(device_t &device) override; @@ -57,11 +57,11 @@ protected: cdda_device *m_cdda; cdrom_file *m_cdrom; - UINT32 m_lba; - UINT32 m_blocks; - UINT32 m_last_lba; - UINT32 m_num_subblocks; - UINT32 m_cur_subblock; + uint32_t m_lba; + uint32_t m_blocks; + uint32_t m_last_lba; + uint32_t m_num_subblocks; + uint32_t m_cur_subblock; int m_audio_sense; device_t *m_device; diff --git a/src/devices/machine/t10sbc.cpp b/src/devices/machine/t10sbc.cpp index 623d73acf42..2ac7eb2fab3 100644 --- a/src/devices/machine/t10sbc.cpp +++ b/src/devices/machine/t10sbc.cpp @@ -138,7 +138,7 @@ void t10sbc::ExecCommand() } } -void t10sbc::ReadData( UINT8 *data, int dataLength ) +void t10sbc::ReadData( uint8_t *data, int dataLength ) { // if we're a drive without a disk, return all zeroes if (!m_disk) @@ -195,7 +195,7 @@ void t10sbc::ReadData( UINT8 *data, int dataLength ) case T10SBC_CMD_READ_CAPACITY: // READ CAPACITY { hard_disk_info *info; - UINT32 temp; + uint32_t temp; info = hard_disk_get_info(m_disk); @@ -222,7 +222,7 @@ void t10sbc::ReadData( UINT8 *data, int dataLength ) } } -void t10sbc::WriteData( UINT8 *data, int dataLength ) +void t10sbc::WriteData( uint8_t *data, int dataLength ) { if (!m_disk) { diff --git a/src/devices/machine/t10sbc.h b/src/devices/machine/t10sbc.h index 1ca570c89ca..4c3c45c0393 100644 --- a/src/devices/machine/t10sbc.h +++ b/src/devices/machine/t10sbc.h @@ -23,8 +23,8 @@ public: virtual void SetDevice( void *device ) override; virtual void GetDevice( void **device ) override; 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; protected: virtual void t10_start(device_t &device) override; @@ -32,8 +32,8 @@ protected: harddisk_image_device *m_image; - UINT32 m_lba; - UINT32 m_blocks; + uint32_t m_lba; + uint32_t m_blocks; hard_disk_file *m_disk; device_t *m_device; diff --git a/src/devices/machine/t10spc.cpp b/src/devices/machine/t10spc.cpp index 906065e72ea..59547374f58 100644 --- a/src/devices/machine/t10spc.cpp +++ b/src/devices/machine/t10spc.cpp @@ -80,7 +80,7 @@ void t10spc::ExecCommand() } } -void t10spc::ReadData( UINT8 *data, int dataLength ) +void t10spc::ReadData( uint8_t *data, int dataLength ) { switch( command[ 0 ] ) { @@ -123,7 +123,7 @@ void t10spc::ReadData( UINT8 *data, int dataLength ) } } -void t10spc::WriteData( UINT8 *data, int dataLength ) +void t10spc::WriteData( uint8_t *data, int dataLength ) { switch( command[ 0 ] ) { @@ -136,7 +136,7 @@ void t10spc::WriteData( UINT8 *data, int dataLength ) } } -void t10spc::SetCommand( UINT8 *_command, int _commandLength ) +void t10spc::SetCommand( uint8_t *_command, int _commandLength ) { if( _commandLength > sizeof( command ) ) { diff --git a/src/devices/machine/t10spc.h b/src/devices/machine/t10spc.h index abae1157bd2..025d0a5361e 100644 --- a/src/devices/machine/t10spc.h +++ b/src/devices/machine/t10spc.h @@ -22,10 +22,10 @@ public: virtual void SetDevice( void *device ) = 0; virtual void GetDevice( void **device ) = 0; - virtual void SetCommand( UINT8 *command, int commandLength ); + virtual void SetCommand( uint8_t *command, int commandLength ); virtual void ExecCommand(); - virtual void WriteData( UINT8 *data, int dataLength ); - virtual void ReadData( UINT8 *data, int dataLength ); + virtual void WriteData( uint8_t *data, int dataLength ); + virtual void ReadData( uint8_t *data, int dataLength ); void GetLength( int *transferLength ) { *transferLength = m_transfer_length; } virtual void GetPhase( int *phase ) { *phase = m_phase; } @@ -33,8 +33,8 @@ protected: virtual void t10_start(device_t &device); virtual void t10_reset(); - int SCSILengthFromUINT8( UINT8 *length ) { if( *length == 0 ) { return 256; } return *length; } - int SCSILengthFromUINT16( UINT8 *length ) { return ( *(length) << 8 ) | *(length + 1 ); } + int SCSILengthFromUINT8( uint8_t *length ) { if( *length == 0 ) { return 256; } return *length; } + int SCSILengthFromUINT16( uint8_t *length ) { return ( *(length) << 8 ) | *(length + 1 ); } enum sense_key_t { @@ -117,15 +117,15 @@ protected: void set_sense(sense_key_t key, sense_asc_ascq_t asc_ascq); - UINT8 command[ 32 ]; + uint8_t command[ 32 ]; int commandLength; int m_transfer_length; int m_phase; status_code_t m_status_code; - UINT8 m_sense_key; - UINT8 m_sense_asc; - UINT8 m_sense_ascq; - UINT32 m_sense_information; + uint8_t m_sense_key; + uint8_t m_sense_asc; + uint8_t m_sense_ascq; + uint32_t m_sense_information; int m_sector_bytes; device_t *m_device; }; diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp index affda6fa455..c6ba0280728 100644 --- a/src/devices/machine/tc009xlvc.cpp +++ b/src/devices/machine/tc009xlvc.cpp @@ -27,8 +27,8 @@ WRITE8_MEMBER(tc0091lvc_device::tc0091lvc_paletteram_w) m_palette_ram[offset & 0x1ff] = data; { - UINT8 r,g,b,i; - UINT16 pal; + uint8_t r,g,b,i; + uint16_t pal; pal = (m_palette_ram[offset & ~1]<<0) | (m_palette_ram[offset | 1]<<8); @@ -164,7 +164,7 @@ static ADDRESS_MAP_START( tc0091lvc_map8, AS_0, 8, tc0091lvc_device ) AM_RANGE(0x080000, 0x0801ff) AM_READWRITE(tc0091lvc_paletteram_r,tc0091lvc_paletteram_w) ADDRESS_MAP_END -tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TC0091LVC, "Taito TC0091LVC", tag, owner, clock, "tc0091lvc", __FILE__) , device_memory_interface(mconfig, *this) , m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, nullptr, *ADDRESS_MAP_NAME(tc0091lvc_map8)) @@ -225,7 +225,7 @@ TILE_GET_INFO_MEMBER(tc0091lvc_device::get_bg1_tile_info) TILE_GET_INFO_MEMBER(tc0091lvc_device::get_tx_tile_info) { int attr = m_tvram[2 * tile_index + 1]; - UINT16 code = m_tvram[2 * tile_index] + uint16_t code = m_tvram[2 * tile_index] | ((attr & 0x07) << 8); SET_TILE_INFO_MEMBER(m_gfx_index, @@ -286,7 +286,7 @@ void tc0091lvc_device::device_start() //printf("m_gfx_index %d\n", m_gfx_index); palette_device &palette = m_gfxdecode->palette(); - m_gfxdecode->set_gfx(m_gfx_index, std::make_unique(palette, char_layout, (UINT8 *)m_pcg_ram, 0, palette.entries() / 16, 0)); + m_gfxdecode->set_gfx(m_gfx_index, std::make_unique(palette, char_layout, (uint8_t *)m_pcg_ram, 0, palette.entries() / 16, 0)); } void tc0091lvc_device::device_reset() @@ -299,7 +299,7 @@ const address_space_config *tc0091lvc_device::memory_space_config(address_spacen } -void tc0091lvc_device::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 global_flip ) +void tc0091lvc_device::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t global_flip ) { gfx_element *gfx = m_gfxdecode->gfx(1); int count; @@ -329,11 +329,11 @@ void tc0091lvc_device::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap } } -UINT32 tc0091lvc_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t tc0091lvc_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT32 count; + uint32_t count; int x,y; - UINT8 global_flip; + uint8_t global_flip; bitmap.fill(m_gfxdecode->palette().black_pen(), cliprect); diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h index 3f737cbf044..ec1c3e52e58 100644 --- a/src/devices/machine/tc009xlvc.h +++ b/src/devices/machine/tc009xlvc.h @@ -17,7 +17,7 @@ class tc0091lvc_device : public device_t, public device_memory_interface { public: - tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration static void static_set_gfxdecode_tag(device_t &device, const char *tag); @@ -46,14 +46,14 @@ public: TILE_GET_INFO_MEMBER(get_bg1_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); - UINT8 *m_pcg1_ram; - UINT8 *m_pcg2_ram; - UINT8 *m_vram0; - UINT8 *m_vram1; - UINT8 *m_sprram; - UINT8 *m_tvram; - UINT8 m_bg0_scroll[4]; - UINT8 m_bg1_scroll[4]; + uint8_t *m_pcg1_ram; + uint8_t *m_pcg2_ram; + uint8_t *m_vram0; + uint8_t *m_vram1; + uint8_t *m_sprram; + uint8_t *m_tvram; + uint8_t m_bg0_scroll[4]; + uint8_t m_bg1_scroll[4]; tilemap_t *bg0_tilemap; tilemap_t *bg1_tilemap; @@ -61,14 +61,14 @@ public: int m_gfx_index; // for RAM tiles - UINT8 m_palette_ram[0x200]; - UINT8 m_vregs[0x100]; - UINT8 m_bitmap_ram[0x20000]; - UINT8 m_pcg_ram[0x10000]; - UINT8 m_sprram_buffer[0x400]; + uint8_t m_palette_ram[0x200]; + uint8_t m_vregs[0x100]; + uint8_t m_bitmap_ram[0x20000]; + uint8_t m_pcg_ram[0x10000]; + uint8_t m_sprram_buffer[0x400]; - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 global_flip); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t global_flip); void screen_eof(void); protected: diff --git a/src/devices/machine/terminal.cpp b/src/devices/machine/terminal.cpp index e4ffb2d3c3c..4f73b403adb 100644 --- a/src/devices/machine/terminal.cpp +++ b/src/devices/machine/terminal.cpp @@ -8,7 +8,7 @@ IMPLEMENTATION ***************************************************************************/ -static const UINT8 terminal_font[256*16] = +static const uint8_t terminal_font[256*16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -140,7 +140,7 @@ static const UINT8 terminal_font[256*16] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -generic_terminal_device::generic_terminal_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) +generic_terminal_device::generic_terminal_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_palette(*this, "palette") , m_io_term_conf(*this, "TERM_CONF") @@ -153,7 +153,7 @@ generic_terminal_device::generic_terminal_device(const machine_config &mconfig, { } -generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : generic_terminal_device(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock, "generic_terminal", __FILE__) { } @@ -164,7 +164,7 @@ void generic_terminal_device::scroll_line() memset(m_buffer + TERMINAL_WIDTH*(TERMINAL_HEIGHT-1),0x20,TERMINAL_WIDTH); } -void generic_terminal_device::write_char(UINT8 data) +void generic_terminal_device::write_char(uint8_t data) { m_buffer[m_y_pos*TERMINAL_WIDTH+m_x_pos] = data; m_x_pos++; @@ -187,7 +187,7 @@ void generic_terminal_device::clear() m_y_pos = 0; } -void generic_terminal_device::term_write(UINT8 data) +void generic_terminal_device::term_write(uint8_t data) { if (data > 0x1f) { @@ -196,7 +196,7 @@ void generic_terminal_device::term_write(UINT8 data) } else { - const UINT16 options = m_io_term_conf->read(); + const uint16_t options = m_io_term_conf->read(); switch(data) { case 0x07: // bell @@ -209,7 +209,7 @@ void generic_terminal_device::term_write(UINT8 data) break; case 0x09: // horizontal tab - m_x_pos = (std::min)((m_x_pos & 0xf8) + 8, TERMINAL_WIDTH - 1); + m_x_pos = (std::min)((m_x_pos & 0xf8) + 8, TERMINAL_WIDTH - 1); break; case 0x0d: // carriage return @@ -245,12 +245,12 @@ void generic_terminal_device::term_write(UINT8 data) /*************************************************************************** VIDEO HARDWARE ***************************************************************************/ -UINT32 generic_terminal_device::update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t generic_terminal_device::update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - const UINT16 options = m_io_term_conf->read(); - UINT16 cursor = m_y_pos * TERMINAL_WIDTH + m_x_pos; - UINT8 y,ra,chr,gfx; - UINT16 sy=0,ma=0,x; + const uint16_t options = m_io_term_conf->read(); + uint16_t cursor = m_y_pos * TERMINAL_WIDTH + m_x_pos; + uint8_t y,ra,chr,gfx; + uint16_t sy=0,ma=0,x; switch (options & 0x030) { @@ -272,7 +272,7 @@ UINT32 generic_terminal_device::update(screen_device &device, bitmap_rgb32 &bitm { for (ra = 0; ra < 10; ra++) { - UINT32 *p = &bitmap.pix32(sy++); + uint32_t *p = &bitmap.pix32(sy++); for (x = ma; x < ma + TERMINAL_WIDTH; x++) { diff --git a/src/devices/machine/terminal.h b/src/devices/machine/terminal.h index 5b8112c9823..47988d64138 100644 --- a/src/devices/machine/terminal.h +++ b/src/devices/machine/terminal.h @@ -27,14 +27,14 @@ INPUT_PORTS_EXTERN( generic_terminal ); class generic_terminal_device : public device_t { public: - generic_terminal_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); - generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + generic_terminal_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); + generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_keyboard_callback(device_t &device, _Object object) { return downcast(device).m_keyboard_cb.set_callback(object); } DECLARE_WRITE8_MEMBER(write) { term_write(data); } DECLARE_WRITE8_MEMBER(kbd_put); - UINT32 update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect); virtual ioport_constructor device_input_ports() const override; virtual machine_config_constructor device_mconfig_additions() const override; @@ -42,25 +42,25 @@ public: protected: enum { BELL_TIMER_ID = 20'000 }; - virtual void term_write(UINT8 data); + virtual void term_write(uint8_t data); virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual void send_key(UINT8 code) { m_keyboard_cb((offs_t)0, code); } + virtual void send_key(uint8_t code) { m_keyboard_cb((offs_t)0, code); } optional_device m_palette; required_ioport m_io_term_conf; - UINT8 m_buffer[TERMINAL_WIDTH * 50]; // make big enough for teleprinter - UINT8 m_x_pos; + uint8_t m_buffer[TERMINAL_WIDTH * 50]; // make big enough for teleprinter + uint8_t m_x_pos; private: void scroll_line(); - void write_char(UINT8 data); + void write_char(uint8_t data); void clear(); - UINT8 m_framecnt; - UINT8 m_y_pos; + uint8_t m_framecnt; + uint8_t m_y_pos; emu_timer *m_bell_timer; required_device m_beeper; diff --git a/src/devices/machine/timehelp.h b/src/devices/machine/timehelp.h index 38adfdee502..fa779031344 100644 --- a/src/devices/machine/timehelp.h +++ b/src/devices/machine/timehelp.h @@ -16,17 +16,17 @@ class time_helper { public: - static inline UINT8 make_bcd(UINT8 data) + static inline uint8_t make_bcd(uint8_t data) { return (((data / 10) % 10) << 4) + (data % 10); } - static inline UINT8 from_bcd(UINT8 data) + static inline uint8_t from_bcd(uint8_t data) { return (((data >> 4) & 15) * 10) + (data & 15); } - static int inc_bcd(UINT8 *data, int mask, int min, int max) + static int inc_bcd(uint8_t *data, int mask, int min, int max) { int bcd = (*data + 1) & mask; int carry = 0; diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp index e11cd089b1c..3cbef2330d4 100644 --- a/src/devices/machine/timekpr.cpp +++ b/src/devices/machine/timekpr.cpp @@ -63,7 +63,7 @@ const device_type MK48T12 = &device_creator; INLINE FUNCTIONS ***************************************************************************/ -static void counter_to_ram( UINT8 *data, int offset, int counter ) +static void counter_to_ram( uint8_t *data, int offset, int counter ) { if( offset >= 0 ) { @@ -71,7 +71,7 @@ static void counter_to_ram( UINT8 *data, int offset, int counter ) } } -static int counter_from_ram( UINT8 *data, int offset ) +static int counter_from_ram( uint8_t *data, int offset ) { if( offset >= 0 ) { @@ -88,7 +88,7 @@ static int counter_from_ram( UINT8 *data, int offset ) // timekeeper_device_config - constructor //------------------------------------------------- -timekeeper_device::timekeeper_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, int size) +timekeeper_device::timekeeper_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, int size) : device_t(mconfig, type, name, tag, owner, clock, shortname, source) , device_nvram_interface(mconfig, *this) , m_default_data(*this, DEVICE_SELF, size) @@ -96,7 +96,7 @@ timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type { } -m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : timekeeper_device(mconfig, M48T02, "M48T02 Timekeeper", tag, owner, clock, "m48t02", __FILE__, 0x800) { m_offset_control = 0x7f8; @@ -111,7 +111,7 @@ m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : timekeeper_device(mconfig, M48T35, "M48T35 Timekeeper", tag, owner, clock, "m48t35", __FILE__, 0x8000) { m_offset_control = 0x7ff8; @@ -126,7 +126,7 @@ m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : timekeeper_device(mconfig, M48T37, "M48T37 Timekeeper", tag, owner, clock, "m48t37", __FILE__, 0x8000) { m_offset_control = 0x7ff8; @@ -141,7 +141,7 @@ m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = 0x7ff0; } -m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : timekeeper_device(mconfig, M48T58, "M48T58 Timekeeper", tag, owner, clock, "m48t58", __FILE__, 0x2000) { m_offset_control = 0x1ff8; @@ -156,7 +156,7 @@ m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : timekeeper_device(mconfig, MK48T08, "MK48T08 Timekeeper", tag, owner, clock, "m48t08", __FILE__, 0x2000) { m_offset_control = 0x1ff8; @@ -171,7 +171,7 @@ mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, d m_offset_flags = 0x1ff0; } -mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : timekeeper_device(mconfig, MK48T12, "MK48T12 Timekeeper", tag, owner, clock, "m48t12", __FILE__, 0x2000) { m_offset_control = 0x7f8; @@ -277,13 +277,13 @@ void timekeeper_device::device_timer(emu_timer &timer, device_timer_id id, int p 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_day, MASK_DAY, 0x01, 0x07 ); - UINT8 month = time_helper::from_bcd( m_month ); - UINT8 year = time_helper::from_bcd( m_year ); + uint8_t month = time_helper::from_bcd( m_month ); + uint8_t year = time_helper::from_bcd( m_year ); if( month == 2 && ( year % 4 ) == 0 ) { @@ -353,7 +353,7 @@ WRITE8_MEMBER( timekeeper_device::write ) READ8_MEMBER( timekeeper_device::read ) { - UINT8 result = m_data[ offset ]; + uint8_t result = m_data[ offset ]; if( offset == m_offset_date && type() == M48T58 ) { result &= ~DATE_BL; diff --git a/src/devices/machine/timekpr.h b/src/devices/machine/timekpr.h index e0e9aa6e60d..a9ecd6ae6b5 100644 --- a/src/devices/machine/timekpr.h +++ b/src/devices/machine/timekpr.h @@ -59,7 +59,7 @@ class timekeeper_device : public device_t, { protected: // construction/destruction - timekeeper_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, int size); + timekeeper_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, int size); public: DECLARE_WRITE8_MEMBER( write ); @@ -81,18 +81,18 @@ private: void counters_from_ram(); // internal state - UINT8 m_control; - UINT8 m_seconds; - UINT8 m_minutes; - UINT8 m_hours; - UINT8 m_day; - UINT8 m_date; - UINT8 m_month; - UINT8 m_year; - UINT8 m_century; - - std::vector m_data; - optional_region_ptr m_default_data; + uint8_t m_control; + uint8_t m_seconds; + uint8_t m_minutes; + uint8_t m_hours; + uint8_t m_day; + uint8_t m_date; + uint8_t m_month; + uint8_t m_year; + uint8_t m_century; + + std::vector m_data; + optional_region_ptr m_default_data; protected: int m_size; @@ -111,37 +111,37 @@ protected: class m48t02_device : public timekeeper_device { public: - m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class m48t35_device : public timekeeper_device { public: - m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class m48t37_device : public timekeeper_device { public: - m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class m48t58_device : public timekeeper_device { public: - m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class mk48t08_device : public timekeeper_device { public: - mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class mk48t12_device : public timekeeper_device { public: - mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // device type definition diff --git a/src/devices/machine/tmc0430.cpp b/src/devices/machine/tmc0430.cpp index dc1d8adc27e..d2547467abe 100644 --- a/src/devices/machine/tmc0430.cpp +++ b/src/devices/machine/tmc0430.cpp @@ -103,7 +103,7 @@ /* Constructor. */ -tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMC0430, "TMC0430 device (GROM)", tag, owner, clock, "grom", __FILE__), m_gromready(*this), m_current_clock_level(CLEAR_LINE), @@ -202,7 +202,7 @@ WRITE8_MEMBER( tmc0430_device::set_lines ) WRITE_LINE_MEMBER( tmc0430_device::gclock_in ) { int bank = 0; - UINT16 baddr = 0; + uint16_t baddr = 0; // Wait for rising edge line_state oldlevel = (line_state)m_current_clock_level; @@ -277,7 +277,7 @@ READ8Z_MEMBER( tmc0430_device::readz ) { // Address reading is destructive *value = (m_address & 0xff00)>>8; - UINT8 lsb = (m_address & 0x00ff); + uint8_t lsb = (m_address & 0x00ff); m_address = (lsb << 8) | lsb; // see [1], section 2.5.3 if (TRACE_DETAIL) logerror("GROM %d return address %02x\n", m_ident>>13, *value); } diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h index 9517f7ab40f..a8efe012bdc 100644 --- a/src/devices/machine/tmc0430.h +++ b/src/devices/machine/tmc0430.h @@ -16,8 +16,8 @@ extern const device_type TMC0430; #ifndef READ8Z_MEMBER -#define DECLARE_READ8Z_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 *value, ATTR_UNUSED UINT8 mem_mask = 0xff) -#define READ8Z_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 *value, ATTR_UNUSED UINT8 mem_mask) +#define DECLARE_READ8Z_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t *value, ATTR_UNUSED uint8_t mem_mask = 0xff) +#define READ8Z_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t *value, ATTR_UNUSED uint8_t mem_mask) #endif enum @@ -29,7 +29,7 @@ enum class tmc0430_device : public device_t { public: - tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_ready_wr_callback(device_t &device, _Object object) { return downcast(device).m_gromready.set_callback(object); } @@ -97,13 +97,13 @@ private: // The address pointer is always expected to be in the range 0x0000 - 0xffff, even // when this GROM is not addressed. - UINT16 m_address; + uint16_t m_address; /* GROM data buffer. */ - UINT8 m_buffer; + uint8_t m_buffer; /* Pointer to the memory region contained in this GROM. */ - UINT8 *m_memptr; + uint8_t *m_memptr; }; #define MCFG_GROM_ADD(_tag, _ident, _region, _offset, _ready) \ diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp index c2526699070..bd5326a08e6 100644 --- a/src/devices/machine/tmp68301.cpp +++ b/src/devices/machine/tmp68301.cpp @@ -92,14 +92,14 @@ READ16_MEMBER(tmp68301_device::pdr_r) WRITE16_MEMBER(tmp68301_device::pdr_w) { - UINT16 old = m_pdr; + uint16_t old = m_pdr; COMBINE_DATA(&m_pdr); m_pdr = (old & ~m_pdir) | (m_pdr & m_pdir); m_out_parallel_cb(0, m_pdr, mem_mask); } -tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMP68301, "TMP68301", tag, owner, clock, "tmp68301", __FILE__), device_memory_interface(mconfig, *this), m_in_parallel_cb(*this), @@ -172,7 +172,7 @@ const address_space_config *tmp68301_device::memory_space_config(address_spacenu // read_byte - read a byte at the given address //------------------------------------------------- -inline UINT16 tmp68301_device::read_word(offs_t address) +inline uint16_t tmp68301_device::read_word(offs_t address) { return space(AS_0).read_word(address << 1); } @@ -181,7 +181,7 @@ inline UINT16 tmp68301_device::read_word(offs_t address) // write_byte - write a byte at the given address //------------------------------------------------- -inline void tmp68301_device::write_word(offs_t address, UINT16 data) +inline void tmp68301_device::write_word(offs_t address, uint16_t data) { space(AS_0).write_word(address << 1, data); } @@ -196,9 +196,9 @@ IRQ_CALLBACK_MEMBER(tmp68301_device::irq_callback) TIMER_CALLBACK_MEMBER( tmp68301_device::timer_callback ) { int i = param; - UINT16 TCR = m_regs[(0x200 + i * 0x20)/2]; - UINT16 ICR = m_regs[0x8e/2+i]; // Interrupt Controller Register (ICR7..9) - UINT16 IVNR = m_regs[0x9a/2]; // Interrupt Vector Number Register (IVNR) + uint16_t TCR = m_regs[(0x200 + i * 0x20)/2]; + uint16_t ICR = m_regs[0x8e/2+i]; // Interrupt Controller Register (ICR7..9) + uint16_t IVNR = m_regs[0x9a/2]; // Interrupt Vector Number Register (IVNR) // logerror("s: callback timer %04X, j = %d\n",machine.describe_context(),i,tcount); @@ -228,9 +228,9 @@ TIMER_CALLBACK_MEMBER( tmp68301_device::timer_callback ) void tmp68301_device::update_timer( int i ) { - UINT16 TCR = m_regs[(0x200 + i * 0x20)/2]; - UINT16 MAX1 = m_regs[(0x204 + i * 0x20)/2]; - UINT16 MAX2 = m_regs[(0x206 + i * 0x20)/2]; + uint16_t TCR = m_regs[(0x200 + i * 0x20)/2]; + uint16_t MAX1 = m_regs[(0x204 + i * 0x20)/2]; + uint16_t MAX2 = m_regs[(0x206 + i * 0x20)/2]; int max = 0; attotime duration = attotime::zero; @@ -278,7 +278,7 @@ void tmp68301_device::update_irq_state() /* Take care of external interrupts */ - UINT16 IVNR = m_regs[0x9a/2]; // Interrupt Vector Number Register (IVNR) + uint16_t IVNR = m_regs[0x9a/2]; // Interrupt Vector Number Register (IVNR) for (i = 0; i < 3; i++) { @@ -286,7 +286,7 @@ void tmp68301_device::update_irq_state() !(m_imr & (1< static devcb_base &set_in_parallel_callback(device_t &device, _Object object) { return downcast(device).m_in_parallel_cb.set_callback(object); } @@ -63,25 +63,25 @@ private: devcb_write16 m_out_parallel_cb; // internal state - UINT16 m_regs[0x400]; + uint16_t m_regs[0x400]; - UINT8 m_IE[3]; // 3 External Interrupt Lines + uint8_t m_IE[3]; // 3 External Interrupt Lines emu_timer *m_tmp68301_timer[3]; // 3 Timers - UINT16 m_irq_vector[8]; + uint16_t m_irq_vector[8]; TIMER_CALLBACK_MEMBER( timer_callback ); void update_timer( int i ); void update_irq_state(); - UINT16 m_imr; - UINT16 m_iisr; - UINT16 m_scr; - UINT16 m_pdir; - UINT16 m_pdr; + uint16_t m_imr; + uint16_t m_iisr; + uint16_t m_scr; + uint16_t m_pdir; + uint16_t m_pdr; - inline UINT16 read_word(offs_t address); - inline void write_word(offs_t address, UINT16 data); + inline uint16_t read_word(offs_t address); + inline void write_word(offs_t address, uint16_t data); const address_space_config m_space_config; }; diff --git a/src/devices/machine/tms1024.cpp b/src/devices/machine/tms1024.cpp index 6e7d5c206e7..d9a268a1280 100644 --- a/src/devices/machine/tms1024.cpp +++ b/src/devices/machine/tms1024.cpp @@ -24,19 +24,19 @@ const device_type TMS1025 = &device_creator; // constructor //------------------------------------------------- -tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMS1024, "TMS1024 I/O Expander", tag, owner, clock, "tms1024", __FILE__), m_h(0), m_s(0), m_std(0), m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_write_port5(*this), m_write_port6(*this), m_write_port7(*this) { } -tms1024_device::tms1024_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) +tms1024_device::tms1024_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_h(0), m_s(0), m_std(0), m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_write_port5(*this), m_write_port6(*this), m_write_port7(*this) { } -tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tms1024_device(mconfig, TMS1025, "TMS1025 I/O Expander", tag, owner, clock, "tms1025", __FILE__) { } diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h index e351f87d2fb..323b083e841 100644 --- a/src/devices/machine/tms1024.h +++ b/src/devices/machine/tms1024.h @@ -64,8 +64,8 @@ enum class tms1024_device : public device_t { public: - tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - tms1024_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); + tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms1024_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 static devcb_base &set_write_port1_callback(device_t &device, _Object object) { return downcast(device).m_write_port1.set_callback(object); } @@ -85,9 +85,9 @@ protected: virtual void device_start() override; virtual void device_reset() override; - UINT8 m_h; // 4-bit data latch - UINT8 m_s; // 3-bit port select - UINT8 m_std; // strobe pin + uint8_t m_h; // 4-bit data latch + uint8_t m_s; // 3-bit port select + uint8_t m_std; // strobe pin // callbacks devcb_write8 m_write_port1, m_write_port2, m_write_port3, m_write_port4, m_write_port5, m_write_port6, m_write_port7; @@ -98,7 +98,7 @@ protected: class tms1025_device : public tms1024_device { public: - tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; diff --git a/src/devices/machine/tms5501.cpp b/src/devices/machine/tms5501.cpp index 71f3f298cde..404f3eaacd5 100644 --- a/src/devices/machine/tms5501.cpp +++ b/src/devices/machine/tms5501.cpp @@ -17,7 +17,7 @@ #define LOG 0 -const UINT8 tms5501_device::rst_vector[] = { 0xc7, 0xcf, 0xd7, 0xdf, 0xe7, 0xef, 0xf7, 0xff }; +const uint8_t tms5501_device::rst_vector[] = { 0xc7, 0xcf, 0xd7, 0xdf, 0xe7, 0xef, 0xf7, 0xff }; @@ -53,7 +53,7 @@ ADDRESS_MAP_END // tms5501_device - constructor //------------------------------------------------- -tms5501_device::tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +tms5501_device::tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMS5501, "TMS5501", tag, owner, clock, "tms5501", __FILE__), device_serial_interface(mconfig, *this), m_write_irq(*this), @@ -234,7 +234,7 @@ READ8_MEMBER( tms5501_device::rb_r ) READ8_MEMBER( tms5501_device::xi_r ) { - UINT8 data = m_read_xi(0); + uint8_t data = m_read_xi(0); if (m_cmd & CMD_XI7) { @@ -261,7 +261,7 @@ READ8_MEMBER( tms5501_device::rst_r ) READ8_MEMBER( tms5501_device::sta_r ) { - UINT8 data = m_sta; + uint8_t data = m_sta; m_sta &= ~STA_OE; @@ -463,7 +463,7 @@ WRITE_LINE_MEMBER( tms5501_device::sens_w ) // set_interrupt - //------------------------------------------------- -void tms5501_device::set_interrupt(UINT8 mask) +void tms5501_device::set_interrupt(uint8_t mask) { m_irq |= mask; @@ -507,9 +507,9 @@ void tms5501_device::check_interrupt() // get_vector - //------------------------------------------------- -UINT8 tms5501_device::get_vector() +uint8_t tms5501_device::get_vector() { - UINT8 rst = 0; + uint8_t rst = 0; for (int i = 0; i < 8; i++) { diff --git a/src/devices/machine/tms5501.h b/src/devices/machine/tms5501.h index b618266212c..e015bc3a23b 100644 --- a/src/devices/machine/tms5501.h +++ b/src/devices/machine/tms5501.h @@ -67,7 +67,7 @@ class tms5501_device : public device_t, { public: // construction/destruction - tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } template static devcb_base &set_xmt_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_xmt.set_callback(object); } @@ -81,7 +81,7 @@ public: DECLARE_WRITE_LINE_MEMBER( sens_w ); DECLARE_WRITE_LINE_MEMBER( xi7_w ); - UINT8 get_vector(); + uint8_t get_vector(); protected: // device-level overrides @@ -162,9 +162,9 @@ private: RR_STOP = 0x80 }; - static const UINT8 rst_vector[]; + static const uint8_t rst_vector[]; - void set_interrupt(UINT8 mask); + void set_interrupt(uint8_t mask); void check_interrupt(); devcb_write_line m_write_irq; @@ -172,13 +172,13 @@ private: devcb_read8 m_read_xi; devcb_write8 m_write_xo; - UINT8 m_irq; - UINT8 m_rb; - UINT8 m_sta; - UINT8 m_cmd; - UINT8 m_rr; - UINT8 m_tb; - UINT8 m_mr; + uint8_t m_irq; + uint8_t m_rb; + uint8_t m_sta; + uint8_t m_cmd; + uint8_t m_rr; + uint8_t m_tb; + uint8_t m_mr; int m_sens; int m_xi7; diff --git a/src/devices/machine/tms6100.cpp b/src/devices/machine/tms6100.cpp index 7242ca1312d..fd28ffeae2d 100644 --- a/src/devices/machine/tms6100.cpp +++ b/src/devices/machine/tms6100.cpp @@ -27,7 +27,7 @@ const device_type TMS6100 = &device_creator; -tms6100_device::tms6100_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) +tms6100_device::tms6100_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_rom(*this, DEVICE_SELF), m_reverse_bits(false), @@ -35,7 +35,7 @@ tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, { } -tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMS6100, "TMS6100", tag, owner, clock, "tms6100", __FILE__), m_rom(*this, DEVICE_SELF), m_reverse_bits(false), @@ -45,7 +45,7 @@ tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, d const device_type M58819 = &device_creator; -m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : tms6100_device(mconfig, M58819, "M58819S", tag, owner, clock, "m58819s", __FILE__) { } @@ -144,7 +144,7 @@ WRITE_LINE_MEMBER(tms6100_device::clk_w) if (m_cs) { // new command enabled on rising edge of m0/m1 - UINT8 m = m_m1 << 1 | m_m0; + uint8_t m = m_m1 << 1 | m_m0; if ((m & ~m_prev_m & 1) || (m & ~m_prev_m & 2)) handle_command(m); @@ -158,7 +158,7 @@ WRITE_LINE_MEMBER(tms6100_device::clk_w) // m0/m1 commands -void tms6100_device::handle_command(UINT8 cmd) +void tms6100_device::handle_command(uint8_t cmd) { enum { @@ -229,7 +229,7 @@ void tms6100_device::handle_command(UINT8 cmd) // the 8-step counter PLA is shared between LA and TB if (m_count < 4) { - const UINT8 shift = 4 * (m_count+1); + const uint8_t shift = 4 * (m_count+1); m_address = (m_address & ~(0xf << shift)) | (m_add << shift); } @@ -245,7 +245,7 @@ void tms6100_device::handle_command(UINT8 cmd) m_count = 0; // load new address bits (14 bits on TMS6100) - UINT16 rb = m_rom[m_address & m_rommask]; + uint16_t rb = m_rom[m_address & m_rommask]; m_address++; rb |= (m_rom[m_address & m_rommask] << 8); m_address = (m_address & ~0x3fff) | (rb & 0x3fff); diff --git a/src/devices/machine/tms6100.h b/src/devices/machine/tms6100.h index ae295dec4b2..0749424b0d7 100644 --- a/src/devices/machine/tms6100.h +++ b/src/devices/machine/tms6100.h @@ -94,8 +94,8 @@ class tms6100_device : public device_t { public: - tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - tms6100_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); + tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms6100_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 void enable_4bit_mode(device_t &device) { downcast(device).m_4bit_mode = true; } @@ -113,22 +113,22 @@ protected: // device-level overrides virtual void device_start() override; - void handle_command(UINT8 cmd); + void handle_command(uint8_t cmd); // internal state - required_region_ptr m_rom; + required_region_ptr m_rom; bool m_reverse_bits; bool m_4bit_mode; - UINT32 m_rommask; - UINT32 m_address; // internal address + chipselect - UINT8 m_sa; // romdata shift register - UINT8 m_count; // TB/LA counter (-> PLA) - UINT8 m_prev_cmd; // previous handled command - UINT8 m_prev_m; // previous valid m0/m1 state + uint32_t m_rommask; + uint32_t m_address; // internal address + chipselect + uint8_t m_sa; // romdata shift register + uint8_t m_count; // TB/LA counter (-> PLA) + uint8_t m_prev_cmd; // previous handled command + uint8_t m_prev_m; // previous valid m0/m1 state - UINT8 m_add; // ADD/DATA pins input - UINT8 m_data; // ADD/DATA pins output + uint8_t m_add; // ADD/DATA pins input + uint8_t m_data; // ADD/DATA pins output int m_m0; int m_m1; int m_cs; // chipselect pin @@ -140,7 +140,7 @@ protected: class m58819_device : public tms6100_device { public: - m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp index 1ff3b7381f6..76a67caec7b 100644 --- a/src/devices/machine/tms9901.cpp +++ b/src/devices/machine/tms9901.cpp @@ -12,7 +12,7 @@ CE*| 5 36| S1 INT6*| 6 35| S2 INT5*| 7 34| INT7* / P15 - INT4*| 8 33| INT8* / P14 + INT4*| 8 33| int8_t* / P14 INT3*| 9 32| INT9* / P13 Phi*|10 31| INT10* / P12 INTREQ*|11 30| INT11* / P11 @@ -134,7 +134,7 @@ TODO: Tests on a real machine /* Constructor */ -tms9901_device::tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tms9901_device::tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMS9901, "TMS9901 Programmable System Interface", tag, owner, clock, "tms9901", __FILE__), m_read_block(*this), m_write_p0(*this), @@ -320,7 +320,7 @@ READ8_MEMBER( tms9901_device::read ) answer &= ~(m_pio_direction_mirror >> 8); answer |= (m_pio_output_mirror & m_pio_direction_mirror) >> 8; } - if (TRACE_PINS) logerror("%s: input on lines INT15..INT8 = %02x\n", tag(), answer); + if (TRACE_PINS) logerror("%s: input on lines INT15..int8_t = %02x\n", tag(), answer); break; case 2: /* exit timer mode */ diff --git a/src/devices/machine/tms9901.h b/src/devices/machine/tms9901.h index 60de51dd3f9..c38bc9e5064 100644 --- a/src/devices/machine/tms9901.h +++ b/src/devices/machine/tms9901.h @@ -56,7 +56,7 @@ enum class tms9901_device : public device_t { public: - tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); void set_single_int(int pin_number, int state); diff --git a/src/devices/machine/tms9902.cpp b/src/devices/machine/tms9902.cpp index 424bcfdd821..4750bda6d0e 100644 --- a/src/devices/machine/tms9902.cpp +++ b/src/devices/machine/tms9902.cpp @@ -64,7 +64,7 @@ enum /* Constructor */ -tms9902_device::tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tms9902_device::tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TMS9902, "TMS9902 ACC", tag, owner, clock, "tms9902", __FILE__), m_int_cb(*this), m_rcv_cb(*this), @@ -174,7 +174,7 @@ void tms9902_device::rcv_dsr(line_state state) the device that contains the UART. Unlike the real thing, we deliver complete bytes in one go. */ -void tms9902_device::rcv_data(UINT8 data) +void tms9902_device::rcv_data(uint8_t data) { // Put the received byte into the 1-byte receive buffer m_RBR = data; @@ -463,7 +463,7 @@ void tms9902_device::initiate_transmit() */ READ8_MEMBER( tms9902_device::cruread ) { - UINT8 answer = 0; + uint8_t answer = 0; offset &= 0x0003; @@ -509,7 +509,7 @@ READ8_MEMBER( tms9902_device::cruread ) return answer; } -static inline void set_bits8(UINT8 *reg, UINT8 bits, bool set) +static inline void set_bits8(uint8_t *reg, uint8_t bits, bool set) { if (set) *reg |= bits; @@ -517,7 +517,7 @@ static inline void set_bits8(UINT8 *reg, UINT8 bits, bool set) *reg &= ~bits; } -static inline void set_bits16(UINT16 *reg, UINT16 bits, bool set) +static inline void set_bits16(uint16_t *reg, uint16_t bits, bool set) { if (set) *reg |= bits; @@ -589,7 +589,7 @@ WRITE8_MEMBER( tms9902_device::cruwrite ) if (offset <= 10) { - UINT16 mask = (1 << offset); + uint16_t mask = (1 << offset); if (m_LDCTRL) { // Control Register mode. Values written to bits 0-7 are copied diff --git a/src/devices/machine/tms9902.h b/src/devices/machine/tms9902.h index f0ccf6c2b41..ff6ac128aba 100644 --- a/src/devices/machine/tms9902.h +++ b/src/devices/machine/tms9902.h @@ -47,7 +47,7 @@ extern const device_type TMS9902; class tms9902_device : public device_t { public: - tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_int_callback(device_t &device, _Object object) { return downcast(device).m_int_cb.set_callback(object); } template static devcb_base &set_rcv_callback(device_t &device, _Object object) { return downcast(device).m_rcv_cb.set_callback(object); } @@ -58,7 +58,7 @@ public: void rcv_cts(line_state state); void rcv_dsr(line_state state); - void rcv_data(UINT8 data); + void rcv_data(uint8_t data); void rcv_break(bool value); void rcv_framing_error(); void rcv_parity_error(); @@ -115,11 +115,11 @@ private: bool m_BRKON; // BRK-on request bool m_BRKout; // indicates the current BRK state - UINT8 m_XBR; // transmit buffer register - UINT8 m_XSR; // transmit shift register + uint8_t m_XBR; // transmit buffer register + uint8_t m_XSR; // transmit shift register /* receiver registers */ - UINT8 m_RBR; // Receive buffer register + uint8_t m_RBR; // Receive buffer register /* Interrupt enable flags */ bool m_DSCENB; // Data set change interrupt enable @@ -134,9 +134,9 @@ private: where clock1 = clock_rate / (CLK4M? 4:3) */ - UINT16 m_RDR; // Receive data rate + uint16_t m_RDR; // Receive data rate bool m_RDV8; // Receive data rate divider - UINT16 m_XDR; // Transmit data rate + uint16_t m_XDR; // Transmit data rate bool m_XDV8; // Transmit data rate divider /* Status flags */ @@ -161,13 +161,13 @@ private: bool m_ROVER; // Receiver overflow bool m_RPER; // Receive parity error - UINT8 m_RCL; // Character length + uint8_t m_RCL; // Character length bool m_ODDP; bool m_PENB; - UINT8 m_STOPB; + uint8_t m_STOPB; bool m_CLK4M; // /PHI input divide select - UINT8 m_TMR; /* interval timer */ + uint8_t m_TMR; /* interval timer */ /* clock registers */ emu_timer *m_dectimer; /* MESS timer, used to emulate the decrementer register */ diff --git a/src/devices/machine/upd1990a.cpp b/src/devices/machine/upd1990a.cpp index cfce446ba37..58703942c05 100644 --- a/src/devices/machine/upd1990a.cpp +++ b/src/devices/machine/upd1990a.cpp @@ -44,7 +44,7 @@ const device_type UPD4990A = &device_creator; // upd1990a_device - constructor //------------------------------------------------- -upd1990a_device::upd1990a_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) +upd1990a_device::upd1990a_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), device_rtc_interface(mconfig, *this), m_write_data(*this), @@ -53,7 +53,7 @@ upd1990a_device::upd1990a_device(const machine_config &mconfig, device_type type { } -upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, UPD1990A, "uPD1990A", tag, owner, clock, "upd1990a", __FILE__), device_rtc_interface(mconfig, *this), m_write_data(*this), @@ -62,7 +62,7 @@ upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, { } -upd4990a_device::upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd4990a_device::upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd1990a_device(mconfig, UPD4990A, "uPD4990A RTC", tag, owner, clock, TYPE_4990A, "upd4990a", __FILE__) { } diff --git a/src/devices/machine/upd1990a.h b/src/devices/machine/upd1990a.h index a526e920017..4f6d2900e40 100644 --- a/src/devices/machine/upd1990a.h +++ b/src/devices/machine/upd1990a.h @@ -53,8 +53,8 @@ class upd1990a_device : public device_t, { public: // construction/destruction - upd1990a_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); - upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd1990a_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); + upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template void set_data_callback(_data data) { m_write_data.set_callback(data); } template void set_tp_callback(_tp tp) { m_write_tp.set_callback(tp); } @@ -116,8 +116,8 @@ private: devcb_write_line m_write_data; devcb_write_line m_write_tp; - UINT8 m_time_counter[6]; // time counter - UINT8 m_shift_reg[7]; // shift register (40 bits, or 48 bits + serial command register) + uint8_t m_time_counter[6]; // time counter + uint8_t m_shift_reg[7]; // shift register (40 bits, or 48 bits + serial command register) int m_oe; // output enable int m_cs; // chip select @@ -149,7 +149,7 @@ private: class upd4990a_device : public upd1990a_device { public: - upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; diff --git a/src/devices/machine/upd4701.cpp b/src/devices/machine/upd4701.cpp index 37e5d5dadd9..cae5c6196c3 100644 --- a/src/devices/machine/upd4701.cpp +++ b/src/devices/machine/upd4701.cpp @@ -18,7 +18,7 @@ const device_type UPD4701 = &device_creator; -upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, UPD4701, "uPD4701 Encoder", tag, owner, clock, "upd4701", __FILE__), m_cs(0), m_xy(0), m_ul(0), m_resetx(0), m_resety(0), m_latchx(0), m_latchy(0), m_startx(0), m_starty(0), m_x(0), m_y(0), m_switches(0), m_latchswitches(0), m_cf(0) { @@ -163,7 +163,7 @@ WRITE_LINE_MEMBER( upd4701_device::resety_w ) x_add -------------------------------------------------*/ -void upd4701_device::x_add( INT16 data ) +void upd4701_device::x_add( int16_t data ) { if (!m_resetx && data != 0) { @@ -180,7 +180,7 @@ void upd4701_device::x_add( INT16 data ) y_add -------------------------------------------------*/ -void upd4701_device::y_add( INT16 data ) +void upd4701_device::y_add( int16_t data ) { if (!m_resety && data != 0) { @@ -197,7 +197,7 @@ void upd4701_device::y_add( INT16 data ) switches_set -------------------------------------------------*/ -void upd4701_device::switches_set( UINT8 data ) +void upd4701_device::switches_set( uint8_t data ) { m_switches = data; } diff --git a/src/devices/machine/upd4701.h b/src/devices/machine/upd4701.h index d559e8e00b6..a21ca6413de 100644 --- a/src/devices/machine/upd4701.h +++ b/src/devices/machine/upd4701.h @@ -18,11 +18,11 @@ class upd4701_device : public device_t { public: - upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void x_add( INT16 data ); - void y_add( INT16 data ); - void switches_set( UINT8 data ); + void x_add( int16_t data ); + void y_add( int16_t data ); + void switches_set( uint8_t data ); DECLARE_WRITE_LINE_MEMBER( cs_w ); DECLARE_WRITE_LINE_MEMBER( xy_w ); diff --git a/src/devices/machine/upd4992.cpp b/src/devices/machine/upd4992.cpp index 29535e60c94..2e87bd63ecb 100644 --- a/src/devices/machine/upd4992.cpp +++ b/src/devices/machine/upd4992.cpp @@ -33,7 +33,7 @@ const device_type UPD4992 = &device_creator; // upd4992_device - constructor //------------------------------------------------- -upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, UPD4992, "uPD4992 RTC", tag, owner, clock, "upd4992", __FILE__), device_rtc_interface(mconfig, *this), m_timer_clock(nullptr) { diff --git a/src/devices/machine/upd4992.h b/src/devices/machine/upd4992.h index dc907fed516..9825e02e3ef 100644 --- a/src/devices/machine/upd4992.h +++ b/src/devices/machine/upd4992.h @@ -32,7 +32,7 @@ class upd4992_device : public device_t, { public: // construction/destruction - upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations DECLARE_WRITE8_MEMBER( write ); @@ -55,7 +55,7 @@ private: }; emu_timer *m_timer_clock; - UINT8 m_rtc_regs[8]; + uint8_t m_rtc_regs[8]; }; diff --git a/src/devices/machine/upd7002.cpp b/src/devices/machine/upd7002.cpp index 30803adc481..ff5bae792ae 100644 --- a/src/devices/machine/upd7002.cpp +++ b/src/devices/machine/upd7002.cpp @@ -18,7 +18,7 @@ const device_type UPD7002 = &device_creator; -upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__), m_status(0), m_data1(0), m_data0(0), m_digitalvalue(0), m_conversion_counter(0) { } diff --git a/src/devices/machine/upd7002.h b/src/devices/machine/upd7002.h index 0875549f7e8..16a57fcc281 100644 --- a/src/devices/machine/upd7002.h +++ b/src/devices/machine/upd7002.h @@ -31,7 +31,7 @@ typedef device_delegate upd7002_eoc_delegate; class upd7002_device : public device_t { public: - upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~upd7002_device() {} static void set_get_analogue_callback(device_t &device, upd7002_get_analogue_delegate callback) { downcast(device).m_get_analogue_cb = callback; } diff --git a/src/devices/machine/upd71071.cpp b/src/devices/machine/upd71071.cpp index 0bbe1c9b1f9..9dd7ef3affa 100644 --- a/src/devices/machine/upd71071.cpp +++ b/src/devices/machine/upd71071.cpp @@ -92,7 +92,7 @@ const device_type UPD71071 = &device_creator; -upd71071_device::upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd71071_device::upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, UPD71071, "NEC uPD71071", tag, owner, clock, "upd71071", __FILE__), m_upd_clock(0), m_out_hreq_cb(*this), @@ -172,7 +172,7 @@ TIMER_CALLBACK_MEMBER(upd71071_device::dma_transfer_timer) { // single byte or word transfer int channel = param; - UINT16 data = 0; // data to transfer + uint16_t data = 0; // data to transfer switch (m_reg.mode_control[channel] & 0x0c) { @@ -336,7 +336,7 @@ int upd71071_device::dmarq(int state, int channel) READ8_MEMBER(upd71071_device::read) { - UINT8 ret = 0; + uint8_t ret = 0; logerror("DMA: read from register %02x\n",offset); switch(offset) diff --git a/src/devices/machine/upd71071.h b/src/devices/machine/upd71071.h index e63546a7f40..f1e223d353a 100644 --- a/src/devices/machine/upd71071.h +++ b/src/devices/machine/upd71071.h @@ -8,25 +8,25 @@ struct upd71071_reg { - UINT8 initialise; - UINT8 channel; - UINT16 count_current[4]; - UINT16 count_base[4]; - UINT32 address_current[4]; - UINT32 address_base[4]; - UINT16 device_control; - UINT8 mode_control[4]; - UINT8 status; - UINT8 temp_l; - UINT8 temp_h; - UINT8 request; - UINT8 mask; + uint8_t initialise; + uint8_t channel; + uint16_t count_current[4]; + uint16_t count_base[4]; + uint32_t address_current[4]; + uint32_t address_base[4]; + uint16_t device_control; + uint8_t mode_control[4]; + uint8_t status; + uint8_t temp_l; + uint8_t temp_h; + uint8_t request; + uint8_t mask; }; class upd71071_device : public device_t { public: - upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~upd71071_device() {} static void static_set_cpu_tag(device_t &device, const char *tag) { downcast(device).m_cpu.set_tag(tag); } diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index 7cf98458d1b..37b92a68a20 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -110,7 +110,7 @@ ADDRESS_MAP_END int upd765_family_device::rates[4] = { 500000, 300000, 250000, 1000000 }; -upd765_family_device::upd765_family_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) : +upd765_family_device::upd765_family_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) : pc_fdc_interface(mconfig, type, name, tag, owner, clock, shortname, source), intrq_cb(*this), drq_cb(*this), @@ -273,7 +273,7 @@ void upd765_family_device::set_floppy(floppy_image_device *flop) READ8_MEMBER(upd765_family_device::sra_r) { - UINT8 sra = 0; + uint8_t sra = 0; int fid = dor & 3; floppy_info &fi = flopi[fid]; if(fi.dir) @@ -307,7 +307,7 @@ READ8_MEMBER(upd765_family_device::dor_r) WRITE8_MEMBER(upd765_family_device::dor_w) { if (LOG) logerror("dor = %02x\n", data); - UINT8 diff = dor ^ data; + uint8_t diff = dor ^ data; dor = data; if(diff & 4) soft_reset(); @@ -331,7 +331,7 @@ WRITE8_MEMBER(upd765_family_device::tdr_w) READ8_MEMBER(upd765_family_device::msr_r) { - UINT32 msr = 0; + uint32_t msr = 0; switch(main_phase) { case PHASE_CMD: msr |= MSR_RQM; @@ -383,7 +383,7 @@ void upd765_family_device::set_rate(int rate) READ8_MEMBER(upd765_family_device::fifo_r) { - UINT8 r = 0xff; + uint8_t r = 0xff; switch(main_phase) { case PHASE_EXEC: if(internal_drq) @@ -441,7 +441,7 @@ WRITE8_MEMBER(upd765_family_device::fifo_w) } } -UINT8 upd765_family_device::do_dir_r() +uint8_t upd765_family_device::do_dir_r() { floppy_info &fi = flopi[dor & 3]; if(fi.dev) @@ -498,7 +498,7 @@ void upd765_family_device::disable_transfer() set_drq(false); } -void upd765_family_device::fifo_push(UINT8 data, bool internal) +void upd765_family_device::fifo_push(uint8_t data, bool internal) { if(fifo_pos == 16) { if(internal) { @@ -519,7 +519,7 @@ void upd765_family_device::fifo_push(UINT8 data, bool internal) } -UINT8 upd765_family_device::fifo_pop(bool internal) +uint8_t upd765_family_device::fifo_pop(bool internal) { if(!fifo_pos) { if(internal) { @@ -529,7 +529,7 @@ UINT8 upd765_family_device::fifo_pop(bool internal) } return 0; } - UINT8 r = fifo[0]; + uint8_t r = fifo[0]; fifo_pos--; memmove(fifo, fifo+1, fifo_pos); if(!fifo_write && !fifo_pos) @@ -558,12 +558,12 @@ WRITE8_MEMBER(upd765_family_device::mdma_w) dma_w(data); } -UINT8 upd765_family_device::dma_r() +uint8_t upd765_family_device::dma_r() { return fifo_pop(false); } -void upd765_family_device::dma_w(UINT8 data) +void upd765_family_device::dma_w(uint8_t data) { fifo_push(data, false); } @@ -884,7 +884,7 @@ void upd765_family_device::live_run(attotime limit) if(!scan_done) // TODO: handle stp, x68000 sets it to 0xff (as it would dtl)? { int slot = (cur_live.bit_counter >> 4)-1; - UINT8 data = fifo_pop(true); + uint8_t data = fifo_pop(true); if(!slot) st2 = (st2 & ~(ST2_SN)) | ST2_SH; @@ -1029,7 +1029,7 @@ void upd765_family_device::live_run(attotime limit) cur_live.crc = 0xcdb4; live_write_mfm(0xfe); } else if(cur_live.byte_counter < 20) { - UINT8 byte = fifo_pop(true); + uint8_t byte = fifo_pop(true); command[12+cur_live.byte_counter-16] = byte; live_write_mfm(byte); if(cur_live.byte_counter == 19) @@ -1065,7 +1065,7 @@ void upd765_family_device::live_run(attotime limit) cur_live.crc = 0xffff; live_write_raw(0xf57e); } else if(cur_live.byte_counter < 11) { - UINT8 byte = fifo_pop(true); + uint8_t byte = fifo_pop(true); command[12+cur_live.byte_counter-7] = byte; live_write_fm(byte); if(cur_live.byte_counter == 10) @@ -2010,7 +2010,7 @@ void upd765_family_device::read_track_continue(floppy_info &fi) } } -int upd765_family_device::calc_sector_size(UINT8 size) +int upd765_family_device::calc_sector_size(uint8_t size) { return size > 7 ? 16384 : 128 << size; } @@ -2368,17 +2368,17 @@ bool upd765_family_device::write_one_bit(const attotime &limit) return false; } -void upd765_family_device::live_write_raw(UINT16 raw) +void upd765_family_device::live_write_raw(uint16_t raw) { // if (LOG) logerror("write %04x %04x\n", raw, cur_live.crc); cur_live.shift_reg = raw; cur_live.data_bit_context = raw & 1; } -void upd765_family_device::live_write_mfm(UINT8 mfm) +void upd765_family_device::live_write_mfm(uint8_t mfm) { bool context = cur_live.data_bit_context; - UINT16 raw = 0; + uint16_t raw = 0; for(int i=0; i<8; i++) { bool bit = mfm & (0x80 >> i); if(!(bit || context)) @@ -2393,9 +2393,9 @@ void upd765_family_device::live_write_mfm(UINT8 mfm) // if (LOG) logerror("write %02x %04x %04x\n", mfm, cur_live.crc, raw); } -void upd765_family_device::live_write_fm(UINT8 fm) +void upd765_family_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); @@ -2418,67 +2418,67 @@ bool upd765_family_device::sector_matches() const cur_live.idbuf[3] == command[5]; } -upd765a_device::upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, UPD765A, "UPD765A", tag, owner, clock, "upd765a", __FILE__) +upd765a_device::upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD765A, "UPD765A", tag, owner, clock, "upd765a", __FILE__) { dor_reset = 0x0c; } -upd765b_device::upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, UPD765B, "UPD765B", tag, owner, clock, "upd765b", __FILE__) +upd765b_device::upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD765B, "UPD765B", tag, owner, clock, "upd765b", __FILE__) { dor_reset = 0x0c; } -i8272a_device::i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, I8272A, "I8272A", tag, owner, clock, "i8272a", __FILE__) +i8272a_device::i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, I8272A, "I8272A", tag, owner, clock, "i8272a", __FILE__) { dor_reset = 0x0c; } -upd72065_device::upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, UPD72065, "UPD72065", tag, owner, clock, "upd72065", __FILE__) +upd72065_device::upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD72065, "UPD72065", tag, owner, clock, "upd72065", __FILE__) { dor_reset = 0x0c; } -smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, SMC37C78, "SMC37C78", tag, owner, clock, "smc37c78", __FILE__) +smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, SMC37C78, "SMC37C78", tag, owner, clock, "smc37c78", __FILE__) { ready_connected = false; select_connected = true; } -n82077aa_device::n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, N82077AA, "N82077AA", tag, owner, clock, "n82077aa", __FILE__) +n82077aa_device::n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, N82077AA, "N82077AA", tag, owner, clock, "n82077aa", __FILE__) { ready_connected = false; select_connected = true; } -pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "PC FDC SUPERIO", tag, owner, clock, "pc_fdc_superio", __FILE__) +pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "PC FDC SUPERIO", tag, owner, clock, "pc_fdc_superio", __FILE__) { ready_polled = false; ready_connected = false; select_connected = true; } -dp8473_device::dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "DP8473", tag, owner, clock, "dp8473", __FILE__) +dp8473_device::dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "DP8473", tag, owner, clock, "dp8473", __FILE__) { ready_polled = false; ready_connected = false; select_connected = true; } -pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "PC8477A", tag, owner, clock, "pc8477a", __FILE__) +pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "PC8477A", tag, owner, clock, "pc8477a", __FILE__) { ready_polled = true; ready_connected = false; select_connected = true; } -wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "WD37C65C", tag, owner, clock, "wd37c65c", __FILE__) +wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, "WD37C65C", tag, owner, clock, "wd37c65c", __FILE__) { ready_polled = true; ready_connected = false; select_connected = true; } -mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, MCS3201, "Motorola MCS3201", tag, owner, clock, "mcs3201", __FILE__), m_input_handler(*this) { @@ -2499,7 +2499,7 @@ READ8_MEMBER( mcs3201_device::input_r ) return m_input_handler(); } -tc8566af_device::tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tc8566af_device::tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, TC8566AF, "TC8566AF", tag, owner, clock, "tc8566af", __FILE__) , m_cr1(0) { diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h index 19da61d4712..36ca5ccd727 100644 --- a/src/devices/machine/upd765.h +++ b/src/devices/machine/upd765.h @@ -72,10 +72,10 @@ /* Interface required for PC ISA wrapping */ class pc_fdc_interface : public device_t { public: - typedef delegate byte_read_cb; - typedef delegate byte_write_cb; + typedef delegate byte_read_cb; + typedef delegate byte_write_cb; - pc_fdc_interface(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source) {} + pc_fdc_interface(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) {} /* Note that the address map must cover and handle the whole 0-7 * range. The upd765, while conforming to the rest of the @@ -84,18 +84,18 @@ public: virtual DECLARE_ADDRESS_MAP(map, 8) = 0; - virtual UINT8 dma_r() = 0; - virtual void dma_w(UINT8 data) = 0; + virtual uint8_t dma_r() = 0; + virtual void dma_w(uint8_t data) = 0; virtual void tc_w(bool val) = 0; - virtual UINT8 do_dir_r() = 0; + virtual uint8_t do_dir_r() = 0; }; class upd765_family_device : public pc_fdc_interface { public: enum { MODE_AT, MODE_PS2, MODE_M30 }; - upd765_family_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); + upd765_family_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); template static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast(device).intrq_cb.set_callback(object); } template static devcb_base &set_drq_wr_callback(device_t &device, _Object object) { return downcast(device).drq_cb.set_callback(object); } @@ -116,10 +116,10 @@ public: DECLARE_READ8_MEMBER (dir_r); DECLARE_WRITE8_MEMBER(ccr_w); - virtual UINT8 do_dir_r() override; + virtual uint8_t do_dir_r() override; - UINT8 dma_r() override; - void dma_w(UINT8 data) override; + uint8_t dma_r() override; + void dma_w(uint8_t data) override; // Same as the previous ones, but as memory-mappable members DECLARE_READ8_MEMBER(mdma_r); @@ -285,7 +285,7 @@ protected: int id; int main_state, sub_state; int dir, counter; - UINT8 pcn, st0; + uint8_t pcn, st0; bool st0_filled; bool live, index, ready; }; @@ -296,12 +296,12 @@ protected: 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; }; @@ -321,11 +321,11 @@ protected: int fifo_pos, fifo_expected, command_pos, result_pos, sectors_read; bool fifo_write; - UINT8 dor, dsr, msr, fifo[16], command[16], result[16]; - UINT8 st1, st2, st3; - UINT8 fifocfg, dor_reset; - UINT8 precomp, perpmode; - UINT16 spec; + uint8_t dor, dsr, msr, fifo[16], command[16], result[16]; + uint8_t st1, st2, st3; + uint8_t fifocfg, dor_reset; + uint8_t precomp, perpmode; + uint16_t spec; int sector_size; int cur_rate; @@ -360,14 +360,14 @@ protected: void delay_cycles(emu_timer *tm, int cycles); void check_irq(); void fifo_expect(int size, bool write); - void fifo_push(UINT8 data, bool internal); - UINT8 fifo_pop(bool internal); + void fifo_push(uint8_t data, bool internal); + uint8_t fifo_pop(bool internal); void set_drq(bool state); bool get_ready(int fid); void enable_transfer(); void disable_transfer(); - int calc_sector_size(UINT8 size); + int calc_sector_size(uint8_t size); void run_drive_ready_polling(); @@ -407,9 +407,9 @@ protected: 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_mfm(UINT8 mfm); + void live_write_raw(uint16_t raw); + void live_write_fm(uint8_t fm); + void live_write_mfm(uint8_t mfm); bool read_one_bit(const attotime &limit); bool write_one_bit(const attotime &limit); @@ -417,77 +417,77 @@ protected: class upd765a_device : public upd765_family_device { public: - upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class upd765b_device : public upd765_family_device { public: - upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class i8272a_device : public upd765_family_device { public: - i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class smc37c78_device : public upd765_family_device { public: - smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class upd72065_device : public upd765_family_device { public: - upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class n82077aa_device : public upd765_family_device { public: - n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class pc_fdc_superio_device : public upd765_family_device { public: - pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class dp8473_device : public upd765_family_device { public: - dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class pc8477a_device : public upd765_family_device { public: - pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class wd37c65c_device : public upd765_family_device { public: - wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; }; class mcs3201_device : public upd765_family_device { public: - mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_input_handler(device_t &device, _Object object) { return downcast(device).m_input_handler.set_callback(object); } @@ -504,7 +504,7 @@ private: class tc8566af_device : public upd765_family_device { public: - tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual DECLARE_ADDRESS_MAP(map, 8) override; @@ -514,7 +514,7 @@ protected: virtual void device_start() override; private: - UINT8 m_cr1; + uint8_t m_cr1; }; extern const device_type UPD765A; diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp index d7caf681c70..73f984fd67c 100644 --- a/src/devices/machine/v3021.cpp +++ b/src/devices/machine/v3021.cpp @@ -33,14 +33,14 @@ const device_type v3021 = &device_creator; // v3021_device - constructor //------------------------------------------------- -v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, v3021, "V3021 RTC", tag, owner, clock, "v3021", __FILE__), m_cal_mask(0), m_cal_com(0), m_cal_cnt(0), m_cal_val(0) { } TIMER_CALLBACK_MEMBER(v3021_device::timer_callback) { - static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; + static const uint8_t dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; int dpm_count; m_rtc.sec++; @@ -116,7 +116,7 @@ void v3021_device::device_reset() READ8_MEMBER( v3021_device::read ) { - UINT8 calr = (m_cal_val & m_cal_mask) ? 1 : 0; + uint8_t calr = (m_cal_val & m_cal_mask) ? 1 : 0; m_cal_mask <<= 1; return calr; diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h index ed13501e949..5a968e30bfb 100644 --- a/src/devices/machine/v3021.h +++ b/src/devices/machine/v3021.h @@ -30,7 +30,7 @@ struct rtc_regs_t { - UINT8 sec, min, hour, day, wday, month, year; + uint8_t sec, min, hour, day, wday, month, year; }; @@ -40,7 +40,7 @@ class v3021_device : public device_t { public: // construction/destruction - v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations DECLARE_WRITE8_MEMBER( write ); @@ -53,7 +53,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; - UINT8 m_cal_mask,m_cal_com,m_cal_cnt,m_cal_val; + uint8_t m_cal_mask,m_cal_com,m_cal_cnt,m_cal_val; rtc_regs_t m_rtc; }; diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp index c750d2fb580..81391b7625c 100644 --- a/src/devices/machine/vrc4373.cpp +++ b/src/devices/machine/vrc4373.cpp @@ -28,7 +28,7 @@ DEVICE_ADDRESS_MAP_START(target2_map, 32, vrc4373_device) AM_RANGE(0x00000000, 0xFFFFFFFF) AM_READWRITE( target2_r, target2_w) ADDRESS_MAP_END -vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_host_device(mconfig, VRC4373, "NEC VRC4373 System Controller", tag, owner, clock, "vrc4373", __FILE__), m_cpu_space(nullptr), m_cpu(nullptr), cpu_tag(nullptr), m_irq_num(-1), m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32), @@ -65,7 +65,7 @@ void vrc4373_device::device_start() m_simm[0].reserve(0x02000000 / 4); // ROM - UINT32 romSize = m_romRegion->bytes(); + uint32_t romSize = m_romRegion->bytes(); m_cpu_space->install_rom(0x1fc00000, 0x1fc00000 + romSize - 1, m_romRegion->base()); // Nile register mapppings m_cpu_space->install_device(0x0f000000, 0x0f0000ff, *static_cast(this), &vrc4373_device::cpu_map); @@ -91,8 +91,8 @@ void vrc4373_device::device_reset() void vrc4373_device::map_cpu_space() { - UINT32 winStart, winEnd, winSize; - UINT32 regConfig; + uint32_t winStart, winEnd, winSize; + uint32_t regConfig; // VRC4373 is at 0x0f000000 to 0x0f0001ff // ROM region starts at 0x1f000000 @@ -171,10 +171,10 @@ void vrc4373_device::map_cpu_space() } } -void vrc4373_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 vrc4373_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) { - UINT32 winStart, winEnd, winSize; + uint32_t winStart, winEnd, winSize; // PCI Target Window 1 if (m_cpu_regs[NREG_PCITW1]&0x1000) { @@ -212,7 +212,7 @@ void vrc4373_device::set_cpu_tag(const char *_cpu_tag) // PCI bus control READ32_MEMBER (vrc4373_device::pcictrl_r) { - UINT32 result = 0; + uint32_t result = 0; if (LOG_NILE) logerror("%06X:nile pcictrl_r from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask); return result; @@ -225,7 +225,7 @@ WRITE32_MEMBER (vrc4373_device::pcictrl_w) // PCI Master Window 1 READ32_MEMBER (vrc4373_device::master1_r) { - UINT32 result = this->space(AS_DATA).read_dword(m_pci1_laddr | (offset*4), mem_mask); + uint32_t result = this->space(AS_DATA).read_dword(m_pci1_laddr | (offset*4), mem_mask); if (LOG_NILE_MASTER) logerror("%06X:nile master1 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask); return result; @@ -240,7 +240,7 @@ WRITE32_MEMBER (vrc4373_device::master1_w) // PCI Master Window 2 READ32_MEMBER (vrc4373_device::master2_r) { - UINT32 result = this->space(AS_DATA).read_dword(m_pci2_laddr | (offset*4), mem_mask); + uint32_t result = this->space(AS_DATA).read_dword(m_pci2_laddr | (offset*4), mem_mask); if (LOG_NILE_MASTER) logerror("%06X:nile master2 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask); return result; @@ -255,7 +255,7 @@ WRITE32_MEMBER (vrc4373_device::master2_w) // PCI Master IO Window READ32_MEMBER (vrc4373_device::master_io_r) { - UINT32 result = this->space(AS_IO).read_dword(m_pci_io_laddr | (offset*4), mem_mask); + uint32_t result = this->space(AS_IO).read_dword(m_pci_io_laddr | (offset*4), mem_mask); if (LOG_NILE_MASTER) logerror("%06X:nile master io read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask); return result; @@ -270,7 +270,7 @@ WRITE32_MEMBER (vrc4373_device::master_io_w) // PCI Target Window 1 READ32_MEMBER (vrc4373_device::target1_r) { - UINT32 result = m_cpu->space(AS_PROGRAM).read_dword(m_target1_laddr | (offset*4), mem_mask); + uint32_t result = m_cpu->space(AS_PROGRAM).read_dword(m_target1_laddr | (offset*4), mem_mask); if (LOG_NILE_TARGET) logerror("%08X:nile target1 read from offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, result, mem_mask); return result; @@ -285,7 +285,7 @@ WRITE32_MEMBER (vrc4373_device::target1_w) // PCI Target Window 2 READ32_MEMBER (vrc4373_device::target2_r) { - UINT32 result = m_cpu->space(AS_PROGRAM).read_dword(m_target2_laddr | (offset*4), mem_mask); + uint32_t result = m_cpu->space(AS_PROGRAM).read_dword(m_target2_laddr | (offset*4), mem_mask); if (LOG_NILE_TARGET) logerror("%08X:nile target2 read from offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, result, mem_mask); return result; @@ -311,7 +311,7 @@ TIMER_CALLBACK_MEMBER (vrc4373_device::dma_transfer) int pciSel = (m_cpu_regs[NREG_DMACR1+which*0xC] & DMA_MIO) ? AS_DATA : AS_IO; address_space *src, *dst; - UINT32 srcAddr, dstAddr; + uint32_t srcAddr, dstAddr; if (m_cpu_regs[NREG_DMACR1+which*0xC]&DMA_RW) { // Read data from PCI and write to cpu @@ -364,7 +364,7 @@ TIMER_CALLBACK_MEMBER (vrc4373_device::dma_transfer) // CPU I/F READ32_MEMBER (vrc4373_device::cpu_if_r) { - UINT32 result = m_cpu_regs[offset]; + uint32_t result = m_cpu_regs[offset]; switch (offset) { case NREG_PCICAR: result = config_address_r(space, offset); @@ -385,7 +385,7 @@ WRITE32_MEMBER(vrc4373_device::cpu_if_w) if (LOG_NILE) logerror("%06X:nile write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask); - UINT32 modData, oldData; + uint32_t modData, oldData; oldData = m_cpu_regs[offset]; COMBINE_DATA(&m_cpu_regs[offset]); switch (offset) { diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h index 81f500a11a3..a8328de813c 100644 --- a/src/devices/machine/vrc4373.h +++ b/src/devices/machine/vrc4373.h @@ -66,11 +66,11 @@ class vrc4373_device : public pci_host_device { public: - vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + vrc4373_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); @@ -117,14 +117,14 @@ private: void map_cpu_space(); - std::vector m_ram; + std::vector m_ram; - std::vector m_simm[4]; + std::vector m_simm[4]; - UINT32 m_cpu_regs[0x7c]; + uint32_t m_cpu_regs[0x7c]; - UINT32 m_pci1_laddr, m_pci2_laddr, m_pci_io_laddr; - UINT32 m_target1_laddr, m_target2_laddr; + uint32_t m_pci1_laddr, m_pci2_laddr, m_pci_io_laddr; + uint32_t m_target1_laddr, m_target2_laddr; required_memory_region m_romRegion; diff --git a/src/devices/machine/vt82c496.cpp b/src/devices/machine/vt82c496.cpp index eb2fff4e564..ecb8113d645 100644 --- a/src/devices/machine/vt82c496.cpp +++ b/src/devices/machine/vt82c496.cpp @@ -15,7 +15,7 @@ const device_type VT82C496 = &device_creator; -vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, VT82C496, "VIA VT82C496G system chipset", tag, owner, clock, "vt82c496", __FILE__), m_cpu_tag(nullptr), m_region_tag(nullptr), m_space(nullptr), m_ram(nullptr), m_rom(nullptr), m_reg_select(0) { } @@ -93,7 +93,7 @@ WRITE8_MEMBER(vt82c496_device::write) } } -void vt82c496_device::update_mem_c0(UINT8 data) +void vt82c496_device::update_mem_c0(uint8_t data) { if(data & 0x80) machine().root_device().membank("bios_cc_r")->set_base(m_ram->pointer()+0xcc000); @@ -144,7 +144,7 @@ void vt82c496_device::update_mem_c0(UINT8 data) m_space->nop_write(0xc0000,0xc3fff); } -void vt82c496_device::update_mem_d0(UINT8 data) +void vt82c496_device::update_mem_d0(uint8_t data) { if(data & 0x80) machine().root_device().membank("bios_dc_r")->set_base(m_ram->pointer()+0xdc000); @@ -195,7 +195,7 @@ void vt82c496_device::update_mem_d0(UINT8 data) m_space->nop_write(0xd0000,0xd3fff); } -void vt82c496_device::update_mem_e0(UINT8 data) +void vt82c496_device::update_mem_e0(uint8_t data) { if(data & 0x80) machine().root_device().membank("bios_e0_r")->set_base(m_ram->pointer()+0xe0000); diff --git a/src/devices/machine/vt82c496.h b/src/devices/machine/vt82c496.h index d6c1c34e819..c33bf241fb3 100644 --- a/src/devices/machine/vt82c496.h +++ b/src/devices/machine/vt82c496.h @@ -25,7 +25,7 @@ class vt82c496_device : public device_t { public: // construction/destruction - vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static void static_set_cpu(device_t &device, const char *tag) { dynamic_cast(device).m_cpu_tag = tag; } static void static_set_region(device_t &device, const char *tag) { dynamic_cast(device).m_region_tag = tag; } @@ -43,14 +43,14 @@ private: // cpu_device* m_maincpu; address_space* m_space; ram_device* m_ram; - UINT8* m_rom; + uint8_t* m_rom; - UINT8 m_reg[0x100]; - UINT8 m_reg_select; + uint8_t m_reg[0x100]; + uint8_t m_reg_select; - void update_mem_c0(UINT8 data); - void update_mem_d0(UINT8 data); - void update_mem_e0(UINT8 data); + void update_mem_c0(uint8_t data); + void update_mem_d0(uint8_t data); + void update_mem_e0(uint8_t data); }; // device type definition diff --git a/src/devices/machine/vt83c461.cpp b/src/devices/machine/vt83c461.cpp index 1957b848c9b..b6df812ec7e 100644 --- a/src/devices/machine/vt83c461.cpp +++ b/src/devices/machine/vt83c461.cpp @@ -18,7 +18,7 @@ const device_type VT83C461 = &device_creator; -vt83c461_device::vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +vt83c461_device::vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ide_controller_32_device(mconfig, VT83C461, "VIA VT83C461", tag, owner, clock, "vt83c461", __FILE__), m_config_unknown(0), m_config_register_num(0) @@ -41,7 +41,7 @@ void vt83c461_device::device_start() READ32_MEMBER( vt83c461_device::read_config ) { - UINT32 result = 0; + uint32_t result = 0; /* logit */ LOG(("%s:IDE via config read at %X, mem_mask=%d\n", machine().describe_context(), offset, mem_mask)); diff --git a/src/devices/machine/vt83c461.h b/src/devices/machine/vt83c461.h index 1fbe3a475bb..2577fdd6dfa 100644 --- a/src/devices/machine/vt83c461.h +++ b/src/devices/machine/vt83c461.h @@ -32,7 +32,7 @@ class vt83c461_device : public ide_controller_32_device { public: - vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ32_MEMBER(read_config); DECLARE_WRITE32_MEMBER(write_config); @@ -41,9 +41,9 @@ protected: virtual void device_start() override; private: - UINT8 m_config_unknown; - UINT8 m_config_register[IDE_CONFIG_REGISTERS]; - UINT8 m_config_register_num; + uint8_t m_config_unknown; + uint8_t m_config_register[IDE_CONFIG_REGISTERS]; + uint8_t m_config_register_num; }; extern const device_type VT83C461; diff --git a/src/devices/machine/watchdog.cpp b/src/devices/machine/watchdog.cpp index 845094daaba..3dd1664d997 100644 --- a/src/devices/machine/watchdog.cpp +++ b/src/devices/machine/watchdog.cpp @@ -23,7 +23,7 @@ const device_type WATCHDOG_TIMER = &device_creator; // watchdog_timer_device - constructor //------------------------------------------------- -watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, WATCHDOG_TIMER, "Watchdog timer", tag, owner, clock, "watchdog", __FILE__), m_vblank_count(0), m_time(attotime::zero), @@ -37,7 +37,7 @@ watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, cons // to set the number of VBLANKs //------------------------------------------------- -void watchdog_timer_device::static_set_vblank_count(device_t &device, const char *screen_tag, INT32 count) +void watchdog_timer_device::static_set_vblank_count(device_t &device, const char *screen_tag, int32_t count) { watchdog_timer_device &watchdog = downcast(device); watchdog.m_screen_tag = screen_tag; diff --git a/src/devices/machine/watchdog.h b/src/devices/machine/watchdog.h index ee97e9026db..85f792203f8 100644 --- a/src/devices/machine/watchdog.h +++ b/src/devices/machine/watchdog.h @@ -31,16 +31,16 @@ class watchdog_timer_device : public device_t { public: // construction/destruction - watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // inline configuration helpers - static void static_set_vblank_count(device_t &device, const char *screen_tag, INT32 count); + static void static_set_vblank_count(device_t &device, const char *screen_tag, int32_t count); static void static_set_time(device_t &device, attotime time); // watchdog control void watchdog_reset(); void watchdog_enable(bool enable = true); - INT32 get_vblank_counter() const { return m_counter; } + int32_t get_vblank_counter() const { return m_counter; } // read/write handlers DECLARE_WRITE8_MEMBER( reset_w ); @@ -63,13 +63,13 @@ private: void watchdog_vblank(screen_device &screen, bool vblank_state); // configuration data - INT32 m_vblank_count; // number of VBLANKs until resetting the machine + int32_t m_vblank_count; // number of VBLANKs until resetting the machine attotime m_time; // length of time until resetting the machine const char * m_screen_tag; // the tag of the screen this timer tracks // internal state bool m_enabled; // is the watchdog enabled? - INT32 m_counter; // counter for VBLANK tracking + int32_t m_counter; // counter for VBLANK tracking emu_timer * m_timer; // timer for triggering reset }; diff --git a/src/devices/machine/wd11c00_17.cpp b/src/devices/machine/wd11c00_17.cpp index 0f38c32c624..089d8dcbcdf 100644 --- a/src/devices/machine/wd11c00_17.cpp +++ b/src/devices/machine/wd11c00_17.cpp @@ -111,9 +111,9 @@ inline void wd11c00_17_device::increment_address() // read_data - //------------------------------------------------- -inline UINT8 wd11c00_17_device::read_data() +inline uint8_t wd11c00_17_device::read_data() { - UINT8 data = 0; + uint8_t data = 0; if (m_status & STATUS_BUSY) { @@ -130,7 +130,7 @@ inline UINT8 wd11c00_17_device::read_data() // write_data - //------------------------------------------------- -inline void wd11c00_17_device::write_data(UINT8 data) +inline void wd11c00_17_device::write_data(uint8_t data) { if (m_status & STATUS_BUSY) { @@ -175,7 +175,7 @@ inline void wd11c00_17_device::select() // wd11c00_17_device - constructor //------------------------------------------------- -wd11c00_17_device::wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +wd11c00_17_device::wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, WD11C00_17, "Western Digital WD11C00-17", tag, owner, clock, "wd11c00_17", __FILE__), m_out_irq5_cb(*this), m_out_drq3_cb(*this), @@ -240,7 +240,7 @@ void wd11c00_17_device::device_reset() READ8_MEMBER( wd11c00_17_device::io_r ) { - UINT8 data = 0xff; + uint8_t data = 0xff; switch (offset) { @@ -304,7 +304,7 @@ WRITE8_MEMBER( wd11c00_17_device::io_w ) // dack_r - //------------------------------------------------- -UINT8 wd11c00_17_device::dack_r() +uint8_t wd11c00_17_device::dack_r() { return read_data(); } @@ -314,7 +314,7 @@ UINT8 wd11c00_17_device::dack_r() // dack_w - //------------------------------------------------- -void wd11c00_17_device::dack_w(UINT8 data) +void wd11c00_17_device::dack_w(uint8_t data) { write_data(data); } @@ -326,7 +326,7 @@ void wd11c00_17_device::dack_w(UINT8 data) READ8_MEMBER( wd11c00_17_device::read ) { - UINT8 data = 0; + uint8_t data = 0; switch (offset) { diff --git a/src/devices/machine/wd11c00_17.h b/src/devices/machine/wd11c00_17.h index 7104e20c4dc..9bfcead7943 100644 --- a/src/devices/machine/wd11c00_17.h +++ b/src/devices/machine/wd11c00_17.h @@ -63,7 +63,7 @@ class wd11c00_17_device : public device_t { public: // construction/destruction - wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_irq5_callback(device_t &device, _Object object) { return downcast(device).m_out_irq5_cb.set_callback(object); } template static devcb_base &set_out_drq3_callback(device_t &device, _Object object) { return downcast(device).m_out_drq3_cb.set_callback(object); } @@ -80,8 +80,8 @@ public: DECLARE_READ8_MEMBER( io_r ); DECLARE_WRITE8_MEMBER( io_w ); - UINT8 dack_r(); - void dack_w(UINT8 data); + uint8_t dack_r(); + void dack_w(uint8_t data); DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); @@ -103,8 +103,8 @@ protected: private: inline void check_interrupt(); inline void increment_address(); - inline UINT8 read_data(); - inline void write_data(UINT8 data); + inline uint8_t read_data(); + inline void write_data(uint8_t data); inline void software_reset(); inline void select(); @@ -120,8 +120,8 @@ private: devcb_read8 m_in_cs1010_cb; devcb_write8 m_out_cs1010_cb; - UINT8 m_status; - UINT8 m_mask; + uint8_t m_status; + uint8_t m_mask; offs_t m_ra; diff --git a/src/devices/machine/wd2010.cpp b/src/devices/machine/wd2010.cpp index a97b35b2517..5a65cffbd0e 100644 --- a/src/devices/machine/wd2010.cpp +++ b/src/devices/machine/wd2010.cpp @@ -142,7 +142,7 @@ const device_type WD2010 = &device_creator; // wd2010_device - constructor //------------------------------------------------- -wd2010_device::wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +wd2010_device::wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, WD2010, "Western Digital WD2010", tag, owner, clock, "wd2010", __FILE__), m_out_intrq_cb(*this), m_out_bdrq_cb(*this), @@ -224,7 +224,7 @@ void wd2010_device::device_reset() READ8_MEMBER(wd2010_device::read) { - UINT8 data; + uint8_t data; switch (offset) { @@ -358,9 +358,9 @@ WRITE8_MEMBER(wd2010_device::write) //------------------------------------------------- // compute_correction - //------------------------------------------------- -void wd2010_device::compute_correction(UINT8 data) +void wd2010_device::compute_correction(uint8_t data) { - UINT8 newstatus = STATUS_RDY | STATUS_SC; + uint8_t newstatus = STATUS_RDY | STATUS_SC; complete_cmd(newstatus); } @@ -368,9 +368,9 @@ void wd2010_device::compute_correction(UINT8 data) //------------------------------------------------- // set_parameter - //------------------------------------------------- -void wd2010_device::set_parameter(UINT8 data) +void wd2010_device::set_parameter(uint8_t data) { - UINT8 newstatus = STATUS_RDY | STATUS_SC; + uint8_t newstatus = STATUS_RDY | STATUS_SC; complete_cmd(newstatus); } @@ -378,9 +378,9 @@ void wd2010_device::set_parameter(UINT8 data) //------------------------------------------------- // restore - //------------------------------------------------- -void wd2010_device::restore(UINT8 data) +void wd2010_device::restore(uint8_t data) { - UINT8 newstatus = STATUS_RDY | STATUS_SC; + uint8_t newstatus = STATUS_RDY | STATUS_SC; m_out_intrq_cb(CLEAR_LINE); // reset INTRQ, errors, set BUSY, CIP m_error = 0; @@ -450,9 +450,9 @@ void wd2010_device::restore(UINT8 data) // FIXME : step rate, drive change (!) // NOT IMPLEMENTED: IMPLIED SEEK ("wait until rising edge of SC signal") -void wd2010_device::seek(UINT8 data) +void wd2010_device::seek(uint8_t data) { - UINT8 newstatus = STATUS_RDY | STATUS_SC; + uint8_t newstatus = STATUS_RDY | STATUS_SC; m_out_intrq_cb(CLEAR_LINE); // reset INTRQ, errors, set BUSY, CIP m_error = 0; @@ -467,7 +467,7 @@ void wd2010_device::seek(UINT8 data) // Calculate number of steps by comparing the cylinder registers // HI/LO with the internally stored position. - UINT32 cylinder_registers = CYLINDER; + uint32_t cylinder_registers = CYLINDER; if (m_present_cylinder > cylinder_registers) { step_pulses = m_present_cylinder - cylinder_registers; @@ -535,9 +535,9 @@ void wd2010_device::seek(UINT8 data) //------------------------------------------------- // FIXME: multiple sector transfers, ID / CYL / HEAD / SIZE match // + ERROR HANDLING (...) -void wd2010_device::read_sector(UINT8 data) +void wd2010_device::read_sector(uint8_t data) { - UINT8 newstatus = STATUS_RDY | STATUS_SC; + uint8_t newstatus = STATUS_RDY | STATUS_SC; int intrq_at_end = 0; // (default) : (I = 1 INTRQ occurs when the command m_out_intrq_cb(CLEAR_LINE); // reset INTRQ, errors, set BUSY, CIP @@ -647,7 +647,7 @@ void wd2010_device::read_sector(UINT8 data) //------------------------------------------------- // FIXME: SEEK, SEEK_COMPLETE, Drive # change (!) // as well as CYL.register + internal CYL.register comparisons -void wd2010_device::write_sector(UINT8 data) +void wd2010_device::write_sector(uint8_t data) { m_error = 0; // De-assert ERROR + DRQ m_status &= ~(STATUS_DRQ); @@ -665,9 +665,9 @@ void wd2010_device::write_sector(UINT8 data) //------------------------------------------------- // write_sector (stage II) //------------------------------------------------- -void wd2010_device::complete_write_sector(UINT8 data) +void wd2010_device::complete_write_sector(uint8_t data) { - UINT8 newstatus = STATUS_RDY | STATUS_SC; + uint8_t newstatus = STATUS_RDY | STATUS_SC; m_out_bdrq_cb(0); // DE-Assert BDRQ (...and DRQ !) m_status &= ~(STATUS_DRQ); @@ -729,7 +729,7 @@ void wd2010_device::complete_write_sector(UINT8 data) // * does nothing right now * // ****************************************************** -void wd2010_device::auto_scan_id(UINT8 data) +void wd2010_device::auto_scan_id(uint8_t data) { static int last_drive; @@ -747,7 +747,7 @@ void wd2010_device::auto_scan_id(UINT8 data) // ****************************************************** // What to do here (just update present_cylinder with CYLINDER)...? -void wd2010_device::update_sdh(UINT8 new_sector_size, UINT8 new_head, UINT16 new_cylinder, UINT8 new_sectornr) +void wd2010_device::update_sdh(uint8_t new_sector_size, uint8_t new_head, uint16_t new_cylinder, uint8_t new_sectornr) { // "Update SDH" /* @@ -774,9 +774,9 @@ void wd2010_device::update_sdh(UINT8 new_sector_size, UINT8 new_head, UINT16 new // and writes this into the Present Cylinder Position Register. // FIXME: NO ID HANDLING (ID FOUND / NOT FOUND), NO BAD BLOCK; NO CRC -void wd2010_device::scan_id(UINT8 data) +void wd2010_device::scan_id(uint8_t data) { - UINT8 newstatus = STATUS_RDY; + uint8_t newstatus = STATUS_RDY; m_out_intrq_cb(CLEAR_LINE); m_error = 0; @@ -811,9 +811,9 @@ void wd2010_device::scan_id(UINT8 data) // SECTOR NUMBER REG.= number of bytes - 3 (for GAP 1 + 3) // = 40 decimal on DEC RD51 with WUTIL 3.2 //-------------------------------------------------------- -void wd2010_device::format(UINT8 data) +void wd2010_device::format(uint8_t data) { - UINT8 newstatus = STATUS_RDY; + uint8_t newstatus = STATUS_RDY; m_out_intrq_cb(CLEAR_LINE); m_error = 0; @@ -859,7 +859,7 @@ void wd2010_device::format(UINT8 data) return; } - // UINT8 format_sector_count = m_task_file[TASK_FILE_SECTOR_COUNT]; + // uint8_t format_sector_count = m_task_file[TASK_FILE_SECTOR_COUNT]; // do // { // < WRITE GAP 1 or GAP 3 > @@ -955,7 +955,7 @@ void wd2010_device::device_timer(emu_timer &timer, device_timer_id tid, int para } // Called by 'device_timer' - -void wd2010_device::complete_immediate(UINT8 status) +void wd2010_device::complete_immediate(uint8_t status) { // re-evaluate external signals at end of command status &= ~(STATUS_RDY | STATUS_WF | STATUS_SC); // RDY 0x40 / WF 0x20 / SC 0x10 @@ -983,7 +983,7 @@ void wd2010_device::complete_immediate(UINT8 status) m_out_bcr_cb(1); } -void wd2010_device::complete_cmd(UINT8 status) +void wd2010_device::complete_cmd(uint8_t status) { cmd_timer->adjust(attotime::from_msec(1), status); } diff --git a/src/devices/machine/wd2010.h b/src/devices/machine/wd2010.h index 204cb768385..ea9faa8a7f1 100644 --- a/src/devices/machine/wd2010.h +++ b/src/devices/machine/wd2010.h @@ -75,7 +75,7 @@ class wd2010_device : public device_t { public: // construction/destruction - wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_intrq_callback(device_t &device, _Object object) { return downcast(device).m_out_intrq_cb.set_callback(object); } template static devcb_base &set_out_bdrq_callback(device_t &device, _Object object) { return downcast(device).m_out_bdrq_cb.set_callback(object); } @@ -106,16 +106,16 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - void compute_correction(UINT8 data); - void set_parameter(UINT8 data); - void restore(UINT8 data); - void seek(UINT8 data); - void read_sector(UINT8 data); - void write_sector(UINT8 data); - void scan_id(UINT8 data); - void update_sdh(UINT8 new_sector_size, UINT8 new_head, UINT16 new_cylinder, UINT8 new_sectornr); - void auto_scan_id(UINT8 data); - void format(UINT8 data); + void compute_correction(uint8_t data); + void set_parameter(uint8_t data); + void restore(uint8_t data); + void seek(uint8_t data); + void read_sector(uint8_t data); + void write_sector(uint8_t data); + void scan_id(uint8_t data); + void update_sdh(uint8_t new_sector_size, uint8_t new_head, uint16_t new_cylinder, uint8_t new_sectornr); + void auto_scan_id(uint8_t data); + void format(uint8_t data); devcb_write_line m_out_intrq_cb; devcb_write_line m_out_bdrq_cb; @@ -133,22 +133,22 @@ private: devcb_read_line m_in_tk000_cb; devcb_read_line m_in_sc_cb; - UINT8 m_status; - UINT8 m_error; - UINT8 m_task_file[8]; + uint8_t m_status; + uint8_t m_error; + uint8_t m_task_file[8]; emu_timer *cmd_timer; emu_timer *complete_write_when_buffer_ready_high; emu_timer *deassert_write_when_buffer_ready_low; emu_timer *deassert_read_when_buffer_ready_high; - void complete_write_sector(UINT8 status); - void complete_cmd(UINT8 status); - void complete_immediate(UINT8 status); + void complete_write_sector(uint8_t status); + void complete_cmd(uint8_t status); + void complete_immediate(uint8_t status); bool is_buffer_ready; - UINT32 m_present_cylinder; // Present Cylinder Position Register + uint32_t m_present_cylinder; // Present Cylinder Position Register }; // device type definition diff --git a/src/devices/machine/wd33c93.cpp b/src/devices/machine/wd33c93.cpp index 2ae5f9d370a..9489bea0485 100644 --- a/src/devices/machine/wd33c93.cpp +++ b/src/devices/machine/wd33c93.cpp @@ -137,7 +137,7 @@ #define SRCID_ER 0x80 /* convernience functions */ -UINT8 wd33c93_device::getunit( void ) +uint8_t wd33c93_device::getunit( void ) { /* return the destination unit id */ return regs[WD_DESTINATION_ID] & SRCID_MASK; @@ -215,7 +215,7 @@ void wd33c93_device::device_timer(emu_timer &timer, device_timer_id tid, int par } } -void wd33c93_device::complete_cmd( UINT8 status ) +void wd33c93_device::complete_cmd( uint8_t status ) { /* fire off a timer to complete the command */ cmd_timer->adjust( attotime::from_usec(1), status ); @@ -269,8 +269,8 @@ void wd33c93_device::disconnect_cmd() void wd33c93_device::select_cmd() { - UINT8 unit = getunit(); - UINT8 newstatus; + uint8_t unit = getunit(); + uint8_t newstatus; /* see if we can select that device */ if (select(unit)) @@ -305,8 +305,8 @@ void wd33c93_device::select_cmd() void wd33c93_device::selectxfer_cmd() { - UINT8 unit = getunit(); - UINT8 newstatus; + uint8_t unit = getunit(); + uint8_t newstatus; /* see if we can select that device */ if (select(unit)) @@ -398,7 +398,7 @@ void wd33c93_device::xferinfo_cmd() void wd33c93_device::dispatch_command() { /* get the command */ - UINT8 cmd = regs[WD_COMMAND] & 0x7f; + uint8_t cmd = regs[WD_COMMAND] & 0x7f; switch(cmd) { @@ -618,7 +618,7 @@ READ8_MEMBER(wd33c93_device::read) case 1: { - UINT8 ret; + uint8_t ret; /* if reading status, clear irq flag */ if ( sasr == WD_SCSI_STATUS ) @@ -723,7 +723,7 @@ READ8_MEMBER(wd33c93_device::read) return 0; } -wd33c93_device::wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +wd33c93_device::wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : legacy_scsi_host_adapter(mconfig, WD33C93, "33C93 SCSI", tag, owner, clock, "wd33c93", __FILE__), m_irq_cb(*this) { @@ -762,7 +762,7 @@ void wd33c93_device::device_start() save_item( NAME( read_pending ) ); } -void wd33c93_device::dma_read_data( int bytes, UINT8 *pData ) +void wd33c93_device::dma_read_data( int bytes, uint8_t *pData ) { int len = bytes; @@ -787,7 +787,7 @@ void wd33c93_device::dma_read_data( int bytes, UINT8 *pData ) set_xfer_count(len); } -void wd33c93_device::dma_write_data(int bytes, UINT8 *pData) +void wd33c93_device::dma_write_data(int bytes, uint8_t *pData) { write_data(pData, bytes); } diff --git a/src/devices/machine/wd33c93.h b/src/devices/machine/wd33c93.h index b749131d692..b8929d8b791 100644 --- a/src/devices/machine/wd33c93.h +++ b/src/devices/machine/wd33c93.h @@ -54,15 +54,15 @@ class wd33c93_device : public legacy_scsi_host_adapter { public: // construction/destruction - wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_irq_callback(device_t &device, _Object object) { return downcast(device).m_irq_cb.set_callback(object); } 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); void clear_dma(); int get_dma_count(); @@ -72,11 +72,11 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - UINT8 getunit( void ); + uint8_t getunit( void ); void set_xfer_count( int count ); int get_xfer_count( void ); void complete_immediate( int status ); - void complete_cmd( UINT8 status ); + void complete_cmd( uint8_t status ); void unimplemented_cmd(); void invalid_cmd(); void reset_cmd(); @@ -88,14 +88,14 @@ private: void xferinfo_cmd(); void dispatch_command(); - UINT8 sasr; - UINT8 regs[WD_AUXILIARY_STATUS+1]; - UINT8 fifo[FIFO_SIZE]; + uint8_t sasr; + uint8_t regs[WD_AUXILIARY_STATUS+1]; + uint8_t fifo[FIFO_SIZE]; int fifo_pos; - UINT8 temp_input[TEMP_INPUT_LEN]; + uint8_t temp_input[TEMP_INPUT_LEN]; int temp_input_pos; - UINT8 busphase; - UINT8 identify; + uint8_t busphase; + uint8_t identify; int read_pending; emu_timer *cmd_timer; emu_timer *service_req_timer; diff --git a/src/devices/machine/wd7600.cpp b/src/devices/machine/wd7600.cpp index cfd297a6cbe..8d60250dff1 100644 --- a/src/devices/machine/wd7600.cpp +++ b/src/devices/machine/wd7600.cpp @@ -95,7 +95,7 @@ void wd7600_device::static_set_keybctag(device_t &device, const char *tag) chip.m_keybctag = tag; } -wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, WD7600, "WD 7600 chipset", tag, owner, clock, "wd7600", __FILE__), m_read_ior(*this), m_write_iow(*this), @@ -153,7 +153,7 @@ void wd7600_device::device_start() m_keybc = downcast(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); @@ -295,7 +295,7 @@ WRITE8_MEMBER( wd7600_device::keyb_data_w ) READ8_MEMBER( wd7600_device::keyb_data_r ) { - UINT8 ret = m_keybc->data_r(space,0); + uint8_t ret = m_keybc->data_r(space,0); // if(LOG) logerror("WD7600 '%s': keyboard data read %02x\n", tag(), ret); return ret; } @@ -372,7 +372,7 @@ READ8_MEMBER( wd7600_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; @@ -452,7 +452,7 @@ WRITE8_MEMBER( wd7600_device::a20_reset_w ) READ8_MEMBER( wd7600_device::a20_reset_r ) { - UINT8 ret = 0; + uint8_t ret = 0; if(m_alt_a20) ret |= 0x02; return ret; diff --git a/src/devices/machine/wd7600.h b/src/devices/machine/wd7600.h index 25050c9fb0c..8363018d30d 100644 --- a/src/devices/machine/wd7600.h +++ b/src/devices/machine/wd7600.h @@ -63,7 +63,7 @@ class wd7600_device : public device_t { public: // construction/destruction - wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd7600_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; @@ -110,9 +110,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); } @@ -207,30 +207,30 @@ private: const char *m_isatag; const char *m_biostag; const char *m_keybctag; - UINT8 m_portb; + uint8_t m_portb; int m_iochck; int m_nmi_mask; int m_alt_a20; int m_ext_gatea20; int m_kbrst; int m_refresh_toggle; - UINT16 m_refresh_ctrl; - UINT16 m_memory_ctrl; - UINT16 m_chip_sel; - UINT16 m_split_start; - UINT8 m_bank_start[4]; - UINT16 m_diagnostic; + uint16_t m_refresh_ctrl; + uint16_t m_memory_ctrl; + uint16_t m_chip_sel; + uint16_t m_split_start; + uint8_t m_bank_start[4]; + uint16_t m_diagnostic; 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; 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; at_keyboard_controller_device *m_keybc; }; diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index 3db1b1113f6..c748b155aca 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -65,7 +65,7 @@ const device_type WD1773 = &device_creator; // Show state machine #define TRACE_STATE 0 -wd_fdc_t::wd_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : +wd_fdc_t::wd_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), intrq_cb(*this), drq_cb(*this), @@ -1058,7 +1058,7 @@ void wd_fdc_t::do_cmd_w() } } -void wd_fdc_t::cmd_w(UINT8 val) +void wd_fdc_t::cmd_w(uint8_t val) { if (TRACE_COMP) logerror("Initiating command %02x\n", val); if (inverted_bus) val ^= 0xff; @@ -1088,7 +1088,7 @@ void wd_fdc_t::cmd_w(UINT8 val) } } -UINT8 wd_fdc_t::status_r() +uint8_t wd_fdc_t::status_r() { if(intrq && !(intrq_cond & I_IMM)) { intrq = false; @@ -1125,7 +1125,7 @@ UINT8 wd_fdc_t::status_r() status &= ~S_NRDY; } - UINT8 val = status; + uint8_t val = status; if (inverted_bus) val ^= 0xff; return val; @@ -1137,7 +1137,7 @@ void wd_fdc_t::do_track_w() track_buffer = -1; } -void wd_fdc_t::track_w(UINT8 val) +void wd_fdc_t::track_w(uint8_t val) { if (inverted_bus) val ^= 0xff; @@ -1149,9 +1149,9 @@ void wd_fdc_t::track_w(UINT8 val) delay_cycles(t_track, dden ? delay_register_commit*2 : delay_register_commit); } -UINT8 wd_fdc_t::track_r() +uint8_t wd_fdc_t::track_r() { - UINT8 val = track; + uint8_t val = track; if (inverted_bus) val ^= 0xff; return val; @@ -1163,7 +1163,7 @@ void wd_fdc_t::do_sector_w() sector_buffer = -1; } -void wd_fdc_t::sector_w(UINT8 val) +void wd_fdc_t::sector_w(uint8_t val) { if (inverted_bus) val ^= 0xff; @@ -1181,15 +1181,15 @@ void wd_fdc_t::sector_w(UINT8 val) delay_cycles(t_sector, dden ? delay_register_commit*2 : delay_register_commit); } -UINT8 wd_fdc_t::sector_r() +uint8_t wd_fdc_t::sector_r() { - UINT8 val = sector; + uint8_t val = sector; if (inverted_bus) val ^= 0xff; return val; } -void wd_fdc_t::data_w(UINT8 val) +void wd_fdc_t::data_w(uint8_t val) { if (inverted_bus) val ^= 0xff; @@ -1197,17 +1197,17 @@ void wd_fdc_t::data_w(UINT8 val) drop_drq(); } -UINT8 wd_fdc_t::data_r() +uint8_t wd_fdc_t::data_r() { drop_drq(); - UINT8 val = data; + uint8_t val = data; if (inverted_bus) val ^= 0xff; return val; } -void wd_fdc_t::gen_w(int reg, UINT8 val) +void wd_fdc_t::gen_w(int reg, uint8_t val) { switch(reg) { case 0: cmd_w(val); break; @@ -1217,7 +1217,7 @@ void wd_fdc_t::gen_w(int reg, UINT8 val) } } -UINT8 wd_fdc_t::gen_r(int reg) +uint8_t wd_fdc_t::gen_r(int reg) { switch(reg) { case 0: return status_r(); @@ -1495,17 +1495,17 @@ bool wd_fdc_t::write_one_bit(const attotime &limit) return false; } -void wd_fdc_t::live_write_raw(UINT16 raw) +void wd_fdc_t::live_write_raw(uint16_t raw) { if (TRACE_WRITE) logerror("write raw %04x, CRC=%04x\n", raw, cur_live.crc); cur_live.shift_reg = raw; cur_live.data_bit_context = raw & 1; } -void wd_fdc_t::live_write_mfm(UINT8 mfm) +void wd_fdc_t::live_write_mfm(uint8_t mfm) { bool context = cur_live.data_bit_context; - UINT16 raw = 0; + uint16_t raw = 0; for(int i=0; i<8; i++) { bool bit = mfm & (0x80 >> i); if(!(bit || context)) @@ -1520,9 +1520,9 @@ void wd_fdc_t::live_write_mfm(UINT8 mfm) } -void wd_fdc_t::live_write_fm(UINT8 fm) +void wd_fdc_t::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); @@ -2123,7 +2123,7 @@ void wd_fdc_t::drop_drq() } } -int wd_fdc_t::calc_sector_size(UINT8 size, UINT8 command) const +int wd_fdc_t::calc_sector_size(uint8_t size, uint8_t command) const { return 128 << (size & 3); } @@ -2133,7 +2133,7 @@ int wd_fdc_t::settle_time() const return 60000; } -wd_fdc_analog_t::wd_fdc_analog_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : +wd_fdc_analog_t::wd_fdc_analog_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : wd_fdc_t(mconfig, type, name, tag, owner, clock, shortname, source) { clock_ratio = 1; @@ -2185,7 +2185,7 @@ bool wd_fdc_analog_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_de return cur_pll.write_next_bit(bit, tm, floppy, limit); } -wd_fdc_digital_t::wd_fdc_digital_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : +wd_fdc_digital_t::wd_fdc_digital_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : wd_fdc_t(mconfig, type, name, tag, owner, clock, shortname, source) { clock_ratio = 4; @@ -2278,7 +2278,7 @@ int wd_fdc_digital_t::digital_pll_t::get_next_bit(attotime &tm, floppy_image_dev 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 += 226; else if(phase_sub & mask) @@ -2302,15 +2302,15 @@ int wd_fdc_digital_t::digital_pll_t::get_next_bit(attotime &tm, floppy_image_dev 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 }, @@ -2364,7 +2364,7 @@ bool wd_fdc_digital_t::digital_pll_t::write_next_bit(bool bit, attotime &tm, flo 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)) @@ -2394,7 +2394,7 @@ void wd_fdc_digital_t::digital_pll_t::commit(floppy_image_device *floppy, const write_position = 0; } -fd1771_t::fd1771_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1771, "FD1771", tag, owner, clock, "fd1771", __FILE__) +fd1771_t::fd1771_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1771, "FD1771", tag, owner, clock, "fd1771", __FILE__) { const static int fd1771_step_times[4] = { 12000, 12000, 20000, 40000 }; @@ -2411,7 +2411,7 @@ fd1771_t::fd1771_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int fd1771_t::calc_sector_size(UINT8 size, UINT8 command) const +int fd1771_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2419,7 +2419,7 @@ int fd1771_t::calc_sector_size(UINT8 size, UINT8 command) const return size ? size << 4 : 4096; } -fd1781_t::fd1781_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1781, "FD1781", tag, owner, clock, "fd1781", __FILE__) +fd1781_t::fd1781_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1781, "FD1781", tag, owner, clock, "fd1781", __FILE__) { const static int fd1781_step_times[4] = { 6000, 12000, 20000, 40000 }; @@ -2436,7 +2436,7 @@ fd1781_t::fd1781_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int fd1781_t::calc_sector_size(UINT8 size, UINT8 command) const +int fd1781_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2447,7 +2447,7 @@ int fd1781_t::calc_sector_size(UINT8 size, UINT8 command) const const int wd_fdc_t::fd179x_step_times[4] = { 6000, 12000, 20000, 30000 }; const int wd_fdc_t::fd176x_step_times[4] = { 12000, 24000, 40000, 60000 }; -fd1791_t::fd1791_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1791, "FD1791", tag, owner, clock, "fd1791", __FILE__) +fd1791_t::fd1791_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1791, "FD1791", tag, owner, clock, "fd1791", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2463,7 +2463,7 @@ fd1791_t::fd1791_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -fd1792_t::fd1792_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1792, "FD1792", tag, owner, clock, "fd1792", __FILE__) +fd1792_t::fd1792_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1792, "FD1792", tag, owner, clock, "fd1792", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2479,7 +2479,7 @@ fd1792_t::fd1792_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -fd1793_t::fd1793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1793, "FD1793", tag, owner, clock, "fd1793", __FILE__) +fd1793_t::fd1793_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1793, "FD1793", tag, owner, clock, "fd1793", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2495,7 +2495,7 @@ fd1793_t::fd1793_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -kr1818vg93_t::kr1818vg93_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, KR1818VG93, "KR1818VG93", tag, owner, clock, "kr1818vg93", __FILE__) +kr1818vg93_t::kr1818vg93_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, KR1818VG93, "KR1818VG93", tag, owner, clock, "kr1818vg93", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2511,7 +2511,7 @@ kr1818vg93_t::kr1818vg93_t(const machine_config &mconfig, const char *tag, devic nonsticky_immint = true; } -fd1794_t::fd1794_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1794, "FD1794", tag, owner, clock, "fd1794", __FILE__) +fd1794_t::fd1794_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1794, "FD1794", tag, owner, clock, "fd1794", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2527,7 +2527,7 @@ fd1794_t::fd1794_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -fd1795_t::fd1795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1795, "FD1795", tag, owner, clock, "fd1795", __FILE__) +fd1795_t::fd1795_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1795, "FD1795", tag, owner, clock, "fd1795", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2543,7 +2543,7 @@ fd1795_t::fd1795_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int fd1795_t::calc_sector_size(UINT8 size, UINT8 command) const +int fd1795_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2551,7 +2551,7 @@ int fd1795_t::calc_sector_size(UINT8 size, UINT8 command) const return 128 << ((size + 1) & 3); } -fd1797_t::fd1797_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1797, "FD1797", tag, owner, clock, "fd1797", __FILE__) +fd1797_t::fd1797_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1797, "FD1797", tag, owner, clock, "fd1797", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2567,7 +2567,7 @@ fd1797_t::fd1797_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int fd1797_t::calc_sector_size(UINT8 size, UINT8 command) const +int fd1797_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2575,7 +2575,7 @@ int fd1797_t::calc_sector_size(UINT8 size, UINT8 command) const return 128 << ((size + 1) & 3); } -mb8866_t::mb8866_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, MB8866, "MB8866", tag, owner, clock, "mb8866", __FILE__) +mb8866_t::mb8866_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, MB8866, "MB8866", tag, owner, clock, "mb8866", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2591,7 +2591,7 @@ mb8866_t::mb8866_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -mb8876_t::mb8876_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, MB8876, "MB8876", tag, owner, clock, "mb8876", __FILE__) +mb8876_t::mb8876_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, MB8876, "MB8876", tag, owner, clock, "mb8876", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2607,7 +2607,7 @@ mb8876_t::mb8876_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -mb8877_t::mb8877_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, MB8877, "MB8877", tag, owner, clock, "mb8877", __FILE__) +mb8877_t::mb8877_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, MB8877, "MB8877", tag, owner, clock, "mb8877", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2623,7 +2623,7 @@ mb8877_t::mb8877_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -fd1761_t::fd1761_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1761, "FD1761", tag, owner, clock, "fd1761", __FILE__) +fd1761_t::fd1761_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1761, "FD1761", tag, owner, clock, "fd1761", __FILE__) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2639,7 +2639,7 @@ fd1761_t::fd1761_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -fd1763_t::fd1763_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1763, "FD1763", tag, owner, clock, "fd1763", __FILE__) +fd1763_t::fd1763_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1763, "FD1763", tag, owner, clock, "fd1763", __FILE__) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2655,7 +2655,7 @@ fd1763_t::fd1763_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -fd1765_t::fd1765_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1765, "FD1765", tag, owner, clock, "fd1765", __FILE__) +fd1765_t::fd1765_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1765, "FD1765", tag, owner, clock, "fd1765", __FILE__) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2671,7 +2671,7 @@ fd1765_t::fd1765_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int fd1765_t::calc_sector_size(UINT8 size, UINT8 command) const +int fd1765_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2679,7 +2679,7 @@ int fd1765_t::calc_sector_size(UINT8 size, UINT8 command) const return 128 << ((size + 1) & 3); } -fd1767_t::fd1767_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1767, "FD1767", tag, owner, clock, "fd1767", __FILE__) +fd1767_t::fd1767_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, FD1767, "FD1767", tag, owner, clock, "fd1767", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -2695,7 +2695,7 @@ fd1767_t::fd1767_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int fd1767_t::calc_sector_size(UINT8 size, UINT8 command) const +int fd1767_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2703,7 +2703,7 @@ int fd1767_t::calc_sector_size(UINT8 size, UINT8 command) const return 128 << ((size + 1) & 3); } -wd2791_t::wd2791_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, WD2791, "WD2791", tag, owner, clock, "wd2791", __FILE__) +wd2791_t::wd2791_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, WD2791, "WD2791", tag, owner, clock, "wd2791", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -2719,7 +2719,7 @@ wd2791_t::wd2791_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -wd2793_t::wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, WD2793, "WD2793", tag, owner, clock, "wd2793", __FILE__) +wd2793_t::wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, WD2793, "WD2793", tag, owner, clock, "wd2793", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -2735,7 +2735,7 @@ wd2793_t::wd2793_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -wd2795_t::wd2795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, WD2795, "WD2795", tag, owner, clock, "wd2795", __FILE__) +wd2795_t::wd2795_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, WD2795, "WD2795", tag, owner, clock, "wd2795", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -2751,7 +2751,7 @@ wd2795_t::wd2795_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int wd2795_t::calc_sector_size(UINT8 size, UINT8 command) const +int wd2795_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2759,7 +2759,7 @@ int wd2795_t::calc_sector_size(UINT8 size, UINT8 command) const return 128 << ((size + 1) & 3); } -wd2797_t::wd2797_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, WD2797, "WD2797", tag, owner, clock, "wd2797", __FILE__) +wd2797_t::wd2797_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_t(mconfig, WD2797, "WD2797", tag, owner, clock, "wd2797", __FILE__) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -2775,7 +2775,7 @@ wd2797_t::wd2797_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -int wd2797_t::calc_sector_size(UINT8 size, UINT8 command) const +int wd2797_t::calc_sector_size(uint8_t size, uint8_t command) const { if(command & 0x08) return 128 << (size & 3); @@ -2783,7 +2783,7 @@ int wd2797_t::calc_sector_size(UINT8 size, UINT8 command) const return 128 << ((size + 1) & 3); } -wd1770_t::wd1770_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_digital_t(mconfig, WD1770, "WD1770", tag, owner, clock, "wd1770", __FILE__) +wd1770_t::wd1770_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_t(mconfig, WD1770, "WD1770", tag, owner, clock, "wd1770", __FILE__) { step_times = wd_digital_step_times; delay_register_commit = 32; @@ -2799,7 +2799,7 @@ wd1770_t::wd1770_t(const machine_config &mconfig, const char *tag, device_t *own nonsticky_immint = false; } -wd1772_t::wd1772_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_digital_t(mconfig, WD1772, "WD1772", tag, owner, clock, "wd1772", __FILE__) +wd1772_t::wd1772_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_t(mconfig, WD1772, "WD1772", tag, owner, clock, "wd1772", __FILE__) { const static int wd1772_step_times[4] = { 12000, 24000, 4000, 6000 }; @@ -2822,7 +2822,7 @@ int wd1772_t::settle_time() const return 30000; } -wd1773_t::wd1773_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_digital_t(mconfig, WD1773, "WD1773", tag, owner, clock, "wd1773", __FILE__) +wd1773_t::wd1773_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_t(mconfig, WD1773, "WD1773", tag, owner, clock, "wd1773", __FILE__) { step_times = wd_digital_step_times; delay_register_commit = 32; diff --git a/src/devices/machine/wd_fdc.h b/src/devices/machine/wd_fdc.h index 8aab3309264..3987fb89ea7 100644 --- a/src/devices/machine/wd_fdc.h +++ b/src/devices/machine/wd_fdc.h @@ -133,7 +133,7 @@ class wd_fdc_t : public device_t { public: - wd_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + wd_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); template static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast(device).intrq_cb.set_callback(object); } template static devcb_base &set_drq_wr_callback(device_t &device, _Object object) { return downcast(device).drq_cb.set_callback(object); } @@ -147,28 +147,28 @@ public: void set_floppy(floppy_image_device *floppy); void set_force_ready(bool force_ready); - void cmd_w(UINT8 val); - UINT8 status_r(); + void cmd_w(uint8_t val); + uint8_t status_r(); DECLARE_READ8_MEMBER( status_r ) { return status_r(); } DECLARE_WRITE8_MEMBER( cmd_w ) { cmd_w(data); } - void track_w(UINT8 val); - UINT8 track_r(); + void track_w(uint8_t val); + uint8_t track_r(); DECLARE_READ8_MEMBER( track_r ) { return track_r(); } DECLARE_WRITE8_MEMBER( track_w ) { track_w(data); } - void sector_w(UINT8 val); - UINT8 sector_r(); + void sector_w(uint8_t val); + uint8_t sector_r(); DECLARE_READ8_MEMBER( sector_r ) { return sector_r(); } DECLARE_WRITE8_MEMBER( sector_w ) { sector_w(data); } - void data_w(UINT8 val); - UINT8 data_r(); + void data_w(uint8_t val); + uint8_t data_r(); DECLARE_READ8_MEMBER( data_r ) { return data_r(); } DECLARE_WRITE8_MEMBER( data_w ) { data_w(data); } - void gen_w(int reg, UINT8 val); - UINT8 gen_r(int reg); + void gen_w(int reg, uint8_t val); + uint8_t gen_r(int reg); DECLARE_READ8_MEMBER( read ) { return gen_r(offset);} DECLARE_WRITE8_MEMBER( write ) { gen_w(offset,data); } @@ -206,7 +206,7 @@ protected: virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - virtual int calc_sector_size(UINT8 size, UINT8 command) const; + virtual int calc_sector_size(uint8_t size, uint8_t command) const; virtual int settle_time() const; virtual void pll_reset(bool fm, bool enmf, const attotime &when) = 0; @@ -332,12 +332,12 @@ private: attotime tm; int state, next_state; - 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]; }; enum { @@ -371,7 +371,7 @@ private: bool dden, status_type_1, intrq, drq, hld, hlt, enp, force_ready; int main_state, sub_state; - UINT8 command, track, sector, data, status, intrq_cond; + uint8_t command, track, sector, data, status, intrq_cond; int last_dir; int counter, motor_timeout, sector_size; @@ -383,7 +383,7 @@ private: devcb_write_line intrq_cb, drq_cb, hld_cb, enp_cb; devcb_read_line enmf_cb; - UINT8 format_last_byte; + uint8_t format_last_byte; int format_last_byte_count; std::string format_description_string; @@ -438,9 +438,9 @@ private: bool read_one_bit(const attotime &limit); bool write_one_bit(const attotime &limit); - void live_write_raw(UINT16 raw); - void live_write_mfm(UINT8 mfm); - void live_write_fm(UINT8 fm); + void live_write_raw(uint16_t raw); + void live_write_mfm(uint8_t mfm); + void live_write_fm(uint8_t fm); void drop_drq(); void set_drq(); @@ -448,7 +448,7 @@ private: class wd_fdc_analog_t : public wd_fdc_t { public: - wd_fdc_analog_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + wd_fdc_analog_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: virtual void pll_reset(bool fm, bool enmf, const attotime &when) override; @@ -466,7 +466,7 @@ private: class wd_fdc_digital_t : public wd_fdc_t { public: - wd_fdc_digital_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + wd_fdc_digital_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); protected: static const int wd_digital_step_times[4]; @@ -482,12 +482,12 @@ protected: private: struct digital_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[42]; @@ -510,138 +510,138 @@ private: class fd1771_t : public wd_fdc_analog_t { public: - fd1771_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1771_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class fd1781_t : public wd_fdc_analog_t { public: - fd1781_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1781_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class fd1791_t : public wd_fdc_analog_t { public: - fd1791_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1791_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1792_t : public wd_fdc_analog_t { public: - fd1792_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1792_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1793_t : public wd_fdc_analog_t { public: - fd1793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1793_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class kr1818vg93_t : public wd_fdc_analog_t { public: - kr1818vg93_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + kr1818vg93_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1794_t : public wd_fdc_analog_t { public: - fd1794_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1794_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1795_t : public wd_fdc_analog_t { public: - fd1795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1795_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class fd1797_t : public wd_fdc_analog_t { public: - fd1797_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1797_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class mb8866_t : public wd_fdc_analog_t { public: - mb8866_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb8866_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class mb8876_t : public wd_fdc_analog_t { public: - mb8876_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb8876_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class mb8877_t : public wd_fdc_analog_t { public: - mb8877_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mb8877_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1761_t : public wd_fdc_analog_t { public: - fd1761_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1761_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1763_t : public wd_fdc_analog_t { public: - fd1763_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1763_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class fd1765_t : public wd_fdc_analog_t { public: - fd1765_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1765_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class fd1767_t : public wd_fdc_analog_t { public: - fd1767_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + fd1767_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class wd2791_t : public wd_fdc_analog_t { public: - wd2791_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd2791_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE_LINE_MEMBER(enmf_w) { enmf = state ? false : true; } }; class wd2793_t : public wd_fdc_analog_t { public: - wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_WRITE_LINE_MEMBER(enmf_w) { enmf = state ? false : true; } }; class wd2795_t : public wd_fdc_analog_t { public: - wd2795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd2795_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class wd2797_t : public wd_fdc_analog_t { public: - wd2797_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd2797_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - virtual int calc_sector_size(UINT8 size, UINT8 command) const override; + virtual int calc_sector_size(uint8_t size, uint8_t command) const override; }; class wd1770_t : public wd_fdc_digital_t { public: - wd1770_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd1770_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class wd1772_t : public wd_fdc_digital_t { public: - wd1772_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd1772_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: virtual int settle_time() const override; @@ -649,7 +649,7 @@ protected: class wd1773_t : public wd_fdc_digital_t { public: - wd1773_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + wd1773_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; extern const device_type FD1771; diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp index d85b8110e82..22a76b941fe 100644 --- a/src/devices/machine/wozfdc.cpp +++ b/src/devices/machine/wozfdc.cpp @@ -44,17 +44,17 @@ const tiny_rom_entry *wozfdc_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -wozfdc_device::wozfdc_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) : +wozfdc_device::wozfdc_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) { } -diskii_fdc::diskii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +diskii_fdc::diskii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wozfdc_device(mconfig, DISKII_FDC, "Apple Disk II floppy controller", tag, owner, clock, "d2fdc", __FILE__) { } -appleiii_fdc::appleiii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +appleiii_fdc::appleiii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wozfdc_device(mconfig, DISKII_FDC, "Apple III floppy controller", tag, owner, clock, "a3fdc", __FILE__) { } @@ -313,17 +313,17 @@ void wozfdc_device::control(int offset) } } -UINT64 wozfdc_device::time_to_cycles(const attotime &tm) +uint64_t wozfdc_device::time_to_cycles(const attotime &tm) { // Clock is falling edges of the ~2Mhz clock // The 1021800 must be the controlling 6502's speed - UINT64 cycles = tm.as_ticks(clock()*2); + uint64_t cycles = tm.as_ticks(clock()*2); cycles = (cycles+1) >> 1; return cycles; } -attotime wozfdc_device::cycles_to_time(UINT64 cycles) +attotime wozfdc_device::cycles_to_time(uint64_t cycles) { return attotime::from_ticks(cycles*2+1, clock()*2); } @@ -347,9 +347,9 @@ void wozfdc_device::lss_sync() attotime next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles-1)) : attotime::never; - UINT64 cycles_limit = time_to_cycles(machine().time()); - UINT64 cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1); - UINT64 cycles_next_flux_down = cycles_next_flux != UINT64(-1) ? cycles_next_flux+1 : UINT64(-1); + uint64_t cycles_limit = time_to_cycles(machine().time()); + uint64_t cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : uint64_t(-1); + uint64_t cycles_next_flux_down = cycles_next_flux != uint64_t(-1) ? cycles_next_flux+1 : uint64_t(-1); if(cycles >= cycles_next_flux && cycles < cycles_next_flux_down) address &= ~0x10; @@ -357,14 +357,14 @@ void wozfdc_device::lss_sync() address |= 0x10; while(cycles < cycles_limit) { - UINT64 cycles_next_trans = cycles_limit; + uint64_t cycles_next_trans = cycles_limit; if(cycles_next_trans > cycles_next_flux && cycles < cycles_next_flux) cycles_next_trans = cycles_next_flux; if(cycles_next_trans > cycles_next_flux_down && cycles < cycles_next_flux_down) cycles_next_trans = cycles_next_flux_down; while(cycles < cycles_next_trans) { - UINT8 opcode = m_rom_p6[address]; + uint8_t opcode = m_rom_p6[address]; if(mode_write) { if((write_line_active && !(address & 0x80)) || @@ -413,8 +413,8 @@ void wozfdc_device::lss_sync() else if(cycles == cycles_next_flux_down) { address |= 0x10; next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles)) : attotime::never; - cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1); - cycles_next_flux_down = cycles_next_flux != UINT64(-1) ? cycles_next_flux+1 : UINT64(-1); + cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : uint64_t(-1); + cycles_next_flux_down = cycles_next_flux != uint64_t(-1) ? cycles_next_flux+1 : uint64_t(-1); } } } diff --git a/src/devices/machine/wozfdc.h b/src/devices/machine/wozfdc.h index 99e4177c7fb..cdf0b502de3 100644 --- a/src/devices/machine/wozfdc.h +++ b/src/devices/machine/wozfdc.h @@ -30,7 +30,7 @@ class wozfdc_device: public: // construction/destruction - wozfdc_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); + wozfdc_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); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -51,18 +51,18 @@ private: MODE_IDLE, MODE_ACTIVE, MODE_DELAY }; - UINT64 cycles; - UINT8 data_reg, address; + uint64_t cycles; + uint8_t data_reg, address; attotime write_start_time; attotime write_buffer[32]; int write_position; bool write_line_active; - const UINT8 *m_rom_p6; - UINT8 last_6502_write; + const uint8_t *m_rom_p6; + uint8_t last_6502_write; bool mode_write, mode_load; int active; - UINT8 phases; + uint8_t phases; emu_timer *timer, *delay_timer; bool external_drive_select; bool external_io_select; @@ -72,8 +72,8 @@ private: void control(int offset); void phase(int ph, bool on); - UINT64 time_to_cycles(const attotime &tm); - attotime cycles_to_time(UINT64 cycles); + uint64_t time_to_cycles(const attotime &tm); + attotime cycles_to_time(uint64_t cycles); void a3_update_drive_sel(); void lss_start(); @@ -83,7 +83,7 @@ private: class diskii_fdc : public wozfdc_device { public: - diskii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + diskii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void device_reset() override; @@ -93,7 +93,7 @@ public: class appleiii_fdc : public wozfdc_device { public: - appleiii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + appleiii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void device_reset() override; diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp index 63d28a322e4..cb8cbe013d4 100644 --- a/src/devices/machine/x2212.cpp +++ b/src/devices/machine/x2212.cpp @@ -38,7 +38,7 @@ const device_type X2210 = &device_creator; // x2212_device - constructor //------------------------------------------------- -x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, X2212, "X2212 NVRAM", tag, owner, clock, "x2212", __FILE__), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -52,7 +52,7 @@ x2212_device::x2212_device(const machine_config &mconfig, const char *tag, devic { } -x2212_device::x2212_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, int size_data) +x2212_device::x2212_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, int size_data) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -131,7 +131,7 @@ void x2212_device::nvram_default() void x2212_device::nvram_read(emu_file &file) { - UINT8 *buffer = (UINT8 *) alloca(m_size_data); + uint8_t *buffer = (uint8_t *) alloca(m_size_data); file.read(buffer, m_size_data); for (int byte = 0; byte < m_size_data; byte++) { @@ -152,7 +152,7 @@ void x2212_device::nvram_write(emu_file &file) if (m_auto_save) store(); - UINT8 *buffer = (UINT8 *) alloca(m_size_data); + uint8_t *buffer = (uint8_t *) alloca(m_size_data); for (int byte = 0; byte < m_size_data; byte++) buffer[byte] = m_e2prom->read_byte(byte); file.write(buffer, m_size_data); @@ -239,7 +239,7 @@ WRITE_LINE_MEMBER( x2212_device::recall ) } -x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : x2212_device(mconfig, X2210, "X2210", tag, owner, clock, "x2210", __FILE__, 0x40) { } diff --git a/src/devices/machine/x2212.h b/src/devices/machine/x2212.h index ffcc1dcf84b..7c049f380e2 100644 --- a/src/devices/machine/x2212.h +++ b/src/devices/machine/x2212.h @@ -48,8 +48,8 @@ class x2212_device : public device_t, { public: // construction/destruction - x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - x2212_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, int size_data); + x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + x2212_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, int size_data); // inline configuration helpers static void static_set_auto_save(device_t &device); @@ -92,13 +92,13 @@ protected: bool m_array_recall; int m_size_data; - optional_region_ptr m_default_data; + optional_region_ptr m_default_data; }; class x2210_device : public x2212_device { public: - x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; diff --git a/src/devices/machine/x76f041.cpp b/src/devices/machine/x76f041.cpp index 481434abc77..682ecaff8de 100644 --- a/src/devices/machine/x76f041.cpp +++ b/src/devices/machine/x76f041.cpp @@ -34,7 +34,7 @@ inline void ATTR_PRINTF( 3, 4 ) x76f041_device::verboselog( int n_level, const c // device type definition const device_type X76F041 = &device_creator; -x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ) +x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : device_t( mconfig, X76F041, "X76F041 Flash", tag, owner, clock, "x76f041", __FILE__ ), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -118,7 +118,7 @@ WRITE_LINE_MEMBER( x76f041_device::write_rst ) m_rst = state; } -UINT8 *x76f041_device::password() +uint8_t *x76f041_device::password() { switch( m_command & 0xe0 ) { @@ -509,7 +509,7 @@ void x76f041_device::nvram_default() } else { - UINT8 *region = m_region->base(); + uint8_t *region = m_region->base(); memcpy( m_response_to_reset, region, sizeof( m_response_to_reset ) ); region += sizeof( m_response_to_reset ); memcpy( m_write_password, region, sizeof( m_write_password ) ); region += sizeof( m_write_password ); diff --git a/src/devices/machine/x76f041.h b/src/devices/machine/x76f041.h index 5c453aad6ee..c0ca2ed4019 100644 --- a/src/devices/machine/x76f041.h +++ b/src/devices/machine/x76f041.h @@ -22,7 +22,7 @@ class x76f041_device : public device_t, { public: // construction/destruction - x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ); + x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ); DECLARE_WRITE_LINE_MEMBER( write_cs ); DECLARE_WRITE_LINE_MEMBER( write_rst ); @@ -41,7 +41,7 @@ protected: private: inline void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, const char *s_fmt, ... ); - UINT8 *password(); + uint8_t *password(); void password_ok(); void load_address(); int data_offset(); @@ -113,13 +113,13 @@ private: int m_byte; int m_command; int m_address; - UINT8 m_write_buffer[ 8 ]; - UINT8 m_response_to_reset[ 4 ]; - UINT8 m_write_password[ 8 ]; - UINT8 m_read_password[ 8 ]; - UINT8 m_configuration_password[ 8 ]; - UINT8 m_configuration_registers[ 8 ]; - UINT8 m_data[ 512 ]; + uint8_t m_write_buffer[ 8 ]; + uint8_t m_response_to_reset[ 4 ]; + uint8_t m_write_password[ 8 ]; + uint8_t m_read_password[ 8 ]; + uint8_t m_configuration_password[ 8 ]; + uint8_t m_configuration_registers[ 8 ]; + uint8_t m_data[ 512 ]; }; diff --git a/src/devices/machine/x76f100.cpp b/src/devices/machine/x76f100.cpp index f254eed7ffc..7a03bf7bed1 100644 --- a/src/devices/machine/x76f100.cpp +++ b/src/devices/machine/x76f100.cpp @@ -32,7 +32,7 @@ inline void ATTR_PRINTF( 3, 4 ) x76f100_device::verboselog( int n_level, const c // device type definition const device_type X76F100 = &device_creator; -x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ) +x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : device_t( mconfig, X76F100, "X76F100 Flash", tag, owner, clock, "x76f100", __FILE__ ), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -112,7 +112,7 @@ WRITE_LINE_MEMBER( x76f100_device::write_rst ) m_rst = state; } -UINT8 *x76f100_device::password() +uint8_t *x76f100_device::password() { if( ( m_command & 0xe1 ) == COMMAND_READ ) { @@ -402,7 +402,7 @@ void x76f100_device::nvram_default() } else { - UINT8 *region = m_region->base(); + uint8_t *region = m_region->base(); memcpy( m_response_to_reset, region, sizeof( m_response_to_reset )); region += sizeof( m_response_to_reset ); memcpy( m_write_password, region, sizeof( m_write_password )); region += sizeof( m_write_password ); diff --git a/src/devices/machine/x76f100.h b/src/devices/machine/x76f100.h index 5ce4b5241c9..d338b1482ac 100644 --- a/src/devices/machine/x76f100.h +++ b/src/devices/machine/x76f100.h @@ -22,7 +22,7 @@ class x76f100_device : public device_t, { public: // construction/destruction - x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ); + x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ); DECLARE_WRITE_LINE_MEMBER( write_cs ); DECLARE_WRITE_LINE_MEMBER( write_rst ); @@ -42,7 +42,7 @@ protected: private: inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4); - UINT8 *password(); + uint8_t *password(); void password_ok(); int data_offset(); @@ -79,11 +79,11 @@ private: int m_bit; int m_byte; int m_command; - UINT8 m_write_buffer[ 8 ]; - UINT8 m_response_to_reset[ 4 ]; - UINT8 m_write_password[ 8 ]; - UINT8 m_read_password[ 8 ]; - UINT8 m_data[ 112 ]; + uint8_t m_write_buffer[ 8 ]; + uint8_t m_response_to_reset[ 4 ]; + uint8_t m_write_password[ 8 ]; + uint8_t m_read_password[ 8 ]; + uint8_t m_data[ 112 ]; }; // device type definition diff --git a/src/devices/machine/ym2148.cpp b/src/devices/machine/ym2148.cpp index bdaef303d77..4f2e5d696ae 100644 --- a/src/devices/machine/ym2148.cpp +++ b/src/devices/machine/ym2148.cpp @@ -16,7 +16,7 @@ TODO: const device_type YM2148 = &device_creator; -ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, YM2148, "YM2148", tag, owner, clock, "ym2148", __FILE__) , device_serial_interface(mconfig, *this) , m_txd_handler(*this) @@ -102,7 +102,7 @@ void ym2148_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_tx_busy = true; m_txd_handler(data); } @@ -197,7 +197,7 @@ WRITE8_MEMBER(ym2148_device::write) } -UINT8 ym2148_device::get_irq_vector() +uint8_t ym2148_device::get_irq_vector() { return (m_irq_state == ASSERT_LINE) ? m_irq_vector : m_external_irq_vector; } diff --git a/src/devices/machine/ym2148.h b/src/devices/machine/ym2148.h index 729b28e8fc2..5ca91bd8883 100644 --- a/src/devices/machine/ym2148.h +++ b/src/devices/machine/ym2148.h @@ -34,7 +34,7 @@ class ym2148_device : public device_t, { public: // construction/destruction - ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template static devcb_base &set_txd_handler(device_t &device, _Object object) { return downcast(device).m_txd_handler.set_callback(object); } @@ -46,7 +46,7 @@ public: DECLARE_WRITE8_MEMBER(write); DECLARE_WRITE_LINE_MEMBER(write_rxd); - UINT8 get_irq_vector(); + uint8_t get_irq_vector(); protected: virtual void device_start() override; @@ -59,13 +59,13 @@ private: devcb_write8 m_port_write_handler; // write ST0-ST7 devcb_read8 m_port_read_handler; // read SD0-SD7 int m_irq_state; - UINT8 m_irq_vector; - UINT8 m_external_irq_vector; + uint8_t m_irq_vector; + uint8_t m_external_irq_vector; // Does this chip have 1 or 2 data registers? - UINT8 m_data_out; - UINT8 m_data_in; - UINT8 m_control; - UINT8 m_status; + uint8_t m_data_out; + uint8_t m_data_in; + uint8_t m_control; + uint8_t m_status; emu_timer *m_timer; int m_rxd; bool m_tx_busy; diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp index a6cb090e30b..b4e072654cc 100644 --- a/src/devices/machine/z80ctc.cpp +++ b/src/devices/machine/z80ctc.cpp @@ -78,7 +78,7 @@ const device_type Z80CTC = &device_creator; // z80ctc_device - constructor //------------------------------------------------- -z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80CTC, "Z80 CTC", tag, owner, clock, "z80ctc", __FILE__), device_z80daisy_interface(mconfig, *this), m_intr_cb(*this), @@ -354,7 +354,7 @@ attotime z80ctc_device::ctc_channel::period() const // read - read the channel's state //------------------------------------------------- -UINT8 z80ctc_device::ctc_channel::read() +uint8_t z80ctc_device::ctc_channel::read() { // if we're in counter mode, just return the count if ((m_mode & MODE) == MODE_COUNTER || (m_mode & WAITING_FOR_TRIG)) @@ -379,7 +379,7 @@ UINT8 z80ctc_device::ctc_channel::read() // write - handle writes to a channel //------------------------------------------------- -void z80ctc_device::ctc_channel::write(UINT8 data) +void z80ctc_device::ctc_channel::write(uint8_t data) { // if we're waiting for a time constant, this is it if ((m_mode & CONSTANT) == CONSTANT_LOAD) @@ -449,7 +449,7 @@ void z80ctc_device::ctc_channel::write(UINT8 data) // side-effects //------------------------------------------------- -void z80ctc_device::ctc_channel::trigger(UINT8 data) +void z80ctc_device::ctc_channel::trigger(uint8_t data) { // normalize data data = data ? 1 : 0; diff --git a/src/devices/machine/z80ctc.h b/src/devices/machine/z80ctc.h index 87e0011fdfa..71e36ccc52a 100644 --- a/src/devices/machine/z80ctc.h +++ b/src/devices/machine/z80ctc.h @@ -58,7 +58,7 @@ class z80ctc_device : public device_t, { public: // construction/destruction - z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_intr_callback(device_t &device, _Object object) { return downcast(device).m_intr_cb.set_callback(object); } template static devcb_base &set_zc0_callback(device_t &device, _Object object) { return downcast(device).m_zc0_cb.set_callback(object); } @@ -73,7 +73,7 @@ public: DECLARE_WRITE_LINE_MEMBER( trg2 ); DECLARE_WRITE_LINE_MEMBER( trg3 ); - UINT16 get_channel_constant(UINT8 channel) { return m_channel[channel].m_tconst; } + uint16_t get_channel_constant(uint8_t channel) { return m_channel[channel].m_tconst; } protected: // device-level overrides @@ -98,21 +98,21 @@ private: void start(z80ctc_device *device, int index); void reset(); - UINT8 read(); - void write(UINT8 data); + uint8_t read(); + void write(uint8_t data); attotime period() const; - void trigger(UINT8 data); + void trigger(uint8_t data); TIMER_CALLBACK_MEMBER(timer_callback); z80ctc_device * m_device; // pointer back to our device int m_index; // our channel index - UINT16 m_mode; // current mode - UINT16 m_tconst; // time constant - UINT16 m_down; // down counter (clock mode only) - UINT8 m_extclk; // current signal from the external clock + uint16_t m_mode; // current mode + uint16_t m_tconst; // time constant + uint16_t m_down; // down counter (clock mode only) + uint8_t m_extclk; // current signal from the external clock emu_timer * m_timer; // array of active timers - UINT8 m_int_state; // interrupt status (for daisy chain) + uint8_t m_int_state; // interrupt status (for daisy chain) }; // internal state @@ -122,7 +122,7 @@ private: devcb_write_line m_zc2_cb; // channel 2 zero crossing callbacks devcb_write_line m_zc3_cb; // channel 3 zero crossing callbacks = nullptr ? - UINT8 m_vector; // interrupt vector + uint8_t m_vector; // interrupt vector attotime m_period16; // 16/system clock attotime m_period256; // 256/system clock ctc_channel m_channel[4]; // data for each channel diff --git a/src/devices/machine/z80dart.cpp b/src/devices/machine/z80dart.cpp index e976080881f..72086d5e00f 100644 --- a/src/devices/machine/z80dart.cpp +++ b/src/devices/machine/z80dart.cpp @@ -86,7 +86,7 @@ machine_config_constructor z80dart_device::device_mconfig_additions() const // z80dart_device - constructor //------------------------------------------------- -z80dart_device::z80dart_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) +z80dart_device::z80dart_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), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -116,7 +116,7 @@ z80dart_device::z80dart_device(const machine_config &mconfig, device_type type, elem = 0; } -z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80DART, "Z80 DART", tag, owner, clock, "z80dart", __FILE__), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -146,37 +146,37 @@ z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, d elem = 0; } -z80sio0_device::z80sio0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio0_device::z80sio0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, Z80SIO0, "Z80 SIO/0", tag, owner, clock, TYPE_SIO0, "z80sio0", __FILE__) { } -z80sio1_device::z80sio1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio1_device::z80sio1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, Z80SIO1, "Z80 SIO/1", tag, owner, clock, TYPE_SIO1, "z80sio1", __FILE__) { } -z80sio2_device::z80sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio2_device::z80sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, Z80SIO2, "Z80 SIO/2", tag, owner, clock, TYPE_SIO2, "z80sio2", __FILE__) { } -z80sio3_device::z80sio3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio3_device::z80sio3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, Z80SIO3, "Z80 SIO/3", tag, owner, clock, TYPE_SIO3, "z80sio3", __FILE__) { } -z80sio4_device::z80sio4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio4_device::z80sio4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, Z80SIO4, "Z80 SIO/4", tag, owner, clock, TYPE_SIO4, "z80sio4", __FILE__) { } -i8274_device::i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +i8274_device::i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, I8274, "I8274", tag, owner, clock, TYPE_I8274, "i8274", __FILE__) { } -upd7201_device::upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +upd7201_device::upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80dart_device(mconfig, UPD7201, "uPD7201", tag, owner, clock, TYPE_UPD7201, "upd7201", __FILE__) { } @@ -353,7 +353,7 @@ void z80dart_device::reset_interrupts() void z80dart_device::trigger_interrupt(int index, int state) { - UINT8 vector = m_chanB->m_wr[2]; + uint8_t vector = m_chanB->m_wr[2]; int priority; if((m_variant == TYPE_I8274) || (m_variant == TYPE_UPD7201)) @@ -499,7 +499,7 @@ WRITE8_MEMBER( z80dart_device::ba_cd_w ) // dart_channel - constructor //------------------------------------------------- -z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80DART_CHANNEL, "Z80 DART channel", tag, owner, clock, "z80dart_channel", __FILE__), device_serial_interface(mconfig, *this), m_rx_error(0), @@ -784,9 +784,9 @@ int z80dart_channel::get_tx_word_length() // control_read - read control register //------------------------------------------------- -UINT8 z80dart_channel::control_read() +uint8_t z80dart_channel::control_read() { - UINT8 data = 0; + uint8_t data = 0; int reg = m_wr[0] & WR0_REGISTER_MASK; @@ -820,7 +820,7 @@ UINT8 z80dart_channel::control_read() // control_write - write control register //------------------------------------------------- -void z80dart_channel::control_write(UINT8 data) +void z80dart_channel::control_write(uint8_t data) { int reg = m_wr[0] & WR0_REGISTER_MASK; @@ -997,9 +997,9 @@ void z80dart_channel::control_write(UINT8 data) // data_read - read data register //------------------------------------------------- -UINT8 z80dart_channel::data_read() +uint8_t z80dart_channel::data_read() { - UINT8 data = 0; + uint8_t data = 0; if (m_rx_fifo >= 0) { @@ -1029,7 +1029,7 @@ UINT8 z80dart_channel::data_read() // data_write - write data register //------------------------------------------------- -void z80dart_channel::data_write(UINT8 data) +void z80dart_channel::data_write(uint8_t data) { m_tx_data = data; @@ -1060,7 +1060,7 @@ void z80dart_channel::data_write(UINT8 data) // receive_data - receive data word //------------------------------------------------- -void z80dart_channel::receive_data(UINT8 data) +void z80dart_channel::receive_data(uint8_t data) { LOG(("Z80DART \"%s\" Channel %c : Receive Data Byte '%02x'\n", m_owner->tag(), 'A' + m_index, data)); diff --git a/src/devices/machine/z80dart.h b/src/devices/machine/z80dart.h index d1efa05fd30..a7eba9f8ac1 100644 --- a/src/devices/machine/z80dart.h +++ b/src/devices/machine/z80dart.h @@ -249,7 +249,7 @@ class z80dart_channel : public device_t, friend class z80dart_device; public: - z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device-level overrides virtual void device_start() override; @@ -262,13 +262,13 @@ public: virtual void rcv_callback() override; virtual void rcv_complete() override; - UINT8 control_read(); - void control_write(UINT8 data); + uint8_t control_read(); + void control_write(uint8_t data); - UINT8 data_read(); - void data_write(UINT8 data); + uint8_t data_read(); + void data_write(uint8_t data); - void receive_data(UINT8 data); + void receive_data(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_rx ); DECLARE_WRITE_LINE_MEMBER( cts_w ); @@ -282,8 +282,8 @@ public: int m_txc; // register state - UINT8 m_rr[3]; // read register - UINT8 m_wr[6]; // write register + uint8_t m_rr[3]; // read register + uint8_t m_wr[6]; // write register protected: enum @@ -428,15 +428,15 @@ protected: int get_tx_word_length(); // receiver state - UINT8 m_rx_data_fifo[3]; // receive data FIFO - UINT8 m_rx_error_fifo[3]; // receive error FIFO - UINT8 m_rx_error; // current receive error + uint8_t m_rx_data_fifo[3]; // receive data FIFO + uint8_t m_rx_error_fifo[3]; // receive error FIFO + uint8_t m_rx_error; // current receive error int m_rx_fifo; // receive FIFO pointer int m_rx_clock; // receive clock pulse count int m_rx_first; // first character received int m_rx_break; // receive break condition - UINT8 m_rx_rr0_latch; // read register 0 latched + uint8_t m_rx_rr0_latch; // read register 0 latched int m_rxd; int m_ri; // ring indicator latch @@ -444,14 +444,14 @@ protected: int m_dcd; // data carrier detect latch // transmitter state - UINT8 m_tx_data; // transmit data register + uint8_t m_tx_data; // transmit data register int m_tx_clock; // transmit clock pulse count int m_dtr; // data terminal ready int m_rts; // request to send // synchronous state - UINT16 m_sync; // sync character + uint16_t m_sync; // sync character int m_index; z80dart_device *m_uart; @@ -467,8 +467,8 @@ class z80dart_device : public device_t, public: // construction/destruction - z80dart_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); - z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80dart_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); + z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_txda_callback(device_t &device, _Object object) { return downcast(device).m_out_txda_cb.set_callback(object); } template static devcb_base &set_out_dtra_callback(device_t &device, _Object object) { return downcast(device).m_out_dtra_cb.set_callback(object); } @@ -603,7 +603,7 @@ class z80sio0_device : public z80dart_device { public: // construction/destruction - z80sio0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -613,7 +613,7 @@ class z80sio1_device : public z80dart_device { public: // construction/destruction - z80sio1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -623,7 +623,7 @@ class z80sio2_device : public z80dart_device { public: // construction/destruction - z80sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -633,7 +633,7 @@ class z80sio3_device : public z80dart_device { public: // construction/destruction - z80sio3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -643,7 +643,7 @@ class z80sio4_device : public z80dart_device { public: // construction/destruction - z80sio4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; @@ -653,7 +653,7 @@ class i8274_device : public z80dart_device { public: // construction/destruction - i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); DECLARE_READ8_MEMBER( inta_r ) { return m1_r(); }; }; @@ -665,7 +665,7 @@ class upd7201_device : public z80dart_device { public: // construction/destruction - upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; diff --git a/src/devices/machine/z80dma.cpp b/src/devices/machine/z80dma.cpp index bf5c4585234..58eb6587cfa 100644 --- a/src/devices/machine/z80dma.cpp +++ b/src/devices/machine/z80dma.cpp @@ -146,7 +146,7 @@ const device_type Z80DMA = &device_creator; // z80dma_device - constructor //------------------------------------------------- -z80dma_device::z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80dma_device::z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80DMA, "Z80 DMA", tag, owner, clock, "z80dma", __FILE__), device_z80daisy_interface(mconfig, *this), m_out_busreq_cb(*this), @@ -367,7 +367,7 @@ void z80dma_device::trigger_interrupt(int level) void z80dma_device::do_read() { - UINT8 mode; + uint8_t mode; mode = TRANSFER_MODE; switch(mode) { @@ -428,7 +428,7 @@ void z80dma_device::do_transfer_write() void z80dma_device::do_search() { - UINT8 load_byte,match_byte; + uint8_t load_byte,match_byte; load_byte = m_latch | MASK_BYTE; match_byte = MATCH_BYTE | MASK_BYTE; //if (LOG) logerror("%02x %02x\n",load_byte,match_byte)); @@ -444,7 +444,7 @@ void z80dma_device::do_search() int z80dma_device::do_write() { int done; - UINT8 mode; + uint8_t mode; mode = TRANSFER_MODE; if (m_count == 0x0000) @@ -551,7 +551,7 @@ TIMER_CALLBACK_MEMBER(z80dma_device::timerproc) void z80dma_device::update_status() { - UINT16 pending_transfer; + uint16_t pending_transfer; attotime next; // no transfer is active right now; is there a transfer pending right now? @@ -591,9 +591,9 @@ void z80dma_device::update_status() // read - register read //------------------------------------------------- -UINT8 z80dma_device::read() +uint8_t z80dma_device::read() { - UINT8 res; + uint8_t res; if(m_read_num_follow == 0) // special case: Legend of Kage on X1 Turbo res = m_status; @@ -616,7 +616,7 @@ UINT8 z80dma_device::read() // write - register write //------------------------------------------------- -void z80dma_device::write(UINT8 data) +void z80dma_device::write(uint8_t data) { if (m_num_follow == 0) { @@ -717,7 +717,7 @@ void z80dma_device::write(UINT8 data) interrupt_check(); // Needs six reset commands to reset the DMA { - UINT8 WRi; + uint8_t WRi; for(WRi=0;WRi<7;WRi++) REG(WRi,m_reset_pointer) = 0; diff --git a/src/devices/machine/z80dma.h b/src/devices/machine/z80dma.h index 0b1916c5d5f..7080854ef5f 100644 --- a/src/devices/machine/z80dma.h +++ b/src/devices/machine/z80dma.h @@ -73,7 +73,7 @@ class z80dma_device : public device_t, { public: // construction/destruction - z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_busreq_callback(device_t &device, _Object object) { return downcast(device).m_out_busreq_cb.set_callback(object); } template static devcb_base &set_out_int_callback(device_t &device, _Object object) { return downcast(device).m_out_int_cb.set_callback(object); } @@ -83,8 +83,8 @@ public: template static devcb_base &set_in_iorq_callback(device_t &device, _Object object) { return downcast(device).m_in_iorq_cb.set_callback(object); } template static devcb_base &set_out_iorq_callback(device_t &device, _Object object) { return downcast(device).m_out_iorq_cb.set_callback(object); } - UINT8 read(); - void write(UINT8 data); + uint8_t read(); + void write(uint8_t data); DECLARE_READ8_MEMBER( read ) { return read(); } DECLARE_WRITE8_MEMBER( write ) { write(data); } @@ -128,32 +128,32 @@ private: emu_timer *m_timer; - UINT16 m_regs[(6<<3)+1+1]; - UINT8 m_num_follow; - UINT8 m_cur_follow; - UINT8 m_regs_follow[5]; - UINT8 m_read_num_follow; - UINT8 m_read_cur_follow; - UINT8 m_read_regs_follow[7]; - UINT8 m_status; - UINT8 m_dma_enabled; + uint16_t m_regs[(6<<3)+1+1]; + uint8_t m_num_follow; + uint8_t m_cur_follow; + uint8_t m_regs_follow[5]; + uint8_t m_read_num_follow; + uint8_t m_read_cur_follow; + uint8_t m_read_regs_follow[7]; + uint8_t m_status; + uint8_t m_dma_enabled; - UINT16 m_addressA; - UINT16 m_addressB; - UINT16 m_count; + uint16_t m_addressA; + uint16_t m_addressB; + uint16_t m_count; int m_rdy; int m_force_ready; - UINT8 m_reset_pointer; + uint8_t m_reset_pointer; bool m_is_read; - UINT8 m_cur_cycle; - UINT8 m_latch; + uint8_t m_cur_cycle; + uint8_t m_latch; // interrupts int m_ip; // interrupt pending int m_ius; // interrupt under service - UINT8 m_vector; // interrupt vector + uint8_t m_vector; // interrupt vector }; diff --git a/src/devices/machine/z80pio.cpp b/src/devices/machine/z80pio.cpp index 6e24a0e68f0..f7e8927f181 100644 --- a/src/devices/machine/z80pio.cpp +++ b/src/devices/machine/z80pio.cpp @@ -38,7 +38,7 @@ const device_type Z80PIO = &device_creator; // z80pio_device - constructor //------------------------------------------------- -z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80PIO, "Z80 PIO", tag, owner, clock, "z80pio", __FILE__), device_z80daisy_interface(mconfig, *this), m_out_int_cb(*this), @@ -233,7 +233,7 @@ WRITE8_MEMBER( z80pio_device::write_alt ) // control_read - control register read //------------------------------------------------- -UINT8 z80pio_device::control_read() +uint8_t z80pio_device::control_read() { return (m_port[PORT_A].m_icw & 0xc0) | (m_port[PORT_B].m_icw >> 4); } @@ -527,9 +527,9 @@ void z80pio_device::pio_port::strobe(bool state) // read - port I/O read //------------------------------------------------- -UINT8 z80pio_device::pio_port::read() +uint8_t z80pio_device::pio_port::read() { - UINT8 data = 0xff; + uint8_t data = 0xff; switch (m_mode) { @@ -555,7 +555,7 @@ UINT8 z80pio_device::pio_port::read() // write - port I/O write //------------------------------------------------- -void z80pio_device::pio_port::write(UINT8 data) +void z80pio_device::pio_port::write(uint8_t data) { if (m_mode == MODE_BIT_CONTROL) { @@ -563,8 +563,8 @@ void z80pio_device::pio_port::write(UINT8 data) m_input = data; // fetch input data (ignore output lines) - UINT8 data = (m_input & m_ior) | (m_output & ~m_ior); - UINT8 mask = ~m_mask; + uint8_t data = (m_input & m_ior) | (m_output & ~m_ior); + uint8_t mask = ~m_mask; bool match = false; data &= mask; @@ -592,7 +592,7 @@ void z80pio_device::pio_port::write(UINT8 data) // control_write - control register write //------------------------------------------------- -void z80pio_device::pio_port::control_write(UINT8 data) +void z80pio_device::pio_port::control_write(uint8_t data) { switch (m_next_control_word) { @@ -696,9 +696,9 @@ void z80pio_device::pio_port::control_write(UINT8 data) // data_read - data register read //------------------------------------------------- -UINT8 z80pio_device::pio_port::data_read() +uint8_t z80pio_device::pio_port::data_read() { - UINT8 data = 0; + uint8_t data = 0; switch (m_mode) { @@ -756,7 +756,7 @@ UINT8 z80pio_device::pio_port::data_read() // data_write - data register write //------------------------------------------------- -void z80pio_device::pio_port::data_write(UINT8 data) +void z80pio_device::pio_port::data_write(uint8_t data) { switch (m_mode) { diff --git a/src/devices/machine/z80pio.h b/src/devices/machine/z80pio.h index 623f586891f..bc8cbf531f7 100644 --- a/src/devices/machine/z80pio.h +++ b/src/devices/machine/z80pio.h @@ -80,7 +80,7 @@ public: }; // construction/destruction - z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_int_callback(device_t &device, _Object object) { return downcast(device).m_out_int_cb.set_callback(object); } template static devcb_base &set_in_pa_callback(device_t &device, _Object object) { return downcast(device).m_in_pa_cb.set_callback(object); } @@ -99,27 +99,27 @@ public: DECLARE_WRITE_LINE_MEMBER( strobe_b ) { strobe(PORT_B, state); } // control register I/O - UINT8 control_read(); - void control_write(int offset, UINT8 data) { m_port[offset & 1].control_write(data); } - void control_a_write(UINT8 data) { control_write(PORT_A, data); } - void control_b_write(UINT8 data) { control_write(PORT_B, data); } + uint8_t control_read(); + void control_write(int offset, uint8_t data) { m_port[offset & 1].control_write(data); } + void control_a_write(uint8_t data) { control_write(PORT_A, data); } + void control_b_write(uint8_t data) { control_write(PORT_B, data); } // data register I/O - UINT8 data_read(int offset) { return m_port[offset & 1].data_read(); } - void data_write(int offset, UINT8 data) { m_port[offset & 1].data_write(data); } - UINT8 data_a_read() { return data_read(PORT_A); } - UINT8 data_b_read() { return data_read(PORT_B); } - void data_a_write(UINT8 data) { data_write(PORT_A, data); } - void data_b_write(UINT8 data) { data_write(PORT_B, data); } + uint8_t data_read(int offset) { return m_port[offset & 1].data_read(); } + void data_write(int offset, uint8_t data) { m_port[offset & 1].data_write(data); } + uint8_t data_a_read() { return data_read(PORT_A); } + uint8_t data_b_read() { return data_read(PORT_B); } + void data_a_write(uint8_t data) { data_write(PORT_A, data); } + void data_b_write(uint8_t data) { data_write(PORT_B, data); } // port I/O - UINT8 port_read(int offset) { return m_port[offset & 1].read(); } - void port_write(int offset, UINT8 data) { m_port[offset & 1].write(data); } + uint8_t port_read(int offset) { return m_port[offset & 1].read(); } + void port_write(int offset, uint8_t data) { m_port[offset & 1].write(data); } void port_write(int offset, int bit, int state) { port_write(offset, (m_port[offset & 1].m_input & ~(1 << bit)) | (state << bit)); } - UINT8 port_a_read() { return port_read(PORT_A); } - UINT8 port_b_read() { return port_read(PORT_B); } - void port_a_write(UINT8 data) { port_write(PORT_A, data); } - void port_b_write(UINT8 data) { port_write(PORT_B, data); } + uint8_t port_a_read() { return port_read(PORT_A); } + uint8_t port_b_read() { return port_read(PORT_B); } + void port_a_write(uint8_t data) { port_write(PORT_A, data); } + void port_b_write(uint8_t data) { port_write(PORT_B, data); } DECLARE_WRITE8_MEMBER( pa_w ) { port_a_write(data); } DECLARE_READ8_MEMBER( pa_r ) { return port_a_read(); } DECLARE_WRITE8_MEMBER( pb_w ) { port_b_write(data); } @@ -207,13 +207,13 @@ private: void set_mode(int mode); void strobe(bool state); - UINT8 read(); - void write(UINT8 data); + uint8_t read(); + void write(uint8_t data); - void control_write(UINT8 data); + void control_write(uint8_t data); - UINT8 data_read(); - void data_write(UINT8 data); + uint8_t data_read(); + void data_write(uint8_t data); private: void check_interrupts() { m_device->check_interrupts(); } @@ -223,9 +223,9 @@ private: int m_mode; // mode register int m_next_control_word; // next control word - UINT8 m_input; // input latch - UINT8 m_output; // output latch - UINT8 m_ior; // input/output register + uint8_t m_input; // input latch + uint8_t m_output; // output latch + uint8_t m_ior; // input/output register bool m_rdy; // ready bool m_stb; // strobe @@ -233,9 +233,9 @@ private: bool m_ie; // interrupt enabled bool m_ip; // interrupt pending bool m_ius; // interrupt under service - UINT8 m_icw; // interrupt control word - UINT8 m_vector; // interrupt vector - UINT8 m_mask; // interrupt mask + uint8_t m_icw; // interrupt control word + uint8_t m_vector; // interrupt vector + uint8_t m_mask; // interrupt mask bool m_match; // logic equation match }; diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp index 251596f6fac..d3bf9f69980 100644 --- a/src/devices/machine/z80scc.cpp +++ b/src/devices/machine/z80scc.cpp @@ -146,7 +146,7 @@ machine_config_constructor z80scc_device::device_mconfig_additions() const // z80scc_device - constructor //------------------------------------------------- -z80scc_device::z80scc_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) +z80scc_device::z80scc_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), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -176,7 +176,7 @@ z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, co elem = 0; } -z80scc_device::z80scc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80scc_device::z80scc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80SCC, "Z80 SCC", tag, owner, clock, "z80scc", __FILE__), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -202,28 +202,28 @@ z80scc_device::z80scc_device(const machine_config &mconfig, const char *tag, dev elem = 0; } -scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC8030, "SCC 8030", tag, owner, clock, TYPE_SCC8030, "scc8030", __FILE__){ } -scc80C30_device::scc80C30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc80C30_device::scc80C30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC80C30, "SCC 80C30", tag, owner, clock, TYPE_SCC80C30, "scc80C30", __FILE__){ } -scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC80230, "SCC 80230", tag, owner, clock, TYPE_SCC80230, "scc80230", __FILE__){ } -scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC8530N, "SCC 8530", tag, owner, clock, TYPE_SCC8530, "scc8530", __FILE__){ } -scc85C30_device::scc85C30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc85C30_device::scc85C30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC85C30, "SCC 85C30", tag, owner, clock, TYPE_SCC85C30, "scc85C30", __FILE__){ } -scc85230_device::scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc85230_device::scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC85230, "SCC 85230", tag, owner, clock, TYPE_SCC85230, "scc85230", __FILE__){ } -scc85233_device::scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc85233_device::scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC85233, "SCC 85233", tag, owner, clock, TYPE_SCC85233, "scc85233", __FILE__){ } -scc8523L_device::scc8523L_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +scc8523L_device::scc8523L_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z80scc_device(mconfig, SCC8523L, "SCC 8523L", tag, owner, clock, TYPE_SCC8523L, "scc8523L", __FILE__){ } //------------------------------------------------- @@ -403,7 +403,7 @@ void z80scc_device::reset_interrupts() check_interrupts(); } -UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src) +uint8_t z80scc_device::modify_vector(uint8_t vec, int i, uint8_t src) { /* Interrupt Vector Modification @@ -443,8 +443,8 @@ UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src) //------------------------------------------------- void z80scc_device::trigger_interrupt(int index, int state) { - UINT8 vector = m_chanA->m_rr2; - UINT8 source = 0; + uint8_t vector = m_chanA->m_rr2; + uint8_t source = 0; int priority; int prio_level = 0; @@ -558,7 +558,7 @@ READ8_MEMBER( z80scc_device::zbus_r ) { int ba = 0; int reg = 0x20; // Default point to a non register number - UINT8 data = 0; + uint8_t data = 0; /* Expell non- Z-Bus variants */ if ( !(m_variant & SET_Z80X30)) @@ -763,7 +763,7 @@ WRITE8_MEMBER( z80scc_device::ba_cd_inv_w ) // SCC_channel - constructor //------------------------------------------------- -z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80SCC_CHANNEL, "Z80 SCC channel", tag, owner, clock, "z80scc_channel", __FILE__), device_serial_interface(mconfig, *this), #if LOCAL_BRG @@ -1114,7 +1114,7 @@ void z80scc_channel::rcv_callback() void z80scc_channel::rcv_complete() { - UINT8 data; + uint8_t data; receive_register_extract(); data = get_received_char(); @@ -1244,7 +1244,7 @@ int z80scc_channel::get_tx_word_length() * This register contains the status of the receive and transmit buffers; the * DCD, CTS, and SYNC inputs; the Transmit Underrun/EOM latch; and the * Break/Abort latch. */ -UINT8 z80scc_channel::do_sccreg_rr0() +uint8_t z80scc_channel::do_sccreg_rr0() { LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_rr0)); return m_rr0; @@ -1253,7 +1253,7 @@ UINT8 z80scc_channel::do_sccreg_rr0() /* * This register contains the Special Receive condition status bits and Residue * codes for the I-Field in the SDLC Receive Mode. */ -UINT8 z80scc_channel::do_sccreg_rr1() +uint8_t z80scc_channel::do_sccreg_rr1() { LOGR(("%s %s <- %02x\n",tag(), FUNCNAME, m_rr1)); return m_rr1; @@ -1265,7 +1265,7 @@ the vector returned is the vector actually stored in WR2. When this register is B, the vector returned includes status information in bits 1, 2 and 3 or in bits 6, 5 and 4, depending on the state of the Status High/Status Low bit in WR9 and independent of the state of the VIS bit in WR9."*/ -UINT8 z80scc_channel::do_sccreg_rr2() +uint8_t z80scc_channel::do_sccreg_rr2() { LOGR(("%s\n", FUNCNAME)); @@ -1303,7 +1303,7 @@ RR3 is the interrupt Pending register. The status of each of the interrupt Pendi reported in this register. This register exists only in Channel A. If this register is accessed in Channel B, all 0s are returned. The two unused bits are always returned as 0. Figure displays the bit positions for RR3." */ -UINT8 z80scc_channel::do_sccreg_rr3() +uint8_t z80scc_channel::do_sccreg_rr3() { LOGR(("%s\n", FUNCNAME)); return m_rr3; // TODO Update all bits of this status register @@ -1314,7 +1314,7 @@ UINT8 z80scc_channel::do_sccreg_rr3() /*On the ESCC, Read Register 4 reflects the contents of Write Register 4 provided the Extended Read option is enabled. Otherwise, this register returns an image of RR0. On the NMOS/CMOS version, a read to this location returns an image of RR0.*/ -UINT8 z80scc_channel::do_sccreg_rr4() +uint8_t z80scc_channel::do_sccreg_rr4() { LOGR(("%s\n", FUNCNAME)); if (m_uart->m_variant & (SET_ESCC | z80scc_device::TYPE_SCC85C30)) @@ -1327,7 +1327,7 @@ UINT8 z80scc_channel::do_sccreg_rr4() /*On the ESCC, Read Register 5 reflects the contents of Write Register 5 provided the Extended Read option is enabled. Otherwise, this register returns an image of RR1. On the NMOS/CMOS version, a read to this register returns an image of RR1.*/ -UINT8 z80scc_channel::do_sccreg_rr5() +uint8_t z80scc_channel::do_sccreg_rr5() { LOGR(("%s\n", FUNCNAME)); if (m_uart->m_variant & (SET_ESCC | z80scc_device::TYPE_SCC85C30)) @@ -1342,7 +1342,7 @@ UINT8 z80scc_channel::do_sccreg_rr5() register is readable only if the FIFO is enabled (refer to the description Write Register 15, bit D2, and SDLC Frame Status FIFO on page 126). Otherwise, this register is an image of RR2. On the NMOS version, a read to this register location returns an image of RR2.*/ -UINT8 z80scc_channel::do_sccreg_rr6() +uint8_t z80scc_channel::do_sccreg_rr6() { LOGR(("%s\n", FUNCNAME)); if (m_wr15 & WR15_STATUS_FIFO) @@ -1361,7 +1361,7 @@ UINT8 z80scc_channel::do_sccreg_rr6() description Write Register 15, bit D2). Otherwise this register is an image of RR3. Note, for proper operation of the FIFO and byte count logic, the registers should be read in the following order: RR7, RR6, RR1.*/ -UINT8 z80scc_channel::do_sccreg_rr7() +uint8_t z80scc_channel::do_sccreg_rr7() { LOGR(("%s\n", FUNCNAME)); if (!(m_uart->m_variant & (SET_NMOS))) @@ -1374,7 +1374,7 @@ UINT8 z80scc_channel::do_sccreg_rr7() #if 0 // Short cutted in control_read() /* RR8 is the Receive Data register. */ -UINT8 z80scc_channel::do_sccreg_rr8() +uint8_t z80scc_channel::do_sccreg_rr8() { return data_read(): } @@ -1384,7 +1384,7 @@ UINT8 z80scc_channel::do_sccreg_rr8() On the ESCC, Read Register 9 reflects the contents of Write Register 3 provided the Extended Read option has been enabled. On the NMOS/CMOS version, a read to this location returns an image of RR13. TODO: Check what is returned if Extended Read option is turned off */ -UINT8 z80scc_channel::do_sccreg_rr9() +uint8_t z80scc_channel::do_sccreg_rr9() { LOGR(("%s\n", FUNCNAME)); if (m_uart->m_variant & (SET_ESCC | z80scc_device::TYPE_SCC85C30)) @@ -1394,7 +1394,7 @@ UINT8 z80scc_channel::do_sccreg_rr9() } /* RR10 contains some SDLC related miscellaneous status bits. Unused bits are always 0. */ -UINT8 z80scc_channel::do_sccreg_rr10() +uint8_t z80scc_channel::do_sccreg_rr10() { LOGR(("%s\n", FUNCNAME)); logerror("%s() not implemented feature\n", FUNCNAME); @@ -1405,7 +1405,7 @@ UINT8 z80scc_channel::do_sccreg_rr10() On the ESCC, Read Register 11 reflects the contents of Write Register 10 provided the Extended Read option has been enabled. Otherwise, this register returns an image of RR15. On the NMOS/CMOS version, a read to this location returns an image of RR15.*/ -UINT8 z80scc_channel::do_sccreg_rr11() +uint8_t z80scc_channel::do_sccreg_rr11() { LOGR(("%s\n", FUNCNAME)); if (m_uart->m_variant & (SET_ESCC | z80scc_device::TYPE_SCC85C30)) @@ -1416,7 +1416,7 @@ UINT8 z80scc_channel::do_sccreg_rr11() /* RR12 returns the value stored in WR12, the lower byte of the time constant, for the BRG.*/ -UINT8 z80scc_channel::do_sccreg_rr12() +uint8_t z80scc_channel::do_sccreg_rr12() { LOGR(("%s\n", FUNCNAME)); return m_wr12; @@ -1424,7 +1424,7 @@ UINT8 z80scc_channel::do_sccreg_rr12() /* RR13 returns the value stored in WR13, the upper byte of the time constant for the BRG. */ -UINT8 z80scc_channel::do_sccreg_rr13() +uint8_t z80scc_channel::do_sccreg_rr13() { LOGR(("%s\n", FUNCNAME)); return m_wr13; @@ -1434,7 +1434,7 @@ UINT8 z80scc_channel::do_sccreg_rr13() On the ESCC, Read Register 14 reflects the contents of Write Register 7 Prime provided the Extended Read option has been enabled. Otherwise, this register returns an image of RR10. On the NMOS/CMOS version, a read to this location returns an image of RR10.*/ -UINT8 z80scc_channel::do_sccreg_rr14() +uint8_t z80scc_channel::do_sccreg_rr14() { LOGR(("%s\n", FUNCNAME)); if (m_uart->m_variant & (SET_ESCC | z80scc_device::TYPE_SCC85C30)) @@ -1446,7 +1446,7 @@ UINT8 z80scc_channel::do_sccreg_rr14() /* RR15 reflects the value stored in WR15, the External/Status IE bits. The two unused bits are always returned as Os. */ -UINT8 z80scc_channel::do_sccreg_rr15() +uint8_t z80scc_channel::do_sccreg_rr15() { LOGR(("%s\n", FUNCNAME)); logerror("%s() not implemented feature\n", FUNCNAME); @@ -1456,12 +1456,12 @@ UINT8 z80scc_channel::do_sccreg_rr15() //------------------------------------------------- // scc_register_read - read a SCC register //------------------------------------------------- -UINT8 z80scc_channel::scc_register_read( UINT8 reg) +uint8_t z80scc_channel::scc_register_read( uint8_t reg) { if (reg > 1) LOG(("%s %02x\n", FUNCNAME, reg)); - UINT8 data = 0; - UINT8 wreg = 0; + uint8_t data = 0; + uint8_t wreg = 0; /* Sort out 80X30 limitations in register access */ // if ((BIT(m_wr15, 2) == 0) || m_uart->m_variant == z80scc_device::TYPE_SCC8030) @@ -1517,9 +1517,9 @@ UINT8 z80scc_channel::scc_register_read( UINT8 reg) //------------------------------------------------- // control_read - read control register //------------------------------------------------- -UINT8 z80scc_channel::control_read() +uint8_t z80scc_channel::control_read() { - UINT8 data = 0; + uint8_t data = 0; int reg = m_uart->m_wr0_ptrbits; //m_wr0; int regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH)); @@ -1542,7 +1542,7 @@ UINT8 z80scc_channel::control_read() /* CRC Initialization Code handling - candidate for breaking out in a z80sio_base class Handle the WR0 CRC Reset/Init bits separatelly, needed by derived devices separatelly from the commands */ -void z80scc_channel::do_sccreg_wr0_resets(UINT8 data) +void z80scc_channel::do_sccreg_wr0_resets(uint8_t data) { LOG(("%s(%02x) %s",FUNCNAME, data, tag())); switch (data & WR0_CRC_RESET_CODE_MASK) @@ -1565,7 +1565,7 @@ void z80scc_channel::do_sccreg_wr0_resets(UINT8 data) } /**/ -void z80scc_channel::do_sccreg_wr0(UINT8 data) +void z80scc_channel::do_sccreg_wr0(uint8_t data) { m_wr0 = data; @@ -1666,7 +1666,7 @@ void z80scc_channel::do_sccreg_wr0(UINT8 data) } /* Write Register 1 is the control register for the various SCC interrupt and Wait/Request modes.*/ -void z80scc_channel::do_sccreg_wr1(UINT8 data) +void z80scc_channel::do_sccreg_wr1(uint8_t data) { LOG(("%s(%02x) \"%s\": %c : %s - %02x\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index, FUNCNAME, data)); /* TODO: Sort out SCC specific behaviours from legacy SIO behaviours: @@ -1704,7 +1704,7 @@ void z80scc_channel::do_sccreg_wr1(UINT8 data) /*WR2 is the interrupt vector register. Only one vector register exists in the SCC, and it can be accessed through either channel. The interrupt vector can be modified by status information. This is controlled by the Vector Includes Status (VIS) and the Status High/Status Low bits in WR9.*/ -void z80scc_channel::do_sccreg_wr2(UINT8 data) +void z80scc_channel::do_sccreg_wr2(uint8_t data) { LOG(("%s(%02x) Setting the interrupt vector\n", FUNCNAME, data)); m_wr2 = data; @@ -1714,7 +1714,7 @@ void z80scc_channel::do_sccreg_wr2(UINT8 data) m_uart->check_interrupts(); } -void z80scc_channel::do_sccreg_wr3(UINT8 data) +void z80scc_channel::do_sccreg_wr3(uint8_t data) { LOG(("%s(%02x) Setting up the receiver\n", FUNCNAME, data)); m_wr3 = data; @@ -1725,7 +1725,7 @@ void z80scc_channel::do_sccreg_wr3(UINT8 data) receive_register_reset(); } -void z80scc_channel::do_sccreg_wr4(UINT8 data) +void z80scc_channel::do_sccreg_wr4(uint8_t data) { LOG(("%s(%02x) Setting up asynchronous frame format and clock\n", FUNCNAME, data)); if (data == m_wr4) @@ -1745,7 +1745,7 @@ void z80scc_channel::do_sccreg_wr4(UINT8 data) } } -void z80scc_channel::do_sccreg_wr5(UINT8 data) +void z80scc_channel::do_sccreg_wr5(uint8_t data) { LOG(("%s(%02x) Setting up the transmitter\n", FUNCNAME, data)); if (data == m_wr5) @@ -1754,7 +1754,7 @@ void z80scc_channel::do_sccreg_wr5(UINT8 data) } else { - // UINT8 old_wr5 = m_wr5; + // uint8_t old_wr5 = m_wr5; m_wr5 = data; LOG(("- Transmitter Enable %u\n", (data & WR5_TX_ENABLE) ? 1 : 0)); LOG(("- Transmitter Bits/Character %u\n", get_tx_word_length())); @@ -1772,20 +1772,20 @@ void z80scc_channel::do_sccreg_wr5(UINT8 data) } } -void z80scc_channel::do_sccreg_wr6(UINT8 data) +void z80scc_channel::do_sccreg_wr6(uint8_t data) { LOG(("%s(%02x) Transmit sync\n", FUNCNAME, data)); m_sync = (m_sync & 0xff00) | data; } -void z80scc_channel::do_sccreg_wr7(UINT8 data) +void z80scc_channel::do_sccreg_wr7(uint8_t data) { LOG(("%s(%02x) Receive sync\n", FUNCNAME, data)); m_sync = (data << 8) | (m_sync & 0xff); } /* WR8 is the transmit buffer register */ -void z80scc_channel::do_sccreg_wr8(UINT8 data) +void z80scc_channel::do_sccreg_wr8(uint8_t data) { LOG(("%s(%02x) \"%s\": %c : Transmit Buffer write %02x\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index, data)); data_write(data); @@ -1795,7 +1795,7 @@ void z80scc_channel::do_sccreg_wr8(UINT8 data) exists in the SCC and is accessed from either channel. The Interrupt control bits are programmed at the same time as the Reset command, because these bits are only reset by a hardware reset note that the Z80X30 contains only one WR2 and WR9; these registers may be written from either channel.*/ -void z80scc_channel::do_sccreg_wr9(UINT8 data) +void z80scc_channel::do_sccreg_wr9(uint8_t data) { m_uart->m_wr9 = data; // There is only one WR9 register and is written from both channels A and B (if exists) @@ -1819,7 +1819,7 @@ void z80scc_channel::do_sccreg_wr9(UINT8 data) */ if (m_uart->m_variant & SET_Z80X30) { - UINT8 tmp_wr0 = m_wr0; // Save the Shift Left/Shift Right bits + uint8_t tmp_wr0 = m_wr0; // Save the Shift Left/Shift Right bits m_uart->device_reset(); // Restore the Shift Left/Shift Right bits m_wr0 &= 0xfc; @@ -1841,7 +1841,7 @@ void z80scc_channel::do_sccreg_wr9(UINT8 data) /* WR10 contains miscellaneous control bits for both the receiver and the transmitter. Bit positions for WR10 are displayed in Figure . On the ESCC and 85C30 with the Extended Read option enabled, this register may be read as RR11.*/ -void z80scc_channel::do_sccreg_wr10(UINT8 data) +void z80scc_channel::do_sccreg_wr10(uint8_t data) { m_wr10 = data; LOG(("\"%s\": %c : %s Misc Tx/Rx Control %02x - not implemented \n", m_owner->tag(), 'A' + m_index, FUNCNAME, data)); @@ -1850,7 +1850,7 @@ void z80scc_channel::do_sccreg_wr10(UINT8 data) /* WR11 is the Clock Mode Control register. The bits in this register control the sources of both the receive and transmit clocks, the type of signal on the /SYNC and /RTxC pins, and the direction of the /TRxC pin.*/ -void z80scc_channel::do_sccreg_wr11(UINT8 data) +void z80scc_channel::do_sccreg_wr11(uint8_t data) { LOG(("\"%s\": %c : %s Clock Mode Control %02x\n", m_owner->tag(), 'A' + m_index, FUNCNAME, data)); m_wr11 = data; @@ -1933,7 +1933,7 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data) Time Constant = Clock Frequency / (2 * Desired Rate * Baud Rate Clock Period) - 2 */ -void z80scc_channel::do_sccreg_wr12(UINT8 data) +void z80scc_channel::do_sccreg_wr12(uint8_t data) { m_wr12 = data; update_serial(); @@ -1941,7 +1941,7 @@ void z80scc_channel::do_sccreg_wr12(UINT8 data) } /* WR13 contains the upper byte of the time constant for the baud rate generator. */ -void z80scc_channel::do_sccreg_wr13(UINT8 data) +void z80scc_channel::do_sccreg_wr13(uint8_t data) { m_wr13 = data; update_serial(); @@ -1950,7 +1950,7 @@ void z80scc_channel::do_sccreg_wr13(UINT8 data) /* WR14 contains some miscellaneous control bits */ -void z80scc_channel::do_sccreg_wr14(UINT8 data) +void z80scc_channel::do_sccreg_wr14(uint8_t data) { switch (data & WR14_DPLL_CMD_MASK) { @@ -2048,7 +2048,7 @@ void z80scc_channel::do_sccreg_wr14(UINT8 data) interrupt. This is true, even if an External/Status condition is pending at the time the bit is set*/ #define WR15EN "enabled" #define WR15NO "not implemented" -void z80scc_channel::do_sccreg_wr15(UINT8 data) +void z80scc_channel::do_sccreg_wr15(uint8_t data) { LOGINT(("%s(%02x) \"%s\": %c : External/Status Control Bits\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index)); @@ -2063,7 +2063,7 @@ void z80scc_channel::do_sccreg_wr15(UINT8 data) m_wr15 = data; } -void z80scc_channel::scc_register_write(UINT8 reg, UINT8 data) +void z80scc_channel::scc_register_write(uint8_t reg, uint8_t data) { switch (reg) { @@ -2109,10 +2109,10 @@ with 0 before accessing WR0 or RR0.*/ // control_write - write control register //------------------------------------------------- -void z80scc_channel::control_write(UINT8 data) +void z80scc_channel::control_write(uint8_t data) { - UINT8 reg = m_uart->m_wr0_ptrbits; //m_wr0; - UINT8 regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH)); + uint8_t reg = m_uart->m_wr0_ptrbits; //m_wr0; + uint8_t regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH)); m_uart->m_wr0_ptrbits = 0; // The "Point High" command is only valid for one access @@ -2135,9 +2135,9 @@ void z80scc_channel::control_write(UINT8 data) // data_read - read data register from fifo //------------------------------------------------- -UINT8 z80scc_channel::data_read() +uint8_t z80scc_channel::data_read() { - UINT8 data = 0; + uint8_t data = 0; LOG(("%s \"%s\": %c : Data Register Read: ", FUNCNAME, m_owner->tag(), 'A' + m_index)); @@ -2199,10 +2199,10 @@ UINT8 z80scc_channel::data_read() } /* Get data from top of fifo data but restore read pointer in case of exit latch lock */ -UINT8 z80scc_channel::m_rx_fifo_rp_data() +uint8_t z80scc_channel::m_rx_fifo_rp_data() { - UINT8 data; - UINT8 old_rp = m_rx_fifo_rp; + uint8_t data; + uint8_t old_rp = m_rx_fifo_rp; m_rx_fifo_rp_step(); data = m_rx_data_fifo[m_rx_fifo_rp]; m_rx_fifo_rp = old_rp; @@ -2245,7 +2245,7 @@ WRITE8_MEMBER (z80scc_device::db_w) { m_chanB->data_write(data); } //------------------------------------------------- // data_write - write data register //------------------------------------------------- -void z80scc_channel::data_write(UINT8 data) +void z80scc_channel::data_write(uint8_t data) { /* Tx FIFO is full or...? */ if ( !(m_rr0 & RR0_TX_BUFFER_EMPTY) && // NMOS/CMOS 1 slot "FIFO" is controlled by the TBE bit instead of fifo logic @@ -2313,7 +2313,7 @@ void z80scc_channel::data_write(UINT8 data) // receive_data - receive data word into fifo //------------------------------------------------- -void z80scc_channel::receive_data(UINT8 data) +void z80scc_channel::receive_data(uint8_t data) { LOG(("\"%s\": %c : Receive Data Byte '%02x'\n", m_owner->tag(), 'A' + m_index, data)); diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h index 69143eed02a..34c52ce5032 100644 --- a/src/devices/machine/z80scc.h +++ b/src/devices/machine/z80scc.h @@ -147,7 +147,7 @@ class z80scc_channel : public device_t, friend class z80scc_device; public: - z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device-level overrides virtual void device_start() override; @@ -161,54 +161,54 @@ public: virtual void rcv_complete() override; // read register handlers - UINT8 do_sccreg_rr0(); - UINT8 do_sccreg_rr1(); - UINT8 do_sccreg_rr2(); - UINT8 do_sccreg_rr3(); - UINT8 do_sccreg_rr4(); - UINT8 do_sccreg_rr5(); - UINT8 do_sccreg_rr6(); - UINT8 do_sccreg_rr7(); - UINT8 do_sccreg_rr7p(){ return 0; } // Needs to be implemented for Synchronous mode - // UINT8 do_sccreg_rr8(); Short cutted due to frequent use - UINT8 do_sccreg_rr9(); - UINT8 do_sccreg_rr10(); - UINT8 do_sccreg_rr11(); - UINT8 do_sccreg_rr12(); - UINT8 do_sccreg_rr13(); - UINT8 do_sccreg_rr14(); - UINT8 do_sccreg_rr15(); + uint8_t do_sccreg_rr0(); + uint8_t do_sccreg_rr1(); + uint8_t do_sccreg_rr2(); + uint8_t do_sccreg_rr3(); + uint8_t do_sccreg_rr4(); + uint8_t do_sccreg_rr5(); + uint8_t do_sccreg_rr6(); + uint8_t do_sccreg_rr7(); + uint8_t do_sccreg_rr7p(){ return 0; } // Needs to be implemented for Synchronous mode + // uint8_t do_sccreg_rr8(); Short cutted due to frequent use + uint8_t do_sccreg_rr9(); + uint8_t do_sccreg_rr10(); + uint8_t do_sccreg_rr11(); + uint8_t do_sccreg_rr12(); + uint8_t do_sccreg_rr13(); + uint8_t do_sccreg_rr14(); + uint8_t do_sccreg_rr15(); // write register handlers - void do_sccreg_wr0(UINT8 data); - void do_sccreg_wr0_resets(UINT8 data); - void do_sccreg_wr1(UINT8 data); - void do_sccreg_wr2(UINT8 data); - void do_sccreg_wr3(UINT8 data); - void do_sccreg_wr4(UINT8 data); - void do_sccreg_wr5(UINT8 data); - void do_sccreg_wr6(UINT8 data); - void do_sccreg_wr7(UINT8 data); - void do_sccreg_wr7p(UINT8 data){}; // Needs to be implemented for Synchronous mode - void do_sccreg_wr8(UINT8 data); - void do_sccreg_wr9(UINT8 data); - void do_sccreg_wr10(UINT8 data); - void do_sccreg_wr11(UINT8 data); - void do_sccreg_wr12(UINT8 data); - void do_sccreg_wr13(UINT8 data); - void do_sccreg_wr14(UINT8 data); - void do_sccreg_wr15(UINT8 data); - - UINT8 control_read(); - void control_write(UINT8 data); - - UINT8 data_read(); - void data_write(UINT8 data); - - void receive_data(UINT8 data); + void do_sccreg_wr0(uint8_t data); + void do_sccreg_wr0_resets(uint8_t data); + void do_sccreg_wr1(uint8_t data); + void do_sccreg_wr2(uint8_t data); + void do_sccreg_wr3(uint8_t data); + void do_sccreg_wr4(uint8_t data); + void do_sccreg_wr5(uint8_t data); + void do_sccreg_wr6(uint8_t data); + void do_sccreg_wr7(uint8_t data); + void do_sccreg_wr7p(uint8_t data){}; // Needs to be implemented for Synchronous mode + void do_sccreg_wr8(uint8_t data); + void do_sccreg_wr9(uint8_t data); + void do_sccreg_wr10(uint8_t data); + void do_sccreg_wr11(uint8_t data); + void do_sccreg_wr12(uint8_t data); + void do_sccreg_wr13(uint8_t data); + void do_sccreg_wr14(uint8_t data); + void do_sccreg_wr15(uint8_t data); + + uint8_t control_read(); + void control_write(uint8_t data); + + uint8_t data_read(); + void data_write(uint8_t data); + + void receive_data(uint8_t data); void m_tx_fifo_rp_step(); void m_rx_fifo_rp_step(); - UINT8 m_rx_fifo_rp_data(); + uint8_t m_rx_fifo_rp_data(); DECLARE_WRITE_LINE_MEMBER( write_rx ); DECLARE_WRITE_LINE_MEMBER( cts_w ); @@ -223,42 +223,42 @@ public: // Register state // read registers enum - UINT8 m_rr0; // REG_RR0_STATUS - UINT8 m_rr1; // REG_RR1_SPEC_RCV_COND - UINT8 m_rr2; // REG_RR2_INTERRUPT_VECT - UINT8 m_rr3; // REG_RR3_INTERUPPT_PEND - UINT8 m_rr4; // REG_RR4_WR4_OR_RR0 - UINT8 m_rr5; // REG_RR5_WR5_OR_RR0 - UINT8 m_rr6; // REG_RR6_LSB_OR_RR2 - UINT8 m_rr7; // REG_RR7_MSB_OR_RR3 - UINT8 m_rr7p; - UINT8 m_rr8; // REG_RR8_RECEIVE_DATA - UINT8 m_rr9; // REG_RR9_WR3_OR_RR13 - UINT8 m_rr10; // REG_RR10_MISC_STATUS - UINT8 m_rr11; // REG_RR11_WR10_OR_RR15 - UINT8 m_rr12; // REG_RR12_LO_TIME_CONST - UINT8 m_rr13; // REG_RR13_HI_TIME_CONST - UINT8 m_rr14; // REG_RR14_WR7_OR_R10 - UINT8 m_rr15; // REG_RR15_WR15_EXT_STAT + uint8_t m_rr0; // REG_RR0_STATUS + uint8_t m_rr1; // REG_RR1_SPEC_RCV_COND + uint8_t m_rr2; // REG_RR2_INTERRUPT_VECT + uint8_t m_rr3; // REG_RR3_INTERUPPT_PEND + uint8_t m_rr4; // REG_RR4_WR4_OR_RR0 + uint8_t m_rr5; // REG_RR5_WR5_OR_RR0 + uint8_t m_rr6; // REG_RR6_LSB_OR_RR2 + uint8_t m_rr7; // REG_RR7_MSB_OR_RR3 + uint8_t m_rr7p; + uint8_t m_rr8; // REG_RR8_RECEIVE_DATA + uint8_t m_rr9; // REG_RR9_WR3_OR_RR13 + uint8_t m_rr10; // REG_RR10_MISC_STATUS + uint8_t m_rr11; // REG_RR11_WR10_OR_RR15 + uint8_t m_rr12; // REG_RR12_LO_TIME_CONST + uint8_t m_rr13; // REG_RR13_HI_TIME_CONST + uint8_t m_rr14; // REG_RR14_WR7_OR_R10 + uint8_t m_rr15; // REG_RR15_WR15_EXT_STAT // write registers enum - UINT8 m_wr0; // REG_WR0_COMMAND_REGPT - UINT8 m_wr1; // REG_WR1_INT_DMA_ENABLE - UINT8 m_wr2; // REG_WR2_INT_VECTOR - UINT8 m_wr3; // REG_WR3_RX_CONTROL - UINT8 m_wr4; // REG_WR4_RX_TX_MODES - UINT8 m_wr5; // REG_WR5_TX_CONTROL - UINT8 m_wr6; // REG_WR6_SYNC_OR_SDLC_A - UINT8 m_wr7; // REG_WR7_SYNC_OR_SDLC_F - UINT8 m_wr7p; // - UINT8 m_wr8; // REG_WR8_TRANSMIT_DATA - // UINT8 m_wr9; // REG_WR9_MASTER_INT_CTRL - UINT8 m_wr10; // REG_WR10_MSC_RX_TX_CTRL - UINT8 m_wr11; // REG_WR11_CLOCK_MODES - UINT8 m_wr12; // REG_WR12_LO_BAUD_GEN - UINT8 m_wr13; // REG_WR13_HI_BAUD_GEN - UINT8 m_wr14; // REG_WR14_MISC_CTRL - UINT8 m_wr15; // REG_WR15_EXT_ST_INT_CTRL + uint8_t m_wr0; // REG_WR0_COMMAND_REGPT + uint8_t m_wr1; // REG_WR1_INT_DMA_ENABLE + uint8_t m_wr2; // REG_WR2_INT_VECTOR + uint8_t m_wr3; // REG_WR3_RX_CONTROL + uint8_t m_wr4; // REG_WR4_RX_TX_MODES + uint8_t m_wr5; // REG_WR5_TX_CONTROL + uint8_t m_wr6; // REG_WR6_SYNC_OR_SDLC_A + uint8_t m_wr7; // REG_WR7_SYNC_OR_SDLC_F + uint8_t m_wr7p; // + uint8_t m_wr8; // REG_WR8_TRANSMIT_DATA + // uint8_t m_wr9; // REG_WR9_MASTER_INT_CTRL + uint8_t m_wr10; // REG_WR10_MSC_RX_TX_CTRL + uint8_t m_wr11; // REG_WR11_CLOCK_MODES + uint8_t m_wr12; // REG_WR12_LO_BAUD_GEN + uint8_t m_wr13; // REG_WR13_HI_BAUD_GEN + uint8_t m_wr14; // REG_WR14_MISC_CTRL + uint8_t m_wr15; // REG_WR15_EXT_ST_INT_CTRL protected: enum @@ -541,15 +541,15 @@ protected: #if LOCAL_BRG emu_timer *baudtimer; - UINT16 m_brg_counter; + uint16_t m_brg_counter; #else unsigned int m_brg_rate; #endif unsigned int m_delayed_tx_brg_change; unsigned int m_brg_const; - void scc_register_write(UINT8 reg, UINT8 data); - UINT8 scc_register_read(UINT8 reg); + void scc_register_write(uint8_t reg, uint8_t data); + uint8_t scc_register_read(uint8_t reg); void update_serial(); void set_dtr(int state); void set_rts(int state); @@ -562,9 +562,9 @@ protected: void safe_transmit_register_reset(); // receiver state - UINT8 m_rx_data_fifo[8]; // receive data FIFO - UINT8 m_rx_error_fifo[8]; // receive error FIFO - UINT8 m_rx_error; // current receive error + uint8_t m_rx_data_fifo[8]; // receive data FIFO + uint8_t m_rx_error_fifo[8]; // receive error FIFO + uint8_t m_rx_error; // current receive error //int m_rx_fifo // receive FIFO pointer int m_rx_fifo_rp; // receive FIFO read pointer int m_rx_fifo_wp; // receive FIFO write pointer @@ -573,7 +573,7 @@ protected: int m_rx_clock; // receive clock pulse count int m_rx_first; // first character received int m_rx_break; // receive break condition - UINT8 m_rx_rr0_latch; // read register 0 latched + uint8_t m_rx_rr0_latch; // read register 0 latched int m_rxd; int m_ri; // ring indicator latch @@ -581,20 +581,20 @@ protected: int m_dcd; // data carrier detect latch // transmitter state - UINT8 m_tx_data_fifo[4]; // data FIFO - UINT8 m_tx_error_fifo[4]; // error FIFO + uint8_t m_tx_data_fifo[4]; // data FIFO + uint8_t m_tx_error_fifo[4]; // error FIFO int m_tx_fifo_rp; // FIFO read pointer int m_tx_fifo_wp; // FIFO write pointer int m_tx_fifo_sz; // FIFO size - UINT8 m_tx_error; // current error - // UINT8 m_tx_data; // transmit data register + uint8_t m_tx_error; // current error + // uint8_t m_tx_data; // transmit data register int m_tx_clock; // transmit clock pulse count int m_dtr; // data terminal ready int m_rts; // request to send // synchronous state - UINT16 m_sync; // sync character + uint16_t m_sync; // sync character int m_rcv_mode; int m_index; @@ -602,7 +602,7 @@ protected: // SCC specifics int m_ph; // Point high command to access regs 08-0f - UINT8 m_zc; + uint8_t m_zc; }; @@ -615,8 +615,8 @@ class z80scc_device : public device_t public: // construction/destruction - z80scc_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); - z80scc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80scc_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); + z80scc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_txda_callback(device_t &device, _Object object) { return downcast(device).m_out_txda_cb.set_callback(object); } template static devcb_base &set_out_dtra_callback(device_t &device, _Object object) { return downcast(device).m_out_dtra_cb.set_callback(object); } @@ -668,7 +668,7 @@ public: int m1_r(); // Single registers instances accessed from both channels - UINT8 m_wr9; // REG_WR9_MASTER_INT_CTRL + uint8_t m_wr9; // REG_WR9_MASTER_INT_CTRL DECLARE_WRITE_LINE_MEMBER( rxa_w ) { m_chanA->write_rx(state); } DECLARE_WRITE_LINE_MEMBER( rxb_w ) { m_chanB->write_rx(state); } @@ -700,7 +700,7 @@ protected: // internal interrupt management void check_interrupts(); void reset_interrupts(); - UINT8 modify_vector(UINT8 vect, int i, UINT8 src); + uint8_t modify_vector(uint8_t vect, int i, uint8_t src); void trigger_interrupt(int index, int state); @@ -765,55 +765,55 @@ protected: int m_int_source[6]; // interrupt source int m_variant; - UINT8 m_wr0_ptrbits; + uint8_t m_wr0_ptrbits; }; class scc8030_device : public z80scc_device { public : - scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc80C30_device : public z80scc_device { public : - scc80C30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc80C30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc80230_device : public z80scc_device { public : - scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc8530_device : public z80scc_device { public : - scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc85C30_device : public z80scc_device { public : - scc85C30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc85C30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc85230_device : public z80scc_device { public : - scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc85233_device : public z80scc_device { public : - scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; class scc8523L_device : public z80scc_device { public : - scc8523L_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + scc8523L_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // device type definition diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp index db8be73850e..e5553ac0271 100644 --- a/src/devices/machine/z80sio.cpp +++ b/src/devices/machine/z80sio.cpp @@ -103,7 +103,7 @@ machine_config_constructor z80sio_device::device_mconfig_additions() const // z80sio_device - constructor //------------------------------------------------- -z80sio_device::z80sio_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) +z80sio_device::z80sio_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), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -133,7 +133,7 @@ z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, co elem = 0; } -z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80SIO, "Z80 SIO", tag, owner, clock, "z80sio", __FILE__), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -331,7 +331,7 @@ void z80sio_device::reset_interrupts() //------------------------------------------------- void z80sio_device::trigger_interrupt(int index, int state) { - UINT8 vector = m_chanB->m_wr2; + uint8_t vector = m_chanB->m_wr2; int priority; LOG(("%s %s \n",FUNCNAME, tag())); @@ -479,7 +479,7 @@ WRITE8_MEMBER( z80sio_device::ba_cd_w ) //------------------------------------------------- // z80sio_channel - constructor //------------------------------------------------- -z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80SIO_CHANNEL, "Z80 SIO channel", tag, owner, clock, "z80sio_channel", __FILE__), device_serial_interface(mconfig, *this), m_rx_error(0), @@ -707,7 +707,7 @@ void z80sio_channel::rcv_callback() //------------------------------------------------- void z80sio_channel::rcv_complete() { - UINT8 data; + uint8_t data; receive_register_extract(); data = get_received_char(); @@ -839,7 +839,7 @@ int z80sio_channel::get_tx_word_length() * This register contains the status of the receive and transmit buffers; the * DCD, CTS, and SYNC inputs; the Transmit Underrun/EOM latch; and the * Break/Abort latch. */ -UINT8 z80sio_channel::do_sioreg_rr0() +uint8_t z80sio_channel::do_sioreg_rr0() { LOG(("%s %s\n",FUNCNAME, tag())); return m_rr0; @@ -847,7 +847,7 @@ UINT8 z80sio_channel::do_sioreg_rr0() /* * This register contains the Special Receive condition status bits and Residue * codes for the I-Field in the SDLC Receive Mode. */ -UINT8 z80sio_channel::do_sioreg_rr1() +uint8_t z80sio_channel::do_sioreg_rr1() { LOG(("%s %s\n",FUNCNAME, tag())); return m_rr1; @@ -860,7 +860,7 @@ Register 1 section. When this register is read, the vector returned is modi- fied by the highest priority interrupting condition at the time of the read. If no interrupts are pending, the vector is modified with V3 = 0, V2 = 1, and V1 = 1. This register is read only through Channel B. */ -UINT8 z80sio_channel::do_sioreg_rr2() +uint8_t z80sio_channel::do_sioreg_rr2() { LOG(("%s %s\n",FUNCNAME, tag())); // channel B only @@ -872,10 +872,10 @@ UINT8 z80sio_channel::do_sioreg_rr2() // control_read - read control register //------------------------------------------------- -UINT8 z80sio_channel::control_read() +uint8_t z80sio_channel::control_read() { - UINT8 data = 0; - UINT8 reg = m_wr0 & WR0_REGISTER_MASK; + uint8_t data = 0; + uint8_t reg = m_wr0 & WR0_REGISTER_MASK; //LOG(("%s %s\n",FUNCNAME, tag())); if (reg != 0) @@ -899,7 +899,7 @@ UINT8 z80sio_channel::control_read() /* SIO CRC Initialization Code handling - candidate for breaking out in a z80sio_base class Handle the WR0 CRC Reset/Init bits separatelly, needed by derived devices separatelly from the commands */ -void z80sio_channel::do_sioreg_wr0_resets(UINT8 data) +void z80sio_channel::do_sioreg_wr0_resets(uint8_t data) { LOG(("%s %s\n",FUNCNAME, tag())); switch (data & WR0_CRC_RESET_CODE_MASK) @@ -921,7 +921,7 @@ void z80sio_channel::do_sioreg_wr0_resets(UINT8 data) } } -void z80sio_channel::do_sioreg_wr0(UINT8 data) +void z80sio_channel::do_sioreg_wr0(uint8_t data) { m_wr0 = data; switch (data & WR0_COMMAND_MASK) @@ -973,7 +973,7 @@ void z80sio_channel::do_sioreg_wr0(UINT8 data) do_sioreg_wr0_resets(data); } -void z80sio_channel::do_sioreg_wr1(UINT8 data) +void z80sio_channel::do_sioreg_wr1(uint8_t data) { /* TODO: implement vector modifications when WR1 bit D2 is changed */ m_wr1 = data; @@ -1004,7 +1004,7 @@ void z80sio_channel::do_sioreg_wr1(UINT8 data) } } -void z80sio_channel::do_sioreg_wr2(UINT8 data) +void z80sio_channel::do_sioreg_wr2(uint8_t data) { m_wr2 = data; if (m_index == z80sio_device::CHANNEL_B) @@ -1018,7 +1018,7 @@ void z80sio_channel::do_sioreg_wr2(UINT8 data) LOG(("Z80SIO \"%s\" Channel %c : Interrupt Vector %02x\n", m_owner->tag(), 'A' + m_index, data)); } -void z80sio_channel::do_sioreg_wr3(UINT8 data) +void z80sio_channel::do_sioreg_wr3(uint8_t data) { m_wr3 = data; LOG(("Z80SIO \"%s\" Channel %c : Receiver Enable %u\n", m_owner->tag(), 'A' + m_index, (data & WR3_RX_ENABLE) ? 1 : 0)); @@ -1026,7 +1026,7 @@ void z80sio_channel::do_sioreg_wr3(UINT8 data) LOG(("Z80SIO \"%s\" Channel %c : Receiver Bits/Character %u\n", m_owner->tag(), 'A' + m_index, get_rx_word_length())); } -void z80sio_channel::do_sioreg_wr4(UINT8 data) +void z80sio_channel::do_sioreg_wr4(uint8_t data) { m_wr4 = data; LOG(("Z80SIO \"%s\" Channel %c : Parity Enable %u\n", m_owner->tag(), 'A' + m_index, (data & WR4_PARITY_ENABLE) ? 1 : 0)); @@ -1035,7 +1035,7 @@ void z80sio_channel::do_sioreg_wr4(UINT8 data) LOG(("Z80SIO \"%s\" Channel %c : Clock Mode %uX\n", m_owner->tag(), 'A' + m_index, get_clock_mode())); } -void z80sio_channel::do_sioreg_wr5(UINT8 data) +void z80sio_channel::do_sioreg_wr5(uint8_t data) { m_wr5 = data; LOG(("Z80SIO \"%s\" Channel %c : Transmitter Enable %u\n", m_owner->tag(), 'A' + m_index, (data & WR5_TX_ENABLE) ? 1 : 0)); @@ -1045,13 +1045,13 @@ void z80sio_channel::do_sioreg_wr5(UINT8 data) LOG(("Z80SIO \"%s\" Channel %c : Data Terminal Ready %u\n", m_owner->tag(), 'A' + m_index, (data & WR5_DTR) ? 1 : 0)); } -void z80sio_channel::do_sioreg_wr6(UINT8 data) +void z80sio_channel::do_sioreg_wr6(uint8_t data) { LOG(("Z80SIO \"%s\" Channel %c : Transmit Sync %02x\n", m_owner->tag(), 'A' + m_index, data)); m_sync = (m_sync & 0xff00) | data; } -void z80sio_channel::do_sioreg_wr7(UINT8 data) +void z80sio_channel::do_sioreg_wr7(uint8_t data) { LOG(("Z80SIO \"%s\" Channel %c : Receive Sync %02x\n", m_owner->tag(), 'A' + m_index, data)); m_sync = (data << 8) | (m_sync & 0xff); @@ -1060,9 +1060,9 @@ void z80sio_channel::do_sioreg_wr7(UINT8 data) //------------------------------------------------- // control_write - write control register //------------------------------------------------- -void z80sio_channel::control_write(UINT8 data) +void z80sio_channel::control_write(uint8_t data) { - UINT8 reg = m_wr0 & WR0_REGISTER_MASK; + uint8_t reg = m_wr0 & WR0_REGISTER_MASK; if (reg != 0) { @@ -1091,9 +1091,9 @@ void z80sio_channel::control_write(UINT8 data) //------------------------------------------------- // data_read - read data register //------------------------------------------------- -UINT8 z80sio_channel::data_read() +uint8_t z80sio_channel::data_read() { - UINT8 data = 0; + uint8_t data = 0; if (m_rx_fifo >= 0) { @@ -1122,7 +1122,7 @@ UINT8 z80sio_channel::data_read() //------------------------------------------------- // data_write - write data register //------------------------------------------------- -void z80sio_channel::data_write(UINT8 data) +void z80sio_channel::data_write(uint8_t data) { m_tx_data = data; @@ -1151,7 +1151,7 @@ void z80sio_channel::data_write(UINT8 data) //------------------------------------------------- // receive_data - receive data word //------------------------------------------------- -void z80sio_channel::receive_data(UINT8 data) +void z80sio_channel::receive_data(uint8_t data) { LOG(("%s(%02x) %s:%c\n",FUNCNAME, data, tag(), 'A' + m_index)); diff --git a/src/devices/machine/z80sio.h b/src/devices/machine/z80sio.h index 3eac1e98d69..f0fe3148a6e 100644 --- a/src/devices/machine/z80sio.h +++ b/src/devices/machine/z80sio.h @@ -129,7 +129,7 @@ class z80sio_channel : public device_t, friend class z80sio_device; public: - z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device-level overrides virtual void device_start() override; @@ -143,28 +143,28 @@ public: virtual void rcv_complete() override; // read register handlers - UINT8 do_sioreg_rr0(); - UINT8 do_sioreg_rr1(); - UINT8 do_sioreg_rr2(); + uint8_t do_sioreg_rr0(); + uint8_t do_sioreg_rr1(); + uint8_t do_sioreg_rr2(); // write register handlers - void do_sioreg_wr0(UINT8 data); - void do_sioreg_wr0_resets(UINT8 data); - void do_sioreg_wr1(UINT8 data); - void do_sioreg_wr2(UINT8 data); - void do_sioreg_wr3(UINT8 data); - void do_sioreg_wr4(UINT8 data); - void do_sioreg_wr5(UINT8 data); - void do_sioreg_wr6(UINT8 data); - void do_sioreg_wr7(UINT8 data); + void do_sioreg_wr0(uint8_t data); + void do_sioreg_wr0_resets(uint8_t data); + void do_sioreg_wr1(uint8_t data); + void do_sioreg_wr2(uint8_t data); + void do_sioreg_wr3(uint8_t data); + void do_sioreg_wr4(uint8_t data); + void do_sioreg_wr5(uint8_t data); + void do_sioreg_wr6(uint8_t data); + void do_sioreg_wr7(uint8_t data); - UINT8 control_read(); - void control_write(UINT8 data); + uint8_t control_read(); + void control_write(uint8_t data); - UINT8 data_read(); - void data_write(UINT8 data); + uint8_t data_read(); + void data_write(uint8_t data); - void receive_data(UINT8 data); + void receive_data(uint8_t data); DECLARE_WRITE_LINE_MEMBER( write_rx ); DECLARE_WRITE_LINE_MEMBER( cts_w ); @@ -179,18 +179,18 @@ public: // Register state // read registers enum - UINT8 m_rr0; // REG_RR0_STATUS - UINT8 m_rr1; // REG_RR1_SPEC_RCV_COND - UINT8 m_rr2; // REG_RR2_INTERRUPT_VECT + uint8_t m_rr0; // REG_RR0_STATUS + uint8_t m_rr1; // REG_RR1_SPEC_RCV_COND + uint8_t m_rr2; // REG_RR2_INTERRUPT_VECT // write registers enum - UINT8 m_wr0; // REG_WR0_COMMAND_REGPT - UINT8 m_wr1; // REG_WR1_INT_DMA_ENABLE - UINT8 m_wr2; // REG_WR2_INT_VECTOR - UINT8 m_wr3; // REG_WR3_RX_CONTROL - UINT8 m_wr4; // REG_WR4_RX_TX_MODES - UINT8 m_wr5; // REG_WR5_TX_CONTROL - UINT8 m_wr6; // REG_WR6_SYNC_OR_SDLC_A - UINT8 m_wr7; // REG_WR7_SYNC_OR_SDLC_F + uint8_t m_wr0; // REG_WR0_COMMAND_REGPT + uint8_t m_wr1; // REG_WR1_INT_DMA_ENABLE + uint8_t m_wr2; // REG_WR2_INT_VECTOR + uint8_t m_wr3; // REG_WR3_RX_CONTROL + uint8_t m_wr4; // REG_WR4_RX_TX_MODES + uint8_t m_wr5; // REG_WR5_TX_CONTROL + uint8_t m_wr6; // REG_WR6_SYNC_OR_SDLC_A + uint8_t m_wr7; // REG_WR7_SYNC_OR_SDLC_F int m_variant; // Set in device @@ -366,15 +366,15 @@ protected: int get_tx_word_length(); // receiver state - UINT8 m_rx_data_fifo[3]; // receive data FIFO - UINT8 m_rx_error_fifo[3]; // receive error FIFO - UINT8 m_rx_error; // current receive error + uint8_t m_rx_data_fifo[3]; // receive data FIFO + uint8_t m_rx_error_fifo[3]; // receive error FIFO + uint8_t m_rx_error; // current receive error int m_rx_fifo; // receive FIFO pointer int m_rx_clock; // receive clock pulse count int m_rx_first; // first character received int m_rx_break; // receive break condition - UINT8 m_rx_rr0_latch; // read register 0 latched + uint8_t m_rx_rr0_latch; // read register 0 latched int m_rxd; int m_sh; // sync hunt @@ -382,14 +382,14 @@ protected: int m_dcd; // data carrier detect latch // transmitter state - UINT8 m_tx_data; // transmit data register + uint8_t m_tx_data; // transmit data register int m_tx_clock; // transmit clock pulse count int m_dtr; // data terminal ready int m_rts; // request to send // synchronous state - UINT16 m_sync; // sync character + uint16_t m_sync; // sync character int m_index; z80sio_device *m_uart; @@ -405,8 +405,8 @@ class z80sio_device : public device_t, public: // construction/destruction - z80sio_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); - z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sio_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); + z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_txda_callback(device_t &device, _Object object) { return downcast(device).m_out_txda_cb.set_callback(object); } template static devcb_base &set_out_dtra_callback(device_t &device, _Object object) { return downcast(device).m_out_dtra_cb.set_callback(object); } diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp index e8900abd021..fb0e42fd725 100644 --- a/src/devices/machine/z80sti.cpp +++ b/src/devices/machine/z80sti.cpp @@ -63,7 +63,7 @@ const int z80sti_device::INT_LEVEL_TIMER[] = }; // interrupt vectors -const UINT8 z80sti_device::INT_VECTOR[] = +const uint8_t z80sti_device::INT_VECTOR[] = { 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e @@ -82,7 +82,7 @@ const int z80sti_device::PRESCALER[] = { 0, 4, 10, 16, 50, 64, 100, 200 }; // z80sti_device - constructor //------------------------------------------------- -z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z80STI, "Mostek MK3801", tag, owner, clock, "z80sti", __FILE__), device_serial_interface(mconfig, *this), device_z80daisy_interface(mconfig, *this), @@ -269,7 +269,7 @@ int z80sti_device::z80daisy_irq_ack() // find the first channel with an interrupt requested if (m_int_state[i] & Z80_DAISY_INT) { - UINT8 vector = (m_pvr & 0xe0) | INT_VECTOR[i]; + uint8_t vector = (m_pvr & 0xe0) | INT_VECTOR[i]; // clear interrupt, switch to the IEO state, and update the IRQs m_int_state[i] = Z80_DAISY_IEO; @@ -370,7 +370,7 @@ void z80sti_device::take_interrupt(int level) READ8_MEMBER( z80sti_device::read ) { - UINT8 data = 0; + uint8_t data = 0; switch (offset & 0x0f) { diff --git a/src/devices/machine/z80sti.h b/src/devices/machine/z80sti.h index f0db981ac9e..4f480da4a42 100644 --- a/src/devices/machine/z80sti.h +++ b/src/devices/machine/z80sti.h @@ -81,7 +81,7 @@ class z80sti_device : public device_t, { public: // construction/destruction - z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_out_int_callback(device_t &device, _Object object) { return downcast(device).m_out_int_cb.set_callback(object); } template static devcb_base &set_in_gpio_callback(device_t &device, _Object object) { return downcast(device).m_in_gpio_cb.set_callback(object); } @@ -173,7 +173,7 @@ private: static const int INT_LEVEL_GPIP[]; static const int INT_LEVEL_TIMER[]; - static const UINT8 INT_VECTOR[]; + static const uint8_t INT_VECTOR[]; static const int PRESCALER[]; // device-level overrides @@ -211,31 +211,31 @@ private: int m_tx_clock; // serial transmit clock // I/O state - UINT8 m_gpip; // general purpose I/O register - UINT8 m_aer; // active edge register - UINT8 m_ddr; // data direction register + uint8_t m_gpip; // general purpose I/O register + uint8_t m_aer; // active edge register + uint8_t m_ddr; // data direction register // interrupt state - UINT16 m_ier; // interrupt enable register - UINT16 m_ipr; // interrupt pending register - UINT16 m_isr; // interrupt in-service register - UINT16 m_imr; // interrupt mask register - UINT8 m_pvr; // interrupt vector register + uint16_t m_ier; // interrupt enable register + uint16_t m_ipr; // interrupt pending register + uint16_t m_isr; // interrupt in-service register + uint16_t m_imr; // interrupt mask register + uint8_t m_pvr; // interrupt vector register int m_int_state[16]; // interrupt state // timer state - UINT8 m_tabc; // timer A/B control register - UINT8 m_tcdc; // timer C/D control register - UINT8 m_tdr[4]; // timer data registers - UINT8 m_tmc[4]; // timer main counters + uint8_t m_tabc; // timer A/B control register + uint8_t m_tcdc; // timer C/D control register + uint8_t m_tdr[4]; // timer data registers + uint8_t m_tmc[4]; // timer main counters int m_to[4]; // timer out latch // serial state - UINT8 m_scr; // synchronous character register - UINT8 m_ucr; // USART control register - UINT8 m_tsr; // transmitter status register - UINT8 m_rsr; // receiver status register - UINT8 m_udr; // USART data register + uint8_t m_scr; // synchronous character register + uint8_t m_ucr; // USART control register + uint8_t m_tsr; // transmitter status register + uint8_t m_rsr; // receiver status register + uint8_t m_udr; // USART data register // timers emu_timer *m_timer[4]; // counter timers diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp index 9a036d12b5a..4c36ab242ec 100644 --- a/src/devices/machine/z8536.cpp +++ b/src/devices/machine/z8536.cpp @@ -121,7 +121,7 @@ static const char *CTMS_DCS[] = { "Pulse", "One-shot", "Square Wave", "Do not us void z8536_device::get_interrupt_vector() { - UINT8 vector = 0xff; + uint8_t vector = 0xff; if (m_register[MASTER_INTERRUPT_CONTROL] & MICR_MIE) { @@ -249,9 +249,9 @@ void z8536_device::check_interrupt() // read_register - read from register //------------------------------------------------- -UINT8 z8536_device::read_register(offs_t offset) +uint8_t z8536_device::read_register(offs_t offset) { - UINT8 data; + uint8_t data; switch (offset) { @@ -326,7 +326,7 @@ UINT8 z8536_device::read_register(offs_t offset) // read_register - masked read from register //------------------------------------------------- -UINT8 z8536_device::read_register(offs_t offset, UINT8 mask) +uint8_t z8536_device::read_register(offs_t offset, uint8_t mask) { return read_register(offset) & mask; } @@ -336,7 +336,7 @@ UINT8 z8536_device::read_register(offs_t offset, UINT8 mask) // write_register - write to register //------------------------------------------------- -void z8536_device::write_register(offs_t offset, UINT8 data) +void z8536_device::write_register(offs_t offset, uint8_t data) { switch (offset) { @@ -500,7 +500,7 @@ void z8536_device::write_register(offs_t offset, UINT8 data) case PORT_C_DATA: { - UINT8 mask = (data & 0xf0) | (data >> 4); + uint8_t mask = (data & 0xf0) | (data >> 4); m_output[PORT_C] = (m_output[PORT_C] & mask) | ((data & 0x0f) & (mask ^ 0xff)); @@ -629,9 +629,9 @@ void z8536_device::write_register(offs_t offset, UINT8 data) // write_register - masked write to register //------------------------------------------------- -void z8536_device::write_register(offs_t offset, UINT8 data, UINT8 mask) +void z8536_device::write_register(offs_t offset, uint8_t data, uint8_t mask) { - UINT8 combined_data = (data & mask) | (m_register[offset] & (mask ^ 0xff)); + uint8_t combined_data = (data & mask) | (m_register[offset] & (mask ^ 0xff)); write_register(offset, combined_data); } @@ -794,9 +794,9 @@ void z8536_device::gate(device_timer_id id, int state) void z8536_device::match_pattern(int port) { - UINT8 pms = m_register[PORT_A_MODE_SPECIFICATION + (port << 3)]; - UINT8 pm = m_register[PORT_A_PATTERN_MASK + (port << 3)]; - UINT8 ddr = m_register[PORT_A_DATA_DIRECTION + (port << 3)]; + uint8_t pms = m_register[PORT_A_MODE_SPECIFICATION + (port << 3)]; + uint8_t pm = m_register[PORT_A_PATTERN_MASK + (port << 3)]; + uint8_t ddr = m_register[PORT_A_DATA_DIRECTION + (port << 3)]; switch ((pms & PMS_PMS_MASK) >> 1) { @@ -826,7 +826,7 @@ void z8536_device::external_port_w(int port, int bit, int state) case PORT_B: { assert((PORT_A_DATA_DIRECTION + (port << 3)) >= 0 && (PORT_A_DATA_DIRECTION + (port << 3)) < ARRAY_LENGTH(m_register)); - UINT8 ddr = m_register[PORT_A_DATA_DIRECTION + (port << 3)]; + uint8_t ddr = m_register[PORT_A_DATA_DIRECTION + (port << 3)]; if (!BIT(ddr, bit)) return; @@ -853,7 +853,7 @@ void z8536_device::external_port_w(int port, int bit, int state) // z8536_device - constructor //------------------------------------------------- -z8536_device::z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +z8536_device::z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, Z8536, "Zilog Z8536", tag, owner, clock, "z8536", __FILE__), device_z80daisy_interface(mconfig, *this), m_write_irq(*this), @@ -992,7 +992,7 @@ void z8536_device::z80daisy_irq_reti() READ8_MEMBER( z8536_device::read ) { - UINT8 data = 0; + uint8_t data = 0; if (m_state == STATE_RESET) { diff --git a/src/devices/machine/z8536.h b/src/devices/machine/z8536.h index 4a6170e99ae..2110bdc87a2 100644 --- a/src/devices/machine/z8536.h +++ b/src/devices/machine/z8536.h @@ -77,7 +77,7 @@ class z8536_device : public device_t, { public: // construction/destruction - z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast(device).m_write_irq.set_callback(object); } template static devcb_base &set_pa_rd_callback(device_t &device, _Object object) { return downcast(device).m_read_pa.set_callback(object); } @@ -297,10 +297,10 @@ private: void get_interrupt_vector(); void check_interrupt(); - UINT8 read_register(offs_t offset); - UINT8 read_register(offs_t offset, UINT8 mask); - void write_register(offs_t offset, UINT8 data); - void write_register(offs_t offset, UINT8 data, UINT8 mask); + uint8_t read_register(offs_t offset); + uint8_t read_register(offs_t offset, uint8_t mask); + void write_register(offs_t offset, uint8_t data); + void write_register(offs_t offset, uint8_t data, uint8_t mask); bool counter_enabled(device_timer_id id); bool counter_external_output(device_timer_id id); @@ -330,18 +330,18 @@ private: // register state int m_state; - UINT8 m_register[48]; - UINT8 m_pointer; + uint8_t m_register[48]; + uint8_t m_pointer; // input/output port state - UINT8 m_input[3]; - UINT8 m_output[3]; - UINT8 m_buffer[3]; - UINT8 m_match[3]; + uint8_t m_input[3]; + uint8_t m_output[3]; + uint8_t m_buffer[3]; + uint8_t m_match[3]; // timers emu_timer *m_timer; - UINT16 m_counter[3]; + uint16_t m_counter[3]; }; -- cgit v1.2.3